try { (function() { 
/*
 RequireJS 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
(function(){var version="0.25.0",commentRegExp=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,cjsRequireRegExp=/require\(["']([^'"\s]+)["']\)/g,currDirRegExp=/^\.\//,jsSuffixRegExp=/\.js$/,ostring=Object.prototype.toString,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=!!(typeof window!=="undefined"&&navigator&&document),isWebWorker=!isBrowser&&typeof importScripts!=="undefined",readyRegExp=/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!=="undefined"&&opera.toString()==="[object Opera]",
reqWaitIdPrefix="_r@@",empty={},contexts={},globalDefQueue=[],interactiveScript=null,isDone=false,checkLoadedDepth=0,useInteractive=false,req,cfg={},currentlyAddingScript,s,head,scripts,script,src,subPath,mainScript,dataMain,i,scrollIntervalId,ctx,checkLoadedTimeoutId;function isFunction(it){return ostring.call(it)==="[object Function]"}function isArray(it){return ostring.call(it)==="[object Array]"}function mixin(target,source,force){for(var prop in source)if(!(prop in empty)&&(!(prop in target)||
force))target[prop]=source[prop];return req}function makeError(id,msg,err){var e=new Error(msg+"\nhttp://requirejs.org/docs/errors.html#"+id);if(err)e.originalError=err;return e}function configurePackageDir(pkgs,currentPackages,dir){var i,location,pkgObj;for(i=0;pkgObj=currentPackages[i];i++){pkgObj=typeof pkgObj==="string"?{name:pkgObj}:pkgObj;location=pkgObj.location;if(dir&&(!location||location.indexOf("/")!==0&&location.indexOf(":")===-1))location=dir+"/"+(location||pkgObj.name);pkgs[pkgObj.name]=
{name:pkgObj.name,location:location||pkgObj.name,main:(pkgObj.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}}if(typeof define!=="undefined")return;if(typeof requirejs!=="undefined")if(isFunction(requirejs))return;else{cfg=requirejs;requirejs=undefined}if(typeof require!=="undefined"&&!isFunction(require)){cfg=require;require=undefined}function newContext(contextName){var context,resume,config={waitSeconds:7,baseUrl:s.baseUrl||"./",paths:{},pkgs:{}},defQueue=[],specified={"require":true,
"exports":true,"module":true},urlMap={},defined={},loaded={},waiting={},waitAry=[],waitIdCounter=0,managerCallbacks={},plugins={},pluginsQueue={},resumeDepth=0,normalizedWaiting={};function trimDots(ary){var i,part;for(i=0;part=ary[i];i++)if(part==="."){ary.splice(i,1);i-=1}else if(part==="..")if(i===1&&(ary[2]===".."||ary[0]===".."))break;else if(i>0){ary.splice(i-1,2);i-=2}}function normalize(name,baseName){var pkgName,pkgConfig;if(name.charAt(0)===".")if(baseName){if(config.pkgs[baseName])baseName=
[baseName];else{baseName=baseName.split("/");baseName=baseName.slice(0,baseName.length-1)}name=baseName.concat(name.split("/"));trimDots(name);pkgConfig=config.pkgs[pkgName=name[0]];name=name.join("/");if(pkgConfig&&name===pkgName+"/"+pkgConfig.main)name=pkgName}return name}function makeModuleMap(name,parentModuleMap){var index=name?name.indexOf("!"):-1,prefix=null,parentName=parentModuleMap?parentModuleMap.name:null,originalName=name,normalizedName,url,pluginModule;if(index!==-1){prefix=name.substring(0,
index);name=name.substring(index+1,name.length)}if(prefix)prefix=normalize(prefix,parentName);if(name){if(prefix){pluginModule=defined[prefix];if(pluginModule)if(pluginModule.normalize)normalizedName=pluginModule.normalize(name,function(name){return normalize(name,parentName)});else normalizedName=normalize(name,parentName);else normalizedName="__$p"+parentName+"@"+name}else normalizedName=normalize(name,parentName);url=urlMap[normalizedName];if(!url){if(req.toModuleUrl)url=req.toModuleUrl(context,
normalizedName,parentModuleMap);else url=context.nameToUrl(normalizedName,null,parentModuleMap);urlMap[normalizedName]=url}}return{prefix:prefix,name:normalizedName,parentMap:parentModuleMap,url:url,originalName:originalName,fullName:prefix?prefix+"!"+normalizedName:normalizedName}}function isPriorityDone(){var priorityDone=true,priorityWait=config.priorityWait,priorityName,i;if(priorityWait){for(i=0;priorityName=priorityWait[i];i++)if(!loaded[priorityName]){priorityDone=false;break}if(priorityDone)delete config.priorityWait}return priorityDone}
function makeSetExports(moduleObj){return function(exports){moduleObj.exports=exports}}function makeContextModuleFunc(func,relModuleMap,enableBuildCallback){return function(){var args=[].concat(aps.call(arguments,0)),lastArg;if(enableBuildCallback&&isFunction(lastArg=args[args.length-1]))lastArg.__requireJsBuild=true;args.push(relModuleMap);return func.apply(null,args)}}function makeRequire(relModuleMap,enableBuildCallback){var modRequire=makeContextModuleFunc(context.require,relModuleMap,enableBuildCallback);
mixin(modRequire,{nameToUrl:makeContextModuleFunc(context.nameToUrl,relModuleMap),toUrl:makeContextModuleFunc(context.toUrl,relModuleMap),defined:makeContextModuleFunc(context.requireDefined,relModuleMap),specified:makeContextModuleFunc(context.requireSpecified,relModuleMap),ready:req.ready,isBrowser:req.isBrowser});if(req.paths)modRequire.paths=req.paths;return modRequire}function updateNormalizedNames(pluginName){var oldFullName,oldModuleMap,moduleMap,fullName,callbacks,i,j,k,depArray,existingCallbacks,
maps=normalizedWaiting[pluginName];if(maps)for(i=0;oldModuleMap=maps[i];i++){oldFullName=oldModuleMap.fullName;moduleMap=makeModuleMap(oldModuleMap.originalName,oldModuleMap.parentMap);fullName=moduleMap.fullName;callbacks=managerCallbacks[oldFullName]||[];existingCallbacks=managerCallbacks[fullName];if(fullName!==oldFullName){if(oldFullName in specified){delete specified[oldFullName];specified[fullName]=true}if(existingCallbacks)managerCallbacks[fullName]=existingCallbacks.concat(callbacks);else managerCallbacks[fullName]=
callbacks;delete managerCallbacks[oldFullName];for(j=0;j<callbacks.length;j++){depArray=callbacks[j].depArray;for(k=0;k<depArray.length;k++)if(depArray[k]===oldFullName)depArray[k]=fullName}}}delete normalizedWaiting[pluginName]}function queueDependency(dep){var prefix=dep.prefix,fullName=dep.fullName;if(specified[fullName]||fullName in defined)return;if(prefix&&!plugins[prefix]){plugins[prefix]=undefined;(normalizedWaiting[prefix]||(normalizedWaiting[prefix]=[])).push(dep);(managerCallbacks[prefix]||
(managerCallbacks[prefix]=[])).push({onDep:function(name,value){if(name===prefix)updateNormalizedNames(prefix)}});queueDependency(makeModuleMap(prefix))}context.paused.push(dep)}function execManager(manager){var i,ret,waitingCallbacks,err,cb=manager.callback,fullName=manager.fullName,args=[],ary=manager.depArray;if(cb&&isFunction(cb)){if(ary)for(i=0;i<ary.length;i++)args.push(manager.deps[ary[i]]);try{ret=req.execCb(fullName,manager.callback,args,defined[fullName])}catch(e){err=e}if(fullName)if(manager.cjsModule&&
manager.cjsModule.exports!==undefined)ret=defined[fullName]=manager.cjsModule.exports;else if(ret===undefined&&manager.usingExports)ret=defined[fullName];else defined[fullName]=ret}else if(fullName)ret=defined[fullName]=cb;if(waiting[manager.waitId]){delete waiting[manager.waitId];manager.isDone=true;context.waitCount-=1;if(context.waitCount===0)waitAry=[]}if(err){err=makeError("defineerror","Error evaluating "+'module "'+fullName+'" at location "'+(fullName?makeModuleMap(fullName).url:"")+'":\n'+
err+"\nfileName:"+(err.fileName||err.sourceURL)+"\nlineNumber: "+(err.lineNumber||err.line),err);err.moduleName=fullName;return req.onError(err)}if(fullName){waitingCallbacks=managerCallbacks[fullName];if(waitingCallbacks){for(i=0;i<waitingCallbacks.length;i++)waitingCallbacks[i].onDep(fullName,ret);delete managerCallbacks[fullName]}}return undefined}function main(inName,depArray,callback,relModuleMap){var moduleMap=makeModuleMap(inName,relModuleMap),name=moduleMap.name,fullName=moduleMap.fullName,
uniques={},manager={waitId:name||reqWaitIdPrefix+waitIdCounter++,depCount:0,depMax:0,prefix:moduleMap.prefix,name:name,fullName:fullName,deps:{},depArray:depArray,callback:callback,onDep:function(depName,value){if(!(depName in manager.deps)){manager.deps[depName]=value;manager.depCount+=1;if(manager.depCount===manager.depMax)execManager(manager)}}},i,depArg,depName,cjsMod;if(fullName){if(fullName in defined||loaded[fullName]===true)return;specified[fullName]=true;loaded[fullName]=true}for(i=0;i<depArray.length;i++){depArg=
depArray[i];if(depArg){depArg=makeModuleMap(depArg,name?moduleMap:relModuleMap);depName=depArg.fullName;depArray[i]=depName;if(depName==="require")manager.deps[depName]=makeRequire(moduleMap);else if(depName==="exports"){manager.deps[depName]=defined[fullName]={};manager.usingExports=true}else if(depName==="module"){manager.cjsModule=cjsMod=manager.deps[depName]={id:name,uri:name?context.nameToUrl(name,null,relModuleMap):undefined,exports:defined[fullName]};cjsMod.setExports=makeSetExports(cjsMod)}else if(depName in
defined&&!(depName in waiting))manager.deps[depName]=defined[depName];else if(!uniques[depName]){manager.depMax+=1;queueDependency(depArg);(managerCallbacks[depName]||(managerCallbacks[depName]=[])).push(manager);uniques[depName]=true}}}if(manager.depCount===manager.depMax)execManager(manager);else{waiting[manager.waitId]=manager;waitAry.push(manager);context.waitCount+=1}}function callDefMain(args){main.apply(null,args);loaded[args[0]]=true}function forceExec(manager,traced){if(manager.isDone)return undefined;
var fullName=manager.fullName,depArray=manager.depArray,depName,i;if(fullName){if(traced[fullName])return defined[fullName];traced[fullName]=true}for(i=0;i<depArray.length;i++){depName=depArray[i];if(depName)if(!manager.deps[depName]&&waiting[depName])manager.onDep(depName,forceExec(waiting[depName],traced))}return fullName?defined[fullName]:undefined}function checkLoaded(){var waitInterval=config.waitSeconds*1E3,expired=waitInterval&&context.startTime+waitInterval<(new Date).getTime(),noLoads="",
hasLoadedProp=false,stillLoading=false,prop,err,manager;if(context.pausedCount>0)return undefined;if(config.priorityWait)if(isPriorityDone())resume();else return undefined;for(prop in loaded)if(!(prop in empty)){hasLoadedProp=true;if(!loaded[prop])if(expired)noLoads+=prop+" ";else{stillLoading=true;break}}if(!hasLoadedProp&&!context.waitCount)return undefined;if(expired&&noLoads){err=makeError("timeout","Load timeout for modules: "+noLoads);err.requireType="timeout";err.requireModules=noLoads;return req.onError(err)}if(stillLoading||
context.scriptCount){if((isBrowser||isWebWorker)&&!checkLoadedTimeoutId)checkLoadedTimeoutId=setTimeout(function(){checkLoadedTimeoutId=0;checkLoaded()},50);return undefined}if(context.waitCount){for(i=0;manager=waitAry[i];i++)forceExec(manager,{});if(checkLoadedDepth<5){checkLoadedDepth+=1;checkLoaded()}}checkLoadedDepth=0;req.checkReadyState();return undefined}function callPlugin(pluginName,dep){var name=dep.name,fullName=dep.fullName,load;if(fullName in defined||fullName in loaded)return;if(!plugins[pluginName])plugins[pluginName]=
defined[pluginName];if(!loaded[fullName])loaded[fullName]=false;load=function(ret){if(req.onPluginLoad)req.onPluginLoad(context,pluginName,name,ret);execManager({prefix:dep.prefix,name:dep.name,fullName:dep.fullName,callback:function(){return ret}});loaded[fullName]=true};load.fromText=function(moduleName,text){var hasInteractive=useInteractive;context.loaded[moduleName]=false;context.scriptCount+=1;if(hasInteractive)useInteractive=false;req.exec(text);if(hasInteractive)useInteractive=true;context.completeLoad(moduleName)};
plugins[pluginName].load(name,makeRequire(dep.parentMap,true),load,config)}function loadPaused(dep){if(dep.prefix&&dep.name.indexOf("__$p")===0&&defined[dep.prefix])dep=makeModuleMap(dep.originalName,dep.parentMap);var pluginName=dep.prefix,fullName=dep.fullName,urlFetched=context.urlFetched;if(specified[fullName]||loaded[fullName])return;else specified[fullName]=true;if(pluginName)if(defined[pluginName])callPlugin(pluginName,dep);else{if(!pluginsQueue[pluginName]){pluginsQueue[pluginName]=[];(managerCallbacks[pluginName]||
(managerCallbacks[pluginName]=[])).push({onDep:function(name,value){if(name===pluginName){var i,oldModuleMap,ary=pluginsQueue[pluginName];for(i=0;i<ary.length;i++){oldModuleMap=ary[i];callPlugin(pluginName,makeModuleMap(oldModuleMap.originalName,oldModuleMap.parentMap))}delete pluginsQueue[pluginName]}}})}pluginsQueue[pluginName].push(dep)}else if(!urlFetched[dep.url]){req.load(context,fullName,dep.url);urlFetched[dep.url]=true}}resume=function(){var args,i,p;resumeDepth+=1;if(context.scriptCount<=
0)context.scriptCount=0;while(defQueue.length){args=defQueue.shift();if(args[0]===null)return req.onError(makeError("mismatch","Mismatched anonymous define() module: "+args[args.length-1]));else callDefMain(args)}if(!config.priorityWait||isPriorityDone())while(context.paused.length){p=context.paused;context.pausedCount+=p.length;context.paused=[];for(i=0;args=p[i];i++)loadPaused(args);context.startTime=(new Date).getTime();context.pausedCount-=p.length}if(resumeDepth===1)checkLoaded();resumeDepth-=
1;return undefined};context={contextName:contextName,config:config,defQueue:defQueue,waiting:waiting,waitCount:0,specified:specified,loaded:loaded,urlMap:urlMap,scriptCount:0,urlFetched:{},defined:defined,paused:[],pausedCount:0,plugins:plugins,managerCallbacks:managerCallbacks,makeModuleMap:makeModuleMap,normalize:normalize,configure:function(cfg){var paths,prop,packages,pkgs,packagePaths,requireWait;if(cfg.baseUrl)if(cfg.baseUrl.charAt(cfg.baseUrl.length-1)!=="/")cfg.baseUrl+="/";paths=config.paths;
packages=config.packages;pkgs=config.pkgs;mixin(config,cfg,true);if(cfg.paths){for(prop in cfg.paths)if(!(prop in empty))paths[prop]=cfg.paths[prop];config.paths=paths}packagePaths=cfg.packagePaths;if(packagePaths||cfg.packages){if(packagePaths)for(prop in packagePaths)if(!(prop in empty))configurePackageDir(pkgs,packagePaths[prop],prop);if(cfg.packages)configurePackageDir(pkgs,cfg.packages);config.pkgs=pkgs}if(cfg.priority){requireWait=context.requireWait;context.requireWait=false;context.takeGlobalQueue();
resume();context.require(cfg.priority);resume();context.requireWait=requireWait;config.priorityWait=cfg.priority}if(cfg.deps||cfg.callback)context.require(cfg.deps||[],cfg.callback);if(cfg.ready)req.ready(cfg.ready)},requireDefined:function(moduleName,relModuleMap){return makeModuleMap(moduleName,relModuleMap).fullName in defined},requireSpecified:function(moduleName,relModuleMap){return makeModuleMap(moduleName,relModuleMap).fullName in specified},require:function(deps,callback,relModuleMap){var moduleName,
fullName,moduleMap;if(typeof deps==="string"){if(req.get)return req.get(context,deps,callback);moduleName=deps;relModuleMap=callback;moduleMap=makeModuleMap(moduleName,relModuleMap);fullName=moduleMap.fullName;if(!(fullName in defined))return req.onError(makeError("notloaded","Module name '"+moduleMap.fullName+"' has not been loaded yet for context: "+contextName));return defined[fullName]}main(null,deps,callback,relModuleMap);if(!context.requireWait)while(!context.scriptCount&&context.paused.length){context.takeGlobalQueue();
resume()}return undefined},takeGlobalQueue:function(){if(globalDefQueue.length){apsp.apply(context.defQueue,[context.defQueue.length-1,0].concat(globalDefQueue));globalDefQueue=[]}},completeLoad:function(moduleName){var args;context.takeGlobalQueue();while(defQueue.length){args=defQueue.shift();if(args[0]===null){args[0]=moduleName;break}else if(args[0]===moduleName)break;else{callDefMain(args);args=null}}if(args)callDefMain(args);else callDefMain([moduleName,[],null]);loaded[moduleName]=true;if(req.isAsync)context.scriptCount-=
1;resume();if(!req.isAsync)context.scriptCount-=1},toUrl:function(moduleNamePlusExt,relModuleMap){var index=moduleNamePlusExt.lastIndexOf("."),ext=null;if(index!==-1){ext=moduleNamePlusExt.substring(index,moduleNamePlusExt.length);moduleNamePlusExt=moduleNamePlusExt.substring(0,index)}return context.nameToUrl(moduleNamePlusExt,ext,relModuleMap)},nameToUrl:function(moduleName,ext,relModuleMap){var paths,pkgs,pkg,pkgPath,syms,i,parentModule,url,config=context.config;moduleName=normalize(moduleName,
relModuleMap&&relModuleMap.fullName);if(req.jsExtRegExp.test(moduleName))url=moduleName+(ext?ext:"");else{paths=config.paths;pkgs=config.pkgs;syms=moduleName.split("/");for(i=syms.length;i>0;i--){parentModule=syms.slice(0,i).join("/");if(paths[parentModule]){syms.splice(0,i,paths[parentModule]);break}else if(pkg=pkgs[parentModule]){if(moduleName===pkg.name)pkgPath=pkg.location+"/"+pkg.main;else pkgPath=pkg.location;syms.splice(0,i,pkgPath);break}}url=syms.join("/")+(ext||".js");url=(url.charAt(0)===
"/"||url.match(/^\w+:/)?"":config.baseUrl)+url}return config.urlArgs?url+((url.indexOf("?")===-1?"?":"&")+config.urlArgs):url}};context.resume=resume;return context}req=requirejs=function(deps,callback){var contextName=defContextName,context,config;if(!isArray(deps)&&typeof deps!=="string"){config=deps;if(isArray(callback)){deps=callback;callback=arguments[2]}else deps=[]}if(config&&config.context)contextName=config.context;context=contexts[contextName]||(contexts[contextName]=newContext(contextName));
if(config)context.configure(config);return context.require(deps,callback)};if(typeof require==="undefined")require=req;req.toUrl=function(moduleNamePlusExt){return contexts[defContextName].toUrl(moduleNamePlusExt)};req.version=version;req.isArray=isArray;req.isFunction=isFunction;req.mixin=mixin;req.jsExtRegExp=/^\/|:|\?|\.js$/;s=req.s={contexts:contexts,skipAsync:{},isPageLoaded:!isBrowser,readyCalls:[]};req.isAsync=req.isBrowser=isBrowser;if(isBrowser)head=s.head=document.getElementsByTagName("head")[0];
req.onError=function(err){throw err;};req.load=function(context,moduleName,url){var loaded=context.loaded;isDone=false;if(!loaded[moduleName])loaded[moduleName]=false;context.scriptCount+=1;req.attach(url,context,moduleName)};function getInteractiveScript(){var scripts,i,script;if(interactiveScript&&interactiveScript.readyState==="interactive")return interactiveScript;scripts=document.getElementsByTagName("script");for(i=scripts.length-1;i>-1&&(script=scripts[i]);i--)if(script.readyState==="interactive")return interactiveScript=
script;return null}define=req.def=function(name,deps,callback){var node,context;if(typeof name!=="string"){callback=deps;deps=name;name=null}if(!req.isArray(deps)){callback=deps;deps=[]}if(!name&&!deps.length&&req.isFunction(callback))if(callback.length){callback.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(match,dep){deps.push(dep)});deps=(callback.length===1?["require"]:["require","exports","module"]).concat(deps)}if(useInteractive){node=currentlyAddingScript||getInteractiveScript();
if(!node)return req.onError(makeError("interactive","No matching script interactive for "+callback));if(!name)name=node.getAttribute("data-requiremodule");context=contexts[node.getAttribute("data-requirecontext")]}(context?context.defQueue:globalDefQueue).push([name,deps,callback]);return undefined};define.amd={multiversion:true,plugins:true};req.exec=function(text){return eval(text)};req.execCb=function(name,callback,args,exports){return callback.apply(exports,args)};req.onScriptLoad=function(evt){var node=
evt.currentTarget||evt.srcElement,contextName,moduleName,context;if(evt.type==="load"||readyRegExp.test(node.readyState)){interactiveScript=null;contextName=node.getAttribute("data-requirecontext");moduleName=node.getAttribute("data-requiremodule");context=contexts[contextName];contexts[contextName].completeLoad(moduleName);node.removeEventListener("load",req.onScriptLoad,false)}};req.attach=function(url,context,moduleName,callback,type){var node,loaded;if(isBrowser){callback=callback||req.onScriptLoad;
node=context&&context.config&&context.config.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");node.type=type||"text/javascript";node.charset="utf-8";node.async=!s.skipAsync[url];if(context)node.setAttribute("data-requirecontext",context.contextName);node.setAttribute("data-requiremodule",moduleName);node.addEventListener("load",callback,false);node.src=url;currentlyAddingScript=node;head.appendChild(node);currentlyAddingScript=null;return node}else if(isWebWorker){loaded=
context.loaded;loaded[moduleName]=false;importScripts(url);context.completeLoad(moduleName)}return null};if(isBrowser){scripts=document.getElementsByTagName("script");for(i=scripts.length-1;i>-1&&(script=scripts[i]);i--){if(!head)head=script.parentNode;if(dataMain=script.getAttribute("data-main")){if(!cfg.baseUrl){src=dataMain.split("/");mainScript=src.pop();subPath=src.length?src.join("/")+"/":"./";cfg.baseUrl=subPath;dataMain=mainScript.replace(jsSuffixRegExp,"")}cfg.deps=cfg.deps?cfg.deps.concat(dataMain):
[dataMain];break}}}s.baseUrl=cfg.baseUrl;req.pageLoaded=function(){if(!s.isPageLoaded){s.isPageLoaded=true;if(scrollIntervalId)clearInterval(scrollIntervalId);req.callReady()}};req.checkReadyState=function(){var contexts=s.contexts,prop;for(prop in contexts)if(!(prop in empty))if(contexts[prop].waitCount)return;s.isDone=true;req.callReady()};req.callReady=function(){var callbacks=s.readyCalls,i,callback,contexts,context,prop;if(s.isPageLoaded&&s.isDone)if(callbacks.length){s.readyCalls=[];for(i=0;callback=
callbacks[i];i++)callback()}};req.ready=function(callback){if(s.isPageLoaded&&s.isDone)callback();else s.readyCalls.push(callback);return req};if(isBrowser){if(document.addEventListener){document.addEventListener("DOMContentLoaded",req.pageLoaded,false);window.addEventListener("load",req.pageLoaded,false)}else if(window.attachEvent){window.attachEvent("onload",req.pageLoaded);if(self===self.top)scrollIntervalId=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");
req.pageLoaded()}}catch(e){}},30)}if(document.readyState==="complete")req.pageLoaded()}req(cfg);if(req.isAsync&&typeof setTimeout!=="undefined"){ctx=s.contexts[cfg.context||defContextName];ctx.requireWait=true;setTimeout(function(){ctx.requireWait=false;ctx.takeGlobalQueue();if(!ctx.scriptCount)ctx.resume();req.checkReadyState()},0)}})();var qa=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,m,h){if(a==Array.prototype||a==Object.prototype)return a;a[m]=h.value;return a};function ra(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var m=0;m<a.length;++m){var h=a[m];if(h&&h.Math==Math)return h}throw Error("Cannot find global object");}var sa=ra(this);
function ta(a,m){if(m)a:{var h=sa;a=a.split(".");for(var n=0;n<a.length-1;n++){var g=a[n];if(!(g in h))break a;h=h[g]}a=a[a.length-1];n=h[a];m=m(n);m!=n&&m!=null&&qa(h,a,{configurable:!0,writable:!0,value:m})}}ta("Set.prototype.union",function(a){return a?a:function(m){ua(this);Pb(m);var h=new Set(this);m=Qb(m.keys());for(var n=m.next();!n.done;)h.add(n.value),n=m.next();return h}});
ta("Set.prototype.difference",function(a){return a?a:function(m){ua(this);Pb(m);var h=Rb(this,m);m=new Set(this);var n=h.Tra;h=h.rpa;for(var g=n.next();!g.done;)h.has(g.value)&&m.delete(g.value),g=n.next();return m}});ta("Set.prototype.intersection",function(a){return a?a:function(m){ua(this);Pb(m);var h=new Set,n=Rb(this,m);m=n.Tra;n=n.rpa;for(var g=m.next();!g.done;)n.has(g.value)&&h.add(g.value),g=m.next();return h}});
function Pb(a){if(typeof a!=="object"||a===null||typeof a.size!=="number"||a.size<0||typeof a.keys!=="function"||typeof a.has!=="function")throw new TypeError("Argument must be set-like");}function Qb(a){if(typeof a!=="object"||a===null||typeof a.next!=="function")throw new TypeError("Invalid iterator.");return a}function Rb(a,m){return a.size<=m.size?{Tra:a.keys(),rpa:m}:{Tra:Qb(m.keys()),rpa:a}}
function ua(a){if(!(a instanceof Set))throw new TypeError("Method must be called on an instance of Set.");}
ta("String.prototype.matchAll",function(a){return a?a:function(m){if(m instanceof RegExp&&!m.global)throw new TypeError("RegExp passed into String.prototype.matchAll() must have global tag.");var h=new RegExp(m,m instanceof RegExp?void 0:"g"),n=this,g=!1,k={next:function(){if(g)return{value:void 0,done:!0};var e=h.exec(n);if(!e)return g=!0,{value:void 0,done:!0};e[0]===""&&(h.lastIndex+=1);return{value:e,done:!1}}};k[Symbol.iterator]=function(){return k};return k}});
ta("Object.fromEntries",function(a){return a?a:function(m){var h={};if(!(Symbol.iterator in m))throw new TypeError(""+m+" is not iterable");m=m[Symbol.iterator].call(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;if(Object(n)!==n)throw new TypeError("iterable for fromEntries should yield objects");h[n[0]]=n[1]}return h}});
(function(){function a(d){this.vr=d;this.xv=null;this.bd={}}function m(){this.yj={};this.yj[m.SCRIPT_URL]=[];this.yj[m.THREE_JS_WEBGL_URL]="lib/ThreeWebGL.js";this.yj[m.WEBVR_POLYFILL_URL]="lib/WebVRPolyfill.js";this.yj[m.WEBXR_POLYFILL_URL]="lib/webxr-polyfill.js";this.yj[m.HLS_URL]="lib/Hls.js";this.yj[m.GS_URL]="lib/tdvgs.js";this.yj[m.Haa]="lib/basis/";this.yj[m.Yaa]="lib/draco/";this.yj[m.CURSORS_DIR_URL]="lib/cursors";this.yj[m.SERVICE_WORKER_URL]="tdvplayersw.js";this.yj[m.YB]="lib/webxr-input-profiles/";
this.yj[m.BACKGROUND_PRELOAD_ENABLED]=void 0;this.yj[m.g_]=void 0}function h(){this.zU=[];this.U4=[];this.K6a=[];this.M_=null}function n(d){return Object.prototype.toString.call(d)=="[object Array]"}function g(d){return!!(window.location.hash&&window.location.hash.indexOf("device="+d)>=0)}function k(d){return b.search(d.toLowerCase())>=0}var e=window.TDV=window.TDV||{},b=navigator.userAgent.toLowerCase();h.prototype.getVersion=h.prototype.$La=function(){return{MAJOR:"0",MINOR:"2356"}};
h.prototype.getClassByName=function(){};h.prototype.GDa=function(){if(this.M_)for(;this.zU.length>0;){var d=this.zU[0];this.zU=this.zU.slice(1);this.U4.push(d);this.i0a(d)}};h.prototype.RAa=function(d){var f=document.createElement("a");f.href=d;return f.href};h.prototype.G2a=function(){var d=document.currentScript;d||(d=document.getElementsByTagName("head")[0].getElementsByTagName("script"),d=d[d.length-1]);return this.RAa(d.src)};h.prototype.i0a=function(d){var f=this,l=d.vr.get(m.SELECTED_SCRIPT_URL);
setTimeout(function(){var p=document.createElement("script");p.type="text/javascript";p.src=l;document.getElementsByTagName("head")[0].appendChild(p);f.M_.fnb(d)},1)};h.prototype.defineScript=function(d){for(var f=[],l=this.G2a(),p=0;p<this.U4.length;p++){var q=this.U4[p],r=this.RAa(q.vr.get(m.SELECTED_SCRIPT_URL));r==l?(q.vr.set(m.SCRIPT_DATA,d),q.rlb(new this.M_(q,q.vr)),this.K6a.push(q)):f.push(r)}this.U4=f};h.prototype.create=h.prototype.create=function(d){var f=d.get(m.SCRIPT_URL);f=n(f)?this.E7a(f):
typeof f==="string"?f:"script.js";d.set(m.SELECTED_SCRIPT_URL,f);d=new e.tua(d);this.zU.push(d);this.GDa();return d};h.prototype.setPlayerClass=h.prototype.qlb=function(d){this.M_=d;this.GDa();this.o({name:"classesReady",source:this})};h.prototype.bind=h.prototype.bind=function(d,f,l,p){this.bd=this.bd||{};this.bd[d]=this.bd[d]||[];this.bd[d].push({handler:f,context:l,immediate:p||!1})};h.prototype.unbind=h.prototype.h=function(d,f,l,p){this.bd&&d in this.bd&&(this.bd[d]=this.bd[d].filter(function(q){return q.handler!=
f||q.context!=l||q.immediate!=p}))};h.prototype.o=function(d){this.bd&&d.name in this.bd&&(this.jC(d,!0),setTimeout(function(){this.jC(d,!1)}.bind(this),0))};h.prototype.jC=function(d,f){d.unbindCurrentHandler=function(){}.bind(this);for(var l=this.bd[d.name],p=0;p<l.length;p++)if(l[p].immediate==f)try{l[p].handler.call(l[p].context||window,d)}catch(q){setTimeout(function(){throw q;},0)}};h.prototype.getOrientation=h.prototype.Gt=function(){var d=screen.orientation&&screen.orientation.type||window.orientation;
return d=="portrait-primary"||d=="portrait-secondary"||d===0||d==180?e.qb.Xba:d=="landscape-primary"||d=="landscape-secondary"||d==90||d==-90?e.qb.Wba:window.innerWidth<window.innerHeight?e.qb.Xba:e.qb.Wba};h.prototype.E7a=function(d){if(d.length>0){for(var f=0;f<d.length;f++){var l=d[f];if(n(l)){if(this.YFa(l[0]))return l[1]}else if(typeof l==="string")return l}return d[0][1]}return"script.js"};h.prototype.YFa=function(d){if(typeof d==="string"){var f=d.match(/^\s*default\s*$/);if(f)return!0;if(f=
d.match(/^\s*os\s*=\s*(\w+)\s*$/))return this.Nd==f[1].toLowerCase();if(f=d.match(/^\s*browser\s*=\s*(\w+)\s*$/))return this.Tb==f[1].toLowerCase();if(f=d.match(/^\s*device\s*=\s*(\w+)\s*$/))return this.xk==f[1].toLowerCase();if(f=d.match(/^\s*screen_size\s*(<|>|=|<=|>=)\s*(\d+)\s*x\s*(\d+)\s*$/)){d=parseInt(f[2]);var l=parseInt(f[3]);switch(f[1]){case "<":var p=function(q,r){return q<r};break;case ">":p=function(q,r){return q>r};break;case "=":p=function(q,r){return q==r};break;case "<=":p=function(q,
r){return q<=r};break;case ">=":p=function(q,r){return q>=r}}return p(screen.width,d)&&p(screen.height,l)||this.mobile&&p(screen.width,l)&&p(screen.height,d)}return!1}if(n(d)){for(f=0;f<d.length;f++)if(!this.YFa(d[f]))return!1;return!0}return!1};h.prototype.ORIENTATION_LANDSCAPE=h.prototype.Wba="landscape";h.prototype.ORIENTATION_PORTRAIT=h.prototype.Xba="portrait";h.prototype.OS_IOS=h.prototype.v_="ios";h.prototype.OS_ANDROID=h.prototype.Yba="android";h.prototype.OS_WINDOWS=h.prototype.kua="windows";
h.prototype.OS_WINDOWS_PHONE=h.prototype.bca="windows_phone";h.prototype.OS_MACOSX=h.prototype.Zba="osx";h.prototype.OS_LINUX=h.prototype.jua="linux";h.prototype.OS_QNX=h.prototype.aca="qnx";h.prototype.OS_OTHER=h.prototype.$ba="other";h.prototype.BROWSER_TYPE_WEBKIT=h.prototype.IQ="webkit";h.prototype.BROWSER_TYPE_OPERA=h.prototype.Naa="opera";h.prototype.BROWSER_TYPE_MSIE=h.prototype.Maa="msie";h.prototype.BROWSER_TYPE_MOZILLA=h.prototype.Laa="mozilla";h.prototype.BROWSER_TYPE_OTHER=h.prototype.Oaa=
"other";h.prototype.BROWSER_SAFARI_IOS=h.prototype.Ji="safari_ios";h.prototype.BROWSER_OPERA=h.prototype.WZ="opera";h.prototype.BROWSER_SAFARI=h.prototype.Yj="safari";h.prototype.BROWSER_CHROME=h.prototype.Pp="chrome";h.prototype.BROWSER_EDGE=h.prototype.QK="edge";h.prototype.BROWSER_MSIE=h.prototype.tF="msie";h.prototype.BROWSER_ANDROID=h.prototype.VZ="android";h.prototype.BROWSER_MOZILLA=h.prototype.ox="mozilla";h.prototype.BROWSER_OTHER=h.prototype.Iaa="other";h.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET=
h.prototype.$Z="samsunginternet";h.prototype.BROWSER_SUBTYPE_OCULUS_BROWSER=h.prototype.qx="oculusbrowser";h.prototype.BROWSER_SUBTYPE_PICO_BROWSER=h.prototype.su="picobrowser";h.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET_FOR_GEAR_VR=h.prototype.a_="samsunginternetgearvr";h.prototype.BROWSER_SUBTYPE_MI_BROWSER=h.prototype.Jaa="mibrowser";h.prototype.BROWSER_SUBTYPE_CHROME_IOS=h.prototype.FQ="chromeios";h.prototype.BROWSER_SUBTYPE_SAFARI_IOS=h.prototype.GQ="safari_ios";h.prototype.BROWSER_SUBTYPE_CHROME_WEBVIEW=
h.prototype.RK="chrome_webview";h.prototype.BROWSER_SUBTYPE_SAFARI_WEBVIEW=h.prototype.HQ="safari_webview";h.prototype.BROWSER_SUBTYPE_TOUR_LAUNCHER=h.prototype.zB="tour_launcher";h.prototype.BROWSER_SUBTYPE_CHROMIUM_EDGE=h.prototype.RK="chromium_edge";h.prototype.BROWSER_SUBTYPE_FIREFOX_REALITY=h.prototype.yB="firefox_reality";h.prototype.BROWSER_SUBTYPE_VR_APP=h.prototype.tu="vrapp";h.prototype.BROWSER_SUBTYPE_XR_APP=h.prototype.uu="xrapp";h.prototype.BROWSER_SUBTYPE_FACEBOOK_IOS_WEBVIEW=h.prototype.ZZ=
"facebook_ios_webview";h.prototype.BROWSER_SUBTYPE_OTHER=h.prototype.Kaa="other";h.prototype.BROWSER_VERSION_UNKNOWN=h.prototype.Paa=-1;h.prototype.DEVICE_IPHONE=h.prototype.c_="iphone";h.prototype.DEVICE_IPAD=h.prototype.LQ="ipad";h.prototype.DEVICE_IPOD=h.prototype.Taa="ipod";h.prototype.DEVICE_OCULUS_QUEST_2=h.prototype.VK="oculusquest2";h.prototype.DEVICE_OCULUS_QUEST_3=h.prototype.MQ="oculusquest3";h.prototype.DEVICE_PICO_G2=h.prototype.d_="picog2";h.prototype.DEVICE_PICO_G3=h.prototype.PQ="picog3";
h.prototype.DEVICE_PICO_NEO2=h.prototype.e_="piconeo2";h.prototype.DEVICE_PICO_NEO3=h.prototype.WK="piconeo3";h.prototype.DEVICE_PICO_4=h.prototype.NQ="pico4";h.prototype.DEVICE_PICO_4_ULTRA=h.prototype.OQ="pico4ultra";h.prototype.DEVICE_VIVE_FOCUS=h.prototype.f_="vivefocus";h.prototype.DEVICE_OTHER=h.prototype.Uaa="other";h.prototype.os=h.prototype.Nd=k("iphone")||k("ipad")||k("ipod")?h.prototype.v_:k("qnx")?h.prototype.aca:k("android")||k("oculusbrowser")&&k("linux")?h.prototype.Yba:k("windows phone")?
h.prototype.bca:k("windows")?h.prototype.kua:k("mac_powerpc")?h.prototype.Zba:k("macintosh")?navigator.maxTouchPoints>1?h.prototype.v_:h.prototype.Zba:k("linux")||k("x11")?h.prototype.jua:h.prototype.$ba;h.prototype.browser=h.prototype.Tb=k("ipad")||k("iphone")||k("ipod")||k("macintosh")&&navigator.maxTouchPoints>1?h.prototype.Ji:k("opera")?h.prototype.WZ:k("edge")?h.prototype.QK:k("chrome")||k("crmo")?h.prototype.Pp:k("safari")?h.prototype.Yj:k("trident")||k("msie")?h.prototype.tF:!k("compatible")&&
k("mozilla")?h.prototype.ox:k("android")?h.prototype.VZ:h.prototype.Iaa;h.prototype.browserType=h.prototype.DO=h.prototype.Tb==h.prototype.Ji||h.prototype.Tb==h.prototype.Pp||h.prototype.Tb==h.prototype.VZ||h.prototype.Tb==h.prototype.Yj||k("webkit")?h.prototype.IQ:h.prototype.Tb==h.prototype.WZ||k("opera")?h.prototype.Naa:k("trident")||k("msie")?h.prototype.Maa:!k("compatible")&&k("mozilla")?h.prototype.Laa:h.prototype.Oaa;h.prototype.browserSubtype=h.prototype.Dc=window.location.hash&&window.location.hash.indexOf("xrapp")>=
0?h.prototype.uu:window.location.hash&&window.location.hash.indexOf("vrapp")>=0?h.prototype.tu:k("picobrowser")?h.prototype.su:k("oculusbrowser")?h.prototype.qx:k("xiaomi")||k("miui")?h.prototype.Jaa:k("samsungbrowser")&&k("android")?k("mobile vr")?h.prototype.a_:h.prototype.$Z:k("ipad")||k("iphone")||k("ipod")?k("crios")?h.prototype.FQ:k("fban")||k("fbav")?h.prototype.ZZ:k("safari")&&k("version")&&!navigator.standalone?h.prototype.GQ:h.prototype.HQ:k("electron")?h.prototype.zB:k("chrome")&&k("wv")?
h.prototype.RK:k("edg/")?h.prototype.cta:!k("compatible")&&k("mozilla")&&k("mobile vr")?h.prototype.yB:h.prototype.Kaa;h.prototype.browserVersion=h.prototype.RIa=function(){if(h.prototype.Tb==h.prototype.tF){var d=b.match(RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"));if(d!=null)return parseFloat(d[1]);d=b.match(RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"));if(d!=null)return parseFloat(d[1])}return h.prototype.Paa}();h.prototype.device=h.prototype.xk=k("ipad")||k("macintosh")&&navigator.maxTouchPoints>1?h.prototype.LQ:
k("iphone")?h.prototype.c_:k("ipod")?h.prototype.Taa:g("picog2")?h.prototype.d_:g("piconeo2")?h.prototype.e_:g("piconeo3")?h.prototype.WK:g("vivefocus")?h.prototype.f_:g("oculusquest3")?h.prototype.MQ:g("oculusquest2")?h.prototype.VK:g("oculusquest")?h.prototype.VK:h.prototype.Dc==h.prototype.su&&k("pico 4 ultra")?h.prototype.OQ:h.prototype.Dc==h.prototype.uu&&k("picoa9210")?h.prototype.OQ:h.prototype.Dc==h.prototype.su&&k("pico 4")?h.prototype.NQ:h.prototype.Dc==h.prototype.uu&&k("picoa8110")?h.prototype.NQ:
h.prototype.Dc==h.prototype.su&&k("pico g3")?h.prototype.PQ:h.prototype.Dc==h.prototype.uu&&k("picoa7q10")?h.prototype.PQ:h.prototype.Dc==h.prototype.uu&&k("pico neo 3")?h.prototype.WK:h.prototype.Dc==h.prototype.su&&k("pico neo 3")?h.prototype.WK:h.prototype.Dc==h.prototype.qx&&(k("quest 3")||k("quest pro"))?h.prototype.MQ:h.prototype.Dc==h.prototype.qx&&k("quest 2")?h.prototype.VK:h.prototype.Uaa;a:{switch(h.prototype.Nd){case h.prototype.Yba:case h.prototype.v_:case h.prototype.bca:case h.prototype.aca:var c=
!0;break a}c=!1}h.prototype.mobile=h.prototype.mobile=c;e.PlayerAPI=e.qb=new h;m.prototype.append=m.prototype.append=function(d,f,l){d==m.SCRIPT_URL&&(typeof l=="undefined"&&(l=f,f="default"),f=[f,l]);n(this.yj[d])||(this.yj[d]=[]);this.yj[d].push(f)};m.prototype.set=m.prototype.set=function(d,f){this.yj[d]=f};m.prototype.get=m.prototype.get=function(d){return this.yj[d]};m.SCRIPT_URL=m.SCRIPT_URL="ScriptURL";m.SCRIPT_DATA=m.SCRIPT_DATA="ScriptData";m.FLASH_EXPRESS_INSTALLER_URL=m.FLASH_EXPRESS_INSTALLER_URL=
"FlashExpressInstallerURL";m.FLASH_AUDIO_PLAYER_URL=m.FLASH_AUDIO_PLAYER_URL="FlashAudioPlayerURL";m.FLASH_VIDEO_PLAYER_URL=m.FLASH_VIDEO_PLAYER_URL="FlashVideoPlayerURL";m.FLASH_PANORAMA_PLAYER_URL=m.FLASH_PANORAMA_PLAYER_URL="FlashPanoramaPlayerURL";m.GS_URL=m.GS_URL="GSURL";m.THREE_JS_WEBGL_URL=m.THREE_JS_WEBGL_URL="ThreeJSWebGLURL";m.WEBVR_POLYFILL_URL=m.WEBVR_POLYFILL_URL="WebVRPolyfillURL";m.WEBXR_POLYFILL_URL=m.WEBXR_POLYFILL_URL="WebXRPolyfillURL";m.WEBXR_INPUT_PROFILES_DIR_URL=m.YB="WebXRInputProfilesDirURL";
m.CAPTURA_VIEWER_URL=m.CAPTURA_VIEWER_URL="CapturaViewerURL";m.DASH_URL=m.DASH_URL="DashURL";m.HLS_URL=m.HLS_URL="HlsURL";m.BASIS_URL=m.Haa="BasisURL";m.DRACO_URL=m.Yaa="DRACOURL";m.CONTAINER=m.CONTAINER="Container";m.SELECTED_SCRIPT_URL=m.SELECTED_SCRIPT_URL="SelectedScriptURL";m.BASE_DIR_URL=m.BASE_DIR_URL="BaseDirURL";m.QUERY_STRING_PARAMETERS=m.QUERY_STRING_PARAMETERS="QueryStringParameters";m.CURSORS_DIR_URL=m.CURSORS_DIR_URL="CursorsDirURL";m.BACKGROUND_PRELOAD_ENABLED=m.BACKGROUND_PRELOAD_ENABLED=
"BackgroundPreloadEnabled";m.ACTIVE_VIDEO_ELEMENT=m.ACTIVE_VIDEO_ELEMENT="ActiveVideoElement";m.SERVICE_WORKER_URL=m.SERVICE_WORKER_URL="ServiceWorkerURL";m.PINCH_TO_ZOOM_ENABLED=m.RVa="PinchToZoomEnabled";m.DOWNLOAD_DISABLED=m.g_="DownloadDisabled";e.PlayerSettings=e.PlayerSettings=m;e.PlayerEvent=e.z_=function(d,f,l,p){this.name=d;this.data=this.originalEvent=f;this.sourceClassName=l[l.length-1];this.sourceClassPath=l;this.sourceId=p};a.prototype.rlb=function(d){this.xv=d};a.prototype["delete"]=
function(){this.xv&&(this.xv.clear(),this.xv=null)};a.prototype.getById=a.prototype.ZD=function(d){return this.xv?this.xv.Zfb(d):null};a.prototype.getByClassName=a.prototype.Ci=function(d){return this.xv?this.xv.Ci(d):[]};a.prototype.createInstance=a.prototype.Ai=function(d){return this.xv.Ai(d)};a.prototype.disposeInstance=a.prototype.jw=function(d){return this.xv.jw(d)};a.prototype.bind=a.prototype.bind=function(d,f,l,p){var q=d.split(":");d=q[0];q=q.length>1?q[1]:"*";this.bd[d]=this.bd[d]||{};
this.bd[d][q]=this.bd[d][q]||[];this.bd[d][q].push({handler:f,context:l,immediate:p});return this};a.prototype.unbind=a.prototype.h=function(d,f,l,p){var q=d.split(":");d=q[0];q=q.length>1?q[1]:"*";if(d in this.bd&&q in this.bd[d]){for(var r=[],t=this.bd[d][q],u=0;u<t.length;u++){var v=t[u];v.handler==f&&v.context==l&&v.immediate==p||r.push(v)}this.bd[d][q]=r}};a.prototype.bindOnObject=function(d,f,l,p,q){return this.bind(f+":"+this.Sfa(d),l,p,q)};a.prototype.unbindOnObject=function(d,f,l,p,q){return this.h(f+
":"+this.Sfa(d),l,p,q)};a.prototype.bindOnObjectsOf=function(d,f,l,p,q){return this.bind(f+":"+this.Hfa(d),l,p,q)};a.prototype.unbindOnObjectsOf=function(d,f,l,p,q){return this.h(f+":"+this.Hfa(d),l,p,q)};a.prototype.cookiesEnabled=a.prototype.udb=!1;a.DEFAULT_PANORAMA_HFOV=a.xUa=h.prototype.mobile?90:110;a.prototype.o=function(d){if(d.name in this.bd){this.jC(d,!0);var f=this;setTimeout(function(){f.jC(d,!1)},0)}};a.prototype.jC=function(d,f){f=this.S1a(d,f);for(var l=0;l<f.length;l++)try{f[l].handler.call(f[l].context||
window,d)}catch(p){console.log("Exception handling event "+(d&&d.name),p.message,p.stack)}};a.prototype.S1a=function(d,f){var l=[];if(d.name in this.bd){for(var p=[],q=0;q<d.sourceClassPath.length;q++)p.push(this.Hfa(d.sourceClassPath[q]));d.sourceId&&p.push(this.Sfa(d.sourceId));p.push("*");d=this.bd[d.name];for(q=0;q<p.length;q++)for(var r=d[p[q]]||[],t=0;t<r.length;t++)!!r[t].immediate==!!f&&l.push(r[t])}return l};a.prototype.Sfa=function(d){return"instance("+d+")"};a.prototype.Hfa=function(d){return"className("+
d+")"};e.Player=e.tua=a})();
var P=this&&this.rpb||function(){function a(m,h){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,g){n.__proto__=g}||function(n,g){for(var k in g)Object.prototype.hasOwnProperty.call(g,k)&&(n[k]=g[k])};return a(m,h)}return function(m,h){function n(){this.constructor=m}if(typeof h!=="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");a(m,h);m.prototype=h===null?Object.create(h):(n.prototype=h.prototype,new n)}}();
define("tdv/utils",["require","exports"],function(){function a(p,q){function r(){}r.prototype=q.prototype;p.prototype=new r;p.prototype.constructor=p}function m(p,q){q.forEach(function(r){Object.getOwnPropertyNames(r).forEach(function(t){p.prototype[t]=r[t]})})}function h(p){setTimeout(function(){try{p()}catch(q){g("Deferred callback failed",q)}},1)}function n(p){if(p!=c){c=p;try{if(b){var q=document.createElement("div");q.innerText=p;b.insertBefore(q,b.childNodes[0]||null)}else console.log(p)}catch(r){}}}
function g(p,q){var r=[];r.push("Exception: "+p);q.message?(r.push(q.message),r.push(q.stack)):r.push(q);n(r.join("\n"))}function k(p){var q="[object "+p+"]";return function(r){return Object.prototype.toString.call(r)===q}}function e(p){var q=[];p.forEach(function(r){q.includes(r)||q.push(r)});return q}var b,c,d=k("String"),f=k("Function"),l=k("Number");return{D6:m,eeb:function(p){for(;;){var q=p.pop();if(!q)break;if(q==p.length)break;p.splice(q,1)}q=[];for(var r=0;r<256;r+=1)q[r]=String.fromCharCode(r);
var t=256,u=String.fromCharCode(p[0]),v=u;for(r=1;r<p.length;r+=1){var w=p[r];w=q[w]?q[w]:u+u.charAt(0);v+=w;q[t++]=u+w.charAt(0);u=w}return JSON.parse(v)},defer:h,Ypb:function(p,q){return function(){var r=arguments;h(function(){p.apply(q||window,r)})}},extend:function(p){for(var q=[],r=1;r<arguments.length;r++)q[r-1]=arguments[r];r=q[q.length-1];q=q.slice(0,-1);a(r,p);m(r,q);return r},Beb:function(p){b=document.createElement("div");b.style.overflow="auto";b.style.position="absolute";b.style.bottom=
"0";b.style.left="0";b.style.right="0";b.style.padding="20px";b.style.fontFamily="Verdana";b.style.backgroundColor="#FFFFFF";b.style.color="#000000";b.style.zIndex="100";p?b.style.top="0":(b.style.width="40%",b.style.right="0",b.style.left="auto",b.style.height="50%",b.style.filter="alpha(opacity=60)",b.style.opacity="0.6");document.body.appendChild(b);console.log=function(q){n(q)}},log:n,VX:g,nr:function(p,q){var r=!1;return function(){r||(r=!0,h(function(){r=!1;p.apply(q||window)}))}},wjb:function(p){for(var q=
[],r=0;r<p;r++)q.push(Math.floor(Math.random()*16).toString(16));return q.join("")},toArray:function(p){return p===void 0||p===null?[]:Array.isArray(p)?p:[p]},Tgb:function(p,q){if(p.length!=q.length)return!1;for(var r=0;r<p.length;r++)if(p[r]!=q[r])return!1;return!0},XMa:f,FA:d,$Ma:l,lpa:function(p){return(p===null||p===void 0?void 0:p.constructor)===Object},x8:function(p,q){if(p.length!==q.length)return!1;for(var r=0;r<p.length;r++)if(p[r]!==q[r])return!1;return!0},difference:function(p,q){return p.filter(function(r){return!q.includes(r)})},
intersection:function(p,q){return p.filter(function(r){return q.includes(r)})},union:function(p,q){return p.concat(q.filter(function(r){return!p.includes(r)}))},unique:e,xqb:e,nsa:function(p,q,r){function t(){var A=Date.now();z||r.Vhb!==!1||(z=A);var D=q-(A-z);w=this;x=arguments;D<=0||D>q?(v&&(clearTimeout(v),v=null),z=A,y=p.apply(w,x),v||(w=x=null)):v||r.wqb===!1||(v=setTimeout(u,D));return y}function u(){z=r.Vhb===!1?0:Date.now();v=null;y=p.apply(w,x);v||(w=x=null)}var v,w,x,y,z=0;r||(r={});t.cancel=
function(){v&&clearTimeout(v);z=0;v=w=x=null};return t},zoa:function(p,q,r){var t=new XMLHttpRequest;t.responseType="json";t.open("GET",p,!0);t.onload=function(){q(t.response)};t.onerror=function(){r(t.statusText)};t.send(null)},Deb:function(p,q,r){var t=new XMLHttpRequest;t.open("GET",p,!1);t.onreadystatechange=function(){if(t.readyState===4)if(t.status===200){var u=t.responseText,v=document.createElement("script");v.textContent=u;document.head.appendChild(v);document.head.removeChild(v);q(u)}else r(t.statusText)};
t.onerror=function(){r("Network Error")};t.send()},pgb:function(p){var q=document.createElement("script");q.textContent=p;document.head.appendChild(q);document.head.removeChild(q)},offset:function(p){p=p.getBoundingClientRect();return{left:p.left+window.scrollX,top:p.top+window.scrollY}},yeb:function(p){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(p,1):document.addEventListener("DOMContentLoaded",p)}}});
define("tdv/constants/EventName",["require","exports"],function(){return{L:function(a){return a+"_change"},Ee:"default",Sa:"mouseDown",gb:"mouseMove",$a:"mouseUp",Qk:"mouseWheel",ma:"click",fi:"doubleClick",uc:"rollOver",Eb:"rollOut",UF:"mouseEnter",Qr:"mouseLeave",Lm:"pointerOver",Vob:"pointerOut",Du:"pointerDown",TB:"pointerUp",Yf:"pointerClick",SUa:"focusIn",TUa:"focusOut",HB:"gestureStart",Nba:"gestureChange",YK:"gestureEnd",cVa:"gestureRotate",ZK:"gestureScale",xc:"progress",CB:"close",OPEN:"open",
Xr:"select",Rb:"resize",b_:"changing",V:"change",Pd:"stateChange",Bl:"cueChange",YF:"preloaded",ia:"loaded",$c:"loadingError",Up:"start",Fg:"stop",Fx:"play",iL:"pause",UZ:"beforeFrame",Zd:"frame",vd:"ready",jVa:"instanceCreation",Dr:"begin",Ub:"end",Hob:"cancel",Rk:"press",Nm:"release",Vr:"repeatEnd",Wr:"scroll",Qta:"movementChange",Gob:"beforeShow",lUa:"beforeHide",INIT:"init",od:"show",jd:"hide",ZQ:"showEnd",aL:"hideEnd",kVa:"loadingScript",UVa:"processingScript",XK:"enableCookies",iUa:"applicationSet",
eG:"userInteraction",Tua:"userInteractionStart",Sua:"userInteractionEnd",qca:"transitionEnd",lWa:"toolTipShow",Hua:"toolTipHide",Mm:"positionSet",Bua:"sizeSet",gta:"controllerConnected",hta:"controllerDisconnected"}});define("tdv/events/Event",["require","exports"],function(){return function(){return function(a,m){m===void 0&&(m=void 0);this.name=a;this.data=m;this.source=void 0}}()});
define("tdv/player/script/definitions",["require"],function(){return[123,34,70,97,100,101,73,110,69,102,102,101,99,116,34,58,32,256,112,114,111,112,101,114,116,105,101,115,270,272,125,44,32,34,112,97,114,101,110,269,271,34,264,266,268,34,286,288,77,111,260,108,51,68,68,105,115,112,108,97,121,298,267,295,272,289,291,293,319,34,66,97,115,101,79,98,106,318,301,287,34,80,104,111,116,111,65,108,98,117,109,80,314,121,76,311,116,73,116,101,109,284,273,275,277,279,281,283,271,256,109,101,100,105,97,357,34,
116,121,277,284,336,338,340,342,344,356,302,289,348,278,371,373,375,296,337,339,341,343,345,347,315,386,125,383,290,292,294,376,396,349,351,353,355,334,288,396,110,101,304,306,308,330,332,300,364,289,359,278,280,282,371,293,99,305,105,110,103,371,260,102,97,117,108,324,115,114,103,98,34,335,388,101,376,293,345,91,108,431,101,291,287,441,443,93,410,34,117,112,89,387,374,448,296,110,345,98,398,335,260,112,116,104,84,282,319,256,435,437,439,284,116,114,117,101,446,467,376,98,111,111,108,461,104,101,
105,103,104,481,372,492,469,471,473,288,119,105,100,477,466,389,288,470,109,472,114,461,463,90,515,468,517,508,521,383,463,88,525,376,518,520,461,99,327,116,83,104,259,111,119,533,296,494,496,461,97,116,116,97,99,478,111,80,322,403,421,483,438,319,436,108,328,491,516,34,548,497,383,110,111,114,109,97,108,532,421,447,534,528,461,574,576,578,465,581,506,527,519,509,34,586,577,108,524,590,569,535,594,115,512,526,482,101,436,563,376,102,275,403,568,526,34,450,109,91,100,111,117,98,108,490,32,612,111,
294,287,98,554,107,460,399,335,401,323,376,69,120,354,114,110,578,415,101,307,68,418,333,383,81,117,259,72,339,312,339,558,586,97,577,79,118,278,348,77,97,112,371,274,276,424,362,357,400,559,324,654,656,658,112,660,97,662,664,666,114,348,73,577,103,101,326,328,461,86,605,111,51,54,48,82,282,622,114,99,606,422,674,361,426,421,115,623,280,116,625,115,85,82,76,546,288,115,487,431,433,335,311,85,690,486,488,101,383,663,98,311,629,105,99,434,608,484,324,574,413,445,288,582,296,618,91,749,626,102,111,97,
635,335,625,666,566,725,34,291,114,315,91,699,260,701,703,705,115,707,709,76,101,765,762,288,103,97,431,745,609,485,271,49,615,583,593,529,335,542,115,65,117,368,111,789,747,735,489,794,547,495,572,678,402,324,773,101,775,704,706,117,708,101,781,765,461,405,632,99,107,326,521,421,673,360,425,363,320,632,114,326,829,103,275,117,110,100,67,496,575,310,292,268,105,629,767,755,338,114,105,122,629,553,108,287,689,280,538,108,784,34,727,101,112,541,543,545,600,616,571,461,328,625,268,367,83,354,874,542,
621,877,320,753,288,880,400,348,499,259,841,107,843,622,846,848,108,575,82,551,854,837,256,893,768,114,770,121,756,528,870,882,318,885,887,87,512,514,878,376,575,918,796,287,360,709,294,870,839,66,575,260,114,908,368,117,911,505,601,584,896,315,898,100,875,890,83,274,455,100,767,602,797,726,887,939,114,941,943,105,945,960,949,335,872,112,900,902,845,847,849,114,851,318,854,110,856,518,91,858,860,862,578,865,675,868,920,648,922,953,887,954,544,79,290,99,105,373,971,796,881,997,884,999,873,965,941,
83,860,710,913,961,1010,883,354,1013,888,876,657,859,861,294,578,781,432,927,892,591,595,972,726,1011,1024,886,1014,633,977,904,980,908,280,111,946,913,769,771,961,870,100,821,909,855,928,507,1009,950,121,952,1001,119,1003,554,1006,121,1008,536,383,974,1068,956,292,259,1074,603,1E3,889,544,86,994,1032,293,103,1035,912,1037,1021,1076,887,1070,1005,1007,1062,592,1075,637,897,958,1015,278,968,970,1101,1038,1064,1104,951,958,1068,905,575,767,429,906,962,871,1041,923,873,1068,66,108,821,1109,1052,1094,
1039,570,291,1107,114,1118,832,1036,569,1121,1119,1065,1067,1085,119,1087,361,868,1033,1091,104,1082,1123,921,1012,1043,975,940,278,1140,1120,980,881,1084,1027,575,990,1031,108,1153,1092,947,616,1095,335,839,1098,1072,1156,461,313,1115,259,1068,1028,1171,863,1174,1155,1111,1178,963,873,925,513,1193,1142,616,930,961,933,278,935,116,870,1185,1066,1106,1162,1139,1166,1111,1144,1123,1210,952,1198,1175,913,1203,528,1205,822,936,461,938,1213,1017,122,1019,1134,1113,894,1137,1045,844,1047,1122,1049,910,
767,1054,917,1056,1184,1105,899,1231,1018,1183,1076,1125,1025,1254,973,1168,890,1164,1216,1166,1255,1023,1126,975,1239,903,979,1122,767,930,1246,91,1217,93,287,1277,1229,1238,842,1240,1271,1119,1111,1274,915,771,1277,1279,980,920,964,1269,978,1262,1201,929,114,91,1275,1291,32,1280,1146,1116,1148,767,895,1114,1211,656,500,502,504,1223,1301,1204,32,934,323,1294,1044,1283,1270,1140,1243,1051,1245,1289,1247,919,1167,873,72,1315,503,1273,1319,1225,1321,1206,1323,1022,998,1160,1138,1132,1258,1040,1266,
1025,976,1284,1140,982,853,1061,1299,754,987,989,1030,863,993,1151,578,1324,1026,890,1129,1131,259,969,1133,948,1236,871,1260,1002,1004,1182,1194,1135,1158,1042,1381,119,1079,958,1351,384,1186,100,1181,1100,1361,1102,594,1219,1308,876,1373,942,1375,1110,1399,1112,1103,1352,1347,887,1337,501,1339,1287,1341,932,1343,1227,1208,1249,1395,1355,1327,980,1358,1050,985,1111,857,1170,1365,992,32,866,743,1369,1335,1161,966,1163,1215,1409,1217,1441,1138,1232,1234,1378,1411,1124,1353,1160,1117,1445,1093,1143,
1264,1312,952,1426,1297,1458,1176,1300,1302,1332,1276,1293,1292,1122,1370,1377,1177,1386,1256,1456,1148,1150,867,1089,1034,1200,1459,1477,1379,684,604,1430,1393,1387,1267,1397,1073,1385,1064,813,639,296,85,73,848,109,684,413,403,383,816,818,777,779,823,782,648,672,423,713,911,1500,560,288,1511,1513,821,780,1516,572,335,405,350,727,408,356,421,1516,294,946,727,276,371,311,68,608,278,292,959,271,487,489,1096,291,504,1544,1546,915,367,807,737,1179,101,103,788,421,1556,266,1558,1549,32,1551,1561,288,
293,1570,256,1567,1547,1559,1550,736,636,288,638,1523,325,327,329,331,333,637,1519,836,371,366,368,370,1111,77,367,369,1167,551,1451,616,755,1541,112,277,100,457,553,361,432,933,348,729,1612,276,112,729,870,314,472,497,1111,727,859,432,301,1583,34,956,499,292,647,649,651,420,320,834,675,714,320,1447,561,746,610,296,35,265,1652,102,751,1467,296,1447,383,770,944,946,562,791,32,53,809,1400,1123,577,120,1350,1498,1453,475,477,479,727,805,1649,1571,736,1667,570,811,461,109,431,1672,1409,1095,1522,324,
641,643,645,108,1637,417,1590,300,383,692,97,694,412,414,305,648,1699,419,504,1642,1520,1543,693,1605,376,1703,694,1526,822,461,428,430,1630,1647,790,440,442,444,1683,755,453,413,456,32,458,98,635,1692,404,314,413,1698,650,1700,269,653,655,100,657,116,659,116,661,575,663,97,665,667,315,1518,712,1594,364,1741,296,1752,1754,1756,770,688,1761,1073,1749,682,1753,684,1755,686,1757,1773,690,315,1719,695,1588,427,666,1539,371,104,605,1543,115,1545,1568,1548,1560,1076,338,891,1577,1796,1557,1799,1581,1552,
1767,288,696,1589,1711,1655,1713,1765,320,276,1071,1398,607,1728,284,793,752,1235,1674,351,686,709,1393,105,1716,767,1786,1721,1831,1065,828,107,80,1051,1006,984,1476,376,1275,681,100,1771,1758,1760,176,1784,121,827,633,1842,1491,984,870,1438,709,1846,296,1275,1851,577,1842,431,1423,399,383,84,104,471,645,105,1173,351,1789,323,946,555,686,694,1795,1797,1579,1570,1572,1632,1585,324,1503,1505,1507,639,1592,1764,676,421,275,108,108,1853,1535,558,100,368,432,84,1542,1673,594,1006,355,76,97,1625,70,862,
87,1338,1317,1037,755,494,108,1611,32,1928,941,287,453,1316,278,287,49,48,48,287,50,1940,287,51,1944,32,52,1947,53,1947,703,1941,32,55,1947,56,1947,57,1947,596,1440,383,1916,346,259,1910,103,1912,671,1914,1157,1256,1535,1464,1241,907,1060,1864,288,1275,1248,1659,496,1905,689,1535,1918,1625,479,642,1068,1496,1832,354,109,1989,648,1991,540,1481,1088,1173,1090,1222,1827,594,1903,1986,278,1975,1213,781,102,116,1689,1487,795,1453,2009,1906,1996,1138,939,552,111,109,82,1416,2016,1407,1980,1410,594,348,
622,1925,569,755,1862,1436,1364,991,869,461,1965,1349,2030,1298,2018,1657,1461,1412,1012,2012,1443,840,339,340,2028,2030,2017,1656,1668,461,2021,1987,1996,1998,108,2E3,1457,1272,1263,1272,1265,998,1535,1874,1876,787,108,1993,1383,1821,2064,2034,1973,1353,2056,941,1970,2063,1020,1478,2090,2023,1213,2029,1316,2050,2087,1658,335,2067,2011,2098,2057,2100,503,1450,1995,355,1068,1310,1685,1984,1904,2022,355,1976,1285,1141,2051,288,1288,916,1471,1474,1473,575,870,2106,114,2091,278,1970,2112,1972,2046,2069,
1919,1999,101,1992,1148,1994,2140,1964,1996,1908,1968,2110,2038,1488,1453,1494,100,2079,1875,519,1877,2083,2002,1368,2004,1485,1393,2134,2136,114,1970,2014,2031,1661,2169,1985,2120,109,2122,1405,1679,1664,1954,2087,1195,1454,2078,2142,1990,2145,2001,876,2148,1690,1135,2170,2108,941,2174,2102,913,2104,2054,1024,1907,1967,729,2174,2113,2180,1213,2138,1253,2149,731,2023,1296,1977,2124,2087,2127,1290,1472,1305,1293,2141,2121,1213,2025,2060,2202,1037,2204,2188,2055,2199,2137,276,2154,2094,2007,1123,2047,
2219,100,2182,1727,806,271,2185,2095,1379,2047,2013,608,116,2233,1460,2076,2217,355,2080,2162,2082,669,120,1415,1316,1493,99,2009,831,2195,2125,2088,881,2272,1985,831,1221,1486,2186,2096,2189,355,2152,729,2231,2027,2211,2024,2059,2027,2139,2196,1379,2158,1975,2246,1357,105,852,1492,1432,1363,1434,2044,1367,1483,2045,1065,1533,2155,1742,315,2314,2228,109,2264,98,2163,2269,1417,2297,1453,1965,2321,2163,1188,2308,1172,1192,2177,2119,2068,2229,2057,2174,2296,2276,2187,2255,2109,2030,2341,2284,2298,1974,
2238,942,2346,2215,2326,1915,2151,2208,432,2290,1536,2355,2089,2286,2320,2161,2322,2082,1138,2259,616,2235,2344,967,2062,2032,1493,2350,2338,941,2370,376,2372,2190,2144,2146,1169,1029,2044,2334,2216,2205,367,2160,2081,1878,1078,957,1081,2391,34,2198,2379,278,2347,2253,2157,2378,2180,2246,2275,2348,2327,2351,2360,2242,1452,2356,1917,2143,108,1858,1844,1360,2276,1733,2257,287,340,112,287,859,1316,631,2294,109,996,2097,2263,2366,2330,1148,1189,1435,2167,1154,2377,2438,109,2411,2406,603,2408,2293,2026,
109,2381,2052,2261,288,2373,2239,112,2457,288,2235,2402,2365,2395,2164,876,2116,549,2150,355,1482,1439,108,342,501,1431,1409,1927,2435,287,1687,1909,625,2428,276,2133,2178,2337,2212,2057,2360,2405,2243,2278,2273,291,2443,2044,669,442,1565,2362,2319,2329,2082,2115,1111,1311,2392,2159,2218,1326,978,2248,320,1663,319,2252,2498,2474,2409,2517,846,2450,2524,973,2408,2070,1921,294,2497,569,1224,1420,604,1233,460,731,115,2296,1891,2105,2492,2107,2439,2469,2529,2417,1123,2467,2070,2072,2442,2332,1191,2005,
2283,2451,1123,1793,260,83,2279,1904,66,117,2026,110,2033,2513,34,2461,2172,276,2174,2416,2156,2418,1997,2420,70,845,1359,2481,2276,42,2508,2440,2368,1252,1233,2447,2364,2509,1878,2552,2582,2244,2384,2071,2192,2073,1286,1446,2053,2401,2548,2135,2604,2534,2258,1466,2203,2610,2041,2478,1935,2589,2087,2483,2455,2485,512,100,2488,1571,2490,1346,2237,2403,2578,112,2580,2376,2400,2577,2464,34,2383,2419,1625,2502,1172,2479,103,2623,913,755,1207,1937,32,625,2015,2431,2030,870,2328,2593,1878,1349,2639,2507,
2525,2070,71,670,2271,2500,114,699,604,624,1717,1362,451,2134,287,578,119,315,115,2491,2336,2549,2494,2380,2617,2234,2610,2467,2122,1328,1979,1331,2128,1983,2547,2688,2613,2645,648,2615,1923,2030,986,451,1932,2434,1929,2655,1935,503,2655,1939,1954,1943,1954,1946,1954,1949,1954,1951,1954,1953,287,1956,1954,1958,1954,1960,1954,1962,2312,2702,2010,2704,2526,901,1356,1428,2303,983,2424,2624,2307,2388,1172,2310,2477,2661,2414,2435,2241,2666,2342,2197,2612,1535,2601,2019,2583,2533,862,886,121,625,2710,
619,1006,578,743,287,2737,2755,2550,2265,2396,2147,2085,1497,2667,2739,2179,2288,2359,2435,2211,2599,1905,2784,2792,2663,108,2282,2597,2634,2468,2781,2470,1261,2692,2260,1145,2787,2493,2665,2176,2400,2299,2357,1909,729,1970,2800,2206,2614,862,2642,2235,344,2572,2567,2009,85,1971,1409,2223,917,930,1812,2570,2572,287,73,429,110,2836,340,110,93,1278,32,2834,1588,2842,629,2838,2840,2850,2844,2437,2364,2511,1409,2575,2245,2527,2123,1329,2033,1982,1334,2525,1138,2340,2354,2760,1379,553,98,262,260,120,1393,
2043,2648,2622,2772,1276,323,2715,2427,32,2432,503,920,2568,108,831,2823,2610,2662,2469,2567,578,1707,260,2883,757,287,102,1878,864,627,1006,95,431,604,260,2905,2910,2037,2913,758,2910,340,95,511,1199,2915,116,95,2921,499,2660,2633,2820,2635,2496,2871,2412,2452,2448,2869,2257,2895,2459,2576,2351,2093,2375,2812,2786,288,2467,2858,2276,2860,2351,2581,2765,2554,2762,1996,2793,1128,1130,1406,2947,2872,2407,2938,2230,2435,2638,2964,2936,2957,2703,2171,2360,2941,2808,2460,2944,2240,2759,2972,2319,2556,
2192,1545,429,770,2305,2482,987,978,667,454,287,111,689,1734,626,2999,45,477,844,502,2777,629,101,937,2571,2843,2827,1985,2154,1340,1469,2128,2848,328,2854,2852,629,2854,2845,2996,1301,2835,3010,2851,32,2839,3022,3028,2855,461,786,2830,2965,2008,2958,2287,2358,103,2210,2400,2555,2420,2557,876,2476,1152,2561,2819,2393,2959,2797,1449,2935,2563,2499,2280,291,2504,1564,2651,2530,2949,3040,2584,1920,2768,373,2771,2306,451,2774,453,99,3006,587,2738,2979,2780,2367,2782,3049,2003,2390,2948,2236,2932,3069,
2385,2193,1372,2962,2955,1063,2413,355,647,2183,748,575,597,1655,2652,987,2737,2428,2797,45,629,108,121,1934,2420,3112,110,3114,2779,2742,1046,2123,1429,984,2883,2880,1366,1437,2003,3121,2960,1148,2977,2363,2801,2985,2386,890,2647,2560,2168,2813,2453,2301,2806,1202,1301,1303,2225,1306,2262,2802,3084,2893,1213,3135,2066,3068,1138,1970,3158,2118,2740,2171,2093,2982,3059,3164,2179,2048,1316,3097,2065,1076,2892,831,3050,646,291,3064,2335,3165,2815,2153,2709,3144,2967,2339,2257,3174,2277,3170,2493,3133,
876,1391,2399,3089,2467,2793,3057,2596,3045,3068,3138,3094,544,1405,3192,2187,2814,2635,3211,2761,2974,3055,2898,2783,1820,2785,3038,2603,2705,108,2615,2536,3148,931,520,457,1018,2542,2460,2544,2354,2546,3067,3217,2933,2757,3168,3066,2943,355,2764,3098,3039,3240,3154,2163,2369,3147,2382,2610,3213,2690,278,2870,3204,3089,2897,2803,2267,2799,3188,2364,3172,503,3215,2254,2351,3228,2956,537,862,323,1070,113,489,2472,1530,2514,1988,2585,1922,1924,2883,2712,1931,496,1933,2656,2030,2718,1947,2721,1945,1947,
2725,287,2727,287,2729,1955,1957,1959,1961,3104,1963,3153,2767,294,258,1687,3114,767,1628,729,3159,3250,3269,2616,2074,2609,2942,1965,3207,2961,1374,2971,3169,1179,3033,3012,1904,3044,2831,3149,1470,3018,695,3033,3021,2841,3033,3024,2847,3026,2849,3344,3030,2853,3347,2856,2801,3161,276,3274,3248,3136,3091,3358,2463,3254,2458,2978,3090,3054,3225,3048,2805,3325,2276,2466,3068,3196,3140,2559,1484,2446,3267,3137,3286,2535,3072,2678,1574,987,3076,2776,32,2778,2931,3370,3092,2605,642,2987,1757,2990,2425,
2992,846,2994,413,2996,2998,2995,3294,413,3002,104,3004,104,3006,413,3356,3091,2789,103,3014,3383,3091,3378,544,3282,3395,2515,3083,2441,1404,3096,3243,2553,2984,3385,3324,2608,3375,2896,1996,3141,578,2649,3065,2039,987,2654,114,1934,2887,2889,1871,2809,2689,3207,3400,2989,3126,3074,619,2993,690,3410,2997,3406,3E3,454,3413,3415,3417,3008,3321,3184,3225,3227,3058,1037,2538,3231,1737,3233,1655,311,2545,1582,3334,2826,2892,68,544,3447,3229,1275,3342,3020,3353,3032,2572,3348,3497,3352,3031,3346,3501,
3121,3421,3338,3223,2319,2454,2060,2970,1376,3053,3430,3397,3372,1086,3087,3052,3205,3250,3426,1149,3522,3143,3262,3218,2803,2397,1080,1576,2983,2868,2256,2015,3271,2020,3377,2797,2607,2221,2618,2942,2695,2410,2795,3424,3396,3513,2027,3540,3249,3476,3258,2058,2455,3515,1408,3511,2525,3526,3210,3435,2602,3475,3171,2213,2240,2946,3516,3551,3518,3203,3388,3193,1632,1867,97,67,663,278,1598,1641,1593,1901,285,637,679,376,82,339,1060,1696,3583,366,770,826,378,557,348,2318,833,3588,1644,1577,1996,2865,1470,
391,340,1532,407,1996,1740,3591,814,2316,406,1678,383,848,111,107,362,1842,3077,3222,711,835,3589,256,821,1626,1409,3319,1630,2543,733,3637,3238,34,694,111,843,670,1793,99,65,1080,3015,1275,3639,103,2846,3656,3618,1584,3592,296,1812,1639,1748,335,1769,1779,3581,1853,691,1834,3606,1900,3608,1810,34,3668,685,687,1759,2998,1785,1716,1812,826,1781,1772,97,1869,1523,358,3675,946,121,97,1803,3536,637,1006,555,1254,3677,3664,1747,461,669,112,3615,1534,1996,1763,3633,3608,34,1596,1602,1599,2671,1065,386,
3719,3709,385,529,3677,3710,352,3712,1510,700,67,3281,1537,1790,1753,371,472,3182,1566,1805,1798,1580,1681,1552,335,1575,1887,1806,3744,1891,3704,1588,3665,1815,3607,946,1575,84,1833,3578,3212,1613,116,3760,366,3703,3731,101,119,278,3652,455,3713,1643,1540,717,1006,720,3520,119,3163,1312,1840,831,2181,2962,3102,284,2523,3436,383,109,1708,2071,557,3688,1758,84,770,115,314,1430,68,1059,3402,34,2521,1824,3303,1826,3792,3784,633,831,2324,2315,296,3481,2655,1322,1228,1076,3778,719,282,3544,1165,2942,487,
686,1859,629,3101,3462,91,2677,846,1618,627,259,101,95,2037,95,436,260,2911,2844,461,118,114,2670,1233,3691,643,72,605,3766,3762,1135,673,843,282,115,2122,3247,3175,474,741,108,666,3800,3832,2423,110,3805,3460,2748,3333,1584,275,3864,115,3866,2595,3861,1379,2825,2843,777,3764,3654,3341,3350,3019,3504,3354,3507,3025,91,3027,2837,3499,3506,2843,2845,1424,121,3785,291,80,3883,292,3885,3868,3193,1899,3884,3866,1282,2743,1427,3374,2222,3340,2128,1304,3152,726,3825,720,2360,3015,1320,3822,3455,1584,348,
3911,114,350,666,68,770,103,3064,433,2512,2117,3814,829,831,3594,2703,310,312,348,3428,383,3852,2321,727,743,107,3594,553,1430,1160,3789,2251,1683,2187,2906,114,727,3874,2573,3876,3878,3596,1393,1210,3941,2696,3366,2126,3927,2224,2130,2226,1474,537,291,100,494,3995,3856,1444,3925,3546,3368,3890,629,405,558,945,3578,2832,91,3503,3904,3505,3023,2846,4012,2843,3345,4015,3909,3941,1337,1187,1148,3566,3332,3244,3984,3815,2501,1106,3146,4001,3480,3989,917,3929,2227,3961,114,3999,114,83,1041,984,2102,3809,
1650,265,54,1953,3106,2693,2942,4029,3953,291,3510,3926,3230,3821,1344,3823,3952,830,3912,3914,3865,3986,1122,3125,3880,1926,2750,1190,1436,2620,3009,2572,1912,3947,625,83,3932,3715,1318,3016,771,4017,3029,4014,3355,3901,3903,4018,3905,4020,383,759,99,945,3773,97,2899,3073,2520,1648,2184,46,1666,3812,3568,3824,114,436,709,705,867,4083,4045,629,4047,4108,324,1651,1653,1654,1683,2235,4056,4066,4041,4068,3885,3577,1493,4085,3886,2057,3360,3869,288,120,942,1985,1393,4004,110,405,3894,3017,3896,3343,4013,
3899,3907,4016,4153,3498,4092,3507,881,821,4116,101,4118,743,625,2411,4048,32,48,46,54,3973,1386,4138,3253,4034,2807,1157,4138,2E3,3459,3982,3836,3464,2999,3408,3468,1934,3470,3003,622,3005,3393,3007,1209,3940,4030,840,4033,850,2746,2588,3127,3380,2908,4078,1229,3335,2429,4151,4089,4159,3898,3500,4157,4094,3351,4155,4218,629,3908,1839,4201,4023,953,1309,3950,2473,4065,3816,1403,3373,3440,2103,2610,368,3958,315,1912,496,280,112,262,4084,4115,554,101,4044,1023,3461,4107,1823,1808,626,2087,2575,4131,
3786,2099,3567,3275,3824,98,718,720,3509,2257,4147,3033,65,82,699,3770,4214,2833,4216,4222,3906,4224,4158,3902,4221,4096,4161,4157,4021,4201,3423,3339,4061,3451,1421,1207,920,4138,2951,4259,3951,1981,97,69,645,2677,3535,4171,1572,1683,4260,4134,115,3817,3935,1342,3937,4199,315,3941,3913,3647,3915,3921,2862,2697,1050,3611,2700,2867,973,4138,4305,1919,625,4308,4124,1560,4311,4302,34,3852,4042,4123,4256,288,4126,1653,4053,4181,4163,4249,4117,101,4119,4251,4121,110,4170,4338,792,4176,1489,4313,4059,4087,
3936,4063,3938,1394,3910,4201,3934,1418,4294,1226,4297,1184,4313,3786,4203,1406,4328,2699,1055,4331,288,4343,111,1870,278,3957,553,110,1831,2249,1680,50,4363,2157,4138,3421,4374,3089,2192,278,1696,1856,4057,3545,1037,4409,4132,4290,4410,4228,2811,3574,3089,4261,4031,259,3266,4293,4368,1422,4319,4372,4416,958,3917,3212,4183,2606,4025,3434,4027,3813,3882,4323,4069,3157,3987,2643,2619,4041,4390,294,278,1853,4345,2250,4347,1940,55,554,744,4129,2610,3863,4324,4418,3562,3699,3939,4320,4373,3549,3221,1393,
4406,644,578,4322,3920,831,767,4475,4462,291,4415,4132,4228,2331,2751,3142,3382,3089,4144,80,3701,2562,3244,3852,1921,666,4186,4255,4453,3791,4113,335,538,966,3997,966,4042,4393,1830,3888,1453,4461,4069,291,4432,3862,4200,4410,4136,2400,4389,4391,4043,4358,3860,3971,32,49,3298,4112,4265,4332,4267,3779,282,3421,2818,2400,4513,4135,4382,2864,4385,1333,796,4428,4321,4380,4263,4438,4502,4466,4429,4132,4424,2276,3820,4295,4318,4482,2274,3550,3089,716,4534,3826,2544,2558,4486,3381,2006,4439,871,4138,2670,
3037,4465,372,622,555,1853,4103,4105,710,4171,1825,4578,3831,2573,3803,984,3978,3833,110,956,101,3744,3563,4503,3995,4506,1850,4448,643,4252,2747,110,3783,3931,4566,3780,4435,2387,4076,2445,4572,4552,711,4476,1137,4550,4419,4599,4610,4268,282,3867,4563,4624,4619,4480,4326,2745,2304,4254,3403,451,3128,4077,3131,4163,4611,282,2615,3315,1878,3631,913,3656,4642,4626,4568,3433,3331,4623,4578,4565,4652,4070,4237,4002,1218,4518,4483,1212,2057,4609,372,770,4590,3596,4593,3980,3806,4636,4578,290,3681,1912,
1637,3874,3802,3596,3981,3807,4586,1940,4501,4532,4625,4535,115,4516,1489,4664,4234,899,4382,4072,3494,449,4075,2444,2753,995,4561,4422,4229,3086,2166,3088,4630,4540,4693,4629,4677,4380,2246,2519,1822,4500,4400,594,4148,86,4275,281,3698,4087,3496,4280,4287,4156,4283,4220,3897,4281,4098,4233,4067,4441,4541,4633,4180,3495,1470,4038,3993,383,4240,4394,4396,4499,1680,4587,3881,4574,4643,4653,890,3179,4616,4493,4573,4658,4692,4762,3446,2883,2429,2627,2487,626,494,2455,4298,4353,4166,4355,4168,101,4452,
1680,34,4348,1652,4350,2371,4239,311,1210,4243,439,105,4246,110,1912,117,555,2827,4597,2573,3960,3919,4480,4202,4744,4204,4635,4073,3448,4638,4208,4705,3311,4440,3920,4292,4557,1419,3482,4560,383,4148,4007,697,4375,4731,4285,4737,4733,4223,2855,4736,4154,4832,4282,3034,4226,4430,1314,3187,4425,4317,4369,937,625,3839,1911,4670,4594,4685,4676,4757,4589,4852,4675,4811,4618,4766,4567,2084,4470,2813,4138,3444,2621,2480,2883,2657,116,1279,2885,4295,3454,870,4856,4591,629,4673,1430,4334,4307,4804,4691,4567,
3781,4694,4512,4664,886,1604,2883,1608,1610,1616,315,3840,290,4008,100,1057,622,2677,67,3077,107,65,4206,4397,1664,4579,4082,3843,102,438,566,2272,4802,4788,4702,451,340,4914,3846,4917,115,4919,293,3473,4298,4759,3421,4819,4677,3798,577,1912,3581,4681,4851,3876,4883,4336,4527,4310,4531,810,4232,4886,720,3478,3261,4820,4376,3483,2541,4379,4742,4325,3923,1465,4745,1468,3150,3991,3930,4631,4514,2058,4667,4444,4130,4696,4708,3533,1392,4865,4759,3781,4762,4712,4717,4960,4404,4955,4426,4378,383,4504,3996,
760,4507,4604,2404,4525,3761,3983,4718,4971,1016,3479,4573,4144,89,3697,4137,4759,2615,4668,4421,114,4417,4542,2698,1111,2866,4546,4707,5013,4666,5002,4954,4677,4975,5021,4024,2194,4716,4757,5012,4479,4442,4972,4964,3367,4182,4980,1913,4844,1420,4823,335,118,4728,3835,2991,451,1736,727,686,100,3995,865,114,4932,4652,2707,3288,3836,3290,1932,2715,3295,4295,2719,1942,1947,2723,287,3301,1665,1952,1947,2731,287,2733,287,2735,3079,597,5057,4692,3227,3387,2883,3391,3078,4197,3080,4547,4373,4443,5036,2465,
1264,383,1538,3737,421,5045,3770,647,67,542,432,710,1578,1569,1800,3677,1895,2027,1897,614,288,366,477,305,946,1210,677,3591,4008,5123,963,5040,123,1659,480,1554,677,1632,3760,4336,1836,820,822,824,1517,3674,3714,946,275,3782,903,3818,4142,4445,108,848,845,5148,3579,3619,1501,288,5137,778,1527,1515,825,383,83,453,260,79,2571,317,1640,3693,5143,387,804,3836,4871,2489,2430,2888,2030,2434,4776,1631,5156,1586,5170,3666,1811,111,120,1745,3755,3735,1882,672,1843,3969,4355,3749,3743,1890,3488,726,1018,4044,
1555,3742,1889,5111,5185,1693,642,4407,646,3795,1710,1591,4440,5173,561,3946,786,2677,88,848,294,1903,115,4783,4912,4126,4688,48,4921,5037,461,2999,4556,3808,4361,4528,4723,1123,4165,5230,4125,4127,4128,4948,5096,2942,1687,110,5239,4757,2999,4360,4346,4756,3244,5253,4315,2400,100,5222,4335,101,89,5226,487,496,5229,1466,4171,4785,1940,265,1940,5235,5251,3368,1675,478,480,4946,1682,5250,1684,4950,3808,5266,2677,90,5270,5228,5246,376,35,5233,265,5280,5150,5282,5292,625,3652,5145,4983,4171,1951,5243,
461,2923,1175,4586,5312,4750,873,5315,5241,5260,4573,5253,1545,476,4764,4618,2999,5297,4049,4127,5302,2235,5265,1704,5223,4083,112,1635,4166,2982,5310,5317,798,5060,4754,1664,5322,4618,1490,3980,5305,4585,5241,565,567,5288,2575,2540,101,3945,5336,5267,4527,5356,4258,913,2575,4165,5258,4722,5288,1691,383,3679,116,3708,3671,315,3708,3775,1714,1766,5211,376,5376,5378,3683,121,1786,3686,383,1745,1837,710,1816,3634,289,5197,984,599,5347,2522,5344,1584,5400,629,580,5403,3790,5405,5399,4594,589,5410,3972,
5373,2761,3968,5401,4527,4689,3361,3159,5420,629,5415,4721,1680,5423,5149,275,5426,4359,2057,4527,34,88,89,524,1732,987,5439,90,287,88,90,89,287,89,5447,5450,90,88,287,5454,5449,32,5448,88,870,3636,3318,728,3640,3235,3642,1800,2547,5434,5409,5429,2184,5412,764,648,1662,5241,91,2846,2087,1275,5394,5138,1528,783,2278,2900,4527,5349,4690,2576,110,866,5402,5473,564,578,5357,4301,5290,431,866,5428,5240,4346,5366,4340,5502,5494,424,5472,5506,4453,5508,5358,4341,4878,3596,5513,4171,5431,3918,752,4851,4879,
110,5505,5522,5412,5519,1430,5496,5514,5430,5317,3677,5484,5160,5139,1529,461,5165,605,262,5187,5382,1817,256,628,2361,4637,619,5177,2631,5179,3454,5182,2060,3660,321,3620,296,5547,383,70,3803,3670,5389,4413,2422,3807,5397,3715,1819,1099,4648,3244,280,366,5051,1506,1393,3696,4729,3244,2009,3983,4492,3703,5385,3663,3754,3706,5566,3803,5376,5569,1774,5391,1788,5194,1791,421,2565,5108,5208,5110,4257,1801,3427,3741,1888,5609,3745,737,3753,328,3755,1899,5220,1818,4716,5316,5418,1379,4751,4510,2271,5489,
4911,319,5491,5424,4840,1841,5407,4803,5017,1470,5567,551,5599,1854,5571,5638,2661,3673,1409,5159,1514,461,111,265,328,116,5513,4757,5654,102,5656,5505,4757,2929,2270,2400,4639,4868,2650,2883,3450,3452,2658,5180,1316,870,5314,5327,5492,1621,116,3702,4521,2003,4769,5061,2484,32,2486,2629,626,2429,2891,2900,5047,5553,91,2906,1904,2925,3849,2918,5701,2917,605,5701,2921,5678,5707,111,95,5665,503,4931,461,5585,3183,3768,335,1812,925,846,5612,320,5099,1883,906,4827,320,5109,1807,5616,4824,608,575,101,3858,
2902,5613,3750,5202,1809,5592,288,5270,787,413,521,5621,3776,371,99,5728,4836,4005,4324,367,4889,594,5753,1051,5755,2841,5015,4384,5640,4330,5019,4990,5754,2854,3913,3865,367,4179,4661,4054,3368,952,278,4660,4411,2537,4036,2129,2132,2131,5056,537,5771,3033,4403,2791,5667,958,5781,4469,5577,2879,5796,5001,5781,2435,4668,5761,4831,629,3955,2740,5782,4700,4207,4570,4209,4641,383,4626,5464,1629,433,5770,5762,2854,5809,1853,5776,5783,4789,3830,4535,5010,4973,2610,5780,4807,4962,2220,5812,3836,5668,4815,
3081,2643,5791,2572,5263,3089,5835,4520,5848,5801,5827,3829,3368,5806,5763,5825,689,5782,4278,5786,5056,5788,937,305,121,3323,4141,5524,1684,100,5867,5798,1384,5851,3842,5802,2636,4668,759,339,5803,2345,2101,5833,2942,5856,5772,5757,2247,4382,5861,4748,2132,1229,5866,5793,2455,1393,5888,3033,3787,821,5422,5412,5881,643,3553,2456,5886,4003,5866,5909,4668,494,5872,5860,4828,4747,3151,4039,5345,5877,4934,4843,4630,5901,2572,5773,3885,5775,4699,4205,3807,3107,4813,5814,5842,870,5907,5797,4808,5828,4965,
5920,4967,5922,2465,5845,2843,3505,5847,4630,5835,5898,2060,1393,5941,5878,3260,4511,4724,5913,5094,5777,4351,4824,5964,2057,2214,5024,4757,5916,1855,3042,4538,3089,4626,4953,4009,4821,2655,5360,3234,2576,3236,3261,3644,5928,5951,2840,5255,3244,5849,3538,540,5003,4618,5959,3364,5869,2187,5990,629,3505,5915,5913,4719,3788,5632,5411,5626,1453,5974,5925,5666,3089,6004,4149,3042,4366,3244,5974,5782,4543,5767,4386,5769,1179,5969,941,2934,5972,5579,4535,4888,5030,5994,5801,4537,5128,4578,5995,5970,3359,
5998,5492,3794,5053,3637,2952,4341,6024,5996,5805,5950,5808,2612,6025,5016,1409,5018,520,4877,5831,3287,5926,2749,2711,3292,2713,3293,2716,643,1938,3297,5069,3300,1950,5074,1954,5076,32,5078,32,5080,5090,5082,461,6E3,2099,2353,6034,4573,6019,5930,328,2247,3887,4147,6031,2404,6047,5635,4503,6057,110,5858,5883,5023,5962,1123,6096,5976,6042,5664,5852,6092,1316,6002,1135,6091,6045,3365,5095,5303,6113,6107,6097,5932,5943,6026,6062,1470,2701,5949,5823,5902,5965,5944,5236,383,5849,5765,1244,6027,4545,6064,
461,4626,4184,267,3401,4854,4074,451,4188,3466,3409,3407,3411,101,3471,4195,3416,4197,3418,5790,6138,2572,6109,5836,3123,4720,5535,5474,6013,594,5835,5953,4578,6019,5759,1123,4626,4867,5686,5048,5554,2887,5672,5675,2890,6169,5807,6020,2816,432,4935,4757,6019,5993,4573,6151,4613,4236,6141,5281,1123,6054,6124,6007,5917,5996,6121,1379,6123,2200,2940,5911,6210,5897,6021,4271,2400,6211,2374,5885,6126,2235,4626,4270,2015,5800,5924,6224,6234,5795,5877,5903,2221,5530,6178,6128,6170,2843,6130,2159,2840,350,
413,6203,4618,6232,6115,4577,4855,6036,6206,544,4867,4983,6201,6107,4463,2033,2187,6205,3139,3521,4711,3523,6018,6265,5892,5919,3928,5921,4749,335,6E3,5874,2086,6258,3826,5085,2770,3578,755,5088,5081,4816,372,6259,6270,119,4026,4656,6285,625,5956,2291,6239,6032,6119,503,4668,5835,4768,2882,5687,2626,5689,2628,2630,5693,6195,5763,6248,6006,6221,6318,5824,2762,6250,454,6253,5492,6019,6172,4628,4864,3089,6024,5933,4810,4701,2679,619,5841,3130,2166,870,6330,6325,4122,6322,5822,6196,3505,6251,101,6328,
6105,288,6218,4E3,5966,5829,3368,6282,2862,6175,6243,4657,1802,3320,6011,271,5516,5501,3283,5844,6246,5756,5774,5891,2862,6184,6323,5902,6336,4607,5813,4615,5939,6090,495,5908,2968,2455,6216,1453,5959,6181,6264,6375,6108,2612,6380,6143,6118,3190,2015,6056,6398,5850,5954,6403,6305,6392,6104,5149,5979,862,4646,3317,1627,5465,5821,6281,6389,5942,5837,2863,6061,2276,6063,278,5940,6423,6173,2744,4071,5934,6155,4812,6340,4814,6342,2311,6431,5882,5878,6393,594,6255,6198,3422,6068,6397,6196,6248,6241,5905,
6244,6381,2572,6332,5799,2149,1632,1849,5644,348,5646,4594,5548,5398,5576,5875,4630,5580,5131,5583,5684,1151,4086,1037,1866,4937,3690,4604,5561,1893,376,3705,1814,383,3581,3598,3585,3957,1210,5572,4676,5574,1521,5744,34,3967,3596,578,6492,770,6494,6466,5638,461,79,114,740,116,350,6017,256,5726,5196,4594,5206,5200,5209,5610,3677,6515,1339,5750,5383,320,115,1148,1912,625,4670,4753,5497,3790,4110,5412,1646,5416,4347,5248,5333,2610,5717,6369,4172,6540,539,4300,4171,6371,5368,4341,6531,876,2063,4171,56,
5412,4391,3979,2086,5625,4578,4240,1210,1337,108,360,5365,5499,5367,1037,2575,6049,5354,4346,34,2906,120,367,2927,5711,1613,694,269,5442,451,6582,6584,2921,538,3599,97,2915,6583,100,6585,2927,3181,4355,2491,5434,5362,3947,5364,6548,6554,6576,4341,5681,5683,6542,5523,3212,4025,369,5478,4346,6617,1386,1148,3708,2347,4171,1949,57,4175,6457,1872,335,4509,4395,101,6491,3584,770,304,666,366,3692,3632,5751,5384,3661,5563,288,6635,4117,3595,1430,6504,6639,97,6641,355,639,383,1033,115,5642,292,6465,1762,5142,
6646,320,6547,4420,5590,6226,625,554,1793,1726,6616,5412,2677,6676,729,6651,6579,4500,46,52,5537,6500,6666,1775,335,1511,3581,1881,5604,5725,846,6522,5615,5989,489,5105,1885,5607,5614,5732,3752,6690,6482,3756,3694,5752,489,4329,771,1511,3733,3474,383,906,6042,6553,6574,5509,6373,437,2429,3959,6548,4947,6372,1631,5375,683,339,5388,5600,3685,5602,3587,6713,5101,5685,6311,6542,3716,6315,448,6590,619,4775,2060,4772,5691,5178,5648,1704,3578,5651,5161,5653,5655,4355,5521,5241,6623,1379,5660,5662,6456,6043,
5346,6537,5417,6043,4208,6188,6775,2465,4874,5302,2653,4874,5673,4872,6193,4370,5678,6772,4757,3631,6365,4757,2878,6548,6768,2157,868,2901,6685,4784,5699,497,6751,756,3007,2915,5700,2909,2926,2912,5706,6811,3844,2571,5703,6815,5708,926,6166,2906,2926,2928,1924,6485,3662,1811,5594,6489,1531,276,463,6691,6469,3715,5053,114,107,293,2122,5286,808,5517,5290,4131,6496,629,6716,917,1842,112,6834,6482,5379,1855,4664,6848,3850,1964,5649,2276,6761,1722,3961,311,105,2677,6573,566,6575,569,2575,5045,774,767,
1525,5485,448,400,6673,4420,6833,112,6684,2177,5434,5534,4757,5433,3596,5663,5587,6653,984,5658,3244,6671,4630,6722,4908,2684,121,1912,5738,101,4526,6548,2721,6798,1083,4893,6548,1380,1620,1559,6806,4895,367,4897,121,4899,437,6098,1209,6884,2267,6396,4035,4376,5043,288,5606,69,327,6368,6747,2999,4481,6806,6939,4295,3280,259,3849,287,6944,6600,2037,6947,1750,3849,6816,6787,4101,740,99,6946,1305,623,743,6954,1279,6961,6958,431,6963,32,6944,279,6959,6970,2926,6950,6969,655,6971,6967,6975,3280,1870,6972,
117,6982,6980,6984,294,6953,2037,125,1623,495,6902,4242,111,6906,6843,6872,879,6556,1802,6935,604,6678,6780,34,6942,6783,987,6942,6951,6945,431,7011,6949,2571,7014,6989,7016,6960,6957,6959,6956,6962,6975,7023,6966,110,6968,6973,6983,1554,7029,6977,6812,7028,6986,6982,7013,6976,6985,7019,6981,6988,6979,2571,870,5606,4853,2748,4687,1947,4677,6927,97,120,6354,3988,6931,4846,881,1802,7049,2623,7051,6911,2564,759,118,1393,6722,6257,6612,5290,6728,276,6730,2859,2117,5098,3736,946,6934,6699,5740,5201,5469,
963,1604,6704,5107,6700,6708,5203,617,7084,5730,5608,7093,3746,5949,3965,7092,3744,5366,5611,119,4305,3535,5731,3751,1582,3727,6855,5389,1655,5118,338,100,1540,4213,6647,4371,5126,321,5125,7122,5606,7124,6531,5724,5129,1632,1634,278,743,3581,70,1772,5396,3757,371,312,5340,3015,6864,709,287,1511,702,819,5540,709,1324,292,111,7134,292,7145,1716,5395,7148,700,7150,5395,6827,6649,336,6482,7138,3584,3707,450,1535,6696,5100,320,2021,2571,7103,5742,1573,2611,2703,7180,7087,5844,7102,7085,6523,3841,6871,
1892,6828,1587,5619,3706,6528,5549,2643,1793,1929,402,4544,91,1600,470,1535,1623,2420,5819,3320,6633,288,4248,4165,4167,5753,6801,1638,3706,6668,6529,482,1829,6636,6791,5994,4208,6870,5500,6555,5290,5283,1677,504,4309,5287,6733,7193,7167,1694,5214,1697,5216,1746,6831,7214,1779,6526,504,6518,833,5638,6521,7189,6701,7112,6500,7250,6712,5622,7224,5051,7226,6797,5412,5351,3804,5353,7230,6998,493,4341,1885,4106,6780,703,5412,260,538,6793,5241,4399,6632,4503,5274,5241,4785,6544,4459,2942,6899,6176,5404,
7285,1584,6882,6780,7066,7061,6558,5342,5321,5412,6557,1372,6620,7227,4573,6563,1491,7282,5259,7279,4791,348,6570,6572,6610,6725,6845,6373,6796,6679,7296,2611,6606,7270,7320,6871,6726,3994,727,6552,5355,7321,7239,335,7313,5372,4677,618,98,3600,7266,7326,122,7309,4860,6625,670,6627,5241,6629,6631,3536,3580,3602,801,803,6836,6499,6648,5157,34,1600,1597,7360,854,3601,392,6505,6483,6468,7222,7199,5578,5004,1393,861,2027,258,268,6359,4265,5618,1813,652,3667,6736,1780,3681,6856,4103,7175,946,3794,4008,
781,97,666,7185,5610,335,7398,328,2829,7403,7191,328,3793,622,328,3492,119,2623,7110,1570,7105,2787,7179,7256,7099,7182,2134,7409,5989,4907,7409,7420,5117,7413,101,4305,643,7427,7258,7364,1586,6488,5218,6645,7223,2643,821,778,6208,7095,451,2521,287,3648,98,287,5106,1930,3794,666,1057,7316,6994,4244,4795,262,4798,4800,4929,5639,6542,6732,7232,6373,577,6125,7385,3819,1301,1217,44,6290,1716,44,4856,1893,44,686,121,4225,335,4008,72,5052,3733,3976,7476,894,5518,811,3760,7072,569,4650,7213,34,1849,5598,
7114,6739,6759,7362,7124,6486,296,7506,7391,6691,5601,697,383,6511,6513,1745,7373,7511,1566,110,1844,578,6886,6548,5634,5149,1670,7530,3089,5324,7225,6536,6567,4904,625,4906,3965,4909,4686,7288,3450,7008,451,6192,757,7166,7365,7523,6656,461,2070,7525,320,759,3386,6288,5087,863,3392,3394,3961,6745,4869,3836,4771,6314,4773,5559,2027,4877,2986,6153,3879,6338,3389,6157,3405,3465,6161,3467,7585,3469,3412,4194,117,4196,7552,6388,3314,663,4647,7211,1630,5817,2192,7599,6421,752,6260,3527,6272,3529,6473,7606,
6298,4464,5664,6778,6746,5697,5555,6192,4876,7595,116,2708,6516,6069,6752,6071,3291,2714,4295,6074,3296,2720,6078,2724,6080,2728,5075,3307,2734,3309,5091,7621,5869,4558,3232,4958,2543,3487,7100,372,7606,4668,354,6296,6401,6422,294,7653,7606,6262,6273,3563,5112,1504,5114,3007,1509,335,3665,308,7396,371,906,3842,7109,7098,7111,5743,7439,1894,7665,1506,7667,6589,5219,6669,5550,7139,6850,91,7146,6720,7339,5007,6462,5596,551,7507,7393,7115,7376,3634,3677,7699,1782,3682,1774,461,262,5748,5192,7221,6742,
7262,2401,267,500,666,4300,7472,5653,1747,73,3535,4649,6420,7333,3208,5586,6873,7079,6500,7712,7247,7366,670,6856,7559,5129,6500,7441,1701,5720,4286,2748,7252,3587,3865,7437,7650,292,6675,5729,1804,6707,7678,7182,5753,7188,7097,7756,7419,6574,7240,7365,5113,7683,1508,7685,7443,7199,957,5931,100,6331,6383,4910,6189,988,6440,4210,400,5890,4981,3528,4488,4713,5890,6172,6152,2988,4498,5697,6158,7586,6160,7589,6163,7591,7593,4198,6150,7652,6348,1592,6377,7558,6419,5820,5237,7210,7809,7212,7806,7774,6172,
5980,4316,2539,3484,7648,3237,7094,2134,4863,6461,3089,2036,7422,7779,6341,7782,446,7578,7792,5935,6156,3463,7584,4189,2847,7797,4192,7590,3414,6165,5715,7783,6377,7817,6067,7624,5936,7626,1929,6072,5064,1936,5066,6077,2722,6079,2726,6081,2730,7639,5079,7641,6089,3194,278,5832,6230,4460,7789,2612,3781,7612,6267,3862,7876,2703,5914,7805,3882,6377,4645,7597,6418,3638,7727,1964,5992,6821,7819,4822,7060,7849,7816,6059,6306,5997,6094,5350,5890,5952,6774,4060,4988,1345,7899,6098,7720,7073,6373,7773,6098,
6331,3571,874,6413,5870,2134,6037,6333,7788,6377,6001,7922,6268,7660,4208,6263,4028,7882,3165,7894,1199,7896,4062,4427,4379,7850,2612,7888,3316,7378,616,7503,7834,6296,7879,3183,1853,6287,7276,7625,91,6291,6088,6293,7917,5775,6100,3524,2740,3828,2075,3368,6578,2883,6853,6531,2489,4914,1209,7936,1853,1068,4982,7662,4578,2134,3323,4668,7825,4230,7078,6846,7978,5859,6009,5904,7346,4717,7944,2703,7785,7608,7787,7996,7774,2939,6405,7885,7651,7655,6038,4573,7561,3439,7448,3376,2703,3330,2963,6299,7935,
7997,2740,7925,7827,7927,8003,7993,6242,6767,5412,7984,8026,7349,5680,7991,6110,2462,5011,7906,7938,4617,1468,7910,4064,3239,5810,6145,1330,6147,4294,7977,8020,1906,2840,6929,5784,4956,6932,422,8051,5859,7902,8037,7887,7852,2325,5697,5062,3292,7858,2717,7860,7633,7862,7635,7864,7637,6082,7867,6086,7869,7962,5890,7884,7874,2942,8011,7644,5982,4295,5984,3485,5987,526,3644,2874,2876,2145,4999,6377,3781,7661,7609,8002,7918,7945,3071,7563,3836,7960,7567,7815,7913,3134,8006,7963,7775,7901,2495,2435,6446,
2973,5810,6215,7930,3216,8021,7606,7981,8102,5031,8034,5960,2257,8120,3569,689,7818,4375,1320,8090,7822,5988,7094,8086,5086,8108,7565,5089,8110,7886,7900,8015,8113,8084,3368,8115,6460,6472,4578,8011,7623,8065,7958,8067,7629,4192,7859,6076,8072,3299,8074,3302,7865,3306,2732,3308,2736,3310,5843,8156,8123,7904,8033,8059,2137,7932,5814,7934,4573,8115,8022,8158,8130,8184,6433,3924,1978,5766,6134,5768,6149,7912,7964,5035,7496,6127,7943,8003,8061,8006,7987,4614,2444,8188,7905,8063,7658,8006,7654,7729,8128,
8001,8193,8151,7967,4436,4655,7613,8019,8208,8118,6412,8182,6355,7183,8225,4710,2311,8214,5492,7984,6391,2232,8114,8131,7873,8205,4130,8131,8004,8012,5854,8121,1853,8100,7933,7982,6890,8117,6411,2060,8134,6143,7615,7570,7779,6192,5555,7620,8202,6099,5884,2111,8124,3889,3033,71,844,7501,7949,7892,8111,367,7776,5943,5893,6279,5895,8270,7791,6154,4859,4922,7839,941,7841,7587,7841,3001,7800,199,6166,7594,7871,8195,978,7656,8150,6098,6060,8198,6428,6135,4387,3645,2671,4539,8249,7965,3200,8259,8036,8244,
8216,540,8145,7779,8109,8178,1861,7569,5670,6312,6754,7573,6756,5556,2687,7937,629,8054,3229,8042,4370,8115,7980,7786,8040,8234,8156,7777,7837,6438,7780,5938,6441,2754,2046,2853,5735,292,7808,7989,7916,5890,8016,3555,1218,8131,7914,7731,5290,7924,7804,8154,8253,689,8290,7580,2883,7795,626,8297,3410,8299,7846,7592,8301,7802,8270,4885,8235,7979,1148,3198,7725,6894,7883,6055,8322,8224,5826,6140,8252,8207,8104,7998,8373,8247,2694,8320,2636,8262,8282,4709,3379,8187,8257,3244,8011,6417,7948,376,7950,8044,
8401,8204,8013,7875,8099,8407,8427,4055,8249,6283,8421,8348,7784,7611,4437,8018,4573,8030,8285,6277,3990,5787,3992,8288,3456,6445,8274,3541,8406,7952,8439,8228,8189,8364,8393,2398,8395,8457,8194,4977,3199,8024,8405,2740,8306,8058,7774,8469,8115,6172,4485,4615,8239,8436,7928,6276,4293,4966,8446,4968,8344,3220,8023,7983,6059,8350,6437,1606,4703,2309,8355,4706,8270,8474,8486,8192,8396,8122,8272,7903,6112,8135,2011,8039,5679,7477,8056,7898,8413,8137,5041,3482,8140,3235,7649,7182,8180,6212,8210,8105,7596,
7947,7603,8357,8339,7908,4367,4845,7942,8303,5059,6451,7838,3837,7627,5063,7630,5065,8168,5068,8073,5071,7636,3304,7638,8175,7640,8177,7642,7504,699,2650,4355,354,1745,1858,116,673,1863,7003,3949,7714,7687,8206,6914,5299,5233,5234,7291,3368,431,5748,6559,6767,46,55,5412,6471,6565,8578,51,8581,2571,1108,7303,7314,6632,5538,7245,8560,8562,3865,7814,6650,359,7415,2623,7747,256,1884,7091,7423,7757,7765,1586,7767,5115,7770,6498,371,8211,890,8390,1210,3605,1409,3728,4959,1506,5154,8423,3369,4603,112,2829,
5918,3326,8155,276,2829,6041,8279,5680,8633,1371,1382,7926,7053,8628,112,4576,8098,7774,5307,544,5880,6416,7889,8435,963,7810,7601,6296,5011,8638,8157,6284,3244,769,3209,8359,823,7812,8362,7621,8658,8643,6266,3983,8638,8475,8213,8417,6204,1919,8096,7324,4630,8442,6425,2642,4010,5894,5789,8656,116,4185,8351,8492,7583,8295,6159,4191,6162,6164,8386,7848,637,8674,8226,8017,8456,4618,8683,3123,4327,6146,8199,6028,8201,7951,8220,8346,8509,5149,1624,5141,7891,8655,798,8264,8331,7779,7618,6785,6788,6926,
8671,8480,3441,8085,2768,7922,7645,4957,3474,8141,8093,7094,8473,2612,8648,5146,8374,550,915,544,7057,5870,8744,7883,8733,4060,8482,5863,8447,8688,8413,8630,4955,8758,2846,8484,8703,2471,4231,7916,8659,8031,7995,5031,8638,6016,8162,4855,7606,8472,8082,8046,7690,6136,914,5145,8645,8316,6377,8369,6999,6846,8768,4761,8717,1393,3036,5958,8064,5154,2483,7856,7628,6073,8542,4528,7861,8170,8546,8075,8548,8077,8550,7868,8552,7870,2531,1353,6852,2829,8246,8431,3368,2134,8820,1268,8443,8631,1218,8794,8649,
8218,8186,8476,8677,5999,8106,7957,7854,7959,8147,6292,8179,8776,6237,5154,2187,684,8643,8822,8403,8497,2612,8791,7273,8793,8643,8464,8461,8707,8745,8750,8747,8408,3830,8438,8227,7880,1379,8663,119,8340,5492,8871,8062,8400,7992,6132,6427,5482,8312,6029,5406,8643,6302,5552,8488,2703,8826,8851,7969,3726,6735,1778,6737,7737,5389,1786,7739,7704,7391,6738,1854,7518,6880,3667,84,77,724,7702,3715,8144,8107,8326,8842,7961,5843,8219,8691,8491,8293,91,8380,4190,7588,7844,7799,8385,7801,6168,4099,8651,8526,
7813,7600,8715,8345,8E3,8347,6414,8867,8705,8869,1453,2840,354,6644,7726,8723,6356,8800,3289,8539,8068,8541,8167,8807,8169,32,5070,1948,8547,32,3305,6083,6085,6087,8149,6581,8736,8233,7058,8139,7821,8518,7823,7650,8219,7968,8829,7803,8008,8641,4757,8011,7659,642,6779,7958,6192,106,945,280,102,3115,2656,3453,2930,8689,8675,2389,8836,7386,6500,8610,7684,461,968,5215,416,309,7461,316,265,333,8911,5478,2573,6907,3761,1545,7077,6780,51,46,7300,1076,401,328,258,260,7383,340,8027,6622,46,7532,5870,260,9019,
9031,101,9033,4237,5522,9037,5412,5253,1833,395,4604,7353,4346,50,9026,7305,277,367,9044,9035,6686,50,4111,7357,7733,7245,6507,315,5565,335,1923,98,7170,3767,421,7117,5120,8614,608,3915,1486,8608,7681,1896,9007,7198,5398,5463,8935,730,5467,734,7404,726,2892,4944,4598,7338,1981,1904,544,1970,78,7401,501,7793,7294,4339,7322,522,3119,760,100,87,499,110,5738,9040,8390,2912,4355,1138,3960,1632,1511,7672,1537,7096,7755,5741,7186,4101,4782,5106,1886,8606,7181,9083,376,7367,1602,9087,3715,5668,8989,5275,
7548,6806,8267,8998,5676,537,6715,7204,6718,489,6344,821,814,6908,7536,8587,7271,7332,4990,7846,4938,3414,282,338,1929,5800,8536,6095,9167,3582,8006,6790,2813,3968,6289,987,1210,6923,4901,1619,1609,367,1861,700,6877,700,5395,1229,4848,1968,8032,8234,1058,8378,6477,2311,9146,7288,5690,2771,6806,6753,2027,6755,6316,2632,3176,5695,1708,5437,6823,5702,1794,6806,2904,6815,6813,2914,6815,5705,9225,9218,6820,2924,6819,5711,5713,4370,7075,5122,6731,7238,7721,6721,495,4577,6724,7331,9110,9166,275,577,83,3794,
339,6677,8565,7663,383,65,519,281,294,79,99,5753,945,984,8559,1051,8561,275,8563,6937,5172,8567,4928,5631,6542,5067,7326,2037,6853,7236,7288,3809,6806,7451,32,97,111,2661,4449,6564,7340,4755,6680,7308,8774,6023,8455,6621,4453,6688,7326,455,8564,7063,4527,3811,4578,6840,644,648,8577,9054,9064,4757,5253,1513,1130,7546,6622,6689,7680,9140,8593,9267,8595,3885,8597,7168,3681,7373,4044,3280,428,7140,6743,3590,9322,296,6502,6654,5151,6656,9332,489,7226,6490,6482,3728,7174,9017,1595,1601,3586,2276,6695,4990,
7556,1111,6638,6596,3909,3722,8620,9348,3725,5184,9338,411,3604,3616,409,5164,574,119,6835,9351,715,3764,9305,6909,5233,7305,2429,9380,6542,6910,9027,1259,6913,6747,9184,5466,7958,9392,103,9187,1610,9289,7528,2083,9181,5437,9395,7549,619,9395,9397,9189,1603,279,4892,354,7972,1617,1615,1737,2429,9398,2046,9290,7312,5422,6539,7326,312,4597,4337,9036,9063,9321,5562,7365,6835,6661,6068,8613,7122,7513,6829,7196,7735,5642,116,7705,3689,7394,3653,9377,9337,9432,1586,9445,1852,5389,7395,383,6684,9340,984,
6655,6596,6658,6643,1712,7141,5605,7068,9022,553,5584,3697,9469,9354,4677,4492,9473,5591,9368,6501,6895,629,9461,3585,9463,6660,5720,3033,7739,8391,1987,2840,722,8910,8722,3320,3641,9093,5733,731,9492,723,8527,9497,3643,8743,8038,629,9493,9503,9092,9505,7650,8754,8338,110,9509,9090,8091,5468,6524,7741,7745,985,9347,3681,7369,5175,8566,7223,5538,9353,9527,461,4103,5387,8897,7708,9449,7740,9479,9536,112,7738,3624,6965,7137,7139,9489,6956,6760,7160,6879,5896,5899,1111,7692,6150,6116,1037,9557,4824,633,
1835,9552,7152,8906,1196,7155,3733,472,9564,6759,9194,1659,9174,616,9561,6281,613,5154,9578,288,4871,9572,1720,9553,9139,390,7169,9548,6490,3725,7206,117,9350,5725,7081,5752,7429,9137,284,7105,7387,5620,7686,7444,8720,6051,2087,7503,6463,1750,9074,6637,7508,1854,9127,320,7406,1515,7401,6706,9131,9094,34,7128,9601,9625,7130,3698,7418,7186,4100,945,5168,5207,7762,7186,7178,9637,9624,9499,8951,4101,115,262,7750,7425,2612,9648,5770,7760,9130,7086,6370,7764,7405,7433,7435,9363,9654,7190,6709,9479,6835,
9143,5121,6858,5638,7690,6464,9616,6466,9669,4594,5462,328,7492,904,7446,8205,2575,9179,3089,9089,9495,9393,732,9498,3644,6568,348,4793,4245,7465,4580,104,4801,293,2574,4341,293,5267,9428,4453,7471,7915,3851,994,6479,569,6481,3681,3856,4877,7499,4795,8527,6402,9576,5492,4523,554,4882,4306,4945,9238,6844,9099,4445,9290,352,4449,770,853,7402,7330,7231,9708,6861,7510,9556,9565,5652,5817,4851,9439,6780,6611,8370,812,6490,3602,9489,9684,4630,1833,9742,5650,9744,6762,9720,7853,8418,453,4246,1716,4867,7890,
6052,7233,4858,7581,5870,437,803,7690,3613,341,802,854,7553,1586,9141,370,1702,6862,617,9598,421,7759,829,7430,7764,7664,9085,7769,7261,8567,9145,7616,8990,8729,8268,8999,7490,9498,2276,4650,9504,7186,9274,625,5696,7958,9222,6804,5701,9224,2919,6974,6817,6814,9229,5711,5709,9232,5712,6826,9709,2166,8989,8840,9209,109,9211,5692,9213,1632,65,7527,577,2206,9761,1722,9539,7716,277,551,9198,5149,612,3584,9385,4630,2906,1696,9614,5437,314,1678,6806,3975,727,3116,727,2491,5146,5153,1493,9402,6914,6919,959,
6918,9418,6920,1321,9415,9396,1321,6924,9409,4990,496,5152,8948,4494,6867,2677,79,4595,7121,7470,9239,9740,9579,3584,9887,8847,1135,9236,9023,9108,4257,9165,7080,5195,9378,5132,9628,9643,7095,7676,9638,9625,292,9849,116,7108,9651,3677,9557,7405,4355,7118,9668,6667,9450,4900,7754,1096,5128,7504,84,6603,2016,9481,3597,6656,9068,121,9485,6644,9437,892,9937,1043,7155,3648,5339,743,9060,1393,6587,4355,72,7068,9955,9937,5006,7730,5350,551,8718,7449,6190,5674,5558,1737,858,354,9865,2656,629,694,9867,1335,
9950,770,9952,99,9060,4596,9098,4855,9937,4491,5682,9966,1691,6500,9459,9482,9342,9462,3467,9464,826,5E3,9489,938,8490,8292,6339,8353,6386,8495,6293,10003,8828,8764,5946,8483,5948,1136,5878,8366,1184,4369,4147,4621,8426,8852,1179,4515,8009,4618,1230,4140,8451,4724,3922,8709,1048,8880,1053,8882,8201,9796,7666,9798,5375,8908,76,2E3,9489,4928,2673,8752,3212,3177,291,4668,10049,3061,114,3063,2506,4630,10056,2569,10027,8984,3244,10062,2893,291,2675,6868,8839,8537,2681,9286,108,6903,2686,498,116,109,9609,
8949,9328,10067,3178,2003,10059,9774,2187,7587,102,906,9963,8922,10067,7455,2628,4930,1437,9890,625,2891,2673,4867,10088,9478,9451,9084,10042,9486,288,1849,6694,9673,9929,9272,7444,6847,9670,7204,9672,7700,1774,6467,3876,870,9703,4307,262,4726,6997,9165,4503,9176,1874,9081,3292,1393,9692,7462,4794,4796,7466,9698,7468,9701,5290,3847,329,2571,9855,9905,32,4530,4578,1862,9711,616,9713,7706,9715,1723,9726,2393,9893,5052,3995,10132,9246,5044,9191,1111,6878,9566,9195,1575,9271,10153,9388,3389,9704,262,
3583,4505,4993,9705,1680,9707,9751,9153,10158,1847,1470,9156,7693,4388,700,10070,9891,9893,9559,10190,9247,2027,9177,8748,1553,9413,9873,9877,9875,5288,1607,10211,6921,9185,6925,2046,9788,913,9582,34,8582,9292,5348,5531,9717,8636,296,8625,9723,2588,9097,10187,1664,10189,8792,6373,368,6337,3445,9781,9528,9749,7337,9240,10134,9248,4104,9251,477,10178,4757,5628,7265,9685,9678,7493,9681,7448,2575,10128,9727,9895,9729,10247,6356,3842,262,10152,4171,10155,5256,9242,8390,9903,10116,7239,9908,6697,365,7433,
7400,9737,7761,9642,3644,5051,354,7090,9136,10286,9655,9913,9627,10293,9663,7094,9630,9651,6422,9645,9636,10301,7088,279,10305,7445,9134,6705,10308,9640,10308,3748,9912,3644,9634,9646,7417,7677,9138,8449,10308,9792,107,9794,7192,9658,4008,9660,2221,9632,9521,9665,10115,1073,9925,5119,7119,672,9023,678,7126,9450,1608,5133,9435,1744,7245,5193,9529,7199,10224,5490,6540,7287,6580,4786,5301,8573,1123,7234,5285,9728,7272,4949,6373,9756,10153,9038,6268,9937,5534,6794,5579,9937,6766,9320,7326,9956,116,5529,
8028,8591,6500,7242,4473,7244,9011,3755,1873,9937,7555,9997,6642,5157,10117,7199,10381,7535,6473,9961,7695,3089,5585,558,5320,6580,7130,279,5285,6941,9151,5714,9971,575,9973,6787,906,5107,9978,5817,10373,9960,442,6765,10425,6588,6893,8678,10426,116,4496,10428,4355,9989,6615,7663,9066,9011,7373,9944,5188,7366,339,984,1405,9266,727,9326,8564,9489,7311,8158,6566,4757,115,663,313,6837,7283,9027,8592,9011,8594,9269,8596,8936,288,9542,9447,3774,5603,7176,256,10313,10316,7824,9650,10478,7650,10325,10327,
7411,9604,7197,9606,7199,7474,8685,7478,980,7480,3390,7482,7484,679,7486,110,7488,9677,5737,10259,7495,10261,7498,496,7500,9719,9125,9193,6879,5140,9609,9946,3635,9808,9610,7727,9811,9625,893,9809,8281,9100,5339,6657,670,9517,9687,9091,5986,9520,9913,1490,643,10530,10524,7810,10521,9913,9853,6596,10209,4564,708,10351,2590,498,8530,3244,10369,6201,1708,744,5840,50,54,4111,104,10558,52,937,1006,2989,8505,9588,9440,7388,7743,303,7245,9331,101,9333,10256,10398,5398,9918,455,9281,8590,4578,577,846,551,
575,10225,5498,9245,9730,3915,3764,10443,9892,85,328,2135,9734,9724,4676,9244,9739,10203,2105,5131,279,10443,9022,10278,9315,9998,323,8680,1393,7458,6659,10281,8881,2128,10394,9484,10613,3823,10280,10475,1380,7089,9135,9623,10294,3644,3739,10060,5986,9916,9913,10315,10297,7257,7751,873,10581,9921,10481,5617,9522,9441,7442,9077,10340,833,10342,5124,9932,1259,9934,5134,9988,6482,10442,10624,9465,9336,9540,10108,376,9936,10432,9994,9940,10395,10618,10444,4288,7746,9790,7748,3885,10312,997,6741,9662,
10641,7758,9600,10640,5732,9603,9005,7682,8611,9799,7444,2170,9501,9494,10539,9496,9511,7186,8115,3505,10538,10519,10540,10701,9625,2620,9833,8537,9835,9837,6757,8404,8283,6400,10028,8183,8877,8507,9508,9502,9518,8263,5814,10711,8352,8728,9734,2659,9152,7893,10723,10698,10706,10700,10533,9690,7094,7971,3836,7973,6166,4924,103,10102,4211,2572,8277,622,10229,8654,9328,8095,3405,8681,8888,8468,10719,8234,10497,402,99,121,7545,105,10285,9771,8363,6377,8781,6377,9124,5393,9532,10243,9489,10277,8653,5289,
812,6500,9533,383,10671,9483,6640,10663,9618,6517,9129,10636,10287,7438,10667,5593,10649,300,9667,434,9773,4471,6936,7004,7958,7010,6976,7012,110,7017,6986,10810,6968,7026,7022,6965,10815,10818,7045,6787,7030,7039,7030,10813,6978,7036,7042,6987,7035,6951,7041,10822,10830,7018,4370,5585,9985,8860,5492,104,7068,10839,5589,9990,10844,7696,1531,9365,397,2221,10516,570,5792,9904,4730,3895,4830,5763,4019,4093,3349,10859,4160,4734,4839,3489,2843,10184,4992,3995,4276,10094,8510,4829,4095,4091,10866,3502,
4732,10878,4833,7489,1981,8863,75,101,121,800,7778,7005,6891,9413,6806,10893,5692,5526,1604,8701,10197,3770,3772,9448,1409,10873,10903,3774,4114,4165,4606,2588,4768,432,10072,4573,4148,90,495,109,9647,8444,4279,10864,4217,4838,10880,10924,4738,3355,10749,2843,6658,6200,6930,10876,9523,10861,3900,10863,10877,10811,4097,10930,4750,9013,405,7738,9738,10366,7497,5290,4148,886,10202,4746,4152,10928,4837,4015,4835,10865,10883,7047,9959,6226,5792,9883,5861,4090,10942,10676,4834,10940,10937,10943,4162,6866,
6876,10173,7163,703,5425,3596,10234,8617,7298,4578,4148,3892,9911,8481,10858,10941,10938,4219,10974,6196,10995,4283,461,6840,3910,10186,4593,3803,4357,4253,629,9841,10747,6802,1664,1960,9048,670,405,9661,8757,1470,3708,11017,8759,11021,3725,9190,5103,9216,3836,7264,6838,1930,4991,4602,5055,1623,10768,9615,3681,9942,4413,831,1160,10147,6373,7381,109,10985,8770,7943,7674,100,11048,10265,10950,10782,1686,8593,9366,1599,11058,10851,5716,10404,4630,6875,817,3581,11040,5026,8390,716,4778,10911,1430,6187,
10914,10567,335,9724,655,108,72,70,79,86,9871,9390,5697,9874,10216,9416,9931,9884,4600,9361,9359,10661,7556,5817,9697,5295,496,9815,8840,5335,103,95,4457,997,7580,287,11106,95,10893,1860,550,4304,10164,10840,10367,5237,11037,11068,10946,11070,11049,383,786,1233,647,11053,10245,10591,10267,768,268,11081,86,11084,11086,5667,5265,11124,4241,6857,4467,4410,8390,621,623,7542,4907,10767,7050,7288,431,1635,1006,9405,91,10746,625,4926,1904,10049,4802,2428,10898,354,287,11157,7135,4370,11129,6801,10887,121,
848,5739,10531,3035,121,275,4928,674,4762,6607,3948,11132,9730,4148,4081,11011,71,11183,1051,429,516,10013,10957,10994,10976,10996,10970,10999,10867,894,10855,315,10934,8055,10936,10998,11203,4735,10997,10860,11215,11207,10854,5929,6466,10968,10922,4011,10881,10971,10879,4284,11202,10972,10884,6581,120,97,11118,9704,11149,11125,11147,4414,11127,9389,279,9161,5927,9159,323,11246,10988,11209,121,8600,10969,11227,11206,10927,11231,11229,10931,4005,348,7408,11225,11205,11219,11258,10975,11232,4079,3011,
10146,378,11255,10958,10882,10926,11230,11269,11260,10909,4250,11074,984,11190,11135,9620,11102,10389,9182,7450,3946,11108,9262,11110,3596,11112,11293,11115,4224,11261,4149,3604,6225,10992,11201,11280,10963,10961,10925,4739,11208,4080,3647,11011,5376,2033,4010,11266,11270,11310,10929,10977,10868,3834,3467,6022,11212,10993,11308,11278,11322,10959,10944,11325,110,4726,10873,11275,11259,11309,11217,10962,11278,498,7391,115,11190,7237,10266,9897,7101,829,11154,7064,7288,757,11160,1210,95,11093,10900,
11221,2843,10918,2027,10304,11265,11256,11267,11279,11214,11270,3475,4272,2572,6658,11264,11306,4215,11276,11228,11342,11320,11281,11336,11193,625,3854,6801,11340,11331,10960,11343,11311,11335,11313,10932,3467,11254,11369,11382,11257,11372,11218,11374,678,3681,4478,6711,4824,3033,11388,4251,4164,11283,4358,11392,11373,11229,11333,11277,11312,3716,11028,7779,436,9974,6944,453,373,870,6840,873,1745,76,9113,367,925,5119,2571,11437,538,9319,5515,10246,11352,768,100,106,4250,294,3581,6859,11348,11119,
8390,103,11196,11185,277,11286,11448,104,11143,6482,11069,11241,11042,887,11044,9367,9789,9909,320,5102,119,5104,10630,10308,10617,9464,10291,10631,10298,7650,10289,10310,8605,10688,8607,9925,1597,6996,10646,3793,9353,541,7131,10794,10632,7094,4008,10599,643,10601,629,10645,11491,10322,7886,11051,9785,11499,9631,10321,9132,6656,6859,11484,10308,11051,729,5033,10680,11496,7490,10598,262,11506,2588,4892,10307,11496,10486,1814,10338,9927,1595,3467,1912,672,291,3584,643,837,91,3511,335,645,9075,288,5717,
302,11549,517,7171,296,6614,1155,11555,2983,11550,11558,8044,410,11556,595,11565,9626,9959,125,93,7412,3944,3493,7124,11046,11368,9450,10617,4819,1255,101,10326,833,11544,5118,278,11547,11568,11551,616,7268,3126,11573,10343,10656,7432,666,11379,10666,10458,7719,11273,339,7512,9883,7524,9438,10654,1040,10433,7139,10125,5573,11588,4355,11590,284,11548,11563,11557,11552,5413,3876,301,11574,1312,11583,10657,3037,1065,11602,1255,1755,6509,11587,7139,11546,11621,11592,11570,11554,287,11643,11625,11560,
11567,11623,11569,11625,5588,11562,3059,11564,11625,10842,2997,11628,11636,9614,4881,984,6859,11543,11640,11620,271,11622,11656,11624,11594,6509,11597,10606,5051,11534,11581,11327,11305,10666,6588,9699,4149,11638,7177,4355,821,7469,372,115,58,123,120,271,1320,121,11697,528,125,47,11695,58,1954,11699,48,125,1815,11618,11641,11670,11647,616,11645,2507,11657,11594,5590,11676,4553,3510,11128,10436,9348,11687,10476,11689,644,837,11692,11694,5585,11700,5042,4492,11735,520,11702,123,11734,1954,11560,11705,
11709,3619,11545,11669,32,11671,2498,11718,376,2878,11655,11752,11673,376,1775,11629,2949,282,345,4782,9358,9930,348,11401,9450,11046,10921,285,9840,10243,9194,9847,4861,720,10705,10083,9688,721,10740,7650,9686,10699,11782,10534,3644,739,741,7527,10556,6747,11358,9221,6808,627,760,870,11315,10534,11787,10532,9689,9512,7182,1506,51,11803,10737,11788,11784,7182,10149,9636,11250,10375,4573,786,10635,10456,2524,11536,7389,411,10336,11616,6497,9466,5623,10065,8441,9939,10430,8861,5471,9955,3761,5582,10753,
5870,7293,5664,10965,6672,9990,1393,118,11846,8682,4146,6462,10648,10570,10444,8621,10474,1883,9135,10178,10333,7410,7758,11480,11535,11855,9605,7771,5398,2299,10757,2211,9778,9370,3711,355,1740,9525,7706,10662,10396,9945,11831,10666,9439,9480,5434,10788,6657,10790,3624,11016,10336,10791,11425,7399,455,10769,11501,11486,9649,2119,7830,10684,7424,8303,10324,10687,11906,7104,9657,7432,10330,9734,9922,6710,10123,9617,10801,561,7538,11078,3067,9872,6542,9750,10238,550,11077,9851,5870,7491,10504,7447,
9120,10220,9560,9845,1838,798,11851,4578,454,361,9474,10603,11055,895,1632,1745,9841,9758,5573,11885,5493,2877,1393,686,11954,984,5839,11795,8178,11160,3109,10075,1695,1604,870,11593,9719,4503,11248,294,11250,8985,431,578,9859,6914,9861,7770,8840,9864,10419,539,9158,1558,294,11963,5697,759,114,2684,966,631,633,11996,4902,1603,10545,7005,9874,11160,11090,9879,4898,11092,9883,12001,4750,10803,2400,7071,9164,10170,1981,2571,7076,10278,11948,9907,3747,10678,256,11488,11521,9912,7431,9914,10484,7425,10643,
551,11509,11911,7763,7192,11825,10800,5117,9926,9078,10653,10116,11598,606,9933,11633,10606,689,9932,3580,11098,6596,11666,9539,3677,10787,9996,3585,11666,383,5547,9847,9200,9107,4757,9303,10253,8537,10808,6948,7031,7015,10834,10814,7025,10820,10942,10816,12080,7021,10821,7011,10827,12087,9822,12078,10827,7033,7038,10942,7043,12090,10832,7044,10828,9235,9842,4684,6436,10005,7582,619,11967,578,11969,354,6991,10955,8856,10783,1574,12026,10628,11679,12038,9602,11913,6581,9548,12030,12122,292,12053,7434,
10793,11863,12031,10639,12120,9656,10328,11762,12128,11533,9641,10294,10690,9479,7742,7770,10651,1883,4510,6051,1065,7129,9894,10666,12127,11590,12049,335,6588,12058,11688,116,11690,11731,5374,6693,10981,48,9349,3712,9847,3717,9474,913,7149,10982,9357,11096,1409,12061,7524,1553,11245,4998,4539,11059,9364,9714,9366,10568,336,11876,3729,9372,7390,8895,5377,9537,9617,12170,8315,1409,10471,5389,5381,8303,9942,8390,11934,9680,10505,12017,10592,2762,11938,569,12202,7509,1886,8303,5381,1111,12216,1854,12204,
731,12214,616,12222,3672,7510,2077,1012,12211,11135,10263,9098,11350,11949,6556,1974,12226,5386,8902,12197,12229,12218,8818,998,12220,12201,12243,9543,12203,3720,11079,1080,7690,12228,315,4103,9783,324,8903,3959,1873,859,684,847,11894,11919,9904,10516,3677,3583,3709,11895,10392,10670,9939,11890,10443,9489,290,8940,9967,452,10414,6787,10410,10418,1934,9976,480,4877,9988,10987,9987,10432,9958,11660,2400,10381,9962,10107,11887,12179,6656,12281,11880,3689,9489,7474,11443,3596,9299,1680,5480,1683,10160,
3689,3708,12313,1430,870,6578,1173,111,11444,1845,4527,12317,5288,12319,1758,11436,12327,3596,1209,1554,369,10082,11464,7068,77,10635,8531,932,8057,11649,9296,4573,11659,7069,2400,11033,10186,9594,767,12357,738,10243,9778,6482,9527,1861,11943,8985,7689,7204,9547,3584,870,259,11451,1207,3581,7690,65,11450,11452,7392,7706,10964,2997,2267,10139,11923,1912,5567,495,9061,4755,8579,5906,9766,1786,9769,10781,6874,10058,450,12358,12401,383,8297,2685,12369,10336,12261,9140,9353,698,700,9376,10352,5398,10119,
4594,12362,12270,315,11829,11301,5098,11119,10130,82,10169,9730,555,10249,10136,9170,10138,5264,9013,9694,7464,4797,9697,11685,11472,4824,9196,10178,11819,5999,3842,9636,10271,10462,10180,6581,10269,3877,12014,9386,7052,12070,12425,10166,10586,966,12428,11135,11066,10244,2087,10174,9745,3700,11848,2813,6800,11104,8537,9818,9223,3979,9228,2916,9823,12480,6824,9826,6821,5710,9829,5181,6167,10196,4342,12366,3244,12235,2159,4608,4601,10186,12464,11448,9133,7690,10195,6605,6892,6887,5520,9471,10874,5149,
12466,10199,4169,10201,11842,2575,12430,10205,10055,11926,12004,10211,12006,10215,12008,6922,12010,4901,6758,10292,6863,11940,9567,10223,5624,7304,10380,10228,11973,2460,10600,10233,11457,10365,10133,288,10240,4607,10242,7361,10949,12546,7200,10249,9250,6389,9253,12386,7264,7539,4757,12208,847,10260,51,8390,12495,12500,10605,6933,12493,11834,1904,7070,10275,11243,12019,6729,10611,9740,10626,7397,10283,11899,11485,10685,10208,11489,12531,11901,12586,798,1794,11527,726,1802,10308,10318,11580,12134,
9913,11678,12140,11902,4990,6703,11866,11510,9639,2178,11905,12590,11907,3747,12130,11517,9625,10318,11772,12600,3644,7426,12594,7187,9793,12125,12136,11897,328,10331,11917,10335,12420,10337,12043,10339,9928,3222,12048,12151,10658,3731,774,7150,9489,12466,3015,12174,7151,1514,2682,10194,12166,7165,9190,774,9949,817,12647,12653,6879,12651,2128,12648,12654,11473,11887,10114,11409,5393,11016,12185,10578,3715,7474,12358,12254,11398,6058,9181,4906,12327,107,511,7754,11019,11307,11420,11384,11370,11407,
9658,11883,5377,11426,5697,2840,1628,5747,9878,612,4597,95,11106,2905,292,3843,11113,5052,11114,9939,457,121,4395,2922,1006,104,3846,281,1929,3844,102,95,11477,11271,12679,7089,5147,1163,906,829,12684,5981,4088,10923,11341,11332,11395,11323,4289,11412,2572,11366,2449,12611,10857,12687,11406,11421,12738,11334,11324,12678,110,12743,12619,12686,11381,12736,11394,11385,10963,3851,4728,10907,12172,1037,10906,114,9456,12581,11540,12693,12029,12608,10334,10797,10569,11869,12146,371,11579,11905,383,11771,
2589,12050,7124,10896,9900,12729,12682,12732,12788,6653,4782,12730,12683,311,12049,11951,12401,11859,8614,12610,12603,12591,8424,689,11909,9653,12612,11912,12040,7733,7173,3712,11921,11832,8487,10254,11923,4527,7284,10759,5826,8756,4662,8506,114,8891,8981,8932,8525,7598,10725,12247,1012,8763,4238,2942,1840,10035,10207,8449,8469,2158,12831,8734,6361,2822,6348,5134,68,5135,282,5539,5652,9847,11051,1017,624,729,12315,10236,9896,9751,455,9524,3747,8750,2172,9937,4527,7356,5031,291,328,2267,74,111,98,
12864,319,8585,7326,108,488,3583,555,414,431,9053,4453,3305,4578,1547,575,12432,7130,9172,12015,12888,6676,414,7055,12893,1680,6085,7540,7416,11513,7055,12880,12882,12874,11015,120,5325,12284,9992,9479,12857,9762,12194,1770,11895,12803,421,12618,10320,10637,10317,12327,9635,12611,11863,9664,12777,9329,7706,7738,12818,3693,1711,12236,7336,11134,11448,2134,12206,12576,7095,10182,11337,12427,12552,12018,3716,670,12883,11621,5481,10038,10957,9443,9453,1783,668,670,287,12967,7707,12223,12970,32,7515,12195,
6691,3708,11233,1965,12961,11670,12963,6480,10858,12966,7516,10336,1786,12971,12989,12633,12991,12976,1750,12972,6856,1786,11233,12495,4247,11416,709,11284,11155,4346,10237,12114,2066,10575,6984,5732,11133,10604,11929,12424,11238,12545,12958,608,299,5154,9070,12808,278,12066,1409,13025,12453,260,10270,12456,6780,10273,12494,12460,4892,12462,10235,319,13009,11121,1964,12542,9725,13019,11054,12553,13002,12955,11440,104,11390,4042,8390,2467,12983,11750,12985,9712,12987,5597,12993,12941,8898,7482,32,
12998,13067,6759,287,12977,12926,12994,1716,11233,12563,7494,11936,12952,3450,1853,12951,8668,13018,10129,12497,10185,10168,12957,9730,11816,10151,13034,10153,13036,12572,2740,3708,13059,12331,10620,11381,12988,12978,10336,3708,12992,13107,12633,13109,12996,1777,13075,13066,1774,12980,12372,12256,12330,13061,10159,13063,7698,13065,9446,9455,1080,13110,13116,13128,1774,4103,13073,12997,13127,9454,13134,1080,4225,1632,12306,6596,9344,9334,9489,10580,9850,2400,10585,5053,9034,12398,4341,10593,1554,10595,
9516,11529,13046,8921,13044,11677,10594,10663,10610,10781,2187,11482,10614,11873,13151,10663,7690,13144,10623,12693,5561,8602,12032,12623,13149,9920,12615,12932,10796,11887,12144,7116,12044,10652,1641,11612,7125,12054,7697,9444,13138,12968,5380,12200,12673,7363,12939,13106,13132,13139,8904,6740,7519,335,9266,4523,11896,9620,6658,11481,7433,11769,12620,7094,10483,12623,11150,4905,11910,12812,11511,12628,101,11602,13229,5210,12143,6830,7442,10853,1170,3064,11836,5492,13240,431,6897,4573,13244,12754,
12386,6337,6889,3244,12548,2588,13242,9199,12104,110,13246,4113,5134,2797,8277,512,11896,8604,12589,12937,13188,7194,9006,9798,12943,9490,2689,8635,2211,3313,7622,10551,8352,8164,8805,8957,9277,4530,8961,5072,3811,8965,8078,8968,8328,2319,13277,3575,2300,8879,8310,13104,6148,6430,12829,3285,2191,8983,12820,3244,3328,3047,8127,8796,7966,3570,6404,2175,8440,8861,3322,8242,3554,3573,8706,9722,2954,2049,8006,3257,5909,2758,4551,8240,3206,13311,8657,13328,2408,3526,12846,2453,7920,10019,12231,3363,8209,
12844,13026,2741,5868,10032,3224,109,8855,13164,13348,13298,8684,4444,8686,8287,8761,13356,2980,7921,8972,5870,13310,13306,7729,8469,1965,8777,9901,2349,2448,3526,8221,12920,8125,13315,2092,2579,3191,4264,8234,3548,6363,6010,7325,4657,2532,13335,13370,10761,5432,3160,8398,13347,8626,2207,6449,11328,4618,2577,5971,11924,3245,3122,6434,8205,13360,5947,6280,3082,3558,2976,13337,3189,13382,112,13331,13318,13325,2121,8773,13390,4757,2577,2201,8006,3263,3155,6928,13281,4860,10053,114,8469,3201,3543,7988,
10770,3060,10063,114,10051,2285,2801,8886,2292,13321,13353,13351,3429,13357,12843,4809,6384,5840,7781,5816,1312,8619,9355,12191,2592,2469,8873,8234,13432,3432,8415,8835,8129,13309,1996,8752,8738,8057,2577,2154,8412,3284,13326,6120,13454,2525,13450,13297,3531,3155,5853,8892,3512,7902,13343,12837,13345,10024,13494,2668,13393,9001,2333,9003,8234,3257,3526,8394,7954,2810,8318,10061,3145,6379,13395,13367,2756,2455,13497,13415,2070,12159,7617,2887,7572,9970,9835,3419,3396,3526,8101,8222,10066,2408,13340,
13419,5803,2455,4668,13405,276,13541,1996,12344,5254,7895,2640,1996,6310,8265,8066,5688,9206,9838,112,8337,13381,13539,8261,13487,973,13437,10105,3181,12345,13476,3431,2510,13442,9730,13329,13426,7299,6562,2516,6425,13537,2364,13279,8087,4956,8517,5986,8519,8303,2394,2803,13439,13334,13369,13504,4487,13379,1379,5606,3336,2893,3033,12442,3153,3364,3561,8944,2583,3202,13513,13391,13376,2797,13371,2604,3781,7986,13591,2706,12851,13399,10710,9802,9834,13554,6749,10715,13344,3552,7920,13604,2211,13469,
8973,8532,4989,13602,8402,13501,3312,2420,6187,13621,8537,9150,9969,9806,13415,13607,2109,13385,5149,13368,648,8788,4564,13437,12513,11291,619,10074,2683,2685,13558,13512,13500,12832,8449,13456,13410,4383,8711,8311,8200,13303,13587,2821,294,8161,8801,987,13283,8069,6075,8958,8544,8809,8962,8811,8964,8549,5077,8176,8843,13662,2689,5811,13258,6385,4704,10009,5843,2577,2415,13323,13605,8375,2689,13612,3477,8838,13657,8841,2775,8148,13294,3564,13441,5029,11833,13319,3557,13489,3530,13569,2600,13517,2343,
13491,2163,13447,13375,2598,13716,6207,10025,13363,3214,13649,5870,3257,13296,4564,13392,3070,8217,13399,10953,2892,13233,12746,12758,11393,10862,12761,11345,13626,3518,13354,10951,6373,2861,13358,1242,10037,12986,13672,13362,13408,8250,13483,372,8679,13173,5848,8725,9774,6784,10731,8997,13644,10733,13563,2673,13544,3225,3265,13548,13722,3251,2510,12474,12695,9816,11798,12477,9218,9820,5704,12482,9821,6601,9827,9825,12488,13780,13484,3241,8232,13407,13329,13398,8865,8574,13364,13422,13324,13386,3068,
13757,11056,3537,13648,13332,13816,3525,13732,3209,9298,3517,2975,2969,13384,13822,13396,13320,8231,8243,13399,13542,13421,13737,13726,3371,7835,8291,13775,3404,8695,7796,8697,8384,3472,12490,13530,3518,3565,13827,2400,8798,13314,2493,6233,13374,8452,3557,3329,2165,8238,13506,5149,13508,3056,13608,13428,13545,7055,13631,7923,13616,3226,13709,7564,13712,13692,5653,689,10092,11500,8840,10096,32,2565,9040,865,10101,12491,13471,13570,8237,2477,8477,13869,13742,3093,8365,13840,1135,1965,12475,8352,11967,
477,2469,3118,3114,3116,1625,13913,7488,3512,10004,13845,5937,10008,7833,13646,13825,8864,8823,3362,3396,13865,8212,9002,13475,4765,13515,13761,13411,5785,8687,3132,13871,13664,12849,13705,13349,7920,13615,13834,6219,2015,13769,2695,13342,13905,1379,13953,8503,13521,13408,13546,13876,10052,2673,4762,10106,13859,13276,3042,11211,13404,13874,7056,13786,13514,13538,3942,13831,13423,13823,3557,13509,8460,13511,2689,13647,6111,13984,2741,13931,3095,8868,13828,2954,13955,13863,2179,13339,13725,13906,13675,
8504,7940,8089,8975,13585,8977,11903,3557,13330,13995,2583,13590,13824,2469,13493,13665,13805,3558,5961,2796,2469,13785,7939,13490,3214,13703,13451,10031,13366,6003,3277,9260,290,9333,11071,13902,13879,13676,13435,8922,13680,8956,8070,8543,10154,7634,8810,8172,8076,7866,8814,8079,8816,6293,10085,3062,13566,10089,14E3,13708,12834,9770,11812,7604,13275,13946,8503,13783,3519,8942,13959,13809,6124,13769,14073,13420,10055,14037,13614,8523,14014,3532,4569,13474,13534,13935,2448,13581,8325,5697,8327,8553,
13498,13930,13393,8920,12105,12285,8924,7842,13849,4193,8929,8387,8931,14094,3518,13373,13993,13723,2804,13887,11448,13651,14038,8251,13637,13415,13640,13552,9803,13777,9805,13804,14066,13305,3093,14097,13921,8294,8697,8382,6161,13850,7847,13852,13304,14001,13582,8974,7647,8976,8142,7650,13746,2009,13221,12757,12735,13751,10939,13753,11424,13372,8846,14028,8260,2027,13629,14025,14070,6296,13378,9991,13380,3195,13926,14164,14021,14083,3197,13983,13549,2635,14160,8319,14082,3155,8980,13944,14138,13425,
13516,13718,5492,14076,13560,3554,14011,13945,13829,3560,13978,13815,13650,13727,13897,13991,8943,13988,3166,3572,3173,14190,13455,3273,13487,1632,3943,11038,7706,11896,13184,12037,13234,192,12776,11887,6695,13274,431,9400,9614,10615,2400,10543,6907,4942,1430,11977,8418,7139,9942,14230,3792,1632,9557,12859,1529,7690,7692,10514,12409,10798,11856,461,9936,98,661,8721,6517,12117,13267,12585,11907,12273,991,11945,10694,7199,2158,14247,14080,13399,2874,6663,13618,13811,13929,100,14247,12848,12840,8155,
6759,13740,10402,12882,7790,8430,13734,13770,14278,8524,8324,8914,14091,8916,8969,14265,14279,8454,13992,12301,1919,115,8377,12069,8537,14100,14133,7798,8699,8930,12491,290,1705,3042,4986,13609,998,14247,8660,13169,1135,14290,7877,8780,13999,2873,14295,8255,8416,13934,6254,14295,8514,4987,1342,13584,3486,14007,10423,14283,2703,14272,12828,14333,115,143,13524,10807,13526,276,10732,10415,13529,6150,14295,14313,3517,14312,12827,6930,7479,9286,10014,5056,12294,14334,8126,14163,13313,5978,14326,8933,12835,
11181,14338,8535,9764,13282,8954,8165,3294,13285,8808,8960,7863,14049,8812,14051,13690,8551,13883,13755,14351,13299,13670,13301,8049,14347,12882,12839,4087,14354,8765,13853,14271,8971,12733,14141,8740,14143,8742,8978,14348,8783,7204,8785,14261,1919,14297,8692,8922,14300,7843,8698,8300,11363,14265,13769,14265,7999,13867,14324,5492,14422,14071,14205,14338,8284,13937,7448,930,14395,14356,11233,14410,98,8191,8661,8678,12882,14440,14314,13730,1012,14398,14039,9721,10006,14042,8166,14044,13683,14046,8545,
13686,14379,13688,8813,14382,8815,14384,446,14295,3421,9960,14359,8254,13843,9201,7779,14415,14102,7845,13851,8302,3591,14307,13402,11682,4588,14295,7851,2535,8737,8088,7646,14402,14006,14144,7182,11872,11958,14294,12882,7956,13710,14092,8817,3661,9977,7204,14247,14249,2421,6759,14358,115,14431,3123,13579,14447,14411,8834,8676,14425,13507,1256,14262,13312,8939,14165,14320,14443,14280,14118,8626,14521,14292,14200,14496,14510,8489,14387,8047,8712,13302,13766,14265,13653,14277,14534,14335,8952,5687,
8803,8540,14453,13682,13286,14047,14458,5073,14050,8174,14462,14053,14464,14502,9615,6449,13970,14426,14484,14317,6296,13533,13595,2966,14311,1919,14498,13881,3077,14560,14282,800,13641,13909,8178,11171,5511,3976,626,3450,11879,335,14505,686,648,558,12589,10853,9608,10510,6500,5746,14258,11893,5494,327,1706,7734,9016,12415,3715,538,14602,2033,2591,9357,14610,3860,11841,4471,4395,1725,9254,10153,871,1730,11160,10808,1738,14243,9369,14591,14605,10571,377,392,12168,409,12170,12411,9359,9754,12176,3585,
4478,3602,12180,3727,12191,7174,9457,11923,10622,10789,12693,9489,5585,9477,12435,12560,5361,648,9470,14225,2997,14655,11847,555,14663,4630,12918,14659,12766,4573,122,14666,4578,11253,14669,12304,7194,14650,11891,14652,13198,13070,12217,9335,7262,3677,13207,3669,12990,13211,12534,9785,9489,13911,2803,11811,11781,11805,11783,11807,6721,8667,11804,12666,7194,13190,5164,274,1916,14630,10664,7715,5532,984,6352,5330,6543,5332,10361,6150,11169,14715,454,5371,9293,7326,11595,629,11188,6609,11927,11447,12569,
871,1018,65,552,450,9107,12023,13021,14618,9197,9873,14623,6941,454,5050,1730,12530,9551,9573,9587,474,5353,6352,5239,11823,4573,10363,1678,13020,9730,9234,10139,14756,14724,12536,10583,10254,5353,5225,862,5296,10357,4453,7289,102,5233,6545,2942,9813,11012,5633,5531,14722,14729,7329,14732,12948,14734,10553,13253,5353,5294,14774,5272,14717,5276,4688,10360,5288,6231,14787,110,6352,13656,12233,11448,11106,5337,4251,5339,278,4782,14776,4784,10359,5249,14273,10362,14767,413,14799,14819,14781,3368,14714,
629,14757,13974,10370,7279,5353,5269,14797,566,14825,5277,14779,8572,14803,2610,14829,14806,13868,9039,5353,7157,5341,2971,5343,10380,14805,10374,10384,4588,14805,10383,10379,14858,3832,5527,10378,7341,4757,1830,858,14865,5430,9424,4578,14868,575,14860,6686,9314,14794,5363,2677,8746,5309,5241,5311,9425,1018,14730,6869,13092,9240,12771,7253,6520,5199,12623,5360,7255,12775,5733,3677,10387,1696,14711,13191,12636,371,12158,105,6583,2083,6800,9079,12161,11730,8041,1342,2993,9857,9884,3580,6884,6691,12422,
2623,10853,11300,13249,3205,5434,13256,13396,11838,12301,11840,553,6476,10405,11064,6043,12571,5350,12296,11824,11868,5595,10849,12633,8900,14945,9442,11615,12927,9597,11475,10282,11898,9622,10308,10296,13222,11487,12596,12623,12598,12936,12616,9913,10477,14899,12933,9645,12756,13269,7751,10480,14970,13223,13228,12131,12122,9620,12630,11867,12632,13117,11920,10488,5398,11850,12300,4420,9675,3876,12419,14986,9674,11241,6859,10502,9679,12564,12210,12952,14927,14931,13877,14933,9685,10518,14698,9519,
11814,3164,12559,4792,811,9695,12439,4799,10145,12706,7469,13443,13087,10264,6780,13043,13758,498,14941,14426,12539,12836,6933,14040,13470,13162,11508,12544,13049,12958,14793,4573,11844,4028,14943,6095,14032,9733,11531,280,11900,14741,9730,9758,12589,10221,12533,14721,3832,9748,10153,11928,13010,8554,12166,11022,14949,14985,3689,15068,12642,11067,12672,11870,3715,4825,10856,10935,11330,12688,12737,14153,11397,3808,11240,121,14,10948,14790,13016,15065,11336,4006,11224,11380,14150,15082,12760,12690,
11386,2465,11975,3765,12183,6274,7544,10891,14621,11796,10213,9183,348,11361,9883,11363,10953,12152,14149,11226,11403,11371,11422,11383,13754,335,4144,11463,14734,4825,15095,11200,13750,15098,13752,15100,12762,12587,4894,12525,9407,9882,12529,12763,10979,10905,9191,10945,11145,11041,4481,12952,4008,1511,9614,1049,14784,9109,11191,3033,10990,12119,15119,15084,14152,15136,15125,12547,15087,3941,262,88,12956,13086,10171,10902,12769,10904,2276,12768,12770,12025,14955,10628,10290,12607,14961,11808,9353,
11495,14977,7650,12171,11515,12631,12939,13190,11538,12045,6530,12152,12150,9438,15131,11584,11586,1641,11711,11749,11751,3436,11753,11559,11675,11761,7716,12602,10347,335,15172,5722,8616,9076,13192,7082,12593,10345,14963,15207,11668,3976,11642,6733,15212,6781,9734,1559,11597,7387,15221,3427,13274,14811,14731,13015,12238,7074,12020,67,6782,14890,12580,12309,12334,670,12322,11830,10665,34,14445,1453,12675,3723,11930,11011,1393,10758,4757,5045,2676,10915,13017,12041,11857,6482,83,645,112,7130,14712,
8567,14728,9774,9360,12063,11675,12225,9759,12532,14753,10175,12189,14707,13213,7245,5395,10514,9489,11786,14064,15012,14701,14465,103,13102,13123,5945,2128,755,3794,740,10102,2846,15309,12881,1878,3008,14627,7195,14245,9787,15290,1514,15297,9847,553,15304,5861,755,957,11051,44,15310,15316,44,4795,259,673,44,12934,1130,115,103,111,15332,15315,764,3451,15333,15347,50,694,10811,629,260,13152,3348,15329,7752,9113,15345,15311,490,15336,100,15338,15340,945,15343,15361,15316,3852,15370,15350,15352,15339,
3405,15356,5462,15010,1037,9810,10708,9913,3648,10889,14912,12952,14765,2400,15043,8215,109,563,4795,453,367,342,10527,9124,14950,11826,34,15249,1878,729,12274,12414,13204,11608,7167,15407,12276,3667,68,82,6695,12859,345,11979,6636,11484,14234,4618,1670,9050,1997,15419,645,10577,10584,7055,76,15428,4510,11484,10847,7536,14221,15393,15427,5253,5629,11854,15070,1758,461,14683,12974,4577,12272,6500,15448,12245,1787,13212,10572,10465,9325,10467,9327,10806,10853,4240,13048,15245,12553,15464,2677,9115,
15316,6641,12445,12947,15091,13355,12953,4884,14763,11135,15468,625,15470,625,10597,2011,13162,10806,15054,14891,15401,14631,12681,6196,10453,6326,6252,14832,8223,6098,6351,6327,15498,8229,8467,8052,6347,13399,9514,15506,14806,15502,14024,14177,9515,14831,15513,9757,2840,8876,15500,15519,14081,9515,3163,7387,2854,461,14599,5748,9352,14906,715,2892,11530,111,11339,11639,11748,15231,11713,2087,13272,1898,11758,1657,7201,959,11721,871,2892,11542,15538,11589,15540,11750,11714,11754,11650,11672,11652,
11715,11661,10041,7768,15544,15076,1540,13655,13894,2883,13659,10076,13661,13444,10068,5013,4208,13966,7828,315,2037,2883,14295,496,8587,5842,7455,4208,10103,10057,5805,15049,3279,3734,15174,2465,15547,402,11530,3585,12543,15465,13572,13437,13729,6799,2673,15579,10061,13437,8469,13858,13773,10727,14580,8693,619,13643,6787,8269,5044,8330,14130,8538,6313,13555,13625,13781,10057,13965,14058,1393,10091,10093,4894,2892,10097,1909,10099,15269,10071,12491,555,1878,5265,293,7204,15543,8043,2643,1080,1430,
3629,743,10781,6290,110,12378,118,4510,11112,648,397,12012,1632,15649,7251,12117,9620,10284,14254,7757,1683,304,10330,3736,9558,10508,4795,15194,12623,14960,14216,11864,7106,12033,7412,4008,13233,14974,11055,15675,12629,15677,11100,15679,112,15190,15187,13045,11159,12623,9620,14148,15691,15674,9659,15695,474,7541,12796,12811,15706,5288,15693,7434,15709,8424,14966,13187,11351,569,15716,69,15718,14066,9648,15707,15676,10111,12624,15206,15187,15729,15694,15731,3915,2935,15691,15688,12629,11916,10646,
15735,15717,6660,15273,14259,5398,12842,1284,6364,14857,4855,10228,14109,6226,13452,13814,13704,15678,2071,4795,7878,13856,6334,13496,14429,446,15756,14308,5794,3089,11080,578,13962,1135,15751,1270,1786,14697,15381,10520,15383,8094,10228,14327,7909,14329,14005,14331,14492,15696,15763,112,14369,8778,10712,14372,13284,14454,14552,14457,13289,8173,8966,13691,8917,12324,431,15606,6447,10228,14233,15105,5927,4874,13260,6329,4874,15006,6618,8769,15596,11136,12161,578,15812,6222,13316,7653,15787,14365,14063,
15011,9562,5943,11992,7958,7832,13462,7497,14029,13407,494,6124,14072,7001,9015,5171,2087,13030,340,15697,14574,8146,13882,15809,2066,14450,13632,5042,8512,12541,15537,15825,7306,544,13510,15758,13835,14159,14194,15761,5968,14074,13562,15843,13950,13317,14195,5870,9835,14003,4377,7911,15770,15697,14276,4936,6449,5977,4630,15846,13420,15760,1493,8153,14268,1281,10012,15119,13940,15762,7500,14423,13899,14847,6268,10228,14120,8726,13525,5674,7619,13645,1684,8503,13769,15895,14188,2028,15769,752,15033,
14367,6030,15872,13453,14030,14315,10228,8672,8316,1819,786,10290,13228,11135,431,9263,13032,14806,15581,12745,11448,290,14481,6238,5978,10228,14180,14821,7301,8795,14523,9955,10228,14322,14085,14570,15813,15697,8938,14424,14086,7350,13717,13308,10916,4622,15882,2187,15921,2352,6229,15900,9763,15798,8055,8342,9190,15270,3578,2575,15854,15795,14336,5778,6210,8434,15958,15964,8704,13959,15975,5011,15772,9555,15951,11842,13479,15864,34,15391,14916,15863,8533,15888,15795,14393,14353,10493,32,755,10763,
1323,13693,13438,14319,15261,431,15777,2254,15038,263,15040,15024,973,14084,14517,15967,15032,15697,6408,6182,12565,3836,9285,7456,9716,16035,13636,14017,4579,15697,14263,15978,16030,4654,14532,15767,6124,14176,5954,605,13028,2276,15853,15952,16031,13933,16033,10762,15833,9101,11478,7433,8390,1670,15829,15901,14432,6133,13671,8713,13673,15928,14077,8218,15933,15992,12301,16061,14172,3534,15993,15795,8469,10354,16084,15994,15969,8500,6204,15771,15949,13862,5963,13316,15920,13452,15832,16047,14318,
14185,8234,1670,16024,4512,13969,15861,5870,9584,8138,13633,7911,1632,4700,4474,12363,10778,9847,15045,5323,7055,15426,11010,15271,5680,15047,13261,11918,7706,10785,15294,9011,12282,5638,14888,7957,15489,11448,1724,14744,6747,1738,14624,14748,8089,14750,4352,7216,4780,7218,13546,15996,2246,3581,11780,15783,10707,10739,15302,3235,11437,7675,14809,15129,97,6840,14270,2192,821,10461,5507,14733,13017,11079,294,12340,6620,2209,5542,12350,4618,12068,14413,8348,4995,7448,13214,11916,9214,625,16141,15157,
12135,15475,15029,9028,11158,868,7492,576,742,99,115,2267,1545,3864,16198,6549,12538,15697,12540,7006,2030,7690,7250,1294,11088,14621,12005,6806,15141,11093,1930,9874,6344,11766,2276,14679,10163,5045,613,9464,15600,9291,10355,7326,538,7334,13571,11135,759,103,1545,16240,16186,14186,13004,11007,4607,11349,15474,15246,6373,11072,10910,4358,848,608,4527,12885,4657,16253,7217,9814,7055,16158,15902,14394,16014,16016,9747,679,11233,13886,1978,14852,5321,12452,15660,859,686,8624,10525,7716,709,11037,13818,
2575,11960,778,5271,1621,9983,1878,643,16184,825,16251,8234,9857,11980,12124,6938,539,11160,11986,9866,4370,12881,1711,15305,12318,11020,10350,1747,6431,103,14825,7290,14843,3547,9939,16197,16169,16179,1981,12102,1430,7690,11952,16333,11116,4099,6722,5021,6068,12446,5492,10140,9014,13023,12358,9067,9013,13030,1621,14910,1329,13546,4584,16241,10988,2246,15781,10724,11181,10541,3644,4144,12357,1599,12403,11974,11990,15104,11552,9856,16340,14725,10226,7326,1670,78,455,10593,3665,115,14808,16304,5149,
119,575,1929,85,7527,3765,111,1600,11712,6883,10450,15460,10452,6548,13103,12964,771,10449,9268,12327,10468,3657,16153,4250,16269,14851,4656,14759,4618,293,16236,629,9464,16161,7502,15784,16164,9633,16340,10491,5862,287,16276,15061,16278,12324,3795,16348,9011,9574,8702,4523,16317,12332,16319,15458,4523,12112,12516,7274,12020,9237,15090,16258,11473,13181,13224,15191,15692,7433,1745,15725,15731,13226,11152,15713,14967,15028,10445,4008,16457,15695,9531,1597,14905,11539,421,16387,690,100,4700,1912,12313,
9609,292,14914,11691,1087,7384,114,51,11710,15230,11591,12468,318,575,16487,15234,15086,6337,15559,1037,669,728,120,52,1655,11972,296,9843,859,7056,16388,15548,15215,16448,11886,15204,335,16474,1929,6859,16478,12336,16480,11729,16483,16492,16486,16488,15539,16490,12173,16525,16494,15545,5406,6468,11756,15723,551,16508,16503,16495,16507,14909,87,16510,11661,12157,4355,16394,259,551,9474,16481,12162,4965,10500,287,14918,454,12012,11632,7124,11684,7468,14340,16553,14915,296,1753,11694,11696,3393,1342,
11699,16572,1420,15641,2677,271,571,12868,125,124,470,12573,11747,15554,16529,12767,16531,16504,11570,15282,16498,8055,3656,16557,3405,14919,12001,16495,16315,652,15215,6588,6684,12388,16340,14913,16554,8510,1320,16558,413,16600,6648,16528,15232,16530,16485,16532,15561,376,16593,15549,16298,15733,7716,16482,11731,930,1745,15716,15600,14585,2588,16597,435,16559,5985,401,16617,15541,15560,16505,4143,16594,3568,16495,11760,7601,1534,9734,328,15108,16566,11691,930,571,16637,608,16639,16527,16587,16618,
16589,16620,16591,11648,5638,49,16647,376,16484,9034,16621,16645,11626,1430,50,16546,785,16548,16538,16543,16545,1902,16523,16630,1301,16500,16539,16660,16599,16640,15208,15555,15210,3229,16596,32,16613,9409,16495,13265,15238,3624,15547,14904,12928,1641,7254,14895,16454,12189,14902,9010,1709,7246,13238,11956,15282,16329,15251,14734,5253,16544,16475,4939,14909,648,16356,14225,11979,3226,16308,7005,11983,16311,2303,9974,11983,2661,115,16167,260,13041,12121,14791,16331,1136,16172,2E3,16175,13059,15064,
15476,16188,13163,13869,15387,9276,8029,9939,14856,14861,8258,14930,11932,2187,14927,14870,6177,4657,12521,16224,12523,16226,9880,933,12011,9408,16560,6356,16340,9312,4453,1939,7267,5638,16765,14866,4028,5638,16772,7295,7053,5414,16769,1386,6800,16723,16449,12553,14927,6511,941,5437,5451,5441,15111,451,5444,5446,5448,5450,5452,32,5440,5455,5459,5439,5456,5451,16231,16244,15824,16029,4388,291,369,9888,16421,8950,10223,1747,16439,14389,14711,12505,7269,14880,16142,16257,12553,11960,9843,12329,8048,
16336,11961,12423,11079,552,6676,4939,6828,15466,12958,16280,16341,7624,16343,10762,14855,16799,2873,14859,16866,8945,15103,15423,5492,16860,16375,16796,4855,14805,16795,6012,4578,12016,12952,16071,16510,16729,14910,16732,7536,16433,11060,16435,14754,11762,16291,7719,16245,11448,10780,16330,15065,1632,71,495,11011,13101,308,12855,16209,15295,9553,9847,9029,12905,120,12914,13059,16788,7326,670,105,11177,16217,12897,12872,10432,12823,12452,10420,1564,12161,11180,4630,16924,12899,9171,16747,792,16928,
12903,12890,2267,12907,1664,2727,16928,909,16931,13407,890,9112,259,12879,12881,13059,1946,5475,16940,499,16355,2935,4171,2723,10463,6500,84,12854,15316,16909,16892,15291,335,13264,979,1031,14258,9847,13907,15811,15503,4765,13564,15578,15632,9202,2477,10728,15617,15625,8333,15627,8336,15575,2894,8006,8946,3278,14034,15595,16828,7200,15645,15599,16026,15128,16750,14056,13446,16980,13971,355,13876,16003,16009,9095,15608,16984,13654,2673,15612,13203,6777,15615,14121,8840,15619,14344,4370,1965,13478,
14488,4296,15887,13415,13434,16113,13841,109,13961,15036,16760,13964,15570,3836,15572,10077,15590,13445,15631,2505,14059,6769,13885,15635,11029,15637,13890,10098,10942,16577,10748,2525,14023,15962,6113,15598,15647,8048,15667,6344,15652,11665,496,15655,5087,15658,100,15660,6636,15662,385,15665,10691,9797,15731,15240,3698,12780,5605,15226,11603,15228,273,16696,16588,569,15529,386,16495,6486,16536,11929,16495,3450,15237,11574,15239,431,8616,13274,666,2782,544,16058,15852,15850,10444,17111,5151,13359,
13939,13361,8329,1878,6906,17114,913,13030,17118,15753,16766,4494,500,2794,16107,12511,17133,8710,14537,16076,14539,17123,17119,6435,16497,13460,8354,7782,1632,15172,14506,9489,1875,16937,11864,15467,12822,7531,5412,7293,16863,17136,1878,14839,8571,14827,6113,15049,767,15667,550,15248,15250,16803,12958,15243,14889,17174,9730,6049,578,16900,15476,12349,13427,15046,16887,16761,7299,9026,48,10371,1135,17118,16875,16880,14771,16842,5361,17157,17178,15490,13236,10799,10444,16709,14954,10619,15683,15740,
16030,11500,17210,11914,7407,4577,17213,13231,15705,16463,10479,11904,12806,12613,13348,12810,12625,16714,15748,13274,16091,16762,9302,12460,4274,12568,16750,5606,1812,1396,3877,17200,16858,9730,13051,10131,15479,11448,16017,294,4103,10767,15053,16844,12958,13079,16038,15041,17244,16028,10153,16464,10262,17116,767,13030,2134,17126,1037,13030,13051,13039,11031,17236,15092,10181,13088,4726,13053,13055,16191,8390,1121,5166,15244,17261,12866,17237,605,149,15483,13232,13161,15051,15473,16177,16749,17275,
16046,15795,16217,5606,17290,15472,15488,17254,12212,2703,16256,13008,17287,17297,15330,9113,17182,16201,6106,3965,17308,9706,17310,13044,1632,13190,12067,16551,767,14612,731,11120,2460,9040,8994,281,8893,1531,7359,394,8887,13181,12133,15684,12938,11887,14693,13274,8618,1880,14638,14633,13466,9241,12113,15476,9776,14388,16402,6851,17336,381,12364,6734,335,16716,11290,7220,1814,16124,16869,594,10758,17161,5870,7348,16385,8753,679,7724,14597,12922,16320,7735,10443,9779,11610,14607,1662,13096,12070,
10805,14620,8840,12074,6952,10824,6952,10813,6600,12086,7020,6962,7039,12083,7019,10816,17398,10823,12095,7034,7033,7032,17405,10835,17394,10833,12098,7035,6954,9399,280,4474,11727,2087,17383,11519,15286,752,9988,17421,913,17423,12057,11675,3727,14643,11099,7390,2751,16973,17206,15409,421,17231,6780,17192,5627,10768,6867,6849,5490,12452,14761,10582,17319,15722,16750,843,512,16324,14719,16326,5855,4874,6352,5273,3925,5275,14826,14720,1076,16961,16283,9431,11887,17363,14904,9256,9258,323,7260,9847,
6541,7005,17467,17460,2244,9421,10455,12537,9065,9479,7260,5596,15088,689,16234,9847,11434,15698,7908,12237,17156,14657,17368,1669,16023,17040,9039,15711,7543,11354,15108,5275,11046,11160,11046,7848,10464,16718,12180,14947,7706,11981,17385,387,2797,15782,16833,10738,11806,7186,12405,10889,12407,12633,920,15277,15279,14995,3689,15276,12960,378,15318,15293,288,12755,9788,13181,11504,16634,11507,16027,9915,10795,7650,11051,9098,17217,15779,1297,14979,17220,11785,17292,15601,3969,3893,14896,6800,12774,
15700,15564,10693,14220,1716,13403,14186,17188,11944,1716,13080,8205,755,16040,5052,14751,9585,4779,16971,15102,1541,109,17012,14488,8057,9645,2060,17030,7059,17014,2576,9768,17506,2343,1716,16072,9741,694,15893,4657,13790,16932,7958,13795,12479,13799,9227,13799,9230,477,12487,9234,6964,17591,14588,1524,10512,10175,9847,3771,98,109,17526,8280,16163,17529,9629,4138,16420,17634,17528,14700,7186,1506,52,17633,8422,16422,17636,10295,327,9533,17247,14734,15389,3089,16006,8234,11802,15380,17527,11813,16165,
7006,14239,9155,17627,15323,1529,870,11821,11356,14770,8662,9258,778,11793,5437,15110,13792,6161,759,761,14705,7167,17544,6501,5747,15408,15567,371,17442,10179,46,9430,9425,9379,13096,10272,9382,17696,276,12450,9054,17700,6182,14817,5231,16325,15954,15138,6914,9404,16778,12009,9881,16230,9420,9400,9412,16213,4371,10738,8840,15141,17717,12181,8324,16223,17724,16779,9417,6916,16783,5493,8947,9422,6797,14872,10457,9058,17154,4173,14878,14235,16134,13133,9617,5393,10573,16232,17690,9076,7055,13252,16126,
120,15819,16108,7055,15822,13906,5691,13146,15430,913,14679,17764,11941,1040,10576,1863,13122,16318,10621,17750,13145,13012,9334,15810,110,10434,14934,366,1912,7724,16130,8348,16132,6048,7055,10437,14524,1453,15127,17260,16143,14734,15031,8234,16125,13404,16391,12340,17768,3578,17767,17778,9346,9389,12003,16776,17733,11359,17731,16228,16782,12372,12020,16379,291,258,12391,1664,16756,17315,5117,13245,10616,431,17761,1379,5253,17755,4618,77,3852,17318,1680,17825,13819,446,14805,15437,17443,9048,431,
17792,17829,5528,14939,9315,7055,17782,3262,17803,11980,14991,6780,55,17744,12447,17823,5633,12458,8662,17819,16380,17822,6533,3585,15430,17371,16770,9939,17843,14833,7326,14221,17419,579,17503,17718,17879,14876,5536,17877,17855,598,17881,383,11002,4602,17837,12865,17454,17297,17878,12340,12303,17374,2187,10255,12561,13309,17887,17847,17900,1135,14982,17796,5241,17262,4341,1670,17899,3089,1735,17862,6538,17191,17159,15266,7380,10107,13181,15282,14898,15700,11528,15486,17293,15039,17553,11502,17563,
17930,17565,984,12139,15195,13189,13237,12042,3716,15224,7142,10436,17421,16641,16664,16643,1037,2591,17099,15214,15202,9930,16515,5127,12051,11613,10954,1548,14340,17949,11619,16697,10549,17954,16535,17106,1702,8053,12251,15089,17440,17957,7167,12258,6692,15457,17518,12307,10790,16710,7688,11565,17928,3389,17933,12604,17229,14988,3715,121,17875,6795,17996,15046,10846,17741,5958,3842,7138,2027,10152,8985,3842,1912,18006,3244,122,17998,8010,2997,18013,12447,260,1912,8658,7375,17185,14760,17387,12494,
17389,4870,16150,7017,17394,6945,17396,10836,6964,12085,12082,10818,12084,17400,12100,12089,7031,6971,10826,17416,7037,12099,17415,12093,12099,17417,6090,18003,9248,4668,10838,18001,14656,4752,14813,9427,5719,17981,649,14634,8887,10853,12171,16434,16718,9362,16192,11061,121,398,14645,2317,9371,382,12165,774,18065,12311,14637,15146,6876,17727,16872,8348,15075,12173,12413,12188,18076,3622,12192,18079,10112,13137,13111,14996,12259,15178,17752,17977,7365,15453,18102,10908,335,13177,770,17964,11956,872,
9980,3649,9953,9724,8205,2187,17801,10841,17799,5149,17184,10439,17203,15320,13213,9303,16175,17439,11474,10619,17902,12588,15672,13230,6578,17570,17341,13270,7241,5213,10388,14904,13274,322,97,13581,14487,13583,3484,14702,1625,17195,4362,7326,18136,13279,4668,18160,2420,8469,17451,17314,17840,10885,455,18157,16214,7053,1870,2267,13959,18149,2070,16012,5967,16437,13744,9045,7288,17483,17710,12255,455,13279,8420,16217,401,17879,6684,18178,14352,18180,18169,11947,15754,4028,12339,7529,11923,2070,8469,
5257,14769,16787,16789,1870,6607,15998,11946,108,18194,3438,18190,15034,462,16391,13059,17944,728,4458,16811,619,5118,859,5089,1833,360,12340,6926,1870,4451,8218,591,12004,729,9207,18226,91,8564,2630,15393,10142,17061,3870,14657,18189,8652,16217,16345,558,18214,18216,1625,17274,17353,1080,18205,16021,2035,3438,16943,5633,12824,12346,8516,15791,8092,7186,9608,7946,14366,14704,738,18261,3438,8658,18174,1688,15924,15086,18250,2420,18179,6360,8830,1870,13959,18192,12340,18257,13617,18182,13928,461,18136,
17889,763,18280,17707,5247,17459,18186,9583,18287,8756,17466,8571,14842,18307,18285,1210,18295,9609,17500,12958,18149,17458,4349,17468,18249,1210,4103,8361,17243,11135,18293,18203,18286,13743,14002,16116,7820,4958,400,4604,16837,17356,7205,18131,1636,17380,318,10162,7412,17612,17025,15652,626,1601,6787,12724,11122,14824,18304,5298,17709,14337,18249,18059,18151,13366,8738,8090,6721,15512,10408,18209,8591,8894,13208,13201,5390,14691,11896,17209,17562,14493,17092,18142,7679,15196,17942,8612,11956,17692,
16414,16344,17242,17610,9275,17844,14727,14993,16334,17533,18101,11146,4554,14999,10983,1430,17831,3541,15008,9757,12241,296,10222,12352,12509,2879,13774,5671,9804,12287,1209,17789,8234,13620,17024,15799,15626,13624,16992,16195,11391,3836,13794,2910,13796,9226,13798,12487,13801,2920,9233,1924,11363,14990,12353,15514,18062,7736,15450,11956,9049,15440,12743,9954,2400,17531,16335,12244,315,5940,12719,1396,102,10873,12999,17615,8469,17657,13650,17887,18453,18119,7448,17604,15288,2087,18413,17603,6122,
18461,79,18463,4728,6856,1132,16888,9856,18480,18482,3770,18465,2918,5880,12395,9768,4208,15835,11448,2906,648,18462,18464,5389,9636,18492,13328,17611,13710,9817,18434,17615,13797,1753,9824,18440,12715,9231,13802,9234,12324,16127,18452,10919,18454,3089,18499,1929,18481,18502,1774,18504,605,6401,16469,1602,9753,392,380,345,17652,17523,15203,7167,9785,16136,288,12378,12374,323,15417,17207,10627,1387,15687,17992,18104,7263,18059,3983,6711,11097,12669,12614,12954,7215,11417,11008,17672,17453,16450,15025,
12946,17309,17895,15476,18122,8234,1840,12E3,17915,9255,18110,12279,12062,6506,10946,17948,18114,643,817,9951,3650,18524,18127,12939,18111,7374,11627,18536,379,17337,15068,9847,15078,12579,11329,12747,11344,15099,15121,12691,17214,14227,3875,16189,12106,3837,12444,9416,10067,12725,110,16379,642,11419,12748,12689,18610,15101,11364,11262,12421,15131,15163,15166,18609,12759,15085,11477,12765,9192,15176,9456,15770,15020,11664,14098,1927,18618,17716,2892,18621,10954,16002,5785,15164,11204,18635,15085,
17795,15603,11135,15130,10344,15132,15097,18626,15083,18658,12752,15184,13710,12007,16227,12011,16432,4008,18646,12455,14472,15894,15160,10607,5154,11319,18669,18657,18628,15137,637,17358,345,14642,18537,17337,11302,5773,5045,7413,18625,18608,15135,18688,15167,4579,18645,14228,11962,18024,17745,12116,15183,12028,15186,18384,15188,11494,17090,18715,11497,1597,15681,17228,15491,12145,17945,12046,12638,10655,12156,17959,7124,413,18624,7122,13157,12119,7849,18698,3562,7504,17430,14641,11777,18507,2903,
13793,18510,6818,9218,17617,18438,12486,9828,18519,17684,7365,17686,18540,17976,12027,16775,5275,16225,18242,18673,17815,18675,17171,12551,1409,9527,16436,4951,282,15180,18103,18091,18642,3653,17351,9243,17305,17202,18134,18552,17567,16714,17810,18137,10314,13186,17554,10647,18128,12779,18726,13194,12047,18729,12640,11633,1632,9042,9636,17114,15451,9479,13030,6694,1743,7219,5217,15851,17339,18792,17934,7758,12606,10311,14984,12939,14604,18346,17943,10853,12502,17666,774,6719,11989,9160,15816,10584,
9163,16724,16750,15056,14752,9586,17589,7095,429,16146,12004,14746,18242,14625,16152,10204,9168,10137,12901,6018,9176,12520,17729,8537,18674,9186,17732,9188,17734,12646,10980,774,18773,570,18649,18301,12547,18709,4618,16899,18836,17297,16882,17201,12501,9176,12556,9252,12072,14235,10786,18583,17384,18760,768,12020,16847,99,10671,17875,4687,6562,17763,17808,17903,569,18596,17805,17882,12340,14340,251,913,18596,12064,731,17887,18902,1111,18901,18898,12534,14811,729,18593,17876,6567,9013,10443,7690,
10669,6588,18596,9942,10443,17818,2060,909,99,12743,18894,17471,18159,9013,6511,501,17846,17428,1037,18926,18586,16535,12614,643,3856,2817,6995,2332,18167,6577,686,11081,18893,18057,9276,12909,4757,17497,262,9400,6859,9892,11005,14740,18783,11448,328,17771,10192,1865,1470,18913,18971,18520,470,578,18933,18957,18396,6777,8136,18472,18870,6294,17784,111,17786,10567,15748,10776,327,18132,18824,11637,1870,14653,17922,2400,17373,2667,18992,17520,12320,7245,15256,2748,10853,18576,9852,575,709,1637,16745,
17294,11446,17296,17183,18422,5149,15260,17369,10616,16890,1409,1745,461,19002,18594,17941,17204,461,70,16740,1755,11590,11326,10441,17751,10853,17497,6181,18319,17179,12906,1414,18478,1379,17283,17447,3877,11619,17511,17911,17320,17826,3808,17508,11153,19055,6580,5532,6750,18242,19064,11363,12797,15716,18952,7732,17379,19040,9361,9592,11062,3741,86,2775,8116,11607,9906,17993,946,4389,3114,6804,18486,14873,538,15355,743,87,1604,587,6839,14309,18269,7941,13634,15925,15020,1545,5045,18899,16750,1170,
323,14298,8352,684,279,770,1006,3116,846,9274,277,18621,16390,15393,17811,13749,18666,18701,15165,18703,11424,19122,15985,7274,19091,355,19093,19095,577,6839,17609,19099,4559,16004,554,3842,1687,99,19094,643,19137,107,17576,16611,16117,15650,12355,3995,65,15660,1878,17285,16246,4927,7468,17005,17297,16260,18566,4607,19157,2082,19160,11448,4148,77,18835,15096,15120,18637,19127,19178,12740,7286,3626,3628,17073,10765,5861,3625,3627,4536,19185,7488,287,19188,19184,3630,9716,15020,19164,15476,3852,11289,
6534,19169,19159,17177,17E3,6643,117,12369,9593,12816,11878,11302,11414,19174,19123,15080,18607,11396,19179,14151,19181,12547,3493,11051,17893,10590,16200,18168,1136,2862,5773,19226,17910,18573,18570,11336,10331,2586,11165,7468,18700,19220,18687,19180,11E3,11128,11460,11198,101,19204,1624,17787,19058,311,304,15362,11149,4124,4726,13056,11982,1588,5749,18242,11175,9866,16078,4143,4041,14591,766,8048,17150,19272,7047,327,9966,8625,2684,19148,291,16627,19045,11287,15346,12891,112,7474,1621,432,19199,
19058,19143,19092,19146,19136,19283,14564,19152,16008,19101,7006,12682,5758,859,19109,18615,12285,19112,3831,19115,2656,5052,19118,12491,4148,641,1006,19240,4918,15022,19243,12739,11216,18656,19247,11387,11315,625,19321,11166,17067,19176,19327,10973,19336,11233,19295,19134,19297,19282,6839,19071,7074,12769,19158,19253,19131,10148,19162,15022,258,1904,1840,5437,3845,5654,3846,9548,6806,19358,12722,14226,11363,4490,19272,11456,15603,17797,16750,3852,19252,19171,16725,9532,9736,3596,9815,5275,511,5723,
545,6806,19382,890,631,3347,6090,19352,4802,19374,19206,9730,16638,17803,17448,8048,12144,5985,1213,3790,5318,115,107,2429,12344,19289,670,19291,103,19293,19230,9620,9115,4597,108,19227,15158,15480,4124,16366,14538,91,755,4916,19241,15022,2485,15586,2888,9939,13142,15182,10619,15217,12626,7411,335,19108,1031,1430,18141,14980,12627,17549,16026,15687,18909,14657,67,17071,2748,15740,14256,16975,15530,15198,13193,256,6588,65,12882,15585,354,11811,16656,11731,15382,5562,16642,15556,15300,16495,5463,15549,
10601,15660,354,18759,19471,17950,19473,913,16569,40,41,32,61,62,1437,4390,10212,16622,1657,578,343,9563,15549,4919,1604,262,17502,16687,16629,6487,18387,16663,17966,17095,17640,9393,16677,5753,327,115,9104,3767,15549,311,19503,18059,18481,4906,19516,16609,16567,15029,16586,19510,16665,17661,10532,19514,9861,19517,7171,17101,19507,19033,16704,2573,18558,15549,6568,5762,19522,15443,15229,19472,16698,19540,14245,19542,17502,15549,6588,66,11178,19536,19518,710,19468,10193,2128,19400,19509,16395,19552,
10230,16422,19535,19516,19562,15563,9457,8993,17689,13239,18208,14871,17444,1828,19504,6616,17739,10066,9384,17698,12451,17864,4765,17697,18680,13097,17705,10554,17465,18184,18361,15990,12002,17721,17713,18242,17725,10211,17418,17804,18762,7288,19605,9394,17731,17726,11244,17728,19217,19111,19615,19608,9420,17736,17487,9036,19583,603,18981,17693,18268,14944,15445,18376,1E4,111,12945,100,16500,7135,16717,17365,14606,18888,9566,18580,4657,1514,15398,542,18986,10381,9570,6907,16174,7158,1111,17327,517,
16380,1706,19345,6675,12869,726,1514,17834,14565,10432,19646,12297,19462,6571,19650,17907,2298,1514,19653,16753,19656,1409,19658,13770,10432,19667,10762,10377,10435,10382,1493,107,5867,5190,19662,12868,881,1514,17758,13869,1514,18407,18075,10386,18145,14903,18996,3707,18073,11018,10853,18604,10781,18685,19128,18702,19246,11220,19711,4826,12733,11213,18667,18636,19222,19328,12753,11414,1079,1916,11318,18655,18686,19326,19732,11220,4101,16370,18088,5149,15117,17352,7058,19721,19126,19245,19724,19717,
10967,18664,18634,19714,19221,15134,18670,11488,15139,17733,11091,9881,16228,7460,15149,11126,15867,14709,9973,19419,19083,15159,6171,18683,19324,12751,19745,19753,19223,11425,306,18069,649,12763,18779,10473,15146,19782,9786,14892,7560,16736,15684,12031,17312,16952,11498,18383,17217,18713,18820,18788,12043,18717,17612,17217,15193,19795,18381,15292,19508,19459,12637,11608,18664,11724,12694,306,4491,17187,18395,16628,16610,13869,15201,4600,476,16175,18009,16551,10705,19564,19571,16834,11604,4251,11606,
481,5130,19437,11773,9256,16181,2775,327,16404,10451,10178,10853,3885,11236,83,10459,625,15324,9386,9048,13791,18763,10458,370,6918,19857,44,102,11235,17683,12189,19843,16398,7212,125,19614,17034,1598,14085,17583,6736,18655,8047,13964,12313,14839]});
define("tdv/events/async",["require","exports","tdv/utils"],function(a,m,h){function n(){var d=e.length,f=e.splice(0,d);k+=d;for(var l=0;l<d;l++){var p=f[l];if(p)try{p()}catch(q){h.VX("Error in async task",q)}}}var g=0,k=0,e=[],b,c=new Promise(function(d){d()});setInterval(function(){e.length>0&&(new Date).getTime()-b>100&&n()},100);return{ME:function(d,f){f===void 0&&(f=void 0);if(f!==void 0&&f>0)return-1-setTimeout(d,f||1);e.length==0&&(c.then(n),b=(new Date).getTime());g++;e.push(d);return g-1},
cancel:function(d){if(d<0)clearTimeout(-1-d);else{var f=d-k;if(f>=0){if(!e[f])throw"invalid async handle: "+d;e[f]=null}}}}});
define("tdv/events/EventDispatcher",["require","exports","tdv/events/Event","tdv/events/async","tdv/utils"],function(a,m,h,n,g){var k=function(){return function(){}}();return function(){function e(){this.bd={}}e.prototype.Acb=function(b,c,d){this.fwa(b,c,d,!0,c,!0,!1)};e.prototype.bind=function(b,c,d,f,l,p){p===void 0&&(p=!1);return this.fwa(b,c,d,f,l||c,!1,p)};e.prototype.fwa=function(b,c,d,f,l,p,q){if(b===void 0)throw"Event name undefined";if(c===void 0)throw"Event handler undefined";d=d||this;
f=f?!0:!1;b in this.bd||(this.bd[b]=[]);var r=new k;r.EX=c;r.xgb=l||c;r.context=d;r.HMa=f;r.WMa=q;b=this.bd[b];p?b.unshift(r):b.push(r);return this};e.prototype.h=function(b,c,d){b in this.bd&&(d=d||this,this.bd[b]=this.bd[b].filter(function(f){return f.EX!=c||f.context!=d}),this.bd[b].length==0&&delete this.bd[b]);return this};e.prototype.mnb=function(b){b in this.bd&&delete this.bd[b]};e.prototype.vsa=function(){this.bd={}};e.prototype.o=function(b,c){c===void 0&&(c=void 0);typeof b=="string"&&
(b=new h(b,c));b.name in this.bd&&(b.source=this,this.jC(b,!0),b.name in this.bd&&this.R_a(b));return this};e.prototype.R_a=function(b){e.M0.push({caller:this,event:b});e.Bea||(e.Bea=!0,n.ME(e.uxa))};e.uxa=function(){for(var b=(new Date).getTime()+1E3;e.M0.length;){var c=e.M0.shift();e.prototype.jC.call(c.caller,c.event,!1);if((new Date).getTime()>b)break}e.M0.length>0?n.ME(e.uxa,1):e.Bea=!1};e.prototype.f8=function(b){return b in this.bd};e.prototype.FX=function(b){if(b in this.bd){b=this.bd[b];
for(var c=0;c<b.length;c++)if(b[c].WMa)return!0}return!1};e.prototype.jP=function(b,c,d){var f=[];b=this.bd[b]||[];for(var l=0;l<b.length;l++){var p=b[l];c!==void 0&&p.HMa!=c||d!==void 0&&p.WMa!=d||f.push(p.xgb)}return f};e.prototype.jC=function(b,c){var d=this;b.unbindCurrentHandler=function(){p&&d.h(b.name,p.EX,p.context)};if(b.name in this.bd)for(var f=this.bd[b.name],l=0;l<f.length;l++){var p=f[l];if(p.HMa==c)try{p.EX.call(p.context,b)}catch(q){g.VX("Exception handling event "+b.name,q)}}};e.M0=
[];e.Bea=!1;return e}()});
define("tdv/player/view/util/URL",["require","exports"],function(){return function(){function a(){}a.epa=function(m){if(this.Tg("crossorigin",!1))return!0;if(this.v8(m)){var h=window.location.protocol+"//"+window.location.hostname;window.location.port&&(h+=":"+window.location.port);return m.substring(0,h.length)!=h}return!1};a.mB=function(m,h){if(this.Mhb(m))m=window.location.protocol+m;else if(!this.v8(m)&&!this.hE(m)){if(h)if(m.indexOf("/")==0){var n=h.indexOf("//"),g="";n>=0&&(g=h.substr(0,n+2),
h=h.substr(n+2));n=h.indexOf("/");n>0&&(h=h.substr(0,n));m=g+h+m}else m=h+m;this.Yo.href=m;m=this.Yo.href}return m};a.xhb=function(){switch(window.location.protocol){case "http:":case "https:":return!0;default:return!1}};a.Mhb=function(m){return m.indexOf("//")===0};a.v8=function(m){if(!m)return!1;var h=m.indexOf("://");return h>=3&&h<=5?!0:m.indexOf("filesystem:")==0};a.Hhb=function(m){return m&&m.indexOf("/pdfjs/")>=0};a.getDirectory=function(m){m=this.mB(m);m=m.split("?")[0];m=m.split("/");m.length>
1&&m.splice(m.length-1,1);return m.join("/")+"/"};a.Bk=function(m){this.iN||(this.iN=this.dza());return this.iN[m]!==void 0};a.getQueryParameter=function(m){this.iN||(this.iN=this.dza());return this.iN[m]};a.kSa=function(m,h){var n=m.split(h);m=n[0];(n=n.slice(1).join(h))&&(n=h+n);return[m,n]};a.MD=function(m,h){if(!h)return m;var n=this.kSa(m,"#"),g=n[1];n=this.kSa(n[0],"?");var k=n[1];return k.indexOf(h)>=0?m:n[0]+(k+(k?"&":"?")+h)+g};a.parse=function(m){this.Yo.href=m;m={};m.protocol=this.Yo.protocol;
m.hostname=this.Yo.hostname;m.port=this.Yo.port;m.pathname=this.Yo.pathname;m.search=this.Yo.search;m.hash=this.Yo.hash;m.host=this.Yo.host;var h=m.pathname?m.pathname.lastIndexOf("."):-1;m.Eeb=h>=0?m.pathname.substr(h).toLowerCase():"";return m};a.getExtension=function(m){m=this.parse(m).pathname;var h=m.lastIndexOf(".");return h>=0?m.substr(h,m.length):""};a.Tg=function(m,h){m=(this.getQueryParameter(m)||"").toLowerCase();return this.ejb(m,h)};a.ejb=function(m,h){switch(m){case "false":case "0":case "no":case "n":return!1;
case "true":case "1":case "yes":case "y":return!0;default:return h}};a.rLa=function(m,h){m=parseInt(this.getQueryParameter(m));return isNaN(m)?h:m};a.K7=function(m){m=parseFloat(this.getQueryParameter(m));return isNaN(m)?void 0:m};a.dza=function(){for(var m={},h=window.location.hash.substring(1).split("&").concat(window.location.search.substring(1).split("&")),n=0;n<h.length;n++){var g=h[n].split("="),k=decodeURIComponent(g[0]);g=g.length>1?decodeURIComponent(g[1]):null;m[k]=g}return m};a.Yo=document.createElement("a");
a.iN=null;a.hE=function(m){return m&&m.indexOf("data:")==0};return a}()});
define("tdv/player/view/util/Device",["require","exports","tdv/utils","tdv/player/view/util/URL"],function(a,m,h,n){var g={};g.vj=TDV.qb.v_;g.uB=TDV.qb.Yba;g.Xua=TDV.qb.kua;g.opb=TDV.qb.bca;g.r_=TDV.qb.Zba;g.Fta=TDV.qb.jua;g.Yob=TDV.qb.aca;g.$ba=TDV.qb.$ba;g.IQ=TDV.qb.IQ;g.Naa=TDV.qb.Naa;g.Maa=TDV.qb.Maa;g.Laa=TDV.qb.Laa;g.Oaa=TDV.qb.Oaa;g.Ji=TDV.qb.Ji;g.WZ=TDV.qb.WZ;g.Yj=TDV.qb.Yj;g.Pp=TDV.qb.Pp;g.QK=TDV.qb.QK;g.tF=TDV.qb.tF;g.VZ=TDV.qb.VZ;g.ox=TDV.qb.ox;g.Iaa=TDV.qb.Iaa;g.$Z=TDV.qb.$Z;g.qx=TDV.qb.qx;
g.su=TDV.qb.su;g.a_=TDV.qb.a_;g.Jaa=TDV.qb.Jaa;g.GQ=TDV.qb.GQ;g.FQ=TDV.qb.FQ;g.RK=TDV.qb.RK;g.HQ=TDV.qb.HQ;g.zB=TDV.qb.zB;g.cta=TDV.qb.cta;g.yB=TDV.qb.yB;g.tu=TDV.qb.tu;g.uu=TDV.qb.uu;g.ZZ=TDV.qb.ZZ;g.Kaa=TDV.qb.Kaa;g.Paa=TDV.qb.Paa;g.c_=TDV.qb.c_;g.LQ=TDV.qb.LQ;g.Taa=TDV.qb.Taa;g.VK=TDV.qb.VK;g.MQ=TDV.qb.MQ;g.d_=TDV.qb.d_;g.PQ=TDV.qb.PQ;g.e_=TDV.qb.e_;g.WK=TDV.qb.WK;g.NQ=TDV.qb.NQ;g.OQ=TDV.qb.OQ;g.f_=TDV.qb.f_;g.Uaa=TDV.qb.Uaa;g.cH=function(e){e="force_"+e;if(n.Bk("debug")&&n.Bk(e))return n.getQueryParameter(e)};
g.d1a=g.cH("os");g.Nd=function(){return g.d1a||TDV.qb.Nd};g.Z0a=g.cH("browser");g.Tb=function(){return g.Z0a||TDV.qb.Tb};g.$0a=g.cH("browser_type");g.DO=function(){return g.$0a||TDV.qb.DO};g.iya=g.cH("browser_subtype");g.Dc=function(){return g.iya?g.iya:TDV.qb.Dc};g.a1a=g.cH("browser_version");g.RIa=function(){return g.a1a||TDV.qb.RIa};g.c1a=g.cH("device");g.xk=function(){return g.c1a||TDV.qb.xk};g.ub=function(){return TDV.qb.mobile};g.I0a=function(){for(var e=navigator.userAgent.toLowerCase(),b=
["SM-G960","SM-G965"],c=0;c<b.length;c++)if(e.indexOf(b[c].toLowerCase())>=0)return!0;return!1}();g.mZa=g.Tb()!=g.Pp||navigator.userAgent.indexOf("; wv")<0?!1:!0;g.b1a=!!g.cH("chromewebview");g.iJa=function(){return g.b1a||g.mZa};g.kf=function(){return g.Dc()==g.qx||g.Dc()==g.su||g.Dc()==g.a_||g.Dc()==g.tu||g.Dc()==g.uu||g.Dc()==g.yB};g.E8=function(){return g.KJ()};g.D8=function(){return g.xP()||g.ZMa()||g.kNa()||g.eNa()};g.fpa=function(){return g.Dc()==g.tu};g.Ema=void 0;g.wob=function(){if(g.Ema===
void 0){var e=void 0;g.iE()&&(window.location.hash.split("&").forEach(function(b){b.split("=")[0]=="app-version"&&(e=b.split("=")[1])}),e&&(e=parseInt(e)));e=e||0;g.Ema=e}return g.Ema};g.iE=function(){return g.AP()||g.fpa()};g.AP=function(){return g.Dc()==g.uu};g.Jhb=function(){return g.xk()==g.d_};g.Bhb=function(){return g.xk()==g.e_};g.ZMa=function(){return g.xk()==g.WK};g.Ihb=function(){return g.xk()==g.NQ};g.cNa=function(){return g.xk()==g.OQ};g.dNa=function(){return g.xk()==g.PQ};g.eNa=function(){return!!(window.location.hash&&
window.location.hash.indexOf("device=picoxr")>=0)};g.kNa=function(){return g.xk()==g.f_};g.KJ=function(){return g.xk()==g.MQ};g.xP=function(){return g.xk()==g.VK};g.fI=void 0;g.sjb=function(){g.fI===void 0&&(g.fI=parseInt(n.getQueryParameter("sts")),isNaN(g.fI)&&(g.kf()&&!g.I0a?g.fI=512:g.ub()&&g.Nd()==g.vj?g.fI=512:g.fI=g.ub()?256:1024));return g.fI};g.z7a=function(){if(g.Tb()==g.Yj||g.Tb()==g.Ji)try{var e=/Version\/([0-9]+\.[0-9]+)/i.exec(navigator.userAgent);if(e)return parseFloat(e[1])}catch(b){}}();
g.DQa=function(){return g.z7a};g.i3a=function(){try{var e=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||!1}catch(b){}e||(e=g.DQa());return e}();g.Uoa=function(){return g.i3a};g.HXa=function(){if(g.Nd()==g.uB)try{var e=/Android ([0-9]+\.?[0-9]*)/i.exec(navigator.userAgent);if(e)return parseFloat(e[1])}catch(b){}}();g.lcb=function(){return g.HXa};g.tza=function(){var e={cMa:"unknown",
Zhb:1},b=document.createElement("canvas");if(b&&(b=b.getContext("webgl")||b.getContext("experimental-webgl"))){var c=b.getExtension("WEBGL_debug_renderer_info");c&&(e.cMa=b.getParameter(c.UNMASKED_RENDERER_WEBGL));e.maxTextureSize=b.getParameter(b.MAX_TEXTURE_SIZE);if(c=b.getExtension("EXT_texture_filter_anisotropic")||b.getExtension("MOZ_EXT_texture_filter_anisotropic")||b.getExtension("WEBKIT_EXT_texture_filter_anisotropic"))e.Zhb=b.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}return e}();g.qgb=
function(){return g.tza};g.JXa=function(){var e=g.tza.cMa.match(/Apple\s+(.+)\s+GPU/);return e?e[1].toUpperCase():"unknown"}();g.Npb=function(){return g.JXa};g.X3a=g.xk()==g.LQ?!0:!1;g.EA=function(){return g.X3a};g.ZIa=function(){return g.Tb()==g.Yj&&g.DQa()>=14};var k=!1;try{k=window.localStorage.getItem("tdvp_video_drift_2")=="true"}catch(e){}g.Ngb=function(){return k};g.Hlb=function(){k=!0;try{window.localStorage.setItem("tdvp_video_drift_2","true")}catch(e){}};g.SS="ontouchstart"in window||typeof window.PointerEvent!==
"undefined"&&typeof navigator.maxTouchPoints!=="undefined"&&navigator.maxTouchPoints>0?!0:!1;g.qsa=function(){return g.SS};g.d4a=n.Bk("touchenabled")?n.Tg("touchenabled"):"ontouchstart"in window?g.Nd()==g.Xua?!1:!0:!1;g.Jp=function(){return g.d4a};g.summary=function(){return["browser: "+g.Tb(),"browserType: "+g.DO(),"browserSubtype: "+g.Dc(),"device: "+g.xk(),"isMobile: "+g.ub(),"chromeWebView: "+g.iJa(),"touchDevice"+g.qsa(),"touchEnabled"+g.Jp()].join(", ")};g.log=function(){h.log("browser: "+g.Tb());
h.log("browserType: "+g.DO());h.log("browserSubtype: "+g.Dc());h.log("device: "+g.xk());h.log("isMobile: "+g.ub());h.log("chromeWebView: "+g.iJa());h.log("touchDevice: "+g.qsa());h.log("touchEnabled: "+g.Jp())};return g});
define("tdv/player/view/util/Flags",["require","exports","tdv/player/view/util/URL"],function(a,m,h){a={};a.vu=h.Tg("debug",!1);a.fVa=h.Bk("hqhls");a.ata=h.Tg("audiocontext",!0);a.hpb=h.Tg("testhash",!1);a.RUa=h.Tg("exitvronblur",!1);a.AUa=h.Tg("download",!0);a.qWa=h.Tg("updatewhilehidden",!1);a.XUa=h.Tg("webgl2",!1);a.WUa=h.Tg("webgl1",!1);a.UUa=h.Tg("lowp",!1);a.xta=h.Tg("antialias");a.uWa=h.Tg("unlimited-video-resolution",!1);return a});
define("tdv/player/texts",["require"],function(){return{"bg-bg":{mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0430\u0432\u0430\u043d\u0435","cardboard-v1":"\u0410\u043a\u043e \u043d\u0435 \u0441\u0442\u0435 \u0441\u0438\u0433\u0443\u0440\u043d\u0438 \u043a\u043e\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Cardboard \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435. \u0421\u043b\u0435\u0434 \u0442\u043e\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0449\u0435 \u043f\u043e\u0433\u043b\u0435\u0434\u043d\u0435\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442\u0430 \u0438 \u0449\u0435 \u0438\u0437\u0447\u0430\u043a\u0430\u0442\u0435, \u0434\u043e\u043a\u0430\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0442\u043e \u0441\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0430.",
"download-tour":"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435 \u043d\u0430 \u0442\u0443\u0440\u0430 \u0437\u0430 \u0432\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043e\u0444\u043b\u0430\u0439\u043d","change-to-drag-and-release":"\u041f\u0440\u043e\u043c\u0435\u043d\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u041f\u043b\u044a\u0437\u0433\u0430\u043d\u0435 \u0438 \u041f\u0443\u0441\u043a\u0430\u043d\u0435",
accept:"\u041f\u0440\u0438\u0435\u043c\u0435\u0442\u0435",cancel:"\u041e\u0442\u043a\u0430\u0437","storage-not-provided-bookmark":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0442\u043e \u0441\u044a\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e. \u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u0438 \u0434\u0430 \u044f \u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0438\u0442\u0435.",
"dont-display-again":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u0432\u0430\u0439 \u0442\u0430\u0437\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0442\u043d\u043e\u0432\u043e","web-server-required":"\u0422\u043e\u0437\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u0435\u043b\u0435\u043d \u0442\u0443\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u043f\u0443\u0441\u043d\u0430\u0442 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \u041c\u043e\u043b\u044f, \u043a\u0430\u0447\u0435\u0442\u0435 \u0433\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e.\n\u0410\u043a\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u0435, \u0438\u0437\u0442\u0435\u0433\u043b\u0435\u0442\u0435 htm \u0444\u0430\u0439\u043b\u0430 (\u0438\u043b\u0438 \u0446\u044f\u043b\u0430\u0442\u0430 \u043f\u0430\u043f\u043a\u0430 \u043d\u0430 \u0442\u0443\u0440\u0430) \u0432\u044a\u0440\u0445\u0443 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e TourViewer.",
download:"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435","change-to-click-and-move":"\u041f\u0440\u043e\u043c\u0435\u043d\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u041a\u043b\u0438\u043a\u0432\u0430\u043d\u0435 \u0438 \u041f\u0440\u0435\u043c\u0435\u0441\u0442\u0432\u0430\u043d\u0435",yes:"\u0434\u0430","delete-downloaded":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043d\u0435","use-safari-for-vr":"\u041f\u0440\u0435\u043f\u043e\u0440\u044a\u0447\u0432\u0430\u043c\u0435 Safari, \u0437\u0430 \u0434\u0430 \u0440\u0430\u0437\u0433\u043b\u0435\u0434\u0430\u0442\u0435 \u0442\u043e\u0437\u0438 \u0442\u0443\u0440 \u0432 \u0440\u0435\u0436\u0438\u043c VR",
"exit-fullscreen":"\u0418\u0437\u043b\u0435\u0437\u0442\u0435 \u043e\u0442 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d",no:"\u043d\u0435","download-failed":"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435\u0442\u043e \u0441\u0435 \u043f\u0440\u043e\u0432\u0430\u043b\u0438","giroscope-disabled-http":"\u0418\u043c\u0430\u0442\u0435 \u0434\u043e\u0441\u0442\u044a\u043f \u0434\u043e \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0447\u0440\u0435\u0437 http, \u0442\u0430\u043a\u0430 \u0447\u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0434\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u0442\u043e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0440\u0435\u0436\u0438\u043c\u044a\u0442 VR \u0441\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0438, \u043c\u043e\u043b\u044f, \u043e\u0442\u0432\u043e\u0440\u0435\u0442\u0435 \u0433\u043e \u0447\u0440\u0435\u0437 https, \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0442\u0435.",
"cookies-notice":"\u0422\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0438 \u0437\u0430 \u0441\u044a\u0431\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0430\u043d\u043d\u0438 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435\u0442\u043e. \u0417\u0430 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043c\u043e\u043b\u044f, \u043f\u043e\u0441\u0435\u0442\u0435\u0442\u0435 <a> \u041f\u0440\u0430\u0432\u0438\u043b\u0430\u0442\u0430 \u0437\u0430 \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0438\u0442\u0435 </a>.",
"use-cardboard":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 Cardboard","launch-default-browser":"\u0421\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u044a\u0440\u0430 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435","refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435","rotate-device":"\u041c\u043e\u043b\u044f \u0437\u0430\u0432\u044a\u0440\u0442\u0435\u0442\u0435 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"exit-vr":"\u0418\u0437\u043b\u0438\u0437\u0430\u043d\u0435 \u043e\u0442 \u0440\u0435\u0436\u0438\u043c VR",reject:"\u041e\u0442\u0445\u0432\u044a\u0440\u043b\u0435\u0442\u0435","disable-measure":"Stop measuring",downloading:"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435","cardboard-v2":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Cardboard v2, \u043a\u043e\u0438\u0442\u043e \u0440\u0430\u0437\u043f\u043e\u043b\u0430\u0433\u0430\u0442 \u0441 \u0431\u0443\u0442\u043e\u043d, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u043e\u0433\u043b\u0435\u0434\u043d\u0435\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442\u0430 \u0438 \u0434\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0431\u0443\u0442\u043e\u043d\u0430, \u0437\u0430 \u0434\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0442\u043e \u043c\u0443.",
"enable-video-audio-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e?","storage-not-provided-launch-from-desktop":"\u041c\u043e\u043b\u044f, \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u0431\u0438\u043a\u043e\u043b\u043a\u0430\u0442\u0430 \u043e\u0442 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430, \u0437\u0430 \u0434\u0430 \u044f \u0438\u0437\u0442\u0435\u0433\u043b\u0438\u0442\u0435.",
downloaded:"\u0422\u043e\u0437\u0438 \u0442\u0443\u0440 \u0435 \u0438\u0437\u0442\u0435\u0433\u043b\u0435\u043d \u0437\u0430 \u0432\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043e\u0444\u043b\u0430\u0439\u043d.","samsung-internet-vr-app-info":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Gear VR, \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 \u0441 \u0442\u043e\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0441\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043b\u0438 Samsung Internet for VR, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0438 \u0437\u0430 \u043f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR. \u0422\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 Samsung Internet \u0431\u0440\u0430\u0443\u0437\u044a\u0440 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435.",
"samsung-internet-vr-info":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Gear VR, \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 \u0441 \u0442\u043e\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0441\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043b\u0438 Samsung Internet for VR, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0438 \u0437\u0430 \u043f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR. \u0421\u0435\u0433\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u043b\u043e\u0436\u0438\u0442\u0435 \u043c\u043e\u0431\u0438\u043b\u043d\u0438\u044f \u0441\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0432 \u043e\u0447\u0438\u043b\u0430\u0442\u0430 \u0437\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043d\u0430 \u0440\u0435\u0430\u043b\u043d\u043e\u0441\u0442.",
"enable-video-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0430 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0440\u0435\u0436\u0438\u043c\u044a\u0442 VR \u0441\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0438 \u0437\u0430 \u0442\u043e\u0437\u0438 \u0441\u0430\u0439\u0442.",
"\u0417\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043d\u043e \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043c\u043e\u043b\u044f, \u043a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438 \u0438 \u043f\u0440\u0438\u0435\u043c\u0435\u0442\u0435 \u0438\u0441\u043a\u0430\u043d\u0435\u0442\u043e \u0437\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435."],
"storage-not-provided-launch-from-homescreen":"\u041c\u043e\u043b\u044f, \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u0431\u0438\u043a\u043e\u043b\u043a\u0430\u0442\u0430 \u043e\u0442 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u043d\u0438\u044f \u0435\u043a\u0440\u0430\u043d, \u0437\u0430 \u0434\u0430 \u044f \u0438\u0437\u0442\u0435\u0433\u043b\u0438\u0442\u0435.","enter-fullscreen":"\u0412\u043b\u0435\u0437\u0442\u0435 \u0432 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d",
"use-cardboard-v2":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 Cardboard v2",unmute:"\u041f\u0443\u0441\u043a\u0430\u043d\u0435 \u0437\u0432\u0443\u043a","enter-vr":"\u0412\u043b\u0435\u0437 \u0432\u044a\u0432 VR \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435","enable-measure":"Start measuring","use-cardboard-info":"\u041c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u0430\u043a\u0432\u0438 \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 Google Cardboard \u043e\u0447\u0438\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR.",
"ar-mobile-info":"\u041c\u0435\u0434\u043b\u0435\u043d\u043e \u043f\u0440\u0435\u043c\u0435\u0441\u0442\u0432\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u0441\u0438, \u0437\u0430 \u0434\u0430 \u0441\u043a\u0430\u043d\u0438\u0440\u0430\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u0442\u043e \u0441\u0438.\n\u0429\u0435 \u0441\u0435 \u043f\u043e\u044f\u0432\u0438 \u043a\u0440\u044a\u0433, \u043a\u043e\u0433\u0430\u0442\u043e \u0431\u044a\u0434\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d \u043f\u043e\u0432\u044a\u0440\u0445\u043d\u043e\u0441\u0442\u0442\u0430.\n\u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u043d\u0430 \u0435\u043a\u0440\u0430\u043d\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u043e\u0431\u0435\u043a\u0442\u0430 \u0442\u0430\u043c.",
"use-default-cardboard":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435","enable-audio-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0430\u0443\u0434\u0438\u043e?"},"fi-fi":{mute:"Poista \u00e4\u00e4ni k\u00e4yt\u00f6st\u00e4","cardboard-v1":"Mik\u00e4li et ole varma, mit\u00e4 Cardboard-versiota k\u00e4yt\u00e4t, valitse oletusarvoinen hotspot-hallinta. T\u00e4m\u00e4n j\u00e4lkeen katsomalla hotspotia, toiminto k\u00e4ynnistyy.",
"download-tour":"Lataa t\u00e4m\u00e4 sis\u00e4lt\u00f6 offline-toistoa varten","change-to-drag-and-release":"Muuta ohjaustilaa vet\u00e4m\u00e4ll\u00e4 ja vapauttamalla",accept:"Hyv\u00e4ksy",download:"Lataa","storage-not-provided-bookmark":"Tallennus ep\u00e4onnistui. Kokeile lis\u00e4t\u00e4 t\u00e4m\u00e4 verkkosivu kirjanmerkkeihin ja suorita lataus uudelleen.","dont-display-again":"\u00c4l\u00e4 n\u00e4yt\u00e4 t\u00e4t\u00e4 ilmoitusta uudelleen","web-server-required":"T\u00e4t\u00e4 sis\u00e4lt\u00f6\u00e4 ei voi toistaa paikalliselta asemalta. Lataa sis\u00e4lt\u00f6 internet-palvelimelle ja yrit\u00e4 uudelleen.\nVoit my\u00f6s vet\u00e4\u00e4 htm-tiedoston (tai koko kansion) TourViewer-sovelluskuvakkeen p\u00e4\u00e4lle.",
cancel:"Sulje","change-to-click-and-move":"Muuta ohjaustilaa klikkaamalla ja siirt\u00e4m\u00e4ll\u00e4",yes:"Kyll\u00e4","delete-downloaded":"Poista","use-safari-for-vr":"Suosittelemme Safari-selainta t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa.","exit-fullscreen":"Sulje koko n\u00e4yt\u00f6n n\u00e4kym\u00e4",no:"Ei","download-failed":"Lataus ep\u00e4onnistui","giroscope-disabled-http":"K\u00e4yt\u00e4t t\u00e4t\u00e4 verkkosivua http:n kautta, joten laitteesi liiketunnistimet sek\u00e4 VR-tila on poistettu k\u00e4yt\u00f6st\u00e4. Ota ne k\u00e4ytt\u00f6\u00f6n siirtym\u00e4ll\u00e4 sivulle https:n kautta.",
"cookies-notice":"T\u00e4m\u00e4 verkkosivu k\u00e4ytt\u00e4\u00e4 ev\u00e4steit\u00e4 k\u00e4ytt\u00f6tilastojen ker\u00e4\u00e4miseen. Lis\u00e4tietoja <a>ev\u00e4stek\u00e4yt\u00e4nn\u00f6st\u00e4</a>.","use-cardboard":"K\u00e4yt\u00e4 Cardboardia","launch-default-browser":"K\u00e4ynnist\u00e4 oletusselaimessa","refresh-downloaded":"P\u00e4ivit\u00e4","rotate-device":"K\u00e4\u00e4nn\u00e4 laitettasi","exit-vr":"Poistu VR-tilasta",reject:"Hylk\u00e4\u00e4","disable-measure":"Lopeta mittaaminen",
downloading:"Ladataan","cardboard-v2":"Mik\u00e4li sinulla on Cardboard v2 -virtuaalilasit, joissa on painike, voit katsoa hotspotia ja aktivoida sen painamalla painiketta.","enable-video-audio-prompt":"Otetaanko \u00e4\u00e4ni ja video k\u00e4ytt\u00f6\u00f6n?","storage-not-provided-launch-from-desktop":"Uudelleenk\u00e4ynnist\u00e4 t\u00e4m\u00e4 sis\u00e4lt\u00f6 ty\u00f6p\u00f6yd\u00e4n kuvakkeesta aloittaaksesi lataamisen.",downloaded:"T\u00e4m\u00e4 sis\u00e4lt\u00f6 on ladattu offline-toistoa varten",
"samsung-internet-vr-app-info":"Mik\u00e4li sinulla on t\u00e4m\u00e4n laitteen kanssa yhteensopivat Gear VR -virtuaalilasit ja olet asentanut Samsung Internet for VR:n, voit k\u00e4ytt\u00e4\u00e4 virtuaalilaseja t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa. Sinun on lis\u00e4ksi m\u00e4\u00e4ritett\u00e4v\u00e4 Samsung Internet oletusselaimeksi.","samsung-internet-vr-info":"Mik\u00e4li sinulla on t\u00e4m\u00e4n laitteen kanssa yhteensopivat Gear VR -virtuaalilasit ja olet asentanut Samsung Internet for VR:n, voit k\u00e4ytt\u00e4\u00e4 virtuaalilaseja t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa. Aseta \u00e4lypuhelin virtuaalilaseihin aloittaaksesi.",
"enable-video-prompt":"Otetaanko video k\u00e4ytt\u00f6\u00f6n?","giroscope-disabled-safari-request-permission":["Laitteesi liiketunnistimen k\u00e4ytt\u00f6oikeus ja VR-tila on poistettu k\u00e4yt\u00f6st\u00e4 t\u00e4ll\u00e4 sivustolla.","N\u00e4hd\u00e4ksesi t\u00e4m\u00e4n verkkosivun oikein, valitse jatka ja hyv\u00e4ksy lupapyynt\u00f6 pyydett\u00e4ess\u00e4."],"storage-not-provided-launch-from-homescreen":"Uudelleenk\u00e4ynnist\u00e4 t\u00e4m\u00e4 sis\u00e4lt\u00f6 kotin\u00e4yt\u00f6n kuvakkeesta aloittaaksesi lataamisen",
"enter-fullscreen":"Avaa koko n\u00e4yt\u00f6n n\u00e4kym\u00e4","use-cardboard-v2":"K\u00e4yt\u00e4 Cardboard v2:sta",unmute:"Ota \u00e4\u00e4ni k\u00e4ytt\u00f6\u00f6n","enter-vr":"Siirry VR-tilaan","enable-measure":"Aloita mittaaminen","use-cardboard-info":"Voit k\u00e4ytt\u00e4\u00e4 mit\u00e4 tahansa yhteensopivia Google Cardboard -virtuaalilaseja katsellaksesi t\u00e4t\u00e4 sis\u00e4lt\u00f6\u00e4 VR-tilassa.","ar-mobile-info":"Liikuta laitteesi hitaasti avaruuteesi skannataksesi.\nYmpyr\u00e4 ilmestyy, kun pinta l\u00f6ytyy.\nPit\u00e4k\u00f6nt\u00e4n\u00e4 n\u00e4pp\u00e4in paikkaa objektia siell\u00e4.",
"use-default-cardboard":"K\u00e4yt\u00e4 oletuksena","enable-audio-prompt":"Otetaanko \u00e4\u00e4ni k\u00e4ytt\u00f6\u00f6n?"},"sk-sk":{mute:"St\u00ed\u0161i\u0165","cardboard-v1":"Ak ste si nie ist\u00ed, ktor\u00fa verziu Cardboardu pou\u017e\u00edvate, vyberte si predvolen\u00e9 ovl\u00e1danie hotspotu. Potom sa jednoducho pozriete na hotspot a po\u010dkajte, k\u00fdm sa akcia nespust\u00ed.","download-tour":"Stiahnu\u0165 prehliadku na hranie v offline re\u017eime","change-to-drag-and-release":"Zmeni\u0165 re\u017eim ovl\u00e1dania na Presun\u00fa\u0165 a Uvo\u013eni\u0165",
accept:"s\u00fahlasi\u0165",cancel:"Zru\u0161i\u0165","storage-not-provided-bookmark":"Trval\u00e9 \u00falo\u017eisko odmietnut\u00e9. Sk\u00faste si t\u00fato webov\u00fa str\u00e1nku ulo\u017ei\u0165 a na\u010d\u00edta\u0165 ju znova.","dont-display-again":"Tieto inform\u00e1cie u\u017e nezobrazova\u0165","web-server-required":"T\u00e1to virtu\u00e1lna prehliadka sa ned\u00e1 prehra\u0165 z lok\u00e1lneho disku. Nahrajte ju na internet a sk\u00faste to znova.\nAk chcete, potiahnite s\u00fabor htm (alebo cel\u00fd prie\u010dinok prehliadky) na ikonu aplik\u00e1cie TourViewer.",
download:"Stiahnu\u0165","change-to-click-and-move":"Zmeni\u0165 re\u017eim ovl\u00e1dania na Klikn\u00fa\u0165 a Presun\u00fa\u0165",yes:"\u00e1no","delete-downloaded":"Zmaza\u0165","use-safari-for-vr":"Odpor\u00fa\u010dame pou\u017e\u00edva\u0165 Safari prehliada\u010d pre t\u00fato prehliadku v re\u017eime VR","exit-fullscreen":"Ukon\u010di\u0165 cel\u00fa obrazovku",no:"nie","download-failed":"S\u0165ahovanie zlyhalo","giroscope-disabled-http":"Na t\u00fato webov\u00fa str\u00e1nku pristupujete cez http protokol, preto pr\u00edstup k pohybu a orient\u00e1cii v\u00e1\u0161ho zariadenia a re\u017eim VR s\u00fa deaktivovan\u00e9. Ak ich chcete povoli\u0165, nav\u0161t\u00edvte str\u00e1nku cez https.",
"cookies-notice":"T\u00e1to webov\u00e1 str\u00e1nka pou\u017e\u00edva s\u00fabory cookie na zhroma\u017e\u010fovanie \u0161tatist\u00edk pou\u017e\u00edvania. \u010eal\u0161ie inform\u00e1cie n\u00e1jdete v <a> pravidl\u00e1ch pou\u017e\u00edvania s\u00faborov cookie </a>.","use-cardboard":"Pou\u017eite Cardboard okuliare.","launch-default-browser":"Spusti\u0165 v predvolenom prehliada\u010di","refresh-downloaded":"Obnovi\u0165","rotate-device":"Oto\u010dte svoje zariadenie","exit-vr":"Ukon\u010denie VR",
reject:"Odmietnu\u0165","disable-measure":"Ukon\u010di\u0165 meranie",downloading:"S\u0165ahovanie","cardboard-v2":"Ak m\u00e1te n\u00e1hlavn\u00fa s\u00fapravu Cardboard v2, ktor\u00e1 je dod\u00e1van\u00e1 s tla\u010didlom, m\u00f4\u017eete sa pozrie\u0165 na hotspot a stla\u010den\u00edm tla\u010didla spusti\u0165 akciu.","enable-video-audio-prompt":"Povoli\u0165 video a zvuk?","storage-not-provided-launch-from-desktop":"Znovu na\u010d\u00edtajte prehliadku pomocou desktop ikony pre jej stiahnite.",
downloaded:"T\u00e1to prehliadka je stiahnut\u00e1 na hranie v offline re\u017eime.","samsung-internet-vr-app-info":"Ak m\u00e1te Gear VR sl\u00fachadl\u00e1\u00e1 kompatibiln\u00e9 s t\u00fdmto zariaden\u00edm a m\u00e1te nain\u0161talovan\u00fd program Samsung Internet pre VR, m\u00f4\u017eete ho tie\u017e pou\u017ei\u0165 na prezeranie tohto obsahu vo VR. Mus\u00edte si nastavi\u0165 Samsung Internet ako predvolen\u00fd prehliada\u010d.","samsung-internet-vr-info":"Ak m\u00e1te Gear VR sl\u00fachadl\u00e1 kompatibiln\u00e9 s t\u00fdmto zariaden\u00edm a m\u00e1te nain\u0161talovan\u00fd program Samsung Internet pre VR, m\u00f4\u017eete ho tie\u017e pou\u017ei\u0165 na prezeranie tohto obsahu vo VR. Sta\u010d\u00ed teraz vlo\u017ei\u0165 mobiln\u00fd telef\u00f3n do n\u00e1hlavnej s\u00fapravy.",
"enable-video-prompt":"Povoli\u0165 video?","giroscope-disabled-safari-request-permission":["Pre t\u00fato str\u00e1nku s\u00fa pr\u00edstup k pohybu a orient\u00e1cii v\u00e1\u0161ho zariadenia a re\u017eim VR deaktivovan\u00e9.","Aby ste korektne videli t\u00fato webov\u00fa str\u00e1nku, pros\u00edm kliknite pokra\u010dova\u0165 a akceptujte po\u017eadovan\u00e9 povolenie."],"storage-not-provided-launch-from-homescreen":"Znovu na\u010d\u00edtajte prehliadku pomocou ikony na ploche pre jej stiahnite.",
"enter-fullscreen":"Prejs\u0165 na cel\u00fa obrazovku","use-cardboard-v2":"Pou\u017eite Cardboard v2",unmute:"Zapn\u00fa\u0165 zvuk","enter-vr":"Vlo\u017ei\u0165 VR obsah","enable-measure":"Za\u010da\u0165 meranie","use-cardboard-info":"Na zobrazenie tohto obsahu vo VR m\u00f4\u017eete pou\u017ei\u0165 \u013eubovo\u013en\u00fa kompatibiln\u00fa n\u00e1hlavn\u00fa s\u00fapravu Google Cardboard.","ar-mobile-info":"Pomaly pohybujte svojim zariaden\u00edm, aby ste skanovali svoj priestor.\nKruh sa zobraz\u00ed, ke\u010f sa n\u00e1jde povrch.\nDotknite sa obrazovky, aby ste umiestnili objekt tam.",
"use-default-cardboard":"Pou\u017ei\u0165 predvolen\u00e9","enable-audio-prompt":"Povoli\u0165 zvuk?"},"uk-ua":{mute:"\u0412\u0438\u043c\u043a\u043d\u0443\u0442\u0438 \u0437\u0432\u0443\u043a","cardboard-v1":"\u042f\u043a\u0449\u043e \u0432\u0438 \u043d\u0435 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u044f\u043a\u0443 \u0432\u0435\u0440\u0441\u0456\u044e Cardboard \u0432\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u0435, \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c. \u041f\u043e\u0442\u0456\u043c \u0432\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0435\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0442\u0430 \u043f\u043e\u0447\u0435\u043a\u0430\u0439\u0442\u0435, \u0434\u043e\u043a\u0438 \u0434\u0456\u044f \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f.",
"download-tour":"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0442\u0435 \u0442\u0443\u0440 \u0434\u043b\u044f \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456","change-to-drag-and-release":"\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430 \u041f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0456 \u0432\u0456\u0434\u043f\u0443\u0441\u0442\u0456\u0442\u044c",
accept:"\u041f\u0440\u0438\u0439\u043c\u0456\u0442\u044c",cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438","storage-not-provided-bookmark":"\u041f\u043e\u0441\u0442\u0456\u0439\u043d\u0435 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u043d\u043d\u044f \u0437\u0430\u0431\u043e\u0440\u043e\u043d\u0435\u043d\u043e. \u0421\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u0446\u044e \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0442\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u0457\u0457.",
"dont-display-again":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u0443\u0439\u0442\u0435 \u0446\u044e \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e \u0437\u043d\u043e\u0432\u0443","web-server-required":"\u0426\u0435\u0439 \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u0442\u0443\u0440 \u043d\u0435 \u043c\u043e\u0436\u043d\u0430 \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0442\u0435 \u0439\u043e\u0433\u043e \u0432 \u0406\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0456 \u043f\u043e\u0432\u0442\u043e\u0440\u0456\u0442\u044c \u0441\u043f\u0440\u043e\u0431\u0443.\n\u042f\u043a\u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435, \u043f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0444\u0430\u0439\u043b htm (\u0430\u0431\u043e \u0432\u0441\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0443\u0440\u0443) \u043d\u0430 \u043f\u0456\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438 TourViewer.",
download:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438","change-to-click-and-move":"\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430 \u041a\u043b\u0430\u0446\u043d\u0456\u0442\u044c \u0456 \u043f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0456\u0442\u044c",yes:"\u0442\u0430\u043a","delete-downloaded":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438","use-safari-for-vr":"\u041c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0454\u043c\u043e Safari \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0442\u0443\u0440\u0443 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 VR",
"exit-fullscreen":"\u0412\u0438\u0439\u0442\u0438 \u0437 \u043f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0443",no:"\u043d\u0456","download-failed":"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438","giroscope-disabled-http":"\u0412\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0446\u0456\u0454\u0457 \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 http, \u0442\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0440\u0443\u0445\u0443 \u0442\u0430 \u043e\u0440\u0456\u0454\u043d\u0442\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u044e \u0442\u0430 \u0440\u0435\u0436\u0438\u043c VR \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e. \u0429\u043e\u0431 \u0443\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0457\u0445, \u043f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0434\u043e \u043d\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 https.",
"cookies-notice":"\u0426\u044f \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 \u0444\u0430\u0439\u043b\u0438 cookie \u0434\u043b\u044f \u0437\u0431\u043e\u0440\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f. \u0414\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e\u0457 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u0457 \u0432\u0456\u0434\u0432\u0456\u0434\u0430\u0439\u0442\u0435 <a> \u041f\u043e\u043b\u0456\u0442\u0438\u043a\u0443 \u0449\u043e\u0434\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0444\u0430\u0439\u043b\u0456\u0432 cookie</a>.",
"use-cardboard":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 Cardboard","launch-default-browser":"\u0417\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","refresh-downloaded":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438","rotate-device":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0456\u0442\u044c \u0441\u0432\u0456\u0439 \u043f\u0440\u0438\u0441\u0442\u0440\u0456\u0439",
"exit-vr":"\u0412\u0438\u0439\u0434\u0456\u0442\u044c \u0456\u0437 VR",reject:"\u0412\u0456\u0434\u0445\u0438\u043b\u0438\u0442\u0438","disable-measure":"\u041f\u0440\u0438\u043f\u0438\u043d\u0456\u0442\u044c \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f",downloading:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f","cardboard-v2":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Cardboard v2, \u044f\u043a\u0430 \u043f\u043e\u0441\u0442\u0430\u0447\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u043a\u043d\u043e\u043f\u043a\u043e\u044e, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0442\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0443\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0443, \u0449\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0457\u0457.",
"enable-video-audio-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0432\u0456\u0434\u0435\u043e \u0442\u0430 \u0430\u0443\u0434\u0456\u043e?","storage-not-provided-launch-from-desktop":"\u0429\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u043e\u0433\u043b\u044f\u0434 \u0456\u0437 \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0440\u043e\u0431\u043e\u0447\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0456.",
downloaded:"\u0426\u0435\u0439 \u0442\u0443\u0440 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043e \u0434\u043b\u044f \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456.","samsung-internet-vr-app-info":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Gear VR, \u0441\u0443\u043c\u0456\u0441\u043d\u0430 \u0437 \u0446\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u0454\u043c, \u0456 \u0432\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0457 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u0440\u043e\u0431\u0438\u0442\u0438 Samsung Internet \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c.",
"samsung-internet-vr-info":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Gear VR, \u0441\u0443\u043c\u0456\u0441\u043d\u0430 \u0437 \u0446\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u0454\u043c, \u0456 \u0432\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0457 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0456, \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0457 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR, \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0440\u0430\u0437 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043f\u0456\u0434\u2019\u0454\u0434\u043d\u0430\u0442\u0438 \u043c\u043e\u0431\u0456\u043b\u044c\u043d\u0438\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0434\u043e \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0438.",
"enable-video-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0432\u0456\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0440\u0443\u0445\u0443 \u0442\u0430 \u043e\u0440\u0456\u0454\u043d\u0442\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u044e, \u0430 \u0442\u0430\u043a\u043e\u0436 \u0440\u0435\u0436\u0438\u043c VR \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0443.",
"\u0429\u043e\u0431 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u043d\u0443\u0442\u0438 \u0446\u044e \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443, \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u00ab\u041f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438\u00bb \u0442\u0430 \u043f\u0440\u0438\u0439\u043c\u0456\u0442\u044c \u0437\u0430\u043f\u0438\u0442 \u043d\u0430 \u0434\u043e\u0437\u0432\u0456\u043b, \u044f\u043a\u0449\u043e \u0437\u2019\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0438\u0442."],
"storage-not-provided-launch-from-homescreen":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0442\u0443\u0440 \u0437\u0456 \u0437\u043d\u0430\u0447\u043a\u0430 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0435\u043a\u0440\u0430\u043d\u0430, \u0449\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438.","enter-fullscreen":"\u041f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0443 \u043f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c",
"use-cardboard-v2":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 Cardboard v2",unmute:"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0437\u0432\u0443\u043a","enter-vr":"\u041e\u0431\u0435\u0440\u0456\u0442\u044c \u0432\u043c\u0456\u0441\u0442 VR","enable-measure":"\u041f\u043e\u0447\u043d\u0456\u0442\u044c \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u0442\u0438","use-cardboard-info":"\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0431\u0443\u0434\u044c-\u044f\u043a\u0443 \u0441\u0443\u043c\u0456\u0441\u043d\u0443 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0443 Google Cardboard \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR.",
"ar-mobile-info":"\u041f\u043e\u0432\u0456\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0456\u0449\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0440\u0456\u0439, \u0449\u043e\u0431 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0443\u0432\u0430\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u0456\u0440.\n\u041a\u043e\u043b\u0438 \u0431\u0443\u0434\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u044e, \u0437\u2019\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043a\u0456\u043b\u044c\u0446\u0435.\n\u0422\u043e\u0440\u043a\u043d\u0456\u0442\u044c\u0441\u044f \u0435\u043a\u0440\u0430\u043d\u0430, \u0449\u043e\u0431 \u0440\u043e\u0437\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0442\u0430\u043c \u043e\u0431\u2019\u0454\u043a\u0442.",
"use-default-cardboard":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","enable-audio-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0430\u0443\u0434\u0456\u043e?"},"en-us":{mute:"Mute","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Change control mode to Drag and Release",accept:"Accept",cancel:"Cancel","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
download:"Download","change-to-click-and-move":"Change control mode to Click and Move",yes:"yes","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Exit fullscreen",no:"no","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"This web page uses cookies to collect usage statistics. For more information, please visit the <a>Cookie Policy</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Reject","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Enable video and audio?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Enable video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Enter fullscreen","use-cardboard-v2":"Use Cardboard v2",unmute:"Unmute","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Slowly move your device to scan your space.\nA ring will appear when a surface is found.\nTap the screen to place the object there.","use-default-cardboard":"Use Default","enable-audio-prompt":"Enable audio?"},"sv-se":{mute:"Inaktivera ljud","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u00c4ndra kontrolll\u00e4ge f\u00f6r att dra och sl\u00e4ppa",accept:"Acceptera",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"\u00c4ndra kontrolll\u00e4ge f\u00f6r att klicka och flytta",yes:"ja","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Avsluta fullsk\u00e4rmen",no:"Nej","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Denna webbsida anv\u00e4nder cookies f\u00f6r att samla in anv\u00e4ndningsstatistik. F\u00f6r mer information, bes\u00f6k <a>Cookie Policy</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Avvisa","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Aktivera ljud och video?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Aktivera video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Ange fullsk\u00e4rm","use-cardboard-v2":"Use Cardboard v2",unmute:"Aktivera ljud","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Flytta enheten sakta f\u00f6r att skanna rummet.\nEn ring kommer att visas n\u00e4r en yta hittas.\nTryck p\u00e5 sk\u00e4rmen f\u00f6r att placera objektet d\u00e4r.","use-default-cardboard":"Use Default","enable-audio-prompt":"Aktivera ljud?"},"id-id":{mute:"Mute","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Change control mode to Drag and Release",accept:"Menerima",cancel:"Cancel","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
download:"Download","change-to-click-and-move":"Change control mode to Click and Move",yes:"yes","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Exit fullscreen",no:"no","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Halaman web ini menggunakan cookie untuk mengumpulkan statistik penggunaan. Untuk informasi lebih lanjut, silakan kunjungi <a>Kebijakan Cookie</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Menolak","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Enable video and audio?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Enable video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Enter fullscreen","use-cardboard-v2":"Use Cardboard v2",unmute:"Unmute","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Gerakkan perangkat Anda perlahan untuk memindai ruang Anda.\nLingkaran akan muncul ketika permukaan ditemukan.\nSentuh layar untuk meletakkan objek di sana.","use-default-cardboard":"Use Default","enable-audio-prompt":"Enable audio?"},"pt-br":{mute:"Desativar som","cardboard-v1":"Se voc\u00ea n\u00e3o tiver certeza de qual vers\u00e3o do Cardboard est\u00e1 usando, selecione o controle de ponto de acesso padr\u00e3o. Voc\u00ea simplesmente olha para um ponto de acesso e espera at\u00e9 que a a\u00e7\u00e3o seja acionada.",
"download-tour":"Download do Tour para reprodu\u00e7\u00e3o offline","change-to-drag-and-release":"Alterar controle para arrastar e soltar",accept:"Aceitar",cancel:"Cancelar","storage-not-provided-bookmark":"Armazenamento persistente negado. Tente marcar esta p\u00e1gina da Web e recarreg\u00e1-la.","dont-display-again":"N\u00e3o exibir essas informa\u00e7\u00f5es novamente","web-server-required":"Este passeio virtual n\u00e3o pode ser reproduzido a partir de uma unidade local. Envie-o para a Internet e tente novamente.\nSe preferir, arraste o arquivo htm (ou toda a pasta do tour) para o \u00edcone do aplicativo TourViewer.",
download:"Download","change-to-click-and-move":"Alterar controle para clicar e mover",yes:"sim","delete-downloaded":"Apagar","use-safari-for-vr":"Recomendamos o Safari para ver este passeio no modo VR","exit-fullscreen":"Sair da tela cheia",no:"n\u00e3o","download-failed":"Falha no Download","giroscope-disabled-http":"Voc\u00ea est\u00e1 acessando esta p\u00e1gina da Web por meio do http, para que o acesso \u00e0 orienta\u00e7\u00e3o e movimento do dispositivo e o modo VR sejam desativados, acesse-o atrav\u00e9s de https para ativ\u00e1-los.",
"cookies-notice":"Esta p\u00e1gina da web usa cookies para coletar estat\u00edsticas de uso. Para obter mais informa\u00e7\u00f5es, visite a <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Iniciar no navegador padr\u00e3o","refresh-downloaded":"Atualizar","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR",reject:"Rejeitar","disable-measure":"Stop measuring",downloading:"Baixando","cardboard-v2":"Se voc\u00ea tiver um fone de ouvido Cardboard v2, que vem com um bot\u00e3o, poder\u00e1 observar um ponto de acesso e pressionar o bot\u00e3o para acionar sua a\u00e7\u00e3o.",
"enable-video-audio-prompt":"Ativar \u00e1udio e v\u00eddeo?","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Voc\u00ea precisa tornar o Samsung Internet o seu padr\u00e3o. browser.",
"samsung-internet-vr-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Basta colocar o celular no fone de ouvido agora.","enable-video-prompt":"Ativar v\u00eddeo?","giroscope-disabled-safari-request-permission":["O acesso a movimento e orienta\u00e7\u00e3o do dispositivo e o modo VR est\u00e3o desativados para este site.","Para ver corretamente esta p\u00e1gina da web, clique em continuar e aceite a solicita\u00e7\u00e3o de permiss\u00e3o, se solicitado."],
"storage-not-provided-launch-from-homescreen":"Reinicie o tour no \u00edcone da tela inicial para fazer o download.","enter-fullscreen":"Entrar em tela cheia","use-cardboard-v2":"Use Cardboard v2",unmute:"Ativar som","enter-vr":"Inserir conte\u00fado VR","enable-measure":"Start measuring","use-cardboard-info":"Voc\u00ea pode usar qualquer fone de ouvido compat\u00edvel do Google Cardboard para visualizar este conte\u00fado em VR","ar-mobile-info":"Mova lentamente o dispositivo para escanear o espa\u00e7o.\nUm anel aparecer\u00e1 quando uma superf\u00edcie for encontrada.\nToque na tela para colocar o objeto ali.",
"use-default-cardboard":"Use o padr\u00e3o","enable-audio-prompt":"Ativar \u00e1udio?"},"it-it":{mute:"Disattiva audio","cardboard-v1":"Se non sei sicuro della versione di Cardboard, seleziona il controllo hotspot predefinito. Baster\u00e0 guardare un hotspot e attendere che l'azione venga attivata.","download-tour":"Scarica il tour per la riproduzione offline","change-to-drag-and-release":"Cambia modalit\u00e0 di controllo in Trascina e Rilascia",accept:"Accetta",cancel:"Annulla","storage-not-provided-bookmark":"Archiviazione persistente negata. Prova ad aggiungere questa pagina ai segnalibri e ricaricala.",
"dont-display-again":"Non mostrare pi\u00f9 queste informazioni","web-server-required":"Questo tour virtuale non pu\u00f2 essere riprodotto da un'unit\u00e0 locale. Caricalo su internet e riprova.\nIn alternativa, trascina il file html (o l'intera cartella del tour) sull'icona dell'app TourViewer.",download:"Scarica","change-to-click-and-move":"Cambia modalit\u00e0 di controllo in Clicca e Sposta",yes:"s\u00ec","delete-downloaded":"Elimina","use-safari-for-vr":"Consigliamo l'uso di Safari per visualizzare questo tour in modalit\u00e0 VR",
"exit-fullscreen":"Esci da schermo intero",no:"no","download-failed":"Download fallito","giroscope-disabled-http":"Stai accedendo a questa pagina tramite http, quindi l'accesso al movimento, all'orientamento e alla modalit\u00e0 VR del dispositivo \u00e8 disabilitato. Accedi tramite https per abilitarli.","cookies-notice":"Questo sito web utilizza i cookie per raccogliere statistiche di utilizzo. Per ulteriori informazioni, visita la <a>Politica sui Cookie</a>.","use-cardboard":"Usa Cardboard","launch-default-browser":"Apri nel browser predefinito",
"refresh-downloaded":"Aggiorna","rotate-device":"Ruota il dispositivo","exit-vr":"Esci dalla VR",reject:"Rifiuta","disable-measure":"Interrompi misurazione",downloading:"Download in corso","cardboard-v2":"Se hai un visore Cardboard v2, con un pulsante, guarda l'hotspot e premi il pulsante per attivare l'azione.","enable-video-audio-prompt":"Abilitare video e audio?","storage-not-provided-launch-from-desktop":"Avvia il tour dall'icona sul desktop per scaricarlo.",downloaded:"Questo tour \u00e8 stato scaricato per la riproduzione offline.",
"samsung-internet-vr-app-info":"Se hai un visore Gear VR compatibile con questo dispositivo e hai installato Samsung Internet for VR, puoi usarlo per visualizzare questo contenuto in VR. \u00c8 necessario impostare Samsung Internet come browser predefinito.","samsung-internet-vr-info":"Se hai un visore Gear VR compatibile con questo dispositivo e hai installato Samsung Internet for VR, puoi usarlo per visualizzare questo contenuto in VR. Basta inserire il telefono nel visore ora.","enable-video-prompt":"Abilitare il video?",
"giroscope-disabled-safari-request-permission":["L'accesso al movimento e all'orientamento del dispositivo e la modalit\u00e0 VR sono disabilitati per questo sito.","Per visualizzare correttamente questa pagina, fai clic su continua e accetta la richiesta di autorizzazione se viene mostrata."],"storage-not-provided-launch-from-homescreen":"Avvia il tour dall'icona nella schermata iniziale per scaricarlo.","enter-fullscreen":"Vai a schermo intero","use-cardboard-v2":"Usa Cardboard v2",unmute:"Attiva audio",
"enter-vr":"Accedi ai contenuti VR","enable-measure":"Inizia misurazione","use-cardboard-info":"Puoi usare un visore compatibile con Google Cardboard per visualizzare questo contenuto in VR.","ar-mobile-info":"Muovi lentamente il dispositivo per scansionare lo spazio.\nUn anello apparir\u00e0 quando viene trovata una superficie.\nTocca lo schermo per posizionare l'oggetto l\u00ec.","use-default-cardboard":"Usa Predefinito","enable-audio-prompt":"Abilitare l'audio?"},"zh-tw":{mute:"\u975c\u97f3","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"\u4e0b\u8f09\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u96e2\u7dda\u64ad\u653e","change-to-drag-and-release":"\u5c07\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u70ba\u201c\u62d6\u653e\u6a21\u5f0f\u201c",accept:"\u63a5\u53d7",cancel:"\u53d6\u6d88","storage-not-provided-bookmark":"\u88dd\u7f6e\u5167\u6c38\u4e45\u5b58\u5132\u88ab\u62d2\u7d55\u3002\u8acb\u5617\u8a66\u5c07\u6b64\u7db2\u9801\u65b0\u589e\u70ba\u66f8\u7c64\uff0c\u4e26\u91cd\u65b0\u8f09\u5165\u3002","dont-display-again":"\u4e0d\u518d\u986f\u793a\u672c\u8a0a\u606f",
"web-server-required":"\u672c\u865b\u64ec\u5c0e\u89bd\u7121\u6cd5\u5728\u672c\u5730\u96fb\u8166\u4e0a\u64ad\u653e\u3002 \u8acb\u5c07\u5176\u4e0a\u50b3\u5230\u7db2\u969b\u7db2\u8def\u4f3a\u670d\u5668\uff0c\u7136\u5f8c\u91cd\u8a66\u3002\n\u5982\u679c\u9700\u8981\u672c\u5730\u9810\u89bd\uff0c\u8acb\u5c07htm\u6a94\u6848\uff08\u6216\u865b\u64ec\u5c0e\u89bd\u7684\u6574\u500b\u8cc7\u6599\u593e\uff09\u62d6\u653e\u5230TourViewer\u61c9\u7528\u7a0b\u793a\u7684\u5716\u793a\u4e0a\u3002",download:"\u4e0b\u8f09",
"change-to-click-and-move":"\u5c07\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u70ba\u201c\u9ede\u64ca\u4e26\u79fb\u52d5\u201d",yes:"\u662f","delete-downloaded":"\u522a\u9664","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u9000\u51fa\u5168\u87a2\u5e55",no:"\u5426","download-failed":"\u4e0b\u8f09\u5931\u6557","giroscope-disabled-http":"\u60a8\u6b63\u5728\u901a\u904ehttp(\u672a\u52a0\u5bc6)\u700f\u89bd\u672c\u7db2\u9801\uff0c\u56e0\u6b64\u8a2d\u5099\u7684\u904b\u52d5\u548c\u65b9\u5411\u53d6\u7528\u6b0a\u9650\uff0c\u4ee5\u53caVR\u6a21\u5f0f\u5747\u5df2\u7981\u7528\uff0c\u8acb\u53e6\u901a\u904ehttps(\u52a0\u5bc6)\u7db2\u5740\u5c0d\u5176\u9032\u884c\u555f\u7528\u3002",
"cookies-notice":"\u8a72\u7db2\u9801\u4f7f\u7528cookie\u4f86\u6536\u96c6\u4f7f\u7528\u60c5\u6cc1\u7d71\u8a08\u4fe1\u606f\u3002 \u6709\u95dc\u66f4\u591a\u4fe1\u606f\uff0c\u8acb\u8a2a\u554f<a> Cookie\u653f\u7b56</a>\u3002","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"\u91cd\u65b0\u6574\u7406","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u62d2\u7d55","disable-measure":"Stop measuring",downloading:"\u6b63\u5728\u4e0b\u8f09",
"cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u5141\u8a31\u5f71\u7247\u53ca\u8072\u97f3\u64ad\u653e?","storage-not-provided-launch-from-desktop":"\u8acb\u5f9e\u684c\u9762\u9ede\u64ca\u5716\u793a\uff0c\u91cd\u65b0\u555f\u52d5\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u4e0b\u8f09\u3002",downloaded:"\u865b\u64ec\u5c0e\u89bd\u5df2\u4e0b\u8f09\uff0c\u53ef\u9032\u884c\u96e2\u7dda\u64ad\u653e\u3002",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"\u5141\u8a31\u5f71\u7247\u64ad\u653e?",
"giroscope-disabled-safari-request-permission":["\u8a72\u7db2\u7ad9\u5df2\u7981\u7528\u60a8\u8a2d\u5099\u7684\u904b\u52d5\u548c\u65b9\u5411\u53d6\u7528\u6b0a\u9650\uff0cVR\u6a21\u5f0f\u4e5f\u88ab\u7981\u7528\u3002","\u8981\u6b63\u78ba\u67e5\u770b\u672c\u7db2\u9801\uff0c\u8acb\u55ae\u64ca\u7e7c\u7e8c\uff0c\u4e26\u5728\u51fa\u73fe\u63d0\u793a\u6642\u63a5\u53d7\u8a31\u53ef\u8acb\u6c42\u3002"],"storage-not-provided-launch-from-homescreen":"\u8acb\u4e3b\u9801\u9762\u87a2\u5e55\u9ede\u64ca\u5716\u793a\uff0c\u91cd\u65b0\u555f\u52d5\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u4e0b\u8f09\u3002",
"enter-fullscreen":"\u9032\u5165\u5168\u87a2\u5e55","use-cardboard-v2":"Use Cardboard v2",unmute:"\u53d6\u6d88\u975c\u97f3","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u7de9\u6162\u79fb\u52d5\u8a2d\u5099\uff0c\u4ee5\u6383\u63cf\u7a7a\u9593\u3002\n\u7576\u627e\u5230\u8868\u9762\u6642\uff0c\u6703\u51fa\u73fe\u4e00\u500b\u5713\u5708\u3002\n\u9ede\u64ca\u5c4f\u5e55\uff0c\u5c07\u7269\u9ad4\u653e\u5728\u90a3\u88e1\u3002",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u5141\u8a31\u8072\u97f3\u64ad\u653e?"},"nb-no":{mute:"Skru av lyd","cardboard-v1":"Hvis du ikke er sikker, hvilken Cardboard versjon du bruker, velger du standard hotspot-kontrollen. Du vil da bare se p\u00e5 et hotspot og vente til handlingen utl\u00f8ses.","download-tour":"Last ned visningen, s\u00e5 den kan bli sett uten internett","change-to-drag-and-release":"Endre kontrollmodus til Trekk og Slipp",accept:"Aksepterer",cancel:"Avbryt",
"storage-not-provided-bookmark":"Vedvarende lagring nektet. Pr\u00f8v \u00e5 bokmerke denne nettsiden og laste den inn p\u00e5 nytt.","dont-display-again":"Ikke vis denne informasjonen igjen","web-server-required":"Denne virtuelle visningen kan ikke spilles av lokalt. Vennligst last den opp til internett, og fors\u00f8k igjen.\ndersom du prefererer det, kan du dra htm filen (eller hele mappen som inneholder visningen) over 'TourViewer' appen.",download:"Last ned","change-to-click-and-move":"Endre kontrollmodus til Klikk og Flytt",
yes:"Ja","delete-downloaded":"Slett","use-safari-for-vr":"Vi anbefaler Safari for \u00e5 se p\u00e5 venne visningen i VR modus","exit-fullscreen":"G\u00e5 ut av full skjerm",no:"Nei","download-failed":"Nedlastning feilet","giroscope-disabled-http":"Du er koblet til denne nettsiden via http. Dermed er enhetens bevegelses- og orienteringstilgang og VR-modus deaktivert. Koble til via https for \u00e5 aktivere denne.","cookies-notice":"Denne websiden bruker informasjonskapsler for \u00e5 samle inn bruksstatistikk. For mer informasjon, bes\u00f8k <a>retningslinjer for informasjonskapsler</a>.",
"use-cardboard":"Bruk Cardboard","launch-default-browser":"\u00c5pne i standard nettleser","refresh-downloaded":"Last inn p\u00e5 nytt","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR",reject:"Avvis","disable-measure":"Stop measuring",downloading:"Laster ned","cardboard-v2":"Dersom du har Cardboard versjon 2, hvilket kommer med en knapp, kan du kikke p\u00e5 en klikkbar ting i visningen, og bruke knappen for \u00e5 bruke disse tingene, p\u00e5 samme m\u00e5te som p\u00e5 en laptop eller telefon.",
"enable-video-audio-prompt":"Aktivere video og lyd?","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.",downloaded:"Denne visningen er lastet ned, s\u00e5 den kan bli sett uten internett.","samsung-internet-vr-app-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten og har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du m\u00e5 ogs\u00e5 gj\u00f8re Samsung Internet til standard nettleser.",
"samsung-internet-vr-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten, og du har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du trenger bare \u00e5 sette mobiltelefonen p\u00e5 headsettet n\u00e5.","enable-video-prompt":"Aktivere video?","giroscope-disabled-safari-request-permission":["Din enhet sin bevegelses- og orienterings tilgang, samt VR modus er deaktivert for denne nettsiden.","For \u00e5 se denne siden korrekt, vennligst klikk p\u00e5 fortsett og godta tillatelsesforesp\u00f8rselen hvis du blir bedt om dette."],
"storage-not-provided-launch-from-homescreen":"Start turen p\u00e5 nytt fra startskjermikonet for \u00e5 laste ned.","enter-fullscreen":"G\u00e5 til full skjerm","use-cardboard-v2":"Bruk Cardboard Versjon 2",unmute:"Skru p\u00e5 lyd","enter-vr":"\u00c5pne VR Modus","enable-measure":"Start measuring","use-cardboard-info":"Du kan bruke hvilke some helst Google Cardboard kompatible headsett for \u00e5 se denne visningen i VR.","ar-mobile-info":"Flytt enheten din sakte for \u00e5 skanne rommet ditt.\nEn ring vil vises n\u00e5r en overflate blir funnet.\nTrykk p\u00e5 skjermen for \u00e5 plassere objektet der.",
"use-default-cardboard":"Bruk Standard","enable-audio-prompt":"Aktivere audio?"},"pt-pt":{mute:"Desativar som","cardboard-v1":"Se voc\u00ea n\u00e3o tiver certeza de qual vers\u00e3o do Cardboard est\u00e1 usando, selecione o controle de ponto de acesso padr\u00e3o. Voc\u00ea simplesmente olha para um ponto de acesso e espera at\u00e9 que a a\u00e7\u00e3o seja acionada.","download-tour":"Download do Tour para reprodu\u00e7\u00e3o offline","change-to-drag-and-release":"Alterar controle para arrastar e soltar",
accept:"Aceitar",cancel:"Cancelar","storage-not-provided-bookmark":"Armazenamento persistente negado. Tente marcar esta p\u00e1gina da Web e recarreg\u00e1-la.","dont-display-again":"N\u00e3o exibir essas informa\u00e7\u00f5es novamente","web-server-required":"Este passeio virtual n\u00e3o pode ser reproduzido a partir de uma unidade local. Envie-o para a Internet e tente novamente.\nSe preferir, arraste o arquivo htm (ou toda a pasta do tour) para o \u00edcone do aplicativo TourViewer.",download:"Download",
"change-to-click-and-move":"Alterar controle para clicar e mover",yes:"sim","delete-downloaded":"Apagar","use-safari-for-vr":"Recomendamos o Safari para ver este passeio no modo VR","exit-fullscreen":"Sair da tela cheia",no:"n\u00e3o","download-failed":"Falha no Download","giroscope-disabled-http":"Voc\u00ea est\u00e1 acessando esta p\u00e1gina da Web por meio do http, para que o acesso \u00e0 orienta\u00e7\u00e3o e movimento do dispositivo e o modo VR sejam desativados, acesse-o atrav\u00e9s de https para ativ\u00e1-los.",
"cookies-notice":"Esta p\u00e1gina da web usa cookies para coletar estat\u00edsticas de uso. Para obter mais informa\u00e7\u00f5es, visite a <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Iniciar no navegador padr\u00e3o","refresh-downloaded":"Atualizar","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR",reject:"Rejeitar","disable-measure":"Stop measuring",downloading:"Baixando","cardboard-v2":"Se voc\u00ea tiver um fone de ouvido Cardboard v2, que vem com um bot\u00e3o, poder\u00e1 observar um ponto de acesso e pressionar o bot\u00e3o para acionar sua a\u00e7\u00e3o.",
"enable-video-audio-prompt":"Ativar \u00e1udio e v\u00eddeo?","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Voc\u00ea precisa tornar o Samsung Internet o seu padr\u00e3o. browser.",
"samsung-internet-vr-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Basta colocar o celular no fone de ouvido agora.","enable-video-prompt":"Ativar v\u00eddeo?","giroscope-disabled-safari-request-permission":["O acesso a movimento e orienta\u00e7\u00e3o do dispositivo e o modo VR est\u00e3o desativados para este site.","Para ver corretamente esta p\u00e1gina da web, clique em continuar e aceite a solicita\u00e7\u00e3o de permiss\u00e3o, se solicitado."],
"storage-not-provided-launch-from-homescreen":"Reinicie o tour no \u00edcone da tela inicial para fazer o download.","enter-fullscreen":"Entrar em tela cheia","use-cardboard-v2":"Use Cardboard v2",unmute:"Ativar som","enter-vr":"Inserir conte\u00fado VR","enable-measure":"Start measuring","use-cardboard-info":"Voc\u00ea pode usar qualquer fone de ouvido compat\u00edvel do Google Cardboard para visualizar este conte\u00fado em VR","ar-mobile-info":"Mova lentamente o dispositivo para escanear o espa\u00e7o.\nUm anel aparecer\u00e1 quando uma superf\u00edcie for encontrada.\nToque na tela para colocar o objeto ali.",
"use-default-cardboard":"Use o padr\u00e3o","enable-audio-prompt":"Ativar \u00e1udio?"},"hr-hr":{mute:"nijem","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Promijenite na\u010din upravljanja u povla\u010denje i otpu\u0161tanje",accept:"Prihvatiti",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.",
"dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"Promijenite na\u010din upravljanja na Klik i Premjesti",yes:"Da","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Iza\u0111ite s punog zaslona",
no:"Ne","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Ova web stranica koristi kola\u010di\u0107e za prikupljanje statistike upotrebe. Za vi\u0161e informacija posjetite <a>Pravila o kola\u010di\u0107ima</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh",
"rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Odbiti","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Omogu\u0107iti videozapis i zvuk?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"Omogu\u0107ite videozapis?",
"giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Unesite cijeli zaslon","use-cardboard-v2":"Use Cardboard v2",unmute:"Uklju\u010di mikrofon","enter-vr":"Enter VR content","enable-measure":"Start measuring",
"use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Pomaknite ure\u0111aj sporo kako biste skenirali svoj prostor.\nKrug \u0107e se pojaviti kada se prona\u0111e povr\u0161ina.\nTapnite ekran kako biste postavili objekt tamo.","use-default-cardboard":"Use Default","enable-audio-prompt":"\u017delite li omogu\u0107iti zvuk?"},"ja-jp":{mute:"\u30df\u30e5\u30fc\u30c8","cardboard-v1":"\u4f7f\u7528\u3057\u3066\u3044\u308bCardboard\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u6b21\u306b\u3001\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u3092\u6ce8\u8996\u3057\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u3059\u308b\u307e\u3067\u5f85\u6a5f\u3057\u307e\u3059\u3002\uff08\u4e00\u90e8\u52d5\u4f5c\u3057\u306a\u3044\u30a2\u30af\u30b7\u30e7\u30f3\u6709\u308a\uff09",
"download-tour":"\u30aa\u30d5\u30e9\u30a4\u30f3\u518d\u751f\u7528\u30c4\u30a2\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b","change-to-drag-and-release":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30e2\u30fc\u30c9\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30ea\u30ea\u30fc\u30b9\u306b\u5909\u66f4",accept:"\u53d7\u3051\u5165\u308c\u308b",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb","storage-not-provided-bookmark":"\u6c38\u7d9a\u7684\u306a\u4fdd\u5b58\u304c\u62d2\u5426\u3055\u308c\u305f\u3002\u3053\u306eWeb\u30da\u30fc\u30b8\u3092\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3057\u3001\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044",
"dont-display-again":"\u4eca\u5f8c\u3053\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u306a\u3044","web-server-required":"\u3053\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30c4\u30a2\u30fc\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u30c9\u30e9\u30a4\u30d6\u304b\u3089\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3002\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u63a5\u7d9a\u3057\u3001\u3082\u3046\u4e00\u5ea6\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\n\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001htm\u30d5\u30a1\u30a4\u30eb\uff08\u307e\u305f\u306f\u30c4\u30a2\u30fc\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u5168\u4f53\uff09\u3092\u300eTourViewer\u300f\u30a2\u30d7\u30ea\u306e\u30a2\u30a4\u30b3\u30f3\u306b\u30c9\u30e9\u30c3\u30b0\u3057\u307e\u3059",
download:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","change-to-click-and-move":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30e2\u30fc\u30c9\u3092\u30af\u30ea\u30c3\u30af\uff06\u30e0\u30fc\u30d6\u306b\u5909\u66f4",yes:"\u306f\u3044","delete-downloaded":"\u524a\u9664","use-safari-for-vr":"\u3053\u306e\u30c4\u30a2\u30fc\u3092VR\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3059\u308b\u306b\u306f\u3001Safari\u30d6\u30e9\u30a6\u30b6\u306e\u5229\u7528\u3092\u304a\u52e7\u3081\u3057\u307e\u3059","exit-fullscreen":"\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u3092\u7d42\u4e86\u3059\u308b",
no:"\u3044\u3044\u3048","download-failed":"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5931\u6557\u3057\u307e\u3057\u305f","giroscope-disabled-http":"\u3053\u306eWeb\u30da\u30fc\u30b8\u306b\u300ehttp\u300f\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u3054\u5229\u7528\u7aef\u672b\u306e\u30e2\u30fc\u30b7\u30e7\u30f3\u3068\u753b\u9762\u306e\u5411\u304d\u3078\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305a\u3001VR\u30e2\u30fc\u30c9\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u300ehttps\u300f\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044",
"cookies-notice":"\u3053\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306fCookie\u3092\u4f7f\u7528\u3057\u3066\u4f7f\u7528\u7d71\u8a08\u3092\u53ce\u96c6\u3057\u307e\u3059\u3002 \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a>Cookie\u30dd\u30ea\u30b7\u30fc</a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002","use-cardboard":"Cardboard\u5229\u7528","launch-default-browser":"\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u8d77\u52d5","refresh-downloaded":"\u66f4\u65b0","rotate-device":"\u7aef\u672b\u3092\u56de\u8ee2\u3055\u305b\u3066\u304f\u3060\u3055\u3044",
"exit-vr":"VR\u30d3\u30e5\u30fc \u7d42\u4e86",reject:"\u62d2\u5426\u3059\u308b","disable-measure":"Stop measuring",downloading:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u4e2d","cardboard-v2":"\u30dc\u30bf\u30f3\u304c\u4ed8\u5c5e\u3057\u3066\u3044\u308bCardboard v2\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u3092\u304a\u6301\u3061\u306e\u5834\u5408\u306f\u3053\u3061\u3089\u3002","enable-video-audio-prompt":"\u30d3\u30c7\u30aa\u3068\u97f3\u58f0\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f","storage-not-provided-launch-from-desktop":"\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u30c4\u30a2\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044",
downloaded:"\u3053\u306e\u30c4\u30a2\u30fc\u306f\u3001\u30aa\u30d5\u30e9\u30a4\u30f3\u3067\u518d\u751f\u3059\u308b\u305f\u3081\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u3059\u308b","samsung-internet-vr-app-info":"\u3053\u306e\u7aef\u672b\u3068\u4e92\u63db\u6027\u306e\u3042\u308bVR\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u6a5f\u5668\u3092\u304a\u6301\u3061\u3067\u3001VR\u7528\u306e\u300eSamsung Internet\u300f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u3002VR\u30d3\u30e5\u30fc\u3067\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u300eSamsung Internet\u300f\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059",
"samsung-internet-vr-info":"\u3053\u306e\u7aef\u672b\u3068\u4e92\u63db\u6027\u306e\u3042\u308bVR\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u6a5f\u5668\u3092\u304a\u6301\u3061\u3067\u3001VR\u7528\u306e\u300eSamsung Internet\u300f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u3002VR\u30d3\u30e5\u30fc\u3067\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u3092\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u306b\u88c5\u7740\u3059\u308b\u3060\u3051\u3067\u3059",
"enable-video-prompt":"\u30d3\u30c7\u30aa\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f","giroscope-disabled-safari-request-permission":["\u3054\u5229\u7528\u7aef\u672b\u306e\u30e2\u30fc\u30b7\u30e7\u30f3\u3068\u753b\u9762\u306e\u5411\u304d\u3078\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305a\u3001VR\u30e2\u30fc\u30c9\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002","\u3053\u306eWeb\u30da\u30fc\u30b8\u3092\u6b63\u3057\u304f\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u300eOK\u300f\u3092\u30af\u30ea\u30c3\u30af\u3057\u300e\u8a31\u53ef\u300f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u5165\u308c\u3066\u304f\u3060\u3055\u3044"],
"storage-not-provided-launch-from-homescreen":"\u30db\u30fc\u30e0\u753b\u9762\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u30c4\u30a2\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044","enter-fullscreen":"\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u3067\u5165\u529b\u3059\u308b","use-cardboard-v2":"Cardboard v2\u5229\u7528",unmute:"\u30df\u30e5\u30fc\u30c8\u89e3\u9664","enter-vr":"VR\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5165\u529b","enable-measure":"Start measuring",
"use-cardboard-info":"\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092VR\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u4e92\u63db\u6027\u306e\u3042\u308b\u4efb\u610f\u306eGoogle Cardboard\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u3092\u5229\u7528\u3067\u304d\u307e\u3059","ar-mobile-info":"\u30b9\u30da\u30fc\u30b9\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u305f\u3081\u306b\u3001\u30c7\u30d0\u30a4\u30b9\u3092\u3086\u3063\u304f\u308a\u3068\u52d5\u304b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u8868\u9762\u304c\u898b\u3064\u304b\u308b\u3068\u3001\u5186\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\n\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u305d\u3053\u306b\u914d\u7f6e\u3059\u308b\u306b\u306f\u3001\u753b\u9762\u3092\u30bf\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002",
"use-default-cardboard":"\u30c7\u30d5\u30a9\u30eb\u30c8\u5229\u7528","enable-audio-prompt":"\u97f3\u58f0\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f"},"zh-cn":{mute:"\u9759\u97f3","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"\u4e0b\u8f7d\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u79bb\u7ebf\u64ad\u653e","change-to-drag-and-release":"\u5c06\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u4e3a\u201c\u62d6\u653e\u201d",
accept:"\u63a5\u53d7",cancel:"\u53d6\u6d88","storage-not-provided-bookmark":"\u88c5\u7f6e\u5185\u6c38\u4e45\u5b58\u50a8\u88ab\u62d2\u7edd\u3002\u5c1d\u8bd5\u5c06\u6b64\u7f51\u9875\u6dfb\u52a0\u4e3a\u4e66\u7b7e\uff0c \u5e76\u91cd\u65b0\u52a0\u8f7d\u3002","dont-display-again":"\u4e0d\u518d\u663e\u793a\u6b64\u4fe1\u606f","web-server-required":"\u6b64\u5168\u666f\u6f2b\u6e38\u65e0\u6cd5\u4ece\u672c\u5730\u9a71\u52a8\u5668\u4e0a\u64ad\u653e\u3002 \u8bf7\u5c06\u5176\u4e0a\u4f20\u5230\u4e92\u8054\u7f51\u670d\u52a1\u5668\uff0c\u7136\u540e\u91cd\u8bd5\u3002\n\u5982\u679c\u9700\u8981\u672c\u5730\u9884\u89c8\uff0c\u53ef\u4ee5\u5c06htm\u6587\u4ef6\uff08\u6216\u5168\u666f\u6f2b\u6e38\u7684\u6574\u4e2a\u6587\u4ef6\u5939\uff09\u62d6\u5230TourViewer\u5e94\u7528\u7a0b\u5e8f\u7684\u56fe\u6807\u4e0a\u3002",
download:"\u4e0b\u8f7d","change-to-click-and-move":"\u5c06\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u4e3a\u201c\u5355\u51fb\u5e76\u79fb\u52a8\u201d",yes:"\u662f","delete-downloaded":"\u5220\u9664","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u9000\u51fa\u5168\u5c4f",no:"\u5426","download-failed":"\u4e0b\u8f7d\u5931\u8d25","giroscope-disabled-http":"\u60a8\u6b63\u5728\u901a\u8fc7http(\u672a\u52a0\u5bc6)\u8bbf\u95ee\u6b64\u7f51\u9875\uff0c\u56e0\u6b64\u8bbe\u5907\u7684\u8fd0\u52a8\u548c\u65b9\u5411\u8bbf\u95ee\u6743\u9650\u4ee5\u53caVR\u6a21\u5f0f\u5747\u5df2\u7981\u7528\uff0c\u8bf7\u901a\u8fc7https(\u52a0\u5bc6)\u5bf9\u5176\u8fdb\u884c\u542f\u7528\u3002",
"cookies-notice":"\u8be5\u7f51\u9875\u4f7f\u7528cookie\u6765\u6536\u96c6\u4f7f\u7528\u60c5\u51b5\u7edf\u8ba1\u4fe1\u606f\u3002 \u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee<a>Cookie\u653f\u7b56</a>\u3002","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"\u5237\u65b0","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u62d2\u7edd","disable-measure":"Stop measuring",downloading:"\u6b63\u5728\u4e0b\u8f7d",
"cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u542f\u7528\u89c6\u9891\u548c\u97f3\u9891\uff1f","storage-not-provided-launch-from-desktop":"\u8bf7\u4ece\u684c\u9762\u70b9\u51fb\u56fe\u6807\uff0c\u91cd\u65b0\u542f\u52a8\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u4e0b\u8f7d\u3002",downloaded:"\u6b64\u5168\u666f\u6f2b\u6e38\u5df2\u4e0b\u8f7d\uff0c\u53ef\u8fdb\u884c\u79bb\u7ebf\u64ad\u653e\u3002",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"\u542f\u7528\u89c6\u9891\uff1f",
"giroscope-disabled-safari-request-permission":["\u8be5\u7ad9\u70b9\u5df2\u7981\u7528\u8bbe\u5907\u7684\u8fd0\u52a8\u548c\u65b9\u5411\u8bbf\u95ee\u6743\u9650\uff0cVR\u6a21\u5f0f\u4e5f\u88ab\u7981\u7528\u3002","\u8981\u6b63\u786e\u67e5\u770b\u6b64\u7f51\u9875\uff0c\u8bf7\u5355\u51fb\u7ee7\u7eed\uff0c\u5e76\u5728\u51fa\u73b0\u63d0\u793a\u65f6\u63a5\u53d7\u8bb8\u53ef\u8bf7\u6c42"],"storage-not-provided-launch-from-homescreen":"\u8bf7\u4ece\u4e3b\u5c4f\u5e55\u70b9\u51fb\u56fe\u6807\uff0c\u91cd\u65b0\u542f\u52a8\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u4e0b\u8f7d\u3002",
"enter-fullscreen":"\u8fdb\u5165\u5168\u5c4f","use-cardboard-v2":"Use Cardboard v2",unmute:"\u53d6\u6d88\u9759\u97f3","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u7f13\u6162\u79fb\u52a8\u8bbe\u5907\uff0c\u4ee5\u626b\u63cf\u7a7a\u95f4\u3002\n\u5f53\u627e\u5230\u8868\u9762\u65f6\uff0c\u4f1a\u51fa\u73b0\u4e00\u4e2a\u5706\u5708\u3002\n\u70b9\u51fb\u5c4f\u5e55\uff0c\u5c06\u5bf9\u8c61\u653e\u5728\u90a3\u91cc\u3002",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u542f\u7528\u97f3\u9891\uff1f"},"nl-nl":{mute:"Schakel audio uit","cardboard-v1":"Als u niet weet wat voor versie van Cardboard u gebruikt, selecteer dan de default hotspot control. Dan zult u moeten wachten op een hotspot tot er een bepaald actie is gestart.","download-tour":"Download Tour voor offline afspelen","change-to-drag-and-release":"Verander de besturingsmodus om te slepen en los te laten",accept:"Aanvaarden",download:"Download",
"storage-not-provided-bookmark":"Aanhoudende inhoud geweigerd. Probeer deze pagina als bookmark op te slaan en te verversen.","dont-display-again":"Niet meer laten zien","web-server-required":"Deze virtuele tour kan niet worden afgespeeld vanaf een lokale schijf. Upload dit alstublieft op het internet. Je kan ook de htm bestand slepen naar het icoon van de TourViewer app.",cancel:"Annuleren","change-to-click-and-move":"Verander de bedieningsmodus om te klikken en te verplaatsen",yes:"Ja","delete-downloaded":"Verwijderen",
"use-safari-for-vr":"We raden aan om in Safari deze tour te bekijken in VR mode","exit-fullscreen":"Volledig scherm verlaten",no:"Nee","download-failed":"Download mislukt","giroscope-disabled-http":"Jij betreedt deze pagina door http, dus uw toestel's motion en orientation access en VR modus zijn uitgeschakeld. Betreed deze pagina door https om ze weer aan te schakelen.","cookies-notice":"Deze webpagina maakt gebruik van cookies om gebruiksstatistieken te verzamelen. Raadpleeg het <a>Cookiebeleid</a> voor meer informatie.",
"use-cardboard":"Gebruik Cardboard","launch-default-browser":"Start op in standaard browser","refresh-downloaded":"Verversen","rotate-device":"Draai uw toestel om, alstublieft","exit-vr":"VR verlaten",reject:"Weigeren","disable-measure":"Stop meten",downloading:"Downloaden","cardboard-v2":"Als u een Cardboard v2 headset heeft, wat met een knop komt, kunt u wachten op een hotspot en een op een knop drukken om een actie te starten.","enable-video-audio-prompt":"Audio en video inschakelen?","storage-not-provided-launch-from-desktop":"Start de tour alstublieft opnieuw up vanaf het bureaublad om te kunnen downloaden.",
downloaded:"Deze tour is gedownload voor offline afspelen.","samsung-internet-vr-app-info":"Als u een Gear VR headset heeft dat werkt met dit toestel en u Samsung Internet voor VR heeft ge\u00efnstalleerd, kunt u dit ook bekijken in VR. U moet alleen Samsung Internet instellen als uw standaard browser.","samsung-internet-vr-info":"Als u een Gear VR headset heeft dat werkt met dit toestel en u Samsung Internet voor VR heeft ge\u00efnstalleerd, kunt u dit ook bekijken in VR, u moet alleen uw mobiele toestel op uw headset zetten.",
"enable-video-prompt":"Video inschakelen?","giroscope-disabled-safari-request-permission":["Uw toestel's motion en orientation access en VR modus zijn uitgeschakeld voor deze site..","Om deze pagina goed te kunnen zien, druk op doorgaan en geef toestemming als dat gevraagd wordt."],"storage-not-provided-launch-from-homescreen":"Start de tour alstublieft opnieuw up vanaf het homescherm om te kunnen downloaden.","enter-fullscreen":"Volledig scherm inschakelen","use-cardboard-v2":"Gebruik Cardboard v2",
unmute:"Schakel audio in","enter-vr":"Voer VR inhoud in","enable-measure":"Begin meten","use-cardboard-info":"U kunt elk werkend Google Cardboard headset gebruiken om dit te bekijken.","ar-mobile-info":"Verplaats uw apparaat langzaam om uw ruimte te scannen.\nEen ring verschijnt wanneer een oppervlak wordt gevonden.\nTik op het scherm om het object daar te plaatsen.","use-default-cardboard":"Standaard gebruiken","enable-audio-prompt":"Audio inschakelen?"},"hu-hu":{mute:"N\u00e9m\u00edt\u00e1s","cardboard-v1":"Ha nem vagy biztos benne, hogy milyen VR eszk\u00f6zt haszn\u00e1lsz, akkor v\u00e1laszd az alap\u00e9rtelmezettet \u00e9s az egyes hotspot-ok megtekint\u00e9s\u00e9hez csak tartsd ott a jel\u00f6l\u0151t.",
"download-tour":"T\u00fara let\u00f6lt\u00e9se offline megtekint\u00e9shez","change-to-drag-and-release":"Ir\u00e1ny\u00edt\u00e1s \u00e1t\u00e1ll\u00edt\u00e1sa: megfog \u00e9s mozgat m\u00f3dra",accept:"Elfogad",cancel:"M\u00e9gsem","storage-not-provided-bookmark":"Pr\u00f3b\u00e1lja meg az oldalt megjel\u00f6lni \u00e9s \u00fajrat\u00f6lteni!","dont-display-again":"Ne mutasd \u00fajra","web-server-required":"Ez a t\u00fara nem j\u00e1tszat\u00f3 le helyi futtat\u00e1ssal, k\u00e9rlek t\u00f6lsd fel az internetre \u00e9s pr\u00f3b\u00e1ld meg \u00fajra\nM\u00e1sik megold\u00e1s, ha a Tourviewer applik\u00e1ci\u00f3ra h\u00fazod a t\u00fara f\u00e1jlt, vagy az azt tartalmaz\u00f3 t\u00fara mapp\u00e1t.",
download:"Let\u00f6lt\u00e9s","change-to-click-and-move":"Ir\u00e1ny\u00edt\u00e1s \u00e1t\u00e1ll\u00edt\u00e1sa kattint \u00e9s k\u00f6rben\u00e9z m\u00f3dra",yes:"igen","delete-downloaded":"T\u00f6rl\u00e9s","use-safari-for-vr":"Azt javasoljuk, hogy haszn\u00e1lj Safari b\u00f6ng\u00e9sz\u0151t a VR n\u00e9zet megtekint\u00e9s\u00e9hez","exit-fullscreen":"Kil\u00e9p\u00e9s a teljesk\u00e9perny\u0151 m\u00f3db\u00f3l",no:"nem","download-failed":"Let\u00f6lt\u00e9s sikertelen","giroscope-disabled-http":"Az oldalt https el\u0151taggal sz\u00fcks\u00e9ges megnyitnod ahhoz, hogy a k\u00e9sz\u00fcl\u00e9ked mozg\u00e1s\u00e1t \u00e9rz\u00e9kelni tudja.",
"cookies-notice":"Ez a weboldal s\u00fctiket haszn\u00e1l a haszn\u00e1lati statisztik\u00e1k gy\u0171jt\u00e9s\u00e9hez. Tov\u00e1bbi inform\u00e1ci\u00f3\u00e9rt l\u00e1togasson el a <a>s\u00fctikre vonatkoz\u00f3 ir\u00e1nyelvekbe</a>.","use-cardboard":"Cardboard haszn\u00e1lata","launch-default-browser":"Futtat\u00e1s az alap\u00e9rtelmezett b\u00f6ng\u00e9sz\u0151ben","refresh-downloaded":"Friss\u00edt\u00e9s","rotate-device":"Forgasd el a telefont!","exit-vr":"Kil\u00e9p\u00e9s a VR m\u00f3db\u00f3l",
reject:"Elutas\u00edt","disable-measure":"Stop measuring",downloading:"Let\u00f6lt\u00e9s","cardboard-v2":"Ha Cardboard 2.0 t\u00edpus\u00fa eszk\u00f6zt haszn\u00e1lsz, akkor a kapcsol\u00f3kkal ir\u00e1ny\u00edthatod a t\u00far\u00e1t, kattinthatsz az egyes hotspotokra","enable-video-audio-prompt":"Hang \u00e9s vide\u00f3 enged\u00e9lyez\u00e9se","storage-not-provided-launch-from-desktop":"K\u00e9rlek ind\u00edtsd \u00fajra az oldalt az asztalon tal\u00e1lhat\u00f3 iconra kattintva.",downloaded:"Let\u00f6ltve offline megtekint\u00e9shez",
"samsung-internet-vr-app-info":"Ha Samsung Gear VR szem\u00fcveget szeretn\u00e9l haszn\u00e1lni, akkor nyisd meg a Samsung internetb\u00f6ng\u00e9sz\u0151ben a t\u00far\u00e1t.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"Vide\u00f3 enged\u00e9lyez\u00e9se","giroscope-disabled-safari-request-permission":["A megjelen\u00edt\u0151 eszk\u00f6z\u00f6d nem adott hozz\u00e1f\u00e9r\u00e9st a mozg\u00e1s \u00e9rz\u00e9kel\u00e9s\u00e9hez ezen az oldalon.",
"Ahhoz hogy megfelel\u0151en l\u00e1sd az oldalt k\u00e9rlek enged\u00e9lyezd a hozz\u00e1f\u00e9r\u00e9st."],"storage-not-provided-launch-from-homescreen":"Ind\u00edtsd \u00fajra a t\u00far\u00e1t a home ikonra kattintva.","enter-fullscreen":"Teljesk\u00e9perny\u0151","use-cardboard-v2":"Cardboard 2.0 haszn\u00e1lata",unmute:"N\u00e9m\u00edt\u00e1s kikapcsol\u00e1sa","enter-vr":"VR tartalom megtekint\u00e9se","enable-measure":"Start measuring","use-cardboard-info":"Haszn\u00e1lhatsz b\u00e1rmilyen google cardboard-ot ahhoz, hogy VR m\u00f3dban l\u00e1sd a t\u00far\u00e1t.",
"ar-mobile-info":"Mozgasson lassan a k\u00e9sz\u00fcl\u00e9k\u00e9t, hogy a teret skann\u00e1lja.\nEgy k\u00f6r jelenik meg, amikor egy fel\u00fcletet tal\u00e1l.\n\u00c9rintse meg a k\u00e9perny\u0151t, hogy oda helyezzen el egy objektumot.","use-default-cardboard":"Alap\u00e9rtelmezett haszn\u00e1lata","enable-audio-prompt":"Hang enged\u00e9lyez\u00e9se"},"ar-ar":{mute:"\u062a\u0639\u0637\u064a\u0644 \u0627\u0644\u0635\u0648\u062a","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639 \u0627\u0644\u062a\u062d\u0643\u0645 \u0644\u0644\u0633\u062d\u0628 \u0648\u0627\u0644\u0625\u0641\u0631\u0627\u062c",accept:"\u0642\u0628\u0648\u0644",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"\u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639 \u0627\u0644\u062a\u062d\u0643\u0645 \u0644\u0644\u0646\u0642\u0631 \u0648\u0627\u0644\u062a\u062d\u0631\u0643",yes:"\u0646\u0639\u0645 \u0641\u0639\u0644\u0627","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 \u0645\u0644\u0626 \u0644\u0644\u0634\u0627\u0634\u0629",
no:"\u0644\u0627","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"\u062a\u0633\u062a\u062e\u062f\u0645 \u0635\u0641\u062d\u0629 \u0627\u0644\u0648\u064a\u0628 \u0647\u0630\u0647 \u0645\u0644\u0641\u0627\u062a \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0627\u0631\u062a\u0628\u0627\u0637 \u0644\u062c\u0645\u0639 \u0625\u062d\u0635\u0627\u0626\u064a\u0627\u062a \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645. \u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u060c \u064a\u0631\u062c\u0649 \u0632\u064a\u0627\u0631\u0629 <a> \u0633\u064a\u0627\u0633\u0629 \u0645\u0644\u0641\u0627\u062a \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0627\u0631\u062a\u0628\u0627\u0637 </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u064a\u0631\u0641\u0636","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a \u0648\u0627\u0644\u0641\u064a\u062f\u064a\u0648\u061f",
"storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0641\u064a\u062f\u064a\u0648\u061f","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"\u0623\u062f\u062e\u0644 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
"use-cardboard-v2":"Use Cardboard v2",unmute:"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u062a\u0642\u0631\u064a\u0628\u0627\u064b \u062d\u0631\u0643 \u062c\u0647\u0627\u0632\u0643 \u0628\u0628\u0637\u0621 \u0644\u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0645\u0633\u0627\u062d\u0629.\n\u0633\u064a\u0638\u0647\u0631 \u062d\u0644\u0642\u0629 \u0639\u0646\u062f \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0633\u0637\u062d.\n\u0627\u0636\u063a\u0637 \u0639\u0644\u0649 \u0627\u0644\u0634\u0627\u0634\u0629 \u0644\u0648\u0636\u0639 \u0627\u0644\u0643\u0627\u0626\u0646 \u0647\u0646\u0627\u0643.",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a\u061f"},"ca-es":{mute:"Silenciar","cardboard-v1":"Si no esteu segurs de quina versi\u00f3 de cartr\u00f3 utilitzeu, seleccioneu el control de punt d'acc\u00e9s per defecte. Despr\u00e9s, simplement veureu un punt d'acc\u00e9s i espereu fins que s'activi l'acci\u00f3.","download-tour":"Descarregueu la visita virtual per a jugar fora de l\u00ednia","change-to-drag-and-release":"Canvieu el mode de control a Arrossegar i deixeu anar",
accept:"Accepta",cancel:"Cancel\u00b7lar","storage-not-provided-bookmark":"S'ha denegat l'emmagatzematge persistent. Proveu de marcar aquesta p\u00e0gina web i torneu-la a carregar.","dont-display-again":"No tornis a mostrar aquesta informaci\u00f3","web-server-required":"Aquesta visita virtual no es pot reproduir des d'una unitat local. Carregueu-lo a Internet i torneu-ho a provar.\nSi ho preferiu, arrossegueu el fitxer htm (o tota la carpeta de la visita virtual) a la icona de l'aplicaci\u00f3 TourViewer.",
download:"Descarregar","change-to-click-and-move":"Canvieu el mode de control a Fer clic i desplaceu",yes:"s\u00ed","delete-downloaded":"Suprimeix","use-safari-for-vr":"Recomanem Safari per a visualitzar aquesta visita virtual en mode VR","exit-fullscreen":"Surt de pantalla completa",no:"no","download-failed":"Error de desc\u00e0rrega","giroscope-disabled-http":"Accediu a aquesta p\u00e0gina web a trav\u00e9s de http de manera que el moviment i l\u2019orientaci\u00f3 del dispositiu i el mode VR estan desactivats, accediu-hi mitjan\u00e7ant https per habilitar-les.",
"cookies-notice":"Aquesta p\u00e0gina web utilitza cookies per recopilar estad\u00edstiques d\u2019\u00fas. Per obtenir m\u00e9s informaci\u00f3, visiteu la <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Utilitzeu Cardboard","launch-default-browser":"Inicieu el navegador per defecte","refresh-downloaded":"Actualitzaci\u00f3","rotate-device":"Gireu el dispositiu","exit-vr":"Surt de VR",reject:"Rebutjar","disable-measure":"Stop measuring",downloading:"Baixant","cardboard-v2":"Si teniu unes Cardboard v2, que venen amb un bot\u00f3, podeu mirar cap a un punt de vista i pr\u00e9mer el bot\u00f3 per activar-lo.",
"enable-video-audio-prompt":"Habilitar v\u00eddeo i \u00e0udio?","storage-not-provided-launch-from-desktop":"Torneu a iniciar la visita virtual des de la icona de l'escriptori per a descarregar-la.",downloaded:"Aquesta visita virtual es descarrega per a reproduir-la fora de l\u00ednia.","samsung-internet-vr-app-info":"Si teniu un auricular Gear VR compatible amb aquest dispositiu i heu instal\u00b7lat Samsung Internet per a VR, tamb\u00e9 podeu utilitzar-lo per visualitzar aquest contingut en VR, heu de fer que Samsung Internet sigui el vostre navegador predeterminat.",
"samsung-internet-vr-info":"Si teniu un auricular Gear VR compatible amb aquest dispositiu i heu instal\u00b7lat Samsung Internet per a VR, tamb\u00e9 podeu utilitzar-lo per visualitzar aquest contingut en VR, nom\u00e9s heu de posar el tel\u00e8fon m\u00f2bil als auriculars.","enable-video-prompt":"Activar v\u00eddeo?","giroscope-disabled-safari-request-permission":["Aquest lloc web est\u00e0 desactivat en el moviment i en la direcci\u00f3 o en mode VR del dispositiu.","Per veure correctament aquesta p\u00e0gina web, feu clic a Continuar i accepteu la sol\u00b7licitud de perm\u00eds si se us demana."],
"storage-not-provided-launch-from-homescreen":"Torneu a iniciar la visita virtual des de la icona de la pantalla inicial.","enter-fullscreen":"Entra a pantalla completa","use-cardboard-v2":"Utilitzeu Cardboard v2",unmute:"No activa","enter-vr":"Introdu\u00efu contingut de VR","enable-measure":"Start measuring","use-cardboard-info":"Podeu utilitzar qualsevol auricular de Google Cardboard compatible per a visualitzar aquest contingut en VR.","ar-mobile-info":"Mou lentament el dispositiu per a escanejar l'espai.\nUn anell apareixer\u00e0 quan es trobi una superf\u00edcie.\nToca la pantalla per a situar l'objecte all\u00e0.",
"use-default-cardboard":"\u00das per defecte","enable-audio-prompt":"Activar \u00e0udio?"},"ru-ru":{mute:"\u0411\u0435\u0437 \u0437\u0432\u0443\u043a\u0430","cardboard-v1":"\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u043a\u0430\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Cardboard \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u0438 \u0434\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.",
"download-tour":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0442\u0443\u0440  \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f","change-to-drag-and-release":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435",
accept:"\u041f\u0440\u0438\u043d\u044f\u0442\u044c",download:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c","storage-not-provided-bookmark":"\u0412 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0435.",
"dont-display-again":"\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e","web-server-required":"\u042d\u0442\u043e\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u0440 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437.\n\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 htm-\u0444\u0430\u0439\u043b (\u0438\u043b\u0438 \u0432\u0441\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0443\u0440\u0430) \u043d\u0430 \u0437\u043d\u0430\u0447\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f TourViewer.",
cancel:"\u041e\u0442\u043c\u0435\u043d\u0430","change-to-click-and-move":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u0436\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435",yes:"\u0434\u0430","delete-downloaded":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","use-safari-for-vr":"\u041c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c Safari \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 VR.",
"exit-fullscreen":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430",no:"\u043d\u0435\u0442","download-failed":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","giroscope-disabled-http":"\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u043e\u0439 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0447\u0435\u0440\u0435\u0437 http, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0440\u0435\u0436\u0438\u043c VR \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 https, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445.",
"cookies-notice":"\u042d\u0442\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b cookie \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441\u043c. <a>\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 cookie</a>.",
"use-cardboard":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cardboard","launch-default-browser":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c","rotate-device":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"exit-vr":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 VR",reject:"\u041e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u044c","disable-measure":"\u041f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f",downloading:"\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435","cardboard-v2":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Cardboard v2 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.",
"enable-video-audio-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e?","storage-not-provided-launch-from-desktop":"\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0443\u0440 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435..",
downloaded:"\u042d\u0442\u043e\u0442 \u0442\u0443\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f.","samsung-internet-vr-app-info":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Gear VR, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c Samsung Internet \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.",
"samsung-internet-vr-info":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Gear VR, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR, \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0434\u0435\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 \u0441\u0435\u0439\u0447\u0430\u0441.",
"enable-video-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0436\u0438\u043c VR \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430.",
"\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c\u00bb \u0438 \u043f\u0440\u0438\u043c\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e."],
"storage-not-provided-launch-from-homescreen":"\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0443\u0440 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435.","enter-fullscreen":"\u0412\u043e\u0439\u0442\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c",
"use-cardboard-v2":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cardboard v2",unmute:"\u0421\u043e \u0437\u0432\u0443\u043a\u043e\u043c","enter-vr":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c VR \u043a\u043e\u043d\u0442\u0435\u043d\u0442","enable-measure":"\u041d\u0430\u0447\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f","use-cardboard-info":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 Google Cardboard \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR.",
"ar-mobile-info":"\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.\n\u0411\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u043e\u043b\u044c\u0446\u043e, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c.\n\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043c.",
"use-default-cardboard":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","enable-audio-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0443\u0434\u0438\u043e?"},"nn-no":{mute:"Skru av lyd","cardboard-v1":"Hvis du ikke er sikker, hvilken Cardboard versjon du bruker, velger du standard hotspot-kontrollen. Du vil da bare se p\u00e5 et hotspot og vente til handlingen utl\u00f8ses.","download-tour":"Last ned visningen, s\u00e5 den kan bli sett uten internett",
"change-to-drag-and-release":"Endre kontrollmodus til Trekk og Slipp",accept:"Aksepterer",cancel:"Avbryt","storage-not-provided-bookmark":"Vedvarende lagring nektet. Pr\u00f8v \u00e5 bokmerke denne nettsiden og laste den inn p\u00e5 nytt.","dont-display-again":"Ikke vis denne informasjonen igjen","web-server-required":"Denne virtuelle visningen kan ikke spilles av lokalt. Vennligst last den opp til internett, og fors\u00f8k igjen.\ndersom du prefererer det, kan du dra htm filen (eller hele mappen som inneholder visningen) over 'TourViewer' appen.",
download:"Last ned","change-to-click-and-move":"Endre kontrollmodus til Klikk og Flytt",yes:"Ja","delete-downloaded":"Slett","use-safari-for-vr":"Vi anbefaler Safari for \u00e5 se p\u00e5 venne visningen i VR modus","exit-fullscreen":"G\u00e5 ut av full skjerm",no:"Nei","download-failed":"Nedlastning feilet","giroscope-disabled-http":"Du er koblet til denne nettsiden via http. Dermed er enhetens bevegelses- og orienteringstilgang og VR-modus deaktivert. Koble til via https for \u00e5 aktivere denne.",
"cookies-notice":"Denne websiden bruker informasjonskapsler for \u00e5 samle inn bruksstatistikk. For mer informasjon, bes\u00f8k <a>retningslinjer for informasjonskapsler</a>.","use-cardboard":"Bruk Cardboard","launch-default-browser":"\u00c5pne i standard nettleser","refresh-downloaded":"Last inn p\u00e5 nytt","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR",reject:"Avvis","disable-measure":"Stop measuring",downloading:"Laster ned","cardboard-v2":"Dersom du har Cardboard versjon 2, hvilket kommer med en knapp, kan du kikke p\u00e5 en klikkbar ting i visningen, og bruke knappen for \u00e5 bruke disse tingene, p\u00e5 samme m\u00e5te som p\u00e5 en laptop eller telefon.",
"enable-video-audio-prompt":"Aktivere video og lyd?","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.",downloaded:"Denne visningen er lastet ned, s\u00e5 den kan bli sett uten internett.","samsung-internet-vr-app-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten og har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du m\u00e5 ogs\u00e5 gj\u00f8re Samsung Internet til standard nettleser.",
"samsung-internet-vr-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten, og du har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du trenger bare \u00e5 sette mobiltelefonen p\u00e5 headsettet n\u00e5.","enable-video-prompt":"Aktivere video?","giroscope-disabled-safari-request-permission":["Din enhet sin bevegelses- og orienterings tilgang, samt VR modus er deaktivert for denne nettsiden.","For \u00e5 se denne siden korrekt, vennligst klikk p\u00e5 fortsett og godta tillatelsesforesp\u00f8rselen hvis du blir bedt om dette."],
"storage-not-provided-launch-from-homescreen":"Start turen p\u00e5 nytt fra startskjermikonet for \u00e5 laste ned.","enter-fullscreen":"G\u00e5 til full skjerm","use-cardboard-v2":"Bruk Cardboard Versjon 2",unmute:"Skru p\u00e5 lyd","enter-vr":"\u00c5pne VR Modus","enable-measure":"Start measuring","use-cardboard-info":"Du kan bruke hvilke some helst Google Cardboard kompatible headsett for \u00e5 se denne visningen i VR.","ar-mobile-info":"Flytt enheten din sakte for \u00e5 skanne rommet ditt.\nEn ring vil vises n\u00e5r en overflate blir funnet.\nTrykk p\u00e5 skjermen for \u00e5 plassere objektet der.",
"use-default-cardboard":"Bruk Standard","enable-audio-prompt":"Aktivere audio?"},"es-es":{mute:"Silenciar","cardboard-v1":"Si no esta seguro de que versi\u00f3n de Cardboard debe usar escoja la selecci\u00f3n de hotspot por defecto. Solo tendr\u00e1 que apuntar al hotspot y esperar para que se ejecute la acci\u00f3n.","download-tour":"Descargar el tour para reproducirlo sin conexi\u00f3n","change-to-drag-and-release":"Cambiar el modo de control a arrastrar y soltar",accept:"Aceptar","use-cardboard-v2":"Usar Cardboard v2",
"storage-not-provided-bookmark":"Almacenamiento persistente denagado. Intente a\u00f1adir la p\u00e1gina a los marcadores y recargarla.","dont-display-again":"No volver a mostrar esta informaci\u00f3n","web-server-required":"Este tour virtual no puede reproducirse desde una unidad local. Por favor s\u00fabalo a internet y pruebe de nuevo.\nSi lo prefiere puede arrastrar el archivo html o la carpeta con el tour sobre el icono de la aplicaci\u00f3n Tour Viewer de su escritorio.",download:"Descargar",
"change-to-click-and-move":"Cambiar el modo de control a pulsar y mover",yes:"s\u00ed","delete-downloaded":"Borrar","use-safari-for-vr":"Recomendamos Safari para ver este tour en modo VR","exit-fullscreen":"Salir de pantalla completa",no:"no","download-failed":"La descarga ha fallado","giroscope-disabled-http":"Est\u00e1 accediendo a esta p\u00e1gina web por http por lo que el acceso al movimiento y la orientaci\u00f3n del dispositivo est\u00e1 deshabilitado, por favor acceda por https.","cookies-notice":"Esta p\u00e1gina usa cookies para recolectar estad\u00edsticas de uso. Para m\u00e1s informaci\u00f3n, visite la <a>Pol\u00edtica de Cookies</a>.",
"use-cardboard":"Usar Cardboard","launch-default-browser":"Lanzar en el navegador por defecto","refresh-downloaded":"Actualizar","rotate-device":"Por favor, gire el dispositivo","exit-vr":"Salir de VR","storage-not-provided-launch-from-desktop":"Por favor lance el tour desde el escritorio para descargarlo.","disable-measure":"Stop measuring",cancel:"Cancel",downloading:"Descargando","cardboard-v2":"Si tiene unas gafas Cardboard v2, que vienen con un bot\u00f3n, puede apuntar al hotspot y pulsar el bot\u00f3n para que se ejecute su acci\u00f3n.",
"enable-video-audio-prompt":"\u00bfActivar v\u00eddeo y audio?",reject:"Rechazar",downloaded:"Este tour esta descargado para reproducirlo sin conexi\u00f3n.","samsung-internet-vr-app-info":"Si tiene unas gafas Gear VR compatibles con este dispositivo y tiene instalado Samsung Internet for VR puede usarlo para ver este contenido en VR, necesita hacer Samsung Internet su navegador por defecto.","samsung-internet-vr-info":"Si tiene unas gafas Gear VR compatibles con este dispositivo y tiene instalado Samsung Internet for VR puede usarlo para ver este contenido en VR, solo tiene que poner ahora el dispositivo en las gafas.",
"enable-video-prompt":"\u00bfActivar v\u00eddeo?","giroscope-disabled-safari-request-permission":["El acceso al movimiento y la orientaci\u00f3n del dispositivo est\u00e1 deshabiltado para este sitio.","Para ver correctamente la p\u00e1gina por favor pulse Continuar y acepte la petici\u00f3n de permiso si se muestra."],"storage-not-provided-launch-from-homescreen":"Por favor lance el tour desde el icono de la pantalla de inicio para descargarlo.","enter-fullscreen":"Mostrar en pantalla completa",
unmute:"Habilitar sonido","enter-vr":"Entrar al contenido VR","enable-measure":"Start measuring","use-cardboard-info":"Puede usar unas gafas compatibles con Google Cardboard para ver este contenido en VR.","ar-mobile-info":"Mueve lentamente el dispositivo para escanear el espacio.\nAparecer\u00e1 un anillo cuando se encuentre una superficie.\nToca la pantalla para colocar el objeto all\u00ed.","use-default-cardboard":"Usar versi\u00f3n por defecto","enable-audio-prompt":"\u00bfActivar audio?"},"el-gr":{mute:"\u0391\u03c0\u03b5\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03bf\u03bd \u03ae\u03c7\u03bf",
"cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c3\u03cd\u03c1\u03b5\u03c4\u03b5 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b1\u03c0\u03b5\u03bb\u03b5\u03c5\u03b8\u03b5\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5",
accept:"\u0391\u03c0\u03bf\u03b4\u03ad\u03c7\u03bf\u03bc\u03b1\u03b9",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03ba\u03bb\u03b9\u03ba \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03bc\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03b7\u03b8\u03b5\u03af\u03c4\u03b5",
yes:"\u039d\u03b1\u03af","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u0388\u03be\u03bf\u03b4\u03bf\u03c2 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03c0\u03bb\u03ae\u03c1\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7",no:"\u03cc\u03c7\u03b9","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.",
"cookies-notice":"\u0391\u03c5\u03c4\u03ae \u03b7 \u03b9\u03c3\u03c4\u03bf\u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af cookie \u03b3\u03b9\u03b1 \u03c4\u03b7 \u03c3\u03c5\u03bb\u03bb\u03bf\u03b3\u03ae \u03c3\u03c4\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ce\u03bd \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03c9\u03bd \u03c7\u03c1\u03ae\u03c3\u03b7\u03c2. \u0393\u03b9\u03b1 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2, \u03b5\u03c0\u03b9\u03c3\u03ba\u03b5\u03c6\u03b8\u03b5\u03af\u03c4\u03b5 \u03c4\u03b7\u03bd <a> \u03a0\u03bf\u03bb\u03b9\u03c4\u03b9\u03ba\u03ae cookie </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u0391\u03c0\u03bf\u03c1\u03c1\u03af\u03c0\u03c4\u03c9","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5 \u03ba\u03b1\u03b9 \u03b2\u03af\u03bd\u03c4\u03b5\u03bf;",
"storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03b2\u03af\u03bd\u03c4\u03b5\u03bf;","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"\u0395\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03ae\u03c1\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7",
"use-cardboard-v2":"Use Cardboard v2",unmute:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u039c\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b7 \u03c3\u03c5\u03c3\u03ba\u03b5\u03c5\u03ae \u03c3\u03b1\u03c2 \u03b1\u03c1\u03b3\u03ac \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c3\u03b1\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf \u03c7\u03ce\u03c1\u03bf \u03c3\u03b1\u03c2.\n\u0398\u03b1 \u03b5\u03bc\u03c6\u03b1\u03bd\u03b9\u03c3\u03c4\u03b5\u03af \u03ad\u03bd\u03b1\u03c2 \u03b4\u03b1\u03ba\u03c4\u03cd\u03bb\u03b9\u03bf\u03c2 \u03cc\u03c4\u03b1\u03bd \u03b5\u03bd\u03c4\u03bf\u03c0\u03b9\u03c3\u03c4\u03b5\u03af \u03bc\u03b9\u03b1 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1.\n\u039a\u03ac\u03bd\u03c4\u03b5 \u03ba\u03bb\u03b9\u03ba \u03c3\u03c4\u03b7\u03bd \u03bf\u03b8\u03cc\u03bd\u03b7 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c4\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf \u03b1\u03bd\u03c4\u03b9\u03ba\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03b5\u03ba\u03b5\u03af.",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5;"},"da-dk":{mute:"Deaktiver lyd","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Skift kontroltilstand for at tr\u00e6kke og slippe",
accept:"Acceptere",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"Skift kontroltilstand for at klikke og flytte",
yes:"Ja","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Afslut fuldsk\u00e6rm",no:"ingen","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Denne webside bruger cookies til at indsamle brugsstatistikker. For mere information, se venligst <a> Cookiepolitik </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Afvise","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Aktiv\u00e9r lyd og video?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Aktiv\u00e9r video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Indtast fuldsk\u00e6rm","use-cardboard-v2":"Use Cardboard v2",unmute:"Aktiv\u00e9r lyd","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Flyt dit enhed langsomt for at skanne dit rum.\nEn ring vil vises, n\u00e5r en overflade findes.\nTryk p\u00e5 sk\u00e6rmen for at placere objektet der.","use-default-cardboard":"Use Default","enable-audio-prompt":"Aktiv\u00e9r lyd?"},"pl-pl":{mute:"Wycisz","cardboard-v1":"Je\u015bli nie masz pewno\u015bci, kt\u00f3rej wersji Cardboard u\u017cywasz, wybierz domy\u015blne sterowanie hotspotem. Nast\u0119pnie skieruj wzrok na hotspot i poczekaj na uruchomienie ich dzia\u0142ania.",
"download-tour":"Pobierz spacer do odtwarzania w trybie offline","change-to-drag-and-release":"Zmie\u0144 tryb na Przeci\u0105gnij i Upu\u015b\u0107",accept:"Zaakceptowa\u0107",cancel:"Anuluj","storage-not-provided-bookmark":"Odmowa zapisu w pami\u0119ci sta\u0142ej. Spr\u00f3buj doda\u0107 stron\u0119 do zak\u0142adek i za\u0142aduj j\u0105 ponownie.","dont-display-again":"Nie wy\u015bwietlaj tego ponownie","web-server-required":"Nie mo\u017cna odtworzy\u0107 tego spaceru z dysku lokalnego. Prze\u015blij go do internetu i spr\u00f3buj ponownie.\nMo\u017cesz te\u017c przeci\u0105gn\u0105\u0107 plik htm (lub ca\u0142y folder spaceru) na ikon\u0119 aplikacji TourViewer.",
download:"Pobierz","change-to-click-and-move":"Zmie\u0144 tryb na to Kliknij i Przenie\u015b",yes:"tak","delete-downloaded":"Usu\u0144","use-safari-for-vr":"Zalecamy Safari, jako przegl\u0105dark\u0119 spacer\u00f3w w trybie VR","exit-fullscreen":"Wyjd\u017a z trybu pe\u0142nego ekranu",no:"nie","download-failed":"Pobieranie nie powiod\u0142o si\u0119","giroscope-disabled-http":"To jest dost\u0119p za po\u015brednictwem protoko\u0142u http, wi\u0119c dost\u0119p do ruchu i orientacji oraz tryb VR s\u0105 wy\u0142\u0105czone. Prze\u0142\u0105cz si\u0119\u00a0na protok\u00f3\u0142 https, aby je w\u0142\u0105czy\u0107.",
"cookies-notice":"Ta strona u\u017cywa plik\u00f3w cookie do zbierania statystyk u\u017cytkowania. Aby uzyska\u0107 wi\u0119cej informacji, odwied\u017a <a>Zasady dotycz\u0105ce plik\u00f3w cookie</a>.","use-cardboard":"U\u017cyj Cardboard","launch-default-browser":"Uruchom w domy\u015blnej przegl\u0105darce","refresh-downloaded":"Od\u015bwie\u017c","rotate-device":"Obr\u00f3\u0107 urz\u0105dzenie","exit-vr":"Wyjd\u017a z VR",reject:"Odrzuca\u0107","disable-measure":"Stop measuring",downloading:"Pobieranie",
"cardboard-v2":"Je\u015bli masz okulary Cardboard v2, kt\u00f3re maj\u0105 przycisk, mo\u017cesz spojrze\u0107 na hotspot i nacisn\u0105\u0107 przycisk, aby uruchomi\u0107 ich dzia\u0142anie.","enable-video-audio-prompt":"W\u0142\u0105czy\u0107 video i d\u017awi\u0119k?","storage-not-provided-launch-from-desktop":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 pulpitu.",downloaded:"Spacer jest pobierany do odtwarzania w trybie offline.","samsung-internet-vr-app-info":"Je\u015bli masz okulary zgodne z Gear VR i zainstalowa\u0142e\u015b Samsung Internet for VR, mo\u017cesz je u\u017cy\u0107 do przegl\u0105dania zawarto\u015bci w VR. Musisz w tym przypadku ustawi\u0107 Samsung Internet jako domy\u015bln\u0105 przegl\u0105dark\u0119.",
"samsung-internet-vr-info":"Je\u015bli masz okulary Gear VR i zainstalowa\u0142e\u015b Samsung Internet for VR, to mo\u017cesz u\u017cy\u0107 ich do przegl\u0105dania zawarto\u015bci w VR. Umie\u015b\u0107 teraz telefon w okularach Gear VR.","enable-video-prompt":"W\u0142\u0105czy\u0107 video?","giroscope-disabled-safari-request-permission":["Dost\u0119p do funkcji ruchu i orientacji oraz tryb VR s\u0105 wy\u0142\u0105czone dla tej strony.","Aby poprawnie wy\u015bwietli\u0107 stron\u0119, kliknij kontynuuj i zaakceptuj wszystkie zgody."],
"storage-not-provided-launch-from-homescreen":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 strony g\u0142\u00f3wnej.","enter-fullscreen":"Uruchom pe\u0142ny ekran","use-cardboard-v2":"U\u017cyj Cardboard v2",unmute:"Wy\u0142\u0105cz Wycisz","enter-vr":"Wejd\u017a do VR","enable-measure":"Start measuring","use-cardboard-info":"Do wy\u015bwietlania w VR mo\u017cesz u\u017cy\u0107 oklular\u00f3w zgodnych z Google Cardboard.","ar-mobile-info":"Poruszaj urz\u0105dzeniem powoli, aby zeskanowa\u0107 sw\u00f3j obszar.\nPojawi si\u0119 okr\u0105g, gdy zostanie znaleziona powierzchnia.\nDotknij ekranu, aby umie\u015bci\u0107 obiekt tam.",
"use-default-cardboard":"U\u017cyj Domy\u015blnych","enable-audio-prompt":"W\u0142\u0105czy\u0107 d\u017awi\u0119k?"},"fr-fr":{mute:"Couper le son","cardboard-v1":"Si vous n'\u00eates pas s\u00fbr de la version de votre Cardboard, s\u00e9lectionnez le contr\u00f4le de hotspot par d\u00e9faut. Ensuite, vous n'aurez qu'\u00e0 fixer un hotspot du regard et attendre que l'action se d\u00e9clenche.","download-tour":"T\u00e9l\u00e9charger la visite pour jouer hors ligne","change-to-drag-and-release":"Changer le mode de contr\u00f4le en glisser-d\u00e9poser",
accept:"Accepter",cancel:"Annuler","storage-not-provided-bookmark":"Stockage persistant refus\u00e9. Essayez de mettre cette page Web en signet et de la recharger.","dont-display-again":"Ne plus afficher ces informations","web-server-required":"Cette visite virtuelle ne peut pas \u00eatre lue \u00e0 partir d'un lecteur local. Veuillez la t\u00e9l\u00e9charger sur Internet et r\u00e9essayer.\nSi vous pr\u00e9f\u00e9rez, faites glisser le fichier htm (ou l'int\u00e9gralit\u00e9 du dossier de la visite) sur l'ic\u00f4ne de l'application TourViewer.",
download:"T\u00e9l\u00e9charger","change-to-click-and-move":"Changer le mode de contr\u00f4le pour cliquer et d\u00e9placer",yes:"Oui","delete-downloaded":"Supprimer","use-safari-for-vr":"Nous recommandons Safari pour visionner cette visite en mode VR","exit-fullscreen":"Quitter le mode plein \u00e9cran",no:"Non","download-failed":"\u00c9chec du t\u00e9l\u00e9chargement","giroscope-disabled-http":"Vous acc\u00e9dez \u00e0 cette page Web via http, donc l'acc\u00e8s au mouvement et \u00e0 l'orientation de votre appareil et le mode VR sont d\u00e9sactiv\u00e9s, veuillez y acc\u00e9der via https pour les activer.",
"cookies-notice":"Cette page Web utilise des cookies pour collecter des statistiques d'utilisation. Pour plus d'informations, veuillez consulter la <a>Politique en mati\u00e8re de cookies</a>.","use-cardboard":"Utiliser le Cardboard","launch-default-browser":"Lancer dans le navigateur par d\u00e9faut","refresh-downloaded":"Rafra\u00eechir","rotate-device":"Veuillez faire pivoter votre appareil","exit-vr":"Quitter la r\u00e9alit\u00e9 virtuelle",reject:"Rejeter","disable-measure":"Arr\u00eatez de mesurer",
downloading:"T\u00e9l\u00e9chargement","cardboard-v2":"Si vous disposez d'un casque Cardboard v2, qui est \u00e9quip\u00e9 d'un bouton, vous pouvez fixer un hotspot du regard et appuyer sur le bouton pour d\u00e9clencher son action.","enable-video-audio-prompt":"Activer la vid\u00e9o et l'audio?","storage-not-provided-launch-from-desktop":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne du bureau pour t\u00e9l\u00e9charger.",downloaded:"Cette visite est t\u00e9l\u00e9charg\u00e9e pour jouer hors ligne.",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"Si vous disposez d'un casque Gear VR compatible avec cet appareil et que vous avez install\u00e9 Samsung Internet pour VR, vous pouvez \u00e9galement l'utiliser pour visualiser ce contenu en r\u00e9alit\u00e9 virtuelle. Il vous suffit de placer maintenant le t\u00e9l\u00e9phone mobile sur le casque.",
"enable-video-prompt":"Activer la vid\u00e9o?","giroscope-disabled-safari-request-permission":["L'acc\u00e8s au mouvement et \u00e0 l'orientation de votre appareil et le mode VR sont d\u00e9sactiv\u00e9s pour ce site.","Pour voir correctement cette page Web, veuillez cliquer sur Continuer et accepter la demande d'autorisation si vous y \u00eates invit\u00e9."],"storage-not-provided-launch-from-homescreen":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne de l'\u00e9cran d'accueil pour t\u00e9l\u00e9charger.",
"enter-fullscreen":"Passer en mode plein \u00e9cran","use-cardboard-v2":"Utiliser le Cardboard v2",unmute:"R\u00e9tablir le son","enter-vr":"Entrez le contenu VR","enable-measure":"Commencer \u00e0 mesurer","use-cardboard-info":"Vous pouvez utiliser n'importe quel casque Google Cardboard compatible pour visualiser ce contenu en r\u00e9alit\u00e9 virtuelle.","ar-mobile-info":"D\u00e9placez lentement votre appareil pour scanner votre espace.\nUn anneau appara\u00eetra lorsqu'une surface sera trouv\u00e9e.\nAppuyez sur l'\u00e9cran pour placer l'objet l\u00e0.",
"use-default-cardboard":"Utiliser par d\u00e9faut","enable-audio-prompt":"Activer le son?"},"de-de":{mute:"Deaktiviere Audio","cardboard-v1":"Wenn Sie sich nicht sicher sind, welche Cardboard-Version Sie verwenden, w\u00e4hlen Sie die Standard-Hotspot-Steuerung. Sie schauen dann einfach auf einen Hotspot und warten, bis die jeweilige Aktion ausgel\u00f6st wird.","download-tour":"Tour zum Offline-Abspielen herunterladen","giroscope-disabled-safari-request-permission":["Der Bewegungs- und Orientierungszugriff, sowie VR Modus Ihres Ger\u00e4ts ist f\u00fcr diese Seite deaktiviert.",
"Um diese Webseite korrekt anzuzeigen, klicken Sie auf Weiter und akzeptieren Sie die Erlaubnisanfrage, wenn Sie dazu aufgefordert werden."],accept:"Akzeptieren",download:"Download",downloading:"Downloading","dont-display-again":"Diese Info nicht mehr anzeigen","web-server-required":"Diese Virtual Tour kann nicht von einem lokalen Laufwerk abgespielt werden. Laden Sie Ihre Tour ins Internet und versuchen Sie es erneut.\nAlternativ, ziehen Sie die htm Datei (oder den ganzen Tour Ordner) auf das Icon der Tour Viewer App, um die Tour direkt lokal abzuspielen.",
cancel:"Abbrechen","change-to-click-and-move":"\u00c4ndern Sie den Steuerungsmodus, um zu klicken und zu drehen",yes:"ja","delete-downloaded":"L\u00f6schen","use-safari-for-vr":"Wir empfehlen Safari, um diese Tour im VR-Modus zu sehen","exit-fullscreen":"Vollbild verlassen",no:"nein","storage-not-provided-bookmark":"Dauerhafte Speicherung verweigert. Versuchen Sie, diese Seite als Lesezeichen zu speichern und erneut zu laden.","download-failed":"Download fehlgeschlagen","giroscope-disabled-http":"Der Bewegungs- und Ausrichtungsszugriff Ihres Ger\u00e4ts ist f\u00fcr diese Webseite deaktiviert. Greifen Sie bitte \u00fcber https darauf zu.",
"cookies-notice":"Diese Webseite verwendet Cookies, um Nutzungsstatistiken zu sammeln. Weitere Informationen finden Sie in der <a>Cookie-Richtlinie</a>.","use-cardboard":"Cardboard verwenden","launch-default-browser":"Im Standardbrowser starten","refresh-downloaded":"Aktualisieren","rotate-device":"Bitte drehen Sie Ihr Ger\u00e4t","exit-vr":"VR verlassen",reject:"Ablehnen","disable-measure":"Messung beenden","change-to-drag-and-release":"\u00c4ndern Sie den Steuerungsmodus zu Ziehen und Loslassen",
"cardboard-v2":"Wenn Sie ein Cardboard v2-Headset haben, das mit einer Taste ausgestattet ist, k\u00f6nnen Sie auf einen Hotspot blicken und die Taste dr\u00fccken, um dessen Aktion auszul\u00f6sen.","enable-video-audio-prompt":"Video und Audio aktivieren?","storage-not-provided-launch-from-desktop":"Bitte starten Sie die Tour erneut \u00fcber das Desktop-Symbol, um sie herunterzuladen.",downloaded:"Diese Tour ist zum Offline-Abspielen heruntergeladen.","samsung-internet-vr-app-info":"Wenn Sie ein Gear VR-Headset haben, das mit diesem Ger\u00e4t kompatibel ist, und Sie Samsung Internet f\u00fcr VR installiert haben, k\u00f6nnen Sie es auch verwenden, um diese Inhalte in VR anzusehen. Machen Sie dazu Samsung Internet zu Ihrem Standardbrowser.",
"samsung-internet-vr-info":"Wenn Sie ein Gear VR-Headset haben, das mit diesem Ger\u00e4t kompatibel ist, und Sie Samsung Internet f\u00fcr VR installiert haben, k\u00f6nnen Sie es auch verwenden, um diese Inhalte in VR zu sehen. Setzen Sie dazu nun das Mobiltelefon auf das Headset.","enable-video-prompt":"Video aktivieren?","storage-not-provided-launch-from-homescreen":"Bitte starten Sie die Tour erneut \u00fcber das Symbol auf dem Startbildschirm, um sie herunterzuladen.","enter-fullscreen":"Vollbildmodus aktivieren",
"use-cardboard-v2":"Cardboard v2 verwenden",unmute:"Audio aktivieren","enter-vr":"VR Inhalt eingeben","enable-measure":"Messung beginnen","use-cardboard-info":"Sie k\u00f6nnen jedes kompatible Google Cardboard-Headset verwenden, um diese Inhalte in VR zu sehen.","ar-mobile-info":"Bewegen Sie Ihr Ger\u00e4t langsam, um Ihr Raum zu scannen.\nEin Ring wird angezeigt, wenn eine Oberfl\u00e4che gefunden wird.\nTippen Sie auf den Bildschirm, um das Objekt dort zu platzieren.","use-default-cardboard":"Standard verwenden",
"enable-audio-prompt":"Audio aktivieren?"},"tr-tr":{mute:"Sesi devre d\u0131s\u0131 b\u0131rakmak","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"S\u00fcr\u00fckleyip b\u0131rakmak i\u00e7in kontrol modunu de\u011fi\u015ftirin",accept:"Kabul etmek",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.",
"dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"T\u0131klamak ve ta\u015f\u0131mak i\u00e7in kontrol modunu de\u011fi\u015ftirin",yes:"evet","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode",
"exit-fullscreen":"Tam ekrandan \u00e7\u0131k",no:"hay\u0131r","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Bu web sayfas\u0131, kullan\u0131m istatistiklerini toplamak i\u00e7in tan\u0131mlama bilgileri kullan\u0131r. Daha fazla bilgi i\u00e7in l\u00fctfen <a>\u00c7erez Politikas\u0131n\u0131</a> ziyaret edin.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Reddet","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Ses ve video etkinle\u015ftirilsin mi?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Video aktif edilsin mi?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Tam ekran yap","use-cardboard-v2":"Use Cardboard v2",unmute:"Sesi etkinle\u015ftir","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Cihaz\u0131n\u0131z\u0131 yava\u015f\u00e7a hareket ettirerek alan\u0131n\u0131z\u0131 taray\u0131n.\nBir daire g\u00f6r\u00fcnecektir kullan\u0131c\u0131 aray\u00fcz\u00fcnde bir y\u00fczey bulundu\u011funda.\nEkran\u0131na dokunun ve objeyi oraya yerle\u015ftirin.","use-default-cardboard":"Use Default","enable-audio-prompt":"Ses aktif edilsin mi?"}}});
define("tdv/player/l10n",["require","exports","tdv/player/texts","tdv/utils","tdv/player/view/util/URL"],function(a,m,h,n,g){function k(f){return h[d][f]||h.en[f]||f}for(var e in h)h[e.substring(0,2)]=h[e];h["zh-hk"]=h["zh-mo"]=h["zh-tw"];h.no=h.nn;var b=function(){var f=window.navigator,l=["language","browserLanguage","systemLanguage","userLanguage"],p,q,r=[];(p=g.getQueryParameter("language"))&&r.push(p.toLowerCase());var t=f.languages;if(Array.isArray(t))for(p=0;p<t.length;p++)(q=t[p])&&q.length&&
(q=q.toLowerCase(),r.indexOf(q)==-1&&r.push(q));for(p=0;p<l.length;p++)(q=f[l[p]])&&q.length&&(q=q.toLowerCase(),r.indexOf(q)==-1&&r.push(q));return r}(),c=Object.keys(h),d=function(){for(var f=0;f<b.length;f++){var l=b[f];if(c.indexOf(l)>=0)return l;l=l.substr(0,2);if(c.indexOf(l)>=0)return l}return"en"}();k.log=function(){n.log("translation lang: "+d);n.log("browser lang: "+b.join(", "))};return k});
define("tdv/view/util/UserInitiatedAction",["require","exports","tdv/player/view/util/Device"],function(a,m,h){function n(){for(;l.length;)l.shift()();document.body.removeEventListener("click",n,!0);document.body.removeEventListener("touchstart",e,!0);document.body.removeEventListener("touchmove",k,!0);document.body.removeEventListener("touchend",g,!0);d=!1}function g(){f&&n()}function k(){f=!1}function e(){f=!0;h.Nd()==h.vj&&n()}function b(){document.body.addEventListener("click",n,!0);document.body.addEventListener("touchstart",
e,!0);document.body.addEventListener("touchmove",k,!0);document.body.addEventListener("touchend",g,!0)}function c(q,r){var t=this;return function(){r&&n();p+=1;var u=q.apply(t,arguments);--p;return u}}var d=!1,f=!1,l=[];a={wait:function(q){l.push(q);d||(d=!0,document.body?b():document.addEventListener("DOMContentLoaded",b))},uqb:function(q){q=l.indexOf(q);q>=0&&l.splice(q,1)}};var p=0;a.Br=c;a.Xsa=c;a.B8=function(){return p>0};return a});
define("tdv/view/av/DummyVideoData",["require","exports"],function(){var a={};a.src=a.qqb="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";
return a});
define("tdv/view/av/PlaybackRequiresUserAction",["require","exports","tdv/view/av/DummyVideoData","tdv/player/view/util/Device"],function(a,m,h,n){function g(p){l=p;for(d=!0;f.length;)f.shift()(l)}function k(p){var q=!1,r=document.createElement("video");r.setAttribute("webkit-playsinline","true");r.setAttribute("playsinline","true");r.src="";r.play()["catch"](function(t){q=t.name!=="NotAllowedError"}).finally(function(){p(!q)})}function e(p){var q=document.createElement("video");q.setAttribute("webkit-playsinline","true");
q.setAttribute("playsinline","true");q.src=h.src;var r=!1;q.play().then(function(){r=!0;q.pause();p(!1)})["catch"](function(){r||p(!0)})}function b(){c||(c=!0,n.Tb()==n.Yj?g(!0):n.Tb()==n.Ji?e(g):k(function(p){p?e(g):g(!1)}))}var c=!1,d=!1,f=[],l;return{test:function(p){d||c||b();f.push(p);if(d)for(;f.length;)f.shift()(l)}}});
define("tdv/view/util/AudioActivation",["require","tdv/player/l10n","tdv/view/util/UserInitiatedAction","tdv/view/av/PlaybackRequiresUserAction"],function(a){function m(e,b){this.eg=e;this.Hn=b;this.Ss=this.Ss.bind(this);this.Ts=!1}function h(){this.Ss=this.Ss.bind(this);this.uma=this.uma.bind(this);this.I="not tested";this.Cva=[];this.Tx=[];this.a4=!1;g.wait(this.uma)}var n=a("tdv/player/l10n"),g=a("tdv/view/util/UserInitiatedAction"),k=a("tdv/view/av/PlaybackRequiresUserAction");h.prototype.Xmb=
function(){this.I=="not tested"&&(this.I="testing",k.test(function(e){this.I=e?"requires action":"allowed";this.U4a()}.bind(this)))};h.prototype.U4a=function(){this.I=="allowed"?this.Ss(!0):this.a4&&(this.a4=!1,this.Tx.forEach(function(e){e.request()}))};h.prototype.Usa=function(e){this.I=="allowed"?e.call(this,!0):this.Cva.push(e)};h.prototype.request=function(e){this.rD(e)};h.prototype.cancel=function(e){this.AR(e)};h.prototype.active=function(){return this.I=="allowed"};h.prototype.Alb=function(){this.I==
"allowed"&&(this.I="requires action")};h.prototype.uma=function(){setTimeout(this.hZa.bind(this),300);this.Nu(!0)};h.prototype.hZa=function(){for(;this.Tx.length;)this.Tx.pop().cancel()};h.prototype.rD=function(e){this.I=="testing"||this.I=="not tested"?(this.Pca(e),this.a4=!0):this.I=="requires action"&&this.Pca(e).request()};h.prototype.AR=function(e){this.I=="testing"||this.I=="not tested"?this.a4=!1:this.I=="requires action"&&this.Pca(e).cancel()};h.prototype.Ss=function(e){var b=this.Tx;this.Tx=
[];b.forEach(function(c){e||c.eg.set("mute",!0);c.cancel()});this.Nu(e)};h.prototype.Nu=function(e){this.I="allowed";this.Cva.forEach(function(b){b.call(window,e)})};h.prototype.Pca=function(e){for(var b=null,c=0;c<this.Tx.length&&!b;c++)this.Tx[c].eg==e&&(b=this.Tx[c]);b||(b=new m(e,this.Ss),this.Tx.push(b));return b};m.prototype.request=function(){this.Ts||(this.Ts=!0,this.eg.get("mediaActivationMode")=="button"?this.eg.hO.Vjb(this.Ss):this.eg.NM.show(n("enable-audio-prompt"),this.Ss))};m.prototype.cancel=
function(){this.eg.hO.Pcb(this.Ss);this.eg.NM.oe(this.Ss)};m.prototype.Ss=function(e){this.Hn(e!==!1);this.Ts=!1};return new h});
define("tdv/view/util/Visibility","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k){return new (function(e){function b(){var c=e.call(this)||this;c.visible=!0;c.Va=!1;c.yaa=!1;c.visible=!0;c.Va=!1;c.yaa=!1;c.lQa=k.getQueryParameter("redirect-when-hidden")||"";c.yjb=k.Tg("reload-when-hidden",!1);document.addEventListener("visibilitychange",c.onChange.bind(c),!1);c.onChange();return c}P(b,e);b.prototype.eB=
function(c){if(this.Va=c)this.yaa=!1;this.onChange()};b.prototype.Mra=function(c){this.yaa=c;this.onChange()};b.prototype.onChange=function(){var c=this.Va?!this.yaa:!document.hidden;this.visible!=c&&((this.visible=c)?this.Xib():this.p9(),this.o(new n(h.V)))};b.prototype.Xib=function(){this.lQa?window.location.href=this.lQa:this.yjb&&window.location.reload()};b.prototype.p9=function(){};return b}(g))});
define("tdv/view/av/SharedAudioContext","require exports tdv/constants/EventName tdv/player/view/util/Flags tdv/view/util/AudioActivation tdv/view/util/Visibility".split(" "),function(a,m,h,n,g,k){var e=null;n.ata?"AudioContext"in window===!1?e=null:(e=new AudioContext,g.Usa(function(){e.state!=="running"&&e.resume()}),k.bind(h.V,function(){k.visible&&e.state=="interrupted"&&e.resume()},window,!0)):e=null;return e});
define("tdv/player/view/util/Capabilities","require exports tdv/utils tdv/view/av/SharedAudioContext tdv/player/view/util/Device tdv/player/view/util/Flags tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k,e){a=function(){function b(){}b.bmb=function(){this.Fma=!0};b.$2a=function(){window.MediaSource=window.MediaSource||window.ppb;return window.MediaSource&&typeof window.MediaSource.isTypeSupported==="function"&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')};
b.j3a=function(){if(g.Tb()==g.Ji){var c=g.Uoa();if(c>=10&&c<11||c>=11.3)return!0}return!1};b.a3a=function(){return g.Tb()==g.Yj||g.Tb()==g.Ji?!0:!1};b.bJa=function(c){try{return this.IIa||(this.IIa=document.createElement("audio")),!!this.IIa.canPlayType(c).replace(/^no$/,"")}catch(d){}return!1};b.IO=function(c){try{return this.K6||(this.K6=document.createElement("video"),this.K6.setAttribute("webkit-playsinline","true"),this.K6.setAttribute("playsinline","true")),!!this.K6.canPlayType(c).replace(/^no$/,
"")}catch(d){}return!1};b.Gcb=function(){return g.Tb()==g.Ji?g.Uoa()>=15||n?!0:!1:!0};b.c3a=function(){try{if(document.createElement("canvas").getContext("webgl"))return!0}catch(c){}try{if(document.createElement("canvas").getContext("experimental-webgl"))return!0}catch(c){}return!1};b.ISa=function(c,d,f,l){if(k.uWa)return!0;if(g.Nd()==g.vj){if(c<=4096&&d<=2048)return!0}else if((g.xP()||g.KJ())&&!g.iE()){if(c<=5760&&d<=5760||c<=8192&&d<=4096)return!0}else if((g.xP()||g.KJ())&&g.fpa()){if(l=="h264"&&
(c<=5760&&d<=5760||c<=7680&&d<=3840)||c<=3840&&d<=2160)return!0}else if(g.cNa()){if(c<=7680&&d<=3840||c<=5760&&d<=5760)return!0}else if(g.AP())if(l=="h264"){if(c<=5760&&d<=5760||c<=7680&&d<=3840)return!0}else{if(c<=4400&&d<=2200)return!0}else if(g.ub()){if(c<=3840&&d<=2160)return!0}else if(c<=4096&&d<=2048)return!0;return!1};b.Icb=function(){return g.AP()||(g.xP()||g.KJ())&&g.Dc()==g.qx||!g.ub()&&b.Fma&&g.Tb()==g.Pp?!0:!1};b.HSa=function(c){return b.ISa(c.get("width"),c.get("height"),c.get("framerate"),
c.get("codec"))};b.Hcb=function(){return b.Fma?!0:!1};b.Jcb=function(){return k.xta!==void 0?k.xta:g.KJ()||g.AP()||g.Ihb()||g.cNa()||g.dNa()||g.xP()&&!g.iE()||!g.kf()&&g.Nd()!=g.uB&&g.Nd()!=g.vj?!0:!1};b.Smb=function(c,d){return b.ISa(c,d,0)};b.log=function(){h.log("webgl: "+b.ci);h.log("html5 audio: "+b.CMa);h.log("html5 video: "+b.FMa)};b.Fma=!1;b.TPa=!k.XUa&&k.WUa?1:2;b.EMa=b.bJa('audio/ogg; codecs="vorbis"');b.DMa=b.bJa("audio/mpeg");b.CMa=b.EMa||b.DMa;b.Qoa=b.IO('video/ogg; codecs="theora"');
b.IO('video/mp4; codecs="avc1.42E01E"');b.Roa=b.IO('video/webm; codecs="vp8, vorbis"');b.Ygb=b.IO('video/mp4; codecs="hev1"');b.k8=b.IO("video/mp4");b.Zgb=b.IO("video/quicktime");b.$gb=b.j3a();b.qMa=b.a3a();b.Fgb=b.qMa||b.k8&&b.$2a();b.FMa=b.Qoa||b.k8||b.Roa;b.ci=b.c3a();b.summary=["webgl:"+b.ci,"html5audio:"+b.CMa,"html5video:"+b.FMa].join(" ");return b}();e.Bk("debug")&&e.Bk("capabilities")&&a.log();return a});
define("tdv/player/view/util/geo/Quaternion",["require"],function(){var a=Math.PI/180,m=180/Math.PI,h=new THREE.Euler(0,0,0,"YXZ"),n=new THREE.Quaternion;return{create:function(){return{x:0,y:0,z:0,w:0}},jX:function(g,k,e,b){n.setFromEuler(h.set(k*a,-g*a,e*a,"YXZ"));g=b||{};g.x=n.x;g.y=n.y;g.z=n.z;g.w=n.w;return g},jaa:function(g,k){h.setFromQuaternion(n.set(g.x,g.y,g.z,g.w),"YXZ");g={};g.Xa=-h.y*m;g.pitch=h.x*m;g.Mg=h.z*m;k||(g.pitch=Math.min(90,Math.max(-90,g.pitch)));return g},Xa:function(g){h.setFromQuaternion(n.set(g.x,
g.y,g.z,g.w),"YXZ");return-h.y*m}}});
define("tdv/player/view/util/MathUtil",["require"],function(){var a={};a.degToRad=Math.PI/180;a.radToDeg=180/Math.PI;a.Vector2=function(m,h){this.x=m||0;this.y=h||0};a.Vector2.prototype={constructor:a.Vector2,set:function(m,h){this.x=m;this.y=h;return this},copy:function(m){this.x=m.x;this.y=m.y;return this},subVectors:function(m,h){this.x=m.x-h.x;this.y=m.y-h.y;return this}};a.Vector3=function(m,h,n){this.x=m||0;this.y=h||0;this.z=n||0};a.Vector3.prototype={constructor:a.Vector3,set:function(m,h,
n){this.x=m;this.y=h;this.z=n;return this},copy:function(m){this.x=m.x;this.y=m.y;this.z=m.z;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var m=this.length();m!==0?this.multiplyScalar(1/m):this.z=this.y=this.x=0;return this},multiplyScalar:function(m){this.x*=m;this.y*=m;this.z*=m},applyQuaternion:function(m){var h=this.x,n=this.y,g=this.z,k=m.x,e=m.y,b=m.z;m=m.w;var c=m*h+e*g-b*n,d=m*n+b*h-k*g,f=m*g+k*n-e*h;h=-k*h-e*n-b*g;this.x=
c*m+h*-k+d*-b-f*-e;this.y=d*m+h*-e+f*-k-c*-b;this.z=f*m+h*-b+c*-e-d*-k;return this},dot:function(m){return this.x*m.x+this.y*m.y+this.z*m.z},crossVectors:function(m,h){var n=m.x,g=m.y;m=m.z;var k=h.x,e=h.y;h=h.z;this.x=g*h-m*e;this.y=m*k-n*h;this.z=n*e-g*k;return this}};a.Quaternion=function(m,h,n,g){this.x=m||0;this.y=h||0;this.z=n||0;this.w=g!==void 0?g:1};a.Quaternion.prototype={constructor:a.Quaternion,set:function(m,h,n,g){this.x=m;this.y=h;this.z=n;this.w=g;return this},copy:function(m){this.x=
m.x;this.y=m.y;this.z=m.z;this.w=m.w;return this},lRa:function(m,h,n){var g=Math.cos(m/2),k=Math.cos(h/2),e=Math.cos(n/2);m=Math.sin(m/2);h=Math.sin(h/2);n=Math.sin(n/2);this.x=m*k*e+g*h*n;this.y=g*h*e-m*k*n;this.z=g*k*n-m*h*e;this.w=g*k*e+m*h*n;return this},setFromAxisAngle:function(m,h){h/=2;var n=Math.sin(h);this.x=m.x*n;this.y=m.y*n;this.z=m.z*n;this.w=Math.cos(h);return this},multiply:function(m){return this.multiplyQuaternions(this,m)},multiplyQuaternions:function(m,h){var n=m.x,g=m.y,k=m.z;
m=m.w;var e=h.x,b=h.y,c=h.z;h=h.w;this.x=n*h+m*e+g*c-k*b;this.y=g*h+m*b+k*e-n*c;this.z=k*h+m*c+n*b-g*e;this.w=m*h-n*e-g*b-k*c;return this},inverse:function(){this.x*=-1;this.y*=-1;this.z*=-1;this.normalize();return this},normalize:function(){var m=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);m===0?(this.z=this.y=this.x=0,this.w=1):(m=1/m,this.x*=m,this.y*=m,this.z*=m,this.w*=m);return this},slerp:function(m,h){if(h===0)return this;if(h===1)return this.copy(m);var n=this.x,g=
this.y,k=this.z,e=this.w,b=e*m.w+n*m.x+g*m.y+k*m.z;b<0?(this.w=-m.w,this.x=-m.x,this.y=-m.y,this.z=-m.z,b=-b):this.copy(m);if(b>=1)return this.w=e,this.x=n,this.y=g,this.z=k,this;m=Math.acos(b);var c=Math.sqrt(1-b*b);if(Math.abs(c)<.001)return this.w=.5*(e+this.w),this.x=.5*(n+this.x),this.y=.5*(g+this.y),this.z=.5*(k+this.z),this;b=Math.sin((1-h)*m)/c;h=Math.sin(h*m)/c;this.w=e*b+this.w*h;this.x=n*b+this.x*h;this.y=g*b+this.y*h;this.z=k*b+this.z*h;return this},setFromUnitVectors:function(){var m,
h;return function(n,g){m===void 0&&(m=new a.Vector3);h=n.dot(g)+1;h<1E-6?(h=0,Math.abs(n.x)>Math.abs(n.z)?m.set(-n.y,n.x,0):m.set(0,-n.z,n.y)):m.crossVectors(n,g);this.x=m.x;this.y=m.y;this.z=m.z;this.w=h;this.normalize();return this}}()};return a});
define("tdv/player/view/util/DeviceOrientationSensor",["require","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/util/MathUtil"],function(a){function m(){d||(d=!0,q=new c.Vector3(0,0,1),r=new c.Quaternion,t=new c.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),u=new c.Quaternion,n(),window.addEventListener("orientationchange",n,!1),window.addEventListener("deviceorientation",g,!1),h())}function h(){if(v&&l!==void 0&&p!==void 0){v=!1;var y=c.degToRad*p;u.lRa(c.degToRad*
l.beta,c.degToRad*l.alpha,-(c.degToRad*l.gamma));u.multiply(t);u.multiply(r.setFromAxisAngle(q,-y));w||(x++,x>=5&&(w=!0,f.o(new e(k.vd))));f.o(new e(k.V))}}function n(){p=window.orientation||0;v=!0;h()}function g(y){l=y;v=!0;h()}var k=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/util/MathUtil"),d=!1,f=new b,l,p,q,r,t,u,v,w=!1,x=0;m.prototype.Gt=function(){h();return u};m.prototype.bind=function(){f.bind.apply(f,arguments)};m.prototype.h=
function(){f.h.apply(f,arguments)};m.prototype.stop=function(){window.removeEventListener("orientationchange",n,!1);window.removeEventListener("deviceorientation",g,!1)};return m});
define("tdv/player/view/util/FusionPoseSensor","require tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/MathUtil".split(" "),function(a){function m(l){this.Thb=l;this.Ana=new g;this.e7=new g;this.Bqa=new g;this.rJ=new c.Quaternion;this.Aqa=new c.Quaternion;this.THa=new c.Quaternion;this.aNa=!1;this.m7=new c.Vector3;this.Fpa=new c.Vector3;this.rgb=new c.Quaternion}function h(){this.deviceId="webvr-polyfill:fused";this.XNa=!1;this.WNa=
0;this.xW=new c.Vector3;this.d8=new c.Vector3;this.filter=new m(.98);this.pjb=new n(.04);this.tP=f.tP();this.gr=f.gr();f.noa();this.ppa=f.thb();this.r7=new c.Quaternion;f.gr()?this.r7.setFromAxisAngle(new c.Vector3(1,0,0),Math.PI/2):this.r7.setFromAxisAngle(new c.Vector3(1,0,0),-Math.PI/2);this.u8=new c.Quaternion;this.BQ=new c.Quaternion;this.lPa=new c.Quaternion;this.lPa.setFromAxisAngle(new c.Vector3(0,0,1),-window.orientation*Math.PI/180);this.KRa();f.YMa()&&this.r7.multiply(this.u8);this.Rw=
new c.Quaternion;this.tP=f.tP();this.gr=f.gr();this.shb=f.noa()>=66;this.UJ=this.UJ.bind(this);this.jY=this.jY.bind(this);this.iY=this.iY.bind(this);screen&&screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",this.UJ):window.addEventListener("orientationchange",this.UJ);this.ppa?window.addEventListener("deviceorientation",this.jY):window.addEventListener("devicemotion",this.iY)}function n(l){this.rjb=l;this.U9=new c.Quaternion;this.$P=null;this.YJa=
new c.Quaternion;this.rY=new c.Quaternion}function g(l,p){this.set(l,p)}var k=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher");a("tdv/player/view/util/Device");var c=a("tdv/player/view/util/MathUtil"),d=new b;m.prototype.Nbb=function(l,p){this.Ana.set(l,p)};m.prototype.Vbb=function(l,p){this.e7.set(l,p);f.Ohb(p-this.Bqa.iaa)&&this.fkb();this.Bqa.copy(this.e7)};m.prototype.fkb=function(){if(this.aNa){var l=this.sgb(this.e7.sample,this.e7.iaa-this.Bqa.iaa);this.rgb.multiply(l);
this.rJ.copy(this.Aqa);this.rJ.multiply(l);l=new c.Quaternion;l.copy(this.rJ);l.inverse();this.m7.set(0,0,-1);this.m7.applyQuaternion(l);this.m7.normalize();this.Fpa.copy(this.Ana.sample);this.Fpa.normalize();l=new c.Quaternion;l.setFromUnitVectors(this.m7,this.Fpa);l.inverse();var p=new c.Quaternion;p.copy(this.rJ);p.multiply(l);this.rJ.slerp(p,1-this.Thb);this.Aqa.copy(this.rJ)}else this.THa=this.Mbb(this.Ana.sample),this.Aqa.copy(this.THa),this.aNa=!0};m.prototype.Gt=function(){return this.rJ};
m.prototype.Mbb=function(l){var p=new c.Vector3;p.copy(l);p.normalize();l=new c.Quaternion;l.setFromUnitVectors(new c.Vector3(0,0,-1),p);l.inverse();return l};m.prototype.sgb=function(l,p){var q=new c.Quaternion,r=new c.Vector3;r.copy(l);r.normalize();q.setFromAxisAngle(r,l.length()*p);return q};h.prototype.stop=function(){screen&&screen.orientation&&screen.orientation.addEventListener&&screen.orientation.removeEventListener("change",this.UJ);window.removeEventListener("orientationchange",this.UJ);
window.removeEventListener("deviceorientation",this.jY);window.removeEventListener("devicemotion",this.iY)};h.prototype.vm=function(){return null};h.prototype.Gt=function(){var l=void 0;if(this.ppa&&this.N0){this.$Ja=this.$Ja||function(){var q=(new c.Quaternion).setFromAxisAngle(new c.Vector3(0,0,-1),0),r=new c.Quaternion;this.T4=="landscape-secondary"?r.setFromAxisAngle(new c.Vector3(0,1,0),Math.PI/-2):r.setFromAxisAngle(new c.Vector3(0,1,0),Math.PI/2);return q.multiply(r)}();this.ZJa=this.ZJa||
function(){var q=new c.Quaternion;q.setFromAxisAngle(new c.Vector3(1,0,0),-Math.PI/2);return q}();l=this.N0;var p=new c.Quaternion;p.copy(l);p.multiply(this.ZJa);p.multiply(this.Rw);p.multiply(this.BQ);p.multiplyQuaternions(this.$Ja,p);this.Aqb&&(p.x=0,p.z=0,p.normalize());this.I9[0]=p.x;this.I9[1]=p.y;this.I9[2]=p.z;this.I9[3]=p.w;return this.I9}l=this.filter.Gt();l=this.pjb.Vfb(l,this.d8,this.$P);p=new c.Quaternion;p.copy(this.r7);p.multiply(this.Rw);p.multiply(l);p.multiply(this.BQ);return p};
h.prototype.resetPose=function(){this.Rw.copy(this.filter.Gt());this.Rw.x=0;this.Rw.y=0;this.Rw.z*=-1;this.Rw.normalize();f.YMa()&&this.Rw.multiply(this.u8);this.Rw.multiply(this.lPa)};h.prototype.jY=function(l){this.N0=this.N0||new c.Quaternion;var p=l.alpha,q=l.beta;l=l.gamma;p=(p||0)*Math.PI/180;q=(q||0)*Math.PI/180;l=(l||0)*Math.PI/180;this.N0.lRa(q,p,-l)};h.prototype.iY=function(l){var p=l.rotationRate;if(p){var q=l.accelerationIncludingGravity;l=l.timeStamp/1E3;this.tP&&(l/=1E3);var r=l-this.$P;
r<=f.Mta||r>f.Ita?this.$P=l:(this.xW.set(-q.x,-q.y,-q.z),this.d8.set(p.alpha,p.beta,p.gamma),(this.gr||this.tP||this.shb)&&this.d8.multiplyScalar(Math.PI/180),this.filter.Nbb(this.xW,l),this.filter.Vbb(this.d8,l),this.$P=l,this.XNa||(this.WNa++,this.WNa>=5&&(this.XNa=!0,d.o(new e(k.vd)))),this.T4!=this.bLa()&&this.UJ(),d.o(new e(k.V)))}else this.ppa=!0,window.addEventListener("deviceorientation",this.jY),window.removeEventListener("devicemotion",this.iY)};h.prototype.bind=function(){d.bind.apply(d,
arguments)};h.prototype.h=function(){d.h.apply(d,arguments)};h.prototype.UJ=function(){this.KRa();d.o(new e(k.V))};h.prototype.KRa=function(){this.BQ.set(0,0,0,1);this.T4=this.bLa();switch(this.T4){case "landscape-primary":this.BQ.setFromAxisAngle(new c.Vector3(0,0,1),-Math.PI/2);break;case "landscape-secondary":this.BQ.setFromAxisAngle(new c.Vector3(0,0,1),Math.PI/2)}this.u8.copy(this.BQ);this.u8.inverse()};h.prototype.bLa=function(){var l=screen.orientation&&screen.orientation.type;if(!l)switch(window.orientation){case 0:l=
"portrait-primary";break;case 90:l="landscape-primary";break;case -90:l="landscape-secondary";break;case 180:l="portrait-secondary"}l=="landscape-primary"&&(this.xW.z>4.9||this.xW.z<-4.9?l=this.T4||l:this.xW.x>0&&(l="landscape-secondary"));return l};n.prototype.Vfb=function(l,p,q){if(!this.$P)return this.U9.copy(l),this.$P=q,l;q=new c.Vector3;q.copy(p);q.normalize();p=p.length();if(p<c.degToRad*20)return this.rY.copy(l),this.U9.copy(l),this.rY;this.YJa.setFromAxisAngle(q,p*this.rjb);this.rY.copy(this.U9);
this.rY.multiply(this.YJa);this.U9.copy(l);return this.rY};g.prototype.set=function(l,p){this.sample=l;this.iaa=p};g.prototype.copy=function(l){this.set(l.sample,l.iaa)};var f={Mta:.001,Ita:1,Ohb:function(l){return isNaN(l)||l<=f.Mta||l>f.Ita?!1:!0}};f.gr=function(){var l=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return l}}();f.jqb=function(){var l=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return l}}();f.tP=function(){var l=navigator.userAgent.indexOf("Firefox")!==
-1&&navigator.userAgent.indexOf("Android")!==-1;return function(){return l}}();f.noa=function(){var l=navigator.userAgent.match(/.*Chrome\/([0-9]+)/),p=l?parseInt(l[1],10):null;return function(){return p}}();f.thb=function(){var l=!1;if(f.noa()===65){var p=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(p){p=p[1].split(".");var q=p[3];l=parseInt(p[2],10)===3325&&parseInt(q,10)<148}}return function(){return l}}();f.YMa=function(){return window.orientation==90||window.orientation==-90};return h});
define("tdv/player/view/util/Gyroscope","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/geo/Quaternion tdv/player/view/util/Device tdv/player/view/util/DeviceOrientationSensor tdv/player/view/util/FusionPoseSensor tdv/player/view/util/URL".split(" "),function(a){function m(){function w(){p=!0;f.o(new n(h.V))}function x(){var C;!F||!y&&A?A&&(C=z):C=D;q!=C&&(q&&(q.h(h.V,w),q.stop()),q=C)&&(q.bind(h.V,w,this,!0),w())}var y=e.Nd()==e.vj||d.Bk("debug")&&
d.getQueryParameter("sensor")=="deviceorientation",z=new c,A=!1;z.bind(h.vd,function(){A=!0;x()},this,!0);var D=new b,F=!1;D.bind(h.vd,function(){F=!0;x()},this,!0)}a("tdv/utils");var h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/util/geo/Quaternion"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/util/DeviceOrientationSensor"),c=a("tdv/player/view/util/FusionPoseSensor"),d=a("tdv/player/view/util/URL"),f=new g,l={},p=!1,q,r=
[],t=!1,u=!1;l.Qqa=function(w){w&&r.push(w);if(!l.disabled)for(;r.length;)r.pop()();else if(e.Nd()==e.vj&&window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission){DeviceOrientationEvent.requestPermission().then(function(y){y==="granted"&&(u=!0,x())})["catch"](function(){});DeviceMotionEvent.requestPermission().then(function(y){y==="granted"&&(t=!0,x())})["catch"](function(){});var x=function(){if(l.disabled&&t&&u)for(l.disabled=!1,m();r.length;)r.pop()()};x()}};l.bind=function(w,x){f.bind(h.V,
w,x)};l.h=function(w,x){f.h(h.V,w,x)};l.Yib=function(){return p};l.Gt=function(){p=!1;if(q){var w=q.Gt();w=k.jaa(w);return{yaw:w.Xa,pitch:w.pitch,roll:w.Mg}}return{yaw:0,pitch:0,roll:0}};if(e.Nd()==e.Xua||e.Nd()==e.r_||e.Nd()==e.Fta||e.kf())l.ol=!1,l.disabled=!1;else if(e.Nd()==e.uB&&e.Tb()==e.Pp&&window.location.protocol!="https:"&&window.location.hostname!="localhost")l.ol=!0,l.disabled=!0;else if(e.Nd()==e.vj)if(l.ol=!0,l.disabled=!0,window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission)l.Qqa();
else{var v=function(){window.removeEventListener("deviceorientation",v,!1);l.disabled=!1;m()};window.addEventListener("deviceorientation",v,!1)}else l.ol=window.DeviceMotionEvent!=void 0,l.disabled=!1;l.ol&&!l.disabled&&m();return l});
define("tdv/player/view/util/LibsLoader",["require","exports","tdv/player/view/util/URL"],function(a,m,h){m=function(){function g(){this.O8=null;this.P6=[]}g.prototype.initialize=function(k){this.O8=h.mB(k);this.OZ=this.OZ.bind(this);this.update()};g.prototype.load=function(k,e){this.P6.push({call:k,context:e||window});this.FP||(this.FP=this.s7());this.update()};g.prototype.pj=function(){return this.FP!==void 0};g.prototype.update=function(){this.P6.length>0&&(this.FP!==void 0?this.heb():this.O8&&
this.ypa())};g.prototype.OZ=function(){var k=this.s7();k===void 0?setTimeout(this.OZ,250):(this.FP=k,this.update())};g.prototype.ypa=function(){throw Error("Method not implemented.");};g.prototype.s7=function(){throw Error("Method not implemented.");};g.prototype.heb=function(){for(;this.P6.length>0;){var k=this.P6.pop();k.call.call(k.context,this.FP)}};return g}();a=function(g){function k(e){var b=g.call(this)||this;b.vNa=e;return b}P(k,g);k.prototype.ypa=function(){this.script||(this.script=document.createElement("script"),
this.script.type="text/javascript",this.script.src=this.O8,document.getElementsByTagName("head")[0].appendChild(this.script),this.OZ())};k.prototype.s7=function(){for(var e=window,b=0;b<this.vNa.length&&e!==void 0;b++)e=e[this.vNa[b]];return e};return k}(m);m=function(g){function k(e){var b=g.call(this)||this;b.Spa=e;return b}P(k,g);k.prototype.ypa=function(){this.module||(k.lhb(),this.module=document.createElement("script"),this.module.type="module",this.module.textContent=['import * as all from "'+
this.O8+'";',"window."+this.Spa.join(".")+" = all;"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.module),this.OZ())};k.prototype.s7=function(){for(var e=window,b=0;b<this.Spa.length&&e!==void 0;b++)e=e[this.Spa[b]];return e};k.lhb=function(){this.n8||(this.n8=document.createElement("script"),this.n8.type="importmap",this.n8.textContent=['{\n"imports":\n{','"three": "'+this.Tdb()+'"',"}\n}"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.n8))};k.Tdb=function(){var e=
[];e.push("const three = window.THREE;");for(var b in window.THREE)e.push("export const "+b+" = three."+b+";");return window.URL.createObjectURL(new Blob([e.join("\n")],{type:"application/javascript"}))};return k}(m);var n={};n.GS=new m(["TDV","GS"]);n.zWa=new a(["WebVRConfig","FORCE_ENABLE_VR"]);n.Vua=new a(["WebXRPolyfill"]);n.HLS=new a(["Hls"]);n.initialize=function(g){this.HLS.initialize(g.get(TDV.PlayerSettings.HLS_URL));this.zWa.initialize(g.get(TDV.PlayerSettings.WEBVR_POLYFILL_URL));this.Vua.initialize(g.get(TDV.PlayerSettings.WEBXR_POLYFILL_URL));
this.GS.initialize(g.get(TDV.PlayerSettings.GS_URL))};return n});
define("tdv/player/view/util/xr/APIAvailabilityChecker","require exports tdv/player/view/util/Device tdv/player/view/util/Capabilities tdv/player/view/util/Gyroscope tdv/player/view/util/LibsLoader tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k,e){return function(){function b(){}b.initialize=function(c){this.XR.h$?(this.Nra(!0),this.KX||(this.KX=this.isa("immersive-ar").then(function(d){this.i$(d)}.bind(this)).catch(function(){this.i$(!1)}.bind(this))),c()):(this.KX||(this.KX=Promise.all([this.isa("immersive-vr").then(function(d){this.Nra(d)}.bind(this)).catch(function(){this.Nra(!1)}.bind(this)),
this.isa("immersive-ar").then(function(d){this.i$(d)}.bind(this)).catch(function(){this.i$(!1)}.bind(this))])),this.KX.then(function(){c()}))};b.Nra=function(c){this.XR.AQ=c;this.XR.Cob=c&&(h.kf()||!h.ub());c&&n.bmb()};b.i$=function(c){this.XR.qIa=c};b.isa=function(c){return this.Tmb(c).then(function(d){return d?Promise.resolve(!0):this.Umb(c)}.bind(this))};b.Tmb=function(c){return!navigator.xr||c=="immersive-vr"&&e.getQueryParameter("vr_mode")=="cardboard"?Promise.resolve(!1):this.Vmb(c)};b.Umb=
function(c){return this.Ecb(c)?this.ocb():Promise.resolve(!1)};b.Vmb=function(c){return navigator.xr&&navigator.xr.isSessionSupported?navigator.xr.isSessionSupported(c):navigator.xr&&navigator.xr.supportsSession?navigator.xr.supportsSession(c):Promise.reject()};b.Ecb=function(c){return c=="immersive-ar"?!1:g.ol&&h.ub()&&h.xk()!=h.LQ&&this.Fcb()};b.Fcb=function(){return h.xk()==h.c_?this.Phb():!0};b.Phb=function(){try{return window.self===window.top}catch(c){return!1}};b.ocb=function(){var c=this;
return new Promise(function(d){k.Vua.load(function(){var f;c.njb=new window.WebXRPolyfill({overwriteNativeXR:!0,cardboardConfig:{DPDB_URL:"https://raw.githubusercontent.com/immersive-web/webvr-polyfill-dpdb/refs/heads/main/dpdb.json",BUFFER_SCALE:(f=c.XR)===null||f===void 0?void 0:f.T9,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!1}});c.XR.wP=!0;d(!0)})})};b.KX=null;b.njb=null;return b}()});
define("three.mod",["require","exports"],function(){var a=window.THREE,m=new TDV.PlayerSettings;a.bta=m.get(TDV.PlayerSettings.Haa);a.kta=m.get(TDV.PlayerSettings.Yaa);a.YB=m.get(TDV.PlayerSettings.YB);return a});
define("tdv/player/view/util/xr/CameraPosition",["require","exports","tdv/constants/EventName","three.mod"],function(a,m,h,n){var g=function(){function r(){}r.initialize=function(){this.XR.Vh=new n.Group;this.XR.Vh.matrixAutoUpdate=!1;this.XR.Zq=new n.Group;this.XR.Zq.matrixAutoUpdate=!1;this.XR.Vh.add(this.XR.Zq);this.XR.M.bind(h.UZ,this.xE,this,!0);this.XR.M.bind(h.V,this.Ta,this,!0);this.XR.M.bind(h.Pd,this.Ta,this,!0)};r.setScale=function(t){this.pf!==t&&(this.pf=t,this.XR.zi=1/t,this.setPosition({x:this.XR.Ec.x,
y:this.XR.Ec.y,z:this.XR.Ec.z,yaw:-c.setFromQuaternion(this.XR.wg,"YXZ").y*q}))};r.mK=function(t){var u,v;this.T8(this.mF,e);this.T8(l.copy(this.mF).premultiply(this.XR.Vh.matrixWorld),k);var w=this.XR.Vh.matrix;w.identity();w.multiply(l.makeRotationY(t===void 0?k.yaw:-t*p));w.multiply(l.makeRotationY(-e.yaw));w.multiply(l.makeScale(this.XR.zi,this.XR.zi,this.XR.zi));w.multiply(l.makeTranslation(-e.x,-e.y,-e.z));t!==void 0&&(w=this.XR.Zq.matrix,w.identity(),w.multiply(l.makeTranslation(e.x,e.y,e.z)),
w.multiply(l.makeRotationY(-e.yaw*p)));this.XR.Vh.updateMatrixWorld(!0);(u=this.camera)===null||u===void 0||u.updateMatrixWorld(!0);(v=this.zl)===null||v===void 0||v.updateMatrixWorld(!0);this.Psa()};r.d$=function(){this.pf=1;this.XR.zi=1;c.setFromQuaternion(this.XR.yl,"YXZ");this.setPosition({x:this.XR.xaa.x,y:this.XR.xaa.y,z:this.XR.xaa.z,yaw:-c.y*q,pitch:c.x*q,roll:c.z*q})};r.setPosition=function(t){var u,v;this.T8(this.mF,e);this.T8(l.copy(this.mF).premultiply(this.XR.Vh.matrixWorld),k);var w=
this.XR.Vh.matrix;w.identity();w.multiply(l.makeTranslation(t.x===void 0?k.x:t.x,t.y===void 0?k.y:t.y,t.z===void 0?k.z:t.z));w.multiply(l.makeRotationY(t.yaw===void 0?k.yaw:-t.yaw*p));w.multiply(l.makeRotationX(t.pitch===void 0?k.pitch:t.pitch*p));w.multiply(l.makeRotationZ(t.roll===void 0?k.roll:t.roll*p));w.multiply(l.makeRotationZ(-e.roll));w.multiply(l.makeRotationX(-e.pitch));w.multiply(l.makeRotationY(-e.yaw));w.multiply(l.makeScale(this.XR.zi,this.XR.zi,this.XR.zi));w.multiply(l.makeTranslation(-e.x,
-e.y,-e.z));if(t.yaw!==void 0||t.pitch!==void 0||t.roll!==void 0)w=this.XR.Zq.matrix,w.identity(),w.multiply(l.makeTranslation(e.x,e.y,e.z)),w.multiply(l.makeRotationY(-e.yaw*p)),w.multiply(l.makeRotationX(e.pitch*p)),w.multiply(l.makeRotationX(e.roll*p));this.XR.Vh.updateMatrixWorld(!0);(u=this.camera)===null||u===void 0||u.updateMatrixWorld(!0);(v=this.zl)===null||v===void 0||v.updateMatrixWorld(!0);this.Psa()};r.xE=function(){var t,u,v,w;this.Yw(this.XR.YA);this.URa(((t=this.XR.Uf)===null||t===
void 0?void 0:t.xr.getCamera())||null);this.setCamera(this.XR.Nw);if(u=(u=(t=(u=this.XR.Uf)===null||u===void 0?void 0:u.xr.getFrame())&&this.XR.referenceSpace&&t.getViewerPose(this.XR.referenceSpace))&&u.transform)this.XR.HO=u.position.y,this.mF.fromArray(u.matrix),this.mF.decompose(this.XR.xaa,this.XR.yl,f),(v=this.camera)===null||v===void 0||v.updateMatrixWorld(!0),(w=this.zl)===null||w===void 0||w.updateMatrixWorld(!0),this.Psa()};r.Ta=function(){this.XR.isPresenting?this.scene&&this.camera&&(this.XR.YA!=
this.scene||this.XR.Nw!=this.camera)&&(this.Yw(this.XR.YA),this.setCamera(this.XR.Nw),this.XR.Uf.xr.updateCamera(this.XR.Nw),this.setPosition({x:this.XR.Ec.x,y:this.XR.Ec.y,z:this.XR.Ec.z,Xa:-c.setFromQuaternion(this.XR.wg,"YXZ").y*q})):(this.Yw(null),this.URa(null),this.setCamera(null))};r.Psa=function(){l.copy(this.mF).premultiply(this.XR.Vh.matrixWorld).decompose(this.XR.Ec,this.XR.wg,f);c.setFromRotationMatrix(this.XR.Zq.matrix,"YXZ");d.setFromMatrixPosition(this.mF);this.XR.Zq.matrix.identity();
this.XR.Zq.matrix.multiply(l.makeTranslation(d.x,d.y,d.z));this.XR.Zq.matrix.multiply(l.makeRotationFromEuler(c));this.XR.Zq.updateMatrixWorld(!0)};r.Yw=function(t){this.scene!==t&&(this.scene&&this.scene.remove(this.XR.Vh),t==null&&(this.xQa(),this.zQa()),(this.scene=t)&&this.scene.add(this.XR.Vh))};r.setCamera=function(t){this.camera!==t&&(this.xQa(),(this.camera=t)&&this.XR.Vh.add(this.camera))};r.URa=function(t){this.zl!==t&&(this.zQa(),(this.zl=t)&&this.XR.Vh.add(this.zl))};r.xQa=function(){this.scene&&
this.camera&&this.camera.parent===this.XR.Vh&&(this.scene.add(this.camera),this.camera=null)};r.zQa=function(){this.zl&&this.zl.parent===this.XR.Vh&&(this.zl.parent.remove(this.zl),this.zl=null)};r.T8=function(t,u){t.decompose(d,b,f);c.setFromQuaternion(b,"YXZ");u.yaw=c.y;u.pitch=c.x;u.roll=c.z;u.x=d.x;u.y=d.y;u.z=d.z};r.mF=new n.Matrix4;r.pf=1;r.scene=null;r.camera=null;r.zl=null;return r}(),k={x:void 0,y:void 0,z:void 0,Xa:void 0},e={x:void 0,y:void 0,z:void 0,Xa:void 0},b=new n.Quaternion,c=new n.Euler,
d=new n.Vector3,f=new n.Vector3,l=new n.Matrix4,p=Math.PI/180,q=180/Math.PI;window.sj=function(r){g.setPosition({x:void 0,y:void 0,z:void 0,Xa:r})};return g});define("tdv/player/view/util/xr/pointer/PointerType",["require","exports"],function(){return{RF:"gaze",SF:"laser"}});
define("tdv/player/view/util/xr/RendererList",["require","exports","tdv/constants/EventName"],function(a,m,h){return function(){function n(){}n.Rkb=function(g,k,e){var b=this.XR.Vn.indexOf(g);b>-1&&b!==this.XR.Vn.length-1&&(this.XR.Vn.splice(b,1),this.XR.Vn.splice(this.XR.Vn.length,0,g));this.XR.Oqa.set(g,k);this.XR.Nqa.set(g,e);g!==this.XR.Uf||this.XR.YA===k&&this.XR.Nw===e||(this.XR.YA=k,this.XR.Nw=e,this.XR.M.o(h.Pd))};n.add=function(g){this.remove(g);this.XR.Vn.push(g)};n.remove=function(g){var k=
this.XR.Vn.indexOf(g);k!=-1&&(this.XR.Vn.splice(k,1),this.XR.Oqa.delete(g),this.XR.Nqa.delete(g))};return n}()});define("tdv/player/view/util/xr/RendererType",["require","exports"],function(){return{cca:"Panorama",Uba:"Model3D"}});define("tdv/player/view/util/xr/pointer/SelectionMode",["require","exports"],function(){return{RF:"gaze",$Ua:"gaze_click"}});define("tdv/player/view/util/xr/SessionMode",["require","exports"],function(){return{Xp:"immersive-vr",Np:"immersive-ar"}});
define("tdv/player/view/util/xr/Type",["require","exports"],function(){return{mo:"Cardboard",npb:"WebVR",AWa:"WebXR"}});define("tdv/constants/RenderOrder",["require","exports"],function(){return{vVa:-1,FVa:0,wVa:0,dVa:0,Lob:1,BUa:2,CUa:101,cWa:0,dWa:2,jWa:2,rVa:2,iWa:2,aVa:2,pWa:100,J_:900,VVa:10,kUa:-1E3,uta:1E3,EWa:999,DWa:998,CWa:999,BWa:1E3,$Va:1E3,qpb:1001,FWa:1E3,MVa:1E3,Zua:1E4}});
define("tdv/player/view/util/xr/ui/DraggingPointerState",["require","exports"],function(){var a=function(){return function(){}}();a;return a});define("tdv/player/view/util/xr/ui/UIPointerState",["require","exports"],function(){return function(){return function(){}}()});define("tdv/view/util/EaseDimension",["require","exports"],function(){return function(){return function(a,m,h,n){n===void 0&&(n=void 0);this.name=a;this.from=m;this.to=h;this.$hb=n}}()});
define("tdv/view/util/Ease",["require","exports","tdv/view/util/EaseDimension"],function(a,m,h){function n(c){return function(d,f,l){d=Math.abs(f-d);return d/l<1?0:1/(1-Math.pow((d-l)/d,1/c))}}function g(c){var d=new b;d.hoa=function(f,l,p,q){return f+(l-f)*Math.pow(p<=0?0:p>=q?1:p/q,c)};d.Ipa=n(c);return d}function k(c){var d=new b;d.hoa=function(f,l,p,q){return f+(l-f)*(1-Math.pow(1-(p<=0?0:p>=q?1:p/q),c))};d.Ipa=n(c);return d}function e(c){var d=new b;d.hoa=function(f,l,p,q){p=p<=0?0:p>=q?1:p/
q;p<.5?p=Math.pow(p*2,c):(p=1-Math.pow(1-(p*2-1),c),p+=1);return f+p*.5*(l-f)};d.Ipa=n(c);return d}a=function(){function c(d,f,l){l===void 0&&(l=void 0);switch(d){case "quad_in":this.curve=g(2);break;case "quad_out":this.curve=k(2);break;case "quad_in_out":this.curve=e(2);break;case "cubic_in":this.curve=g(3);break;case "cubic_out":this.curve=k(3);break;case "cubic_in_out":this.curve=e(3);break;case "quart_in":this.curve=g(4);break;case "quart_out":this.curve=k(4);break;case "quart_in_out":this.curve=
e(4);break;case "quint_in":this.curve=g(5);break;case "quint_out":this.curve=k(5);break;case "quint_in_out":this.curve=e(5);break;default:this.curve=g(1)}this.nA=f.slice();this.time=0;this.duration=this.VIa(f,l);this.Fna={};for(d=0;d<this.nA.length;d++)this.Fna[this.nA[d].name]=f[d].from}c.prototype.pX=function(d){for(var f=0;f<this.nA.length;f++)if(this.nA[f].name==d)return this.nA[f];return null};c.prototype.ob=function(d){return this.Fna[d]};c.prototype.opa=function(){return this.time>0};c.prototype.Ve=
function(){return this.time>=this.duration};c.prototype.mj=function(){return this.duration};c.prototype.vm=function(){return this.time/this.duration};c.prototype.getTime=function(){return this.time};c.prototype.setTime=function(d){this.time=Math.min(Math.max(0,d),this.duration);for(d=0;d<this.nA.length;d++){var f=this.nA[d];this.Fna[f.name]=this.curve.hoa(f.from,f.to,this.time,this.duration)}};c.prototype.Nb=function(d){this.setTime(this.time+d)};c.prototype.VIa=function(d,f,l){l===void 0&&(l=void 0);
for(var p=[],q=0;q<this.nA.length;q++){var r=this.nA[q],t=l?l:r.$hb;t!==void 0&&t>0&&p.push(this.curve.Ipa(r.from,r.to,t/1E3))}if(p.length>0){d=p[0];for(q=1;q<p.length;q++)d=Math.max(d,p[q]);return f!==void 0&&f>0?Math.max(f,d):d}return f!==void 0?Math.max(f,.001):this.VIa(d,f,1E3)};c.mj=function(){return(new c(void 0,[new h("",void 0,void 0,void 0)])).mj()};return c}();var b=function(){return function(){}}();return a});
define("tdv/view/util/Animation",["require","exports","tdv/utils","tdv/view/util/Visibility","tdv/player/view/util/Flags"],function(a,m,h,n,g){var k=window.requestAnimationFrame.bind(window),e=window.cancelAnimationFrame.bind(window),b=function(){function d(){}d.requestFrame=function(f,l,p){for(var q=0;q<d.Qt.length;q++)if(d.Qt[q].is(f,l))return;q=d.L8;p!==void 0&&(q+=p);d.Qt.push(new c(f,l,q));d.paused||d.Qw!==void 0||(d.Qw=d.FY(d.z7))};d.dJa=function(f,l){for(var p=0;p<d.Qt.length;p++)if(d.Qt[p].is(f,
l)){d.Qt.splice(p,1);break}};d.jZ=function(f){d.paused!=f&&(d.paused=f,d.paused?d.Qw!==void 0&&(d.jna(d.Qw),d.Qw=void 0):d.Qt.length>0&&(d.Qw=d.FY(d.z7)))};d.JRa=function(f,l){d.FY!=f&&(d.Qw!==void 0&&(d.jna(d.Qw),d.Qw=f(d.z7)),d.FY=f,d.jna=l)};d.Zjb=function(){d.JRa(k,e)};d.z7=function(f){d.zKa(f);d.Qw=d.Qt.length>0?d.FY(d.z7):void 0};d.zKa=function(f){f<d.Af&&(d.startTime=f-d.L8*d.Lba,d.Af=f);var l=0;d.startTime===void 0?d.startTime=f:l=Math.round((f-d.startTime)/d.Lba);var p=(l-d.L8)*d.Lba,q=d.Qt;
d.Qt=[];d.o8=!0;d.L8=l;p=p>1?p<100?p:100:1;d.Af=f;d.hX=p;for(f=0;f<q.length;f++){var r=q[f];l<r.QNa?d.Qt.push(r):r.call(p)}d.o8=!1};d.Af=(new Date).getTime();d.hX=0;d.o8=!1;d.FY=k;d.jna=e;d.Qt=[];d.Qw=void 0;d.paused=!1;d.Lba=1E3/60;d.L8=0;d.startTime=void 0;return d}();g.qWa&&setInterval(function(){n.visible||b.zKa(b.Af+100)},100);var c=function(){function d(f,l,p){this.QNa=0;this.Hn=f;this.context=l;this.QNa=p}d.prototype.is=function(f,l){return this.Hn==f&&this.context==l};d.prototype.call=function(f){try{this.Hn.call(this.context,
f)}catch(l){h.VX("Error in animation frame",l)}};return d}();return b});
define("tdv/player/view/util/Color",["require","exports","three.mod"],function(a,m,h){return function(){function n(){}n.ikb=function(g,k){if(n.fNa(g)){var e=n.Dp(g),b,c=256;k.forEach(function(d){if(n.fNa(d)){var f=n.AQa(e,n.Dp(d));f<c&&(b=d,c=f)}});if(b&&c<=5)return b}return g};n.H7=function(g,k){return n.AQa(n.Dp(g),n.Dp(k))};n.fNa=function(g){return!!g&&g.indexOf("#")===0};n.Dp=function(g){return[parseInt(g.substring(1,3),16),parseInt(g.substring(3,5),16),parseInt(g.substring(5,7),16)]};n.AQa=function(g,
k){return Math.max(Math.abs(g[0]-k[0]),Math.abs(g[1]-k[1]),Math.abs(g[2]-k[2]))};n.gF=function(g,k){g=n.Dp(g);return"rgba(".concat(g[0],", ").concat(g[1],", ").concat(g[2],", ").concat(k,")")};n.anb=function(g){g=n.Dp(g);return g[0]<<16|g[1]<<8|g[2]<<0};n.Ip=function(g){return new h.Color(n.anb(g))};return n}()});
define("tdv/player/view/util/xr/ui/UIPanel","require exports three.mod tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/util/xr/ui/DraggingPointerState tdv/player/view/util/xr/ui/UIPointerState tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation tdv/player/view/util/Color".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){var l=document.createElement("canvas");l.width=l.height=64;a=function(){function C(){this.Bi=this.Cg=null;this.P9=this.Rj=this.Sj=this.oKa=0;this.Ona=
this.draggable=this.J6=this.l8=this.pE=!1;this.mKa=this.lKa=0;this.Pna=1;this.canvas=l;this.Sj=this.canvas.width;this.Rj=this.canvas.height;this.Be=this.Idb();this.qJ=this.zdb();this.qJ.scale.set(100,100,1);this.Be.add(this.qJ);this.group=new h.Group;this.ix=this.zna();this.group.add(this.ix);this.vl=new h.Group;this.vl.rotation.order="YXZ";this.group.add(this.vl);this.vl.add(this.Be);this.ut=this.xdb();this.draggable=!1;this.BO=null;this.wcb=new h.Quaternion;this.l8=this.J6=!1;this.Yn(1);this.kZ(.001);
this.UY(!0);C.XR.M.bind(n.Zd,this.Kg,this,!0);this.j7=new h.Sphere;this.vt=new h.Group;this.h7=new h.Object3D;this.vt.add(this.h7)}C.prototype.dispose=function(){C.XR.M.h(n.Zd,this.Kg,this);this.reb();this.peb();this.meb();this.veb()};C.prototype.llb=function(B){this.ut.renderOrder=this.Be.renderOrder=g.J_+B/100;this.ix.renderOrder=g.J_+(B-.5)/100};C.prototype.Idb=function(){var B=this.RO(),H=this.xna(this.canvas);B=new h.Mesh(B,H);B.visible=!1;B.rotation.order="YXZ";B.userData.PJ=!0;return B};C.prototype.reb=
function(){this.Be.geometry.dispose();this.Gna(this.Be.material)};C.prototype.zdb=function(){var B=this.RO(),H=this.KJa(65280);B=new h.Mesh(B,H);B.visible=!1;B.userData.PJ=!0;return B};C.prototype.peb=function(){this.qJ.geometry.dispose();this.dKa(this.qJ.material)};C.prototype.xdb=function(){var B=this.RO(),H=document.createElement("canvas");H.width=256;H.height=64;var E=H.getContext("2d");E.shadowColor="rgba(0, 0, 0, 0.5)";E.shadowBlur=16;E.shadowOffsetX=0;E.shadowOffsetY=0;E.fillStyle="#ffffff";
E.beginPath();E.roundRect(16,16,224,32,16);E.closePath();E.fill();H=this.xna(H);H.depthTest=!1;H.transparent=!0;H.opacity=0;B=new h.Mesh(B,H);B.renderOrder=g.J_;B.userData.PJ=!0;return B};C.prototype.meb=function(){this.ut.geometry.dispose();this.Gna(this.ut.material)};C.prototype.zna=function(){var B=new h.SphereGeometry(1,32,16,0,Math.PI*2,0,Math.PI),H=this.KJa(0);H.opacity=0;B=new h.Mesh(B,H);B.renderOrder=g.J_-.005;B.userData.PJ=!0;B.visible=!1;return B};C.prototype.veb=function(){this.ix.geometry.dispose();
this.dKa(this.ix.material)};C.prototype.RO=function(){return new h.PlaneGeometry(1,1)};C.prototype.xna=function(B){return new h.MeshBasicMaterial({map:this.IJa(B),side:h.DoubleSide,depthTest:!1,transparent:!0})};C.prototype.IJa=function(B){B=new h.CanvasTexture(B);B.colorSpace=h.SRGBColorSpace;return B};C.prototype.Gna=function(B){this.cKa(B);B.dispose()};C.prototype.cKa=function(B){B.map.dispose()};C.prototype.KJa=function(B){return new h.MeshBasicMaterial({color:B,side:h.DoubleSide,depthTest:!1,
transparent:!0})};C.prototype.dKa=function(B){B.dispose()};C.prototype.tra=function(B){this.pE=B};C.prototype.sP=function(){var B;return((B=this.Bi)===null||B===void 0?void 0:B.pressed)||!1};C.prototype.YE=function(B,H){this.Cg&&(this.Cg.We=B,this.Cg.pr=H)};C.prototype.yQ=function(B){this.Enb(B);this.Dnb();this.job(B)};C.prototype.job=function(B){var H;if(B&&this.Qgb()){y.ray.copy(B.ray).applyMatrix4(B.matrixWorld);var E=this.Bi?[]:y.intersectObjects([this.Be],!1);if((E=E.length>0?E[0]:null)&&E.uv.x>=
0&&E.uv.x<=1&&E.uv.y>=0&&E.uv.y<=1){var G=E.uv.x;var N=E.uv.y;var O=E.distance}else if((H=this.Cg)===null||H===void 0?0:H.pressed)E=y.intersectObjects([this.qJ],!1),(E=E.length>0?E[0]:null)&&E.uv.x>=0&&E.uv.x<=1&&E.uv.y>=0&&E.uv.y<=1&&(G=(E.uv.x-.5)*this.qJ.scale.x+.5,N=(E.uv.y-.5)*this.qJ.scale.y+.5,O=E.distance);E?(H=G*this.canvas.width,N=(1-N)*this.canvas.height,this.Cg||(this.Cg=new e),this.Cg.vPa=H,this.Cg.wPa=N,this.Cg.distance=O,this.Cg.pressed=B.pressed,this.Cg.Zmb=B.Qb.x,this.Cg.$mb=B.Qb.y):
this.Cg=null}else this.Cg=null};C.prototype.Enb=function(B){var H;if(B&&this.draggable){y.ray.copy(B.ray).applyMatrix4(B.matrixWorld);if(B.pressed){if(!this.Bi)return;this.Bi.pressed||(this.Bi.pressed=!0,this.rmb(y))}else this.Zra(),B=y.intersectObjects([this.ut],!1),B.length>0?(this.Bi||(this.Bi=new k),this.Bi.We=!0,this.Bi.pr=!0,this.Bi.pressed=!1,this.Bi.distance=B[0].distance):this.Bi=null;if((H=this.Bi)===null||H===void 0?0:H.pressed)this.Cnb(y),y.ray.intersectSphere(this.j7,t)&&(this.Bi.distance=
t.distanceTo(y.ray.origin))}else this.Bi=null};C.prototype.Dnb=function(){var B,H,E;(B=this.Bi)===null||B===void 0||!B.We||(H=this.Bi)!==null&&H!==void 0&&H.pressed?this.gRa(.75):this.gRa(1);this.Ckb(((E=this.Bi)===null||E===void 0?0:E.pressed)?1:.75)};C.prototype.rmb=function(B){B=B.intersectObjects([this.ut],!1);B.length===0?this.Zra():(this.oKa=B[0].distance,t.copy(B[0].point).applyMatrix4(r.copy(this.group.matrixWorld).invert()),this.j7.radius=t.length(),t.normalize(),this.group.add(this.vt),
this.vt.rotation.set(t.y==0&&t.z==0?0:-Math.atan2(t.y,Math.sqrt(t.z*t.z+t.x*t.x)),t.x==0&&t.z==0?0:Math.atan2(t.x,t.z),0,"YXZ"),this.vt.updateMatrixWorld(!0),this.Be.updateMatrixWorld(!0),t.setFromMatrixPosition(this.Be.matrixWorld).applyMatrix4(r.copy(this.vt.matrixWorld).invert()),this.h7.position.set(t.x,t.y,t.z))};C.prototype.Zra=function(){var B;(B=this.vt.parent)===null||B===void 0||B.remove(this.vt)};C.prototype.Cnb=function(B){this.vt.updateMatrixWorld(!0);if(this.Ona)t.copy(B.ray.origin).addScaledVector(B.ray.direction,
this.oKa);else if(this.j7.center.setFromMatrixPosition(this.vt.matrixWorld),!B.ray.intersectSphere(this.j7,t)){this.Zra();return}this.group.updateMatrixWorld(!0);t.applyMatrix4(r.copy(this.group.matrixWorld).invert());this.vt.rotation.set(t.y==0&&t.z==0?0:-Math.atan2(t.y,Math.sqrt(t.z*t.z+t.x*t.x)),t.x==0&&t.z==0?0:Math.atan2(t.x,t.z),0,"YXZ");B=t.length();this.vt.scale.set(B,B,B);this.group.updateMatrixWorld(!0);this.h7.updateMatrixWorld(!0);B=w;var H=x;t.setFromMatrixPosition(this.h7.matrixWorld).applyMatrix4(r.copy(this.group.matrixWorld).invert());
this.Ona&&this.Yn(t.length());H.setFromUnitVectors(u,t.normalize());B.setFromEuler(v.set(this.vl.rotation.x,this.vl.rotation.y,0,"YXZ"));B.slerp(H,.2);B.angleTo(H)<.001&&B.copy(H);v.setFromQuaternion(B,"YXZ");this.vl.rotation.x=v.x;this.vl.rotation.y=v.y};C.prototype.Rc=function(){return this.group};C.prototype.Zn=function(B){this.Be.material.opacity=B;this.Be.material.needsUpdate=!0};C.prototype.Yn=function(B){this.Be.position.set(0,0,-B)};C.prototype.sj=function(B){this.vl.rotation.y=-B*p};C.prototype.Kc=
function(){return-this.vl.rotation.y*q};C.prototype.$n=function(B){this.vl.rotation.x=B*p};C.prototype.Jc=function(){return this.vl.rotation.x*q};C.prototype.bdb=function(){this.ETa(l)};C.prototype.ETa=function(B){B.width!==this.Sj||B.height!==this.Rj?(this.Gna(this.Be.material),this.Be.material=this.xna(B)):this.canvas!==B&&(this.cKa(this.Be.material),this.Be.material.map=this.IJa(B));this.Be.material.map.needsUpdate=!0;this.Be.material.needsUpdate=!0;this.Be.visible=B!==l;this.canvas=B;this.Sj=
this.canvas.width;this.Rj=this.canvas.height;this.ATa();this.qTa();this.wsa()};C.prototype.Qgb=function(){return this.canvas!==l};C.prototype.kZ=function(B){this.P9!==B&&(this.P9=B,this.ATa())};C.prototype.ATa=function(){this.Be.scale.set(this.Sj*this.P9,this.Rj*this.P9,1);this.wsa()};C.prototype.Ora=function(B){this.ix.material.opacity=B;this.ix.material.needsUpdate=!0;this.ix.visible=B>0};C.prototype.L$=function(B){this.ix.material.color=f.Ip(B||"#000000");this.ix.material.needsUpdate=!0};C.prototype.Kg=
function(){this.l8?this.sTa():this.J6&&this.rnb()};C.prototype.s$=function(B){this.l8!=B&&((this.l8=B)?this.sTa():this.group.rotation.set(0,0,0,"YXZ"))};C.prototype.sTa=function(){this.group.rotation.setFromQuaternion(C.XR.yl)};C.prototype.k$=function(B){this.J6!=B&&(this.J6=B)&&(v.setFromQuaternion(C.XR.yl,"YXZ"),this.vl.rotation.x=v.x,this.vl.rotation.y=v.y)};C.prototype.rnb=function(){v.setFromQuaternion(C.XR.yl,"YXZ");v.z=0;z.setFromEuler(v);A.setFromEuler(this.vl.rotation);if(this.BO){if(this.BO.Nb(d.hX),
A.slerp(z,this.BO.ob("centering")),v.setFromQuaternion(A,"YXZ"),this.vl.rotation.x=v.x,this.vl.rotation.y=v.y,z.angleTo(A)<F||this.BO.Ve())this.BO=null}else z.angleTo(A)>D&&(this.wcb.copy(z),this.BO=new b("linear",[new c("centering",0,1)],2E3))};C.prototype.UY=function(B){this.draggable!=B&&((this.draggable=B)?this.Be.add(this.ut):this.Be.remove(this.ut))};C.prototype.n$=function(B){this.Ona=B};C.prototype.Bkb=function(B,H){this.lKa=B;this.mKa=H;this.wsa()};C.prototype.gRa=function(B){this.Pna=B;
this.qTa()};C.prototype.qTa=function(){this.ut.scale.set(128/this.Sj*this.Pna,32/this.Rj*this.Pna,1)};C.prototype.Ckb=function(B){this.ut.material.opacity=B;this.ut.material.needsUpdate=!0};C.prototype.wsa=function(){this.ut.position.set(-.5+this.lKa/this.Sj,.5-this.mKa/this.Rj,0)};return C}();var p=Math.PI/180,q=180/Math.PI,r=new h.Matrix4,t=new h.Vector3,u=new h.Vector3(0,0,-1),v=new h.Euler,w=new h.Quaternion,x=new h.Quaternion,y=new h.Raycaster,z=new h.Quaternion,A=new h.Quaternion,D=35*p,F=2*
p;return a});
define("tdv/player/view/util/xr/ui/UI",["require","exports","tdv/player/view/util/xr/ui/UIPanel","tdv/constants/EventName"],function(a,m,h,n){return function(){function g(){}g.Jdb=function(){var k=new h;this.Fk.push(k);this.XR.Zq.add(k.Rc());return k};g.feb=function(k){var e=this.Fk.indexOf(k);e!==-1&&(this.XR.Zq.remove(k.Rc()),this.Fk.splice(e,1),k.dispose())};g.initialize=function(){this.XR.M.bind(n.V,this.Ta,this,!0);this.Ta()};g.Ta=function(){this.XR.isPresenting?this.XR.M.bind(n.Zd,this.Kg,this,
!0):this.XR.M.h(n.Zd,this.Kg,this)};g.Qnb=function(){this.Fk=[].concat(this.Fk.filter(function(k){return!k.pE&&!k.sP()}),this.Fk.filter(function(k){return!k.pE&&k.sP()}),this.Fk.filter(function(k){return k.pE}));this.Fk.forEach(function(k,e){return k.llb(e)})};g.Kg=function(){this.Qnb();this.FZ()};g.FZ=function(){for(var k,e,b=this.XR.ud.reduce(function(t,u){return t===null||t.ZP<u.ZP||t.ZP===u.ZP&&u.handedness==="right"?u:t},null),c=!1,d=!1,f=Number.POSITIVE_INFINITY,l=!1,p=!1,q=this.Fk.length-1;q>=
0;q--)if(c||p)this.Fk[q].yQ(null);else{l=l||((k=this.Fk[q].Bi)===null||k===void 0?void 0:k.pressed)||((e=this.Fk[q].Cg)===null||e===void 0?void 0:e.pressed)||!1;this.Fk[q].yQ(b);var r=this.Fk[q].Bi;r&&r.We&&r.distance<f&&(c=!0,d=r.pr,f=r.distance);(r=this.Fk[q].Cg)?r.We&&r.distance<f&&(c=!0,d=r.pr,f=r.distance):this.Fk[q].ix.material.opacity>0&&(p=!0)}l&&b&&!b.pressed&&this.XR.QY(b,50);k=this.Fk.some(function(t){return t.pE});if(c||this.We||k||this.pE||p||this.uPa)for(q=0;q<this.XR.ud.length;q++)this.XR.ud[q]===
b?this.EIa(this.XR.ud[q],k,p,c,d,f):this.EIa(this.XR.ud[q],k,!1,!1,!1);this.We=c;this.pE=k;this.uPa=p};g.EIa=function(k,e,b,c,d,f){c||b||e?(k.pressed||k.pr===d||this.XR.QY(k,5),k.fA||(this.XR.GRa(k,!0),this.XR.C$(k,!1)),this.XR.YE(k,c,d,f)):k.fA&&(!k.pressed&&k.pr&&this.XR.QY(k,5),this.XR.GRa(k,!1),k.We&&this.XR.YE(k,!1,!1))};g.Fk=[];g.We=!1;g.pE=!1;g.uPa=!1;return g}()});
define("tdv/player/view/util/xr/VisibilityListener",["require","exports","tdv/constants/EventName","tdv/player/view/util/Flags","tdv/view/util/Visibility"],function(a,m,h,n,g){return function(){function k(){}k.initialize=function(){this.Ta=this.Ta.bind(this);this.G9=this.G9.bind(this);this.XR.M.bind(h.V,this.Ta,this,!0);window.addEventListener("vrdisplayblur",function(){g.Mra(!0)},!0);window.addEventListener("vrdisplayfocus",function(){g.Mra(!1)},!0)};k.Ta=function(){this.XR.session?(this.oF=this.XR.session,
this.oF.addEventListener("visibilitychange",this.G9)):(this.oF&&this.oF.removeEventListener("visibilitychange",this.G9),this.oF=null);g.eB(this.XR.isPresenting)};k.G9=function(){g.Mra(!this.oF||this.oF.visibilityState!="visible");n.RUa&&this.oF.visibilityState!="visible"&&this.XR.sm()};k.oF=null;return k}()});
define("tdv/player/view/util/xr/VRAutoStart",["require","exports","tdv/player/view/util/Device","tdv/player/view/util/URL","tdv/player/view/util/xr/SessionMode"],function(a,m,h,n,g){return function(){function k(){}k.initialize=function(){this.iE=[h.tu,h.uu].indexOf(h.Dc())>-1;this.HTa=n.Bk("vr");if(this.iE||this.HTa)this.hTa(),document.addEventListener("visibilitychange",function(){document.hidden||this.hTa()}.bind(this),!1)};k.hTa=function(){this.cdb();this.Yma=0;this.tSa()};k.tSa=function(){this.Yma++;
this.haa=setTimeout(this.Vib.bind(this),this.HTa?500:this.Yma*1E3)};k.cdb=function(){this.haa&&(clearTimeout(this.haa),this.haa=null)};k.Vib=function(){this.haa=null;this.iE&&this.Yma>5?window.location.reload():document.hidden||k.XR.isPresenting||(!this.xt(g.Xp)||this.iE)&&this.tSa()};k.xt=function(e){if(!this.XR.$J)return!1;for(var b=this.XR.$J.Ci("Model3DPlayer"),c=0;c<b.length;c++){var d=b[c];if(d.get("model")&&d.get("model").get("isLoaded"))return d.get("viewerArea").set("viewMode","vr"),!0}if(e==
g.Xp){e=this.XR.$J.Ci("PanoramaPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("panorama"))return b.get("viewerArea").set("viewMode","vr"),!0;e=this.XR.$J.Ci("VideoPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("video"))return b.get("viewerArea").set("viewMode","vr"),!0;e=this.XR.$J.Ci("PhotoAlbumPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("photoAlbum"))return b.get("viewerArea").set("viewMode","vr"),!0}return!1};return k}()});
define("tdv/player/view/util/xr/pointer/VRControllerLaser",["require","exports","tdv/constants/RenderOrder","tdv/player/view/util/Color","three.mod"],function(a,m,h,n,g){a=function(){function c(d,f){this.dot=this.ray=this.sa=null;this.sa=new g.Group;this.ray=new k(d,f);this.sa.add(this.ray.sa);this.dot=new e(d,f);this.sa.add(this.dot.sa)}c.prototype.update=function(){this.ray.update();this.dot.update()};c.prototype.dispose=function(){var d;this.sa&&(this.ray.dispose(),this.ray=null,this.dot.dispose(),
this.dot=null,(d=this.sa.parent)===null||d===void 0||d.remove(this.sa),this.sa=null)};return c}();var k=function(){function c(d,f){this.kr=this.material=this.sa=null;this.color="#ffffff";this.cb=d;this.Al=f;this.Hra();this.sa=new g.Mesh(new g.CylinderGeometry(5E-4,5E-4,.35,8),this.material);this.sa.renderOrder=h.EWa;this.sa.position.z=-.175;this.sa.position.y=-.001;this.sa.rotation.copy(new g.Euler(-Math.PI/2,0,0,"YXZ"));this.sa.updateMatrix()}c.prototype.update=function(){this.EZ();this.Osa()};c.prototype.dispose=
function(){var d;this.sa&&(this.sa.geometry.dispose(),this.dsa(),(d=this.sa.parent)===null||d===void 0||d.remove(this.sa),this.sa=null)};c.prototype.Hra=function(){if(!this.material){var d=document.createElement("canvas");d.width=d.height=256;this.kr=d.getContext("2d");this.material=new g.MeshBasicMaterial;this.material.map=new g.Texture(d);this.material.map.colorSpace=g.SRGBColorSpace;this.material.transparent=!0;this.EZ()}};c.prototype.dsa=function(){var d,f;if(this.material){var l=(d=this.material.map)===
null||d===void 0?void 0:d.image;l.width=l.height=1;(f=this.material.map)===null||f===void 0||f.dispose();this.material.map=null;this.material.dispose();this.kr=this.material=null}};c.prototype.EZ=function(){var d=this.ooa();if(this.color!==d){this.color=d;d=n.Dp(this.color).join(", ");var f=this.material.map.image,l=this.kr.createLinearGradient(0,0,0,f.height);l.addColorStop(0,"rgba("+d+", 0)");l.addColorStop(.5,"rgba("+d+", 1)");l.addColorStop(1,"rgba("+d+", 1)");this.kr.fillStyle=l;this.kr.clearRect(0,
0,f.width,f.height);this.kr.fillRect(0,0,f.width,f.height);this.material.map.needsUpdate=!0;this.material.needsUpdate=!0}};c.prototype.Osa=function(){this.sa.visible=!this.cb.disabled&&!this.cb.hidden};c.prototype.ooa=function(){return this.cb.pressed?this.Al.S9:this.cb.pr?this.Al.tqa:this.Al.Q9};return c}(),e=function(){function c(d,f){this.kr=this.bw=this.material=this.border=this.dot=this.sa=null;this.color="#ffffff";this.cb=d;this.Al=f;this.Plb();this.Hra();this.sa=new g.Group;this.border=new g.Mesh(new g.SphereGeometry(.0046,
32,32),this.bw);this.border.renderOrder=h.DWa;this.dot=new g.Mesh(new g.SphereGeometry(.004,32,32),this.material);this.dot.renderOrder=h.CWa;this.sa.add(this.dot);this.sa.add(this.border);this.pTa()}c.prototype.update=function(){this.EZ();this.pTa();this.Osa()};c.prototype.dispose=function(){var d;this.sa&&(this.sa.remove(this.dot),this.dot.geometry.dispose(),this.dsa(),this.sa.remove(this.border),this.border.geometry.dispose(),this.Nmb(),(d=this.sa.parent)===null||d===void 0||d.remove(this.sa),this.sa=
null)};c.prototype.Plb=function(){if(!this.bw){var d=document.createElement("canvas");d.width=d.height=256;var f=d.getContext("2d");f.fillStyle="rgba(0, 0, 0, 0.75)";f.clearRect(0,0,d.width,d.height);f.fillRect(0,0,d.width,d.height);f=new g.MeshBasicMaterial;f.map=new g.Texture(d);f.map.colorSpace=g.SRGBColorSpace;f.map.needsUpdate=!0;f.transparent=!0;f.depthTest=!1;f.side=g.BackSide;this.bw=f;this.bw.needsUpdate=!0}};c.prototype.Nmb=function(){var d,f;if(this.bw){var l=(d=this.bw.map)===null||d===
void 0?void 0:d.image;l.width=l.height=1;(f=this.bw.map)===null||f===void 0||f.dispose();this.bw.map=null;this.bw.dispose();this.bw=null}};c.prototype.Hra=function(){if(!this.material){var d=document.createElement("canvas");d.width=d.height=256;this.kr=d.getContext("2d");var f=new g.MeshBasicMaterial;f.map=new g.Texture(d);f.map.colorSpace=g.SRGBColorSpace;f.transparent=!0;f.depthTest=!1;this.material=f;this.EZ()}};c.prototype.dsa=function(){var d,f;if(this.material){var l=(d=this.material.map)===
null||d===void 0?void 0:d.image;l.width=l.height=1;(f=this.material.map)===null||f===void 0||f.dispose();this.material.map=null;this.material.dispose();this.kr=this.material=null}};c.prototype.Osa=function(){this.sa.visible=!this.cb.hidden&&!this.cb.disabled&&this.cb.zw!==void 0};c.prototype.pTa=function(){var d,f=this.sa.parent?b.setFromMatrixScale((d=this.sa)===null||d===void 0?void 0:d.parent.matrixWorld).x:1;d=(this.cb.zw||500)/f;this.sa.position.z=-d;this.sa.scale.set(d,d,d);this.sa.updateMatrix()};
c.prototype.EZ=function(){var d=this.ooa();this.color!==d&&(this.color=d,d=this.material.map.image,this.kr.fillStyle=this.color,this.kr.clearRect(0,0,d.width,d.height),this.kr.fillRect(0,0,d.width,d.height),this.material.map.needsUpdate=!0,this.material.needsUpdate=!0)};c.prototype.ooa=function(){return this.cb.pressed?this.Al.S9:this.cb.pr?this.Al.tqa:this.Al.Q9};return c}();new g.Matrix4;var b=new g.Vector3;return a});
define("tdv/player/view/util/xr/pointer/PointerState",["require","exports","three.mod"],function(a,m,h){return function(){function n(){this.id=0;this.ray=new h.Ray;this.matrixWorld=new h.Matrix4;this.disabled=!1;this.handedness="";this.We=this.pr=!1;this.tPa=0;this.zw=void 0;this.pressed=!1;this.ZP=0;this.hidden=this.In=!1;this.Qb=new h.Vector2;this.i8=this.fA=this.TIa=this.gx=!1;this.It=null;this.id=n.dY++}n.dY=0;n.WB="gaze";n.H_="laser";return n}()});
define("tdv/player/view/util/xr/pointer/XRControllers","require exports tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/util/Device tdv/player/view/util/xr/pointer/VRControllerLaser tdv/player/view/util/xr/pointer/PointerState tdv/player/view/util/URL three.mod".split(" "),function(a,m,h,n,g,k,e,b,c){var d=[0,1],f="trigger grip unknown0 thumbstick buttonA buttonB pico".split(" "),l=new c.Vector3,p=new c.Vector3,q=new c.Quaternion,r=new c.Vector3;return function(){function t(){}t.initialize=
function(){this.XR.M.bind(h.V,this.Ta.bind(this),this,!0);this.XR.M.bind(h.Zd,this.Kg.bind(this),this,!0);this.Gw=this.Gw.bind(this);this.QA=this.QA.bind(this);this.i9=this.i9.bind(this);this.l9=this.l9.bind(this);this.j9=this.j9.bind(this);this.$ma=b.getQueryParameter("backURL")};t.Ra=function(u){this.enabled=u};t.isConnected=function(){return this.QO.some(function(u){return u})};t.CRa=function(u){var v;if(this.Ei.length>0!==u)if(u){var w=new c.DirectionalLight(16777215,Math.PI);w.position.set(10,
20,0);(v=this.Un)===null||v===void 0||v.add(w);this.Ei.push(w)}else for(;this.Ei.length;)v=this.Ei.pop(),(w=this.Un)===null||w===void 0||w.remove(v)};t.ORa=function(u){this.laa!==u&&((this.laa=u)?this.hw.forEach(this.VNa.bind(this)):this.hw.forEach(this.yQa.bind(this)))};t.mkb=function(u,v){u=this.Sfb(u);u!=-1&&(u=this.a7[u])&&u.hapticActuators&&u.hapticActuators.length&&(u=u.hapticActuators[0],u.pulse&&u.pulse(.6,v))};t.Ta=function(){this.XR.isPresenting?this.Wa():this.ya()};t.Wa=function(){d.forEach(function(u){this.Rlb(u);
this.Slb(u)}.bind(this))};t.ya=function(){d.forEach(function(u){this.Rmb(u);this.Qmb(u);this.Pmb(u)}.bind(this))};t.Kg=function(){this.olb(this.enabled&&this.XR.Vh||null);this.FZ();this.znb()};t.FZ=function(){var u=this;if(this.enabled){for(;this.XR.ud.length;)this.XR.ud.pop();d.forEach(function(v){var w=u.controllers[v];if(w&&u.QO[v]){var x=u.kA[v];x&&(u.Anb(v),x.matrixWorld.copy(w.matrixWorld),x.ray.origin.set(0,0,0),x.ray.direction.set(0,0,-1),w=(w=(w=u.hw[v].motionController)&&w.components["xr-standard-thumbstick"])&&
w.values,x.gx=w&&w.state=="pressed"||!1,x.Qb.set(w&&w.xAxis||0,w&&w.yAxis||0),x.TIa=u.dpa(v,"buttonB"),u.Vnb(v),u.XR.ud.push(x))}})}};t.Vnb=function(u){var v=this,w,x=this.kA[u];if(x)if(x.i8){var y=!1;if(!this.jA[u])this.jA[u]=this.XR.session.requestHitTestSource({space:this.tna[u].targetRaySpace,offsetRay:new XRRay({x:0,y:0,z:0,w:1},{x:0,y:0,z:-1,w:0})}).then(function(A){v.jA[u]=A}).catch(function(A){console.error(A);v.jA[u]=null});else if(this.jA[u]instanceof XRHitTestSource){var z=(w=this.XR.Uf)===
null||w===void 0?void 0:w.xr.getFrame();(w=z&&z.getHitTestResults(this.jA[u]))&&w.length&&(w=w[0],z=w.getPose(this.XR.referenceSpace))&&(this.PW[u]=w,x.It||(x.It=new c.Matrix4),x.It.fromArray(z.transform.matrix).premultiply(this.XR.Vh.matrixWorld).decompose(l,q,r).compose(l,q,r.set(1,1,1)),y=l.setFromMatrixPosition(x.matrixWorld).distanceTo(p.setFromMatrixPosition(x.It))/this.XR.zi>.2)}y||(x.It=null,this.PW[u]=null)}else typeof XRHitTestSource!=="undefined"&&this.jA[u]instanceof XRHitTestSource&&
(this.jA[u].cancel(),this.jA[u]=null,this.PW[u]=null)};t.znb=function(){this.enabled&&d.forEach(function(u){u=this.QW[u];u===null||u===void 0||u.update()}.bind(this))};t.Ylb=function(){if(!this.aoa){var u=this.XR.Uf,v=u.xr.enabled;u.$q=!0;u.xr.enabled=!1;var w=new c.RoomEnvironment(u);this.aoa=(new c.PMREMGenerator(u)).fromScene(w).texture;u.$q=!1;u.xr.enabled=v}};t.Rlb=function(u){var v=this.XR.Uf.xr.getController(u);this.controllers[u]!=v&&(v.addEventListener("selectstart",this.Gw),v.addEventListener("selectend",
this.QA),v.addEventListener("connected",this.i9),v.addEventListener("disconnected",this.l9),v.userData.PJ=!0,this.controllers[u]=v,this.kA[u]=new e,this.una[u]=0,this.kA[u].type=e.H_)};t.Pmb=function(u){var v=this.controllers[u];v&&(v.removeEventListener("selectstart",this.Gw),v.removeEventListener("selectend",this.QA),v.removeEventListener("connected",this.i9),v.removeEventListener("disconnected",this.l9),this.controllers[u]=null)};t.Slb=function(u){if(!this.iJ[u]){var v=this.XR.Uf.xr.getControllerGrip(u);
v.userData.PJ=!0;this.b7||(this.b7=new c.XRControllerModelFactory);this.b7.path=c.YB.endsWith("/")?c.YB.slice(0,-1):c.YB;var w=this.b7.createControllerModel(v,this.Dob);w.addEventListener("loaded",this.j9);this.hw[u]=w;v.add(w);this.iJ[u]=v}};t.Dob=function(u){u=Array.from(u.profiles);if(g.KJ())u=["meta-quest-touch-plus"].concat(u);else if(g.xP())u=["oculus-touch-v3"].concat(u);else if(g.dNa())u=["generic-trigger"].concat(u);else if(g.eNa()||u.indexOf("pico-phoenix")>=0||u.indexOf("pico-4")>=0)u=
["pico-4"].concat(u);else if(g.kNa()||u.indexOf("htc-vive-focus-3")>=0||u.indexOf("htc-vive-focus-3-plus")>=0)u=["htc-vive-focus-3"].concat(u);else if(g.Jhb()||g.Bhb()||g.ZMa()||u.indexOf("pico-g2")>=0||u.indexOf("pico-neo2")>=0||u.indexOf("pico-neo3")>=0)u=["generic-trigger"].concat(u);return u};t.Qmb=function(u){var v,w=this.iJ[u];if(w){var x=this.hw[u];this.hw[u]=null;x.removeEventListener("loaded",this.j9);w.remove(x);this.iJ[u]=null;(v=w.parent)===null||v===void 0||v.remove(w)}};t.Tlb=function(u){if(!this.QW[u]){var v=
new k(this.kA[u],this.XR.Al);this.QW[u]=v;this.controllers[u].add(v.sa)}};t.Rmb=function(u){var v=this.QW[u];v&&(v.dispose(),this.QW[u]=null)};t.olb=function(u){this.Un!==u&&(this.Un=u,this.Snb())};t.Snb=function(){this.controllers.forEach(function(u){var v,w;u&&u.parent!=this.Un&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Un)===null||w===void 0||w.add(u))}.bind(this));this.iJ.forEach(function(u){var v,w;u&&u.parent!=this.Un&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Un)===
null||w===void 0||w.add(u))}.bind(this));this.Ei.forEach(function(u){var v,w;u.parent!==this.Un&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Un)===null||w===void 0||w.add(u))}.bind(this))};t.Gw=function(u){var v=this.F7(u.target);if(this.QO[v]){var w=Date.now()-this.GJa[v];if(w<60){var x={target:u.target};setTimeout(function(){t.Gw(x)},60-w)}else u=this.kA[v],u.pressed=!0,u.ZP=Date.now(),this.XR.M.o(h.Du,{pointerState:u}),this.una[v]=Date.now()}};t.QA=function(u){var v=this;u=this.F7(u.target);
if(this.QO[u]){var w=this.kA[u];w.pressed=!1;this.$ma&&(this.dpa(u,"buttonB")||this.dpa(u,"pico"))?window.location.href=this.$ma:(this.XR.M.o(h.TB,{pointerState:w}),this.una[u]+300>Date.now()&&(this.XR.Wq&&this.PW[u]&&this.PW[u].createAnchor().then(function(x){v.XR.Wq(x)}).catch(function(x){v.XR.vO(x)}),this.XR.M.o(h.Yf,{pointerState:w})))}};t.i9=function(u){var v,w;if(u.data.targetRayMode!="gaze"){var x=this.F7(u.target);this.Tlb(x);(v=this.Un)===null||v===void 0||v.add(this.controllers[x]);(w=this.Un)===
null||w===void 0||w.add(this.iJ[x]);this.QO[x]=!0;this.GJa[x]=Date.now();this.a7[x]=u.data.gamepad;this.tna[x]=u.data;this.kA[x].handedness=u.data.handedness;this.XR.M.o(h.gta)}};t.hpa=function(u){return u.profiles.some(function(v){return v.indexOf("hand")>=0})};t.l9=function(u){var v,w;u=this.F7(u.target);(v=this.Un)===null||v===void 0||v.remove(this.controllers[u]);(w=this.Un)===null||w===void 0||w.remove(this.iJ[u]);this.QO[u]=!1;this.a7[u]=null;this.tna[u]=null;this.XR.M.o(h.hta)};t.j9=function(u){var v=
this.hw[this.kfb(u.target)];v.userData.hpa=this.hpa(u.target.motionController.xrInputSource);v.userData.pj=!0;v.userData.hNa=!1};t.Ulb=function(u){u=this.hw[u];this.Ylb();u.setEnvironmentMap(this.aoa);this.laa?this.VNa(u):this.yQa(u);u.userData.hNa=!0};t.Anb=function(u){var v=this.hw[u];v.userData.pj&&(v.userData.hNa||this.Ulb(u),u=this.kA[u],v.visible=v.userData.hpa||u.hidden?!1:!0)};t.dpa=function(u,v){v=f.indexOf(v);u=this.a7[u];if(!u)return!1;u=u.buttons.length>v?u.buttons[v]:null;return!!u&&
u.pressed};t.VNa=function(u){u&&u.traverse(function(v){if("isMesh"in v&&v.material){var w=v.material;if(!w.userData.Pt){var x=w.userData.eib;x||(x=w.clone(),w.userData.eib=x,x.userData.Pt=w,x.transparent||(x.transparent=!0,x.opacity=1,"map"in x&&x.map&&(x.map=this.tdb(x.map)),x.needsUpdate=!0));v.material=x}v.userData.mqa===void 0&&(v.userData.mqa=v.renderOrder);v.renderOrder=n.BWa}}.bind(this))};t.yQa=function(u){u&&u.traverse(function(v){if("isMesh"in v&&v.material){var w=v.material;w.userData.Pt&&
(v.material=w.userData.Pt);v.userData.mqa==void 0&&(v.renderOrder=v.userData.mqa)}}.bind(this))};t.tdb=function(u){if(!u)return null;var v=document.createElement("canvas");v.width=u.image.width;v.height=u.image.height;var w=v.getContext("2d");w.drawImage(u.image,0,0);for(var x=w.getImageData(0,0,v.width,v.height),y=x.data,z=0;z<y.length;z+=4)y[z+3]=255;w.putImageData(x,0,0);u=(new c.Texture).copy(u);u.image=v;u.needsUpdate=!0;return u};t.F7=function(u){return this.controllers.indexOf(u)};t.kfb=function(u){return this.hw.indexOf(u)};
t.Sfb=function(u){return this.XR.ud.indexOf(u)};t.enabled=!0;t.controllers=[null,null];t.QO=[!1,!1];t.GJa=[0,0];t.iJ=[null,null];t.hw=[null,null];t.b7=null;t.QW=[null,null];t.a7=[null,null];t.tna=[null,null];t.jA=[null,null];t.PW=[null,null];t.Ei=[];t.laa=!1;t.kA=[];t.una=[];t.Un=null;t.aoa=null;t.$ma=null;return t}()});
define("tdv/player/canvas/ReticleCanvas",["require","exports"],function(){return function(){function a(m){this.Ne=this.fv(m.Q9);this.Fz=this.fv(m.S9);this.Rz=this.hm([0,0,0],0);this.j5=this.hm([0,0,0],.125);this.f0a=this.hm(this.Ne,1);this.g0a=this.hm(this.Fz,1);this.qZa=this.hm(this.Fz,1);this.pZa=this.hm(this.Ne,.5);this.nZa=this.hm(this.Ne,1);this.oZa=this.hm(this.Fz,1);this.Rm=this.Ih=128;this.Zca=4E3;this.Gxa=.1;this.Sm=.16;this.Jq=.04;this.Iwa=this.q0=.68-this.Jq;this.p0=1-this.Jq;this.ja=document.createElement("canvas");
this.ja.width=this.Ih;this.ja.height=this.Rm;this.ga=this.ja.getContext("2d");this.Cd=this.gy=!1;this.GM=this.R3=void 0;this.pG=0}a.prototype.fv=function(m){return(m=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(m))?[parseInt(m[1],16),parseInt(m[2],16),parseInt(m[3],16)]:[0,0,0]};a.prototype.hm=function(m,h){return"rgba("+m.join(",")+", "+h+")"};a.prototype.rK=function(m,h){this.Cd=m;this.R3=h};a.prototype.dB=function(m){this.gy=m};a.prototype.hg=function(){return this.Ih};a.prototype.xg=function(){return this.Rm};
a.prototype.If=function(){return this.ja};a.prototype.update=function(m){return this.gy?this.j0a(m):this.Cd?this.o0a():this.n0a()};a.prototype.dispose=function(){this.ga=null;this.ja.width=this.ja.height=1};a.prototype.OL=function(){var m;(m=this.ga)===null||m===void 0||m.clearRect(0,0,this.Ih,this.Rm)};a.prototype.n0a=function(){if(this.GM==a.Eta)return!1;this.OL();this.Mxa(this.f0a,1);this.GM=a.Eta;return!0};a.prototype.o0a=function(){if(this.R3===void 0){if(this.GM==a.ea)return!1;this.OL();this.Mxa(this.g0a,
2)}else this.k6a(this.R3);this.GM=a.ea;return!0};a.prototype.j0a=function(m){for(this.pG+=m;this.pG>this.Zca;)this.pG-=this.Zca;this.kZa(this.pG/this.Zca);this.GM=a.b_;return!0};a.prototype.Mxa=function(m,h){this.Xk(this.Gxa*h+this.Jq,0,this.Rz,this.j5,0,2*Math.PI);this.Xk(this.Gxa*h,0,this.Rz,m,0,2*Math.PI)};a.prototype.p0a=function(m){this.Xk(this.q0-(this.Sm+this.Jq)*.5,this.Sm+this.Jq,this.j5,this.Rz,0,2*Math.PI);this.Xk(this.q0-this.Sm*.5,this.Sm,this.pZa,this.Rz,0,2*Math.PI);this.Xk(this.q0-
this.Sm*.5,this.Sm,this.qZa,this.Rz,.5*Math.PI,(.5+m*2)*Math.PI)};a.prototype.k0a=function(m,h){this.Xk(this.Iwa-(this.Sm+this.Jq)*.5,this.Sm+this.Jq,this.j5,this.Rz,0,2*Math.PI);this.Xk(this.Iwa-this.Sm*.5,this.Sm,this.nZa,this.Rz,0,2*Math.PI);m=(.5+m*2)*Math.PI;for(h=(.5+h*2)*Math.PI;h<m;)h+=2*Math.PI;var n=m-this.Jq/(this.p0*2*Math.PI),g=h+this.Jq/(this.p0*2*Math.PI);Math.abs(g-n+2*Math.PI)<this.Jq*2&&(n=0,g=h);this.Xk(this.p0-(this.Sm+this.Jq)*.5,this.Sm+this.Jq,this.j5,this.Rz,n,g);this.Xk(this.p0-
this.Sm*.5,this.Sm,this.oZa,this.Rz,m,h)};a.prototype.Xk=function(m,h,n,g,k,e){var b=Math.round(this.Ih*.5),c=Math.round(this.Rm*.5),d=Math.min(b,c);m=Math.round(m*d);var f=this.ga;f&&(f.imageSmoothingEnabled=!0,f.lineWidth=h*d,f.strokeStyle=n,f.fillStyle=g,f.beginPath(),f.arc(b,c,m,k,e,!1),f.stroke(),f.fill())};a.prototype.kZa=function(m){this.OL();if(m<.25){var h=m/.25;m=.5*h}else m<.5?(h=(m-.25)/.25,m=.5+h,h=1+h*.5):m<.75?(h=(m-.5)/.25,m=.5+.5*h,h=.5+h):(m=h=(m-.75)/.25,h=.5+h*.5);this.k0a(m,h)};
a.prototype.k6a=function(m){this.OL();this.p0a(m)};a.Eta="initial";a.b_="changing";a.ea="over";return a}()});define("tdv/player/view/panorama/renderer/constants/Face",["require"],function(){return{gpb:"single",FRONT:"front",fb:"left",BACK:"back",Db:"right",Tc:"top",Hc:"bottom"}});
define("tdv/player/view/panorama/renderer/3d/util/GeometryUtil",["require","tdv/player/view/panorama/renderer/constants/Face"],function(a){a=a("tdv/player/view/panorama/renderer/constants/Face");var m={},h=Math.PI/180,n=new THREE.Matrix4;new THREE.Matrix4;var g=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];m.th=500;m.Raa=m.th*.5;m.bWa=m.th;m.Gua=[a.FRONT,a.Db,a.BACK,a.fb,a.Tc,a.Hc];m.QJa=function(k,e){for(var b=m.th,c=m.Raa,d=k*e,f=this.TL(),
l=[],p=0,q=6*d;p<q;p++)l.push(p);p=[];var r=d;p.push(this.xL(f,k,e,-c,+c,-c,+b,0,-b,0,l.slice(0,r)));q=r;r+=d;p.push(this.xL(f,k,e,+c,+c,-c,0,+b,-b,0,l.slice(q,r)));q=r;r+=d;p.push(this.xL(f,k,e,+c,+c,+c,-b,0,-b,0,l.slice(q,r)));q=r;r+=d;p.push(this.xL(f,k,e,-c,+c,+c,0,-b,-b,0,l.slice(q,r)));q=r;r+=d;p.push(this.xL(f,k,e,-c,+c,+c,+b,0,0,-b,l.slice(q,r)));p.push(this.xL(f,k,e,-c,-c,-c,+b,0,0,+b,l.slice(r,r+d)));f.mergeVertices();f.computeFaceNormals();f.userData.type="cube";f.userData.BMa=k;f.userData.MTa=
e;f.userData.ijb=p;return m.OV(f)};m.SO=function(){var k=this.TL();this.Iva(k,-.5,.5,0,1,0,0,0,-1,0,0);k.mergeVertices();k.computeFaceNormals();k.userData.type="plane";return m.OV(k)};m.PJa=function(k,e,b,c,d,f,l,p,q,r,t,u){var v=this.TL();v.vertices.push(new THREE.Vector3(k,e,b));v.vertices.push(new THREE.Vector3(c,d,f));v.vertices.push(new THREE.Vector3(l,p,q));v.vertices.push(new THREE.Vector3(r,t,u));v.faces.push(new THREE.Face3(0,2,1,null,null,0));v.faceVertexUvs[0].push([new THREE.Vector2(0,
1),new THREE.Vector2(1,0),new THREE.Vector2(1,1)]);v.faces.push(new THREE.Face3(0,3,2,null,null,0));v.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(0,0),new THREE.Vector2(1,0)]);v.mergeVertices();v.computeFaceNormals();v.userData.type="quad";return m.OV(v)};m.FRa=function(k,e,b,c,d){k=m.ola(k);var f=k.faceVertexUvs[0][0];f[0].x=e;f[0].y=b+d;f[1].x=e;f[1].y=b;f[2].x=e+c;f[2].y=b;f=k.faceVertexUvs[0][1];f[0].x=e;f[0].y=b+d;f[1].x=e+c;f[1].y=b;f[2].x=e+c;f[2].y=b+d;k.uvsNeedUpdate=
!0;return m.OV(k,!0)};m.Et=function(){return m.Raa};m.Goa=function(k,e){return 2*k*Math.tan(e*.5*h)};m.Hoa=function(k,e){return 2*k*Math.tan(e*.5*h)};m.qw=function(k){return Math.max(Math.min(3.539647*k-6.669366*k*k+4.7454*k*k*k,m.Raa),.1)};m.TL=function(){var k=new THREE.Geometry;k.userData={};return k};m.dispose=function(k){k&&(k.isBufferGeometry&&k.userData&&k.userData.geometry&&k.userData.geometry.dispose(),k.isGeometry&&k.userData&&k.userData.EO&&k.userData.EO.dispose(),k.dispose())};m.OV=function(k,
e){if(k.isBufferGeometry)return k;if(k.isGeometry){if(!k.userData.EO||e)k.userData.EO&&k.userData.EO.dispose(),e=k.toBufferGeometry(),(e.userData={}).geometry=k,k.userData.EO=e;return k.userData.EO}return null};m.ola=function(k){return k.isGeometry?k:k.isBufferGeometry&&k.userData&&k.userData.geometry?k.userData.geometry:null};m.xL=function(k,e,b,c,d,f,l,p,q,r,t){for(var u={},v=0,w=0;w<b;w++){u[w]={};for(var x=0;x<e;x++)this.Iva(k,c+l*x/e+0*w/b,d+0*x/e+q*w/b,f+p*x/e+r*w/b,l/e,0/e,p/e,0/b,q/b,r/b,
t[v]),u[w][x]=k.faces.slice(k.faces.length-2,k.faces.length),v+=1}return u};m.$pb=function(k,e,b){e=e*.5/Math.tan(b*.5);n.copy(k);k=g[0];k.x=0;k.y=0;k.z=0;k.applyMatrix4(n);b=Math.sqrt(k.x*k.x+k.y*k.y+k.z*k.z);var c=e/k.z,d=g[1];d.x=k.x*c;d.y=k.y*c;d.z=e;return b/Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)};m.Ifb=function(k,e,b){k=m.ola(k);n.copy(e.matrixWorldInverse).multiply(b);switch(k.userData.type){case "cube":return m.L2a(k,n,e.projectionMatrix);default:return m.M2a(k)}};m.Bfb=function(k,e,b){k=m.ola(k);
switch(k.userData.type){case "plane":return m.p2a(k,e,b);case "quad":return m.Mya(k,1,e,b)||m.Mya(k,0,e,b);default:return null}};m.Iva=function(k,e,b,c,d,f,l,p,q,r,t){var u=k.vertices.length;k.vertices.push(new THREE.Vector3(e,b,c));k.vertices.push(new THREE.Vector3(e+p,b+q,c+r));k.vertices.push(new THREE.Vector3(e+d+p,b+f+q,c+l+r));k.vertices.push(new THREE.Vector3(e+d,b+f,c+l));k.faces.push(new THREE.Face3(u,u+1,u+2,null,null,t));k.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(0,
0),new THREE.Vector2(1,0)]);k.faces.push(new THREE.Face3(u,u+2,u+3,null,null,t));k.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(1,0),new THREE.Vector2(1,1)])};m.p2a=function(k,e,b){var c=k.faces[0],d=k.faces[1],f=g[0],l=g[1],p=g[2];f.copy(k.vertices[c.a]).applyMatrix4(e);l.copy(k.vertices[d.c]).applyMatrix4(e);p.copy(k.vertices[c.b]).applyMatrix4(e);e=l.x-f.x;d=l.y-f.y;var q=l.z-f.z;l=p.x-f.x;var r=p.y-f.y;p=p.z-f.z;var t=d*p-q*r,u=q*l-e*p,v=e*r-d*l,w=b.direction.x*t+b.direction.y*
u+b.direction.z*v;if(w!=0&&(v=-(t*(b.origin.x-f.x)+u*(b.origin.y-f.y)+v*(b.origin.z-f.z))/w,!(v<=0||(t=b.origin.x+b.direction.x*v-f.x,u=b.origin.y+b.direction.y*v-f.y,f=b.origin.z+b.direction.z*v-f.z,b=(e*t+d*u+q*f)/(e*e+d*d+q*q),f=(l*t+r*u+p*f)/(l*l+r*r+p*p),e=k.faceVertexUvs[0][0][0],d=k.faceVertexUvs[0][1][2],k=k.faceVertexUvs[0][0][1],b<0||b>1||f<0||f>1))))return{iTa:e.x+(d.x-e.x)*b+(k.x-e.x)*f,JTa:e.y+(d.y-e.y)*b+(k.y-e.y)*f,materialIndex:c.materialIndex}};m.Mya=function(k,e,b,c){var d=k.faces[e],
f=g[0],l=g[1],p=g[2];f.copy(k.vertices[d.a]).applyMatrix4(b);l.copy(k.vertices[d.b]).applyMatrix4(b);p.copy(k.vertices[d.c]).applyMatrix4(b);b=l.x-f.x;var q=l.y-f.y,r=l.z-f.z;l=p.x-f.x;var t=p.y-f.y;p=p.z-f.z;var u=q*p-r*t,v=r*l-b*p,w=b*t-q*l,x=c.direction.x*u+c.direction.y*v+c.direction.z*w;if(x!=0&&(w=-(u*(c.origin.x-f.x)+v*(c.origin.y-f.y)+w*(c.origin.z-f.z))/x,!(w<=0))){u=c.origin.x+c.direction.x*w-f.x;v=c.origin.y+c.direction.y*w-f.y;c=c.origin.z+c.direction.z*w-f.z;if((f=t*b-l*q)!=0)b=(v*b-
u*q)/f,q=(v*l-u*t)/-f;else if((f=p*b-l*r)!=0)b=(v*b-u*q)/f,q=(v*l-u*t)/-f;else if((f=p*q-t*r)!=0)b=(c*q-v*r)/f,q=(c*t-v*p)/-f;else return;if(!(q<0||q>1||b<0||b>1||q+b>1))return l=k.faceVertexUvs[0][e][0],t=k.faceVertexUvs[0][e][1],k=k.faceVertexUvs[0][e][2],{iTa:l.x+(t.x-l.x)*q+(k.x-l.x)*b,JTa:l.y+(t.y-l.y)*q+(k.y-l.y)*b,materialIndex:d.materialIndex}}};m.L2a=function(k,e,b){var c=Array.prototype.concat.apply([],k.userData.ijb.map(function(d){return m.fza(e,b,d,k.vertices,0,0,k.userData.BMa,k.userData.MTa).map(function(f){return f.materialIndex})}));
return m.rza(c)};m.M2a=function(k){k=k.faces.map(function(e){return e.materialIndex});return m.rza(k)};m.rza=function(k){var e={};k.forEach(function(c){e[c]=!0});k=[];for(var b in e)k.push(b);return k};m.fza=function(k,e,b,c,d,f,l,p){var q=[];if(m.v$a(k,e,c[b[f][d][0].a],c[b[f+p-1][d][0].b],c[b[f+p-1][d+l-1][0].c],c[b[f][d+l-1][1].c]))if(l==1&&p==1)q.push(b[f][d][0]);else for(f=p>1?[f,f+Math.ceil(p*.5),f+p]:[f,f+p],d=l>1?[d,d+Math.ceil(l*.5),d+l]:[d,d+l],l=1;l<f.length;l++){p=f[l-1];for(var r=f[l]-
p,t=1;t<d.length;t++){var u=d[t-1];q=q.concat(m.fza(k,e,b,c,u,p,d[t]-u,r))}}return q};m.v$a=function(k,e,b,c,d,f){var l=[null,null,null,null,null];g[0].copy(b).applyMatrix4(k);g[1].copy(c).applyMatrix4(k);g[2].copy(d).applyMatrix4(k);g[3].copy(f).applyMatrix4(k);b=0;c=4;for(k=0;k<4;k++){d=g[(k+3)%4];f=g[k];var p=g[(k+1)%4];if(f.z<=0)l[b++]=f;else{if(d.z<=0){var q=g[c++],r=d.z/(d.z-f.z);q.x=d.x+(f.x-d.x)*r;q.y=d.y+(f.y-d.y)*r;q.z=-1E-5;l[b++]=q}p.z<=0&&(q=g[c++],r=f.z/(f.z-p.z),q.x=f.x+(p.x-f.x)*r,
q.y=f.y+(p.y-f.y)*r,q.z=-1E-5,l[b++]=q)}}if(b>2){for(k=0;k<b;k++)l[k].applyMatrix4(e);k=0;for(e=b-2;k<e;k++)if(b=l[k],c=l[k+1],d=l[k+2],!(b.x>1&&c.x>1&&d.x>1||b.x<-1&&c.x<-1&&d.x<-1||b.y>1&&c.y>1&&d.y>1||b.y<-1&&c.y<-1&&d.y<-1))return!0}return!1};m.RJa=function(k,e,b,c,d,f,l,p,q){var r=k*h,t=-r*.5+Math.PI*.5,u=e*h,v=(Math.PI-u)*.5-b*h,w=m.bWa*.5,x=64/Math.PI,y=Math.max(2,Math.ceil(r/c*x));x=Math.max(2,Math.ceil(u/d*x));for(var z=c*y,A=d*x,D=this.TL(),F=0,C=[],B=0;B<=A;B++){for(var H=[],E=v+B*u/A,
G=0;G<=z;G++){var N=-(t+G*r/z);D.vertices.push(new THREE.Vector3(-w*Math.cos(N)*Math.sin(E),+w*Math.cos(E),+w*Math.sin(N)*Math.sin(E)));H.push(F++)}C.push(H)}for(t=r=0;t<d;t++)for(u=t*x,v=0;v<c;v++){w=v*y;for(B=0;B<x;B++)for(z=l+(1-B/x)*q,A=l+(1-(B+1)/x)*q,G=0;G<y;G++){F=f+G/y*p;H=f+(G+1)/y*p;E=C[u+B][w+G];N=C[u+B+1][w+G+1];var O=C[u+B][w+G+1];D.faces.push(new THREE.Face3(E,C[u+B+1][w+G],N,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(F,z),new THREE.Vector2(F,A),new THREE.Vector2(H,A)]);
D.faces.push(new THREE.Face3(E,N,O,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(F,z),new THREE.Vector2(H,A),new THREE.Vector2(H,z)])}r++}D.mergeVertices();D.computeFaceNormals();D.userData.type="sphere";D.userData.Wd=k;D.userData.Nk=e;D.userData.pitch=b;D.userData.BMa=c;D.userData.MTa=d;return m.OV(D)};return m});
define("tdv/player/view/util/xr/pointer/Reticle","require exports tdv/constants/RenderOrder tdv/player/canvas/ReticleCanvas tdv/view/util/Animation three.mod tdv/player/view/panorama/renderer/3d/util/GeometryUtil".split(" "),function(a,m,h,n,g,k,e){a=function(){function c(d,f){this.XO=this.KE=null;this.cb=d;this.Al=f;this.sa=new k.Group;this.canvas=new n(this.Al);this.sa.add(this.KE=this.Mdb());this.sa.add(this.XO=this.ydb())}c.prototype.update=function(){this.canvas.update(g.hX)&&(this.KE.material.map.needsUpdate=
!0);var d=e.qw(this.Al.KPa||2),f=2*d*Math.tan(c.yu/2);this.sa.matrixAutoUpdate=!1;this.sa.matrixWorldNeedsUpdate=!1;this.sa.matrix.identity();this.sa.matrix.multiply(b.makeTranslation(0,0,-d));this.sa.matrix.multiply(b.makeScale(f,f,f));this.sa.updateMatrixWorld(!0)};c.prototype.nf=function(d){this.KE.material.opacity=d};c.prototype.rK=function(d,f){f===void 0&&(f=void 0);this.canvas.rK(d,f)};c.prototype.dB=function(d){this.canvas.dB(d)};c.prototype.dispose=function(){var d,f,l;this.KE||(this.teb(this.KE),
(d=this.KE.parent)===null||d===void 0||d.remove(this.KE),this.KE=null);this.XO||(this.neb(this.XO),(f=this.XO.parent)===null||f===void 0||f.remove(this.XO),this.XO=null);this.canvas.dispose();(l=this.sa.parent)===null||l===void 0||l.remove(this.sa);this.sa=null};c.prototype.neb=function(d){d.geometry.dispose();var f=d.material.map.source;f.width=f.height=1;d.material.map.dispose()};c.prototype.ydb=function(){var d=document.createElement("canvas");d.width=d.height=256;d=new k.CanvasTexture(d);d=new k.MeshBasicMaterial({map:d,
transparent:!0,side:k.DoubleSide});d.depthWrite=!1;d.depthTest=!1;d=new k.Mesh(new k.PlaneGeometry,d);d.renderOrder=h.Zua;d.frustumCulled=!1;return d};c.prototype.teb=function(d){d.geometry.dispose();d.material.map.dispose();d.material.dispose()};c.prototype.Mdb=function(){this.canvas.update(10);var d=new k.CanvasTexture(this.canvas.If());d.colorSpace=k.SRGBColorSpace;d=new k.MeshBasicMaterial({map:d,transparent:!0,side:k.DoubleSide});d.depthWrite=!1;d.depthTest=!1;d=new k.Mesh(new k.PlaneGeometry,
d);d.renderOrder=h.Zua;d.frustumCulled=!1;return d};c.yu=6*Math.PI/180;return c}();var b=new k.Matrix4;return a});
define("tdv/player/view/util/xr/pointer/XRGazePointer","require exports tdv/constants/EventName tdv/player/view/util/xr/pointer/PointerState tdv/player/view/util/xr/pointer/Reticle tdv/player/view/util/xr/pointer/SelectionMode three.mod".split(" "),function(a,m,h,n,g,k,e){a=function(){function p(){}p.initialize=function(){this.Gw=this.Gw.bind(this);this.QA=this.QA.bind(this);this.XR.M.bind(h.V,this.Ta.bind(this),this,!0);this.XR.M.bind(h.Zd,this.Kg.bind(this),this,!0);this.XR.M.bind(h.Xr,this.Mib.bind(this),
this,!0);this.cb.type=n.WB};p.Ra=function(q){this.enabled=q;this.hx()};p.Ta=function(){this.hx()};p.Kg=function(){this.setCamera(this.enabled&&this.XR.Nw||null);this.FZ();this.Ynb()};p.Mib=function(){var q=this;this.enabled&&(this.XR.Wq&&this.IX&&this.IX.createAnchor().then(function(r){q.XR.Wq(r)}).catch(function(r){q.XR.vO(r)}),this.XR.Zqa==k.G_&&this.XR.M.o(h.Yf,{pointerState:this.cb}))};p.hx=function(){this.XR.isPresenting&&this.enabled?this.Lra():this.hsa()};p.setCamera=function(q){this.camera!==
q&&(this.camera=q,this.$nb())};p.FZ=function(){var q=this,r;this.XR.eP.origin.copy(this.XR.Ec);this.XR.eP.direction.set(0,0,-1).applyQuaternion(this.XR.wg);if(this.enabled){if(this.XR.ud.length!=1&&this.XR.ud[0]!==this.cb){for(;this.XR.ud.length;)this.XR.ud.pop();this.XR.ud.push(this.cb)}this.cb.matrixWorld.copy(f.compose(this.XR.Ec,this.XR.wg,l));this.cb.ray.origin.set(0,0,0);this.cb.ray.direction.set(0,0,-1);if(this.cb.i8){var t=!1;if(!this.BA){var u=this.XR.session;this.BA=u.requestReferenceSpace("viewer").then(function(w){return u.requestHitTestSource({space:w}).then(function(x){q.BA=
x})}).catch(function(w){console.error(w);q.BA=null})}else if(typeof XRHitTestSource!=="undefined"&&this.BA instanceof XRHitTestSource){var v=(r=this.XR.Uf)===null||r===void 0?void 0:r.xr.getFrame();(r=v&&v.getHitTestResults(this.BA))&&r.length&&(r=r[0],v=r.getPose(this.XR.referenceSpace))&&(this.IX=r,this.cb.It||(this.cb.It=new e.Matrix4),this.XR.Vh.matrixWorld.decompose(b,c,d),this.cb.It.fromArray(v.transform.matrix).premultiply(this.XR.Vh.matrixWorld).decompose(b,c,d).compose(b,c,d.set(1,1,1)),
t=!0)}t||(this.IX=this.cb.It=null)}else typeof XRHitTestSource!=="undefined"&&this.BA instanceof XRHitTestSource&&(this.BA.cancel(),this.IX=this.BA=null)}};p.$nb=function(){this.Df&&this.Df.sa.parent!==this.camera&&(this.Df.sa.parent&&this.Df.sa.parent.remove(this.Df.sa),this.camera.add(this.Df.sa))};p.Lra=function(){var q;this.Df||(this.Df=new g(this.cb,this.XR.Al),(q=this.camera)===null||q===void 0||q.add(this.Df.sa),this.controller=this.XR.Uf.xr.getController(0),this.controller.addEventListener("selectstart",
this.Gw),this.controller.addEventListener("selectend",this.QA))};p.hsa=function(){this.Df&&(this.Df.dispose(),this.Df=null,this.controller.removeEventListener("selectstart",this.Gw),this.controller.removeEventListener("selectend",this.QA),this.controller=null)};p.Ynb=function(){var q,r,t,u;if(this.enabled){if(this.We=this.cb.We)this.sSa=this.cb.tPa;var v=Date.now();if(this.XR.Zqa==k.RF){var w=this.We?v-this.sSa:0;var x=this.XR.Al.OPa;this.sPa<x&&w>=x&&this.XR.M.o(h.Yf,{pointerState:this.cb});this.sPa=
w;(q=this.Df)===null||q===void 0||q.rK(this.We&&this.cb.pr,Math.min(1,w/x))}else(w=this.Df)===null||w===void 0||w.rK(this.cb.pr);this.cb.We||this.cb.In?this.HX=void 0:this.HX==void 0&&(q=this.XR.Al.XKa,q!==void 0&&(this.HX=v+q));v=(this.HX!==void 0?this.HX:Infinity)-v;(r=this.Df)===null||r===void 0||r.nf(this.cb.hidden?0:Math.max(.01,Math.min(1,v/500)));(t=this.Df)===null||t===void 0||t.dB(this.cb.In);(u=this.Df)===null||u===void 0||u.update()}};p.Gw=function(){this.cb.pressed=!0;this.cb.ZP=Date.now();
this.XR.M.o(h.Du,{pointerState:this.cb})};p.QA=function(){this.cb.pressed=!1;this.XR.M.o(h.Du,{pointerState:this.cb});this.XR.M.o(h.Yf,{pointerState:this.cb})};p.cb=new n;p.enabled=!1;p.camera=null;p.Df=null;p.We=!1;p.sSa=0;p.sPa=0;p.HX=void 0;p.controller=null;p.BA=null;p.IX=null;return p}();var b=new e.Vector3,c=new e.Quaternion,d=new e.Vector3,f=new e.Matrix4,l=new e.Vector3(1,1,1);return a});
define("tdv/player/view/util/xr/pointer/XRPointer","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/xr/pointer/PointerType tdv/player/view/util/xr/SessionMode tdv/player/view/util/xr/pointer/XRControllers tdv/player/view/util/xr/pointer/XRGazePointer".split(" "),function(a,m,h,n,g,k,e,b){return function(){function c(){}c.ylb=function(d){this.xqa=d;this.GZ()};c.initialize=function(){this.XR.M.bind(h.V,this.Ta.bind(this),this,!0);this.XR.M.bind(h.Zd,this.Kg.bind(this),
this,!0);this.XR.M.bind(h.gta,this.rib.bind(this),this,!0);this.XR.M.bind(h.hta,this.sib.bind(this),this,!0)};c.Ta=function(){this.GZ()};c.Kg=function(){this.Wq!==this.XR.Wq&&(this.Wq=this.XR.Wq,this.GZ())};c.rib=function(){this.GZ()};c.sib=function(){this.GZ()};c.GZ=function(){var d=this.XR.isPresenting?this.XR.Wq&&n.ub()&&!n.kf()?g.RF:this.xqa===g.SF&&e.isConnected()?g.SF:this.xqa!==g.SF||this.XR.Em!==k.Np||n.kf()?g.RF:g.SF:null;this.pointerType!==d&&(this.pointerType=d,e.Ra(d===g.SF),b.Ra(d===
g.RF))};c.xqa=g.SF;c.pointerType=null;c.Wq=null;return c}()});define("tdv/player/view/util/xr/XRSettings",["require","exports"],function(){return function(){return function(){this.XKa=1E3;this.Q9="#ffffff";this.KPa=2;this.tqa="#007acc";this.S9="#ff6600";this.OPa=1200;this.TKa=0}}()});define("tdv/view/core/ZIndex",["require","exports"],function(){return{mUa:"2",Qua:"1",tWa:"auto",aWa:"1",lua:"2",IVa:"auto",Gaa:"2",fta:"3",pUa:"auto",Aua:"5",mWa:"100",Job:"101",VUa:999998,mpb:999999,iVa:1E6}});
define("tdv/view/util/Assets",["require","exports"],function(){return{mo:"data:image/png;base64, ",
bVa:"data:image/png;base64, ",
Tba:"data:image/jpeg;base64, ",
zua:"data:image/png;base64, ",
B_:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAE4CAMAAADW5D7KAAAAM1BMVEUAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBprCkqAAAAEHRSTlMAQIC/758wECDPYK/fcFCPt8VnWAAABehJREFUeNrt3N2WmzAMRWHABmx+/f5P20672kwSIBYI8MA+110T+sUWQnGSZeQyqZu2C1+xxpiiaPIak7kUNrzFjH2FzPuy8mEupsjxibT6szHbhj35PyZ8jMfrb/oQlXaAKstsiExX3H55DUGQ0t0bqwwBLsXyDpe4ZH3jqsGKj+3ZhoL4ezb2bViX8Y57sVmJFbobLq7artUKxQ3HM6uxgr9dF1F367Xs7bZitX4jhtCjJelQb7cT2w1a/nY9RFV2lHnJ8sq/MhRFa4Tb0t77g406L1qLlmRr9i1akhXWtGhJvPoOLUEGQwchSG7Q0uVqUXpsxo+1awTpUeo/DnMakL51Xp5boiAjRV5S6C0Dm/i45a3IWZvnOr94OsKyEQWFi27rJQ0bUUmrYyMKtGjkJVoOnpcsPPsYdF6z0EHwRYO3eJaWoDu1jB8EQ4j59gGct/R0poIYqpZgBGG5ISpsRAZbkv6BNv49OadzFRp5uoepGk+JV3iipsQLnnosNIKqRRcvqFrsw6m03A+391qcfJhKx1dVNncPjB4kJV7vBZrSh6Pj236XB1y/axPfHA+154/wFDsWraYLZ8aqTwSq3Q6JVD6cHfUvg08/8vjtyyqkEOXF1e5T4cuQRnQfRvpdKnwqVsqnzvI9PmwdQzpRXVs7bPYmpBTNuuXVV6+zSWFpTn5L9Qcek5aV5hCl0H6BIaQWvbnAoN07dMlh2b1vh+ozsjOjdpDKKX8uXSaI5XfuHVbfQmyCWHpHEnSxUtyFivtQF6tIEmt1G18Vz5n588//qI8dpbVJYplj33obue1NklhBddepreQOrPiVHC6Ftfat709pRGZuufPpVbFW/vRdmSWEddwDySqtMrsn1hqtMrsrllyrzO6LJdWS9L/Xw5JpiZ4VLogl0ZI9V10RK15L+Ax6SaxYLenz+jWx4rTEs42LYsVoyedAV8X6rLViZnZZrE9aa+aL18Va1lo1i70w1pLWurn1lbHmtVbO+C+NNae19vOQa2NNa63+7OjiWFNa64/LXR3rXWvD0cLLY71qbTmGeX2sZ61NR1ZvgPVda9vx3jtgPbQ2HoW+BdY/ra3Hxu+B9Vdr8xH7m2BlrjTbz/XeBUslYIEFFlhggQUWWGCBBRZYYIEFFlhggQUWWGCBBRZYYIEFFlhggQUWWGCBBRZYYIEFFlhggQUWWGCBBRZYYIEFFlhgCbAqc1DGYnA/HevQ367vRgeWICYHS8LlwIqPbcBa+auvYAm0wBJogfU5I1iCDGAJ7ok1WOKNCFZUHFjSOyJYgqoFVlwasIT7EKzI8RZYgtRgxScHS/bIA1Zkih+G5YpD0l0C66AYsMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssMACCyywwAILLLDAAgsssJIIWGCBBRZYYIEFFlhggbUnli/yOqvz3oP1kerxLJkbsBYzPr1WD9ZCmpcXa8CKXFdKa+uiWD765cCanBM6sCbTTb5eC9bc33hPA1b8tN6BNRU3/YJgCf5XYE2lPhArP/PR/gvL/qCadSpWr9A/Hnk3HM7EyhWw/C59lpn8q8WZWJXGBezSwZfpYaksbbNHA9/v81ywdQfVQf8/tn1G4wT39GMyKr1dr/Osyqq8jfr9yNaSpXKLeV5bjQ377MLq7F34O932P2Ue28YpFBZb79OPKOwelWtom6916hqVGjzdu2XleVaPQZQPaWVmYWlsgbUZkqgFy1eWSslqU2n2IhvSLBsTWeplQlZ+bnJy2i601fOFpFO2fC071nxCWajb1K1OW/12SKkiPNWrWSt30hV11eSwyJ5OZZv5We9JN6F25t2ri2SX1e+LO+Wt9AvfNKmL8/o+O7qlDxHOqBLtpy/l5OMZcxA/DsuXdXjF6trGRX0U5PJj45K7pMmi/gv70+gtsjuKIwAAAABJRU5ErkJggg==",
kWa:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAADcCAMAAADA8VqlAAAAM1BMVEUAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBprCkqAAAAEHRSTlMAQL8QgO/fn89gMHAgUI+vkrzZGQAAB8pJREFUeNrtXduW2yAM5H63zf9/bdukjdYBjI0t4KHz1Obsnp0INJKQjMl//MeM4I7MDaM4mRk6xo1MDB9/Q5BpYeMLlEwKJ98E5aTbMMj4F4bMCG7iByuZEFv8gYVMBx1/Qk6n1zbuYSZzFBq/oclMcDIm8GQecBUzmGgbmpjDPGmDjnkwMgdElt08aYPNcpsnbXDxADKQ0Qgyy2yatIHnHXietIHFGixpALLAzJM2OPZBBMyZNnzb7SUw9IUpCa5kNsybKGQJSjIb6JxpAoDOmCUcEKT5sLgIT8kApASzP8Le23OMdWktReB6rHLTSkXHzeDYQisF3fZmtrJRMk6PfWT5hL/wMmUgvRF2BJMlVFDkcTmmqt/VmxkDglkt/ERPHMYR/dNoHGzcE4epjNodyJkh5d6RE/O9dushsVAdODHda7cY4CVQPYGIFBnRIekOO4jEsKYgSaQ39IHKsK9lH+LGoqQy4LZD3RgIQrOuaDE24vyVHqTT33tONOhMV4J2hBtzIGiPCIIu9gYQpDWCfIjOmDJBCZV88kE/MCBY00HCRnTzBASSKsF1hBv7CwQ9qGU/0DLB7du16YikmmcJgjCPd+M6QYAaEY3ZBYLbCC9ZswQhtA33Ep8czJRTaNr/kBPcmJUJAj6VgVvZq1clmUCPLUWCLlUV9laeRe0KfkvwAIWdylNPN6zmW9JTQbQiDM4cE4TDEGU6d878IcFQkHVmX1ZznqF3WCgQrARjyM7Uj48Dw55nuUJwzZ21euR5FlYiuKWba8mWLxZ38EskBMtlHIcKNWEoN+EpRqhe4Hy1SpCYUlgEmKfFmycp/0HoXWE1088Bag2Pb0JajXVgbn1ijEnz5zbhBYK8FHZCOlVgn1VCm/+beUu5oq/JQP329KyfLLQ6cwRFSfS4gpNkLuSjzSl9QDBkzc3Kw1bqTXd9kqEFcTsOJRB4eCEvgr1C5XOrzMEodYKsGDbsPrMM5rkmOUs8s9x5EOXsRe5HM7iE/92Er8Y6gIOdlucOy+rk26CO0ps0Q5mgLtgpHPQmA3xxgNKUtMNUlDpNwe1Bdi4KU2ys3Y6+SNAUUnB9kHfI4qC2vbPGPu/dheFNVpL8PQ/21PAVOw4lqd7Jo9xSJSYU3N4rDSwQ/KLiCu0pkoWQ0WhP03alg73RBC6PQ0kqyPRa0cg+v+hb4zHLe6UvqMly+pvDvqSy3VMoEKw2l9SVbM/+HK2zN8ZPFasoNcCLJVyoef6YzXgOdNseFxDgek83sSkNez/f2qQQ/o15bL41O0ruayEcm3PVOoyfc0uMgSgKi3wfDONcXzz2xAUI4fOLbEgz8Lvsy63Epkfjgd1UB/RpHnrThPjTPOzeF8ef5qE3HRl/msc8VdQzpB6DfS3NtDrzt3oR8+oMIeKG0mBP84A+2Hl1hhDdrDT4+QwoTZg0n3lB3anjewz/+nv9e/zhXy4fcZNlt5cndBOHN0jhXm4ya7rwLyCv06YLjW5C/eKQyxIAvxxN3PvoTwcCEMk6POsm20XHf4OFshsPjCY+AgSyG0M08dfCmmHQqiy58ZCkC+IutwoY4rkxJEvuemLgX5vRF914gBQCQWhiSY7pxlCbyIsEIQwJVDcGKVxacj/xMiGmG8MG0i1hF5Kh1I0HrDEQ3Km8QnVjqD+XiwRBASimG4Mh9PnAo/Y7csN0YwilsumsbXntPVQ3hjVuKD8gUKZuPGiNoYCDgTGTbUaMWGPw1r2bBPwZ/rpWp08QA2OPcQaXavV60tQqyQ8Z4hlc/eHvdIo7rQs5+kMGvJpzgdPazEf4T+6aeiQAc6W1P7bOwFaqq6DJkbbIOgO2qedaPveh5LgE4XH/uhq5bF1ocBMuCCZ1V8q7dtQIp5ipwrWdlnODfKUeWCe0tQ2dxCUIQmPbCBKHQLAeJK4MeNjqLbf4m/A4p/K4V0rBJmzWIo1KEDZhe4FqotSOYGKtp1z24M7s4AgylnpPkN9skOL3BPW4a8fPlRWhcWSp3wjR2i53fVpuXLUOH/bqnNPO95Ndf4BeD7wJWJ7501y2jTr0G4BZWoJa10E71vUSuobrbILsc+1N+0CvH3ZV8dm1M2MiHmRc04rhenZz6QY/6TrCwEf5iTp7FuwHxRN/ever7hdYwdL59iFdfKynDcPG5F3htHvSQa8qMadXTo9Z5PW0XbhsYdhzko02HHfgF5/pkRHr7ClA8CxDeahLQwkSK6s3Bo0lSJyJL5hi2BtKEO4iwLdi++VtjjVQ7Dv3Tj8UBbJHg1C3UpQ6EERAqGunGNlCMphgLNjp5KobBOg7eWhY4dWFNtmNUzzBwb2Ci4P3HKd52o7q+AHzgbww1/OK3BvgqPTynCHDYydrblURoLR1jwQRA7XkUxwBRt/ek/rpAw0nTNxhs/f4IZS6fFl3JNVygx/WkRVfBJNgRX6HnyNYCFarGy9Z4Qz44WFhrQydAX6ooKrpXU9eAj9k8IZ7rALDvIc0ZXjVF4XsW92GayZcVPc3bK0X4illsX158Z8PsSo2mw9/VhGyXxZIX4i60nALJQ4lveEqSRO3WxxBD6AOVNd5Fj/QjgzBkv/rYZdUROU5GQX9bwGZ+AvN9qmjXMcYDxgeQenxL4u3ssSO+TlevAmuCmDaz/DeZoCji/gLP8t7Xv/jP87hF6zG3Qlg7TIVAAAAAElFTkSuQmCC",
Qaa:"data:image/png;base64, ",
Fx:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAB0CAMAAACBmP1sAAAAmVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACRkZHz8/M8PDzLy8ufn5/u7u4UFBT8/PxmZmbz8/NNTU07Ozuvr6/i4uJwcHDm5uZfX1/o6Oi8vLy9vb2AgIAoKCj29vbT09OsrKzZ2dkoKCiGhoagoKDb29vJycnQ0NDHx8f4+Pj///9ot3XMAAAAMnRSTlOyALYLBLrAvRUiGsMxKS004vxC8WfNyPNP2tLP6rXa+NbBgu3eyeibdvTMWuWojp2P5xSTSb8AAAbBSURBVGje5NfrUuJAEAVg1l0SNTEJAUK4KRdRvLu8/8NtTyeHw5CKEwzln21rt7RK+ep09wyh8+vn62TzT7Ucf9HKpPIb5YBbmrAqRfu85oF3ab5Q+sOhex6TILDr60v5ksL/aoNtZ1IEqMTVcRFG2HZmCZqA4G6OC7CyTdSOSwRYcFEUSr0MUHloKipgYRH22yZEyaCe0d7fhqPdYf0dvq3yWN2mascRsoxowPx9Sc6u0XyVxsJqWHT4dJOigun7GECvv05Q/f7eXZYs1cYmSYrxYF5y62SSBYHHCoLNIukjbV6oQJubDFmK26G+5N3rdM/5RcENFrNeEXYgKqICdZkkNaTJqGJvZkBqfrfbxbclu1Z1KFkdUWHaJEKGca7i3W1mQLUqtWefEw37lsbRjUQF6jRJasiPkYoaEeCFVXvXqJmqoy2iAnWZIG+iOB+briYiAqRlu1RfdaxpGBF1mhil9HVlQq4ziAA7VlmsUadmix9epL9Aa02mBDk3IRcmJEVaVXev3puoqzgk+oVJMgpTszz9IiTB2rLU6ZP87ZzoVybJODWj1ElqRogutkSzmUHTGrRTT/ZkXRESYkM1CBJBx4rqkak3i40FOUVfm4ryj+gtUY6Upr2ysj4kbbF5VM9TdBlHV0Atk51tR1IlOheUI62aIOPlEXnRAn3kSGmSxP58yK9OQLoAJ7qtjBQmOxsP5BdvSX5LBSpHZpRLdxWtmvthyoU3I/ktkahcDsOYQWlax0SG+RQErVIyabDpcaQVE53d6v4wZZukvqALmVSuuytBaZK8CtOH3e5eSL9NSiySdnct3WXQqqk7+6TDxLlsjWbS3a1ZIwbtYGk1Zq7HpG1n7ZHey7spgtJkzLns7JlIjvRO3kytiXYQU0yNufE8DvMs3Z3IBwwEhcmlrYnZtrt9K6hlRumIMVntg8p5GTOoMbFBN+GnienY2Qutk4LqRAeRbWKDxrK0jpjFA15ztQgqqzuXoDguNMMXeXrGNOtfYuHz2cEplkEzuepjBu2wtW9yBTlj+rv+ptmaMaheRtuwakbxg2yQ49XkBeQ4vWZUnUGxRWyumBhnrtceYtaZnn5Iuw+wa46ymlsxw5U8z3ou01dTBj/Brdy4uS8YqJgY59Jsrd91mMGurPUzGtxwcz/DqinjdLZWTVSSuVVculN57sRAxcQlJJ9OvJNMedDHWN3NxZuLZQ5kHz2/kcnqO8aKzdU7N42OzXc5nWiV02TNMFbHQGe8/tTU97FHs0KI6TbZ4CRjg+vNpHxvoSkrNNQbobnJultwrLUndGKe/2BibcX0TjQ5Vjwp1qE0Lw/NcQtTxlo2uNbcFI9/tomjcqLJsQKtGaiYOCznMHEdej9ncqyb7n9g/uvVDloTBoIwDBcPkWI0l0K1pZdSELzU///rOpnk6+u6LmucmL0UCuVh1nTdzHzRvZ3/Gdok5lL/K5iLnglm8v8ZPfua+84+PxM4b597xq/9jG+vv1eW/C7TFezR72zEsqnvbEzuJpvJd5Nmwt2ky+4m3YN3sLLII5Tewbj3dc+/a9pjm5rtedqdGvHeO7Ue24t7/BLvDph8oKcJ70iI9TL7dyQ9Qm7qA+3fBTfPexf0jxPTTyJ/58UMv/NCJlu70Lv95kdbK5PNpYfxMlMPg67UW7sdmzWYhnrr9kSh8cUTdGBrzcxab5jzkENPSoeQTG2u994oNE4OZX7YWasyE3PuHiNleo9RT1DS16RQHt0ZyLGX2tHuw0x7xmvQ8M56z5gyZVKoeuPsbsCkN86niUmhwwwg3hxPZwA3+/EMAYZZB2iwdXuynf1VmZl5NdNZx1D7W2Y6hfkKu6vZVQB1ktmVyKL52vqM7jOEOrkeZ3TpzsoEZRYZQP/H2j6L7MmSCeqTZdBVhPzKB725aegO9MmzZQrt0fdk1LuaXuQ4Q4fMzAzdH3RNp9SpWQHIsglKJkIo6pRMREqWTaF59uMe0YtU9iMjMQuoMi6ViIvALOOSk5gllCwPKm7iIZLlKZOYoASIlFlqXIVlAY4BLTJLkLlZRq3U45DNyqNZrFI2C7Jsgt7MoDVpBs2xYgatnZRBA1WpZO0auYJLWTuyYEbWTVAyhd9kCuVq3cwUWpGQBbOe1kyzk8092UnIukmpqMYGMqKBLGy3P1eysCYGsrCgZH53xna3Mr9Hz/w6iAgZyjb7Hveru8g2d87ttg66SJE1s64qUm2yLddNM848gYjBrDqsu/mqZNWjmXxl5N3uf+IhhkxUZwUny34BiBgwYXF9YeEBxk1YX0BwgLOauKyqFzdZWA+sP5AziIxB81g8AAAAAElFTkSuQmCC",
jL:115,w_:115,iL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAB0CAMAAACBmP1sAAAAllBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACRkZEAAAAAAAAAAAAAAAAAAAAAAABOTk48PDzz8/Pu7u78/PygoKBmZmbLy8soKCjz8/M7OzsUFBSvr69wcHDo6Oi8vLz4+Pi9vb1fX1/h4eHm5uasrKzZ2dnT09OGhobi4uKAgICBgYHb29vQ0NDKysqampqgoKDIyMj///9mvEG6AAAAMXRSTlO0AMC6Bw4XI+EpHjIsLzTRQvvO82ZP8Mjaz8fp2sGC5+3Wtfh29Jtatd7dqJ2NauWP5Mh4/QAABn9JREFUaN681ulW4zAMBWBPU5hQN2na0J2u7Dt6/5cb20py6+iQnOAp4g+Y5eNKilv15/frR2b/5KOhAk1gsmAHmO3eRVkeHGpKENjlBeqSvwIbagKE52pQfbi6EGygiYBOGwz++mVOSpfVEBMRC4+5K1tDLvc5yydsmNmHaD1rJYnWj9dlTbXWSWJwsO2qasvIoPOs9v46yem0dpPX7TTV7A5YRYc75zwRLTh93zAnK3/aZqku1EtWu5v9SmQwe1+UwHi2j8uazSp3s810YtgBo6a6mkwWYnr9VHD7eLTq+TU/xAWcH02TobaYMiWLAyPq9G5Ctm4/l73v6rAec9gPo5oOM9rF5N2xczTihxPH6xoYRVGN3Tt1Mk2TKmqTKUfJIZN06sTbmxWseqHLsQv7mnGDEbXdLEgX8i13ogC/cVdOze+KqECbTIzShVzYrsY1UEWqqkjV1U831sxOFWiL6Uju69aG3BddhSfLY5d2i3ePNiqG2mT2K1KnRxvyANHjJAv12Ubdcn8FKs2SHOrMLs9s1SqioC7vieiYaofK9io/JUg7yliI7SpPdW3RTLv2SrO+sSDHvK4Qu6ixQRdAhYmYHrkE2aFK9MahZqZypMqP6R4SkN1EPD0lukkT7BHM2v4EkGCBHvVQ7pESZJJuAkiOCvTBoBipMHmYSfpGRCMmIXYMCvROjlTVhjnUH0R0I1L+rL1ronxqRypMr7NZTrRGykD0nmgiuqv8zrph3oemxEznYzNSdBcmYg71XbE/EMOCHohoyrsL04+Z7Yie0dmgYnRvu+sHVd4CpW9FZyGGoqux3V0vqPJiTovHBCnD2/tCtEPQU5OneeSdFWRQd2+Jtl5QVY85/5+msugIQWGeJya6O0PQ0sTS5iJmeFB+XhYICtO+nnxxTCGGBeWJXp9cRgqtTRdtSxvZajqVVa7uk7mMKhOtfSS69Un56/L78lQGXRHlelg1V6G1r0QvTb89H3HNo6j5VP6ne+9eUNjandmgBjKKiSuOouZTaR5Mc+0WwbT3nns475ti9qq/3osaTkWVzU2r5qpqnFt+PwuywYzKQ3kqyaK5j4nZXJhunBu7tTJm81//3kQVm/vFA/VMM86mmD/JiYEuiTbVQFW5QhnRrOlJ+VFOoO7OhckvnddEn2fJqco7NxvC5BV6J3rhmGfJuXbXHy+uKtf2oVghdZac9se2bnFhXiUT3AjhOSU6InowiyvM3ply+mafTfteegHzHDnnRJPkqmYSzc6QEwPtZIbvrarMv7+eU9dM/a94M+hpGIbB6GFFYyvNhQPiAEhIoCEQ4v//Ouic7C39WrI2LviCVAk9HKVpbD/Wz1OZ/5Bn96d58q6smeedMjkTNmvkaWdCy7vC2bf2OTRg2hm/znnLGc95K98y1zz5lsXvCt9PvtmOeeo325jxqhnvJv55cjfhnpCqlSc2rlOebCG9gzVHJndN/3uf3TV3+8ikEuRO7Zsnd2rutxT2LzCraweQWjtQfq5TI6VK+5kaiVowvFs7aoo5WvVtLq8F08kHc79rnWte0rSltRMhr+07avspZozCU/1D3/rJh72dkz0Mfl+xvz7VSF2pT5Z2olfj1zdJvRp2bd6TCs9+zRrStJ4Uu/bIZHHpvXkhU+8t0MGAabtotR6j9PtIlF6qH/KNNJXZJ+rRMyZOPeNTmjBJ1HrjrK5Pb5w0hdlvXWYA1UhmAGzabG1HZh21yDTr+Aj0NEdnOi0znVpomukEjqDB2p5Wl9lVDfRsdhU7mk1pRndfCT2b0TG6Eiarez6LXEpkFhkYgAqTvZvNXCuRh58sWVmYMkEP2aC3BvkAUpgkGqG3Al02Qxek5GnQ7dZME1yBBcjriJxyBQigOBFzoJkTcUjI35i8pf3ymvsxh5q7H4dWkMIUdwjH5aKh79BxUSTMUei+h+LylKUTdXkEKUwiumDiLG2msPXOEpbdTtysTQraExNulukXZTdL1b6bhQ5a6IoOmgZ2X6euHeAJ187WFaQwyxZj+zjTKRS9r8hE8YM6y50kyQJTYokjGokgS0xNFaq5sF8FF7aDCLLAVO7AwG3DmPP72ju/BhTibGaTqFemNpvZ3JNxm8Oo3FzpjedG9Tbq212Ko8i9HdrUTQWTXFHHNXJZ3cfJz5V8Q8dQKb/OjwcJ9sg1cqLBg1bJJOQfLMBFYOPNbBJXA5YjE679SGweEJ5MwlDQ5sY3+a5XYx8CGgsAAAAASUVORK5CYII=",
OVa:115,NVa:115,Xp:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAB1CAMAAABKxC7JAAAAh1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQkJBMTEwAAADz8/M8PDzLy8ugoKDu7u5wcHA6Ojr8/PxmZmYUFBTz8/Pi4uKvr6+AgIAnJyfo6Oi8vLzm5ua9vb1fX1/S0tL4+PjZ2dmPj4/JycmsrKyGhoafn58UFBTb29v///9i05URAAAALHRSTlO0AL0KwyYRGDMuHuPUyfxC8WbN29DzT8jaterfzMGC+e3XnOf15Y52W+fOqAzih28AAAcuSURBVGje1JWJcqpAEEUJkrxBZHHfUNEY1/n/73s9wzQ31ACiUq/qXVKpklKPp7uncT7+ff4TZs/6s9IJEzT9j5O/ArlrZk9ddQG1OybkvnT+mEsHzt0xWTCn2dFoYN9lAmhw/X7/sxy6Y7igvsYEEUDg7PQZi86+xASx4Pm+L4S4DDkzQfH9HEtcyD7JBJEV+zmPaKf7aCp/53t03yqy5oL6KlMhWZF4s9MGuHKmy21MWFCh+gyTq9rPDePTggFRkgWcJJGcDWF9H9QXmKaPueJwaXBZMJh75aT7IGFbKrKhQrUlE2XVxPNIquyuE0K4VhR4v4py2aGhKtXWnqirIQ41MVoBWIPNNHVErlBtwcS8fhnkTBN343kJ6HBK2DTQsvfYqPYorT11XbXkYaqJUDSo4lIBda6p07MQqG8rJuo6W6iqBgWxoHH4JbDzq26rVtX1bcEEUoitksx0VQGsir7L1EmiNsWlqG8DE71k5FJJ7kGs5sHX4QqvJWUrBKDNTIOkJaCGJzGSUGwIqJMjfXYJaDOzVyBVKwOWBK8Nlbq6UtC4BurUI6MxSyKtqQFBFwqKc1rDLCEnjHyOaqBjQGuY0KTxARLEZwLoRvhcXZuJkS0jQXyuvgxdAlrJZKTYAPlaXEAPQu2Gcksdu5kHeusAli8F0LPdUsdq5pDeOIblW6YrWr4zVNdicjNp4a3etIQpLYeROqVVTFSWmnmE5bumaWRaylAwoXlW8wPLt0331ClTXTBLmiL+lnJtbZ93WppRdSFqMfOZPaKZXYjOI5pdFgUTmjN9TGDZhelaym8WBROaS5rZjiwxuzsptyzKTAyt0kyh2ZHoAKLMxNB2qwnTBKIlptKMp9DsiMjnZcGizOx95Jqnek233VUjSh0dKtGCiQla8NBavLaxqa4Z3aUWNUyU9iLljjXtz7WIxlaJzmnVC78oroMJupsVZFuug7YZu5U/ODN7wTC5nb6gtZdWaLpuItsncCu3LooLz/xwHqu66U7kE4lct7a4YHI7t1IGlcyBfCae1RtT3IvPj1GnaOeGplYj3S6YCC/dk+CGOnw6VTsrJ8h7mQlRj/qzMQ2Fpx9LmVSclPeYEOWdCya1cyjl1SNk9568c2OfmTxCJzqd0Ozcc0Xrj7cCMfPn2IFHqEtPNDTIny1l5ggbodbzOE5v+0SWkw1uk3VUzYQofcmBN5HTA9N74JmFYeiF4aqEHIcqt2OjJ5hf7KmOysIw6z2jW+hRwnD32zLMb04eeKZSjgomH08pkwee19DTCztcS2SgbxI0afb0iCkKzx6YzZ57Zg4kEvLNn3pPMD9RWzCdBs8f/vq9RNK/tJnbTsMwDEDFijTESlXYG1TqyxBi4v+/D9eLdZTaklct9QtlgbnHcRxf7MPPlBOdNSeYnnOUnVvMWDnRV7HtddjA2eWcuKi6i/yODNPtw9+/LZxP+X4CJXJWosv01uvD3C9HRVRu5eSshJxQjeOsD/NVNJXzcRlH0Z5wTtF+fiTn0wQzq68ieRzSs0LsU51TwonMonJpd8GXcMY6LcbnnFa7aeS+i5MYfyTG212WcXJq5C9LcZnfn9xl3CvdkTs74QTTXj/nrO/sjjyB3MS9ZO8xy7sBmnL63ERT6tBx0ekwAU046xyMvI9ccy0upyZeybetQYcovyXXhNMqwdNzwOlqh76adaxAT+6tXU5NHv9C7VCL1Ujfi8hPM4YxnFkMayT1b6sd0EmNBGj9T8jqrXQRoQ6IayTqsrgWRHxhy5JfjMuVH9tOOMW4Yc3rxzcbFzFt2U5q+1dq+/greUgWHSa1faXT9TDaSelKvWNa+iZiXO3VANq0V4PXis69Wm9gak8Kr1WdeO6OvTc6GHCKF+3ZY3T9PryofS9VpoSKiQehU+MfPeMWoAd6xmC6PjW98Rag9MbZTXQSFxrNALCszgDCfjwB8NFZB8Ksg7DndDaZ6UDJTEdDkNdJd7PMrh4edxxEdHaFZcN5GTO6/1btXbVhIIqiKKhNm5RJ4f//yIixLgtxjY9Ho3GVNMtHeWCY/f1Et5WV23FH5xco3EWuociHC9DXd66ueQu9PnKrO1dPltmvs6HXpiJ/kWcTCf1xh35hpDt0pMOEjtJEKzA3tcgvpHypm/5KWxMxM1ITUWRoIqDaD1Mn2w9kaFwKbY1LUHvj4sEG0/+G1vLsryxqeazMXY2AqJolkVS57aNtb5asjCb03GZt2PPrXZuVezBqBWH71FODBg4NGhLazY5eb+20YMRger5HxfinKeTyFptCaGgnab2dHCOFuNHs6shgP2pEpanK1GB21NaPWtgsMnNlXEHs6+b38Wx+d5CIzGafSj3c1jaLm2fa5qxih+wM7gBLRE6aVGNbOn5ww8tgNqkS+R0esqPJJ66bxpZb9NDK20HiomlssWxf1hu70bS2Bjve0v2mn234zs0miTV//gHyyprZmiIc9wAAAABJRU5ErkJggg==",
vWa:115,lpb:117,DUa:"data:image/png;base64, ",
xWa:"data:image/png;base64, ",
cG:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}});
define("tdv/view/util/Fullscreen","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device".split(" "),function(a,m,h,n,g,k){if(k.Dc()!=k.HQ){var e=document.createElement("div"),b=function(p){return!(!(p||e).requestFullscreen&&!document.exitFullscreen)&&k.Dc()!=k.FQ};if(!(a=b()))try{a=window.self===window.top}catch(p){a=!1}if(a)a=function(p){function q(r){var t=p.call(this)||this;t.qa=r;t.ha=t.Lfa();document.addEventListener("fullscreenchange",
function(){t.fla()});window.addEventListener("resize",function(){t.fla()});return t}P(q,p);q.ira=function(){};q.prototype.ol=function(){return b(this.qa)};q.prototype.xt=function(){this.enabled()||this.toggle()};q.prototype.sm=function(){this.enabled()&&this.toggle()};q.prototype.toggle=function(){this.enabled()?document.exitFullscreen():this.qa.requestFullscreen();this.fla()};q.prototype.enabled=function(){return this.ha&&this.Lfa()};q.prototype.Lfa=function(){return this.qa===document.fullscreenElement};
q.prototype.fla=function(){var r=this.Lfa();this.ha!=r&&(this.ha=r,this.o(new n(h.V)),q.M.o(h.V))};q.enabled=function(){return!!document.fullscreenElement};q.fullscreenElement=function(){return document.fullscreenElement};q.sm=function(){q.enabled()&&document.exitFullscreen()};q.M=new g;return q}(g);else{var c=!0;a=function(p){function q(r){var t=p.call(this)||this;t.qa=r;return t}P(q,p);q.ira=function(r){c=r=="out_of_frame"};q.prototype.ol=function(){return c};q.prototype.xt=function(){this.toggle()};
q.prototype.sm=function(){};q.prototype.toggle=function(){c&&window.open(window.self.location.href,"_blank")};q.prototype.enabled=function(){return q.enabled()};q.enabled=function(){return!1};q.fullscreenElement=function(){return null};q.sm=function(){};q.M=new g;return q}(g)}}else{a=function(p){function q(r){var t=p.call(this)||this;t.qa=r;return t}P(q,p);q.prototype.ol=function(){return!0};q.prototype.xt=function(){this.enabled()||this.toggle()};q.prototype.sm=function(){this.enabled()&&this.toggle()};
q.prototype.toggle=function(){if(this.enabled())d("fullscreen"),q.Cy=null;else{q.Cy&&q.Cy.sm();d("fullscreen");var r=f();r.push("fullscreen");l(r);q.Cy=this}this.o(new n(h.V));q.M.o(h.V)};q.prototype.enabled=function(){return this==q.Cy};q.enabled=function(){return!!q.fullscreenElement()};q.fullscreenElement=function(){return q.Cy&&q.Cy.qa};q.sm=function(){q.enabled()&&q.Cy&&q.Cy.sm()};q.ira=function(){};q.M=new g;q.Cy=null;return q}(g);var d=function(p){for(var q=f(),r=[],t=0;t<q.length;t++)q[t]!=
p&&r.push(q[t]);l(r)},f=function(){var p=window.location.hash.substring(1);return p.length?p.split("&"):[]},l=function(p){window.location.hash="#"+(p.length?p.join("&"):"")}}return a});
define("tdv/util/Storage",["require"],function(){var a={};a:{try{if("localStorage"in window&&(window.localStorage.setItem("test","test"),window.localStorage.getItem("test")=="test")){window.localStorage.removeItem("test");var m=!0;break a}}catch(n){}m=!1}if(m)a.setItem=function(n,g){window.localStorage.setItem(n,g)},a.getItem=function(n){return window.localStorage.getItem(n)},a.removeItem=function(n){return window.localStorage.removeItem(n)},a.clear=function(){try{window.localStorage.clear()}catch(n){}};
else{var h={};a.setItem=function(n,g){h[n]=g};a.getItem=function(n){return h[n]};a.removeItem=function(n){delete h[n]};a.clear=function(){h={}}}return a});
define("tdv/player/view/util/InfoWindow","require tdv/utils tdv/player/l10n tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/core/ZIndex tdv/view/util/Assets tdv/view/util/Fullscreen tdv/util/Storage".split(" "),function(a){function m(R,Q){this.Bbb=R;this.RZa=Q;this.bla=[];this.Nc=null;this.Kz=!1}var h=a("tdv/utils"),n=a("tdv/player/l10n"),g=a("tdv/player/view/util/Device"),k=a("tdv/player/view/util/URL"),e=a("tdv/view/core/ZIndex"),b=a("tdv/view/util/Assets"),c=a("tdv/view/util/Fullscreen"),
d=a("tdv/util/Storage"),f="color:#000; font-family:Arial, Helvetica, sans-serif;",l="",p="border-color:#b2b2b2;",q=p,r="background-color:#009adb; border:none; box-sizing:border-box; color:#fff; cursor:pointer; font-family:Arial, Helvetica, sans-serif; text-align:center;",t="vertical-align:middle; padding:0;",u='<img style="width:33vmin;" src="'+b.mo+'"/>',v='<img style="width:24vmin;" src="'+b.mo+'"/>',w='<img style="width:34vmin;" src="'+b.Qaa+'"/>',x='<img style="width:34vmin;" src="'+b.bVa+'"/>',
y='<img style="width:24vmin;" src="'+b.zua+'"/>';g.ub()?(r+=" margin:0 1vmin; min-width:20vmin; padding:2.2vmin 4vmin; font-size:3.6vmin; font-weight:bold; min-width:30vmin;",f+=" font-size:3.6vmin; line-height:4.3vmin;",l+=" margin:5vmin 0;",p+="  margin:5vmin 0;",q+="  margin:3vmin 0;",t+=" height:4vmin; margin:0 1vmin 0 0; width:4vmin;"):r+=" font-size:19px; padding:17px 34px;";l+=f;m.prototype.gea=function(){this.Nc||(this.Nc=document.createElement("div"),this.Nc.style.position="fixed",this.Nc.style.zIndex=
e.iVa,this.Nc.style.left="0",this.Nc.style.top="0",this.Nc.style.margin="0",this.Nc.style.padding="0",this.Nc.style.height="100%",this.Nc.style.width="100%",this.Nc.style.backgroundColor="rgba(255, 255, 255, 0.99)",this.Nc.innerHTML=this.RZa,this.Nc.querySelectorAll("button").forEach(R=>R.addEventListener("click",Q=>this.W4a(Q.currentTarget.id))))};m.prototype.qka=function(R,Q){var K={},L;for(L in Q)K[L]=R.style[L];this.bla.push({el:R,css:K});for(L in Q)R.style[L]=Q[L]};m.prototype.w7a=function(){for(;this.bla.length;){var R=
this.bla.pop(),Q;for(Q in R.css)R.el.style[Q]=R.css[Q]}};m.prototype.show=function(R,Q,K){R||(R=function(){});Q||(Q=function(){});if(this.Kz){var L=this.x0;this.x0=function(){L();R()};var U=this.m0;this.m0=function(){U();Q()}}else{this.gea();this.x0=R;this.m0=Q;var T=this.I1a();if(T===void 0){this.Kz=!0;T=c.fullscreenElement()||document.body;if(K!==!0)for(K=0;K<T.children.length;K++)this.qka(T.children[K],{visibility:"hidden"});else for(this.qka(T,{overflow:"hidden"}),K=0;K<T.children.length;K++)this.qka(T.children[K],
{position:"absolute","z-index":0});T.appendChild(this.Nc)}else this.Kz=!1,T?this.x0():this.m0()}};m.prototype.oe=function(){this.Kz&&(this.Kz=!1,this.Nc.parentElement.removeChild(this.Nc),this.w7a())};m.prototype.I1a=function(){var R=d.getItem(this.Gya());if(R=="true")return!0;if(R=="false")return!1};m.prototype.NEa=function(R){d.setItem(this.Gya(),R?"true":"false")};m.prototype.Gya=function(){return this.Bbb+"DontDisplay:"+window.location.pathname};m.prototype.W4a=function(R){var Q=this.Nc.querySelector("#tdvvriw_dontdisplay");
Q=Q&&Q.checked;this.oe();R=="tdvvriw_continue"?(this.x0(),Q&&this.NEa(!0)):R=="tdvvriw_cancel"&&(this.m0(),Q&&this.NEa(!1))};a=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+l+'">'+n("use-cardboard-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">'+n("use-cardboard")+"</button></div>","</div>",'<hr style="'+
p+'">',"<div>",'<div style="'+l+'">','<div style="margin-bottom:2vmin;">'+n("samsung-internet-vr-app-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_cancel">'+n("launch-default-browser")+"</button></div>","</div>",x,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>",
"</div>"].join("\n");m.call(this,"ChromeAppInfoWindow",R)});var z=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+l+'">'+n("use-cardboard-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div>",'<hr style="'+p+'">',"<div>",'<div style="'+l+'">','<div style="margin-bottom:2vmin;">'+
n("samsung-internet-vr-info")+"</div>","</div>",x,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"SamsungInternetInfoWindow",R)}),A=h.extend(m,function(){m.call(this,"SamsungInternetForGearVRInfoWindow",['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',
x,'<div style="'+l+'">This content requires access to the WebVR API.<br>To enable WebVR open the "More" menu you\'ll find above this window and then click on the "Labs" item.</div>','<div><button style="'+r+'" id="tdvvriw_cancel">OK</button></div>',"</div>\n</div></div>"].join("\n"))}),D=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+
l+'"></div>','<div style="text-align:center;"><button style="'+r+' box-shadow:0 0 4px rgba(0, 0, 0, 0.5);" id="tdvvriw_continue">'+n("exit-vr")+"</button></div>","</div></div>"].join("\n");m.call(this,"ExternalVRDisplayVRInfoWindow",R)});D.prototype.gea=function(){m.prototype.gea.call(this);k.Tg("vrv")===!0&&(this.Nc.style.backgroundColor="")};var F=h.extend(m,function(){var R=g.Tb()==g.Ji?window.location.protocol!="https:"&&window.location.hostname!="localhost"?"<div>"+n("giroscope-disabled-http")+
"</div>":n("giroscope-disabled-safari-request-permission").map(function(Q){return"<div>"+Q+"</div>"}).join("\n"):"<div>"+n("giroscope-disabled-http")+"</div>";R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>','<div style="'+l+'">',R,"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+
l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"GiroscopeDisabledInfoWindow",R)}),C=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+l+'">'+n("use-cardboard-info")+
'</div><div><button style="'+r+'" id="tdvvriw_continue">'+n("use-cardboard")+"</button></div>","</div>",'<hr style="'+p+'">',"<div>",x,'<div style="'+l+'">It looks like this device is compatible with Gear VR. If you have a Gear VR headset you can view this content using the Carmel Web Browser (by Oculus).</div>','<div><button style="'+r+'" id="tdvvriw_cancel">Use Carmel web browser</button></div>',"</div>\n</div></div>"].join("\n");m.call(this,"CarmelInstallationPromptVRInfoWindow",R)}),B=h.extend(m,
function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+f+' margin:2vmin 0;">'+n("cardboard-v1")+"</div>",'<div><button style="'+r+'" id="tdvvriw_cancel">'+n("use-default-cardboard")+"</button></div>","</div>",'<hr style="'+q+'">',"<div>",'<div style="'+f+' margin-bottom:2vmin;">'+n("cardboard-v2")+"</div>",'<div><button style="'+r+
'" id="tdvvriw_continue">'+n("use-cardboard-v2")+"</button></div>",w,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"CardboardV2InfoWindow",R)}),H=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">',
'<div style="'+l+'"></div>','<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">'+n("enter-vr")+"</button></div>","</div></div>"].join("\n");m.call(this,"EnterVRInfoWindow",R)}),E=h.extend(m,function(){m.call(this,"PreparingVRInfoWindow",['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+l+'">Preparing VR...</div>',"</div></div>"].join("\n"))}),
G=h.extend(m,function(){var R=['<div style="position: absolute; top: 7vmin; right:5vmin; ">',v,'</div>\n<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">',y,'<div style="'+l+'">'+n("use-safari-for-vr")+"</div>",'<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+
l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"UseSafariVRInfoWindow",R)}),N=h.extend(m,function(){var R=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+b.mo+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">',
'<img style="width:22vmin" src="'+b.B_+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+n("rotate-device")+"</div>","</div>\n</div>"].join("\n");m.call(this,"RotateVRInfoWindow",R)});h=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+
l+'; text-wrap:balance;">'+n("ar-mobile-info").split("\n").map(Q=>'<div style="margin-bottom:3vmin;">'+Q+"</div>").join("")+"</div>",'<img style="width:24vmin; margin-bottom:4vmin;" src="'+b.Tba+'"/>','<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+
n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"MobileARInfoWindow",R)});var O={};O.cpb=new z;O.dpb=new A;O.tta=new D;O.Iob=new C;O.Mob=new H;O.Xob=new E;O.Uua=new G;O.B_=new N;O.zta=new F;O.oUa=new a;O.Qaa=new B;O.Tba=new h;return O});define("tdv/view/constants/State",["require","exports"],function(){return{Ee:void 0,ea:"over",Fb:"pressed",qc:"pressedOver",oa:"selected"}});
define("tdv/binding/Bindable",["require","exports","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.cs={};return b}P(e,k);e.prototype.set=function(b,c){var d=this;if(typeof b==="object"){c=[];var f=0;for(b=Object.entries(b);f<b.length;f++){var l=b[f],p=l[0];l=l[1];this.cs[p]!==l&&(this.cs[p]=l,c.push(p))}c.forEach(function(q){return d.zla(q)})}else this.cs[b]!==c&&(this.cs[b]=c,this.zla(b))};e.prototype.zla=
function(b){b=new n(h.L(b));this.o(b)};e.prototype.copy=function(b){this.cs={};for(var c in b.cs)this.cs[c]=b.cs[c];return this};e.prototype.get=function(b,c){c===void 0&&(c=void 0);b=this.cs[b];return b!==void 0?b:c};return e}(g)});define("tdv/constants/Priority",["require","exports"],function(){return{sVa:7,Gaa:6,Jta:5,Jm:4,Cua:3,WQ:2,dca:1,Sob:0,Nta:3,TF:2,QVa:1,PVa:2,LVa:2,Wp:2,nWa:3,kpb:4}});
define("tdv/view/constants/Cursor",["require","exports"],function(){return function(){function a(){}a.IB="grab";a.Mi="grabbing";a.Rta="move";a.aua="move-n";a.bua="move-ne";a.Sta="move-e";a.eua="move-se";a.dua="move-s";a.fua="move-sw";a.gua="move-w";a.cua="move-nw";a.yVa="move-ew";a.AVa="move-ns";a.zVa="move-nesw";a.BVa="move-nwse";a.Uta="move-fast-n";a.Vta="move-fast-ne";a.Tta="move-fast-e";a.Yta="move-fast-se";a.Xta="move-fast-s";a.Zta="move-fast-sw";a.$ta="move-fast-w";a.Wta="move-fast-nw";a.qf=
"hand";a.cG="transparent";a.Ee="default";a.LB="inherit";return a}()});define("tdv/view/constants/GradientDirection",["require","exports"],function(){return{q_:"horizontal",pca:"vertical"}});
define("tdv/view/core/visualprops/UIBaseVisualProperties",["require","exports","tdv/view/constants/GradientDirection"],function(a,m,h){return function(){return function(){this.backgroundColor=this.zO=this.ariaLabel=void 0;this.vk=[];this.L6=void 0;this.OD=h.pca;this.aw=null;this.dJ=0;this.pm=1;this.xf=this.yf=this.Ue=this.Te=this.borderBottomRightRadius=this.borderBottomLeftRadius=this.borderTopRightRadius=this.borderTopLeftRadius=0;this.borderBottomColor=this.borderRightColor=this.borderTopColor=
this.borderLeftColor="";this.className=void 0;this.cursor="inherit";this.id=this.Lc=this.height=0;this.LJ=!0;this.offsetY=this.offsetX=0;this.opacity=1;this.sY=this.Jw=!0;this.paddingTop=this.paddingRight=this.paddingLeft=this.paddingBottom=0;this.lB=!1;this.hu=0;this.iu=4;this.eo=6;this.wK=0;this.shadowColor="#000000";this.$w=1;this.tabIndex=void 0;this.ie=this.De=this.Dd=this.Ef=this.Mc=0;this.visible=!1;this.width=0;this.y=this.x=void 0}}()});
define("tdv/view/images/fliputil",["require","exports"],function(){return{Egb:function(a){return!!a&&a.indexOf("&tdvflipx")>=0},bIa:function(a){a&&(a.indexOf("#")<0&&(a+="#"),a+="&tdvflipx");return a},Neb:function(a,m,h){var n=document.createElement("canvas");n.width=m;n.height=h;h=n.getContext("2d");h.translate(m,0);h.scale(-1,1);h.drawImage(a,0,0);a.src=n.toDataURL()}}});
define("tdv/util/LoadRequest",["require","exports"],function(){return function(){function a(m,h,n,g,k,e){this.Eqa=m;this.url=h;this.priority=n;this.time=g;this.qmb=k;this.Mcb=e}a.prototype.loaded=function(){this.Eqa.dZ(this.url);this.Eqa.remove(this)};a.prototype.cancel=function(){this.Eqa.remove(this)};return a}()});
define("tdv/util/LoadQueue","require exports tdv/player/view/util/Device tdv/player/view/util/URL tdv/events/async tdv/util/LoadRequest".split(" "),function(a,m,h,n,g,k){var e=h.Dc()===h.zB,b=!(n.Bk("debug")&&n.Tg("disable-cache"));return function(){function c(){}c.add=function(d,f,l,p){d=new k(this,d,f,(new Date).getTime(),l,p);this.zz.push(d);this.za();return d};c.Fmb=function(d){this.VN.push(d);this.za()};c.Emb=function(d){d=this.VN.indexOf(d);d>=0&&this.VN.splice(d,1);this.za()};c.yob=function(d){var f;
return e?!0:b?(f=this.nAa[d])!==null&&f!==void 0?f:!1:!1};c.dZ=function(d){e||b&&(this.nAa[d]=!0)};c.za=function(){this.oma||(this.oma=g.ME(c.tab.bind(this)))};c.tab=function(){this.oma=null;for(var d=this.G7a(),f=0,l=this.KM;f<l.length;f++){var p=l[f];d.includes(p)||p.Mcb()}f=this.KM;this.KM=d;d=0;for(l=this.KM;d<l.length;d++)p=l[d],f.includes(p)||p.qmb()};c.G9a=function(){this.zz.sort(function(d,f){return d.priority-f.priority||f.time-d.time});this.VN.sort(function(d,f){return d-f})};c.G7a=function(){this.G9a();
var d=[];if(this.zz.length)for(var f=this.VN.length?this.VN[0]:this.zz[0].priority,l=0;l<10&&l<this.zz.length&&this.zz[l].priority<=f;l++)d.push(this.zz[l]);return d};c.remove=function(d){var f=this.zz.indexOf(d);f>=0&&this.zz.splice(f,1);f=this.KM.indexOf(d);f>=0&&this.KM.splice(f,1);this.za()};c.zz=[];c.KM=[];c.VN=[];c.oma=null;c.nAa={};return c}()});
define("tdv/view/images/ImageLoader","require exports tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/URL tdv/view/images/fliputil tdv/util/LoadQueue".split(" "),function(a,m,h,n,g,k,e,b,c){var d=0;return function(f){function l(p){var q=f.call(this)||this;q.Se=null;q.Id=null;q.Pa=null;q.Ha=null;q.QC=!1;q.pq=null;q.BN=null;q.H4=0;q.Dga=[];q.mH=d++;q.K1=q.K1.bind(q);q.L1=q.L1.bind(q);q.zv=p||k.sVa;return q}P(l,f);l.prototype.load=function(p){this.cancel();
this.Se=p;this.H4=0;this.fEa()};l.prototype.fEa=function(){this.pq=c.add(this.Se,this.zv,this.P9a.bind(this),this.gZa.bind(this))};l.prototype.cancel=function(){this.pq&&(this.pq.cancel(),this.pq=null);this.Jwa();this.Se=null};l.prototype.zhb=function(){return!!this.Id&&!this.QC||!!this.BN};l.prototype.pj=function(){return this.QC};l.prototype.yg=function(p){return p?(p=this.Id.cloneNode(!0),this.Dga.push(p),p):this.Id};l.prototype.hg=function(){return this.Pa};l.prototype.xg=function(){return this.Ha};
l.prototype.rl=function(){return this.Se};l.prototype.P9a=function(){this.Id=this.t_a(this.Se)};l.prototype.gZa=function(){this.zhb()&&this.Jwa()};l.prototype.Jwa=function(){if(this.Id){this.BN&&(clearTimeout(this.BN),this.BN=null);for(this.QC=!1;this.Dga.length;)this.Dxa(this.Dga.shift());this.Dxa(this.Id);this.Id=null}};l.prototype.kXa=function(p){p.addEventListener("load",this.K1);p.addEventListener("error",this.L1)};l.prototype.ZDa=function(p){p.removeEventListener("load",this.K1);p.removeEventListener("error",
this.L1)};l.prototype.K1=function(){this.Id.width&&this.Id.height||!(this.Se.indexOf(".svg")>-1)||this.M0a();this.pq.loaded();this.pq=null;this.ZDa(this.Id);this.QC=!0;this.Pa=this.Id.width;this.Ha=this.Id.height;b.Egb(this.Se)&&b.Neb(this.Id,this.Pa,this.Ha);this.o(new h(g.ia))};l.prototype.L1=function(){var p=this;if(this.Se){var q=this.Se;this.cancel();this.Se=q;this.H4<5?(this.H4++,this.BN=setTimeout(function(){p.BN=null;p.fEa()},Math.pow(2,this.H4)*1E3)):this.o(new h(g.$c))}};l.prototype.M0a=
function(){var p=new XMLHttpRequest;p.open("GET",this.Se,!1);p.send();var q=document.createElement("div");q.innerHTML=p.responseText;p=q.children[0];this.Id.width=p.width.baseVal.value;this.Id.height=p.height.baseVal.value};l.prototype.t_a=function(p){var q=document.createElement("img");e.epa(p)?q.setAttribute("crossOrigin","Anonymous"):q.removeAttribute("crossOrigin");q.setAttribute("draggable","false");q.style.position="static";q.style.border="none";q.style.display="none";this.kXa(q);q.src=p;return q};
l.prototype.Dxa=function(p){this.ZDa(p);p.parentNode&&p.parentNode.removeChild(p);p.src=""};l.gaa=function(p){return c.yob(p)};return l}(n)});
define("tdv/view/core/UIBase","require exports tdv/binding/Bindable tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/view/constants/Cursor tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/images/ImageLoader".split(" "),function(a,m,h,n,g,k,e,b,c){function d(p){if(p!==void 0)return typeof p==="string"&&(p=parseInt(p)),p%1!==0&&(p=Math.round(p)),p}function f(p){typeof p==="string"&&(p=parseInt(p));p%1!==0&&(p=Math.round(p));return p}function l(p){if(p!==void 0)return typeof p===
"string"?parseFloat(p):p}return function(p){function q(){var r=p.call(this)||this;r.mH=q.mH++;r.u=r.VL();r.u.id=r.mH;r.Uga=!1;r.Gb=null;r.Ia=null;r.eC=null;r.Y_=void 0;r.Vi=e.Ee;r.Qy=!1;r.nq=!0;r.fn=0;r.dn=0;r.mT=0;r.lT=0;r.pK(!0);r.yka(!0);return r}P(q,p);q.prototype.VL=function(){return new b};q.prototype.gf=function(r){this.NL=r};q.prototype.uA=function(){return this.NL};q.prototype.Xb=function(){return this.Gb};q.prototype.wa=function(){if(!this.q6)throw Error("Visuals not initialized");return this.q6};
q.prototype.qLa=function(){if(!this.zM)throw Error("Input event manager not initialized");return this.zM};q.prototype.z8=function(r,t){return this.VI||this.LS?this.VI===r&&this.LS===t:!0};q.prototype.co=function(r,t,u,v){this.Gb&&this.SD();this.Gb=r;if(!this.z8(t,u))throw Error("Component visuals already created for a different rendering type");this.q6||(this.VI=t,this.q6=t.create(this));this.zM||(this.LS=u,this.zM=u.create(this,v));this.KS();this.Zz();this.JGa();this.o(n.iUa)};q.prototype.SD=function(){this.Uga=
!1;this.Gb=null;this.Zz()};q.prototype.Era=function(r){r=r||this.NL;this.u.className!==r&&(this.u.className=r,this.tb())};q.prototype.$jb=function(){this.Era()};q.prototype.getParent=function(){return this.Ia};q.prototype.nw=function(){return this.u.x||0};q.prototype.tA=function(){return this.u.y||0};q.prototype.nb=function(){return this.u.width};q.prototype.Mb=function(){return this.u.height};q.prototype.Agb=function(){return this.u.width!==void 0&&this.u.height!==void 0};q.prototype.Xh=function(){return this.u.width-
this.u.Dd-this.u.De};q.prototype.Wh=function(){return this.u.height-this.u.ie-this.u.Ef};q.prototype.kg=function(r){this.u.visible!=r&&(this.u.visible=r,this.Tf(),this.Ia&&(this.Ia.lc(),this.Ia.Bf()),this.Zz())};q.prototype.Zz=function(){var r=!1;this.Gb&&this.u.visible&&this.pw()>0&&(r=!this.Ia||this.Ia.Qy);this.Qy!=r&&this.hda(r)};q.prototype.hda=function(r){this.Qy=r;this.set("inView",r);this.Qy?this.o(new k(n.od)):this.o(new k(n.jd))};q.prototype.L8a=function(r){this.nq!=r&&(this.nq=r,this.Ia&&
this.Ia.Bf())};q.prototype.v8a=function(r){r=d(r);this.jM!=r&&(this.jM=r,this.lc())};q.prototype.u8a=function(r){r=d(r);this.iM!=r&&(this.iM=r,this.lc())};q.prototype.t8a=function(r){r=d(r);this.hM!=r&&(this.hM=r,this.lc())};q.prototype.s8a=function(r){r=d(r);this.gM!=r&&(this.gM=r,this.lc())};q.prototype.w8a=function(r){r=d(r);this.Mo!=r&&(this.Mo=r,this.Mo!==void 0&&(this.lp=void 0),this.lc())};q.prototype.r8a=function(r){r=d(r);this.WG!=r&&(this.WG=r,this.WG!==void 0&&(this.kp=void 0),this.lc())};
q.prototype.Y8a=function(r){r=l(r);this.lp!=r&&(this.lp=r,this.lp!==void 0&&(this.Mo=void 0),this.lc())};q.prototype.U8a=function(r){r=l(r);this.kp!=r&&(this.kp=r,this.kp!==void 0&&(this.WG=void 0),this.lc())};q.prototype.O8a=function(r){r=d(r);this.Vy!=r&&(r!==void 0&&(this.e4=void 0),this.Vy=r,this.Ia&&this.Ia.Bf(),this.lc())};q.prototype.o9a=function(r){r=d(r);this.ct!=r&&(r!==void 0&&(this.g4=void 0),this.ct=r,this.Ia&&this.Ia.Bf(),this.lc())};q.prototype.$8a=function(r){r=d(r);this.$U!=r&&(r!==
void 0&&(this.f4=void 0),this.$U=r,this.Ia&&this.Ia.Bf(),this.lc())};q.prototype.g8a=function(r){r=d(r);this.rR!=r&&(r!==void 0&&(this.d4=void 0),this.rR=r,this.Ia&&this.Ia.Bf(),this.lc())};q.prototype.V8a=function(r){r=l(r);this.e4!=r&&(r!==void 0&&(this.Vy=void 0),this.e4=r,this.Ia&&this.Ia.Bf(),this.lc())};q.prototype.X8a=function(r){r=l(r);this.g4!=r&&(r!==void 0&&(this.ct=void 0),this.g4=r,this.Ia&&this.Ia.Bf(),this.lc())};q.prototype.W8a=function(r){r=l(r);this.f4!=r&&(r!==void 0&&(this.$U=
void 0),this.f4=r,this.Ia&&this.Ia.Bf(),this.lc())};q.prototype.T8a=function(r){r=l(r);this.d4!=r&&(r!==void 0&&(this.rR=void 0),this.d4=r,this.Ia&&this.Ia.Bf(),this.lc())};q.prototype.k8a=function(r){r=d(r);this.lC!=r&&(this.lC=r,this.Ia&&this.Ia.Bf())};q.prototype.l8a=function(r){r=d(r);this.mC!=r&&(this.mC=r,this.Ia&&this.Ia.Bf())};q.prototype.sw=function(){return isNaN(this.Mo)?this.fn:this.Mo};q.prototype.rw=function(){return isNaN(this.WG)?this.dn:this.WG};q.prototype.t2a=function(){return isNaN(this.F0a)?
this.wAa:this.F0a};q.prototype.ow=function(){return isNaN(this.jM)?this.mT:this.jM};q.prototype.wA=function(){return isNaN(this.iM)?this.lT:this.iM};q.prototype.T7=function(){return isNaN(this.hM)?1E4:this.hM};q.prototype.S7=function(){return isNaN(this.gM)?1E4:this.gM};q.prototype.bFa=function(r){r=f(r);this.u.paddingLeft!=r&&(this.u.paddingLeft=r,this.u.Dd=this.u.paddingLeft+this.u.Te,this.lc(),this.tb())};q.prototype.$ya=function(){return this.u.paddingLeft};q.prototype.dFa=function(r){r=f(r);
this.u.paddingTop!=r&&(this.u.paddingTop=r,this.u.ie=this.u.paddingTop+this.u.Ue,this.lc(),this.tb())};q.prototype.bza=function(){return this.u.paddingTop};q.prototype.cFa=function(r){r=f(r);this.u.paddingRight!=r&&(this.u.paddingRight=r,this.u.De=this.u.paddingRight+this.u.yf,this.lc(),this.tb())};q.prototype.aza=function(){return this.u.paddingRight};q.prototype.aFa=function(r){r=f(r);this.u.paddingBottom!=r&&(this.u.paddingBottom=r,this.u.Ef=this.u.paddingBottom+this.u.xf,this.lc(),this.tb())};
q.prototype.Zya=function(){return this.u.paddingBottom};q.prototype.JN=function(r){this.u.Jw!=r&&(this.u.Jw=r,this.tb())};q.prototype.J8a=function(r){this.u.Lc!=r&&(this.u.Lc=r,this.tb())};q.prototype.u9a=function(r){this.u.Mc!=r&&(this.u.Mc=r,this.tb())};q.prototype.hZ=function(r){if(this.u.offsetX!=r){var t=this.u.offsetX==0!=(r==0);this.u.offsetX=r;this.tb();t&&this.Ia&&this.Ia.Bf()}};q.prototype.DLa=function(){return this.u.offsetX};q.prototype.iZ=function(r){if(this.u.offsetY!=r){var t=this.u.offsetY==
0!=(r==0);this.u.offsetY=r;this.tb();t&&this.Ia&&this.Ia.Bf()}};q.prototype.ELa=function(){return this.u.offsetY};q.prototype.Jgb=function(){return this.u.offsetX!=0||this.u.offsetY!=0};q.prototype.Zn=function(r){this.u.opacity!=r&&(this.u.opacity=r,this.Zz(),this.tb())};q.prototype.pw=function(){return this.u.opacity};q.prototype.d8a=function(r){this.u.borderTopLeftRadius!=r&&(this.u.borderTopLeftRadius=r,this.tb())};q.prototype.e8a=function(r){this.u.borderTopRightRadius!=r&&(this.u.borderTopRightRadius=
r,this.tb())};q.prototype.W7a=function(r){this.u.borderBottomLeftRadius!=r&&(this.u.borderBottomLeftRadius=r,this.tb())};q.prototype.X7a=function(r){this.u.borderBottomRightRadius!=r&&(this.u.borderBottomRightRadius=r,this.tb())};q.prototype.$7a=function(r){this.u.Te!=r&&(this.u.Te=r,this.u.Dd=this.u.paddingLeft+this.u.Te,this.lc(),this.tb())};q.prototype.f8a=function(r){this.u.Ue!=r&&(this.u.Ue=r,this.u.ie=this.u.paddingTop+this.u.Ue,this.lc(),this.tb())};q.prototype.b8a=function(r){this.u.yf!=r&&
(this.u.yf=r,this.u.De=this.u.paddingRight+this.u.yf,this.lc(),this.tb())};q.prototype.Y7a=function(r){this.u.xf!=r&&(this.u.xf=r,this.u.Ef=this.u.paddingBottom+this.u.xf,this.lc(),this.tb())};q.prototype.Z7a=function(r){this.u.borderLeftColor!=r&&(this.u.borderLeftColor=r,this.tb())};q.prototype.c8a=function(r){this.u.borderTopColor!=r&&(this.u.borderTopColor=r,this.tb())};q.prototype.a8a=function(r){this.u.borderRightColor!=r&&(this.u.borderRightColor=r,this.tb())};q.prototype.V7a=function(r){this.u.borderBottomColor!=
r&&(this.u.borderBottomColor=r,this.tb())};q.prototype.g5=function(r){this.u.lB!=r&&(this.u.lB=r,this.tb())};q.prototype.f9a=function(r){this.u.hu!=r&&(this.u.hu=r,this.tb())};q.prototype.i9a=function(r){this.u.iu!=r&&(this.u.iu=r,this.tb())};q.prototype.d9a=function(r){this.u.eo!=r&&(this.u.eo=r,this.tb())};q.prototype.h9a=function(r){this.u.wK!=r&&(this.u.wK=r,this.tb())};q.prototype.g9a=function(r){this.u.$w!=r&&(this.u.$w=r,this.tb())};q.prototype.e9a=function(r){this.u.shadowColor!=r&&(this.u.shadowColor=
r,this.tb())};q.prototype.N7a=function(r){this.u.dJ!=r&&(this.u.dJ=r,this.tb())};q.prototype.IEa=function(r){this.u.pm!=r&&(this.u.pm=r,this.tb())};q.prototype.HEa=function(r){this.u.backgroundColor!==r&&(this.u.backgroundColor=r,r===void 0?r=[]:Array.isArray(r)||(r=[r]),this.Q7a(r))};q.prototype.Q7a=function(r){this.u.vk!==r&&(this.u.vk=r,this.tb())};q.prototype.P7a=function(r){this.u.L6!==r&&(this.u.L6=r,this.tb())};q.prototype.O7a=function(r){this.u.OD!=r&&(this.u.OD=r,this.tb())};q.prototype.R7a=
function(r){if(this.Y_!=r){this.eC&&(this.eC.h(n.ia,this.dwa,this),this.eC.cancel(),this.eC=null,this.u.aw=null);if(this.Y_=r)this.eC=new c(g.Cua),this.eC.bind(n.ia,this.dwa,this,!1),this.eC.load(this.Y_);this.tb()}};q.prototype.dwa=function(){this.u.aw=this.eC.yg();this.tb()};q.prototype.wD=function(r){this.Vi!=r&&(this.Vi=r,this.JGa())};q.prototype.JGa=function(){var r=this.Gb&&this.Gb.xea.$Ka(this.Vi)||"inherit";this.u.cursor!=r&&(this.u.cursor=r,this.tb())};q.prototype.l9a=function(r){this.u.tabIndex!==
r&&(this.u.tabIndex=r,this.tb())};q.prototype.L7a=function(r){this.u.ariaLabel!=r&&(this.u.ariaLabel=r,this.tb())};q.prototype.M7a=function(r){this.u.zO!=r&&(this.u.zO=r,this.tb())};q.prototype.pK=function(r){this.u.LJ!=r&&(this.u.LJ=r,this.tb())};q.prototype.yka=function(r){this.u.sY!=r&&(this.u.sY=r,this.tb())};q.prototype.bs=function(){this.Zz();this.MX()};q.prototype.np=function(){this.Zz()};q.prototype.Vja=function(){};q.prototype.KS=function(){this.MX();this.Tf();this.lc();this.Bf();this.tb()};
q.prototype.$y=function(){this.lT=this.mT=this.dn=this.fn=0;this.wAa=void 0};q.prototype.MX=function(){var r=this.Xb();r&&r.HM.MX(this)};q.prototype.Tf=function(){var r=this.Xb();r&&r.HM.Tf(this)};q.prototype.lc=function(){var r=this.Xb();r&&r.HM.lc(this)};q.prototype.Bf=function(){var r=this.Xb();r&&r.HM.Bf(this)};q.prototype.tb=function(){var r=this.Xb();r&&r.HM.tb(this)};q.prototype.iga=function(){var r=isNaN(this.e4)&&isNaN(this.Vy),t=isNaN(this.f4)&&isNaN(this.$U);return isNaN(this.Mo)&&isNaN(this.lp)&&
(r||t)?!0:!1};q.prototype.uza=function(){var r=isNaN(this.g4)&&isNaN(this.ct),t=isNaN(this.d4)&&isNaN(this.rR);return isNaN(this.WG)&&isNaN(this.kp)&&(r||t)?!0:!1};q.prototype.Vab=function(){this.$y();var r=this.t2a();if(r){var t=this.iga(),u=this.uza();t&&!u?(t=this.Wh(),t!=0&&(this.fn=t*r+this.u.Dd+this.u.De,this.dn=t+this.u.ie+this.u.Ef)):!t&&u&&(t=this.Xh(),t!=0&&(this.dn=t/r+this.u.Dd+this.u.De,this.fn=t+this.u.Dd+this.u.De))}!isNaN(this.jM)&&this.fn<this.jM&&(this.fn=this.jM);!isNaN(this.hM)&&
this.fn>this.hM&&(this.fn=this.hM);!isNaN(this.iM)&&this.dn<this.iM&&(this.dn=this.iM);!isNaN(this.gM)&&this.dn>this.gM&&(this.dn=this.gM)};q.prototype.Kb=function(){};q.prototype.Onb=function(){this.Vab();var r=this.sw(),t=this.rw(),u=this.ow(),v=this.wA();return r!=this.P4a||t!=this.O4a||u!=this.L4a||v!=this.K4a||this.lp!=this.N4a||this.kp!=this.M4a?(this.P4a=r,this.O4a=t,this.L4a=u,this.K4a=v,this.N4a=this.lp,this.M4a=this.kp,!0):!1};q.prototype.jb=function(){this.tb()};q.prototype.Lk=function(){};
q.prototype.ZQa=function(r,t,u,v){if(this.u.x!=r||this.u.y!=t||this.u.width!=u||this.u.height!=v)this.u.x=r,this.u.y=t,this.u.width=u,this.u.height=v,this.Bf(),this.tb(),this.o(new k(n.Rb))};q.prototype.pu=function(){!this.Uga&&this.Gb&&(this.Uga=!0,this.Gb.opa()?this.yM():this.Gb.bind(n.Up,this.yM,this,!0))};q.prototype.yM=function(){this.o(n.INIT)};q.mH=0;return q}(h)});
define("tdv/view/core/UICustomizable","require exports tdv/constants/EventName tdv/events/Event tdv/view/constants/State tdv/view/core/UIBase".split(" "),function(a,m,h,n,g,k){return function(e){function b(){var c=e.call(this)||this;c.a2=!1;c.Ry=!1;c.Z1=!1;c.A={};c.jya=void 0;c.yz=void 0;c.nD={};c.gya=!0;c.DFa={};c.S_a();c.Pb();c.gf("UICustomizable");c.Tf();c.set("inView",!1);c.set("toolTip",void 0);return c}P(b,e);b.prototype.S_a=function(){this.DFa[g.qc]=g.Fb};b.prototype.Pb=function(){this.Jl(b.ad)};
b.prototype.Jl=function(c){for(var d in c){var f=c[d],l=f&&f.length;l&&typeof f!="string"?l==1?this.m(d,f[0]):l==2?this.D(d,f[0],f[1]):l==3&&this.D(d,f[0],f[1],f[2]):this.m(d,f)}};b.prototype.m=function(c,d){this.A[c]={i:!0,d}};b.prototype.y2a=function(){var c=[],d;for(d in this.A)c.push(d);return c};b.prototype.lV=function(c){this.Ry!=c&&(this.Ry=c,this.jh())};b.prototype.KN=function(c){this.Z1!=c&&(this.Z1=c,this.jh())};b.prototype.hFa=function(c){this.a2!=c&&(this.a2=c,this.jh())};b.prototype.jh=
function(){this.Ry?this.LN(g.oa):this.Z1&&this.a2?this.LN(g.qc):this.Z1?this.LN(g.Fb):this.a2?this.LN(g.ea):this.LN(g.Ee)};b.prototype.D=function(c,d,f,l){this.nD[d]||(this.nD[d]={});this.m(c,l);this.nD[d][f]=c};b.prototype.LN=function(c,d){d===void 0&&(d=!1);if(d)this.jya=c;else if(this.jya!=void 0)return;if(this.yz!=c){if(d=this.nD[this.yz])for(var f in d)(this.A[f]||(this.A[f]={})).i=!0;this.yz=c;if(d=this.nD[this.yz])for(f in d)(this.A[f]||(this.A[f]={})).i=!0;this.Tf()}};b.prototype.xa=function(c){if(typeof c===
"string")this.set(c,void 0);else{var d=c;for(c in d)this.set(c,d[c])}};b.prototype.set=function(c,d){var f=this.A[c];f?(d==void 0&&(d=f.d),this.get(c)!==d&&(c=="state"&&this.LN(d,!0),e.prototype.set.call(this,c,d),f.i=!0,this.Tf())):e.prototype.set.call(this,c,d)};b.prototype.get=function(c,d){switch(c){case "actualWidth":return this.nb();case "actualHeight":return this.Mb();default:var f=e.prototype.get.call(this,c);f===void 0&&((c=this.A[c])&&(f=c.d),f===void 0&&(f=d));return f}};b.prototype.bda=
function(c){for(var d=0;d<c.length;d++)if(this.S(c[d]))return!0;return!1};b.prototype.S=function(c){return(this.A[c]||{}).i?!0:this.yz!==void 0?(c=this.nD[this.yz][c],!!(this.A[c]||{}).i):!1};b.prototype.yD=function(c){(this.A[c]||(this.A[c]={})).i=!0;this.Tf()};b.prototype.$=function(c){(this.A[c]||(this.A[c]={})).i=!1;this.yz!=void 0&&(c=this.nD[this.yz][c])&&((this.A[c]||(this.A[c]={})).i=!1)};b.prototype.G=function(){for(var c=0;c<arguments.length;c++);var d;for(c=0;c<arguments.length;c++){for(var f=
arguments[c],l=this.yz;l;){if(d=this.nD[l][f])if(d=this.get(d),d!=void 0&&d!=null)return d;l=this.DFa[l]}d=this.get(f);if(d!=void 0&&d!=null)return d}};b.prototype.Jka=function(c){c.source.h(h.Ub,this.Jka,this);this.o(new n(h.ZQ))};b.prototype.uga=function(c){c.source.h(h.Ub,this.uga,this);this.o(new n(h.aL))};b.prototype.Vx=function(){return this.get("ariaLabel")||this.get("toolTip")};b.prototype.jb=function(){if(this.gya)this.gya=!1;else if(this.S("visible")){var c=this.G("visible"),d=this.get(c?
"hideEffect":"showEffect");d&&d.vP(this)&&(d.h(h.Ub,c?this.uga:this.Jka,this),d.end());(d=this.get(c?"showEffect":"hideEffect"))?d.vP(this)||(this.$("visible"),d.bind(h.Ub,c?this.Jka:this.uga,this),d.play(this)):this.o(new n(c?h.ZQ:h.aL))}this.S("visible")&&(this.kg(this.G("visible")),this.$("visible"));this.S("includeInLayout")&&(this.L8a(this.G("includeInLayout")),this.$("includeInLayout"));this.S("left")&&(d=this.G("left"),c=b.Cp(d),d=c===void 0?d:void 0,this.V8a(c),this.O8a(d),this.$("left"));
this.S("top")&&(d=this.G("top"),c=b.Cp(d),d=c===void 0?d:void 0,this.X8a(c),this.o9a(d),this.$("top"));this.S("right")&&(d=this.G("right"),c=b.Cp(d),d=c===void 0?d:void 0,this.W8a(c),this.$8a(d),this.$("right"));this.S("bottom")&&(d=this.G("bottom"),c=b.Cp(d),d=c===void 0?d:void 0,this.T8a(c),this.g8a(d),this.$("bottom"));this.S("centerX")&&(this.k8a(this.G("centerX")),this.$("centerX"));this.S("centerY")&&(this.l8a(this.G("centerY")),this.$("centerY"));this.S("width")&&(d=this.G("width"),c=b.Cp(d),
d=c===void 0?d:void 0,this.Y8a(c),this.w8a(d),this.$("width"));this.S("height")&&(d=this.G("height"),c=b.Cp(d),d=c===void 0?d:void 0,this.U8a(c),this.r8a(d),this.$("height"));this.S("minWidth")&&(d=this.G("minWidth"),this.v8a(d),this.$("minWidth"));this.S("minHeight")&&(d=this.G("minHeight"),this.u8a(d),this.$("minHeight"));this.S("maxWidth")&&(d=this.G("maxWidth"),this.t8a(d),this.$("maxWidth"));this.S("maxHeight")&&(d=this.G("maxHeight"),this.s8a(d),this.$("maxHeight"));this.S("paddingLeft")&&(this.bFa(this.G("paddingLeft")),
this.$("paddingLeft"));this.S("paddingTop")&&(this.dFa(this.G("paddingTop")),this.$("paddingTop"));this.S("paddingRight")&&(this.cFa(this.G("paddingRight")),this.$("paddingRight"));this.S("paddingBottom")&&(this.aFa(this.G("paddingBottom")),this.$("paddingBottom"));c=!1;this.S("borderRadius")&&(this.$("borderRadius"),c=!0);d=!1;this.S("borderLeftRadius")&&(this.$("borderLeftRadius"),d=!0);var f=!1;this.S("borderTopRadius")&&(this.$("borderTopRadius"),f=!0);var l=!1;this.S("borderRightRadius")&&(this.$("borderRightRadius"),
l=!0);var p=!1;this.S("borderBottomRadius")&&(this.$("borderBottomRadius"),p=!0);if(this.S("borderTopLeftRadius")||f||d||c)this.d8a(this.G("borderTopLeftRadius","borderLeftRadius","borderTopRadius","borderRadius")),this.$("borderTopLeftRadius");if(this.S("borderTopRightRadius")||f||l||c)this.e8a(this.G("borderTopRightRadius","borderRightRadius","borderTopRadius","borderRadius")),this.$("borderTopRightRadius");if(this.S("borderBottomLeftRadius")||p||d||c)this.W7a(this.G("borderBottomLeftRadius","borderLeftRadius",
"borderBottomRadius","borderRadius")),this.$("borderBottomLeftRadius");if(this.S("borderBottomRightRadius")||p||l||c)this.X7a(this.G("borderBottomRightRadius","borderRightRadius","borderBottomRadius","borderRadius")),this.$("borderBottomRightRadius");c=!1;this.S("borderSize")&&(this.$("borderSize"),c=!0);if(this.S("borderLeftSize")||c)this.$7a(this.G("borderLeftSize","borderSize")),this.$("borderLeftSize");if(this.S("borderTopSize")||c)this.f8a(this.G("borderTopSize","borderSize")),this.$("borderTopSize");
if(this.S("borderRightSize")||c)this.b8a(this.G("borderRightSize","borderSize")),this.$("borderRightSize");if(this.S("borderBottomSize")||c)this.Y7a(this.G("borderBottomSize","borderSize")),this.$("borderBottomSize");c=!1;this.S("borderColor")&&(this.$("borderColor"),c=!0);if(this.S("borderLeftColor")||c)this.Z7a(this.G("borderLeftColor","borderColor")),this.$("borderLeftColor");if(this.S("borderTopColor")||c)this.c8a(this.G("borderTopColor","borderColor")),this.$("borderTopColor");if(this.S("borderRightColor")||
c)this.a8a(this.G("borderRightColor","borderColor")),this.$("borderRightColor");if(this.S("borderBottomColor")||c)this.V7a(this.G("borderBottomColor","borderColor")),this.$("borderBottomColor");this.S("shadow")&&(this.g5(this.G("shadow")),this.$("shadow"));this.S("shadowHorizontalLength")&&(this.f9a(this.G("shadowHorizontalLength")),this.$("shadowHorizontalLength"));this.S("shadowVerticalLength")&&(this.i9a(this.G("shadowVerticalLength")),this.$("shadowVerticalLength"));this.S("shadowBlurRadius")&&
(this.d9a(this.G("shadowBlurRadius")),this.$("shadowBlurRadius"));this.S("shadowSpread")&&(this.h9a(this.G("shadowSpread")),this.$("shadowSpread"));this.S("shadowColor")&&(this.e9a(this.G("shadowColor")),this.$("shadowColor"));this.S("tabIndex")&&(this.l9a(this.G("tabIndex")),this.$("tabIndex"));c=!1;this.S("opacity")&&(this.Zn(this.G("opacity")),this.$("opacity"),c=!0);if(this.S("shadowOpacity")||c)this.g9a(this.G("shadowOpacity","opacity")),this.$("shadowOpacity");this.S("backgroundBlur")&&(this.N7a(this.G("backgroundBlur")),
this.$("backgroundBlur"));this.S("backgroundOpacity")&&(this.IEa(this.G("backgroundOpacity")),this.$("backgroundOpacity"));this.S("backgroundColor")&&(this.HEa(this.G("backgroundColor")),this.$("backgroundColor"));this.S("backgroundColorRatios")&&(this.P7a(this.G("backgroundColorRatios")),this.$("backgroundColorRatios"));this.S("backgroundColorDirection")&&(this.O7a(this.G("backgroundColorDirection")),this.$("backgroundColorDirection"));this.S("backgroundImageUrl")&&(this.R7a(this.G("backgroundImageUrl")),
this.$("backgroundImageUrl"));this.S("ariaRole")&&(this.M7a(this.G("ariaRole")),this.$("ariaRole"));this.L7a(this.Vx());e.prototype.jb.call(this)};b.Cp=function(c){if(typeof c==="string"&&(c=c.match(/^\s*([+-]?\d+\.?\d*)\s*%\s*$/))&&c.length>=2)return parseFloat(c[1])};b.ad={ariaLabel:void 0,ariaRole:void 0,visible:!0,includeInLayout:!0,state:void 0,left:void 0,right:void 0,top:void 0,bottom:void 0,centerX:void 0,centerY:void 0,width:void 0,height:void 0,minWidth:void 0,minHeight:void 0,maxWidth:void 0,
maxHeight:void 0,actualWidth:void 0,actualHeight:void 0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,opacity:1,borderRadius:0,borderTopRadius:void 0,borderBottomRadius:void 0,borderLeftRadius:void 0,borderRightRadius:void 0,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderBottomLeftRadius:void 0,borderBottomRightRadius:void 0,borderSize:0,borderLeftSize:void 0,borderTopSize:void 0,borderRightSize:void 0,borderBottomSize:void 0,borderColor:void 0,borderLeftColor:void 0,borderTopColor:void 0,
borderRightColor:void 0,borderBottomColor:void 0,shadow:!1,shadowHorizontalLength:0,shadowVerticalLength:3,shadowBlurRadius:6,shadowSpread:0,shadowColor:"#000000",shadowOpacity:void 0,tabIndex:void 0,backgroundBlur:0,backgroundOpacity:1,backgroundColor:void 0,backgroundColorRatios:void 0,backgroundColorDirection:void 0,backgroundImageUrl:void 0,hideEffect:void 0,showEffect:void 0};return b}(k)});
define("tdv/view/core/UIComponent",["require","exports","tdv/constants/EventName","tdv/view/constants/State","tdv/view/core/UICustomizable"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.gf("UIComponent");b.set("propagateClick",!0);return b}P(e,k);e.prototype.Pb=function(){this.Jl(e.ad)};e.prototype.cwa=function(){this.hFa(!0)};e.prototype.bwa=function(){this.hFa(!1)};e.prototype.$va=function(){this.KN(!0)};e.prototype.awa=function(){this.KN(!1)};e.prototype.KS=function(){this.yD("interactionEnabled");
k.prototype.KS.call(this)};e.prototype.jb=function(){this.S("autoRolledOver")&&(this.h(h.uc,this.cwa,this),this.h(h.Eb,this.bwa,this),this.G("autoRolledOver")&&(this.bind(h.uc,this.cwa,this,!1),this.bind(h.Eb,this.bwa,this,!1)),this.$("autoRolledOver"));this.S("autoPressed")&&(this.h(h.Sa,this.$va,this),this.h(h.$a,this.awa,this),this.G("autoPressed")&&(this.bind(h.Sa,this.$va,this,!1),this.bind(h.$a,this.awa,this,!1)),this.$("autoPressed"));var b=!1;this.S("contentOpaque")&&(b=!0,this.$("contentOpaque"));
this.S("inheritedInteractionEnabled")&&(b=!0,this.$("inheritedInteractionEnabled"));this.S("interactionEnabled")&&(b=!0,this.$("interactionEnabled"));if(this.S("backgroundOpacity")||this.S("backgroundColor")||this.S("inView"))b=!0;this.S("inView")&&(b=!0);g.prototype.jb.call(this);if(b){var c=!!(this.u.pm>0&&(this.u.vk.length>0||this.u.dJ>0)),d=this.G("contentOpaque"),f=this.G("inheritedInteractionEnabled"),l=this.G("interactionEnabled"),p=this.G("inView");this.uI(f&&l&&(d||c)&&p)}if(b||this.S("cursor")||
this.S("inheritedCursor"))this.$("cursor"),this.$("inheritedCursor"),this.zM.sLa()?this.wD(this.G("cursor")):this.wD(this.G("inheritedCursor"))};e.prototype.pu=function(){this.q6.update(this.u);k.prototype.pu.call(this)};e.prototype.uI=function(b){this.zM.qRa(b)};e.prototype.log=function(b){if(b){b=[];for(var c=this;c;)b.push(c),c=c.getParent();console.log(b.map(function(d){return d.cs}))}else console.log(this.cs)};e.ad=Object.assign({},g.ad,{autoRolledOver:!1,autoPressed:!1,contentOpaque:!0,cursor:void 0,
inView:void 0,inheritedCursor:void 0,inheritedInteractionEnabled:!0,interactionEnabled:!0,rollOverOpacity:[n.ea,"opacity"],rollOverShadow:[n.ea,"shadow"],toolTipFollowMouse:!1});return e}(g)});
define("tdv/view/effects/Effect","require tdv/utils tdv/binding/Bindable tdv/constants/EventName tdv/events/Event tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable");a("tdv/constants/EventName");var n=a("tdv/events/Event"),g=a("tdv/view/util/Animation"),k=a("tdv/view/util/Ease"),e=a("tdv/view/util/EaseDimension"),b={},c=m.extend(h,function(){h.call(this);this.I="stopped";this.ac=void 0;this.Oq=[];this.set("easing",
"linear");this.set("duration",1E3);this.set("loop",!1);this.set("animationDirection","normal")});c.prototype.play=function(d){d||(d=b);this.vP(d)||(this.I=="stopped"||this.Oq.indexOf(d)<0?(this.I="playing",this.Oq.push(d),this.dh=0,this.ac=Math.max(this.get("duration",1E3),1),this.bh=new k(this.get("easing","linear"),[new e("pos",0,1)],this.ac),this.bh.setTime(this.dh),this.ON(),this.Jv(),this.JU()):this.I="playing")};c.prototype.reverse=function(d){d||(d=b);this.Khb(d)||(this.I=="stopped"||this.Oq.indexOf(d)<
0?(this.I="playingReverse",this.Oq.push(d),this.dh=this.ac=Math.max(this.get("duration",1E3),0),this.bh=new k(this.get("easing","linear"),[new e("pos",0,1)],this.ac),this.bh.setTime(this.dh),this.ON(),this.Jv(),this.JU()):this.I="playingReverse")};c.prototype.stop=function(){this.I!="stopped"&&(this.I="stopped",this.dh!==0&&(this.dh=0,this.bh.setTime(this.dh),this.Jv(),this.JU()))};c.prototype.end=function(){this.I!="stopped"&&(this.dh=this.ac,this.bh.setTime(this.dh),this.Jv(),this.JU())};c.prototype.cancel=
function(){this.I="stopped";this.dh=0;this.Oq=[]};c.prototype.vP=function(d){return this.I=="playing"&&this.Oq.indexOf(d)>=0};c.prototype.Khb=function(d){return this.I=="playingReverse"&&this.Oq.indexOf(d)>=0};c.prototype.sq=function(d){this.I!="stopped"&&(this.dh=this.I=="playing"?Math.min(this.ac,this.dh+d):Math.max(0,this.dh-d),this.bh.setTime(this.dh),this.Jv(),this.JU())};c.prototype.vm=function(){return this.bh&&this.bh.ob("pos")||0};c.prototype.BC=function(d){if(this.Oq)for(var f=0;f<this.Oq.length;f++)d.call(this,
this.Oq[f],f)};c.prototype.ON=function(){this.o(new n(this.I=="playingReverse"?c.NUa:c.PUa))};c.prototype.Jv=function(){this.o(new n(c.fba))};c.prototype.MN=function(){this.o(new n(c.Cl))};c.prototype.NN=function(){this.o(new n(c.xx))};c.prototype.JU=function(){this.I=="playingReverse"&&this.dh<=0?(this.dh=0,this.NN(),this.Oq=[],this.I!="stopped"&&(this.I="stopped",this.get("loop")&&this.play())):this.I=="playing"&&this.dh>=this.ac?(this.dh=this.ac,this.MN(),this.Oq=[],this.I!="stopped"&&(this.I=
"stopped",this.get("animationDirection")=="alternate"?this.reverse():this.get("loop")&&this.play())):this.I!="stopped"&&g.requestFrame(this.sq,this)};c.PUa="start";c.fba="frame";c.Cl="end";c.NUa="reverseStart";c.xx="reverseEnd";return c});
define("tdv/view/effects/FadeEffect",["require","tdv/utils","tdv/view/effects/Effect"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/Effect");a=m.extend(h,function(){h.call(this);this.Uca=this.Sca=null});a.prototype.ON=function(){h.prototype.ON.call(this);this.Sca=[];this.Uca=[];this.BC(function(n){this.Sca.push(this.get("alphaFrom",n.pw()));this.Uca.push(this.get("alphaTo",n.pw()))});this.C4()};a.prototype.Jv=function(){h.prototype.Jv.call(this);this.C4()};a.prototype.C4=function(){this.BC(function(n,
g){var k=this.Sca[g];g=k+(this.Uca[g]-k)*this.vm();!(n.pw()>0&&n.u.visible)&&g>0?(n.Zn(0),n.kg(!0),n.Zn(g)):g==0?(n.kg(!1),n.Zn(1)):n.Zn(g)})};a.prototype.MN=function(){this.C4();h.prototype.MN.call(this)};a.prototype.NN=function(){this.C4();h.prototype.NN.call(this)};return a});
define("tdv/view/effects/FadeInEffect",["require","tdv/utils","tdv/view/effects/FadeEffect"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/FadeEffect");return m.extend(h,function(){h.call(this);this.set("alphaFrom",0);this.set("alphaTo",1)})});define("tdv/view/effects/FadeOutEffect",["require","tdv/utils","tdv/view/effects/FadeEffect"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/FadeEffect");return m.extend(h,function(){h.call(this);this.set("alphaFrom",1);this.set("alphaTo",0)})});
define("tdv/player/view/UserInteractionWindow","require exports tdv/view/util/Assets tdv/constants/EventName tdv/player/view/util/Device tdv/view/core/UIComponent tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect".split(" "),function(a,m,h,n,g,k,e,b){a=function(q){function r(){var t=q.call(this)||this;t.gf("UserInteractionWindow");t.Cc=null;t.Cv=[];var u=new e;u.set("duration",500);u.set("easing","cubic_in");var v=new b;v.set("duration",500);v.set("easing","cubic_out");t.xa({contentOpaque:!0,
left:0,top:0,right:0,bottom:0,hideEffect:v,showEffect:u,visible:!1});t.bind(n.Rb,t.wma,t,!0);t.bind(n.ma,t.qbb,t,!0);return t}P(r,q);r.prototype.wma=function(){this.Cc&&this.Cc.setSize(this.Xh(),this.Wh())};r.prototype.qbb=function(){var t=this.Cv.slice();this.Cv=[];this.g6();t.forEach(function(u){u.Hn.call(u.context)})};r.prototype.Kb=function(){q.prototype.Kb.call(this);if(!this.Cc){this.Cc=new p;this.Cc.setSize(this.Xh(),this.Wh());this.Cc.kg(!0);var t=this.Cc.cc();t.style.position="absolute";
t.style.left="0";t.style.top="0";t.style.right="0";t.style.bottom="0";t.style.overflow="hidden";this.wa().uk(t);this.g6()}};r.prototype.bs=function(){q.prototype.bs.call(this);this.getParent().bind(n.Rb,this.wma,this,!0);r.oXa(this)};r.prototype.np=function(){this.getParent().h(n.Rb,this.wma,this,!0);q.prototype.np.call(this);r.b7a(this)};r.prototype.Vjb=function(t){this.rD(f,t)};r.prototype.EY=function(t){this.rD(d,t)};r.prototype.rD=function(t,u){this.Cv.push(new c(t,u));this.Cv.sort(function(v,
w){return l[v.reason]-l[w.reason]});this.g6()};r.prototype.Pcb=function(t){this.cancel(f,t)};r.prototype.Ncb=function(){var t;t===void 0&&(t=void 0);this.cancel(d,t)};r.prototype.cancel=function(t,u){t=this.B2a(t,u);t>=0&&this.m7a(t)};r.prototype.B2a=function(t,u){for(var v=0;v<this.Cv.length;v++){var w=this.Cv[v];if(w.reason==t&&w.Hn==u)return v}return-1};r.prototype.g6=function(){if(this.Cc){var t=this.N2a();if(t){switch(t.reason){case d:this.Cc.nra(p.Bta);break;case f:this.Cc.nra(p.Oba)}this.set("visible",
!0)}else this.set("visible",!1)}};r.prototype.m7a=function(t){this.Cv.splice(t,1);t==this.Cv.length&&this.g6()};r.prototype.N2a=function(){return this.Cv.length>0?this.Cv[0]:null};r.oXa=function(t){r.zd.push(t);r.Yia.forEach(function(u){r.Lza(t,u)});r.Yia=[]};r.b7a=function(t){r.zd.splice(r.zd.indexOf(t),1)};r.ready=function(){return r.zd.length>0};r.EY=function(t){r.zd.length?r.zd.forEach(function(u){r.Lza(u,t)}):r.Yia.push(t)};r.Lza=function(t,u){t.EY(function(){r.zd.forEach(function(v){v!=t&&v.Ncb()});
u()})};r.zd=[];r.Yia=[];return r}(k);var c=function(){return function(q,r){this.reason=q;this.Hn=r;this.context=this}}(),d="vr",f="play",l={};l[d]=0;l[f]=1;var p=function(){function q(){this.Ld=!1;this.LV=null;this.Ha=this.Pa=100;this.zga=this.Cj=void 0;this.Aga=100;this.qa=document.createElement("div");this.qa.style.opacity="0";this.qa.style.display="none";this.qa.style.transition="opacity 0.3s";this.qa.addEventListener("transitionend",this.sla.bind(this,!1));this.ae=document.createElement("div");
this.XQa(!0);this.ae.style.position="absolute";this.ae.style.left="0";this.ae.style.top="0";this.ae.style.right="0";this.ae.style.bottom="0";this.qa.appendChild(this.ae);this.Id=document.createElement("img");this.Id.style.cursor="pointer";this.Id.style.position="absolute";this.Id.style.left="50%";this.Id.style.top="50%";this.Id.style.transform="translate(-50%, -50%)";this.qa.appendChild(this.Id)}q.prototype.cc=function(){return this.qa};q.prototype.setSize=function(r,t){if(this.Pa!==r||this.Ha!==
t)this.Pa=r,this.Ha=t,this.nHa()};q.prototype.XQa=function(r){this.ae.style.backdropFilter=r?"blur(8px)":"none"};q.prototype.kg=function(r){this.Ld!=r&&(this.Ld=r,this.LV&&(clearTimeout(this.LV),this.LV=null),this.Ld?(this.qa.style.display="block",this.qa.style.opacity="0",this.LV=setTimeout(function(){this.LV=null;this.qa.style.opacity="1"}.bind(this),30)):this.qa.style.opacity="0")};q.prototype.nra=function(r){this.Cj!=r&&(this.Cj=r,this.Bab())};q.prototype.sla=function(){this.Ld||(this.qa.style.display=
"none")};q.prototype.Bab=function(){switch(this.Cj){case q.Oba:this.zga=h.Fx;this.Aga=h.jL;break;case q.Bta:this.zga=h.Xp,this.Aga=h.vWa}this.Id.src=this.zga||"";this.nHa()};q.prototype.nHa=function(){g.ub()?(this.Id.style.maxWidth=Math.round(this.Pa*.5)+"px",this.Id.style.width="20vmin"):(this.Id.style.maxWidth=Math.round(this.Pa*.33)+"px",this.Id.style.width=this.Aga+"px")};q.Oba="play";q.Bta="vr";return q}();a.mua=p;return a});
define("tdv/player/view/util/xr/Hash",["require","exports"],function(){return function(){function a(){}a.addParameter=function(m){this.removeParameter(m);var h=this.toArray();h.push(m);this.RSa(h)};a.removeParameter=function(m){var h=this.toArray().filter(function(n){return n!=m});this.RSa(h)};a.toArray=function(){var m=window.location.hash.substring(1);return m.length?m.split("&"):[]};a.RSa=function(m){window.location.hash="#"+(m.length?m.join("&"):"")};return a}()});
define("tdv/player/view/util/xr/VRPreconditionsChecker","require exports tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/InfoWindow tdv/view/util/Fullscreen tdv/view/util/UserInitiatedAction tdv/player/view/UserInteractionWindow tdv/player/view/util/xr/Hash tdv/player/view/util/xr/pointer/SelectionMode tdv/player/view/util/xr/SessionMode tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){var p=!1;e.wait(function(){setTimeout(function(){p=!0},10)});
return function(){function q(){}q.kB=function(r,t){this.tKa(r,t)};q.tKa=function(r,t){function u(){w.tKa(r,t)}function v(){w.imb(r,t)}var w=this;this.XR.wP?n.disabled?g.zta.show(function(){n.Qqa(u)}):k.enabled()||!e.B8()?(k.sm(),b.EY(u)):v():this.XR.h$?v():h.iE()?v():h.Dc()==h.qx||h.Dc()==h.su?p?v():e.B8()?setTimeout(v,10):b.EY(function(){setTimeout(v,10)}):e.B8()?v():b.EY(v)};q.imb=function(r,t){function u(){v.jkb(r,t)}var v=this;h.Dc()==h.RK?(c.removeParameter("vr"),g.oUa.show(u,function(){c.addParameter("vr")}.bind(this))):
h.Dc()==h.FQ?g.Uua.show(u):h.Dc()==h.ZZ?g.Uua.show():r==f.Np&&h.ub()&&!h.kf()?g.Tba.show(u):u()};q.jkb=function(r,t){function u(){w.XR.Zqa=d.$Ua;t()}function v(){w.XR.Zqa=d.RF;t()}var w=this;r==f.Np?u():!h.ub()||h.kf()?v():l.getQueryParameter("cardboard_version")=="1"?v():l.getQueryParameter("cardboard_version")=="2"?u():g.Qaa.show(u,v)};return q}()});
define("tdv/view/util/FullWindow",["require","exports","tdv/view/util/Fullscreen"],function(a,m,h){function n(){d==document.body&&(k.style.height=window.innerHeight+"px")}function g(p,q){var r={},t=p.style,u;for(u in q)r[u]=t[u];f.push({el:p,css:r});for(u in q)t[u]=q[u]}var k=document.createElement("div");k.style.position="fixed";k.style.bottom="0";k.style.left="0";k.style.height="100vh";k.style.width="100vw";var e=document.createElement("div"),b=null,c=null,d=null,f=[],l=null;return function(){function p(q){this.qa=
q}p.prototype.xt=function(){this.enabled()||this.toggle()};p.prototype.sm=function(){this.enabled()&&this.toggle()};p.prototype.toggle=function(){this.enabled()?p.cancel():p.request(this.qa)};p.prototype.enabled=function(){return p.enabled(this.qa)};p.request=function(q){if(q!==b){p.cancel();b=q;d=h.fullscreenElement()||document.body;c=q;c.parentElement.insertBefore(e,c);k.appendChild(c);for(q=0;q<d.children.length;q++)g(d.children[q],{visibility:"hidden"});g(c,{position:"absolute",left:0,top:0,width:"100%",
height:"100%"});d==document.body?g(k,{position:"fixed",left:0,top:"",right:"",bottom:0,height:"100vh",width:"100vw",margin:0,padding:0}):g(k,{position:"absolute",left:0,top:0,right:"",bottom:"",width:"100%",height:"100%",margin:0,padding:0});d.appendChild(k);n();l=setInterval(n,300)}};p.cancel=function(){if(b){k.parentElement.removeChild(k);e.parentElement.insertBefore(c,e);for(e.parentElement.removeChild(e);f.length;){var q=f.pop(),r=q.el.style;q=q.css;for(var t in q)r[t]=q[t]}d=c=b=null;f=[];clearInterval(l)}};
p.enabled=function(q){return b==q};return p}()});
define("tdv/view/util/IOSFullscreen","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/l10n tdv/view/util/Assets".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/l10n");a=a("tdv/view/util/Assets");var e=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+a.mo+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">'].join("\n"),
b=e+['<img style="width:22vmin" src="'+a.B_+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+k("rotate-device")+"</div>"].join("\n")+"</div>\n</div>",c=e+['<img style="width:13vmin; vertical-align:middle;" src="'+a.kWa+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; text-align:left; display:inline-block; vertical-align:middle; margin:5vmin 0 0 2vmin;">Please, swipe up to<br>enter Fullscreen Mode</div>'].join("\n")+
"</div>\n</div>";m=m.extend(g,function(){g.call(this);this.Ks=this.sC=this.vC=this.cT=this.dT=this.oha=this.pha=void 0;this.N1=!1;this.tD=this.mja=this.nha=this.Nc=null;this.mya=[];this.yM=this.Ts=!1;this.kd=this.kd.bind(this)});m.prototype.request=function(){this.Ts||(this.Ts=!0,this.j_a(),window.addEventListener("resize",this.kd),document.body.appendChild(this.Nc),document.body.appendChild(this.tD),this.j$a=document.documentElement.style.overflow,this.i$a=document.body.style.overflow,document.documentElement.style.overflow=
"auto",document.body.style.overflow="auto",this.nU())};m.prototype.cancel=function(){this.Ts&&(this.Ts=!1,window.removeEventListener("resize",this.kd),document.body.style.overflow=this.i$a,document.documentElement.style.overflow=this.j$a,document.body.removeChild(this.Nc),document.body.removeChild(this.tD),this.SEa(!1))};m.prototype.enabled=function(){return this.N1};m.prototype.j_a=function(){this.Nc||(this.Nc=this.D0({position:"fixed",top:0,left:0,zIndex:9999998},!0),this.Nc.id="tdvminuictr",this.mja=
this.D0({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,b),this.Nc.appendChild(this.mja),this.nha=this.D0({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,c),this.Nc.appendChild(this.nha),this.tD=this.D0({position:"absolute",top:0,left:0,right:0,height:"999999999vmax",zIndex:9999999},!1),this.tD.id="tdvminuiscrl",this.tD.addEventListener("touchend",this.kd))};m.prototype.D0=function(d,f,l){var p=document.createElement("div");this.fV(p,d);l!==
void 0&&this.H8a(p,l);f&&this.mya.push(p);return p};m.prototype.kd=function(){[0,250,1E3,2E3].forEach(function(d){setTimeout(this.mU.bind(this),d)}.bind(this))};m.prototype.mU=function(){this.vC==window.innerWidth&&this.sC==window.innerHeight||this.nU()};m.prototype.nU=function(){this.vC=window.innerWidth;this.sC=window.innerHeight;this.Ks=this.vC>this.sC?"landscape":"portrait";if(this.Ks=="landscape"){this.pha&&this.oha&&this.a4a(this.pha,this.oha)&&(!this.dT&&!this.cT||this.b4a(this.dT,this.cT))&&
(this.dT=this.vC,this.cT=this.sC);this.V3a()&&(this.dT=this.vC,this.cT=this.sC);this.pha=this.vC;this.oha=this.sC;var d=this.dT==this.vC&&this.cT==this.sC}else d=!1;this.mya.forEach(function(q){q.style.height=this.sC+"px";q.style.width=this.vC+"px"}.bind(this));var f=this.Ts&&this.Ks=="portrait",l=this.Ts&&this.Ks=="landscape"&&!d,p=this.Ts&&this.Ks=="landscape";this.fV(this.Nc,{display:f||l?"block":"none"});this.fV(this.mja,{display:f?"block":"none"});this.fV(this.nha,{display:l?"block":"none"});
this.fV(this.tD,{display:p?"block":"none",right:l?0:"99.9%"});this.SEa(d)};m.prototype.SEa=function(d){this.Z4!=null&&(clearTimeout(this.Z4),this.Z4=null);this.N1!=d&&(this.Z4=setTimeout(function(){this.Z4=null;(this.N1=d)?this.o(new n(h.Dr)):this.o(new n(h.Ub));this.o(new n(h.V))}.bind(this),d?1E3:0))};m.prototype.V3a=function(){var d=window.innerWidth,f=window.innerHeight,l=Infinity;[[480,320],[960,640],[1136,640],[1334,750],[1920,1080],[2001,1125],[2048,1536],[2172,1125],[2208,1242],[2732,2048],
[2436,1125]].forEach(function(p){l=Math.min(l,Math.abs(100-d*p[1]*100/(f*p[0])))});return l<=1?!0:!1};m.prototype.a4a=function(d,f){return d*window.innerHeight>f*window.innerWidth};m.prototype.b4a=function(d,f){return d*window.innerHeight>=f*window.innerWidth};m.prototype.fV=function(d,f){for(var l in f)d.style[l]=f[l]};m.prototype.H8a=function(d,f){d.innerHTML=f};return new m});
define("tdv/view/util/KeepAwake",["require","exports"],function(){return function(){function a(){}a.enable=function(){this.wakeLock===null&&navigator.wakeLock&&navigator.wakeLock.request("screen").then(function(m){this.wakeLock=m}.bind(this))};a.disable=function(){this.wakeLock!==null&&(this.wakeLock.release(),this.wakeLock=null)};a.wakeLock=null;return a}()});
define("tdv/view/util/LandscapeAnimation",["require","exports","tdv/player/l10n","tdv/view/util/Assets"],function(a,m,h,n){return new (function(){function g(){this.container=null;this.enabled=!1;this.kd=this.kd.bind(this);this.mU=this.mU.bind(this)}g.prototype.TL=function(){this.container||(this.container=document.createElement("div"),this.container.style.position="fixed",this.container.style.zIndex="1000000",this.container.style.left="0",this.container.style.top="0",this.container.style.margin="0",
this.container.style.padding="0",this.container.style.height="100%",this.container.style.width="100%",this.container.style.backgroundColor="rgba(255, 255, 255, 0.99)",this.container.innerHTML=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+n.CARDBOARD+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">','<img style="width:22vmin" src="'+
n.ROTATE+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+h("rotate-device")+"</div>","</div>\n</div>"].join("\n"))};g.prototype.show=function(k){this.enabled||(this.enabled=!0,this.TL(),k.appendChild(this.container),window.addEventListener("resize",this.kd),this.nU())};g.prototype.oe=function(){this.enabled&&(this.enabled=!1,window.removeEventListener("resize",this.kd),this.container.parentElement.removeChild(this.container))};
g.prototype.kd=function(){[0,250,1E3,2E3].forEach(function(k){setTimeout(this.mU,k)}.bind(this))};g.prototype.mU=function(){this.WJa==window.innerWidth&&this.VJa==window.innerHeight||this.nU()};g.prototype.nU=function(){this.WJa=window.innerWidth;this.VJa=window.innerHeight;this.orientation=this.WJa>this.VJa?"landscape":"portrait";this.container.style.display=this.orientation!="landscape"?"block":"none"};return g}())});
define("tdv/player/view/util/xr/XRSessionManager","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/InfoWindow tdv/player/view/util/xr/Hash tdv/player/view/util/xr/SessionMode tdv/view/util/Fullscreen tdv/view/util/FullWindow tdv/view/util/IOSFullscreen tdv/view/util/KeepAwake tdv/view/util/LandscapeAnimation tdv/view/util/Animation three.mod".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q){function r(w,x){w?setTimeout(x,200):x()}var t=new q.Vector3,u=new q.Quaternion,
v=new q.Vector3;return function(){function w(){}w.request=function(x,y,z){this.XR.isPresenting||this.XR.TX||(this.Dm=x,this.HY=y,this.c$=z,this.Dm&&(this.XR.TX=!0,this.lib(),this.requestSession().then(function(A){this.Qib(A);this.Dm.xr.setReferenceSpaceType("local-floor");this.Dm.xr.setFoveation(this.c$.TKa);return this.Dm.xr.setSession(A)}.bind(this)).then(function(){this.XR.referenceSpace=this.Dm.xr.getReferenceSpace();this.XR.TX=!1;this.Rib()}.bind(this)).catch(function(A){console.error(A);this.XR.TX=
!1;this.Pib()}.bind(this))))};w.end=function(){this.XR.session&&this.XR.session.end()};w.requestSession=function(){return navigator.xr.requestSession(this.HY,this.agb())};w.agb=function(){var x,y=["local-floor","bounded-floor"];((x=this.Dm)===null||x===void 0?0:x.capabilities.isWebGL2)&&y.push("layers");this.HY==e.Np&&(y=y.concat(["anchors","hit-test"]));return{optionalFeatures:y}};w.lib=function(){p.jZ(!0);this.Kkb(this.Dm);this.gmb()};w.Qib=function(x){this.jqa||(this.jqa=this.Oib.bind(this));this.kqa||
(this.kqa=this.Sib.bind(this));x.addEventListener("end",w.jqa);x.addEventListener("select",w.kqa)};w.Pib=function(){p.jZ(!1);this.ESa()};w.Rib=function(){var x;(x=this.Dm)===null||x===void 0||x.xr.setAnimationLoop(this.Bp.bind(this));p.JRa(this.requestFrame.bind(this),this.Qcb.bind(this));p.jZ(!1);this.IRa(this.Dm,this.HY,this.c$);this.c$=this.HY=this.Dm=null;this.XR.Em==e.Xp&&(n.ub()?b.enabled()&&n.Dc()!=n.GQ&&l.show(b.fullscreenElement()):g.tta.show(this.XR.sm.bind(this.XR)))};w.Oib=function(){var x;
this.XR.session&&(this.XR.session.removeEventListener("end",w.jqa),this.XR.session.removeEventListener("select",w.kqa),this.XR.anchors=[],this.XR.YI.clear(),(x=this.Dm)===null||x===void 0||x.xr.setAnimationLoop(null),p.Zjb(),this.ESa(),this.IRa(null,null,null))};w.Sib=function(){this.XR.M.o(h.Xr)};w.IRa=function(x,y,z){this.XR.Uf!==x&&(window.XR=this.XR,this.XR.Uf=x,this.XR.Em=y,this.XR.Al=z,this.XR.session=x?x.xr.getSession():null,this.XR.isPresenting=!!x,this.XR.YA=x?this.XR.Oqa.get(x)||null:null,
this.XR.Nw=x?this.XR.Nqa.get(x)||null:null,this.rTa(),r(!this.XR.isPresenting,function(){this.XR.M.o(h.V)}.bind(this)))};w.Kkb=function(x){var y=void 0;n.KJ()?y=1.2545454545454546:n.kf()?y=1.4222222222:n.ub()&&this.XR.wP&&(y=this.XR.T9);y&&x.xr.setFramebufferScaleFactor(y)};w.gmb=function(){var x;c.request((x=this.Dm)===null||x===void 0?void 0:x.domElement);this.XR.wP&&(this.Dm.domElement.width=this.Dm.domElement.height=100,n.Dc()==n.HQ?k.addParameter("vr"):f.enable(),n.Dc()==n.GQ&&d.request())};
w.ESa=function(){c.cancel();l.oe();n.ub()||g.tta.oe();this.XR.wP&&(k.removeParameter("vr"),d.cancel(),f.disable())};w.Bp=function(x){var y,z=(y=this.XR.Uf)===null||y===void 0?void 0:y.xr.getFrame();z&&(this.rTa(),y=this.A7,this.A7=null,this.pnb(z),this.XR.M.o(h.UZ),y&&y(x),this.XR.M.o(h.Zd))};w.pnb=function(x){var y=this;this.XR.anchors.forEach(function(z){if(x.trackedAnchors&&x.trackedAnchors.has(z)&&y.XR.referenceSpace){var A=x.getPose(z.anchorSpace,y.XR.referenceSpace);A&&(y.XR.YI.has(z)||y.XR.YI.set(z,
new q.Matrix4),y.XR.YI.get(z).fromArray(A.transform.matrix).premultiply(y.XR.Vh.matrixWorld).decompose(t,u,v).compose(t,u,v.set(1,1,1)))}})};w.rTa=function(){if(this.XR.session&&this.XR.session.renderState)if(this.XR.session.renderState.baseLayer)this.XR.framebufferWidth=this.XR.session.renderState.baseLayer.framebufferWidth,this.XR.framebufferHeight=this.XR.session.renderState.baseLayer.framebufferHeight;else{var x=this.XR.session.renderState.layers;x&&x.length>0&&x[0].textureWidth&&(this.XR.framebufferWidth=
x[0].textureWidth,this.XR.framebufferHeight=x[0].textureHeight)}};w.requestFrame=function(x){this.A7=x;return 0};w.Qcb=function(){this.A7=null};w.Dm=null;w.c$=null;w.HY=null;w.A7=null;return w}()});
define("tdv/player/view/util/XR","require exports tdv/utils tdv/events/EventDispatcher tdv/player/view/util/xr/APIAvailabilityChecker tdv/player/view/util/xr/CameraPosition tdv/player/view/util/xr/pointer/PointerType tdv/player/view/util/xr/RendererList tdv/player/view/util/xr/RendererType tdv/player/view/util/xr/pointer/SelectionMode ./xr/SessionMode tdv/player/view/util/xr/Type tdv/player/view/util/xr/ui/UI tdv/player/view/util/xr/ui/UIPanel tdv/player/view/util/xr/VisibilityListener tdv/player/view/util/xr/VRAutoStart tdv/player/view/util/xr/pointer/XRControllers tdv/player/view/util/xr/pointer/XRGazePointer tdv/player/view/util/xr/pointer/XRPointer tdv/player/view/util/xr/XRSettings tdv/player/view/util/xr/VRPreconditionsChecker tdv/player/view/util/xr/XRSessionManager three.mod".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u,v,w,x,y,z,A){a=function(){function D(){}D.initialize=function(F){g.initialize(function(){this.Vn.forEach(function(C){C.xr.enabled=this.AQ}.bind(this));r.initialize();t.initialize();u.initialize();v.initialize();w.initialize();k.initialize();p.initialize();this.KMa=!0;F()}.bind(this))};D.getType=function(){return this.wP?this.Lx.mo:this.Lx.AWa};D.xt=function(F,C,B){this.KMa?!this.AQ||this.isPresenting||this.TX||this.kB(C,function(){z.request(F,C,B)}.bind(z)):this.initialize(function(){D.xt(F,
C,B)}.bind(D))};D.sm=function(){z.end()};D.SRa=function(F){w.ylb(F)};D.setScale=function(F){k.setScale(F)};D.setPosition=function(F){k.setPosition(F)};D.mK=function(F){k.mK(F)};D.d$=function(){k.d$()};D.xra=function(F,C,B,H){b.Rkb(F,C,B);switch(H){case c.cca:u.ORa(!0);u.CRa(!0);break;default:u.ORa(!1),u.CRa(!1)}};D.fcb=function(F){F.xr.enabled=this.AQ;b.add(F)};D.Njb=function(F){b.remove(F)};D.YE=function(F,C,B,H){H===void 0&&(H=void 0);F.We=C;F.pr=B;F.zw=H;C&&(F.tPa=Date.now())};D.GRa=function(F,
C){F.fA=C};D.C$=function(F,C){C!=F.disabled&&(F.disabled=C)};D.QY=function(F,C){u.mkb(F,C)};D.tlb=function(F,C){F.In=C};D.vlb=function(F,C){F.hidden=C};D.HRa=function(F,C){F.i8=C};D.Ujb=function(){var F=this;return(new Promise(function(C,B){F.Wq=C;F.vO=B})).then(function(C){F.anchors.push(C);return C}).finally(function(){F.Wq=F.vO=null})};D.Lcb=function(){this.vO&&this.vO("cancelled")};D.keb=function(F){var C=this.anchors.indexOf(F);C!=-1&&(this.anchors.splice(C,1),this.YI.delete(F),F.delete&&F.delete())};
D.log=function(){h.log("VR: "+(this.AQ?"available":"not available"))};D.kB=function(F,C){y.kB(F,C)};D.uua=e;D.Lx=l;D.YQ=c;D.Fl=f;D.Yua=x;D.AQ=!0;D.qIa=!0;D.wP=!1;D.Uf=null;D.YA=null;D.Nw=null;D.isPresenting=!1;D.TX=!1;D.session=null;D.Em=null;D.framebufferWidth=void 0;D.framebufferHeight=void 0;D.wg=new A.Quaternion;D.HO=1.7;D.Ec=new A.Vector3;D.zi=1;D.yl=new A.Quaternion;D.xaa=new A.Vector3;D.T9=Math.min(1,1280/(Math.max(screen.width,screen.height)*window.devicePixelRatio));D.Vn=[];D.Al=null;D.Oqa=
new Map;D.Nqa=new Map;D.M=new n;D.referenceSpace=null;D.KMa=!1;D.ud=[];D.eP=new A.Ray;D.h$=null;D.anchors=[];D.YI=new Map;D.Wq=null;D.vO=null;return D}();g.XR=a;k.XR=a;b.XR=a;p.XR=a;q.XR=a;r.XR=a;t.XR=a;u.XR=a;v.XR=a;w.XR=a;y.XR=a;return z.XR=a});
define("tdv/player/parser/helper/AppResizeUpdater",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR"],function(a,m,h,n){var g=/^\s*((\+|\-)?(\d*\.)?\d+)\s*(vmin|vmax|vw|vh|px|%)?\s*$/i;return function(){function k(e){this.Gb=e;this.GO=this.GO.bind(this);this.Gb.bind(h.Rb,this.kd,this,!0);n.M.bind(h.V,this.kd,this,!0);this.Gka=new Map;this.j0=[];this.kd()}k.prototype.kd=function(){var e=this;this.lbb();this.Gka.forEach(function(b){for(var c in b)e.GO(b[c])});this.j0.forEach(this.GO)};
k.prototype.lbb=function(){var e;if(n.isPresenting)var b=e=1024;else e=this.Gb.nb(),b=this.Gb.Mb();this.r6=e*.01;this.l6=b*.01;this.LHa=Math.min(this.r6,this.l6);this.KHa=Math.max(this.r6,this.l6)};k.prototype.GO=function(e){e(this.r6,this.l6,this.LHa,this.KHa)};k.prototype.Obb=function(e){this.j0.push(e)};k.prototype.Cjb=function(e){e=this.j0.indexOf(e);e>=0&&this.j0.splice(e,1)};k.prototype.z6=function(e,b,c,d){function f(p,q,r,t){b.call(e,c,l(p,q,r,t))}var l=k.s1a(d);(d=this.Gka.get(e))||this.Gka.set(e,
d={});d[c]=f;f(this.r6,this.l6,this.LHa,this.KHa)};k.get=function(e){var b=k.zd.get(e);b||(b=new k(e),k.zd.set(e,b));return b};k.z6=function(e,b,c,d){var f=e.get&&e.get("application")||e.Xb&&e.Xb();f?(k.HDa(),k.get(f).z6(e,b,c,d)):k.xXa(e,b,c,d)};k.xXa=function(e,b,c,d){k.Zia.push({instance:e,fmb:b,name:c,value:d});k.lN||(k.lN=setTimeout(function(){k.lN=null;k.HDa()},100))};k.HDa=function(){k.lN&&(clearTimeout(k.lN),k.lN=null);var e=k.Zia;k.Zia=[];e.forEach(function(b){k.z6(b.instance,b.fmb,b.name,
b.value)})};k.s1a=function(e){var b=k.CG[e];if(b)return b;if(typeof e!="string")return k.CG[e]=function(){return e};var c=(b=g.exec(e))&&parseFloat(b[1]);switch(b&&b[4]&&b[4].toLowerCase()){case "vw":return k.CG[e]=function(d){return d*c};case "vh":return k.CG[e]=function(d,f){return f*c};case "vmin":return k.CG[e]=function(d,f,l){return l*c};case "vmax":return k.CG[e]=function(d,f,l,p){return p*c};default:return k.CG[e]=function(){return e}}};k.zd=new Map;k.Zia=[];k.lN=null;k.CG={};return k}()});
define("tdv/player/parser/ClassInfo","require exports tdv/player/script/definitions tdv/player/parser/helper/AppResizeUpdater tdv/player/view/util/URL tdv/utils".split(" "),function(a,m,h,n,g,k){h=k.eeb(h);var e=function(){function b(c,d,f){this.NL=c;this.DR=f;this.W3=d.parent;this.e4a=d.isValidRoot||!1;this.Ria={};this.Nia=[];this.nDa=[];this.mDa=[];this.L0={};c=d.properties||{};for(var l in c)f=c[l],this.Ria[l]=f.type,f.isUrl&&this.nDa.push(l),f.isSize&&this.mDa.push(l),f.order!==void 0&&(this.Nia[f.order]=
l),f["default"]!==void 0&&(this.L0[l]=f["default"]);this.kDa=[];this.lDa=[];d=d.events||{};for(var p in d)d[p].isDeferred?this.kDa.push(p):this.lDa.push(p);this.KC=this.yC=this.eS=this.k5=this.wI=this.h6=this.OI=this.cM=this.BL=this.nR=void 0;this.$za=!1}b.prototype.Pfb=function(){if(this.W3)return b.Ci(this.W3)};b.prototype.uA=function(){return this.NL};b.prototype.nX=function(){return this.FC()?this.Iy().nX().concat(this.NL):[this.NL]};b.prototype.hasAttributes=function(){return this.getAttributeNames().length>
0};b.prototype.hasAttribute=function(c){return this.koa(c)?!0:!1};b.prototype.getAttributeNames=function(){this.nR==void 0&&this.gxa();return this.nR};b.prototype.FLa=function(){return this.Nia?this.Nia:this.FC()?this.Iy().FLa():[]};b.prototype.dLa=function(){if(this.cM)return this.cM;this.cM={};if(this.FC()){var c=this.Iy().dLa(),d;for(d in c)this.cM[d]=c[d]}if(this.L0)for(d in this.L0)this.cM[d]=this.L0[d];return this.cM};b.prototype.koa=function(c){this.BL==void 0&&this.gxa();return this.BL[c]};
b.prototype.Rgb=function(){return this.YLa().length>0};b.prototype.YLa=function(){this.OI==void 0&&this.nxa();return this.OI};b.prototype.fgb=function(){this.h6==void 0&&this.nxa();return this.h6};b.prototype.Ogb=function(){return this.SLa().length>0};b.prototype.SLa=function(){this.wI==void 0&&this.mxa();return this.wI};b.prototype.cgb=function(){this.k5==void 0&&this.mxa();return this.k5};b.prototype.Bgb=function(){return this.poa().length>0};b.prototype.oMa=function(c){this.yC==void 0&&this.UL();
return this.yC.indexOf(c)!=-1};b.prototype.poa=function(){this.yC==void 0&&this.UL();return this.yC};b.prototype.Ggb=function(){return this.xoa().length>0};b.prototype.pMa=function(c){this.KC==void 0&&this.UL();return this.KC.indexOf(c)!=-1};b.prototype.xoa=function(){this.KC==void 0&&this.UL();return this.KC};b.prototype.Dgb=function(c){this.eS==void 0&&this.UL();return this.eS.indexOf(c)!=-1};b.prototype.qfb=function(){this.eS==void 0&&this.UL();return this.eS};b.prototype.tLa=function(){return this.e4a||
this.FC()&&this.Iy().tLa()};b.prototype.Ai=function(c,d,f,l){this.G6a(d,f);var p=this.DR;var q=l&&l.length>0?new (k.extend(p,function(){p.apply(this,l)})):new p;q.set("application",c);q.set("baseDirectoy",d);q.set("queryStringParameters",f);q.set("class",this.uA());return q};b.prototype.Xma=function(c){var d=this.dLa(),f;for(f in d)c.set(f,d[f])};b.prototype.G6a=function(c,d){this.$za||(this.$za=!0,this.P_a(c,d),this.G0a(),this.fXa())};b.prototype.P_a=function(c,d){if(this.Rgb()||this.Ogb()){var f=
this.DR.prototype,l=this.fgb(),p=this.cgb(),q=f.set;f.set=function(r,t){l[r]?(!t||g.hE(t)||g.v8(t)||g.Hhb(t)||(t=g.MD(g.mB(t,c),d)),q.call(this,r,t)):p[r]?n.z6(this,q,r,t):q.call(this,r,t)}}};b.prototype.fXa=function(){var c=this.DR.prototype;this.getAttributeNames().forEach(function(d){Object.defineProperty(c,d,{get:function(){return this.get(d)},set:function(f){this.set(d,f)},enumerable:!0,configurable:!0})})};b.prototype.G0a=function(){var c=this.DR.prototype,d=this;this.hasAttributes()&&(c.set=
c.set,c.get=c.get);if(this.Bgb()||this.Ggb())c.bind=c.bind,c.getBindings=c.jP,c.hasBindings=c.f8,c.trigger=c.o,c.unbind=c.h;c.getClassName=function(){return d.uA()};c.getClassPath=function(){return d.nX()};c.getAttributeNames=function(){return d.getAttributeNames()};c.getEventNames=function(){return d.qfb()};c.hasEvent=function(f){return d.Dgb(f)}};b.prototype.gxa=function(){this.nR=[];this.BL={};for(var c in this.Ria)this.nR.push(c),this.BL[c]=b.Nfa(this.Ria[c]);if(this.FC())for(var d=this.Iy(),
f=d.getAttributeNames(),l=0;l<f.length;l++)c=f[l],this.BL[c]||(this.nR.push(c),this.BL[c]=d.koa(c))};b.prototype.nxa=function(){this.OI=this.nDa.slice();this.FC()&&(this.OI=k.union(this.OI,this.Iy().YLa()));this.h6={};for(var c=0;c<this.OI.length;c++)this.h6[this.OI[c]]=!0};b.prototype.mxa=function(){this.wI=this.mDa.slice();this.FC()&&(this.wI=k.union(this.wI,this.Iy().SLa()));this.k5={};for(var c=0;c<this.wI.length;c++)this.k5[this.wI[c]]=!0};b.prototype.UL=function(){this.yC=this.kDa.slice();this.KC=
this.lDa.slice();this.FC()&&(this.yC=k.union(this.yC,this.Iy().poa()),this.KC=k.union(this.KC,this.Iy().xoa()));this.eS=k.union(this.yC,this.KC)};b.prototype.FC=function(){return this.W3?!0:!1};b.prototype.Iy=function(){return b.Ci(this.W3)};b.define=function(c,d,f){d=k.extend(d,function(){f.apply(this,arguments);l.Xma(this)});var l=new b(c,h[c],d);b.r0.set(c,l);b.Kda.set(d,l);return d};b.create=function(c,d){var f=new b(c,h[c],d);b.r0.set(c,f);b.Kda.set(d,f);return f};b.getAll=function(){var c=[];
b.r0.forEach(function(d){c.push(d)});return c};b.Ci=function(c){return b.r0.get(c)};b.bfb=function(c){return b.Kda.get(c)};b.Oa=function(c,d){c=b.Ci(c);if(d===null)return!0;if(d&&d.constructor)for(d=b.bfb(d.constructor);d;){if(d==c)return!0;d=d.Pfb()}return!1};b.Nfa=function(c){switch(c){case "string":case "code":return b.k$a;case "number":return b.H4a;case "bool":return b.LYa;case "color":return b.LZa;case "percent":return b.q6a;case "size":return b.F9a;case "identifier":return b.l3a;case "array":return b.Mva;
case "canvas":return b.iZa;case "img":return b.o3a;case "dict":return b.r6a;case "*":return b.q0a;default:if(b.L3a(c))switch(b.x1a(c)){case "array":var d=b.Nfa(b.sya(c));return function(p,q){p=b.Mva(p,q);for(var r=0;r<p.length;r++)p[r]=d(p[r],q);return p};case "enum":var f=b.tya(c);return b.z1a(f);case "or":f=b.tya(c);var l=f.map(function(p){return b.Nfa(p)});return function(p,q){for(var r=0;r<l.length;r++)try{return l[r](p,q)}catch(t){}throw"Invalid value";};default:throw"Invalid type validator definition: "+
c;}else return b.Ko(function(p){return b.Oa(c,p)})}};b.L3a=function(c){return c.indexOf("[")>=0&&c.lastIndexOf("]")==c.length-1};b.x1a=function(c){return c.substring(0,c.indexOf("["))};b.sya=function(c){return c.substring(c.indexOf("[")+1,c.lastIndexOf("]"))};b.tya=function(c){c=b.sya(c);for(var d=[],f="",l=0,p=0;p<c.length;p++){var q=c.charAt(p);f+=q;switch(q){case "[":l++;break;case "]":l--;break;case ",":l==0&&(d.push(f.substr(0,f.length-1)),f="")}}f!=""&&d.push(f);return d.map(function(r){return b.Z$a(r)})};
b.Z$a=function(c){return c.replace(/^\s+|\s+$/g,"")};b.Ko=function(c){return function(d,f){if(!c(d)){if(typeof d!="string")throw"Invalid value";d=b.E0a(d,f);if(!c(d))throw"Invalid value";}return d}};b.E0a=function(c,d){return function(){return eval(c)}.call(d)};b.q0a=function(c){return c};b.z1a=function(c){return b.Ko(function(d){return c.indexOf(d)!=-1})};b.e1=function(c,d){return k.FA(c)&&d.test(c)};b.r0=new Map;b.Kda=new Map;b.H4a=b.Ko(function(c){return Object.prototype.toString.call(c)=="[object Number]"});
b.k$a=b.Ko(function(c){return typeof c=="string"||c===null});b.LYa=b.Ko(function(c){return c===!0||c===!1});b.Mva=b.Ko(function(c){return Object.prototype.toString.call(c)=="[object Array]"});b.iZa=b.Ko(function(c){return c&&c.tagName=="CANVAS"});b.o3a=b.Ko(function(c){return c&&c.tagName=="IMG"});b.l3a=b.Ko(function(c){return b.e1(c,RegExp("^[a-z][a-z0-9_]*$","i"))});b.q6a=b.Ko(function(c){return b.e1(c,RegExp("^\\s*([+-]?\\d+\\.?\\d*)%\\s*$","i"))});b.F9a=b.Ko(function(c){return b.e1(c,RegExp("^\\s*([+-]?\\d+\\.?\\d*)\\s*((vw)|(vh)|(vmin)|(vmax)|(px))\\s*$",
"i"))});b.LZa=b.Ko(function(c){return b.e1(c,RegExp("^#[0-9a-f]{6}$","i"))});b.r6a=b.Ko(function(c){try{return k.lpa(c)}catch(d){return!1}});return b}();window.TDV.PlayerAPI.getClassByName=function(b){return e.Ci(b).DR};return e});
define("tdv/util/Sha256",["require"],function(){function a(){k[0]=k[1]=k[2]=k[3]=k[4]=k[5]=k[6]=k[7]=k[8]=k[9]=k[10]=k[11]=k[12]=k[13]=k[14]=k[15]=k[16]=0;this.fna=k;this.wX=1779033703;this.xX=3144134277;this.yX=1013904242;this.zX=2773480762;this.AX=1359893119;this.BX=2600822924;this.CX=528734635;this.DX=1541459225;this.block=this.start=this.bytes=this.Noa=0;this.foa=this.h8=!1;this.first=!0}var m="0123456789abcdef".split(""),h=[-2147483648,8388608,32768,128],n=[24,16,8,0],g=[1116352408,1899447441,
3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,
506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],k=[];a.prototype.update=function(e){if(!this.foa){for(var b,c=0,d,f=e.length,l=this.fna;c<f;){this.h8&&(this.h8=!1,l[0]=this.block,l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0);for(d=this.start;c<f&&d<64;++c)b=e.charCodeAt(c),b<128?l[d>>2]|=b<<n[d++&3]:(b<2048?l[d>>2]|=(192|b>>6)<<n[d++&3]:(b<55296||
b>=57344?l[d>>2]|=(224|b>>12)<<n[d++&3]:(b=65536+((b&1023)<<10|e.charCodeAt(++c)&1023),l[d>>2]|=(240|b>>18)<<n[d++&3],l[d>>2]|=(128|b>>12&63)<<n[d++&3]),l[d>>2]|=(128|b>>6&63)<<n[d++&3]),l[d>>2]|=(128|b&63)<<n[d++&3]);this.Uhb=d;this.bytes+=d-this.start;d>=64?(this.block=l[16],this.start=d-64,this.hash(),this.h8=!0):this.start=d}this.bytes>4294967295&&(this.Noa+=this.bytes/4294967296<<0,this.bytes%=4294967296);return this}};a.prototype.BKa=function(){if(!this.foa){this.foa=!0;var e=this.fna,b=this.Uhb;
e[16]=this.block;e[b>>2]|=h[b&3];this.block=e[16];b>=56&&(this.h8||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0);e[14]=this.Noa<<3|this.bytes>>>29;e[15]=this.bytes<<3;this.hash()}};a.prototype.hash=function(){var e=this.wX,b=this.xX,c=this.yX,d=this.zX,f=this.AX,l=this.BX,p=this.CX,q=this.DX,r=this.fna,t;for(t=16;t<64;++t){var u=r[t-15];var v=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3;u=r[t-2];u=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10;r[t]=
r[t-16]+v+r[t-7]+u<<0}var w=b&c;for(t=0;t<64;t+=4){if(this.first){var x=704751109;u=r[0]-210244248;q=u-1521486534<<0;d=u+143694565<<0;this.first=!1}else{v=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);u=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7);x=e&b;var y=x^e&c^w;var z=f&l^~f&p;u=q+u+z+g[t]+r[t];v+=y;q=d+u<<0;d=u+v<<0}v=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10);u=(q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7);w=d&e;y=w^d&b^x;z=q&f^~q&l;u=p+u+z+g[t+1]+r[t+1];v+=y;p=c+u<<0;c=u+v<<0;v=(c>>>2|c<<30)^(c>>>
13|c<<19)^(c>>>22|c<<10);u=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7);x=c&d;y=x^c&e^w;z=p&q^~p&f;u=l+u+z+g[t+2]+r[t+2];v+=y;l=b+u<<0;b=u+v<<0;v=(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10);u=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7);w=b&c;y=w^b&d^x;z=l&p^~l&q;u=f+u+z+g[t+3]+r[t+3];v+=y;f=e+u<<0;e=u+v<<0}this.wX=this.wX+e<<0;this.xX=this.xX+b<<0;this.yX=this.yX+c<<0;this.zX=this.zX+d<<0;this.AX=this.AX+f<<0;this.BX=this.BX+l<<0;this.CX=this.CX+p<<0;this.DX=this.DX+q<<0};a.prototype.Ugb=function(){this.BKa();
var e=this.wX,b=this.xX,c=this.yX,d=this.zX,f=this.AX,l=this.BX,p=this.CX,q=this.DX;return m[e>>28&15]+m[e>>24&15]+m[e>>20&15]+m[e>>16&15]+m[e>>12&15]+m[e>>8&15]+m[e>>4&15]+m[e&15]+m[b>>28&15]+m[b>>24&15]+m[b>>20&15]+m[b>>16&15]+m[b>>12&15]+m[b>>8&15]+m[b>>4&15]+m[b&15]+m[c>>28&15]+m[c>>24&15]+m[c>>20&15]+m[c>>16&15]+m[c>>12&15]+m[c>>8&15]+m[c>>4&15]+m[c&15]+m[d>>28&15]+m[d>>24&15]+m[d>>20&15]+m[d>>16&15]+m[d>>12&15]+m[d>>8&15]+m[d>>4&15]+m[d&15]+m[f>>28&15]+m[f>>24&15]+m[f>>20&15]+m[f>>16&15]+m[f>>
12&15]+m[f>>8&15]+m[f>>4&15]+m[f&15]+m[l>>28&15]+m[l>>24&15]+m[l>>20&15]+m[l>>16&15]+m[l>>12&15]+m[l>>8&15]+m[l>>4&15]+m[l&15]+m[p>>28&15]+m[p>>24&15]+m[p>>20&15]+m[p>>16&15]+m[p>>12&15]+m[p>>8&15]+m[p>>4&15]+m[p&15]+m[q>>28&15]+m[q>>24&15]+m[q>>20&15]+m[q>>16&15]+m[q>>12&15]+m[q>>8&15]+m[q>>4&15]+m[q&15]};a.prototype.digest=function(){this.BKa();var e=this.wX,b=this.xX,c=this.yX,d=this.zX,f=this.AX,l=this.BX,p=this.CX,q=this.DX;return[e>>24&255,e>>16&255,e>>8&255,e&255,b>>24&255,b>>16&255,b>>8&255,
b&255,c>>24&255,c>>16&255,c>>8&255,c&255,d>>24&255,d>>16&255,d>>8&255,d&255,f>>24&255,f>>16&255,f>>8&255,f&255,l>>24&255,l>>16&255,l>>8&255,l&255,p>>24&255,p>>16&255,p>>8&255,p&255,q>>24&255,q>>16&255,q>>8&255,q&255]};return function(e){return(new a(!0)).update(e).Ugb()}});
define("tdv/player/parser/Sign",["require","tdv/util/Sha256"],function(a){function m(){for(var k=[[256,"9799e3eb6096a48f515a94324200b7af24251a4131eccf9a2cd65d012a1f5c71"],[1024,"cbab1f6d618e723188cfdb1c7c3f47146e46da4da56030386d85055016afd5d9"],[1E4,"d9c4539649520e3f4a35e5a3331b0fbdc67958dd64ef65a83a75d545413643dd"]],e=0;e<k.length;e++){var b=Array.apply(null,Array(k[e][0])).map((c,d)=>String.fromCharCode(d%256)).join("");if(g(b)!=k[e][1])return!1}return!0}function h(k){var e=Array.isArray(k)?"array":
k===null?"null":typeof k;switch(e){case "array":return"["+k.map(h).join(",")+"]";case "object":return"{"+Object.keys(k).sort().map(function(b){return h(b)+":"+h(k[b])}).join(",")+"}";case "boolean":return k?"true":"false";case "number":return k.toFixed(3);case "string":return'"'+k.split('"').join('\\"')+'"';case "null":case "undefined":return e;case "function":return"<"+e+">"}return""}function n(k){return k.map(function(e){return String.fromCharCode(e)}).join("")}var g=a("tdv/util/Sha256");return{validate:function(k){var e=
[104,97,115,104],b=[116,100,118],c=window.location[n([111,114,105,103,105,110])],d=k[n(e)];delete k[n(e)];k=n(b)+h(k);k=g(k);b=n(b)+c;b=g(b);return k==d||b==d||!m()}}});
define("tdv/player/view/util/geo/Point",["require"],function(){function a(m,h,n){this.set(typeof m!="undefined"?m:0,typeof h!="undefined"?h:0,typeof n!="undefined"?n:0)}a.prototype.set=function(m,h,n){this.x=m;this.y=h;this.z=n;return this};a.prototype.clone=function(){return new a(this.x,this.y,this.z)};a.prototype.apply=function(m){m.yO(this)};a.prototype.project=function(m){m.project(this)};return a});
define("tdv/player/view/util/geo/Vector",["require","tdv/utils","tdv/player/view/util/geo/Point"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/util/geo/Point"),n=m.extend(h,function(g,k,e){h.call(this,g,k,e)});n.prototype.clone=function(){return new n(this.x,this.y,this.z)};n.prototype.Kc=function(){return this.x==0&&this.z==0?0:-Math.atan2(this.x,this.z)};n.prototype.Jc=function(){return this.y==0&&this.z==0?0:Math.atan2(this.y,Math.sqrt(this.z*this.z+this.x*this.x))};n.prototype.Coa=function(){return Math.sqrt(this.x*
this.x+this.y*this.y+this.z*this.z)};n.prototype.eZ=function(g){g/=this.Coa();this.x*=g;this.y*=g;this.z*=g;return this};n.prototype.normalize=function(){return this.eZ(1)};n.prototype.VO=function(g){return this.x*g.x+this.y*g.y+this.z*g.z};n.prototype.d7=function(g){var k=this.z*g.x-this.x*g.z,e=this.x*g.y-this.y*g.x;this.x=this.y*g.z-this.z*g.y;this.y=k;this.z=e;return this};n.YD=function(g,k){return new n(k.x-g.x,k.y-g.y,k.z-g.z)};n.H7=function(g,k){g=NaN-g;k=NaN-k;return Math.sqrt(g*g+k*k+NaN)};
n.At=function(g,k,e){var b=Math.cos(k)*Math.sin(g),c=Math.sin(k);g=Math.cos(k)*Math.cos(g);return e?e.set(b,c,g):new n(b,c,g)};return n});
define("tdv/player/script/AdjacentPanorama",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/view/util/geo/Vector"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/util/geo/Vector");a=h.define("AdjacentPanorama",m,function(){m.call(this);this.zma=this.py=void 0});a.prototype.fLa=function(){if(this.py===void 0){for(this.py=this.Jya()-this.get("yaw");this.py>180;)this.py-=360;for(;this.py<-180;)this.py+=360}return this.py};
a.prototype.pfb=function(){this.zma===void 0&&(this.zma=n.At(this.Jya()*Math.PI/180,0));return this.zma};a.prototype.Kcb=function(){return this.get("yaw")!==void 0&&this.get("backwardYaw")!==void 0};a.prototype.Jya=function(){return this.get("backwardYaw")-180};return a});define("tdv/player/script/AmbientLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("AmbientLight",m,function(){m.call(this)})});
define("tdv/player/script/Model3DPostprocessing",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DPostprocessing",m,function(){m.call(this)});a.prototype.aF=function(h){this.Tq!==h&&(this.Tq=h,this.KGa())};a.prototype.Gp=function(h){this.SM!==h&&(this.SM=h,this.KGa())};a.prototype.KGa=function(){this.set("disabled",this.SM&&this.get("disableWhileMoving")||this.Tq&&this.get("disableWhileUserInteracting"))};
return a});define("tdv/player/script/AmbientOcclusionModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DPostprocessing");return m.define("AmbientOcclusionModel3DPostprocessing",h,function(){h.call(this)})});define("tdv/constants/PlaybackState",["require","exports"],function(){return{ca:"stopped",PLAYING:"playing",$b:"paused"}});
define("tdv/player/script/ImageResource",["require","exports","tdv/player/parser/ClassInfo","tdv/binding/Bindable"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(n);h.create("ImageResource",a);return a});
define("tdv/player/script/AnimatedImageResource","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/ImageResource".split(" "),function(a){a("tdv/utils");var m=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/ImageResource");a=n.define("AnimatedImageResource",g,function(){g.call(this)});a.prototype.play=a.prototype.play=function(){this.set("state",h.PLAYING)};a.prototype.pause=
a.prototype.pause=function(){this.set("state",h.$b)};a.prototype.stop=a.prototype.stop=function(){this.set("state",h.ca)};a.prototype.set=function(k,e){switch(k){case "state":(this.get("state")||h.ca)==h.ca&&e==h.PLAYING&&this.o(m.Up)}g.prototype.set.call(this,k,e)};a.prototype.zk=function(k,e,b){e||(e=1);b||(b=1);return g.prototype.zk.call(this,k,e*this.get("colCount",1),b*this.get("rowCount",1))};return a});
define("tdv/player/script/AntialiasModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DPostprocessing");return m.define("AntialiasModel3DPostprocessing",h,function(){h.call(this)})});
define("tdv/player/script/HotspotMapOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("HotspotMapOverlay",m,function(h){m.call(this);this.CN=h===void 0?!0:h;this.IM=this.Ws=this.Us=this.Ja=void 0});a.prototype.getItem=function(){if(this.Ja===void 0){var h=this.get("image");this.Ja=h?h.c7(this.CN):null}return this.Ja};a.prototype.MLa=function(){if(this.Us===void 0){var h=this.get("rollOverImage");
this.Us=h?h.c7(this.CN):null}return this.Us};a.prototype.RLa=function(){if(this.Ws===void 0){var h=this.get("selectedImage");this.Ws=h?h.c7(this.CN):null}return this.Ws};a.prototype.Ffb=function(){if(this.IM===void 0){this.IM=[];var h=this.getItem();h&&this.IM.push(h);(h=this.MLa())&&this.IM.push(h);(h=this.RLa())&&this.IM.push(h)}return this.IM};return a});
define("tdv/player/script/AreaHotspotMapOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotMapOverlay");return m.define("AreaHotspotMapOverlay",h,function(){h.call(this,!0)})});
define("tdv/player/script/AudioResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("AudioResource",m,function(){m.call(this)})});define("tdv/view/constants/CreationPolicy",["require","exports"],function(){return{cL:"inAdvance",ita:"delayed"}});
define("tdv/view/buttons/ButtonGroup",["require","exports","tdv/constants/EventName"],function(a,m,h){return function(){function n(){var g=this;this.fk=[];this.pBa=function(k){g.JEa(k.source)}}n.prototype.register=function(g){this.gXa(g);this.fk.push(g);g.get("pressed")&&this.JEa(g)};n.prototype.unregister=function(g){this.X6a(g)};n.prototype.gXa=function(g){g.bind(h.Rk,this.pBa,this,!0)};n.prototype.X6a=function(g){g.unbind(h.Rk,this.pBa,this)};n.prototype.JEa=function(g){this.fk.forEach(function(k){k.set("pressed",
k==g)})};n.register=function(g,k){this.unregister(g);k=this.Bj(k);g.set("__button_group",k);k.register(g)};n.unregister=function(g){var k=g.get("__button_group");k&&(k.unregister(g),g.set("__button_group",void 0))};n.Bj=function(g){return this.Mza[g]||(this.Mza[g]=new n)};n.Mza={};return n}()});define("tdv/view/constants/ButtonMode",["require","exports"],function(){return{af:"push",bk:"toggle"}});
define("tdv/view/constants/OverflowPolicy",["require","exports"],function(){return{mL:"visible",Ata:"hidden",Wr:"scroll"}});define("tdv/view/constants/Alignment",["require","exports"],function(){return{fb:"left",Db:"right",$e:"center",Tc:"top",Hc:"bottom",$d:"middle"}});define("tdv/view/constants/ScrollBarVisiblePolicy",["require","exports"],function(){return{uc:"rollOver",ALWAYS:"always"}});
define("tdv/view/constants/LayoutMode",["require","exports"],function(){return{TZ:"absolute",Ni:"horizontal",JB:"grid",Uk:"vertical"}});define("tdv/view/containers/layout/ChildBounds",["require","exports"],function(){return function(){return function(a){this.ge=a;this.height=this.width=this.y=this.x=0}}()});define("tdv/view/containers/layout/MeasureResult",["require","exports"],function(){return function(){return function(){this.minHeight=this.minWidth=this.height=this.width=0}}()});
define("tdv/view/containers/layout/Layout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/ChildBounds","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n,g){return function(){function k(){this.dc=null;this.JD=h.Tc;this.GC=h.fb;this.QI=this.Ly=0}k.prototype.oRa=function(e){this.Ly!=e&&(this.Ly=e,this.wh())};k.prototype.M$=function(e){this.QI!=e&&(this.QI=e,this.wh())};k.prototype.LRa=function(e){this.dc=e;this.wh()};k.prototype.fQ=function(e){this.GC!=e&&
(this.GC=e,this.wh())};k.prototype.kP=function(){return this.GC};k.prototype.lQ=function(e){this.JD!=e&&(this.JD=e,this.wh())};k.prototype.mP=function(){return this.JD};k.prototype.measure=function(){return new g};k.prototype.update=function(){var e=this.d_a();this.bW(e);this.n8a(e)};k.prototype.bW=function(){};k.prototype.u1=function(){for(var e=this.sza(),b=[],c=0;c<e.length;c++){var d=e[c];d.get("includeInLayout")&&b.push(d)}return b};k.prototype.sza=function(){if(!this.dc)return[];for(var e=this.dc.Cb(),
b=[],c=0;c<e.length;c++){var d=e[c];d.get("visible")&&b.push(d)}return b};k.prototype.d_a=function(){for(var e=this.sza(),b=[],c=0;c<e.length;c++)b.push(new n(e[c]));return b};k.prototype.n8a=function(e){for(var b=0;b<e.length;b++){var c=e[b];c.ge.ZQa(c.x,c.y,c.width,c.height)}};k.prototype.wh=function(){this.dc&&(this.dc.lc(),this.dc.Bf())};return k}()});
define("tdv/view/containers/layout/AbsoluteLayout",["require","exports","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.measure=function(){for(var e=new n,b=this.u1(),c=0;c<b.length;c++){var d=b[c],f=d.Vy,l=d.$U,p=0;f!==void 0&&(p+=f);l!==void 0&&(p+=l);e.width=Math.max(p+d.sw(),e.width);e.minWidth=Math.max(p+d.ow(),e.minWidth);f=d.ct;l=d.rR;p=0;f!==void 0&&(p+=f);l!==void 0&&
(p+=l);e.height=Math.max(p+d.rw(),e.height);e.minHeight=Math.max(p+d.wA(),e.minHeight)}this.dc&&(b=this.dc.u.Dd+this.dc.u.De,e.width+=b,e.minWidth+=b,b=this.dc.u.ie+this.dc.u.Ef,e.height+=b,e.minHeight+=b);return e};k.prototype.bW=function(e){if(this.dc)for(var b=this.dc.Xh(),c=this.dc.Wh(),d=0;d<e.length;d++){var f=e[d],l=f.ge,p=l.Vy;if(p===void 0){var q=l.e4;q!==void 0&&(p=Math.round(q*b*.01))}q=l.$U;if(q===void 0){var r=l.f4;r!==void 0&&(q=Math.round(r*b*.01))}r=l.lC;var t=l.Mo;if(t===void 0){var u=
l.lp;u!==void 0?t=Math.round(u*b*.01):p!==void 0&&q!==void 0&&(t=b-p-q)}u=l.ct;if(u===void 0){var v=l.g4;v!==void 0&&(u=Math.round(v*c*.01))}v=l.rR;if(v===void 0){var w=l.d4;w!==void 0&&(v=Math.round(w*c*.01))}w=l.mC;var x=l.WG;if(x===void 0){var y=l.kp;y!==void 0?x=Math.round(y*c*.01):u!==void 0&&v!==void 0&&(x=c-u-v)}f.width=t===void 0?l.sw():Math.max(l.ow(),Math.min(l.T7(),t));f.height=x===void 0?l.rw():Math.max(l.wA(),Math.min(l.S7(),x));f.x=p!==void 0&&q!==void 0?Math.round(p+(b-q-p-f.width)*
.5):p!==void 0?p:q!==void 0?b-q-f.width:r!==void 0?Math.round(b*.5+r-f.width*.5):0;f.y=u!==void 0&&v!==void 0?Math.round(u+(c-v-u-f.height)*.5):u!==void 0?u:v!==void 0?c-v-f.height:w!==void 0?Math.round(c*.5+w-f.height*.5):0}};return k}(h)});
define("tdv/view/containers/layout/GridLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.Mo=void 0;b.MC=void 0;b.XS=void 0;b.Ty=void 0;b.Sy=void 0;b.zH=void 0;b.VS=void 0;b.US=void 0;b.TS=void 0;b.Twa=void 0;b.qEa=void 0;return b}P(e,k);e.prototype.Fkb=function(b){this.Mo!=b&&(this.Mo=b,this.wh())};e.prototype.Wkb=function(b){this.Ty!=
b&&(this.Ty=b,this.Ty!=void 0&&(this.MC=void 0),this.wh())};e.prototype.Vkb=function(b){this.Sy!=b&&(this.Sy=b,this.Sy!=void 0&&(this.XS=void 0),this.wh())};e.prototype.clb=function(b){this.MC!=b&&(this.MC=b,this.Ty!=void 0&&(this.Ty=void 0),this.wh())};e.prototype.blb=function(b){this.XS!=b&&(this.XS=b,this.Sy!=void 0&&(this.Sy=void 0),this.wh())};e.prototype.alb=function(b){this.zH!=b&&(this.zH=b,this.wh())};e.prototype.$kb=function(b){this.VS!=b&&(this.VS=b,this.wh())};e.prototype.Zkb=function(b){this.US!=
b&&(this.US=b,this.wh())};e.prototype.Ykb=function(b){this.TS!=b&&(this.TS=b,this.wh())};e.prototype.measure=function(){for(var b=new g,c=this.u1(),d=0,f=0;f<c.length;f++)c[f].nq&&d++;if(!isNaN(this.MC))for(isNaN(this.zH)||(b.minWidth=this.zH),f=0;f<c.length;f++){var l=c[f].ow();isNaN(l)||(b.minWidth=Math.max(l,b.minWidth))}if(isNaN(this.Ty))for(f=0;f<c.length;f++)l=c[f].sw(),isNaN(l)||(b.width=Math.max(l,b.width));else b.width=this.Ty;if(isNaN(this.Sy))for(f=0;f<c.length;f++)l=c[f].rw(),isNaN(l)||
(b.height=Math.max(l,b.height));else b.height=this.Sy;c=isNaN(this.MC)?!isNaN(this.Mo)&&this.dc?Math.max(1,Math.floor((this.Mo-this.dc.u.Dd-this.dc.u.De+this.Ly)/(b.width+this.Ly))):Math.ceil(Math.sqrt(d)):Math.max(1,Math.floor(100/this.MC));d=Math.ceil(d/c);this.dc&&(b.width=b.width*c+Math.max(0,c-1)*this.Ly+this.dc.u.Dd+this.dc.u.De,b.minWidth=b.minWidth+this.dc.u.Dd+this.dc.u.De,b.height=b.height*d+Math.max(0,d-1)*this.QI+this.dc.u.ie+this.dc.u.Ef);b.minHeight=0;return b};e.prototype.bW=function(b){if(this.dc){for(var c,
d,f=[],l=[],p=0;p<b.length;p++)d=b[p].ge,d.nq?f.push(b[p]):l.push(b[p]);var q=f.length,r=this.dc.Xh();c=this.Ly;if(isNaN(this.Ty))if(isNaN(this.MC)){for(p=b=0;p<f.length;p++)d=f[p].ge,b=Math.max(d.ow(),d.sw(),b);b=Math.min(r,b)}else b=Math.max(1,Math.floor(100/this.MC)),b=(r-(b-1)*c)/b,p=!1,!isNaN(this.US)&&this.US<b&&(b=this.US,p=!0),!isNaN(this.zH)&&this.zH>b&&(b=this.zH,p=!0),p&&(b=Math.max(1,Math.floor((r+c)/(b+c))),b=(r-(b-1)*c)/b);else b=this.Ty;b=Math.max(1,b);var t=Math.max(1,Math.floor(.001+
(r+c)/(b+c)));var u=t*b,v=t*(b+c)-c;p=0;if(r>=v)switch(this.kP()){case h.Db:p=r-v;break;case h.$e:p=Math.round((r-v)*.5);break;default:p=0}r=[];v=[];for(var w=0;w<t;w++)d=Math.round(u/(t-w)),u-=d,v.push(p),p+=d+c,r.push(d);w=this.dc.Wh();c=this.QI;if(isNaN(this.Sy))if(isNaN(this.XS))for(u=1,p=0;p<f.length;p++)d=f[p].ge,u=Math.max(d.wA(),d.rw(),u);else u=Math.max(1,100/this.XS),u=(w-(u-1)*c)/u,p=!1,!isNaN(this.TS)&&this.TS<u&&(u=this.TS,p=!0),!isNaN(this.VS)&&this.VS>u&&(u=this.VS,p=!0),p&&(u=Math.max(1,
Math.floor((w+c)/(u+c))),u=(w-(u-1)*c)/u);else u=this.Sy;q=Math.max(1,Math.ceil(q/t));p=q*u;d=q*(u+c)-c;var x=0;if(w>=d)switch(this.mP()){case h.Hc:x=w-d;break;case h.$d:x=Math.round((w-d)*.5);break;default:x=0}d=[];for(var y=[],z=0;z<q;z++)w=Math.round(p/(q-z)),p-=w,y.push(x),x+=w+c,d.push(w);for(p=0;p<f.length;p++)c=f[p],w=p%t,z=Math.floor(p/t),c.x=v[w],c.width=r[w],c.y=y[z],c.height=d[z];for(p=0;p<l.length;p++)c=l[p],c.x=0,c.width=Math.round(b),c.y=0,c.height=Math.round(u);this.Twa=t;this.qEa=
q}};return e}(n)});
define("tdv/view/containers/layout/HorizontalLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n,g){return function(k){function e(){return k.call(this)||this}P(e,k);e.prototype.measure=function(){for(var b=new g,c=this.u1(),d=0;d<c.length;d++){var f=c[d];b.height=Math.max(f.rw(),b.height);b.minHeight=Math.max(f.wA(),b.minHeight);b.width+=f.sw();b.minWidth+=f.ow()}this.dc&&(c=Math.max(0,c.length-
1)*this.Ly+this.dc.u.Dd+this.dc.u.De,b.width+=c,b.minWidth+=c,c=this.dc.u.ie+this.dc.u.Ef,b.height+=c,b.minHeight+=c);return b};e.prototype.bW=function(b){this.Kla(b);this.Jla(b)};e.prototype.Kla=function(b){if(this.dc){for(var c=0,d=0;d<b.length;d++)b[d].ge.nq&&c++;var f=this.dc.Xh()-Math.max(0,c-1)*this.Ly,l=this.dc.Wh();c=f;var p=0,q=[];for(d=0;d<b.length;d++){var r=b[d],t=r.ge,u=t.kp;r.height=u!==void 0?Math.max(t.wA(),Math.min(t.S7(),Math.round(l*u*.01))):t.rw();u=t.lp;u!==void 0?t.nq?(p+=u,
q.push(r)):r.width=Math.max(t.ow(),Math.min(t.T7(),Math.round(f*u*.01))):(r.width=t.sw(),c-=r.width)}c-=Math.max(0,c-Math.round(f*p*.01));do{b=!1;f=Math.max(0,p>0?c/p:0);l=[];for(d=p=0;d<q.length;d++){r=q[d];t=r.ge;u=Math.round(t.lp*f);var v=t.ow(),w=t.T7();u<v?(r.width=v,c-=r.width,b=!0):u>w?(r.width=w,c-=r.width,b=!0):(p+=t.lp,l.push(r))}q.length=0;q.push.apply(q,l)}while(b);for(d=0;d<q.length;d++)r=q[d],t=r.ge,f=Math.max(0,p>0?c/p:0),r.width=Math.round(t.lp*f),c-=r.width,p-=t.lp}};e.prototype.Jla=
function(b){if(this.dc){for(var c=this.Ly,d=this.dc.Xh(),f=this.dc.Wh(),l=0,p=0,q=0;q<b.length;q++){var r=b[q];r.ge.nq&&(l+=b[q].width,p++)}l+=c*(p-1);if(d>=l)switch(this.kP()){case h.Db:d-=l;break;case h.$e:d=Math.round((d-l)*.5);break;default:d=0}else d=0;for(q=0;q<b.length;q++)if(r=b[q],r.ge.nq){if(f>=r.height)switch(this.mP()){case h.Hc:r.y=f-r.height;break;case h.$d:r.y=Math.round((f-r.height)*.5);break;default:r.y=0}else r.y=0;r.x=d;d+=r.width+c}else r.x=0,r.y=0}};return e}(n)});
define("tdv/view/containers/layout/VerticalLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n,g){return function(k){function e(){return k.call(this)||this}P(e,k);e.prototype.measure=function(){for(var b=new g,c=this.u1(),d=0;d<c.length;d++){var f=c[d];b.width=Math.max(f.sw(),b.width);b.minWidth=Math.max(f.ow(),b.minWidth);b.height+=f.rw();b.minHeight+=f.wA()}this.dc&&(c=Math.max(0,c.length-1)*
this.QI+this.dc.u.ie+this.dc.u.Ef,b.height+=c,b.minHeight+=c,c=this.dc.u.Dd+this.dc.u.De,b.width+=c,b.minWidth+=c);return b};e.prototype.bW=function(b){this.Kla(b);this.Jla(b)};e.prototype.Kla=function(b){if(this.dc){for(var c=0,d=0;d<b.length;d++)b[d].ge.nq&&c++;var f=this.dc.Xh(),l=this.dc.Wh()-Math.max(0,c-1)*this.QI;c=l;var p=0,q=[];for(d=0;d<b.length;d++){var r=b[d],t=r.ge,u=t.lp;r.width=u!==void 0?Math.max(t.ow(),Math.min(t.T7(),Math.round(f*u*.01))):t.sw();u=t.kp;u!==void 0?t.nq?(p+=u,q.push(r)):
r.height=Math.max(t.wA(),Math.min(t.S7(),Math.round(l*u*.01))):(r.height=t.rw(),c-=r.height)}c-=Math.max(0,c-Math.round(l*p*.01));do{b=!1;f=Math.max(0,p>0?c/p:0);l=[];for(d=p=0;d<q.length;d++){r=q[d];t=r.ge;u=Math.round(t.kp*f);var v=t.wA(),w=t.S7();u<v?(r.height=v,c-=r.height,b=!0):u>w?(r.height=w,c-=r.height,b=!0):(p+=t.kp,l.push(r))}q.length=0;q.push.apply(q,l)}while(b);for(d=0;d<q.length;d++)r=q[d],t=r.ge,f=Math.max(0,p>0?c/p:0),r.height=Math.round(t.kp*f),c-=r.height,p-=t.kp}};e.prototype.Jla=
function(b){if(this.dc){for(var c=this.QI,d=this.dc.Wh(),f=this.dc.Xh(),l=0,p=0,q=0;q<b.length;q++){var r=b[q];r.ge.nq&&(l+=r.height,r.width>f&&(f=r.width),p++)}l+=c*(p-1);if(d>=l)switch(this.mP()){case h.Hc:d-=l;break;case h.$d:d=Math.round((d-l)*.5);break;default:d=0}else d=0;for(q=0;q<b.length;q++)if(r=b[q],r.ge.nq){switch(this.kP()){case h.Db:r.x=f-r.width;break;case h.$e:r.x=Math.round((f-r.width)*.5);break;default:r.x=0}r.y=d;d+=r.height+c}else r.x=0,r.y=0}};return e}(n)});
define("tdv/view/containers/BaseContainer","require exports tdv/utils tdv/view/core/UIComponent tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/LayoutMode tdv/view/containers/layout/AbsoluteLayout tdv/view/containers/layout/GridLayout tdv/view/containers/layout/HorizontalLayout tdv/view/containers/layout/VerticalLayout".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(){var q=l.call(this)||this;q.gf("BaseContainer");q.an=null;q.qe=[];q.jq=
[];q.G0=k.ita;q.$xa=[];q.set("contentOpaque",!1);return q}P(p,l);p.prototype.Pb=function(){this.Jl(p.ad)};p.prototype.set=function(q,r){q=="children"?this.bi(r):q=="creationPolicy"?this.ukb(r):n.prototype.set.call(this,q,r)};p.prototype.get=function(q,r){return q=="children"?this.Cb():q=="creationPolicy"?this.G0:n.prototype.get.call(this,q,r)};p.prototype.ukb=function(q){this.G0!=q&&(this.G0=q,this.U5())};p.prototype.bi=function(q){var r=this.Cb(),t=q||[],u=r.filter(function(v){return!t.includes(v)});
for(q=0;q<u.length;q++)this.removeChild(u[q]);u=t.filter(function(v){return!r.includes(v)});for(q=0;q<u.length;q++)this.mb(u[q]);for(q=0;q<t.length;q++)this.rr(t[q],q)};p.prototype.Cb=function(){return this.qe};p.prototype.mb=function(q){q.getParent()&&q.getParent().removeChild(q);this.qe.push(q);q.Ia=this;this.Rva(q);q.yka(this.u.LJ);this.jq.push(q);this.U5();q.bs()};p.prototype.removeChild=function(q){q.getParent()==this&&(q.np(),q.Ia=null,this.jq.includes(q)?this.jq=this.jq.filter(function(r){return r!==
q}):(this.wa().removeChild(q.wa()),q.SD(),this.lc(),this.Bf()),this.qe=this.qe.filter(function(r){return r!==q}),q.Vja())};p.prototype.mQa=function(){var q=this;this.Cb().forEach(function(r){q.removeChild(r)})};p.prototype.moa=function(q){return this.qe.indexOf(q)};p.prototype.rr=function(q,r){var t=this.moa(q);if(t<0)throw"Can't set index. This is not a child of this container";var u=this.qe.slice();u.splice(t,1);u.splice(r,0,q);if(!h.x8(this.qe,u)&&(this.qe=u,!this.jq.includes(q))){r=this.moa(q);
this.wa().removeChild(q.wa());u=t=null;for(var v=r-1;v>=0&&!t;v--)this.jq.includes(this.qe[v])||(t=this.qe[v]);for(v=r+1;v<this.qe.length&&!u&&!t;v++)this.jq.includes(this.qe[v])||(u=this.qe[v]);t?this.wa().NMa(q.wa(),t.wa()):u?this.wa().OMa(q.wa(),u.wa()):this.wa().appendChild(q.wa());this.Bf()}};p.prototype.uI=function(q){l.prototype.uI.call(this,q);this.EGa()};p.prototype.EGa=function(){this.qe.forEach(function(q){this.Rva(q)}.bind(this))};p.prototype.Rva=function(q){q.set("inheritedInteractionEnabled",
this.G("interactionEnabled")&&this.G("inheritedInteractionEnabled")&&this.G("childrenInteractionEnabled"))};p.prototype.pK=function(q){var r=this;l.prototype.pK.call(this,q);this.qe&&this.qe.forEach(function(t){t.yka(r.u.LJ)})};p.prototype.hda=function(q){l.prototype.hda.call(this,q);this.Cb().forEach(function(r){r.Zz()});this.U5()};p.prototype.b3a=function(){return!!(this.VI&&this.LS&&this.Xb())};p.prototype.co=function(q,r,t,u){l.prototype.co.call(this,q,r,t,u);this.$xa=u;this.U5()};p.prototype.SD=
function(){var q=this;l.prototype.SD.call(this);this.Cb().forEach(function(r){q.jq.includes(r)||(q.wa().removeChild(r.wa()),r.SD())});this.jq=this.Cb()};p.prototype.U5=function(){var q=this;this.b3a()&&(this.G0!=k.ita||this.Qy)&&this.jq.length!=0&&(this.jq.forEach(function(r){var t;r.z8(q.VI,q.LS)?(r.co(q.Xb(),q.VI,q.LS,q.$xa),q.wa().appendChild(r.wa())):console.error("Child of class "+r.uA()+" is not compatible with visuals type: "+((t=q.VI)===null||t===void 0?void 0:t.getType()))}),this.jq=[],this.lc(),
this.Bf())};p.prototype.bZ=function(q){this.an!=q&&(this.an&&this.an.LRa(null),(this.an=q)&&this.an.LRa(this))};p.prototype.jb=function(){var q=!1,r=this.G("layout");if(this.S("layout")){switch(r){case e.JB:this.bZ(new c);break;case e.Ni:this.bZ(new d);break;case e.Uk:this.bZ(new f);break;default:this.bZ(new b)}this.$("layout");q=!0}var t=this.an;if(this.S("horizontalAlign")||q)t.fQ(this.G("horizontalAlign")),this.$("horizontalAlign");if(this.S("verticalAlign")||q)t.lQ(this.G("verticalAlign")),this.$("verticalAlign");
if(this.S("gap")||q)r==e.JB?(t.oRa(this.G("gap")),t.M$(this.G("gap"))):r==e.Ni?t.oRa(this.G("gap")):r==e.Uk&&t.M$(this.G("gap")),this.$("gap");if(r==e.JB){if(this.S("itemWidth")||q){var u=this.G("itemWidth"),v=n.Cp(u);v!==void 0?t.clb(v):t.Wkb(u);this.$("itemWidth")}if(this.S("itemHeight")||q)u=this.G("itemHeight"),v=n.Cp(u),v!==void 0?t.blb(v):t.Vkb(u),this.$("itemHeight");this.S("itemMinWidth")&&(t.alb(this.G("itemMinWidth")),this.$("itemMinWidth"));this.S("itemMinHeight")&&(t.$kb(this.G("itemMinHeight")),
this.$("itemMinHeight"));this.S("itemMaxWidth")&&(t.Zkb(this.G("itemMaxWidth")),this.$("itemMaxWidth"));this.S("itemMaxHeight")&&(t.Ykb(this.G("itemMaxHeight")),this.$("itemMaxHeight"))}this.S("childrenInteractionEnabled")&&(this.$("childrenInteractionEnabled"),this.EGa());this.Pc(["cursor"],{cursor:"inheritedCursor"},this.qe,!0,!1);n.prototype.jb.call(this);r==e.JB&&t.Fkb(this.Mo)};p.prototype.Pc=function(q,r,t,u,v){for(var w=0;w<q.length;w++){var x=q[w];if(!u||this.S(x)){for(var y=0;y<t.length;y++)t[y].set(r[x]?
r[x]:x,this.G(x));v&&this.$(x)}}};p.prototype.$y=function(){if(this.an){var q=this.an.measure();this.fn=q.width;this.dn=q.height;this.mT=q.minWidth;this.lT=q.minHeight}else l.prototype.$y.call(this)};p.prototype.Lk=function(){this.an&&this.an.update();n.prototype.Lk.call(this)};p.ad=Object.assign({},n.ad,{children:[[]],childrenInteractionEnabled:!0,gap:0,horizontalAlign:g.fb,itemHeight:void 0,itemMaxHeight:void 0,itemMaxWidth:void 0,itemMinHeight:void 0,itemMinWidth:void 0,itemWidth:void 0,layout:e.TZ,
verticalAlign:g.Tc});return p}(n)});define("tdv/view/core/visuals/Visuals",["require","exports","tdv/events/EventDispatcher"],function(a,m,h){return function(n){function g(){var k=n.call(this)||this;k.K=k.tp();return k}P(g,n);g.prototype.tp=function(){throw Error("Not implemented");};g.prototype.xSa=function(k){var e=this;Object.keys(k).forEach(function(b){e.K[b]=k[b]})};return g}(h)});
define("tdv/view/core/visuals/util",["require","exports"],function(){var a={UIa:function(m){var h=[];if(m.vk&&m.vk.length>0){var n=m.vk.slice();n=[].concat([n[0]],n,[n[n.length-1]]);m=a.Ccb(m);m=[].concat([0],m,[1]);for(var g=0;g<n.length;g++){var k=m[g];k>=0&&h.push({color:n[g],ratio:k})}for(g=0;g<h.length-1;)h[g].ratio==h[g+1].ratio&&h[g].color==h[g+1].color?h.splice(g,1):g++;for(g=1;g<h.length-1;)h[g-1].ratio==h[g+1].ratio?h.splice(g,1):g++}return h},Ccb:function(m){var h=m.vk.length;for(m=m.L6&&
m.vk.length>0?m.L6.map(function(n){return Math.min(1,Math.max(0,n))}):h==1?[.5]:Array.from({length:h}).map(function(n,g){return 1*g/(h-1)});m.length<h;)m.push(1);m.length>h&&m.splice(h,m.length-h);return m}};return a});
define("tdv/view/core/visuals/dom/DOMUIBaseVisuals","require exports tdv/view/constants/GradientDirection tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/core/ZIndex tdv/view/core/visuals/Visuals tdv/view/core/visuals/util tdv/utils".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){var f=c.call(this)||this;f.element=null;f.Ik=null;f.Uh=null;f.Ke=null;f.Fh=null;f.wl=null;f.gw=null;f.rKa=!1;return f}P(d,c);d.prototype.tp=function(){return new n};d.prototype.uk=function(f){this.$D().appendChild(f)};
d.prototype.a$=function(f){this.$D().removeChild(f)};d.prototype.appendChild=function(f){this.$D().appendChild(f.cc())};d.prototype.NMa=function(f,l){this.$D().insertBefore(f.cc(),l.cc().nextSibling)};d.prototype.OMa=function(f,l){this.$D().insertBefore(f.cc(),l.cc())};d.prototype.removeChild=function(f){f=f.cc();f.parentElement==this.$D()&&this.$D().removeChild(f)};d.prototype.cc=function(){this.element||(this.element=document.createElement("div"),this.element.style.height="0",this.element.style.margin=
"0",this.element.style.padding="0",this.element.style.position="absolute",this.element.style.overflow="hidden",this.element.style.display="block",this.element.style.visibility="hidden",this.element.style.width="0",this.element.style.zIndex=g.Qua);return this.element};d.prototype.KLa=function(f){var l=b.offset(this.element);f=b.offset(f.cc());return{left:l.left-f.left,top:l.top-f.top}};d.prototype.bgb=function(){this.Ik||(this.Ik=document.createElement("div"),this.Ik.setAttribute("tdvlayer","shadow"),
this.Ik.style.position="absolute",this.Ik.style.left="0",this.Ik.style.top="0",this.Ik.style.right="0",this.Ik.style.bottom="0",this.Ik.style.zIndex=g.aWa);return this.Ik};d.prototype.U7=function(){this.Fh||(this.Fh=document.createElement("div"),this.Fh.setAttribute("tdvlayer","overShadow"),this.Fh.style.cursor="inherit",this.Fh.style.height="0",this.Fh.style.left="0",this.Fh.style.position="absolute",this.Fh.style.top="0",this.Fh.style.width="0",this.Fh.style.zIndex=g.lua);return this.Fh};d.prototype.afb=
function(){this.Uh||(this.Uh=document.createElement("div"),this.Uh.setAttribute("tdvlayer","filter"),this.Uh.style.cursor="inherit",this.Uh.style.display="none",this.Uh.style.left="0",this.Uh.style.position="absolute",this.Uh.style.top="0",this.Uh.style.userSelect="none",this.Uh.style["-webkit-user-select"]="none",this.Uh.style.zIndex=g.mUa);return this.Uh};d.prototype.Zeb=function(){this.Ke||(this.Ke=document.createElement("canvas"),this.Ke.setAttribute("tdvlayer","background"),this.Ke.style.cursor=
"inherit",this.Ke.style.display="none",this.Ke.style.left="0",this.Ke.style.position="absolute",this.Ke.style.top="0",this.Ke.style.userSelect="none",this.Ke.style["-webkit-user-select"]="none",this.Ke.style.zIndex=g.Gaa);return this.Ke};d.prototype.OLa=function(){this.wl||(this.wl=document.createElement("div"),this.wl.setAttribute("tdvlayer","content"),this.wl.style.position="absolute",this.wl.style.cursor="inherit",this.wl.style.inset="0",this.wl.style.overflow="visible",this.wl.style.zIndex=g.fta);
return this.wl};d.prototype.$D=function(){this.gw||(this.gw=document.createElement("div"),this.gw.style.cursor="inherit",this.gw.style.inset="0",this.gw.style.position="absolute");return this.gw};d.prototype.Gnb=function(){this.rKa||(this.rKa=!0,this.lA())};d.prototype.lA=function(){this.cc().appendChild(this.bgb());this.cc().appendChild(this.U7());this.U7().appendChild(this.afb());this.U7().appendChild(this.Zeb());this.U7().appendChild(this.OLa());this.OLa().appendChild(this.$D())};d.prototype.update=
function(f){this.Gnb();this.rh(f);this.xSa(f)};d.prototype.rh=function(f){this.Pnb(f);this.JK(f);this.bob(f);this.snb(f);this.Nsa(f)};d.prototype.Pnb=function(f){this.K.id!==f.id&&(f.id?this.element.setAttribute("id",f.id.toString()):this.element.removeAttribute("id"));this.K.className!==f.className&&(f.className?this.element.setAttribute("tdvclass",f.className):this.element.removeAttribute("tdvclass"));this.K.tabIndex!==f.tabIndex&&(f.tabIndex!==void 0?this.element.setAttribute("tabIndex",f.tabIndex.toString()):
this.element.removeAttribute("tabIndex"));this.K.ariaLabel!==f.ariaLabel&&(f.ariaLabel?this.element.setAttribute("aria-label",f.ariaLabel):this.element.removeAttribute("aria-label"));this.K.zO!==f.zO&&(f.zO?this.element.setAttribute("aria-role",f.zO):this.element.removeAttribute("aria-role"));this.K.LJ!==f.LJ&&(f.LJ?(this.Fh.style.zIndex=g.lua,this.wl.style.zIndex=g.fta):(this.Fh.style.zIndex=g.IVa,this.wl.style.zIndex=g.pUa));this.K.sY!==f.sY&&(this.element.style.zIndex=f.sY?g.Qua:g.tWa);this.K.cursor!==
f.cursor&&(this.element.style.cursor=f.cursor)};d.prototype.JK=function(f){this.K.opacity!==f.opacity&&(this.element.style.opacity=f.opacity.toString(),f.visible&&f.opacity>=1&&this.K.opacity<1&&this.xjb());if(this.K.x!==f.x||this.K.y!==f.y||this.K.width!==f.width||this.K.height!==f.height||this.K.offsetX!==f.offsetX||this.K.offsetY!==f.offsetY||this.K.visible!==f.visible)f.visible?(this.Fh.style.width=f.width+"px",this.Fh.style.height=f.height+"px",this.element.style.left=(f.x||0)+f.offsetX+"px",
this.element.style.top=(f.y||0)+f.offsetY+"px",this.element.style.width=f.width+"px",this.element.style.height=f.height+"px",this.element.style.visibility="inherit",this.element.style.overflow="visible",f.visible&&this.Fh.clientWidth===0&&f.width!=0&&(this.element.style.width="0",this.element.style.width=f.width+"px")):(this.element.style.visibility="hidden",this.element.style.width="0",this.element.style.height="0",this.element.style.overflow="hidden",this.Fh.style.width="0",this.Fh.style.height=
"0")};d.prototype.Nsa=function(f){this.K.Jw!==f.Jw&&(this.wl.style.overflow=f.Jw?"visible":"hidden",this.gw.style.right=f.Jw?"0":"initial",this.gw.style.bottom=f.Jw?"0":"initial");this.K.Dd!==f.Dd&&(this.wl.style.left=f.Dd+"px");this.K.ie!==f.ie&&(this.wl.style.top=f.ie+"px");this.K.De!==f.De&&(this.wl.style.right=f.De+"px");this.K.Ef!==f.Ef&&(this.wl.style.bottom=f.Ef+"px");this.K.Lc!==f.Lc&&(this.gw.style.left=-f.Lc+"px");this.K.Mc!==f.Mc&&(this.gw.style.top=-f.Mc+"px")};d.prototype.bob=function(f){if(this.K.borderTopLeftRadius!==
f.borderTopLeftRadius||this.K.borderTopRightRadius!==f.borderTopRightRadius||this.K.borderBottomLeftRadius!==f.borderBottomLeftRadius||this.K.borderBottomRightRadius!==f.borderBottomRightRadius||this.K.lB!==f.lB||this.K.hu!==f.hu||this.K.iu!==f.iu||this.K.eo!==f.eo||this.K.wK!==f.wK||this.K.shadowColor!==f.shadowColor||this.K.$w!==f.$w){var l=f.hu+"px "+f.iu+"px "+f.eo+"px "+f.wK+"px "+f.shadowColor;this.Ik.style.display=f.lB?"block":"none";this.Ik.style.boxShadow=l;this.Ik.style.borderTopLeftRadius=
f.borderTopLeftRadius+"px";this.Ik.style.borderTopRightRadius=f.borderTopRightRadius+"px";this.Ik.style.borderBottomLeftRadius=f.borderBottomLeftRadius+"px";this.Ik.style.borderBottomRightRadius=f.borderBottomRightRadius+"px";this.Ik.style.opacity=f.$w.toString()}};d.prototype.snb=function(f){if(this.K.dJ!==f.dJ||this.K.borderTopLeftRadius!==f.borderTopLeftRadius||this.K.borderTopRightRadius!==f.borderTopRightRadius||this.K.borderBottomLeftRadius!==f.borderBottomLeftRadius||this.K.borderBottomRightRadius!==
f.borderBottomRightRadius||this.K.width!==f.width||this.K.height!==f.height||this.K.visible!==f.visible){var l=Math.round(f.dJ*25),p=f.visible&&l>0;p?(this.Uh.style.display="block",this.Uh.style.backdropFilter="blur("+l+"px)",this.Uh.style.borderTopLeftRadius=f.borderTopLeftRadius+"px",this.Uh.style.borderTopRightRadius=f.borderTopRightRadius+"px",this.Uh.style.borderBottomLeftRadius=f.borderBottomLeftRadius+"px",this.Uh.style.borderBottomRightRadius=f.borderBottomRightRadius+"px",this.Uh.style.width=
f.width+"px",this.Uh.style.height=f.height+"px"):this.Uh.style.display="none"}if(this.K.width!==f.width||this.K.height!==f.height||this.K.vk!==f.vk||this.K.OD!==f.OD||this.K.pm!==f.pm||this.K.Te!==f.Te||this.K.borderLeftColor!==f.borderLeftColor||this.K.Ue!==f.Ue||this.K.borderTopColor!==f.borderTopColor||this.K.yf!==f.yf||this.K.borderRightColor!==f.borderRightColor||this.K.xf!==f.xf||this.K.borderBottomColor!==f.borderBottomColor||this.K.aw!==f.aw||this.K.visible!==f.visible){var q=f.vk&&f.vk.length>
0;l=!!f.aw;p=f.Te>0&&f.borderLeftColor||f.Ue>0&&f.borderTopColor||f.yf>0&&f.borderRightColor||f.xf>0&&f.borderBottomColor;if(p=f.visible&&(q||l||p)){p=Math.max(0,f.width-(f.Te+f.yf));var r=Math.max(0,f.height-(f.Ue+f.xf));this.Ke.width=p;this.Ke.height=r;var t=this.Ke.getContext("2d");if(q){q=e.UIa(f);var u=f.OD==h.q_?t.createLinearGradient(0,0,p,0):t.createLinearGradient(0,0,0,r);q.forEach(function(v){u.addColorStop(v.ratio,v.color)});t.fillStyle=u;t.fillRect(0,0,p,r)}else t.clearRect(0,0,p,r);l&&
t.drawImage(f.aw,0,0,p,r);this.Ke.style.opacity=f.pm.toString();this.Ke.style.borderTopLeftRadius=f.borderTopLeftRadius+"px";this.Ke.style.borderTopRightRadius=f.borderTopRightRadius+"px";this.Ke.style.borderBottomLeftRadius=f.borderBottomLeftRadius+"px";this.Ke.style.borderBottomRightRadius=f.borderBottomRightRadius+"px";this.Ke.style.borderLeft=this.E7(f.Te,f.borderLeftColor);this.Ke.style.borderTop=this.E7(f.Ue,f.borderTopColor);this.Ke.style.borderRight=this.E7(f.yf,f.borderRightColor);this.Ke.style.borderBottom=
this.E7(f.xf,f.borderBottomColor);this.Ke.style.width=p+"px";this.Ke.style.height=r+"px";this.Ke.style.display="block";this.Ke.clientWidth===0&&this.Ke.width!==0&&(this.Ke.style.width="0",this.Ke.style.width=this.Ke.width+"px")}else this.Ke.style.display="none"}};d.prototype.xjb=function(){for(var f=this.element.querySelectorAll('[tdvlayer="filter"]'),l=0;l<f.length;l++){var p=f[l],q=p.style.backdropFilter;p.style.display!=="none"&&q&&q!=="none"&&(p.style.backdropFilter=q.indexOf(d.Faa)>=0?q.replace(d.Faa,
""):q+d.Faa)}};d.prototype.E7=function(f,l){return f>0?l?f+"px solid "+l:f+"px solid transparent":"none"};d.Faa=" opacity(1)";return d}(k)});define("tdv/view/core/visualprops/ContainerVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,h){return function(n){function g(){var k=n!==null&&n.apply(this,arguments)||this;k.contentHeight=0;k.contentWidth=0;k.Ck=!1;k.Wg=0;k.Cf=0;k.$t="#000000";k.au=.5;k.ph=10;k.Wn=5;k.Xn=5;k.Mk=!1;return k}P(g,n);return g}(h)});
define("tdv/constants/Key",["require","exports"],function(){var a={ck:38,Ki:40,Db:39,fb:37,kL:32,Mp:65,GWa:90,uo:87,qo:83,Sp:68,Q:81,E:69,x_:187,t_:189,i_:27,ua:{}};a.ua.ck="ArrowUp";a.ua.Ki="ArrowDown";a.ua.Db="ArrowRight";a.ua.fb="ArrowLeft";a.ua.Mp="KeyA";a.ua.GWa="KeyZ";a.ua.uo="KeyW";a.ua.qo="KeyS";a.ua.Sp="KeyD";a.ua.Q="KeyQ";a.ua.E="KeyE";a.ua.x_="BracketRight";a.ua.t_="Slash";a.ua.i_="Escape";a.ua.kL="Space";a.ua.h_="Enter";return a});
define("tdv/view/util/KeyboardControl",["require","exports","tdv/constants/EventName","tdv/constants/Key","tdv/events/EventDispatcher"],function(a,m,h,n,g){a=function(){function e(){}e.yp=function(){return document.activeElement&&document.activeElement!==document.body};e.tfb=function(){return document.activeElement};e.vhb=function(b){return Array.isArray(b)?b.includes(document.activeElement):b==document.activeElement};e.Sqa=function(b,c){b===void 0&&(b=void 0);c===void 0&&(c=void 0);this.Uj||(this.Uj=
document.createElement("div"));document.querySelectorAll("*[tabindex]").forEach(function(d){d.tabIndex>this.Uj.tabIndex&&(this.Uj.tabIndex=d.tabIndex+1)}.bind(this));document.body.appendChild(this.Uj);b!=void 0&&c!=void 0?(this.Uj.style.position="absolute",this.Uj.style.top=c+"px",this.Uj.style.left=b+"px",this.Uj.style.width="1px",this.Uj.style.height="1px"):(this.Uj.style.position="fixed",this.Uj.style.top="0",this.Uj.style.left="0",this.Uj.style.width="100%",this.Uj.style.height="100%");this.Uj.focus();
this.Uj.blur();document.body.removeChild(this.Uj);this.gX.o(h.V)};e.blur=function(){document.activeElement.blur()};e.Sma=function(b){this.WW.push(b)};e.Jqa=function(b){b=this.WW.indexOf(b);b!=-1&&this.WW.splice(b,1)};e.gcb=function(b){this.PY.push(b)};e.Pjb=function(b){b=this.PY.indexOf(b);b!=-1&&this.PY.splice(b,1)};e.iIa=function(b,c){this.gra(b,c.map(function(d){return[d]}))};e.Xbb=function(b,c){this.gra(b,[c])};e.Ubb=function(b,c,d,f){for(var l=[],p=0;p<d;p++)l.push(c.slice(p*f,(p+1)*f));this.gra(b,
l)};e.gra=function(b,c){this.Bna.set(b,new k(c))};e.Iqa=function(b){this.Bna.delete(b)};e.dqa=function(b){if(b.code==n.ua.kL||b.code==n.ua.h_){var c=this.PLa();c&&this.ieb(c)}else b.code!=n.ua.i_&&[n.ua.ck,n.ua.Ki,n.ua.Db,n.ua.fb].includes(b.code)&&this.Bna.forEach(function(d){d.Cgb()&&d.Peb(b.code)})};e.eqa=function(b){b.code==n.ua.kL||b.code==n.ua.h_?(b=this.PLa())?b.dispatchEvent(this.JJa("mouseup",b)):this.PY.length&&this.PY.pop()():b.code==n.ua.i_&&(this.WW.length?this.WW.pop()():this.yp()&&
this.Sqa())};e.lf=function(b){!b.isTrusted||b.target&&["BUTTON","INPUT","SELECT","TEXTAREA"].includes(b.target.tagName)||setTimeout(function(){this.Sqa(b.pageX,b.pageY)}.bind(this),0)};e.vib=function(){this.gX.o(h.V)};e.ieb=function(b){b.dispatchEvent(this.JJa("mousedown",b))};e.PLa=function(){return this.yp()?document.activeElement:null};e.JJa=function(b,c){c=c.getBoundingClientRect();return new window.MouseEvent(b,{clientX:c.left+c.width/2,clientY:c.top+c.height/2})};e.Wa=function(){document.addEventListener("mouseup",
this.lf.bind(this),!0);document.addEventListener("keydown",this.dqa.bind(this),!0);document.addEventListener("keyup",this.eqa.bind(this),!0);document.addEventListener("focusin",this.vib.bind(this),!0)};e.gX=new g;e.Uj=null;e.WW=[];e.PY=[];e.Bna=new Map;return e}();var k=function(){function e(b){b===void 0&&(b=[]);this.ZO=b}e.prototype.Cgb=function(){return this.iLa()!=null};e.prototype.iLa=function(){for(var b=document.activeElement,c=0;c<this.ZO.length;c++)for(var d=0;d<this.ZO[c].length;d++)if(this.ZO[c][d]==
b)return{ekb:c,mdb:d};return null};e.prototype.Peb=function(b){var c=this.iLa();if(c!=null){var d=0,f=0;switch(b){case n.ua.Db:d=1;break;case n.ua.fb:d=-1;break;case n.ua.ck:f=-1;break;case n.ua.Ki:f=1}b=c.ekb+f;b<0||b>=this.ZO.length||(c=c.mdb+d,c<0||c>=this.ZO[b].length||this.ZO[b][c].focus())}};return e}();return a});
define("tdv/view/containers/ScrollableContainer","require exports tdv/constants/EventName tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/OverflowPolicy tdv/view/constants/ScrollBarVisiblePolicy tdv/view/containers/BaseContainer tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/ContainerVisualProperties tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/KeyboardControl".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q){return function(r){function t(){var u=
r.call(this)||this;u.gf("ScrollableContainer");u.cxa=0;u.dxa=0;u.hn=!1;u.jn=!1;u.Dpb=!1;u.ypb=!1;u.kka=!1;u.Vs=null;u.Qia=k.Ata;u.wS=!1;u.mW=!1;u.uja=void 0;u.vja=void 0;return u}P(t,r);t.prototype.VL=function(){return new d};t.prototype.Zz=function(){r.prototype.Zz.call(this);this.Qy?(q.gX.bind(h.V,this.uia,this,!1),this.uia()):q.gX.h(h.V,this.uia,this)};t.prototype.uia=function(){if(q.yp()){var u=this.wa();u&&u instanceof c&&(u=this.Cb().map(function(v){return v.wa().cc()}).indexOf(q.tfb()),u!==
-1&&this.scrollIntoView(this.Cb()[u]))}};t.prototype.scrollIntoView=function(u){var v=u.nw(),w=u.tA();this.scrollTo(Math.min(v,Math.max(v+u.nb()-this.u.Cf,this.u.Lc)),Math.min(w,Math.max(w+u.Mb()-this.u.Wg,this.u.Mc)))};t.prototype.scrollTo=function(u,v){var w=this.u.Lc;u>this.u.Lc?this.U6()&&(w=Math.min(u,this.u.contentWidth-this.u.Cf)):u<this.u.Lc&&this.T6()&&(w=Math.max(u,0));u=this.u.Mc;v>this.u.Mc?this.JO()&&(u=Math.min(v,this.u.contentHeight-this.u.Wg)):v<this.u.Mc&&this.LO()&&(u=Math.max(v,
0));this.DV(w,u)};t.prototype.JQa=function(){if(this.JO()){for(var u=Math.max(0,this.u.contentHeight-this.u.Wg),v=Math.min(u,this.u.Mc+this.u.Wg*.5),w=u=Math.min(u,this.u.Mc+this.u.Wg),x=this.Cb().slice(),y=x.shift();x.length;y=x.shift())if(y.get("visible")){var z=y.tA();z+y.Mb()>this.u.Mc+this.u.Wg&&z>=v&&z<u&&z<w&&(w=z)}this.DV(this.u.Lc,w)}};t.prototype.JO=function(){return this.MO()&&this.u.Mc+this.u.Wg<this.u.contentHeight};t.prototype.NQa=function(){if(this.LO()){for(var u=Math.max(0,this.u.Mc-
this.u.Wg),v=Math.max(0,this.u.Mc-this.u.Wg*.5),w=u,x=this.Cb().slice(),y=x.shift();x.length;y=x.shift())if(y.get("visible")){var z=y.tA();y=z+y.Mb();z<this.u.Mc&&y>=u+this.u.Wg&&y<v+this.u.Wg&&y>w+this.u.Wg&&(w=y-this.u.Wg)}this.DV(this.u.Lc,w)}};t.prototype.LO=function(){return this.MO()&&this.u.Mc>0};t.prototype.MQa=function(){if(this.U6()){for(var u=Math.max(0,this.u.contentWidth-this.u.Cf),v=Math.min(u,this.u.Lc+this.u.Cf*.5),w=u=Math.min(u,this.u.Lc+this.u.Cf),x=this.Cb().slice(),y=x.shift();x.length;y=
x.shift())if(y.get("visible")){var z=y.nw();z+y.nb()>this.u.Lc+this.u.Cf&&z>=v&&z<u&&z<w&&(w=z)}this.DV(w,this.u.Mc)}};t.prototype.U6=function(){return this.KO()&&this.u.Lc+this.u.Cf<this.u.contentWidth};t.prototype.scrollLeft=function(){if(this.T6()){for(var u=Math.max(0,this.u.Lc-this.u.Cf),v=Math.max(0,this.u.Lc-this.u.Cf*.5),w=u,x=this.Cb().slice(),y=x.shift();x.length;y=x.shift())if(y.get("visible")){var z=y.nw();y=z+y.nb();z<this.u.Lc&&y>=u+this.u.Cf&&y<v+this.u.Cf&&y>w+this.u.Cf&&(w=y-this.u.Cf)}this.DV(w,
this.u.Mc)}};t.prototype.T6=function(){return this.KO()&&this.u.Lc>0};t.prototype.DV=function(u,v){this.Ww(this.u.Lc!=u);this.Xw(this.u.Mc!=v);this.hW();this.mcb(u,v)};t.prototype.MO=function(){return this.mW&&this.u.Wg<this.u.contentHeight};t.prototype.KO=function(){return this.wS&&this.u.Cf<this.u.contentWidth};t.prototype.Pb=function(){this.Jl(t.ad)};t.prototype.KP=function(u,v,w){var x=1,y=1;w=="content"?(x=this.u.contentWidth,y=this.u.contentHeight):w=="page"&&(x=this.u.Cf,y=this.u.Wg);this.u.Lc+=
u*x;this.u.Mc+=v*y;this.MI()};t.prototype.mcb=function(u,v){var w=[];this.u.Lc!=u&&w.push(new p("hScrollPosition",this.u.Lc,u));this.u.Mc!=v&&w.push(new p("vScrollPosition",this.u.Mc,v));w.length!=0&&(this.Vs=new l("cubic_in_out",w,500),f.requestFrame(this.Cia,this))};t.prototype.lIa=function(u,v,w){var x=[];u&&x.push(new p("hScrollPosition",this.u.Lc,this.u.Lc+u));v&&x.push(new p("vScrollPosition",this.u.Mc,this.u.Mc+v));x.length==0?this.Vs||(this.Ww(!1),this.Xw(!1)):(this.Vs=new l("linear",x,w),
f.requestFrame(this.Cia,this))};t.prototype.Cia=function(u){if(this.Vs&&!this.Vs.Ve()){this.Vs.Nb(u);var v=u=!1;this.Vs.pX("hScrollPosition")&&(this.u.Lc=this.Vs.ob("hScrollPosition"),u=this.u.Lc<0||this.u.Lc>this.u.contentWidth-this.u.Cf?!1:!0);this.Vs.pX("vScrollPosition")&&(this.u.Mc=this.Vs.ob("vScrollPosition"),v=this.u.Mc<0||this.u.Mc>this.u.contentHeight-this.u.Wg?!1:!0);this.Ww(u);this.Xw(v);this.MI();f.requestFrame(this.Cia,this)}else this.Ww(!1),this.Xw(!1),this.Vs=null};t.prototype.MI=
function(u){if(u){if(!this.wS)switch(this.G("horizontalAlign")){case g.Db:this.u.Lc=this.u.contentWidth-this.u.Cf;break;case g.$e:this.u.Lc=(this.u.contentWidth-this.u.Cf)/2;break;default:this.u.Lc=0}if(!this.mW)switch(this.G("verticalAlign")){case g.Hc:this.u.Mc=this.u.contentHeight-this.u.Wg;break;case g.$d:this.u.Mc=(this.u.contentHeight-this.u.Wg)/2;break;default:this.u.Mc=0}}this.u.Lc=Math.max(0,Math.min(this.u.contentWidth-this.u.Cf,this.u.Lc));this.u.Mc=Math.max(0,Math.min(this.u.contentHeight-
this.u.Wg,this.u.Mc));this.J8a(this.u.Lc);this.u9a(this.u.Mc);this.tb();if(this.uja!=this.u.Lc||this.vja!=this.u.Mc)this.uja!==void 0&&this.vja!==void 0&&this.o(new n(h.Wr)),this.uja=this.u.Lc,this.vja=this.u.Mc};t.prototype.$E=function(u){this.kka!==u&&(this.kka=u,this.hW())};t.prototype.Ww=function(u){this.hn!==u&&(this.hn=u,this.hW())};t.prototype.Xw=function(u){this.jn!==u&&(this.jn=u,this.hW())};t.prototype.hW=function(){var u=this.get("scrollBarVisible")==e.ALWAYS||this.hn||this.jn||this.kka;
this.u.Ck=this.wS&&u;this.u.Mk=this.mW&&u;this.tb()};t.prototype.jb=function(){this.S("overflow")&&(this.Qia=this.G("overflow"),this.$("overflow"),this.Bf());this.S("scrollBarColor")&&(this.u.$t=this.G("scrollBarColor"),this.$("scrollBarColor"));this.S("scrollBarWidth")&&(this.u.ph=this.G("scrollBarWidth"),this.$("scrollBarWidth"));if(this.S("scrollBarMargin")||this.S("scrollBarVerticalMargin")||this.S("scrollBarHorizontalMargin"))this.u.Wn=this.G("scrollBarHorizontalMargin","scrollBarMargin"),this.u.Xn=
this.G("scrollBarVerticalMargin","scrollBarMargin"),this.$("scrollBarMargin"),this.$("scrollBarVerticalMargin"),this.$("scrollBarHorizontalMargin");this.S("scrollBarOpacity")&&(this.u.au=this.G("scrollBarOpacity"),this.$("scrollBarOpacity"));r.prototype.jb.call(this)};t.prototype.Lk=function(){r.prototype.Lk.call(this);this.sab();this.Pab();this.Nab();this.hW();this.tb()};t.prototype.sab=function(){for(var u=0,v=0,w=0,x=0,y=this.Cb(),z=0;z<y.length;z++){var A=y[z];A.get("visible")&&(x=Math.min(x,
A.nw()),w=Math.min(w,A.tA()),u=Math.max(u,A.nw()+A.nb()),v=Math.max(v,A.tA()+A.Mb()))}this.cxa=x;this.dxa=w;this.u.contentWidth=u;this.u.contentHeight=v};t.prototype.Pab=function(){this.u.Cf=Math.min(this.Xh(),this.u.contentWidth);this.u.Wg=Math.min(this.Wh(),this.u.contentHeight)};t.prototype.Nab=function(){var u=this.qe.some(function(w){return w.Jgb()}),v=this.cxa<0||this.dxa<0||this.u.contentWidth>this.u.Cf||this.u.contentHeight>this.u.Wg;this.Qia==k.Wr?(this.wS=this.u.Cf<this.u.contentWidth,this.mW=
this.u.Wg<this.u.contentHeight,this.JN(!v&&!u)):(this.mW=this.wS=!1,this.Qia==k.mL?this.JN(!0):this.JN(!v&&!u));this.MI(!0)};t.ad=Object.assign({},b.ad,{overflow:k.mL,scrollBarColor:"#000000",scrollBarWidth:10,scrollBarMargin:5,scrollBarHorizontalMargin:void 0,scrollBarVerticalMargin:void 0,scrollBarOpacity:.5,scrollBarVisible:e.uc});return t}(b)});
define("tdv/view/containers/Container",["require","exports","tdv/view/containers/ScrollableContainer"],function(a,m,h){return function(n){function g(){var k=n.call(this)||this;k.gf("Container");return k}P(g,n);return g}(h)});define("tdv/view/constants/Direction",["require","exports"],function(){return{Uk:"vertical",Ni:"horizontal"}});
define("tdv/view/core/visualprops/LabelVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties","tdv/view/constants/Alignment","tdv/view/constants/Direction"],function(a,m,h,n,g){return function(k){function e(){var b=k!==null&&k.apply(this,arguments)||this;b.direction=g.Ni;b.zt=void 0;b.fontFamily=void 0;b.w7=!1;b.fontSize=void 0;b.fontStyle="normal";b.fontWeight="normal";b.Yh=n.fb;b.verticalAlign=n.$d;b.textDecoration="none";b.lu=0;b.mu=0;b.fo=3;b.bx=0;b.eF="#000000";
b.text="";return b}P(e,k);return e}(h)});
define("tdv/view/util/Font",["require","exports"],function(){return function(){function a(){}a.rA=function(m){return m?m.split(",").map(function(h){return h.trim()}).filter(function(h){return h!=""}).map(function(h){h[0]!="'"&&h[0]!='"'&&(h="'"+h+"'");return h}).join(", "):""};a.Y7=function(m){var h=[];m.fontStyle?h.push(m.fontStyle):h.push("normal");m.fontWeight?h.push(m.fontWeight):h.push("normal");m.fontSize?typeof m.fontSize==="number"?h.push(m.fontSize+"px"):h.push(m.fontSize):h.push("12px");
m.fontFamily?h.push(a.rA(m.fontFamily)):h.push("Arial");return h.join(" ")};return a}()});
define("tdv/view/text/Label","require exports tdv/utils tdv/view/constants/Alignment tdv/view/constants/Direction tdv/view/core/UIComponent tdv/view/core/visualprops/LabelVisualProperties tdv/view/util/Font".split(" "),function(a,m,h,n,g,k,e,b){a=function(d){function f(){var l=d.call(this)||this;l.Aha=null;l.gf("Label");l.JN(!1);return l}P(f,d);f.prototype.wa=function(){return d.prototype.wa.call(this)};f.prototype.VL=function(){return new e};f.prototype.Pb=function(){this.Jl(f.ad)};f.prototype.$y=
function(){this.pu();d.prototype.$y.call(this);this.fn=this.zJ()+this.u.Dd+this.u.De;this.dn=this.yJ()+this.u.ie+this.u.Ef;c(this)};f.prototype.h5=function(l){this.u.text!==l&&(this.u.text=l,setTimeout(function(){this.lc();this.tb()}.bind(this),0))};f.prototype.q8a=function(l){this.u.direction!==l&&(this.u.direction=l,setTimeout(function(){this.lc();this.tb()}.bind(this),0))};f.prototype.y8a=function(l){this.u.fontFamily!==l&&(this.u.fontFamily=l,this.r8(),this.lc(),this.tb())};f.prototype.z8a=function(l){this.u.fontSize!==
l&&(h.$Ma(l)?this.u.fontSize=l:h.FA(l)&&l.match(/^\d+(\.\d+)?px$/)?this.u.fontSize=parseFloat(l):this.u.fontSize=void 0,this.r8(),this.lc(),this.Bf(),this.tb())};f.prototype.x8a=function(l){this.u.zt!==l&&(this.u.zt=l,this.tb())};f.prototype.B8a=function(l){if(this.u.fontWeight!==l){switch(l){case "bold":case "bolder":case "lighter":case "100":case "200":case "300":case "400":case "500":case "600":case "700":case "800":case "900":case "normal":break;default:l="normal"}this.u.fontWeight=l;this.r8();
this.lc();this.tb()}};f.prototype.A8a=function(l){if(this.u.fontStyle!==l){switch(l){case "italic":case "normal":break;default:l="normal"}this.u.fontStyle=l;this.r8();this.lc();this.tb()}};f.prototype.m9a=function(l){if(this.u.textDecoration!==l){switch(l){case "underline":case "overline":case "line-through":case "none":break;default:l="none"}this.u.textDecoration=l;this.lc();this.tb()}};f.prototype.I8a=function(l){this.u.Yh!==l&&(this.u.Yh=l,this.tb())};f.prototype.t9a=function(l){this.u.verticalAlign!==
l&&(this.u.verticalAlign=l,this.tb())};f.prototype.QEa=function(l){this.u.w7!==l&&(this.u.w7=l,this.lc(),this.tb())};f.prototype.n9a=function(l,p,q,r,t){if(this.u.lu!==l||this.u.mu!==p||this.u.fo!==q||this.u.bx!==r||this.u.eF!==t)this.u.lu=l,this.u.mu=p,this.u.fo=q,this.u.bx=r,this.u.eF=t,this.tb()};f.prototype.jb=function(){var l=this;this.S("direction")&&(this.q8a(this.G("direction")),this.$("direction"));if(this.S("text")){var p=this.G("text");this.h5(p===void 0?"":p.toString());this.$("text")}this.S("fontFamily")&&
(this.y8a(this.G("fontFamily")),this.$("fontFamily"));this.S("fontSize")&&(this.z8a(this.G("fontSize")),this.$("fontSize"));this.S("fontColor")&&(this.x8a(this.G("fontColor")),this.$("fontColor"));this.S("fontWeight")&&(this.B8a(this.G("fontWeight")),this.$("fontWeight"));this.S("fontStyle")&&(this.A8a(this.G("fontStyle")),this.$("fontStyle"));this.S("textDecoration")&&(this.m9a(this.G("textDecoration")),this.$("textDecoration"));this.S("horizontalAlign")&&(this.I8a(this.G("horizontalAlign")),this.Bf(),
this.$("horizontalAlign"));this.S("verticalAlign")&&(this.t9a(this.G("verticalAlign")),this.Bf(),this.$("verticalAlign"));p=["textShadowColor","textShadowHorizontalLength","textShadowVerticalLength","textShadowBlurRadius","textShadowOpacity"];if(p.some(function(r){return l.S(r)})){var q={};p.forEach(function(r){q[r]=l.G(r);l.$(r)});this.n9a(q.textShadowHorizontalLength,q.textShadowVerticalLength,q.textShadowBlurRadius,q.textShadowOpacity,q.textShadowColor);this.JN((q.textShadowHorizontalLength>0||
q.textShadowVerticalLength>0||q.textShadowBlurRadius>0)&&q.textShadowOpacity>0)}d.prototype.jb.call(this)};f.prototype.r8=function(){var l=this,p=b.Y7({fontSize:this.u.fontSize,fontFamily:this.u.fontFamily,fontWeight:this.u.fontWeight,fontStyle:this.u.fontStyle});this.Aha!==p&&(this.QEa(!1),this.Aha=p,document.fonts.load(p).then(function(){l.Aha===p&&l.QEa(!0)}))};f.prototype.zJ=function(){return this.wa().zJ()};f.prototype.yJ=function(){return this.wa().yJ()};f.ad=Object.assign({},k.ad,{fontFamily:void 0,
fontSize:void 0,fontColor:void 0,fontWeight:void 0,fontStyle:void 0,horizontalAlign:n.fb,verticalAlign:n.$d,direction:g.Ni,text:"",textDecoration:void 0,textShadowBlurRadius:3,textShadowColor:"#000000",textShadowHorizontalLength:0,textShadowOpacity:0,textShadowVerticalLength:0});return f}(k);var c=function(){function d(){p||f()&&(p=setTimeout(function(){p=null;var q=(new Date).getTime()-5E3,r;for(r in l){var t=l[r];t.timestamp<q&&delete l[r];var u=t.label;if(t.width!=u.zJ()||t.height!=u.yJ())u.lc(),
u.Bf()}d()},500))}function f(){for(var q in l)return!0;return!1}var l={},p=null;return function(q){l[q.mH]={label:q,timestamp:(new Date).getTime(),width:q.zJ(),height:q.yJ()};d()}}();return a});
define("tdv/view/buttons/BaseButton","require exports tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/constants/EventName tdv/events/Event tdv/view/buttons/ButtonGroup tdv/view/constants/ButtonMode tdv/view/constants/OverflowPolicy tdv/view/constants/State tdv/view/containers/Container tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){var p="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),
q={};p.forEach(function(r){q[r]=r});return function(r){function t(){var u=r.call(this)||this;u.gf("Button");u.Era("Button");u.Za=null;u.Cj=null;u.set("childrenInteractionEnabled",!1);u.set("contentOpaque",!0);u.set("creationPolicy",h.cL);u.set("overflow",c.Ata);u.set("autoRolledOver",!0);u.set("autoPressed",!0);u.set("cursor",n.qf);u.set("ariaRole","button");return u}P(t,r);t.prototype.Pb=function(){r.prototype.Pb.call(this);this.m("label");this.m("fontFamily");this.m("fontSize");this.m("fontColor");
this.m("fontWeight");this.m("fontStyle");this.m("textDecoration");this.m("textShadowBlurRadius");this.m("textShadowColor");this.m("textShadowHorizontalLength");this.m("textShadowOpacity");this.m("textShadowVerticalLength");this.m("layout","horizontal");this.m("iconWidth");this.m("iconHeight");this.m("iconBeforeLabel");this.m("gap",5);this.m("mode",b.af);this.m("buttonGroup");this.m("paddingLeft",5);this.m("paddingTop",5);this.m("paddingRight",5);this.m("paddingBottom",5);this.m("pressed");this.D("rollOverOpacity",
d.ea,"opacity");this.D("rollOverIconWidth",d.ea,"iconWidth");this.D("rollOverIconHeight",d.ea,"iconHeight");this.D("rollOverFontSize",d.ea,"fontSize");this.D("rollOverFontColor",d.ea,"fontColor");this.D("rollOverFontFamily",d.ea,"fontFamily");this.D("rollOverFontWeight",d.ea,"fontWeight");this.D("rollOverFontStyle",d.ea,"fontStyle");this.D("rollOverTextDecoration",d.ea,"textDecoration");this.D("rollOverTextShadowBlurRadius",d.ea,"textShadowBlurRadius");this.D("rollOverTextShadowColor",d.ea,"textShadowColor");
this.D("rollOverTextShadowHorizontalLength",d.ea,"textShadowHorizontalLength");this.D("rollOverTextShadowOpacity",d.ea,"textShadowOpacity");this.D("rollOverTextShadowVerticalLength",d.ea,"textShadowVerticalLength");this.D("rollOverBorderSize",d.ea,"borderSize");this.D("rollOverBorderLeftSize",d.ea,"borderLeftSize");this.D("rollOverBorderTopSize",d.ea,"borderTopSize");this.D("rollOverBorderRightSize",d.ea,"borderRightSize");this.D("rollOverBorderBottomSize",d.ea,"borderBottomSize");this.D("rollOverBorderColor",
d.ea,"borderColor");this.D("rollOverBorderLeftColor",d.ea,"borderLeftColor");this.D("rollOverBorderTopColor",d.ea,"borderTopColor");this.D("rollOverBorderRightColor",d.ea,"borderRightColor");this.D("rollOverBorderBottomColor",d.ea,"borderBottomColor");this.D("rollOverShadow",d.ea,"shadow");this.D("rollOverShadowHorizontalLength",d.ea,"shadowHorizontalLength");this.D("rollOverShadowVerticalLength",d.ea,"shadowVerticalLength");this.D("rollOverShadowBlurRadius",d.ea,"shadowBlurRadius");this.D("rollOverShadowSpread",
d.ea,"shadowSpread");this.D("rollOverShadowOpacity",d.ea,"shadowOpacity");this.D("rollOverShadowColor",d.ea,"shadowColor");this.D("rollOverBackgroundBlur",d.ea,"backgroundBlur");this.D("rollOverBackgroundOpacity",d.ea,"backgroundOpacity");this.D("rollOverBackgroundColor",d.ea,"backgroundColor");this.D("rollOverBackgroundColorRatios",d.ea,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",d.ea,"backgroundColorDirection");this.D("pressedLabel",d.Fb,"label");this.D("pressedOpacity",d.Fb,
"opacity");this.D("pressedIconWidth",d.Fb,"iconWidth");this.D("pressedIconHeight",d.Fb,"iconHeight");this.D("pressedFontSize",d.Fb,"fontSize");this.D("pressedFontColor",d.Fb,"fontColor");this.D("pressedFontFamily",d.Fb,"fontFamily");this.D("pressedFontWeight",d.Fb,"fontWeight");this.D("pressedFontStyle",d.Fb,"fontStyle");this.D("pressedTextDecoration",d.Fb,"textDecoration");this.D("pressedTextShadowBlurRadius",d.Fb,"textShadowBlurRadius");this.D("pressedTextShadowColor",d.Fb,"textShadowColor");this.D("pressedTextShadowHorizontalLength",
d.Fb,"textShadowHorizontalLength");this.D("pressedTextShadowOpacity",d.Fb,"textShadowOpacity");this.D("pressedTextShadowVerticalLength",d.Fb,"textShadowVerticalLength");this.D("pressedBorderSize",d.Fb,"borderSize");this.D("pressedBorderLeftSize",d.Fb,"borderLeftSize");this.D("pressedBorderTopSize",d.Fb,"borderTopSize");this.D("pressedBorderRightSize",d.Fb,"borderRightSize");this.D("pressedBorderBottomSize",d.Fb,"borderBottomSize");this.D("pressedBorderColor",d.Fb,"borderColor");this.D("pressedBorderLeftColor",
d.Fb,"borderLeftColor");this.D("pressedBorderTopColor",d.Fb,"borderTopColor");this.D("pressedBorderRightColor",d.Fb,"borderRightColor");this.D("pressedBorderBottomColor",d.Fb,"borderBottomColor");this.D("pressedShadow",d.Fb,"shadow");this.D("pressedShadowHorizontalLength",d.Fb,"shadowHorizontalLength");this.D("pressedShadowVerticalLength",d.Fb,"shadowVerticalLength");this.D("pressedShadowBlurRadius",d.Fb,"shadowBlurRadius");this.D("pressedShadowSpread",d.Fb,"shadowSpread");this.D("pressedShadowOpacity",
d.Fb,"shadowOpacity");this.D("pressedShadowColor",d.Fb,"shadowColor");this.D("pressedBackgroundBlur",d.Fb,"backgroundBlur");this.D("pressedBackgroundOpacity",d.Fb,"backgroundOpacity");this.D("pressedBackgroundColor",d.Fb,"backgroundColor");this.D("pressedBackgroundColorRatios",d.Fb,"backgroundColorRatios");this.D("pressedBackgroundColorDirection",d.Fb,"backgroundColorDirection");this.D("pressedLabel",d.qc,"label");this.D("pressedRollOverOpacity",d.qc,"opacity");this.D("pressedRollOverIconWidth",d.qc,
"iconWidth");this.D("pressedRollOverIconHeight",d.qc,"iconHeight");this.D("pressedRollOverFontSize",d.qc,"fontSize");this.D("pressedRollOverFontColor",d.qc,"fontColor");this.D("pressedRollOverFontFamily",d.qc,"fontFamily");this.D("pressedRollOverFontWeight",d.qc,"fontWeight");this.D("pressedRollOverFontStyle",d.qc,"fontStyle");this.D("pressedRollOverTextDecoration",d.qc,"textDecoration");this.D("pressedRollOverTextShadowBlurRadius",d.qc,"textShadowBlurRadius");this.D("pressedRollOverTextShadowColor",
d.qc,"textShadowColor");this.D("pressedRollOverTextShadowHorizontalLength",d.qc,"textShadowHorizontalLength");this.D("pressedRollOverTextShadowOpacity",d.qc,"textShadowOpacity");this.D("pressedRollOverTextShadowVerticalLength",d.qc,"textShadowVerticalLength");this.D("pressedRollOverBorderSize",d.qc,"borderSize");this.D("pressedRollOverBorderLeftSize",d.qc,"borderLeftSize");this.D("pressedRollOverBorderTopSize",d.qc,"borderTopSize");this.D("pressedRollOverBorderRightSize",d.qc,"borderRightSize");this.D("pressedRollOverBorderBottomSize",
d.qc,"borderBottomSize");this.D("pressedRollOverBorderColor",d.qc,"borderColor");this.D("pressedRollOverBorderLeftColor",d.qc,"borderLeftColor");this.D("pressedRollOverBorderTopColor",d.qc,"borderTopColor");this.D("pressedRollOverBorderRightColor",d.qc,"borderRightColor");this.D("pressedRollOverBorderBottomColor",d.qc,"borderBottomColor");this.D("pressedRollOverShadow",d.qc,"shadow");this.D("pressedRollOverShadowHorizontalLength",d.qc,"shadowHorizontalLength");this.D("pressedRollOverShadowVerticalLength",
d.qc,"shadowVerticalLength");this.D("pressedRollOverShadowBlurRadius",d.qc,"shadowBlurRadius");this.D("pressedRollOverShadowSpread",d.qc,"shadowSpread");this.D("pressedRollOverShadowOpacity",d.qc,"shadowOpacity");this.D("pressedRollOverShadowColor",d.qc,"shadowColor");this.D("pressedRollOverBackgroundBlur",d.qc,"backgroundBlur");this.D("pressedRollOverBackgroundOpacity",d.qc,"backgroundOpacity");this.D("pressedRollOverBackgroundColor",d.qc,"backgroundColor");this.D("pressedRollOverBackgroundColorRatios",
d.qc,"backgroundColorRatios");this.D("pressedRollOverBackgroundColorDirection",d.qc,"backgroundColorDirection")};t.prototype.hea=function(){};t.prototype.Kb=function(){r.prototype.Kb.call(this);this.Cj||(this.Cj=this.hea(),this.mb(this.Cj));this.Za||(this.Za=new l,this.mb(this.Za))};t.prototype.uR=function(){this.get("pressed")?(this.set("pressed",!1),this.o(new k(g.Nm))):(this.set("pressed",!0),this.o(new k(g.Rk)))};t.prototype.Vx=function(){return this.get("label")||r.prototype.Vx.call(this)};t.prototype.set=
function(u,v){u=="mode"&&(this.h(g.ma,this.uR,this),v==b.bk&&this.bind(g.ma,this.uR,this,!0),this.set("autoPressed",v==b.af));r.prototype.set.call(this,u,v)};t.prototype.jb=function(){if(this.S("mode")||this.S("pressed"))this.G("mode")==b.bk?this.KN(this.G("pressed")==1):this.S("mode")&&this.KN(!1),this.$("mode");if(this.S("label")){var u=this.G("label");this.Za.set("text",u);this.Za.set("visible",u?!0:!1);this.$("label")}this.Pc(t.PWa,t.QWa,[this.Za],!0,!0);this.S("iconBeforeLabel")&&(this.G("iconBeforeLabel")==
0?this.rr(this.Za,0):this.rr(this.Cj,0),this.$("iconBeforeLabel"));this.S("iconWidth")&&(this.Cj.set("width",this.G("iconWidth")),this.$("iconWidth"));this.S("iconHeight")&&(this.Cj.set("height",this.G("iconHeight")),this.$("iconHeight"));this.S("buttonGroup")&&((u=this.G("buttonGroup"))?e.register(this,u):e.unregister(this),this.$("buttonGroup"));this.Pc(["horizontalAlign","verticalAlign"],{},[this.Cj],!0,!1);r.prototype.jb.call(this)};t.PWa=p;t.QWa=q;return t}(f)});
define("tdv/player/script/BaseButton",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/BaseButton"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/buttons/BaseButton");return m.define("BaseButton",h,function(){h.call(this)})});define("tdv/player/script/BaseObject",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("BaseObject",m,function(){m.call(this)})});
define("tdv/view/containers/HorizontalContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.Pb=function(){this.Jl(k.ad)};k.ad=Object.assign({},h.ad,{layout:n.Ni});return k}(h)});
define("tdv/view/containers/VerticalContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.Pb=function(){this.Jl(k.ad)};k.ad=Object.assign({},h.ad,{layout:n.Uk});return k}(h)});
define("tdv/view/core/visualprops/CanvasVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,h){return function(n){function g(){var k=n!==null&&n.apply(this,arguments)||this;k.canvas=null;k.V6=0;return k}P(g,n);return g}(h)});
define("tdv/view/canvas/Canvas","require exports tdv/constants/EventName tdv/events/Event tdv/view/core/UIComponent tdv/view/core/visualprops/CanvasVisualProperties".split(" "),function(a,m,h,n,g,k){return function(e){function b(){var c=e.call(this)||this;c.jZa=function(){c.NX()};c.gf("Canvas");c.Wea=!0;c.u.canvas=null;c.bind(h.Rb,c.jZa,c,!1);return c}P(b,e);b.prototype.VL=function(){return new k};b.prototype.NX=function(){this.Wea=!0;this.tb()};b.prototype.Kb=function(){e.prototype.Kb.call(this);
this.u.canvas||(this.u.canvas=document.createElement("canvas"))};b.prototype.jb=function(){this.bda("paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "))&&this.NX();e.prototype.jb.call(this)};b.prototype.pu=function(){this.Wea&&(this.Wea=!1,this.u.canvas.width=
this.Xh(),this.u.canvas.height=this.Wh(),this.u.V6+=1,this.xsa());e.prototype.pu.call(this)};b.prototype.gLa=function(){return this.u.canvas.getContext("2d")};b.prototype.xsa=function(){this.o(new n(h.V))};return b}(g)});
define("tdv/view/buttons/CanvasButton","require exports tdv/constants/EventName tdv/view/constants/State tdv/view/buttons/BaseButton tdv/view/canvas/Canvas".split(" "),function(a,m,h,n,g,k){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.Lk=function(){e.prototype.Lk.call(this)};b.prototype.Pb=function(){e.prototype.Pb.call(this);this.m("iconColor");this.D("rollOverIconColor",n.ea,"iconColor");this.D("pressedIconColor",n.Fb,"iconColor");this.D("pressedRollOverIconColor",
n.qc,"iconColor")};b.prototype.hea=function(){var c=new k;c.bind(h.V,this.tTa,this,!0);return c};b.prototype.jb=function(){this.S("iconColor")&&(this.Cj.NX(),this.$("iconColor"));e.prototype.jb.call(this)};b.prototype.U1a=function(){return this.G("iconColor")};b.prototype.V1a=function(){return this.Cj.gLa()};b.prototype.tTa=function(){};return b}(g)});
define("tdv/view/buttons/CloseButton",["require","exports","tdv/view/buttons/CanvasButton","tdv/view/constants/Alignment","tdv/view/constants/State"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.xa({horizontalAlign:n.$e,verticalAlign:n.$d});return b}P(e,k);e.prototype.Pb=function(){k.prototype.Pb.call(this);this.m("iconLineWidth");this.D("rollOverIconLineWidth",g.ea,"iconLineWidth");this.D("pressedIconLineWidth",g.Fb,"iconLineWidth");this.D("pressedRollOverIconLineWidth",
g.qc,"iconLineWidth")};e.prototype.d2a=function(){return this.G("iconLineWidth")};e.prototype.jb=function(){this.S("iconLineWidth")&&(this.Cj.NX(),this.$("iconLineWidth"));k.prototype.jb.call(this)};e.prototype.tTa=function(){var b=this.V1a(),c=this.U1a(),d=this.Cj.u.canvas.width,f=this.Cj.u.canvas.height,l=this.d2a();b.clearRect(0,0,d,f);b.lineWidth=l||1;b.strokeStyle=c||"#000000";b.beginPath();b.moveTo(0,0);b.lineTo(d,f);b.moveTo(0,f);b.lineTo(d,0);b.closePath();b.stroke()};return e}(h)});
define("tdv/view/containers/windows/BaseWindow","require exports tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/containers/HorizontalContainer tdv/view/containers/VerticalContainer tdv/view/buttons/CloseButton tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(f){function l(){var p=f.call(this)||this;p.Ym=null;p.NV=null;p.QL=null;p.fC=null;p.tda=new k;p.nM=null;p.Jma=void 0;p.Ima=void 0;p.Kz=!1;return p}
P(l,f);l.prototype.set=function(p,q){switch(p){case "children":this.tda.set(p,q);break;default:f.prototype.set.call(this,p,q)}};l.prototype.O6=function(){this.Kz=!0;this.set("visible",!1)};l.prototype.N6=function(){this.get("visible")&&this.get("visible")&&this.o(h.lUa);this.Kz=!1};l.prototype.get=function(p,q){return p=="children"?this.tda.get(p,q):p=="showing"?this.Kz:f.prototype.get.call(this,p,q)};l.prototype.Pb=function(){this.Jl(l.ad)};l.prototype.Kb=function(){f.prototype.Kb.call(this);this.Ym==
null&&(this.Ym=new e,this.Ym.set("width","100%"),this.Ym.bind(h.Sa,this.vza,this,!1),this.mb(this.Ym));this.NV==null&&(this.NV=new d,this.NV.set("width","100%"),this.Ym.mb(this.NV));this.QL==null&&(this.QL=new c,this.QL.xa({horizontalAlign:n.$e,verticalAlign:n.$d}),this.QL.bind(h.ma,this.KZa,this,!1),this.Ym.mb(this.QL));this.fC==null&&(this.fC=this.tda,this.fC.xa({width:"100%",height:"100%"}),this.mb(this.fC));this.nM==null&&(this.nM=new k,this.nM.set("width","100%"),this.mb(this.nM))};l.prototype.oe=
function(){throw Error("Not implemented");};l.prototype.KZa=function(){this.oe()};l.prototype.vza=function(){};l.prototype.jb=function(){this.Pc(l.jva,l.kva,[this.Ym],!0,!0);this.Pc(l.wca,l.xca,[this.Ym],!0,!1);this.get("headerHeight")===0?this.Pc(l.wca,l.xca,[this.fC],!0,!1):this.Pc(l.wca,l.xca,[this.Ym],!0,!1);this.Pc(l.xva,l.yva,[this.NV],!0,!0);this.Pc(l.dva,l.eva,[this.QL],!0,!0);this.Pc(l.ava,l.bva,[this.fC],!0,!0);this.Pc(l.IWa,l.cva,[this.fC],!0,!1);this.Pc(l.fva,l.gva,[this.nM],!0,!0);this.get("footerHeight")===
0?this.Pc(l.hva,l.iva,[this.fC],!0,!1):this.Pc(l.hva,l.iva,[this.nM],!0,!1);this.xa({layout:g.Uk,horizontalAlign:n.$e,verticalAlign:n.$d});f.prototype.jb.call(this);this.an.M$(0)};l.kva={headerBackgroundBlur:"backgroundBlur",headerBackgroundOpacity:"backgroundOpacity",headerBackgroundColor:"backgroundColor",headerBackgroundColorRatios:"backgroundColorRatios",headerBackgroundColorDirection:"backgroundColorDirection",headerBorderSize:"borderSize",headerBorderLeftSize:"borderLeftSize",headerBorderTopSize:"borderTopSize",
headerBorderRightSize:"borderRightSize",headerBorderBottomSize:"borderBottomSize",headerBorderColor:"borderColor",headerBorderLeftColor:"borderLeftColor",headerBorderTopColor:"borderTopColor",headerBorderRightColor:"borderRightColor",headerBorderBottomColor:"borderBottomColor",headerHeight:"height",headerPaddingLeft:"paddingLeft",headerPaddingTop:"paddingTop",headerPaddingRight:"paddingRight",headerPaddingBottom:"paddingBottom",headerVerticalAlign:"verticalAlign"};l.jva=Object.keys(l.kva);l.xca={borderRadius:"borderTopRadius",
borderTopRadius:"borderTopRadius",borderLeftRadius:"borderTopLeftRadius",borderRightRadius:"borderTopRightRadius",borderTopLeftRadius:"borderTopLeftRadius",borderTopRightRadius:"borderTopRightRadius"};l.wca="borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderTopRadius borderRadius".split(" ");l.yva={title:"text",titleFontFamily:"fontFamily",titleFontSize:"fontSize",titleFontColor:"fontColor",titleFontWeight:"fontWeight",titleFontStyle:"fontStyle",titleHorizontalAlign:"horizontalAlign",
titlePaddingLeft:"paddingLeft",titlePaddingTop:"paddingTop",titlePaddingRight:"paddingRight",titlePaddingBottom:"paddingBottom",titleTextDecoration:"textDecoration",titleTextShadowColor:"textShadowColor",titleTextShadowHorizontalLength:"textShadowHorizontalLength",titleTextShadowVerticalLength:"textShadowVerticalLength",titleTextShadowBlurRadius:"textShadowBlurRadius",titleTextShadowOpacity:"textShadowOpacity"};l.xva=Object.keys(l.yva);l.eva={closeButtonBackgroundBlur:"backgroundBlur",closeButtonBackgroundColor:"backgroundColor",
closeButtonBackgroundColorDirection:"backgroundColorDirection",closeButtonBackgroundColorRatios:"backgroundColorRatios",closeButtonBackgroundOpacity:"backgroundOpacity",closeButtonBorderColor:"borderColor",closeButtonBorderRadius:"borderRadius",closeButtonBorderSize:"borderSize",closeButtonHeight:"height",closeButtonIconColor:"iconColor",closeButtonIconHeight:"iconHeight",closeButtonIconLineWidth:"iconLineWidth",closeButtonIconWidth:"iconWidth",closeButtonOpacity:"opacity",closeButtonWidth:"width",
closeButtonPaddingBottom:"paddingBottom",closeButtonPaddingLeft:"paddingLeft",closeButtonPaddingRight:"paddingRight",closeButtonPaddingTop:"paddingTop",closeButtonRollOverBackgroundBlur:"rollOverBackgroundBlur",closeButtonRollOverBackgroundColor:"rollOverBackgroundColor",closeButtonRollOverBackgroundColorDirection:"rollOverBackgroundColorDirection",closeButtonRollOverBackgroundColorRatios:"rollOverBackgroundColorRatios",closeButtonRollOverBackgroundOpacity:"rollOverBackgroundOpacity",closeButtonRollOverBorderColor:"rollOverBorderColor",
closeButtonRollOverBorderSize:"rollOverBorderSize",closeButtonRollOverIconColor:"rollOverIconColor",closeButtonRollOverIconLineWidth:"rollOverIconLineWidth",closeButtonRollOverOpacity:"rollOverOpacity",closeButtonPressedBackgroundBlur:"pressedBackgroundBlur",closeButtonPressedBackgroundColor:"pressedBackgroundColor",closeButtonPressedBackgroundColorDirection:"pressedBackgroundColorDirection",closeButtonPressedBackgroundColorRatios:"pressedBackgroundColorRatios",closeButtonPressedBackgroundOpacity:"pressedBackgroundOpacity",
closeButtonPressedBorderColor:"pressedBorderColor",closeButtonPressedBorderSize:"pressedBorderSize",closeButtonPressedIconColor:"pressedIconColor",closeButtonPressedIconLineWidth:"pressedIconLineWidth",closeButtonPressedOpacity:"pressedOpacity"};l.dva=Object.keys(l.eva);l.gva={footerBackgroundBlur:"backgroundBlur",footerBackgroundOpacity:"backgroundOpacity",footerBackgroundColor:"backgroundColor",footerBackgroundColorRatios:"backgroundColorRatios",footerBackgroundColorDirection:"backgroundColorDirection",
footerBorderSize:"borderSize",footerBorderLeftSize:"borderLeftSize",footerBorderTopSize:"borderTopSize",footerBorderRightSize:"borderRightSize",footerBorderBottomSize:"borderBottomSize",footerBorderColor:"borderColor",footerBorderLeftColor:"borderLeftColor",footerBorderTopColor:"borderTopColor",footerBorderRightColor:"borderRightColor",footerBorderBottomColor:"borderBottomColor",footerHeight:"height"};l.fva=Object.keys(l.gva);l.iva={borderRadius:"borderBottomRadius",borderBottomRadius:"borderBottomRadius",
borderLeftRadius:"borderBottomLeftRadius",borderRightRadius:"borderBottomRightRadius",borderBottomLeftRadius:"borderBottomLeftRadius",borderBottomRightRadius:"borderBottomRightRadius"};l.hva="borderLeftRadius borderRightRadius borderBottomLeftRadius borderBottomRightRadius borderBottomRadius borderRadius".split(" ");l.bva={bodyBackgroundBlur:"backgroundBlur",bodyBackgroundOpacity:"backgroundOpacity",bodyBackgroundColor:"backgroundColor",bodyBackgroundColorRatios:"backgroundColorRatios",bodyBackgroundColorDirection:"backgroundColorDirection",
bodyBorderSize:"borderSize",bodyBorderLeftSize:"borderLeftSize",bodyBorderTopSize:"borderTopSize",bodyBorderRightSize:"borderRightSize",bodyBorderBottomSize:"borderBottomSize",bodyBorderColor:"borderColor",bodyBorderLeftColor:"borderLeftColor",bodyBorderTopColor:"borderTopColor",bodyBorderRightColor:"borderRightColor",bodyBorderBottomColor:"borderBottomColor",bodyPaddingLeft:"paddingLeft",bodyPaddingTop:"paddingTop",bodyPaddingRight:"paddingRight",bodyPaddingBottom:"paddingBottom",overflow:"overflow",
scrollBarColor:"scrollBarColor",scrollBarWidth:"scrollBarWidth",scrollBarMargin:"scrollBarMargin",scrollBarHorizontalMargin:"scrollBarHorizontalMargin",scrollBarVerticalMargin:"scrollBarVerticalMargin",scrollBarOpacity:"scrollBarOpacity",gap:"gap"};l.ava=Object.keys(l.bva);l.cva={layout:"layout",horizontalAlign:"horizontalAlign",verticalAlign:"verticalAlign"};l.IWa=Object.keys(l.cva);l.ad=Object.assign({},b.ad,function(){for(var p={modal:!1,visible:!1},q=[].concat(l.jva,l.xva,l.dva,l.ava,l.fva),r=
0;r<q.length;r++)p[q[r]]=void 0;return p}());return l}(b)});define("tdv/player/script/BaseWindow",["require","tdv/view/containers/windows/BaseWindow","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/containers/windows/BaseWindow");return a("tdv/player/parser/ClassInfo").define("BaseWindow",m,function(){m.call(this)})});
define("tdv/player/script/mixin/EffectsMixin",["require","tdv/constants/EventName","tdv/view/effects/Effect"],function(a){var m=a("tdv/constants/EventName"),h=a("tdv/view/effects/Effect");return{t0a:function(){this.Kl=this.Ff=null;this.bind(m.od,this.Vxa,this,!0);this.bind(m.jd,this.Qxa,this,!0);this.bind(m.uc,this.Sxa,this,!0);this.bind(m.Eb,this.Rxa,this,!0);this.bind(m.L("effect"),this.Oxa,this,!0);this.bind(m.L("rollOverEffect"),this.Txa,this,!0);this.SG=!1},xpb:function(){this.h(m.od,this.Vxa,
this,!0);this.h(m.jd,this.Qxa,this,!0);this.h(m.uc,this.Sxa,this,!0);this.h(m.Eb,this.Rxa,this,!0);this.h(m.L("effect"),this.Oxa,this,!0);this.h(m.L("rollOverEffect"),this.Txa,this,!0)},Vxa:function(){this.Ff&&this.Ff.play()},Qxa:function(){this.Ff&&this.Ff.stop();this.Kl&&this.Kl.stop();this.SG=!1},Sxa:function(){this.SG||(this.SG=!0,this.Kl&&(this.Ff&&this.Ff.get("loop")&&this.Ff.vm()>0?this.Ff.reverse():this.Ff&&this.Ff.vm()!=0&&this.Ff.vm()!=1||(this.Ff&&this.Ff.stop(),this.Kl.play())))},Rxa:function(){this.SG&&
(this.SG=!1,this.Kl&&(this.Kl.vm()>0?this.Kl.reverse():this.Ff&&this.Ff.get("loop")&&this.Ff.play()))},Pxa:function(){this.$ea()},$ea:function(){this.SG&&this.Kl&&(this.Ff.stop(),this.Kl.play())},Uxa:function(){this.SG||(this.Kl.stop(),this.Ff&&this.Ff.get("loop")&&this.Ff.play())},Oxa:function(){this.Ff&&this.Ff.h(h.Cl,this.Pxa,this,!0);this.Ff&&this.Ff.h(h.xx,this.$ea,this,!0);(this.Ff=this.get("effect"))&&this.Ff.bind(h.Cl,this.Pxa,this,!0);this.Ff&&this.Ff.bind(h.xx,this.$ea,this,!0)},Txa:function(){this.Kl&&
this.Kl.h(h.xx,this.Uxa,this,!0);(this.Kl=this.get("rollOverEffect"))&&this.Kl.bind(h.xx,this.Uxa,this,!0)}}});
define("tdv/player/script/Model3DObject",["require","tdv/utils","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/mixin/EffectsMixin"],function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable"),n=a("tdv/player/parser/ClassInfo");a=a("tdv/player/script/mixin/EffectsMixin");n=n.define("Model3DObject",h,function(){h.call(this);this.set("hidden",!1);this.t0a();this.Tq=this.SM=this.rga=this.qga=!1;this.Hga=!0;this.Iga=this.Fga=this.pH=!1});m.D6(n,[a]);var g="enabledInStandard enabledInVR enabledInVRWithGazePointer enabledInAR hideBasedOnDistance hideWhileUserInteracting hideWhileMoving".split(" ");
n.prototype.set=function(k,e){h.prototype.set.call(this,k,e);g.indexOf(k)!=-1&&this.Yz()};n.prototype.mra=function(k){this.rga!==k&&(this.rga=k,this.Yz())};n.prototype.aF=function(k){this.Tq!==k&&(this.Tq=k,this.Yz())};n.prototype.Gp=function(k){this.SM!==k&&(this.SM=k,this.Yz())};n.prototype.u$=function(k){this.Hga!==k&&(this.Hga=k,this.Yz())};n.prototype.eB=function(k){this.pH!==k&&(this.pH=k,this.Yz())};n.prototype.v$=function(k){this.Iga!==k&&(this.Iga=k,this.Yz())};n.prototype.pRa=function(k){this.Fga!==
k&&(this.Fga=k,this.Yz())};n.prototype.lra=function(k){this.qga!==k&&(this.qga=k,this.Yz())};n.prototype.Yz=function(){this.set("hidden",this.rga||this.qga||this.pH&&this.get("enabledInVR")===!1||this.Fga&&this.get("enabledInAR")===!1||this.Iga&&this.get("enabledInVRWithGazePointer",this.get("enabledInVR"))===!1||this.Hga&&this.get("enabledInStandard")===!1||this.SM&&this.get("hideWhileMoving")||this.Tq&&this.get("hideWhileUserInteracting"))};return n});
define("tdv/player/script/BoxModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("BoxModel3DObject",h,function(){h.call(this)})});define("tdv/view/constants/ScaleMode",["require","exports"],function(){return{NONE:"none",GB:"fill",uj:"fit_inside",Kr:"fit_outside",Tp:"fit_to_width",Pk:"fit_to_height",rUa:"custom"}});
define("tdv/view/core/visualprops/ImageVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties","tdv/view/constants/Alignment"],function(a,m,h,n){return function(g){function k(){var e=g!==null&&g.apply(this,arguments)||this;e.image=null;e.Yh=n.fb;e.verticalAlign=n.$d;e.contentWidth=0;e.contentHeight=0;return e}P(k,g);return k}(h)});
define("tdv/view/images/Image","require exports tdv/constants/EventName tdv/constants/Priority tdv/view/constants/Alignment tdv/view/constants/ScaleMode tdv/view/core/UIComponent tdv/view/images/ImageLoader tdv/view/core/visualprops/ImageVisualProperties".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(f){function l(p){var q=f.call(this)||this;q.m3a=function(){q.v0=!0;q.Tf()};q.n3a=function(){q.sHa()};q.gf("Image");q.zda=p||1;q.sma=!1;q.hka=!1;q.eN=0;q.dN=0;q.Oia=!1;q.v0=!1;q.pd=null;q.bind(h.Rb,
q.m3a,q,!1);q.bind(h.od,q.n3a,q,!1);return q}P(l,f);l.prototype.VL=function(){return new c};l.prototype.Yfa=function(){var p=this;this.pd=new d(this.zda);this.Yfa=function(){return p.pd};return this.pd};l.prototype.Pb=function(){f.prototype.Pb.call(this);this.m("horizontalAlign",g.fb);this.m("verticalAlign",g.Tc);this.m("scaleMode",k.NONE)};l.prototype.set=function(p,q){p=="url"&&this.get("url")!=q&&(this.sma=!0,this.Tf());f.prototype.set.call(this,p,q)};l.prototype.fQ=function(p){this.u.Yh!=p&&(this.u.Yh=
p,this.tb())};l.prototype.kP=function(){return this.u.Yh};l.prototype.lQ=function(p){this.u.verticalAlign!=p&&(this.u.verticalAlign=p,this.tb())};l.prototype.mP=function(){return this.u.verticalAlign};l.prototype.hQ=function(p){this.ti!=p&&(this.ti=p,this.hka=!0,this.Tf(),this.lc())};l.prototype.o8a=function(p,q){if(this.u.contentWidth!=p||this.u.contentHeight!=q)this.u.contentWidth=p,this.u.contentHeight=q,this.tb()};l.prototype.Sva=function(p,q,r){this.eN=q?q:0;this.dN=r?r:0;this.u.image=p;this.Oia=
!0;this.Tf();this.lc();this.tb();this.u.image&&this.o(h.ia)};l.prototype.$y=function(){this.fn=this.eN+this.u.Dd+this.u.De;this.dn=this.dN+this.u.ie+this.u.Ef;this.wAa=this.eN==0&&this.dN==0?0:this.eN/this.dN;this.lT=this.mT=0};l.prototype.jb=function(){this.S("scaleMode")&&(this.hQ(this.G("scaleMode")),this.$("scaleMode"));this.S("horizontalAlign")&&(this.fQ(this.G("horizontalAlign")),this.$("horizontalAlign"));this.S("verticalAlign")&&(this.lQ(this.G("verticalAlign")),this.$("verticalAlign"));this.bda("paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "))&&
(this.v0=!0);f.prototype.jb.call(this);this.sHa();if(this.Agb()||this.hka||this.Oia||this.v0){var p=this.Xh(),q=this.Wh(),r=this.eN,t=this.dN,u=0,v=0;if(r==0||t==0)v=u=0;else switch(this.ti){case k.NONE:u=r;v=t;break;case k.GB:u=p;v=q;break;case k.uj:r*q>t*p?(u=p,v=t*p/r):(u=r*q/t,v=q);break;case k.Kr:r*q>t*p?(u=r*q/t,v=q):(u=p,v=t*p/r);break;case k.Tp:u=p;v=t*p/r;break;case k.Pk:u=r*q/t,v=q}this.o8a(u,v);this.v0=this.Oia=this.hka=!1;this.lc();this.tb()}};l.prototype.sHa=function(){if(this.sma){var p=
this.get("url");p?this.Yfa().load(p,this.Sva,this):(this.Yfa().clear(),this.Sva(null,0,0));this.sma=!1}};return l}(e);var d=function(){function f(l){this.zda=l;this.Sd=[];this.Tm=null}f.prototype.NZa=function(l){f.Yo.href=l;return f.Yo.href};f.prototype.load=function(l,p,q){var r=this;l=this.NZa(l);this.Tm&&!this.Tm.pj()&&(this.Tm.cancel(),this.Sd=this.Sd.filter(function(v){return v!==r.Tm}));(this.Tm=this.Sd.find(function(v){return v.rl()==l})||null)?this.Sd=this.Sd.filter(function(v){return v!==
r.Tm}):(this.Tm=new b(n.Cua),this.Tm.load(l));for(this.Sd.splice(0,0,this.Tm);this.Sd.length>this.zda;)this.Sd.pop().cancel();if(p){var t=this.Tm,u=function(){p.call(q||window,t.yg(),t.hg(),t.xg())};this.Tm.pj()?u():this.Tm.bind(h.ia,u,void 0,!1)}};f.prototype.clear=function(){this.Sd.forEach(function(l){l.cancel()});this.Tm=null};f.Yo=document.createElement("a");return f}();return a});
define("tdv/view/buttons/Button","require exports tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/buttons/BaseButton tdv/view/images/Image".split(" "),function(a,m,h,n,g,k){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.Pb=function(){e.prototype.Pb.call(this);this.m("iconURL");this.D("rollOverIconURL",n.ea,"iconURL");this.D("pressedIconURL",n.Fb,"iconURL");this.D("pressedRollOverIconURL",n.qc,"iconURL")};b.prototype.hea=function(){var c=new k(3);c.set("scaleMode",
h.uj);return c};b.prototype.jb=function(){if(this.S("iconURL")){var c=this.G("iconURL");this.Cj.set("url",c);this.Cj.set("visible",c?!0:!1);this.$("iconURL")}e.prototype.jb.call(this)};return b}(g)});define("tdv/player/script/Button",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/Button"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/buttons/Button");return m.define("Button",h,function(){h.call(this)})});
define("tdv/player/script/ExternalModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("ExternalModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/PlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/ExternalModel3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/ExternalModel3DObject");return m.define("PlaneModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/CanvasPlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlaneModel3DObject");return m.define("CanvasPlaneModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/CapPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("CapPanoramaOverlay",m,function(){m.call(this)})});
define("tdv/player/script/CeilingCapPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/CapPanoramaOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/CapPanoramaOverlay");return m.define("CeilingCapPanoramaOverlay",h,function(){h.call(this)})});
define("tdv/player/script/ChildModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("ChildModel3DObject",h,function(){h.call(this);this.set("floorColor","transparent")})});
define("tdv/player/script/CloseButton",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/CloseButton"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/buttons/CloseButton");return m.define("CloseButton",h,function(){h.call(this)})});define("tdv/player/script/CookiesPolicy",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("CookiesPolicy",m,function(){m.call(this)})});
define("tdv/player/script/Container",["require","tdv/events/async","tdv/player/parser/ClassInfo","tdv/view/containers/Container"],function(a){var m=a("tdv/events/async"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/view/containers/Container");a=h.define("Container",n,function(){n.call(this)});a.prototype.scrollTo=function(g,k){n.prototype.scrollTo.call(this,g,k)};a.prototype.scrollIntoView=function(g){m.ME(function(){n.prototype.scrollIntoView.call(this,g)}.bind(this))};return a});
define("tdv/player/script/PanoramaFrame",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo");a=h.define("PanoramaFrame",m,function(){m.call(this);this.Ba=null});a.prototype.get=function(n,g){switch(n){case "overlays":return this.$fa();case "hfov":case "vfov":case "pitch":case "flipImageHorizontally":case "minFaceSize":if(this.Ba)return this.Ba.get(n,g)}return m.prototype.get.call(this,n,g)};a.prototype.$fa=
function(){var n=m.prototype.get.call(this,"overlays");n||(n=[]);return this.Nka(n)};a.prototype.Nka=function(n){if(this.PN===void 0||this.n2!=n){var g=function(e){return h.Oa("PopupPanoramaOverlay",e)},k=function(e){return h.Oa("LensFlarePanoramaOverlay",e)};this.n2=n;this.PN=[].concat(n.filter(function(e){return!(g(e)||k(e))}),n.filter(k),n.filter(g))}return this.PN};a.prototype.rcb=function(n){this.Ba=n};a.prototype.cE=function(){return this.Ba};a.prototype.Mn=function(){return!1};return a});
define("tdv/player/script/CubicPanoramaFrame",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaFrame"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PanoramaFrame");return m.define("CubicPanoramaFrame",h,function(){h.call(this)})});
define("tdv/view/av/omnitone",["require","tdv/player/view/util/Flags"],function(a){function m(S,W,Z){this.ga=p.TMa(S)?S:p.throw("BufferList: Invalid BaseAudioContext.");this.YH={dataType:ia.EQ,waa:!1};Z&&(Z.dataType&&p.uhb(ia,Z.dataType)&&(this.YH.dataType=Z.dataType),Z.waa&&(this.YH.waa=!!Z.waa));this.kwa=[];this.Tu=this.YH.dataType===ia.EQ?W:W.slice(0);this.I4a=this.Tu.length;this.kEa=null;this.SU=new Function}function h(S,W){this.ga=S;this.kl=this.ga.createChannelSplitter(4);this.Rl=this.ga.createChannelMerger(4);
this.input=this.kl;this.output=this.Rl;this.dra(W||da.Ee)}function n(S){this.ga=S;this.kl=this.ga.createChannelSplitter(4);this.HS=this.ga.createGain();this.O1=this.ga.createGain();this.FS=this.ga.createGain();this.w2=this.ga.createGain();this.z2=this.ga.createGain();this.A2=this.ga.createGain();this.B2=this.ga.createGain();this.C2=this.ga.createGain();this.D2=this.ga.createGain();this.E2=this.ga.createGain();this.F2=this.ga.createGain();this.G2=this.ga.createGain();this.vU=this.ga.createGain();this.P3=
this.ga.createGain();this.uU=this.ga.createGain();this.Rl=this.ga.createChannelMerger(4);this.kl.connect(this.HS,1);this.kl.connect(this.O1,2);this.kl.connect(this.FS,3);this.HS.gain.value=-1;this.FS.gain.value=-1;this.HS.connect(this.w2);this.HS.connect(this.z2);this.HS.connect(this.A2);this.O1.connect(this.B2);this.O1.connect(this.C2);this.O1.connect(this.D2);this.FS.connect(this.E2);this.FS.connect(this.F2);this.FS.connect(this.G2);this.w2.connect(this.vU);this.z2.connect(this.P3);this.A2.connect(this.uU);
this.B2.connect(this.vU);this.C2.connect(this.P3);this.D2.connect(this.uU);this.E2.connect(this.vU);this.F2.connect(this.P3);this.G2.connect(this.uU);this.kl.connect(this.Rl,0,0);this.vU.connect(this.Rl,0,1);this.P3.connect(this.Rl,0,2);this.uU.connect(this.Rl,0,3);this.vU.gain.value=-1;this.uU.gain.value=-1;this.pZ(new Float32Array([1,0,0,0,1,0,0,0,1]));this.input=this.kl;this.output=this.Rl}function g(S,W){this.ga=S;this.OS=this.yo=!1;this.tR();W&&this.r$(W);this.enable()}function k(S,W){this.ga=
p.TMa(S)?S:p.throw("FOARenderer: Invalid BaseAudioContext.");this.Si={ar:h.vUa.Ee,aB:X.$sa};W&&(W.ar&&(Array.isArray(W.ar)&&W.ar.length===4?this.Si.ar=W.ar:p.throw("FOARenderer: Invalid channel map. (got "+W.ar+")")),W.j8&&(Array.isArray(W.j8)&&W.j8.length===2?this.Si.zPa=W.j8:p.throw("FOARenderer: Invalid HRIR URLs. It must be an array with 2 URLs to HRIR files. (got "+W.j8+")")),W.aB&&(Object.values(X).includes(W.aB)?this.Si.aB=W.aB:p.log("FOARenderer: Invalid rendering mode order. (got"+W.aB+') Fallbacks to the mode "ambisonic".')));
this.tR();this.XFa=new Float32Array(16);this.QS=!1}function e(S,W,Z){this.ga=S;this.OS=this.yo=!1;this.S_=W;this.UAa=(this.S_+1)*(this.S_+1);this.tR();Z&&this.r$(Z);this.enable()}function b(S,W,Z,ca){return S[W-1][(ca+W)*(2*W+1)+(Z+W)].gain.value}function c(S,W,Z,ca,fa){return ca===fa?b(S,1,W,1)*b(S,fa-1,Z,fa-1)-b(S,1,W,-1)*b(S,fa-1,Z,-fa+1):ca===-fa?b(S,1,W,1)*b(S,fa-1,Z,-fa+1)+b(S,1,W,-1)*b(S,fa-1,Z,fa-1):b(S,1,W,0)*b(S,fa-1,Z,ca)}function d(S){for(let pa=2;pa<=S.length;pa++){var W=S,Z=pa;for(let ma=
-Z;ma<=Z;ma++)for(let na=-Z;na<=Z;na++){var ca=ma,fa=na,ja=Z,ha=ca===0?1:0;fa=Math.abs(fa)===ja?1/(2*ja*(2*ja-1)):1/((ja+fa)*(ja-fa));ca=[Math.sqrt((ja+ca)*(ja-ca)*fa),.5*(1-2*ha)*Math.sqrt((1+ha)*(ja+Math.abs(ca)-1)*(ja+Math.abs(ca))*fa),-.5*(1-ha)*Math.sqrt((ja-Math.abs(ca)-1)*(ja-Math.abs(ca)))*fa];Math.abs(ca[0])>0&&(ca[0]*=c(W,0,ma,na,Z));if(Math.abs(ca[1])>0){ja=ca[1];ha=W;fa=ma;var ka=na,la=Z;if(fa===0)ha=c(ha,1,1,ka,la)+c(ha,-1,-1,ka,la);else if(fa>0){var oa=fa===1?1:0;ha=c(ha,1,fa-1,ka,la)*
Math.sqrt(1+oa)-c(ha,-1,-fa+1,ka,la)*(1-oa)}else oa=fa===-1?1:0,ha=c(ha,1,fa+1,ka,la)*(1-oa)+c(ha,-1,-fa-1,ka,la)*Math.sqrt(1+oa);ca[1]=ja*ha}Math.abs(ca[2])>0&&(ja=ca[2],ha=W,fa=ma,ka=na,la=Z,ha=fa===0?0:fa>0?c(ha,1,fa+1,ka,la)+c(ha,-1,-fa-1,ka,la):c(ha,1,fa-1,ka,la)-c(ha,-1,-fa+1,ka,la),ca[2]=ja*ha);W[Z-1][(na+Z)*(2*Z+1)+(ma+Z)].gain.value=ca[0]+ca[1]+ca[2]}}}function f(S,W){this.ga=S;this.S_=W;S=(W+1)*(W+1);this.kl=this.ga.createChannelSplitter(S);this.Rl=this.ga.createChannelMerger(S);this.Pg=
[];let Z,ca,fa,ja;for(let ha=1;ha<=W;ha++){S=ha*ha;Z=2*ha+1;this.Pg[ha-1]=[];for(let ka=0;ka<Z;ka++){ca=S+ka;for(let la=0;la<Z;la++)fa=S+la,ja=ka*Z+la,this.Pg[ha-1][ja]=this.ga.createGain(),this.kl.connect(this.Pg[ha-1][ja],ca),this.Pg[ha-1][ja].connect(this.Rl,0,fa)}}this.kl.connect(this.Rl,0,0);this.pZ(new Float32Array([1,0,0,0,1,0,0,0,1]));this.input=this.kl;this.output=this.Rl}var l=a("tdv/player/view/util/Flags");const p={log:function(){l.vu&&console.log(Array.from(arguments).join(" "))},throw:function(){throw Error(Array.from(arguments).join(" "));
}};let q,r,t,u,v,w,x,y,z,A,D,F,C,B,H,E,G,N,O,R,Q,K,L,U,T,Y,aa,ba,ea;p.phb=function(S,W){q=W[0];r=W[1];t=W[2];u=W[3];v=W[4];w=W[5];x=W[6];y=W[7];z=W[8];A=W[9];D=W[10];F=W[11];C=W[12];B=W[13];H=W[14];E=W[15];G=q*w-r*v;N=q*x-t*v;O=q*y-u*v;R=r*x-t*w;Q=r*y-u*w;K=t*y-u*x;L=z*B-A*C;U=z*H-D*C;T=z*E-F*C;Y=A*H-D*B;aa=A*E-F*B;ba=D*E-F*H;if(ea=G*ba-N*aa+O*Y+R*T-Q*U+K*L)ea=1/ea,S[0]=(w*ba-x*aa+y*Y)*ea,S[1]=(t*aa-r*ba-u*Y)*ea,S[2]=(B*K-H*Q+E*R)*ea,S[3]=(D*Q-A*K-F*R)*ea,S[4]=(x*T-v*ba-y*U)*ea,S[5]=(q*ba-t*T+u*U)*
ea,S[6]=(H*O-C*K-E*N)*ea,S[7]=(z*K-D*O+F*N)*ea,S[8]=(v*aa-w*T+y*L)*ea,S[9]=(r*T-q*aa-u*L)*ea,S[10]=(C*Q-B*O+E*G)*ea,S[11]=(A*O-z*Q-F*G)*ea,S[12]=(w*U-v*Y-x*L)*ea,S[13]=(q*Y-r*U+t*L)*ea,S[14]=(B*N-C*R-H*G)*ea,S[15]=(z*R-A*N+D*G)*ea};p.uhb=function(S,W){for(const Z in S)if(W===S[Z])return!0;return!1};p.TMa=function(S){return S instanceof AudioContext||S instanceof OfflineAudioContext};p.eqb=function(S){return S instanceof AudioBuffer};p.Yeb=function(S){const W=window.atob(S),Z=new Uint8Array(W.length);
Z.forEach((ca,fa)=>Z[fa]=W.charCodeAt(fa));return Z.buffer};const ia={EQ:"base64",URL:"url"};m.prototype.load=function(){return new Promise(this.L6a.bind(this))};m.prototype.L6a=function(S,W){typeof S!=="function"?p.throw("BufferList: Invalid Promise resolver."):this.kEa=S;typeof W==="function"&&(this.SU=W);for(S=0;S<this.Tu.length;++S)this.YH.dataType===ia.EQ?this.i4a(S):this.j4a(S)};m.prototype.i4a=function(S){const W=this;this.ga.decodeAudioData(p.Yeb(this.Tu[S]),function(Z){W.hh(S,Z)},function(Z){W.hh(S,
null);Z='BufferList: decoding ArrayByffer("'+S+'" from Base64-encoded data failed. ('+Z+")";W.SU(Z);p.throw(Z)})};m.prototype.j4a=function(S){const W=new XMLHttpRequest;W.open("GET",this.Tu[S]);W.responseType="arraybuffer";const Z=this;W.onload=function(){if(W.status===200)Z.ga.decodeAudioData(W.response,function(ca){Z.hh(S,ca)},function(ca){Z.hh(S,null);ca='BufferList: decoding "'+Z.Tu[S]+'" failed. ('+ca+")";Z.SU(ca);p.log(ca)});else{const ca='BufferList: XHR error while loading "'+Z.Tu[S]+'". ('+
W.status+" "+W.statusText+")";Z.SU(ca);p.log(ca)}};W.onerror=function(){Z.hh(S,null);Z.SU();p.log('BufferList: XHR network failed on loading "'+Z.Tu[S]+'".')};W.send()};m.prototype.hh=function(S,W){this.kwa[S]=W;this.YH.waa&&p.log("BufferList: "+(this.YH.dataType===ia.EQ?"ArrayBuffer("+S+") from Base64-encoded HRIR":'"'+this.Tu[S]+'"')+" successfully loaded.");--this.I4a===0&&(p.log("BufferList: "+(this.YH.dataType===ia.EQ?this.Tu.length+" AudioBuffers from Base64-encoded HRIRs":this.Tu.length+" files via XHR")+
" loaded successfully."),this.kEa(this.kwa))};const da={Ee:[0,1,2,3],zua:[2,0,1,3],Qob:[0,3,1,2]};h.prototype.dra=function(S){Array.isArray(S)&&(this.o0=S,this.kl.disconnect(),this.kl.connect(this.Rl,0,this.o0[0]),this.kl.connect(this.Rl,1,this.o0[1]),this.kl.connect(this.Rl,2,this.o0[2]),this.kl.connect(this.Rl,3,this.o0[3]))};h.vUa=da;n.prototype.pZ=function(S){this.w2.gain.value=S[0];this.z2.gain.value=S[1];this.A2.gain.value=S[2];this.B2.gain.value=S[3];this.C2.gain.value=S[4];this.D2.gain.value=
S[5];this.E2.gain.value=S[6];this.F2.gain.value=S[7];this.G2.gain.value=S[8]};n.prototype.G$=function(S){this.w2.gain.value=S[0];this.z2.gain.value=S[1];this.A2.gain.value=S[2];this.B2.gain.value=S[4];this.C2.gain.value=S[5];this.D2.gain.value=S[6];this.E2.gain.value=S[8];this.F2.gain.value=S[9];this.G2.gain.value=S[10]};g.prototype.tR=function(){this.zV=this.ga.createChannelSplitter(4);this.Iha=this.ga.createChannelMerger(2);this.Jha=this.ga.createChannelMerger(2);this.z0=this.ga.createConvolver();
this.A0=this.ga.createConvolver();this.yV=this.ga.createChannelSplitter(2);this.AV=this.ga.createChannelSplitter(2);this.wH=this.ga.createGain();this.kv=this.ga.createChannelMerger(2);this.SFa=this.ga.createGain();this.zV.connect(this.Iha,0,0);this.zV.connect(this.Iha,1,1);this.zV.connect(this.Jha,2,0);this.zV.connect(this.Jha,3,1);this.Iha.connect(this.z0);this.Jha.connect(this.A0);this.z0.connect(this.yV);this.A0.connect(this.AV);this.yV.connect(this.kv,0,0);this.yV.connect(this.kv,0,1);this.yV.connect(this.kv,
1,0);this.yV.connect(this.wH,1,0);this.wH.connect(this.kv,0,1);this.AV.connect(this.kv,0,0);this.AV.connect(this.kv,0,1);this.AV.connect(this.kv,1,0);this.AV.connect(this.kv,1,1);this.z0.normalize=!1;this.A0.normalize=!1;this.wH.gain.value=-1;this.input=this.zV;this.output=this.SFa};g.prototype.r$=function(S){this.OS||(this.z0.buffer=S[0],this.A0.buffer=S[1],this.OS=!0)};g.prototype.enable=function(){this.kv.connect(this.SFa);this.yo=!0};g.prototype.disable=function(){this.kv.disconnect();this.yo=
!1};const V=["UklGRiQEAABXQVZFZm10IBAAAAABAAIAgLsAAADuAgAEABAAZGF0YQAEAAD+/wIA9v8QAPv/CwD+/wcA/v8MAP//AQD7/wEACAAEAPj/+v8YABAA7v/n//v/9P/M/8D//f34/R38EvzxAfEBtA2lDTcBJQFJ9T71FP0D/cD1tfVo/Wv9uPTO9PPmOufc/U/+agL3Aisc/RxuGKEZBv3j/iYMzQ2gAzsEQQUABiQFrASzA5cB2QmyCy0AtgR4AeYGtfgAA2j5OQHP+scArPsMBJgEggIEBtz6+QVq/pj/aPg8BPP3gQEi+jEAof0fA1v9+/7S+8IBjvwd/xD4IADL/Pf9zvs+/l3+wgB7/+L+7fzFADH9kf6A+n3+DP6+/TP9xP68/pn+w/26/i39YgA0/u790Pt9/kD+7v1s/Wb+8f4C/1P+pf/x/cT+6/3p/Xz9ff5F/0f9G/4r/6v/4P5L/sL+ff7c/pj+Ov7X/UT+9P5G/oz+6v6A/2D+9/6P/8r/bP7m/ij+C//e/tj/Gf4e/9v+FwDP/lz/sP7F/2H+rv/G/s7/Hf7y/4P+NAD9/k0AK/6w/zP/hACh/sX/gf44AOP+dgCm/iUAk/5qAOD+PwC+/jEAWP4CAAr/bQBw/vv/zf5iACD/OgCS/uD/Cv9oAAb/CgDK/kwA//5tACH/TgCg/h4AHP9aABP/JADP/hEAYv9gAAj/3f8m/ysAYv8gACX/8/8k/ysAXv8bABH//v8j/ygAa/8qAAD/9f9g/1YAWf8JACH/AgB2/z4AXP/w/z3/FgB2/ykAX//9/z//EwCV/zUAS//n/1T/GACK/x4ATv/0/4P/QQB4//v/WP/2/3X/HAB8//P/V//3/2f/AQBh/9v/Tf/x/5P/IwCI/wMAf/8hAKP/JACZ/xUAiv8nAK//HgCr/yMAm/8uAMz/OACi/yQAqf87AMT/MwCY/yUAtP9FAMH/KgCu/ycAyP85AMv/IwCz/xoA1f8qAMn/FgC8/xQA4/8nAMX/CwDJ/xQA4f8ZAMH/BgDO/xQA4f8WAMP/BwDU/xQA4P8QAMH/AQDb/xQA3P8JAMP/AgDh/xIA2v8EAMj/AgDk/w0A1f/+/8v/AwDm/wwA0v/+/9H/BgDl/wkAzv/8/9T/BwDk/wcAzv/8/9r/CQDi/wQAzf/8/9//CADf////0P/9/+L/BwDd//7/0////+T/BgDb//z/1f8AAOf/BQDZ//v/2v8CAOb/AwDY//v/3v8EAOb/AgDY//3/4f8FAOX/AQDZ//7/5P8GAOP/AADb/wAA5/8GAOH////d/wIA5/8FAOD////f/wMA6P8FAOD////h/wQA6P8EAN7////h/wUA4v8DANv/AQDd/wQA3P8CANn/AgDb/wMA2/8CANv/AgDd/wIA3v8CAOH/AQDj/wEA",
"UklGRiQEAABXQVZFZm10IBAAAAABAAIAgLsAAADuAgAEABAAZGF0YQAEAAAAAAAA/f8CAP//AQD//wEA//8BAP3/AAACAP7/+f8AAAIA/P8FAAQA8/8AABoA+f/V/wQAHQDO/xoAQQBO/ocA0Px1/ucHW/4UCm8HLO6kAjv8/fCRDdAAYfPiBIgFXveUCM0GBvh6/nz7rf0J/QcQSRVdBgoBSgFR62r9NP8m+LoEAvriBVAAiAPmABEGMf2l+SwBjva6/G4A//8P/CYDMgXm/R0CKAE6/fcBBwAtAND+kQA0A5UDhwFs/8IB8fydAEP/A/8v/e7/mP8j/2YBIwE3Av0AYv+uAOD8lgAg/wwAIf/L/n0Ae//OAJMB3P/XAF//XwCM/08AB/8NAEf/rf4jAT3/lgAJAP4AHgDpAO8AUf9L/07/Qf8KAOD/x/+D/3sATQCDAMoA0f79/+L/EQDt/7EAqv+S/7IAuv/o/wgAc//X//H/SwCm/+3/Yf/B/yoAAADI/7X/AwBg/5EATgCX/xYA/P+q/00AVACY/6v/BADD/zwALQCN/8z/KQDu/ygAEgCZ/6f/VQDC//T/KQCs/7P/UgAfAO7/NgC8/57/awAZAPP/+P/V/8z/bQBBAL//DgD0/+T/TABBAMz/CwAxAPz/SQBqALn/BgALAPz/EAA7AIz/3/8iAAUA//8kALf/y/9VABQA+v81AOj/0P9cAB4A+f8WAOr/vv83ABgAw/8JAOj/4f8nACIAsf/y/w4A3v8gACQAxP/n/ycA7P8WAC0Ayf/U/ycA9v/7/yUA0P/P/zUABADc/xUA5P/J/zcACwDS/xUA9P/m/zAACQDX/+3/9v/2/yQACgDZ/+P/AwAKABYA///b/9j/EQALABkADgD6/+7/GwD4/w4A8P/w//j/EgAEAAUA9f/1/wQAGgD4/wAA5////wAAGQD1////7f8FAAUAFQDv/wAA6v8LAAcAFQDs/wEA9P8SAAYACwDr//7/AQASAAYABQDv/wIAAwAWAAIAAgDv/wAABgATAAEA/f/u/wQABgAQAPr/+P/z/wUACQALAPj/9//4/wgABwAKAPT/+f/5/w4ABwAIAPT/+//9/w4AAwADAPH//f///w8A//8BAPP///8BAA0A/f/+//X/AgACAA0A+//8//b/BAADAAoA+f/7//n/BgADAAcA+P/7//v/BwABAAQA+P/8//3/CQABAAIA9//9////CQD/////+P///wAACAD9//7/+f8AAAAABwD8//3/+v8CAAAABgD7//z//P8EAAAABAD6//3//P8FAP//AgD6//7//v8FAP7/AQD7//////8GAP7/AAD7/wEA//8EAP3/AAD9/wEA/v8DAP3/AAD9/wIA/v8CAP3/AQD9/wIA/v8CAP7/AQD+/wEA"],
X={$sa:"ambisonic",nUa:"bypass",GVa:"off"};k.prototype.tR=function(){this.input=this.ga.createGain();this.output=this.ga.createGain();this.g0=this.ga.createGain();this.qfa=new h(this.ga,this.Si.ar);this.kS=new n(this.ga);this.lM=new g(this.ga);this.input.connect(this.qfa.input);this.input.connect(this.g0);this.qfa.output.connect(this.kS.input);this.kS.output.connect(this.lM.input);this.lM.output.connect(this.output);this.input.channelCount=4;this.input.channelCountMode="explicit";this.input.channelInterpretation=
"discrete"};k.prototype.q3a=function(S,W){(this.Si.zPa?new m(this.ga,this.Si.zPa,{dataType:"url"}):new m(this.ga,V)).load().then(function(Z){this.lM.r$(Z);this.zlb(this.Si.aB);this.QS=!0;p.log("FOARenderer: HRIRs loaded successfully. Ready.");S()}.bind(this),function(){W("FOARenderer: HRIR loading/decoding failed.");p.throw("FOARenderer: HRIR loading/decoding failed.")})};k.prototype.initialize=function(){p.log("FOARenderer: Initializing... (mode: "+this.Si.aB+")");return new Promise(this.q3a.bind(this))};
k.prototype.dra=function(S){this.QS&&S.toString()!==this.Si.ar.toString()&&(p.log("Remapping channels (["+this.Si.ar.toString()+"] -> ["+S.toString()+"])."),this.Si.ar=S.slice(),this.qfa.dra(this.Si.ar))};k.prototype.pZ=function(S){this.QS&&this.kS.pZ(S)};k.prototype.G$=function(S){this.QS&&this.kS.G$(S)};k.prototype.Clb=function(S){this.QS&&(p.phb(this.XFa,S.elements),this.kS.G$(this.XFa))};k.prototype.zlb=function(S){if(S!==this.Si.aB){switch(S){case X.$sa:this.lM.enable();this.g0.disconnect();
break;case X.nUa:this.lM.disable();this.g0.connect(this.output);break;case X.GVa:this.lM.disable();this.g0.disconnect();break;default:p.log('FOARenderer: Rendering mode "'+S+'" is not supported.');return}this.Si.aB=S;p.log("FOARenderer: Rendering mode changed. ("+S+")")}};e.prototype.tR=function(){var S=Math.ceil(this.UAa/2);this.Jza=this.ga.createChannelSplitter(this.UAa);this.Xka=[];this.IR=[];this.x5=[];this.sja=this.ga.createGain();this.aia=this.ga.createGain();this.wH=this.ga.createGain();this.FL=
this.ga.createChannelMerger(2);this.iDa=this.ga.createGain();for(var W=0;W<S;++W)this.Xka[W]=this.ga.createChannelMerger(2),this.IR[W]=this.ga.createConvolver(),this.x5[W]=this.ga.createChannelSplitter(2),this.IR[W].normalize=!1;for(S=0;S<=this.S_;++S)for(W=-S;W<=S;W++){const Z=S*S+S+W,ca=Math.floor(Z/2);this.Jza.connect(this.Xka[ca],Z,Z%2);this.Xka[ca].connect(this.IR[ca]);this.IR[ca].connect(this.x5[ca]);W>=0?this.x5[ca].connect(this.sja,Z%2):this.x5[ca].connect(this.aia,Z%2)}this.sja.connect(this.FL,
0,0);this.sja.connect(this.FL,0,1);this.aia.connect(this.FL,0,0);this.aia.connect(this.wH);this.wH.connect(this.FL,0,1);this.wH.gain.value=-1;this.input=this.Jza;this.output=this.iDa};e.prototype.r$=function(S){if(!this.OS){for(let W=0;W<S.length;++W)this.IR[W].buffer=S[W];this.OS=!0}};e.prototype.enable=function(){this.FL.connect(this.iDa);this.yo=!0};e.prototype.disable=function(){this.FL.disconnect();this.yo=!1};f.prototype.pZ=function(S){this.Pg[0][0].gain.value=-S[0];this.Pg[0][1].gain.value=
S[1];this.Pg[0][2].gain.value=-S[2];this.Pg[0][3].gain.value=-S[3];this.Pg[0][4].gain.value=S[4];this.Pg[0][5].gain.value=-S[5];this.Pg[0][6].gain.value=-S[6];this.Pg[0][7].gain.value=S[7];this.Pg[0][8].gain.value=-S[8];d(this.Pg)};f.prototype.G$=function(S){this.Pg[0][0].gain.value=-S[0];this.Pg[0][1].gain.value=S[1];this.Pg[0][2].gain.value=-S[2];this.Pg[0][3].gain.value=-S[4];this.Pg[0][4].gain.value=S[5];this.Pg[0][5].gain.value=-S[6];this.Pg[0][6].gain.value=-S[8];this.Pg[0][7].gain.value=S[9];
this.Pg[0][8].gain.value=-S[10];d(this.Pg)};return{Tpb:function(S,W){return new g(S,W)},Vpb:function(S,W){return new h(S,W)},Upb:function(S){return new n(S)},Xpb:function(S,W){return new f(S,W)},Wpb:function(S,W,Z){return new e(S,W,Z)},Adb:function(S,W){return new k(S,W)}}});
define("tdv/view/av/AudioController","require exports three.mod tdv/utils tdv/view/av/SharedAudioContext tdv/player/view/util/Device tdv/player/view/util/URL tdv/player/view/util/Flags tdv/view/av/omnitone".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(){function t(u){this.wq=this.wq.bind(this);this.aD=this.aD.bind(this);this.vf=!1;this.kt=this.m1=1;this.C1=!0;this.eD=1;this.Wx=this.gq=this.mO=this.jS=this.pfa=this.By=this.Dy=this.rG=null;this.iI=[];this.RR=this.Vca=!1;this.fa=u;this.fa.addEventListener("play",
this.wq,!0);this.fa.addEventListener("playing",this.aD,!0);this.JI()}t.prototype.clear=function(){this.WFa();this.UFa();this.r$a();this.p$a();this.fa.removeEventListener("play",this.wq,!0);this.fa.removeEventListener("playing",this.aD,!0)};t.prototype.Mkb=function(u){this.C1!=u&&(this.fa.log("AudioController","set hasAudio: "+u),this.C1=u,this.JI())};t.prototype.Bg=function(u){this.vf!=u&&(this.fa.log("AudioController","set muted: "+u),this.vf=u,this.JI())};t.prototype.jB=function(u){this.kt!=u&&
(this.fa.log("AudioController","set volume: "+u),this.kt=u,this.JI())};t.prototype.WY=function(u){this.m1!=u&&(this.fa.log("AudioController","set gain: "+u),this.m1=Math.max(0,Math.min(1,u)),this.JI())};t.prototype.SY=function(u){this.Vca!=u&&(this.Vca=u,this.c6())};t.prototype.ykb=function(u){this.RR!=u&&(this.RR=u,this.c6())};t.prototype.cu=function(u){this.gq=u?(this.gq||new h.Matrix4).copy(u):null;this.$la()};t.prototype.Uw=function(u){this.Wx=u?(this.Wx||new h.Matrix4).copy(u):null;this.$la()};
t.prototype.wq=function(){this.JI()};t.prototype.aD=function(){this.JI()};t.prototype.JI=function(){this.fa.log("AudioController","updateVolume paused: "+this.fa.paused+" outputVolume: "+(!this.C1||this.vf?0:this.kt*this.m1));var u=this.Z2a()?!this.C1||this.vf?0:this.kt*this.m1:1;this.eD!=u&&(this.eD=u,t.MHa()?(this.fa.volume=1,this.c6()):this.fa.volume=this.eD);u=this.eD==0;this.fa.muted!=u&&(this.fa.muted=u)};t.prototype.c6=function(){var u=[];t.MHa()&&(this.eD==0&&this.mO||this.eD>0)&&this.eD<
1?(this.D9a(),this.mO&&u.push(this.mO)):this.WFa();this.RR?(this.A9a(),this.tDa&&u.push(this.tDa)):this.UFa();this.Vca&&(this.v9a(),this.jS&&u.push(this.jS));u.length>0&&this.x9a();this.rG&&(u=[new d(null,this.rG)].concat(u));(g===null||g===void 0?0:g.destination)&&u.push(new d(g.destination,null));this.qYa(u);this.$la()};t.prototype.qYa=function(u){if(!n.x8(this.iI,u)){for(var v=0;v<this.iI.length-1;v++)this.iI[v].output.disconnect();this.iI=u;for(v=0;v<this.iI.length-1;v++)this.iI[v].output.connect(this.iI[v+
1].input)}};t.prototype.$la=function(){this.Dy&&(this.Dy.gain.value=this.eD);this.gp&&this.Wx&&this.gq&&(f.copy(this.Wx).premultiply(l.copy(this.gq).invert()),f.decompose(p,q,r),this.gp.positionX.value=p.x,this.gp.positionY.value=p.y,this.gp.positionZ.value=p.z,p.set(0,0,1).applyQuaternion(q).normalize(),this.gp.orientationX.value=p.x,this.gp.orientationY.value=p.y,this.gp.orientationZ.value=p.z);this.By&&this.gq&&this.By.Clb(this.gq)};t.prototype.D9a=function(){!this.Dy&&t.l0()&&(this.Dy=g.createGain(),
this.mO=new d(this.Dy,this.Dy))};t.prototype.WFa=function(){this.Dy&&(this.Dy.disconnect(),this.Dy=null);this.mO&&(this.mO=null)};t.prototype.A9a=function(){!this.gp&&t.l0()&&(this.gp=g.createPanner(),this.tDa=new d(this.gp,this.gp))};t.prototype.UFa=function(){this.gp&&(this.gp.disconnect(),this.gp=null)};t.prototype.x9a=function(){!this.rG&&t.l0()&&(this.rG=g.createMediaElementSource(this.fa))};t.prototype.r$a=function(){this.rG&&(this.rG.disconnect(),this.rG=null)};t.prototype.v9a=function(){var u=
this;!this.pfa&&t.l0()&&(this.By=c.Adb(g,{ar:t.r1a()}),this.pfa=this.By.initialize(),this.pfa.then(function(){u.jS=new d(u.By.input,u.By.output);u.c6()}))};t.prototype.p$a=function(){this.By&&(this.By.output.disconnect(),this.By=null);this.jS&&(this.jS=null)};t.prototype.Z2a=function(){var u=this.fa.currentSrc||this.fa.children.length&&this.fa.children[0].src||"";e.hE(u)&&(u=void 0);return!!u};t.l0=function(){return b.ata&&g?!0:!1};t.MHa=function(){return k.Tb()==k.Ji};t.r1a=function(){return navigator.userAgent.includes("Safari")&&
!navigator.userAgent.includes("Chrome")?[2,0,1,3]:[0,1,2,3]};return t}();var d=function(){return function(t,u){this.input=t;this.output=u}}(),f=new h.Matrix4,l=new h.Matrix4,p=new h.Vector3,q=new h.Quaternion,r=new h.Vector3;return a});define("tdv/view/av/MediaType",["require","exports"],function(){return{Wp:"video",jUa:"audio"}});
define("tdv/view/av/PlaybackController","require exports tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/URL tdv/util/LoadQueue tdv/view/util/Visibility".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(q){var r=l.call(this)||this;r.fa=q;r.MH=r.MH.bind(r);r.bz=r.bz.bind(r);r.kn=r.kn.bind(r);r.MT=r.MT.bind(r);r.gl=r.gl.bind(r);r.Ul=r.Ul.bind(r);r.aD=r.aD.bind(r);
r.fW=r.fW.bind(r);r.fa.addEventListener("ended",r.kn,!0);r.fa.addEventListener("pause",r.Ul,!1);r.fa.addEventListener("stalled",r.Ul,!1);r.fa.addEventListener("waiting",r.Ul,!1);r.fa.addEventListener("canplay",r.MH,!0);r.fa.addEventListener("canplaythrough",r.bz,!1);r.fa.addEventListener("loadedmetadata",r.gl,!0);r.fa.addEventListener("playing",r.aD,!1);r.fa.addEventListener("error",r.MT,!1);r.Qea=!1;r.I=n.ca;r.kj=null;r.kN=null;f.bind(h.V,r.vbb,r,!0);return r}P(p,l);p.prototype.clear=function(){this.fa.removeEventListener("ended",
this.kn,!0);this.fa.removeEventListener("pause",this.Ul,!1);this.fa.removeEventListener("stalled",this.Ul,!1);this.fa.removeEventListener("waiting",this.Ul,!1);this.fa.removeEventListener("canplay",this.MH,!0);this.fa.removeEventListener("canplaythrough",this.bz,!1);this.fa.removeEventListener("loadedmetadata",this.gl,!0);this.fa.removeEventListener("error",this.MT,!1)};p.prototype.play=function(){this.fa.log("PlaybackController","play");this.kN=n.PLAYING;this.OU()};p.prototype.stop=function(){this.fa.log("PlaybackController",
"stop");this.kN=n.ca;this.OU()};p.prototype.getState=function(){return this.kj||this.I};p.prototype.CJ=function(){return this.fa.readyState==this.fa.HAVE_NOTHING||this.fa.readyState==this.fa.HAVE_METADATA||this.fa.currentTime===0?!1:!0};p.prototype.OU=function(){!this.kj&&this.kN&&(this.kj=this.kN,this.kN=null,this.kj==n.PLAYING?this.Tka():this.Ska())};p.prototype.vbb=function(){f.visible?(this.fa.log("PlaybackController","visibile changed to true, setting state to "+this.I),this.kj=this.I,this.kj==
n.PLAYING?this.Tka():this.Ska()):this.fa.paused||(this.fa.log("PlaybackController","paused by visibile changed to false"),this.fa.pause())};p.prototype.rM=function(){return this.fa.currentSrc||this.fa.children.length&&this.fa.children[0].src||""};p.prototype.Tka=function(){var q=this,r=this.rM();this.Y4(!!r&&!c.hE(r));this.V_=b.Tb()==b.Ji;this.fa.paused?(this.fa.log("PlaybackController","startPlaying calling play"),this.fa.muted=!0,this.fa.log("PlaybackController","this._media.play()"),this.fa.play().then(function(){q.sCa()})["catch"](function(t){q.MT(t)}).finally(function(){})):
(this.fa.log("PlaybackController","startPlaying already playing"),this.sCa())};p.prototype.aD=function(){this.fa.log("PlaybackController","onPlaying event received. Visible: "+f.visible)};p.prototype.sCa=function(){this.kj==n.PLAYING?(this.fa.log("PlaybackController","onPlay promise fullfilled received when waiting to play"),this.kj=null,this.I=n.PLAYING,this.o(new k(p.Bba)),this.OU()):this.fa.log("PlaybackController","onPlay promise fullfilled received. Visible: "+f.visible)};p.prototype.Ska=function(){this.Y4(!1);
this.V_=!1;this.fa.paused?(this.fa.log("PlaybackController","startPausing already paused"),this.Ul()):(this.fa.log("PlaybackController","startPausing calling pause"),this.fa.pause(),b.Tb()!=b.Ji&&b.Tb()!=b.Yj||this.Ul())};p.prototype.Ul=function(){this.kj==n.ca?(this.fa.log("PlaybackController","onPause event received when waiting to stop"),this.kj=null,this.I=n.ca,this.OU()):f.visible?(this.fa.log("PlaybackController","onPause event received without calling to pause"),(this.I==n.PLAYING&&!this.kj||
this.kj==n.PLAYING)&&!this.fa.hasAttribute("loop")&&!isNaN(this.fa.duration)&&this.fa.currentTime==this.fa.duration&&this.fa.duration>0&&this.kn(),this.fW()):this.fa.log("PlaybackController","onPause event received when not visible")};p.prototype.MH=function(){this.fa.log("PlaybackController","on can play");this.fW()};p.prototype.bz=function(){this.fa.log("PlaybackController","can play through");this.fW();this.Y4(!1)};p.prototype.fW=function(){if(this.pFa()){if(this.V_&&this.fa.currentTime==0){this.fa.log("PlaybackController",
"updatePlaying applying ios hack");this.V_=!1;try{this.fa.currentTime=.3}catch(q){}}b.Tb()!=b.QK&&this.mEa()}};p.prototype.pFa=function(){return this.I==n.PLAYING&&f.visible&&this.fa.paused&&this.fa.readyState>=3};p.prototype.mEa=function(q){q===void 0&&(q=!1);this.nEa||(q?this.pFa()&&(this.fa.log("PlaybackController","updatePlaying retrying play"),this.kj=n.PLAYING,this.Tka()):this.nEa=setTimeout(function(){this.nEa=null;this.mEa(!0)}.bind(this),500))};p.prototype.MT=function(){this.kj==n.PLAYING&&
(this.fa.log("PlaybackController","onError waiting to play"),this.kj=null,this.kN?this.OU():b.Tb()==b.Ji?this.o(new k(p.eba)):this.kj=n.PLAYING)};p.prototype.gl=function(){this.fa.log("PlaybackController","on loaded metadata");!isNaN(this.fa.duration)&&this.fa.currentTime==this.fa.duration&&this.fa.duration>0&&this.kn()};p.prototype.kn=function(){this.fa.log("PlaybackController","onEnded");this.V_=!1;if(this.I==n.PLAYING&&!this.kj||this.kj==n.ca)this.fa.log("PlaybackController","onEnded finalizing video"),
this.Y4(!1),this.kj=n.ca,this.Ska(),this.o(new k(p.Cl))};p.prototype.Y4=function(q){this.Qea!=q&&(this.fa.log("PlaybackController","downloading changed to: "+q),(this.Qea=q)?d.Fmb(g.Jta):d.Emb(g.Jta))};p.eba="deactivated";p.Cl="end";p.Bba="play";return p}(e)});
define("tdv/view/av/TextTracksController",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,m,h,n){return function(g){function k(e){var b=g.call(this)||this;b.ll=null;b.bf=[];b.gl=b.gl.bind(b);b.eia=b.eia.bind(b);b.Fj=b.Fj.bind(b);b.fa=e;b.ll=null;b.bf=[];b.fa.addEventListener("loadedmetadata",b.gl,!0);b.fa.textTracks.addEventListener("addtrack",b.eia,!1);return b}P(k,g);k.prototype.set=function(e){e&&this.BXa(e)};k.prototype.clear=function(){this.o7a()};k.prototype.fP=
function(){return this.ll&&this.ll.track.activeCues?Array.from(this.ll.track.activeCues):[]};k.prototype.gl=function(){this.qHa()};k.prototype.eia=function(){this.qHa()};k.prototype.Fj=function(){this.DEa(this.fP())};k.prototype.DEa=function(e){e||(e=[]);if(this.bf.length!=0||e.length!=0)this.bf=Array.from(e),this.o(h.Bl,this.bf)};k.prototype.BXa=function(e){this.fa.log("TextTracksController","add text track src: "+e);this.ll=document.createElement("track");this.ll.kind="subtitles";this.ll.src=e;
this.fa.appendChild(this.ll)};k.prototype.o7a=function(){this.ll&&(this.fa.log("TextTracksController","remove text track"),this.ll.track.removeEventListener("cuechange",this.Fj),this.ll.track.mode="disabled",this.ll.src="",this.fa.removeChild(this.ll),this.ll=null,this.DEa([]))};k.prototype.qHa=function(){for(var e=0;e<this.fa.textTracks.length;e++){var b=this.fa.textTracks[e];b.removeEventListener("cuechange",this.Fj);b.mode=this.ll&&b==this.ll.track?"hidden":"disabled";b.mode=="hidden"&&b.addEventListener("cuechange",
this.Fj)}};return k}(n)});
define("tdv/player/view/util/FileType",["require","exports","tdv/player/view/util/URL"],function(a,m,h){return function(){function n(){}n.is=function(g,k){g=h.parse(g).Eeb;return k.indexOf(g)!=-1};n.hE=function(g,k){return!!g&&k.some(function(e){return g.indexOf(e)===0})};n.iua=[".mp4",".m4v",".m4p"];n.eVa=[".hevc"];n.Pta=[".mov"];n.yWa=[".webm"];n.HVa=[".ogv",".ogg"];n.HLS=[".m3u8"];n.yta=".ply .bin .splat .spz .sog .zip".split(" ");n.HWa=[".json"];n.gVa=".jpg .jpeg .png .webp .gif .avif .apng .bmp".split(" ");n.Wp=
".m3u8 .mpd .mp4 .m4v .m4p .webm .ogv .ogg .mpg .mpeg .m3u8 .mpd".split(" ");n.hVa=["data:image/"];return n}()});
define("tdv/view/av/TimeController","require exports tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/FileType".split(" "),function(a,m,h,n,g,k){return function(e){function b(c){var d=e.call(this)||this;d.fa=c;d.bz=d.bz.bind(d);d.Ul=d.Ul.bind(d);d.wq=d.wq.bind(d);d.gl=d.gl.bind(d);d.kn=d.kn.bind(d);d.M3=d.M3.bind(d);d.Nf=d.Nf.bind(d);d.CI=void 0;d.TM=void 0;d.rha=void 0;d.lla=0;d.fa.addEventListener("ended",d.kn,!0);d.fa.addEventListener("pause",d.Ul,!1);
d.fa.addEventListener("canplaythrough",d.bz,!1);d.fa.addEventListener("timeupdate",d.M3,!1);d.fa.addEventListener("play",d.wq,!1);return d}P(b,e);b.prototype.clear=function(){this.fa&&(this.fa.removeEventListener("ended",this.kn,!0),this.fa.removeEventListener("pause",this.Ul,!1),this.fa.removeEventListener("canplaythrough",this.bz,!1),this.fa.removeEventListener("timeupdate",this.M3,!1),this.fa.removeEventListener("play",this.wq,!1),this.CI&&clearInterval(this.CI))};b.prototype.setTime=function(c){if(!this.fa.srcObject){this.lla=
0;this.p2=void 0;this.fa.log("TimeController","setTime: "+c);g.ZIa()&&!k.is(this.rM(),k.HLS)?this.mR=c||0:this.mR=void 0;try{this.fa.currentTime=c}catch(d){}g.Tb()==g.tF||g.Tb()==g.QK||g.Dc()==g.$Z&&c==0||(this.TM=c,this.IGa())}};b.prototype.getTime=function(){return this.TM||this.fa.currentTime||0};b.prototype.mj=function(){return this.fa.duration||0};b.prototype.wq=function(){this.Cka(!0)};b.prototype.Ul=function(){this.Cka(!1);this.p2=void 0};b.prototype.bz=function(){this.fa.log("TimeController",
"on can play through");this.IGa()};b.prototype.kn=function(){this.mR=void 0;this.Cka(!1)};b.prototype.gl=function(){this.o(new h(b.Zj))};b.prototype.IGa=function(){if(this.fa.readyState>=this.fa.HAVE_ENOUGH_DATA&&this.TM!==void 0){this.fa.log("TimeController","updateCurrentTime when can play through set time to: "+this.TM);try{this.fa.currentTime=this.TM}catch(c){}this.TM=void 0}};b.prototype.Nf=function(){this.o(new h(b.Dg))};b.prototype.M3=function(){if(g.ZIa()&&!g.Ngb()&&!this.fa.paused&&this.fa.readyState>=
this.fa.HAVE_ENOUGH_DATA){var c=(new Date).getTime();this.p2||(this.p2=c);this.rha&&c-this.rha>500&&(this.lla++,this.lla/((c-this.p2)*.001)>.4&&g.Hlb());this.rha=c}if(this.mR!==void 0&&this.fa.currentTime>this.mR){this.mR=void 0;try{this.fa.currentTime-=.01}catch(d){}}this.Nf()};b.prototype.Cka=function(c){!!this.CI!=c&&(this.CI?(clearInterval(this.CI),this.CI=null):this.CI=setInterval(this.Nf,16))};b.prototype.rM=function(){return this.fa.currentSrc||this.fa.children.length&&this.fa.children[0].src||
""};b.Dg="time update";b.Zj="duration update";return b}(n)});
define("tdv/view/av/DummyAudioData",["require","exports"],function(){var a={};a.src=a.hib="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjM2LjEwMAAAAAAAAAAAAAAA//OEAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAEAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV6urq6urq6urq6urq6urq6urq6urq6urq6v////////////////////////////////8AAAAATGF2YzU2LjQxAAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs90hvAAAAAAAAAAAAAAAAAAAA//MUZAAAAAGkAAAAAAAAA0gAAAAATEFN//MUZAMAAAGkAAAAAAAAA0gAAAAARTMu//MUZAYAAAGkAAAAAAAAA0gAAAAAOTku//MUZAkAAAGkAAAAAAAAA0gAAAAANVVV";return a});
define("tdv/view/av/SrcSetter","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Capabilities tdv/player/view/util/URL tdv/player/view/util/Flags tdv/player/view/util/FileType tdv/player/view/util/LibsLoader tdv/view/av/DummyAudioData".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){a=function(p){function q(r,t){var u=p.call(this)||this;u.fa=r;u.rp=t;u.Bha=!1;u.n5=[];u.bM=null;u.ef=null;u.bg=null;return u}P(q,p);q.prototype.set=function(r,t,u){this.fa.log("SrcSetter",
"set: "+r+" subtitles: "+t+" startTime: "+u);r=new l(r,t,u);this.ef&&this.ef.isEqual(r)||(!this.ef&&this.bM&&this.bM.isEqual(r)?this.S5():(this.ef=r,this.o4a()))};q.prototype.clear=function(){this.bg&&(this.bg.destroy(),this.bg=null);this.bM=null;this.n7a();this.rp.clear()};q.prototype.Kgb=function(){return!!this.ef};q.prototype.o4a=function(){this.Bha=!0;this.hEa(this.ef.src)&&!d.HLS.pj()?(this.fa.log("SrcSetter","hls lib required"),d.HLS.load(this.jAa,this)):this.jAa()};q.prototype.jAa=function(){this.Bha&&
(this.Bha=!1,this.jYa())};q.prototype.jYa=function(){this.clear();this.p8a(this.r7a(this.ef.src));this.hEa(this.ef.src)?this.YXa():this.Wga(this.ef.src)?this.kYa():this.lYa()};q.prototype.YXa=function(){var r=d.HLS.FP,t=navigator.connection,u=(t?Math.max(t.downlink,2):2)*1024*1024,v=u*.66;this.bg=new r({debug:b.vu,startPosition:this.ef.startTime===0?-1:this.ef.startTime,playlistLoadPolicy:{"default":{maxTimeToFirstByteMs:6E4,maxLoadTimeMs:6E4}},startLevel:-1,maxMaxBufferLength:12,autoStartLoad:!1,
abrEwmaDefaultEstimate:u});this.bg.loadSource(this.ef.src);this.bg.attachMedia(this.fa);var w=function(){this.bg.off(r.Events.MANIFEST_PARSED,w);var x=this.bg.levels.filter(function(z){return z.bitrate<=u});if(x.length){x.sort(function(z,A){return A.width-z.width});var y=this.bg.levels.indexOf(x[0]);this.bg.startLevel=y}x=this.bg.levels.filter(function(z){return z.bitrate<=v});x.length&&(x.sort(function(z,A){return A.width-z.width}),this.bg.config.minAutoBitrate=x[0].bitrate-1);x=this.bg.levels.filter(function(z){return k.Smb(z.width,
z.height)});b.fVa&&(x.sort(function(z,A){return A.width-z.width}),y=this.bg.levels.indexOf(x[0]),this.bg.startLevel=y);x.length&&x.length<this.bg.levels.length&&(x.sort(function(z,A){return A.width-z.width}),this.bg.autoLevelCapping=this.bg.levels.indexOf(x[0]));this.fa.log("SrcSetter","bandwidth: "+u+" lowBandwidth: "+v);this.fa.log("SrcSetter","levels: "+this.bg.levels);this.fa.log("SrcSetter","startLevel: "+this.bg.levels[this.bg.startLevel]);this.fa.log("SrcSetter","minLevel: "+this.bg.levels[this.bg.minAutoLevel]);
this.bg.startLoad(this.ef.startTime===0?-1:this.ef.startTime);this.ef.startTime!=0&&this.Gv(this.ef.startTime);this.ef.Gm&&this.rp.set(this.ef.Gm);this.bM=this.ef;this.ef=null;this.S5()}.bind(this);this.bg.on(r.Events.MANIFEST_PARSED,w);this.bg.on(r.Events.Nob,function(x,y){y.fatal&&y.type==r.ErrorTypes.Tob&&this.bg.recoverMediaError()}.bind(this))};q.prototype.lYa=function(){this.ef.src?this.Jva(this.ef.src):this.Jva(f.hib,"audio/mpeg");this.ef.Gm&&this.rp.set(this.ef.Gm);this.fa.load();this.ef.startTime!=
0&&this.Gv(this.ef.startTime);this.bM=this.ef;this.ef=null;this.S5()};q.prototype.kYa=function(){this.fa.srcObject=this.ef.src;this.bM=this.ef;this.ef=null;this.S5()};q.prototype.S5=function(){this.fa.log("SrcSetter","src ready");this.o(new n(h.vd))};q.prototype.hEa=function(r){return!!r&&!this.Wga(r)&&c.is(r,c.HLS)&&!k.qMa};q.prototype.r7a=function(r){return!!r&&!this.Wga(r)&&e.epa(r)};q.prototype.p8a=function(r){r&&!this.fa.hasAttribute("crossorigin")?this.fa.setAttribute("crossorigin","anonymous"):
!r&&this.fa.hasAttribute("crossorigin")&&this.fa.removeAttribute("crossorigin")};q.prototype.Wga=function(r){return r instanceof MediaStream};q.prototype.Gv=function(r){try{this.fa.currentTime=r}catch(t){}};q.prototype.Jva=function(r,t){t===void 0&&(t=void 0);var u=document.createElement("source");t||(t=this.U2a(r));t&&(u.type=t);e.hE(r)||(r=e.MD(r,"swbypass=true"));u.src=r;this.fa.appendChild(u);this.n5.push(u)};q.prototype.n7a=function(){for(;this.n5&&this.n5.length;){var r=this.n5.shift();r.src=
"";this.fa.removeChild(r)}this.fa.srcObject=null};q.prototype.U2a=function(r){switch(e.getExtension(r).toLowerCase()){case ".mp3":return"audio/mpeg";case ".ogg":return"audio/ogg";case ".m4v":case ".mp4":return"video/mp4";case ".webm":return"video/webm";case ".ogv":return"video/ogg";case ".m3u8":return"application/x-mpegURL";case ".mov":return"video/quicktime"}};return q}(g);var l=function(){function p(q,r,t){this.src=q||"";this.Gm=r||"";this.startTime=t||0}p.prototype.isEqual=function(q){return this.src==
q.src&&this.Gm==q.Gm};return p}();return a});
define("tdv/view/av/HTMLMediaPlayer","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Flags tdv/view/util/AudioActivation tdv/view/util/UserInitiatedAction tdv/view/av/AudioController tdv/view/av/MediaType tdv/view/av/PlaybackController tdv/view/av/TextTracksController tdv/view/av/TimeController tdv/view/av/SrcSetter".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){function t(v){setTimeout(v,0)}var u=0;return function(v){function w(x,
y){var z=v.call(this)||this;z.Qf=x;z.ybb=y;z.gl=z.gl.bind(z);z.Nu=z.Nu.bind(z);z.Bia=z.Bia.bind(z);z.uC=null;z.yq=null;z.b4=void 0;z.Gb=null;z.xo="inactive";z.rp=null;z.Mz=null;z.Fd=null;z.Ua=null;z.Qq=null;z.vf=!1;z.nFa(document.createElement(z.Qf));y&&c.wait(z.Nu);return z}P(w,v);w.prototype.nFa=function(x){this.TFa();this.cd=x;for(this.cd.parentNode&&this.cd.parentNode.removeChild(this.cd);this.cd.children.length;)this.cd.removeChild(this.cd.children[0]);this.z9a();this.cd.setAttribute("autoplay",
"false");this.cd.setAttribute("preload",k.Tb()==k.Ji?"metadata":"none");this.cd.setAttribute("webkit-playsinline","true");this.cd.setAttribute("playsinline","true");this.cd.addEventListener("loadedmetadata",this.gl,!0);this.rp=new p(this.cd);this.rp.bind(h.Bl,this.Fj,this,!0);this.Mz=new r(this.cd,this.rp);this.Mz.bind(h.vd,this.WCa,this,!0);this.Fd=new d(this.cd);this.Ua=new l(this.cd);this.Ua.bind(l.eba,this.wBa,this,!0);this.Ua.bind(l.Cl,this.kn,this,!0);this.Ua.bind(l.Bba,this.wq,this,!0);this.Qq=
new q(this.cd);this.Qq.bind(q.Dg,this.Nf,this,!0);this.Qq.bind(q.Zj,this.$o,this,!0)};w.prototype.z9a=function(){if(e.vu){var x="["+this.Qf+" "+u++ +"]";this.cd.log=function(y,z){console.log(x+"["+(new Date).toISOString().split("T")[1]+"] "+y+" "+z)}}else this.cd.log=function(){}};w.prototype.TFa=function(){this.cd&&(this.cd.removeEventListener("loadedmetadata",this.gl,!0),this.Mz&&(this.Mz.h(h.vd,this.WCa,this),this.Mz.clear(),this.Mz=null),this.rp&&(this.rp.h(h.Bl,this.Fj,this),this.rp.clear(),
this.rp=null),this.Fd&&(this.Fd.clear(),this.Fd=null),this.Ua&&(this.Ua.h(l.eba,this.wBa,this),this.Ua.h(l.Cl,this.kn,this),this.Ua.h(l.Bba,this.wq,this),this.Ua.clear(),this.Ua=null),this.Qq&&(this.Qq.h(q.Dg,this.Nf,this),this.Qq.h(q.Zj,this.$o,this),this.Qq.clear(),this.Qq=null))};w.prototype.clear=function(){this.TFa()};w.prototype.WO=function(x,y,z){if(this.Mn()&&this.CJ())try{return x.drawImage(this.cd,0,0,y,z),!0}catch(A){}x.fillRect(0,0,y,z);return!1};w.prototype.play=function(x,y,z){this.cd.log("HTMLMediaPlayer",
"play src: "+y.src+" subtitlesSrc: "+y.Gm+" hasAudio: "+y.gE+" gain: "+y.gain+" ambisonic: "+y.mt);this.Gb=x;this.uC=null;this.yq=y.clone();this.b4=z||0;this.OXa()};w.prototype.w8=function(){return this.xo=="activated"};w.prototype.zaa=function(){return this.ybb};w.prototype.stop=function(){this.cd.log("HTMLMediaPlayer","stop");this.Ua.stop();this.yq=null};w.prototype.getState=function(){return this.Ua.getState()};w.prototype.CJ=function(){return this.Mz.Kgb()?!1:this.Ua.CJ()};w.prototype.Bg=function(x){this.Fd.Bg(x);
this.vf=x;this.Gb&&this.xo=="requested"&&(this.vf?b.cancel(this.Gb):b.request(this.Gb))};w.prototype.jB=function(x){this.Fd.jB(x)};w.prototype.SY=function(x){this.Fd.SY(x)};w.prototype.cu=function(x){this.Fd.cu(x)};w.prototype.Uw=function(x){this.Fd.Uw(x)};w.prototype.WY=function(x){this.Fd.WY(x)};w.prototype.setLoop=function(x){this.fYa(x)};w.prototype.getCurrentTime=function(){return this.Qq.getTime()};w.prototype.setCurrentTime=function(x){return this.Qq.setTime(x)};w.prototype.mj=function(){return this.Qq.mj()};
w.prototype.Mn=function(){return this.Qf==f.Wp};w.prototype.getType=function(){return this.Qf};w.prototype.hg=function(){return this.cd&&this.Mn()&&this.cd.videoWidth||0};w.prototype.xg=function(){return this.cd&&this.Mn()&&this.cd.videoHeight||0};w.prototype.fP=function(){return this.rp.fP()};w.prototype.OXa=function(){this.cd.log("HTMLMediaPlayer","assert can play");this.xo=="activated"||!this.yq.gE||this.yq.gain==0||this.vf?(this.cd.log("HTMLMediaPlayer","can play activationState: "+this.xo+" pending media has audio: "+
this.yq.gE+" muted: "+this.vf),this.MH()):this.xo=="inactive"&&(this.cd.log("HTMLMediaPlayer","needs activation"),this.Gb&&this.Qf==f.Wp&&this.Y2a()?this.eXa():this.Gb&&c.B8()?this.Nu():this.Gb&&this.NXa())};w.prototype.Y2a=function(){var x=this.qya();return!x||x.currentSrc&&!x.paused||x.muted?!1:!0};w.prototype.qya=function(){return this.Gb.get("settings").get(TDV.PlayerSettings.ACTIVE_VIDEO_ELEMENT)};w.prototype.eXa=function(){this.cd.log("HTMLMediaPlayer","activate with application parameter");
this.nFa(this.qya());this.Nu()};w.prototype.NXa=function(){this.cd.log("HTMLMediaPlayer","ask for activation");this.xo="requested";b.Usa(this.Nu);this.Gb&&!this.vf&&b.request(this.Gb)};w.prototype.Nu=function(){if(this.xo=="inactive"||this.xo=="requested")this.cd.log("HTMLMediaPlayer","activate received when state: "+this.xo+" and has media: "+!!this.uC),this.uC?t(function(){c.wait(this.Nu)}.bind(this)):(this.xo="activating",this.Mz.set("","",0))};w.prototype.MH=function(){this.cd.log("HTMLMediaPlayer",
"media can play. Has pending properties: "+!!this.yq);this.yq&&this.Mz.set(this.yq.src,this.yq.Gm,this.b4)};w.prototype.WCa=function(){this.xo=="activating"?this.R5a():this.yq&&this.z5a()};w.prototype.R5a=function(){this.cd.log("HTMLMediaPlayer","on src ready activating");this.Ua.play()};w.prototype.wq=function(){this.xo=="activating"&&(this.cd.log("HTMLMediaPlayer","on play activating"),this.Ua.stop(),this.xo="activated",this.MH())};w.prototype.z5a=function(){this.cd.log("HTMLMediaPlayer","on pending src ready");
this.uC=this.yq;this.yq=null;this.ZXa(this.uC.gE);this.XXa(this.uC.gain);this.QXa(this.uC.mt);this.TXa(this.uC.VW);this.Qq.setTime(this.b4);this.b4=void 0;this.Ua.play()};w.prototype.ZXa=function(x){this.Fd.Mkb(x)};w.prototype.XXa=function(x){this.Fd.WY(x)};w.prototype.QXa=function(x){this.Fd.SY(x)};w.prototype.TXa=function(x){this.Fd.ykb(x)};w.prototype.fYa=function(x){x&&!this.cd.hasAttribute("loop")?this.cd.setAttribute("loop",""):!x&&this.cd.hasAttribute("loop")&&this.cd.removeAttribute("loop")};
w.prototype.wBa=function(){this.cd.log("HTMLMediaPlayer","on deactivated");b.Alb();c.wait(this.Bia);this.Gb&&!this.vf&&t(function(){b.request(this.Gb)}.bind(this))};w.prototype.Bia=function(){this.cd.log("HTMLMediaPlayer","on reactivated");this.Ua.play()};w.prototype.Fj=function(){this.o(h.Bl,this.rp.fP())};w.prototype.gl=function(){this.o(new n(w.OUa))};w.prototype.Nf=function(){this.o(new n(w.Dg))};w.prototype.$o=function(){this.o(new n(w.Zj))};w.prototype.kn=function(){this.o(new n(w.Cl))};w.Dg=
"time update";w.Zj="duration update";w.OUa="size update";w.Cl="end";return w}(g)});define("tdv/view/av/Subtitle",["require","exports"],function(){return function(){return function(a){this.cue=a;this.text=a.text}}()});
define("tdv/view/av/AVProperties",["require","exports"],function(){return function(){function a(){this.Gm=this.src=void 0;this.gE=!1;this.gain=1;this.VW=this.mt=!1}a.prototype.clone=function(){var m=new a;m.src=this.src;m.Gm=this.Gm;m.gE=this.gE;m.gain=this.gain;m.mt=this.mt;m.VW=this.VW;return m};return a}()});
define("tdv/view/av/SharedPlayerOrchestrator","require exports tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/av/HTMLMediaPlayer tdv/view/av/MediaType".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){var l=function(){function q(r){this.Xx=r;this.Ja=null;this.sha=Date.now()}q.prototype.gpa=function(){return this.Ja==null};q.prototype.w8=function(){return this.Xx.w8()};
q.prototype.zaa=function(){return this.Xx.zaa()};q.prototype.item=function(){return this.Ja};q.prototype.Seb=function(){this.Ja.uNa();this.Ja=null};q.prototype.use=function(r){this.Ja=r;this.Ja.vKa(this.Xx);this.sha=Date.now()};return q}();a=function(q){function r(){var t=q.call(this)||this;t.Kv=[];var u=c.rLa("avs",10);var v=b.Dc()==b.zB?10:e.Gcb()?4:1;v=c.rLa("avpas",v);for(var w=0;w<u;w++)t.Kv.push(new l(new d(f.Wp,w<v)));t.Gf=[];t.I=n.ca;return t}P(r,q);r.prototype.vP=function(){return this.mza().length>
0};r.prototype.Z9=function(t){this.Gf=[t].concat(this.Gf.filter(function(u){return u!==t}));this.cja();p()};r.prototype.appendItem=function(t){this.Gf.push(t);this.cja();p()};r.prototype.wY=function(t){this.Gf=this.Gf.filter(function(u){return u!==t});this.cja()};r.prototype.cja=function(){var t=this.x2a();if(r.Rua)for(;this.Kv.length<t.length;)this.Kv.push(new l(new d(f.Wp,!1)));this.mza().forEach(function(u){t.indexOf(u.item())<0&&u.Seb()});this.Jd(t.length>0?n.PLAYING:n.ca);t.forEach(function(u){if(!this.W1a(u)){var v=
this.N1a(u.getType(),u.Rqa());v||u.Rqa()||this.Kv.push(v=new l(new d(f.Wp,!1)));v&&v.use(u)}}.bind(this));this.O1a().forEach(function(u){u.Xx.stop()})};r.prototype.x2a=function(){return this.Gf.map(function(t,u){var v={};v.index=u;v.priority=t.JLa();v.item=t;return v}).sort(function(t,u){return t.priority-u.priority||t.index-u.index}).map(function(t){return t.item})};r.prototype.Jd=function(t){this.I!=t&&(this.I=t,this.o(new g(this.I==n.ca?h.Fg:h.Up)))};r.prototype.N1a=function(t,u){t=this.Kv.filter(function(v){return v.gpa()});
return t.length?(u?(u=t.filter(function(v){return v.w8()}),u.length||(u=t.filter(function(v){return v.zaa()}))):(u=t.filter(function(v){return!v.zaa()}),u.length||(u=t.filter(function(v){return!v.w8()}))),u.length&&(t=u),b.Tb()==b.Yj?(t.sort(function(v,w){return w.sha-v.sha}),t[Math.min(2,t.length-1)]):t[0]):null};r.prototype.O1a=function(){return this.Kv.filter(function(t){return t.gpa()})};r.prototype.mza=function(){return this.Kv.filter(function(t){return!t.gpa()})};r.prototype.W1a=function(t){for(var u=
0;u<this.Kv.length;u++)if(this.Kv[u].item()==t)return this.Kv[u];return null};r.bind=function(){var t=r.Bj();t.bind.apply(t,arguments)};r.h=function(){var t=r.Bj();t.h.apply(t,arguments)};r.vP=function(){return r.Bj().vP()};r.appendItem=function(t){r.Bj().appendItem(t)};r.Z9=function(t){r.Bj().Z9(t)};r.wY=function(t){r.Bj().wY(t)};r.Bj=function(){return this.Qo};r.Qo=new r;r.Rua=[b.yB,b.tu].indexOf(b.Dc())>=0;return r}(k);var p=function(){if([b.yB,b.tu].indexOf(b.Dc())>=0){var q=document.createElement("video");
q.muted=!1;q.setAttribute("loop","");q.src="data:video/mp4;base64, ";
return function(){try{q.pause(),setTimeout(function(){q.play()["catch"](function(){})},0)}catch(r){}}}return function(){}}();return a});
define("tdv/view/av/AudioPlayer","require exports tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/view/av/HTMLMediaPlayer tdv/view/av/Subtitle tdv/view/av/AVProperties tdv/view/av/MediaType tdv/view/av/SharedPlayerOrchestrator tdv/view/util/Animation tdv/player/view/util/Capabilities".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p){return function(q){function r(t,u,v,w){var x=q.call(this)||this;x.Gb=t;x.C=u;x.RR=v;x.zv=w;x.qV();x.j3=x.j3.bind(x);
x.C.bind(g.L("gain"),x.QH,x,!0);x.C.bind(g.L("ambisonic"),x.LH,x,!0);x.C.bind(g.L("mp3Url"),x.nk,x,!0);x.C.bind(g.L("oggUrl"),x.nk,x,!0);x.C.bind(g.L("subtitlesURL"),x.nk,x,!0);x.C.bind(g.L("url"),x.nk,x,!0);x.I=k.ca;x.Ql=!1;x.ac=0;x.qC=0;x.vf=!1;x.kt=1;x.gq=null;x.Wx=null;x.gS=!1;x.kM=1;x.Vc=null;x.bq=[];return x}P(r,q);r.prototype.Xb=function(){return this.Gb};r.prototype.Zc=function(t){this.I==t||t==k.$b&&this.I!=k.PLAYING||(this.I=t,this.I==k.PLAYING?(this.fZa(),f.Z9(this)):this.M9a(),this.Ala())};
r.prototype.M9a=function(){this.gS||(this.gS=!0,this.dya=this.C.get("fadeOutTime"),this.dya==0?this.LFa():this.j3(0))};r.prototype.j3=function(t){this.Vc&&this.kM!=0&&this.gS&&!this.J3a()?(this.kM=Math.max(0,this.kM-t/this.dya),this.W_(),l.requestFrame(this.j3)):this.LFa()};r.prototype.fZa=function(){this.gS=!1;this.kM=1;this.W_()};r.prototype.LFa=function(){this.gS=!1;this.kM=1;this.Vc&&(f.wY(this),this.I==k.ca&&this.Bka())};r.prototype.getState=function(){return this.I};r.prototype.mj=function(){return this.ac};
r.prototype.setCurrentTime=function(t){this.qC=t;this.Vc&&this.Vc.play(this.Gb,this.A,this.qC)};r.prototype.getCurrentTime=function(){return this.qC};r.prototype.jB=function(t){this.kt=t;this.W_()};r.prototype.W_=function(){this.Vc&&this.Vc.jB(this.kt*this.kM)};r.prototype.cu=function(t){this.Vc?this.Vc.cu(t):this.gq=(t===null||t===void 0?void 0:t.clone())||null};r.prototype.Uw=function(t){this.Vc?this.Vc.Uw(t):this.Wx=(t===null||t===void 0?void 0:t.clone())||null};r.prototype.Bg=function(t){this.vf=
t;this.Vc&&this.Vc.Bg(t)};r.prototype.setLoop=function(t){this.Ql=t;this.Vc&&this.Vc.setLoop(t)};r.prototype.Rqa=function(){return!this.vf};r.prototype.getType=function(){return d.jUa};r.prototype.JLa=function(){return this.zv};r.prototype.vKa=function(t){this.Vc=t;setTimeout(function(){this.Vc&&this.Vc.bind(e.Cl,this.LT,this,!0)}.bind(this),0);this.qV();this.Vc.bind(e.Dg,this.Nf,this,!0);this.Vc.bind(e.Zj,this.$o,this,!0);this.Vc.bind(g.Bl,this.Fj,this,!0);this.Vc.Bg(this.vf);this.W_();this.Vc.setLoop(this.Ql);
this.Vc.Uw(this.Wx);this.Vc.cu(this.gq);this.Vc.play(this.Gb,this.A,this.qC)};r.prototype.uNa=function(){this.qC=this.Vc.getCurrentTime();this.Vc.h(e.Cl,this.LT,this);this.Vc.h(e.Dg,this.Nf,this);this.Vc.h(e.Zj,this.$o,this);this.Vc.h(g.Bl,this.Fj,this);this.Vc=null};r.prototype.clear=function(){this.Zc(k.ca);this.C&&(this.C.h(g.L("gain"),this.QH,this),this.C.h(g.L("ambisonic"),this.LH,this),this.C.h(g.L("mp3Url"),this.nk,this),this.C.h(g.L("oggUrl"),this.nk,this),this.C.h(g.L("subtitlesURL"),this.nk,
this),this.C.h(g.L("url"),this.nk,this),this.C=null)};r.prototype.nk=function(){var t=this;this.jI&&clearTimeout(this.jI);this.jI=setTimeout(function(){t.jI=null;t.Vc&&(t.A.src=t.rM(t.C),t.A.Gm=t.C.get("subtitlesURL"),t.Vc.play(t.Gb,t.A,t.qC))},10)};r.prototype.QH=function(){if(this.Vc){var t=this.C.get("gain");this.A.gain!=t&&(this.A.gain=t,this.Vc.WY(this.A.gain))}};r.prototype.LH=function(){if(this.Vc){var t=this.C.get("ambisonic")=="foa";this.A.mt!=t&&(this.A.mt=t,this.Vc.SY(this.A.mt))}};r.prototype.qV=
function(){this.A=new c;this.A.src=this.rM(this.C);this.A.Gm=this.C.get("subtitlesURL");this.A.gE=!0;this.A.gain=this.C.get("gain");this.A.mt=this.C.get("ambisonic")=="foa";this.A.VW=this.RR};r.prototype.rM=function(t){var u=t.get("url");if(u)return u;var v=t.get("mp3Url");return v&&p.DMa?v:(t=t.get("oggUrl"))&&p.EMa?t:u||v||t};r.prototype.$o=function(){this.ac=this.Vc.mj();this.vla()};r.prototype.Nf=function(){this.ac!=this.Vc.mj()&&this.$o();this.qC=this.Vc.getCurrentTime();this.$V()};r.prototype.Fj=
function(){var t=this;this.bq=this.Vc.fP().map(function(u){for(var v=null,w=0;w<t.bq.length&&!v;w++)t.bq[w].cue==u&&(v=t.bq[w]);v||(v=new b(u));return v});this.o(new h(g.Bl))};r.prototype.LT=function(){this.Zc(k.ca);this.wla()};r.prototype.J3a=function(){return this.Vc&&this.Vc.getCurrentTime()&&this.Vc.getCurrentTime()==this.Vc.mj()};r.prototype.Bka=function(){this.qC=0;this.$V()};r.prototype.$V=function(){this.o(new h(r.Dg))};r.prototype.vla=function(){this.o(new h(r.Zj))};r.prototype.wla=function(){this.o(new h(g.Ub))};
r.prototype.Ala=function(){this.o(new h(g.Pd))};r.Dg="time update";r.Zj="duration update";return r}(n)});
define("tdv/view/av/SubtitleController",["require","exports","tdv/constants/EventName"],function(a,m,h){return function(){function n(g,k){this.X_=g;this.Xx=k;this.Nca=[];this.yYa();this.Fj()}n.prototype.clear=function(){this.uZa();this.$$a();this.Xx=this.X_=null};n.prototype.yYa=function(){var g;(g=this.Xx)===null||g===void 0||g.bind(h.Bl,this.Fj,this,!0)};n.prototype.$$a=function(){var g;(g=this.Xx)===null||g===void 0||g.h(h.Bl,this.Fj,this)};n.prototype.Fj=function(){var g,k;(g=this.X_)===null||
g===void 0||g.set("activeSubtitles",this.Nca=((k=this.Xx)===null||k===void 0?void 0:k.bq)||[])};n.prototype.uZa=function(){var g,k;((g=this.X_)===null||g===void 0?void 0:g.get("activeSubtitles"))!=this.Nca||(k=this.X_)!==null&&k!==void 0&&k.set("activeSubtitles",this.Nca=[])};return n}()});
define("tdv/player/script/Audio","require exports tdv/constants/EventName tdv/constants/Priority tdv/constants/PlaybackState tdv/binding/Bindable tdv/events/Event tdv/player/parser/ClassInfo tdv/view/av/AudioPlayer tdv/view/av/SubtitleController".split(" "),function(a,m,h,n,g,k,e,b,c,d){a=function(f){function l(p){var q=f.call(this)||this;q.zv=p||n.nWa;q.fq=void 0;q.yn=null;q.play=q.play;q.stop=q.stop;q.pause=q.pause;return q}P(l,f);l.prototype.sJ=function(){if(this.fq==void 0){this.yn&&(this.yn.clear(),
this.yn=null);var p=this.get("audio");p?(this.fq=new c(this.get("application"),p,b.Oa("DirectionalPanoramaAudio",this),this.zv),p=function(){this.fq.setLoop(this.get("loop",!1))},p.call(this),this.bind(h.L("loop"),p,this,!1),p=function(){this.fq.Bg(this.get("application").get("mute",!1))},p.call(this),this.get("application").bind(h.L("mute"),p,this,!0),p=function(){this.set("state",this.fq.getState())},p.call(this),this.fq.bind(h.Pd,p,this,!0),this.fq.bind(h.Ub,this.T4a,this,!0),this.yn=new d(this,
this.fq)):this.fq=null}return this.fq};l.prototype.set=function(p,q){switch(p){case "state":var r=this.get("state")||g.ca,t=this.fq&&this.fq.getState()||g.ca;t!=r&&(r==g.ca&&t==g.PLAYING&&this.o(h.Up),this.o(new e(h.Pd,{oldState:r,state:t})));break;case "subtitlesViewerArea":(r=k.prototype.get.call(this,p))&&r.D5.remove(this),q&&q.D5.add(this)}f.prototype.set.call(this,p,q)};l.prototype.tw=function(){return[]};l.prototype.T4a=function(){this.o(new e(h.Ub))};l.prototype.play=function(){var p=this.sJ();
p&&p.Zc(g.PLAYING)};l.prototype.stop=function(){var p=this.sJ();p&&p.Zc(g.ca)};l.prototype.pause=function(){var p=this.sJ();p&&p.Zc(g.$b)};return l}(k);b.create("Audio",a);return a});define("tdv/player/script/MediaAudio",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/Audio"],function(a,m,h,n){a=function(g){function k(e){return g.call(this,e)||this}P(k,g);return k}(n);h.create("MediaAudio",a);return a});
define("tdv/player/script/PanoramaAudio",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio","tdv/constants/Priority"],function(a,m,h,n,g){a=function(k){function e(){return k.call(this,g.LVa)||this}P(e,k);return e}(n);h.create("PanoramaAudio",a);return a});
define("tdv/player/script/DirectionalPanoramaAudio",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaAudio"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(n);h.create("DirectionalPanoramaAudio",a);return a});
define("tdv/player/script/Model3DCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DCameraMovement",m,function(){m.call(this)})});
define("tdv/player/script/DistanceModel3DCameraMovement",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCameraMovement"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCameraMovement");return m.define("DistanceModel3DCameraMovement",h,function(){h.call(this)})});
define("tdv/player/script/DistancePanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("DistancePanoramaCameraMovement",m,function(){m.call(this)})});
define("tdv/player/script/DistanceRotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("DistanceRotationalCameraMovement",m,function(){m.call(this)})});
define("tdv/binding/ChangeWatcher",["require","exports","tdv/constants/EventName","tdv/utils"],function(a,m,h,n){return function(){function g(k,e,b,c,d){this.qs=null;this.$ha=k;this.ag=h.L(this.$ha);this.ega=e;this.ga=b||window;this.Ega=c;this.QAa=d;this.Rga=!1}g.prototype.jF=function(){this.aka(null)};g.prototype.aka=function(k){var e=this;n.toArray(this.qs).forEach(function(b){b&&b.h(this.ag,e.Ewa,e)}.bind(this));this.qs=k;n.toArray(this.qs).forEach(function(b){b&&b.bind(this.ag,this.Ewa,e,e.Ega)}.bind(this));
this.iEa()};g.prototype.iEa=function(){this.QAa&&this.QAa.aka(this.T1a())};g.prototype.T1a=function(){return this.qs==null?null:Array.isArray(this.qs)?this.qs.map(function(k){return k?k.get(this.$ha):null}.bind(this)):this.qs.get(this.$ha)};g.prototype.Ewa=function(k){if(!this.Rga){try{this.Rga=!0,this.iEa(),this.ega.call(this.ga,k)}catch(e){n.VX("ChangeWatcher._changeHandler",e)}this.Rga=!1}};g.jx=function(k,e,b,c,d){d===void 0&&(d=!1);n.FA(e)&&(e=e.split("."));return e.length>0?(e=new g(e[0],b,
c,d,g.jx(null,e.slice(1),b,c,d)),e.aka(k),e):null};return g}()});
define("tdv/view/list/dropdown/DropDownArrow",["require","exports","tdv/view/canvas/Canvas"],function(a,m,h){return function(n){function g(){var k=n.call(this)||this;k.gf("DropDownArrow");return k}P(g,n);g.prototype.Pb=function(){n.prototype.Pb.call(this);this.m("color","#000000");this.m("direction",g.Vaa)};g.prototype.jb=function(){this.bda(["color","direction"])&&(this.$("color"),this.$("direction"),this.NX());n.prototype.jb.call(this)};g.prototype.xsa=function(){var k=this.u.canvas.width,e=this.u.canvas.height,
b=this.G("color"),c=this.G("direction"),d=[k*.5,0,k];c=c==g.Vaa?[e,0,0]:[0,e,e];var f=this.gLa();f.clearRect(0,0,k,e);f.beginPath();f.moveTo(d[0],c[0]);f.lineTo(d[1],c[1]);f.lineTo(d[2],c[2]);f.fillStyle=b;f.fill();n.prototype.xsa.call(this)};g.Vaa="down";return g}(h)});
define("tdv/view/list/dropdown/DropDownButton","require exports tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/Cursor tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/State tdv/view/containers/Container tdv/view/list/dropdown/DropDownArrow tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(){var q=l.call(this)||this;q.gf("DropDownButton");q.Za=null;q.$B=null;q.mha=!0;q.set("ariaRole","dropdown");q.set("autoRolledOver",
!0);q.set("autoPressed",!0);q.set("childrenInteractionEnabled",!1);q.set("contentOpaque",!0);q.set("cursor",g.qf);q.bind(k.ma,q.Xea,q,!1);return q}P(p,l);p.prototype.Pb=function(){l.prototype.Pb.call(this);this.m("arrowColor","#000000");this.m("arrowBeforeLabel");this.m("arrowWidth",9);this.m("arrowHeight",5);this.m("arrowGap",5);this.m("shadow",!1);this.m("layout",e.Ni);this.m("verticalAlign",n.$d);this.m("borderRadius",5);this.m("borderColor","#AAAAAA");this.m("borderSize",1);this.m("backgroundColor",
["#FAFAFA","#E5E5E5"]);this.m("backgroundColorRatios",[0,1]);this.m("backgroundColorDirection","vertical");this.m("paddingLeft",5);this.m("paddingTop",5);this.m("paddingRight",5);this.m("paddingBottom",5);this.m("fontFamily");this.m("fontSize");this.m("fontColor","#555555");this.m("fontWeight");this.m("fontStyle");this.m("textDecoration");this.m("textShadowColor");this.m("textShadowHorizontalLength");this.m("textShadowVerticalLength");this.m("textShadowBlurRadius");this.m("textShadowOpacity");this.D("rollOverBorderColor",
b.ea,"borderColor");this.D("rollOverArrowColor",b.ea,"arrowColor");this.D("rollOverBackgroundColor",b.ea,"backgroundColor");this.D("rollOverBackgroundColorRatios",b.ea,"backgroundColorRatios");this.D("rollOverShadow",b.ea,"shadow");this.D("pressedBorderColor",b.Fb,"borderColor");this.D("pressedArrowColor",b.Fb,"arrowColor");this.D("pressedBackgroundColor",b.Fb,"backgroundColor");this.D("pressedBackgroundColorRatios",b.Fb,"backgroundColorRatios");this.D("pressedShadow",b.Fb,"shadow");this.D("pressedRollOverBorderColor",
b.qc,"borderColor");this.D("pressedRollOverArrowColor",b.qc,"arrowColor");this.D("pressedRollOverBackgroundColor",b.qc,"backgroundColor");this.D("pressedRollOverBackgroundColorRatios",b.qc,"backgroundColorRatios");this.D("pressedRollOverShadow",b.qc,"shadow");this.D("pressedBorderColor",b.oa,"borderColor");this.D("pressedArrowColor",b.oa,"arrowColor");this.D("pressedBackgroundColor",b.oa,"backgroundColor");this.D("pressedBackgroundColorRatios",b.oa,"backgroundColorRatios");this.D("pressedShadow",
b.oa,"shadow")};p.prototype.set=function(q,r){q=="label"&&this.get("label")!=r&&(this.mha=!0,this.Tf());l.prototype.set.call(this,q,r)};p.prototype.Kb=function(){l.prototype.Kb.call(this);this.Za||(this.Za=new f,this.Za.set("width","100%"),this.mb(this.Za));this.$B||(this.$B=new d,this.$B.set("direction",d.Vaa),this.mb(this.$B))};p.prototype.Xea=function(){this.open();this.o(new h(k.OPEN))};p.prototype.open=function(){this.h(k.ma,this.Xea,this);this.lV(!0)};p.prototype.close=function(){this.bind(k.ma,
this.Xea,this,!1);this.lV(!1)};p.prototype.Vx=function(){return this.Za&&this.Za.get("text")||l.prototype.Vx.call(this)};p.prototype.jb=function(){if(this.mha){var q=this.get("label");this.Za.set("text",q);this.mha=!1}this.Pc("horizontalAlign fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),{},[this.Za],!0,!0);this.S("arrowGap")&&(this.set("gap",this.G("arrowGap")),
this.$("arrowGap"));this.S("arrowColor")&&(this.$B.set("color",this.G("arrowColor")),this.$("arrowColor"));this.S("arrowBeforeLabel")&&(this.G("arrowBeforeLabel")==1?this.rr(this.$B,0):this.rr(this.Za,0),this.$("arrowBeforeLabel"));this.S("arrowWidth")&&(this.$B.set("width",this.G("arrowWidth")),this.$("arrowWidth"));this.S("arrowHeight")&&(this.$B.set("height",this.G("arrowHeight")),this.$("arrowHeight"));l.prototype.jb.call(this)};return p}(c)});
define("tdv/view/list/dropdown/DropDownPopup","require exports tdv/player/view/util/Device tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/Cursor tdv/view/constants/OverflowPolicy tdv/constants/EventName tdv/view/containers/Container tdv/view/containers/VerticalContainer tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(q){var r=l.call(this)||this;r.uda=!1;r.Yb=null;r.bT=[];r.CD=!0;r.V4=!1;r.je=q;r.gf("DropDownPopup");r.set("ariaRole","listbox");
return r}P(p,l);p.prototype.zLa=function(){return this.Yb.Cb()};p.prototype.open=function(){this.AG=this.ZKa();this.uda=!0;this.AG.mb(this);this.set("overIndex",-1);this.set("visible",!0);this.bind(b.Sa,this.te,this,!1);this.AG.bind(b.$a,this.nv,this,!1);this.AG.bind(b.Rb,this.kd,this,!1)};p.prototype.close=function(){this.set("visible",!1);this.Yb.set("overflow",e.mL);this.Yb.set("contentOpaque",!0);this.h(b.Sa,this.te,this);this.AG.h(b.$a,this.nv,this);this.AG.bind(b.Rb,this.kd,this,!1);this.AG.removeChild(this);
this.AG=null};p.prototype.Kb=function(){c.prototype.Kb.call(this);this.Yb||(this.Yb=new d,this.Yb.set("overflow",e.mL),this.Yb.bind(b.Rb,this.kd,this,!1),this.Yb.bind(b.Wr,this.tD,this,!1),this.mb(this.Yb))};p.prototype.ZKa=function(){for(var q=this.je.getParent();q.getParent();)q=q.getParent();return q};p.prototype.kd=function(){this.dHa()};p.prototype.te=function(){this.V4=!1};p.prototype.tD=function(){this.V4=!0};p.prototype.nv=function(){this.get("overIndex")!=-1||this.V4&&h.Jp()||this.o(new n(b.CB));
this.V4=!1};p.prototype.i5a=function(q){this.set("overIndex",this.Xfa(q.source))};p.prototype.j5a=function(q){q=this.Xfa(q.source);this.get("overIndex")==q&&this.set("overIndex",-1)};p.prototype.h5a=function(q){q=this.Xfa(q.source);this.set("overIndex",q);this.set("selectedIndex",q);this.o(new n(b.Xr))};p.prototype.Xfa=function(q){for(var r=0;r<this.bT.length;r++)if(this.bT[r]==q)return r;return-1};p.prototype.Pb=function(){this.Jl(p.ad)};p.prototype.A2a=function(q){var r;for(r=q;r.getParent();r=
r.getParent());q=q.wa().KLa(r.wa());if(r=this.je.Xb())q.left/=r.fD,q.top/=r.fD;return q};p.prototype.jb=function(){var q=!1,r=!1;if(this.S("items")){q=this.G("items")||[];for(var t=this.bT.length;t<q.length;t++){var u=new f;u.xa({width:"100%",paddingLeft:5,paddingRight:5,paddingBottom:2,paddingTop:2,cursor:k.qf});u.bind(b.UF,this.i5a,this,!1);u.bind(b.Qr,this.j5a,this,!1);u.bind(b.ma,this.h5a,this,!1);this.bT.push(u)}u=this.Yb.Cb();for(t=q.length;t<u.length;t++)this.Yb.removeChild(u[t]);for(t=u.length;t<
q.length;t++)this.Yb.mb(this.bT[t]);for(t=0;t<q.length;t++)u[t].xa({text:q[t],ariaLabel:q[t],ariaRole:"option"});this.$("items");r=q=!0}this.S("selectedIndex")&&(this.$("selectedIndex"),q=!0);var v="horizontalAlign popUpBackgroundOpacity popUpPaddingBottom popUpPaddingLeft popUpPaddingRight popUpPaddingTop fontFamily fontSize fontWeight fontStyle tabIndex textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");for(t=0;t<
v.length;t++)u=v[t],this.S(u)&&(this.$(u),r=!0);if(r)for(r={fontFamily:this.G("fontFamily"),fontSize:this.G("fontSize"),fontWeight:this.G("fontWeight"),fontStyle:this.G("fontStyle"),horizontalAlign:this.G("horizontalAlign"),tabIndex:this.G("tabIndex"),textDecoration:this.G("textDecoration"),textShadowColor:this.G("textShadowColor"),textShadowHorizontalLength:this.G("textShadowHorizontalLength"),textShadowVerticalLength:this.G("textShadowVerticalLength"),textShadowBlurRadius:this.G("textShadowBlurRadius"),
textShadowOpacity:this.G("textShadowOpacity"),paddingBottom:this.G("popUpPaddingBottom"),paddingLeft:this.G("popUpPaddingLeft"),paddingRight:this.G("popUpPaddingRight"),paddingTop:this.G("popUpPaddingTop"),backgroundOpacity:this.G("popUpBackgroundOpacity")},u=this.Yb.Cb(),t=0;t<u.length;t++)u[t].xa(r);r="selectedIndex overIndex popUpBackgroundColor rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor".split(" ");for(t=0;t<r.length;t++)u=
r[t],this.S(u)&&(this.$(u),q=!0);if(q){q=this.G("popUpBackgroundColor");r=this.G("rollOverPopUpBackgroundColor")||q;v=this.G("selectedPopUpBackgroundColor")||q;var w=this.G("popUpFontColor"),x=this.G("rollOverPopUpFontColor")||w,y=this.G("selectedPopUpFontColor")||w,z=this.G("selectedIndex"),A=this.G("overIndex");u=this.Yb.Cb();for(t=0;t<u.length;t++)t==z?u[t].xa({fontColor:y,backgroundColor:v}):t==A?u[t].xa({fontColor:x,backgroundColor:r}):u[t].xa({fontColor:w,backgroundColor:q})}if(this.uda||this.S("popUpGap")||
this.S("buttonWidth"))this.je&&this.Yb.set("minWidth",this.je.nb()),this.$("popUpGap"),this.dHa(),this.uda=!1;this.Pc("popUpBackgroundBlur popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{popUpBackgroundBlur:"backgroundBlur",popUpShadow:"shadow",popUpShadowBlurRadius:"shadowBlurRadius",popUpShadowColor:"shadowColor",popUpShadowHorizontalLength:"shadowHorizontalLength",popUpShadowOpacity:"shadowOpacity",
popUpShadowSpread:"shadowSpread",popUpShadowVerticalLength:"shadowVerticalLength"},[this.Yb],!0,!0);this.DGa();c.prototype.jb.call(this)};p.prototype.dHa=function(){var q=this.ZKa(),r=this.A2a(this.je),t=this.je.nb(),u=this.je.Mb(),v=this.G("popUpGap"),w=this.Yb.u.contentWidth,x=this.Yb.u.contentHeight,y=q.Mb()-(r.top+u+v)-5,z=r.top-5-v,A=this.G("horizontalAlign");x<=y?(this.CD=!0,this.Yb.set("top",r.top+u+v),this.Yb.set("maxHeight",void 0),this.Yb.set("overflow",e.mL)):x<=z?(this.CD=!1,this.Yb.set("top",
r.top-x-v),this.Yb.set("maxHeight",void 0),this.Yb.set("overflow",e.mL)):(y>=z?(this.CD=!0,this.Yb.set("top",r.top+u+v),this.Yb.set("maxHeight",y)):(this.CD=!1,this.Yb.set("top",r.top-z+v),this.Yb.set("maxHeight",z)),this.Yb.set("overflow",e.Wr));u=A==g.$e?r.left+Math.round((t-w)*.5):A==g.Db?r.left+t-w:r.left;u<0?u=r.left:r.left+w>q.nb()&&(u=r.left+t-w);this.Yb.set("left",u);this.DGa()};p.prototype.DGa=function(){var q=this.G("popUpBorderRadius");this.Yb.xa({borderTopRadius:this.CD?0:q,borderBottomRadius:this.CD?
q:0});for(var r=this.Yb.Cb(),t=0;t<r.length;t++){var u=t==0,v=t==r.length-1;r[t].xa({borderTopRadius:!this.CD&&u?q:0,borderBottomRadius:this.CD&&v?q:0})}};p.ad=Object.assign({},c.ad,{visible:!1,width:"100%",height:"100%",includeInLayout:!1,items:[],selectedIndex:-1,overIndex:-1,popUpGap:0,popUpBackgroundColor:void 0,popUpBackgroundOpacity:void 0,popUpBackgroundBlur:0,rollOverPopUpBackgroundColor:void 0,selectedPopUpBackgroundColor:void 0,popUpFontColor:void 0,rollOverPopUpFontColor:void 0,selectedPopUpFontColor:void 0,
popUpShadow:!0,popUpShadowBlurRadius:void 0,popUpShadowColor:void 0,popUpShadowHorizontalLength:void 0,popUpShadowOpacity:void 0,popUpShadowSpread:void 0,popUpShadowVerticalLength:void 0,fontFamily:void 0,fontSize:void 0,fontWeight:void 0,fontStyle:void 0,textDecoration:void 0,textShadowColor:void 0,textShadowHorizontalLength:void 0,textShadowVerticalLength:void 0,textShadowBlurRadius:void 0,textShadowOpacity:void 0,buttonWidth:void 0});return p}(c)});
define("tdv/view/list/dropdown/DropDown","require exports tdv/events/Event tdv/constants/EventName tdv/view/containers/Container tdv/view/list/dropdown/DropDownButton tdv/view/list/dropdown/DropDownPopup".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.gf("DropDown");d.je=new k;d.je.bind(n.Rb,d.Y4a,d,!1);d.je.bind(n.OPEN,d.x5a,d,!1);d.je.bind(n.CB,d.UM,d,!1);d.je.bind(n.jd,d.X4a,d,!1);d.je.set("width","100%");d.je.set("height","100%");d.je.set("toolTipDisabled",
!0);d.pk=new e(d.je);d.pk.bind(n.CB,d.UM,d,!1);d.pk.bind(n.Xr,d.N5a,d,!1);d.tFa=!0;d.Cn=!1;return d}P(c,b);c.prototype.Pb=function(){b.prototype.Pb.call(this);this.m("prompt","");this.m("label","");this.m("items",[]);this.m("selectedIndex",-1);this.m("arrowBeforeLabel");this.m("arrowWidth",9);this.m("arrowHeight",5);this.m("arrowGap",5);this.m("borderRadius",5);this.m("borderSize",1);this.m("backgroundColorDirection","vertical");this.m("horizontalAlign","left");this.m("paddingLeft",5);this.m("paddingTop",
5);this.m("paddingRight",5);this.m("paddingBottom",5);this.m("fontFamily");this.m("fontSize");this.m("fontColor","#555555");this.m("fontWeight");this.m("fontStyle");this.m("textDecoration");this.m("textShadowColor");this.m("textShadowHorizontalLength");this.m("textShadowVerticalLength");this.m("textShadowBlurRadius");this.m("textShadowOpacity");this.m("popUpGap",0);this.m("popUpBorderRadius");this.m("popUpPaddingBottom",2);this.m("popUpPaddingLeft",5);this.m("popUpPaddingRight",5);this.m("popUpPaddingTop",
2);this.m("popUpShadow",!0);this.m("popUpShadowBlurRadius");this.m("popUpShadowColor");this.m("popUpShadowHorizontalLength");this.m("popUpShadowOpacity");this.m("popUpShadowSpread");this.m("popUpShadowVerticalLength");this.m("popUpBackgroundColor","#FFFFFF");this.m("popUpBackgroundOpacity");this.m("popUpBackgroundBlur",0);this.m("rollOverPopUpBackgroundColor");this.m("selectedPopUpBackgroundColor");this.m("popUpFontColor","#555555");this.m("rollOverPopUpFontColor");this.m("selectedPopUpFontColor");
this.m("borderColor","#AAAAAA");this.m("arrowColor","#000000");this.m("backgroundColor",["#FAFAFA","#E5E5E5"]);this.m("backgroundColorRatios",[0,1]);this.m("shadow",!1);this.m("rollOverBorderColor");this.m("rollOverArrowColor");this.m("rollOverBackgroundColor");this.m("rollOverBackgroundColorRatios");this.m("rollOverShadow");this.m("pressedBorderColor");this.m("pressedArrowColor");this.m("pressedBackgroundColor");this.m("pressedBackgroundColorRatios");this.m("pressedShadow");this.m("pressedRollOverBorderColor");
this.m("pressedRollOverArrowColor");this.m("pressedRollOverBackgroundColor");this.m("pressedRollOverBackgroundColorRatios");this.m("pressedRollOverShadow")};c.prototype.Kb=function(){b.prototype.Kb.call(this);this.je.getParent()||this.mb(this.je)};c.prototype.close=function(){this.UM()};c.prototype.Y4a=function(){this.tFa=!0;this.Tf()};c.prototype.x5a=function(){this.je.open();this.pk.set("selectedIndex",this.get("selectedIndex"));this.pk.open()};c.prototype.UM=function(){this.o(new h(n.CB));this.je.close();
this.pk.close()};c.prototype.X4a=function(){this.je.close();this.pk.close()};c.prototype.N5a=function(){this.set("selectedIndex",this.pk.get("selectedIndex"));this.UM();this.Cn=!0};c.prototype.jb=function(){var d=!1;if(this.S("prompt")||this.S("label"))d=!0,this.$("label"),this.$("prompt");if(this.S("selectedIndex")||this.S("items")){d=!0;var f=this.G("selectedIndex"),l=this.G("items");f>=0&&f>=l.length&&(f=-1);this.set("selectedIndex",f);this.pk.set("items",this.G("items"));this.pk.set("selectedIndex",
this.G("selectedIndex"));this.$("items");this.$("selectedIndex");this.Cn&&(this.Cn=!1,this.o(new h(n.V)))}d&&(d=this.G("label"),d||(f=this.G("selectedIndex"),d=f<0?this.G("prompt"):this.G("items")[f]),this.je.set("label",d));this.tFa&&(this.pk.set("minWidth",this.je.nb()),this.pk.set("buttonWidth",this.je.nb()));this.Pc("fontFamily fontSize fontColor fontWeight fontStyle tabIndex textDecoration horizontalAlign textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),
{},[this.je,this.pk],!0,!0);this.Pc("popUpBorderRadius popUpGap popUpPaddingBottom popUpPaddingLeft popUpPaddingRight popUpPaddingTop popUpBackgroundColor popUpBackgroundOpacity popUpBackgroundBlur rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{},[this.pk],!0,!0);this.Pc("arrowBeforeLabel arrowWidth arrowHeight arrowColor rollOverArrowColor pressedArrowColor pressedRollOverArrowColor arrowGap shadow shadowBlurRadius shadowColor shadowHorizontalLength shadowOpacity shadowSpread shadowVerticalLength borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize borderColor borderLeftColor borderTopColor borderRightColor borderBottomColor rollOverBorderColor pressedBorderColor pressedRollOverBorderColor backgroundColor backgroundColorRatios backgroundColorDirection backgroundOpacity rollOverBackgroundColor rollOverBackgroundColorRatios rollOverShadow pressedBackgroundColor pressedBackgroundColorRatios pressedShadow pressedRollOverBackgroundColor pressedRollOverBackgroundColorRatios pressedRollOverShadow paddingLeft paddingTop paddingRight paddingBottom".split(" "),
{},[this.je],!0,!0);b.prototype.jb.call(this)};return c}(g)});
define("tdv/player/script/DropDown",["require","tdv/binding/ChangeWatcher","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/list/dropdown/DropDown"],function(a){var m=a("tdv/binding/ChangeWatcher"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/list/dropdown/DropDown");a=n.define("DropDown",g,function(){g.call(this);this.Td=null;this.bAa=[];this.bind(h.V,this.a5a,this)});a.prototype.set=function(k,e){if(k=="playList"){if(this.Td)for(this.Td.h("change",
this.mz,this);this.bAa.length;)this.bAa.shift().jF();(this.Td=e)?(m.jx(this.Td,"items.label",this.X5,this),m.jx(this.Td,"items.media.label",this.X5,this),this.X5(),this.Td.bind("change",this.mz,this),this.mz()):this.X5()}g.prototype.set.call(this,k,e)};a.prototype.X5=function(){this.Td?this.set("items",this.Td.get("items").map(function(k){return k.get("label")||k.get("media")&&k.get("media").get("label")})):this.set("items",[])};a.prototype.mz=function(){this.set("selectedIndex",this.Td.get("selectedIndex"))};
a.prototype.a5a=function(){this.Td&&this.Td.set("selectedIndex",this.get("selectedIndex"))};return a});define("tdv/player/script/DustPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("DustPanoramaOverlay",m,function(){m.call(this)});a.prototype.get=function(h,n){h=="startState"&&n===void 0&&(n=this.get("initialState"));return m.prototype.get.call(this,h,n)};return a});
define("tdv/player/script/Effect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/Effect"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/effects/Effect");a=m.define("Effect",h,function(){h.call(this)});a.prototype.cancel=function(){return h.prototype.cancel.apply(this,arguments)};a.prototype.getPosition=function(){return h.prototype.vm.apply(this,arguments)};a.prototype.play=function(){return h.prototype.play.apply(this,arguments)};a.prototype.reverse=function(){return h.prototype.reverse.apply(this,
arguments)};a.prototype.stop=function(){return h.prototype.stop.apply(this,arguments)};return a});define("tdv/player/script/FadeInEffect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/FadeInEffect"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/effects/FadeInEffect");return m.define("FadeInEffect",h,function(){h.call(this)})});
define("tdv/player/script/FadeOutEffect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/FadeOutEffect"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/effects/FadeOutEffect");return m.define("FadeOutEffect",h,function(){h.call(this)})});
define("tdv/player/script/Model3DCamera","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/events/async".split(" "),function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/events/async");a=g.define("Model3DCamera",m,function(){m.call(this);this.set("userInteracting",!1);this.set("moving",!1);this.set("mouseDisabled",!1);this.set("clickTranslationDisabled",
!1);this.set("doubleClickDisabled",!1);this.Nea=this.B4a=this.Rda=this.Qda=!1;"distance fov yaw pitch x y z".split(" ").forEach(function(e){this.bind(h.L(e),this.H5a,this,!0)}.bind(this))});a.prototype.Dmb=function(){this.UN={x:this.get("x"),y:this.get("y"),z:this.get("z"),yaw:this.get("yaw"),pitch:this.get("pitch"),distance:this.get("distance"),fov:this.get("fov")}};a.prototype.setPosition=function(e){e.x!==void 0&&this.set("x",e.x);e.y!==void 0&&this.set("y",e.y);e.z!==void 0&&this.set("z",e.z);
e.distance!==void 0&&this.set("distance",e.distance);e.yaw!==void 0&&this.set("yaw",e.yaw);e.pitch!==void 0&&this.set("pitch",e.pitch);e.fov!==void 0&&this.set("fov",e.fov);e.easing!==void 0?this.set("easing",e.easing):this.set("easing",0)};a.prototype.j9a=function(e){this.UN||(this.UN={});for(var b in e)this.UN[b]=e[b]};a.prototype.bkb=function(){this.UN&&this.setPosition(this.UN)};a.prototype.zRa=function(e){this.yAa!==e&&(this.yAa=e,this.Kab())};a.prototype.Kab=function(){this.set("mouseDisabled",
this.B4a||this.yAa)};a.prototype.$Qa=function(e){this.Qda!==e&&(this.Qda=e,this.FGa())};a.prototype.aRa=function(e){this.Rda!==e&&(this.Rda=e,this.FGa())};a.prototype.FGa=function(){this.set("clickTranslationDisabled",this.Qda||this.Rda)};a.prototype.Akb=function(e){this.Nea!==e&&(this.Nea=e,this.uab())};a.prototype.uab=function(){this.set("doubleClickDisabled",this.Nea)};a.prototype.H5a=function(){this.vDa||(this.vDa=!0,k.ME(function(){this.vDa=!1;this.V$a()}.bind(this)))};a.prototype.V$a=function(){this.o(h.Mm)};
a.Wob=100;a.prototype.setStoredPosition=function(e){this.j9a(e)};a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=function(){this.set("state",n.$b)};a.prototype.stop=function(){this.set("state",n.ca)};return a});
define("tdv/player/script/FirstPersonModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCamera");return m.define("FirstPersonModel3DCamera",h,function(){h.call(this);this.set("distance",0)})});
define("tdv/player/script/HotspotPanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/effects/Effect"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/effects/Effect");a=n.define("HotspotPanoramaOverlay",m,function(){m.call(this);this.bind(h.od,this.cp,this,!0);this.bind(h.jd,this.ap,this,!0);this.xj=[];this.Ld=!1});a.prototype.set=function(k,e){switch(k){case "enabledInCardboard":this.set("enabledInVR",
e);break;case "effect":case "rollOverEffect":case "areas":this.Z6a(),this.xj=[]}m.prototype.set.call(this,k,e);switch(k){case "enabledInCardboard":this.set("enabledInVR",e);break;case "effect":case "rollOverEffect":case "areas":this.jXa()}};a.prototype.jXa=function(){this.get("effect")&&this.get("effect").bind(g.xx,this.yBa,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").bind(g.xx,this.KCa,this,!0);this.get("areas",[]).forEach(function(k){k.bind(h.uc,this.mBa,this,!0);k.bind(h.Eb,
this.lBa,this,!0)}.bind(this))};a.prototype.Z6a=function(){this.get("effect")&&this.get("effect").h(g.xx,this.yBa,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").h(g.xx,this.KCa,this,!0);this.get("areas",[]).forEach(function(k){k.h(h.uc,this.mBa,this,!0);k.h(h.Eb,this.lBa,this,!0)}.bind(this))};a.prototype.mBa=function(k){this.xj.indexOf(k.source)<0&&(this.xj.push(k.source),this.xj.length==1&&this.G3())};a.prototype.lBa=function(k){k=this.xj.indexOf(k.source);k>=0&&(this.xj.splice(k,
1),this.xj.length==0&&this.Fs())};a.prototype.G3=function(){var k=this.get("effect"),e=this.get("rollOverEffect");e&&(k&&k.vm()>0?k.reverse():e.play())};a.prototype.Fs=function(){var k=this.get("rollOverEffect");if(k){var e=this.get("effect");k.vm()>0?k.reverse():e&&e.get("loop")&&e.play()}};a.prototype.yBa=function(){if(this.xj.length>0){var k=this.get("rollOverEffect");k&&(this.get("effect").stop(),k.play())}};a.prototype.KCa=function(){if(this.xj.length==0){this.get("rollOverEffect").stop();var k=
this.get("effect");k&&k.get("loop")&&k.play()}};a.prototype.cp=function(){var k=this.get("effect");k&&k.play()};a.prototype.ap=function(){var k=this.get("effect");k&&k.stop();(k=this.get("rollOverEffect"))&&k.stop()};return a});
define("tdv/player/script/FlatHotspotPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlay");return m.define("FlatHotspotPanoramaOverlay",h,function(){h.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayArea",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("HotspotPanoramaOverlayArea",m,function(){m.call(this);this.set("displayTooltipInTouchScreens",!0)})});
define("tdv/player/script/FlatHotspotPanoramaOverlayArea",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayArea"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlayArea");return m.define("FlatHotspotPanoramaOverlayArea",h,function(){h.call(this)})});
define("tdv/player/script/QuadPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("QuadPanoramaOverlayPlaybackPosition",m,function(h,n,g){m.call(this);h!==void 0&&this.set("vertices",h);this.set("opacity",n!==void 0?n:1);g!==void 0&&this.set("timestamp",g)})});
define("tdv/player/script/FlatPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("FlatPanoramaOverlayPlaybackPosition",m,function(h,n,g,k,e){m.call(this);h!==void 0&&this.set("yaw",h);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("roll",g);this.set("opacity",k!==void 0?k:1);e!==void 0&&this.set("timestamp",e)})});
define("tdv/player/script/PanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaOverlayPlaybackPosition",m,function(h,n,g,k,e,b,c,d,f){m.call(this);h!==void 0&&this.set("yaw",h);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("rotationX",g);k!==void 0&&this.set("rotationY",k);e!==void 0&&this.set("roll",e);b!==void 0&&this.set("hfov",b);c!==void 0&&this.set("vfov",
c);this.set("opacity",d!==void 0?d:1);f!==void 0&&this.set("timestamp",f)})});define("tdv/player/script/PanoramaPoint",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaPoint",m,function(h,n){m.call(this);this.set("yaw",h);this.set("pitch",n)})});
define("tdv/player/script/PopupPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PopupPanoramaOverlayPlaybackPosition",m,function(h,n,g,k,e,b,c){m.call(this);h!==void 0&&this.set("yaw",h);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("rotationX",g);k!==void 0&&this.set("rotationY",k);e!==void 0&&this.set("rotationZ",e);b!==void 0&&this.set("hfov",b);c!==
void 0&&this.set("timestamp",c)})});
define("tdv/player/script/helper/PlaybackPositionHelper","require tdv/binding/Bindable tdv/player/script/QuadPanoramaOverlayPlaybackPosition tdv/player/script/FlatPanoramaOverlayPlaybackPosition tdv/player/script/PanoramaOverlayPlaybackPosition tdv/player/script/PanoramaPoint tdv/player/script/PopupPanoramaOverlayPlaybackPosition".split(" "),function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/script/QuadPanoramaOverlayPlaybackPosition"),n=a("tdv/player/script/FlatPanoramaOverlayPlaybackPosition"),g=
a("tdv/player/script/PanoramaOverlayPlaybackPosition"),k=a("tdv/player/script/PanoramaPoint"),e=a("tdv/player/script/PopupPanoramaOverlayPlaybackPosition");return{sfb:function(b){return this.v1(b,this.U0a)},Ioa:function(b){return this.v1(b,this.x6a)},Ufb:function(b){return this.v1(b,this.E6a)},Joa:function(b){return this.v1(b,this.O6a)},U0a:function(b){return new n(m.prototype.get.call(b,"yaw",0),m.prototype.get.call(b,"pitch",0),m.prototype.get.call(b,"roll",0),m.prototype.get.call(b,"opacity",1),
0)},O6a:function(b){var c=m.prototype.get.call(b,"vertices",[null,null,null,null]);return new h([c[0]||new k(0,0),c[1]||new k(0,0),c[2]||new k(0,0),c[3]||new k(0,0)],m.prototype.get.call(b,"opacity",1),0)},x6a:function(b){function c(d,f){return m.prototype.get.call(b,d,f)}return new g(c("yaw",0),c("pitch",0),c("rotationX",0),c("rotationY",0),c("roll",0),c("hfov",c("vfov")===void 0?45:void 0),c("vfov"),c("opacity",1),0)},E6a:function(b){function c(d,f){return m.prototype.get.call(b,d,f)}return new e(c("yaw",
0),c("pitch",0),c("rotationX",0),c("rotationY",0),c("rotationZ",0),c("hfov",45),0)},v1:function(b,c){var d=m.prototype.get.call(b,"playbackPositions")||[];return d.length>0?d.slice().sort(function(f,l){return f.get("timestamp")-l.get("timestamp")||d.indexOf(f)-d.indexOf(l)}):[c(b)]}}});
define("tdv/player/script/FlatHotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("FlatHotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Gd=void 0});a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===
void 0&&(this.Gd=g.sfb(this)),this.Gd}return m.prototype.get.call(this,k,e)};a.prototype.set=function(k,e){var b=!1;switch(k){case "opacity":case "distance":case "pitch":case "roll":case "yaw":case "playbackPositions":this.Gd=void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};return a});
define("tdv/player/script/FlatHotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/FlatHotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");return m.define("FlatHotspotPanoramaOverlayImage",h,function(){h.call(this)})});
define("tdv/player/script/FlatHotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/FlatHotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");return m.define("FlatHotspotPanoramaOverlayMap",h,function(){h.call(this)})});
define("tdv/player/script/FlyOverModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCamera");return m.define("FlyOverModel3DCamera",h,function(){h.call(this)})});
define("tdv/player/script/FramePanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("FramePanoramaOverlay",m,function(){m.call(this);this.Gd=void 0});a.prototype.set=function(k,e){var b=!1;switch(k){case "hfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.Gd=
void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===void 0&&(this.Gd=g.Ioa(this)),this.Gd}return m.prototype.get.call(this,k,e)};return a});
define("tdv/player/script/Model3DResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DResource",m,function(){m.call(this)});a.prototype.get=function(h,n){switch(h){case "levels":n=[this];break;case "url":for(var g=m.prototype.get.call(this,h),k=this.get("levels"),e=0;k&&e<k.length&&g===void 0;e++){var b=k[e];b!=this&&(g=b.get(h))}return g!==void 0?g:n}return m.prototype.get.call(this,
h,n)};return a});define("tdv/player/script/TDTilesModel3DResource",["require","tdv/player/script/Model3DResource","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/Model3DResource");return a("tdv/player/parser/ClassInfo").define("TDTilesModel3DResource",m,function(){m.call(this)})});
define("tdv/player/script/Model3DResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DResourceLevel",m,function(){m.call(this)});a.E_="mobile";a.prototype.get=function(h,n){switch(h){case "levels":n=[this];break;case "url":for(var g=m.prototype.get.call(this,h),k=this.get("levels"),e=0;k&&e<k.length&&g===void 0;e++){var b=k[e];b!=this&&(g=b.get(h))}return g!==void 0?g:n}return m.prototype.get.call(this,
h,n)};return a});
define("tdv/player/script/GoogleMaps3DTilesModel3DResource",["require","tdv/player/script/TDTilesModel3DResource","tdv/player/script/Model3DResourceLevel","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/TDTilesModel3DResource"),h=a("tdv/player/script/Model3DResourceLevel");a=a("tdv/player/parser/ClassInfo").define("GoogleMaps3DTilesModel3DResource",m,function(){m.call(this)});a.prototype.set=function(k,e){m.prototype.set.call(this,k,e);switch(k){case "latitude":case "longitude":this.dg();break;
case "apiKey":this.Fab()}};a.prototype.dg=function(){var k=this.get("latitude"),e=this.get("longitude");if(k!==void 0&&e!==void 0){k=this.Bya(k,e);e=(new THREE.Vector3).crossVectors(k,(new THREE.Vector3).crossVectors(this.Bya(90,0),k));var b=new THREE.Vector3(0,0,0);e=(new THREE.Matrix4).lookAt(k,b,e).invert();e=(new THREE.Matrix4).makeRotationX(-Math.PI/2).multiply(e);e=(new THREE.Euler).setFromRotationMatrix(e,"XYZ");this.set("rotationOrder",e.order);this.set("rotationX",e.x*g);this.set("rotationY",
e.y*g);this.set("rotationZ",e.z*g);this.set("positionX",-k.x);this.set("positionY",-k.y);this.set("positionZ",-k.z)}};a.prototype.Bya=function(k,e){k*=n;e*=n;var b=1/298.257223563;const c=Math.sin(k);k=Math.cos(k);b=2*b-b*b;const d=6378137/Math.sqrt(1-b*c*c);return new THREE.Vector3((d+0)*k*Math.cos(e),(d+0)*k*Math.sin(e),d*(1-b)*c)};a.prototype.Fab=function(){var k=this.get("apiKey");if(k!==void 0){var e=new h;e.set("url","https://tile.googleapis.com/v1/3dtiles/root.json?key="+k);this.set("levels",
[e])}};var n=Math.PI/180,g=180/Math.PI;return a});define("tdv/view/containers/GridContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.Pb=function(){this.Jl(k.ad)};k.ad=Object.assign({},h.ad,{layout:n.JB});return k}(h)});
define("tdv/player/script/GridContainer",["require","tdv/player/parser/ClassInfo","tdv/view/containers/GridContainer"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/containers/GridContainer");return m.define("GridContainer",h,function(){h.call(this)})});
define("tdv/player/view/util/Preloader","require tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/URL tdv/view/images/ImageLoader tdv/util/LoadQueue tdv/utils".split(" "),function(a){function m(){}function h(p){this.Fqa=p;this.items=[];this.priority=0}var n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/EventName"),e=a("tdv/constants/Priority"),b=a("tdv/player/view/util/URL"),c=a("tdv/view/images/ImageLoader"),
d=a("tdv/util/LoadQueue"),f=a("tdv/utils"),l=f.extend(g,function(p){g.call(this);this.url=p;this.Gqa=this.priority=0;this.status=l.ica;this.kx=null});l.prototype.Lpa=function(p){this.Gqa+=p};l.prototype.JP=function(p){this.priority+=p};l.prototype.start=function(){this.status=l.D_;c.gaa(this.url)?this.QC():this.pq=d.add(this.url,e.Gaa,this.J7a.bind(this),this.ywa.bind(this))};l.prototype.J7a=function(){this.kx=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.kx.open("GET",
this.url);this.kx.onreadystatechange=function(){this.kx&&this.kx.readyState>3&&this.QC()}.bind(this);this.kx.send()};l.prototype.ywa=function(){this.kx&&(this.kx.abort(),this.kx=null)};l.prototype.stop=function(){this.status==l.D_&&(this.status=l.ica,this.ywa(),this.pq&&this.pq.cancel())};l.prototype.QC=function(){this.kx=null;this.pq&&(this.pq.loaded(),this.pq=null);this.status=l.eWa;this.o(new n(k.ia))};l.ica="not loaded";l.D_="loading";l.eWa="loaded";h.prototype.$bb=function(p){p.forEach(function(q){this.items.indexOf(q)<
0&&(this.items.push(q),q.JP(this.priority),q.Lpa(1))}.bind(this))};h.prototype.Hjb=function(p){var q=this.items;this.items=[];q.forEach(function(r){p.indexOf(r)<0?this.items.push(r):(r.JP(-this.priority),r.Lpa(-1))}.bind(this))};h.prototype.zjb=function(){this.items.forEach(function(p){p.JP(-this.priority);p.Lpa(-1)}.bind(this));this.items=[];this.priority=0};h.prototype.JP=function(p){this.priority+=p;this.items.forEach(function(q){q.JP(p)})};m.ni=[];m.YDa=[];m.e1a=0;m.hIa=function(p,q){this.x4(p).$bb(q.map(function(r){return this.Ja(r)}.bind(this)));
this.m5();this.za()};m.Qjb=function(p,q){this.x4(p).Hjb(q.map(function(r){return this.Ja(r)}.bind(this)));this.m5();this.za()};m.Ajb=function(p){this.x4(p).zjb();this.m5();this.za()};m.X8=function(p,q){this.x4(p).JP(q);this.m5();this.za()};m.m5=function(){this.ni.sort(function(p,q){return q.priority-p.priority})};m.za=function(p){if(this.enabled()&&(p||!this.Vv))if(p){this.Vv&&clearTimeout(this.Vv);this.Vv=null;p=this.Y1a();var q=this.Z1a();f.difference(p,q).forEach(function(r){r.stop()});f.difference(q,
p).forEach(function(r){r.start()})}else this.Vv=setTimeout(function(){this.Vv=null;this.za(!0)}.bind(this),1E3)};m.Vv=null;m.Y1a=function(){return this.ni.filter(function(p){return p.status==l.D_})};m.Z1a=function(){for(var p=this.$1a(),q=[],r=0;r<this.ni.length&&q.length<p;r++){var t=this.ni[r];t.Gqa>0&&(t.status==l.ica||t.status==l.D_)&&q.push(t)}return q};m.$1a=function(){return this.e1a>0?0:5};m.x4=function(p){var q=this.YDa.find(function(r){return r.Fqa==p});q||(q=new h(p),this.YDa.push(q));
return q};m.Ja=function(p){var q=this.ni.find(function(r){return r.url==p});q||(q=new l(p),q.bind(k.ia,this.za,this),this.ni.push(q));return q};m.enabled=function(p){if(p===void 0)return m.X_a||m.Y_a?!1:m.cfa!==void 0?m.cfa:m.ha;m.ha=p};m.ha=!0;m.Dra=function(p){m.cfa=p.get(TDV.PlayerSettings.BACKGROUND_PRELOAD_ENABLED)};m.cfa=void 0;m.Y_a=b.Tg("disable-background-preload",!1);m.X_a=!1;return m});
define("tdv/player/script/Media","require exports tdv/utils tdv/binding/Bindable tdv/player/parser/ClassInfo tdv/player/view/util/Preloader".split(" "),function(a,m,h,n,g,k){a=function(e){function b(){var c=e.call(this)||this;c.dma=h.nr(c.dma,c);return c}P(b,e);b.prototype.dma=function(){k.hIa(this,this.tw())};b.prototype.tw=function(){return[]};b.prototype.Mjb=function(){k.Ajb(this)};b.prototype.set=function(c,d){e.prototype.set.call(this,c,d);this.dma()};return b}(n);g.create("Media",a);return a});
define("tdv/player/script/Panorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Media"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Media");a=m.define("Panorama",h,function(){h.call(this);this.n2=this.PN=void 0;this.set("minFaceSize",void 0)});a.prototype.get=function(n,g){switch(n){case "overlays":return this.$fa();case "frames":return this.Pya();case "partial":if(this.get("hfov")<359.9)return!0}return h.prototype.get.call(this,n,g)};a.prototype.set=
function(n,g){switch(n){case "cardboardMenu":this.set("vrMenu",g)}h.prototype.set.call(this,n,g)};a.prototype.$fa=function(){var n=h.prototype.get.call(this,"overlays");n||(n=[]);return this.Nka(n)};a.prototype.Nka=function(n){if(this.PN===void 0||this.n2!=n){var g=function(e){return m.Oa("PopupPanoramaOverlay",e)},k=function(e){return m.Oa("LensFlarePanoramaOverlay",e)};this.n2=n;this.PN=[].concat(n.filter(function(e){return!(g(e)||k(e))}),n.filter(k),n.filter(g))}return this.PN};a.prototype.xMa=
function(){return this.get("overlays").filter(function(n){return m.Oa("TripodCapPanoramaOverlay",n)}).length>0};a.prototype.nMa=function(){return this.get("overlays").filter(function(n){return m.Oa("CeilingCapPanoramaOverlay",n)}).length>0};a.prototype.SMa=function(){if(!this.cpa())return!1;var n=this.get("pitch",0),g=this.get("vfov",180);if(g>=179.9)return!0;var k=this.nMa()?90:n+g*.5;n=this.xMa()?-90:n-g*.5;return k-n>=179.9?!0:!1};a.prototype.cpa=function(){return this.get("hfov")>=359.9&&!this.get("partial")};
a.prototype.Mn=function(){var n=this.Pya();return n.length>0&&n[0].Mn()};a.prototype.qX=function(){return 0};a.prototype.Pya=function(){var n=h.prototype.get.call(this,"frames",[]);n.forEach(function(g){g.rcb(this)}.bind(this));return n};return a});
define("tdv/player/script/HDRPanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Panorama");a=m.define("HDRPanorama",h,function(){h.call(this)});a.prototype.qX=function(){var n=this.get("frames")||[];return Math.floor((n.length-1)/2)};return a});
define("tdv/player/script/HorizonGridModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("HorizonGridModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/HotspotMapOverlayArea",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("HotspotMapOverlayArea",m,function(){m.call(this)})});
define("tdv/player/script/ImageResourceLevel",["require","exports","tdv/player/parser/ClassInfo","tdv/binding/Bindable"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.get=function(e,b){switch(e){case "tags":return(e=n.prototype.get.call(this,e))||(e=[]),Array.isArray(e)||(e=[e]),e.indexOf(k.Ku)<0&&n.prototype.get.call(this,"grayscale")&&(e=e.concat([k.Ku])),e}return n.prototype.get.call(this,e,b)};k.prototype.wMa=function(e){return this.get("tags").indexOf(e)>=
0};k.Ku="preload";k.E_="mobile";k.Fua="ipadpro";k.F_="mobilevr";k.nca="mobilevr2gen";k.oca="ondemand";return k}(n);h.create("ImageResourceLevel",a);return a});
define("tdv/player/script/helper/LevelUtil",["require","tdv/player/script/ImageResourceLevel","tdv/player/view/util/Device","tdv/player/view/util/URL"],function(a){var m=a("tdv/player/script/ImageResourceLevel"),h=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/URL");return{Ft:function(g){return this.zk(g,"load")},xJ:function(g){return this.zk(g,"preload")},pP:function(g){return this.Ft(g)!=this.xJ(g)},zk:function(g,k){g=g.get("levels")||[];var e=this.n1a(g);e=this.v2a(k,e);g=this.O0a(g,
k);(k=this.Yya(g,e[0],e[1],this.u2a(k)))||(k=this.Yya(g,e[0],e[1],void 0));return k},O0a:function(g,k){k=="preload"?g=this.hS(g,m.Ku):k=="load"&&(g=this.N0a(g,m.Ku));h.EA()&&(g=this.hS(g,m.Fua));if(h.D8()||h.E8())g=this.hS(g,m.nca);h.kf()&&(g=this.hS(g,m.F_));h.ub()&&(g=this.hS(g,m.E_));return g},n1a:function(g){if(g.length==0)return 1;g.sort(function(k,e){return e.get("width")-k.get("width")});return g[0].get("width")/g[0].get("height")},v2a:function(g,k){if(g=="preload")return[0,0];g=1E4;this.Y0a()||
(h.kf()?g=2048:h.EA()?g=2048:h.ub()&&(g=2048));return k<1?[g*k,g]:[g,g/k]},u2a:function(g){if(g=="load")return!1},Y0a:function(){return h.EA()&&n.Tg("recent_ipad_use_max_res",!1)},hS:function(g,k){var e=g.filter(function(b){return b.wMa(k)});e.length==0&&(e=g);return e},N0a:function(g,k){var e=g.filter(function(b){return!b.wMa(k)});e.length==0&&(e=g);return e},Yya:function(g,k,e,b){function c(d){return Math.abs(d.get("width")*d.get("height")-k*e)}g=g.filter(function(d){return b!==void 0&&b!=d.get("grayscale",
!1)?!1:!0});if(g.length==0)return null;g.sort(function(d,f){return c(d)-c(f)});return g[0]}}});
define("tdv/player/script/HotspotMapOverlayImageBase",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/helper/LevelUtil"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/helper/LevelUtil");a=h.define("HotspotMapOverlayImageBase",m,function(){m.call(this)});a.prototype.Ft=function(){return this.get("image")?n.Ft(this.get("image")):null};a.prototype.xJ=function(){return this.get("image")?n.xJ(this.get("image")):
null};return a});define("tdv/view/events/ProgressEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event");return m.extend(h,function(n,g){h.call(this,n);this.percent=g})});
define("tdv/player/view/image/Item",["require","tdv/utils","tdv/binding/Bindable","tdv/constants/EventName","tdv/view/events/ProgressEvent"],function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable"),n=a("tdv/constants/EventName"),g=a("tdv/view/events/ProgressEvent");a=m.extend(h,function(){h.call(this);this.kW=[];this.Sg=void 0;this.I="initial"});a.prototype.eE=function(){return this.kW};a.prototype.jQ=function(k){this.kW!=k&&(this.kW=k,this.QC=this.Sg=void 0)};a.prototype.elb=function(k){this.Sg!==
k&&(this.I="loading",this.Sg=k,this.o(new g(n.xc,this.Sg)))};a.prototype.dZ=function(){this.I!=="loaded"&&(this.I="loaded",this.o(n.ia))};a.prototype.Dkb=function(){this.I!=="loaded"&&(this.I="error",this.o(n.$c))};return a});
define("tdv/player/view/map/renderer/item/Item",["require","tdv/utils","tdv/player/view/image/Item"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/image/Item");a=m.extend(h,function(n){h.call(this);this.Qf=n;this.C=void 0});a.prototype.getType=function(){return this.Qf};a.prototype.Mgb=function(n){return this.C!==void 0&&this.C===n.C};a.Oua="map";a.Pua="overlay";return a});
define("tdv/player/view/map/renderer/item/Overlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Item"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Item");a=m.extend(h,function(n,g,k){h.call(this,h.Pua);this.l6a=n;this.ec=g;this.fc=k});a.prototype.getX=function(){return this.ec};a.prototype.getY=function(){return this.fc};a.Nua="image";a.Mua="fov";return a});
define("tdv/player/view/map/renderer/item/ImageOverlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Overlay"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Overlay");a=m.extend(h,function(n,g,k,e,b,c,d,f,l,p,q,r){h.call(this,h.Nua,k,e);this.C=n;this.Se=g;this.tEa=b;this.bia=c;this.cia=d;this.Pa=f;this.Ha=l;this.ti=p;this.GC=q;this.JD=r;this.kW=[g]});a.prototype.rl=function(){return this.Se};a.prototype.DLa=function(){return this.bia};a.prototype.ELa=function(){return this.cia};
a.prototype.hg=function(){return this.Pa};a.prototype.xg=function(){return this.Ha};a.prototype.kP=function(){return this.GC};a.prototype.mP=function(){return this.JD};return a});
define("tdv/player/script/HotspotMapOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlayImageBase","tdv/player/script/helper/LevelUtil","tdv/player/view/map/renderer/item/ImageOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotMapOverlayImageBase"),n=a("tdv/player/script/helper/LevelUtil"),g=a("tdv/player/view/map/renderer/item/ImageOverlay");a=m.define("HotspotMapOverlayImage",h,function(){h.call(this);this.Xy=void 0});
a.prototype.getItem=function(){return this.cr()};a.prototype.cr=function(){this.Xy===void 0&&(this.Xy=this.c7());return this.Xy};a.prototype.c7=function(k){var e=this.get("image");return e?(e=n.Ft(e),new g(this,e.get("url"),this.get("x"),this.get("y"),k,this.get("offsetX"),this.get("offsetY"),this.get("width"),this.get("height"),this.get("scaleMode"),this.get("horizontalAlign"),this.get("verticalAlign"))):null};return a});
define("tdv/player/script/HotspotMapOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotMapOverlayImageBase");return m.define("HotspotMapOverlayMap",h,function(){h.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("HotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Gd=void 0});a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===
void 0&&(this.Gd=g.Ioa(this)),this.Gd}return m.prototype.get.call(this,k,e)};a.prototype.set=function(k,e){var b=!1;switch(k){case "distance":case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "yaw":case "opacity":case "playbackPositions":this.Gd=void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};return a});
define("tdv/player/script/HotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlayImageBase");return m.define("HotspotPanoramaOverlayImage",h,function(){h.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlayImageBase");return m.define("HotspotPanoramaOverlayMap",h,function(){h.call(this)})});
define("tdv/view/html/HTMLParser",["require"],function(){function a(f){var l={};f=f.split(",");for(var p=0;p<f.length;p++)l[f[p]]=!0;return l}var m=/^<([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,h=/^<\/([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)[^>]*>/,n=/([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,g=a("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),k=a("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),
e=a("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),b=a("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),c=a("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),d=a("script,style");return function(f,l){function p(w,x,y,z){x=x.toLowerCase();if(k[x])for(;r.kE()&&e[r.kE()];)q("",r.kE());b[x]&&r.kE()==
x&&q("",x);(z=g[x]||!!z)||r.push(x);if(l.start){var A=[];y.replace(n,function(D,F){var C=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:c[F]?F:"";A.push({name:F,value:C,boa:C.replace(/(^|[^\\])"/g,'$1\\"')})});l.start&&l.start(x,A,z)}}function q(w,x){if(x)for(x=x.toLowerCase(),w=r.length-1;w>=0&&r[w]!=x;w--);else w=0;if(w>=0){for(x=r.length-1;x>=w;x--)l.end&&l.end(r[x]);r.length=w}}var r=[],t=f;for(r.kE=function(){return this[this.length-1]};f;){var u=!0;if(r.kE()&&
d[r.kE()])f=f.replace(new RegExp("(.*?)</"+r.kE()+"[^>]*>"),function(w,x){x=x.replace(/\x3c!--(.*?)--\x3e/g,"$1").replace(/<!\[CDATA\[(.*?)]]\x3e/g,"$1");l.KW&&l.KW(x);return""}),q("",r.kE());else{if(f.indexOf("\x3c!--")==0){var v=f.indexOf("--\x3e");v>=0&&(l.ndb&&l.ndb(f.substring(4,v)),f=f.substring(v+3),u=!1)}else if(f.indexOf("</")==0){if(v=f.match(h))f=f.substring(v[0].length),v[0].replace(h,q),u=!1}else f.indexOf("<")==0&&(v=f.match(m))&&(f=f.substring(v[0].length),v[0].replace(m,p),u=!1);u&&
(v=f.indexOf("<"),u=v<0?f:f.substring(0,v),f=v<0?"":f.substring(v),l.KW&&l.KW(u))}if(f==t)throw"Parse Error: "+f;t=f}q()}});
define("tdv/view/html/HTMLFragment","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/view/html/HTMLParser".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/util/Device"),e=a("tdv/view/html/HTMLParser"),b=m.extend(g,function(c){g.call(this);this.Nc=c;this.bV=[];this.tC=null});b.prototype.mhb=function(c){c&&c.toLowerCase().indexOf("<script")>=
0?k.DO()==k.IQ?this.u3a(c):this.t3a(c):this.s3a(c)};b.prototype.s3a=function(c){this.Nc.innerHTML=c;this.oGa()};b.prototype.u3a=function(c){this.Nc.textContent="";var d=this.Nc,f=null,l=[],p=null;new e(c,{start:function(q,r,t){if(q=="script"){t=void 0;for(var u=0;u<r.length&&t===void 0;u++){var v=r[u];v.name=="src"&&(t=v.value)}p={parent:d,previousSibling:f,src:t,content:""}}else{var w={};for(u=0;u<r.length;u++)v=r[u],w[v.name]=v.value;r=document.createElement(q);for(var x in w)r.setAttribute(x,w[x]);
d.appendChild(r);t?f=r:(d=r,f=null)}},KW:function(q){p?p.content+=q:d.append(q)},end:function(q){q=="script"?(l.push(p),p=null):(f=d,d=d.parentElement)}});this.bV=l;this.u2()};b.prototype.t3a=function(c){function d(){l++;return f+l}this.Nc.textContent="";var f="fragment_"+m.wjb(6)+"_",l=0,p=d(),q=[p],r=void 0,t=[],u=null,v="";new e(c,{start:function(y,z,A){if(y=="script"){A=void 0;for(y=0;y<z.length&&A===void 0;y++){var D=z[y];D.name=="src"&&(A=D.value)}u={parentClsName:q[q.length-1],previousSiblingClsName:r,
src:A,content:""}}else{v+="<"+y;var F=d(),C=!1;for(y=0;y<z.length;y++)D=z[y],D.name=="class"&&(D.boa+=" "+F,C=!0),v+=" "+D.name+'="'+D.boa+'"';C||(v+=' class="'+F+'"');A?(v+="/>",r=F):(v+=">",q.push(F),r=void 0)}},KW:function(y){u?u.content+=y:v+=y},end:function(y){y=="script"?(t.push(u),u=null):(r=q[q.length-1],q.pop())}});this.Nc.innerHTML=v;this.Nc.classList.add(p);for(c=0;c<t.length;c++){var w=t[c],x=w.parentClsName;delete w.parentClsName;r=w.previousSiblingClsName;delete w.previousSiblingClsName;
w.parent=this.Nc.querySelector("."+x);w.previousSibling=r?this.Nc.querySelector("."+r):null}this.Nc.classList.remove(p);this.bV=t;this.u2()};b.prototype.u2=function(){if(!this.tC)if(this.bV.length>0){this.tC=this.bV[0];this.bV.splice(0,1);var c=this.tC.src;if(c){var d=this;b.l4a(c,function(){d.oAa()},function(){d.s4a()})}else{var f=this.tC.parent;c=this.tC.previousSibling;var l=c?c.nextSibling:f.firstChild;c=document.write;document.write=l?function(p){f.insertBefore(document.createTextNode(p),l)}:
function(p){f.append(document.createTextNode(p))};m.pgb(this.tC.content);document.write=c;this.oAa()}}else this.oGa()};b.prototype.s4a=function(){this.tC=null;this.u2()};b.prototype.oAa=function(){this.tC=null;this.u2()};b.prototype.oGa=function(){this.o(new n(h.Ub))};b.mAa={};b.l4a=function(c,d,f){b.mAa[c]?d.call(window):m.Deb(c,()=>{b.mAa[c]=!0;d.call(window)},f)};return b});
define("tdv/view/timer/Timer",["require","exports","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a,m,h,n,g){return function(k){function e(b,c){var d=k.call(this)||this;d.D3a=b;d.ha=c;d.tk=null;return d}P(e,k);e.prototype.bind=function(b,c,d,f){b=k.prototype.bind.call(this,b,c,d,f);this.gW();return b};e.prototype.h=function(b,c,d){b=k.prototype.h.call(this,b,c,d);this.gW();return b};e.prototype.start=function(){this.ha=!0;this.gW()};e.prototype.stop=function(){this.ha=
!1;this.gW()};e.prototype.oU=function(){this.o(new n(h.Ee))};e.prototype.gW=function(){if(this.ha&&this.f8(h.Ee)){if(this.tk==null){var b=this;this.tk=window.setTimeout(function(){b.tk=null;b.oU();b.gW()},this.D3a)}}else this.tk!=null&&(clearTimeout(this.tk),this.tk=null)};return e}(g)});
define("tdv/view/core/visualprops/HTMLVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,h){return function(n){function g(){var k=n!==null&&n.apply(this,arguments)||this;k.td=null;return k}P(g,n);return g}(h)});
define("tdv/view/html/HTML","require exports tdv/utils tdv/constants/EventName tdv/player/parser/helper/AppResizeUpdater tdv/player/view/util/Color tdv/view/constants/Alignment tdv/view/core/UIComponent tdv/view/html/HTMLFragment tdv/view/util/Font tdv/view/timer/Timer tdv/view/core/visualprops/HTMLVisualProperties".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){var p=/[^\d]((\d*\.)?\d+)\s*(vmin|vmax|vw|vh)/i;return function(q){function r(){var t=q.call(this)||this;t.gf("HTML");t.FG=r.L_;t.O2=0;t.N2=
0;t.uFa=(new Date).getTime();t.u.td=null;t.yL=t.yL.bind(t);t.$ca=[];return t}P(r,q);r.prototype.wa=function(){return q.prototype.wa.call(this)};r.prototype.Pb=function(){q.prototype.Pb.call(this);this.m("content");this.m("horizontalAlign",e.fb);this.m("verticalAlign",e.$d);this.m("fontFamily");this.m("fontSize");this.m("fontColor");this.m("fontWeight");this.m("fontStyle");this.m("textAlign");this.m("textDecoration");this.m("textShadowBlurRadius",3);this.m("textShadowColor","#000000");this.m("textShadowHorizontalLength",
0);this.m("textShadowOpacity",0);this.m("textShadowVerticalLength",0)};r.prototype.VL=function(){return new l};r.prototype.co=function(t,u,v,w){this.Gb&&g.get(this.Gb).Cjb(this.yL);q.prototype.co.call(this,t,u,v,w);this.Gb&&(g.get(this.Gb).Obb(this.yL),g.get(this.Gb).GO(this.yL))};r.prototype.Kb=function(){q.prototype.Kb.call(this);this.u.td||(this.u.td=document.createElement("div"),this.u.td.style.display="inline",this.u.td.style.boxSizing="border-box",this.JN(!1),this.Aza=new c(this.u.td),this.pu(),
this.Aza.bind(n.Ub,this.g3a,this,!0),this.bind(n.Rb,this.Bza,this,!0))};r.prototype.jb=function(){var t=this,u=!1;this.S("visible")&&(u=!0);this.S("content")&&(u=this.G("content"),this.Aza.mhb(u),this.$("content"),u=!0);if(this.S("width")||this.S("height"))u=!0;this.S("fontFamily")&&(u=this.G("fontFamily"),h.FA(u)||(u=""),this.u.td.style.fontFamily=d.rA(u),this.$("fontFamily"),u=!0);this.S("fontSize")&&(u=this.G("fontSize"),h.$Ma(u)?u+="px":h.FA(u)||(u=""),this.u.td.style.fontSize=u,this.$("fontSize"),
u=!0);this.S("fontColor")&&(u=this.G("fontColor"),h.FA(u)||(u=""),this.u.td.style.color=u,this.$("fontColor"),u=!0);if(this.S("fontWeight")){u=this.G("fontWeight");switch(u){case "bold":case "bolder":case "lighter":case "100":case "200":case "300":case "400":case "500":case "600":case "700":case "800":case "900":case "normal":break;default:u="normal"}this.u.td.style.fontWeight=u;this.$("fontWeight");u=!0}if(this.S("fontStyle")){u=this.G("fontStyle");switch(u){case "italic":case "normal":break;default:u=
"normal"}this.u.td.style.fontStyle=u;this.$("fontStyle");u=!0}if(this.S("textDecoration")){u=this.G("textDecoration");switch(u){case "underline":case "overline":case "line-through":case "none":break;default:u="none"}this.u.td.style.textDecoration=u;this.$("textDecoration");u=!0}if(this.S("textAlign")){u=this.G("textAlign");switch(u){case "left":case "right":case "center":case "justify":break;default:u=""}this.u.td.style.textAlign=u;this.$("textAlign");u=!0}var v=["textShadowColor","textShadowHorizontalLength",
"textShadowVerticalLength","textShadowBlurRadius","textShadowOpacity"];if(v.some(function(x){return t.S(x)})){var w={};v.forEach(function(x){w[x]=t.G(x);t.$(x)});this.u.td.style.textShadow=[w.textShadowHorizontalLength+"px",w.textShadowVerticalLength+"px",w.textShadowBlurRadius+"px",k.gF(w.textShadowColor,w.textShadowOpacity)].join(" ")}["paddingTop","paddingRight","paddingBottom","paddingLeft"].some(function(x){return t.S(x)})&&(u=!0);q.prototype.jb.call(this);u&&this.PAa()};r.prototype.PAa=function(){this.Bza();
this.lc();this.G("visible")&&this.G("content")?this.eV(r.vca):this.eV(r.L_)};r.prototype.$y=function(){q.prototype.$y.call(this);this.O2=this.wa().uoa();this.N2=this.wa().toa();this.fn=this.O2+this.u.Dd+this.u.De;this.dn=this.N2+this.u.ie+this.u.Ef};r.prototype.bFa=function(t){this.$ya()!=t&&(this.u.td.style.paddingLeft=t+"px",this.lc())};r.prototype.$ya=function(){return parseInt(this.u.td.style.paddingLeft)||0};r.prototype.dFa=function(t){this.bza()!=t&&(this.u.td.style.paddingTop=t+"px",this.lc())};
r.prototype.bza=function(){return parseInt(this.u.td.style.paddingTop)||0};r.prototype.cFa=function(t){this.aza()!=t&&(this.u.td.style.paddingRight=t+"px",this.lc())};r.prototype.aza=function(){return parseInt(this.u.td.style.paddingRight)||0};r.prototype.aFa=function(t){this.Zya()!=t&&(this.u.td.style.paddingBottom=t+"px",this.lc())};r.prototype.Zya=function(){return parseInt(this.u.td.style.paddingBottom)||0};r.prototype.g3a=function(){this.$ca=Array.prototype.slice.call(this.u.td.querySelectorAll("*[style]")).map(function(t){var u=
{};u.wt=t;u.style=t.getAttribute("style");return u}).filter(function(t){return p.test(t.style)}).map(function(t){for(var u=t.style,v=[];;){var w=p.exec(u);if(w)v.push(function(x){return function(){return x}}(u.substr(0,w.index+1))),v.push(function(x,y){switch(y){case "vw":return function(z){return Math.round(z*x)+"px"};case "vh":return function(z,A){return Math.round(A*x)+"px"};case "vmin":return function(z,A,D){return Math.round(D*x)+"px"};case "vmax":return function(z,A,D){return Math.round(D*x)+
"px"}}}(parseFloat(w[1]),w[3].toLowerCase())),u=u.substr(w.index+w[0].length);else return v.push(function(x){return function(){return x}}(u)),t.Ueb=v,t}});this.Gb&&g.get(this.Gb).GO(this.yL)};r.prototype.yL=function(t,u,v,w){this.$ca.length!=0&&(this.$ca.forEach(function(x){var y=x.Ueb.map(function(z){return z(t,u,v,w)}).join("");x.wt.setAttribute("style",y)}),this.PAa())};r.prototype.Bza=function(){var t="auto",u="auto";if(!this.iga()){this.fn!=this.nb()&&this.lc();var v=this.nb()-(this.u.Dd+this.u.De);
v>0&&(t=v+"px")}this.uza()||(this.dn!=this.Mb()&&this.lc(),v=this.Mb()-(this.u.ie+this.u.Ef),v>0&&(u=v+"px"));this.u.td.style.width=t;this.u.td.style.height=u};r.prototype.sBa=function(){var t=this.wa().uoa(),u=this.wa().toa();this.O2!=t||this.N2!=u?(this.O2=t,this.N2=u,this.lc(),this.eV(r.vca)):(t=(new Date).getTime()-this.uFa,t>r.aXa?this.eV(r.KWa):t>r.$Wa&&this.eV(r.JWa))};r.prototype.v7a=function(){this.uFa=(new Date).getTime()};r.prototype.eV=function(t){this.FG==r.vca&&this.v7a();this.FG!=t&&
(this.FG!=r.L_&&r.Hwa[this.FG].h(n.Ee,this.sBa,this),this.FG=t,this.FG!=r.L_&&r.Hwa[this.FG].bind(n.Ee,this.sBa,this,!0))};r.L_="stopped";r.KWa="slow";r.JWa="normal";r.vca="fast";r.aXa=3E4;r.$Wa=5E3;r.Hwa={slow:new f(2E3,!0),normal:new f(500,!0),fast:new f(100,!0)};return r}(b)});define("tdv/player/script/HTML",["require","tdv/view/html/HTML","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/html/HTML");return a("tdv/player/parser/ClassInfo").define("HTML",m,function(){m.call(this)})});
define("tdv/view/containers/AbsoluteContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.Pb=function(){this.Jl(k.ad)};k.ad=Object.assign({},h.ad,{layout:n.TZ});return k}(h)});
define("tdv/view/text/HTMLText",["require","exports","tdv/view/constants/OverflowPolicy","tdv/view/containers/AbsoluteContainer","tdv/view/html/HTML"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.HC=null;b.wpb=!0;return b}P(e,k);e.prototype.Pb=function(){k.prototype.Pb.call(this);this.m("overflow",h.Wr);this.m("html")};e.prototype.Kb=function(){k.prototype.Kb.call(this);this.HC==null&&(this.HC=new g,this.HC.xa({left:0,toolTipDisabled:!0}),this.mb(this.HC))};e.prototype.jb=
function(){this.S("html")&&(this.HC.set("content",this.G("html")),this.$("html"));this.Pc(["paddingLeft","paddingTop","paddingRight","paddingBottom"],{},[this.HC],!0,!0);this.Pc(["cursor"],{},[this.HC],!0,!1);k.prototype.jb.call(this);this.HC.set("width",this.iga()?void 0:"100%")};return e}(n)});
define("tdv/player/script/HTMLText",["require","tdv/view/text/HTMLText","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/text/HTMLText");return a("tdv/player/parser/ClassInfo").define("HTMLText",m,function(){m.call(this)})});
define("tdv/view/buttons/IconButton","require exports tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/view/util/URL tdv/view/buttons/ButtonGroup tdv/view/constants/Cursor tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/constants/ButtonMode tdv/view/images/Image".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){var p=k.Bk("debug");return function(q){function r(){var t=q.call(this,3)||this;t.k3a=function(){t.K9()};t.uR=function(){t.get("pressed")?(t.set("pressed",!1),t.o(new g(n.Nm))):
(t.set("pressed",!0),t.o(new g(n.Rk)))};t.gf("Button");t.set("ariaRole","button");t.set("autoRolledOver",!0);t.set("autoPressed",!0);t.set("cursor",b.qf);t.set("scaleMode",c.uj);t.Sda=document.createElement("canvas");t.Sda.width=1;t.Sda.height=1;t.Tda=t.Sda.getContext("2d");t.Tda.globalCompositeOperation="copy";t.bind(n.Eb,t.k3a,t,!1);return t}P(r,q);r.prototype.Pb=function(){q.prototype.Pb.call(this);this.m("buttonGroup");this.m("mode",f.af);this.m("pressed");this.m("iconURL");this.m("transparencyActive");
this.D("rollOverOpacity",d.ea,"opacity");this.D("rollOverIconURL",d.ea,"iconURL");this.D("pressedOpacity",d.Fb,"opacity");this.D("pressedIconURL",d.Fb,"iconURL");this.D("pressedRollOverOpacity",d.qc,"opacity");this.D("pressedRollOverIconURL",d.qc,"iconURL")};r.prototype.K9=function(t){t?q.prototype.set.call(this,"cursor",t):q.prototype.set.call(this,"cursor",this.Q_a)};r.prototype.Chb=function(t){if(!this.u.image)return!1;var u=this.Gb?this.Gb.fD:1,v=h.offset(this.u.image),w=(t.AE-v.left)/u,x=this.u.image.clientWidth;
t=(t.BE-v.top)/u;u=this.u.image.clientHeight;if(w>=0&&t>=0&&w<x&&t<u){if(p)return!0;this.Tda.drawImage(this.u.image,w*this.eN/x,t*this.dN/u,1,1,0,0,1,1);if(this.Tda.getImageData(0,0,1,1).data[3]>0)return!0}return!1};r.prototype.set=function(t,u){t==="cursor"&&(this.Q_a=u);return q.prototype.set.call(this,t,u)};r.prototype.jb=function(){this.S("transparencyActive")&&(this.M8a(this.G("transparencyActive")),this.$("transparencyActive"));var t=!1;if(this.S("backgroundOpacity")||this.S("backgroundColor")||
this.S("backgroundBlur"))t=!0;if(this.S("iconURL")){var u=this.G("iconURL");this.set("url",u);this.$("iconURL")}u=!1;this.S("mode")&&(this.G("mode")==f.af?(this.h(n.ma,this.uR,this),this.set("autoPressed",!0)):(this.bind(n.ma,this.uR,this,!0),this.set("autoPressed",!1)),this.$("mode"),u=!0);if(u||this.S("pressed"))this.G("mode")==f.bk?this.KN(this.G("pressed")==1):u&&this.KN(!1);this.S("buttonGroup")&&((u=this.G("buttonGroup"))?e.register(this,u):e.unregister(this),this.$("buttonGroup"));q.prototype.jb.call(this);
!t||this.u.pm!=0&&this.u.vk.length!=0&&this.u.dJ!=0||(this.IEa(.001),this.HEa(["#000000"]))};r.prototype.M8a=function(t){this.zM.rRa(t)};return r}(l)});define("tdv/player/script/IconButton",["require","tdv/view/buttons/IconButton","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/buttons/IconButton");return a("tdv/player/parser/ClassInfo").define("IconButton",m,function(){m.call(this)})});
define("tdv/player/script/IconHotspotMapOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotMapOverlay");return m.define("IconHotspotMapOverlay",h,function(){h.call(this,!1)})});
define("tdv/player/script/Image",["require","tdv/view/images/Image","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/images/Image");a=a("tdv/player/parser/ClassInfo").define("Image",m,function(){m.call(this)});a.prototype.set=function(h,n){m.prototype.set.call(this,h,n)};return a});
define("tdv/player/script/ImagePlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlaneModel3DObject");return m.define("ImagePlaneModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/InnerModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("InnerModel3DObject",h,function(){h.call(this)})});define("tdv/player/script/Label",["require","tdv/view/text/Label","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/text/Label");return a("tdv/player/parser/ClassInfo").define("Label",m,function(){m.call(this)})});
define("tdv/player/script/LensFlarePanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("LensFlarePanoramaOverlay",m,function(){m.call(this)})});
define("tdv/player/script/LineModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("LineModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/LivePanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Panorama");a=m.define("LivePanorama",h,function(){h.call(this)});a.prototype.qX=function(){return this.get("initialFrameIndex",0)};return a});
define("tdv/player/script/Light",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Light",m,function(){m.call(this)})});
define("tdv/player/view/map/renderer/item/Map",["require","tdv/utils","tdv/player/view/map/renderer/item/Item"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Item");a=m.extend(h,function(n,g,k,e,b,c,d){h.call(this,h.Oua);this.C=n;this.Se=g;this.Pa=k;this.Ha=e;this.ti=b;this.V0a=c;this.xq=d.slice()});a.prototype.eE=function(){for(var n=[this.Se],g=0;g<this.xq.length;g++)n=n.concat(this.xq[g].eE());return n};a.prototype.rl=function(){return this.Se};a.prototype.hg=function(){return this.Pa};
a.prototype.xg=function(){return this.Ha};return a});
define("tdv/player/script/Map","require tdv/player/parser/ClassInfo tdv/view/constants/ScaleMode tdv/player/script/Media tdv/player/script/helper/LevelUtil tdv/player/view/map/renderer/item/Map".split(" "),function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/constants/ScaleMode"),n=a("tdv/player/script/Media"),g=a("tdv/player/script/helper/LevelUtil"),k=a("tdv/player/view/map/renderer/item/Map");a=m.define("Map",n,function(){n.call(this);this.Xy=this.KU=void 0});a.prototype.Yjb=function(){this.Xy=
this.KU=void 0};a.prototype.pP=function(){return!(!this.get("image")||!g.pP(this.get("image")))};a.prototype.xJ=function(){return this.get("image")&&g.xJ(this.get("image"))};a.prototype.Ft=function(){return this.get("image")&&g.Ft(this.get("image"))};a.prototype.ILa=function(){this.KU==void 0&&(this.pP()?this.KU=new k(this,this.xJ().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",h.uF),this.get("flipImageHorizontally",!1),[]):this.KU=null);return this.KU};a.prototype.cr=function(){if(this.Xy==
void 0)if(this.get("image")){var e=Array.prototype.concat.apply([],this.get("overlays",[]).map(function(b){return b.Ffb()}));this.Xy=new k(this,this.Ft().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",h.uF),this.get("flipImageHorizontally",!1),e)}else this.Xy=null;return this.Xy};a.prototype.tw=function(){return[].concat(this.Sya(this.ILa()),this.Sya(this.cr()))};a.prototype.Sya=function(e){return e?e.eE():[]};return a});
define("tdv/player/script/MapOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MapOverlay",m,function(){m.call(this)})});
define("tdv/player/script/helper/ButtonProperty","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/constants/State");a=m.extend(g,function(b,c,d){g.call(this);this.Vwa=b;this.M6a=c;this.nwa=d||k.af;this.fk=[];this.BG=[];this.hC=
{};this.hC.mode=this.nwa;this.nwa==k.bk&&(this.hC.pressed=!1);this.Vwa.bind(h.L(c),this.TDa,this);this.TDa()});a.prototype.TDa=function(){var b=this.Vwa.get(this.M6a);b||(b=[]);Array.isArray(b)||(b=[b]);this.h8a(b)};a.prototype.h8a=function(b){m.difference(this.fk,b).forEach(c=>{c.h(h.Rk,this.qwa,this,!0);c.h(h.Nm,this.rwa,this,!0);c.h(h.ma,this.mwa,this,!0);c.h(h.Sa,this.owa,this,!0);c.h(h.$a,this.pwa,this,!0);c.h(h.uc,this.twa,this,!0);c.h(h.Eb,this.swa,this,!0)});m.difference(b,this.fk).forEach(c=>
{c.xa(this.hC);c.bind(h.Rk,this.qwa,this,!0);c.bind(h.Nm,this.rwa,this,!0);c.bind(h.ma,this.mwa,this,!0);c.bind(h.Sa,this.owa,this,!0);c.bind(h.$a,this.pwa,this,!0);c.bind(h.uc,this.twa,this,!0);c.bind(h.Eb,this.swa,this,!0)},this);this.fk=b;this.BG=this.BG.filter(function(c){return this.fk.indexOf(c)>=0}.bind(this))};a.prototype.qwa=function(){this.o(new n(h.Rk))};a.prototype.rwa=function(){this.o(new n(h.Nm))};a.prototype.mwa=function(){this.o(new n(h.ma))};a.prototype.owa=function(){this.o(new n(h.Sa))};
a.prototype.pwa=function(){this.o(new n(h.$a))};a.prototype.twa=function(b){this.BG.push(b.source);this.lm()};a.prototype.swa=function(b){this.BG=this.BG.filter(function(c){return c!=b.source});this.lm()};a.prototype.set=function(b,c){this.hC[b]=c;this.fk.forEach(function(d){d.xa(this.hC)}.bind(this));this.lm()};a.prototype.lm=function(){this.fk.forEach(function(b){b.get("state")==e.Fb&&this.BG.indexOf(b)>=0?b.set("state",e.qc):b.get("state")==e.qc&&this.BG.indexOf(b)<0&&b.set("state",e.Fb)}.bind(this))};
return a});
define("tdv/binding/BindingsHandler",["require","exports","tdv/utils","tdv/binding/ChangeWatcher"],function(a,m,h,n){var g=function(){return function(){}}();return function(){function k(){}k.ba=function(e,b,c,d){this.Eva(e,b,c,d,!1)};k.KD=function(e,b,c,d){this.Eva(e,b,c,d,!0)};k.Eva=function(e,b,c,d,f){function l(){for(var r=[],t=0;t<b.length;t++)try{r.push(e.get(b[t]))}catch(u){r.push(void 0),h.VX("BindingsHandler._addBinding",u)}c.apply(this,r)}b=h.toArray(b);f&&(l=h.nr(l));var p=[];b.forEach(function(r){(r=
n.jx(e,r,l,this,!f))&&p.push(r)},this);var q=new g;q.zob=p;q.host=e;q.properties=b;q.EX=c;this.dna.push(q);d&&l()};k.da=function(e,b,c){var d=[];this.dna.forEach(function(f){f.EX==c&&f.host==e&&h.Tgb(f.properties,h.toArray(b))?f.zob.forEach(function(l){l.jF()}):d.push(f)});this.dna=d};k.dna=[];return k}()});
define("tdv/player/view/PlaybackBar","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/view/constants/State tdv/view/constants/Cursor tdv/view/containers/AbsoluteContainer tdv/view/core/UIComponent tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/view/constants/State"),k=a("tdv/view/constants/Cursor"),e=a("tdv/view/containers/AbsoluteContainer"),b=a("tdv/view/core/UIComponent");
a("tdv/view/effects/FadeInEffect");a("tdv/view/effects/FadeOutEffect");var c=m.extend(e,function(){e.call(this);this.gf("PlaybackBar");this.un=this.Sg=null;this.Qh=[];this.m4=!1;this.lja=this.dI=void 0;this.Wka=!1});c.ad=Object.assign({},e.ad,{cursor:k.qf,overflow:"visible",height:20,position:0,duration:100,steps:void 0,selectedStep:void 0,backgroundColor:"#000000",barBackgroundColor:"#FFFFFF",barBackgroundColorDirection:void 0,barBackgroundColorRatios:void 0,barBorderColor:void 0,barBorderRadius:void 0,
barBorderSize:void 0,barOpacity:void 0,liveDragging:void 0,playheadBackgroundColor:"#FFFFFF",playheadBackgroundColorDirection:void 0,playheadBackgroundColorRatios:void 0,playheadBorderColor:void 0,playheadBorderRadius:void 0,playheadBorderSize:void 0,playheadOpacity:void 0,playheadWidth:5,playheadHeight:30,playheadShadow:!0,playheadShadowBlurRadius:3,playheadShadowColor:"#000000",playheadShadowHorizontalLength:0,playheadShadowOpacity:void 0,playheadShadowSpread:0,playheadShadowVerticalLength:3,stepBackgroundColor:"#FFFFFF",
stepBackgroundColorDirection:void 0,stepBackgroundColorRatios:void 0,stepBorderColor:void 0,stepBorderRadius:6,stepBorderSize:0,stepOpacity:1,stepWidth:12,stepHeight:12,stepShadow:!0,stepShadowBlurRadius:6,stepShadowColor:"#000000",stepShadowHorizontalLength:0,stepShadowOpacity:void 0,stepShadowSpread:0,stepShadowVerticalLength:0,selectedStepBackgroundColor:"#3399FF",selectedStepBackgroundColorDirection:void 0,selectedStepBackgroundColorRatios:void 0,selectedStepBorderColor:"#ffffff",selectedStepBorderRadius:10,
selectedStepBorderSize:2,selectedStepOpacity:1,selectedStepWidth:20,selectedStepHeight:20,selectedStepShadow:!0,selectedStepShadowBlurRadius:3,selectedStepShadowColor:"#000000",selectedStepShadowHorizontalLength:0,selectedStepShadowOpacity:void 0,selectedStepShadowSpread:0,selectedStepShadowVerticalLength:0});c.prototype.Pb=function(){this.Jl(c.ad)};c.prototype.Kb=function(){e.prototype.Kb.call(this);this.Sg&&this.un||this.bind(h.Rb,this.y6a,this,!0);this.Sg==null&&(this.Sg=new b,this.Sg.xa({left:"0",
height:"100%",cursor:k.qf}),this.mb(this.Sg));this.un==null&&(this.un=new b,this.un.xa({left:"0",cursor:k.qf}),this.un.bind(h.Rb,this.B6a,this,!0),this.un.bind(h.Sa,this.z6a,this,!0),this.bind(h.ma,this.w6a,this,!0),this.un.bind(h.$a,this.A6a,this,!0),this.mb(this.un));var f=this.get("steps")||0;if(this.Qh.length!=f){for(;this.Qh.length>f;)this.U_a(this.Qh.pop());for(;this.Qh.length<f;)this.Qh.push(this.K_a());this.Pc(c.wva,c.Hca,this.Qh,!1,!0);this.mHa();this.ima();this.rr(this.un,this.Cb().length-
1)}};c.prototype.K_a=function(){var f=new d;f.xa({cursor:k.qf});f.bind(h.ma,this.EFa,this,!0);f.bind(h.Rb,this.FFa,this,!0);this.mb(f);return f};c.prototype.U_a=function(f){f.h(h.ma,this.EFa,this,!0);f.h(h.Rb,this.FFa,this,!0);this.removeChild(f)};c.prototype.jb=function(){var f=!1;if(this.S("position")||this.S("duration"))this.$("position"),this.$("duration"),f=!0;this.S("selectedStep")&&(this.$("selectedStep"),this.mHa());this.S("steps")&&(this.$("steps"),this.MX());this.Pc(c.uca,c.eR,[this.Sg],
!0,!0);this.Pc(c.VWa,c.tva,[this.un],!0,!0);this.Pc(c.wva,c.Hca,this.Qh,!0,!0);e.prototype.jb.call(this);f&&this.f6()};c.prototype.mHa=function(){var f=this.get("selectedStep");this.Qh.forEach(function(l,p){l.qZ(p===f)});this.un.set("visible",f===void 0)};c.prototype.f6=function(){var f=this.Xh(),l=this.Wh(),p=this.un.nb(),q=this.un.Mb(),r=this.lS(),t=this.ns(),u=t*f/r;r=Math.round((this.m4?this.dI:t)*f/r-p*.5);r=Math.max(0,Math.min(r,f-p));this.un.xa({left:r,top:Math.round(l*.5-q*.5)});this.Sg.set("width",
Math.round(u))};c.prototype.B6a=function(){this.f6()};c.prototype.z6a=function(f){this.m4=!0;this.lja=f.pageX;this.dI=this.G("position");this.eka=this.E2a();this.eka.bind(h.gb,this.kja,this,!0)};c.prototype.E2a=function(){for(var f=this.getParent();f.getParent();)f=f.getParent();return f};c.prototype.kja=function(f){if(this.m4){var l=f.pageX-this.lja;this.lja=f.pageX;f=this.nb();var p=this.lS();this.dI=Math.max(0,Math.min(p,this.dI+p*l/f));this.get("liveDragging")&&(this.set("position",this.dI),this.o(new n(h.V)));
this.f6()}};c.prototype.A6a=function(f){this.eka.h(h.gb,this.kja,this);this.eka=null;this.kja(f);this.m4=!1;this.get("liveDragging")||(this.set("position",this.dI),this.o(new n(h.V)));this.dI=void 0};c.prototype.w6a=function(f){if(!this.Wka){var l=this.nb(),p=this.lS();this.set("position",p*f.x/l);this.o(new n(h.V))}};c.prototype.FFa=function(){this.ima()};c.prototype.y6a=function(){this.ima();this.f6()};c.prototype.ima=function(){for(var f=this.nb(),l=this.Mb(),p=this.nw(),q=this.getParent().nb()-
(p+f),r=0,t=this.Qh.length;r<t;r++){var u=this.Qh[r],v=u.nb();u.xa({left:r==0&&p==0?0:r==t-1&&q==0?f-v:Math.round(f*r/(t-1)-v*.5),top:Math.round(l*.5-u.Mb()*.5)})}};c.prototype.EFa=function(f){f=this.Qh.indexOf(f.source);var l=this.lS();this.set("position",l*f/(this.Qh.length-1));this.Wka=!0;this.o(new n(h.V));setTimeout(function(){this.Wka=!1}.bind(this),0)};c.prototype.lS=function(){var f=this.G("duration");return f?f:1};c.prototype.ns=function(){return Math.max(0,Math.min(this.lS(),this.G("position")))};
c.eR={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};c.uca=Object.keys(c.eR);c.tva={playheadBackgroundColor:"backgroundColor",playheadBackgroundColorDirection:"backgroundColorDirection",playheadBackgroundColorRatios:"backgroundColorRatios",playheadBorderColor:"borderColor",playheadBorderRadius:"borderRadius",
playheadBorderSize:"borderSize",playheadOpacity:"opacity",playheadWidth:"width",playheadHeight:"height",playheadShadow:"shadow",playheadShadowBlurRadius:"shadowBlurRadius",playheadShadowColor:"shadowColor",playheadShadowHorizontalLength:"shadowHorizontalLength",playheadShadowOpacity:"shadowOpacity",playheadShadowSpread:"shadowSpread",playheadShadowVerticalLength:"shadowVerticalLength"};c.VWa=Object.keys(c.tva);c.Hca={stepBackgroundColor:"backgroundColor",stepBackgroundColorDirection:"backgroundColorDirection",
stepBackgroundColorRatios:"backgroundColorRatios",stepBorderColor:"borderColor",stepBorderRadius:"borderRadius",stepBorderSize:"borderSize",stepOpacity:"opacity",stepWidth:"width",stepHeight:"height",stepShadow:"shadow",stepShadowBlurRadius:"shadowBlurRadius",stepShadowColor:"shadowColor",stepShadowHorizontalLength:"shadowHorizontalLength",stepShadowOpacity:"shadowOpacity",stepShadowSpread:"shadowSpread",stepShadowVerticalLength:"shadowVerticalLength",selectedStepBackgroundColor:"selectedBackgroundColor",
selectedStepBackgroundColorDirection:"selectedBackgroundColorDirection",selectedStepBackgroundColorRatios:"selectedBackgroundColorRatios",selectedStepBorderColor:"selectedBorderColor",selectedStepBorderRadius:"selectedBorderRadius",selectedStepBorderSize:"selectedBorderSize",selectedStepOpacity:"selectedOpacity",selectedStepWidth:"selectedWidth",selectedStepHeight:"selectedHeight",selectedStepShadow:"selectedShadow",selectedStepShadowBlurRadius:"selectedShadowBlurRadius",selectedStepShadowColor:"selectedShadowColor",
selectedStepShadowHorizontalLength:"selectedShadowHorizontalLength",selectedStepShadowOpacity:"selectedShadowOpacity",selectedStepShadowSpread:"selectedShadowSpread",selectedStepShadowVerticalLength:"selectedShadowVerticalLength"};c.wva=Object.keys(c.Hca);var d=m.extend(b,function(){b.call(this)});d.prototype.qZ=function(f){this.lV(f)};d.prototype.Pb=function(){b.prototype.Pb.call(this);this.m("backgroundColor");this.m("backgroundColorDirection");this.m("backgroundColorRatios");this.m("borderColor");
this.m("borderRadius");this.m("borderSize");this.m("opacity");this.m("width");this.m("height");this.m("shadow");this.m("shadowBlurRadius");this.m("shadowColor");this.m("shadowHorizontalLength");this.m("shadowOpacity");this.m("shadowSpread");this.m("shadowVerticalLength");this.D("selectedBackgroundColor",g.oa,"backgroundColor");this.D("selectedBackgroundColorDirection",g.oa,"backgroundColorDirection");this.D("selectedBackgroundColorRatios",g.oa,"backgroundColorRatios");this.D("selectedBorderColor",
g.oa,"borderColor");this.D("selectedBorderRadius",g.oa,"borderRadius");this.D("selectedBorderSize",g.oa,"borderSize");this.D("selectedOpacity",g.oa,"opacity");this.D("selectedWidth",g.oa,"width");this.D("selectedHeight",g.oa,"height");this.D("selectedShadow",g.oa,"shadow");this.D("selectedShadowBlurRadius",g.oa,"shadowBlurRadius");this.D("selectedShadowColor",g.oa,"shadowColor");this.D("selectedShadowHorizontalLength",g.oa,"shadowHorizontalLength");this.D("selectedShadowOpacity",g.oa,"shadowOpacity");
this.D("selectedShadowSpread",g.oa,"shadowSpread");this.D("selectedShadowVerticalLength",g.oa,"shadowVerticalLength")};d.prototype.jb=function(){b.prototype.jb.call(this)};return c});
define("tdv/player/view/ProgressBar",["require","tdv/utils","tdv/view/containers/AbsoluteContainer","tdv/view/core/UIComponent"],function(a){var m=a("tdv/utils"),h=a("tdv/view/containers/AbsoluteContainer"),n=a("tdv/view/core/UIComponent"),g=m.extend(h,function(){h.call(this);this.gf("ProgressBar")});g.ad=Object.assign({},h.ad,{percent:0,backgroundColor:"#000000",barBackgroundColor:"#FFFFFF",barBackgroundColorDirection:void 0,barBackgroundColorRatios:void 0,barBorderColor:void 0,barBorderRadius:void 0,
barBorderSize:void 0,barOpacity:void 0});g.prototype.Pb=function(){this.Jl(g.ad)};g.prototype.Kb=function(){h.prototype.Kb.call(this);this.Sg==null&&(this.Sg=new n,this.Sg.xa({left:"0",width:"0%",height:"100%"}),this.mb(this.Sg))};g.prototype.jb=function(){this.S("percent")&&(this.Sg.set("width",Math.round(this.G("percent"))+"%"),this.$("percent"));this.Pc(g.uca,g.eR,[this.Sg],!0,!0);h.prototype.jb.call(this)};g.eR={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",
barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};g.uca=Object.keys(g.eR);return g});
define("tdv/player/view/webgl/system/util/Util","require tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL tdv/view/util/Fullscreen".split(" "),function(a){var m=a("tdv/player/view/util/Capabilities"),h=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/FileType"),g=a("tdv/player/view/util/URL"),k=a("tdv/view/util/Fullscreen"),e={kqb:function(q){return this.zP(q)||this.jNa(q)?!0:!1},Jx:function(){var q=h.sjb();e.Jx=function(){return q};
return q},jNa:function(q){return typeof q=="string"&&n.is(q,n.Wp)?!0:!1},fqb:function(q){return this.ipa(q)||this.jpa(q)?!0:!1},jpa:function(q){return typeof q=="string"&&(n.is(q,n.gVa)||n.hE(q,n.hVa))?!0:!1},zP:function(q){return!!q&&!!q.tagName&&q.tagName=="VIDEO"},uP:function(q){return typeof q=="string"&&n.is(q,n.HLS)||this.zP(q)&&n.is(q.currentSrc,n.HLS)?!0:!1},Mn:function(q){return typeof q=="string"&&n.is(q,n.Wp)||this.zP(q)&&n.is(q.currentSrc,n.Wp)?!0:!1},ipa:function(q){return!!q&&!!q.tagName&&
q.tagName=="IMG"},qhb:function(q){return!!q&&!!q.tagName&&q.tagName=="CANVAS"},Zpb:function(q){return Math.pow(2,Math.round(Math.log(q)/Math.LN2))},hqb:function(q){return q!==0&&(q&q-1)===0},VMa:function(){return h.Tb()==h.Yj},gqb:function(){return h.Tb()==h.tF},gr:function(){return h.Nd()==h.vj}},b=h.Nd()==h.uB&&!h.kf()&&h.lcb()<11;e.NTa=function(q){return d||b&&q&&q.currentTime<.2?!0:!1};e.AMa=function(){return e.VMa()||e.gr()};e.zMa=function(){return e.gr()&&m.$gb&&h.Uoa()<11};var c=!1;e.RMa=function(){c=
!1};e.rhb=function(){return c};e.rkb=function(){c=!0};var d=g.Bk("vic");e.kjb=function(){e.gr()&&(d=!0)};e.LLa=function(){return{alpha:!0,depth:!0,stencil:!1,antialias:m.Jcb()?!0:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"high-performance",xrCompatible:!e.VMa()}};e.$db=function(q){if(m.TPa==2){var r=e.LLa();r=q.getContext("webgl2",r)}r||(r=e.LLa(),r=q.getContext("webgl",r)||q.getContext("experimental-webgl",r));return r};e.UJa=function(q){var r;r||(r=q.getSize(new THREE.Vector2));
q=new THREE.WebGLRenderTarget(r.width,r.height,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType,samples:q.capabilities.isWebGL2?h.ub()?2:8:0});q.depthTexture=new THREE.DepthTexture;return q};e.Zdb=function(q){return new THREE.WebGLCubeRenderTarget(q,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType})};e.getPixelRatio=function(){if(h.ub()){var q=0,r=0;try{q=window.top.innerWidth,r=window.top.innerHeight}catch(t){if(h.Nd()==
h.uB&&window.devicePixelRatio>1)return window.devicePixelRatio}q=[Math.max(document.documentElement.clientWidth,q),Math.max(document.documentElement.clientHeight,r)].sort(function(t,u){return u-t});q=[p[0]/q[0],p[1]/q[1]].sort()[0];if(q!==Infinity)return q}else if(h.Nd()==h.Fta&&h.Tb()==h.Pp)return 1;return window.devicePixelRatio};e.YKa=function(q){if(!h.ub()||h.Nd()!=h.uB||!k.enabled()||!q)return e.getPixelRatio();q=[q.clientWidth,q.clientHeight].sort(function(r,t){return t-r});return[p[0]/q[0],
p[1]/q[1]].sort()[0]};var f=!1,l=[];e.I$=function(q){f=q;l.forEach(function(r){r(q)})};e.hcb=function(q){l.push(q)};e.Nhb=function(){return f};var p=[screen.width*window.devicePixelRatio,screen.height*window.devicePixelRatio].sort(function(q,r){return r-q});return e});define("tdv/player/view/panorama/renderer/3d/util/Util",["require","tdv/player/view/webgl/system/util/Util"],function(a){return a("tdv/player/view/webgl/system/util/Util")});
define("tdv/player/view/common/SceneFaderState",["require","exports"],function(){return function(){return function(){this.XD=this.bP=void 0}}()});
define("tdv/player/view/common/SceneFader",["require","exports","tdv/player/view/panorama/renderer/3d/util/Util","three.mod","tdv/constants/RenderOrder"],function(a,m,h,n,g){a=function(){function e(b,c,d,f){this.state=b;this.renderer=c;this.scene=d;this.camera=f;this.Bdb()}e.prototype.dispose=function(){this.Xcb()};e.prototype.update=function(b,c){if(this.state.XD!==void 0)if(this.vp.material.opacity=1-this.state.XD,b=c.parent!=null?c:b,this.vp.parent!==b&&b.add(this.vp),c.isPerspectiveCamera){this.vp.position.z=
-c.near*1.01;var d=this.renderer.getSize(new n.Vector2),f=d.height;b=this.o7.width;var l=this.o7.height;c=f/(2*Math.tan(c.fov*k/2));c=Math.max(f/c,d.width/(c*b/l));this.vp.scale.y=c;this.vp.scale.x=c*b/l}else c.isOrthographicCamera&&(this.vp.position.z=-(c.near+.1),this.renderer.getSize(new n.Vector2),this.vp.scale.y=c.top-c.bottom,this.vp.scale.x=c.right-c.left)};e.prototype.Sf=function(){return this.scene};e.prototype.Bdb=function(){this.o7=this.Tcb();this.vp=this.Rdb(this.o7)};e.prototype.Tcb=
function(){this.renderer.$q=!0;var b=h.UJa(this.renderer),c=this.renderer.getRenderTarget();this.renderer.setRenderTarget(b);this.renderer.render(this.scene,this.camera);this.renderer.setRenderTarget(c);this.renderer.$q=!1;return b};e.prototype.Rdb=function(b){b=new n.SpriteMaterial({map:b.texture});b.sizeAttenuation=!1;b.transparent=!0;b.visible=!0;b.opacity=1;b.depthTest=!1;b.needsUpdate=!0;b=new n.Sprite(b);b.renderOrder=g.$Va;return b};e.prototype.Xcb=function(){var b,c,d,f=this.vp.material;(b=
f.map)===null||b===void 0||b.dispose();(c=f.envMap)===null||c===void 0||c.dispose();f.dispose();this.vp.geometry.dispose();this.o7.dispose();(d=this.vp.parent)===null||d===void 0||d.remove(this.vp)};return e}();var k=Math.PI/180;return a});
define("tdv/player/view/common/XRSceneFader",["require","exports","tdv/player/view/util/XR","three.mod","tdv/constants/RenderOrder"],function(a,m,h,n,g){return function(){function k(e,b,c){this.state=e;this.scene=c;this.zna()}k.prototype.dispose=function(){this.edb()};k.prototype.update=function(){this.cP.material.opacity=Math.max(this.state.bP===void 0?0:1-this.state.bP,this.state.XD===void 0?0:this.state.XD)};k.prototype.Sf=function(){return this.scene};k.prototype.zna=function(){var e=new n.SphereGeometry(1,
32,16,0,Math.PI*2,0,Math.PI),b=new n.MeshBasicMaterial({color:0,side:n.DoubleSide,depthTest:!1,depthWrite:!1,transparent:!0});e=new n.Mesh(e,b);e.renderOrder=g.FWa;e.frustumCulled=!1;e.userData.PJ=!0;this.cP=e;h.Zq.add(this.cP)};k.prototype.edb=function(){var e;this.cP.material.dispose();this.cP.geometry.dispose();(e=this.cP.parent)===null||e===void 0||e.remove(this.cP)};return k}()});
define("tdv/player/view/common/WebGLRendererAugmenter","require exports tdv/constants/EventName tdv/player/view/common/SceneFaderState tdv/player/view/common/SceneFader tdv/player/view/common/XRSceneFader tdv/player/view/util/XR tdv/player/view/util/Device tdv/player/view/util/Flags".split(" "),function(a,m,h,n,g,k,e,b,c){return function(){function d(f){this.Y$=this.X$=this.$$=this.aaa=this.Z$=this.baa=void 0;this.Zt=null;this.npa=!1;this.bX=void 0;this.renderer=f;this.Tw=new n;this.mPa=this.renderer.render.bind(f);
this.renderer.render=this.render.bind(this);this.oPa=this.renderer.setSize.bind(f);this.renderer.setSize=this.setSize.bind(this);this.Zib=this.renderer.clear.bind(f);this.renderer.clear=this.clear.bind(this);this.nPa=this.renderer.setRenderTarget.bind(f);this.renderer.setRenderTarget=this.setRenderTarget.bind(this);e.M.bind(h.V,this.Ta,this,!0);window.startFadeOut=this.cF.bind(this);window.setFadeOutPosition=this.QE.bind(this);window.endFadeOut=this.VD.bind(this)}d.prototype.dispose=function(){var f;
e.M.h(h.V,this.Ta,this);(f=this.Zt)===null||f===void 0||f.dispose()};d.prototype.setSize=function(f,l,p){p===void 0&&(p=!0);!this.renderer.$q&&this.oj()?(this.baa=f,this.Z$=l,this.aaa=p):this.oPa(f,l,p)};d.prototype.setRenderTarget=function(f,l,p){l===void 0&&(l=0);p===void 0&&(p=0);this.oj()&&!this.Rhb(f)?(this.$$=f,this.X$=l,this.Y$=p):this.nPa(f,l,p)};d.prototype.Rhb=function(f){return this.npa||this.renderer.$q||f.isXRRenderTarget||f.textures&&f.textures.length>0&&f.textures[0].name&&f.textures[0].name.includes("PMREM")?
!0:!1};d.prototype.render=function(f,l){var p;if(f.isScene){if(!this.renderer.$q){if(this.Zt&&this.Zt.Sf()===f&&f!==this.M8)return;e.xra(this.renderer,f,l,this.Ysa);if(this.oj()||this.renderer.getRenderTarget()===null||(l===null||l===void 0?0:l.isPerspectiveCamera)&&((p=this.renderer.getRenderTarget())===null||p===void 0?0:p.gNa))this.M8=f,this.mNa=l,this.Zt&&this.Zt.update(f,l)}if(this.Keb(f,l))return}this.npa=!0;try{this.mPa(f,l)}catch(q){c.vu&&console.error("render error:",q)}this.npa=!1};d.prototype.clear=
function(f,l,p){this.Zib(f,l,p)};d.prototype.Ta=function(){this.oj()||(this.baa!==void 0&&this.Z$!==void 0&&this.aaa!==void 0&&(this.oPa(this.baa,this.Z$,this.aaa),this.aaa=this.Z$=this.baa=void 0),this.$$!==void 0&&this.X$!==void 0&&this.Y$!==void 0&&(this.nPa(this.$$,this.X$,this.Y$),this.Y$=this.X$=this.$$=void 0))};d.prototype.oj=function(){return e.isPresenting&&e.Uf===this.renderer};d.prototype.cF=function(){this.Tw.XD=0;this.IZ()};d.prototype.QE=function(f){this.Tw.XD=f};d.prototype.VD=function(){this.Tw.XD=
void 0;this.IZ()};d.prototype.zK=function(){this.Tw.bP=0;this.IZ()};d.prototype.nK=function(f){this.Tw.bP=f;this.IZ()};d.prototype.oJ=function(){this.Tw.bP=void 0;this.IZ()};d.prototype.Keb=function(f,l){if(!e.isPresenting||this.bX===0)return!1;if(this.bX===void 0){if(b.Dc()!=b.tu&&b.Dc()!=b.yB)return this.bX=0,!1;this.bX=20}this.bX--;var p=l.near,q=l.far;l.near=Math.min(p,.1);l.far=Math.max(q,1E3);this.mPa(f,l);l.near=p;l.far=q;return!0};d.prototype.IZ=function(){var f=this.M8&&(e.isPresenting&&
this.Tw.bP!==void 0||this.Tw.XD!==void 0);f!==!!this.Zt&&(f?this.oj()?this.Zt=new k(this.Tw,this.renderer,this.M8,this.mNa):this.Zt=new g(this.Tw,this.renderer,this.M8,this.mNa):this.Zt&&(this.Zt.dispose(),this.Zt=null))};return d}()});
define("tdv/player/view/common/RenderersContainer","require exports tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/util/Flags tdv/player/view/util/XR tdv/player/view/common/WebGLRendererAugmenter three.mod tdv/view/util/Fullscreen".split(" "),function(a,m,h,n,g,k,e,b,c){function d(f,l){return f.Moa!==l.Moa?f.Moa-l.Moa:f.renderOrder!==l.renderOrder?f.renderOrder-l.renderOrder:f.object.Aw||l.object.Aw?(f.object.Aw?-1:1)-(l.object.Aw?-1:1):f.z!==l.z?l.z-f.z:f.id-
l.id}return function(){function f(l){this.wW=!0;this.qr=this.renderer=null;this.Mqa=void 0;this.Hk=0;this.wW=l;this.container=document.createElement("div")}f.prototype.dispose=function(){this.ya()};f.prototype.y6=function(){this.Hk++};f.prototype.Lgb=function(){return this.Hk>0};f.prototype.b$=function(){this.Hk--;this.Hk===0&&this.ya()};f.prototype.cc=function(){return this.container};f.prototype.yMa=function(){return!!this.renderer};f.prototype.sl=function(){this.RRa();return this.renderer};f.prototype.cfb=
function(){this.Vlb();return this.TD};f.prototype.dfb=function(){this.Wlb();return this.tt};f.prototype.tmb=function(){this.E$(f.wua)};f.prototype.smb=function(){this.E$(f.XVa)};f.prototype.ymb=function(){this.E$(f.YVa)};f.prototype.vmb=function(){this.E$(f.xua)};f.prototype.cF=function(){var l;(l=this.qr)===null||l===void 0||l.cF()};f.prototype.QE=function(l){var p;(p=this.qr)===null||p===void 0||p.QE(l)};f.prototype.VD=function(){var l;(l=this.qr)===null||l===void 0||l.VD()};f.prototype.zK=function(){var l;
this.RRa();(l=this.qr)===null||l===void 0||l.zK()};f.prototype.nK=function(l){var p;(p=this.qr)===null||p===void 0||p.nK(l)};f.prototype.oJ=function(){var l;(l=this.qr)===null||l===void 0||l.oJ()};f.prototype.Vlb=function(){this.TD||(this.TD=new b.CSS3DRenderer,this.TD.domElement.style.position="absolute",this.TD.domElement.style.zIndex="0",this.container.prepend(this.TD.domElement))};f.prototype.RRa=function(){if(!this.renderer){var l={alpha:!0};g.UUa&&(l.precision="lowp");f.rna.length>0?(l.context=
f.rna.pop(),l.canvas=l.context.canvas):(l.canvas=document.createElement("canvas"),l.context=n.$db(l.canvas));this.renderer=new b.WebGLRenderer(l);this.qr=new e(this.renderer);this.renderer.setAnimationLoop(null);this.renderer.setPixelRatio(n.getPixelRatio());this.renderer.debug.checkShaderErrors=g.vu;this.renderer.domElement.style.position="absolute";this.renderer.domElement.style.zIndex="1";this.renderer.domElement.style.pointerEvents="none";this.renderer.outputColorSpace=b.SRGBColorSpace;this.renderer.shadowMap.type=
b.PCFShadowMap;this.renderer.setTransparentSort(d);this.tt?this.container.insertBefore(this.renderer.domElement,this.tt.domElement):this.container.appendChild(this.renderer.domElement);this.BTa();k.fcb(this.renderer);c.M.bind(h.V,this.yOa,this,!0)}};f.prototype.yOa=function(){setTimeout(function(){this.renderer&&this.renderer.setPixelRatio(n.YKa(this.renderer.domElement))}.bind(this),100)};f.prototype.E$=function(l){this.Mqa!==l&&(this.Mqa=l,this.BTa())};f.prototype.BTa=function(){if(this.renderer)switch(this.Mqa){case f.wua:this.renderer.setClearColor(0,
1);this.renderer.autoClear=!1;this.renderer.shadowMap.enabled=!1;this.renderer.localClippingEnabled=!1;this.qr.Ysa=k.YQ.cca;break;case f.xua:this.renderer.setClearColor(0,0);this.renderer.autoClear=!1;this.renderer.shadowMap.enabled=!0;this.renderer.localClippingEnabled=!0;this.qr.Ysa=k.YQ.Uba;break;default:this.renderer.setClearColor(0,0),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!0,this.renderer.localClippingEnabled=!1,this.qr.Ysa=k.YQ.Uba}};f.prototype.Wlb=function(){this.tt||
(this.tt=new b.CSS3DRenderer,this.tt.domElement.style.position="absolute",this.tt.domElement.style.zIndex="2",this.tt.domElement.style.pointerEvents="none",this.container.appendChild(this.tt.domElement))};f.prototype.ya=function(){var l;this.tt&&(this.container.removeChild(this.tt.domElement),this.tt=null);this.renderer&&(c.M.h(h.V,this.yOa,this),k.Njb(this.renderer),this.container.removeChild(this.renderer.domElement),f.rna.push(this.renderer.getContext()),this.renderer.clear(),this.renderer.dispose(),
this.renderer=null,(l=this.qr)===null||l===void 0||l.dispose(),this.qr=null);this.TD&&(this.container.removeChild(this.TD.domElement),this.TD=null)};f.wua=0;f.XVa=1;f.YVa=2;f.xua=3;f.rna=[];return f}()});
define("tdv/player/view/ScreenJoystick",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/player/view/util/Device"],function(a,m,h,n,g){return function(k){function e(b,c){var d=k.call(this)||this;d.enabled=!1;d.a9=0;d.b9=0;d.nqa=null;d.Tj=null;d.Cm=null;d.pQ=null;d.Hk=0;d.eb=b;d.nqa=c;return d}P(e,k);e.prototype.dispose=function(){this.Ra(!1);this.nqa=this.eb=null};e.prototype.y6=function(){this.Hk++;this.Hk>=1&&this.Ra(!0)};e.prototype.b$=function(){this.Hk--;this.Hk<=
0&&this.Ra(!1)};e.prototype.Ra=function(b){this.enabled!=b&&((this.enabled=b)?(this.eb.Era("Button"),this.jcb()):(this.eb.$jb(),this.pna(),this.stop(),this.Sjb()))};e.prototype.getX=function(){return this.a9};e.prototype.getY=function(){return this.b9};e.prototype.$h=function(b){this.lf(b);this.enabled&&(this.Qpa=this.Opa=b.x,this.Rpa=this.Ppa=b.y,this.Ilb())};e.prototype.Vj=function(b){this.Qpa=b.x;this.Rpa=b.y;this.pQ?this.Wmb():this.Tj&&this.JK()};e.prototype.lf=function(){this.pna();this.stop()};
e.prototype.zOa=function(){this.lf()};e.prototype.tl=function(){this.vmin=Math.min(this.eb.nb(),this.eb.Mb())/100};e.prototype.start=function(){this.lA();this.o(h.Up);this.JK()};e.prototype.stop=function(){this.Tj&&(this.oeb(),this.o(h.Fg))};e.prototype.Wmb=function(){var b=this.Qpa-this.Opa,c=this.Rpa-this.Ppa;Math.sqrt(b*b+c*c)>this.vmin*e.yUa&&this.pna()};e.prototype.Ilb=function(){this.pQ=window.setTimeout(this.xmb.bind(this),e.zUa)};e.prototype.pna=function(){this.pQ&&(clearTimeout(this.pQ),
this.pQ=null)};e.prototype.lA=function(){this.Tj=document.createElement("div");this.Tj.setAttribute("tdvclass","Button");this.Tj.style.position="absolute";this.Tj.style.width=this.Tj.style.height=Math.round(e.eta*2*this.vmin)+"px";this.Tj.style.borderRadius="50%";this.Tj.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.Tj.style.transform="translate(-50%, -50%)";this.Tj.style.zIndex="1000";this.Tj.style.left=this.Opa+"px";this.Tj.style.top=this.Ppa+"px";this.nqa.wa().uk(this.Tj);this.Cm=document.createElement("div");
this.Cm.setAttribute("tdvclass","Button");this.Cm.style.position="absolute";this.Cm.style.width=this.Cm.style.height=Math.round(e.TVa*2*this.vmin)+"px";this.Cm.style.borderRadius="50%";this.Cm.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.Cm.style.transform="translate(-50%, -50%)";this.Cm.style.zIndex="1000";this.Tj.appendChild(this.Cm)};e.prototype.JK=function(){var b=this.Qpa-this.Opa,c=this.Rpa-this.Ppa;if(b==0&&c==0)this.b9=this.a9=0;else{var d=Math.atan2(-c,b);b=Math.min(Math.sqrt(b*
b+c*c)/(this.vmin*e.eta),e.oVa);this.a9=Math.cos(d)*b;this.b9=Math.sin(d)*b}this.Cm.style.left=(50+this.a9*50).toFixed(2)+"%";this.Cm.style.top=(50-this.b9*50).toFixed(2)+"%";this.o(h.V)};e.prototype.oeb=function(){var b,c;(b=this.Cm.parentNode)===null||b===void 0||b.removeChild(this.Cm);this.Cm=null;(c=this.Tj.parentNode)===null||c===void 0||c.removeChild(this.Tj);this.Tj=null};e.prototype.xmb=function(){this.pQ=null;this.start()};e.prototype.jcb=function(){this.eb.bind(h.Sa,this.$h,this,!0);this.eb.bind(h.gb,
this.Vj,this,!0);this.eb.bind(h.$a,this.lf,this,!0);this.eb.bind(h.Rb,this.tl,this,!0);this.eb.bind(h.HB,this.zOa,this,!0);this.tl()};e.prototype.Sjb=function(){this.eb.h(h.Sa,this.$h,this);this.eb.h(h.gb,this.Vj,this);this.eb.h(h.$a,this.lf,this);this.eb.h(h.Rb,this.tl,this);this.eb.h(h.HB,this.zOa,this)};e.yUa=g.ub()?5:.5;e.zUa=g.ub()?300:600;e.eta=g.ub()?10:6.6;e.TVa=g.ub()?5:3.3;e.oVa=6;return e}(n)});
define("tdv/player/view/Subtitles","require tdv/utils tdv/constants/EventName tdv/view/constants/Alignment tdv/view/util/Animation tdv/view/util/Font".split(" "),function(a){function m(f){this.$ra=f;this.element=document.createElement("div");this.lsa=document.createElement("span");this.element.appendChild(this.lsa);this.lsa.innerHTML=f.text.split("<br>").join("\n").split("\n").map(n).join("<br>");this.Z6=!1}function h(f){this.P=f;this.cW=g.nsa(this.cW.bind(this),100);this.dW=g.nsa(this.dW.bind(this),
100);this.qa=document.createElement("div");this.qa.style.position="absolute";this.qa.style.left=0;this.qa.style.top=0;this.qa.style.right=0;this.qa.style.bottom=0;this.qa.style.zIndex=1;this.qa.style.cursor="inherit";this.qa.style.display="none";this.qn=document.createElement("div");this.qn.style.position="absolute";this.qn.style.left=0;this.qn.style.right=0;this.qn.style.zIndex=1;this.qn.style.cursor="inherit";this.qa.appendChild(this.qn);this.uV=[];this.GV=[];this.bj=[];this.Uia={};this.jO=e.Hc;
this.P.bind(k.L("subtitlesEnabled"),this.Wz,this);h.nua.forEach(function(l){this.P.bind(k.L(l),this.cW,this)}.bind(this));h.oua.forEach(function(l){this.P.bind(k.L(l),this.dW,this)}.bind(this));this.Wz();this.cW();this.dW()}function n(f){d.innerHTML=f;return d.innerText}var g=a("tdv/utils"),k=a("tdv/constants/EventName"),e=a("tdv/view/constants/Alignment"),b=a("tdv/view/util/Animation"),c=a("tdv/view/util/Font");h.prototype.clear=function(){this.tqb(null);this.P&&(this.P.h(k.L("subtitlesEnabled"),
this.Wz,this),h.nua.forEach(function(f){this.P.h(k.L(f),this.cW,this)}.bind(this)),h.oua.forEach(function(f){this.P.h(k.L(f),this.dW,this)}.bind(this)),this.P=null)};h.prototype.cc=function(){return this.qa};h.prototype.Uma=function(f){this.uV.indexOf(f)<0&&(this.uV.push(f),f.bind(k.L("activeSubtitles"),this.e3,this,!0),this.e3())};h.prototype.Lqa=function(f){var l=this.uV.indexOf(f);l>=0&&(this.uV.splice(l,1),f.h(k.L("activeSubtitles"),this.e3,this,!0),this.e3())};h.prototype.e3=function(){var f=
[];this.uV.forEach(function(l){f=f.concat(l.get("activeSubtitles")||[])});this.k9a(f)};h.prototype.Wz=function(){this.ha=this.P.get("subtitlesEnabled");this.jma()};h.prototype.cW=function(){this.jO=this.nS("subtitlesVerticalAlign",[e.Tc,e.$d,e.Hc],e.Hc);this.qn.style["text-align"]=this.nS("subtitlesHorizontalAlign",[e.fb,e.Db,e.$e],e.$e);this.qn.style.bottom=this.jO==e.Hc?this.Nl("subtitlesBottom",0):"";this.qn.style.top=this.jO==e.Tc?this.Nl("subtitlesTop",0):this.jO==e.$d?"50%":"";this.qn.style.transform=
this.jO==e.$d?"translate(0, -50%)":"";this.jma()};h.prototype.dW=function(){var f={};f["background-color"]=this.cga("subtitlesBackgroundColor","subtitlesBackgroundOpacity");f.border=[this.Nl("subtitlesBorderSize"),"solid",this.Bj("subtitlesBorderColor")].join(" ");f["box-shadow"]=this.Bj("subtitlesShadow",!1)?[this.Nl("subtitlesShadowHorizontalLength"),this.Nl("subtitlesShadowVerticalLength"),this.Nl("subtitlesShadowBlurRadius"),this.cga("subtitlesShadowColor","subtitlesShadowOpacity","#000000",0)].join(" "):
"";f.display="inline-block";f["font-family"]=c.rA(this.Bj("subtitlesFontFamily"));f["font-size"]=this.Nl("subtitlesFontSize");f.color=this.Bj("subtitlesFontColor");f["font-weight"]=this.nS("subtitlesFontWeight","bold bolder lighter 100 200 300 400 500 600 700 800 900 normal".split(" "),"normal");f["font-style"]=this.nS("subtitlesFontStyle",["italic","normal"],"normal");f["margin-bottom"]=this.Nl("subtitlesGap");f.opacity=this.Bj("subtitlesOpacity");f["padding-top"]=this.Nl("subtitlesPaddingTop");
f["padding-bottom"]=this.Nl("subtitlesPaddingBottom");f["padding-left"]=this.Nl("subtitlesPaddingLeft");f["padding-right"]=this.Nl("subtitlesPaddingRight");f.position="relative";f["text-align"]=this.nS("subtitlesHorizontalAlign",["left","right","center"],"center");f["text-decoration"]=this.Bj("subtitlesTextDecoration",["underline","overline","line-through","none"],"none");f["text-shadow"]=[this.Nl("subtitlesTextShadowHorizontalLength"),this.Nl("subtitlesTextShadowVerticalLength"),this.Nl("subtitlesTextShadowBlurRadius"),
this.cga("subtitlesTextShadowColor","subtitlesTextShadowOpacity","#000000",0)].join(" ");this.Uia=f;this.hYa()};h.prototype.k9a=function(f){this.GV=f;this.jma()};h.prototype.jma=function(){for(var f=this.ha?this.GV:[],l=this.bj.length-1;l>=0;l--){var p=this.bj[l];if(f.indexOf(p.$ra)>=0)break;this.qn.removeChild(p.element)}for(var q=[],r=!1;l>=0;l--)p=this.bj[l],!p.Z6&&f.indexOf(p.$ra)<0&&(p.Z6=!0,p.element.style.visibility="hidden",r=!0),q.splice(0,0,p);r&&b.requestFrame(this.Uwa,this);this.bj=q;
var t=this.bj.filter(function(u){return!u.Z6}).map(function(u){return u.$ra});f.filter(function(u){return t.indexOf(u)<0}).forEach(function(u){u=new m(u);this.Uva(u);this.jO==e.Hc&&this.bj.length>0?this.qn.insertBefore(u.element,this.bj[this.bj.length-1].element):this.qn.appendChild(u.element);this.bj.push(u)}.bind(this));this.qa.style.display=this.bj.length>0?"block":"none"};h.prototype.Uwa=function(f){var l=!1;f=Math.round(200*f/1E3);for(var p=0;p<this.bj.length;p++){var q=this.bj[p];if(q.Z6)if(l=
!0,f>=q.element.clientHeight)f-=q.element.clientHeight,this.qn.removeChild(q.element),this.bj.splice(p,1),p--;else{q.element.style.height=q.element.clientHeight-f+"px";break}}l&&b.requestFrame(this.Uwa,this)};h.prototype.hYa=function(){this.bj.forEach(this.Uva.bind(this))};h.prototype.Uva=function(f){for(var l in this.Uia)f.lsa.style[l]=this.Uia[l]};h.prototype.Bj=function(f,l){return this.P.get(f,l)};h.prototype.Nl=function(f,l){f=this.P.get(f,l);isNaN(f)||(f=Math.round(f)+"px");return f};h.prototype.nS=
function(f,l,p){f=this.P.get(f);return l.indexOf(f)<0?p:f};h.prototype.cga=function(f,l,p,q){f=this.P.get(f,p);l=this.P.get(l,q);return"rgba("+parseInt("0x"+f.substr(1,2))+", "+parseInt("0x"+f.substr(3,2))+", "+parseInt("0x"+f.substr(5,2))+", "+l+")"};h.nua=["subtitlesHorizontalAlign","subtitlesVerticalAlign","subtitlesTop","subtitlesBottom"];h.oua="subtitlesBackgroundColor subtitlesBackgroundOpacity subtitlesBorderColor subtitlesBorderSize subtitlesFontFamily subtitlesFontColor subtitlesFontSize subtitlesFontStyle subtitlesFontWeight subtitlesGap subtitlesOpacity subtitlesPaddingTop subtitlesPaddingBottom subtitlesPaddingLeft subtitlesPaddingRight subtitlesShadow subtitlesShadowBlurRadius subtitlesShadowHorizontalLength subtitlesShadowVerticalLength subtitlesShadowColor subtitlesTextDecoration subtitlesTextShadowBlurRadius subtitlesTextShadowColor subtitlesTextShadowHorizontalLength subtitlesTextShadowOpacity subtitlesTextShadowVerticalLength".split(" ");
var d=document.createElement("div");return h});
define("tdv/player/view/SubtitlesListener","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo".split(" "),function(a,m,h,n,g,k){a=function(){function l(p){this.oQ=new Map;this.Fm=p}l.prototype.add=function(p){k.Oa("PanoramaPlayer",p)?this.oQ.set(p,new e(this.Fm,p)):k.Oa("VideoPlayer",p)?this.oQ.set(p,new b(this.Fm,p)):k.Oa("PhotoAlbumPlayer",p)?this.oQ.set(p,new c(this.Fm,p)):k.Oa("Audio",p)&&this.oQ.set(p,new f(this.Fm,p))};
l.prototype.remove=function(p){var q=this.oQ.get(p);q&&(q.clear(),this.oQ.delete(p))};return l}();m=function(){function l(p,q){this.Fm=p;this.source=q}l.prototype.clear=function(){};return l}();var e=function(l){function p(q,r){q=l.call(this,q,r)||this;q.bJ=new d(q.Fm);q.ig=null;q.source.bind(n.L("panorama"),q.gqa,q,!0);q.gqa();return q}P(p,l);p.prototype.clear=function(){this.source&&(this.source.h(n.L("panorama"),this.gqa,this),this.source=null,this.Wf(null),this.bJ.clear(),this.bJ=null)};p.prototype.gqa=
function(){this.Wf(this.source.get("panorama"))};p.prototype.Wf=function(q){if(this.ig!=q){this.ig&&(this.ig.h(n.L("audios"),this.RJ,this),this.Fm.Lqa(this.ig));if(this.ig=q)this.Fm.Uma(this.ig),this.ig.bind(n.L("audios"),this.RJ,this,!0);this.RJ()}};p.prototype.RJ=function(){this.bJ.cra(this.ig&&this.ig.get("audios")||[])};return p}(m),b=function(l){function p(q,r){q=l.call(this,q,r)||this;q.video=null;q.source.bind(n.L("video"),q.WJ,q,!0);q.source.bind(n.Pd,q.WJ,q,!0);q.WJ();return q}P(p,l);p.prototype.clear=
function(){this.source&&(this.source.h(n.L("video"),this.WJ,this),this.source.h(n.Pd,this.WJ,this),this.source=null,this.N$(null))};p.prototype.WJ=function(){var q;this.N$(((q=this.source)===null||q===void 0?void 0:q.get("state"))!=g.ca?this.source.get("video"):null)};p.prototype.N$=function(q){this.video!=q&&(this.video&&this.Fm.Lqa(this.video),(this.video=q)&&this.Fm.Uma(this.video))};return p}(m),c=function(l){function p(q,r){q=l.call(this,q,r)||this;q.TJ=q.TJ.bind(q);q.bJ=new d(q.Fm);q.tc=null;
h.ba(q.source,"photoAlbum.playList.items",q.TJ,!1);h.ba(q.source,"photoAlbum.playList.selectedIndex",q.TJ,!1);q.TJ();return q}P(p,l);p.prototype.clear=function(){this.source&&(h.da(this.source,"photoAlbum.playList.items",this.TJ),h.da(this.source,"photoAlbum.playList.selectedIndex",this.TJ),this.source=null,this.ERa(null),this.bJ.clear(),this.bJ=null)};p.prototype.TJ=function(){var q=this.source.get("photoAlbum");q=(q=q?q.get("playList"):null)&&q.get("selectedIndex")>=0?q.get("items")[q.get("selectedIndex")]:
null;this.ERa(q?q.get("media"):null)};p.prototype.ERa=function(q){this.tc!=q&&(this.tc&&this.tc.h(n.L("audios"),this.RJ,this),(this.tc=q)&&this.tc.bind(n.L("audios"),this.RJ,this,!0),this.RJ())};p.prototype.RJ=function(){this.bJ.cra(this.tc&&this.tc.get("audios")||[])};return p}(m),d=function(){function l(p){this.I6=[];this.H6=new Map;this.Fm=p}l.prototype.clear=function(){this.cra([])};l.prototype.cra=function(p){this.I6!=p&&(this.I6.forEach(function(q){p.indexOf(q)>=0||(this.H6.get(q).clear(),this.H6.delete(q))}.bind(this)),
this.I6=p,this.I6.forEach(function(q){this.H6.has(q)||this.H6.set(q,new f(this.Fm,q))}.bind(this)))};return l}(),f=function(l){function p(q,r){q=l.call(this,q,r)||this;q.IE=!1;q.source.bind(n.L("state"),q.Ypa,q,!0);q.Ypa();return q}P(p,l);p.prototype.clear=function(){this.source&&(this.WQa(!1),this.source.h(n.L("state"),this.Ypa,this),this.source=null)};p.prototype.Ypa=function(){this.WQa(this.source.get("state")!=g.ca)};p.prototype.WQa=function(q){this.IE!=q&&(this.IE&&this.Fm.Lqa(this.source),(this.IE=
q)&&this.Fm.Uma(this.source))};return p}(m);return a});
define("tdv/player/script/ViewerArea","require three.mod tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/view/PlaybackBar tdv/player/view/ProgressBar tdv/player/view/common/RenderersContainer tdv/player/view/ScreenJoystick tdv/player/view/Subtitles tdv/player/view/SubtitlesListener tdv/player/view/util/Device tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/constants/Cursor tdv/view/constants/CreationPolicy tdv/view/constants/State tdv/view/containers/Container tdv/view/core/UIComponent".split(" "),function(a){function m(){function G(){v.YA==
R&&v.Nw==Q?O.sl().render(R,Q):v.M.h(k.Zd,G,this)}v.h$=new b(k.fpb);var N=H=new v.Yua,O=E=new p,R=new h.Scene,Q=new h.PerspectiveCamera;v.xra(O.sl(),R,Q,v.YQ.cca);v.xt(O.sl(),v.Fl.Xp,N);v.M.bind(k.Zd,G,this,!0);v.h$=null}var h=a("three.mod"),n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),k=a("tdv/constants/EventName"),e=a("tdv/constants/PlaybackState"),b=a("tdv/events/Event"),c=a("tdv/player/parser/ClassInfo"),d=a("tdv/player/script/helper/ButtonProperty"),f=a("tdv/player/view/PlaybackBar"),l=
a("tdv/player/view/ProgressBar"),p=a("tdv/player/view/common/RenderersContainer"),q=a("tdv/player/view/ScreenJoystick"),r=a("tdv/player/view/Subtitles"),t=a("tdv/player/view/SubtitlesListener"),u=a("tdv/player/view/util/Device"),v=a("tdv/player/view/util/XR"),w=a("tdv/view/constants/ButtonMode"),x=a("tdv/view/constants/Cursor"),y=a("tdv/view/constants/CreationPolicy"),z=a("tdv/view/constants/State"),A=a("tdv/view/containers/Container"),D=a("tdv/view/core/UIComponent"),F=180/Math.PI,C=new h.Euler,
B=c.define("ViewerArea",A,function(){A.call(this);this.set("childrenInteractionEnabled",!0);this.set("contentOpaque",!0);this.set("creationPolicy",y.cL);this.set("subtitlesEnabled",!0);this.set("checkToolTipOcclusion",!0);this.set("isKeyboardTarget",!1);this.Pv=this.ZS=this.ss=this.fj=this.qD=this.bv=this.ve=this.b1=this.ej=null;this.GV=new r(this);this.D5=new t(this.GV);this.hja=this.wv=!1;this.Jj=e.ca;this.zo=this.Gl=null;this.So=!1;this.WU=[];this.vL=[];this.uL=new Set;this.bind(B.qua,this.E5a,
this,!0);this.bind(B.pua,this.D5a,this,!0);this.bind(k.Sa,this.uCa,this);this.bind(k.Sa,this.uCa,this);this.bind(k.uc,this.a6a,this);this.bind(k.Eb,this.$5a,this);this.bind(k.od,this.O3,this,!0);this.bind(k.jd,this.Y5a,this,!0);this.GL=new d(this,"buttonPause",w.bk);this.GL.bind(k.ma,this.WH,this);this.GL.set("state",z.Ee);this.HL=new d(this,"buttonPlay",w.bk);this.HL.bind(k.ma,this.XH,this);this.HL.set("state",z.Ee);this.yG=new d(this,"buttonPlayPause",w.bk);this.yG.bind(k.ma,this.A5a,this);this.yG.set("state",
z.Ee);this.JL=new d(this,"buttonStop",w.bk);this.JL.bind(k.ma,this.cD,this);this.JL.set("state",z.Fb);this.ZYa=new d(this,"buttonRestart",w.af);this.ZYa.bind(k.ma,this.bD,this);this.e0=new d(this,"buttonToggleSubtitles",w.bk);this.e0.bind(k.Rk,function(){this.set("subtitlesEnabled",!0)},this,!0);this.e0.bind(k.Nm,function(){this.set("subtitlesEnabled",!1)},this,!0);this.bind(k.L("subtitlesEnabled"),function(){this.e0.set("pressed",this.get("subtitlesEnabled"))},this);this.e0.set("pressed",this.get("subtitlesEnabled"));
(new d(this,"buttonVRView",w.af)).bind(k.ma,function(){this.set("viewMode","vr")},this,!0);(new d(this,"buttonARView",w.af)).bind(k.ma,function(){this.set("viewMode","ar")},this,!0);this.G3a=n.nr(this.obb,this);this.bind(k.fi,this.X5a,this,!0);this.bind(B.A_,this.Z5a,this,!0);v.M.bind(k.V,function(){this.set("viewMode",this.Cya())},this,!0)});B.prototype.play=function(){this.XH()};B.prototype.pause=function(){this.WH()};B.prototype.stop=function(){this.cD()};B.prototype.restart=function(){this.bD()};
B.ad=Object.assign({},A.ad,{progressBackgroundColor:void 0,progressBackgroundColorDirection:void 0,progressBackgroundColorRatios:void 0,progressBackgroundOpacity:void 0,progressBackgroundBlur:0,progressBarBackgroundColor:void 0,progressBarBackgroundColorDirection:void 0,progressBarBackgroundColorRatios:void 0,progressBarBorderColor:void 0,progressBarBorderRadius:void 0,progressBarBorderSize:void 0,progressBarOpacity:void 0,progressBorderColor:void 0,progressBorderRadius:void 0,progressBorderSize:void 0,
progressBottom:0,progressHeight:20,progressLeft:0,progressOpacity:void 0,progressPercent:0,progressRight:0,progressVisible:!1,externalPlaybackBar:void 0,externalProgressBar:void 0,playbackBarBackgroundColor:void 0,playbackBarBackgroundColorDirection:void 0,playbackBarBackgroundOpacity:void 0,playbackBarBackgroundBlur:0,playbackBarBorderColor:void 0,playbackBarBorderRadius:void 0,playbackBarBorderSize:void 0,playbackBarBottom:10,playbackBarHeight:void 0,playbackBarWidth:void 0,playbackBarLeft:void 0,
playbackBarOpacity:void 0,playbackBarRight:void 0,playbackBarLiveDragging:void 0,playbackBarDuration:100,playbackBarPosition:0,playbackBarRollOverDisplay:!1,plabackBarSteps:void 0,plabackBarSelectedStep:void 0,playbackBarVisible:!1,playbackBarProgressBackgroundColor:void 0,playbackBarProgressBackgroundColorDirection:void 0,playbackBarProgressBackgroundColorRatios:void 0,playbackBarProgressBorderColor:void 0,playbackBarProgressBorderRadius:void 0,playbackBarProgressBorderSize:void 0,playbackBarProgressOpacity:void 0,
playbackBarHeadBackgroundColor:void 0,playbackBarHeadBackgroundColorDirection:void 0,playbackBarHeadBackgroundColorRatios:void 0,playbackBarHeadBorderColor:void 0,playbackBarHeadBorderRadius:void 0,playbackBarHeadBorderSize:void 0,playbackBarHeadOpacity:void 0,playbackBarHeadWidth:void 0,playbackBarHeadHeight:void 0,playbackBarHeadShadow:void 0,playbackBarHeadShadowBlurRadius:void 0,playbackBarHeadShadowColor:void 0,playbackBarHeadShadowHorizontalLength:void 0,playbackBarHeadShadowOpacity:void 0,
playbackBarHeadShadowSpread:void 0,playbackBarHeadShadowVerticalLength:void 0,playbackBarStepBackgroundColor:void 0,playbackBarStepBackgroundColorDirection:void 0,playbackBarStepBackgroundColorRatios:void 0,playbackBarStepBorderColor:void 0,playbackBarStepBorderRadius:void 0,playbackBarStepBorderSize:void 0,playbackBarStepOpacity:void 0,playbackBarStepWidth:void 0,playbackBarStepHeight:void 0,playbackBarStepShadow:void 0,playbackBarStepShadowBlurRadius:void 0,playbackBarStepShadowColor:void 0,playbackBarStepShadowHorizontalLength:void 0,
playbackBarStepShadowOpacity:void 0,playbackBarStepShadowSpread:void 0,playbackBarStepShadowVerticalLength:void 0,playbackBarStepSelectedBackgroundColor:void 0,playbackBarStepSelectedBackgroundColorDirection:void 0,playbackBarStepSelectedBackgroundColorRatios:void 0,playbackBarStepSelectedBorderColor:void 0,playbackBarStepSelectedBorderRadius:void 0,playbackBarStepSelectedBorderSize:void 0,playbackBarStepSelectedOpacity:void 0,playbackBarStepSelectedWidth:void 0,playbackBarStepSelectedHeight:void 0,
playbackBarStepSelectedShadow:void 0,playbackBarStepSelectedShadowBlurRadius:void 0,playbackBarStepSelectedShadowColor:void 0,playbackBarStepSelectedShadowHorizontalLength:void 0,playbackBarStepSelectedShadowOpacity:void 0,playbackBarStepSelectedShadowSpread:void 0,playbackBarStepSelectedShadowVerticalLength:void 0,subtitlesBackgroundColor:"#000000",subtitlesBackgroundOpacity:1,subtitlesBorderColor:void 0,subtitlesBorderSize:0,subtitlesBottom:"10%",subtitlesFontFamily:void 0,subtitlesFontColor:"#ffffff",
subtitlesFontSize:"12px",subtitlesFontStyle:void 0,subtitlesFontWeight:void 0,subtitlesGap:10,subtitlesHorizontalAlign:"center",subtitlesOpacity:1,subtitlesPaddingTop:5,subtitlesPaddingBottom:5,subtitlesPaddingLeft:5,subtitlesPaddingRight:5,subtitlesShadow:!1,subtitlesShadowBlurRadius:void 0,subtitlesShadowHorizontalLength:0,subtitlesShadowVerticalLength:0,subtitlesShadowColor:"#000000",subtitlesShadowOpacity:0,subtitlesTextDecoration:void 0,subtitlesTextShadowBlurRadius:void 0,subtitlesTextShadowColor:"#000000",
subtitlesTextShadowHorizontalLength:0,subtitlesTextShadowOpacity:0,subtitlesTextShadowVerticalLength:0,subtitlesTop:void 0,subtitlesVerticalAlign:"bottom",transitionDuration:500,blendingTransitionDuration:void 0,disolveTransitionDuration:void 0,translationTransitionDuration:void 0,translationTransitionEnabled:!0,toolTipEnabled:!0});B.prototype.get=function(G,N){switch(G){case "viewMode":if(v.isPresenting&&this.Fc().yMa()&&v.Uf==this.Fc().sl()){if(v.Em==v.Fl.Xp)return"vr";if(v.Em==v.Fl.Np)return"ar"}return"standard";
case "xrYaw":return v.isPresenting?-C.setFromQuaternion(v.yl,"YXZ").y*F:0;case "xrPitch":return v.isPresenting?C.setFromQuaternion(v.yl,"YXZ").x*F:0;case "xrRoll":return v.isPresenting?-C.setFromQuaternion(v.yl,"YXZ").z*F:0}return A.prototype.get.call(this,G,N)};B.prototype.set=function(G,N){G=="playbackState"&&(N=this.Jj,this.get(G)!=N&&(this.hja=!0,this.G3a()));switch(G){case "toolTipEnabled":this.set("toolTipDisabled",N===!1);break;case "cardboardPointerDistance":this.set("vrPointerDistance",N);
break;case "cardboardPointerColor":this.set("vrPointerColor",N);break;case "cardboardPointerSelectionColor":this.set("vrPointerSelectionColor",N);break;case "cardboardPointerSelectionTime":this.set("vrPointerSelectionTime",N);break;case "playbackBarVisible":case "playbackBarRollOverDisplay":this.eW();break;case "viewMode":var O=A.prototype.get.call(this,G);this.Fc().Lgb()&&(N!="vr"||v.isPresenting?N!="ar"||v.isPresenting?N!="vr"&&N!="ar"&&v.isPresenting&&v.Uf==this.Fc().sl()&&v.sm():v.xt(this.Fc().sl(),
v.Fl.Np,this.b8()):v.xt(this.Fc().sl(),v.Fl.Xp,this.b8()));N=this.Cya();O!=N&&this.o(B.Kba)}A.prototype.set.call(this,G,N)};B.prototype.Cya=function(){if(v.isPresenting&&this.Fc().yMa()&&v.Uf==this.Fc().sl()){if(v.Em==v.Fl.Xp)return"vr";if(v.Em==v.Fl.Np)return"ar"}return"standard"};B.prototype.Pb=function(){this.Jl(B.ad)};B.prototype.Kb=function(){A.prototype.Kb.call(this);this.qD==null&&(this.qD=new D,this.qD.set("width","100%"),this.qD.set("height","100%"),this.qD.set("interactionEnabled",!1),this.qD.set("toolTipDisabled",
!0),this.mb(this.qD),this.qD.wa().uk(this.Fc().cc()));this.ss==null&&(this.ss=new D,this.ss.set("width","100%"),this.ss.set("height","100%"),this.ss.set("toolTipDisabled",!0),this.ss.set("interactionEnabled",!1),this.mb(this.ss),n.defer(function(){this.ss.set("cursor",x.LB)}.bind(this)),this.ZS=new q(this,this.ss),this.ZS.Ra(!1));this.Pv==null&&(this.Pv=new D,this.Pv.set("width","100%"),this.Pv.set("height","100%"),this.Pv.set("toolTipDisabled",!0),this.Pv.set("interactionEnabled",!1),this.mb(this.Pv),
this.Pv.wa().uk(this.GV.cc()));this.ej==null&&(this.ej=new l,this.mb(this.ej));this.ve==null&&(this.ve=new f,this.ve.bind(k.V,this.eja,this,!0),this.mb(this.ve),this.eW())};B.prototype.b8=function(){if(this.SHa)return this.SHa;if(H){var G=H;H=null}else G=new v.Yua;g.ba(this,"vrGazePointerHideTime vrFoveation vrPointerColor vrPointerDistance vrPointerOverColor vrPointerSelectionColor vrPointerSelectionTime".split(" "),function(){G.XKa=this.get("vrGazePointerHideTime");G.TKa=this.get("vrFoveation");
G.Q9=this.get("vrPointerColor");G.KPa=this.get("vrPointerDistance");G.tqa=this.get("vrPointerOverColor");G.S9=this.get("vrPointerSelectionColor");G.OPa=this.get("vrPointerSelectionTime")}.bind(this),!0);return this.SHa=G};B.prototype.Afb=function(){return this.ve};B.prototype.Fc=function(){this.fj||(E?(this.fj=E,E=null):this.fj=new p(this.get("aaEnabled")));return this.fj};B.prototype.Lk=function(){A.prototype.Lk.call(this);for(var G=[],N=this.WU.length-1;N>=0;N--)G.push(this.WU[N].j);this.Pv&&G.push(this.Pv);
this.ss&&G.push(this.ss);this.ve&&G.push(this.ve);this.ej&&G.push(this.ej);var O=this.Cb();G=G.filter(function(R){return O.indexOf(R)>=0});O=O.filter(function(R){return G.indexOf(R)==-1}).concat(G);O.forEach(function(R,Q){R&&this.moa(R)!=Q&&this.rr(R,Q)}.bind(this))};B.prototype.jb=function(){this.S("externalProgressBar")&&((this.b1=this.G("externalProgressBar"))?this.removeChild(this.ej):this.mb(this.ej),this.$("externalProgressBar"),B.uva.forEach(N=>{this.yD(N)}));this.Pc(B.OWa,B.mva,[this.ej],
!0,!0);var G=[this.ej];this.b1&&G.push(this.b1);this.Pc(B.uva,B.vva,G,!0,!0);this.S("externalPlaybackBar")&&(this.bv&&this.bv.h(k.V,this.eja,this,!0),(this.bv=this.G("externalPlaybackBar"))?this.removeChild(this.ve):this.mb(this.ve),this.eW(),this.bv&&this.bv.bind(k.V,this.eja,this,!0),this.$("externalPlaybackBar"),B.rva.forEach(N=>{this.yD(N)}));this.Pc(B.NWa,B.lva,[this.ve],!0,!0);G=[this.ve];this.bv&&G.push(this.bv);this.Pc(B.rva,B.sva,G,!0,!0);A.prototype.jb.call(this)};B.prototype.obb=function(){this.hja&&
(this.hja=!1,this.GL.set("state",this.Jj==e.$b?z.Fb:z.Ee),this.HL.set("state",this.Jj==e.PLAYING||this.Jj==e.$b?z.Fb:z.Ee),this.yG.set("state",this.Jj==e.PLAYING?z.Fb:z.Ee),this.JL.set("state",this.Jj==e.ca?z.Fb:z.Ee))};B.prototype.Jd=function(G){this.Jj=G;this.set("playbackState",G)};B.prototype.O3=function(){B.cp(this)};B.prototype.Y5a=function(){B.ap(this)};B.prototype.WH=function(){this.Jj==e.$b?this.tn():this.tv()};B.prototype.XH=function(){this.tn()};B.prototype.A5a=function(){this.Jj==e.PLAYING?
this.tv():this.tn()};B.prototype.cD=function(){this.Zs()};B.prototype.bD=function(){this.Zs();this.tn()};B.prototype.X5a=function(){if(!this.Gl||!this.Gl.nna())switch(this.get("doubleClickAction")){case "toggle_fullscreen":var G=this.Xb().lk;G&&G.ol()&&G.toggle()}};B.prototype.Z5a=function(G){this.WU.forEach(function(N){this.D5.remove(N)}.bind(this));this.WU=G.data.players;this.WU.forEach(function(N){this.D5.add(N)}.bind(this));this.Bf()};B.prototype.tn=function(){this.zo&&this.zo.play()};B.prototype.tv=
function(){this.zo&&this.zo.pause()};B.prototype.Zs=function(){this.zo&&this.zo.stop()};B.prototype.E5a=function(G){this.EEa(G.data.player)};B.prototype.D5a=function(G){this.Gl==G.data.player&&this.EEa(null)};B.prototype.uCa=function(){B.tr(this)};B.prototype.a6a=function(){this.So=!0;this.eW()};B.prototype.$5a=function(){this.So=!1;this.eW()};B.prototype.eW=function(){this.ve&&this.ve.set("visible",this.get("playbackBarVisible")&&(this.So||!this.get("playbackBarRollOverDisplay")||u.Jp()))};B.prototype.EEa=
function(G){this.Gl!=G&&(this.set("playbackBarVisible",!1),this.Gl&&this.Gl.tr(!1),this.zo&&this.zo.h(k.L("state"),this.Mca,this),this.H6a=this.Gl,(this.Gl=G)&&this.Gl.tr(!!this.Ro),(this.zo=this.Gl&&this.Gl.eZa?this.Gl:null)&&this.zo.bind(k.L("state"),this.Mca,this,!0),this.Mca())};B.prototype.tr=function(G){this.Ro=G;this.set("isKeyboardTarget",G);this.Gl&&this.Gl.tr(!!this.Ro)};B.prototype.xob=function(){return!this.H6a};B.prototype.Mca=function(){this.zo?this.Jd(this.zo.get("state")):this.Jd(e.ca)};
B.prototype.eja=function(){var G=(this.bv?this.bv:this.ve).get("position");this.o(new b(B.Cba,{position:G}))};B.prototype.PX=function(G){return this.uL.size==1&&this.uL.has(G)};B.prototype.Qma=function(G){this.uL.add(G)};B.prototype.release=function(G){this.uL["delete"](G);this.TGa()};B.prototype.Tsa=function(G,N){this.vL.push({Fqa:G,Hn:N});this.TGa()};B.prototype.TGa=function(){if(this.uL.size==1&&this.vL.length>0)for(var G=this.uL.values().next().value,N=0;N<this.vL.length;N++)if(this.vL[N].Fqa==
G){var O=this.vL[N].Hn;this.vL.splice(N,1);O();N--}};B.mva={progressBackgroundColor:"backgroundColor",progressBackgroundColorDirection:"backgroundColorDirection",progressBackgroundColorRatios:"backgroundColorRatios",progressBackgroundOpacity:"backgroundOpacity",progressBackgroundBlur:"backgroundBlur",progressBarBackgroundColor:"barBackgroundColor",progressBarBackgroundColorDirection:"barBackgroundColorDirection",progressBarBackgroundColorRatios:"barBackgroundColorRatios",progressBarBorderColor:"barBorderColor",
progressBarBorderRadius:"barBorderRadius",progressBarBorderSize:"barBorderSize",progressBarOpacity:"barOpacity",progressBorderColor:"borderColor",progressBorderRadius:"borderRadius",progressBorderSize:"borderSize",progressHeight:"height",progressOpacity:"opacity",progressBottom:"bottom",progressLeft:"left",progressRight:"right"};B.OWa=Object.keys(B.mva);B.vva={progressPercent:"percent",progressVisible:"visible"};B.uva=Object.keys(B.vva);B.lva={playbackBarBackgroundColor:"backgroundColor",playbackBarBackgroundColorDirection:"backgroundColorDirection",
playbackBarBackgroundOpacity:"backgroundOpacity",playbackBarBackgroundBlur:"backgroundBlur",playbackBarBorderColor:"borderColor",playbackBarBorderRadius:"borderRadius",playbackBarBorderSize:"borderSize",playbackBarBottom:"bottom",playbackBarHeight:"height",playbackBarWidth:"width",playbackBarLeft:"left",playbackBarOpacity:"opacity",playbackBarRight:"right",playbackBarLiveDragging:"liveDragging",playbackBarProgressBackgroundColor:"barBackgroundColor",playbackBarProgressBackgroundColorDirection:"barBackgroundColorDirection",
playbackBarProgressBackgroundColorRatios:"barBackgroundColorRatios",playbackBarProgressBorderColor:"barBorderColor",playbackBarProgressBorderRadius:"barBorderRadius",playbackBarProgressBorderSize:"barBorderSize",playbackBarProgressOpacity:"barOpacity",playbackBarHeadBackgroundColor:"playheadBackgroundColor",playbackBarHeadBackgroundColorDirection:"playheadBackgroundColorDirection",playbackBarHeadBackgroundColorRatios:"playheadBackgroundColorRatios",playbackBarHeadBorderColor:"playheadBorderColor",
playbackBarHeadBorderRadius:"playheadBorderRadius",playbackBarHeadBorderSize:"playheadBorderSize",playbackBarHeadOpacity:"playheadOpacity",playbackBarHeadWidth:"playheadWidth",playbackBarHeadHeight:"playheadHeight",playbackBarHeadShadow:"playheadShadow",playbackBarHeadShadowBlurRadius:"playheadShadowBlurRadius",playbackBarHeadShadowColor:"playheadShadowColor",playbackBarHeadShadowHorizontalLength:"playheadShadowHorizontalLength",playbackBarHeadShadowOpacity:"playheadShadowOpacity",playbackBarHeadShadowSpread:"playheadShadowSpread",
playbackBarHeadShadowVerticalLength:"playheadShadowVerticalLength",playbackBarStepBackgroundColor:"stepBackgroundColor",playbackBarStepBackgroundColorDirection:"stepBackgroundColorDirection",playbackBarStepBackgroundColorRatios:"stepBackgroundColorRatios",playbackBarStepBorderColor:"stepBorderColor",playbackBarStepBorderRadius:"stepBorderRadius",playbackBarStepBorderSize:"stepBorderSize",playbackBarStepOpacity:"stepOpacity",playbackBarStepWidth:"stepWidth",playbackBarStepHeight:"stepHeight",playbackBarStepShadow:"stepShadow",
playbackBarStepShadowBlurRadius:"stepShadowBlurRadius",playbackBarStepShadowColor:"stepShadowColor",playbackBarStepShadowHorizontalLength:"stepShadowHorizontalLength",playbackBarStepShadowOpacity:"stepShadowOpacity",playbackBarStepShadowSpread:"stepShadowSpread",playbackBarStepShadowVerticalLength:"stepShadowVerticalLength",playbackBarSelectedStepBackgroundColor:"selectedStepBackgroundColor",playbackBarSelectedStepBackgroundColorDirection:"selectedStepBackgroundColorDirection",playbackBarSelectedStepBackgroundColorRatios:"selectedStepBackgroundColorRatios",
playbackBarSelectedStepBorderColor:"selectedStepBorderColor",playbackBarSelectedStepBorderRadius:"selectedStepBorderRadius",playbackBarSelectedStepBorderSize:"selectedStepBorderSize",playbackBarSelectedStepOpacity:"selectedStepOpacity",playbackBarSelectedStepWidth:"selectedStepWidth",playbackBarSelectedStepHeight:"selectedStepHeight",playbackBarSelectedStepShadow:"selectedStepShadow",playbackBarSelectedStepShadowBlurRadius:"selectedStepShadowBlurRadius",playbackBarSelectedStepShadowColor:"selectedStepShadowColor",
playbackBarSelectedStepShadowHorizontalLength:"selectedStepShadowHorizontalLength",playbackBarSelectedStepShadowOpacity:"selectedStepShadowOpacity",playbackBarSelectedStepShadowSpread:"selectedStepShadowSpread",playbackBarSelectedStepShadowVerticalLength:"selectedStepShadowVerticalLength"};B.NWa=Object.keys(B.lva);B.sva={playbackBarDuration:"duration",playbackBarPosition:"position",playbackBarSteps:"steps",playbackBarSelectedStep:"selectedStep",playbackBarVisible:"visible"};B.rva=Object.keys(B.sva);
B.A_="requestByPlayer";B.qua="playerShow";B.pua="playerHide";B.Cba="playbackBarPositionChange";B.Kba="viewModeChange";B.CH=null;B.tr=function(G){B.CH!=G&&(B.CH&&B.CH.tr(!1),B.CH=G,B.CH&&B.CH.tr(!0))};B.UI=[];B.cp=function(G){var N=B.UI.indexOf(G);N>-1&&B.UI.splice(N,1);B.UI.push(G);this.tr(this.iza())};B.ap=function(G){var N=B.UI.indexOf(G);N>-1&&B.UI.splice(N,1);B.CH==G&&B.tr(B.UI.length?this.iza():null)};B.iza=function(){var G=B.UI.slice();G.sort(function(N,O){var R=N.get("actualWidth")*N.get("actualHeight"),
Q=O.get("actualWidth")*O.get("actualHeight");N=G.indexOf(N)-G.indexOf(O);return R-Q||N});return G[G.length-1]};var H=null,E=null;navigator.xr&&navigator.xr.addEventListener("sessiongranted",function(){m()});return B});
define("tdv/player/script/MediaPlayer",["require","tdv/utils","tdv/binding/Bindable","tdv/events/Event","tdv/player/script/ViewerArea"],function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable"),n=a("tdv/events/Event"),g=a("tdv/player/script/ViewerArea"),k=m.extend(h,function(e){h.call(this);this.eZa=e;this.sV=this.UC=null});k.di="mediaShow";k.oo="mediaHide";k.prototype.tr=function(){};k.prototype.nna=function(){return!1};k.prototype.pV=function(e){this.UC!=e&&(this.UC&&this.Gla(this.UC),(this.UC=
e)&&this.rda(this.UC))};k.prototype.rda=function(e){e.bind(g.A_,this.IHa,this,!0);e.bind(g.Cba,this.EU,this)};k.prototype.Gla=function(e){e.h(g.A_,this.IHa,this);e.h(g.Cba,this.EU,this)};k.prototype.hK=function(e){this.UC.o(new n(g.A_,{players:e||[this]}))};k.prototype.IHa=function(e){e.data.players.indexOf(this)<0&&this.TN()};k.prototype.EU=function(){};k.prototype.TN=function(){};k.prototype.oT=function(e){this.o(new n(k.di,{media:e}));this.sV=this.UC;this.sV.o(new n(g.qua,{player:this}))};k.prototype.nT=
function(e){this.o(new n(k.oo,{media:e}));this.sV&&(this.sV.o(new n(g.pua,{player:this})),this.sV=null)};return k});define("tdv/player/view/map/constants/MovementMode",["require"],function(){return{uF:"constrained",ZUa:"free_drag",Pob:"free_drag_and_rotation",kca:"sync_with_field_of_view"}});
define("tdv/player/view/map/control/camera/LimitsManager",["require","tdv/utils","tdv/player/view/map/constants/MovementMode","tdv/view/constants/ScaleMode"],function(a){function m(){this.Rd=!0;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.ti=n.uj;this.Zo=h.uF;this.Hha=this.Mha=1;this.tf=this.uf=this.Ao=this.Bo=100;this.op=m.iG}a("tdv/utils");var h=a("tdv/player/view/map/constants/MovementMode"),n=a("tdv/view/constants/ScaleMode");m.prototype.tMa=function(){return this.op!==m.iG};m.prototype.sMa=function(){return this.op&
m.rL?!0:!1};m.prototype.uMa=function(){return this.op&m.sL?!0:!1};m.prototype.vMa=function(){return this.op&m.lG?!0:!1};m.prototype.rMa=function(){return this.op&m.hG?!0:!1};m.prototype.getX=function(){this.sp();return this.ec};m.prototype.getY=function(){this.sp();return this.fc};m.prototype.zA=function(){this.sp();return this.kc};m.prototype.iP=function(){this.sp();return this.Ed};m.prototype.setConfiguration=function(g,k,e,b,c){this.uf=g;this.tf=k;this.ti=e;this.Mha=b;this.Hha=c;this.fc=this.ec=
.5;this.Ed=0;this.kc=b;this.Rd=!0};m.prototype.setPosition=function(g,k,e,b){this.ec=g;this.fc=k;this.Ed=e;this.kc=b;this.Rd=!0};m.prototype.eu=function(g){this.Zo=g;this.Rd=!0};m.prototype.setSize=function(g,k){this.Bo=g;this.Ao=k;this.Rd=!0};m.prototype.sp=function(){if(this.Rd){this.Rd=!1;var g=m.iG;this.kc>this.Hha?(this.kc=this.Hha,g|=m.RWa):this.kc<this.Mha&&(this.kc=this.Mha,g|=m.SWa);if(this.Zo==h.uF){switch(this.ti){case n.NONE:var k=this.uf;var e=this.tf;break;case n.Tp:k=this.Bo;e=this.tf*
this.Bo/this.uf;break;case n.Pk:k=this.uf*this.Ao/this.tf;e=this.Ao;break;case n.Kr:this.uf*this.Ao>this.tf*this.Bo?(k=this.uf*this.Ao/this.tf,e=this.Ao):(k=this.Bo,e=this.tf*this.Bo/this.uf);break;default:case n.uj:this.uf*this.Ao>this.tf*this.Bo?(k=this.Bo,e=this.tf*this.Bo/this.uf):(k=this.uf*this.Ao/this.tf,e=this.Ao)}k*=this.kc;e*=this.kc;var b=Math.min(.5*this.Bo/k,.5);k=Math.max(1-.5*this.Bo/k,.5);var c=Math.min(.5*this.Ao/e,.5);e=Math.max(1-.5*this.Ao/e,.5)}else b=0,k=1,c=0,e=1;this.ec<b?
(this.ec=b,g|=m.rL):this.ec>k&&(this.ec=k,g|=m.sL);this.fc<c?(this.fc=c,g|=m.lG):this.fc>e&&(this.fc=e,g|=m.hG);this.Zo!=h.uF&&this.Zo!=h.ZUa||this.Ed==0||(this.Ed=0,g|=m.XWa);this.op=g}};m.iG=0;m.rL=1;m.sL=2;m.lG=4;m.hG=8;m.SWa=16;m.RWa=32;m.XWa=64;return m});
define("tdv/player/view/map/control/camera/MovementManager",["require"],function(){function a(){this.$R=.1;this.K0=this.lea=this.oea=this.nea=this.vea=this.kea=this.tea=this.sea=this.vW=this.Pma=this.nG=this.Yca=this.tW=this.Mma=this.sW=this.Kma=0}a.prototype.o$=function(m){this.$R=m};a.prototype.ARa=function(m,h,n,g,k,e,b,c){this.Kma=m;this.Mma=h;this.Yca=n;this.Pma=g;this.sW+=k;this.tW+=e;this.nG+=b;this.vW+=c};a.prototype.Vf=function(){return this.sea!=0||this.tea!=0||this.kea!=0||this.vea!=0||
this.Kma!=0||this.Mma!=0||this.Yca!=0||this.Pma!=0||this.sW!=0||this.tW!=0||this.nG!=0||this.vW!=0};a.prototype.Nb=function(m){m=1E3/m;this.nea=this.X0(this.sea/m,this.Kma/m+this.sW,this.$R);this.oea=this.X0(this.tea/m,this.Mma/m+this.tW,this.$R);this.lea=this.X0(this.kea/m,this.Yca/m+this.nG,this.$R);this.K0=this.X0(this.vea/m,this.Pma/m+this.vW,this.$R);this.sea=this.nea*m;this.tea=this.oea*m;this.kea=this.lea*m;this.vea=this.K0*m;this.vW=this.nG=this.tW=this.sW=0};a.prototype.X0=function(m,h,n){return h==
0?this.bh(m,h,n):h};a.prototype.bh=function(m,h,n){m=(h-m)*(1-n);Math.abs(m)<.01&&(m=0);return h-m};return a});
define("tdv/player/view/map/control/camera/MouseManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher");a("tdv/view/constants/ScaleMode");var k=m.extend(g,function(){g.call(this);this.YR=7;this.Y2=this.Yga=!1;this.a3=void 0;this.Ed=0;this.kc=1;this.tf=this.uf=100;this.l2=1;this.nja=!0;this.oja=!1;
this.Kbb=!0;this.Oma=!1;this.Ab=null});k.prototype.VY=function(e){this.YR=e};k.prototype.Zc=function(e,b,c,d){this.Ed=e;this.kc=b;this.uf=c;this.tf=d};k.prototype.xlb=function(e){this.nja=e;this.d5(this.nja&&!!this.Ab)};k.prototype.bu=function(e){this.Ab!=e&&(this.d5(!1),this.Fka(!1),this.Jn(),this.Ab=e,this.d5(this.nja&&!!this.Ab),this.Fka(this.Kbb&&!!this.Ab))};k.prototype.Jn=function(){this.d5(!1);this.Fka(!1);this.Ab=null};k.prototype.d5=function(e){this.oja!=e&&((this.oja=e)?this.GYa():this.cab())};
k.prototype.Fka=function(e){this.Oma!=e&&((this.Oma=e)?this.JYa():this.eab())};k.prototype.GYa=function(){this.Ab.bind(h.Sa,this.te,this,!0);this.Ab.bind(h.gb,this.bl,this,!0);this.Ab.bind(h.$a,this.cl,this,!0)};k.prototype.cab=function(){this.Ab.h(h.Sa,this.te,this);this.Ab.h(h.gb,this.bl,this);this.Ab.h(h.$a,this.cl,this)};k.prototype.JYa=function(){this.Ab.bind(h.Qk,this.JH,this,!0);this.Ab.bind(h.ZK,this.bH,this,!0)};k.prototype.eab=function(){this.Ab.h(h.Qk,this.JH,this);this.Ab.h(h.ZK,this.bH,
this)};k.prototype.te=function(e){this.R9a(e)};k.prototype.bl=function(e){this.cHa(e)};k.prototype.cl=function(){this.efa()};k.prototype.JH=function(e){this.qma(e)};k.prototype.bH=function(e){this.rma(e)};k.prototype.R9a=function(e){this.Yga=!0;this.Y2=!1;this.a3=e;this.cHa(e)};k.prototype.cHa=function(e){if(this.Yga){var b=e.pageX-this.a3.pageX,c=e.pageY-this.a3.pageY;this.Y2||(Math.sqrt(b*b+c*c)>this.YR?this.Y2=!0:b=c=0);this.Y2&&(this.a3=e);e=this.Ed*Math.PI/180;this.o(new n(k.Hr,{xDelta:-((b*
Math.cos(e)+c*Math.sin(e))/this.uf),yDelta:-((c*Math.cos(e)-b*Math.sin(e))/this.tf)}))}};k.prototype.efa=function(){this.Yga=!1};k.prototype.rma=function(e){if(this.l2!=e.scale){this.efa();var b=this.l2;this.l2=e.scale;this.o(new n(k.Jr,{zoomDelta:this.kc*this.l2/b-this.kc}))}};k.prototype.qma=function(e){e.delta!=0&&(this.efa(),this.o(new n(k.Jr,{zoomDelta:this.kc*e.mA*.1})))};k.Hr="position change";k.Jr="zoom change";k.bpb="vieport navigation";k.apb="relative navigation";k.$ob="relative exponential navigation";
k.Zob="dragging";return k});define("tdv/player/view/map/control/constants/Movement",["require"],function(){return{eca:"rotateClockwise",fca:"rotateCounterClockwise",Nx:"zoomIn",Ox:"zoomOut",Fg:"stop"}});
define("tdv/player/view/map/control/camera/ManualCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode tdv/player/view/util/Device tdv/player/view/map/control/camera/MovementManager tdv/player/view/map/control/camera/MouseManager tdv/player/view/map/control/constants/Movement tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/constants/ScaleMode"),k=a("tdv/player/view/util/Device"),
e=a("tdv/player/view/map/control/camera/MovementManager"),b=a("tdv/player/view/map/control/camera/MouseManager"),c=a("tdv/player/view/map/control/constants/Movement");a("tdv/constants/EventName");var d=m.extend(n,function(f,l){n.call(this);this.j=f;this.va=l;this.hv=this.w4=this.ha=!1;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.tf=this.uf=100;this.ti=g.uF;this.Ac=new e;this.Hb=new b;k.Jp()?(this.Hb.VY(d.Ica),this.Ac.o$(d.Jca)):(this.Hb.VY(0),this.Ac.o$(1));this.Hb.bind(b.Hr,this.q5a,this,!0);this.Hb.bind(b.Jr,
this.ZC,this,!0)});d.prototype.clear=function(){this.Hb.h(b.Hr,this.rqb,this,!0);this.Hb.h(b.Jr,this.ZC,this,!0);this.Hb.Jn();this.j=this.va=this.Ac=this.Hb=null};d.prototype.xl=function(f){switch(f){case c.eca:this.md(0,0,+d.yca,0,0,0,0,0);break;case c.fca:this.md(0,0,-d.yca,0,0,0,0,0);break;case c.Nx:this.md(0,0,0,+d.fR,0,0,0,0);break;case c.Ox:this.md(0,0,0,-d.fR,0,0,0,0);break;case c.Fg:this.md(0,0,0,0,0,0,0,0)}};d.prototype.setPosition=function(f,l,p,q,r,t){this.ec=f;this.fc=l;this.Ed=p;this.kc=
q;this.uf=r;this.tf=t;this.Hb.Zc(this.Ed,this.kc,this.uf,this.tf)};d.prototype.Vf=function(){return this.ha&&this.Ac.Vf()};d.prototype.Nb=function(f){this.Ac.Nb(f);this.va.setPosition(this.ec+this.Ac.nea,this.fc+this.Ac.oea,this.Ed+this.Ac.lea,this.kc+this.Ac.K0);this.ec=this.va.getX();this.fc=this.va.getY();this.Ed=this.va.iP();this.kc=this.va.zA()};d.prototype.$Y=function(f){this.hv=f;this.Hb.xlb(!this.hv)};d.prototype.Ra=function(f){(this.ha=f)?this.Hb.bu(this.j.getParent()):this.Hb.Jn()};d.prototype.q5a=
function(f){this.md(0,0,0,0,f.data.xDelta,f.data.yDelta,0,0)};d.prototype.ZC=function(f){this.md(0,0,0,0,0,0,0,f.data.zoomDelta)};d.prototype.md=function(f,l,p,q,r,t,u,v){this.Ac.ARa(f,l,p,q,r,t,u,v);this.ij()};d.prototype.ij=function(){this.o(new h(d.Li))};d.Li="position change request";d.Ica=7;d.Jca=.2;d.fR=.5;d.yca=30;return d});
define("tdv/player/view/map/control/camera/SyncFovCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/Device tdv/player/view/map/control/camera/MovementManager tdv/player/view/map/control/camera/MouseManager tdv/player/view/map/control/constants/Movement tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/util/Ease"),
k=a("tdv/view/util/EaseDimension"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/map/control/camera/MovementManager"),c=a("tdv/player/view/map/control/camera/MouseManager"),d=a("tdv/player/view/map/control/constants/Movement");a("tdv/constants/EventName");var f=m.extend(n,function(l,p){n.call(this);this.j=l;this.va=p;this.ha=!1;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.tf=this.uf=100;this.la=null;this.Zea=!0;this.rd=null;this.U3=0;this.Rv=this.km=this.Oz=void 0;this.Ac=new b;this.Hb=new c;
e.Jp()?(this.Hb.VY(f.Ica),this.Ac.o$(f.Jca)):(this.Hb.VY(0),this.Ac.o$(1));this.Hb.bind(c.Jr,this.ZC,this,!0)});f.prototype.flb=function(l,p){this.uf=l;this.tf=p;this.eO()};f.prototype.iB=function(l){this.rd!=l&&(this.rd=l,this.U3=void 0,this.eO())};f.prototype.ur=function(l,p){this.rd==l&&(this.U3=p,this.eO())};f.prototype.eO=function(){if(this.rd&&this.U3!=void 0){var l=this.rd.get("x",0)/this.uf;var p=this.rd.get("y",0)/this.tf;var q=-(this.U3+this.rd.get("angle",0))}else q=p=l=void 0;this.Rv!=
q&&(this.Rv=q,this.ij());if(this.Oz!=l||this.km!=p)this.Oz=l,this.km=p,this.F3a(),this.ij()};f.prototype.F3a=function(){this.Zea=!0;this.ij()};f.prototype.HI=function(){if(this.Zea||this.la&&this.la.Ve())if(this.Zea=!1,this.la=null,this.Oz!=void 0&&this.km!=void 0&&this.Rv!=void 0){for(var l=this.Rv-this.Ed;l>180;)l-=360;for(;l<-180;)l+=360;this.ec!=this.Oz||this.fc!=this.km?this.la=new g("quad_in_out",[new k("x",this.ec,this.Oz,1),new k("y",this.fc,this.km,1),new k("angleDif",l,l,360)],500):this.Rv!=
this.Ed&&(this.la=new g("quad_in_out",[new k("x",this.ec,this.ec,1),new k("y",this.fc,this.fc,1),new k("angleDif",l,0,360)],500))}};f.prototype.clear=function(){this.Hb.h(c.Jr,this.ZC,this,!0);this.Hb.Jn();this.j=this.va=this.la=this.Ac=this.Hb=null};f.prototype.xl=function(l){switch(l){case d.Nx:this.md(+f.fR,0);break;case d.Ox:this.md(-f.fR,0);break;case d.Fg:this.md(0,0)}};f.prototype.setPosition=function(l,p,q,r,t,u){this.ec=l;this.fc=p;this.Ed=q;this.kc=r;this.Hb.Zc(this.Ed,this.kc,t,u)};f.prototype.Vf=
function(){return this.ha&&(this.la||this.Ac.Vf()||this.Oz!=void 0&&this.ec!=this.Oz||this.km!=void 0&&this.fc!=this.km||this.Rv!=void 0&&this.Ed!=this.Rv)?!0:!1};f.prototype.Nb=function(l){this.HI();this.la?(this.la.Nb(l),this.ec=this.la.ob("x"),this.fc=this.la.ob("y"),this.Ed=this.Rv-this.la.ob("angleDif")):(this.Oz!=void 0&&(this.ec=this.Oz),this.km!=void 0&&(this.fc=this.km),this.Rv!=void 0&&(this.Ed=this.Rv));this.Ac.Nb(l);this.va.setPosition(this.ec,this.fc,this.Ed,this.kc+this.Ac.K0);this.ec=
this.va.getX();this.fc=this.va.getY();this.Ed=this.va.iP();this.kc=this.va.zA()};f.prototype.Ra=function(l){(this.ha=l)?(this.Hb.bu(this.j.getParent()),this.eO()):this.Hb.Jn()};f.prototype.ZC=function(l){this.md(0,l.data.zoomDelta)};f.prototype.md=function(l,p){this.Ac.ARa(0,0,0,l,0,0,0,p);this.ij()};f.prototype.ij=function(){this.o(new h(f.Li))};f.Li="position change request";f.Ica=7;f.Jca=.2;f.fR=.5;f.yca=30;return f});
define("tdv/player/view/map/control/CameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/constants/MovementMode tdv/view/constants/ScaleMode tdv/player/view/map/control/camera/LimitsManager tdv/player/view/map/control/camera/ManualCameraController tdv/player/view/map/control/camera/SyncFovCameraController tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/map/constants/MovementMode"),
k=a("tdv/view/constants/ScaleMode"),e=a("tdv/player/view/map/control/camera/LimitsManager"),b=a("tdv/player/view/map/control/camera/ManualCameraController"),c=a("tdv/player/view/map/control/camera/SyncFovCameraController"),d=a("tdv/constants/EventName"),f=m.extend(n,function(l){n.call(this);this.j=l;this.j.bind(d.Rb,this.kd,this);this.Zo=g.uF;this.rd=null;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.ab=null;this.M4=this.L4=this.Zv=this.Yv=!1;this.pp=!0;this.ha=!1;this.va=new e;this.va.eu(this.Zo);
this.rc=new b(this.j,this.va);this.rc.bind(b.Li,this.Es,this,!0);this.Pj=new c(this.j,this.va);this.Pj.bind(c.Li,this.Es,this,!0);this.y4()});f.prototype.clear=function(){this.rc.h(b.Li,this.Es,this);this.rc.clear();this.rc=null;this.Pj.h(c.Li,this.Es,this);this.Pj.clear();this.ab=this.va=this.Pj=null;this.j.h(d.Rb,this.kd,this);this.j=null};f.prototype.stop=function(){this.He=this.ab=null;this.ha=!1;this.rc.Ra(!1);this.Pj.Ra(!1);this.Gz(0,0,0)};f.prototype.start=function(l){var p=l.ab,q=p.get("width",
100),r=p.get("height",100),t=p.get("scaleMode",k.uj),u=p.get("minimumZoomFactor",1),v=p.get("maximumZoomFactor",1),w=p.get("initialZoomFactor",1);this.ab=p;this.ha=!0;this.He=l.getItem();this.Gz(0,0,0);this.Pj.flb(q,r);this.va.setConfiguration(q,r,t,u,v);this.va.setPosition(.5,.5,0,w);this.j.qra(this.He,this.va.getX(),this.va.getY(),this.va.iP(),this.va.zA());this.y4()};f.prototype.xl=function(l){this.rc.xl(l);this.Pj.xl(l)};f.prototype.eu=function(l){this.Zo!=l&&(this.Zo=l,this.va.eu(l),this.y4())};
f.prototype.iB=function(l){this.rd!=l&&(this.rd=l,this.Pj.iB(l),this.y4())};f.prototype.$Y=function(l){this.rc&&this.rc.$Y(l)};f.prototype.ur=function(l,p,q,r){this.Pj.ur(l,p,q,r)};f.prototype.ZA=function(l){this.ha&&(this.Pj.Vf()?(this.Pj.Nb(l),this.wn(this.Pj.ec,this.Pj.fc,this.Pj.Ed,this.Pj.kc),this.bb()):this.rc.Vf()?(this.rc.Nb(l),this.wn(this.rc.ec,this.rc.fc,this.rc.Ed,this.rc.kc),this.bb()):this.Gz(0,0,0))};f.prototype.ze=function(){if(this.He){var l=this.j.P7(this.He),p=this.j.Q7(this.He),
q=this.j.O7(this.He),r=this.j.Dfb(this.He),t=this.j.N7(this.He),u=this.j.M7(this.He),v=l-this.ec,w=p-this.fc,x=r-this.kc;this.ec=l;this.fc=p;this.Ed=q;this.kc=r;this.Gz(v,w,x);this.Pj.setPosition(l,p,q,r,t,u);this.rc.setPosition(l,p,q,r,t,u)}};f.prototype.y4=function(){this.Zo==g.kca&&this.rd!=null&&this.rd.get("map")==this.ab?(this.rc.Ra(!1),this.Pj.Ra(!0)):(this.rc.Ra(!0),this.Pj.Ra(!1))};f.prototype.Es=function(){this.bb()};f.prototype.kd=function(){this.va.setSize(this.j.nb(),this.j.Mb());this.bb()};
f.prototype.bb=function(){this.o(new h(f.oc))};f.prototype.wn=function(l,p,q,r){this.j.qra(this.He,l,p,q,r)};f.prototype.Gz=function(l,p,q){l=!1;this.Zv!=q<0&&(this.Zv=!this.Zv,l=!0);this.Yv!=q>0&&(this.Yv=!this.Yv,l=!0);this.L4!=this.nG>0&&(this.L4=!this.L4,l=!0);this.M4!=this.nG<0&&(this.M4=!this.M4,l=!0);this.pp!=(q==0)&&(this.pp=!this.pp,l=!0);l&&this.o(new h(f.Dl,{rotatingClockwise:this.L4,rotatingCounterClockwise:this.M4,zoomingIn:this.Yv,zoomingOut:this.Zv,stopped:this.pp}))};f.oc="request frame";
f.Dl="movement change";return f});
define("tdv/player/view/map/control/DisplayController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode tdv/player/view/map/control/camera/LimitsManager".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/constants/ScaleMode"),k=a("tdv/player/view/map/control/camera/LimitsManager"),e=m.extend(n,function(b,c){n.call(this);this.P=b;this.j=c;this.va=new k;this.Ah=[];this.sb=e.wo;this.js=this.Vk=
this.Um=null;this.Rh=this.P.get("transitionDuration");this.Bn=void 0});e.prototype.eu=function(b){this.va.eu(b)};e.prototype.YW=function(b){b.RX()&&this.Oda();this.Ah.push(b);this.C3()};e.prototype.oe=function(){this.Oda();this.Ah.push(null);this.C3()};e.prototype.clear=function(){this.sb=e.wo;this.Oda();this.Y6a();this.Oja();this.j=null};e.prototype.ze=function(b){this.sb==e.wo||this.sb!=e.vo&&this.sb!=e.tL||(this.Bn+=b,b=Math.min(1,this.Bn/this.Rh),this.sb==e.vo?this.j.fB(this.js,b):this.j.fB(this.P0,
1-b),this.Bn<this.Rh?this.bb():this.sb==e.vo?this.yy():this.v0a())};e.prototype.C3=function(){if(this.sb==e.wo){for(;this.Ah.length>0&&this.MXa(this.Ah[0],this.Vk);)this.Ah.shift();this.Ah.length>0&&this.ay()}};e.prototype.MXa=function(b,c){return b==c||!!b&&!!c&&b.isEqual(c)};e.prototype.ay=function(){!this.Vk||this.Ah[0]&&!this.Ah[0].RX()||this.Vk.ab==(this.Ah[0]&&this.Ah[0].ab)||this.o(new h(e.yF,{map:this.Vk.ab}));this.P.get("transitionMode","blending")!="fade_out_fade_in"||!this.Vk||this.Ah[0]&&
!this.Ah[0].RX()?(this.js=(this.Um=this.Ah.shift())&&this.Um.getItem(),this.Um?this.$x():this.Vk&&this.by()):this.by()};e.prototype.$x=function(){this.iXa();this.Um.RX()&&this.U7a();this.Bn=0;this.sb=e.vo;this.bb()};e.prototype.yy=function(){this.Oja();this.Vk=this.Um;this.P0=this.js;this.js=this.Um=null;this.dM()};e.prototype.by=function(){this.Bn=0;this.sb=e.tL;this.bb()};e.prototype.v0a=function(){this.Oja();this.Vk=null;this.dM()};e.prototype.dM=function(){this.sb=e.wo;this.Vk&&this.Vk.RX()&&
this.o(new h(e.zF,{map:this.Vk.ab}));this.Ah.length==0?this.Vk?this.o(new h(e.oba,{level:this.Vk})):this.o(new h(e.$aa)):this.ay()};e.prototype.U7a=function(){var b=this.Um.ab;this.Um.zk();this.va.setConfiguration(b.get("width",100),b.get("height",100),b.get("scaleMode",g.uj),b.get("minimumZoomFactor",1),b.get("maximumZoomFactor",1));this.va.setPosition(.5,.5,0,b.get("initialZoomFactor",1));this.j.qra(this.js,this.va.getX(),this.va.getY(),this.va.iP(),this.va.zA())};e.prototype.bb=function(){this.o(new h(e.oc))};
e.prototype.Oda=function(){for(;this.Ah.length>0;){var b=this.Ah.shift();b&&this.j.ho(b.getItem())}};e.prototype.iXa=function(){this.Um&&(this.j.Zbb(this.js),this.j.Bcb(this.js),this.j.fB(this.js,0),this.o(new h(e.nba,{level:this.Um})))};e.prototype.Oja=function(){this.Vk&&(this.j.removeItem(this.P0),this.o(new h(e.k_,{level:this.Vk})),this.j.ho(this.P0),this.P0=this.Vk=null)};e.prototype.Y6a=function(){this.Um&&(this.j.removeItem(this.js),this.o(new h(e.k_,{level:this.Um})),this.j.ho(this.js),this.js=
this.Um=null)};e.wo="stopped";e.vo="blending";e.tL="disolving";e.oc="request frame";e.nba="level added";e.k_="level removed";e.oba="level fully displayed";e.$aa="all pending maps hidden";e.zF="map show";e.yF="map hide";return e});
define("tdv/player/view/map/control/Level",["require"],function(){function a(m,h){this.ab=m;this.lb=m.get("image");this.Qf=h;this.Sga=void 0}a.prototype.getItem=function(){switch(this.Qf){case a.y_:return this.ab.ILa();default:return this.ab.cr()}};a.prototype.zk=function(){switch(this.Qf){case a.y_:return this.ab.xJ();default:return this.ab.Ft()}};a.prototype.RX=function(){return this.Sga===void 0?this.getIndex()==0:this.Sga};a.prototype.Tkb=function(m){this.Sga=m};a.prototype.SX=function(){return this.Qf==
a.Gta};a.prototype.isEqual=function(m){return m&&this.ab==m.map&&this.Qf==m.type};a.prototype.getIndex=function(){return this.Qf==a.y_||this.ab.pP()?0:1};a.prototype.cLa=function(){return this.ab.pP()?2:1};a.y_="preload";a.Gta="load";return a});
define("tdv/player/view/map/control/LoadController","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/Level tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),k=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/map/control/Level"),b=a("tdv/player/view/util/Device"),c=m.extend(k,function(d){k.call(this);
this.j=d;this.Ah=[];this.QR=this.EH=this.Kh=null;this.xH=!1;this.m2=null;this.s3=m.nr(this.s3,this)});c.prototype.clear=function(){this.stop();this.j=null};c.prototype.FNa=function(d,f){if(this.m2!=d||f)this.stop(),this.ab=d,this.ab.Yjb(),h.KD(this.ab,"image.levels.url",this.s3),f=[],d.pP()&&b.ub()&&f.push(new e(d,e.y_)),f.push(new e(d,e.Gta)),f=f.filter(function(l){return l.getItem().rl()}),f.length&&(this.Ah=this.Ah.concat(f),this.C3())};c.prototype.s3=function(){this.reload()};c.prototype.reload=
function(){this.FNa(this.ab,!0)};c.prototype.stop=function(){h.da(this.ab,"image.levels.url",this.s3);this.m2=this.ab=null;this.Ah=[];this.JFa();this.xH&&(this.xH=!1,this.Dla(),this.j.ho(this.Kh.getItem()),this.Kh=null,this.o(new g(c.l_)))};c.prototype.C3=function(){this.xH||this.zha()};c.prototype.zha=function(){this.Ah.length>0?(this.Kh=this.Ah.shift(),this.xH||(this.xH=!0,this.o(new g(c.j_,{level:this.Kh,percent:0}))),this.AYa(),this.j.GA(this.Kh.getItem()),this.j.jsa(this.Kh.getItem())&&this.iia()):
this.xH&&(this.xH=!1,this.o(new g(c.l_)))};c.prototype.iia=function(){this.Dla();this.I9a();this.Kh=null;this.zha()};c.prototype.I9a=function(){this.JFa();this.EH=this.Kh;var d=this;this.QR=setTimeout(function(){d.QR=null;d.$4a()},500)};c.prototype.$4a=function(){var d=this.EH.ab;this.EH.Tkb(d!=this.m2);this.m2=d;this.o(new g(c.pba,{level:this.EH}));this.EH=null};c.prototype.JFa=function(){this.QR!=null&&(clearTimeout(this.QR),this.QR=null,this.j.ho(this.EH.getItem()),this.EH=null)};c.prototype.uBa=
function(){this.Dla();this.Kh=null;this.zha()};c.prototype.vBa=function(d){this.o(new g(c.j_,{level:this.Kh,percent:d.percent}))};c.prototype.AYa=function(){var d=this.Kh.getItem();d.bind(n.ia,this.iia,this);d.bind(n.$c,this.uBa,this);d.bind(n.xc,this.vBa,this)};c.prototype.Dla=function(){var d=this.Kh.getItem();d.h(n.ia,this.iia,this);d.h(n.$c,this.uBa,this);d.h(n.xc,this.vBa,this)};c.j_="level loading progress";c.pba="level loaded";c.l_="load stopped";return c});
define("tdv/player/view/map/control/overlays/Point",["require"],function(){function a(m,h){this.x=m;this.y=h}a.prototype.rotate=function(m){var h=Math.cos(m);m=Math.sin(m);var n=this.x*m+this.y*h;this.x=this.x*h-this.y*m;this.y=n;return this};a.prototype.translate=function(m,h){this.x+=m;this.y+=h;return this};a.prototype.scale=function(m,h){this.x*=m;this.y*=h;return this};return a});
define("tdv/view/images/ScalableImage",["require","tdv/view/constants/ScaleMode","tdv/view/constants/Alignment"],function(a){function m(g,k,e){this.gj=g;this.xFa=k;this.vFa=e;this.ti=h.GB;this.GC=n.$e;this.JD=n.$d}var h=a("tdv/view/constants/ScaleMode"),n=a("tdv/view/constants/Alignment");m.prototype.hQ=function(g){this.ti=g};m.prototype.fQ=function(g){this.GC=g};m.prototype.lQ=function(g){this.JD=g};m.prototype.WO=function(g,k,e){var b=this.xFa,c=this.vFa,d;switch(this.ti){case h.NONE:var f=d=1;
break;case h.uj:d=f=Math.min(k/b,e/c);break;case h.Kr:d=f=Math.max(k/b,e/c);break;case h.Tp:d=f=k/b;break;case h.Pk:d=f=e/c;break;default:d=k/b,f=e/c}var l=Math.min(this.xFa*d,k);d=Math.min(k/d,b);switch(this.GC){case n.fb:b=k=0;break;case n.Db:k-=l;b-=d;break;default:k=(k-l)*.5,b=(b-d)*.5}var p=Math.min(this.vFa*f,e);f=Math.min(e/f,c);switch(this.JD){case n.Tc:c=e=0;break;case n.Hc:e-=p;c-=f;break;default:e=(e-p)*.5,c=(c-f)*.5}g.drawImage(this.gj,Math.round(b),Math.round(c),Math.round(d+b-Math.round(b)),
Math.round(f+c-Math.round(c)),Math.round(k),Math.round(e),Math.round(l+k-Math.round(k)),Math.round(p+e-Math.round(e)))};return m});
define("tdv/player/view/map/control/overlays/HotspotMapOverlayMapController","require tdv/constants/EventName tdv/constants/Priority tdv/player/view/map/control/overlays/Point tdv/view/images/ImageLoader tdv/view/images/ScalableImage".split(" "),function(a){function m(b,c,d,f){this.j=b;this.ab=c;this.uf=this.ab.get("width");this.tf=this.ab.get("height");this.He=this.ab.cr();this.yza=d;this.mq=f;this.kH=null;if(this.mq){if(this.CN=this.yza.CN,this.Pa=this.mq.get("width"),this.Ha=this.mq.get("height"),
this.ec=this.mq.get("x",0),this.fc=this.mq.get("y",0),this.bia=this.mq.get("offsetX",0),this.cia=this.mq.get("offsetY",0),this.hb=this.mq.Ft())this.IC=new k(n.Jm),this.IC.load(this.hb.get("url")),this.IC.bind(h.ia,this.aCa,this)}else this.IC=null}var h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/map/control/overlays/Point"),k=a("tdv/view/images/ImageLoader"),e=a("tdv/view/images/ScalableImage");m.prototype.clear=function(){this.mq=this.yza=this.He=this.ab=this.j=
null;this.IC&&(this.IC.h(h.ia,this.aCa,this),this.IC.cancel(),this.IC=null);this.kH=null};m.prototype.vLa=function(b,c){this.zza=void 0;if(this.kH&&b!=void 0&&c!=void 0){var d=this.j.nb()*.5,f=this.j.Mb()*.5,l=this.j.O7(this.He)*Math.PI/180,p=this.j.N7(this.He),q=this.j.M7(this.He),r=this.j.P7(this.He),t=this.j.Q7(this.He);b=new g(b,c);b.translate(-d,-f);b.rotate(-l);b.scale(1/p,1/q);b.translate(r,t);b.scale(this.uf,this.tf);b.translate(-this.ec,-this.fc);this.CN||(b.rotate(l),b.scale(p/this.uf,q/
this.tf));b.translate(this.bia,this.cia);d=Math.round(b.x);f=Math.round(b.y);d>=0&&d<this.kH.width&&f>=0&&f<this.kH.height&&(d=(this.kH.width*f+d)*4,f=this.kH.data,this.zza=f[d+3]>0?"#"+this.yda(f[d+0])+this.yda(f[d+1])+this.yda(f[d+2]):"transparent")}return this.zza};m.prototype.aCa=function(){var b=new e(this.IC.yg(),this.hb.get("width"),this.hb.get("height"));b.hQ(this.mq.get("scaleMode"));b.fQ(this.mq.get("horizontalAlign"));b.lQ(this.mq.get("verticalAlign"));var c=document.createElement("canvas");
c.width=Math.round(this.Pa);c.height=Math.round(this.Ha);var d=c.getContext("2d");b.WO(d,c.width,c.height);this.kH=d.getImageData(0,0,c.width,c.height);c.width=c.height=0};m.prototype.yda=function(b){for(b=b.toString(16);b.length<2;)b="0"+b;return b};return m});
define("tdv/player/view/map/control/overlays/HotspotMapOverlayController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Color tdv/player/view/util/Device tdv/player/view/map/control/overlays/HotspotMapOverlayMapController tdv/view/constants/Cursor tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/util/Color"),
e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/map/control/overlays/HotspotMapOverlayMapController"),c=a("tdv/view/constants/Cursor"),d=a("tdv/view/util/Ease"),f=a("tdv/view/util/EaseDimension"),l=m.extend(g,function(p,q,r){g.call(this);this.j=p;this.ab=q;this.Cc=r;this.Ja=this.Cc.getItem();this.Us=this.Cc.MLa();this.Ws=this.Cc.RLa();this.Ry=this.So=void 0;this.P=this.j.getParent();this.P.bind(h.gb,this.tg,this);this.P.bind(h.Eb,this.YT,this);this.P.bind(h.Sa,this.uq,this);this.P.bind(h.$a,
this.hz,this);this.P.bind(h.ma,this.gz,this);r.bind(h.L("selected"),this.PCa,this);r.bind(h.L("enabled"),this.Bs,this);this.H2=new b(this.j,this.ab,this.Cc,this.Cc.get("map",null));this.J2=new b(this.j,this.ab,this.Cc,this.Cc.get("rollOverMap",this.Cc.get("map",null)));this.K2=new b(this.j,this.ab,this.Cc,this.Cc.get("selectedMap",this.Cc.get("rollOverMap",this.Cc.get("map",null))));this.H1=new b(this.j,this.ab,this.Cc,this.Cc.get("image",null));this.I1=new b(this.j,this.ab,this.Cc,this.Cc.get("rollOverImage",
this.Cc.get("image",null)));this.J1=new b(this.j,this.ab,this.Cc,this.Cc.get("selectedImage",this.Cc.get("rollOverImage",this.Cc.get("image",null))));this.Bd=this.Ad=void 0;this.bO=null;this.Ux=[];this.Ou=[];this.CR=[];this.Ri={};this.sAa=[];this.Ky=!1;this.tma=this.Cc.get("useHandCursor");this.la=null;this.SN=void 0;this.W4=this.J4=this.c2=0;p=this.Cc.get("areas",[]);for(q=0;q<p.length;q++){r=p[q];var t=r.get("mapColor");t&&(t=t.toLowerCase(),this.Ri[t]===void 0&&(this.Ri[t]=[],this.sAa.push(t)),
this.Ri[t].push(r))}this.Ja&&(this.j.x6(this.ab.cr(),this.Ja),this.j.fB(this.Ja,this.c2));this.Us&&(this.j.x6(this.ab.cr(),this.Us),this.j.fB(this.Us,this.J4));this.Ws&&(this.j.x6(this.ab.cr(),this.Ws),this.j.fB(this.Ws,this.W4));this.oV("none");this.Qla();this.TEa(!1);this.UEa(this.Cc.get("selected"))});l.prototype.clear=function(){this.P.h(h.gb,this.tg,this);this.P.h(h.Eb,this.YT,this);this.P.h(h.Sa,this.uq,this);this.P.h(h.$a,this.hz,this);this.P.h(h.ma,this.gz,this);this.P=null;this.H2&&this.H2.clear();
this.H2=null;this.J2&&this.J2.clear();this.J2=null;this.K2&&this.K2.clear();this.K2=null;this.H1&&this.H1.clear();this.H1=null;this.I1&&this.I1.clear();this.I1=null;this.J1&&this.J1.clear();this.J1=null;this.Ux=[];this.So=!1;this.Qla();this.Ou=[];this.CR=[];this.Ri={};this.OFa();this.iW();this.ab=this.j=null;this.Cc.h(h.L("selected"),this.PCa,this);this.Ws=this.Us=this.Ja=this.Cc=null};l.prototype.match=function(p){return this.Cc==p};l.prototype.ze=function(p){this.AM(!1);this.la&&(this.la.Nb(p),
this.c2=this.la.ob("itemAlpha"),this.J4=this.la.ob("rollOverItemAlpha"),this.W4=this.la.ob("selectedItemAlpha"),this.Ja&&this.j.fB(this.Ja,this.c2),this.Us&&this.j.fB(this.Us,this.J4),this.Ws&&this.j.fB(this.Ws,this.W4),this.la.Ve()?this.la=null:this.bb())};l.prototype.uq=function(p){this.Ad=p.x-this.P.u.Dd;this.Bd=p.y-this.P.u.ie;this.AM(!0);this.Ou=this.Ux.slice()};l.prototype.tg=function(p){this.Ad=p.x-this.P.u.Dd;this.Bd=p.y-this.P.u.ie;this.AM(!0)};l.prototype.hz=function(p){this.Ad=p.x-this.P.u.Dd;
this.Bd=p.y-this.P.u.ie;this.AM(!0);this.CR=m.intersection(this.Ou,this.Ux);this.Ou=[]};l.prototype.gz=function(){this.CR&&(this.ula(this.CR,"click"),this.CR=[])};l.prototype.YT=function(){this.Bd=this.Ad=void 0;this.AM(!0);this.Ou=this.Ux.slice()};l.prototype.PCa=function(){this.UEa(this.Cc.get("selected"))};l.prototype.Bs=function(){this.AM(!0);this.jh();this.bb()};l.prototype.AM=function(p){this.Oza=!0;p?this.aO():this.Y3a()||this.c$a()};l.prototype.c$a=function(){this.OFa();var p=this;this.bO=
setTimeout(function(){p.bO=null;p.aO()},200)};l.prototype.Y3a=function(){return this.bO?!0:!1};l.prototype.OFa=function(){this.bO&&(clearTimeout(this.bO),this.bO=null)};l.prototype.aO=function(){if(this.Oza){this.Oza=!1;var p=this.Ux,q=this.m1a();this.Ux=q;e.Jp()||(this.ula(m.difference(q,p),"rollOver"),this.TEa(q.length>0),this.ula(m.difference(p,q),"rollOut"),this.iW())}};l.prototype.iW=function(){for(var p="",q=0;q<this.Ux.length&&!p;q++){var r=this.Ux[q];r.get("toolTip")&&(p=r.get("toolTip"))}this.jc!=
p&&(this.jc&&this.j.ojb(this.jc),(this.jc=p)&&this.j.vjb(this.jc))};l.prototype.Qla=function(){var p=this.So&&(this.tma!==!1||this.Ux.some(q=>q.get("useHandCursor")===!0));this.Ky!=p&&((this.Ky=p)?this.j.Y9(c.qf):this.j.XP(c.qf))};l.prototype.m1a=function(){if(this.Cc.get("enabled")===!1)return[];var p=[],q=this.Ry?this.K2:this.So?this.J2:this.H2;q&&(q=q.vLa(this.Ad,this.Bd))&&(this.Ri.any&&(p=p.concat(this.Ri.any)),q=="transparent"&&this.Ri.transparent&&(p=p.concat(this.Ri.transparent)),q!="transparent"&&
(p=this.Ri[q]?p.concat(this.Ri[q]):p.concat(this.Ri[k.ikb(q,this.sAa)]||[]),this.Ri.image&&(p=p.concat(this.Ri.image))));if(q=this.Ry?this.J1:this.So?this.I1:this.H1)if(q=q.vLa(this.Ad,this.Bd))this.Ri.any&&(p=p.concat(this.Ri.any)),q=="transparent"&&this.Ri.transparent&&(p=p.concat(this.Ri.transparent)),q!="transparent"&&this.Ri.image&&(p=p.concat(this.Ri.image));q=[];for(var r=0;r<p.length;r++){var t=p[r];q.indexOf(t)<0&&q.push(t)}return q};l.prototype.ula=function(p,q){if(p)for(var r=0;r<p.length;r++)p[r].o(new n(q))};
l.prototype.ir=function(){return this.So};l.prototype.TEa=function(p){this.So!=p&&(this.So=p,this.o(new n(l.jba)),this.jh(),this.Qla(),this.bb())};l.prototype.UEa=function(p){this.Ry!=p&&(this.Ry=p,this.jh(),this.bb())};l.prototype.jh=function(){!this.So&&this.Cc.get("rollOverDisplay")==1||this.Cc.get("enabled")===!1?this.oV("none"):this.Ry?this.oV("selected"):this.So?this.oV("roll over"):this.oV("visible")};l.prototype.oV=function(p){if(this.SN!=p){this.SN=p;var q;if(["selected"].includes(this.SN)&&
this.Ws){var r=1;p=q=0}else["selected","roll over"].includes(this.SN)&&this.Us?(q=1,p=r=0):["selected","roll over","visible"].includes(this.SN)?(p=1,r=q=0):p=r=q=0;var t=this.c2,u=this.J4,v=this.W4,w=Math.max(200*Math.abs(p-t),200*Math.abs(q-u),200*Math.abs(r-v));this.la=new d(this.SN=="none"?"quad_out":"quad_in",[new f("itemAlpha",t,p),new f("rollOverItemAlpha",u,q),new f("selectedItemAlpha",v,r)],w)}};l.prototype.bb=function(){this.o(new n(l.oc))};l.oc="request frame";l.jba="is over update";return l});
define("tdv/player/view/map/renderer/item/FovOverlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Overlay"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Overlay");a=m.extend(h,function(n,g,k,e,b,c,d){h.call(this,h.Mua,n,g);this.v3a=k;this.w3a=e;this.i6a=b;this.j6a=c;this.ne=d;this.kW=[]});a.prototype.yA=function(){return this.ne};return a});
define("tdv/player/view/map/control/overlays/FovOverlayController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/overlays/Point tdv/player/view/map/renderer/item/FovOverlay".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/map/control/overlays/Point"),e=a("tdv/player/view/map/renderer/item/FovOverlay"),b=m.extend(g,function(c,
d,f){g.call(this);this.j=c;this.P=this.j.getParent();this.P.bind(h.Sa,this.uq,this,!0);this.P.bind(h.gb,this.tg,this,!0);this.P.bind(h.Qr,this.YT,this,!0);this.ab=d;this.uf=this.ab.get("width");this.tf=this.ab.get("height");this.P6a=Math.sqrt(this.uf*this.uf+this.tf*this.tf)*this.ab.get("fieldOfViewOverlayRadiusScale",1);this.He=this.ab.cr();this.rd=f;this.gN=this.rd.get("x",0);this.hN=this.rd.get("y",0);this.T3=this.rd.get("angle",0);this.Ja=this.v_a();this.hv=!1;this.Ga=0;this.kb=Math.PI*.5;this.te=
!1;this.Bd=this.Ad=void 0;this.j.x6(this.ab.cr(),this.Ja)});b.prototype.DRa=function(c,d){this.Ga=c+this.T3-90;this.kb=d;this.bb()};b.prototype.clear=function(){this.P.h(h.Sa,this.uq,this);this.P.h(h.gb,this.tg,this);this.P.h(h.Qr,this.YT,this);this.P=null;this.j.Djb(this.ab.cr(),this.Ja);this.Ja=this.rd=this.He=this.ab=this.j=null};b.prototype.ze=function(){this.j.Xkb(this.Ja,this.Ga,this.kb)};b.prototype.v_a=function(){return new e(this.gN,this.hN,this.ab.get("fieldOfViewOverlayInsideColor","#FFFFFF"),
this.ab.get("fieldOfViewOverlayInsideOpacity",0),this.ab.get("fieldOfViewOverlayOutsideColor","#000000"),this.ab.get("fieldOfViewOverlayOutsideOpacity",0),this.ab.get("fieldOfViewOverlayRadiusScale",1))};b.prototype.bb=function(){this.o(new n(b.oc))};b.prototype.Ula=function(){var c=!1;if(this.Ad!=void 0&&this.Bd!=void 0){var d=this.j.nb()*.5,f=this.j.Mb()*.5,l=this.j.O7(this.He)*Math.PI/180,p=this.j.N7(this.He),q=this.j.M7(this.He),r=this.j.P7(this.He),t=this.j.Q7(this.He);c=new k(this.Ad,this.Bd);
c.translate(-d,-f);c.rotate(-l);c.scale(1/p,1/q);c.translate(r,t);c.scale(this.uf,this.tf);c.translate(-this.gN,-this.hN);c.rotate(-this.Ga*Math.PI/180);d=Math.round(Math.atan2(c.y,c.x)*180/Math.PI);c=Math.round(Math.sqrt(c.x*c.x+c.y*c.y))<=this.P6a&&Math.abs(d)<this.kb*.5}this.hv!=c&&(this.hv=c,this.o(new n(b.Vba,{inFOV:this.hv})))};b.prototype.ehb=function(){return this.hv};b.prototype.uq=function(c){this.Ad=c.x;this.Bd=c.y;this.te=!0;this.Ula()};b.prototype.tg=function(c){this.te||(this.Ad=c.x,
this.Bd=c.y,this.Ula())};b.prototype.YT=function(){this.Bd=this.Ad=void 0;this.te=!1;this.Ula()};b.oc="request frame";b.Vba="mouse in fov change";return b});
define("tdv/player/view/map/control/OverlaysController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/script/HotspotMapOverlay tdv/player/view/map/control/overlays/HotspotMapOverlayController tdv/player/view/map/control/overlays/FovOverlayController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/script/HotspotMapOverlay"),k=a("tdv/player/view/map/control/overlays/HotspotMapOverlayController"),e=a("tdv/player/view/map/control/overlays/FovOverlayController"),
b=m.extend(n,function(c){n.call(this);this.j=c;this.jT=[];this.Ny=[];this.No=[];this.hp=this.rd=null});b.prototype.clear=function(){for(var c=0;c<this.Ny.length;c++)this.Ny[c].clear();for(c=0;c<this.No.length;c++)this.No[c].clear();this.j=this.jT=this.rd=this.No=this.Ny=null};b.prototype.YW=function(c){c.SX()&&this.uXa(c.ab)};b.prototype.Poa=function(c){c.SX()&&this.f7a(c.ab)};b.prototype.iB=function(c){this.rd!=c&&(this.rd&&this.Qja(this.rd.get("map")),this.rd=c,this.hp=null,this.rd&&(c=this.rd.get("map"),
this.Vga(c)&&this.Fva(c)))};b.prototype.ur=function(c,d,f,l){this.hp={yaw:d,pitch:f,hfov:l};for(f=0;f<this.No.length;f++){var p=this.No[f];if(p.rd==c){p.DRa(d,l);break}}};b.prototype.uXa=function(c){this.Vga(c)&&(this.$Da(c),this.Qja(c));this.jT.push(c);this.mXa(c);this.Fva(c)};b.prototype.f7a=function(c){var d=this.jT.indexOf(c);d>=0&&this.jT.splice(d,1);this.Vga(c)||(this.$Da(c),this.Qja(c))};b.prototype.Vga=function(c){return this.jT.includes(c)};b.prototype.ze=function(c){for(var d=0;d<this.Ny.length;d++)this.Ny[d].ze(c);
for(d=0;d<this.No.length;d++)this.No[d].ze(c)};b.prototype.mXa=function(c){for(var d=c.get("overlays",[]),f=0;f<d.length;f++){var l=d[f];l instanceof g&&(l=new k(this.j,c,l),l.bind(k.oc,this.bb,this,!0),l.bind(k.jba,this.Xza,this,!0),this.Ny.push(l))}};b.prototype.Fva=function(c){this.rd&&this.rd.get("map")==c&&this.rd.get("visible")!==!1&&(c=new e(this.j,c,this.rd),c.bind(e.oc,this.bb,this,!0),c.bind(e.Vba,this.n3,this,!0),this.No.push(c),this.hp&&c.DRa(this.hp.yaw,this.hp.hfov));this.n3()};b.prototype.$Da=
function(c){c=c.get("overlays",[]);for(var d=0;d<c.length;d++)for(var f=c[d],l=0;l<this.Ny.length;l++){var p=this.Ny[l];if(p.match(f)){p.h(k.oc,this.bb,this);p.h(k.jba,this.Xza,this);p.clear();this.Ny.splice(l,1);break}}};b.prototype.Qja=function(c){for(var d=0;d<this.No.length;d++){var f=this.No[d];if(f.ab==c){f.h(e.oc,this.bb,this);f.h(e.Vba,this.n3,this);f.clear();this.No.splice(d,1);break}}this.n3()};b.prototype.Xza=function(){};b.prototype.bb=function(){this.o(new h(b.oc))};b.prototype.n3=function(){for(var c=
!1,d=0;d<this.No.length;d++)this.No[d].ehb()&&(c=!0);this.o(new h(b.iba,{inFOV:c}))};b.oc="request frame";b.iba="in fov change";return b});
define("tdv/player/view/map/control/PanoramaRotationController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/constants/MovementMode tdv/player/view/map/control/overlays/Point".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/map/constants/MovementMode"),e=a("tdv/player/view/map/control/overlays/Point"),b=m.extend(g,function(c){g.call(this);
this.j=c;this.P=this.j.getParent();this.P.bind(h.gb,this.tg,this,!0);this.P.bind(h.Sa,this.uq,this,!0);this.P.bind(h.$a,this.hz,this,!0);this.ab=null;this.He=this.tf=this.uf=void 0;this.rd=null;this.T3=this.hN=this.gN=void 0;this.hv=!1;this.Bd=this.Ad=this.Zo=void 0;this.te=!1;this.Ga=0});b.prototype.clear=function(){this.P.h(h.gb,this.tg,this);this.P.h(h.Sa,this.uq,this);this.P.h(h.$a,this.hz,this);this.j=this.rd=this.He=this.ab=this.P=null};b.prototype.$Y=function(c){this.hv=c;this.Mla()};b.prototype.YW=
function(c){c.SX()&&this.XEa(c.ab)};b.prototype.Poa=function(c){c.SX()&&this.ab==c.ab&&this.XEa(null)};b.prototype.XEa=function(c){this.ab!=c&&((this.ab=c)?(this.uf=this.ab.get("width"),this.tf=this.ab.get("height"),this.He=this.ab.cr()):(this.tf=this.uf=void 0,this.He=null))};b.prototype.iB=function(c){this.rd!=c&&((this.rd=c)?(this.gN=this.rd.get("x",0),this.hN=this.rd.get("y",0),this.T3=this.rd.get("angle",0)):this.T3=this.hN=this.gN=void 0)};b.prototype.ur=function(c,d){this.rd==c&&(this.Ga=d)};
b.prototype.eu=function(c){this.Zo=c};b.prototype.uq=function(c){this.Ad=c.x;this.Bd=c.y;this.te=!0;this.Mla()};b.prototype.tg=function(c){this.Ad=c.x;this.Bd=c.y;this.zj&&(c=this.Xya(),this.o(new n(b.tj,{yawDelta:c-this.Ed})),this.Ed=c)};b.prototype.hz=function(c){this.Ad=c.x;this.Bd=c.y;this.te=!1;this.Mla()};b.prototype.Mla=function(){var c=this.te&&this.rd&&this.ab&&(this.Zo==k.kca||this.hv);this.zj!=c&&(this.zj=c)&&(this.Ed=this.Xya())};b.prototype.Xya=function(){var c=this.j.nb()*.5,d=this.j.Mb()*
.5,f=new e(this.Ad,this.Bd);f.translate(-c,-d);if(this.Zo==k.kca)return-Math.atan2(f.y,f.x)*180/Math.PI;c=this.j.O7(this.He)*Math.PI/180;d=this.j.N7(this.He);var l=this.j.M7(this.He),p=this.j.P7(this.He),q=this.j.Q7(this.He);f.rotate(-c);f.scale(1/d,1/l);f.translate(p,q);f.scale(this.uf,this.tf);f.translate(-this.gN,-this.hN);return Math.atan2(f.y,f.x)*180/Math.PI};b.tj="request yaw change";return b});
define("tdv/player/view/map/control/RenderingController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher","tdv/view/util/Animation"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/util/Animation"),k=m.extend(n,function(e){n.call(this);this.ha=!0;this.yfa=!1;this.j=e});k.prototype.clear=function(){this.ha=!1;this.j=null};k.prototype.requestFrame=function(){this.yfa||(this.yfa=!0,g.requestFrame(this.sq,this))};k.prototype.sq=
function(e){this.ha&&(this.yfa=!1,this.o(new h(k.KF,{frameTime:e})),this.o(new h(k.LF,{frameTime:e})),this.j.render())};k.KF="frameStart";k.LF="positionSet";return k});
define("tdv/player/view/map/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/CameraController tdv/player/view/map/control/DisplayController tdv/player/view/map/control/LoadController tdv/player/view/map/control/OverlaysController tdv/player/view/map/control/PanoramaRotationController tdv/player/view/map/control/RenderingController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),
g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/map/control/CameraController"),e=a("tdv/player/view/map/control/DisplayController"),b=a("tdv/player/view/map/control/LoadController"),c=a("tdv/player/view/map/control/OverlaysController"),d=a("tdv/player/view/map/control/PanoramaRotationController"),f=a("tdv/player/view/map/control/RenderingController"),l=m.extend(g,function(p,q){g.call(this);this.P=p;this.j=q;this.j.set("visible",!1);this.Z3=null;this.gm=new f(this.j);this.Ge=new b(this.j);this.Ya=
new e(this.P,this.j);this.yb=new k(this.j);this.Ls=new c(this.j);this.sv=new d(this.j);this.P.bind(h.od,this.O3,this,!0);this.gm.bind(f.KF,this.jU,this,!0);this.gm.bind(f.LF,this.kU,this,!0);this.Ge.bind(b.l_,this.UT,this);this.Ge.bind(b.pba,this.QBa,this);this.Ge.bind(b.j_,this.RBa,this);this.Ya.bind(e.oc,this.cg,this,!0);this.Ya.bind(e.nba,this.OBa,this,!0);this.Ya.bind(e.k_,this.SBa,this,!0);this.Ya.bind(e.oba,this.PBa,this,!0);this.Ya.bind(e.yF,this.dz,this,!0);this.Ya.bind(e.zF,this.XC,this,
!0);this.Ya.bind(e.$aa,this.aBa,this,!0);this.yb.bind(k.oc,this.cg,this,!0);this.yb.bind(k.Dl,this.Cs,this);this.Ls.bind(c.oc,this.cg,this,!0);this.Ls.bind(c.iba,this.EBa,this,!0);this.sv.bind(d.tj,this.lU,this,!0);this.Wxa=!1});l.prototype.eu=function(p){this.yb.eu(p);this.Ya.eu(p);this.sv.eu(p)};l.prototype.clear=function(){this.Wxa=!0;this.Ge.clear();this.gm.clear();this.yb.clear();this.Ya.clear();this.Ls.clear();this.sv.clear();this.P.h(h.od,this.O3,this);this.Ge.h(b.l_,this.UT,this);this.Ge.h(b.pba,
this.QBa,this);this.Ge.h(b.j_,this.RBa,this);this.gm.h(f.KF,this.jU,this);this.gm.h(f.LF,this.kU,this);this.Ya.h(e.oc,this.cg,this);this.Ya.h(e.nba,this.OBa,this);this.Ya.h(e.k_,this.SBa,this);this.Ya.h(e.oba,this.PBa,this);this.Ya.h(e.yF,this.dz,this);this.Ya.h(e.zF,this.XC,this);this.Ya.h(e.$aa,this.aBa,this);this.yb.h(k.QUa,this.cg,this);this.yb.h(k.Dl,this.Cs,this);this.Ls.h(c.oc,this.cg,this);this.Ls.h(c.iba,this.EBa,this);this.sv.h(d.tj,this.lU,this);this.P=this.j=this.sv=this.Ls=this.Ya=this.yb=
this.gm=this.Ge=null};l.prototype.O3=function(){this.Z3&&(this.wRa(this.Z3),this.Z3=null)};l.prototype.wRa=function(p){this.j.set("visible",!0);this.P.Qy?this.Ge.FNa(p):(this.Ge.stop(),this.yb.stop(),this.Ya.oe(),this.Z3=p)};l.prototype.cB=function(){this.Ge.stop();this.yb.stop();this.Ya.oe()};l.prototype.xl=function(p){this.yb.xl(p)};l.prototype.iB=function(p){this.Wxa||(this.yb.iB(p),this.Ls.iB(p),this.sv.iB(p))};l.prototype.ur=function(p,q,r,t){this.yb.ur(p,q,r,t);this.Ls.ur(p,q,r,t);this.sv.ur(p,
q,r,t)};l.prototype.RBa=function(p){var q=p.data.level;p=(p.data.percent+100*q.getIndex())/q.cLa();this.o(new n(l.wx,{percent:p}))};l.prototype.QBa=function(p){this.j.set("visible",!0);p=p.data.level;this.yb.stop();this.Ya.YW(p)};l.prototype.UT=function(){this.o(new n(l.xF))};l.prototype.cg=function(){this.gm.requestFrame()};l.prototype.jU=function(p){this.yb.ZA(p.data.frameTime)};l.prototype.kU=function(p){p=p.data.frameTime;this.Ya.ze(p);this.yb.ze(p);this.Ls.ze(p)};l.prototype.OBa=function(p){p=
p.data.level;this.Ls.YW(p);this.sv.YW(p)};l.prototype.SBa=function(p){p=p.data.level;this.Ls.Poa(p);this.sv.Poa(p)};l.prototype.PBa=function(p){p=p.data.level;p.SX()&&this.yb.start(p)};l.prototype.aBa=function(){this.j.set("visible",!1)};l.prototype.EBa=function(p){p=p.data.inFOV;this.yb.$Y(p);this.sv.$Y(p)};l.prototype.XC=function(p){this.o(new n(l.zF,{map:p.data.map}))};l.prototype.dz=function(p){this.o(new n(l.yF,{map:p.data.map}))};l.prototype.Cs=function(p){this.o(new n(l.Dl,p.data))};l.prototype.lU=
function(p){this.o(new n(l.tj,{yawDelta:p.data.yawDelta}))};l.Dl="movementChange";l.xF="loadingEnd";l.wx="loadingProgress";l.zF="mapShow";l.yF="mapHide";l.tj="requestYawChange";return l});define("tdv/player/view/image/RepositoryEntry",["require","tdv/constants/Priority"],function(a){function m(){this.status=m.u_;this.progress=this.Hk=0;this.Cqa=[]}a("tdv/constants/Priority");m.LOADING="loading";m.ia="loaded";m.u_="not loaded";return m});
define("tdv/player/view/image/Repository",["require","tdv/utils","tdv/constants/EventName","tdv/view/images/ImageLoader","tdv/player/view/image/RepositoryEntry"],function(a){function m(){this.Yxa={};this.ni=[];this.SC=[];this.Sd={}}function h(b,c){c=b.indexOf(c);c>=0&&b.splice(c,1)}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/view/images/ImageLoader"),e=a("tdv/player/view/image/RepositoryEntry");m.prototype.jsa=function(b){b=b.eE();for(var c=0,d=b.length;c<d;c++)if(this.mS(b[c]).status!=
e.ia)return!1;return!0};m.prototype.GA=function(b,c){this.ni.push(b);this.pXa(b,c)};m.prototype.ho=function(b,c){var d=this.ni.indexOf(b);d<0&&n.log("Unloading item not loaded");this.ni.splice(d,1);this.c7a(b,c)};m.prototype.yg=function(b,c){return this.Sd[b].yg(c)};m.prototype.pXa=function(b,c){this.SC.push(b);b=b.eE();for(var d=0,f=b.length;d<f;d++){var l=b[d],p=this.mS(l);p.Hk++;p.Cqa.push(c);p.status==e.u_&&(p.status=e.LOADING,this.q4a(l,Math.min.apply(Math,p.Cqa)))}this.YGa()};m.prototype.c7a=
function(b,c){this.SC=this.SC.filter(r=>r!==b);for(var d=b.eE(),f=0,l=d.length;f<l;f++){var p=d[f],q=this.mS(p);q.Hk--;h(q.Cqa,c);q.Hk==0&&q.status!=e.u_&&(q.status=e.u_,q.progress=0,this.iab(p))}};m.prototype.YGa=function(b){b=(b==void 0?this.SC:this.Vya(b)).slice();for(var c=0;c<b.length;c++){for(var d=b[c],f=d.eE(),l=0,p=0,q=f.length,r=0;r<f.length;r++){var t=this.mS(f[r]);l+=t.progress;t.status==e.ia&&p++}d.elb(l/q);p==q&&(d.dZ(),this.SC=this.SC.filter(u=>u!==d))}};m.prototype.mS=function(b){var c=
this.Yxa[b];c||(this.Yxa[b]=c=new e);return c};m.prototype.Vya=function(b){for(var c=[],d=0;d<this.SC.length;d++){var f=this.SC[d];f.eE().includes(b)&&c.push(f)}return c};m.prototype.q4a=function(b,c){c=new k(c);this.Sd[b]=c;c.bind(g.ia,this.VT,this,!0);c.bind(g.$c,this.WT,this,!0);c.load(b)};m.prototype.iab=function(b){var c=this.Sd[b];delete this.Sd[b];c.h(g.ia,this.VT,this);c.h(g.$c,this.WT,this);c.cancel()};m.prototype.VT=function(b){b=b.source.rl();var c=this.mS(b);c.progress=100;c.status=e.ia;
this.YGa(b)};m.prototype.WT=function(b){b=b.source.rl();for(var c=this.Vya(b),d=0;d<c.length;d++){var f=c[d];this.ho(f);f.Dkb()}n.log("Error loading: "+b)};return m.instance=new m});
define("tdv/player/view/map/renderer/renderers/ItemRenderer",["require","tdv/player/view/util/Device"],function(a){function m(h,n){this.Ja=h;this.Ia=n;this.uha=0;this.Fv=this.Ev=.5;this.jl=0;this.Of=1;this.ct=this.Vy=this.Ha=this.Pa=0;this.ne=1;this.S1=this.U1=!0;this.ja=document.createElement("canvas");this.ga=this.ja.getContext("2d")}a=a("tdv/player/view/util/Device");m.prototype.getItem=function(){return this.Ja};m.prototype.cX=function(h){return this.Ja==h?this:null};m.prototype.t7=function(h){return this.Ja==
h?[this]:[]};m.prototype.yi=function(){this.Ia&&this.Ia.ina(this)};m.prototype.nf=function(h){this.Q8a(h)};m.prototype.VEa=function(h){this.uha!=h&&(this.uha=h,this.Ia&&this.Ia.t8())};m.prototype.Q8a=function(h){this.Of!=h&&(this.Of=h,this.s8())};m.prototype.e5=function(h){this.jl!=h&&(this.jl=h,this.s8())};m.prototype.nV=function(h,n){if(this.Pa!=h||this.Ha!=n)this.Pa=h,this.Ha=n,this.p8()};m.prototype.wn=function(h,n){if(this.Vy!=h||this.ct!=n)this.Vy=h,this.ct=n,this.s8()};m.prototype.s8=function(){this.Ia&&
this.Ia.q8()};m.prototype.Tf=function(){this.U1=!0};m.prototype.jb=function(){this.U1&&(this.U1=!1,this.Sh())};m.prototype.Sh=function(){};m.prototype.p8=function(){this.S1=!0;this.s8()};m.prototype.Lp=function(){if(this.S1){this.S1=!1;if(this.ja.width!=this.Pa||this.ja.height!=this.Ha)this.ja.width=Math.round(this.Pa),this.ja.height=Math.round(this.Ha);this.ga.clearRect(0,0,this.ja.width,this.ja.height);this.gh()}};m.prototype.gh=function(){};m.prototype.Aeb=function(h){if(this.Of>0&&this.Pa>=1&&
this.Ha>=1){h.save();var n=Math.round(this.Vy),g=Math.round(this.ct),k=Math.round(this.Pa*this.Ev),e=Math.round(this.Ha*this.Fv);h.scale(this.ne,this.ne);h.translate(n+k,g+e);h.rotate(this.jl*Math.PI/180);h.globalAlpha=this.Of;h.drawImage(this.ja,-k,-e);h.restore()}};m.prototype.B7=function(){this.ja.width=this.ja.height=1;this.U1=this.S1=!0};m.Hta=Math.min(window.devicePixelRatio||1,a.Nd()==a.uB?2:Infinity);m.ul=m.Hta;m.mVa=a.Nd()==a.vj?16E6:256E6;return m});
define("tdv/player/view/map/renderer/renderers/ItemContainerRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/ItemRenderer"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/renderers/ItemRenderer");a=m.extend(h,function(n,g){h.call(this,n,g);this.rf=[];this.v6=null;this.Nma=!0});a.prototype.aIa=function(n){n=this.dea(n);if(!n)throw"Container renderer can't create child renderer for an item";this.rf.push(n);this.t8();this.q8()};a.prototype.dea=function(){};
a.prototype.pQa=function(n){var g=this.kw(n);g&&(this.rf=this.rf.filter(k=>k!==g),this.t8(),this.q8())};a.prototype.cX=function(n){for(var g=h.prototype.cX.call(this,n),k=0;k<this.rf.length&&!g;k++)g=this.rf[k].cX(n);return g};a.prototype.t7=function(n){for(var g=h.prototype.t7.call(this,n),k=0;k<this.rf.length;k++)g=g.concat(this.rf[k].t7(n));return g};a.prototype.kw=function(n){for(var g=null,k=0;k<this.rf.length&&!g;k++)this.rf[k].getItem()==n&&(g=this.rf[k]);for(k=0;k<this.rf.length&&!g;k++)this.rf[k].getItem().Mgb(n)&&
(g=this.rf[k]);return g};a.prototype.ina=function(n){this.rf=this.rf.filter(g=>g!==n);this.rf.push(n);this.t8();this.q8()};a.prototype.t8=function(){this.Nma=!0;this.Tf()};a.prototype.q8=function(){this.p8()};a.prototype.jb=function(){h.prototype.jb.call(this);for(var n=0;n<this.rf.length;n++)this.rf[n].jb()};a.prototype.Sh=function(){if(this.Nma){this.Nma=!1;for(var n=[],g=0;g<this.rf.length;g++){var k=this.rf[g];n.push({l:k.uha,z:g,r:k})}n.sort(function(e,b){return e.l==b.l?e.z-b.z:e.l-b.l});this.v6=
[];for(g=0;g<n.length;g++)this.v6.push(n[g].r);this.p8()}h.prototype.Sh.call(this)};a.prototype.Lp=function(){for(var n=0;n<this.rf.length;n++)this.rf[n].Lp();h.prototype.Lp.call(this)};a.prototype.gh=function(){for(var n=0;n<this.v6.length;n++)this.v6[n].Aeb(this.ga);h.prototype.gh.call(this)};a.prototype.B7=function(){for(var n=0;n<this.rf.length;n++)this.rf[n].B7();h.prototype.B7.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/OverlayRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/ItemRenderer"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/renderers/ItemRenderer");a=m.extend(h,function(n,g){h.call(this,n,g)});a.prototype.w$=function(){};return a});
define("tdv/player/view/map/renderer/renderers/FovOverlayRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/OverlayRenderer","tdv/player/view/util/Device"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/renderers/OverlayRenderer"),n=a("tdv/player/view/util/Device");a=m.extend(h,function(g,k){h.call(this,g,k);this.Y3=this.Ia.getItem().hg();this.X3=this.Ia.getItem().xg();this.ne=2;this.O0=0;this.kb=Math.PI*.5;this.Pga=this.Qga=!0;this.cn=1;this.T1=!0;this.VEa(1)});
a.prototype.w$=function(g,k){this.cn!=k&&(this.cn=k,this.T1=!0,this.Tf())};a.prototype.jRa=function(g,k){this.kb!=k&&(this.kb=k,this.Qga=!0,this.Tf());this.O0!=g&&(this.O0=g,this.Pga=!0,this.Tf())};a.prototype.Sh=function(){this.Qga&&(this.Qga=!1,this.p8());if(this.T1||this.Pga){this.Pga=this.T1=!1;this.ne=Math.max(1,Math.ceil(Math.sqrt(this.Y3*this.Y3+this.X3*this.X3))/(n.Nd()==n.vj?1024:4096));var g=this.cn/this.ne,k=this.Ja.getX()*g,e=this.Ja.getY()*g,b=Math.max(k,g*this.Y3-k);g=Math.max(e,g*this.X3-
e);b=Math.ceil(Math.sqrt(b*b+g*g))*2;var c=this.O0*Math.PI/180;g=Math.cos(c);c=Math.sin(c);k=k-this.Ev*b-(.5-this.Ev)*b*g+(.5-this.Fv)*b*c;e=e-this.Fv*b-(.5-this.Fv)*b*g-(.5-this.Ev)*b*c;this.T1=!1;this.wn(k,e);this.nV(b,b);this.e5(this.O0)}h.prototype.Sh.call(this)};a.prototype.gh=function(){var g=this.Ja.w3a,k=this.Ja.j6a;if(k>0||g>0){var e=this.cn*this.Y3,b=this.cn*this.X3;e=Math.ceil(Math.sqrt(e*e+b*b))*this.Ja.yA()/this.ne;b=Math.round(this.Pa*.5);var c=Math.round(this.Ha*.5),d=this.kb*Math.PI/
180,f=-d*.5;d=f+d;k>0&&(this.ga.fillStyle=this.Ja.i6a,this.ga.globalAlpha=k,this.ga.rect(0,0,this.Pa,this.Ha),this.ga.fill(),this.ga.globalCompositeOperation="destination-out",this.ga.fillStyle="#FFFFFF",this.ga.globalAlpha=1,this.ga.beginPath(),this.ga.moveTo(b,c),this.ga.arc(b,c,e,f,d,!1),this.ga.lineTo(b,c),this.ga.closePath(),this.ga.fill(),this.ga.globalCompositeOperation="source-over");g>0&&(this.ga.fillStyle=this.Ja.v3a,this.ga.globalAlpha=g,this.ga.beginPath(),this.ga.moveTo(b,c),this.ga.arc(b,
c,e,f,d,!1),this.ga.lineTo(b,c),this.ga.closePath(),this.ga.fill())}h.prototype.gh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/ImageOverlayRenderer","require tdv/utils tdv/player/view/map/renderer/renderers/ItemRenderer tdv/player/view/map/renderer/renderers/OverlayRenderer tdv/player/view/image/Repository tdv/view/images/ScalableImage".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/renderers/ItemRenderer"),n=a("tdv/player/view/map/renderer/renderers/OverlayRenderer"),g=a("tdv/player/view/image/Repository"),k=a("tdv/view/images/ScalableImage");
a=m.extend(n,function(e,b){n.call(this,e,b);this.VEa(this.Ja.tEa?0:2);this.Id=g.yg(this.Ja.rl());this.P4=new k(this.Id,this.Id.width,this.Id.height);this.P4.hQ(this.Ja.ti);this.P4.lQ(this.Ja.mP());this.P4.fQ(this.Ja.kP());this.hT=0;this.cn=1;this.Eha=!0});a.prototype.w$=function(e,b){if(this.hT!=e||this.cn!=b)this.hT=e,this.cn=b,this.Eha=!0,this.Tf()};a.prototype.Sh=function(){if(this.Eha){this.Eha=!1;var e=this.Ja.getX(),b=this.Ja.getY(),c=this.Ja.hg(),d=this.Ja.xg(),f=this.Ja.DLa(),l=this.Ja.ELa();
if(this.Ja.tEa)this.e5(0),this.wn((e-f)*this.cn,(b-l)*this.cn),this.nV(c*this.cn,d*this.cn);else{c*=h.ul;d*=h.ul;f*=h.ul;l*=h.ul;var p=Math.cos(-this.hT*Math.PI/180),q=Math.sin(-this.hT*Math.PI/180);e=e*this.cn-this.Ev*c-(f-this.Ev*c)*p+(l-this.Fv*d)*q;b=b*this.cn-this.Fv*d-(l-this.Fv*d)*p-(f-this.Ev*c)*q;this.e5(-this.hT);this.wn(e,b);this.nV(c,d)}}n.prototype.Sh.call(this)};a.prototype.gh=function(){this.P4.WO(this.ga,this.ja.width,this.ja.height);n.prototype.gh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/MapRenderer","require tdv/utils tdv/view/constants/ScaleMode tdv/player/view/image/Repository tdv/player/view/map/renderer/item/Item tdv/player/view/map/renderer/item/Overlay tdv/player/view/map/renderer/renderers/FovOverlayRenderer tdv/player/view/map/renderer/renderers/ImageOverlayRenderer tdv/player/view/map/renderer/renderers/ItemContainerRenderer".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/view/constants/ScaleMode"),n=a("tdv/player/view/image/Repository"),
g=a("tdv/player/view/map/renderer/item/Item"),k=a("tdv/player/view/map/renderer/item/Overlay"),e=a("tdv/player/view/map/renderer/renderers/FovOverlayRenderer"),b=a("tdv/player/view/map/renderer/renderers/ImageOverlayRenderer"),c=a("tdv/player/view/map/renderer/renderers/ItemContainerRenderer");a=m.extend(c,function(d,f){c.call(this,d,f,d.xq);this.ji=this.Ja.hg();this.gk=this.Ja.xg();this.ti=this.Ja.ti;this.W0a=this.Ja.V0a;this.Ng=this.Og=100;this.Wda=!0;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.p4=
!0;this.Mj=1;this.Id=n.yg(this.Ja.rl())});a.prototype.dea=function(d){if(d.getType()!=g.Pua)throw"Invalid item type";switch(d.l6a){case k.Mua:d=new e(d,this);break;case k.Nua:d=new b(d,this);break;default:d=null}d&&d.w$(this.Ed,this.Mj*this.kc);return d};a.prototype.getX=function(){return this.ec};a.prototype.getY=function(){return this.fc};a.prototype.iP=function(){return this.Ed};a.prototype.zA=function(){return this.kc};a.prototype.nb=function(){return Math.round(this.ji*this.kc*this.Mj)};a.prototype.Mb=
function(){return Math.round(this.gk*this.kc*this.Mj)};a.prototype.l$=function(d,f){if(this.Og!=d||this.Ng!=f)this.Og=d,this.Ng=f,this.Wda=!0,this.Tf()};a.prototype.setPosition=function(d,f,l,p){if(this.ec!=d||this.fc!=f||this.Ed!=l||this.kc!=p)this.ec=d,this.fc=f,this.Ed=l,this.kc=p,this.p4=!0,this.Tf()};a.prototype.Sh=function(){if(this.Wda){this.Wda=!1;switch(this.ti){case h.NONE:this.Mj=1;break;case h.Tp:this.Mj=this.Og/this.ji;break;case h.Pk:this.Mj=this.Ng/this.gk;break;case h.Kr:this.Mj=this.ji*
this.Ng>this.gk*this.Og?this.Ng/this.gk:this.Og/this.ji;break;default:this.Mj=this.ji*this.Ng>this.gk*this.Og?this.Og/this.ji:this.Ng/this.gk}this.p4=!0}if(this.p4){this.p4=!1;var d=this.nb(),f=this.Mb(),l=Math.cos(this.Ed*Math.PI/180),p=Math.sin(this.Ed*Math.PI/180);this.wn(this.Og*.5-this.Ev*d+(this.Ev-this.ec)*l*d-(this.Fv-this.fc)*p*f,this.Ng*.5-this.Fv*f+(this.Fv-this.fc)*l*f+(this.Ev-this.ec)*p*d);this.e5(this.Ed);this.nV(d,f);for(d=0;d<this.rf.length;d++)this.rf[d].w$(this.Ed,this.Mj*this.kc)}c.prototype.Sh.call(this)};
a.prototype.gh=function(){var d=Math.round(this.Pa),f=Math.round(this.Ha);this.W0a?(this.ga.save(),this.ga.translate(d,0),this.ga.scale(-1,1),this.ga.drawImage(this.Id,0,0,d,f),this.ga.restore()):this.ga.drawImage(this.Id,0,0,d,f);c.prototype.gh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/MapsRenderer",["require","tdv/utils","tdv/player/view/map/renderer/item/Item","tdv/player/view/map/renderer/renderers/ItemContainerRenderer","tdv/player/view/map/renderer/renderers/MapRenderer"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Item"),n=a("tdv/player/view/map/renderer/renderers/ItemContainerRenderer"),g=a("tdv/player/view/map/renderer/renderers/MapRenderer");a=m.extend(n,function(){n.call(this,null,null);this.Jda=
!0});a.prototype.cc=function(){return this.ja};a.prototype.render=function(){this.jb();this.Lp()};a.prototype.Lfb=function(){for(var k=1,e=0;e<this.rf.length;e++){var b=this.rf[e];b=b.nb()*b.Mb();k<b&&(k=b)}return k};a.prototype.dea=function(k){if(k.getType()!=h.Oua)throw"Invalid item type";k=new g(k,this);k.l$(this.Pa,this.Ha);k.setPosition(.5,.5,0,1);return k};a.prototype.setSize=function(k,e){this.nV(k,e);this.Jda=!0;this.Tf()};a.prototype.Sh=function(){if(this.Jda){this.Jda=!1;for(var k=0;k<this.rf.length;k++)this.rf[k].l$(this.Pa,
this.Ha)}n.prototype.Sh.call(this)};return a});
define("tdv/player/view/map/renderer/Renderer","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/player/view/image/Repository tdv/player/view/map/renderer/renderers/ItemRenderer tdv/player/view/map/renderer/renderers/MapsRenderer tdv/player/view/util/XR tdv/view/constants/Cursor tdv/view/core/UIComponent".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/image/Repository"),k=a("tdv/player/view/map/renderer/renderers/ItemRenderer"),
e=a("tdv/player/view/map/renderer/renderers/MapsRenderer"),b=a("tdv/player/view/util/XR"),c=a("tdv/view/constants/Cursor"),d=a("tdv/view/core/UIComponent");a=m.extend(d,function(){d.call(this);this.gf("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",c.LB);this.xC=[];this.DI=[];this.jc="";this.oi=new e;this.bind(h.Rb,this.kd,this,!0);this.bind(h.od,this.cp,this,!0);this.bind(h.jd,this.ap,this,!0);b.M.bind(h.V,this.ema,this,!0);this.Xja=this.Wja=!1});a.prototype.Kb=function(){d.prototype.Kb.call(this);
var f=this.oi.cc();f.parentElement||this.wa().uk(f)};a.prototype.GA=function(f){g.GA(f,n.Jm)};a.prototype.jsa=function(f){return g.jsa(f)};a.prototype.ho=function(f){g.ho(f,n.Jm)};a.prototype.Zbb=function(f){this.oi.aIa(f)};a.prototype.removeItem=function(f){this.oi.pQa(f)};a.prototype.x6=function(f,l){this.oi.kw(f).aIa(l);this.bma()};a.prototype.Djb=function(f,l){(f=this.oi.kw(f))&&f.pQa(l)};a.prototype.Bcb=function(f){this.oi.cX(f).yi()};a.prototype.fB=function(f,l){this.oi.t7(f).forEach(function(p){p.nf(l)})};
a.prototype.qra=function(f,l,p,q,r){this.oi.kw(f).setPosition(l,p,q,r);this.bma()};a.prototype.bma=function(){var f=this.oi.Lfb();f&&(k.ul=Math.min(k.Hta,k.ul*Math.sqrt(k.mVa/f)),this.ZGa())};a.prototype.Xkb=function(f,l,p){this.oi.cX(f).jRa(l,p)};a.prototype.P7=function(f){return this.oi.kw(f).getX()};a.prototype.Q7=function(f){return this.oi.kw(f).getY()};a.prototype.O7=function(f){return this.oi.kw(f).iP()};a.prototype.Dfb=function(f){return this.oi.kw(f).zA()};a.prototype.N7=function(f){return this.oi.kw(f).nb()/
k.ul};a.prototype.M7=function(f){return this.oi.kw(f).Mb()/k.ul};a.prototype.render=function(){this.Xja&&this.oi.render()};a.prototype.Y9=function(f){this.xC.push(f);this.fHa()};a.prototype.XP=function(f){f=this.xC.lastIndexOf(f);f>=0&&this.xC.splice(f,1);this.fHa()};a.prototype.fHa=function(){var f=this.xC.length>0?this.xC[this.xC.length-1]:c.Ee;this.getParent().set("cursor",f)};a.prototype.t0=function(){this.xC.length>0&&(this.getParent().set("cursor",c.Ee),this.xC=[])};a.prototype.vjb=function(f){this.DI.push(f);
this.iW()};a.prototype.ojb=function(f){f=this.DI.lastIndexOf(f);f>=0&&this.DI.splice(f,1);this.iW()};a.prototype.iW=function(){var f=this.DI.length==0?"":this.DI[this.DI.length-1]||"";this.jc!=f&&(this.jc=f,this.getParent().set("toolTip",this.jc))};a.prototype.CZa=function(){this.jc&&this.getParent().set("toolTip","");this.jc="";this.DI=[]};a.prototype.np=function(){this.CZa();this.t0();d.prototype.np.call(this)};a.prototype.kd=function(){this.ZGa();this.bma()};a.prototype.ZGa=function(){var f=this.oi.cc();
f.style.transform=k.ul!=1?"scale("+(1/k.ul).toFixed(3)+")":"none";f.style.transformOrigin="0% 0%";this.oi.setSize(this.nb()*k.ul,this.Mb()*k.ul);this.render()};a.prototype.cp=function(){this.Wja=!0;this.ema()};a.prototype.ap=function(){this.Wja=!1;this.ema()};a.prototype.ema=function(){var f=this.Wja&&!b.isPresenting;this.Xja!=f&&((this.Xja=f)?(this.kd(),this.render()):this.oi.B7())};return a});
define("tdv/player/script/MapPlayer","require tdv/utils tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/MediaPlayer tdv/player/view/map/control/Controller tdv/player/view/map/control/constants/Movement tdv/player/view/map/renderer/Renderer tdv/constants/EventName tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),
k=a("tdv/player/script/MediaPlayer"),e=a("tdv/player/view/map/control/Controller"),b=a("tdv/player/view/map/control/constants/Movement"),c=a("tdv/player/view/map/renderer/Renderer"),d=a("tdv/constants/EventName"),f=a("tdv/view/constants/ButtonMode"),l=a("tdv/view/constants/State"),p=n.define("MapPlayer",k,function(){k.call(this,"map");this.Z2=this.Dha=this.jj=!1;this.hp=this.rd=this.U=this.j=null;this.hC={};for(var q in p.Px)this.hC[q]=this.a_a(q);this.be=m.nr(this.Sh,this)});p.prototype.stop=function(){this.md(b.Fg)};
p.prototype.rotateClockwise=function(){this.md(b.eca)};p.prototype.rotateCounterClockwise=function(){this.md(b.fca)};p.prototype.zoomIn=function(){this.md(b.Nx)};p.prototype.zoomOut=function(){this.md(b.Ox)};p.prototype.set=function(q,r){if(this.get(q)!=r){switch(q){case "map":this.Dha=!0;this.be();break;case "viewerArea":this.jj=!0;this.be();break;case "panoramaMapLocation":this.Xia=!0;this.be();break;case "movementMode":this.Z2=!0,this.be()}k.prototype.set.call(this,q,r)}};p.prototype.a_a=function(q){var r=
p.Px[q];q=new g(this,q,f.af);q.bind(d.Sa,function(){this.md(r.movement)},this);r.stopOnRelease&&q.bind(d.$a,function(){this.md(b.Fg)},this);return q};p.prototype.ecb=function(q){this.hp=null;this.set("map",q.get("map"));this.set("panoramaMapLocation",q)};p.prototype.Kjb=function(q){this.get("panoramaMapLocation")==q&&(this.set("panoramaMapLocation",null),this.hp=null)};p.prototype.ur=function(q,r,t,u){this.U&&this.U.ur(q,r,t,u);this.hp={yaw:r,pitch:t,hfov:u}};p.prototype.Sh=function(){this.jj&&(this.jj=
!1,this.oy(),this.get("viewerArea")&&this.ny(),this.pV(this.get("viewerArea")));if(this.U){if(this.Dha){this.Dha=!1;var q=this.get("map");q?(this.hK(),this.U.wRa(q)):this.U.cB();this.Xia=this.Z2=!0}this.Xia&&(this.Xia=!1,q=this.get("panoramaMapLocation"),this.U.iB(q),q&&this.hp&&this.U.ur(q,this.hp.yaw,this.hp.pitch,this.hp.hfov));this.Z2&&(this.Z2=!1,this.U.eu(this.get("movementMode")))}};p.prototype.TN=function(){this.set("map",null)};p.prototype.ny=function(){var q=this.get("viewerArea");this.j=
new c;this.j.xa({left:0,top:0,bottom:0,right:0});q.mb(this.j);this.U=new e(q,this.j);this.U.bind(e.Dl,this.Cs,this);this.U.bind(e.wx,this.Gj,this);this.U.bind(e.xF,this.ZM,this);this.U.bind(e.zF,this.XC,this);this.U.bind(e.yF,this.dz,this);this.U.bind(e.tj,this.lU,this,!0)};p.prototype.oy=function(){this.j&&(this.U.h(e.Dl,this.Cs,this),this.U.h(e.wx,this.Gj,this),this.U.h(e.xF,this.ZM,this),this.U.h(e.zF,this.XC,this),this.U.h(e.yF,this.dz,this),this.U.h(e.tj,this.lU,this),this.U.clear(),this.j.getParent().removeChild(this.j),
this.j=null)};p.prototype.XC=function(q){this.oT(q.data.map)};p.prototype.dz=function(q){this.nT(q.data.map)};p.prototype.Cs=function(q){for(var r in p.Px)this.hC[r].set("state",q.data[p.Px[r].pressedOn]?l.Fb:l.Ee);this.o(new h(d.Qta,q.data))};p.prototype.lU=function(q){this.o(new h(p.tj,{yawDelta:q.data.yawDelta}))};p.prototype.Gj=function(q){this.j.getParent().xa({progressPercent:q.data.percent,progressVisible:!0})};p.prototype.ZM=function(){this.j.getParent().set("progressVisible",!1)};p.prototype.md=
function(q){this.U&&this.U.xl(q)};p.Px={buttonRotateClockwise:{movement:b.eca,pressedOn:"rotatingClockwise",stopOnRelease:!0},buttonRotateCounterClockwise:{movement:b.fca,pressedOn:"rotatingCounterClockwise",stopOnRelease:!0},buttonZoomIn:{movement:b.Nx,pressedOn:"zoomingIn",stopOnRelease:!0},buttonZoomOut:{movement:b.Ox,pressedOn:"zoomingOut",stopOnRelease:!0}};p.tj="requestYawChange";return p});
define("tdv/player/script/PlayListItem","require exports tdv/player/parser/ClassInfo tdv/constants/EventName tdv/events/Event tdv/binding/Bindable".split(" "),function(a,m,h,n,g,k){a=function(e){function b(){var c=e.call(this)||this;c.I="stopped";return c}P(b,e);b.prototype.get=function(c,d){d===void 0&&(d=void 0);return c=="state"?this.I:k.prototype.get.call(this,c,d)};b.prototype.start=function(){this.lnb()};b.prototype.lnb=function(){if(this.I=="stopped"||this.I=="stopping")this.I="startin",this.o(new g(n.Up))};
b.prototype.PD=function(){this.cTa()};b.prototype.cTa=function(){if(this.I=="startin"||this.I=="stopping")this.I="playing",this.o(new g(n.Dr))};b.prototype.stop=function(){this.vQ()};b.prototype.vQ=function(){if(this.I=="playing"||this.I=="startin")this.I="stopping",this.o(new g(n.Fg))};b.prototype.end=function(){this.dTa()};b.prototype.dTa=function(){if(this.I=="stopping"||this.I=="startin")this.I="stopped",this.o(new g(n.Ub))};return b}(k);h.create("PlayListItem",a);return a});
define("tdv/player/script/MapPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("MapPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.XC,this),g.set("map",this.get("media")))};a.prototype.stop=function(){var g=
this.get("player");g&&g.get("map")==this.get("media")&&g.set("map",null);n.prototype.stop.call(this)};a.prototype.XC=function(){this.get("player").h(h.di,this.XC,this);this.get("player").bind(h.oo,this.dz,this);this.PD();this.get("player").get("map")!=this.get("media")&&this.dz()};a.prototype.dz=function(){this.get("player").h(h.oo,this.dz,this);this.stop();this.end()};return a});
define("tdv/player/script/MeasureModel3DObject",["require","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/ExternalModel3DObject"],function(a){var m=a("tdv/constants/EventName"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/ExternalModel3DObject"),g=h.define("MeasureModel3DObject",n,function(){n.call(this);this.bind(m.L("mode"),function(){this.o(g.KUa)},this,!0);this.bind(m.L("distance"),function(){this.o(g.GUa)},this,!0)});g.KUa="modeChange";g.GUa="distanceChange";
return g});define("tdv/player/script/MeasureModel3DObjectPoint",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MeasureModel3DObjectPoint",m,function(){m.call(this)})});
define("tdv/player/script/OrbitModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCamera");return m.define("OrbitModel3DCamera",h,function(){h.call(this)})});
define("tdv/player/view/util/LoadingGroup",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,m,h,n){var g=function(){return function(k){this.uJa=k;this.percent=0;this.finished=!1}}();return function(k){function e(b){var c=k.call(this)||this;c.To=new Map;c.fM=b||c;return c}P(e,k);e.prototype.Ekb=function(b){if(this.fM=b)this.hh(),this.Z5()};e.prototype.update=function(){this.hh();this.Z5()};e.prototype.lJa=function(){this.To.forEach(function(b,c){this.z4(c)}.bind(this));
this.To=new Map};e.prototype.pj=function(){var b=0;this.To.forEach(function(c){c.finished&&b++});return b==this.To.size};e.prototype.dispose=function(){this.lJa();this.To.clear();this.fM=void 0};e.prototype.uO=function(b,c){c===void 0&&(c=1);if(this.To.has(b))return b;this.To.set(b,new g(c));this.rXa(b);return b};e.prototype.aQ=function(b){this.To.has(b)&&(this.To["delete"](b),this.z4(b))};e.prototype.iw=function(b){b===void 0&&(b=1);var c=new n;return this.uO(c,b)};e.prototype.Pe=function(b){b=b.source;
var c=this.To.get(b);c&&(this.z4(b),c.percent=100,c.finished=!0,this.hh(),this.Z5())};e.prototype.Gj=function(b){this.To.get(b.source).percent=b.data.percent;this.hh()};e.prototype.yh=function(b){b=b.source;this.z4(b);b=this.To.get(b);b.finished=!0;b.percent=100;this.fM.o(h.$c);this.hh();this.Z5()};e.prototype.hh=function(){var b=0,c=0;this.To.forEach(function(d){c+=d.uJa;b+=d.percent*d.uJa});this.fM.o(h.xc,{percent:c?b/c:100})};e.prototype.Z5=function(){this.pj()&&this.fM.o(h.ia)};e.prototype.rXa=
function(b){b.bind(h.ia,this.Pe,this,!0);b.bind(h.xc,this.Gj,this,!0);b.bind(h.$c,this.yh,this,!0)};e.prototype.z4=function(b){b.h(h.ia,this.Pe,this);b.h(h.xc,this.Gj,this);b.h(h.$c,this.yh,this)};return e}(n)});
define("tdv/player/script/Model3D","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/Media tdv/player/script/OrbitModel3DCamera tdv/player/view/util/LoadingGroup".split(" "),function(a){function m(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function h(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function n(r,t){if(Array.isArray(t))return r.toArray(t);t.x=r.x;t.y=r.y;t.z=r.z;return t}var g=a("tdv/constants/EventName"),
k=a("tdv/constants/PlaybackState"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/script/Media"),c=a("tdv/player/script/OrbitModel3DCamera"),d=a("tdv/player/view/util/LoadingGroup");a=e.define("Model3D",b,function(){b.call(this);this.set("camera",new c);this.set("geometryQuery",void 0);this.set("objectQuery",void 0);this.set("metadataQuery",void 0);this.set("preload",!0)});a.prototype.Tqa=function(){this.Lj&&(this.Lj.h(g.ia,this.cN,this),this.Lj.dispose());this.Lj=new d;this.Lj.bind(g.ia,this.cN,
this,!0);this.sf&&this.sf.dispose();this.sf=new d(this)};a.prototype.cN=function(){this.o(g.YF)};a.prototype.R7=function(){this.sf||this.Tqa();return this.sf};a.prototype.V7=function(){this.Lj||this.Tqa();return this.Lj};a.prototype.pause=function(){this.get("state")==k.PLAYING&&this.set("state",k.$b)};a.prototype.play=function(){this.set("state",k.PLAYING)};a.prototype.stop=function(){this.set("state",k.ca)};a.prototype.worldPositionToLocal=function(r,t){h(f,r);m(p,t);p.invert();f.applyMatrix4(p);
return n(f,r)};a.prototype.getMatrixWorld=function(r){var t=this.get("objectQuery");return t&&t.xLa(r)};a.prototype.worldDirectionToLocal=function(r,t){h(f,r);m(q,t);p.extractRotation(q);p.invert();f.applyMatrix4(p);return n(f,r)};a.prototype.testIntersection=function(r,t){var u=this.get("geometryQuery");if(u)return h(f,r),h(l,t),u.CK(f,l)};a.prototype.getDistanceToFloor=function(r){var t=this.get("geometryQuery");if(t)return h(f,r),t.ofb(f)};a.prototype.getMetadata=function(){var r=this.get("metadataQuery");
if(r)return r.getMetadata()};a.prototype.pick=function(r,t){var u=this.get("picker");if(u)return u.sqa(r,t)};a.prototype.getScreenPosition=function(r,t){var u=this.get("projectionQuery");if(u)return u.Koa(h(f,r),t)};var f=new THREE.Vector3,l=new THREE.Vector3,p=new THREE.Matrix4,q=new THREE.Matrix4;a.prototype.tw=function(){return[]};return a});
define("tdv/player/script/Model3DAnimation",["require","tdv/binding/Bindable","tdv/constants/PlaybackState","tdv/constants/EventName","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/PlaybackState"),n=a("tdv/constants/EventName");a=a("tdv/player/parser/ClassInfo").define("Model3DAnimation",m,function(){m.call(this);this.bind(n.L("state"),function(){this.o(n.Pd)},this,!0)});a.prototype.pause=function(){this.get("state")==h.PLAYING&&this.set("state",h.$b)};
a.prototype.play=function(){this.set("currentDirection","forward");this.set("state",h.PLAYING)};a.prototype.reverse=function(){this.set("currentDirection","backward");this.set("state",h.PLAYING)};a.prototype.stop=function(){this.set("currentTime",0);this.set("state",h.ca)};return a});
define("tdv/player/script/Model3DCameraSequence",["require","tdv/binding/Bindable","tdv/constants/PlaybackState","tdv/player/parser/ClassInfo","tdv/constants/EventName"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/constants/EventName");a=n.define("Model3DCameraSequence",m,function(){m.call(this);this.set("state",h.ca);this.bind(g.L("state"),function(){this.o(g.Pd)},this,!0)});a.prototype.play=a.prototype.play=function(){this.set("state",
h.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.get("state")==h.PLAYING&&this.set("state",h.$b)};a.prototype.stop=a.prototype.stop=function(){this.set("state",h.ca)};return a});define("tdv/player/script/Model3DDisplayEffect",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DDisplayEffect",m,function(){m.call(this)})});
define("tdv/player/script/PlaybackMediaPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/script/helper/ButtonProperty tdv/player/script/MediaPlayer tdv/constants/PlaybackState tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/script/helper/ButtonProperty"),k=a("tdv/player/script/MediaPlayer"),e=a("tdv/constants/PlaybackState"),b=a("tdv/view/constants/ButtonMode"),
c=a("tdv/view/constants/State");a=m.extend(k,function(){k.call(this,!0);this.wv=!1;this.RN=!0;this.I=e.ca;this.yG=new g(this,"buttonPlayPause",b.bk);this.yG.bind(h.Rk,this.B5a,this,!0);this.yG.bind(h.Nm,this.C5a,this,!0);this.GL=new g(this,"buttonPause",b.af);this.GL.bind(h.ma,this.WH,this,!0);this.HL=new g(this,"buttonPlay",b.af);this.HL.bind(h.ma,this.XH,this,!0);this.JL=new g(this,"buttonStop",b.af);this.JL.bind(h.ma,this.cD,this,!0);this.$Ya=new g(this,"buttonRestart",b.af);this.$Ya.bind(h.ma,
this.bD,this,!0);this.Pza=m.nr(this.Tab,this);this.Pza()});a.prototype.set=function(d,f){d!="state"&&k.prototype.set.call(this,d,f)};a.prototype.get=function(d,f){switch(d){case "state":return this.I}return k.prototype.get.call(this,d,f)};a.prototype.Tab=function(){this.RN&&(this.RN=!1,this.GL.set("state",this.I==e.$b?c.Fb:c.Ee),this.HL.set("state",this.I==e.PLAYING||this.I==e.$b?c.Fb:c.Ee),this.yG.set("pressed",this.I==e.PLAYING),this.JL.set("state",this.I==e.ca?c.Fb:c.Ee))};a.prototype.xD=function(d){this.wv!=
d&&((this.wv=d)||this.Jd(e.ca))};a.prototype.Jd=function(d){var f=this.I;this.I=d;k.prototype.set.call(this,"state",d);f!=this.I&&(this.RN=!0,this.Pza(),this.o(new n(h.Pd,{oldState:f,state:this.I})))};a.prototype.WH=function(){this.wv&&(this.I==e.$b?this.tn():this.tv())};a.prototype.XH=function(){this.wv&&this.tn()};a.prototype.B5a=function(){this.wv&&this.tn()};a.prototype.C5a=function(){this.wv&&this.tv()};a.prototype.cD=function(){this.wv&&this.Zs()};a.prototype.bD=function(){this.wv&&(this.Zs(),
this.tn())};a.prototype.tn=function(){};a.prototype.tv=function(){};a.prototype.Zs=function(){};return a});
define("tdv/player/view/common/MediaDisplayController",["require","exports","tdv/view/util/Animation","tdv/events/EventDispatcher","tdv/player/view/util/XR"],function(a,m,h,n,g){var k={isEqual:function(e){return e==this}};return function(e){function b(c){var d=e.call(this)||this;d.P=c;d.jp=null;d.li=null;d.cf=null;d.Rh=0;d.Bn=0;d.sb=b.wo;return d}P(b,e);b.prototype.display=function(c){this.jp=null;c.isEqual(this.cf)&&this.sb==b.wo||(this.P.Qma(this),this.jp=c,this.oCa())};b.prototype.oe=function(){if(this.cf||
this.li)this.jp=k,this.oCa()};b.prototype.clear=function(){this.sb=b.wo;this.jp=null;if(this.cf||this.li)this.li&&(this.xN(this.li),this.li=null),this.cf&&(this.xN(this.cf),this.cf=null),this.P.release(this)};b.prototype.Yg=function(c){this.sb==b.wo||this.sb!=b.vo&&this.sb!=b.tL&&this.sb!=b.jR||(this.Bn+=c,c=Math.min(1,this.Bn/this.Rh),this.sb==b.vo?this.GT(c):this.sb==b.jR?this.KT(c):this.JT(c),this.Bn<this.Rh?this.bb():this.dM())};b.prototype.bb=function(){h.requestFrame(this.Yg,this)};b.prototype.oCa=
function(){this.jp&&this.sb==b.wo&&(this.W1()&&!this.cf?this.xYa():this.ay())};b.prototype.ay=function(){this.cf&&this.Rka(this.cf);this.W1()&&this.cf?this.by():(this.li=this.jp.isEqual(k)?null:this.jp,this.jp=null,this.li?this.$ja(this.li,this.cf)?this.pR():this.$x():this.cf?this.by():this.P.release(this))};b.prototype.dM=function(){this.jp&&this.jp.isEqual(this.cf)||!this.cf||this.xN(this.cf);this.cf=this.li;this.li=null;this.sb==b.tL?this.bS():this.sb==b.vo?this.yy():this.sb==b.jR&&this.cS();this.sb=
b.wo;this.mn();this.jp?this.ay():this.cf||this.P.release(this)};b.prototype.xYa=function(){this.sb=b.YWa;this.P.Tsa(this,this.ay.bind(this))};b.prototype.$x=function(){this.sb=b.vo;this.P_(this.li);this.Bn=0;this.Rh=this.P.get("transitionDuration");this.bb()};b.prototype.GT=function(){};b.prototype.yy=function(){};b.prototype.pR=function(){this.sb=b.jR;this.P_(this.li);this.Bn=0;this.Rh=this.P.get("transitionDuration")*2;this.bb()};b.prototype.KT=function(){};b.prototype.cS=function(){};b.prototype.by=
function(){this.li=null;this.Bn=0;this.Rh=this.P.get("transitionDuration");this.sb=b.tL;this.bb()};b.prototype.JT=function(){};b.prototype.bS=function(){};b.prototype.mn=function(){};b.prototype.W1=function(){return this.P.get("transitionMode","blending")=="fade_out_fade_in"||g.isPresenting};b.prototype.$ja=function(c,d){return!!d};b.prototype.Rka=function(){};b.prototype.P_=function(){};b.prototype.xN=function(){};b.wo="stopped";b.vo="blending";b.jR="double blending";b.tL="disolving";b.YWa="waiting";
return b}(n)});
define("tdv/player/view/model3d/controller/DisplayController","require tdv/utils tdv/view/util/Animation tdv/events/Event tdv/player/view/common/MediaDisplayController tdv/player/view/util/XR".split(" "),function(a){function m(b){this.model=b}var h=a("tdv/utils");a("tdv/view/util/Animation");var n=a("tdv/events/Event"),g=a("tdv/player/view/common/MediaDisplayController"),k=a("tdv/player/view/util/XR");m.prototype.isEqual=function(b){return b&&this.model==b.model};var e=h.extend(g,function(b,c){g.call(this,
b);this.j=c;this.pia=[]});e.prototype.display=function(b){g.prototype.display.call(this,new m(b))};e.prototype.oe=function(){g.prototype.oe.call(this)};e.prototype.clear=function(){g.prototype.clear.call(this);this.j=null};e.prototype.Yg=function(b){for(;this.pia.length;)this.pia.shift()();this.sb!=e.wo&&this.j.Qa();g.prototype.Yg.call(this,b)};e.prototype.rX=function(){return this.cf&&this.cf.model&&this.j.rX(this.cf.model)||void 0};e.prototype.$x=function(){g.prototype.$x.call(this);this.P.Fc().smb();
this.j.vra(this.li.model,!1);this.P.Fc().zK();this.li.model.set("opacity",k.isPresenting?1:0)};e.prototype.GT=function(b){g.prototype.GT.call(this,b);k.isPresenting||this.li.model.set("opacity",b);this.P.Fc().nK(b)};e.prototype.yy=function(){g.prototype.yy.call(this);this.P.Fc().oJ()};e.prototype.pR=function(){this.P.Fc().cF();this.xN(this.cf);g.prototype.pR.call(this);this.j.vra(this.li.model,!1);this.P.Fc().zK()};e.prototype.KT=function(b){g.prototype.KT.call(this,b);this.P.Fc().nK(b);this.P.Fc().QE(b)};
e.prototype.cS=function(){g.prototype.cS.call(this);this.P.Fc().oJ();this.P.Fc().VD()};e.prototype.by=function(){g.prototype.by.call(this);this.P.Fc().cF();this.j.vra(this.cf.model,k.isPresenting?!1:!0)};e.prototype.JT=function(b){g.prototype.JT.call(this,b);this.P.Fc().QE(b);k.isPresenting||this.cf.model.set("opacity",1-b)};e.prototype.bS=function(){this.P.Fc().VD();g.prototype.bS.call(this)};e.prototype.mn=function(){g.prototype.mn.call(this);this.cf?this.o(new n(e.BF,{model:this.cf.model})):this.jp||
this.o(new n(e.aba))};e.prototype.Rka=function(b){b.model&&this.o(new n(e.AF,{model:b.model}))};e.prototype.$ja=function(b,c){return!!c};e.prototype.P_=function(b){b.model&&(b.model.set("opacity",this.sb==g.jR?1:.01),b.model.set("currentTime",0),this.j.dIa(b.model),this.o(new n(e.qba,{model:b.model})),this.pia.push(()=>{this.o(new n(e.CF,{model:b.model}))}))};e.prototype.xN=function(b){b.model&&(this.j.tQa(b.model),this.o(new n(e.rba,{model:b.model})))};e.oc="request frame";e.qba="model added";e.rba=
"model removed";e.CF="model start";e.BF="model show";e.AF="model hide";e.aba="all pending models hidden";return e});
define("tdv/player/view/model3d/controller/LoadController",["require","tdv/utils","tdv/events/EventDispatcher","tdv/constants/EventName"],function(a){var m=a("tdv/utils"),h=a("tdv/events/EventDispatcher"),n=a("tdv/constants/EventName");a=m.extend(h,function(g,k){h.call(this);this.P=g;this.j=k;this.xh=null});a.prototype.clear=function(){this.stop();this.j=null};a.prototype.load=function(g){g!=this.xh&&(this.stop(),this.j.Igb(g)?(this.tGa(g),this.P5(g)):(this.xh=g,this.xh.set("opacity",0),this.EYa(),
this.j.dIa(this.xh)))};a.prototype.stop=function(){this.xh&&(this.Fla(),this.j.tQa(this.xh),this.xh=null)};a.prototype.cN=function(){this.wGa();this.tGa(this.xh)};a.prototype.Pe=function(){this.xh.f8(n.YF)&&this.cN();this.Fla();var g=this.xh;this.xh=null;this.P.set("progressVisible",!1);this.P5(g)};a.prototype.yh=function(){this.Fla();this.xh=null;this.P.set("progressVisible",!1)};a.prototype.Gj=function(g){this.P.xa({progressPercent:g.data.percent,progressVisible:!0})};a.prototype.HYa=function(){this.xh.bind(n.YF,
this.cN,this,!0)};a.prototype.wGa=function(){this.xh.h(n.YF,this.cN,this,!0)};a.prototype.EYa=function(){this.HYa();this.xh.bind(n.ia,this.Pe,this,!0);this.xh.bind(n.xc,this.Gj,this,!0);this.xh.bind(n.$c,this.yh,this,!0)};a.prototype.Fla=function(){this.wGa();this.xh.h(n.ia,this.Pe,this,!0);this.xh.h(n.xc,this.Gj,this,!0);this.xh.h(n.$c,this.yh,this,!0)};a.prototype.tGa=function(g){this.o(n.YF,{model:g})};a.prototype.P5=function(g){this.o(n.ia,{model:g})};a.prototype.Lhb=function(){return this.xh&&
this.xh.f8(n.YF)};a.sta=n.YF;a.pta=n.ia;return a});
define("tdv/player/view/model3d/controller/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/PlaybackState"),e=m.extend(g,function(){g.call(this);this.Fa=null;this.I=k.ca});e.prototype.start=function(b){this.Fa=b;this.Fa.bind(h.L("camera"),this.gia,this,!0);this.Fa.bind(h.L("state"),
this.Hia,this,!0);this.Fa.bind(h.L("currentTime"),this.L3,this,!0);this.Fa.bind(h.L("duration"),this.L3,this,!0);this.Hia();this.gia()};e.prototype.end=function(){this.stop();this.zc&&(this.zc.h(h.L("state"),this.HT,this,!0),this.zc=null);this.Fa&&(this.Fa.h(h.L("camera"),this.gia,this,!0),this.Fa.h(h.L("state"),this.Hia,this,!0),this.Fa.h(h.L("currentTime"),this.L3,this,!0),this.Fa.h(h.L("duration"),this.L3,this,!0),this.Fa=null)};e.prototype.clear=function(){this.end()};e.prototype.play=function(){this.Fa&&
this.Fa.set("state",k.PLAYING)};e.prototype.pause=function(){this.Fa&&this.Fa.set("state",k.$b)};e.prototype.stop=function(){this.Fa&&this.Fa.set("state",k.ca)};e.prototype.setTime=function(b){this.Fa&&this.Fa.set("currentTime",b)};e.prototype.getTime=function(){return this.Fa&&this.Fa.get("currentTime")||void 0};e.prototype.Hia=function(){var b=this.Fa.get("state");this.I!=b&&(this.I=b,this.zc&&this.zc.set("state",b),this.o(new n(e.gd,{state:this.I})))};e.prototype.L3=function(){this.o(new n(e.Ok,
{model:this.Fa,time:this.Fa.get("currentTime"),duration:this.Fa.get("duration")}));this.HT()};e.prototype.gia=function(){this.zc&&this.zc.h(h.L("state"),this.HT,this,!0);(this.zc=this.Fa.get("camera"))&&this.zc.bind(h.L("state"),this.HT,this,!0);this.HT()};e.prototype.HT=function(){this.Fa.get("duration")===0&&this.Fa.set("state",this.zc?this.zc.get("state"):k.ca)};e.gd="playback state change";e.Ok="time change";return e});
define("tdv/player/view/model3d/controller/Controller","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/model3d/controller/DisplayController tdv/player/view/model3d/controller/LoadController tdv/player/view/model3d/controller/PlaybackController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/PlaybackState"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/model3d/controller/DisplayController"),
e=a("tdv/player/view/model3d/controller/LoadController"),b=a("tdv/player/view/model3d/controller/PlaybackController"),c=m.extend(g,function(d,f){g.call(this);this.P=d;this.j=f;this.j.set("visible",!1);this.Ge=new e(this.P,this.j);this.Ya=new k(this.P,this.j);this.Ua=new b(this.j);this.Ge.bind(e.sta,this.fCa,this,!0);this.Ge.bind(e.pta,this.fz,this,!0);this.Ya.bind(k.AF,this.YC,this,!0);this.Ya.bind(k.BF,this.ln,this,!0);this.Ya.bind(k.CF,this.XT,this,!0);this.Ya.bind(k.qba,this.cCa,this,!0);this.Ya.bind(k.rba,
this.gCa,this,!0);this.Ya.bind(k.aba,this.bBa,this,!0);this.Ua.bind(b.gd,this.Mf,this,!0);this.Ua.bind(b.Ok,this.Gs,this,!0)});c.prototype.clear=function(){this.Ge.clear();this.Ya.clear();this.Ua.clear();this.Ge.h(e.sta,this.fCa,this);this.Ge.h(e.pta,this.fz,this);this.Ya.h(k.AF,this.YC,this);this.Ya.h(k.BF,this.ln,this);this.Ya.h(k.CF,this.XT,this);this.Ya.h(k.qba,this.cCa,this);this.Ya.h(k.rba,this.gCa,this);this.Ya.h(k.aba,this.bBa,this);this.Ua.h(b.gd,this.Mf,this);this.Ua.h(b.Ok,this.Gs,this);
this.P=this.j=this.Ua=this.Ya=this.Ge=null};c.prototype.ilb=function(d){this.j.set("visible",!0);this.Ge.load(d)};c.prototype.cB=function(){this.Ge.Lhb()&&this.Ge.stop();this.Ya.oe();this.Ua.end()};c.prototype.play=function(){this.Ua.play()};c.prototype.stop=function(){this.Ua.stop()};c.prototype.pause=function(){this.Ua.pause()};c.prototype.setTime=function(d){this.Ua.setTime(d)};c.prototype.getTime=function(){return this.Ua.getTime()};c.prototype.rX=function(){return this.Ya.rX()};c.prototype.fCa=
function(d){this.Ya.display(d.data.model)};c.prototype.fz=function(){};c.prototype.cCa=function(d){this.Ua.start(d.data.model)};c.prototype.XT=function(d){d=d.data.model;this.j.set("visible",!0);this.o(new n(c.CF,{model:d}))};c.prototype.gCa=function(){};c.prototype.ln=function(d){d=d.data.model;d.get("autoplay")&&d.get("state")!=h.PLAYING&&d.set("state",h.PLAYING);this.o(new n(c.BF,{model:d}))};c.prototype.YC=function(d){this.o(new n(c.AF,{model:d.data.model}))};c.prototype.bBa=function(){this.j.set("visible",
!1)};c.prototype.Gs=function(d){this.o(new n(c.sba,d.data))};c.prototype.Mf=function(d){this.o(new n(c.gd,{state:d.data.state}))};c.BF="modelShow";c.AF="modelHide";c.Oob="modelEnd";c.CF="modelStart";c.sba="videoTimeChange";c.gd="playbackStateChange";return c});
define("tdv/player/view/webgl/ecs/Component",["require","exports"],function(){return function(){function a(){}a.prototype.clear=function(){};a.zb=function(m){this.id=m+"Component";this.aa="!"+this.id};a.Ob=function(m){this.zb(m+"SystemState");this.G8=!0};a.G8=!1;return a}()});
define("tdv/player/view/webgl/components",["require","exports","tdv/player/view/webgl/ecs/Component","three.mod"],function(a,m,h,n){var g;(function(k){var e=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Rf=null;I.HQa=null;I.jE=!0;I.enabled=!0;I.locked=!1;I.TO=!0;I.pf=void 0;I.Kk=0;return I}P(M,J);return M}(h);k.Kob=e;var b=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bias=0;I.pKa=500;I.intensity=1;I.scale=100;I.lNa=25;I.PNa=0;I.gna=4;I.output=
null;return I}P(M,J);return M}(h);k.OK=b;b.zb("AmbientOcclusionEffect");var c=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.color="#ffffff";I.intensity=1;return I}P(M,J);return M}(h);k.AmbientLight=c;c.zb("AmbientLight");var d=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.light=null;return I}P(M,J);return M}(h);k.wB=d;d.Ob("AmbientLight");var f=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;return I}P(M,
J);return M}(h);k.Animation=f;f.zb("Animation");var l=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.mx=l;l.Ob("Animation");var p=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.VKa=!1;I.oSa=!1;I.uZ=2;return I}P(M,J);return M}(h);k.rF=p;p.zb("AntialiasEffect");var q=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.pF=q;q.zb("ARAnchor");var r=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.anchor=null;I.fd=null;I.EJ=[];return I}P(M,J);return M}(h);k.lx=r;r.Ob("ARAnchorSystemState");var t=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.locked=!0;I.wb=null;return I}P(M,J);return M}(e);k.vB=t;t.zb("ARControls");var u=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Cr=u;u.Ob("ARControlsSystemState");var v=function(J){function M(){return J!==null&&J.apply(this,
arguments)||this}P(M,J);return M}(h);k.Xf=v;v.Ob("ARPerspectiveCamera");var w=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.v=[];I.renderOrder=null;I.M=null;return I}P(M,J);return M}(h);k.lo=w;w.zb("Area");var x=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.v=[];return I}P(M,J);return M}(h);k.xB=x;x.Ob("Area");var y=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.F6=[];return I}P(M,J);return M}(h);k.sF=y;y.Ob("AreaPoint");
var z=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.AB=z;z.zb("Beacon");var A=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.position=null;return I}P(M,J);return M}(h);k.BB=A;A.Ob("Beacon");var D=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.M=null;return I}P(M,J);return M}(h);k.Qp=D;D.zb("BeaconTracker");var F=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.position=null;
return I}P(M,J);return M}(h);k.sx=F;F.Ob("BeaconTracker");var C=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;I.rotate=!1;return I}P(M,J);return M}(h);k.SK=C;C.zb("CameraOffsetTransform");var B=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;return I}P(M,J);return M}(h);k.tUa=B;B.Ob("CameraOffsetTransform");var H=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;return I}P(M,J);return M}(h);
k.TK=H;H.zb("CameraSequence");var E=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.tx=E;E.Ob("CameraSequence");var G=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.source=null;I.xK=null;I.opacity=1;I.isSprite=!1;I.hidden=!1;I.depthTest=!0;return I}P(M,J);return M}(h);k.Kf=G;G.zb("CanvasMaterial");var N=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);
return M}(h);k.DB=N;N.Ob("CanvasMaterial");var O=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.vF=O;O.zb("ClippingRect");var R=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.EB=R;R.Ob("ClippingRect");var Q=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.RQ=Q;Q.zb("Data");var K=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.target=null;
return I}P(M,J);return M}(h);k.DirectionalLight=K;K.zb("DirectionalLight");var L=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.zp=null;return I}P(M,J);return M}(h);k.Er=L;L.Ob("DirectionalLight");var U=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.M=null;I.direction=null;I.min=null;return I}P(M,J);return M}(h);k.vx=U;U.zb("Draggable");var T=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Qna=null;return I}P(M,J);return M}(h);
k.FB=T;T.Ob("Draggable");var Y=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.Im=Y;Y.zb("Dragging");var aa=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.PF=aa;aa.zb("FirstPersonControls");var ba=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Lr=ba;ba.Ob("FirstPersonControls");var ea=function(J){function M(){var I=J!==null&&J.apply(this,
arguments)||this;I.color="#ffffff";I.opacity=1;I.height=0;I.radius=1;I.renderOrder=0;return I}P(M,J);return M}(h);k.Mr=ea;ea.zb("Floor");var ia=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.floor=null;return I}P(M,J);return M}(h);k.zx=ia;ia.Ob("Floor");var da=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.distance=0;I.JX=!1;I.x=0;I.y=0;I.z=0;return I}P(M,J);return M}(h);k.Ax=da;da.zb("FloorTransform");var V=function(J){function M(){var I=J!==null&&
J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.wu=V;V.Ob("FloorTransform");var X=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.QF=X;X.zb("FlyOverControls");var S=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Nr=S;S.Ob("FlyOverControls");var W=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.geometry=null;return I}P(M,J);return M}(h);
k.Geometry=W;W.zb("Geometry");var Z=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.fJa="#ffffff";I.depthTest=!0;I.Lna=10;I.dMa="#ffffff";I.size=10;return I}P(M,J);return M}(h);k.xu=Z;Z.zb("Grid");var ca=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.grid=null;return I}P(M,J);return M}(h);k.KB=ca;ca.Ob("Grid");var fa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.group=null;return I}P(M,J);return M}(h);k.Group=fa;fa.zb("Group");
var ja=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.group=null;return I}P(M,J);return M}(h);k.$K=ja;ja.Ob("Group");var ha=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;I.xw=null;I.M=null;I.Ap=null;I.priority=void 0;I.isSprite=!1;I.rJa=null;return I}P(M,J);return M}(h);k.Oi=ha;ha.zb("ImageMaterial");var ka=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.MB=ka;
ka.Ob("ImageMaterial");var la=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.EQa=7;I.intensity=1;return I}P(M,J);return M}(h);k.UQ=la;la.zb("MotionBlurEffect");var oa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.line=null;I.renderOrder=0;return I}P(M,J);return M}(h);k.Line=oa;oa.zb("Line");var pa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.line=null;return I}P(M,J);return M}(h);k.PB=pa;pa.Ob("Line");var ma=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.color="#ffffff";I.opacity=1;I.width=1;I.transparent=!0;I.depthTest=!0;return I}P(M,J);return M}(h);k.ei=ma;ma.zb("LineMaterial");var na=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.OB=na;na.Ob("LineMaterial");var va=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.F=null;I.position=null;return I}P(M,J);return M}(h);k.zu=va;va.zb("LineToTransform");var wa=function(J){function M(){return J!==
null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.QB=wa;wa.Ob("LineToTransform");var xa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.material=null;return I}P(M,J);return M}(h);k.Material=xa;xa.zb("Material");var ya=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.name=null;return I}P(M,J);return M}(h);k.Cx=ya;ya.zb("MaterialVariant");var za=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,
J);return M}(h);k.Rr=za;za.Ob("MaterialVariant");var Aa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Be=null;I.renderOrder=0;return I}P(M,J);return M}(h);k.Mesh=Aa;Aa.zb("Mesh");var Ba=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Be=null;return I}P(M,J);return M}(h);k.Bu=Ba;Ba.Ob("Mesh");var Ca=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;I.Kpa=null;I.UPa=null;I.Ap=null;I.M=null;I.Loa=null;I.eb=null;
return I}P(M,J);return M}(h);k.Pi=Ca;Ca.zb("Model");var Da=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Dx=Da;Da.Ob("Model");var Ea=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.VF=Ea;Ea.zb("NotCollidable");var Fa=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.EVa=Fa;Fa.Ob("NotCollidable");var Ga=function(J){function M(){var I=J!==null&&
J.apply(this,arguments)||this;I.tsa=!0;I.usa=!0;return I}P(M,J);return M}(h);k.Sr=Ga;Ga.zb("NotSelectable");var Ha=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.WF=Ha;Ha.Ob("NotSelectable");var Ia=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.sa=null;return I}P(M,J);return M}(h);k.Object3D=Ia;Ia.zb("Object3D");var Ja=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.id=null;I.container=null;return I}
P(M,J);return M}(h);k.hL=Ja;Ja.zb("Object3DId");var Ka=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Ex=Ka;Ka.Ob("Object3DId");var La=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.zW=void 0;I.castShadow=void 0;I.receiveShadow=void 0;I.opacity=1;I.GW=void 0;I.M=null;return I}P(M,J);return M}(h);k.gi=La;La.zb("ObjectTransform");var Ma=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}
P(M,J);return M}(h);k.RB=Ma;Ma.Ob("ObjectTransform");var Na=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.XF=Na;Na.zb("OrbitControls");var Oa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Tr=Oa;Oa.Ob("OrbitControls");var Pa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.width=100;I.height=100;return I}P(M,J);return M}(h);k.OrthographicCamera=Pa;Pa.zb("OrthographicCamera");
var Qa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.camera=null;I.width=void 0;I.height=void 0;return I}P(M,J);return M}(h);k.Cu=Qa;Qa.Ob("OrthographicCamera");var Ra=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.F=null;I.attach=!1;I.id=null;return I}P(M,J);return M}(h);k.pb=Ra;Ra.zb("Parent");var Sa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.parent=null;I.ge=null;I.id=void 0;I.attach=!1;return I}P(M,J);return M}(h);
k.Eu=Sa;Sa.Ob("Parent");var Ta=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.width=100;I.height=100;I.Nk=void 0;I.Wd=void 0;I.fov=75;I.near=.01;I.far=100;I.Zma=!1;I.HIa=0;I.oj=!1;return I}P(M,J);return M}(h);k.PerspectiveCamera=Ta;Ta.zb("PerspectiveCamera");var Ua=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.camera=null;I.zl=null;I.scene=null;I.boundingBox=null;I.hna=null;I.M9=!1;I.width=void 0;I.height=void 0;I.fov=void 0;I.Wd=void 0;I.Nk=void 0;
I.near=void 0;I.far=void 0;return I}P(M,J);return M}(h);k.Sk=Ua;Ua.Ob("PerspectiveCamera");var Va=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Le=1;I.Ye=1;I.Gh=1;I.scale=1;I.nE=void 0;I.oE=void 0;return I}P(M,J);return M}(h);k.Tk=Va;Va.zb("PixelScaleTransform");var Wa=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.ZF=Wa;Wa.Ob("PixelScaleTransform");var Xa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;
I.renderOrder=null;return I}P(M,J);return M}(h);k.Plane=Xa;Xa.zb("Plane");var Ya=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.geometry=null;return I}P(M,J);return M}(h);k.UB=Ya;Ya.Ob("Plane");var Za=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;I.M=null;I.matrixWorld=null;I.origin=new n.Vector3;I.direction=new n.Vector3;I.Qb=new n.Vector2;I.pressed=!1;I.gx=!1;I.sna=!1;I.Ug=!1;I.enabled=!0;return I}P(M,J);return M}(h);k.yc=Za;Za.zb("Pointer");
var $a=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.F=null;I.rotate=!0;I.M=null;return I}P(M,J);return M}(h);k.El=$a;$a.zb("PointerOverTransform");var ab=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Fu=ab;ab.Ob("PointerOverTransform");var bb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Gx=bb;bb.Ob("PointerDragging");var cb=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Hx=cb;cb.Ob("PointerSelection");var db=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bF=null;I.rZ=null;I.zZ=null;return I}P(M,J);return M}(h);k.po=db;db.zb("ProjectedMaterial");var eb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bF=null;I.sa=null;I.mQ=null;I.NA=null;I.material=null;I.HP=null;return I}P(M,J);return M}(h);k.Ur=eb;eb.Ob("ProjectedMaterial");var fb=
function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.eb=null;I.renderer=null;I.MY=[];return I}P(M,J);return M}(h);k.wj=fb;fb.zb("Renderer");var gb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Gu=gb;gb.Ob("Renderer");var hb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.opacity=1;I.locked=!1;I.enabled=!0;I.scene=null;I.Ea=null;I.backgroundColor=null;I.ana=null;I.JIa=null;I.environmentIntensity=
1;I.yKa=null;I.$na=null;I.RKa=null;I.SKa=0;I.aX=0;I.outputColorSpace=null;I.O9=1;I.M=null;return I}P(M,J);return M}(h);k.Scene=hb;hb.zb("Scene");var ib=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.scene=null;I.manager=null;return I}P(M,J);return M}(h);k.Vp=ib;ib.Ob("Scene");var jb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.M=null;I.hF=!1;I.nt=!0;I.Yt=!1;I.qB=!1;return I}P(M,J);return M}(h);k.wd=jb;jb.zb("Selectable");var kb=function(J){function M(){return J!==
null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.$F=kb;kb.Ob("Selectable");var lb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.color="#ffffff";I.opacity=1;I.depthTest=!0;I.doubleSided=!1;return I}P(M,J);return M}(h);k.xd=lb;lb.zb("SolidMaterial");var mb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Ix=mb;mb.Ob("SolidMaterial");var nb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||
this;I.radius=1;I.widthSegments=32;I.heightSegments=16;I.renderOrder=0;return I}P(M,J);return M}(h);k.Sphere=nb;nb.zb("Sphere");var ob=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.aG=ob;ob.Ob("Sphere");var pb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.SpotLight=pb;pb.zb("SpotLight");var qb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.light=null;I.zp=null;return I}P(M,J);
return M}(h);k.Iu=qb;qb.Ob("SpotLight");var rb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.wO=.5;I.xO=.5;I.height=100;I.width=100;I.scale=1;I.sizeAttenuation=!1;I.Gi=null;I.renderOrder=0;return I}P(M,J);return M}(h);k.Sprite=rb;rb.zb("Sprite");var sb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Ju=sb;sb.Ob("Sprite");var tb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.cA=
!1;I.positionX=0;I.positionY=0;I.positionZ=0;I.Yd=0;I.fd=0;I.Xe=0;I.mf="XYZ";I.scale=1;I.Le=1;I.Ye=1;I.Gh=1;I.translationX=0;I.translationY=0;I.Ze=0;I.easing=0;I.M=null;return I}P(M,J);return M}(h);k.ta=tb;tb.zb("Transform");var ub=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.cA=!1;I.positionX=0;I.positionY=0;I.positionZ=0;I.Yd=0;I.fd=0;I.Xe=0;I.mf="XYZ";I.scale=1;I.Le=1;I.Ye=1;I.Gh=1;I.translationX=0;I.translationY=0;I.Ze=0;return I}P(M,J);return M}(h);k.Gg=ub;ub.Ob("Transform");
var vb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.dG=vb;vb.Ob("TransformEasing");var wb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.translate=!0;I.rotate=!0;I.scale=!0;I.M=null;return I}P(M,J);return M}(h);k.Hh=wb;wb.zb("TransformControls");var xb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.kaa=null;I.Gk=null;I.pe=null;return I}P(M,J);return M}(h);k.Om=xb;xb.Ob("TransformControls");var yb=
function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.pf=void 0;return I}P(M,J);return M}(e);k.Kx=yb;yb.zb("TransitionControls");var zb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Lu=zb;zb.Ob("TransitionControlsSystemState");var Ab=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;I.Qsa=null;I.M=null;return I}P(M,J);return M}(h);k.ro=Ab;Ab.zb("VideoMaterial");var Bb=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.XB=Bb;Bb.Ob("VideoMaterial");var Cb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;I.width=null;I.height=null;return I}P(M,J);return M}(h);k.so=Cb;Cb.zb("Viewport");var Db=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;I.properties=null;return I}P(M,J);return M}(h);k.fG=Db;Db.zb("ViewportPlaneGeometry");var Eb=function(J){function M(){var I=J!==
null&&J.apply(this,arguments)||this;I.geometry=null;I.eSa=void 0;I.cSa=void 0;I.Yh=void 0;I.verticalAlign=void 0;I.NE=void 0;I.zIndex=void 0;return I}P(M,J);return M}(h);k.Mx=Eb;Eb.Ob("ViewportPlaneGeometry");var Fb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.rPa=1;I.LMa=.5;I.color="#000000";I.opacity=.5;return I}P(M,J);return M}(h);k.nL=Fb;Fb.zb("VignetteEffect");var Gb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.ng=Gb;
Gb.Ob("XRPerspectiveCamera");var Hb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.locked=!0;return I}P(M,J);return M}(h);k.gG=Hb;Hb.zb("XRBasicControls");var Ib=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Yp=Ib;Ib.Ob("XRBasicControlsSystemState");var Jb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.oL=Jb;Jb.zb("XRDragControls");var Kb=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Zp=Kb;Kb.Ob("XRDragControlsSystemState");var Lb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.pL=Lb;Lb.zb("XRFlyControls");var Mb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.$p=Mb;Mb.Ob("XRFlyControlsSystemState");var Nb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,
J);return M}(e);k.qL=Nb;Nb.zb("XRTeleportControls");var Ob=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.aq=Ob;Ob.Ob("XRTeleportControlsSystemState")})(g||(g={}));return g});
define("tdv/player/view/Flash",["require","exports","tdv/player/view/util/Device"],function(a,m,h){return function(){function n(){this.qa=document.createElement("div");this.qa.style.position="absolute";this.qa.style.left="0";this.qa.style.top="0";this.qa.style.right="0";this.qa.style.bottom="0";this.qa.style.zIndex="0";this.qa.style.pointerEvents="none";this.qa.style.backgroundColor="#ffffff";this.qa.style.display="none";this.qa.style.opacity="0";this.qa.style.transition="opacity 100ms ease-in-out";
this.m9=this.m9.bind(this);this.n9=this.n9.bind(this)}n.prototype.cc=function(){return this.qa};n.prototype.m9=function(){this.qa.removeEventListener("transitionend",this.m9);this.qa.style.opacity="0";this.qa.addEventListener("transitionend",this.n9)};n.prototype.n9=function(){this.qa.removeEventListener("transitionend",this.n9);this.qa.style.display="none"};n.prototype.o=function(){h.Tb()!==h.Ji&&(this.qa.style.display="block",this.qa.style.opacity="0",this.qa.offsetHeight,this.qa.style.opacity=
"1",this.qa.addEventListener("transitionend",this.m9))};return n}()});
define("tdv/player/view/webgl/ecs/Entity",["require","exports"],function(){return function(){function a(m,h){this.T=m;this.tag=h||"Entity";this.id=this.tag+"_"+a.dY++;this.components={};this.DY={};this.asa=0}a.prototype.getComponent=function(m){return this.components[m.id]};a.prototype.O=function(m,h){h===void 0&&(h=!1);var n=this.components[m.id];n?this.T.Vcb(this,m):h&&(n=this.N(m));return n};a.prototype.N=function(m){if(m.id in this.components)return this.components[m.id];m.G8&&this.asa++;var h=
this.components[m.id]=new m;this.T.Sbb(this,m);return h};a.prototype.ka=function(m){var h;h===void 0&&(h=!1);m.id in this.components&&(m.G8&&this.asa--,h?this.components[m.id].clear():this.DY[m.id]=this.components[m.id],delete this.components[m.id],this.T.rQa(this,m,h))};a.prototype.$cb=function(){for(var m in this.DY)this.DY[m].clear(),delete this.DY[m]};a.prototype.Bjb=function(){for(var m in this.components){var h=this.components[m].constructor;h.G8||(this.DY[m]=this.components[m],delete this.components[m],
this.T.rQa(this,h,!1))}};a.dY=0;return a}()});define("tdv/player/view/webgl/ecs/Query",["require","exports"],function(){return function(){function a(){this.id=a.G4a++;this.v=[]}a.G4a=0;return a}()});
define("tdv/player/view/webgl/ecs/SystemQuery",["require","exports"],function(){return function(){function a(m,h){this.id=a.dY++;this.name=h;this.v=m.v;this.fe=m.v.slice();this.Da=[];this.Xg=[]}a.prototype.Wcb=function(){this.fe.length&&(this.fe=[]);this.Da.length&&(this.Da=[]);this.Xg.length&&(this.Xg=[])};a.dY=0;return a}()});
define("tdv/player/view/webgl/ecs/QueriesManager",["require","exports","tdv/player/view/webgl/ecs/Query","tdv/player/view/webgl/ecs/SystemQuery"],function(a,m,h,n){function g(b){return typeof b=="string"?b:b.id}function k(b,c){b.indexOf(c)<0&&b.push(c);return b}function e(b,c){c=b.indexOf(c);c>=0&&b.splice(c,1);return b}return function(){function b(){this.Sgb={};this.J={};this.fK={};this.$O={};this.sA={};this.dK={};this.OW={};this.cK={}}b.prototype.na=function(c){this.OW[c.id]={};this.OW[c.aa]={}};
b.prototype.Sdb=function(c,d){c=this.z2a(c);d=new n(c,d);this.fK[c.id].push(d);return d};b.prototype.z2a=function(c){var d=this.Xfb(c);if(d=this.Sgb[d])return d;d=new h;this.J[d.id]=d;c=c.map(g);this.cK[d.id]={};for(var f=0;f<c.length;f++){var l=c[f];this.cK[d.id][l]=!0;this.OW[l][d.id]=!0}this.dK[d.id]={};this.fK[d.id]=[];return d};b.prototype.Xfb=function(c){c=c.map(g);c.sort();return c.join("-")};b.prototype.tib=function(c){this.$O[c.id]={};this.sA[c.id]={}};b.prototype.uib=function(c){delete this.$O[c.id];
delete this.sA[c.id]};b.prototype.oib=function(c,d){var f=d.id,l=d.aa;d=c.id;this.$O[d][f]=!0;for(var p in this.sA[d])if(l in this.cK[p]){delete this.dK[p][d];delete this.sA[d][p];e(this.J[p].v,c);for(var q=this.fK[p],r=0,t=q.length;r<t;r++){var u=q[r];k(u.Xg,c);e(u.fe,c);e(u.Da,c)}}for(p in this.OW[f])if(!(d in this.dK[p])){f=!0;for(var v in this.cK[p])if(l=v[0]!="!",(l?v:v.slice(1))in this.$O[d]!=l){f=!1;break}if(f)for(this.dK[p][d]=!0,this.sA[d][p]=!0,k(this.J[p].v,c),q=this.fK[p],r=0,t=q.length;r<
t;r++)u=q[r],k(u.fe,c),e(u.Xg,c),e(u.Da,c)}};b.prototype.qib=function(c,d){var f=d.id,l="!"+f;d=c.id;delete this.$O[d][f];for(var p in this.sA[d])if(f in this.cK[p]){delete this.dK[p][d];delete this.sA[d][p];e(this.J[p].v,c);for(var q=this.fK[p],r=0,t=q.length;r<t;r++){var u=q[r];k(u.Xg,c);e(u.fe,c);e(u.Da,c)}}for(p in this.OW[l])if(!(d in this.dK[p])){f=!0;for(var v in this.cK[p])if(l=v[0]!="!",(l?v:v.slice(1))in this.$O[d]!=l){f=!1;break}if(f)for(this.dK[p][d]=!0,this.sA[d][p]=!0,this.J[p].v.push(c),
q=this.fK[p],r=0,t=q.length;r<t;r++)u=q[r],k(u.fe,c),e(u.Xg,c),e(u.Da,c)}};b.prototype.pib=function(c,d){d=d.id;var f=c.id,l;for(l in this.sA[f])if(d in this.cK[l]){f=this.fK[l];for(var p=0,q=f.length;p<q;p++)k(f[p].Da,c)}};return b}()});
define("tdv/player/view/webgl/ecs/World","require exports tdv/view/util/Animation tdv/player/view/webgl/ecs/Entity tdv/player/view/webgl/ecs/QueriesManager tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k){return function(){function e(b){this.enabled=!0;this.v={};this.UW=[];this.components={};this.yZ=[];this.eK=new g;this.l7=[];this.EE=!1;this.$J=b}e.prototype.q$=function(b){this.Qeb=b};e.prototype.dr=function(){return this.$J};e.prototype.na=function(b){this.components[b.id]=b;this.eK.na(b);
return this};e.prototype.ed=function(b,c){var d=(new b).initialize(this,c,this.yZ.length);this.yZ.push(d);for(var f in b.J)d[f]=this.eK.Sdb(b.J[f],c+"."+f);this.yZ.sort(function(l,p){return l.order-p.order});return this};e.prototype.sc=function(b){b=new n(this,b);this.v[b.id]=b;this.eK.tib(b);this.Qa();return b};e.prototype.dd=function(b){b.id in this.v&&(delete this.v[b.id],this.UW.push(b),b.Bjb(),this.Qa())};e.prototype.Sbb=function(b,c){this.eK.oib(b,c);this.Qa()};e.prototype.rQa=function(b,c,
d){this.eK.qib(b,c);d||this.l7.push(b);this.Qa()};e.prototype.Vcb=function(b,c){this.eK.pib(b,c);this.Qa()};e.prototype.Ra=function(b){this.enabled=b;this.Qa()};e.prototype.Qa=function(){this.enabled&&!this.EE&&(this.EE=!0,h.requestFrame(this.update,this,k.isPresenting?void 0:this.Qeb))};e.prototype.update=function(b){b=b||0;this.EE=!1;if(this.enabled){for(var c=(new Date).getTime(),d=0;d<this.yZ.length;d++){var f=this.yZ[d];f.Yc(b,c);for(var l in f.constructor.J)f[l].Wcb()}for(d=0;d<this.l7.length;d++)this.l7[d].$cb();
this.l7.length=0;for(d=this.UW.length-1;d>=0;d--)this.UW[d].asa==0&&(this.eK.uib(this.UW[d]),this.UW.splice(d,1))}};return e}()});define("tdv/player/view/webgl/ecs/System",["require","exports"],function(){return function(){function a(){this.order=0;this.T=null;this.name=""}a.prototype.initialize=function(m,h,n){n===void 0&&(n=0);this.T=m;this.name=h;this.order=n;return this};a.prototype.Yc=function(){};return a}()});
define("tdv/player/view/webgl/system/light/AmbientLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System".split(" "),function(a,m,h,n,g,k){a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.gg=c.gg.bind(c);c.Ca=c.Ca.bind(c);return c}P(b,e);b.prototype.Yc=function(){this.lE.v.length&&this.lE.v.slice().forEach(this.xb);this.mE.v.length&&this.mE.v.slice().forEach(this.Ca);this.Ei.Da.length&&
this.Ei.Da.slice().forEach(this.ib);this.Ei.v.length&&this.Ei.v.slice().forEach(this.gg)};b.prototype.xb=function(c){var d=c.N(g.wB),f=c.N(g.Object3D);d.light=f.sa=new h.AmbientLight;this.ib(c)};b.prototype.ib=function(c){var d=c.getComponent(g.AmbientLight);c=c.getComponent(g.wB).light;c.color=n.Ip(d.color).convertLinearToSRGB();c.intensity=d.intensity*Math.PI;c.visible=c.intensity>0};b.prototype.gg=function(){};b.prototype.Ca=function(c){var d=c.getComponent(g.wB).light;d.parent&&d.parent.remove(d);
c.ka(g.wB);c.ka(g.Object3D)};b.J={};return b}(k);a.J={};a.J.lE=[g.AmbientLight,g.wB.aa];a.J.Ei=[g.AmbientLight,g.wB];a.J.mE=[g.AmbientLight.aa,g.wB];return a});
define("tdv/player/view/webgl/system/animation/AutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(g,k,e,b,c){this.A=g;this.Ie=k;this.Zg=e;this.Hl=b;this.Na=c;this.i5()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.getAnimations=function(){return this.Zg};m.prototype.kX=function(){return this.Hl};m.prototype.frame=function(g){this.I==n.PLAYING&&(this.Gv(this.hi.time+g/1E3),this.Na())};m.prototype.dispose=
function(){this.H5();this.ZB=this.oG=this.hi=this.Na=this.Hl=this.Zg=this.Ie=this.A=null};m.prototype.i5=function(){this.hi=new THREE.AnimationMixer(this.Ie);this.ac=0;this.Sb=!1;this.oG=[];this.ZB=[];for(var g=0;g<this.Zg.length;g++){var k=this.Zg[g],e=k.get("animationDirection")=="alternate",b=this.ac;this.ac+=this.Hl[g].duration*(e?2:1);this.ZB.push({start:b,end:this.ac});b=this.hi.clipAction(this.Hl[g]);e?b.setLoop(THREE.LoopPingPong,2):b.setLoop(THREE.LoopOnce,1);this.oG.push(b);k.set("state",
n.ca);k.set("currentTime",0);k.set("duration",this.Hl[g].duration)}this.I=n.ca;this.Pm=void 0;this.A.bind(h.L("state"),this.Hj,this,!0);this.A.bind(h.L("currentTime"),this.NH,this,!0);this.A.bind(h.L("animationDirection"),this.xBa,this,!0);this.A.set("duration",this.ac);this.Gv(0);this.A.get("autoplay")&&this.A.set("state",n.PLAYING)};m.prototype.H5=function(){this.A.h(h.L("state"),this.Hj,this,!0);this.A.h(h.L("currentTime"),this.NH,this,!0);this.A.h(h.L("animationDirection"),this.xBa,this,!0);this.A.set("state",
n.ca);for(var g=0;g<this.Zg.length;g++)this.oG[g].stop(),this.hi.uncacheClip(this.Hl[g]),this.Zg[g].set("state",n.ca),this.Zg[g].set("currentTime",0);this.A.set("duration",void 0);this.A.set("currentTime",void 0)};m.prototype.xBa=function(){this.H5();this.i5()};m.prototype.Hj=function(){var g=this.A.get("state");this.I!=g&&(this.I==n.ca?g==n.$b?this.A.set("state",n.ca):g==n.PLAYING&&(this.I=n.PLAYING,this.Sb=!1,this.Gv(0),this.Na()):this.I==n.PLAYING?g==n.ca?(this.I=n.ca,this.Sb&&this.A.get("finalFrame")==
"last"?this.Gv(this.ac):this.Gv(0)):g==n.$b&&(this.I=n.$b):this.I==n.$b&&(g==n.PLAYING?(this.I=n.PLAYING,this.Na()):g==n.ca&&(this.I=n.ca,this.Gv(0))),this.Pm!==void 0&&this.Zg[this.Pm].set("state",this.I),this.A.set("state",this.I))};m.prototype.NH=function(){var g=this.A.get("currentTime");this.hi.time!=g&&(this.I!=n.ca&&this.Gv(g),this.A.set("currentTime",this.hi.time))};m.prototype.Gv=function(g){if(this.hi.time!=g||this.Pm===void 0)if(g>this.ac)this.A.get("loop")?this.A.set("currentTime",g%this.ac):
(this.Sb=!0,this.A.o(h.Ub),this.A.set("state",n.ca));else{for(var k=this.Pm||0;g>this.ZB[k].end;)k++;for(;g<this.ZB[k].start;)k--;if(this.Pm!==k){for(var e=this.Pm||0;e<k;e++){var b=this.Zg[e],c=this.oG[e],d=this.ZB[e];b.get("finalFrame")=="last"&&b.get("animationDirection")=="normal"?(c.reset(),c.startAt(d.start),b.set("currentTime",b.get("duration")),c.clampWhenFinished=!0,c.play()):(b.set("currentTime",0),c.stop(),c.clampWhenFinished=!1);b.set("state",n.ca)}b=this.Zg[k];c=this.oG[k];d=this.ZB[k];
c.reset();c.startAt(d.start);c.clampWhenFinished=b.get("finalFrame")=="last"&&b.get("animationDirection")=="normal";c.play();for(e=this.Pm||0;e>k;e--)b=this.Zg[e],c=this.oG[e],b.set("currentTime",0),c.stop();this.Pm=k}else c=this.oG[this.Pm],g<this.hi.time&&(c.reset(),c.startAt(this.ZB[this.Pm].start)),c.paused=!1;this.hi.update(g-this.hi.time);b=this.Zg[this.Pm];b.set("state",this.I);g=this.hi.time-this.ZB[this.Pm].start;b=b.get("duration");k=g>b;this.Zg[this.Pm].set("currentTime",k?2*b-g:g);this.Zg[this.Pm].set("currentDirection",
k?"backward":"forward");this.A.set("currentTime",this.hi.time);this.Na()}};return m});
define("tdv/player/view/webgl/system/animation/NonAutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(g,k,e,b,c){this.A=g;this.Ie=k;this.Zg=e;this.Hl=b;this.Na=c;this.xia=this.xia.bind(this);this.oia=this.oia.bind(this);this.i5()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.dispose=function(){this.H5();this.Na=this.Hl=this.Zg=this.Ie=this.A=null};m.prototype.getAnimations=function(){return this.Zg};m.prototype.kX=
function(){return this.Hl};m.prototype.frame=function(g){this.Sx.length>0&&(this.hi.update(g/1E3),this.Sx.forEach(function(k){this.Pva(k)}.bind(this)),this.Na())};m.prototype.i5=function(){this.hi=new THREE.AnimationMixer(this.Ie);this.hi.addEventListener("loop",this.xia);this.hi.addEventListener("finished",this.oia);this.Rx=new Map;this.T_=new Map;this.Sx=[];for(var g=0;g<this.Zg.length;g++){var k=this.Zg[g],e=this.Hl[g];this.T_.set(k,e);var b=this.hi.clipAction(e);this.Rx.set(k,b);k.set("duration",
e.duration);k.set("currentTime",k.get("currentTime")||0);k.set("currentDirection","forward");k.bind(h.L("state"),this.kBa,this,!0);k.bind(h.L("animationDirection"),this.hBa,this,!0);k.bind(h.L("currentTime"),this.gBa,this,!0);k.bind(h.L("currentDirection"),this.fBa,this,!0);k.bind(h.L("loop"),this.jBa,this,!0);k.bind(h.L("finalFrame"),this.iBa,this,!0);this.$N(k);this.zGa(k)}this.Na()};m.prototype.H5=function(){for(var g=0;g<this.Zg.length;g++){var k=this.Zg[g];k.h(h.L("state"),this.kBa,this,!0);
k.h(h.L("animationDirection"),this.hBa,this,!0);k.h(h.L("currentTime"),this.gBa,this,!0);k.h(h.L("currentDirection"),this.fBa,this,!0);k.h(h.L("loop"),this.jBa,this,!0);k.h(h.L("finalFrame"),this.iBa,this,!0);this.Rx.get(k).stop();this.Rx["delete"](k);this.hi.uncacheClip(this.T_.get(k));this.T_["delete"](k);this.Zg[g].set("state",n.ca);this.Zg[g].set("currentTime",0)}this.hi=this.T_=this.Rx=null};m.prototype.xia=function(g){this.Rx.forEach(function(k,e){g.action==k&&e.get("loop")&&e.o(h.Vr)})};m.prototype.oia=
function(g){this.Rx.forEach(function(k,e){g.action==k&&(this.Pva(e),e.set("state",n.ca),e.get("animationDirection")=="alternate"&&e.set("currentDirection",e.get("currentDirection")=="forward"?"backward":"forward"),e.o(h.Ub))}.bind(this))};m.prototype.hBa=function(g){this.$N(g.source)};m.prototype.jBa=function(g){this.$N(g.source)};m.prototype.iBa=function(g){this.$N(g.source)};m.prototype.fBa=function(g){this.$N(g.source)};m.prototype.gBa=function(g){this.$N(g.source)};m.prototype.Pva=function(g){this.Nva=
!0;var k=this.Rx.get(g),e=g.get("animationDirection")=="alternate";e=k._loopCount>0&&k._loopCount%2==1&&e;g.set("currentDirection",e?"backward":"forward");k=k.time;var b=g.get("duration");e?g.set("currentTime",b-k):g.set("currentTime",k);this.Nva=!1};m.prototype.$N=function(g){if(!this.Nva){var k=this.Rx.get(g),e=g.get("animationDirection")=="alternate",b=g.get("currentDirection")=="backward"&&e,c=g.get("loop"),d=g.get("finalFrame")=="last",f=g.get("currentTime");g=g.get("duration");c?(k.loop=e?THREE.LoopPingPong:
THREE.LoopRepeat,k.repetitions=Infinity,k.clampWhenFinished=!1):b?(k.loop=THREE.LoopPingPong,k.repetitions=2,k.clampWhenFinished=!1):(k.loop=THREE.LoopOnce,k.repetitions=1,k.clampWhenFinished=d||e);e=!e||k._loopCount!=-1&&k._loopCount%2!=0?e&&k._loopCount%2==1?g-f:f:b?g+g-f:f;k.time!=e&&(k.time=e,k.paused&&k.enabled&&e==0&&k.stop());this.Na()}};m.prototype.kBa=function(g){this.zGa(g.source)};m.prototype.zGa=function(g){var k=this.Rx.get(g),e=g.get("state");var b=this.Sx.indexOf(g)>=0?n.PLAYING:k.paused&&
k.enabled&&k.time<g.get("duration")?n.$b:n.ca;b!=e&&(b==n.PLAYING?e==n.$b?(this.Sx.splice(this.Sx.indexOf(g),1),k.paused=!0):e==n.ca&&(this.Sx.splice(this.Sx.indexOf(g),1),!k.paused&&k.enabled&&k.stop()):b==n.$b?e==n.PLAYING?(this.Sx.push(g),k.paused=!1):e==n.ca&&k.stop():b==n.ca&&(e==n.PLAYING?(this.Sx.push(g),k.paused&&k.enabled&&g.get("animationDirection")=="alternate"&&g.get("currentDirection")=="backward"?k.paused=!1:(k.reset(),k.play(),k.fadeIn(.1))):e==n.$b&&(k.play(),k.paused=!0,this.hi.update(0))),
g.set("state",e),this.Na())};return m});define("tdv/player/view/util/geo/Fov",["require","exports"],function(){return function(){function a(){}a.wm=function(m,h,n){return this.jJ(m,h,n)};a.Ar=function(m,h,n){return this.jJ(m,n,h)};a.jJ=function(m,h,n){return 2*Math.atan(n*Math.tan(m*this.bG*.5)/h)*this.oWa};a.oWa=180/Math.PI;a.bG=Math.PI/180;return a}()});
define("tdv/player/view/webgl/system/util/entity/Util",["require","exports","tdv/player/view/webgl/components","tdv/player/view/util/geo/Fov","three.mod"],function(a,m,h,n,g){return function(){function k(){}k.Rc=function(e){return e?e.isObject3D?e:(e=e.getComponent(h.Object3D))?e.sa:null:null};k.getWorldPosition=function(e,b){b=b||new g.Vector3;e=this.Rc(e);if(!e)return null;b.setFromMatrixPosition(e.matrixWorld);return b};k.fZ=function(e,b){(e=e.getComponent(h.Object3D))&&e.sa!==null&&(e=e.sa,e.matrixAutoUpdate=
!1,e.matrixWorldNeedsUpdate=!1,b.cA&&e.parent?(e.parent.updateWorldMatrix(!0,!1),e.matrix.copy(e.parent.matrixWorld).invert()):e.matrix.identity(),e.matrix.multiply(this.S8.makeTranslation(b.translationX,b.translationY,b.Ze)),e.matrix.multiply(this.S8.makeRotationFromEuler(this.Ceb.set(b.Yd*this.bG,b.fd*this.bG,b.Xe*this.bG,b.mf))),e.matrix.multiply(this.S8.makeTranslation(b.positionX,b.positionY,b.positionZ)),e.matrix.multiply(this.S8.makeScale(b.scale*b.Le,b.scale*b.Ye,b.scale*b.Gh)),e.updateMatrixWorld(!0),
e.matrix.decompose(e.position,e.quaternion,e.scale))};k.kX=function(e){if(!e)return[];e=e.getComponent(h.Pi);return(e=e===null||e===void 0?void 0:e.Loa)?e.animations||[]:[]};k.mX=function(e){return e.getComponent(h.Cu)||e.getComponent(h.Sk)};k.Bt=function(e){var b=e.getComponent(h.Cu);return b?b.camera:(e=e.getComponent(h.Sk))?e.zl||e.camera:null};k.Sf=function(e){return this.sX(this.Rc(e))};k.sX=function(e){for(;e&&!e.isScene;)e=e.parent;return e};k.Dlb=function(e,b){e.userData.camera=b};k.Glb=function(e,
b,c){e.userData.width=b;e.userData.height=c};k.Elb=function(e,b){e.userData.colorSpace!==b&&(e.userData.colorSpace=b,this.Isa(e))};k.Flb=function(e,b){e.userData.WKa!==b&&(e.userData.WKa=b,this.Isa(e))};k.uw=function(e){return e.userData.camera};k.vX=function(e){return e.userData.width};k.dE=function(e){return e.userData.height};k.uX=function(e){return e.userData.colorSpace};k.H$=function(e,b){e.userData.background!==b&&(e.userData.background=b,this.Isa(e))};k.Isa=function(e){if(e&&e.userData){var b=
e.userData.background,c=e.userData.colorSpace,d=e.userData.WKa;b&&b.isColor?e.background=c==g.SRGBColorSpace||d?b:b.clone().convertLinearToSRGB():(b&&b.isTexture&&(b.colorSpace=c==g.SRGBColorSpace?g.SRGBColorSpace:g.LinearSRGBColorSpace),e.background=b)}};k.Pbb=function(e,b){var c=e.userData.Xra||(e.userData.Xra=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.maa(e))};k.Hqa=function(e,b){var c=e.userData.Xra;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};k.maa=function(e){var b=e.userData.Xra;
if(b){var c=-e.far*.99;b.forEach(function(d){d.position.z=c})}};k.Rbb=function(e,b){var c=e.userData.Sra||(e.userData.Sra=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.oTa(e))};k.oQa=function(e,b){var c=e.userData.Sra;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};k.oTa=function(e){var b=e.userData.Sra;if(b){var c=e.far*.99;b.forEach(function(d){d.scale.x=d.scale.y=d.scale.z=c})}};k.Qbb=function(e,b){var c=e.userData.Tpa||(e.userData.Tpa=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.nTa(e))};
k.nQa=function(e,b){var c=e.userData.Tpa;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};k.nTa=function(e){var b=e.userData.Tpa;if(b){var c=e.near*1.001;b.forEach(function(d){d.position.z=-c;d.scale.x=d.scale.y=d.scale.z=2*Math.tan((e.aspect>1?n.Ar(e.fov,e.aspect,1):e.fov)*this.bG*.5)*c*2}.bind(this))}};k.wJ=function(e){if((e=this.Rc(e))&&e.parent){var b=this.aMa(e);if(b)return this.fY.setFromMatrixScale(e.parent.matrixWorld),b/Math.max(this.fY.x,this.fY.y,this.fY.z)}};k.aMa=function(e){if((e=
this.Rc(e))&&e.parent){var b=this.sX(e);if(b){var c=this.uw(b);if(c)return e.matrixWorld.decompose(this.objectPosition,this.jib,this.fY),this.objectPosition.applyMatrix4(c.matrixWorldInverse),this.zi.setFromMatrixScale(c.matrixWorld),Math.abs(this.objectPosition.z)*2*Math.tan(c.fov*this.bG/2)*Math.max(this.zi.x,this.zi.y,this.zi.z)/this.dE(b)}}};k.ZD=function(e,b){if(e.userData.id===b)return e;for(var c=e;!c.userData.OO&&c.parent;)c=c.parent;if(c&&c.userData.OO&&c.userData.OO.has(b))return c.userData.OO.get(b);
c=null;if(e.children)for(var d=0;d<e.children.length&&!c;d++)c=this.ZD(e.children[d],b);if(!c&&e.skeleton)for(d=0;d<e.skeleton.bones.length&&!c;d++)c=this.ZD(e.skeleton.bones[d],b);return c};k.hLa=function(){this.Tna||(this.Tna=new g.WebGLRenderer);return this.Tna};k.QRa=function(e){this.Nna||(this.Nna=new g.DRACOLoader,this.Nna.setDecoderPath(g.kta));this.K8||(this.K8=new g.KTX2Loader,this.K8.setTranscoderPath(g.bta),this.K8.detectSupport(this.hLa()));e.setKTX2Loader(this.K8);e.setMeshoptDecoder(g.MeshoptDecoder);
e.setDRACOLoader(this.Nna);return e};k.S8=new g.Matrix4;k.Ceb=new g.Euler;k.objectPosition=new g.Vector3;k.jib=new g.Quaternion;k.fY=new g.Vector3;k.zi=new g.Vector3;k.bG=Math.PI/180;k.Tna=null;return k}()});
define("tdv/player/view/webgl/system/animation/Behaviour","require tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/webgl/components tdv/player/script/Model3DAnimation tdv/player/view/webgl/system/animation/AutoplayController tdv/player/view/webgl/system/animation/NonAutoplayController tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(f){this.B=f;this.Hl=this.Ie=null;this.U_={};this.W0=new Map;this.ov=this.Qm=this.A=null;this.ih=!1;this.ET=this.ET.bind(this);
this.update()}function h(f,l){if(f==l||!(f!=null&&f.length!=0||l!=null&&l.length!=0))return!0;if(f==null||l==null||f.length!=l.length)return!1;for(var p=0;p<f.length;p++)if(f[p]!=l[p])return!1;return!0}var n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/script/Model3DAnimation"),b=a("tdv/player/view/webgl/system/animation/AutoplayController"),c=a("tdv/player/view/webgl/system/animation/NonAutoplayController"),d=a("tdv/player/view/webgl/system/util/entity/Util");
m.prototype.update=function(){var f=this.B.getComponent(k.Animation);this.Oj(f&&f.properties)};m.prototype.frame=function(f,l){this.eO();this.ih&&(this.ih=!1,this.Qm&&this.Qm.frame(f,l),this.ov&&this.ov.frame(f,l))};m.prototype.dispose=function(){this.Oj(null)};m.prototype.Oj=function(f){this.A!=f&&(this.A&&(n.da(this.A,["animations.autoplay"],this.ET),this.t7a()),(this.A=f)&&n.KD(this.A,["animations.autoplay"],this.ET),this.ET())};m.prototype.ET=function(){this.HGa()};m.prototype.eO=function(){if(!this.Ie){var f=
d.Rc(this.B),l=d.kX(this.B);if(this.Ie!=f||this.Hl!=l)this.Ie=f,this.Hl=l,this.U_={},this.Hl.forEach(function(p){p.name&&(this.U_[p.name]=p)}.bind(this)),this.HGa()}};m.prototype.HGa=function(){var f=this.A&&this.A.get("animations")||[],l=this.Hl||[],p=l.slice(),q=[],r=[],t=[],u=[];f.length&&l.length&&f.forEach(function(v){var w=v.get("index"),x=v.get("name"),y;w!==void 0&&w<l.length?y=l[w]:x!==void 0&&x in this.U_&&(y=this.U_[x]);p.indexOf(y)>=0&&(p.splice(p.indexOf(y),1),v.get("autoplay")?(q.push(y),
r.push(v)):(t.push(y),u.push(v)))}.bind(this));this.A&&r.length==0&&p.length>0&&(r=p.map(function(v){if(this.W0.has(v))return this.W0.get(v);var w=new e;this.W0.set(v,w);return w}.bind(this)),q=p);h(this.Qm&&this.Qm.getAnimations()||[],r)&&h(this.Qm&&this.Qm.kX()||[],q)||(this.Qm&&(this.Qm.dispose(),this.Qm=null),r.length>0&&(this.Qm=new b(this.A,this.Ie,r,q,this.Na.bind(this))));h(this.ov&&this.ov.getAnimations()||[],u)&&h(this.ov&&this.ov.kX()||[],t)||(this.ov&&(this.ov.dispose(),this.ov=null),
u.length>0&&(this.ov=new c(this.A,this.Ie,u,t,this.Na.bind(this))))};m.prototype.t7a=function(){(this.A&&this.A.get("animations")||[]).forEach(function(f){f.set("state",g.ca);f.set("currentTime",0)});this.W0.clear()};m.prototype.Na=function(){this.ih||(this.ih=!0,this.B.T.Qa())};m.Wa=function(f){f.N(k.mx).manager=new m(f)};m.ya=function(f){var l=f.getComponent(k.mx);l.manager.dispose();l.manager=null;f.ka(k.mx)};m.update=function(f){f.getComponent(k.mx).manager.update()};m.frame=function(f,l,p){f.getComponent(k.mx).manager.frame(l,
p)};return m});
define("tdv/player/view/webgl/system/animation/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/animation/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/animation/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(k,e){this.nIa.v.length&&this.nIa.v.slice().forEach(g.Wa);this.animations.Da.length&&
this.animations.Da.slice().forEach(function(b){g.update(b,k,e)});this.animations.v.length&&this.animations.v.slice().forEach(function(b){g.frame(b,k,e)});this.oIa.v.length&&this.oIa.v.slice().forEach(g.ya)};a.J={};a.J.nIa=[n.Animation,n.mx.aa];a.J.oIa=[n.Animation.aa,n.mx];a.J.animations=[n.Animation,n.mx];return a});
define("tdv/player/view/webgl/system/aranchor/System","require exports three.mod tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k){a=function(l){function p(){var q=l.call(this)||this;q.xb=q.xb.bind(q);q.ib=q.ib.bind(q);q.Ca=q.Ca.bind(q);return q}P(p,l);p.prototype.Yc=function(){this.wIa.v.length&&this.wIa.v.slice().forEach(this.xb);this.vIa.v.length&&this.vIa.v.slice().forEach(this.ib);this.xIa.v.length&&this.xIa.v.slice().forEach(this.Ca);
this.yIa.v.length&&this.yIa.v.slice().forEach(this.Ca)};p.prototype.xb=function(q){q.N(g.lx);this.ib(q)};p.prototype.ib=function(q){var r=q.N(g.Object3D).sa,t=q.getComponent(g.lx);k.isPresenting&&k.Em==k.Fl.Np?t.anchor&&t.anchor instanceof XRAnchor&&k.YI.has(t.anchor)?(r.visible=!0,r.matrixAutoUpdate=!1,q=k.YI.get(t.anchor),t.fd||(e.copy(k.Ec).applyMatrix4(d.copy(q).invert()).normalize(),c.setFromQuaternion(b.setFromUnitVectors(f,e),"YXZ"),t.fd=(new h.Matrix4).makeRotationY(c.y)),r.matrix.identity().multiply(q).multiply(t.fd),
this.ona(t)):t.anchor&&t.anchor instanceof Promise?(r.visible=!1,this.Nnb(t,r.parent)):(r.visible=!1,t.anchor=k.Ujb().then(function(u){t.anchor=u}).catch(function(u){console.error(u);t.anchor=null})):(r.visible=!0,r.matrixAutoUpdate=!0,r.matrix.identity(),this.jJa(t),this.ona(t))};p.prototype.Nnb=function(q,r){if(r){for(;q.EJ.length>k.ud.length;)q.EJ.pop().removeFromParent();for(;q.EJ.length<k.ud.length;){var t=this.Edb();r.add(t);q.EJ.push(t)}for(r=0;r<k.ud.length;r++){var u=k.ud[r];u.i8||k.HRa(u,
!0);t=q.EJ[r];u.It?(t.visible=!0,t.children[0].scale.set(k.zi,k.zi,k.zi),t.matrix.copy(u.It)):t.visible=!1}}};p.prototype.Edb=function(){var q=new h.Mesh(new h.RingGeometry(.1,.125,60),new h.MeshBasicMaterial({color:16777215,depthWrite:!1,depthTest:!1,transparent:!0,side:h.DoubleSide}));q.rotation.x=-Math.PI/2;var r=new h.Group;r.matrixAutoUpdate=!1;r.add(q);return r};p.prototype.ona=function(q){for(;q.EJ.length;)q.EJ.pop().removeFromParent();k.ud.forEach(function(r){return k.HRa(r,!1)})};p.prototype.jJa=
function(q){q.anchor&&(q.anchor instanceof XRAnchor?k.keb(q.anchor):q.anchor instanceof Promise&&k.Lcb(),q.anchor=null)};p.prototype.Ca=function(q){var r=q.getComponent(g.lx);this.ona(r);this.jJa(r);q.ka(g.lx)};p.J={};return p}(n);var e=new h.Vector3,b=new h.Quaternion,c=new h.Euler,d=new h.Matrix4,f=new h.Vector3(0,0,1);a.J={};a.J.wIa=[g.pF,g.Object3D,g.lx.aa];a.J.vIa=[g.pF,g.Object3D,g.lx];a.J.xIa=[g.pF.aa,g.lx];a.J.yIa=[g.Object3D.aa,g.lx];return a});
define("tdv/player/view/util/geo/Tessellate",["require"],function(){function a(v,w,x,y,z){for(var A,D=0,F=w,C=x-y;F<x;F+=y)D+=(v[C]-v[F])*(v[F+1]+v[C+1]),C=F;if(z===D>0)for(z=w;z<x;z+=y)A=r(z,v[z],v[z+1],A);else for(z=x-y;z>=w;z-=y)A=r(z,v[z],v[z+1],A);A&&c(A,A.next)&&(t(A),A=A.next);return A}function m(v,w){if(!v)return v;w||(w=v);do{var x=!1;if(v.uSa||!c(v,v.next)&&b(v.Xd,v,v.next)!==0)v=v.next;else{t(v);v=w=v.Xd;if(v===v.next)break;x=!0}}while(x||v!==w);return w}function h(v,w,x,y,z,A,D){if(v){if(!D&&
A){var F=v,C=F;do C.z===0&&(C.z=k(C.x,C.y,y,z,A)),C.Vt=C.Xd,C=C.Rn=C.next;while(C!==F);C.Vt.Rn=null;C.Vt=null;F=C;var B,H,E,G,N=1;do{C=F;var O=F=null;for(H=0;C;){H++;var R=C;for(B=E=0;B<N&&(E++,R=R.Rn,R);B++);for(G=N;E>0||G>0&&R;)E!==0&&(G===0||!R||C.z<=R.z)?(B=C,C=C.Rn,E--):(B=R,R=R.Rn,G--),O?O.Rn=B:F=B,B.Vt=O,O=B;C=R}O.Rn=null;N*=2}while(H>1)}for(F=v;v.Xd!==v.next;){C=v.Xd;R=v.next;if(A)O=n(v,y,z,A);else a:{var Q=v;O=Q.Xd;G=Q.next;if(b(O,Q,G)>=0)O=!1;else{H=O.x;E=Q.x;N=G.x;B=O.y;Q=Q.y;var K=G.y,
L=H<E?H<N?H:N:E<N?E:N,U=B<Q?B<K?B:K:Q<K?Q:K,T=H>E?H>N?H:N:E>N?E:N,Y=B>Q?B>K?B:K:Q>K?Q:K;for(G=G.next;G!==O;){if(G.x>=L&&G.x<=T&&G.y>=U&&G.y<=Y&&e(H,B,E,Q,N,K,G.x,G.y)&&b(G.Xd,G,G.next)>=0){O=!1;break a}G=G.next}O=!0}}if(O)w.push(C.Dh/x|0),w.push(v.Dh/x|0),w.push(R.Dh/x|0),t(v),F=v=R.next;else if(v=R,v===F){if(D)if(D===1){v=m(v);D=w;F=x;C=v;do R=C.Xd,O=C.next.next,!c(R,O)&&d(R,C,C.next,O)&&p(R,O)&&p(O,R)&&(D.push(R.Dh/F|0),D.push(C.Dh/F|0),D.push(O.Dh/F|0),t(C),t(C.next),C=v=O),C=C.next;while(C!==
v);v=m(C);h(v,w,x,y,z,A,2)}else{if(D===2)a:{D=v;do{for(F=D.next.next;F!==D.Xd;){if(C=D.Dh!==F.Dh){C=D;R=F;if(O=C.next.Dh!==R.Dh&&C.Xd.Dh!==R.Dh){b:{O=C;do{if(O.Dh!==C.Dh&&O.next.Dh!==C.Dh&&O.Dh!==R.Dh&&O.next.Dh!==R.Dh&&d(O,O.next,C,R)){O=!0;break b}O=O.next}while(O!==C);O=!1}O=!O}if(O){if(O=p(C,R)&&p(R,C)){O=C;H=!1;E=(C.x+R.x)/2;N=(C.y+R.y)/2;do O.y>N!==O.next.y>N&&O.next.y!==O.y&&E<(O.next.x-O.x)*(N-O.y)/(O.next.y-O.y)+O.x&&(H=!H),O=O.next;while(O!==C);O=H}O=O&&(b(C.Xd,C,R.Xd)||b(C,R.Xd,R))||c(C,
R)&&b(C.Xd,C,C.next)>0&&b(R.Xd,R,R.next)>0}C=O}if(C){v=q(D,F);D=m(D,D.next);v=m(v,v.next);h(D,w,x,y,z,A,0);h(v,w,x,y,z,A,0);break a}F=F.next}D=D.next}while(D!==v)}}else h(m(v),w,x,y,z,A,1);break}}}}function n(v,w,x,y){var z=v.Xd,A=v.next;if(b(z,v,A)>=0)return!1;var D=z.x,F=v.x,C=A.x,B=z.y,H=v.y,E=A.y,G=D<F?D<C?D:C:F<C?F:C,N=B<H?B<E?B:E:H<E?H:E,O=D>F?D>C?D:C:F>C?F:C,R=B>H?B>E?B:E:H>E?H:E,Q=k(G,N,w,x,y);w=k(O,R,w,x,y);x=v.Vt;for(v=v.Rn;x&&x.z>=Q&&v&&v.z<=w;){if(x.x>=G&&x.x<=O&&x.y>=N&&x.y<=R&&x!==z&&
x!==A&&e(D,B,F,H,C,E,x.x,x.y)&&b(x.Xd,x,x.next)>=0)return!1;x=x.Vt;if(v.x>=G&&v.x<=O&&v.y>=N&&v.y<=R&&v!==z&&v!==A&&e(D,B,F,H,C,E,v.x,v.y)&&b(v.Xd,v,v.next)>=0)return!1;v=v.Rn}for(;x&&x.z>=Q;){if(x.x>=G&&x.x<=O&&x.y>=N&&x.y<=R&&x!==z&&x!==A&&e(D,B,F,H,C,E,x.x,x.y)&&b(x.Xd,x,x.next)>=0)return!1;x=x.Vt}for(;v&&v.z<=w;){if(v.x>=G&&v.x<=O&&v.y>=N&&v.y<=R&&v!==z&&v!==A&&e(D,B,F,H,C,E,v.x,v.y)&&b(v.Xd,v,v.next)>=0)return!1;v=v.Rn}return!0}function g(v,w){return v.x-w.x}function k(v,w,x,y,z){v=(v-x)*z|0;
w=(w-y)*z|0;v=(v|v<<8)&16711935;v=(v|v<<4)&252645135;v=(v|v<<2)&858993459;w=(w|w<<8)&16711935;w=(w|w<<4)&252645135;w=(w|w<<2)&858993459;return(v|v<<1)&1431655765|((w|w<<1)&1431655765)<<1}function e(v,w,x,y,z,A,D,F){return(z-D)*(w-F)>=(v-D)*(A-F)&&(v-D)*(y-F)>=(x-D)*(w-F)&&(x-D)*(A-F)>=(z-D)*(y-F)}function b(v,w,x){return(w.y-v.y)*(x.x-w.x)-(w.x-v.x)*(x.y-w.y)}function c(v,w){return v.x===w.x&&v.y===w.y}function d(v,w,x,y){var z=l(b(v,w,x)),A=l(b(v,w,y)),D=l(b(x,y,v)),F=l(b(x,y,w));return z!==A&&D!==
F||z===0&&f(v,x,w)||A===0&&f(v,y,w)||D===0&&f(x,v,y)||F===0&&f(x,w,y)?!0:!1}function f(v,w,x){return w.x<=Math.max(v.x,x.x)&&w.x>=Math.min(v.x,x.x)&&w.y<=Math.max(v.y,x.y)&&w.y>=Math.min(v.y,x.y)}function l(v){return v>0?1:v<0?-1:0}function p(v,w){return b(v.Xd,v,v.next)<0?b(v,w,v.next)>=0&&b(v,v.Xd,w)>=0:b(v,w,v.Xd)<0||b(v,v.next,w)<0}function q(v,w){var x=new u(v.Dh,v.x,v.y),y=new u(w.Dh,w.x,w.y),z=v.next,A=w.Xd;v.next=w;w.Xd=v;x.next=z;z.Xd=x;y.next=x;x.Xd=y;A.next=y;y.Xd=A;return y}function r(v,
w,x,y){v=new u(v,w,x);y?(v.next=y.next,v.Xd=y,y.next.Xd=v,y.next=v):(v.Xd=v,v.next=v);return v}function t(v){v.next.Xd=v.Xd;v.Xd.next=v.next;v.Vt&&(v.Vt.Rn=v.Rn);v.Rn&&(v.Rn.Vt=v.Vt)}function u(v,w,x){this.Dh=v;this.x=w;this.y=x;this.next=this.Xd=null;this.z=0;this.Rn=this.Vt=null;this.uSa=!1}return function(v,w,x){x=x||2;var y=w&&w.length,z=y?w[0]*x:v.length,A=a(v,0,z,x,!0),D=[];if(!A||A.next===A.Xd)return D;var F;if(y){var C=A;var B=x;A=[];var H;y=0;for(H=w.length;y<H;y++){var E=w[y]*B;var G=y<
H-1?w[y+1]*B:v.length;E=a(v,E,G,B,!1);E===E.next&&(E.uSa=!0);G=A;var N=G.push,O=E,R=E;do{if(O.x<R.x||O.x===R.x&&O.y<R.y)R=O;O=O.next}while(O!==E);N.call(G,R)}A.sort(g);for(y=0;y<A.length;y++){B=void 0;w=A[y];b:{H=C;E=w.x;G=w.y;N=-Infinity;do{if(G<=H.y&&G>=H.next.y&&H.next.y!==H.y&&(O=H.x+(G-H.y)*(H.next.x-H.x)/(H.next.y-H.y),O<=E&&O>N&&(N=O,B=H.x<H.next.x?H:H.next,O===E)))break b;H=H.next}while(H!==C);if(B){R=B;var Q=B.x,K=B.y,L=Infinity;H=B;do{if(E>=H.x&&H.x>=Q&&E!==H.x&&e(G<K?E:N,G,Q,K,G<K?N:E,
G,H.x,H.y)){O=Math.abs(G-H.y)/(E-H.x);var U;if((U=p(H,w))&&!(U=O<L)&&(U=O===L)&&!(U=H.x>B.x)&&(U=H.x===B.x)){U=B;var T=H;U=b(U.Xd,U,T.Xd)<0&&b(T.next,U,U.next)<0}U&&(B=H,L=O)}H=H.next}while(H!==R)}else B=null}B&&(w=q(B,w),m(w,w.next),C=m(B,B.next))}A=C}if(v.length>80*x){var Y=F=v[0];var aa=y=v[1];for(C=x;C<z;C+=x)w=v[C],B=v[C+1],w<Y&&(Y=w),B<aa&&(aa=B),w>F&&(F=w),B>y&&(y=B);F=Math.max(F-Y,y-aa);F=F!==0?32767/F:0}h(A,D,x,Y,aa,F,0);return D}});
define("tdv/player/view/webgl/system/util/material/Util",["require","exports","three.mod"],function(a,m,h){return function(){function n(){}n.Nfb=function(g){return g.userData.Pt||g.material};n.ND=function(g,k){if(g.material!=k&&g.userData.Pt!=k){var e=g.userData.ZX,b=g.userData.Cpa;this.IY(g);g.material=k;b?this.HJa(g):e&&this.Zna(g);g.needsUpdate=!0}};n.Zna=function(g,k){k===void 0&&(k=null);g.userData.ZX||(g.userData.ZX=!0,g.userData.Pt=g.material,g.material=k||this.ldb(g.material))};n.IY=function(g){g.userData.ZX&&
(this.qeb(g.material),g.material=g.userData.Pt,delete g.userData.Pt,delete g.userData.ZX,delete g.userData.Cpa)};n.wnb=function(g){if(g.userData.ZX){var k=g.userData.Pt;g=g.material;g.side=k.side;g.depthTest=k.depthTest;g.map&&k.map&&(g.map.colorSpace=k.map.colorSpace);g.emissiveMap&&k.emissiveMap&&(g.emissiveMap.colorSpace=k.emissiveMap.colorSpace)}};n.HJa=function(g){this.zgb(g)||(this.IY(g),this.Zna(g,this.jdb(g.material)),g.userData.Cpa=!0)};n.zgb=function(g){return!(!g.userData.Cpa&&g.material&&
!this.y8(g.material))};n.y8=function(g){return Array.isArray(g)?!!g.every(function(k){return n.y8(k)}):g?!(g.isMeshPhysicalMaterial||g.isMeshStandardMaterial):!1};n.jdb=function(g){return Array.isArray(g)?g.map(function(k){return n.sJa(k)}):g?this.sJa(g):g};n.sJa=function(g){return(new h.MeshBasicMaterial).copy(g)};n.ldb=function(g){return Array.isArray(g)?g.map(function(k){return k.clone()}):g?g.clone():g};n.qeb=function(g){Array.isArray(g)?g.forEach(function(k){k.dispose()}):g&&g.dispose()};return n}()});
define("tdv/player/view/webgl/system/area/System","require tdv/utils tdv/constants/EventName tdv/player/view/util/geo/Tessellate tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/util/geo/Tessellate"),g=a("tdv/player/view/webgl/ecs/System"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(g,function(){g.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this);this.paa=this.paa.bind(this)});a.prototype.Yc=function(){this.AIa.v.length&&this.AIa.v.slice().forEach(this.xb);this.zIa.Da.length&&this.qnb(this.zIa.Da.slice());this.areas.Da.length&&this.areas.Da.slice().forEach(this.ib);this.BIa.v.length&&this.BIa.v.slice().forEach(this.Ca);this.CIa.v.length&&this.CIa.v.slice().forEach(this.Ca)};
a.prototype.xb=function(E){E.N(k.xB);this.ib(E)};a.prototype.ib=function(E){this.Jnb(E);this.io(E)};a.prototype.qnb=function(E){var G=[];E.forEach(function(N){N.getComponent(k.sF).F6.forEach(function(O){G.indexOf(O)===-1&&G.push(O)})});G.forEach(this.paa)};a.prototype.Jnb=function(E){this.Unb(E);this.paa(E)};a.prototype.Unb=function(E){var G=E.getComponent(k.lo),N=G&&G.v||[],O=(G=E.getComponent(k.xB))&&G.v||[];O.forEach(function(R){if(N.indexOf(R)===-1){var Q=R.getComponent(k.sF).F6.filter(function(K){return K!==
K});Q.length==0?R.ka(k.sF):R.O(k.sF).F6=Q}});N.forEach(function(R){O.indexOf(R)===-1&&R.O(k.sF,!0).F6.push(E)})};var c=new THREE.Matrix4,d=[];a.prototype.paa=function(E){var G=E.getComponent(k.lo);for(G=G&&G.v||[];d.length<G.length;)d.push(new THREE.Vector3);var N=G.map(function(L,U){return L.getComponent(k.Object3D).sa.getWorldPosition(d[U])});N=N.filter(function(L,U){return L.distanceTo(N[(U+1)%N.length])>1E-4});G=this.egb(N);if(G.length===0)this.Bxa(E),this.lGa(E);else{this.G8a(E,G.length*3);this.Wnb(E,
d,G);c.copy(E.getComponent(k.Object3D).sa.matrixWorld).invert();d.forEach(function(L){L.applyMatrix4(c)});E=E.getComponent(k.Geometry);for(var O=E.geometry.attributes.position.array,R=0,Q=0;R<G.length;){var K=d[G[R++]];O[Q++]=K.x;O[Q++]=K.y;O[Q++]=K.z;K=d[G[R++]];O[Q++]=K.x;O[Q++]=K.y;O[Q++]=K.z;K=d[G[R++]];O[Q++]=K.x;O[Q++]=K.y;O[Q++]=K.z}E.geometry.attributes.position.needsUpdate=!0}};var f=new THREE.Plane,l=new THREE.Vector3,p=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Line3,t=new THREE.Vector3,
u=new THREE.Vector3,v=new THREE.Vector3,w=new THREE.Vector3,x=new THREE.Vector3,y=5*Math.PI/180;a.prototype.egb=function(E){if(E.length<3)return[];var G=E[0];for(var N=Number.NEGATIVE_INFINITY,O=1;O<E.length;++O){var R=G.distanceToSquared(E[O]);if(!(R<=N)){N=R;var Q=E[O]}}if(N<=0)return[];r.set(G,Q);N=Number.NEGATIVE_INFINITY;for(O=0;O<E.length;++O)if(R=r.closestPointToPoint(E[O],!0,t).distanceToSquared(E[O]),!(R<=N)){N=R;var K=E[O]}if(N<=0)return[];f.setFromCoplanarPoints(G,Q,K);for(O=0;O<E.length;++O)if(N=
E[O],N!==G&&N!==Q&&N!==K){u.copy(G).sub(N).normalize();v.copy(Q).sub(N).normalize();w.copy(K).sub(N).normalize();N=u.dot(v);R=u.dot(w);var L=v.dot(w);N<R&&N<L?x.copy(u).cross(v):R<L?x.copy(u).cross(w):x.copy(v).cross(w);x.normalize();N=Math.abs(Math.acos(x.dot(f.normal)));N>Math.PI*.5&&(N=Math.PI-N);if(N>y)return[]}p.copy(E[1]).sub(E[0]).normalize();q.copy(f.normal).cross(p).normalize();G=[];for(O=0;O<E.length;++O)f.projectPoint(E[O],l),G.push(l.dot(p),l.dot(q));return n(G,null,2)};var z=new THREE.Vector3,
A=new THREE.Vector3,D=new THREE.Vector3,F=new THREE.Vector3,C=new THREE.Vector3,B=new THREE.Vector3,H=new THREE.Vector3;a.prototype.Wnb=function(E,G,N){var O=0;z.set(0,0,0);for(var R=0;R<N.length;){D.copy(G[N[R++]]);F.copy(G[N[R++]]);C.copy(G[N[R++]]);A.copy(D).add(F).add(C).divideScalar(3);var Q=H.subVectors(C,D).cross(B.subVectors(F,D)).length()*.5;A.multiplyScalar(Q);z.add(A);O+=Q}z.divideScalar(O);G=E.O(k.ta,!0);G.positionX=z.x;G.positionY=z.y;G.positionZ=z.z;e.fZ(E,G);this.lGa(E,O)};a.prototype.lGa=
function(E,G){(E=(E=E.O(k.lo))&&E.M)&&E.o(h.V,{area:G})};a.prototype.io=function(E){var G=E.getComponent(k.Object3D);if(G=G&&G.sa){var N=E.getComponent(k.Material).material;N&&b.ND(G,N);G.renderOrder=E.getComponent(k.lo).renderOrder}};a.prototype.Bxa=function(E){var G=E.getComponent(k.Geometry);G&&(G.geometry&&G.geometry.dispose(),E.ka(k.Geometry),E.getComponent(k.Object3D).sa.geometry=null);if(G=E.getComponent(k.Object3D))G.sa&&G.sa.parent&&G.sa.parent.remove(G.sa),E.ka(k.Object3D)};a.prototype.G8a=
function(E,G){var N=E.getComponent(k.Geometry);N&&N.geometry&&N.geometry.attributes.position.array.length===G*3||(N=E.O(k.Geometry,!0),N.geometry&&N.geometry.dispose(),N.geometry=this.$Za(G),G=E.getComponent(k.Object3D),G||(G=E.N(k.Object3D),G.sa=new THREE.Mesh,this.io(E)),G.sa.geometry=N.geometry)};a.prototype.$Za=function(E){var G=new THREE.BufferGeometry,N=G.setAttribute,O=THREE.Float32BufferAttribute;E*=3;for(var R=[],Q=0;Q<E;Q++)R.push(0);N.call(G,"position",new O(R,3));return G};a.prototype.Ca=
function(E){this.Bxa(E);E.ka(k.xB);E.ka(k.Object3D)};a.J={};a.J.AIa=[k.Material,k.lo,k.xB.aa];a.J.zIa=[k.Object3D,k.ta,k.sF];a.J.areas=[k.lo,k.Material,k.xB];a.J.BIa=[k.lo.aa,k.xB];a.J.CIa=[k.Material.aa,k.xB];return a});
define("tdv/player/view/webgl/system/beacon/System","require tdv/utils tdv/constants/EventName tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(n,function(){n.apply(this,arguments);this.Gra=this.Gra.bind(this);this.faa=
this.faa.bind(this);this.Fra=this.Fra.bind(this);this.eaa=this.eaa.bind(this);this.HW=new Map;this.jOa=new Map;this.M6=new Map;this.kOa=new Map});a.prototype.Yc=function(){this.KIa.v.length&&this.KIa.v.slice().forEach(this.Gra);this.LIa.v.length&&this.LIa.v.slice().forEach(this.faa);this.MIa.v.length&&this.MIa.v.slice().forEach(this.faa);this.NIa.v.length&&this.NIa.v.slice().forEach(this.Fra);this.OIa.v.length&&this.OIa.v.slice().forEach(this.eaa);this.PIa.v.length&&this.PIa.v.slice().forEach(this.eaa);
this.frame()};a.J={};a.J.KIa=[g.Object3D,g.Qp,g.sx.aa];a.J.zcb=[g.Object3D,g.Qp,g.sx];a.J.LIa=[g.Object3D.aa,g.sx];a.J.MIa=[g.Qp.aa,g.sx];a.J.NIa=[g.Object3D,g.AB,g.BB.aa];a.J.OIa=[g.Object3D.aa,g.BB];a.J.PIa=[g.AB.aa,g.BB];a.prototype.frame=function(){this.zcb.v.length!=0&&this.M6.forEach(function(e,b){var c=this.HW.get(b)||[];c.forEach(function(d){var f=d.getComponent(g.Object3D).sa;d.getComponent(g.BB).position.set(0,0,0).applyMatrix4(f.matrixWorld)});e.forEach(function(d){var f=d.getComponent(g.Object3D).sa;
d.getComponent(g.sx).position.set(0,0,0).applyMatrix4(f.matrixWorld)});e.forEach(function(d){var f=d.getComponent(g.Qp).M;d=this.lX(c,d.getComponent(g.sx).position);f.o(h.V,{beacons:d})}.bind(this))}.bind(this))};a.prototype.$eb=function(e){return function(b){var c=this.HW.get(e.T)||[];return this.lX(c,b)}.bind(this)};a.prototype.lX=function(e,b){e=e.map(function(c){return{entity:c,distance:b.distanceTo(c.getComponent(g.BB).position)}});e.sort(function(c,d){return c.distance-d.distance});return e};
a.prototype.Gra=function(e){e.N(g.sx).position=new THREE.Vector3;var b=k.Rc(e);this.kOa.set(e,b);(b=this.M6.get(e.T))||this.M6.set(e.T,b=[]);b.indexOf(e)<0&&b.push(e);e.getComponent(g.Qp).lX=this.$eb(e)};a.prototype.faa=function(e){var b=this.M6.get(e.T),c=b.indexOf(e);c>=0&&b.splice(c,1);this.kOa["delete"](e);e.ka(g.sx)};a.prototype.Fra=function(e){e.N(g.BB).position=new THREE.Vector3;var b=k.Rc(e);this.jOa.set(e,b);(b=this.HW.get(e.T))||this.HW.set(e.T,b=[]);b.indexOf(e)<0&&b.push(e)};a.prototype.eaa=
function(e){var b=this.HW.get(e.T),c=b.indexOf(e);c>=0&&b.splice(c,1);this.jOa["delete"](e);e.ka(g.BB)};return a});
define("tdv/player/view/webgl/system/camera/System","require tdv/utils tdv/constants/EventName tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/util/geo/Fov tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/util/geo/Fov"),e=a("tdv/player/view/util/XR"),b=a("tdv/player/view/webgl/system/util/entity/Util");
a=m.extend(n,function(){n.apply(this,arguments);this.Ira=this.Ira.bind(this);this.Jra=this.Jra.bind(this);this.raa=this.raa.bind(this);this.saa=this.saa.bind(this);this.esa=this.esa.bind(this);this.fsa=this.fsa.bind(this);e.M.bind(h.V,this.Ta,this,!0)});a.prototype.Yc=function(){this.pPa.v.length&&this.pPa.v.slice().forEach(this.Ira);this.BPa.v.length&&this.BPa.v.slice().forEach(this.Jra);this.XJ.Da.length&&this.XJ.Da.slice().forEach(this.raa);this.St.Da.length&&this.St.Da.slice().forEach(this.saa);
this.qPa.v.length&&this.qPa.v.slice().forEach(this.esa);this.CPa.v.length&&this.CPa.v.slice().forEach(this.fsa)};a.prototype.Ta=function(){this.St.v.forEach(function(q){q.O(g.PerspectiveCamera)})};a.prototype.Ira=function(q){var r=q.O(g.OrthographicCamera),t=q.N(g.Cu);q.N(g.Object3D).sa=t.camera=r.camera=new THREE.OrthographicCamera;this.raa(q)};a.prototype.Jra=function(q){var r=q.O(g.PerspectiveCamera),t=q.N(g.Sk);t.boundingBox=new THREE.Box3;t.M9=!0;q.N(g.Object3D).sa=t.camera=r.camera=new THREE.PerspectiveCamera;
this.saa(q)};a.prototype.raa=function(q){var r=q.getComponent(g.OrthographicCamera);q=q.getComponent(g.Cu);q.width=r.width;q.height=r.height;q=q.camera;q.left=r.width*-.5;q.right=r.width*.5;q.top=r.height*.5;q.bottom=r.height*-.5;q.updateProjectionMatrix()};a.prototype.saa=function(q){var r=q.getComponent(g.PerspectiveCamera),t=q.getComponent(g.Sk);r.oj&&e.Uf?(q.N(e.Em==e.Fl.Xp?g.ng:g.Xf),t.width=e.framebufferWidth?e.framebufferWidth*.5:r.width,t.height=e.framebufferHeight||r.height,q=t.zl=e.Uf.xr.getCamera(),
q.aspect=t.width/t.height,q.fov=t.fov=q&&q.cameras.length?Math.atan2(1,q.cameras[0].projectionMatrix.elements[5])*2*f:r.fov,q.near=t.near=.1,q.far=t.far=1E3,b.maa(q)):(q.ka(g.Xf),q.ka(g.ng),t.fov=r.fov,t.Wd=r.Wd,t.Nk=r.Nk,t.width=r.width,t.height=r.height,t.zl=null,q=t.camera,q.aspect=t.width/t.height,q.fov=r.Wd?k.wm(r.Wd,t.width,t.height):r.Nk?r.Nk:t.width>t.height?k.wm(t.fov,t.width,t.height):t.fov,q.near=t.near=r.near,q.far=t.far=r.far,b.maa(q),t.camera.updateProjectionMatrix())};a.prototype.esa=
function(q){var r=q.getComponent(g.Cu);r.camera.parent&&r.camera.parent.remove(r.camera);r.camera=null;q.ka(g.Cu);q.ka(g.Object3D)};a.prototype.fsa=function(q){var r=q.getComponent(g.Sk),t=r.camera;e.iqb&&t.parent&&t.parent.remove(t);r.camera=null;q.ka(g.Sk);q.ka(g.Object3D)};a.J={};a.J.pPa=[g.OrthographicCamera,g.Cu.aa];a.J.qPa=[g.OrthographicCamera.aa,g.Cu];a.J.BPa=[g.PerspectiveCamera,g.Sk.aa];a.J.CPa=[g.PerspectiveCamera.aa,g.Sk];a.J.XJ=[g.OrthographicCamera,g.Cu];a.J.St=[g.PerspectiveCamera,
g.Sk];a.PK=m.extend(n,function(){n.apply(this,arguments);this.rqa=this.rqa.bind(this)});a.PK.prototype.Yc=function(){this.St.v.length&&this.St.v.slice().forEach(this.rqa)};a.PK.prototype.rqa=function(q){var r=q.getComponent(g.PerspectiveCamera);if(r.Zma){var t=q.getComponent(g.Sk),u=t.scene||b.Sf(q),v=t.camera;if(u&&v&&b.sX(v)===u){var w=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(r.oj)w=.1,x=1E3;else{var y=!1;t.M9&&(t.boundingBox=this.OZa(u,t.boundingBox),t.M9=!1,y=!0);u=t.boundingBox;
u=[[u.min.x,u.max.x],[u.min.y,u.max.y],[u.min.z,u.max.z]];for(var z=0;z<2;z++)for(var A=0;A<2;A++)for(var D=0;D<2;D++)p.set(u[0][z],u[1][A],u[2][D]).applyMatrix4(v.matrixWorldInverse),-p.z>x&&(x=-p.z),-p.z<w&&(w=-p.z);u=Math.max(r.HIa||0,0);z=(w+x)*.5;w+=(w-z)*u;x+=(x-z)*u;x=x==Infinity||isNaN(x)?2E3:x;w=w>0?w:x>20?.1:.01}if(Math.abs(r.near-w)>d||Math.abs(r.far-x)>d)v.far=t.far=r.far=x,v.near=t.near=r.near=w,b.maa(v),b.oTa(v),b.nTa(v),v.updateProjectionMatrix();y||t.hna||(t.hna=setTimeout(function(){t.hna=
null;t.M9=!0;q.T&&q.T.Qa()},c))}}};a.PK.prototype.OZa=function(q,r){r||(r=new THREE.Box3);r.makeEmpty();q.traverse(function(t){if(t.boundingBox)var u=t.boundingBox;else{if(!t.geometry||t.isSprite||t.Aw||t.material&&!t.material.visible)return;t.updateWorldMatrix(!1,!1);u=t.geometry;u.boundingBox===null&&u.computeBoundingBox();u=u.boundingBox}l.copy(u);l.applyMatrix4(t.matrixWorld);r.union(l)});return r};var c=500,d=1E-4,f=180/Math.PI,l=new THREE.Box3,p=new THREE.Vector3;a.PK.J={};a.PK.J.St=[g.PerspectiveCamera,
g.Sk];return a});
define("tdv/player/view/webgl/system/cameraControls/ARBehaviour","require exports tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k){a=function(){function r(t){this.locked=!0;this.Di=!1;this.pf=1;this.F=t;this.update()}r.prototype.update=function(){var t=this.F.getComponent(g.vB),u=(t===null||t===void 0?void 0:t.locked)||!1;!u&&this.locked&&(this.Di=!0);this.locked=u;this.pf=(t===null||t===void 0?void 0:
t.pf)||1;this.properties=t.properties;this.Di&&h.d$();this.locked||h.setScale(this.pf)};r.prototype.frame=function(){this.locked||(this.Di=!1,this.$I())};r.prototype.$I=function(){if(h.isPresenting){var t=this.F.getComponent(g.vB);t=t.wb&&n.Rc(t.wb);p.compose(h.Ec,h.wg,f);t&&p.premultiply(l.copy(t.matrixWorld).decompose(c,b,d).compose(c,b,f).invert());p.decompose(c,b,d);this.properties.set("x",c.x);this.properties.set("y",c.y);this.properties.set("z",c.z);e.setFromQuaternion(b);this.properties.set("yaw",
-e.y*q);this.properties.set("pitch",e.x*q);this.properties.set("roll",e.z*q);this.properties.set("distance",0)}};r.prototype.dispose=function(){};r.Wa=function(t){t.N(g.Cr).manager=new r(t)};r.update=function(t){t.getComponent(g.Cr).manager.update()};r.frame=function(t,u,v){t.getComponent(g.Cr).manager.frame(u,v)};r.ya=function(t){var u=t.getComponent(g.Cr);u.manager.dispose();u.manager=null;t.ka(g.Cr)};return r}();var e=new k.Euler(0,0,0,"YXZ"),b=new k.Quaternion,c=new k.Vector3,d=new k.Vector3,
f=new k.Vector3(1,1,1),l=new k.Matrix4,p=new k.Matrix4,q=180/Math.PI;return a});
define("tdv/player/view/webgl/system/util/RaycastUtil",["require","exports","three.mod","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a,m,h,n,g){a=function(){function d(){}d.G6=function(f,l,p){f.camera=l;l=p.getComponent(n.yc);p=(p=g.Rc(p))&&p.matrixWorld;p||(p=l.matrixWorld);p?(f.ray.origin.copy(l.origin).applyMatrix4(p),f.ray.direction.copy(l.origin).add(l.direction).applyMatrix4(p).sub(f.ray.origin).normalize()):(f.ray.origin.copy(l.origin),f.ray.direction.copy(l.direction).normalize());
return f};d.intersect=function(f,l){k.length=0;l.forEach(function(p){this.VPa(p);p.isSkinnedMesh&&!p.userData.cna&&(p.userData.cna=p.geometry.boundingBox,p.geometry.boundingBox=b,p.userData.SIa=p.geometry.boundingSphere,p.geometry.boundingSphere=c,k.push(p))}.bind(this));f.firstHitOnly=!0;l=l.filter(function(p){return(p.isScene||p.parent)&&(!p.isMesh||p.geometry)});e.length=0;e=f.intersectObjects(l,!1,e);k.forEach(function(p){p.geometry.boundingBox=p.userData.cna;delete p.userData.cna;p.geometry.boundingSphere=
p.userData.SIa;delete p.userData.SIa});e=e.filter(function(p){return p.object.isLine?!1:!0});e.length>1&&e.sort(function(p,q){var r=-p.object.renderOrder,t=-q.object.renderOrder;r==t&&(r=p.object.material&&!p.object.material.depthTest?0:1,t=q.object.material&&!q.object.material.depthTest?0:1);r==t&&(r=p.distance,t=q.distance);return r-t});return e};d.VPa=function(f){if(f.isMesh&&f.geometry&&f.geometry.attributes&&f.geometry.attributes.position&&!f.geometry.userData.QIa&&!f.isSkinnedMesh){try{f.geometry.computeBoundsTree()}catch(l){}f.geometry.userData.QIa=
!0}};return d}();var k=[],e=[],b=new h.Box3;b.min.x=b.min.y=b.min.z=-Infinity;b.max.x=b.max.y=b.max.z=Infinity;var c=new h.Sphere;c.center.x=c.center.y=c.center.z=0;c.radius=Infinity;return a});
define("tdv/player/view/webgl/system/cameraControls/CollidableObjects",["require","exports","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/system/util/RaycastUtil","three.mod"],function(a,m,h,n,g){a=function(){function c(d){this.lK=null;this.fKa=new g.Vector3;this.Kna=void 0;this.Ea=d}c.prototype.refresh=function(){this.lK=null};c.prototype.CK=function(d,f){return this.intersect(d,f).length>0};c.prototype.ohb=function(d){var f=h.Bt(this.Ea);if(!f)return[];k.far=f.far;k.setFromCamera(d,
f);return n.intersect(k,this.X7())};c.prototype.LX=function(d){var f=h.Bt(d.Ea||this.Ea);if(!f)return[];k.far=Infinity;k.camera=f;k.ray.origin.copy(d.origin);k.ray.direction.copy(d.direction);d.matrixWorld&&k.ray.applyMatrix4(d.matrixWorld);return n.intersect(k,this.X7())};c.prototype.intersect=function(d,f){k.far=d.distanceTo(f);k.ray.origin.copy(d);k.ray.direction.copy(f).sub(d).normalize();return n.intersect(k,this.X7())};c.prototype.ZW=function(d){if(this.fKa.equals(d)&&this.Kna!==void 0)return this.Kna;
k.far=Infinity;k.ray.origin.copy(d);var f=[],l=[];this.X7().forEach(function(q){q.isGaussianCloud||q.Aw?l.push(q):f.push(q)});var p=Infinity;[f,l].forEach(function(q){(q==l?b:[e]).forEach(function(r){k.ray.direction.copy(r);r=n.intersect(k,q);r.length!=0&&(r=d.y-r[0].point.y,r<p&&(p=r))})});if(p==Infinity)return Infinity;this.fKa.copy(d);return this.Kna=p};c.prototype.X7=function(){if(this.lK)return this.lK;var d=h.Sf(this.Ea);if(!d)return this.lK=[];var f=[];(c.eY.get(this.Ea.T)||[]).forEach(function(p){(p=
h.Rc(p))&&f.push(p)});this.lK=[];for(d=[d];d.length>0;){var l=d.pop();l.userData.PJ||l.isSprite||l.isLine||l.isSkinnedMesh||l.material&&!l.material.visible||f.indexOf(l)!==-1||(l.children&&d.push.apply(d,l.children),this.lK.push(l))}return this.lK};c.klb=function(d){this.eY.clear();d.forEach(function(f){this.eY.has(f.T)||this.eY.set(f.T,[]);this.eY.get(f.T).push(f)}.bind(this))};c.eY=new Map;return c}();var k=new g.Raycaster,e=new g.Vector3(0,-1,0),b=[(new g.Vector3(0,-1,.1)).normalize(),(new g.Vector3(0,
-1,.1)).normalize().applyMatrix4((new g.Matrix4).makeRotationY(Math.PI*2/3)),(new g.Vector3(0,-1,.1)).normalize().applyMatrix4((new g.Matrix4).makeRotationY(-Math.PI*2/3))];return a});
define("tdv/player/view/webgl/system/cameraControls/SequenceController","require exports tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a,m,h,n,g,k,e,b){return function(){function c(d,f,l){this.F=d;this.properties=f;this.ai=l;this.Pqa=0;this.YJ=this.MA=void 0;this.L9=!1;this.y$(0);this.eoa=this.p7=this.doa=this.n7=this.state=void 0;this.Zc(n.ca);this.ai.bind(h.L("state"),
this.VJ,this,!0);this.ai.bind(h.L("movementIndex"),this.MOa,this,!0)}c.prototype.zQ=function(){this.ai.get("mandatory")||(this.X6(),this.ai.get("restartMovementOnUserInteraction")?this.state==n.PLAYING&&(this.wSa(),this.Zc(n.$b,!0)):this.state==n.PLAYING&&this.Zc(n.ca))};c.prototype.nob=function(){this.state==n.$b&&this.L9&&this.ai.get("restartMovementOnUserInteraction")&&this.wmb()};c.prototype.frame=function(d){this.state==n.PLAYING&&this.zf!==null&&(this.zf.opa()||this.MA!=0||this.ai.o(h.Dr),this.zf.Nb(d),
this.Hnb(),this.properties.set("x",this.zf.ob("x")),this.properties.set("y",this.zf.ob("y")),this.properties.set("z",this.zf.ob("z")),this.properties.set("yaw",this.JE(this.zf.ob("yaw"),-180,180)),this.properties.set("pitch",this.zf.ob("pitch")),this.properties.set("distance",this.zf.ob("distance")),this.properties.set("fov",this.zf.ob("fov")),this.properties.set("easing",0),d=this.ai.get("movements")[this.MA],d.set("position",this.zf.vm()),d.o(h.Zd),this.zf.Ve()&&(d.o(h.Ub),this.y$((this.MA+1)%this.ai.get("movements").length,
!0),this.MA==0&&(this.Pqa++,this.ai.o(h.Vr),this.Pqa==this.ai.get("repeat")&&(this.sQa(),this.Zc(n.ca),this.ai.o(h.Ub)))))};c.prototype.Hnb=function(){var d=this.n7!==void 0&&this.doa!==void 0,f=this.p7!==void 0&&this.eoa!==void 0;if(d||f){var l=this.NLa(this.F);if(l){var p=this.zf.getTime(),q=this.zf.mj();l=l.O(k.Scene);d=d&&p<this.n7?1-p/this.n7:0;f=f&&q-p<this.p7?1-(q-p)/this.p7:0;f>0||d>0?f>d?(l.aP=this.eoa,l.aX=f):(l.aP=this.doa,l.aX=d):(l.aP="#000000",l.aX=0)}}};c.prototype.sQa=function(){var d=
this.NLa(this.F);d&&(d.O(k.Scene).aX=0)};c.prototype.dispose=function(){this.X6();this.ai.h(h.L("state"),this.VJ,this);this.ai.h(h.L("movementIndex"),this.MOa,this);this.Zc(n.ca)};c.prototype.VJ=function(){var d=this.ai.get("state");this.state!=d&&(d==n.$b&&this.state==n.ca?this.ai.set("state",n.ca):this.Zc(d))};c.prototype.Zc=function(d,f){f===void 0&&(f=void 0);this.state!=d&&(this.state=d,this.state==n.PLAYING?(this.X6(),this.L9=!1,this.LJa(),this.Ycb()):this.state==n.$b?(this.L9=!!f,this.wSa()):
this.state==n.ca&&(this.L9=!1,this.X6(),this.Pqa=0,d=this.zf.getTime(),f=this.zf.mj(),d>0&&d<f&&this.sQa(),this.y$(0)));this.ai.set("state",this.state)};c.prototype.MOa=function(){this.y$(this.ai.get("movementIndex"))};c.prototype.y$=function(d,f){f===void 0&&(f=void 0);if(this.MA!==d||f)this.MA=d,this.LJa(),this.ai.set("movementIndex",this.MA),this.ai.get("movements")[this.MA].set("position",0)};c.prototype.NLa=function(d){for(;d&&!d.getComponent(k.Scene);)d=(d=d.getComponent(k.pb))&&d.F||null;return d};
c.prototype.wmb=function(){this.e$=setTimeout(function(){this.e$=null;this.Zc(n.PLAYING)}.bind(this),this.ai.get("restartMovementDelay"))};c.prototype.X6=function(){this.e$&&(clearTimeout(this.e$),this.e$=null)};c.prototype.LJa=function(){var d=this.ai.get("movements")[this.MA],f=this.properties.get("x",this.properties.get("initialX",0)),l=this.properties.get("y",this.properties.get("initialY",0)),p=this.properties.get("z",this.properties.get("initialZ",0)),q=this.JE(this.properties.get("yaw",this.properties.get("initialYaw",
0)),-180,180),r=this.properties.get("pitch",this.properties.get("initialPitch",0)),t=this.properties.get("distance",0),u=this.properties.get("fov",this.properties.get("initialFov"));if(g.Oa("TargetModel3DCameraMovement",d)){var v=d.get("targetX",f);var w=d.get("targetY",l);var x=d.get("targetZ",p);var y=d.get("targetYaw",q);var z=d.get("targetPitch",r);var A=d.get("targetFov",u);var D=d.get("targetDistance",t);switch(this.Heb(d)){case "left":y=this.JE(y,q-360,q);break;case "right":y=this.JE(y,q,q+
360);break;case "longest":y=this.JE(y,q-180,q+180);y=y==q?q+360:y>=q?this.JE(y,q-360,q):this.JE(y,q,q+360);break;default:y=this.JE(y,q-180,q+180)}}else g.Oa("DistanceModel3DCameraMovement",d)&&(v=f+d.get("xDelta",0),w=l+d.get("yDelta",0),x=p+d.get("zDelta",0),y=q+d.get("yawDelta",0),z=r+d.get("pitchDelta",0),A=u+d.get("fovDelta",0),D=t+d.get("distanceDelta",0));this.zf=new e(d.get("easing"),[new b("x",f,v,d.get("xSpeed")),new b("y",l,w,d.get("ySpeed")),new b("z",p,x,d.get("zSpeed")),new b("yaw",q,
y,d.get("yawSpeed")),new b("pitch",r,z,d.get("pitchSpeed")),new b("fov",u,A,d.get("fovSpeed")),new b("distance",t,D,d.get("distanceSpeed"))],d.get("duration"));this.n7=d.get("fadeFromDuration");this.doa=d.get("fadeFromColor");this.p7=d.get("fadeToDuration");this.eoa=d.get("fadeToColor")};c.prototype.Ycb=function(){this.YJ=void 0};c.prototype.wSa=function(){if(this.zf){this.YJ=void 0;var d=this.zf&&this.zf.pX("yaw");d&&(d.to>d.from?this.YJ="right":d.to<d.from&&(this.YJ="left"))}};c.prototype.Heb=function(d){d=
d.get("yawPath");d=="longest"&&this.YJ&&(d=this.YJ);this.YJ=void 0;return d};c.prototype.JE=function(d,f,l){for(;d<f;)d+=l-f;for(;d>l;)d-=l-f;return d};return c}()});
define("tdv/player/view/webgl/system/cameraControls/SequencesController","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/webgl/system/cameraControls/SequenceController tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a,m,h,n,g,k,e){return function(){function b(c,d){this.F=c;this.properties=d;this.C9=this.C9.bind(this);this.A9=this.A9.bind(this);this.VJ=this.VJ.bind(this);this.xm=this.yw=null;this.eQ=[];this.kh=null;
this.kF=!1;this.iA=new Map;h.ba(this.properties,["userInteracting"],this.C9,!0);h.ba(this.properties,["initialSequence","idleSequence","sequences.movements"],this.A9,!0);h.ba(this.properties,["state"],this.VJ,!0);this.ready=!1}b.prototype.frame=function(c){if(!this.ready){var d=e.Sf(this.F),f=0;d&&d.traverse(function(l){(l.isMesh||l.isSprite)&&f++});if(f>0)this.ready=!0,this.Lib();else return!1}this.kh&&this.iA.get(this.kh).frame(c);(c=this.kh&&this.kh.get("state")==g.PLAYING)&&this.F.T.Qa();this.properties.set("controllingPosition",
c)};b.prototype.dispose=function(){this.kh&&this.kh.get("mandatory")&&this.properties.set("inMandatorySequence",!1);this.kh&&this.properties.set("controllingPosition",!1);h.da(this.properties,["userInteracting"],this.C9);h.da(this.properties,["initialSequence","idleSequence","sequences.movements"],this.A9);h.da(this.properties,["state"],this.VJ);this.V$();this.xm&&this.UO(this.xm);this.yw&&this.UO(this.yw);this.eQ.forEach(this.UO.bind(this));this.eQ=[]};b.prototype.vZ=function(){this.kF||this.GJ||
!this.xm||this.kh||!this.properties.get("timeToIdle")||(this.GJ=setTimeout(function(){this.GJ=null;this.xib()}.bind(this),this.properties.get("timeToIdle")))};b.prototype.V$=function(){this.GJ&&(clearTimeout(this.GJ),this.GJ=null)};b.prototype.xib=function(){this.xm&&this.xm.set("state",g.PLAYING)};b.prototype.Lib=function(){this.yw?this.yw.set("state",g.PLAYING):this.vZ()};b.prototype.VJ=function(){this.kh?this.kh.set("state",this.properties.get("state")):this.properties.get("state")==g.PLAYING?
(this.vZ(),this.GJ||this.properties.set("state",g.ca)):this.V$()};b.prototype.C9=function(){var c=this.properties.get("userInteracting");this.kF!=c&&(this.kF&&(this.kh&&this.iA.get(this.kh).nob(),!this.xm||this.kh&&this.kh!=this.xm||this.vZ()),this.kF=c)&&(this.V$(),this.kh&&this.iA.get(this.kh).zQ())};b.prototype.A9=function(){var c=this.Wqa(this.properties.get("initialSequence"));this.yw!=c&&(this.yw&&this.UO(this.yw),(this.yw=c)&&this.yna(this.yw));c=this.Wqa(this.properties.get("idleSequence"));
this.xm!=c&&(this.xm&&this.UO(this.xm),(this.xm=c)&&this.yna(this.xm));var d=(this.properties.get("sequences")||[]).filter(this.Wqa.bind(this));this.eQ.forEach(function(l){d.indexOf(l)<0&&this.UO(l)}.bind(this));var f=this.eQ;this.eQ=d;this.eQ.forEach(function(l){f.indexOf(l)<0&&this.yna(l)}.bind(this));this.kh||!this.xm||this.GJ||this.vZ()};b.prototype.Wqa=function(c){var d=c&&c.get("movements");return d&&d.length!=0?c:null};b.prototype.XOa=function(c){c=c.source;var d=c.get("state");d==g.PLAYING?
(this.V$(),d=this.kh,this.kh=c,d&&d!=this.kh&&d.set("state",g.ca),this.properties.set("state",g.PLAYING),this.properties.set("inMandatorySequence",c.get("mandatory")),this.F.T.Qa()):d==g.$b?c==this.kh&&this.properties.set("state",g.$b):d==g.ca&&c==this.kh&&(this.properties.set("state",g.ca),this.properties.set("inMandatorySequence",!1),this.kh=null,c!=this.xm&&this.vZ())};b.prototype.yna=function(c){if(this.iA.has(c))this.iA.get(c);else{c.set("state",g.ca);c.bind(n.L("state"),this.XOa,this,!0);var d=
new k(this.F,this.properties,c);this.iA.set(c,d)}};b.prototype.UO=function(c){this.iA.has(c)&&(c.set("state",g.ca),c.h(n.L("state"),this.XOa,this),this.iA.get(c).dispose(),this.iA["delete"](c))};return b}()});
define("tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour",["require","exports","tdv/player/view/webgl/system/cameraControls/SequencesController","tdv/player/view/webgl/components"],function(a,m,h,n){return function(){function g(k){this.RY=this.properties=null;this.F=k;this.update()}g.prototype.update=function(){var k=this.F.getComponent(n.TK);this.gQ(k&&k.properties)};g.prototype.gQ=function(k){var e;this.properties&&((e=this.RY)===null||e===void 0||e.dispose(),this.RY=null);if(this.properties=
k)this.RY=new h(this.F,this.properties)};g.prototype.frame=function(k){this.RY&&this.RY.frame(k)};g.prototype.dispose=function(){this.gQ(null)};g.Wa=function(k){k.N(n.tx).manager=new g(k)};g.update=function(k){k.getComponent(n.tx).manager.update()};g.frame=function(k,e,b){k.getComponent(n.tx).manager.frame(e,b)};g.ya=function(k){k.getComponent(n.tx).manager.dispose();k.ka(n.tx)};return g}()});
define("tdv/player/view/webgl/system/cameraControls/DraggingObserver",["require","exports"],function(){return function(){function a(){}a.sP=function(m){return this.Baa.indexOf(m)>=0};a.hra=function(m){this.Baa=[];m.forEach(function(h){h=h.T;this.Baa.indexOf(h)<0&&this.Baa.push(h)}.bind(this))};a.Baa=[];return a}()});
define("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin",["require"],function(){return{spb:function(){},tpb:function(){},X1:function(){return this.A&&this.A.get("inMandatorySequence")||this.A&&!this.A.get("keyboardEnabled")?!0:!1},Zm:function(){return this.A&&this.A.get("inMandatorySequence")||this.A&&(!this.A.get("mouseEnabled")||this.A.get("mouseDisabled"))?!0:!1},Rza:function(){return this.A&&this.A.get("doubleClickDisabled")?!0:!1},KBa:function(){this.DM()||this.Ey||this.AHa()},
JBa:function(){this.DM()||this.Ey||this.zHa()},bN:function(){this.Sza()||this.AHa()},aN:function(){this.Sza()||this.zHa()},AHa:function(){this.A&&this.A.set("userInteracting",!0)},zHa:function(){this.A&&this.A.set("userInteracting",!1)}}});
define("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter",["require","exports","tdv/player/view/webgl/system/util/entity/Util","three.mod"],function(a,m,h,n){return function(){function g(k){this.matrixWorld=new n.Matrix4;this.tE=!1;this.timeout=null;this.F=k}g.prototype.gQ=function(k,e){if(this.BK!=k||this.propertyName!=e)this.BK&&this.BK.set(this.propertyName,!1),this.BK=k,this.propertyName=e,this.BK&&this.BK.set(this.propertyName,this.tE)};g.prototype.Esa=function(){var k=h.Rc(this.F),
e=!!k&&!k.matrixWorld.equals(this.matrixWorld);e&&this.matrixWorld.copy(k.matrixWorld);this.Gp(e);this.timeout&&(clearTimeout(this.timeout),this.timeout=null);e&&(this.timeout=setTimeout(function(){this.timeout=null;this.Gp(!1)}.bind(this),g.CVa))};g.prototype.ya=function(){this.Gp(!1);this.timeout&&clearTimeout(this.timeout)};g.prototype.Gp=function(k){this.tE!=k&&(this.tE=k,this.BK&&this.BK.set(this.propertyName,k))};g.CVa=100;return g}()});
define("tdv/player/view/webgl/system/cameraControls/PropertiesSetter",["require","exports"],function(){return function(){function a(m){this.properties=m}a.prototype.jRa=function(m){this.properties.set("fov",this.GP(m,this.properties.get("minFov",.1),this.properties.get("maxFov",180)))};a.prototype.sj=function(m){this.properties.set("yaw",this.j$(this.Xhb(m,this.properties.get("minYaw"),this.properties.get("maxYaw"),this.properties.get("yaw"))))};a.prototype.$n=function(m){this.properties.set("pitch",
this.GP(m,this.properties.get("minPitch",-90),this.properties.get("maxPitch",90)))};a.prototype.setX=function(m){this.properties.set("x",this.GP(m,this.properties.get("minX"),this.properties.get("maxX")))};a.prototype.setY=function(m){this.properties.set("y",this.GP(m,this.properties.get("minY"),this.properties.get("maxY")))};a.prototype.setZ=function(m){this.properties.set("z",this.GP(m,this.properties.get("minZ"),this.properties.get("maxZ")))};a.prototype.Yn=function(m){this.properties.set("distance",
this.GP(m,this.properties.get("minDistance"),this.properties.get("maxDistance")))};a.prototype.Xj=function(m){this.properties.set("easing",m)};a.prototype.Xhb=function(m,h,n,g){if(h!==void 0||n!==void 0){var k=this.j$(m-g);if(h!==void 0&&k<0){if(this.j$(g)+k<h)return h}else if(n!==void 0&&k>0&&this.j$(g)+k>n)return n}return m};a.prototype.GP=function(m,h,n){if(isNaN(m))throw"invalid value";h!==void 0&&m<h&&(m=h);n!==void 0&&m>n&&(m=n);return m};a.prototype.j$=function(m){for(;m<-180;)m+=360;for(;m>
180;)m-=360;return m};return a}()});
define("tdv/player/view/webgl/system/util/mixin/KeyboardMixin",["require","tdv/view/util/KeyboardControl"],function(a){var m=a("tdv/view/util/KeyboardControl");return{jha:function(h){this.g2=this.g2.bind(this);this.h2=this.h2.bind(this);this.GR=this.sk=!1;this.Ig={};for(var n=0;n<h.length;n++)this.Ig[h[n]]=!1;this.$S=0;this.i2=!1;this.aT(!0)},kha:function(){this.aT(!1)},aT:function(h){this.i2!=h&&(this.i2&&(document.removeEventListener("keyup",this.h2),document.removeEventListener("keydown",this.g2)),
this.i2=h)&&(document.addEventListener("keyup",this.h2),document.addEventListener("keydown",this.g2))},Sza:function(){return this.$S>0},h2:function(h){if(!(m.yp()||this.X1&&this.X1())){var n=!1;this.sk!=h.shiftKey&&(this.sk=h.shiftKey,n=!0);this.GR!=h.ctrlKey&&(this.GR=h.ctrlKey,n=!0);this.Ig[h.code]===!0&&(this.Ig[h.code]=!1,n=!0,this.tq&&this.tq(h.code),this.$S--,this.$S==0&&this.JBa&&this.JBa());n&&this.TT&&this.TT()}},g2:function(h){if(!(m.yp()||this.X1&&this.X1())){var n=!1;this.sk!=h.shiftKey&&
(this.sk=h.shiftKey,n=!0);this.GR!=h.ctrlKey&&(this.GR=h.ctrlKey,n=!0);this.Ig[h.code]===!1&&(n=this.Ig[h.code]=!0,this.SH&&this.SH(h.code),this.$S++,this.$S==1&&this.KBa&&this.KBa());n&&this.TT&&this.TT()}},Fpb:function(){return this.sk},zpb:function(){return this.GR}}});
define("tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager",["require","exports","tdv/view/constants/Cursor"],function(a,m,h){a=function(){function g(){this.Gf=[]}g.prototype.bu=function(k){this.cRa(k);this.Ab=k;this.wea=null};g.prototype.dRa=function(k){this.cRa(k?k.TLa():null);this.Ab=null;this.wea=k};g.prototype.Klb=function(k,e){this.Ab&&this.Ab.set("cursor",k);this.wea&&this.wea.m$(k,e)};g.prototype.cRa=function(k){this.Oe&&(this.Oe.Gjb(this),this.Oe=void 0);k&&(this.Oe=n.get(k),
this.Oe.Ybb(this))};g.prototype.dispose=function(){this.bu(null);this.Gf=[]};g.prototype.push=function(k){this.Gf.push(k);this.Oe&&this.Oe.update()};g.prototype.pop=function(k){for(var e=this.Gf.length-1;e>=0;e--)if(this.Gf[e]==k){this.Gf.splice(e,1);this.Oe&&this.Oe.update();break}};g.prototype.has=function(k){return this.Gf.indexOf(k)>=0};g.prototype.top=function(){if(this.Gf.length)return this.Gf[this.Gf.length-1]};g.prototype.all=function(){return this.Gf};return g}();var n=function(){function g(k){this.dc=
k;this.zd=[]}g.prototype.Ybb=function(k){this.zd.push(k);this.update()};g.prototype.Gjb=function(k){this.zd.splice(this.zd.indexOf(k),1);this.update();this.zd.length==0&&g.clear(this.dc)};g.prototype.update=function(){var k=this.GXa();var e=this.fga(h.cG)?h.cG:this.fga(h.Mi)?h.Mi:this.fga(h.qf)?h.qf:this.ct()||h.Ee;this.zd.forEach(function(b){b.Klb(e,k)})};g.prototype.fga=function(k){for(var e=this.zd.length-1;e>=0;e--)if(this.zd[e].has(k))return!0;return!1};g.prototype.GXa=function(){var k=[];this.zd.forEach(function(e){e.all().forEach(function(b){k.indexOf(b)<
0&&k.push(b)})});return k};g.prototype.ct=function(){for(var k,e=this.zd.length-1;e>=0&&k===void 0;e--)k=this.zd[e].top();return k};g.get=function(k){var e=this.ab.get(k);e||this.ab.set(k,e=new g(k));return e};g.clear=function(k){this.ab["delete"](k)};g.ab=new Map;return g}();return a});
define("tdv/view/util/MouseLocker",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,m,h,n){return function(g){function k(e){var b=g.call(this)||this;if(e instanceof HTMLElement)b.YNa=e;else throw Error("invalid element");b.y9=b.y9.bind(b);document.addEventListener("pointerlockchange",b.y9.bind(b),!1);return b}P(k,g);k.prototype.dispose=function(){document.removeEventListener("pointerlockchange",this.y9)};k.prototype.lock=function(){if(!this.hr())return this.YNa.requestPointerLock()};
k.prototype.unlock=function(){this.hr()&&document.exitPointerLock()};k.prototype.hr=function(){return document.pointerLockElement===this.YNa};k.prototype.y9=function(){this.o(h.V)};k.hr=function(){return document.pointerLockElement!==null};return k}(n)});
define("tdv/player/view/webgl/system/util/mixin/MouseMixin",["require","tdv/constants/EventName","tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager","tdv/view/util/MouseLocker"],function(a){function m(e,b){var c=b.x-e.x;e=b.y-e.y;return Math.sqrt(c*c+e*e)}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager"),g=a("tdv/view/util/MouseLocker"),k=180/Math.PI;return{Sha:function(){this.W2=this.az=this.Ey=this.nv=!1;this.r4=
this.df=null;this.Q1=new n;this.wT=null;this.s5a=this.D4a.bind(this)},Tha:function(){this.a5(null);this.Q1.dispose()},EAa:function(e){this.Mq(e);if(!this.Zm||!this.Zm()){var b=this.CM();this.nv||(this.nv=!0,b||this.bN&&this.bN());this.az=!e.zE||!e.zE.buttons||(e.zE.buttons&2)===0;this.r4=e;this.uq&&this.uq(e.x,e.y);this.w3&&this.w3(e.x,e.y)}},CM:function(){return this.nv||this.Ey||this.W2},DM:function(){return this.nv},Apb:function(){return this.Ey},Bpb:function(){return this.az},Cpb:function(){return this.W2},
GAa:function(e){this.Mq(e);if(this.Zm&&this.Zm())this.sT(e);else if(this.tg&&this.tg(e.x,e.y),this.nv||this.OM.hr()){var b=e.movementX!==void 0?e.movementX:e.x-this.r4.x,c=e.movementY!==void 0?e.movementY:e.y-this.r4.y;this.OM.hr()&&(b*=-1,c*=-1);this.r4=e;this.v3&&this.v3(b,c,e.x,e.y)}},sT:function(e){this.nv&&(e&&this.Mq(e),this.az=this.nv=!1,this.hz&&this.hz(this.Ad,this.Bd),this.TH&&this.TH(),this.CM()||this.aN&&this.aN())},AAa:function(e){this.Zm&&this.Zm()||(this.Mq(e),this.gz&&this.gz(e.x,
e.y))},BAa:function(e){this.Zm&&this.Zm()||this.Rza&&this.Rza()||(this.Mq(e),this.$M&&this.$M(e.x,e.y))},HAa:function(e){this.Mq(e);if(!this.Zm||!this.Zm()){e=e.mA/10;var b=this.CM();this.wT||(this.W2=!0,this.t5a&&this.t5a(),b||this.bN&&this.bN());this.x3&&this.x3(e);this.wT&&clearTimeout(this.wT);this.wT=setTimeout(this.s5a,100)}},D4a:function(){this.wT=null;this.r5a&&this.r5a();this.W2=!1;this.CM()||this.aN&&this.aN()},DAa:function(e){if(!(this.Zm&&this.Zm()||e.touches.length<2)){var b=this.CM();
this.Ey||(this.Ey=!0,this.E4a(e.touches),b||this.bN&&this.bN());this.CBa&&this.CBa();this.sT()}},CAa:function(e){this.Zm&&this.Zm()||e.touches.length<2||!this.Ey||(this.IAa(e.touches),this.qia&&this.qia(this.H$a,this.I$a,this.qla,this.J$a),this.BBa&&this.BBa(this.Mga,this.Nga,this.VV,this.WV,1,this.qla,this.JS,this.pla,this.Lga,this.TV))},Rha:function(){this.Ey&&(this.Ey=!1,this.ria&&this.ria());this.CM()||this.aN&&this.aN()},E4a:function(e){this.Lga=this.Nga=this.Mga=this.JS=this.qla=this.WV=this.VV=
this.pla=this.TV=void 0;this.SV=e;this.IAa(e)},IAa:function(e){m(e[0],this.SV[0])+m(e[1],this.SV[1])>m(e[0],this.SV[1])+m(e[1],this.SV[0])&&(e=[e[1],e[0]]);var b=e[0];var c=e[1];b=Math.atan2(-(c.y-b.y),c.x-b.x)*k;c=m(e[0],e[1]);var d=(e[0].x+e[1].x)/2,f=(e[0].y+e[1].y)/2;this.qla=this.JS!==void 0?c/this.JS:1;this.J$a=this.TV!==void 0?b-this.TV:0;this.TV=b;this.pla=c;this.H$a=this.VV!==void 0?d-this.VV:0;this.I$a=this.WV!==void 0?f-this.WV:0;this.VV=d;this.WV=f;this.Mga!==void 0||(this.Mga=this.VV);
this.Nga!==void 0||(this.Nga=this.WV);this.Lga!==void 0||(this.Lga=this.TV);this.JS!==void 0||(this.JS=this.pla);this.SV=e},FAa:function(){},B0a:function(){this.sT();this.Rha()},qS:function(){return this.df?this.df.nb():100},fH:function(){return this.df?this.df.Mb():100},Hy:function(){return this.df?Math.max(this.df.nb(),this.df.Mb()):100},a5:function(e){this.df!=e&&(this.df&&(this.df.h(h.Sa,this.EAa,this,!0),this.df.h(h.gb,this.GAa,this,!0),this.df.h(h.$a,this.sT,this,!0),this.df.h(h.ma,this.AAa,
this,!0),this.df.h(h.fi,this.BAa,this,!0),this.df.h(h.Qk,this.HAa,this,!0),this.df.h(h.Nba,this.CAa,this,!0),this.df.h(h.HB,this.DAa,this,!0),this.df.h(h.YK,this.Rha,this,!0),this.OM.h(h.V,this.FAa,this,!0),this.OM.dispose(),this.OM=null),this.df=e,this.Q1.bu(this.df),this.df&&(this.df.bind(h.Sa,this.EAa,this,!0),this.df.bind(h.gb,this.GAa,this,!0),this.df.bind(h.$a,this.sT,this,!0),this.df.bind(h.ma,this.AAa,this,!0),this.df.bind(h.fi,this.BAa,this,!0),this.df.bind(h.Qk,this.HAa,this,!0),this.df.bind(h.Nba,
this.CAa,this,!0),this.df.bind(h.HB,this.DAa,this,!0),this.df.bind(h.YK,this.Rha,this,!0),this.OM=new g(this.df.wa().cc()),this.OM.bind(h.V,this.FAa,this,!0)))},uT:function(e){e.x=-1+2*e.x/this.qS();e.y=1-2*e.y/this.fH();return e},Mq:function(e){this.Ad=e.x;this.Bd=e.y;this.PM=e.pageX;this.QM=e.pageY},kI:function(e){this.Q1.push(e)},o4:function(e){this.Q1.pop(e)}}});
define("tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{C7a:function(){this.S4=!1;this.Hq=null;this.BH=this.EM=0;this.rI=!1;this.xEa(!0)},D7a:function(){this.xEa(!1);this.iFa(null)},xEa:function(h){this.S4!=h&&((this.S4=h)||this.R4())},iFa:function(h){this.Hq!=h&&(this.R4(),this.Hq&&(this.Hq.h(m.Up,this.yEa,this,!0),this.Hq.h(m.Fg,this.R4,this,!0),this.Hq.h(m.V,this.wEa,this,!0),this.BH=this.EM=
0),this.Hq=h)&&(this.Hq.bind(m.Up,this.yEa,this,!0),this.Hq.bind(m.Fg,this.R4,this,!0),this.Hq.bind(m.V,this.wEa,this,!0))},yEa:function(){!this.rI&&this.S4&&(this.rI=!0,this.OCa&&this.OCa())},wEa:function(){this.rI&&(this.EM=this.Hq.getX(),this.BH=this.Hq.getY(),this.MCa&&this.MCa())},R4:function(){this.rI&&(this.rI=!1,this.BH=this.EM=0,this.NCa&&this.NCa())},Epb:function(){return this.rI}}});
define("tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/webgl/components tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter tdv/player/view/webgl/system/cameraControls/PropertiesSetter tdv/player/view/webgl/system/util/mixin/KeyboardMixin tdv/player/view/webgl/system/util/mixin/MouseMixin tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin tdv/view/constants/Cursor tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){function m(L){this.UR=
!1;this.Oea=0;this.Hxa=!1;this.Ixa=L}function h(L){this.B=L;this.xs=new f(L);this.jha(y);this.Sha();this.C7a();this.yI=.025;this.gn=.25;this.T2=this.U2=this.V2=this.q1=0;this.Ka=null;this.k0=this.M5=!1;this.Ha=void 0;this.eAa=new THREE.Vector3(void 0,void 0,void 0);this.dv=[];this.x4a=5;this.u4a=10;this.hy=new c(this.B);this.kI(t.IB);this.FM={};[k.ua.ck,k.ua.Ki,k.ua.fb,k.ua.Db].forEach(function(U){this.FM[U]=new m(300)}.bind(this));[k.ua.Mp,k.ua.qo,k.ua.Sp,k.ua.uo,k.ua.Q,k.ua.E].forEach(function(U){this.FM[U]=
new m(300)}.bind(this));this.update()}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/constants/Key"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),c=a("tdv/player/view/webgl/system/cameraControls/CollidableObjects"),d=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),f=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),l=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter"),
p=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),q=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),r=a("tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin"),t=a("tdv/view/constants/Cursor"),u=a("tdv/view/util/Ease"),v=a("tdv/view/util/EaseDimension");n.D6(h,[b,p,q,r]);h.prototype.update=function(){var L=this.B.getComponent(e.PF);this.Oj(L&&L.properties);this.xs.gQ(L&&L.properties,"moving");var U=(!L.TO||!d.sP(this.B.T))&&L.enabled;this.a5(L&&(U?L.Rf:null));this.aT(!!L&&
U&&L.jE);this.iFa(!!L&&U&&L.HQa);U||this.TH();U&&L.jE||(this.Wo=this.Vo=this.Ol=this.Zk=this.Pl=0)};h.prototype.frame=function(L){this.K3a()?this.W2a(L):this.X2a(L);this.Q0a()};h.prototype.K3a=function(){return this.properties&&this.properties.get("playingSequence")||this.Wi};h.prototype.W2a=function(L){this.properties&&this.properties.get("playingSequence")||this.KXa(L)};h.prototype.KXa=function(L){this.Wi&&(this.Wi.Nb(L),this.Ka.setX(this.Wi.ob("x")),this.Ka.setY(this.Wi.ob("y")),this.Ka.setZ(this.Wi.ob("z")),
this.Ka.Xj(0),this.Wi.Ve()&&(this.Wi=null),this.B.T.Qa())};var w=1E3/3600*8/1.7;h.prototype.X2a=function(L){H.set(this.A.get("x"),this.A.get("y"),this.A.get("z"));this.a2a(L,N,R);this.l2a(H,N,E);this.Ka.setX(E.x);this.Ka.setY(E.y);this.Ka.setZ(E.z);this.Ka.sj(this.A.get("yaw")+R.x);this.Ka.$n(this.A.get("pitch")+R.y);this.Ka.Xj(this.gn);N.x==0&&N.y==0&&N.z==0&&R.x==0&&R.y==0||this.B.T.Qa()};h.prototype.Q0a=function(){this.kbb();this.oab();this.xs.Esa();this.rI&&this.B.T.Qa();this.hy.refresh()};h.prototype.a2a=
function(L,U,T){L/=1E3;var Y=this.sk?.2:1,aa=1.7*w;aa*=this.A.get("translationSpeed")*Y;var ba=this.A.get("rotationSpeed")*Y;Y=this.T2;var ea=this.U2,ia=this.V2,da=this.q1;this.T2=this.U2=this.V2=this.q1=0;var V=(Y*Y+ea*ea)/x;V=V>1?1/Math.sqrt(V):1;Y*=V;ea*=V;var X=F*Math.atan2(this.EM,Math.abs(this.BH));V=Math.sqrt(this.EM*this.EM+this.BH*this.BH);var S=Math.max(this.fH(),this.qS()),W=this.A.get("fov")/S*2;Y=-Y*W*ba;ea=ea*W*ba;ia=-ia*25*aa;W=this.pS(k.ua.Mp,k.ua.Sp)*aa;var Z=this.pS(k.ua.uo,k.ua.qo)*
aa,ca=this.pS(k.ua.Q,k.ua.E)*aa,fa=this.pS(k.ua.Ki,k.ua.ck)*ba*30,ja=this.pS(k.ua.fb,k.ua.Db)*ba*30;da=2*da*1.7/S;ba*=X*V*.125;aa*=-V*.5*this.BH;(V=this.B.getComponent(e.ta))&&(Y||ea||ia||W||ca||Z||fa||ja||ba||aa||da)?(C.makeRotationFromEuler(B.set(0,V.fd*D,0,V.mf)),U.set(W*L,ca*L+da,(Z+aa+ia)*L).applyMatrix4(C),T.set(Y+(ja+ba)*L,ea+fa*L)):(U.set(0,0,0),T.set(0,0))};h.prototype.pS=function(L,U){L=this.FM[L].getState();if(L===m.Xaa)return-3;if(L===m.Ki)return-1.5;U=this.FM[U].getState();return U===
m.Xaa?3:U===m.Ki?1.5:0};h.prototype.l2a=function(L,U,T){T.copy(L).add(U);if(!T.equals(L)){var Y=!this.eAa.equals(L);this.SGa(T,Y);this.Ha!==void 0&&U.y!==0&&(this.Ha=Math.max(.595,this.Ha+U.y));var aa=this.hy.ZW(T);(Y||aa==Infinity)&&this.xZa();var ba=aa!==Infinity?T.y-aa:void 0;if(this.A.get("keepHeight")&&aa!==Infinity){aa=this.oS();if(ba>(Y?ba:this.c2a(L))+this.A.get("maxStepHeight",aa*.25)){T.copy(L);return}T.y=(Y?ba:this.j2a(ba))+aa}if(this.A.get("collisionDetection")&&(O.copy(U).normalize().multiplyScalar(.1).add(T),
this.hy.CK(L,O))){T.copy(L);return}ba!==void 0&&this.lXa(ba);this.eAa.copy(T)}};h.prototype.xZa=function(){this.dv=[]};h.prototype.c2a=function(L){return this.dv.length==0?L:this.dv[this.dv.length-1]};h.prototype.j2a=function(L){return this.dv.length<this.x4a?L:this.dv.reduce((U,T)=>U+T,0)/this.dv.length};h.prototype.lXa=function(L){this.dv.push(L);this.dv.length>this.u4a&&this.dv.shift()};h.prototype.SGa=function(L,U){if(this.Ha===void 0||U)L=this.hy.ZW(L),L!==Infinity&&(this.Ha=L)};h.prototype.oS=
function(){return this.Ha===void 0?1.7:this.Ha};h.prototype.SH=function(L){this.B.T.Qa();this.FM[L].dqa()};h.prototype.tq=function(L){this.FM[L].eqa()};h.prototype.w3=function(){this.zj=!0;this.kI(t.Mi)};h.prototype.$M=function(L,U){if(this.A.get("doubleClickAction")=="translate"&&(this.uT(K.set(L,U)),L=this.hy.ohb(K),L.length!=0)){var T=L[0];L=H.set(this.A.get("x"),this.A.get("y"),this.A.get("z"));U=E.copy(T.point);this.SGa(L);var Y=this.oS();T.face&&T.face.normal?(T=G.copy(T.face.normal).transformDirection(T.object.matrixWorld),
T=Math.abs(Math.acos(T.dot(Q)))<Math.PI*.25):T=U.y<L.y-Y*.75;if(T)U.y+=Y;else{N.copy(U).sub(L);T=N.length();var aa=Y*2;if(T<aa)return;U.sub(N.multiplyScalar(aa/T));U.y+=Y-this.hy.ZW(U)}this.hy.CK(L,U)||Math.abs(Y-this.hy.ZW(U))>Y*.05||(this.Wi=new u("cubic_in_out",[new v("x",L.x,U.x),new v("y",L.y,U.y),new v("z",L.z,U.z)],1500),this.B.T.Qa())}};var x=2500;h.prototype.v3=function(L,U){this.zj&&(this.T2+=L,this.U2+=U,this.B.T.Qa())};h.prototype.TH=function(){this.zj=!1;this.o4(t.Mi);this.B.T.Qa()};
h.prototype.x3=function(L){this.V2+=L;this.B.T.Qa()};h.prototype.qia=function(L,U){this.q1+=U;this.B.T.Qa()};h.prototype.OCa=function(){this.B0a();this.kI(t.Mi)};h.prototype.MCa=function(){this.B.T.Qa()};h.prototype.NCa=function(){this.o4(t.Mi)};h.prototype.Oj=function(L){this.A!=L&&(this.A&&(this.Ka=null,z.forEach(function(U){this.A.h(g.L(U),this.Lia,this,!0)}.bind(this)),A.forEach(function(U){this.A.h(g.L(U),this.hia,this,!0)}.bind(this)),this.A.set("userInteracting",!1)),this.A=L)&&(this.Ka=new l(this.A),
z.forEach(function(U){this.A.bind(g.L(U),this.Lia,this,!0)}.bind(this)),this.Lia(),A.forEach(function(U){this.A.bind(g.L(U),this.hia,this,!0)}.bind(this)),this.hia(),this.A.set("userInteracting",!1))};h.prototype.Lia=function(){this.M5||(this.M5=!0,this.B.T.Qa())};h.prototype.kbb=function(){if(this.M5&&this.B&&this.A){this.M5=!1;var L=this.B.O(e.ta,!0);L.translationX=this.A.get("x");L.translationY=this.A.get("y");L.Ze=this.A.get("z");L.fd=-this.A.get("yaw");L.Yd=this.A.get("pitch");L.Xe=0;L.mf="YXZ";
L.positionX=0;L.positionY=0;L.positionZ=0;L.easing=this.A.get("easing")}};h.prototype.hia=function(){this.k0||(this.k0=!0,this.B.T.Qa())};h.prototype.oab=function(){this.k0&&this.B&&this.A&&(this.k0=!1,this.B.O(e.PerspectiveCamera,!0).fov=this.A.get("fov"))};var y=[k.ua.ck,k.ua.Ki,k.ua.fb,k.ua.Db,k.ua.Mp,k.ua.qo,k.ua.Sp,k.ua.uo,k.ua.Q,k.ua.E],z="minYaw maxYaw yaw minPitch maxPitch pitch minX maxX x minY maxY y minZ maxZ z distance easingSpeed".split(" "),A=["minFov","maxFov","fov"],D=Math.PI/180,
F=180/Math.PI,C=new THREE.Matrix4,B=new THREE.Euler,H=new THREE.Vector3,E=new THREE.Vector3,G=new THREE.Vector3,N=new THREE.Vector3,O=new THREE.Vector3,R=new THREE.Vector2,Q=new THREE.Vector3(0,1,0),K=new THREE.Vector2;h.prototype.dispose=function(){this.Oj(null);this.kha();this.Tha();this.D7a();this.xs.ya();this.hy=null};h.Wa=function(L){L.N(e.Lr).manager=new h(L)};h.ya=function(L){var U=L.getComponent(e.Lr);U.manager.dispose();U.manager=null;L.ka(e.Lr)};h.update=function(L){L.getComponent(e.Lr).manager.update()};
h.frame=function(L,U,T){L.getComponent(e.Lr).manager.frame(U,T)};m.prototype.dqa=function(){this.UR||(this.UR=!0,this.Hxa=Date.now()-this.Oea<this.Ixa,this.Oea=Date.now())};m.prototype.eqa=function(){this.UR&&(this.UR=!1)};m.prototype.getState=function(){return this.UR||Date.now()-this.Oea<this.Ixa?this.Hxa?m.Xaa:m.Ki:m.ck};m.ck=0;m.Ki=1;m.Xaa=2;return h});
define("tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/util/geo/Fov tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter tdv/player/view/webgl/system/cameraControls/PropertiesSetter tdv/player/view/webgl/system/cameraControls/SequencesController tdv/player/view/webgl/system/util/mixin/KeyboardMixin tdv/player/view/webgl/system/util/mixin/MouseMixin tdv/view/constants/Cursor tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){function m(V){this.B=
V;this.jha(O);this.Sha();this.xs=new l(V);this.qd=w;this.Ns=this.jk=null;this.yI=.025;this.gn=.25;this.hj=void 0;this.zI=1;this.Pl=this.Zk=this.Ol=this.Wo=this.Vo=0;this.bm=[];this.tH=this.uH=this.vH=this.rH=this.qH=this.AC=this.ik=this.ty=this.uy=this.wy=this.vy=this.sy=void 0;this.Jga=1E3;this.zS=void 0;this.tM=0;this.Ka=null;this.kI(t.IB);this.update()}function h(V,X){V=X-V;V>180?V-=360:V<-180&&(V+=360);return V}function n(){return(new Date).getTime()}var g=a("tdv/utils"),k=a("tdv/constants/EventName"),
e=a("tdv/constants/Key");a("tdv/player/view/util/geo/Fov");var b=a("tdv/player/view/webgl/system/util/entity/Util"),c=a("tdv/player/view/webgl/components"),d=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),f=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),l=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),p=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter");a("tdv/player/view/webgl/system/cameraControls/SequencesController");
var q=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),r=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),t=a("tdv/view/constants/Cursor"),u=a("tdv/view/util/Ease"),v=a("tdv/view/util/EaseDimension");g.D6(m,[d,q,r]);m.prototype.update=function(){var V=this.B.getComponent(c.QF);this.Oj(V&&V.properties);this.xs.gQ(V&&V.properties,"moving");var X=(!V.TO||!f.sP(this.B.T))&&V.enabled;this.a5(V&&(X?V.Rf:null));this.aT(!!V&&X&&V.jE);X||this.TH();X&&V.jE||(this.Wo=this.Vo=this.Ol=this.Zk=
this.Pl=0)};m.prototype.frame=function(V){this.Wi&&(this.Wi.Nb(V),this.Ka.setX(this.Wi.ob("x")),this.Ka.setY(this.Wi.ob("y")),this.Ka.setZ(this.Wi.ob("z")),this.Ka.Yn(this.Wi.ob("distance")),this.Ka.Xj(0),this.Wi.Ve()&&(this.Wi=null));this.uh&&(this.uh=Math.max(0,this.uh-V/this.Jga),this.Ka.setX(this.A.get("x")+this.tH*this.uh),this.Ka.setY(this.A.get("y")+this.uH*this.uh),this.Ka.setZ(this.A.get("z")+this.vH*this.uh),this.Ka.sj(this.A.get("yaw")+this.rH*this.uh),this.Ka.$n(this.A.get("pitch")+this.qH*
this.uh),this.Ka.Xj(0),this.B.T.Qa(),this.uh==0&&this.QU());if(this.Wo||this.Vo||this.Ol||this.Zk||this.Pl){var X=V/1E3;this.Xha(this.Ol*X,this.Zk*X,this.Pl*X,this.Wo*X,this.Vo*X)}if(this.qd==w&&this.km!==void 0&&!this.Zk&&this.A.get("keepHeight")&&this.zS!==void 0&&Math.abs(this.km-this.A.get("y"))>T){this.tM=Math.max(this.tM-V,0);X=this.A.get("y");var S=this.km-X;this.Ka.setY(X+Math.min(V*this.zS,Math.abs(S))*(S>0?1:-1));this.B.T.Qa()}this.qd!=w||!this.Ns||this.uh||this.Wi||(this.HG(),this.B.T.Qa());
this.xs.Esa()};m.prototype.TT=function(){this.Vla()};m.prototype.Vla=function(){var V=this.Pl!=0||this.Zk!=0||this.Ol!=0;this.Wo=this.Vo=this.Pl=this.Zk=this.Ol=0;var X=this.Ig[e.ua.Mp]?1:this.Ig[e.ua.Sp]?-1:0,S=this.Ig[e.ua.uo]?1:this.Ig[e.ua.qo]?-1:0,W=this.Ig[e.ua.Q]?1:this.Ig[e.ua.E]?-1:0,Z=this.Ig[e.ua.ck]?1:this.Ig[e.ua.Ki]?-1:0,ca=this.Ig[e.ua.fb]?1:this.Ig[e.ua.Db]?-1:0;if(Z||ca||X||S||W){var fa=this.sk?.2:1;X&&(this.Ol=-X*fa*this.A.get("translationSpeed"));W&&(this.Zk=-W*fa*this.A.get("translationSpeed"));
S&&(this.Pl=-S*fa*this.A.get("translationSpeed"));ca&&(this.Wo=-ca*fa*100*this.A.get("rotationSpeed"));Z&&(this.Vo=Z*fa*100*this.A.get("rotationSpeed"));this.HG();this.B.T.Qa();this.Lja();this.A0a();X=this.Pl!=0||this.Zk!=0||this.Ol!=0;!V&&X&&this.QU()}};m.prototype.w3=function(){this.zj=!0;this.qd==F||this.qd==C||n()<this.oya+500||(this.kI(t.Mi),this.qd=w)};m.prototype.v3=function(V,X,S,W){if(this.zj&&!(this.qd==F||this.qd==C||n()<this.oya+500)){var Z=(V*V+X*X)/2500;Z=Z>1?1/Math.sqrt(Z):1;V*=Z;X*=
Z;Z=this.g2a();this.qd!=Z?(this.qd=Z,this.qd==x?this.K9a(S,W):this.qd==y?this.BFa():this.qd==z?this.Y9a():this.qd==D&&this.W9a()):this.qd!=w&&(this.qd==x?this.vab(V,X,S,W):this.qd==y?this.Zab(V,X):this.qd==z?this.abb(V,X):this.qd==D&&this.Yab(V,X))}};m.prototype.TH=function(){this.o4(t.Mi);this.zj=!1;this.qd!=w&&(this.qd=w,this.jk=null,this.zFa(),this.Lja(),this.Gza(),this.B.T.Qa())};m.prototype.x3=function(V){this.qd!=A?(this.qd=A,this.S9a()):this.Lab(V);this.Wha&&clearTimeout(this.Wha);this.Wha=
setTimeout(function(){this.Wha=null;this.qd==A&&(this.qd=w,this.Dv())}.bind(this),1E3)};m.prototype.BBa=function(V,X,S,W,Z,ca,fa,ja,ha,ka){this.qd!=F&&this.qd!=C?(V=Math.abs(ca-Z)>.05,S=h(ha,ka)>5,X=Math.abs(W-X)>.02*this.fH(),ha=Math.min(Math.abs(ha),180-Math.abs(ha),Math.abs(ka),180-Math.abs(ka))<10,fa=fa/this.Hy()<.2,(V||X)&&(ha||fa)?(this.qd=C,this.X9a()):!S&&!V||ha&&fa||(this.qd=F,this.Z9a())):this.qd==F?this.bbb(Z,ca,ha,ka):this.qd==C&&this.$ab(X,W,Z,ca)};m.prototype.ria=function(){this.jk=
null;this.qd==F&&this.zFa();this.qd=w;this.oya=n();this.Lja();this.Gza();this.B.T.Qa()};m.prototype.$M=function(V,X){if(this.A.get("doubleClickAction")=="zoom"){var S=b.Sf(this.B),W=b.Bt(this.B);W&&S&&(ea.set(V,X),this.uT(ea),V=this.NS(ea,W),V.length!=0&&(this.Dv(),this.HG(),V=V[0].point,B.setFromMatrixPosition(W.matrixWorld),this.Wi=new u("quad_in_out",[new v("x",B.x,(V.x+B.x)*.5),new v("y",B.y,(V.y+B.y)*.5),new v("z",B.z,(V.z+B.z)*.5),new v("distance",0,0)],500)))}};m.prototype.g2a=function(){return this.az?
this.sk?y:x:this.DM()?this.sk?D:z:w};m.prototype.K9a=function(V,X){this.yN();this.HG();this.UXa(V,X);this.A.get("keepHeight")&&this.B5();this.B.T.Qa()};m.prototype.vab=function(V,X,S,W){var Z=b.Bt(this.B);Z&&(B.setFromMatrixPosition(Z.matrixWorld),this.jk?(H.set(S,W,0),this.uT(H),H.unproject(Z),V=this.jk.x-B.x,X=this.jk.z-B.z,Math.atan2(this.jk.y-B.y,Math.sqrt(X*X+V*V))*U>-2?(G.copy(this.jk).applyMatrix4(Z.matrixWorldInverse),N.copy(H).applyMatrix4(Z.matrixWorldInverse),V=G.z/N.z,E.copy(N).multiplyScalar(V).applyMatrix4(Z.matrixWorld).sub(this.jk),
E.y!=0&&this.Dv()):(V=(this.jk.y-B.y)/(H.y-B.y),E.copy(H).sub(B).multiplyScalar(V).add(B).sub(this.jk)),E.multiplyScalar(-1)):(Y.makeRotationFromEuler(ia.set(0,-this.A.get("yaw")*L,0,"YXZ")),aa.set(-V*this.A.get("translationSpeed")/this.Hy(),0,-X*this.A.get("translationSpeed")/this.Hy()).applyMatrix4(Y),E.copy(aa).multiplyScalar(this.zI*10)),this.Ka.setX(B.x+E.x),this.Ka.setY(B.y+E.y),this.Ka.setZ(B.z+E.z),this.cO(E.x,E.y,E.z,0,0),this.Ka.Xj(this.gn))};m.prototype.BFa=function(){this.yN();this.jk=
null;this.kda();this.Dv();this.B.T.Qa()};m.prototype.Zab=function(V,X){var S;S||(S=1);V=V*360/this.qS()*this.A.get("rotationSpeed");X=-X*180/this.fH()*this.A.get("rotationSpeed");this.Ka.sj(this.A.get("yaw")+V);this.Ka.$n(this.A.get("pitch")+X);this.Ka.Yn(this.aja/S);this.cO(0,0,0,V,X);this.Ka.Xj(this.gn);this.B.T.Qa()};m.prototype.Y9a=function(){this.BFa()};m.prototype.abb=function(V,X){var S=b.Bt(this.B),W=this.A.get("distance")||this.hj||1;X=X*W*2*Math.tan(S.fov*L/2)/this.fH();X!=0&&this.Dv();
this.Ka.setY(this.A.get("y")+X);V=V*360/this.qS()*this.A.get("rotationSpeed");this.Ka.sj(this.A.get("yaw")+V);this.cO(0,X,0,V,0);this.Ka.Xj(this.gn)};m.prototype.W9a=function(){this.yN();this.HG();this.Dv();this.B.T.Qa()};m.prototype.Yab=function(V,X){V=-V*360/this.qS()*this.A.get("rotationSpeed");X=X*180/this.fH()*this.A.get("rotationSpeed");this.Ka.sj(this.A.get("yaw")+V);this.Ka.$n(this.A.get("pitch")+X);this.cO(0,0,0,V,X);this.Ka.Xj(this.gn);this.B.T.Qa()};m.prototype.S9a=function(){this.Dv();
this.yN();this.jk=null;this.HG();this.A.get("keepHeight")&&this.B5();this.B.T.Qa()};m.prototype.Lab=function(V){this.F8a(aa);aa.multiplyScalar(-V*this.A.get("translationSpeed")*(this.zI||1));this.hj&&this.Wva(this.hj+aa.y);this.Ka.setX(this.A.get("x")+aa.x);this.Ka.setY(this.A.get("y")+aa.y);this.Ka.setZ(this.A.get("z")+aa.z);this.Ka.Xj(this.yI)};m.prototype.Z9a=function(){this.yN();this.jk=null;this.kda();this.Dv();this.B.T.Qa();this.yv=void 0};m.prototype.bbb=function(V,X,S,W){this.yv!==void 0||
(this.yv=S);S=h(this.yv,W);this.yv=W;this.Ka.sj(this.A.get("yaw")+S);this.Ka.Yn(this.aja*V/X);this.cO(0,0,0,S,0);this.Ka.Xj(this.gn);this.B.T.Qa()};m.prototype.X9a=function(){this.yN();this.jk=null;this.kda();this.Dv();this.B.T.Qa();this.t4=void 0};m.prototype.$ab=function(V,X,S,W){this.t4!==void 0||(this.t4=V);V=-(X-this.t4)*180/this.fH();this.t4=X;this.Ka.$n(this.A.get("pitch")+V);this.Ka.Yn(this.aja*S/W);this.cO(0,0,0,0,V);this.Ka.Xj(this.gn);this.B.T.Qa()};m.prototype.UXa=function(V,X){var S=
b.Sf(this.B),W=b.Bt(this.B);this.jk=null;W&&S&&(ea.set(V,X),this.uT(ea),V=this.NS(ea,W),V.length&&(this.jk=V[0].point))};m.prototype.kda=function(){this.Ns=null;var V=b.Sf(this.B),X=b.Bt(this.B);X&&V&&(ea.set(0,0),V=this.NS(ea,X),V.length&&(this.Ns=V[0].point),this.Ns||(this.Ns=(new THREE.Vector3).setFromMatrixPosition(X.matrixWorld)),this.A.set("distance",B.setFromMatrixPosition(X.matrixWorld).distanceTo(this.Ns)),this.aja=this.A.get("distance"),this.A.set("x",this.Ns.x),this.A.set("y",this.Ns.y),
this.A.set("z",this.Ns.z),this.A.set("easing",0))};m.prototype.HG=function(){this.Ns&&(this.Ns=null,B.setFromMatrixPosition(b.Bt(this.B).matrixWorld),this.A.set("distance",0),this.A.set("x",B.x),this.A.set("y",B.y),this.A.set("z",B.z),this.A.set("easing",0))};var w="none",x="dragging",y="rotating",z="rotating yaw dragging y",A="moving front",D="rotating around camera",F="rotating yaw gesture",C="rotating pitch gesture",B=new THREE.Vector3,H=new THREE.Vector3,E=new THREE.Vector3,G=new THREE.Vector3,
N=new THREE.Vector3;m.prototype.Oj=function(V){this.A!=V&&(this.A&&(this.Ka=null,R.forEach(function(X){this.A.h(k.L(X),this.aHa,this,!1)}.bind(this)),Q.forEach(function(X){this.A.h(k.L(X),this.aA,this,!1)}.bind(this)),K.forEach(function(X){this.A.h(k.L(X),this.et,this,!1)}.bind(this)),this.A.set("userInteracting",!1)),this.A=V)&&(this.Ka=new p(this.A),R.forEach(function(X){this.A.bind(k.L(X),this.aHa,this,!1)}.bind(this)),Q.forEach(function(X){this.A.bind(k.L(X),this.aA,this,!1)}.bind(this)),K.forEach(function(X){this.A.bind(k.L(X),
this.et,this,!1)}.bind(this)),this.aA(),this.et(),this.A.set("userInteracting",!1))};m.prototype.aA=function(){if(this.B&&this.A){var V=this.B.O(c.ta,!0);V.translationX=this.A.get("x");var X=this.A.get("y")-V.translationY;Math.abs(X)>T&&(V.translationY=this.A.get("y"),this.qd!=w||this.Ol||this.Zk||this.Pl||this.Wo||this.Vo||this.Wi||this.uh||this.Dv());V.Ze=this.A.get("z");V.fd=-this.A.get("yaw");V.Yd=this.A.get("pitch");V.Xe=0;V.mf="YXZ";V.positionX=0;V.positionY=0;V.positionZ=this.A.get("distance");
V.easing=this.A.get("easing");(this.A.get("minHeight")!==void 0||this.A.get("keepHeight"))&&this.oHa()}};m.prototype.et=function(){this.B&&this.A&&(this.B.O(c.PerspectiveCamera,!0).fov=this.A.get("fov"))};m.prototype.Xha=function(V,X,S,W,Z){var ca=this.B.getComponent(c.ta);ca&&(Y.makeRotationFromEuler(ia.set(0,ca.fd*L,0,ca.mf)),aa.set(V,X,S).applyMatrix4(Y).multiplyScalar(this.zI),this.hj!==void 0&&(this.hj+=aa.y,this.QU()),this.Ka.setX(this.A.get("x")+aa.x),this.Ka.setY(this.A.get("y")+aa.y),this.Ka.setZ(this.A.get("z")+
aa.z),this.Ka.sj(this.A.get("yaw")+W),this.Ka.$n(this.A.get("pitch")+Z),this.Ka.Xj(this.gn))};m.prototype.F8a=function(V){var X=this.B.getComponent(c.ta);X&&(Y.makeRotationFromEuler(ia.set(X.Yd*L,X.fd*L,X.Xe*L,X.mf)),V.set(0,0,1).applyMatrix4(Y))};m.prototype.yN=function(){this.AC=n();this.ik=1;this.ty=this.uy=this.wy=this.vy=this.sy=0;this.uh=this.tH=this.uH=this.vH=this.rH=this.qH=void 0};m.prototype.cO=function(V,X,S,W,Z){var ca=n();this.ik=ca-this.AC;this.AC=ca;this.ty=V;this.uy=X;this.wy=S;this.vy=
W;this.sy=Z};m.prototype.zFa=function(){this.ik&&(this.tH=this.ty/this.ik,this.uH=this.uy/this.ik,this.vH=this.wy/this.ik,this.rH=this.vy/this.ik,this.qH=this.sy/this.ik,this.uh=1)};m.prototype.aHa=function(){this.A.get("minHeight")!==void 0&&(this.hj===void 0&&this.B5(),this.hj!==void 0&&this.hj<this.A.get("minHeight")&&(this.hj=this.A.get("minHeight")),this.oHa())};m.prototype.Dv=function(){this.hj=this.km=void 0;this.RU&&(clearTimeout(this.RU),this.RU=null)};m.prototype.Gza=function(){this.tM=
2E3;this.zS=void 0;this.B.T.Qa()};m.prototype.A0a=function(){this.tM=0;this.zS=Infinity;this.B.T.Qa()};m.prototype.Lja=function(){this.jk||this.hj!==void 0||this.RU||(this.RU=setTimeout(function(){this.RU=null;this.B5()}.bind(this),0))};m.prototype.B5=function(){var V=this.oS();V!==void 0?this.Wva(V):this.QU()};m.prototype.Wva=function(V){var X=this.A.get("minHeight")||V;this.hj=Math.max(V,X);this.QU();this.km=this.A.get("y")+this.hj-V};m.prototype.QU=function(){if(this.hj)this.zI=Math.min(10,Math.max(this.hj||
0,.1));else{this.ns(aa);this.P1a(ba);var V=this.Oga(aa,ba);this.zI=V.length?aa.distanceTo(V[0].point):aa.y-(this.A.get("minY")||0)}this.zI=Math.max(Math.abs(this.zI||0),.1)};m.prototype.oHa=function(){this.pHa||this.hj===void 0||(this.pHa=setTimeout(function(){this.pHa=null;var V=this.oS();V!==void 0&&this.hj!==void 0&&(V=this.hj-V,this.zS=this.tM==0?Infinity:Math.abs(V/this.tM),this.km=this.A.get("y")+V,V!==0&&this.B.T.Qa())}.bind(this),0))};m.prototype.oS=function(){if(this.A)return this.ns(aa),
this.r2a(aa.x,aa.y,aa.z)};m.prototype.r2a=function(V,X,S){var W=this.Oga(aa.set(V,X,S),ba.set(0,-1,0));if(W.length>0)return W[0].distance;W=this.Oga(aa.set(V,X+1E3,S),ba.set(0,-1,0));if(W.length>0)return W[W.length-1].distance-1E3};m.prototype.Oga=function(V,X){da.ray.origin.copy(V);da.ray.direction.copy(X);return da.intersectObjects(this.hH(),!1)};m.prototype.NS=function(V,X){da.setFromCamera(V,X);return da.intersectObjects(this.hH(),!1)};m.prototype.hH=function(){var V=this.B&&b.Sf(this.B);if(!V)return[];
var X=[];V.traverse(function(S){S.isSprite||S.isLine||X.push(S)});return X};m.prototype.ns=function(V){V.set(0,0,0);this.A&&(V.applyMatrix4(Y.makeTranslation(0,0,this.A.get("distance"))),V.applyMatrix4(Y.makeRotationFromEuler(ia.set(this.A.get("pitch")*L,-this.A.get("yaw")*L,0*L,"YXZ"))),V.applyMatrix4(Y.makeTranslation(this.A.get("x"),this.A.get("y"),this.A.get("z"))))};m.prototype.P1a=function(V){this.A?(Y.makeRotationFromEuler(ia.set(this.A.get("pitch")*L,-this.A.get("yaw")*L,0,"YXZ")),V.set(0,
0,-1).applyMatrix4(Y)):V.set(0,0,-1)};var O=[e.ua.ck,e.ua.Ki,e.ua.fb,e.ua.Db,e.ua.Mp,e.ua.qo,e.ua.Sp,e.ua.uo,e.ua.Q,e.ua.E],R=["minHeight"],Q="minYaw maxYaw yaw minPitch maxPitch pitch minX maxX x minY maxY y minZ maxZ z distance easingSpeed".split(" "),K=["minFov","maxFov","fov"],L=Math.PI/180,U=180/Math.PI,T=1E-6,Y=new THREE.Matrix4,aa=new THREE.Vector3(0,0,0),ba=new THREE.Vector3(0,0,0),ea=new THREE.Vector2(0,0),ia=new THREE.Euler,da=new THREE.Raycaster;m.prototype.dispose=function(){this.HG();
this.Oj(null);this.kha();this.Tha();this.xs.ya()};m.Wa=function(V){V.N(c.Nr).manager=new m(V)};m.ya=function(V){var X=V.getComponent(c.Nr);X.manager.dispose();X.manager=null;V.ka(c.Nr)};m.update=function(V){V.getComponent(c.Nr).manager.update()};m.frame=function(V,X,S){V.getComponent(c.Nr).manager.frame(X,S)};return m});
define("tdv/player/view/webgl/system/cameraControls/OrbitBehaviour","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter tdv/player/view/webgl/system/cameraControls/PropertiesSetter tdv/player/view/webgl/system/util/mixin/KeyboardMixin tdv/player/view/webgl/system/util/mixin/MouseMixin tdv/view/constants/Cursor".split(" "),function(a){function m(B){this.B=
B;this.jha(D);this.Sha();this.xs=new d(B);this.jl=new THREE.Matrix4;this.yI=.05;this.gn=.25;this.Ol=this.Zk=this.Pl=this.Wo=this.Vo=0;this.tH=this.uH=this.vH=this.rH=this.qH=this.AC=this.ik=this.ty=this.uy=this.wy=this.vy=this.sy=void 0;this.Jga=1E3;this.pEa=720;this.jGa=4;this.cAa=720;this.lha=2;this.Ka=null;this.kI(q.IB);this.update()}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Key"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),c=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),d=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),f=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter"),l=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),p=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),q=a("tdv/view/constants/Cursor");h.D6(m,[b,l,p]);m.prototype.update=function(){var B=this.B.getComponent(k.XF);
this.Oj(B&&B.properties);this.xs.gQ(B&&B.properties,"moving");var H=(!B.TO||!c.sP(this.B.T))&&B.enabled;this.a5(B&&(H?B.Rf:null));this.aT(!!B&&H&&B.jE);H||this.TH();H&&B.jE||(this.Wo=this.Vo=this.Ol=this.Zk=this.Pl=0)};m.prototype.frame=function(B){this.uh&&(this.uh=Math.max(0,this.uh-B/this.Jga),this.Ka.setX(this.A.get("x")+this.tH*this.uh),this.Ka.setY(this.A.get("y")+this.uH*this.uh),this.Ka.setZ(this.A.get("z")+this.vH*this.uh),this.Ka.sj(this.A.get("yaw")+this.rH*this.uh),this.Ka.$n(this.A.get("pitch")+
this.qH*this.uh),this.B.T.Qa());if(this.Wo||this.Vo||this.Ol||this.Zk||this.Pl)B/=1E3,this.Xha(this.Ol*B,this.Zk*B,this.Pl*B,this.Wo*B,this.Vo*B);this.xs.Esa()};m.prototype.TT=function(){this.Vla()};m.prototype.Vla=function(){this.Wo=this.Vo=this.Pl=this.Zk=this.Ol=0;var B=this.Ig[g.ua.Mp]?1:this.Ig[g.ua.Sp]?-1:0,H=this.Ig[g.ua.uo]?1:this.Ig[g.ua.qo]?-1:0,E=this.Ig[g.ua.Q]?1:this.Ig[g.ua.E]?-1:0,G=this.Ig[g.ua.ck]?1:this.Ig[g.ua.Ki]?-1:0,N=this.Ig[g.ua.fb]?1:this.Ig[g.ua.Db]?-1:0;if(B||H||E||G||N){var O=
this.sk?.2:1;B&&(this.Ol=-B*O*this.lha*this.A.get("translationSpeed"));E&&(this.Zk=-E*O*this.lha*this.A.get("translationSpeed"));H&&(this.Pl=-H*O*this.lha*this.A.get("translationSpeed"));N&&(this.Wo=N*O*this.cAa*this.A.get("rotationSpeed"));G&&(this.Vo=-G*O*this.cAa*this.A.get("rotationSpeed"));this.B.T.Qa()}};m.prototype.w3=function(){this.kI(q.Mi);this.zj=!0;this.AC=(new Date).getTime();this.ik=1;this.ty=this.uy=this.wy=this.vy=this.sy=0;this.uh=this.tH=this.uH=this.vH=this.rH=this.qH=void 0;this.B.T.Qa()};
m.prototype.v3=function(B,H){if(this.zj){var E=(B*B+H*H)/2500;E=E>1?1/Math.sqrt(E):1;B*=E;H*=E;E=(new Date).getTime();this.ik=E-this.AC;this.AC=E;this.ty=this.uy=this.wy=this.vy=this.sy=0;E=this.az;this.sk&&(E=!E);E?(this.vy=+B*this.A.get("rotationSpeed")*this.pEa/this.Hy(),this.sy=-H*this.A.get("rotationSpeed")*this.pEa/this.Hy(),this.oEa(this.vy,this.sy)):(this.Hya(B*this.jGa/this.Hy(),H*this.jGa/this.Hy(),u),this.ty=u.x,this.uy=u.y,this.wy=u.z,this.tla(this.ty,this.uy,this.wy));this.Ka.Xj(this.gn)}};
m.prototype.Hya=function(B,H,E){var G=this.B.getComponent(k.ta);E.set(-B*this.A.get("translationSpeed"),+H*this.A.get("translationSpeed"),0*this.A.get("translationSpeed"));E.applyMatrix4(z.makeRotationFromEuler(y.set(G.Yd*r,G.fd*r,G.Xe*r,G.mf)));E.multiplyScalar(this.A.get("distance"))};m.prototype.TH=function(){this.o4(q.Mi);this.zj&&(this.zj=!1,this.ik&&(this.tH=this.ty/this.ik,this.uH=this.uy/this.ik,this.vH=this.wy/this.ik,this.rH=this.vy/this.ik,this.qH=this.sy/this.ik,this.uh=1,this.Ka.Xj(this.gn)),
this.AC=void 0)};m.prototype.x3=function(B){this.Ka.Yn(this.A.get("distance")-B*this.A.get("distance")*this.A.get("translationSpeed"));this.Ka.Xj(this.yI)};m.prototype.$M=function(B,H){if(this.A.get("doubleClickAction")=="center"){var E=e.Sf(this.B),G=e.Bt(this.B);G&&E&&(w.set(B,H),this.uT(w),B=this.NS(w,G),B.length!=0&&(B=B[0].point,H=u.setFromMatrixPosition(G.matrixWorld).sub(B),G=H.length(),x.setFromUnitVectors(v.set(0,0,1),H.normalize()),y.setFromQuaternion(x,"YXZ"),H=y.x*t,this.Ka.sj(-y.y*t),
this.Ka.$n(H),this.Ka.Yn(G),this.Ka.setX(B.x),this.Ka.setY(B.y),this.Ka.setZ(B.z),this.Ka.Xj(this.yI)))}};m.prototype.CBa=function(){this.Hza=this.A.get("distance");this.zj=!1};m.prototype.qia=function(B,H,E){this.Hya(B/this.Hy(),H/this.Hy(),u);this.tla(u.x,u.y,u.z);this.Ka.Yn(this.Hza/E);this.Ka.Xj(this.gn)};m.prototype.ria=function(){this.Hza=this.A.get("distance")};m.prototype.Xha=function(B,H,E,G,N){var O=this.B.getComponent(k.ta);O&&(z.makeRotationFromEuler(y.set(0,O.fd*r,0,O.mf)),u.set(B,H,
E).applyMatrix4(z).multiplyScalar(this.A.get("distance")),this.tla(u.x,u.y,u.z),this.oEa(G,N),this.Ka.Xj(this.gn))};m.prototype.tla=function(B,H,E){this.Ka.setX(this.A.get("x")+B);this.Ka.setY(this.A.get("y")+H);this.Ka.setZ(this.A.get("z")+E)};m.prototype.oEa=function(B,H){this.Ka.sj(this.A.get("yaw")+B);this.Ka.$n(this.A.get("pitch")+H)};m.prototype.Oj=function(B){this.A!=B&&(this.A&&(this.Ka=null,F.forEach(H=>{this.A.h(n.L(H),this.aA,this)}),C.forEach(H=>{this.A.h(n.L(H),this.et,this)}),this.A.set("userInteracting",
!1)),this.A=B)&&(this.A.set("userInteracting",!1),this.Ka=new f(this.A),F.forEach(H=>{this.A.bind(n.L(H),this.aA,this)}),C.forEach(H=>{this.A.bind(n.L(H),this.et,this)}),this.aA(),this.et())};m.prototype.NS=function(B,H){A.setFromCamera(B,H);return A.intersectObjects(this.hH(),!1)};m.prototype.hH=function(){var B=this.B&&e.Sf(this.B);if(!B)return[];var H=[];B.traverse(function(E){E.isSprite||E.isLine||H.push(E)});return H};m.prototype.aA=function(){if(this.B&&this.A){var B=this.B.O(k.ta,!0);B.translationX=
this.A.get("x");B.translationY=this.A.get("y");B.Ze=this.A.get("z");B.fd=-this.A.get("yaw");B.Yd=this.A.get("pitch");B.Xe=0;B.mf="YXZ";B.positionX=0;B.positionY=0;B.positionZ=this.A.get("distance");B.easing=this.A.get("easing")}};m.prototype.et=function(){this.B&&this.A&&(this.B.O(k.PerspectiveCamera,!0).fov=this.A.get("fov"))};var r=Math.PI/180,t=180/Math.PI,u=new THREE.Vector3(0,1,0),v=new THREE.Vector3(0,1,0),w=new THREE.Vector2(0,0),x=new THREE.Quaternion,y=new THREE.Euler,z=new THREE.Matrix4,
A=new THREE.Raycaster,D=[g.ua.ck,g.ua.Ki,g.ua.fb,g.ua.Db,g.ua.Mp,g.ua.qo,g.ua.Sp,g.ua.uo,g.ua.Q,g.ua.E],F="easing minYaw maxYaw yaw minPitch maxPitch pitch minDistance maxDistance distance minX maxX x minY maxY y minZ maxZ z".split(" "),C=["minFov","maxFov","fov"];m.prototype.dispose=function(){this.Oj(null);this.kha();this.Tha();this.xs.ya()};m.Wa=function(B){B.N(k.Tr).manager=new m(B)};m.ya=function(B){var H=B.getComponent(k.Tr);H.manager.dispose();H.manager=null;B.ka(k.Tr)};m.update=function(B){B.getComponent(k.Tr).manager.update()};
m.frame=function(B,H,E){B.getComponent(k.Tr).manager.frame(H,E)};return m});
define("tdv/player/view/webgl/system/cameraControls/TransitionBehaviour","require exports tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k){a=function(){function r(t){this.F=t;this.properties=this.F.getComponent(g.Kx).properties;this.oj()&&this.vcb();this.update()}r.prototype.update=function(){this.properties=this.F.getComponent(g.Kx).properties;this.oj()||this.GIa()};r.prototype.frame=function(){this.oj()?
this.ucb():this.GIa()};r.prototype.vcb=function(){this.uKa();var t=this.HLa();h.setPosition({x:t.x,y:t.y,z:t.z,yaw:this.properties.get("yaw")});this.VRa()};r.prototype.ucb=function(){this.uKa();var t=this.HLa();h.setPosition({x:t.x,y:t.y,z:t.z,yaw:void 0});this.VRa();this.properties.set("yaw",-c.setFromQuaternion(h.wg).y*e)};r.prototype.VRa=function(){h.setScale(this.F.getComponent(g.Kx).pf||1)};r.prototype.GIa=function(){var t=this.F.O(g.ta,!0);t.translationX=this.properties.get("x");t.translationY=
this.properties.get("y");t.Ze=this.properties.get("z");t.fd=-this.properties.get("yaw");t.Yd=this.properties.get("pitch");t.Xe=0;t.mf="YXZ";t.positionX=0;t.positionY=0;t.positionZ=this.properties.get("distance",0);t.easing=0;this.F.O(g.PerspectiveCamera,!0).fov=this.properties.get("fov")};r.prototype.uKa=function(){var t=n.Sf(this.F),u=this.F.getComponent(g.Sk);u=u&&u.camera;h.Nw!==u&&h.xra(h.Uf,t,u,h.YQ.Uba)};r.prototype.oj=function(){return this.F.getComponent(g.PerspectiveCamera).oj};r.prototype.HLa=
function(){var t=this.properties.get("x"),u=this.properties.get("y"),v=this.properties.get("z"),w=this.properties.get("pitch"),x=this.properties.get("yaw"),y=this.properties.get("distance");d.identity();d.multiply(f.makeTranslation(t,u,v));d.multiply(f.makeRotationFromEuler(c.set(w*b,-x*b,0,"YXZ")));d.multiply(f.makeTranslation(0,0,y));d.decompose(l,q,p);return l};r.Wa=function(t){t.N(g.Lu).manager=new r(t)};r.update=function(t){t.getComponent(g.Lu).manager.update()};r.frame=function(t,u,v){t.getComponent(g.Lu).manager.frame(u,
v)};r.ya=function(t){t.getComponent(g.Lu).manager=null;t.ka(g.Lu)};return r}();var e=180/Math.PI,b=Math.PI/180,c=new k.Euler,d=new k.Matrix4,f=new k.Matrix4,l=new k.Vector3,p=new k.Vector3,q=new k.Quaternion;return a});
define("tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR","tdv/player/view/webgl/components"],function(a,m,h,n,g){return function(){function k(e){this.locked=!0;this.Di=!1;this.F=e;n.M.bind(h.V,this.Ta,this,!0);this.update()}k.prototype.update=function(){var e=this.F.getComponent(g.gG);e=(e===null||e===void 0?void 0:e.locked)||!1;!e&&this.locked&&(this.Di=!0);this.locked=e;this.Di&&n.d$()};k.prototype.frame=function(){this.locked||
(this.Di=!1)};k.prototype.dispose=function(){n.M.h(h.V,this.Ta,this)};k.prototype.Ta=function(){this.F.O(g.Yp)};k.Wa=function(e){e.N(g.Yp).manager=new k(e)};k.update=function(e){e.getComponent(g.Yp).manager.update()};k.frame=function(e,b,c){e.getComponent(g.Yp).manager.frame(b,c)};k.ya=function(e){var b=e.getComponent(g.Yp);b.manager.dispose();b.manager=null;e.ka(g.Yp)};return k}()});
define("tdv/player/view/webgl/system/cameraControls/XRDragBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k,e){a=function(){function y(z){this.locked=!0;this.Di=!1;this.Rna=this.rm=this.Ae=null;this.i7=new e.Matrix4;this.mJ=new e.Vector3;this.VP=new Map;this.pf=1;this.fF=0;this.ru=!1;this.Kk=0;this.wk=null;this.FE=new e.Vector3;this.Hd=
new e.Vector3;this.Z8=new e.Quaternion;this.zY=this.AY=this.BY=0;this.dA=new e.Box3(new e.Vector3(-Infinity,-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=z;this.Dk=this.Dk.bind(this);this.ot=new g(this.F);n.M.bind(h.V,this.Ta,this,!0);this.update()}y.prototype.update=function(){var z=this.F.getComponent(k.oL),A=(z===null||z===void 0?void 0:z.locked)||!1;!A&&this.locked&&(this.Di=!0);this.locked=A;this.pf=(z===null||z===void 0?void 0:z.pf)||1;this.Kk=z===null||z===void 0?void 0:
z.Kk;this.iF();this.properties=z.properties;this.locked||(n.setScale(this.pf),this.IW(),this.Dk());this.Di&&(b.setFromQuaternion(n.yl),n.setPosition({pitch:b.x*w,roll:b.z*w}),this.aJ())};y.prototype.frame=function(z){if(!this.locked){this.ou();this.LZ();this.aJ();if(!this.properties.get("controllingPosition")){this.Hd.copy(n.Ec);this.Z8.copy(n.wg);var A;(A=this.AW())||(A=this.Vma(z));A||(A=this.BW(z));A&&(z={},n.Ec.equals(this.Hd)||(z.x=this.Hd.x,z.y=this.Hd.y,z.z=this.Hd.z),n.wg.equals(this.Z8)||
(b.setFromQuaternion(this.Z8,"YXZ"),z.yaw=-b.y*w,z.pitch=b.x*w,z.roll=b.z*w),n.setPosition(z))}this.$I();this.AO();this.Di=!1}};y.prototype.dispose=function(){n.M.h(h.V,this.Ta,this);this.properties.set("userInteracting",!1);this.iF();this.lf();this.lZ([])};y.prototype.iF=function(){y.NB.forEach(function(z){var A;(A=this.properties)===null||A===void 0||A.h(h.L(z),this.Dk,this)}.bind(this))};y.prototype.IW=function(){y.NB.forEach(function(z){var A;(A=this.properties)===null||A===void 0||A.bind(h.L(z),
this.Dk,this,!0)}.bind(this))};y.prototype.Dk=function(){this.dA.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.dA.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};y.prototype.aJ=function(){var z=this.properties.get("x"),A=this.properties.get("y"),D=this.properties.get("z"),F=this.properties.get("yaw"),C=this.properties.get("pitch"),B=this.properties.get("distance");
if(z!==this.FE.x||A!==this.FE.y||D!==this.FE.z||F!==this.BY||C!==this.AY||B!==this.zY)this.FE.set(z,A,D),l.identity(),l.multiply(p.makeTranslation(z,A,D)),l.multiply(p.makeRotationFromEuler(b.set(C*x,-F*x,0,"YXZ"))),l.multiply(p.makeTranslation(0,0,B)),l.decompose(d,c,f),b.setFromQuaternion(c,"YXZ"),n.setPosition({x:d.x,y:d.y,z:d.z,yaw:-b.y*w})};y.prototype.$I=function(){d.copy(n.Ec).sub(this.FE);var z=d.length();b.setFromQuaternion(c.setFromUnitVectors(u,d.multiplyScalar(1/z)),"YXZ");this.properties.set("x",
this.FE.x);this.properties.set("y",this.FE.y);this.properties.set("z",this.FE.z);this.properties.set("yaw",-b.y*w);this.properties.set("pitch",b.x*w);this.properties.set("roll",b.z*w);this.properties.set("distance",z)};y.prototype.AO=function(){this.BY=this.properties.get("yaw");this.AY=this.properties.get("pitch");this.zY=this.properties.get("distance")};y.prototype.ou=function(){this.lZ((y.nF.get(this.F.T)||[]).map(function(z){return z.getComponent(k.yc)}))};y.prototype.lZ=function(z){var A=[],
D=[];this.VP.forEach(function(F){z.indexOf(F)===-1&&A.push(F)}.bind(this));z.forEach(function(F){this.VP.has(F.M)||D.push(F)}.bind(this));this.rm&&z.indexOf(this.rm)===-1&&this.lf();A.forEach(function(F){this.CY(F.M);this.VP.delete(F.M)}.bind(this));D.forEach(function(F){this.yW(F.M);this.VP.set(F.M,F)}.bind(this));this.Ae=z.find(function(F){return F.Ug})||null};y.prototype.yW=function(z){z.bind(h.ma,this.Mt,this,!0);z.bind(h.Sa,this.$h,this,!0)};y.prototype.CY=function(z){z.h(h.ma,this.Mt,this);
z.h(h.Sa,this.$h,this)};y.prototype.Ta=function(){this.F.O(k.Zp)};y.prototype.Mt=function(z){this.properties.get("inMandatorySequence")||z.data.FX||z.data.type=="other"||this.properties.get("clickTranslationDisabled")||(z=this.VP.get(z.source),z=this.ot.LX(z),z.length!=0&&(this.wk=z[0].point))};y.prototype.$h=function(z){if(!this.properties.get("inMandatorySequence")&&!this.properties.get("mouseDisabled")){this.lf();z=z.source;var A=this.VP.get(z),D=this.ot.LX(A);D.length!=0&&(this.rm=A,this.Rna=
z,this.Rna.bind(h.$a,this.lf,this,!0),this.mJ.copy(D[0].point),this.i7.copy(this.rm.matrixWorld))}};y.prototype.lf=function(){this.rm&&(this.rm.M.h(h.$a,this.lf,this),this.rm=this.Rna=null)};y.prototype.AW=function(){if(!this.wk)return!1;this.Hd.copy(this.wk).sub(n.Ec).multiplyScalar(.5).add(n.Ec);this.wk=null;return!0};y.prototype.BW=function(z){return this.DW()?!0:this.EW(z)?!0:!1};y.prototype.DW=function(){if(!this.Ae)return!1;if(this.Ae.Qb.y===0&&this.Ae.Qb.x===0)return this.fF=Date.now(),this.ru=
!1;if(this.ru)return!0;var z=Math.sqrt(this.Ae.Qb.y*this.Ae.Qb.y+this.Ae.Qb.x*this.Ae.Qb.x)*this.properties.get("rotationSpeed",1),A=Math.atan2(-this.Ae.Qb.y,this.Ae.Qb.x),D=Math.abs(A)<Math.PI*.25;A=Math.abs(A)>Math.PI*.75;return this.Kk!==0&&z>.95&&(D||A)&&Date.now()-this.fF<100?(this.ru=!0,z=this.Kk*(A?-1:1),z=-b.setFromQuaternion(n.wg,"YXZ").y*w+z,n.setPosition({yaw:z}),!0):!1};y.prototype.EW=function(z){if(!this.Ae||this.Ae.Qb.y===0&&this.Ae.Qb.x===0)return!1;z=4E3/3600/this.pf*this.properties.get("translationSpeed",
1)*(this.Ae.gx?3:1)*z/1E3;var A=d.set(0,0,-1).applyQuaternion(n.wg),D=f.set(1,0,0).applyQuaternion(n.wg);A.normalize().multiplyScalar(-this.Ae.Qb.y*z);D.normalize().multiplyScalar(this.Ae.Qb.x*z);this.Hd.set(n.Ec.x+A.x+D.x,n.Ec.y+A.y+D.y,n.Ec.z+A.z+D.z);return!0};y.prototype.Vma=function(z){if(!this.rm)return!1;this.Wma(z);z=l.copy(this.i7);var A=p.copy(this.rm.matrixWorld),D=q.compose(n.Ec,n.wg,v);A=r.copy(D).invert().multiply(A);t.copy(z).multiply(A.invert()).decompose(this.Hd,this.Z8,d);return!0};
y.prototype.Wma=function(z){if(!this.rm||this.rm.Qb.y===0&&this.rm.Qb.x===0)return!1;z=90*z/1E3*this.properties.get("rotationSpeed",1);var A=q.makeRotationFromQuaternion(c.setFromRotationMatrix(this.i7)),D=r.copy(A).invert(),F=p.identity();F.multiply(l.makeTranslation(this.mJ.x,this.mJ.y,this.mJ.z));F.multiply(A);F.multiply(l.makeRotationFromEuler(b.set(this.rm.Qb.y*z*x,this.rm.Qb.x*z*x,0,"YXZ")));F.multiply(D);F.multiply(l.makeTranslation(-this.mJ.x,-this.mJ.y,-this.mJ.z));this.i7.premultiply(F);
return!0};y.prototype.LZ=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.rm?this.properties.set("userInteracting",!0):this.wk?this.properties.set("userInteracting",!0):this.Ae&&this.Ae.pressed&&(this.Ae.Qb.y!==0||this.Ae.Qb.x!==0)?this.properties.set("userInteracting",!0):this.properties.set("userInteracting",!1)};y.tK=function(z,A){this.nF.set(z,A)};y.Wa=function(z){z.N(k.Zp).manager=new y(z)};y.update=function(z){z.getComponent(k.Zp).manager.update()};
y.frame=function(z,A,D){z.getComponent(k.Zp).manager.frame(A,D)};y.ya=function(z){var A=z.getComponent(k.Zp);A.manager.dispose();A.manager=null;z.ka(k.Zp)};y.nF=new Map;y.NB="minX maxX minY maxY minZ maxZ".split(" ");return y}();var b=new e.Euler(0,0,0,"YXZ"),c=new e.Quaternion,d=new e.Vector3,f=new e.Vector3,l=new e.Matrix4,p=new e.Matrix4,q=new e.Matrix4,r=new e.Matrix4,t=new e.Matrix4,u=new e.Vector3(0,0,1),v=new e.Vector3(1,1,1),w=180/Math.PI,x=Math.PI/180;return a});
define("tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k,e){a=function(){function x(y){this.locked=!0;this.Di=!1;this.qj=this.KY=this.Ae=null;this.Npa=new e.Matrix4;this.aK=[];this.pf=1;this.fF=0;this.ru=!1;this.Kk=0;this.wk=null;this.Vsa=!1;this.Hd=new e.Vector3;this.zY=this.AY=this.BY=
this.$Pa=this.ZPa=this.YPa=0;this.dA=new e.Box3(new e.Vector3(-Infinity,-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=y;this.Dk=this.Dk.bind(this);this.ot=new g(this.F);n.M.bind(h.V,this.Ta,this,!0);this.update()}x.prototype.update=function(){var y=this.F.getComponent(k.pL),z=(y===null||y===void 0?void 0:y.locked)||!1;!z&&this.locked&&(this.Di=!0);this.locked=z;this.pf=(y===null||y===void 0?void 0:y.pf)||1;this.Kk=y===null||y===void 0?void 0:y.Kk;this.iF();this.properties=
y.properties;this.locked||(n.setScale(this.pf),this.IW(),this.Dk());this.Di&&(b.setFromQuaternion(n.yl),n.setPosition({pitch:b.x*v,roll:b.z*v}),this.aJ(!0))};x.prototype.frame=function(y){if(!this.locked){this.ou();this.LZ();this.aJ(!1);if(!this.properties.get("controllingPosition")){this.Hd.copy(n.Ec);var z=this.wE=-b.setFromQuaternion(n.wg).y*v;var A=this.AW();this.Vsa&&this.qj&&this.Npa.copy(this.qj.matrixWorld);this.Vsa=!1;A||(A=this.Vsa=this.Wma(y));A||(A=this.Vma(y));A||(A=this.BW(y));A&&(y=
{},n.Ec.equals(this.Hd)||(y.x=this.Hd.x,y.y=this.Hd.y,y.z=this.Hd.z),this.wE!=z&&(y.yaw=this.wE),n.setPosition(y))}this.$I();this.AO();this.Di=!1}};x.prototype.dispose=function(){n.M.h(h.V,this.Ta,this);this.properties.set("userInteracting",!1);this.iF();this.lf();this.lZ([])};x.prototype.iF=function(){x.NB.forEach(function(y){var z;(z=this.properties)===null||z===void 0||z.h(h.L(y),this.Dk,this)}.bind(this))};x.prototype.IW=function(){x.NB.forEach(function(y){var z;(z=this.properties)===null||z===
void 0||z.bind(h.L(y),this.Dk,this,!0)}.bind(this))};x.prototype.Dk=function(){this.dA.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.dA.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};x.prototype.aJ=function(y){var z=this.properties.get("x"),A=this.properties.get("y"),D=this.properties.get("z"),F=this.properties.get("controllingPosition"),C=this.properties.get("yaw"),
B=this.properties.get("pitch"),H=this.properties.get("distance");if(z!==this.YPa||A!==this.ZPa||D!==this.$Pa||C!==this.BY||B!==this.AY||H!==this.zY)l.identity(),l.multiply(p.makeTranslation(z,A,D)),l.multiply(p.makeRotationFromEuler(b.set(B*w,-C*w,0,"YXZ"))),l.multiply(p.makeTranslation(0,0,H)),l.decompose(d,c,f),b.setFromQuaternion(c,"YXZ"),n.setPosition({x:d.x,y:d.y,z:d.z,yaw:!y||F?void 0:-b.y*v})};x.prototype.$I=function(){this.properties.set("x",n.Ec.x);this.properties.set("y",n.Ec.y);this.properties.set("z",
n.Ec.z);b.setFromQuaternion(n.wg);this.properties.set("yaw",-b.y*v);this.properties.set("pitch",b.x*v);this.properties.set("roll",b.z*v);this.properties.set("distance",0)};x.prototype.AO=function(){this.YPa=this.properties.get("x");this.ZPa=this.properties.get("y");this.$Pa=this.properties.get("z");this.BY=this.properties.get("yaw");this.AY=this.properties.get("pitch");this.zY=this.properties.get("distance")};x.prototype.ou=function(){this.lZ((x.nF.get(this.F.T)||[]).map(function(y){return y.getComponent(k.yc)}))};
x.prototype.lZ=function(y){var z=[],A=[];this.aK.forEach(function(D){y.indexOf(D)===-1&&z.push(D)}.bind(this));y.forEach(function(D){this.aK.indexOf(D)===-1&&A.push(D)}.bind(this));this.qj&&y.indexOf(this.qj)===-1&&this.lf();z.forEach(function(D){this.CY(D);this.aK.splice(this.aK.indexOf(D),1)}.bind(this));A.forEach(function(D){this.yW(D);this.aK.push(D)}.bind(this));this.Ae=y.find(function(D){return D.Ug})||null;this.KY=y.find(function(D){return!D.Ug})||this.Ae};x.prototype.yW=function(y){y.M.bind(h.Sa,
this.$h,this,!0);y.M.bind(h.ma,this.Mt,this,!0)};x.prototype.CY=function(y){y.M.h(h.Sa,this.$h,this);y.M.h(h.ma,this.Mt,this)};x.prototype.Ta=function(){this.F.O(k.$p)};x.prototype.Mt=function(y){if(!(this.properties.get("inMandatorySequence")||y.data.FX||y.data.type=="other"||this.properties.get("clickTranslationDisabled"))){var z=this.aK.find(function(A){return y.source===A.M});z&&(z=this.ot.LX(z),z.length!=0&&(this.wk=z[0].point))}};x.prototype.$h=function(y){if(!this.properties.get("inMandatorySequence")&&
!this.properties.get("mouseDisabled")){this.lf();var z=this.aK.find(function(A){return y.source===A.M});z&&(this.qj=z,this.qj.M.bind(h.$a,this.lf,this,!0),this.Npa.copy(this.qj.matrixWorld),z=this.ot.LX(z),z.length!=0&&(this.LA=(new e.Vector3).copy(z[0].point)))}};x.prototype.lf=function(){this.qj&&(this.qj.M.h(h.$a,this.lf,this),this.LA=this.qj=null)};x.prototype.AW=function(){if(!this.wk)return!1;this.Hd.copy(this.wk).sub(n.Ec).multiplyScalar(.5).add(n.Ec);this.wk=null;return!0};x.prototype.BW=
function(y){return this.DW()?!0:this.EW(y)?!0:!1};x.prototype.DW=function(){var y=this.KY;if(!y)return!1;if(y.Qb.y===0&&y.Qb.x===0)return this.fF=Date.now(),this.ru=!1;if(this.ru)return!0;var z=Math.sqrt(y.Qb.y*y.Qb.y+y.Qb.x*y.Qb.x),A=Math.atan2(-y.Qb.y,y.Qb.x);y=Math.abs(A)<Math.PI*.25;A=Math.abs(A)>Math.PI*.75;return this.Kk!==0&&z>.95&&(y||A)&&Date.now()-this.fF<100?(this.ru=!0,this.wE+=this.Kk*(A?-1:1),!0):!1};x.prototype.EW=function(y){if(!this.Ae||this.Ae.Qb.y===0&&this.Ae.Qb.x===0)return!1;
y=this.XLa(this.Ae.gx)*y/1E3;this.Ae.matrixWorld.decompose(d,c,f);var z=d.set(0,0,-1).applyQuaternion(c),A=f.set(1,0,0).applyQuaternion(c);z.normalize().multiplyScalar(-this.Ae.Qb.y*y);A.normalize().multiplyScalar(this.Ae.Qb.x*y);this.Hd.set(n.Ec.x+z.x+A.x,n.Ec.y+z.y+A.y,n.Ec.z+z.z+A.z);return!0};x.prototype.Vma=function(){if(!this.qj)return!1;var y=this.oJa(l.copy(this.Npa)),z=this.oJa(p.copy(this.qj.matrixWorld)),A=q.compose(n.Ec,n.wg,u);z=r.copy(A).invert().multiply(z);t.copy(y).multiply(z.invert()).decompose(this.Hd,
c,d);this.wE=-b.setFromQuaternion(c).y*v;return!0};x.prototype.oJa=function(y){return y.decompose(d,c,f).compose(d,c.identity(),f)};x.prototype.Wma=function(y){if(!this.qj||!this.LA||this.qj.Qb.y===0&&this.qj.Qb.x===0)return!1;y=this.XLa(this.qj.gx)*y/1E3/this.LA.distanceTo(n.Ec);var z=l.compose(n.Ec,n.wg,u),A=p.identity();A.multiply(q.makeTranslation(this.LA.x,this.LA.y,this.LA.z));A.multiply(q.makeRotationY(-this.wE*w));A.multiply(q.makeRotationFromEuler(b.set(this.qj.Qb.y*y,this.qj.Qb.x*y,0,"YXZ")));
A.multiply(q.makeRotationY(this.wE*w));A.multiply(q.makeTranslation(-this.LA.x,-this.LA.y,-this.LA.z));z.premultiply(A);z.decompose(this.Hd,c,d);this.wE=-b.setFromQuaternion(c).y*v;return!0};x.prototype.XLa=function(y){return 3E4/3600/this.pf*this.properties.get("translationSpeed",1)*(y?3:1)};x.prototype.LZ=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.qj?this.properties.set("userInteracting",!0):this.wk?this.properties.set("userInteracting",
!0):this.Ae&&this.Ae.pressed&&(this.Ae.Qb.y!==0||this.Ae.Qb.x!==0)?this.properties.set("userInteracting",!0):this.properties.set("userInteracting",!1)};x.tK=function(y,z){this.nF.set(y,z)};x.Wa=function(y){y.N(k.$p).manager=new x(y)};x.update=function(y){y.getComponent(k.$p).manager.update()};x.frame=function(y,z,A){y.getComponent(k.$p).manager.frame(z,A)};x.ya=function(y){var z=y.getComponent(k.$p);z.manager.dispose();z.manager=null;y.ka(k.$p)};x.nF=new Map;x.NB="minX maxX minY maxY minZ maxZ".split(" ");
return x}();var b=new e.Euler(0,0,0,"YXZ");new e.Euler(0,0,0,"YXZ");var c=new e.Quaternion,d=new e.Vector3,f=new e.Vector3,l=new e.Matrix4,p=new e.Matrix4,q=new e.Matrix4,r=new e.Matrix4,t=new e.Matrix4,u=new e.Vector3(1,1,1),v=180/Math.PI,w=Math.PI/180;return a});
define("tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k,e){a=function(){function r(t){this.locked=!0;this.Di=!1;this.KY=this.pe=this.Ep=null;this.pf=1;this.fF=0;this.ru=!1;this.Kk=0;this.wk=null;this.Hd=new e.Vector3;this.eX=[];this.Wt=new e.Vector3;this.dA=new e.Box3(new e.Vector3(-Infinity,
-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=t;this.Dk=this.Dk.bind(this);this.ot=new g(this.F);n.M.bind(h.V,this.Ta,this,!0);this.update()}r.prototype.update=function(){var t=this.F.getComponent(k.qL),u=(t===null||t===void 0?void 0:t.locked)||!1;!u&&this.locked&&(this.Di=!0);this.locked=u;this.pf=(t===null||t===void 0?void 0:t.pf)||1;this.Kk=t===null||t===void 0?void 0:t.Kk;this.iF();this.properties=t.properties;this.locked||(n.setScale(this.pf),this.IW(),this.Dk());this.Di&&
(b.setFromQuaternion(n.yl),n.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:this.properties.get("yaw"),pitch:b.x*q,roll:b.z*q}))};r.prototype.iF=function(){r.NB.forEach(function(t){var u;(u=this.properties)===null||u===void 0||u.h(h.L(t),this.Dk,this)}.bind(this))};r.prototype.IW=function(){r.NB.forEach(function(t){var u;(u=this.properties)===null||u===void 0||u.bind(h.L(t),this.Dk,this,!0)}.bind(this))};r.prototype.Dk=function(){this.dA.min.set(this.properties.get("minX",
-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.dA.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};r.prototype.frame=function(t){this.locked||(this.ou(),this.LZ(),this.aJ(),this.properties.get("controllingPosition")||(this.Hd.copy(n.Ec),this.AW()||this.BW(t),this.Hd.y=this.pIa(this.Wt.y,this.W7(this.Hd.x,this.Hd.y,this.Hd.z),t),this.geb()&&(this.Hd.copy(this.Wt),this.Hd.y=this.pIa(this.Wt.y,
this.W7(this.Hd.x,this.Hd.y,this.Hd.z),t)),this.dA.clampPoint(this.Hd,this.Hd),n.Ec.equals(this.Hd)||n.setPosition({x:this.Hd.x,y:this.Hd.y,z:this.Hd.z,Xa:void 0})),this.$I(),this.AO(),this.Xjb(),this.Di=!1)};r.prototype.Xjb=function(){this.ot.refresh();this.eX.forEach(function(t){t.y=NaN})};r.prototype.dispose=function(){n.M.h(h.V,this.Ta,this);this.properties.set("userInteracting",!1);this.iF()};r.prototype.aJ=function(){var t=this.properties.get("x"),u=this.properties.get("y"),v=this.properties.get("z");
if(this.Wt.x!==t||this.Wt.y!==u||this.Wt.z!==v)this.properties.get("controllingPosition")||(u=this.W7(t,u,v)),n.setPosition({x:t,y:u,z:v,yaw:void 0}),this.AO()};r.prototype.$I=function(){this.properties.set("x",n.Ec.x);this.properties.set("y",n.Ec.y);this.properties.set("z",n.Ec.z);b.setFromQuaternion(n.wg);this.properties.set("yaw",-b.y*q);this.properties.set("pitch",b.x*q);this.properties.set("roll",b.z*q)};r.prototype.AO=function(){this.Wt.copy(n.Ec);this.XPa=this.roa(this.Wt)};r.prototype.ou=
function(){var t=null,u=null;(r.nF.get(this.F.T)||[]).forEach(function(v){v=v.getComponent(k.yc);v.Ug?t=v:u=v});this.ulb(t,u)};r.prototype.ulb=function(t,u){this.Ep=t;this.KY=u;t=t?t.M:null;this.pe!==t&&(this.pe&&this.CY(this.pe),(this.pe=t)&&this.yW(this.pe))};r.prototype.yW=function(t){t.bind(h.ma,this.Mt,this,!0)};r.prototype.CY=function(t){t.h(h.ma,this.Mt,this)};r.prototype.Ta=function(){this.F.O(k.aq)};r.prototype.Mt=function(t){if(this.Ep&&this.properties&&!this.properties.get("inMandatorySequence")&&
!t.data.FX&&t.data.type!="other"&&!this.properties.get("clickTranslationDisabled")&&this.properties.get("doubleClickAction")=="translate"&&(t=this.ot.LX(this.Ep),t.length!=0)){var u=t[0];if(u.face&&u.face.normal){t=c.copy(n.Ec);var v=d.copy(u.point);u=f.copy(u.face.normal).transformDirection(u.object.matrixWorld);if(Math.abs(Math.acos(u.dot(p)))<Math.PI*.25)v.y+=this.I7();else{u=l.copy(v).sub(t);var w=u.length(),x=this.I7()*.5;if(w<x)return;v.sub(u.multiplyScalar(x/w))}v.y=this.W7(v.x,v.y,v.z);this.ot.CK(t,
v)||(this.wk=new e.Vector3(v.x,v.y,v.z))}}};r.prototype.AW=function(){if(!this.wk)return!1;this.Hd.copy(this.wk);this.wk=null;return!0};r.prototype.BW=function(t){return this.DW()?!0:this.EW(t)?!0:!1};r.prototype.DW=function(){var t=this.KY;if(!t)return!1;if(t.Qb.y===0&&t.Qb.x===0)return this.fF=Date.now(),this.ru=!1;if(this.ru)return!0;var u=Math.sqrt(t.Qb.y*t.Qb.y+t.Qb.x*t.Qb.x),v=Math.atan2(-t.Qb.y,t.Qb.x);t=Math.abs(v)<Math.PI*.25;v=Math.abs(v)>Math.PI*.75;return this.Kk!==0&&u>.95&&(t||v)&&Date.now()-
this.fF<100?(this.ru=!0,u=this.Kk*(v?-1:1),u=-b.setFromQuaternion(n.wg,"YXZ").y*q+u,n.setPosition({x:void 0,y:void 0,z:void 0,yaw:u}),!0):!1};r.prototype.EW=function(t){if(!this.Ep||this.Ep.Qb.y===0&&this.Ep.Qb.x===0)return!1;t=4E3/3600/this.pf*this.properties.get("translationSpeed",1)*(this.Ep.gx?3:1)*t/1E3;var u=c.set(0,0,-1).applyQuaternion(n.wg),v=d.crossVectors(u,p);u.y=0;v.y=0;u.normalize().multiplyScalar(-this.Ep.Qb.y*t);v.normalize().multiplyScalar(this.Ep.Qb.x*t);this.Hd.set(n.Ec.x+u.x+v.x,
n.Ec.y,n.Ec.z+u.z+v.z);return!0};r.prototype.LZ=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.wk?this.properties.set("userInteracting",!0):this.Ep&&this.Ep.pressed&&(this.Ep.Qb.y!==0||this.Ep.Qb.x!==0)?this.properties.set("userInteracting",!0):this.properties.set("userInteracting",!1)};r.prototype.geb=function(){if(!this.properties.get("collisionDetection"))return!1;var t=c,u=d;t.copy(this.Hd).sub(this.Wt);u.copy(this.Wt).add(t.setLength(t.length()+
.2/this.pf));if(this.ot.CK(this.Wt,u))return!0;t=this.properties.get("maxStepHeight");t===void 0&&(t=this.I7()*.25);u=this.roa(this.Hd);return this.XPa>-Infinity&&u>-Infinity&&Math.abs(this.XPa-u)>t?!0:!1};r.prototype.pIa=function(t,u,v){var w=u-t,x=Math.abs(w);v=2/this.pf*(v/1E3);return v>x?u:t+w*v/x};r.prototype.W7=function(t,u,v){t=this.Di?-Infinity:this.roa(c.set(t,u,v));return t===-Infinity?u:t+this.I7()};r.prototype.roa=function(t){var u=this.eX.findIndex(function(w){return w.x==t.x&&w.z==t.z&&
!isNaN(w.y)});if(u!==-1)return this.eX[u].y;u=this.ot.ZW(t);var v=this.eX.find(function(w){return isNaN(w.y)});v||this.eX.push(v=new e.Vector3);v.set(t.x,t.y-u,t.z);return v.y};r.prototype.I7=function(){return n.HO/this.pf};r.tK=function(t,u){this.nF.set(t,u)};r.Wa=function(t){t.N(k.aq).manager=new r(t)};r.update=function(t){t.getComponent(k.aq).manager.update()};r.frame=function(t,u,v){t.getComponent(k.aq).manager.frame(u,v)};r.ya=function(t){var u=t.getComponent(k.aq);u.manager.dispose();u.manager=
null;t.ka(k.aq)};r.nF=new Map;r.NB="minX maxX minY maxY minZ maxZ".split(" ");return r}();var b=new e.Euler(0,0,0,"YXZ"),c=new e.Vector3,d=new e.Vector3,f=new e.Vector3,l=new e.Vector3,p=new e.Vector3(0,1,0),q=180/Math.PI;return a});
define("tdv/player/view/webgl/system/cameraControls/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/cameraControls/ARBehaviour tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour tdv/player/view/webgl/system/cameraControls/OrbitBehaviour tdv/player/view/webgl/system/cameraControls/TransitionBehaviour tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour tdv/player/view/webgl/system/cameraControls/XRDragBehaviour tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/cameraControls/ARBehaviour"),k=a("tdv/player/view/webgl/system/cameraControls/CollidableObjects"),e=a("tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour"),b=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),c=a("tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour"),d=a("tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour"),
f=a("tdv/player/view/webgl/system/cameraControls/OrbitBehaviour"),l=a("tdv/player/view/webgl/system/cameraControls/TransitionBehaviour"),p=a("tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour"),q=a("tdv/player/view/webgl/system/cameraControls/XRDragBehaviour"),r=a("tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour"),t=a("tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(u,v){(this.Vpa.fe.length||
this.Vpa.Xg.length)&&k.klb(this.Vpa.v);this.XIa.v.length&&this.XIa.v.slice().forEach(e.Wa);this.S6.Da.length&&this.S6.Da.slice().forEach(e.update);this.S6.v.length&&this.S6.v.slice().forEach(function(w){e.frame(w,u,v)});this.YIa.v.length&&this.YIa.v.slice().forEach(e.ya);this.OKa.v.length&&this.OKa.v.slice().forEach(d.ya);this.PKa.v.length&&this.PKa.v.slice().forEach(d.ya);this.QKa.v.length&&this.QKa.v.slice().forEach(d.ya);this.FKa.v.length&&this.FKa.v.slice().forEach(c.ya);this.GKa.v.length&&this.GKa.v.slice().forEach(c.ya);
this.HKa.v.length&&this.HKa.v.slice().forEach(c.ya);this.gPa.v.length&&this.gPa.v.slice().forEach(f.ya);this.hPa.v.length&&this.hPa.v.slice().forEach(f.ya);this.iPa.v.length&&this.iPa.v.slice().forEach(f.ya);this.STa.v.length&&this.STa.v.slice().forEach(p.ya);this.TTa.v.length&&this.TTa.v.slice().forEach(p.ya);this.UTa.v.length&&this.UTa.v.slice().forEach(p.ya);this.sIa.v.length&&this.sIa.v.slice().forEach(g.ya);this.tIa.v.length&&this.tIa.v.slice().forEach(g.ya);this.uIa.v.length&&this.uIa.v.slice().forEach(g.ya);
this.NKa.v.length&&this.NKa.v.slice().forEach(d.Wa);this.fX.Da.length&&this.fX.Da.slice().forEach(d.update);this.fX.v.length&&this.fX.v.slice().forEach(function(w){d.frame(w,u,v)});this.EKa.v.length&&this.EKa.v.slice().forEach(c.Wa);this.dX.Da.length&&this.dX.Da.slice().forEach(c.update);this.dX.v.length&&this.dX.v.slice().forEach(function(w){c.frame(w,u,v)});this.fPa.v.length&&this.fPa.v.slice().forEach(f.Wa);this.qY.Da.length&&this.qY.Da.slice().forEach(f.update);this.qY.v.length&&this.qY.v.slice().forEach(function(w){f.frame(w,
u,v)});this.RTa.v.length&&this.RTa.v.slice().forEach(p.Wa);this.PZ.Da.length&&this.PZ.Da.slice().forEach(p.update);this.PZ.v.length&&this.PZ.v.slice().forEach(function(w){p.frame(w,u,v)});this.eUa.v.length&&this.eUa.v.slice().forEach(t.ya);this.fUa.v.length&&this.fUa.v.slice().forEach(t.ya);this.gUa.v.length&&this.gUa.v.slice().forEach(t.ya);this.XTa.v.length&&this.XTa.v.slice().forEach(q.ya);this.YTa.v.length&&this.YTa.v.slice().forEach(q.ya);this.ZTa.v.length&&this.ZTa.v.slice().forEach(q.ya);this.aUa.v.length&&
this.aUa.v.slice().forEach(r.ya);this.bUa.v.length&&this.bUa.v.slice().forEach(r.ya);this.cUa.v.length&&this.cUa.v.slice().forEach(r.ya);this.XSa.v.length&&this.XSa.v.slice().forEach(l.ya);this.YSa.v.length&&this.YSa.v.slice().forEach(l.ya);this.rIa.v.length&&this.rIa.v.slice().forEach(g.Wa);this.E6.Da.length&&this.E6.Da.slice().forEach(g.update);this.E6.v.length&&this.E6.v.slice().forEach(function(w){g.frame(w,u,v)});t.tK(this.T,this.Wj.v.slice());this.dUa.v.length&&this.dUa.v.slice().forEach(t.Wa);
this.SZ.Da.length&&this.SZ.Da.slice().forEach(t.update);this.SZ.v.length&&this.SZ.v.slice().forEach(function(w){t.frame(w,u,v)});q.tK(this.T,this.Wj.v.slice());this.WTa.v.length&&this.WTa.v.slice().forEach(q.Wa);this.QZ.Da.length&&this.QZ.Da.slice().forEach(q.update);this.QZ.v.length&&this.QZ.v.slice().forEach(function(w){q.frame(w,u,v)});r.tK(this.T,this.Wj.v.slice());this.$Ta.v.length&&this.$Ta.v.slice().forEach(r.Wa);this.RZ.Da.length&&this.RZ.Da.slice().forEach(r.update);this.RZ.v.length&&this.RZ.v.slice().forEach(function(w){r.frame(w,
u,v)});this.WSa.v.length&&this.WSa.v.slice().forEach(l.Wa);this.sQ.Da.length&&this.sQ.Da.slice().forEach(l.update);this.sQ.fe.length&&this.sQ.fe.slice().forEach(l.update);this.sQ.v.length&&this.sQ.v.slice().forEach(function(w){l.frame(w,u,v)});if(this.pA.fe.length||this.pA.Xg.length)b.hra(this.pA.v),this.dX.v.slice().forEach(c.update),this.fX.v.slice().forEach(d.update),this.qY.v.slice().forEach(f.update),this.PZ.v.slice().forEach(p.update),this.QZ.v.slice().forEach(q.update),this.RZ.v.slice().forEach(r.update),
this.SZ.v.slice().forEach(t.update)};a.J={};a.J.Wj=[n.yc];a.J.pA=[n.Im];a.J.Vpa=[n.VF];a.J.EKa=[n.PF,n.ng.aa,n.Xf.aa,n.Lr.aa];a.J.dX=[n.PF,n.ng.aa,n.Xf.aa,n.Lr];a.J.FKa=[n.PF.aa,n.Lr];a.J.GKa=[n.ng,n.Lr];a.J.HKa=[n.Xf,n.Lr];a.J.NKa=[n.QF,n.ng.aa,n.Xf.aa,n.Nr.aa];a.J.fX=[n.QF,n.ng.aa,n.Xf.aa,n.Nr];a.J.OKa=[n.QF.aa,n.Nr];a.J.PKa=[n.ng,n.Nr];a.J.QKa=[n.Xf,n.Nr];a.J.fPa=[n.XF,n.ng.aa,n.Xf.aa,n.Tr.aa];a.J.qY=[n.XF,n.ng.aa,n.Xf.aa,n.Tr];a.J.gPa=[n.XF.aa,n.Tr];a.J.hPa=[n.ng,n.Tr];a.J.iPa=[n.Xf,n.Tr];a.J.WSa=
[n.Kx,n.Sk,n.Lu.aa];a.J.sQ=[n.Kx,n.Sk,n.Lu];a.J.XSa=[n.Sk.aa,n.Lu];a.J.YSa=[n.Kx.aa,n.Lu];a.J.dUa=[n.ng,n.Xf.aa,n.qL,n.aq.aa];a.J.SZ=[n.ng,n.Xf.aa,n.qL,n.aq];a.J.eUa=[n.qL.aa,n.aq];a.J.fUa=[n.ng.aa,n.aq];a.J.gUa=[n.Xf,n.aq];a.J.RTa=[n.ng,n.Xf.aa,n.gG,n.Yp.aa];a.J.PZ=[n.ng,n.Xf.aa,n.gG,n.Yp];a.J.STa=[n.gG.aa,n.Yp];a.J.TTa=[n.ng.aa,n.Yp];a.J.UTa=[n.Xf,n.Yp];a.J.WTa=[n.ng,n.Xf.aa,n.oL,n.Zp.aa];a.J.QZ=[n.ng,n.Xf.aa,n.oL,n.Zp];a.J.XTa=[n.oL.aa,n.Zp];a.J.YTa=[n.ng.aa,n.Zp];a.J.ZTa=[n.Xf,n.Zp];a.J.$Ta=[n.ng,
n.Xf.aa,n.pL,n.$p.aa];a.J.RZ=[n.ng,n.Xf.aa,n.pL,n.$p];a.J.aUa=[n.pL.aa,n.$p];a.J.bUa=[n.ng.aa,n.$p];a.J.cUa=[n.Xf,n.$p];a.J.rIa=[n.Xf,n.ng.aa,n.vB,n.Cr.aa];a.J.E6=[n.Xf,n.vB,n.Cr];a.J.sIa=[n.vB.aa,n.Cr];a.J.tIa=[n.Xf.aa,n.Cr];a.J.uIa=[n.ng,n.Cr];a.J.XIa=[n.TK,n.tx.aa];a.J.S6=[n.TK,n.tx];a.J.YIa=[n.TK.aa,n.tx];return a});
define("tdv/player/view/webgl/system/cameraOffsetTransform/System","require exports three.mod tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k){a=function(q){function r(){var t=q.call(this)||this;t.gg=t.gg.bind(t);return t}P(r,q);r.prototype.Yc=function(){this.v.v.length&&this.v.v.slice().forEach(this.gg)};r.prototype.gg=function(t){var u=t.getComponent(n.Object3D);if(u&&u.sa&&u.sa.parent){u=u.sa;var v=t.getComponent(n.SK);
if(v.Ea){var w=v.Ea,x=w.getComponent(n.PerspectiveCamera);(w=w.getComponent(n.Object3D))&&w.sa&&(w=w.sa,w.updateMatrixWorld(!0),x.oj?(c.copy(k.Ec),l.copy(k.wg)):w.matrixWorld.decompose(c,l,f),v.rotate||l.identity(),e.copy(u.parent.matrixWorld).invert(),b.compose(c,l,f.set(1,1,1)).premultiply(e),b.decompose(c,l,f.set(1,1,1)),d.setFromQuaternion(l,"YXZ"),t=t.O(n.ta),t.translationX=c.x,t.translationY=c.y,t.Ze=c.z,t.Yd=0,t.fd=d.y*p,t.Xe=0)}}};r.J={};return r}(g);a.J={};a.J.v=[n.SK,n.Object3D,n.ta];var e=
new h.Matrix4,b=new h.Matrix4,c=new h.Vector3,d=new h.Euler,f=new h.Vector3,l=new h.Quaternion,p=180/Math.PI;return a});
define("tdv/player/view/webgl/system/canvasMaterial/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(g){this.B=g;this.wFa=this.Aa=null;this.Ha=this.Pa=void 0;this.update()}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){var g=this.B.getComponent(h.Kf),k=g.source&&g.source.width||0,e=g.source&&g.source.height||0;!this.Aa||!!this.Aa.isSpriteMaterial==
g.isSprite&&this.Pa==k&&this.Ha==e||(this.Aa.map.dispose(),this.Aa.dispose(),this.Aa=null);this.Pa=k;this.Ha=e;this.Aa||(g.isSprite?(this.Aa=new THREE.SpriteMaterial,this.Aa.sizeAttenuation=!1):this.Aa=new THREE.MeshBasicMaterial,this.Aa.map=new THREE.Texture,this.Aa.transparent=!0,this.B.N(h.Material).material=this.Aa);this.Aa.map.image!=g.source&&(this.Aa.map.image=g.source,this.Aa.map.needsUpdate=!0);this.wFa!=g.xK&&(this.wFa=g.xK,this.Aa.map.needsUpdate=!0);this.Aa.opacity=g.opacity||0;this.Aa.depthTest=
!!g.depthTest;this.Aa.visible=this.Aa.opacity>0&&!g.hidden;this.Aa.needsUpdate=!0;if(g.colorSpace)var b=g.colorSpace;else(g=n.Sf(this.B))&&(b=n.uX(g));this.Aa.map&&b&&(this.Aa.map.colorSpace=b);this.B.T.Qa()};m.prototype.dispose=function(){this.Aa&&(this.Aa.map.dispose(),this.Aa.map=null,this.Aa.dispose(),this.Aa=null,this.B.ka(h.Material));this.B=null};m.Wa=function(g){g.N(h.DB).manager=new m(g)};m.ya=function(g){var k=g.getComponent(h.DB);k.manager.dispose();k.manager=null;g.ka(h.DB)};m.update=
function(g){g.getComponent(h.DB).manager.update()};return m});
define("tdv/player/view/webgl/system/canvasMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/canvasMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/canvasMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.On.v.length&&this.On.v.slice().forEach(g.Wa);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya)};a.J={};a.J.On=[n.Kf,n.DB.aa];a.J.materials=[n.Kf,n.DB];a.J.Pn=[n.Kf.aa,n.DB];return a});
define("tdv/player/view/webgl/system/clippingRect/System",["require","exports","three.mod","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components"],function(a,m,h,n,g){var k=[new h.Vector3(1,0,0),new h.Vector3(-1,0,0),new h.Vector3(0,1,0),new h.Vector3(0,-1,0)];a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.Ca=c.Ca.bind(c);return c}P(b,e);b.prototype.Yc=function(){this.GE.v.length&&this.GE.v.slice().forEach(this.xb);this.planes.v.length&&this.planes.v.slice().forEach(this.ib);
this.tY.v.length&&this.tY.v.slice().forEach(this.Ca)};b.prototype.xb=function(c){c.N(g.EB).planes=[new h.Plane,new h.Plane,new h.Plane,new h.Plane];c.N(g.Object3D).sa=new h.Object3D;this.ib(c)};b.prototype.ib=function(c){var d=c.N(g.Object3D).sa;c=c.N(g.EB);c.planes[0].set(k[0],.5).applyMatrix4(d.matrixWorld);c.planes[1].set(k[1],.5).applyMatrix4(d.matrixWorld);c.planes[2].set(k[2],.5).applyMatrix4(d.matrixWorld);c.planes[3].set(k[3],.5).applyMatrix4(d.matrixWorld)};b.prototype.Ca=function(c){c.ka(g.EB);
c.ka(g.Object3D)};b.J={};return b}(n);a.J={};a.J.GE=[g.vF,g.EB.aa];a.J.planes=[g.vF,g.EB,g.ta,g.Object3D];a.J.tY=[g.vF.aa,g.EB];return a});
define("tdv/player/view/webgl/system/light/DirectionalLightHelper",["require","exports","three.mod","tdv/player/view/webgl/system/util/entity/Util"],function(a,m,h,n){a=function(){function d(f){this.light=f;f=new h.EdgesGeometry(new h.PlaneGeometry(2,2));var l=new h.LineBasicMaterial({color:16711680,linewidth:1,depthTest:!1,transparent:!0});this.oh=new h.LineSegments(f,l);f=(new h.BufferGeometry).setFromPoints([new h.Vector3,new h.Vector3]);l=new h.LineBasicMaterial({color:65280,depthTest:!1,transparent:!0});
this.line=new h.Line(f,l);this.light.add(this.oh);this.light.add(this.line)}d.prototype.update=function(){var f=this.Sf();this.oh.parent!=f&&(this.oh.parent&&(this.oh.parent.remove(this.oh),this.line.parent.remove(this.line)),f&&(f.add(this.oh),f.add(this.line)));if(f){this.oh.material.color!=this.light.color&&(this.oh.material.color=this.light.color,this.oh.material.needsUpdate=!0,this.line.material.color=this.light.color,this.line.material.needsUpdate=!0);this.light.updateMatrixWorld(!0);g.setFromMatrixPosition(this.light.matrixWorld);
this.light.target.updateMatrixWorld(!0);k.setFromMatrixPosition(this.light.target.matrixWorld);e.copy(k).sub(g).normalize();c.y=Math.atan2(e.x,e.z);c.x=-Math.atan2(e.y,Math.sqrt(e.x*e.x+e.z*e.z));c.z=0;c.order="YXZ";b.setFromEuler(c);f=n.dE(f);this.oh.quaternion.copy(b);var l=n.wJ(this.line)*f*2/7;e.setLength(l).multiplyScalar(-1);l=this.line.geometry.attributes.position;l.setXYZ(0,0,0,0);l.setXYZ(1,e.x,e.y,e.z);l.needsUpdate=!0;this.oh.position.copy(e);this.oh.updateMatrixWorld(!0);f=n.wJ(this.oh)*
f/7;this.oh.scale.set(f,f,f);this.oh.updateMatrixWorld(!0)}};d.prototype.dispose=function(){this.oh.geometry.dispose();this.oh.material.dispose();this.oh.parent&&this.oh.parent.remove(this.oh);this.line.geometry.dispose();this.line.material.dispose();this.line.parent&&this.line.parent.remove(this.line)};d.prototype.Sf=function(){for(var f=this.light.parent;f&&!f.isScene;)f=f.parent;return f};return d}();var g=new h.Vector3,k=new h.Vector3,e=new h.Vector3,b=new h.Quaternion,c=new h.Euler;return a});
define("tdv/player/view/webgl/system/light/DirectionalLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/light/DirectionalLightHelper".split(" "),function(a,m,h,n,g,k,e,b){function c(l,p){p.makeEmpty();var q=new h.Box3;l.traverse(function(r){if(r.geometry&&!r.isSprite&&!r.isLine){r.updateWorldMatrix(!1,!1);var t=r.geometry;t.boundingBox===null&&
t.computeBoundingBox();q.copy(t.boundingBox);q.applyMatrix4(r.matrixWorld);p.union(q)}});return p}a=function(l){function p(){var q=l.call(this)||this;q.xb=q.xb.bind(q);q.ib=q.ib.bind(q);q.gg=q.gg.bind(q);q.Ca=q.Ca.bind(q);return q}P(p,l);p.prototype.Yc=function(){this.lE.v.length&&this.lE.v.slice().forEach(this.xb);this.mE.v.length&&this.mE.v.slice().forEach(this.Ca);this.Ei.Da.length&&this.Ei.Da.slice().forEach(this.ib);this.Ei.v.length&&this.Ei.v.slice().forEach(this.gg)};p.prototype.xb=function(q){var r=
q.N(g.Er),t=q.N(g.Object3D);r.light=t.sa=new h.DirectionalLight;this.ib(q)};p.prototype.ib=function(q){var r=q.getComponent(g.DirectionalLight),t=q.getComponent(g.Er),u=t.light;u.color=n.Ip(r.color).convertLinearToSRGB();u.intensity=r.intensity*Math.PI;u.visible=u.intensity>0;u.castShadow=u.intensity>0&&r.castShadow;var v=u.castShadow?r.Qra:16;v!=u.shadow.mapSize.width&&(u.shadow.dispose(),u.shadow=u.shadow.clone(),u.shadow.mapSize.width=u.shadow.mapSize.height=v);u.shadow.radius=r.Rra;u.shadow.bias=
r.Pra;r.XW!=!!t.zp&&(t=q.O(g.Er),r.XW?t.zp=new b(u):(t.zp.dispose(),t.zp=null))};p.prototype.gg=function(q){this.cob(q);this.Csa(q)};p.prototype.cob=function(q){var r=q.getComponent(g.DirectionalLight);if((q=q.getComponent(g.Er).light)&&q.castShadow){var t=e.Rc(r.target);if(t){var u=q.shadow.camera,v=c(t,d);t=Number.POSITIVE_INFINITY;for(var w=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,z=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,D=0;D<2;D++)for(var F=
0;F<2;F++)for(var C=0;C<2;C++)f.set(D==0?v.min.x:v.max.x,F==0?v.min.y:v.max.y,C==0?v.min.z:v.max.z).applyMatrix4(u.matrixWorldInverse),f.x<t&&(t=f.x),f.x>w&&(w=f.x),f.y>x&&(x=f.y),f.y<y&&(y=f.y),-f.z>A&&(A=-f.z),-f.z<z&&(z=-f.z);r=r.hmb||0;v=(z+A)*.5;z+=(z-v)*r;A+=(A-v)*r;v=(t+w)*.5;t+=(t-v)*r;w+=(w-v)*r;v=(x+y)*.5;x+=(x-v)*r;y+=(y-v)*r;if(u.left!=t||u.right!=w||u.top!=x||u.bottom!=y||u.near!=z||u.far!=A)q.shadow.camera.left=t,q.shadow.camera.top=x,q.shadow.camera.right=w,q.shadow.camera.bottom=y,
q.shadow.camera.near=z,q.shadow.camera.far=A,q.shadow.camera.updateProjectionMatrix(),q.shadow.needsUpdate=!0}}};p.prototype.Csa=function(q){(q=(q=q.getComponent(g.Er))&&q.zp)&&q.update()};p.prototype.Ca=function(q){var r=q.getComponent(g.Er),t=r&&r.zp;t&&t.dispose();(r=r.light)&&r.parent&&r.parent.remove(r);q.ka(g.Er);q.ka(g.Object3D)};p.J={};return p}(k);a.J={};a.J.lE=[g.DirectionalLight,g.Er.aa];a.J.Ei=[g.DirectionalLight,g.Er];a.J.mE=[g.DirectionalLight.aa,g.Er];var d=new h.Box3,f=new h.Vector3;
return a});
define("tdv/player/view/webgl/system/dragging/Behaviour",["require","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util","tdv/view/constants/Cursor"],function(a){function m(x){this.Bh=x;this.Oe=this.Lo=null;this.WR=!1;this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util"),k=a("tdv/view/constants/Cursor");m.prototype.update=function(){var x=this.Bh.getComponent(n.yc);this.hV(x&&
x.enabled?x.WD:null);this.gV(x&&x.enabled?x.f7:null)};m.prototype.frame=function(){this.dg()};m.prototype.hV=function(x){this.Lo!=x&&(this.Lo&&this.Lo.h(h.gb,this.tg,this,!0),(this.Lo=x)&&this.Lo.bind(h.gb,this.tg,this,!0))};m.prototype.gV=function(x){this.Oe!=x&&(this.Oe&&this.WR&&this.Oe.pop(k.Mi),(this.Oe=x)&&this.WR&&this.Oe.push(k.Mi))};m.prototype.tg=function(){var x=v.get(this.Bh.T);x&&x.length!=0&&this.Bh.T.Qa()};m.prototype.dg=function(){var x=v.get(this.Bh.T),y=x&&x.length||0;this.OEa(y>
0);if(y!=0&&(y=this.Bh.getComponent(n.yc))){var z=g.Rc(this.Bh);z?(e.copy(y.origin).applyMatrix4(z.matrixWorld),b.copy(y.origin).add(y.direction).applyMatrix4(z.matrixWorld).sub(e).normalize()):(e.copy(y.origin),b.copy(y.direction).normalize());for(y=0;y<x.length;y++){z=x[y];var A=z.getComponent(n.vx),D=z.getComponent(n.FB),F=w.get(z);F&&A&&D&&(D.iKa||(D.iKa=(new THREE.Vector3).setFromMatrixPosition(F.matrixWorld)),c.copy(D.iKa),d.copy(A.direction),this.i2a(c,d,e,b,f),D.Qna||(D.Qna=(new THREE.Vector3).copy(f).sub(c)),
f.sub(D.Qna),A.min&&l.copy(f).sub(A.min).dot(A.direction)<0&&f.copy(A.min),f.applyMatrix4(p.copy(F.parent.matrixWorld).invert()),z=z.O(n.ta),q.multiply(p.makeTranslation(z.translationX,z.translationY,z.Ze).invert()),q.multiply(p.makeRotationFromEuler(r.set(z.Yd*u,z.fd*u,z.Xe*u,z.mf)).invert()),f.applyMatrix4(p),z.positionX=f.x,z.positionY=f.y,z.positionZ=f.z)}}};m.prototype.OEa=function(x){this.WR!=x&&(this.WR=x,this.Oe&&(this.WR?this.Oe.push(k.Mi):this.Oe.pop(k.Mi)))};m.prototype.i2a=function(x,
y,z,A,D){t.copy(x).sub(z);z=y.dot(A);var F=A.dot(A),C=y.dot(y);A=t.dot(A);var B=t.dot(y);D.copy(x);x=z*z-F*C;x!=0&&D.addScaledVector(y,(F*B-A*z)/x)};var e=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Vector3,f=new THREE.Vector3,l=new THREE.Vector3,p=new THREE.Matrix4,q=new THREE.Matrix4,r=new THREE.Euler,t=new THREE.Vector3,u=Math.PI/180;m.prototype.dispose=function(){this.OEa(!1);this.hV(null);this.gV(null);this.B=null};m.Kra=function(x){x.N(n.Gx).manager=new m(x)};m.gsa=
function(x){var y=x.getComponent(n.Gx);y.manager.dispose();y.manager=null;x.ka(n.Gx)};m.ou=function(x){x.getComponent(n.Gx).manager.update()};m.frame=function(x){x.getComponent(n.Gx).manager.frame()};var v=new Map,w=new Map;m.Xlb=function(x){x.N(n.FB);x.N(n.Im);m.IK(x)};m.IK=function(x){var y=g.Rc(x);w.set(x,y);var z=v.get(x.T);z||v.set(x.T,z=[]);y&&z.indexOf(x)<0&&z.push(x)};m.BSa=function(x){var y=v.get(x.T),z=y.indexOf(x);z>=0&&y.splice(z,1);w["delete"](x);x.ka(n.FB);x.ka(n.Im)};return m});
define("tdv/player/view/webgl/system/dragging/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/dragging/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/dragging/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.uY.v.length&&this.uY.v.slice().forEach(g.Kra);this.Wj.Da.length&&
this.Wj.Da.slice().forEach(g.ou);this.Wj.v.length&&this.Wj.v.slice().forEach(g.frame);this.vY.v.length&&this.vY.v.slice().forEach(g.gsa);this.hKa.v.length&&this.hKa.v.slice().forEach(g.Xlb);this.gKa.v.length&&this.gKa.v.slice().forEach(g.IK);this.jKa.v.length&&this.jKa.v.slice().forEach(g.BSa);this.kKa.v.length&&this.kKa.v.slice().forEach(g.BSa)};a.J={};a.J.uY=[n.yc,n.Gx.aa];a.J.Wj=[n.yc,n.Gx];a.J.vY=[n.yc.aa,n.Gx];a.J.hKa=[n.Object3D,n.vx,n.FB.aa];a.J.gKa=[n.Object3D,n.vx,n.FB];a.J.jKa=[n.Object3D.aa,
n.FB];a.J.kKa=[n.vx.aa,n.FB];return a});
define("tdv/player/view/webgl/system/floor/System","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System".split(" "),function(a,m,h,n,g,k){a=function(c){function d(){var f=c.call(this)||this;f.xb=f.xb.bind(f);f.ib=f.ib.bind(f);f.Ca=f.Ca.bind(f);f.gg=f.gg.bind(f);return f}P(d,c);d.prototype.Yc=function(){this.LKa.v.length&&this.LKa.v.slice().forEach(this.xb);this.MKa.v.length&&this.MKa.v.slice().forEach(this.Ca);this.v7.Da.length&&this.v7.Da.slice().forEach(this.ib);
this.v7.v.length&&this.v7.v.slice().forEach(this.gg)};d.prototype.xb=function(f){var l=f.N(g.zx),p=f.N(g.Object3D);l.floor=p.sa=this.Cdb();this.io(f,!0)};d.prototype.ib=function(f){this.io(f)};d.prototype.Ca=function(f){var l=f.getComponent(g.zx).floor;l.parent&&l.parent.remove(l);l.geometry.dispose();l.material.dispose();f.ka(g.zx);f.ka(g.Object3D)};d.prototype.gg=function(f){this.Gkb(f)};d.prototype.Gkb=function(f){var l=f.getComponent(g.Mr),p=(f=(f=f.getComponent(g.zx))&&f.floor)&&f.parent&&f.parent.matrixWorld;
if(p){b.setFromMatrixScale(p);var q=Math.max(Math.abs(b.x),Math.abs(b.y),Math.abs(b.z));f.matrix.identity();f.matrix.multiply(e.makeScale(l.radius/q,l.radius/q,l.radius/q));f.matrix.multiply(e.extractRotation(p).invert());f.matrix.multiply(e.makeTranslation(0,l.height/l.radius,0));f.matrix.multiply(e.makeRotationX(-Math.PI*.5));f.updateMatrixWorld(!0)}};d.prototype.Cdb=function(){var f=new h.CircleGeometry(1,128);f=new h.Mesh(f);f.receiveShadow=!0;f.needsUpdate=!0;f.matrixAutoUpdate=!1;f.castShadow=
!1;return f};d.prototype.io=function(f,l){l===void 0&&(l=!1);var p=f.getComponent(g.Mr);f=f.getComponent(g.zx).floor;var q=p.color=="transparent",r=f.material&&f.material.isShadowMaterial||!1;f.material&&(l||r!=q)&&(f.material.dispose(),f.material=null);q?f.material||(f.material=new h.ShadowMaterial):(f.material||(f.material=new h.MeshStandardMaterial,f.material.defines.USE_UV="",f.material.onBeforeCompile=function(t){var u=t.fragmentShader.lastIndexOf("}");t.fragmentShader=t.fragmentShader.substring(0,
u)+"float uvCenterCoef = 2.0 * length(vUv - 0.5);\nfloat uvAlphaCoef = 1.0 - smoothstep(0.97, 1.0, uvCenterCoef);\ngl_FragColor.a = uvAlphaCoef * gl_FragColor.a;\n"+t.fragmentShader.substring(u,t.fragmentShader.length)},f.material.roughness=1,f.material.metalness=0,f.material.envMapIntensity=0,f.material.transparent=!0),f.material.color=n.Ip(p.color));f.material.needsUpdate=!0;f.material.opacity=p.opacity;f.renderOrder=p.renderOrder};d.J={};return d}(k);a.J={};a.J.LKa=[g.Mr,g.zx.aa];a.J.v7=[g.Mr,
g.zx];a.J.MKa=[g.Mr.aa,g.zx];var e=new h.Matrix4,b=new h.Vector3;return a});
define("tdv/player/view/webgl/system/floorTransform/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(w){this.B=w;this.rja=!1}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){this.rja=!1};m.prototype.frame=function(){this.dg()};m.prototype.dg=function(){if(!this.rja&&(this.Bb=this.Bb||n.Sf(this.B))){var w=n.Rc(this.B),x=w&&w.parent;if(x&&x.matrixWorld){var y=
[];this.Bb.traverse(function(F){F.isSprite||F.isLine||F==w||y.push(F)});var z=this.B.O(h.Ax);f.set(z.x,z.y,z.z).applyMatrix4(x.matrixWorld);d.ray.origin.set(f.x,f.y,f.z);d.ray.direction.set(0,-1,0);var A=d.intersectObjects(y,!1);if(A.length!=0){var D=A[0];e.copy(x.matrixWorld).invert();A=this.B.O(h.ta,!0);b.setFromMatrixPosition(x.matrixWorld);g.copy(D.object.matrixWorld);c.setFromMatrixPosition(g);k.copy(g).invert();!z.JX&&D.face&&D.face.normal?q.copy(D.face.normal).applyMatrix4(g).sub(c).add(b):
q.copy(b).add(r);q.applyMatrix4(e).normalize();u.setFromUnitVectors(p,q);t.setFromQuaternion(u,A.mf);A.Yd=t.x*v;A.fd=t.y*v;A.Xe=t.z*v;f.copy(D.point).applyMatrix4(e);A.translationX=f.x;A.translationY=f.y;A.Ze=f.z;l.setFromMatrixScale(e);x=Math.max(l.x,l.y,l.z);A.positionX=0;A.positionY=0;A.positionZ=x*z.distance;this.rja=!0}}}};m.prototype.dispose=function(){};var g=new THREE.Matrix4,k=new THREE.Matrix4,e=new THREE.Matrix4,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Raycaster,f=new THREE.Vector3,
l=new THREE.Vector3;new THREE.Matrix4;new THREE.Matrix4;var p=new THREE.Vector3(0,0,1),q=new THREE.Vector3,r=new THREE.Vector3(0,1,0),t=new THREE.Euler,u=new THREE.Quaternion,v=180/Math.PI;m.Wa=function(w){w.N(h.wu).manager=new m(w)};m.ya=function(w){var x=w.getComponent(h.wu);x.manager.dispose();x.manager=null;w.ka(h.wu)};m.frame=function(w){w.getComponent(h.wu).manager.frame()};m.update=function(w){w.getComponent(h.wu).manager.update()};return m});
define("tdv/player/view/webgl/system/floorTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/floorTransform/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/floorTransform/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.IKa.v.length&&this.IKa.v.slice().forEach(g.Wa);
this.u7.Da.length&&this.u7.v.slice().forEach(g.update);this.u7.v.length&&this.u7.v.slice().forEach(g.frame);this.JKa.v.length&&this.JKa.v.slice().forEach(g.ya);this.KKa.v.length&&this.KKa.v.slice().forEach(g.ya)};a.J={};a.J.IKa=[n.Object3D,n.Ax,n.wu.aa];a.J.u7=[n.Object3D,n.Ax,n.wu];a.J.JKa=[n.Object3D.aa,n.wu];a.J.KKa=[n.Ax.aa,n.wu];return a});
define("tdv/player/view/webgl/system/group/Behaviour",["require","tdv/player/view/webgl/components"],function(a){var m=a("tdv/player/view/webgl/components");return{Wa:function(h){var n=h.N(m.$K),g=h.N(m.Object3D);h.N(m.ta);h=h.O(m.Group);g.sa=n.group=h.group=new THREE.Group},ya:function(h){h.getComponent(m.$K).group=null;h.ka(m.$K);h.ka(m.Object3D)}}});
define("tdv/player/view/webgl/system/group/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/group/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/group/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.iMa.v.length&&this.iMa.v.slice().forEach(g.Wa);this.jMa.v.length&&
this.jMa.v.slice().forEach(g.ya)};a.J={};a.J.iMa=[n.Group,n.$K.aa];a.J.jMa=[n.Group.aa,n.$K];return a});
define("tdv/player/view/webgl/system/grid/System","require tdv/utils tdv/player/view/util/Color tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components");a("tdv/player/view/webgl/system/util/entity/Util");a("tdv/player/view/webgl/system/util/material/Util");
a=m.extend(n,function(){n.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(){this.fMa.v.length&&this.fMa.v.slice().forEach(this.xb);this.eMa.Da.length&&this.eMa.Da.slice().forEach(this.ib);this.gMa.v.length&&this.gMa.v.slice().forEach(this.Ca)};a.prototype.xb=function(k){var e=k.getComponent(g.xu);e=new THREE.LineSegments(this.RO(e),this.st(e));k.N(g.Object3D).sa=k.N(g.KB).grid=e};a.prototype.ib=function(k){var e=k.getComponent(g.xu);
k=k.getComponent(g.KB).grid;k.geometry=this.RO(e);k.material=this.st(e)};a.prototype.Ca=function(k){var e=k.getComponent(g.KB).grid;e.material.dispose();e.geometry.dispose();k.ka(g.Object3D);k.ka(g.KB)};a.prototype.RO=function(k){h.Ip(k.fJa);h.Ip(k.dMa);var e=k.size/k.Lna,b=k.size/2,c=[];for(let d=0,f=-b;d<=k.Lna;d++,f+=e)c.push(-b,0,f,b,0,f),c.push(f,0,-b,f,0,b);k=new THREE.BufferGeometry;k.setAttribute("position",new THREE.Float32BufferAttribute(c,3));k.setAttribute("color",new THREE.Float32BufferAttribute([],
3));return k};a.prototype.st=function(k){var e=new THREE.LineBasicMaterial;e.depthTest=k.depthTest;e.toneMapped=!1;e.vertexColors=!0;return e};a.J={};a.J.fMa=[g.xu,g.KB.aa];a.J.eMa=[g.xu,g.KB];a.J.gMa=[g.xu.aa,g.KB];return a});
define("tdv/view/images/ImageAnimation","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Animation".split(" "),function(a){function m(f,l,p,q){this.HJ=f;this.src=f.src;this.f$=l;this.NW=p;this.frameCount=q;this.frameWidth=this.HJ.width/this.NW;this.frameHeight=this.HJ.height/this.f$}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState");a("tdv/events/Event");var k=a("tdv/events/EventDispatcher"),
e=a("tdv/view/util/Animation");a=h.extend(k,function(f,l,p,q,r,t,u){k.call(this);this.ls=r;this.mi=new m(f,l,p,r);this.eEa=t;this.jra(q);this.nfa=u;this.ja=document.createElement("canvas");this.ja.width=this.mi.frameWidth;this.ja.height=this.mi.frameHeight;this.ga=this.ja.getContext("2d");this.ga.globalCompositeOperation="copy";this.I=g.ca;this.E4=this.Ho=0;this.J0=void 0;this.Yi=b.request(this.mi);this.Yi.bind(n.V,this.Xk,this,!0);this.Xk()});a.prototype.jra=function(f){if(this.dh!==f){var l=this.PV;
this.dh=f;this.PV=this.dh*this.mi.frameCount;this.ofa=this.PV-this.dh*.1;l!==void 0&&(this.Ho=this.Ho/l*this.PV)}};a.prototype.iRa=function(f){this.nfa!==f&&(this.nfa=f,this.Xk())};a.prototype.Zc=function(f){if(this.I!=f){if(f==g.$b){if(this.I!=g.PLAYING)return}else f==g.PLAYING?this.I==g.ca&&(this.Ho=this.E4=0,this.Xk()):f!=g.ca||this.Ho==0&&this.E4!=0||(this.Ho=this.ofa,this.Xk());this.I=f;e.requestFrame(this.sq,this);this.o(n.Pd)}};a.prototype.getState=function(){return this.I};a.prototype.sq=
function(f){this.I==g.PLAYING&&(this.Ho=Math.min(this.Ho+f,this.Yi.Yi.length*this.dh),this.Ho>=this.PV&&(this.E4++,this.eEa&&this.E4==this.eEa?(this.Zc(g.ca),this.Ho=this.ofa,this.o(n.Ub)):(this.Ho%=this.PV,this.o(n.Vr))),this.Xk(),this.I==g.PLAYING&&e.requestFrame(this.sq,this))};a.prototype.clear=function(){this.Zc(g.ca);this.ja.width=this.ja.height=0;this.ja=null;b.release(this.mi);this.mi=null};a.prototype.If=function(){return this.ja};a.prototype.Xk=function(){var f=this.nfa&&this.Ho>=this.ofa?
0:Math.floor(this.Ho/this.dh);this.J0!=f&&f<this.Yi.Yi.length&&(this.J0=f,this.ga.drawImage(this.Yi.get(this.J0),0,0),this.o(n.V,{frameIndex:this.J0}))};m.prototype.isEqual=function(f){return this.src==f.src&&this.f$==f.f$&&(this.NW=f.NW)&&(this.frameWidth=f.frameWidth)&&(this.frameHeight=f.frameHeight)&&(this.frameCount=f.frameCount)};var b={al:[],WWa:2E3,request:function(f){f=this.Bj(f);f.Hk++;this.KFa(f);return f.frames},release:function(f){f=this.Bj(f);f.Hk--;f.Hk==0&&this.J9a(f)},Bj:function(f){for(var l=
0;l<this.al.length;l++)if(this.al[l].Reb.isEqual(f))return this.al[l];l={};l.Reb=f;l.frames=new c(f);l.Hk=0;this.al.push(l);return l},J9a:function(f){this.KFa(f);f.Ena=setTimeout(function(){b.T_a(f)},b.WWa)},KFa:function(f){f.Ena&&(clearTimeout(f.Ena),f.Ena=null)},T_a:function(f){this.al.splice(this.al.indexOf(f),1);f.frames.clear()}},c=h.extend(k,function(f){k.call(this);this.mi=f;this.Yi=[];d.add(this)});c.prototype.clear=function(){d.remove(this);this.Yi.forEach(function(f){f.width=0;f.height=
0});this.Yi=null};c.prototype.get=function(f){return this.Yi[f]};c.prototype.Geb=function(){var f=this.Yi.length%this.mi.NW,l=Math.floor(this.Yi.length/this.mi.NW)%this.mi.f$,p=document.createElement("canvas");p.width=this.mi.frameWidth;p.height=this.mi.frameHeight;var q=p.getContext("2d");q.globalCompositeOperation="copy";q.drawImage(this.mi.HJ,f*this.mi.frameWidth,l*this.mi.frameHeight,this.mi.frameWidth,this.mi.frameHeight,0,0,this.mi.frameWidth,this.mi.frameHeight);c.X0a(p);this.Yi.push(p);this.o(n.V)};
c.X0a=function(){var f=document.createElement("canvas");f.width=1;f.height=1;var l=f.getContext("2d");return function(p){l.drawImage(p,0,0,1,1,0,0,1,1)}}();var d={al:[],mla:null,add:function(f){this.al.push(f);this.vEa()},remove:function(f){this.al=this.al.filter(function(l){return l!=f})},vEa:function(){this.mla||(this.mla=setTimeout(function(){this.mla=null;this.oU()}.bind(this),40))},oU:function(){if(this.al.length!=0){for(var f=(new Date).getTime()+10;(new Date).getTime()<f;){var l=this.al.filter(function(p){return p.Yi.length==
0});l=l.length>0?l[0]:this.al[0];l.Geb();if(l.Yi.length==l.mi.frameCount&&(this.al.splice(this.al.indexOf(l),1),this.al.length==0))return}this.vEa()}}};return a});
define("tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(g,k){this.Qd=g;this.Ic=k;this.Ld=!1;this.Oca();this.Rca();this.RH()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.Mja();this.Rja();this.Qd.get("autoplay")||this.Qd.set("state",n.ca);this.Qd=null;this.Ic.Zc(n.ca);this.Ic=null};m.prototype.kg=function(g){this.Ld!=g&&(this.Ld=
g,this.Uv())};m.prototype.RH=function(){this.Ic.Zc(this.Qd.get("state"))};m.prototype.QT=function(){this.Uv()};m.prototype.ST=function(){this.Ic.jra(this.Qd.get("frameDuration"))};m.prototype.RT=function(){this.Ic.iRa(this.Qd.get("finalFrame")=="first")};m.prototype.OT=function(){this.Qd.o(h.Vr)};m.prototype.NT=function(){this.Qd.o(h.Ub)};m.prototype.PT=function(){this.Qd.set("state",this.Ic.getState())};m.prototype.Uv=function(){this.Qd.get("autoplay")&&this.Ic.Zc(this.Ld?n.PLAYING:n.ca)};m.prototype.Oca=
function(){this.Qd.bind(h.L("state"),this.RH,this,!0);this.Qd.bind(h.L("autoplay"),this.QT,this,!0);this.Qd.bind(h.L("frameDuration"),this.ST,this,!0);this.Qd.bind(h.L("finalFrame"),this.RT,this,!0)};m.prototype.Mja=function(){this.Qd.h(h.L("state"),this.RH,this,!0);this.Qd.h(h.L("autoplay"),this.QT,this,!0);this.Qd.h(h.L("frameDuration"),this.ST,this,!0);this.Qd.h(h.L("finalFrame"),this.RT,this,!0)};m.prototype.Rca=function(){this.Ic.bind(h.Vr,this.OT,this,!0);this.Ic.bind(h.Ub,this.NT,this,!0);
this.Ic.bind(h.Pd,this.PT,this,!0)};m.prototype.Rja=function(){this.Ic.h(h.Vr,this.OT,this,!0);this.Ic.h(h.Ub,this.NT,this,!0);this.Ic.h(h.Pd,this.PT,this,!0)};return m});
define("tdv/player/view/webgl/system/imageMaterial/TextureController",["require","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/images/ImageAnimation","tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController"],function(a){function m(e,b,c,d){this.se=e;this.Id=b;this.Ma=c;this.Na=d.bind(this);n.Oa("AnimatedImageResource",this.se)?(this.Ic=new g(this.Id,this.se.get("rowCount",1),this.se.get("colCount",1),this.se.get("frameDuration"),this.se.get("frameCount",this.se.get("rowCount",
1)*this.se.get("colCount",1)),this.se.get("repeat"),this.se.get("finalFrame")=="first"),this.Ma.image=this.Ic.If(),this.Ic.bind(h.V,this.ES,this,!0),this.eq=new k(this.se,this.Ic)):this.Ma.image=this.Id;this.Ma.needsUpdate=!0;this.Na()}var h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/images/ImageAnimation"),k=a("tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController");m.prototype.kg=function(e){this.eq&&this.eq.kg(e)};m.prototype.dispose=function(){this.eq&&
(this.eq.clear(),this.eq=null);this.Ic&&(this.Ic.h(h.V,this.ES,this,!0),this.Ic.clear(),this.Ic=null);this.Ma=this.Id=this.se=null};m.prototype.ES=function(){this.Ma.needsUpdate=!0;this.Na()};return m});define("tdv/player/view/webgl/system/util/texture/Util",["require"],function(){var a={},m=null;a.eLa=function(){if(!m){var h=document.createElement("canvas");h.width=128;h.height=128;h.getContext("2d").clearRect(0,0,h.width,h.height);m=h}return m};return a});
define("tdv/view/util/Scale",["require","tdv/player/view/util/geo/Fov","tdv/view/constants/Alignment","tdv/view/constants/ScaleMode"],function(a){var m=a("tdv/player/view/util/geo/Fov"),h=a("tdv/view/constants/Alignment"),n=a("tdv/view/constants/ScaleMode"),g=180/Math.PI,k=Math.PI/180;return{J7:function(e,b,c,d,f,l,p){b||(b=e*d/c);f||(f=n.GB);var q={};switch(f){case n.GB:q.width=e;q.height=b;break;case n.NONE:q.width=c;q.height=d;break;case n.uj:q.width=Math.min(b*c/d,e);q.height=Math.min(e*d/c,b);
break;case n.Kr:q.width=Math.max(b*c/d,e);q.height=Math.max(e*d/c,b);break;case n.Tp:q.width=e;q.height=e*d/c;break;case n.Pk:q.width=b*c/d,q.height=b}q.width>e?(q.oB=e/q.width,q.CZ=l==h.fb?0:l==h.Db?1-q.oB:(1-q.oB)*.5,q.width=e):(q.CZ=0,q.oB=1);q.height>b?(q.rB=b/q.height,q.NZ=p==h.Tc?1-q.rB:p==h.Hc?0:(1-q.rB)*.5,q.height=b):(q.NZ=0,q.rB=1);return q},Foa:function(e,b,c,d,f,l,p,q){b||(b=m.wm(e,c,d));f||(f=n.GB);l||(l=4096/360);var r={};switch(f){case n.GB:r.Wd=e;r.Nk=b;break;case n.NONE:r.Wd=2*Math.atan2(c*
.5,l*45)*g;r.Nk=m.wm(r.Wd,c,d);break;case n.uj:r.Wd=Math.min(m.Ar(b,c,d),e);r.Nk=Math.min(m.wm(e,c,d),b);break;case n.Kr:r.Wd=Math.max(m.Ar(b,c,d),e);r.Nk=Math.max(m.wm(e,c,d),b);break;case n.Tp:r.Wd=e;r.Nk=m.wm(e,c,d);break;case n.Pk:r.Wd=m.Ar(b,c,d),r.Nk=b}r.Wd>e?(r.oB=Math.tan(e*.5*k)*c/Math.tan(r.Wd*.5*k)/c,r.CZ=p==h.fb?0:p==h.Db?1-r.oB:(1-r.oB)*.5,r.Wd=e):(r.CZ=0,r.oB=1);r.Nk>b?(r.rB=Math.tan(b*.5*k)*d/Math.tan(r.Nk*.5*k)/d,r.NZ=q==h.Tc?1-r.rB:q==h.Hc?0:(1-r.rB)*.5,r.Nk=b):(r.NZ=0,r.rB=1);return r}}});
define("tdv/player/view/webgl/system/imageMaterial/Behaviour","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/player/parser/ClassInfo tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/webgl/system/imageMaterial/TextureController tdv/player/view/webgl/system/util/texture/Util tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Scale".split(" "),function(a){function m(w){this.B=
w;this.vD=this.vD.bind(this);this.Na=this.Na.bind(this);this.Qj=this.Qj.bind(this);w=w.getComponent(l.Oi);this.Oh=w.Ap;this.Fe=w.M;this.se=this.A=null;this.Z3a=w.isSprite;this.ih=!1;this.Jo=this.hb=null;this.xy=0;this.Kka=this.Cea=this.Of=this.$0=this.ha=void 0;this.vka(w.xw);this.Oj(w.properties)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),k=a("tdv/events/Event"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/view/image/Item"),c=a("tdv/player/view/image/Repository"),
d=a("tdv/player/view/webgl/system/imageMaterial/TextureController"),f=a("tdv/player/view/webgl/system/util/texture/Util"),l=a("tdv/player/view/webgl/components"),p=a("tdv/view/util/Ease"),q=a("tdv/view/util/EaseDimension"),r=a("tdv/view/util/Scale"),t=["height","scaleMode","width"],u=["levels.url","levels.width","levels.height"],v="depthTest enabled encoding hidden side opacity easeDuration".split(" ");m.prototype.frame=function(w){var x=this.B.getComponent(l.Oi);this.vka(x.xw);this.Oj(x.properties);
this.Jo&&(this.Jo.Nb(w),this.xy=this.Jo.ob("alpha"),this.Zla(),this.Jo.Ve()&&(this.Jo=null),this.B.T.Qa());this.qab();this.ih&&(this.ih=!1)};m.prototype.vD=function(){if(this.se&&this.A){var w=this.se&&this.se.get("levels")||[];w=w.filter(function(H){return!!H.get("url")});var x=1,y=1;e.Oa("AnimatedImageResource",this.se)&&(x=this.se.get("rowCount"),y=this.se.get("colCount"));var z=null;if(w.length>0){w.sort(function(H,E){return E.get("width")-H.get("width")});z=this.A.get("width");var A=this.A.get("height"),
D=this.A.get("scaleMode","fill"),F=w[0].get("width")/y,C=w[0].get("height")/x,B=r.J7(z,A,F,C,D);z=w.reduce(function(H,E){return!H||H.get("width")>E.get("width")&&E.get("width")/y>=B.width&&E.get("height")/x>=B.height?E:H})}this.iV(z)}};m.prototype.iV=function(w){this.hb!=w&&(this.hb&&(this.c0a(),this.Hea(),this.R0(),this.ks(),this.ih=!1),this.hb=w)&&(this.es(),this.my(),this.NR(),this.ih=!1,this.Na())};m.prototype.NR=function(){this.de||(this.de=new b,this.de.jQ([this.hb.get("url")]),this.de.bind(n.ia,
this.Pe,this,!0),this.de.bind(n.xc,this.UBa,this,!0),this.de.bind(n.$c,this.yh,this,!0),this.zv=this.B.getComponent(l.Oi).priority||g.Jm,c.GA(this.de,this.zv))};m.prototype.ks=function(){this.de&&(this.de.h(n.ia,this.Pe,this,!0),this.de.h(n.xc,this.UBa,this,!0),this.de.h(n.$c,this.yh,this,!0),c.ho(this.de,this.zv),this.de=null)};m.prototype.Pe=function(){this.L_a();this.xla(new k(n.ia))};m.prototype.UBa=function(w){this.xla(new k(n.xc,{percent:w.percent}))};m.prototype.yh=function(){this.xla(new k(n.$c))};
m.prototype.xla=function(w){this.Oh&&this.Oh.o(w)};m.prototype.Na=function(){this.ih||(this.ih=!0,this.B.T.Qa())};m.prototype.es=function(){this.Ma=new THREE.Texture;this.Ma.image=f.eLa();this.Ma.generateMipmaps=!0;this.Ma.minFilter=THREE.LinearMipMapLinearFilter};m.prototype.R0=function(){this.Ma&&(this.Ma.dispose(),this.Ma=null)};m.prototype.my=function(){this.Z3a?(this.Aa=new THREE.SpriteMaterial({map:this.Ma}),this.Aa.sizeAttenuation=!0):this.Aa=new THREE.MeshBasicMaterial({map:this.Ma});this.Aa.transparent=
!0;this.Aa.needsUpdate=!0;this.B.N(l.Material).material=this.Aa;this.Tva(0);this.B.O(l.gi,!0);this.B.O(l.Material,!0);this.Qj(!0)};m.prototype.Qj=function(w){var x=this.A.get("enabled")&&!this.A.get("hidden")&&!!this.Pq,y=this.ha!==x;if(y||w){this.ha=x;x=this.xy;var z=this.ha?1:0,A=this.A.get("hidden")?0:this.A.get("easeDuration",200);this.Jo=x!==z?new p("linear",[new q("alpha",x,z,void 0)],Math.abs(x-z)*A):null;this.Zla()}x=this.A.get("encoding");if(this.$0!==x||w)this.$0=x,this.hbb();x=this.A.get("depthTest");
if(this.Cea!==x||w)this.Cea=x,this.Hab();x=this.A.get("opacity");if(this.Of!==x||w)this.Of=x,this.Zla();x=this.A.get("side");if(this.Kka!==x||w)this.Kka=x,this.Iab();y&&this.Fe&&this.Fe.o(this.ha?n.od:n.jd)};m.prototype.qab=function(){if(this.Aa){var w=this.B.getComponent(l.Oi);w=(w=(w=w&&w.rJa)&&w.getComponent(l.EB))?w.planes:null;this.Aa.clippingPlanes!==w&&(this.Aa.clippingPlanes=w,this.Aa.needsUpdate=!0)}};m.prototype.hbb=function(){if(this.Aa&&(this.Aa.map||this.Aa.emissiveMap)){var w=this.$0==
"srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.Aa.map&&(this.Aa.map.colorSpace=w);this.Aa.emissiveMap&&(this.Aa.emissiveMap.colorSpace=w);this.Aa.needsUpdate=!0}this.B.O(l.gi,!0);this.Na()};m.prototype.Hab=function(){this.Aa&&(this.Aa.depthTest=this.Cea);this.B.O(l.gi,!0);this.Na()};m.prototype.Zla=function(){this.Aa&&this.Tva((this.Of||0)*this.xy);this.Pq&&this.Pq.kg(this.Of>0);this.Na()};m.prototype.Tva=function(w){this.Aa.opacity=w;this.Aa.visible=this.Aa.opacity>0;this.Aa.isShaderMaterial&&
this.Aa.uniforms.opacity&&(this.Aa.uniforms.opacity.value=w);this.B.O(l.gi,!0)};m.prototype.Iab=function(){if(this.Aa)switch(this.Kka){case "back":this.Aa.side=THREE.BackSide;break;case "double":this.Aa.side=THREE.DoubleSide;break;default:this.Aa.side=THREE.FrontSide}this.B.O(l.gi,!0);this.Na()};m.prototype.Hea=function(){this.Aa&&(this.Aa.dispose(),this.Aa=null,this.B.ka(l.Material))};m.prototype.L_a=function(){this.Pq=new d(this.se,c.yg(this.hb.get("url")),this.Ma,this.Na);this.Qj(!0)};m.prototype.c0a=
function(){this.Pq&&(this.Pq.dispose(),this.Pq=null)};m.prototype.vka=function(w){this.se!=w&&(this.se&&h.da(this.se,u,this.vD),(this.se=w)&&h.ba(this.se,u,this.vD,!1),this.vD())};m.prototype.Oj=function(w){if(this.A!=w){this.A&&(h.da(this.A,t,this.vD),h.da(this.A,v,this.Qj));if(this.A=w)h.ba(this.A,t,this.vD,!1),h.ba(this.A,v,this.Qj,!1);this.vD()}};m.prototype.dispose=function(){this.iV(null);this.vka(null);this.Oj(null);this.B=this.Oh=null};m.Wa=function(w){w.N(l.MB).manager=new m(w)};m.ya=function(w){var x=
w.getComponent(l.MB);x.manager.dispose();x.manager=null;w.ka(l.MB)};m.frame=function(w,x){w.getComponent(l.MB).manager.frame(x)};return m});
define("tdv/player/view/webgl/system/imageMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/imageMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/imageMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(k,e){this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya);
this.On.v.length&&this.On.v.slice().forEach(g.Wa);this.materials.v.length&&this.materials.v.slice().forEach(function(b){g.frame(b,k,e)})};a.J={};a.J.On=[n.Oi,n.MB.aa];a.J.materials=[n.Oi,n.MB];a.J.Pn=[n.Oi.aa,n.MB];return a});
define("tdv/player/view/webgl/system/lineMaterial/Behaviour",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function m(g){this.B=g;this.Aa=null;this.update()}var h=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");m.prototype.update=function(){this.Aa||(this.Aa=new THREE.LineBasicMaterial,this.B.N(n.Material).material=this.Aa);var g=this.B.getComponent(n.ei);this.Aa.color=h.Ip(g.color||"#ffffff");this.Aa.lineWidth=g.width||1;this.Aa.opacity=
g.opacity||0;this.Aa.transparent=g.transparent;this.Aa.depthTest=!!g.depthTest;this.Aa.visible=this.Aa.opacity>0;this.Aa.needsUpdate=!0};m.prototype.dispose=function(){this.Aa&&(this.Aa.dispose(),this.Aa=null,this.B.ka(n.Material));this.B=null};m.Wa=function(g){g.N(n.OB).manager=new m(g)};m.ya=function(g){var k=g.getComponent(n.OB);k.manager.dispose();k.manager=null;g.ka(n.OB)};m.update=function(g){g.getComponent(n.OB).manager.update()};return m});
define("tdv/player/view/webgl/system/lineMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/lineMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/lineMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.On.v.length&&this.On.v.slice().forEach(g.Wa);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya)};a.J={};a.J.On=[n.ei,n.OB.aa];a.J.materials=[n.ei,n.OB];a.J.Pn=[n.ei.aa,n.OB];return a});
define("tdv/player/view/webgl/system/line/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components");a("tdv/player/view/webgl/system/util/entity/Util");var g=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(h,function(){h.apply(this,
arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(){this.BNa.v.length&&this.BNa.v.slice().forEach(this.xb);this.lines.Da.length&&this.lines.Da.slice().forEach(this.ib);this.CNa.v.length&&this.CNa.v.slice().forEach(this.Ca);this.DNa.v.length&&this.DNa.v.slice().forEach(this.Ca);this.ENa.v.length&&this.ENa.v.slice().forEach(this.Ca)};a.prototype.xb=function(k){k.N(n.Object3D).sa=new THREE.LineSegments;k.N(n.PB);k.N(n.ta);if(!k.getComponent(n.Geometry)){var e=
(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,1)]);e.userData.UMa=!0;k.N(n.Geometry).geometry=e}this.ib(k)};a.prototype.ib=function(k){var e=k.getComponent(n.Object3D).sa;g.ND(e,k.getComponent(n.Material).material);var b=k.getComponent(n.Geometry).geometry;e.geometry!=b&&(e.geometry&&b.userData.UMa&&e.geometry.dispose(),e.geometry=b,e.needsUpdate=!0);k=k.getComponent(n.Line).renderOrder||0;e.renderOrder!=k&&(e.renderOrder=k,e.needsUpdate=!0)};a.prototype.Ca=
function(k){k.ka(n.PB);k.ka(n.Geometry);var e=k.getComponent(n.Object3D);e&&(e=e.sa,e.geometry&&e.geometry.userData.UMa&&e.geometry.dispose(),e.geometry=null,g.ND(e,null),k.ka(n.Object3D))};a.J={};a.J.BNa=[n.Line,n.Material,n.PB.aa];a.J.lines=[n.Line,n.Geometry,n.Material,n.PB];a.J.CNa=[n.Line.aa,n.PB];a.J.DNa=[n.Material.aa,n.PB];a.J.ENa=[n.Geometry.aa,n.PB];return a});
define("tdv/player/view/webgl/system/lineToTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(h,function(){h.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.gg=this.gg.bind(this)});a.prototype.Yc=
function(){this.xNa.v.length&&this.xNa.v.slice().forEach(this.xb);this.wNa.v.length&&this.wNa.v.slice().forEach(this.gg);this.yNa.v.length&&this.yNa.v.slice().forEach(this.Ca);this.zNa.v.length&&this.zNa.v.slice().forEach(this.Ca);this.ANa.v.length&&this.ANa.v.slice().forEach(this.Ca)};a.prototype.xb=function(l){l.N(n.QB)};a.prototype.Ca=function(l){l.ka(n.QB)};var k=new THREE.Matrix4,e=new THREE.Quaternion,b=new THREE.Vector3,c=new THREE.Vector3(0,0,1),d=new THREE.Euler,f=180/Math.PI;a.prototype.gg=
function(l){var p=l.getComponent(n.ta);if(p){var q=g.Rc(l);if(q&&q.parent){var r=l.getComponent(n.zu),t=r.F;if(t){r=g.Rc(t);if(!r||!r.parent)return;b.setFromMatrixPosition(r.matrixWorld)}else if(r.position)b.copy(r.position);else return;k.copy(q.parent.matrixWorld).invert();b.applyMatrix4(k);b.x-=p.translationX;b.y-=p.translationY;b.z-=p.Ze;q=b.length();e.setFromUnitVectors(c,b.normalize());d.setFromQuaternion(e,p.mf);d.x*=f;d.y*=f;d.z*=f;if(p.scale!=q||p.Yd!=d.x||p.fd!=d.y||p.Xe!=d.z)p=l.O(n.ta),
p.scale=q,p.Yd=d.x,p.fd=d.y,p.Xe=d.z,g.fZ(l,p),l.T.Qa()}}};a.J={};a.J.xNa=[n.Object3D,n.zu,n.QB.aa];a.J.wNa=[n.Object3D,n.zu,n.QB,n.ta];a.J.yNa=[n.Object3D.aa,n.QB];a.J.zNa=[n.zu.aa,n.QB];a.J.ANa=[n.ta.aa,n.QB];return a});
define("tdv/player/view/webgl/system/objectTransform/System","require tdv/utils tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/ecs/System"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(g,function(){g.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.ib=this.ib.bind(this)});a.prototype.Yc=function(){this.oOa.v.length&&this.oOa.v.slice().forEach(this.xb);this.Wpa.Da.length&&this.Wpa.Da.slice().forEach(this.ib);this.pOa.v.length&&this.pOa.v.slice().forEach(this.Ca);this.qOa.v.length&&this.qOa.v.slice().forEach(this.Ca)};a.prototype.xb=function(c){c.N(k.RB);this.Wpa.v.forEach(function(d){this.H3a(d,
c)&&this.u4(e.Rc(d))}.bind(this));this.ib(c)};a.prototype.ib=function(c){var d=c.getComponent(k.gi);if(c=e.Rc(c))this.mYa(c,d),this.u4(c),this.ye(c,d)};a.prototype.Ca=function(c){c.ka(k.RB);var d=e.Rc(c);d&&(this.DZa(d),this.u4(d),c.ka(k.RB))};a.prototype.mYa=function(c,d){c.userData.ePa=d.opacity;c.userData.zW=d.zW;c.userData.castShadow=d.castShadow;c.userData.receiveShadow=d.receiveShadow;c.userData.GW=d.GW};a.prototype.DZa=function(c){c.userData.ePa=void 0;c.userData.zW=void 0;c.userData.castShadow=
void 0;c.userData.receiveShadow=void 0;c.userData.GW=void 0};a.prototype.u4=function(c){if(n.Vh!=c&&!c.Aw){var d=this.wya(c),f=this.t1a(c),l=this.v1a(c),p=this.w1a(c),q=this.u1a(c);if(c.material){if(d===void 0&&q!==!0)b.IY(c);else{var r=c.userData.Pt||c.material,t=b.y8(r),u=b.y8(c.material),v=r.opacity;r=r.transparent;q!==!0&&u&&!t?b.IY(c):q!==!0||u||b.HJa(c);v!==void 0&&(t=v*(d===void 0?1:d),u=t>0,r=t<1?!0:r,c.material.opacity!==t||c.material.visible!==u||c.material.transparent!==r)&&(b.Zna(c),c.material.opacity=
t,c.material.transparent=r,c.material.visible=u,c.material.needsUpdate=!0);b.wnb(c)}var w=this.j1a(f);(c.material.map==null?[]:Array.isArray(c.material.map)?c.material.map:[c.material.map]).forEach(function(x){x.anisotropy!==w&&(x.anisotropy=w,x.needsUpdate=!0)})}c.isMesh&&(l!==void 0&&c.castShadow!==l&&(c.castShadow=l),p!==void 0&&c.receiveShadow!==p&&(c.receiveShadow=p));c.children&&c.children.forEach(function(x){x.userData.ihb=d;x.userData.fhb=f;x.userData.hhb=l;x.userData.jhb=p;x.userData.ghb=
q;this.u4(x)}.bind(this))}};a.prototype.j1a=function(c){return 1+Math.round((c||0)*(e.hLa().capabilities.getMaxAnisotropy()-1))};a.prototype.wya=function(c){var d=c.userData.ePa;c=c.userData.ihb;if(c!==void 0||d!==void 0)if(d=(c!==void 0?c:1)*(d!==void 0?d:1),d!==1)return d};a.prototype.t1a=function(c){var d=c.userData.zW;if(d!==void 0)return d;c=c.userData.fhb;if(c!==void 0)return c};a.prototype.v1a=function(c){var d=c.userData.castShadow;if(d!==void 0)return d;c=c.userData.hhb;if(c!==void 0)return c};
a.prototype.w1a=function(c){var d=c.userData.receiveShadow;if(d!==void 0)return d;c=c.userData.jhb;if(c!==void 0)return c};a.prototype.u1a=function(c){var d=c.userData.GW;if(d!==void 0)return d;c=c.userData.ghb;if(c!==void 0)return c};a.prototype.ye=function(c,d){var f=this.wya(c);f!==void 0&&(f=f>0,c.userData.vob!==f&&(c.userData.vob=f,d.M&&d.M.o(f?h.od:h.jd)))};a.prototype.H3a=function(c,d){c=e.Rc(c);d=e.Rc(d);if(!c||!d)return!1;for(d=d.parent;d;){if(d===c)return!0;d=d.parent}return!1};a.J={};a.J.oOa=
[k.gi,k.Object3D,k.RB.aa];a.J.Wpa=[k.gi,k.Object3D,k.RB];a.J.pOa=[k.gi.aa,k.RB];a.J.qOa=[k.Object3D.aa,k.RB];return a});
define("tdv/player/view/webgl/system/materialVariant/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/material/Util"],function(a){function m(g){this.B=g;this.yma=this.Wm=this.Ie=null;this.iO=-1}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/material/Util");m.prototype.frame=function(){if(!this.Wm&&(this.Wm=this.B.getComponent(h.Pi).Loa)){var g=this.Wm.userData&&this.Wm.userData.gltfExtensions&&this.Wm.userData.gltfExtensions.KHR_materials_variants;
this.yma=g&&g.variants||[];this.update()}};m.prototype.update=function(){if(this.yma){var g=this.B.getComponent(h.Cx).name,k=this.yma.findIndex(function(b){return b.name==g}),e=this.Wm.scene;this.Ie!=e?(this.Ie&&this.jEa(this.Ie),this.Ie=e,this.iO=k,this.Ie&&this.mFa(this.Ie,this.iO)):this.iO!=k&&(this.iO=k,this.Ie&&this.mFa(this.Ie,this.iO));this.B.T.Qa()}};m.prototype.jEa=function(g){this.Xva(g,-1)};m.prototype.mFa=function(g,k){this.r4a(g,k,function(){this.Ie==g&&this.iO==k&&this.Xva(g,k)}.bind(this))};
m.prototype.r4a=function(g,k,e){var b=[];g.traverse(function(c){var d=c.isMesh&&c.userData.gltfExtensions&&c.userData.gltfExtensions.KHR_materials_variants;if(d=d&&d.mappings){c.userData.$ib||(c.userData.$ib=n.Nfb(c));c.userData.lF||(c.userData.lF={});for(var f=null,l=d.length-1;l>=0&&!f;--l)d[l].variants.indexOf(k)!=-1&&(f=d[l]);f&&b.push(this.Wm.parser.getDependency("material",f.material).then(function(p){c.userData.lF[k]||(c.userData.lF[k]=p)}))}}.bind(this));Promise.all(b).then(function(){e(g,
k)})};m.prototype.Xva=function(g,k){g.traverse(function(e){if(e.userData.lF){var b=e.userData.lF[k];b&&(n.ND(e,b),this.Wm.parser.assignFinalMaterial(e),this.B.O(h.gi,!0))}}.bind(this));this.B.T.Qa()};m.prototype.dispose=function(){this.Ie&&(this.jEa(this.Ie),this.B.O(h.gi,!0),this.Ie=null)};m.Wa=function(g){g.N(h.Rr).manager=new m(g)};m.ya=function(g){var k=g.getComponent(h.Rr);k.manager.dispose();k.manager=null;g.ka(h.Rr)};m.update=function(g){g.getComponent(h.Rr).manager.update()};m.frame=function(g){g.getComponent(h.Rr).manager.frame()};
return m});
define("tdv/player/view/webgl/system/materialVariant/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/materialVariant/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/materialVariant/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.INa.v.length&&this.INa.v.slice().forEach(g.Wa);this.Q8.v.length&&
this.Q8.v.slice().forEach(g.frame);this.Q8.Da.length&&this.Q8.Da.slice().forEach(g.update);this.JNa.v.length&&this.JNa.v.slice().forEach(g.ya);this.KNa.v.length&&this.KNa.v.slice().forEach(g.ya);this.LNa.v.length&&this.LNa.v.slice().forEach(g.ya)};a.J={};a.J.INa=[n.Cx,n.Pi,n.Object3D,n.Rr.aa];a.J.Q8=[n.Cx,n.Pi,n.Object3D,n.Rr];a.J.JNa=[n.Cx.aa,n.Rr];a.J.KNa=[n.Object3D.aa,n.Rr];a.J.LNa=[n.Pi.aa,n.Rr];return a});
define("tdv/player/view/webgl/system/mesh/Behaviour",["require","tdv/player/view/webgl/components"],function(a){var m=a("tdv/player/view/webgl/components");return{Wa:function(h){var n=h.N(m.Bu);h.N(m.ta);var g=h.O(m.Mesh);h.N(m.Object3D).sa=n.Be=g.Be=new THREE.Mesh(h.getComponent(m.Geometry).geometry,h.getComponent(m.Material).material);g.Be.renderOrder=g.renderOrder},update:function(h){var n=h.O(m.Bu);n.Be.geometry=h.getComponent(m.Geometry).geometry;n.Be.material=h.getComponent(m.Material).material;
n.Be.renderOrder=h.getComponent(m.Mesh).renderOrder},ya:function(h){h.getComponent(m.Bu).Be=null;h.ka(m.Bu);h.ka(m.Object3D)}}});
define("tdv/player/view/webgl/system/mesh/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/mesh/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/mesh/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.ONa.v.length&&this.ONa.v.slice().forEach(g.Wa);this.NNa.Da.length&&
this.NNa.Da.slice().forEach(g.update);this.V8.v.length&&this.V8.v.slice().forEach(g.ya);this.bib.v.length&&this.V8.v.slice().forEach(g.ya);this.cib.v.length&&this.V8.v.slice().forEach(g.ya)};a.J={};a.J.ONa=[n.Mesh,n.Geometry,n.Material,n.Bu.aa];a.J.NNa=[n.Mesh,n.Geometry,n.Material,n.Bu];a.J.V8=[n.Mesh.aa,n.Bu];a.J.bib=[n.Geometry.aa,n.Bu];a.J.cib=[n.Material.aa,n.Bu];return a});
define("tdv/player/view/util/FileLoader",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/util/LoadQueue"],function(a,m,h,n,g){return function(k){function e(b,c){var d=k.call(this)||this;d.Dq=null;d.jwa=null;d.kC=!1;d.JM=null;d.Se=b;d.zv=c;d.rD=new Request(b);d.BV=d.BV.bind(d);d.AR=d.AR.bind(d);return d}P(e,k);e.prototype.start=function(){this.JM||(this.kC=!1,this.JM=g.add(this.Se,this.zv,this.BV,this.AR))};e.prototype.BV=function(){this.Se.indexOf("filesystem:")===
0?this.J0a():this.K0a()};e.prototype.J0a=function(){var b=this,c=new XMLHttpRequest;c.open("GET",this.Se,!0);c.responseType="arraybuffer";c.onload=function(){b.XBa(c.response);c.onload=c.onerror=null};c.onerror=function(){b.TBa();c.onload=c.onerror=null};c.send()};e.prototype.K0a=function(){var b=this;fetch(this.rD).then(function(c){function d(t){t===void 0&&(t=null);if(t=t||r)t.close(),r=null,b.Dq=null}function f(t){var u;return(u=b.Dq.read().then(function(v){var w=v===null||v===void 0?void 0:v.value;
w&&(q+=w.byteLength,t.enqueue(w));v&&v.done&&(p&&q<p?t.error("connection closed prematurely"):(p=q,d(t)));p!==void 0&&b.o(h.xc,{totalBytes:p,bytesLoaded:q,percent:q<p?100*q/p:100})}))===null||u===void 0?void 0:u.catch(function(v){console.log("Error reading response",v);t.error(v)})}if(b.kC)return c.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");if(!c.ok)return Promise.resolve(c);var l=c.headers.get("content-length")||c.headers.get("x-content-length"),p,q=0;l!==
null&&(p=parseInt(l,10));b.Dq=c.body.getReader();var r=null;return new Response(new ReadableStream({start:function(t){b.kC?t.close():r=t},pull:function(t){return f(t)},cancel:function(){return d()}}))}).then(function(c){return c.arrayBuffer()}).then(function(c){b.XBa(c)}).catch(function(){b.TBa()})};e.prototype.cancel=function(){this.JM&&(this.JM.cancel(),this.JM=null)};e.prototype.AR=function(){this.kC=!0;this.Dq&&(this.Dq.cancel(),this.Dq=null)};e.prototype.XBa=function(b){var c;this.jwa=b;(c=this.JM)===
null||c===void 0||c.loaded();this.o(h.ia,{buffer:b})};e.prototype.TBa=function(){this.cancel();this.o(h.$c)};e.prototype.getData=function(){return this.jwa};return e}(n)});
define("tdv/player/view/webgl/system/model/loaders/GLTFLoader","require exports three.mod tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/RaycastUtil tdv/player/view/webgl/system/util/Util tdv/player/view/util/Capabilities tdv/player/view/util/FileLoader tdv/player/view/util/Flags tdv/player/view/util/URL tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q){return function(r){function t(u){var v=
r.call(this)||this;v.type=t.TYPE;v.ZJ=[];v.DE=[];v.GNa=0;v.F=u;v.hqa=v.hqa.bind(v);v.iqa=v.iqa.bind(v);v.nP=e.QRa(new h.GLTFLoader);return v}P(t,r);t.prototype.soa=function(){return this.Wm?this.Wm.scene:null};t.prototype.start=function(u){this.url=u;this.PRa();this.yt.start()};t.prototype.update=function(){if(this.ZJ.length!=0||this.DE.length!=0)if(c.Nhb())this.F.T.Qa();else{for(var u=Date.now()+8,v=this.F.getComponent(q.Pi).eb.Fc().sl();this.DE.length>0&&Date.now()<u;){var w=this.DE.shift();v&&
v.initTexture(w)}for(;this.ZJ.length>0&&Date.now()<u;)b.VPa(this.ZJ.shift());this.ZJ.length==0&&this.DE.length==0?this.eTa():this.F.T.Qa()}};t.prototype.dispose=function(){this.CSa()};t.prototype.PRa=function(){this.yt=new f(this.url,g.TF);this.Tbb()};t.prototype.CSa=function(){this.yt&&(this.Fjb(),this.yt.cancel())};t.prototype.Tbb=function(){this.yt.bind(n.ia,this.OA,this,!0);this.yt.bind(n.xc,this.PP,this,!0);this.yt.bind(n.$c,this.OP,this,!0)};t.prototype.Fjb=function(){this.yt.h(n.ia,this.OA,
this);this.yt.h(n.xc,this.PP,this);this.yt.h(n.$c,this.OP,this)};t.prototype.OA=function(){this.nP.parse(this.yt.getData(),p.getDirectory(this.url),this.hqa,this.iqa)};t.prototype.PP=function(u){this.o(n.xc,u.data)};t.prototype.OP=function(){this.GNa<2?(this.GNa++,this.CSa(),this.PRa(),this.yt.start()):this.o(n.$c)};t.prototype.iqa=function(u){l.vu&&u&&u.message&&console.error(u.message);this.o(n.$c)};t.prototype.hqa=function(u){this.nP&&(this.ZJ=[],this.DE=[],u.scene.traverse(function(v){if(v.isMesh){var w=
v.material;w&&(d.TPa==1&&w.isMeshPhysicalMaterial&&(v.material=w=(new h.MeshStandardMaterial).copy(w)),w.depthWrite=!w.transparent,w=this.Jfb(w),this.DE=this.DE.concat(w))}this.ZJ.push(v)}.bind(this)),this.Wm=u,this.ZJ.length==0&&this.DE.length==0?this.eTa():this.F.T.Qa())};t.prototype.eTa=function(){this.o(n.INIT);this.o(n.ia)};t.prototype.Jfb=function(u){var v=[];u.isMeshStandardMaterial?(u.alphaMap&&v.push(u.alphaMap),u.aoMap&&v.push(u.aoMap),u.bumpMap&&v.push(u.bumpMap),u.displacementMap&&v.push(u.displacementMap),
u.emissiveMap&&v.push(u.emissiveMap),u.envMap&&v.push(u.envMap),u.lightMap&&v.push(u.lightMap),u.map&&v.push(u.map),u.metalnessMap&&v.push(u.metalnessMap),u.normalMap&&v.push(u.normalMap),u.roughnessMap&&v.push(u.roughnessMap)):u.isMeshBasicMaterial&&(u.alphaMap&&v.push(u.alphaMap),u.envMap&&v.push(u.envMap),u.map&&v.push(u.map));return v};t.TYPE="gltf";return t}(k)});
define("tdv/player/view/webgl/system/model/loaders/GSLoader","require exports tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/util/LibsLoader".split(" "),function(a,m,h,n,g,k){return function(e){function b(c){var d=e.call(this)||this;d.type=b.TYPE;d.Ak=null;d.fE=null;d.url="";d.UD=null;d.Kn=null;d.ZI=null;d.yK=null;d.properties=c;d.OA=d.OA.bind(d);d.PP=d.PP.bind(d);d.OP=d.OP.bind(d);d.oY=d.oY.bind(d);return d}P(b,e);b.prototype.soa=function(){return this.Ak};
b.prototype.start=function(c){this.url=c;k.GS.pj()?this.qSa():k.GS.load(this.yib,this)};b.prototype.update=function(){(!this.fE||this.Kn&&this.Kn.state==TDV.GS.StateFx.PLAYING)&&this.o(h.V)};b.prototype.dispose=function(){this.ZI&&(this.properties.h(h.L("antialiasingLevel"),this.Xpa,this),this.ZI.dispose(),this.ZI=null);this.yK&&(this.properties.h(h.L("sphericalHarmonicsMaxDegree"),this.lqa,this),this.yK.dispose(),this.yK=null);this.properties.h(h.L("displayEffect"),this.$pa,this);this.fE&&(this.Ak.remove(this.fE),
this.fE=null);this.Ak&&(this.Ak.removeEventListener("refresh",this.oY),this.Ak.dispose(),this.Ak=null);this.url=""};b.prototype.yib=function(){this.url&&this.qSa()};b.prototype.qSa=function(){this.Ak=new TDV.GS.GaussianSplattingGroup;this.Ak.addEventListener("refresh",this.oY);this.Ak.renderOrder=n.dVa;this.Ak.Aw=!0;this.ZI=new TDV.GS.AntialiasingFx;this.yK=new TDV.GS.SphericalHarmonicsFx;this.Ak.fx=(this.Ak.fx||[]).concat([this.ZI,this.yK]);this.properties.bind(h.L("antialiasingLevel"),this.Xpa,
this,!1);this.properties.bind(h.L("sphericalHarmonicsMaxDegree"),this.lqa,this,!1);this.properties.bind(h.L("displayEffect"),this.$pa,this,!1);this.Xpa();this.lqa();this.$pa();(new TDV.GS.GaussianCloudLoader).load(this.url,this.OA,this.PP,this.OP)};b.prototype.OA=function(c){this.Ak&&(this.fE=c,this.Ak.add(c),this.o(h.INIT),this.o(h.ia))};b.prototype.PP=function(c){var d=c.total;c=c.loaded;this.o(h.xc,{totalBytes:d,bytesLoaded:c,percent:c<d?100*c/d:100})};b.prototype.OP=function(){this.o(h.$c)};b.prototype.$pa=
function(){var c=this.properties.get("displayEffect");if(this.UD!=c&&this.Ak){var d=this.Ak.fx;this.Kn&&(d=d.filter(function(f){return f!=this.Kn}.bind(this)),this.Kn.dispose(),this.Kn=null);if(this.UD=c)this.Kn=new TDV.GS.RadialFadeInAnimationFx,this.Kn.sparseFadeFactor=this.UD.get("sparseFadeFactor"),this.Kn.denseFadeFactor=this.UD.get("denseFadeFactor"),this.Kn.denseTimeDelay=this.UD.get("denseTimeDelay"),this.Kn.speedFactor=this.UD.get("speedFactor"),this.Kn.minimumPointSize=this.UD.get("minimumPointSize"),
d=d.concat([this.Kn]),this.Kn.play(),this.oY();this.Ak.fx=d}};b.prototype.oY=function(){this.o(h.V)};b.prototype.Xpa=function(){this.ZI&&(this.ZI.value=this.properties.get("antialiasingLevel"),this.o(h.V))};b.prototype.lqa=function(){this.yK&&(this.yK.maxDegree=this.properties.get("sphericalHarmonicsMaxDegree"),this.o(h.V))};b.TYPE="gs";return b}(g)});
define("tdv/player/view/webgl/system/model/loaders/TilesLoader","require exports three.mod tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k,e,b){a=function(q){function r(){var t=q.call(this)||this;t.type=r.TYPE;t.Me=null;t.nP=null;t.camera=null;t.Yq=null;t.width=void 0;t.height=void 0;t.pj=!1;t.C6=null;t.session=null;t.config=null;return t}P(r,q);
r.prototype.soa=function(){return this.Me?this.Me.group:null};r.prototype.tkb=function(t){this.config=t};r.prototype.start=function(t){this.C6=this.Web(t);this.Me=new h.TDTiles.TilesRenderer(t);this.nP=k.QRa(new h.GLTFLoader(this.Me.manager));this.Me.manager.addHandler(/\.gltf$/,this.nP);this.config&&(this.Me.maxDepth=this.config.maxDepth,this.Me.loadSiblings=this.config.loadSiblings,this.Me.parseQueue.maxJobs=this.config.qqa,this.Me.downloadQueue.maxJobs=this.config.Mna,this.Me.lruCache.minSize=
this.config.Apa,this.Me.lruCache.maxSize=this.config.zpa,this.Me.errorTarget=this.config.errorTarget,this.Me.errorThreshold=this.config.errorThreshold);b.epa(t)&&(this.Me.fetchOptions.mode="cors");this.Me.onLoadModel=this.onLoadModel.bind(this);this.Me.onDisposeModel=this.onDisposeModel.bind(this);this.Me.onLoadTileSet=this.onLoadTileSet.bind(this);this.Me.onTileVisibilityChange=this.onTileVisibilityChange.bind(this);this.Me.preprocessURL=this.Jib.bind(this);this.o(n.INIT)};r.prototype.dispose=function(){this.Me&&
(this.nP=null,this.Me.dispose(),this.Me=null,this.Yq&&this.Yq.removeFromParent(),this.session=this.C6=null)};r.prototype.setCamera=function(t){this.camera!==t&&(this.camera=t,this.lTa(),this.updateCamera())};r.prototype.setSize=function(t,u){if(this.width!==t||this.height!==u)this.width=t,this.height=u,this.Xnb()};r.prototype.update=function(){this.camera&&this.width&&this.height&&(this.lTa(),this.Me.update())};r.prototype.Web=function(t){return(new window.URL(t)).searchParams.get("key")||null};r.prototype.$fb=
function(t){return(new window.URL(t)).searchParams.get("session")||null};r.prototype.updateCamera=function(){this.Me&&this.camera&&(this.Me.setCamera(this.camera),this.Me.setCamera(this.Yq))};r.prototype.lTa=function(){this.camera&&(this.Yq||(this.Yq=new h.OrthographicCamera(-1,1,-1,1),this.Yq.matrixAutoUpdate=!1),this.Yq.parent!==this.camera&&this.camera.add(this.Yq),this.camera.updateMatrixWorld(!0),p.setFromMatrixPosition(this.camera.matrixWorld),l.copy(p).y-=this.camera.far,l.applyMatrix4(c.copy(this.camera.matrixWorld).invert()),
f.random().cross(l).normalize(),this.Yq.matrix.lookAt(d,l,f),this.Yq.near=this.camera.near,this.Yq.far=this.camera.far)};r.prototype.Xnb=function(){this.Me&&this.camera&&this.width&&this.height&&(this.Me.setResolution(this.camera,this.width,this.height),this.Me.setResolution(this.Yq,1,1))};r.prototype.Jib=function(t){t=new window.URL(t);/^http/.test(t.protocol)&&(this.C6&&t.searchParams.append("key",this.C6),this.session&&t.searchParams.append("session",this.session));return t.toString()};r.prototype.onLoadModel=
function(){this.pj||(this.pj=!0,this.o(n.ia));this.o(n.V)};r.prototype.onDisposeModel=function(t){t.traverse(function(u){u instanceof h.Mesh&&e.IY(u)})};r.prototype.onTileVisibilityChange=function(t,u,v){v&&this.o(n.V)};r.prototype.onLoadTileSet=function(){this.session==null&&this.Me.traverse(function(t){return t.content&&t.content.uri?(this.session=this.$fb(t.content.uri),!0):!1}.bind(this));this.o(n.V)};r.TYPE="tiles";return r}(g);var c=new h.Matrix4,d=new h.Vector3,f=new h.Vector3,l=new h.Vector3,
p=new h.Vector3;return a});
define("tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig",["require","exports"],function(){return function(){function a(){this.errorTarget=6;this.maxDepth=this.errorThreshold=Infinity;this.loadSiblings=!0;this.Mna=6;this.qqa=3;this.Apa=600;this.zpa=800}a.Ddb=function(m){var h=new a;h.errorTarget=m.get("errorTarget",h.errorTarget);h.errorThreshold=m.get("errorThreshold",h.errorThreshold);h.maxDepth=m.get("maxDepth",h.maxDepth);h.loadSiblings=m.get("loadSiblings",h.loadSiblings);h.Mna=m.get("downloadMaxJobs",
h.Mna);h.qqa=m.get("parseMaxJobs",h.qqa);h.Apa=m.get("lruCacheMinSize",h.Apa);h.zpa=m.get("lruCacheMaxSize",h.zpa);return h};return a}()});
define("tdv/player/view/webgl/system/model/GeometryQuery",["require","tdv/player/view/webgl/system/util/RaycastUtil"],function(a){function m(b){this.Fa=b}var h=a("tdv/player/view/webgl/system/util/RaycastUtil"),n=new THREE.Raycaster,g=new THREE.Vector3,k=new THREE.Vector3(0,-1,0),e=new THREE.Vector3(0,1,0);m.prototype.CK=function(b,c){n.ray.origin.copy(b);g.copy(c).sub(b);var d=g.length();g.normalize();n.ray.direction.copy(g);b=this.hH();return h.intersect(n,b).filter(function(f){if(f.distance>=d*
.98||!f.object.visible)return!1;f=Array.isArray(f.object.material)&&f.face?f.object.material[f.face.materialIndex]:f.object.material;return!f||f.visible}).length>0};m.prototype.ofb=function(b){n.ray.origin.copy(b);n.ray.direction.copy(k);b=this.hH();var c=h.intersect(n,b);if(c.length>0)return c[0].distance;n.ray.direction.copy(e);c=h.intersect(n,b);if(c.length>0)return-c[0].distance};m.prototype.hH=function(){var b=[];this.Fa.traverse(function(c){c.isSprite||c.isLine||b.push(c)});return b};return m});
define("tdv/player/view/webgl/system/model/MetadataQuery",["require","exports"],function(){return function(){function a(m){this.fE=m}a.prototype.getMetadata=function(){return this.fE.metadata};return a}()});
define("tdv/player/view/webgl/system/model/ObjectQuery",["require","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(n,g){this.Vb=n;this.T2a=g}var h=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.xLa=function(n){return(n=this.Rc(n))&&n.matrixWorld};m.prototype.Rc=function(n){return n?h.ZD(this.T2a,n):h.Rc(this.Vb)};return m});
define("tdv/player/view/webgl/system/model/ProjectionQuery",["require","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(c,d,f){this.Vb=c;this.J4a=d;this.i1a=f}var h=a("tdv/player/view/webgl/system/util/entity/Util"),n=new THREE.Vector3,g=new THREE.Vector3,k=new THREE.Vector3,e=new THREE.Frustum,b=new THREE.Matrix4;m.prototype.Koa=function(c,d){d=this.J4a.xLa(d);if(!d)return null;g.copy(c).applyMatrix4(d);var f=(c=h.Rc(this.Vb))&&h.sX(c);c=f&&h.uw(f);if(!c)return null;b.identity().multiplyMatrices(c.projectionMatrix,
c.matrixWorldInverse);e.setFromProjectionMatrix(b);if(!e.containsPoint(g))return null;d=(f&&h.vX(f))/2;f=(f&&h.dE(f))/2;n.copy(g).project(c);d=n.x*d+d;f=-(n.y*f)+f;k.setFromMatrixPosition(c.matrixWorld);c=this.i1a.CK(k,g);return{x:Math.round(d),y:Math.round(f),visible:!c}};return m});
define("tdv/player/view/webgl/system/model/Loader","require tdv/constants/EventName tdv/player/script/Model3DResourceLevel tdv/player/view/webgl/system/model/loaders/GLTFLoader tdv/player/view/webgl/system/model/loaders/GSLoader tdv/player/view/webgl/system/model/loaders/TilesLoader tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig tdv/player/view/webgl/system/model/GeometryQuery tdv/player/view/webgl/system/model/MetadataQuery tdv/player/view/webgl/system/model/ObjectQuery tdv/player/view/webgl/system/model/ProjectionQuery tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL".split(" "),function(a){function m(u,
v,w,x){this.B=u;this.lq=v;u=this.B.getComponent(q.Pi);this.A=u.properties;this.Lj=x;this.sf=w;this.Fe=this.Lj.iw(1);this.sf.uO(this.Fe,1);this.La=this.Wm=null;w=this.Q2a(u.Kpa);this.pd=this.y_a(w);this.tXa();this.pd.type===e.TYPE&&this.pd.tkb(b.Ddb(u.Kpa));this.pd.start(w)}var h=a("tdv/constants/EventName"),n=a("tdv/player/script/Model3DResourceLevel"),g=a("tdv/player/view/webgl/system/model/loaders/GLTFLoader"),k=a("tdv/player/view/webgl/system/model/loaders/GSLoader"),e=a("tdv/player/view/webgl/system/model/loaders/TilesLoader"),
b=a("tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig"),c=a("tdv/player/view/webgl/system/model/GeometryQuery"),d=a("tdv/player/view/webgl/system/model/MetadataQuery"),f=a("tdv/player/view/webgl/system/model/ObjectQuery"),l=a("tdv/player/view/webgl/system/model/ProjectionQuery"),p=a("tdv/player/view/webgl/system/util/entity/Util"),q=a("tdv/player/view/webgl/components"),r=a("tdv/player/view/util/Device"),t=a("tdv/player/view/util/FileType");a("tdv/player/view/util/URL");m.prototype.y_a=
function(u){return t.is(u,t.yta)?new k(this.A):t.is(u,t.HWa)?new e:new g(this.B)};m.prototype.Q2a=function(u){var v=u.get("levels");if(!w&&r.ub())var w=(w=v.find(function(x){return x.get("tags").indexOf(n.E_)>-1}))&&w.get("url");w||v.length&&(w=v[0].get("url"));w||(w=u.get("url"));return w};m.prototype.update=function(){};m.prototype.frame=function(){this.pd.type===e.TYPE?this.jbb():this.pd.type===g.TYPE?this.zab():this.pd.type===k.TYPE&&this.Aab()};m.prototype.jbb=function(){var u=p.Sf(this.B),v=
u&&p.uw(u);v&&(this.pd.setCamera(v),this.pd.setSize(p.vX(u),p.dE(u)),this.pd.update())};m.prototype.zab=function(){this.pd.update()};m.prototype.Aab=function(){this.pd.update()};m.prototype.tXa=function(){this.pd.bind(h.INIT,this.FBa,this,!0);this.pd.bind(h.ia,this.Pe,this,!0);this.pd.bind(h.$c,this.yh,this,!0);this.pd.bind(h.xc,this.Gj,this,!0);this.pd.bind(h.V,this.YBa,this,!0)};m.prototype.e7a=function(){this.pd.h(h.INIT,this.FBa,this);this.pd.h(h.ia,this.Pe,this);this.pd.h(h.$c,this.yh,this);
this.pd.h(h.xc,this.Gj,this);this.pd.h(h.V,this.YBa,this)};m.prototype.FBa=function(){this.La=this.pd.soa();this.lq.N(q.Object3D).sa=this.La;var u=this.pd.type==g.TYPE,v=this.pd.type==k.TYPE;this.$Xa(this.La,u||v);v=this.B.O(q.Pi,!0);v.Loa=u?this.pd.Wm:null;this.B.O(q.Animation,!0).properties=v.properties};m.prototype.Pe=function(){this.A.set("geometryQuery",new c(this.La));this.A.set("objectQuery",new f(this.B,this.La));this.A.set("projectionQuery",new l(this.B,this.A.get("objectQuery"),this.A.get("geometryQuery")));
this.pd.type==k.TYPE&&this.A.set("metadataQuery",new d(this.pd.fE));this.P5();this.B.O(q.gi)};m.prototype.Gj=function(u){this.Fe.o(h.xc,u.data)};m.prototype.yh=function(){this.Fe.o(h.$c)};m.prototype.YBa=function(){this.B.O(q.Object3D,!0)};m.prototype.P5=function(){this.A.set("isLoaded",!0);this.Fe.o(h.ia)};m.prototype.$Xa=function(u,v){u.userData.id===void 0&&(u.userData.id="root");if(v!==!1){u.userData.OO=new Map;for(var w=[u];w.length;){var x=w.shift();v=[];x.children&&(v=v.concat(x.children));
x.isSkinnedMesh&&(v=v.concat(x.skeleton.bones));v.forEach(function(y,z){y.userData.id===void 0&&(y.userData.id=x.userData.id+"/"+z);u.userData.OO.has(y.userData.id)||(u.userData.OO.set(y.userData.id,y),w.push(y))})}}};m.prototype.dispose=function(){this.La&&(this.pd.type!=k.TYPE&&this.La.traverse(function(u){function v(y){y&&w.indexOf(y)<0&&w.push(y)}var w=[];v(u.material);v(u.userData.Pt);if(u.userData.lF)for(var x in u.userData.lF)v(u.userData.lF[x]);w.forEach(function(y){y.dispose();Object.keys(y).forEach(function(z){(z=
y[z])&&typeof z==="object"&&"minFilter"in z&&z.dispose()})});u.geometry&&u.geometry.userData.QIa&&u.geometry.disposeBoundsTree();u.geometry&&u.geometry.dispose()}),this.La=null,this.lq.ka(q.Object3D));this.pd&&(this.e7a(),this.pd.dispose(),this.pd=null);this.Fe&&(this.sf.aQ(this.Fe),this.Lj.aQ(this.Fe),this.sf=this.Fe=null);this.A&&(this.A.set("geometryQuery",null),this.A.set("objectQuery",null),this.A.set("isLoaded",!1),this.A=null)};return m});
define("tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(r,t,u){this.Vb=r;this.B=t;this.R=u;this.Tl=this.Tl.bind(this);this.zh=this.zh.bind(this);this.iz=this.iz.bind(this);this.Re=null;this.ha=!1;this.v4=[1,1,1,1,1,1];this.zy=[];this.ah=[this.oO=
this.ds(),this.nO=this.ds(),this.qO=this.ds(),this.pO=this.ds(),this.sO=this.ds(),this.rO=this.ds()];this.ah.forEach(function(v){v=v.O(e.xd);v.opacity=.5;v.depthTest=!1}.bind(this));h.ba(this.R,l,this.zh,!0);h.ba(this.R,p,this.Tl,!0);h.ba(this.R,q,this.iz,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),k=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.frame=
function(){if(this.ha&&(this.S8a(this.ah.map(function(B){return b.wJ(B)||1})),this.Re)){var r=b.Rc(this.B),t=b.Rc(this.qM(this.Re));if(r&&t){d.copy(r.matrixWorld).invert();c.setFromMatrixPosition(t.matrixWorld).applyMatrix4(d);r=this.R.get("x");t=this.R.get("y");var u=this.R.get("z"),v=this.R.get("width"),w=this.R.get("height"),x=this.R.get("depth"),y=0,z=0,A=0,D=0,F=0,C=0;switch(this.Re){case this.oO:D=c.x-v*.5;y=D*.5;break;case this.nO:D=-c.x-v*.5;y=-D*.5;break;case this.qO:F=c.y-w*.5;z=F*.5;break;
case this.pO:F=-c.y-w*.5;z=-F*.5;break;case this.sO:C=c.z-x*.5;A=C*.5;break;case this.rO:C=-c.z-x*.5,A=-C*.5}this.R.set("x",r+y);this.R.set("width",v+D);this.R.set("y",t+z);this.R.set("height",w+F);this.R.set("z",u+A);this.R.set("depth",x+C)}}};var c=new THREE.Vector3,d=new THREE.Matrix4;m.prototype.ds=function(){var r=this.Vb.T.sc("DraggingSphere");this.zy.push(r);r.N(e.Mesh).renderOrder=g.CUa;r.N(e.Geometry).geometry=new THREE.SphereGeometry;r.N(e.xd);return r};m.prototype.zh=function(){this.oO.O(e.xd).color=
this.R.get("draggableXControlsColor");this.nO.O(e.xd).color=this.R.get("draggableXControlsColor");this.qO.O(e.xd).color=this.R.get("draggableYControlsColor");this.pO.O(e.xd).color=this.R.get("draggableYControlsColor");this.sO.O(e.xd).color=this.R.get("draggableZControlsColor");this.rO.O(e.xd).color=this.R.get("draggableZControlsColor");var r=this.R.get("draggableSphereRadius");this.ah.forEach(function(t,u){t.O(e.ta,!0).scale=r*this.v4[u]}.bind(this))};m.prototype.Tl=function(){this.oO.O(e.ta,!0).positionX=
this.R.get("width")/2;this.nO.O(e.ta,!0).positionX=-this.R.get("width")/2;this.qO.O(e.ta,!0).positionY=this.R.get("height")/2;this.pO.O(e.ta,!0).positionY=-this.R.get("height")/2;this.sO.O(e.ta,!0).positionZ=this.R.get("depth")/2;this.rO.O(e.ta,!0).positionZ=-this.R.get("depth")/2};m.prototype.iz=function(){var r=this.R.get("sizeDraggable");this.ha!=r&&(this.ha=r,this.ah.forEach(function(t){r?(t.N(e.pb).F=this.B,this.ah.forEach(function(u){u=u.N(e.wd);u.Yt=!0;u.nt=!0;u.M=new k;u.M.bind(n.uc,this.VM,
this,!0);u.M.bind(n.Eb,this.lia,this,!0);u.M.bind(n.Sa,this.jia,this,!0);u.M.bind(n.$a,this.kia,this,!0)}.bind(this))):(t.ka(e.pb),this.ah.forEach(function(u){u.ka(e.wd)}.bind(this)))}.bind(this)))};m.prototype.S8a=function(r){for(var t=!1,u=0;u<this.v4.length&&!t;u++)t=this.v4[u]!=r[u];t&&(this.v4=r,this.zh())};m.prototype.VM=function(r){(r=this.Fy(r))&&r!=this.Re&&(r.O(e.xd).opacity=1)};m.prototype.lia=function(r){(r=this.Fy(r))&&r!=this.Re&&(r.O(e.xd).opacity=.5)};m.prototype.Fy=function(r){r=
this.ah.map(function(t){return t.getComponent(e.wd).M}).indexOf(r.source);return r==-1?null:this.ah[r]};m.prototype.jia=function(r){r=this.Fy(r);this.mV(r)};m.prototype.kia=function(r){r=this.Fy(r);r==this.Re&&(this.mV(null),this.Tl(),(r=this.ah.indexOf(r)!=-1)&&this.R.o(n.Mm),r&&this.R.o(n.Bua))};m.prototype.mV=function(r){this.Re&&(this.Re.O(e.xd).opacity=.5,this.qM(this.Re).ka(e.vx));if(this.Re=r)this.Re.O(e.xd).opacity=1,r=this.qM(this.Re).N(e.vx),r.direction=this.J1a(this.Re),r.min=this.K1a(this.Re)};
m.prototype.J1a=function(r){var t=b.getWorldPosition(this.B);return b.getWorldPosition(r).sub(t)};m.prototype.qM=function(r){return this.ah.indexOf(r)!=-1?r:null};m.prototype.K1a=function(r){var t=this.m2a(r);if(t){t=b.getWorldPosition(t);var u=b.getWorldPosition(r).sub(t);switch(r){case this.oO:case this.nO:var v=this.R.get("minWidth");break;case this.qO:case this.pO:v=this.R.get("minHeight");break;case this.sO:case this.rO:v=this.R.get("minDepth")}return t.add(u.setLength(v||f))}};m.prototype.m2a=
function(r){switch(r){case this.oO:return this.nO;case this.nO:return this.oO;case this.qO:return this.pO;case this.pO:return this.qO;case this.sO:return this.rO;case this.rO:return this.sO}return null};m.prototype.dispose=function(){h.da(this.R,l,this.zh);h.da(this.R,p,this.Tl);h.da(this.R,q,this.iz);var r=this.Vb.T;this.zy.forEach(function(t){r.dd(t)});this.R=this.Vb=this.ah=this.B=this.zy=null};var f=1E-6,l=["draggableSphereRadius","draggableXControlsColor","draggableYControlsColor","draggableZControlsColor"],
p="depth height x y z width".split(" "),q=["sizeDraggable"];return m});
define("tdv/player/view/webgl/system/model/object/BoxController","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls".split(" "),function(a){function m(f,l,p){this.Vb=f;this.R=p;this.Tl=this.Tl.bind(this);this.zh=this.zh.bind(this);this.jz=this.jz.bind(this);this.B=this.YZa();f=this.B.N(k.pb);f.F=this.Vb;f.id=this.R.get("parentId");this.Su=this.bea();this.Su.N(k.pb).F=
this.B;this.fS=this.l_a();this.fS.N(k.pb).F=this.B;this.zy=[this.B,this.Su,this.fS];this.Vea=new e(this.Vb,this.B,this.R);f=this.B.N(k.wd);f.nt=!0;f.Yt=!0;f.M=this.R;h.ba(this.R,b,this.zh,!0);h.ba(this.R,c,this.Tl,!0);h.ba(this.R,d,this.jz,!0);this.R.o(n.od)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls");m.prototype.frame=
function(){this.Vea.frame()};m.prototype.YZa=function(){var f=this.Vb.T.sc("Box");f.N(k.Group);return f};m.prototype.bea=function(){var f=this.Vb.T.sc("BoxBorder");f.N(k.Line);f.N(k.Geometry).geometry=this.ZZa();f.N(k.ei);return f};m.prototype.l_a=function(){var f=this.Vb.T.sc("BoxFace");f.N(k.Mesh);var l=f.N(k.gi);l.castShadow=!1;l.receiveShadow=!1;f.N(k.Geometry).geometry=new THREE.BoxGeometry(1,1,1);f.N(k.xd);return f};m.prototype.ZZa=function(){var f=[new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(.5,
-.5,.5),new THREE.Vector3(.5,-.5,.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(.5,.5,-.5),new THREE.Vector3(.5,.5,-.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(.5,
-.5,.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(.5,.5,-.5)];return(new THREE.BufferGeometry).setFromPoints(f)};m.prototype.zh=function(){var f=this.Su.O(k.ei);f.color=this.R.get("lineColor");f.opacity=this.R.get("lineOpacity");f.width=this.R.get("lineWidth");f.depthTest=this.R.get("depthTest");f=this.fS.O(k.xd);f.color=this.R.get("faceColor");f.opacity=this.R.get("faceOpacity");f.depthTest=this.R.get("depthTest");
f=this.B.O(k.wd,!0);f.qB=this.R.get("useHandCursor");f.hF=this.R.get("transparentAreaActive")};m.prototype.Tl=function(){var f=this.B.O(k.ta,!0);f.positionX=this.R.get("x");f.positionY=this.R.get("y");f.positionZ=this.R.get("z");f=this.Su.O(k.ta,!0);var l=this.fS.O(k.ta,!0);l.Le=f.Le=this.R.get("width");l.Ye=f.Ye=this.R.get("height");l.Gh=f.Gh=this.R.get("depth")};m.prototype.jz=function(){if(this.R.get("positionDraggable")){var f=this.B.O(k.Hh,!0);f.M||(f.M=new g,f.M.bind(n.V,this.Am,this,!0));f.translate=
this.R.get("positionDraggable")||!1;f.rotate=!1;f.scale=!1}else(f=this.B.getComponent(k.Hh))&&f.M.h(n.V,this.Am,this),this.B.ka(k.Hh)};m.prototype.Am=function(f){this.R.set({x:f.data.position.x,y:f.data.position.y,z:f.data.position.z});this.R.o(n.Mm)};m.prototype.dispose=function(){this.Vea.dispose();this.Vea=null;h.da(this.R,d,this.jz);h.da(this.R,b,this.zh);h.da(this.R,c,this.Tl);var f=this.Vb.T;this.zy.forEach(function(l){f.dd(l)});this.Vb=this.fS=this.Su=this.B=this.zy=null;this.R.o(n.jd);this.R=
null};var b=["transparentAreaActive","useHandCursor"],c="depth height x y z width".split(" "),d=["positionDraggable"];return m});
define("tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(x,y,z){this.Vb=x;this.B=y;this.R=z;this.UH=this.UH.bind(this);this.zh=this.zh.bind(this);this.iz=this.iz.bind(this);this.Re=null;this.ha=!1;this.K_=this.Av=1;this.Vu=this.Vb.T.sc("DraggingSize2DContainer");
this.Vu.N(e.Group);this.Vu.N(e.ta);this.ah=[this.Cha=this.ds(),this.vha=this.ds(),this.fka=this.ds(),this.Kja=this.ds()];this.ah.forEach(function(A){A.N(e.ta);A=A.O(e.xd);A.color="#ffffff";A.opacity=.5;A.depthTest=!1}.bind(this));this.Su=this.bea();this.zy=[this.Vu,this.Su].concat(this.ah);[this.Su].concat(this.ah).forEach(function(A){A.N(e.pb).F=this.Vu}.bind(this));h.ba(this.R,v,this.UH,!0);h.ba(this.R,u,this.zh,!0);h.ba(this.R,w,this.iz,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),
g=a("tdv/constants/RenderOrder"),k=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util"),c=new THREE.Matrix4,d=new THREE.Vector3,f=new THREE.Vector3,l=new THREE.Quaternion,p=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Euler,t=180/Math.PI;m.prototype.frame=function(){if(this.ha){var x=b.Rc(this.Vu),y=x&&b.sX(x),z=y&&b.uw(y);if(z){if(this.Re){var A=b.vX(y);y=b.dE(y);b.getWorldPosition(this.B,q).project(z);q.x=(q.x+1)*A*.5;
q.y=(1-q.y)*y*.5;b.getWorldPosition(this.Re,p).project(z);p.x=(p.x+1)*A*.5;p.y=(1-p.y)*y*.5;A=this.R.get("anchorX");y=this.R.get("anchorY");var D,F,C=q.x-p.x,B=p.y-q.y,H=-C,E=-B;this.vha===this.Re&&(A>0||y<1)?C>B?D=C/A:F=B/(1-y):this.Kja===this.Re&&(A<1||y<1)?H>B?D=H/(1-A):F=B/(1-y):this.Cha===this.Re&&(A>0||y>0)?C>E?D=C/A:F=E/y:this.fka===this.Re&&(A<1||y>0)&&(H>E?D=H/(1-A):F=E/y);F!==void 0&&D===void 0?D=F*this.Ova:D!==void 0&&F===void 0&&(F=D/this.Ova);D!==void 0&&F!==void 0&&(A=this.R.get("sizeAttenuation")?
this.Av/this.K_:1,this.R.set("width",this.Pa=D*A),this.R.set("height",this.Ha=F*A))}D=this.Vu.getComponent(e.ta);c.copy(x.parent.matrixWorld).invert().multiply(z.matrixWorld).decompose(d,l,f);r.setFromQuaternion(l,D.mf);r.x*=t;r.y*=t;r.z*=t;if(D.Yd!=r.x||D.fd!=r.y||D.Xe!=r.z)D=this.Vu.O(e.ta),D.Yd=r.x,D.fd=r.y,D.Xe=r.z;x.parent.getWorldScale(d);this.K7a(1/Math.max(d.x,d.y,d.z));this.xka(b.wJ(this.Vu)||1)}}};m.prototype.mab=function(x,y){this.Ila!=null&&clearTimeout(this.Ila);this.Ila=setTimeout(function(){this.Ila=
null;if(this.Pa!==x||this.Ha!==y)this.Pa=x,this.Ha=y,this.Ova=this.Pa/this.Ha}.bind(this),100)};m.prototype.ds=function(){var x=this.Vb.T.sc("DraggingSphere");x.N(e.Mesh).renderOrder=g.BUa;x.N(e.Geometry).geometry=new THREE.SphereGeometry;x.N(e.xd);return x};m.prototype.bea=function(){var x=this.Vb.T.sc("BoxBorder");x.N(e.Line);x.N(e.Geometry).geometry=this.J_a();var y=x.N(e.ei);y.color="#0000ff";y.depthTest=!1;y.width=1;return x};m.prototype.J_a=function(){var x=[new THREE.Vector3(-.5,-.5,0),new THREE.Vector3(.5,
-.5,0),new THREE.Vector3(.5,-.5,0),new THREE.Vector3(.5,.5,0),new THREE.Vector3(.5,.5,0),new THREE.Vector3(-.5,.5,0),new THREE.Vector3(-.5,.5,0),new THREE.Vector3(-.5,-.5,0)];return(new THREE.BufferGeometry).setFromPoints(x)};m.prototype.zh=function(){var x=this.Su.O(e.ei);x.color=this.R.get("draggableLineColor");x.opacity=this.R.get("draggableLineOpacity");x.width=this.R.get("draggableLineWidth");this.ah.forEach(function(y){y.O(e.xd).color=this.R.get("draggableSphereColor");y.O(e.ta).scale=this.R.get("draggableSphereRadius")*
this.Av}.bind(this))};m.prototype.xka=function(x){this.Av!=x&&(this.Av=x,this.UH(),this.zh())};m.prototype.K7a=function(x){this.K_!=x&&(this.K_=x,this.UH(),this.zh())};m.prototype.UH=function(){var x=this.R.get("anchorX"),y=this.R.get("anchorY"),z=this.R.get("width"),A=this.R.get("height"),D=this.R.get("sizeAttenuation")?this.K_:this.Av,F=this.Cha.O(e.ta,!0);F.positionX=-x*z*D;F.positionY=y*A*D;F=this.fka.O(e.ta,!0);F.positionX=(1-x)*z*D;F.positionY=y*A*D;F=this.vha.O(e.ta,!0);F.positionX=-x*z*D;
F.positionY=(y-1)*A*D;F=this.Kja.O(e.ta,!0);F.positionX=(1-x)*z*D;F.positionY=(y-1)*A*D;F=this.Su.O(e.ta,!0);F.positionX=(.5-x)*z*D;F.positionY=(y-.5)*A*D;F.Le=z*D;F.Ye=A*D;this.mab(z,A)};m.prototype.iz=function(){var x=this.R.get("sizeDraggable");this.ha!=x&&((this.ha=x)?(this.Vu.N(e.pb).F=this.B,this.ah.forEach(function(y){y=y.N(e.wd);y.Yt=!0;y.nt=!0;y.M=new k;y.M.bind(n.uc,this.VM,this,!0);y.M.bind(n.Eb,this.lia,this,!0);y.M.bind(n.Sa,this.jia,this,!0);y.M.bind(n.$a,this.kia,this,!0)}.bind(this))):
(this.Vu.ka(e.pb),this.ah.forEach(function(y){y.ka(e.wd)}.bind(this))))};m.prototype.VM=function(x){(x=this.Fy(x))&&x!=this.Re&&(x.O(e.xd).opacity=1)};m.prototype.lia=function(x){(x=this.Fy(x))&&x!=this.Re&&(x.O(e.xd).opacity=.5)};m.prototype.jia=function(x){x=this.Fy(x);this.mV(x)};m.prototype.kia=function(x){(x=this.Fy(x))&&x==this.Re&&(this.mV(null),this.UH(),(x=this.ah.indexOf(x)!=-1)&&this.R.o(n.Mm),x&&this.R.o(n.Bua))};m.prototype.Fy=function(x){x=this.ah.map(function(y){return y.getComponent(e.wd).M}).indexOf(x.source);
if(x==-1)return null;x=this.ah[x];return this.S3a(x)?x:null};m.prototype.S3a=function(x){var y=this.R.get("anchorX"),z=this.R.get("anchorY");return this.vha===x&&(y>0||z>0)||this.Kja===x&&(y<1||z>0)||this.Cha===x&&(y>0||z<1)||this.fka===x&&(y<1||z<1)?!0:!1};m.prototype.mV=function(x){this.Re&&(this.Re.O(e.xd).opacity=.5,this.qM(this.Re).ka(e.vx));if(this.Re=x){this.Re.O(e.xd).opacity=1;var y=this.qM(this.Re).N(e.vx),z=b.getWorldPosition(this.B);x=b.getWorldPosition(x);x=(new THREE.Vector3).copy(x).sub(z);
var A=Math.min(x.length(),this.Av*10);z=(new THREE.Vector3).copy(z).add(d.copy(x).setLength(A));y.direction=x;y.min=z}};m.prototype.qM=function(x){return this.ah.indexOf(x)!=-1?x:null};m.prototype.dispose=function(){h.da(this.R,v,this.UH);h.da(this.R,u,this.zh);h.da(this.R,w,this.iz);var x=this.Vb.T;this.zy.forEach(function(y){x.dd(y)});this.R=this.Vb=this.ah=this.B=this.zy=null};var u=["draggableLineColor","draggableLineOpacity","draggableLineWidth","draggableSphereColor","draggableSphereRadius"],
v="anchorX anchorY height sizeAttenuation x y z width".split(" "),w=["sizeDraggable"];return m});
define("tdv/player/view/webgl/system/model/object/SpriteController","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(y,z,A,D,F){this.Vb=y;this.sf=A;this.Lj=D;this.R=F;this.Tl=this.Tl.bind(this);this.aU=this.aU.bind(this);this.zh=
this.zh.bind(this);this.A3=this.A3.bind(this);this.jz=this.jz.bind(this);this.Oh=this.sf.iw(1);this.wwa=new THREE.Vector3;this.i0=new THREE.Euler;this.R.get("preload")&&this.Lj.uO(this.Oh);this.B=this.Vb.T.sc("SpriteContainer");this.B.N(b.Group);y=this.B.N(b.pb);y.F=this.Vb;y.id=this.R.get("parentId");this.XV=this.Vb.T.sc("TranslationSpriteContainer");this.XV.N(b.Group);this.XV.N(b.pb).F=this.B;this.Lv=this.Vb.T.sc("Sprite");this.Lv.N(b.pb).F=this.XV;y=this.Lv.N(b.Oi);y.properties=this.R;y.xw=this.R.get("image");
y.M=this.R;y.Ap=this.Oh;y.isSprite=!0;y.priority=this.R.get("preload")?g.TF:g.Nta;this.Lv.N(b.wd).M=this.R;this.Lv.N(b.AB);this.Lv.N(b.RQ).object=this.R;this.wha=!1;this.Av=1E-4;this.Wy=this.B.T.sc("TranslationLine");this.Wy.N(b.Line);this.Wy.N(b.ei);this.Uea=new c(this.Vb,this.XV,this.R);h.ba(this.R,x,this.jz,!0);h.ba(this.R,t,this.Tl,!0);h.ba(this.R,v,this.aU,!0);h.ba(this.R,w,this.zh,!0);h.ba(this.R,u,this.A3,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),
k=a("tdv/constants/RenderOrder"),e=a("tdv/events/EventDispatcher"),b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls"),d=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.frame=function(){this.Uea.frame();this.xka(d.wJ(this.B)||1E-4)};m.prototype.Tl=function(){this.B.N(b.pb).id!=this.R.get("parentId")&&(this.B.O(b.pb).id=this.R.get("parentId"));var y=this.B.O(b.ta,!0);y.translationX=this.R.get("x");y.translationY=
this.R.get("y");y.Ze=this.R.get("z")};m.prototype.xka=function(y){this.Av!=y&&(this.Av=y,this.R.set("worldPixelScale",d.aMa(this.B)),this.aU())};m.prototype.aU=function(){var y=this.B.O(b.ta,!0),z=this.XV.O(b.ta,!0),A=this.Wy.O(b.ta,!0),D=this.R.get("translationLength");p.set(this.R.get("translationX"),this.R.get("translationY"),this.R.get("translationZ"));D=D!==void 0?D*this.Av:p.length();if(this.wwa.equals(p)){var F=this.i0.x;var C=this.i0.y;var B=this.i0.z}else f.setFromUnitVectors(q,p.normalize()),
C=Math.atan2(p.x,p.z),F=-Math.atan2(p.y,Math.sqrt(p.x*p.x+p.z*p.z)),B=0;z.translationX=0;z.translationX=0;z.translationY=0;z.Ze=D;A.scale=D;y.Yd=F*r;y.fd=C*r;y.Xe=B*r;y.mf="YXZ";this.XGa()};var f=new THREE.Quaternion,l=new THREE.Euler,p=new THREE.Vector3,q=new THREE.Vector3(0,0,1),r=180/Math.PI;m.prototype.zh=function(){var y=this.Lv.O(b.wd,!0);y.qB=this.R.get("useHandCursor");y.hF=this.R.get("transparentAreaActive");y.nt=this.R.get("clickEnabled");y.Yt=this.R.get("rollOverEnabled");y=this.Wy.O(b.ei);
y.color=this.R.get("translationLineColor");y.depthTest=this.R.get("depthTest");y.opacity=this.R.get("hidden")?0:this.R.get("translationLineOpacity");y.transparent=!1;y.width=this.R.get("translationLineWidth");this.XGa();y=this.Wy.O(b.Line,!0);var z=this.Lv.O(b.Sprite,!0);y.renderOrder=z.renderOrder=this.R.get("depthTest")?k.cWa:k.dWa};m.prototype.A3=function(){var y=this.Lv.O(b.Sprite,!0);y.wO=this.R.get("anchorX");y.xO=this.R.get("anchorY");y.width=this.R.get("width");y.height=this.R.get("height");
y.scale=this.R.get("scale");y.sizeAttenuation=this.R.get("sizeAttenuation")};m.prototype.jz=function(){if(this.R.get("positionDraggable")||this.R.get("translationDraggable")){var y=this.B.O(b.Hh,!0);y.M||(y.M=new e,y.M.bind(n.V,this.Am,this,!0));y.translate=this.R.get("positionDraggable")||!1;y.rotate=this.R.get("translationDraggable")||!1;y.scale=!1}else(y=this.B.getComponent(b.Hh))&&y.M.h(n.V,this.Am,this),this.B.ka(b.Hh)};m.prototype.Am=function(y){var z=p.set(this.R.get("translationX"),this.R.get("translationY"),
this.R.get("translationZ")).length();l.setFromQuaternion(y.data.quaternion,this.B.getComponent(b.ta).mf);p.copy(q).setLength(z).applyQuaternion(y.data.quaternion);this.wwa.copy(p);this.i0.copy(l);this.R.set({x:y.data.position.x,y:y.data.position.y,z:y.data.position.z,translationX:p.x,translationY:p.y,translationZ:p.z});this.R.o(n.Mm)};m.prototype.XGa=function(){var y=this.R.get("translationLineVisible")&&this.R.get("translationLineOpacity")>0&&(this.R.get("translationX")!=0||this.R.get("translationY")!=
0||this.R.get("translationZ")!=0);this.wha!=y&&((this.wha=y)?this.Wy.N(b.pb).F=this.B:this.Wy.ka(b.pb))};m.prototype.dispose=function(){this.Uea.dispose();this.Uea=null;h.da(this.R,x,this.jz);h.da(this.R,t,this.Tl);h.da(this.R,v,this.aU);h.da(this.R,w,this.zh);h.da(this.R,u,this.A3);this.sf.aQ(this.Oh);this.Lj.aQ(this.Oh);this.Oh=this.Lj=this.sf=null;var y=this.Vb.T;this.Vb=null;y.dd(this.Lv);this.Lv=null;y.dd(this.Wy);this.Wy=null;y.dd(this.B);this.R=this.B=null};var t=["parentId","x","y","z"],u=
"anchorX anchorY width height scale sizeAttenuation".split(" "),v=["translationX","translationY","translationZ","translationLength"],w="clickEnabled depthTest hidden rollOverEnabled transparentAreaActive translationLineColor translationLineOpacity translationLineVisible translationLineWidth useHandCursor".split(" "),x=["positionDraggable","translationDraggable"];return m});
define("tdv/player/view/webgl/system/model/object/ControllerFactory",["require","tdv/player/parser/ClassInfo","tdv/player/view/webgl/system/model/object/BoxController","tdv/player/view/webgl/system/model/object/SpriteController"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/view/webgl/system/model/object/BoxController"),n=a("tdv/player/view/webgl/system/model/object/SpriteController");return{create:function(g,k,e,b,c){return m.Oa("SpriteModel3DObject",c)?new n(g,k,e,b,c):m.Oa("BoxModel3DObject",
c)?new h(g,k,c):null}}});
define("tdv/player/view/webgl/system/model/Objects",["require","tdv/binding/BindingsHandler","tdv/player/view/util/LoadingGroup","tdv/player/view/webgl/components","tdv/player/view/webgl/system/model/object/ControllerFactory"],function(a){function m(e,b,c,d){this.B=e;this.lq=b;this.sf=c;this.Lj=d;this.WAa=new n(this.Lj.iw(.1));this.VAa=new n(this.sf.iw(.1));this.VH=this.VH.bind(this);this.bA=e.T;this.A=this.B.getComponent(g.Pi).properties;this.La=(e=this.B.getComponent(g.Object3D))&&e.sa;this.fl=
[];this.d3=new Map;h.ba(this.A,["objects.enabled"],this.VH,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/util/LoadingGroup"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/model/object/ControllerFactory");m.prototype.update=function(){var e=this.B.getComponent(g.Object3D);e=e&&e.sa;if(this.La!==e){var b=this.La;this.La=e;this.d6(!!b)}};m.prototype.frame=function(){this.d3.forEach(function(e){e&&e.frame&&e.frame()})};m.prototype.dispose=function(){this.La=
null;h.da(this.A,["objects.enabled"],this.VH);this.$Ea([])};m.prototype.VH=function(){this.d6()};m.prototype.d6=function(e){var b=this.A.get("objects").filter(function(c){return c.get("enabled")});this.$Ea(b,e);this.WAa.update();this.VAa.update()};m.prototype.$Ea=function(e,b){if(this.fl!=e||b)this.fl.forEach(function(c){(b||e.indexOf(c)<0)&&this.h7a(c)}.bind(this)),e.forEach(function(c){(b||this.fl.indexOf(c)<0)&&this.vXa(c)}.bind(this)),this.fl=e};m.prototype.vXa=function(e){this.d3.set(e,k.create(this.B,
this.lq,this.VAa,this.WAa,e))};m.prototype.h7a=function(e){var b=this.d3.get(e);b&&b.dispose();this.d3["delete"](e)};return m});
define("tdv/player/view/webgl/system/model/Properties",["require","tdv/constants/EventName","tdv/player/view/webgl/components"],function(a){function m(e,b){this.B=e;this.lq=b;this.pi=this.La=this.A=null;this.Oj(this.B.getComponent(n.Pi).properties);this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components");m.prototype.frame=function(){this.update()};m.prototype.update=function(){var e=this.lq.getComponent(n.Object3D);e=e&&e.sa;this.La!=e&&(this.La=e,this.qG())};m.prototype.Oj=
function(e){this.A&&g.forEach(function(b){this.A.h(h.L(b),this.qG,this,!1)}.bind(this));if(this.A=e)g.forEach(function(b){this.A.bind(h.L(b),this.qG,this,!1)}.bind(this)),this.qG()};m.prototype.qG=function(){this.ZEa(this.A.get("model"));this.La&&this.B.T.Qa()};m.prototype.ZEa=function(e){this.pi!=e&&(this.pi&&k.forEach(function(b){this.pi.h(h.L(b),this.jda,this,!1)}.bind(this)),this.pi=e)&&(k.forEach(function(b){this.pi.bind(h.L(b),this.jda,this,!1)}.bind(this)),this.jda())};m.prototype.jda=function(){var e=
this.lq.O(n.ta,!0);e.positionX=this.pi.get("positionX");e.positionY=this.pi.get("positionY");e.positionZ=this.pi.get("positionZ");e.mf=this.pi.get("rotationOrder");e.Yd=this.pi.get("rotationX");e.fd=this.pi.get("rotationY");e.Xe=this.pi.get("rotationZ");e.scale=this.pi.get("scale");e.Le=this.pi.get("invertX")?-1:1;e.Ye=this.pi.get("invertY")?-1:1;e.Gh=this.pi.get("invertZ")?-1:1;e.translationX=this.pi.get("translationX");e.translationY=this.pi.get("translationY");e.Ze=this.pi.get("translationZ")};
m.prototype.dispose=function(){this.La=null;this.ZEa(null);this.Oj(null)};var g=["model"],k="invertX invertY invertZ positionX positionY positionZ rotationOrder rotationX rotationY rotationZ scale translationX translationY translationZ".split(" ");return m});
define("tdv/player/view/webgl/system/model/Behaviour","require tdv/constants/EventName tdv/events/Event tdv/player/view/util/LoadingGroup tdv/player/view/webgl/components tdv/player/view/webgl/system/model/Loader tdv/player/view/webgl/system/model/Objects tdv/player/view/webgl/system/model/Properties".split(" "),function(a){function m(d){this.B=d;this.B.N(k.Group);d=this.B.getComponent(k.Pi);this.lq=d.hJ;this.Lj=new g(d.UPa);this.sf=new g(d.Ap);this.Fe=d.M;this.pd=new e(this.B,this.lq,this.sf,this.Lj);
this.fl=new b(this.B,this.lq,this.sf,this.Lj);this.A=new c(this.B,this.lq)}var h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/view/util/LoadingGroup"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/model/Loader"),b=a("tdv/player/view/webgl/system/model/Objects"),c=a("tdv/player/view/webgl/system/model/Properties");m.prototype.update=function(){this.pd.update();this.fl.update();this.A.update()};m.prototype.frame=function(){this.pd.frame();this.fl.frame();
this.A.frame();this.Fe.o(new n(h.Zd))};m.prototype.dispose=function(){this.pd&&(this.pd.dispose(),this.pd=null);this.fl&&(this.fl.dispose(),this.fl=null);this.A&&(this.A.dispose(),this.A=null);this.sf&&(this.sf.dispose(),this.sf=null);this.Fe=this.lq=null};m.Wa=function(d){d.N(k.Dx).manager=new m(d)};m.ya=function(d){var f=d.getComponent(k.Dx);f.manager.dispose();f.manager=null;d.ka(k.Dx)};m.update=function(d){d.getComponent(k.Dx).manager.update()};m.frame=function(d){d.getComponent(k.Dx).manager.frame()};
return m});
define("tdv/player/view/webgl/system/model/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/model/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/model/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.TNa.v.length&&this.TNa.v.slice().forEach(g.Wa);this.W8.Da.length&&this.W8.Da.slice().forEach(g.update);
this.W8.v.length&&this.W8.v.slice().forEach(g.frame);this.UNa.v.length&&this.UNa.v.slice().forEach(g.ya)};a.J={};a.J.TNa=[n.Pi,n.Dx.aa];a.J.W8=[n.Pi,n.Dx];a.J.UNa=[n.Pi.aa,n.Dx];return a});
define("tdv/player/view/webgl/system/objectId/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(g){this.B=g;this.Ie=null}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.frame=function(){if(!this.Ie){var g=this.B.getComponent(h.hL),k=n.Rc(g.container);if(this.Ie=k&&g.id&&n.ZD(k,g.id)||null)this.B.N(h.Object3D).sa=this.Ie,this.B.T.Qa()}};m.prototype.update=function(){this.Ie&&
(this.B.ka(h.Object3D),this.Ie=null)};m.prototype.dispose=function(){this.Ie&&(this.B.ka(h.Object3D),this.Ie=null)};m.Wa=function(g){g.N(h.Ex).manager=new m(g)};m.ya=function(g){var k=g.getComponent(h.Ex);k.manager.dispose();k.manager=null;g.ka(h.Ex)};m.frame=function(g){g.getComponent(h.Ex).manager.frame()};m.update=function(g){g.getComponent(h.Ex).manager.update()};return m});
define("tdv/player/view/webgl/system/objectId/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/objectId/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/objectId/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.mOa.v.length&&this.mOa.v.slice().forEach(g.Wa);this.c9.Da.length&&
this.c9.Da.slice().forEach(g.update);this.c9.v.length&&this.c9.v.slice().forEach(g.frame);this.nOa.v.length&&this.nOa.v.slice().forEach(g.ya)};a.J={};a.J.mOa=[n.hL,n.Ex.aa];a.J.c9=[n.hL,n.Ex];a.J.nOa=[n.hL.aa,n.Ex];return a});
define("tdv/player/view/webgl/system/plane/System","require exports three.mod tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/material/Util".split(" "),function(a,m,h,n,g,k){a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.Ca=c.Ca.bind(c);return c}P(b,e);b.prototype.Yc=function(){this.GE.v.length&&this.GE.v.slice().forEach(this.xb);this.planes.Da.length&&this.planes.Da.slice().forEach(this.ib);this.HPa.v.length&&
this.HPa.v.slice().forEach(this.Ca);this.IPa.v.length&&this.IPa.v.slice().forEach(this.Ca)};b.prototype.xb=function(c){var d=new h.PlaneGeometry;c.N(g.UB).geometry=d;c.N(g.Object3D).sa=new h.Mesh(d);this.ib(c)};b.prototype.ib=function(c){var d=c.N(g.Object3D).sa,f=c.getComponent(g.Material).material;f&&k.ND(d,f);d.renderOrder=c.getComponent(g.Plane).renderOrder};b.prototype.Ca=function(c){var d=c.getComponent(g.UB);d.geometry.dispose();d.geometry=null;c.ka(g.UB);c.ka(g.Object3D)};b.J={};return b}(n);
a.J={};a.J.GE=[g.Material,g.Plane,g.UB.aa];a.J.planes=[g.Plane,g.Material,g.UB];a.J.HPa=[g.Plane.aa,g.UB];a.J.IPa=[g.Material.aa,g.UB];return a});
define("tdv/player/view/webgl/system/parent/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var m=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util");return{Wa:function(n){var g=n.getComponent(m.pb),k=h.Rc(g.F);if(k){var e=n.N(m.Eu);e.parent=k;g.id&&(k=k&&h.ZD(k,g.id));e.id=g.id;e.ge=h.Rc(n);e.attach=g.attach;k&&e.ge&&(e.attach?k.attach(e.ge):k.add(e.ge))}},update:function(n){var g=n.getComponent(m.pb),
k=n.getComponent(m.Eu),e=h.Rc(g.F),b=h.Rc(n);if(k.parent!=e||k.ge!=b||g.id!=k.id||g.attach!=k.attach||b&&e&&!b.parent)k=n.O(m.Eu),k.ge&&k.ge.parent&&(g.F.O(m.Object3D),k.ge.parent.remove(k.ge)),k.parent=e,g.id&&(e=e&&h.ZD(e,g.id)),k.id=g.id,k.ge=b,k.attach=g.attach,e&&k.ge&&(k.attach?e.attach(k.ge):e.add(k.ge),(g=n.getComponent(m.ta))&&h.fZ(n,g))},ya:function(n){var g=n.getComponent(m.Eu);g.ge&&g.ge.parent&&g.ge.parent.remove(g.ge);g.parent=null;g.ge=null;g.id=void 0;n.ka(m.Eu)}}});
define("tdv/player/view/webgl/system/parent/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/parent/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/parent/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.gY.v.length&&this.gY.v.slice().forEach(g.Wa);this.Lt.v.length&&
this.Lt.v.slice().forEach(g.update);this.Lt.Da.length&&this.Lt.Da.slice().forEach(g.update);this.Lt.fe.length&&this.Lt.fe.slice().forEach(g.update);this.gJa.v.length&&this.gJa.v.slice().forEach(g.ya);this.hJa.v.length&&this.hJa.v.slice().forEach(g.ya)};a.J={};a.J.gY=[n.Object3D,n.pb,n.Eu.aa];a.J.Lt=[n.Object3D,n.pb,n.Eu];a.J.gJa=[n.Object3D.aa,n.pb,n.Eu];a.J.hJa=[n.pb.aa,n.Eu];return a});
define("tdv/player/view/webgl/system/pixelScaleTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(h,function(){h.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.gg=this.gg.bind(this)});
a.prototype.Yc=function(){this.EPa.v.length&&this.EPa.v.slice().forEach(this.xb);this.DPa.v.length&&this.DPa.v.slice().forEach(this.gg);this.FPa.v.length&&this.FPa.v.slice().forEach(this.Ca);this.GPa.v.length&&this.GPa.v.slice().forEach(this.Ca)};a.prototype.xb=function(b){b.N(n.ZF)};a.prototype.Ca=function(b){b.ka(n.ZF)};var k=new THREE.Matrix4,e=new THREE.Vector3;a.prototype.gg=function(b){var c=b.getComponent(n.Tk),d=b.getComponent(n.ta);if(d){var f=b.getComponent(n.Object3D).sa;if(f&&f.parent){var l=
b.getComponent(n.Gg),p=1E-7;l&&(p=g.wJ(b)||p);k.copy(f.parent.matrixWorld).invert();e.setFromMatrixScale(k);f=Math.max(e.x,e.y,e.z);l&&l.cA&&(p/=f,f=1);l=c.scale*f;c.nE!==void 0&&(l=Math.min(c.nE*p,l));c.oE!==void 0&&(l=Math.max(c.oE*p,l));if(d.scale!=l||d.Le!=c.Le||d.Ye!=c.Ye||d.Gh!=c.Gh)d=b.O(n.ta),d.scale=l,d.Le=c.Le,d.Ye=c.Ye,d.Gh=c.Gh}}};a.J={};a.J.EPa=[n.Object3D,n.Tk,n.ZF.aa];a.J.DPa=[n.Object3D,n.Tk,n.ZF];a.J.FPa=[n.Object3D.aa,n.ZF];a.J.GPa=[n.Tk.aa,n.ZF];return a});
define("tdv/player/view/webgl/system/pointerOverTransform/Behaviour",["require","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(u){this.B=u;this.CT=new THREE.Vector3;this.Wb=new THREE.Vector3;this.Kga=this.Cd=this.rla=!1;this.oN=null;this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){this.Pia=this.B.getComponent(n.El).F};
m.prototype.frame=function(){this.eHa();this.aA()};m.prototype.eHa=function(){var u=(t.get(this.B.T)||[]).map(function(v){return v.getComponent(n.yc)}).filter(function(v){return v&&v.M}).reduce(function(v,w){return!v||!v.Ug&&w.Ug?w:v},null);u=u&&u.M;this.oN!==u&&(this.oN&&this.l7a(this.oN),(this.oN=u)&&this.AXa(this.oN))};m.prototype.AXa=function(u){u.bind(h.gb,this.tg,this,!0);u.bind(h.Eb,this.Fs,this,!0)};m.prototype.l7a=function(u){u.h(h.gb,this.tg,this);u.h(h.Eb,this.Fs,this)};m.prototype.tg=
function(u){if(this.Pia&&g.ZD(g.Rc(this.Pia),u.data.objectId)&&["mesh","gs"].includes(u.data.type)){var v=this.Cd;this.Cd=!0;var w=g.Rc(this.B);if((w=w&&w.parent)&&w.matrixWorld){var x=this.B.getComponent(n.El);x&&(e.setFromMatrixPosition(w.matrixWorld),b.copy(w.matrixWorld).invert(),c.fromArray(u.data.objectMatrixWorld),k.setFromMatrixPosition(c),d.copy(c).invert(),x.rotate?u.data.normal?this.CT.copy(u.data.normal).applyMatrix4(c).sub(k).add(e):this.CT.copy(u.data.cameraPosition):this.CT.copy(p),
this.CT.applyMatrix4(b).normalize(),this.Wb.copy(u.data.position).applyMatrix4(b),this.rla=!0,this.B.T.Qa(),v||(u=(x=this.B.getComponent(n.El))&&x.M)&&u.o(h.uc))}}else this.Fs()};var k=new THREE.Vector3,e=new THREE.Vector3,b=new THREE.Matrix4,c=new THREE.Matrix4,d=new THREE.Matrix4;m.prototype.Fs=function(){if(this.Cd){this.Cd=!1;this.B.T.Qa();var u=this.B.getComponent(n.El);(u=u&&u.M)&&u.o(h.Eb)}};m.prototype.aA=function(){if(this.rla||this.Cd){this.rla=!1;var u=this.B.O(n.ta,!0);u.positionX=0;u.positionY=
0;u.positionZ=0;f.setFromUnitVectors(l,this.CT);q.setFromQuaternion(f,u.mf);u.Yd=q.x*r;u.fd=q.y*r;u.Xe=q.z*r;u.translationX=this.Wb.x;u.translationY=this.Wb.y;u.Ze=this.Wb.z;u.easing=this.Kga?.4:0;this.Kga||(g.fZ(this.B,u),this.Kga=!0)}};var f=new THREE.Quaternion,l=new THREE.Vector3(0,0,1),p=new THREE.Vector3(0,1,0),q=new THREE.Euler,r=180/Math.PI;m.prototype.dispose=function(){this.Pia=null;this.eHa()};m.tK=function(u,v){t.set(u,v)};var t=new Map;m.Wa=function(u){u.N(n.Fu).manager=new m(u)};m.ya=
function(u){var v=u.getComponent(n.Fu);v.manager.dispose();v.manager=null;u.ka(n.Fu)};m.frame=function(u){u.getComponent(n.Fu).manager.frame()};m.update=function(u){u.getComponent(n.Fu).manager.update()};return m});
define("tdv/player/view/webgl/system/pointerOverTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/pointerOverTransform/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/pointerOverTransform/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){g.tK(this.T,this.Wj.v.slice());
this.LPa.v.length&&this.LPa.v.slice().forEach(g.Wa);this.R9.Da.length&&this.R9.v.slice().forEach(g.update);this.R9.v.length&&this.R9.v.slice().forEach(g.frame);this.MPa.v.length&&this.MPa.v.slice().forEach(g.ya);this.NPa.v.length&&this.NPa.v.slice().forEach(g.ya)};a.J={};a.J.Wj=[n.yc];a.J.LPa=[n.Object3D,n.El,n.Fu.aa];a.J.R9=[n.Object3D,n.El,n.Fu];a.J.MPa=[n.Object3D.aa,n.Fu];a.J.NPa=[n.El.aa,n.Fu];return a});
define("tdv/player/view/webgl/system/util/material/ProjectedMaterial",["require"],function(){var a={Rp:function(){this.omb=this.dSa=this.nmb=this.T$=this.S$=this.R$=0;this.Ura=!1;this.sZ=new THREE.CubeTexture;this.Lmb=this.ASa=this.Kmb=this.daa=this.targetY=this.targetX=this.Q$=0;this.bsa=!1;this.AZ=new THREE.CubeTexture;this.caa=0;this.mf="XYZ"},Spb:function(){return new a.Rp},create:function(n){var g=new THREE.ShaderMaterial;g.uniforms={sCube:{value:n.sZ},sPos:{value:new THREE.Vector3},sRot:{value:new THREE.Matrix4},
sEnabled:{value:!1},sCoef:{value:0},tCube:{value:n.AZ},tPos:{value:new THREE.Vector3},tRot:{value:new THREE.Matrix4},tEnabled:{value:!1},tCoef:{value:0}};g.fragmentShader="uniform samplerCube sCube;\nuniform vec3 sPos;\nuniform mat4 sRot;\nuniform bool sEnabled;\nuniform float sCoef;\nuniform samplerCube tCube;\nuniform vec3 tPos;\nuniform mat4 tRot;\nuniform bool tEnabled;\nuniform float tCoef;\nvarying vec3 vWorldPosition;\nvoid main() {\n    vec4 sFragColor;\n    vec4 tFragColor;\n    if (sEnabled) \n    {\n        vec4 sCubePosition4 = sRot * vec4((vWorldPosition - sPos), 1);\n        vec3 sCubePosition = sCubePosition4.xyz / sCubePosition4.w;\n        sFragColor = textureCube(sCube, sCubePosition);\n    }\n    if (tEnabled)\n    {\n        vec4 tCubePosition4 = tRot * vec4((vWorldPosition - tPos), 1);\n        vec3 tCubePosition = tCubePosition4.xyz / tCubePosition4.w;\n        tFragColor = textureCube(tCube, tCubePosition);\n    }\n    if (sEnabled && tEnabled)\n    {\n        float alpha = 1.0 - ((1.0 - tCoef) * (1.0 - sCoef));\n        vec4 mixedColor = mix(sFragColor, tFragColor, tCoef);\n        gl_FragColor = vec4(mixedColor.rgb, mixedColor.a * alpha);\n    }\n    else if (sEnabled)\n    {\n        gl_FragColor = vec4(sFragColor.rgb, sFragColor.a * sCoef);\n    }\n    else if (tEnabled)\n    {\n        gl_FragColor = vec4(tFragColor.rgb, tFragColor.a * tCoef);\n    }\n    else\n    {\n        gl_FragColor = vec4(0, 0, 0, 0);\n    }\n#include <tonemapping_fragment>\n#include <colorspace_fragment>\n}";
g.vertexShader="varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n   gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";g.side=THREE.DoubleSide;g.depthWrite=!0;g.transparent=!0;g.needsUpdate=!0;this.update(g,n);return g},update:function(n,g){n.uniforms.sCube.value=g.sZ;n.uniforms.sPos.value.set(g.R$,g.S$,g.T$);n.uniforms.sRot.value.makeRotationFromEuler(m.set(g.nmb*h,g.dSa*h,g.omb*h,g.mf));n.uniforms.sEnabled.value=
g.Ura&&g.Q$>0;n.uniforms.sCoef.value=g.Q$;n.uniforms.tCube.value=g.AZ;n.uniforms.tPos.value.set(g.targetX,g.targetY,g.daa);n.uniforms.tRot.value.makeRotationFromEuler(m.set(g.Kmb*h,g.ASa*h,g.Lmb*h,g.mf));n.uniforms.tEnabled.value=g.bsa&&g.caa>0;n.uniforms.tCoef.value=g.caa;n.needsUpdate=!0;return n}},m=new THREE.Euler,h=Math.PI/180;return a});
define("tdv/player/view/webgl/system/projectedMaterial/System","require tdv/utils tdv/constants/RenderOrder tdv/player/view/util/geo/Fov tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/material/ProjectedMaterial tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/RenderOrder");a("tdv/player/view/util/geo/Fov");var n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),
k=a("tdv/player/view/webgl/system/util/material/ProjectedMaterial"),e=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(n,function(){n.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.ib=this.ib.bind(this)});a.prototype.Yc=function(){this.cQa.v.length&&this.cQa.v.slice().forEach(this.Ca);this.dQa.v.length&&this.dQa.v.slice().forEach(this.Ca);this.bQa.v.length&&this.bQa.v.slice().forEach(this.xb);this.aQa.Da.length&&this.aQa.Da.slice().forEach(this.ib)};
a.prototype.xb=function(c){var d=c.getComponent(g.po),f=(d=d&&d.bF)&&e.Rc(d),l=e.Sf(d);if(f&&l){var p=c.N(g.Ur);p.bF=d;p.HP=new k.Rp;p.material=this.my(p.HP);p.sa=this.IZa(f,p.material);p.mQ=this.XZa(p.material);p.NA=this.E_a(p.material);p.colorSpace=e.uX(l);c.N(g.Object3D).sa=p.sa;this.ib(c)}};a.prototype.ib=function(c){this.Qj(c);this.gbb(c);this.fbb(c);this.Mab(c)};a.prototype.Ca=function(c){var d=c.getComponent(g.Ur),f=e.Rc(d.bF);f&&(f.visible=!0);d.sa&&d.sa.traverse(function(l){l.material==d.material&&
(l.material=b)});d.mQ&&((f=d.mQ.parent)&&e.oQa(f,d.mQ),d.mQ=null);d.NA&&((f=d.NA.parent)&&e.nQa(f,d.NA),d.NA=null);d.material&&(d.HP.sZ=null,d.HP.AZ=null,d.HP=null,d.material.dispose(),d.material=null);c.ka(g.Ur);c.ka(g.Object3D)};a.prototype.Qj=function(c){var d=c.getComponent(g.po);c=c.getComponent(g.Ur);var f=c.HP;d.rZ?(f.sZ!=d.rZ&&(f.sZ=d.rZ),f.R$=d.R$,f.S$=d.S$,f.T$=d.T$,f.dSa=d.tZ,f.Q$=d.bSa,f.Ura=!0):(f.Ura=!1,f.Q$=0);d.zZ?(f.AZ!=d.zZ&&(f.AZ=d.zZ),f.targetX=d.targetX,f.targetY=d.targetY,f.daa=
d.daa,f.ASa=d.Mmb,f.caa=d.ySa,f.bsa=!0):(f.bsa=!1,f.caa=0);k.update(c.material,f)};a.prototype.gbb=function(c){c=c.getComponent(g.po);var d=e.Rc(c.bF);d&&(d.visible=(1-(c.rZ?c.bSa:0))*(1-(c.zZ?c.ySa:0))>0)};a.prototype.fbb=function(c){var d=c.getComponent(g.po),f=c.getComponent(g.Ur).mQ;!!f.parent!=d.$Ra&&(c=(c=e.Sf(c)||e.Sf(d.bF))&&e.uw(c),d.$Ra?c&&e.Rbb(c,f):c&&e.oQa(c,f))};a.prototype.Mab=function(c){var d=c.getComponent(g.po),f=c.getComponent(g.Ur).NA;!!f.parent!=d.NA&&(c=(c=e.Sf(c)||e.Sf(d.bF))&&
e.uw(c),d.NA?c&&e.Qbb(c,f):e.nQa(c,f))};var b=new THREE.MeshBasicMaterial;a.prototype.my=function(c){c=k.create(c);c.polygonOffset=!0;c.polygonOffsetUnits=1;c.polygonOffsetFactor=-10;c.needsUpdate=!0;return c};a.prototype.IZa=function(c,d){if(this.bya(c))return new THREE.Object3D;var f=new Map;c.traverse(function(t){if(t.material&&t.userData){var u={};t.material&&(u.material=t.material,t.material=d);t.userData&&(u.userData=t.userData,t.userData={});var v=t.children.filter(function(w){return!this.bya(w)}.bind(this));
t.children.length!=v.length&&(u.children=t.children,t.children=v);f.set(t,u)}}.bind(this));var l=c.clone();f.forEach(function(t,u){t.material&&(u.material=t.material);t.userData&&(u.userData=t.userData);t.children&&(u.children=t.children)});for(c=[[c,l]];c.length;){var p=c.shift(),q=p[0];p=p[1];q.Me&&(p.Me=q.Me);for(var r=0;r<q.children.length;r++)c.push([q.children[r],p.children[r]])}return l};a.prototype.bya=function(c){return c.Aw||c.isGaussianCloud};a.prototype.XZa=function(c){return new THREE.Mesh(new THREE.BoxGeometry(2,
2,2),c)};a.prototype.E_a=function(c){c=new THREE.Mesh(new THREE.PlaneGeometry(1,1),c);c.renderOrder=h.VVa;return c};a.J={};a.J.bQa=[g.po,g.Ur.aa];a.J.aQa=[g.po,g.Object3D,g.Ur];a.J.cQa=[g.po.aa,g.Ur];a.J.dQa=[g.Object3D.aa,g.Ur];return a});
define("tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion",["require","tdv/player/view/webgl/components","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){function m(k){this.B=k;this.enabled=!1;this.Jo=null;this.xy=0;this.passes=[];this.zm=this.Bm=!1;this.Lf=null;this.Ha=this.Pa=100}var h=a("tdv/player/view/webgl/components"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");m.prototype.dispose=function(){this.Lf&&(this.Lf.saoRenderTarget.dispose(),this.Lf.blurIntermediateRenderTarget.dispose(),
this.Lf.beautyRenderTarget.dispose(),this.Lf.normalRenderTarget.dispose(),this.Lf.depthRenderTarget.dispose(),this.Lf.depthMaterial.dispose(),this.Lf.normalMaterial.dispose(),this.Lf.saoMaterial.dispose(),this.Lf.vBlurMaterial.dispose(),this.Lf.hBlurMaterial.dispose(),this.Lf.materialCopy.dispose(),this.Lf.depthCopy.dispose(),this.Lf=null)};m.prototype.update=function(k,e,b,c,d){var f=this.B.getComponent(h.OK),l=!!f;if(this.Bm=this.enabled!=l)(this.enabled=l)?(!this.Lf&&k&&e&&(this.Lf=new THREE.SAOPass(k,
e,!1,!0)),this.Jo=new n("linear",[new g("alpha",0,1,void 0)],f.pKa),this.xy=0,this.passes=[this.Lf],this.zm=!0):(this.passes=[],this.zm=!1);this.enabled&&(this.Jo&&(this.Jo.Nb(d),this.xy=this.Jo.ob("alpha"),this.xy==1&&(this.Jo=null),this.B.T.Qa()),f.output!==null&&(this.Lf.params.output=f.output),this.Lf.params.saoBias=f.bias/f.scale,this.Lf.params.saoIntensity=this.xy*f.intensity,this.Lf.params.saoScale=f.scale,this.Lf.params.saoKernelRadius=f.lNa,this.Lf.params.saoMinResolution=f.PNa/1E3,this.Lf.params.saoBlur=
f.gna>0,this.Lf.params.saoBlurRadius=f.gna,this.Lf.params.saoBlurStdDev=8,this.Lf.params.saoBlurDepthCutoff=.01,(this.Pa!=b||this.Ha!=c)&&this.Lf.setSize(this.Pa=b,this.Ha=c))};return m});
define("tdv/player/view/webgl/system/renderer/effect/Antialias",["require","tdv/player/view/webgl/components"],function(a){function m(n){this.B=n;this.enabled=!1;this.passes=[];this.zm=this.Bm=!1;this.Mu=null}var h=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.Mu&&(this.Mu.material.dispose(),this.Mu=null)};m.prototype.update=function(n,g,k,e){n=this.B.getComponent(h.rF);n=!!n&&n.VKa;if(this.Bm=this.enabled!=n)(this.enabled=n)?(this.Mu||(this.Mu=new THREE.ShaderPass(THREE.FXAAShader),
this.Mu.needsSwap=!0),this.passes=[this.Mu],this.zm=!0):(this.passes=[],this.zm=!1);!this.enabled||this.Pa==k&&this.Ha==e||(this.Pa=k,this.Ha=e,this.Mu.material.uniforms.resolution.value.x=1/this.Pa,this.Mu.material.uniforms.resolution.value.y=1/this.Ha,this.Mu.setSize(k,e))};return m});
define("tdv/player/view/webgl/system/renderer/effect/MotionBlur",["require","tdv/player/view/webgl/components"],function(a){function m(n){this.B=n;this.enabled=!1;this.dQ=void 0;this.Jo=null;this.xy=0;this.passes=[];this.zm=this.Bm=!1;this.$i=null;this.xja=new THREE.Matrix4;this.Aja=new THREE.Matrix4;this.wja=new THREE.Vector3}var h=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.$i&&(this.$i.dispose(),this.$i=null)};m.prototype.update=function(n,g){var k=this.B.getComponent(h.UQ),
e=!!k,b=k?k.EQa:void 0;if(this.Bm=this.enabled!=e||this.dQ!=b)(this.enabled=e)?(this.dQ!=b&&this.$i&&(this.$i.dispose(),this.$i=null),!this.$i&&n&&g&&(this.$i=new THREE.MotionBlurPass(this.dQ=b),this.$i.needsSwap=!0,this.xja.copy(g.matrixWorldInverse),this.Aja.copy(g.projectionMatrix),this.wja.copy(g.position)),this.passes=[this.$i],this.zm=!0):(this.passes=[],this.zm=!1);this.enabled&&(this.$i.uniforms.inverseProjectionMatrix.value.copy(g.projectionMatrix).invert(),this.$i.uniforms.near.value=g.near,
this.$i.uniforms.far.value=g.far,this.$i.uniforms.depthLimit.value=.99,this.$i.uniforms.clipToWorldMatrix.value.copy(g.matrixWorld).multiply(this.$i.uniforms.inverseProjectionMatrix.value),this.$i.uniforms.previousWorldToClipMatrix.value.copy(this.Aja).multiply(this.xja),this.$i.uniforms.cameraMove.value.copy(g.position).sub(this.wja),this.$i.uniforms.velocityFactor.value=k.intensity);this.xja.copy(g.matrixWorldInverse);this.Aja.copy(g.projectionMatrix);this.wja.copy(g.position)};return m});
define("tdv/player/view/webgl/system/renderer/effect/Rendering",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function m(n){this.B=n;this.enabled=!0;this.passes=[];this.Upa=this.zm=this.Bm=!1;this.q5=void 0;this.Ui=this.Rs=this.jm=null}a("tdv/player/view/util/Color");var h=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.jm&&(this.jm.dispose(),this.jm=null);this.Rs&&(this.Rs=null);this.Ui&&(this.Ui.material.dispose(),this.Ui=null)};
m.prototype.update=function(n,g,k,e,b,c){b=this.B.getComponent(h.rF);c=!!b&&b.oSa&&c;if(this.Bm=this.q5!==c)(this.q5=c)?(this.jm||(this.jm=new THREE.SSAARenderPass(n,g),this.jm.sampleLevel=b.uZ,this.jm.needsSwap=!0,this.jm.clear=!0,this.jm.clearColor=65793,this.jm.clearAlpha=0),this.Ui||(this.Ui=new THREE.ShaderPass(THREE.CopyShader),this.Ui.needsSwap=!0),this.passes=[this.jm,this.Ui],this.Upa=this.zm=!0):(this.Rs||(this.Rs=new THREE.RenderPass,this.Rs.clear=!0,this.Rs.clearColor=65793,this.Rs.clearAlpha=
0),this.passes=[this.Rs],this.Upa=this.zm=!1);this.q5?(this.jm.scene=n,this.jm.camera=g,this.jm.sampleLevel=b.uZ,this.Ui.uniforms.opacity.value=Math.pow(2,Math.round(b.uZ>5?5:b.uZ)),this.jm.setSize(k,e)):(this.Rs.scene=n,this.Rs.camera=g,this.Rs.setSize(k,e))};return m});
define("tdv/player/view/webgl/system/renderer/effect/Vignette",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function m(k){this.B=k;this.enabled=!1;this.passes=[];this.zm=this.Bm=!1;this.jt=null;this.Ne=void 0}var h=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.jt&&(this.jt.material.dispose(),this.jt=null)};m.prototype.update=function(){var k=this.B.getComponent(n.nL),e=!!k;if(this.Bm=this.enabled!=
e)(this.enabled=e)?(this.jt||(this.jt=new THREE.ShaderPass(g),this.jt.needsSwap=!0),this.passes=[this.jt],this.zm=!0):(this.passes=[],this.zm=!1);this.enabled&&(this.jt.uniforms.innerRadius.value=k.LMa,this.jt.uniforms.outerRadius.value=k.rPa,this.jt.uniforms.opacity.value=k.opacity,this.Ne!==k.color&&(this.Ne=k.color,this.jt.uniforms.color.value=h.Ip(this.Ne)))};var g={uniforms:{tDiffuse:{value:null},innerRadius:{value:.5},outerRadius:{value:.5},opacity:{value:.5},color:{value:new THREE.Color(0,
0,0)}},vertexShader:"varying vec2 vUv;\nvoid main() {\n    vUv = uv;\n    gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform float innerRadius;\nuniform float outerRadius;\nuniform float opacity;\nuniform vec3 color;\nuniform sampler2D tDiffuse;\nvarying vec2 vUv;\nvoid main() {\n    vec4 texel = texture2D(tDiffuse, vUv);\n    vec2 uv = vUv - vec2(0.5, 0.5);\n    float radius = sqrt(dot(uv, uv)) * 1.4142135623730951;\n    float coef = clamp((radius - innerRadius) / (outerRadius - innerRadius), 0.0, 1.0);\n    float alpha = opacity * coef;\n    float composedAlpha = alpha + texel.a * (1.0 - alpha);\n    if (composedAlpha > 0.0)\n    {\n        vec3 rgb = (color * alpha + texel.rgb * texel.a * (1.0 - alpha)) / composedAlpha;\n        gl_FragColor = vec4(rgb, composedAlpha);\n    }\n    else\n    {\n        gl_FragColor = texel;\n    }\n}"};
return m});
define("tdv/player/view/webgl/system/renderer/ScenePostprocessing","require tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion tdv/player/view/webgl/system/renderer/effect/Antialias tdv/player/view/webgl/system/renderer/effect/MotionBlur tdv/player/view/webgl/system/renderer/effect/Rendering tdv/player/view/webgl/system/renderer/effect/Vignette tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(c){this.ee=c;this.Bb=this.zc=this.pg=null;this.Ha=this.Pa=void 0;
this.UU=null;this.Dea=!0;this.Ui=this.ev=this.j=null;this.Y0=[new k(c),new h(c),new g(c),new e(c),new n(c)];this.c3=!1}var h=a("tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion"),n=a("tdv/player/view/webgl/system/renderer/effect/Antialias"),g=a("tdv/player/view/webgl/system/renderer/effect/MotionBlur"),k=a("tdv/player/view/webgl/system/renderer/effect/Rendering"),e=a("tdv/player/view/webgl/system/renderer/effect/Vignette"),b=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.dispose=
function(){this.j&&(this.j.domElement.style.backgroundColor=void 0);for(;this.Y0.length;)this.Y0.pop().dispose();this.Gea();this.ev&&(this.ev.material.dispose(),this.ev=null);this.Ui&&(this.Ui.material.dispose(),this.Ui=null)};m.prototype.setSize=function(c,d){if(this.Pa!=c||this.Ha!=d)this.Pa=c,this.Ha=d,this.pg&&this.pg.setSize(this.Pa,this.Ha),this.j&&!this.j.xr.isPresenting&&this.j.setSize(this.Pa,this.Ha)};m.prototype.Yw=function(c){this.Bb=c};m.prototype.setCamera=function(c){this.zc=c};m.prototype.setRenderTarget=
function(c){this.UU!=c&&(this.UU=c,this.Gea())};m.prototype.xkb=function(c){this.Dea!=c&&(this.Dea=c,this.pg&&(this.pg.renderToScreen=c))};m.prototype.D$=function(c){this.j!=c&&(this.j=c,this.j.setSize(this.Pa,this.Ha),this.Gea())};m.prototype.render=function(c){this.y9a();this.xab(c);this.j.domElement.style.backgroundColor=this.c3?"#000000":void 0;this.pg.renderTarget1.gNa=!0;this.pg.renderTarget2.gNa=!0;this.pg.render()};m.prototype.y9a=function(){this.pg||(this.pg=new THREE.EffectComposer(this.j,
this.UU||void 0),this.pg.renderToScreen=this.Dea,this.pg.setSize(this.Pa,this.Ha))};m.prototype.xab=function(c){var d=!1,f=!1;this.c3=!1;this.Y0.forEach(function(p){p.update(this.Bb,this.zc,this.Pa,this.Ha,c,this.pg.renderToScreen);d||(d=p.Bm);f||(f=p.zm);this.c3||(this.c3=p.Upa)}.bind(this));f=f&&this.j.outputColorSpace==THREE.SRGBColorSpace&&this.pg.renderToScreen;b.Flb(this.Bb,f);f&&!this.ev?(this.ev=new THREE.ShaderPass(THREE.GammaCorrectionShader),d=this.ev.needsSwap=!0):this.ev&&(this.ev.enabled=
f);this.pg.renderToScreen||this.Ui?this.Ui&&(this.Ui.enabled=!this.pg.renderToScreen):(this.Ui=new THREE.ShaderPass(THREE.CopyShader),d=this.Ui.needsSwap=!0);if(d){var l=[];this.Y0.forEach(function(p){l=l.concat(p.passes)});this.ev&&l.push(this.ev);for(this.Ui&&l.push(this.Ui);this.pg.passes.length>0;)this.pg.removePass(this.pg.passes[this.pg.passes.length-1]);l.forEach(function(p){this.pg.addPass(p)}.bind(this))}};m.prototype.Gea=function(){this.pg&&(this.pg.renderTarget1!=this.UU&&this.pg.renderTarget1.dispose(),
this.pg.renderTarget2!=this.UU&&this.pg.renderTarget2.dispose(),this.pg=null)};return m});
define("tdv/player/view/webgl/system/renderer/SceneRenderer","require tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/Util tdv/player/view/webgl/system/renderer/ScenePostprocessing".split(" "),function(a){function m(l){this.Od=l;this.opacity=0;this.height=this.width=void 0;this.renderTarget=null;this.scene=void 0;this.uEa=!1;this.ika=!0;this.LY=this.camera=void 0;this.oI=!1;this.Q3=void 0;
this.Qc=new b(l);this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/util/entity/Util"),e=a("tdv/player/view/webgl/system/util/Util"),b=a("tdv/player/view/webgl/system/renderer/ScenePostprocessing");m.prototype.update=function(){var l=this.Od.getComponent(g.Scene);this.opacity=l&&l.opacity||0;this.uEa=l?l.locked:!1;this.ika=l?l.enabled:!0;var p=l&&l.scene;this.scene!=p&&(this.scene=p,this.oI=!0,this.Qc.Yw(this.scene));
var q=(p=l&&l.Ea)&&k.mX(p),r=q&&q.width;q=q&&q.height;if(this.width!=r||this.height!=q)this.width=r,this.height=q,this.oI=!0,this.Qc.setSize(this.width,this.height);l=l&&l.outputColorSpace=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.Q3!=l&&(this.Q3=l,this.oI=!0,k.Elb(this.scene,l));l=p&&k.Bt(p);this.camera!=l&&(this.camera=l,this.oI=!0,this.Qc.setCamera(this.camera));p=p&&k.mX(p).camera;this.LY!=p&&(this.LY=p);this.scene&&(k.Dlb(this.scene,this.camera),k.Glb(this.scene,n.isPresenting?
2048:this.width,n.isPresenting?2048:this.height));return this};m.prototype.render=function(l,p,q){if((p||this.oI||!this.uEa)&&this.ika){this.renderTarget||(this.renderTarget=e.UJa(l));p?(l.xr.isPresenting||l.setRenderTarget(null),this.oI=!0):(l.setRenderTarget(this.renderTarget),this.renderTarget.texture.colorSpace=this.Q3,this.oI=!1);l.outputColorSpace=this.Q3;var r=this.Od.getComponent(g.Scene),t=e.YKa(l.domElement);r&&r.O9!==1&&(t*=r.O9);l.getPixelRatio()!=t&&l.setPixelRatio(t);this.Xgb();l.xr.isPresenting?
(l.clear(),l.render(this.scene,this.LY)):(this.Qc.setRenderTarget(this.renderTarget),this.Qc.xkb(p),this.Qc.D$(l),this.Qc.render(q));this.ckb();(r=this.Od.getComponent(g.Scene))&&r.M&&r.M.o(h.Zd)}};m.prototype.Xgb=function(){var l=[],p=[];this.scene.traverse(function(q){q.Aw||q.isGaussianCloud?l.push(q):q.visible&&q.material&&q.material.transparent&&q.material.depthTest&&q.renderOrder<=0&&q.renderOrder>=-100&&q.material.opacity>0&&p.push(q)});c.camera=this.LY;c.ray.origin.setFromMatrixPosition(this.LY.matrixWorld);
c.firstHitOnly=!0;p.forEach(function(q){f.setFromMatrixPosition(q.matrixWorld).sub(c.ray.origin);c.ray.direction.copy(f).normalize();var r=f.length();c.far=r;d.length=0;d=c.intersectObjects(l,!1,d);d.length>0&&d[0].distance<r&&(q.visible=!1,q.userData.bTa=!0)})};m.prototype.ckb=function(){this.scene.traverse(function(l){l.userData.bTa&&(l.visible=!0,delete l.userData.bTa)})};var c=new THREE.Raycaster,d=[],f=new THREE.Vector3;m.prototype.isVisible=function(){return this.scene&&this.camera&&this.opacity>
0&&this.ika};m.prototype.dispose=function(){this.camera=this.scene=this.Od=null;this.Qc&&(this.Qc.dispose(),this.Qc=null);this.renderTarget&&(this.renderTarget.dispose(),this.renderTarget=null)};return m});
define("tdv/player/view/webgl/system/renderer/Behaviour",["require","tdv/constants/EventName","tdv/player/view/util/XR","tdv/player/view/webgl/components","tdv/player/view/webgl/system/renderer/SceneRenderer"],function(a){function m(e){this.B=e;this.Ez=[];this.fj=null;this.r9a();this.p9a()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/renderer/SceneRenderer");m.prototype.frame=function(e){var b=!!this.j&&
n.Uf==this.j;if(!n.isPresenting||b){var c=this.B.getComponent(g.wj).MY.map(function(l){for(var p=0;p<this.Ez.length;p++)if(this.Ez[p].Od==l)return this.Ez[p].update();return new k(l)}.bind(this));this.Ez.filter(function(l){return c.indexOf(l)<0}).forEach(function(l){l.dispose()});this.Ez=c;var d=this.Ez.filter(function(l){return l.isVisible()});if(d.length>0){b&&d.reduce(function(l,p){return l.opacity>p.opacity?l:p});var f=d.length==1&&d[0].opacity>=1||b;d.forEach(function(l){l.render(this.j,f,e)}.bind(this));
f||this.q7a(d.slice(0,2))}b&&this.B.T.Qa()}};m.prototype.q7a=function(e){this.Fo.material.uniforms.t1.value=e[0].renderTarget.texture;this.Fo.material.uniforms.o1.value=e[0].opacity;e.length>1?(this.Fo.material.uniforms.useT2.value=1,this.Fo.material.uniforms.t2.value=e[1].renderTarget.texture,this.Fo.material.uniforms.o2.value=e[1].opacity):this.Fo.material.uniforms.useT2.value=0;this.j.setSize(e[0].width,e[0].height);this.j.setRenderTarget(null);this.j.setClearColor(0,0);this.j.clear();this.j.render(this.qR,
this.sda)};m.prototype.dispose=function(){for(;this.Ez.length;)this.Ez.shift().dispose();this.Ez=null;this.q$a();this.t$a()};m.prototype.r9a=function(){var e=this.B.O(g.wj);this.fj=e.eb.Fc();this.fj.y6();e.renderer=this.fj.sl();this.j=e.renderer;n.M.bind(h.V,this.QHa,this,!0)};m.prototype.t$a=function(){n.M.h(h.V,this.QHa,this);this.j=null;this.fj.b$();this.fj=null};m.prototype.QHa=function(){this.B.T.Qa()};m.prototype.p9a=function(){this.qR=new THREE.Scene;this.sda=new THREE.OrthographicCamera(window.innerWidth/
-2,window.innerWidth/2,window.innerHeight/2,window.innerHeight/-2,-10,10);this.qR.add(this.sda);this.Fo=new THREE.Mesh(new THREE.PlaneGeometry(window.innerWidth,window.innerHeight),this.WZa());this.qR.add(this.Fo)};m.prototype.q$a=function(){this.qR.remove(this.Fo);this.Fo.geometry.dispose();this.Fo.geometry=null;this.Fo.material.dispose();this.qR=this.sda=this.Fo=this.Fo.material=null};m.prototype.WZa=function(){var e=new THREE.ShaderMaterial({uniforms:{t1:{value:null},t2:{value:null},o1:{value:1},
o2:{value:1},useT2:{value:1}},vertexShader:"varying vec2 vUv;\nvoid main() {\nvUv = vec2( uv.x, uv.y );\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D t1;\nuniform sampler2D t2;\nuniform float o1;\nuniform float o2;\nuniform int useT2;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texel1 = texture2D(t1, vUv);\n   texel1.a = texel1.a * o1;\n   if (useT2 == 1) {\n\t  vec4 texel2 = texture2D(t2, vUv);\n     texel2.a = texel2.a * o2;\n     gl_FragColor = mix(texel1, texel2, texel2.a);\n   } else {\n     gl_FragColor = texel1;\n   }\n#include <colorspace_fragment>\n#include <tonemapping_fragment>\n}"});
e.transparent=!0;return e};m.Wa=function(e){e.N(g.Gu).manager=new m(e)};m.ya=function(e){var b=e.getComponent(g.Gu);b.manager.dispose();b.manager=null;e.ka(g.Gu)};m.update=function(e){e.getComponent(g.Gu).manager.update()};m.frame=function(e,b,c){e.getComponent(g.Gu).manager.frame(b,c)};return m});
define("tdv/player/view/webgl/system/renderer/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/renderer/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/renderer/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(k,e){this.vQa.v.length&&this.vQa.v.slice().forEach(g.Wa);this.Vn.v.length&&
this.Vn.v.slice().forEach(function(b){g.frame(b,k,e)});this.wQa.v.length&&this.wQa.v.slice().forEach(g.ya)};a.J={};a.J.vQa=[n.wj,n.Gu.aa];a.J.wQa=[n.wj.aa,n.Gu];a.J.Vn=[n.wj,n.Gu];return a});
define("tdv/player/view/webgl/system/scene/BackgroundSprite","require tdv/utils tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/map/renderer/item/Item tdv/player/view/webgl/system/util/entity/Util tdv/constants/Priority tdv/player/view/image/Repository tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/RenderOrder"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/map/renderer/item/Item"),
e=a("tdv/player/view/webgl/system/util/entity/Util"),b=a("tdv/constants/Priority"),c=a("tdv/player/view/image/Repository"),d=a("tdv/player/view/util/XR");a=m.extend(g,function(l,p){g.call(this);this.Se=l;this.Bb=p;this.Ja=new k;this.Ja.jQ([this.Se]);this.Ja.bind(h.ia,this.Pe,this,!1);this.Ja.bind(h.$c,this.yh,this,!1);this.wc=null;this.Of=0;d.M.bind(h.V,this.xi,this,!0);c.GA(this.Ja,b.TF)});a.prototype.Zn=function(l){this.Of!==l&&(this.Of=l,this.xi())};a.prototype.pj=function(){return!!this.wc};a.prototype.Pe=
function(){this.I_a();this.o(h.ia)};a.prototype.yh=function(){this.o(h.$c)};a.prototype.I_a=function(){var l=new THREE.Texture;l.image=c.yg(this.Se);l.generateMipmaps=!0;l.minFilter=THREE.LinearMipMapLinearFilter;l.needsUpdate=!0;l=new THREE.SpriteMaterial({map:l});l.sizeAttenuation=!1;l.transparent=!0;l.polygonOffset=!0;l.polygonOffsetUnits=1;l.polygonOffsetFactor=-10;this.wc=new THREE.Sprite(l);this.wc.renderOrder=n.kUa;this.xi()};a.prototype.xi=function(){if(this.wc){var l=d.isPresenting&&d.Em==
d.Fl.Np?0:this.Of;this.wc.material.opacity!=l&&(this.wc.material.opacity=l,this.wc.material.visible=l>0,this.wc.material.needsUpdate=!0)}};a.prototype.dispose=function(){this.wc&&(this.wc.parent&&e.Hqa(this.wc.parent,this.wc),this.wc.material.map.dispose(),this.wc.material.dispose(),this.wc=null)};a.prototype.update=function(){if(this.wc){var l=e.uw(this.Bb);this.wc.parent!=l&&(this.wc.parent&&e.Hqa(this.wc.parent,this.wc),l&&e.Pbb(l,this.wc));if(l){var p=e.dE(this.Bb),q=this.wc.material.map.image.width,
r=this.wc.material.map.image.height;l=p/(2*Math.tan(l.fov*f/2));p=Math.max(p/l,e.vX(this.Bb)/(l*q/r));this.wc.scale.y!=p&&(this.wc.scale.y=p,this.wc.scale.x=p*q/r)}q=e.uX(this.Bb);this.wc.material.map.colorSpace!=q&&(this.wc.material.map.colorSpace=q,this.wc.material.needsUpdate=!0)}};a.prototype.dispose=function(){this.wc&&(this.wc.parent&&e.Hqa(this.wc.parent,this.wc),this.wc.material.map.dispose(),this.wc.material.dispose(),this.wc=null);this.Ja&&c.ho(this.Ja,b.TF);d.M.h(h.V,this.xi,this)};var f=
Math.PI/180;return a});
define("tdv/player/view/webgl/system/scene/Background","require tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/webgl/system/scene/BackgroundSprite tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){function m(b,c){this.B=b;this.Oh=c;this.Zx=void 0;this.Ej=this.Do=this.la=this.Bb=null;this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/scene/BackgroundSprite"),k=a("tdv/view/util/Ease"),
e=a("tdv/view/util/EaseDimension");m.prototype.frame=function(b){this.la&&this.HI(b);this.Do&&this.Do.update();this.Ej&&this.Ej.update()};m.prototype.update=function(){var b=this.B.getComponent(n.Scene);this.Bb=b.scene;if(!this.Bb){if(!b.scene)return;this.Bb=b.scene}b=b.ana||null;this.Zx===b||this.la||(this.TR(this.Ej),this.Ej=null,(this.Zx=b)?this.Ej=this.VZa(this.Zx):(this.LR(),this.Oh.o(h.ia)))};m.prototype.HI=function(b){this.la.Nb(b);this.Do&&this.Do.Zn(Math.min(1,Math.max(0,this.la.ob("alpha"))));
this.Ej&&this.Ej.Zn(Math.min(1,Math.max(0,this.la.ob("nextAlpha"))));this.la.Ve()&&(this.la=null,this.Do&&(this.TR(this.Do),this.Do=null),this.Do=this.Ej,this.Ej=null,this.update());this.B.T.Qa()};m.prototype.Fia=function(){this.Ej.h(h.ia,this.Fia,this,!0);this.Ej.h(h.$c,this.Gia,this,!0);this.LR();this.Oh.o(h.ia)};m.prototype.Gia=function(){this.TR(this.Ej);this.Ej=null;this.LR();this.Oh.o(h.ia)};m.prototype.LR=function(){this.Ej&&this.Do?this.la=new k("linear",[new e("nextAlpha",0,2,void 0),new e("alpha",
2,0,void 0)],600):this.Ej?this.la=new k("linear",[new e("nextAlpha",0,1,void 0)],300):this.Do&&(this.la=new k("linear",[new e("alpha",1,0,void 0)],300));this.B.T.Qa()};m.prototype.VZa=function(b){b=new g(b,this.Bb);this.zYa(b);b.Zn(0);return b};m.prototype.TR=function(b){b&&(this.aab(b),b.dispose())};m.prototype.zYa=function(b){b.bind(h.ia,this.Fia,this,!0);b.bind(h.$c,this.Gia,this,!0)};m.prototype.aab=function(b){b.h(h.ia,this.Fia,this,!0);b.h(h.$c,this.Gia,this,!0)};m.prototype.dispose=function(){this.Do&&
(this.TR(this.Do),this.Do=null);this.Ej&&(this.TR(this.Ej),this.Ej=null)};return m});
define("tdv/player/view/webgl/system/scene/Environment","require tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/Color tdv/player/view/util/LoadingGroup tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/view/images/ImageLoader tdv/player/view/util/XR".split(" "),function(a){function m(f,l){this.B=f;this.VG=void 0;this.hfa=1;this.Q4=this.FN=this.EN=this.dC=this.sG=this.Zx=void 0;this.zc=this.j=this.Bb=null;this.Oh=l;this.sf=new k(this.Oh);this.Sd=
[new c(n.TF),new c(n.TF)];this.Sd.forEach(function(p){p.bind(h.ia,this.Pe,this,!0);p.bind(h.$c,this.yh,this,!0)}.bind(this));d.M.bind(h.V,this.za,this,!0);this.kFa([]);this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/util/Color"),k=a("tdv/player/view/util/LoadingGroup"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util"),c=a("tdv/view/images/ImageLoader"),d=a("tdv/player/view/util/XR");m.prototype.frame=function(){if(this.Bb){var f=
m.Yfb(this.B.T,this.Bb);this.j!=f&&(this.j&&(this.Zu(),this.Q0()),this.j=f)&&(this.za(),this.Xla())}};m.prototype.update=function(){var f=this.B.getComponent(e.Scene),l=!1,p=!1,q=f.yKa||null;this.VG!==q&&(this.VG=q,p=!0);q=f.ana||null;this.Zx!==q&&(this.Zx=q,p=!0);q=f.JIa||null;this.sG!==q&&(this.sG=q,p=!0);p&&(this.tHa(),this.Xla(),l=!0);this.dC!==f.backgroundColor&&(this.dC=f.backgroundColor,l=!0);this.Bb!==f.scene&&(this.Bb=f.scene,l=!0);this.hfa!==f.environmentIntensity&&(this.hfa=f.environmentIntensity,
l=!0);l&&this.za()};m.prototype.tHa=function(){this.kFa(this.R2a())};m.prototype.R2a=function(){var f=[];this.VG&&f.indexOf(this.VG)==-1&&f.push(this.VG);!this.Zx&&this.sG&&f.indexOf(this.sG)==-1&&f.push(this.sG);if(this.Bb&&this.Bb.background&&this.Bb.background.image&&this.Bb.background.image.src){var l=this.Bb.background.image.src;f.indexOf(l)==-1&&f.push(l)}return f};m.prototype.kFa=function(f){var l=[],p=[];this.Sd.forEach(function(q){var r=q.rl();f.indexOf(r)<0?(q.cancel(),l.push(q)):p.push(r)});
f.forEach(function(q){p.indexOf(q)<0&&l.shift().load(q)})};m.prototype.Xla=function(){var f=0;this.sf.lJa();this.Sd.forEach(function(l){l.rl()&&!l.pj()&&(this.sf.uO(l),f++)}.bind(this));f==0&&this.Oh&&this.Oh.o(h.ia)};m.prototype.dispose=function(){this.Sd.forEach(function(f){f.cancel();f.h(h.ia,this.Pe,this,!0);f.h(h.$c,this.yh,this,!0)}.bind(this));this.B&&(this.Q0(),this.Zu(),this.B=null);d.M.h(h.V,this.za,this)};m.prototype.Pe=function(){this.za();this.Xla()};m.prototype.za=function(){if(this.Bb&&
this.j){this.Bb.environmentIntensity=this.hfa;if(this.VG){var f=this.Uya(this.VG);f&&this.VXa(f)}else this.Q0();d.isPresenting&&d.Em==d.Fl.Np?this.Zu():this.Zx?this.Zu():this.sG?(f=this.Uya(this.sG))&&this.Qva(f):this.dC?this.Qva(void 0,this.dC):this.Zu();this.tHa();this.B.T.Qa()}};m.prototype.Uya=function(f){for(var l=0;l<this.Sd.length;l++)if(this.Sd[l].pj()&&this.Sd[l].rl()==f)return this.Sd[l];return null};m.prototype.Qva=function(f,l){if(this.Bb){if(f){var p=f&&f.rl()||void 0;if(p==this.FN)return;
this.Zu();b.H$(this.Bb,this.es(f,!1));this.FN=p;this.EN=void 0}l&&l!=this.EN&&(this.Zu(),b.H$(this.Bb,l=="transparent"?null:g.Ip(l)),this.EN=l,this.FN=void 0)}};m.prototype.Zu=function(){this.Bb&&(this.EN||this.FN)&&(this.FN&&(this.Bb.background.dispose(),b.H$(this.Bb,null),this.FN=void 0),this.EN&&(b.H$(this.Bb,null),this.EN=void 0))};m.prototype.VXa=function(f){if(this.Bb){var l=f&&f.rl()||void 0;l!=this.Q4&&(this.Q0(),this.Bb.environment=this.es(f,d.isPresenting?!1:!0),this.Q4=l)}};m.prototype.Q0=
function(){this.Bb&&this.Q4&&(this.Bb.environment.dispose(),this.Bb.environment=null,this.Q4=void 0)};m.prototype.es=function(f,l){return Math.round(f.hg()/f.xg())<6?this.k_a(f,l):this.e_a(f,l)};m.prototype.k_a=function(f,l){var p=new THREE.Texture;p.image=f.yg();p.colorSpace=b.uX(this.Bb);p.mapping=THREE.EquirectangularReflectionMapping;p.needsUpdate=!0;return l?(this.j.$q=!0,f=new THREE.PMREMGenerator(this.j),p=f.fromEquirectangular(p).texture,f.dispose(),this.j.$q=!1,p):p};m.prototype.e_a=function(f,
l){for(var p=Array(6),q=f.hg()/6,r=f.xg(),t=0;t<6;t++){var u=document.createElement("canvas");u.width=q;u.height=r;u.getContext("2d").drawImage(f.yg(),t*q,0,q,r,0,0,q,r);p[t]=u}f=new THREE.CubeTexture;f.images=[p[1],p[3],p[4],p[5],p[0],p[2]];f.colorSpace=b.uX(this.Bb);f.needsUpdate=!0;return l?(this.j.$q=!0,l=new THREE.PMREMGenerator(this.j),p=l.fromCubemap(f).texture,l.dispose(),this.j.$q=!1,p):f};m.prototype.yh=function(){this.B.getComponent(e.Scene).scene.environment=null;this.B.T.Qa()};m.dEa=
new Map;m.yra=function(f,l){m.dEa.set(f,l||[])};m.Yfb=function(f,l){f=m.dEa.get(f)||[];for(var p=0;p<f.length;p++){var q=f[p].getComponent(e.wj);if(q&&q.MY.filter(function(r){return r.getComponent(e.Scene).scene==l}).length>0)return q.renderer}return null};return m});
define("tdv/player/view/webgl/system/scene/FadeColor","require exports tdv/constants/RenderOrder tdv/player/view/util/Color tdv/player/view/util/XR tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util three.mod".split(" "),function(a,m,h,n,g,k,e,b){a=function(){function d(f){this.opacity=this.aP=void 0;this.F=f}d.prototype.frame=function(){var f=this.F.getComponent(k.Scene),l=f.scene,p=l&&e.uw(l),q=f.aP;f=f.aX;!g.isPresenting&&p&&q&&f>0?(this.Qdb(),this.fob(l,p),this.eob(q,
f)):(this.opacity=this.aP=void 0,this.pJa())};d.prototype.update=function(){};d.prototype.fob=function(f,l){this.Gi.parent!=l&&l.add(this.Gi);var p=e.vX(f);f=e.dE(f);l.isPerspectiveCamera?(this.Gi.position.z=-l.near*1.01,l=f/(2*Math.tan(l.fov*c/2)),l=Math.max(f/l,p/(l*p/f)),this.Gi.scale.y=l,this.Gi.scale.x=l*p/f):l.isOrthographicCamera&&(this.Gi.position.z=-(l.near+1),this.Gi.scale.y=l.top-l.bottom,this.Gi.scale.x=l.right-l.left)};d.prototype.eob=function(f,l){this.aP!==f&&this.opacity!==l&&(this.Gi.material.color=
n.Ip(f),this.Gi.material.opacity=l,this.Gi.material.needsUpdate=!0)};d.prototype.Qdb=function(){if(!this.Gi){var f=new b.SpriteMaterial;f.depthTest=!1;f.renderOrder=h.uta;f.sizeAttenuation=!1;f.transparent=!0;f.visible=!0;f.opacity=0;f.needsUpdate=!0;this.Gi=new b.Sprite(f);this.Gi.renderOrder=h.uta}};d.prototype.pJa=function(){var f,l,p;if(this.Gi){var q=this.Gi.material;(f=q.map)===null||f===void 0||f.dispose();(l=q.envMap)===null||l===void 0||l.dispose();q.dispose();this.Gi.geometry.dispose();
(p=this.Gi.parent)===null||p===void 0||p.remove(this.Gi)}};d.prototype.dispose=function(){this.pJa()};return d}();var c=Math.PI/180;return a});
define("tdv/player/view/webgl/system/scene/Fog","require exports tdv/constants/EventName tdv/player/view/util/Color tdv/player/view/webgl/components three.mod tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){return function(){function b(c){this.F=c;e.M.bind(h.V,this.update,this,!0)}b.prototype.update=function(){var c=this.F.getComponent(g.Scene),d=c.scene,f=e.isPresenting&&e.Em==e.Fl.Np?0:c.SKa;c=n.Ip(c.RKa||"#ffffff");f>0?d.fog==null?d.fog=new k.FogExp2(c,f):(d.fog.color=c,d.fog.density=
f):d.fog=null};b.prototype.dispose=function(){e.M.h(h.V,this.update,this);var c=this.F.getComponent(g.Scene);c&&c.scene&&(c.scene.fog=null)};return b}()});
define("tdv/player/view/webgl/system/scene/Behaviour","require tdv/player/view/webgl/components tdv/player/view/util/LoadingGroup tdv/player/view/webgl/system/scene/Background tdv/player/view/webgl/system/scene/Environment tdv/player/view/webgl/system/scene/FadeColor tdv/player/view/webgl/system/scene/Fog".split(" "),function(a){function m(c){this.B=c;this.Oh=null;var d=this.B.O(h.Scene),f=this.B.O(h.Vp);this.B.N(h.Object3D).sa=f.scene=d.scene=new THREE.Scene;this.sf=new n;this.dS=new k(c,this.sf.iw());
this.ae=new g(c,this.sf.iw());this.d1=new b(c);this.cya=new e(c)}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/util/LoadingGroup"),g=a("tdv/player/view/webgl/system/scene/Background"),k=a("tdv/player/view/webgl/system/scene/Environment"),e=a("tdv/player/view/webgl/system/scene/FadeColor"),b=a("tdv/player/view/webgl/system/scene/Fog");m.prototype.frame=function(c){this.dS.frame(c);this.ae.frame(c)};m.prototype.coa=function(c){this.cya.frame(c)};m.prototype.update=function(){this.dS.update();
this.ae.update();this.d1.update();this.cya.update();this.Gab()};m.prototype.Gab=function(){var c=this.B.getComponent(h.Scene);this.Oh!=c.$na&&(this.Oh=c.$na,this.sf.Ekb(this.Oh))};m.prototype.dispose=function(){this.sf&&(this.sf.dispose(),this.sf=null);this.ae&&(this.ae.dispose(),this.ae=null);this.dS&&(this.dS.dispose(),this.dS=null);this.d1&&(this.d1.dispose(),this.d1=null);this.B&&(this.B=null)};m.Wa=function(c){c.N(h.Vp).manager=new m(c)};m.ya=function(c){var d=c.getComponent(h.Vp);d.manager.dispose();
d.manager=null;c.ka(h.Vp);c.ka(h.Object3D)};m.frame=function(c,d){c.getComponent(h.Vp).manager.frame(d)};m.coa=function(c,d){(c=c.getComponent(h.Vp))&&c.manager&&c&&c.manager.coa(d)};m.update=function(c){c.getComponent(h.Vp).manager.update()};m.yra=function(c,d){k.yra(c,d)};return m});
define("tdv/player/view/webgl/system/scene/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/scene/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/scene/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(k){this.FQa.v.length&&this.FQa.v.slice().forEach(g.Wa);this.scenes.Da.length&&
this.scenes.Da.slice().forEach(g.update);this.scenes.v.length&&this.scenes.v.slice().forEach(function(e){g.frame(e,k)});g.yra(this.T,this.Vn.v.slice());this.GQa.v.length&&this.GQa.v.slice().forEach(g.ya)};a.J={};a.J.FQa=[n.Scene,n.Vp.aa];a.J.scenes=[n.Scene,n.Vp];a.J.GQa=[n.Scene.aa,n.Vp];a.J.Vn=[n.wj,n.Gu];a.o_=m.extend(h,function(){h.apply(this,arguments)});a.o_.prototype.Yc=function(k){this.scenes.v.length&&this.scenes.v.slice().forEach(function(e){g.coa(e,k)})};a.o_.J={};a.o_.J.scenes=[n.Scene,
n.Vp];return a});
define("tdv/player/view/util/ColorPicker",["require","exports","three.mod","tdv/player/view/util/Device"],function(a,m,h,n){function g(c,d,f){try{if(c instanceof CanvasRenderingContext2D)return c.getImageData(d,f,1,1).data;if(c instanceof HTMLCanvasElement)return c.R3a?[0,0,0,0]:c.getContext("2d").getImageData(d,f,1,1).data;e.drawImage(c,d,f,1,1,0,0,1,1);return e.getImageData(0,0,1,1).data}catch(l){return[0,0,0,0]}}function k(c,d,f){c<0?c=f==h.RepeatWrapping?d+c%d:f==h.MirroredRepeatWrapping?Math.floor(Math.abs(c/
d))%2==0?Math.abs(c%d):d-1+c%d:0:c>=d&&(c=f==h.RepeatWrapping?c%d:f==h.MirroredRepeatWrapping?Math.floor(c/d)%2==1?d-1-c%d:c%d:d-1);return c}a=function(){function c(d){this.source=d;d instanceof HTMLCanvasElement?(this.canvas=d,this.scale=1):(this.canvas=document.createElement("canvas"),this.scale=n.Nd()==n.vj?.5:1,this.canvas.width=Math.round(d.width*this.scale),this.canvas.height=Math.round(d.height*this.scale));this.context=this.canvas.getContext("2d");this.context.globalCompositeOperation="copy";
this.canvas!=d&&this.context.drawImage(d,0,0,d.width,d.height,0,0,this.canvas.width,this.canvas.height)}c.prototype.transparent=function(d,f){return c.transparent(this.context,Math.round(d*this.scale),Math.round(f*this.scale))};c.prototype.ax=function(d,f){return c.ax(this.context,Math.round(d*this.scale),Math.round(f*this.scale))};c.prototype.info=function(d,f){return c.info(this.context,Math.round(d*this.scale),Math.round(f*this.scale))};c.prototype.dispose=function(){this.canvas!=this.source&&
(this.canvas.width=this.canvas.height=0)};c.Ymb=function(d,f,l){if(!d.image||!d.image.width||!d.image.height)return!0;f=k(Math.round(f*d.image.width),d.image.width,d.wrapS);l=k(Math.round((1-l)*d.image.height),d.image.height,d.wrapT);return!c.transparent(d.image,f,l)};c.transparent=function(d,f,l){return!c.ax(d,f,l)};c.ax=function(d,f,l){var p=d.tagName;return p&&p!="VIDEO"?g(d,f,l)[3]>0:!0};c.info=function(d,f,l){d=g(d,f,l);f=d[3];return{ax:f>0,opacity:f,color:"#"+b[d[0]]+b[d[1]]+b[d[2]]}};return c}();
m=document.createElement("canvas");m.width=m.height=1;var e=m.getContext("2d");e.globalCompositeOperation="copy";var b=function(){for(var c=Array(256),d=0;d<16;d++)c[d]="0"+d.toString(16);for(;d<256;d++)c[d]=d.toString(16);return c}();return a});
define("tdv/player/view/webgl/system/selection/Behaviour","require tdv/constants/EventName tdv/player/view/util/ColorPicker tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/RaycastUtil tdv/view/constants/Cursor".split(" "),function(a){function m(C){this.Bh=C;this.GN=this.Ay=this.Oe=this.Lo=null;this.BT=void 0;this.Ky=!1;this.update()}function h(C,B,H,E){this.F=C;this.sa=B;this.point=H;this.normal=E}function n(C){return{x:C.x,y:C.y,z:C.z}}
function g(C,B,H,E){var G=B.T,N=C.get(G);N||C.set(G,N=[]);C=N.indexOf(B);H&&C<0?N.push(B):!H&&C>=0&&N.splice(C,1);E.delete(G)}var k=a("tdv/constants/EventName"),e=a("tdv/player/view/util/ColorPicker"),b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/util/entity/Util"),d=a("tdv/player/view/webgl/system/util/RaycastUtil"),f=a("tdv/view/constants/Cursor");m.prototype.update=function(){var C=this.Bh.getComponent(b.yc);C.Tt=this;this.hV(C&&C.enabled?C.WD:null);this.gV(C&&C.enabled?
C.f7:null)};m.prototype.frame=function(){this.yZa();var C=this.Bh.getComponent(b.yc);C&&C.sna?this.LCa():this.jka(q)};m.prototype.hV=function(C){if(this.Lo!=C){if(this.Lo)for(var B in u)this.Lo.h(B,this.Fe,this);if(this.Lo=C)for(B in u)this.Lo.bind(B,this.Fe,this,!0)}};m.prototype.Fe=function(C){var B=this.Bh.getComponent(b.yc);B&&B.enabled&&(B=u[C.name])&&B.call(this,C)};m.prototype.gV=function(C){this.Oe!=C&&(this.Oe&&this.Ky&&this.Oe.pop(f.qf),(this.Oe=C)&&this.Ky&&this.Oe.push(f.qf))};m.prototype.tg=
function(C){this.Mq(C);this.DM&&v.indexOf(this.Bh.T)==-1&&w.indexOf(this.Bh.T)==-1?this.jka(q):this.jka(p)};m.prototype.gz=function(C){this.Mq(C);(C=this.Ifa())&&this.T5(k.ma,C)};m.prototype.$M=function(C){this.Mq(C);(C=this.Ifa())&&this.T5(k.fi,C)};m.prototype.uq=function(C){this.DM=!0;this.Mq(C);if(C=this.Ifa())this.gfa=C.F,this.jfa=C.F.getComponent(b.wd).M,this.T5(k.Sa,C)};m.prototype.hz=function(C){this.DM=!1;this.Mq(C);if(this.gfa)var B=(B=this.gfa.getComponent(b.wd))&&B.M;!B&&this.jfa&&(B=this.jfa);
this.jfa=this.gfa=null;B&&(C=this.uya(),B.o(k.$a,C),B=this.Bh.getComponent(b.yc),B.M&&B.M.o(k.$a,C))};m.prototype.Mq=function(C){this.Ad=C.x;this.Bd=C.y;this.PM=C.pageX;this.QM=C.pageY};m.prototype.jka=function(C){var B=(new Date).getTime()+C;this.BT&&B>=this.BT||(this.BT=B,clearTimeout(this.GN),this.GN=setTimeout(function(){this.GN=null;this.BT=void 0;this.LCa()}.bind(this),C))};m.prototype.LCa=function(){var C=this.D2a();this.PEa(C&&C.F);C&&this.T5(k.gb,C)};m.prototype.sqa=function(C,B,H){var E=
this.Ad,G=this.Bd,N=this.PM,O=this.QM;this.QM=this.PM=this.Bd=this.Ad=void 0;C=this.Tfa(C,[]);B=this.Mfa(C,B,H);var R;B&&(R=this.lza(B));this.Ad=E;this.Bd=G;this.PM=N;this.QM=O;return R};m.prototype.D2a=function(){var C=this.Bh.getComponent(b.yc);if(!C)return null;var B=this.C2a();return this.Mfa(B,C.origin,C.direction)||null};m.prototype.Ifa=function(){var C=this.Bh.getComponent(b.yc);if(!C)return null;var B=this.A1a();return this.Mfa(B,C.origin,C.direction)||null};m.prototype.PEa=function(C){if(this.Ay!=
C){if(this.Ay!=null!=(C!=null)){var B=this.Bh.getComponent(b.yc);B&&B.M&&B.M.o(C?k.uc:k.Eb)}this.Ay&&this.sGa(this.Ay,k.Eb);(this.Ay=C)&&this.sGa(this.Ay,k.uc);C=this.Ay&&this.Ay.getComponent(b.wd);C=!!C&&C.qB;this.Ky!=C&&(this.Ky=C,this.Oe&&(this.Ky?this.Oe.push(f.qf):this.Oe.pop(f.qf)))}};m.prototype.Mfa=function(C,B,H){var E=Array.from(C.keys());B=this.C3a(E,B,H);for(H=0;H<B.length;H++){E=B[H];var G=E.point,N=E.object,O=E.face&&E.face.normal,R=C.get(N),Q=R&&R.getComponent(b.wd);if(Q){var K=Array.isArray(N.material)&&
E.face?N.material[E.face.materialIndex]:N.material;if(!K||K.visible)if(Q.hF||!K||!K.map||e.Ymb(K.map,E.uv.x,E.uv.y))return N.isSkinnedMesh&&(N=this.T0a(N.skeleton.bones,G)),new h(R,N,G,O)}}return null};m.prototype.A1a=function(){var C=this.Bh.T,B=D.get(C);if(!B){B=x.get(C);var H=z.get(C);B=this.Tfa(B,H);D.set(C,B)}return B};m.prototype.C2a=function(){var C=this.Bh.T,B=F.get(C);if(!B){B=y.get(C);var H=A.get(C);B=this.Tfa(B,H);F.set(C,B)}return B};m.prototype.Tfa=function(C,B){var H=(B&&B.map(function(N){return c.Rc(N)}).filter(function(N){return!!N})||
[]).slice(),E=new Map;C&&C.forEach(function(N){var O=c.Rc(N);O&&H.indexOf(O)==-1&&(H.push(O),E.set(N,O))});var G=new Map;E.forEach(function(N,O){for(var R=[N];R.length;){var Q=R.shift();if(Q==N||H.indexOf(Q)==-1)G.set(Q,O),Q.children&&(R=R.concat(Q.children))}});return G};m.prototype.C3a=function(C,B,H){t.camera=this.xya();var E=c.Rc(this.Bh);E=E&&E.matrixWorld;E||(E=(E=this.Bh.getComponent(b.yc))&&E.matrixWorld);E?(t.ray.origin.copy(B).applyMatrix4(E),t.ray.direction.copy(B).add(H).applyMatrix4(E).sub(t.ray.origin).normalize()):
(t.ray.origin.copy(B),t.ray.direction.copy(H).normalize());return d.intersect(t,C)};m.prototype.T5=function(C,B){var H=this.lza(B);B=B.F.getComponent(b.wd);H.FX=B&&B.M.FX(C)||!1;B.M&&B.M.o(C,H);B=this.Bh.getComponent(b.yc);B.M&&B.M.o(C,H)};m.prototype.uya=function(){var C={};this.Ad!==void 0&&this.Bd!==void 0&&(C.x=this.Ad,C.y=this.Bd);this.PM!==void 0&&this.QM!==void 0&&(C.pageX=this.PM,C.pageY=this.QM);return C};m.prototype.lza=function(C){var B=this.uya(),H=C.sa,E=C.point;C=C.normal;B.position=
n(E);var G=this.xya();B.cameraPosition=n(G?r.setFromMatrixPosition(G.matrixWorld):r.set(0,0,0));G=H;for(var N=B;;){N.object=G.userData.id;N.name=G.name;N.type=G.isMesh?"mesh":G.isBone?"bone":G.Aw||G.isGaussianCloud?"gs":"other";N.localPosition=n(G.worldToLocal(r.copy(E)));r.setFromMatrixScale(G.matrixWorld);N.localScale=Math.max(r.x,r.y,r.z);N.objectMatrixWorld=H.matrixWorld.toArray();C&&(N.normal=n(l(H,C,G,r)));if(!G.parent||!G.parent.userData.id)break;G=G.parent;N=N.parent={}}return B};var l=function(){var C=
new THREE.Vector3,B=new THREE.Matrix4;return function(H,E,G,N){N.copy(E);if(H==G)return N;N.applyMatrix4(H.matrixWorld);N.sub(C.setFromMatrixPosition(H.matrixWorld));N.add(C.setFromMatrixPosition(G.matrixWorld));N.applyMatrix4(B.copy(G.matrixWorld).invert()).normalize();return N}}();m.prototype.xya=function(){if(this.f1.camera)return this.f1.camera;var C=this.Bh.getComponent(b.yc);C=C&&C.Ea;this.f1.camera=C&&c.Bt(C);return this.f1.camera};m.prototype.yZa=function(){this.f1={}};m.prototype.sGa=function(C,
B){(C=(C=C.getComponent(b.wd))&&C.M)&&C.o(B)};m.prototype.T0a=function(C,B){var H=null,E=Infinity;for(C=C.slice();C.length;){var G=C.shift(),N=B.distanceTo(G.getWorldPosition(r));N<E&&(H=G,E=N);C.unshift.apply(C,G.children)}return H};m.prototype.dispose=function(){this.GN&&(clearTimeout(this.GN),this.GN=null,this.BT=void 0);this.hV(null);this.gV(null);this.PEa(null)};var p=16,q=400,r=new THREE.Vector3(0,1,0),t=new THREE.Raycaster;a=new THREE.Box3;a.min.x=a.min.y=a.min.z=-Infinity;a.max.x=a.max.y=
a.max.z=Infinity;a=new THREE.Sphere;a.center.x=a.center.y=a.center.z=0;a.radius=Infinity;var u={};u[k.gb]=m.prototype.tg;u[k.ma]=m.prototype.gz;u[k.fi]=m.prototype.$M;u[k.Sa]=m.prototype.uq;u[k.$a]=m.prototype.hz;m.Kra=function(C){C.N(b.Hx).manager=new m(C)};m.gsa=function(C){var B=C.getComponent(b.Hx);B.manager.dispose();B.manager=null;C.ka(b.Hx)};m.frame=function(C){C.getComponent(b.Hx).manager.frame()};m.ou=function(C){C.getComponent(b.Hx).manager.update()};m.amb=function(C){C.N(b.$F);m.DTa(C)};
m.DTa=function(C){var B=c.Rc(C),H=C.getComponent(b.wd);g(x,C,B&&H.nt,D);g(y,C,B&&H.Yt,F)};m.GSa=function(C){g(x,C,!1,D);g(y,C,!1,F);C.ka(b.$F)};m.$lb=function(C){C.N(b.WF);m.yTa(C)};m.yTa=function(C){var B=c.Rc(C),H=C.getComponent(b.Sr);g(z,C,B&&H.tsa,D);g(A,C,B&&H.usa,F)};m.FSa=function(C){g(A,C,!1,F);g(z,C,!1,D);C.ka(b.WF)};var v=[];m.wlb=function(C){v=[];C.forEach(function(B){v.indexOf(B.T)<0&&v.push(B.T)})};var w=[];m.hra=function(C){w=[];C.forEach(function(B){w.indexOf(B.T)<0&&w.push(B.T)})};
var x=new Map,y=new Map,z=new Map,A=new Map,D=new Map,F=new Map;return m});
define("tdv/player/view/webgl/system/selection/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/selection/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/selection/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.uY.v.length&&this.uY.v.slice().forEach(g.Kra);this.Wj.Da.length&&
this.Wj.Da.slice().forEach(g.ou);this.Wj.v.length&&this.Wj.v.slice().forEach(g.frame);this.vY.v.length&&this.vY.v.slice().forEach(g.gsa);this.QQa.v.length&&this.QQa.v.slice().forEach(g.amb);this.PQa.v.length&&this.PQa.Da.slice().forEach(g.DTa);this.RQa.v.length&&this.RQa.v.slice().forEach(g.GSa);this.SQa.v.length&&this.SQa.v.slice().forEach(g.GSa);this.gOa.v.length&&this.gOa.v.slice().forEach(g.$lb);this.fOa.v.length&&this.fOa.Da.slice().forEach(g.yTa);this.hOa.v.length&&this.hOa.v.slice().forEach(g.FSa);
this.iOa.v.length&&this.iOa.v.slice().forEach(g.FSa);(this.uqa.fe.length||this.uqa.Xg.length)&&g.wlb(this.uqa.v);(this.pA.fe.length||this.pA.Xg.length)&&g.hra(this.pA.v)};a.J={};a.J.pA=[n.Im];a.J.uqa=[n.El];a.J.uY=[n.yc,n.Hx.aa];a.J.Wj=[n.yc,n.Hx];a.J.vY=[n.yc.aa,n.Hx];a.J.QQa=[n.Object3D,n.wd,n.$F.aa];a.J.PQa=[n.Object3D,n.wd,n.$F];a.J.RQa=[n.Object3D.aa,n.$F];a.J.SQa=[n.wd.aa,n.$F];a.J.gOa=[n.Object3D,n.Sr,n.WF.aa];a.J.fOa=[n.Object3D,n.Sr,n.WF];a.J.hOa=[n.Object3D.aa,n.WF];a.J.iOa=[n.Sr.aa,n.WF];
return a});
define("tdv/player/view/webgl/system/light/SpotLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a,m,h,n,g,k,e){a=function(b){function c(){var d=b.call(this)||this;d.xb=d.xb.bind(d);d.ib=d.ib.bind(d);d.gg=d.gg.bind(d);d.Ca=d.Ca.bind(d);return d}P(c,b);c.prototype.Yc=function(){this.lE.v.length&&this.lE.v.slice().forEach(this.xb);this.mE.v.length&&this.mE.v.slice().forEach(this.Ca);
this.Ei.Da.length&&this.Ei.Da.slice().forEach(this.ib);this.Ei.v.length&&this.Ei.v.slice().forEach(this.gg)};c.prototype.xb=function(d){var f=d.N(g.Iu),l=d.N(g.Object3D);f.light=l.sa=new h.SpotLight;this.ib(d)};c.prototype.ib=function(d){var f=d.getComponent(g.SpotLight),l=d.getComponent(g.Iu),p=l.light;p.color=n.Ip(f.color).convertLinearToSRGB();p.intensity=f.intensity*Math.PI;p.visible=p.intensity>0;p.castShadow=p.intensity>0&&f.castShadow;p.distance=f.distance;p.angle=f.angle*Math.PI/180;p.penumbra=
f.penumbra;p.decay=f.decay;p.target.position.set(0,0,1);p.add(p.target);var q=p.castShadow?f.Qra:16;q!=p.shadow.mapSize.width&&(p.shadow.dispose(),p.shadow=p.shadow.clone(),p.shadow.mapSize.width=p.shadow.mapSize.height=q);p.shadow.bias=f.Pra;p.shadow.radius=f.Rra;f.XW!=!!l.zp&&(l=d.O(g.Iu),f.XW?l.zp=new h.SpotLightHelper(p):(l.zp.dispose(),l.zp=null))};c.prototype.gg=function(d){this.Csa(d)};c.prototype.Csa=function(d){var f=d.getComponent(g.Iu);if(f=f&&f.zp)d=e.Sf(d),f.parent!=d&&(f.parent&&f.parent.remove(f),
d&&d.add(f)),f.update()};c.prototype.Ca=function(d){var f=d.getComponent(g.Iu),l=f&&f.zp;l&&l.parent&&l.parent.remove(l);l&&l.dispose();f=f.light;f.parent&&f.parent.remove(f);d.ka(g.Iu);d.ka(g.Object3D)};c.J={};return c}(k);a.J={};a.J.lE=[g.SpotLight,g.Iu.aa];a.J.Ei=[g.SpotLight,g.Iu];a.J.mE=[g.SpotLight.aa,g.Iu];return a});
define("tdv/player/view/webgl/system/solidMaterial/Behaviour",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function m(g){this.B=g;this.Aa=null;this.update()}var h=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");m.prototype.update=function(){this.Aa||(this.Aa=new THREE.MeshBasicMaterial,this.Aa.transparent=!0,this.B.N(n.Material).material=this.Aa);var g=this.B.getComponent(n.xd);this.Aa.color=h.Ip(g.color||"#ffffff");this.Aa.opacity=
g.opacity||0;this.Aa.depthTest=!!g.depthTest;this.Aa.side=g.doubleSided?THREE.DoubleSide:THREE.FrontSide;this.Aa.visible=this.Aa.opacity>0;this.Aa.needsUpdate=!0};m.prototype.dispose=function(){this.Aa&&(this.Aa.dispose(),this.Aa=null,this.B.ka(n.Material));this.B=null};m.Wa=function(g){g.N(n.Ix).manager=new m(g)};m.ya=function(g){var k=g.getComponent(n.Ix);k.manager.dispose();k.manager=null;g.ka(n.Ix)};m.update=function(g){g.getComponent(n.Ix).manager.update()};return m});
define("tdv/player/view/webgl/system/solidMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/solidMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/solidMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.On.v.length&&this.On.v.slice().forEach(g.Wa);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya)};a.J={};a.J.On=[n.xd,n.Ix.aa];a.J.materials=[n.xd,n.Ix];a.J.Pn=[n.xd.aa,n.Ix];return a});
define("tdv/player/view/webgl/system/sphere/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/material/Util"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(h,function(){h.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=
function(){this.hSa.v.length&&this.hSa.v.slice().forEach(this.xb);this.gSa.Da.length&&this.gSa.Da.slice().forEach(this.ib);this.iSa.v.length&&this.iSa.v.slice().forEach(this.Ca);this.jSa.v.length&&this.jSa.v.slice().forEach(this.Ca)};a.prototype.xb=function(k){k.N(n.Object3D).sa=new THREE.Mesh(new THREE.SphereGeometry);k.N(n.aG);this.ib(k)};a.prototype.ib=function(k){var e=k.getComponent(n.Object3D).sa;g.ND(e,k.getComponent(n.Material).material);k=k.getComponent(n.Sphere);var b=e.geometry;if(b.radius!=
k.radius||b.widthSegments!=k.widthSegments||b.heightSegments!=k.heightSegments)b.dispose(),b=new THREE.SphereGeometry(k.radius,k.widthSegments,k.heightSegments),e.geometry=b,e.needsUpdate=!0;k=k.renderOrder||0;e.renderOrder!=k&&(e.renderOrder=k,e.needsUpdate=!0)};a.prototype.Ca=function(k){var e=k.getComponent(n.Object3D);(e=e&&e.sa)&&e.geometry&&(e.geometry.dispose(),e.geometry=null);e&&g.ND(e,null);k.ka(n.aG);k.ka(n.Object3D)};a.J={};a.J.hSa=[n.Sphere,n.Material,n.aG.aa];a.J.gSa=[n.Sphere,n.Material,
n.aG];a.J.iSa=[n.Sphere.aa,n.aG];a.J.jSa=[n.Material.aa,n.aG];return a});
define("tdv/player/view/webgl/system/sprite/Behaviour",["require","tdv/player/view/util/XR","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/system/util/material/Util"],function(a){function m(c){this.B=c;this.Bb=null;this.Cda=90;this.Dda=100;this.Pa=this.Ha=void 0;this.tV=!1;this.ne=1;this.wc=this.B.O(n.Sprite).Gi=this.B.O(n.Object3D,!0).sa=new THREE.Sprite;this.wc.material.opacity=0;this.Qj();this.update();this.frame()}var h=a("tdv/player/view/util/XR"),
n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util"),k=a("tdv/player/view/webgl/system/util/material/Util");m.prototype.update=function(){var c=this.B.getComponent(n.Sprite);this.Ha=c.height;this.Pa=c.width;this.tV=c.sizeAttenuation;this.wc.center.x=c.wO;this.wc.center.y=1-c.xO;this.ne=c.scale;this.En();this.wc.needsUpdate=!0};m.prototype.frame=function(){this.Bb||(this.Bb=g.Sf(this.B));this.et();this.Qj();this.En()};m.prototype.et=function(){if(this.Bb){var c=
g.uw(this.Bb);if(c&&c.isPerspectiveCamera){var d=g.dE(this.Bb);if(this.Cda!=c.fov||this.Dda!=d)this.Cda=c.fov,this.Dda=d,this.En(),this.wc.needsUpdate=!0}}};m.prototype.Qj=function(){var c=this.Bb?this.B.getComponent(n.Material).material:null;c&&k.ND(this.wc,c);this.wc.renderOrder=this.B.getComponent(n.Sprite).renderOrder;this.wc.material&&this.wc.material.sizeAttenuation!=this.tV&&(this.wc.material.sizeAttenuation=this.tV,this.wc.material.needsUpdate=!0)};m.prototype.En=function(){var c=this.Ha;
this.tV||(c/=this.Dda/(2*Math.tan(this.Cda*b/2)));var d=this.ne;this.wc.parent&&(this.wc.parent.getWorldScale(e),d/=Math.max(e.x,e.y,e.z));h.isPresenting&&this.tV&&(d/=h.zi);c*=d;d=c*this.Pa/this.Ha;var f=this.B.getComponent(n.ta)||this.B.N(n.ta);if(f.Le!=d||f.Ye!=c||f.Gh!=1)f=this.B.O(n.ta,!0),f.Le=d,f.Ye=c,f.Gh=1};var e=new THREE.Vector3,b=Math.PI/180;m.prototype.dispose=function(){};m.Wa=function(c){c.N(n.Ju).manager=new m(c)};m.ya=function(c){var d=c.getComponent(n.Ju);d.manager.dispose();d.manager=
null;c.ka(n.Ju);c.ka(n.Object3D)};m.update=function(c){c.getComponent(n.Ju).manager.update()};m.frame=function(c){c.getComponent(n.Ju).manager.frame()};return m});
define("tdv/player/view/webgl/system/sprite/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/sprite/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/sprite/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.lSa.v.length&&this.lSa.v.slice().forEach(g.Wa);this.U$.Da.length&&
this.U$.v.slice().forEach(g.update);this.U$.v.length&&this.U$.v.slice().forEach(g.frame);this.mSa.v.length&&this.mSa.v.slice().forEach(g.ya);this.nSa.v.length&&this.nSa.v.slice().forEach(g.ya)};a.J={};a.J.lSa=[n.Material,n.Sprite,n.Ju.aa];a.J.U$=[n.Sprite,n.Material,n.Ju];a.J.mSa=[n.Sprite.aa,n.Ju];a.J.nSa=[n.Material.aa,n.Ju];return a});
define("tdv/player/view/webgl/system/transform/System","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(f,l,p){for(;f<l-180;)f+=360;for(;f>l+180;)f-=360;return h(f,l,p)}function h(f,l,p){if(!p)return l;f=(l-f)*(1-p);Math.abs(f)<1E-5&&(f=0);return l-f}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/events/Event"),e=a("tdv/player/view/webgl/ecs/System"),
b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/util/entity/Util");a=n.extend(e,function(){e.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(f,l){this.gY.v.length&&this.gY.v.slice().forEach(this.xb);this.Lt.fe.length&&this.Lt.fe.slice().forEach(function(p){this.ib(p,f,l)}.bind(this));this.Lt.Da.length&&this.Lt.Da.slice().forEach(function(p){this.ib(p,f,l)}.bind(this));this.rOa.v.length&&this.rOa.v.slice().forEach(function(p){this.ib(p,
f,l)}.bind(this));this.wKa.v.length&&this.wKa.v.slice().forEach(this.Ca);this.xKa.v.length&&this.xKa.v.slice().forEach(this.Ca)};a.prototype.xb=function(f){var l=f.getComponent(b.ta),p=f.N(b.Gg);p.positionX=l.positionX;p.positionY=l.positionY;p.positionZ=l.positionZ;p.Yd=l.Yd;p.fd=l.fd;p.Xe=l.Xe;p.mf=l.mf;p.scale=l.scale;p.Le=l.Le;p.Ye=l.Ye;p.Gh=l.Gh;p.translationX=l.translationX;p.translationY=l.translationY;p.Ze=l.Ze;this.updateMatrixWorld(f)};a.prototype.ib=function(f){var l=f.getComponent(b.ta),
p=f.getComponent(b.Gg),q=l.easing||0;q?f.getComponent(b.dG)||f.N(b.dG):f.ka(b.dG);var r=null;l.cA!==p.cA&&(r||(r=f.O(b.Gg)),r.cA=l.cA);l.positionX!==p.positionX&&(r||(r=f.O(b.Gg)),r.positionX=h(r.positionX,l.positionX,q));l.positionY!==p.positionY&&(r||(r=f.O(b.Gg)),r.positionY=h(r.positionY,l.positionY,q));l.positionZ!==p.positionZ&&(r||(r=f.O(b.Gg)),r.positionZ=h(r.positionZ,l.positionZ,q));l.Yd!==p.Yd&&(r||(r=f.O(b.Gg)),r.Yd=m(r.Yd,l.Yd,q));l.fd!==p.fd&&(r||(r=f.O(b.Gg)),r.fd=m(r.fd,l.fd,q));l.Xe!==
p.Xe&&(r||(r=f.O(b.Gg)),r.Xe=m(r.Xe,l.Xe,q));l.scale!==p.scale&&(r||(r=f.O(b.Gg)),r.scale=l.scale);l.Le!==p.Le&&(r||(r=f.O(b.Gg)),r.Le=l.Le);l.Ye!==p.Ye&&(r||(r=f.O(b.Gg)),r.Ye=l.Ye);l.Gh!==p.Gh&&(r||(r=f.O(b.Gg)),r.Gh=l.Gh);l.translationX!==p.translationX&&(r||(r=f.O(b.Gg)),r.translationX=h(r.translationX,l.translationX,q));l.translationY!==p.translationY&&(r||(r=f.O(b.Gg)),r.translationY=h(r.translationY,l.translationY,q));l.Ze!==p.Ze&&(r||(r=f.O(b.Gg)),r.Ze=h(r.Ze,l.Ze,q));r?this.updateMatrixWorld(f):
f.ka(b.dG)};var d=new THREE.Vector3;a.prototype.updateMatrixWorld=function(f){c.fZ(f,f.getComponent(b.Gg));var l=f.getComponent(b.ta).M;l&&(c.getWorldPosition(f,d),f={position:{}},f.position.x=d.x,f.position.y=d.y,f.position.z=d.z,l.o(new k(g.Mm,f)))};a.prototype.Ca=function(f){f.ka(b.Gg);f.ka(b.dG)};a.J={};a.J.Lt=[b.Object3D,b.ta,b.Gg];a.J.gY=[b.Object3D,b.ta,b.Gg.aa];a.J.rOa=[b.Object3D,b.ta,b.Gg,b.dG];a.J.wKa=[b.Object3D.aa,b.ta,b.Gg];a.J.xKa=[b.ta.aa,b.Gg];return a});
define("tdv/player/view/webgl/system/transformControls/TransformControlsGizmo",["require","three.mod","tdv/constants/RenderOrder"],function(a){const m=a("three.mod"),h=a("tdv/constants/RenderOrder");class n extends m.Object3D{constructor(t){function u(L,U){L=new m.TorusGeometry(L,.0075,3,64,U*Math.PI*2);L.rotateY(Math.PI/2);L.rotateX(Math.PI/2);return L}function v(L){const U=new m.Object3D;for(const Y in L)for(let aa=L[Y].length;aa--;){const ba=L[Y][aa][0].clone();var T=L[Y][aa][1];const ea=L[Y][aa][2],
ia=L[Y][aa][3],da=L[Y][aa][4];ba.name=Y;ba.tag=da;T&&ba.position.set(T[0],T[1],T[2]);ea&&ba.rotation.set(ea[0],ea[1],ea[2]);ia&&ba.scale.set(ia[0],ia[1],ia[2]);ba.updateMatrix();T=ba.geometry.clone();T.applyMatrix4(ba.matrix);ba.geometry=T;ba.renderOrder=h.pWa;ba.position.set(0,0,0);ba.rotation.set(0,0,0);ba.scale.set(1,1,1);U.add(ba)}return U}super();this.type="TransformControlsGizmo";this.properties=t;var w=new m.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),
x=new m.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0});t=w.clone();t.opacity=.15;x=x.clone();x.opacity=.5;var y=w.clone();y.color.setHex(16711680);const z=w.clone();z.color.setHex(65280);const A=w.clone();A.color.setHex(255);const D=w.clone();D.color.setHex(16711680);D.opacity=.5;const F=w.clone();F.color.setHex(65280);F.opacity=.5;const C=w.clone();C.color.setHex(255);C.opacity=.5;const B=w.clone();B.opacity=.25;var H=w.clone();H.color.setHex(16776960);H.opacity=
.25;w.clone().color.setHex(16776960);var E=w.clone();E.color.setHex(7895160);var G=new m.CylinderGeometry(0,.04,.1,12);G.translate(0,.05,0);const N=new m.BoxGeometry(.08,.08,.08);N.translate(0,.04,0);w=new m.BufferGeometry;w.setAttribute("position",new m.Float32BufferAttribute([0,0,0,1,0,0,0,0,0,0,0,0],3));const O=new m.CylinderGeometry(.0075,.0075,.5,3);O.translate(0,.25,0);G={X:[[new m.Mesh(G,y),[.5,0,0],[0,0,-Math.PI/2]],[new m.Mesh(G,y),[-.5,0,0],[0,0,Math.PI/2]],[new m.Mesh(O,y),[0,0,0],[0,0,
-Math.PI/2]]],Y:[[new m.Mesh(G,z),[0,.5,0]],[new m.Mesh(G,z),[0,-.5,0],[Math.PI,0,0]],[new m.Mesh(O,z)]],Z:[[new m.Mesh(G,A),[0,0,.5],[Math.PI/2,0,0]],[new m.Mesh(G,A),[0,0,-.5],[-Math.PI/2,0,0]],[new m.Mesh(O,A),null,[Math.PI/2,0,0]]],XYZ:[[new m.Mesh(new m.OctahedronGeometry(.1,0),B.clone()),[0,0,0]]],XY:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),C.clone()),[.15,.15,0]]],YZ:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),D.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new m.Mesh(new m.BoxGeometry(.15,
.15,.01),F.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]};const R={X:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[.3,0,0],[0,0,-Math.PI/2]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,.3,0]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,-.3,0],[0,0,Math.PI]]],Z:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,0,.3],[Math.PI/2,0,0]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,0,-.3],[-Math.PI/
2,0,0]]],XYZ:[[new m.Mesh(new m.OctahedronGeometry(.2,0),t)]],XY:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[.15,.15,0]]],YZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[.15,0,.15],[-Math.PI/2,0,0]]]},Q={START:[[new m.Mesh(new m.OctahedronGeometry(.01,2),x),null,null,null,"helper"]],END:[[new m.Mesh(new m.OctahedronGeometry(.01,2),x),null,null,null,"helper"]],DELTA:[[new m.Line(function(){const L=new m.BufferGeometry;
L.setAttribute("position",new m.Float32BufferAttribute([0,0,0,1,1,1],3));return L}(),x),null,null,null,"helper"]],X:[[new m.Line(w,x.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new m.Line(w,x.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new m.Line(w,x.clone()),[0,0,-1E3],[0,-Math.PI/2,0],[1E6,1,1],"helper"]]};H={XYZE:[[new m.Mesh(u(.5,1),E),null,[0,Math.PI/2,0]]],X:[[new m.Mesh(u(.5,.5),y)]],Y:[[new m.Mesh(u(.5,.5),z),null,[0,0,-Math.PI/2]]],Z:[[new m.Mesh(u(.5,.5),A),null,[0,
Math.PI/2,0]]],E:[[new m.Mesh(u(.75,1),H),null,[0,Math.PI/2,0]]]};E={AXIS:[[new m.Line(w,x.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]]};const K={XYZE:[[new m.Mesh(new m.SphereGeometry(.25,10,8),t)]],X:[[new m.Mesh(new m.TorusGeometry(.5,.1,4,24),t),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new m.Mesh(new m.TorusGeometry(.5,.1,4,24),t),[0,0,0],[Math.PI/2,0,0]]],Z:[[new m.Mesh(new m.TorusGeometry(.5,.1,4,24),t),[0,0,0],[0,0,-Math.PI/2]]],E:[[new m.Mesh(new m.TorusGeometry(.75,.1,2,24),t)]]};y={X:[[new m.Mesh(N,
y),[.5,0,0],[0,0,-Math.PI/2]],[new m.Mesh(O,y),[0,0,0],[0,0,-Math.PI/2]],[new m.Mesh(N,y),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new m.Mesh(N,z),[0,.5,0]],[new m.Mesh(O,z)],[new m.Mesh(N,z),[0,-.5,0],[0,0,Math.PI]]],Z:[[new m.Mesh(N,A),[0,0,.5],[Math.PI/2,0,0]],[new m.Mesh(O,A),[0,0,0],[Math.PI/2,0,0]],[new m.Mesh(N,A),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),C),[.15,.15,0]]],YZ:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),D),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new m.Mesh(new m.BoxGeometry(.15,
.15,.01),F),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new m.Mesh(new m.BoxGeometry(.1,.1,.1),B.clone())]]};t={X:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[.3,0,0],[0,0,-Math.PI/2]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,.3,0]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,-.3,0],[0,0,Math.PI]]],Z:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,0,.3],[Math.PI/2,0,0]],[new m.Mesh(new m.CylinderGeometry(.2,
0,.6,4),t),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[.15,.15,0]]],YZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.2),t),[0,0,0]]]};x={X:[[new m.Line(w,x.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new m.Line(w,x.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new m.Line(w,x.clone()),[0,0,-1E3],
[0,-Math.PI/2,0],[1E6,1,1],"helper"]]};this.AA={};this.Tt={};this.DJ={};this.add(this.AA.translate=v(G));this.add(this.AA.rotate=v(H));this.add(this.AA.scale=v(y));this.add(this.Tt.translate=v(R));this.add(this.Tt.rotate=v(K));this.add(this.Tt.scale=v(t));this.add(this.DJ.translate=v(Q));this.add(this.DJ.rotate=v(E));this.add(this.DJ.scale=v(x));this.Tt.translate.visible=!1;this.Tt.rotate.visible=!1;this.Tt.scale.visible=!1}updateMatrixWorld(t){const u=(this.properties.mode==="scale"?"local":this.properties.Wra)===
"local"?this.properties.MK:l;this.AA.translate.visible=this.properties.mode==="translate";this.AA.rotate.visible=this.properties.mode==="rotate";this.AA.scale.visible=this.properties.mode==="scale";this.DJ.translate.visible=this.properties.mode==="translate";this.DJ.rotate.visible=this.properties.mode==="rotate";this.DJ.scale.visible=this.properties.mode==="scale";let v=[];v=v.concat(this.Tt[this.properties.mode].children);v=v.concat(this.AA[this.properties.mode].children);v=v.concat(this.DJ[this.properties.mode].children);
for(let x=0;x<v.length;x++){const y=v[x];y.visible=!0;y.rotation.set(0,0,0);y.position.copy(this.properties.sB);var w=void 0;this.properties.camera.isOrthographicCamera?(w=this.properties.camera,w=(w.top-w.bottom)/w.zoom):(w=this.properties.camera,w=this.properties.sB.distanceTo(this.properties.Ec)*Math.min(1.9*Math.tan(Math.PI*w.fov/360)/w.zoom,7));y.scale.set(1,1,1).multiplyScalar(w*this.properties.size/4);y.tag==="helper"?(y.visible=!1,y.name==="AXIS"?(y.visible=!!this.properties.axis,this.properties.axis===
"X"&&(k.setFromEuler(e.set(0,0,0)),y.quaternion.copy(u).multiply(k),Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))>.9&&(y.visible=!1)),this.properties.axis==="Y"&&(k.setFromEuler(e.set(0,0,Math.PI/2)),y.quaternion.copy(u).multiply(k),Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))>.9&&(y.visible=!1)),this.properties.axis==="Z"&&(k.setFromEuler(e.set(0,Math.PI/2,0)),y.quaternion.copy(u).multiply(k),Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))>.9&&
(y.visible=!1)),this.properties.axis==="XYZE"&&(k.setFromEuler(e.set(0,Math.PI/2,0)),b.copy(this.properties.LE),y.quaternion.setFromRotationMatrix(d.lookAt(c,b,q)),y.quaternion.multiply(k),y.visible=this.properties.yk),this.properties.axis==="E"&&(y.visible=!1)):y.name==="START"?(y.position.copy(this.properties.LK),y.visible=this.properties.yk):y.name==="END"?(y.position.copy(this.properties.sB),y.visible=this.properties.yk):y.name==="DELTA"?(y.position.copy(this.properties.LK),y.quaternion.copy(this.properties.Wsa),
g.set(1E-10,1E-10,1E-10).add(this.properties.LK).sub(this.properties.sB).multiplyScalar(-1),g.applyQuaternion(this.properties.Wsa.clone().invert()),y.scale.copy(g),y.visible=this.properties.yk):(y.quaternion.copy(u),this.properties.yk?y.position.copy(this.properties.LK):y.position.copy(this.properties.sB),this.properties.axis&&(y.visible=this.properties.axis.search(y.name)!==-1))):(y.quaternion.copy(u),this.properties.mode==="translate"||this.properties.mode==="scale"?(y.name==="X"&&Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))>
.99&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="Y"&&Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))>.99&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="Z"&&Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))>.99&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="XY"&&Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))<.2&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="YZ"&&Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))<
.2&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="XZ"&&Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))<.2&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1)):this.properties.mode==="rotate"&&(f.copy(u),b.copy(this.properties.eye).applyQuaternion(k.copy(u).invert()),y.name.search("E")!==-1&&y.quaternion.setFromRotationMatrix(d.lookAt(this.properties.eye,c,q)),y.name==="X"&&(k.setFromAxisAngle(p,Math.atan2(-b.y,b.z)),k.multiplyQuaternions(f,k),y.quaternion.copy(k)),y.name==="Y"&&
(k.setFromAxisAngle(q,Math.atan2(b.x,b.z)),k.multiplyQuaternions(f,k),y.quaternion.copy(k)),y.name==="Z"&&(k.setFromAxisAngle(r,Math.atan2(b.y,b.x)),k.multiplyQuaternions(f,k),y.quaternion.copy(k))),y.visible=y.visible&&(y.name.indexOf("X")===-1||this.properties.XRa),y.visible=y.visible&&(y.name.indexOf("Y")===-1||this.properties.YRa),y.visible=y.visible&&(y.name.indexOf("Z")===-1||this.properties.ZRa),y.visible=y.visible&&(y.name.indexOf("E")===-1||this.properties.XRa&&this.properties.YRa&&this.properties.ZRa),
y.material.Ne=y.material.Ne||y.material.color.clone(),y.material.Of=y.material.Of||y.material.opacity,y.material.color.copy(y.material.Ne),y.material.opacity=y.material.Of,this.properties.enabled&&this.properties.axis&&(y.name===this.properties.axis?(y.material.color.setHex(16776960),y.material.opacity=1):this.properties.axis.split("").some(function(z){return y.name===z})&&(y.material.color.setHex(16776960),y.material.opacity=1)))}super.updateMatrixWorld(t)}}const g=new m.Vector3,k=new m.Quaternion,
e=new m.Euler,b=new m.Vector3(0,1,0),c=new m.Vector3(0,0,0),d=new m.Matrix4,f=new m.Quaternion,l=new m.Quaternion,p=new m.Vector3(1,0,0),q=new m.Vector3(0,1,0),r=new m.Vector3(0,0,1);return n});
define("tdv/player/view/webgl/system/transformControls/TransformControlsPlane",["require","three.mod"],function(a){const m=a("three.mod");class h extends m.Mesh{constructor(r){super(new m.PlaneGeometry(1E5,1E5,2,2),new m.MeshBasicMaterial({visible:!1,wireframe:!0,side:m.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1}));this.properties=r;this.type="TransformControlsPlane"}updateMatrixWorld(r){let t=this.properties.Wra;this.position.copy(this.properties.sB);this.properties.mode==="scale"&&(t="local");
l.copy(c).applyQuaternion(t==="local"?this.properties.MK:k);p.copy(d).applyQuaternion(t==="local"?this.properties.MK:k);q.copy(f).applyQuaternion(t==="local"?this.properties.MK:k);g.copy(p);switch(this.properties.mode){case "translate":case "scale":switch(this.properties.axis){case "X":g.copy(this.properties.eye).cross(l);e.copy(l).cross(g);break;case "Y":g.copy(this.properties.eye).cross(p);e.copy(p).cross(g);break;case "Z":g.copy(this.properties.eye).cross(q);e.copy(q).cross(g);break;case "XY":e.copy(q);
break;case "YZ":e.copy(l);break;case "XZ":g.copy(q);e.copy(p);break;case "XYZ":case "E":e.set(0,0,0)}break;default:e.set(0,0,0)}e.length()===0?this.quaternion.copy(this.properties.WIa):(b.lookAt(n.set(0,0,0),e,g),this.quaternion.setFromRotationMatrix(b));super.updateMatrixWorld(r)}}const n=new m.Vector3,g=new m.Vector3(0,1,0),k=new m.Quaternion,e=new m.Vector3,b=new m.Matrix4,c=new m.Vector3(1,0,0),d=new m.Vector3(0,1,0),f=new m.Vector3(0,0,1),l=new m.Vector3,p=new m.Vector3,q=new m.Vector3;return h});
define("tdv/player/view/webgl/system/transformControls/TransformControls",["require","three.mod","tdv/player/view/webgl/system/transformControls/TransformControlsGizmo","tdv/player/view/webgl/system/transformControls/TransformControlsPlane"],function(a){function m(r,t,u){r=t.intersectObject(r,!0);for(t=0;t<r.length;t++)if(r[t].object.visible||u)return r[t];return!1}var h=a("three.mod"),n=a("tdv/player/view/webgl/system/transformControls/TransformControlsGizmo"),g=a("tdv/player/view/webgl/system/transformControls/TransformControlsPlane");
const k=new h.Vector3,e=new h.Vector3,b=new h.Quaternion,c={X:new h.Vector3(1,0,0),Y:new h.Vector3(0,1,0),Z:new h.Vector3(0,0,1)},d={type:"change"},f={type:"mouseDown",mode:null},l={type:"mouseUp",mode:null},p={type:"objectChange"};class q extends h.Object3D{constructor(r){super();this.camera=r;this.visible=!1;this.AA=r=new n(this);this.add(r);this.oh=r=new g(this);this.add(r);this.object=void 0;this.enabled=!0;this.axis=null;this.mode="translate";this.yk=!1;this.Sw=this.Vqa=this.Kp=null;this.Wra=
"world";this.size=1;this.ZRa=this.YRa=this.XRa=!0;this.offset=new h.Vector3;this.rSa=new h.Vector3;this.sKa=new h.Vector3;this.zi=new h.Vector3;this.cjb=new h.Vector3;this.yPa=new h.Quaternion;this.oqa=new h.Quaternion;this.pqa=new h.Vector3;this.Bob=new h.Vector3;this.Aaa=new h.Quaternion;this.Aob=new h.Vector3;this.wqa=new h.Vector3;this.bK=new h.Quaternion;this.Yqa=new h.Vector3;this.sB=new h.Vector3;this.LK=new h.Vector3;this.MK=new h.Quaternion;this.Wsa=new h.Quaternion;this.Ec=new h.Vector3;
this.WIa=new h.Quaternion;this.WA=new h.Vector3;this.VA=new h.Vector3;this.LE=new h.Vector3;this.rotationAngle=0;this.eye=new h.Vector3}updateMatrixWorld(r=!1){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this.cjb,this.yPa,this.pqa),this.object.matrixWorld.decompose(this.sB,this.MK,this.Aob),this.oqa.copy(this.yPa).invert(),this.Aaa.copy(this.MK).invert());
this.camera.updateMatrixWorld();this.camera.matrixWorld.decompose(this.Ec,this.WIa,this.zi);this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.Ec).sub(this.sB).normalize();super.updateMatrixWorld(r)}ljb(r){if(this.object!==void 0&&this.yk!==!0&&this.axis!==null){if(r=m(this.oh,r,!0))this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.wqa.copy(this.object.position),this.bK.copy(this.object.quaternion),this.Yqa.copy(this.object.scale),
this.object.matrixWorld.decompose(this.LK,this.Wsa,this.Bob),this.WA.copy(r.point).sub(this.LK);this.yk=!0;f.mode=this.mode;this.dispatchEvent(f)}}mjb(r){if(this.yk===!1){var t=m(this.AA.Tt[this.mode],r);this.axis=t?t.object.name:null}else{t=this.axis;var u=this.mode,v=this.object,w=this.Wra;if(u==="scale")w="local";else if(t==="E"||t==="XYZE"||t==="XYZ")w="world";if(v!==void 0&&t!==null&&this.yk!==!1&&(r=m(this.oh,r,!0))){this.VA.copy(r.point).sub(this.LK);if(u==="translate")this.offset.copy(this.VA).sub(this.WA),
w==="local"&&t!=="XYZ"&&this.offset.applyQuaternion(this.Aaa),t.indexOf("X")===-1&&(this.offset.x=0),t.indexOf("Y")===-1&&(this.offset.y=0),t.indexOf("Z")===-1&&(this.offset.z=0),w==="local"&&t!=="XYZ"?this.offset.applyQuaternion(this.bK).divide(this.pqa):this.offset.applyQuaternion(this.oqa).divide(this.pqa),v.position.copy(this.offset).add(this.wqa),this.Kp&&(w==="local"&&(v.position.applyQuaternion(b.copy(this.bK).invert()),t.search("X")!==-1&&(v.position.x=Math.round(v.position.x/this.Kp)*this.Kp),
t.search("Y")!==-1&&(v.position.y=Math.round(v.position.y/this.Kp)*this.Kp),t.search("Z")!==-1&&(v.position.z=Math.round(v.position.z/this.Kp)*this.Kp),v.position.applyQuaternion(this.bK)),w==="world"&&(v.parent&&v.position.add(k.setFromMatrixPosition(v.parent.matrixWorld)),t.search("X")!==-1&&(v.position.x=Math.round(v.position.x/this.Kp)*this.Kp),t.search("Y")!==-1&&(v.position.y=Math.round(v.position.y/this.Kp)*this.Kp),t.search("Z")!==-1&&(v.position.z=Math.round(v.position.z/this.Kp)*this.Kp),
v.parent&&v.position.sub(k.setFromMatrixPosition(v.parent.matrixWorld))));else if(u==="scale")t.search("XYZ")!==-1?(w=this.VA.length()/this.WA.length(),this.VA.dot(this.WA)<0&&(w*=-1),e.set(w,w,w)):(k.copy(this.WA),e.copy(this.VA),k.applyQuaternion(this.Aaa),e.applyQuaternion(this.Aaa),e.divide(k),t.search("X")===-1&&(e.x=1),t.search("Y")===-1&&(e.y=1),t.search("Z")===-1&&(e.z=1)),v.scale.copy(this.Yqa).multiply(e),this.Sw&&(t.search("X")!==-1&&(v.scale.x=Math.round(v.scale.x/this.Sw)*this.Sw||this.Sw),
t.search("Y")!==-1&&(v.scale.y=Math.round(v.scale.y/this.Sw)*this.Sw||this.Sw),t.search("Z")!==-1&&(v.scale.z=Math.round(v.scale.z/this.Sw)*this.Sw||this.Sw));else if(u==="rotate"){this.offset.copy(this.VA).sub(this.WA);u=20/this.sB.distanceTo(k.setFromMatrixPosition(this.camera.matrixWorld));r=!1;if(t==="XYZE")this.LE.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(k.copy(this.LE).cross(this.eye))*u;else if(t==="X"||t==="Y"||t==="Z")this.LE.copy(c[t]),k.copy(c[t]),
w==="local"&&k.applyQuaternion(this.MK),k.cross(this.eye),k.length()===0?r=!0:this.rotationAngle=this.offset.dot(k.normalize())*u;if(t==="E"||r)this.LE.copy(this.eye),this.rotationAngle=this.VA.angleTo(this.WA),this.rSa.copy(this.WA).normalize(),this.sKa.copy(this.VA).normalize(),this.rotationAngle*=this.sKa.cross(this.rSa).dot(this.eye)<0?1:-1;this.Vqa&&(this.rotationAngle=Math.round(this.rotationAngle/this.Vqa)*this.Vqa);w==="local"&&t!=="E"&&t!=="XYZE"?(v.quaternion.copy(this.bK),v.quaternion.multiply(b.setFromAxisAngle(this.LE,
this.rotationAngle)).normalize()):(this.LE.applyQuaternion(this.oqa),v.quaternion.copy(b.setFromAxisAngle(this.LE,this.rotationAngle)),v.quaternion.multiply(this.bK).normalize())}this.dispatchEvent(d);this.dispatchEvent(p)}}}QPa(){this.yk&&this.axis!==null&&(l.mode=this.mode,this.dispatchEvent(l));this.yk=!1;this.axis=null}dispose(){this.traverse(r=>{r.geometry&&r.geometry.dispose();r.material&&r.material.dispose()})}attach(r){this.object=r;this.visible=!0;return this}detach(){this.object=void 0;
this.visible=!1;this.axis=null;return this}reset(){this.enabled&&this.yk&&(this.object.position.copy(this.wqa),this.object.quaternion.copy(this.bK),this.object.scale.copy(this.Yqa),this.dispatchEvent(d),this.dispatchEvent(p),this.WA.copy(this.VA))}setSize(r){this.size=r}}return q});
define("tdv/player/view/webgl/system/transformControls/System","require exports three.mod tdv/constants/EventName tdv/events/Event tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/RaycastUtil tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/transformControls/TransformControls tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){function l(w){var x=this,y=x.getComponent(k.Om),z=x.getComponent(k.Hh),A=y.kaa;
y=y.Gk;if(A&&y)if(r.nKa.find(function(F){return F!=x}))A.yk&&A.QPa(b.G6(v,A.camera,y));else{var D=y.getComponent(k.yc).WD;w.name==n.Sa?(A.ljb(b.G6(v,A.camera,y)),D.h(n.ma,l,x),A.yk&&(D.bind(n.ma,l,x,!0),A.object.userData={position:A.object.position.clone(),quaternion:A.object.quaternion.clone(),scale:A.object.scale.clone()})):w.name==n.$a?A.QPa(b.G6(v,A.camera,y)):w.name==n.gb?(f.isPresenting||D.h(n.ma,l,x),A.mjb(b.G6(v,A.camera,y))):w.name==n.ma&&(A.reset(),A.object.position.copy(A.object.userData.position),
A.object.quaternion.copy(A.object.userData.quaternion),A.object.scale.copy(A.object.userData.scale),y=q(z),A.mode=y[(y.indexOf(A.mode)+1)%y.length]);A.yk&&!x.getComponent(k.Im)?x.N(k.Im):!A.yk&&x.getComponent(k.Im)&&x.ka(k.Im);z.M&&(A.yk&&w.name==n.gb||w.name==n.ma)&&(t.compose(A.object.position,A.object.quaternion,A.object.scale),u.multiplyMatrices(A.object.parent.matrixWorld,t),z.M.o(new g(n.V,{position:A.object.position,quaternion:A.object.quaternion,scale:p(A.object.scale),matrix:t,matrixWorld:u})))}}
function p(w){var x=Math.abs(w.x-w.y)+Math.abs(w.x-w.z),y=Math.abs(w.y-w.x)+Math.abs(w.y-w.z),z=Math.abs(w.z-w.x)+Math.abs(w.z-w.y);if(!(x>y&&x>z)){if(y>x&&y>z)return w.y;if(z>x&&z>y)return w.z}return w.x}function q(w){var x=[];w.translate&&x.push("translate");w.rotate&&x.push("rotate");w.scale&&x.push("scale");x.length==0&&x.push("translate");return x}var r=function(w){function x(){var y=w.call(this)||this;y.xb=y.xb.bind(y);y.ib=y.ib.bind(y);y.Ca=y.Ca.bind(y);return y}P(x,w);x.prototype.Yc=function(){this.TSa.v.length&&
this.TSa.v.slice().forEach(this.xb);this.USa.v.length&&this.USa.v.slice().forEach(this.Ca);this.VSa.v.length&&this.VSa.v.slice().forEach(this.Ca);this.SSa.v.length&&this.SSa.v.slice().forEach(this.ib);x.nKa=this.pA.v};x.prototype.xb=function(y){y.N(k.Om)};x.prototype.ib=function(y){this.iob(y);this.ou(y)};x.prototype.iob=function(y){var z=y.getComponent(k.Object3D).sa,A;a:{for(A=z;A;){if(!A.visible){A=!1;break a}A=A.parent}A=!0}A||(z=null);var D=c.Sf(y),F=D&&c.uw(D),C=y.getComponent(k.Hh);A=y.getComponent(k.Om).kaa;
A&&z&&A.camera===F&&A.parent===D||(A&&(A.object.parent.remove(A.object),A.detach(),A.dispose()),A=null,F&&z&&D&&(A=new d(F),A.attach(new h.Object3D),D.add(A)),y.O(k.Om).kaa=A);A&&z&&(z.parent!=A.object.parent&&(A.object.parent&&A.object.parent.remove(A.object),z.parent&&z.parent.add(A.object)),y=q(C),y.indexOf(A.mode)==-1&&(A.mode=y[0]),A.object.matrix.copy(z.matrix),A.object.matrix.decompose(A.object.position,A.object.quaternion,A.object.scale))};x.prototype.ou=function(y){var z=y.getComponent(k.Om),
A=this.Hfb(y),D=A&&A.getComponent(k.yc).WD||null,F=(z=z.Gk)&&z.getComponent(k.yc);F=F&&F.WD||null;A!=z&&(F&&(F.h(n.Sa,l,y),F.h(n.$a,l,y),F.h(n.gb,l,y),F.h(n.ma,l,y)),y.O(k.Om).pe=D)&&(D.bind(n.Sa,l,y,!0),D.bind(n.$a,l,y,!0),D.bind(n.gb,l,y,!0));A!=z&&(y.O(k.Om).Gk=A)};x.prototype.Hfb=function(y){return this.Wj.v.length?this.Wj.v.reduce(function(z,A){if(A.T!==y.T)return z;if(!z)return A;var D=A.getComponent(k.yc);return!z.getComponent(k.yc).Ug&&D.Ug?A:z}):null};x.prototype.Ca=function(y){var z=y.getComponent(k.Om),
A=z&&z.kaa;A&&(A.object.parent.remove(A.object),A.detach(),A.dispose());if(z=z.pe)z.h(n.Sa,l,y),z.h(n.$a,l,y),z.h(n.gb,l,y),z.h(n.ma,l,y);y.ka(k.Om)};x.J={};x.nKa=[];return x}(e),t=new h.Matrix4,u=new h.Matrix4,v=new h.Raycaster;r.J.pA=[k.Im];r.J.Wj=[k.yc];r.J.SSa=[k.Object3D,k.Hh,k.Om];r.J.TSa=[k.Object3D,k.Hh,k.Om.aa];r.J.USa=[k.Object3D.aa,k.Om];r.J.VSa=[k.Hh.aa,k.Om];return r});
define("tdv/view/av/VideoFrame",["require","exports"],function(){var a=function(){var m=document.createElement("canvas");m.width=m.height=256;m.getContext("2d").clearRect(0,0,m.width,m.height);return m}();return function(){function m(h,n,g){this.yFa=h;this.cGa=n;this.$u=g||a}m.prototype.isEmpty=function(){return this.$u==a||this.$u.tagName=="CANVAS"&&(this.$u.width==0||this.$u.height==0)};m.prototype.isEqual=function(h){return this.yFa==h.yFa&&this.cGa==h.cGa&&this.$u==h.$u};return m}()});
define("tdv/view/av/VideoLevelUtil",["require","exports","tdv/player/view/util/Capabilities","tdv/player/view/util/Device","tdv/player/view/util/FileType"],function(a,m,h,n,g){function k(c){return h.HSa(c)}function e(c,d){if(!d)return!0;var f=c.get("url"),l=c.get("srcObject");c=c.get("type")||"";switch(d){case "srcObj":return!!l;case "webm":return g.is(f,g.yWa)||b(c,"webm");case "h265":return g.is(f,g.eVa)||(g.is(f,g.iua)||g.is(f,g.Pta)||!f)&&(b(c,"hev1")||b(c,"h265")||b(c,"heic"))?!0:!1;case "mp4":return g.is(f,
g.iua)||b(c,"mp4");case "hls":return g.is(f,g.HLS)||b(c,"x-mpegurl");case "ogv":return g.is(f,g.HVa)||b(c,"ogg");case "mov":return g.is(f,g.Pta)||b(c,"quicktime");default:return!1}}function b(c,d){return(c||"").toLowerCase().indexOf(d)>=0}return function(){function c(){}c.lgb=function(d){return c.select(d.get("levels"))};c.igb=function(d){return c.select(d.get("levels"))};c.select=function(d){d||(d=[]);d=d.slice();var f=[];f.push({type:"srcObj",ju:!0});h.Fgb&&f.push({type:"hls",ju:!1});h.Ygb&&f.push({type:"h265",
ju:!0});h.Roa&&f.push({type:"webm",ju:!0});h.k8&&f.push({type:"mp4",ju:!0});h.Zgb&&f.push({type:"mov",ju:!0});h.Qoa&&f.push({type:"ogv",ju:!0});f.push({type:"mp4",ju:!0});f.push({type:"webm",ju:!0});f.push({type:"mp4",ju:!1});f.push({type:"webm",ju:!1});for(var l=0;l<f.length;l++){var p=d;f[l].ju&&(p=p.filter(k));p=p.filter(function(q){if(e(q,f[l].type))return!0});f[l].type!="hls"&&p.sort(function(q,r){return r.get("width")-q.get("width")});if(p.length)return p[0]}return null};return c}()});
define("tdv/view/av/VideoPlayer","require exports tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/parser/ClassInfo tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/av/HTMLMediaPlayer tdv/view/av/Subtitle tdv/view/av/VideoFrame tdv/view/av/AVProperties tdv/view/av/MediaType tdv/view/av/SharedPlayerOrchestrator tdv/view/av/VideoLevelUtil".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u){function v(w){c.Tb()==
c.Yj&&(w=d.MD(w,"playbacksession="+(new Date).getTime()));return w}return function(w){function x(y,z,A){var D=w.call(this)||this;D.Gb=y;D.C=z;D.W_a=A;D.hb=x.zk(D.C);D.qV();D.C.bind(g.L("subtitlesURL"),D.nk,D,!0);D.C.bind(g.L("gain"),D.QH,D,!0);D.C.bind(g.L("ambisonic"),D.LH,D,!0);D.hb.bind(g.L("srcObject"),D.nk,D,!0);D.hb.bind(g.L("subtitlesURL"),D.nk,D,!0);D.hb.bind(g.L("url"),D.nk,D,!0);D.hb.bind(g.L("gain"),D.QH,D,!0);D.hb.bind(g.L("ambisonic"),D.LH,D,!0);D.I=k.ca;D.ac=0;D.og=0;D.vf=!1;D.kt=1;
D.gq=null;D.Ql=!1;D.Jb=null;D.ja=null;D.LL=!1;D.n0=void 0;D.Nwa=!1;D.bq=[];return D}P(x,w);x.prototype.Xb=function(){return this.Gb};x.prototype.Zc=function(y){this.I==y||y==k.$b&&this.I!=k.PLAYING||(this.Nwa&&y==k.PLAYING&&this.I==k.ca&&this.Lda(),this.I=y,this.I==k.PLAYING?(this.Jb&&this.Jb.play(this.Gb,this.A,this.og),t.Z9(this)):(t.Rua?this.Jb&&this.Jb.stop():t.wY(this),this.I==k.ca&&this.Bka()),this.Ala())};x.prototype.getState=function(){return this.I};x.prototype.mj=function(){return this.ac};
x.prototype.setCurrentTime=function(y){this.og=y;this.Jb&&(this.Jb.CJ()&&this.ZR(),this.Jb.play(this.Gb,this.A,this.og))};x.prototype.getCurrentTime=function(){return this.og};x.prototype.cu=function(y){this.gq=y;this.Jb&&this.Jb.cu(y)};x.prototype.Uw=function(y){this.Jb?this.Jb.Uw(y):this.Wx=(y===null||y===void 0?void 0:y.clone())||null};x.prototype.jB=function(y){this.kt=y;this.Jb&&this.Jb.jB(y)};x.prototype.Bg=function(y){this.vf=y;this.Jb&&this.Jb.Bg(y)};x.prototype.setLoop=function(y){this.Ql=
y;this.Jb&&this.Jb.setLoop(y)};x.prototype.skb=function(){this.Nwa=!0};x.prototype.WO=function(y,z,A){this.Jb&&this.Jb.CJ()?this.Jb.WO(y,z,A):this.LL?y.drawImage(this.ja,0,0,z,A):y.fillRect(0,0,z,A)};x.prototype.G7=function(){if(this.Jb&&this.Jb.CJ()){var y=this.Jb.getCurrentTime(),z=this.Jb.cd;if(this.PS())return new p(this.A.src,this.n0,this.ja);this.Lda();return new p(this.A.src,y,z)}return this.LL?new p(this.A.src,this.og,this.ja):new p(this.A.src,this.og,void 0)};x.prototype.Rqa=function(){return!this.vf&&
this.C.get("hasAudio")};x.prototype.getType=function(){return r.Wp};x.prototype.JLa=function(){return e.Wp};x.prototype.vKa=function(y){this.Jb=y;setTimeout(function(){this.Jb&&this.Jb.bind(f.Cl,this.LT,this,!0)}.bind(this),0);this.qV();this.Jb.bind(f.Dg,this.Nf,this,!0);this.Jb.bind(f.Zj,this.$o,this,!0);this.Jb.bind(g.Bl,this.Fj,this,!0);this.Jb.Bg(this.vf);this.Jb.jB(this.kt);this.Jb.setLoop(this.Ql);this.Jb.Uw(this.Wx);this.Jb.cu(this.gq);this.Jb.play(this.Gb,this.A,this.og)};x.prototype.uNa=
function(){this.Jb&&(this.Jb.CJ()&&this.ZR(),this.og=this.Jb.getCurrentTime(),this.Jb.h(f.Cl,this.LT,this),this.Jb.h(f.Dg,this.Nf,this),this.Jb.h(f.Zj,this.$o,this),this.Jb.h(g.Bl,this.Fj,this),this.I==k.ca&&(this.Jb.stop(),this.Jb.setCurrentTime(0),this.BZa()),this.Jb=null)};x.prototype.clear=function(){t.wY(this);this.Lda();this.C&&(this.C.h(g.L("subtitlesURL"),this.nk,this),this.C.h(g.L("gain"),this.QH,this),this.C.h(g.L("ambisonic"),this.LH,this));this.hb&&(this.hb.h(g.L("subtitlesURL"),this.nk,
this),this.hb.h(g.L("url"),this.nk,this),this.hb.h(g.L("srcObject"),this.nk,this),this.hb.h(g.L("gain"),this.QH,this),this.hb.h(g.L("ambisonic"),this.LH,this))};x.prototype.nk=function(){var y=this;this.jI&&clearTimeout(this.jI);this.jI=setTimeout(function(){y.jI=null;y.Jb&&(y.A.Gm=y.C.get("subtitlesURL")||y.hb.get("subtitlesURL"),y.A.src=y.hb.get("srcObject")||v(y.hb.get("url")),y.Jb.play(y.Gb,y.A,y.og))},10)};x.prototype.QH=function(){this.Jb&&(this.A.gain=this.C.get("gain",1)*this.hb.get("gain",
1),this.Jb.WY(this.A.gain))};x.prototype.LH=function(){this.Jb&&(this.A.mt=this.C.get("ambisonic")=="foa"||this.hb.get("ambisonic")=="foa",this.Jb.SY(this.A.mt))};x.prototype.qV=function(){this.A=new q;this.A.src=this.hb.get("srcObject")||v(this.hb.get("url"));this.A.Gm=this.C.get("subtitlesURL")||this.hb.get("subtitlesURL");this.A.gE=this.C.get("hasAudio",!0)&&this.hb.get("hasAudio",!0);this.A.gain=this.C.get("gain",1)*this.hb.get("gain",1);this.A.mt=this.C.get("ambisonic")=="foa"||this.hb.get("ambisonic")==
"foa";this.A.VW=this.W_a};x.prototype.ZR=function(){this.ja||(this.ja=document.createElement("canvas"));if(!this.PS()){this.ja.width=this.Jb.hg();this.ja.height=this.Jb.xg();this.n0=this.Jb.getCurrentTime();var y=this.ja.getContext("2d");y.clearRect(0,0,this.ja.width,this.ja.height);this.LL=this.Jb.WO(y,this.ja.width,this.ja.height)}};x.prototype.PS=function(){var y=this.Jb.getCurrentTime();this.ac&&(y=Math.min(y,this.ac));return this.LL&&Math.abs(y-this.n0)<=.15};x.prototype.Lda=function(){this.LL&&
(this.n0=void 0,this.LL=!1,c.Tb()!=c.Yj&&(this.ja.width=0,this.ja.height=0,this.ja=null))};x.prototype.$o=function(){this.ac=this.Jb.mj();this.vla()};x.prototype.Nf=function(){var y=this.Jb.mj();y!==0&&(this.ac!=y&&this.$o(),this.og=this.Jb.getCurrentTime(),c.Nd()==c.vj&&this.og>0&&this.og>this.ac-.15&&!this.PS()&&!this.Ql?this.ZR():c.Tb()==c.Yj&&this.og>0&&this.og>this.ac-.05&&!this.PS()&&!this.Ql?this.ZR():c.Tb()==c.Pp&&this.og>0&&this.og>this.ac-.05&&!this.PS()&&this.Ql&&this.ZR(),this.$V())};
x.prototype.Fj=function(){var y=this;this.bq=this.Jb.fP().map(function(z){for(var A=null,D=0;D<y.bq.length&&!A;D++)y.bq[D].cue==z&&(A=y.bq[D]);A||(A=new l(z));return A});this.o(new h(g.Bl))};x.prototype.BZa=function(){this.bq.length!=0&&(this.bq=[],this.o(new h(g.Bl)))};x.prototype.LT=function(){this.Zc(k.ca);this.wla()};x.prototype.Bka=function(){this.og=0;this.$V()};x.prototype.$V=function(){this.o(new h(x.Dg))};x.prototype.vla=function(){this.o(new h(x.Zj))};x.prototype.wla=function(){this.o(new h(g.Ub))};
x.prototype.Ala=function(){this.o(new h(g.Pd))};x.zk=function(y){if(b.Oa("Video360Resource",y))return u.igb(y);if(b.Oa("VideoResource",y))return u.lgb(y);throw"invalid video resource object: "+y;};x.Dg="time update";x.Zj="duration update";return x}(n)});
define("tdv/player/view/webgl/system/videoMaterial/VideoPlayerController",["require","tdv/constants/EventName","tdv/constants/PlaybackState","tdv/events/Event","tdv/view/av/VideoPlayer"],function(a){function m(e,b,c,d){this.ra=e;this.A=b;this.Fe=c;this.Na=d;this.Je=e.Xb();this.og=this.A.get("currentTime");this.I=this.A.get("state");this.Ql=this.A.get("loop");this.l4=this.Je.get("mute");this.b3=this.A.get("mute");this.I=this.A.get("autoplay")?n.PLAYING:n.$b;this.Qca();this.A.set("state",this.I);this.ra.Bg(this.l4||
this.b3);this.ra.setLoop(this.Ql);this.ra.setCurrentTime(this.og);this.ra.Zc(this.I)}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=a("tdv/view/av/VideoPlayer");m.prototype.dispose=function(){this.Pja()};m.prototype.ECa=function(){var e=this.A.get("currentTime",0);this.og!=e&&this.ra.setCurrentTime(this.og=e)};m.prototype.ICa=function(){var e=this.A.get("state",n.ca);this.I!=e&&this.ra.Zc(this.I=e)};m.prototype.GCa=function(){var e=this.A.get("mute",
!1);this.b3!=e&&this.ra.Bg(this.l4||(this.b3=e))};m.prototype.FCa=function(){var e=this.A.get("loop",!1);this.Ql!=e&&this.ra.setLoop(this.Ql=e)};m.prototype.hU=function(){var e=this.Je.get("mute",!1);this.l4!=e&&this.ra.Bg((this.l4=e)||this.b3)};m.prototype.rU=function(){this.A.set("currentTime",this.og=this.ra.getCurrentTime())};m.prototype.pU=function(){this.A.set("duration",this.ra.mj())};m.prototype.qU=function(){this.A.set("state",this.I=this.ra.getState());this.Na()};m.prototype.sU=function(){this.Fe.o(new g(h.Ub))};
m.prototype.Qca=function(){this.Je.bind(h.L("mute"),this.hU,this,!0);this.ra.bind(k.Dg,this.rU,this,!0);this.ra.bind(k.Zj,this.pU,this,!0);this.ra.bind(h.Pd,this.qU,this,!0);this.ra.bind(h.Ub,this.sU,this,!0);this.A.bind(h.L("currentTime"),this.ECa,this,!0);this.A.bind(h.L("state"),this.ICa,this,!0);this.A.bind(h.L("mute"),this.GCa,this,!0);this.A.bind(h.L("loop"),this.FCa,this,!0)};m.prototype.Pja=function(){this.Je.h(h.L("mute"),this.hU,this,!0);this.ra.h(k.Dg,this.rU,this,!0);this.ra.h(k.Zj,this.pU,
this,!0);this.ra.h(h.Pd,this.qU,this,!0);this.ra.h(h.Ub,this.sU,this,!0);this.A.h(h.L("currentTime"),this.ECa,this,!0);this.A.h(h.L("state"),this.ICa,this,!0);this.A.h(h.L("mute"),this.GCa,this,!0);this.A.h(h.L("loop"),this.FCa,this,!0)};return m});
define("tdv/player/view/webgl/system/videoMaterial/TextureController","require tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/webgl/system/util/texture/Util tdv/player/view/webgl/system/util/Util tdv/player/view/util/Device".split(" "),function(a){function m(f,l,p,q){this.$0=d.Tb()==d.ox?THREE.LinearSRGBColorSpace:l.get("encoding","srgb")=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;
this.es();this.ra=f;this.A=l;this.hb=p;this.Na=q;this.sN=this.hb.get("posterURL");this.GHa=this.hb.get("url");this.Pa=this.hb.get("width");this.Ha=this.hb.get("height");this.Hg=null;this.AI=this.BI=void 0;this.lAa();this.hb.bind(h.L("posterURL"),this.CCa,this,!0);this.Na();this.ga=this.ja=null}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/constants/Priority"),k=a("tdv/player/view/image/Item"),e=a("tdv/player/view/image/Repository"),b=a("tdv/player/view/webgl/system/util/texture/Util"),
c=a("tdv/player/view/webgl/system/util/Util"),d=a("tdv/player/view/util/Device");m.prototype.update=function(){var f=this.ra.G7();f.isEmpty()&&(f=null);if(f&&(!this.Hg||this.Hg&&!this.Hg.isEqual(f))){this.Hg=f;f=this.Hg.$u;var l=c.zP(f);l&&(f.width=f.videoWidth||this.Pa,f.height=f.videoHeight||this.Ha);!this.ja&&this.GHa&&c.NTa(this.GHa)&&(this.ja=document.createElement("canvas"),this.ja.width=this.Pa,this.ja.height=this.Ha,this.ga=this.ja.getContext("2d"));this.ja&&l&&(this.ga.drawImage(f,0,0,this.ja.width,
this.ja.height),f=this.ja);this.jFa(f)}else!this.Hg&&this.uz&&this.Ma.image!=this.uz&&this.jFa(this.uz);(this.Ma.needsUpdate||this.ra.getState()==n.PLAYING)&&this.Na()};m.prototype.CCa=function(){this.Z8a(this.hb.get("posterURL"))};m.prototype.Z8a=function(f){this.sN!=f&&(this.xGa(),this.sN=f,this.lAa())};m.prototype.lAa=function(){this.sN&&(this.uz=null,this.rN=new k,this.rN.jQ([this.sN]),this.rN.bind(h.ia,this.BCa,this,!0),e.GA(this.rN,this.A.get("loadPriority",g.Jm)))};m.prototype.xGa=function(){this.sN&&
(this.rN.h(h.ia,this.BCa,this,!0),e.ho(this.rN,this.A.get("loadPriority",g.Jm)),this.uz=this.rN=null)};m.prototype.BCa=function(){this.uz=e.yg(this.sN);if(this.uz.width!=this.Pa||this.uz.height!=this.Ha){var f=document.createElement("canvas"),l=f.getContext("2d");f.width=this.Pa;f.height=this.Ha;l.drawImage(this.uz,0,0,this.Pa,this.Ha);this.uz=f}this.Na()};m.prototype.jFa=function(f){this.Ma&&this.BI==f.width&&this.AI==f.height?this.Ma.image=f:this.es(f);this.Ma.needsUpdate=!0};m.prototype.es=function(f){this.R0();
this.Ma=new THREE.Texture;this.Ma.image=f||b.eLa();this.BI=this.Ma.image.width;this.AI=this.Ma.image.height;this.Ma.generateMipmaps=!1;this.Ma.minFilter=THREE.LinearFilter;this.Ma.magFilter=THREE.LinearFilter;this.Ma.format=THREE.RGBAFormat};m.prototype.R0=function(){this.Ma&&(this.AI=this.BI=void 0,this.Ma.dispose(),this.Ma=null)};m.prototype.dispose=function(){this.xGa();this.hb.h(h.L("posterURL"),this.CCa,this,!0);this.ga=this.hb=null;this.ja&&(this.ja=this.ja.width=this.ja.height=0);this.R0();
this.Na=this.Th=this.ra=null};m.prototype.Z7=function(){return this.Ma};return m});
define("tdv/player/view/webgl/system/videoMaterial/AlphaMapController","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/image/Item tdv/player/view/image/Repository three.mod".split(" "),function(a,m,h,n,g,k,e,b){var c=["alphaMap"];return function(){function d(f,l,p){this.nkb=function(q){this.B6!=q&&(this.kTa(),this.B6=q,this.Yhb())};this.properties=f;this.level=l;this.Qa=p;this.t9=this.t9.bind(this);h.ba(this.level,c,this.t9,!0)}d.prototype.dispose=
function(){h.da(this.level,c,this.t9);this.kTa();this.ueb()};d.prototype.Z7=function(){return this.texture};d.prototype.t9=function(){this.nkb(this.level.get("alphaMapURL"))};d.prototype.Yhb=function(){this.B6&&(this.XI=new k,this.XI.jQ([this.B6]),this.XI.bind(n.ia,this.tOa,this,!0),e.GA(this.XI,this.properties.get("loadPriority",g.Jm)))};d.prototype.kTa=function(){this.XI&&(this.XI.h(n.ia,this.tOa,this,!0),e.ho(this.XI,this.properties.get("loadPriority",g.Jm)),this.jIa=this.XI=null)};d.prototype.tOa=
function(){this.jIa=e.yg(this.B6);this.createTexture();this.Qa()};d.prototype.createTexture=function(){this.texture=new b.Texture;this.texture.image=this.jIa;this.texture.generateMipmaps=!1;this.texture.minFilter=b.LinearFilter;this.texture.magFilter=b.LinearFilter;this.texture.format=b.RGBAFormat;this.texture.needsUpdate=!0};d.prototype.ueb=function(){this.texture&&(this.texture.dispose(),this.texture=null)};return d}()});
define("tdv/player/view/webgl/system/util/material/VideoShader",["require","tdv/player/view/util/Device","tdv/player/view/webgl/system/util/Util"],function(a){a("tdv/player/view/util/Device");var m=a("tdv/player/view/webgl/system/util/Util");return{wUa:function(){this.blending=0;this.DP=void 0;this.aSa=this.threshold=0},wWa:function(){this.uP=!1;this.height=this.width=100},create:function(h,n,g){var k=h.uP&&m.AMa(),e=h.uP&&m.zMa(),b=void 0,c=!k,d={uniforms:{},transparent:!0};d.uniforms.text1={type:"sampler2D",
value:null};d.uniforms.textAlpha={type:"sampler2D",value:null};d.uniforms.validTextAlpha={type:"bool",value:!1};d.uniforms.opacity={type:"float",value:1};d.vertexShader=["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+(k?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(e||n.blending||n.DP){k=[];var f=[];k=k.concat(["uniform sampler2D text1;","uniform sampler2D textAlpha;","uniform bool validTextAlpha;","uniform float opacity;",
"varying vec2 vUV;"]);f=f.concat(["   vec4 color = texture2D(text1, vUV);","   float alpha = color.a * opacity;","   if (validTextAlpha)","       alpha *= texture2D(textAlpha, vUV).r;"]);n.blending&&(b=Math.min(h.width,h.height)*.5*n.blending,d.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(b/h.width,b/h.height)},k=k.concat(["uniform vec2 blendingLimit;"]),f=f.concat("   float xCoef = 0.0;,   float yCoef = 0.0;,   if (vUV.x < blendingLimit.x) {,      xCoef = 1.0 - (vUV.x / blendingLimit.x);,      xCoef = xCoef * xCoef;,   } else if ((1.0 - vUV.x) < blendingLimit.x) {,      xCoef = 1.0 - ((1.0 - vUV.x) / blendingLimit.x);,      xCoef = xCoef * xCoef;,   },   if (vUV.y < blendingLimit.y) {,      yCoef = 1.0 - (vUV.y / blendingLimit.y);,      yCoef = yCoef * yCoef;,   } else if ((1.0 - vUV.y) < blendingLimit.y) {,      yCoef = 1.0 - ((1.0 - vUV.y) / blendingLimit.y);,      yCoef = yCoef * yCoef;,   },   alpha = alpha * (1.0 - sqrt(xCoef + yCoef));".split(",")));
n.DP&&(d.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(n.DP.substr(1,2),16)/255,parseInt(n.DP.substr(3,2),16)/255,parseInt(n.DP.substr(5,2),16)/255)},d.uniforms.chromaThreshold={type:"f",value:n.threshold},d.uniforms.chromaSmoothing={type:"f",value:n.aSa},k=k.concat(["uniform vec3 chromaColor;","uniform float chromaThreshold;","uniform float chromaSmoothing;"]),f=f.concat("    float maskY = 0.2989 * chromaColor.r + 0.5866 * chromaColor.g + 0.1145 * chromaColor.b;{    float maskCr = 0.7132 * (chromaColor.r - maskY);{    float maskCb = 0.5647 * (chromaColor.b - maskY);{    float Y = 0.2989 * color.r + 0.5866 * color.g + 0.1145 * color.b;{    float Cr = 0.7132 * (color.r - Y);{    float Cb = 0.5647 * (color.b - Y);{    float chromaBlendValue = smoothstep(chromaThreshold, chromaThreshold + chromaSmoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb)));{    alpha = alpha * chromaBlendValue;".split("{")));
f=f.concat(["\tgl_FragColor = vec4(color"+(e?".bgr":".rgb")+", alpha);"]);b=THREE.RGBAFormat;d.fragmentShader=[].concat(k,["void main() {"],f,[],["}"]).join("\n")}else d.fragmentShader="uniform sampler2D text1;\nuniform sampler2D textAlpha;\nuniform bool validTextAlpha;\nuniform float opacity;\nvarying vec2 vUV;\nvoid main() {\n   vec4 color = texture2D(text1, vUV);\n   float alpha = color.a * opacity;\n   if (validTextAlpha)\n       alpha *= 1.0 - texture2D(textAlpha, vUV).r;\n\tgl_FragColor = vec4(color.rgb, alpha);\n\n}";
h=new THREE.ShaderMaterial(d);h.transparent=!0;h.depthWrite=!0;h.side=THREE.FrontSide;h.depthTest=!0;h.needsUpdate=!0;h.userData.NSa=c;h.userData.OSa=b;this.KZ(h,g);return h},KZ:function(h,n){h.uniforms.text1.value!==n&&(h.userData.NSa!==void 0&&(n.flipY=h.userData.NSa),h.userData.OSa!==void 0&&(n.format=h.userData.OSa),h.uniforms.text1.value=n)},onb:function(h,n){h.uniforms.textAlpha.value!==n&&(h.uniforms.textAlpha.value=n,h.uniforms.validTextAlpha.value=!!n)}}});
define("tdv/player/view/webgl/system/videoMaterial/Behaviour","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/webgl/system/videoMaterial/VideoPlayerController tdv/player/view/webgl/system/videoMaterial/TextureController tdv/player/view/webgl/system/videoMaterial/AlphaMapController tdv/player/view/webgl/system/util/material/VideoShader tdv/player/view/webgl/system/util/Util tdv/player/view/webgl/components tdv/view/av/SubtitleController tdv/view/av/VideoPlayer".split(" "),
function(a){function m(q){this.B=q;this.o3=this.o3.bind(this);q=q.getComponent(f.ro);this.Fe=q.M;this.A=q.properties;this.n6=q.Qsa;this.Je=this.B.T.dr();this.Na=this.Na.bind(this);this.ih=!1;this.hb=null;h.ba(this.n6,["levels.url","levels.srcObject","levels.width","levels.height"],this.o3,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/view/webgl/system/videoMaterial/VideoPlayerController"),e=a("tdv/player/view/webgl/system/videoMaterial/TextureController"),
b=a("tdv/player/view/webgl/system/videoMaterial/AlphaMapController"),c=a("tdv/player/view/webgl/system/util/material/VideoShader"),d=a("tdv/player/view/webgl/system/util/Util"),f=a("tdv/player/view/webgl/components"),l=a("tdv/view/av/SubtitleController"),p=a("tdv/view/av/VideoPlayer");m.prototype.update=function(){this.ih&&(this.ih=!1,this.Pq.update(),c.KZ(this.Aa,this.Pq.Z7()),c.onb(this.Aa,this.Tca.Z7()))};m.prototype.o3=function(){this.iV(p.zk(this.n6))};m.prototype.iV=function(q){q=q&&(q.get("url")||
q.get("srcObject"))?q:null;this.hb!=q&&(this.hb&&(this.FHa.dispose(),this.FHa=null,this.A.h(n.L("opacity"),this.HCa,this,!0),this.Hea(),this.Pq.dispose(),this.Pq=null,this.Tca.dispose(),this.Tca=null,this.e0a(),this.ih=!1),this.hb=q)&&(this.O_a(),this.FHa=new k(this.ra,this.A,this.Fe,this.Na),this.Pq=new e(this.ra,this.A,this.hb,this.Na),this.Tca=new b(this.A,this.hb,this.Na),this.my(),this.A.bind(n.L("opacity"),this.HCa,this,!0),this.YEa(this.Of=this.A.get("opacity",1)),this.ih=!1,this.Na())};m.prototype.Na=
function(){this.ih||(this.ih=!0,this.B.T.Qa())};m.prototype.O_a=function(){this.ra=new p(this.B.T.dr(),this.n6);this.yn=new l(this.A,this.ra)};m.prototype.e0a=function(){this.ra.Zc(g.ca);this.ra.clear();this.ra=null;this.yn.clear();this.yn=null};m.prototype.my=function(){var q=new c.wWa;q.uP=!this.hb.get("srcObject")&&d.uP(this.hb.get("url"));q.width=this.hb.get("width");q.height=this.hb.get("height");var r=new c.wUa;r.blending=this.A.get("blending",0);r.DP=this.A.get("chromaColor");r.threshold=this.A.get("chromaThreshold",
0);r.aSa=this.A.get("chromaSmoothing",0);this.Aa=c.create(q,r,this.Pq.Z7());this.B.N(f.Material).material=this.Aa};m.prototype.Hea=function(){this.Aa.dispose();this.Aa=null;this.B.ka(f.Material)};m.prototype.dispose=function(){this.iV(null);this.A.set("state",g.ca);this.B=this.Fe=this.A=this.Je=null;h.da(this.n6,["levels.url","levels.srcObject","levels.width","levels.height"],this.o3)};m.prototype.HCa=function(){var q=this.A.get("opacity");this.Of!=q&&(this.YEa(this.Of=q),this.Na())};m.prototype.YEa=
function(q){this.Aa.opacity=q;this.Aa.isShaderMaterial&&this.Aa.uniforms.opacity&&(this.Aa.uniforms.opacity.value=q)};m.Wa=function(q){q.N(f.XB).manager=new m(q)};m.ya=function(q){var r=q.getComponent(f.XB);r.manager.dispose();r.manager=null;q.ka(f.XB)};m.update=function(q){q.getComponent(f.XB).manager.update()};return m});
define("tdv/player/view/webgl/system/videoMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/videoMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/videoMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.On.v.length&&this.On.v.slice().forEach(g.Wa);
this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya);this.materials.v.length&&this.materials.v.slice().forEach(g.update)};a.J={};a.J.On=[n.ro,n.XB.aa];a.J.materials=[n.ro,n.XB];a.J.Pn=[n.ro.aa,n.XB];return a});
define("tdv/player/view/webgl/system/viewport/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/components"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/system/util/entity/Util"),g=a("tdv/player/view/webgl/components");a=m.extend(h,function(){h.apply(this,arguments);this.Eka=this.Eka.bind(this);this.fO=this.fO.bind(this)});a.prototype.Yc=function(){this.Rsa.fe.length&&
this.Rsa.fe.slice().forEach(this.Eka);this.XJ.Da.length&&this.XJ.Da.slice().forEach(this.fO);this.St.Da.length&&this.St.Da.slice().forEach(this.fO);this.XJ.fe.length&&this.XJ.fe.slice().forEach(this.fO);this.St.fe.length&&this.St.fe.slice().forEach(this.fO)};a.prototype.Eka=function(k){var e=k.getComponent(g.so),b=n.mX(e.Ea),c=b&&b.width||100;b=b&&b.height||100;if(e.width!=c||e.height!=b)e=k.O(g.so),e.width=c,e.height=b};a.prototype.fO=function(k){var e=n.mX(k);this.Rsa.v.forEach(function(b){if(b.getComponent(g.so).Ea==
k){var c=b.getComponent(g.so);if(c.width!=e.width||c.height!=e.height)c=b.O(g.so),c.width=e.width,c.height=e.height}})};a.J={};a.J.Rsa=[g.so];a.J.XJ=[g.OrthographicCamera];a.J.St=[g.PerspectiveCamera];return a});
define("tdv/player/view/webgl/system/util/geometry/Plane",["require"],function(){return{create:function(){var a=new THREE.BufferGeometry;a.setAttribute("position",new THREE.BufferAttribute(new Float32Array(18),3));a.setAttribute("normal",new THREE.BufferAttribute(new Float32Array(18),3));a.setAttribute("uv",new THREE.BufferAttribute(new Float32Array(12),2));a.setIndex(new THREE.BufferAttribute(new Uint32Array(6),1));return a},set:function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){var t=a.getAttribute("position").array,
u=a.getAttribute("normal").array,v=a.getAttribute("uv").array,w=a.getIndex().array;t[9]=t[0]=m;t[10]=t[1]=h;t[11]=t[2]=n;v[6]=v[0]=g;v[7]=v[1]=k;t[3]=t[0]+f;t[4]=t[1]+l;t[5]=t[2]+p;v[2]=v[0];v[3]=v[1]+q;t[12]=t[6]=t[3]+e;t[13]=t[7]=t[4]+b;t[14]=t[8]=t[5]+c;v[8]=v[4]=v[2]+d;v[9]=v[5]=v[3];t[15]=t[12]-f;t[16]=t[13]-l;t[17]=t[14]-p;v[10]=v[8];v[11]=v[9]-q;m=b*p-c*l;c=c*f-e*p;e=e*l-b*f;b=1/Math.sqrt(m*m+c*c+e*e);u[0]=u[3]=u[6]=u[9]=u[12]=u[15]=m*b;u[1]=u[4]=u[7]=u[10]=u[13]=u[16]=c*b;u[2]=u[5]=u[8]=u[11]=
u[14]=u[17]=e*b;w[0]=0;w[1]=2;w[2]=1;w[3]=3;w[4]=5;w[5]=4;a.getAttribute("position").needsUpdate=!0;a.getAttribute("normal").needsUpdate=!0;a.getAttribute("uv").needsUpdate=!0;a.clearGroups();a.addGroup(0,6,r);a.computeBoundingBox();a.computeBoundingSphere();return a}}});
define("tdv/player/view/webgl/system/util/BindableWatcher",["require","tdv/constants/EventName","tdv/events/async"],function(a){function m(g,k,e){this.qs=g;this.A=k;this.ega=e;this.O4=this.O4.bind(this);this.AL=void 0;this.A.forEach(function(b){this.qs.bind(h.L(b),this.IT,this,!0)}.bind(this));this.O4()}var h=a("tdv/constants/EventName"),n=a("tdv/events/async");m.prototype.stop=function(){this.A.forEach(function(g){this.qs.h(h.L(g),this.IT,this,!0)}.bind(this));this.AL&&(n.cancel(this.AL),this.AL=
void 0)};m.prototype.IT=function(){this.AL||(this.AL=n.ME(this.O4))};m.prototype.O4=function(){this.AL=void 0;var g=this.qs;this.ega.apply(window,this.A.map(function(k){return g.get(k)}))};return m});
define("tdv/player/view/webgl/system/viewportPlaneGeometry/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/geometry/Plane tdv/player/view/webgl/system/util/BindableWatcher tdv/player/view/webgl/system/util/entity/Util tdv/view/constants/Alignment tdv/view/constants/ScaleMode".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/geometry/Plane"),
k=a("tdv/player/view/webgl/system/util/BindableWatcher"),e=a("tdv/player/view/webgl/system/util/entity/Util"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/ScaleMode"),d=m.extend(h,function(){h.apply(this,arguments);this.Dka=this.Dka.bind(this);this.cma=this.cma.bind(this);this.ela=this.ela.bind(this)});d.prototype.Yc=function(){this.GE.v.length&&this.GE.v.slice().forEach(this.Dka);this.planes.Da.length&&this.planes.Da.slice().forEach(this.cma);this.tY.v.length&&this.tY.v.slice().forEach(this.ela)};
d.prototype.Dka=function(f){var l=f.getComponent(n.fG),p=f.N(n.so);p.Ea=l.Ea;var q=e.mX(l.Ea);q&&(p.width=q.width,p.height=q.height);p=f.N(n.Mx);p.geometry=g.create();p.iQa=new k(l.properties,"width height horizontalAlign verticalAlign scaleMode zIndex".split(" "),function(r,t,u,v,w,x){var y=f.O(n.Mx);y.eSa=r;y.cSa=t;y.Yh=u;y.verticalAlign=v;y.NE=w;y.zIndex=x});f.N(n.Geometry).geometry=p.geometry};d.prototype.ela=function(f){var l=f.getComponent(n.Mx);l.geometry.dispose();l.geometry=null;l.iQa.stop();
l.iQa=null;f.ka(n.Geometry);f.ka(n.so);f.ka(n.Mx)};d.prototype.cma=function(f){var l=f.getComponent(n.Mx),p=f.getComponent(n.so),q=p.width,r=p.height,t=l.eSa,u=l.cSa;switch(l.NE){case c.NONE:p=t;var v=u;break;case c.Tp:p=q;v=u*q/t;break;case c.Pk:v=r;p=t*r/u;break;case c.Kr:t*r>u*q?(v=r,p=t*r/u):(p=q,v=u*q/t);break;default:t*r>u*q?(p=q,v=u*q/t):(v=r,p=t*r/u)}switch(l.Yh){case b.fb:q=-q*.5;break;case b.Db:q=q*.5-p;break;default:q=-p*.5}switch(l.verticalAlign){case b.Tc:r=r*.5-v;break;case b.Hc:r=-r*
.5;break;default:r=-v*.5}t=l.zIndex-d.qVa;g.set(l.geometry,q,r,0,0,0,p,0,0,1,0,v,0,1,0);f.O(n.ta,!0).positionZ=t;f.T.Qa()};d.qVa=100;d.J={};d.J.GE=[n.fG,n.Mx.aa];d.J.planes=[n.fG,n.Mx,n.so];d.J.tY=[n.fG.aa,n.Mx];return d});
define("tdv/player/view/webgl/systems","require exports tdv/player/view/webgl/system/light/AmbientLightSystem tdv/player/view/webgl/system/animation/System tdv/player/view/webgl/system/aranchor/System tdv/player/view/webgl/system/area/System tdv/player/view/webgl/system/beacon/System tdv/player/view/webgl/system/camera/System tdv/player/view/webgl/system/cameraControls/System tdv/player/view/webgl/system/cameraOffsetTransform/System tdv/player/view/webgl/system/canvasMaterial/System tdv/player/view/webgl/system/clippingRect/System tdv/player/view/webgl/system/light/DirectionalLightSystem tdv/player/view/webgl/system/dragging/System tdv/player/view/webgl/system/floor/System tdv/player/view/webgl/system/floorTransform/System tdv/player/view/webgl/system/group/System tdv/player/view/webgl/system/grid/System tdv/player/view/webgl/system/imageMaterial/System tdv/player/view/webgl/system/lineMaterial/System tdv/player/view/webgl/system/line/System tdv/player/view/webgl/system/lineToTransform/System tdv/player/view/webgl/system/objectTransform/System tdv/player/view/webgl/system/materialVariant/System tdv/player/view/webgl/system/mesh/System tdv/player/view/webgl/system/model/System tdv/player/view/webgl/system/objectId/System tdv/player/view/webgl/system/plane/System tdv/player/view/webgl/system/parent/System tdv/player/view/webgl/system/pixelScaleTransform/System tdv/player/view/webgl/system/pointerOverTransform/System tdv/player/view/webgl/system/projectedMaterial/System tdv/player/view/webgl/system/renderer/System tdv/player/view/webgl/system/scene/System tdv/player/view/webgl/system/selection/System tdv/player/view/webgl/system/light/SpotLightSystem tdv/player/view/webgl/system/solidMaterial/System tdv/player/view/webgl/system/sphere/System tdv/player/view/webgl/system/sprite/System tdv/player/view/webgl/system/transform/System tdv/player/view/webgl/system/transformControls/System tdv/player/view/webgl/system/videoMaterial/System tdv/player/view/webgl/system/viewport/System tdv/player/view/webgl/system/viewportPlaneGeometry/System".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u,v,w,x,y,z,A,D,F,C,B,H,E,G,N,O,R,Q,K,L,U,T,Y,aa,ba,ea,ia,da){a={};a.AmbientLight=h;a.Animation=n;a.pF=g;a.lo=k;a.AB=e;a.Camera=b;a.sUa=c;a.SK=d;a.Kf=f;a.vF=l;a.DirectionalLight=p;a.Im=q;a.Mr=r;a.Ax=t;a.xu=v;a.Group=u;a.Oi=w;a.ei=x;a.Line=y;a.zu=z;a.gi=A;a.Cx=D;a.Mesh=F;a.Pi=C;a.JVa=B;a.pb=E;a.Plane=H;a.Tk=G;a.El=N;a.po=O;a.wj=R;a.Scene=Q;a.Selection=K;a.xd=U;a.Sphere=T;a.SpotLight=L;a.Sprite=Y;a.ta=aa;a.Hh=ba;a.ro=ea;a.so=ia;a.fG=da;return a});
define("tdv/view/util/Screenshot",["require","exports"],function(){return function(){function a(){}a.QSa=function(m){var h;h||(h="screenshot.jpg");a:{try{var n=m.toDataURL("image/jpeg");break a}catch(g){}n=void 0}if(!n)return!1;m=n;n=document.createElement("a");typeof n.download==="string"?(document.body.appendChild(n),n.download=h,n.href=m,n.click(),document.body.removeChild(n)):window.location.replace(m);return!0};return a}()});
define("tdv/player/view/webgl/Renderer","require exports tdv/constants/EventName tdv/view/core/UIComponent tdv/view/util/Assets tdv/player/view/Flash tdv/player/view/webgl/ecs/World tdv/player/view/webgl/components tdv/player/view/webgl/systems tdv/view/util/Screenshot".split(" "),function(a,m,h,n,g,k,e,b,c,d){function f(q){return q.map(function(r){return String.fromCharCode(r)}).join("")}a=function(q){function r(t,u,v){var w=q.call(this)||this;w.Je=t;w.P=u;w.Ebb=v;w.bA=(new e(t)).na(b.OK).na(b.AmbientLight).na(b.wB).na(b.Animation).na(b.mx).na(b.rF).na(b.pF).na(b.lx).na(b.vB).na(b.Cr).na(b.Xf).na(b.lo).na(b.xB).na(b.sF).na(b.AB).na(b.BB).na(b.Qp).na(b.sx).na(b.Kf).na(b.DB).na(b.TK).na(b.tx).na(b.SK).na(b.tUa).na(b.vF).na(b.EB).na(b.DirectionalLight).na(b.Er).na(b.vx).na(b.FB).na(b.Im).na(b.PF).na(b.Lr).na(b.QF).na(b.Nr).na(b.Mr).na(b.zx).na(b.Ax).na(b.wu).na(b.Geometry).na(b.xu).na(b.KB).na(b.Group).na(b.$K).na(b.Oi).na(b.MB).na(b.Line).na(b.ei).na(b.OB).na(b.zu).na(b.QB).na(b.PB).na(b.Material).na(b.gi).na(b.RB).na(b.Cx).na(b.Rr).na(b.Mesh).na(b.Bu).na(b.Pi).na(b.Dx).na(b.VF).na(b.EVa).na(b.Sr).na(b.WF).na(b.Object3D).na(b.hL).na(b.Ex).na(b.XF).na(b.Tr).na(b.OrthographicCamera).na(b.Cu).na(b.PerspectiveCamera).na(b.Sk).na(b.pb).na(b.Eu).na(b.Tk).na(b.ZF).na(b.Plane).na(b.UB).na(b.yc).na(b.Gx).na(b.El).na(b.Fu).na(b.Hx).na(b.po).na(b.Ur).na(b.xd).na(b.Ix).na(b.ta).na(b.dG).na(b.Gg).na(b.Hh).na(b.Om).na(b.wj).na(b.Gu).na(b.Scene).na(b.Vp).na(b.wd).na(b.$F).na(b.Sphere).na(b.aG).na(b.SpotLight).na(b.Iu).na(b.Sprite).na(b.Ju).na(b.xd).na(b.Ix).na(b.Kx).na(b.Lu).na(b.ro).na(b.XB).na(b.so).na(b.fG).na(b.Mx).na(b.nL).na(b.ng).na(b.gG).na(b.Yp).na(b.oL).na(b.Zp).na(b.pL).na(b.$p).na(b.qL).na(b.aq).ed(c.Camera,
"Camera").ed(c.so,"Viewport").ed(c.Oi,"ImageMaterial").ed(c.Kf,"CanvasMaterial").ed(c.ei,"LineMaterial").ed(c.xd,"SolidMaterial").ed(c.ro,"VideoMaterial").ed(c.Cx,"MaterialVariant").ed(c.fG,"ViewportPlaneGeometry").ed(c.xu,"Grid").ed(c.Group,"Group").ed(c.Line,"Line").ed(c.Mesh,"Mesh").ed(c.Plane,"Plane").ed(c.Mr,"Floor").ed(c.Sphere,"Sphere").ed(c.Sprite,"Sprite").ed(c.Pi,"Model").ed(c.pF,"ARAnchor").ed(c.po,"ProjectedMaterial").ed(c.AmbientLight,"AmbientLight").ed(c.DirectionalLight,"DirectionalLight").ed(c.SpotLight,
"SpotLight").ed(c.Scene,"Scene").ed(c.pb,"Parent").ed(c.JVa,"ObjectId").ed(c.Animation,"Animation").ed(c.SK,"CameraOffsetTransform").ed(c.gi,"ObjectTransform").ed(c.Ax,"FloorTransform").ed(c.sUa,"CameraControls").ed(c.Im,"Dragging").ed(c.Selection,"Selection").ed(c.El,"PointerOverTransform").ed(c.Tk,"PixelScaleTransform").ed(c.ta,"Transform").ed(c.Hh,"TransformControls").ed(c.lo,"Area").ed(c.zu,"LineToTransform").ed(c.Camera.PK,"CameraAutoNearFar").ed(c.vF,"ClippingRect").ed(c.Scene.o_,"SceneFade").ed(c.AB,
"Beacon").ed(c.wj,"Renderer");w.j=w.bA.sc("Renderer");w.qI=[];w.Ika=!1;w.bind(h.od,w.cp,w,!0);w.bind(h.jd,w.ap,w,!0);return w}P(r,q);r.prototype.Kb=function(){q.prototype.Kb.call(this);this.$G||(this.$G=new k,this.wa().uk(this.$G.cc()))};r.prototype.sc=function(t){return this.bA.sc(t)};r.prototype.dd=function(t){this.bA.dd(t)};r.prototype.Qa=function(){this.bA.Qa()};r.prototype.fIa=function(t){!(this.qI.indexOf(t)>=0)&&(this.qI.push(t),t=this.j.O(b.wj))&&(t.MY=this.qI.slice())};r.prototype.Ojb=function(t){t=
this.qI.indexOf(t);!(t<0)&&(this.qI.splice(t,1),t=this.j.O(b.wj))&&(t.MY=this.qI.slice())};r.prototype.q$=function(t){this.bA.q$(t)};r.prototype.Ra=function(t){this.bA.Ra(t)};r.prototype.jK=function(){this.$G.o();this.bA.update();return d.QSa(this.j.getComponent(b.wj).renderer.domElement)};r.prototype.mna=function(){this.bA.update();return this.j.getComponent(b.wj).renderer.domElement.toDataURL("image/png")};r.prototype.cp=function(){this.C9a()};r.prototype.ap=function(){this.u$a()};r.prototype.C9a=
function(){var t=this.j.getComponent(b.wj);if(!t&&(t=this.j.N(b.wj),t.eb=this.P,t.MY=this.qI.slice(),this.Je.get(l)&&this.Ebb)){this.rW=document.createElement("div");for(var u in p)this.rW.style[u]=p[u];this.wa().uk(this.rW)}};r.prototype.u$a=function(){this.j.getComponent(b.wj)&&(this.rW&&this.wa().a$(this.rW),this.rW=null,this.j.ka(b.wj))};return r}(n);var l=f([119,97,116,101,114,109,97,114,107]),p={};p[f([104,101,105,103,104,116])]=f([49,48,48,37]);p[f([119,105,100,116,104])]=f([49,48,48,37]);
p[f([112,111,115,105,116,105,111,110])]=f([97,98,115,111,108,117,116,101]);p[f([116,111,112])]=0;p[f([108,101,102,116])]=0;p[f([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=f([117,114,108,40,34])+g.xWa+f([34,41]);p[f([98,97,99,107,103,114,111,117,110,100,80,111,115,105,116,105,111,110])]=f([99,101,110,116,101,114]);p[f([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=f([99,111,110,116,97,105,110]);p[f([112,111,105,110,116,101,114,69,118,101,110,116,115])]=f([110,111,110,101]);
p[f([98,97,99,107,103,114,111,117,110,100,82,101,112,101,97,116])]=f([110,111,45,114,101,112,101,97,116]);p[f([111,112,97,99,105,116,121])]=.5;return a});
define("tdv/player/view/model3d/renderer/adapters/CameraAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){var b=["autoNearFar","autoNearFarTolerance","near","far","userInteracting"],c=["inTransition"],d={OrbitModel3DCamera:k.XF,FirstPersonModel3DCamera:k.PF,FlyOverModel3DCamera:k.QF},f={FirstPersonModel3DCamera:k.qL,OrbitModel3DCamera:k.oL,FlyOverModel3DCamera:k.pL};
return function(){function l(p,q,r,t){this.renderer=p;this.model=q;this.wb=r;this.Ea=t;this.eb=this.renderer.P;this.camera=null;this.enabled=!0;this.locked=!1;this.Vg=this.Vg.bind(this);this.k9=this.k9.bind(this);this.renderer.bind(n.Rb,this.tl,this,!0);this.model.bind(n.L("camera"),this.d9,this,!0);this.eb.bind(n.L("isKeyboardTarget"),this.cqa,this,!0);e.M.bind(n.V,this.Ta,this,!0);this.d9();this.Ta();this.cqa();this.tl()}l.prototype.Vw=function(p){this.locked!==p&&(this.locked=p,this.naa())};l.prototype.Ra=
function(p){this.enabled!==p&&(this.enabled=p,this.naa())};l.prototype.dispose=function(){this.setCamera(null);this.model.h(n.L("camera"),this.d9,this);this.eb.h(n.L("isKeyboardTarget"),this.cqa,this);this.renderer.h(n.Rb,this.tl,this);e.M.h(n.V,this.Ta,this)};l.prototype.Ta=function(){this.Ea.O(k.PerspectiveCamera,!0).oj=e.Uf==this.eb.Fc().sl()};l.prototype.d9=function(){this.setCamera(this.model.get("camera"))};l.prototype.setCamera=function(p){if(this.camera!==p){this.camera&&(this.aF(!1),h.da(this.camera,
b,this.Vg),h.da(this.camera,c,this.k9),this.camera.set("inTransition",!1));if(this.camera=p)h.ba(this.camera,b,this.Vg,!0),h.ba(this.camera,c,this.k9,!0),this.pcb(),this.Ea.O(k.TK,!0).properties=this.camera;this.naa()}};l.prototype.naa=function(){var p,q,r,t,u=!!this.camera&&this.camera.get("inTransition");u&&this.enabled?t=this.Ea.O(k.Kx,!0):this.Ea.ka(k.Kx);for(var v in d){var w=d[v];!u&&this.enabled&&this.camera&&g.Oa(v,this.camera)?p=this.Ea.O(w,!0):this.Ea.ka(w);(w=f[v])&&(!u&&this.enabled&&
this.camera&&g.Oa(v,this.camera)?q=this.Ea.O(w,!0):this.Ea.ka(w))}!u&&this.enabled?r=this.Ea.O(k.vB,!0):this.Ea.ka(k.vB);p&&(p.properties=this.camera,p.Rf=this.renderer.getParent(),p.HQa=this.eb.ZS,p.jE=this.eb.get("isKeyboardTarget"),p.locked=this.locked);t&&(t.properties=this.camera,t.pf=this.model.get("worldUnitToMeters"),t.locked=this.locked);q&&(q.properties=this.camera,q.pf=this.model.get("worldUnitToMeters"),q.Kk=this.eb.get("vrThumbstickRotationStep"),q.locked=this.locked);r&&(r.properties=
this.camera,r.pf=this.model.get("worldUnitToMeters"),r.Kk=this.eb.get("arThumbstickRotationStep"),r.wb=this.wb,r.locked=this.locked)};l.prototype.cqa=function(){var p=this.lfb();p&&(p.jE=this.eb.get("isKeyboardTarget"))};l.prototype.lfb=function(){if(!this.camera)return null;var p=null,q;for(q in d){var r=d[q];this.camera&&g.Oa(q,this.camera)&&(p=this.Ea.O(r,!0))}return p};l.prototype.Vg=function(){if(this.camera){var p=this.Ea.O(k.PerspectiveCamera,!0);p.Zma=this.camera.get("autoNearFar");p.HIa=
this.camera.get("autoNearFarTolerance");p.near=this.camera.get("near");p.far=this.camera.get("far");this.aF(this.camera.get("userInteracting"))}};l.prototype.k9=function(){this.naa()};l.prototype.tl=function(){var p=this.Ea.O(k.PerspectiveCamera,!0);p.width=this.renderer.Xh();p.height=this.renderer.Wh()};l.prototype.pcb=function(){var p=this.camera;p.set("fov",p.get("initialFov"));p.set("x",p.get("initialX"));p.set("y",p.get("initialY"));p.set("z",p.get("initialZ"));p.set("distance",p.get("initialDistance",
0));p.set("yaw",p.get("initialYaw"));p.set("pitch",p.get("initialPitch"))};l.prototype.aF=function(p){this.kF!=p&&(this.kF=p,this.camera&&this.camera.o(this.kF?n.Tua:n.Sua))};return l}()});define("tdv/player/script/OrbitLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("OrbitLight",m,function(){m.call(this)})});
define("tdv/player/view/model3d/renderer/adapters/ArrayAdapter",["require","exports","tdv/binding/BindingsHandler"],function(a,m,h){return function(){function n(){this.hY=this.hY.bind(this);this.X9=this.object=null;this.elements=[];this.$W=new Map;this.SPa=this.Xg=this.fe=this.filter=null}n.prototype.kB=function(g,k){this.dispose();this.object=g;this.X9=k;h.ba(this.object,[this.X9],this.hY,!0)};n.prototype.hY=function(g){g=g||[];this.filter&&(g=g.filter(this.filter));var k=this.elements,e=this.elements=
g;k.forEach(function(b,c){var d=e.indexOf(b);if(d==-1){var f=this.$W.get(b);this.$W["delete"](b);this.Xg&&this.Xg(b,f)}else d!=c&&(f=this.$W.get(b),this.SPa&&(c=this.SPa(b,d,f,c),c!=f&&this.$W.set(b,c)))}.bind(this));e.forEach(function(b,c){k.indexOf(b)==-1&&this.fe&&(c=this.fe(b,c),this.$W.set(b,c))}.bind(this))};n.prototype.dispose=function(){this.object&&(h.da(this.object,[this.X9],this.hY),this.hY([]),this.X9=this.object=null)};return n}()});
define("tdv/player/view/model3d/renderer/adapters/lights/AmbientLightAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a,m,h,n){var g=["color","intensity"];return function(){function k(e,b,c,d,f){this.Vg=this.Vg.bind(this);this.object=e;this.model=b;this.wb=c;this.Ag=d;this.Ea=f;this.F=c.T.sc("AmbientLight");this.F.N(n.AmbientLight);this.F.N(n.pb).F=this.Ag;h.ba(this.object,g,this.Vg,!0)}k.prototype.dispose=function(){h.da(this.object,g,this.Vg);
this.F&&(this.F.T.dd(this.F),this.F=null)};k.prototype.Vg=function(){var e=this.F.O(n.AmbientLight);e.color=this.object.get("color");e.intensity=this.object.get("intensity")};return k}()});
define("tdv/player/view/model3d/renderer/adapters/lights/OrbitLightAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e){a=function(){function q(r,t,u,v,w){this.Vg=this.Vg.bind(this);this.object=r;this.model=t;this.wb=u;this.Ag=v;this.Ea=w;this.F=this.wb.T.sc("OrbitLight");this.F.N(e.DirectionalLight).target=this.wb;this.F.N(e.pb);r=this.F.N(e.ta);r.mf="YXZ";r.positionZ=
10;this.iK=null;n.ba(this.object,b,this.Vg,!0)}q.prototype.dispose=function(){n.da(this.object,b,this.Vg);this.F&&(this.F.T.dd(this.F),this.F=null);this.iK&&(this.iK.dispose(),this.iK=null)};q.prototype.Vg=function(){var r=this.F.O(e.DirectionalLight);r.castShadow=this.object.get("castShadow");r.color=this.object.get("color");r.XW=this.object.get("displayHelper");r.intensity=this.object.get("intensity");r.mode=this.object.get("mode");var t=this.object.get("mode")=="fixed_to_target"?this.Ag:this.Ea;
this.F.getComponent(e.pb).F!=t&&(this.F.O(e.pb).F=t);t=this.object.get("yaw");var u=-this.object.get("pitch"),v=this.F.getComponent(e.ta);if(v.Yd!=u||v.fd!=t)v=this.F.O(e.ta),v.Yd=u,v.fd=t;r.Pra=this.object.get("shadowBias");r.Rra=this.object.get("shadowRadius");r.Qra=this.object.get("shadowMapSize");r.hmb=this.object.get("shadowTolerance");this.object.get("rotationDraggable")!=!!this.iK&&(this.object.get("rotationDraggable")?this.iK=new c(this.object,this.model,this.wb):(this.iK.dispose(),this.iK=
null))};return q}();var b="castShadow color displayHelper intensity mode pitch yaw rotationDraggable shadowBias shadowRadius shadowMapSize shadowTolerance".split(" "),c=function(){function q(r,t,u){this.QP=this.QP.bind(this);this.object=r;this.model=t;this.wb=u;this.M=new k;this.M.bind(g.V,this.Am,this,!0);this.Hw=this.wb.T.sc("OrbitLightTransformControls");this.Hw.N(e.ta).mf="YXZ";this.Hw.N(e.Group);this.Hw.N(e.pb).F=this.wb;this.DA=this.wb.T.sc("OrbitLightTransformControlsInner");this.DA.N(e.ta).mf=
"YXZ";this.DA.N(e.Group);this.DA.N(e.pb).F=this.Hw;r=this.DA.N(e.Hh);r.translate=!1;r.rotate=!0;r.scale=!1;r.M=this.M;n.ba(this.object,d,this.QP,!0);n.ba(this.model,f,this.QP,!0)}q.prototype.dispose=function(){n.da(this.object,d,this.QP);n.da(this.model,f,this.QP);this.Hw&&(this.Hw.T.dd(this.Hw),this.Hw=null);this.DA&&(this.DA.T.dd(this.DA),this.DA=null)};q.prototype.QP=function(){if(this.object.get("mode")=="fixed_to_target"){var r=this.Hw.O(e.ta);r.fd=0;r.Yd=0}else r=this.Hw.O(e.ta),r.fd=-this.model.get("camera").get("yaw"),
r.Yd=this.model.get("camera").get("pitch");r.Xe=0;r=this.DA.O(e.ta);r.fd=this.object.get("yaw");r.Yd=-this.object.get("pitch");r.Xe=0};q.prototype.Am=function(r){l.setFromQuaternion(r.data.quaternion,"YXZ");this.object.set({yaw:l.y*p,pitch:-l.x*p});this.object.o(g.Mm)};return q}(),d=["mode","yaw","pitch"],f=["camera.yaw","camera.pitch"],l=new h.Euler,p=180/Math.PI;return a});
define("tdv/player/view/model3d/renderer/adapters/lights/SpotLightAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e){a=function(){function f(l,p,q,r,t){this.Vg=this.Vg.bind(this);this.object=l;this.model=p;this.wb=q;this.Ag=r;this.Ea=t;this.F=q.T.sc("SpotLight");this.F.N(e.SpotLight);this.F.N(e.pb).F=this.Ag;this.F.N(e.ta).mf="YXZ";this.yr=new k;this.yr.bind(g.V,this.Am,
this,!0);n.ba(this.object,b,this.Vg,!0)}f.prototype.dispose=function(){n.da(this.object,b,this.Vg);this.F.T.dd(this.F);this.F=null};f.prototype.Vg=function(){var l=this.F.O(e.SpotLight);l.color=this.object.get("color");l.intensity=this.object.get("intensity");l.distance=this.object.get("distance");l.XW=this.object.get("displayHelper");l.angle=this.object.get("angle");l.penumbra=this.object.get("penumbra");l.decay=this.object.get("decay");l.castShadow=this.object.get("castShadow");l.Qra=this.object.get("shadowMapSize");
l.Pra=this.object.get("shadowBias");l.Rra=this.object.get("shadowRadius");l=this.object.get("yaw");var p=-this.object.get("pitch"),q=this.F.getComponent(e.ta);if(q.Yd!=p||q.fd!=l||q.positionX!=this.object.get("x")||q.positionY!=this.object.get("y")||q.positionZ!=this.object.get("z"))q=this.F.O(e.ta),q.Yd=p,q.fd=l,q.translationX=this.object.get("x"),q.translationY=this.object.get("y"),q.Ze=this.object.get("z");this.object.get("rotationDraggable")||this.object.get("positionDraggable")?(l=this.F.O(e.Hh,
!0),l.M=this.yr,l.rotate=this.object.get("rotationDraggable"),l.translate=this.object.get("positionDraggable"),l.scale=!1):this.F.ka(e.Hh)};f.prototype.Am=function(l){c.setFromQuaternion(l.data.quaternion,"YXZ");this.object.set({x:l.data.position.x,y:l.data.position.y,z:l.data.position.z,yaw:c.y*d,pitch:-c.x*d});this.object.o(g.Mm)};return f}();var b="color intensity distance angle penumbra displayHelper decay castShadow shadowMapSize shadowBias shadowRadius x y z pitch yaw rotationDraggable positionDraggable".split(" "),
c=new h.Euler,d=180/Math.PI;return a});
define("tdv/player/view/model3d/renderer/adapters/lights/LightAdapterFactory","require exports tdv/player/parser/ClassInfo tdv/player/view/model3d/renderer/adapters/lights/AmbientLightAdapter tdv/player/view/model3d/renderer/adapters/lights/OrbitLightAdapter tdv/player/view/model3d/renderer/adapters/lights/SpotLightAdapter".split(" "),function(a,m,h,n,g,k){return function(){function e(){}e.vna=function(b,c,d,f,l){return h.Oa("AmbientLight",b)?new n(b,c,d,f,l):h.Oa("OrbitLight",b)?new g(b,c,d,f,l):
h.Oa("SpotLight",b)?new k(b,c,d,f,l):null};return e}()});
define("tdv/player/view/model3d/renderer/adapters/lights/LightsAdapter","require exports tdv/player/view/util/Device tdv/player/script/OrbitLight tdv/player/view/model3d/renderer/adapters/ArrayAdapter tdv/player/view/model3d/renderer/adapters/lights/LightAdapterFactory".split(" "),function(a,m,h,n,g,k){return function(){function e(b,c,d,f){this.Sna=this.qA=null;this.model=b;this.wb=c;this.Ag=d;this.Ea=f;this.P8=new g;this.P8.fe=this.COa.bind(this);this.P8.Xg=this.DOa.bind(this);this.P8.kB(this.model,
"lights");this.ncb()}e.prototype.dispose=function(){this.P8.dispose();this.Ljb()};e.prototype.COa=function(b){return k.vna(b,this.model,this.wb,this.Ag,this.Ea)};e.prototype.DOa=function(b,c){c.dispose()};e.prototype.ncb=function(){var b,c,d,f;h.kf()&&this.model.get("backgroundPanoramaURL")&&(this.qA=new n,(b=this.qA)===null||b===void 0||b.set("intensity",.001),(c=this.qA)===null||c===void 0||c.set("castShadow",!0),(d=this.qA)===null||d===void 0||d.set("shadowMapWidth",64),(f=this.qA)===null||f===
void 0||f.set("shadowTolerance",4),this.Sna=this.COa(this.qA))};e.prototype.Ljb=function(){this.qA&&(this.DOa(this.qA,this.Sna),this.Sna=this.qA=null)};return e}()});
define("tdv/player/view/model3d/renderer/adapters/FloorAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/constants/RenderOrder","tdv/player/view/webgl/components"],function(a,m,h,n,g){var k=["floorColor","floorHeight","floorOpacity","floorRadius"];return function(){function e(b,c,d){this.model=b;this.object=c;this.wb=d;this.Vg=this.Vg.bind(this);this.F=d.T.sc("Floor");this.F.N(g.Mr);this.F.N(g.pb).F=this.wb;h.ba(this.object,k,this.Vg,!0)}e.prototype.dispose=function(){h.da(this.object,
k,this.Vg);this.F.T.dd(this.F);this.F=null};e.prototype.Vg=function(){var b=this.object.get("floorColor"),c=this.object.get("floorOpacity"),d=this.object.get("floorHeight"),f=this.object.get("floorRadius");if(b&&c>0){var l=this.F.O(g.Mr,!0);l.color=b;l.opacity=c;l.height=d;l.radius=f;l.renderOrder=this.model==this.object?n.vVa:n.FVa}else this.F.ka(g.Mr)};return e}()});
define("tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory",["require","exports","tdv/player/parser/ClassInfo"],function(a,m,h){return function(){function n(){}n.Xt=function(g,k){n.w6[g]=k};n.ygb=function(g){for(var k in n.w6)if(h.Oa(k,g))return!0;return!1};n.vna=function(g,k,e,b,c){for(var d in n.w6)if(h.Oa(d,g))return new n.w6[d](g,k,e,b,c);return null};n.w6={};return n}()});
define("tdv/player/view/model3d/renderer/adapters/objects/ObjectArrayAdapter",["require","exports","tdv/player/view/model3d/renderer/adapters/ArrayAdapter","tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory"],function(a,m,h,n){return function(){function g(k,e,b,c,d){this.dkb=k;this.model=e;this.wb=b;this.Jpa=c;this.renderer=d;this.filter=this.filter.bind(this);this.fe=this.fe.bind(this);this.Xg=this.Xg.bind(this);this.QJ=new h;this.QJ.filter=this.filter;this.QJ.fe=this.fe;this.QJ.Xg=
this.Xg;this.QJ.kB(this.model,"objects")}g.prototype.filter=function(k){return n.ygb(k)?!0:!1};g.prototype.fe=function(k){return n.vna(k,this.dkb,this.wb,this.Jpa,this.renderer)};g.prototype.Xg=function(k,e){e.dispose()};g.prototype.dispose=function(){this.QJ.dispose()};return g}()});
define("tdv/player/view/model3d/renderer/adapters/objects/SpritesEnabledAdapter",["require","exports","tdv/constants/EventName","tdv/player/parser/ClassInfo"],function(a,m,h,n){return function(){function g(k,e){this.qT=k.qT;this.Fa=e;this.fl=[];this.qT.bind(h.L("spritesEnabled"),this.VCa,this,!0);this.Fa.bind(h.L("objects"),this.VH,this,!0);this.za()}g.prototype.dispose=function(){this.qT.h(h.L("spritesEnabled"),this.VCa,this);this.Fa.h(h.L("objects"),this.VH,this);this.fl.forEach(function(k){k.lra(!1)});
this.fl=[]};g.prototype.VCa=function(){this.za()};g.prototype.VH=function(){this.za()};g.prototype.za=function(){var k=[];this.qT.get("spritesEnabled")===!1&&k.push("SpriteModel3DObject");var e=this.Fa.get("objects");this.fl.forEach(function(b){e.indexOf(b)==-1&&b.lra(!1)});this.fl=e;this.fl.forEach(function(b){var c=k.some(function(d){return n.Oa(d,b)});b.lra(c)})};return g}()});
define("tdv/player/view/model3d/renderer/adapters/objects/UserInteractionObjectsVisibleAdapter",["require","exports","tdv/binding/BindingsHandler"],function(a,m,h){var n=["camera","objects","postprocessing"],g=["userInteracting","moving"];return function(){function k(e){this.model=e;this.camera=null;this.rj=[];this.SJ=this.SJ.bind(this);this.f9=this.f9.bind(this);h.ba(this.model,n,this.SJ,!0)}k.prototype.dispose=function(){this.VE([])};k.prototype.SJ=function(){this.setCamera(this.model.get("camera"));
this.VE([].concat(this.model.get("objects"),this.model.get("postprocessing")))};k.prototype.setCamera=function(e){this.camera!==e&&(this.camera&&h.da(this.camera,g,this.f9),(this.camera=e)&&h.ba(this.camera,g,this.f9,!0))};k.prototype.f9=function(){this.wQ()};k.prototype.VE=function(e){this.rj!=e&&(e||(e=[]),this.rj&&this.rj.forEach(function(b){e.indexOf(b)==-1&&(b.aF&&b.aF(!1),b.Gp&&b.Gp(!1))}.bind(this)),this.rj=e,this.wQ())};k.prototype.wQ=function(){if(this.rj&&this.camera){var e=this.camera.get("userInteracting"),
b=this.camera.get("moving");this.rj.forEach(function(c){c.aF&&c.aF(e);c.Gp&&c.Gp(b)}.bind(this))}};return k}()});
define("tdv/player/view/model3d/renderer/adapters/objects/XRObjectsVisibleAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a,m,h,n,g,k){var e=["objects"];return function(){function b(c){this.model=c;this.rj=[];this.SJ=this.SJ.bind(this);g.M.bind(n.V,this.Ta,this,!0);g.M.bind(n.Zd,this.RP,this,!0);h.ba(this.model,e,this.SJ,!0);this.Ta();this.RP()}b.prototype.dispose=function(){g.M.h(n.V,
this.Ta,this);g.M.h(n.Zd,this.RP,this);this.VE([])};b.prototype.SJ=function(){this.VE([].concat(this.model.get("objects")))};b.prototype.VE=function(c){this.rj!=c&&(c||(c=[]),this.rj&&this.rj.forEach(function(d){c.indexOf(d)==-1&&(d.u$&&d.u$(!0),d.eB&&d.eB(!1))}.bind(this)),this.rj=c,this.wQ())};b.prototype.Ta=function(){this.Skb(g.isPresenting&&g.Em==g.Fl.Xp,g.isPresenting&&g.Em==g.Fl.Np)};b.prototype.RP=function(){this.v$(g.isPresenting&&g.Em==g.Fl.Xp&&g.ud.length===1&&g.ud[0].type===k.WB)};b.prototype.Skb=
function(c,d){if(this.Va!==c||this.IMa!==d)this.Va=c,this.IMa=d,this.wQ()};b.prototype.v$=function(c){this.JMa!==c&&(this.JMa=c,this.wQ())};b.prototype.wQ=function(){if(this.rj){var c=this.Va===!1,d=this.Va===!0,f=this.IMa===!0,l=this.JMa===!0;this.rj.forEach(function(p){p.u$&&p.u$(c);p.eB&&p.eB(d);p.pRa&&p.pRa(f);p.v$&&p.v$(l)}.bind(this))}};return b}()});
define("tdv/player/view/model3d/renderer/adapters/BaseModelAdapter","require exports tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/FloorAdapter tdv/player/view/model3d/renderer/adapters/objects/ObjectArrayAdapter tdv/player/view/model3d/renderer/adapters/objects/SpritesEnabledAdapter tdv/player/view/model3d/renderer/adapters/objects/UserInteractionObjectsVisibleAdapter tdv/player/view/model3d/renderer/adapters/objects/XRObjectsVisibleAdapter".split(" "),function(a,
m,h,n,g,k,e,b,c){var d=["variant"];return function(){function f(l,p,q,r){this.object=l;this.model=p;this.Ag=q;this.renderer=r;this.D9=this.D9.bind(this);this.F=this.Ag.T.sc("Model");l=this.F.N(n.Pi);this.hJ=l.hJ=this.Ag.T.sc("ModelContent");this.hJ.N(n.pb).F=this.F;l.M=this.object;this.object.get("preload")&&(l.UPa=this.model.V7().iw());l.Ap=this.model.R7().iw();l.Kpa=this.object.get("model");l.properties=this.object;l.eb=this.renderer.P;l=this.F.N(n.wd);l.M=this.object;l.nt=!0;l.Yt=!0;this.F.N(n.pb).F=
this.Ag;this.F.N(n.ta);h.ba(this.object,d,this.D9,!0);this.QJ=new k(this.model,this.object,this.F,this.hJ,this.renderer);this.pmb=new e(this.renderer,this.object);this.oob=new b(this.model);this.Eob=new c(this.model);this.Oeb=new g(this.model,this.object,this.F)}f.prototype.nj=function(){return this.F};f.prototype.dispose=function(){h.da(this.object,d,this.D9);this.F.T.dd(this.hJ);this.F.T.dd(this.F);this.QJ.dispose();this.pmb.dispose();this.oob.dispose();this.Eob.dispose();this.Oeb.dispose()};f.prototype.D9=
function(){var l=this.object.get("variant");l?this.F.O(n.Cx,!0).name=l:this.F.ka(n.Cx)};return f}()});
define("tdv/player/view/model3d/renderer/adapters/Mixins","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k,e){var b=["collidable"],c="canvas canvasTimestamp encoding depthTest hidden opacity".split(" "),d=["image"],f=["color","depthTest","opacity","width"],l=["parentId"],p=["maxWorldToPixelScale","minWorldToPixelScale","scale"],q="x y z normalX normalY normalZ upX upY upZ width height attachToParent".split(" "),
r=new e.Matrix4,t=new e.Vector3,u=new e.Vector3,v=new e.Vector3,w=new e.Euler,x=180/Math.PI,y="x y z positionX positionY positionZ rotationX rotationY rotationZ scale translationX translationY translationZ attachToParent".split(" "),z=["clickEnabled","rollOverEnabled","transparentAreaActive","useHandCursor"],A=["castShadow","receiveShadow"],D=["color","depthTest","hidden","opacity"],F=["video"],C=["hidden","enabled","opacity"];return{UK:function(B){return function(H){function E(){return H!==null&&
H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,b,this.vOa||(this.vOa=this.nib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,b,this.vOa);H.prototype.Xc.call(this)};E.prototype.nib=function(){this.object.get("collidable")?this.F.ka(k.VF):this.F.N(k.VF)};return E}(B)},Kf:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.Kf);
h.ba(this.object,c,this.uOa||(this.uOa=this.mib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,c,this.uOa);H.prototype.Xc.call(this)};E.prototype.mib=function(){var G=this.F.O(k.Kf);G.source=this.object.get("canvas");G.xK=this.object.get("canvasTimestamp");G.opacity=this.object.get("opacity");G.isSprite=!1;G.hidden=this.object.get("hidden");G.depthTest=this.object.get("depthTest");G.colorSpace=this.object.get("encoding")=="srgb"?e.SRGBColorSpace:e.LinearSRGBColorSpace};return E}(B)},
Oi:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.Ap=this.model.R7().iw(.1);this.object.get("preload")&&this.model.V7().uO(this.Ap,.1);var G=this.F.N(k.Oi);G.properties=this.object;G.M=this.object;G.isSprite=!1;G.priority=this.object.get("preload")?g.TF:g.Nta;G.Ap=this.Ap;h.ba(this.object,d,this.AOa||(this.AOa=this.NP.bind(this)),!0)};E.prototype.Xc=function(){this.model.R7().aQ(this.Ap);this.model.V7().aQ(this.Ap);
h.da(this.object,d,this.AOa);H.prototype.Xc.call(this)};E.prototype.NP=function(){this.F.O(k.Oi).xw=this.object.get("image")};return E}(B)},ei:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.ei);h.ba(this.object,f,this.EOa||(this.EOa=this.zib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,f,this.EOa);H.prototype.Xc.call(this)};E.prototype.zib=function(){var G=this.F.O(k.ei);
G.color=this.object.get("color");G.opacity=this.object.get("opacity");G.depthTest=this.object.get("depthTest");G.width=this.object.get("width")};return E}(B)},Plane:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.Plane);this.F.N(k.ta);h.ba(this.object,q,this.UOa||(this.UOa=this.Hib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,q,this.UOa);H.prototype.Xc.call(this)};E.prototype.Hib=
function(){t.set(0,0,0);v.set(this.object.get("upX",0),this.object.get("upY",1),this.object.get("upZ",0));u.set(this.object.get("normalX",0),this.object.get("normalY",0),this.object.get("normalZ",1)).multiplyScalar(-1);r.lookAt(t,u,v);w.setFromRotationMatrix(r);var G=this.F.O(k.ta);G.cA=this.object.get("attachToParent");G.translationX=this.object.get("x",0);G.translationY=this.object.get("y",0);G.Ze=this.object.get("z",0);G.Le=this.object.get("width",1);G.Ye=this.object.get("height",1);G.Yd=w.x*x;
G.fd=w.y*x;G.Xe=w.z*x;G.positionX=0;G.positionY=0;G.positionZ=0};return E}(B)},pb:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.pb).F=this.wb;h.ba(this.object,l,this.QOa||(this.QOa=this.Fib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,l,this.QOa);H.prototype.Xc.call(this)};E.prototype.Fib=function(){this.F.O(k.pb).id=this.object.get("parentId")};return E}(B)},WVa:function(B){return function(H){function E(){return H!==
null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,p,this.TOa||(this.TOa=this.Gib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,p,this.TOa);H.prototype.Xc.call(this)};E.prototype.Gib=function(){var G=this.object.get("maxWorldToPixelScale"),N=this.object.get("minWorldToPixelScale");if(G!==void 0||N!==void 0){var O=this.F.O(k.Tk,!0);O.nE=G;O.oE=N;O.Le=O.Ye=O.Gh=this.object.get("scale")}else(O=this.F)===null||O===void 0||O.ka(k.Tk)};
return E}(B)},vua:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.ta);h.ba(this.object,y,this.VOa||(this.VOa=this.Iib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,y,this.VOa);H.prototype.Xc.call(this)};E.prototype.Iib=function(){var G=this.F.O(k.ta);G.cA=this.object.get("attachToParent");G.positionX=this.object.get("x",this.object.get("positionX",0));G.positionY=this.object.get("y",
this.object.get("positionY",0));G.positionZ=this.object.get("z",this.object.get("positionZ",0));G.mf=this.object.get("rotationOrder","XYZ");G.Yd=this.object.get("rotationX",0);G.fd=this.object.get("rotationY",0);G.Xe=this.object.get("rotationZ",0);G.scale=this.object.get("scale",1);G.translationX=this.object.get("translationX",0);G.translationY=this.object.get("translationY",0);G.Ze=this.object.get("translationZ",0)};return E}(B)},wd:function(B){return function(H){function E(){return H!==null&&H.apply(this,
arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,z,this.WOa||(this.WOa=this.Nib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,z,this.WOa);H.prototype.Xc.call(this)};E.prototype.Nib=function(){var G=this.object.get("clickEnabled"),N=this.object.get("rollOverEnabled");if(G!==!1&&N!==!1)this.F.ka(k.Sr);else{var O=this.F.N(k.Sr);O.tsa=G===!1;O.usa=N===!1}G===!1&&N===!1?this.F.ka(k.wd):(O=this.F.O(k.wd,!0),O.qB=this.object.get("useHandCursor"),
O.hF=this.object.get("transparentAreaActive"),O.M=this.object,O.nt=!!G,O.Yt=!!N)};return E}(B)},lL:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,A,this.YOa||(this.YOa=this.Tib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,A,this.YOa);H.prototype.Xc.call(this)};E.prototype.Tib=function(){var G=this.F.O(k.gi,!0);G.castShadow=this.object.get("castShadow");G.receiveShadow=
this.object.get("receiveShadow")};return E}(B)},xd:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.xd);this.visible=!1;h.ba(this.object,D,this.$Oa||(this.$Oa=this.Uib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,D,this.$Oa);this.kg(!1);H.prototype.Xc.call(this)};E.prototype.Uib=function(){var G=this.F.O(k.xd);G.color=this.object.get("color");G.opacity=this.object.get("hidden")?
0:this.object.get("opacity");G.depthTest=this.object.get("depthTest");this.kg(G.opacity>0)};E.prototype.kg=function(G){this.visible!=G&&((this.visible=G)?this.object.o(n.od):this.object.o(n.jd))};return E}(B)},ro:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);var G=this.F.N(k.ro);G.properties=this.object;G.M=this.object;h.ba(this.object,F,this.bPa||(this.bPa=this.WJ.bind(this)),!0)};E.prototype.Xc=
function(){h.da(this.object,F,this.bPa);H.prototype.Xc.call(this)};E.prototype.WJ=function(){this.F.O(k.ro).Qsa=this.object.get("video")};return E}(B)},I_:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,C,this.cPa||(this.cPa=this.Wib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,C,this.cPa);H.prototype.Xc.call(this)};E.prototype.Wib=function(){var G=this.F.O(k.gi,!0);
G.opacity=this.object.get("enabled")&&!this.object.get("hidden")?this.object.get("opacity"):0;G.M=this.object};return E}(B)}}});
define("tdv/player/view/model3d/renderer/adapters/ModelAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/BaseModelAdapter tdv/player/view/model3d/renderer/adapters/Mixins tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(p){function q(r,t,u,v){r=p.call(this,r,t,u,v)||this;r.SA=r.SA.bind(r);r.wb=r.F;r.yr=new k;r.yr.bind(g.V,r.Am,r,!0);n.ba(r.object,d,r.SA,!0);
r.Wc();return r}P(q,p);q.prototype.Wc=function(){};q.prototype.Xc=function(){};q.prototype.dispose=function(){n.da(this.object,d,this.SA);this.yr.h(g.V,this.Am,this);this.yr=null;this.Xc();p.prototype.dispose.call(this)};q.prototype.Am=function(r){var t=this.model.get("model");t.set("translationX",r.data.position.x);t.set("translationY",r.data.position.y);t.set("translationZ",r.data.position.z);f.setFromQuaternion(r.data.quaternion,t.get("rotationOrder"));t.set("rotationX",f.x*l);t.set("rotationY",
f.y*l);t.set("rotationZ",f.z*l);r.data.scale>.001&&t.set("scale",r.data.scale);this.object.o(g.Mm)};q.prototype.SA=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.hJ.O(c.Hh,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.M=this.yr}else this.hJ.ka(c.Hh)};return q}(e);var d=["positionDraggable","rotationDraggable",
"scaleDraggable"],f=new h.Euler,l=180/Math.PI;return b.lL(a)});
define("tdv/view/util/MeasureText",["require","exports","tdv/view/util/Font"],function(a,m,h){function n(e,b,c){c===void 0&&(c=null);k.style.fontFamily=h.rA(b.fontFamily);k.style.font=h.Y7(b);k.innerHTML=e;document.body.appendChild(k);var d=new g(Math.ceil(k.clientWidth),Math.ceil(k.clientHeight));document.body.removeChild(k);c&&(c.font=h.Y7(b),e=c.measureText(e).width,e>0&&(d.height*=e/d.width,d.width=e));b.fontStyle==="italic"&&(d.width+=d.height*1/5);return d}var g=function(){return function(e,
b){this.width=e;this.height=b}}(),k=document.createElement("div");k.style.display="inline-block";k.style.margin="0";k.style.padding="0";k.style.whiteSpace="nowrap";n.mca=function(){return function(){this.fontFamily="Arial";this.fontSize="12px";this.fontWeight="400";this.fontStyle="normal"}}();return n});
define("tdv/player/canvas/MenuCanvas",["require","exports","tdv/view/util/MeasureText","tdv/view/util/Font"],function(a,m,h,n){var g=function(){function e(b,c,d){this.nh=b;this.item=c;this.label=c.get("label");this.fontFamily=this.nh.get("fontFamily","Arial");this.fontSize=Math.round(12*d)+"px";this.backgroundColor=this.nh.get("backgroundColor","#000000");this.BQa=this.nh.get("rollOverBackgroundColor",this.backgroundColor);this.kkb=this.nh.get("selectedBackgroundColor",this.BQa);this.zt=this.nh.get("fontColor",
"#000000");this.CQa=this.nh.get("rollOverFontColor",this.zt);this.lkb=this.nh.get("selectedFontColor",this.CQa);this.MSa=this.LSa=this.ku=this.nu=this.height=this.width=this.left=this.top=0;this.status=!1;this.bpa=!0}e.prototype.gob=function(){var b=new h.mca;b.fontFamily=this.fontFamily;b.fontSize=this.fontSize;b=h(this.label,b);this.nu=b.width;this.ku=b.height};e.prototype.Jlb=function(b){this.status!==b&&(this.status=b,this.bpa=!0)};e.prototype.zeb=function(b){if(this.bpa){this.bpa=!1;switch(this.status){case "over":var c=
this.BQa;var d=this.CQa;break;case "selected":c=this.kkb;d=this.lkb;break;default:c=this.backgroundColor,d=this.zt}b.clearRect(this.left,this.top,this.width,this.height);b.fillStyle=c;b.fillRect(this.left,this.top,this.width,this.height);b.fillStyle=d;b.font=this.fontSize+" "+n.rA(this.fontFamily);b.textBaseline="middle";b.textAlign="center";b.fillText(this.label,Math.round(this.LSa),Math.round(this.MSa));return!0}return!1};return e}(),k=180/Math.PI;return function(){function e(b,c){this.nh=b;this.items=
c.map(this.Gdb.bind(this));this.BP=this.CP=this.Rj=this.Sj=0;this.Lk();this.canvas=document.createElement("canvas");this.canvas.width=this.Sj;this.canvas.height=this.Rj;this.context=this.canvas.getContext("2d");this.selectedIndex=this.Iw=-1}e.prototype.Gdb=function(b){return new g(this.nh,b,3)};e.prototype.mgb=function(b){return this.Sj/3*b/300};e.prototype.xfb=function(b){return this.Rj/3*b/300};e.prototype.jf=function(){return 2*Math.atan2(this.Sj/3*.5,300)*k};e.prototype.hg=function(){return this.Sj};
e.prototype.xg=function(){return this.Rj};e.prototype.If=function(){return this.canvas};e.prototype.Lk=function(){var b=0,c=0;this.items.forEach(function(p){p.gob();b=Math.max(p.nu,b);c=Math.max(p.ku,c)}.bind(this));this.CP=b+30;this.BP=c+30;var d=0,f=0,l=0;this.$X=20;this.items.length>20&&(this.$X=Math.ceil(this.items.length/Math.ceil(this.items.length/20)));this.items.forEach(function(p){l>=this.$X&&(l=0,f+=this.CP,d=0);p.left=f;p.top=d;p.LSa=f+this.CP*.5;p.MSa=d+this.BP*.5;p.width=this.CP;p.height=
this.BP;l+=1;d+=this.BP}.bind(this));this.Sj=Math.ceil(this.items.length/this.$X)*this.CP;this.Rj=Math.min(this.$X,this.items.length)*this.BP};e.prototype.update=function(){for(var b=!1,c=0;c<this.items.length;c++)this.items[c].Jlb(this.Iw==c?"over":this.selectedIndex==c?"selected":"normal"),b=this.items[c].zeb(this.context)||b;return b};e.prototype.yoa=function(b,c){var d=-1;b>=0&&b<this.Sj&&c>=0&&c<this.Rj&&(d=Math.floor(b/this.CP)*this.$X+Math.floor(c/this.BP),d>=this.items.length&&(d=-1));return d};
e.prototype.WE=function(b){this.Iw=b};e.prototype.Zw=function(b){this.selectedIndex=b};e.prototype.clear=function(){this.items=this.canvas=this.context=this.nh=null};return e}()});
define("tdv/player/view/model3d/renderer/adapters/MenuAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/canvas/MenuCanvas tdv/events/EventDispatcher tdv/player/view/util/XR tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p){function q(A){return c.isPresenting?-v.setFromQuaternion(c.yl,"YXZ").y*y:A.get("camera").get("yaw")}function r(A){return c.isPresenting?
v.setFromQuaternion(c.yl,"YXZ").x*y:A.get("camera").get("pitch")}a=function(){function A(D,F,C){this.model=D;this.wb=F;this.Ea=C;this.H9=this.H9.bind(this);this.Qn=[];this.IP=[];this.ir=!1;c.M.bind(g.V,this.Ta,this,!0);n.ba(this.model,["xrMenu"],this.H9,!0)}A.prototype.dispose=function(){n.da(this.model,["xrMenu"],this.H9);c.M.h(g.V,this.Ta,this);this.ya()};A.prototype.Ta=function(){this.xTa()};A.prototype.H9=function(){this.xTa()};A.prototype.xTa=function(){var D=c.isPresenting?this.model.get("xrMenu"):
null;D!=this.nh&&(this.nh&&this.ya(),(this.nh=D)&&this.Wa())};A.prototype.Wa=function(){this.cw=this.Ea.T.sc("CameraOffsetGroup");this.cw.N(d.Group);this.cw.N(d.ta).easing=0;var D=this.cw.N(d.SK);D.Ea=this.Ea;D.rotate=!1;this.cw.N(d.pb).F=this.wb;this.Dw=new t(this.model,this.nh,this.cw);this.Dw.bind(g.ma,this.Aib,this,!0);this.Dw.bind(g.Eb,this.Bib,this,!0);this.Dw.bind(g.uc,this.Cib,this,!0)};A.prototype.Aib=function(){this.pSa();this.cIa(this.nh,0);this.Dw.kg(!1)};A.prototype.cIa=function(D,F){for(;this.Qn.length>
F;)this.Hna(this.Qn.pop());this.Qn.push(this.Hdb(D))};A.prototype.tJa=function(){var D;for((D=this.Dw)===null||D===void 0||D.kg(!0);this.Qn.length;)this.Hna(this.Qn.pop())};A.prototype.Hdb=function(D){D=new u(this.model,this.nh,D,this.cw,this.Qn.length>0?this.Qn[this.Qn.length-1]:this.Dw);if(this.Qn.length>0){var F=this.Qn[this.Qn.length-1];var C=F.Jc();F=F.Kc()+F.jf()/2+1+D.jf()/2;D.setPosition(F,C)}else F=q(this.model),C=r(this.model);D.setPosition(F,C);D.Gpa.get("children",[]).forEach(function(B){B.bind(g.ma,
this.IOa,this,!0)},this);D.bind(g.uc,this.HOa,this,!0);D.bind(g.Eb,this.GOa,this,!0);return D};A.prototype.Hna=function(D){D.Gpa.get("children",[]).forEach(function(F){F.h(g.ma,this.IOa,this)},this);D.h(g.uc,this.HOa,this);D.h(g.Eb,this.GOa,this);this.Kqa(D);D.dispose()};A.prototype.IOa=function(D){D=D.source;if(D.get("children",[]).length){var F=this.Leb(D);this.cIa(D,F+1)}else this.tJa()};A.prototype.HOa=function(D){this.dcb(D.source)};A.prototype.GOa=function(D){this.Kqa(D.source)};A.prototype.Cib=
function(){this.xQ()};A.prototype.Bib=function(){this.xQ()};A.prototype.dcb=function(D){this.Kqa(D);this.IP.push(D);this.IP.length>0&&this.Amb();this.xQ()};A.prototype.Kqa=function(D){this.IP=this.IP.filter(function(F){return F!=D});this.IP.length==0&&this.pSa();this.xQ()};A.prototype.xQ=function(){this.sRa(this.IP.length>0||this.Dw.ir())};A.prototype.sRa=function(D){this.ir!==D&&((this.ir=D)?(this.model.get("camera").aRa(!0),this.model.get("camera").zRa(!0),this.z$&&(clearTimeout(this.z$),this.z$=
0)):this.z$=setTimeout(function(){this.z$=0;this.model.get("camera").aRa(!1);this.model.get("camera").zRa(!1)}.bind(this),100))};A.prototype.pSa=function(){this.Y6||(this.Y6=setTimeout(this.tJa.bind(this),3E3))};A.prototype.Amb=function(){this.Y6&&(clearTimeout(this.Y6),this.Y6=0)};A.prototype.Leb=function(D){return this.Qn.findIndex(function(F){return F.Gpa.get("children",[]).indexOf(D)>=0?!0:!1})};A.prototype.ya=function(){this.cw&&(this.cw.T.dd(this.cw),this.cw=null);this.Dw&&(this.Dw.dispose(),
this.Dw=null);for(;this.Qn.length;)this.Hna(this.Qn.pop());this.sRa(!1)};return A}();b=function(A){function D(F,C,B,H,E){var G=A.call(this)||this;G.model=F;G.nh=C;G.U8=B;G.Ag=H;G.Ew=new e(G.nh,G.U8);G.Xa=0;G.pitch=0;G.zf=new f("linear",[new l("coef",0,1)],150);G.Iw=-1;G.selectedIndex=-1;G.We=!1;E?(G.tZ=E===null||E===void 0?void 0:E.Kc(),G.Vra=E===null||E===void 0?void 0:E.Jc()):(G.tZ=q(G.model),G.Vra=r(G.model));G.F=G.Ag.T.sc("MenuItems");G.F.N(d.Plane).renderOrder=k.wVa;G.F.N(d.pb).F=G.Ag;G.F.N(d.ta).mf=
"YXZ";F=G.F.N(d.Kf);F.source=G.Ew.If();F.isSprite=!1;F.hidden=!1;F.depthTest=!1;G.F.N(d.VF);F=G.F.N(d.wd);F.qB=!0;F.hF=!1;F.M=G;F.nt=!0;F.Yt=!0;G.rNa=Date.now();G.bind(g.gb,G.Vj,G,!0);G.bind(g.uc,G.yE,G,!0);G.bind(g.Eb,G.Tn,G,!0);G.bind(g.ma,G.kY,G,!0);c.M.bind(g.UZ,G.xE,G,!0);p.requestFrame(G.Bp,G);G.Lp();G.HK();G.xE();return G}P(D,A);D.prototype.dispose=function(){this.h(g.gb,this.Vj,this);this.h(g.uc,this.yE,this);this.h(g.Eb,this.Tn,this);this.h(g.ma,this.kY,this);c.M.h(g.UZ,this.xE,this);p.dJa(this.Bp,
this);this.F.T.dd(this.F)};D.prototype.Kc=function(){return this.Xa};D.prototype.Jc=function(){return this.pitch};D.prototype.jf=function(){return this.Ew.jf()};D.prototype.QLa=function(){return this.selectedIndex};D.prototype.ir=function(){return this.We};D.prototype.setPosition=function(F,C){this.Xa=F;this.pitch=C;this.JK()};D.prototype.Vj=function(F){this.WE(this.jLa(F))};D.prototype.yE=function(){this.We=!0;this.HK()};D.prototype.Tn=function(){this.We=!1;this.WE(-1);this.HK()};D.prototype.kY=
function(F){F=this.jLa(F);this.Zw(F);this.U8[F].o(g.ma)};D.prototype.jLa=function(F){var C=(F.data.localPosition.x+.5)*this.Ew.hg();F=(.5-F.data.localPosition.y)*this.Ew.xg();return this.Ew.yoa(C,F)};D.prototype.Bp=function(){c.isPresenting||this.xE();p.requestFrame(this.Bp,this)};D.prototype.xE=function(){if(this.zf){var F=Date.now();this.zf.Nb(F-this.rNa);this.rNa=F;this.zf.Ve()&&(this.zf=null);this.HK()}this.JK()};D.prototype.setScale=function(F){this.F.getComponent(d.ta).scale!=F&&(this.F.O(d.ta).scale=
F)};D.prototype.Zn=function(F){this.F.getComponent(d.Kf).opacity!=F&&(this.F.O(d.Kf).opacity=F)};D.prototype.WE=function(F){this.Iw!=F&&(this.Iw>=0&&this.U8[this.Iw].o(g.Eb),this.Iw=F,this.Iw>=0&&this.U8[this.Iw].o(g.uc),this.Lp())};D.prototype.Zw=function(F){this.selectedIndex!=F&&(this.selectedIndex=F,this.Lp())};D.prototype.Lp=function(){this.Ew.Zw(this.selectedIndex);this.Ew.WE(this.Iw);this.Ew.update()&&(this.F.O(d.Kf).xK=Date.now())};D.prototype.JK=function(){var F=this.nh.get("distance")/this.model.get("worldUnitToMeters",
1),C=this.F.O(d.ta);w.identity();w.multiply(x.makeRotationFromQuaternion(c.wg,"YXZ"));w.multiply(x.makeRotationFromQuaternion(c.yl,"YXZ").invert());var B=this.Xa,H=this.pitch;if(this.zf){var E=this.zf.ob("coef");for(B-=this.tZ;B>180;)B-=360;for(;B<-180;)B+=360;H-=this.Vra;B=this.tZ+B*E;H=this.Vra+H*E}w.multiply(x.makeRotationFromEuler(v.set(H*z,-B*z,0,"YXZ"),"YXZ"));v.setFromRotationMatrix(w,C.mf);C.Yd=v.x*y;C.fd=v.y*y;C.Xe=v.z*y;C.positionZ=-F;C.Le=this.Ew.mgb(F);C.Ye=this.Ew.xfb(F)};D.prototype.HK=
function(){};return D}(b);var t=function(A){function D(F,C,B){F=A.call(this,F,C,[C],B,null)||this;F.visible=!0;F.F.N(d.ta).easing=.01;F.MP=F.MP.bind(F);n.ba(F.model,["camera.pitch","camera.yaw"],F.MP,!0);return F}P(D,A);D.prototype.dispose=function(){A.prototype.dispose.call(this);n.da(this.model,["camera.pitch","camera.yaw"],this.MP)};D.prototype.kg=function(F){this.visible!==F&&(this.visible=F,this.visible||(this.WE(-1),this.Zw(-1)),F=!this.visible,this.F.getComponent(d.Kf).hidden!==F&&(this.F.O(d.Kf).hidden=
F,this.MP()))};D.prototype.MP=function(){this.visible&&(this.setPosition(q(this.model),this.ULa()),this.HK())};D.prototype.xE=function(){this.MP();A.prototype.xE.call(this)};D.prototype.HK=function(){var F=this.nh.get("opacity",.5),C=this.nh.get("rollOverOpacity",F);F=this.We?C:F;var B=.66,H=this.model.get("camera"),E=r(this.model);H=Math.abs(E-this.ULa())/(H.get("fov")*.5);H<1&&(B+=(1-H)*(1-B),F+=(1-H)*(C-F));F*=this.zf?this.zf.ob("coef"):1;this.Zn(Math.min(1,Math.max(0,F)));this.setScale(B);this.Lp()};
D.prototype.ULa=function(){var F=r(this.model);return Math.min(90,Math.max(-90,40-F))};return D}(b),u=function(A){function D(F,C,B,H,E){F=A.call(this,F,C,B.get("children",[]),H,E)||this;F.Gpa=B;return F}P(D,A);D.prototype.HK=function(){var F=this.nh.get("opacity",.5),C=this.nh.get("rollOverOpacity",F);F=this.We?C:F;F*=this.zf?this.zf.ob("coef"):1;this.Zn(Math.min(1,Math.max(0,F)))};return D}(b),v=new h.Euler,w=new h.Matrix4,x=new h.Matrix4,y=180/Math.PI,z=Math.PI/180;return a});
define("tdv/player/view/model3d/renderer/adapters/ToolTipAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/constants/EventName"],function(a,m,h,n){return function(){function g(k,e){this.renderer=k;this.model=e;this.eb=this.renderer.P;this.u9=this.u9.bind(this);this.rj=[];this.nB="";this.Fw=null;this.Wa()}g.prototype.dispose=function(){this.ya()};g.prototype.Wa=function(){h.ba(this.model,"objects",this.u9,!0);this.model.bind(n.uc,this.KOa,this,!0);this.model.bind(n.Eb,this.JOa,this,
!0)};g.prototype.ya=function(){this.model.h(n.uc,this.KOa,this);this.model.h(n.Eb,this.JOa,this);h.da(this.model,"objects",this.u9);this.VE([]);this.Fw&&this.Tn(this.Fw)};g.prototype.u9=function(){this.VE(this.model.get("objects"))};g.prototype.VE=function(k){this.rj!=k&&(this.rj.forEach(function(e){e.h(n.uc,this.POa,this);e.h(n.Eb,this.OOa,this);e.h(n.jd,this.NOa,this)}.bind(this)),this.Fw&&this.rj.indexOf(this.Fw)>=0&&k.indexOf(this.Fw)<0&&this.Tn(this.Fw),this.rj=k,this.rj.forEach(function(e){e.bind(n.uc,
this.POa,this,!0);e.bind(n.Eb,this.OOa,this,!0);e.bind(n.jd,this.NOa,this,!0)}.bind(this)))};g.prototype.POa=function(k){k=k.source;this.yE(k,k.get("toolTip"))};g.prototype.OOa=function(k){this.Tn(k.source)};g.prototype.NOa=function(k){this.Tn(k.source)};g.prototype.KOa=function(){this.yE(this.model,this.model.get("toolTip"))};g.prototype.JOa=function(){this.Tn(this.model)};g.prototype.Tn=function(k){this.Fw==k&&(this.Fw=null,this.NRa(""))};g.prototype.yE=function(k,e){this.Fw!=k&&(this.Fw=k,this.NRa(e||
""))};g.prototype.NRa=function(k){this.nB!=k&&(this.nB=k,this.eb.set("toolTip",this.nB))};return g}()});
define("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas",["require"],function(){function a(m){this.Ne=this.fv(m.get("surfaceReticleColor"));this.Fz=this.fv(m.get("surfaceReticleSelectionColor"));this.Of=m.get("surfaceReticleOpacity");this.I7a=m.get("surfaceReticleSelectionOpacity");this.Rm=this.Ih=128;this.g6a=.456;this.h6a=.088;this.r3a=.18;this.ja=document.createElement("canvas");this.ja.width=this.Ih;this.ja.height=this.Rm;this.ga=this.ja.getContext("2d");this.ga.fillStyle=
"red";this.ga.imageSmoothingEnabled=!0;this.ga.fillRect(0,0,this.Ih,this.Rm);this.Cd=this.gy=!1;this.GM=this.R3=void 0;this.pG=0}a.prototype.Jfa=function(){return this.hm(this.Fz[0]*NaN+NaN*this.Ne[0],this.Fz[1]*NaN+NaN*this.Ne[1])};a.prototype.fv=function(m){m=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(m);return[parseInt(m[1],16),parseInt(m[2],16),parseInt(m[3],16)]};a.prototype.hm=function(m,h){return"rgba("+m.join(",")+", "+h+")"};a.prototype.setPosition=function(m){this.Wb!=m&&(this.Wb=
m,this.Rd=!0)};a.prototype.hg=function(){return this.Ih};a.prototype.xg=function(){return this.Rm};a.prototype.If=function(){return this.ja};a.prototype.update=function(){if(!this.Rd)return!1;this.Rd=!1;this.ga.clearRect(0,0,this.Ih,this.Rm);var m=[this.Fz[0]*this.Wb+(1-this.Wb)*this.Ne[0],this.Fz[1]*this.Wb+(1-this.Wb)*this.Ne[1],this.Fz[2]*this.Wb+(1-this.Wb)*this.Ne[2]],h=this.I7a*this.Wb+(1-this.Wb)*this.Of;this.ga.strokeStyle=this.hm(m,h);this.ga.fillStyle=this.hm(m,h*this.Wb);this.ga.beginPath();
this.ga.lineWidth=this.Ih*this.h6a;this.ga.arc(.5*this.Ih,.5*this.Ih,this.Ih*this.g6a,0,2*Math.PI,!1);this.ga.stroke();this.ga.beginPath();this.ga.arc(.5*this.Ih,.5*this.Ih,this.Ih*this.r3a,0,2*Math.PI,!1);this.ga.fill();return!0};return a});define("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas",["require","tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas"],function(a){return a("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas")});
define("tdv/player/view/model3d/renderer/adapters/SurfaceSelectorPointerAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/constants/RenderOrder tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas tdv/player/view/util/Device tdv/player/view/util/XR tdv/player/view/webgl/components".split(" "),function(a){function m(p,q,r){this.Fa=p;this.Vb=q;this.j=r;this.P=this.j.P;this.ez=this.ez.bind(this);this.nz=this.nz.bind(this);this.Cd=void 0;
this.Fa.bind(n.L("surfaceSelectionEnabled"),this.dfa,this,!0);this.dfa()}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/RenderOrder"),e=a("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas"),b=a("tdv/player/view/util/Device"),c=a("tdv/player/view/util/XR"),d=a("tdv/player/view/webgl/components");m.prototype.dfa=function(){var p=this.Fa.get("surfaceSelectionEnabled");!!this.B!=p&&(p?this.TG():this.gs())};
m.prototype.TG=function(){if(!this.B){this.B=this.Vb.T.sc("PointerReticle");this.B.N(d.Plane).renderOrder=k.jWa;this.B.N(d.El).F=this.Vb;this.B.N(d.Sr);this.B.N(d.VF);this.B.N(d.pb).F=this.Vb;var p=this.B.N(d.Qp);p.M=new g;p.M.bind(n.V,this.FT,this,!0);h.ba(this.Fa,f,this.ez,!0);this.Qv=new e(this.P);this.Qv.setPosition(0);this.Qv.update();p=this.B.N(d.Kf);p.source=this.Qv.If();p.depthTest=!1;h.ba(this.Fa,l,this.nz,!0);c.M.bind(n.V,this.hDa,this,!0);this.Fe=null;this.vI(!1)}};m.prototype.gs=function(){this.B&&
(this.Fe&&(this.Fe.o(n.Eb),this.Fe=null),h.da(this.Fa,l,this.nz),this.kV(null),this.B.getComponent(d.Qp).M.h(n.V,this.FT,this,!0),this.Vb.T.dd(this.B),this.Qv=this.B=null,c.M.h(n.V,this.hDa,this),h.da(this.Fa,f,this.ez))};m.prototype.ez=function(){var p=this.B.O(d.Tk,!0);p.Le=p.Ye=2;p.scale=this.Fa.get("surfaceReticleRadius");p.nE=this.Fa.get("surfaceReticleMaxRadius");p.oE=this.Fa.get("surfaceReticleMinRadius")};m.prototype.FT=function(p){p=this.Nya(p.data.beacons);var q=this.vya(p);q==0&&(p=null);
this.T7a(p);this.j8a(q)};m.prototype.nz=function(){this.kV(this.Fa&&this.Fa.get("pointer"))};m.prototype.kV=function(p){this.we!==p&&(this.we&&(this.we.h(n.ma,this.gz,this,!0),this.we.h(n.gb,this.tg,this,!0),this.we.h(n.Eb,this.Fs,this,!0)),this.we=p)&&(this.we.bind(n.ma,this.gz,this,!0),this.we.bind(n.gb,this.tg,this,!0),this.we.bind(n.Eb,this.Fs,this,!0))};m.prototype.gz=function(p){var q=null;if(b.ub()&&!c.isPresenting){var r=this.B.getComponent(d.Qp);r&&r.lX&&p.data.position&&(p=r.lX((new THREE.Vector3).copy(p.data.position)),
p=this.Nya(p),this.vya(p)!=0&&(q=this.Gfa(p)))}else q=this.Fe;q&&q.o(n.ma)};m.prototype.tg=function(p){this.vI(p.data.type=="other"?!1:!0)};m.prototype.Fs=function(){this.vI(!1)};m.prototype.vI=function(p){this.Cd!==p&&(this.Cd=p,this.xi())};m.prototype.hDa=function(){this.xi()};m.prototype.xi=function(){this.B.O(d.Kf).opacity=b.ub()&&!c.isPresenting||!this.Cd?0:1};m.prototype.T7a=function(p){p=this.Gfa(p);this.Fe!=p&&(this.Fe&&this.Fe.o(n.Eb),(this.Fe=p)&&this.Fe.o(n.uc))};m.prototype.Nya=function(p){if(!p)return null;
for(var q=0;q<p.length;q++)if(this.Gfa(p[q]))return p[q];return null};m.prototype.vya=function(p){if(!p)return 0;var q=this.B.getComponent(d.ta);return q?Math.max(0,1-p.distance/(this.Fa.get("surfaceSelectionCoef")*q.scale*q.Le)):0};m.prototype.Gfa=function(p){return(p=(p=p&&p.entity)&&p.getComponent(d.RQ))&&p.Gmb||null};m.prototype.j8a=function(p){this.Qv.setPosition(p);this.Qv.update()&&(this.B.O(d.Kf).xK=(new Date).getTime())};m.prototype.dispose=function(){this.gs();this.Fa.h(n.L("surfaceSelectionEnabled"),
this.dfa,this,!0)};var f=["surfaceReticleRadius","surfaceReticleMaxRadius","surfaceReticleMinRadius"],l=["pointer"];return m});
define("tdv/player/view/model3d/renderer/adapters/objects/NearestObjectsVisibleAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k){var e=["maxNearestObjectsVisible"];return function(){function b(c,d,f){this.Fa=c;this.Vb=d;this.Bda=f;this.ha=!1;this.u3=this.u3.bind(this);h.ba(this.Fa,e,this.u3,!0)}b.prototype.u3=function(){var c=!!this.Fa.get("maxNearestObjectsVisible");this.ha!=
c&&(this.ha&&this.gs(),(this.ha=c)&&this.TG())};b.prototype.TG=function(){var c=this.Bda.N(k.Qp);c.M=new g;c.M.bind(n.V,this.FT,this,!0);this.Vb.T.Qa()};b.prototype.gs=function(){this.Bda.getComponent(k.Qp).M.h(n.V,this.FT,this);this.Bda.ka(k.Qp);this.Fa.get("objects").forEach(function(c){c.get("hideBasedOnDistance")&&c.mra(!1)})};b.prototype.FT=function(c){var d=this,f=0,l=this.Fa.get("maxNearestObjectsVisible");c.data.beacons.forEach(function(p){if(p=d.p1a(p))p.get("hideBasedOnDistance")?(p.mra(f>=
l),f++):p.mra(!1)})};b.prototype.p1a=function(c){c=(c=c.entity.getComponent(k.RQ))&&c.object;c.get&&c.get("hideBasedOnDistance")!==void 0||(c=null);return c};b.prototype.dispose=function(){h.da(this.Fa,e,this.u3);this.ha&&(this.ha=!1,this.gs())};return b}()});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/webgl/components");a=m.extend(g,function(b,c){g.call(this);this.ce=b;this.Vb=c;this.ug=this.ug.bind(this);this.B=null;this.nm=
0;this.Ld=!1;this.HU=[];this.ce.bind(n.L("areaOpacity"),this.lCa,this);this.Wz()});a.prototype.B$=function(b){this.HU.forEach(function(c){c.h(n.od,this.ye,this,!0);c.h(n.jd,this.ye,this,!0)}.bind(this));this.HU=b;this.HU.forEach(function(c){c.bind(n.od,this.ye,this,!0);c.bind(n.jd,this.ye,this,!0)}.bind(this));this.AGa();this.ye()};a.prototype.dispose=function(){this.ce.h(n.L("areaOpacity"),this.lCa,this);this.Pz()};a.prototype.nj=function(){return this.B};a.prototype.isVisible=function(){return this.Ld};
a.prototype.lCa=function(){this.Wz();this.xi()};a.prototype.Wz=function(){this.ce.get("areaOpacity")>0?this.zD():this.Pz()};a.prototype.zD=function(){if(!this.B){this.B=this.Vb.T.sc("MeasureArea");var b=new g;b.bind(n.V,this.WC,this,!0);this.B.N(k.lo).M=b;this.B.N(k.xd);this.B.N(k.pb).F=this.Vb;h.ba(this.ce,e,this.ug,!0);this.AGa()}};a.prototype.Pz=function(){this.B&&(this.B.getComponent(k.lo).M.h(n.V,this.WC,this,!0),h.da(this.ce,e,this.ug),this.B.T.dd(this.B),this.B=null)};a.prototype.Hv=function(b){this.Ld!=
b&&((this.Ld=b)?(this.Iq(1),this.o(n.od)):(this.Iq(0),this.o(n.jd)))};a.prototype.ye=function(){this.Hv(this.HU.every(function(b){return b.isVisible()}))};a.prototype.WC=function(b){this.ce.set("area",b.data.area)};a.prototype.ug=function(){if(this.B){var b=this.B.O(k.xd);b.color=this.ce.get("areaColor");b.depthTest=this.ce.get("depthTest");b.doubleSided=!0;this.xi()}};a.prototype.Iq=function(b){this.nm!=b&&(this.nm=b,this.xi())};a.prototype.xi=function(){this.B&&(this.B.O(k.xd).opacity=this.ce.get("areaOpacity")*
Math.max(1E-4,this.nm))};a.prototype.AGa=function(){this.B&&(this.B.O(k.lo).v=this.HU.map(function(b){return b.nj()}))};var e=["areaColor","areaOpacity","depthTest"];return a});
define("tdv/player/view/model3d/renderer/adapters/canvas/MeasureLabelCanvas",["require","tdv/view/util/MeasureText","tdv/view/util/Font"],function(a){function m(){this.tfa=this.fv("#ffffff");this.dC=this.fv("#000000");this.Rm=this.Ih=0;this.ja=document.createElement("canvas");this.ga=this.ja.getContext("2d");this.ga.imageSmoothingQuality="high";this.Ov=new h.mca;this.ufa=this.mM=void 0;this.Wca=this.Xca=.5;this.it=void 0;this.ZN=m.Sba;this.Uz=void 0;this.kQ(0)}var h=a("tdv/view/util/MeasureText"),
n=a("tdv/view/util/Font");m.Cta="imperial area";m.Dta="imperial length";m.Kta="metric area";m.Sba="metric length";m.prototype.dispose=function(){this.ja.width=this.ja.height=0;this.ja=null};m.prototype.Hkb=function(g){this.tfa!=g&&(this.tfa=g,this.Rd=!0)};m.prototype.pkb=function(g){this.dC!=g&&(this.dC=g,this.Rd=!0)};m.prototype.Ikb=function(g){this.ufa!=g&&(this.ufa=g,this.Rd=!0)};m.prototype.Jkb=function(g){this.mM!=g&&(this.mM=g,this.Rd=!0)};m.prototype.$qa=function(){this.Ov.wO!=.5&&(this.Wca=
.5,this.Rd=!0)};m.prototype.ara=function(g){this.Ov.xO!=g&&(this.Xca=g,this.Rd=!0)};m.prototype.kQ=function(g){this.it!=g&&(this.it=g,this.Wla())};m.prototype.Nlb=function(g){this.ZN!=g&&(this.ZN=g,this.Wla())};m.prototype.Olb=function(g){this.Uz!=g&&(this.Uz=g,this.Wla())};m.prototype.Wla=function(){if(this.Uz===void 0)this.Za=this.it.toFixed(2);else if(this.ZN==m.Sba){var g=this.it*this.Uz;this.Za=g>=1?g.toFixed(2)+"m":(g*100).toFixed(2)+"cm"}else this.ZN==m.Kta?(g=this.it*this.Uz*this.Uz,this.Za=
g>=.1?g.toFixed(2)+"m\u00b2":(g*1E4).toFixed(2)+"cm\u00b2"):this.ZN==m.Dta?(g=this.it*this.Uz*1.0936,this.Za=g>1760?(g/1760).toFixed(2)+"mi":g>=100?g.toFixed(2)+"yd":g*3>=1?(g*3).toFixed(2)+"ft":(g*3*12).toFixed(2)+"in"):this.ZN==m.Cta&&(g=this.it*this.Uz*this.Uz*10.76364864,this.Za=g>=1?g.toFixed(2)+"ft\u00b2":(g*144).toFixed(2)+"in\u00b2");this.Rd=!0};m.prototype.fv=function(g){g=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(g);return[parseInt(g[1],16),parseInt(g[2],16),parseInt(g[3],16)]};m.prototype.hm=
function(g,k){return"rgba("+g.join(",")+", "+k+")"};m.prototype.hg=function(){return this.Ih};m.prototype.xg=function(){return this.Rm};m.prototype.If=function(){return this.ja};m.prototype.update=function(){if(!this.Rd)return!1;this.Rd=!1;this.Ov.fontFamily=this.ufa||"Arial";this.Ov.fontSize=this.mM?typeof this.mM=="string"?this.mM:this.mM+"px":"30px";var g=h(this.Za,this.Ov),k=this.fv(this.tfa),e=this.fv(this.dC),b=g.width;g=g.height;var c=.5*g,d=.3*g,f=c+b+.5*g,l=d+g+.2*g,p=.5*l;this.ja.width=
this.ja.height=this.Ih=this.Rm=Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(f,l))/Math.LN2)));var q=this.Ih*this.Wca-f*this.Wca,r=this.Rm*this.Xca-l*this.Xca;this.OL();this.ga.save();this.ga.translate(q,r);this.ga.fillStyle=this.hm(e,1);this.ga.beginPath();this.ga.moveTo(0,p);this.ga.quadraticCurveTo(0,0,p,0);this.ga.lineTo(f-p,0);this.ga.quadraticCurveTo(f,0,f,p);this.ga.quadraticCurveTo(f,l,f-p,l);this.ga.lineTo(p,l);this.ga.quadraticCurveTo(0,l,0,l-p);this.ga.closePath();this.ga.fill();
this.ga.fillStyle=this.hm(k,1);this.ga.font=this.Ov.fontSize+" '"+this.Ov.fontFamily+"'";this.ga.font=this.Ov.fontSize+(isNaN(this.Ov.fontSize)?"":"px")+" "+n.rA(this.Ov.fontFamily);this.ga.textBaseline="middle";this.ga.textAlign="center";this.ga.fillText(this.Za,Math.round(c+b*.5),Math.round(d+g*.5));this.ga.restore();return!0};m.prototype.OL=function(){this.ga.clearRect(0,0,this.Ih,this.Rm)};return m});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/canvas/MeasureLabelCanvas tdv/view/effects/Effect".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),k=a("tdv/events/EventDispatcher"),
e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/model3d/renderer/adapters/canvas/MeasureLabelCanvas"),c=a("tdv/view/effects/Effect");a=m.extend(k,function(f,l,p){k.call(this);this.Qha=f;this.ce=l;this.Vb=p;this.ug=this.ug.bind(this);this.Kq=this.B=null;this.nm=0;this.Ld=!1;this.C5=this.ii=this.kD=this.PC=null;this.it=void 0;this.Zi=new b;this.Qha.bind(n.L("worldUnitToMeters"),this.Mia,this,!0);this.ce.bind(n.L("units"),this.yia,this,!0);this.zD()});a.prototype.vRa=function(f){this.c5(f,
null,null)};a.prototype.slb=function(f){this.c5(null,f,null)};a.prototype.okb=function(f){this.c5(null,null,f)};a.prototype.c5=function(f,l,p){if(this.kD!=l||this.PC!=f||this.ii!=p)[this.PC,this.kD,this.ii].forEach(function(q){q&&q.h(n.od,this.ye,this,!0);q&&q.h(n.jd,this.ye,this,!0)}.bind(this)),this.Pz(),this.PC=f,this.kD=l,this.ii=p,this.zD(),this.ug(),this.gh(!0),[this.PC,this.kD,this.ii].forEach(function(q){q&&q.bind(n.od,this.ye,this,!0);q&&q.bind(n.jd,this.ye,this,!0)}.bind(this)),this.PC?
(this.B.O(e.pb).F=this.PC.nj(),this.B.O(e.ta).Ze=.5,f=this.B.O(e.Sprite),f.wO=.5,f.xO=.5,this.Zi.$qa(),this.Zi.ara(.5)):this.kD?(this.B.O(e.pb).F=this.kD.nj(),this.B.O(e.ta).Ze=0,f=this.B.O(e.Sprite),f.wO=.5,f.xO=1.1,this.Zi.$qa(),this.Zi.ara(1)):this.ii?(this.B.O(e.pb).F=this.ii.nj(),this.B.O(e.ta).Ze=0,f=this.B.O(e.Sprite),f.wO=.5,f.xO=.5,this.Zi.$qa(),this.Zi.ara(.5)):this.B.O(e.pb).F=null,this.ye(),this.yia(),this.Mia()};a.hWa="partialDistance";a.Eua="distance";a.gWa="area";a.prototype.setStyle=
function(f){this.C5!=f&&(this.C5=f,this.ug())};a.prototype.kQ=function(f){f!==void 0&&this.it!==f&&(this.it=f,this.Zi.kQ(f),this.gh(),this.ye())};a.prototype.dispose=function(){this.Qha.h(n.L("worldUnitToMeters"),this.Mia,this,!0);this.ce.h(n.L("units"),this.yia,this,!0);this.c5(null,null);this.Zi.dispose();this.Zi=null;this.Pz()};a.prototype.Mia=function(){this.Zi.Olb(this.Qha.get("worldUnitToMeters"));this.gh()};a.prototype.yia=function(){var f=this.ce.get("units"),l=!!this.ii;this.Zi.Nlb(f=="imperial"?
l?b.Cta:b.Dta:l?b.Kta:b.Sba);this.gh()};a.prototype.zD=function(){if(!this.B){this.B=this.Vb.T.sc("MeasureLabel");this.B.N(e.Sprite).renderOrder=g.rVa;this.B.N(e.Sr);var f=this.B.N(e.Kf);f.source=this.Zi.If();f.isSprite=!0;h.ba(this.ce,d,this.ug,!0);this.B.N(e.ta);this.B.N(e.pb)}};a.prototype.Pz=function(){this.B&&(h.da(this.ce,d,this.ug),this.B.T.dd(this.B),this.B=null)};a.prototype.isVisible=function(){return this.Ld};a.prototype.Hv=function(f){this.Ld!=f&&((this.Ld=f)?(this.q9a(),this.o(n.od)):
(this.s$a(),this.Iq(0),this.o(n.jd)))};a.prototype.ye=function(){this.Hv(this.it>0&&(this.PC&&this.PC.isVisible()||this.kD&&this.kD.isVisible()||this.ii&&this.ii.isVisible()))};a.prototype.q9a=function(){this.Kq||(this.Kq=new c,this.Kq.set("duration",300),this.Kq.bind(c.fba,this.UCa,this,!0),this.Kq.bind(c.Cl,this.TCa,this,!0),this.Kq.play())};a.prototype.s$a=function(){this.Kq&&(this.Kq.h(c.fba,this.UCa,this,!0),this.Kq.h(c.Cl,this.TCa,this,!0),this.Kq.stop(),this.Kq=null)};a.prototype.UCa=function(){this.Iq(2*
this.Kq.vm()-1)};a.prototype.TCa=function(){this.Iq(1)};a.prototype.ug=function(){this.B.O(e.Kf).depthTest=this.sM("depthTest");this.Zi.Hkb(this.sM("labelFontColor"));this.Zi.pkb(this.sM("labelBackgroundColor"));this.Zi.Ikb(this.sM("labelFontFamily"));this.Zi.Jkb(this.sM("labelFontSize"));this.xi();this.gh()};a.prototype.sM=function(f){var l;this.C5&&(l=this.ce.get(this.C5+f[0].toUpperCase()+f.substr(1)));l===void 0&&(l=this.ce.get(f));return l};a.prototype.gh=function(f){if(this.Zi.update()||f){f=
this.B.O(e.Kf);var l=this.B.O(e.Sprite);f.xK=(new Date).getTime();l.width=this.Zi.hg();l.height=this.Zi.xg()}};a.prototype.Iq=function(f){this.nm!=f&&(this.nm=f,this.xi())};a.prototype.xi=function(){this.B.O(e.Kf).opacity=this.sM("labelOpacity")*Math.max(1E-4,this.nm)};var d="depthTest areaLabelBackgroundColor areaLabelFontColor areaLabelFontFamily areaLabelOpacity areaLabelFontSize distanceLabelBackgroundColor distanceLabelFontColor distanceLabelFontFamily distanceLabelOpacity distanceLabelFontSize labelBackgroundColor labelFontColor labelFontFamily labelOpacity labelFontSize partialDistanceLabelBackgroundColor partialDistanceLabelFontColor partialDistanceLabelFontFamily partialDistanceLabelOpacity partialDistanceLabelFontSize".split(" ");
return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/webgl/components");a=m.extend(g,function(b,c){g.call(this);this.ce=b;this.Vb=c;this.zn=this.xn=null;this.ug=this.ug.bind(this);this.B=
null;this.nm=0;this.Ld=!1;this.zD()});a.prototype.B$=function(b,c){if(this.xn!=b||this.zn!=c)this.xn&&this.xn.h(n.od,this.ye,this,!0),this.xn&&this.xn.h(n.jd,this.ye,this,!0),this.zn&&this.zn.h(n.od,this.ye,this,!0),this.zn&&this.zn.h(n.jd,this.ye,this,!0),this.xn=b,this.zn=c,this.xn&&this.xn.bind(n.od,this.ye,this,!0),this.xn&&this.xn.bind(n.jd,this.ye,this,!0),this.zn&&this.zn.bind(n.od,this.ye,this,!0),this.zn&&this.zn.bind(n.jd,this.ye,this,!0),this.B.O(k.pb,!0).F=this.xn&&this.xn.nj(),this.B.O(k.zu,
!0).F=this.zn&&this.zn.nj(),this.ye()};a.prototype.nj=function(){return this.B};a.prototype.dispose=function(){this.B$(null,null);this.Pz()};a.prototype.zD=function(){this.B||(this.B=this.Vb.T.sc("MeasureLine"),this.B.N(k.Line),this.B.N(k.ei),this.B.N(k.ta),h.ba(this.ce,e,this.ug,!0))};a.prototype.Pz=function(){this.B&&(h.da(this.ce,e,this.ug),this.B.T.dd(this.B),this.B=null)};a.prototype.isVisible=function(){return this.Ld};a.prototype.Hv=function(b){this.Ld!=b&&((this.Ld=b)?(this.Iq(1),this.o(n.od)):
(this.Iq(0),this.o(n.jd)))};a.prototype.ye=function(){this.Hv(this.xn&&this.xn.isVisible()&&this.zn&&this.zn.isVisible())};a.prototype.ug=function(){var b=this.B.O(k.ei);b.color=this.ce.get("lineColor");b.depthTest=this.ce.get("depthTest");b.width=this.ce.get("lineWidth");b.depthTest=this.ce.get("depthTest");this.xi()};a.prototype.Iq=function(b){this.nm!=b&&(this.nm=b,this.xi())};a.prototype.xi=function(){this.B.O(k.ei).opacity=this.ce.get("lineOpacity")*Math.max(1E-4,this.nm)};var e=["depthTest",
"lineColor","lineOpacity","lineWidth"];return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/webgl/components");a=m.extend(g,function(d,f,l,p){g.call(this);this.ce=d;this.Fa=f;this.Vb=l;this.Os=p;this.B3=this.B3.bind(this);
this.ug=this.ug.bind(this);this.bp=this.bp.bind(this);this.B=null;this.zj=this.aV=this.Cd=this.cC=!1;this.nm=0;this.Ld=!1;this.zD();h.ba(this.ce,e,this.B3,!0);h.ba(this.ce,c,this.ug,!0);h.KD(this.Os,b,this.bp,!0);this.bind(n.Mm,this.ACa,this,!0);this.bind(n.uc,this.G3,this,!0);this.bind(n.Eb,this.Fs,this,!0);this.bp();this.g8()&&this.Hv(!0)});a.prototype.dispose=function(){h.da(this.ce,e,this.B3);h.da(this.ce,c,this.ug);h.da(this.Os,b,this.bp);this.h(n.Mm,this.ACa,this,!0);this.h(n.uc,this.G3,this,
!0);this.h(n.Eb,this.Fs,this,!0);this.Pz()};a.prototype.nj=function(){return this.B};a.prototype.VQa=function(d){this.cC!==d&&((this.cC=d)?(d=this.B.N(k.El),d.F=this.Vb,d.rotate=!1,d.M=new g,this.Hv(!0),d.M.bind(n.uc,this.VM,this,!0)):((d=this.B.getComponent(k.El))&&d.M.h(n.uc,this.VM,this,!0),this.B.ka(k.El),d=this.Fa.worldPositionToLocal([this.x,this.y,this.z],this.Fa.getMatrixWorld()),this.bRa(d[0],d[1],d[2])),this.GD(),this.hma())};a.prototype.fRa=function(d){d===void 0&&(d=!1);this.zj!==d&&((this.zj=
d)?this.B.N(k.Im):this.B.ka(k.Im))};a.prototype.Blb=function(d){this.aV!==d&&(this.aV=d,this.hma(),this.Cd=!1,this.GD())};a.prototype.bRa=function(d,f,l){this.Os.set("x",d);this.Os.set("y",f);this.Os.set("z",l);this.Hv(this.g8())};a.prototype.zD=function(){this.B=this.Vb.T.sc("MeasurePoint");this.B.N(k.Sphere);this.B.N(k.xd);this.B.N(k.wd).M=this;this.B.N(k.Sr);this.B.N(k.ta).M=this;this.B.N(k.Tk);this.B.N(k.pb).F=this.Vb;this.hma();this.xi();this.GD()};a.prototype.Pz=function(){this.B.T.dd(this.B);
this.B=null};a.prototype.isVisible=function(){return this.Ld};a.prototype.Hv=function(d){this.Ld!=d&&((this.Ld=d)?(this.Iq(1),this.o(n.od)):(this.Iq(0),this.o(n.jd)))};a.prototype.hma=function(){var d=this.B.O(k.wd);d.qB=this.aV;d.Yt=this.aV;d.nt=!this.cC;d=this.B.O(k.Sr,!0);d.usa=!this.aV||this.cC;d.tsa=this.cC};a.prototype.VM=function(){this.Hv(!0)};a.prototype.G3=function(){this.Cd=!0;this.GD()};a.prototype.Fs=function(){this.Cd=!1;this.GD()};a.prototype.B3=function(){this.B.O(k.pb).id=this.ce.get("parentId")};
a.prototype.ug=function(){if(this.B){var d=this.B.O(k.Tk);d.Le=d.Ye=d.Gh=1;d.nE=this.ce.get("pointMaxRadius");d.oE=this.ce.get("pointMinRadius");d.scale=this.ce.get("pointRadius")||1;this.B.O(k.xd).depthTest=this.ce.get("depthTest");this.GD()}};a.prototype.GD=function(){if(this.B){var d=this.cC?"pointDragColor":this.Cd?"pointOverColor":"pointColor";this.B.O(k.xd).color=this.ce.get(d)}};a.prototype.Iq=function(d){this.nm!=d&&(this.nm=d,this.xi())};a.prototype.xi=function(){this.B.O(k.xd).opacity=Math.max(1E-4,
this.nm)};a.prototype.ACa=function(d){this.x=d.data.position.x;this.y=d.data.position.y;this.z=d.data.position.z};a.prototype.bp=function(){if(this.g8()&&this.B){var d=this.B.O(k.ta,!0);d.positionX=d.positionY=d.positionZ=0;d.Yd=d.fd=d.Xe=0;d.translationX=this.Os.get("x");d.translationY=this.Os.get("y");d.Ze=this.Os.get("z")}};a.prototype.g8=function(){var d=this.Os.get("x"),f=this.Os.get("y"),l=this.Os.get("z");return d!==void 0&&f!==void 0||l!==void 0};a.prototype.distanceTo=function(d){var f=this.x-
d.x,l=this.y-d.y;d=this.z-d.z;return Math.sqrt(f*f+l*l+d*d)};var e=["parentId"],b=["x","y","z"],c="depthTest mode pointDragColor pointColor pointOverColor pointMaxRadius pointMinRadius pointRadius".split(" ");return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Key tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter tdv/player/view/util/Device tdv/player/view/util/XR".split(" "),function(a){function m(v,
w,x,y,z){this.R=v;this.Fa=w;this.Vb=x;this.j=z;this.P=this.j.P;this.Bs=this.Bs.bind(this);this.E3=this.E3.bind(this);this.t3=this.t3.bind(this);this.N3=this.N3.bind(this);this.XM=this.XM.bind(this);this.WC=this.WC.bind(this);this.nz=this.nz.bind(this);this.tq=this.tq.bind(this);this.we=null;this.Nj=new Map;this.GU=new Map;this.us=[];this.DH=[];this.jN=new Map;this.ri=[];this.Kj=null;this.W5();this.Qf=this.qd=void 0;this.lwa=this.ha=!1;h.ba(this.R,["enabled"],this.Bs,!0)}var h=a("tdv/binding/BindingsHandler"),
n=a("tdv/constants/EventName"),g=a("tdv/constants/Key"),k=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter"),e=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter"),b=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter"),c=a("tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter"),d=a("tdv/player/view/util/Device"),f=a("tdv/player/view/util/XR");m.prototype.dispose=function(){this.gs();h.da(this.R,["enabled"],this.Bs);
this.Kj=this.ri=this.DH=this.us=this.GU=this.Nj=null;this.W5();this.Qf=this.qd=null};m.prototype.Bs=function(){this.R.get("enabled")?this.TG():this.gs()};m.prototype.TG=function(){this.ha||(this.ha=!0,this.SZa(),this.lxa(this.R),document.addEventListener("keyup",this.tq),h.ba(this.R,l,this.E3,!0),h.ba(this.R,q,this.N3,!0),h.ba(this.R,p,this.t3,!0),h.ba(this.R,r,this.XM,!0),h.ba(this.R,t,this.WC,!0),h.ba(this.Fa,u,this.nz,!0),f.M.bind(n.Zd,this.e6a,this,!0))};m.prototype.gs=function(){this.ha&&(this.ha=
!1,this.fFa([]),this.Fxa(this.R),this.$_a(),document.removeEventListener("keyup",this.tq),h.da(this.R,l,this.E3),h.da(this.R,q,this.N3),h.da(this.R,p,this.t3),h.da(this.R,r,this.XM),h.da(this.R,t,this.WC),h.da(this.Fa,u,this.nz),f.M.h(n.Zd,this.Mpb,this),this.kV(null))};m.prototype.nz=function(){this.kV(this.Fa&&this.Fa.get("pointer"))};m.prototype.e6a=function(){var v=f.ud.some(function(w){return w.TIa});v!=this.lwa&&((this.lwa=v)||this.rBa())};m.prototype.kV=function(v){this.we!==v&&(this.we&&(this.we.h(n.ma,
this.dCa,this,!0),this.we.h(n.fi,this.eCa,this,!0)),this.we=v)&&(this.we.bind(n.ma,this.dCa,this,!0),this.we.bind(n.fi,this.eCa,this,!0))};m.prototype.E3=function(){this.fFa(this.R.get("points"))};m.prototype.t3=function(){var v=this.R.get("mode");if(v!=this.qd){switch(this.qd){case "create":this.ri.length<1||this.Kj&&this.ri.length<2?v="create":this.k7a(this.Kj);break;case "edit":v=="create"?this.R.get("type")==="single"&&this.ri.length>0?v="edit":this.Q_():this.Iz(null);break;case "view":v==="create"&&
(this.R.get("type")==="single"&&this.ri.length>0?v="view":this.Q_());break;default:v=="create"&&(this.R.get("type")==="single"&&this.ri.length>0&&this.hga(this.Jy(-1))?v="edit":this.Iz(this.Jy(-1),!1))}this.qd=v;this.R.set("mode",this.qd);this.gHa()}};m.prototype.N3=function(){var v=this.R.get("type");v!==this.Qf&&(this.Qf=v,this.Qf==="single"&&this.ri.length>1&&this.R.set("points",this.Jpb.slice(0,1)))};m.prototype.XM=function(){this.VGa();this.V5()};m.prototype.WC=function(){var v=this.Wfa(this.ii);
v&&v.kQ(this.R.get("area"))};m.prototype.tq=function(v){v.which==g.i_&&this.P.get("isKeyboardTarget")&&this.rBa()};m.prototype.rBa=function(){this.R.get("mode")=="create"?this.R.set("mode","edit"):this.qd=="edit"&&this.Iz(null)};m.prototype.Q_=function(){this.zXa();this.Iz(this.Jy(-1),!1)};m.prototype.SS=function(){return d.ub()&&!d.kf()};m.prototype.zXa=function(){var v=this.P.get("application").Ai("MeasureModel3DObjectPoint");if(!this.SS()){var w=this.Jy(-1);w&&this.hga(w)&&(v.set("x",w.get("x")),
v.set("y",w.get("y")),v.set("z",w.get("z")))}this.R.set("points",this.ri.concat([v]))};m.prototype.Jy=function(v){var w=[this.R].concat(this.ri);return v<0&&w.length-v>0?w[w.length+v]:v>=0&&v<w.length?w[v]:null};m.prototype.k7a=function(v){this.R.set("points",this.ri.filter(function(w){return w!=v}))};m.prototype.hga=function(v){return!!v&&this.Nj.get(v).g8()};m.prototype.dCa=function(v){if(v.data.type!="other")if(this.R.get("mode")=="create"){if(this.Kj){var w=this.Kj;this.Iz(null);this.WXa(w,v)}this.Qf==
"single"&&this.ri.length>0?this.R.set("mode","edit"):this.Q_()}else this.R.get("mode")=="edit"&&this.Iz(null)};m.prototype.eCa=function(){this.R.get("mode")=="create"&&this.SS()&&this.R.set("mode","edit")};m.prototype.wCa=function(){this.R.get("mode")=="create"&&this.R.set("mode","edit")};m.prototype.vCa=function(v){if(this.R.get("mode")=="create"){var w=this.Jy(-2);v=this.GU.get(v.source);w==v?this.R.set("mode","edit"):(w=this.Kj,this.Iz(null),w.set("x",v.get("x")),w.set("y",v.get("y")),w.set("z",
v.get("z")),w=this.Jy(0),v==w?this.R.set("mode","edit"):this.Q_())}};m.prototype.xCa=function(v){this.R.get("mode")=="edit"&&this.Iz(this.GU.get(v.source),!0)};m.prototype.yCa=function(){this.R.get("mode")=="edit"&&this.Iz(null)};m.prototype.zCa=function(){this.V5()};m.prototype.V5=function(){for(var v=[],w=this.Jy(0),x=this.bga(),y=0;y<x.length;y++){var z=x[y];w=this.Nj.get(w);var A=this.Nj.get(z);A=w.distanceTo(A);(w=this.Wfa(this.us[y]))&&w.kQ(A);v.push(A);w=z}v=v.reduce(function(D,F){return D+
F},0);(w=this.Wfa(this.Nj.get(x[x.length-1])))&&w.kQ(v);this.R.set("distance",isNaN(v)?void 0:v)};m.prototype.WXa=function(v,w){if(w=w&&w.data.position)w=this.Fa.worldPositionToLocal(w,this.Fa.getMatrixWorld()),this.Nj.get(v).bRa(w.x,w.y,w.z)};m.prototype.Iz=function(v,w){w||(w=!1);if(this.Kj!==v){if(this.Kj){var x=this.Nj.get(this.Kj);x.fRa(!1);x.VQa(!1)}if(this.Kj=v)x=this.Nj.get(this.Kj),x.fRa(w),x.VQa(w||!this.SS());this.WGa();this.gHa();this.W5()}};m.prototype.fFa=function(v){this.ri!=v&&(this.ri.forEach(function(w){v.indexOf(w)==
-1&&this.Fxa(w)}.bind(this)),this.ri=v,this.Kj&&this.ri.indexOf(this.Kj)&&(this.Kj=null),this.W5(),this.ri.forEach(function(w){this.lxa(w)}.bind(this)),this.WGa(),this.VGa(),this.lab(),this.V5())};m.prototype.bga=function(){return this.ri.filter(function(v){return this.hga(v)||this.Nj.get(v).cC}.bind(this))};m.prototype.WGa=function(){for(;this.ri.length<this.us.length;)this.b0a();for(;this.ri.length>this.us.length;)this.x_a();for(var v=!0,w=0;w<this.ri.length;w++){var x=this.Jy(w),y=this.Jy(w+1);
x==this.Kj&&(v=!1);var z=v?y:x;this.us[w].B$(this.Nj.get(v?x:y),this.Nj.get(z))}};m.prototype.VGa=function(){this.gab();var v=this.bga(),w=v.length==1;this.R.get("displayPartialDistanceLabel")&&!w&&this.us.forEach(function(x){var y=this.s2(x);y.vRa(x);y.setStyle(e.hWa)}.bind(this));this.R.get("displayDistanceLabel")&&(w?(v=this.s2(this.us[0]),v.vRa(this.us[0]),v.setStyle(e.Eua)):v.length>1&&(w=this.Nj.get(v[v.length-1]),v=this.s2(w),v.slb(w),v.setStyle(e.Eua)));this.R.get("displayAreaLabel")&&this.ii&&
(v=this.s2(this.ii),v.okb(this.ii),v.setStyle(e.gWa));this.d0a();this.V5();this.WC()};m.prototype.gHa=function(){var v=!this.Kj&&this.qd!="view";this.Nj.forEach(function(w){w.Blb(v)})};m.prototype.lab=function(){this.ii&&this.ii.B$([this.R].concat(this.bga()).map(function(v){return this.Nj.get(v)}.bind(this)))};m.prototype.lxa=function(v){var w=this.Nj.get(v);w||(w=new c(this.R,this.Fa,this.Vb,v),this.Nj.set(v,w),this.GU.set(w,v),w.bind(n.fi,this.wCa,this,!0),w.bind(n.ma,this.vCa,this,!0),w.bind(n.Sa,
this.xCa,this,!0),w.bind(n.$a,this.yCa,this,!0),w.bind(n.Mm,this.zCa,this,!1))};m.prototype.Fxa=function(v){var w=this.Nj.get(v);w&&(w.h(n.Mm,this.zCa,this,!1),w.h(n.fi,this.wCa,this,!0),w.h(n.ma,this.vCa,this,!0),w.h(n.Sa,this.xCa,this,!0),w.h(n.$a,this.yCa,this,!0),w.dispose(),this.Nj["delete"](v),this.GU["delete"](w))};m.prototype.x_a=function(){var v=new b(this.R,this.Vb);this.us.push(v)};m.prototype.b0a=function(){this.us.length!=0&&this.us.pop().dispose()};m.prototype.w_a=function(){var v=new e(this.Fa,
this.R,this.Vb);this.DH.push(v);return v};m.prototype.gab=function(){this.jN.clear()};m.prototype.s2=function(v){var w=this.DH.length>this.jN.size?this.DH[this.jN.size]:this.w_a();this.jN.set(v,w);return w};m.prototype.Wfa=function(v){return this.jN.get(v)};m.prototype.d0a=function(){for(;this.DH.length>this.jN.size;)this.a0a()};m.prototype.a0a=function(){this.DH.length!=0&&this.DH.pop().dispose()};m.prototype.SZa=function(){this.ii||(this.ii=new k(this.R,this.Vb))};m.prototype.$_a=function(){this.ii&&
(this.ii.dispose(),this.ii=null)};m.prototype.W5=function(){this.R.set("draggingPoint",!!this.Kj)};var l=["points"],p=["mode"],q=["type"],r=["displayAreaLabel","displayDistanceLabel","displayPartialDistanceLabel"],t=["area"],u=["pointer"];return m});
define("tdv/player/view/model3d/renderer/adapters/objects/CanvasPlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n){a=function(){function g(k,e,b,c,d){this.object=k;this.model=e;this.wb=b;this.renderer=d;this.he=this.he.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();h.da(this.object,
["enabled"],this.he)};g.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("CanvasPlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.wd(a);a=n.UK(a);a=n.Kf(a);a=n.I_(a);a=n.lL(a);a=n.pb(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/ChildAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/BaseModelAdapter tdv/player/view/model3d/renderer/adapters/Mixins".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(p){function q(r,t,u,v,w){r=p.call(this,r,t,u,w)||this;r.SA=r.SA.bind(r);r.wb=u;r.yr=new k;r.yr.bind(g.V,r.Am,r,!0);r.F.N(e.AB);r.F.N(e.RQ).object=
r.object;n.ba(r.object,d,r.SA,!0);r.Wc();return r}P(q,p);q.prototype.Wc=function(){};q.prototype.Xc=function(){};q.prototype.dispose=function(){n.da(this.object,d,this.SA);this.yr.h(g.V,this.Am,this);this.yr=null;this.Xc();p.prototype.dispose.call(this)};q.prototype.Am=function(r){f.setFromQuaternion(r.data.quaternion,this.object.get("rotationOrder"));this.object.set({x:0,y:0,z:0,translationX:r.data.position.x,translationY:r.data.position.y,translationZ:r.data.position.z,rotationX:f.x*l,rotationY:f.y*
l,rotationZ:f.z*l,scale:Math.max(r.data.scale,.001)});this.object.o(g.Mm)};q.prototype.SA=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.F.O(e.Hh,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.M=this.yr}else this.F.ka(e.Hh)};return q}(b);var d=["positionDraggable","rotationDraggable","scaleDraggable"],f=
new h.Euler,l=180/Math.PI;h=c.wd(a);h=c.I_(h);h=c.UK(h);h=c.lL(h);h=c.pb(h);h=c.WVa(h);return h=c.vua(h)});
define("tdv/player/view/model3d/renderer/adapters/objects/ImagePlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n){a=function(){function g(k,e,b,c,d){this.object=k;this.model=e;this.wb=b;this.renderer=d;this.he=this.he.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();h.da(this.object,
["enabled"],this.he)};g.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("ImagePlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.wd(a);a=n.UK(a);a=n.Oi(a);a=n.lL(a);a=n.pb(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/InnerObjectAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n,g){var k=["objectId"];a=function(){function e(b,c,d,f,l){this.object=b;this.model=c;this.wb=d;this.renderer=l;this.F=this.wb.T.sc("InnerObject");this.z3=this.z3.bind(this);h.ba(this.object,k,this.z3,!0);this.Wc()}e.prototype.Wc=function(){};e.prototype.Xc=function(){};
e.prototype.z3=function(){var b=this.F.O(n.hL,!0);b.id=this.object.get("objectId");b.container=this.wb};e.prototype.dispose=function(){this.Xc();h.da(this.object,k,this.z3);this.wb.T.dd(this.F);this.F=null};return e}();a=g.wd(a);a=g.UK(a);a=g.lL(a);return a=g.I_(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/LineAdapter","require exports tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/Mixins three.mod".split(" "),function(a,m,h,n,g,k){var e=["x","y","z"],b=["targetX","targetY","targetZ"];a=function(){function c(d,f,l,p,q){this.object=d;this.model=f;this.wb=l;this.renderer=q;this.he=this.he.bind(this);this.w9=this.w9.bind(this);this.B9=this.B9.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,
["enabled"],this.he,!0)}c.prototype.Wc=function(){};c.prototype.Xc=function(){};c.prototype.dispose=function(){this.disable();h.da(this.object,["enabled"],this.he)};c.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};c.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("Line"),this.F.N(n.ta),this.F.N(n.Line),this.F.N(n.zu).position=new k.Vector3,h.ba(this.object,e,this.w9,!0),h.ba(this.object,b,this.B9,!0),this.Wc())};c.prototype.disable=
function(){this.enabled&&(this.enabled=!1,this.Xc(),h.da(this.object,e,this.w9),h.da(this.object,b,this.B9),this.F.T.dd(this.F),this.F=null)};c.prototype.w9=function(){var d=this.F.O(n.ta);d.translationX=this.object.get("x",0);d.translationY=this.object.get("y",0);d.Ze=this.object.get("z",0)};c.prototype.B9=function(){var d=this.F.O(n.zu);d.position.x=this.object.get("targetX");d.position.y=this.object.get("targetY");d.position.z=this.object.get("targetZ")};return c}();a=g.wd(a);a=g.ei(a);return a=
g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/HorizonGridAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n,g){var k=["x","y","z"],e="divisions centerLinesColor depthTest gridColor opacity size".split(" ");a=function(){function b(c,d,f,l,p){this.object=c;this.model=d;this.wb=f;this.renderer=p;this.he=this.he.bind(this);this.PA=this.PA.bind(this);this.o9=this.o9.bind(this);this.enabled=
!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}b.prototype.Wc=function(){};b.prototype.Xc=function(){};b.prototype.dispose=function(){this.disable();h.da(this.object,["enabled"],this.he)};b.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};b.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("HorizonGrid"),this.F.N(n.ta),this.F.N(n.xu),h.ba(this.object,k,this.PA,!0),h.ba(this.object,e,this.o9,!0),this.Wc())};b.prototype.disable=function(){this.enabled&&
(this.enabled=!1,this.Xc(),h.da(this.object,k,this.PA),h.da(this.object,e,this.o9),this.F.T.dd(this.F),this.F=null)};b.prototype.PA=function(){var c=this.F.O(n.ta);c.translationX=this.object.get("x",0);c.translationY=this.object.get("y",0);c.Ze=this.object.get("z",0)};b.prototype.o9=function(){var c=this.F.O(n.xu);c.fJa=this.object.get("centerLinesColor");c.depthTest=this.object.get("depthTest");c.Lna=this.object.get("divisions");c.dMa=this.object.get("gridColor");c.size=this.object.get("size")};
return b}();a=g.I_(a);return a=g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/SphereAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n,g){var k=["radius","maxRadius","minRadius"];a=function(){function e(b,c,d,f,l){this.object=b;this.model=c;this.wb=d;this.renderer=l;this.he=this.he.bind(this);this.RA=this.RA.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}e.prototype.Wc=function(){};
e.prototype.Xc=function(){};e.prototype.dispose=function(){this.disable();h.da(this.object,["enabled"],this.he)};e.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};e.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("Sphere"),this.F.N(n.Sphere),this.F.N(n.Tk),h.ba(this.object,k,this.RA,!0),this.Wc())};e.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),h.da(this.object,k,this.RA),this.F.T.dd(this.F),this.F=null)};e.prototype.RA=
function(){var b=this.F.O(n.Tk);b.Le=b.Ye=b.Gh=1;b.scale=this.object.get("radius");b.nE=this.object.get("maxRadius");b.oE=this.object.get("minRadius")};return e}();a=g.wd(a);a=g.UK(a);a=g.xd(a);a=g.pb(a);return a=g.vua(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/ProjectedMaterialAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n,g){var k="cameraBox skyBox sourceAlpha sourceCubeTexture sourceX sourceY sourceYaw sourceZ targetAlpha targetCubeTexture targetX targetY targetYaw targetZ".split(" ");a=function(){function e(b,c,d,f,l){this.object=b;this.model=c;this.wb=d;this.Jpa=f;this.renderer=
l;this.he=this.he.bind(this);this.z9=this.z9.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}e.prototype.Wc=function(){};e.prototype.Xc=function(){};e.prototype.dispose=function(){this.disable();h.da(this.object,["enabled"],this.he)};e.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};e.prototype.enable=function(){if(!this.enabled){this.enabled=!0;this.F=this.wb.T.sc("ProjectedMaterial");this.F.N(n.po);var b=this.F.N(n.pb);b.F=this.wb;
b.attach=!0;h.ba(this.object,k,this.z9,!0);this.Wc()}};e.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),h.da(this.object,k,this.z9),this.F.T.dd(this.F),this.F=null)};e.prototype.z9=function(){var b=this.F.O(n.po);b.NA=this.object.get("nearPlane")||!1;b.$Ra=this.object.get("skyBox")||!1;b.bSa=this.object.get("sourceAlpha")||0;b.bF=this.Jpa;b.R$=this.object.get("sourceX")||0;b.S$=this.object.get("sourceY")||0;b.T$=this.object.get("sourceZ")||0;b.tZ=this.object.get("sourceYaw")||
0;b.rZ=this.object.get("sourceCubeTexture");b.ySa=this.object.get("targetAlpha")||0;b.targetX=this.object.get("targetX")||0;b.targetY=this.object.get("targetY")||0;b.daa=this.object.get("targetZ")||0;b.Mmb=this.object.get("targetYaw")||0;b.zZ=this.object.get("targetCubeTexture")};return e}();return g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/SurfaceReticleAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas tdv/player/view/webgl/components".split(" "),function(a){function m(f,l,p,q,r){this.R=f;this.Fa=l;this.Vb=p;this.j=r;this.P=this.j.P;this.Bs=this.Bs.bind(this);this.ez=this.ez.bind(this);this.bp=this.bp.bind(this);this.ug=this.ug.bind(this);this.Oha=this.Vb.getComponent(e.Pi).Ap;
this.Oha.bind(n.ia,this.fz,this,!1);this.Pha=this.xAa=!1;this.Qv=new k(this.P);this.Qv.setPosition(0);this.Qv.update();this.B=null;h.ba(this.R,["enabled"],this.Bs,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),k=a("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas"),e=a("tdv/player/view/webgl/components");m.prototype.Bs=function(){this.R.get("enabled")?this.TG():this.gs()};m.prototype.TG=function(){if(!this.B){this.B=
this.Vb.T.sc("Reticle");var f=this.B.N(e.pb);f.F=this.Vb;f.id=this.R.get("parentId");this.B.N(e.Plane).renderOrder=g.iWa;this.B.N(e.Kf).source=this.Qv.If();this.B.N(e.AB);f=this.B.N(e.RQ);f.Gmb=this.R;f.object=this.R;h.ba(this.Fa,d,this.ez,!0);h.ba(this.R,b,this.bp,!0);h.ba(this.R,c,this.ug,!0)}};m.prototype.gs=function(){this.B&&(this.Vb.T.dd(this.B),this.B=null,h.da(this.Fa,d,this.ez),h.da(this.R,b,this.bp),h.da(this.R,c,this.ug))};m.prototype.ez=function(){var f=this.B.O(e.Tk,!0);f.Le=f.Ye=2;f.scale=
this.Fa.get("surfaceReticleRadius");f.nE=this.Fa.get("surfaceReticleMaxRadius");f.oE=this.Fa.get("surfaceReticleMinRadius");this.bHa()};m.prototype.bp=function(){var f=this.B.O(e.Ax,!0);f.x=this.R.get("x");f.y=this.R.get("y");f.z=this.R.get("z");f.distance=this.R.get("distance");f.JX=this.R.get("horizontal")};m.prototype.ug=function(){var f=this.B.O(e.wd,!0);f.qB=this.R.get("useHandCursor");f.hF=this.R.get("transparentAreaActive");f.M=this.R;f=this.B.O(e.Kf);f.opacity=this.R.get("opacity");f.hidden=
this.R.get("hidden");f.depthTest=this.R.get("depthTest")};m.prototype.fz=function(){this.xAa=!0;this.bHa()};m.prototype.bHa=function(){var f=this.xAa&&this.Fa.get("opacity")>.5;this.Pha!=f&&(this.Pha=f)&&this.B&&this.B.O(e.Ax)};m.prototype.dispose=function(){this.gs();h.da(this.R,["enabled"],this.Bs);this.Oha.h(n.ia,this.fz,this,!1);this.Oha=null};var b=["distance","horizontal","x","y","z"],c=["depthTest","hidden","opacity","transparentAreaActive","useHandCursor"],d=["opacity","surfaceReticleRadius",
"surfaceReticleMaxRadius","surfaceReticleMinRadius","surfaceSelectionEnabled"];return m});
define("tdv/player/view/model3d/renderer/adapters/objects/VideoPlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n){a=function(){function g(k,e,b,c,d){this.object=k;this.model=e;this.wb=b;this.renderer=d;this.he=this.he.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();h.da(this.object,
["enabled"],this.he)};g.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("VideoPlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.wd(a);a=n.UK(a);a=n.ro(a);a=n.pb(a);a=n.lL(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/objects","require exports tdv/player/view/model3d/renderer/adapters/measure/MeasureAdapter tdv/player/view/model3d/renderer/adapters/objects/CanvasPlaneAdapter tdv/player/view/model3d/renderer/adapters/objects/ChildAdapter tdv/player/view/model3d/renderer/adapters/objects/ImagePlaneAdapter tdv/player/view/model3d/renderer/adapters/objects/InnerObjectAdapter tdv/player/view/model3d/renderer/adapters/objects/LineAdapter tdv/player/view/model3d/renderer/adapters/objects/HorizonGridAdapter tdv/player/view/model3d/renderer/adapters/objects/SphereAdapter tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory tdv/player/view/model3d/renderer/adapters/objects/ProjectedMaterialAdapter tdv/player/view/model3d/renderer/adapters/objects/SurfaceReticleAdapter tdv/player/view/model3d/renderer/adapters/objects/VideoPlaneAdapter".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q){return{kB:function(){f.Xt("MeasureModel3DObject",h);f.Xt("ChildModel3DObject",g);f.Xt("HorizonGridModel3DObject",c);f.Xt("CanvasPlaneModel3DObject",n);f.Xt("ImagePlaneModel3DObject",k);f.Xt("InnerModel3DObject",e);f.Xt("LineModel3DObject",b);f.Xt("ProjectedMaterialModel3DObject",l);f.Xt("SphereModel3DObject",d);f.Xt("SurfaceReticleModel3DObject",p);f.Xt("VideoPlaneModel3DObject",q)}}});
define("tdv/view/events/MouseEvent",["require","exports","tdv/events/Event"],function(a,m,h){return function(n){function g(k,e,b,c,d,f,l,p){e===void 0&&(e=0);b===void 0&&(b=0);c===void 0&&(c=0);d===void 0&&(d=0);f===void 0&&(f=0);l===void 0&&(l=0);p===void 0&&(p=null);k=n.call(this,k)||this;k.x=e;k.y=b;k.pageX=c;k.pageY=d;k.delta=f;k.mA=l;k.zE=p;k.movementX=p&&p.movementX||void 0;k.movementY=p&&p.movementY||void 0;return k}P(g,n);g.prototype.clone=function(){var k=new g(this.name,this.x,this.y,this.pageX,
this.pageY,this.delta,this.mA,this.zE);k.source=this.source;return k};return g}(h)});
define("tdv/player/view/model3d/renderer/adapters/pointer/FirstPersonPointerAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Key tdv/view/events/MouseEvent tdv/events/EventDispatcher tdv/player/view/util/Device tdv/utils tdv/view/util/MouseLocker tdv/player/parser/ClassInfo".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(q,r,t,u,v){var w=l.call(this)||this;w.OJ=[];w.$Ha=0;w.VHa=0;w.g7=!1;w.qKa=!1;w.qpa=!1;w.oNa=0;w.renderer=q;w.ci=
r;w.model=t;w.wb=u;w.Ea=v;w.$v=w.$v.bind(w);w.R6=w.R6.bind(w);w.Dna=c.nr(w.Dna,w);w.KA=w.KA.bind(w);w.J8=w.J8.bind(w);w.I8=w.I8.bind(w);w.eb=w.renderer.P;w.Rf=w.renderer.getParent();w.enabled=!0;w.type=p.TQ;w.Wa();return w}P(p,l);p.prototype.getType=function(){return this.type};p.prototype.Ra=function(q){this.enabled=q};p.prototype.dispose=function(){this.ya()};p.prototype.Wa=function(){this.Rf.bind(n.gb,this.$v,this,!0);this.Rf.bind(n.ma,this.UHa,this,!0);h.KD(this.model,["camera.lockMouse"],this.R6,
!0);h.KD(this.model,["objects"],this.KA,!0);this.ym=new d(this.Rf.wa().cc());this.ym.bind(n.V,this.ZNa,this,!0);document.addEventListener("keyup",this.J8);document.addEventListener("keydown",this.I8);this.fu(p.TQ)};p.prototype.ya=function(){this.Rf.h(n.gb,this.$v,this);this.Rf.h(n.ma,this.UHa,this);h.da(this.model,["camera.lockMouse"],this.R6);h.da(this.model,["objects"],this.KA);this.gZ([]);this.ym.h(n.V,this.ZNa,this);this.ym.hr()&&this.ym.unlock();this.tRa(!1);this.ym.dispose();document.removeEventListener("keyup",
this.J8);document.removeEventListener("keydown",this.I8)};p.prototype.R6=function(){this.UX=!b.ub()&&this.model.get("camera").get("lockMouse");!this.UX&&this.ym.hr()&&this.ym.unlock();this.vTa()};p.prototype.vTa=function(){this.tRa((!this.g7||!this.qKa)&&(b.ub()||!this.UX))};p.prototype.tRa=function(q){this.qpa!=q&&((this.qpa=q)?this.eb.ZS.y6():this.eb.ZS.b$())};p.prototype.$v=function(){this.ym.hr()||this.fu(p.TQ)};p.prototype.I8=function(q){p.xVa.indexOf(q.code)!=-1&&(this.type==p.TQ&&this.fu(p.Mba),
this.UX&&!this.ym.hr()&&this.ym.lock())};p.prototype.J8=function(q){q.code==g.ua.kL&&(q=(new Date).getTime(),this.fTa(n.ma),q-this.oNa<500&&this.fTa(n.fi),this.oNa=q)};p.prototype.fTa=function(q){var r=this.eb.nb()/2,t=this.eb.Mb()/2;q=new k(q,r,t,r,t,0,0,void 0);this.Rf.o(q)};p.prototype.UHa=function(){this.VHa=(new Date).getTime();this.UX&&!this.ym.hr()?this.ym.lock():this.Dna()};p.prototype.idb=function(){this.UX&&this.ym.hr()&&this.ym.unlock()};p.prototype.ZNa=function(){this.ym.hr()?this.fu(p.Mba):
this.fu(p.TQ)};p.prototype.KA=function(){this.gZ(this.model.get("objects",[]))};p.prototype.gZ=function(q){var r=this;this.OJ.forEach(function(t){t.h(n.ma,r.lOa,r)});this.OJ=q;this.OJ.forEach(function(t){t.bind(n.ma,r.lOa,r,!0);f.Oa("MeasureModel3DObject",t)&&(t.bind(n.L("draggingPoint"),r.aY,r,!0),t.bind(n.L("mode"),r.aY,r,!0))});this.aY()};p.prototype.lOa=function(q){q.source.get("useHandCursor")&&(this.$Ha=(new Date).getTime())};p.prototype.aY=function(){var q=!1,r=!1;this.OJ.forEach(function(u){f.Oa("MeasureModel3DObject",
u)&&(r=r||!!u.get("draggingPoint"),q=q||u.get("mode")=="edit"&&!!u.get("draggingPoint"))});this.qKa=q;var t=this.model.get("camera");r!=this.g7&&(this.g7=r,setTimeout(function(){t.Akb(this.g7)}.bind(this),0));this.vTa()};p.prototype.Dna=function(){Math.abs(this.VHa-this.$Ha)>100&&this.idb()};p.prototype.fu=function(q){this.type!==q&&(this.type=q,this.o(n.V))};p.TQ="mouse";p.Mba="gaze";p.xVa=[g.ua.ck,g.ua.Ki,g.ua.fb,g.ua.Db,g.ua.Mp,g.ua.Sp,g.ua.uo,g.ua.qo,g.ua.E,g.ua.Q];return p}(e)});
define("tdv/player/view/model3d/renderer/adapters/pointer/GazePointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/canvas/ReticleCanvas tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/webgl/components tdv/view/constants/Cursor tdv/view/util/Animation".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){var l=new h.Vector3(0,0,0),p=new h.Vector3(0,0,-1);a=function(){function r(t,u,v,w,x){this.renderer=
t;this.ci=u;this.model=v;this.wb=w;this.Ea=x;this.HZ=this.HZ.bind(this);this.$A=this.$A.bind(this);this.eA=this.eA.bind(this);this.eb=this.renderer.P;this.Rf=this.renderer.getParent();this.Mw=this.model.get("application").Ai("Model3DPointer");this.Wa()}r.prototype.Ra=function(t){var u=this.Ea.O(c.yc);u&&(u.enabled=t)};r.prototype.dispose=function(){this.ya()};r.prototype.Wa=function(){this.cQ=new e(this.eb.b8());this.Veb=new q(this.Rf,this.cQ);this.xp=new b;this.xp.dRa(this.Veb);var t=this.Ea.N(c.yc);
t.Ea=this.Ea;t.origin=l;t.direction=p;t.WD=this.Rf;t.f7=this.xp;t.M=this.Mw;this.eb.set("toolTipCentered",!0);this.model.set("pointer",this.Mw);this.Qlb();this.Lra();this.xp.push(d.cG);f.requestFrame(this.HZ)};r.prototype.ya=function(){this.xp.pop(d.cG);this.Omb();this.hsa();this.eb.set("toolTipCentered",!1);this.eb.set("toolTipCenteredOffsetY",void 0);this.model.set("pointer",void 0);this.Ea.ka(c.yc);this.xp.dispose();f.dJa(this.HZ)};r.prototype.Lra=function(){this.Fp=this.wb.T.sc("GazeReticle");
this.Fp.N(c.pb).F=this.Ea;this.Fp.N(c.Plane).renderOrder=k.aVa;this.Fp.N(c.VF);var t=this.Fp.N(c.Kf);t.source=this.cQ.If();t.depthTest=!1;this.Fp.N(c.ta).Ze=-1;this.renderer.bind(g.Rb,this.$A,this,!0);this.$A();this.FW(this.Ea.getComponent(c.yc),this.Mw)};r.prototype.FW=function(t,u){u.set("originX",t.origin.x);u.set("originY",t.origin.y);u.set("originZ",t.origin.z);u.set("directionX",t.direction.x);u.set("directionY",t.direction.y);u.set("directionZ",t.direction.z)};r.prototype.hsa=function(){this.Fp&&
(this.Fp.T.dd(this.Fp),this.Fp=null)};r.prototype.Znb=function(){if(this.Fp){var t=this.Fp.O(c.Tk,!0);t.Le=t.Ye=2;var u=Math.min(this.eb.nb(),this.eb.Mb())/100;t.oE=t.nE=Math.round(u*4);this.eb.set("toolTipCenteredOffsetY",2*u)}};r.prototype.HZ=function(t){this.Fp&&this.cQ.update(t)&&(this.Fp.O(c.Kf).xK=(new Date).getTime());f.requestFrame(this.HZ)};r.prototype.$A=function(){this.Znb()};r.prototype.Qlb=function(){n.KD(this.model,"camera",this.eA,!0)};r.prototype.Omb=function(){n.da(this.model,"camera",
this.eA);this.eRa(!0)};r.prototype.eA=function(){this.eRa(!1)};r.prototype.eRa=function(t){var u=this.Ea.O(c.PF);u&&(u.TO=t);(u=this.Ea.O(c.QF))&&(u.TO=t);(u=this.Ea.O(c.XF))&&(u.TO=t)};return r}();var q=function(){function r(t,u){this.Rf=t;this.cQ=u}r.prototype.TLa=function(){return this.Rf};r.prototype.m$=function(t,u){u.indexOf(d.qf)>-1?this.cQ.rK(!0):this.cQ.rK(!1)};return r}();return a});
define("tdv/player/view/model3d/renderer/adapters/pointer/XRPointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/webgl/components tdv/player/view/util/Device tdv/player/view/util/XR tdv/view/constants/Cursor tdv/player/parser/ClassInfo".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p){a=function(){function v(w,x,y,z,A,D){this.OJ=
[];this.bY=[];this.renderer=w;this.ci=x;this.model=y;this.Gn=z;this.wb=A;this.Ea=D;this.KA=this.KA.bind(this);this.Ut=[];this.enabled=!1;this.Wa()}v.prototype.Ra=function(w){this.enabled!==w&&((this.enabled=w)?n.KD(this.model,["objects"],this.KA,!0):(n.da(this.model,["objects"],this.KA),this.gZ([])))};v.prototype.dispose=function(){this.ya()};v.prototype.Wa=function(){f.M.bind(g.Zd,this.Kg,this,!0)};v.prototype.ya=function(){f.M.h(g.Zd,this.Kg,this);this.nZ([])};v.prototype.Kg=function(){this.nZ(f.ud)};
v.prototype.nZ=function(w){if(!this.enabled||w.find(function(z){return z.fA}))w=[];var x=this.Ut;this.Ut=w.map(function(z){var A=x.findIndex(function(D){return D.cb==z});return A!==-1?x.splice(A,1)[0]:new q(z,this.model,this.Gn,this.wb,this.Ea)}.bind(this));x.forEach(function(z){z.dispose()});this.Ut.forEach(function(z){z.Ra(this.enabled);z.update()}.bind(this));var y=this.Ut.reduce(function(z,A){return!z||z.oA<A.oA?A:z},null);this.Ut.forEach(function(z){z.rra(z===y)});this.model.set("pointer",y!==
null?y.Kt:void 0)};v.prototype.KA=function(){this.gZ(this.model.get("objects",[]))};v.prototype.gZ=function(w){this.OJ=w;this.aY()};v.prototype.aY=function(){this.bY.forEach(function(w){w.h(g.L("mode"),this.Epa,this)}.bind(this));this.bY=[];this.bY=this.OJ.filter(function(w){return p.Oa("MeasureModel3DObject",w)});this.bY.forEach(function(w){w.bind(g.L("mode"),this.Epa,this,!0)}.bind(this));this.Epa()};v.prototype.Epa=function(){var w=!1,x=!1;this.bY.forEach(function(z){x=x||z.get("mode")=="create";
w=w||z.get("mode")=="edit"}.bind(this));var y=this.model.get("camera");x?y.$Qa(!0):setTimeout(function(){y.$Qa(!1)},0)};return v}();var q=function(){function v(w,x,y,z,A){this.oA=this.fJ=0;this.cb=w;this.model=x;this.Gn=y;this.wb=z;this.Ea=A;this.oA=this.fJ=this.cb.handedness==="right"?1:0;this.Kt=this.model.get("application").Ai("Model3DPointer");this.Ug=this.enabled=!1;this.Wa()}v.prototype.update=function(){this.yQ();f.YE(this.cb,this.Cna.We,this.Cna.We,this.model.get("surfaceSelectionEnabled")&&
(this.Ehb||this.Ghb||this.Fhb)?void 0:this.distance);f.C$(this.cb,!this.Ug||!this.enabled)};v.prototype.Ra=function(w){this.enabled!==w&&(this.enabled=w,w=this.Gk.O(c.yc,!0))&&(w.enabled=this.enabled)};v.prototype.rra=function(w){this.Ug!==w&&(this.Ug=w,w=this.Gk.O(c.yc,!0))&&(w.Ug=this.Ug)};v.prototype.dispose=function(){this.ya()};v.prototype.Wa=function(){this.Cna=new u(this.Kt);this.xp=new b;this.xp.dRa(this.Cna);this.Fi=new e;this.pe=new e;this.Gk=this.Ea.T.sc("Pointer");var w=this.Gk.O(c.yc,
!0);w.sna=!0;w.matrixWorld=new h.Matrix4;w.Ea=this.Ea;w.WD=this.Fi;w.f7=this.xp;w.M=this.pe;w.enabled=this.enabled;f.M.bind(g.Du,this.mY,this,!0);f.M.bind(g.TB,this.nY,this,!0);f.M.bind(g.Yf,this.lY,this,!0);this.pe.bind(g.Sa,this.$h,this,!0);this.pe.bind(g.$a,this.lf,this,!0);this.pe.bind(g.ma,this.kY,this,!0);this.pe.bind(g.fi,this.LOa,this,!0);this.pe.bind(g.gb,this.Vj,this,!0);this.pe.bind(g.Eb,this.Tn,this,!0)};v.prototype.ya=function(){this.pe.h(g.Sa,this.$h,this);this.pe.h(g.$a,this.lf,this);
this.pe.h(g.ma,this.kY,this);this.pe.h(g.fi,this.LOa,this);this.pe.h(g.gb,this.Vj,this);this.pe.h(g.Eb,this.Tn,this);this.Gk.T.dd(this.Gk);this.xp.dispose();f.M.h(g.Du,this.mY,this);f.M.h(g.TB,this.nY,this);f.M.h(g.Yf,this.lY,this)};v.prototype.yQ=function(){var w=this.Gk.O(c.yc,!0);w.matrixWorld.copy(this.cb.matrixWorld);w.origin.copy(this.cb.ray.origin);w.direction.copy(this.cb.ray.direction);w.Qb.copy(this.cb.Qb);w.gx=this.cb.gx;this.FW(w,this.Kt);(this.cb.pressed||d.kf())&&this.Fi.o(g.gb)};v.prototype.FW=
function(w,x){t.origin.set(w.origin);t.direction.set(w.direction);t.applyMatrix4(w.matrixWorld);x.set("originX",w.origin.x);x.set("originY",w.origin.y);x.set("originZ",w.origin.z);x.set("directionX",w.direction.x);x.set("directionY",w.direction.y);x.set("directionZ",w.direction.z)};v.prototype.lY=function(w){w.data.pointerState===this.cb&&(w=Date.now()-this.fJ<300,this.fJ=Date.now(),this.Fi.o(g.ma),w&&this.Fi.o(g.fi))};v.prototype.mY=function(w){w.data.pointerState===this.cb&&(this.Fi.o(g.gb),this.oA=
Date.now(),this.Fi.o(g.Sa))};v.prototype.nY=function(w){w.data.pointerState===this.cb&&this.Fi.o(g.$a)};v.prototype.Vj=function(w){this.TY(w);this.BRa(w);this.Kt.o(this.NO(w))};v.prototype.$h=function(w){this.TY(w);this.BRa(w);this.Kt.o(this.NO(w))};v.prototype.lf=function(w){this.distance=void 0;this.Kt.o(this.NO(w))};v.prototype.kY=function(w){this.Kt.o(this.NO(w))};v.prototype.LOa=function(w){this.Kt.o(this.NO(w))};v.prototype.Tn=function(w){this.distance=void 0;this.Kt.o(this.NO(w))};v.prototype.TY=
function(w){w.data.position?(w=w.data.position,t.copy(this.cb.ray).applyMatrix4(this.cb.matrixWorld),this.distance=t.origin.distanceTo(r.set(w.x,w.y,w.z))):this.distance=void 0};v.prototype.BRa=function(w){this.Ghb=w.data.type=="mesh";this.Ehb=w.data.type=="bone";this.Fhb=w.data.type=="gs"};v.prototype.NO=function(w){var x=this.kdb(w);w.data&&w.data.position&&(w=this.cnb(r.set(w.data.position.x,w.data.position.y,w.data.position.z)),x.data=Object.assign({},x.data,{position:{x:w.x,y:w.y,z:w.z}}));return x};
v.prototype.kdb=function(w){var x=new k(w.name,w.data);x.source=w.source;return x};v.prototype.cnb=function(w){var x=this.Gn.getComponent(c.Object3D);return(x=x===null||x===void 0?void 0:x.sa)?x.worldToLocal(w):w};return v}(),r=new h.Vector3,t=new h.Ray,u=function(){function v(w){this.Kt=w}v.prototype.TLa=function(){return this.Kt};v.prototype.m$=function(w,x){this.We=x.indexOf(l.qf)>-1};return v}();return a});
define("tdv/player/view/model3d/renderer/adapters/pointer/MousePointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/util/geo/Fov tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e,b,c){var d=new h.Vector3(0,0,0),f=Math.PI/180,l=new h.Vector3;return function(){function p(q,r,t,u,v){this.renderer=q;this.ci=r;this.model=t;this.wb=
u;this.Ea=v;this.y7=this.y7.bind(this);this.$A=this.$A.bind(this);this.$v=this.$v.bind(this);this.eb=this.renderer.P;this.Rf=this.renderer.getParent();this.Mw=this.model.get("application").Ai("Model3DPointer");this.enabled=!0;this.Wa()}p.prototype.Ra=function(q){this.enabled=q;var r=this.Ea.O(c.yc);r&&(r.enabled=q)};p.prototype.dispose=function(){this.ya()};p.prototype.Wa=function(){this.Fi=new k;var q=this.Ea.N(c.yc);q.Ea=this.Ea;q.origin=d;q.direction=new h.Vector3;q.WD=this.Fi;q.M=this.Mw;this.xp=
new e;this.xp.bu(this.Rf);q.f7=this.xp;q.enabled=this.enabled;n.ba(this.model,["camera.fov"],this.y7,!0);this.renderer.bind(g.Rb,this.$A,this,!0);this.Rf.Acb(g.Sa,this.YHa,this);this.Rf.bind(g.gb,this.$v,this,!0);this.Rf.bind(g.$a,this.ZHa,this,!0);this.Rf.bind(g.ma,this.WHa,this,!0);this.Rf.bind(g.fi,this.XHa,this,!0);this.model.set("picker",this);this.model.set("pointer",this.Mw)};p.prototype.ya=function(){n.da(this.model,["camera.fov"],this.y7);this.renderer.h(g.Rb,this.$A,this);this.Rf.h(g.Sa,
this.YHa,this);this.Rf.h(g.gb,this.$v,this);this.Rf.h(g.$a,this.ZHa,this);this.Rf.h(g.ma,this.WHa,this);this.Rf.h(g.fi,this.XHa,this);this.Ea.ka(c.yc);this.xp.dispose();this.model.set("picker",void 0);this.model.set("pointer",void 0)};p.prototype.$A=function(){this.Dsa()};p.prototype.y7=function(){this.Dsa()};p.prototype.YHa=function(q){var r=q.clone();r.name=g.gb;this.$v(r);this.Fi.o(q)};p.prototype.$v=function(q){this.fib=q.x;this.gib=q.y;this.Dsa();this.Fi.o(q)};p.prototype.ZHa=function(q){this.Fi.o(q)};
p.prototype.WHa=function(q){this.Fi.o(q)};p.prototype.XHa=function(q){this.Fi.o(q)};p.prototype.Dsa=function(){var q=this.Ea.O(c.yc);this.ALa(this.fib,this.gib,q.direction);this.FW(q,this.Mw)};p.prototype.FW=function(q,r){r.set("originX",q.origin.x);r.set("originY",q.origin.y);r.set("originZ",q.origin.z);r.set("directionX",q.direction.x);r.set("directionY",q.direction.y);r.set("directionZ",q.direction.z)};p.prototype.ALa=function(q,r,t){var u;t=t||new h.Vector3;var v=((u=this.model.get("camera"))===
null||u===void 0?void 0:u.get("fov"))||90;u=this.eb.nb();var w=this.eb.Mb();q===void 0&&(q=u/2);r===void 0&&(r=w/2);t.set(q-u/2,w/2-r,-u/(Math.tan((u>w?v:b.Ar(v,u,w))*f/2)*2)).normalize();return t};p.prototype.sqa=function(q,r){var t=this.Ea.getComponent(c.yc);if(t&&t.Tt)return t.Tt.sqa([this.wb],d,this.ALa(q,r,l))};return p}()});
define("tdv/player/view/model3d/renderer/adapters/pointer/PointerAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/model3d/renderer/adapters/pointer/FirstPersonPointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/GazePointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/XRPointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/MousePointerAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c){return function(){function d(f,
l,p,q,r,t){this.renderer=f;this.ci=l;this.model=p;this.Gn=q;this.wb=r;this.Ea=t;this.enabled=!0;this.eA=this.eA.bind(this);this.Wa()}d.prototype.Ra=function(f){var l;this.enabled=f;(l=this.lJ)===null||l===void 0||l.Ra(this.enabled)};d.prototype.dispose=function(){this.ya()};d.prototype.Wa=function(){h.ba(this.model,"camera",this.eA,!1);c.M.bind(n.V,this.VTa,this,!0);this.Gsa()};d.prototype.ya=function(){h.da(this.model,"camera",this.eA);c.M.h(n.V,this.VTa,this);this.fu("none");this.DSa()};d.prototype.eA=
function(){this.Gsa()};d.prototype.VTa=function(){this.Gsa()};d.prototype.Gsa=function(){c.isPresenting?this.fu("xr"):this.model.get("camera").get("class")=="FirstPersonModel3DCamera"?this.Zlb():(this.DSa(),this.fu("mouse"))};d.prototype.Zlb=function(){this.dP||(this.dP=new g(this.renderer,this.ci,this.model,this.wb,this.Ea),this.dP.bind(n.V,this.xOa,this,!0),this.xOa())};d.prototype.DSa=function(){var f;this.dP&&((f=this.dP)===null||f===void 0||f.dispose(),this.dP=void 0)};d.prototype.xOa=function(){var f;
switch((f=this.dP)===null||f===void 0?void 0:f.getType()){case g.Mba:this.fu("gaze");break;default:this.fu("mouse")}};d.prototype.fu=function(f){var l;if(this.type!==f){this.lJ&&this.lJ.dispose();this.type=f;switch(this.type){case "mouse":this.lJ=new b(this.renderer,this.ci,this.model,this.wb,this.Ea);break;case "gaze":this.lJ=new k(this.renderer,this.ci,this.model,this.wb,this.Ea);break;case "xr":this.lJ=new e(this.renderer,this.ci,this.model,this.Gn,this.wb,this.Ea);break;default:this.lJ=void 0}(l=
this.lJ)===null||l===void 0||l.Ra(this.enabled)}};return d}()});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/AmbientOcclusionPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function m(k,e){this.Qc=k;this.ee=e;this.ha=!1;this.aj=this.aj.bind(this);h.ba(this.Qc,g,this.aj,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");m.prototype.aj=function(){var k=this.Qc.get("enabled")&&!this.Qc.get("disabled");this.ha!=k&&(this.ha&&this.ee.ka(n.OK),(this.ha=
k)&&this.ee.N(n.OK));this.ha&&(k=this.ee.O(n.OK),k.pKa=this.Qc.get("easingDuration"),k.bias=this.Qc.get("bias"),k.intensity=this.Qc.get("intensity"),k.scale=this.Qc.get("scale"),k.lNa=this.Qc.get("kernelRadius"),k.PNa=this.Qc.get("minResolution"),k.gna=this.Qc.get("blurRadius"),k.output=this.Qc.get("output")=="ao"?THREE.SAOPass.OUTPUT.SAO:THREE.SAOPass.OUTPUT.Default)};m.prototype.dispose=function(){this.ee.ka(n.OK);this.ee=null;h.da(this.Qc,g,this.aj)};var g="disabled enabled bias easingDuration intensity scale kernelRadius minResolution blurRadius output".split(" ");
return m});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/AntialiasPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function m(k,e){this.Qc=k;this.ee=e;this.ha=!1;this.aj=this.aj.bind(this);h.ba(this.Qc,g,this.aj,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");m.prototype.aj=function(){var k=this.Qc.get("enabled")&&!this.Qc.get("disabled");this.ha!=k&&(this.ha&&this.ee.ka(n.rF),(this.ha=k)&&this.ee.N(n.rF));
this.ha&&(k=this.ee.O(n.rF),k.VKa=this.Qc.get("mode")=="fxaa",k.oSa=this.Qc.get("mode")=="ssaa",k.uZ=this.Qc.get("ssaaSampleLevel"))};m.prototype.dispose=function(){this.ee.ka(n.rF);this.ee=null;h.da(this.Qc,g,this.aj)};var g=["disabled","enabled","mode","ssaaSampleLevel"];return m});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/MotionBlurPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function m(k,e){this.Qc=k;this.ee=e;this.ha=!1;this.aj=this.aj.bind(this);h.ba(this.Qc,g,this.aj,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");m.prototype.aj=function(){var k=this.Qc.get("enabled")&&!this.Qc.get("disabled");this.ha!=k&&(this.ha&&this.ee.ka(n.UQ),(this.ha=k)&&this.ee.N(n.UQ));
this.ha&&(k=this.ee.O(n.UQ),k.EQa=this.Qc.get("samples"),k.intensity=this.Qc.get("intensity"))};m.prototype.dispose=function(){this.ee.ka(n.UQ);this.ee=null;h.da(this.Qc,g,this.aj)};var g=["disabled","enabled","samples","intensity"];return m});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/VignettePostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function m(k,e){this.Qc=k;this.ee=e;this.aj=this.aj.bind(this);h.ba(this.Qc,g,this.aj,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");m.prototype.aj=function(){var k=this.Qc.get("enabled")&&!this.Qc.get("disabled");this.ha!=k&&(this.ha&&this.ee.ka(n.nL),(this.ha=k)&&this.ee.N(n.nL));
this.ha&&(k=this.ee.O(n.nL),k.LMa=this.Qc.get("innerRadius"),k.rPa=this.Qc.get("outerRadius"),k.color=this.Qc.get("color"),k.opacity=this.Qc.get("opacity"))};m.prototype.dispose=function(){this.ee.ka(n.nL);this.ee=null;h.da(this.Qc,g,this.aj)};var g="enabled disabled opacity color innerRadius outerRadius".split(" ");return m});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/PostprocessingArrayAdapter","require exports tdv/player/view/model3d/renderer/adapters/ArrayAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/AmbientOcclusionPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/AntialiasPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/MotionBlurPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/VignettePostprocessingAdapter tdv/player/parser/ClassInfo".split(" "),function(a,
m,h,n,g,k,e,b){return function(){function c(d,f){this.model=d;this.Od=f;this.filter=this.filter.bind(this);this.fe=this.fe.bind(this);this.Xg=this.Xg.bind(this);this.xY=new h;this.xY.filter=this.filter;this.xY.fe=this.fe;this.xY.Xg=this.Xg;this.xY.kB(this.model,"postprocessing")}c.prototype.filter=function(d){return b.Oa("AmbientOcclusionModel3DPostprocessing",d)||b.Oa("AntialiasModel3DPostprocessing",d)||b.Oa("MotionBlurModel3DPostprocessing",d)||b.Oa("VignetteModel3DPostprocessing",d)};c.prototype.fe=
function(d){return b.Oa("AmbientOcclusionModel3DPostprocessing",d)?new n(d,this.Od):b.Oa("AntialiasModel3DPostprocessing",d)?new g(d,this.Od):b.Oa("MotionBlurModel3DPostprocessing",d)?new k(d,this.Od):b.Oa("VignetteModel3DPostprocessing",d)?new e(d,this.Od):null};c.prototype.Xg=function(d,f){f.dispose()};c.prototype.dispose=function(){this.xY.dispose()};return c}()});
define("tdv/player/view/util/ScreenFrameRateMonitor",["require","exports"],function(){var a=function(){function m(){}m.init=function(){for(var h=0;h<=m.Rba;h++)m.goa.push(0);window.requestAnimationFrame(m.Bp)};m.lLa=function(){return m.frameRate};m.Bp=function(h){m.NJ!==0&&(m.goa[Math.min(Math.round(1E3/(h-m.NJ)),m.Rba)]++,m.dQ++);m.NJ=h;m.dQ<m.pVa?window.requestAnimationFrame(m.Bp):m.Dcb()};m.Dcb=function(){for(var h=0,n=0,g=30;g<=m.Rba;g+=10){for(var k=0,e=-5;e<=5;e++)k+=m.goa[g+e];k>h&&(h=k,n=
g)}m.frameRate=n};m.Rba=200;m.pVa=60;m.goa=[];m.NJ=0;m.dQ=0;m.frameRate=60;return m}();a.init();return a});
define("tdv/player/view/model3d/renderer/adapters/ScenePixelRatioAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/util/Flags tdv/player/view/webgl/components tdv/player/view/util/ScreenFrameRateMonitor".split(" "),function(a,m,h,n,g,k,e,b){a=function(){function f(l,p){this.tE=this.enabled=!1;this.dOa=this.eOa=0;this.model=l;this.Od=p;this.ksa=this.ksa.bind(this);this.e9=this.e9.bind(this);this.x9=this.x9.bind(this);h.ba(this.model,
"pixelRatioMinScale",this.x9,!0)}f.prototype.dispose=function(){this.disable();h.da(this.model,"pixelRatioMinScale",this.x9)};f.prototype.x9=function(){this.disable();this.model.get("pixelRatioMinScale")<1&&this.enable()};f.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Gp(!1),this.UP.h(n.V,this.SOa,this),h.da(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.e9),this.UP.dispose())};f.prototype.enable=function(){this.enabled||
(this.enabled=!0,this.UP=new c(this.model.get("pixelRatioMinScale")),this.UP.bind(n.V,this.SOa,this,!0),h.ba(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.e9,!0))};f.prototype.e9=function(){this.eOa=Date.now();this.Gp(!0)};f.prototype.ksa=function(){Date.now()-this.eOa>f.hua&&this.Gp(!1)};f.prototype.Gp=function(l){this.tE!==l&&((this.tE=l)?(this.dOa=window.setInterval(this.ksa,f.hua),this.UP.enable()):(window.clearInterval(this.dOa),this.UP.disable()),
this.CTa())};f.prototype.SOa=function(){this.CTa()};f.prototype.CTa=function(){var l=this.tE&&this.enabled?this.UP.yA():1;this.Od.getComponent(e.Scene).O9!=l&&(this.Od.O(e.Scene).O9=l)};f.hua=100;return f}();var c=function(f){function l(p){var q=f.call(this)||this;q.OE=[];q.EP=0;q.Bp=q.Bp.bind(q);q.tcb(p);q.reset();return q}P(l,f);l.prototype.tcb=function(p){for(var q=1;q>p;q-=.1)this.OE.push(q);Math.abs(p-this.OE[this.OE.length-1])>d&&this.OE.push(p);k.vu&&console.log("steps = ["+this.OE.map(function(r){return r.toFixed(2)}).join(", ")+
"]")};l.prototype.reset=function(){this.disable();this.NJ=0;this.kK=.5;this.tpa=0;this.scale=this.OE.length*.5;this.Xqa=Math.floor(this.scale);this.mJa();this.enable()};l.prototype.enable=function(){!this.EP&&this.kK>l.Lta&&(this.EP=window.requestAnimationFrame(this.Bp))};l.prototype.disable=function(){this.EP&&(window.cancelAnimationFrame(this.EP),this.EP=0)};l.prototype.yA=function(){return this.OE[this.Xqa]};l.prototype.dispose=function(){this.disable()};l.prototype.Bp=function(p){this.NJ!==0&&
(this.Inb(p-this.NJ),this.Tnb());this.NJ=p;this.EP=this.kK>l.Lta?window.requestAnimationFrame(this.Bp):0};l.prototype.Inb=function(p){for(this.iX.push(p);this.iX.length>l.YUa;)this.iX.shift(),this.cJ=this.iX.reduce(function(q,r){return q+r},0)/this.iX.length};l.prototype.mJa=function(){this.iX=[];this.cJ=void 0};l.prototype.Tnb=function(){if(this.cJ!==void 0){var p=1E3/b.lLa(),q=p*l.tVa;p=Math.max(1E3/l.uVa,p*l.nVa);if(this.cJ<=p)var r=-1;else if(this.cJ>q)r=1;else{k.vu&&console.log("["+q.toFixed(2)+
" > "+this.cJ.toFixed(2)+" > "+p.toFixed(2)+"]");return}this.tpa&&this.tpa!==r&&(this.kK*=l.ZVa);this.tpa=r;this.scale=Math.min(Math.max(this.scale+r*this.kK,0),this.OE.length-1);r==1?k.vu&&console.log("["+this.cJ.toFixed(2)+" > "+q.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.kK).toFixed(2)+")"):r==-1&&k.vu&&console.log("["+this.cJ.toFixed(2)+" <= "+p.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.kK).toFixed(2)+")");q=Math.round(this.scale);this.Xqa!==q&&(this.mJa(),this.Xqa=q,this.o(n.V))}};
l.tVa=1.5;l.nVa=1.1;l.YUa=15;l.ZVa=.75;l.Lta=.01;l.uVa=60;return l}(g),d=1E-6;return a});
define("tdv/player/view/model3d/renderer/adapters/SceneAdapter","require exports tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/model3d/renderer/adapters/CameraAdapter tdv/player/view/model3d/renderer/adapters/lights/LightsAdapter tdv/player/view/model3d/renderer/adapters/ModelAdapter tdv/player/view/model3d/renderer/adapters/MenuAdapter tdv/player/view/model3d/renderer/adapters/ToolTipAdapter tdv/player/view/model3d/renderer/adapters/SurfaceSelectorPointerAdapter tdv/player/view/model3d/renderer/adapters/objects/NearestObjectsVisibleAdapter tdv/player/view/model3d/renderer/adapters/objects/objects tdv/player/view/model3d/renderer/adapters/pointer/PointerAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/PostprocessingArrayAdapter tdv/player/view/model3d/renderer/adapters/ScenePixelRatioAdapter tdv/player/view/util/XR".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u){var v=function(x){return x.map(function(y){return String.fromCharCode(y)}).join("")}([119,97,116,101,114,109,97,114,107]),w="anisotropicFilteringLevel bakedTextures environmentURL backgroundImageURL backgroundPanoramaURL backgroundColor fogColor fogDensity opacity encoding environmentIntensity".split(" ");p.kB();return function(){function x(y,z,A){var D=this;this.renderer=y;this.ci=z;this.model=A;this.eb=this.renderer.P;this.enabled=!0;this.oj=!1;this.model.Tqa();
this.Od=this.ci.sc("Scene");y=this.Od.N(n.Scene);y.$na=this.model.R7().uO(this.model.V7().iw(.1),.1);y.M=this.model;y.locked=!0;this.Gn=this.ci.sc("Anchor");this.Gn.N(n.pF);this.Gn.N(n.Group);this.Gn.N(n.pb).F=this.Od;this.SNa=new b(this.model,this.model,this.Gn,this.renderer);this.wb=this.SNa.nj();y.Ea=this.Ea=this.ci.sc("PerspectiveCamera");this.Ea.N(n.pb).F=this.Gn;this.Q6=new k(this.renderer,this.model,this.wb,this.Ea);this.Q6.Vw(!0);this.aib=new c(this.model,this.wb,this.Ea);this.hkb=new t(this.model,
this.Od);this.Whb=new e(this.model,this.wb,this.Gn,this.Ea);this.JPa=new q(this.renderer,this.ci,this.model,this.Gn,this.wb,this.Ea);w.forEach(function(F){D.model.bind(h.L(F),D.fqa,D,!0)});this.qjb=new r(this.model,this.Od);this.ci.fIa(this.Od);this.iib=new l(this.model,this.wb,this.Ea);this.Hmb=new f(this.model,this.wb,this.renderer);this.bnb=new d(this.renderer,this.model);u.M.bind(h.V,this.Ta,this,!0);this.fqa();this.Ta()}x.prototype.Vw=function(y){this.Od.O(n.Scene).locked=y;this.Q6.Vw(y)};x.prototype.Ra=
function(y){this.enabled!==y&&(this.enabled=y,this.hx())};x.prototype.Ta=function(){this.oj=u.Uf==this.eb.Fc().sl();this.hx()};x.prototype.hx=function(){var y=(this.model.get("camera").get("xrEnabled")||this.model.get("camera").get("vrEnabled"))&&!(this.model.get("application")&&this.model.get("application").get(v));y=this.enabled&&(!this.oj||y);this.Od.O(n.Scene).enabled=y;this.JPa.Ra(y);this.Q6.Ra(y)};x.prototype.dispose=function(){w.forEach(function(y){this.model.h(h.L(y),this.fqa,this)}.bind(this));
this.model.h(h.L("camera"),this.d9,this);u.M.h(h.V,this.Ta,this);this.hkb.dispose();this.aib.dispose();this.SNa.dispose();this.Q6.dispose();this.Whb.dispose();this.JPa.dispose();this.qjb.dispose();this.Hmb.dispose();this.iib.dispose();this.bnb.dispose();this.ci.Ojb(this.Od);this.ci.dd(this.Od);this.ci.dd(this.Gn);this.ci.dd(this.Ea)};x.prototype.Qfb=function(){return this.wb?g.wJ(this.wb):void 0};x.prototype.fqa=function(){var y=this.Od.O(n.Scene);y.opacity=this.model.get("opacity");y.yKa=this.model.get("environmentURL");
y.ana=this.model.get("backgroundImageURL");y.JIa=this.model.get("backgroundPanoramaURL");y.backgroundColor=this.model.get("backgroundColor");y.outputColorSpace=this.model.get("encoding");y.RKa=this.model.get("fogColor");y.SKa=this.model.get("fogDensity");y.environmentIntensity=this.model.get("environmentIntensity");y=this.model.get("anisotropicFilteringLevel");var z=this.model.get("bakedTextures");if(y!=0||z){var A=this.Od.O(n.gi,!0);A.zW=y;A.GW=z}else this.Od.ka(n.gi)};return x}()});
define("tdv/player/view/model3d/renderer/Renderer","require tdv/utils tdv/player/view/webgl/components tdv/player/view/webgl/Renderer tdv/player/view/model3d/renderer/adapters/SceneAdapter tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/containers/Container".split(" "),function(a){var m=a("tdv/utils");a("tdv/player/view/webgl/components");var h=a("tdv/player/view/webgl/Renderer"),n=a("tdv/player/view/model3d/renderer/adapters/SceneAdapter"),g=a("tdv/view/constants/Cursor"),k=a("tdv/view/constants/LayoutMode"),
e=a("tdv/view/containers/Container");a=m.extend(e,function(b,c,d){e.call(this);this.Je=b;this.P=c;this.qT=d;this.gf("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",g.LB);this.set("layout",k.TZ);this.hf=null;this.ha=!0;this.HH=[];this.DN=new Map});a.prototype.Kb=function(){e.prototype.Kb.call(this);this.hf==null&&(this.hf=new h(this.Je,this.P,!0),this.hf.xa({left:0,top:0,right:0,bottom:0,cursor:g.LB,toolTipDisabled:!0}),this.hf.Ra(this.ha),this.mb(this.hf),this.HH.forEach(this.lFa.bind(this)))};
a.prototype.Ra=function(b){this.ha!==b&&(this.ha=b,this.hf&&this.hf.Ra(this.ha),this.set("interactionEnabled",this.ha))};a.prototype.Qa=function(){this.hf&&this.hf.Qa()};a.prototype.Igb=function(b){return this.HH.indexOf(b)>=0};a.prototype.dIa=function(b){this.HH.indexOf(b)>=0||(this.HH.push(b),this.hf&&this.lFa(b))};a.prototype.tQa=function(b){var c=this.HH.indexOf(b);c<0||(this.HH.splice(c,1),this.hf&&this.VFa(b),this.HH.length===0&&this.Ra(!0))};a.prototype.vra=function(b,c){(b=this.DN.get(b))&&
b.Vw(c)};a.prototype.xRa=function(b,c){(b=this.DN.get(b))&&b.Ra(c)};a.prototype.rX=function(b){return(b=this.DN.get(b))?b.Qfb():void 0};a.prototype.jK=function(){return this.hf&&this.hf.jK()};a.prototype.mna=function(){return this.hf&&this.hf.mna()};a.prototype.lFa=function(b){this.VFa(b);this.DN.set(b,new n(this,this.hf,b))};a.prototype.VFa=function(b){var c=this.DN.get(b);c&&(this.DN["delete"](b),c.dispose())};return a});
define("tdv/player/script/Model3DPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/view/model3d/controller/Controller tdv/player/view/model3d/renderer/Renderer tdv/view/constants/ButtonMode".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/helper/ButtonProperty"),
e=a("tdv/player/script/PlaybackMediaPlayer"),b=a("tdv/player/view/model3d/controller/Controller"),c=a("tdv/player/view/model3d/renderer/Renderer"),d=a("tdv/view/constants/ButtonMode"),f=g.define("Model3DPlayer",e,function(){e.call(this,"model");this.hs=this.S2=this.jj=!1;this.U=this.j=null;this.ac=this.wf=0;this.be=m.nr(this.Sh,this);this.wda=new k(this,"buttonToggleSprites",d.bk);this.wda.bind(h.Rk,function(){this.set("spritesEnabled",!0)},this);this.wda.bind(h.Nm,function(){this.set("spritesEnabled",
!1)},this);this.wda.set("pressed",this.get("spritesEnabled"))});f.prototype.play=function(){this.XH()};f.prototype.pause=function(){this.WH()};f.prototype.stop=function(){this.cD()};f.prototype.restart=function(){this.bD()};f.prototype.getModelPixelScale=function(){return this.f2a()};f.prototype.captureToDataURL=function(){return this.j&&this.j.mna()};f.prototype.saveScreenshot=function(){return this.j&&this.j.jK()};f.prototype.set=function(l,p){if(this.get(l)!=p){switch(l){case "model":this.S2=!0;
this.set("requesterPlayer",null);this.be();break;case "viewerArea":this.jj=!0;this.be();break;case "displayPlaybackBar":this.hs=!0,this.be()}e.prototype.set.call(this,l,p)}};f.prototype.get=function(l,p){switch(l){case "currentTime":return this.U&&this.U.getTime()||0}return e.prototype.get.call(this,l,p)};f.prototype.Sh=function(){this.jj&&(this.jj=!1,this.oy(),this.get("viewerArea")&&this.ny(),this.pV(this.get("viewerArea")),this.S2=!0);var l=!1;if(this.j&&(this.S2||this.u5)){var p=this.get("model");
if(p&&!this.j.Xb()){this.be();return}this.S2=!1;this.ac=this.wf=0;l=!0;p?(this.hK(this.get("requesterPlayer")?[this.get("requesterPlayer"),this]:[this]),this.U.ilb(p)):this.U.cB()}this.hs&&(this.hs=!1,l=!0);l&&this.$z()};f.prototype.TN=function(){this.set("model",null)};f.prototype.ny=function(){var l=this.get("application"),p=this.get("viewerArea");this.j=new c(l,p,this);this.j.xa({left:0,top:0,bottom:0,right:0});p.mb(this.j);this.U=new b(p,this.j);this.U.bind(b.BF,this.ln,this);this.U.bind(b.AF,
this.YC,this);this.U.bind(b.CF,this.XT,this);this.U.bind(b.sba,this.iCa,this,!0);this.U.bind(b.gd,this.Mf,this);this.xD(!0)};f.prototype.oy=function(){this.j&&(this.U.h(b.BF,this.ln,this),this.U.h(b.AF,this.YC,this),this.U.h(b.CF,this.XT,this),this.U.h(b.sba,this.iCa,this,!0),this.U.h(b.gd,this.Mf,this),this.U.clear(),this.j.getParent().removeChild(this.j),this.j=null,this.xD(!1))};f.prototype.Mf=function(l){this.Jd(l.data.state)};f.prototype.ln=function(l){var p=this.get("viewerArea");this.ve=p&&
p.ve;this.oT(l.data.model);this.$z()};f.prototype.XT=function(l){this.o(new n(f.JUa,{model:l.data.model}))};f.prototype.YC=function(l){this.ve=null;this.nT(l.data.model)};f.prototype.iCa=function(l){this.wf=l.data.time;this.ac=l.data.duration;this.$z()};f.prototype.nna=function(){var l=this.get("model");return(l=(l=l&&l.get("camera"))&&l.get("doubleClickAction"))&&l!="none"?!0:!1};f.prototype.EU=function(l){this.sI(l.data.position)};f.prototype.tn=function(){this.U&&this.U.play()};f.prototype.Zs=
function(){this.U&&this.U.stop()};f.prototype.tv=function(){this.U&&this.U.pause()};f.prototype.sI=function(l){this.U&&this.U.setTime(l)};f.prototype.f2a=function(){return this.U&&this.U.rX()};f.prototype.$z=function(){if(this.j){var l=this.j.getParent();this.ac>0&&this.get("displayPlaybackBar")?l.xa({playbackBarPosition:this.wf,playbackBarDuration:this.ac,playbackBarVisible:!0}):l.set("playbackBarVisible",!1)}};f.JUa="preloadMediaShow";return f});
define("tdv/player/script/Model3DPlayListItem","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/MediaPlayer tdv/player/script/PlayListItem".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/MediaPlayer"),k=a("tdv/player/script/PlayListItem");a=n.define("Model3DPlayListItem",k,function(){k.call(this)});a.prototype.start=function(){k.prototype.start.call(this);
var e=this.get("player");e&&(e.bind(g.di,this.ln,this),e.get("model")==this.get("media")&&this.get("media").get("isLoaded")?this.ln():e.set("model",this.get("media")))};a.prototype.stop=function(){var e=this.get("player");e&&(e.h(g.di,this.ln,this),e.get("model")==this.get("media")&&e.set("model",null));k.prototype.stop.call(this)};a.prototype.ln=function(e){e&&e.data.media!=this.get("media")||(this.get("player").h(g.di,this.ln,this),this.get("player").bind(g.oo,this.YC,this),this.wbb())};a.prototype.wbb=
function(){var e=this.get("media").get("camera").get("sequences",[]).find(function(b){return b.get("internal")&&b.get("state")==h.PLAYING});e?e.bind(m.Ub,this.XCa,this,!0):this.PD()};a.prototype.XCa=function(e){e.source.h(m.Ub,this.XCa,this,!0);this.PD()};a.prototype.YC=function(e){e.data.media==this.get("media")&&(this.get("player").h(g.oo,this.YC,this),this.stop(),this.end())};return a});
define("tdv/player/script/Model3DPointer",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DPointer",m,function(){m.call(this)})});define("tdv/player/script/Menu",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Menu",m,function(){m.call(this)})});
define("tdv/player/script/MenuItem",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MenuItem",m,function(){m.call(this)})});
define("tdv/player/script/MotionBlurModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DPostprocessing");return m.define("MotionBlurModel3DPostprocessing",h,function(){h.call(this)})});
define("tdv/player/script/PhotoCamera",["require","exports","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(h);n.create("PhotoCamera",a);return a});define("tdv/player/script/MovementPhotoCamera",["require","exports","tdv/player/script/PhotoCamera","tdv/player/parser/ClassInfo"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(h);n.create("MovementPhotoCamera",a);return a});
define("tdv/player/constants/RotationMode",["require"],function(){var a={wF:"drag_acceleration",ux:"drag_rotation"};a.Ota=a.wF;a.Iua=a.ux;return a});define("tdv/player/view/panorama/control/events/RotationChangeEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event");return m.extend(h,function(n){h.call(this,n);this.TP=this.DQ=this.UA=this.tB=0})});
define("tdv/player/view/panorama/control/events/ZoomChangeEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event");return m.extend(h,function(n){h.call(this,n);this.Ooa=this.Vgb=0})});
define("tdv/player/view/panorama/control/camera/MouseManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/constants/RotationMode tdv/player/view/panorama/control/events/RotationChangeEvent tdv/player/view/panorama/control/events/ZoomChangeEvent".split(" "),function(a){function m(q,r){return q*r}function h(q,r){var t=r>0?1:-1;return t*(Math.pow(q,t*r)-1)/(q-1)}function n(q,r){return Math.min(Math.max(q/r,-1),1)}var g=
a("tdv/utils"),k=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/util/Device"),d=a("tdv/player/constants/RotationMode"),f=a("tdv/player/view/panorama/control/events/RotationChangeEvent"),l=a("tdv/player/view/panorama/control/events/ZoomChangeEvent"),p=g.extend(b,function(){b.call(this);this.uAa=this.vAa=1800;this.C4a=this.G$a=0;this.RS=!1;this.Gq=void 0;this.IH=d.Ota;this.iGa=d.Iua;this.YR=0;this.N4=void 0;this.Tq=!1;this.EL=null;this.jH=
3;this.kb=90;this.Rea=this.xI=this.ne=1;this.ve=this.Ab=null;this.DU=!1});p.prototype.setCamera=function(q){this.vAa=q.get("manualRotationSpeed");this.uAa=q.get("manualRotationSpeed");this.jH=q.get("manualZoomSpeed");this.Rea=q.get("draggingFactor")};p.prototype.UE=function(q){this.IH=q;this.gma()};p.prototype.vK=function(q){this.iGa=q;this.gma()};p.prototype.oK=function(q){this.kb=q;this.xI=this.kb/90};p.prototype.bu=function(q){this.Jn();if(q){this.Ab=q;if(this.ve=q.Afb&&q.ve)this.ve.bind(k.Sa,
this.yDa,this,!0),this.ve.bind(k.$a,this.zDa,this,!0);this.Ab.bind(k.Sa,this.te,this,!0);this.Ab.bind(k.gb,this.bl,this,!0);this.Ab.bind(k.$a,this.cl,this,!0);this.Ab.bind(k.Qk,this.JH,this,!0);this.Ab.Xb().get("settings").get(TDV.PlayerSettings.RVa)!==!1&&this.Ab.bind(k.ZK,this.bH,this,!0);this.Ab.bind(k.HB,this.pya,this,!0);this.Ab.bind(k.YK,this.nya,this,!0);this.gma()}};p.prototype.Jn=function(){this.Ab!=null&&(this.ve&&(this.ve.h(k.Sa,this.yDa,this),this.ve.h(k.$a,this.zDa,this),this.ve=null),
this.Ab.h(k.Sa,this.te,this),this.Ab.h(k.gb,this.bl,this),this.Ab.h(k.$a,this.cl,this),this.Ab.h(k.Qk,this.JH,this),this.Ab.h(k.ZK,this.bH,this),this.Ab.h(k.HB,this.pya,this),this.Ab.h(k.YK,this.nya,this),this.Ab=null,this.a1())};p.prototype.gma=function(){this.Ab&&(c.Jp()?(this.N4=this.iGa,this.YR=this.G$a):(this.N4=this.IH,this.YR=this.C4a))};p.prototype.yDa=function(){this.DU=!0};p.prototype.zDa=function(){this.DU=!1};p.prototype.te=function(q){this.DU||(this.$9a(q),this.Uka())};p.prototype.bl=
function(q){this.DU||this.dO(q)};p.prototype.cl=function(){this.DU||(this.ffa(),this.a1())};p.prototype.JH=function(q){this.qma(q);this.Uka(500)};p.prototype.pya=function(){this.Uka()};p.prototype.bH=function(q){this.rma(q)};p.prototype.nya=function(){this.a1()};p.prototype.$9a=function(q){this.RS=!0;this.Gq=q;this.dO(q)};p.prototype.dO=function(q){if(this.RS)switch(this.N4){case d.wF:this.dbb(q);break;case d.ux:this.cbb(q)}};p.prototype.dbb=function(q){var r=this.kHa,t=q.x-this.Gq.x;t=+m(h(10,n(Math.abs(t)<
3?0:t,this.Ab.nb())),this.vAa*this.xI);q=q.y-this.Gq.y;r.call(this,t,-m(h(10,n(Math.abs(q)<3?0:q,this.Ab.Mb())),this.uAa*this.xI))};p.prototype.cbb=function(q){this.fma(-m(n(q.x-this.Gq.x,this.Ab.nb()),this.kb*this.Rea),+m(n(q.y-this.Gq.y,this.Ab.nb()),this.kb*this.Rea));this.Gq=q};p.prototype.ffa=function(){if(this.RS)switch(this.RS=!1,this.N4){case d.wF:this.kHa(0,0)}};p.prototype.kHa=function(q,r){var t=new f(p.yx);t.tB=q;t.UA=r;this.o(t)};p.prototype.fma=function(q,r){var t=new f(p.yx);t.DQ=q;
t.TP=r;this.o(t)};p.prototype.rma=function(q){if(this.ne!=q.scale){this.ffa();var r=this.ne;this.ne=q.scale;q=new l(p.Jr);q.Ooa=this.kb*r/this.ne-this.kb;this.o(q)}};p.prototype.qma=function(q){if(q.delta!=0){this.ffa();var r=new l(p.Jr);r.Ooa=this.kb*-q.delta*this.jH/100;this.o(r)}};p.prototype.Uka=function(q){var r=this.EL!=null;this.HFa();if(q&&(r||!this.Tq)){var t=this;this.EL=setTimeout(function(){t.EL=null;t.a1()},q)}this.Tq||(this.Tq=!0,this.o(new e(p.ak)))};p.prototype.a1=function(){this.HFa();
this.Tq&&(this.Tq=!1,this.o(new e(p.$j)))};p.prototype.HFa=function(){this.EL!=null&&(clearTimeout(this.EL),this.EL=null)};p.yx="rotation change";p.Jr="zoom change";p.ak="user interaction start";p.$j="user interaction end";return p});
define("tdv/player/view/panorama/control/camera/MovementManager",["require","tdv/player/view/util/Device"],function(a){function m(){this.yI=n.ub()?.066:.1;this.F4a=.5;this.L9a=n.ub()?.066:.1;this.Jbb=.1;this.s5=this.z5=!1;this.reset()}function h(g,k,e){g=(k-g)*(1-e);Math.abs(g)<.01&&(g=0);return k-g}var n=a("tdv/player/view/util/Device");m.prototype.reset=function(){this.rxa=this.mea=this.YL=this.rC=this.PR=this.qea=this.pea=this.uea=this.uM=this.jH=this.I4=this.K4=this.Ms=this.CU=this.Xv=this.uW=
0};m.prototype.Ara=function(g,k,e,b,c,d,f,l,p){return this.uW!=g||(this.CU=k)||this.K4!=e||b!=0||c!=0||this.s5!=f||this.NAa!=l||this.z5!=p?(this.uW=g,this.CU=k,this.K4=e,this.Xv+=b,this.Ms+=c,this.I4+=d,this.s5=f,this.NAa=l,this.z5=p,!0):!1};m.prototype.emb=function(g,k){return this.jH!=g||k!=0?(this.jH=g,this.uM+=k,!0):!1};m.prototype.Vf=function(){return this.uea!=0||this.pea!=0||this.qea!=0||this.PR!=0||this.uW!=0||this.CU!=0||this.K4!=0||this.jH!=0||this.Xv!=0||this.Ms!=0||this.uM!=0};m.prototype.Nb=
function(g){g=1E3/g;var k=this.uea/g,e=this.uW/g+this.Xv;this.Xv=0;var b=this.pea/g,c=this.CU/g+this.Ms;this.Ms=0;var d=this.qea/g,f=this.K4/g+this.I4;this.I4=0;var l=this.jH+this.uM*g;this.uM=0;var p=e==0&&c==0&&f==0,q=k==0&&b==0&&d==0;this.s5&&q&&!p||this.z5&&p&&!q||this.NAa&&!p&&!q?(p=p?this.yI:q?this.L9a:this.F4a,this.rC=h(k,e,p),this.YL=h(b,c,p),this.mea=h(d,f,p)):(this.rC=e,this.YL=c,this.mea=f);k=this.PR==0;e=l==0;this.PR=this.s5&&k&&!e||this.z5&&e&&!k?h(this.PR,l,this.Jbb):l;this.uea=this.rC*
g;this.pea=this.YL*g;this.qea=this.mea*g;this.rxa=this.PR/g};return m});
define("tdv/player/view/object3d/Renderer","require tdv/utils tdv/view/core/UIComponent tdv/player/view/panorama/control/camera/MouseManager tdv/player/view/panorama/control/camera/MovementManager tdv/view/util/Animation tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/view/core/UIComponent"),n=a("tdv/player/view/panorama/control/camera/MouseManager"),g=a("tdv/player/view/panorama/control/camera/MovementManager"),k=a("tdv/view/util/Animation"),e=a("tdv/constants/EventName");
a=m.extend(h,function(){h.call(this);this.gf("Renderer");this.ja=document.createElement("canvas");this.ja.style.position="absolute";this.ja.style.left="0";this.ja.style.top="0";this.wa().uk(this.ja);this.JC=null;this.Ga=this.xM=this.vM=this.wM=0;this.am=!1;this.C6a=150;this.DS=0;this.Po=null;this.bind(e.Rb,this.kd,this,!0);this.Hb=new n;this.Hb.sqb(720);this.Hb.VY(0);this.Hb.UE("drag_rotation");this.Hb.oK(360);this.Hb.bind(n.yx,this.M5a,this);this.Ac=new g});a.prototype.Qkb=function(b,c,d){this.JC=
b;this.wM=c;this.vM=d;this.xM=Math.floor(this.JC.length*this.Ga/360);this.bka();this.Hb.bu(this);this.bb()};a.prototype.Zcb=function(){this.JC=null;this.Nv();this.bka();this.Hb.Jn()};a.prototype.play=function(){this.am=!0;this.bb()};a.prototype.M5a=function(b){this.Nv();this.Ac.Ara(b.tB,b.UA,0,b.DQ,b.TP,0,!1,!0);this.bb()};a.prototype.sia=function(){this.play()};a.prototype.sq=function(b){this.JC&&(this.Ac.Vf()?(this.am=!1,this.Ac.Nb(b),this.Kva(this.Ac.rC),this.bb()):this.am?(this.Kva(this.C6a*b/
1E3),this.bb()):this.BM()||this.CV())};a.prototype.sj=function(b){for(this.Ga=b;this.Ga<0;)this.Ga+=360;for(;this.Ga>=360;)this.Ga-=360;this.Cab()};a.prototype.Cab=function(){if(this.JC){var b=Math.floor(this.JC.length*this.Ga/360);this.xM!=b&&(this.xM=b,this.XDa())}};a.prototype.Kva=function(b){this.sj(this.Ga+b)};a.prototype.kd=function(){this.bka()};a.prototype.bka=function(){var b=this.ja;if(this.wM==0||this.vM==0)b.width=0,b.height=0;else{var c=this.Xh(),d=this.Wh();d*this.wM>c*this.vM?(b.width=
c,b.height=this.vM*c/this.wM):(b.height=d,b.width=this.wM*d/this.vM);b.style.left=Math.round((c-b.width)*.5)+"px";b.style.top=Math.round((d-b.height)*.5)+"px";this.XDa()}};a.prototype.XDa=function(){if(this.JC){var b=this.ja;b.getContext("2d").drawImage(this.JC[this.xM],0,0,this.wM,this.vM,0,0,b.width,b.height)}};a.prototype.BM=function(){return this.Po?!0:!1};a.prototype.CV=function(){this.Nv();if(this.DS>0){var b=this;this.Po=setTimeout(function(){b.Po=null;b.sia()},this.DS)}};a.prototype.Nv=function(){this.Po&&
(clearTimeout(this.Po),this.Po=null)};a.prototype.bb=function(){k.requestFrame(this.sq,this)};return a});
define("tdv/player/script/Object3D","require tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/LevelUtil tdv/player/view/ProgressBar tdv/player/view/object3d/Renderer tdv/view/containers/Container tdv/view/images/ImageLoader".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/constants/Priority"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/helper/LevelUtil"),e=a("tdv/player/view/ProgressBar"),
b=a("tdv/player/view/object3d/Renderer"),c=a("tdv/view/containers/Container"),d=a("tdv/view/images/ImageLoader");a=g.define("Object3D",c,function(){c.call(this);this.Sd=this.Xo=this.ej=this.j=null;this.bind(m.od,this.cp,this);this.bind(m.jd,this.ap,this)});a.prototype.Kb=function(){c.prototype.Kb.call(this);this.j||(this.j=new b,this.j.xa({left:0,top:0,right:0,bottom:0}),this.mb(this.j));this.ej||(this.ej=new e,this.ej.xa({left:0,bottom:0,right:0,height:20,visible:!1}),this.mb(this.ej))};a.prototype.cp=
function(){this.k4a()};a.prototype.ap=function(){this.Zs()};a.prototype.k4a=function(){this.ej.set("percent",0);this.ej.set("visible",!0);this.j.sj(this.get("yaw"));var f=this.get("frames",[]);this.Xo=[];this.Sd=[];for(var l=0;l<f.length;l++){var p=k.Ft(f[l]);this.Xo.push(p);p=new d(h.Jm);p.bind(m.ia,this.VT,this);p.bind(m.$c,this.WT,this);this.Sd.push(p)}for(l=0;l<f.length;l++)this.Sd[l].load(this.Xo[l].get("url"))};a.prototype.VT=function(){var f=this.Sd.filter(function(l){return l.pj()});this.ej.set("percent",
100*f.length/this.Sd.length);f.length==this.Sd.length&&this.Pe()};a.prototype.WT=function(){};a.prototype.Pe=function(){this.ej.set("visible",!1);var f=this.Xo[0].get("width",this.Sd[0].hg()),l=this.Xo[0].get("height",this.Sd[0].xg()),p=this.Sd.map(function(q){return q.yg()});this.j.Qkb(p,f,l);this.o(new n(m.ia))};a.prototype.Zs=function(){this.Sd&&(this.ej.set("visible",!1),this.j.Zcb(),this.Sd=this.Sd.forEach(function(f){f.h(m.ia,this.VT,this);f.h(m.$c,this.WT,this);f.cancel()}),this.Xo=this.Sd=
null)};return a});define("tdv/player/script/RotationalCameraPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RotationalCameraPosition",m,function(h,n,g){m.call(this);h!==void 0&&this.set("yaw",h);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("hfov",g)})});
define("tdv/player/script/PanoramaCameraPosition",["require","tdv/player/script/RotationalCameraPosition","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/RotationalCameraPosition");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraPosition",m,function(){m.apply(this,arguments)})});
define("tdv/player/script/PanoramaCamera",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaCameraPosition","tdv/player/script/RotationalCameraPosition"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/PanoramaCameraPosition"),g=a("tdv/player/script/RotationalCameraPosition"),k=h.define("RotationalCamera",m,function(){m.call(this);this.set("initialPosition",new g)});return h.define("PanoramaCamera",k,function(){k.call(this);
this.set("initialPosition",new n)})});define("tdv/player/script/RotationalCameraDisplayPosition",["require","tdv/player/script/RotationalCameraPosition","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/RotationalCameraPosition");return a("tdv/player/parser/ClassInfo").define("RotationalCameraDisplayPosition",m,function(){m.apply(this,arguments)})});
define("tdv/player/script/PanoramaCameraDisplayPosition",["require","tdv/player/script/RotationalCameraDisplayPosition","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/RotationalCameraDisplayPosition");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraDisplayPosition",m,function(){m.apply(this,arguments)})});
define("tdv/player/script/PanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraMovement",m,function(){m.call(this)})});
define("tdv/player/script/RotationalCameraSequence",["require","tdv/binding/Bindable","tdv/events/Event","tdv/player/parser/ClassInfo","tdv/constants/EventName"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/constants/EventName");a=n.define("RotationalCameraSequence",m,function(){m.call(this)});a.prototype.play=a.prototype.play=function(){this.o(new h(g.Fx))};a.prototype.pause=a.prototype.pause=function(){this.o(new h(g.iL))};return a});
define("tdv/player/script/PanoramaCameraSequence",["require","tdv/player/parser/ClassInfo","tdv/player/script/RotationalCameraSequence"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/RotationalCameraSequence");return m.define("PanoramaCameraSequence",h,function(){h.call(this)})});
define("tdv/player/script/PanoramaMapLocation",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaMapLocation",m,function(){m.call(this)})});define("tdv/player/script/PanoramaModel3DLocation",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaModel3DLocation",m,function(){m.call(this)})});
define("tdv/player/script/PanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaOverlay",m,function(){m.call(this)})});
define("tdv/player/view/panorama/control/AudioController",["require","tdv/constants/PlaybackState","tdv/player/script/DirectionalPanoramaAudio","tdv/player/view/util/geo/Quaternion","tdv/player/view/util/geo/Vector"],function(a){function m(q){this.j=q;this.Pu=[];this.sd=this.rb=this.Ga=0}var h=a("tdv/constants/PlaybackState"),n=a("tdv/player/script/DirectionalPanoramaAudio"),g=a("tdv/player/view/util/geo/Quaternion"),k=a("tdv/player/view/util/geo/Vector");m.prototype.clear=function(){this.stop();
this.Pu=this.j=null};m.prototype.end=function(q){var r=[],t=[],u=this.cza(q);this.Pu.forEach(function(v){u.indexOf(v)<0?r.push(v):t.push(v)});r.forEach(function(v){v.sJ().Zc(h.ca)});this.Pu=t};m.prototype.start=function(q){this.end(q);this.Pu=this.cza(q);this.CGa();this.X4(h.PLAYING,!0)};m.prototype.play=function(){this.X4(h.PLAYING)};m.prototype.pause=function(){this.X4(h.$b)};m.prototype.stop=function(){this.X4(h.ca)};m.prototype.ze=function(){this.Ga=this.j.Kc();this.rb=this.j.Jc();this.sd=this.j.zg();
this.CGa()};m.prototype.CGa=function(){this.Pu.forEach(q=>{var r=q.sJ();if(q instanceof n){c=k.At(q.get("yaw",0)*e,q.get("pitch",0)*e,c);b=k.At(this.Ga*e,this.rb*e,b);var t=Math.acos(b.dot(c)),u=q.get("maximumAngle",Infinity)*e;r.jB(1-Math.min(1,t/u));f.makeRotationFromEuler(p.set(q.get("pitch",0)*e,-q.get("yaw",0)*e,0,"YXZ"));f.multiply(l.makeTranslation(0,0,-1));r.Uw(f)}d=g.jX(this.Ga,this.rb,this.sd,d);f.makeRotationFromQuaternion(d);r.cu(f)})};m.prototype.cza=function(q){return q?q.get("audios",
[]):[]};m.prototype.X4=function(q,r){(r?this.Pu.slice().reverse():this.Pu).forEach(function(t){if(t.get("autoplay",!1)){t=t.sJ();var u=t.getState();q==h.PLAYING&&u!=h.PLAYING?t.Zc(h.PLAYING):q==h.$b&&u==h.PLAYING?t.Zc(h.$b):q==h.ca&&u!=h.ca&&t.Zc(h.ca)}})};var e=Math.PI/180,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Quaternion,f=new THREE.Matrix4,l=new THREE.Matrix4,p=new THREE.Euler;return m});
define("tdv/player/view/util/geo/Transformation",["require"],function(){function a(c){c%=n;c<0&&(c+=n);return e[c*g|0]}function m(c){c%=n;c<0&&(c+=n);return k[c*g|0]}function h(){this.identity()}h.prototype.identity=function(){this.m11=1;this.m21=this.m13=this.m12=0;this.m22=1;this.m32=this.m31=this.m23=0;this.m33=1;this.tz=this.Ii=this.Hi=0};h.prototype.clone=function(){var c=new h;c.m11=this.m11;c.m12=this.m12;c.m13=this.m13;c.m21=this.m21;c.m22=this.m22;c.m23=this.m23;c.m31=this.m31;c.m32=this.m32;
c.m33=this.m33;c.Hi=this.Hi;c.Ii=this.Ii;c.tz=this.tz;return c};h.prototype.concat=function(c){var d=this.m11,f=this.m12,l=this.m13,p=this.m21,q=this.m22,r=this.m23,t=this.m31,u=this.m32,v=this.m33,w=this.Hi,x=this.Ii,y=this.tz;this.m11=d*c.m11+f*c.m21+l*c.m31;this.m12=d*c.m12+f*c.m22+l*c.m32;this.m13=d*c.m13+f*c.m23+l*c.m33;this.m21=p*c.m11+q*c.m21+r*c.m31;this.m22=p*c.m12+q*c.m22+r*c.m32;this.m23=p*c.m13+q*c.m23+r*c.m33;this.m31=t*c.m11+u*c.m21+v*c.m31;this.m32=t*c.m12+u*c.m22+v*c.m32;this.m33=
t*c.m13+u*c.m23+v*c.m33;this.Hi=w*c.m11+x*c.m21+y*c.m31+c.Hi;this.Ii=w*c.m12+x*c.m22+y*c.m32+c.Ii;this.tz=w*c.m13+x*c.m23+y*c.m33+c.tz};h.prototype.translate=function(c,d,f){this.Hi+=c;this.Ii+=d;this.tz+=f};h.prototype.scale=function(c,d,f){this.m11*=c;this.m12*=d;this.m13*=f;this.m21*=c;this.m22*=d;this.m23*=f;this.m31*=c;this.m32*=d;this.m33*=f;this.Hi*=c;this.Ii*=d;this.tz*=f};h.prototype.rotateX=function(c){var d=a(c);c=m(c);var f=this.m12*d+this.m13*c,l=this.m22*c-this.m23*d,p=this.m22*d+this.m23*
c,q=this.m32*c-this.m33*d,r=this.m32*d+this.m33*c,t=this.Ii*c-this.tz*d,u=this.Ii*d+this.tz*c;this.m12=this.m12*c-this.m13*d;this.m13=f;this.m22=l;this.m23=p;this.m32=q;this.m33=r;this.Ii=t;this.tz=u};h.prototype.rotateY=function(c){var d=a(c);c=m(c);var f=-this.m11*d+this.m13*c,l=this.m21*c+this.m23*d,p=-this.m21*d+this.m23*c,q=this.m31*c+this.m33*d,r=-this.m31*d+this.m33*c,t=this.Hi*c+this.tz*d,u=-this.Hi*d+this.tz*c;this.m11=this.m11*c+this.m13*d;this.m13=f;this.m21=l;this.m23=p;this.m31=q;this.m33=
r;this.Hi=t;this.tz=u};h.prototype.rotateZ=function(c){var d=a(c);c=m(c);var f=this.m11*d+this.m12*c,l=this.m21*c-this.m22*d,p=this.m21*d+this.m22*c,q=this.m31*c-this.m32*d,r=this.m31*d+this.m32*c,t=this.Hi*c-this.Ii*d,u=this.Hi*d+this.Ii*c;this.m11=this.m11*c-this.m12*d;this.m12=f;this.m21=l;this.m22=p;this.m31=q;this.m32=r;this.Hi=t;this.Ii=u};h.prototype.rotate=function(c,d,f){this.rotateX(c);this.rotateY(d);this.rotateZ(f)};h.prototype.invert=function(){var c=this.mfb();if(c==0)return!1;var d=
this.clone();this.m11=(d.m22*d.m33-d.m23*d.m32)/c;this.m12=(d.m13*d.m32-d.m12*d.m33)/c;this.m13=(d.m12*d.m23-d.m13*d.m22)/c;this.m21=(d.m23*d.m31-d.m21*d.m33)/c;this.m22=(d.m11*d.m33-d.m13*d.m31)/c;this.m23=(d.m13*d.m21-d.m11*d.m23)/c;this.m31=(d.m21*d.m32-d.m22*d.m31)/c;this.m32=(d.m12*d.m31-d.m11*d.m32)/c;this.m33=(d.m11*d.m22-d.m12*d.m21)/c;this.Hi=-(d.Hi*this.m11+d.Ii*this.m21+d.tz*this.m31);this.Ii=-(d.Hi*this.m12+d.Ii*this.m22+d.tz*this.m32);this.tz=-(d.Hi*this.m13+d.Ii*this.m23+d.tz*this.m33);
return!0};h.prototype.mfb=function(){return this.m11*(this.m22*this.m33-this.m23*this.m32)+this.m12*(this.m23*this.m31-this.m21*this.m33)+this.m13*(this.m21*this.m32-this.m22*this.m31)};h.prototype.yO=function(c){var d=c.x*this.m12+c.y*this.m22+c.z*this.m32+this.Ii,f=c.x*this.m13+c.y*this.m23+c.z*this.m33+this.tz;c.x=c.x*this.m11+c.y*this.m21+c.z*this.m31+this.Hi;c.y=d;c.z=f};for(var n=Math.PI*2,g=18E4/n,k=new Float32Array(180001),e=new Float32Array(180001),b=0;b<18E4;b++)k[b]=Math.cos(b/g),e[b]=
Math.sin(b/g);k[18E4]=k[0];e[18E4]=e[0];return h});define("tdv/player/view/panorama/renderer/constants/EyeLayer",["require"],function(){return{nx:0,fb:1,Db:2}});
define("tdv/player/view/panorama/renderer/object/util/PanoramaFormat",["require","tdv/player/parser/ClassInfo","tdv/player/view/util/Capabilities"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/view/util/Capabilities"),n={get:function(g){return g.cXa||(g.cXa=this.R0a(g))},R0a:function(g){if(m.Oa("CubicPanoramaFrame",g))return g.get("stereoCube")?n.VB:g.get("cube")?n.Bx:n.Km;if(m.Oa("SphericPanoramaFrame",g)){var k=g.get("stereoSphere"),e=g.get("sphere"),b=g.get("hfov");g=g.get("vfov");
var c=b>359.9&&g>179.9,d=!1;k&&!e?d=!0:k?e&&!k.get("levels").some(h.HSa)?d=!1:c&&h.Icb()?d=!0:!c&&h.Hcb()&&(d=!0):d=!1;return d?(k=k.get("levels"),e=Math.max.apply(Math,k.map(function(f){return f.get("width")})),Math.max.apply(Math,k.map(function(f){return f.get("height")}))/g/(e/b)>1?n.Yr:n.Hu):n.Pr}},VB:"stereoCube_12_1",Bx:"monoCube_6_1",Km:"monoCube_1_1",Pr:"monoSphere_1_1",Yr:"stereoSphere_1_2",Hu:"stereoSphere_2_1"};return n});
define("tdv/player/view/panorama/renderer/object/util/LevelUtil","require tdv/player/parser/ClassInfo tdv/player/script/ImageResourceLevel tdv/player/view/panorama/renderer/constants/EyeLayer tdv/player/view/panorama/renderer/constants/Face tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/view/util/Scale tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL tdv/view/constants/ScaleMode tdv/view/images/ImageLoader tdv/view/av/VideoPlayer".split(" "),
function(a){function m(K,L,U){return K.split(L).join(U).split(encodeURI(L)).join(U)}function h(K,L){return K.indexOf(L)>=0||K.indexOf(encodeURI(L))>=0}function n(){var K=D.EA()&&F.Tg("recent_ipad_use_max_res",!1);n=function(){return K};return K}function g(K){if(K.length==0)return 1;K.sort(function(L,U){return U.get("width")-L.get("width")});return K[0].get("width")/K[0].get("height")}function k(K,L){var U=1E4;n()||(D.kf()?U=2048:D.EA()?U=1280:D.ub()&&(U=1024));switch(K){case z.Bx:return[6*U,U];case z.Km:return[U,
U];case z.VB:return[12*U,U]}switch(K){case z.Yr:L*=2;break;case z.Hu:L*=.5}return L>2?[U*4,U*4/L]:[U*2*L,U*2]}function e(K){if(n())return[void 0,void 0];switch(K){case z.Bx:if(D.kf()||D.ub())return[18432,1536];break;case z.Yr:if(D.kf())return[5352,5352];if(D.ub())return[6086,6086];break;case z.Pr:if(D.kf())return[7168,3584];if(D.ub()&&D.EA())return[8192,4096]}return[void 0,void 0]}function b(K,L){var U=e(L);L=K.filter(function(T){return v.Oa("TiledImageResourceLevel",T)?!0:U[0]!==void 0&&T.get("width")>
U[0]||U[1]!==void 0&&T.get("height")>U[1]?!1:!0});L.length==0&&(L=[d(K)[0]]);return L}function c(){return D.EA()?[w.Fua]:D.D8()||D.E8()?D.Dc()==D.tu||D.Dc()==D.yB?[w.F_,w.nca]:[w.nca,w.F_]:D.kf()?[w.F_]:D.ub()?[w.E_]:[]}function d(K){K.sort(function(L,U){return L.get("width")-U.get("width")});return K}function f(K,L){function U(T){return Math.abs(T.get("width")*T.get("height")-L[0]*L[1])}K.sort(function(T,Y){return U(T)-U(Y)});return K.length&&K[0]||null}function l(K,L,U){K=K.filter(function(T){return T.get("tags").indexOf(L)<
0});return K.length?K:U!==void 0?U:[]}function p(K,L,U){K=K.filter(function(T){return T.get("tags").indexOf(L)>=0});return K.length?K:U!==void 0?U:[]}function q(K,L,U){switch(U){case z.VB:case z.Bx:case z.Km:return K;case z.Pr:case z.Hu:return K*L.get("hfov",180)/90;case z.Yr:return K*L.get("hfov",180)*2/90}}function r(K,L){switch(L){case z.VB:return K.get("stereoCube").get("levels");case z.Bx:return K.get("cube").get("levels");case z.Km:return K.get("front").get("levels");case z.Pr:return K.get("sphere").get("levels");
case z.Yr:case z.Hu:return K.get("stereoSphere").get("levels")}}function t(K,L){var U=r(K,L),T=K.get("minFaceSize");if(T){var Y=q(T,K,L);K=U.filter(function(aa){return aa.get("height")>=Y});K.length>0&&(U=K)}return U}function u(K){for(var L=[],U=0;U<K.length;U++){var T=K[U];L.indexOf(T)<0&&L.push(T)}return L}var v=a("tdv/player/parser/ClassInfo"),w=a("tdv/player/script/ImageResourceLevel"),x=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),y=a("tdv/player/view/panorama/renderer/constants/Face"),
z=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),A=a("tdv/view/util/Scale");a("tdv/player/view/util/Capabilities");var D=a("tdv/player/view/util/Device");a("tdv/player/view/util/FileType");var F=a("tdv/player/view/util/URL"),C=a("tdv/view/constants/ScaleMode"),B=a("tdv/view/images/ImageLoader"),H=a("tdv/view/av/VideoPlayer"),E={yLa:function(K){K=K.get("frames");if(K.length==0)return 1;var L=K[0];K=z.get(L)==z.Pr&&L.Mn()?(K=H.zk(L.get("sphere")))?[K]:[]:z.get(L)!=z.Yr&&z.get(L)!=
z.Hu||!L.Mn()?E.Boa(L,!1):(K=H.zk(L.get("stereoSphere")))?[K]:[];return Math.max.apply(Math,K.map(function(U){return E.Rfb(L,U)}).concat([1]))},Rfb:function(K,L){L=E.qoa(K,L,y.FRONT);L=L.get("width");var U=K.cE().get("hfov",360);switch(z.get(K)){case z.VB:return L/1080;case z.Bx:return L/540;case z.Km:return L/90;case z.Pr:return L/U;case z.Yr:return L/U;case z.Hu:return L/(2*U)}},Zoa:function(K,L){K=E.wp(K,L);return K.length<=6&&K.every(function(U){return B.gaa(U)})},yqa:function(K,L){return E.wp(K,
L).every(function(U){return B.gaa(U)})},wp:function(K,L,U){if(!K)return[];U||(U=!1);if(v.Oa("Panorama",K))return U=K.get("flipImageHorizontally",!1),u([].concat(Array.prototype.concat.apply([],K.get("frames").map(function(X){return E.wp(X,L,U)})),Array.prototype.concat.apply([],K.get("overlays").map(function(X){return E.wp(X,L,U)}))));if(v.Oa("PanoramaFrame",K)){var T=Array.prototype.concat.apply([],K.get("overlays").map(function(X){return E.wp(X,L,U)}));if(z.get(K)==z.Pr&&K.Mn())return E.wp(H.zk(K.get("sphere")),
L).concat(T);if((z.get(K)==z.Yr||z.get(K)==z.Hu)&&K.Mn())return E.wp(H.zk(K.get("stereoSphere")),L).concat(T);var Y=E.Boa(K,L)[0];U=K.get("flipImageHorizontally",!1);if(z.get(K)==z.Km){var aa=[y.FRONT,y.fb,y.BACK,y.Db,y.Tc,y.Hc];return Array.prototype.concat.apply([],aa.map(function(X){return(X=E.qoa(K,Y,X))?E.wp(X,L,U):[]})).concat(T)}return E.wp(Y,L,U).concat(T)}if(v.Oa("Video360ResourceLevel",K))return(T=K.get("posterURL"))?[T]:[];if(v.Oa("HotspotPanoramaOverlay",K))return K.get("projected")?Array.prototype.concat.apply([],
K.get("items").map(function(X){return E.wp(X,L,U)})):[];if(v.Oa("FlatHotspotPanoramaOverlayImage",K)||v.Oa("HotspotPanoramaOverlayImage",K))return T=K.get("image").get("levels"),Y=T[0],E.wp(Y,L,U),Array.prototype.concat.apply([],T.map(function(X){return E.wp(X,L,U)}));if(v.Oa("TiledImageResourceLevel",K)){var ba=[];T=Math.round(K.get("width")/K.get("height"));if(T==1)var ea=z.Km;else if(T==12)ea=z.Uob;else if(T==6)ea=z.Bx;else return[];var ia=T==12?[x.Db,x.fb]:[x.nx];aa=[y.Db,y.fb,y.Tc,y.Hc,y.FRONT,
y.BACK];var da=K.get("colCount",T)/T,V=K.get("rowCount",1);ia.forEach(function(X){aa.forEach(function(S){for(var W=0;W<V;W++)for(var Z=0;Z<da;Z++)ba.push(E.WLa(K,ea,X,S,U,V,W,Z))})});return ba}return v.Oa("ImageResourceLevel",K)?[K.get("url")]:[]},Boa:function(K,L){var U=z.get(K),T=this.E1a(K);if(T)return L&&!this.Qza(T)&&(K=this.jza(K),K!=T)?[K,T]:[T];T=p(t(K,U),w.oca);if(T.length>0)return d(T);T=this.s2a(K);return L&&!this.Qza(T)&&(K=this.jza(K),K!=T)?[K,T]:[T]},Dhb:function(K){return K.get("tags").indexOf(w.oca)>=
0},qoa:function(K,L,U){if(z.get(K)!=z.Km)return L;switch(U){case y.FRONT:var T=K.get("front");break;case y.fb:T=K.get("left");break;case y.BACK:T=K.get("back");break;case y.Db:T=K.get("right");break;case y.Tc:T=K.get("top");break;case y.Hc:T=K.get("bottom")}K=T&&T.get("levels")||[];if(K.length==0)return null;K=K.filter(function(Y){return Y.get("width")==L.get("width")&&Y.get("height")==L.get("height")&&Y.get("grayscale",!1)==L.get("grayscale",!1)&&Y.get("colCount",1)==L.get("colCount",1)&&Y.get("rowCount",
1)==L.get("rowCount",1)});return K[0]},WLa:function(K,L,U,T,Y,aa,ba,ea){K=K.get("url");var ia=0;h(K,"{eye}")?K=m(K,"{eye}",Q[U]):ia+=6*(Y?O:N)[U];h(K,"{face}")?K=m(K,"{face}",R[T]):L!=z.Km&&(ia+=G[T]);K=m(K,"{row}",ba);return K=m(K,"{column}",ea+ia*aa)},Tfb:function(K,L){return E.rS(E.dH(K.get("image")),90,90,C.uj,L)},ifb:function(K,L){return E.rS(E.dH(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},zfb:function(K,L){return E.rS(E.dH(K.get("image")),K.get("hfov"),K.get("vfov"),
K.get("scaleMode"),L)},kgb:function(K,L){return E.rS(E.dH(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},kLa:function(K,L){return E.rS(E.dH(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},dH:function(K){return K&&K.get("levels")||[]},rS:function(K,L,U,T,Y){if(!K||!K.length)return null;K=l(K,w.Ku,K);for(var aa=c(),ba=0;ba<aa.length;ba++)K=p(K,aa[ba],K);aa=1E4;n()||(D.kf()?aa=2048:D.EA()?aa=1280:D.ub()&&(aa=1024));ba=d(K)[K.length-1];L=A.Foa(L,U,ba.get("width"),
ba.get("height"),T,Y);return f(K,[L.Wd*aa/90,L.Nk*aa/90])},rfb:function(K){var L=E.dH(K.get("image"));if(!L||!L.length)return null;L=l(L,w.Ku,L);for(var U=c(),T=0;T<U.length;T++)L=p(L,U[T],L);U=d(L)[L.length-1];K=A.J7(K.get("width"),K.get("height"),U.get("width"),U.get("height"),K.get("scaleMode"));return f(L,[K.width,K.height])},Wfb:function(K){var L=E.dH(K.get("image"));if(!L||!L.length)return null;L=l(L,w.Ku,L);for(var U=c(),T=0;T<U.length;T++)L=p(L,U[T],L);U=1E4;n()||(D.kf()?U=2048:D.EA()?U=1280:
D.ub()&&(U=1024));var Y=T=20;(K=K.get("vertices"))&&K.length==4&&(T=K[0].get("yaw"),Y=K[1].get("yaw"),Y<T&&(Y+=360),T=Y-T,Y=K[0].get("pitch"),K=K[3].get("pitch"),Y-=K);return f(L,[T*U/90,Y*U/90])},jza:function(K){var L=z.get(K);K=t(K,L);K=b(K,L);K=p(K,w.Ku,K);L=c();for(var U=0;U<L.length;U++)K=p(K,L[U],K);return f(K,[0,0])},s2a:function(K){var L=z.get(K);K=t(K,L);K=b(K,L);K=l(K,w.Ku,K);for(var U=c(),T=0;T<U.length;T++)K=p(K,U[T],K);L=k(L,g(K));return f(K,L)},E1a:function(K){var L=c();if(L.length==
0)return null;var U=z.get(K),T=t(K,U);T=b(T,U);T=l(T,w.Ku,T);K=[];for(var Y=0;Y<L.length&&K.length==0;Y++)K=p(T,L[Y]);if(K.length==0)return null;L=k(U,g(K));return f(K,L)},Qza:function(K){return K.get("tags").indexOf(w.oca)>=0?!1:D.Dc()==D.zB?!0:B.gaa(K.get("url"))}},G=function(){var K={};K[y.Db]=0;K[y.fb]=1;K[y.Tc]=2;K[y.Hc]=3;K[y.FRONT]=4;K[y.BACK]=5;return K}(),N=function(){var K={};K[x.Db]=0;K[x.fb]=1;K[x.nx]=0;return K}(),O=function(){var K={};K[x.Db]=1;K[x.fb]=0;K[x.nx]=0;return K}(),R=function(){var K=
{};K[y.Db]="r";K[y.fb]="l";K[y.Tc]="u";K[y.Hc]="d";K[y.FRONT]="f";K[y.BACK]="b";return K}(),Q=function(){var K={};K[x.fb]="l";K[x.Db]="r";K[x.nx]="b";return K}();return E});
define("tdv/player/view/panorama/control/camera/LimitsManager","require tdv/utils tdv/constants/EventName tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Transformation tdv/player/view/util/geo/Vector tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),function(a){function m(p){this.j=p;this.Rd=!1;this.op=m.iG;this.wfa=this.pH=!1;this.Wf(null);this.j.bind(n.Rb,this.kd,this,!0);this.kd()}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/util/geo/Fov"),k=
a("tdv/player/view/util/geo/Transformation"),e=a("tdv/player/view/util/geo/Vector"),b=a("tdv/player/view/panorama/renderer/object/util/LevelUtil");m.prototype.tMa=function(){return this.op!==m.iG};m.prototype.sMa=function(){return this.op&m.rL?!0:!1};m.prototype.uMa=function(){return this.op&m.sL?!0:!1};m.prototype.vMa=function(){return this.op&m.lG?!0:!1};m.prototype.rMa=function(){return this.op&m.hG?!0:!1};m.prototype.eB=function(p){this.pH=p};m.prototype.Kc=function(){this.sp();return this.Ga};
m.prototype.Jc=function(){this.sp();return this.rb};m.prototype.zg=function(){this.sp();return this.sd};m.prototype.vA=function(){this.sp();return this.kb};m.prototype.Wf=function(p){p?(this.Via=p.get("hfov",360),this.V3=p.get("vfov",180),this.xU=p.get("pitch",0),this.ZH=p.get("partial",!1),this.kga=p.xMa(),this.gga=p.nMa(),this.pga=Math.min(p.get("hfovMax",170),170),this.AS=p.get("hfovMin"),this.Gha=b.yLa(p)):(this.Via=360,this.V3=180,this.xU=0,this.gga=this.kga=this.ZH=!1,this.pga=120,this.Gha=
this.AS=1);this.Ga=0;this.rb=this.xU;this.sd=0;this.Rd=!0};m.prototype.setPosition=function(p,q,r,t,u){this.Ga=p;this.rb=q;this.sd=r;this.kb=t;this.wfa=u;this.Rd=!0};m.prototype.kd=function(){var p=this.j.nb(),q=this.j.Mb();if(this.Pa!=p||this.Ha!=q)this.Pa=p,this.Ha=q,this.Rd=!0};m.prototype.sp=function(){if(this.Rd){this.Rd=!1;var p=this.Ga*f,q=this.rb*f,r=this.kb*f,t=(this.wfa?g.Ar(this.pga,this.Pa,this.Ha):this.pga)*f;a:{var u=this.AS;if(h.FA(u)&&(u=u.match(/^\s*([+-]?\d+\.?\d*)\s*%\s*$/))&&u.length>=
2){u=parseFloat(u[1]);break a}u=void 0}u=u!==void 0?2*Math.atan2(this.Pa*this.j.getPixelRatio()*.5,this.Gha*45*u/100):this.AS?(this.wfa?g.Ar(this.AS,this.Pa,this.Ha):this.AS)*f:2*Math.atan2(this.Pa*this.j.getPixelRatio()*.5,this.Gha*45);u=Math.min(t,u);if(this.pH){var v=360;var w=180;var x=0}else if(this.kga||this.gga){v=this.gga?90:this.xU+this.V3*.5;var y=this.kga?-90:this.xU-this.V3*.5;w=v-y;x=(v+y)*.5;v=this.Via}else v=this.Via,x=this.xU,w=this.V3;v*=f;w*=f;x*=f;for(y=this.Pa/this.Ha;p<-c;)p+=
2*c;for(;p>c;)p-=2*c;r=Math.max(Math.min(r,t),u);t=m.iG;if(!this.pH){q>d?t|=m.lG:q<-d&&(t|=m.hG);q=Math.max(Math.min(q,c*.5),-c*.5);var z=2*Math.atan(Math.tan(r*.5)/y);if(z>=w)r=2*Math.atan(Math.tan(w*.5)*y),q=x,t|=m.lG|m.hG;else{var A=Math.min(w*.5+x,c*.5);w=Math.max(-w*.5+x,-c*.5);x=!this.ZH&&A>=.99*c*.5?c*.5:A-z*.5;w=!this.ZH&&w<=.99*-c*.5?-c*.5:w+z*.5;q>x?(q=x,t|=m.lG):q<w&&(q=w,t|=m.hG)}this.ZH&&(w=Math.tan(r*.5),y=w/y,y=new e(-w,q>0?y:-y,1),w=new k,w.rotateX(-q),y.apply(w),y=y.Kc()*2,y<0&&(y+=
2*c),w=Math.max(0,v*.5-y*.5-.25*f),z=Math.min(0,-v*.5+y*.5+.25*f),y>v?(p=0,r=Math.max(u,r*v/y),t|=m.rL|m.sL):p>w?(p=w,t|=m.sL):p<z&&(p=z,t|=m.rL))}this.Ga=p*l;this.rb=q*l;this.kb=r*l;this.op=t}};var c=Math.PI,d=Math.PI*.5,f=Math.PI/180,l=180/Math.PI;m.iG=0;m.rL=1;m.sL=2;m.lG=4;m.hG=8;return m});
define("tdv/player/view/panorama/control/camera/HoverMouseManager",["require","tdv/utils","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/player/view/panorama/control/events/RotationChangeEvent"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/control/events/RotationChangeEvent"),k=m.extend(n,function(){n.call(this);this.RS=!1;this.Gq=void 0;this.kb=90;this.kfa=.1;this.zc=this.Ab=null});k.prototype.setCamera=
function(e){this.zc&&this.zc.h(h.L("hoverFactor"),this.Nla,this);if(this.zc=e)this.zc.bind(h.L("hoverFactor"),this.Nla,this),this.Nla()};k.prototype.Nla=function(){this.kfa=this.zc.get("hoverFactor")};k.prototype.oK=function(e){this.kb=e};k.prototype.bu=function(e){this.Jn();e&&(this.Ab=e,this.Gq=void 0,this.Ab.bind(h.gb,this.bl,this,!0))};k.prototype.Jn=function(){this.Ab!=null&&(this.Ab.h(h.gb,this.bl,this),this.Ab=null)};k.prototype.bl=function(e){this.dO(e)};k.prototype.dO=function(e){this.Gq&&
this.fma.call(this,+(this.kb*this.kfa*Math.min(Math.max((e.x-this.Gq.x)/this.Ab.nb(),-1),1)),-(this.kb*this.kfa*Math.min(Math.max((e.y-this.Gq.y)/this.Ab.nb(),-1),1)));this.Gq=e};k.prototype.fma=function(e,b){if(e!=0||b!=0){var c=new g(k.yx);c.DQ=e;c.TP=b;this.o(c)}};k.yx="rotation change";return k});
define("tdv/player/view/panorama/control/camera/HoverCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/camera/MovementManager tdv/player/view/panorama/control/camera/HoverMouseManager".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/control/camera/MovementManager"),k=a("tdv/player/view/panorama/control/camera/HoverMouseManager"),e=m.extend(n,function(b,
c,d){n.call(this);this.j=b;this.ld=this.j.ld;this.va=c;this.Bc=d;this.mD=this.O_=this.ha=!1;this.Ac=new g;this.tk=null;this.sd=this.rb=this.Ga=0;this.kb=90;this.Hb=new k;this.Hb.bind(k.yx,this.ZT,this,!0)});e.prototype.clear=function(){this.Hb.h(k.yx,this.ZT,this,!0);this.Hb.Jn();this.Hb=null;this.IG();this.j=this.ld=this.Bc=this.va=this.Ac=null};e.prototype.setCamera=function(b){this.Ac.reset();this.Hb.setCamera(b)};e.prototype.setPosition=function(b,c,d,f){if(this.Ga!=b||this.rb!=c||this.sd!=d||
this.kb!=f)this.Ga=b,this.rb=c,this.sd=d,this.kb=f,this.Hb.oK(this.kb),this.pka(!1),this.EV()};e.prototype.Vf=function(){return this.O_&&this.mD?!0:!1};e.prototype.Nb=function(b){this.gO=!1;this.Ac.Nb(b);this.mD=!1;b=this.Ga+this.Ac.rC;var c=this.rb+this.Ac.YL;this.Bc.sr(this.kb);this.va.setPosition(b,c,this.sd,this.Bc.jf(),this.Bc.mw());this.Ga=this.va.Kc();this.rb=this.va.Jc();this.sd=this.va.zg();this.kb=this.va.vA()};e.prototype.Dt=function(){return this.Ga};e.prototype.Ct=function(){return this.rb};
e.prototype.aE=function(){return this.sd};e.prototype.tJ=function(){return this.kb};e.prototype.Ra=function(b){this.ha!=b&&((this.ha=b)?this.EV():(this.IG(),this.pka(!1)))};e.prototype.ZT=function(b){this.md(b.tB,b.UA,0,0,b.DQ,b.TP,0,0,!1,!1,!0,!0)};e.prototype.md=function(b,c,d,f,l,p,q,r,t,u,v,w){var x=this.Ac.Ara(b,c,d,l,p,q,u,v,w)||x;x&&this.ij()};e.prototype.ij=function(){this.mD=!0;this.o(new h(e.Li))};e.prototype.EV=function(){this.IG();this.tk=setTimeout(this.oU.bind(this),30)};e.prototype.IG=
function(){this.tk&&(clearTimeout(this.tk),this.tk=null)};e.prototype.oU=function(){this.pka(this.ha)};e.prototype.pka=function(b){this.O_!=b&&((this.O_=b)?(this.Ac.reset(),this.Hb.bu(this.j.getParent()),this.ij()):this.Hb.Jn())};e.Li="position change request";return e});
define("tdv/player/view/panorama/control/camera/GyroscopeManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Gyroscope".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher");a("tdv/player/view/util/Device");var k=a("tdv/player/view/util/Gyroscope");a=m.extend(g,function(){g.call(this);this.DHa=this.ha=!1;this.sd=this.rb=this.Ga=
0;this.G4=!1;this.Ms=this.Xv=0});a.prototype.Ra=function(e){if(this.ha!=e)if(this.ha=e){k.bind(this.IT,this,!0);e=k.Gt();var b=e.pitch;this.Xv=this.Ga-e.yaw;this.Ms=this.rb-b;this.Cn()}else k.h(this.IT,this,!0)};a.prototype.setPosition=function(e,b,c){this.Ga!=e&&(this.Xv=this.pI(this.Xv+(e-this.pI(this.Ga,e)),0),this.Ga=e);this.rb!=b&&(this.Ms+=b-this.rb,this.rb=b);this.sd=c};a.prototype.Dt=function(){return this.Ga};a.prototype.Ct=function(){return this.rb};a.prototype.aE=function(){return this.sd};
a.prototype.Vf=function(){return k.Yib()};a.prototype.Nb=function(e){var b=k.Gt(),c=b.roll;e=20*e/1E3;var d=b.pitch+(this.DHa?this.Ms:0);this.Ga=this.bh(this.Ga,this.pI(this.pI(b.yaw,this.Ga)+this.Xv,this.Ga),e);this.rb=this.bh(this.rb,d,e);this.sd=this.bh(this.sd,c,e)};a.prototype.cmb=function(e){this.DHa=e};a.prototype.bh=function(e,b,c){e=(b-e)*(1-c);Math.abs(e)<.01&&(e=0);return b-e};a.prototype.pI=function(e,b){for(;e+180<b;)e+=360;for(;e-180>b;)e-=360;return e};a.prototype.IT=function(){this.ha&&
this.Cn()};a.prototype.Cn=function(){this.o(new n(h.V))};return a});define("tdv/player/view/panorama/control/constants/Movement",["require"],function(){return{eL:"left",fL:"right",dL:"down",gL:"up",yua:"rotate10x",$ua:"zoom2x",PLAYING:"playing",Nx:"zoomIn",Ox:"zoomOut",Fg:"stop"}});
define("tdv/player/view/panorama/control/camera/KeyboardManager","require tdv/utils tdv/constants/Key tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/constants/Movement tdv/view/util/KeyboardControl".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/Key"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/control/constants/Movement"),e=a("tdv/view/util/KeyboardControl"),b=m.extend(g,function(d){g.call(this);this.j=d;this.ha=
!1;this.rg={};this.xV=null;this.sk=this.wV=!1;this.e2=this.e2.bind(this);this.$m=this.$m.bind(this);this.ld=this.j.ld;document.addEventListener("keydown",this.e2);document.addEventListener("keyup",this.$m)});b.prototype.clear=function(){this.ha=!1;this.ld=this.j=null;document.removeEventListener("keydown",this.e2);document.removeEventListener("keyup",this.$m)};b.prototype.Ra=function(d){this.ha!=d&&(this.ha=d)&&this.Y5()};var c=[h.ck,h.Ki,h.fb,h.Db,h.Mp,h.uo,h.qo,h.Sp,h.x_,h.t_];b.prototype.e2=function(d){if(!e.yp()){var f=
d.which,l=!1;!this.rg[f]&&c.indexOf(f)>=0&&(this.xV||this.wV||(this.xV=setTimeout(this.Q5a.bind(this),100)),l=this.rg[f]=!0);this.sk!=d.shiftKey&&(this.sk=d.shiftKey,l=!0);l&&this.Y5()}};b.prototype.Q5a=function(){this.wV=!0;this.Y5()};b.prototype.$m=function(d){if(!e.yp()){var f=d.which,l=!1;if(f in this.rg){delete this.rg[f];l=!1;for(f in this.rg)this.rg[f]&&(l=!0);l||(this.xV&&clearTimeout(this.xV),this.xV=null,this.wV=!1);l=!0}this.sk!=d.shiftKey&&(this.sk=d.shiftKey,l=!0);l&&this.Y5()}};b.prototype.Y5=
function(){if(this.ha){var d=this.ld.get("gazeModeEnabled"),f=this.ld.get("arrowKeysAction");if(d||f!="none"){d=d||f=="rotate";f=[];this.rg[h.x_]?f.push(k.Nx):this.rg[h.t_]&&f.push(k.Ox);this.wV&&(this.rg[h.x_]||this.rg[h.t_])&&f.push(k.$ua);this.rg[h.fb]||this.rg[h.Mp]?f.push(k.eL):(this.rg[h.Db]||this.rg[h.Sp])&&f.push(k.fL);if(d||this.sk)this.rg[h.ck]||this.rg[h.uo]?f.push(k.gL):(this.rg[h.Ki]||this.rg[h.qo])&&f.push(k.dL);this.wV&&(this.rg[h.fb]||this.rg[h.Db]||this.rg[h.ck]||this.rg[h.Ki]||this.rg[h.Mp]||
this.rg[h.Sp]||this.rg[h.uo]||this.rg[h.qo])&&f.push(k.yua);f.length==0&&f.push(k.Fg);this.o(new n(b.tba,{cOa:f}))}}};b.tba="movementsChange";return b});
define("tdv/player/view/panorama/control/camera/TargetManager",["require"],function(){function a(){this.yo=!0;this.reset()}function m(h,n,g){h=(n-h)*(1-g);Math.abs(h)<.01&&(h=0);return n-h}a.prototype.reset=function(){this.yo&&(this.yo=!1,this.F5=this.G5=this.Nz=this.qp=this.ZL=this.aM=this.$L=this.wC=void 0)};a.prototype.moveTo=function(h,n,g,k,e){this.qp=h;this.Nz=n;this.G5=g;this.F5=k;this.Ega=e;this.yo=!0};a.prototype.setPosition=function(h,n,g,k){this.wC=h;this.$L=n;this.aM=g;this.ZL=k};a.prototype.Dt=
function(){return this.wC};a.prototype.Ct=function(){return this.$L};a.prototype.aE=function(){return this.aM};a.prototype.tJ=function(){return this.ZL};a.prototype.Vf=function(){return this.yo};a.prototype.Nb=function(){if(this.yo)if(this.Ega)this.wC=this.qp,this.$L=this.Nz,this.aM=this.G5,this.ZL=this.F5,this.yo=!1;else{for(var h=this.wC,n=this.qp-180,g=this.qp+180;h<n;)h+=g-n;for(;h>g;)h-=g-n;this.wC=h;this.wC=m(this.wC,this.qp,.5);this.$L=m(this.$L,this.Nz,.5);this.aM=m(this.aM,this.G5,.5);this.ZL=
m(this.ZL,this.F5,.5);this.wC==this.qp&&this.$L==this.Nz&&this.aM==this.G5&&this.ZL==this.F5&&(this.yo=!1)}};return a});
define("tdv/player/view/panorama/control/camera/VRPoseManager",["require","tdv/player/view/util/geo/Quaternion","tdv/player/view/util/URL","tdv/player/view/util/XR"],function(a){function m(b){this.j=b;this.ha=!1;this.sd=this.rb=this.Ga=0;this.D1=void 0}var h=a("tdv/player/view/util/geo/Quaternion"),n=a("tdv/player/view/util/URL"),g=a("tdv/player/view/util/XR");m.prototype.Ra=function(b){this.ha!=b&&(this.ha=b,this.D1=void 0)};m.prototype.setPosition=function(b,c,d){if(this.ha&&this.D1!==void 0){for(var f=
b-this.D1;f>180;)f-=360;for(;f<-180;)f+=360;(f<-1E-4||f>1E-4)&&g.mK(b)}this.Ga=b;this.rb=c;this.sd=d};m.prototype.Dt=function(){return this.Ga};m.prototype.Ct=function(){return this.rb};m.prototype.aE=function(){return this.sd};m.prototype.Vf=function(){return!0};m.prototype.Nb=function(){if(g.Uf&&!this.j.D4){g.mK();var b=h.jaa(g.wg,!0);this.D1=this.Ga=b.Xa;this.rb=b.pitch;this.sd=b.Mg;this.rb=e===void 0?b.pitch:e;this.sd=k===void 0?b.Mg:k;g.setScale(1)}};var k=n.Bk("debug")?n.K7("force_vr_roll"):
void 0,e=n.Bk("debug")?n.K7("force_vr_pitch"):void 0;return m});
define("tdv/player/view/panorama/control/camera/ManualCameraController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/constants/RotationMode tdv/player/view/panorama/control/camera/GyroscopeManager tdv/player/view/panorama/control/camera/KeyboardManager tdv/player/view/panorama/control/camera/MovementManager tdv/player/view/panorama/control/camera/MouseManager tdv/player/view/panorama/control/camera/TargetManager tdv/player/view/panorama/control/camera/VRPoseManager tdv/player/view/panorama/control/constants/Movement tdv/player/view/util/geo/Quaternion tdv/player/view/util/XR tdv/view/constants/Cursor".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/constants/RotationMode"),e=a("tdv/player/view/panorama/control/camera/GyroscopeManager"),b=a("tdv/player/view/panorama/control/camera/KeyboardManager"),c=a("tdv/player/view/panorama/control/camera/MovementManager"),d=a("tdv/player/view/panorama/control/camera/MouseManager"),f=a("tdv/player/view/panorama/control/camera/TargetManager"),l=a("tdv/player/view/panorama/control/camera/VRPoseManager"),
p=a("tdv/player/view/panorama/control/constants/Movement");a("tdv/player/view/util/geo/Quaternion");var q=a("tdv/player/view/util/XR"),r=a("tdv/view/constants/Cursor"),t=m.extend(g,function(u,v,w){g.call(this);this.j=u;this.ld=this.j.ld;this.va=v;this.Bc=w;this.mD=this.DC=this.vS=this.w4=this.ha=!1;this.Ac=new c;this.$s=new f;this.sd=this.rb=this.Ga=0;this.kb=90;this.xI=1;this.Vi=void 0;this.nda=this.oR=5;this.gO=!1;this.Hb=new d;this.Hb.bind(d.yx,this.ZT,this,!0);this.Hb.bind(d.Jr,this.ZC,this,!0);
this.Hb.bind(d.ak,this.Is,this,!0);this.Hb.bind(d.$j,this.Hs,this,!0);this.Xm=new e;this.Xm.bind(h.V,this.DBa,this);this.CC=!1;this.Uo=new b(this.j);this.Uo.bind(b.tba,this.NBa,this,!0);this.Wv=new l(this.j);q.M.bind(h.V,this.pn,this,!0);q.M.bind(h.Pd,this.pn,this,!0);this.pn()});t.prototype.clear=function(){this.Hb.h(d.yx,this.ZT,this,!0);this.Hb.h(d.Jr,this.ZC,this,!0);this.Hb.h(d.ak,this.Is,this,!0);this.Hb.h(d.$j,this.Hs,this,!0);this.Hb.Jn();this.Hb=null;this.Xm.h(h.V,this.DBa,this);this.Xm=
null;this.Uo.h(b.tba,this.NBa,this,!0);this.Uo.clear();this.Uo=null;q.M.h(h.V,this.pn,this,!0);q.M.h(h.Pd,this.pn,this,!0);this.Bc=this.va=this.Ac=null;this.t0();this.j=this.ld=null};t.prototype.setCamera=function(u){this.gO=!1;this.Ac.reset();this.$s.reset();this.Hb.setCamera(u);this.oR=u.get("automaticRotationSpeed");this.nda=u.get("automaticZoomSpeed")};t.prototype.xl=function(u){Array.isArray(u)||(u=[u]);var v=0,w=0,x=0,y=!1;u.includes(p.Fg)||(u.includes(p.eL)?v=-this.oR:u.includes(p.fL)&&(v=
+this.oR),u.includes(p.dL)?w=-this.oR:u.includes(p.gL)&&(w=+this.oR),u.includes(p.Nx)?x=-this.nda:u.includes(p.Ox)&&(x=+this.nda),u.includes(p.PLAYING)&&(y=!0),u.includes(p.$ua)&&(x*=2),u.includes(p.yua)&&(v*=10,w*=10),v*=this.xI,w*=this.xI);this.md(v,w,0,x,0,0,0,0,y,!0,!0,!0)};t.prototype.setPosition=function(u,v,w,x){this.Ga=u;this.rb=v;this.sd=w;this.kb=x;this.xI=this.kb/90;this.Xm.setPosition(this.Ga,this.rb,this.sd);this.Wv.setPosition(this.Ga,this.rb,this.sd);this.Hb.oK(this.kb);this.$s.setPosition(this.Ga,
this.rb,this.sd,this.kb)};t.prototype.moveTo=function(u,v,w,x,y){this.$s.moveTo(u,v,w,this.Bc.UKa(x),y);this.w4=!1;this.Ac.reset();this.ij()};t.prototype.Bra=function(u,v,w){this.md(0,0,0,0,u,v,w,0,!1,!1,!1)};t.prototype.Vf=function(){return this.ha&&(this.mD||this.ITa())?!0:!1};t.prototype.ddb=function(){this.mD=this.gO=!1};t.prototype.ITa=function(){return this.ha?this.gO?!0:this.Wv.ha?this.Wv.Vf()||this.Ac.Vf():this.Xm.ha?this.CC?!0:this.Xm.Vf()||this.Ac.Vf():this.Ac.Vf()||this.$s.Vf():!1};t.prototype.Nb=
function(u){this.gO=!1;this.Ac.Nb(u);this.mD=!1;var v=this.kb;if(this.Wv.ha){this.Wv.Nb(u);u=this.Wv.Dt()+this.Ac.rC+this.S2a();var w=this.Wv.Ct();var x=this.Wv.aE()}else this.$s.Vf()?(this.$s.Nb(u),u=this.$s.Dt(),w=this.$s.Ct(),x=this.$s.aE(),v=this.$s.tJ()):(this.Xm.ha?(this.CC=!1,this.Xm.Nb(u),u=this.Xm.Dt()+this.Ac.rC,w=this.Xm.Ct(),this.vS&&(w+=this.Ac.YL),x=this.Xm.aE()):(u=this.Ga+this.Ac.rC,w=this.rb+this.Ac.YL,x=0),v+=this.Ac.rxa);this.Bc.sr(v);this.va.setPosition(u,w,x,this.Bc.jf(),this.Bc.mw());
this.Ga=this.va.Kc();this.rb=this.va.Jc();this.sd=this.va.zg();this.kb=this.va.vA();if(this.w4&&this.va.tMa()){v=this.Ac.uW;if(this.va.sMa()||this.va.uMa())v=-v;u=this.Ac.CU;if(this.va.vMa()||this.va.rMa())u=-u;this.md(v,u,0,0,0,0,0,0,!0,!1,!1,!0)}};t.prototype.Dt=function(){return this.Ga};t.prototype.Ct=function(){return this.rb};t.prototype.aE=function(){return this.sd};t.prototype.tJ=function(){return this.kb};t.prototype.Ra=function(u){this.ha!=u&&((this.ha=u)?(this.wD(this.Hb.IH==k.ux?r.IB:
void 0),this.Hb.bu(this.j.getParent()),this.ij()):(this.t0(),this.Hb.Jn()),this.Yla())};t.prototype.YY=function(u){this.DC!=u&&(this.DC=u,this.Yla(),this.CC=!0)};t.prototype.SE=function(u){this.Uo.Ra(u)};t.prototype.Yla=function(){var u=this.j.jr();this.Xm.Ra(this.ha&&this.DC&&!u);this.Wv.Ra(this.ha&&u)};t.prototype.DBa=function(){this.ij()};t.prototype.ZY=function(u){this.vS=u;this.Xm.cmb(this.vS)};t.prototype.UE=function(u){this.Hb.UE(u);this.wD(this.Hb.IH==k.ux?r.IB:void 0)};t.prototype.vK=function(u){this.Hb.vK(u)};
t.prototype.pn=function(){this.ha&&(this.j.jr()&&(q.setScale(1),q.mK(this.Ga)),this.Yla(),this.ij())};t.prototype.ZT=function(u){var v=!this.Wv.ha&&(!this.Xm.ha||this.vS);if(this.Hb.IH==k.wF){var w=void 0;if(u.tB!=0||u.UA!=0){var x=Math.sqrt(u.UA*u.UA+u.tB*u.tB)>25,y=Math.atan2(u.UA,u.tB)*180/Math.PI;y>=-22.5&&y<22.5?w=x?r.Tta:r.Sta:y>=22.5&&y<67.5?w=x?r.Vta:r.bua:y>=67.5&&y<112.5?w=x?r.Uta:r.aua:y>=112.5&&y<157.5?w=x?r.Wta:r.cua:y>=157.5||y<-157.5?w=x?r.$ta:r.gua:y>=-157.5&&y<-112.5?w=x?r.Zta:r.fua:
y>=-112.5&&y<-67.5?w=x?r.Xta:r.dua:y>=-67.5&&y<-22.5&&(w=x?r.Yta:r.eua)}this.wD(w);this.md(u.tB,u.UA,0,0,u.DQ,u.TP,0,0,!1,!1,!1,v)}else this.md(u.tB,u.UA,0,0,u.DQ,u.TP,0,0,!1,!1,v,v)};t.prototype.ZC=function(u){this.md(0,0,0,u.Vgb,0,0,0,u.Ooa,!1,!0,!1,!0)};t.prototype.md=function(u,v,w,x,y,z,A,D,F,C,B,H){var E=!1;this.ld.get("rotationEnabled")&&(E=this.Ac.Ara(u,v,w,y,z,A,C,B,H)||E);this.ld.get("zoomEnabled")&&(E=this.Ac.emb(x,D)||E);E&&(this.$s.reset(),this.w4=F,this.ij())};t.prototype.S2a=function(){if(!this.j.jr())return 0;
this.s4=this.s4||0;for(var u=0,v=0;v<q.ud.length&&u==0;v++)u=q.ud[v].fA?0:q.ud[v].Qb.x;v=this.j.P.get("vrThumbstickRotationStep");v=u>0&&this.s4<=0?v:u<0&&this.s4>=0?-v:0;this.s4=u;return v};t.prototype.ij=function(){this.mD=!0;this.o(new n(t.Li))};t.prototype.Is=function(){this.gO=!0;this.o(new n(t.ak));this.Hb.IH==k.ux&&this.wD(r.Mi)};t.prototype.Hs=function(){this.o(new n(t.$j));this.Hb.IH==k.ux&&this.wD(r.IB)};t.prototype.NBa=function(u){this.xl(u.data.cOa);u.data.cOa.indexOf(p.Fg)<0&&this.j.Xb().o(new n(h.eG,
{nQ:u}))};t.prototype.wD=function(u){this.Vi!=u&&this.ha&&(this.Vi&&this.j.XP(this.Vi),(this.Vi=u)&&this.j.Y9(this.Vi))};t.prototype.t0=function(){this.Vi&&(this.j.XP(this.Vi),this.Vi=void 0)};t.Li="position change request";t.ak="user interaction start";t.$j="user interaction end";return t});
define("tdv/player/script/TargetRotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetRotationalCameraMovement",m,function(){m.call(this)})});
define("tdv/player/view/panorama/control/camera/SequenceCameraController","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/player/script/DistanceRotationalCameraMovement tdv/player/script/TargetRotationalCameraMovement tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=
a("tdv/events/EventDispatcher"),e=a("tdv/player/parser/ClassInfo");a("tdv/player/script/DistanceRotationalCameraMovement");a("tdv/player/script/TargetRotationalCameraMovement");var b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=m.extend(k,function(f,l,p){k.call(this);this.j=f;this.va=l;this.Bc=p;this.zN=this.Zb=null;this.rn=this.jD=!1;this.aI=void 0;this.RM=[];this.Yja=0;this.la=null;this.rb=this.Ga=0;this.kb=90});d.prototype.clear=function(){this.end();this.va=this.j=null};d.prototype.start=
function(f){this.c9a(f);this.s6a();this.rn=!1;this.Kwa();this.jD=!1;this.ij();this.ml()};d.prototype.end=function(){this.Zb!=null&&(this.Pwa(),this.jD=this.rn=!1,this.la=null,this.ml())};d.prototype.fjb=function(){this.Zb&&this.Zb.get("restartMovementOnUserInteraction")?this.jD||(this.PFa(),this.$ka(),this.la=null,this.jD=!0,this.ml()):(this.la=null,this.pause())};d.prototype.jjb=function(){this.jD&&(this.jD=!1,this.aAa()||this.V9a())};d.prototype.c9a=function(f){this.Pwa();this.Zb=f;this.Zb.bind(h.Fx,
this.RCa,this,!0);this.Zb.bind(h.iL,this.QCa,this,!0);this.Zb.bind(h.L("movementIndex"),this.y3,this,!0);this.RM=this.Zb.get("movements",[])};d.prototype.Pwa=function(){this.$ka();this.Zb!=null&&(this.Zb.h(h.Fx,this.RCa,this),this.Zb.h(h.iL,this.QCa,this),this.Zb.h(h.L("movementIndex"),this.y3,this),this.Zb.set("movementIndex",-1),this.Zb=null,this.RM=[])};d.prototype.ql=function(){return this.Zb?this.rn?n.$b:n.PLAYING:n.ca};d.prototype.setPosition=function(f,l,p,q){this.Ga=f;this.rb=l;this.kb=q};
d.prototype.Vf=function(){return!this.Zb||!this.la||this.rn||this.jD||this.aAa()?!1:!0};d.prototype.Nb=function(f){if(this.Vf()){this.la.Nb(f);f=this.la.ob("hfov");if(this.fp!=this.Bc.fp){this.fp=this.Bc.fp;var l=this.la.pX("hfov");l.from=this.Bc.RW(l.from);l.to=this.Bc.RW(l.to);f=this.Bc.RW(f)}this.va.setPosition(this.la.ob("yaw"),this.la.ob("pitch"),0,f,this.Bc.mw());this.Ga=this.va.Kc();this.rb=this.va.Jc();this.kb=this.va.vA();this.la.Ve()&&this.u5a()}};d.prototype.Dt=function(){return this.Ga};
d.prototype.Ct=function(){return this.rb};d.prototype.tJ=function(){return this.kb};d.prototype.play=function(){this.rn&&(this.rn=!1,this.la||this.y3(),this.Kwa(),this.ij(),this.ml())};d.prototype.pause=function(){this.rn||(this.rn=!0,this.PFa(),this.ml())};d.prototype.RCa=function(){this.play()};d.prototype.QCa=function(){this.pause()};d.prototype.s6a=function(){this.Yja=0;var f=this.Zb.get("movementIndex",-1);f==-1&&(f=0);this.i4(f)};d.prototype.u6a=function(){this.Yja++;var f=this.Zb.get("repeat",
1);this.RM.length>0&&(f==0||this.Yja<f)?this.i4(0):(this.Zb.o(new g(h.Ub)),this.end(),this.X$a())};d.prototype.t6a=function(){this.i4(this.Zb.get("movementIndex",0)+1)};d.prototype.i4=function(f){f<this.RM.length?this.Zb.get("movementIndex")!=f?this.Zb.set("movementIndex",f):this.y3():(this.Zb.o(new g(h.Vr)),this.u6a())};d.prototype.y3=function(){var f=this.Zb.get("movementIndex");this.la=f>=0?this.LR(this.RM[f]):null};d.prototype.u5a=function(){this.RM[this.Zb.get("movementIndex")].o(new g(h.Ub));
this.t6a()};d.prototype.aAa=function(){return this.zN!=null};d.prototype.V9a=function(){this.$ka();var f=this,l=this.Zb.get("restartMovementDelay")||0;this.zN=setTimeout(function(){f.zN=null;f.L5a()},l);this.ml()};d.prototype.$ka=function(){this.zN&&(clearTimeout(this.zN),this.zN=null)};d.prototype.L5a=function(){this.i4(this.Zb.get("movementIndex"));this.ij();this.ml()};d.prototype.LR=function(f){var l,p=this.nI(this.Ga,-180,180),q=this.rb,r=this.kb;if(e.Oa("TargetRotationalCameraMovement",f)){var t=
f.get("targetYaw",p);var u=f.get("targetPitch",q);(l=f.get("targetHfov"))?(this.Bc.uRa(l),l=this.Bc.jf()):l=r;this.va.setPosition(t,u,0,l,this.Bc.mw());if(this.va.ZH)t=this.va.Kc();else switch(this.H0a(f)){case "left":t=this.nI(t,p-360,p);break;case "right":t=this.nI(t,p,p+360);break;case "longest":t=this.nI(t,p-180,p+180);t=t>=p?this.nI(t,p-360,p):this.nI(t,p,p+360);break;default:t=this.nI(t,p-180,p+180)}}else e.Oa("DistanceRotationalCameraMovement",f)&&(t=p+f.get("yawDelta",0),this.va.ZH&&(t=Math.min(Math.max(-180,
t),180)),u=q+f.get("pitchDelta",0),l=r+f.get("hfovDelta",0),this.va.setPosition(t,u,0,l,this.Bc.mw()),this.va.ZH&&(t=this.va.Kc()));u=this.va.Jc();l=this.va.vA();this.fp=this.Bc.fp;return new b(f.get("easing"),[new c("yaw",p,t,f.get("yawSpeed")),new c("pitch",q,u,f.get("pitchSpeed")),new c("hfov",r,l,f.get("hfovSpeed"))],f.get("duration"))};d.prototype.Kwa=function(){this.aI=void 0};d.prototype.PFa=function(){if(this.la){this.aI=void 0;var f=this.la&&this.la.pX("yaw");f&&(f.to>f.from?this.aI="right":
f.to<f.from&&(this.aI="left"))}};d.prototype.H0a=function(f){f=f.get("path");f=="longest"&&this.aI&&(f=this.aI);this.aI=void 0;return f};d.prototype.nI=function(f,l,p){for(;f<l;)f+=p-l;for(;f>p;)f-=p-l;return f};d.prototype.ij=function(){this.o(new g(d.Li))};d.prototype.X$a=function(){this.o(new g(d.Gba))};d.prototype.ml=function(){this.o(new g(d.gd))};d.Li="position change request";d.Gba="sequence end";d.gd="playback state change";return d});
define("tdv/player/view/panorama/control/camera/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/camera/LimitsManager tdv/player/view/panorama/control/camera/HoverCameraController tdv/player/view/panorama/control/camera/ManualCameraController tdv/player/view/panorama/control/camera/SequenceCameraController tdv/player/view/panorama/control/constants/Movement tdv/player/view/util/XR tdv/constants/PlaybackState".split(" "),
function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/control/camera/LimitsManager"),e=a("tdv/player/view/panorama/control/camera/HoverCameraController"),b=a("tdv/player/view/panorama/control/camera/ManualCameraController"),c=a("tdv/player/view/panorama/control/camera/SequenceCameraController"),d=a("tdv/player/view/panorama/control/constants/Movement"),f=a("tdv/player/view/util/XR"),l=a("tdv/constants/PlaybackState"),
p=m.extend(g,function(q,r){g.call(this);this.j=q;this.j.bind(h.Rb,this.kd,this);f.M.bind(h.V,this.pn,this,!0);this.Bc=r;this.dka=!1;this.kb=this.sd=this.rb=this.Ga=void 0;this.Zv=this.Yv=this.xT=this.AT=this.zT=this.yT=!1;this.pp=!0;this.uM=this.Ms=0;this.ha=!1;this.Po=null;this.DS=5E3;this.IS=this.Bga=null;this.nka=[];this.Jj=this.bC=l.ca;this.va=new k(q);this.rc=new b(this.j,this.va,this.Bc);this.rc.bind(b.Li,this.Es,this,!0);this.rc.bind(b.ak,this.Is,this,!0);this.rc.bind(b.$j,this.Hs,this,!0);
this.Oo=new e(this.j,this.va,this.Bc);this.Oo.bind(e.Li,this.Es,this,!0);this.Pf=new c(this.j,this.va,this.Bc);this.Pf.bind(c.Li,this.Es,this,!0);this.Pf.bind(c.Gba,this.rv,this,!0);this.Pf.bind(c.gd,this.SCa,this,!0)});p.prototype.clear=function(){this.Nv();this.rc.h(b.Li,this.Es,this);this.rc.h(b.ak,this.Is,this,!0);this.rc.h(b.$j,this.Hs,this,!0);this.rc.clear();this.rc=null;this.Oo.h(e.Li,this.Es,this,!0);this.Oo.clear();this.Oo=null;this.Pf.h(c.Li,this.Es,this);this.Pf.h(c.Gba,this.rv,this);
this.Pf.h(c.gd,this.SCa,this);this.Pf.clear();this.va=this.Pf=null;this.j.h(h.Rb,this.kd,this);f.M.h(h.V,this.pn,this,!0);this.j=null;this.zc&&(this.zc.h(h.L("sequences"),this.Dia,this,!0),this.zc=null);this.f5([])};p.prototype.end=function(){this.bC=l.ca;this.Nv();this.rc.Ra(!1);this.Oo.Ra(!1);this.Pf.end();this.ha=!1;this.Gz(0,0,0);this.IS=this.Bga=null;this.zc&&(this.zc.h(h.L("sequences"),this.Dia,this,!0),this.zc=null);this.f5([]);this.KI()};p.prototype.start=function(q,r){this.bC=l.PLAYING;this.ha=
!0;this.Gz(0,0,0);this.jV(q);this.i8a(r);this.WDa();this.t5(this.IS);this.Oo.Ra(!0);this.KI()};p.prototype.ql=function(){return this.Jj};p.prototype.play=function(q){this.bC=l.PLAYING;this.Pf.ql()==l.$b?this.Pf.play():this.Pf.ql()==l.ca&&(!q&&this.IS?this.t5(this.IS):this.BM()||this.CV());this.KI()};p.prototype.resume=function(){this.bC==l.$b&&(this.rc.ddb(),this.play(!0))};p.prototype.pause=function(){this.rc.xl(d.Fg);this.bC==l.PLAYING&&(this.bC=l.$b,this.Pf.ql()==l.PLAYING?(this.Pf.pause(),this.KI()):
this.BM()&&this.Nv())};p.prototype.stop=function(){this.bC=l.ca;this.Pf.ql()!=l.ca&&this.Pf.end();this.rc.xl(d.Fg);this.KI();this.BM()&&this.Nv()};p.prototype.moveTo=function(q,r,t,u,v){this.rc.moveTo(q,r,t,u,v)};p.prototype.f5=function(q){this.nka.forEach(function(r){r.h(h.Fx,this.BEa,this,!0)}.bind(this));this.nka=q;this.nka.forEach(function(r){r.bind(h.Fx,this.BEa,this,!0)}.bind(this))};p.prototype.pn=function(){this.va.eB(f.isPresenting)};p.prototype.xl=function(q){this.rc.xl(q)};p.prototype.Bra=
function(q,r,t){this.rc.Bra(q,r,t)};p.prototype.YY=function(q){this.DC!=q&&(this.DC=q,this.rc.YY(this.DC),this.bb())};p.prototype.ZY=function(q){this.rc.ZY(q)};p.prototype.UE=function(q){this.rc.UE(q)};p.prototype.vK=function(q){this.rc.vK(q)};p.prototype.SE=function(q){this.rc.SE(q)};p.prototype.ZA=function(q){this.ha&&(this.rc.Vf()||this.j.jr()||this.DC&&(this.rc.ha||!this.rc.vS)?(this.rc.ITa()&&this.Pf.fjb(),this.rc.Nb(q),this.wn(this.rc.Dt(),this.rc.Ct(),this.rc.aE(),this.rc.tJ()),this.bb()):
this.Pf.jD?(this.Pf.jjb(),this.bb()):this.Pf.Vf()?(this.Pf.Nb(q),this.wn(this.Pf.Dt(),this.Pf.Ct(),0,this.Pf.tJ()),this.bb()):this.Oo.Vf()?(this.Oo.Nb(q),this.wn(this.Oo.Dt(),this.Oo.Ct(),0,this.Oo.tJ()),this.bb()):this.dka?(this.dka=!1,this.Bc.sr(this.j.jf()),this.va.setPosition(this.j.Kc(),this.j.Jc(),this.j.zg(),this.Bc.jf(),this.Bc.mw()),this.wn(this.va.Kc(),this.va.Jc(),this.va.zg(),this.va.vA()),this.bb()):(this.Gz(0,0,0),this.bC==l.PLAYING&&this.Pf.ql()!=l.PLAYING&&(this.BM()||this.CV())))};
p.prototype.ze=function(){this.Uab();this.WDa()};p.prototype.Uab=function(){var q=this.j.Kc()-this.Ga||0,r=this.j.Jc()-this.rb||0;this.j.zg();this.Gz(q,r,this.j.jf()-this.kb||0)};p.prototype.WDa=function(){this.Ga=this.j.Kc();this.rb=this.j.Jc();this.sd=this.j.zg();this.kb=this.j.jf();this.rc.setPosition(this.Ga,this.rb,this.sd,this.kb);this.Pf.setPosition(this.Ga,this.rb,this.sd,this.kb);this.Oo.setPosition(this.Ga,this.rb,this.sd,this.kb)};p.prototype.jV=function(q){this.va.Wf(q)};p.prototype.i8a=
function(q){this.zc=q;this.DS=q.get("timeToIdle",5E3);this.Bga=q.get("idleSequence");this.IS=q.get("initialSequence");this.rc.setCamera(q);this.Oo.setCamera(q);q.bind(h.L("sequences"),this.Dia,this,!0);this.f5(q.get("sequences",[]))};p.prototype.Dia=function(){this.f5(this.zc.get("sequences",[]))};p.prototype.BEa=function(q){this.t5(q.source)};p.prototype.Es=function(){this.Nv();this.bb()};p.prototype.Is=function(){this.o(new n(p.ak))};p.prototype.Hs=function(){this.o(new n(p.$j))};p.prototype.t5=
function(q){q?(this.rc.Ra(!q.get("mandatory",!1)),this.Pf.start(q)):this.rv()};p.prototype.rv=function(){this.rc.Ra(!0);this.CV()};p.prototype.SCa=function(){this.KI()};p.prototype.kd=function(){this.dka=!0;this.bb()};p.prototype.BM=function(){return this.Po!=null};p.prototype.CV=function(){this.Nv();var q=this;this.Po=setTimeout(function(){q.Po=null;q.sia()},this.DS)};p.prototype.Nv=function(){this.Po&&(clearTimeout(this.Po),this.Po=null)};p.prototype.sia=function(){this.t5(this.Bga)};p.prototype.bb=
function(){this.o(new n(p.oc))};p.prototype.wn=function(q,r,t,u){this.j.setPosition(q,r,t,u)};p.prototype.Gz=function(q,r,t){var u=!1,v=Math.abs(q)<.001&&Math.abs(r)<.001&&Math.abs(t)<.001;v||this.DC?(u=this.pp!=1,this.Zv=this.Yv=this.xT=this.AT=this.zT=this.yT=!1,this.pp=!0):(this.yT!=q<-.001&&(this.yT=!this.yT,u=!0),this.zT!=q>.001&&(this.zT=!this.zT,u=!0),this.xT!=r<-.001&&(this.xT=!this.xT,u=!0),this.AT!=r>.001&&(this.AT=!this.AT,u=!0),this.Yv!=t<-.001&&(this.Yv=!this.Yv,u=!0),this.Zv!=t>.001&&
(this.Zv=!this.Zv,u=!0),this.pp!=v&&(this.pp=!this.pp,u=!0));v||this.o(new n(p.Hr,{yaw:this.Ga,pitch:this.rb,roll:this.sd,hfov:this.kb}));u&&((this.ha||this.pp)&&this.o(new n(p.Dl,{movingLeft:this.yT,movingRight:this.zT,movingUp:this.AT,movingDown:this.xT,zoomingIn:this.Yv,zoomingOut:this.Zv,stopped:this.pp})),this.KI())};p.prototype.KI=function(){if(this.ha){var q=this.Pf.ql();this.pp||(q=l.PLAYING)}else q=l.ca;this.Jj!=q&&(this.Jj=q,this.o(new n(p.gd,{state:this.Jj})))};p.oc="request frame";p.Dl=
"movement change";p.Hr="position change";p.gd="playback state change";p.ak="user interaction start";p.$j="user interaction end";return p});
define("tdv/player/view/panorama/control/transition/PositionController","require tdv/constants/EventName tdv/player/view/panorama/control/camera/LimitsManager tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/URL tdv/player/view/util/XR tdv/player/view/util/geo/Quaternion".split(" "),function(a){function m(d,f,l){this.j=d;this.Bc=f;this.fp=this.Bc.fp;this.H=l;this.va=new h(d);l.qh&&this.va.Wf(l.qh);this.Dz=new h(d);this.Pka=this.NC=this.OC=void 0;this.Ga=this.j.Kc();
this.rb=this.j.Jc();this.sd=this.j.zg();this.kb=this.H.qh?this.j.jf():this.Bc.mw()?this.Bc.RW(m.Saa):m.Saa;this.GFa=0;this.Ba=null;this.kAa=!0}a("tdv/constants/EventName");var h=a("tdv/player/view/panorama/control/camera/LimitsManager");a("tdv/player/view/util/Device");var n=a("tdv/player/view/util/Gyroscope"),g=a("tdv/player/view/util/URL"),k=a("tdv/player/view/util/XR"),e=a("tdv/player/view/util/geo/Quaternion");new THREE.Euler;m.prototype.Wf=function(d,f,l){if(this.Ba!=d)if(this.hD=!0,this.Ba=
d,this.j.jr()){this.Pka=this.Ga;for(d=this.Pka-f;d>180;)d-=360;for(;d<-180;)d+=360;k.mK(f)}else this.zra(f,l)};m.prototype.zra=function(d,f){this.Ga=d;this.rb=f};m.prototype.kJ=function(d){this.Bc.uRa(d);return this.Bc.jf()};m.prototype.sr=function(d){this.kb=d};m.prototype.cZ=function(d){this.kAa=d};m.prototype.uK=function(d){this.GFa=d};m.prototype.ZA=function(){this.fp!=this.Bc.fp&&(this.fp=this.Bc.fp,this.kb=this.Bc.RW(this.kb));if(this.H.Va()){var d=e.jaa(k.wg,!0);this.j.jr()&&(this.Ga=d.Xa);
this.rb=c===void 0?d.pitch:c;this.sd=b===void 0?d.Mg:b;this.OC=this.Ga;this.NC=this.rb}else if(this.H.kMa()){d=n.Gt();var f=this.pI(d.yaw,this.Ga);this.Ga+=this.OC===void 0?0:f-this.OC;this.rb+=this.NC===void 0?0:d.pitch-this.NC;this.sd=d.roll;this.OC=d.yaw;this.NC=d.pitch}else d=this.pI(this.j.Kc(),this.Ga),f=this.j.Jc(),this.Ga+=this.OC===void 0?0:d-this.OC,this.rb+=this.NC===void 0?0:f-this.NC,this.sd=this.j.zg();this.hD&&this.va.Wf(this.Ba);this.va.eB(this.H.Va());this.va.setPosition(this.Ga,
this.rb,this.sd,this.kb,this.Bc.mw());if(this.hD)if(this.hD=!1,this.H.Va())(d=this.H.qh&&this.j.Jf(this.H.qh))&&d.set("deltaYaw",this.Pka-this.va.Kc());else if(d=this.H.qh&&this.j.Jf(this.H.qh))d.set("deltaYaw",this.j.Kc()-this.va.Kc()),d.set("deltaPitch",this.j.Jc()-this.va.Jc()),d.set("deltaRoll",this.j.zg()-this.va.zg());this.Ga=this.va.Kc();this.rb=this.va.Jc();this.sd=this.va.zg();this.H.Va()||this.H.kMa()||(this.OC=this.Ga,this.NC=this.rb);this.kb=this.kAa?this.va.vA():this.kb;this.j.setPosition(this.Ga,
this.rb,this.sd,this.kb);this.j.uK(this.GFa)};m.prototype.g$=function(d,f){this.Dz.Wf(d);this.Dz.setPosition(0,0,0,f,this.Bc.mw());return this.Dz.vA()};m.prototype.gkb=function(d,f){this.Dz.Wf(d);this.Dz.setPosition(f.Xa,f.pitch,f.Mg,f.Wd,this.Bc.mw());f.Xa=this.Dz.Kc();f.pitch=this.Dz.Jc();f.Mg=this.Dz.zg();f.Wd=this.Dz.vA()};m.prototype.pI=function(d,f){for(;d+180<f;)d+=360;for(;d-180>f;)d-=360;return d};m.prototype.XJa=function(){return m.Saa};m.Saa=TDV.tua.xUa;var b=g.Bk("debug")?g.K7("force_vr_roll"):
void 0,c=g.Bk("debug")?g.K7("force_vr_pitch"):void 0;return m});
define("tdv/player/view/panorama/control/transition/TransitionData",["require","tdv/player/script/RotationalCameraPosition","tdv/player/script/RotationalCameraDisplayPosition","tdv/player/view/util/Device","tdv/player/view/util/FileType"],function(a){function m(b,c,d,f,l){this.j=b;this.Zh=c;b=this.j.P;this.tQ=b.get("transitionMode","blending");c=b.get("transitionDuration",500);this.h3a(d,f)&&(this.tQ=m.n_,c=1500);this.ena=b.get("blendingTransitionDuration",c);this.Meb=b.get("firstTransitionDuration",
c);this.bKa=b.get("disolveTransitionDuration",c);this.$Sa=b.get("translationTransitionDuration",1E3);b.get("translationTransitionSpeed");this.aTa=b.get("translationTransitionEnabled",!0);this.xPa=b.get("panoramaToPanoramaModelTransitionEnabled",!0);this.jPa=b.get("originTransitionDuration",3E3);this.c8=400;this.Caa=1E3;this.dib=b.get("modelToPanoramaTraslationDuration",1500);this.bjb=b.get("panoramaToModelTraslationDuration",1E3);this.qh=d;this.kmb=!d||d.cpa();this.lmb=!d||d.SMa();this.Sc=f;this.zSa=
!f||f.cpa();this.csa=!f||f.SMa();this.Imb=!!f&&this.bha(f);c=(this.AK=l)&&l.get("initialPosition")||new h;this.Eh=new h;this.Eh.set("yaw",c.get("yaw",0));this.Eh.set("pitch",c.get("pitch"));this.Eh.set("hfov",c.get("hfov"));this.fg=new n;this.fg.set("yaw",this.Eh.get("yaw"));this.fg.set("pitch",this.Eh.get("pitch"));this.fg.set("hfov",this.Eh.get("hfov"));this.fg.set("stereographicFactor",0);this.br=[];if(!d){this.br=l&&l.get("displayMovements")||[];for(c=this.br.length-1;c>=0;c--)this.fg.set("yaw",
this.fg.get("yaw",this.br[c].get("targetYaw"))),this.fg.set("pitch",this.fg.get("pitch",this.br[c].get("targetPitch"))),this.fg.set("hfov",this.fg.get("hfov",this.br[c].get("targethfov"))),this.fg.set("stereographicFactor",this.fg.get("stereographicFactor",this.br[c].get("stereographicFactor")));l=l&&l.get("displayOriginPosition")||this.Eh;this.fg.set("yaw",l.get("yaw"));this.fg.set("pitch",l.get("pitch"));this.fg.set("hfov",l.get("hfov"));this.fg.set("stereographicFactor",l.get("stereographicFactor"))}this.uQ=
this.tQ==m.Op&&this.aTa&&this.zSa&&this.O2a(d,f)||null;var p=this.tQ==m.Op&&this.Sc&&this.zSa&&this.Zh&&this.Sc.get("modelLocations")||[];l=this.tQ==m.Op&&this.qh&&this.kmb&&this.Zh&&this.qh.get("modelLocations")||[];var q=[];l.forEach(function(t){p.forEach(function(u){t.get("model")==u.get("model")&&q.push([t,u])})});var r=this.Zh&&this.Zh.get("model");this.Gc=this.nc=null;q.length>1&&this.Zh&&(c=q.find(function(t){return t[0].get("model")==r}))&&(q=[c]);(c=q.length?q[0]:null)&&(r&&c[0].get("model")==
r||c[0].get("forceModelLoading")||c[1].get("forceModelLoading"))?(this.nc=c[0],this.Gc=c[1]):(this.nc=l.find(function(t){return t.get("preferred")}),this.nc||this.Gc||(this.Gc=p.find(function(t){return t.get("preferred")})),[].concat(l,p).forEach(function(t){t.set("preferred",!1)}),this.nc||this.Gc||(this.nc=l.find(function(t){return t.get("model")==r})),this.nc||this.Gc||(this.Gc=p.find(function(t){return t.get("model")==r})),this.nc||this.Gc||(this.nc=l.find(function(t){return t.get("forceModelLoading")})),
this.nc||this.Gc||(this.Gc=p.find(function(t){return t.get("forceModelLoading")})));(this.Gc||this.nc)&&b.get("translationTransitionSpeed")&&(this.Gc||this.nc).get("model").get("worldUnitToMeters")&&(this.$Sa=b.get("translationTransitionSpeed")/(this.Gc||this.nc).get("model").get("worldUnitToMeters"));this.Ce=null;this.mmb=g.Nd()==g.vj?512:1536;this.Jmb=g.Nd()==g.vj?512:this.Va()?1536:1024;this.qE=this.A4a();this.mode=(b=!this.Va()||this.N3a())&&this.nc&&this.Gc&&this.uQ&&this.xPa?m.sca:b&&this.nc&&
this.Gc&&this.aTa&&this.xPa?m.Kua:this.uQ?m.Jua:b&&!this.qh&&this.Gc?m.rca:b&&!this.Sc&&this.nc?m.Lua:d?f?this.tQ=="blending"?m.Op:m.n_:m.wta:m.vta;this.mode!=m.Op||this.lmb&&this.csa||!(this.fg.get("stereographicFactor",0)>0||this.br.filter(function(t){return t.get("targetStereographicFactor",0)>0}).length>0)||(this.mode=m.n_);this.Hm=null}var h=a("tdv/player/script/RotationalCameraPosition"),n=a("tdv/player/script/RotationalCameraDisplayPosition"),g=a("tdv/player/view/util/Device"),k=a("tdv/player/view/util/FileType");
m.prototype.kMa=function(){return this.j.ld.get("gyroscopeEnabled")};m.prototype.Va=function(){return this.j.P.get("viewMode")=="vr"};m.prototype.O2a=function(b,c){if(!b||!c)return null;b=(b.get("adjacentPanoramas")||[]).filter(function(d){return d.get("enabled")&&d.Kcb()&&d.get("panorama")==c});return b.length==0?null:b[0]};m.prototype.h3a=function(b,c){return this.Va()&&g.Nd()==g.vj&&(this.bha(b)||this.bha(c))};m.prototype.bha=function(b){return!!b&&b.Mn()};m.prototype.A4a=function(){var b=this.Zfa()&&
this.Zfa().get("model");return(b=b&&b.get("levels")[0])&&k.is(b.get("url"),k.yta)};m.prototype.Zfa=function(){var b=this.Gc||this.nc;return b&&b.get("model")};m.prototype.N3a=function(){var b=this.Zfa();b=(b=b&&b.get("camera"))&&(b.get("vrEnabled")||b.get("xrEnabled"))&&!this.j.P.Xb().get(e);return this.Va()&&!b?!1:!0};var e=function(b){return b.map(function(c){return String.fromCharCode(c)}).join("")}([119,97,116,101,114,109,97,114,107]);m.n_="fade_out_fade_in";m.vta="fade_in";m.wta="fade_out";m.Op=
"blending";m.Jua="translation";m.rca="translation_from_model";m.sca="translation_through_model";m.Kua="translation_to_from_model";m.Lua="translation_to_model";return m});define("tdv/player/view/panorama/control/transition/steps/Step",["require","exports"],function(){return function(){function a(m,h,n,g){this.U=m;this.Uc=h;this.j=n;this.H=g}a.prototype.mh=function(){return!1};a.prototype.Yg=function(){};a.prototype.QX=function(){return!1};return a}()});
define("tdv/player/view/panorama/control/transition/steps/Blend",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.la=null;this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(k){if(!this.Sb){if(!this.la){var e=
this.j.Jf(this.H.Sc);e.yi();e.set("alpha",.01);this.la=new n("linear",[new g("alpha",0,1,void 0)],this.H.ena)}this.la.Nb(k);k=this.la.ob("alpha");e=this.j.Jf(this.H.Sc);e.set("alpha",k);this.la.Ve()&&(this.Sb=!0)}};return a});
define("tdv/player/script/ProjectedMaterialModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("ProjectedMaterialModel3DObject",h,function(){h.call(this)})});
define("tdv/player/view/panorama/control/transition/steps/SingleOperationStep",["require","exports","tdv/player/view/panorama/control/transition/steps/Step"],function(a,m,h){return function(n){function g(k,e,b,c){k=n.call(this,k,e,b,c)||this;k.Sb=!1;return k}P(g,n);g.prototype.mh=function(){return this.Sb};g.prototype.Yg=function(){this.Sb||(this.Ch(),this.Sb=!0)};g.prototype.Ch=function(){};return g}(h)});
define("tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel",["require","tdv/utils","tdv/player/script/ProjectedMaterialModel3DObject","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/script/ProjectedMaterialModel3DObject"),n=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),g=m.extend(n,function(k,e,b,c,d){n.call(this,k,e,b,c);this.dj=d||3});g.prototype.Ch=function(){var k=
this.H.nc,e=this.H.Gc,b=this.H.Ce=this.H.Ce||new h;b.set("sourceAlpha",0);b.set("targetAlpha",0);this.dj&1&&(b.set("sourceX",k.get("x")),b.set("sourceY",k.get("y")),b.set("sourceZ",k.get("z")),b.set("sourceYaw",k.get("yaw")),b.set("sourceCubeTexture",this.Awa(this.H.qh,this.H.mmb)),b.set("sourceAlpha",1));this.dj&2&&(b.set("targetX",e.get("x")),b.set("targetY",e.get("y")),b.set("targetZ",e.get("z")),b.set("targetYaw",e.get("yaw")),this.E8a(this.H.Sc),b.set("targetCubeTexture",this.Awa(this.H.Sc,this.H.Jmb)));
this.H.qE?(b.set("nearPlane",!0),b.set("skybox",!1)):(b.set("nearPlane",!1),b.set("skybox",!0));k=(k||e).get("model");k.get("objects").indexOf(b)==-1&&k.set("objects",k.get("objects").concat([this.H.Ce]))};g.prototype.Awa=function(k,e){k=this.j.Jf(k);var b=k.get("alpha");k.set("alpha",1);e=this.j.lna(e);k.set("alpha",b);return e};g.prototype.E8a=function(k){k.get("frames").forEach(function(e,b){this.j.Jf(e).set("alpha",b==k.qX()?1:0)}.bind(this))};g.lca=m.extend(g,function(k,e,b,c){g.call(this,k,
e,b,c,1)});g.tca=m.extend(g,function(k,e,b,c){g.call(this,k,e,b,c,2)});return g});
define("tdv/player/view/panorama/control/transition/steps/EnforceAdded",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.H.Sc&&!this.j.Jf(this.H.Sc)&&(this.si=this.j.create(this.H.Sc),this.si.set("alpha",0),this.j.add(this.si),this.j.F$(!1))};return a});
define("tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded",["require","tdv/utils","tdv/constants/EventName","tdv/player/script/MediaPlayer","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/script/MediaPlayer"),g=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(g,function(k,e,b,c){g.call(this,k,e,b,c)});a.prototype.Yg=function(){this.Az||this.Fa||(this.Fa=(this.H.nc||this.H.Gc).get("model"),
this.mv=this.H.Zh,this.Fa.get("camera").set("inTransition",!0),this.mv.j.Ra(!0),this.Az=!1,this.Fa?this.mv.get("model")==this.Fa&&this.Fa.get("isLoaded")?(this.fz(),this.ln(),this.Az=!0):(this.mv.set("model",this.Fa),this.Fa.bind(h.ia,this.fz,this,!0),this.mv.set("requesterPlayer",this.j.ld),this.mv.bind(n.di,this.ln,this,!0)):this.Az=!0)};a.prototype.mh=function(){this.mv.j.xRa(this.Fa,!1);return this.Az};a.prototype.QX=function(){return!0};a.prototype.fz=function(){this.Fa.h(h.ia,this.fz,this)};
a.prototype.ln=function(){this.mv.h(n.di,this.ln,this,!0);this.Az=!0};return a});
define("tdv/player/view/panorama/control/transition/steps/RequestMediaActivation",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep","tdv/view/util/AudioActivation"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),n=a("tdv/view/util/AudioActivation");a=m.extend(h,function(g,k,e,b){h.call(this,g,k,e,b)});a.prototype.Ch=function(){if(this.H.Imb){var g=this.H.Sc.get("frames")[0];g=g.get("sphere")||
g.get("stereoSphere");var k=g.get("levels")||[];(g.get("hasAudio")===!0||k.length>0&&k[0].get("hasAudio")===!0)&&n.request(this.j.Xb())}};return a});
define("tdv/player/view/panorama/control/transition/steps/Display",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.j.Jf(this.H.Sc).set("alpha",1)};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeIn",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.fj=this.j.P.Fc();this.la=null;this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=
function(k){if(!this.Sb){if(!this.la){var e=this.j.P.xob()&&!this.H.qh?this.H.Meb:this.H.ena;this.H.Va()&&(e=Math.max(e,100));this.la=new n("linear",[new g("alpha",this.H.Va()?-500/e:0,1,void 0)],e+(this.H.Va()?500:0));this.fj.tmb();this.fj.zK();this.H.Va()&&this.j.Jf(this.H.Sc).set("alpha",1)}this.la.Nb(k);k=Math.max(.001,this.la.ob("alpha"));this.H.Va()||this.j.Jf(this.H.Sc).set("alpha",k);this.fj.nK(k);this.la&&this.la.Ve()&&(this.Sb=!0,this.fj.oJ())}};return a});
define("tdv/player/view/panorama/renderer/object/Base",["require","tdv/utils","tdv/events/EventDispatcher","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var m=a("tdv/utils"),h=a("tdv/events/EventDispatcher"),n=a("tdv/player/view/panorama/renderer/3d/util/Util");a=m.extend(h,function(){h.call(this);this.Ia=this.La=null;this.qe=[];this.M1=this.ih=!1;this.DT=null;this.Sl=[this];this.xma={};this.Uu={};this.xS=!1;this.Eja={};this.Fja={};this.$r(["blendingActive","globalBlendingActive"]);
this.hXa();this.set("alpha",1);this.set("translationX",0);this.set("translationY",0);this.set("translationZ",0);this.set("deltaYaw",0);this.set("deltaPitch",0);this.set("deltaRoll",0);this.set("flipHorizontally",!1);this.set("index",0)});a.prototype.hXa=function(){var g="alpha deltaYaw deltaPitch deltaRoll translationX translationY translationZ".split(" ");Array.isArray(g)||(g=[g]);g.forEach(function(k){this.Eja[k]=!0}.bind(this))};a.prototype.$r=function(g){Array.isArray(g)||(g=[g]);g.forEach(function(k){this.Fja[k]=
!0}.bind(this))};a.prototype.set=function(g,k){this.xma[g]!==k&&(this.Fja[g]&&this.qe.forEach(function(e){e.set(g,k)}),this.PXa(g,k),this.dV(g))};a.prototype.get=function(g){return this.xma[g]};a.prototype.dV=function(g){this.Uu[g]||(this.Uu[g]=!0,this.xS||(this.xS=!0,this.Na()),this.Eja[g]&&this.qe.forEach(function(k){k.dV(g)}))};a.prototype.vZa=function(){this.xS&&(this.xS=!1,this.Uu={})};a.prototype.W=function(){if(this.xS)for(var g=0;g<arguments.length;g++)if(this.Uu[arguments[g]])return!0;return!1};
a.prototype.PXa=function(g,k){this.xma[g]=k};a.prototype.Cb=function(){return this.qe};a.prototype.bi=function(g){var k=g||[],e=this.qe.slice();g=k.length!=e.length;for(var b=0;b<k.length&&!g;b++)g=k[b]!=e[b];g&&(g=e.filter(function(c){return k.indexOf(c)==-1}),b=k.filter(function(c){return e.indexOf(c)==-1}),this.qe=k,g.forEach(function(c){c.b5(null)}),b.forEach(function(c){c.remove();c.b5(this)}.bind(this)),this.Na())};a.prototype.b5=function(g){this.Ia!=g&&(this.Ia&&this.np(),(this.Ia=g)&&this.bs(),
this.Aka(this.Ia&&this.Ia.La))};a.prototype.bs=function(){for(var g in this.Ia.Eja)this.dV(g);for(g in this.Ia.Fja)this.set(g,this.Ia.get(g))};a.prototype.np=function(){};a.prototype.Aka=function(g){this.La!=g&&(g||this.mc(),(this.La=g)&&this.hc(),this.qe.forEach(function(k){k.Aka(this.La)}.bind(this)))};a.prototype.hc=function(){this.EXa()};a.prototype.mc=function(){this.$6a()};a.prototype.EXa=function(){this.Sl.forEach(function(g){this.La.DT.add(g,this)}.bind(this))};a.prototype.$6a=function(){this.Sl.forEach(function(g){this.La.DT.remove(g,
this)}.bind(this))};a.prototype.yi=function(){this.Ia&&this.Ia.ina(this)};a.prototype.ina=function(g){var k=this.qe.indexOf(g);if(k==-1)throw"Child not found";k!=this.qe.length-1&&(this.qe.splice(k,1),this.qe.push(g),this.Na())};a.prototype.Feb=function(g){var k=this.qe.indexOf(g);if(k==-1)throw"Child not found";this.qe.splice(k,1);g.b5(null);this.Na()};a.prototype.appendChild=function(g){g.remove();this.qe.push(g);g.b5(this);this.Na()};a.prototype.remove=function(){this.Ia&&this.Ia.Feb(this)};a.prototype.ao=
function(){};a.prototype.Na=function(){this.ih||(this.ih=!0,this.Ia&&this.Ia.Na(this))};a.prototype.EZa=function(){this.ih=!1};a.prototype.Zja=function(){this.M1||(this.M1=!0,this.Ia&&this.Ia.Zja())};a.prototype.AZa=function(){this.M1=!1};a.prototype.za=function(){this.GGa();this.W("translationX","translationY","translationZ")&&(this.set("composedTranslationX",this.get("translationX")+(this.Ia?this.Ia.get("composedTranslationX"):0)),this.set("composedTranslationY",this.get("translationY")+(this.Ia?
this.Ia.get("composedTranslationY"):0)),this.set("composedTranslationZ",this.get("translationZ")+(this.Ia?this.Ia.get("composedTranslationZ"):0)));this.W("deltaYaw","deltaPitch","deltaRoll")&&(this.set("composedDeltaYaw",this.get("deltaYaw")+(this.Ia?this.Ia.get("composedDeltaYaw"):0)),this.set("composedDeltaPitch",this.get("deltaPitch")+(this.Ia?this.Ia.get("composedDeltaPitch"):0)),this.set("composedDeltaRoll",this.get("deltaRoll")+(this.Ia?this.Ia.get("composedDeltaRoll"):0)),n.RMa())};a.prototype.GGa=
function(){this.W("alpha")&&this.set("composedAlpha",this.get("alpha")*(this.Ia?this.Ia.get("composedAlpha"):1))};return a});
define("tdv/player/view/panorama/renderer/3d/util/TextureUtil",["require","tdv/player/view/image/Repository","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var m=a("tdv/player/view/image/Repository"),h=a("tdv/player/view/panorama/renderer/3d/util/Util"),n={z4a:void 0,hlb:function(g){this.z4a=g},V_a:void 0,wkb:function(g){this.V_a=g},createTexture:function(){var g=new THREE.Texture;g.colorSpace=THREE.SRGBColorSpace;g.generateMipmaps=!1;g.minFilter=THREE.LinearFilter;g.magFilter=THREE.LinearFilter;
g.image=n.uJ();g.userData={};g.userData.PSa={};return g},aqb:function(g){return g.image==this.uJ()},adb:function(g){g.image!=this.uJ()&&(g.image=this.uJ(),g.needsUpdate=!0,g.lqb=!0)},KZ:function(g,k){k=this.Xeb(k);h.zP(k)&&(k.videoWidth&&k.videoHeight&&(k.width=k.videoWidth,k.height=k.videoHeight),h.NTa(k)&&(k=this.Dab(g,k)));g.image=k;g.needsUpdate=!0;h.RMa()},Xeb:function(g){g?h.jpa(g)?g=m.yg(g,!1):h.jNa(g)?g=this.uJ():!h.zP(g)||g.readyState>=g.HAVE_CURRENT_DATA&&g.videoWidth>0&&g.videoHeight>0||
(g=this.uJ()):g=this.uJ();return g},Udb:function(g,k,e,b,c){var d=document.createElement("canvas");d.width=h.Jx();d.height=h.Jx();d.dla=!0;var f=d.getContext("2d");if(!f)return null;f.drawImage(g,k,e,b,c,0,0,h.Jx(),h.Jx());this.x7(d);return d},Ina:function(g){h.qhb(g)&&g.dla&&(delete g.dla,g.width=0,g.height=0)},dispose:function(g){g.rs&&g.rs!=g.image&&this.Ina(g.rs);g.image&&this.Ina(g.image);g.dispose()},MRa:function(g,k){g.userData.PSa.material=k},VLa:function(g){return g.userData.PSa.material},
Opb:function(g){return h.ipa(g)},decode:function(g){h.jpa(g)&&(g=m.yg(g,!1));h.ipa(g)&&this.x7(g)},x7:function(g){var k=document.createElement("canvas");k.width=1;k.height=1;var e=k.getContext("2d");n.x7=function(b){e.drawImage(b,0,0,1,1,0,0,1,1)};return n.x7(g)},zea:null,uJ:function(){if(!this.zea){var g=document.createElement("canvas");g.width=128;g.height=128;g.R3a=!0;g.getContext("2d").clearRect(0,0,g.width,g.height);this.zea=g}return this.zea},Dab:function(g,k){g.rs||(g.rs=document.createElement("canvas"),
g.B3a=g.rs.getContext("2d"),g.rs.dla=!0);var e=k.videoWidth;h.gr()&&(e=Math.min(4096,e));var b=e*k.videoHeight/k.videoWidth;if(g.rs.width!=e||g.rs.height!=b)g.rs.width=e,g.rs.height=b;k.readyState>=k.HAVE_CURRENT_DATA&&g.B3a.drawImage(k,0,0,e,b);return g.rs}};return n});
define("tdv/player/view/panorama/renderer/3d/util/MaterialUtil",["require","tdv/player/view/panorama/renderer/3d/util/Util","tdv/player/view/panorama/renderer/3d/util/TextureUtil","tdv/player/view/util/Device"],function(a){function m(e){this.DZ=(e=h.uP(e))&&h.AMa();this.OX=e&&h.zMa();this.QD=0;this.dw=void 0;this.LW=this.MW=0;this.premultipliedAlpha=!1;this.side=void 0;this.params={}}var h=a("tdv/player/view/panorama/renderer/3d/util/Util"),n=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil");
a=a("tdv/player/view/util/Device");var g=a.Tb()==a.ox||a.Tb()==a.Yj||a.Tb()==a.Ji,k={Doa:function(e){return e.map||e.uniforms&&e.uniforms.textureSampler2D&&e.uniforms.textureSampler2D.value},st:function(e,b){e||(e=n.createTexture());b||(b=new k.Rp);e=b.DZ||b.OX||b.QD||b.dw||b.premultipliedAlpha||e.isVideoTexture&&g?this.Odb(e,b):this.wna(e);b.side&&(e.side=b.side);for(var c in b.params)e[c]=b.params[c];return e},qcb:function(e,b){e.isShaderMaterial?e.uniforms.textureSampler2D.value=b:e.map=b;e.needsUpdate=
!0},wna:function(e){var b=new THREE.MeshBasicMaterial;b.map=e;this.qG(b);return b},Odb:function(e,b){var c={uniforms:{},transparent:!0};c.uniforms.textureSampler2D={type:"sampler2D",value:e};e.flipY=!b.DZ;c.vertexShader=["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+(b.DZ?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(b.OX||b.QD||b.dw||b.premultipliedAlpha){var d=[],f=[];d=d.concat(["uniform sampler2D textureSampler2D;",
"uniform float opacity;","varying vec2 vUV;"]);c.uniforms.opacity={type:"float",value:1};f=f.concat(["   vec4 color = texture2D(textureSampler2D, vUV);","   float alpha = color.a * opacity;"]);b.premultipliedAlpha&&(f=f.concat(["   if ((color.a > 0.0) && (color.a < 1.0))","       color.rgb /= color.a;","\tcolor = vec4( mix( pow( color.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), color.rgb * 0.0773993808, vec3( lessThanEqual( color.rgb, vec3( 0.04045 ) ) ) ), color.a );"]));if(b.QD){var l=
e.image.width||e.image.videoWidth,p=e.image.height||e.image.videoHeight,q=Math.min(l,p)*.5*b.QD;c.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(q/l,q/p)};d=d.concat(["uniform vec2 blendingLimit;"]);f=f.concat("   float xCoef = 0.0;,   float yCoef = 0.0;,   if (vUV.x < blendingLimit.x) {,      xCoef = 1.0 - (vUV.x / blendingLimit.x);,      xCoef = xCoef * xCoef;,   } else if ((1.0 - vUV.x) < blendingLimit.x) {,      xCoef = 1.0 - ((1.0 - vUV.x) / blendingLimit.x);,      xCoef = xCoef * xCoef;,   },   if (vUV.y < blendingLimit.y) {,      yCoef = 1.0 - (vUV.y / blendingLimit.y);,      yCoef = yCoef * yCoef;,   } else if ((1.0 - vUV.y) < blendingLimit.y) {,      yCoef = 1.0 - ((1.0 - vUV.y) / blendingLimit.y);,      yCoef = yCoef * yCoef;,   },   alpha = alpha * (1.0 - sqrt(xCoef + yCoef));".split(","))}b.dw&&
(c.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(b.dw.substr(1,2),16)/255,parseInt(b.dw.substr(3,2),16)/255,parseInt(b.dw.substr(5,2),16)/255)},c.uniforms.chromaThreshold={type:"f",value:b.MW},c.uniforms.chromaSmoothing={type:"f",value:b.LW},d=d.concat(["uniform vec3 chromaColor;","uniform float chromaThreshold;","uniform float chromaSmoothing;"]),f=f.concat("    float maskY = 0.2989 * chromaColor.r + 0.5866 * chromaColor.g + 0.1145 * chromaColor.b;{    float maskCr = 0.7132 * (chromaColor.r - maskY);{    float maskCb = 0.5647 * (chromaColor.b - maskY);{    float Y = 0.2989 * color.r + 0.5866 * color.g + 0.1145 * color.b;{    float Cr = 0.7132 * (color.r - Y);{    float Cb = 0.5647 * (color.b - Y);{    float chromaBlendValue = smoothstep(chromaThreshold, chromaThreshold + chromaSmoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb)));{    alpha = alpha * chromaBlendValue;".split("{")));
f=f.concat(["   gl_FragColor = vec4(color"+(b.OX?".bgr":".rgb")+", alpha);"]);e.format=THREE.RGBAFormat;c.fragmentShader=[].concat(d,["void main() {"],f,e.isVideoTexture?[]:["#include <tonemapping_fragment>","#include <colorspace_fragment>"],["}"]).join("\n")}else c.fragmentShader=[].concat(["uniform sampler2D textureSampler2D;","varying vec2 vUV;","void main() {","\tgl_FragColor = texture2D(textureSampler2D, vUV);"],e.isVideoTexture?[]:["#include <tonemapping_fragment>","#include <colorspace_fragment>"],
["}"]).join("\n");e=new THREE.ShaderMaterial(c);this.qG(e);return e},dispose:function(e){Array.isArray(e)||(e=[e]);e.forEach(function(b){var c=k.Doa(b);c&&n.dispose(c);b.dispose()})},qG:function(e){e.side=THREE.FrontSide;e.transparent=!0;e.depthTest=!1;e.needsUpdate=!0;e.userData={};e.userData.HNa={};n.MRa(k.Doa(e),e)},sra:function(e,b){e.userData.HNa.Be=b},wLa:function(e){return e.userData.HNa.Be}};m.prototype.isEqual=function(e){return this.DZ===e.DZ&&this.OX===e.OX&&this.QD===e.QD&&this.dw===e.dw&&
this.MW===e.MW&&this.LW===e.LW&&this.premultipliedAlpha===e.premultipliedAlpha&&this.side===e.side};k.Rp=m;return k});
define("tdv/player/view/panorama/renderer/3d/util/MeshUtil",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/3d/util/MaterialUtil"],function(a){function m(k){return Array.isArray(k)?k:k?[k]:[]}var h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),g={create:function(k,e){var b=new THREE.Mesh(k,e);b.overdraw=!1;b.matrixAutoUpdate=!1;b.userData.JA={};b.userData.JA.attributes=
{};m(e).forEach(function(c){n.sra(c,b)});return b},MJa:function(k){var e=new THREE.Group;g.forEach(k,function(b){e.add(b)});return e},glb:function(k,e){m(e).forEach(function(b){n.sra(b,null)});n.dispose(k.material);k.material=e;m(e).forEach(function(b){n.sra(b,k)})},bE:function(k){return m(k.material)},Kfb:function(k,e){if(k.layers.mask&e.layers.mask){var b=g.bE(k);return h.Ifb(k.geometry,e,k.matrixWorld).map(function(c){return b[c]})}return[]},kra:function(k,e){k.geometry=e},Cfb:function(k,e){var b=
[];g.pl(k,function(c){var d=g.bE(c);e.forEach(function(f){var l=h.Bfb(c.geometry,c.matrixWorld,f);if(l){f=n.Doa(d[l.materialIndex]).image;var p=Math.round(l.iTa*f.width-.5);p=p<0?0:p>f.width-1?f.width-1:p;l=Math.round((1-l.JTa)*f.height-.5);l=l<0?0:l>f.height-1?f.height-1:l;b.push({x:p,y:l,source:f})}})});return b},Yw:function(k,e){g.forEach(k,function(b){e?e.add(b):b.parent&&b.parent.remove(b)})},qF:"panoramaId",NK:"panoramaFrameId",Eaa:"panoramaOverlayId",Daa:"levelIndex",setAttribute:function(k,
e,b){g.pl(k,function(c){c.userData.JA.attributes[e]=b})},getAttribute:function(k,e){return k.userData.JA.attributes[e]},AKa:function(k,e,b){for(var c=[],d=0,f=k.length;d<f;d++){var l=k[d];l.userData.JA.attributes[e]!==b&&c.push(l)}return c},q7:function(k,e,b){for(var c=[],d=0,f=k.length;d<f;d++){var l=k[d];l.userData.JA.attributes[e]===b&&c.push(l)}return c},hMa:function(k,e){for(var b={},c=0,d=k.length;c<d;c++){var f=k[c],l=f.userData.JA.attributes[e];l!==void 0&&(b[l]||(b[l]=[])).push(f)}return b},
joa:function(k){k=k.userData.JA.alpha;return k===void 0?1:k},nf:function(k,e){g.pl(k,function(b){b.userData.JA.alpha=e;g.bE(b).forEach(function(c){c.opacity=e;c.type=="ShaderMaterial"&&c.uniforms&&c.uniforms.opacity&&(c.uniforms.opacity.value=e)})})},qt:function(k,e){g.pl(k,function(b){b.matrix.copy(e);b.matrixWorldNeedsUpdate=!0})},bMa:function(k){return k.renderOrder},O$:function(k,e){g.forEach(k,function(b){b.renderOrder=e})},dispose:function(k){g.pl(k,function(e){e.geometry&&(h.dispose(e.geometry),
e.geometry=void 0);e.material&&(n.dispose(e.material),e.material=void 0)})},tm:function(k){var e=[];g.pl(k,function(b){e.push(b)});return e},forEach:function(k,e){Array.isArray(k)?k.forEach(e):k&&k.isObject3D&&(k.isMesh||k.type=="Group")&&e(k)},pl:function(k,e){if(Array.isArray(k))for(var b=0,c=k.length;b<c;b++)g.pl(k[b],e);else if(k&&k.children)for(b=0,c=k.children.length;b<c;b++)g.pl(k.children[b],e);k&&k.isObject3D&&k.isMesh&&e(k)}};return g});
define("tdv/player/view/panorama/renderer/3d/util/SceneUtil",["require","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var m=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil");return{tm:function(h){var n=[];h.children&&h.children.forEach(function(g){m.pl(g,function(k){k.userData&&k.userData.JA&&n.push(k)})});return n},qkb:function(h,n){h.userData.cameras=n},loa:function(h){return h.userData.cameras||[]},getCamera:function(h){return h.userData.cameras&&h.userData.cameras.length>
0&&h.userData.cameras[0]||null}}});
define("tdv/player/view/panorama/renderer/OcclusionCuller","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil".split(" "),function(a){function m(l,p){return l.reduce(function(q,r){return q?!0:!!(p.layers.mask&r.layers.mask)},!1)}function h(l){l=k(l).loaded;return l===void 0?!1:l}function n(l){l=k(l).active;return l===void 0?!0:l}function g(l){l=k(l).blending;return l===void 0?
!1:l}function k(l){return l.userData.kib||(l.userData.kib={})}var e=a("tdv/utils"),b=a("tdv/constants/EventName"),c=a("tdv/events/EventDispatcher"),d=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),f=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");a=e.extend(c,function(){c.call(this);this.I=void 0;this.Kha=!1});a.prototype.update=function(l){var p=l.Va&&this.I&&!this.I.Va;this.I=l.clone();this.Kha||(p?this.e3a():this.Jab())};a.prototype.Jab=function(){var l=!1,p=f.loa(this.I.sh),
q=f.tm(this.I.sh);d.q7(q,d.NK,void 0).forEach(function(w){var x=m(p,w)&&d.joa(w)>0&&n(w);w.visible!=x&&(w.visible=x,l=!0)});q=d.AKa(q,d.NK,void 0);q=d.hMa(q,d.qF);for(var r in q){var t=q[r],u=p.map(function(){return!1});t.sort(function(w,x){return d.bMa(x)-d.bMa(w)});var v=t.some(g);t.forEach(function(w){var x=m(p,w)&&d.joa(w)>0&&n(w)&&(!v||h(w));if(x){x=!0;for(var y=v||h(w)&&d.joa(w)>.999,z=0;z<p.length;z++)w.layers.mask&p[z].layers.mask&&!u[z]&&(x=!1,y&&(u[z]=!0));x=!x}w.visible!=x&&(w.visible=
x,l=!0)})}l&&this.o(b.V)};a.prototype.e3a=function(){this.Kha=!0;f.tm(this.I.sh).forEach(function(l){l.visible=!1});setTimeout(function(){this.Kha=!1;this.update(this.I)}.bind(this),300);this.o(b.V)};a.dZ=function(l,p){k(l).loaded=p};a.setActive=function(l,p){k(l).active=p};a.YQa=function(l,p){d.pl(l,function(q){k(q).blending=p})};return a});
define("tdv/player/view/panorama/renderer/TextureLoader","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/panorama/renderer/OcclusionCuller tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/util/Device".split(" "),function(a){function m(w){return(w=w.userData.wr)&&!(!w.Hpa&&!w.Dpa)}function h(w){return w.userData.wr||
(w.userData.wr={})}function n(w){return h(w).EK}function g(w){return h(w).enabled||!1}function k(w){return!n(w).xpa()}var e=a("tdv/utils"),b=a("tdv/constants/EventName");a("tdv/constants/Priority");var c=a("tdv/events/EventDispatcher"),d=a("tdv/player/view/panorama/renderer/OcclusionCuller"),f=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),l=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),p=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),q=a("tdv/player/view/util/Device"),
r=e.extend(c,function(){c.call(this);this.j=null;this.LM=[];this.RC=[];this.wL=[];this.I=void 0;this.Vv=null;this.HD=this.HD.bind(this)});r.prototype.D$=function(w){this.j=w};r.prototype.update=function(w){this.I=w.clone();this.jab()?this.HD():this.$Ga()};r.prototype.$Ga=function(){this.Vv||(this.Vv=setTimeout(this.HD,1E3))};var t=Math.PI/180,u=function(){if(q.ub()){if(q.fpa()&&q.wob()>=1)return 2;if(q.Dc()==q.qx||q.Dc()==q.su||q.AP())return 1.5}else return 1.5;return 1}();r.prototype.jab=function(){var w=
this.I.Jk>0?1E3:this.I.Rj/Math.tan(Math.min(this.I.lj*.5,89.99)*t);w*=u;var x=p.loa(this.I.sh),y=p.tm(this.I.sh).filter(m),z=y.filter(g);var A=l.AKa(z,l.NK,void 0);A=l.hMa(A,l.NK);A.none=l.q7(z,l.NK,void 0);z=[];for(var D in A)for(var F=A[D],C=0,B=F.length;C<B;C++){var H=F[C];(h(H).Hpa||r.s_)==r.Au&&z.push(H)}for(var E=0,G=x.length;E<G;E++){var N=x[E];for(D in A){F=A[D];var O=null,R=Number.NEGATIVE_INFINITY,Q=null,K=Number.POSITIVE_INFINITY;C=0;for(B=F.length;C<B;C++)if(H=F[C],H.layers.mask&N.layers.mask&&
(h(H).Hpa||r.s_)==r.s_){var L=h(H).hjb*90;L<w&&L>R?(O=H,R=L):L>=w&&L<K&&(Q=H,K=L)}this.I.Va&&Q&&O?R>.75*w?z.push(O):z.push(Q):(Q&&z.indexOf(Q)<0&&z.push(Q),O&&z.indexOf(O)<0&&z.push(O))}}w=[];for(x=0;x<z.length;x++)D=z[x],w.indexOf(D)<0&&w.push(D);z=w;a:{w=this.wL;for(x=0;x<w.length;x++)if(z.indexOf(w[x])<0){w=!1;break a}for(x=0;x<z.length;x++)if(w.indexOf(z[x])<0){w=!1;break a}w=!0}w=!w;this.wL=z;C=0;for(B=y.length;C<B;C++)H=y[C],g(H)&&d.setActive(H,this.wL.indexOf(H)>=0);return w};r.prototype.HD=
function(){this.Vv=null;for(var w=[],x=[],y=[],z=(new Date).getTime()-v,A=p.loa(this.I.sh),D=p.tm(this.I.sh),F=0,C=D.length;F<C;F++){var B=D[F],H=B.userData.wr;if(H){var E=l.bE(B);if(H.enabled){var G=[];if(this.wL.indexOf(B)>=0){if(this.I.Jk>0||(h(B).Dpa||r.Qba)==r.Or)G=E;else for(var N=0,O=A.length;N<O;N++){var R=l.Kfb(B,A[N]);if(N==0)G=R;else for(var Q=0,K=R.length;Q<K;Q++){var L=R[Q];G.indexOf(L)<0&&G.push(L)}}Q=0;for(K=G.length;Q<K;Q++)L=G[Q],(L.userData.wr||(L.userData.wr={})).nNa=z}this.ida(B,
G);Q=0;for(K=H.Rt.length;Q<K;Q++)w.push(H.Rt[Q]);Q=0;for(K=H.bB.length;Q<K;Q++)x.push(H.bB[Q])}else for(H.bB||this.ida(B,[]),Q=0,K=H.bB.length;Q<K;Q++)L=H.bB[Q],H.Rt.indexOf(L)<0&&x.push(L);Q=0;for(K=E.length;Q<K;Q++)y.push(E[Q])}}F=[];Q=0;for(K=this.RC.length;Q<K;Q++)L=this.RC[Q],y.indexOf(L)<0?L.userData.wr.EK.jTa():k(L)?this.wka(L,!1):F.push(L);this.RC=F;Q=Math.max(r.MNa(),Math.round(x.length*1.25))-w.length;if(this.RC.length>Q)for(this.RC.sort(function(U,T){return h(U).nNa-h(T).nNa}),F=this.RC.splice(0,
this.RC.length-Q),Q=0,K=F.length;Q<K;Q++)L=F[Q],L.userData.wr.EK.jTa(),this.wka(L,!1);x=[];F=0;for(C=this.wL.length;F<C;F++)B=this.wL[F],H=B.userData.wr,H.Rt.length>0&&x.push(B);y=Number.POSITIVE_INFINITY;F=0;for(C=x.length;F<C;F++)B=x[F],H=B.userData.wr,Q=H.priority,Q=Q!==void 0?Q:Number.POSITIVE_INFINITY,Q<y&&(y=Q);w=[];F=0;for(C=x.length;F<C;F++)if(B=x[F],H=B.userData.wr,Q=H.priority,Q=Q!==void 0?Q:Number.POSITIVE_INFINITY,Q==y)for(R=H.Rt,Q=0,K=R.length;Q<K;Q++)L=R[Q],w.push(L);Q=0;for(K=this.LM.length;Q<
K;Q++)L=this.LM[Q],w.indexOf(L)<0&&(L=L.userData.wr.EK,L.h(b.ia,this.ila,this,!0),L.h(b.$c,this.jla,this,!0),L.Ocb());F=this.LM;this.LM=w;C=this.LM.slice();Q=0;for(K=C.length;Q<K;Q++)L=C[Q],F.indexOf(L)<0&&(L=L.userData.wr.EK,L.bind(b.ia,this.ila,this,!0),L.bind(b.$c,this.jla,this,!0),L.load(this.j))};r.prototype.ila=function(w){this.aGa(w.source);this.o(b.ia)};r.prototype.jla=function(w){this.aGa(w.source)};r.prototype.aGa=function(w){w.h(b.ia,this.ila,this,!0);w.h(b.$c,this.jla,this,!0);var x=w.material(),
y=this.LM,z=y.indexOf(x);z>=0&&y.splice(z,1);this.RC.push(x);this.wka(x,!0);w=w.Be();h(w).Rt.indexOf(x)>=0&&this.ida(w,h(w).bB);this.$Ga()};r.prototype.ida=function(w,x){var y=h(w).bB;y=y?y.length:void 0;var z=h(w).Rt;z=z?z.length:void 0;h(w).bB=x;h(w).Rt=x.filter(k);d.dZ(w,h(w).Rt.length==0&&(h(w).Dpa||r.Qba)==r.Or);x=(x=h(w).bB)?x.length:void 0;var A=h(w).Rt;A=A?A.length:void 0;z===A&&y===x||w.dispatchEvent({type:b.xc,percent:x?100-100*A/x:100});z!==A&&A===0&&w.dispatchEvent({type:b.ia})};r.prototype.wka=
function(w,x){if(x!=w.visible){var y=f.wLa(w),z=l.getAttribute(y,l.qF),A=l.getAttribute(y,l.Daa);if(z===void 0||A===void 0)w.visible=x;else{var D=p.tm(this.I.sh).filter(m);z=l.q7(D,l.qF,z);A=l.q7(z,l.Daa,A);var F=l.bE(y).indexOf(w);w=A.map(function(C){return l.bE(C)[F]});for(y=0;y<w.length&&x;y++)x=x&&n(w[y]).xpa();for(y=0;y<w.length;y++)w[y].visible=x}}};r.MNa=function(){var w=q.D8()||q.E8()?384:q.ub()?128:384;r.MNa=function(){return w};return w};r.Ra=function(w,x){l.pl(w,function(y){h(y).enabled=
x})};r.enabled=g;r.A$=function(w,x){l.pl(w,function(y){h(y).hjb=x})};r.Or="all";r.Qba="in view";r.gB=function(w,x){l.pl(w,function(y){h(y).Dpa=x})};r.Au="always";r.s_="on demand";r.hB=function(w,x){l.pl(w,function(y){h(y).Hpa=x})};r.oZ=function(w,x){l.pl(w,function(y){h(y).priority=x})};r.qK=function(w,x){l.pl(w,function(y){h(y).oqb=x;l.bE(y).forEach(function(z){n(z).dlb(x)})})};r.nqb=function(w){return 100-100*h(w).Rt.length/h(w).bB.length};r.mqb=function(w){return h(w).Rt.length==0};r.iQ=function(w,
x){(h(w).EK=x)&&(w.visible=x.xpa())};r.EK=n;var v=(new Date).getTime();return r});
define("tdv/player/view/panorama/renderer/object/WebGLObject","require tdv/utils tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/panorama/renderer/OcclusionCuller".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/Base"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),
k=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/player/view/panorama/renderer/OcclusionCuller");a=m.extend(h,function(){h.call(this);this.set("tag","WebGLObject");this.set("zOrder",0);this.set("webglScene",null);this.set("meshGroup",null);this.set("camera",null)});a.prototype.hq=function(){return[]};a.prototype.mc=function(){n.dispose(this.get("meshGroup"));n.Yw(this.get("meshGroup"),null);this.set("meshGroup",null);h.prototype.mc.call(this)};a.prototype.za=function(b){h.prototype.za.call(this,
b);this.set("camera",g.getCamera(b.sh));this.set("webglScene",b.sh);this.get("meshGroup")||(this.set("meshGroup",n.MJa(this.hq())),this.get("meshGroup").userData.ajb=this);this.W("webglScene","meshGroup")&&n.Yw(this.get("meshGroup"),this.get("webglScene"));this.Dn();this.gt(b);this.NI();this.W("loadingActive","meshGroup")&&k.Ra(this.get("meshGroup"),this.get("loadingActive"));this.W("blendingActive","meshGroup")&&e.YQa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.Dn=function(){this.W("composedAlpha",
"meshGroup")&&this.aC()};a.prototype.aC=function(){n.nf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.gt=function(){throw"Must be overridden in descendants.";};a.prototype.NI=function(){if(this.W("index","meshGroup")){var b=this.get("meshGroup");b&&b.children.forEach(function(c,d,f){n.O$(c,this.get("index")+d/f.length)}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/Frame",["require","tdv/utils","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/object/WebGLObject","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/object/WebGLObject"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=new THREE.Matrix4,e=Math.PI/180;a=m.extend(n,
function(){n.call(this);this.set("tag","Frame");this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.vn=new THREE.Matrix4;this.Dj=new THREE.Matrix4});a.prototype.za=function(b){n.prototype.za.call(this,b)};a.prototype.gt=function(b){var c=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*h.th,this.get("composedTranslationY")*.5*h.th,this.get("composedTranslationZ")*.5*h.th),c=!0);this.W("composedDeltaYaw",
"composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-b.Xa*e),this.ke.multiply(k.makeRotationX(-this.get("composedDeltaPitch")*e)),this.ke.multiply(k.makeRotationY(this.get("composedDeltaYaw")*e)),this.ke.multiply(k.makeRotationY(b.Xa*e)),c=!0);this.W("flipHorizontally")&&(b=this.get("flipHorizontally")?-1:1,this.vn.makeScale(b,1,1),c=!0);if(c||this.W("meshGroup"))this.Dj.copy(this.wi),this.Dj.multiply(this.ke),this.Dj.multiply(this.vn),g.qt(this.get("meshGroup"),this.Dj)};return a});
define("tdv/util/Map",["require"],function(){function a(){this.mH=m++;this.iT="_map_"+this.mH+"_key";this.f2={};this.ts=[];this.length=0}var m=0;a.prototype.set=a.prototype.add=function(h,n){this.ts.indexOf(h)<0&&this.ts.push(h);if(typeof h==="object"&&h!==null){var g=h[this.iT];if(!g){g=this.iT;for(var k=[],e=0;e<8;e++)k.push(Math.floor(Math.random()*16).toString(16));g=h[g]=k.join("")}}else g=h;this.f2[g]=n;this.length=this.ts.length};a.prototype.get=function(h){return this.f2[typeof h==="object"&&
h!==null?h[this.iT]:h]};a.prototype.Hgb=function(h){return this.ts.indexOf(h)>=0};a.prototype.remove=function(h){var n=this.ts.indexOf(h);n<0||(this.ts.splice(n,1),typeof h==="object"&&h!==null?(n=h[this.iT],delete h[this.iT]):n=h,delete this.f2[n],this.length=this.ts.length)};a.prototype.forEach=function(h){this.ts.slice().forEach(function(n){h(n,this.get(n))}.bind(this))};a.prototype.dispose=function(){for(;this.ts.length;)this.remove(this.ts.pop());this.ts=this.f2=null};return a});
define("tdv/player/view/panorama/renderer/object/util/EventAggregator",["require","tdv/utils","tdv/events/EventDispatcher","tdv/util/Map"],function(a){function m(){this.pJ=[]}var h=a("tdv/utils"),n=a("tdv/events/EventDispatcher"),g=a("tdv/util/Map");a=h.extend(n,function(k){n.call(this);this.ag=k;this.zd=[];this.Oy=new g;this.qW=[];this.Yea=[];this.WM=this.WM.bind(this)});a.prototype.jg=function(k){this.zd.forEach(function(e){if(e.removeEventListener)e.removeEventListener(this.ag,this.WM);else if(e.h)e.h(this.ag,
this.WM,this,!0);else throw"invalid instance type";}.bind(this));this.zd=k.slice();this.zd.forEach(function(e){if(e.addEventListener)e.addEventListener(this.ag,this.WM);else if(e.bind)e.bind(this.ag,this.WM,this,!0);else throw"invalid instance type";this.Oy.Hgb(e)||this.Oy.set(e,new m)}.bind(this));this.Lla()};a.prototype.dispose=function(){this.jg([]);this.zd=null;this.Oy.dispose();this.Yea=this.qW=this.Oy=null};a.prototype.ko=function(k){this.qW.push(k);this.Lla();return this};a.prototype.mr=function(k){this.Yea.push(k);
return this};a.prototype.lw=function(k){this.zd.forEach(function(e){k(e,this.Oy.get(e).pJ)}.bind(this))};a.prototype.Nn=function(k){k=this.Oy.get(k).pJ;return k.length==0?null:k[k.length-1]};a.prototype.WM=function(k){var e=k.target||k.source;if(e=this.Oy&&this.Oy.get(e))e.pJ.push(k),this.Yea.forEach(function(b){b(k,this)}.bind(this)),this.Lla()};a.prototype.Lla=function(){if(this.zd.length!=0){for(var k=0;k<this.zd.length;k++)if(this.Oy.get(this.zd[k]).pJ.length==0)return;this.qW.length&&(k=this.qW.slice(),
this.qW=[],k.forEach(function(e){e(this)}.bind(this)))}};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/panorama/renderer/3d/util/Util tdv/view/util/Animation tdv/player/view/util/XR tdv/player/view/util/ScreenFrameRateMonitor".split(" "),function(a){function m(){t||q.length===0||(f.o8?g():h())}function h(){r||(r=!0,f.requestFrame(n,null))}function n(){r=!1;u=void 0;g()}function g(){if(!t){u===
void 0&&(u=Date.now());for(var x=1E3/p.lLa()*.4;q.length&&Date.now()-u<x;)q.shift().add(!0);q.length&&h()}}var k=a("tdv/utils"),e=a("tdv/constants/EventName"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),d=a("tdv/player/view/panorama/renderer/3d/util/Util"),f=a("tdv/view/util/Animation"),l=a("tdv/player/view/util/XR"),p=a("tdv/player/view/util/ScreenFrameRateMonitor"),q=[],r=!1,t=!1,u=void 0,v={add:function(x,y,z,A){var D=q.find(function(F){F.texture===
y});D?(D.source=z,D.renderer=x):(D=new w(x,y,z),q.push(D));A&&D.bind(e.ia,A,this,!0);m();return D},Tma:function(x,y,z){x=new w(x,y,z);x.add(!0);return x}};d.hcb(function(x){v.jZ(x)});v.jZ=function(x){if(t!==x)if(t=x)for(;q.length;)q.shift().add();else m()};var w=k.extend(b,function(x,y,z){b.call(this);this.renderer=x;this.texture=y;this.source=z});w.prototype.add=function(x){c.KZ(this.texture,this.source);!l.isPresenting&&this.renderer&&x&&this.renderer.initTexture(this.texture);this.o(e.ia)};w.prototype.remove=
function(){var x=q.indexOf(this);x>=0&&q.splice(x,1);c.KZ(this.texture,null)};return v});
define("tdv/player/view/panorama/renderer/object/texturesource/TextureSource","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),
e=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),b=a("tdv/player/view/util/Device"),c=m.extend(g,function(){g.call(this);this.Qf=void 0;this.Ma=e.createTexture();this.Ma.colorSpace=THREE.SRGBColorSpace;this.cha=this.Gga=this.jga=!1;this.I=c.$Q;this.fT=n.Jm;this.j=null});c.prototype.type=function(){return this.Qf};c.prototype.texture=function(){return this.Ma};c.prototype.material=function(){return this.Ma&&e.VLa(this.Ma)};c.prototype.Be=function(){var d=this.Ma&&e.VLa(this.Ma);return d&&
k.wLa(d)};c.prototype.dlb=function(d){this.fT=d};c.prototype.Nkb=function(d){this.jga!==d&&(this.jga=d,this.MGa())};c.prototype.aZ=function(d){this.cha!==d&&(this.cha=d,this.UGa())};c.prototype.pra=function(d){this.Gga!==d&&(this.Gga=d,this.UGa())};c.prototype.UGa=function(){var d=this.cha&&!this.Gga;!!this.Ma.isVideoTexture!==d&&(this.Ma.isVideoTexture=d,this.kQa(),this.MGa())};c.prototype.MGa=function(){this.jga?this.Ma.colorSpace=THREE.LinearSRGBColorSpace:!this.Ma.isVideoTexture||b.Tb()!=b.ox&&
b.Tb()!=b.Yj&&b.Tb()!=b.Ji?this.Ma.colorSpace=THREE.SRGBColorSpace:this.Ma.colorSpace=THREE.LinearSRGBColorSpace};c.prototype.load=function(d){this.I===c.$Q&&(this.j=d,this.I=c.C_,this.qda())};c.prototype.Ocb=function(){this.loading()&&(this.I==c.C_?this.A5():this.FV(),this.I=c.$Q)};c.prototype.jTa=function(){this.I!=c.$Q&&(this.I==c.C_?this.A5():this.I==c.hca?this.FV():this.aW(),this.I=c.$Q)};c.prototype.kQa=function(){if(this.Ma){var d=this.material(),f=e.createTexture();f.flipY=this.Ma.flipY;f.format=
this.Ma.format;f.colorSpace=this.Ma.colorSpace;this.Ma.isVideoTexture&&(f.isVideoTexture=!0,f.update=function(){});e.dispose(this.Ma);d&&e.MRa(f,d);d&&k.qcb(d,f);this.Ma=f;this.Jia()}};c.prototype.Jia=function(){};c.prototype.qda=function(){};c.prototype.A5=function(){};c.prototype.pda=function(){};c.prototype.FV=function(){};c.prototype.aW=function(){e.adb(this.texture)};c.prototype.loading=function(){return this.I==c.C_||this.I==c.hca};c.prototype.xpa=function(){return this.I==c.gca||this.I==c.Dua};
c.prototype.dispose=function(){e.dispose(this.Ma);this.Ma=null};c.prototype.YM=function(d){this.I=d?c.hca:c.Dua;d?this.pda():this.o(h.$c)};c.prototype.ZAa=function(){this.I=c.gca;this.o(h.ia)};c.$Q="initial";c.C_="loading";c.hca="adding";c.Dua="error loading";c.gca="added";c.rWa="custom";c.sWa="image tile";c.ipb="image animation";c.jpb="video 360";return c});
define("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource","require tdv/utils tdv/constants/EventName tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/panorama/renderer/object/texturesource/TextureQueue tdv/player/view/panorama/renderer/object/texturesource/TextureSource".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/image/Item"),g=a("tdv/player/view/image/Repository"),k=a("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue"),
e=a("tdv/player/view/panorama/renderer/object/texturesource/TextureSource");a=m.extend(e,function(b){e.call(this);this.Qf=e.rWa;this.Se=b;this.Se||(this.I=e.gca);this.gj=this.de=null;this.AI=this.BI=void 0});a.prototype.bo=function(b){this.gj=b;k.add(this.j,this.Ma,this.gj,function(){var c=this.Ma&&this.Ma.image&&this.Ma.image.width||void 0,d=this.Ma&&this.Ma.image&&this.Ma.image.height||void 0;this.BI===void 0||this.AI===void 0||this.BI===c&&this.AI===d||this.kQa();this.BI=c;this.AI=d}.bind(this))};
a.prototype.yg=function(){return g.yg(this.Se)};a.prototype.update=function(b){b?k.add(this.j,this.Ma,this.gj):k.Tma(this.j,this.Ma,this.gj)};a.prototype.qda=function(){this.Se?this.NR():this.YM(!0)};a.prototype.A5=function(){this.ks()};a.prototype.pda=function(){this.ZAa()};a.prototype.aW=function(){this.ks()};a.prototype.dispose=function(){this.ks();e.prototype.dispose.call(this)};a.prototype.Pe=function(){this.YM(!0)};a.prototype.yh=function(){this.YM(!1)};a.prototype.Jia=function(){this.gj&&k.Tma(this.j,
this.Ma,this.gj)};a.prototype.NR=function(){this.de||(this.de=new n,this.de.jQ([this.Se]),this.de.bind(h.ia,this.Pe,this,!0),this.de.bind(h.$c,this.yh,this,!0),g.GA(this.de,this.fT))};a.prototype.ks=function(){this.de&&(this.de.h(h.ia,this.Pe,this,!0),this.de.h(h.$c,this.yh,this,!0),g.ho(this.de,this.fT),this.de=null)};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource","require tdv/utils tdv/constants/EventName tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/panorama/renderer/object/texturesource/TextureQueue tdv/player/view/panorama/renderer/object/texturesource/TextureSource".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/image/Item"),g=a("tdv/player/view/image/Repository"),k=a("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue"),
e=a("tdv/player/view/panorama/renderer/object/texturesource/TextureSource");a=m.extend(e,function(b){e.call(this);this.Qf=e.sWa;this.Se=b;this.gj=this.vN=this.de=null});a.prototype.yg=function(){return this.gj};a.prototype.qda=function(){this.NR()};a.prototype.A5=function(){this.ks()};a.prototype.pda=function(){this.G_a()};a.prototype.FV=function(){this.ks();this.Iea()};a.prototype.aW=function(){this.ks();this.Iea()};a.prototype.dispose=function(){this.ks();this.Iea();e.prototype.dispose.call(this)};
a.prototype.Pe=function(){this.gj=g.yg(this.Se);this.YM(!0)};a.prototype.yh=function(){this.YM(!1)};a.prototype.$Aa=function(){this.ZAa()};a.prototype.Jia=function(){this.gj&&k.Tma(this.j,this.Ma,this.gj)};a.prototype.NR=function(){this.de||(this.de=new n,this.de.jQ([this.Se]),this.de.bind(h.ia,this.Pe,this,!0),this.de.bind(h.$c,this.yh,this,!0),g.GA(this.de,this.fT))};a.prototype.ks=function(){this.de&&(this.de.h(h.ia,this.Pe,this,!0),this.de.h(h.$c,this.yh,this,!0),g.ho(this.de,this.fT),this.de=
null)};a.prototype.G_a=function(){this.vN=k.add(this.j,this.Ma,this.gj);this.vN.bind(h.ia,this.$Aa,this,!0)};a.prototype.Iea=function(){this.vN&&(this.vN.h(h.ia,this.$Aa,this,!0),this.vN.remove(),this.vN=null)};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource",["require","tdv/utils","tdv/player/view/image/Repository","tdv/player/view/panorama/renderer/3d/util/TextureUtil","tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/image/Repository"),n=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),g=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource");a=m.extend(g,
function(k,e,b,c,d){g.call(this,k.get("url"));this.ec=e;this.fc=b;this.Pa=c;this.Ha=d;this.c4a=this.ec!=0||this.fc!=0||this.Pa!=k.get("width")||this.Ha!=k.get("height")});a.prototype.Pe=function(){this.c4a?(this.M_a(),this.ks(),this.YM(!!this.gj)):g.prototype.Pe.call(this)};a.prototype.FV=function(){g.prototype.FV.call(this);this.Jea()};a.prototype.aW=function(){g.prototype.aW.call(this);this.Jea()};g.prototype.dispose=function(){g.prototype.dispose.call(this);this.Jea()};a.prototype.M_a=function(){var k=
h.yg(this.Se);this.gj=n.Udb(k,this.ec,this.fc,this.Pa,this.Ha)};a.prototype.Jea=function(){this.gj&&(n.Ina(this.gj),this.gj=null)};return a});
define("tdv/player/view/panorama/renderer/object/util/MeshFactory","require tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/constants/EyeLayer tdv/player/view/panorama/renderer/constants/Face tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/Device".split(" "),function(a){var m=
a("tdv/player/parser/ClassInfo"),h=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),n=a("tdv/player/view/panorama/renderer/constants/Face"),g=a("tdv/player/view/panorama/renderer/3d/util/Util"),k=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),b=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource"),c=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
d=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),f=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),l=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),p=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),q=a("tdv/player/view/panorama/renderer/TextureLoader"),r=a("tdv/player/view/util/Device"),t={Fdb:function(u,v){var w=l.get(u);switch(w){case l.VB:case l.Bx:case l.Km:return this.q_a(w,u,v);case l.Pr:case l.Yr:case l.Hu:return this.s_a(w,u,v)}},Xdb:function(u,
v){var w=new e(v.get("posterURL"));w.aZ(!0);return this.oxa(u,v,w)},Wdb:function(u,v){var w=new k;w.aZ(!0);return this.oxa(u,v,w)},oxa:function(u,v,w){var x=u.get("hfov"),y=u.get("vfov"),z=u.get("pitch"),A=v.get("width");v=v.get("url");u=l.get(u);var D=u==l.Hu?2:1,F=u==l.Yr?2:1;u=D+F>2?[h.fb,h.Db]:[h.nx];var C=Math.round(A/D);A=new d.Rp(v);var B=d.st(w.texture(),A);q.iQ(B,w);B.visible=!0;return u.map(function(H,E){E=c.RJa(x,y,z,1,1,E%D/D,(F-1-Math.floor(E/D))/F,1/D,1/F);E=f.create(E,[B]);E.layers.set(H);
q.A$(E,C/x);return E}.bind(this))},Pdb:function(u){var v=[n.Db,n.fb,n.Tc,n.Hc,n.FRONT,n.BACK].map(function(){var x=new k;x.bo(t.J2a(u));var y=d.st(x.texture());q.iQ(y,x);y.visible=!0;return y}),w=c.QJa(1,1);v=f.create(w,v);q.A$(v,256/90);v.layers.set(h.nx);return v},Lka:{},J2a:function(u){if(!t.Lka[u]){var v=document.createElement("canvas");v.width=v.height=256;var w=v.getContext("2d");w.fillStyle=u;w.fillRect(0,0,v.width,v.height);t.Lka[u]=v}return t.Lka[u]},q_a:function(u,v,w){var x=u==l.VB?[h.Db,
h.fb]:[h.nx],y=v.get("flipImageHorizontally");y&&(x=x.reverse());var z=u==l.Km?1:6*x.length,A=w.get("width")/z,D=w.get("height");if(m.Oa("TiledImageResourceLevel",w)){var F=w.get("colCount",z)/z;var C=w.get("rowCount",1)}else this.gEa(u,w)?(F=Math.ceil(A/g.Jx()),C=Math.ceil(D/g.Jx())):C=F=1;var B=[n.Db,n.fb,n.Tc,n.Hc,n.FRONT,n.BACK];return x.map(function(H,E){var G=Array(6);B.forEach(function(R,Q){var K=p.qoa(v,w,R);m.Oa("TiledImageResourceLevel",w)?G[c.Gua.indexOf(R)]=this.m_a(K,u,H,R,y,F,C):G[c.Gua.indexOf(R)]=
this.ixa(K,F,C,u==l.Km?0:Math.round((E*B.length+Q)*A),0,A,D,F>1||C>1||u!=l.Km?A>256?1:.5:0)}.bind(this));var N=Array.prototype.concat.apply([],G),O=c.QJa(F,C);N=f.create(O,N);N.layers.set(H);q.A$(N,A/90);return N}.bind(this))},s_a:function(u,v,w){var x=u==l.Pr?[h.nx]:[h.fb,h.Db];v.get("flipImageHorizontally")&&(x=x.reverse());var y=w.get("width"),z=w.get("height"),A=v.get("hfov"),D=v.get("vfov"),F=v.get("pitch"),C=Math.round(y/A/(z/D)),B=Math.round(y/C),H=Math.round(z/Math.round(z/D/(y/A))),E=(u=
this.gEa(u,w))?Math.ceil(B/g.Jx()):1,G=u?Math.ceil(H/g.Jx()):1;return x.map(function(N,O){O=this.ixa(w,E,G,O%C*B,Math.floor(O/C)*H,B,H);var R=c.RJa(A,D,F,E,G,0,0,1,1);O=f.create(R,O);O.layers.set(N);q.A$(O,B/A);return O}.bind(this))},gEa:function(u,v){switch(u){case l.VB:case l.Bx:case l.Yr:case l.Hu:return!0;case l.Km:return!1;case l.Pr:return r.qgb().maxTextureSize<Math.max(v.get("width"),v.get("height"))?!0:g.gr()||r.ub()?!1:r.Dc()==r.zB?!0:!1}},ixa:function(u,v,w,x,y,z,A,D){D||(D=0);for(var F=
[],C=0;C<w;C++)for(var B=y+D+(A-2*D)*C/w,H=y+D+(A-2*D)*(C+1)/w,E=0;E<v;E++){var G=x+D+(z-2*D)*E/v,N=x+D+(z-2*D)*(E+1)/v;G=u?new b(u,G,B,N-G,H-B):new k;N=d.wna(G.texture());q.iQ(N,G);F.push(N)}return F},m_a:function(u,v,w,x,y,z,A){for(var D=[],F=0;F<A;F++)for(var C=0;C<z;C++){var B=u?new e(p.WLa(u,v,w,x,y,A,F,C)):new k;var H=d.wna(B.texture());q.iQ(H,B);H.visible=!1;D.push(H)}return D}};return t});
define("tdv/player/view/panorama/renderer/object/SolidFrame","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Frame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/TextureLoader".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Frame"),g=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),
k=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),e=a("tdv/player/view/panorama/renderer/TextureLoader");a=m.extend(n,function(b){n.call(this);this.Ne=b;this.set("tag","SolidFrame");this.Nh=null});a.prototype.hc=function(){this.Nh=(new g(h.ia)).ko(this.Pe.bind(this));n.prototype.hc.call(this)};a.prototype.mc=function(){this.Nh.dispose();n.prototype.mc.call(this)};a.prototype.hq=function(){var b=[k.Pdb(this.Ne)];e.hB(b,e.Au);e.gB(b,e.Or);this.Nh.jg(b);return b};a.prototype.Pe=function(){this.o(h.vd);
this.o(h.ia)};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeInVR","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/object/SolidFrame tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/object/SolidFrame"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a("tdv/player/view/util/XR");
a=m.extend(h,function(e,b,c,d){h.call(this,e,b,c,d);this.la=null;this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(e){if(!this.Sb){this.H.Hm||(this.H.Hm=new n("#000000"),this.H.Hm.set("alpha",1),this.j.add(this.H.Hm));if(!this.la){this.H.Hm.yi();var b=this.H.ena*2;this.la=new g("linear",[new k("alpha",2,0,void 0)],b);this.H.Hm.yi()}this.la.Nb(e);this.H.Hm.set("alpha",Math.min(.99,this.la.ob("alpha")));this.j.Jf(this.H.Sc).set("alpha",1);this.la&&this.la.Ve()&&(this.Sb=
!0,this.j.remove(this.H.Hm),this.H.Hm=null)}};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeOut","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/3d/util/Util tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/3d/util/Util"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a=m.extend(h,function(e,b,c,d){h.call(this,e,
b,c,d);this.fj=this.j.P.Fc();this.la=null;this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(e){if(!this.Sb){if(!this.la){n.I$(!0);this.fj.cF();this.H.Va()||this.j.Jf(this.H.qh).set("alpha",0);var b=this.H.bKa;this.la=new g("linear",[new k("position",0,1,void 0)],b)}this.j.P.PX(this.j)||this.j.F$(!0);this.la.Nb(e);this.fj.QE(this.la.ob("position"));this.la.Ve()&&(this.Sb=!0,this.fj.VD(),this.H.Va()?this.j.Jf(this.H.qh).set("alpha",0):this.j.F$(!1),n.I$(!1))}};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeOutVR","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/object/SolidFrame tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/object/SolidFrame"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a("tdv/player/view/util/XR");
a=m.extend(h,function(e,b,c,d){h.call(this,e,b,c,d);this.la=null;this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(e){if(!this.Sb){this.H.Hm||(this.H.Hm=new n("#000000"),this.H.Hm.set("alpha",0),this.j.add(this.H.Hm));if(!this.la){this.H.Hm.yi();var b=this.H.bKa*2;this.la=new g("linear",[new k("alpha",0,2,void 0)],b)}this.la.Nb(e);e=Math.min(1,this.la.ob("alpha"));this.H.Hm.set("alpha",e);e==1&&this.j.Jf(this.H.qh).set("alpha",0);this.la.Ve()&&(this.Sb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.la=null;this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=
function(k){if(!this.Sb){if(!this.la){var e=this.j.jf(),b=this.Uc.g$(this.H.Sc,e),c=!this.H.Va()&&Math.abs(e-b)>.01?this.H.Caa:1;this.la=new n("cubic_in_out",[new g("hfov",e,b,void 0)],c)}this.la.Nb(k);this.Uc.sr(this.la.ob("hfov"));this.la.Ve()&&(this.Uc.cZ(!0),this.Sb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){function m(e,b,c){for(;e<b;)e+=c-b;for(;e>c;)e-=c-b;return e}var h=a("tdv/utils"),n=a("tdv/player/view/panorama/control/transition/steps/Step"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a=h.extend(n,function(e,b,c,d){n.call(this,e,b,c,d);this.la=null;this.Sb=
!1;this.X2=0});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(e){this.Sb||(this.la||(this.la=this.X2<this.H.br.length?this.C_a(this.X2):this.h_a()),this.la.Nb(e),this.Uc.zra(this.la.ob("yaw"),this.la.ob("pitch")),this.Uc.sr(this.la.ob("hfov")),this.Uc.uK(this.la.ob("stereographicFactor")),this.la.Ve()&&(this.la=null,this.X2++,this.X2>this.H.br.length&&(this.Uc.cZ(!0),this.Sb=!0)))};a.prototype.h_a=function(){var e=m(this.j.Kc(),-180,180),b=this.j.Jc();this.j.zg();var c=this.j.jf(),
d=this.j.I.Jk,f=this.H.Eh.get("hfov");f={Xa:this.H.Eh.get("yaw"),pitch:this.H.Eh.get("pitch",b),Mg:this.j.zg(),Wd:f?this.Uc.kJ(f):c,Jk:0};this.Uc.gkb(this.H.Sc,f);f.Xa=m(f.Xa,e-180,e+180);var l=Math.abs(c-f.Wd)>.5,p=Math.abs(d-f.Jk),q=p>.01;l=this.H.Va()?1:Math.max(l?this.H.Caa:1,q?this.H.jPa*p:1);return new g(q?"linear":"cubic_in_out",[new k("yaw",e,f.Xa,void 0),new k("pitch",b,f.pitch,void 0),new k("hfov",c,f.Wd,void 0),new k("stereographicFactor",d,f.Jk,void 0)],l)};a.prototype.C_a=function(e){var b=
this.H.br[e],c=m(this.j.Kc(),-180,180),d=this.j.Jc();this.j.zg();var f=this.j.jf(),l=this.j.I.Jk,p=b.get("targetStereographicFactor",l),q=b.get("targetHfov");if(q)q=this.Uc.kJ(q);else{for(q=!1;e<this.H.br.length&&!q;e++)q=this.H.br[e].get("targetHfov")!==void 0;q?q=f:(q=this.Uc.kJ(this.H.Eh.get("hfov",this.Uc.XJa())),q=f+(q-f)*(l-p))}e=b.get("targetYaw",c);var r=b.get("targetPitch",d);this.j.zg();switch(b.get("path")){case "left":e=m(e,c-360,c);break;case "right":e=m(e,c,c+360);break;case "longest":e=
m(e,-360,360);e=e>=c?m(e,c,c+360):m(e,c-360,c);break;default:e=m(e,c-180,c+180)}return new g(b.get("easing"),[new k("yaw",c,e,b.get("yawSpeed")),new k("pitch",d,r,b.get("pitchSpeed")),new k("hfov",f,q,b.get("hfovSpeed")),new k("stereographicFactor",l,p,b.get("stereographicFactorSpeed"))],b.get("duration"))};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.la=null;this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=
function(k){if(!this.Sb){if(!this.la){var e=this.j.Jc(),b=this.j.jf(),c=this.j.I.Jk,d=this.H.fg.get("stereographicFactor",0),f=Math.abs(c-d),l=d>0?this.H.fg.get("pitch",e):e,p=this.H.fg.get("hfov");p=p?this.Uc.kJ(p):b;d==0&&(p=Math.min(b,this.Uc.g$(this.H.Sc,p)));this.Uc.cZ(!1);f=this.H.Va()?1:Math.max(Math.abs(b-p)>.5?this.H.Caa:1,f>.01?this.H.jPa:1);this.la=new n("cubic_in_out",[new g("hfov",b,p,void 0),new g("pitch",e,l,void 0),new g("stereographicFactor",c,d,void 0)],f)}this.la.Nb(k);this.Uc.sr(this.la.ob("hfov"));
this.Uc.uK(this.la.ob("stereographicFactor"));this.Uc.zra(this.j.Kc(),this.la.ob("pitch"));this.la.Ve()&&(this.Uc.Wf(this.H.Sc,this.H.fg.get("yaw"),this.H.fg.get("pitch",this.j.Jc())),this.Sb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.la=null;this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=
function(k){if(!this.Sb){if(!this.la){var e=this.j.jf(),b=Math.min(this.Uc.g$(this.H.Sc,e),e),c=!this.H.Va()&&Math.abs(e-b)>.01?this.H.Caa:1;this.la=new n("cubic_in_out",[new g("hfov",e,b,void 0)],c);this.Uc.cZ(!1)}this.la.Nb(k);this.Uc.sr(this.la.ob("hfov"));this.la.Ve()&&(this.Uc.Wf(this.H.Sc,this.j.Kc()+this.H.uQ.fLa(),this.j.Jc()),this.Sb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/Remove",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=this.j.Jf(this.H.qh);this.j.remove(n)};return a});
define("tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=(this.H.nc||this.H.Gc).get("model");n.set("objects",n.get("objects").filter(function(g){return g!=this.H.Ce}.bind(this)));
[this.H.Ce.get("sourceCubeTexture"),this.H.Ce.get("targetCubeTexture")].forEach(function(g){g&&g.dispose()});this.H.Ce=null};return a});
define("tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.j.P.release(this.j)};return a});
define("tdv/player/view/panorama/control/transition/steps/RequestViewerArea",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=[this.j.ld];this.h4a()&&n.push(this.H.Zh);this.j.ld.hK(n)};a.prototype.h4a=function(){return this.H.Gc?!0:this.j.ld.get("keepModel3DLoadedWithoutLocation")&&
this.H.qh&&this.H.Zh&&this.H.Zh.get("model")?!0:!1};return a});
define("tdv/player/view/panorama/control/transition/steps/RestoreModelPosition",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){return function(n){function g(k,e,b,c){return n.call(this,k,e,b,c)||this}P(g,n);g.prototype.Ch=function(){var k,e,b;(b=(e=(k=this.H.Zh)===null||k===void 0?void 0:k.get("model"))===null||e===void 0?void 0:e.get("camera"))===null||b===void 0||b.bkb()};return g}(h)});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.Uc.Wf(this.H.Sc,this.H.Eh.get("yaw"),this.H.Eh.get("pitch",this.j.Jc()));var n=this.H.Eh.get("hfov");n&&(n=this.Uc.kJ(n),this.Uc.sr(n))};
return a});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel",["require","tdv/utils","tdv/player/view/util/geo/Fov","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils");a("tdv/player/view/util/geo/Fov");var h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=this.H.Gc.get("model").get("camera");if(this.H.AK.get("keepInitialPositionOnTranslation")){var g=this.H.Eh.get("yaw");
n=this.H.Eh.get("pitch")}else g=n.get("yaw")-this.H.Gc.get("yaw"),n=this.H.AK.get("enterPointingToHorizon")?0:n.get("pitch");this.Uc.Wf(this.H.Sc,g,n);if(g=this.H.Eh.get("hfov"))g=this.Uc.kJ(g),this.Uc.sr(g)};return a});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel",["require","tdv/utils","tdv/player/view/util/geo/Quaternion","tdv/player/view/util/XR","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/util/geo/Quaternion"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(g,function(k,e,b,c){g.call(this,k,e,b,c)});a.prototype.Ch=
function(){if(n.isPresenting){var k=h.jaa(n.wg,!0);this.H.Gc.get("model").get("camera");var e=k.Xa-this.H.Gc.get("yaw");k=k.pitch}else this.H.AK.get("keepInitialPositionOnTranslation")?(e=this.H.Eh.get("yaw"),k=this.H.Eh.get("pitch")):(k=this.H.Gc.get("model").get("camera"),e=k.get("yaw")-this.H.Gc.get("yaw"),k=k.get("pitch"));this.Uc.Wf(this.H.Sc,e,k)};return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition",["require","tdv/utils","tdv/constants/EventName","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(n,function(g,k,e,b){n.call(this,g,k,e,b);this.Fa=null;this.Sb=!1});a.prototype.o5a=function(){this.Sb=!0};a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(){if(!this.Fa&&
(this.Fa=this.H.nc.get("model"),this.H.Zh.get("model")==this.Fa)){var g=this.Fa.get("camera");g.set("easing",0);g.set("x",this.H.nc.get("x"));g.set("y",this.H.nc.get("y"));g.set("z",this.H.nc.get("z"));g.set("yaw",this.j.Kc()+this.H.nc.get("yaw"));g.set("pitch",this.j.Jc());g.set("fov",this.j.nb()>this.j.Mb()?this.j.gP():this.j.hP());this.Fa.bind(h.Zd,this.o5a,this,!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelInTransition",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){a=function(n){function g(k,e,b,c,d){k=n.call(this,k,e,b,c)||this;k.value=!1;k.value=d;return k}P(g,n);g.prototype.Ch=function(){var k,e=(k=this.H.nc||this.H.Gc||this.H.Zh)===null||k===void 0?void 0:k.get("model");e&&e.get("camera").set("inTransition",this.value)};return g}(h);m=function(n){function g(k,e,b,c){return n.call(this,
k,e,b,c,!0)||this}P(g,n);return g}(a);a.Qi=m;m=function(n){function g(k,e,b,c){return n.call(this,k,e,b,c,!1)||this}P(g,n);return g}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){a=function(n){function g(k,e,b,c,d){k=n.call(this,k,e,b,c)||this;k.enabled=!1;k.enabled=d;return k}P(g,n);g.prototype.Ch=function(){var k;(k=this.H.Zh)===null||k===void 0||k.j.Ra(this.enabled)};return g}(h);m=function(n){function g(k,e,b,c){return n.call(this,k,e,b,c,!0)||this}P(g,n);return g}(a);a.Qi=m;m=function(n){function g(k,
e,b,c){return n.call(this,k,e,b,c,!1)||this}P(g,n);return g}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){a=function(n){function g(k,e,b,c,d){k=n.call(this,k,e,b,c)||this;k.paused=!1;k.paused=d;return k}P(g,n);g.prototype.Ch=function(){var k,e=(k=this.H.Gc||this.H.nc||this.H.Zh)===null||k===void 0?void 0:k.get("model");e&&this.H.Zh.j.xRa(e,!this.paused)};return g}(h);m=function(n){function g(k,e,b,c){return n.call(this,
k,e,b,c,!0)||this}P(g,n);return g}(a);a.Qi=m;m=function(n){function g(k,e,b,c){return n.call(this,k,e,b,c,!1)||this}P(g,n);return g}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/SetMinFaceSize",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep","tdv/player/view/panorama/control/transition/TransitionData"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),n=a("tdv/player/view/panorama/control/transition/TransitionData");a=m.extend(h,function(g,k,e,b){h.call(this,g,k,e,b)});a.prototype.Ch=function(){this.H.Sc&&(this.H.mode==
n.rca||this.H.mode==n.sca?this.H.Sc.set("minFaceSize",1024):this.H.Sc.set("minFaceSize",void 0))};return a});
define("tdv/player/view/panorama/control/transition/steps/SetOriginPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep","tdv/player/view/util/XR"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),n=a("tdv/player/view/util/XR");a=m.extend(h,function(g,k,e,b){h.call(this,g,k,e,b)});a.prototype.Ch=function(){var g=this.H.csa?this.H.fg.get("stereographicFactor",0):0;this.Uc.uK(g);this.Uc.Wf(this.H.Sc,
this.H.fg.get("yaw"),this.H.fg.get("pitch",this.j.Jc()));this.H.Va()&&n.mK(this.H.fg.get("yaw"));(g=this.H.fg.get("hfov"))||this.H.qh||(g=this.Uc.XJa());g&&(g=this.Uc.kJ(g),this.Uc.sr(g),this.Uc.cZ(!this.H.csa))};return a});
define("tdv/player/view/panorama/control/transition/steps/SetRenderingPaused",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){a=function(n){function g(k,e,b,c,d){k=n.call(this,k,e,b,c)||this;k.paused=!1;k.paused=d;return k}P(g,n);g.prototype.Ch=function(){this.j.F$(this.paused)};return g}(h);m=function(n){function g(k,e,b,c){return n.call(this,k,e,b,c,!0)||this}P(g,n);return g}(a);a.Qi=m;m=function(n){function g(k,e,b,c){return n.call(this,
k,e,b,c,!1)||this}P(g,n);return g}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/SetTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=this.Uc.g$(this.H.Sc,this.j.jf());this.Uc.sr(n);this.Uc.Wf(this.H.Sc,this.j.Kc()+this.H.uQ.fLa(),this.j.Jc())};return a});
define("tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible",["require","exports","tdv/player/view/panorama/control/transition/steps/Step","tdv/player/view/util/XR"],function(a,m,h,n){a=function(g){function k(e,b,c,d,f){e=g.call(this,e,b,c,d)||this;e.value=!1;e.ended=!1;e.wait=!1;e.mh=function(){return this.ended};e.value=f;e.value||(e.wait=!0);return e}P(k,g);k.prototype.Yg=function(){n.ud.forEach(function(e){n.vlb(e,!this.value)}.bind(this));this.wait?this.wait=!1:this.ended=
!0};return k}(h);m=function(g){function k(e,b,c,d){return g.call(this,e,b,c,d,!0)||this}P(k,g);return k}(a);a.Qi=m;m=function(g){function k(e,b,c,d){return g.call(this,e,b,c,d,!1)||this}P(k,g);return k}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/RestoreViewerAreaToModelPlayer",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.H.nc&&this.H.Zh.get("model")==this.H.nc.get("model")&&this.j.ld.hK([this.H.Zh])};return a});
define("tdv/player/view/panorama/control/transition/steps/Translate",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/player/view/panorama/renderer/3d/util/Util","tdv/player/view/util/Device"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/3d/util/Util"),g=a("tdv/player/view/util/Device");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.I="not initialized";this.Wb=0});
a.prototype.mh=function(){return this.I=="ended"};a.prototype.Yg=function(k){this.mh()||(this.I=="not initialized"&&this.KS(),this.I=="initialized"&&(this.Nq.get("ready")||this.Nq.Zoa())&&this.BV(),this.I=="started"&&this.za(k),this.Wb>=1&&this.aS())};a.prototype.KS=function(){this.ADa=this.H.$Sa;this.Z_=.25;this.KYa=.75;this.V6a=.25;this.kGa=this.P2a();this.Lca=.5*this.ADa;this.fab=this.ADa-2*this.Lca;this.GH=1/(this.Lca+this.fab);this.N_=this.GH/this.Lca;this.Lz=0;this.Nq=this.j.Jf(this.H.Sc);this.Oka=
this.j.Jf(this.H.qh);this.eM=this.H.uQ.pfb();this.I="initialized"};a.prototype.P2a=function(){var k=this.H.uQ.get("distance");return k?Math.min(.99,k/this.H.qh.get("distanceToFloor")):.75};a.prototype.BV=function(){this.j.yRa(!this.H.Va()&&g.Tb()!=g.Yj);this.Nq.yi();this.I="started"};a.prototype.za=function(k){this.Nq.get("ready")&&n.I$(!0);this.Nq.get("ready")||this.Wb<this.V6a?this.Wb>=1-.5*this.Lz*this.Lz/this.N_?this.Lz=Math.sqrt(2*(1-this.Wb)*this.N_):this.Lz<this.GH&&(this.Lz=Math.min(this.Lz+
this.N_*k,this.GH)):this.Lz=Math.max(this.Lz-this.N_*k,0);this.Wb=Math.min(Math.max(0,this.Wb+this.Lz*k),1);this.Nq.get("ready")||(this.Z_=Math.max(this.Z_,this.Wb));this.d6(this.Wb,Math.max(0,Math.min(1,(this.Wb-this.Z_)/(this.KYa-this.Z_))))};a.prototype.aS=function(){this.Nq.set("alpha",1);this.j.yRa(!1);this.I="ended";n.I$(!1)};a.prototype.d6=function(k,e){var b=(k-1)*this.kGa;this.Nq.set("translationX",b*this.eM.x);this.Nq.set("translationY",b*this.eM.y);this.Nq.set("translationZ",b*this.eM.z);
this.Nq.get("ready");k*=this.kGa;this.Oka.set("translationX",k*this.eM.x);this.Oka.set("translationY",k*this.eM.y);this.Oka.set("translationZ",k*this.eM.z);this.Nq.set("alpha",Math.max(.01,Math.min(.99,e)))};return a});
define("tdv/player/script/TargetModel3DCameraMovement",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCameraMovement"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCameraMovement");return m.define("TargetModel3DCameraMovement",h,function(){h.call(this)})});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/script/Model3DCameraSequence"),k=a("tdv/player/script/TargetModel3DCameraMovement"),
e=a("tdv/player/view/panorama/control/transition/steps/Step"),b=a("tdv/player/view/util/XR");a=m.extend(e,function(d,f,l,p){e.call(this,d,f,l,p);this.Ys=this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(){this.H.Zh.get("model")!=this.H.nc.get("model")?this.rv():this.Zb?this.Zb.get("state")==n.ca&&setTimeout(function(){this.rv()}.bind(this),10):this.Ys||(this.Ys=!0,this.Hka(),this.rV())};a.prototype.Hka=function(){var d=this.H.nc.get("model").get("camera");this.zja=d.get("sequences").find(function(q){return q.get("state")===
n.PLAYING});var f=d.UN;f||(f={x:d.get("initialX",d.get("x")),y:d.get("initialY",d.get("y")),z:d.get("initialZ",d.get("z")),yaw:d.get("initialYaw",d.get("yaw")),pitch:d.get("initialPitch",d.get("pitch")),fov:d.get("initialFov",d.get("fov")),distance:d.get("initialDistance",d.get("distance"))});d.set("easing",0);d.set("x",this.H.nc.get("x"));d.set("y",this.H.nc.get("y"));d.set("z",this.H.nc.get("z"));d.set("distance",0);b.isPresenting||d.set("yaw",this.j.Kc()+this.H.nc.get("yaw"));d.set("pitch",this.j.Jc());
d.set("fov",this.j.nb()>this.j.Mb()?this.j.gP():this.j.hP());var l=[];if(this.H.qE){if(!this.H.Va()){var p=new k;p.set("duration",this.H.c8);p.set("easing","linear");p.bind(h.Zd,this.nia,this,!0);this.mfa=p;l.push(p)}this.H.Ce.set("sourceAlpha",1)}else this.H.Ce.set("sourceAlpha",.99);this.me=new k;this.me.set("targetX",f.x);this.me.set("targetY",f.y);this.me.set("targetZ",f.z);b.isPresenting||this.me.set("targetYaw",f.yaw);this.me.set("targetPitch",f.pitch);this.me.set("targetFov",f.fov);this.me.set("targetDistance",
f.distance);this.me.set("duration",this.H.bjb);this.me.set("easing","quad_in_out");this.me.bind(h.Zd,this.zia,this,!0);l.push(this.me);this.Zb=new g;this.Zb.set("movements",l);this.Zb.set("mandatory",!0);this.Zb.set("internal",!0);this.Zb.bind(h.Ub,this.rv,this,!0);d.set("sequences",d.get("sequences").concat([this.Zb]));this.Zb.play();this.JV=(new THREE.Vector3).set(f.x,f.y,f.z);this.AD=(new THREE.Vector3).set(this.H.nc.get("x"),this.H.nc.get("y"),this.H.nc.get("z"))};a.prototype.nia=function(){var d=
this.mfa.get("position");this.H.Ce.set("sourceAlpha",1-d);this.H.Ce.set("targetAlpha",0)};a.prototype.zia=function(){if(this.H.qE)this.H.Ce.set("sourceAlpha",0),this.H.Ce.set("targetAlpha",0);else{var d=this.uS();this.H.Ce.set("sourceAlpha",1-Math.max(.01,Math.min(.99,(d-0)/.33)))}};var c=new THREE.Vector3;a.prototype.uS=function(){var d=this.H.nc.get("model").get("camera");return c.set(d.get("x"),d.get("y"),d.get("z")).distanceTo(this.AD)/this.AD.distanceTo(this.JV)};a.prototype.rv=function(){if(!this.Sb){var d=
this.H.nc.get("model").get("camera");d.set("sequences",d.get("sequences").filter(function(f){return f!=this.Zb}.bind(this)));this.zja&&d.get("sequences").includes(this.zja)&&this.zja.play();this.Sb=!0;this.ZU()}};a.prototype.rV=function(){var d=this.H.nc.get("model");this.MU=d.get("postprocessing");this.NU=d.get("surfaceSelectionEnabled");d.set("postprocessing",!1);d.set("surfaceSelectionEnabled",!1)};a.prototype.ZU=function(){var d=this.H.nc.get("model"),f=this.MU,l=this.NU;setTimeout(function(){d.set("postprocessing",
f);d.set("surfaceSelectionEnabled",l)},30)};return a});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas","require tdv/utils tdv/constants/EventName tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/script/Model3DCameraSequence"),g=a("tdv/player/script/TargetModel3DCameraMovement"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),
e=a("tdv/player/view/util/XR");a=m.extend(k,function(c,d,f,l){k.call(this,c,d,f,l);this.Sb=this.Ys=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(){this.H.Zh.get("model")!=this.H.Gc.get("model")?this.hCa():this.Ys||(this.Ys=!0,this.s9a(),this.rV())};a.prototype.s9a=function(){var c=this.H.Gc.get("model").get("camera");c.set("easing",0);c.set("x",this.H.nc.get("x"));c.set("y",this.H.nc.get("y"));c.set("z",this.H.nc.get("z"));c.set("distance",0);e.isPresenting||c.set("yaw",this.j.Kc()+
this.H.nc.get("yaw"));c.set("pitch",this.j.Jc());c.set("fov",this.j.nb()>this.j.Mb()?this.j.gP():this.j.hP());var d=[];if(this.H.qE){var f=new g;f.set("duration",this.H.c8);f.set("easing","linear");f.bind(h.Zd,this.nia,this,!0);this.mfa=f;d.push(f);this.H.Ce.set("skyBox",!1);this.H.Ce.set("nearPlane",!0);this.H.Ce.set("sourceAlpha",1);this.H.Ce.set("targetAlpha",0)}else this.H.Ce.set("skyBox",!0),this.H.Ce.set("nearPlane",!1),this.H.Ce.set("targetAlpha",.01),this.H.Ce.set("sourceAlpha",.99);this.me=
new g;this.me.set("targetX",this.H.Gc.get("x"));this.me.set("targetY",this.H.Gc.get("y"));this.me.set("targetZ",this.H.Gc.get("z"));this.H.AK.get("keepInitialPositionOnTranslation")&&(e.isPresenting||(f=this.H.Eh.get("yaw")+this.H.Gc.get("yaw"),this.me.set("targetYaw",f)),f=this.H.Eh.get("pitch"),f!==void 0&&this.me.set("targetPitch",f),f=this.H.Eh.get("hfov"),f!==void 0&&this.me.set("targetFov",f));this.me.set("duration",1500);this.me.set("easing","cubic_in_out");this.me.bind(h.Zd,this.p5a,this,
!0);d.push(this.me);this.H.qE&&(f=new g,f.set("duration",this.H.c8),f.set("easing","linear"),f.bind(h.Zd,this.mia,this,!0),this.lfa=f,d.push(f));this.Zb=new n;this.Zb.set("movements",d);this.Zb.set("mandatory",!0);this.Zb.set("internal",!0);this.Zb.bind(h.Ub,this.hCa,this,!0);c.set("sequences",c.get("sequences").concat([this.Zb]));this.Zb.play();this.AD=(new THREE.Vector3).set(this.H.nc.get("x"),this.H.nc.get("y"),this.H.nc.get("z"));this.JV=(new THREE.Vector3).set(this.H.Gc.get("x"),this.H.Gc.get("y"),
this.H.Gc.get("z"))};a.prototype.p5a=function(){if(this.H.qE)this.H.Ce.set("sourceAlpha",0),this.H.Ce.set("targetAlpha",0);else{var c=this.uS();this.H.Ce.set("targetAlpha",Math.max(.01,Math.min(.99,c-0)));this.H.Ce.set("sourceAlpha",1)}};var b=new THREE.Vector3;a.prototype.uS=function(){var c=this.H.nc.get("model").get("camera");return b.set(c.get("x"),c.get("y"),c.get("z")).distanceTo(this.AD)/this.AD.distanceTo(this.JV)};a.prototype.nia=function(){var c=this.mfa.get("position");this.H.Ce.set("sourceAlpha",
1-c);this.H.Ce.set("targetAlpha",0)};a.prototype.mia=function(){var c=this.lfa.get("position");this.H.Ce.set("sourceAlpha",0);this.H.Ce.set("targetAlpha",c)};a.prototype.hCa=function(){var c=this.H.nc.get("model").get("camera");c.set("sequences",c.get("sequences").filter(function(d){return d!=this.Zb}.bind(this)));this.ZU();this.Sb=!0};a.prototype.rV=function(){var c=this.H.nc.get("model"),d=this.H.Zh;this.MU=c.get("postprocessing");this.NU=c.get("surfaceSelectionEnabled");this.I6a=d.get("spritesEnabled");
c.set("postprocessing",!1);c.set("surfaceSelectionEnabled",!1);d.set("spritesEnabled",!1)};a.prototype.ZU=function(){var c=this.H.nc.get("model"),d=this.H.Zh,f=this.MU,l=this.NU,p=this.I6a;setTimeout(function(){c.set("postprocessing",f);c.set("surfaceSelectionEnabled",l);d.set("spritesEnabled",p)},500)};return a});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/geo/Fov tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/script/Model3DCameraSequence"),
k=a("tdv/player/script/TargetModel3DCameraMovement"),e=a("tdv/player/view/panorama/control/transition/steps/Step"),b=a("tdv/player/view/util/geo/Fov"),c=a("tdv/player/view/util/XR");a=m.extend(e,function(f,l,p,q){e.call(this,f,l,p,q);this.Ys=this.Sb=!1});a.prototype.mh=function(){return this.Sb};a.prototype.Yg=function(){this.Zb?this.Zb.get("state")==n.ca&&setTimeout(function(){this.rv()}.bind(this),10):this.Ys||(this.Ys=!0,this.Hka(),this.rV())};a.prototype.Hka=function(){var f=this.H.Gc.get("model").get("camera");
f.Dmb();var l=Math.abs(f.get("pitch")-this.j.Jc()),p=l>30;this.me=new k;this.me.set("targetX",this.H.Gc.get("x"));this.me.set("targetY",this.H.Gc.get("y"));this.me.set("targetZ",this.H.Gc.get("z"));this.me.set("targetDistance",0);this.me.set("targetFov",this.d3a(this.j.jf()));c.isPresenting||this.me.set("targetYaw",this.j.Kc()+this.H.Gc.get("yaw"));p?this.me.set("targetPitch",f.get("pitch")):this.me.set("targetPitch",this.j.Jc());this.me.set("duration",this.H.dib);this.me.set("easing","cubic_in_out");
this.me.bind(h.Zd,this.zia,this,!0);var q=[this.me];p&&(p=new k,p.set("targetPitch",this.j.Jc()),p.set("duration",l/90*1E3),p.set("easing","quad_in_out"),q.push(p));this.H.qE?(this.H.Va()||(l=new k,l.set("duration",this.H.c8),l.set("easing","linear"),l.bind(h.Zd,this.mia,this,!0),this.lfa=l,q.push(l)),this.H.Ce.set("targetAlpha",0)):this.H.Ce.set("targetAlpha",.01);this.Zb=new g;this.Zb.set("movements",q);this.Zb.set("mandatory",!0);this.Zb.set("internal",!0);this.Zb.bind(h.Ub,this.rv,this,!0);f.set("sequences",
f.get("sequences").concat([this.Zb]));this.Zb.play();this.AD=(new THREE.Vector3).set(f.get("x"),f.get("y"),f.get("z"));this.JV=(new THREE.Vector3).set(this.H.Gc.get("x"),this.H.Gc.get("y"),this.H.Gc.get("z"))};a.prototype.d3a=function(f){return this.j.nb()<this.j.Mb()?b.wm(f,this.j.nb(),this.j.Mb()):f};a.prototype.zia=function(){if(!this.Sb&&!this.H.qE){var f=this.uS();this.H.Ce.set("targetAlpha",Math.max(.01,Math.min(.99,(f-.66)/(1-.66))))}};var d=new THREE.Vector3;a.prototype.uS=function(){var f=
this.H.Gc.get("model").get("camera");return d.set(f.get("x"),f.get("y"),f.get("z")).distanceTo(this.AD)/this.AD.distanceTo(this.JV)};a.prototype.mia=function(){var f=this.lfa.get("position");this.H.Ce.set("targetAlpha",f)};a.prototype.rv=function(){this.Sb||this.P0a()};a.prototype.P0a=function(){var f=this.H.Gc.get("model").get("camera");f.set("sequences",f.get("sequences").filter(function(l){return l!=this.Zb}.bind(this)));this.Sb=!0;this.Zb=null;this.ZU();this.j.Jf(this.H.Sc).set("alpha",1)};a.prototype.rV=
function(){var f=this.H.Gc.get("model");this.MU=f.get("postprocessing");this.NU=f.get("surfaceSelectionEnabled");f.set("postprocessing",!1);f.set("surfaceSelectionEnabled",!1)};a.prototype.ZU=function(){var f=this.H.Gc.get("model"),l=this.MU,p=this.NU;setTimeout(function(){f.set("postprocessing",l);f.set("surfaceSelectionEnabled",p)},30)};return a});
define("tdv/player/view/panorama/control/transition/steps/TriggerEvent",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e,b){h.call(this,n,g,k,e);this.dZa=b});a.prototype.Ch=function(){this.dZa.call(this.U)};return a});
define("tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.mh=function(){var n=this.j.Xb(),g=n&&n.hO;n=n&&n.NM;return!!g&&!g.get("visible")&&!!n&&!n.get("visible")};return a});
define("tdv/player/view/panorama/control/transition/steps/WaitReady",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=m.extend(h,function(g,k,e,b){h.call(this,g,k,e,b);this.Cz=null});n.prototype.mh=function(){this.Cz||(this.Cz=this.H.Sc&&this.j.Jf(this.H.Sc));return this.Cz&&this.Cz.get("ready")};n.prototype.QX=function(){return!0};n.DVa=m.extend(n,function(g,k,e,b){n.call(this,
g,k,e,b)});n.DVa.prototype.QX=function(){return!1};n.KVa=m.extend(n,function(g,k,e,b){n.call(this,g,k,e,b)});n.KVa.prototype.mh=function(){this.Cz||(this.Cz=this.H.Sc&&this.j.Jf(this.H.Sc));return this.Cz&&(this.Cz.get("ready")||this.Cz.yqa())};return n});
define("tdv/player/view/panorama/control/transition/steps/WaitViewerAreaAcquiredInExclusive",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e);this.Bva=!1;this.j.P.Tsa(this.j,this.W5a.bind(this))});a.prototype.mh=function(){return this.Bva};a.prototype.W5a=function(){this.Bva=!0};a.prototype.QX=function(){return!0};return a});
define("tdv/player/view/panorama/control/transition/Controller","require tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/transition/PositionController tdv/player/view/panorama/control/transition/TransitionData tdv/player/view/panorama/control/transition/steps/Blend tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel tdv/player/view/panorama/control/transition/steps/EnforceAdded tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded tdv/player/view/panorama/control/transition/steps/RequestMediaActivation tdv/player/view/panorama/control/transition/steps/Display tdv/player/view/panorama/control/transition/steps/FadeIn tdv/player/view/panorama/control/transition/steps/FadeInVR tdv/player/view/panorama/control/transition/steps/FadeOut tdv/player/view/panorama/control/transition/steps/FadeOutVR tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition tdv/player/view/panorama/control/transition/steps/Remove tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea tdv/player/view/panorama/control/transition/steps/RequestViewerArea tdv/player/view/panorama/control/transition/steps/RestoreModelPosition tdv/player/view/panorama/control/transition/steps/SetInitialPosition tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition tdv/player/view/panorama/control/transition/steps/SetModelInTransition tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused tdv/player/view/panorama/control/transition/steps/SetMinFaceSize tdv/player/view/panorama/control/transition/steps/SetOriginPosition tdv/player/view/panorama/control/transition/steps/SetRenderingPaused tdv/player/view/panorama/control/transition/steps/SetTranslationPosition tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible tdv/player/view/panorama/control/transition/steps/RestoreViewerAreaToModelPlayer tdv/player/view/panorama/control/transition/steps/Translate tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama tdv/player/view/panorama/control/transition/steps/TriggerEvent tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow tdv/player/view/panorama/control/transition/steps/WaitReady tdv/player/view/panorama/control/transition/steps/WaitViewerAreaAcquiredInExclusive tdv/utils".split(" "),
function(a){var m=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),n=a("tdv/player/view/panorama/control/transition/PositionController"),g=a("tdv/player/view/panorama/control/transition/TransitionData"),k=a("tdv/player/view/panorama/control/transition/steps/Blend"),e=a("tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel"),b=a("tdv/player/view/panorama/control/transition/steps/EnforceAdded"),c=a("tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded"),
d=a("tdv/player/view/panorama/control/transition/steps/RequestMediaActivation"),f=a("tdv/player/view/panorama/control/transition/steps/Display"),l=a("tdv/player/view/panorama/control/transition/steps/FadeIn");a("tdv/player/view/panorama/control/transition/steps/FadeInVR");var p=a("tdv/player/view/panorama/control/transition/steps/FadeOut");a("tdv/player/view/panorama/control/transition/steps/FadeOutVR");var q=a("tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition"),r=a("tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition"),
t=a("tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition"),u=a("tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition"),v=a("tdv/player/view/panorama/control/transition/steps/Remove"),w=a("tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel"),x=a("tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea"),y=a("tdv/player/view/panorama/control/transition/steps/RequestViewerArea"),z=a("tdv/player/view/panorama/control/transition/steps/RestoreModelPosition"),
A=a("tdv/player/view/panorama/control/transition/steps/SetInitialPosition"),D=a("tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel"),F=a("tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel"),C=a("tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition"),B=a("tdv/player/view/panorama/control/transition/steps/SetModelInTransition"),H=a("tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled"),E=a("tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused"),
G=a("tdv/player/view/panorama/control/transition/steps/SetMinFaceSize"),N=a("tdv/player/view/panorama/control/transition/steps/SetOriginPosition"),O=a("tdv/player/view/panorama/control/transition/steps/SetRenderingPaused"),R=a("tdv/player/view/panorama/control/transition/steps/SetTranslationPosition"),Q=a("tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible"),K=a("tdv/player/view/panorama/control/transition/steps/RestoreViewerAreaToModelPlayer"),L=a("tdv/player/view/panorama/control/transition/steps/Translate"),
U=a("tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama"),T=a("tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas"),Y=a("tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama"),aa=a("tdv/player/view/panorama/control/transition/steps/TriggerEvent"),ba=a("tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow"),ea=a("tdv/player/view/panorama/control/transition/steps/WaitReady"),ia=a("tdv/player/view/panorama/control/transition/steps/WaitViewerAreaAcquiredInExclusive"),
da=a("tdv/utils").extend(h,function(V,X,S){h.call(this);this.P=V;this.j=X;this.Bc=S;this.Uc=this.mv=null;this.zxa=this.Yu=this.AU=this.rz=void 0;this.H=null;this.Qh=[]});da.prototype.ura=function(V){this.mv=V};da.prototype.clear=function(){this.Tja(this.Yu);this.H&&this.Tja(this.H.Sc);this.AU=this.rz=void 0;this.va=this.Bc=this.j=this.P=this.H=null};da.prototype.start=function(V,X){!this.H&&V==this.Yu||this.H&&V==this.H.Sc?this.AU=this.rz=void 0:(this.P.Qma(this.j),this.rz=V,this.AU=X,this.Qh.length==
0&&this.w5())};da.prototype.oe=function(){this.rz=null;!this.H&&this.Yu&&this.w5()};da.prototype.$oa=function(){return this.H!==null};da.prototype.nfb=function(){return this.H&&this.H.Sc};da.prototype.w5=function(){this.H=new g(this.j,this.mv,this.Yu,this.rz,this.AU);this.Uc=new n(this.j,this.Bc,this.H);this.AU=this.rz=void 0;this.pa(G);this.pa(b);switch(this.H.mode){case g.wta:this.pa(z);this.H.Va()?(this.pa(p),this.vc(this.Sz)):(this.vc(this.Sz),this.pa(p));this.pa(O.Qi);this.pa(E.Eg);this.pa(H.Qi);
this.vc(this.ED);this.pa(v);this.vc(this.Tv);this.pa(B.Eg);this.pa(x);break;case g.vta:if(this.H.tQ=="fade_out_fade_in"||this.H.Va())this.pa(O.Qi),this.pa(ia);this.pa(y);this.pa(O.Eg);this.vc(this.GI);this.pa(ea);this.pa(d);this.pa(N);this.vc(this.Tz);this.pa(l);this.pa(ba);this.pa(r);this.vc(this.FI);break;case g.n_:this.pa(y);this.vc(this.Sz);this.pa(p);this.vc(this.GI);this.vc(this.ED);this.pa(v);this.vc(this.Tv);this.pa(ea);this.pa(d);this.pa(N);this.vc(this.Tz);this.pa(l);this.pa(ba);this.pa(r);
this.vc(this.FI);break;case g.Jua:this.pa(y);this.vc(this.GI);this.vc(this.Sz);this.vc(this.ED);this.H.Va()?(this.pa(ea),this.pa(R),this.vc(this.Tz),this.pa(L),this.pa(v),this.vc(this.Tv)):(this.pa(u),this.vc(this.Tz),this.pa(L),this.pa(v),this.vc(this.Tv),this.pa(q),this.pa(d),this.pa(ba));this.vc(this.FI);break;case g.Op:this.pa(y);this.vc(this.GI);this.pa(ea);this.H.Va()?(this.vc(this.Sz),this.vc(this.ED),this.pa(A),this.vc(this.Tz),this.pa(k),this.pa(v),this.vc(this.Tv)):(this.vc(this.Sz),this.vc(this.ED),
this.pa(t),this.vc(this.Tz),this.pa(k),this.pa(v),this.vc(this.Tv),this.pa(d),this.pa(ba),this.pa(r));this.vc(this.FI);break;case g.rca:this.pa(O.Qi);this.pa(y);this.vc(this.GI);this.pa(c);this.pa(E.Eg);this.pa(ea);this.pa(Q.Eg);this.pa(e.tca);this.pa(D);this.pa(Y);this.pa(B.Eg);this.pa(B.Qi);this.vc(this.Tz);this.pa(O.Eg);this.pa(H.Eg);this.pa(w);this.pa(Q.Qi);this.pa(d);this.pa(ba);this.pa(E.Qi);this.vc(this.FI);break;case g.Lua:this.pa(c);this.vc(this.Sz);this.pa(C);this.vc(this.ED);this.pa(Q.Eg);
this.pa(e.lca);this.pa(O.Qi);this.pa(E.Eg);this.pa(v);this.vc(this.Tv);this.pa(U);this.pa(B.Eg);this.pa(w);this.pa(Q.Qi);this.pa(K);this.pa(x);break;case g.sca:this.vc(this.GI);this.pa(c);this.vc(this.Sz);this.vc(this.ED);this.pa(Q.Eg);this.pa(e.lca);this.pa(ea);this.pa(e.tca);this.pa(C);this.pa(O.Qi);this.pa(E.Eg);this.pa(v);this.vc(this.Tv);this.pa(T);this.pa(H.Eg);this.pa(B.Eg);this.pa(w);this.pa(F);this.vc(this.Tz);this.pa(f);this.pa(O.Eg);this.pa(Q.Qi);this.pa(d);this.pa(ba);this.pa(E.Qi);this.vc(this.FI);
break;case g.Kua:this.vc(this.GI),this.pa(c),this.pa(Q.Eg),this.pa(e.lca),this.pa(C),this.pa(O.Qi),this.pa(E.Eg),this.pa(ea),this.vc(this.Sz),this.vc(this.ED),this.pa(v),this.vc(this.Tv),this.pa(U),this.pa(w),this.pa(e.tca),this.pa(D),this.pa(Y),this.pa(B.Eg),this.vc(this.Tz),this.pa(O.Eg),this.pa(H.Eg),this.pa(w),this.pa(Q.Qi),this.pa(E.Qi),this.vc(this.FI)}this.vc(this.Bla);this.bb()};da.prototype.sla=function(){this.Yu=this.H.Sc;this.zxa=this.H.AK;this.H=this.Uc=null;this.rz===void 0?this.Yu?this.K$a(this.Yu,
this.zxa):this.L$a():this.w5()};window.odb=!0;window.pdb=!0;document.addEventListener("keydown",function(V){V.which==67&&(window.odb=window.pdb=!0)});da.prototype.ZA=function(V){for(;this.Qh.length;){var X=this.Qh[0];X.b$a||(X.b$a=(new Date).getTime());if(this.rz!==void 0&&this.rz!==this.Yu&&X.QX()){this.Tja(this.H.Sc);this.Qh=[];this.w5();break}else if(X.Yg(V),this.bb(),this.Uc.ZA(V),X.mh())this.Qh.shift(),this.Qh.length==0&&this.sla();else break}};document.addEventListener("keydown",function(){(new Date).getTime()});
document.addEventListener("keyup",function(){(new Date).getTime()});da.prototype.ze=function(){};da.prototype.pa=function(V){this.Qh.push(new V(this,this.Uc,this.j,this.H))};da.prototype.vc=function(V){this.Qh.push(new aa(this,this.Uc,this.j,this.H,V))};da.prototype.Tja=function(V){V&&(V=this.j.Jf(V))&&(this.j.remove(V),this.Tv())};da.prototype.GI=function(){this.o(new m(da.Fba,{panorama:this.H.Sc}))};da.prototype.Tv=function(){this.o(new m(da.wba,{panorama:this.H?this.H.qh:this.Yu,nextPanorama:this.H?
this.H.Sc:null}))};da.prototype.Sz=function(){this.o(new m(da.EF,{panorama:this.H.qh}))};da.prototype.ED=function(){this.o(new m(da.DF,{panorama:this.H.qh,nextPanorama:this.H.Sc}))};da.prototype.FI=function(){this.o(new m(da.FF,{panorama:this.H.Sc,camera:this.H.AK}))};da.prototype.Bla=function(){this.o(new m(da.Ir))};da.prototype.Tz=function(){this.o(new m(da.GF,{panorama:this.H.Sc,camera:this.H.AK}))};da.prototype.K$a=function(V,X){this.o(new m(da.bba,{panorama:V,camera:X}))};da.prototype.L$a=function(){this.o(new m(da.cba))};
da.prototype.bb=function(){this.o(new m(da.oc))};da.oc="request frame";da.Fba="request load";da.wba="panorama removed";da.bba="all pending panoramas displayed";da.cba="all pending panoramas hidden";da.DF="panorama end";da.GF="panorama start";da.FF="panorama show";da.EF="panorama hide";da.Ir="transition end";return da});
define("tdv/player/view/panorama/control/frames/BaseFramesController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=m.extend(n,function(k){n.call(this);this.j=k});g.prototype.clear=function(){this.end();this.j=null};g.prototype.qP=function(k){for(var e=this.s1(k),b=k.qX(),c=0;c<e;c++)this.j.Jf(this.Qfa(k,c)).set("alpha",c==b?1:0)};g.prototype.getTime=function(){return 0};g.prototype.start=
function(){};g.prototype.end=function(){};g.prototype.play=function(){};g.prototype.pause=function(){};g.prototype.SP=function(){};g.prototype.bQ=function(){};g.prototype.W$=function(){};g.prototype.stop=function(){};g.prototype.sK=function(){};g.prototype.RE=function(){};g.prototype.zQ=function(){};g.prototype.ze=function(){};g.prototype.ql=function(){};g.prototype.s1=function(k){return k.get("frames").length};g.prototype.Qfa=function(k,e){return k.get("frames")[e]};g.prototype.bb=function(){this.o(new h(g.oc))};
g.prototype.dt=function(k,e,b,c,d,f){this.o(new h(g.Ok,{time:k,duration:e,transitionPosition:b,transitionLength:c,steps:d,selectedStep:f}))};g.prototype.ml=function(){this.o(new h(g.gd,{state:this.ql()}))};g.oc="request frame";g.HUa="frame display";g.IUa="frame hide";g.Ok="time change";g.gd="playback state change";return g});
define("tdv/player/view/panorama/control/frames/HDRFramesController","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/player/view/panorama/control/frames/BaseFramesController tdv/player/view/util/geo/Point tdv/player/view/util/geo/Transformation tdv/view/images/ImageLoader".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/panorama/control/frames/BaseFramesController"),k=a("tdv/player/view/util/geo/Point"),
e=a("tdv/player/view/util/geo/Transformation"),b=a("tdv/view/images/ImageLoader"),c=m.extend(g,function(d){g.call(this,d);this.i1=null;this.zfa=this.aH=0;this.Ba=this.FH=null;this.pja=!1;this.kb=360;this.EHa=180;this.rb=.5;this.qq=.2;this.Yy=.45;this.pAa=5E3;this.tAa=1;this.P2=[[.5,.25],[.5,.375],[.25,.5],[.375,.5],[.5,.5],[.625,.5],[.75,.5],[.5,.625],[.5,.75]];this.w4a=[.05,.1,.05,.1,.4,.1,.05,.1,.05]});c.prototype.qP=function(d){g.prototype.qP.call(this,d);this.jV(d)};c.prototype.start=function(d){this.jV(d);
this.bb()};c.prototype.end=function(){this.jV(null)};c.prototype.jV=function(d){this.Ba!=d&&(this.Ba&&(this.bab(),this.Ba=null,this.hab()),this.Ba=d)&&(this.FYa(),this.kb=d.get("hfov",360),this.EHa=d.get("vfov",180),this.rb=d.get("pitch",0),this.yja=this.hI=void 0,this.p4a(d),this.Wb=.5)};c.prototype.zQ=function(){this.pja=!1};c.prototype.sK=function(d){this.Wb=d/c.iR;this.bb();this.pja=!0};c.prototype.RE=function(d){this.sK(d)};c.prototype.dt=function(){var d=this.s1(this.Ba),f=this.Wb*(d-1),l=Math.max(0,
Math.min(d-2,Math.floor(f))),p=void 0;f-l<.01?p=l:f-l>.99&&(p=l+1);g.prototype.dt.call(this,this.Wb*c.iR,c.iR,this.Wb*c.iR,c.iR,d,p)};c.prototype.ze=function(d){if(this.Ba){var f=this.j.Kc(),l=this.j.Jc(),p=this.j.zg(),q=0;if(this.hI!==void 0&&this.yja!==void 0&&this.FDa!==void 0){var r=f-this.hI,t=l-this.yja,u=p-this.FDa;q=Math.sqrt(r*r+t*t+u*u)*1E3/d}this.hI=f;this.yja=l;this.FDa=p;r=this.s1(this.Ba);var v=this.Wb*(r-1);t=Math.max(0,Math.min(r-2,Math.floor(v)));u=t+1;v=1-(v-t);for(var w=1-v,x=[],
y=0;y<r;y++)x.push(0);x[u]=w;x[t]=w<1?1:0;for(y=0;y<r;y++)this.j.Jf(this.Qfa(this.Ba,y)).set("alpha",x[y]);this.dt();if(this.i1&&(q<=this.tAa||this.j.jr())&&!this.pja){y=Math.PI/180;q=180/Math.PI;x=this.j.nb();var z=this.j.Mb(),A=new e;A.rotateZ(-p*y);A.rotateX(-l*y);A.rotateY(-f*y);f=[];for(y=0;y<this.P2.length;y++)l=new k(this.P2[y][0]*x,this.P2[y][1]*z,0),p=this.j.unproject(l).ZLa(),p.apply(A),l=p.Kc()*q,p=p.Jc()*q,f.push(Math.round((90-p)*this.zfa/180)*this.aH+Math.round((l+180)*this.aH/360));
l=[];for(y=0;y<r;y++){p=this.i1[y];for(x=q=0;x<this.P2.length;x++)q+=this.w4a[x]*p[f[x]];l.push(q)}y=l[t];f=l[u];t=v*l[t]+w*l[u];d=Math.min(1/r,d/this.pAa);r=this.Wb;u=Math.max.apply(Math,l);v=Math.min.apply(Math,l);t<this.qq&&t<u?r=f>t?r+d:r-d:t>this.Yy&&t>v&&(r=y<t?r-d:r+d);r=Math.min(1,Math.max(0,r));this.Wb!=r&&(this.Wb=r,this.bb())}}};c.prototype.p4a=function(d){var f=d.get("frames",[]).map(l=>l.get("thumbnailUrl"));this.FH=f.map(l=>{var p=null;l&&(p=new b(n.Jm),p.bind(h.ia,this.ZBa,this),p.bind(h.$c,
this.$Ba,this));return p});this.FH.forEach((l,p)=>{l&&l.load(f[p])})};c.prototype.hab=function(){this.vxa();this.i1=null};c.prototype.l5a=function(){this.aH=150;this.FH.map(function(d){d&&(this.aH=Math.min(d.hg()*360/this.kb,this.aH))},this);this.zfa=Math.round(this.aH/2);this.i1=this.FH.map(function(d){return this.z_a(d,this.aH,this.zfa,this.kb,this.EHa,this.rb)},this);this.vxa()};c.prototype.z_a=function(d,f,l,p,q,r){var t=document.createElement("canvas");t.width=f;t.height=l;var u=t.getContext("2d");
u.fillStyle="#000000";u.fillRect(0,0,f,l);d&&(d=d.yg(),p=Math.round(f*p/360),u.drawImage(d,(f-p)*.5,Math.round(l*(90-(r+q*.5))/180),p,Math.round(l*q/180)));f=[];t=u.getImageData(0,0,t.width,t.height);for(l=u=0;u<t.height;u++)for(q=0;q<t.width;q++,l+=4)f.push((.299*t.data[l]+.587*t.data[l+1]+.114*t.data[l+2])/255);return f};c.prototype.vxa=function(){this.FH.forEach(d=>{d&&(d.h(h.ia,this.ZBa,this),d.h(h.$c,this.$Ba,this),d.cancel())});this.FH=null};c.prototype.ZBa=function(){this.FH.filter(d=>d&&!d.pj()).length==
0&&this.l5a()};c.prototype.$Ba=function(){};c.prototype.FYa=function(){this.Ba.bind(h.L("minimumLuminance"),this.kz,this);this.Ba.bind(h.L("maximumLuminance"),this.kz,this);this.Ba.bind(h.L("luminanceChangeTime"),this.kz,this);this.Ba.bind(h.L("maxLuminanceChangeSpeed"),this.kz,this);this.kz()};c.prototype.bab=function(){this.Ba.h(h.L("minimumLuminance"),this.kz,this);this.Ba.h(h.L("maximumLuminance"),this.kz,this);this.Ba.h(h.L("luminanceChangeTime"),this.kz,this);this.Ba.h(h.L("maxLuminanceChangeSpeed"),
this.kz,this)};c.prototype.kz=function(){this.qq=this.Ba.get("minimumLuminance");this.Yy=this.Ba.get("maximumLuminance");this.qq==void 0&&this.Yy==void 0?(this.qq=.2,this.Yy=.45):this.qq==void 0?this.qq=Math.min(.2,this.Yy):this.qq==void 0?this.Yy=Math.max(.45,this.qq):this.qq=Math.min(this.qq,this.Yy);this.Yy=Math.min(1,Math.max(0,this.Yy));this.qq=Math.min(1,Math.max(0,this.qq));this.pAa=Math.max(100,this.Ba.get("luminanceChangeTime",5E3));this.tAa=this.Ba.get("maxLuminanceChangeSpeed",1);this.bb()};
c.iR=1E3;return c});
define("tdv/player/view/panorama/control/frames/LiveFramesController","require tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/control/frames/BaseFramesController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/ChangeWatcher"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/view/panorama/control/frames/BaseFramesController");a=m.extend(k,function(e){k.call(this,e);this.g1=this.h1=null;
this.kk=this.Xi=5E3;this.wf=void 0;this.ac=this.Xi;this.ls=1;this.Ba=null;this.yH=!1;this.VU=void 0});a.prototype.start=function(e){this.Ba=e;this.yH=!1;this.Y1=!0;this.h1=h.jx(this.Ba,"frameDisplayTime",this.Pla,this);this.g1=h.jx(this.Ba,"frameTransitionTime",this.Pla,this);this.ls=this.s1(this.Ba);this.wf=this.Ba.qX()*(this.Xi+this.kk);this.Pla(!0);this.dt();this.bb();this.ml()};a.prototype.Pla=function(e){var b=Math.max(100,this.Ba.get("frameDisplayTime",5E3)),c=Math.max(100,this.Ba.get("frameTransitionTime",
5E3));if(this.Xi!=b||this.kk!=c||e){e=this.pM();var d=this.G1a();this.Xi=b;this.kk=c;this.ls>1?(this.wf=e*(this.Xi+this.kk)+d*this.Xi+d*this.kk,this.ac=this.ls*(this.Xi+this.kk)):(this.wf=d*this.Xi,this.ac=this.Xi)}};a.prototype.pM=function(){return this.ls>1?Math.floor(this.wf/(this.Xi+this.kk)):0};a.prototype.H1a=function(){return this.ls>1?(this.pM()+1)%this.ls:0};a.prototype.G1a=function(){return this.ls>1?Math.max(0,Math.min(1,this.wf-this.pM()*(this.Xi+this.kk))):this.wf/this.Xi};a.prototype.Fya=
function(){return this.ls>1?Math.max(0,Math.min(1,(this.wf-(this.pM()*(this.Xi+this.kk)+this.Xi))/this.kk)):0};a.prototype.d$a=function(e){var b=Math.floor(e/this.kk);return b*(this.Xi+this.kk)+this.Xi+(e-b*this.kk)};a.prototype.bGa=function(e){var b=Math.floor(e/(this.Xi+this.kk));return b*this.kk+Math.max(0,e-b*(this.Xi+this.kk)-this.Xi)};a.prototype.play=function(){this.yH&&(this.yH=!1,this.Y1&&this.bb(),this.ml())};a.prototype.pause=function(){this.yH=!0;this.ml()};a.prototype.SP=function(){this.pause()};
a.prototype.bQ=function(){this.play()};a.prototype.end=function(){this.Y1=!1;this.Ba=null;this.h1&&(this.h1.jF(),this.h1=null);this.g1&&(this.g1.jF(),this.g1=null);this.ml()};a.prototype.sK=function(e){this.wf=e;this.bb()};a.prototype.RE=function(e){this.wf=this.d$a(e);this.bb();this.pause()};a.prototype.ze=function(e){if(this.Y1){var b=this.wf;this.yH||(b+=e);if(this.VU===void 0&&b>=this.ac-this.kk)this.VU=this.wf,this.Ba.o(n.Vr);else{this.wf=b;this.wf%=this.ac;this.VU!==void 0&&this.wf<this.VU&&
(this.VU=void 0);e=this.pM();b=this.H1a();var c=this.Fya(),d=b>e?c:1;c=b>e?1:1-c;for(var f=0;f<this.ls;f++){var l=f==e?c:f==b?d:0;var p=this.j.Jf(this.Qfa(this.Ba,f));p.get("alpha")!=l&&(l>0&&l<1&&p.yi(),p.get("alpha"),p.set("alpha",l))}this.dt();this.yH||this.bb()}}};a.prototype.ql=function(){return this.Y1?this.yH?g.$b:g.PLAYING:g.ca};a.prototype.ml=function(){k.prototype.ml.call(this,this.ql())};a.prototype.dt=function(){k.prototype.dt.call(this,this.wf,this.ac,this.bGa(this.wf),this.bGa(this.ac),
this.ls+1,this.Fya()===0?this.pM():void 0)};return a});define("tdv/player/view/panorama/control/frames/StandardFramesController",["require","tdv/utils","tdv/player/view/panorama/control/frames/BaseFramesController"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/frames/BaseFramesController");return m.extend(h,function(n){h.call(this,n)})});
define("tdv/player/view/panorama/control/frames/VideoFramesController",["require","tdv/utils","tdv/constants/EventName","tdv/constants/PlaybackState","tdv/player/view/panorama/control/frames/BaseFramesController"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/control/frames/BaseFramesController");a=m.extend(g,function(k){g.call(this,k);this.vf=!1});a.prototype.qP=function(){};a.prototype.start=function(k){this.end();
this.Ba=k;this.Ba.set("mute",this.vf);this.Ba.get("autoplay")&&this.Ba.set("state",n.PLAYING);this.Qx()};a.prototype.getTime=function(){return this.Ba?this.Ba.get("currentTime"):0};a.prototype.ql=function(){return this.Ba?this.Ba.get("state"):n.ca};a.prototype.play=function(){this.Ba&&this.Ba.set("state",n.PLAYING)};a.prototype.pause=function(){this.Ba&&this.Ba.set("state",n.$b)};a.prototype.W$=function(){this.Ba&&this.Ba.set("state",n.$b)};a.prototype.stop=function(){this.Ba&&this.Ba.set("state",
n.ca)};a.prototype.end=function(){this.Ba&&(this.Bz(),this.Ba=null)};a.prototype.sK=function(k){this.Ba&&this.Ba.set("state",n.PLAYING);this.Ba&&this.Ba.set("currentTime",k)};a.prototype.Bg=function(k){this.vf=k;this.Ba&&this.Ba.set("mute",this.vf)};a.prototype.Qx=function(){this.Ba.bind(h.L("currentTime"),this.Nf,this,!0);this.Ba.bind(h.L("duration"),this.$o,this,!0);this.Ba.bind(h.L("state"),this.Hj,this,!0);this.Ba.get("state")!=n.ca&&this.ml()};a.prototype.Bz=function(){this.Ba.h(h.L("currentTime"),
this.Nf,this,!0);this.Ba.h(h.L("duration"),this.$o,this,!0);this.Ba.h(h.L("state"),this.Hj,this,!0)};a.prototype.Hj=function(){this.ml()};a.prototype.Nf=function(){this.dt()};a.prototype.$o=function(){this.dt()};a.prototype.dt=function(){this.Ba&&g.prototype.dt.call(this,this.Ba.get("currentTime"),this.Ba.get("duration"))};return a});
define("tdv/player/view/panorama/control/FramesController","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/player/view/panorama/control/frames/BaseFramesController tdv/player/view/panorama/control/frames/HDRFramesController tdv/player/view/panorama/control/frames/LiveFramesController tdv/player/view/panorama/control/frames/StandardFramesController tdv/player/view/panorama/control/frames/VideoFramesController".split(" "),function(a){var m=
a("tdv/utils");a("tdv/constants/PlaybackState");var h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/view/panorama/control/frames/BaseFramesController"),e=a("tdv/player/view/panorama/control/frames/HDRFramesController"),b=a("tdv/player/view/panorama/control/frames/LiveFramesController"),c=a("tdv/player/view/panorama/control/frames/StandardFramesController"),d=a("tdv/player/view/panorama/control/frames/VideoFramesController"),f=m.extend(n,
function(l){n.call(this);this.j=l;this.xha=this.C0(b);this.mga=this.C0(e);this.m6=this.C0(d);this.Qka=this.C0(c);this.re=null});f.prototype.clear=function(){this.s0(this.xha);this.xha=null;this.s0(this.mga);this.mga=null;this.s0(this.m6);this.m6=null;this.s0(this.Qka);this.j=this.re=this.Qka=null};f.prototype.C0=function(l){l=new l(this.j);l.bind(k.oc,this.cg,this,!0);l.bind(k.Ok,this.Gs,this,!0);l.bind(k.gd,this.Mf,this,!0);return l};f.prototype.s0=function(l){l.h(k.oc,this.cg,this);l.h(k.Ok,this.Gs,
this);l.h(k.gd,this.Mf,this);l.clear()};f.prototype.Zga=function(l,p){return g.Oa(p,l)};f.prototype.zya=function(l){return this.Zga(l,"HDRPanorama")?this.mga:this.Zga(l,"LivePanorama")?this.xha:this.Zga(l,"VideoPanorama")?this.m6:this.Qka};f.prototype.qP=function(l){(this.re=this.zya(l))&&this.re.qP(l)};f.prototype.start=function(l){this.cg();(this.re=this.zya(l))&&this.re.start(l)};f.prototype.ql=function(){if(this.re)return this.re.ql()};f.prototype.getTime=function(){return this.re?this.re.getTime():
0};f.prototype.play=function(){this.re&&this.re.play()};f.prototype.pause=function(){this.re&&this.re.pause()};f.prototype.SP=function(){this.re&&this.re.SP()};f.prototype.bQ=function(){this.re&&this.re.bQ()};f.prototype.W$=function(){this.re&&this.re.W$()};f.prototype.stop=function(){this.re&&this.re.stop();this.o(new h(f.Ok,{duration:0,time:0,steps:void 0,selectedStep:void 0}))};f.prototype.end=function(){this.re&&(this.re.end(),this.re=null)};f.prototype.sK=function(l){this.re&&this.re.sK(l)};
f.prototype.RE=function(l){this.re&&this.re.RE(l)};f.prototype.zQ=function(){this.re&&this.re.zQ()};f.prototype.ze=function(l){this.re&&this.re.ze(l)};f.prototype.Bg=function(l){this.m6.Bg(l)};f.prototype.cg=function(){this.o(new h(f.oc))};f.prototype.Gs=function(l){this.o(new h(f.Ok,l.data))};f.prototype.Mf=function(l){this.o(new h(f.gd,l.data))};f.oc="request frame";f.HUa="frame display";f.IUa="frame hide";f.Ok="time change";f.gd="playback state change";return f});
define("tdv/player/view/panorama/control/LoadController",["require","tdv/utils","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/view/events/ProgressEvent"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/events/ProgressEvent");a=m.extend(n,function(k){n.call(this);this.j=k;this.si=this.Ba=null});a.prototype.start=function(k){this.Ba=k;this.si=this.j.Jf(this.Ba);this.si.bind(h.ia,this.Pe,this,!0);this.si.bind(h.xc,this.oz,
this,!0);this.si.get("ready")?this.o(h.vd,{panorama:this.Ba}):this.si.bind(h.vd,this.F3,this,!0);this.si.set("loadingActive",!0)};a.prototype.stop=function(){this.Ba=null;this.si&&(this.si.h(h.vd,this.F3,this),this.si.h(h.ia,this.Pe,this),this.si.h(h.xc,this.oz,this),this.si.set("loadingActive",!1),this.si=null,this.o(h.Fg))};a.prototype.clear=function(){this.stop()};a.prototype.F3=function(){this.si.h(h.vd,this.F3,this);this.o(h.vd,{panorama:this.Ba})};a.prototype.Pe=function(){this.si.h(h.vd,this.F3,
this);this.si.h(h.ia,this.Pe,this);this.si.h(h.xc,this.oz,this);this.si=null;this.o(h.ia,{panorama:this.Ba});this.Ba=null;this.o(h.Fg)};a.prototype.oz=function(k){this.o(new g(h.xc,k.percent))};return a});
define("tdv/player/view/panorama/control/MapController","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/script/MapPlayer".split(" "),function(a,m,h,n,g,k){var e=function(c){function d(f){var l=c.call(this)||this;l.renderer=f;l.Bpa=[];l.YX=new Map;l.ig=null;return l}P(d,c);d.prototype.clear=function(){this.x$([])};d.prototype.x$=function(f){f?Array.isArray(f)||(f=[f]):f=[];this.Bpa.filter(function(l){return!f.includes(l)}).forEach(this.Jjb.bind(this));
f.filter(function(l){return!this.Bpa.includes(l)}.bind(this)).forEach(this.bcb.bind(this));this.Bpa=f};d.prototype.display=function(f){this.Wf(f)};d.prototype.oe=function(f){this.ig==f&&this.stop()};d.prototype.stop=function(){this.Wf(null)};d.prototype.bcb=function(f){var l=new b(this.renderer,f);l.bind(d.tj,this.GY,this,!0);l.Wf(this.ig);this.YX.set(f,l)};d.prototype.Jjb=function(f){var l=this.YX.get(f);l.h(d.tj,this.GY,this);l.dispose();this.YX.delete(f)};d.prototype.Wf=function(f){this.ig!==f&&
(this.ig=f,this.YX.forEach(function(l){l.Wf(f)}))};d.prototype.ze=function(){this.YX.forEach(function(f){f.Rnb()})};d.prototype.GY=function(f){this.o(new n(d.tj,{yawDelta:f.data.yawDelta}))};d.tj="request yaw change";return d}(g),b=function(c){function d(f,l){var p=c.call(this)||this;p.renderer=f;p.IA=l;p.ig=null;p.Cw=null;p.acb();return p}P(d,c);d.prototype.dispose=function(){this.Ijb();this.Wf(null)};d.prototype.Wf=function(f){this.ig!==f&&(this.nJa(),this.ig=f,this.ccb())};d.prototype.Rnb=function(){this.zTa()};
d.prototype.OQa=function(f,l,p){f=f.get("mapLocations",[]);for(var q=0;q<f.length;q++){var r=f[q];if(r.get("map")==l)return r}return p&&f.length>0?f[0]:null};d.prototype.WRa=function(){this.IA.ecb(this.Cw);this.IA.bind(k.tj,this.GY,this,!0);this.zTa()};d.prototype.Wgb=function(){this.IA.Kjb(this.Cw);this.IA.h(k.tj,this.GY,this)};d.prototype.nJa=function(){this.Cw&&(this.Wgb(),this.Cw=null)};d.prototype.ccb=function(){this.ig&&(this.Cw=this.OQa(this.ig,this.IA.get("map",null),!0))&&this.WRa()};d.prototype.zTa=
function(){if(this.Cw){var f=this.renderer.Kc(),l=this.renderer.Jc();this.IA.ur(this.Cw,f,l,this.renderer.jf())}};d.prototype.acb=function(){this.IA.bind(h.L("map"),this.FOa,this,!1)};d.prototype.Ijb=function(){this.IA.h(h.L("map"),this.FOa,this)};d.prototype.FOa=function(){this.ig&&(this.nJa(),(this.Cw=this.OQa(this.ig,this.IA.get("map",null),!1))&&this.WRa())};d.prototype.GY=function(f){this.o(new n(e.tj,{yawDelta:f.data.yawDelta}))};return d}(g);return e});
define("tdv/player/view/util/Gamepad","require tdv/constants/EventName tdv/events/async tdv/events/EventDispatcher tdv/view/util/Animation tdv/player/view/util/URL tdv/player/view/util/XR".split(" "),function(a){function m(w){this.Si=w;this.Ll=null;this.xda={};for(w=0;w<this.Si.buttons.length;w++)this.xda[this.Si.buttons[w]]=!1;this.vda=0;this.lD=null;this.lI=[new THREE.Quaternion,new THREE.Quaternion];this.fm=this.lI[0];this.dj=[new THREE.Vector3,new THREE.Vector3];this.Wb=this.dj[0];this.uN=new THREE.Vector3;
this.gI=new THREE.Quaternion;this.Fwa=0}function h(w,x,y){this.ahb=w;this.buttons=x;this.tjb=y}function n(){if(!v&&u!=c.Af){u=c.Af;var w=navigator.getGamepads&&navigator.getGamepads();if(w){for(var x=0;x<q.length;x++)q[x].mRa(null);for(x=0;x<w.length;x++){var y=w[x];if(y&&(y.pose||y.MMa)){var z=y.id||y.dqb,A=z+(y.hand?"-"+y.hand:""),D=t[A];if(!D){a:{for(var F=0;F<f.length;F++){var C=f[F];if(z.indexOf(l[C].ahb)==0){z=C;break a}}z=void 0}z&&q.push(D=t[A]=new m(l[z]))}D&&t[A].mRa(y)}}(w=r)&&!r.mpa()&&
(r=null);for(x=0;x<q.length;x++)if(D=q[x],D.mpa()&&D.pressed()){r=D;break}if(!r)for(x=0;x<q.length;x++)if(D=q[x],D.mpa()){if(D.hand()=="right"){r=D;break}r||(r=D)}w!=r&&e.ME(g)}}}function g(){p.o(k.V)}var k=a("tdv/constants/EventName"),e=a("tdv/events/async"),b=a("tdv/events/EventDispatcher"),c=a("tdv/view/util/Animation"),d=a("tdv/player/view/util/URL");a("tdv/player/view/util/XR");var f="oculus go;oculus touch;xr-standard;gear vr;daydream;vive;vive focus;microsoft;unknown".split(";"),l={};l["oculus go"]=
new h("Oculus Go",["trackpad","trigger"],"trigger");l["oculus touch"]=new h("Oculus Touch","thumbstick trigger grip abutton bbutton surface".split(" "),"trigger");l["xr-standard"]=new h("xr-standard","trigger grip unknow_button_0 thumbstick abutton bbutton unknow_button".split(" "),"trigger");l["gear vr"]=new h("Gear VR",["trackpad","trigger"],"trigger");l.daydream=new h("Daydream Controller",["trackpad","menu","system"],"trackpad");l.vive=new h("OpenVR",["trackpad","trigger","grip","menu","system"],
"trigger");l["vive focus"]=new h("HTC Vive Focus",["trackpad","trigger","grip"],"trigger");l.microsoft=new h("Spatial Controller (Spatial Interaction Source)",["thumbstick","trigger","grip","menu","thumbpad"],"trigger");l.unknown=new h("",[],void 0);m.prototype.mRa=function(w){if(this.Ll=w){this.V2a=this.Ll.hand||this.Ll.bqb;this.Ll.pose&&this.Ll.pose.orientation?(this.lD=this.Ll.pose,this.lD.orientation&&(this.fm=this.lI[0]==this.fm?this.lI[1]:this.lI[0],this.fm.fromArray(this.lD.orientation)),this.lD.position?
(this.Wb=this.dj[0]==this.Wb?this.dj[1]:this.dj[0],this.Wb.fromArray(this.lD.position)):this.Wb=null):this.Ll.MMa&&(this.lD=this.Ll.MMa.transform,this.fm=this.lI[0]==this.fm?this.lI[1]:this.lI[0],this.fm.copy(this.lD.orientation),this.Wb=this.dj[0]==this.Wb?this.dj[1]:this.dj[0],this.Wb.copy(this.lD.position));w=0;for(var x=Math.min(this.Ll.buttons.length,this.Ll.buttons.length);w<x;w++)this.xda[this.Si.buttons[w]]=this.Ll.buttons[w].pressed;for(w=this.vda=0;w<this.Ll.buttons.length;w++)this.Ll.buttons[w].pressed&&
this.vda++;(w=!!this.uN!=!!this.Wb||this.Wb&&this.uN.x!=this.Wb.x&&this.uN.y!=this.Wb.y&&this.uN.z!=this.Wb.z)&&(this.Wb?this.uN.copy(this.Wb):this.uN.set(0,0,0,0));(x=!!this.gI!=!!this.fm||this.fm&&(this.gI.x!=this.fm.x||this.gI.y!=this.fm.y||this.gI.z!=this.fm.z||this.gI.w!=this.fm.w))&&(this.fm?this.gI.copy(this.fm):this.gI.set(0,0,0));if(w||x)this.Fwa=c.Af}};m.prototype.mpa=function(){return!!this.Ll};m.prototype.yhb=function(){return c.Af-this.Fwa>500};m.prototype.hand=function(){return this.V2a};
m.prototype.quaternion=function(){return this.fm};m.prototype.position=function(){return this.Wb};m.prototype.pressed=function(w){w||(w=this.Si.tjb);return w?this.xda[w]:this.vda>0};var p=new b;p.all=function(){n();return q};p.Ug=function(){n();return r};p.fb="left";p.Db="right";var q=[],r=null,t={},u=void 0,v=d.Tg("disable-controller",!1);return p});
define("tdv/player/view/util/geo/Line",["require","tdv/player/view/util/geo/Point","tdv/player/view/util/geo/Vector"],function(a){function m(g,k){this.Lg=g||new h(0,0,0);this.Ek=k||new h(1,0,0)}var h=a("tdv/player/view/util/geo/Point"),n=a("tdv/player/view/util/geo/Vector");m.prototype.clone=function(){return new m(this.Lg.clone(),this.Ek.clone())};m.prototype.apply=function(g){g.yO(this.Lg);g.yO(this.Ek)};m.prototype.ZLa=function(){return n.YD(this.Lg,this.Ek)};return m});
define("tdv/player/view/util/geo/Frustum",["require","tdv/player/view/util/geo/Line","tdv/player/view/util/geo/Point"],function(a){function m(g,k,e){this.Pa=g||100;this.Ha=k||100;this.kb=e||Math.PI;this.Dja=void 0;this.Uu=!0}var h=a("tdv/player/view/util/geo/Line"),n=a("tdv/player/view/util/geo/Point");m.prototype.oK=function(g){this.kb!=g&&(this.kb=g,this.Uu=!0)};m.prototype.vA=function(){return this.kb};m.prototype.TRa=function(g){this.Pa!=g&&(this.Pa=g,this.Uu=!0)};m.prototype.hg=function(){return this.Pa};
m.prototype.nRa=function(g){this.Ha!=g&&(this.Ha=g,this.Uu=!0)};m.prototype.xg=function(){return this.Ha};m.prototype.project=function(g){if(g.z!=0){this.iHa();var k=1/g.z,e=this.Dja*k;g.x=this.Pa*.5-g.x*e;g.y=this.Ha*.5-g.y*e;g.z=k}};m.prototype.unproject=function(g){this.iHa();return new h(new n(0,0,0),new n(this.Pa*.5-g.x,this.Ha*.5-g.y,this.Dja))};m.prototype.iHa=function(){this.Uu&&(this.Dja=this.Pa*.5/Math.tan(this.kb*.5),this.Uu=!1)};return m});
define("tdv/player/view/panorama/renderer/RendererState",["require","exports"],function(){return function(){function a(){this.Mg=this.pitch=this.Xa=0;this.lj=this.Wd=90;this.Rj=this.Sj=this.height=this.width=100;this.ul=1;this.IJ=this.Va=!1;this.Jk=0;this.ioa=this.wW=this.Mpa=!1;this.FJ=this.yY=!0;this.camera=this.TW=this.SW=this.sh=null;this.In=this.enabled=!1;this.Af=0;this.xZ=void 0}a.prototype.clone=function(){var m=new a;m.Xa=this.Xa;m.pitch=this.pitch;m.Mg=this.Mg;m.Wd=this.Wd;m.lj=this.lj;
m.width=this.width;m.height=this.height;m.Sj=this.Sj;m.Rj=this.Rj;m.ul=this.ul;m.Va=this.Va;m.IJ=this.IJ;m.Jk=this.Jk;m.Mpa=this.Mpa;m.ioa=this.ioa;m.wW=this.wW;m.yY=this.yY;m.FJ=this.FJ;m.sh=this.sh;m.SW=this.SW;m.TW=this.TW;m.camera=this.camera;m.enabled=this.enabled;m.In=this.In;m.Af=this.Af;m.xZ=this.xZ;return m};return a}()});
define("tdv/player/view/panorama/renderer/3d/util/StereographicEffect",["require","tdv/constants/RenderOrder","tdv/player/view/panorama/renderer/constants/EyeLayer","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var m=a("tdv/constants/RenderOrder"),h=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),n=a("tdv/player/view/panorama/renderer/3d/util/Util");return function(g){var k=1,e=new THREE.WebGLCubeRenderTarget(1024),b=new THREE.CubeCamera(.1,1E4,e);b.layers.enable(h.nx);b.layers.enable(h.fb);
e=new THREE.ShaderMaterial;e.uniforms={tCube:{value:b.renderTarget.texture},tFlip:{value:1},opacity:{value:1}};e.fragmentShader="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n#include <tonemapping_fragment>\n#include <colorspace_fragment>\n}";e.vertexShader="varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n";
e.side=THREE.BackSide;e.depthWrite=!1;e.transparent=!0;e.depthTest=!1;e.needsUpdate=!0;var c=new THREE.Mesh(new THREE.SphereGeometry(5,64,64),e);c.overdraw=!1;c.matrixAutoUpdate=!1;c.renderOrder=m.MVa;var d=new THREE.Matrix4;this.uK=function(l){k=l};this.start=function(l){l.add(c);l.add(b);l.traverse(function(p){p.layers.test(b.layers)&&(p.userData.wpa=p.layers.mask,p.layers.mask=b.layers.mask)});b.visible=!0;c.visible=!0;g.setClearColor(16777215,1)};this.stop=function(l){g.setClearColor(0,0);l.traverse(function(p){p.userData.wpa!==
void 0&&(p.layers.mask=p.userData.wpa,delete p.userData.wpa)});b.visible=!1;c.visible=!1;l.remove(c);l.remove(b)};var f=0;this.render=function(l,p){k>0&&(c.matrix.copy(p.matrixWorld),c.matrix.multiply(d.makeTranslation(0,0,-k*5)),c.matrixWorldNeedsUpdate=!0,f++,n.rhb()&&f%10!=0||(n.rkb(),c.visible=!1,b.update(g,l),c.visible=!0))}}});
define("tdv/player/view/panorama/renderer/3d/Renderer","require tdv/player/view/util/Device tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Quaternion tdv/player/view/panorama/renderer/constants/EyeLayer tdv/player/view/panorama/renderer/3d/util/StereographicEffect tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/util/XR".split(" "),function(a){function m(q){this.P=q;this.zc=
new THREE.PerspectiveCamera(90,16/9,.1,2*b.th);this.zc.layers.enable(k.fb);this.Wu=new THREE.PerspectiveCamera;this.Bb=new THREE.Scene;this.pxa=new THREE.Scene;this.qxa=new THREE.Scene;this.Bb.add(this.zc);this.kq=this.Yka=this.I0=this.H0=this.j=null;this.OAa=this.jea=!1}var h=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/geo/Fov"),g=a("tdv/player/view/util/geo/Quaternion"),k=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),e=a("tdv/player/view/panorama/renderer/3d/util/StereographicEffect"),
b=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),c=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),d=a("tdv/player/view/panorama/renderer/3d/util/Util"),f=a("tdv/player/view/util/XR");m.prototype.Teb=function(){this.tZa()};m.prototype.sl=function(){return this.j};m.prototype.Sf=function(){return this.Bb};m.prototype.getCamera=function(){return this.Wu};m.prototype.jr=function(){return f.isPresenting&&f.Uf==this.j&&f.YA==this.Bb};m.prototype.efb=function(){return this.Wu.isArrayCamera&&
this.Wu.cameras.length>0?Math.atan2(1,this.Wu.cameras[0].projectionMatrix.elements[5])*2*p:this.Wu.fov};m.prototype.getPixelRatio=function(){return this.j?this.j.getPixelRatio():d.getPixelRatio()};m.prototype.hfb=function(){return f.isPresenting&&f.framebufferWidth?f.framebufferWidth*.5:this.j?this.j.domElement.width:1024};m.prototype.gfb=function(){return f.isPresenting&&f.framebufferHeight?f.framebufferHeight:this.j?this.j.domElement.height:1024};m.prototype.If=function(){return this.j.domElement};
m.prototype.update=function(q){this.Xab(q);this.wab(q);this.et(q)};m.prototype.lna=function(q){this.j.$q=!0;q=d.Zdb(q);var r=new THREE.CubeCamera(this.Wu.near,this.Wu.far,q);this.Bb.add(r);r.position.setFromMatrixPosition(this.Wu.matrixWorld);r.update(this.j,this.Bb);this.Bb.remove(r);this.j.$q=!1;return q.texture};m.prototype.render=function(){this.A4()};m.prototype.Xab=function(q){q.enabled&&(this.j||this.B9a(q),q.Va&&f.getType()==f.Lx.mo&&(this.OAa=!0));this.RFa==q.width&&this.QFa==q.height||this.j.setSize(this.RFa=
q.width,this.QFa=q.height);if(this.jea=q.enabled&&!q.Va)this.H0.setSize(q.width,q.height),this.I0.setSize(q.width,q.height)};m.prototype.B9a=function(q){!this.j&&q.enabled&&(this.P.Fc().y6(),this.H0=this.P.Fc().cfb(),this.j=this.P.Fc().sl(),q=this.j.getSize(new THREE.Vector2),this.RFa=q.width,this.QFa=q.height,this.I0=this.P.Fc().dfb(),this.Yka=new e(this.j,this.zc))};m.prototype.tZa=function(){this.j&&(this.H0=this.j=this.I0=this.kq=null,this.P.Fc().b$())};m.prototype.et=function(q){q.Va?this.Wu=
this.j.xr.getCamera():(this.zc.quaternion.copy(g.jX(q.Xa,q.pitch,q.Mg)),this.zc.fov=n.wm(q.Wd,q.width,q.height),this.zc.aspect=q.width/q.height,this.zc.updateProjectionMatrix(),this.zc.updateMatrixWorld(),this.Wu=this.zc);c.qkb(this.Bb,this.jr()?this.j.xr.getCamera().cameras:[this.zc]);this.Bb.pqb===!0&&this.Bb.updateMatrixWorld()};m.prototype.wab=function(q){var r=!q.Va&&q.Jk>0?this.Yka:null;this.kq!=r&&(this.kq&&this.kq.stop(this.Bb),(this.kq=r)&&this.kq.start(this.Bb));this.kq&&this.kq==this.Yka&&
this.kq.uK(q.Jk)};var l=h.AP();m.prototype.A4=function(){this.j.xr.isPresenting&&!l||this.j.clear();this.OAa&&this.j.resetState();this.kq&&this.kq.render(this.Bb,this.zc);this.j.render(this.Bb,this.zc);this.jea&&(this.H0.render(this.pxa,this.zc),this.I0.render(this.qxa,this.zc))};var p=180/Math.PI;return m});
define("tdv/player/view/panorama/renderer/object/ComposedWebGLObject","require tdv/utils tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/panorama/renderer/OcclusionCuller".split(" "),function(a){var m=a("tdv/utils"),
h=a("tdv/player/view/panorama/renderer/object/Base"),n=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),g=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),k=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),e=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),b=a("tdv/player/view/panorama/renderer/TextureLoader"),c=a("tdv/player/view/panorama/renderer/OcclusionCuller");a=m.extend(h,function(){h.call(this);this.set("tag","ComposedWebGLObject");
this.set("webglScene",null);this.set("meshGroup",null);this.set("camera",null);this.set("textureSource",null);this.set("materialConfig",this.Fha=new g.Rp);this.ly&&this.ly();this.LG&&this.LG();this.pC&&this.pC();this.iq&&this.iq()});a.prototype.hc=function(){h.prototype.hc.call(this);this.Aq&&this.Aq();this.kT&&this.kT();this.nN&&this.nN()};a.prototype.mc=function(){this.MM&&this.MM();this.pN&&this.pN();this.Cq&&this.Cq();k.dispose(this.get("meshGroup"));k.Yw(this.get("meshGroup"),null);this.set("meshGroup",
null);h.prototype.mc.call(this)};a.prototype.za=function(d){this.dg&&this.dg(d);h.prototype.za.call(this,d);this.set("camera",e.getCamera(d.sh));this.set("webglScene",d.sh);this.get("meshGroup")||(this.set("meshGroup",k.MJa(this.hq())),this.get("meshGroup").userData.ajb=this);this.W("webglScene","meshGroup")&&k.Yw(this.get("meshGroup"),this.get("webglScene"));this.Dn();this.Qj&&this.Qj(d);this.ibb();this.Xz&&this.Xz(d);this.Sq&&this.Sq(d);this.NI();this.W("loadingActive","meshGroup")&&b.Ra(this.get("meshGroup"),
this.get("loadingActive"));this.W("blendingActive","meshGroup")&&c.YQa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.Dn=function(){this.W("composedAlpha","meshGroup")&&this.aC()};a.prototype.aC=function(){k.nf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.ibb=function(){if(this.W("textureSource")||this.W("materialConfig")&&!this.Fha.isEqual(this.get("materialConfig"))){var d=this.oM();d&&(k.glb(d,this.KR()),this.aC())}};a.prototype.NI=function(){if(this.W("index",
"meshGroup")){var d=this.get("meshGroup");d&&d.children.forEach(function(f,l,p){k.O$(f,this.get("index")+l/p.length)}.bind(this))}};a.prototype.KR=function(){var d=this.get("textureSource")||new n;this.Fha=this.get("materialConfig");var f=g.st(d.texture(),this.Fha);b.iQ(f,d);return[f]};a.prototype.hxa=function(){var d=new n,f=g.st(d.texture());b.iQ(f,d);return[f]};a.prototype.Gy=function(d){return k.Cfb(this.get("meshGroup"),d)};return a});
define("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin","require tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/view/util/Scale tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Quaternion tdv/view/constants/Alignment".split(" "),function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/view/util/Scale"),k=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/player/view/util/geo/Fov"),b=a("tdv/player/view/util/geo/Quaternion"),c=a("tdv/view/constants/Alignment"),d=new THREE.Matrix4,f=Math.PI/180;return{ly:function(){this.set("distance",void 0);this.set("rotationX",0);this.set("rotationY",0);this.set("rotationZ",0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("scale",1);this.set("contentWidth",
100);this.set("contentHeight",100);this.set("hfov",void 0);this.set("vfov",null);this.set("scaleMode",null);this.set("horizontalAlign",null);this.set("verticalAlign",null);this.set("attachToCamera",!1);this.Lh=this.oC();this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.Bq=new THREE.Matrix4;this.Io=new THREE.Matrix4;this.rk=new THREE.Matrix4;this.mda=new THREE.Matrix4;this.Zva=new THREE.Quaternion;this.bxa=new THREE.Matrix4;this.sR=new THREE.Matrix4;this.FR=new THREE.Matrix4;this.gC=new THREE.Matrix4;
this.Ti=new THREE.Matrix4},Xz:function(l){this.gt(l);this.mma()},mma:function(){if(this.W("hfov","vfov","contentWidth","contentHeight","panoramaPixelsPerDegree","scaleMode","horizontalAlign","verticalAlign")){var l=g.Foa(this.get("hfov"),this.get("vfov"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("panoramaPixelsPerDegree"),this.get("horizontalAlign"),this.get("verticalAlign"));l=h.FRa(this.Lh[1],l.CZ,l.NZ,l.oB,l.rB);this.Lh[1]!=l&&(this.Lh[1]=l,(l=this.oM())&&
n.kra(l,this.Lh[1]))}},oM:function(){var l=this.get("meshGroup");return l?n.tm(l)[1]:null},hq:function(){return[0,1].map(function(l){var p=l==0?this.hxa():this.KR();l=n.create(this.Lh[l],p);k.gB(l,k.Or);k.hB(l,k.Au);k.qK(l,m.WQ);k.oZ(l,1);return l}.bind(this))},oC:function(){return[h.SO(),h.SO()]},gt:function(l){var p=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*h.th,this.get("composedTranslationY")*
.5*h.th,this.get("composedTranslationZ")*.5*h.th),p=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-l.Xa*f),this.ke.multiply(d.makeRotationX(-this.get("composedDeltaPitch")*f)),this.ke.multiply(d.makeRotationY(this.get("composedDeltaYaw")*f)),this.ke.multiply(d.makeRotationY(l.Xa*f)),p=!0);this.W("yaw","pitch")&&(this.Bq.makeRotationY(-this.get("yaw")*f),this.Bq.multiply(d.makeRotationX(this.get("pitch")*f)),p=!0);if(this.W("distance","flipHorizontally",
"scale","hfov","vfov","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign","composedTranslationX","composedTranslationY","composedTranslationZ")){var q=this.Ia.get("composedTranslationX")==0&&this.Ia.get("composedTranslationY")==0&&this.Ia.get("composedTranslationZ")==0&&this.get("distance")!==void 0?h.qw(this.get("distance")):h.Et();this.Io.makeTranslation(0,0,-q);var r=this.get("contentWidth"),t=this.get("contentHeight"),u=this.get("hfov"),v=this.get("vfov")||e.wm(u,r,t),
w=(this.get("flipHorizontally")?-1:1)*this.get("scale"),x=this.get("scale"),y=this.get("scaleMode"),z=this.get("panoramaPixelsPerDegree");p=this.get("horizontalAlign")||c.$e;var A=this.get("verticalAlign")||c.$d;r=g.Foa(u,v,r,t,y,z,p,A);u=w*h.Goa(q,u);v=x*h.Hoa(q,v);this.sR.makeScale(u,v,1);w*=h.Goa(q,r.Wd);q=x*h.Hoa(q,r.Nk);this.FR.makeScale(w,q,1);this.bxa.makeTranslation(p==c.fb?-(u-w)*.5:p==c.Db?(u-w)*.5:0,A==c.Tc?(v-q)*.5:A==c.Hc?-(v-q)*.5:0,0);p=!0}this.W("rotationX","rotationY","rotationZ",
"roll")&&(this.rk.makeRotationZ(this.get("roll")*f),this.rk.multiply(d.makeRotationY(this.get("rotationY")*f)),this.rk.multiply(d.makeRotationX(this.get("rotationX")*f)),this.rk.multiply(d.makeRotationZ(this.get("rotationZ")*f)),p=!0);this.set("cameraYaw",l.Xa);this.set("cameraPitch",l.pitch);this.set("cameraRoll",l.Mg);this.get("attachToCamera")&&this.W("cameraYaw","cameraPitch","cameraRoll")?(this.Zva.copy(b.jX(l.Xa,l.pitch,l.Mg)),this.mda.makeRotationFromQuaternion(this.Zva),p=!0):this.W("attachToCamera")&&
(this.mda.identity(),p=!0);if(p||this.W("meshGroup"))this.Ti.copy(this.wi),this.Ti.multiply(this.ke),this.Ti.multiply(this.mda),this.Ti.multiply(this.Bq),this.Ti.multiply(this.Io),this.Ti.multiply(this.rk),this.gC.copy(this.Ti),this.gC.multiply(this.sR),this.Ti.multiply(this.bxa),this.Ti.multiply(this.FR),l=n.tm(this.get("meshGroup")),n.qt(l[0],this.gC),n.qt(l[1],this.Ti)}}});
define("tdv/player/view/panorama/renderer/object/Plane",["require","tdv/utils","tdv/player/view/panorama/renderer/object/ComposedWebGLObject","tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject");a=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin");return m.extend(h,a,function(){h.call(this);this.set("tag","Plane")})});
define("tdv/player/view/panorama/renderer/object/Cap","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/ColorPicker tdv/view/events/ProgressEvent".split(" "),function(a){function m(q,r,t,u,v,w){for(q=
(q-r)/w;t+180<u;)u-=360;for(;t-180>u;)u+=360;t=(t-u)/w;return t=q<-.1||q>.1?h(v,t,Math.abs(1/(1500*q))):h(v,t,.08)}function h(q,r,t){q=(r-q)*(1-t);Math.abs(q)<1E-5&&(q=0);return r-q}var n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),k=a("tdv/constants/EventName"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/view/panorama/renderer/object/Plane"),c=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),d=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=a("tdv/player/view/util/ColorPicker"),p=a("tdv/view/events/ProgressEvent");a=n.extend(b,function(q){b.call(this);this.C=q;this.Sl.push(this.C);this.Rg=this.Rg.bind(this);this.Qf=e.Oa("CeilingCapPanoramaOverlay",this.C)?"ceiling":"tripod";this.set("tag","Cap");this.set("pitch",this.Qf=="tripod"?-90:90);this.Cd=!1;this.hI=this.Bja=this.yv=void 0;this.F6a=this.Qf=="tripod"?1:-1;this.Il=this.dm=this.Nh=null});a.prototype.hc=function(){b.prototype.hc.call(this);
this.Nh=(new d(k.ia)).ko(this.zs.bind(this));this.dm=(new d(k.xc)).mr(this.PH.bind(this));g.ba(this.C,"angle distance hfov image.levels.url inertia rotate".split(" "),this.Rg,!0)};a.prototype.mc=function(){this.Il&&this.Il.dispose();this.Il=null;this.Nh.dispose();this.dm.dispose();g.da(this.C,"angle distance hfov image.levels.url inertia rotate".split(" "),this.Rg);b.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("angle",this.C.get("angle"));this.set("distance",this.C.get("distance"));
this.set("hfov",this.C.get("hfov"));var q=f.ifb(this.C,this.get("panoramaPixelsPerDegree"));this.set("imageURL",q&&q.get("url"));this.set("imageWidth",q&&q.get("width"));this.set("imageHeight",q&&q.get("height"));this.set("inertia",this.C.get("inertia"));this.set("rotate",this.C.get("rotate"))};a.prototype.hq=function(){var q=b.prototype.hq.call(this);this.Nh.jg(q);this.dm.jg(q);return q};a.prototype.za=function(q){this.Tla();this.dO(q);b.prototype.za.call(this,q)};a.prototype.Tla=function(){this.W("imageURL")&&
this.get("imageURL")&&(this.set("textureSource",new c(this.get("imageURL"))),this.set("contentWidth",this.get("imageWidth")),this.set("contentHeight",this.get("imageHeight")))};a.prototype.zs=function(){this.o(k.vd);this.o(k.ia)};a.prototype.PH=function(q,r){var t=0;r.lw(function(u){(u=r.Nn(u))&&(t+=u.percent)});this.o(new p(k.xc,t/r.zd.length))};a.prototype.dO=function(q){this.set("rendererYaw",q.Xa);if(this.W("angle","inertia","rotate")||(this.get("rotate")||this.get("inertia"))&&this.W("rendererYaw")){var r=
this.get("angle"),t=this.get("rotate"),u=this.get("inertia"),v=this.F6a*q.Xa;t&&(r+=v);var w=0,x=r-v;this.yv!==void 0&&(u&&(t?(w=m(v,this.hI,r,this.yv,this.Bja,q.Af),r=this.yv+w*q.Af):(w=m(v,this.hI,x,this.EDa,this.Bja,q.Af),x=this.EDa+w*q.Af,r=x+v)),this.yv!=r&&this.Na());this.EDa=x;this.yv=r;this.Bja=w;this.hI=v;this.set("rotationZ",-r)}};a.prototype.ao=function(q){if(q.ag==k.Lm){var r=!q.qm()&&this.bt(q);r&&(q.LD(this.C),this.C.get("useHandCursor")&&q.WI(this.C),q.om(this.get("distance")));this.Cd!=
r&&(this.Cd=r,this.C.o(this.Cd?k.uc:k.Eb),q.Bw()&&this.C.o(this.Cd?k.UF:k.Qr))}else q.ag==k.Yf&&!q.qm()&&this.bt(q)&&(this.C.jP(k.ma,!0).length>1&&q.du(this.C),q.om(this.get("distance")),this.C.o(k.ma))};a.prototype.bt=function(q){return this.Gy(q.Qs).some(function(r){var t=this.B1a();return t&&t.ax(r.x,r.y)}.bind(this))};a.prototype.B1a=function(){if(this.Il)return this.Il;var q=this.get("textureSource");if(q=q&&q.yg())this.Il=new l(q);return this.Il};return a});
define("tdv/player/view/panorama/renderer/object/ParticleCylinders","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/Base tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/Base"),k=a("tdv/player/view/util/XR");a=m.extend(g,function(){g.call(this);this.wi=new THREE.Matrix4;this.yHa=!1;this.Dj=new THREE.Matrix4;
this.eh=null;this.vn=new THREE.Matrix4;this.TU=this.FU=0;this.lR=.75;this.SR=.5;this.jv=4;this.Lha=0;this.lv=-2;this.vs=3;this.L2=0;this.XG=7;this.yU=this.iD=1;this.pT=.15;this.YG=this.$H=0;this.P1=this.n4=n.ca;this.y5=this.r5=1E3});var e=Math.PI/180,b=new THREE.Matrix4;a.prototype.Co=function(){};a.prototype.hc=function(){g.prototype.hc.call(this);this.o(h.vd);this.o(h.ia)};a.prototype.mc=function(){this.Mda()};a.prototype.Vl=function(){this.Co();this.XU()};a.prototype.Wl=function(){this.Na()};a.prototype.XU=
function(){this.eh&&(this.Mda(),this.jxa())};a.prototype.E0=function(){};a.prototype.jxa=function(){this.u7a();this.eh=new THREE.Group;for(var c=this.P1==n.PLAYING,d=this.$H,f=this.YG;f+d>0;){var l=Math.random()*(f+d)<=f;l?f--:d--;var p=this.E0();p.matrixAutoUpdate=!1;p.overdraw=!1;p.material.opacity=0;p.userData={Jeb:l,YP:new THREE.Matrix4,mIa:new THREE.Matrix4,Uqa:new THREE.Matrix4,y:void 0,hUa:void 0,IE:c};this.eh.add(p);c&&this.cka(p,this.lv,this.vs);this.s7a(p)}this.FU=c?this.eh.children.length:
0;this.Gma.add(this.eh);this.Yva()};a.prototype.Mda=function(){if(this.eh){this.eh.parent&&this.eh.parent.remove(this.eh);for(var c=0,d=this.eh&&this.eh.children.length;c<d;c++)this.eh.children[c].material.dispose();this.eh=null;this.TU=0}};a.prototype.u7a=function(){this.vn=(new THREE.Matrix4).makeScale(this.iD,this.iD,this.iD)};a.prototype.cka=function(c,d,f){d+=Math.random()*(f-d);if(c.userData.Jeb){f=this.XG;var l=360*Math.random()*e;c.userData.YP.makeTranslation(f*Math.cos(l),d,f*Math.sin(l))}else f=
Math.random()*2*Math.PI,l=this.Lha+(this.jv-this.Lha)*Math.sqrt(Math.random()),c.userData.YP.makeTranslation(l*Math.cos(f),d,l*Math.sin(f));c.userData.YP.multiply(this.vn);c.userData.y=d};a.prototype.s7a=function(c){var d=this.pT+Math.random()*(this.GH-this.pT);do var f=Math.random()*this.L2;while(f>80&&f<100);var l=Math.random()*360,p=Math.sin(l*e)*Math.sin(f*e)*d,q=-Math.cos(f*e)*d;d*=Math.cos(l*e)*Math.sin(f*e);c.userData.hUa=q*this.iD;c.userData.mIa.makeTranslation(p,q,d);c.userData.Uqa.makeRotationY(l*
e);c.userData.Uqa.multiply(b.makeRotationX(-f*e))};a.prototype.za=function(c){g.prototype.za.call(this,c);this.pab(c);this.Gma=c.sh;this.Gma!=(this.eh&&this.eh.parent)?(this.Mda(),this.Gma&&this.jxa()):this.W("index")&&this.Yva();this.Qab(c)};a.prototype.pab=function(c){c=c.Va&&k.getType()==k.Lx.mo;c!=this.Fza&&(this.Fza=c)&&setTimeout(function(){this.eh&&this.XU()}.bind(this),0)};a.prototype.Qab=function(c){if(this.eh){this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&
(this.yHa=this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0,this.wi.makeTranslation(-this.get("composedTranslationX")*this.jv,this.get("composedTranslationY")*this.jv,this.get("composedTranslationZ")*this.jv));var d=this.n4==n.PLAYING,f=this.eh.children,l=f.length,p=d?Math.round(l*c.Af/this.r5):0;if(this.FU+p>0){this.TU=d?0:Math.min(this.FU,this.TU+Math.round(l*c.Af/this.y5));c=this.get("composedAlpha");for(d=0;d<l;d++){var q=f[d];if(!q.userData.IE)if(p>
0)p--,q.userData.IE=!0,this.FU++,this.cka(q,this.vs,this.vs+(this.vs-this.lv));else continue;q.userData.YP.multiply(q.userData.mIa);q.userData.y+=q.userData.hUa;if(q.userData.y<this.lv||q.userData.y>this.vs){if(this.TU>0){this.TU--;q.userData.IE=!1;this.FU--;q.material.opacity=0;continue}var r=q.userData.y<this.lv?this.vs:this.lv;this.cka(q,r,r)}r=c;q.userData.y<this.lv+this.SR?r*=(q.userData.y-this.lv)/this.SR:q.userData.y>this.vs-this.lR&&(r*=(this.vs-q.userData.y)/this.lR);q.material.opacity=r*
this.yU;this.yHa?(q.matrix.copy(this.wi),q.matrix.multiply(q.userData.YP)):q.matrix.copy(q.userData.YP);q.matrix.multiply(q.userData.Uqa);q.matrixWorldNeedsUpdate=!0}this.Na()}}};a.prototype.Yva=function(){if(this.eh)for(var c=this.get("index"),d=0;d<this.eh.children.length;d++)this.eh.children[d].renderOrder=c};return a});
define("tdv/player/view/panorama/renderer/object/Dust","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Color tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),k=a("tdv/player/view/util/Color"),e=a("tdv/player/view/util/Device");a=m.extend(g,
function(c){g.call(this);this.C=c;this.Vl=this.Vl.bind(this);this.Wl=this.Wl.bind(this);this.Co()});a.prototype.hc=function(){g.prototype.hc.call(this);this.C.set("state",this.C.get("startState"));h.ba(this.C,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),this.Vl,!0);h.ba(this.C,["state"],this.Wl,!0)};a.prototype.mc=function(){h.da(this.C,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),
this.Vl);h.da(this.C,["state"],this.Wl);this.C.set("state",n.ca);g.prototype.mc.call(this)};a.prototype.Vl=function(){this.Co();this.XU()};a.prototype.Wl=function(){this.n4=this.C.get("state");this.Na()};a.prototype.Co=function(){g.prototype.Co.call(this);var c=e.ub()||e.Tb()==e.ox?2500:e.kf()?4E3:5E3;this.pT=this.GH=this.C.get("speed",.2)*.2;this.jv=this.C.get("distance",.5)*14.5+.5;this.yU=this.C.get("opacity",.1)*1;this.iD=.036;this.$H=this.C.get("intensity",.1)*c;this.Ne=k.Dp(this.C.get("color",
"#ffffff"));this.YG=0;this.XG=15;this.P1=this.C.get("initialState");this.r5=this.C.get("startDuration");this.y5=this.C.get("stopDuration");this.lR=.75;this.SR=.5;this.lv=-2;this.vs=4;this.L2=180;this.Nxa()};a.prototype.E0=function(){return new THREE.Sprite(this.my())};a.prototype.my=function(){var c=new THREE.SpriteMaterial;c.map=this.es();c.side=THREE.FrontSide;c.transparent=!0;c.depthTest=!1;c.needsUpdate=!0;return c};a.prototype.es=function(){if(this.Ma)return this.Ma;var c=document.createElement("canvas");
c.width=c.height=b;this.Ma=new THREE.Texture;this.Ma.colorSpace=THREE.SRGBColorSpace;this.Ma.image=c;this.Ma.needsUpdate=!0;this.Nxa();return this.Ma};a.prototype.Nxa=function(){if(this.Ma){var c=this.Ma.image,d=c.getContext("2d"),f=d.createRadialGradient(c.width*.5,c.height*.5,c.height*.2,c.width*.5,c.height*.5,c.height*.5);f.addColorStop(0,"rgba("+this.Ne[0]+", "+this.Ne[1]+", "+this.Ne[2]+", 1)");f.addColorStop(1,"rgba("+this.Ne[0]+", "+this.Ne[1]+", "+this.Ne[2]+", 0)");d.fillStyle=f;d.clearRect(0,
0,c.width,c.height);d.fillRect(0,0,c.width,c.height);this.Ma.needsUpdate=!0}};var b=32;return a});
define("tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin","require tdv/utils tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/view/util/Scale tdv/player/view/panorama/renderer/TextureLoader tdv/view/constants/Alignment".split(" "),function(a){a("tdv/utils");var m=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),
g=a("tdv/view/util/Scale"),k=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/view/constants/Alignment"),b=new THREE.Matrix4,c=Math.PI/180;return{ly:function(){this.set("distance",void 0);this.set("width",100);this.set("height",100);this.set("offsetX",void 0);this.set("offsetY",void 0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("rotationZ",0);this.set("contentWidth",100);this.set("contentHeight",100);this.set("scale",1);this.set("scaleMode",null);this.set("horizontalAlign",
null);this.set("verticalAlign",null);this.Lh=this.oC();this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.Bq=new THREE.Matrix4;this.Io=new THREE.Matrix4;this.KL=new THREE.Matrix4;this.HN=new THREE.Matrix4;this.iwa=new THREE.Matrix4;this.rk=new THREE.Matrix4;this.exa=new THREE.Matrix4;this.sR=new THREE.Matrix4;this.FR=new THREE.Matrix4;this.gC=new THREE.Matrix4;this.Ti=new THREE.Matrix4;this.ML=new THREE.Matrix4;this.DG=new THREE.Vector3},Xz:function(d){this.gt(d);this.mma()},mma:function(){if(this.W("width",
"height","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign")){var d=g.J7(this.get("width"),this.get("height"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("horizontalAlign"),this.get("verticalAlign"));d=h.FRa(this.Lh[1],d.CZ,d.NZ,d.oB,d.rB);this.Lh[1]!=d&&(this.Lh[1]=d,(d=this.oM())&&n.kra(d,this.Lh[1]))}},oM:function(){var d=this.get("meshGroup");return d?n.tm(d)[1]:null},hq:function(){return[0,1].map(function(d){var f=d==0?this.hxa():
this.KR();d=n.create(this.Lh[d],f);k.gB(d,k.Or);k.hB(d,k.Au);k.qK(d,m.WQ);k.oZ(d,1);return d}.bind(this))},oC:function(){return[h.SO(),h.SO()]},gt:function(d){var f=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*h.th,this.get("composedTranslationY")*.5*h.th,this.get("composedTranslationZ")*.5*h.th),f=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-d.Xa*c),
this.ke.multiply(b.makeRotationX(-this.get("composedDeltaPitch")*c)),this.ke.multiply(b.makeRotationY(this.get("composedDeltaYaw")*c)),this.ke.multiply(b.makeRotationY(d.Xa*c)),f=!0);this.W("yaw","pitch")&&(this.Bq.makeRotationY(-this.get("yaw")*c),this.Bq.multiply(b.makeRotationX(this.get("pitch")*c)),f=!0);if(this.W("distance","composedTranslationX","composedTranslationY","composedTranslationZ")){var l=this.get("composedTranslationX")==0&&this.get("composedTranslationY")==0&&this.get("composedTranslationZ")==
0&&this.get("distance")!==void 0;this.set("z",l?h.qw(this.get("distance")):h.Et())}this.W("z")&&(this.Io.makeTranslation(0,0,-this.get("z")),f=!0);f&&(this.ML.copy(this.wi),this.ML.multiply(this.ke),this.ML.multiply(this.Bq),this.ML.multiply(this.Io));l=!1;this.set("rendererYaw",d.Xa);this.set("rendererPitch",d.pitch);this.set("rendererRoll",d.Mg);this.set("rendererCameraFOV",d.lj);this.set("rendererWidth",d.width);this.set("rendererHeight",d.height);d.lj&&this.W("z","rendererCameraFOV")&&this.set("rendererHeightZ",
Math.tan(d.lj*c*.5)*this.get("z")*2);if(d.lj&&(f||this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","rendererHeightZ","inVR"))){if(d.Va)this.KL.copy(this.ML),this.HN.identity();else{l=d.camera;this.KL.copy(l.matrixWorld);this.DG.setFromMatrixPosition(l.matrixWorld);this.DG.applyMatrix4(this.ML);this.DG.applyMatrix4(l.matrixWorldInverse);var p=-10,q=-10;this.DG.z<0&&(this.DG.applyMatrix4(l.projectionMatrix),p=this.DG.x*.5,q=this.DG.y*.5);var r=
this.get("rendererHeightZ");this.HN.makeTranslation(r*l.aspect*p,q*r,0)}l=!0}this.W("roll")&&(this.rk.makeRotationZ(this.get("roll")*c),l=!0);if(d.lj&&(f||this.W("rendererHeight","inVR","rendererHeightZ","width","height","contentWidth","contentHeight","scale","scaleMode","horizontalAlign","verticalAlign","flipHorizontally","offsetX","offsetY"))){f=d.Va?1024:d.height;l=this.get("scale")*this.get("rendererHeightZ")/f*(d.Va?2:1);var t=this.get("width");q=this.get("height");var u=this.get("offsetX");
r=this.get("offsetY");var v=this.get("contentWidth"),w=this.get("contentHeight");p=(this.get("flipHorizontally")?-1:1)*l;var x=this.get("scaleMode");d=this.get("horizontalAlign")||e.$e;f=this.get("verticalAlign")||e.$d;x=g.J7(t,q,v,w,x,d,f);v=p*t;w=l*q;this.sR.makeScale(v,w,1);t=p*(t*.5-u);q=l*(r-q*.5);this.iwa.makeTranslation(t,q,0);p*=x.width;l*=x.height;this.FR.makeScale(p,l,1);this.exa.makeTranslation((d==e.fb?-(v-p)*.5:d==e.Db?(v-p)*.5:0)+t,(f==e.Tc?(w-l)*.5:f==e.Hc?-(w-l)*.5:0)+q,0);l=!0}l&&
(this.Ti.copy(this.KL),this.Ti.multiply(this.Io),this.Ti.multiply(this.HN),this.Ti.multiply(this.rk),this.gC.copy(this.Ti),this.gC.multiply(this.iwa),this.gC.multiply(this.sR),this.Ti.multiply(this.exa),this.Ti.multiply(this.FR),d=n.tm(this.get("meshGroup")),n.qt(d[0],this.gC),n.qt(d[1],this.Ti))}}});
define("tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(g,k){this.Qd=g;this.Ic=k;this.Ld=!1;this.Oca();this.Rca();this.RH()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.Mja();this.Rja();this.Qd.get("autoplay")||this.Qd.set("state",n.ca);this.Qd=null;this.Ic.Zc(n.ca);this.Ic=null};m.prototype.kg=function(g){this.Ld!=g&&(this.Ld=
g,this.Uv())};m.prototype.RH=function(){this.Ic.Zc(this.Qd.get("state"))};m.prototype.QT=function(){this.Uv()};m.prototype.ST=function(){this.Ic.jra(this.Qd.get("frameDuration"))};m.prototype.RT=function(){this.Ic.iRa(this.Qd.get("finalFrame")=="first")};m.prototype.OT=function(){this.Qd.o(h.Vr)};m.prototype.NT=function(){this.Qd.o(h.Ub)};m.prototype.PT=function(){this.Qd.set("state",this.Ic.getState())};m.prototype.Uv=function(){this.Qd.get("autoplay")&&this.Ic.Zc(this.Ld?n.PLAYING:n.ca)};m.prototype.Oca=
function(){this.Qd.bind(h.L("state"),this.RH,this,!0);this.Qd.bind(h.L("autoplay"),this.QT,this,!0);this.Qd.bind(h.L("frameDuration"),this.ST,this,!0);this.Qd.bind(h.L("finalFrame"),this.RT,this,!0)};m.prototype.Mja=function(){this.Qd.h(h.L("state"),this.RH,this,!0);this.Qd.h(h.L("autoplay"),this.QT,this,!0);this.Qd.h(h.L("frameDuration"),this.ST,this,!0);this.Qd.h(h.L("finalFrame"),this.RT,this,!0)};m.prototype.Rca=function(){this.Ic.bind(h.Vr,this.OT,this,!0);this.Ic.bind(h.Ub,this.NT,this,!0);
this.Ic.bind(h.Pd,this.PT,this,!0)};m.prototype.Rja=function(){this.Ic.h(h.Vr,this.OT,this,!0);this.Ic.h(h.Ub,this.NT,this,!0);this.Ic.h(h.Pd,this.PT,this,!0)};return m});
define("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/ColorPicker tdv/view/images/ImageAnimation".split(" "),function(a){var m=
a("tdv/binding/BindingsHandler"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/constants/Priority"),k=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),b=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),c=a("tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController"),d=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),f=a("tdv/player/view/panorama/renderer/TextureLoader"),
l=a("tdv/player/view/util/ColorPicker"),p=a("tdv/view/images/ImageAnimation");return{LG:function(){this.set("visible",!1);this.set("inView",!1);this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.set("premultipliedAlpha",!1);this.set("projected",!1);this.set("image",null);this.set("level",null);this.set("levelURL",null);this.set("state",null);this.set("visibleOnStop",!0);this.set("side",void 0);this.set("isVideoTexture",!1);this.m3=
this.m3.bind(this);this.p3=this.p3.bind(this);this.Ic=null;this.fAa=-1;this.Il=this.lb=this.eq=null},Qj:function(q){this.Tla(q);this.FD(q);this.Wab(q)},Tla:function(q){if(this.W("level")){var r=this.get("level");this.set("levelURL",r&&r.get("url"))}this.W("image","level","levelURL","projected","premultipliedAlpha")&&(this.Mwa(),this.lb=this.get("image"),this.hb=this.get("level"),this.set("textureSource",new d(this.lb&&this.hb.get("url"))),this.set("premultipliedAlpha",this.lb&&this.hb.get("premultipliedAlpha")),
this.get("textureSource").Nkb(this.get("premultipliedAlpha")),this.CXa(),this.lb?(this.nXa(),this.qXa()):(this.o(h.vd),this.o(h.ia)));(r=this.get("textureSource"))&&r.pra(q.Jk>0);this.W("textureSource","isVideoTexture")&&r&&r.aZ(this.get("isVideoTexture"))},FD:function(){if(this.W("blending","chromaColor","chromaThreshold","chromaSmoothing","premultipliedAlpha","side")){var q=new e.Rp;q.QD=this.get("blending");q.dw=this.get("chromaColor");q.MW=this.get("chromaThreshold");q.LW=this.get("chromaSmoothing");
q.premultipliedAlpha=this.get("premultipliedAlpha");q.side=this.get("side");this.set("materialConfig",q)}},Wab:function(){if(this.W("meshGroup","projected","visible")){var q=this.get("projected")&&this.get("visible")?g.dca:g.WQ;b.tm(this.get("meshGroup")).forEach(function(r){f.qK(r,q)}.bind(this))}},Dn:function(){this.W("visible","composedAlpha","image","state","visibleOnStop")&&this.set("inView",this.get("visible")&&this.get("composedAlpha")>0&&(this.get("visibleOnStop")||this.get("state")!=n.ca));
this.W("composedAlpha","meshGroup","inView")&&b.nf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0);this.eq&&this.eq.kg(this.get("inView"))},m3:function(){this.lb&&k.Oa("AnimatedImageResource",this.lb)?this.set("visibleOnStop",this.lb.get("visibleOnStop")):this.set("visibleOnStop",!0)},p3:function(){this.set("levelURL",this.hb.get("url"))},MM:function(){this.Mwa()},Mwa:function(){this.eq&&(this.eq.clear(),this.eq=null);this.Ic&&(this.Ic.h(h.V,this.ES,this,!0),this.Ic.h(h.Pd,this.Cza,
this,!0),this.Ic.clear(),this.Ic=null);this.Il&&(this.Il.dispose(),this.Il=null);this.get("textureSource")&&(this.Uja(),this.set("textureSource",null));this.lb&&(this.a7a(),this.lb=null);this.hb&&(this.d7a(),this.hb=null)},nXa:function(){m.ba(this.lb,["visibleOnStop"],this.m3,!0)},a7a:function(){m.da(this.lb,["visibleOnStop"],this.m3)},qXa:function(){m.ba(this.hb,["url"],this.p3,!0)},d7a:function(){m.da(this.hb,["url"],this.p3)},Dza:function(){this.Uja();var q=this.get("image");if(k.Oa("AnimatedImageResource",
q)){this.Ic=new p(this.get("textureSource").yg(),q.get("rowCount",1),q.get("colCount",1),q.get("frameDuration"),q.get("frameCount",q.get("rowCount",1)*q.get("colCount",1)),q.get("repeat"),q.get("finalFrame")=="first");var r=this.Ic.If();this.Ic.bind(h.Pd,this.Cza,this,!0);this.Ic.bind(h.V,this.ES,this,!0);this.eq=new c(q,this.Ic);this.set("visibleOnStop",q.get("visibleOnStop"));this.set("state",this.Ic.getState())}else r=this.get("textureSource").yg(),this.Il=new l(r),this.set("visibleOnStop",!0),
this.set("state",null);this.Dn();this.set("contentWidth",r.width);this.set("contentHeight",r.height);this.get("textureSource").bo(r);this.o(h.vd);this.o(h.ia)},Eza:function(){this.Uja();this.o(h.vd);this.o(h.ia)},Cza:function(){this.set("state",this.Ic.getState())},ES:function(q){var r=this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0,t=!!this.get("blendingActive");q=q.data.frameIndex;var u=this.fAa>q;this.fAa=q;this.get("textureSource").update(!u||
r||t);this.Na()},CXa:function(){var q=this.get("textureSource");q.bind(h.ia,this.Dza,this,!0);q.bind(h.$c,this.Eza,this,!0)},Uja:function(){var q=this.get("textureSource");q.h(h.ia,this.Dza,this,!0);q.h(h.$c,this.Eza,this,!0)},Ufa:function(q){return this.Il&&this.Il.source==q.source?this.Il.info(q.x,q.y):l.info(q.source,q.x,q.y)}}});
define("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/util/Color tdv/view/constants/Cursor tdv/util/Map".split(" "),function(a){function m(d){d=d.get("mapColor");return d=="image"||d=="transparent"||d=="any"}function h(d){d=d.get("mapColor");return d!="image"&&d!="transparent"&&d!="any"}var n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/EventName"),k=a("tdv/player/parser/ClassInfo"),
e=a("tdv/player/view/util/Color"),b=a("tdv/view/constants/Cursor"),c=new (a("tdv/util/Map"));return{pC:function(){this.set("beamEnabled",!1);this.l3=this.l3.bind(this);this.E1=null;this.zL={};this.xj=[];this.Ou=[];this.My=null},Okb:function(d){this.My!=d&&(this.Nja(),this.My=d,this.Dva())},Sq:function(d){this.pD=d.Xa;this.oD=d.pitch},Nja:function(){this.My&&n.da(this.My,["areas"],this.l3)},Dva:function(){this.My&&n.ba(this.My,["areas"],this.l3,!0)},nN:function(){this.Nja();this.Dva()},pN:function(){this.GEa([]);
this.Nja()},l3:function(){var d=this.My.get("areas",[]);k.Oa("HotspotPanoramaOverlayImage",this.C)||k.Oa("FlatHotspotPanoramaOverlayImage",this.C)||k.Oa("QuadHotspotPanoramaOverlayImage",this.C)?this.E1=d.filter(m):this.E1=d.filter(h);this.E1.forEach(function(f){c.set(f,0)})},ao:function(d){if(d.ag==g.Lm){var f=this.Ffa(d);if(f.length>0){d.LD(f);var l=this.k1a(f),p;for(p in l)d.gIa(l[p],p);d.om(this.get("distance"));(l=this.jc(f,d.MJ()))&&d.A6(l,this.BD(d.MJ()))}f=this.l1a(d,f);this.GEa(f,d.Bw(),
d.MJ())}else if(d.ag==g.Yf){if(f=this.Ffa(d),f.length>0){var q=!1;f.forEach(function(r){r.o(g.ma);!q&&r.jP(g.ma,!0).length>1&&(q=!0)});d.om(this.get("distance"));q&&d.du(f)}}else d.ag==g.Du?(f=this.Ffa(d),f.length>0&&(q=!1,f.forEach(function(r){var t={};d.Bw()&&(t=d.Mw().BLa());r.o(g.Sa,t);!q&&r.jP(g.Sa,!0).length>1&&(q=!0)}),this.Ou=f,d.om(this.get("distance")),q&&d.du(f))):d.ag==g.TB&&this.Ou.length&&(this.Ou.forEach(function(r){var t={};d.Bw()&&(t=d.Mw().BLa());r.o(g.$a,t)}),this.Ou=[])},l1a:function(d,
f){if(!d.kpa())return this.zL={},f;d=d.Tza?"main":"secondary";this.zL[d]=f;f=[];for(d in this.zL)for(var l=0;l<this.zL[d].length;l++)f.indexOf(this.zL[d][l])<0&&f.push(this.zL[d][l]);return f},Ffa:function(d){if(!this.get("beamEnabled")||this.get("alpha")==0||d.qm())return[];var f=this.Gy(d.Qs);return f.length==0?[]:this.E1.filter(function(l){var p=l.get("mapColor");return p=="any"?!0:p=="image"?f.some(function(q){return this.Ufa(q).ax}.bind(this)):p=="transparent"?f.every(function(q){return!this.Ufa(q).ax}.bind(this)):
p&&p[0]=="#"?f.some(function(q){return e.H7(this.Ufa(q).color,p)<10}.bind(this)):!1}.bind(this))},GEa:function(d,f,l){this.xj.forEach(function(q){if(d.indexOf(q)<0){var r=c.get(q)-1;c.set(q,r);r==0&&(q.o(g.Eb,{center:l}),f&&q.o(g.Qr))}});var p=this.xj;this.xj=d;this.xj.forEach(function(q){if(p.indexOf(q)<0){var r=(c.get(q)||0)+1;c.set(q,r);r==1&&(q.o(g.uc,{center:l}),f&&q.o(g.UF))}})},jc:function(d,f){for(var l="",p=d.length-1;p>=0&&l=="";p--){var q=d[p];if(!f||q.get("displayTooltipInTouchScreens")&&
this.La.P.get("displayTooltipInTouchScreens")!==!1)l=q.get("toolTip","")}return l},BD:function(d){if(d){d=this.get("yaw")-this.pD;var f=this.get("pitch")-this.oD;return Math.sqrt(d*d+f*f)}return 0},k1a:function(d){var f={};this.My.get("useHandCursor")===!0?f[b.qf]=d:this.My.get("useHandCursor")!==!1&&d.forEach(function(l){var p;(p=l.get("useHandCursor")?b.qf:l.get("cursor"))&&(f[p]?f[p].push(l):f[p]=[l])});return f}}});
define("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController",["require","tdv/player/view/util/Device","tdv/player/script/PanoramaPoint"],function(a){function m(){this.dj=void 0;this.xM=this.cI=0;this.Rd=!0;this.u0=this.nla=this.Bfa=void 0;this.Ld=!1}var h=a("tdv/player/view/util/Device"),n=a("tdv/player/script/PanoramaPoint"),g=Math.PI/180,k=h.Tb()==h.Ji?[-.5,0]:[0,0];m.prototype.ZE=function(e){this.dj!=e&&(this.dj=e,this.Rd=!0)};m.prototype.XE=function(e){if(e<this.cI+k[0]||
e>this.cI+k[1])this.cI=e,this.Rd=!0};m.prototype.get=function(e,b){b!==void 0||(b=!0);this.Rd&&(this.za(),this.Rd=!1);var c=this.Bfa.get(e)||0;e=(this.nla.get(e)||0)-c;b&&(e>180?e-=360:e<-180&&(e+=360));return c+e*this.u0};m.prototype.Eoa=function(){this.Rd&&(this.za(),this.Rd=!1);for(var e=this.Bfa.get("vertices"),b=this.nla.get("vertices"),c=[],d=0;d<e.length;d++){var f=e[d].get("yaw")||0,l=(b[d].get("yaw")||0)-f;l>180?l-=360:l<-180&&(l+=360);var p=e[d].get("pitch")||0,q=(b[d].get("pitch")||0)-
p;c.push(new n(f+l*this.u0,p+q*this.u0))}e=this.eT&&this.eT.length==c.length;for(d=0;d<c.length&&e;d++)e=this.eT[d].get("yaw")==c[d].get("yaw")||this.eT[d].get("pitch")==c[d].get("pitch");return e?this.eT:this.eT=c};m.prototype.pw=function(){return this.get("opacity",!1)};m.prototype.yA=function(){var e=this.get("hfov")||this.get("vfov"),b=this.dj[0].get("hfov")||this.dj[0].get("vfov");return Math.tan(e*.5*g)/Math.tan(b*.5*g)};m.prototype.za=function(){for(var e=this.xM,b,c=this.dj.length-1,d,f;;){b=
Math.min(e+1,c);d=this.pza(e);f=this.pza(b);if(d<=this.cI&&this.cI<=f)break;if(d>this.cI){if(e==0){b=e;break}--e}else{if(e==c){b=e;break}e+=1}}this.Bfa=this.dj[e];this.nla=this.dj[b];e=f-d;this.u0=e>0?(this.cI-d)/e:0};m.prototype.pza=function(e){return this.dj[e].get("timestamp")};return m});
define("tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,
"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.ue,!0)},Cq:function(){m.da(this.C,"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.ue)},ue:function(){this.set("horizontalAlign",this.C.get("horizontalAlign"));this.set("verticalAlign",this.C.get("verticalAlign"));this.set("scale",this.C.get("scale"));this.set("scaleMode",this.C.get("scaleMode"));this.set("width",
this.C.get("width"));this.set("height",this.C.get("height"));this.set("offsetX",this.C.get("offsetX",this.C.get("width")*.5));this.set("offsetY",this.C.get("offsetY",this.C.get("height")*.5));this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},dg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("yaw",this.Ib.get("yaw")),this.set("pitch",this.Ib.get("pitch")),
this.set("roll",this.Ib.get("roll")),this.set("alpha",this.Ib.pw()))}}});
define("tdv/player/view/panorama/renderer/object/FlatHotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=0;a=m.extend(k,e,d,b,c,function(p){k.call(this);this.set("tag","FlatHotspotImage");this.set("id","flat_hs_image_"+l++);this.C=p;this.Sl.push(this.C);this.Rg=this.Rg.bind(this)});a.prototype.hc=function(){k.prototype.hc.call(this);h.ba(this.C,["image.levels"],this.Rg,!0)};a.prototype.mc=function(){h.da(this.C,["image.levels"],this.Rg);k.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("image",this.C.get("image"));this.set("level",
f.rfb(this.C))};a.prototype.za=function(p){this.II();k.prototype.za.call(this,p);this.W("inView")&&this.C.o(this.get("inView")?n.od:n.jd)};a.prototype.II=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.qF,this.get("panoramaId"));g.setAttribute(q,g.Eaa,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin",["require","tdv/constants/EventName","tdv/player/view/panorama/renderer/3d/util/SceneUtil"],function(a){var m=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");a={Ola:function(f){if(this.La){var l=this.M1a(f);l?(f=this.Oya(this).some(function(p){return l.intersectsObject(p)}),this.tka(f)):this.tka(!1)}},Oya:function(f){var l=f.get("meshGroup"),p=[];l&&l.traverse(function(q){q.geometry&&q.visible&&
(Array.isArray(q.material)?q.material.some(function(r){return r.opacity>0}):q.material.opacity>0)&&p.push(q)});f.Cb().forEach(function(q){p=p.concat(this.Oya(q))}.bind(this));return p}};var n=new THREE.Frustum,g=new THREE.PerspectiveCamera,k=90,e=.5,b=new THREE.Matrix4,c=Math.PI/180,d=180/Math.PI;a.M1a=function(f){f=h.getCamera(f.sh);if(!f)return null;var l=this.La.P.get("focusAreaScale");if(!g.projectionMatrix.equals(f.projectionMatrix)||!g.matrixWorldInverse.equals(f.matrixWorldInverse)||k!=f.fov||
e!=l){g.copy(f);var p=g.fov*.5*c;g.fov=2*Math.atan2(e*Math.sin(p),Math.cos(p))*d;g.updateProjectionMatrix();n.setFromProjectionMatrix(b.copy(g.projectionMatrix).multiply(g.matrixWorldInverse));k=f.fov;e=l}return n};a.rfa=function(){this.Tga=!1};a.sfa=function(){this.tka(!1)};a.ska=function(f){this.hya=f};a.tka=function(f){this.Tga!==f&&(this.Tga=f,this.hya&&this.hya.o(this.Tga?m.SUa:m.TUa))};return a});
define("tdv/player/view/panorama/renderer/object/Hotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/util/Device tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/events/ProgressEvent tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/Base"),k=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),e=a("tdv/player/view/panorama/renderer/object/util/EventAggregator");a("tdv/player/view/util/Device");var b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=a("tdv/view/events/ProgressEvent"),f=a("tdv/player/view/util/XR"),l=a("tdv/player/view/util/xr/pointer/PointerState");a=m.extend(g,
k,function(p){g.call(this);this.C=p;this.Sl.push(this.C);this.I3=this.I3.bind(this);this.H3=this.H3.bind(this);this.J3=this.J3.bind(this);this.$r(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","Hotspot");this.set("over",!1);this.set("centerOver",!1);this.set("enabled",!0);this.set("visible",!1);this.set("alpha",0);this.set("inVR",!1);this.set("overlaysEnabled",!0);this.set("enabledInVR",!0);this.set("enabledInVRWithGazePointer",!0);this.set("enabledInStandard",!0);this.set("interactionEnabled",
!0);this.set("centerOverDisplay",!1);this.set("rollOverDisplay",!1);this.set("loadingActive",!1);this.dda=this.eda=this.Eq=this.xe=this.sg=null;this.xj=[];this.cda=[];this.Fn=null;this.ska(this.C)});a.prototype.hc=function(){this.sg=(new e(n.ia)).ko(this.KH.bind(this));this.xe=(new e(n.xc)).mr(this.OH.bind(this));this.Eq=(new e(n.vd)).ko(this.Z4a.bind(this));this.eda=(new e(n.uc)).mr(this.S4a.bind(this));this.dda=(new e(n.Eb)).mr(this.R4a.bind(this));g.prototype.hc.call(this);h.ba(this.C,["items",
"rollOverItems","maps","rollOverMaps"],this.I3,!0);h.ba(this.C,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabledInVRWithGazePointer enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.J3,!0);h.ba(this.C,["areas"],this.H3,!0);this.rfa()};a.prototype.mc=function(){this.sfa();this.aO([],this.xj);this.Hla([],this.cda);this.sg.dispose();this.xe.dispose();this.Eq.dispose();this.eda.dispose();this.dda.dispose();h.da(this.C,["items",
"rollOverItems","maps","rollOverMaps"],this.I3);h.da(this.C,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabledInVRWithGazePointer enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.J3);h.da(this.C,["areas"],this.H3);this.get("visible")&&this.C.o(n.jd);g.prototype.mc.call(this)};a.prototype.I3=function(){this.set("items",this.La.xA(this.C.get("items",[])));this.set("rollOverItems",this.La.xA(this.C.get("rollOverItems",[])));this.set("maps",
this.La.xA(this.C.get("maps",[])));this.set("rollOverMaps",this.La.xA(this.C.get("rollOverMaps",[])));var p=[].concat(this.get("maps"),this.get("items"),this.get("rollOverMaps"),this.get("rollOverItems"));p.forEach(function(q){q.Okb(this.C)}.bind(this));this.get("items").forEach(function(q){q.set("projected",this.C.get("projected"))}.bind(this));this.bi(p);this.sg.jg(p);this.xe.jg(p);this.Eq.jg(p)};a.prototype.J3=function(){this.set("fadeInDuration",this.C.get("fadeInDuration"));this.set("fadeOutDuration",
this.C.get("fadeOutDuration"));this.set("enabled",this.C.get("enabled",!0));this.set("enabledInVR",this.C.get("enabledInVR"));this.set("enabledInStandard",this.C.get("enabledInStandard",!0));this.set("enabledInSurfaceSelection",this.C.get("enabledInSurfaceSelection",!0));this.set("enabledInVRWithGazePointer",this.C.get("enabledInVRWithGazePointer",this.C.get("enabledInVR")));this.set("centerOverDisplay",this.C.get("centerOverDisplay"));this.set("rollOverDisplay",this.C.get("rollOverDisplay",!1));
this.set("interactionEnabled",this.C.get("interactionEnabled",!0))};a.prototype.H3=function(){var p=this.C.get("areas");this.eda.jg(p);this.dda.jg(p)};a.prototype.za=function(p){this.Dn(p);g.prototype.za.call(this,p);this.set("inVR",p.Va);this.set("surfaceSelection",p.xZ);this.set("hotspotsEnabled",p.FJ);this.set("inVRWithGazePointer",p.Va&&f.ud.length===1&&f.ud[0].type===l.WB);this.ye(p);this.Ola(p)};a.prototype.ye=function(){if(this.W("items","rollOverItems","maps","rollOverMaps","over","centerOver",
"inVR","hotspotsEnabled","enabledInVR","enabledInStandard","enabledInVRWithGazePointer","surfaceSelection","enabledInSurfaceSelection","enabled","interactionEnabled","rollOverDisplay","centerOverDisplay")||this.Ia&&this.Ia.W("composedAlpha")){var p=!1,q=!1,r=this.get("hotspotsEnabled")&&this.get("enabled")&&(!this.get("inVR")||this.get("enabledInVR"))&&(!this.get("inVRWithGazePointer")||this.get("enabledInVRWithGazePointer"))&&(this.get("inVR")||this.get("enabledInStandard"))&&(!this.get("surfaceSelection")||
this.get("enabledInSurfaceSelection"))&&this.Ia&&this.Ia.get("composedAlpha")>0,t=this.get("interactionEnabled");r&&(p=this.get("centerOver")&&!this.get("inVR"),q=this.get("over")||p,p=!this.get("rollOverDisplay")&&!this.get("centerOverDisplay")||this.get("over")&&this.get("rollOverDisplay")||p&&this.get("centerOverDisplay")!==!1&&this.get("rollOverDisplay"));this.get("rollOverItems").forEach(function(y){y.set("visible",q);y.set("beamEnabled",r&&q&&t)});var u=this.get("rollOverItems").length==0;this.get("items").forEach(function(y){y.set("visible",
u||!q);y.set("beamEnabled",r&&(u||!q)&&t)});this.get("rollOverMaps").forEach(function(y){y.set("visible",!1);y.set("beamEnabled",r&&q&&t)});var v=this.get("rollOverMaps").length==0;this.get("maps").forEach(function(y){y.set("visible",!1);y.set("beamEnabled",r&&(v||!q)&&t)});this.set("visible",p)}if(this.W("visible")){p=this.get("alpha");var w=this.get("visible")?1:0,x=(this.get("visible")?this.get("fadeInDuration"):this.get("fadeOutDuration"))*Math.abs(p-w);this.Fn=new b("linear",[new c("alpha",p,
w)],Math.max(x,1));this.Na();this.get("visible")?this.C.o(n.od):this.C.o(n.jd)}};a.prototype.Dn=function(p){this.Fn&&(this.Fn.Ve()?this.Fn=null:(this.Fn.Nb(p.Af),this.set("alpha",this.Fn.ob("alpha"))),this.Na())};a.prototype.KH=function(){this.hh();this.o(n.ia)};a.prototype.Z4a=function(){this.hh();this.o(n.vd)};a.prototype.OH=function(){this.hh()};a.prototype.hh=function(){var p=0;this.xe.lw(function(q){var r=0,t;this.sg.Nn(q)?r=100:(t=this.xe.Nn(q))&&(r=t.percent);p+=r}.bind(this));this.o(new d(n.xc,
p/this.xe.zd.length))};a.prototype.S4a=function(p){p.data.center?this.Hla([p.source],[]):this.aO([p.source],[])};a.prototype.R4a=function(p){p.data.center?this.Hla([],[p.source]):this.aO([],[p.source])};a.prototype.aO=function(p,q){this.BGa(this.xj,p,q);this.set("over",this.xj.length>0)};a.prototype.Hla=function(p,q){this.BGa(this.cda,p,q);this.set("centerOver",this.cda.length>0)};a.prototype.BGa=function(p,q,r){q||(q=[]);r||(r=[]);r.forEach(function(t){t=p.indexOf(t);t>=0&&p.splice(t,1)});q.forEach(function(t){p.indexOf(t)<
0&&p.push(t)})};return a});
define("tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,
"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.ue,!0)},Cq:function(){m.da(this.C,"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.ue)},ue:function(){this.set("horizontalAlign",this.C.get("horizontalAlign"));this.set("verticalAlign",this.C.get("verticalAlign"));this.set("scaleMode",this.C.get("scaleMode"));this.set("distance",this.C.get("distance"));this.set("scale",this.C.get("scale"));this.set("playbackPositions",
this.C.get("playbackPositions"))},dg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("yaw",this.Ib.get("yaw")),this.set("pitch",this.Ib.get("pitch")),this.set("roll",this.Ib.get("roll")),this.set("rotationX",this.Ib.get("rotationX")),this.set("rotationY",this.Ib.get("rotationY")),this.set("hfov",this.Ib.get("hfov")),this.set("vfov",this.Ib.get("vfov")),this.set("alpha",this.Ib.pw()))}}});
define("tdv/player/view/panorama/renderer/object/HotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),
function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=0;a=m.extend(k,e,b,c,d,function(p){k.call(this);this.set("tag","HotspotImage");this.set("id","hs_image_"+l++);this.set("side",THREE.DoubleSide);this.set("wasInView",!1);this.C=p;this.Sl.push(this.C);this.Rg=this.Rg.bind(this)});a.prototype.hc=function(){k.prototype.hc.call(this);h.ba(this.C,["image.levels"],this.Rg,!0)};a.prototype.mc=function(){h.da(this.C,["image.levels"],this.Rg);k.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("image",
this.C.get("image"));this.set("level",f.zfb(this.C,this.get("panoramaPixelsPerDegree")))};a.prototype.za=function(p){this.II();k.prototype.za.call(this,p);this.W("inView")&&(p=this.get("inView"),p!==this.get("wasInView")&&(this.set("wasInView",p),this.C.o(p?n.od:n.jd)))};a.prototype.II=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.qF,this.get("panoramaId"));g.setAttribute(q,g.Eaa,this.get("id"))}.bind(this))}};
return a});
define("tdv/player/view/util/geo/Rectangle",["require","tdv/player/view/util/geo/Point","tdv/player/view/util/geo/Vector"],function(a){function m(g,k,e){this.Lg=g||new h(0,0,0);this.Ek=k||new h(1,0,0);this.CE=e||new h(0,1,0)}var h=a("tdv/player/view/util/geo/Point"),n=a("tdv/player/view/util/geo/Vector");m.prototype.clone=function(){return new m(this.Lg.clone(),this.Ek.clone(),this.CE.clone())};m.prototype.apply=function(g){g.yO(this.Lg);g.yO(this.Ek);g.yO(this.CE)};m.prototype.intersection=function(g,
k){var e=n.YD(g.Lg,g.Ek),b=n.YD(this.Lg,g.Lg),c=n.YD(this.Lg,this.Ek);c.d7(n.YD(this.Lg,this.CE));e=e.VO(c);if(!(e==0||k&&e<0))return k=-c.VO(b)/e,new h(g.Lg.x+(g.Ek.x-g.Lg.x)*k,g.Lg.y+(g.Ek.y-g.Lg.y)*k,g.Lg.z+(g.Ek.z-g.Lg.z)*k)};m.prototype.V9=function(g,k){var e=n.YD(this.Lg,this.Ek),b=n.YD(this.Lg,this.CE);g=n.YD(this.Lg,g);var c=e.Coa(),d=b.Coa();return k?new h(g.VO(e)/(c*c),g.VO(b)/(d*d),0):new h(g.VO(e)/c,g.VO(b)/d,0)};return m});
define("tdv/player/view/util/geo/Projection","require tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Frustum tdv/player/view/util/geo/Line tdv/player/view/util/geo/Point tdv/player/view/util/geo/Rectangle tdv/player/view/util/geo/Transformation tdv/view/constants/ScaleMode".split(" "),function(a){var m=a("tdv/player/view/util/geo/Fov"),h=a("tdv/player/view/util/geo/Frustum"),n=a("tdv/player/view/util/geo/Line"),g=a("tdv/player/view/util/geo/Point"),k=a("tdv/player/view/util/geo/Rectangle"),
e=a("tdv/player/view/util/geo/Transformation"),b=a("tdv/view/constants/ScaleMode"),c=Math.PI/180,d=180/Math.PI,f=new e,l=new h,p=new k,q=new g;return{get:function(r,t,u,v,w,x,y,z){r*=c;t*=c;t=new g(Math.sin(-r)*Math.cos(t),Math.sin(t),Math.cos(-r)*Math.cos(t));f.identity();f.rotateY(u*c);f.rotateZ(w*c);f.rotateX(v*c);t.apply(f);return t.z>0?(l.TRa(y),l.nRa(z),l.oK(x*c),l.project(t),t):null},tob:function(r,t,u){f.identity();f.rotateX(-u.Jc()*c);f.rotateZ(-u.zg()*c);f.rotateY(-u.Kc()*c);q.set(r,t,0);
r=u.unproject(q).ZLa();r.apply(f);return{Xa:r.Kc()*d,pitch:r.Jc()*d}},yqb:function(r,t,u,v,w,x,y,z,A,D,F,C,B,H){H||(H=b.GB);B||(B=m.wm(C,D,F));C||(C=m.Ar(B,D,F));var E=D*.5/Math.tan(C*.5*c),G=E*Math.tan(C*.5*c)*2,N=E*Math.tan(B*.5*c)*2;p.Lg.set(+G*.5,+N*.5,0);p.Ek.set(-G*.5,+N*.5,0);p.CE.set(+G*.5,-N*.5,0);f.identity();f.rotateZ(-A*c);f.rotateX(-y*c);f.rotateY(z*c);f.translate(0,0,E);f.rotateZ(-x*c);f.rotateX(-w*c);f.rotateY(-v*c);f.rotateY(u.Kc()*c);f.rotateZ(u.zg()*c);f.rotateX(u.Jc()*c);p.apply(f);
q.set(r,t,0);w=p.intersection(u.unproject(q));v={x:void 0,y:void 0,xScaled:void 0,yScaled:void 0};w&&w.z>0&&(w=p.V9(w),v.xScaled=v.x=w.x/G,v.yScaled=v.y=w.y/N);if(H!=b.GB){switch(H){case b.uj:var O=Math.min(m.Ar(B,D,F),C);var R=Math.min(m.wm(C,D,F),B);break;case b.Kr:O=Math.max(m.Ar(B,D,F),C);R=Math.max(m.wm(C,D,F),B);break;case b.Tp:O=C;R=m.wm(C,D,F);break;case b.Pk:O=m.Ar(B,D,F),R=B}if(O!=C||R!=B)G=E*Math.tan(O*.5*c)*2,N=E*Math.tan(R*.5*c)*2,p.Lg.set(+G*.5,+N*.5,0),p.Ek.set(-G*.5,+N*.5,0),p.CE.set(+G*
.5,-N*.5,0),p.apply(f),q.set(r,t,0),(w=p.intersection(u.unproject(q)))&&w.z>0&&(w=p.V9(w),v.xScaled=w.x/G,v.yScaled=w.y/N)}return v},Ppb:function(r,t,u,v,w,x,y){y=w*.5/Math.tan(y*.5*c);p.Lg.set(+w*.5,+x*.5,y);p.Ek.set(-w*.5,+x*.5,y);p.CE.set(+w*.5,-x*.5,y);f.identity();f.rotateZ(-v*c);f.rotateX(-u*c);f.rotateY(-t*c);f.rotateY(r.Kc()*c);f.rotateZ(r.zg()*c);f.rotateX(r.Jc()*c);p.apply(f);r=new n(new g(0,0,0),new g(0,0,1));return(r=p.intersection(r))&&r.z>0?(r=p.V9(r),{x:r.x/w,y:r.y/x}):null}}});
define("tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin",["require","tdv/constants/Priority","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/3d/util/MeshUtil","tdv/player/view/panorama/renderer/TextureLoader"],function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/TextureLoader"),k=Math.PI/
180;return{ly:function(){this.set("distance",void 0);this.set("width",100);this.set("height",100);this.set("offsetX",void 0);this.set("offsetY",void 0);this.set("centerX",0);this.set("centerY",0);this.set("roll",0);this.Lh=this.oC();this.Efa=h.SO();this.Io=new THREE.Matrix4;this.KL=new THREE.Matrix4;this.HN=new THREE.Matrix4;this.YAa=new THREE.Matrix4;this.rk=new THREE.Matrix4;this.vn=new THREE.Matrix4;this.Dj=new THREE.Matrix4},Xz:function(e){this.gt(e)},oM:function(){var e=this.get("meshGroup");
return e?n.tm(e)[0]:null},hq:function(){return[0].map(function(e){var b=this.KR();e=n.create(this.Lh[e],b);g.gB(e,g.Or);g.hB(e,g.Au);g.qK(e,m.WQ);g.oZ(e,1);return e}.bind(this))},oC:function(){return[h.SO()]},gt:function(e){var b=!1,c=!1;this.set("rendererYaw",e.Xa);this.set("rendererPitch",e.pitch);this.set("rendererRoll",e.Mg);this.set("rendererCameraFOV",e.lj);this.set("rendererWidth",e.width);this.set("rendererHeight",e.height);this.set("inVR",e.Va);if(this.W("distance","composedTranslationX",
"composedTranslationY","composedTranslationZ")){var d=this.get("composedTranslationX")==0&&this.get("composedTranslationY")==0&&this.get("composedTranslationZ")==0&&this.get("distance")!==void 0;this.set("z",d?h.qw(this.get("distance")):h.Et())}this.W("z")&&(this.Io.makeTranslation(0,0,-this.get("z")),c=!0);e.lj&&this.W("z","rendererCameraFOV")&&this.set("rendererHeightZ",Math.tan(e.lj*k*.5)*this.get("z")*2);e.camera&&this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth",
"rendererHeight","rendererHeightZ","inVR","centerX","centerY")&&(this.KL.copy(e.camera.matrixWorld),b=this.get("rendererHeightZ"),d=b*e.camera.aspect,d=(this.get("centerX")-e.width*.5)*d/e.width*.5,b=(e.height*.5-this.get("centerY"))*b/e.height*.5,this.HN.makeTranslation(d,b,0),b=!0);this.W("roll")&&(this.rk.makeRotationZ(this.get("roll")*k),b=!0);e.lj&&(c||this.W("rendererHeight","inVR","rendererHeightZ","width","height","flipHorizontally"))&&(c=e.Va?512/e.height:1,e=(this.get("flipHorizontally")?
-1:1)*this.get("width")*c,c*=this.get("height"),this.vn.makeScale(e,c,1),b=!0);this.W("width","height","offsetX","offsetY")&&(e=.5-this.get("offsetX")/this.get("width"),c=this.get("offsetY")/this.get("height")-.5,this.YAa.makeTranslation(e,c,0),b=!0);b&&(this.Dj.copy(this.KL),this.Dj.multiply(this.Io),this.Dj.multiply(this.HN),this.Dj.multiply(this.rk),this.Dj.multiply(this.vn),this.Dj.multiply(this.YAa),n.qt(this.get("meshGroup"),this.Dj))}}});
define("tdv/player/view/panorama/renderer/object/Sprite",["require","tdv/utils","tdv/player/view/panorama/renderer/object/ComposedWebGLObject","tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject");a=a("tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin");return m.extend(h,a,function(){h.call(this);this.set("tag","Sprite")})});
define("tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas",["require","tdv/player/view/util/Color"],function(a){function m(n,g,k,e,b,c){this.Lq=g;this.ja=document.createElement("canvas");this.ja.width=this.Lq;this.ja.height=this.Lq;switch(n){case m.JQ:this.l0a(k,e,b,c);break;case m.p_:this.m0a(k,e,b,c)}}var h=a("tdv/player/view/util/Color");m.prototype.hg=function(){return this.Lq};m.prototype.xg=function(){return this.Lq};m.prototype.If=function(){return this.ja};m.prototype.l0a=function(n,
g,k,e){var b=this.Lq*.5,c=this.Lq*.5,d=this.Lq*.5,f=this.ja.getContext("2d");g=h.Dp(g);for(var l=f.createRadialGradient(b,c,0,b,c,d),p=0;p<k.length;p++)l.addColorStop(e[p],"rgba("+g[0]+","+g[1]+","+g[2]+","+k[p]+")");f.fillStyle=l;f.globalAlpha=n;f.beginPath();f.arc(b,c,d,0,Math.PI*2,!0);f.closePath();f.fill()};m.prototype.m0a=function(n,g,k,e){var b=this.Lq*.5,c=this.Lq*.5,d=this.Lq*.5,f=this.ja.getContext("2d");f.clearRect(0,0,this.Lq,this.Lq);var l=h.Dp(g),p=f.createRadialGradient(b,c,0,b,c,d);
for(g=0;g<k.length;g++)p.addColorStop(e[g],"rgba("+l[0]+","+l[1]+","+l[2]+","+k[g]+")");f.fillStyle=p;f.globalAlpha=n;f.beginPath();for(g=0;g<6;g++)k=45*Math.PI/180+2*Math.PI*g/6,n=b+Math.cos(k)*d,k=c+Math.sin(k)*d,g==0?f.moveTo(n,k):f.lineTo(n,k);f.closePath();f.fill()};m.JQ="circle";m.p_="hexagon";return m});
define("tdv/player/view/panorama/renderer/object/LensFlare","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/util/geo/Projection tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/SolidFrame tdv/player/view/panorama/renderer/object/Sprite tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),
n=a("tdv/constants/EventName"),g=a("tdv/player/view/util/geo/Projection"),k=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/SolidFrame"),b=a("tdv/player/view/panorama/renderer/object/Sprite"),c=a("tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas"),d=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource");a=m.extend(k,function(l){k.call(this);this.C=l;this.Sl.push(this.C);this.Rg=this.Rg.bind(this);this.set("tag",
"LensFlare");this.set("translationAlpha",0);this.fda=this.TZa();this.vg=this.N_a();this.bi(this.fda.concat([this.vg]))});a.prototype.hc=function(){k.prototype.hc.call(this);this.o(n.vd);this.o(n.ia);h.ba(this.C,["yaw","pitch","bleaching","bleachingDistance"],this.Rg,!0)};a.prototype.mc=function(){h.da(this.C,["yaw","pitch","bleaching","bleachingDistance"],this.Rg);k.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("yaw",this.C.get("yaw"));this.set("pitch",this.C.get("pitch"));this.set("bleaching",
this.C.get("bleaching"));this.set("bleachingDistance",this.C.get("bleachingDistance"))};a.prototype.za=function(l){k.prototype.za.call(this,l);this.set("rendererYaw",l.Xa);this.set("rendererPitch",l.pitch);this.set("rendererRoll",l.Mg);this.set("rendererCameraFOV",l.lj);this.set("rendererWidth",l.width);this.set("rendererHeight",l.height);this.set("inVR",l.Va);if(this.W("composedTranslationX","composedTranslationY","composedTranslationZ")){var p=this.get("composedTranslationX"),q=this.get("composedTranslationY"),
r=this.get("composedTranslationZ");this.set("translationAlpha",Math.max(0,1-Math.sqrt(p*p+q*q+r*r)*10))}if(this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","inVR","yaw","pitch","translationAlpha","composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")){var t=l.Xa+this.get("composedDeltaYaw"),u=l.pitch+this.get("composedDeltaPitch"),v=l.Mg+this.get("composedDeltaRoll");p=this.get("translationAlpha");r=q=0;if(!l.Va&&(t=g.get(this.get("yaw"),
this.get("pitch"),t,u,v,l.lj,l.width,l.height))){var w=l.width*.5;var x=l.height*.5;var y=t.x;var z=t.y;w=(w-y)*2;x=(x-z)*2;r=Math.sqrt(w*w+x*x);t=Math.min(l.width,l.height);q=Math.max(0,Math.min(.7,1-r/Math.sqrt(l.width*l.width,l.height*l.height)))*p;l=this.get("bleaching");r=1-Math.max(0,Math.min(1,r/(t*this.get("bleachingDistance"))));r=l*r*p}for(l=0;l<this.fda.length;l++)p=this.fda[l],p.set("alpha",q),q>0&&(p.set("centerX",y+w*f[l].position),p.set("centerY",z+x*f[l].position));this.vg.set("alpha",
r)}};a.prototype.TZa=function(){return f.map(function(l){var p=(new c(l.form,l.DK,l.opacity,l.color,l.AJ,l.BJ)).If(),q=new d;q.bo(p);p=new b;p.set("textureSource",q);p.set("width",l.size);p.set("height",l.size);p.set("offsetX",l.size*.5);p.set("offsetY",l.size*.5);p.set("alpha",0);return p})};a.prototype.N_a=function(){return new e("#ffffff")};var f=[{form:c.p_,position:.1,size:52,DK:128,opacity:.8,color:"#FCFCFC",AJ:[1,.5],BJ:[0,.866]},{form:c.p_,position:.2,size:52,DK:128,opacity:.6,color:"#C8FCC8",
AJ:[1,.5],BJ:[0,.866]},{form:c.JQ,position:.36,size:112,DK:128,opacity:.5,color:"#C8C8FC",AJ:[1,.9,.6,0],BJ:[0,.2,.4,1]},{form:c.JQ,position:.47,size:32,DK:128,opacity:.3,color:"#96C8AF",AJ:[1,1,0],BJ:[0,.9,1]},{form:c.JQ,position:.65,size:52,DK:128,opacity:.7,color:"#FCFCFC",AJ:[.7,.7,.2,0],BJ:[0,.1,.4,1]},{form:c.p_,position:.88,size:128,DK:128,opacity:.4,color:"#AF96C8",AJ:[1,.5],BJ:[0,.866]},{form:c.JQ,position:1,size:33,DK:128,opacity:.8,color:"#C89696",AJ:[.8,.8,.6,0],BJ:[0,.2,.4,1]}];return a});
define("tdv/player/view/panorama/renderer/object/MenuButton","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/MenuCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){function m(p,q,r){p=(q-p)*(1-r);Math.abs(p)<1E-5&&(p=0);return q-p}var h=a("tdv/utils"),n=a("tdv/binding/BindingsHandler"),
g=a("tdv/constants/EventName"),k=a("tdv/player/view/panorama/renderer/object/Plane"),e=a("tdv/player/canvas/MenuCanvas"),b=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),c=a("tdv/view/util/Ease"),d=a("tdv/view/util/EaseDimension"),f=a("tdv/player/view/util/XR");a=h.extend(k,function(p){k.call(this);this.Yb=p;this.As=this.As.bind(this);this.zq=this.ja=null;this.Nz=this.qp=this.Cja=this.wz=void 0;this.Cwa=20;this.$g=null;this.Of=this.Yb.get("opacity",.5);this.wU=this.Yb.get("rollOverOpacity",
this.Of);this.v4a=1;this.y4a=.66;this.set("tag","MenuButton");this.set("visible",!1);this.set("over",!1);this.set("centerDistance",void 0)});a.prototype.hc=function(){k.prototype.hc.call(this);n.ba(this.Yb,["label"],this.As,!0)};a.prototype.mc=function(){n.da(this.Yb,["label"],this.As);k.prototype.mc.call(this)};a.prototype.As=function(){this.ja=null};a.prototype.za=function(p){this.ft(p);this.gh(p);this.HI(p);this.dg(p);this.ye(p);k.prototype.za.call(this,p)};a.prototype.ft=function(p){p.Va&&!this.zq&&
f.getType()==f.Lx.mo&&this.bi([this.zq=new k])};a.prototype.gh=function(){this.get("visible")&&(this.ja||(this.get("textureSource")||this.set("textureSource",new b),this.ja=new e(this.Yb,[this.Yb]),this.get("textureSource").bo(this.ja.If()),this.set("contentWidth",this.ja.hg()),this.set("contentHeight",this.ja.xg()),this.set("hfov",this.ja.jf()),this.set("distance",this.Yb.get("distance"))),this.ja.update()&&(this.get("textureSource").update(),this.Na()),this.W("over")&&this.ja.WE(this.get("over")?
0:-1))};a.prototype.HI=function(p){this.W("visible")&&(this.$g=new c("linear",[new d("displayCoef",this.get("visible")?0:1,this.get("visible")?1:0,void 0)],300));this.$g&&(this.$g.Ve()?this.$g=null:this.$g.Nb(p.Af))};a.prototype.dg=function(p){if(this.get("visible")||this.$g){this.qp=p.Xa;this.Nz=Math.min(90,Math.max(-90,this.Cwa+this.Cwa-p.pitch));if(this.W("visible")&&this.get("visible"))this.set("yaw",p.Xa),this.set("pitch",p.pitch);else{for(;this.qp+180<this.wz;)this.wz-=360;for(;this.qp-180>
this.wz;)this.wz+=360;var q=(this.qp-this.wz)/p.Af,r=(this.Nz-this.Cja)/p.Af,t=Math.atan2(r,q);r=Math.sqrt(r*r+q*q);r=Math.min(r,10*l);q=Math.cos(t)*r;t=Math.sin(t)*r;this.set("yaw",m(this.get("yaw"),this.qp+q,.02));this.set("pitch",m(this.get("pitch"),this.Nz+t,.02))}this.wz=this.qp;this.Cja=this.Nz;t=this.get("yaw")-p.Xa;p=this.get("pitch")-p.pitch;this.set("centerDistance",Math.sqrt(t*t+p*p))}};a.prototype.ye=function(){if(!this.get("visible")&&!this.$g)this.set("alpha",0);else if(this.W("over",
"centerDistance")||this.$g){var p=this.get("over")?this.wU:this.Of,q=this.y4a,r=this.get("centerDistance")/this.get("hfov");r<1&&(q+=(1-r)*(this.v4a-q),p+=(1-r)*(this.wU-p));this.$g&&(p*=this.$g.ob("displayCoef"),q*=this.$g.ob("displayCoef"));this.set("alpha",p);this.set("scale",q)}};a.prototype.ao=function(p){if(p.ag==g.Lm){var q=!1;this.get("visible")&&!p.qm()&&(q=this.Gy(p.Qs).length>0);q&&(p.LD(this.Yb),p.WI(this.Yb),p.om(this.get("distance")));this.get("over")!=q&&(this.get("over")&&this.Yb.o(g.Eb),
this.set("over",q),this.get("over")&&this.Yb.o(g.uc))}else p.ag==g.Yf&&this.get("visible")&&!p.qm()&&this.Gy(p.Qs).length>0&&(p.du(this.Yb),this.Yb.o(g.ma),this.o(g.ma))};var l=Math.PI/180;return a});
define("tdv/player/view/panorama/renderer/object/MenuPanel","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/MenuCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/Plane"),
k=a("tdv/player/canvas/MenuCanvas"),e=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=a("tdv/player/view/util/XR");a=m.extend(g,function(f,l){g.call(this);this.Yb=f;this.VC=l;this.As=this.As.bind(this);this.ja=null;this.Cja=this.wz=void 0;this.$g=null;this.Of=this.Yb.get("opacity",.5);this.wU=this.Yb.get("rollOverOpacity",this.Of);this.set("textureSource",new e);this.set("tag","MenuPanel");this.set("overIndex",
-1);this.set("selectedIndex",-1);this.yxa=!1});a.prototype.hc=function(){g.prototype.hc.call(this);h.ba(this.Yb,["label"],this.As,!0);this.VC.forEach(function(f){h.ba(f,["label"],this.As,!0)}.bind(this))};a.prototype.mc=function(){h.da(this.Yb,["label"],this.As);this.VC.forEach(function(f){h.da(f,["label"],this.As)}.bind(this));g.prototype.mc.call(this)};a.prototype.As=function(){this.ja=null};a.prototype.za=function(f){this.ft(f);this.gh(f);this.HI(f);this.dg(f);g.prototype.za.call(this,f)};a.prototype.b_a=
function(){this.ja||(this.ja=new k(this.Yb,this.VC),this.get("textureSource").bo(this.ja.If()),this.set("contentWidth",this.ja.hg()),this.set("contentHeight",this.ja.xg()),this.set("hfov",this.ja.jf()),this.set("distance",this.Yb.get("distance")))};a.prototype.gh=function(){this.ja||this.b_a();this.W("selectedIndex")&&this.ja.WE(this.get("selectedIndex"));this.W("overIndex")&&this.ja.WE(this.get("overIndex"));this.ja.update()&&(this.get("textureSource").update(),this.Na())};a.prototype.ft=function(f){f.Va&&
!this.zq&&d.getType()==d.Lx.mo&&this.bi([this.zq=new g])};a.prototype.HI=function(f){this.$g||this.yxa||(this.$g=new b("linear",[new c("alpha",0,1,void 0),new c("scale",0,1,void 0),new c("yaw",f.Xa,this.get("yaw"),void 0),new c("pitch",f.pitch,this.get("pitch"),void 0)],300));this.$g&&(this.$g.Ve()?(this.yxa=!0,this.$g=null):this.$g.Nb(f.Af))};a.prototype.dg=function(){if(this.$g){var f=this.get("overIndex")<0?this.Of:this.wU;this.set("alpha",f*this.$g.ob("alpha"));this.set("scale",this.$g.ob("scale"));
this.set("yaw",this.$g.ob("yaw"));this.set("pitch",this.$g.ob("pitch"))}else this.W("overIndex")&&(f=this.get("overIndex")<0?this.Of:this.wU,this.set("alpha",f))};a.prototype.ao=function(f){if(f.ag==n.Lm){var l=-1;if(!f.qm()){var p=this.Gy(f.Qs).filter(function(q){return q.source==this.ja.If()}.bind(this));p.length>0&&(l=this.ja.yoa(p[0].x,p[0].y))}l>=0&&(f.LD(this.VC[l]),f.WI(this.VC[l]),f.om(this.get("distance")));this.get("overIndex")>=0!=l>=0&&(l>0?this.o(n.uc):this.o(n.Eb));this.get("overIndex")!=
l&&(this.get("overIndex")>=0&&this.VC[this.get("overIndex")].o(n.Eb),this.set("overIndex",l),this.get("overIndex")>=0&&this.VC[this.get("overIndex")].o(n.uc))}else f.ag!=n.Yf||f.qm()||(p=this.Gy(f.Qs).filter(function(q){return q.source==this.ja.If()}.bind(this)),p.length>0&&(l=this.ja.yoa(p[0].x,p[0].y),l>=0&&(p=this.VC[l],this.set("selectedIndex",l),f.du(p),f.om(this.get("distance")),p.o(n.ma),this.o(n.ma,{item:p}))))};return a});
define("tdv/player/view/panorama/renderer/object/MenuPanels",["require","tdv/utils","tdv/constants/EventName","tdv/player/view/panorama/renderer/object/Base","tdv/player/view/panorama/renderer/object/MenuPanel"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/MenuPanel");a=m.extend(n,function(b){n.call(this);this.Yb=b;this.gD=[];this.fN=null;this.set("tag","MenuPanels");this.set("visible",
!1)});a.prototype.za=function(b){this.W("visible")&&this.get("visible")&&(this.set("yaw",b.Xa),this.set("pitch",b.pitch),this.Hva(this.Yb));n.prototype.za.call(this,b)};a.prototype.Hva=function(b){b=new g(this.Yb,b.get("children",[]));var c=this.get("yaw");this.Cb().forEach(function(d){c+=d.get("hfov")+e});b.set("yaw",c);b.set("pitch",this.get("pitch"));this.wXa(b);this.appendChild(b)};a.prototype.bEa=function(b){this.Cb().slice(b).forEach(function(c){this.i7a(c);c.remove()}.bind(this));this.gD=this.gD.filter(function(c){return this.Cb().indexOf(c)>=
0}.bind(this))};a.prototype.wXa=function(b){b.bind(h.uc,this.sDa,this,!0);b.bind(h.Eb,this.rDa,this,!0);b.bind(h.ma,this.qDa,this,!0)};a.prototype.i7a=function(b){b.h(h.uc,this.sDa,this,!0);b.h(h.Eb,this.rDa,this,!0);b.h(h.ma,this.qDa,this,!0)};a.prototype.sDa=function(b){this.gD.indexOf(b.source)<0&&(this.gD.push(b.source),this.gD.length==1&&this.Owa())};a.prototype.rDa=function(b){b=this.gD.indexOf(b.source);b>=0&&(this.gD.splice(b,1),this.gD.length==0&&this.R8a())};a.prototype.qDa=function(b){var c=
b.source;b=b.data.item;b.get("children",[]).length?(this.bEa(this.Cb().indexOf(c)+1),this.Hva(b)):this.Swa()};a.prototype.Swa=function(){this.set("visible",!1);this.bEa(0);this.Owa();this.o(h.CB)};a.prototype.Owa=function(){this.fN&&(clearTimeout(this.fN),this.fN=null)};a.prototype.R8a=function(){this.fN||(this.fN=setTimeout(function(){this.fN=null;this.Swa()}.bind(this),k))};var k=3E3,e=1;return a});
define("tdv/player/view/panorama/renderer/object/Menu","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/MenuButton tdv/player/view/panorama/renderer/object/MenuPanels".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/MenuButton"),k=a("tdv/player/view/panorama/renderer/object/MenuPanels");a=m.extend(n,
function(e){n.call(this);this.C=e;this.Sl.push(this.C);this.set("tag","Menu");this.set("visible",!1);this.je=new g(this.C);this.je.bind(h.ma,this.OYa,this,!1);this.bj=new k(this.C);this.bj.bind(h.CB,this.m6a,this,!1);this.bi([this.je,this.bj])});a.prototype.hc=function(){n.prototype.hc.call(this);this.o(h.vd);this.o(h.ia)};a.prototype.za=function(e){this.set("visible",e.Va);this.W("visible")&&(this.je.set("visible",this.get("visible")),this.bj.set("visible",!1));n.prototype.za.call(this,e)};a.prototype.OYa=
function(){this.je.set("visible",!1);this.bj.set("visible",!0)};a.prototype.m6a=function(){this.je.set("visible",this.get("visible"))};return a});
define("tdv/player/view/panorama/renderer/object/CustomPlane","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/view/events/ProgressEvent".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),
k=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),e=a("tdv/view/events/ProgressEvent");a=m.extend(n,function(){n.call(this);this.set("tag","CustomPlane");this.set("source",null);this.set("sourceUpdated",!1);this.set("sourceIsVideo",!1);this.xe=this.Nh=null});a.prototype.hc=function(){this.Nh=(new k(h.ia)).ko(this.zs.bind(this));this.xe=(new k(h.ia)).mr(this.oz.bind(this));n.prototype.hc.call(this)};a.prototype.mc=function(){this.Nh.dispose();this.xe.dispose();n.prototype.mc.call(this)};
a.prototype.za=function(b){var c=this.get("textureSource");this.W("source","sourceUpdated","sourceIsVideo")&&(c||this.set("textureSource",c=new g),this.W("source")&&c.bo(this.get("source")),this.W("sourceIsVideo")&&c.aZ(this.get("sourceIsVideo")),this.W("sourceUpdated")&&(c.update(),this.set("sourceUpdated",!1)));c&&c.pra(b.Jk>0);n.prototype.za.call(this,b);this.W("meshGroup")&&(b=(b=this.get("meshGroup"))&&b.children||[],b.length&&(this.Nh.jg(b),this.xe.jg(b)))};a.prototype.zs=function(){this.o(h.vd);
this.o(h.ia)};a.prototype.oz=function(b,c){var d=0;c.lw(function(f){(f=c.Nn(f))&&(d+=f.percent)});this.o(new e(h.xc,d/c.zd.length))};return a});
define("tdv/player/view/panorama/renderer/object/SurfaceSelector","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/CustomPlane tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas tdv/player/view/util/geo/Line tdv/player/view/util/geo/Rectangle".split(" "),function(a){function m(q,r,t){this.ig=q;this.ig.bind(g.L("distanceToFloor"),
this.za,this,!1);this.nl=r;this.nl.bind(g.L("yaw"),this.za,this,!1);this.nl.bind(g.L("distance"),this.za,this,!1);this.nl.bind(g.L("enabled"),this.za,this,!1);this.nl.bind(g.L("enabledInSurfaceSelection"),this.za,this,!1);this.Wb=null;this.Df=new b;this.Df.set("hfov",20);this.Df.set("vfov",20);this.Df.set("pitch",-90);this.Df.set("source",t.If());this.Df.set("contentWidth",t.hg());this.Df.set("contentHeight",t.xg());this.za()}var h=a("tdv/utils"),n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/EventName"),
k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),e=a("tdv/player/view/panorama/renderer/object/Base"),b=a("tdv/player/view/panorama/renderer/object/CustomPlane"),c=a("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas"),d=a("tdv/player/view/util/geo/Line"),f=a("tdv/player/view/util/geo/Rectangle");a=h.extend(e,function(q){e.call(this);this.i3=this.i3.bind(this);this.pv=this.pv.bind(this);this.f3=this.f3.bind(this);this.set("tag","SurfaceSelector");this.set("reticleVisible",
!1);this.set("enabled",!1);this.Ba=q;this.R_=[];this.iS=new f;this.il=new d;this.Qe=new b;this.Qe.set("hfov",20);this.Qe.set("vfov",20);this.Qe.set("pitch",-90);this.set("reticleCoef",1);this.bi([this.Qe])});a.prototype.hc=function(){this.A_a();e.prototype.hc.call(this);n.ba(this.Ba,["distanceToFloor"],this.i3,!0);n.ba(this.Ba,["adjacentPanoramas"],this.pv,!0);n.ba(this.La.ld,["adjacentPanoramaPositionsEnabled"],this.f3,!0);this.o(g.vd);this.o(g.ia)};a.prototype.mc=function(){e.prototype.mc.call(this);
n.da(this.Ba,["distanceToFloor"],this.i3);n.da(this.Ba,["adjacentPanoramas"],this.pv);n.da(this.La.ld,["adjacentPanoramaPositionsEnabled"],this.f3);this.FEa([])};a.prototype.i3=function(){var q=this.Ba.get("distanceToFloor");this.Qe.set("distance",q);q=k.qw(q);var r=k.Goa(q,90),t=k.Hoa(q,90);this.iS.Lg.set(-r*.5,-q,-t*.5);this.iS.Ek.set(r*.5,-q,-t*.5);this.iS.CE.set(-r*.5,-q,t*.5);this.lEa=q/k.Et()};a.prototype.pv=function(){this.FEa(this.Ba.get("adjacentPanoramas",[]))};a.prototype.f3=function(){this.pv()};
a.prototype.FEa=function(q){this.R_.forEach(function(r){r.clear()});this.R_=q.map(function(r){return new m(this.Ba,r,this.qja)}.bind(this));q=[];this.La.ld.get("adjacentPanoramaPositionsEnabled")&&(q=q.concat(this.R_.map(function(r){return r.Df})));q=q.concat([this.Qe]);this.bi(q)};a.prototype.za=function(q){e.prototype.za.call(this,q);this.set("enabled",q.xZ);this.pma();this.HD(q)};a.prototype.pma=function(){this.W("enabled","reticleVisible","composedTranslationX","composedTranslationY","composedTranslationZ",
"composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.Qe.set("alpha",this.get("reticleVisible")?1:0),this.set("alpha",!this.get("enabled")||this.get("composedTranslationX")||this.get("composedTranslationY")||this.get("composedTranslationZ")||this.get("composedDeltaYaw")||this.get("composedDeltaPitch")||this.get("composedDeltaRoll")?0:1),this.GGa())};a.prototype.A_a=function(){this.AN=new c(this.La.P);this.AN.setPosition(this.get("reticleCoef"));this.Qe.set("source",this.AN.If());this.Qe.set("contentWidth",
this.AN.hg());this.Qe.set("contentHeight",this.AN.xg());this.qja=new c(this.La.P);this.qja.setPosition(0);this.qja.update(1)};a.prototype.HD=function(q){this.W("reticleCoef")&&this.AN.setPosition(this.get("reticleCoef"));this.Qe.set("sourceUpdated",this.AN.update(q.Af))};a.prototype.ao=function(q){if(q.Tza)if(!this.get("enabled")||q.Qs.length==0||q.qm()||q.We())this.set("reticleVisible",!1);else{var r=q.Qs[0];this.il.Lg.set(r.origin.x,r.origin.y,r.origin.z);this.il.Ek.set(r.origin.x+r.direction.x,
r.origin.y+r.direction.y,r.origin.z+r.direction.z);if(r=this.iS.intersection(this.il,!0)){var t=this.iS.V9(r,!0),u=2*(.5-t.x);t=2*(.5-t.y);var v=l*Math.atan2(-u,t),w=-90+l*Math.atan2(Math.sqrt(u*u+t*t),1);if(w<-75||w>-1)this.set("reticleVisible",!1);else{var x={x:u*this.lEa,y:-t*this.lEa};q.Bw()||q.kpa()?q.ag==g.Lm&&(this.set("reticleVisible",!0),this.Qe.set("alpha",Math.min(1,(w- -75)/5)),this.Qe.set("translationX",x.x),this.Qe.set("translationZ",x.y)):this.set("reticleVisible",!1);var y=this.La.ld.get("surfaceSelectionHorizontalAngle")*
.5,z=this.La.ld.get("surfaceSelectionVerticalAngle")*.5;t=this.R_.map(function(A){return{nl:A.nl,JX:A.yfb(v),vertical:A.hgb(w),distance:A.H7(x)}}).filter(function(A){return A.JX<y&&A.vertical<z});t.length==0?this.set("reticleCoef",0):(t.sort(function(A,D){return A.distance-D.distance}),u=t[0].nl,this.set("reticleCoef",Math.max(0,Math.min(1,(1-t[0].JX/y)*(1-t[0].vertical/z)))),r=this.Ba.get("distanceToFloor")*Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z)/-r.y,q.kpa()&&q.Wbb([u]),q.om(r),q.ag==g.Yf?(q.du([u]),
this.get("blendingActive")||u.o(g.Xr)):(q.LD([u]),q.Bw()&&q.WI([u]),(r=this.La.P.get("displayTooltipInSurfaceSelection")&&u.get("panorama")&&u.get("panorama").get("label"))&&q.A6(r,0)))}}else this.set("reticleVisible",!1)}};m.prototype.clear=function(){this.ig.h(g.L("distanceToFloor"),this.za,this,!1);this.ig=null;this.nl.h(g.L("yaw"),this.za,this,!1);this.nl.h(g.L("distance"),this.za,this,!1);this.nl.h(g.L("enabled"),this.za,this,!1);this.nl.h(g.L("enabledInSurfaceSelection"),this.za,this,!1);this.nl=
null};m.prototype.yfb=function(q){if(!this.Wb)return Infinity;q=Math.abs(this.Wb.Xa-q);return q>180?360-q:q};m.prototype.hgb=function(q){return this.Wb?Math.abs(this.Wb.pitch-q):Infinity};m.prototype.H7=function(q){if(!this.YN)return Infinity;var r=q.x-this.YN.x;q=q.y-this.YN.y;return Math.sqrt(r*r+q*q)};m.prototype.za=function(){var q=this.nl.get("yaw"),r=this.nl.get("distance"),t=this.nl.get("enabled")&&this.nl.get("enabledInSurfaceSelection");if(q!==void 0&&r!==void 0&&t){t=this.ig.get("distanceToFloor");
var u=-90+Math.atan2(r,t)*l;this.Df.set("alpha",u<-1?1:0);this.Wb={Xa:q,pitch:u};u=k.qw(t)/k.Et();this.YN={x:-Math.sin(q*p)*r/t*u,y:-Math.cos(q*p)*r/t*u};this.Df.set("translationX",this.YN.x);this.Df.set("translationZ",this.YN.y);this.Df.set("distance",t)}else this.YN=this.Wb=null,this.Df.set("alpha",0)};var l=180/Math.PI,p=Math.PI/180;return a});
define("tdv/player/view/panorama/renderer/object/Panorama","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/view/events/ProgressEvent tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/SurfaceSelector tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/Preloader tdv/player/view/util/XR".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/view/events/ProgressEvent"),k=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/Plane"),b=a("tdv/player/view/panorama/renderer/object/SurfaceSelector"),c=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),d=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),f=a("tdv/player/view/util/Preloader"),l=a("tdv/player/view/util/XR"),p=0;a=m.extend(k,
function(t){k.call(this);this.C=t;this.Sl.push(this.C);this.NH=this.NH.bind(this);this.Qg=this.Qg.bind(this);this.pv=this.pv.bind(this);this.$r(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","Panorama");this.set("loadingActive",!1);this.set("blendingActive",!0);this.set("currentTime",0);this.set("adjacentPanoramas",[]);this.set("preloadEnabled",!0);this.set("backgroundPreloadEnabled",!0);this.set("surfaceSelectionEnabled",!1);this.set("id","panorama_"+p++);this.set("ready",
!1);this.q4=[];this.Eq=this.xe=this.sg=null;this.Yi=new q;this.IDa=new r;this.l$a=new b(this.C);this.xq=new r;this.bi([this.Yi,this.IDa,this.l$a,this.xq])});a.prototype.hc=function(){this.sg=(new c(n.ia)).ko(this.zs.bind(this));this.xe=(new c(n.xc)).mr(this.PH.bind(this));this.Eq=(new c(n.vd)).ko(this.c5a.bind(this));k.prototype.hc.call(this);this.get("blendingActive")&&this.La.set("globalBlendingActive",this.La.get("globalBlendingActive")+1);h.ba(this.C,["currentTime"],this.NH,!0);h.ba(this.C,["frames",
"overlays","vrMenu","flipImageHorizontally"],this.Qg,!0);h.ba(this.C,["adjacentPanoramas"],this.pv,!0)};a.prototype.mc=function(){this.sg.dispose();this.xe.dispose();this.Eq.dispose();this.get("blendingActive")&&this.La.set("globalBlendingActive",this.La.get("globalBlendingActive")-1);k.prototype.mc.call(this);h.da(this.C,["currentTime"],this.NH);h.da(this.C,["frames","overlays","vrMenu","flipImageHorizontally"],this.Qg);h.da(this.C,["adjacentPanoramas"],this.pv);this.Zka()};a.prototype.Qg=function(){function t(A,
D,F){A=y.indexOf(A);return A<0?F:w[A].get(D,F)}function u(A){return t(A,"projected",!1)}var v=this.La.xA(this.C.get("frames"));v.forEach(function(A){A.set("panoramaId",this.get("id"));A.set("flipHorizontally",this.C.get("flipImageHorizontally"))}.bind(this));var w=this.C.get("overlays"),x=this.La.xA(w),y=x.slice(),z=x.filter(function(A){return t(A,"projected",!1)||t(A,"required",!1)}).filter(function(A){return t(A,"enabled",!0)});this.C.get("vrMenu")&&x.push(this.La.xA(this.C.get("vrMenu")));x.forEach(function(A){A.set("panoramaId",
this.get("id"))}.bind(this));this.sg.jg(v.concat(x));this.xe.jg(v.concat(x));this.Eq.jg(v.concat(z));this.IDa.bi(x.filter(u));this.Yi.bi(v);this.xq.bi(x.filter(function(A){return!u(A)}));this.set("panoramaPixelsPerDegree",d.yLa(this.C));this.RGa()};a.prototype.NH=function(){this.set("currentTime",this.C.get("currentTime",0))};a.prototype.pv=function(){this.set("adjacentPanoramas",this.C.get("adjacentPanoramas",[]))};a.prototype.zs=function(){this.hh();this.o(n.ia)};a.prototype.c5a=function(){this.hh();
this.set("ready",!0);this.o(n.vd)};a.prototype.PH=function(){this.hh()};a.prototype.hh=function(){var t=0;this.xe.lw(function(u){var v=0,w;this.sg.Nn(u)?v=100:(w=this.xe.Nn(u))&&(v=w.percent);t+=v}.bind(this));this.o(new g(n.xc,t/this.xe.zd.length))};a.prototype.za=function(t){t.Va&&!this.zq&&l.getType()==l.Lx.mo&&this.bi([this.zq=new e].concat(this.Cb()));var u=this.get("blendingActive");this.set("blendingActive",this.get("alpha")<1);u!=this.get("blendingActive")&&this.La.set("globalBlendingActive",
this.La.get("globalBlendingActive")+(this.get("blendingActive")?1:-1));this.set("backgroundPreloadEnabled",this.La.dr().get("backgroundPreloadEnabled")!==!1);this.set("preloadEnabled",t.yY);this.W("adjacentPanoramas","loadingActive","preloadEnabled","backgroundPreloadEnabled")&&(this.get("loadingActive")&&this.get("backgroundPreloadEnabled")?this.T9a():this.Zka());this.W("index")&&this.RGa();k.prototype.za.call(this,t)};a.prototype.Zoa=function(){return d.Zoa(this.C,this.get("preloadEnabled"))};a.prototype.yqa=
function(){return d.yqa(this.C,this.get("preloadEnabled"))};a.prototype.T9a=function(){this.Zka();this.q4=this.get("adjacentPanoramas").map(function(t){t=t.get("panorama");return[t,d.wp(t,this.get("preloadEnabled"))]}.bind(this));this.q4.forEach(function(t){f.hIa(t[0],t[1]);f.X8(t[0],1)})};a.prototype.Zka=function(){this.q4.forEach(function(t){f.X8(t[0],-1);f.Qjb(t[0],t[1])});this.q4=[]};a.prototype.RGa=function(){var t=this.get("index");this.Yi.Cb().forEach(function(u,v,w){u.set("panoramaIndex",
t);u.set("frameIndex",v);u.set("frameCount",w.length)})};var q=m.extend(k,function(){k.call(this);this.$r(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("currentTime",0);this.set("tag","Group")});q.prototype.za=function(t){this.Cb().forEach(function(u,v,w){u.set("frontFrame",w[w.length-1])});k.prototype.za.call(this,t)};var r=m.extend(k,function(){k.call(this);this.$r(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",
!1);this.set("currentTime",0);this.set("tag","Group")});return a});
define("tdv/player/view/panorama/renderer/object/PanoramaFrame",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Frame","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/Frame"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=0;a=m.extend(h,function(){h.call(this);this.set("tag","PanoramaFrame");this.set("panoramaIndex",0);this.set("frameIndex",0);this.set("frameCount",1);this.set("id","frame_"+
g++)});a.prototype.za=function(k){h.prototype.za.call(this,k);this.II()};a.prototype.NI=function(){if(this.W("panoramaIndex","frameIndex","frameCount","meshGroup")){var k=this.get("meshGroup");if(k){var e=this.get("panoramaIndex"),b=this.get("frameIndex"),c=this.get("frameCount"),d=k.children.length;k.children.forEach(function(f,l){n.O$(f,e+(l+b/c)/d)}.bind(this))}}};a.prototype.II=function(){if(this.W("meshGroup","panoramaId","id")){var k=this.get("meshGroup");k&&k.children.forEach(function(e,b){n.setAttribute(e,
n.qF,this.get("panoramaId"));n.setAttribute(e,n.Daa,b);n.setAttribute(e,n.NK,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/ImagePanoramaFrame","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/PanoramaFrame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/TextureLoader tdv/view/events/ProgressEvent".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),k=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/PanoramaFrame"),b=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),c=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),d=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),f=a("tdv/player/view/panorama/renderer/TextureLoader"),l=a("tdv/view/events/ProgressEvent");
a=m.extend(e,function(q){e.call(this);this.set("tag","ImagePanoramaFrame");this.CDa=!0;this.C=q;this.Sl.push(this.C);this.dm=this.Nh=this.Eq=null;this.yha=[];this.Qg=this.Qg.bind(this);this.$r(["loadingActive","currentTime","panoramaId","panoramaPixelsPerDegree"]);this.bi([this.xq=new p])});a.prototype.hc=function(){this.Eq=new b(n.ia);this.Nh=new b(n.ia);this.dm=new b(n.xc);e.prototype.hc.call(this);h.ba(this.C,["overlays"],this.Qg,!0)};a.prototype.mc=function(){this.Eq.dispose();this.Nh.dispose();
this.dm.dispose();h.da(this.C,["overlays"],this.Qg);e.prototype.mc.call(this)};a.prototype.Qg=function(){this.xq.bi(this.La.xA(this.C.get("overlays")));this.yGa()};a.prototype.yGa=function(){this.Nh.jg([].concat(this.yha,this.xq.Cb()));this.dm.jg([].concat(this.yha,this.xq.Cb()))};a.prototype.hq=function(){var q=[],r=[],t=[];c.Boa(this.C,this.CDa).forEach(function(u,v){var w=d.Fdb(this.C,u);c.Dhb(u)?(v==0&&(q=q.concat(w),r=r.concat(w)),f.hB(w,v==0?f.Au:f.s_),f.gB(w,v==0?f.Or:f.Qba)):(v==0&&(q=q.concat(w)),
r=r.concat(w),f.hB(w,f.Au),f.gB(w,f.Or));f.qK(w,v==0?g.dca:g.Jm);f.oZ(w,v);t=t.concat(w)}.bind(this));this.Eq.jg(q);this.yha=r;this.yGa();this.Nh.ko(this.zs.bind(this));this.Eq.ko(this.I5a.bind(this));this.dm.mr(this.PH.bind(this));this.o(new l(n.xc,0));return t};a.prototype.I5a=function(){this.o(n.vd)};a.prototype.zs=function(){this.o(n.ia)};a.prototype.za=function(q){this.CDa=q.yY;this.Oab();e.prototype.za.call(this,q)};a.prototype.Oab=function(){var q=this.get("frontFrame");if(this.W("frontFrame")||
q&&q.W("alpha"))q=q&&q!=this?1-q.get("alpha"):1,this.xq.set("alpha",q)};a.prototype.PH=function(){var q=0;this.dm.lw(function(r){var t=0,u;this.Nh.Nn(r)?t=100:(u=this.dm.Nn(r))&&(t=u.percent);q+=t}.bind(this));this.o(new l(n.xc,q/this.dm.zd.length))};var p=m.extend(k,function(){k.call(this);this.$r(["loadingActive","panoramaId","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("tag","Group")});return a});
define("tdv/player/view/panorama/renderer/object/ImagePlane","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/view/events/ProgressEvent".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),
k=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),e=a("tdv/view/events/ProgressEvent");a=m.extend(n,function(){n.call(this);this.set("tag","ImagePlane");this.set("url",null);this.xe=this.sg=null});a.prototype.hc=function(){this.sg=(new k(h.ia)).ko(this.zs.bind(this));this.xe=(new k(h.xc)).mr(this.oz.bind(this));n.prototype.hc.call(this)};a.prototype.mc=function(){this.sg.dispose();this.xe.dispose();n.prototype.mc.call(this)};a.prototype.za=function(b){if(this.W("url")){var c=this.get("url");
c=c?new g(c):null;this.set("textureSource",c)}n.prototype.za.call(this,b);this.W("meshGroup")&&(b=(b=this.get("meshGroup"))&&b.children||[],b.length&&(this.sg.jg(b),this.xe.jg(b)))};a.prototype.zs=function(){this.o(h.vd);this.o(h.ia)};a.prototype.oz=function(b,c){var d=0;c.lw(function(f){(f=c.Nn(f))&&(d+=f.percent)});this.o(new e(h.xc,d/c.zd.length))};return a});
define("tdv/player/view/panorama/renderer/object/control/CueController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/constants/PlaybackState tdv/view/av/VideoPlayer".split(" "),function(a){function m(c,d){this.Vd=c;this.ra=d;this.am=!1;this.hk=[];this.Go=this.XL=void 0;this.bf=[];this.IYa();this.fea();this.v5();this.Hj()}function h(c,d,f){this.time=c;this.cue=d;this.action=f}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/events/Event"),e=a("tdv/constants/PlaybackState"),
b=a("tdv/view/av/VideoPlayer");m.prototype.clear=function(){this.BR();this.hk=[];this.dab();this.ra=this.Vd=null};m.prototype.IYa=function(){this.ra.bind(b.Dg,this.Nf,this,!0);this.ra.bind(g.Pd,this.Hj,this,!0);this.ra.bind(g.Ub,this.dD,this,!0)};m.prototype.dab=function(){this.ra.h(b.Dg,this.Nf,this,!0);this.ra.h(g.Pd,this.Hj,this,!0);this.ra.h(g.Ub,this.dD,this,!0)};m.prototype.Hj=function(){var c=this.ra.getState()!=e.ca;this.am!=c&&((this.am=c)?this.v5():this.BR())};m.prototype.dD=function(){this.SI()};
m.prototype.Nf=function(){this.SI()};m.prototype.v5=function(){this.Go=this.XL=0};m.prototype.SI=function(){if(this.ra&&this.am){var c=this.bf.slice(),d=this.ra.getCurrentTime(),f=d-this.XL;f<0&&(this.bf=[],this.Go=0);f=f>=0&&f<2;this.XL=d;var l;for(l=this.Go;l<this.hk.length&&!(this.hk[l].time>d);l++);for(;this.Go<l;this.Go++)d=this.hk[this.Go],d.action=="start"?(this.bf=n.union(this.bf,[d.cue]),f&&d.cue.o(new k(g.Dr))):(this.bf=n.union(this.bf,[d.cue]),f&&d.cue.o(new k(g.Ub)));c.length==this.bf.length&&
n.intersection(c,this.bf).length==this.bf.length||this.YV()}};m.prototype.BR=function(){this.bf.length>0&&(this.bf=[],this.YV())};m.prototype.YV=function(){this.Vd.o(new k(g.Bl,{activeCues:this.bf.slice()}))};m.prototype.fea=function(){this.hk=[];this.Vd.get("cues",[]).forEach(c=>{this.hk.push(new h(c.get("startTime",0),c,"start"));this.hk.push(new h(c.get("endTime",Number.POSITIVE_INFINITY),c,"end"))});this.hk.sort(function(c,d){return c.time==d.time?c.action==d.start?0:c.action=="start"?-1:1:c.time-
d.time})};return m});
define("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState","tdv/events/Event","tdv/view/av/VideoPlayer"],function(a){function m(e,b,c){this.Je=e;this.Vd=b;this.ra=c;this.ra.setCurrentTime(this.og=this.Vd.get("currentTime",0));this.ra.Bg(this.vf=this.Je.get("mute",!1));this.ra.Zc(this.I=this.Vd.get("state",n.ca));this.ra.setLoop(this.Ql=this.Vd.get("loop"));this.ac=this.ra.mj();this.yXa();this.FXa();this.Qx()}
var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=a("tdv/view/av/VideoPlayer");m.prototype.clear=function(){this.j7a();this.p7a();this.Bz();this.ra.Zc(n.ca);this.Vd.set("state",n.ca);this.Vd.set("currentTime",0);this.Vd.set("duration",void 0)};m.prototype.dDa=function(){var e=this.Vd.get("state",n.ca);this.I!=e&&this.ra.Zc(this.I=e)};m.prototype.bDa=function(){var e=this.Vd.get("currentTime",0);this.og!=e&&this.ra.setCurrentTime(this.og=e)};m.prototype.hU=
function(){var e=this.Je.get("mute",0);this.vf!=e&&this.ra.Bg(this.vf=e)};m.prototype.cDa=function(){var e=this.Vd.get("loop");this.Ql!=e&&this.ra.setLoop(this.Ql=e)};m.prototype.rU=function(){this.Vd.set("currentTime",this.og=this.ra.getCurrentTime())};m.prototype.pU=function(){this.Vd.set("duration",this.ac=this.ra.mj())};m.prototype.qU=function(){this.Vd.set("state",this.I=this.ra.getState())};m.prototype.sU=function(){this.Vd.o(new g(h.Ub))};m.prototype.yXa=function(){this.Je.bind(h.L("mute"),
this.hU,this,!0)};m.prototype.j7a=function(){this.Je.h(h.L("mute"),this.hU,this,!0)};m.prototype.FXa=function(){this.Vd.bind(h.L("state"),this.dDa,this,!0);this.Vd.bind(h.L("currentTime"),this.bDa,this,!0);this.Vd.bind(h.L("loop"),this.cDa,this,!0)};m.prototype.p7a=function(){this.Vd.h(h.L("state"),this.dDa,this,!0);this.Vd.h(h.L("currentTime"),this.bDa,this,!0);this.Vd.h(h.L("loop"),this.cDa,this,!0)};m.prototype.Qx=function(){this.ra.bind(k.Dg,this.rU,this,!0);this.ra.bind(k.Zj,this.pU,this,!0);
this.ra.bind(h.Pd,this.qU,this,!0);this.ra.bind(h.Ub,this.sU,this,!0)};m.prototype.Bz=function(){this.ra.h(k.Dg,this.rU,this,!0);this.ra.h(k.Zj,this.pU,this,!0);this.ra.h(h.Pd,this.qU,this,!0);this.ra.h(h.Ub,this.sU,this,!0)};return m});
define("tdv/player/view/panorama/renderer/object/VideoPanoramaFrame","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ImagePlane tdv/player/view/panorama/renderer/object/PanoramaFrame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/object/control/CueController tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/Device tdv/player/view/util/geo/Quaternion tdv/view/av/SubtitleController tdv/view/av/VideoPlayer tdv/view/events/ProgressEvent tdv/view/util/Assets tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/view/panorama/renderer/object/ImagePlane"),e=a("tdv/player/view/panorama/renderer/object/PanoramaFrame"),b=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),c=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),d=a("tdv/player/view/panorama/renderer/object/control/CueController"),f=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),
l=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),q=a("tdv/player/view/panorama/renderer/TextureLoader"),r=a("tdv/player/view/util/Device"),t=a("tdv/player/view/util/geo/Quaternion"),u=a("tdv/view/av/SubtitleController"),v=a("tdv/view/av/VideoPlayer"),w=a("tdv/view/events/ProgressEvent"),x=a("tdv/view/util/Assets"),y=a("tdv/view/util/Ease"),z=a("tdv/view/util/EaseDimension");a=m.extend(e,function(E){e.call(this);this.C=E;
this.Sl.push(this.C);this.$r(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","VideoPanoramaFrame");this.set("frameEmpty",void 0);this.set("hasStableContent",void 0);this.c1=void 0;this.set("atStart",void 0);l.get(this.C)==l.Pr?this.Bma=this.C.get("sphere"):this.Bma=this.C.get("stereoSphere");this.am=!1;this.hb=v.zk(this.Bma);this.dja=this.xxa=!1;this.kO=[];this.eI=[];this.ip=this.$l=this.dm=this.Nh=this.Th=this.ra=null;this.rn=!1;this.hAa=this.NC=this.OC=0});a.prototype.hc=
function(){this.Nh=(new b(h.ia)).ko(this.zs.bind(this));this.dm=(new b(h.xc)).mr(this.PH.bind(this));this.ra=new v(this.La.dr(),this.Bma);this.fs=new d(this.C.cE(),this.ra);this.Ua=new f(this.La.dr(),this.C.cE(),this.ra);this.yn=new u(this.C.cE(),this.ra);this.Qx();this.F_a();this.xxa=this.La.ld.get("displayPlayOverlay");this.dja=this.La.ld.get("clickAction")=="play_pause";var E=this.La.Jf(this.C.cE());E.appendChild(this.$l);E.appendChild(this.ip);e.prototype.hc.call(this)};a.prototype.mc=function(){this.Nh.dispose();
this.dm.dispose();this.Bz();this.fs.clear();this.fs=null;this.Ua.clear();this.Ua=null;this.yn.clear();this.yn=null;this.ra.clear();this.Th=this.ra=null;this.Exa();e.prototype.mc.call(this)};a.prototype.F_a=function(){this.Exa();this.$l=this.kxa(x.Fx,x.jL,x.w_);this.ip=this.kxa(x.iL,x.OVa,x.NVa)};a.prototype.kxa=function(E,G,N){var O=new k;O.set("url",E);O.set("contentWidth",G);O.set("contentHeight",N);O.set("hfov",10);O.set("yaw",0);O.set("pitch",0);O.set("alpha",0);return O};a.prototype.Exa=function(){this.$l&&
(this.$l.remove(),this.$l=null);this.ip&&(this.ip.remove(),this.ip=null)};a.prototype.hq=function(){this.kO=c.Wdb(this.C,this.hb);this.ubb=q.EK(p.bE(this.kO[0])[0]);this.kO.forEach(function(G){q.hB(G,q.Au);q.gB(G,q.Or)});this.hb.get("posterURL")?(this.eI=c.Xdb(this.C,this.hb),this.eI.forEach(function(G){q.hB(G,q.Au);q.gB(G,q.Or);q.qK(G,n.dca)})):this.eI=[];var E=[].concat(this.kO,this.eI);this.Nh.jg(E);this.dm.jg(E);this.o(new w(h.xc,0));return E};a.prototype.za=function(E){this.Rab(E);var G=this.ra.G7();
this.set("frameEmpty",G.isEmpty());this.set("atStart",!(this.get("currentTime")>1));this.Rla();e.prototype.za.call(this,E);this.Th&&this.Th.isEqual(G)?this.ra.getState()==g.PLAYING&&this.Na():(this.Th=G,this.ubb.bo(this.Th.$u),this.Na());this.ra.cu(H.makeRotationFromQuaternion(t.jX(E.Xa,E.pitch,E.Mg,B)))};a.prototype.Rla=function(){this.get("frameEmpty")?this.set("hasStableContent",!1):this.get("currentTime")>this.c1+.2?this.set("hasStableContent",!0):this.get("currentTime")==0&&this.qha>this.ra.mj()-
.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.W("frameEmpty")&&!this.get("frameEmpty")&&(this.c1=this.get("currentTime"));!this.get("frameEmpty")&&this.get("currentTime")>0&&(this.qha=this.get("currentTime"))};a.prototype.Dn=function(){this.W("composedAlpha","meshGroup","frameEmpty","hasStableContent","atStart")&&(this.eI.length&&!this.get("hasStableContent")&&this.get("atStart")?(this.eI.forEach(function(E){p.nf(E,this.get("composedAlpha"))}.bind(this)),this.kO.forEach(function(E){p.nf(E,
0)}.bind(this))):(this.eI.forEach(function(E){p.nf(E,0)}.bind(this)),this.kO.forEach(function(E){p.nf(E,this.get("composedAlpha"))}.bind(this))))};a.prototype.zs=function(){this.o(h.vd);this.o(h.ia)};a.prototype.PH=function(E,G){var N=0;G.lw(function(O){(O=G.Nn(O))&&(N+=O.percent)});this.o(new w(h.xc,N/G.zd.length))};a.prototype.Hj=function(){this.Na()};a.prototype.Nf=function(){this.Na()};a.prototype.ao=function(E){if(E.ag==h.Yf&&!E.qm()&&this.dja&&(E.du(this.C),E=Date.now(),!(E-this.hAa<500))){this.hAa=
E;E=this.C.cE();var G=E.get("state");G==g.PLAYING?E.set("state",g.$b):G==g.$b&&E.set("state",g.PLAYING)}};a.prototype.Rab=function(E){if(this.dja){if(this.rn!=(this.ra.getState()==g.$b))if(this.rn=!this.rn,this.xxa){var G=this.$l.get("alpha"),N=this.rn?1:0;this.sz=new y("linear",[new z("playAlpha",G,N),new z("playScale",E.Va?1.5:1,E.Va?1.5:1),new z("pauseAlpha",0,0),new z("pauseScale",1,1)],Math.abs(N-G)*A);this.$l.yi()}else this.sz=new y("linear",this.rn?[new z("playAlpha",0,0),new z("playScale",
1,1),new z("pauseAlpha",0,2),new z("pauseScale",.5,1.5)]:[new z("playAlpha",0,2),new z("playScale",.5,1.5),new z("pauseAlpha",0,0),new z("pauseScale",1,1)],D),this.$l.yi(),this.ip.yi();this.sz&&(this.sz.Nb(E.Af),G=this.sz.ob("playAlpha"),this.$l.set("alpha",G<1?G:2-G),this.$l.set("scale",this.sz.ob("playScale")),G=this.sz.ob("pauseAlpha"),this.ip.set("alpha",G<1?G:2-G),this.ip.set("scale",this.sz.ob("pauseScale")),this.Na(),this.sz.Ve()&&(this.sz=null));this.$l.get("alpha")>0&&(this.get("globalBlendingActive")&&
this.$l.set("alpha",0),this.$l.set("yaw",E.Xa),this.$l.set("pitch",E.pitch),this.$l.set("hfov",this.gza(E)));this.ip.get("alpha")>0&&(this.get("globalBlendingActive")&&this.ip.set("alpha",0),this.ip.set("yaw",E.Xa),this.ip.set("pitch",E.pitch),this.ip.set("hfov",this.gza(E)))}};var A=300,D=600;a.prototype.gza=function(E){return E.Va?15:2*Math.atan((r.ub()?Math.min(E.width,E.height)/100*20:x.jL)*Math.tan(E.Wd*F*.5)/E.width)*C};var F=Math.PI/180,C=180/Math.PI;a.prototype.Qx=function(){this.ra.bind(v.Dg,
this.Nf,this,!0);this.ra.bind(h.Pd,this.Hj,this,!0)};a.prototype.Bz=function(){this.ra.h(v.Dg,this.Nf,this,!0);this.ra.h(h.Pd,this.Hj,this,!0)};var B=new THREE.Quaternion,H=new THREE.Matrix4;return a});
define("tdv/player/view/panorama/renderer/object/Popup","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/SolidFrame tdv/player/view/panorama/renderer/object/CustomPlane tdv/player/view/panorama/renderer/object/ImagePlane tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/ColorPicker tdv/player/view/util/geo/Fov tdv/view/core/UIComponent tdv/view/events/ProgressEvent tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/av/VideoPlayer".split(" "),function(a){function m(C){setTimeout(C,
0)}function h(C,B){for(C-=B;C>180;)C-=360;for(;C<-180;)C+=360;return C+B}var n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),k=a("tdv/constants/EventName"),e=a("tdv/constants/PlaybackState");a("tdv/player/view/panorama/renderer/3d/util/Util");var b=a("tdv/player/view/panorama/renderer/object/Base"),c=a("tdv/player/view/panorama/renderer/object/SolidFrame"),d=a("tdv/player/view/panorama/renderer/object/CustomPlane"),f=a("tdv/player/view/panorama/renderer/object/ImagePlane"),l=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),
p=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"),q=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),r=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),t=a("tdv/player/view/util/ColorPicker"),u=a("tdv/player/view/util/geo/Fov"),v=a("tdv/view/core/UIComponent"),w=a("tdv/view/events/ProgressEvent"),x=a("tdv/view/util/Ease"),y=a("tdv/view/util/EaseDimension"),z=a("tdv/view/av/VideoPlayer"),A=Math.PI/180;a=n.extend(b,function(C){b.call(this);
this.C=C;this.Sl.push(this.C);this.Qg=this.Qg.bind(this);this.K3=this.K3.bind(this);this.$r(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","Popup");this.set("inVR",!1);this.set("enabledInStandard",!0);this.set("interactionEnabled",!0);this.set("loadingActive",!1);this.set("frameEmpty",!0);this.set("state",e.ca);this.set("itemVisible","none");this.set("visible",!1);this.set("visiblePosition",0);this.set("alpha",0);this.set("over",!1);this.set("gazeOver",!1);this.set("video",
null);this.set("image",null);this.set("actualVisible",!1);this.ae=this.Lb=this.lb=this.xe=this.sg=null;this.Ib=new p;this.Yx=this.LC=this.Fn=this.Th=this.ra=null});a.prototype.hc=function(){this.sg=(new q(k.ia)).ko(this.KH.bind(this));this.xe=(new q(k.xc)).mr(this.OH.bind(this));b.prototype.hc.call(this);this.UZa();this.appendChild(this.ae);g.ba(this.C,D,this.Qg,!0);g.KD(this.C,F,this.K3,!0)};var D="playbackPositions popupDistance popupMaxHeight popupMaxWidth image.levels.url video state".split(" "),
F=["visible"];a.prototype.mc=function(){this.sg.dispose();this.xe.dispose();g.da(this.C,D,this.Qg);g.da(this.C,F,this.K3);this.OG();this.zC();this.Zu();b.prototype.mc.call(this)};a.prototype.Qg=function(){var C=r.Tfb(this.C,this.get("panoramaPixelsPerDegree"));this.set("imageURL",C&&C.get("url"));this.set("imageWidth",C&&C.get("width"));this.set("imageHeight",C&&C.get("height"));this.set("video",this.C.get("video"));this.set("state",this.C.get("state"));this.set("popupDistance",this.C.get("popupDistance"));
this.set("popupMaxWidth",this.C.get("popupMaxWidth"));this.set("popupMaxHeight",this.C.get("popupMaxHeight"));this.set("playbackPositions",this.C.get("playbackPositions"))};a.prototype.K3=function(){this.set("visible",this.C.get("visible"))};a.prototype.za=function(C){this.pD=C.Xa;this.oD=C.pitch;this.ft(C);this.Sab();this.jW(C);this.ye(C);this.Eab(C);this.nab(C);b.prototype.za.call(this,C)};a.prototype.Sab=function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),
this.Ib.XE(this.get("currentTime")),this.set("sourceYaw",this.Ib.get("yaw")),this.set("sourcePitch",this.Ib.get("pitch")),this.set("sourceRotationX",this.Ib.get("rotationX")),this.set("sourceRotationY",this.Ib.get("rotationY")),this.set("sourceRotationZ",this.Ib.get("rotationZ")),this.set("sourceHFOV",this.Ib.get("hfov")))};a.prototype.ft=function(){if(this.W("video","imageURL")){var C=[this.ae];this.W("imageURL")&&(this.MR(),this.lb&&C.push(this.lb),this.dV("itemVisible"));this.W("video")&&(this.OR(),
this.Lb&&C.push(this.Lb),this.dV("itemVisible"));this.sg.jg(C);this.xe.jg(C);this.bi(C)}};a.prototype.jW=function(){if(this.ra){var C=this.ra.G7();this.set("frameEmpty",!!C&&C.isEmpty());!this.Th||C&&!this.Th.isEqual(C)?(this.Th=C,this.Lb.set("source",this.Th.$u),this.Lb.set("sourceUpdated",!0),this.Na()):this.ra.getState()==e.PLAYING&&this.Na()}else this.set("frameEmpty",!1)};a.prototype.ye=function(C){this.set("inVR",C.Va);this.set("hotspotsEnabled",C.FJ);this.set("rendererYaw",C.Xa);this.set("rendererPitch",
C.pitch);this.set("rendererRoll",C.Mg);this.set("rendererWidth",C.Sj);this.set("rendererHeight",C.Rj);this.set("rendererHFOV",C.Wd);if(this.W("visible")){var B=this.get("visiblePosition"),H=this.get("visible")?1:0,E=Math.max(1,this.C.get(this.get("visible")?"showDuration":"hideDuration")*Math.abs(H-B)),G=this.C.get(this.get("visible")?"showEasing":"hideEasing");B!=H&&(this.Fn=new x(G,[new y("position",B,H)],E));this.get("visible")||(this.set("actualVisible",!1),this.ra&&this.ra.Zc(e.ca))}this.Fn&&
(this.Fn.Ve()?(this.Fn=null,this.get("visible")?(this.set("actualVisible",!0),this.C.o(k.ZQ),this.C.get("autoplay")&&this.ra&&this.ra.Zc(e.PLAYING)):m(function(){this.C&&this.C.o(k.aL)}.bind(this))):this.Fn.Nb(C.Af),this.Fn&&(this.set("visiblePosition",this.Fn.ob("position")),this.Na()));B=!1;if(B=C.Va?this.W("visible","itemVisible"):this.W("rendererYaw","rendererPitch","rendererRoll","rendererWidth","rendererHeight","rendererHFOV","itemVisible","popupMaxWidth","popupMaxHeight","sourceHFOV"))this.set("targetImageScale",
this.oza(this.lb,C)),this.set("targetVideoScale",this.oza(this.Lb,C)),this.set("targetYaw",h(this.get("rendererYaw"),this.get("sourceYaw"))),this.set("targetPitch",this.get("rendererPitch")),this.set("targetRotationZ",h(C.Va?0:this.get("rendererRoll"),this.get("sourceRotationZ")));if(B||this.W("visiblePosition","targetScale","targetYaw","targetPitch","targetRoll","popupDistance","hfov")){H=this.get("visiblePosition");var N=this.get("targetYaw")*H+this.get("sourceYaw")*(1-H),O=this.get("targetPitch")*
H+this.get("sourcePitch")*(1-H),R=this.get("sourceRotationX")*(1-H),Q=this.get("sourceRotationY")*(1-H),K=this.get("targetRotationZ")*H+this.get("sourceRotationZ")*(1-H);C=Math.min(1,2*H);var L=this.get("popupDistance"),U=this.get("sourceHFOV");B=this.get("targetImageScale")*H+(1-H);H=this.get("targetVideoScale")*H+(1-H);this.set("alpha",C);this.lb&&this.lb.set("scale",B);this.Lb&&this.Lb.set("scale",H);[].concat(this.Lb?[this.Lb]:[],this.lb?[this.lb]:[]).forEach(function(T){T.set("yaw",N);T.set("pitch",
O);T.set("rotationX",R);T.set("rotationY",Q);T.set("rotationZ",K);T.set("distance",L);T.set("hfov",U)})}};a.prototype.Eab=function(C){if(this.W("frameEmpty","state","imageURL","video")){var B="none";!this.Lb||this.lb&&(this.get("frameEmpty")||this.get("state")==e.ca)?this.lb&&(B="image"):B="video";this.set("itemVisible",B)}if(this.W("itemVisible")){this.get("itemVisible")!="video"&&this.ra&&this.ra.Zc(e.ca);B=this.lb?this.lb.get("alpha"):0;var H=this.Lb?this.Lb.get("alpha"):0,E=this.get("itemVisible")==
"image"?1:0,G=this.get("itemVisible")=="video"?1:0,N=this.get("itemVisible")=="video"?1:Math.max(Math.abs(E-B),Math.abs(G-H))*200;this.LC=new x("linear",[new y("imageAlpha",B,E),new y("videoAlpha",H,G)],N)}this.LC&&(this.LC.Ve()?this.LC=null:this.LC.Nb(C.Af),this.LC&&(this.lb&&this.lb.set("alpha",this.LC.ob("imageAlpha")),this.Lb&&this.Lb.set("alpha",this.LC.ob("videoAlpha")),this.Na()))};a.prototype.nab=function(C){this.W("gazeOver","inVR","visible","actualVisible")&&(this.Lwa(),this.get("inVR")&&
this.C.get("lookAwayToHide")&&!this.get("gazeOver")&&this.get("actualVisible")&&this.Q9a());C.Va&&this.C.get("darkenBackground")&&this.C.get("lookAwayToHide")?(this.W("visible")&&this.get("visible")&&(this.ae.set("alpha",.8),this.Yx=null),this.W("gazeOver")&&(this.Yx=new x(this.get("gazeOver")?"linear":"quad_in",[new y("alpha",this.ae.get("alpha"),this.get("gazeOver")?.8:0)],this.get("gazeOver")?300:this.C.get("lookAwayToHideTime")))):(this.Yx=null,this.ae.set("alpha",C.Va&&this.C.get("darkenBackground")?
.8:0));this.Yx&&(this.Yx.Ve()?this.Yx=null:this.Yx.Nb(C.Af),this.Yx&&(this.ae.set("alpha",this.Yx.ob("alpha")),this.Na()))};a.prototype.Q9a=function(){this.Lwa();this.v2=setTimeout(function(){this.v2=null;this.C.set("visible",!1)}.bind(this),this.C.get("lookAwayToHideTime"))};a.prototype.Lwa=function(){this.v2&&(clearTimeout(this.v2),this.v2=null)};a.prototype.oza=function(C,B){if(!C)return 1;var H=this.get("popupMaxWidth","100%"),E=v.Cp(H),G=C.get("contentWidth"),N=C.get("contentHeight"),O=this.get("popupMaxHeight",
"100%"),R=v.Cp(O);if(this.get("inVR")){var Q=C=this.get("rendererWidth")*.5,K=Math.min(B.lj,80);B=u.jJ(K,C,Q);var L=this.get("sourceHFOV");H=Math.min(Math.tan(B*(E!==void 0?E/100:H/C)*.5*A)/Math.tan(L*.5*A),Math.tan(K*(R!==void 0?R/100:O/Q)*.5*A)/Math.tan(u.jJ(L,G,N)*.5*A))}else C=this.get("rendererWidth"),Q=this.get("rendererHeight"),H=G*Math.min((E!==void 0?C*E/100:H)/G,(R!==void 0?Q*R/100:O)/N),B=this.get("rendererHFOV"),L=this.get("sourceHFOV"),H=Math.tan(B*.5*A)*H/C/Math.tan(L*.5*A);return H};
a.prototype.MR=function(){this.OG();this.get("imageURL")&&(this.lb=new f,this.lb.set("url",this.get("imageURL")),this.lb.set("contentWidth",this.get("imageWidth")),this.lb.set("contentHeight",this.get("imageHeight")),this.lb.set("alpha",0))};a.prototype.OG=function(){this.lb&&(this.lb.remove(),this.lb=null)};a.prototype.OR=function(){this.zC();if(this.get("video")){this.Lb=new d;var C=z.zk(this.get("video"));this.Lb.set("contentWidth",C.get("width"));this.Lb.set("contentHeight",C.get("height"));this.Lb.set("alpha",
0);this.Lb.set("sourceIsVideo",!0);this.ra=new z(this.La.dr(),this.get("video"));this.Ua=new l(this.La.dr(),this.C,this.ra);this.Qx()}};a.prototype.zC=function(){this.Lb&&(this.Bz(),this.Ua.clear(),this.Ua=null,this.ra.clear(),this.Th=this.ra=null,this.Lb.remove(),this.Lb=null)};a.prototype.UZa=function(){this.Zu();this.ae=new c("#000000")};a.prototype.Zu=function(){this.ae&&(this.ae.remove(),this.ae=null)};a.prototype.KH=function(){this.o(k.vd);this.o(k.ia)};a.prototype.OH=function(C,B){var H=0;
B.lw(function(E){var G=0,N;this.sg.Nn(E)?G=100:(N=this.xe.Nn(E))&&(G=N.percent);H+=G}.bind(this));this.o(new w(k.xc,H/B.zd.length))};a.prototype.Hj=function(){this.Na()};a.prototype.Nf=function(){this.Na()};a.prototype.dD=function(){this.C.o(k.Ub)};a.prototype.Qx=function(){this.ra.bind(z.Dg,this.Nf,this,!0);this.ra.bind(k.Pd,this.Hj,this,!0);this.ra.bind(k.Ub,this.dD,this,!0)};a.prototype.Bz=function(){this.ra.h(z.Dg,this.Nf,this,!0);this.ra.h(k.Pd,this.Hj,this,!0);this.ra.h(k.Ub,this.dD,this,!0)};
a.prototype.ao=function(C){C.ag==k.Lm?(!C.qm()&&this.get("visible")?(C.du(this.C),this.set("over",this.bt(C)),this.set("gazeOver",this.w$a(C))):this.set("over",!1),this.get("over")&&(C.LD(this.C),C.Bw()&&C.WI(this.C),C.om(this.get("popupDistance"))),this.W("over")&&(this.C.o(this.get("over")?k.uc:k.Eb),C.Bw()&&this.C.o(this.get("over")?k.UF:k.Qr))):C.ag==k.Yf&&!C.qm()&&this.get("visible")&&(C.du(this.C),C.om(this.get("popupDistance")),this.bt(C)?C.whb()||this.C.o(k.ma):this.C.set("visible",!1))};
a.prototype.bt=function(C){return this.$Fa(C.Qs)};a.prototype.w$a=function(C){C=C.eP();return!!C&&this.$Fa([C])};a.prototype.$Fa=function(C){if(this.get("visible")){C=(this.get("itemVisible")=="video"?this.Lb:this.lb).Gy(C);for(var B=0;B<C.length;B++){var H=C[B];if(t.ax(H.source,H.x,H.y))return!0}}return!1};return a});
define("tdv/player/view/panorama/renderer/object/ComposedObject",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Base"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/Base");a=m.extend(h,function(){h.call(this);this.pC&&this.pC();this.iq&&this.iq()});a.prototype.hc=function(){h.prototype.hc.call(this);this.Aq&&this.Aq();this.nN&&this.nN()};a.prototype.mc=function(){this.Cq&&this.Cq();this.pN&&this.pN();h.prototype.mc.call(this)};a.prototype.za=function(n){this.dg&&
this.dg(n);h.prototype.za.call(this,n);this.Sq&&this.Sq(n)};return a});
define("tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{pC:function(){this.set("beamEnabled",!1);this.Cd=!1;this.oD=this.pD=void 0},Sq:function(h){this.pD=h.Xa;this.oD=h.pitch},ao:function(h){if(h.ag==m.Lm){var n=!h.qm()&&this.bt(h);if(n){h.LD(this.C);this.C.get("useHandCursor")&&h.WI(this.C);h.om(this.get("distance"));var g=this.jc(h.MJ());g&&h.A6(g,this.BD(h.MJ()))}this.Cd!=n&&
(this.Cd=n,this.C.o(this.Cd?m.uc:m.Eb),h.Bw()&&this.C.o(this.Cd?m.UF:m.Qr))}else h.ag==m.Yf&&!h.qm()&&this.bt(h)&&(this.C.jP(m.ma,!0).length>1&&h.du(this.C),h.om(this.get("distance")),this.C.o(m.ma))},bt:function(h){return this.get("beamEnabled")&&this.aga().Gy(h.Qs).length>0?!0:!1},jc:function(h){return!h||this.C.get("displayTooltipInTouchScreens")&&this.La.P.get("displayTooltipInTouchScreens")!==!1?this.C.get("toolTip",""):""},BD:function(h){if(h){h=this.get("yaw")-this.pD;var n=this.get("pitch")-
this.oD;return Math.sqrt(h*h+n*n)}return 0}}});
define("tdv/player/view/panorama/renderer/object/FrameHotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/ComposedObject tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),
n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/ComposedObject"),k=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),e=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),b=a("tdv/player/view/panorama/renderer/object/util/LevelUtil");a=a("tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin");m=m.extend(g,a,k,function(c){g.call(this);this.C=c;this.oH=this.xfa=this.wga=null;this.Sl.push(this.C);this.Qg=this.Qg.bind(this);
this.$r(["loadingActive","panoramaPixelsPerDegree"]);this.set("tag","FrameHotspot");this.set("enabled",!0);this.set("inVR",!1);this.set("inScreenshot",!1);this.set("overlaysEnabled",!0);this.set("interactionEnabled",!0);this.set("contentInteractive",!1);this.set("transparent",!1);this.set("centerOverDisplay",!1);this.set("loadingActive",!1);this.set("visible",!1);this.set("loaded",!1);this.set("inView",!1);this.set("frameHidden",!0);this.Hg=this.gv=this.xe=this.sg=null;this.ska(this.C)});m.prototype.hc=
function(){this.sg=(new e(n.ia)).ko(this.KH.bind(this));this.xe=(new e(n.xc)).mr(this.OH.bind(this));this.c_a();g.prototype.hc.call(this);h.ba(this.C,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.Qg,!0);this.rfa()};m.prototype.mc=function(){this.sfa();this.sg.dispose();this.xe.dispose();h.da(this.C,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.Qg);this.Axa();
this.Cxa();g.prototype.mc.call(this)};m.prototype.Qg=function(){this.set("url",this.C.get("url"));this.Hg.set("url",this.get("url"));this.set("image",this.C.get("image"));this.lb.set("image",this.get("image"));this.lb.set("level",this.get("image")&&b.kLa(this.C,this.get("panoramaPixelsPerDegree")));this.set("enabled",this.C.get("enabled"));this.set("fadeInDuration",this.C.get("fadeInDuration"));this.set("fadeOutDuration",this.C.get("fadeOutDuration"));this.set("interactionEnabled",this.C.get("interactionEnabled"));
this.set("contentInteractive",this.C.get("contentInteractive"));this.set("transparent",this.C.get("transparent"));this.Na()};m.prototype.za=function(c){this.set("loaded",!!this.Hg&&this.Hg.get("frameLoaded"));this.set("inVR",c.Va);this.set("inScreenshot",c.IJ);this.set("hotspotsEnabled",c.FJ);g.prototype.za.call(this,c);this.ye(c);this.Ola(c)};m.prototype.c_a=function(){this.MR();this.o_a();this.n_a();var c=[this.lb,this.gv,this.Hg];this.sg.jg(c);this.xe.jg(c);this.bi(c)};m.prototype.ye=function(){this.set("globalBlendingActiveCopy",
this.get("globalBlendingActive"));if(this.W("globalBlendingActive","globalBlendingActiveCopy","url","inVR","hotspotsEnabled","enabled","interactionEnabled","contentInteractive","composedTranslationX","composedTranslationY","composedTranslationZ")){var c=!(this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0)&&this.get("globalBlendingActive")==0&&this.get("hotspotsEnabled")&&this.get("enabled")&&!this.get("inVR")&&!!this.get("url");this.set("visible",
c);this.set("beamEnabled",c&&this.get("interactionEnabled"));this.Hg.set("contentInteractive",c&&this.get("interactionEnabled")&&this.get("contentInteractive"))}this.set("frameHidden",!this.Hg.get("geometryVisible"));this.W("visible","loaded","frameHidden","transparent","inScreenshot")&&(this.get("visible")||this.set("loaded",!1),this.lb.set("alpha",!this.get("visible")||!this.get("frameHidden")&&this.get("loaded")?0:1),this.lb.set("alpha",1),this.gv.set("alpha",!this.get("visible")||this.get("frameHidden")||
!this.get("loaded")||this.get("transparent")||this.get("inScreenshot")?0:1),this.Hg.set("alpha",this.get("visible")?1:0),this.Hg.set("transparent",this.get("transparent")),this.set("inView",this.get("visible")&&(this.get("loaded")||this.get("image"))),this.Na());this.W("inView")&&this.C.o(this.get("inView")?n.od:n.jd)};m.prototype.MR=function(){this.OG();this.lb=new this.oH;this.lb.set("image",this.get("image"));this.lb.set("level",this.get("image")&&b.kLa(this.C,this.get("panoramaPixelsPerDegree")));
this.lb.set("visible",!0);this.lb.set("alpha",0);this.set("imagePlane",this.lb)};m.prototype.OG=function(){this.lb&&(this.lb.remove(),this.lb=null,this.set("imagePlane",null))};m.prototype.n_a=function(){this.Axa();this.Hg=new this.xfa;this.Hg.bind(n.ia,this.lya,this,!0);this.Hg.set("url",this.get("url"));this.Hg.set("visible",!0);this.Hg.set("alpha",1);this.set("framePlane",this.Hg)};m.prototype.Axa=function(){this.Hg&&(this.Hg.h(n.ia,this.lya,this,!0),this.Hg.remove(),this.Hg=null,this.set("framePlane",
null))};m.prototype.o_a=function(){this.Cxa();this.gv=new this.wga;this.gv.set("visible",!0);this.gv.set("alpha",1);this.set("holePlane",this.gv)};m.prototype.Cxa=function(){this.gv&&(this.gv.remove(),this.gv=null,this.set("holePlane",null))};m.prototype.aga=function(){return this.gv};m.prototype.lya=function(){this.Na()};m.prototype.KH=function(){this.o(n.vd);this.o(n.ia)};m.prototype.OH=function(c,d){var f=0;d.lw(function(l){(l=d.Nn(l))&&(f+=l.percent)});this.o(new ProgressEvent(n.xc,f/d.zd.length))};
return m});
define("tdv/player/view/panorama/renderer/object/ComposedCSSObject",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Base"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/Base");a=m.extend(h,function(){h.call(this);this.set("tag","ComposedCSSObject");this.set("transparent",!1);this.set("cssScene",null);this.set("cssSceneOver",null);this.set("cssObject",this.cea());this.ly&&this.ly();this.LG&&this.LG();this.pC&&this.pC();this.iq&&this.iq()});a.prototype.cea=
function(){var n=new THREE.CSS3DObject;n.matrixAutoUpdate=!1;return n};a.prototype.hc=function(){h.prototype.hc.call(this);this.Aq&&this.Aq();this.kT&&this.kT();this.nN&&this.nN()};a.prototype.mc=function(){this.MM&&this.MM();this.pN&&this.pN();this.Cq&&this.Cq();var n=this.get("cssObject");n&&n.parent&&n.parent.remove(n);this.set("cssScene",null);h.prototype.mc.call(this)};a.prototype.za=function(n){this.dg&&this.dg(n);h.prototype.za.call(this,n);this.set("cssScene",n.SW);this.set("cssSceneOver",
n.TW);if(this.W("transparent")){var g=this.get("cssObject");g&&g.parent&&g.parent.remove(g)}this.W("cssScene","cssSceneOver","transparent")&&(g=this.get("transparent")?n.TW:n.SW)&&g.add(this.get("cssObject"));this.Dn();this.Qj&&this.Qj(n);this.Xz&&this.Xz(n);this.NI()};a.prototype.Dn=function(){this.W("composedAlpha","meshGroup")&&this.aC()};a.prototype.aC=function(){this.get("cssObject").element.style.display=this.get("composedAlpha")>0?"block":"none"};a.prototype.NI=function(){this.W("index")&&
(this.get("cssObject").containerElement.style.zIndex=this.get("index"))};return a});
define("tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/util/geo/Vector"],function(a){var m=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),h=a("tdv/player/view/util/geo/Vector"),n=new THREE.Matrix4,g=Math.PI/180;return{ly:function(){this.set("vertices",void 0);this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.Bq=new THREE.Matrix4;this.Io=new THREE.Matrix4;this.ys=new THREE.Matrix4},
cea:function(){var k=new THREE.CSS3DQuad;k.matrixAutoUpdate=!1;return k},Xz:function(k){var e=!1;if(this.W("vertices","contentWidth","contentHeight")){var b=this.get("vertices");e=h.At(b[0].get("yaw")*g,b[0].get("pitch")*g).normalize();var c=h.At(b[1].get("yaw")*g,b[1].get("pitch")*g).normalize(),d=h.At(b[2].get("yaw")*g,b[2].get("pitch")*g).normalize();b=h.At(b[3].get("yaw")*g,b[3].get("pitch")*g).normalize();var f=this.get("cssObject");f.vertices[0].set(e.x,e.y,-e.z);f.vertices[1].set(c.x,c.y,-c.z);
f.vertices[2].set(d.x,d.y,-d.z);f.vertices[3].set(b.x,b.y,-b.z);f.contentWidth=this.get("contentWidth");f.contentHeight=this.get("contentHeight");e=!0}c=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*m.th,this.get("composedTranslationY")*.5*m.th,this.get("composedTranslationZ")*.5*m.th),c=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-k.Xa*g),this.ke.multiply(n.makeRotationX(-this.get("composedDeltaPitch")*
g)),this.ke.multiply(n.makeRotationY(this.get("composedDeltaYaw")*g)),this.ke.multiply(n.makeRotationY(k.Xa*g)),c=!0);if(c||this.W("meshGroup"))this.ys.copy(this.wi),this.ys.multiply(this.ke),this.get("cssObject").matrix.copy(this.ys),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",k.Xa);this.set("cameraPitch",k.pitch);this.set("cameraRoll",k.Mg);this.set("cameraHfov",k.Wd);this.set("cameraWidth",k.width);this.set("cameraHeight",k.height);k.camera&&(c||e||this.W("cameraYaw","cameraPitch",
"cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(k.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.W("geometryVisible")&&this.Zja())}}});
define("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin","require tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Vector".split(" "),function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/TextureLoader"),
k=a("tdv/player/view/util/geo/Vector"),e=new THREE.Matrix4,b=Math.PI/180;return{ly:function(){this.set("distance",void 0);this.set("vertices",void 0);this.Lh=null;this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.vn=new THREE.Matrix4;this.Dj=new THREE.Matrix4},Xz:function(c){this.mbb(c);this.gt(c)},oM:function(){var c=this.get("meshGroup");return c?n.tm(c)[0]:null},hq:function(){this.Lh||(this.Lh=this.oC());return[0].map(function(c){var d=this.KR();c=n.create(this.Lh[c],d);g.gB(c,g.Or);g.hB(c,
g.Au);g.qK(c,m.WQ);g.oZ(c,1);return c}.bind(this))},mbb:function(){if(this.W("vertices")){var c=this.get("meshGroup");if(c)return this.Lh&&this.Lh.forEach(function(d){h.dispose(d)}),this.Lh=this.oC(),n.tm(c).map(function(d,f){n.kra(d,this.Lh[f])}.bind(this))}},oC:function(){function c(w){return w==0||isNaN(w)||!isFinite(w)}var d=this.get("vertices")||[];if(d.length!=4)return[h.PJa(-1,1,1,1,1,1,1,-1,1,-1,-1,1)];var f=k.At(d[0].get("yaw")*b,d[0].get("pitch")*b).normalize(),l=k.At(d[1].get("yaw")*b,
d[1].get("pitch")*b).normalize(),p=k.At(d[2].get("yaw")*b,d[2].get("pitch")*b).normalize();d=k.At(d[3].get("yaw")*b,d[3].get("pitch")*b).normalize();var q=f.clone().d7(p),r=d.clone().d7(l),t=q.clone().d7(r).normalize();r=(f.y*2*t.x/f.x-2*t.y)/(-p.y+f.y*p.x/f.x);c(r)&&(r=(f.z*2*t.x/f.x-2*t.z)/(-p.z+f.z*p.x/f.x));c(r)&&(r=(f.z*2*t.y/f.y-2*t.z)/(-p.z+f.z*p.y/f.y));var u=(2*t.x-p.x*r)/f.x;c(u)&&(u=(2*t.y-p.y*r)/f.y);c(u)&&(u=(2*t.z-p.z*r)/f.z);q=(l.y*2*t.x/l.x-2*t.y)/(-d.y+l.y*d.x/l.x);c(q)&&(q=(l.z*
2*t.x/l.x-2*t.z)/(-d.z+l.z*d.x/l.x));c(q)&&(q=(l.z*2*t.y/l.y-2*t.z)/(-d.z+l.z*d.y/l.y));var v=(2*t.x-d.x*q)/l.x;c(v)&&(v=(2*t.y-d.y*q)/l.y);c(v)&&(v=(2*t.z-d.z*q)/l.z);f=f.eZ(u);l=l.eZ(v);p=p.eZ(r);d=d.eZ(q);return[h.PJa(f.x,f.y,-f.z,l.x,l.y,-l.z,p.x,p.y,-p.z,d.x,d.y,-d.z)]},gt:function(c){var d=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*h.th,this.get("composedTranslationY")*.5*h.th,this.get("composedTranslationZ")*
.5*h.th),d=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-c.Xa*b),this.ke.multiply(e.makeRotationX(-this.get("composedDeltaPitch")*b)),this.ke.multiply(e.makeRotationY(this.get("composedDeltaYaw")*b)),this.ke.multiply(e.makeRotationY(c.Xa*b)),d=!0);this.W("distance","composedTranslationX","composedTranslationY","composedTranslationZ")&&(c=this.Ia.get("composedTranslationX")==0&&this.Ia.get("composedTranslationY")==0&&this.Ia.get("composedTranslationZ")==
0&&this.get("distance")!==void 0?h.qw(this.get("distance")):h.Et(),this.vn.makeScale(c,c,c),d=!0);if(d||this.W("meshGroup"))this.Dj.copy(this.wi),this.Dj.multiply(this.ke),this.Dj.multiply(this.vn),c=n.tm(this.get("meshGroup")),n.qt(c[0],this.Dj)}}});
define("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{LG:function(){this.set("visible",!1);this.set("inView",!1);this.set("url",!1);this.set("contentWidth",100);this.set("contentHeight",100);this.set("contentInteractive",!1);this.set("frameLoaded",!0);this.Oc=this.Md=null;this.F1=void 0;this.s6=this.s6.bind(this);this.t6=this.t6.bind(this);this.u6=this.u6.bind(this);this.nH=this.nH.bind(this);
this.Cga=this.Cga.bind(this)},Qj:function(){this.W("cssObject")&&(this.p_a(),this.get("cssObject").element.appendChild(this.Md));this.W("url")&&this.K8a(this.get("url"));this.W("contentWidth","contentHeight")&&(this.Md.style.width=this.get("contentWidth")+2+"px",this.Md.style.height=this.get("contentHeight")+2+"px");this.W("contentInteractive")&&(this.Md.style.pointerEvents=this.get("contentInteractive")?"auto":"none")},Dn:function(){this.W("composedAlpha")&&(this.get("composedAlpha")>0?this.Oc&&
!this.Oc.parentNode&&(this.QGa(),this.Md.appendChild(this.Oc)):this.Oc&&this.Oc.parentNode&&this.Md.removeChild(this.Oc))},kT:function(){this.o(m.vd);this.get("frameLoaded")&&this.o(m.ia)},MM:function(){this.zZa()},t6:function(h){h.preventDefault();h.stopImmediatePropagation()},s6:function(){this.La.dr().PE(null)},u6:function(h){h.preventDefault();h.stopImmediatePropagation()},nH:function(){this.set("frameLoaded",!0);this.o(m.ia)},Cga:function(){this.G1=null;this.nH()},p_a:function(){this.Oc||(this.Md=
document.createElement("div"),this.Md.style.position="absolute",this.Md.style.left=this.Md.style.top="-1px",this.get("cssObject").isCSS3DObject&&(this.Md.style.transform="translate(-50%, -50%)"),this.Md.style.overflow="hidden",this.Md.style["-webkit-overflow-scrolling"]="touch",this.Md.addEventListener("mouseenter",this.s6,!0),this.Md.addEventListener("mousemove",this.t6,!0),this.Md.addEventListener("mousewheel",this.u6,!0),this.Oc=document.createElement("iframe"),this.Oc.setAttribute("allow","fullscreen; accelerometer; geolocation; gyroscope; magnetometer; vr; autoplay; camera; microphone; display-capture; xr-spatial-tracking"),
this.Oc.setAttribute("frameborder","0"),this.Oc.setAttribute("scrolling","auto"),this.Oc.style.width="100%",this.Oc.style.height="100%",this.Oc.addEventListener("load",this.nH,!0),this.get("composedAlpha")>0&&this.Md.appendChild(this.Oc))},zZa:function(){this.Oc&&(this.Oc.src="",this.Sja(),this.nC(),this.Oc.parentNode&&this.Oc.parentNode.removeChild(this.Oc),this.Oc=null);this.Md&&(this.Md.parentNode&&this.Md.parentNode.removeChild(this.Md),this.Md.removeEventListener("mouseenter",this.s6,!0),this.Md.removeEventListener("mousemove",
this.t6,!0),this.Md.removeEventListener("mousewheel",this.u6,!0),this.Md=null)},K8a:function(h){this.F1!==h&&(this.F1=h,this.set("frameLoaded",!1),this.QGa())},QGa:function(){this.F1?(this.P8a(),this.sXa(),this.Oc.src=this.F1):(this.nC(),this.Sja(),this.Oc.src="",this.nH())},P8a:function(){this.nC();this.G1=setTimeout(this.Cga,3E3)},nC:function(){this.G1&&(clearTimeout(this.G1),this.G1=null)},sXa:function(){this.Sja();this.Oc.addEventListener("load",this.nH,!0)},Sja:function(){this.Oc.removeEventListener("load",
this.nH,!0)}}});
define("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin",["require","tdv/player/view/panorama/renderer/3d/util/MeshUtil","tdv/constants/EventName"],function(a){var m=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/constants/EventName");return{LG:function(){this.get("materialConfig").params.blending=THREE.NoBlending},kT:function(){this.o(h.vd);this.o(h.ia)},Dn:function(){this.W("meshGroup","composedAlpha")&&m.nf(this.get("meshGroup"),this.get("composedAlpha")>0?
.001:0)}}});
define("tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,["playbackPositions","width","height"],
this.ue,!0)},Cq:function(){m.da(this.C,["playbackPositions","width","height"],this.ue)},ue:function(){this.set("playbackPositions",this.C.get("playbackPositions"));this.set("contentWidth",this.C.get("width"));this.set("contentHeight",this.C.get("height"))},dg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("vertices",this.Ib.Eoa()));this.W("framePlane","holePlane","imagePlane","vertices")&&this.Cb().forEach(function(n){n.set("vertices",
this.get("vertices"));n.set("contentWidth",this.get("contentWidth"));n.set("contentHeight",this.get("contentHeight"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/QuadFrameHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/FrameHotspot tdv/player/view/panorama/renderer/object/ComposedCSSObject tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/FrameHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedCSSObject"),g=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),k=a("tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin"),e=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),
d=a("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin");var f=m.extend(g,e,c,function(){g.call(this);this.set("tag","QuadFrameHotspotImage")}),l=m.extend(n,k,b,function(){n.call(this);this.set("tag","QuadFrameHotspotFrame")}),p=m.extend(g,e,d,function(){g.call(this);this.set("tag","QuadFrameHotspotHole")});return m.extend(h,a,function(q){h.call(this,q);this.oH=f;this.xfa=l;this.wga=p})});
define("tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,["vertices",
"distance","playbackPositions"],this.ue,!0)},Cq:function(){m.da(this.C,["vertices","distance","playbackPositions"],this.ue)},ue:function(){this.set("distance",this.C.get("distance"));this.set("vertices",this.C.get("vertices"));this.set("playbackPositions",this.C.get("playbackPositions"))},dg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("vertices",this.Ib.Eoa()),this.set("alpha",this.Ib.pw()))}}});
define("tdv/player/view/panorama/renderer/object/QuadHotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),
function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=0;a=m.extend(k,e,d,b,c,function(p){k.call(this);this.set("tag","QuadHotspotImage");this.set("id","quad_hs_image_"+l++);this.set("side",THREE.DoubleSide);this.C=p;this.Sl.push(this.C);this.Rg=this.Rg.bind(this)});a.prototype.hc=function(){k.prototype.hc.call(this);h.ba(this.C,["image.levels"],this.Rg,!0)};a.prototype.mc=function(){h.da(this.C,["image.levels"],this.Rg);k.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("image",
this.C.get("image"));this.set("level",f.Wfb(this.C))};a.prototype.za=function(p){this.II();k.prototype.za.call(this,p);this.W("inView")&&this.C.o(this.get("inView")?n.od:n.jd)};a.prototype.II=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.qF,this.get("panoramaId"));g.setAttribute(q,g.Eaa,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/control/VideoAutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(k,e){this.Je=k;this.Vd=e;this.Ld=!1;this.S3=!0;this.oda=this.Wia=!1;this.Qca();this.fia()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.mCa();this.Pja()};m.prototype.kg=function(k){this.Ld!=k&&(this.Ld=k,this.Uv())};m.prototype.nlb=function(k){this.S3!=k&&((this.S3=k)&&
this.mCa(),this.Uv())};m.prototype.Uv=function(){if(!this.Ld||this.S3)this.Vd.set("state",n.ca);else if(this.Vd.get("autoplay")||this.oda)this.oda=!1,this.Vd.set("state",n.PLAYING)};m.prototype.fia=function(){if(!this.Wia){var k=this.Vd.get("video").get("autoplayTime");k!==void 0&&this.Vd.get("video").get("autoplayTimeLimit")<(new Date).getTime()&&(k=void 0);this.Vd.set("currentTime",k);this.oda=k!==void 0}};m.prototype.mCa=function(){this.Wia||(this.Wia=!0,this.Vd.get("state")==n.PLAYING?(this.Vd.get("video").set("autoplayTimeLimit",
(new Date).getTime()+g),this.Vd.get("video").set("autoplayTime",this.Vd.get("currentTime",0))):this.Vd.get("video").set("autoplayTime",void 0))};m.prototype.Qca=function(){this.Vd.get("video").bind(h.L("autoplayTime"),this.fia,this,!0)};m.prototype.Pja=function(){this.Vd.get("video").h(h.L("autoplayTime"),this.fia,this,!0)};var g=1E3;return m});
define("tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin",["require","tdv/constants/EventName","tdv/player/view/util/ColorPicker"],function(a){var m=a("tdv/constants/EventName"),h=a("tdv/player/view/util/ColorPicker");return{pC:function(){this.set("beamEnabled",!1);this.Cd=!1;this.oD=this.pD=void 0},Sq:function(n){this.pD=n.Xa;this.oD=n.pitch},ao:function(n){if(n.ag==m.Lm){var g=!n.qm()&&this.bt(n)&&!this.get("blendingActive");if(g){n.LD(this.C);this.C.get("useHandCursor")&&
n.WI(this.C);n.om(this.get("distance"));var k=this.jc(n.MJ());k&&n.A6(k,this.BD(n.MJ()))}this.Cd!=g&&(this.Cd=g,this.C.o(this.Cd?m.uc:m.Eb),n.Bw()&&this.C.o(this.Cd?m.UF:m.Qr))}else n.ag==m.Yf&&!n.qm()&&this.bt(n)&&(this.C.jP(m.ma,!0).length>1&&n.du(this.C),n.om(this.get("distance")),this.C.o(m.ma))},bt:function(n){if(this.get("beamEnabled")){n=this.aga().Gy(n.Qs);for(var g=0;g<n.length;g++){var k=n[g];if(h.ax(k.source,k.x,k.y))return!0}}return!1},jc:function(n){return!n||this.C.get("displayTooltipInTouchScreens")&&
this.La.P.get("displayTooltipInTouchScreens")!==!1?this.C.get("toolTip",""):""},BD:function(n){if(n){n=this.get("yaw")-this.pD;var g=this.get("pitch")-this.oD;return Math.sqrt(n*n+g*g)}return 0}}});
define("tdv/player/view/panorama/renderer/object/VideoHotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/view/av/VideoPlayer tdv/player/view/panorama/renderer/object/ComposedObject tdv/player/view/panorama/renderer/object/control/VideoAutoplayController tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin tdv/view/events/ProgressEvent tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),k=a("tdv/view/av/VideoPlayer"),e=a("tdv/player/view/panorama/renderer/object/ComposedObject"),b=a("tdv/player/view/panorama/renderer/object/control/VideoAutoplayController"),c=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),d=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=a("tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin"),
p=a("tdv/view/events/ProgressEvent"),q=a("tdv/view/util/Ease"),r=a("tdv/view/util/EaseDimension"),t=a("tdv/player/view/util/XR"),u=a("tdv/player/view/util/xr/pointer/PointerState");a=m.extend(e,l,c,function(v){e.call(this);this.C=v;this.Cma=this.oH=null;this.Sl.push(this.C);this.Qg=this.Qg.bind(this);this.$r(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","VideoHotspot");this.set("enabled",!0);this.set("inVR",!1);this.set("overlaysEnabled",!0);this.set("enabledInVR",!0);
this.set("enabledInVRWithGazePointer",!0);this.set("enabledInStandard",!0);this.set("interactionEnabled",!0);this.set("centerOverDisplay",!1);this.set("loadingActive",!1);this.set("frameEmpty",!0);this.set("state",g.ca);this.set("itemVisible","none");this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.Lb=this.lb=this.xe=this.sg=null;this.Dma=!1;this.av=[];this.ska(this.C)});a.prototype.hc=function(){this.sg=(new d(n.ia)).ko(this.KH.bind(this));
this.xe=(new d(n.xc)).mr(this.OH.bind(this));this.Qm=new b(this.La.dr(),this.C);e.prototype.hc.call(this);h.ba(this.C,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR enabledInVRWithGazePointer fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),this.Qg,!0);this.rfa()};a.prototype.mc=function(){this.sfa();this.Qm.clear();this.sg.dispose();this.xe.dispose();h.da(this.C,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR enabledInVRWithGazePointer fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),
this.Qg);this.OG();this.zC();e.prototype.mc.call(this)};a.prototype.Qg=function(){this.set("image",this.C.get("image"));this.set("imageLevel",f.kgb(this.C,this.get("panoramaPixelsPerDegree")));this.set("video",this.C.get("video"));this.set("videoLevel",k.zk(this.get("video")));this.set("enabled",this.C.get("enabled"));this.set("directionalAudio",this.C.get("directionalAudio"));this.set("enabledInStandard",this.C.get("enabledInStandard"));this.set("enabledInVR",this.C.get("enabledInVR"));this.set("enabledInVRWithGazePointer",
this.C.get("enabledInVRWithGazePointer",this.C.get("enabledInVR")));this.set("fadeInDuration",this.C.get("fadeInDuration"));this.set("fadeOutDuration",this.C.get("fadeOutDuration"));this.set("interactionEnabled",this.C.get("interactionEnabled"));this.set("state",this.C.get("state"));this.set("videoVisibleOnStop",this.C.get("videoVisibleOnStop"));this.set("blending",this.C.get("blending"));this.set("chromaColor",this.C.get("chromaColor"));this.set("chromaThreshold",this.C.get("chromaThreshold"));this.set("chromaSmoothing",
this.C.get("chromaSmoothing"))};a.prototype.za=function(v){this.set("inVR",v.Va);this.set("hotspotsEnabled",v.FJ);this.set("inVRWithGazePointer",v.Va&&t.ud.length===1&&t.ud[0].type===u.WB);this.ft();this.FD();e.prototype.za.call(this,v);this.Uv();this.jW(v);this.ye(v);this.Ola(v)};a.prototype.ft=function(){if(this.W("video","videoLevel","image","imageLevel")){var v=[];this.W("image","imageLevel")&&(this.MR(),this.lb&&v.push(this.lb));this.W("video","videoLevel")&&(this.OR(),this.Lb&&v.push(this.Lb));
this.bi(v);this.sg.jg(v);this.xe.jg(v)}};a.prototype.FD=function(){this.W("video","videoLevel","image","imageLevel","blending","chromaColor","chromaThreshold","chromaSmoothing")&&this.Cb().forEach(function(v){v.set("blending",this.get("blending"));v.set("chromaColor",this.get("chromaColor"));v.set("chromaThreshold",this.get("chromaThreshold"));v.set("chromaSmoothing",this.get("chromaSmoothing"))}.bind(this))};a.prototype.Uv=function(){this.W("video","composedAlpha","enabledInVR","enabledInVRWithGazePointer",
"enabledInStandard","enabled","inVR")&&this.Qm.kg(this.get("composedAlpha")>0&&this.get("hotspotsEnabled")&&this.get("enabled")&&(!this.get("inVR")||this.get("enabledInVR"))&&(!this.get("inVRWithGazePointer")||this.get("enabledInVRWithGazePointer"))&&(this.get("inVR")||this.get("enabledInStandard")));this.W("blendingActive")&&this.Qm.nlb(this.get("blendingActive"))};a.prototype.jW=function(){this.set("frameEmpty",!this.Lb||!this.Lb.get("hasStableContent"))};a.prototype.ye=function(v){var w=this.get("itemVisible");
if(this.W("frameEmpty","state","image","video","inVR","hotspotsEnabled","enabledInVR","enabledInVRWithGazePointer","enabledInStandard","enabled","interactionEnabled")){var x="none";!this.get("hotspotsEnabled")||!this.get("enabled")||this.get("inVR")&&!this.get("enabledInVR")||this.get("inVRWithGazePointer")&&!this.get("enabledInVRWithGazePointer")||!this.get("inVR")&&!this.get("enabledInStandard")||(this.Lb&&(!this.lb||!this.get("frameEmpty")&&(this.get("state")!=g.ca||this.Dma&&this.get("videoVisibleOnStop")))?
x="video":this.lb&&(x="image"),this.get("state")!=g.ca&&(this.Dma=!0));this.set("itemVisible",x);this.set("beamEnabled",x!="none"&&this.get("interactionEnabled"))}if(this.W("itemVisible")){x=this.get("itemVisible")!="none";var y=w!="none";if(x&&y&&!this.get("chromaColor")&&this.av.length==0)this.lb&&this.lb.set("alpha",this.get("itemVisible")=="image"?1:0),this.Lb&&this.Lb.set("alpha",this.get("itemVisible")=="video"?1:0);else{w=x==y?50:x?this.get("fadeInDuration"):this.get("fadeOutDuration");x!=
y&&this.C.o(x?n.od:n.jd);y=this.lb?this.lb.get("alpha"):0;var z=this.Lb?this.Lb.get("alpha"):0;x=[{video:z,image:y}];this.get("itemVisible")=="video"?(x.push({video:1,image:y,time:w*(1-z)}),x.push({video:1,image:0,time:50*(y-0)})):this.get("itemVisible")=="image"?(x.push({video:z,image:1,time:w*(1-y)}),x.push({video:0,image:1,time:50*(z-0)})):x.push({video:0,image:0,time:Math.max(z,y,1/w)*w});this.av=[];for(w=1;w<x.length;w++)x[w].time>0&&this.av.push(new q("linear",[new r("imageAlpha",x[w-1].image,
x[w].image),new r("videoAlpha",x[w-1].video,x[w].video)],x[w].time))}}this.av.length>0&&(this.av[0].Ve()?this.av.shift():this.av[0].Nb(v.Af),this.av.length>0&&(this.lb&&this.lb.set("alpha",this.av[0].ob("imageAlpha")),this.Lb&&this.Lb.set("alpha",this.av[0].ob("videoAlpha")),this.Na()))};a.prototype.MR=function(){this.OG();this.get("image")&&this.get("imageLevel")&&(this.lb=new this.oH,this.lb.set("image",this.get("image")),this.lb.set("level",this.get("imageLevel")),this.lb.set("isVideoTexture",
!0),this.lb.set("visible",!0),this.lb.set("alpha",0),this.lb.set("side",THREE.DoubleSide))};a.prototype.OG=function(){this.lb&&(this.lb.remove(),this.lb=null)};a.prototype.OR=function(){this.zC();this.get("video")&&this.get("videoLevel")&&(this.Lb=new this.Cma,this.Lb.set("scriptObject",this.C),this.Lb.set("video",this.get("video")),this.Lb.set("level",this.get("videoLevel")),this.Lb.set("visible",!0),this.Lb.set("alpha",0),this.Lb.set("side",THREE.DoubleSide))};a.prototype.zC=function(){this.Lb&&
(this.Lb.remove(),this.Lb=null)};a.prototype.KH=function(){this.o(n.vd);this.o(n.ia)};a.prototype.OH=function(v,w){var x=0;w.lw(function(y){(y=w.Nn(y))&&(x+=y.percent)});this.o(new p(n.xc,x/w.zd.length))};a.prototype.aga=function(){return this.get("itemVisible")=="video"?this.Lb:this.lb};return a});
define("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/control/CueController tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/util/geo/Quaternion tdv/view/av/SubtitleController tdv/view/av/VideoPlayer".split(" "),function(a){var m=
a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/control/CueController"),e=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),b=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),c=a("tdv/player/view/util/geo/Quaternion"),d=a("tdv/view/av/SubtitleController"),f=a("tdv/view/av/VideoPlayer"),
l=new THREE.Euler,p=new THREE.Quaternion,q=new THREE.Matrix4,r=new THREE.Matrix4,t=Math.PI/180;return{LG:function(){this.set("visible",!1);this.set("inView",!1);this.set("frameEmpty",!0);this.set("hasStableContent",!1);this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.set("scriptObject",null);this.set("video",null);this.set("level",null);this.set("loop",!1);this.set("side",void 0);this.hb=this.Lb=null;this.Dma=!1;this.WN=this.Th=
this.yn=this.Ua=this.fs=this.ra=null},MM:function(){this.zC()},Qj:function(u){this.nbb();this.FD();this.jW(u)},nbb:function(){this.W("scriptObject","video","level")&&(this.zC(),this.Lb=this.get("video"),this.hb=this.get("level"),this.C=this.get("scriptObject"),this.OR())},FD:function(){if(this.W("video","blending","chromaColor","chromaThreshold","chromaSmoothing","side")&&this.Lb){var u=new n.Rp(this.Lb.rl());u.QD=this.get("blending");u.dw=this.get("chromaColor");u.MW=this.get("chromaThreshold");
u.LW=this.get("chromaSmoothing");u.side=this.get("side");this.set("materialConfig",u)}},Dn:function(){this.W("visible","composedAlpha","image","state")&&this.set("inView",this.get("visible")&&this.get("composedAlpha")>0);this.W("composedAlpha","meshGroup","inView")&&g.nf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0)},jW:function(u){var v=!!this.Th&&this.Th.isEmpty(),w=this.ra&&this.ra.G7(),x=!!w&&w.isEmpty();x&&!v&&this.ra.getState()==h.PLAYING&&this.C.get("loop")&&(w=this.Th,
x=!1);this.set("frameEmpty",x);this.Rla();this.WN.pra(u.Jk>0);!this.Th||w&&!this.Th.isEqual(w)?(this.Th=w,(v=this.Th.$u)&&v.tagName=="VIDEO"&&(v.width=this.get("contentWidth"),v.height=this.get("contentHeight")),this.WN.bo(v),this.WN.update(),this.Na()):this.ra.getState()==h.PLAYING&&this.Na();q.makeRotationFromQuaternion(c.jX(u.Xa,u.pitch,u.Mg,p));this.ra.cu(q)},Rla:function(){var u=this.ra.getCurrentTime(),v=this.ra.mj();this.get("frameEmpty")?this.set("hasStableContent",!1):u>this.c1+.1?this.set("hasStableContent",
!0):u==0&&this.qha>v-.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.W("frameEmpty")&&!this.get("frameEmpty")&&(this.c1=u);!this.get("frameEmpty")&&u>0&&(this.qha=u)},OR:function(){this.Lb&&this.hb&&this.C&&(this.set("textureSource",this.WN=new b),this.WN.aZ(!0),this.set("contentWidth",this.hb.get("width")),this.set("contentHeight",this.hb.get("height")),this.set("alpha",0),this.ra=new f(this.La.dr(),this.Lb,this.C.get("directionalAudio")),this.SXa(),this.ra.skb(),this.fs=
new k(this.C,this.ra),this.Ua=new e(this.La.dr(),this.C,this.ra),this.yn=new d(this.La.ld.get("panorama"),this.ra),this.Qx(),this.o(m.vd),this.o(m.ia))},SXa:function(){var u=this.C.get("vertices")||[this.C];if(u.length!=0){var v=u[0].get("yaw",0);u[0].get("pitch",0);for(var w=0,x=0,y=0;y<u.length;y++){for(var z=u[y].get("yaw",0),A=u[y].get("pitch",0);z>v+180;)z-=360;for(;z<v-180;)z+=360;w+=z;x+=A}q.makeRotationFromEuler(l.set(x/u.length*t,-(w/u.length)*t,0,"YXZ"));q.multiply(r.makeTranslation(0,0,
-1));this.ra.Uw(q)}},zC:function(){this.ra&&(this.set("textureSource",this.WN=null),this.Bz(),this.Ua.clear(),this.Ua=null,this.fs.clear(),this.fs=null,this.yn.clear(),this.yn=null,this.ra.clear(),this.Th=this.ra=null,this.set("frameEmpty",!0),this.set("hasStableContent",!1),this.hb=this.Lb=null)},Qx:function(){this.ra.bind(f.Dg,this.Nf,this,!0);this.ra.bind(m.Pd,this.Hj,this,!0)},Bz:function(){this.ra.h(f.Dg,this.Nf,this,!0);this.ra.h(m.Pd,this.Hj,this,!0)},Hj:function(){this.Na()},Nf:function(){this.Na()}}});
define("tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,["playbackPositions",
"distance"],this.ue,!0)},Cq:function(){m.da(this.C,["playbackPositions","distance"],this.ue)},ue:function(){this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},dg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("vertices",this.Ib.Eoa()),this.set("alpha",this.Ib.pw()));this.W("video","image","vertices","distance")&&this.Cb().forEach(function(n){n.set("vertices",
this.get("vertices"));n.set("distance",this.get("distance"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/QuadVideoHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/VideoHotspot tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/VideoHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),g=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),k=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),e=a("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin");var b=m.extend(n,g,k,function(){n.call(this);
this.set("tag","QuadVideoHotspotImage")}),c=m.extend(n,g,e,function(){n.call(this);this.set("tag","QuadVideoHotspotVideo")});return m.extend(h,a,function(d){h.call(this,d);this.oH=b;this.Cma=c})});
define("tdv/player/view/panorama/renderer/object/Rain","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Color tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),k=a("tdv/player/view/util/Color"),e=a("tdv/player/view/util/Device");a=m.extend(g,
function(b){g.call(this);this.C=b;this.Vl=this.Vl.bind(this);this.Wl=this.Wl.bind(this);this.Co()});a.prototype.hc=function(){g.prototype.hc.call(this);this.C.set("state",this.C.get("startState"));h.ba(this.C,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),this.Vl,!0);h.ba(this.C,["state"],this.Wl,!0)};a.prototype.mc=function(){h.da(this.C,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),
this.Vl);h.da(this.C,["state"],this.Wl);this.C.set("state",n.ca);g.prototype.mc.call(this)};a.prototype.Vl=function(){this.Co();this.XU()};a.prototype.Wl=function(){this.n4=this.C.get("state");this.Na()};a.prototype.Co=function(){g.prototype.Co.call(this);if(e.kf()){this.XG=this.jv=4;this.$H=2400;this.YG=1200;var b=1.5;var c=1.6}else this.jv=2,this.XG=4,this.$H=4800,this.YG=2400,c=b=1;var d=this.C.get("intensity",.5);this.Ne=k.Dp(this.C.get("color","#ffffff"));this.yU=this.C.get("opacity",.25)*.24+
.01;this.yU*=2;this.iD=(d*(.37-.17)+.17)*b;b=(this.C.get("speed",.5)*(.09-.02)+.02)/this.iD*c;this.pT=b*.9;this.GH=b*1.1;this.$H=Math.round(this.C.get("particleCount",this.$H)*d);this.YG=Math.round(this.C.get("farPlaneParticleCount",this.YG)*d);this.L2=0;this.vs=2;this.lv=-2;this.Lha=0;this.lR=.75;this.SR=.5;this.P1=this.C.get("initialState");this.r5=this.C.get("startDuration");this.y5=this.C.get("stopDuration");this.jv=this.C.get("maxDistance",this.jv);this.XG=this.C.get("farPlaneDistance",this.XG);
this.GD()};a.prototype.E0=function(){var b=new THREE.MeshBasicMaterial;b.color=new THREE.Color(this.Ne[0]/255,this.Ne[1]/255,this.Ne[2]/255);b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;this.Efa||(this.Efa=new THREE.BoxGeometry(.01,.2,.01));return new THREE.Mesh(this.Efa,b)};a.prototype.GD=function(){var b=this.eh&&this.eh.children||[],c=new THREE.Color(this.Ne[0]/255,this.Ne[1]/255,this.Ne[2]/255);b.forEach(function(d){d.material.color=c;d.material.needsUpdate=!0})};return a});
define("tdv/player/view/panorama/renderer/object/Root","require tdv/utils tdv/util/Map tdv/constants/EventName tdv/events/Event tdv/player/view/panorama/renderer/object/Base".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/util/Map"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),k=a("tdv/player/view/panorama/renderer/object/Base"),e=m.extend(k,function(b,c,d,f){k.call(this);this.Je=b;this.P=c;this.ld=d;this.j=f;this.DT=new h;this.Aka(this);this.set("tag","Root");this.set("globalBlendingActive",
0)});e.prototype.dr=function(){return this.Je};e.prototype.Jf=function(b){return this.DT.get(b)};e.prototype.all=function(){for(var b=[],c=[this];c.length>0;){var d=c.pop();b.push(d);for(var f=d.qe.length-1;f>=0;f--)c.push(d.qe[f])}return b};e.prototype.update=function(b){var c=this.all(),d=c.length,f;for(f=0;f<d;f++)c[f].EZa();for(f=0;f<d;f++)c[f].set("index",f);for(f=0;f<d;f++)c[f].La&&c[f].za(b);for(f=0;f<d;f++)c[f].vZa();if(this.M1){for(f=0;f<d;f++)c[f].AZa();this.update(b)}};e.prototype.Na=function(){this.ih||
this.o(new g(n.V));k.prototype.Na.call(this)};e.prototype.xA=function(b){return Array.isArray(b)?b.map(this.xA.bind(this)):this.DT.get(b)||e.Ieb.create(b)};return e});
define("tdv/player/view/panorama/renderer/object/Snow","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),k=a("tdv/player/view/util/Device");a=m.extend(g,function(b){g.call(this);this.C=b;this.Vl=this.Vl.bind(this);
this.Wl=this.Wl.bind(this);this.Co()});a.prototype.hc=function(){g.prototype.hc.call(this);this.C.set("state",this.C.get("startState"));h.ba(this.C,["intensity","speed"],this.Vl,!0);h.ba(this.C,["state"],this.Wl,!0)};a.prototype.mc=function(){h.da(this.C,["intensity","speed"],this.Vl);h.da(this.C,["state"],this.Wl);this.C.set("state",n.ca);g.prototype.mc.call(this)};a.prototype.Vl=function(){this.Co();this.XU()};a.prototype.Wl=function(){this.n4=this.C.get("state");this.Na()};a.prototype.Co=function(){g.prototype.Co.call(this);
var b=this.C.get("intensity"),c=this.C.get("speed");if(k.ub()||k.Tb()==k.ox){var d=1E3;var f=350;var l=1800;var p=400;var q=.8;var r=1.2}else k.kf()?(d=1500,f=500,l=2500,p=500,q=.8,r=1.2):(d=3E3,f=1E3,l=5E3,p=1E3,q=.6,r=1);this.P1=this.C.get("initialState");this.r5=this.C.get("startDuration");this.y5=this.C.get("stopDuration");this.lR=.75;this.SR=.5;this.jv=4;this.lv=-2;this.vs=3;this.L2=35;this.XG=7;this.iD=(q+b*(r-q))/e;this.pT=this.GH=.15+c*1.35;this.$H=f+b*(d-f);this.YG=p+b*(l-p)};a.prototype.E0=
function(){return new THREE.Sprite(this.my())};a.prototype.my=function(){var b=new THREE.SpriteMaterial;b.map=this.es();b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;return b};a.prototype.es=function(){if(this.Ma)return this.Ma;var b=document.createElement("canvas");b.width=b.height=e;var c=b.getContext("2d"),d=c.createRadialGradient(b.width*.5,b.height*.5,b.height*.2,b.width*.5,b.height*.5,b.height*.5);d.addColorStop(0,"rgba(255, 255, 255, 0.8)");d.addColorStop(1,"rgba(255, 255, 255, 0)");
c.fillStyle=d;c.fillRect(0,0,b.width,b.height);this.Ma=new THREE.Texture;this.Ma.colorSpace=THREE.SRGBColorSpace;this.Ma.image=b;this.Ma.needsUpdate=!0;return this.Ma};var e=32;return a});
define("tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/util/Device"],function(a){var m=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),h=a("tdv/player/view/util/Device"),n=new THREE.Matrix4,g=Math.PI/180;return{ly:function(){this.set("rotationX",0);this.set("rotationY",0);this.set("rotationZ",0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("scale",1);
this.set("hfov",void 0);this.set("vfov",null);this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.Bq=new THREE.Matrix4;this.Io=new THREE.Matrix4;this.rk=new THREE.Matrix4;this.vn=new THREE.Matrix4;this.ys=new THREE.Matrix4},cea:function(){var k=h.Nd()==h.vj||h.Tb()==h.ox?new THREE.CSS3DRectangle:new THREE.CSS3DObject;k.matrixAutoUpdate=!1;return k},Xz:function(k){if(this.W("contentWidth","contentHeight")){var e=this.get("cssObject");e.contentWidth=this.get("contentWidth");e.contentHeight=this.get("contentHeight");
e.updateVertices()}e=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*m.th,this.get("composedTranslationY")*.5*m.th,this.get("composedTranslationZ")*.5*m.th),e=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-k.Xa*g),this.ke.multiply(n.makeRotationX(-this.get("composedDeltaPitch")*g)),this.ke.multiply(n.makeRotationY(this.get("composedDeltaYaw")*g)),this.ke.multiply(n.makeRotationY(k.Xa*
g)),e=!0);this.W("yaw","pitch")&&(this.Bq.makeRotationY(-this.get("yaw")*g),this.Bq.multiply(n.makeRotationX(this.get("pitch")*g)),e=!0);if(this.W("flipHorizontally","hfov","vfov","composedTranslationX","composedTranslationY","composedTranslationZ")){e=this.get("contentWidth");var b=this.get("contentHeight"),c=this.get("hfov"),d=this.get("vfov");this.Io.makeTranslation(0,0,-(e/(2*Math.tan(c*g*.5))));var f=(this.get("flipHorizontally")?-1:1)*this.get("scale"),l=this.get("scale");d&&(l*=e*Math.tan(d*
g*.5)/(b*Math.tan(c*g*.5)));this.vn.makeScale(f,l,1);e=!0}this.W("rotationX","rotationY","rotationZ","roll")&&(this.rk.makeRotationZ(this.get("roll")*g),this.rk.multiply(n.makeRotationY(this.get("rotationY")*g)),this.rk.multiply(n.makeRotationX(this.get("rotationX")*g)),this.rk.multiply(n.makeRotationZ(this.get("rotationZ")*g)),e=!0);if(e||this.W("meshGroup"))this.ys.copy(this.wi),this.ys.multiply(this.ke),this.ys.multiply(this.Bq),this.ys.multiply(this.Io),this.ys.multiply(this.rk),this.ys.multiply(this.vn),
this.get("cssObject").matrix.copy(this.ys),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",k.Xa);this.set("cameraPitch",k.pitch);this.set("cameraRoll",k.Mg);this.set("cameraHfov",k.Wd);this.set("cameraWidth",k.width);this.set("cameraHeight",k.height);k.camera&&(e||this.W("cameraYaw","cameraPitch","cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(k.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.W("geometryVisible")&&
this.Zja())}}});
define("tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,["playbackPositions","width",
"height"],this.ue,!0)},Cq:function(){m.da(this.C,["playbackPositions","width","height"],this.ue)},ue:function(){this.set("playbackPositions",this.C.get("playbackPositions"));this.set("contentWidth",this.C.get("width"));this.set("contentHeight",this.C.get("height"))},dg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("yaw",this.Ib.get("yaw")),this.set("pitch",this.Ib.get("pitch")),this.set("roll",this.Ib.get("roll")),
this.set("rotationX",this.Ib.get("rotationX")),this.set("rotationY",this.Ib.get("rotationY")),this.set("hfov",this.Ib.get("hfov")),this.set("vfov",this.Ib.get("vfov")));this.W("framePlane","holePlane","imagePlane","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","contentWidth","contentHeight")&&this.Cb().forEach(function(n){n.set("yaw",this.get("yaw"));n.set("pitch",this.get("pitch"));n.set("roll",this.get("roll"));n.set("rotationX",this.get("rotationX"));n.set("rotationY",this.get("rotationY"));
n.set("hfov",this.get("hfov"));n.set("vfov",this.get("vfov"));n.set("contentWidth",this.get("contentWidth"));n.set("contentHeight",this.get("contentHeight"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/RectangleFrameHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/FrameHotspot tdv/player/view/panorama/renderer/object/ComposedCSSObject tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/FrameHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedCSSObject"),g=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),k=a("tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin"),e=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),
d=a("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin");var f=m.extend(g,e,c,function(){g.call(this);this.set("tag","RectangleFrameHotspotImage")}),l=m.extend(n,k,b,function(){n.call(this);this.set("tag","RectangleFrameHotspotFrame")}),p=m.extend(g,e,d,function(){g.call(this);this.set("tag","RectangleFrameHotspotHole")});return m.extend(h,a,function(q){h.call(this,q);this.oH=f;this.xfa=
l;this.wga=p})});
define("tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},
Aq:function(){m.ba(this.C,["playbackPositions","distance","scaleMode"],this.ue,!0)},Cq:function(){m.da(this.C,["playbackPositions","distance","scaleMode"],this.ue)},ue:function(){this.set("scaleMode",this.C.get("scaleMode"));this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},dg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("yaw",this.Ib.get("yaw")),
this.set("pitch",this.Ib.get("pitch")),this.set("roll",this.Ib.get("roll")),this.set("rotationX",this.Ib.get("rotationX")),this.set("rotationY",this.Ib.get("rotationY")),this.set("hfov",this.Ib.get("hfov")),this.set("vfov",this.Ib.get("vfov")),this.set("alpha",this.Ib.pw()));this.W("video","image","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","distance","scaleMode","image","video")&&this.Cb().forEach(function(n){n.set("yaw",this.get("yaw"));n.set("pitch",this.get("pitch"));n.set("roll",
this.get("roll"));n.set("rotationX",this.get("rotationX"));n.set("rotationY",this.get("rotationY"));n.set("hfov",this.get("hfov"));n.set("vfov",this.get("vfov"));n.set("scaleMode",this.get("scaleMode"));n.set("distance",this.get("distance"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/RectangleVideoHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/VideoHotspot tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/VideoHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),g=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),k=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),e=a("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin");var b=m.extend(n,
g,k,function(){n.call(this);this.set("tag","RectangleVideoHotspotImage")}),c=m.extend(n,g,e,function(){n.call(this);this.set("tag","RectangleVideoHotspotVideo")});return m.extend(h,a,function(d){h.call(this,d);this.oH=b;this.Cma=c})});
define("tdv/player/view/panorama/renderer/object/Factory","require tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/Cap tdv/player/view/panorama/renderer/object/Dust tdv/player/view/panorama/renderer/object/FlatHotspotImage tdv/player/view/panorama/renderer/object/Hotspot tdv/player/view/panorama/renderer/object/HotspotImage tdv/player/view/panorama/renderer/object/LensFlare tdv/player/view/panorama/renderer/object/Menu tdv/player/view/panorama/renderer/object/Panorama tdv/player/view/panorama/renderer/object/ImagePanoramaFrame tdv/player/view/panorama/renderer/object/VideoPanoramaFrame tdv/player/view/panorama/renderer/object/Popup tdv/player/view/panorama/renderer/object/QuadFrameHotspot tdv/player/view/panorama/renderer/object/QuadHotspotImage tdv/player/view/panorama/renderer/object/QuadVideoHotspot tdv/player/view/panorama/renderer/object/Rain tdv/player/view/panorama/renderer/object/Root tdv/player/view/panorama/renderer/object/Snow tdv/player/view/panorama/renderer/object/RectangleFrameHotspot tdv/player/view/panorama/renderer/object/RectangleVideoHotspot tdv/player/view/panorama/renderer/object/util/PanoramaFormat".split(" "),function(a){function m(D,
F){Array.isArray(F)||(F=[F]);for(var C=0;C<F.length;C++)if(h.Oa(F[C],D))return!0;return!1}var h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/Cap"),k=a("tdv/player/view/panorama/renderer/object/Dust"),e=a("tdv/player/view/panorama/renderer/object/FlatHotspotImage"),b=a("tdv/player/view/panorama/renderer/object/Hotspot"),c=a("tdv/player/view/panorama/renderer/object/HotspotImage"),d=a("tdv/player/view/panorama/renderer/object/LensFlare"),
f=a("tdv/player/view/panorama/renderer/object/Menu"),l=a("tdv/player/view/panorama/renderer/object/Panorama"),p=a("tdv/player/view/panorama/renderer/object/ImagePanoramaFrame"),q=a("tdv/player/view/panorama/renderer/object/VideoPanoramaFrame"),r=a("tdv/player/view/panorama/renderer/object/Popup"),t=a("tdv/player/view/panorama/renderer/object/QuadFrameHotspot"),u=a("tdv/player/view/panorama/renderer/object/QuadHotspotImage"),v=a("tdv/player/view/panorama/renderer/object/QuadVideoHotspot"),w=a("tdv/player/view/panorama/renderer/object/Rain"),
x=a("tdv/player/view/panorama/renderer/object/Root"),y=a("tdv/player/view/panorama/renderer/object/Snow"),z=a("tdv/player/view/panorama/renderer/object/RectangleFrameHotspot"),A=a("tdv/player/view/panorama/renderer/object/RectangleVideoHotspot");a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat");a={};x.Ieb=a;a.create=function(D){if(D instanceof n)return D;if(m(D,["HDRPanorama","LivePanorama","Panorama","VideoPanorama"]))return new l(D);if(m(D,["CubicPanoramaFrame","SphericPanoramaFrame"]))return m(D,
"SphericPanoramaFrame")&&D.Mn()?new q(D):new p(D);if(m(D,["DustPanoramaOverlay"]))return new k(D);if(m(D,"HotspotPanoramaOverlay"))return new b(D);if(m(D,["HotspotPanoramaOverlayImage","HotspotPanoramaOverlayMap"]))return new c(D);if(m(D,"Menu"))return new f(D);if(m(D,["CeilingCapPanoramaOverlay","TripodCapPanoramaOverlay"]))return new g(D);if(m(D,["FlatHotspotPanoramaOverlayImage","FlatHotspotPanoramaOverlayMap"]))return new e(D);if(m(D,["LensFlarePanoramaOverlay"]))return new d(D);if(m(D,["RainPanoramaOverlay"]))return new w(D);
if(m(D,["SnowPanoramaOverlay"]))return new y(D);if(m(D,["PopupPanoramaOverlay"]))return new r(D);if(m(D,["QuadFramePanoramaOverlay"]))return new t(D);if(m(D,["QuadHotspotPanoramaOverlayImage","QuadHotspotPanoramaOverlayMap"]))return new u(D);if(m(D,["QuadVideoPanoramaOverlay"]))return new v(D);if(m(D,["FramePanoramaOverlay"]))return new z(D);if(m(D,["VideoPanoramaOverlay"]))return new A(D);throw"Invalid script object";};return a});
define("tdv/player/view/panorama/renderer/3d/util/RayUtil",["require","exports","three.mod"],function(a,m,h){return function(){function n(){}n.CLa=function(g,k,e,b,c,d){return n.ffb(g,k/b*2-1,-(e/c)*2+1,d)};n.ffb=function(g,k,e,b){b||(b=new h.Ray);b.origin.setFromMatrixPosition(g.matrixWorld);b.direction.set(k,e,.5).unproject(g).sub(b.origin).normalize();return b};n.vfb=function(g,k){k||(k=new h.Ray);k.origin.set(0,0,0);k.direction.set(0,0,-1).applyQuaternion(g.quaternion);return k};n.ufb=function(g,
k){k||(k=new h.Ray);k.origin.set(0,0,0).applyMatrix4(g);k.direction.set(0,0,-1).applyMatrix4(g).sub(k.origin).normalize();return k};return n}()});
define("tdv/player/view/panorama/renderer/object/Reticle","require tdv/utils tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/ReticleCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/canvas/ReticleCanvas"),
k=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/util/XR");a=m.extend(n,function(){n.call(this);this.ja=null;this.set("tag","Reticle");this.set("changing",!1);this.set("over",!1);this.set("overProgress",void 0);this.set("visible",!0);this.set("attachToCamera",!0);this.zq=null});a.prototype.za=function(b){this.ft(b);this.gh(b);this.dg(b);n.prototype.za.call(this,b)};a.prototype.ft=function(b){b.Va&&!this.zq&&e.getType()==e.Lx.mo&&this.bi([this.zq=
new n])};a.prototype.gh=function(b){this.ja||(this.set("textureSource",new k),this.ja=new g(this.La.P.b8()),this.get("textureSource").bo(this.ja.If()),this.set("contentWidth",this.ja.hg()),this.set("contentHeight",this.ja.xg()),this.set("hfov",6),this.set("distance",this.La.P.get("vrPointerDistance")));this.W("changing")&&this.ja.dB(b.Va&&this.get("changing"));this.W("over","overProgress")&&this.ja.rK(this.get("over"),this.get("overProgress"));this.ja.update(b.Af)&&this.get("textureSource").update();
this.get("changing")&&this.Na()};a.prototype.dg=function(){this.yi()};a.prototype.Dn=function(){this.W("composedAlpha","meshGroup","visible")&&this.aC()};a.prototype.aC=function(){h.nf(this.get("meshGroup"),this.get("visible")?this.get("composedAlpha"):0)};return a});
define("tdv/view/core/ToolTip","require exports tdv/utils tdv/constants/EventName tdv/view/core/ZIndex tdv/view/util/Font tdv/player/view/util/Color tdv/player/view/util/Device".split(" "),function(a,m,h,n,g,k,e,b){var c=document.createElement("pre"),d=document.createTextNode("");c.appendChild(d);return function(){function f(l){this.Gb=l;this.gGa=b.Jp();this.Gb.bind(n.gb,this.tg,this);this.qa=document.createElement("span");this.qa.style.pointerEvents="none";this.qa.style.position="absolute";this.qa.style.zIndex=
g.mWa.toString();this.qa.style.textAlign="center";this.qa.style.display="none";this.ae=document.createElement("span");this.ae.style.position="absolute";this.ae.style.left="0";this.ae.style.top="0";this.ae.style.right="0";this.ae.style.bottom="0";this.qa.appendChild(this.ae);this.Qz=document.createElement("span");this.Qz.style.position="relative";this.qa.appendChild(this.Qz);this.tk=this.R1=this.Jh=null;this.qz=this.pz=void 0;this.Py=!1;this.hGa=void 0}f.prototype.cc=function(){return this.qa};f.prototype.PE=
function(l){var p=this;if(!this.gGa){for(;l&&l.get("toolTipDisabled");)l=l.getParent();this.oe();this.Jh&&Object.keys(f.KQ).forEach(function(q){p.Jh.h(n.L(q),p.Aia,p)});if(this.Jh=l)Object.keys(f.KQ).forEach(function(q){p.Jh.bind(n.L(q),p.Aia,p,!1)}),this.Aia()}};f.prototype.jmb=function(l,p){this.Jh=l;this.hGa=p;this.b2()||(this.Py?this.sFa():this.EV())};f.prototype.qFa=function(l,p,q){this.Py&&this.Jh.o(n.Hua);this.kab(l);this.Qz.innerHTML=this.K2a(p);this.Dwa=q;this.qa.style.display="inline";this.dg();
this.Jh.o(n.lWa);this.Py=!0;(q||l.get("checkToolTipOcclusion"))&&this.H9a(l)};f.prototype.dg=function(){var l=this.ns(),p=l.x;l=l.y;var q=this.qa.offsetWidth||0,r=this.qa.offsetHeight||0;if(this.Dwa){p-=(this.qa.clientWidth||0)*.5;var t=this.Jh.get("toolTipCenteredOffsetY");l=t===void 0?l-(this.qa.clientHeight||0)*.5:t>0?l+t:l-((this.qa.clientHeight||0)-t)}p=Math.max(Math.min(p,this.Gb.nb()-q-3),3);l=Math.max(Math.min(l,this.Gb.Mb()-r-3),3);this.qa.style.left=p+"px";this.qa.style.top=l+"px"};f.prototype.ns=
function(){if(this.Dwa){var l=h.offset(this.Jh.wa().cc());return{x:l.left+this.Jh.nb()*.5,y:l.top+this.Jh.Mb()*.5}}return{x:this.pz||0,y:(this.qz||0)+25}};f.prototype.oe=function(){this.IG();this.IFa();this.Py&&(this.qa.style.display="none",this.Jh.o(n.Hua),this.Py=!1)};f.prototype.Aia=function(){this.Jh.get("toolTip")?this.b2()||(this.Py?this.rFa():this.EV()):this.b2()?this.IG():this.Py&&this.oe()};f.prototype.tg=function(l){this.pz=l.pageX;this.qz=l.pageY;this.Py&&this.Jh.get("toolTipFollowMouse")&&
this.dg()};f.prototype.rFa=function(){this.qFa(this.Jh,this.Jh.get("toolTip"),this.Jh.get("toolTipCentered"))};f.prototype.sFa=function(){this.qFa(this.Jh,this.hGa,!0)};f.prototype.b2=function(){return this.tk!=null};f.prototype.EV=function(){var l=this.Jh&&this.Jh.get("toolTipDisplayTime");if(l===void 0||l===null)l=f.KQ.toolTipDisplayTime;this.IG();this.tk=setTimeout(function(){this.tk=null;this.gGa?this.sFa():this.rFa()}.bind(this),l)};f.prototype.IG=function(){this.b2()&&(clearTimeout(this.tk),
this.tk=null)};f.prototype.H9a=function(l){var p=this.ns();this.IFa();var q=function(){this.qa.style.display=this.Py&&!this.O3a(l,p.x,p.y)?"inline":"none"}.bind(this);this.R1=setInterval(q,300);q()};f.prototype.IFa=function(){this.R1&&(clearInterval(this.R1),this.R1=null)};f.prototype.kab=function(l){function p(r){var t=l.get(r);return t===void 0?f.KQ[r]:t}this.qa.style.opacity=p("toolTipOpacity");this.qa.style.paddingTop=p("toolTipPaddingTop")+"px";this.qa.style.paddingBottom=p("toolTipPaddingBottom")+
"px";this.qa.style.paddingLeft=p("toolTipPaddingLeft")+"px";this.qa.style.paddingRight=p("toolTipPaddingRight")+"px";this.qa.style.textAlign=p("toolTipHorizontalAlign");this.ae.style.opacity=p("toolTipBackgroundOpacity");this.ae.style.backgroundColor=p("toolTipBackgroundColor");this.ae.style.border=[p("toolTipBorderSize")+"px","solid",p("toolTipBorderColor")].join(" ");var q=p("toolTipShadowColor");this.ae.style.boxShadow=[p("toolTipShadowHorizontalLength")+"px",p("toolTipShadowVerticalLength")+"px",
p("toolTipShadowBlurRadius")+"px",p("toolTipShadowSpread")+"px",e.gF(q,p("toolTipShadowOpacity"))].join(" ");this.ae.style.borderRadius=p("toolTipBorderRadius")+"px";this.Qz.style.fontFamily=k.rA(p("toolTipFontFamily"));q=p("toolTipFontSize");typeof q==="number"?q+="px":typeof q!=="string"&&(q="");this.Qz.style.fontSize=q;this.Qz.style.fontWeight=p("toolTipFontWeight");this.Qz.style.fontStyle=p("toolTipFontStyle");this.Qz.style.color=p("toolTipFontColor");q=p("toolTipTextShadowColor");this.Qz.style.textShadow=
[p("toolTipTextShadowHorizontalLength")+"px",p("toolTipTextShadowVerticalLength")+"px",p("toolTipTextShadowBlurRadius")+"px",e.gF(q,p("toolTipTextShadowOpacity"))].join(" ")};f.prototype.O3a=function(l,p,q){p=document.elementsFromPoint(p,q);l=l.wa().cc();q=this.Gb.wa().cc();for(var r=0;r<p.length;r++){var t=p[r];if(l==t||l.contains(t))break;if(!this.qa.contains(t)&&q.contains(t)){var u=window.getComputedStyle(t);if(u.display!="none"&&u.visibility!="hidden"&&(t.tagName=="CANVAS"?1:this.MZa(u.backgroundColor))*
parseFloat(u.opacity)>.29)return!0}}return!1};f.prototype.MZa=function(l){if(!l)return 0;l=l.toLowerCase();var p=l.match(/rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(\d*\.?\d*)\s*\)/);return p?parseFloat(p[1]):l.match(/transparent/)?0:1};f.prototype.K2a=function(l){l=(l||"").split("\n");for(var p=0;p<l.length;p++)l[p]=this.D0a(l[p]);return l.map(function(q){return"<div>"+q+"</div>"}).join("")};f.prototype.D0a=function(l){d.nodeValue=l;(l=c.innerHTML)||(l="&nbsp;");return l};f.KQ={toolTip:void 0,toolTipBackgroundColor:"#F6F6F6",
toolTipBackgroundOpacity:1,toolTipBorderColor:"#767676",toolTipBorderRadius:3,toolTipBorderSize:1,toolTipCentered:!1,toolTipCenteredOffsetY:void 0,toolTipFontFamily:"Segoe UI",toolTipFontSize:12,toolTipFontColor:"#606060",toolTipFontWeight:"normal",toolTipFontStyle:"normal",toolTipHorizontalAlign:"center",toolTipOpacity:1,toolTipPaddingBottom:2,toolTipPaddingLeft:4,toolTipPaddingTop:2,toolTipPaddingRight:4,toolTipShadowBlurRadius:3,toolTipShadowColor:"#333333",toolTipShadowHorizontalLength:3,toolTipShadowOpacity:1,
toolTipShadowSpread:0,toolTipShadowVerticalLength:3,toolTipTextShadowBlurRadius:3,toolTipTextShadowColor:"#000000",toolTipTextShadowHorizontalLength:0,toolTipTextShadowOpacity:0,toolTipTextShadowVerticalLength:0,toolTipDisplayTime:600};return f}()});
define("tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas",["require","tdv/view/core/ToolTip","tdv/view/util/MeasureText","tdv/view/util/Font"],function(a){function m(e,b){this.P=e;this.An=b;this.w9a()}var h=a("tdv/view/core/ToolTip"),n=a("tdv/view/util/MeasureText"),g=a("tdv/view/util/Font"),k=180/Math.PI;m.prototype.If=function(){return this.ja};m.prototype.hg=function(){return this.ja.width};m.prototype.xg=function(){return this.ja.height};m.prototype.jf=function(){return 2*Math.atan2(this.ja.width/
3*.5,600)*k};m.prototype.w9a=function(){this.ja=document.createElement("canvas");var e=this.An.split("\n"),b=this.Mh("toolTipBackgroundColor"),c=this.Mh("toolTipBackgroundOpacity"),d=this.Mh("toolTipBorderRadius"),f=this.Mh("toolTipBorderColor"),l=this.Mh("toolTipBorderSize");this.Mh("toolTipDisplayTime");var p=this.Mh("toolTipFontFamily"),q=this.Mh("toolTipFontSize"),r=this.Mh("toolTipFontColor"),t=this.Mh("toolTipFontWeight"),u=this.Mh("toolTipFontStyle"),v=this.Mh("toolTipPaddingBottom"),w=this.Mh("toolTipPaddingLeft"),
x=this.Mh("toolTipPaddingTop"),y=this.Mh("toolTipPaddingRight"),z=this.Mh("toolTipOpacity"),A=this.Mh("toolTipTextShadowBlurRadius"),D=this.Mh("toolTipTextShadowColor"),F=this.Mh("toolTipTextShadowHorizontalLength"),C=this.Mh("toolTipTextShadowVerticalLength"),B=this.Mh("toolTipTextShadowOpacity");isNaN(q)&&(q=12);d=Math.round(d*3);l=Math.round(l*3);q=Math.round(q*3);v=Math.round(v*3);w=Math.round(w*3);x=Math.round(x*3);y=Math.round(y*3);A=Math.round(A*3);F=Math.round(F*3);C=Math.round(C*3);var H=
new n.mca;H.fontFamily=p;H.fontSize=Math.round(q)+"px";H.fontWeight=t;H.fontStyle=u;this.ja=document.createElement("canvas");var E=this.ja.getContext("2d"),G=e.map(function(T){return n(T,H,E)}),N=0,O=0;G.forEach(function(T){N=Math.max(T.width,N);O+=T.height});var R=e.length>1?O/e.length*.25:0;O+=(e.length-1)*R;y=l+w+N+y+l;v=l+x+O+v+l;this.ja.width=this.ja.height=Math.max(256,Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(y,v))/Math.LN2))));E=this.ja.getContext("2d");var Q=(this.ja.width-y)*.5,
K=(this.ja.height-v)*.5;E.save();E.translate(Q,K);E.globalAlpha=z;E.strokeStyle=f;E.fillStyle=b==="transparent"?"rgba(0,0,0,0)":this.Gva(c,b);E.lineWidth=l;E.beginPath();E.moveTo(d,0);E.lineTo(y-d,0);E.quadraticCurveTo(y,0,y,d);E.lineTo(y,v-d);E.quadraticCurveTo(y,v,y-d,v);E.lineTo(d,v);E.quadraticCurveTo(0,v,0,v-d);E.lineTo(0,d);E.quadraticCurveTo(0,0,d,0);E.closePath();E.fill();l>0&&E.stroke();E.fillStyle=r;E.font=t+" "+(u!="normal"?u+" ":"")+q+(isNaN(q)?"":"px")+" "+g.rA(p);E.shadowColor=this.Gva(B,
D);E.shadowOffsetX=F;E.shadowOffsetY=C;E.shadowBlur=A;E.textBaseline="middle";E.textAlign="center";var L=l+w+N*.5,U=l+x;e.forEach(function(T,Y){E.fillText(T,Math.round(L),Math.round(U+G[Y].height*.5));U+=G[Y].height+R})};m.prototype.Mh=function(e){var b=this.P.get(e);return b===void 0?h.KQ[e]:b};m.prototype.Gva=function(e,b){return"rgba("+parseInt("0x"+b.substr(1,2))+", "+parseInt("0x"+b.substr(3,2))+", "+parseInt("0x"+b.substr(5,2))+", "+e+")"};return m});
define("tdv/player/view/panorama/renderer/object/ToolTip","require tdv/utils tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/object/Plane"),
g=a("tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas"),k=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/util/XR");a=m.extend(n,function(){n.call(this);this.ja=null;this.set("tag","ToolTip");this.set("text","");this.Uq=new THREE.Vector3(0,0,-h.Et());this.zq=null});a.prototype.za=function(f){this.ft(f);this.gh(f);n.prototype.za.call(this,f)};a.prototype.ft=function(f){f.Va&&!this.zq&&e.getType()==e.Lx.mo&&this.bi([this.zq=new n])};
a.prototype.gh=function(f){if(!this.ja||this.W("text")){this.get("textureSource")||this.set("textureSource",new k);this.ja=new g(this.La.P,this.get("text"));this.get("textureSource").bo(this.ja.If());this.set("contentWidth",this.ja.hg());this.set("contentHeight",this.ja.xg());this.set("hfov",this.ja.jf());this.set("distance",this.La.P.get("vrPointerDistance"));var l=this.get("matrix"),p=this.get("intersectionYaw"),q=this.get("intersectionPitch");p!==void 0&&q!==void 0?(this.set("yaw",p),this.set("pitch",
q+c),this.set("distance",this.get("intersectionDistance"))):l?(this.Uq.applyMatrix4(l),this.Uq.x==0&&this.Uq.z==0||this.set("yaw",b*Math.atan2(this.Uq.x,-this.Uq.z)),this.Uq.y==0&&this.Uq.z==0||this.set("pitch",b*Math.atan2(this.Uq.y,Math.sqrt(this.Uq.z*this.Uq.z+this.Uq.x*this.Uq.x))+c)):(this.set("yaw",f.Xa),this.set("pitch",f.pitch+d))}};var b=180/Math.PI,c=2,d=5;return a});
define("tdv/player/view/panorama/renderer/pointer/Pointer",["require","exports","tdv/player/view/panorama/renderer/3d/util/RayUtil","tdv/player/view/panorama/renderer/3d/util/SceneUtil"],function(a,m,h,n){return function(){function g(k,e){this.Qf=k;this.j=e}g.prototype.update=function(){};g.prototype.clear=function(){};g.prototype.getType=function(){return this.Qf};g.prototype.mLa=function(k){return this.p1=(k=k.sh&&n.getCamera(k.sh))?h.vfb(k,this.p1):void 0};g.dR="webxr";g.WB="gaze";g.G_="gaze_click";
g.H_="laser";g.bR="mouse";g.cR="touch";return g}()});
define("tdv/player/view/panorama/renderer/pointer/Beam",["require","exports","tdv/player/view/panorama/renderer/pointer/Pointer","tdv/view/constants/Cursor"],function(a,m,h,n){return function(){function g(k,e,b,c,d){d===void 0&&(d=!0);this.we=k;this.Qs=e;this.p1=b;this.ag=c;this.Tza=d;this.Bwa=[];this.Xl=[];this.vV={};this.tga=[];this.jc="";this.BD=Number.MAX_VALUE}g.prototype.Mw=function(){return this.we};g.prototype.eP=function(){return this.p1};g.prototype.Bw=function(){return this.we.getType()==
h.bR};g.prototype.kpa=function(){return this.we.getType()==h.dR};g.prototype.MJ=function(){return this.we.getType()==h.cR};g.prototype.whb=function(){return this.we.getType()==h.WB};g.prototype.gIa=function(k,e){this.vV[e]=(this.vV[e]||[]).concat(k)};g.prototype.fSa=function(){return g.qUa.find(this.Pgb.bind(this))};g.prototype.Pgb=function(k){return this.vV[k]!==void 0&&this.vV[k].length>0?!0:!1};g.prototype.uaa=function(){return Object.keys(this.vV).length>0};g.prototype.WI=function(k){this.gIa(k,
n.qf)};g.prototype.Wbb=function(k){this.tga=this.tga.concat(k)};g.prototype.deb=function(){return!this.fSa()&&this.tga.length>0};g.prototype.LD=function(k){this.Xl=this.Xl.concat(k)};g.prototype.We=function(){return this.Xl.length>0};g.prototype.om=function(k){k&&(this.PG===void 0||this.PG>k)&&(this.PG=k)};g.prototype.zw=function(){return this.PG};g.prototype.A6=function(k,e){if(this.jc==""||this.BD>e)this.jc=k,this.BD=e};g.prototype.nB=function(){return this.jc};g.prototype.du=function(k){this.Bwa=
k===void 0?[]:Array.isArray(k)?k:[k]};g.prototype.qm=function(){return this.Bwa.length>0};g.qUa=[n.Mi,n.Rta,n.IB,n.qf,n.Ee];return g}()});
define("tdv/player/view/panorama/renderer/pointer/GazePointer","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/object/Reticle tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),
n=a("tdv/constants/Key");a("tdv/player/view/panorama/renderer/3d/util/RayUtil");a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");var g=a("tdv/player/view/panorama/renderer/object/Reticle"),k=a("tdv/player/view/panorama/renderer/object/ToolTip"),e=a("tdv/player/view/panorama/renderer/pointer/Beam"),b=a("tdv/player/view/panorama/renderer/pointer/Pointer"),c=a("tdv/player/view/util/XR");a=m.extend(b,function(d,f){b.call(this,b.WB,d);this.il=this.I=null;this.Xl=[];this.Cd=this.gy=!1;this.BS=null;
this.wza=void 0;this.cV=null;this.jDa=void 0;this.Qe=new g;this.j.add(this.Qe);this.Rq="";this.jc=new k;this.jc.set("alpha",0);this.j.add(this.jc);this.mka=f?this.j.P.get("vrPointerSelectionTime"):void 0;this.xza=this.j.P.get("vrGazePointerHideTime");this.L5=this.L5.bind(this);this.$m=this.$m.bind(this);document.body.addEventListener("touchend",this.L5);document.addEventListener("keyup",this.$m,!0);c.M.bind(h.Xr,this.NHa,this,!0);this.Sla();this.nma()});a.prototype.clear=function(){document.body.removeEventListener("touchend",
this.L5);document.removeEventListener("keyup",this.$m,!0);c.M.h(h.Xr,this.NHa,this,!0);this.ala();this.j.remove(this.Qe);this.Qe=null;this.j.remove(this.jc);this.jc=null};a.prototype.update=function(d){this.I=d;this.m8a(d.In);this.lm()};a.prototype.L5=function(){this.PL()};a.prototype.$m=function(d){d.code!=n.ua.h_&&d.code!=n.ua.kL||this.PL()};a.prototype.NHa=function(){this.PL()};a.prototype.PL=function(){var d=this.Ml(h.Yf);this.im(d);this.vI(!1);this.yla()};a.prototype.yla=function(){this.j.Xb().o(h.eG,
{nQ:h.Yf})};a.prototype.lm=function(){var d=this.Ml(h.Lm);this.im(d);this.Jz(d.nB());a:{var f=this.Xl;for(var l=d.Xl,p=0;p<f.length;p++)if(l.indexOf(f[p])<0){f=!1;break a}for(p=0;p<l.length;p++)if(f.indexOf(l[p])<0){f=!1;break a}f=!0}f||(this.vI(!1),this.Xl=d.Xl,this.Xl.length&&this.vI(!0,d.uaa()))};a.prototype.m8a=function(d){this.gy!=d&&(this.gy=d,this.Qe.set("changing",this.gy),this.Sla(),this.nma())};a.prototype.vI=function(d,f){this.Cd!=d&&(this.Cd=d,this.Qe.set("over",this.Cd&&f),this.Sla(),
this.nma())};a.prototype.Jz=function(d){this.Rq!=d&&(this.Rq=d,this.jc.set("text",this.Rq),this.jc.set("alpha",this.Rq?1:0),this.Rq&&this.jc.yi())};a.prototype.im=function(d){this.j.tX().sort(function(f,l){return l.get("index")-f.get("index")}).forEach(function(f){f.ao(d)}.bind(this))};a.prototype.Ml=function(d){this.il=this.mLa(this.I);return new e(this,this.il?[this.il]:[],this.il,d)};a.prototype.nma=function(){!this.Cd||this.gy||this.mka===void 0?this.ala():this.Cd&&!this.cV&&this.a$a()};a.prototype.Sla=
function(){this.Cd||this.gy||this.xza===void 0?(this.Qe.set("alpha",1),this.MFa()):this.Qe.get("alpha")!=1||this.BS||this.N9a()};a.prototype.ala=function(){this.cV&&(clearInterval(this.cV),this.cV=null)};a.prototype.a$a=function(){this.Qe.set("overProgress",0);this.jDa=(new Date).getTime();this.cV=setInterval(this.O5a.bind(this),100)};a.prototype.O5a=function(){var d=(new Date).getTime()-this.jDa;d>=this.mka?(this.ala(),this.PL()):this.Qe.set("overProgress",d/this.mka)};a.prototype.MFa=function(){this.BS&&
(clearInterval(this.BS),this.BS=null)};a.prototype.N9a=function(){this.wza=(new Date).getTime();this.BS=setInterval(this.f5a.bind(this),10)};a.prototype.f5a=function(){var d=this.xza-((new Date).getTime()-this.wza);this.Qe.set("alpha",Math.max(.01,Math.min(1,d/500)));d<=0&&this.MFa()};return a});
define("tdv/player/view/panorama/renderer/object/Laser","require tdv/utils tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/WebGLObject tdv/player/view/util/Color".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),
g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/panorama/renderer/object/WebGLObject"),b=a("tdv/player/view/util/Color"),c=new THREE.Matrix4,d=Math.PI/180;a=m.extend(e,function(){e.call(this);this.set("tag","Laser");this.set("matrix",null);this.set("over",!1);this.set("pressed",!1);this.set("intersectionDistance",0);this.set("visible",!1);this.set("attachToCamera",!1);this.set("dotVisible",
!0);this.Hja=this.PU=this.Bv=this.Gja=null;new THREE.Matrix4;this.Ija=new THREE.Matrix4;this.Ija.multiply(c.makeRotationX(-90*d));this.Ija.multiply(c.makeTranslation(0,f*.5,0));this.V0=this.U0=this.T0=this.qy=this.Lea=null;new THREE.Matrix4;this.Mea=new THREE.Matrix4;this.HR=this.S0=this.Kea=null;new THREE.Matrix4;this.KG=[new THREE.Matrix4,new THREE.Matrix4,new THREE.Matrix4];this.KG[0].multiply(c.makeRotationX(-90*d));this.KG[0].multiply(c.makeTranslation(0,-p*.5,0));this.KG[1].multiply(c.makeRotationX(-90*
d));this.KG[1].multiply(c.makeTranslation(0,-p*.5,-l*.5));this.KG[2].multiply(c.makeRotationX(-90*d));this.KG[2].multiply(c.makeTranslation(0,-p*.5,-l))});a.prototype.za=function(q){e.prototype.za.call(this,q);this.pma();this.HD()};a.prototype.pma=function(){this.W("visible")&&(this.get("meshGroup").visible=this.get("visible"));this.W("dotVisible")&&g.nf([this.U0,this.S0],this.get("dotVisible")?1:0)};a.prototype.HD=function(){this.W("over","pressed")&&(this.LGa(),this.jHa())};var f=.35,l=.012,p=.1;
a.prototype.hq=function(){this.S0=g.create(new THREE.SphereGeometry(2.3,32,32),this.f_a());this.U0=g.create(new THREE.SphereGeometry(2,32,32),this.g_a());this.Hja=g.create(new THREE.CylinderGeometry(.003,.003,f,8),this.H_a());this.SL=[];this.SL.push(g.create(new THREE.CylinderGeometry(l,l,p,32),this.eea()));this.SL.push(g.create(new THREE.BoxGeometry(2*l,p,l),this.eea()));this.SL.push(g.create(new THREE.CylinderGeometry(l,l,p,32),this.eea()));return[this.S0,this.U0,this.Hja].concat(this.SL)};a.prototype.f_a=
function(){if(this.Kea==null){var q=document.createElement("canvas");q.width=q.height=256;var r=q.getContext("2d"),t=new k;t.bo(q);this.Kea=n.st(t.texture(),new n.Rp);r.fillStyle="rgba(0, 0, 0, 0.75)";r.clearRect(0,0,q.width,q.height);r.fillRect(0,0,q.width,q.height)}return this.Kea};a.prototype.g_a=function(){this.Lea==null&&(this.qy=document.createElement("canvas"),this.qy.width=this.qy.height=256,this.T0=this.qy.getContext("2d"),this.V0=new k,this.V0.bo(this.qy),this.Lea=n.st(this.V0.texture(),
new n.Rp),this.LGa());return this.Lea};a.prototype.LGa=function(){this.T0.fillStyle=this.Jfa();this.T0.clearRect(0,0,this.qy.width,this.qy.height);this.T0.fillRect(0,0,this.qy.width,this.qy.height);this.V0.update()};a.prototype.H_a=function(){this.Gja==null&&(this.Bv=document.createElement("canvas"),this.Bv.width=this.Bv.height=256,this.PU=this.Bv.getContext("2d"),this.Jja=new k,this.Jja.bo(this.Bv),this.Gja=n.st(this.Jja.texture(),new n.Rp),this.jHa());return[this.Gja]};a.prototype.jHa=function(){var q=
b.Dp(this.Jfa()).join(", "),r=this.PU.createLinearGradient(0,0,0,this.Bv.height);r.addColorStop(0,"rgba("+q+", 0)");r.addColorStop(.5,"rgba("+q+", 1)");r.addColorStop(1,"rgba("+q+", 1)");this.PU.fillStyle=r;this.PU.clearRect(0,0,this.Bv.width,this.Bv.height);this.PU.fillRect(0,0,this.Bv.width,this.Bv.height);this.Jja.update()};a.prototype.eea=function(){if(this.HR==null){var q=document.createElement("canvas");q.width=q.height=256;var r=q.getContext("2d"),t=new k;t.bo(q);this.HR=n.st(t.texture(),new n.Rp);
r.fillStyle="rgba(64, 64, 64, 1)";r.clearRect(0,0,q.width,q.height);r.fillRect(0,0,q.width,q.height)}return[this.HR,this.HR,this.HR]};a.prototype.gt=function(){var q=!1,r=!1,t=!1;if(this.W("intersectionDistance")){r=(r=this.get("intersectionDistance"))?h.qw(r):h.Et();var u=r/h.Et();this.Mea.makeTranslation(0,0,-r);this.Mea.multiply(c.makeScale(u,u,u));r=!0}this.W("matrix")&&(t=r=q=!0);r&&(c.identity(),(r=this.get("matrix"))&&c.multiply(r),c.multiply(this.Mea),g.qt(this.U0,c),g.qt(this.S0,c));q&&(c.identity(),
(r=this.get("matrix"))&&c.multiply(r),c.multiply(this.Ija),g.qt(this.Hja,c));if(t)for(r=this.get("matrix"),q=0;q<this.SL.length;q++)c.identity(),r&&c.multiply(r),c.multiply(this.KG[q]),g.qt(this.SL[q],c)};a.prototype.NI=function(){if(this.W("index","meshGroup")){var q=this.get("meshGroup");q&&q.children.forEach(function(r){g.O$(r,this.get("index"))}.bind(this))}};a.prototype.Jfa=function(){return this.get("pressed")?this.La.P.get("vrPointerSelectionColor"):this.get("over")?this.La.P.get("vrPointerOverColor"):
this.La.P.get("vrPointerColor")};return a});
define("tdv/player/view/panorama/renderer/pointer/LaserPointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/object/Laser tdv/player/view/panorama/renderer/object/Reticle tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/util/Gamepad tdv/player/view/util/XR tdv/player/view/util/geo/Quaternion".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/object/Laser"),k=a("tdv/player/view/panorama/renderer/object/Reticle"),e=a("tdv/player/view/panorama/renderer/object/ToolTip"),b=a("tdv/player/view/panorama/renderer/pointer/Beam"),c=a("tdv/player/view/panorama/renderer/pointer/Pointer"),d=a("tdv/player/view/util/Gamepad"),f=a("tdv/player/view/util/XR"),l=a("tdv/player/view/util/geo/Quaternion"),p=new THREE.Matrix4,
q=Math.PI/180;a=m.extend(c,function(r){c.call(this,c.H_,r);this.il=this.I=null;this.Xl=[];this.$k=new g;this.j.add(this.$k);this.Qe=new k;this.j.add(this.Qe);this.bm=!1;this.Rq="";this.jc=null;this.Vm=new THREE.Matrix4});a.prototype.clear=function(){this.j.remove(this.$k);this.j.remove(this.Qe);this.Qe=this.$k=null;this.jc&&this.j.remove(this.jc);this.jc=null};a.prototype.update=function(r){this.I=r;this.Qe.set("changing",r.In);this.Qe.set("visible",r.In);var t=d.Ug();if(t&&!t.yhb()){var u=t.quaternion(),
v=t.position(),w=f.Uf&&f.Ec,x=l.Xa(f.Uf&&f.wg);this.Vm.identity();v?(this.Vm.multiply(p.makeRotationY((x-r.Xa)*q)),this.Vm.multiply(p.makeTranslation(-w.x,-w.y,-w.z)),this.Vm.multiply(p.makeTranslation(v.x,v.y,v.z)),this.Vm.multiply(p.makeRotationFromQuaternion(u))):(this.Vm.multiply(p.makeRotationY(-r.Xa*q)),t.hand()==d.fb?this.Vm.multiply(p.makeTranslation(-.2,-.4,0)):this.Vm.multiply(p.makeTranslation(.2,-.4,0)),this.Vm.multiply(p.makeRotationY(x*q)),this.Vm.multiply(p.makeRotationFromQuaternion(u)),
this.Vm.multiply(p.makeTranslation(0,0,-.3)));this.$k.set("matrix",null);this.$k.set("matrix",this.Vm);this.$k.set("pressed",t.pressed());this.$k.set("visible",!0)}else this.$k.set("visible",!1);this.lm();r=!!t&&t.pressed();this.bm!=r&&(this.bm&&this.PL(),this.bm=r);this.$k.yi();this.Qe.yi()};a.prototype.PL=function(){var r=this.Ml(h.Yf);this.im(r);this.$k.set("over",!0);this.$k.set("dotVisible",!0);this.$k.set("intersectionDistance",r.zw());d.Ug();this.yla()};a.prototype.yla=function(){this.j.Xb().o(h.eG,
{nQ:h.Yf})};a.prototype.lm=function(){var r=this.Ml(h.Lm);this.im(r);this.Jz(r.nB());a:{var t=this.Xl;for(var u=r.Xl,v=0;v<t.length;v++)if(u.indexOf(t[v])<0){t=!1;break a}for(v=0;v<u.length;v++)if(t.indexOf(u[v])<0){t=!1;break a}t=!0}t||!r.uaa()&&!this.$k.get("over")||(this.Xl=r.Xl,d.Ug());this.$k.set("over",r.uaa());this.$k.set("intersectionDistance",r.zw());this.$k.set("dotVisible",!r.deb())};a.prototype.Jz=function(r){this.Rq!=r&&(this.Rq&&this.j.remove(this.jc),this.Rq=r)&&(this.jc=new e(this.Rq),
this.jc.set("text",this.Rq),this.jc.set("matrix",null),this.jc.set("matrix",this.Vm),this.j.add(this.jc))};a.prototype.im=function(r){this.j.tX().sort(function(t,u){return u.get("index")-t.get("index")}).forEach(function(t){t.ao(r)}.bind(this))};a.prototype.Ml=function(r){this.il=n.ufb(this.Vm,this.il);return new b(this,[this.il],this.mLa(this.I),r)};return a});
define("tdv/player/view/panorama/renderer/pointer/MousePointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/view/constants/Cursor".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),
k=a("tdv/player/view/panorama/renderer/pointer/Beam"),e=a("tdv/player/view/panorama/renderer/pointer/Pointer"),b=a("tdv/view/constants/Cursor");a=m.extend(e,function(c){e.call(this,e.bR,c);this.j.P.bind(h.gb,this.bl,this,!0);this.j.P.bind(h.Qr,this.zAa,this,!0);this.j.P.bind(h.Eb,this.y7a,this,!0);this.j.P.bind(h.Sa,this.te,this,!0);this.j.P.bind(h.$a,this.cl,this,!0);this.qz=this.pz=this.vz=this.mp=this.Bd=this.Ad=void 0;this.il=this.I=null;this.QN=void 0;this.jc=""});a.prototype.clear=function(){this.j.P.h(h.gb,
this.bl,this,!0);this.j.P.h(h.Qr,this.zAa,this,!0);this.j.P.h(h.Sa,this.te,this,!0);this.j.P.h(h.$a,this.cl,this,!0);this.tma&&(this.j.XP(b.qf),this.tma=!1);this.Jz("")};a.prototype.update=function(c){this.I=c;this.ama()};a.prototype.BLa=function(){return{x:this.Ad,y:this.Bd,pageX:this.pz,pageY:this.qz}};a.prototype.bl=function(c){this.Ad=c.x;this.Bd=c.y;this.pz=c.pageX;this.qz=c.pageY;this.e6()};a.prototype.zAa=function(){this.qz=this.pz=this.Bd=this.Ad=void 0;this.e6()};a.prototype.y7a=function(){this.qz=
this.pz=this.Bd=this.Ad=void 0;this.e6()};a.prototype.te=function(c){c.zE&&c.zE.which===3||(this.Ad=this.mp=c.x,this.Bd=this.vz=c.y,this.pz=c.pageX,this.qz=c.pageY,this.im(this.Ml(h.Du)))};a.prototype.cl=function(c){c.zE&&c.zE.which===3||(this.Ad=c.x,this.Bd=c.y,this.pz=c.pageX,this.qz=c.pageY,this.im(this.Ml(h.TB)),this.aha(this.mp,this.vz,this.Ad,this.Bd)&&this.im(this.Ml(h.Yf)))};a.prototype.ama=function(){this.ht||(this.ht=setTimeout(function(){this.ht=null;this.lm()}.bind(this),300))};a.prototype.e6=
function(){this.ht&&(clearTimeout(this.ht),this.ht=null);this.lm()};a.prototype.lm=function(){var c=this.Ml(h.Lm);this.im(c);this.Jz(c.nB());c=c.fSa();this.QN!=c&&(this.QN&&this.j.XP(this.QN),(this.QN=c)&&this.j.Y9(this.QN))};a.prototype.Jz=function(c){this.jc!=c&&(this.jc=c,this.j.P.set("toolTip",this.jc))};a.prototype.im=function(c){this.j.tX().sort(function(d,f){return f.get("index")-d.get("index")}).forEach(function(d){d.ao(c)}.bind(this))};a.prototype.Ml=function(c){return new k(this,this.w1(),
null,c)};a.prototype.w1=function(){if(this.Ad!==void 0&&this.Bd!==void 0&&this.I.sh){var c=g.getCamera(this.I.sh);if(c)return this.il=n.CLa(c,this.Ad,this.Bd,this.I.width,this.I.height,this.il),[this.il]}return[]};a.prototype.aha=function(c,d,f,l){c=f-c;d=l-d;return Math.sqrt(c*c+d*d)<=5};return a});
define("tdv/player/view/panorama/renderer/pointer/TouchPointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),k=a("tdv/player/view/panorama/renderer/pointer/Beam"),
e=a("tdv/player/view/panorama/renderer/pointer/Pointer");a=m.extend(e,function(c){e.call(this,e.cR,c);this.P=this.j.P;this.P.bind(h.Sa,this.te,this,!0);this.P.bind(h.$a,this.cl,this,!0);this.P.bind(h.L("touchOverAreaScale"),this.Kia,this,!0);this.vz=this.mp=this.Bd=this.Ad=void 0;this.Hda=this.I=null;this.Kia();this.D6a=Array(b.length);this.jc="";this.lm=this.lm.bind(this)});a.prototype.clear=function(){this.P.h(h.Sa,this.te,this,!0);this.P.h(h.$a,this.cl,this,!0);this.P.h(h.L("touchOverAreaScale"),
this.Kia,this,!0);this.Jz("")};a.prototype.update=function(c){this.I=c;this.ama()};a.prototype.te=function(c){this.Ad=this.mp=c.x;this.Bd=this.vz=c.y;this.im(this.Ml(h.Du))};a.prototype.cl=function(c){this.Ad=c.x;this.Bd=c.y;this.im(this.Ml(h.TB));this.aha(this.mp,this.vz,this.Ad,this.Bd)&&this.im(this.Ml(h.Yf))};a.prototype.ama=function(){this.ht||(this.ht=setTimeout(this.lm,300))};a.prototype.e6=function(){this.ht&&(clearTimeout(this.ht),this.ht=null);this.lm()};a.prototype.lm=function(){this.ht=
null;var c=this.Ml(h.Lm);this.im(c);this.Jz(c.nB())};a.prototype.Jz=function(c){if(this.jc!=c&&(this.jc=c,c=this.j.P,c.set("toolTip",this.jc),!c.get("toolTipDisabled"))){var d=c.Xb().jc;this.jc?d.jmb(c,this.jc):d.oe()}};a.prototype.im=function(c){this.j.tX().sort(function(d,f){return f.get("index")-d.get("index")}).forEach(function(d){d.ao(c)}.bind(this))};a.prototype.Ml=function(c){var d=c==h.Lm?this.w1(this.I.width*.5,this.I.height*.5,this.Gda,this.Hda):this.w1(this.Ad,this.Bd,b,this.D6a);return new k(this,
d,null,c)};a.prototype.w1=function(c,d,f,l){var p=this.I.sh&&g.getCamera(this.I.sh);if(p){var q=this.I.width,r=this.I.height,t=Math.min(q,r)/100;f.forEach(function(u,v){l[v]=n.CLa(p,c+u[0]*t,d+u[1]*t,q,r,l[v])});return l}return[]};a.prototype.aha=function(c,d,f,l){c=f-c;d=l-d;return Math.sqrt(c*c+d*d)<=4*Math.round(1*Math.min(window.screen.width,window.screen.height)/100)};a.prototype.Kia=function(){var c=this.P.get("touchOverAreaScale");c<=0?(this.Gda=[],this.Hda=[]):(this.Gda=this.y1a(c),this.Hda=
Array(this.Gda.length))};a.prototype.y1a=function(c){var d=[],f=Math.min(50,Math.ceil(c*5)),l=Math.min(50,Math.ceil(c*30));c=Math.min(50,Math.ceil(c*15));for(var p=-f;p<=f;p++)for(var q=-f;q<=f;q++){var r=Math.sqrt(q*q+p*p);r<=f&&d.push([q,p,r])}for(q=-l;q<-f;q++)d.push([q,0,Math.sqrt(q*q)]);for(q=f+1;q<=l;q++)d.push([q,0,Math.sqrt(q*q)]);for(p=-c;p<-f;p++)d.push([0,p,Math.sqrt(p*p)]);for(p=f+1;p<=c;p++)d.push([0,p,Math.sqrt(p*p)]);d.sort(function(t,u){return t[2]-u[2]});return d.map(function(t){return[t[0],
t[1]]})};var b=function(){for(var c=[],d=0;d<5;d++)for(var f=-2+4*d/4,l=0;l<5;l++){var p=-2+4*l/4,q=Math.sqrt(p*p+f*f);q<=2&&c.push([p,f,q])}c.sort(function(r,t){return r[2]-t[2]});return c.map(function(r){return[r[0],r[1]]})}();return a});
define("tdv/player/view/panorama/renderer/pointer/WebXRPointer","require exports tdv/constants/EventName tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/util/XR three.mod".split(" "),function(a,m,h,n,g,k,e,b,c){function d(r,t){for(var u=0;u<r.length;u++)if(t.indexOf(r[u])<0)return!1;for(u=0;u<t.length;u++)if(r.indexOf(t[u])<0)return!1;
return!0}a=function(r){function t(u){u=r.call(this,k.dR,u)||this;u.In=!1;u.PPa=new Map;u.WP=new Map;u.WX=null;u.WPa=[];u.rsa=u.rsa.bind(u);document.body.addEventListener("touchend",u.rsa);b.M.bind(h.Yf,u.Mt,u,!0);return u}P(t,r);t.prototype.clear=function(){b.M.h(h.Yf,this.Mt,this);this.WP.forEach(function(u,v,w){this.eKa(u);w.delete(v)}.bind(this))};t.prototype.update=function(u){this.state=u;this.Bnb();this.dB(u.In);this.xQ()};t.prototype.Mt=function(u){this.WX=u=u.data.pointerState;u.fA||this.UQa(u)};
t.prototype.rsa=function(){var u=b.ud[0]||null;u&&!u.fA&&this.UQa(u)};t.prototype.UQa=function(u){f.copy(u.ray).applyMatrix4(u.matrixWorld);var v=new g(this,[f],b.eP,h.Yf,this.WX==u);this.TQa(v);b.YE(u,!1,!1,u.zw);b.QY(u,50);this.knb()};t.prototype.dB=function(u){this.In!==u&&(this.In=u,b.ud.forEach(function(v){b.tlb(v,u)}))};t.prototype.Bnb=function(){this.WP.forEach(function(u,v){b.ud.includes(v)||(this.eKa(u),this.WP.delete(v))}.bind(this));b.ud.forEach(function(u){this.WP.has(u)||this.WP.set(u,
this.Vdb());b.C$(u,!1)}.bind(this))};t.prototype.xQ=function(){var u=b.ud.find(function(A){return A.fA})?[]:b.ud;this.WX=this.WX||(b.ud.length?b.ud.find(function(A){return A.handedness=="right"})||b.ud[0]:null);for(var v=0;v<u.length;v++){var w=u[v];f.copy(w.ray).applyMatrix4(w.matrixWorld);var x=new g(this,[f],b.eP,h.Lm,this.WX==w);this.TQa(x);this.hob(x,w);var y=this.PPa.get(w),z=x.Xl;y&&d(y,z)&&this.WPa.includes(w)||(this.PPa.set(w,z),y=(y=x.zw())?e.qw(y):e.Et(),z=z.length>0,((x=x.uaa())||w.pr)&&
b.QY(w,5),b.YE(w,z,x,y))}this.WPa=u.slice()};t.prototype.hob=function(u,v){var w=u.nB()||"",x=this.WP.get(v);x&&w!==x.get("text")&&(w?(x.set("text",w),x.set("alpha",1),x.yi(),w=(w=u.zw())?e.qw(w):e.Et(),l.radius=w,x.set("intersectionYaw",void 0),x.set("intersectionPitch",void 0),f.copy(v.ray).applyMatrix4(v.matrixWorld),f.intersectSphere(l,p)&&(p.x==0&&p.z==0||x.set("intersectionYaw",q*Math.atan2(p.x,-p.z)),p.y==0&&p.z==0||x.set("intersectionPitch",q*Math.atan2(p.y,Math.sqrt(p.z*p.z+p.x*p.x))),x.set("intersectionDistance",
u.zw()))):(x.set("text",""),x.set("alpha",0)))};t.prototype.TQa=function(u){this.j.tX().sort(function(v,w){return w.get("index")-v.get("index")}).forEach(function(v){v.ao(u)}.bind(this))};t.prototype.knb=function(){var u=this.j.Xb();u&&u.o(h.eG,{nQ:h.Yf})};t.prototype.Vdb=function(){var u=new n;u.set("alpha",0);this.j.add(u);return u};t.prototype.eKa=function(u){this.j.remove(u)};return t}(k);var f=new c.Ray,l=new c.Sphere,p=new c.Vector3,q=180/Math.PI;return a});
define("tdv/player/view/panorama/renderer/pointer/Factory","require tdv/player/view/panorama/renderer/pointer/GazePointer tdv/player/view/panorama/renderer/pointer/LaserPointer tdv/player/view/panorama/renderer/pointer/MousePointer tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/pointer/TouchPointer tdv/player/view/panorama/renderer/pointer/WebXRPointer".split(" "),function(a){var m=a("tdv/player/view/panorama/renderer/pointer/GazePointer"),h=a("tdv/player/view/panorama/renderer/pointer/LaserPointer"),
n=a("tdv/player/view/panorama/renderer/pointer/MousePointer"),g=a("tdv/player/view/panorama/renderer/pointer/Pointer"),k=a("tdv/player/view/panorama/renderer/pointer/TouchPointer"),e=a("tdv/player/view/panorama/renderer/pointer/WebXRPointer");return{create:function(b,c){switch(b){case g.dR:return new e(c);case g.WB:return new m(c,!0);case g.G_:return new m(c,!1);case g.H_:return new h(c);case g.bR:return new n(c);case g.cR:return new k(c)}}}});
define("tdv/player/view/panorama/renderer/util/CursorManager",["require","tdv/view/constants/Cursor"],function(a){function m(n){this.dc=n;this.Gf=[]}var h=a("tdv/view/constants/Cursor");m.prototype.push=function(n){this.Gf.push(n);this.za()};m.prototype.pop=function(n){for(var g=this.Gf.length-1;g>=0;g--)if(this.Gf[g]==n){this.Gf.splice(g,1);this.za();break}};m.prototype.clear=function(){this.Gf.length>0&&(this.dc.set("cursor",h.Ee),this.Gf=[])};m.prototype.za=function(){this.dc.set("cursor",this.Gf.indexOf(h.Mi)>=
0?h.Mi:this.Gf.indexOf(h.qf)>=0?h.qf:this.Gf.length>0?this.Gf[this.Gf.length-1]:h.Ee)};return m});
define("tdv/player/view/panorama/renderer/Renderer","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/view/core/UIComponent tdv/view/constants/Cursor tdv/player/view/util/Device tdv/player/view/util/Gamepad tdv/player/view/util/geo/Frustum tdv/player/view/Flash tdv/player/view/panorama/renderer/RendererState tdv/player/view/panorama/renderer/3d/Renderer tdv/player/view/panorama/renderer/object/Factory tdv/player/view/panorama/renderer/object/Root tdv/player/view/panorama/renderer/pointer/Factory tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/util/CursorManager tdv/player/view/panorama/renderer/OcclusionCuller tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Fov tdv/player/view/util/XR tdv/view/util/Animation tdv/view/util/Screenshot".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),k=a("tdv/view/core/UIComponent"),e=a("tdv/view/constants/Cursor"),b=a("tdv/player/view/util/Device"),c=a("tdv/player/view/util/Gamepad"),d=a("tdv/player/view/util/geo/Frustum"),f=a("tdv/player/view/Flash"),l=a("tdv/player/view/panorama/renderer/RendererState"),p=a("tdv/player/view/panorama/renderer/3d/Renderer"),q=a("tdv/player/view/panorama/renderer/object/Factory"),r=a("tdv/player/view/panorama/renderer/object/Root"),
t=a("tdv/player/view/panorama/renderer/pointer/Factory"),u=a("tdv/player/view/panorama/renderer/pointer/Pointer"),v=a("tdv/player/view/panorama/renderer/util/CursorManager"),w=a("tdv/player/view/panorama/renderer/OcclusionCuller"),x=a("tdv/player/view/panorama/renderer/TextureLoader"),y=a("tdv/player/view/util/geo/Fov"),z=a("tdv/player/view/util/XR"),A=a("tdv/view/util/Animation"),D=a("tdv/view/util/Screenshot"),F=Math.PI/180,C=m.extend(k,function(B,H,E){k.call(this);this.gf("Renderer");this.set("toolTipDisabled",
!0);this.set("cursor",e.LB);this.set("layout","absolute");this.set("interactionEnabled",!1);this.Je=B;this.P=H;this.ld=E;this.Oe=new v(H);this.we=null;this.Dfa=!1;this.I=new l;this.La=new r(this.Je,this.P,this.ld,this);this.La.bind(n.V,this.requestFrame,this,!0);this.qk=new p(this.P);this.I.sh=this.qk.Sf();this.I.SW=this.qk.pxa;this.I.TW=this.qk.qxa;this.I.camera=this.qk.getCamera();this.gAa=(new Date).getTime();this.I5=new x;this.I5.bind(n.ia,this.T5a,this,!0);this.XAa=new w;this.XAa.bind(n.V,this.w5a,
this,!0);this.l1=new d(this.I.width,this.I.height,this.I.Wd*F);this.bind(n.Rb,this.kd,this,!0);this.bind(n.od,this.cp,this,!0);this.bind(n.jd,this.ap,this,!0);z.M.bind(n.V,this.pn,this,!0);c.bind(n.V,this.e5a,this,!0);h.ba(this.ld,["fxaaEnabled","aaEnabled","hotspotsEnabled","preloadEnabled"],function(){this.I.FJ=this.ld.get("hotspotsEnabled");this.I.yY=this.ld.get("preloadEnabled");this.I.ioa=this.ld.get("fxaaEnabled");this.I.wW=this.ld.get("aaEnabled");this.requestFrame()}.bind(this),!0);h.ba(this.ld,
["surfaceSelectionEnabled"],this.kma.bind(this));this.kma();this.pn();h.ba(this.Je,["defaultVRPointer"],this.Sq.bind(this));this.Sq()});C.prototype.create=function(B){return q.create(B)};C.prototype.add=function(B){this.La.appendChild(B);this.La.Cb().length==1&&this.b5a()};C.prototype.remove=function(B){if(B=this.La.Jf(B))B.remove(),this.La.Cb().length==0&&this.k5a()};C.prototype.Jf=function(B){return this.La.Jf(B)};C.prototype.tX=function(){return this.La.all()};C.prototype.Lkb=function(B){this.Dfa!=
B&&(this.Dfa=B,this.Sq())};C.prototype.yRa=function(B){this.I.Mpa=B};C.prototype.Y9=function(B){this.Oe.push(B)};C.prototype.XP=function(B){this.Oe.pop(B)};C.prototype.dB=function(B){this.I.In=B;this.requestFrame()};C.prototype.jK=function(){this.$G.o();this.I.IJ=!0;this.B4();var B=D.QSa(this.qk.If());this.I.IJ=!1;this.B4();return B};C.prototype.lna=function(B){this.I.IJ=!0;this.B4();B=this.qk.lna(B);this.I.IJ=!1;return B};C.prototype.getPixelRatio=function(){return this.qk.getPixelRatio()};C.prototype.jr=
function(){return!!this.qk&&this.qk.jr()};C.prototype.Kb=function(){k.prototype.Kb.call(this);this.$G||(this.$G=new f,this.wa().uk(this.$G.cc()))};C.prototype.Sq=function(){var B=this.I.Va?u.dR:this.Dfa?u.G_:b.ub()?u.cR:u.bR;this.we&&this.we.getType()==B||(this.we&&this.we.clear(),this.we=t.create(B,this),this.kma(),this.we.update(this.I))};C.prototype.kma=function(){this.I.xZ=this.ld.get("surfaceSelectionEnabled")&&[u.bR,u.dR,u.cR,u.G_].indexOf(this.we&&this.we.getType())>=0};C.prototype.np=function(){this.Oe.clear();
k.prototype.np.call(this)};C.prototype.kd=function(){var B=this.nb(),H=this.Mb();if(this.I.width!=B||this.I.height!=H)B&&H?(this.I.width=B,this.I.height=H,this.l1.TRa(this.I.width),this.l1.nRa(this.I.height),this.requestFrame()):m.log("Invalid size values: "+B+" "+H)};C.prototype.cp=function(){this.I.enabled=!0;this.requestFrame()};C.prototype.ap=function(){this.I.enabled=!1};C.prototype.pn=function(){this.I.Va=z.isPresenting;this.Sq();this.requestFrame()};C.prototype.e5a=function(){this.Sq();this.requestFrame()};
C.prototype.T5a=function(){this.requestFrame()};C.prototype.w5a=function(){this.requestFrame()};C.prototype.b5a=function(){this.I5.D$(this.P.Fc().sl())};C.prototype.k5a=function(){this.qk.Teb();this.I5.D$(null)};C.prototype.F$=function(B){this.D4!=B&&((this.D4=B)||this.requestFrame())};C.prototype.uK=function(B){this.I.Jk!=B&&(this.I.Jk=B,this.requestFrame())};C.prototype.setPosition=function(B,H,E,G){if(this.I.Xa!=B||this.I.pitch!=H||this.I.Mg!=E||this.I.Wd!=G)isNaN(B)||isNaN(H)||isNaN(E)||!G?m.log("Invalid position values: "+
B+" "+H+" "+E+" "+G):(this.I.Xa=B,this.I.pitch=H,this.I.Mg=E,this.I.Wd=G,this.l1.oK(this.I.Wd*F),this.requestFrame())};C.prototype.Kc=function(){return this.I.Xa};C.prototype.Jc=function(){return this.I.pitch};C.prototype.zg=function(){return this.I.Mg};C.prototype.jf=function(){return this.I.Wd};C.prototype.gP=function(){return this.I.Va?this.I.lj:y.Ar(this.I.lj,this.I.width,this.I.height)};C.prototype.hP=function(){return this.I.lj};C.prototype.unproject=function(B){return this.l1.unproject(B)};
C.prototype.requestFrame=function(){A.requestFrame(this.sq,this)};C.prototype.sq=function(){if(A.o8){var B=(new Date).getTime(),H=Math.max(1,Math.min(B-this.gAa,33));this.gAa=B;this.o(new g(C.Eba,{frameTime:H}));this.I.enabled&&(this.I.Af=H,this.B4())}else this.requestFrame()};C.prototype.B4=function(){this.La.Cb().length!=0&&(this.qk.update(this.I),this.I.Sj=this.qk.hfb(),this.I.Rj=this.qk.gfb(),this.I.lj=this.qk.efb(),this.I.ul=this.qk.getPixelRatio(),this.I.camera=this.qk.getCamera(),this.La.update(this.I),
this.I5.update(this.I),this.XAa.update(this.I),this.we.update(this.I),this.D4||this.qk.render())};C.Eba="render start";C.vqb=function(){return!0};return C});
define("tdv/player/view/panorama/control/RenderingController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/panorama/renderer/Renderer"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/renderer/Renderer"),k=m.extend(n,function(e){n.call(this);this.j=e;this.j.bind(g.Eba,this.JCa,this,!0)});k.prototype.clear=function(){this.j.h(g.Eba,this.JCa,this,!0);this.j=null};k.prototype.requestFrame=
function(){this.j.requestFrame()};k.prototype.JCa=function(e){e=e.data.frameTime;this.o(new h(k.KF,{frameTime:e}));this.o(new h(k.LF,{frameTime:e}))};k.KF="frameStart";k.LF="positionSet";return k});
define("tdv/player/view/panorama/control/camera/OrientationFOVManager",["require","tdv/player/view/util/Device","tdv/player/view/util/geo/Fov"],function(a){function m(){this.Ha=this.Pa=0;this.kb=90;this.Ks="landscape";this.fp=0;this.V1=h.ub()}var h=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/geo/Fov");m.prototype.uRa=function(g){this.kb=this.UKa(g)};m.prototype.UKa=function(g){return this.V1&&this.Ks=="portrait"?n.jJ(g,this.Ha,this.Pa):g};m.prototype.Efb=function(g){return this.V1&&
this.Ks=="portrait"?n.wm(g,this.Pa,this.Ha):g};m.prototype.sr=function(g){this.kb=this.V1&&this.Hpb?n.jJ(g,this.Ha,this.Pa):g};m.prototype.mw=function(){return this.V1&&this.Ks=="portrait"};m.prototype.jf=function(){return this.kb};m.prototype.RW=function(g){return n.jJ(g,this.Ha,this.Pa)};m.prototype.setSize=function(g,k){this.Pa=g;this.Ha=k;g=this.n2a();this.Ks!=g&&this.fp++;this.Ks=g};m.prototype.n2a=function(){return this.Pa===0||this.Ha===0?"landscape":this.Pa<this.Ha?"portrait":"landscape"};
return m});
define("tdv/player/view/panorama/control/translate/KeyboardManager","require tdv/utils tdv/constants/Key tdv/events/Event tdv/events/EventDispatcher tdv/view/util/KeyboardControl".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/Key"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/view/util/KeyboardControl"),e=m.extend(g,function(d){g.call(this);this.j=d;this.ha=!1;this.$m=this.$m.bind(this);this.ld=this.j.ld});e.prototype.clear=function(){this.ld=this.j=null};e.prototype.Ra=
function(d){this.ha!=d&&(this.ha&&document.removeEventListener("keyup",this.$m),(this.ha=d)&&document.addEventListener("keyup",this.$m))};e.prototype.$m=function(d){k.yp()||this.ld.get("gazeModeEnabled")||this.ld.get("arrowKeysAction")!="translate"||(c.includes(d.which)&&!d.shiftKey?this.o(new n(e.uba)):b.includes(d.which)&&!d.shiftKey&&this.o(new n(e.vba)))};const b=[h.ck,h.uo],c=[h.Ki,h.qo];e.vba="moveForward";e.uba="moveBackward";return e});
define("tdv/player/view/panorama/control/translate/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/translate/KeyboardManager".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/control/translate/KeyboardManager");a=m.extend(g,function(b){g.call(this);this.j=b;this.Uo=new k(b);this.Uo.bind(k.vba,this.MBa,
this,!0);this.Uo.bind(k.uba,this.LBa,this,!0)});a.prototype.clear=function(){this.Uo.h(k.vba,this.MBa,this,!0);this.Uo.h(k.uba,this.LBa,this,!0);this.Uo.clear();this.Uo=null};a.prototype.SE=function(b){this.Uo.Ra(b)};a.prototype.Wf=function(b){this.Ba=b};a.prototype.end=function(){this.Ba=null};a.prototype.MBa=function(b){this.vGa(b);(b=this.AEa(this.j.Kc(),this.Tya()))&&b.o(h.Xr)};a.prototype.LBa=function(b){this.vGa(b);(b=this.AEa(this.j.Kc()-180,this.Tya()))&&b.o(h.Xr)};a.prototype.vGa=function(b){this.j.Xb().o(new n(h.eG,
{nQ:b}))};a.prototype.Tya=function(){return this.j.ld.get("keyboardTranslateSelectionAngle")};a.prototype.AEa=function(b,c){var d,f;if(!this.Ba)return null;d!==void 0||(d=-90);f!==void 0||(f=360);var l=b-c*.5,p=b+c*.5,q=Math.max(-90,d-f*.5),r=Math.max(90,d+f*.5);c=this.Ba.get("adjacentPanoramas",[]).slice();c=c.filter(function(t){if(!t.get("enabled"))return!1;t=this.ns(t);if(!t)return!1;var u=t.Xa;for(var v=b-180,w=b+180;u<v;)u+=w-v;for(;u>w;)u-=w-v;t=t.pitch;return l<=u&&u<=p&&q<=t&&t<=r}.bind(this));
if(c.length==0)return null;c.sort(function(t,u){t=this.ns(t);u=this.ns(u);return(b-t.Xa)*(b-t.Xa)+(d-t.pitch)*(d-t.pitch)-((b-u.Xa)*(b-u.Xa)+(d-u.pitch)*(d-u.pitch))}.bind(this));return c[0]};a.prototype.ns=function(b){var c=b.get("yaw");b=b.get("distance");if(c===void 0||b===void 0)return null;var d=this.Ba.get("distanceToFloor");return{Xa:c,pitch:-90+Math.atan2(b,d)*e}};var e=180/Math.PI;return a});
define("tdv/player/view/panorama/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/AudioController tdv/player/view/panorama/control/camera/Controller tdv/player/view/panorama/control/transition/Controller tdv/player/view/panorama/control/FramesController tdv/player/view/panorama/control/LoadController tdv/player/view/panorama/control/MapController tdv/player/view/panorama/control/RenderingController tdv/player/view/panorama/control/camera/OrientationFOVManager tdv/player/view/panorama/control/translate/Controller tdv/player/view/util/geo/Projection".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/control/AudioController"),e=a("tdv/player/view/panorama/control/camera/Controller"),b=a("tdv/player/view/panorama/control/transition/Controller"),c=a("tdv/player/view/panorama/control/FramesController"),d=a("tdv/player/view/panorama/control/LoadController"),f=a("tdv/player/view/panorama/control/MapController"),l=a("tdv/player/view/panorama/control/RenderingController"),
p=a("tdv/player/view/panorama/control/camera/OrientationFOVManager"),q=a("tdv/player/view/panorama/control/translate/Controller"),r=a("tdv/player/view/util/geo/Projection"),t=m.extend(g,function(u,v){g.call(this);this.P=u;this.j=v;this.j.set("visible",!1);this.Bc=new p;this.gm=new l(this.j);this.Ge=new d(this.j);this.bc=new b(this.P,this.j,this.Bc);this.yb=new e(this.j,this.Bc);this.qg=new c(this.j);this.Zy=new f(this.j);this.Fd=new k(this.j);this.O5=new q(this.j);this.gm.bind(l.KF,this.jU,this,!0);
this.gm.bind(l.LF,this.kU,this,!0);this.Ge.bind(h.vd,this.VBa,this,!0);this.Ge.bind(h.Fg,this.UT,this,!0);this.Ge.bind(h.xc,this.Gj,this,!0);this.bc.bind(b.oc,this.cg,this,!0);this.bc.bind(b.Fba,this.WBa,this,!0);this.bc.bind(b.wba,this.nCa,this,!0);this.bc.bind(b.bba,this.cBa,this,!0);this.bc.bind(b.cba,this.dBa,this,!0);this.bc.bind(b.GF,this.cU,this,!0);this.bc.bind(b.EF,this.$C,this,!0);this.bc.bind(b.FF,this.lz,this,!0);this.bc.bind(b.DF,this.bU,this,!0);this.bc.bind(b.Ir,this.mn,this,!0);this.yb.bind(e.oc,
this.cg,this,!0);this.yb.bind(e.Dl,this.Cs,this);this.yb.bind(e.Hr,this.bp,this);this.yb.bind(e.gd,this.Mf,this,!0);this.yb.bind(e.ak,this.Is,this,!0);this.yb.bind(e.$j,this.Hs,this,!0);this.qg.bind(c.oc,this.cg,this,!0);this.qg.bind(c.Ok,this.Gs,this,!0);this.qg.bind(c.gd,this.Mf,this,!0);this.Zy.bind(f.tj,this.bCa,this,!0)});t.prototype.clear=function(){this.Ge.clear();this.gm.clear();this.yb.clear();this.bc.clear();this.qg.clear();this.Zy.clear();this.Fd.clear();this.Ge.h(h.vd,this.VBa,this);this.Ge.h(h.Fg,
this.UT,this);this.Ge.h(h.xc,this.Gj,this);this.gm.h(l.KF,this.jU,this);this.gm.h(l.LF,this.kU,this);this.bc.h(b.oc,this.cg,this);this.bc.h(b.Fba,this.WBa,this);this.bc.h(b.wba,this.nCa,this);this.bc.h(b.bba,this.cBa,this);this.bc.h(b.cba,this.dBa,this);this.bc.h(b.GF,this.cU,this);this.bc.h(b.EF,this.$C,this);this.bc.h(b.FF,this.lz,this);this.bc.h(b.DF,this.bU,this);this.bc.h(b.Ir,this.mn,this);this.yb.h(e.QUa,this.cg,this);this.yb.h(e.Dl,this.Cs,this);this.yb.h(e.Hr,this.bp,this);this.yb.h(e.gd,
this.Mf,this,!0);this.yb.h(e.ak,this.Is,this);this.yb.h(e.$j,this.Hs,this);this.qg.h(c.oc,this.cg,this);this.qg.h(c.Ok,this.Gs,this);this.qg.h(c.gd,this.Mf,this);this.Zy.h(f.tj,this.bCa,this);this.P=this.j=this.O5=this.Fd=this.Zy=this.qg=this.bc=this.yb=this.gm=this.Ge=null};t.prototype.x$=function(u){this.Zy.x$(u)};t.prototype.ura=function(u){this.bc.ura(u)};t.prototype.Wf=function(u,v,w){this.j.set("visible",!0);this.qg.W$();u.set("currentTime",w);this.bc.start(u,v)};t.prototype.cE=function(){return this.Ge.Ba||
this.bc.nfb()||this.bc.Yu};t.prototype.cB=function(){this.Ge.stop();this.qg.end();this.yb.end();this.bc.oe();this.Zy.stop();this.Fd.end();this.O5.end()};t.prototype.bQ=function(){this.yb.resume();this.qg.bQ()};t.prototype.SP=function(){this.yb.pause();this.qg.SP()};t.prototype.play=function(){this.yb.play();this.Fd.play();this.qg.play()};t.prototype.pause=function(){this.yb.pause();this.Fd.pause();this.qg.pause()};t.prototype.stop=function(){this.yb.stop();this.Fd.stop();this.qg.stop()};t.prototype.SE=
function(u){this.yb.SE(u);this.O5.SE(u)};t.prototype.getTime=function(){return this.qg.getTime()};t.prototype.moveTo=function(u,v,w,x,y){this.yb.moveTo(u,v,w,x,y)};t.prototype.Kc=function(){return this.j?this.j.Kc():void 0};t.prototype.Jc=function(){return this.j?this.j.Jc():void 0};t.prototype.zg=function(){return this.j?this.j.zg():void 0};t.prototype.jf=function(){return this.j?this.Bc.Efb(this.j.jf()):void 0};t.prototype.gP=function(){return this.j?this.j.gP():void 0};t.prototype.hP=function(){return this.j?
this.j.hP():void 0};t.prototype.Mf=function(){var u=this.qg.ql()||this.yb.ql();this.o(new n(t.gd,{state:u}))};t.prototype.xl=function(u){this.yb.xl(u)};t.prototype.YY=function(u){this.yb.YY(u)};t.prototype.UE=function(u){this.yb.UE(u)};t.prototype.ZY=function(u){this.yb.ZY(u)};t.prototype.Bg=function(u){this.qg.Bg(u)};t.prototype.vK=function(u){this.yb.vK(u)};t.prototype.Koa=function(u,v){return(u=r.get(u,v,this.j.Kc(),this.j.Jc(),this.j.zg(),this.j.jf(),this.j.nb(),this.j.Mb()))?{x:u.x,y:u.y}:null};
t.prototype.Ofb=function(u,v){return(u=r.tob(u,v,this.j))?{yaw:u.Xa,pitch:u.pitch}:null};t.prototype.jK=function(){this.j.jK()};t.prototype.$oa=function(){return this.bc.$oa()};t.prototype.WBa=function(u){this.Ge.start(u.data.panorama)};t.prototype.Gj=function(u){this.j.dB(u.percent<100);this.o(new n(t.wx,{percent:u.percent}))};t.prototype.VBa=function(u){this.qg.end();this.O5.Wf(u.data.panorama)};t.prototype.UT=function(){this.j.dB(!1);this.o(new n(t.xF))};t.prototype.cg=function(){this.gm.requestFrame()};
t.prototype.jU=function(u){u=u.data.frameTime;this.Bc.setSize(this.j.nb(),this.j.Mb());this.bc.ZA(u);this.yb.ZA(u)};t.prototype.kU=function(u){u=u.data.frameTime;this.bc.ze(u);this.yb.ze(u);this.qg.ze(u);this.Zy.ze(u);this.Fd.ze(u)};t.prototype.cU=function(u){this.Zy.display(u.data.panorama);this.qg.qP(u.data.panorama);this.o(new n(t.GF,{panorama:u.data.panorama}))};t.prototype.nCa=function(u){this.Zy.oe(u.data.panorama)};t.prototype.cBa=function(u){this.qg.start(u.data.panorama);this.Fd.start(u.data.panorama)};
t.prototype.dBa=function(){this.qg.end();this.j.set("visible",!1)};t.prototype.bU=function(u){this.yb.end();this.Fd.end(u.data.nextPanorama);this.o(new n(t.DF,{panorama:u.data.panorama}))};t.prototype.lz=function(u){this.yb.start(u.data.panorama,u.data.camera);this.o(new n(t.FF,{panorama:u.data.panorama}))};t.prototype.$C=function(u){this.o(new n(t.EF,{panorama:u.data.panorama}))};t.prototype.bCa=function(u){this.yb.Bra(u.data.yawDelta,0)};t.prototype.Cs=function(u){this.o(new n(t.Dl,u.data))};t.prototype.bp=
function(u){this.o(new n(t.Hr,u.data))};t.prototype.mn=function(u){this.o(new n(t.Ir,u.data))};t.prototype.Is=function(){this.qg.zQ();this.o(new n(t.ak))};t.prototype.Hs=function(){this.o(new n(t.$j))};t.prototype.kRa=function(u){this.qg.sK(u)};t.prototype.RE=function(u){this.qg.RE(u)};t.prototype.Gs=function(u){this.o(new n(t.Ok,u.data))};t.wx="loadingProgress";t.xF="loadingEnd";t.Dl="movementChange";t.Hr="positionChange";t.GF="panoramaStart";t.DF="panoramaEnd";t.FF="panoramaShow";t.EF="panoramaHide";
t.gd="playbackStateChange";t.ak="userInteractionStart";t.$j="userInteractionEnd";t.Ok="timeChange";t.Ir="transitionEnd";return t});
define("tdv/player/script/PanoramaPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/constants/PlaybackState tdv/player/constants/RotationMode tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/script/PanoramaCamera tdv/player/view/panorama/control/Controller tdv/player/view/panorama/control/constants/Movement tdv/player/view/panorama/renderer/Renderer tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/InfoWindow tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/constants/State tdv/view/util/KeyboardControl".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/constants/RotationMode"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/script/helper/ButtonProperty"),c=a("tdv/player/script/PlaybackMediaPlayer"),d=a("tdv/player/script/PanoramaCamera"),f=a("tdv/player/view/panorama/control/Controller"),l=a("tdv/player/view/panorama/control/constants/Movement"),p=a("tdv/player/view/panorama/renderer/Renderer"),q=a("tdv/player/view/util/Device"),
r=a("tdv/player/view/util/Gyroscope"),t=a("tdv/player/view/util/InfoWindow"),u=a("tdv/player/view/util/XR"),v=a("tdv/view/constants/ButtonMode"),w=a("tdv/view/constants/State"),x=a("tdv/view/util/KeyboardControl"),y=e.define("PanoramaPlayer",c,function(){c.call(this,"panorama");c.prototype.set.call(this,"rotationEnabled",!0);c.prototype.set.call(this,"zoomEnabled",!0);c.prototype.set.call(this,"surfaceSelectionEnabled",!1);c.prototype.set.call(this,"surfaceSelectionHorizontalAngle",90);c.prototype.set.call(this,
"surfaceSelectionVerticalAngle",180);c.prototype.set.call(this,"adjacentPanoramaPositionsEnabled",!1);c.prototype.set.call(this,"fxaaEnabled",!1);c.prototype.set.call(this,"aaEnabled",!1);this.cla=this.xga=this.CC=this.n1=this.R2=this.I2=this.Ada=this.hD=this.jj=this.ada=!1;this.dga=!0;this.l5=this.j2=this.Ro=this.y0=!1;this.Mka=x.yp();x.gX.bind(h.V,this.g5a,this,!0);this.hs=!1;this.j1=this.Afa=this.wf=this.ac=0;this.gja=this.ija=void 0;this.Yha=!0;this.Jj=g.ca;this.tq=this.tq.bind(this);this.U=this.j=
null;this.MAa={};for(var z in y.Px)this.MAa[z]=this.B_a(z);this.b0=new b(this,"buttonToggleGyroscope",v.bk);this.b0.bind(h.Rk,function(){this.set("gyroscopeEnabled",!0)},this);this.b0.bind(h.Nm,function(){this.set("gyroscopeEnabled",!1)},this);this.b0.set("pressed",this.get("gyroscopeEnabled")&&r.ol);(new b(this,"buttonCardboardView",v.af)).bind(h.ma,function(){this.set("viewMode",y.mG)},this,!0);(new b(this,"buttonVRView",v.af)).bind(h.ma,function(){this.set("viewMode",y.mG)},this,!0);u.M.bind(h.V,
function(){this.zla("viewMode");this.o(y.Kba)},this,!0);this.a0=new b(this,"buttonToggleGazeMode",v.bk);this.a0.bind(h.Rk,function(){this.set("gazeModeEnabled",!0)},this);this.a0.bind(h.Nm,function(){this.set("gazeModeEnabled",!1)},this);this.a0.set("pressed",this.get("gazeModeEnabled"));this.c0=new b(this,"buttonToggleHotspots",v.bk);this.c0.bind(h.Rk,function(){this.set("hotspotsEnabled",!0)},this);this.c0.bind(h.Nm,function(){this.set("hotspotsEnabled",!1)},this);this.c0.set("pressed",this.get("hotspotsEnabled"));
this.f0=new b(this,"buttonToggleSurfaceSelection",v.bk);this.f0.bind(h.Rk,function(){this.set("surfaceSelectionEnabled",!0)},this);this.f0.bind(h.Nm,function(){this.set("surfaceSelectionEnabled",!1)},this);this.f0.set("pressed",this.get("surfaceSelectionEnabled"));this.aZa=new b(this,"buttonScreenshot",v.af);this.aZa.bind(h.ma,this.sEa,this,!0);this.be=m.nr(this.Sh,this)});y.FUa="cameraPositionChange";y.wx="loadingProgress";y.MUa="preloadMediaShow";y.Kba="viewModeChange";y.prototype.moveLeft=function(){this.md(l.eL)};
y.prototype.moveRight=function(){this.md(l.fL)};y.prototype.moveUp=function(){this.md(l.gL)};y.prototype.moveDown=function(){this.md(l.dL)};y.prototype.playLeft=function(){this.md([l.eL,l.PLAYING])};y.prototype.playRight=function(){this.md([l.fL,l.PLAYING])};y.prototype.playUp=function(){this.md([l.gL,l.PLAYING])};y.prototype.playDown=function(){this.md([l.dL,l.PLAYING])};y.prototype.play=function(){this.tn()};y.prototype.pause=function(){this.tv()};y.prototype.stop=function(){this.cD()};y.prototype.seek=
function(z){this.sI(z)};y.prototype.setFramePlaybackPosition=function(z){this.C8a(z)};y.prototype.setFrameTransitionPosition=function(z){this.D8a(z)};y.prototype.restart=function(){this.bD()};y.prototype.zoomIn=function(){this.md(l.Nx)};y.prototype.zoomOut=function(){this.md(l.Ox)};y.prototype.resumeCamera=function(){this.x7a()};y.prototype.pauseCamera=function(){this.p6a()};y.prototype.moveTo=function(z,A,D,F){this.LAa(z,A,D,F,!1)};y.prototype.setPosition=function(z,A,D,F){this.LAa(z,A,D,F,!0)};
y.prototype.getScreenPosition=function(z,A){return this.F2a(z,A)};y.prototype.getPanoramaPosition=function(z,A){return this.o2a(z,A)};y.prototype.saveScreenshot=function(){return this.sEa()};y.prototype.get=function(z,A){switch(z){case "currentTime":return this.U&&this.U.getTime()||0;case "viewMode":return u.isPresenting?y.mG:y.Kca;case "video":z="panorama";break;case "rendererPanorama":return this.U&&this.U.cE()}if(!A)switch(z){case "mouseControlMode":A=k.Ota;break;case "touchControlMode":A=k.Iua}return c.prototype.get.call(this,
z,A)};y.prototype.set=function(z,A){if(this.get(z)!=A){switch(z){case "application":this.ada=!0;this.be();break;case "startTime":this.hD=!0;this.be();break;case "video":case "panorama":z="panorama";this.hD=!0;this.be();break;case "camera":this.Ada=!0;this.be();break;case "viewerArea":this.jj=!0;this.be();break;case "displayPlaybackBar":case "hdrPanoramaDisplayPlaybackBarSteps":case "livePanoramaDisplayPlaybackBarSteps":case "buttonPlay":case "buttonPlayPause":this.hs=!0;this.be();break;case "mapPlayer":this.I2=
!0;this.be();break;case "model3DPlayer":this.R2=!0;this.be();break;case "gazeModeEnabled":q.Jp()&&(A=!1);A&&x.yp()&&x.Sqa();this.n1=!0;this.be();break;case "gyroscopeEnabled":this.CC=!0;this.be();break;case "gyroscopeVerticalDraggingEnabled":this.dga=!0;this.be();break;case "viewMode":A=="vr"&&(A=y.mG);A==y.mG?this.get("viewerArea").set("viewMode","vr"):this.get("viewerArea").set("viewMode","standard");A=u.isPresenting?y.mG:y.Kca;break;case "hotspotsEnabled":this.xga=!0;this.be();break;case "mouseControlMode":case "touchControlMode":this.y0=
!0;this.be();break;case "surfaceSelectionEnabled":this.cla=!0,this.be()}c.prototype.set.call(this,z,A)}};y.prototype.tr=function(z){this.Ro!=z&&((this.Ro=z)?document.addEventListener("keyup",this.tq,!0):document.removeEventListener("keyup",this.tq,!0),this.U&&this.U.SE(this.Ro),this.j2=!0,this.be())};y.prototype.g5a=function(){var z=x.yp();this.Mka!==z&&(this.l5=!0,this.Mka=z,this.be())};y.prototype.tq=function(z){var A=this.get("gazeModeKeyCode");A&&!x.yp()&&z.code==A&&this.set("gazeModeEnabled",
!this.get("gazeModeEnabled"))};y.prototype.nna=function(){return this.get("doubleClickAction")!="inherit"};y.prototype.nnb=function(){this.hK([this])};y.prototype.rda=function(z){c.prototype.rda.call(this,z);z.bind(h.fi,this.HHa,this,!0)};y.prototype.Gla=function(z){c.prototype.Gla.call(this,z);z.h(h.fi,this.HHa,this,!0)};y.prototype.HHa=function(){switch(this.get("doubleClickAction")){case "toggle_fullscreen":var z=this.get("application").lk;z&&z.ol()&&z.toggle()}};y.prototype.B_a=function(z){var A=
y.Px[z];z=new b(this,z,v.af);z.bind(h.Sa,function(){this.md(A.movement)},this);A.stopOnRelease&&z.bind(h.$a,function(){this.md(l.Fg)},this);return z};y.prototype.Sh=function(){if(this.jj||this.ada)this.jj=this.ada=!1,this.l5=this.j2=this.y0=this.CC=this.n1=this.R2=this.I2=!0,this.oy(),this.get("viewerArea")&&this.get("application")&&this.ny(),this.pV(this.get("viewerArea"));var z=!1;if(this.j){this.I2&&(this.I2=!1,this.U.x$(this.get("mapPlayer")));this.R2&&(this.R2=!1,this.U.ura(this.get("model3DPlayer")));
this.y0&&(this.y0=!1,this.U.UE(this.get("mouseControlMode")),this.U.vK(this.get("touchControlMode")));if(this.hD||this.Ada)this.j1=this.Afa=this.ac=this.wf=0,this.gja=this.ija=void 0,z=!0,this.Ada=this.hD=!1,this.get("panorama")?this.U.Wf(this.get("panorama"),this.get("camera",new d),this.get("startTime")):(this.U.cB(),this.Yha=!0,this.Jj=g.ca,this.Jd(g.ca));if(this.n1||this.j2||this.l5){this.j2=this.l5=this.n1=!1;var A=this.get("gazeModeEnabled");this.j.Lkb(A&&this.Ro&&!this.Mka);this.a0.set("pressed",
A)}this.dga&&(this.dga=!1,this.U.ZY(this.get("gyroscopeVerticalDraggingEnabled",!0)));this.CC&&(this.CC=!1,(A=this.get("gyroscopeEnabled")&&r.ol)&&r.disabled&&(A=!1,t.zta.show(function(){r.Qqa(function(){this.set("gyroscopeEnabled",!0)}.bind(this))}.bind(this))),this.set("gyroscopeEnabled",A),this.U.YY(A),this.b0.set("pressed",A));this.xga&&(this.xga=!1,this.c0.set("pressed",this.get("hotspotsEnabled")));this.hs&&(this.hs=!1,z=!0);this.cla&&(this.cla=!1,this.f0.set("pressed",this.get("surfaceSelectionEnabled")));
z&&this.$z()}};y.prototype.TN=function(){this.U.$oa()||this.set("panorama",null)};y.prototype.ny=function(){var z=this.get("viewerArea"),A=this.get("application");this.j=new p(A,z,this);this.j.xa({left:0,top:0,bottom:0,right:0});z.mb(this.j);this.U=new f(z,this.j);this.U.bind(f.Dl,this.Cs,this);this.U.bind(f.Hr,this.qBa,this);this.U.bind(f.wx,this.Gj,this);this.U.bind(f.xF,this.ZM,this);this.U.bind(f.FF,this.lz,this,!0);this.U.bind(f.EF,this.$C,this,!0);this.U.bind(f.GF,this.cU,this,!0);this.U.bind(f.DF,
this.bU,this,!0);this.U.bind(f.gd,this.Mf,this);this.U.bind(f.ak,this.Is,this);this.U.bind(f.$j,this.Hs,this);this.U.bind(f.Ok,this.Gs,this);this.U.bind(f.Ir,this.mn,this,!0);this.get("application").bind(h.L("mute"),this.$T,this);this.get("application").get("mute",!1)&&this.U.Bg(!0);this.U.SE(this.Ro);u.M.bind(h.V,this.pn,this,!0);this.aea();this.xD(!0)};y.prototype.oy=function(){this.j&&(this.U.h(f.Dl,this.Cs,this),this.U.h(f.Hr,this.qBa,this),this.U.h(f.wx,this.Gj,this),this.U.h(f.xF,this.ZM,this),
this.U.h(f.FF,this.lz,this,!0),this.U.h(f.EF,this.$C,this,!0),this.U.h(f.GF,this.cU,this,!0),this.U.h(f.DF,this.bU,this,!0),this.U.h(f.gd,this.Mf,this),this.U.h(f.ak,this.Is,this),this.U.h(f.$j,this.Hs,this),this.U.h(f.Ok,this.Gs,this),this.U.h(f.Ir,this.mn,this),this.U.clear(),this.U=null,this.get("application").h(h.L("mute"),this.$T,this),this.j.getParent().removeChild(this.j),this.j=null,u.M.h(h.V,this.pn,this,!0),this.xD(!1))};y.prototype.$T=function(){this.j&&this.U.Bg(this.get("application").get("mute",
!1))};y.prototype.Mf=function(z){this.Jj=z.data.state;this.jh()};y.prototype.jh=function(){this.Jd(this.Yha||u.isPresenting?this.Jj:g.PLAYING)};y.prototype.Is=function(){this.o(new n(h.Tua))};y.prototype.Hs=function(){this.o(new n(h.Sua))};y.prototype.cU=function(z){this.o(new n(y.MUa,{panorama:z.data.panorama}))};y.prototype.bU=function(){};y.prototype.lz=function(z){this.aea();this.oT(z.data.panorama)};y.prototype.$C=function(z){this.nT(z.data.panorama)};y.prototype.Cs=function(z){for(var A in y.Px)this.MAa[A].set("state",
z.data[y.Px[A].pressedOn]?w.Fb:w.Ee);this.Yha=z.data.stopped;this.jh();this.o(new n(h.Qta,z.data))};y.prototype.qBa=function(z){this.aea();this.o(new n(y.FUa,z.data))};y.prototype.aea=function(){this.U&&(this.set("yaw",this.U.Kc()),this.set("pitch",this.U.Jc()),this.set("roll",this.U.zg()),this.set("hfov",this.U.jf()),this.set("actualHFOV",this.U.gP()),this.set("actualVFOV",this.U.hP()))};y.prototype.Gj=function(z){this.j.getParent().xa({progressPercent:z.data.percent,progressVisible:!0});this.o(new n(y.wx,
z.data))};y.prototype.ZM=function(){this.j.getParent().set("progressVisible",!1)};y.prototype.mn=function(){this.o(h.qca)};y.prototype.pn=function(){this.set("viewMode",u.isPresenting?y.mG:y.Kca);this.jh()};y.prototype.LAa=function(z,A,D,F,C){this.U&&this.U.moveTo(z,A,D,F,C)};y.prototype.md=function(z){this.U&&this.U.xl(z)};y.prototype.tn=function(){this.U&&this.U.play()};y.prototype.Zs=function(){this.U&&this.U.stop()};y.prototype.tv=function(){this.U&&this.U.pause()};y.prototype.sI=function(z){this.U&&
(this.Eya()?this.U.RE(z):this.U.kRa(z))};y.prototype.C8a=function(z){this.U&&this.U.kRa(z)};y.prototype.D8a=function(z){this.U&&this.U.RE(z)};y.prototype.p6a=function(){this.U&&this.U.SP()};y.prototype.x7a=function(){this.U&&this.U.bQ()};y.prototype.F2a=function(z,A){if(this.U)return this.U.Koa(z,A)};y.prototype.o2a=function(z,A){if(this.U)return this.U.Ofb(z,A)};y.prototype.sEa=function(){this.U&&this.U.jK()};y.prototype.EU=function(z){this.sI(z.data.position)};y.prototype.Gs=function(z){this.wf=
z.data.time;this.ac=z.data.duration;this.Afa=z.data.transitionPosition;this.j1=z.data.transitionLength;this.ija=z.data.steps;this.gja=z.data.selectedStep;this.$z()};y.prototype.$z=function(){var z=this.j.getParent(),A=!1;if(this.F1a()){var D=this.Eya(),F=this.q2a();D?this.j1>0&&(z.xa({playbackBarPosition:this.Afa,playbackBarDuration:this.j1,playbackBarSteps:this.ija,playbackBarSelectedStep:this.gja,playbackBarLiveDragging:F}),A=!0):this.ac>0&&(z.xa({playbackBarPosition:this.wf,playbackBarDuration:this.ac,
playbackBarSteps:void 0,playbackBarSelectedStep:void 0,playbackBarLiveDragging:F}),A=!0)}z.set("playbackBarVisible",A)};y.prototype.F1a=function(){var z=this.get("panorama");return z?e.Oa("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):e.Oa("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):e.Oa("VideoPanorama",z)?this.get("videoPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!0)):!1:!1};y.prototype.Eya=
function(){var z=this.get("panorama");return z?e.Oa("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBarSteps",!0):e.Oa("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBarSteps",!0):!1:!1};y.prototype.q2a=function(){var z=this.get("panorama");return!z||e.Oa("VideoPanorama",z)?!1:!0};y.mG="cardboard";y.Kca="standard";y.Px={buttonMoveLeft:{movement:l.eL,pressedOn:"movingLeft",stopOnRelease:!0},buttonMoveRight:{movement:l.fL,pressedOn:"movingRight",stopOnRelease:!0},buttonMoveUp:{movement:l.gL,
pressedOn:"movingUp",stopOnRelease:!0},buttonMoveDown:{movement:l.dL,pressedOn:"movingDown",stopOnRelease:!0},buttonPlayLeft:{movement:[l.eL,l.PLAYING],pressedOn:"movingLeft",stopOnRelease:!1},buttonPlayRight:{movement:[l.fL,l.PLAYING],pressedOn:"movingRight",stopOnRelease:!1},buttonPlayUp:{movement:[l.gL,l.PLAYING],pressedOn:"movingUp",stopOnRelease:!1},buttonPlayDown:{movement:[l.dL,l.PLAYING],pressedOn:"movingDown",stopOnRelease:!1},buttonZoomIn:{movement:l.Nx,pressedOn:"zoomingIn",stopOnRelease:!0},
buttonZoomOut:{movement:l.Ox,pressedOn:"zoomingOut",stopOnRelease:!0}};return y});
define("tdv/player/script/PanoramaPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("PanoramaPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.lz,this),g.set("panorama",this.get("media")),g.set("camera",
this.get("camera")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(h.di,this.lz,this),g.get("panorama")==this.get("media")&&g.set("panorama",null));n.prototype.stop.call(this)};a.prototype.lz=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.di,this.lz,this),this.get("player").bind(h.oo,this.$C,this),this.PD())};a.prototype.$C=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.oo,this.$C,this),this.stop(),this.end())};return a});
define("tdv/player/script/PanoramaSnapshot",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaSnapshot",m,function(){m.call(this)})});
define("tdv/player/script/Photo",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/Media","tdv/player/script/helper/LevelUtil"],function(a,m,h,n,g){a=function(k){function e(){return k.call(this)||this}P(e,k);e.prototype.tw=function(){var b=[],c=this.get("image");c&&b.push(g.Ft(c).get("url"));this.get("audios",[]).forEach(function(d){b=b.concat(d.tw())}.bind(this));return b};return e}(n);h.create("Photo",a);return a});
define("tdv/player/script/PhotoAlbum",["require","tdv/player/script/Media","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/Media");a=a("tdv/player/parser/ClassInfo").define("PhotoAlbum",m,function(){m.call(this);this.set("loop",!1)});a.prototype.tw=function(){var h=[],n=this.get("playList");n&&n.get("items",[]).forEach(function(g){(g=g.get("media"))&&(h=h.concat(g.tw()))});this.get("audios",[]).forEach(function(g){h=h.concat(g.tw())});return h};return a});
define("tdv/player/script/PhotoAlbumAudio",["require","tdv/constants/Priority","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio"],function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/MediaAudio");return h.define("PhotoAlbumAudio",n,function(){n.call(this,m.PVa)})});
define("tdv/player/view/photo/control/audio/AudioController",["require","tdv/constants/PlaybackState"],function(a){function m(n){this.Pu=n;this.CL=[];this.Qu=[];this.kt=1}var h=a("tdv/constants/PlaybackState");m.prototype.clear=function(){for(var n=0;n<this.CL.length;n++)this.CL[n].Zc(h.ca);this.LXa();this.Qu=this.CL=null};m.prototype.stop=function(){for(var n=0;n<this.Qu.length;n++)this.Qu[n].Zc(h.ca)};m.prototype.play=function(){for(var n=0;n<this.Qu.length;n++){var g=this.Qu[n];g.getState()!=h.PLAYING&&
g.Zc(h.PLAYING)}};m.prototype.pause=function(){for(var n=0;n<this.Qu.length;n++){var g=this.Qu[n];g.getState()==h.PLAYING&&g.Zc(h.$b)}};m.prototype.start=function(){this.stop();for(var n=0;n<this.Pu.length;n++){var g=this.Pu[n],k=g.sJ();k&&(this.CL.push(k),g.get("autoplay",!1)&&this.Qu.push(k))}for(n=0;n<this.Qu.length;n++)this.Qu[n].Zc(h.PLAYING)};m.prototype.ze=function(){};m.prototype.LXa=function(){for(var n=0;n<this.CL.length;n++)this.CL[n].jB(1)};return m});
define("tdv/player/view/photo/control/audio/PhotoAudioController",["require","tdv/utils","tdv/player/view/photo/control/audio/AudioController"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/photo/control/audio/AudioController");return m.extend(h,function(n){h.call(this,n.get("audios",[]));this.h4=n})});
define("tdv/player/view/photo/control/audio/AlbumAudioController",["require","tdv/utils","tdv/player/view/photo/control/audio/AudioController"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/photo/control/audio/AudioController");return m.extend(h,function(n){h.call(this,n.get("audios",[]));this.Zf=n})});
define("tdv/player/view/photo/control/AudioController",["require","tdv/player/view/photo/control/audio/PhotoAudioController","tdv/player/view/photo/control/audio/AlbumAudioController"],function(a){function m(){this.dk=[];this.Ij=[]}var h=a("tdv/player/view/photo/control/audio/PhotoAudioController"),n=a("tdv/player/view/photo/control/audio/AlbumAudioController");m.prototype.clear=function(){this.vSa();this.Ij=this.dk=null};m.prototype.vSa=function(){for(var g=0;g<this.dk.length;g++)this.dk[g].clear();
for(g=0;g<this.Ij.length;g++)this.Ij[g].clear();this.dk=[];this.Ij=[]};m.prototype.pause=function(){for(var g=0;g<this.dk.length;g++)this.dk[g].pause();for(g=0;g<this.Ij.length;g++)this.Ij[g].pause()};m.prototype.play=function(){for(var g=0;g<this.dk.length;g++)this.dk[g].play();for(g=0;g<this.Ij.length;g++)this.Ij[g].play()};m.prototype.stop=function(){for(var g=0;g<this.dk.length;g++)this.dk[g].stop();for(g=0;g<this.Ij.length;g++)this.Ij[g].clear();this.Ij=[]};m.prototype.umb=function(g){g=new h(g);
this.Ij.push(g);g.start()};m.prototype.Cmb=function(g){for(var k=0;k<this.Ij.length;k++)if(this.Ij[k].h4==g){this.Ij[k].clear();this.Ij.splice(k,1);break}};m.prototype.Yra=function(g){g=new n(g);this.dk.push(g);g.start()};m.prototype.zmb=function(g){for(var k=0;k<this.dk.length;k++)if(this.dk[k].Zf==g){this.dk[k].clear();this.dk.splice(k,1);break}};m.prototype.ze=function(g){for(var k=0;k<this.dk.length;k++)this.dk[k].ze(g);for(k=0;k<this.Ij.length;k++)this.Ij[k].ze(g)};return m});
define("tdv/player/view/photo/control/camera/LimitsManager",["require","tdv/utils","tdv/view/constants/ScaleMode"],function(a){function m(){this.Rd=!0;this.fc=this.ec=.5;this.kc=1;this.ti=h.uj;this.Ao=this.Bo=100}a("tdv/utils");var h=a("tdv/view/constants/ScaleMode");m.prototype.getX=function(){this.sp();return this.ec};m.prototype.getY=function(){this.sp();return this.fc};m.prototype.zA=function(){this.sp();return this.kc};m.prototype.setConfiguration=function(n,g,k){this.ti=k;this.fc=this.ec=.5;
this.kc=1;this.Rd=!0};m.prototype.setPosition=function(n,g,k){this.ec=n;this.fc=g;this.kc=k;this.Rd=!0};m.prototype.setSize=function(n,g){this.Bo=n;this.Ao=g;this.Rd=!0};m.prototype.sp=function(){if(this.Rd){this.Rd=!1;this.kc<1&&(this.kc=1);var n=Math.min(.5/this.kc,.5),g=Math.max(1-.5/this.kc,.5);this.ec<n?this.ec=n:this.ec>g&&(this.ec=g);n=Math.min(.5/this.kc,.5);g=Math.max(1-.5/this.kc,.5);this.fc<n?this.fc=n:this.fc>g&&(this.fc=g)}};return m});
define("tdv/player/view/photo/control/camera/PhotoCameraController",["require"],function(){function a(m){this.va=m;this.fc=this.ec=.5;this.kc=1;this.G4=!1}a.prototype.start=function(){this.fc=this.ec=.5;this.kc=1;this.G4=!0};a.prototype.clear=function(){this.va=null};a.prototype.setPosition=function(m,h,n){this.ec=m;this.fc=h;this.kc=n};a.prototype.Vf=function(){return this.G4};a.prototype.Nb=function(){this.G4=!1};return a});
define("tdv/player/script/PhotoCameraPosition",["require","exports","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a,m,h,n){a=function(g){function k(e,b,c){var d=g.call(this)||this;e!==void 0&&d.set("x",e);b!==void 0&&d.set("y",b);c!==void 0&&d.set("zoomFactor",c);return d}P(k,g);return k}(h);n.create("PhotoCameraPosition",a);return a});
define("tdv/player/view/photo/control/camera/MovementPhotoCameraController","require tdv/utils tdv/player/view/photo/control/camera/PhotoCameraController tdv/player/script/PhotoCameraPosition tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/photo/control/camera/PhotoCameraController"),n=a("tdv/player/script/PhotoCameraPosition"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a=m.extend(h,function(e){h.call(this,e);this.la=
null});a.prototype.start=function(e){var b=e.get("initialPosition",new n(.5,.5,1)),c=e.get("targetPosition",new n(.5,.5,1)),d=e.get("duration",1E3);d==0?(this.ec=b.get("x"),this.fc=b.get("y"),this.kc=b.get("zoomFactor")):this.la=new g(e.get("easing","linear"),[new k("x",b.get("x",.5),c.get("x",.5)),new k("y",b.get("y",.5),c.get("y",.5)),new k("zoom",b.get("zoomFactor",1),c.get("zoomFactor",1))],d);this.Nb(0)};a.prototype.clear=function(){this.la=null;h.prototype.clear.call(this)};a.prototype.Vf=function(){return this.la!=
null};a.prototype.Nb=function(e){this.la&&(this.la.Nb(e),this.va.setPosition(this.la.ob("x"),this.la.ob("y"),this.la.ob("zoom")),this.ec=this.va.getX(),this.fc=this.va.getY(),this.kc=this.va.zA(),this.la.Ve()&&(this.la=null))};return a});
define("tdv/player/view/photo/control/CameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/constants/PlaybackState tdv/view/constants/ScaleMode tdv/player/view/photo/control/camera/LimitsManager tdv/player/view/photo/control/camera/PhotoCameraController tdv/player/view/photo/control/camera/MovementPhotoCameraController tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),
g=a("tdv/player/parser/ClassInfo"),k=a("tdv/constants/PlaybackState"),e=a("tdv/view/constants/ScaleMode"),b=a("tdv/player/view/photo/control/camera/LimitsManager"),c=a("tdv/player/view/photo/control/camera/PhotoCameraController"),d=a("tdv/player/view/photo/control/camera/MovementPhotoCameraController"),f=a("tdv/constants/EventName"),l=m.extend(n,function(p,q){n.call(this);this.P=p;this.nd=q;this.P.bind(f.Rb,this.kd,this);this.I=k.ca;this.sn=this.h4=this.zc=this.Ja=null;this.va=new b});l.prototype.clear=
function(){this.end();this.va=null;this.P.h(f.Rb,this.kd,this);this.P=null};l.prototype.end=function(p){if(this.Ja==p||typeof p=="undefined")this.wxa(),this.zc=this.h4=this.Ja=null};l.prototype.start=function(p){if(this.Ja!=p){this.end(this.Ja);var q=p.get("media"),r=p.get("camera"),t=q.get("width",100),u=q.get("height",100),v=r?r.get("scaleMode",e.uj):e.uj;this.Ja=p;this.zc=r;this.h4=q;this.ha=!0;this.va.setConfiguration(t,u,v);this.D_a(r);this.bb()}};l.prototype.stop=function(){this.I!=k.ca&&(this.I=
k.ca,this.sn&&(this.sn.start(this.zc),this.bb()))};l.prototype.play=function(){if(this.I==k.ca||this.I==k.$b)this.I=k.PLAYING,this.bb()};l.prototype.pause=function(){this.I==k.PLAYING&&(this.I=k.$b)};l.prototype.ZA=function(p){this.sn&&this.sn.Vf()&&(this.I==k.PLAYING&&(this.sn.Nb(p),this.bb()),this.wn(this.sn.ec,this.sn.fc,this.sn.kc))};l.prototype.D_a=function(p){this.wxa();g.Oa("MovementPhotoCamera",p)?this.sn=new d(this.va):this.sn=new c(this.va);this.sn.start(p)};l.prototype.wxa=function(){this.sn&&
(this.sn.clear(),this.sn=null)};l.prototype.kd=function(){this.va.setSize(this.P.nb(),this.P.Mb());this.bb()};l.prototype.bb=function(){this.o(new h(l.oc))};l.prototype.wn=function(p,q,r){this.nd.setPosition(this.Ja,p,q,r)};l.oc="request frame";return l});
define("tdv/player/view/photo/control/StageControllerItem","require exports tdv/events/EventDispatcher tdv/events/Event tdv/constants/EventName tdv/player/script/PhotoCameraPosition".split(" "),function(a,m,h,n,g,k){return function(e){function b(c,d){var f=e.call(this)||this;f.gjb=c;f.renderer=d;f.camera=c.get("camera");f.tc=c.get("media");f.tc.set("enabled",!1);f.tc.bind(g.ia,f.OA,f,!1);return f}P(b,e);b.prototype.getItem=function(){return this.gjb};b.prototype.preload=function(){this.tc.set("opacity",
0);this.renderer.eIa(this.tc,this.camera);this.tc.get("isLoaded")&&this.gTa()};b.prototype.nf=function(c){this.tc.set("opacity",c);this.hx()};b.prototype.Hp=function(c){this.tc.set("offset",c);this.hx()};b.prototype.setPosition=function(c,d,f){var l=this.camera.get("position")||new k;this.camera.set("position",l);l.set("x",c);l.set("y",d);l.set("zoomFactor",f)};b.prototype.dmb=function(c){this.tc.set("zIndex",c)};b.prototype.isEnabled=function(){return this.tc.get("enabled")};b.prototype.hx=function(){var c=
this.tc.get("offset"),d=this.tc.get("opacity");c>-1&&c<1&&d>0?(this.renderer.eIa(this.tc,this.camera),this.tc.set("enabled",!0)):this.tc.get("enabled")&&(this.renderer.uQa(this.tc),this.tc.set("enabled",!1))};b.prototype.clear=function(){this.renderer.uQa(this.tc);this.tc.h(g.ia,this.OA,this)};b.prototype.OA=function(){this.tc.get("enabled")||this.gTa()};b.prototype.gTa=function(){this.o(new n(b.sua))};b.sua="preloadEnd";return b}(h)});
define("tdv/player/view/photo/control/StageController",["require","exports","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/photo/control/StageControllerItem"],function(a,m,h,n,g){return function(k){function e(b){var c=k.call(this)||this;c.Xs=[];c.j=b;return c}P(e,k);e.prototype.preload=function(b){this.eH(b).preload();return this};e.prototype.nf=function(b,c){this.eH(b).nf(c);this.Wz();return this};e.prototype.Hp=function(b,c){this.eH(b).Hp(c);this.Wz();return this};e.prototype.setPosition=
function(b,c,d,f){this.eH(b).setPosition(c,d,f);return this};e.prototype.yi=function(b){var c=this.Xs.findIndex(function(f){return f.getItem()==b}),d=this.Xs[c];this.Xs.splice(c,1);this.Xs.push(d);this.Xs.forEach(function(f,l){f.dmb(l)})};e.prototype.stop=function(){this.r0a(function(b){b.clear()});this.Xs=[]};e.prototype.clear=function(){this.stop();this.Xs=null};e.prototype.Wz=function(){this.Xs.find(function(b){return b.isEnabled()})};e.prototype.eH=function(b){var c=this.S0a(b);c||(c=new g(b,
this.j),c.bind(g.sua,this.g4a,this,!1),this.Xs.push(c));return c};e.prototype.r0a=function(b){this.Xs.forEach(b.bind(this))};e.prototype.S0a=function(b){return this.Xs.find(function(c){return c.getItem()==b})};e.prototype.g4a=function(b){this.o(new h(e.Aba,{item:b.source.getItem()}))};e.Aba="photo preload end";return e}(n)});define("tdv/player/view/photo/control/constants/TransitionMode",["require","exports"],function(){return{Op:"blending",Wr:"scroll"}});
define("tdv/player/view/photo/control/display/TransitionController","require exports tdv/events/Event tdv/events/EventDispatcher tdv/player/view/photo/control/StageController tdv/player/view/photo/control/constants/TransitionMode tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){var b=function(){function c(d,f,l){this.Vq=d;this.item=f;this.transitionDuration=l;this.index=d&&f?d.get("playList").get("items").indexOf(this.item):0;this.loaded=!1}c.prototype.isEqual=function(d){return d&&d.Vq==
this.Vq&&d.item==this.item};return c}();return function(c){function d(f,l,p){var q=c.call(this)||this;q.P=f;q.j=l;q.nd=p;q.nd.bind(g.Aba,q.wDa,q,!1);q.XN=k.Op;q.sb=d.Zr;q.yd=new b(null,null,0);q.le=null;q.Zl=null;q.Xu=null;q.Sv=void 0;q.uD=0;return q}P(d,c);d.prototype.clear=function(){var f;((f=this.yd)===null||f===void 0?0:f.item)&&this.ZV(this.yd);this.sb=d.Zr;this.Xu=this.yd=this.le=this.Zl=null;this.nd.h(g.Aba,this.wDa,this);this.P.release(this.j)};d.prototype.Mlb=function(f){this.XN=f};d.prototype.Cra=
function(f){this.uD=f};d.prototype.ssa=function(f,l,p){this.Zl=null;f=new b(f,l,p);f.isEqual(this.sb==d.Zr?this.yd:this.le)||(this.P.Qma(this.j),this.Zl=f,this.pCa())};d.prototype.pCa=function(){this.Zl&&this.sb==d.Zr&&(this.Zl.item&&!this.Zl.loaded?this.nd.preload(this.Zl.item):this.ay())};d.prototype.wDa=function(f){this.Zl&&this.Zl.item==f.data.item&&(this.Zl.loaded=!0,this.pCa())};d.prototype.ay=function(){this.Xu&&this.Xu!=this.Zl.Vq&&this.LEa(null);this.o(new h(d.Hba));this.W1()&&this.Zl.item!=
null&&this.yd.item!=null?this.vYa():(this.le=this.Zl,this.Zl=null,this.yd.Vq&&!this.yd.item?this.uYa():this.yd.item?this.le.item&&this.XN==k.Op?this.$x():this.le.item&&this.XN==k.epb?this.wYa():this.yd.item&&this.tYa():this.ewa())};d.prototype.ze=function(f){if(this.sb!=d.Zr){this.Sv+=f;f=this.le.transitionDuration;f=this.Sv>=f?1:this.Sv/f;switch(this.sb){case d.Cca:this.NGa(f);break;case d.Dca:this.yab(f);break;case d.Fca:this.PGa(f);break;case d.Eca:this.OGa(f);break;case d.vo:this.FD(f);break;
case d.Gca:this.lHa(f)}f<1?this.bb():this.dM()}};d.prototype.dM=function(){switch(this.sb){case d.Fca:this.z0a();break;case d.Eca:this.y0a();break;case d.Cca:this.w0a();break;case d.vo:this.yy();break;case d.Gca:this.C0a();break;case d.Dca:this.x0a()}this.LEa(this.yd.Vq);this.Zl==null?this.Bla(this.yd):this.ay()};d.prototype.vYa=function(){this.sb=d.Fca;this.le=new b(this.yd.Vq,null,this.yd.transitionDuration);this.Sv=0;this.Rh=this.yd.transitionDuration;this.nd.Hp(this.yd.item,0);this.PGa(0);this.bb()};
d.prototype.PGa=function(f){this.nd.nf(this.yd.item,1-f)};d.prototype.z0a=function(){this.ZV(this.yd);this.yd=this.le;this.sb=d.Zr};d.prototype.uYa=function(){this.sb=d.Eca;this.Sv=0;this.Rh=this.le.transitionDuration;this.Q5(this.le);this.nd.Hp(this.le.item,0);this.OGa(0);this.bb()};d.prototype.OGa=function(f){this.nd.nf(this.le.item,f)};d.prototype.y0a=function(){this.yd=this.le;this.sb=d.Zr;this.R5(this.yd)};d.prototype.ewa=function(f){var l=this;f===void 0&&(f=!1);f||this.P.get("transitionMode")!=
"fade_out_fade_in"&&!e.isPresenting?(this.P.Fc().vmb(),this.sb=d.Cca,this.Sv=0,this.Rh=this.le.transitionDuration,this.Q5(this.le),this.nd.Hp(this.le.item,0),this.nd.yi(this.le.item),this.nd.nf(this.le.item,1),this.j.Ra(!0),this.P.Fc().zK(),this.NGa(0),this.bb()):(this.sb=d.ZWa,this.P.Tsa(this.j,function(){l.ewa(!0)}))};d.prototype.NGa=function(f){this.nd.nf(this.le.item,f);this.P.Fc().nK(f)};d.prototype.w0a=function(){this.yd=this.le;this.P.Fc().oJ();this.sb=d.Zr;this.R5(this.yd)};d.prototype.$x=
function(){this.sb=d.vo;this.Sv=0;this.Rh=this.le.transitionDuration;this.Q5(this.le);this.nd.Hp(this.yd.item,0);this.nd.Hp(this.le.item,0);this.nd.yi(this.le.item);this.FD(0);this.bb()};d.prototype.FD=function(f){this.nd.nf(this.le.item,Math.min(1,f*2));this.nd.nf(this.yd.item,Math.min(1,(1-f)*2))};d.prototype.yy=function(){this.ZV(this.yd);this.yd=this.le;this.sb=d.Zr;this.R5(this.yd)};d.prototype.wYa=function(){this.sb=d.Gca;this.Sv=0;this.Rh=this.le.transitionDuration;this.Q5(this.le);this.nd.yi(this.le.item);
this.lHa(0);this.bb()};d.prototype.lHa=function(f){var l=this.yd.Vq!=this.le.Vq||this.yd.index<this.le.index;this.nd.Hp(this.le.item,(l?1-f:f-1)*(1+this.uD)).nf(this.le.item,1);this.nd.Hp(this.yd.item,(l?-f:f)*(1+this.uD)).nf(this.yd.item,1)};d.prototype.C0a=function(){this.ZV(this.yd);this.yd=this.le;this.sb=d.Zr;this.R5(this.yd)};d.prototype.tYa=function(){this.sb=d.Dca;this.Sv=0;this.Rh=this.yd.transitionDuration;this.nd.Hp(this.yd.item,0);this.P.Fc().cF();this.nd.nf(this.yd.item,e.isPresenting?
1:0);this.j.Ra(e.isPresenting?!0:this.P.PX(this.j));this.bb()};d.prototype.yab=function(f){this.P.Fc().QE(f);this.j.Ra(e.isPresenting?!0:this.P.PX(this.j));this.j.Qa()};d.prototype.x0a=function(){this.P.Fc().VD();this.nd.nf(this.yd.item,0);this.ZV(this.yd);this.sb=d.Zr;this.yd=this.le;this.P.release(this.j);this.j.Ra(!1)};d.prototype.W1=function(){return this.P.get("transitionMode")=="fade_out_fade_in"||e.isPresenting};d.prototype.Q5=function(f){this.o(new h(d.HF,{album:f.Vq,item:f.item}))};d.prototype.ZV=
function(f){this.o(new h(d.JF,{album:f.Vq,item:f.item}))};d.prototype.R5=function(f){this.o(new h(d.IF,{album:f.Vq,item:f.item}))};d.prototype.Bla=function(f){this.o(new h(d.Ir,{album:f.Vq,item:f.item}))};d.prototype.LEa=function(f){this.Xu!=f&&(this.Xu&&this.T$a(this.Xu),(this.Xu=f)&&this.U$a(this.Xu))};d.prototype.U$a=function(f){this.o(new h(d.Gr,{album:f}))};d.prototype.T$a=function(f){this.o(new h(d.Fr,{album:f}))};d.prototype.bb=function(){this.o(new h(d.oc))};d.Zr="stopped";d.vo="blending";
d.Gca="scrolling";d.Dca="exit_fading_out";d.Fca="fading_out_before_fading_in";d.Eca="fading_in_after_fading_out";d.Cca="entry_fading_in";d.ZWa="waiting_viewer_area_in_exclusive";d.oc="request frame";d.Hba="transition begin";d.Ir="transition end";d.HF="photo added";d.JF="photo removed";d.IF="photo displayed";d.Gr="photo album show";d.Fr="photo album hide";return d}(n)});
define("tdv/player/view/photo/control/display/ManualScrollController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/player/parser/ClassInfo tdv/view/constants/ScaleMode tdv/player/script/PhotoCameraPosition tdv/player/view/photo/control/camera/LimitsManager tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/constants/EventName"),k=a("tdv/player/parser/ClassInfo"),
e=a("tdv/view/constants/ScaleMode"),b=a("tdv/player/script/PhotoCameraPosition"),c=a("tdv/player/view/photo/control/camera/LimitsManager"),d=a("tdv/view/util/Ease"),f=a("tdv/view/util/EaseDimension"),l=m.extend(n,function(p,q){n.call(this);this.P=p;this.nd=q;this.Fq=this.oq=this.Ja=this.Zf=this.Ab=null;this.mp=void 0;this.p5=0;this.bm=!1;this.rq=0;this.Q2=this.Fq?-1:0;this.M2=this.oq?1:0;this.la=null;this.Rh=400;this.uD=0;this.va=new c});l.prototype.clear=function(){this.nd=this.P=this.Xu=null};l.prototype.zkb=
function(p,q){this.Zf=p;this.Ja=q;p=p&&p.get("playList")&&p.get("playList").get("items")||[];q=p.indexOf(q);this.oq=q>0?p[q-1]:null;this.Fq=q<p.length-1?p[q+1]:null;this.rq=0;this.Q2=this.Fq?-1:0;this.M2=this.oq?1:0;this.BDa()};l.prototype.enable=function(){if(this.Ab=this.P)this.Ab.bind(g.Sa,this.te,this,!0),this.Ab.bind(g.gb,this.bl,this,!0),this.Ab.bind(g.$a,this.cl,this,!0),this.BDa()};l.prototype.disable=function(){this.Ab&&(this.Ab.h(g.Sa,this.te,this),this.Ab.h(g.gb,this.bl,this),this.Ab.h(g.$a,
this.cl,this),this.Ab=null)};l.prototype.Llb=function(p){this.Rh=p};l.prototype.Cra=function(p){this.uD=p};l.prototype.BDa=function(){this.Ab&&(this.oq&&this.nd.preload(this.oq),this.Fq&&this.nd.preload(this.Fq))};l.prototype.TAa=function(){return(new Date).getTime()};l.prototype.te=function(p){this.bm||(this.mp=p.x,this.p5=0,this.tja=this.TAa(),this.bm=!0,this.la=null,this.o(new h(l.gba)),this.oq&&(p=this.Qya(this.oq),this.nd.setPosition(this.oq,p.x,p.y,p.zoom)),this.Fq&&(p=this.Qya(this.Fq),this.nd.setPosition(this.Fq,
p.x,p.y,p.zoom)))};l.prototype.bl=function(p){if(this.bm){var q=p.x-this.mp,r=q/this.Ab.nb(),t=this.TAa()-this.tja;this.p5=q/t;this.tja+=t;this.mp=p.x;this.rq=Math.max(this.Q2,Math.min(this.M2,this.rq+r));this.bb()}};l.prototype.cl=function(){if(this.bm){this.bm=!1;if(this.p5>1){var p="quad_out";var q=this.M2}else this.p5<-1?(p="quad_out",q=this.Q2):(p="quad_in_out",q=this.rq<-.5?this.Q2:this.rq>.5?this.M2:0);this.la=new d(p,[new f("offset",this.rq,q,1E3/this.Rh)],0);this.bb()}};l.prototype.ze=function(p){if(this.bm||
this.la)this.la&&(this.la.Nb(p),this.rq=this.la.ob("offset"),this.la.Ve()?(this.la=null,this.s0a()):this.bb()),this.Ja&&this.nd.Hp(this.Ja,this.rq*(1+this.uD)).nf(this.Ja,1),this.oq&&this.nd.Hp(this.oq,(this.rq-1)*(1+this.uD)).nf(this.oq,1),this.Fq&&this.nd.Hp(this.Fq,(this.rq+1)*(1+this.uD)).nf(this.Fq,1)};l.prototype.s0a=function(){this.o(new h(l.hba,{album:this.Zf,item:this.rq<0?this.Fq:this.rq>0?this.oq:this.Ja}))};l.prototype.bb=function(){this.o(new h(l.oc))};l.prototype.Qya=function(p){var q=
p&&p.get("camera"),r=p&&p.get("media");p=r&&r.get("width",100)||100;r=r&&r.get("height",100)||100;var t=q?q.get("scaleMode",e.uj):e.uj,u={};k.Oa("MovementPhotoCamera",q)?(q=q.get("initialPosition",new b(.5,.5,1)),u.x=q.get("x",.5),u.y=q.get("y",.5),u.zoom=q.get("zoomFactor",.5)):(u.x=.5,u.y=.5,u.zoom=1);this.va.setConfiguration(p,r,t);this.va.setSize(this.P.nb(),this.P.Mb());this.va.setPosition(u.x,u.y,u.zoom);u.x=this.va.getX();u.y=this.va.getY();u.zoom=this.va.zA();return u};l.oc="request frame";
l.gba="interaction begin";l.hba="interaction end";return l});
define("tdv/player/view/photo/control/DisplayController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/player/view/photo/control/StageController tdv/player/view/photo/control/constants/TransitionMode tdv/player/view/photo/control/display/TransitionController tdv/player/view/photo/control/display/ManualScrollController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher");a("tdv/constants/EventName");a("tdv/player/view/photo/control/StageController");
var g=a("tdv/player/view/photo/control/constants/TransitionMode"),k=a("tdv/player/view/photo/control/display/TransitionController"),e=a("tdv/player/view/photo/control/display/ManualScrollController"),b=m.extend(n,function(c,d,f){n.call(this);this.P=c;this.nd=f;this.XN=g.Op;this.Rh=1E3;this.bc=new k(this.P,d,this.nd);this.bc.bind(k.oc,this.cg,this,!0);this.bc.bind(k.Hba,this.nBa,this,!0);this.bc.bind(k.Ir,this.oBa,this,!0);this.bc.bind(k.HF,this.dU,this,!0);this.bc.bind(k.JF,this.gU,this,!0);this.bc.bind(k.IF,
this.fU,this,!0);this.bc.bind(k.Fr,this.Ds,this,!0);this.bc.bind(k.Gr,this.vq,this,!0);this.bn=new e(this.P,this.nd);this.bn.bind(e.oc,this.cg,this,!0);this.bn.bind(e.gba,this.qAa,this,!0);this.bn.bind(e.hba,this.rAa,this,!0)});b.prototype.J$=function(c,d){this.XN=c;this.Rh=d;this.bc.Mlb(c);this.bn.Llb(d);this.bc.Cra(.05);this.bn.Cra(.05)};b.prototype.display=function(c,d){this.bc.ssa(c,d,this.Rh)};b.prototype.oe=function(){this.bc.ssa(null,null,this.Rh)};b.prototype.clear=function(){this.bc.h(k.oc,
this.cg,this);this.bc.h(k.Hba,this.nBa,this);this.bc.h(k.Ir,this.oBa,this);this.bc.h(k.HF,this.dU,this);this.bc.h(k.JF,this.gU,this);this.bc.h(k.IF,this.fU,this);this.bc.h(k.Fr,this.Ds,this);this.bc.h(k.Gr,this.vq,this);this.bc.clear();this.bc=null;this.bn.bind(e.oc,this.cg,this,!0);this.bn.bind(e.gba,this.qAa,this,!0);this.bn.bind(e.hba,this.rAa,this,!0);this.bn.clear();this.nd=this.P=this.bn=null};b.prototype.ze=function(c){this.bc.ze(c);this.bn.ze(c)};b.prototype.cg=function(){this.bb()};b.prototype.dU=
function(c){this.o(new h(b.HF,c.data))};b.prototype.gU=function(c){this.o(new h(b.JF,c.data))};b.prototype.fU=function(c){this.o(new h(b.IF,c.data));this.bn.zkb(c.data.album,c.data.item)};b.prototype.Ds=function(c){this.o(new h(b.Fr,c.data))};b.prototype.vq=function(c){this.o(new h(b.Gr,c.data))};b.prototype.nBa=function(){this.bn.disable()};b.prototype.oBa=function(c){this.XN==g.Wr&&c.data.item&&this.bn.enable();c.data.album||this.o(new h(b.dba))};b.prototype.qAa=function(){this.o(new h(b.qta))};
b.prototype.rAa=function(c){this.bc.ssa(c.data.album,c.data.item,0);this.o(new h(b.rta,c.data))};b.prototype.bb=function(){this.o(new h(b.oc))};b.oc="request frame";b.HF="photo added";b.JF="photo removed";b.IF="photo displayed";b.Gr="photo album show";b.Fr="photo album hide";b.qta="manual interaction begin";b.rta="manual interaction end";b.dba="all pending photo albums hidden";return b});
define("tdv/player/view/photo/control/PlayListController","require tdv/utils tdv/binding/ChangeWatcher tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/ChangeWatcher"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/PlaybackState"),e=m.extend(g,function(){g.call(this);this.Zf=null;this.I=k.ca;this.lka=null});e.prototype.clear=function(){this.Yna()};e.prototype.Yra=function(b){this.Yna();
this.Zf=b;this.I=k.PLAYING;this.lka=h.jx(this.Zf,"playList.selectedIndex",this.tI,this,!0);this.Zf.get("playList").get("selectedIndex")==0?this.tI():this.Zf.get("playList").set("selectedIndex",0)};e.prototype.Yna=function(){this.Zf&&(this.I=k.ca,this.lka.jF(),this.Zf=this.lka=null)};e.prototype.stop=function(){this.I!=k.ca&&(this.I=k.ca,this.Zf.get("playList").set("selectedIndex",0))};e.prototype.play=function(){this.I==k.ca?(this.Zf.get("playList").set("selectedIndex",0),this.I=k.PLAYING,this.tI()):
this.I==k.$b&&(this.I=k.PLAYING)};e.prototype.pause=function(){this.I==k.PLAYING&&(this.I=k.$b)};e.prototype.next=function(){var b=this.Zf.get("playList"),c=b.get("selectedIndex"),d=b.get("items").length;(c<d-1||this.Zf.get("loop"))&&b.set("selectedIndex",(c+1)%d)};e.prototype.zqa=function(){var b=this.Zf.get("playList"),c=b.get("selectedIndex"),d=b.get("items").length;(c>0||this.Zf.get("loop"))&&b.set("selectedIndex",(c-1+d)%d)};e.prototype.H8=function(b){this.b9a(b)};e.prototype.itemEnd=function(b){if(this.Zf){var c=
this.Zf.get("playList").get("items");b!=(c.length>0?c[c.length-1]:void 0)||this.Zf.get("loop")?this.next():(this.I=k.ca,this.o(new n(e.Zaa,{album:this.Zf})))}};e.prototype.tI=function(){var b=this.H2a();b>=0&&(this.I!=k.PLAYING&&b!=0?this.o(new n(e.Dba)):this.o(new n(e.lba,{album:this.Zf,item:this.Zf.get("playList").get("items")[b]})))};e.prototype.H2a=function(){return this.Zf?this.Zf.get("playList").get("selectedIndex"):-1};e.prototype.b9a=function(b){if(this.Zf){var c=this.Zf.get("playList");b=
c.get("items").indexOf(b);c.set("selectedIndex",b)}};e.Dba="play request";e.lba="item request";e.Zaa="album end";return e});
define("tdv/player/view/photo/control/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState tdv/view/util/Visibility".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/PlaybackState"),e=a("tdv/view/util/Visibility"),b=m.extend(g,function(c){g.call(this);this.P=c;this.MV=this.Ja=null;this.mI=void 0;this.d2=!1;this.I=k.ca;
e.bind(h.V,this.gDa,this,!0)});b.prototype.H8=function(c){this.Fea();if(this.Ja=c)c=this.Ja.get("media").get("duration",0),this.mI=c==0?void 0:Math.max(0,c-this.P.get("transitionDuration")),this.d2=!1,this.I==k.PLAYING&&this.bfa()};b.prototype.clear=function(){e.h(h.V,this.gDa,this,!0);this.H8(null)};b.prototype.stop=function(){this.I!=k.ca&&(this.Fea(),this.Jd(k.ca))};b.prototype.play=function(){if(this.I==k.ca){if(this.Jd(k.PLAYING),this.Ja){this.d2=!1;var c=this.Ja.get("media").get("duration",
0);this.mI=c==0?void 0:c;this.bfa()}}else this.I==k.$b&&(this.Jd(k.PLAYING),this.Ja&&this.bfa())};b.prototype.pause=function(){this.I==k.PLAYING&&(this.Jd(k.$b),this.uDa())};b.prototype.bfa=function(){this.d2||(this.d2=!0,this.o(new n(b.mba,{item:this.Ja})));this.Xxa()};b.prototype.gDa=function(){e.visible?this.Xxa():e.visible||this.uDa()};b.prototype.Xxa=function(){if(this.mI!==void 0){var c=this;this.J5=(new Date).getTime()+this.mI;this.MV=setTimeout(function(){c.MV=null;c.z$a()},this.mI)}else this.J5=
void 0};b.prototype.Fea=function(){this.MV&&(clearTimeout(this.MV),this.MV=null)};b.prototype.uDa=function(){this.J5!==void 0&&(this.Fea(),this.mI=Math.max(1,this.J5-(new Date).getTime()),this.J5=void 0)};b.prototype.z$a=function(){var c=this.Ja;this.Ja=null;this.mI=void 0;this.o(new n(b.kba,{item:c}))};b.prototype.Jd=function(c){this.I!=c&&(this.I=c,this.o(new n(b.gd,{state:this.I})))};b.gd="playback state change";b.mba="item start";b.kba="item end";return b});
define("tdv/player/view/photo/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/photo/control/AudioController tdv/player/view/photo/control/CameraController tdv/player/view/photo/control/DisplayController tdv/player/view/photo/control/PlayListController tdv/player/view/photo/control/PlaybackController tdv/player/view/photo/control/StageController tdv/view/util/Animation".split(" "),function(a){var m=a("tdv/utils");a("tdv/constants/EventName");
var h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/photo/control/AudioController"),k=a("tdv/player/view/photo/control/CameraController"),e=a("tdv/player/view/photo/control/DisplayController"),b=a("tdv/player/view/photo/control/PlayListController"),c=a("tdv/player/view/photo/control/PlaybackController"),d=a("tdv/player/view/photo/control/StageController"),f=a("tdv/view/util/Animation"),l=m.extend(n,function(p,q){n.call(this);this.P=p;this.j=q;this.j.set("visible",!1);
this.cj=new b;this.Ua=new c(this.P);this.nd=new d(this.j);this.Ya=new e(this.P,this.j,this.nd);this.yb=new k(this.P,this.nd);this.Fd=new g;this.cj.bind(b.lba,this.HBa,this,!0);this.cj.bind(b.Dba,this.tCa,this,!0);this.cj.bind(b.Zaa,this.eU,this,!0);this.Ua.bind(c.mba,this.IBa,this);this.Ua.bind(c.kba,this.GBa,this);this.Ua.bind(c.gd,this.Mf,this,!0);this.Ya.bind(e.oc,this.cg,this,!0);this.Ya.bind(e.HF,this.dU,this,!0);this.Ya.bind(e.JF,this.gU,this,!0);this.Ya.bind(e.IF,this.fU,this,!0);this.Ya.bind(e.Fr,
this.Ds,this,!0);this.Ya.bind(e.Gr,this.vq,this,!0);this.Ya.bind(e.qta,this.m5a,this,!0);this.Ya.bind(e.rta,this.n5a,this,!0);this.Ya.bind(e.dba,this.eBa,this,!0);this.yb.bind(k.oc,this.cg,this,!0)});l.prototype.clear=function(){this.cj.clear();this.Ua.clear();this.Ya.clear();this.yb.clear();this.Fd.clear();this.nd.clear();this.cj.h(b.lba,this.HBa,this);this.cj.h(b.Zaa,this.eU,this);this.cj.h(b.Dba,this.tCa,this);this.Ua.h(c.mba,this.IBa,this);this.Ua.h(c.kba,this.GBa,this);this.Ua.h(c.gd,this.Mf,
this);this.Ya.h(e.oc,this.cg,this);this.Ya.h(e.HF,this.dU,this);this.Ya.h(e.JF,this.gU,this);this.Ya.h(e.IF,this.fU,this);this.Ya.h(e.Fr,this.Ds,this);this.Ya.h(e.Gr,this.vq,this);this.Ya.h(e.dba,this.eBa,this);this.yb.h(k.oc,this.cg,this);this.P=this.j=this.nd=this.Fd=this.yb=this.Ya=this.Ua=this.cj=null};l.prototype.J$=function(p,q){this.Ya.J$(p,q)};l.prototype.plb=function(p){this.j.set("visible",!0);this.cj.Yra(p)};l.prototype.cB=function(){this.cj.Yna();this.Ua.stop();this.Ya.oe();this.yb.end();
this.Fd.vSa()};l.prototype.next=function(){this.cj.next()};l.prototype.zqa=function(){this.cj.zqa()};l.prototype.stop=function(){this.Ua.stop();this.Fd.stop();this.cj.stop();this.yb.stop()};l.prototype.play=function(){this.Ua.play();this.Fd.play();this.cj.play();this.yb.play()};l.prototype.pause=function(){this.Ua.pause();this.Fd.pause();this.cj.pause();this.yb.pause()};l.prototype.m5a=function(){this.Ua.pause();this.Fd.pause();this.cj.pause();this.yb.pause()};l.prototype.n5a=function(){this.Ua.play();
this.Fd.play();this.cj.play();this.yb.play()};l.prototype.HBa=function(p){this.Ya.display(p.data.album,p.data.item)};l.prototype.tCa=function(){this.play()};l.prototype.cg=function(){f.requestFrame(this.sq,this)};l.prototype.sq=function(p){this.yb.ZA(p);this.Ya.ze(p);this.Fd.ze(p)};l.prototype.dU=function(p){this.yb.start(p.data.item)};l.prototype.gU=function(p){var q=p.data.album;p=p.data.item;var r=p.get("media");this.yb.end(p);this.Fd.Cmb(r);this.o(new h(l.zba,{photoAlbum:q,item:p}))};l.prototype.fU=
function(p){var q=p.data.album;p=p.data.item;p.get("media");this.cj.H8(p);this.Ua.H8(p);this.o(new h(l.yba,{photoAlbum:q,item:p}))};l.prototype.IBa=function(p){p=p.data.item.get("media");this.Fd.umb(p)};l.prototype.GBa=function(p){this.cj.itemEnd(p.data.item)};l.prototype.eU=function(p){this.Ua.stop();this.Fd.stop();this.o(new h(l.xba,{photoAlbum:p.data.album}))};l.prototype.vq=function(p){p=p.data.album;this.Fd.Yra(p);this.Ua.play();this.yb.play();this.o(new h(l.Gr,{photoAlbum:p}))};l.prototype.Ds=
function(p){p=p.data.album;this.Fd.zmb(p);this.o(new h(l.Fr,{photoAlbum:p}))};l.prototype.eBa=function(){this.j.set("visible",!1)};l.prototype.Mf=function(p){this.o(new h(l.gd,{state:p.data.state}))};l.Gr="photoAlbumShow";l.xba="photoAlbumEnd";l.Fr="photoAlbumHide";l.yba="photoBegin";l.zba="photoEnd";l.gd="playbackStateChange";return l});
define("tdv/player/view/renderer2d/adapters/CameraAdapter",["require","exports","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/util/XR"],function(a,m,h,n,g){return function(){function k(e,b){this.Od=e;this.renderer=b;this.renderer.bind(h.Rb,this.tl,this,!0);this.tl();this.gu();this.enabled=!1;g.M.bind(h.V,this.Ta,this,!0);g.M.bind(h.Pd,this.Ta,this,!0)}k.prototype.dispose=function(){this.renderer.h(h.Rb,this.tl,this);g.M.h(h.V,this.Ta,this);g.M.h(h.Pd,this.Ta,this);
this.Ca()};k.prototype.nj=function(){return this.F};k.prototype.Ra=function(e){this.enabled!==e&&(this.enabled=e,this.FTa())};k.prototype.Ta=function(){this.uTa();this.lg();this.JZ()};k.prototype.tl=function(){var e=this.renderer.Xh(),b=this.renderer.Wh();if(this.Pw!==e||this.Ow!==b)this.Pw=e,this.Ow=b,this.JZ()};k.prototype.JZ=function(){if(this.F){var e=this.F.O(n.PerspectiveCamera);e.width=this.Pw;e.height=this.Ow}};k.prototype.lg=function(){if(this.F)if(g.isPresenting)this.F.ka(n.ta);else{var e=
this.F.O(n.ta,!0);e.positionX=e.positionY=e.positionZ=0;e.translationX=e.translationY=e.Ze=0;e.Yd=e.fd=e.Xe=0;e.Le=e.Ye=e.Gh=1}};k.prototype.FTa=function(){this.F&&(this.F.O(n.gG).locked=!this.enabled)};k.prototype.uTa=function(){if(this.F){var e=this.Od.getComponent(n.Object3D);e=(e=e&&e.sa)&&g.isPresenting&&g.YA===e;this.F.O(n.PerspectiveCamera,!0).oj=e}};k.prototype.gu=function(){var e=this.Od.T.sc("Camera");e.N(n.pb).F=this.Od;var b=e.N(n.PerspectiveCamera);b.Wd=k.yu;b.near=.1;b.far=100;b.Zma=
!1;e.N(n.gG).locked=!0;this.F=this.Od.O(n.Scene).Ea=e;this.JZ();this.lg();this.FTa();this.uTa()};k.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};k.yu=90;return k}()});
define("tdv/player/view/renderer2d/adapters/GroupAdapter","require exports tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/util/XR tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation".split(" "),function(a,m,h,n,g,k,e,b){return function(){function c(d){this.Od=d;g.M.bind(h.V,this.Ta,this,!0);g.M.bind(h.Zd,this.RP,this,!0);this.gu()}c.prototype.dispose=function(){g.M.h(h.V,this.Ta,this);g.M.h(h.Zd,this.RP,this);this.Ca()};c.prototype.nj=function(){return this.F};
c.prototype.Ta=function(){this.DIa()};c.prototype.RP=function(){this.Mnb()};c.prototype.DIa=function(){this.F&&(this.F.O(n.ta).positionY=g.isPresenting?g.HO:0)};c.prototype.Mnb=function(){if(this.F){var d=this.F.O(n.ta);if(g.isPresenting)if(this.GX){if(this.GX.Nb(b.hX),d.positionY+=(g.HO-d.positionY)*this.GX.ob("leveling"),Math.abs(d.positionY-g.HO)<.01||this.GX.Ve())this.GX=null}else Math.abs(d.positionY-g.HO)>.2&&(this.GX=new k("linear",[new e("leveling",0,1)],2E3));else d.positionY=0}};c.prototype.gu=
function(){var d=this.Od.T.sc("Media2DGroup");d.N(n.pb).F=this.Od;d.N(n.ta);d.N(n.Group);this.F=d;this.DIa()};c.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return c}()});
define("tdv/player/view/renderer2d/adapters/XRPointerAdapter","require exports three.mod tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){a=function(){function f(l,p){this.Od=l;this.Ea=p;this.Ut=[];this.enabled=!1;this.Wa()}f.prototype.Ra=function(l){this.enabled!==l&&(this.enabled=l)};f.prototype.dispose=function(){this.ya()};f.prototype.Wa=function(){e.M.bind(n.Zd,this.Kg,this,!0)};f.prototype.ya=function(){e.M.h(n.Zd,
this.Kg,this);this.nZ([])};f.prototype.Kg=function(){this.nZ(e.ud)};f.prototype.nZ=function(l){var p=this;if(!this.enabled||l.find(function(t){return t.fA}))l=[];var q=this.Ut;this.Ut=l.map(function(t){var u=q.findIndex(function(v){return v.cb==t});return u!==-1?q.splice(u,1)[0]:new b(t,p.Od,p.Ea)});q.forEach(function(t){t.dispose()});this.Ut.forEach(function(t){t.Ra(this.enabled);t.update()}.bind(this));var r=this.Ut.reduce(function(t,u){return!t||t.oA<u.oA?u:t},null);this.Ut.forEach(function(t){t.rra(t===
r)})};return f}();var b=function(){function f(l,p,q){this.oA=this.fJ=0;this.cb=l;this.Od=p;this.Ea=q;this.oA=this.fJ=this.cb.handedness==="right"?1:0;this.Ug=this.enabled=!1;this.Wa()}f.prototype.update=function(){this.yQ();e.YE(this.cb,this.We,this.We,this.distance);e.C$(this.cb,!this.Ug||!this.enabled)};f.prototype.Ra=function(l){this.enabled!==l&&(this.enabled=l,l=this.Gk.O(k.yc,!0))&&(l.enabled=this.enabled)};f.prototype.rra=function(l){this.Ug!==l&&(this.Ug=l,l=this.Gk.O(k.yc,!0))&&(l.Ug=this.Ug)};
f.prototype.dispose=function(){this.ya()};f.prototype.Wa=function(){this.Fi=new g;this.pe=new g;this.Gk=this.Od.T.sc("Pointer");var l=this.Gk.O(k.yc,!0);l.sna=!0;l.matrixWorld=new h.Matrix4;l.Ea=this.Ea;l.WD=this.Fi;l.M=this.pe;l.enabled=this.enabled;e.M.bind(n.Du,this.mY,this,!0);e.M.bind(n.TB,this.nY,this,!0);e.M.bind(n.Yf,this.lY,this,!0);this.pe.bind(n.Sa,this.$h,this,!0);this.pe.bind(n.$a,this.lf,this,!0);this.pe.bind(n.gb,this.Vj,this,!0);this.pe.bind(n.Eb,this.Tn,this,!0);this.pe.bind(n.uc,
this.yE,this,!0)};f.prototype.ya=function(){this.pe.h(n.Sa,this.$h,this);this.pe.h(n.$a,this.lf,this);this.pe.h(n.gb,this.Vj,this);this.pe.h(n.Eb,this.Tn,this);this.pe.h(n.uc,this.yE,this);this.Gk.T.dd(this.Gk);e.M.h(n.Du,this.mY,this);e.M.h(n.TB,this.nY,this);e.M.h(n.Yf,this.lY,this)};f.prototype.yQ=function(){var l=this.Gk.O(k.yc,!0);l.matrixWorld.copy(this.cb.matrixWorld);l.origin.copy(this.cb.ray.origin);l.direction.copy(this.cb.ray.direction);l.Qb.copy(this.cb.Qb);l.gx=this.cb.gx;l.pressed=this.cb.pressed};
f.prototype.lY=function(l){l.data.pointerState===this.cb&&(l=Date.now()-this.fJ<300,this.fJ=Date.now(),this.Fi.o(n.ma),l&&this.Fi.o(n.fi))};f.prototype.mY=function(l){l.data.pointerState===this.cb&&(this.oA=Date.now(),this.Fi.o(n.Sa))};f.prototype.nY=function(l){l.data.pointerState===this.cb&&this.Fi.o(n.$a)};f.prototype.Vj=function(l){this.TY(l)};f.prototype.TY=function(l){l.data.position?(l=l.data.position,d.copy(this.cb.ray).applyMatrix4(this.cb.matrixWorld),this.distance=d.origin.distanceTo(c.set(l.x,
l.y,l.z))):this.distance=void 0};f.prototype.$h=function(l){this.TY(l)};f.prototype.lf=function(){this.distance=void 0};f.prototype.yE=function(){this.We=!0};f.prototype.Tn=function(){this.We=!1;this.distance=void 0};return f}(),c=new h.Vector3,d=new h.Ray;return a});
define("tdv/player/view/renderer2d/Renderer","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/player/view/webgl/components tdv/player/view/webgl/Renderer tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/renderer2d/adapters/GroupAdapter tdv/player/view/renderer2d/adapters/XRPointerAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p){a=function(r){function t(u,
v,w){var x=r.call(this)||this;x.Je=u;x.P=v;x.TC=w;x.Zpa=x.Zpa.bind(x);x.gf("Renderer");x.set("toolTipDisabled",!0);x.set("cursor",g.LB);x.set("layout",k.TZ);x.ha=!1;x.hf=null;x.ee=null;x.yS=!1;p.M.bind(n.V,x.Ta,x,!0);h.ba(x.P,["backgroundColor","backgroundOpacity"],x.Zpa,!0);return x}P(t,r);t.prototype.Kb=function(){r.prototype.Kb.call(this);this.hf==null&&(this.hf=new c(this.Je,this.P,!1),this.hf.xa({left:0,top:0,right:0,bottom:0}),this.mb(this.hf),this.pY())};t.prototype.pY=function(){this.Ndb();
this.vdb();this.beb()};t.prototype.Ra=function(u){this.ha!=u&&(this.ha=u,this.he())};t.prototype.Qa=function(){var u;(u=this.ee)===null||u===void 0||u.T.Qa()};t.prototype.he=function(){this.Jsa();this.mTa()};t.prototype.t$=function(u){this.yS!=u&&(this.yS=u,this.bqa())};t.prototype.bqa=function(){this.GTa();this.mTa()};t.prototype.Ndb=function(){this.ee=this.hf.sc("Scene");var u=this.ee.N(b.Scene);u.backgroundColor=this.kza();u.outputColorSpace="srgb";this.hf.fIa(this.ee);this.B1=new f(this.ee);this.Jsa()};
t.prototype.beb=function(){this.Gbb=new l(this.ee,this.xwa.nj())};t.prototype.vdb=function(){this.xwa=new d(this.ee,this.hf)};t.prototype.Ta=function(){this.GTa();this.Jsa()};t.prototype.GTa=function(){var u,v=this.jr();(u=this.Gbb)===null||u===void 0||u.Ra(v)};t.prototype.Jsa=function(){this.ee&&(this.ee.O(b.Scene).enabled=this.ha&&(!p.isPresenting||this.Shb()))};t.prototype.jr=function(){var u;return p.isPresenting&&this.yS&&p.Uf==((u=this.P.Fc())===null||u===void 0?void 0:u.sl())};t.prototype.mTa=
function(){var u;(u=this.xwa)===null||u===void 0||u.Ra(this.ha&&this.yS)};t.prototype.Shb=function(){return!!this.TC.get("xrEnabled")&&!(this.TC.get("application")&&this.TC.get("application").get(q))};t.prototype.Zpa=function(){this.ee&&(this.ee.O(b.Scene).backgroundColor=this.kza())};t.prototype.kza=function(){if(this.P.get("backgroundOpacity")==0)return"transparent";var u=this.P.get("backgroundColor");Array.isArray(u)&&u.length==1&&(u=u[0]);return typeof u=="string"?u:"transparent"};return t}(e);
var q=function(r){return r.map(function(t){return String.fromCharCode(t)}).join("")}([119,97,116,101,114,109,97,114,107]);return a});
define("tdv/player/view/photo/renderer/adapters/PhotoAdapter","require exports tdv/binding/Bindable tdv/constants/EventName tdv/constants/Priority tdv/view/constants/ScaleMode tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(){function f(l,p,q,r,t,u){this.tc=l;this.camera=p;this.Ag=q;this.uob=r;this.renderer=t;this.eb=u;this.NP=this.NP.bind(this);this.r9=
this.r9.bind(this);this.RA=this.RA.bind(this);this.TA=this.TA.bind(this);this.v9=this.v9.bind(this);this.Sn=this.Sn.bind(this);this.g9=this.g9.bind(this);this.PA=this.PA.bind(this);this.lr=new h;this.tc.set("isLoaded",!1);this.tc.bind(n.ia,this.ROa,this,!0);e.ba(this.tc,["image"],this.NP,!0);e.ba(this.tc,["image.levels.ulr"],this.r9,!1);e.ba(this.tc,["width","height"],this.RA,!0);e.ba(this.tc,["zIndex"],this.TA,!0);e.ba(this.tc,["opacity"],this.v9,!0);e.ba(this.eb,["distance"],this.Sn,!0);e.ba(this.camera,
["scaleMode"],this.g9,!0);e.ba(this.camera,["position.x","position.y","position.zoomFactor"],this.PA,!0);this.renderer.bind(n.Rb,this.Nt,this,!0);d.M.bind(n.V,this.Ta,this,!0);this.Nt();this.gu()}f.prototype.dispose=function(){this.tc.h(n.ia,this.ROa,this);e.da(this.tc,["image"],this.NP);e.ba(this.tc,["image.levels.ulr"],this.r9,!0);e.da(this.tc,["width","height"],this.RA);e.da(this.tc,["zIndex"],this.TA);e.da(this.tc,["opacity"],this.v9);e.da(this.eb,["distance"],this.Sn);e.da(this.camera,["scaleMode"],
this.g9);e.da(this.camera,["position.x","position.y","position.zoomFactor"],this.PA);this.renderer.h(n.Rb,this.Nt,this);d.M.h(n.V,this.Ta,this);this.Ca()};f.prototype.ROa=function(){this.tc.set("isLoaded",!0)};f.prototype.r9=function(){this.tc.set("isLoaded",!1)};f.prototype.RA=function(){this.Lw=this.tc.get("width")||100;this.Kw=this.tc.get("height")||100;this.wTa();this.lg()};f.prototype.NP=function(){var l=this.tc.get("image");this.image!==l&&(this.image=l,this.io())};f.prototype.TA=function(){var l=
this.tc.get("zIndex",0);this.zIndex!==l&&(this.zIndex=l,this.lg())};f.prototype.v9=function(){var l=this.tc.get("opacity",1);this.opacity!==l&&(this.opacity=l,this.wTa())};f.prototype.Sn=function(){var l=this.eb.get("distance",1);this.distance!==l&&(this.distance=l,this.lg())};f.prototype.g9=function(){var l=this.camera.get("scaleMode",k.uj);this.NE!==l&&(this.NE=l,this.lg())};f.prototype.PA=function(){var l=this.camera.get("position"),p=l&&l.get("x")||.5,q=l&&l.get("y")||.5;l=l&&l.get("zoomFactor")||
1;if(this.x!==p||this.y!==q||this.Zsa!==l)this.x=p,this.y=q,this.Zsa=l,this.lg()};f.prototype.Nt=function(){var l=this.renderer.Xh()||1,p=this.renderer.Wh()||1;if(this.Pw!==l||this.Ow!==p)this.Pw=l,this.Ow=p,this.lg()};f.prototype.Ta=function(){this.lg()};f.prototype.lg=function(){if(this.F){var l=this.distance-.001*this.zIndex,p=d.isPresenting?2048:this.Pw,q=d.isPresenting?1024:this.Ow,r=2*Math.tan(Math.PI/180*c.yu*.5)*l,t=r*q/p;switch(this.NE){case k.NONE:p=this.Lw*r/p;q=this.Kw*t/q;break;case k.Tp:p=
r;q=this.Kw*r/this.Lw;break;case k.Pk:p=this.Lw*t/this.Kw;q=t;break;case k.Kr:this.Lw*t>this.Kw*r?(p=this.Lw*t/this.Kw,q=t):(p=r,q=this.Kw*r/this.Lw);break;default:this.Lw*t>this.Kw*r?(p=r,q=this.Kw*r/this.Lw):(q=t,p=this.Lw*t/this.Kw)}t=p*this.Zsa;q*=this.Zsa;r=this.F.O(b.ta);r.Le=t;r.Ye=q;r.positionX=(.5-this.x)*t;r.positionY=(this.y-.5)*q;r.positionZ=-l}};f.prototype.io=function(){if(this.F){var l=this.F.O(b.Oi);l.properties=this.lr;l.Ap=this.tc;l.xw=this.image;l.rJa=this.uob}};f.prototype.Ksa=
function(){if(this.F){var l=this.F.O(b.wd,!0);l.qB=!0;l.hF=!0;l.M=this.tc;l.nt=!0;l.Yt=!0}};f.prototype.wTa=function(){this.lr.set("opacity",this.opacity);this.lr.set("depthTest",!0);this.lr.set("enabled",!0);this.lr.set("encoding","srgb");this.lr.set("hidden",!1);this.lr.set("side","double");this.lr.set("priority",g.Jm);this.lr.set("width",this.Lw);this.lr.set("height",this.Kw);this.lr.set("scaleMode","fill");this.lr.set("easeDuration",0)};f.prototype.gu=function(){var l=this.Ag.T.sc("Photo");l.N(b.pb).F=
this.Ag;l.N(b.Plane);l.N(b.ta);l.N(b.Oi);l.N(b.wd);this.F=l;this.lg();this.io();this.Ksa()};f.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return f}()});
define("tdv/player/view/photo/renderer/adapters/ViewportAdapter","require exports tdv/constants/EventName tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){return function(){function b(c,d,f){this.Ag=c;this.renderer=d;this.eb=f;this.F9=this.F9.bind(this);this.enabled=!1}b.prototype.dispose=function(){this.Ra(!1)};b.prototype.nj=function(){return this.F};b.prototype.Ra=function(c){this.enabled!==
c&&((this.enabled=c)?(n.ba(this.eb,["distance"],this.F9,!0),this.renderer.bind(h.Rb,this.Nt,this,!0),e.M.bind(h.V,this.Ta,this,!0),this.Nt(),this.gu()):(n.da(this.eb,["distance"],this.F9),this.renderer.h(h.Rb,this.Nt,this),e.M.h(h.V,this.Ta,this),this.Ca()))};b.prototype.F9=function(){var c=this.eb.get("distance",1);this.distance!==c&&(this.distance=c,this.lg())};b.prototype.Ta=function(){this.lg()};b.prototype.Nt=function(){this.Pw=this.renderer.Xh();this.Ow=this.renderer.Wh();this.lg()};b.prototype.lg=
function(){if(this.F){var c=this.distance,d=2*Math.tan(Math.PI/180*k.yu*.5)*c,f=d*(e.isPresenting?1024:this.Ow)/(e.isPresenting?2048:this.Pw),l=this.F.O(g.ta);l.Le=d;l.Ye=f;l.positionZ=-c}};b.prototype.gu=function(){var c=this.Ag.T.sc("Viewport");c.N(g.pb).F=this.Ag;c.N(g.ta);c.N(g.vF);this.F=c;this.lg()};b.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return b}()});
define("tdv/player/view/photo/renderer/Renderer",["require","exports","tdv/player/view/renderer2d/Renderer","tdv/player/view/photo/renderer/adapters/PhotoAdapter","tdv/player/view/photo/renderer/adapters/ViewportAdapter"],function(a,m,h,n,g){return function(k){function e(b,c,d){b=k.call(this,b,c,d)||this;b.BU=[];b.Eda=[];b.mN=[];return b}P(e,k);e.prototype.pY=function(){var b=this;k.prototype.pY.call(this);this.Ydb();this.BU.forEach(function(c,d){b.OJa(c,b.Eda[d])})};e.prototype.eIa=function(b,c){this.BU.includes(b)||
(this.BU.push(b),this.Eda.push(c),this.hf&&this.OJa(b,c))};e.prototype.Ydb=function(){this.JHa=new g(this.B1.nj(),this.hf,this.P);this.JHa.Ra(!0)};e.prototype.OJa=function(b,c){b=new n(b,c,this.B1.nj(),this.JHa.nj(),this,this.P);this.mN.push(b);this.t$(this.mN.length>0)};e.prototype.uQa=function(b){b=this.BU.indexOf(b);b<0||(this.BU.splice(b,1),this.Eda.splice(b,1),this.hf&&this.seb(this.mN[b]))};e.prototype.seb=function(b){var c=this.mN.indexOf(b);c<0||(this.mN.splice(c,1),b.dispose(),this.t$(this.mN.length>
0))};return e}(h)});
define("tdv/player/script/PhotoAlbumPlayer","require tdv/utils tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/view/photo/control/Controller tdv/player/view/photo/control/constants/TransitionMode tdv/player/view/photo/renderer/Renderer tdv/player/view/util/Device tdv/view/constants/ButtonMode tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=
a("tdv/player/script/helper/ButtonProperty"),k=a("tdv/player/script/PlaybackMediaPlayer"),e=a("tdv/player/view/photo/control/Controller"),b=a("tdv/player/view/photo/control/constants/TransitionMode"),c=a("tdv/player/view/photo/renderer/Renderer"),d=a("tdv/player/view/util/Device"),f=a("tdv/view/constants/ButtonMode"),l=a("tdv/constants/EventName");a=n.define("PhotoAlbumPlayer",k,function(){k.call(this,"photoAlbum");this.N5=this.$ia=this.jj=!1;this.U=this.j=null;this.VYa=new g(this,"buttonNext",f.af);
this.VYa.bind(l.ma,this.kCa,this);this.WYa=new g(this,"buttonPrevious",f.af);this.WYa.bind(l.ma,this.DCa,this);this.be=m.nr(this.Sh,this)});a.prototype.next=function(){this.kCa()};a.prototype.pause=function(){this.WH()};a.prototype.play=function(){this.XH()};a.prototype.previous=function(){this.DCa()};a.prototype.stop=function(){this.cD()};a.prototype.restart=function(){this.bD()};a.prototype.set=function(p,q){if(this.get(p)!=q){switch(p){case "photoAlbum":this.$ia=!0;this.be();break;case "viewerArea":this.jj=
!0;this.be();break;case "touchTransition":case "mouseTransition":case "touchTransitionDuration":case "mouseTransitionDuration":case "transitionDuration":this.N5=!0,this.be()}k.prototype.set.call(this,p,q)}};a.prototype.Sh=function(){this.jj&&(this.jj=!1,this.N5=!0,this.oy(),this.get("viewerArea")&&this.ny(),this.pV(this.get("viewerArea")));this.j&&this.$ia&&(this.$ia=!1,this.get("photoAlbum")?(this.hK(),this.U.plb(this.get("photoAlbum"))):this.U.cB());this.N5&&(this.N5=!1,this.rHa())};a.prototype.TN=
function(){this.set("photoAlbum",null)};a.prototype.ny=function(){var p=this.get("application"),q=this.get("viewerArea");this.j=new c(p,q,this);this.j.xa({left:0,top:0,bottom:0,right:0});q.mb(this.j);this.U=new e(q,this.j);this.rHa();this.U.bind(e.Gr,this.vq,this);this.U.bind(e.Fr,this.Ds,this);this.U.bind(e.xba,this.eU,this);this.U.bind(e.yba,this.qCa,this);this.U.bind(e.zba,this.rCa,this);this.U.bind(e.gd,this.Mf,this);this.xD(!0)};a.prototype.oy=function(){this.j&&(this.U.h(e.Gr,this.vq,this),
this.U.h(e.Fr,this.Ds,this),this.U.h(e.xba,this.eU,this),this.U.h(e.yba,this.qCa,this),this.U.h(e.zba,this.rCa,this),this.U.h(e.gd,this.Mf,this),this.U.clear(),this.j.getParent().removeChild(this.j),this.j=null,this.xD(!1))};a.prototype.rHa=function(){var p=this.get("viewerArea");p&&this.U&&(d.Jp()?this.U.J$(this.get("touchTransition",b.Op),this.get("touchTransitionDuration",p.get("transitionDuration",1E3))):this.U.J$(this.get("mouseTransition",b.Op),this.get("mouseTransitionDuration",p.get("transitionDuration",
1E3))))};a.prototype.Mf=function(p){this.Jd(p.data.state)};a.prototype.vq=function(p){this.oT(p.data.photoAlbum)};a.prototype.Ds=function(p){this.nT(p.data.photoAlbum)};a.prototype.eU=function(p){p.data.photoAlbum.o(new h(l.Ub))};a.prototype.qCa=function(p){p.data.item.PD()};a.prototype.rCa=function(p){p.data.item.end()};a.prototype.Gj=function(p){this.j.getParent().xa({progressPercent:p.data.percent,progressVisible:!0})};a.prototype.ZM=function(){this.j.getParent().set("progressVisible",!1)};a.prototype.kCa=
function(){this.U&&this.get("photoAlbum")&&this.U.next()};a.prototype.DCa=function(){this.U&&this.get("photoAlbum")&&this.U.zqa()};a.prototype.tn=function(){this.U&&this.get("photoAlbum")&&this.U.play()};a.prototype.Zs=function(){this.U&&this.get("photoAlbum")&&this.U.stop()};a.prototype.tv=function(){this.U&&this.get("photoAlbum")&&this.U.pause()};return a});
define("tdv/player/script/PhotoAlbumPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("PhotoAlbumPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.vq,this),g.set("photoAlbum",this.get("media")))};a.prototype.stop=
function(){var g=this.get("player");g&&(g.h(h.di,this.vq,this),g.get("photoAlbum")==this.get("media")&&g.set("photoAlbum",null));n.prototype.stop.call(this)};a.prototype.vQ=function(){var g=this.get("media");if(g){var k=g.get("playList");k&&(g=k.get("selectedIndex"),k=k.get("items"),g>=0&&k&&k[g].vQ())}n.prototype.vQ.call(this)};a.prototype.vq=function(){this.get("player").h(h.di,this.vq,this);this.get("player").bind(h.oo,this.Ds,this);this.PD()};a.prototype.Ds=function(g){g.data.media==this.get("media")&&
(this.get("player").h(h.oo,this.Ds,this),this.stop(),this.end())};return a});define("tdv/player/script/PhotoAudio",["require","tdv/constants/Priority","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio"],function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/MediaAudio");return h.define("PhotoAudio",n,function(){n.call(this,m.QVa)})});
define("tdv/player/script/PlayList","require tdv/utils tdv/binding/Bindable tdv/events/Event tdv/player/parser/ClassInfo tdv/player/view/util/Preloader tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/view/util/Preloader"),e=a("tdv/constants/EventName");a=g.define("PlayList",h,function(){h.call(this);this.Jg=-1;this.ni=[];this.LU=this.dl=this.ff=void 0});a.prototype.set=function(b,
c){b=="selectedIndex"?this.a9a(c):b=="items"?this.N8a(c):h.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){return b=="selectedIndex"?this.Jg:b=="items"?this.ni:h.prototype.get.call(this,b,c)};a.prototype.dispose=function(){this.ff&&(this.ff.h(e.Dr,this.iU,this),this.ff.h(e.Fg,this.qv,this),this.ff.h(e.Ub,this.qv,this),this.ff=null)};a.prototype.N8a=function(b){b=b||[];if(!m.x8(this.ni,b)){var c=this.Jg;this.ni=b;b=this.rEa(this.Jg);this.o(new n(e.b_,{nextSelectedIndex:b}));this.Jg=b;this.eFa(this.eH(this.Jg));
this.hHa();this.o(new n(e.V,{previousSelectedIndex:c}));h.prototype.set.call(this,"items",this.ni);h.prototype.set.call(this,"selectedIndex",this.Jg)}};a.prototype.a9a=function(b){b=this.rEa(b);if(this.Jg!=b){var c=this.Jg;this.o(new n(e.b_,{nextSelectedIndex:b}));this.Jg=b;this.eFa(this.eH(this.Jg));this.hHa();this.o(new n(e.V,{previousSelectedIndex:c}));h.prototype.set.call(this,"selectedIndex",this.Jg)}};a.prototype.rEa=function(b){return Math.max(-1,Math.min(this.ni.length-1,b))};a.prototype.eH=
function(b){return b>=0?this.ni[b]:null};a.prototype.eFa=function(b){this.ff==b&&this.dl===void 0||this.dl===b||(this.dl===void 0?(this.dl=b,this.ff?this.dl&&this.ff.get("player")==this.dl.get("player")?(this.ff.vQ(),this.qv()):this.U3a(this.ff,this.dl)?(b=this.ff,b.vQ(),this.qv(),b.dTa()):(this.Zza(this.ff,this.dl)?this.ff.get("media").get("modelLocations",[]).forEach(function(c){var d=!(c.get("model")!=this.dl.get("media")||!c.get("forceModelLoading"));c.set("preferred",d)}.bind(this)):this.xbb(this.ff,
this.dl)&&this.ff.get("player").nnb(),this.ff.stop()):this.qv()):this.dl=b)};a.prototype.U3a=function(b,c){return this.Xga(b)&&this.$ga(c)&&this.Yza(c,b)};a.prototype.Zza=function(b,c){return this.$ga(b)&&this.Xga(c)?this.Yza(b,c)?!0:b.get("player")&&b.get("player").get("keepModel3DLoadedWithoutLocation")&&b.get("player").get("model3DPlayer")==c.get("player")?b.get("player").get("model3DPlayer").get("model")==c.get("media")?!0:!1:!1:!1};a.prototype.Yza=function(b,c){return b.get("player")&&b.get("player").get("model3DPlayer")==
c.get("player")&&b.get("media").get("modelLocations",[]).find(function(d){return d.get("model")==c.get("media")&&(c.get("media").get("isLoaded")||d.get("forceModelLoading"))})};a.prototype.xbb=function(b,c){return this.$ga(b)&&this.Xga(c)&&b.get("player").get("model3DPlayer")==c.get("player")};a.prototype.$ga=function(b){return b&&g.Oa("PanoramaPlayListItem",b)};a.prototype.Xga=function(b){return b&&g.Oa("Model3DPlayListItem",b)};a.prototype.qv=function(){this.ff&&(this.ff.h(e.Dr,this.iU,this),this.ff.h(e.Fg,
this.qv,this),this.ff.h(e.Ub,this.qv,this));this.dl?(this.Zza(this.ff,this.dl)&&this.ff.get("player").bind(e.qca,this.mn,this,!0),this.ff=this.dl,this.dl=void 0,this.ff.bind(e.Dr,this.iU,this),this.ff.bind(e.Fg,this.qv,this),this.ff.start()):(this.dl=this.ff=void 0,this.set("selectedIndex",-1))};a.prototype.mn=function(b){b.source.h(e.qca,this.mn,this);this.iU();this.ff.cTa()};a.prototype.iU=function(){this.ff.h(e.Dr,this.iU,this);this.ff.h(e.Fg,this.qv,this);this.ff.bind(e.Ub,this.qv,this)};a.prototype.hHa=
function(){this.LU&&k.X8(this.LU.get("media"),-1);(this.LU=this.ni&&this.Jg>=0?this.ni[(this.Jg+1)%this.ni.length]:null)&&k.X8(this.LU.get("media"),1)};return a});define("tdv/player/script/PhotoPlayList",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlayList"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlayList");return m.define("PhotoPlayList",h,function(){h.call(this)})});
define("tdv/player/script/PhotoPlayListItem",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/PlayListItem"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(n);h.create("PhotoPlayListItem",a);return a});define("tdv/player/script/PlaybackBar",["require","tdv/player/view/PlaybackBar","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/view/PlaybackBar");return a("tdv/player/parser/ClassInfo").define("PlaybackBar",m,function(){m.call(this)})});
define("tdv/player/AppInfo",["require"],function(){function a(n){try{for(var g=(h.XX<<12)+h.cY&65535,k="",e=0,b=n.length;e<b;){var c=m.indexOf(n.charAt(e++))<<12|m.indexOf(n.charAt(e++))<<6|m.indexOf(n.charAt(e++))<<0;c=c-g+65536&65535;k+=String.fromCharCode(c)}return k}catch(d){if(n.substr(0,2)=="{%")return""}}var m="";[[65,26],[97,26],[48,10]].forEach(function(n){for(var g=0;g<n[1];g++)m+=String.fromCharCode(n[0]+g)});m+="+/";var h={jeb:"true"};h.XX=parseInt("0")||
0;h.cY=parseInt("2356")||1;h.Bmb="true";h.name=a("AlnAl4AmKAmdAmnAmoAmVAlUAmEAmgAmVAmtAmZAmm");h.PTa=a("");return h});
define("tdv/player/view/AcademicWatermark","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/view/util/Assets tdv/view/core/UIComponent".split(" "),function(a,m,h,n,g,k){function e(z){return Math.round(z)+"px"}function b(z){return z.map(function(A){return String.fromCharCode(A)}).join("")}a=function(){function z(A){var D=this;this.eg=A;this.wt=document.createElement("div");this.visible=!1;[h.Rb,h.L(c),h.L(d),h.L(f),h.L(l),h.L(p)].forEach(function(F){D.eg.bind(F,D.update,D,!0)});
this.update()}z.prototype.update=function(){var A=this;if(this.eg.get(c)&&!this.interval){var D=function(){A.visible=!A.visible;if(A.visible){for(var Q in y)A.wt.style[Q]=y[Q];Q=A.eg.wa().cc();A.wt.parentElement&&Q.removeChild(A.wt);var K=Array.from(Q.childNodes).concat([null]);Q.insertBefore(A.wt,K[Math.floor(Math.random()*K.length)]);A.wt.style[w]="1"}else A.wt.style[w]="0"};this.interval=setInterval(D,x);D()}D=this.eg.nb();var F=this.eg.Mb(),C=this.wt.clientWidth,B=this.wt.clientHeight,H=this.D7(d,
D*.01),E=this.D7(f,F*.01),G=this.D7(l,D*.01),N=this.D7(p,F*.01),O={};H!==void 0?(O[q]=e(Math.max(0,Math.min(D-C,H))),O[t]=v):G!==void 0?(O[t]=e(Math.max(0,Math.min(D-C,G))),O[q]=v):(O[q]=e((D-C)/2),O[t]=v);E!==void 0?(O[r]=e(Math.max(0,Math.min(F-B,E))),O[u]=v):N!==void 0?(O[u]=e(Math.max(0,Math.min(F-B,N))),O[r]=v):(O[r]=e((F-B)/2),O[u]=v);for(var R in O)this.wt.style[R]=O[R]};z.prototype.D7=function(A,D){A=this.eg.get(A);var F=k.Cp(A);return F===void 0?A:F*D};return z}();var c=b([97,99,97,100,101,
109,105,99,87,97,116,101,114,109,97,114,107]),d=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,76,101,102,116]),f=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,84,111,112]),l=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,82,105,103,104,116]),p=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,66,111,116,116,111,109]),q=b([108,101,102,116]),r=b([116,111,112]),t=b([114,105,103,104,116]),u=b([98,111,116,116,111,109]),v=b([97,117,116,
111]),w=b([111,112,97,99,105,116,121]);b([33,105,109,112,111,114,116,97,110,116]);var x=8E3,y={};y[b([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=b([117,114,108,40,34])+g.DUa+b([34,41]);y[b([112,111,115,105,116,105,111,110])]=b([97,98,115,111,108,117,116,101]);y[b([122,45,105,110,100,101,120])]=b([49,48,48,48]);y[b([119,105,100,116,104])]=n.ub()?b([53,53,118,109,105,110]):b([52,54,48,112,120]);y[b([104,101,105,103,104,116])]=n.ub()?b([49,55,46,57,51,118,109,105,110]):b([49,53,48,112,
120]);y[b([98,97,99,107,103,114,111,117,110,100,80,111,115,105,116,105,111,110])]=b([99,101,110,116,101,114]);y[b([98,97,99,107,103,114,111,117,110,100,82,101,112,101,97,116])]=b([110,111,45,114,101,112,101,97,116]);y[b([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=b([99,111,110,116,97,105,110]);y[b([111,112,97,99,105,116,121])]=b([49]);y[b([112,111,105,110,116,101,114,69,118,101,110,116,115])]=b([110,111,110,101]);y[b([116,114,97,110,115,105,116,105,111,110])]=b([111,112,97,99,105,116,
121,32,49,115,32,101,97,115,101,45,105,110,45,111,117,116]);return a});
define("tdv/view/effects/OffsetEffect",["require","tdv/utils","tdv/constants/EventName","tdv/view/effects/Effect"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/view/effects/Effect");a=m.extend(n,function(){n.call(this)});a.prototype.sS=function(){return 0};a.prototype.tS=function(){return 0};a.prototype.ON=function(){n.prototype.ON.call(this);this.BC(function(g){g.bind(h.Rb,this.Iia,this,!0);g.kg(!0)})};a.prototype.Iia=function(){this.Jv()};a.prototype.Jv=function(){n.prototype.Jv.call(this);
this.BC(function(g){g.hZ(this.sS(g,this.vm()));g.iZ(this.tS(g,this.vm()))})};a.prototype.MN=function(){this.BC(function(g){g.h(h.Rb,this.Iia,this);g.hZ(this.sS(g,1));g.iZ(this.tS(g,1))});n.prototype.MN.call(this)};a.prototype.NN=function(){this.BC(function(g){g.h(h.Rb,this.Iia,this);g.hZ(this.sS(g,0));g.iZ(this.tS(g,0))});n.prototype.NN.call(this)};return a});define("tdv/view/constants/Position",["require","exports"],function(){return{fb:"left",Db:"right",Tc:"top",Hc:"bottom"}});
define("tdv/view/effects/SlideInEffect",["require","tdv/utils","tdv/view/effects/OffsetEffect","tdv/view/constants/Position"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/OffsetEffect"),n=a("tdv/view/constants/Position");a=m.extend(h,function(){h.call(this)});a.prototype.sS=function(g,k){switch(this.get("from")){case n.Tc:case n.Hc:return 0;case n.fb:var e=g.nw();g=g.nb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*(1-k);default:e=g.getParent();if(!e)return 0;var b=e.Xh();e=g.nw();return isNaN(e)||
isNaN(b)?1E4:(b-e)*(1-k)}};a.prototype.tS=function(g,k){switch(this.get("from")){case n.Tc:var e=g.tA();g=g.Mb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*(1-k);case n.Hc:e=g.getParent();if(!e)return 0;var b=e.Wh();e=g.tA();return isNaN(e)||isNaN(b)?1E4:(b-e)*(1-k);default:return 0}};a.prototype.NN=function(){this.BC(function(g){g.hZ(0);g.iZ(0);g.kg(!1)})};return a});
define("tdv/view/effects/SlideOutEffect",["require","tdv/utils","tdv/view/effects/OffsetEffect","tdv/view/constants/Direction","tdv/view/constants/Position"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/OffsetEffect");a("tdv/view/constants/Direction");var n=a("tdv/view/constants/Position");a=m.extend(h,function(){h.call(this)});a.prototype.sS=function(g,k){switch(this.get("to")){case n.Tc:case n.Hc:return 0;case n.fb:var e=g.nw();g=g.nb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*k;default:e=
g.getParent();if(!e)return 0;var b=e.Xh();e=g.nw();return isNaN(e)||isNaN(b)?1E4:(b-e)*k}};a.prototype.tS=function(g,k){switch(this.get("to")){case n.Tc:var e=g.tA();g=g.Mb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*k;case n.Hc:e=g.getParent();if(!e)return 0;var b=e.Wh();e=g.tA();return isNaN(e)||isNaN(b)?1E4:(b-e)*k;default:return 0}};a.prototype.MN=function(){this.BC(function(g){g.hZ(0);g.iZ(0);g.kg(!1)})};return a});
define("tdv/player/view/CookiesBar","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/view/buttons/Button tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/effects/SlideInEffect tdv/view/effects/SlideOutEffect tdv/player/script/HTML".split(" "),function(a){function m(u){try{return window.localStorage.getItem(u)}catch(v){}}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=
a("tdv/player/l10n"),k=a("tdv/player/view/util/Device"),e=a("tdv/view/buttons/Button"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/CreationPolicy"),d=a("tdv/view/constants/LayoutMode"),f=a("tdv/view/containers/Container"),l=a("tdv/view/effects/SlideInEffect"),p=a("tdv/view/effects/SlideOutEffect"),q=a("tdv/player/script/HTML");a=h.extend(f,function(u){f.call(this);this.Je=u;this.ek=this.tG=this.iC=this.An=null;u=new l;u.set("duration",500);u.set("from","bottom");u=new p;u.set("duration",
500);u.set("to","bottom");this.xa({creationPolicy:c.cL,verticalAlign:b.$d,horizontalAlign:b.$e,visible:!1,showEffect:this.Kpb,hideEffect:this.Lpb});this.hla="";u=this.w2a();u===!0?setTimeout(function(){this.o(n.XK)}.bind(this),0):u===void 0&&(this.Je.bind(n.L("cookiesPolicy"),this.fxa,this),setTimeout(function(){this.fxa()}.bind(this),0))});a.prototype.Kb=function(){f.prototype.Kb.call(this);this.xa({backgroundColor:"#1a1a1a",width:"100%",left:0,bottom:0});this.An==null&&(this.An=new q,this.An.xa({content:this.hla,
fontColor:"#ffffff",fontWeight:"400",fontFamily:"Open Sans, Arial, sans-serif",width:"100%"}),this.mb(this.An));this.iC==null&&(this.iC=new f,this.mb(this.iC),this.iC.xa({creationPolicy:c.cL,verticalAlign:b.$d,layout:d.Ni}));this.tG==null&&(this.tG=new e,this.tG.xa({backgroundColor:"#2aabe2",fontColor:"#ffffff",fontFamily:"Open Sans, Arial, sans-serif",label:g("accept").toUpperCase(),verticalAlign:"middle"}),this.iC.mb(this.tG),this.tG.bind(n.ma,this.NYa,this,!0));this.IL==null&&(this.IL=new e,this.IL.xa({backgroundColor:"#1a1a1a",
fontColor:"#808080",fontFamily:"Open Sans, Arial, sans-serif",label:g("reject").toUpperCase(),textDecoration:"underline",verticalAlign:"middle"}),this.iC.mb(this.IL),this.IL.bind(n.ma,this.YYa,this,!0))};a.prototype.co=function(){f.prototype.co.apply(this,arguments);var u=this.Xb();u&&(u.bind(n.Rb,this.En,this,!0),this.En())};a.prototype.En=function(){var u=this.Xb();if(u){var v=k.ub(),w=u.Mb()>u.nb(),x=Math.min(u.nb(),u.Mb())/100;u=function(y){return Math.round(y*x)};this.xa({gap:v?u(4.63):20,paddingLeft:v?
u(4.63):20,paddingRight:v?u(4.63):20,paddingTop:v?u(4.63):14,paddingBottom:v?u(4.63):14,layout:v&&w?d.Uk:d.Ni});this.An&&this.An.xa({fontSize:v?u(3.15):14,textAlign:v&&w?"center":"left"});this.iC&&this.iC.xa({gap:v?0:13});this.tG&&this.tG.xa({borderRadius:v?u(4.63):15,fontSize:v?u(3.15):14,height:v?u(9.26):30,paddingLeft:v?u(6):20,paddingRight:v?u(6):20});this.IL&&this.IL.xa({borderRadius:v?u(4.63):15,fontSize:v?u(3.15):14,height:v?u(9.26):30,paddingLeft:v?u(6):20,paddingRight:v?u(6):20});this.Bf()}};
a.prototype.fxa=function(){var u=h.toArray(this.Je.get("cookiesPolicy"));this.IU!=u&&(this.IU=u,this.F7a())};a.prototype.F7a=function(){if(this.IU.length==0)this.zka(null);else{var u=this.IU[0];h.toArray(u.get("geographicArea")).length==0?this.zka(u):this.Q1a(function(v){for(var w=null,x=0;x<this.IU.length&&!w;x++){var y=this.IU[x],z=h.toArray(y.get("geographicArea"));if(z.length==0)w=y;else for(var A=0;A<z.length&&!w;A++)v.indexOf(z[A])>=0&&(w=y)}this.zka(w)}.bind(this))}};a.prototype.zka=function(u){this.qN!==
u&&(this.qN&&this.qN.h(n.L("url"),this.lma,this),(this.qN=u)?(this.qN.bind(n.L("url"),this.lma,this),this.lma(),this.set("visible",!0)):(this.o(n.XK),this.set("visible",!1)))};a.prototype.lma=function(){var u=document.createElement("div");u.innerHTML=g("cookies-notice");for(var v=u.querySelectorAll("a"),w=0;w<v.length;w++){var x=v[w];x.style.color="#2aabe2";x.style.cursor="pointer";x.style.textDecoration="underline";x.href=this.qN.get("url");x.target="_blank"}this.hla=u.innerHTML;this.An&&this.An.set("content",
this.hla)};a.prototype.NYa=function(){this.gFa(!0);this.set("visible",!1);this.o(n.XK)};a.prototype.YYa=function(){this.gFa(!1);this.set("visible",!1)};var r="AT BE BG CY CZ DE DK EE EL ES FI FR HR HU IE IT LT LU LV MT NL PL PT RO SE SI SK".split(" ");a.prototype.Q1a=function(u){this.C1a(function(v){var w=[v];r.indexOf(v)&&w.push("EU");u(w)})};a.prototype.C1a=function(u){var v=m("tdvp_country_code");v?u(v):this.fya||(this.fya=!0,h.zoa("https://geoloc.3dvista.com",w=>{w=w.country.toUpperCase();this.fya=
!1;try{window.localStorage.setItem("tdvp_country_code",w)}catch(x){}u(w)}))};var t="tdvp_accept_cookies_"+window.location.origin+window.location.pathname;a.prototype.w2a=function(){var u=m(t);if(u=="yes")return!0;if(u=="no")return!1};a.prototype.gFa=function(u){try{window.localStorage.setItem(t,u?"yes":"no")}catch(v){}};return a});
define("tdv/player/view/util/FileSystem",["require"],function(){function a(w){var x=w instanceof Request||w instanceof Response?w.url:w;x&&(x=x.split("#")[0]);x&&(x=x.split("?")[0]);return x&&x.indexOf("://")==-1?(typeof window!=="undefined"?Promise.resolve(window.location.href):self.clients.matchAll({type:"window"}).then(function(y){if(y.length)return y[0].url})).then(function(y){return(new window.URL(x,y)).toString()}):Promise.resolve(x)}function m(w,x){return new Promise(function(y,z){(x===void 0?
g():Promise.resolve(x)).then(function(A){(window.webkitRequestFileSystem||window.requestFileSystem)(A?window.PERSISTENT:window.TEMPORARY,w,function(D){y(D)},function(D){console.log("Error getting file system access",D);z("error getting file system")})},function(A){console.log("error getting file system access",A);z("error getting file system")})})}function h(w,x){return w&&w.queryUsageAndQuota?new Promise(function(y,z){w.queryUsageAndQuota(function(A,D){console.log("UsedBytes:",A,"grantedBytes:",
D,"freeBytesRequired:",x);var F=A+x;D>=F?y(F):w==navigator.webkitPersistentStorage||w==navigator.persistentStorage?(console.log("requestQuota:",F),w.requestQuota(F,function(){console.log("Granted bytes:",F);y(F)},function(C){console.log("Not granted bytes:",F,C);z("not enough free space granted")})):(console.log("Not enough temporary free space."),z("not enough free space granted"))},function(A){console.log("Query quota error:",A);A&&A.message&&(A=A.message);z("not enough free space granted: "+A)})}):
Promise.reject("unknown free space")}function n(){return(navigator.storage&&navigator.storage.persist?navigator.storage.persist():Promise.resolve(!1)).then(function(w){console.log("Persistence granted:",w);return w?navigator.webkitPersistentStorage||navigator.persistentStorage:navigator.webkitTemporaryStorage||navigator.temporaryStorage})}function g(){return navigator.storage&&navigator.storage.persisted?navigator.storage.persisted():Promise.resolve(!1)}function k(){return v?Promise.resolve(v):Promise.reject("files uninitialized, no space was requested")}
function e(w){w.length&&w[0]=="/"&&(w=w.substr(1));return w.split("/").filter(function(x){return x!=""})}function b(w){return new Promise(function(x,y){w.remove(function(){x()},function(z){y("can't remove entry"+(z&&z.message?": "+z.message:"")+".")})})}function c(w){return d(w).then(function(x){return Promise.all(x.map(function(y){return y.isDirectory?c(y):b(y)}))}).then(function(){return b(w).then(function(){return Promise.resolve()},function(){return Promise.resolve()})})}function d(w){return new Promise(function(x,
y){w.createReader().readEntries(function(z){x(z)},function(){y("can't list directory")})})}function f(w,x,y){return new Promise(function(z,A){w.getDirectory(x,y,function(D){z(D)},function(){A("can't get directory entry: "+x)})})}function l(w,x){return new Promise(function(y,z){f(w,x,{create:!1}).then(function(A){y(A)})["catch"](function(){f(w,x,{create:!0}).then(function(A){y(A)})["catch"](function(A){console.log("Can't create directory entry: "+x,A);z("can't create directory entry: "+x)})})})}function p(w,
x){return x.length==0?w:l(w,x[0]).then(function(y){return p(y,x.slice(1))})}function q(w,x){return x.length==0?w:f(w,x[0]).then(function(y){return q(y,x.slice(1))})}function r(w,x,y){return new Promise(function(z,A){w.getFile(x,y,function(D){z(D)},function(){A("can't get file entry: "+x)})})}function t(w){return new Promise(function(x,y){w.createWriter(function(z){x(z)},function(){y("can't create File for writing")})})}function u(w){var x=w.lastIndexOf(".");switch((x<0?"":w.substr(x)).toLowerCase()){case ".bmp":return"image/bmp";
case ".eot":return"application/vnd.ms-fontobject";case ".gif":return"image/gif";case ".glb":return"model/gltf-binary";case ".htm":case ".html":return"text/html";case ".jpeg":case ".jpg":return"image/jpeg";case ".js":return"text/javascript";case ".json":return"application/json";case ".m3u8":return"application/vnd.apple.mpegurl";case ".m4a":return"audio/mp4";case ".m4v":return"video/mp4";case ".mp3":return"audio/mpeg";case ".mp4":return"video/mp4";case ".ogg":return"audio/ogg";case ".ogv":return"video/ogg";
case ".otf":return"font/otf";case ".png":return"image/png";case ".svg":return"image/svg+xml";case ".tif":return"image/tiff";case ".tiff":return"image/tiff";case ".ts":return"video/vnd.dlna.mpeg-tts";case ".ttf":return"application/font-sfnt";case ".tts":return"video/vnd.dlna.mpeg-tts";case ".txt":return"text/plain";case ".webm":return"video/webm";case ".woff":return"font/x-woff";case ".woff2":return"font/woff2";case ".xml":return"text/xml";default:return"application/octet-stream"}}var v=null;return{N9:function(){return g()},
toURL:function(w,x){return a(w).then(function(y){y=new window.URL(y);var z=x?"persistent":"temporary",A=y.pathname.split("/").map(encodeURIComponent).join("/");return"filesystem:"+y.origin+"/"+z+A})},Wjb:function(w){return n().then(function(x){return h(x,w)}).then(function(x){return m(x)}).then(function(x){v=x})},Ejb:function(w){w=e(w);var x=w[w.length-1],y=w.slice(0,-1);return k().then(function(z){return q(z.root,y)}).then(function(z){return r(z,x,{create:!0})},function(){return Promise.resolve(null)}).then(function(z){return z&&
b(z)})},qQa:function(w,x){var y=e(w);return m(1024,x).then(function(z){return q(z.root,y)}).then(function(z){return c(z)},function(){return Promise.resolve()})},QTa:function(w,x,y){var z=e(w),A=z[z.length-1],D=z.slice(0,-1);return k().then(function(F){return p(F.root,D)}).then(function(F){return r(F,A,{create:!1}).then(function(C){return Promise.resolve(C)},function(){return r(F,A,{create:!0})})}).then(function(F){return t(F)}).then(function(F){F.seek(F.length);return new Promise(function(C,B){F.onwriteend=
function(){C()};F.onerror=function(H){console.log("Error writing file:",w,H);B("error writing file: "+w)};F.write(new Blob([x],{type:y||u(A)}))})})}}});
define("tdv/player/view/util/Download",["require","tdv/player/view/util/FileSystem","tdv/player/view/util/URL","tdv/player/view/util/Device"],function(a){function m(c,d){this.rD=c;this.kC=!1;this.Dq=null;this.oz=d||function(){}}function h(c){return c.FK>=1048576}var n=a("tdv/player/view/util/FileSystem"),g=a("tdv/player/view/util/URL"),k=a("tdv/player/view/util/Device").kf()?3:5;a={File:function(c,d){this.url=c;this.FK=d;this.JY=this.FO=0}};var e=a.Files=function(c,d,f,l){this.vwa=this.rYa=c;this.vv=
d.slice();this.eya=[];var p=0;this.vv.sort(function(q,r){return q.FK-r.FK});this.vv.forEach(function(q){p+=q.FK});this.eGa=p;this.QG=[];this.h0=void 0;this.cv=[];this.Fda=!1;this.Sg=f||function(){};this.aS=l||function(){}};e.prototype.fw=function(){return this.rZa().then(function(){return this.sZa()}.bind(this))};e.prototype.rZa=function(){return self.caches["delete"](this.vwa)};e.prototype.sZa=function(){var c=(new window.URL(this.rYa)).pathname;return n.qQa(c,!1).then(function(){return n.qQa(c,
!0)})};e.prototype.requestStorage=function(){return n.Wjb(Math.round(this.eGa*1.1+10485760)).then(function(){return n.N9()})};e.prototype.download=function(){this.Fda=!1;this.h0=0;this.fw().then(function(){this.VR()}.bind(this))["catch"](function(c){console.log("error cleaning storage",c);n.N9().then(function(d){this.aS(!1,d)}.bind(this))}.bind(this))};e.prototype.cancelDownload=function(){this.Fda=!0;this.cv.forEach(function(c){c.cancel()});this.fw()};e.prototype.VR=function(){if(!(this.Fda||this.cv.length>=
k))if(this.vv.length>0){if(k==1)var c=Math.random()>.5?this.vv.shift():this.vv.pop();else if(this.QG.filter(h).length==0)c=this.vv.pop();else{if(h(this.vv[0]))return;c=this.vv.shift()}this.QG.push(c);var d=g.MD(c.url,"nc="+(new Date).getTime()),f=new m(d,function(p){c.FO=p.FO;this.hh()}.bind(this));this.cv.push(f);f.fetch().then(function(p){return this.f$a(c.url,p)}.bind(this)).then(function(){this.Lxa(c,f,!0)}.bind(this))["catch"](function(p){console.log("download error",c.url,c.FK,c.FO,p);this.Lxa(c,
f,!1)}.bind(this));this.VR()}else if(this.cv.length==0){var l=this.eya.length<=5;n.N9().then(function(p){this.aS(l,p)}.bind(this))}};e.prototype.Lxa=function(c,d,f){f?(this.QG.splice(this.QG.indexOf(c),1),this.cv.splice(this.cv.indexOf(d),1),this.h0+=c.FK,this.hh(),this.VR()):(c.FO=0,c.JY+=1,this.hh(),c.JY>=20?(console.log("Error downloading file: "+c.url+" after "+c.JY+" retries."),this.Uza(c.url)?(this.eya.push(c),this.cv.splice(this.cv.indexOf(d),1),this.VR()):(this.cancelDownload(),n.N9().then(function(l){this.aS(!1,
l)}.bind(this)))):(console.log("Error downloading file: "+c.url+" attempt "+c.JY+" of 20. Will retry in 2000ms."),setTimeout(function(){this.QG.splice(this.QG.indexOf(c),1);this.cv.splice(this.cv.indexOf(d),1);h(c)?this.vv.push(c):this.vv.splice(0,0,c);this.VR()}.bind(this),2E3)))};e.prototype.f$a=function(c,d){return this.h$a(c,d).then(function(){if(this.pbb(c))return this.g$a(c,d)}.bind(this))};e.prototype.g$a=function(c,d){d=d.clone();return d.status!=200?Promise.reject("response status: "+d.status):
self.caches.open(this.vwa).then(function(f){return f.put(c,d)})};e.prototype.h$a=function(c,d){d=d.clone();if(d.status!=200)return Promise.reject("response status: "+d.status);var f=(new window.URL(c)).pathname;return f.lastIndexOf("/")==f.length-1?Promise.resolve():new Promise(function(l,p){function q(){x.read().then(function(y){var z=y.value,A=[];if(z){for(;z.length+w>=10485760;){var D=z.slice(0,10485760-w);v.push(D);A.push(r(v));v=[];w=0;z=z.slice(D.length,z.length)}z.length>0&&(v.push(z),w+=z.length)}var F=
y.done;w&&F&&A.push(r(v));t(A).then(function(){F?l():q()})["catch"](u)})["catch"](u)}function r(y){if(y.length==0)return new Uint8Array(0);var z=0;y.forEach(function(C){z+=C.length});for(var A=new Uint8Array(z),D=0,F=0;F<y.length;D+=y[F].length,F++)A.set(y[F],D);return A}function t(y){if(y.length==0)return Promise.resolve();var z=y.shift();return n.QTa(f,z).then(function(){t(y)})}function u(y){console.log("Error writing response to file system:",y);n.Ejb(f).then(function(){p("Error reading response body")})}
var v=[],w=0,x=d.body.getReader();q()})};var b=".bmp .gif .glb .jpeg .jpg .m3u8 .m4a .m4v .mp3 .mp4 .ogg .ogv .otf .png .svg .tif .tiff .ts .tts .webm .woff .woff2".split(" ");e.prototype.Uza=function(c){c=(new window.URL(c)).pathname;var d="."+c.split(".").pop().toLowerCase();return b.indexOf(d)>=0&&c.indexOf("loading/")<0};e.prototype.pbb=function(c){var d=(new window.URL(c)).pathname;return d.indexOf("files/")>=0||d.indexOf("pdfjs/")>=0?!0:this.Uza(c)?!1:!0};e.prototype.hh=function(){var c=this.h0;
this.QG.forEach(function(d){c+=d.FO});this.Sg(100*c/this.eGa)};m.prototype.fetch=function(){return fetch(this.rD).then(function(c){if(this.kC)return c.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");if(!c.ok)return Promise.resolve(c);var d=c.headers.get("content-length"),f=void 0,l=0;d!==null&&(f=parseInt(d,10));this.Dq=c.body.getReader();var p=!1,q=function(u){this.kC?u.close():p=!0}.bind(this),r=function(u){return this.Dq.read().then(function(v){var w=v.value;
w&&(l+=w.byteLength,u.enqueue(w));v.done&&(f=l,t(u));this.oz({FK:f,FO:l})}.bind(this))["catch"](function(v){console.log("Error reading response",v);u.error(v)}.bind(this))}.bind(this),t=function(u){p&&(u.close(),p=!1,this.Dq=null)}.bind(this);return new Response(new ReadableStream({start:function(u){return q(u)},pull:function(u){return r(u)},cancel:function(){t()}}))}.bind(this))};m.prototype.cancel=function(){this.kC=!0;this.Dq&&this.Dq.cancel()};a.fw=function(c){return(new e(c,[])).fw()};return a});
define("tdv/player/view/util/Installer","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Download tdv/player/view/util/FileSystem tdv/player/view/util/Flags tdv/player/view/util/URL tdv/view/events/ProgressEvent tdv/util/Storage".split(" "),function(a){function m(t){p=t}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/util/Device"),e=a("tdv/player/view/util/Download"),b=
a("tdv/player/view/util/FileSystem"),c=a("tdv/player/view/util/Flags"),d=a("tdv/player/view/util/URL"),f=a("tdv/view/events/ProgressEvent"),l=a("tdv/util/Storage"),p=null;window.addEventListener("beforeinstallprompt",m);var q=h.extend(g,function(t){g.call(this);this.Je=t;this.I="initial";this.oka=this.Iv=this.Yk=null;this.Az=!1;this.ZG=null;this.k6=void 0;this.MG=p;this.q2=q.sNa();this.tha=d.Bk("vr");this.MG||this.q2||(window.removeEventListener("beforeinstallprompt",m),window.addEventListener("beforeinstallprompt",
this.V4a.bind(this)));this.q2||window.addEventListener("appinstalled",this.IXa.bind(this))});q.prototype.Dra=function(t){this.Iv=t;this.Eo=d.mB(this.Iv.get(TDV.PlayerSettings.BASE_DIR_URL)||d.getDirectory(this.Iv.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)));this.Eo[this.Eo.length-1]!="/"&&(this.Eo+="/");this.Yk=new r(this.Eo);this.k6=this.VDa=t.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS);this.f3a=d.parse(d.getDirectory(window.location.href)).pathname;this.L0a=d.MD(d.mB("files.json",this.Eo),
this.VDa);t=TDV.qb.$La();this.oka=d.MD(this.Iv.get(TDV.PlayerSettings.SERVICE_WORKER_URL),"swv="+t.MAJOR+"."+t.MINOR);this.Yk=new r(this.Eo);this.Yk.bind(n.ia,this.x$a,this,!0);this.Yk.load()};q.prototype.rP=function(){return this.Yk.state==r.QQ};q.prototype.aJa=function(){return this.I=="can_install"&&!this.tha};q.prototype.cJa=function(){return this.rP()&&this.k6!=this.Yk.version&&!this.tha};q.prototype.$Ia=function(){return this.Yk.state!=r.jta&&!this.tha};q.prototype.PMa=function(){this.I=="can_install"&&
(this.MG?(this.MG.userChoice.then(function(t){t.outcome!="accepted"&&this.Jd("unavailable")}.bind(this)),this.MG.prompt().then(function(){this.MG=null}.bind(this))):this.Pea())};q.prototype.cancel=function(){this.I=="downloading"&&(this.ZG&&(this.ZG.cancelDownload(),this.ZG=null),this.Yk.fw(),this.Jd("unavailable"))};q.prototype.fw=function(){e.fw(this.Eo);this.Yk.fw()};q.prototype.x$a=function(){this.Iv&&this.Iv.get(TDV.PlayerSettings.g_)?this.Jd("unavailable"):this.Je.get("downloadEnabled")!==!0?
this.Jd("unavailable"):c.AUa!==!0?this.Jd("unavailable"):k.Tb()!=k.Pp||k.Dc()==k.zB||k.Dc()==k.RK?this.Jd("unavailable"):this.oka?"serviceWorker"in navigator?this.rP()&&!this.cJa()?this.Jd("unavailable"):navigator.onLine?this.W6a():this.Jd("unavailable"):this.Jd("unavailable"):this.Jd("unavailable")};q.prototype.Jd=function(t){this.I!=t&&(this.I=t,t=["can_install","unavailable"].indexOf(this.I)>=0,this.Az!=t&&(this.Az=t)&&this.o(n.vd))};q.prototype.W6a=function(){this.Jd("registering_sw");navigator.serviceWorker.register(this.oka,
{scope:this.f3a}).then(function(){this.CEa(!0)}.bind(this))["catch"](function(){this.CEa(!1)}.bind(this))};q.prototype.CEa=function(t){t?k.kf()?this.Jd("can_install"):this.q2&&this.Yk.state==r.Waa?(this.Jd("can_install"),this.Pea()):this.MG?this.Jd("can_install"):(this.Jd("sw_registered"),setTimeout(function(){this.I=="sw_registered"&&this.Jd("can_install")}.bind(this),3E3)):this.Jd("unavailable")};q.prototype.V4a=function(t){this.Iv&&this.Iv.get(TDV.PlayerSettings.g_)||(this.MG=t,this.I=="sw_registered"&&
this.Jd("can_install"))};q.prototype.IXa=function(){this.Iv&&this.Iv.get(TDV.PlayerSettings.g_)||(this.I=="sw_registered"&&this.Jd("can_install"),this.Pea())};q.prototype.Pea=function(){this.Jd("downloading");this.o(n.Dr);this.uGa(0);this.m4a()};q.prototype.m4a=function(){var t=d.MD(this.L0a,"nc="+(new Date).getTime());h.zoa(t,u=>{if(this.I=="downloading"){var v=[],w;for(w in u){var x=u[w].tags;if(x){Array.isArray(x)||(x=[x]);for(var y=0;y<x.length;y++)v.indexOf(x[y])<0&&v.push(x[y])}}var z=[];v.indexOf("mobilevr2gen")>=
0&&(k.D8()||k.E8())?z.push("mobilevr2gen"):v.indexOf("mobilevr")>=0&&k.kf()?z.push("mobilevr"):v.indexOf("mobile")>=0&&k.ub()?z.push("mobile"):v.indexOf("desktop")>=0&&!k.ub()&&z.push("desktop");v=[];for(w in u)if(!(w.indexOf(".DS_Store")>-1)){if(x=u[w].tags){var A=!1;if(Array.isArray(x)){y=0;for(var D=x.length;y<D&&!A;y++)A=z.indexOf(x[y])>=0}else A=z.indexOf(x)>=0;if(!A)continue}x=d.mB(w,this.Eo);v.push(new e.File(x,u[w].size))}var F=(new window.URL(window.location.pathname,window.location.href)).toString();
v.filter(function(C){return C.url==F}).length==0&&v.push(new e.File(F,1024));this.ZG=new e.Files(this.Eo,v,this.uGa.bind(this),this.Kxa.bind(this));this.ZG.requestStorage().then(function(C){this.Yk.storage=C?r.aR:r.jca;this.Yk.state=r.Waa;this.Yk.version=this.k6;this.Yk.save();this.ZG.download()}.bind(this))["catch"](function(){this.Kxa(!1,void 0)}.bind(this))}})};q.prototype.uGa=function(t){this.o(new f(n.xc,t))};q.prototype.Kxa=function(t,u){this.ZG=null;this.Jd("unavailable");t&&(this.Yk.state=
r.QQ,this.Yk.save());t?this.o(n.Ub,{wZ:!0}):u?this.o(n.Ub,{wZ:!1,error:q.mta}):k.kf()?this.o(n.Ub,{wZ:!1,error:q.lta}):this.q2?this.o(n.Ub,{wZ:!1,error:q.mta}):this.o(n.Ub,{wZ:!1,error:q.nta})};q.sNa=function(){return d.Tg("installed",!1)};q.ujb=function(t,u){var v=new q.Pba(t);v.bind(n.ia,function(){var w=!1;v.state==q.Pba.QQ&&(w=q.sNa()?!0:!navigator.onLine);w?b.toURL(t,v.storage==q.Pba.aR).then(function(x){u(x)}):u(t)},this,!0);v.load()};q.nta="launchFromHomeScreen";q.lta="addToBookmark";q.mta=
"errorDownloading";var r=h.extend(g,function(t){g.call(this);this.Eo=t;this.iha="installation_state_"+t;this.o6a=d.parse(this.Eo).pathname+"installation_state.json";this.state=this.storage=this.version=void 0;this.MEa()});r.prototype.load=function(){if(this.n4a()&&this.state==r.QQ)this.ZFa(this.storage==r.aR).then(function(){this.o(n.ia)}.bind(this))["catch"](function(){this.ZFa(this.storage!=r.aR).then(function(){this.storage=this.storage==r.jca?r.aR:r.jca;this.gka();this.o(n.ia)}.bind(this))["catch"](function(){this.state=
r.Waa;this.gka();this.o(n.ia)}.bind(this))}.bind(this));else this.o(n.ia)};r.prototype.save=function(){this.gka();this.state==r.QQ&&this.B7a()};r.prototype.n4a=function(){var t=l.getItem(this.iha);if(!t)return!1;this.h1a(t);return!0};r.prototype.gka=function(){l.setItem(this.iha,this.dGa())};r.prototype.ZFa=function(t){return new Promise(function(u,v){b.toURL(this.Eo+"installation_state.json",t).then(w=>h.zoa(w,()=>u(),()=>v()))}.bind(this))};r.prototype.B7a=function(){b.QTa(this.o6a,this.dGa(),"text/json")};
r.prototype.dGa=function(){var t={};t.version=this.version;t.storage=this.storage;t.state=this.state;return JSON.stringify(t)};r.prototype.h1a=function(t){this.g1a(JSON.parse(t))};r.prototype.g1a=function(t){this.version=t.version;this.storage=t.storage;this.state=t.state};r.prototype.fw=function(){l.removeItem(this.iha);this.MEa()};r.prototype.MEa=function(){this.version="";this.storage=r.fWa;this.state=r.jta};r.fWa="unkonwn";r.jca="temporary";r.aR="persistent";r.jta="not started";r.Waa="started";
r.QQ="completed";q.Pba=r;return q});
define("tdv/player/view/DownloadBar","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/player/view/util/Installer tdv/view/buttons/Button tdv/view/buttons/CloseButton tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/core/UIComponent tdv/view/text/Label".split(" "),function(a){function m(r){var t=new b;t.xa({label:r,backgroundColor:"#0071BC",borderRadius:2,fontColor:"#ffffff",fontWeight:"400",fontFamily:"Arial, sans-serif",
fontSize:14,paddingLeft:14,paddingRight:14,height:31,verticalAlign:d.$d});return t}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/l10n"),k=a("tdv/player/view/util/Device"),e=a("tdv/player/view/util/Installer"),b=a("tdv/view/buttons/Button"),c=a("tdv/view/buttons/CloseButton"),d=a("tdv/view/constants/Alignment"),f=a("tdv/view/constants/LayoutMode"),l=a("tdv/view/containers/Container"),p=a("tdv/view/core/UIComponent"),q=a("tdv/view/text/Label");a=h.extend(l,function(r,t){l.call(this);
this.Je=r;this.fh=t;this.fh.bind(n.vd,this.A3a,this,!0);this.fh.bind(n.Dr,this.x3a,this,!0);this.fh.bind(n.xc,this.z3a,this,!0);this.fh.bind(n.Ub,this.y3a,this,!0);this.sb="hidden";this.pW=void 0;this.jja=!1;this.Sg=void 0;this.ek=this.ey=this.vG=this.zG=this.wG=this.o5=this.Za=null;this.DXa();this.xa({backgroundColor:"#000000",gap:18,height:55,width:"100%",paddingLeft:28,paddingRight:28,verticalAlign:d.$d,layout:f.Ni});this.jh()});a.prototype.A3a=function(){this.fh.aJa()||this.fh.rP()&&this.fh.$Ia()?
(this.sb="ready",this.jja&&this.CFa()):this.sb="hidden";this.jh()};a.prototype.x3a=function(){this.sb="installing";this.jh()};a.prototype.z3a=function(r){this.Sg=r.percent;this.jh()};a.prototype.y3a=function(r){this.sb=r.data.wZ?"installed":"failed";this.Zxa=r.data.error;this.jh()};a.prototype.tg=function(){this.e$a()};a.prototype.D3=function(){this.jja||(this.jja=!0,this.sb=="ready"&&this.CFa())};a.prototype.CFa=function(){this.pW=setTimeout(function(){this.pW=null;this.b6a()}.bind(this),5E3);this.jh()};
a.prototype.e$a=function(){this.cEa();this.pW&&clearTimeout(this.pW);this.pW=null};a.prototype.b6a=function(){this.cEa();this.sb=="ready"&&(this.sb="hidden",this.jh())};a.prototype.DXa=function(){this.bind(n.gb,this.tg,this);this.Je.bind(n.gb,this.D3,this);this.Je.bind(n.Sa,this.D3,this)};a.prototype.cEa=function(){this.h(n.gb,this.tg,this);this.Je.h(n.gb,this.D3,this);this.Je.h(n.Sa,this.D3,this)};a.prototype.Kb=function(){l.prototype.Kb.call(this);this.Za==null&&(this.Za=new q,this.Za.xa({fontColor:"#ffffff",
fontWeight:"400",fontFamily:"Arial, sans-serif",fontSize:14,text:g("download-tour")}),this.mb(this.Za));this.wG==null&&(this.wG=m(g("download")),this.mb(this.wG),this.wG.bind(n.ma,this.RYa,this,!0));this.zG==null&&(this.zG=m(g("refresh-downloaded")),this.mb(this.zG),this.zG.bind(n.ma,this.XYa,this,!0));this.vG==null&&(this.vG=m(g("delete-downloaded")),this.mb(this.vG),this.vG.bind(n.ma,this.QYa,this,!0));this.o5==null&&(this.o5=new p,this.o5.xa({width:"100%"}),this.mb(this.o5));this.ey==null&&(this.ey=
new c,this.ey.xa({backgroundColor:"#ffffff",borderRadius:2,iconColor:"#000000",iconLineWidth:1,iconWidth:17,iconHeight:17,height:31,width:31}),this.mb(this.ey),this.ey.bind(n.ma,this.PYa,this,!0));this.ek==null&&(this.ek=m(g("cancel")),this.mb(this.ek),this.ek.bind(n.ma,this.uG,this,!0));k.ub()&&this.En();this.jh()};a.prototype.bs=function(){l.prototype.bs.call(this);k.ub()&&this.getParent().bind(n.Rb,this.En,this,!0)};a.prototype.np=function(){k.ub()&&this.getParent().h(n.Rb,this.En,this,!0);l.prototype.np.call(this)};
a.prototype.En=function(){var r=this.getParent();if(r){var t=Math.min(r.nb(),r.Mb())/100,u=function(v){return Math.round(v*t)};this.xa({gap:u(3.9),height:u(11.9),paddingLeft:u(6),paddingRight:u(6)});this.Za&&this.Za.xa({fontSize:u(3)});[this.wG,this.ek,this.zG,this.vG].forEach(function(v){v&&v.xa({borderRadius:u(.4),fontSize:u(3),paddingLeft:u(3),paddingRight:u(3),height:u(6.7)})});this.ey&&this.ey.xa({borderRadius:u(.4),iconLineWidth:u(.22),iconWidth:u(3.7),iconHeight:u(3.7),height:u(6.7),width:u(6.7)})}};
a.prototype.jh=function(){switch(this.sb){case "ready":var r=this.fh.rP()?g("downloaded"):g("download-tour");break;case "installing":r=g("downloading");this.Sg!==void 0&&(r+="..."+this.Sg.toFixed(1)+"%");break;case "installed":r=g("downloaded");break;case "failed":r=this.Zxa==e.nta?k.ub()?g("storage-not-provided-launch-from-homescreen"):g("storage-not-provided-launch-from-desktop"):this.Zxa==e.lta?g("storage-not-provided-bookmark"):g("download-failed")}this.Za&&this.Za.set("text",r);this.wG&&this.wG.set("visible",
this.sb=="ready"&&!this.fh.rP()&&this.fh.aJa());this.vG&&this.vG.set("visible",this.sb=="ready"&&this.fh.rP()&&this.fh.$Ia());this.zG&&this.zG.set("visible",this.sb=="ready"&&this.fh.cJa());this.ek&&this.ek.set("visible",this.sb=="installing");this.ey&&this.ey.set("visible",this.sb!="installing");this.set("visible",this.sb!="hidden")};a.prototype.RYa=function(){this.fh.PMa()};a.prototype.XYa=function(){this.fh.PMa()};a.prototype.QYa=function(){this.fh.fw();this.sb="hidden";this.jh()};a.prototype.uG=
function(){this.fh.cancel();this.sb="hidden";this.jh()};a.prototype.PYa=function(){this.sb=="installing"&&this.fh.cancel();this.sb="hidden";this.jh()};return a});
define("tdv/player/view/MessageWindow","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/view/buttons/Button tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect tdv/view/text/Label tdv/view/text/HTMLText tdv/view/util/KeyboardControl".split(" "),function(a){function m(t,u){this.text=t;this.Hn=u}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/l10n"),
k=a("tdv/player/view/util/Device"),e=a("tdv/view/buttons/Button"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/LayoutMode"),d=a("tdv/view/containers/Container"),f=a("tdv/view/effects/FadeInEffect"),l=a("tdv/view/effects/FadeOutEffect"),p=a("tdv/view/text/Label"),q=a("tdv/view/text/HTMLText"),r=a("tdv/view/util/KeyboardControl");a=h.extend(d,function(){d.call(this);this.ws=[];this.ek=this.xG=this.Za=this.lH=this.IN=this.lt=null;this.vR=this.vR.bind(this);this.uG=this.uG.bind(this);var t=
new f;t.set("duration",500);t.set("easing","cubic_in");var u=new l;u.set("duration",500);u.set("easing","cubic_out");this.xa({backgroundColor:"#000000",backgroundOpacity:.6,horizontalAlign:b.$e,gap:5,left:0,top:0,right:0,bottom:0,hideEffect:u,showEffect:t,visible:!1})});a.prototype.Kb=function(){d.prototype.Kb.call(this);this.lt==null&&(this.lt=new d,this.lt.xa({centerX:0,centerY:0,backgroundColor:"#ffffff",horizontalAlign:b.$e,verticalAlign:b.$d,layout:c.Uk,shadow:!0,shadowColor:"#000000",shadowHorizontalLength:0,
shadowVerticalLength:0,shadowOpacity:.2}),this.mb(this.lt));this.Za==null&&(this.Za=new p,this.Za.xa({fontColor:"#808080",fontWeight:"300",fontFamily:"Tahoma, Geneva, sans-serif"}),this.lt.mb(this.Za));this.lH==null&&(this.lH=new q,this.lH.xa({width:"80%"}),this.lt.mb(this.lH));this.IN==null&&(this.IN=new d,this.IN.xa({backgroundColor:"#b3b3b3"}),this.lt.mb(this.IN));this.fk==null&&(this.fk=new d,this.fk.xa({horizontalAlign:b.$e,verticalAlign:b.$d,layout:c.Ni}),this.lt.mb(this.fk));this.xG==null&&
(this.xG=new e,this.xG.xa({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.$e,verticalAlign:b.$d,label:g("yes").toUpperCase(),pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.xG.bind(n.ma,this.vR,this,!0),this.fk.mb(this.xG));this.ek==null&&(this.ek=new e,this.ek.xa({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.$e,verticalAlign:b.$d,label:g("no").toUpperCase(),
pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.ek.bind(n.ma,this.uG,this,!0),this.fk.mb(this.ek))};a.prototype.bs=function(){d.prototype.bs.call(this);this.getParent().bind(n.Rb,this.En,this,!0)};a.prototype.np=function(){this.getParent().h(n.Rb,this.En,this,!0);d.prototype.np.call(this)};a.prototype.En=function(){var t=this.getParent();if(t){var u=t.nb();t=t.Mb();if(k.ub()){var v=Math.min(u,t);u=function(w){return Math.round(w*v/100)}}else u=function(w){return Math.round(w*
4)};this.lt&&this.lt.xa({borderRadius:u(1),width:u(80),height:u(40),gap:u(4),shadowBlurRadius:u(1),shadowSpread:u(1)});this.IN&&this.IN.xa({width:u(60),minHeight:2,height:u(.25)});this.fk&&this.fk.xa({gap:u(5)});this.ek&&this.ek.xa({borderRadius:u(1),width:u(20),height:u(10),fontSize:u(4.25)});this.xG&&this.xG.xa({borderRadius:u(1),width:u(20),height:u(10),fontSize:u(4.5)});this.Za&&this.Za.xa({fontSize:u(5)});this.b6()}};a.prototype.show=function(t,u){this.En();var v=this.Wya(u);v>=0&&this.aEa(v);
this.N6a(new m(t,u));this.MYa()};a.prototype.oe=function(t){t=this.Wya(t);t>=0&&this.aEa(t)};a.prototype.MYa=function(){var t=this.getParent();t&&t.rr(this,t.Cb().length-1)};a.prototype.vR=function(){this.Lva(!0)};a.prototype.uG=function(){this.Lva(!1)};a.prototype.Wya=function(t){for(var u=0;u<this.ws.length;u++)if(this.ws[u].Hn==t)return u;return-1};a.prototype.b6=function(){if(this.lt){r.Pjb(this.vR);r.Jqa(this.uG);var t=this.qza();t?(t.text.length<20?(this.lH.set("visible",!1),this.Za.set("text",
t.text),this.Za.set("visible",!0)):(this.Za.set("visible",!1),this.lH.set("html",this.R1a(t.text)),this.lH.set("visible",!0)),this.ek.set("visible",t.Hn?!0:!1),this.set("visible",!0),r.gcb(this.vR),r.Sma(this.uG)):this.set("visible",!1)}};a.prototype.R1a=function(t){return"<div style=\"color:#808080; font-weight:300; font-family:'Tahoma', 'Geneva', sans-serif; font-size: "+this.Za.get("fontSize")+'px; text-align:center;" >'+t+"</div>"};a.prototype.Lva=function(t){var u=this.qza();u&&(u=this.e2a(u.text),
this.g7a(u),u.forEach(v=>{v.Hn&&v.Hn.call(this,t)}))};a.prototype.N6a=function(t){this.ws.push(t);this.b6()};a.prototype.e2a=function(t){return this.ws.filter(u=>u.text==t)};a.prototype.g7a=function(t){this.ws=this.ws.filter(u=>!t.includes(u));this.b6()};a.prototype.aEa=function(t){this.ws.splice(t,1);t==this.ws.length&&this.b6()};a.prototype.qza=function(){return this.ws.length>0?this.ws[this.ws.length-1]:null};return a});
define("tdv/view/core/ContextMenu","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/view/util/Fullscreen".split(" "),function(a){function m(E){return E.map(function(G){return String.fromCharCode(G)}).join("")}function h(E){for(;E&&E!=document;){if(E.getAttribute(r)=="Button")return!0;E=E.parentNode}return!1}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/events/Event"),e=a("tdv/events/EventDispatcher"),b=a("tdv/player/view/util/Device"),
c=a("tdv/view/util/Fullscreen"),d=[];a=m([99,111,110,116,101,120,116,109,101,110,117]);var f=m([109,111,117,115,101,100,111,119,110]),l=m([109,111,117,115,101,117,112]),p=m([109,111,117,115,101,108,101,97,118,101]),q=m([109,111,117,115,101,101,110,116,101,114]),r=m([116,100,118,99,108,97,115,115]);document.addEventListener(a,function(E){if(!b.ub()||!h(E.target)){var G=b.Nd()==b.r_?200:0;setTimeout(function(){(t===void 0||u===void 0||v===void 0||w===void 0||Math.abs(v-t)+Math.abs(w-u)<10)&&d.forEach(function(N){N(E)});
t=u=v=w=void 0},G)}E.preventDefault();E.stopImmediatePropagation()},!0);var t,u,v,w;document.addEventListener("mousedown",function(E){v=t=E.screenX;w=u=E.screenY},!0);document.addEventListener("mousemove",function(E){v=E.screenX;w=E.screenY},!0);var x=1;n=n.extend(e,function(E,G){e.call(this);this.Gb=E;this.X1a=G;this.g3=this.g3.bind(this);this.te=this.te.bind(this);this.hha=!1;this.eha=this.eha.bind(this);this.fha=this.fha.bind(this);this.dha=this.dha.bind(this);this.gha=this.gha.bind(this);this.qa=
document.createElement("div");this.qa.style.setProperty("z-index",x,H[B]);for(var N in H[y])this.qa.style.setProperty(N,H[y][N],H[B]);d.push(this.g3)});n.prototype.clear=function(){this.f4a()&&this.sga();this.qa=null;d.splice(d.indexOf(this.g3),1)};n.prototype.g3=function(E){var G=this.X1a();if(G.length!=0){this.qa.replaceChildren();this.hha=!1;var N=0;G.forEach(function(O){var R=document.createElement("div");if(O){R.textContent=O;for(var Q in H[A])R.style.setProperty(Q,H[A][Q],H[B]);var K=N;N++;
R.addEventListener(q,function(L){this.eha(L,K)}.bind(this));R.addEventListener(p,function(L){this.fha(L,K)}.bind(this));R.addEventListener(f,function(L){this.dha(L,K)}.bind(this));R.addEventListener(l,function(L){this.gha(L,K)}.bind(this))}else for(Q in H[D])R.style.setProperty(Q,H[D][Q],H[B]);for(Q in H[z])R.style.setProperty(Q,H[z][Q],H[B]);this.qa.appendChild(R)}.bind(this));(c.fullscreenElement()||document.body).appendChild(this.qa);this.qa.style.setProperty("display","block",H[B]);G=E.pageX;
E=E.pageY;G+this.qa.clientWidth>document.body.clientWidth-5&&(G=document.body.clientWidth-this.qa.clientWidth-5);E+this.qa.clientHeight>document.body.clientHeight-5&&(E=document.body.clientHeight-this.qa.clientHeight-5);this.qa.style.setProperty("left",G+"px",H[B]);this.qa.style.setProperty("top",E+"px",H[B]);this.Gb.bind(g.Sa,this.te,this);document.addEventListener("mousedown",this.te);this.Ibb=setInterval(this.Hbb.bind(this),200)}};n.prototype.f4a=function(){return!!this.qa&&!!this.qa.parentNode};
n.prototype.sga=function(){clearInterval(this.Ibb);this.qa.parentNode.removeChild(this.qa);document.removeEventListener("mousedown",this.te);this.Gb.h(g.Sa,this.te,this);this.qa.style.setProperty("display","none",H[B])};n.prototype.Hbb=function(){this.qa.contains(document.elementFromPoint(this.qa.offsetLeft+this.qa.clientWidth*.5,this.qa.offsetTop+this.qa.clientHeight*.5))||this.qa.style.setProperty("z-index",x*=10,H[B])};n.prototype.te=function(){this.sga()};n.prototype.dha=function(E){this.hha=
!0;E.preventDefault();E.stopImmediatePropagation()};n.prototype.gha=function(E,G){this.hha&&(this.sga(),E.preventDefault(),E.stopImmediatePropagation(),this.o(new k(g.Xr,{index:G})))};n.prototype.eha=function(E){for(var G in H[F])E.currentTarget.style.setProperty(G,H[F][G],H[B])};n.prototype.fha=function(E){for(var G in H[C])E.currentTarget.style.setProperty(G,H[C][G],H[B])};var y="0",z="1",A="2",D="3",F="4",C="5",B="6",H=function(E){return JSON.parse(E.map(function(G){return String.fromCharCode(G)}).join(""))}([123,
34,48,34,58,123,34,98,111,114,100,101,114,34,58,34,49,112,120,32,115,111,108,105,100,32,35,98,98,98,34,44,34,98,111,114,100,101,114,45,114,97,100,105,117,115,34,58,34,51,112,120,34,44,34,112,111,115,105,116,105,111,110,34,58,34,97,98,115,111,108,117,116,101,34,44,34,100,105,115,112,108,97,121,34,58,34,110,111,110,101,34,44,34,98,97,99,107,103,114,111,117,110,100,45,99,111,108,111,114,34,58,34,35,101,53,101,53,101,53,34,44,34,111,112,97,99,105,116,121,34,58,49,44,34,112,97,100,100,105,110,103,34,58,
48,44,34,109,97,114,103,105,110,34,58,48,44,34,112,111,105,110,116,101,114,45,101,118,101,110,116,115,34,58,34,97,108,108,34,44,34,116,101,120,116,45,97,108,105,103,110,34,58,34,108,101,102,116,34,44,34,98,111,120,45,115,104,97,100,111,119,34,58,34,49,112,120,32,49,112,120,32,51,112,120,32,114,103,98,97,40,48,44,32,48,44,32,48,44,32,48,46,50,41,34,125,44,34,49,34,58,123,34,102,111,110,116,45,102,97,109,105,108,121,34,58,34,65,114,105,97,108,34,44,34,102,111,110,116,45,115,105,122,101,34,58,34,49,
51,112,120,34,44,34,99,111,108,111,114,34,58,34,35,48,48,48,48,48,48,34,44,34,111,112,97,99,105,116,121,34,58,49,44,34,100,105,115,112,108,97,121,34,58,34,98,108,111,99,107,34,44,34,112,111,105,110,116,101,114,45,101,118,101,110,116,115,34,58,34,97,108,108,34,125,44,34,50,34,58,123,34,99,117,114,115,111,114,34,58,34,112,111,105,110,116,101,114,34,44,34,98,111,114,100,101,114,45,114,97,100,105,117,115,34,58,34,51,112,120,34,44,34,112,97,100,100,105,110,103,34,58,34,55,112,120,32,50,48,112,120,34,44,
34,119,104,105,116,101,45,115,112,97,99,101,34,58,34,110,111,119,114,97,112,34,125,44,34,51,34,58,123,34,109,97,114,103,105,110,34,58,34,55,112,120,32,53,112,120,34,44,34,98,111,114,100,101,114,45,116,111,112,34,58,34,49,112,120,32,115,111,108,105,100,32,35,97,97,97,34,44,34,98,111,114,100,101,114,45,98,111,116,116,111,109,34,58,34,49,112,120,32,115,111,108,105,100,32,35,102,102,102,34,125,44,34,52,34,58,123,34,99,111,108,111,114,34,58,34,35,102,102,102,102,102,102,34,44,34,98,97,99,107,103,114,111,
117,110,100,45,99,111,108,111,114,34,58,34,114,103,98,97,40,48,44,32,48,44,32,48,44,32,48,46,55,41,34,125,44,34,53,34,58,123,34,99,111,108,111,114,34,58,34,35,48,48,48,48,48,48,34,44,34,98,97,99,107,103,114,111,117,110,100,45,99,111,108,111,114,34,58,34,34,125,44,34,54,34,58,34,105,109,112,111,114,116,97,110,116,34,125]);return n});
define("tdv/view/core/Cursors",["require","exports","tdv/player/view/util/URL","tdv/view/constants/Cursor","tdv/view/util/Assets"],function(a,m,h,n,g){return function(){function k(e){this.Gb=e;this.Mv={};this.Mv[n.Rta]="move";this.Mv[n.yVa]="ew-resize";this.Mv[n.AVa]="ns-resize";this.Mv[n.zVa]="nesw-resize";this.Mv[n.BVa]="nwse-resize";this.Mv[n.qf]="pointer";this.Mv[n.LB]="inherit";this.Mv[n.Ee]="default";this.ki={};this.ki[n.IB]="grab.cur";this.ki[n.Mi]="grabbing.cur";this.ki[n.aua]="N.cur";this.ki[n.bua]=
"NE.cur";this.ki[n.Sta]="E.cur";this.ki[n.eua]="SE.cur";this.ki[n.dua]="S.cur";this.ki[n.fua]="SW.cur";this.ki[n.gua]="W.cur";this.ki[n.cua]="NW.cur";this.ki[n.Uta]="FN.cur";this.ki[n.Vta]="FNE.cur";this.ki[n.Tta]="FE.cur";this.ki[n.Yta]="FSE.cur";this.ki[n.Xta]="FS.cur";this.ki[n.Zta]="FSW.cur";this.ki[n.$ta]="FW.cur";this.ki[n.Wta]="FNW.cur";this.gda={};this.gda[n.cG]=g.cG;this.uwa={}}k.prototype.$Ka=function(e){return this.$3a(e)?this.nza(e):this.P3a(e)?this.D1a(e):this.I3a(e)?this.o1a(e):this.nza(n.Ee)};
k.prototype.cZa=function(e){if(!(e in this.uwa)){var b=new Image;b.src=this.Dya(e);this.uwa[e]=b}};k.prototype.$3a=function(e){return e in this.Mv};k.prototype.nza=function(e){return this.Mv[e]};k.prototype.P3a=function(e){return!!this.ki[e]};k.prototype.D1a=function(e){this.cZa(e);return"url("+this.Dya(e)+"), default"};k.prototype.Dya=function(e){return h.mB(this.Gb.get("settings").get(TDV.PlayerSettings.CURSORS_DIR_URL))+"/"+this.ki[e]};k.prototype.I3a=function(e){return e in this.gda};k.prototype.o1a=
function(e){return"url("+this.gda[e]+"), auto"};return k}()});define("tdv/view/helpers/DOMUpdateQueue",["require","exports"],function(){var a=1,m={};return{ceb:function(h,n){var g=h.__duqid;g===void 0&&(g=a.toString(),h.__duqid=g,a++);h=m[g]||(m[g]={e:h,s:{}});for(var k in n)h.s[k]=n[k]},process:function(){for(var h in m){var n=m[h],g=n.e.style;n=n.s;for(var k in n)g[k]=n[k]}m={}}}});
define("tdv/view/lifecycle/PriorityQueue",["require","exports"],function(){return function(){function a(){this.xz={};this.Ps=[];this.JR=0}a.prototype.push=function(m,h){this.xz[h]==void 0?(this.xz[h]=[m],this.Ps.push(h),this.Ps.sort(function(n,g){return n-g}),this.JR++):(h=this.xz[h],h.includes(m)||(h.push(m),this.JR++))};a.prototype.cLa=function(){return this.JR};a.prototype.isEmpty=function(){return this.Ps.length==0};a.prototype.RPa=function(){if(!this.isEmpty()){var m=this.Ps[0],h=this.xz[m].pop();
this.xz[m].length==0&&(delete this.xz[m],this.Ps=this.Ps.slice(1));this.JR--;return h}};a.prototype.vqa=function(){if(!this.isEmpty()){var m=this.Ps[this.Ps.length-1],h=this.xz[m].pop();this.xz[m].length==0&&(delete this.xz[m],this.Ps=this.Ps.slice(0,this.Ps.length-1));this.JR--;return h}};return a}()});
define("tdv/view/lifecycle/LifeCycleManager","require exports tdv/view/helpers/DOMUpdateQueue tdv/view/lifecycle/PriorityQueue tdv/view/util/Animation tdv/events/async".split(" "),function(a,m,h,n,g,k){return function(){function e(){this.EE=!1;this.APa=void 0;this.enabled=!0;this.W6=new n;this.W9=new n;this.P$=new n;this.N8=new n;this.Ssa=new n;g.requestFrame(this.Kg,this)}e.prototype.clear=function(){this.enabled=!1};e.prototype.MX=function(b){this.W6.push(b,this.lP(b));this.NY()};e.prototype.Tf=
function(b){this.W9.push(b,this.lP(b));this.NY()};e.prototype.lc=function(b){this.P$.push(b,this.lP(b));this.NY()};e.prototype.Bf=function(b){this.N8.push(b,this.lP(b));this.NY()};e.prototype.tb=function(b){this.Ssa.push(b,this.lP(b));this.NY()};e.prototype.update=function(){this.ynb();this.dob();this.pu()};e.prototype.ynb=function(){do{for(;!this.W6.isEmpty();){var b=this.W6.vqa();b&&b.Kb()}this.W9.isEmpty()||(b=this.W9.vqa())&&b.jb()}while(!this.W9.isEmpty()||!this.W6.isEmpty())};e.prototype.dob=
function(){for(;!this.P$.isEmpty()||!this.N8.isEmpty();)this.JZ(),this.Lk()};e.prototype.JZ=function(){for(;!this.P$.isEmpty();){var b=this.P$.vqa();if(b&&b.Onb()){var c=b.getParent();c?(c.lc(),c.Bf()):b.ZQa(0,0,b.sw(),b.rw())}}};e.prototype.Lk=function(){for(;!this.N8.isEmpty();){var b=this.N8.RPa();b&&b.Lk()}};e.prototype.pu=function(){for(;!this.Ssa.isEmpty();){var b=this.Ssa.RPa();b&&b.pu()}h.process()};e.prototype.NY=function(){this.EE||(this.EE=!0,this.APa=(new Date).getTime()+500,k.ME(this.aPa.bind(this)))};
e.prototype.aPa=function(){this.EE=!1;this.enabled&&this.update()};e.prototype.lP=function(b){return(b=b.getParent())?this.lP(b)+1:0};e.prototype.Kg=function(){this.EE&&(new Date).getTime()>=(this.APa||0)&&this.aPa();g.requestFrame(this.Kg,this)};return e}()});
define("tdv/view/core/visuals/dom/DOMCanvasVisuals",["require","exports","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/CanvasVisualProperties"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.tp=function(){return new n};k.prototype.rh=function(e){g.prototype.rh.call(this,e);this.Lp(e)};k.prototype.Lp=function(e){if(e.canvas!==this.K.canvas&&(this.K.canvas&&this.a$(this.K.canvas),e.canvas)){var b=e.canvas;b.style.position="absolute";
b.style.left="0";b.style.top="0";b.style.cursor="inherit";this.uk(e.canvas)}};return k}(h)});
define("tdv/view/core/visuals/dom/DOMContainerVisuals",["require","exports","tdv/view/core/ZIndex","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/ContainerVisualProperties"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.Ln=null;b.Ht=null;b.jo=null;b.qu=null;return b}P(e,k);e.prototype.tp=function(){return new g};e.prototype.lA=function(){k.prototype.lA.call(this);this.wfb().appendChild(this.L7());this.ggb().appendChild(this.a8())};e.prototype.wfb=
function(){this.Ln||(this.Ln=document.createElement("div"),this.Ln.setAttribute("tdvlayer","scrollbar"),this.Ln.style.position="absolute",this.Ln.style.zIndex=h.Aua);return this.Ln};e.prototype.ggb=function(){this.jo||(this.jo=document.createElement("div"),this.jo.setAttribute("tdvlayer","scrollbar"),this.jo.style.position="absolute",this.jo.style.zIndex=h.Aua);return this.jo};e.prototype.L7=function(){this.Ht||(this.Ht=document.createElement("div"),this.Ht.style.position="absolute",this.Ht.style.left=
"0",this.Ht.style.top="0");return this.Ht};e.prototype.a8=function(){this.qu||(this.qu=document.createElement("div"),this.qu.style.position="absolute",this.qu.style.left="0",this.qu.style.top="0");return this.qu};e.prototype.rh=function(b){k.prototype.rh.call(this,b);this.aob(b)};e.prototype.aob=function(b){b.Ck!==this.K.Ck&&(b.Ck?this.Fh.appendChild(this.Ln):this.Fh.removeChild(this.Ln));b.Mk!==this.K.Mk&&(b.Mk?this.Fh.appendChild(this.jo):this.Fh.removeChild(this.jo));if(b.contentWidth!==this.K.contentWidth||
b.contentHeight!==this.K.contentHeight||b.Ck!==this.K.Ck||b.Lc!==this.K.Lc||b.Cf!==this.K.Cf||b.au!==this.K.au||b.$t!==this.K.$t||b.ph!==this.K.ph||b.Wn!==this.K.Wn||b.Xn!==this.K.Xn||b.Mk!==this.K.Mk||b.Mc!==this.K.Mc){var c=b.Ck&&b.Mk,d=Math.round(b.Cf*100/b.contentWidth),f=Math.round(b.Lc*100/b.contentWidth),l=Math.round(b.Wg*100/b.contentHeight),p=Math.round(b.Mc*100/b.contentHeight);this.Ln.style.opacity=b.au.toString();this.Ln.style.left=b.Wn+"px";this.Ln.style.right=(c?b.ph:0)+b.Wn+"px";this.Ln.style.height=
b.ph+"px";this.Ln.style.bottom=b.Xn+"px";this.Ht.style.backgroundColor=b.$t;this.Ht.style.borderRadius=Math.floor(b.ph/2)+"px";this.Ht.style.left=f+"%";this.Ht.style.width=d+"%";this.Ht.style.height=b.ph+"px";this.jo.style.opacity=b.au.toString();this.jo.style.top=b.Xn+"px";this.jo.style.right=b.Wn+"px";this.jo.style.width=b.ph+"px";this.jo.style.bottom=(c?b.ph:0)+b.Xn+"px";this.qu.style.backgroundColor=b.$t;this.qu.style.borderRadius=Math.floor(b.ph/2)+"px";this.qu.style.top=p+"%";this.qu.style.width=
b.ph+"px";this.qu.style.height=l+"%"}};return e}(n)});
define("tdv/view/core/visuals/dom/DOMImageVisuals","require exports tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/ImageVisualProperties tdv/player/view/util/Device tdv/view/constants/Alignment".split(" "),function(a,m,h,n,g,k){return function(e){function b(){var c=e.call(this)||this;c.CA=null;return c}P(b,e);b.prototype.tp=function(){return new n};b.prototype.lA=function(){e.prototype.lA.call(this);this.uk(this.pLa())};b.prototype.pLa=function(){this.CA||(this.CA=document.createElement("div"),
this.CA.style.position="static",this.CA.style.overflow="hidden",this.CA.style.cursor="inherit");return this.CA};b.prototype.rh=function(c){e.prototype.rh.call(this,c);this.zsa(c)};b.prototype.zsa=function(c){if(c.image!==this.K.image&&(this.K.image&&this.K.image.parentElement===this.CA&&this.CA.removeChild(this.K.image),c.image)){var d=c.image;this.CA.appendChild(d);d.style.position="static";d.style.cursor="inherit";d.style.display="inline";d.style.verticalAlign="top";d.style.visibility="hidden";
d.style.pointerEvents="none";d.style.userSelect="none";d.style.visibility="inherit";d.style.webkitUserSelect="none";d.style.touchCallout="none";d.style.webkitTouchCallout="none";g.Tb()==g.Pp&&g.ub()&&(d.style.transform="translate3d(0,0,0)")}if(c.image!==this.K.image||c.contentWidth!==this.K.contentWidth||c.contentHeight!==this.K.contentHeight||c.width!==this.K.width||c.height!==this.K.height||c.Dd!==this.K.Dd||c.De!==this.K.De||c.ie!==this.K.ie||c.Ef!==this.K.Ef||c.borderTopLeftRadius!==this.K.borderTopLeftRadius||
c.borderTopRightRadius!==this.K.borderTopRightRadius||c.borderBottomRightRadius!==this.K.borderBottomRightRadius||c.borderBottomLeftRadius!==this.K.borderBottomLeftRadius||c.Ue!==this.K.Ue||c.yf!==this.K.yf||c.xf!==this.K.xf||c.Te!==this.K.Te||c.Yh!==this.K.Yh||c.verticalAlign!==this.K.verticalAlign){d=[Math.max(0,c.borderTopLeftRadius-Math.max(c.Ue,c.Te)),Math.max(0,c.borderTopRightRadius-Math.max(c.Ue,c.yf)),Math.max(0,c.borderBottomRightRadius-Math.max(c.xf,c.yf)),Math.max(0,c.borderBottomLeftRadius-
Math.max(c.xf,c.Te))];var f=c.width-c.Dd-c.De,l=c.height-c.ie-c.Ef,p=this.pLa();p.style.width=f+"px";p.style.height=l+"px";p.style.borderTopLeftRadius=d[0]+"px";p.style.borderTopRightRadius=d[1]+"px";p.style.borderBottomRightRadius=d[2]+"px";p.style.borderBottomLeftRadius=d[3]+"px";if(c.image){c.image.style.width=c.contentWidth+"px";c.image.style.height=c.contentHeight+"px";switch(c.Yh){case k.fb:c.image.style.marginLeft="0px";c.image.style.marginRight=f-c.contentWidth+"px";break;case k.Db:c.image.style.marginLeft=
f-c.contentWidth+"px";c.image.style.marginRight="0px";break;case k.$e:c.image.style.marginLeft=Math.floor((f-c.contentWidth)*.5)+"px",c.image.style.marginRight=Math.ceil((f-c.contentWidth)*.5)+"px"}switch(c.verticalAlign){case k.Tc:c.image.style.marginTop="0px";c.image.style.marginBottom=l-c.contentHeight+"px";break;case k.Hc:c.image.style.marginTop=l-c.contentHeight+"px";c.image.style.marginBottom="0px";break;case k.$d:c.image.style.marginTop=Math.floor((l-c.contentHeight)*.5)+"px",c.image.style.marginBottom=
Math.ceil((l-c.contentHeight)*.5)+"px"}}}};return b}(h)});
define("tdv/view/core/visuals/dom/DOMLabelVisuals","require exports tdv/player/view/util/Color tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/LabelVisualProperties tdv/view/constants/Alignment tdv/view/constants/Direction tdv/view/util/Font".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){var f=c.call(this)||this;f.qNa=0;f.pNa=0;f.span=null;return f}P(d,c);d.prototype.zJ=function(){var f=this.span.clientWidth,l=this.span.clientHeight;this.span.style.fontStyle===
"italic"&&(f+=l*1/5);return Math.round(f)};d.prototype.yJ=function(){return this.span.clientHeight};d.prototype.tp=function(){return new g};d.prototype.lA=function(){c.prototype.lA.call(this);this.uk(this.dgb())};d.prototype.dgb=function(){this.span||(this.span=document.createElement("span"),this.span.style.right="auto",this.span.style.bottom="auto",this.span.style.position="absolute",this.span.style.textAlign="center",this.span.style.cursor="inherit",this.span.style.whiteSpace="nowrap",this.span.style.transform=
"translate3d(0, 0, 0)");return this.span};d.prototype.rh=function(f){c.prototype.rh.call(this,f);this.Lsa(f)};d.prototype.Lsa=function(f){var l=!1;if(f.direction!==this.K.direction||f.text!==this.K.text){switch(f.direction){case e.Uk:this.span.style.lineHeight="100%";this.span.innerHTML=f.text.split("").join("<br/>");break;default:this.span.style.lineHeight="normal",this.span.textContent=f.text,this.span.innerHTML=this.span.innerHTML.split(" ").join("&nbsp;")}l=!0}f.fontFamily!==this.K.fontFamily&&
(this.span.style.fontFamily=b.rA(f.fontFamily||""),l=!0);f.fontSize!==this.K.fontSize&&(this.span.style.fontSize=f.fontSize!==void 0?f.fontSize+"px":"",l=!0);f.zt!==this.K.zt&&(this.span.style.color=f.zt||"",l=!0);f.fontWeight!==this.K.fontWeight&&(this.span.style.fontWeight=f.fontWeight,l=!0);f.fontStyle!==this.K.fontStyle&&(this.span.style.fontStyle=f.fontStyle,l=!0);f.textDecoration!==this.K.textDecoration&&(this.span.style.textDecoration=f.textDecoration,l=!0);var p=this.zJ(),q=this.yJ();if(l||
this.qNa!==p||this.pNa!==q||f.width!==this.K.width||f.height!==this.K.height||f.Dd!==this.K.Dd||f.De!==this.K.De||f.ie!==this.K.ie||f.Ef!==this.K.Ef||f.Yh!==this.K.Yh||f.verticalAlign!==this.K.verticalAlign){l=f.width-f.Dd-f.De;var r=f.height-f.ie-f.Ef;this.qNa=p;this.pNa=q;switch(f.Yh){case k.fb:this.span.style.left="0";break;case k.Db:this.span.style.left=l-p+"px";break;case k.$e:this.span.style.left=Math.max(0,Math.round((l-p)*.5))+"px"}switch(f.verticalAlign){case k.Tc:this.span.style.top="0";
break;case k.Hc:this.span.style.top=r-q+"px";break;case k.$d:this.span.style.top=Math.max(0,Math.round((r-q)*.5))+"px"}}if(f.lu!==this.K.lu||f.mu!==this.K.mu||f.fo!==this.K.fo||f.bx!==this.K.bx||f.eF!==this.K.eF)this.span.style.textShadow=[f.lu+"px",f.mu+"px",f.fo+"px",h.gF(f.eF,f.bx)].join(" ")};return d}(n)});
define("tdv/view/core/visuals/dom/DOMHTMLVisuals",["require","exports","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/HTMLVisualProperties"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.tp=function(){return new n};k.prototype.rh=function(e){g.prototype.rh.call(this,e);this.ysa(e)};k.prototype.ysa=function(e){if(e.td!==this.K.td&&(this.K.td&&this.a$(this.K.td),e.td)){var b=e.td;b.style.position="absolute";b.style.left="0";b.style.top=
"0";this.uk(e.td)}};k.prototype.uoa=function(){return this.K&&this.K.td?this.K.td.clientWidth:0};k.prototype.toa=function(){return this.K&&this.K.td?this.K.td.clientHeight:0};return k}(h)});define("tdv/view/core/visuals/VisualsType",["require","exports"],function(){return{DOM:"DOM",uUa:"Canvas"}});
define("tdv/view/core/visuals/dom/DOMVisualsFactory","require exports tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visuals/dom/DOMCanvasVisuals tdv/view/core/visuals/dom/DOMContainerVisuals tdv/view/core/visuals/dom/DOMImageVisuals tdv/view/core/visuals/dom/DOMLabelVisuals tdv/view/core/visuals/dom/DOMHTMLVisuals tdv/view/canvas/Canvas tdv/view/core/UIComponent tdv/view/containers/Container tdv/view/images/Image tdv/view/html/HTML tdv/view/text/Label tdv/view/core/visuals/VisualsType".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r){return function(){function t(){}t.prototype.create=function(u){if(u instanceof p)return new b;if(u instanceof c)return new n;if(u instanceof l)return new k;if(u instanceof q)return new e;if(u instanceof f)return new g;if(u instanceof d)return new h;throw Error("Invalid UI instance");};t.prototype.getType=function(){return r.DOM};t.vJ=function(){t.Qo||(t.Qo=new t);return t.Qo};return t}()});
define("tdv/view/events/GestureEvent",["require","exports","tdv/events/Event"],function(a,m,h){return function(n){function g(k,e,b,c,d,f,l,p){k=n.call(this,k)||this;k.scale=typeof e==="number"?e:1;k.rotation=typeof b==="number"?b:0;k.x=c||0;k.y=d||0;k.pageX=f||0;k.pageY=l||0;k.touches=p||[];return k}P(g,n);return g}(h)});
define("tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","require exports tdv/utils tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/events/GestureEvent tdv/view/events/MouseEvent tdv/view/util/UserInitiatedAction".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(){function p(q){this.Z0=[];this.KAa=0;this.h0a=500;this.ne=1;this.jl=0;this.component=q;this.az=!1;this.rT=this.rT.bind(this);this.tT=this.tT.bind(this);this.vT=this.vT.bind(this);this.Vha=
this.Vha.bind(this);this.RV=this.RV.bind(this);this.QV=this.QV.bind(this);this.DD=this.DD.bind(this)}p.prototype.Qhb=function(){return g.Jp()};p.prototype.qRa=function(q){this.MS!==q&&((this.MS=q)?this.UG():this.NG(),this.Vva())};p.prototype.sLa=function(){return this.MS||!1};p.prototype.wa=function(){return this.component.wa()};p.prototype.pGa=function(q,r){this.component.o(new b(n.Sa,q.x,q.y,q.pageX,q.pageY,void 0,void 0,r))};p.prototype.qGa=function(q,r){this.component.o(new b(n.gb,q.x,q.y,q.pageX,
q.pageY,void 0,void 0,r))};p.prototype.rGa=function(q,r){this.component.o(new b(n.$a,q.x,q.y,q.pageX,q.pageY,void 0,void 0,r))};p.prototype.S$a=function(q,r,t){this.component.o(new b(n.Qk,q.x,q.y,q.pageX,q.pageY,r.delta,r.mA,t))};p.prototype.mGa=function(q){this.component.o(new b(n.ma,q.x,q.y,q.pageX,q.pageY))};p.prototype.nGa=function(q){this.component.o(new b(n.fi,q.x,q.y,q.pageX,q.pageY))};p.prototype.R$a=function(q,r,t){this.component.o(new e(n.HB,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.N$a=
function(q,r,t){this.component.o(new e(n.Nba,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.O$a=function(q,r,t){this.component.o(new e(n.YK,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.P$a=function(q){this.component.o(new e(n.cVa,void 0,q))};p.prototype.Q$a=function(q){this.component.o(new e(n.ZK,q))};p.prototype.um=function(){var q=this.component.getParent();if(q)return q.qLa()};p.prototype.RV=function(q){q.stopImmediatePropagation();this.afa(["touchend"]);this.Wza(q)?this.LDa(q):this.SDa(q,
!0)};p.prototype.SDa=function(q,r){var t,u=this.iH(q);r&&this.F$a(u);this.pGa(u,q);(t=this.um())===null||t===void 0||t.SDa(q,r&&this.component.get("propagateClick"))};p.prototype.QV=function(q){q.preventDefault();q.stopImmediatePropagation();this.Wza(q)?this.JDa(q):this.RDa(q)};p.prototype.RDa=function(q){var r,t=this.iH(q);this.E$a(t);this.qGa(t,q);(r=this.um())===null||r===void 0||r.RDa(q)};p.prototype.Kfa=function(q,r){var t=q.pageX-r.pageX;q=q.pageY-r.pageY;return Math.sqrt(t*t+q*q)};p.prototype.DD=
function(q,r){this.Eea(["touchend"]);r!==!1&&q.preventDefault();q.stopImmediatePropagation();this.tN?this.KDa(q):(r=this.iH(q),this.QDa(q,this.Vza(r)),this.Kza(r));this.tN=void 0;this.Vva()};p.prototype.QDa=function(q,r){var t,u=this.iH(q);this.rGa(u,q);this.D$a(r);(t=this.um())===null||t===void 0||t.QDa(q,r)};p.prototype.F$a=function(q){this.component.bind(n.Eb,this.fGa,this,!0);this.EI=q};p.prototype.E$a=function(q){if(this.EI){q=this.Kfa(this.EI,q);if(g.ub()){var r=this.component.Xb();r=Math.min(r.nb(),
r.Mb())*.01*p.UWa}else r=p.bXa;q>r&&this.K5()}};p.prototype.D$a=function(q){this.EI&&(this.mGa(this.EI),q&&this.nGa(this.EI),this.K5())};p.prototype.K5=function(){this.EI&&(this.component.h(n.Eb,this.fGa,this),this.EI=void 0)};p.prototype.fGa=function(){this.K5()};p.prototype.LDa=function(q){var r,t=this.Rfa(q);this.tN=t;this.R$a(t.scale,t.rotation,t.coordinates);(r=this.um())===null||r===void 0||r.LDa(q)};p.prototype.JDa=function(q){var r,t=this.Rfa(q,this.tN),u=t.rotation-this.tN.rotation,v=t.scale/
this.tN.scale;this.tN=t;this.ne*=v;for(this.jl+=u;this.jl>180;)this.jl-=360;for(;this.jl<-180;)this.jl+=360;this.N$a(this.ne,this.jl,t.coordinates);u!=0&&this.P$a(this.jl);v!=1&&this.Q$a(this.ne);this.K5();(r=this.um())===null||r===void 0||r.JDa(q)};p.prototype.KDa=function(q){var r,t=this.Rfa(q);this.O$a(this.ne,this.jl,t.coordinates);(r=this.um())===null||r===void 0||r.KDa(q)};p.prototype.rT=function(q){this.az=!!(q.buttons&1);this.afa(["mouseup"]);q.stopImmediatePropagation();this.MDa(q,!0);f&&
this.component.log(q.ctrlKey)};p.prototype.MDa=function(q,r){var t,u=this.gH(q);r&&this.HZa(u);this.pGa(u,q);(t=this.um())===null||t===void 0||t.MDa(q,r&&this.component.get("propagateClick"))};p.prototype.tT=function(q){q.preventDefault();q.stopImmediatePropagation();this.component.Xb().PE(this.component);this.NDa(q);!this.az||q.buttons&1||this.vT(q)};p.prototype.NDa=function(q){var r,t=this.gH(q);this.GZa(t);this.qGa(t,q);(r=this.um())===null||r===void 0||r.NDa(q)};p.prototype.vT=function(q){this.az=
!1;this.Eea(["mouseup"]);q.preventDefault();q.stopImmediatePropagation();var r=this.gH(q);this.ODa(q,this.Vza(r));this.Kza(r)};p.prototype.ODa=function(q,r){var t,u=this.gH(q);this.rGa(u);this.FZa(r);(t=this.um())===null||t===void 0||t.ODa(q,r)};p.prototype.HZa=function(q){this.component.bind(n.Eb,this.Qwa,this,!0);this.JG=q};p.prototype.GZa=function(q){this.JG&&this.Kfa(this.JG,q)>p.LWa&&this.Pda()};p.prototype.FZa=function(q){this.JG&&(this.mGa(this.JG),q&&this.nGa(this.JG),this.Pda())};p.prototype.Pda=
function(){this.JG&&(this.component.h(n.Eb,this.Qwa,this),this.JG=void 0)};p.prototype.Qwa=function(){this.Pda()};p.prototype.Wza=function(q){if((q=this.Ofa(q))&&q.length>1)for(var r=0,t=0;t<q.length;t++)if(this.M3a(q[t].target)&&(r++,r>1))return!0;return!1};p.prototype.M3a=function(q){for(var r=this.wa().cc();q;){if(q==r)return!0;q=q.parentNode}return!1};p.prototype.zwa=function(){return!1};p.prototype.Vha=function(q){this.component.Xb().Uha&&(q.preventDefault(),q.stopImmediatePropagation(),this.PDa(q))};
p.prototype.PDa=function(q){var r,t=this.gH(q),u=this.h2a(q);this.zwa(u)||(r=this.um())===null||r===void 0||r.PDa(q);this.S$a(t,u,q)};p.prototype.gH=function(q){return this.Aya(q.pageX,q.pageY)};p.prototype.h2a=function(q){var r={};r.delta=Math.max(-1,Math.min(1,-q.deltaY));r.mA=r.delta;return r};p.prototype.Aya=function(q,r){var t,u=h.offset(this.wa().cc()),v=((t=this.component.Xb())===null||t===void 0?void 0:t.fD)||1;t={};t.x=(q-u.left)/v;t.y=(r-u.top)/v;t.pageX=q/v;t.pageY=r/v;t.AE=q;t.BE=r;return t};
p.prototype.Rfa=function(q,r){var t=this.iH(q);return r?(q=this.Lya(q),{coordinates:t,scale:r.scale*q/r.touchesDistance,rotation:0,touchesDistance:q}):{coordinates:t,scale:1,rotation:0,touchesDistance:this.Lya(q)}};p.prototype.iH=function(q){var r=this.Ofa(q);if(r.length==0)var t=this.J6a;else t={x:0,y:0,pageX:0,pageY:0,AE:0,BE:0,touches:[]},Array.from(r).forEach(function(u){u||(u=r[0]);u=this.Aya(u.pageX,u.pageY);t.x+=u.x;t.y+=u.y;t.pageX+=u.pageX;t.pageY+=u.pageY;t.AE+=u.AE;t.BE+=u.BE;t.touches.push(u)}.bind(this)),
t.x/=r.length,t.y/=r.length,t.pageX/=r.length,t.pageY/=r.length,t.AE/=r.length,t.BE/=r.length;return this.J6a=t};p.prototype.Ofa=function(q){return q.touches||q.targetTouches||q.changedTouches};p.prototype.Lya=function(q){var r=this.Ofa(q);return r&&r.length>1?(q=Math.abs(r[0].pageX-r[1].pageX),r=Math.abs(r[0].pageY-r[1].pageY),Math.sqrt(q*q+r*r)):0};p.prototype.Vva=function(){this.wa().cc().style["pointer-events"]=this.hza()};p.prototype.hza=function(){return this.MS?"auto":"none"};p.prototype.UG=
function(){this.afa(d)};p.prototype.NG=function(){this.Eea(d)};p.prototype.afa=function(q){l.includes(this.component)||l.push(this.component);this.Z0=h.union(this.Z0,q);q=this.Kya(q);for(var r=0;r<q.length;r++){var t=q[r];t.target.addEventListener(t.name,t.handler)}};p.prototype.Eea=function(q){l.includes(this.component)&&l.splice(l.indexOf(this.component),1);this.Z0=h.difference(this.Z0,q);q=this.Kya(q);for(var r=0;r<q.length;r++){var t=q[r];t.target.removeEventListener(t.name,t.handler)}};p.prototype.Kya=
function(q){this.aya||(this.aya=this.L1a());for(var r=[],t=0;t<q.length;t++)r=r.concat(this.aya[q[t]]);return r};p.prototype.L1a=function(){var q=this.wa().cc();return{touchstart:[{target:q,name:"touchstart",handler:c.Br(this.RV)}],touchmove:[{target:q,name:"touchmove",handler:c.Br(this.QV)}],touchend:[{target:q,name:"touchend",handler:c.Br(this.DD,!0)},{target:document,name:"touchend",handler:c.Br(this.DD,!0)},{target:q,name:"touchcancel",handler:c.Br(this.DD,!0)},{target:document,name:"touchcancel",
handler:c.Br(this.DD,!0)}],mousedown:[{target:q,name:"mousedown",handler:c.Br(this.rT)}],mousemove:[{target:q,name:"mousemove",handler:c.Br(this.tT)}],mouseup:[{target:q,name:"mouseup",handler:c.Br(this.vT,!0)},{target:window,name:"mouseup",handler:c.Br(this.vT,!0)}],mousewheel:[{target:q,name:"wheel",handler:c.Br(this.Vha)}]}};p.prototype.Kza=function(q){this.KAa=(new Date).getTime();this.JAa=q};p.prototype.Vza=function(q){if((new Date).getTime()-this.KAa>this.h0a||!this.JAa)return!1;q=this.Kfa(this.JAa,
q);if(g.ub()){var r=this.component.Xb();r=Math.min(r.nb(),r.Mb())*.01*p.TWa}else r=p.MWa;return q>r?!1:!0};p.bXa=10;p.UWa=5;p.LWa=10;p.TWa=10;p.MWa=10;return p}();var d=function(){var p=[];p=p.concat(["touchstart","touchmove"]);g.Nd()!=g.vj&&(p=p.concat(["mousedown","mousemove","mousewheel"]));return p}(),f=k.Tg("debug"),l=window.enabledComponents=[];return a});
define("tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","tdv/player/view/util/Device"],function(a,m,h,n,g){return function(k){function e(b){var c=k.call(this,b)||this;c.component=b;c.jy=0;c.ky=0;c.upb=void 0;c.vpb=void 0;c.Ywa=0;c.Xda=void 0;c.Yda=void 0;c.Zda=0;c.$da=0;c.hn=!1;c.jn=!1;c.EC=c.EC.bind(c);c.ID=c.ID.bind(c);c.Wna();return c}P(e,k);e.prototype.Wna=
function(){this.wa().L7().addEventListener("mousedown",this.EC,!1);this.wa().L7().addEventListener("touchstart",this.EC,!1);this.wa().a8().addEventListener("mousedown",this.ID,!1);this.wa().a8().addEventListener("touchstart",this.ID,!1);this.Qhb()?this.component.bind(h.Sa,this.Zwa,this,!1):(this.component.bind(h.Sa,this.PZa,this,!1),this.component.bind(h.uc,this.Vda,this,!1),this.component.bind(h.Eb,this.Uda,this,!1),this.component.bind(h.Qk,this.QZa,this,!1))};e.prototype.wa=function(){return this.component.wa()};
e.prototype.EC=function(){this.component.Ww(!0);this.hn=!0};e.prototype.ID=function(){this.component.Xw(!0);this.jn=!0};e.prototype.Vda=function(){this.component.$E(!0)};e.prototype.Uda=function(){this.component.$E(!1)};e.prototype.PZa=function(b){this.component.hn||this.component.jn?(this.component.Xb().bind(h.gb,this.Wwa,this,!1),this.component.Xb().bind(h.$a,this.Xwa,this,!1),this.jy=b.pageX,this.ky=b.pageY):this.Zwa(b)};e.prototype.Wwa=function(b){var c=0,d=0;this.hn&&(c=(b.pageX-this.jy)/this.wa().Ln.clientWidth);
this.jn&&(d=(b.pageY-this.ky)/this.wa().jo.clientHeight);this.jy=b.pageX;this.ky=b.pageY;c==0&&d==0||this.component.KP(c,d,"content")};e.prototype.Xwa=function(){this.component.Xb().h(h.gb,this.Wwa,this);this.component.Xb().h(h.$a,this.Xwa,this);this.component.Ww(!1);this.component.Xw(!1);this.jn=this.hn=!1};e.prototype.zwa=function(b){return b.delta>0&&this.component.LO()||b.delta<0&&this.component.JO()?!0:!1};e.prototype.QZa=function(b){b=(g.Nd()==g.r_?b.mA*.1:b.delta)*.3;this.component.KP(0,-b,
"page")};e.prototype.Zwa=function(b){if(this.component.KO()||this.component.MO())this.component.Xb().bind(h.gb,this.$wa,this,!1),this.component.Xb().bind(h.$a,this.axa,this,!1),this.component.$E(!0),this.jy=b.pageX,this.ky=b.pageY,this.p3a()};e.prototype.$wa=function(b){var c=b.pageX-this.jy,d=b.pageY-this.ky;!this.hn&&!this.jn&&c*c+d*d>25&&(this.hn=this.component.KO(),this.jn=this.component.MO(),this.component.Ww(this.hn),this.component.Xw(this.jn));if(this.hn||this.jn)this.component.KP(this.hn?
-c:0,this.jn?-d:0),this.jy=b.pageX,this.ky=b.pageY,this.rab()};e.prototype.axa=function(){this.component.Xb().h(h.gb,this.$wa,this);this.component.Xb().h(h.$a,this.axa,this);this.component.$E(!1);var b=Math.max(Math.abs(this.Zda/.001),Math.abs(this.$da/.001));this.component.lIa(-.5*this.Zda*b,-.5*this.$da*b,b)};e.prototype.p3a=function(){this.Xda=this.jy;this.Yda=this.ky};e.prototype.rab=function(){var b=(new Date).getTime(),c=b-this.Ywa;c>10&&(this.Ywa=b,this.Zda=(this.jy-this.Xda)/c,this.$da=(this.ky-
this.Yda)/c,this.Xda=this.jy,this.Yda=this.ky)};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/CloseButtonMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,m,h,n,g){return function(k){function e(b){b=k.call(this,b)||this;b.cz=b.cz.bind(b);return b}P(e,k);e.prototype.UG=function(){k.prototype.UG.call(this);g.Sma(this.cz)};e.prototype.NG=function(){k.prototype.NG.call(this);g.Jqa(this.cz)};e.prototype.cz=
function(){this.component.o(h.ma)};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/DropDownMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,m,h,n,g){return function(k){function e(b){b=k.call(this,b)||this;b.component.pk.bind(h.od,b.G5a,b,!1);b.component.pk.bind(h.jd,b.F5a,b,!0);b.component.bind(h.CB,b.UM,b,!0);b.cz=b.cz.bind(b);return b}P(e,k);e.prototype.G5a=function(){g.iIa(this,[this.component.je.wa().cc()].concat(this.component.pk.zLa().map(function(b){return b.wa().cc()})));
g.Sma(this.cz)};e.prototype.F5a=function(){g.Jqa(this.cz);g.Iqa(this)};e.prototype.UM=function(){g.vhb([this.component.je.wa().cc()].concat(this.component.pk.zLa().map(function(b){return b.wa().cc()})))&&this.component.je.wa().cc().focus()};e.prototype.cz=function(){this.component.close()};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/HTMLMouseTouchEventManager",["require","exports","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager"],function(a,m,h){return function(n){function g(){return n!==null&&n.apply(this,arguments)||this}P(g,n);g.prototype.DD=function(k,e){for(e=k.target;e&&e.tagName!="A"&&e.tagName!="BUTTON";)e=e.parentElement;e=!e;n.prototype.DD.call(this,k,e)};return g}(h)});
define("tdv/view/core/eventmanager/mousetouch/IconButtonMouseTouchEventManager",["require","exports","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","tdv/view/constants/Cursor"],function(a,m,h,n){return function(g){function k(e){var b=g.call(this,e)||this;b.QV=function(c){var d=b.iH(c);b.C8(d)?g.prototype.QV.call(b,c):b.kya(d,c)};b.rT=function(c){var d=b.gH(c);b.C8(d)?g.prototype.rT.call(b,c):b.kya(d,c)};b.vfa=!1;b.Nza=!1;return b}P(k,g);k.prototype.rRa=function(e){this.Nza=e};k.prototype.wa=
function(){return this.component.wa()};k.prototype.RV=function(e){var b=this.iH(e);this.C8(b)?g.prototype.RV.call(this,e):this.f1a(b,e)};k.prototype.tT=function(e){var b=this.gH(e);if(this.C8(b)||this.vfa)g.prototype.tT.call(this,e),this.component.K9();else{this.vfa=!0;if(b=this.Pfa(b))b.dispatchEvent(this.Rwa(e)),e.preventDefault(),e.stopImmediatePropagation();this.Iya(b)=="pointer"?this.component.K9(n.qf):this.component.K9(n.Ee);this.vfa=!1}};k.prototype.C8=function(e){return this.Nza||this.component.Chb(e)};
k.prototype.kya=function(e,b){if(e=this.Pfa(e))e.dispatchEvent(this.Rwa(b)),b.preventDefault(),b.stopImmediatePropagation()};k.prototype.f1a=function(e,b){if(e=this.Pfa(e))e.dispatchEvent(this.JZa(b)),b.preventDefault(),b.stopImmediatePropagation()};k.prototype.Pfa=function(e){var b=this;this.wa().cc().style.pointerEvents="none";e=document.elementFromPoint(e.AE,e.BE);setTimeout(function(){b.wa().cc().style.pointerEvents=b.hza()},0);return e};k.prototype.Rwa=function(e){return new MouseEvent(e.type,
e)};k.prototype.JZa=function(e){return new TouchEvent(e.type,e)};k.prototype.Iya=function(e){if(e){var b=e.style.cursor;b=="inherit"&&(b=this.Iya(e.parentElement))}else b="default";return b};return k}(h)});
define("tdv/view/core/eventmanager/mousetouch/ThumbnailListMouseTouchEventManager","require exports tdv/constants/EventName tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager tdv/view/util/KeyboardControl tdv/view/constants/LayoutMode".split(" "),function(a,m,h,n,g,k){return function(e){function b(c){c=e.call(this,c)||this;c.component.bind(h.L("layout"),c.via,c,!1);c.component.bind(h.L("items"),c.tia,c,!1);return c}P(b,e);b.prototype.UG=function(){e.prototype.UG.call(this);
this.Vz()};b.prototype.NG=function(){e.prototype.NG.call(this);this.Vz()};b.prototype.via=function(){this.Vz()};b.prototype.tia=function(){this.Vz()};b.prototype.Vz=function(){this.MS?this.component.get("layout")==k.Ni?g.Xbb(this,this.component.Cb().map(function(c){return c.wa().cc()})):g.iIa(this,this.component.Cb().map(function(c){return c.wa().cc()})):g.Iqa(this)};return b}(n)});
define("tdv/view/core/eventmanager/mousetouch/ThumbnailGridMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,m,h,n,g){return function(k){function e(b){b=k.call(this,b)||this;b.component.bind(h.L("layout"),b.via,b,!1);b.component.bind(h.L("items"),b.tia,b,!1);return b}P(e,k);e.prototype.UG=function(){k.prototype.UG.call(this);this.Vz()};e.prototype.NG=function(){k.prototype.NG.call(this);
this.Vz()};e.prototype.via=function(){this.Vz()};e.prototype.tia=function(){this.Vz()};e.prototype.Vz=function(){this.MS?g.Ubb(this,this.component.Cb().map(function(b){return b.wa().cc()}),this.component.an.qEa,this.component.an.Twa):g.Iqa(this)};return e}(n)});
define("tdv/view/list/thumblist/ThumbnailListItem","require exports tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/constants/Position tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/containers/Container tdv/view/images/Image tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){return function(t){function u(){var v=t.call(this)||
this;v.Hf=null;v.Za=null;v.EG=[];v.set("ariaRole","option");v.set("autoRolledOver",!0);v.set("childrenInteractionEnabled",!1);v.set("contentOpaque",!0);v.set("creationPolicy",e.cL);v.set("cursor",b.qf);return v}P(u,t);u.prototype.Pb=function(){t.prototype.Pb.call(this);this.m("listLayout");this.m("overflow","hidden");this.m("item");this.m("thumbnailUrlFunction",this.Aea);this.m("sourceProperties");this.m("labelFunction",this.yea);this.m("labelFontFamily");this.m("labelFontColor");this.m("labelFontSize");
this.m("labelFontStyle");this.m("labelFontWeight");this.m("labelGap");this.m("labelHorizontalAlign");this.m("labelPosition");this.m("labelTextDecoration");this.m("labelTextShadowColor");this.m("labelTextShadowHorizontalLength");this.m("labelTextShadowVerticalLength");this.m("labelTextShadowBlurRadius");this.m("labelTextShadowOpacity");this.m("thumbnailBorderRadius");this.m("thumbnailOpacity");this.m("thumbnailBorderSize");this.m("thumbnailBorderColor");this.m("thumbnailWidth");this.m("thumbnailHeight");
this.m("thumbnailMaxWidth");this.m("thumbnailMaxHeight");this.m("thumbnailShadow");this.m("thumbnailShadowHorizontalLength");this.m("thumbnailShadowVerticalLength");this.m("thumbnailShadowBlurRadius");this.m("thumbnailShadowSpread");this.m("thumbnailShadowColor");this.m("thumbnailShadowOpacity");this.D("rollOverBackgroundOpacity",l.ea,"backgroundOpacity");this.D("rollOverBackgroundBlur",l.ea,"backgroundBlur");this.D("rollOverBackgroundColor",l.ea,"backgroundColor");this.D("rollOverBackgroundColorRatios",
l.ea,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",l.ea,"backgroundColorDirection");this.D("rollOverBorderRadius",l.ea,"borderRadius");this.D("rollOverBorderTopRadius",l.ea,"borderTopRadius");this.D("rollOverBorderBottomRadius",l.ea,"borderBottomRadius");this.D("rollOverBorderLeftRadius",l.ea,"borderLeftRadius");this.D("rollOverBorderRightRadius",l.ea,"borderRightRadius");this.D("rollOverBorderTopLeftRadius",l.ea,"borderTopLeftRadius");this.D("rollOverBorderTopRightRadius",l.ea,
"borderTopRightRadius");this.D("rollOverBorderBottomLeftRadius",l.ea,"borderBottomLeftRadius");this.D("rollOverBorderBottomRightRadius",l.ea,"borderBottomRightRadius");this.D("rollOverBorderSize",l.ea,"borderSize");this.D("rollOverBorderLeftSize",l.ea,"borderLeftSize");this.D("rollOverBorderTopSize",l.ea,"borderTopSize");this.D("rollOverBorderRightSize",l.ea,"borderRightSize");this.D("rollOverBorderBottomSize",l.ea,"borderBottomSize");this.D("rollOverBorderColor",l.ea,"borderColor");this.D("rollOverBorderLeftColor",
l.ea,"borderLeftColor");this.D("rollOverBorderTopColor",l.ea,"borderTopColor");this.D("rollOverBorderRightColor",l.ea,"borderRightColor");this.D("rollOverBorderBottomColor",l.ea,"borderBottomColor");this.D("rollOverLabelFontColor",l.ea,"labelFontColor");this.D("rollOverLabelFontSize",l.ea,"labelFontSize");this.D("rollOverLabelFontStyle",l.ea,"labelFontStyle");this.D("rollOverLabelFontWeight",l.ea,"labelFontWeight");this.D("rollOverLabelTextDecoration",l.ea,"labelTextDecoration");this.D("rollOverLabelTextShadowColor",
l.ea,"labelTextShadowColor");this.D("rollOverLabelTextShadowHorizontalLength",l.ea,"labelTextShadowHorizontalLength");this.D("rollOverLabelTextShadowVerticalLength",l.ea,"labelTextShadowVerticalLength");this.D("rollOverLabelTextShadowBlurRadius",l.ea,"labelTextShadowBlurRadius");this.D("rollOverLabelTextShadowOpacity",l.ea,"labelTextShadowOpacity");this.D("rollOverOpacity",l.ea,"opacity");this.D("rollOverPaddingLeft",l.ea,"paddingLeft");this.D("rollOverPaddingTop",l.ea,"paddingTop");this.D("rollOverPaddingRight",
l.ea,"paddingRight");this.D("rollOverPaddingBottom",l.ea,"paddingBottom");this.D("rollOverShadow",l.ea,"shadow");this.D("rollOverThumbnailOpacity",l.ea,"thumbnailOpacity");this.D("rollOverThumbnailBorderSize",l.ea,"thumbnailBorderSize");this.D("rollOverThumbnailBorderColor",l.ea,"thumbnailBorderColor");this.D("rollOverThumbnailShadow",l.ea,"thumbnailShadow");this.D("rollOverThumbnailShadowHorizontalLength",l.ea,"thumbnailShadowHorizontalLength");this.D("rollOverThumbnailShadowVerticalLength",l.ea,
"thumbnailShadowVerticalLength");this.D("rollOverThumbnailShadowBlurRadius",l.ea,"thumbnailShadowBlurRadius");this.D("rollOverThumbnailShadowSpread",l.ea,"thumbnailShadowSpread");this.D("rollOverThumbnailShadowColor",l.ea,"thumbnailShadowColor");this.D("rollOverThumbnailShadowOpacity",l.ea,"thumbnailShadowOpacity");this.D("selectedBackgroundOpacity",l.oa,"backgroundOpacity");this.D("selectedBackgroundBlur",l.oa,"backgroundBlur");this.D("selectedBackgroundColor",l.oa,"backgroundColor");this.D("selectedBackgroundColorRatios",
l.oa,"backgroundColorRatios");this.D("selectedBackgroundColorDirection",l.oa,"backgroundColorDirection");this.D("selectedBorderRadius",l.oa,"borderRadius");this.D("selectedBorderTopRadius",l.oa,"borderTopRadius");this.D("selectedBorderBottomRadius",l.oa,"borderBottomRadius");this.D("selectedBorderLeftRadius",l.oa,"borderLeftRadius");this.D("selectedBorderRightRadius",l.oa,"borderRightRadius");this.D("selectedBorderTopLeftRadius",l.oa,"borderTopLeftRadius");this.D("selectedBorderTopRightRadius",l.oa,
"borderTopRightRadius");this.D("selectedBorderBottomLeftRadius",l.oa,"borderBottomLeftRadius");this.D("selectedBorderBottomRightRadius",l.oa,"borderBottomRightRadius");this.D("selectedBorderSize",l.oa,"borderSize");this.D("selectedBorderLeftSize",l.oa,"borderLeftSize");this.D("selectedBorderTopSize",l.oa,"borderTopSize");this.D("selectedBorderRightSize",l.oa,"borderRightSize");this.D("selectedBorderBottomSize",l.oa,"borderBottomSize");this.D("selectedBorderColor",l.oa,"borderColor");this.D("selectedBorderLeftColor",
l.oa,"borderLeftColor");this.D("selectedBorderTopColor",l.oa,"borderTopColor");this.D("selectedBorderRightColor",l.oa,"borderRightColor");this.D("selectedBorderBottomColor",l.oa,"borderBottomColor");this.D("selectedLabelFontColor",l.oa,"labelFontColor");this.D("selectedLabelFontSize",l.oa,"labelFontSize");this.D("selectedLabelFontStyle",l.oa,"labelFontStyle");this.D("selectedLabelFontWeight",l.oa,"labelFontWeight");this.D("selectedLabelTextDecoration",l.oa,"labelTextDecoration");this.D("selectedLabelTextShadowColor",
l.oa,"labelTextShadowColor");this.D("selectedLabelTextShadowHorizontalLength",l.oa,"labelTextShadowHorizontalLength");this.D("selectedLabelTextShadowVerticalLength",l.oa,"labelTextShadowVerticalLength");this.D("selectedLabelTextShadowBlurRadius",l.oa,"labelTextShadowBlurRadius");this.D("selectedLabelTextShadowOpacity",l.oa,"labelTextShadowOpacity");this.D("selectedOpacity",l.oa,"opacity");this.D("selectedPaddingLeft",l.oa,"paddingLeft");this.D("selectedPaddingTop",l.oa,"paddingTop");this.D("selectedPaddingRight",
l.oa,"paddingRight");this.D("selectedPaddingBottom",l.oa,"paddingBottom");this.D("selectedShadow",l.oa,"shadow");this.D("selectedThumbnailOpacity",l.oa,"thumbnailOpacity");this.D("selectedThumbnailBorderSize",l.oa,"thumbnailBorderSize");this.D("selectedThumbnailBorderColor",l.oa,"thumbnailBorderColor");this.D("selectedThumbnailShadow",l.oa,"thumbnailShadow");this.D("selectedThumbnailShadowHorizontalLength",l.oa,"thumbnailShadowHorizontalLength");this.D("selectedThumbnailShadowVerticalLength",l.oa,
"thumbnailShadowVerticalLength");this.D("selectedThumbnailShadowBlurRadius",l.oa,"thumbnailShadowBlurRadius");this.D("selectedThumbnailShadowSpread",l.oa,"thumbnailShadowSpread");this.D("selectedThumbnailShadowColor",l.oa,"thumbnailShadowColor");this.D("selectedThumbnailShadowOpacity",l.oa,"thumbnailShadowOpacity")};u.prototype.qZ=function(v){this.lV(v)};u.prototype.Kb=function(){t.prototype.Kb.call(this);this.Hf||(this.Hf=new q,this.mb(this.Hf),this.Hf.set("horizontalAlign",k.$e),this.Hf.set("verticalAlign",
k.$d),this.Hf.bind(g.ia,this.kla,this,!1));this.Za||(this.Za=new r,this.mb(this.Za))};u.prototype.Aea=function(v){if(h.FA(v))return v;if(v&&v.osa)return v.osa};u.prototype.yea=function(v){if(v&&v.label)return v.label};u.prototype.Vx=function(){return this.Za&&this.Za.get("text")||t.prototype.Vx.call(this)};u.prototype.jb=function(){if(this.S("sourceProperties")||this.S("item")){for(;this.EG.length;)this.EG.pop().jF();var v=this.G("sourceProperties"),w=this.G("item");v&&w&&v.forEach(function(y){this.EG.push(n.jx(w,
y,this.Eia,this,!0))}.bind(this))}if(this.S("sourceProperties")||this.S("item")||this.S("tooltipFunction"))v=this.G("item"),v=this.G("tooltipFunction")(v),this.set("toolTip",v);if(this.S("sourceProperties")||this.S("item")||this.S("thumbnailUrlFunction"))v=this.G("item"),(v=this.G("thumbnailUrlFunction")(v))?this.Hf.get("url")!=v&&this.Hf.xa({url:v,visible:!0,opacity:.5}):this.Hf.xa({url:void 0,visible:!1}),this.$("thumbnailUrlFunction");if(this.S("sourceProperties")||this.S("item")||this.S("labelFunction"))v=
this.G("item"),v=this.G("labelFunction")(v),this.Za.xa({text:v,visible:v?!0:!1}),this.$("labelFunction");this.$("sourceProperties");this.$("item");if(this.S("listLayout"))switch(this.G("listLayout")){case c.Uk:this.xa({width:"100%",height:void 0});break;default:this.xa({height:"100%",width:void 0})}if(this.S("labelPosition")||this.S("listLayout")||this.S("thumbnailWidth")||this.S("thumbnailHeight")){var x=this;v=function(y,z){y=x.G(y);y===void 0&&(y=z);return y};switch(this.G("labelPosition")){case d.fb:case d.Db:this.set("layout",
c.Ni);this.Za.set("width","100%");switch(this.G("listLayout")){case c.Uk:this.Hf.xa({height:v("thumbnailHeight"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Pk)});break;default:this.Hf.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Pk)})}break;default:switch(this.set("layout",c.Uk),this.Za.set("width",void 0),this.G("listLayout")){case c.Uk:this.Hf.xa({height:v("thumbnailHeight"),width:v("thumbnailWidth","100%"),scaleMode:v("thumbnailScaleMode",
f.Tp)});break;default:this.Hf.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Pk)})}}switch(this.G("labelPosition")){case d.fb:case d.Tc:this.rr(this.Za,0);break;default:this.rr(this.Za,1)}this.$("labelPosition")}this.$("listLayout");this.Pc(u.zca,u.kR,[this],!0,!0);this.Pc(u.Bca,u.kR,[this.Hf],!0,!0);this.Pc(u.Aca,u.kR,[this.Za],!0,!0);t.prototype.jb.call(this)};u.prototype.Eia=function(){this.yD("item")};u.prototype.uI=function(v){t.prototype.uI.call(this,
v)};u.prototype.kla=function(){this.Hf.set("opacity",1)};u.zca=["labelGap"];u.Bca="thumbnailBorderColor thumbnailBorderRadius thumbnailBorderSize thumbnailMaxWidth thumbnailMaxHeight thumbnailOpacity thumbnailShadow thumbnailShadowHorizontalLength thumbnailShadowVerticalLength thumbnailShadowBlurRadius thumbnailShadowSpread thumbnailShadowColor thumbnailShadowOpacity".split(" ");u.Aca="labelFontFamily labelFontColor labelFontSize labelFontStyle labelFontWeight labelHorizontalAlign labelTextDecoration labelTextShadowColor labelTextShadowHorizontalLength labelTextShadowVerticalLength labelTextShadowBlurRadius labelTextShadowOpacity".split(" ");
u.kR={labelFontFamily:"fontFamily",labelFontColor:"fontColor",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelGap:"gap",labelHorizontalAlign:"horizontalAlign",labelTextDecoration:"textDecoration",labelTextShadowColor:"textShadowColor",labelTextShadowHorizontalLength:"textShadowHorizontalLength",labelTextShadowVerticalLength:"textShadowVerticalLength",labelTextShadowBlurRadius:"textShadowBlurRadius",labelTextShadowOpacity:"textShadowOpacity",thumbnailMaxWidth:"maxWidth",
thumbnailMaxHeight:"maxHeight",thumbnailBorderRadius:"borderRadius",thumbnailOpacity:"opacity",thumbnailBorderSize:"borderSize",thumbnailBorderColor:"borderColor",thumbnailShadow:"shadow",thumbnailShadowHorizontalLength:"shadowHorizontalLength",thumbnailShadowVerticalLength:"shadowVerticalLength",thumbnailShadowBlurRadius:"shadowBlurRadius",thumbnailShadowSpread:"shadowSpread",thumbnailShadowColor:"shadowColor",thumbnailShadowOpacity:"shadowOpacity"};return u}(p)});
define("tdv/view/list/thumblist/ThumbnailList","require exports tdv/events/Event tdv/view/constants/Alignment tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/constants/Position tdv/view/containers/Container tdv/view/list/thumblist/ThumbnailListItem".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(f){function l(){var p=f.call(this)||this;p.Cn=!1;p.set("ariaRole","listbox");p.set("contentOpaque",!0);p.bind(g.L("selectedIndex"),p.H7a,p,!1);p.bind(g.Rb,
p.y$a,p,!1);return p}P(l,f);l.prototype.Pb=function(){f.prototype.Pb.call(this);this.m("layout",k.Ni);this.m("selectedIndex",-1);this.m("items",[]);this.m("overflow",e.Wr);this.m("itemHorizontalAlign",n.$e);this.m("itemLabelFontFamily");this.m("itemLabelPosition",b.Hc);this.m("itemLabelFunction");this.m("itemLabelGap");this.m("itemLabelHorizontalAlign",n.$e);this.m("itemThumbnailBorderRadius");this.m("itemThumbnailScaleMode");this.m("itemThumbnailWidth");this.m("itemThumbnailHeight");this.m("itemThumbnailMaxWidth");
this.m("itemThumbnailMaxHeight");this.m("itemThumbnailUrlFunction");this.m("itemTooltipFunction");this.m("itemSourceProperties");this.m("itemVerticalAlign",n.$d);this.m("itemBackgroundOpacity");this.m("itemBackgroundBlur");this.m("itemBackgroundColor");this.m("itemBackgroundColorRatios");this.m("itemBackgroundColorDirection");this.m("itemBorderRadius");this.m("itemBorderTopRadius");this.m("itemBorderBottomRadius");this.m("itemBorderLeftRadius");this.m("itemBorderRightRadius");this.m("itemBorderTopLeftRadius");
this.m("itemBorderTopRightRadius");this.m("itemBorderBottomLeftRadius");this.m("itemBorderBottomRightRadius");this.m("itemBorderSize");this.m("itemBorderLeftSize");this.m("itemBorderTopSize");this.m("itemBorderRightSize");this.m("itemBorderBottomSize");this.m("itemBorderColor");this.m("itemBorderLeftColor");this.m("itemBorderTopColor");this.m("itemBorderRightColor");this.m("itemBorderBottomColor");this.m("itemLabelFontColor");this.m("itemLabelFontSize");this.m("itemLabelFontStyle");this.m("itemLabelFontWeight");
this.m("itemLabelTextDecoration");this.m("itemLabelTextShadowColor");this.m("itemLabelTextShadowHorizontalLength");this.m("itemLabelTextShadowVerticalLength");this.m("itemLabelTextShadowBlurRadius");this.m("itemLabelTextShadowOpacity");this.m("itemOpacity");this.m("itemPaddingLeft");this.m("itemPaddingTop");this.m("itemPaddingRight");this.m("itemPaddingBottom");this.m("itemShadow");this.m("itemThumbnailOpacity");this.m("itemThumbnailBorderSize");this.m("itemThumbnailBorderColor");this.m("itemThumbnailShadow");
this.m("itemThumbnailShadowHorizontalLength");this.m("itemThumbnailShadowVerticalLength");this.m("itemThumbnailShadowBlurRadius");this.m("itemThumbnailShadowSpread");this.m("itemThumbnailShadowColor");this.m("itemThumbnailShadowOpacity");this.m("rollOverItemBackgroundOpacity");this.m("rollOverItemBackgroundBlur");this.m("rollOverItemBackgroundColor");this.m("rollOverItemBackgroundColorRatios");this.m("rollOverItemBackgroundColorDirection");this.m("rollOverItemBorderRadius");this.m("rollOverItemBorderTopRadius");
this.m("rollOverItemBorderBottomRadius");this.m("rollOverItemBorderLeftRadius");this.m("rollOverItemBorderRightRadius");this.m("rollOverItemBorderTopLeftRadius");this.m("rollOverItemBorderTopRightRadius");this.m("rollOverItemBorderBottomLeftRadius");this.m("rollOverItemBorderBottomRightRadius");this.m("rollOverItemBorderSize");this.m("rollOverItemBorderLeftSize");this.m("rollOverItemBorderTopSize");this.m("rollOverItemBorderRightSize");this.m("rollOverItemBorderBottomSize");this.m("rollOverItemBorderColor");
this.m("rollOverItemBorderLeftColor");this.m("rollOverItemBorderTopColor");this.m("rollOverItemBorderRightColor");this.m("rollOverItemBorderBottomColor");this.m("rollOverItemLabelFontSize");this.m("rollOverItemLabelFontStyle");this.m("rollOverItemLabelFontWeight");this.m("rollOverItemLabelTextDecoration");this.m("rollOverItemLabelTextShadowColor");this.m("rollOverItemLabelTextShadowHorizontalLength");this.m("rollOverItemLabelTextShadowVerticalLength");this.m("rollOverItemLabelTextShadowBlurRadius");
this.m("rollOverItemLabelTextShadowOpacity");this.m("rollOverItemOpacity");this.m("rollOverItemPaddingLeft");this.m("rollOverItemPaddingTop");this.m("rollOverItemPaddingRight");this.m("rollOverItemPaddingBottom");this.m("rollOverItemShadow");this.m("rollOverItemThumbnailOpacity");this.m("rollOverItemThumbnailBorderSize");this.m("rollOverItemThumbnailBorderColor");this.m("rollOverItemThumbnailShadow");this.m("rollOverItemThumbnailShadowHorizontalLength");this.m("rollOverItemThumbnailShadowVerticalLength");
this.m("rollOverItemThumbnailShadowBlurRadius");this.m("rollOverItemThumbnailShadowSpread");this.m("rollOverItemThumbnailShadowColor");this.m("rollOverItemThumbnailShadowOpacity");this.m("selectedItemBackgroundOpacity");this.m("selectedItemBackgroundBlur");this.m("selectedItemBackgroundColor");this.m("selectedItemBackgroundColorRatios");this.m("selectedItemBackgroundColorDirection");this.m("selectedItemBorderRadius");this.m("selectedItemBorderTopRadius");this.m("selectedItemBorderBottomRadius");this.m("selectedItemBorderLeftRadius");
this.m("selectedItemBorderRightRadius");this.m("selectedItemBorderTopLeftRadius");this.m("selectedItemBorderTopRightRadius");this.m("selectedItemBorderBottomLeftRadius");this.m("selectedItemBorderBottomRightRadius");this.m("selectedItemBorderSize");this.m("selectedItemBorderLeftSize");this.m("selectedItemBorderTopSize");this.m("selectedItemBorderRightSize");this.m("selectedItemBorderBottomSize");this.m("selectedItemBorderColor");this.m("selectedItemBorderLeftColor");this.m("selectedItemBorderTopColor");
this.m("selectedItemBorderRightColor");this.m("selectedItemBorderBottomColor");this.m("selectedItemLabelFontSize");this.m("selectedItemLabelFontStyle");this.m("selectedItemLabelFontWeight");this.m("selectedItemLabelTextDecoration");this.m("selectedItemLabelTextShadowColor");this.m("selectedItemLabelTextShadowHorizontalLength");this.m("selectedItemLabelTextShadowVerticalLength");this.m("selectedItemLabelTextShadowBlurRadius");this.m("selectedItemLabelTextShadowOpacity");this.m("selectedItemOpacity");
this.m("selectedItemPaddingLeft");this.m("selectedItemPaddingTop");this.m("selectedItemPaddingRight");this.m("selectedItemPaddingBottom");this.m("selectedItemShadow");this.m("selectedItemThumbnailOpacity");this.m("selectedItemThumbnailBorderSize");this.m("selectedItemThumbnailBorderColor");this.m("selectedItemThumbnailShadow");this.m("selectedItemThumbnailShadowHorizontalLength");this.m("selectedItemThumbnailShadowVerticalLength");this.m("selectedItemThumbnailShadowBlurRadius");this.m("selectedItemThumbnailShadowSpread");
this.m("selectedItemThumbnailShadowColor");this.m("selectedItemThumbnailShadowOpacity")};l.prototype.WS=function(p){this.Cn=!0;this.set("selectedIndex",this.Vfa(p.source))};l.prototype.H7a=function(){this.zEa()};l.prototype.y$a=function(){setTimeout(function(){this.zEa()}.bind(this),100)};l.prototype.zEa=function(){var p=this.get("selectedIndex"),q=this.Cb();p>=0&&p<q.length&&this.scrollIntoView(q[p])};l.prototype.Vfa=function(p){for(var q=this.Cb(),r=0;r<q.length;r++)if(q[r]==p)return r;return-1};
l.prototype.jb=function(){if(this.S("layout")){var p=this.G("layout");p!=k.Uk&&p!=k.Ni&&this.set("layout",k.Ni)}var q=!1;if(this.S("items")){q=!0;p=this.G("items")||[];var r=this.Cb();if(r.length<p.length){for(var t=r.length;t<p.length;t++)r=new d,r.bind(g.ma,this.WS,this,!1),this.Pc(l.gR,l.jG,[r],!1,!1),this.Pc(l.hR,l.kG,[r],!1,!1),this.mb(r);r=this.Cb()}if(r.length>p.length){for(t=p.length;t<r.length;t++){var u=r[t];u.h(g.ma,this.WS,this);this.removeChild(u)}r=this.Cb()}for(t=0;t<p.length;t++)r[t].set("item",
p[t]);this.$("items")}if(this.S("selectedIndex")||q){p=this.Cb();q=Math.min(p.length-1,Math.max(-1,this.G("selectedIndex")));this.set("selectedIndex",q);for(t=0;t<p.length;t++)p[t].qZ(t==q);this.$("selectedIndex");this.Cn&&(this.Cn=!1,this.o(new h(g.V)))}this.Pc(l.gR,l.jG,this.Cb(),!0,!1);this.Pc(l.hR,l.kG,this.Cb(),!0,!0);f.prototype.jb.call(this)};l.jG={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",shadowBlurRadius:"shadowBlurRadius",
shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};l.kG={itemHorizontalAlign:"horizontalAlign",itemLabelFunction:"labelFunction",itemLabelFontFamily:"labelFontFamily",itemLabelGap:"labelGap",itemLabelHorizontalAlign:"labelHorizontalAlign",itemLabelPosition:"labelPosition",itemSourceProperties:"sourceProperties",itemThumbnailBorderRadius:"thumbnailBorderRadius",itemThumbnailScaleMode:"thumbnailScaleMode",itemThumbnailHeight:"thumbnailHeight",itemThumbnailWidth:"thumbnailWidth",
itemThumbnailMaxHeight:"thumbnailMaxHeight",itemThumbnailMaxWidth:"thumbnailMaxWidth",itemThumbnailUrlFunction:"thumbnailUrlFunction",itemTooltipFunction:"tooltipFunction",itemVerticalAlign:"verticalAlign",itemBackgroundOpacity:"backgroundOpacity",itemBackgroundBlur:"backgroundBlur",itemBackgroundColor:"backgroundColor",itemBackgroundColorRatios:"backgroundColorRatios",itemBackgroundColorDirection:"backgroundColorDirection",itemBorderRadius:"borderRadius",itemBorderTopRadius:"borderTopRadius",itemBorderBottomRadius:"borderBottomRadius",
itemBorderLeftRadius:"borderLeftRadius",itemBorderRightRadius:"borderRightRadius",itemBorderTopLeftRadius:"borderTopLeftRadius",itemBorderTopRightRadius:"borderTopRightRadius",itemBorderBottomLeftRadius:"borderBottomLeftRadius",itemBorderBottomRightRadius:"borderBottomRightRadius",itemBorderSize:"borderSize",itemBorderLeftSize:"borderLeftSize",itemBorderTopSize:"borderTopSize",itemBorderRightSize:"borderRightSize",itemBorderBottomSize:"borderBottomSize",itemBorderColor:"borderColor",itemBorderLeftColor:"borderLeftColor",
itemBorderTopColor:"borderTopColor",itemBorderRightColor:"borderRightColor",itemBorderBottomColor:"borderBottomColor",itemLabelFontColor:"labelFontColor",itemLabelFontSize:"labelFontSize",itemLabelFontStyle:"labelFontStyle",itemLabelFontWeight:"labelFontWeight",itemLabelTextDecoration:"labelTextDecoration",itemLabelTextShadowColor:"labelTextShadowColor",itemLabelTextShadowHorizontalLength:"labelTextShadowHorizontalLength",itemLabelTextShadowVerticalLength:"labelTextShadowVerticalLength",itemLabelTextShadowBlurRadius:"labelTextShadowBlurRadius",
itemLabelTextShadowOpacity:"labelTextShadowOpacity",itemOpacity:"opacity",itemPaddingLeft:"paddingLeft",itemPaddingTop:"paddingTop",itemPaddingRight:"paddingRight",itemPaddingBottom:"paddingBottom",itemShadow:"shadow",itemThumbnailOpacity:"thumbnailOpacity",itemThumbnailBorderSize:"thumbnailBorderSize",itemThumbnailBorderColor:"thumbnailBorderColor",itemThumbnailShadow:"thumbnailShadow",itemThumbnailShadowHorizontalLength:"thumbnailShadowHorizontalLength",itemThumbnailShadowVerticalLength:"thumbnailShadowVerticalLength",
itemThumbnailShadowBlurRadius:"thumbnailShadowBlurRadius",itemThumbnailShadowSpread:"thumbnailShadowSpread",itemThumbnailShadowColor:"thumbnailShadowColor",itemThumbnailShadowOpacity:"thumbnailShadowOpacity",rollOverItemBackgroundOpacity:"rollOverBackgroundOpacity",rollOverItemBackgroundBlur:"rollOverBackgroundBlur",rollOverItemBackgroundColor:"rollOverBackgroundColor",rollOverItemBackgroundColorRatios:"rollOverBackgroundColorRatios",rollOverItemBackgroundColorDirection:"rollOverBackgroundColorDirection",
rollOverItemBorderRadius:"rollOverBorderRadius",rollOverItemBorderTopRadius:"rollOverBorderTopRadius",rollOverItemBorderBottomRadius:"rollOverBorderBottomRadius",rollOverItemBorderLeftRadius:"rollOverBorderLeftRadius",rollOverItemBorderRightRadius:"rollOverBorderRightRadius",rollOverItemBorderTopLeftRadius:"rollOverBorderTopLeftRadius",rollOverItemBorderTopRightRadius:"rollOverBorderTopRightRadius",rollOverItemBorderBottomLeftRadius:"rollOverBorderBottomLeftRadius",rollOverItemBorderBottomRightRadius:"rollOverBorderBottomRightRadius",
rollOverItemBorderSize:"rollOverBorderSize",rollOverItemBorderLeftSize:"rollOverBorderLeftSize",rollOverItemBorderTopSize:"rollOverBorderTopSize",rollOverItemBorderRightSize:"rollOverBorderRightSize",rollOverItemBorderBottomSize:"rollOverBorderBottomSize",rollOverItemBorderColor:"rollOverBorderColor",rollOverItemBorderLeftColor:"rollOverBorderLeftColor",rollOverItemBorderTopColor:"rollOverBorderTopColor",rollOverItemBorderRightColor:"rollOverBorderRightColor",rollOverItemBorderBottomColor:"rollOverBorderBottomColor",
rollOverItemLabelFontColor:"rollOverLabelFontColor",rollOverItemLabelFontSize:"rollOverLabelFontSize",rollOverItemLabelFontStyle:"rollOverLabelFontStyle",rollOverItemLabelFontWeight:"rollOverLabelFontWeight",rollOverItemLabelTextDecoration:"rollOverLabelTextDecoration",rollOverItemLabelTextShadowColor:"rollOverLabelTextShadowColor",rollOverItemLabelTextShadowHorizontalLength:"rollOverLabelTextShadowHorizontalLength",rollOverItemLabelTextShadowVerticalLength:"rollOverLabelTextShadowVerticalLength",
rollOverItemLabelTextShadowBlurRadius:"rollOverLabelTextShadowBlurRadius",rollOverItemLabelTextShadowOpacity:"rollOverLabelTextShadowOpacity",rollOverItemOpacity:"rollOverOpacity",rollOverItemPaddingLeft:"rollOverPaddingLeft",rollOverItemPaddingTop:"rollOverPaddingTop",rollOverItemPaddingRight:"rollOverPaddingRight",rollOverItemPaddingBottom:"rollOverPaddingBottom",rollOverItemShadow:"rollOverShadow",rollOverItemThumbnailOpacity:"rollOverThumbnailOpacity",rollOverItemThumbnailBorderSize:"rollOverThumbnailBorderSize",
rollOverItemThumbnailBorderColor:"rollOverThumbnailBorderColor",rollOverItemThumbnailShadow:"rollOverThumbnailShadow",rollOverItemThumbnailShadowHorizontalLength:"rollOverThumbnailShadowHorizontalLength",rollOverItemThumbnailShadowVerticalLength:"rollOverThumbnailShadowVerticalLength",rollOverItemThumbnailShadowBlurRadius:"rollOverThumbnailShadowBlurRadius",rollOverItemThumbnailShadowSpread:"rollOverThumbnailShadowSpread",rollOverItemThumbnailShadowColor:"rollOverThumbnailShadowColor",rollOverItemThumbnailShadowOpacity:"rollOverThumbnailShadowOpacity",
selectedItemBackgroundOpacity:"selectedBackgroundOpacity",selectedItemBackgroundBlur:"selectedBackgroundBlur",selectedItemBackgroundColor:"selectedBackgroundColor",selectedItemBackgroundColorRatios:"selectedBackgroundColorRatios",selectedItemBackgroundColorDirection:"selectedBackgroundColorDirection",selectedItemBorderRadius:"selectedBorderRadius",selectedItemBorderTopRadius:"selectedBorderTopRadius",selectedItemBorderBottomRadius:"selectedBorderBottomRadius",selectedItemBorderLeftRadius:"selectedBorderLeftRadius",
selectedItemBorderRightRadius:"selectedBorderRightRadius",selectedItemBorderTopLeftRadius:"selectedBorderTopLeftRadius",selectedItemBorderTopRightRadius:"selectedBorderTopRightRadius",selectedItemBorderBottomLeftRadius:"selectedBorderBottomLeftRadius",selectedItemBorderBottomRightRadius:"selectedBorderBottomRightRadius",selectedItemBorderSize:"selectedBorderSize",selectedItemBorderLeftSize:"selectedBorderLeftSize",selectedItemBorderTopSize:"selectedBorderTopSize",selectedItemBorderRightSize:"selectedBorderRightSize",
selectedItemBorderBottomSize:"selectedBorderBottomSize",selectedItemBorderColor:"selectedBorderColor",selectedItemBorderLeftColor:"selectedBorderLeftColor",selectedItemBorderTopColor:"selectedBorderTopColor",selectedItemBorderRightColor:"selectedBorderRightColor",selectedItemBorderBottomColor:"selectedBorderBottomColor",selectedItemLabelFontColor:"selectedLabelFontColor",selectedItemLabelFontSize:"selectedLabelFontSize",selectedItemLabelFontStyle:"selectedLabelFontStyle",selectedItemLabelFontWeight:"selectedLabelFontWeight",
selectedItemLabelTextDecoration:"selectedLabelTextDecoration",selectedItemLabelTextShadowColor:"selectedLabelTextShadowColor",selectedItemLabelTextShadowHorizontalLength:"selectedLabelTextShadowHorizontalLength",selectedItemLabelTextShadowVerticalLength:"selectedLabelTextShadowVerticalLength",selectedItemLabelTextShadowBlurRadius:"selectedLabelTextShadowBlurRadius",selectedItemLabelTextShadowOpacity:"selectedLabelTextShadowOpacity",selectedItemOpacity:"selectedOpacity",selectedItemPaddingLeft:"selectedPaddingLeft",
selectedItemPaddingTop:"selectedPaddingTop",selectedItemPaddingRight:"selectedPaddingRight",selectedItemPaddingBottom:"selectedPaddingBottom",selectedItemShadow:"selectedShadow",selectedItemThumbnailOpacity:"selectedThumbnailOpacity",selectedItemThumbnailBorderSize:"selectedThumbnailBorderSize",selectedItemThumbnailBorderColor:"selectedThumbnailBorderColor",selectedItemThumbnailShadow:"selectedThumbnailShadow",selectedItemThumbnailShadowHorizontalLength:"selectedThumbnailShadowHorizontalLength",selectedItemThumbnailShadowVerticalLength:"selectedThumbnailShadowVerticalLength",
selectedItemThumbnailShadowBlurRadius:"selectedThumbnailShadowBlurRadius",selectedItemThumbnailShadowSpread:"selectedThumbnailShadowSpread",selectedItemThumbnailShadowColor:"selectedThumbnailShadowColor",selectedItemThumbnailShadowOpacity:"selectedThumbnailShadowOpacity",tabIndex:"tabIndex",toolTipBackgroundColor:"toolTipBackgroundColor",toolTipBackgroundOpacity:"toolTipBackgroundOpacity",toolTipBorderRadius:"toolTipBorderRadius",toolTipBorderColor:"toolTipBorderColor",toolTipBorderSize:"toolTipBorderSize",
toolTipDisplayTime:"toolTipDisplayTime",toolTipFontFamily:"toolTipFontFamily",toolTipFontSize:"toolTipFontSize",toolTipFontColor:"toolTipFontColor",toolTipFontWeight:"toolTipFontWeight",toolTipFontStyle:"toolTipFontStyle",toolTipPaddingBottom:"toolTipPaddingBottom",toolTipPaddingLeft:"toolTipPaddingLeft",toolTipPaddingTop:"toolTipPaddingTop",toolTipPaddingRight:"toolTipPaddingRight",toolTipShadowBlurRadius:"toolTipShadowBlurRadius",toolTipShadowColor:"toolTipShadowColor",toolTipShadowHorizontalLength:"toolTipShadowHorizontalLength",
toolTipShadowOpacity:"toolTipShadowOpacity",toolTipShadowSpread:"toolTipShadowSpread",toolTipShadowVerticalLength:"toolTipShadowVerticalLength",toolTipOpacity:"toolTipOpacity",toolTipTextShadowBlurRadius:"toolTipTextShadowBlurRadius",toolTipTextShadowColor:"toolTipTextShadowColor",toolTipTextShadowHorizontalLength:"toolTipTextShadowHorizontalLength",toolTipTextShadowOpacity:"toolTipTextShadowOpacity",toolTipTextShadowVerticalLength:"toolTipTextShadowVerticalLength"};l.gR=Object.keys(l.jG);l.hR=Object.keys(l.kG);
return l}(c)});
define("tdv/view/list/thumbgrid/ThumbnailGridItem","require exports tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/constants/Position tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/containers/Container tdv/view/images/Image tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){return function(t){function u(){var v=t.call(this)||
this;v.Hf=null;v.Za=null;v.EG=[];v.set("ariaRole","option");v.set("autoRolledOver",!0);v.set("childrenInteractionEnabled",!1);v.set("contentOpaque",!0);v.set("creationPolicy",e.cL);v.set("cursor",b.qf);return v}P(u,t);u.prototype.Pb=function(){t.prototype.Pb.call(this);this.m("overflow","hidden");this.m("item");this.m("thumbnailUrlFunction",this.Aea);this.m("sourceProperties");this.m("labelFunction",this.yea);this.m("labelFontFamily");this.m("labelFontColor");this.m("labelFontSize");this.m("labelFontStyle");
this.m("labelFontWeight");this.m("labelGap");this.m("labelHorizontalAlign");this.m("labelMaxWidth");this.m("labelPosition");this.m("labelTextDecoration");this.m("labelTextShadowColor");this.m("labelTextShadowHorizontalLength");this.m("labelTextShadowVerticalLength");this.m("labelTextShadowBlurRadius");this.m("labelTextShadowOpacity");this.m("thumbnailBorderRadius");this.m("thumbnailOpacity");this.m("thumbnailBorderSize");this.m("thumbnailBorderColor");this.m("thumbnailWidth");this.m("thumbnailHeight");
this.m("thumbnailMaxWidth");this.m("thumbnailMaxHeight");this.m("thumbnailShadow");this.m("thumbnailShadowHorizontalLength");this.m("thumbnailShadowVerticalLength");this.m("thumbnailShadowBlurRadius");this.m("thumbnailShadowSpread");this.m("thumbnailShadowColor");this.m("thumbnailShadowOpacity");this.D("rollOverBackgroundOpacity",l.ea,"backgroundOpacity");this.D("rollOverBackgroundBlur",l.ea,"backgroundBlur");this.D("rollOverBackgroundColor",l.ea,"backgroundColor");this.D("rollOverBackgroundColorRatios",
l.ea,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",l.ea,"backgroundColorDirection");this.D("rollOverBorderRadius",l.ea,"borderRadius");this.D("rollOverBorderTopRadius",l.ea,"borderTopRadius");this.D("rollOverBorderBottomRadius",l.ea,"borderBottomRadius");this.D("rollOverBorderLeftRadius",l.ea,"borderLeftRadius");this.D("rollOverBorderRightRadius",l.ea,"borderRightRadius");this.D("rollOverBorderTopLeftRadius",l.ea,"borderTopLeftRadius");this.D("rollOverBorderTopRightRadius",l.ea,
"borderTopRightRadius");this.D("rollOverBorderBottomLeftRadius",l.ea,"borderBottomLeftRadius");this.D("rollOverBorderBottomRightRadius",l.ea,"borderBottomRightRadius");this.D("rollOverBorderSize",l.ea,"borderSize");this.D("rollOverBorderLeftSize",l.ea,"borderLeftSize");this.D("rollOverBorderTopSize",l.ea,"borderTopSize");this.D("rollOverBorderRightSize",l.ea,"borderRightSize");this.D("rollOverBorderBottomSize",l.ea,"borderBottomSize");this.D("rollOverBorderColor",l.ea,"borderColor");this.D("rollOverBorderLeftColor",
l.ea,"borderLeftColor");this.D("rollOverBorderTopColor",l.ea,"borderTopColor");this.D("rollOverBorderRightColor",l.ea,"borderRightColor");this.D("rollOverBorderBottomColor",l.ea,"borderBottomColor");this.D("rollOverLabelFontColor",l.ea,"labelFontColor");this.D("rollOverLabelFontSize",l.ea,"labelFontSize");this.D("rollOverLabelFontStyle",l.ea,"labelFontStyle");this.D("rollOverLabelFontWeight",l.ea,"labelFontWeight");this.D("rollOverLabelTextDecoration",l.ea,"labelTextDecoration");this.D("rollOverLabelTextShadowColor",
l.ea,"labelTextShadowColor");this.D("rollOverLabelTextShadowHorizontalLength",l.ea,"labelTextShadowHorizontalLength");this.D("rollOverLabelTextShadowVerticalLength",l.ea,"labelTextShadowVerticalLength");this.D("rollOverLabelTextShadowBlurRadius",l.ea,"labelTextShadowBlurRadius");this.D("rollOverLabelTextShadowOpacity",l.ea,"labelTextShadowOpacity");this.D("rollOverOpacity",l.ea,"opacity");this.D("rollOverPaddingLeft",l.ea,"paddingLeft");this.D("rollOverPaddingTop",l.ea,"paddingTop");this.D("rollOverPaddingRight",
l.ea,"paddingRight");this.D("rollOverPaddingBottom",l.ea,"paddingBottom");this.D("rollOverShadow",l.ea,"shadow");this.D("rollOverThumbnailOpacity",l.ea,"thumbnailOpacity");this.D("rollOverThumbnailBorderSize",l.ea,"thumbnailBorderSize");this.D("rollOverThumbnailBorderColor",l.ea,"thumbnailBorderColor");this.D("rollOverThumbnailShadow",l.ea,"thumbnailShadow");this.D("rollOverThumbnailShadowHorizontalLength",l.ea,"thumbnailShadowHorizontalLength");this.D("rollOverThumbnailShadowVerticalLength",l.ea,
"thumbnailShadowVerticalLength");this.D("rollOverThumbnailShadowBlurRadius",l.ea,"thumbnailShadowBlurRadius");this.D("rollOverThumbnailShadowSpread",l.ea,"thumbnailShadowSpread");this.D("rollOverThumbnailShadowColor",l.ea,"thumbnailShadowColor");this.D("rollOverThumbnailShadowOpacity",l.ea,"thumbnailShadowOpacity");this.D("selectedBackgroundOpacity",l.oa,"backgroundOpacity");this.D("selectedBackgroundBlur",l.oa,"backgroundBlur");this.D("selectedBackgroundColor",l.oa,"backgroundColor");this.D("selectedBackgroundColorRatios",
l.oa,"backgroundColorRatios");this.D("selectedBackgroundColorDirection",l.oa,"backgroundColorDirection");this.D("selectedBorderRadius",l.oa,"borderRadius");this.D("selectedBorderTopRadius",l.oa,"borderTopRadius");this.D("selectedBorderBottomRadius",l.oa,"borderBottomRadius");this.D("selectedBorderLeftRadius",l.oa,"borderLeftRadius");this.D("selectedBorderRightRadius",l.oa,"borderRightRadius");this.D("selectedBorderTopLeftRadius",l.oa,"borderTopLeftRadius");this.D("selectedBorderTopRightRadius",l.oa,
"borderTopRightRadius");this.D("selectedBorderBottomLeftRadius",l.oa,"borderBottomLeftRadius");this.D("selectedBorderBottomRightRadius",l.oa,"borderBottomRightRadius");this.D("selectedBorderSize",l.oa,"borderSize");this.D("selectedBorderLeftSize",l.oa,"borderLeftSize");this.D("selectedBorderTopSize",l.oa,"borderTopSize");this.D("selectedBorderRightSize",l.oa,"borderRightSize");this.D("selectedBorderBottomSize",l.oa,"borderBottomSize");this.D("selectedBorderColor",l.oa,"borderColor");this.D("selectedBorderLeftColor",
l.oa,"borderLeftColor");this.D("selectedBorderTopColor",l.oa,"borderTopColor");this.D("selectedBorderRightColor",l.oa,"borderRightColor");this.D("selectedBorderBottomColor",l.oa,"borderBottomColor");this.D("selectedLabelFontColor",l.oa,"labelFontColor");this.D("selectedLabelFontSize",l.oa,"labelFontSize");this.D("selectedLabelFontStyle",l.oa,"labelFontStyle");this.D("selectedLabelFontWeight",l.oa,"labelFontWeight");this.D("selectedLabelTextDecoration",l.oa,"labelTextDecoration");this.D("selectedLabelTextShadowColor",
l.oa,"labelTextShadowColor");this.D("selectedLabelTextShadowHorizontalLength",l.oa,"labelTextShadowHorizontalLength");this.D("selectedLabelTextShadowVerticalLength",l.oa,"labelTextShadowVerticalLength");this.D("selectedLabelTextShadowBlurRadius",l.oa,"labelTextShadowBlurRadius");this.D("selectedLabelTextShadowOpacity",l.oa,"labelTextShadowOpacity");this.D("selectedOpacity",l.oa,"opacity");this.D("selectedPaddingLeft",l.oa,"paddingLeft");this.D("selectedPaddingTop",l.oa,"paddingTop");this.D("selectedPaddingRight",
l.oa,"paddingRight");this.D("selectedPaddingBottom",l.oa,"paddingBottom");this.D("selectedShadow",l.oa,"shadow");this.D("selectedThumbnailOpacity",l.oa,"thumbnailOpacity");this.D("selectedThumbnailBorderSize",l.oa,"thumbnailBorderSize");this.D("selectedThumbnailBorderColor",l.oa,"thumbnailBorderColor");this.D("selectedThumbnailShadow",l.oa,"thumbnailShadow");this.D("selectedThumbnailShadowHorizontalLength",l.oa,"thumbnailShadowHorizontalLength");this.D("selectedThumbnailShadowVerticalLength",l.oa,
"thumbnailShadowVerticalLength");this.D("selectedThumbnailShadowBlurRadius",l.oa,"thumbnailShadowBlurRadius");this.D("selectedThumbnailShadowSpread",l.oa,"thumbnailShadowSpread");this.D("selectedThumbnailShadowColor",l.oa,"thumbnailShadowColor");this.D("selectedThumbnailShadowOpacity",l.oa,"thumbnailShadowOpacity")};u.prototype.qZ=function(v){this.lV(v)};u.prototype.Kb=function(){t.prototype.Kb.call(this);this.Hf||(this.Hf=new q,this.mb(this.Hf),this.Hf.set("horizontalAlign",k.$e),this.Hf.set("verticalAlign",
k.$d),this.Hf.bind(g.ia,this.kla,this,!1));this.Za||(this.Za=new r,this.mb(this.Za))};u.prototype.Aea=function(v){if(h.FA(v))return v;if(v&&v.osa)return v.osa};u.prototype.yea=function(v){if(v&&v.label)return v.label};u.prototype.Vx=function(){return this.Za&&this.Za.get("text")||t.prototype.Vx.call(this)};u.prototype.jb=function(){if(this.S("sourceProperties")||this.S("item")){for(;this.EG.length;)this.EG.pop().jF();var v=this.G("sourceProperties"),w=this.G("item");v&&w&&v.forEach(function(y){this.EG.push(n.jx(w,
y,this.Eia,this,!0))}.bind(this))}if(this.S("sourceProperties")||this.S("item")||this.S("tooltipFunction"))v=this.G("item"),v=this.G("tooltipFunction")(v),this.set("toolTip",v);if(this.S("sourceProperties")||this.S("item")||this.S("thumbnailUrlFunction"))v=this.G("item"),(v=this.G("thumbnailUrlFunction")(v))?this.Hf.get("url")!=v&&this.Hf.xa({url:v,visible:!0,opacity:.5}):this.Hf.xa({url:void 0,visible:!1}),this.$("thumbnailUrlFunction");if(this.S("sourceProperties")||this.S("item")||this.S("labelFunction"))v=
this.G("item"),v=this.G("labelFunction")(v),this.Za.xa({text:v,visible:v?!0:!1}),this.$("labelFunction");this.$("item");this.$("sourceProperties");if(this.S("labelPosition")||this.S("listLayout")||this.S("thumbnailWidth")||this.S("thumbnailHeight")){var x=this;v=function(y,z){y=x.G(y);return y!==void 0?y:z};switch(this.G("labelPosition")){case d.fb:case d.Db:this.set("layout",c.Ni);this.Za.set("width","100%");this.Hf.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",
f.Pk)});break;default:this.set("layout",c.Uk),this.Za.set("width","100%"),this.Hf.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth","100%"),scaleMode:v("thumbnailScaleMode",f.Pk)})}switch(this.G("labelPosition")){case d.fb:case d.Tc:this.rr(this.Za,0);break;default:this.rr(this.Za,1)}this.$("labelPosition")}this.Pc(u.zca,u.nva,[this],!0,!0);this.Pc(u.Bca,u.qva,[this.Hf],!0,!0);this.Pc(u.Aca,u.pva,[this.Za],!0,!0);t.prototype.jb.call(this)};u.prototype.Eia=function(){this.yD("item")};
u.prototype.uI=function(v){t.prototype.uI.call(this,v)};u.prototype.kla=function(){this.Hf.set("opacity",1)};u.nva={labelGap:"gap"};u.zca=Object.keys(u.nva);u.pva={labelFontFamily:"fontFamily",labelFontColor:"fontColor",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelHorizontalAlign:"horizontalAlign",labelMaxWidth:"maxWidth",labelTextDecoration:"textDecoration",labelTextShadowColor:"textShadowColor",labelTextShadowHorizontalLength:"textShadowHorizontalLength",
labelTextShadowVerticalLength:"textShadowVerticalLength",labelTextShadowBlurRadius:"textShadowBlurRadius",labelTextShadowOpacity:"textShadowOpacity"};u.Aca=Object.keys(u.pva);u.qva={thumbnailMaxWidth:"maxWidth",thumbnailMaxHeight:"maxHeight",thumbnailBorderRadius:"borderRadius",thumbnailOpacity:"opacity",thumbnailBorderSize:"borderSize",thumbnailBorderColor:"borderColor",thumbnailShadow:"shadow",thumbnailShadowHorizontalLength:"shadowHorizontalLength",thumbnailShadowVerticalLength:"shadowVerticalLength",
thumbnailShadowBlurRadius:"shadowBlurRadius",thumbnailShadowSpread:"shadowSpread",thumbnailShadowColor:"shadowColor",thumbnailShadowOpacity:"shadowOpacity"};u.Bca=Object.keys(u.qva);return u}(p)});
define("tdv/view/list/thumbgrid/ThumbnailGrid","require exports tdv/events/Event tdv/view/constants/Alignment tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/constants/Position tdv/view/containers/Container tdv/view/list/thumbgrid/ThumbnailGridItem".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(f){function l(){var p=f.call(this)||this;p.Cn=!1;p.set("contentOpaque",!0);p.set("ariaRole","listbox");return p}P(l,f);l.prototype.Pb=function(){f.prototype.Pb.call(this);
this.m("layout",k.JB);this.m("selectedIndex",-1);this.m("items",[]);this.m("overflow",e.Wr);this.m("itemHorizontalAlign",n.$e);this.m("itemLabelFontFamily");this.m("itemLabelPosition",b.Hc);this.m("itemLabelFunction");this.m("itemLabelMaxWidth");this.m("itemLabelGap");this.m("itemLabelHorizontalAlign",n.$e);this.m("itemSourceProperties");this.m("itemThumbnailBorderRadius");this.m("itemThumbnailScaleMode");this.m("itemThumbnailWidth");this.m("itemThumbnailHeight");this.m("itemThumbnailMaxWidth");this.m("itemThumbnailMaxHeight");
this.m("itemThumbnailUrlFunction");this.m("itemTooltipFunction");this.m("itemVerticalAlign",n.$d);this.m("itemBackgroundOpacity");this.m("itemBackgroundBlur");this.m("itemBackgroundColor");this.m("itemBackgroundColorRatios");this.m("itemBackgroundColorDirection");this.m("itemBorderRadius");this.m("itemBorderTopRadius");this.m("itemBorderBottomRadius");this.m("itemBorderLeftRadius");this.m("itemBorderRightRadius");this.m("itemBorderTopLeftRadius");this.m("itemBorderTopRightRadius");this.m("itemBorderBottomLeftRadius");
this.m("itemBorderBottomRightRadius");this.m("itemBorderSize");this.m("itemBorderLeftSize");this.m("itemBorderTopSize");this.m("itemBorderRightSize");this.m("itemBorderBottomSize");this.m("itemBorderColor");this.m("itemBorderLeftColor");this.m("itemBorderTopColor");this.m("itemBorderRightColor");this.m("itemBorderBottomColor");this.m("itemLabelFontColor");this.m("itemLabelFontSize");this.m("itemLabelFontStyle");this.m("itemLabelFontWeight");this.m("itemLabelMaxWidth");this.m("itemLabelTextDecoration");
this.m("itemLabelTextShadowColor");this.m("itemLabelTextShadowHorizontalLength");this.m("itemLabelTextShadowVerticalLength");this.m("itemLabelTextShadowBlurRadius");this.m("itemLabelTextShadowOpacity");this.m("itemOpacity");this.m("itemPaddingLeft");this.m("itemPaddingTop");this.m("itemPaddingRight");this.m("itemPaddingBottom");this.m("itemShadow");this.m("itemThumbnailOpacity");this.m("itemThumbnailBorderSize");this.m("itemThumbnailBorderColor");this.m("itemThumbnailShadow");this.m("itemThumbnailShadowHorizontalLength");
this.m("itemThumbnailShadowVerticalLength");this.m("itemThumbnailShadowBlurRadius");this.m("itemThumbnailShadowSpread");this.m("itemThumbnailShadowColor");this.m("itemThumbnailShadowOpacity");this.m("rollOverItemBackgroundOpacity");this.m("rollOverItemBackgroundBlur");this.m("rollOverItemBackgroundColor");this.m("rollOverItemBackgroundColorRatios");this.m("rollOverItemBackgroundColorDirection");this.m("rollOverItemBorderRadius");this.m("rollOverItemBorderTopRadius");this.m("rollOverItemBorderBottomRadius");
this.m("rollOverItemBorderLeftRadius");this.m("rollOverItemBorderRightRadius");this.m("rollOverItemBorderTopLeftRadius");this.m("rollOverItemBorderTopRightRadius");this.m("rollOverItemBorderBottomLeftRadius");this.m("rollOverItemBorderBottomRightRadius");this.m("rollOverItemBorderSize");this.m("rollOverItemBorderLeftSize");this.m("rollOverItemBorderTopSize");this.m("rollOverItemBorderRightSize");this.m("rollOverItemBorderBottomSize");this.m("rollOverItemBorderColor");this.m("rollOverItemBorderLeftColor");
this.m("rollOverItemBorderTopColor");this.m("rollOverItemBorderRightColor");this.m("rollOverItemBorderBottomColor");this.m("rollOverItemLabelFontSize");this.m("rollOverItemLabelFontStyle");this.m("rollOverItemLabelFontWeight");this.m("rollOverItemLabelTextDecoration");this.m("rollOverItemLabelTextShadowColor");this.m("rollOverItemLabelTextShadowHorizontalLength");this.m("rollOverItemLabelTextShadowVerticalLength");this.m("rollOverItemLabelTextShadowBlurRadius");this.m("rollOverItemLabelTextShadowOpacity");
this.m("rollOverItemOpacity");this.m("rollOverItemPaddingLeft");this.m("rollOverItemPaddingTop");this.m("rollOverItemPaddingRight");this.m("rollOverItemPaddingBottom");this.m("rollOverItemShadow");this.m("rollOverItemThumbnailOpacity");this.m("rollOverItemThumbnailBorderSize");this.m("rollOverItemThumbnailBorderColor");this.m("rollOverItemThumbnailShadow");this.m("rollOverItemThumbnailShadowHorizontalLength");this.m("rollOverItemThumbnailShadowVerticalLength");this.m("rollOverItemThumbnailShadowBlurRadius");
this.m("rollOverItemThumbnailShadowSpread");this.m("rollOverItemThumbnailShadowColor");this.m("rollOverItemThumbnailShadowOpacity");this.m("selectedItemBackgroundOpacity");this.m("selectedItemBackgroundBlur");this.m("selectedItemBackgroundColor");this.m("selectedItemBackgroundColorRatios");this.m("selectedItemBackgroundColorDirection");this.m("selectedItemBorderRadius");this.m("selectedItemBorderTopRadius");this.m("selectedItemBorderBottomRadius");this.m("selectedItemBorderLeftRadius");this.m("selectedItemBorderRightRadius");
this.m("selectedItemBorderTopLeftRadius");this.m("selectedItemBorderTopRightRadius");this.m("selectedItemBorderBottomLeftRadius");this.m("selectedItemBorderBottomRightRadius");this.m("selectedItemBorderSize");this.m("selectedItemBorderLeftSize");this.m("selectedItemBorderTopSize");this.m("selectedItemBorderRightSize");this.m("selectedItemBorderBottomSize");this.m("selectedItemBorderColor");this.m("selectedItemBorderLeftColor");this.m("selectedItemBorderTopColor");this.m("selectedItemBorderRightColor");
this.m("selectedItemBorderBottomColor");this.m("selectedItemLabelFontSize");this.m("selectedItemLabelFontStyle");this.m("selectedItemLabelFontWeight");this.m("selectedItemLabelTextDecoration");this.m("selectedItemLabelTextShadowColor");this.m("selectedItemLabelTextShadowHorizontalLength");this.m("selectedItemLabelTextShadowVerticalLength");this.m("selectedItemLabelTextShadowBlurRadius");this.m("selectedItemLabelTextShadowOpacity");this.m("selectedItemOpacity");this.m("selectedItemPaddingLeft");this.m("selectedItemPaddingTop");
this.m("selectedItemPaddingRight");this.m("selectedItemPaddingBottom");this.m("selectedItemShadow");this.m("selectedItemThumbnailOpacity");this.m("selectedItemThumbnailBorderSize");this.m("selectedItemThumbnailBorderColor");this.m("selectedItemThumbnailShadow");this.m("selectedItemThumbnailShadowHorizontalLength");this.m("selectedItemThumbnailShadowVerticalLength");this.m("selectedItemThumbnailShadowBlurRadius");this.m("selectedItemThumbnailShadowSpread");this.m("selectedItemThumbnailShadowColor");
this.m("selectedItemThumbnailShadowOpacity")};l.prototype.WS=function(p){this.Cn=!0;this.set("selectedIndex",this.Vfa(p.source))};l.prototype.Vfa=function(p){for(var q=this.Cb(),r=0;r<q.length;r++)if(q[r]==p)return r;return-1};l.prototype.jb=function(){this.S("layout")&&this.G("layout")!=k.JB&&this.set("layout",k.JB);var p=!1;if(this.S("items")){p=!0;var q=this.G("items")||[],r=this.Cb();if(r.length<q.length){for(var t=r.length;t<q.length;t++)r=new d,r.bind(g.ma,this.WS,this,!1),this.Pc(l.gR,l.jG,
[r],!1,!1),this.Pc(l.hR,l.kG,[r],!1,!1),this.mb(r);r=this.Cb()}if(r.length>q.length){for(t=q.length;t<r.length;t++){var u=r[t];u.h(g.ma,this.WS,this);this.removeChild(u)}r=this.Cb()}for(t=0;t<q.length;t++)r[t].set("item",q[t]);this.$("items")}if(this.S("selectedIndex")||p){q=this.Cb();p=Math.min(q.length-1,Math.max(-1,this.G("selectedIndex")));this.set("selectedIndex",p);for(t=0;t<q.length;t++)q[t].qZ(t==p);this.$("selectedIndex");this.Cn&&(this.Cn=!1,this.o(new h(g.V)))}this.Pc(l.gR,l.jG,this.Cb(),
!0,!1);this.Pc(l.hR,l.kG,this.Cb(),!0,!0);f.prototype.jb.call(this)};l.jG={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",shadowBlurRadius:"shadowBlurRadius",shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};l.kG={itemHorizontalAlign:"horizontalAlign",itemLabelFunction:"labelFunction",itemLabelFontFamily:"labelFontFamily",itemLabelGap:"labelGap",itemLabelHorizontalAlign:"labelHorizontalAlign",itemLabelMaxWidth:"labelMaxWidth",
itemLabelPosition:"labelPosition",itemSourceProperties:"sourceProperties",itemThumbnailBorderRadius:"thumbnailBorderRadius",itemThumbnailScaleMode:"thumbnailScaleMode",itemThumbnailHeight:"thumbnailHeight",itemThumbnailWidth:"thumbnailWidth",itemThumbnailMaxHeight:"thumbnailMaxHeight",itemThumbnailMaxWidth:"thumbnailMaxWidth",itemThumbnailUrlFunction:"thumbnailUrlFunction",itemTooltipFunction:"tooltipFunction",itemVerticalAlign:"verticalAlign",itemBackgroundOpacity:"backgroundOpacity",itemBackgroundBlur:"backgroundBlur",
itemBackgroundColor:"backgroundColor",itemBackgroundColorRatios:"backgroundColorRatios",itemBackgroundColorDirection:"backgroundColorDirection",itemBorderRadius:"borderRadius",itemBorderTopRadius:"borderTopRadius",itemBorderBottomRadius:"borderBottomRadius",itemBorderLeftRadius:"borderLeftRadius",itemBorderRightRadius:"borderRightRadius",itemBorderTopLeftRadius:"borderTopLeftRadius",itemBorderTopRightRadius:"borderTopRightRadius",itemBorderBottomLeftRadius:"borderBottomLeftRadius",itemBorderBottomRightRadius:"borderBottomRightRadius",
itemBorderSize:"borderSize",itemBorderLeftSize:"borderLeftSize",itemBorderTopSize:"borderTopSize",itemBorderRightSize:"borderRightSize",itemBorderBottomSize:"borderBottomSize",itemBorderColor:"borderColor",itemBorderLeftColor:"borderLeftColor",itemBorderTopColor:"borderTopColor",itemBorderRightColor:"borderRightColor",itemBorderBottomColor:"borderBottomColor",itemLabelFontColor:"labelFontColor",itemLabelFontSize:"labelFontSize",itemLabelFontStyle:"labelFontStyle",itemLabelFontWeight:"labelFontWeight",
itemLabelTextDecoration:"labelTextDecoration",itemLabelTextShadowColor:"labelTextShadowColor",itemLabelTextShadowHorizontalLength:"labelTextShadowHorizontalLength",itemLabelTextShadowVerticalLength:"labelTextShadowVerticalLength",itemLabelTextShadowBlurRadius:"labelTextShadowBlurRadius",itemLabelTextShadowOpacity:"labelTextShadowOpacity",itemOpacity:"opacity",itemPaddingLeft:"paddingLeft",itemPaddingTop:"paddingTop",itemPaddingRight:"paddingRight",itemPaddingBottom:"paddingBottom",itemShadow:"shadow",
itemThumbnailOpacity:"thumbnailOpacity",itemThumbnailBorderSize:"thumbnailBorderSize",itemThumbnailBorderColor:"thumbnailBorderColor",itemThumbnailShadow:"thumbnailShadow",itemThumbnailShadowHorizontalLength:"thumbnailShadowHorizontalLength",itemThumbnailShadowVerticalLength:"thumbnailShadowVerticalLength",itemThumbnailShadowBlurRadius:"thumbnailShadowBlurRadius",itemThumbnailShadowSpread:"thumbnailShadowSpread",itemThumbnailShadowColor:"thumbnailShadowColor",itemThumbnailShadowOpacity:"thumbnailShadowOpacity",
rollOverItemBackgroundOpacity:"rollOverBackgroundOpacity",rollOverItemBackgroundBlur:"rollOverBackgroundBlur",rollOverItemBackgroundColor:"rollOverBackgroundColor",rollOverItemBackgroundColorRatios:"rollOverBackgroundColorRatios",rollOverItemBackgroundColorDirection:"rollOverBackgroundColorDirection",rollOverItemBorderRadius:"rollOverBorderRadius",rollOverItemBorderTopRadius:"rollOverBorderTopRadius",rollOverItemBorderBottomRadius:"rollOverBorderBottomRadius",rollOverItemBorderLeftRadius:"rollOverBorderLeftRadius",
rollOverItemBorderRightRadius:"rollOverBorderRightRadius",rollOverItemBorderTopLeftRadius:"rollOverBorderTopLeftRadius",rollOverItemBorderTopRightRadius:"rollOverBorderTopRightRadius",rollOverItemBorderBottomLeftRadius:"rollOverBorderBottomLeftRadius",rollOverItemBorderBottomRightRadius:"rollOverBorderBottomRightRadius",rollOverItemBorderSize:"rollOverBorderSize",rollOverItemBorderLeftSize:"rollOverBorderLeftSize",rollOverItemBorderTopSize:"rollOverBorderTopSize",rollOverItemBorderRightSize:"rollOverBorderRightSize",
rollOverItemBorderBottomSize:"rollOverBorderBottomSize",rollOverItemBorderColor:"rollOverBorderColor",rollOverItemBorderLeftColor:"rollOverBorderLeftColor",rollOverItemBorderTopColor:"rollOverBorderTopColor",rollOverItemBorderRightColor:"rollOverBorderRightColor",rollOverItemBorderBottomColor:"rollOverBorderBottomColor",rollOverItemLabelFontColor:"rollOverLabelFontColor",rollOverItemLabelFontSize:"rollOverLabelFontSize",rollOverItemLabelFontStyle:"rollOverLabelFontStyle",rollOverItemLabelFontWeight:"rollOverLabelFontWeight",
rollOverItemLabelTextDecoration:"rollOverLabelTextDecoration",rollOverItemLabelTextShadowColor:"rollOverLabelTextShadowColor",rollOverItemLabelTextShadowHorizontalLength:"rollOverLabelTextShadowHorizontalLength",rollOverItemLabelTextShadowVerticalLength:"rollOverLabelTextShadowVerticalLength",rollOverItemLabelTextShadowBlurRadius:"rollOverLabelTextShadowBlurRadius",rollOverItemLabelTextShadowOpacity:"rollOverLabelTextShadowOpacity",rollOverItemOpacity:"rollOverOpacity",rollOverItemPaddingLeft:"rollOverPaddingLeft",
rollOverItemPaddingTop:"rollOverPaddingTop",rollOverItemPaddingRight:"rollOverPaddingRight",rollOverItemPaddingBottom:"rollOverPaddingBottom",rollOverItemShadow:"rollOverShadow",rollOverItemThumbnailOpacity:"rollOverThumbnailOpacity",rollOverItemThumbnailBorderSize:"rollOverThumbnailBorderSize",rollOverItemThumbnailBorderColor:"rollOverThumbnailBorderColor",rollOverItemThumbnailShadow:"rollOverThumbnailShadow",rollOverItemThumbnailShadowHorizontalLength:"rollOverThumbnailShadowHorizontalLength",rollOverItemThumbnailShadowVerticalLength:"rollOverThumbnailShadowVerticalLength",
rollOverItemThumbnailShadowBlurRadius:"rollOverThumbnailShadowBlurRadius",rollOverItemThumbnailShadowSpread:"rollOverThumbnailShadowSpread",rollOverItemThumbnailShadowColor:"rollOverThumbnailShadowColor",rollOverItemThumbnailShadowOpacity:"rollOverThumbnailShadowOpacity",selectedItemBackgroundOpacity:"selectedBackgroundOpacity",selectedItemBackgroundBlur:"selectedBackgroundBlur",selectedItemBackgroundColor:"selectedBackgroundColor",selectedItemBackgroundColorRatios:"selectedBackgroundColorRatios",
selectedItemBackgroundColorDirection:"selectedBackgroundColorDirection",selectedItemBorderRadius:"selectedBorderRadius",selectedItemBorderTopRadius:"selectedBorderTopRadius",selectedItemBorderBottomRadius:"selectedBorderBottomRadius",selectedItemBorderLeftRadius:"selectedBorderLeftRadius",selectedItemBorderRightRadius:"selectedBorderRightRadius",selectedItemBorderTopLeftRadius:"selectedBorderTopLeftRadius",selectedItemBorderTopRightRadius:"selectedBorderTopRightRadius",selectedItemBorderBottomLeftRadius:"selectedBorderBottomLeftRadius",
selectedItemBorderBottomRightRadius:"selectedBorderBottomRightRadius",selectedItemBorderSize:"selectedBorderSize",selectedItemBorderLeftSize:"selectedBorderLeftSize",selectedItemBorderTopSize:"selectedBorderTopSize",selectedItemBorderRightSize:"selectedBorderRightSize",selectedItemBorderBottomSize:"selectedBorderBottomSize",selectedItemBorderColor:"selectedBorderColor",selectedItemBorderLeftColor:"selectedBorderLeftColor",selectedItemBorderTopColor:"selectedBorderTopColor",selectedItemBorderRightColor:"selectedBorderRightColor",
selectedItemBorderBottomColor:"selectedBorderBottomColor",selectedItemLabelFontColor:"selectedLabelFontColor",selectedItemLabelFontSize:"selectedLabelFontSize",selectedItemLabelFontStyle:"selectedLabelFontStyle",selectedItemLabelFontWeight:"selectedLabelFontWeight",selectedItemLabelTextDecoration:"selectedLabelTextDecoration",selectedItemLabelTextShadowColor:"selectedLabelTextShadowColor",selectedItemLabelTextShadowHorizontalLength:"selectedLabelTextShadowHorizontalLength",selectedItemLabelTextShadowVerticalLength:"selectedLabelTextShadowVerticalLength",
selectedItemLabelTextShadowBlurRadius:"selectedLabelTextShadowBlurRadius",selectedItemLabelTextShadowOpacity:"selectedLabelTextShadowOpacity",selectedItemOpacity:"selectedOpacity",selectedItemPaddingLeft:"selectedPaddingLeft",selectedItemPaddingTop:"selectedPaddingTop",selectedItemPaddingRight:"selectedPaddingRight",selectedItemPaddingBottom:"selectedPaddingBottom",selectedItemShadow:"selectedShadow",selectedItemThumbnailOpacity:"selectedThumbnailOpacity",selectedItemThumbnailBorderSize:"selectedThumbnailBorderSize",
selectedItemThumbnailBorderColor:"selectedThumbnailBorderColor",selectedItemThumbnailShadow:"selectedThumbnailShadow",selectedItemThumbnailShadowHorizontalLength:"selectedThumbnailShadowHorizontalLength",selectedItemThumbnailShadowVerticalLength:"selectedThumbnailShadowVerticalLength",selectedItemThumbnailShadowBlurRadius:"selectedThumbnailShadowBlurRadius",selectedItemThumbnailShadowSpread:"selectedThumbnailShadowSpread",selectedItemThumbnailShadowColor:"selectedThumbnailShadowColor",selectedItemThumbnailShadowOpacity:"selectedThumbnailShadowOpacity",
tabIndex:"tabIndex",toolTipBackgroundColor:"toolTipBackgroundColor",toolTipBackgroundOpacity:"toolTipBackgroundOpacity",toolTipBorderRadius:"toolTipBorderRadius",toolTipBorderColor:"toolTipBorderColor",toolTipBorderSize:"toolTipBorderSize",toolTipDisplayTime:"toolTipDisplayTime",toolTipFontFamily:"toolTipFontFamily",toolTipFontSize:"toolTipFontSize",toolTipFontColor:"toolTipFontColor",toolTipFontWeight:"toolTipFontWeight",toolTipFontStyle:"toolTipFontStyle",toolTipPaddingBottom:"toolTipPaddingBottom",
toolTipPaddingLeft:"toolTipPaddingLeft",toolTipPaddingTop:"toolTipPaddingTop",toolTipPaddingRight:"toolTipPaddingRight",toolTipShadowBlurRadius:"toolTipShadowBlurRadius",toolTipShadowColor:"toolTipShadowColor",toolTipShadowHorizontalLength:"toolTipShadowHorizontalLength",toolTipShadowOpacity:"toolTipShadowOpacity",toolTipShadowSpread:"toolTipShadowSpread",toolTipShadowVerticalLength:"toolTipShadowVerticalLength",toolTipOpacity:"toolTipOpacity",toolTipTextShadowBlurRadius:"toolTipTextShadowBlurRadius",
toolTipTextShadowColor:"toolTipTextShadowColor",toolTipTextShadowHorizontalLength:"toolTipTextShadowHorizontalLength",toolTipTextShadowOpacity:"toolTipTextShadowOpacity",toolTipTextShadowVerticalLength:"toolTipTextShadowVerticalLength"};l.gR=Object.keys(l.jG);l.hR=Object.keys(l.kG);return l}(c)});
define("tdv/view/core/eventmanager/mousetouch/MouseTouchEventManagerFactory","require exports tdv/view/core/eventmanager/mousetouch/CloseButtonMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/DropDownMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager tdv/view/core/eventmanager/mousetouch/HTMLMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/IconButtonMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ThumbnailListMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ThumbnailGridMouseTouchEventManager tdv/view/buttons/CloseButton tdv/view/list/dropdown/DropDown tdv/view/core/UIComponent tdv/view/html/HTML tdv/view/buttons/IconButton tdv/view/containers/ScrollableContainer tdv/view/list/thumblist/ThumbnailList tdv/view/list/thumbgrid/ThumbnailGrid".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u,v){return function(){function w(){}w.prototype.create=function(x){if(x instanceof l)return new n(x);if(x instanceof v)return new d(x);if(x instanceof u)return new c(x);if(x instanceof f)return new h(x);if(x instanceof r)return new e(x);if(x instanceof q)return new k(x);if(x instanceof t)return new b(x);if(x instanceof p)return new g(x);throw Error("Invalid UI instance");};w.vJ=function(){w.Qo||(w.Qo=new w);return w.Qo};return w}()});
define("tdv/view/containers/Application","require exports tdv/utils tdv/constants/EventName tdv/view/containers/Container tdv/view/core/ContextMenu tdv/view/core/Cursors tdv/view/core/ToolTip tdv/view/lifecycle/LifeCycleManager tdv/view/util/Fullscreen tdv/player/view/util/Device tdv/view/util/UserInitiatedAction tdv/view/util/KeyboardControl tdv/view/events/MouseEvent tdv/view/core/visuals/dom/DOMVisualsFactory tdv/view/core/eventmanager/mousetouch/MouseTouchEventManagerFactory".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t){return function(u){function v(w,x){var y=u.call(this)||this;y.A1=y.A1.bind(y);y.z1=y.z1.bind(y);y.h3=y.h3.bind(y);y.HM=new c;y.xea=new e(y);y.co(y,r.vJ(),t.vJ(),[]);y.gf("Application");y.Nc=w;y.i6=x;y.Nc.style.overflow="hidden";y.Nc.style.userSelect="none";y.Nc.style["-webkit-user-select"]="none";y.Nc.style.touchAction="none";y.Nc.style.visibility="visible";y.Nc.style["-webkit-tap-highlight-color"]="rgba(255, 255, 255, 0)";y.Kd=document.createElement("div");y.Kd.style.position=
"absolute";y.Kd.style.left="0";y.Kd.style.top="0";y.Kd.style.right="0";y.Kd.style.bottom="0";y.Kd.style.width="auto";y.Kd.style.height="auto";y.Kd.style.margin="0";y.Nc.appendChild(y.Kd);y.Kd.appendChild(y.wa().cc());y.Og=void 0;y.Ng=void 0;y.E3a=10;y.lZa=500;y.YU=null;y.jc=new b(y);y.wa().cc().appendChild(y.jc.cc());y.w0=new k(y,y.yya.bind(y));y.w0.bind(n.Xr,l.Br(y.h3),y,!0);y.Uha=!0;y.set("contentOpaque",!0);y.iy=null;y.ER=[];document.addEventListener("mousemove",y.z1);window.addEventListener("mouseout",
y.z1);y.sYa();y.p6=0;y.o6=0;y.fD=1;try{y.p6=window.top.innerWidth,y.o6=window.top.innerHeight,y.lga=!0}catch(z){y.lga=!1}y.uHa();y.lk=new d(w);y.lk.bind(n.V,function(){this.Cfa(this.lk.enabled())},y);p.Wa();return y}P(v,u);v.prototype.start=function(){this.Ys||(this.Ys=!0,this.o(n.Up))};v.prototype.opa=function(){return this.Ys};v.prototype.wa=function(){return u.prototype.wa.call(this)};v.prototype.uHa=function(){this.lga&&!d.enabled()&&(this.p6=window.top.innerWidth,this.o6=window.top.innerHeight)};
v.prototype.clear=function(){var w,x;this.PE(null);this.NFa();this.u0a();this.HM.clear();var y=this.wa().cc();(w=y.parentElement)===null||w===void 0||w.removeChild(y);(x=this.Kd.parentElement)===null||x===void 0||x.removeChild(this.Kd);this.xea=null;this.lk.vsa();this.lk=null;this.w0&&(this.w0.clear(),this.w0=null)};v.prototype.jlb=function(w){this.Uha=w};v.prototype.Cfa=function(w){w?this.KEa():this.wZa()};v.prototype.$y=function(){this.mT=this.fn=this.Kd.clientWidth||0;this.lT=this.dn=this.Kd.clientHeight||
0};v.prototype.PE=function(w){if(this.iy!=w){this.iy&&this.iy.get("id");this.iy!=null&&this.iy.o(new q(n.Qr));this.iy=w;for(var x=[];w!=null;)x=[w].concat(x),w=w.getParent();w=this.ER.length-1;for(var y=!0;w>=0&&y;w--)x.includes(this.ER[w])?y=!1:this.ER[w].o(new q(n.Eb));for(w=0;w<x.length;w++)this.ER.includes(x[w])||x[w].o(new q(n.uc));this.ER=x;this.iy!=null&&this.iy.o(new q(n.UF));this.jc.PE(this.iy)}};v.prototype.z1=function(w){var x=h.offset(this.wa().cc());this.W3a(w,w.pageX-x.left,w.pageY-
x.top)?w.preventDefault():this.PE(null)};v.prototype.yya=function(){return[]};v.prototype.h3=function(){};v.prototype.W3a=function(w,x,y){return this.Q3a(w.target)&&x>=0&&y>=0&&x<this.nb()&&y<this.Mb()};v.prototype.Q3a=function(w){if(!this.Nc)return!1;for(;w;){if(w===this.Nc)return!0;w=w.parentElement}return!1};v.prototype.sYa=function(){window.addEventListener("resize",this.A1);this.Ida=setInterval(function(){this.Gwa()}.bind(this),this.lZa)};v.prototype.u0a=function(){window.removeEventListener("resize",
this.A1);this.Ida&&(clearInterval(this.Ida),this.Ida=null)};v.prototype.Gwa=function(){this.lk.enabled()?this.KEa():this.uHa();var w=this.Kd.clientWidth,x=this.Kd.clientHeight;if(this.Og!=w||this.Ng!=x)this.Og=w,this.Ng=x,this.U9a()};v.prototype.KEa=function(){if(this.lga&&(f.Nd()==f.uB&&f.Tb()==f.Pp||f.Nd()==f.vj)){var w=d.fullscreenElement(),x=w.clientWidth;w=w.clientHeight;var y=(x>w?x:w)/(this.p6>this.o6?this.p6:this.o6),z=Math.round(x/y),A=Math.round(w/y);this.fD=y;this.Kd.style.left=Math.round((x-
z)*.5)+"px";this.Kd.style.top=Math.round((w-A)*.5)+"px";this.Kd.style.right="auto";this.Kd.style.bottom="auto";this.Kd.style.width=z+"px";this.Kd.style.height=A+"px";this.Kd.style.transform="scale("+[y,y].join(", ")+")";this.Kd.style.position="absolute"}else x=document.body.clientWidth,w=document.body.clientHeight,this.Kd.style.left="0",this.Kd.style.top="0",this.Kd.style.right="auto",this.Kd.style.bottom="auto",this.Kd.style.width=x+"px",this.Kd.style.height=w+"px",this.fD=1};v.prototype.wZa=function(){this.Kd.style.position=
"absolute";this.Kd.style.left="0";this.Kd.style.top="0";this.Kd.style.right="0";this.Kd.style.bottom="0";this.Kd.style.width="auto";this.Kd.style.height="auto";this.Kd.style.transform="";this.fD=1};v.prototype.U9a=function(){this.NFa();var w=this;this.YU=setTimeout(function(){w.YU=null;w.lc()},this.E3a)};v.prototype.NFa=function(){this.YU&&(clearTimeout(this.YU),this.YU=null)};v.prototype.A1=function(){this.Gwa()};return v}(g)});
define("tdv/view/containers/XRPanels",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR","tdv/binding/BindingsHandler"],function(a,m,h,n,g){return function(){function k(e){this.eg=e;this.KK=this.KK.bind(this);this.CQ=[];this.Rma=[];n.M.bind(h.V,this.Ta,this,!0);this.KK()}k.prototype.dispose=function(){n.M.h(h.V,this.Ta,this);this.set([])};k.prototype.set=function(e){var b=this,c=e.filter(function(f){return!b.CQ.includes(f)}),d=this.CQ.filter(function(f){return!e.includes(f)});
c.forEach(function(f){f.bra(b.eg);b.kcb(f)});d.forEach(function(f){f.bra(null);b.Tjb(f);f.Jna()});this.CQ=e;this.KK()};k.prototype.get=function(){return this.CQ};k.prototype.kcb=function(e){g.ba(e,["modal","content.visible"],this.KK,!1)};k.prototype.Tjb=function(e){g.da(e,["modal","content.visible"],this.KK)};k.prototype.Ta=function(){this.KK()};k.prototype.KK=function(){function e(l){return l.get("modal")&&(l.get("content")?l.get("content").get("visible"):!1)}var b=this,c=[];if(n.isPresenting){var d=
this.CQ.filter(function(l){return e(l)}),f=this.CQ.filter(function(l){return!e(l)});c=d.length>0?[d[d.length-1]]:f}c.filter(function(l){return!b.Rma.includes(l)}).forEach(function(l){return l.SJa()});this.Rma.filter(function(l){return!c.includes(l)}).forEach(function(l){return l.Jna()});this.Rma=c};return k}()});
define("tdv/view/util/Orientation","require exports tdv/view/core/ZIndex tdv/view/util/Assets tdv/view/util/Fullscreen tdv/constants/EventName tdv/events/EventDispatcher tdv/player/l10n tdv/player/view/util/Device".split(" "),function(a,m,h,n,g,k,e,b,c){function d(){q=TDV.qb.Gt();var v=p||q;l!=v&&(l=v,f.o(k.V));v=!!p&&q!=p&&c.ub();r!=v&&(t||(t=document.createElement("div"),t.style.position="fixed",t.style.zIndex=h.VUa.toString(),t.style.left="0",t.style.top="0",t.style.margin="0",t.style.padding=
"0",t.style.height="100%",t.style.width="100%",t.style.backgroundColor="rgba(255, 255, 255, 0.99)",t.innerHTML=['<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">','<img style="width:22vmin" src="'+n.B_+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+b("rotate-device")+"</div>",
"</div>\n</div>"].join("\n"),u=t.querySelector("img")),r&&t.parentElement.removeChild(t),(r=v)&&(g.enabled()?g.fullscreenElement():document.body).appendChild(t));r&&(u.style.transform=l==f.SVa?"translate(-11%, 0) rotate(-90deg)":"none")}var f=new e;f.Rob=TDV.qb.Wba;f.SVa=TDV.qb.Xba;f.Vw=function(v){p!=v&&(p=v,d())};f.uLa=function(){return p};f.get=function(){return l};var l=void 0,p=void 0,q=void 0,r=!1,t=null,u=null;window.addEventListener("resize",function(){d();setTimeout(d,500)},!0);try{window.screen.orientation.addEventListener("change",
d)}catch(v){window.addEventListener("orientationchange",d,!1)}d();return f});
define("tdv/player/script/Player","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/constants/RotationMode tdv/player/parser/ClassInfo tdv/player/AppInfo tdv/player/l10n tdv/player/script/helper/ButtonProperty tdv/player/view/AcademicWatermark tdv/player/view/CookiesBar tdv/player/view/DownloadBar tdv/player/view/MessageWindow tdv/player/view/UserInteractionWindow tdv/player/view/panorama/renderer/Renderer tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/Installer tdv/player/view/util/LibsLoader tdv/player/view/util/Preloader tdv/player/view/util/URL tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/containers/Application tdv/view/containers/Container tdv/view/containers/XRPanels tdv/view/containers/layout/VerticalLayout tdv/view/util/Fullscreen tdv/view/util/AudioActivation tdv/view/util/Orientation tdv/view/util/UserInitiatedAction tdv/util/Storage".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/constants/RotationMode"),k=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/AppInfo"),b=a("tdv/player/l10n"),c=a("tdv/player/script/helper/ButtonProperty"),d=a("tdv/player/view/AcademicWatermark"),f=a("tdv/player/view/CookiesBar"),l=a("tdv/player/view/DownloadBar"),p=a("tdv/player/view/MessageWindow"),q=a("tdv/player/view/UserInteractionWindow");a("tdv/player/view/panorama/renderer/Renderer");var r=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),
t=a("tdv/player/view/util/Capabilities"),u=a("tdv/player/view/util/Device"),v=a("tdv/player/view/util/Gyroscope"),w=a("tdv/player/view/util/Installer"),x=a("tdv/player/view/util/LibsLoader"),y=a("tdv/player/view/util/Preloader"),z=a("tdv/player/view/util/URL"),A=a("tdv/player/view/util/XR"),D=a("tdv/view/constants/ButtonMode"),F=a("tdv/view/containers/Application"),C=a("tdv/view/containers/Container"),B=a("tdv/view/containers/XRPanels"),H=a("tdv/view/containers/layout/VerticalLayout"),E=a("tdv/view/util/Fullscreen"),
G=a("tdv/view/util/AudioActivation"),N=a("tdv/view/util/Orientation"),O=a("tdv/view/util/UserInitiatedAction"),R=a("tdv/util/Storage"),Q=k.define("Player",F,function(){F.apply(this,arguments);this.fh=new w(this);this.Jxa=new l(this,this.fh);this.Ru=new C;this.Ru.xa({backgroundOpacity:0,visible:!0,width:"100%",height:"100%"});this.NM=new p;this.hO=new q;this.B0=new f(this);new d(this);this.Fbb=new B(this);this.Lma=[];var T=new H;T.M$(0);this.bZ(T);this.kg(!0);this.bind(h.L("settings"),this.P5a,this,
!0);this.k6=TDV.qb.$La();N.bind(h.V,this.y5a,this,!0);G.Xmb();this.UYa=new c(this,"buttonMute",D.af);this.UYa.bind(h.ma,this.jCa,this,!0);this.bZa=new c(this,"buttonUnmute",D.af);this.bZa.bind(h.ma,this.YCa,this,!0);this.d0=new c(this,"buttonToggleMute",D.bk);this.d0.bind(h.Rk,this.jCa,this,!0);this.d0.bind(h.Nm,this.YCa,this,!0);this.bind(h.L("mute"),this.v5a,this);this.d0.set("pressed",this.get("mute"));this.SYa=new c(this,"buttonEnterFullscreen",D.af);this.SYa.bind(h.ma,this.zBa,this,!0);this.TYa=
new c(this,"buttonExitFullscreen",D.af);this.TYa.bind(h.ma,this.ABa,this,!0);this.$_=new c(this,"buttonToggleFullscreen",D.bk);this.$_.bind(h.Rk,this.zBa,this,!0);this.$_.bind(h.Nm,this.ABa,this,!0);this.$_.set("pressed",this.get("fullscreenEnabled"));this.bind(h.L("fullscreenEnabled"),this.d5a,this,!0);this.set("fullscreenEnabled",this.lk.enabled());this.set("defaultMenu",["fullscreen","mute","rotation"]);this.bind(h.Up,this.S5a,this,!0);[h.Sa,h.$a,h.Qk,h.HB,h.YK].forEach(function(Y){this.bind(Y,
function(aa){this.o(new n(h.eG,{nQ:aa}))},this,!0)}.bind(this));["keydown","keyup"].forEach(function(Y){document.addEventListener(Y,function(aa){this.o(new n(h.eG,{nQ:aa}))}.bind(this))}.bind(this));A.M.bind(h.V,function(){A.isPresenting?N.Vw():N.Vw(F.prototype.get.call(this,"lockedOrientation"))},this);this.lk.bind(h.V,function(){var Y=N.uLa();N.Vw();N.Vw(Y)},this)});Q.LUa="orientationChange";Q.prototype.logCapabilities=function(){this.t4a()};Q.prototype.activateAudio=function(T){this.dXa(T)};Q.prototype.Cfa=
function(T){F.prototype.Cfa.apply(this,arguments);this.set("fullscreenEnabled",T)};Q.prototype.Pb=function(){F.prototype.Pb.call(this);this.m("mute",!1);this.m("fullscreenEnabled",!1)};Q.prototype.Kb=function(){F.prototype.Kb.call(this);this.Jxa.getParent()!=this&&this.mb(this.Jxa);this.Ru.getParent()!=this&&(this.mb(this.Ru),this.Ru.mb(this.B0),this.Ru.mb(this.NM),this.Ru.mb(this.hO))};Q.prototype.A7a=function(T){var Y=[];this.NM&&Y.push(this.NM);this.hO&&Y.push(this.hO);this.B0&&Y.push(this.B0);
for(var aa=!0,ba=0;ba<=Y.length&&aa;ba++)aa=T.length-(Y.length-ba)==T.indexOf(Y[ba]);return aa?T:T.filter(function(ea){return Y.indexOf(ea)<0}).concat(Y)};Q.prototype.jb=function(){this.UDa||(this.UDa=m.difference(this.y2a(),"backgroundOpacity visible includeInLayout state left right top bottom centerX centerY width height minWidth minHeight maxWidth maxHeight actualWidth actualHeight paddingLeft paddingTop paddingRight paddingBottom".split(" ")));this.Pc(this.UDa,{},[this.Ru],!0,!0);F.prototype.jb.call(this);
this.Ipb===!0&&this.Gpb()};Q.prototype.set=function(T,Y){switch(T){case "children":this.Ru.set(T,this.A7a(Y));return;case "creationPolicy":this.Ru.set(T,Y);return;case "fullscreenAvailable":case "gyroscopeAvailable":case "cardboardAvailable":case "isMobile":case "orientation":case "surfaceSelectionAvailable":case "touchEnabled":case "touchDevice":case "vrControllerAvailable":case "vrAvailable":Y=this.get(T);break;case "fullscreenEnabled":Y=this.lk.ol()&&Y;break;case "fullscreenFallback":E.ira(Y);
break;case "lockedOrientation":u.kf()&&(Y=void 0);N.Vw(Y);break;case "installAvailable":Y=this.fh.ready();break;case "mouseWheelEnabled":this.jlb(z.Tg("mousewheelenabled",Y));break;case "backgroundPreloadEnabled":this.S7a(Y);break;case "vrPolyfillScale":A.T9=Y;break;case "desktopMipmappingEnabled":r.wkb(Y);break;case "mobileMipmappingEnabled":r.hlb(Y);break;case "defaultVRPointer":Y=="gaze"?A.SRa(A.uua.RF):A.SRa(A.uua.SF);break;case "xrPanels":this.Lma=Y;this.xHa();break;case "xrPanelsEnabled":this.RHa=
this.i6&&Y,this.xHa()}F.prototype.set.call(this,T,Y)};Q.prototype.get=function(T,Y){switch(T){case "children":case "creationPolicy":return this.Ru.get(T,Y);case "touchEnabled":return u.Jp();case "touchDevice":return u.qsa();case "isMobile":return u.ub();case "orientation":return N.get();case "lockedOrientation":return N.uLa();case "gyroscopeAvailable":return v.ol;case "cardboardAvailable":case "vrAvailable":return A.AQ;case "arAvailable":return A.qIa;case "vrControllerAvailable":return A.Cob;case "fullscreenAvailable":return this.lk.ol();
case "vrPolyfillScale":return A.T9;case "installAvailable":return this.fh.ready();case "surfaceSelectionAvailable":return!0;case "pageScale":return this.fD;case "xrPanels":return this.Lma;case "xrPanelsEnabled":return this.RHa;case L:case U:return this.i6?F.prototype.get.apply(this,arguments):!0;default:return F.prototype.get.apply(this,arguments)}};Q.prototype.xHa=function(){this.Fbb.set(this.RHa?this.Lma.slice():[])};Q.prototype.jCa=function(){this.set("mute",!0)};Q.prototype.YCa=function(){this.set("mute",
!1)};Q.prototype.v5a=function(){this.d0.set("pressed",this.get("mute"))};Q.prototype.zBa=function(){this.set("fullscreenEnabled",!0)};Q.prototype.ABa=function(){this.set("fullscreenEnabled",!1)};Q.prototype.d5a=function(){this.get("fullscreenEnabled")?this.lk.xt():this.lk.sm();this.$_.set("pressed",this.get("fullscreenEnabled"));this.set("fullscreenEnabled",this.lk.enabled())};Q.prototype.P5a=function(){var T=this.get("settings");T&&(x.initialize(T),y.Dra(T),THREE.bta=T.get(TDV.PlayerSettings.Haa),
THREE.kta=T.get(TDV.PlayerSettings.Yaa),THREE.YB=T.get(TDV.PlayerSettings.YB),this.fh.Dra(T))};Q.prototype.S7a=function(T){y.enabled(T)};Q.prototype.yya=function(){var T=[];this.RL=[];(this.get("menu")||[]).forEach(function(ba){var ea=ba.get("label");T.push(ba.get("label"));ea&&this.RL.push(function(){ba.o("click")})}.bind(this));var Y=this.get("defaultMenu",[]);if(Y.indexOf("rotation")>=0){var aa=this.Ci("PanoramaPlayer");aa.length&&(T.push(aa[0].get("mouseControlMode")==g.wF?b("change-to-drag-and-release"):
b("change-to-click-and-move")),this.RL.push(this.C$a.bind(this)))}Y.indexOf("fullscreen")>=0&&this.lk.ol()&&(T.push(this.lk.enabled()?b("exit-fullscreen"):b("enter-fullscreen")),this.RL.push(this.A$a.bind(this)));Y.indexOf("mute")>=0&&(T.push(this.get("mute")?b("unmute"):b("mute")),this.RL.push(this.B$a.bind(this)));Y=[].concat(e.name?[e.name]:[],e.jeb!="false"?e.XX?["v:"+e.XX+"."+e.cY]:["v:"+e.cY]:[]).join(" ");Y!=""&&(T.length>0&&T.push(""),T.push(Y),this.RL.push(this.f6a.bind(this)));return T};
Q.prototype.h3=function(T){this.RL[T.data.index]()};Q.prototype.C$a=function(){var T=this.Ci("PanoramaPlayer"),Y=T[0].get("mouseControlMode")==g.wF?g.ux:g.wF;T.forEach(function(aa){R.setItem(K,Y);aa.set("mouseControlMode",Y)})};Q.prototype.S5a=function(){R.getItem(K)==g.ux&&this.Ci("PanoramaPlayer").forEach(function(T){T.set("mouseControlMode",g.ux)});z.Bk("mute")&&this.set("mute",z.Tg("mute",this.get("mute")))};Q.prototype.A$a=function(){this.lk.toggle()};Q.prototype.B$a=function(){this.set("mute",
!this.get("mute"))};Q.prototype.f6a=function(){e.PTa&&window.open(e.PTa,"_blank")};Q.prototype.y5a=function(){this.o(Q.LUa)};Q.prototype.t4a=function(){m.Beb(!0);m.log("UA: "+navigator.userAgent);m.log("screen: ("+Math.max(window.screen.width,window.screen.height)+", "+Math.min(window.screen.width,window.screen.height)+") dpr: "+window.devicePixelRatio+" ("+Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio+", "+Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio+
")");u.log();t.log();b.log();A.log()};Q.prototype.dXa=function(T){G.active()?O.wait(T):(G.Usa(T),G.request(this))};var K="tdvp_"+window.location.pathname+"_rotation_mode",L=[119,97,116,101,114,109,97,114,107].map(function(T){return String.fromCharCode(T)}).join(""),U=[97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107].map(function(T){return String.fromCharCode(T)}).join("");return Q});
define("tdv/player/script/PlayerMenuItem",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PlayerMenuItem",m,function(){m.call(this)})});
define("tdv/player/script/PopupPanoramaOverlay","require tdv/utils tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){a("tdv/utils");var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/helper/PlaybackPositionHelper");a=g.define("PopupPanoramaOverlay",m,function(){m.call(this);
this.set("state",n.ca);this.bind(h.L("state"),function(){this.o(h.Pd)},this,!0);this.Gd=void 0});a.prototype.show=function(){this.set("visible",!0)};a.prototype.oe=function(){this.set("visible",!1)};a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=function(){this.set("state",n.iL)};a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.hide=a.prototype.oe;a.prototype.pause=a.prototype.pause;a.prototype.play=a.prototype.play;a.prototype.show=a.prototype.show;a.prototype.stop=
a.prototype.stop;a.prototype.get=function(e,b){switch(e){case "playbackPositions":return this.Gd===void 0&&(this.Gd=k.Ufb(this)),this.Gd}return m.prototype.get.call(this,e,b)};a.prototype.set=function(e,b){var c=!1;switch(e){case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "rotationZ":case "yaw":case "playbackPositions":this.Gd=void 0,c=!0}m.prototype.set.call(this,e,b);c&&e!="playbackPositions"&&this.o(h.L("playbackPositions"))};return a});
define("tdv/player/script/ProgressBar",["require","tdv/player/view/ProgressBar","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/view/ProgressBar");return a("tdv/player/parser/ClassInfo").define("ProgressBar",m,function(){m.call(this)})});
define("tdv/player/script/QuadFramePanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("QuadFramePanoramaOverlay",m,function(){m.call(this);this.Gd=void 0});a.prototype.set=function(k,e){var b=!1;switch(k){case "vertices":case "playbackPositions":this.Gd=
void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===void 0&&(this.Gd=g.Joa(this)),this.Gd}return m.prototype.get.call(this,k,e)};return a});
define("tdv/player/script/QuadHotspotPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlay");return m.define("QuadHotspotPanoramaOverlay",h,function(){h.call(this)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayArea",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayArea"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlayArea");return m.define("QuadHotspotPanoramaOverlayArea",h,function(){h.apply(this,arguments)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("QuadHotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Gd=void 0});a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===
void 0&&(this.Gd=g.Joa(this)),this.Gd}return m.prototype.get.call(this,k,e)};a.prototype.set=function(k,e){var b=!1;switch(k){case "opacity":case "distance":case "vertices":case "playbackPositions":this.Gd=void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};return a});
define("tdv/player/script/QuadHotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/QuadHotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");return m.define("QuadHotspotPanoramaOverlayImage",h,function(){h.call(this)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/QuadHotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");return m.define("QuadHotspotPanoramaOverlayMap",h,function(){h.call(this)})});
define("tdv/player/script/QuadVideoPanoramaOverlay","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/script/helper/PlaybackPositionHelper");a=k.define("QuadVideoPanoramaOverlay",
m,function(){m.call(this);this.Gd=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",n.$b)};a.prototype.stop=a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.set=function(b,c){var d=!1;switch(b){case "state":var f=this.get("state")||n.ca;f==n.ca&&c==n.PLAYING&&this.o(h.Up);f!=c&&this.o(new g(h.Pd,{oldState:f,state:c}));break;case "enabledInCardboard":this.set("enabledInVR",c);break;case "distance":case "opacity":case "playbackPositions":case "vertices":this.Gd=
void 0,d=!0}m.prototype.set.call(this,b,c);d&&b!="playbackPositions"&&this.o(h.L("playbackPositions"))};a.prototype.get=function(b,c){switch(b){case "playbackPositions":return this.Gd===void 0&&(this.Gd=e.Joa(this)),this.Gd}return m.prototype.get.call(this,b,c)};return a});
define("tdv/player/script/RadialModel3DDisplayEffect",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RadialModel3DDisplayEffect",m,function(){m.call(this)})});
define("tdv/player/script/RainPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("RainPanoramaOverlay",m,function(){m.call(this)});a.prototype.get=function(h,n){h=="startState"&&n===void 0&&(n=this.get("initialState"));return m.prototype.get.call(this,h,n)};return a});
define("tdv/player/script/RotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RotationalCameraMovement",m,function(){m.call(this)})});define("tdv/player/script/SlideInEffect",["require","tdv/view/effects/SlideInEffect","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/effects/SlideInEffect");return a("tdv/player/parser/ClassInfo").define("SlideInEffect",m,function(){m.call(this)})});
define("tdv/player/script/SlideOutEffect",["require","tdv/view/effects/SlideOutEffect","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/effects/SlideOutEffect");return a("tdv/player/parser/ClassInfo").define("SlideOutEffect",m,function(){m.call(this)})});
define("tdv/player/script/SnowPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("SnowPanoramaOverlay",m,function(){m.call(this)});a.prototype.get=function(h,n){h=="startState"&&n===void 0&&(n=this.get("initialState"));return m.prototype.get.call(this,h,n)};return a});
define("tdv/player/script/SphericPanoramaFrame",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaFrame"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PanoramaFrame");a=m.define("SphericPanoramaFrame",h,function(){h.call(this)});a.prototype.Mn=function(){var n=this.get("sphere");return n&&m.Oa("Video360Resource",n)?!0:(n=this.get("stereoSphere"))&&m.Oa("Video360Resource",n)?!0:!1};return a});
define("tdv/player/script/SphereModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("SphereModel3DObject",h,function(){h.call(this)})});define("tdv/player/script/SpotLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("SpotLight",m,function(){m.call(this)})});
define("tdv/player/script/SpriteModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");a=m.define("SpriteModel3DObject",h,function(){h.call(this)});a.prototype.getPixelScale=function(){return this.get("worldPixelScale")};return a});
define("tdv/player/script/SurfaceReticleModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("SurfaceReticleModel3DObject",h,function(){h.call(this);this.set("transparentAreaActive",!0)})});
define("tdv/view/containers/tabpanel/Tab","require exports tdv/binding/ChangeWatcher tdv/view/containers/Container tdv/view/constants/Alignment tdv/view/text/Label".split(" "),function(a,m,h,n,g,k){return function(e){function b(c){var d=e.call(this)||this;d.gf("Tab");d.Sia=c;d.An="";d.gla=!1;d.Za=null;d.dAa=null;d.set("childrenInteractionEnabled",!1);d.set("contentOpaque",!0);return d}P(b,e);b.prototype.Pb=function(){e.prototype.Pb.call(this);this.m("horizontalAlign",g.$e);this.m("verticalAlign",
g.$d);this.m("fontFamily");this.m("fontSize");this.m("fontColor");this.m("fontWeight");this.m("fontStyle");this.m("textDecoration");this.m("textShadowBlurRadius");this.m("textShadowColor");this.m("textShadowHorizontalLength");this.m("textShadowOpacity");this.m("textShadowVerticalLength")};b.prototype.Kb=function(){e.prototype.Kb.call(this);this.Za==null&&(this.Za=new k,this.Za.set("horizontalAlign","center"),this.mb(this.Za))};b.prototype.bs=function(){e.prototype.bs.call(this);this.dAa=h.jx(this.Sia,
"label",this.XM,this);this.h5(this.Sia.get("label"))};b.prototype.Vja=function(){e.prototype.Vja.call(this);this.dAa.jF()};b.prototype.XM=function(){var c=this.Sia.get("label");this.h5(c?c:"")};b.prototype.h5=function(c){this.An!=c&&(this.An=c,this.gla=!0,this.Tf())};b.prototype.jb=function(){this.gla&&(this.gla=!1,this.Za.set("text",this.An));this.Pc(b.ova,b.kR,[this.Za],!0,!0);e.prototype.jb.call(this)};b.ova="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");
b.kR=Object.fromEntries(b.ova.map(function(c){return[c,c]}));return b}(n)});define("tdv/view/containers/tabpanel/TabsAlignment",["require","exports"],function(){return{VQ:"normal",bL:"inverse",dta:"center"}});
define("tdv/view/containers/tabpanel/TabPanel","require exports tdv/utils tdv/view/constants/GradientDirection tdv/view/constants/Cursor tdv/constants/EventName tdv/view/containers/Container tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/containers/tabpanel/Tab tdv/view/containers/tabpanel/TabsAlignment tdv/view/constants/Position tdv/view/core/visuals/VisualsType".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q){return function(r){function t(){var u=
r.call(this)||this;u.gf("TabPanel");u.Jg=-1;u.tI=!1;u.IV=[];u.E5=!1;u.hl=[];u.Tia=!1;u.HV=[];u.ui=null;u.Ph=null;u.pK(!1);return u}P(t,r);t.prototype.Pb=function(){r.prototype.Pb.call(this);this.m("pages",[]);this.m("selectedIndex",-1);this.m("tabsSize",25);this.m("tabsPosition",p.Tc);this.m("tabsGap",0);this.m("tabsPadding",10);this.m("tabsAlign",l.VQ);this.m("tabsBackgroundOpacity",.6);this.m("tabsBackgroundColor",["#FFFFFF","#CCCCCC"]);this.m("tabsBackgroundColorRatios",[0,.5]);this.m("tabsRollOverBackgroundOpacity",
1);this.m("tabsRollOverBackgroundColor",["#FFFFFF","#CCCCCC"]);this.m("tabsRollOverBackgroundColorRatios",[0,.5]);this.m("backgroundColor","#FFFFFF");this.m("selectedTabBackgroundOpacity",1);this.m("selectedTabBackgroundColor");this.m("selectedTabBackgroundColorRatios");this.m("borderRadius",6);this.m("pagePaddingLeft",4);this.m("pagePaddingTop",4);this.m("pagePaddingRight",4);this.m("pagePaddingBottom",4);this.m("borderColor","#AAAAAA");this.m("borderSize",1);this.m("selectedTabFontSize");this.m("selectedTabFontColor");
this.m("selectedTabFontWeight");this.m("selectedTabFontStyle");this.m("selectedTabTextDecoration");this.m("selectedTabTextShadowBlurRadius");this.m("selectedTabTextShadowColor");this.m("selectedTabTextShadowHorizontalLength");this.m("selectedTabTextShadowOpacity");this.m("selectedTabTextShadowVerticalLength");this.m("tabsFontFamily");this.m("tabsFontSize");this.m("tabsFontColor");this.m("tabsFontWeight");this.m("tabsFontStyle");this.m("tabsTextDecoration");this.m("tabsTextShadowBlurRadius");this.m("tabsTextShadowColor");
this.m("tabsTextShadowHorizontalLength");this.m("tabsTextShadowOpacity");this.m("tabsTextShadowVerticalLength");this.m("tabsRollOverFontSize");this.m("tabsRollOverFontColor");this.m("tabsRollOverFontWeight");this.m("tabsRollOverFontStyle");this.m("tabsRollOverTextDecoration");this.m("tabsRollOverTextShadowBlurRadius");this.m("tabsRollOverTextShadowColor");this.m("tabsRollOverTextShadowHorizontalLength");this.m("tabsRollOverTextShadowOpacity");this.m("tabsRollOverTextShadowVerticalLength")};t.prototype.co=
function(u,v,w,x){r.prototype.co.call(this,u,v,w,x);this.yD("shadow")};t.prototype.Kb=function(){e.prototype.Kb.call(this);this.Ph==null&&(this.Ph=new e,this.Ph.pK(!1),this.mb(this.Ph));this.ui==null&&(this.ui=new e,this.ui.pK(!1),this.mb(this.ui))};t.prototype.set=function(u,v){u=="pages"?this.mlb(v||[]):u=="selectedIndex"?this.Zw(v):u=="layout"&&(v=c.Fob);e.prototype.set.call(this,u,v)};t.prototype.get=function(u,v){return u=="pages"?this.hl:u=="selectedIndex"?this.QLa():e.prototype.get.call(this,
u,v)};t.prototype.Zw=function(u){this.Jg!=u&&(this.Jg=u,this.Jg=Math.min(Math.max(this.Jg,-1),this.hl.length),this.tI=!0,this.Tf(),this.o(k.V),this.o(k.L("selectedIndex")))};t.prototype.QLa=function(){return this.Jg};t.prototype.mlb=function(u){var v=this;h.x8(this.hl,u)||(this.hl.forEach(function(w){w.h(k.od,v.pDa,v);w.h(k.jd,v.oDa,v)}),this.hl=u,this.hl.forEach(function(w){w.bind(k.od,v.pDa,v,!1);w.bind(k.jd,v.oDa,v,!1)}),this.Tia=!0,this.Tf())};t.prototype.o$a=function(u){this.IV=h.union(this.IV,
[u.source]);this.E5=!0;this.Tf()};t.prototype.n$a=function(u){this.IV=h.difference(this.IV,[u.source]);this.E5=!0;this.Tf()};t.prototype.m$a=function(u){this.Zw(this.HV.indexOf(u.source))};t.prototype.pDa=function(u){this.Zw(this.hl.indexOf(u.source))};t.prototype.oDa=function(u){if(this.hl.indexOf(u.source)==this.Jg){for(u=this.hl.length-1;u>=0;u--)if(this.hl[u].get("visible")){this.Zw(u);return}this.Jg=-1;this.Zw(0)}};t.prototype.jb=function(){var u=this,v=!1,w=!1,x=!1,y=!1,z=!1,A=this.G("tabsPosition"),
D=this.G("tabsAlign");this.Tia&&(this.HV=[],this.ui.mQa(),this.Ph.mQa(),this.hl.forEach(function(H){var E=new f(H);E.pK(!0);E.bind(k.uc,u.o$a,u,!1);E.bind(k.Eb,u.n$a,u,!1);E.bind(k.Sa,u.m$a,u,!1);u.HV.push(E);u.ui.mb(E);H.xa({top:void 0,left:void 0,right:void 0,bottom:void 0,width:"100%",height:"100%"});u.Ph.mb(H)}),this.Jg=Math.min(Math.max(this.Jg,0),this.hl.length-1),this.Tia=!1,w=v=z=!0);this.S("tabsPosition")&&(this.$("tabsPosition"),y=w=v=!0);this.tI&&(this.tI=!1,x=w=z=!0);this.E5&&(this.E5=
!1,x=!0);this.S("overflow")&&this.ui.xa({contentOpaque:this.G("overflow")==d.Wr,overflow:this.G("overflow")});["tabsAlign","tabsGap","tabsSize"].forEach(function(H){u.S(H)&&(u.$(H),v=!0)});"borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize borderColor borderLeftColor borderTopColor borderRightColor borderBottomColor shadow shadowHorizontalLength shadowVerticalLength shadowBlurRadius shadowSpread shadowColor backgroundOpacity backgroundColor backgroundColorRatios".split(" ").forEach(function(H){u.S(H)&&
(u.$(H),y=w=!0)});"tabsBackgroundOpacity tabsBackgroundColor tabsBackgroundColorRatios selectedTabBackgroundOpacity selectedTabBackgroundColor selectedTabBackgroundColorRatios selectedTabFontSize selectedTabFontColor selectedTabFontWeight selectedTabFontStyle selectedTabTextDecoration selectedTabTextShadowColor selectedTabTextShadowHorizontalLength selectedTabTextShadowVerticalLength selectedTabTextShadowBlurRadius selectedTabTextShadowOpacity tabsFontFamily tabsFontSize tabsFontColor tabsFontWeight tabsFontStyle tabsPadding tabsTextDecoration tabsRollOverFontSize tabsRollOverFontColor tabsTextShadowColor tabsTextShadowHorizontalLength tabsTextShadowVerticalLength tabsTextShadowBlurRadius tabsTextShadowOpacity tabsRollOverFontWeight tabsRollOverFontStyle tabsRollOverTextDecoration tabsRollOverTextShadowColor tabsRollOverTextShadowHorizontalLength tabsRollOverTextShadowVerticalLength tabsRollOverTextShadowBlurRadius tabsRollOverTextShadowOpacity".split(" ").forEach(function(H){u.S(H)&&
(u.$(H),w=!0)});["pagePaddingLeft","pagePaddingTop","pagePaddingRight","pagePaddingBottom"].forEach(function(H){u.S(H)&&(u.$(H),y=!0)});this.S("backgroundColorDirection")&&this.$("backgroundColorDirection");if(v){switch(A){case p.fb:this.ui.xa({left:0,right:void 0});break;case p.Db:this.ui.xa({left:void 0,right:0});break;case p.Tc:this.ui.xa({bottom:void 0,top:0});break;case p.Hc:this.ui.xa({bottom:0,top:void 0})}switch(A){case p.fb:case p.Db:this.ui.xa({layout:c.Uk,top:0,bottom:0,height:void 0,width:this.G("tabsSize")});
switch(D){case l.bL:this.ui.set("verticalAlign",b.Hc);break;case l.dta:this.ui.set("verticalAlign",b.$d);break;default:this.ui.set("verticalAlign",b.Tc)}break;case p.Tc:case p.Hc:switch(this.ui.xa({layout:c.Ni,left:0,right:0,height:this.G("tabsSize"),width:void 0}),D){case l.bL:this.ui.set("horizontalAlign",b.Db);break;case l.dta:this.ui.set("horizontalAlign",b.$e);break;default:this.ui.set("horizontalAlign",b.fb)}}this.ui.set("gap",this.G("tabsGap"))}if(w)for(var F=0;F<this.hl.length;F++){var C=
this.HV[F];A==p.Hc||A==p.Tc?C.xa({layout:c.Ni,width:void 0,paddingLeft:this.G("tabsPadding"),paddingTop:0,paddingRight:this.G("tabsPadding"),paddingBottom:0,height:"100%",backgroundColorDirection:n.pca}):C.xa({layout:c.Uk,width:"100%",paddingLeft:0,paddingTop:this.G("tabsPadding"),paddingRight:0,paddingBottom:this.G("tabsPadding"),height:void 0,backgroundColorDirection:n.q_});A==p.Hc||A==p.Db?C.set("borderTopLeftRadius",0):C.set("borderTopLeftRadius",this.G("borderTopLeftRadius","borderTopRadius",
"borderLeftRadius","borderRadius"));A==p.Hc||A==p.fb?C.set("borderTopRightRadius",0):C.set("borderTopRightRadius",this.G("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));A==p.Tc||A==p.Db?C.set("borderBottomLeftRadius",0):C.set("borderBottomLeftRadius",this.G("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));A==p.Tc||A==p.fb?C.set("borderBottomRightRadius",0):C.set("borderBottomRightRadius",this.G("borderBottomRightRadius","borderBottomRadius",
"borderRightRadius","borderRadius"));A==p.Db&&C.set("borderSize",this.G("borderRightSize","borderSize"));A==p.fb&&C.set("borderSize",this.G("borderLeftSize","borderSize"));A==p.Tc&&C.set("borderSize",this.G("borderTopSize","borderSize"));A==p.Hc&&C.set("borderSize",this.G("borderBottomSize","borderSize"));switch(A){case p.fb:var B=this.G("borderLeftColor","borderColor");break;case p.Db:B=this.G("borderRightColor","borderColor");break;case p.Hc:B=this.G("borderBottomColor","borderColor");break;default:case p.Tc:B=
this.G("borderTopColor","borderColor")}C.set("borderColor",B);C.xa({fontFamily:this.G("tabsFontFamily"),shadow:this.G("shadow")&&this.iNa(),shadowHorizontalLength:this.G("shadowHorizontalLength"),shadowVerticalLength:this.G("shadowVerticalLength"),shadowBlurRadius:this.G("shadowBlurRadius"),shadowSpread:this.G("shadowSpread"),shadowColor:this.G("shadowColor")})}if(w||x)for(F=0;F<this.hl.length;F++)C=this.HV[F],x=F==this.Jg,B=this.IV.includes(C),x?(B=this.G("selectedTabBackgroundColor","tabsBackgroundColor"),
B===void 0&&(B=this.G("backgroundColor"),B=Array.isArray(B)&&B.length>0?A==p.fb||A==p.Tc?B[0]:B[B.length-1]:B),C.xa({backgroundOpacity:this.G("selectedTabBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:B,backgroundColorRatios:this.G("selectedTabBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:g.Ee,fontSize:this.G("selectedTabFontSize","tabsFontSize"),fontColor:this.G("selectedTabFontColor","tabsFontColor"),fontWeight:this.G("selectedTabFontWeight","tabsFontWeight"),
fontStyle:this.G("selectedTabFontStyle","tabsFontStyle"),textDecoration:this.G("selectedTabTextDecoration","tabsTextDecoration"),textShadowColor:this.G("selectedTabTextShadowColor","tabsTextShadowColor"),textShadowHorizontalLength:this.G("selectedTabTextShadowHorizontalLength","tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.G("selectedTabTextShadowVerticalLength","tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("selectedTabTextShadowBlurRadius","tabsTextShadowBlurRadius"),
textShadowOpacity:this.G("selectedTabTextShadowOpacity","tabsTextShadowOpacity")})):B?C.xa({backgroundOpacity:this.G("tabsRollOverBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.G("tabsRollOverBackgroundColor","tabsBackgroundColor"),backgroundColorRatios:this.G("tabsRollOverBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:g.qf,fontSize:this.G("tabsRollOverFontSize","tabsFontSize"),fontColor:this.G("tabsRollOverFontColor","tabsFontColor"),fontWeight:this.G("tabsRollOverFontWeight",
"tabsFontWeight"),fontStyle:this.G("tabsRollOverFontStyle","tabsFontStyle"),textDecoration:this.G("tabsRollOverTextDecoration","tabsTextDecoration"),textShadowColor:this.G("tabsRollOverTextShadowColor","tabsTextShadowColor"),textShadowHorizontalLength:this.G("tabsRollOverTextShadowHorizontalLength","tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.G("tabsRollOverTextShadowVerticalLength","tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("tabsRollOverTextShadowBlurRadius","tabsTextShadowBlurRadius"),
textShadowOpacity:this.G("tabsRollOverTextShadowOpacity","tabsTextShadowOpacity")}):C.xa({backgroundOpacity:this.G("tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.G("tabsBackgroundColor"),backgroundColorRatios:this.G("tabsBackgroundColorRatios"),fontSize:this.G("tabsFontSize"),fontColor:this.G("tabsFontColor"),fontWeight:this.G("tabsFontWeight"),fontStyle:this.G("tabsFontStyle"),textDecoration:this.G("tabsTextDecoration"),textShadowColor:this.G("tabsTextShadowColor"),textShadowHorizontalLength:this.G("tabsTextShadowHorizontalLength"),
textShadowVerticalLength:this.G("tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("tabsTextShadowBlurRadius"),textShadowOpacity:this.G("tabsTextShadowOpacity")}),C.xa({borderLeftSize:A==p.Db&&x?0:void 0,borderRightSize:A==p.fb&&x?0:void 0,borderBottomSize:A==p.Tc&&x?0:void 0,borderTopSize:A==p.Hc&&x?0:void 0});if(y){F=this.G("tabsSize");switch(A){case p.fb:this.Ph.xa({left:F-(this.G("borderLeftSize","borderSize")||0),right:0,top:0,bottom:0});break;case p.Db:this.Ph.xa({left:0,right:F-(this.G("borderRightSize",
"borderSize")||0),top:0,bottom:0});break;case p.Tc:this.Ph.xa({left:0,right:0,top:F-(this.G("borderTopSize","borderSize")||0),bottom:0});break;case p.Hc:this.Ph.xa({left:0,right:0,top:0,bottom:F-(this.G("borderBottomSize","borderSize")||0)})}A==p.Tc&&D==l.VQ||A==p.fb&&D==l.VQ?this.Ph.set("borderTopLeftRadius",0):this.Ph.set("borderTopLeftRadius",this.G("borderTopLeftRadius","borderTopRadius","borderLeftRadius","borderRadius"));A==p.Tc&&D==l.bL||A==p.Db&&D==l.VQ?this.Ph.set("borderTopRightRadius",
0):this.Ph.set("borderTopRightRadius",this.G("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));A==p.Hc&&D==l.VQ||A==p.fb&&D==l.bL?this.Ph.set("borderBottomLeftRadius",0):this.Ph.set("borderBottomLeftRadius",this.G("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));A==p.Hc&&D==l.bL||A==p.Db&&D==l.bL?this.Ph.set("borderBottomRightRadius",0):this.Ph.set("borderBottomRightRadius",this.G("borderBottomRightRadius","borderBottomRadius","borderRightRadius",
"borderRadius"));this.Ph.xa({paddingLeft:this.G("pagePaddingLeft"),paddingTop:this.G("pagePaddingTop"),paddingRight:this.G("pagePaddingRight"),paddingBottom:this.G("pagePaddingBottom"),borderLeftSize:this.G("borderLeftSize","borderSize"),borderTopSize:this.G("borderTopSize","borderSize"),borderRightSize:this.G("borderRightSize","borderSize"),borderBottomSize:this.G("borderBottomSize","borderSize"),borderLeftColor:this.G("borderLeftColor","borderColor"),borderTopColor:this.G("borderTopColor","borderColor"),
borderRightColor:this.G("borderRightColor","borderColor"),borderBottomColor:this.G("borderBottomColor","borderColor"),shadow:this.G("shadow")&&this.iNa(),shadowHorizontalLength:this.G("shadowHorizontalLength"),shadowVerticalLength:this.G("shadowVerticalLength"),shadowBlurRadius:this.G("shadowBlurRadius"),shadowSpread:this.G("shadowSpread"),shadowColor:this.G("shadowColor"),backgroundOpacity:this.G("backgroundOpacity"),backgroundColor:this.G("backgroundColor"),backgroundColorRatios:this.G("backgroundColorRatios")});
A==p.Tc||A==p.Hc?this.Ph.set("backgroundColorDirection",n.pca):this.Ph.set("backgroundColorDirection",n.q_)}if(z)for(F=0;F<this.hl.length;F++)this.hl[F].set("visible",F==this.Jg);e.prototype.jb.call(this)};t.prototype.iNa=function(){var u;return((u=this.VI)===null||u===void 0?void 0:u.getType())===q.DOM};return t}(e)});
define("tdv/player/script/TabPanel",["require","tdv/view/containers/tabpanel/TabPanel","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/containers/tabpanel/TabPanel");return a("tdv/player/parser/ClassInfo").define("TabPanel",m,function(){m.call(this)})});
define("tdv/view/containers/tabpanel/Page",["require","exports","tdv/view/containers/Container"],function(a,m,h){return function(n){function g(){var k=n.call(this)||this;k.gf("Page");k.set("label","");return k}P(g,n);g.prototype.Pb=function(){n.prototype.Pb.call(this);this.m("visible")};return g}(h)});
define("tdv/player/script/TabPanelPage",["require","tdv/view/containers/tabpanel/Page","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/containers/tabpanel/Page");return a("tdv/player/parser/ClassInfo").define("TabPanelPage",m,function(){m.call(this)})});
define("tdv/player/script/TargetPanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetPanoramaCameraMovement",m,function(){m.call(this)})});
define("tdv/player/script/TargetRotationalCameraDisplayMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetRotationalCameraDisplayMovement",m,function(){m.call(this)})});
define("tdv/player/script/TiledImageResourceLevel",["require","tdv/player/script/ImageResourceLevel","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/ImageResourceLevel");return a("tdv/player/parser/ClassInfo").define("TiledImageResourceLevel",m,function(){m.call(this)})});
define("tdv/player/script/TripodCapPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/CapPanoramaOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/CapPanoramaOverlay");return m.define("TripodCapPanoramaOverlay",h,function(){h.call(this)})});
define("tdv/player/script/ThumbnailGrid","require tdv/constants/EventName tdv/view/list/thumbgrid/ThumbnailGrid tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/view/constants/ButtonMode tdv/view/images/fliputil".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/view/list/thumbgrid/ThumbnailGrid"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),k=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/images/fliputil");a=n.define("ThumbnailGrid",
h,function(){h.call(this);this.Td=null;this.set("itemMode","normal");this.ps=!1;this.wR=new g(this,"buttonScrollDown",k.af);this.wR.bind(m.ma,this.JQa,this);this.xR=new g(this,"buttonScrollLeft",k.af);this.xR.bind(m.ma,this.scrollLeft,this);this.yR=new g(this,"buttonScrollRight",k.af);this.yR.bind(m.ma,this.MQa,this);this.zR=new g(this,"buttonScrollUp",k.af);this.zR.bind(m.ma,this.NQa,this);this.bind(m.V,this.U5a,this)});a.prototype.Lk=function(){h.prototype.Lk.call(this);this.LI()};a.prototype.MI=
function(){h.prototype.MI.call(this);this.LI()};a.prototype.LI=function(){this.wR.set("visible",!this.ps||this.JO());this.zR.set("visible",!this.ps||this.LO());this.xR.set("visible",!this.ps||this.T6());this.yR.set("visible",!this.ps||this.U6())};a.prototype.set=function(b,c){if(b=="itemMode"){switch(c){case "thumbnail-only":this.set("itemLabelFunction",this.AH);this.set("itemThumbnailUrlFunction",this.YS);this.set("itemTooltipFunction",this.Uy);this.set("itemSourceProperties",["label","media.label",
"media.thumbnailUrl","media.flipImageHorizontally"]);break;case "label-only":this.set("itemLabelFunction",this.Uy);this.set("itemThumbnailUrlFunction",this.AH);this.set("itemTooltipFunction",this.AH);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.Uy),this.set("itemThumbnailUrlFunction",this.YS),this.set("itemTooltipFunction",this.Uy),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}h.prototype.set.call(this,
b,c)}else b=="playList"?(this.Td&&this.Td.h("change",this.mz,this),(this.Td=c)?(this.set("items",this.Td.get("items")),this.set("selectedIndex",this.Td.get("selectedIndex")),this.Td.bind("change",this.mz,this,!0)):this.set("items",[])):b=="hideScrollButtons"?(this.ps=c,this.LI()):h.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){switch(b){case "playList":return this.Td;default:return h.prototype.get.call(this,b,c)}};a.prototype.mz=function(){this.set("items",this.Td.get("items"));this.set("selectedIndex",
this.Td.get("selectedIndex"))};a.prototype.U5a=function(){this.Td&&this.Td.set("selectedIndex",this.get("selectedIndex"))};a.prototype.AH=function(){};a.prototype.Uy=function(b){return b.get("label")||b.get("media").get("label")};a.prototype.YS=function(b){b=b.get("media");var c=b.get("thumbnailUrl");b.get("flipImageHorizontally")&&(c=e.bIa(c));return c};return a});
define("tdv/player/script/ThumbnailList","require tdv/constants/EventName tdv/view/list/thumblist/ThumbnailList tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/view/constants/ButtonMode tdv/view/images/fliputil".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/view/list/thumblist/ThumbnailList"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),k=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/images/fliputil");a=n.define("ThumbnailList",
h,function(){h.call(this);this.Td=null;this.ps=!1;this.wR=new g(this,"buttonScrollDown",k.af);this.wR.bind(m.ma,this.JQa,this);this.xR=new g(this,"buttonScrollLeft",k.af);this.xR.bind(m.ma,this.scrollLeft,this);this.yR=new g(this,"buttonScrollRight",k.af);this.yR.bind(m.ma,this.MQa,this);this.zR=new g(this,"buttonScrollUp",k.af);this.zR.bind(m.ma,this.NQa,this);this.bind(m.V,this.V5a,this)});a.prototype.Lk=function(){h.prototype.Lk.call(this);this.LI()};a.prototype.MI=function(){h.prototype.MI.call(this);
this.LI()};a.prototype.LI=function(){this.wR.set("visible",!this.ps||this.JO());this.zR.set("visible",!this.ps||this.LO());this.xR.set("visible",!this.ps||this.T6());this.yR.set("visible",!this.ps||this.U6())};a.prototype.set=function(b,c){if(b=="itemMode"){switch(c){case "thumbnail-only":this.set("itemLabelFunction",this.AH);this.set("itemThumbnailUrlFunction",this.YS);this.set("itemTooltipFunction",this.Uy);this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"]);
break;case "label-only":this.set("itemLabelFunction",this.Uy);this.set("itemThumbnailUrlFunction",this.AH);this.set("itemTooltipFunction",this.AH);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.Uy),this.set("itemThumbnailUrlFunction",this.YS),this.set("itemTooltipFunction",this.Uy),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}h.prototype.set.call(this,b,c)}else b=="playList"?(this.Td&&
this.Td.h("change",this.mz,this),(this.Td=c)?(this.set("items",this.Td.get("items")),this.Td.bind("change",this.mz,this)):this.set("items",[])):b=="hideScrollButtons"?(this.ps=c,this.LI()):h.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){switch(b){case "playList":return this.Td;default:return h.prototype.get.call(this,b,c)}};a.prototype.mz=function(){this.set("items",this.Td.get("items"));this.set("selectedIndex",this.Td.get("selectedIndex"))};a.prototype.V5a=function(){this.Td&&this.Td.set("selectedIndex",
this.get("selectedIndex"))};a.prototype.AH=function(){};a.prototype.Uy=function(b){return b.get("label")||b.get("media").get("label")};a.prototype.YS=function(b){b=b.get("media");var c=b.get("thumbnailUrl");b.get("flipImageHorizontally")&&(c=e.bIa(c));return c};return a});define("tdv/player/script/UIComponent",["require","tdv/view/core/UIComponent","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/core/UIComponent");return a("tdv/player/parser/ClassInfo").define("UIComponent",m,function(){m.call(this)})});
define("tdv/player/script/Video",["require","tdv/player/parser/ClassInfo","tdv/player/script/Media"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Media");a=m.define("Video",h,function(){h.call(this);this.Ja=void 0});a.prototype.tw=function(){this.get("video");return[]};return a});
define("tdv/player/script/VideoPanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Panorama");return m.define("VideoPanorama",h,function(){h.call(this)})});
define("tdv/player/script/Video360Resource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Video360Resource",m,function(){m.call(this)});a.prototype.get=function(h,n){if(n===void 0)switch(h){case "gain":n=1}switch(h){case "levels":n=[this];break;case "subtitlesURL":case "gain":for(var g=m.prototype.get.call(this,h),k=this.get("levels"),e=0;k&&e<k.length&&g===void 0;e++){var b=k[e];b!=this&&(g=
b.get(h))}return g!==void 0?g:n}return m.prototype.get.call(this,h,n)};return a});
define("tdv/player/script/Video360",["require","tdv/player/parser/ClassInfo","tdv/player/script/SphericPanoramaFrame","tdv/player/script/VideoPanorama","tdv/player/script/Video360Resource"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/SphericPanoramaFrame"),n=a("tdv/player/script/VideoPanorama"),g=a("tdv/player/script/Video360Resource");a=m.define("Video360",n,function(){n.call(this);this.xq=this.lO=this.Lb=void 0});a.prototype.set=function(k,e){k=="video"?this.oYa(e):
k=="videoStereo"?this.pYa(e):n.prototype.set.call(this,k,e)};a.prototype.get=function(k,e){return k=="video"?this.Lb!==void 0?this.Lb:e:k=="videoStereo"?this.lO!==void 0?this.lO:e:n.prototype.get.call(this,k,e)};a.prototype.oYa=function(k){this.Lb!=k&&(this.Lb=k,k=n.prototype.get.call(this,"frames")||[],this.Lb&&(k.length==0&&k.push(new h),k[0].set("sphere",this.SAa(this.Lb))),n.prototype.set.call(this,"frames",k.slice()))};a.prototype.pYa=function(k){this.lO!=k&&(this.lO=k,k=n.prototype.get.call(this,
"frames")||[],this.lO&&(k.length==0&&k.push(new h),k[0].set("stereoSphere",this.SAa(this.lO))),n.prototype.set.call(this,"frames",k.slice()))};a.prototype.SAa=function(k){if(Array.isArray(k)){if(k.length==0)return;if(k.length==1&&m.Oa("Video360Resource",k[0]))return k[0];var e=[];k.forEach(function(b){e=e.concat(b.get("levels")||[b])});k=new g;k.set("levels",e)}return k};return a});
define("tdv/player/script/Video360Player",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaPlayer"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PanoramaPlayer");return m.define("Video360Player",h,function(){h.call(this)})});
define("tdv/player/script/Video360PlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("Video360PlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.ep,this),g.set("video",this.get("media")),g.set("camera",
this.get("camera")),g.set("startTime",this.get("startTime")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(h.di,this.ep,this),g.get("video")==this.get("media")&&g.set("video",null));n.prototype.stop.call(this)};a.prototype.ep=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.di,this.ep,this),this.get("player").bind(h.oo,this.Js,this),this.PD())};a.prototype.Js=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.oo,this.Js,this),this.stop(),this.end())};
return a});define("tdv/player/script/Video360ResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Video360ResourceLevel",m,function(){m.call(this)})});define("tdv/player/script/VideoCue",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("VideoCue",m,function(){m.call(this)})});
define("tdv/player/script/VideoPanoramaOverlay","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/script/helper/PlaybackPositionHelper");a=k.define("VideoPanoramaOverlay",m,function(){m.call(this);
this.Gd=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",n.$b)};a.prototype.stop=a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.set=function(b,c){var d=!1;switch(b){case "state":var f=this.get("state")||n.ca;f==n.ca&&c==n.PLAYING&&this.o(h.Up);f!=c&&this.o(new g(h.Pd,{oldState:f,state:c}));break;case "enabledInCardboard":this.set("enabledInVR",c);break;case "distance":case "hfov":case "opacity":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.Gd=
void 0,d=!0}m.prototype.set.call(this,b,c);d&&b!="playbackPositions"&&this.o(h.L("playbackPositions"))};a.prototype.get=function(b,c){switch(b){case "playbackPositions":return this.Gd===void 0&&(this.Gd=e.Ioa(this)),this.Gd}return m.prototype.get.call(this,b,c)};return a});
define("tdv/player/script/VideoPlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlaneModel3DObject");return m.define("VideoPlaneModel3DObject",h,function(){h.call(this)})});
define("tdv/player/view/video/control/CueController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){function m(b,c,d){this.time=b;this.cue=c;this.action=d}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),k=a("tdv/events/EventDispatcher"),e=a("tdv/constants/PlaybackState");a=h.extend(k,function(b){k.call(this);this.j=b;this.hd=null;this.am=!1;this.hk=[];this.Go=void 0;this.bf=[]});
a.prototype.clear=function(){this.j=null;this.GG();this.hk=[];this.bf=[]};a.prototype.start=function(b){this.end();this.rka(b);this.fea();this.Vka();this.SI()};a.prototype.rka=function(b){this.GG();this.hd=b;this.hd.bind(n.L("currentTime"),this.SI,this,!0);this.hd.bind(n.L("state"),this.Vka,this,!0);this.hd.bind(n.Ub,this.nW,this,!0)};a.prototype.GG=function(){this.hd&&(this.hd.h(n.L("currentTime"),this.SI,this),this.hd.h(n.L("state"),this.Vka,this),this.hd.h(n.Ub,this.nW,this),this.hd=null)};a.prototype.end=
function(){this.BR();this.GG();this.am=!1};a.prototype.Vka=function(b){b=b!=e.ca;this.am!=b&&((this.am=b)?this.v5():this.BR())};a.prototype.nW=function(){this.SI()};a.prototype.v5=function(){this.Go=this.XL=0};a.prototype.SI=function(){if(this.hd&&this.am){var b=this.bf.slice(),c=this.hd.get("currentTime",0),d=c-this.XL;d<0&&(this.bf=[],this.Go=0);d=d>=0&&d<2;this.XL=c;var f;for(f=this.Go;f<this.hk.length&&!(this.hk[f].time>c);f++);for(;this.Go<f;this.Go++)c=this.hk[this.Go],c.action=="start"?(this.bf=
h.union(this.bf,[c.cue]),d&&c.cue.o(new g(n.Dr))):(this.bf=h.union(this.bf,[c.cue]),d&&c.cue.o(new g(n.Ub)));b.length==this.bf.length&&h.intersection(b,this.bf).length==this.bf.length||this.YV()}};a.prototype.BR=function(){this.bf.length>0&&(this.bf=[],this.YV())};a.prototype.YV=function(){this.hd.o(new g(n.Bl,{activeCues:this.bf.slice()}))};a.prototype.fea=function(){this.hk=[];this.hd.get("cues",[]).forEach(b=>{this.hk.push(new m(b.get("startTime",0),b,"start"));this.hk.push(new m(b.get("endTime",
Number.POSITIVE_INFINITY),b,"end"))});this.hk.sort(function(b,c){return b.time==c.time?b.action==c.start?0:b.action=="start"?-1:1:b.time-c.time})};return a});
define("tdv/player/view/video/control/DisplayController","require tdv/utils tdv/view/util/Animation tdv/events/Event tdv/player/view/common/MediaDisplayController tdv/player/view/util/XR".split(" "),function(a){function m(b,c){this.video=b;this.startTime=c}var h=a("tdv/utils");a("tdv/view/util/Animation");var n=a("tdv/events/Event"),g=a("tdv/player/view/common/MediaDisplayController"),k=a("tdv/player/view/util/XR");m.prototype.isEqual=function(b){return b&&this.video==b.video};var e=h.extend(g,function(b,
c){g.call(this,b);this.j=c});e.prototype.display=function(b,c){g.prototype.display.call(this,new m(b,c))};e.prototype.oe=function(){g.prototype.oe.call(this)};e.prototype.clear=function(){g.prototype.clear.call(this);this.j=null};e.prototype.Yg=function(b){g.prototype.Yg.call(this,b)};e.prototype.$x=function(){g.prototype.$x.call(this);this.P.Fc().ymb();this.P.Fc().zK();this.j.Ra(!0)};e.prototype.GT=function(b){g.prototype.GT.call(this,b);this.li.video.set("opacity",k.isPresenting?1:b);this.P.Fc().nK(b)};
e.prototype.yy=function(){g.prototype.yy.call(this);this.P.Fc().oJ()};e.prototype.pR=function(){g.prototype.pR.call(this)};e.prototype.KT=function(b){g.prototype.KT.call(this,b);this.li.video.set("opacity",Math.min(1,b*2));this.cf.video.set("opacity",Math.min(1,(1-b)*2))};e.prototype.cS=function(){g.prototype.cS.call(this)};e.prototype.by=function(){g.prototype.by.call(this);this.P.Fc().cF();this.j.Ra(k.isPresenting?!0:this.P.PX(this));this.cf.video.set("opacity",k.isPresenting?1:0);this.j.Qa()};
e.prototype.JT=function(b){g.prototype.JT.call(this,b);this.P.Fc().QE(Math.min(1,b*1.5));this.j.Ra(k.isPresenting?!0:this.P.PX(this));this.j.Qa()};e.prototype.bS=function(){this.P.Fc().VD();this.j.Ra(!1);this.j.Qa();g.prototype.bS.call(this)};e.prototype.mn=function(){g.prototype.mn.call(this);this.cf?this.o(new n(e.NF,{video:this.cf.video})):this.jp||this.o(new n(e.ota))};e.prototype.Rka=function(b){b.video&&this.o(new n(e.MF,{video:b.video}))};e.prototype.$ja=function(b,c){return b.video.get("chromaColor")&&
!!c};e.prototype.P_=function(b){b.video&&(b.video.set("opacity",0),b.video.set("zIndex",1),this.cf&&this.cf.video.set("zIndex",0),this.li.video.set("currentTime",b.startTime||0),this.j.icb(b.video),this.o(new n(e.Iba,{video:b.video,startTime:b.startTime})))};e.prototype.xN=function(b){b.video&&(this.j.Rjb(b.video),this.o(new n(e.Jba,{video:b.video})))};e.oc="request frame";e.Iba="video added";e.Jba="video removed";e.NF="video show";e.MF="video hide";e.ota="all pending videos hidden";return e});
define("tdv/player/view/video/control/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/PlaybackState"),e=m.extend(g,function(){g.call(this);this.hd=null;this.vf=!1;this.rea=k.ca});e.prototype.start=function(b){this.end();this.rka(b)};e.prototype.end=function(){this.stop();
this.GG()};e.prototype.clear=function(){this.GG()};e.prototype.play=function(){this.hd&&this.hd.set("state",k.PLAYING)};e.prototype.pause=function(){this.hd&&this.hd.set("state",k.$b)};e.prototype.psa=function(){this.hd&&(this.hd.get("state")==k.PLAYING?this.pause():this.play())};e.prototype.stop=function(){this.hd&&this.hd.set("state",k.ca)};e.prototype.Bg=function(b){this.vf=b;this.hd&&this.hd.set("mute",this.vf)};e.prototype.setTime=function(b){this.hd&&this.hd.set("currentTime",b)};e.prototype.getTime=
function(){if(this.hd)return this.hd.get("currentTime")};e.prototype.rka=function(b){this.GG();this.hd=b;this.hd.set("mute",this.vf);this.hd.bind(h.L("state"),this.RN,this,!0);this.hd.bind(h.L("currentTime"),this.TI,this,!0);this.hd.bind(h.Ub,this.nW,this,!0)};e.prototype.GG=function(){this.hd&&(this.hd.h(h.L("state"),this.RN,this),this.hd.h(h.L("currentTime"),this.TI,this),this.hd.h(h.Ub,this.nW,this),this.hd=null)};e.prototype.TI=function(){this.o(new n(e.OF,{video:this.hd,time:this.hd.get("currentTime"),
duration:this.hd.get("duration")}))};e.prototype.nW=function(){this.o(new n(e.SQ,{video:this.hd}))};e.prototype.RN=function(){var b=this.hd.get("state");this.rea!=b&&(this.rea=b,this.o(new n(e.gd,{state:this.rea})))};e.gd="playback state change";e.SQ="video end";e.OF="video time change";return e});
define("tdv/player/view/video/control/Controller","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/video/control/CueController tdv/player/view/video/control/DisplayController tdv/player/view/video/control/PlaybackController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/PlaybackState"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/video/control/CueController"),e=a("tdv/player/view/video/control/DisplayController"),
b=a("tdv/player/view/video/control/PlaybackController"),c=m.extend(g,function(d,f){g.call(this);this.P=d;this.j=f;this.j.set("visible",!1);this.Ya=new e(this.P,this.j);this.Ua=new b(this.j);this.fs=new k(this.j);this.Ya.bind(e.MF,this.Js,this,!0);this.Ya.bind(e.NF,this.ep,this,!0);this.Ya.bind(e.Iba,this.ZCa,this,!0);this.Ya.bind(e.Jba,this.aDa,this,!0);this.Ya.bind(e.ota,this.Q4a,this,!0);this.Ua.bind(b.gd,this.Mf,this,!0);this.Ua.bind(b.SQ,this.dD,this,!0);this.Ua.bind(b.OF,this.tU,this,!0)});c.prototype.clear=
function(){this.Ya.clear();this.Ua.clear();this.fs.clear();this.Ya.h(e.MF,this.Js,this);this.Ya.h(e.NF,this.ep,this);this.Ya.h(e.Iba,this.ZCa,this);this.Ya.h(e.Jba,this.aDa,this);this.Ua.h(b.gd,this.Mf,this);this.Ua.h(b.SQ,this.dD,this);this.Ua.h(b.OF,this.tU,this);this.P=this.j=this.fs=this.Ua=this.Ya=null};c.prototype.N$=function(d,f){this.j.set("visible",!0);this.Ya.display(d,f)};c.prototype.cB=function(){this.Ya.oe();this.Ua.end();this.fs.end()};c.prototype.play=function(){this.Ua.play()};c.prototype.stop=
function(){this.Ua.stop()};c.prototype.pause=function(){this.Ua.pause()};c.prototype.Bg=function(d){this.Ua.Bg(d)};c.prototype.setTime=function(d){this.Ua.setTime(d)};c.prototype.getTime=function(){return this.Ua.getTime()};c.prototype.psa=function(){this.Ua.psa()};c.prototype.ZCa=function(d){var f=d.data.video;this.Ua.start(f,d.data.startTime);this.fs.start(f)};c.prototype.aDa=function(){};c.prototype.ep=function(d){d=d.data.video;d.get("autoplay")&&d.get("state")!=h.PLAYING&&d.get("state")!=h.$b&&
d.set("state",h.PLAYING);this.o(new n(c.NF,{video:d}))};c.prototype.Js=function(d){this.o(new n(c.MF,{video:d.data.video}))};c.prototype.Q4a=function(){this.j.set("visible",!1)};c.prototype.dD=function(d){this.o(new n(c.SQ,{video:d.data.video}))};c.prototype.tU=function(d){this.o(new n(c.OF,{video:d.data.video,time:d.data.time,duration:d.data.duration}))};c.prototype.Mf=function(d){this.o(new n(c.gd,{state:d.data.state}))};c.NF="videoShow";c.MF="videoHide";c.SQ="videoEnd";c.OF="videoTimeChange";c.gd=
"playbackStateChange";return c});
define("tdv/player/view/video/renderer/RendererOverlay","require exports tdv/constants/EventName tdv/view/constants/Cursor tdv/view/core/UIComponent tdv/player/view/UserInteractionWindow".split(" "),function(a,m,h,n,g,k){return function(e){function b(){var c=e.call(this)||this;c.set("toolTipDisabled",!0);c.set("cursor",n.LB);c.bind(h.Rb,c.kd,c,!0);c.bI=new k.mua;c.bI.nra(k.mua.Oba);c.bI.kg(c.j4=!1);[c.bI.cc()].forEach(function(d,f){d.style.position="absolute";d.style.left="0";d.style.top="0";d.style.right=
"0";d.style.bottom="0";d.style.overflow="hidden";d.style.zIndex=f}.bind(c));return c}P(b,e);b.prototype.Kb=function(){e.prototype.Kb.call(this);[this.bI.cc()].forEach(function(c){c.parentElement||this.wa().uk(c)}.bind(this))};b.prototype.wra=function(c,d){this.j4!=c&&(this.j4=c,this.bI.XQa(d),this.bI.kg(c))};b.prototype.kd=function(){this.bI.setSize(this.nb(),this.Mb())};return b}(g)});
define("tdv/player/view/video/renderer/adapters/VideoAdapter","require exports tdv/constants/EventName tdv/view/constants/ScaleMode tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/view/av/VideoPlayer tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c){return function(){function d(f,l,p,q){this.video=f;this.Ag=l;this.renderer=p;this.eb=q;this.s9=this.s9.bind(this);this.TA=this.TA.bind(this);this.Sn=this.Sn.bind(this);this.E9=
this.E9.bind(this);g.ba(this.video,["video.levels.url","video.levels.srcObject","video.levels.width","video.levels.height"],this.s9,!0);g.ba(this.video,["zIndex"],this.TA,!0);g.ba(this.eb,["distance"],this.Sn,!0);g.ba(this.video,["scaleMode"],this.E9,!0);this.renderer.bind(h.Rb,this.Nt,this,!0);c.M.bind(h.V,this.Ta,this,!0);this.Nt();this.gu()}d.prototype.dispose=function(){g.da(this.video,["video.levels.url","video.levels.srcObject","video.levels.width","video.levels.height"],this.s9);g.da(this.video,
["zIndex"],this.TA);g.da(this.eb,["distance"],this.Sn);g.da(this.video,["scaleMode"],this.E9);this.renderer.h(h.Rb,this.Nt,this);c.M.h(h.V,this.Ta,this);this.Ca()};d.prototype.s9=function(){var f,l,p=e.zk(this.video.get("video"));this.level!==p&&(this.level=p,this.videoWidth=((f=this.level)===null||f===void 0?void 0:f.get("width"))||100,this.videoHeight=((l=this.level)===null||l===void 0?void 0:l.get("height"))||100,this.io(),this.lg())};d.prototype.TA=function(){var f=this.video.get("zIndex");this.zIndex!==
f&&(this.zIndex=f,this.lg())};d.prototype.Sn=function(){var f=this.eb.get("distance");this.distance!==f&&(this.distance=f,this.lg())};d.prototype.E9=function(){var f=this.video.get("scaleMode");this.NE!==f&&(this.NE=f,this.lg())};d.prototype.Nt=function(){var f=this.renderer.Xh()||1,l=this.renderer.Wh()||1;if(this.Pw!==f||this.Ow!==l)this.Pw=f,this.Ow=l,this.lg()};d.prototype.Ta=function(){this.lg()};d.prototype.lg=function(){if(this.F){var f=this.distance-.001*this.zIndex,l=c.isPresenting?2048:this.Pw,
p=c.isPresenting?1024:this.Ow,q=2*Math.tan(Math.PI/180*b.yu*.5)*f,r=q*p/l;switch(this.NE){case n.NONE:l=this.videoWidth*q/l;p=this.videoHeight*r/p;break;case n.Tp:l=q;p=this.videoHeight*q/this.videoWidth;break;case n.Pk:l=this.videoWidth*r/this.videoHeight;p=r;break;case n.Kr:this.videoWidth*r>this.videoHeight*q?(l=this.videoWidth*r/this.videoHeight,p=r):(l=q,p=this.videoHeight*q/this.videoWidth);break;default:this.videoWidth*r>this.videoHeight*q?(l=q,p=this.videoHeight*q/this.videoWidth):(p=r,l=
this.videoWidth*r/this.videoHeight)}r=this.F.O(k.ta);r.Le=l;r.Ye=p;r.positionZ=-f}};d.prototype.io=function(){if(this.F){var f=this.F.O(k.ro);f.properties=this.video;f.M=this.video;f.Qsa=this.video.get("video")}};d.prototype.Ksa=function(){if(this.F){var f=this.F.O(k.wd,!0);f.qB=!0;f.hF=!0;f.M=this.video;f.nt=!0;f.Yt=!0}};d.prototype.gu=function(){var f=this.Ag.T.sc("Video");f.N(k.pb).F=this.Ag;f.N(k.Plane);f.N(k.ta);f.N(k.ro);f.N(k.wd);this.F=f;this.lg();this.io();this.Ksa()};d.prototype.Ca=function(){this.F&&
(this.F.T.dd(this.F),this.F=null)};return d}()});
define("tdv/player/view/video/renderer/adapters/PlayAdapter","require exports tdv/binding/Bindable tdv/constants/EventName tdv/view/util/Assets tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/script/ImageResourceLevel tdv/player/script/ImageResource tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(){function f(l,p){this.Ag=l;this.eb=p;this.visible=!1;this.Sn=this.Sn.bind(this);k.ba(this.eb,["distance"],this.Sn,!0);d.M.bind(n.V,this.Ta,this,
!0)}f.prototype.dispose=function(){k.da(this.eb,["distance"],this.Sn);d.M.h(n.V,this.Ta,this);this.Ca()};f.prototype.kg=function(l){this.visible!=l&&(this.visible=l,this.io())};f.prototype.Sn=function(){var l=this.eb.get("distance");this.distance!==l&&(this.distance=l,this.lg())};f.prototype.Ta=function(){this.hx()};f.prototype.hx=function(){d.isPresenting!=!!this.F&&(d.isPresenting?this.gu():this.Ca())};f.prototype.lg=function(){if(this.F){var l=this.distance-.005,p=2*Math.tan(Math.PI/180*f.yu*.5)*
l,q=p*g.w_/g.jL,r=this.F.O(e.ta);r.Le=p;r.Ye=q;r.positionZ=-l}};f.prototype.io=function(){if(this.F){if(!this.xw){var l=new c,p=new b;p.set("url",g.Fx);p.set("width",g.jL);p.set("height",g.w_);l.set("levels",[p]);this.xw=l}this.properties||(l=new h,l.set("width",g.jL),l.set("height",g.w_),l.set("opacity",1),this.properties=l);l=this.F.O(e.Oi);l.properties=this.properties;l.M=this.xw;l.xw=this.xw;this.properties.set("enabled",this.visible)}};f.prototype.gu=function(){if(!this.F){var l=this.Ag.T.sc("VideoPlay");
l.N(e.pb).F=this.Ag;l.N(e.Plane);l.N(e.ta);l.N(e.Oi);this.F=l;this.lg();this.io()}};f.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};f.yu=10;return f}()});
define("tdv/player/view/video/renderer/adapters/PlaybackBarAdapter",["require","exports","tdv/constants/EventName"],function(a,m,h){return function(){function n(g){this.eb=g;this.eg=this.eb.get("application");this.enabled=!1;this.container=this.HE=this.mg=null}n.prototype.dispose=function(){this.Ra(!1)};n.prototype.Ra=function(g){this.enabled!==g&&((this.enabled=g)?this.aeb():this.xeb())};n.prototype.aeb=function(){if(!this.mg){this.wdb();this.mg=this.eg.Ai("XRPanel");this.mg.set("content",this.container);
this.mg.set("autoCenter",!1);this.mg.set("modal",!1);this.mg.set("yaw",0);this.mg.set("pitch",-45);this.mg.set("distance",1);this.mg.set("draggable",!1);var g=Math.PI/180;g=2*this.mg.get("distance")*Math.tan(n.yu/2*g)/n.Wua;this.mg.set("pixelScale",g);this.mg.bra(this.eb.get("application"));this.mg.SJa()}};n.prototype.xeb=function(){this.mg&&(this.mg.Jna(),this.leb(),this.eg.jw(this.mg),this.mg=null)};n.prototype.wdb=function(){if(!this.HE){var g=this.eg.Ai("PlaybackBar");g.set("left",25);g.set("top",
22);g.set("right",25);g.set("height",4);g.set("backgroundColor",["#FFFFFF"]);g.set("backgroundOpacity",1);g.set("borderColor","#FFFFFF");g.set("borderRadius",0);g.set("borderSize",0);g.set("liveDragging",!0);g.set("playheadBackgroundColor",["#3399FF"]);g.set("playheadBorderRadius",0);g.set("playheadBorderColor","#ffffff");g.set("playheadBorderSize",2);g.set("playheadBorderRadius",10);g.set("playheadHeight",20);g.set("playheadWidth",20);g.set("playheadShadow",!1);g.set("barBackgroundColor",["#3399FF"]);
g.set("barBackgroundColorRatios",[0]);g.set("barBorderColor","#000000");g.set("barBorderSize",0);g.set("barBorderRadius",0);this.HE=g}if(!this.container){g=this.eg.Ai("Container");g.set("width",n.Wua);g.set("height",50);g.set("backgroundColor","#ffffff");g.set("backgroundOpacity",.2);g.set("borderRadius",25);g.set("children",[this.HE]);g.set("opacity",.3);var k=this.eg.Ai("FadeInEffect");k.set("duration",500);k.set("easing","cubic_in");g.set("showEffect",k);k=this.eg.Ai("FadeOutEffect");k.set("duration",
500);k.set("easing","cubic_out");g.set("hideEffect",k);g.bind(h.uc,this.FJa,this,!0);g.bind(h.Eb,this.EJa,this,!1);this.container=g}this.Ot||(this.Ot=this.eg.Ai("Effect"),this.Ot.set("duration",300),this.Ot.set("easing","cubic_in"),this.Ot.bind(h.Zd,this.dPa,this,!0));this.scb()};n.prototype.dPa=function(){this.container.set("opacity",.2+.8*this.Ot.vm())};n.prototype.leb=function(){this.akb();this.HE&&(this.eg.jw(this.HE),this.HE=null);this.Ot&&(this.Ot.h(h.Zd,this.dPa,this),this.eg.jw(this.Ot),this.Ot=
null);this.container&&(this.container.h(h.uc,this.FJa,this),this.container.h(h.Eb,this.EJa,this),this.eg.jw(this.container),this.container=null)};n.prototype.scb=function(){this.kPa=this.eb.get("externalPlaybackBar");this.eb.set("externalPlaybackBar",this.HE)};n.prototype.akb=function(){this.eb.get("externalPlaybackBar")===this.HE&&(this.eb.set("externalPlaybackBar",this.kPa),this.kPa=null)};n.prototype.FJa=function(){this.Ot.play()};n.prototype.EJa=function(){this.Ot.reverse()};n.Wua=500;n.yu=40;
return n}()});
define("tdv/player/view/video/renderer/Renderer","require exports tdv/binding/BindingsHandler tdv/player/view/renderer2d/Renderer tdv/player/view/video/renderer/RendererOverlay tdv/player/view/video/renderer/adapters/VideoAdapter tdv/player/view/video/renderer/adapters/PlayAdapter tdv/player/view/video/renderer/adapters/PlaybackBarAdapter".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(f,l,p){f=c.call(this,f,l,p)||this;f.aqa=f.aqa.bind(f);f.Cc=null;f.oW=[];f.RI=[];f.taa();h.ba(f.TC,
["displayPlaybackBarInXR","displayPlaybackBar"],f.aqa,!0);return f}P(d,c);d.prototype.Kb=function(){c.prototype.Kb.call(this);this.Cc==null&&(this.Cc=new g,this.Cc.xa({left:0,top:0,right:0,bottom:0}),this.mb(this.Cc),this.taa())};d.prototype.pY=function(){var f=this;c.prototype.pY.call(this);this.hf.q$(this.TC.get("useVideoFrameRate")?2:void 0);this.Ldb();this.Kdb();this.oW.forEach(function(l){f.TJa(l)})};d.prototype.bqa=function(){c.prototype.bqa.call(this);this.taa();this.Fsa()};d.prototype.icb=
function(f){this.oW.includes(f)||(this.oW.push(f),this.hf&&this.TJa(f))};d.prototype.Ldb=function(){this.v6a=new b(this.P)};d.prototype.TJa=function(f){var l=new k(f,this.B1.nj(),this,this.P);this.RI.push(l);this.hf.q$(this.TC.get("useVideoFrameRate")&&this.jgb(f)<45?2:void 0);this.t$(this.RI.length>0)};d.prototype.Kdb=function(){this.xDa=new e(this.B1.nj(),this.P)};d.prototype.Rjb=function(f){f=this.oW.indexOf(f);f<0||(this.oW.splice(f,1),this.hf&&this.web(this.RI[f]))};d.prototype.web=function(f){var l=
this.RI.indexOf(f);l<0||(this.RI.splice(l,1),f.dispose(),this.t$(this.RI.length>0))};d.prototype.wra=function(f){this.j4=f;this.taa()};d.prototype.taa=function(){var f=this.j4&&this.RI.length>0;this.Cc&&this.Cc.wra(f);this.xDa&&this.xDa.kg(f)};d.prototype.jgb=function(f){f=f.get("video");return(f&&f.get("levels")||[]).reduce(function(l,p){return Math.max(l,p.get("framerate"))},0)||30};d.prototype.Ta=function(){c.prototype.Ta.call(this);this.Fsa()};d.prototype.aqa=function(){this.Fsa()};d.prototype.Fsa=
function(){var f,l=this.P.get("viewMode")!="standard"&&this.yS&&this.TC.get("displayPlaybackBarInXR",this.TC.get("displayPlaybackBar"));(f=this.v6a)===null||f===void 0||f.Ra(l)};return d}(n)});
define("tdv/player/script/VideoPlayer","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/parser/ClassInfo tdv/player/script/PlaybackMediaPlayer tdv/constants/PlaybackState tdv/player/view/video/control/Controller tdv/player/view/video/renderer/Renderer tdv/view/util/KeyboardControl".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Key"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PlaybackMediaPlayer"),e=a("tdv/constants/PlaybackState"),
b=a("tdv/player/view/video/control/Controller"),c=a("tdv/player/view/video/renderer/Renderer"),d=a("tdv/view/util/KeyboardControl");a=g.define("VideoPlayer",k,function(){k.call(this,"video");this.SH=this.SH.bind(this);this.hs=this.u5=this.TI=this.jj=!1;this.U=this.j=null;this.ac=this.wf=0;this.Ro=!1;this.be=m.nr(this.Sh,this)});a.prototype.seek=function(f){this.sI(f)};a.prototype.play=function(){this.XH()};a.prototype.pause=function(){this.WH()};a.prototype.stop=function(){this.cD()};a.prototype.restart=
function(){this.bD()};a.prototype.set=function(f,l){if(this.get(f)!=l){switch(f){case "startTime":this.u5=!0;this.be();break;case "video":this.TI=!0;this.be();break;case "viewerArea":this.jj=!0;this.be();break;case "displayPlaybackBar":this.hs=!0,this.be()}k.prototype.set.call(this,f,l)}};a.prototype.get=function(f,l){switch(f){case "currentTime":return this.U&&this.U.getTime()||0}return k.prototype.get.call(this,f,l)};a.prototype.tr=function(f){this.Ro!==f&&((this.Ro=f)?document.addEventListener("keydown",
this.SH,!0):document.removeEventListener("keydown",this.SH,!0))};a.prototype.SH=function(f){d.yp()||(f.code==n.ua.kL||f.code==n.ua.h_)&&this.U&&this.U.psa()};a.prototype.Sh=function(){this.jj&&(this.jj=!1,this.oy(),this.get("viewerArea")&&this.ny(),this.pV(this.get("viewerArea")),this.TI=!0);var f=!1;if(this.j&&(this.TI||this.u5)){var l=this.get("video"),p=this.get("startTime")||0;if(l&&!this.j.Xb()){this.be();return}this.u5=this.TI=!1;this.ac=this.wf=0;f=!0;l?(this.hK(),this.U.N$(l,p)):this.U.cB()}this.hs&&
(this.hs=!1,f=!0);f&&this.$z()};a.prototype.TN=function(){this.set("video",null)};a.prototype.ny=function(){var f=this.get("application"),l=this.get("viewerArea");this.j=new c(f,l,this);this.j.xa({left:0,top:0,bottom:0,right:0});l.mb(this.j);l.bind(h.ma,this.eDa,this,!0);this.U=new b(l,this.j);this.U.bind(b.NF,this.ep,this);this.U.bind(b.MF,this.Js,this);this.U.bind(b.OF,this.tU,this,!0);this.U.bind(b.gd,this.Mf,this);f.bind(h.L("mute"),this.$T,this);this.U.Bg(f.get("mute",!1));this.xD(!0)};a.prototype.oy=
function(){if(this.j){this.U.h(b.NF,this.ep,this);this.U.h(b.MF,this.Js,this);this.U.h(b.OF,this.tU,this);this.U.h(b.gd,this.Mf,this);this.U.clear();this.get("application").h(h.L("mute"),this.$T,this);var f=this.j.getParent();f.removeChild(this.j);f.h(h.ma,this.eDa,this,!0);this.j=null;this.xD(!1)}};a.prototype.$T=function(){this.j&&this.U.Bg(this.get("application").get("mute",!1))};a.prototype.Mf=function(f){f=f.data.state;this.j&&this.j.wra(this.get("displayPlayOverlay")&&f!=e.PLAYING,this.wf<.5);
this.Jd(f)};a.prototype.ep=function(f){var l=this.get("viewerArea");(this.ve=l&&l.ve)&&this.ve.bind(h.ma,this.fDa,this,!0);this.fja=!1;f=f.data.video;f.bind(h.ma,this.$Ca,this,!0);this.oT(f)};a.prototype.Js=function(f){this.ve&&this.ve.h(h.ma,this.fDa,this,!0);this.ve=null;f=f.data.video;f.h(h.ma,this.$Ca,this);this.nT(f)};a.prototype.tU=function(f){this.wf=f.data.time;this.ac=f.data.duration;this.$z()};a.prototype.eDa=function(){this.fja?this.fja=!1:this.tBa()};a.prototype.$Ca=function(){this.tBa()};
a.prototype.tBa=function(){switch(this.get("clickAction")){case "play_pause":this.get("state")!=e.PLAYING?this.U.play():this.U.pause()}};a.prototype.fDa=function(){this.fja=!0};a.prototype.EU=function(f){this.sI(f.data.position)};a.prototype.tn=function(){this.U.play()};a.prototype.Zs=function(){this.U.stop()};a.prototype.tv=function(){this.U.pause()};a.prototype.sI=function(f){this.U&&this.U.setTime(f)};a.prototype.$z=function(){if(this.j){var f=this.j.getParent();this.ac>0&&this.get("displayPlaybackBar")?
f.xa({playbackBarPosition:this.wf,playbackBarDuration:this.ac,playbackBarVisible:!0}):f.set("playbackBarVisible",!1)}};return a});
define("tdv/player/script/VideoPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("VideoPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.ep,this),g.set("video",this.get("media")),g.set("startTime",
this.get("startTime")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(h.di,this.ep,this),g.get("video")==this.get("media")&&g.set("video",null));n.prototype.stop.call(this)};a.prototype.ep=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.di,this.ep,this),this.get("player").bind(h.oo,this.Js,this),this.PD())};a.prototype.Js=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.oo,this.Js,this),this.stop(),this.end())};return a});
define("tdv/player/script/VideoResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("VideoResourceLevel",m,function(){m.call(this)})});
define("tdv/player/script/VideoResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/view/util/Capabilities","tdv/player/script/VideoResourceLevel"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/util/Capabilities"),g=a("tdv/player/script/VideoResourceLevel");a=h.define("VideoResource",m,function(){m.call(this);this.Zha=new g;this.Zha.set("type","video/mp4");this.dia=new g;this.dia.set("type","video/ogg");this.Hma=
new g;this.Hma.set("type","video/webm")});a.prototype.get=function(k,e){switch(k){case "levels":e=[];var b=this.get("mp4Url");b&&(this.Zha.set("url",b),e.push(this.Zha));if(b=this.get("oggUrl"))this.dia.set("url",b),e.push(this.dia);if(b=this.get("webmUrl"))this.Hma.set("url",b),e.push(this.Hma);e.forEach(function(c){c.set("width",this.get("width"));c.set("height",this.get("height"))}.bind(this))}return m.prototype.get.call(this,k,e)};a.prototype.rl=function(){var k=this.get("webmUrl"),e=this.get("oggUrl"),
b=this.get("mp4Url");return b&&n.k8?b:k&&n.Roa?k:e&&n.Qoa?e:b||k||e};return a});define("tdv/player/script/VignetteModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DPostprocessing");return m.define("VignetteModel3DPostprocessing",h,function(){h.call(this)})});
define("tdv/view/html/WebFrame","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/core/UIComponent tdv/view/helpers/DOMUpdateQueue tdv/view/core/visuals/VisualsType".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){var f=c.call(this)||this;f.gf("WebFrame");f.Md=null;f.Oc=null;f.Aj=null;f.gT=null;f.wia=f.wia.bind(f);f.r3=f.r3.bind(f);f.bind(h.od,f.d6a,f,!0);f.bind(h.jd,f.c6a,f,!0);return f}P(d,c);d.prototype.Pb=function(){c.prototype.Pb.call(this);
this.m("url");this.m("allowTopNavigation",!0);this.m("backgroundColor","#ffffff");this.m("insetBorder",!1);this.m("scrollEnabled",!0);this.m("unloadWhenHidden",!0)};d.prototype.z8=function(f,l){return f.getType()!==b.DOM?!1:c.prototype.z8.call(this,f,l)};d.prototype.d6a=function(){this.yD("url")};d.prototype.c6a=function(){this.yD("url")};d.prototype.Kb=function(){c.prototype.Kb.call(this);this.Md||(this.Md=document.createElement("div"),this.Md.style.position="absolute",this.Md.style.left="0",this.Md.style.top=
"0",this.Md.style.width="100%",this.Md.style.height="100%",this.wa().uk(this.Md));this.Oc||(this.Oc=document.createElement("iframe"),this.Oc.style.position="absolute",this.Oc.style.left="0",this.Oc.style.top="0",this.Oc.setAttribute("allowfullscreen","true"),this.Oc.setAttribute("allow","accelerometer; autoplay; camera; display-capture; fullscreen; geolocation; gyroscope; magnetometer; microphone; vr; xr-spatial-tracking"),this.Md.appendChild(this.Oc));this.Aj||(this.Aj=document.createElement("div"),
this.Aj.style.textShadow="0 0 5px rgba(255,255,255,0.5)",this.Aj.style.display="none",this.Aj.style.color="#000000",this.Aj.style.fontWeight="300",this.Aj.style.fontFamily="Tahoma, Geneva, sans-serif",this.Aj.style.fontSize=n.ub()?"5vmin":"20px",this.Aj.style.position="absolute",this.Aj.style.top="50%",this.Aj.style.left="50%",this.Aj.style.textAlign="center",this.Aj.style.transform="translate(-50%, -50%)",this.Aj.style.width="90%",this.Md.appendChild(this.Aj))};d.prototype.jb=function(){if(this.S("url")){var f=
this.G("url");f&&this.Qy?this.REa(f):(!f||this.get("unloadWhenHidden"))&&this.REa("");this.$("url")}this.S("insetBorder")&&(f=this.G("insetBorder"),this.Oc.setAttribute("frameborder",f?"1":"0"),this.$("insetBorder"));this.S("allowTopNavigation")&&(this.G("allowTopNavigation")?this.Oc.removeAttribute("sandbox"):this.Oc.setAttribute("sandbox","allow-downloads allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts allow-storage-access-by-user-activation"),
this.$("allowTopNavigation"));this.S("scrollEnabled")&&(f=this.G("scrollEnabled"),this.Oc.setAttribute("scrolling",f?"auto":"no"),this.Md.style.overflow=f?"auto":"hidden",this.Md.style["-webkit-overflow-scrolling"]=f?"touch":"auto",this.$("scrollEnabled"));c.prototype.jb.call(this)};d.prototype.pu=function(){this.Oc&&e.ceb(this.Oc,{width:this.nb()+"px",height:this.Mb()+"px"});c.prototype.pu.call(this)};d.prototype.refresh=function(){this.G("url")&&this.Qy&&(this.vga(),this.nC(),this.Ela(),this.Oc.setAttribute("src",
""),setTimeout(function(){this.AFa();this.hwa();this.Oc.setAttribute("src",this.G("url"))}.bind(this),30))};d.prototype.REa=function(f){this.Oc.getAttribute("src")!=f&&(this.vga(),f?(this.AFa(),this.hwa()):(this.nC(),this.Ela()),this.Oc.setAttribute("src",f))};d.prototype.wia=function(){this.gT=null;this.T3a()&&this.E9a()};d.prototype.r3=function(){this.vga();this.nC();this.Ela()};d.prototype.hwa=function(){this.Oc.addEventListener("load",this.r3)};d.prototype.Ela=function(){this.Oc.removeEventListener("load",
this.r3)};d.prototype.nC=function(){this.gT&&(clearTimeout(this.gT),this.gT=null)};d.prototype.AFa=function(){this.nC();this.gT=setTimeout(this.wia,d.lVa)};d.prototype.T3a=function(){if(window.location.protocol=="https:"){var f=this.Oc.getAttribute("src");if(g.parse(f).protocol!="https:")return!0}return!1};d.prototype.E9a=function(){this.Aj.textContent="A secure web page served over HTTPS can not display insecure content served over HTTP.";this.Aj.style.display="block"};d.prototype.vga=function(){this.Aj.style.display=
"none"};d.lVa=3E3;return d}(k)});define("tdv/player/script/WebFrame",["require","tdv/view/html/WebFrame","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/html/WebFrame");a=a("tdv/player/parser/ClassInfo").define("WebFrame",m,function(){m.call(this)});a.prototype.refresh=function(){m.prototype.refresh.call(this)};return a});
define("tdv/view/containers/windows/Window","require exports tdv/utils tdv/constants/EventName tdv/events/Event tdv/view/containers/Container tdv/view/containers/windows/BaseWindow".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.gf("Window");d.nga=0;d.oga=0;d.oFa=!1;d.Ika=!1;d.bind(n.Rb,d.Cbb,d,!1);d.bind(n.ma,d.zbb,d,!1);d.bind(n.aL,d.Abb,d,!1);d.bind(n.ZQ,d.Dbb,d,!1);d.j6=0;d.vg=new k;d.vg.xa({visible:!1,includeInLayout:!1,layout:"absolute",height:"100%",
width:"100%",backgroundOpacity:0,contentOpaque:!1});d.vg.bind(n.Rb,d.CHa,d,!1);d.vg.bind(n.ZQ,d.tbb,d,!1);d.vg.bind(n.aL,d.sbb,d,!1);d.vg.bind(n.ma,d.rbb,d,!1);d.vg.mb(d);return d}P(c,b);c.prototype.set=function(d,f){switch(d){case "maxWidth":this.Jma=f;this.a6();break;case "maxHeight":this.Ima=f;this.a6();break;case "shadow":this.oFa=f;this.wHa();break;default:b.prototype.set.call(this,d,f)}};c.prototype.show=function(d,f){this.O6(d);f&&this.Ucb();f=d.get("children");d.set("children",f.concat([this.vg]));
h.defer(function(){this.vg.set("visible",!0)}.bind(this))};c.prototype.oe=function(){this.N6();this.set("visible",!1)};c.prototype.O6=function(d){b.prototype.O6.call(this);this.a6(d);this.vg.set("visible",!1);this.nYa()};c.prototype.N6=function(){b.prototype.N6.call(this);this.j6=0;this.g5(!1)};c.prototype.nYa=function(){var d=this.G("modal"),f=this.G("veilShowEffect"),l=this.G("veilHideEffect");d&&f?this.vg.set("showEffect",f):this.vg.set("showEffect",null);d&&l?this.vg.set("hideEffect",l):this.vg.set("hideEffect",
null)};c.prototype.Ucb=function(){this.set("centerX",0);this.set("centerY",0)};c.prototype.Pb=function(){this.Jl(c.ad)};c.prototype.rbb=function(){this.j6++;setTimeout(function(){this.j6>0&&this.oe()}.bind(this),100)};c.prototype.zbb=function(){this.j6--};c.prototype.vza=function(d){this.nga=d.pageX;this.oga=d.pageY;this.Xb().bind(n.gb,this.OHa,this,!0);this.Xb().bind(n.$a,this.PHa,this,!0)};c.prototype.OHa=function(d){this.set("centerX",this.get("centerX")+(d.pageX-this.nga));this.set("centerY",
this.get("centerY")+(d.pageY-this.oga));this.nga=d.pageX;this.oga=d.pageY;this.vHa()};c.prototype.PHa=function(){this.Xb().h(n.gb,this.OHa,this);this.Xb().h(n.$a,this.PHa,this)};c.prototype.CHa=function(){this.a6()};c.prototype.tbb=function(){this.set("visible",!0)};c.prototype.sbb=function(){this.vg.h(n.Rb,this.CHa,this);var d=this.vg.getParent();d&&d.removeChild(this.vg);this.o(new g(n.CB))};c.prototype.Cbb=function(){this.vHa()};c.prototype.Dbb=function(){this.g5(!0)};c.prototype.Abb=function(){this.vg.set("visible",
!1)};c.prototype.g5=function(d){this.Ika=d;this.wHa()};c.prototype.wHa=function(){b.prototype.set.call(this,"shadow",this.Ika&&this.oFa)};c.prototype.ogb=function(d){if(this.Jma!==void 0)return this.Jma;if(d)return d.nb()};c.prototype.ngb=function(d){if(this.Ima!==void 0)return this.Ima;if(d)return d.Mb()};c.prototype.a6=function(d){d||(d=this.getParent());b.prototype.set.call(this,"maxWidth",this.ogb(d));b.prototype.set.call(this,"maxHeight",this.ngb(d))};c.prototype.vHa=function(){var d=this.vg.nb(),
f=this.nb(),l=this.get("centerX");f=d*.5+l-f*.5;var p=this.Ym.u.Dd,q=this.Ym.nb(),r=Math.min(q,30);d=d-p-r;p=-(p+q-r);f<p?this.set("centerX",l+(p-f)):f>d&&this.set("centerX",l-(f-d));d=this.vg.Mb();f=this.Mb();l=this.get("centerY");f=d*.5+l-f*.5;p=this.Ym.u.ie;q=this.Ym.Mb();r=Math.min(q,5);d=d-p-r;p=-(p+q-r);f<p?this.set("centerY",l+(p-f)):f>d&&this.set("centerY",l-(f-d))};c.prototype.jb=function(){this.G("modal")?(this.Pc(c.zva,c.Ava,[this.vg],!0,!0),this.vg.set("contentOpaque",!0)):(this.vg.set("backgroundOpacity",
0),this.vg.set("contentOpaque",!1));b.prototype.jb.call(this)};c.Ava={veilOpacity:"backgroundOpacity",veilBlur:"backgroundBlur",veilColor:"backgroundColor",veilColorRatios:"backgroundColorRatios",veilColorDirection:"backgroundColorDirection"};c.zva=Object.keys(c.Ava);c.ad=Object.assign({},e.ad,function(){for(var d=Object.assign({},e.ad,{centerX:0,centerY:0,veilShowEffect:void 0,veilHideEffect:void 0}),f=[].concat(c.zva),l=0;l<f.length;l++)d[f[l]]=void 0;return d}());return c}(e)});
define("tdv/player/script/Window",["require","tdv/view/containers/windows/Window","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/containers/windows/Window");a=a("tdv/player/parser/ClassInfo").define("Window",m,function(){m.call(this)});a.prototype.show=a.prototype.show;a.prototype.hide=a.prototype.oe;return a});
define("tdv/view/core/visuals/canvas/Layer",["require","exports","tdv/events/EventDispatcher"],function(a,m,h){return function(){function n(g){this.canvas=g.canvas||null;this.rect=g.rect;this.visibleRect=g.visibleRect||g.rect;this.opacity=g.opacity===void 0?1:g.opacity;this.layers=g.layers||[];this.tag=g.tag||"";this.XA=g.XA||n.SB;this.RD=g.RD||!1;this.M=g.M||new h;this.J9=g.J9||this;this.cursor=g.cursor||void 0}n.prototype.IQa=function(g,k,e){e===void 0&&(e=null);var b=this.rect.ZSa(g,k),c=this.visibleRect.ZSa(g,
k);if(e!==null&&!e.contains(c))if(e.apa(c))c=c.intersection(e);else return null;return new n({canvas:this.canvas||void 0,rect:b,visibleRect:c,opacity:this.opacity,tag:this.tag,layers:this.layers.map(function(d){return d.IQa(g,k,e)}).filter(function(d){return d!==null}),M:this.M,XA:this.XA,RD:this.RD,cursor:this.cursor,J9:this.J9})};n.SB=0;n.rua=1;n.XQ=2;return n}()});
define("tdv/view/core/visuals/canvas/Rect",["require","exports"],function(){return function(){function a(m,h,n,g){this.left=m;this.top=h;this.width=n;this.height=g;this.right=m+n;this.bottom=h+g}a.prototype.equals=function(m){return this.left===m.left&&this.top===m.top&&this.width===m.width&&this.height===m.height};a.prototype.apa=function(m){return this.left<m.right&&this.top<m.bottom&&this.right>m.left&&this.bottom>m.top};a.prototype.containsPoint=function(m,h){return this.left<=m&&m<=this.right&&
this.top<=h&&h<=this.bottom};a.prototype.contains=function(m){return this.left<=m.left&&this.top<=m.top&&this.right>=m.right&&this.bottom>=m.bottom};a.prototype.intersection=function(m){var h=this.left>m.left?this.left:m.left,n=this.top>m.top?this.top:m.top;return new a(h,n,(this.right<m.right?this.right:m.right)-h,(this.bottom<m.bottom?this.bottom:m.bottom)-n)};a.prototype.union=function(m){var h=this.left<m.left?this.left:m.left,n=this.top<m.top?this.top:m.top;return new a(h,n,(this.right>m.right?
this.right:m.right)-h,(this.bottom>m.bottom?this.bottom:m.bottom)-n)};a.prototype.ZSa=function(m,h){return new a(this.left+m,this.top+h,this.width,this.height)};a.union=function(m){if(m.length===0)return new a(0,0,0,0);for(var h=m[0].left,n=m[0].top,g=m[0].right,k=m[0].bottom,e=1;e<m.length;e++)h=Math.min(h,m[e].left),n=Math.min(n,m[e].top),g=Math.max(g,m[e].right),k=Math.max(k,m[e].bottom);return new a(h,n,g-h,k-n)};a.merge=function(m){for(var h=0;h<m.length;){for(var n=h+1;n<m.length;){if(m[h].apa(m[n])){m=
[m[h].union(m[n])].concat(m.slice(0,h)).concat(m.slice(h+1,n)).concat(m.slice(n+1));h=-1;break}n++}h++}return m};return a}()});
define("tdv/view/core/visuals/canvas/LayerComposer",["require","exports","tdv/view/core/visuals/canvas/Layer","tdv/view/core/visuals/canvas/Rect"],function(a,m,h,n){return function(){function g(){this.yP=!1;this.JW=this.canvas=this.gJ=null;this.layers=[]}g.prototype.clear=function(){this.canvas&&(this.canvas.width=0,this.canvas.height=0);this.JW=null;this.layers=[]};g.prototype.compose=function(k,e,b){var c=this;this.canvas||(this.canvas=document.createElement("canvas"));var d=n.union(k.map(function(p){return p.visibleRect}));
if(b){b=Math.pow(2,Math.ceil(Math.log(d.width)/Math.log(2)));var f=Math.pow(2,Math.ceil(Math.log(d.height)/Math.log(2)));d=new n(Math.floor(d.left-(b-d.width)/2),Math.floor(d.top-(f-d.height)/2),b,f)}b=[];if(this.JW&&this.JW.equals(d)){b=k.filter(function(p){return!c.layers.includes(p)});f=this.layers.filter(function(p){return!k.includes(p)});if(b.length==0&&f.length==0)return new h({canvas:this.canvas,rect:d,opacity:e,tag:"composed",layers:k});b=n.merge(b.map(function(p){return p.visibleRect}).concat(f.map(function(p){return p.visibleRect})))}else this.JW=
d,this.canvas.width=d.width,this.canvas.height=d.height,b.push(d);this.layers=k;if(b){var l=this.canvas.getContext("2d");b.forEach(function(p){l.clearRect(p.left-d.left,p.top-d.top,p.width,p.height);k.forEach(function(q){if(q.canvas&&p.apa(q.visibleRect)&&q.visibleRect.width!=0&&q.visibleRect.height!=0){var r=q.visibleRect.intersection(p);l.globalAlpha=q.opacity;l.drawImage(q.canvas,r.left-q.rect.left,r.top-q.rect.top,r.width,r.height,r.left-d.left,r.top-d.top,r.width,r.height)}})})}return new h({canvas:this.canvas,
rect:this.JW,opacity:e,tag:"composed",layers:k})};return g}()});
define("tdv/view/core/visuals/canvas/CanvasUIBaseVisuals","require exports tdv/view/constants/GradientDirection tdv/view/core/visuals/Visuals tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/core/visuals/util tdv/constants/EventName tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/core/visuals/canvas/LayerComposer tdv/events/EventDispatcher tdv/player/view/util/Color".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){return function(p){function q(){var r=p.call(this)||
this;r.yP=!1;r.opacity=1;r.visible=!1;r.KQa=0;r.LQa=0;r.OTa=null;r.tNa=new d;r.gJ=null;r.layers=null;r.CO=null;r.Xq=null;r.nJ=null;r.k7=null;r.YO=new f;r.children=[];r.PO=new Map;r.BZ=new Map;r.Vna=b.XQ;r.Una=!0;r.cursor=void 0;return r}P(q,p);q.prototype.tp=function(){return new g};q.prototype.Ukb=function(){this.yP!=1&&(this.yP=!0,this.yP||(this.tNa.clear(),this.gJ=null))};q.prototype.uk=function(){throw Error("Invalid call to CanvasUIBaseVisuals.appendContent");};q.prototype.a$=function(){throw Error("Invalid call to CanvasUIBaseVisuals.removeContent");
};q.prototype.cc=function(){throw Error("Invalid call to CanvasUIBaseVisuals.getElement");};q.prototype.jfb=function(){var r=this.getLayers();return r.length===1?r[0]:null};q.prototype.getLayers=function(){if(this.opacity<=0||!this.visible)return[];if(this.gJ)return[this.gJ];if(this.layers)return this.layers;this.layers=this.rt();return this.yP||this.opacity<1?(this.gJ=this.tNa.compose(this.layers,this.opacity,this.yP),[this.gJ]):this.layers};q.prototype.GLa=function(r){return this.DKa(r,this.getLayers())};
q.prototype.KLa=function(r){var t=this.nJ&&r.GLa(this.nJ);r=r.nJ;return t&&r?{left:t.rect.left-r.rect.left,top:t.rect.top-r.rect.top}:{left:0,top:0}};q.prototype.appendChild=function(r){this.children.push(r);r.bind(e.V,this.h9,this,!0);this.TE()};q.prototype.NMa=function(r,t){t=this.children.indexOf(t);t===-1?this.children.push(r):this.children.splice(t+1,0,r);r.bind(e.V,this.h9,this,!0);this.TE()};q.prototype.OMa=function(r,t){t=this.children.indexOf(t);t===-1?this.children.push(r):this.children.splice(t,
0,r);r.bind(e.V,this.h9,this,!0);this.TE()};q.prototype.removeChild=function(r){var t=this.children.indexOf(r);t!==-1&&(r.h(e.V,this.h9,this),this.children.splice(t,1),this.kJa(r),this.TE())};q.prototype.p$=function(r,t){if(this.Vna!==r||this.Una!==t)this.Vna=r,this.Una=t,this.oaa(),this.TE()};q.prototype.h9=function(r){this.kJa(r.source);this.TE()};q.prototype.kJa=function(r){var t=this;if(this.PO.has(r)){var u=this.PO.get(r);this.PO.delete(r);u.forEach(function(v){t.BZ.delete(v)})}};q.prototype.update=
function(r){var t=this.rh(r);this.xSa(r);t&&this.TE()};q.prototype.rt=function(){var r=this,t=[];this.nJ&&t.push(this.nJ);this.CO&&t.push(this.CO);this.children.forEach(function(u){if(r.PO.has(u))var v=r.PO.get(u);else v=u.getLayers(),r.PO.set(u,v);v.forEach(function(w){if(r.BZ.has(w))var x=r.BZ.get(w);else x=r.OY(w),r.BZ.set(w,x);x!==null&&t.push(x)})});return t};q.prototype.OY=function(r){return r.IQa(Math.round(this.KQa),Math.round(this.LQa),this.OTa)};q.prototype.TE=function(){this.gJ=this.layers=
null;this.o(e.V)};q.prototype.DKa=function(r,t){for(var u=null,v=0;v<t.length&&!u;v++)t[v].J9===r&&(u=t[v]);for(v=0;v<t.length&&!u;v++)u=this.DKa(r,t[v].layers);return u};q.prototype.rh=function(r){var t=!1;t=this.vnb(r)||t;(t=this.tnb(r)||t)&&this.unb();var u=this.Nsa(r);u&&this.BZ.clear();var v=this.mob(r);(r=this.Fnb(r))&&this.oaa();return t||u||v||r};q.prototype.Nsa=function(r){if(this.K.x!==r.x||this.K.y!==r.y||this.K.width!==r.width||this.K.height!==r.height||this.K.offsetX!==r.offsetX||this.K.offsetY!==
r.offsetY||this.K.Jw!==r.Jw||this.K.Dd!==r.Dd||this.K.ie!==r.ie||this.K.De!==r.De||this.K.Ef!==r.Ef||this.K.Lc!==r.Lc||this.K.Mc!==r.Mc){var t=(r.x||0)+r.offsetX,u=(r.y||0)+r.offsetY,v=r.width,w=r.height;this.OTa=r.Jw?null:new c(t+r.Dd,u+r.ie,v-r.De-r.Dd,w-r.Ef-r.ie);this.KQa=t+r.Dd-r.Lc;this.LQa=u+r.ie-r.Mc;return!0}return!1};q.prototype.vnb=function(r){if(this.K.x!==r.x||this.K.y!==r.y||this.K.offsetX!==r.offsetX||this.K.offsetY!==r.offsetY){var t=r.lB&&r.$w>0,u=t?Math.max(0,-r.iu+r.eo):0;this.xcb=
(r.x||0)+r.offsetX-(t?Math.max(0,-r.hu+r.eo):0);this.ycb=(r.y||0)+r.offsetY-u;return!0}return!1};q.prototype.tnb=function(r){var t=r.vk&&r.vk.length>0,u=!!r.aw,v=r.pm>0&&(r.Te>0&&r.borderLeftColor||r.Ue>0&&r.borderTopColor||r.yf>0&&r.borderRightColor||r.xf>0&&r.borderBottomColor);if(!r.visible||!(t||u||v)){if(this.K.visible&&this.CO)return this.Xq&&(this.Xq.width=0,this.Xq.height=0),this.CO=null,!0}else if(this.K.visible!==r.visible||this.K.width!==r.width||this.K.height!==r.height||this.K.vk!==r.vk||
this.K.OD!==r.OD||this.K.pm!==r.pm||this.K.Te!==r.Te||this.K.borderLeftColor!==r.borderLeftColor||this.K.Ue!==r.Ue||this.K.borderTopColor!==r.borderTopColor||this.K.yf!==r.yf||this.K.borderRightColor!==r.borderRightColor||this.K.xf!==r.xf||this.K.borderBottomColor!==r.borderBottomColor||this.K.aw!==r.aw||this.K.lB!==r.lB||this.K.hu!==r.hu||this.K.iu!==r.iu||this.K.eo!==r.eo||this.K.wK!==r.wK||this.K.shadowColor!==r.shadowColor||this.K.$w!==r.$w){this.Xq||(this.Xq=document.createElement("canvas"));
var w=this.Xq,x=r.lB&&r.$w>0,y=x?Math.max(0,-r.hu+r.eo):0,z=x?Math.max(0,-r.iu+r.eo):0,A=x?Math.max(0,r.iu+r.eo):0;w.width=r.width+y+(x?Math.max(0,r.hu+r.eo):0);w.height=r.height+z+A;A=w.getContext("2d");A.clearRect(0,0,w.width,w.height);var D=Math.min(Math.floor(r.width/2),Math.floor(r.height/2));w=Math.min(D,r.borderTopLeftRadius);var F=Math.min(D,r.borderTopRightRadius),C=Math.min(D,r.borderBottomRightRadius);D=Math.min(D,r.borderBottomLeftRadius);var B=[Math.max(0,w-Math.max(r.Ue,r.Te)),Math.max(0,
F-Math.max(r.Ue,r.yf)),Math.max(0,C-Math.max(r.xf,r.yf)),Math.max(0,D-Math.max(r.xf,r.Te))],H=[w,F,C,D];if(x){x=A.globalAlpha;A.globalAlpha=r.$w;A.fillStyle=r.shadowColor;A.shadowColor=r.shadowColor;A.shadowBlur=r.eo;A.shadowOffsetX=r.hu;A.shadowOffsetY=r.iu;A.beginPath();A.roundRect(y,z,r.width,r.height,H);A.fill();A.shadowColor="rgba(0, 0, 0, 0)";var E=A.globalCompositeOperation;A.globalCompositeOperation="destination-out";A.globalAlpha=1;A.fillStyle="#ffffff";A.beginPath();A.roundRect(y,z,r.width,
r.height,H);A.fill();A.globalCompositeOperation=E;A.globalAlpha=x}A.translate(y,z);E=B.some(function(R){return R>0});if(t||u){x=A.globalAlpha;A.globalAlpha=r.pm;A.translate(r.Te,r.Ue);var G=Math.max(0,r.width-(r.Te+r.yf)),N=Math.max(0,r.height-(r.Ue+r.xf));if(t){var O=r.OD==h.q_?A.createLinearGradient(0,0,G,0):A.createLinearGradient(0,0,0,N);k.UIa(r).forEach(function(R){O.addColorStop(R.ratio,R.color)});A.fillStyle=O;A.roundRect(0,0,G,N,B);A.fill()}u&&(E&&(A.save(),A.roundRect(0,0,G,N,B),A.clip()),
A.drawImage(r.aw,0,0,G,N),E&&A.restore());A.translate(-r.Te,-r.Ue);A.globalAlpha=x}v&&(t=[[0,w],[w,0],[r.width-F,0],[r.width,F],[r.width,r.height-C],[r.width-C,r.height],[D,r.height],[0,r.height-D]],u=[[r.Te,r.Ue+B[0]],[r.Te+B[0],r.Ue],[r.width-r.yf-B[1],r.Ue],[r.width-r.yf,r.Ue+B[1]],[r.width-r.yf,r.height-r.xf-B[2]],[r.width-r.yf-B[2],r.height-r.xf],[r.Te+B[3],r.height-r.xf],[r.Te,r.height-r.xf-B[3]]],v=[[0,0],[r.width,0],[r.width,r.height],[0,r.height]],x=[[r.Te,r.Ue],[r.width-r.yf,r.Ue],[r.width-
r.yf,r.height-r.xf],[r.Te,r.height-r.xf]],r.Ue>0&&(A.beginPath(),A.moveTo(t[1][0],t[1][1]),A.lineTo(t[2][0],t[2][1]),A.lineTo(u[2][0],u[2][1]),A.lineTo(u[1][0],u[1][1]),A.fillStyle=l.gF(r.borderTopColor,r.pm),A.fill()),F>0&&(A.beginPath(),A.moveTo(t[2][0],t[2][1]),A.arcTo(v[1][0],v[1][1],t[3][0],t[3][1],H[1]),A.lineTo(u[3][0],u[3][1]),B[1]>0?A.arcTo(x[1][0],x[1][1],u[2][0],u[2][1],B[1]):A.lineTo(u[2][0],u[2][1]),A.fillStyle=r.borderTopColor||r.borderRightColor,A.fill()),r.yf>0&&(A.beginPath(),A.moveTo(t[3][0],
t[3][1]),A.lineTo(t[4][0],t[4][1]),A.lineTo(u[4][0],u[4][1]),A.lineTo(u[3][0],u[3][1]),A.fillStyle=l.gF(r.borderRightColor,r.pm),A.fill()),C>0&&(A.beginPath(),A.moveTo(t[4][0],t[4][1]),A.arcTo(v[2][0],v[2][1],t[5][0],t[5][1],H[2]),A.lineTo(u[5][0],u[5][1]),B[2]>0?A.arcTo(x[2][0],x[2][1],u[4][0],u[4][1],B[2]):A.lineTo(u[4][0],u[4][1]),A.fillStyle=r.borderBottomColor||r.borderRightColor,A.fill()),r.xf>0&&(A.beginPath(),A.moveTo(t[5][0],t[5][1]),A.lineTo(t[6][0],t[6][1]),A.lineTo(u[6][0],u[6][1]),A.lineTo(u[5][0],
u[5][1]),A.fillStyle=l.gF(r.borderBottomColor,r.pm),A.fill()),D>0&&(A.beginPath(),A.moveTo(t[6][0],t[6][1]),A.arcTo(v[3][0],v[3][1],t[7][0],t[7][1],H[3]),A.lineTo(u[7][0],u[7][1]),B[3]>0?A.arcTo(x[3][0],x[3][1],u[6][0],u[6][1],B[3]):A.lineTo(u[6][0],u[6][1]),A.fillStyle=r.borderBottomColor||r.borderLeftColor,A.fill()),r.Te>0&&(A.beginPath(),A.moveTo(t[7][0],t[7][1]),A.lineTo(t[0][0],t[0][1]),A.lineTo(u[0][0],u[0][1]),A.lineTo(u[7][0],u[7][1]),A.fillStyle=l.gF(r.borderLeftColor,r.pm),A.fill()),w>0&&
(A.beginPath(),A.moveTo(t[0][0],t[0][1]),A.arcTo(v[0][0],v[0][1],t[1][0],t[1][1],H[0]),A.lineTo(u[1][0],u[1][1]),B[0]>0?A.arcTo(x[0][0],x[0][1],u[0][0],u[0][1],B[0]):A.lineTo(u[0][0],u[0][1]),A.fillStyle=r.borderTopColor||r.borderLeftColor,A.fill()));A.translate(-y,-z);return!0}return!1};q.prototype.Fnb=function(r){return this.K.visible!==r.visible||this.K.x!==r.x||this.K.y!==r.y||this.K.width!==r.width||this.K.height!==r.height||this.K.offsetX!==r.offsetX||this.K.offsetY!==r.offsetY||this.K.cursor!==
r.cursor?(r.visible?(this.k7=new c((r.x||0)+r.offsetX||0,(r.y||0)+r.offsetY||0,r.width||0,r.height||0),this.cursor=r.cursor):(this.k7=null,this.cursor="inherit"),!0):!1};q.prototype.mob=function(r){return this.K.opacity!==r.opacity||this.K.visible!==r.visible?(this.opacity=r.opacity,this.visible=r.visible,!0):!1};q.prototype.unb=function(){if(this.Xq&&this.Xq.width>0&&this.Xq.height>0){var r=new c(this.xcb,this.ycb,this.Xq.width,this.Xq.height);this.CO=new b({canvas:this.Xq,rect:r,tag:"background"})}else this.CO=
null};q.prototype.oaa=function(){this.nJ=this.k7?new b({rect:this.k7,tag:"element",XA:this.Vna,RD:this.Una,M:this.YO,cursor:this.cursor}):null};return q}(n)});
define("tdv/view/core/visuals/canvas/CanvasCanvasVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/CanvasVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect".split(" "),function(a,m,h,n,g,k){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.tp=function(){return new n};b.prototype.rt=function(){var c=e.prototype.rt.call(this);if(this.kna){var d=this.OY(this.kna);d&&c.push(d)}return c};b.prototype.rh=
function(c){var d=e.prototype.rh.call(this,c);this.Lp(c)&&(d=!0,this.canvas&&this.canvas.width>0&&this.canvas.height>0?(c=new k(this.Rcb,this.Scb,this.canvas.width,this.canvas.height),this.kna=new g({canvas:this.canvas,rect:c,tag:"canvas"})):this.kna=null);return d};b.prototype.Lp=function(c){if(!c.visible||!c.canvas){if(this.K.visible&&this.K.canvas&&this.K.canvas.width>0&&this.K.canvas.height>0)return this.canvas=null,!0}else if(c.visible!==this.K.visible||c.canvas!==this.K.canvas||c.V6!==this.K.V6)return this.Scb=
this.Rcb=0,this.canvas=c.canvas,!0;return!1};return b}(h)});
define("tdv/view/core/visuals/canvas/CanvasContainerVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/ContainerVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/events/EventDispatcher".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.e8=null;d.vaa=null;d.er=null;d.zr=null;d.mMa=new e;d.LTa=new e;d.ugb=g.XQ;d.tgb=!1;d.qob=g.XQ;d.pob=!1;d.lMa=100;d.KTa=100;return d}
P(c,b);c.prototype.tp=function(){return new n};c.prototype.L7=function(){throw Error("Invalid call to CanvasContainerVisuals.getHScrollBarElement");};c.prototype.a8=function(){throw Error("Invalid call to CanvasContainerVisuals.getVScrollBarElement");};c.prototype.rt=function(){var d=b.prototype.rt.call(this);this.e8&&d.push(this.e8);this.vaa&&d.push(this.vaa);return d};c.prototype.rh=function(d){var f=b.prototype.rh.call(this,d);this.Knb(d)&&(f=!0,this.Lnb());this.kob(d)&&(f=!0,this.lob());return f};
c.prototype.Knb=function(d){if(!d.Ck){if(this.K.Ck)return this.er&&(this.er.width=0,this.er.height=0),!0}else if(d.Ck!==this.K.Ck||d.x!==this.K.x||d.y!==this.K.y||d.offsetX!==this.K.offsetX||d.offsetY!==this.K.offsetY||d.width!==this.K.width||d.height!==this.K.height||d.contentWidth!==this.K.contentWidth||d.contentHeight!==this.K.contentHeight||d.Ck!==this.K.Ck||d.Lc!==this.K.Lc||d.Cf!==this.K.Cf||d.au!==this.K.au||d.$t!==this.K.$t||d.ph!==this.K.ph||d.Wn!==this.K.Wn||d.Xn!==this.K.Xn||d.Mk!==this.K.Mk||
d.Mc!==this.K.Mc){var f=d.Ck&&d.Mk;this.er||(this.er=document.createElement("canvas"));var l=this.er;f=d.width-d.Wn-((f?d.ph:0)+d.Wn);this.vgb=(d.x||0)+d.offsetX+d.Wn+Math.round(d.Lc*f/d.contentWidth);this.wgb=(d.y||0)+d.offsetY+d.height-d.Xn-d.ph;this.lMa=f;var p=Math.round(d.Cf*f/d.contentWidth),q=d.ph;f=l.getContext("2d");l.width=p;l.height=q;f&&(f.clearRect(0,0,l.width,l.height),f.fillStyle=d.$t,p=f.globalAlpha,f.beginPath(),f.globalAlpha=d.au,f.roundRect(0,0,l.width,l.height,d.ph/2),f.fill(),
f.globalAlpha=p);return!0}return!1};c.prototype.kob=function(d){if(!d.Mk){if(this.K.Mk)return this.zr&&(this.zr.width=0,this.zr.height=0),!0}else if(d.Mk!==this.K.Mk||d.x!==this.K.x||d.y!==this.K.y||d.offsetX!==this.K.offsetX||d.offsetY!==this.K.offsetY||d.width!==this.K.width||d.height!==this.K.height||d.contentWidth!==this.K.contentWidth||d.contentHeight!==this.K.contentHeight||d.Ck!==this.K.Ck||d.Lc!==this.K.Lc||d.Cf!==this.K.Cf||d.au!==this.K.au||d.$t!==this.K.$t||d.ph!==this.K.ph||d.Wn!==this.K.Wn||
d.Xn!==this.K.Xn||d.Mk!==this.K.Mk||d.Mc!==this.K.Mc){var f=d.Ck&&d.Mk;this.zr||(this.zr=document.createElement("canvas"));var l=this.zr,p=d.height-d.Xn-((f?d.ph:0)+d.Xn);this.sob=(d.y||0)+d.offsetY+d.Xn+Math.round(d.Mc*p/d.contentHeight);this.rob=(d.x||0)+d.offsetX+d.width-d.Wn-d.ph;this.KTa=p;f=d.ph;var q=Math.round(d.Wg*p/d.contentHeight);p=l.getContext("2d");l.width=f;l.height=q;p&&(p.clearRect(0,0,l.width,l.height),p.fillStyle=d.$t,f=p.globalAlpha,p.beginPath(),p.globalAlpha=d.au,p.roundRect(0,
0,l.width,l.height,d.ph/2),p.fill(),p.globalAlpha=f);return!0}return!1};c.prototype.Lnb=function(){if(this.er&&this.er.width>0&&this.er.height>0){var d=new k(this.vgb,this.wgb,this.er.width,this.er.height);this.e8=new g({canvas:this.er,rect:d,XA:this.ugb,RD:this.tgb,tag:"hscroll",M:this.mMa})}else this.e8=null};c.prototype.lob=function(){if(this.zr&&this.zr.width>0&&this.zr.height>0){var d=new k(this.rob,this.sob,this.zr.width,this.zr.height);this.vaa=new g({canvas:this.zr,rect:d,XA:this.qob,RD:this.pob,
tag:"vscroll",M:this.LTa})}else this.vaa=null};return c}(h)});
define("tdv/view/core/visuals/canvas/CanvasImageVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/ImageVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/constants/Alignment tdv/events/EventDispatcher".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){var f=c.call(this)||this;f.Xoa=g.SB;f.Voa=!1;f.m8=new b;return f}P(d,c);d.prototype.ora=function(f,l){if(this.Xoa!==f||this.Voa!==l)this.Xoa=
f,this.Voa=l,this.Asa()};d.prototype.tp=function(){return new n};d.prototype.rt=function(){var f=c.prototype.rt.call(this);if(this.Woa){var l=this.OY(this.Woa);l&&f.push(l)}return f};d.prototype.rh=function(f){var l=c.prototype.rh.call(this,f);this.zsa(f)&&(l=!0,this.Asa());return l};d.prototype.oaa=function(){c.prototype.oaa.call(this);this.Asa()};d.prototype.Asa=function(){if(this.Jt&&this.Jt.width>0&&this.Jt.height>0){var f=new k(this.bhb,this.chb,this.Jt.width,this.Jt.height);this.Woa=new g({canvas:this.Jt,
rect:f,opacity:1,XA:this.Xoa,RD:this.Voa,M:this.m8,tag:"image",cursor:this.dhb})}else this.Woa=null};d.prototype.zsa=function(f){if(!f.visible||!f.image){if(this.K.visible&&this.K.image)return this.Jt&&(this.Jt.width=0,this.Jt.height=0),!0}else if(f.visible!==this.K.visible||f.image!==this.K.image||f.cursor!==this.K.cursor||f.contentWidth!==this.K.contentWidth||f.contentHeight!==this.K.contentHeight||f.width!==this.K.width||f.height!==this.K.height||f.Dd!==this.K.Dd||f.De!==this.K.De||f.ie!==this.K.ie||
f.Ef!==this.K.Ef||f.borderTopLeftRadius!==this.K.borderTopLeftRadius||f.borderTopRightRadius!==this.K.borderTopRightRadius||f.borderBottomRightRadius!==this.K.borderBottomRightRadius||f.borderBottomLeftRadius!==this.K.borderBottomLeftRadius||f.Ue!==this.K.Ue||f.yf!==this.K.yf||f.xf!==this.K.xf||f.Te!==this.K.Te||f.Yh!==this.K.Yh||f.verticalAlign!==this.K.verticalAlign){this.chb=this.bhb=0;this.Jt||(this.Jt=document.createElement("canvas"));var l=Math.min(Math.floor(f.width/2),Math.floor(f.height/
2));l=[Math.max(0,Math.min(l,f.borderTopLeftRadius)-Math.max(f.Ue,f.Te)),Math.max(0,Math.min(l,f.borderTopRightRadius)-Math.max(f.Ue,f.yf)),Math.max(0,Math.min(l,f.borderBottomRightRadius)-Math.max(f.xf,f.yf)),Math.max(0,Math.min(l,f.borderBottomLeftRadius)-Math.max(f.xf,f.Te))];var p=f.width-f.Dd-f.De,q=f.height-f.ie-f.Ef,r=this.Jt;r.width=p;r.height=q;var t=r.getContext("2d");t.clearRect(0,0,r.width,r.height);switch(f.Yh){default:p=0;break;case e.Db:p-=f.contentWidth;break;case e.$e:p=Math.floor((p-
f.contentWidth)*.5)}switch(f.verticalAlign){default:q=0;break;case e.Hc:q-=f.contentHeight;break;case e.$d:q=Math.floor((q-f.contentHeight)*.5)}t.drawImage(f.image,p,q,f.contentWidth,f.contentHeight);t.fillStyle="#ffffff";t.globalCompositeOperation="destination-in";t.roundRect(0,0,r.width,r.height,l);t.fill();t.globalCompositeOperation="source-over";this.dhb=f.cursor;return!0}return!1};return d}(h)});
define("tdv/view/core/visuals/canvas/CanvasLabelVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/LabelVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/util/Font tdv/view/util/MeasureText tdv/player/view/util/Color tdv/view/constants/Alignment".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(f){function l(){var p=f.call(this)||this;p.dF=document.createElement("canvas");p.nu=0;p.ku=0;return p}
P(l,f);l.prototype.tp=function(){return new n};l.prototype.zJ=function(){return this.nu};l.prototype.yJ=function(){return this.ku};l.prototype.rt=function(){var p=f.prototype.rt.call(this);if(this.msa){var q=this.OY(this.msa);q&&p.push(q)}return p};l.prototype.rh=function(p){var q=f.prototype.rh.call(this,p);this.Lsa(p)&&(q=!0,this.dF&&this.dF.width>0&&this.dF.height>0?(p=new k(this.qQ,this.rQ,this.KSa,this.JSa),this.msa=new g({canvas:this.dF,rect:p,opacity:1,tag:"text"})):this.msa=null);return q};
l.prototype.Lsa=function(p){if(p.visible&&p.text){var q=!1;if(p.visible!==this.K.visible||p.text!==this.K.text||p.direction!==this.K.direction||p.w7!==this.K.w7||p.zt!==this.K.zt||p.fontSize!==this.K.fontSize||p.fontFamily!==this.K.fontFamily||p.fontWeight!==this.K.fontWeight||p.fontStyle!==this.K.fontStyle||p.lu!==this.K.lu||p.mu!==this.K.mu||p.fo!==this.K.fo||p.bx!==this.K.bx||p.eF!==this.K.eF){var r=this.dF,t=p.bx>0;q=t?Math.max(0,-p.lu+p.fo):0;var u=t?Math.max(0,-p.mu+p.fo):0,v=t?Math.max(0,p.lu+
p.fo):0,w=t?Math.max(0,p.mu+p.fo):0,x=r.getContext("2d"),y=b(p.text,{fontSize:p.fontSize,fontFamily:p.fontFamily,fontWeight:p.fontWeight,fontStyle:p.fontStyle},x);this.nu=Math.round(y.width);this.ku=Math.round(y.height);this.KSa=this.nu+q+v;this.JSa=this.ku+u+w;r.width=this.KSa;r.height=this.JSa;x.clearRect(0,0,r.width,r.height);x.fillStyle=p.zt||"#000000";x.font=e.Y7({fontSize:p.fontSize,fontFamily:p.fontFamily,fontWeight:p.fontWeight,fontStyle:p.fontStyle});x.textAlign="center";x.textBaseline="middle";
t?(x.shadowColor="rgba("+c.Dp(p.eF).concat([p.bx]).join(",")+")",x.shadowBlur=p.fo,x.shadowOffsetX=p.lu,x.shadowOffsetY=p.mu):x.shadowColor="rgba(0, 0, 0, 0)";x.fillText(p.text,q+Math.round(this.nu*.5),u+Math.round(this.ku*.5));q=!0}if(q||p.width!==this.K.width||p.height!==this.K.height||p.Dd!==this.K.Dd||p.ie!==this.K.ie||p.De!==this.K.De||p.Ef!==this.K.Ef||p.Yh!==this.K.Yh||p.verticalAlign!==this.K.verticalAlign){q=(t=p.bx>0)?Math.max(0,-p.lu+p.fo):0;u=t?Math.max(0,-p.mu+p.fo):0;r=p.width-p.Dd-
p.De;t=p.height-p.ie-p.Ef;if(r<this.nu)this.qQ=0;else switch(p.Yh){case d.fb:this.qQ=0;break;case d.Db:this.qQ=r-this.nu;break;case d.$e:this.qQ=Math.round(r-this.nu)*.5}this.qQ=Math.round(this.qQ-q);if(t<this.ku)this.rQ=0;else switch(p.verticalAlign){case d.Tc:this.rQ=0;break;case d.Hc:this.rQ=t-this.ku;break;case d.$d:this.rQ=Math.round(t-this.ku)*.5}this.rQ=Math.round(this.rQ-u);q=!0}return q}return this.K.visible&&this.K.text?(this.dF&&(this.dF.width=0,this.ku=this.nu=this.dF.height=0),!0):!1};
return l}(h)});
define("tdv/view/core/visuals/canvas/FontInliner",["require","exports"],function(){function a(){var c=m();return Promise.all(c.map(n)).then(function(d){return d.join("\n")})}function m(){var c=[];Array.from(document.styleSheets).forEach(function(d){try{h(Array.from(d.cssRules),c)}catch(f){}});return c}function h(c,d){var f=this;c.forEach(function(l){l.type===CSSRule.FONT_FACE_RULE&&d.push(l);(l===null||l===void 0?0:l.cssRules)&&f.zqb(Array.from(l.cssRules),d)})}function n(c){var d=c.style.getPropertyValue("src"),
f=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi.exec(d);if(!f)return Promise.resolve(c.cssText);var l=f[2];return g(l).then(function(p){if(!p)return c.cssText;p=d.replace(l,p);return c.cssText.replace(d,p)})}function g(c){return b.has(c)?Promise.resolve(b.get(c)||null):fetch(c,{mode:"cors",credentials:"omit"}).then(function(d){return d.ok?d.blob().then(function(f){return new Promise(function(l,p){var q=new FileReader;q.onerror=function(){return p(Error("FileReader failed"))};q.onload=function(){l(q.result);
b.set(c,q.result)};q.readAsDataURL(f)})}):Promise.resolve(null)})}var k=null,e=null,b=new Map;return{getStyle:function(){return k?Promise.resolve(k):e?e:e=a().then(function(c){return k=c})}}});
define("tdv/view/core/visuals/canvas/rasterizer/htmlToSvg",["require","exports","tdv/view/core/visuals/canvas/FontInliner"],function(a,m,h){function n(d){var f=document.createElement("div");f.style.position="absolute";f.style.top="-9999px";f.style.left="-9999px";document.body.appendChild(f);d=d.cloneNode(!0);d.style.position="absolute";d.style.top="0px";d.style.left="0px";f.appendChild(d);return d}function g(d){var f;(f=d.parentElement)===null||f===void 0||f.removeChild(d);d.innerHTML=""}function k(d){d.querySelectorAll("img, canvas, video").forEach(function(f){f.remove()})}
function e(d){var f=new Set;d.querySelectorAll("*").forEach(function(l){l.style&&(l=getComputedStyle(l),l.font&&f.add(l.font))});return f}function b(d,f,l){return h.getStyle().then(function(p){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+l+'"><style>'+p+'</style><foreignObject x="0" y="0" width="100%" height="100%">'+d+"</foreignObject></svg>"})}function c(d){d=e(d);return Promise.all(Array.from(d).map(function(f){return document.fonts.load(f)}))}return function(d,f){var l=
n(d);k(l);return c(l).then(function(){if(f.aborted)throw Error("Aborted");return(new XMLSerializer).serializeToString(l).replace(/#/g,"%23").replace(/\n/g,"%0A")}).then(function(p){if(f.aborted)throw Error("Aborted");var q=l.getBoundingClientRect(),r=l.parentElement;g(l);g(r);return b(p,q.width,q.height)})}});
define("tdv/view/core/visuals/canvas/rasterizer/svgToCanvas",["require","exports"],function(a){function m(f){for(var l=0,p=0;p<f.length;p++)l=(l<<5)-l+f.charCodeAt(p),l&=l;return l.toString(36)}function h(f,l){return(new Promise(function(p,q){if(l.aborted)q(Error("Aborted"));else{var r=document.createElement("img");r.onload=function(){p(r)};r.src="data:image/svg+xml;charset=utf-8,"+f}})).then(function(p){if(l.aborted)throw Error("Aborted");return n(p,l)})}function n(f,l){return new Promise(function(p,
q){c.push({HJ:f,Lbb:l,resolve:p,reject:q});c.length===1&&k.requestFrame(g)})}function g(){for(var f=Date.now()+d;Date.now()<f&&c.length>0;){var l=c.shift();if(l.Lbb.aborted)l.reject(Error("Aborted"));else{var p=document.createElement("canvas");p.width=l.HJ.width;p.height=l.HJ.height;p.getContext("2d").drawImage(l.HJ,0,0);l.resolve(p)}}c.length>0&&k.requestFrame(g)}var k=a("tdv/view/util/Animation"),e=new Map,b=0,c=[],d=1E3/60*.5;return function(f,l){var p=m(f),q=e.get(p);return q?(q.spa=Date.now(),
Promise.resolve(q.canvas)):h(f,l).then(function(r){for(var t=r.width*r.height;b+t>67108864&&e.size>0;){for(var u=null,v=Infinity,w=0,x=Array.from(e.entries());w<x.length;w++){var y=x[w],z=y[0];y=y[1];y.spa<v&&(v=y.spa,u=z)}u&&(y=e.get(u),b-=y.canvas.width*y.canvas.height,y.canvas.width=0,y.canvas.height=0,e.delete(u))}e.set(p,{canvas:r,spa:Date.now()});b+=t;return r})}});
define("tdv/view/core/visuals/canvas/rasterizer/ElementObserver",["require","exports","tdv/utils"],function(a,m,h){return function(){function n(g){var k=this;this.element=null;this.onChange=h.nsa(g,1);this.q9=this.q9.bind(this);this.Yoa=[];this.RNa=new MutationObserver(function(){k.Eib()});this.jQa=new ResizeObserver(function(){k.tl()})}n.prototype.observe=function(g){this.element&&this.disconnect();if(this.element=g)this.Bsa(),this.RNa.observe(g,{subtree:!0,childList:!0,attributes:!0}),this.jQa.observe(g)};
n.prototype.disconnect=function(){this.RNa.disconnect();this.jQa.disconnect();this.element=null;this.Bsa()};n.prototype.Eib=function(){this.Bsa();this.onChange()};n.prototype.tl=function(){this.onChange()};n.prototype.q9=function(){this.onChange()};n.prototype.Bsa=function(){var g=this,k=this.element?Array.from(this.element.querySelectorAll("img")):[],e=k.filter(function(c){return!g.Yoa.includes(c)}),b=this.Yoa.filter(function(c){return!k.includes(c)});e.forEach(function(c){c.addEventListener("load",
g.q9)});b.forEach(function(c){c.removeEventListener("load",g.q9)});this.Yoa=k};return n}()});
define("tdv/view/core/visuals/canvas/rasterizer/Rasterizer","require exports tdv/events/EventDispatcher tdv/constants/EventName tdv/view/core/visuals/canvas/rasterizer/htmlToSvg tdv/view/core/visuals/canvas/rasterizer/svgToCanvas tdv/view/core/visuals/canvas/rasterizer/ElementObserver".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.element=null;d.canvas=null;d.sOa=new e(d.wOa.bind(d));return d}P(c,b);c.prototype.clear=function(){this.hRa(null)};c.prototype.hRa=
function(d){this.element!==d&&(this.element&&this.sOa.disconnect(),(this.element=d)?(this.sOa.observe(this.element),this.wOa()):(this.canvas=null,this.tO&&(this.tO.abort(),this.tO=null)))};c.prototype.If=function(){return this.canvas};c.prototype.wOa=function(){var d=this;this.tO&&this.tO.abort();this.tO=new AbortController;var f=this.tO.signal;g(this.element,f).then(function(l){if(f.aborted)throw Error("Aborted");return k(l,f)}).then(function(l){if(f.aborted)throw Error("Aborted");d.canvas=l;d.o(n.V)}).catch(function(){})};
return c}(h)});
define("tdv/view/core/visuals/canvas/CanvasHTMLVisuals","require exports tdv/constants/EventName tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/HTMLVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/core/visuals/canvas/rasterizer/Rasterizer".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){return c.call(this)||this}P(d,c);d.prototype.uoa=function(){var f,l=(f=this.gK)===null||f===void 0?void 0:f.If();return(l===
null||l===void 0?void 0:l.width)||0};d.prototype.toa=function(){var f,l=(f=this.gK)===null||f===void 0?void 0:f.If();return(l===null||l===void 0?void 0:l.height)||0};d.prototype.tp=function(){return new g};d.prototype.rt=function(){var f=c.prototype.rt.call(this);if(this.GMa){var l=this.OY(this.GMa);l&&f.push(l)}return f};d.prototype.rh=function(f){var l=c.prototype.rh.call(this,f);this.ysa(f)&&(l=!0,this.NJa());return l};d.prototype.ysa=function(f){var l;if(!f.visible||!f.td){if(this.K.visible&&
this.K.td)return(l=this.gK)===null||l===void 0||l.clear(),!0}else if(f.visible!==this.K.visible||f.td!==this.K.td)this.gK||(this.gK=new b,this.gK.bind(h.V,this.Kib,this,!0)),this.gK.hRa(f.td);return!1};d.prototype.NJa=function(){var f,l=(f=this.gK)===null||f===void 0?void 0:f.If();this.GMa=l&&l.width>0&&l.height>0?new k({canvas:l,rect:new e(0,0,l.width,l.height),tag:"html"}):null};d.prototype.Kib=function(){this.NJa();this.TE()};return d}(n)});
define("tdv/view/core/visuals/canvas/CanvasVisualsFactory","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visuals/canvas/CanvasCanvasVisuals tdv/view/core/visuals/canvas/CanvasContainerVisuals tdv/view/core/visuals/canvas/CanvasImageVisuals tdv/view/core/visuals/canvas/CanvasLabelVisuals tdv/view/core/visuals/canvas/CanvasHTMLVisuals tdv/view/core/UIComponent tdv/view/canvas/Canvas tdv/view/containers/Container tdv/view/html/HTML tdv/view/images/Image tdv/view/text/Label tdv/view/core/visuals/VisualsType".split(" "),
function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){return function(){function t(){}t.prototype.create=function(u){if(u instanceof l)return new b;if(u instanceof d)return new n;if(u instanceof p)return new k;if(u instanceof q)return new e;if(u instanceof f)return new g;if(u instanceof c)return new h;throw Error("Invalid UI instance");};t.prototype.getType=function(){return r.uUa};t.vJ=function(){t.Qo||(t.Qo=new t);return t.Qo};return t}()});
define("tdv/view/core/eventmanager/xrinput/XRInputEventManager","require exports tdv/constants/EventName tdv/view/core/visuals/canvas/Layer tdv/view/events/MouseEvent tdv/view/util/UserInitiatedAction".split(" "),function(a,m,h,n,g,k){return function(){function e(b,c){this.aOa=0;this.component=b;this.JJ=void 0;this.pB=c;this.rE=k.Xsa(this.rE.bind(this));this.LP=k.Xsa(this.LP.bind(this));this.sE=k.Xsa(this.sE.bind(this),!0)}e.prototype.qRa=function(b){this.JJ!==b&&((this.JJ=b)?this.Xna():this.aKa(),
this.Hsa())};e.prototype.Hsa=function(){this.wa().p$(this.JJ?n.XQ:n.SB,this.JJ?!0:!1)};e.prototype.sLa=function(){return this.JJ||!1};e.prototype.gnb=function(b){this.component.o(new g(h.Sa,b.x,b.y,b.pageX,b.pageY))};e.prototype.hnb=function(b){this.component.o(new g(h.gb,b.x,b.y,b.pageX,b.pageY))};e.prototype.inb=function(b){this.component.o(new g(h.$a,b.x,b.y,b.pageX,b.pageY))};e.prototype.jnb=function(b,c){this.component.o(new g(h.Qk,b.x,b.y,b.pageX,b.pageY,c.delta,c.mA))};e.prototype.dnb=function(b){this.component.o(new g(h.ma,
b.x,b.y,b.pageX,b.pageY))};e.prototype.enb=function(b){this.component.o(new g(h.fi,b.x,b.y,b.pageX,b.pageY))};e.prototype.rE=function(b){this.wa().YO.bind(h.$a,this.sE,this,!0);this.eQa(b)};e.prototype.eQa=function(b,c){var d;c===void 0&&(c=!0);var f=this.oX(b);f!==null&&(c&&this.hdb(f),this.gnb(f),(d=this.um())===null||d===void 0||d.eQa(b,c&&this.component.get("propagateClick")))};e.prototype.LP=function(b){this.component.Xb().PE(this.component);this.fQa(b)};e.prototype.fQa=function(b){var c,d=this.oX(b);
d!==null&&(this.gdb(d),this.hnb(d),(c=this.um())===null||c===void 0||c.fQa(b))};e.prototype.sE=function(b){this.wa().YO.h(h.$a,this.sE,this);var c=this.oX(b);c!==null&&(this.gQa(b,this.Ahb(c)),this.nhb(c))};e.prototype.gQa=function(b,c){var d,f=this.oX(b);f!==null&&(this.inb(f),this.fdb(c),(d=this.um())===null||d===void 0||d.gQa(b,c))};e.prototype.hdb=function(b){this.component.bind(h.Eb,this.qJa,this,!0);this.eJ=b};e.prototype.gdb=function(b){this.eJ&&this.aLa(this.eJ,b)>20&&this.qna()};e.prototype.fdb=
function(b){this.eJ&&(this.dnb(this.eJ),b&&this.enb(this.eJ),this.qna())};e.prototype.qna=function(){this.eJ&&(this.component.h(h.Eb,this.qJa,this),this.eJ=void 0)};e.prototype.qJa=function(){this.qna()};e.prototype.eJa=function(){return!1};e.prototype.bOa=function(b){this.component.Xb().Uha&&this.hQa(b)};e.prototype.hQa=function(b){var c,d=this.oX(b);if(d!==null){var f=this.Mfb(b);this.jnb(d,f);this.eJa(f)||(c=this.um())===null||c===void 0||c.hQa(b)}};e.prototype.oX=function(b){var c=this.pB.Gfb(b.pageX,
b.pageY,this.wa().nJ);return c?{x:c.x,y:c.y,pageX:b.pageX,pageY:b.pageY}:null};e.prototype.Mfb=function(b){var c={};c.delta=Math.max(-1,Math.min(1,-b.delta));c.mA=c.delta;return c};e.prototype.wa=function(){return this.component.wa()};e.prototype.um=function(){var b=this.component.getParent();if(b)return b.qLa()};e.prototype.Xna=function(){var b=this.wa().YO;b.bind(h.Sa,this.rE,this,!0);b.bind(h.gb,this.LP,this,!0);b.bind(h.Qk,this.bOa,this,!0)};e.prototype.aKa=function(){var b=this.wa().YO;b.h(h.Sa,
this.rE,this);b.h(h.gb,this.LP,this);b.h(h.Qk,this.bOa,this)};e.prototype.nhb=function(b){this.aOa=Date.now();this.$Na=b};e.prototype.Ahb=function(b){return Date.now()-this.aOa>500||!this.$Na?!1:this.aLa(this.$Na,b)<=20};e.prototype.aLa=function(b,c){var d=b.pageX-c.pageX;b=b.pageY-c.pageY;return Math.sqrt(d*d+b*b)};return e}()});
define("tdv/view/core/eventmanager/xrinput/IconButtonXRInputEventManager",["require","exports","tdv/view/core/eventmanager/xrinput/XRInputEventManager","tdv/view/core/visuals/canvas/Layer","tdv/constants/EventName"],function(a,m,h,n,g){return function(k){function e(b,c){b=k.call(this,b,c)||this;b.QMa=!1;return b}P(e,k);e.prototype.wa=function(){return k.prototype.wa.call(this)};e.prototype.rRa=function(b){this.QMa=b;this.Hsa()};e.prototype.rE=function(b){this.wa().m8.bind(g.$a,this.sE,this,!0);k.prototype.rE.call(this,
b)};e.prototype.sE=function(b){this.wa().m8.h(g.$a,this.sE,this);k.prototype.sE.call(this,b)};e.prototype.Hsa=function(){this.JJ?this.QMa?(this.wa().p$(n.XQ,!0),this.wa().ora(n.SB,!1)):(this.wa().p$(n.SB,!1),this.wa().ora(n.rua,!0)):(this.wa().p$(n.SB,!1),this.wa().ora(n.SB,!1))};e.prototype.Xna=function(){k.prototype.Xna.call(this);var b=this.wa().m8;b.bind(g.Sa,this.rE,this,!0);b.bind(g.gb,this.LP,this,!0)};e.prototype.aKa=function(){var b=this.wa().YO;b.h(g.Sa,this.rE,this);b.h(g.gb,this.LP,this)};
return e}(h)});
define("tdv/view/core/eventmanager/xrinput/ScrollableContainerXRInputEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/xrinput/XRInputEventManager","tdv/player/view/util/Device"],function(a,m,h,n,g){return function(k){function e(b,c){b=k.call(this,b,c)||this;b.gA=0;b.hA=0;b.Qpb=void 0;b.Rpb=void 0;b.uE=!1;b.vE=!1;b.vJa=0;b.EC=b.EC.bind(b);b.ID=b.ID.bind(b);b.Wna();return b}P(e,k);e.prototype.Wna=function(){this.wa().mMa.bind(h.Sa,this.EC,this,!1);this.wa().LTa.bind(h.Sa,
this.ID,this,!1);this.component.bind(h.Sa,this.rdb,this,!1);this.component.bind(h.uc,this.Vda,this,!1);this.component.bind(h.Eb,this.Uda,this,!1);this.component.bind(h.Qk,this.sdb,this,!1)};e.prototype.wa=function(){return this.component.wa()};e.prototype.EC=function(){this.component.Ww(!0);this.uE=!0};e.prototype.ID=function(){this.component.Xw(!0);this.vE=!0};e.prototype.Vda=function(){this.component.$E(!0)};e.prototype.Uda=function(){this.component.$E(!1)};e.prototype.rdb=function(b){this.component.hn||
this.component.jn?(this.pB.bind(h.gb,this.CJa,this,!1),this.pB.bind(h.$a,this.DJa,this,!1),this.gA=b.pageX,this.hA=b.pageY):this.qdb(b)};e.prototype.CJa=function(b){var c=0,d=0;this.uE&&(c=(b.pageX-this.gA)/this.wa().lMa);this.vE&&(d=(b.pageY-this.hA)/this.wa().KTa);this.gA=b.pageX;this.hA=b.pageY;c==0&&d==0||this.component.KP(c,d,"content")};e.prototype.DJa=function(){this.pB.h(h.gb,this.CJa,this);this.pB.h(h.$a,this.DJa,this);this.component.Ww(!1);this.component.Xw(!1);this.vE=this.uE=!1};e.prototype.eJa=
function(b){return b.delta>0&&this.component.LO()||b.delta<0&&this.component.JO()?!0:!1};e.prototype.sdb=function(b){b=(g.Nd()==g.r_?b.mA*.1:b.delta)*.3;this.component.KP(0,-b,"page")};e.prototype.qdb=function(b){if(this.component.KO()||this.component.MO())this.pB.bind(h.gb,this.AJa,this,!1),this.pB.bind(h.$a,this.BJa,this,!1),this.component.$E(!0),this.gA=b.pageX,this.hA=b.pageY,this.khb()};e.prototype.AJa=function(b){var c=b.pageX-this.gA,d=b.pageY-this.hA;!this.uE&&!this.vE&&c*c+d*d>25&&(this.uE=
this.component.KO(),this.vE=this.component.MO(),this.component.Ww(this.uE),this.component.Xw(this.vE));if(this.uE||this.vE)this.component.KP(this.uE?-c:0,this.vE?-d:0),this.gA=b.pageX,this.hA=b.pageY,this.xnb()};e.prototype.BJa=function(){this.pB.h(h.gb,this.AJa,this);this.pB.h(h.$a,this.BJa,this);this.component.$E(!1);var b=Math.max(Math.abs(this.yJa/.001),Math.abs(this.zJa/.001));this.component.lIa(-.5*this.yJa*b,-.5*this.zJa*b,b)};e.prototype.khb=function(){this.wJa=this.gA;this.xJa=this.hA};e.prototype.xnb=
function(){var b=(new Date).getTime(),c=b-this.vJa;c>10&&(this.vJa=b,this.yJa=(this.gA-this.wJa)/c,this.zJa=(this.hA-this.xJa)/c,this.wJa=this.gA,this.xJa=this.hA)};return e}(n)});
define("tdv/view/core/eventmanager/xrinput/XRInputEventManagerFactory","require exports tdv/view/core/UIComponent tdv/view/core/eventmanager/xrinput/XRInputEventManager tdv/view/core/eventmanager/xrinput/IconButtonXRInputEventManager tdv/view/core/eventmanager/xrinput/ScrollableContainerXRInputEventManager tdv/view/buttons/IconButton tdv/view/containers/ScrollableContainer".split(" "),function(a,m,h,n,g,k,e,b){return function(){function c(){}c.prototype.create=function(d,f){if(d instanceof e)return new g(d,
f[0]);if(d instanceof b)return new k(d,f[0]);if(d instanceof h)return new n(d,f[0]);throw Error("Invalid UI instance");};c.vJ=function(){c.Qo||(c.Qo=new c);return c.Qo};return c}()});
define("tdv/view/core/eventmanager/xrinput/UIPanelEventAdapter","require exports tdv/view/core/visuals/canvas/Layer tdv/view/events/MouseEvent tdv/player/view/util/xr/ui/UIPointerState tdv/player/view/util/XR tdv/events/EventDispatcher tdv/constants/EventName tdv/view/util/Animation tdv/player/view/util/ColorPicker".split(" "),function(a,m,h,n,g,k,e,b,c,d){a=function(f){function l(){var p=f.call(this)||this;p.GK=null;p.content=null;p.Toa=null;p.F8=!1;p.upa=0;p.vpa=0;p.Y8=[];p.ir=!1;p.A8=!1;return p}
P(l,f);l.prototype.fra=function(p){this.content=p};l.prototype.K$=function(p){this.GK!==p&&(this.GK&&(k.M.h(b.V,this.Ta,this),k.M.h(b.Zd,this.Kg,this)),(this.GK=p)?(k.M.bind(b.V,this.Ta,this,!0),this.Ta()):this.mZ(null))};l.prototype.Ta=function(){k.isPresenting?(k.M.bind(b.Zd,this.Kg,this,!0),this.Kg()):k.M.h(b.Zd,this.Kg,this)};l.prototype.Kg=function(){this.onChange()};l.prototype.onChange=function(){var p,q;this.GK?(this.mZ(this.GK.Cg),(p=this.GK)===null||p===void 0||p.YE(this.ir,this.A8)):this.Toa&&
(this.mZ(this.Toa.Cg),(q=this.Toa)===null||q===void 0||q.mZ(this.ir,this.A8))};l.prototype.mZ=function(p){var q;(q=this.content)!==null&&q!==void 0&&q.wa()&&(p?this.FIa(p.vPa,p.wPa,p.pressed,p.Zmb,p.$mb):this.FIa(void 0,void 0,!1,0,0))};l.prototype.FIa=function(p,q,r,t,u){if(p!==this.upa||q!==this.vpa||this.F8!==r){var v=p===void 0?this.upa:p,w=q===void 0?this.vpa:q;this.Vj(p,q);this.F8!==r&&((this.F8=r)?this.$h(v,w):this.lf(v,w));this.upa=v;this.vpa=w}t===0&&u===0||this.Dib(p,q,u)};l.prototype.Vj=
function(p,q){var r,t,u=p!==void 0&&q!==void 0;u&&this.o(new n(b.gb,p,q,p,q));u=u?this.Aoa(p,q):[];u.length>0?(this.A8=u[0].cursor=="pointer",u.forEach(function(v){v.M.o(new n(b.gb,p-v.left,q-v.top,p,q))}),this.ir=!0):(this.ir&&((t=(r=this.content)===null||r===void 0?void 0:r.Xb())===null||t===void 0||t.PE(null)),this.ir=this.A8=!1)};l.prototype.$h=function(p,q){this.o(new n(b.Sa,p,q,p,q));this.Y8=this.Aoa(p,q);this.Y8.forEach(function(r){r.M.o(new n(b.Sa,p-r.left,q-r.top,p,q))})};l.prototype.lf=
function(p,q){this.o(new n(b.$a,p,q,p,q));this.Y8.forEach(function(r){r.M.o(new n(b.$a,p-r.left,q-r.top,p,q))});this.Y8=[]};l.prototype.Dib=function(p,q,r){var t=p!==void 0&&q!==void 0,u=r*c.hX/1E3*5;t&&this.o(new n(b.Qk,p,q,p,q,u));r=t?this.Aoa(p,q):[];r.length>0&&r.forEach(function(v){v.M.o(new n(b.Qk,p-v.left,q-v.top,p,q,u))})};l.prototype.Aoa=function(p,q){var r,t=(r=this.content)===null||r===void 0?void 0:r.wa();if(!t)return[];r=t.jfb();if(!r)return[];var u=r.rect;return this.CKa(p+u.left,q+
u.top,r.layers).reduce(function(v,w){v.length!=0&&v[v.length-1].RD||v.push(w);return v},[]).reduce(function(v,w){v.find(function(x){return x.M===w.M})||v.push(w);return v},[]).map(function(v){return{M:v.M,cursor:v.cursor,left:v.rect.left-u.left,top:v.rect.top-u.top}})};l.prototype.CKa=function(p,q,r){for(var t=[],u=r.length-1;u>=0;u--){var v=r[u];t=t.concat(this.CKa(p,q,v.layers));v.opacity>0&&v.XA!==h.SB&&v.visibleRect.containsPoint(p,q)&&(v.XA===h.rua&&v.canvas?d.ax(v.canvas,p-v.rect.left,q-v.rect.top)&&
t.push(v):t.push(v))}return t};l.prototype.Gfb=function(p,q,r){var t,u=(t=this.content)===null||t===void 0?void 0:t.wa();return u?(r=u.GLa(r))?{x:p-r.rect.left,y:q-r.rect.top}:null:null};return l}(e);(function(f){function l(p){var q=f.call(this)||this;q.Soa=p;q.Cg=null;q.Vj=q.Vj.bind(q);q.$h=q.$h.bind(q);q.lf=q.lf.bind(q);document.addEventListener("mousemove",q.Vj,!0);document.addEventListener("mousedown",q.$h,!0);document.addEventListener("mouseup",q.lf,!0);return q}P(l,f);l.prototype.cc=function(){return this.Soa};
l.prototype.dispose=function(){document.removeEventListener("mousemove",this.Vj,!0);document.removeEventListener("mousedown",this.$h,!0);document.removeEventListener("mouseup",this.lf,!0)};l.prototype.mZ=function(p,q){this.Soa.style.cursor=q?"pointer":"default"};l.prototype.Vj=function(p){this.Msa(p);p.preventDefault();p.stopPropagation()};l.prototype.$h=function(p){this.pressed=!0;this.Msa(p);p.preventDefault();p.stopPropagation()};l.prototype.lf=function(p){this.pressed=!1;this.Msa(p);p.preventDefault();
p.stopPropagation()};l.prototype.Msa=function(p){var q=this.Soa.getBoundingClientRect(),r=p.clientX-q.left;p=p.clientY-q.top;var t=q.width;q=q.height;r>=0&&r<=t&&p>=0&&p<=q?(this.Cg||(this.Cg=new g),this.Cg.vPa=r,this.Cg.wPa=p,this.Cg.distance=1,this.Cg.pressed=this.pressed):this.Cg=null;this.o(b.V)};return l})(e);return a});
define("tdv/player/script/XRPanel","require exports tdv/binding/Bindable tdv/constants/EventName tdv/player/parser/ClassInfo tdv/view/core/visuals/canvas/CanvasVisualsFactory tdv/view/core/eventmanager/xrinput/XRInputEventManagerFactory tdv/view/core/eventmanager/xrinput/UIPanelEventAdapter tdv/player/view/util/xr/ui/UI".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(f){function l(){var p=f.call(this)||this;d.Xma(p);p.Cla=new b;p.Ud=null;p.yM=!1;return p}P(l,f);l.prototype.set=function(p,q){f.prototype.set.call(this,
p,q);switch(p){case "content":this.fra(q);break;case "autoCenter":this.k$(q);break;case "hud":this.s$(q);break;case "draggable":this.UY(q);break;case "draggableDistance":this.n$(q);break;case "modal":this.tra(q);break;case "yaw":this.sj(q);break;case "pitch":this.$n(q);break;case "distance":this.Yn(q);break;case "pixelScale":this.kZ(q);break;case "veilColor":this.L$(q);break;case "veilOpacity":this.Ora(q)}return this};l.prototype.get=function(p,q){switch(p){case "yaw":return this.Ga=this.Ud?this.Ud.Kc():
this.Ga;case "pitch":return this.rb=this.Ud?this.Ud.Jc():this.rb;default:return f.prototype.get.call(this,p,q)}};l.prototype.bra=function(p){this.Gb!==p&&(this.Gb=p,this.co())};l.prototype.SJa=function(){if(!this.Ud){var p=c.Jdb();this.K$(p)}};l.prototype.Jna=function(){if(this.Ud){var p=this.Ud;this.K$(null);c.feb(p)}};l.prototype.K$=function(p){if(this.Ud!==p&&(this.Ud&&(this.Ga=this.Ud.Kc(),this.rb=this.Ud.Jc()),this.Ud=p,this.Cla.K$(p),this.Ud&&(this.Ud.Yn(this.PG),this.Ud.n$(this.Tea),this.Ud.kZ(this.bja),
this.Ud.s$(this.yga),this.Ud.k$(this.DL),this.Ud.L$(this.Ama),this.IK(),this.qaa(),this.MZ(),this.DL||(this.Ud.sj(this.Ga),this.Ud.$n(this.rb)),this.yM)))this.onChange()};l.prototype.fra=function(p){this.$f!==p&&(this.$f&&(this.$f.h(n.Rb,this.tl,this),this.$f.h(n.INIT,this.BOa,this),this.$f.h(n.od,this.ZOa,this),this.$f.h(n.jd,this.p9,this),this.$f.wa().h(n.V,this.onChange,this)),this.SD(),this.$f=p)&&(this.$f.getParent()&&this.$f.getParent().removeChild(this.$f),this.$f.bind(n.Rb,this.tl,this,!0),
this.$f.bind(n.INIT,this.BOa,this,!0),this.$f.bind(n.od,this.ZOa,this,!0),this.$f.bind(n.jd,this.p9,this,!0),this.Cla.fra(p),this.co())};l.prototype.k$=function(p){var q;this.DL!==p&&(this.DL=p,(q=this.Ud)===null||q===void 0||q.k$(this.DL))};l.prototype.s$=function(p){var q;this.yga!==p&&(this.yga=p,(q=this.Ud)===null||q===void 0||q.s$(this.yga))};l.prototype.UY=function(p){var q;this.Sea!==p&&(this.Sea=p,this.IK(),(q=this.Ud)===null||q===void 0||q.UY(this.Sea))};l.prototype.n$=function(p){var q;
this.Tea!==p&&(this.Tea=p,(q=this.Ud)===null||q===void 0||q.n$(this.Tea))};l.prototype.tra=function(p){this.Nha!==p&&(this.Nha=p,this.qaa(),this.MZ())};l.prototype.sj=function(p){var q;this.DL||(this.Ga=p,(q=this.Ud)===null||q===void 0||q.sj(this.Ga))};l.prototype.$n=function(p){var q;this.DL||(this.rb=p,(q=this.Ud)===null||q===void 0||q.$n(this.rb))};l.prototype.Yn=function(p){var q;this.PG!==p&&(this.PG=p,(q=this.Ud)===null||q===void 0||q.Yn(this.PG))};l.prototype.kZ=function(p){var q;this.bja!==
p&&(this.bja=p,(q=this.Ud)===null||q===void 0||q.kZ(this.bja))};l.prototype.L$=function(p){var q;this.Ama!==p&&(this.Ama=p,(q=this.Ud)===null||q===void 0||q.L$(this.Ama))};l.prototype.Ora=function(p){this.BHa!==p&&(this.BHa=p,this.MZ())};l.prototype.tl=function(){};l.prototype.ZOa=function(){this.qaa();this.IK();this.MZ()};l.prototype.p9=function(){this.qaa();this.IK();this.MZ()};l.prototype.BOa=function(){this.yM=!0;var p=this.$f.wa();p.bind(n.V,this.onChange,this,!0);p.Ukb();this.onChange()};l.prototype.onChange=
function(){var p,q,r,t;if(this.$f){var u=this.$f.wa();u=(u===null||u===void 0?void 0:u.getLayers())||[];u.length==0?(p=this.Ud)===null||p===void 0||p.bdb():(p=u[0],u=p.canvas,u.width>0&&u.height>0&&((q=this.Ud)===null||q===void 0||q.ETa(u),(r=this.Ud)===null||r===void 0||r.Zn(p.opacity),q=this.$f.get("actualHeight"),r=this.$f.get("actualWidth"),(t=this.Ud)===null||t===void 0||t.Bkb(r*.5-p.rect.left,q-p.rect.top+20)))}};l.prototype.qaa=function(){var p;(p=this.Ud)===null||p===void 0||p.tra(this.Nha&&
(this.$f?this.$f.get("visible"):!1))};l.prototype.IK=function(){var p;(p=this.Ud)===null||p===void 0||p.UY(this.Sea&&(this.$f?this.$f.get("visible"):!1))};l.prototype.MZ=function(){var p,q;(p=this.Ud)===null||p===void 0||p.Ora(this.Nha&&((q=this.$f)===null||q===void 0?0:q.get("visible"))?this.BHa:0)};l.prototype.co=function(){var p;(p=this.$f)===null||p===void 0||p.co(this.Gb,k.vJ(),e.vJ(),[this.Cla])};l.prototype.SD=function(){var p;(p=this.$f)===null||p===void 0||p.SD()};return l}(h);var d=g.create("XRPanel",
a);return a});
define("tdv/view/containers/windows/XRWindow","require exports tdv/view/containers/windows/BaseWindow tdv/player/script/XRPanel tdv/player/view/util/XR three.mod tdv/constants/EventName".split(" "),function(a,m,h,n,g,k,e){a=function(d){function f(){var l=d.call(this)||this;l.kIa=!1;l.gf("XRWindow");l.mg=new n;l.mg.set("content",l);l.bind(e.aL,l.wib,l,!1);return l}P(f,d);f.prototype.set=function(l,p){switch(l){case "modal":this.mg.set("modal",p);break;case "autoCenter":this.mg.set("autoCenter",p);
break;case "draggable":this.mg.set("draggable",p);break;default:d.prototype.set.call(this,l,p)}};f.prototype.show=function(l){var p=this;this.O6();!l&&this.kIa||this.get("autoCenter")||(this.mg.set("yaw",g.isPresenting?-b.setFromQuaternion(g.yl,"YXZ").y*c:0),this.mg.set("pitch",g.isPresenting?b.setFromQuaternion(g.yl,"YXZ").x*c:0));l=this.get("application");var q=l.get("xrPanels")||[];l.set("xrPanels",q.filter(function(r){return r!==p.mg}).concat([this.mg]));this.kIa=!0;setTimeout(function(){p.set("visible",
!0)},0)};f.prototype.oe=function(){this.N6();this.set("visible",!1)};f.prototype.wib=function(){var l=this,p=this.get("application"),q=p.get("xrPanels")||[];p.set("xrPanels",q.filter(function(r){return r!==l.mg}))};return f}(h);var b=new k.Euler,c=180/Math.PI;return a});
define("tdv/player/script/XRWindow",["require","exports","tdv/player/parser/ClassInfo","tdv/view/containers/windows/XRWindow"],function(a,m,h,n){a=function(k){function e(){var b=k.call(this)||this;g.Xma(b);b.show=b.show;b.hide=b.oe;return b}P(e,k);return e}(n);var g=h.create("XRWindow",a);return a});
define("tdv/player/view/zoomimage/Renderer","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/images/ImageLoader tdv/view/constants/ScaleMode tdv/player/view/util/Device tdv/utils".split(" "),function(a){function m(t){this.source=t;this.width=this.source.get("width");this.height=this.source.get("height");this.url=this.source.get("url");this.oP=
this.source.get("grayscale");this.HA=new f(g.Jm)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),k=a("tdv/events/Event"),e=a("tdv/events/EventDispatcher"),b=a("tdv/view/util/Animation"),c=a("tdv/view/util/Ease"),d=a("tdv/view/util/EaseDimension"),f=a("tdv/view/images/ImageLoader"),l=a("tdv/view/constants/ScaleMode"),p=a("tdv/player/view/util/Device"),q=a("tdv/utils"),r=q.extend(e,function(){e.call(this);this.q3=this.q3.bind(this);this.Kh=null;this.se=
[];this.Xo=[];this.gk=this.ji=this.Ng=this.Og=100;this.Mj=1;this.mC=this.lC=.5;this.ne=1;this.Wk=this.mk=null;this.c4=!1;this.iea={};this.WL={};this.WL.low={};this.WL.hight={};p.DO()==p.IQ&&(this.WL.low.transform="translateZ(0)",this.WL.hight.transform="");this.ha=!1;this.Vi="inherit";this.qa=document.createElement("div");this.qa.style.position="absolute";this.qa.style.left="0";this.qa.style.top="0";this.qa.style.right="0";this.qa.style.bottom="0";this.qa.style.overflow="hidden";this.CS=null;this.wh=
q.nr(this.za,this)});r.prototype.cc=function(){return this.qa};r.prototype.hQ=function(t){this.ti!=t&&(this.ti=t,this.lda(1),this.wh())};r.prototype.m$=function(t){this.Vi!=t&&(this.Vi=t,this.Wk&&(this.Wk.style.cursor=this.Vi),this.mk&&(this.mk.style.cursor=this.Vi))};r.prototype.Pkb=function(t){this.se!=t&&(this.se&&h.da(this.se,["levels.url"],this.q3),(this.se=t)&&h.ba(this.se,["levels.url"],this.q3,!0))};r.prototype.q3=function(){this.Nda();this.Kh=null;this.mk&&(this.qa.removeChild(this.mk),this.mk=
null);this.Wk&&(this.qa.removeChild(this.Wk),this.Wk=null);this.bh&&(this.bh=null);this.Nda();this.c4=!1;this.Xo.forEach(u=>{u.HA.cancel();u.HA.h(n.ia,this.iAa,this)});this.Xo=(this.se&&this.se.get("levels")||[]).filter(function(u){return u.get("url")}).map(u=>{u=new m(u);u.HA.bind(n.ia,this.iAa,this);return u});var t=this.b2a();t?(this.ji=t.width,this.gk=t.height):this.gk=this.ji=100;this.mC=this.lC=.5;this.lda(1);this.wh()};r.prototype.l$=function(t,u){if(this.Og!=t||this.Ng!=u)this.Og=t,this.Ng=
u,this.wh()};r.prototype.vkb=function(t,u){if(this.txa!=t||this.sxa!=u)this.txa=t,this.sxa=u,this.wh()};r.prototype.Ra=function(t){this.ha!=t&&(this.ha=t,this.wh())};r.prototype.move=function(t,u){var v=this.Mj*this.ne;this.lC+=t/(this.ji*v);this.mC+=u/(this.gk*v);this.F4()};r.prototype.yA=function(){return this.ne};r.prototype.setScale=function(t){this.lda(Math.max(1,Math.min(1/this.Mj,t)));this.Kh&&this.Kh.width<this.ne*this.Mj*this.ji&&this.Kh.width<this.ji?this.za():this.F4()};r.prototype.bNa=
function(t){if(!this.mk)return!1;var u=q.offset(this.mk),v=t.pageX-u.left;t=t.pageY-u.top;return v>=0&&t>=0&&v<this.mk.clientWidth&&t<this.mk.clientHeight};r.prototype.za=function(){if(this.ha){this.ebb();var t=this.k2a();t&&t.HA.pj()?(t!=this.Kh&&(this.Kh||(this.wh(),this.c4=!0),this.Z_a(t),this.Kh=t),this.WEa(null)):this.WEa(t);this.F4()}};r.prototype.ebb=function(){switch(this.ti){case l.Tp:var t=this.Og/this.ji;break;case l.Pk:t=this.Ng/this.gk;break;case l.Kr:t=this.ji*this.Ng>this.gk*this.Og?
this.Ng/this.gk:this.Og/this.ji;break;case l.rUa:t=Math.min(this.txa/this.ji,this.sxa/this.gk);break;default:t=this.ji*this.Ng>this.gk*this.Og?this.Og/this.ji:this.Ng/this.gk}this.iYa(t)};r.prototype.iAa=function(){this.wh()};r.prototype.Z_a=function(t){this.Wk&&(this.uka(this.Wk,1),this.mk&&this.qa.removeChild(this.mk),this.mk=this.Wk);this.Wk=this.r_a(t);this.uka(this.Wk,0);this.qa.appendChild(this.Wk);this.bh=this.i_a();this.iea={}};r.prototype.k2a=function(){return this.Kh?this.q1a(this.ne*this.Mj*
this.ji):this.I2a()};r.prototype.WEa=function(t){this.Xo.forEach(u=>{u==t?u.HA.rl()!=u.url&&u.HA.load(u.url):u.HA.pj()||u.HA.cancel()})};r.prototype.b2a=function(){return this.Xo.reduce((t,u)=>{t||(t=u);if(u.width>t.width||u.width==t.width&&!u.oP&&t.oP)t=u;return t},null)};r.prototype.I2a=function(){return this.Xo.reduce((t,u)=>{t||(t=u);if(u.width<t.width||u.width==t.width&&u.oP&&!t.oP)t=u;return t},null)};r.prototype.q1a=function(t){return this.Xo.reduce((u,v)=>{u||(u=v);if(v.width>=t&&u.width<
t||v.width>=t&&v.width<u.width||v.width<t&&v.width>u.width||!v.oP&&u.oP)u=v;return u},null)};r.prototype.r_a=function(t){t=t.HA.yg(!0);t.style.position="absolute";t.style.cursor=this.Vi;t.style.pointerEvents="none";return t};r.prototype.i_a=function(){return new c("linear",[new d("alpha",0,1)],200)};r.prototype.F4=function(){b.requestFrame(function(t){this.A4(t,"low")},this)};r.prototype.woa=function(){return this.ne*this.Mj*this.ji};r.prototype.voa=function(){return this.ne*this.Mj*this.gk};r.prototype.nLa=
function(){var t=this.woa();return t>this.Og?Math.max(this.Og-t,Math.min(0,this.Og*.5-t*this.lC)):(this.Og-t)*.5};r.prototype.oLa=function(){var t=this.voa();return t>this.Ng?Math.max(this.Ng-t,Math.min(0,this.Ng*.5-t*this.mC)):(this.Ng-t)*.5};r.prototype.A4=function(t,u){u=u||"low";var v=this.woa(),w=this.nLa(),x=this.voa(),y=this.oLa();this.lC=(this.Og*.5-w)/v;this.mC=(this.Ng*.5-y)/x;v={left:Math.round(w)+"px",top:Math.round(y)+"px",width:Math.round(v)+"px",height:Math.round(x)+"px",display:"block"};
for(var z in this.WL[u])v[z]=this.WL[u][z];if(this.iea!=v){if(this.mk)for(z in v)this.mk.style[z]=v[z];if(this.Wk)for(z in v)this.Wk.style[z]=v[z];this.iea=v}this.Nda();this.bh?(this.bh.Nb(t),this.uka(this.Wk,this.bh.ob("alpha")),this.bh.Ve()&&(this.bh=null,this.mk&&this.qa.removeChild(this.mk),this.mk=this.Wk,this.Wk=null),this.F4()):u=="low"&&this.O9a();!this.bh&&this.c4&&(this.c4=!1,this.o(new k(n.ia)))};r.prototype.uka=function(t,u){t.style.opacity=u};r.prototype.Nda=function(){this.CS!=null&&
(clearTimeout(this.CS),this.CS=null)};r.prototype.O9a=function(){var t=this;this.CS=setTimeout(function(){t.CS=null;t.A4(50,"hight")},50)};r.prototype.lda=function(t){this.ne!=t&&(this.ne=t,this.W$a())};r.prototype.iYa=function(t){this.Mj!=t&&(this.Mj=t)};r.prototype.W$a=function(){this.o(new k(r.m_,{scale:this.ne}))};r.m_="scaleChange";return r});
define("tdv/player/view/zoomimage/ZoomImage","require tdv/constants/EventName tdv/events/Event tdv/player/view/zoomimage/Renderer tdv/utils tdv/view/core/UIComponent tdv/view/core/UIComponent".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/events/Event"),n=a("tdv/player/view/zoomimage/Renderer"),g=a("tdv/utils"),k=a("tdv/view/core/UIComponent");k=a("tdv/view/core/UIComponent");var e=g.extend(k,function(){k.call(this);this.gf("ZoomImage");this.vz=this.mp=void 0;this.bm=!1;this.DDa=
void 0;this.Iza=this.ne=1;this.lW=null;this.j=new n;this.j.bind(m.ia,this.J5a,this);this.j.bind(n.m_,this.K5a,this);this.bind(m.Rb,this.kd,this,!0);this.bind(m.od,this.cp,this,!0);this.bind(m.jd,this.ap,this,!0);this.bind(m.Sa,this.te,this,!0);this.bind(m.gb,this.bl,this,!0);this.bind(m.$a,this.cl,this,!0);this.bind(m.Qk,this.JH,this,!0);this.bind(m.ZK,this.bH,this,!0)});e.prototype.Kb=function(){k.prototype.Kb.call(this);this.j.cc().parentElement||this.wa().uk(this.j.cc())};e.prototype.set=function(b,
c){switch(b){case "scale":this.j.setScale(c);c=this.j.yA();break;case "imageLeft":case "imageTop":case "imageWidth":case "imageHeight":return}k.prototype.set.call(this,b,c)};e.prototype.get=function(b,c){switch(b){case "scale":return this.j.yA();case "imageLeft":return this.j.nLa();case "imageTop":return this.j.oLa();case "imageWidth":return this.j.woa();case "imageHeight":return this.j.voa()}return k.prototype.get.call(this,b,c)};e.prototype.Pb=function(){k.prototype.Pb.call(this);this.m("image");
this.m("scaleMode");this.m("customHeight");this.m("customWidth");this.m("imageCursor");this.m("imageLeft");this.m("imageTop");this.m("imageWidth");this.m("imageHeight")};e.prototype.jb=function(){this.S("scaleMode")&&(this.j.hQ(this.G("scaleMode")),this.$("scaleMode"));this.S("image")&&(this.j.Pkb(this.G("image")),this.$("image"),this.Iza=this.ne);if(this.S("customHeight")||this.S("customWidth"))this.$("customHeight"),this.$("customWidth"),this.kd();this.S("imageCursor")&&(this.$("imageCursor"),this.j.m$(this.Gb.xea.$Ka(this.get("imageCursor"))));
k.prototype.jb.call(this)};e.prototype.kd=function(){var b=this.nb(),c=this.Mb(),d=this.get("customWidth","100%"),f=k.Cp(d);d=f!==void 0?b*f/100:d;f=this.get("customHeight","100%");var l=k.Cp(f);this.j.vkb(d,l!==void 0?c*l/100:f);this.j.l$(b,c)};e.prototype.cp=function(){this.j.Ra(!0)};e.prototype.ap=function(){this.j.Ra(!1)};e.prototype.te=function(b){this.mp=b.x;this.vz=b.y;this.bm=!0;this.DDa=this.j.bNa(b)};e.prototype.bl=function(b){this.bm&&(this.vma(),this.j.move(-(b.x-this.mp),-(b.y-this.vz)),
this.mp=b.x,this.vz=b.y)};e.prototype.cl=function(b){this.bm=!1;this.DDa||this.j.bNa(b)||this.o(new h(e.EUa))};e.prototype.JH=function(b){this.vma();this.j.setScale((1+b.delta/20)*this.j.yA())};e.prototype.bH=function(b){this.vma();this.j.setScale(b.scale/this.Iza)};e.prototype.J5a=function(){this.o(new h(m.ia))};e.prototype.K5a=function(){k.prototype.set.call(this,"scale",this.j.yA());this.o(new h(e.m_))};e.prototype.vma=function(){this.lW?(clearTimeout(this.lW),this.lW=null):this.o(new h(e.ak));
this.lW=setTimeout(function(){this.lW=null;this.o(new h(e.$j))}.bind(this),300)};e.EUa="backgroundClick";e.m_="scaleChange";e.ak="userInteractionStart";e.$j="userInteractionEnd";return e});define("tdv/player/script/ZoomImage",["require","tdv/player/view/zoomimage/ZoomImage","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/view/zoomimage/ZoomImage");return a("tdv/player/parser/ClassInfo").define("ZoomImage",m,function(){m.call(this)})});
define("tdv/player/script/classes","require tdv/player/parser/ClassInfo tdv/player/script/AdjacentPanorama tdv/player/script/AmbientLight tdv/player/script/AmbientOcclusionModel3DPostprocessing tdv/player/script/AnimatedImageResource tdv/player/script/AntialiasModel3DPostprocessing tdv/player/script/AreaHotspotMapOverlay tdv/player/script/AudioResource tdv/player/script/BaseButton tdv/player/script/BaseObject tdv/player/script/BaseWindow tdv/player/script/BoxModel3DObject tdv/player/script/Button tdv/player/script/CanvasPlaneModel3DObject tdv/player/script/CeilingCapPanoramaOverlay tdv/player/script/ChildModel3DObject tdv/player/script/CloseButton tdv/player/script/CookiesPolicy tdv/player/script/Container tdv/player/script/CubicPanoramaFrame tdv/player/script/DirectionalPanoramaAudio tdv/player/script/DistanceModel3DCameraMovement tdv/player/script/DistancePanoramaCameraMovement tdv/player/script/DistanceRotationalCameraMovement tdv/player/script/DropDown tdv/player/script/DustPanoramaOverlay tdv/player/script/Effect tdv/player/script/ExternalModel3DObject tdv/player/script/FadeInEffect tdv/player/script/FadeOutEffect tdv/player/script/FirstPersonModel3DCamera tdv/player/script/FlatHotspotPanoramaOverlay tdv/player/script/FlatHotspotPanoramaOverlayArea tdv/player/script/FlatHotspotPanoramaOverlayImage tdv/player/script/FlatHotspotPanoramaOverlayImageBase tdv/player/script/FlatHotspotPanoramaOverlayMap tdv/player/script/FlatPanoramaOverlayPlaybackPosition tdv/player/script/FlyOverModel3DCamera tdv/player/script/FramePanoramaOverlay tdv/player/script/GoogleMaps3DTilesModel3DResource tdv/player/script/GridContainer tdv/player/script/HDRPanorama tdv/player/script/HorizonGridModel3DObject tdv/player/script/HotspotMapOverlay tdv/player/script/HotspotMapOverlayArea tdv/player/script/HotspotMapOverlayImage tdv/player/script/HotspotMapOverlayMap tdv/player/script/HotspotPanoramaOverlay tdv/player/script/HotspotPanoramaOverlayArea tdv/player/script/HotspotPanoramaOverlayImage tdv/player/script/HotspotPanoramaOverlayImageBase tdv/player/script/HotspotPanoramaOverlayMap tdv/player/script/HTML tdv/player/script/HTMLText tdv/player/script/IconButton tdv/player/script/IconHotspotMapOverlay tdv/player/script/Image tdv/player/script/ImagePlaneModel3DObject tdv/player/script/ImageResource tdv/player/script/ImageResourceLevel tdv/player/script/InnerModel3DObject tdv/player/script/Label tdv/player/script/LensFlarePanoramaOverlay tdv/player/script/LineModel3DObject tdv/player/script/LivePanorama tdv/player/script/Light tdv/player/script/Map tdv/player/script/MapOverlay tdv/player/script/MapPlayer tdv/player/script/MapPlayListItem tdv/player/script/MeasureModel3DObject tdv/player/script/MeasureModel3DObjectPoint tdv/player/script/Media tdv/player/script/MediaAudio tdv/player/script/Model3D tdv/player/script/Model3DAnimation tdv/player/script/Model3DCamera tdv/player/script/Model3DCameraMovement tdv/player/script/Model3DCameraSequence tdv/player/script/Model3DDisplayEffect tdv/player/script/Model3DObject tdv/player/script/Model3DPlayer tdv/player/script/Model3DPlayListItem tdv/player/script/Model3DPointer tdv/player/script/Model3DPostprocessing tdv/player/script/Model3DResource tdv/player/script/Model3DResourceLevel tdv/player/script/Menu tdv/player/script/MenuItem tdv/player/script/MotionBlurModel3DPostprocessing tdv/player/script/MovementPhotoCamera tdv/player/script/Object3D tdv/player/script/OrbitLight tdv/player/script/OrbitModel3DCamera tdv/player/script/Panorama tdv/player/script/PanoramaAudio tdv/player/script/PanoramaCamera tdv/player/script/PanoramaCameraDisplayPosition tdv/player/script/PanoramaCameraMovement tdv/player/script/PanoramaCameraPosition tdv/player/script/PanoramaCameraSequence tdv/player/script/PanoramaFrame tdv/player/script/PanoramaMapLocation tdv/player/script/PanoramaModel3DLocation tdv/player/script/PanoramaOverlay tdv/player/script/PanoramaOverlayPlaybackPosition tdv/player/script/PanoramaPlayer tdv/player/script/PanoramaPlayListItem tdv/player/script/PanoramaPoint tdv/player/script/PanoramaSnapshot tdv/player/script/Photo tdv/player/script/PhotoAlbum tdv/player/script/PhotoAlbumAudio tdv/player/script/PhotoAlbumPlayer tdv/player/script/PhotoAlbumPlayListItem tdv/player/script/PhotoAudio tdv/player/script/PhotoCamera tdv/player/script/PhotoCameraPosition tdv/player/script/PhotoPlayList tdv/player/script/PhotoPlayListItem tdv/player/script/PlaneModel3DObject tdv/player/script/PlaybackBar tdv/player/script/Player tdv/player/script/PlayerMenuItem tdv/player/script/PlayList tdv/player/script/PlayListItem tdv/player/script/PopupPanoramaOverlay tdv/player/script/ProgressBar tdv/player/script/ProjectedMaterialModel3DObject tdv/player/script/QuadFramePanoramaOverlay tdv/player/script/QuadHotspotPanoramaOverlay tdv/player/script/QuadHotspotPanoramaOverlayArea tdv/player/script/QuadHotspotPanoramaOverlayImage tdv/player/script/QuadHotspotPanoramaOverlayImageBase tdv/player/script/QuadHotspotPanoramaOverlayMap tdv/player/script/QuadVideoPanoramaOverlay tdv/player/script/RadialModel3DDisplayEffect tdv/player/script/RainPanoramaOverlay tdv/player/script/RotationalCameraDisplayPosition tdv/player/script/RotationalCameraMovement tdv/player/script/RotationalCameraPosition tdv/player/script/RotationalCameraSequence tdv/player/script/SlideInEffect tdv/player/script/SlideOutEffect tdv/player/script/SnowPanoramaOverlay tdv/player/script/SphericPanoramaFrame tdv/player/script/SphereModel3DObject tdv/player/script/SpotLight tdv/player/script/SpriteModel3DObject tdv/player/script/SurfaceReticleModel3DObject tdv/player/script/TabPanel tdv/player/script/TabPanelPage tdv/player/script/TargetModel3DCameraMovement tdv/player/script/TargetPanoramaCameraMovement tdv/player/script/TargetRotationalCameraDisplayMovement tdv/player/script/TargetRotationalCameraMovement tdv/player/script/TDTilesModel3DResource tdv/player/script/TiledImageResourceLevel tdv/player/script/TripodCapPanoramaOverlay tdv/player/script/ThumbnailGrid tdv/player/script/ThumbnailList tdv/player/script/UIComponent tdv/player/script/Video tdv/player/script/Video360 tdv/player/script/Video360Player tdv/player/script/Video360PlayListItem tdv/player/script/Video360Resource tdv/player/script/Video360ResourceLevel tdv/player/script/VideoCue tdv/player/script/VideoPanorama tdv/player/script/VideoPanoramaOverlay tdv/player/script/VideoPlaneModel3DObject tdv/player/script/VideoPlayer tdv/player/script/VideoPlayListItem tdv/player/script/VideoResource tdv/player/script/VideoResourceLevel tdv/player/script/VignetteModel3DPostprocessing tdv/player/script/ViewerArea tdv/player/script/WebFrame tdv/player/script/Window tdv/player/script/XRPanel tdv/player/script/XRWindow tdv/player/script/ZoomImage".split(" "),function(a){a("tdv/player/parser/ClassInfo");
a("tdv/player/script/AdjacentPanorama");a("tdv/player/script/AmbientLight");a("tdv/player/script/AmbientOcclusionModel3DPostprocessing");a("tdv/player/script/AnimatedImageResource");a("tdv/player/script/AntialiasModel3DPostprocessing");a("tdv/player/script/AreaHotspotMapOverlay");a("tdv/player/script/AudioResource");a("tdv/player/script/BaseButton");a("tdv/player/script/BaseObject");a("tdv/player/script/BaseWindow");a("tdv/player/script/BoxModel3DObject");a("tdv/player/script/Button");a("tdv/player/script/CanvasPlaneModel3DObject");
a("tdv/player/script/CeilingCapPanoramaOverlay");a("tdv/player/script/ChildModel3DObject");a("tdv/player/script/CloseButton");a("tdv/player/script/CookiesPolicy");a("tdv/player/script/Container");a("tdv/player/script/CubicPanoramaFrame");a("tdv/player/script/DirectionalPanoramaAudio");a("tdv/player/script/DistanceModel3DCameraMovement");a("tdv/player/script/DistancePanoramaCameraMovement");a("tdv/player/script/DistanceRotationalCameraMovement");a("tdv/player/script/DropDown");a("tdv/player/script/DustPanoramaOverlay");
a("tdv/player/script/Effect");a("tdv/player/script/ExternalModel3DObject");a("tdv/player/script/FadeInEffect");a("tdv/player/script/FadeOutEffect");a("tdv/player/script/FirstPersonModel3DCamera");a("tdv/player/script/FlatHotspotPanoramaOverlay");a("tdv/player/script/FlatHotspotPanoramaOverlayArea");a("tdv/player/script/FlatHotspotPanoramaOverlayImage");a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");a("tdv/player/script/FlatHotspotPanoramaOverlayMap");a("tdv/player/script/FlatPanoramaOverlayPlaybackPosition");
a("tdv/player/script/FlyOverModel3DCamera");a("tdv/player/script/FramePanoramaOverlay");a("tdv/player/script/GoogleMaps3DTilesModel3DResource");a("tdv/player/script/GridContainer");a("tdv/player/script/HDRPanorama");a("tdv/player/script/HorizonGridModel3DObject");a("tdv/player/script/HotspotMapOverlay");a("tdv/player/script/HotspotMapOverlayArea");a("tdv/player/script/HotspotMapOverlayImage");a("tdv/player/script/HotspotMapOverlayMap");a("tdv/player/script/HotspotPanoramaOverlay");a("tdv/player/script/HotspotPanoramaOverlayArea");
a("tdv/player/script/HotspotPanoramaOverlayImage");a("tdv/player/script/HotspotPanoramaOverlayImageBase");a("tdv/player/script/HotspotPanoramaOverlayMap");a("tdv/player/script/HTML");a("tdv/player/script/HTMLText");a("tdv/player/script/IconButton");a("tdv/player/script/IconHotspotMapOverlay");a("tdv/player/script/Image");a("tdv/player/script/ImagePlaneModel3DObject");a("tdv/player/script/ImageResource");a("tdv/player/script/ImageResourceLevel");a("tdv/player/script/InnerModel3DObject");a("tdv/player/script/Label");
a("tdv/player/script/LensFlarePanoramaOverlay");a("tdv/player/script/LineModel3DObject");a("tdv/player/script/LivePanorama");a("tdv/player/script/Light");a("tdv/player/script/Map");a("tdv/player/script/MapOverlay");a("tdv/player/script/MapPlayer");a("tdv/player/script/MapPlayListItem");a("tdv/player/script/MeasureModel3DObject");a("tdv/player/script/MeasureModel3DObjectPoint");a("tdv/player/script/Media");a("tdv/player/script/MediaAudio");a("tdv/player/script/Model3D");a("tdv/player/script/Model3DAnimation");
a("tdv/player/script/Model3DCamera");a("tdv/player/script/Model3DCameraMovement");a("tdv/player/script/Model3DCameraSequence");a("tdv/player/script/Model3DDisplayEffect");a("tdv/player/script/Model3DObject");a("tdv/player/script/Model3DPlayer");a("tdv/player/script/Model3DPlayListItem");a("tdv/player/script/Model3DPointer");a("tdv/player/script/Model3DPostprocessing");a("tdv/player/script/Model3DResource");a("tdv/player/script/Model3DResourceLevel");a("tdv/player/script/Menu");a("tdv/player/script/MenuItem");
a("tdv/player/script/MotionBlurModel3DPostprocessing");a("tdv/player/script/MovementPhotoCamera");a("tdv/player/script/Object3D");a("tdv/player/script/OrbitLight");a("tdv/player/script/OrbitModel3DCamera");a("tdv/player/script/Panorama");a("tdv/player/script/PanoramaAudio");a("tdv/player/script/PanoramaCamera");a("tdv/player/script/PanoramaCameraDisplayPosition");a("tdv/player/script/PanoramaCameraMovement");a("tdv/player/script/PanoramaCameraPosition");a("tdv/player/script/PanoramaCameraSequence");
a("tdv/player/script/PanoramaFrame");a("tdv/player/script/PanoramaMapLocation");a("tdv/player/script/PanoramaModel3DLocation");a("tdv/player/script/PanoramaOverlay");a("tdv/player/script/PanoramaOverlayPlaybackPosition");a("tdv/player/script/PanoramaPlayer");a("tdv/player/script/PanoramaPlayListItem");a("tdv/player/script/PanoramaPoint");a("tdv/player/script/PanoramaSnapshot");a("tdv/player/script/Photo");a("tdv/player/script/PhotoAlbum");a("tdv/player/script/PhotoAlbumAudio");a("tdv/player/script/PhotoAlbumPlayer");
a("tdv/player/script/PhotoAlbumPlayListItem");a("tdv/player/script/PhotoAudio");a("tdv/player/script/PhotoCamera");a("tdv/player/script/PhotoCameraPosition");a("tdv/player/script/PhotoPlayList");a("tdv/player/script/PhotoPlayListItem");a("tdv/player/script/PlaneModel3DObject");a("tdv/player/script/PlaybackBar");a("tdv/player/script/Player");a("tdv/player/script/PlayerMenuItem");a("tdv/player/script/PlayList");a("tdv/player/script/PlayListItem");a("tdv/player/script/PopupPanoramaOverlay");a("tdv/player/script/ProgressBar");
a("tdv/player/script/ProjectedMaterialModel3DObject");a("tdv/player/script/QuadFramePanoramaOverlay");a("tdv/player/script/QuadHotspotPanoramaOverlay");a("tdv/player/script/QuadHotspotPanoramaOverlayArea");a("tdv/player/script/QuadHotspotPanoramaOverlayImage");a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");a("tdv/player/script/QuadHotspotPanoramaOverlayMap");a("tdv/player/script/QuadVideoPanoramaOverlay");a("tdv/player/script/RadialModel3DDisplayEffect");a("tdv/player/script/RainPanoramaOverlay");
a("tdv/player/script/RotationalCameraDisplayPosition");a("tdv/player/script/RotationalCameraMovement");a("tdv/player/script/RotationalCameraPosition");a("tdv/player/script/RotationalCameraSequence");a("tdv/player/script/SlideInEffect");a("tdv/player/script/SlideOutEffect");a("tdv/player/script/SnowPanoramaOverlay");a("tdv/player/script/SphericPanoramaFrame");a("tdv/player/script/SphereModel3DObject");a("tdv/player/script/SpotLight");a("tdv/player/script/SpriteModel3DObject");a("tdv/player/script/SurfaceReticleModel3DObject");
a("tdv/player/script/TabPanel");a("tdv/player/script/TabPanelPage");a("tdv/player/script/TargetModel3DCameraMovement");a("tdv/player/script/TargetPanoramaCameraMovement");a("tdv/player/script/TargetRotationalCameraDisplayMovement");a("tdv/player/script/TargetRotationalCameraMovement");a("tdv/player/script/TDTilesModel3DResource");a("tdv/player/script/TiledImageResourceLevel");a("tdv/player/script/TripodCapPanoramaOverlay");a("tdv/player/script/ThumbnailGrid");a("tdv/player/script/ThumbnailList");
a("tdv/player/script/UIComponent");a("tdv/player/script/Video");a("tdv/player/script/Video360");a("tdv/player/script/Video360Player");a("tdv/player/script/Video360PlayListItem");a("tdv/player/script/Video360Resource");a("tdv/player/script/Video360ResourceLevel");a("tdv/player/script/VideoCue");a("tdv/player/script/VideoPanorama");a("tdv/player/script/VideoPanoramaOverlay");a("tdv/player/script/VideoPlaneModel3DObject");a("tdv/player/script/VideoPlayer");a("tdv/player/script/VideoPlayListItem");a("tdv/player/script/VideoResource");
a("tdv/player/script/VideoResourceLevel");a("tdv/player/script/VignetteModel3DPostprocessing");a("tdv/player/script/ViewerArea");a("tdv/player/script/WebFrame");a("tdv/player/script/Window");a("tdv/player/script/XRPanel");a("tdv/player/script/XRWindow");a("tdv/player/script/ZoomImage");return!0});
define("tdv/player/parser/Parser","require tdv/utils tdv/player/parser/ClassInfo tdv/player/parser/Sign tdv/player/script/classes tdv/player/view/util/URL".split(" "),function(a){function m(l,p){this.type=l;this.stack=p}function h(){}var n=a("tdv/utils"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/parser/Sign");a("tdv/player/script/classes");a("tdv/player/view/util/URL");h.prototype.djb=function(l,p,q,r){this.ifa=[];this.sD=this.wN(l);this.sH=void 0;this.sD.ew.tLa()?(this.i6=k.validate(l),
this.sH=this.rya(this.sD,e.TYPE),this.u_a(this.sH,this.sD,p,q,r),this.dYa(this.sD),this.bYa(this.sD,this.sH),this.eYa(this.sH,this.sD),this.DYa(this.sH,this.sD)):this.cq("Invalid root class",[]);return this.ifa.length==0};h.prototype.Xb=function(){return this.sD.instance};h.prototype.wN=function(l,p){p=p||[];return Array.isArray(l)?this.Q6a(l,p):n.lpa(l)&&l["class"]?this.T6a(l,p):n.lpa(l)?this.R6a(l,p):n.XMa(l)?this.S6a(l,p):this.U6a(l,p)};h.prototype.Q6a=function(l,p){for(var q=[],r=0;r<l.length;r++)p.push("Item["+
r+"]"),q.push(this.wN(l[r],p)),p.pop();return new b(p.slice(),q)};h.prototype.T6a=function(l,p){var q=l["class"],r=g.Ci(l["class"]);if(r){q={};var t={},u;for(u in l){p.push(u);var v=l[u];switch(u){case "class":break;case "scripts":var w=this.wN(v,p);break;default:r.hasAttribute(u)?q[u]=this.wN(v,p):r.oMa(u)||r.pMa(u)?t[u]=this.wN(v,p):this.cq(r.uA()+" object doesn't have any attribute named "+u,p)}p.pop()}return new e(p.slice(),r,l.id,q,t,w)}this.cq("Undefined class name: "+q,p.slice());return new f(p.slice(),
null)};h.prototype.R6a=function(l,p){var q={},r;for(r in l)p.push(r),q[r]=this.wN(l[r],p),p.pop();return new c(p.slice(),q)};h.prototype.S6a=function(l,p){return new d(p.slice(),l)};h.prototype.U6a=function(l,p){return new f(p.slice(),l)};h.prototype.rya=function(l,p){var q=p&&l.type!=p?[]:[l],r=0;for(l=l.Cb();r<l.length;r++)q=q.concat(this.rya(l[r],p));return q};h.prototype.u_a=function(l,p,q,r,t){p.instance=p.ew.Ai(null,r,t,[q,this.i6]);p.instance.set("application",p.instance);for(q=0;q<l.length;q++){var u=
l[q];u!=p&&(u.instance=u.ew.Ai(p.instance,r,t))}};h.prototype.dYa=function(l){if(l.scripts)if(l.scripts.type==c.TYPE)for(var p in l.scripts.value)this.cYa(l,p);else this.cq("Invalid content.",l.scripts.stack)};h.prototype.cYa=function(l,p){var q=l.instance,r=l.scripts.value[p];q[p]!==void 0?this.cq("Identifier: "+p+" is already in use",r.stack):r&&r.type==d.TYPE?q[p]=function(){return r.ww().apply(q,arguments)}:this.cq("Invalid content.",r.stack)};h.prototype.bYa=function(l,p){l=l.instance;for(var q=
0;q<p.length;q++){var r=p[q],t=r.id;t&&(l[t]===void 0?l[t]=r.instance:this.cq("Identifier: "+t+" is arleady in use",r.stack))}};h.prototype.eYa=function(l,p){for(var q=0;q<l.length;q++){var r=l[q],t=r.attributes,u;for(u in t)this.aYa(r,u,p)}};h.prototype.aYa=function(l,p,q){var r=l.ew;if(r.hasAttribute(p)){try{var t=l.attributes[p].ww()}catch(u){this.cq("Invalid value for property "+p+" of "+r.uA()+" instance",l.stack)}try{t=r.koa(p)(t,q.instance),l.instance.set(p,t)}catch(u){this.cq("Invalid value for property "+
p+" of "+r.uA()+" instance",l.stack)}}else this.cq(r.uA()+" object doesn't have any property named "+p,l.stack)};h.prototype.DYa=function(l,p){for(var q=0;q<l.length;q++){var r=l[q],t;for(t in r.pJ)this.CYa(r,t,p)}};h.prototype.CYa=function(l,p,q){var r=l.ew,t=l.instance,u=r.oMa(p),v=r.pMa(p);if(u||v){l=l.pJ[p];var w=l.ww();n.XMa(w)?t.bind(p,w,q.instance,v,w,!0):typeof w=="string"?t.bind(p,function(){try{eval("var event = arguments[0];"+w)}catch(x){throw x;}},q.instance,v,w,!0):this.cq("Invalid value.",
l.stack)}else this.cq(r.uA()+" object doesn't have any event named "+p,l.stack)};h.prototype.cq=function(l,p){this.ifa.push("In "+p.join(" >> ")+": "+l)};m.prototype.Cb=function(){return[]};m.prototype.ww=function(){};var e=n.extend(m,function(l,p,q,r,t,u){m.call(this,e.TYPE,l);this.ew=p;this.id=q;this.attributes=r;this.pJ=t;this.scripts=u;this.instance=null});e.prototype.Cb=function(){var l=this.ew.FLa(),p=[],q=Object.assign({},this.attributes);if(l)for(var r=0;r<l.length;r++){var t=l[r];q[t]!=void 0&&
(p.push(q[t]),delete q[t])}return p=p.concat(Object.values(q))};e.prototype.ww=function(){return this.instance};e.TYPE="instance";var b=n.extend(m,function(l,p){m.call(this,b.TYPE,l);this.items=p});b.prototype.Cb=function(){return this.items.slice()};b.prototype.ww=function(){for(var l=[],p=0;p<this.items.length;p++)l.push(this.items[p].ww());return l};b.TYPE="array";var c=n.extend(m,function(l,p){m.call(this,c.TYPE,l);this.value=p});c.prototype.Cb=function(){return Object.values(this.value)};c.prototype.ww=
function(){var l={},p;for(p in this.value)l[p]=this.value[p].ww();return l};c.TYPE="dict";var d=n.extend(m,function(l,p){m.call(this,d.TYPE,l);this.value=p});d.prototype.ww=function(){return this.value};d.TYPE="function";var f=n.extend(m,function(l,p){m.call(this,f.TYPE,l);this.value=p});f.prototype.ww=function(){return this.value};f.TYPE="simple";return h});
define("tdv/player/Main","require tdv/constants/EventName tdv/events/Event tdv/player/parser/ClassInfo tdv/player/parser/Parser tdv/player/view/util/Device tdv/player/view/util/Installer tdv/player/view/util/URL tdv/player/view/util/XR tdv/player/view/panorama/renderer/3d/util/Util tdv/player/AppInfo tdv/player/l10n tdv/view/util/Fullscreen tdv/utils".split(" "),function(a){function m(u,v){this.KV=u;this.Ci=this.Ci.bind(this);this.Ai=this.Ai.bind(this);this.jw=this.jw.bind(this);this.Oa=this.Oa.bind(this);
this.C7=this.C7.bind(this);e.ub()&&!e.kf()&&q.sm();this.F0=[];u=l.name;var w=[];u&&w.push(u);l.XX>0?w.push("v:"+l.XX+"."+l.cY):w.push("v:"+l.cY);r.log(w.join(" "));this.vr=v;c.xhb()||[e.QK,e.tF].indexOf(e.Tb())>=0?(this.Yl=new k,(v=this.vr.get(TDV.PlayerSettings.BASE_DIR_URL))?(v=c.mB(v),v[v.length-1]!="/"&&(v+="/")):v=c.getDirectory(this.vr.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)),this.Dqa=this.vr.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS),b.ujb(v,function(x){this.bna=x;this.n6a()}.bind(this))):
window.alert(p("web-server-required"))}var h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/parser/Parser"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/util/Installer"),c=a("tdv/player/view/util/URL"),d=a("tdv/player/view/util/XR"),f=a("tdv/player/view/panorama/renderer/3d/util/Util"),l=a("tdv/player/AppInfo"),p=a("tdv/player/l10n"),q=a("tdv/view/util/Fullscreen"),r=a("tdv/utils");m.prototype.n6a=function(){this.KV.o(new TDV.z_(h.UVa,
{},[],void 0));r.defer(function(){if(!this.Yl.djb(this.vr.get(TDV.PlayerSettings.SCRIPT_DATA),this.vr.get(TDV.PlayerSettings.CONTAINER),this.bna,this.Dqa)){if(l.Bmb!="false"){window.alert(this.eza());return}r.log(this.eza())}this.BYa();this.RXa(this.vr);this.gYa();d.$J=this.Yl.Xb();d.initialize(function(){this.Y$a()}.bind(this))}.bind(this))};m.prototype.clear=function(){this.Yl&&(this.Rya().forEach(function(u){u.instance.vsa();u.ew.nX().forEach(function(v){switch(v){case "VideoPlayer":u.instance.stop();
case "MapPlayer":case "Model3DPlayer":case "PanoramaPlayer":case "PhotoAlbumPlayer":u.instance.set("viewerArea",null);break;case "ZoomImage":u.instance.set("image",null);break;case "Audio":u.instance.stop();break;case "Effect":u.instance.end();break;case "Media":u.instance.Mjb()}})}),f.kjb(),this.Yl.Xb().clear(),t={},this.vr=this.Yl=null)};m.prototype.Zfb=function(u){return this.Yl.Xb()[u]};m.prototype.Ci=function(u){if(u in t)return t[u].slice();var v=[];this.Rya().forEach(function(w){w.ew.nX().includes(u)&&
v.push(w.instance)});t[u]=v;return v.slice()};m.prototype.Rya=function(){return this.Yl?this.Yl.sH.concat(this.F0):[]};var t={};m.prototype.Ai=function(u){var v=g.Ci(u);if(!v)throw"Invalid className: "+u;t={};u=this.Yl.Xb();var w={};w.ew=v;w.instance=v.Ai(u,this.bna,this.Dqa);this.F0.push(w);this.gwa(v,w.instance);this.M$a(u,w.instance);return w.instance};m.prototype.jw=function(u){var v=this.F0.findIndex(function(w){return w.instance==u});v<0||(t={},this.F0.splice(v,1),u.vsa(),u.dispose&&u.dispose())};
m.prototype.eza=function(){for(var u=this.Yl.ifa,v=["Errors parsing script file:"],w=0;w<u.length;w++)v.push(u[w]);return v.join("\n")};m.prototype.BYa=function(){this.Yl.sH.forEach(function(v){this.gwa(v.ew,v.instance,v.id)}.bind(this));var u=this.Yl.Xb().B0;u.bind(h.XK,function(){u.mnb(h.XK);this.KV.cookiesEnabled=this.KV.udb=!0;this.KV.o(new TDV.z_(h.XK,{},[],void 0))},this,!0)};m.prototype.gwa=function(u,v,w){var x=u.nX();r.union(u.poa(),u.xoa()).forEach(function(y){v.bind(y,function(z){this.KV.o(new TDV.z_(y,
z,x,w))}.bind(this),this,!0)}.bind(this))};m.prototype.M$a=function(u,v){u.o(new n(h.jVa,{instance:v}))};m.prototype.RXa=function(u){this.Yl.Xb().set("settings",u)};m.prototype.Oa=function(){return g.Oa.apply(g,arguments)};m.prototype.C7=function(u){!u||c.hE(u)||c.v8(u)||(u=c.MD(c.mB(u,this.bna),this.Dqa));return u};m.prototype.gYa=function(){var u=this.Yl.Xb();u.getByClassName=u.Ci=this.Ci;u.createInstance=u.Ai=this.Ai;u.disposeInstance=u.jw=this.jw;u.isInstanceOfClass=u.Oa=this.Oa;u.getAbsoluteURL=
u.C7=this.C7};m.prototype.Y$a=function(){this.Yl.Xb().start()};m.fnb=function(u){u.o(new TDV.z_(h.kVa,{},[],void 0))};return m});define("main",["require","tdv/utils","tdv/player/Main"],function(a){var m=a("tdv/utils"),h=a("tdv/player/Main");m.yeb(function(){TDV.qb.qlb(h)})});
(function(global,factory){factory(global.THREE={})})(this,function(exports){"use strict";const REVISION="182";const MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};const TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};const CullFaceNone=0;const CullFaceBack=1;const CullFaceFront=2;const CullFaceFrontBack=3;const BasicShadowMap=0;const PCFShadowMap=1;const PCFSoftShadowMap=2;const VSMShadowMap=3;const FrontSide=0;const BackSide=1;const DoubleSide=2;const NoBlending=0;const NormalBlending=1;const AdditiveBlending=2;const SubtractiveBlending=3;const MultiplyBlending=4;const CustomBlending=5;const AddEquation=100;const SubtractEquation=101;const ReverseSubtractEquation=102;const MinEquation=103;const MaxEquation=104;const ZeroFactor=200;const OneFactor=201;const SrcColorFactor=202;const OneMinusSrcColorFactor=203;const SrcAlphaFactor=204;const OneMinusSrcAlphaFactor=205;const DstAlphaFactor=206;const OneMinusDstAlphaFactor=207;const DstColorFactor=208;const OneMinusDstColorFactor=209;const SrcAlphaSaturateFactor=210;const ConstantColorFactor=211;const OneMinusConstantColorFactor=212;const ConstantAlphaFactor=213;const OneMinusConstantAlphaFactor=214;const NeverDepth=0;const AlwaysDepth=1;const LessDepth=2;const LessEqualDepth=3;const EqualDepth=4;const GreaterEqualDepth=5;const GreaterDepth=6;const NotEqualDepth=7;const MultiplyOperation=0;const MixOperation=1;const AddOperation=2;const NoToneMapping=0;const LinearToneMapping=1;const ReinhardToneMapping=2;const CineonToneMapping=3;const ACESFilmicToneMapping=4;const CustomToneMapping=5;const AgXToneMapping=6;const NeutralToneMapping=7;const AttachedBindMode="attached";const DetachedBindMode="detached";const UVMapping=300;const CubeReflectionMapping=301;const CubeRefractionMapping=302;const EquirectangularReflectionMapping=303;const EquirectangularRefractionMapping=304;const CubeUVReflectionMapping=306;const RepeatWrapping=1000;const ClampToEdgeWrapping=1001;const MirroredRepeatWrapping=1002;const NearestFilter=1003;const NearestMipmapNearestFilter=1004;const NearestMipMapNearestFilter=1004;const NearestMipmapLinearFilter=1005;const NearestMipMapLinearFilter=1005;const LinearFilter=1006;const LinearMipmapNearestFilter=1007;const LinearMipMapNearestFilter=1007;const LinearMipmapLinearFilter=1008;const LinearMipMapLinearFilter=1008;const UnsignedByteType=1009;const ByteType=1010;const ShortType=1011;const UnsignedShortType=1012;const IntType=1013;const UnsignedIntType=1014;const FloatType=1015;const HalfFloatType=1016;const UnsignedShort4444Type=1017;const UnsignedShort5551Type=1018;const UnsignedInt248Type=1020;const UnsignedInt5999Type=35902;const UnsignedInt101111Type=35899;const AlphaFormat=1021;const RGBFormat=1022;const RGBAFormat=1023;const DepthFormat=1026;const DepthStencilFormat=1027;const RedFormat=1028;const RedIntegerFormat=1029;const RGFormat=1030;const RGIntegerFormat=1031;const RGBIntegerFormat=1032;const RGBAIntegerFormat=1033;const RGB_S3TC_DXT1_Format=33776;const RGBA_S3TC_DXT1_Format=33777;const RGBA_S3TC_DXT3_Format=33778;const RGBA_S3TC_DXT5_Format=33779;const RGB_PVRTC_4BPPV1_Format=35840;const RGB_PVRTC_2BPPV1_Format=35841;const RGBA_PVRTC_4BPPV1_Format=35842;const RGBA_PVRTC_2BPPV1_Format=35843;const RGB_ETC1_Format=36196;const RGB_ETC2_Format=37492;const RGBA_ETC2_EAC_Format=37496;const R11_EAC_Format=37488;const SIGNED_R11_EAC_Format=37489;const RG11_EAC_Format=37490;const SIGNED_RG11_EAC_Format=37491;const RGBA_ASTC_4x4_Format=37808;const RGBA_ASTC_5x4_Format=37809;const RGBA_ASTC_5x5_Format=37810;const RGBA_ASTC_6x5_Format=37811;const RGBA_ASTC_6x6_Format=37812;const RGBA_ASTC_8x5_Format=37813;const RGBA_ASTC_8x6_Format=37814;const RGBA_ASTC_8x8_Format=37815;const RGBA_ASTC_10x5_Format=37816;const RGBA_ASTC_10x6_Format=37817;const RGBA_ASTC_10x8_Format=37818;const RGBA_ASTC_10x10_Format=37819;const RGBA_ASTC_12x10_Format=37820;const RGBA_ASTC_12x12_Format=37821;const RGBA_BPTC_Format=36492;const RGB_BPTC_SIGNED_Format=36494;const RGB_BPTC_UNSIGNED_Format=36495;const RED_RGTC1_Format=36283;const SIGNED_RED_RGTC1_Format=36284;const RED_GREEN_RGTC2_Format=36285;const SIGNED_RED_GREEN_RGTC2_Format=36286;const LoopOnce=2200;const LoopRepeat=2201;const LoopPingPong=2202;const InterpolateDiscrete=2300;const InterpolateLinear=2301;const InterpolateSmooth=2302;const ZeroCurvatureEnding=2400;const ZeroSlopeEnding=2401;const WrapAroundEnding=2402;const NormalAnimationBlendMode=2500;const AdditiveAnimationBlendMode=2501;const TrianglesDrawMode=0;const TriangleStripDrawMode=1;const TriangleFanDrawMode=2;const BasicDepthPacking=3200;const RGBADepthPacking=3201;const RGBDepthPacking=3202;const RGDepthPacking=3203;const TangentSpaceNormalMap=0;const ObjectSpaceNormalMap=1;const NoColorSpace="";const SRGBColorSpace="srgb";const LinearSRGBColorSpace="srgb-linear";const LinearTransfer="linear";const SRGBTransfer="srgb";const NoNormalPacking="";const NormalRGPacking="rg";const NormalGAPacking="ga";const ZeroStencilOp=0;const KeepStencilOp=7680;const ReplaceStencilOp=7681;const IncrementStencilOp=7682;const DecrementStencilOp=7683;const IncrementWrapStencilOp=34055;const DecrementWrapStencilOp=34056;const InvertStencilOp=5386;const NeverStencilFunc=512;const LessStencilFunc=513;const EqualStencilFunc=514;const LessEqualStencilFunc=515;const GreaterStencilFunc=516;const NotEqualStencilFunc=517;const GreaterEqualStencilFunc=518;const AlwaysStencilFunc=519;const NeverCompare=512;const LessCompare=513;const EqualCompare=514;const LessEqualCompare=515;const GreaterCompare=516;const NotEqualCompare=517;const GreaterEqualCompare=518;const AlwaysCompare=519;const StaticDrawUsage=35044;const DynamicDrawUsage=35048;const StreamDrawUsage=35040;const StaticReadUsage=35045;const DynamicReadUsage=35049;const StreamReadUsage=35041;const StaticCopyUsage=35046;const DynamicCopyUsage=35050;const StreamCopyUsage=35042;const GLSL1="100";const GLSL3="300 es";const WebGLCoordinateSystem=2000;const WebGPUCoordinateSystem=2001;const TimestampQuery={COMPUTE:"compute",RENDER:"render"};const InterpolationSamplingType={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"};const InterpolationSamplingMode={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};function arrayNeedsUint32(array){for(let i=array.length-1;i>=0;--i){if(array[i]>=65535)return true}return false}const TYPED_ARRAYS={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function getTypedArray(type,buffer){return new TYPED_ARRAYS[type](buffer)}function isTypedArray(array){return ArrayBuffer.isView(array)&&!(array instanceof DataView)}function createElementNS(name){return document.createElementNS("http://www.w3.org/1999/xhtml",name)}function createCanvasElement(){const canvas=createElementNS("canvas");canvas.style.display="block";return canvas}const _cache={};let _setConsoleFunction=null;function setConsoleFunction(fn){_setConsoleFunction=fn}function getConsoleFunction(){return _setConsoleFunction}function log(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("log",message,...params)}else{console.log(message,...params)}}function warn(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("warn",message,...params)}else{console.warn(message,...params)}}function error(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("error",message,...params)}else{console.error(message,...params)}}function warnOnce(...params){const message=params.join(" ");if(message in _cache)return;_cache[message]=true;warn(...params)}function probeAsync(gl,sync,interval){return new Promise(function(resolve,reject){function probe(){switch(gl.clientWaitSync(sync,gl.SYNC_FLUSH_COMMANDS_BIT,0)){case gl.WAIT_FAILED:reject();break;case gl.TIMEOUT_EXPIRED:setTimeout(probe,interval);break;default:resolve();}}setTimeout(probe,interval)})}class EventDispatcher{addEventListener(type,listener){if(this._listeners===undefined)this._listeners={};const listeners=this._listeners;if(listeners[type]===undefined){listeners[type]=[]}if(listeners[type].indexOf(listener)===-1){listeners[type].push(listener)}}hasEventListener(type,listener){const listeners=this._listeners;if(listeners===undefined)return false;return listeners[type]!==undefined&&listeners[type].indexOf(listener)!==-1}removeEventListener(type,listener){const listeners=this._listeners;if(listeners===undefined)return;const listenerArray=listeners[type];if(listenerArray!==undefined){const index=listenerArray.indexOf(listener);if(index!==-1){listenerArray.splice(index,1)}}}dispatchEvent(event){const listeners=this._listeners;if(listeners===undefined)return;const listenerArray=listeners[event.type];if(listenerArray!==undefined){event.target=this;const array=listenerArray.slice(0);for(let i=0,l=array.length;i<l;i++){array[i].call(this,event)}event.target=null}}}const _lut=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let _seed=1234567;const DEG2RAD=Math.PI/180;const RAD2DEG=180/Math.PI;function generateUUID(){const d0=Math.random()*4294967295|0;const d1=Math.random()*4294967295|0;const d2=Math.random()*4294967295|0;const d3=Math.random()*4294967295|0;const uuid=_lut[d0&255]+_lut[d0>>8&255]+_lut[d0>>16&255]+_lut[d0>>24&255]+"-"+_lut[d1&255]+_lut[d1>>8&255]+"-"+_lut[d1>>16&15|64]+_lut[d1>>24&255]+"-"+_lut[d2&63|128]+_lut[d2>>8&255]+"-"+_lut[d2>>16&255]+_lut[d2>>24&255]+_lut[d3&255]+_lut[d3>>8&255]+_lut[d3>>16&255]+_lut[d3>>24&255];return uuid.toLowerCase()}function clamp(value,min,max){return Math.max(min,Math.min(max,value))}function euclideanModulo(n,m){return(n%m+m)%m}function mapLinear(x,a1,a2,b1,b2){return b1+(x-a1)*(b2-b1)/(a2-a1)}function inverseLerp(x,y,value){if(x!==y){return(value-x)/(y-x)}else{return 0}}function lerp(x,y,t){return(1-t)*x+t*y}function damp(x,y,lambda,dt){return lerp(x,y,1-Math.exp(-lambda*dt))}function pingpong(x,length=1){return length-Math.abs(euclideanModulo(x,length*2)-length)}function smoothstep(x,min,max){if(x<=min)return 0;if(x>=max)return 1;x=(x-min)/(max-min);return x*x*(3-2*x)}function smootherstep(x,min,max){if(x<=min)return 0;if(x>=max)return 1;x=(x-min)/(max-min);return x*x*x*(x*(x*6-15)+10)}function randInt(low,high){return low+Math.floor(Math.random()*(high-low+1))}function randFloat(low,high){return low+Math.random()*(high-low)}function randFloatSpread(range){return range*(0.5-Math.random())}function seededRandom(s){if(s!==undefined)_seed=s;let t=_seed+=1831565813;t=Math.imul(t^t>>>15,t|1);t^=t+Math.imul(t^t>>>7,t|61);return((t^t>>>14)>>>0)/4294967296}function degToRad(degrees){return degrees*DEG2RAD}function radToDeg(radians){return radians*RAD2DEG}function isPowerOfTwo(value){return(value&value-1)===0&&value!==0}function ceilPowerOfTwo(value){return Math.pow(2,Math.ceil(Math.log(value)/Math.LN2))}function floorPowerOfTwo(value){return Math.pow(2,Math.floor(Math.log(value)/Math.LN2))}function setQuaternionFromProperEuler(q,a,b,c,order){const cos=Math.cos;const sin=Math.sin;const c2=cos(b/2);const s2=sin(b/2);const c13=cos((a+c)/2);const s13=sin((a+c)/2);const c1_3=cos((a-c)/2);const s1_3=sin((a-c)/2);const c3_1=cos((c-a)/2);const s3_1=sin((c-a)/2);switch(order){case"XYX":q.set(c2*s13,s2*c1_3,s2*s1_3,c2*c13);break;case"YZY":q.set(s2*s1_3,c2*s13,s2*c1_3,c2*c13);break;case"ZXZ":q.set(s2*c1_3,s2*s1_3,c2*s13,c2*c13);break;case"XZX":q.set(c2*s13,s2*s3_1,s2*c3_1,c2*c13);break;case"YXY":q.set(s2*c3_1,c2*s13,s2*s3_1,c2*c13);break;case"ZYZ":q.set(s2*s3_1,s2*c3_1,c2*s13,c2*c13);break;default:warn("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+order);}}function denormalize(value,array){switch(array.constructor){case Float32Array:return value;case Uint32Array:return value/4294967295;case Uint16Array:return value/65535;case Uint8Array:return value/255;case Int32Array:return Math.max(value/2147483647,-1);case Int16Array:return Math.max(value/32767,-1);case Int8Array:return Math.max(value/127,-1);default:throw new Error("Invalid component type.");}}function normalize(value,array){switch(array.constructor){case Float32Array:return value;case Uint32Array:return Math.round(value*4294967295);case Uint16Array:return Math.round(value*65535);case Uint8Array:return Math.round(value*255);case Int32Array:return Math.round(value*2147483647);case Int16Array:return Math.round(value*32767);case Int8Array:return Math.round(value*127);default:throw new Error("Invalid component type.");}}const MathUtils={DEG2RAD:DEG2RAD,RAD2DEG:RAD2DEG,generateUUID:generateUUID,clamp:clamp,euclideanModulo:euclideanModulo,mapLinear:mapLinear,inverseLerp:inverseLerp,lerp:lerp,damp:damp,pingpong:pingpong,smoothstep:smoothstep,smootherstep:smootherstep,randInt:randInt,randFloat:randFloat,randFloatSpread:randFloatSpread,seededRandom:seededRandom,degToRad:degToRad,radToDeg:radToDeg,isPowerOfTwo:isPowerOfTwo,ceilPowerOfTwo:ceilPowerOfTwo,floorPowerOfTwo:floorPowerOfTwo,setQuaternionFromProperEuler:setQuaternionFromProperEuler,normalize:normalize,denormalize:denormalize};class Vector2{constructor(x=0,y=0){Vector2.prototype.isVector2=true;this.x=x;this.y=y}get width(){return this.x}set width(value){this.x=value}get height(){return this.y}set height(value){this.y=value}set(x,y){this.x=x;this.y=y;return this}setScalar(scalar){this.x=scalar;this.y=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y)}copy(v){this.x=v.x;this.y=v.y;return this}add(v){this.x+=v.x;this.y+=v.y;return this}addScalar(s){this.x+=s;this.y+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;return this}sub(v){this.x-=v.x;this.y-=v.y;return this}subScalar(s){this.x-=s;this.y-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this}multiply(v){this.x*=v.x;this.y*=v.y;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;return this}divide(v){this.x/=v.x;this.y/=v.y;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}applyMatrix3(m){const x=this.x,y=this.y;const e=m.elements;this.x=e[0]*x+e[3]*y+e[6];this.y=e[1]*x+e[4]*y+e[7];return this}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);return this}negate(){this.x=-this.x;this.y=-this.y;return this}dot(v){return this.x*v.x+this.y*v.y}cross(v){return this.x*v.y-this.y*v.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){const angle=Math.atan2(-this.y,-this.x)+Math.PI;return angle}angleTo(v){const denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;const theta=this.dot(v)/denominator;return Math.acos(clamp(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){const dx=this.x-v.x,dy=this.y-v.y;return dx*dx+dy*dy}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;return this}equals(v){return v.x===this.x&&v.y===this.y}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);return this}rotateAround(center,angle){const c=Math.cos(angle),s=Math.sin(angle);const x=this.x-center.x;const y=this.y-center.y;this.x=x*c-y*s+center.x;this.y=x*s+y*c+center.y;return this}random(){this.x=Math.random();this.y=Math.random();return this}*[Symbol.iterator](){yield this.x;yield this.y}}class Quaternion{constructor(x=0,y=0,z=0,w=1){this.isQuaternion=true;this._x=x;this._y=y;this._z=z;this._w=w}static slerpFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1,t){let x0=src0[srcOffset0+0],y0=src0[srcOffset0+1],z0=src0[srcOffset0+2],w0=src0[srcOffset0+3];let x1=src1[srcOffset1+0],y1=src1[srcOffset1+1],z1=src1[srcOffset1+2],w1=src1[srcOffset1+3];if(t<=0){dst[dstOffset+0]=x0;dst[dstOffset+1]=y0;dst[dstOffset+2]=z0;dst[dstOffset+3]=w0;return}if(t>=1){dst[dstOffset+0]=x1;dst[dstOffset+1]=y1;dst[dstOffset+2]=z1;dst[dstOffset+3]=w1;return}if(w0!==w1||x0!==x1||y0!==y1||z0!==z1){let dot=x0*x1+y0*y1+z0*z1+w0*w1;if(dot<0){x1=-x1;y1=-y1;z1=-z1;w1=-w1;dot=-dot}let s=1-t;if(dot<0.9995){const theta=Math.acos(dot);const sin=Math.sin(theta);s=Math.sin(s*theta)/sin;t=Math.sin(t*theta)/sin;x0=x0*s+x1*t;y0=y0*s+y1*t;z0=z0*s+z1*t;w0=w0*s+w1*t}else{x0=x0*s+x1*t;y0=y0*s+y1*t;z0=z0*s+z1*t;w0=w0*s+w1*t;const f=1/Math.sqrt(x0*x0+y0*y0+z0*z0+w0*w0);x0*=f;y0*=f;z0*=f;w0*=f}}dst[dstOffset]=x0;dst[dstOffset+1]=y0;dst[dstOffset+2]=z0;dst[dstOffset+3]=w0}static multiplyQuaternionsFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1){const x0=src0[srcOffset0];const y0=src0[srcOffset0+1];const z0=src0[srcOffset0+2];const w0=src0[srcOffset0+3];const x1=src1[srcOffset1];const y1=src1[srcOffset1+1];const z1=src1[srcOffset1+2];const w1=src1[srcOffset1+3];dst[dstOffset]=x0*w1+w0*x1+y0*z1-z0*y1;dst[dstOffset+1]=y0*w1+w0*y1+z0*x1-x0*z1;dst[dstOffset+2]=z0*w1+w0*z1+x0*y1-y0*x1;dst[dstOffset+3]=w0*w1-x0*x1-y0*y1-z0*z1;return dst}get x(){return this._x}set x(value){this._x=value;this._onChangeCallback()}get y(){return this._y}set y(value){this._y=value;this._onChangeCallback()}get z(){return this._z}set z(value){this._z=value;this._onChangeCallback()}get w(){return this._w}set w(value){this._w=value;this._onChangeCallback()}set(x,y,z,w){this._x=x;this._y=y;this._z=z;this._w=w;this._onChangeCallback();return this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(quaternion){this._x=quaternion.x;this._y=quaternion.y;this._z=quaternion.z;this._w=quaternion.w;this._onChangeCallback();return this}setFromEuler(euler,update=true){const x=euler._x,y=euler._y,z=euler._z,order=euler._order;const cos=Math.cos;const sin=Math.sin;const c1=cos(x/2);const c2=cos(y/2);const c3=cos(z/2);const s1=sin(x/2);const s2=sin(y/2);const s3=sin(z/2);switch(order){case"XYZ":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"YXZ":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;case"ZXY":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"ZYX":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;case"YZX":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"XZY":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;default:warn("Quaternion: .setFromEuler() encountered an unknown order: "+order);}if(update===true)this._onChangeCallback();return this}setFromAxisAngle(axis,angle){const halfAngle=angle/2,s=Math.sin(halfAngle);this._x=axis.x*s;this._y=axis.y*s;this._z=axis.z*s;this._w=Math.cos(halfAngle);this._onChangeCallback();return this}setFromRotationMatrix(m){const te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10],trace=m11+m22+m33;if(trace>0){const s=0.5/Math.sqrt(trace+1);this._w=0.25/s;this._x=(m32-m23)*s;this._y=(m13-m31)*s;this._z=(m21-m12)*s}else if(m11>m22&&m11>m33){const s=2*Math.sqrt(1+m11-m22-m33);this._w=(m32-m23)/s;this._x=0.25*s;this._y=(m12+m21)/s;this._z=(m13+m31)/s}else if(m22>m33){const s=2*Math.sqrt(1+m22-m11-m33);this._w=(m13-m31)/s;this._x=(m12+m21)/s;this._y=0.25*s;this._z=(m23+m32)/s}else{const s=2*Math.sqrt(1+m33-m11-m22);this._w=(m21-m12)/s;this._x=(m13+m31)/s;this._y=(m23+m32)/s;this._z=0.25*s}this._onChangeCallback();return this}setFromUnitVectors(vFrom,vTo){let r=vFrom.dot(vTo)+1;if(r<1e-8){r=0;if(Math.abs(vFrom.x)>Math.abs(vFrom.z)){this._x=-vFrom.y;this._y=vFrom.x;this._z=0;this._w=r}else{this._x=0;this._y=-vFrom.z;this._z=vFrom.y;this._w=r}}else{this._x=vFrom.y*vTo.z-vFrom.z*vTo.y;this._y=vFrom.z*vTo.x-vFrom.x*vTo.z;this._z=vFrom.x*vTo.y-vFrom.y*vTo.x;this._w=r}return this.normalize()}angleTo(q){return 2*Math.acos(Math.abs(clamp(this.dot(q),-1,1)))}rotateTowards(q,step){const angle=this.angleTo(q);if(angle===0)return this;const t=Math.min(1,step/angle);this.slerp(q,t);return this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){this._x*=-1;this._y*=-1;this._z*=-1;this._onChangeCallback();return this}dot(v){return this._x*v._x+this._y*v._y+this._z*v._z+this._w*v._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let l=this.length();if(l===0){this._x=0;this._y=0;this._z=0;this._w=1}else{l=1/l;this._x=this._x*l;this._y=this._y*l;this._z=this._z*l;this._w=this._w*l}this._onChangeCallback();return this}multiply(q){return this.multiplyQuaternions(this,q)}premultiply(q){return this.multiplyQuaternions(q,this)}multiplyQuaternions(a,b){const qax=a._x,qay=a._y,qaz=a._z,qaw=a._w;const qbx=b._x,qby=b._y,qbz=b._z,qbw=b._w;this._x=qax*qbw+qaw*qbx+qay*qbz-qaz*qby;this._y=qay*qbw+qaw*qby+qaz*qbx-qax*qbz;this._z=qaz*qbw+qaw*qbz+qax*qby-qay*qbx;this._w=qaw*qbw-qax*qbx-qay*qby-qaz*qbz;this._onChangeCallback();return this}slerp(qb,t){if(t<=0)return this;if(t>=1)return this.copy(qb);let x=qb._x,y=qb._y,z=qb._z,w=qb._w;let dot=this.dot(qb);if(dot<0){x=-x;y=-y;z=-z;w=-w;dot=-dot}let s=1-t;if(dot<0.9995){const theta=Math.acos(dot);const sin=Math.sin(theta);s=Math.sin(s*theta)/sin;t=Math.sin(t*theta)/sin;this._x=this._x*s+x*t;this._y=this._y*s+y*t;this._z=this._z*s+z*t;this._w=this._w*s+w*t;this._onChangeCallback()}else{this._x=this._x*s+x*t;this._y=this._y*s+y*t;this._z=this._z*s+z*t;this._w=this._w*s+w*t;this.normalize()}return this}slerpQuaternions(qa,qb,t){return this.copy(qa).slerp(qb,t)}random(){const theta1=2*Math.PI*Math.random();const theta2=2*Math.PI*Math.random();const x0=Math.random();const r1=Math.sqrt(1-x0);const r2=Math.sqrt(x0);return this.set(r1*Math.sin(theta1),r1*Math.cos(theta1),r2*Math.sin(theta2),r2*Math.cos(theta2))}equals(quaternion){return quaternion._x===this._x&&quaternion._y===this._y&&quaternion._z===this._z&&quaternion._w===this._w}fromArray(array,offset=0){this._x=array[offset];this._y=array[offset+1];this._z=array[offset+2];this._w=array[offset+3];this._onChangeCallback();return this}toArray(array=[],offset=0){array[offset]=this._x;array[offset+1]=this._y;array[offset+2]=this._z;array[offset+3]=this._w;return array}fromBufferAttribute(attribute,index){this._x=attribute.getX(index);this._y=attribute.getY(index);this._z=attribute.getZ(index);this._w=attribute.getW(index);this._onChangeCallback();return this}toJSON(){return this.toArray()}_onChange(callback){this._onChangeCallback=callback;return this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x;yield this._y;yield this._z;yield this._w}}class Vector3{constructor(x=0,y=0,z=0){Vector3.prototype.isVector3=true;this.x=x;this.y=y;this.z=z}set(x,y,z){if(z===undefined)z=this.z;this.x=x;this.y=y;this.z=z;return this}setScalar(scalar){this.x=scalar;this.y=scalar;this.z=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setZ(z){this.z=z;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;case 2:this.z=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(v){this.x=v.x;this.y=v.y;this.z=v.z;return this}add(v){this.x+=v.x;this.y+=v.y;this.z+=v.z;return this}addScalar(s){this.x+=s;this.y+=s;this.z+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;this.z+=v.z*s;return this}sub(v){this.x-=v.x;this.y-=v.y;this.z-=v.z;return this}subScalar(s){this.x-=s;this.y-=s;this.z-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this}multiply(v){this.x*=v.x;this.y*=v.y;this.z*=v.z;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;this.z*=scalar;return this}multiplyVectors(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this}applyEuler(euler){return this.applyQuaternion(_quaternion$4.setFromEuler(euler))}applyAxisAngle(axis,angle){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(axis,angle))}applyMatrix3(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;this.x=e[0]*x+e[3]*y+e[6]*z;this.y=e[1]*x+e[4]*y+e[7]*z;this.z=e[2]*x+e[5]*y+e[8]*z;return this}applyNormalMatrix(m){return this.applyMatrix3(m).normalize()}applyMatrix4(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;const w=1/(e[3]*x+e[7]*y+e[11]*z+e[15]);this.x=(e[0]*x+e[4]*y+e[8]*z+e[12])*w;this.y=(e[1]*x+e[5]*y+e[9]*z+e[13])*w;this.z=(e[2]*x+e[6]*y+e[10]*z+e[14])*w;return this}applyQuaternion(q){const vx=this.x,vy=this.y,vz=this.z;const qx=q.x,qy=q.y,qz=q.z,qw=q.w;const tx=2*(qy*vz-qz*vy);const ty=2*(qz*vx-qx*vz);const tz=2*(qx*vy-qy*vx);this.x=vx+qw*tx+qy*tz-qz*ty;this.y=vy+qw*ty+qz*tx-qx*tz;this.z=vz+qw*tz+qx*ty-qy*tx;return this}project(camera){return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix)}unproject(camera){return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld)}transformDirection(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;this.x=e[0]*x+e[4]*y+e[8]*z;this.y=e[1]*x+e[5]*y+e[9]*z;this.z=e[2]*x+e[6]*y+e[10]*z;return this.normalize()}divide(v){this.x/=v.x;this.y/=v.y;this.z/=v.z;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);this.z=Math.min(this.z,v.z);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);this.z=Math.max(this.z,v.z);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);this.z=clamp(this.z,min.z,max.z);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);this.z=clamp(this.z,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);this.z=Math.trunc(this.z);return this}negate(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;this.z+=(v.z-this.z)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;this.z=v1.z+(v2.z-v1.z)*alpha;return this}cross(v){return this.crossVectors(this,v)}crossVectors(a,b){const ax=a.x,ay=a.y,az=a.z;const bx=b.x,by=b.y,bz=b.z;this.x=ay*bz-az*by;this.y=az*bx-ax*bz;this.z=ax*by-ay*bx;return this}projectOnVector(v){const denominator=v.lengthSq();if(denominator===0)return this.set(0,0,0);const scalar=v.dot(this)/denominator;return this.copy(v).multiplyScalar(scalar)}projectOnPlane(planeNormal){_vector$c.copy(this).projectOnVector(planeNormal);return this.sub(_vector$c)}reflect(normal){return this.sub(_vector$c.copy(normal).multiplyScalar(2*this.dot(normal)))}angleTo(v){const denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;const theta=this.dot(v)/denominator;return Math.acos(clamp(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){const dx=this.x-v.x,dy=this.y-v.y,dz=this.z-v.z;return dx*dx+dy*dy+dz*dz}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)+Math.abs(this.z-v.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(radius,phi,theta){const sinPhiRadius=Math.sin(phi)*radius;this.x=sinPhiRadius*Math.sin(theta);this.y=Math.cos(phi)*radius;this.z=sinPhiRadius*Math.cos(theta);return this}setFromCylindrical(c){return this.setFromCylindricalCoords(c.radius,c.theta,c.y)}setFromCylindricalCoords(radius,theta,y){this.x=radius*Math.sin(theta);this.y=y;this.z=radius*Math.cos(theta);return this}setFromMatrixPosition(m){const e=m.elements;this.x=e[12];this.y=e[13];this.z=e[14];return this}setFromMatrixScale(m){const sx=this.setFromMatrixColumn(m,0).length();const sy=this.setFromMatrixColumn(m,1).length();const sz=this.setFromMatrixColumn(m,2).length();this.x=sx;this.y=sy;this.z=sz;return this}setFromMatrixColumn(m,index){return this.fromArray(m.elements,index*4)}setFromMatrix3Column(m,index){return this.fromArray(m.elements,index*3)}setFromEuler(e){this.x=e._x;this.y=e._y;this.z=e._z;return this}setFromColor(c){this.x=c.r;this.y=c.g;this.z=c.b;return this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];this.z=array[offset+2];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;array[offset+2]=this.z;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);this.z=attribute.getZ(index);return this}random(){this.x=Math.random();this.y=Math.random();this.z=Math.random();return this}randomDirection(){const theta=Math.random()*Math.PI*2;const u=Math.random()*2-1;const c=Math.sqrt(1-u*u);this.x=c*Math.cos(theta);this.y=u;this.z=c*Math.sin(theta);return this}*[Symbol.iterator](){yield this.x;yield this.y;yield this.z}}const _vector$c=new Vector3;const _quaternion$4=new Quaternion;class Matrix3{constructor(n11,n12,n13,n21,n22,n23,n31,n32,n33){Matrix3.prototype.isMatrix3=true;this.elements=[1,0,0,0,1,0,0,0,1];if(n11!==undefined){this.set(n11,n12,n13,n21,n22,n23,n31,n32,n33)}}set(n11,n12,n13,n21,n22,n23,n31,n32,n33){const te=this.elements;te[0]=n11;te[1]=n21;te[2]=n31;te[3]=n12;te[4]=n22;te[5]=n32;te[6]=n13;te[7]=n23;te[8]=n33;return this}identity(){this.set(1,0,0,0,1,0,0,0,1);return this}copy(m){const te=this.elements;const me=m.elements;te[0]=me[0];te[1]=me[1];te[2]=me[2];te[3]=me[3];te[4]=me[4];te[5]=me[5];te[6]=me[6];te[7]=me[7];te[8]=me[8];return this}extractBasis(xAxis,yAxis,zAxis){xAxis.setFromMatrix3Column(this,0);yAxis.setFromMatrix3Column(this,1);zAxis.setFromMatrix3Column(this,2);return this}setFromMatrix4(m){const me=m.elements;this.set(me[0],me[4],me[8],me[1],me[5],me[9],me[2],me[6],me[10]);return this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a,b){const ae=a.elements;const be=b.elements;const te=this.elements;const a11=ae[0],a12=ae[3],a13=ae[6];const a21=ae[1],a22=ae[4],a23=ae[7];const a31=ae[2],a32=ae[5],a33=ae[8];const b11=be[0],b12=be[3],b13=be[6];const b21=be[1],b22=be[4],b23=be[7];const b31=be[2],b32=be[5],b33=be[8];te[0]=a11*b11+a12*b21+a13*b31;te[3]=a11*b12+a12*b22+a13*b32;te[6]=a11*b13+a12*b23+a13*b33;te[1]=a21*b11+a22*b21+a23*b31;te[4]=a21*b12+a22*b22+a23*b32;te[7]=a21*b13+a22*b23+a23*b33;te[2]=a31*b11+a32*b21+a33*b31;te[5]=a31*b12+a32*b22+a33*b32;te[8]=a31*b13+a32*b23+a33*b33;return this}multiplyScalar(s){const te=this.elements;te[0]*=s;te[3]*=s;te[6]*=s;te[1]*=s;te[4]*=s;te[7]*=s;te[2]*=s;te[5]*=s;te[8]*=s;return this}determinant(){const te=this.elements;const a=te[0],b=te[1],c=te[2],d=te[3],e=te[4],f=te[5],g=te[6],h=te[7],i=te[8];return a*e*i-a*f*h-b*d*i+b*f*g+c*d*h-c*e*g}invert(){const te=this.elements,n11=te[0],n21=te[1],n31=te[2],n12=te[3],n22=te[4],n32=te[5],n13=te[6],n23=te[7],n33=te[8],t11=n33*n22-n32*n23,t12=n32*n13-n33*n12,t13=n23*n12-n22*n13,det=n11*t11+n21*t12+n31*t13;if(det===0)return this.set(0,0,0,0,0,0,0,0,0);const detInv=1/det;te[0]=t11*detInv;te[1]=(n31*n23-n33*n21)*detInv;te[2]=(n32*n21-n31*n22)*detInv;te[3]=t12*detInv;te[4]=(n33*n11-n31*n13)*detInv;te[5]=(n31*n12-n32*n11)*detInv;te[6]=t13*detInv;te[7]=(n21*n13-n23*n11)*detInv;te[8]=(n22*n11-n21*n12)*detInv;return this}transpose(){let tmp;const m=this.elements;tmp=m[1];m[1]=m[3];m[3]=tmp;tmp=m[2];m[2]=m[6];m[6]=tmp;tmp=m[5];m[5]=m[7];m[7]=tmp;return this}getNormalMatrix(matrix4){return this.setFromMatrix4(matrix4).invert().transpose()}transposeIntoArray(r){const m=this.elements;r[0]=m[0];r[1]=m[3];r[2]=m[6];r[3]=m[1];r[4]=m[4];r[5]=m[7];r[6]=m[2];r[7]=m[5];r[8]=m[8];return this}setUvTransform(tx,ty,sx,sy,rotation,cx,cy){const c=Math.cos(rotation);const s=Math.sin(rotation);this.set(sx*c,sx*s,-sx*(c*cx+s*cy)+cx+tx,-sy*s,sy*c,-sy*(-s*cx+c*cy)+cy+ty,0,0,1);return this}scale(sx,sy){this.premultiply(_m3.makeScale(sx,sy));return this}rotate(theta){this.premultiply(_m3.makeRotation(-theta));return this}translate(tx,ty){this.premultiply(_m3.makeTranslation(tx,ty));return this}makeTranslation(x,y){if(x.isVector2){this.set(1,0,x.x,0,1,x.y,0,0,1)}else{this.set(1,0,x,0,1,y,0,0,1)}return this}makeRotation(theta){const c=Math.cos(theta);const s=Math.sin(theta);this.set(c,-s,0,s,c,0,0,0,1);return this}makeScale(x,y){this.set(x,0,0,0,y,0,0,0,1);return this}equals(matrix){const te=this.elements;const me=matrix.elements;for(let i=0;i<9;i++){if(te[i]!==me[i])return false}return true}fromArray(array,offset=0){for(let i=0;i<9;i++){this.elements[i]=array[i+offset]}return this}toArray(array=[],offset=0){const te=this.elements;array[offset]=te[0];array[offset+1]=te[1];array[offset+2]=te[2];array[offset+3]=te[3];array[offset+4]=te[4];array[offset+5]=te[5];array[offset+6]=te[6];array[offset+7]=te[7];array[offset+8]=te[8];return array}clone(){return new this.constructor().fromArray(this.elements)}}const _m3=new Matrix3;const LINEAR_REC709_TO_XYZ=new Matrix3().set(0.4123908,0.3575843,0.1804808,0.212639,0.7151687,0.0721923,0.0193308,0.1191948,0.9505322);const XYZ_TO_LINEAR_REC709=new Matrix3().set(3.2409699,-1.5373832,-0.4986108,-0.9692436,1.8759675,0.0415551,0.0556301,-0.203977,1.0569715);function createColorManagement(){const ColorManagement={enabled:true,workingColorSpace:LinearSRGBColorSpace,spaces:{},convert:function(color,sourceColorSpace,targetColorSpace){if(this.enabled===false||sourceColorSpace===targetColorSpace||!sourceColorSpace||!targetColorSpace){return color}if(this.spaces[sourceColorSpace].transfer===SRGBTransfer){color.r=SRGBToLinear(color.r);color.g=SRGBToLinear(color.g);color.b=SRGBToLinear(color.b)}if(this.spaces[sourceColorSpace].primaries!==this.spaces[targetColorSpace].primaries){color.applyMatrix3(this.spaces[sourceColorSpace].toXYZ);color.applyMatrix3(this.spaces[targetColorSpace].fromXYZ)}if(this.spaces[targetColorSpace].transfer===SRGBTransfer){color.r=LinearToSRGB(color.r);color.g=LinearToSRGB(color.g);color.b=LinearToSRGB(color.b)}return color},workingToColorSpace:function(color,targetColorSpace){return this.convert(color,this.workingColorSpace,targetColorSpace)},colorSpaceToWorking:function(color,sourceColorSpace){return this.convert(color,sourceColorSpace,this.workingColorSpace)},getPrimaries:function(colorSpace){return this.spaces[colorSpace].primaries},getTransfer:function(colorSpace){if(colorSpace===NoColorSpace)return LinearTransfer;return this.spaces[colorSpace].transfer},getToneMappingMode:function(colorSpace){return this.spaces[colorSpace].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(target,colorSpace=this.workingColorSpace){return target.fromArray(this.spaces[colorSpace].luminanceCoefficients)},define:function(colorSpaces){Object.assign(this.spaces,colorSpaces)},_getMatrix:function(targetMatrix,sourceColorSpace,targetColorSpace){return targetMatrix.copy(this.spaces[sourceColorSpace].toXYZ).multiply(this.spaces[targetColorSpace].fromXYZ)},_getDrawingBufferColorSpace:function(colorSpace){return this.spaces[colorSpace].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(colorSpace=this.workingColorSpace){return this.spaces[colorSpace].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(color,targetColorSpace){warnOnce("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().");return ColorManagement.workingToColorSpace(color,targetColorSpace)},toWorkingColorSpace:function(color,sourceColorSpace){warnOnce("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().");return ColorManagement.colorSpaceToWorking(color,sourceColorSpace)}};const REC709_PRIMARIES=[0.64,0.33,0.3,0.6,0.15,0.06];const REC709_LUMINANCE_COEFFICIENTS=[0.2126,0.7152,0.0722];const D65=[0.3127,0.329];ColorManagement.define({[LinearSRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65,transfer:LinearTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,workingColorSpaceConfig:{unpackColorSpace:SRGBColorSpace},outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}},[SRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65,transfer:SRGBTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}}});return ColorManagement}const ColorManagement=createColorManagement();function SRGBToLinear(c){return c<0.04045?c*0.0773993808:Math.pow(c*0.9478672986+0.0521327014,2.4)}function LinearToSRGB(c){return c<0.0031308?c*12.92:1.055*Math.pow(c,0.41666)-0.055}let _canvas;class ImageUtils{static getDataURL(image,type="image/png"){if(/^data:/i.test(image.src)){return image.src}if(typeof HTMLCanvasElement==="undefined"){return image.src}let canvas;if(image instanceof HTMLCanvasElement){canvas=image}else{if(_canvas===undefined)_canvas=createElementNS("canvas");_canvas.width=image.width;_canvas.height=image.height;const context=_canvas.getContext("2d");if(image instanceof ImageData){context.putImageData(image,0,0)}else{context.drawImage(image,0,0,image.width,image.height)}canvas=_canvas}return canvas.toDataURL(type)}static sRGBToLinear(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap){const canvas=createElementNS("canvas");canvas.width=image.width;canvas.height=image.height;const context=canvas.getContext("2d");context.drawImage(image,0,0,image.width,image.height);const imageData=context.getImageData(0,0,image.width,image.height);const data=imageData.data;for(let i=0;i<data.length;i++){data[i]=SRGBToLinear(data[i]/255)*255}context.putImageData(imageData,0,0);return canvas}else if(image.data){const data=image.data.slice(0);for(let i=0;i<data.length;i++){if(data instanceof Uint8Array||data instanceof Uint8ClampedArray){data[i]=Math.floor(SRGBToLinear(data[i]/255)*255)}else{data[i]=SRGBToLinear(data[i])}}return{data:data,width:image.width,height:image.height}}else{warn("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.");return image}}}let _sourceId=0;class Source{constructor(data=null){this.isSource=true;Object.defineProperty(this,"id",{value:_sourceId++});this.uuid=generateUUID();this.data=data;this.dataReady=true;this.version=0}getSize(target){const data=this.data;if(typeof HTMLVideoElement!=="undefined"&&data instanceof HTMLVideoElement){target.set(data.videoWidth,data.videoHeight,0)}else if(typeof VideoFrame!=="undefined"&&data instanceof VideoFrame){target.set(data.displayHeight,data.displayWidth,0)}else if(data!==null){target.set(data.width,data.height,data.depth||0)}else{target.set(0,0,0)}return target}set needsUpdate(value){if(value===true)this.version++}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(!isRootObject&&meta.images[this.uuid]!==undefined){return meta.images[this.uuid]}const output={uuid:this.uuid,url:""};const data=this.data;if(data!==null){let url;if(Array.isArray(data)){url=[];for(let i=0,l=data.length;i<l;i++){if(data[i].isDataTexture){url.push(serializeImage(data[i].image))}else{url.push(serializeImage(data[i]))}}}else{url=serializeImage(data)}output.url=url}if(!isRootObject){meta.images[this.uuid]=output}return output}}function serializeImage(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap){return ImageUtils.getDataURL(image)}else{if(image.data){return{data:Array.from(image.data),width:image.width,height:image.height,type:image.data.constructor.name}}else{warn("Texture: Unable to serialize Texture.");return{}}}}let _textureId=0;const _tempVec3=new Vector3;class Texture extends EventDispatcher{constructor(image=Texture.DEFAULT_IMAGE,mapping=Texture.DEFAULT_MAPPING,wrapS=ClampToEdgeWrapping,wrapT=ClampToEdgeWrapping,magFilter=LinearFilter,minFilter=LinearMipmapLinearFilter,format=RGBAFormat,type=UnsignedByteType,anisotropy=Texture.DEFAULT_ANISOTROPY,colorSpace=NoColorSpace){super();this.isTexture=true;Object.defineProperty(this,"id",{value:_textureId++});this.uuid=generateUUID();this.name="";this.source=new Source(image);this.mipmaps=[];this.mapping=mapping;this.channel=0;this.wrapS=wrapS;this.wrapT=wrapT;this.magFilter=magFilter;this.minFilter=minFilter;this.anisotropy=anisotropy;this.format=format;this.internalFormat=null;this.type=type;this.offset=new Vector2(0,0);this.repeat=new Vector2(1,1);this.center=new Vector2(0,0);this.rotation=0;this.matrixAutoUpdate=true;this.matrix=new Matrix3;this.generateMipmaps=true;this.premultiplyAlpha=false;this.flipY=true;this.unpackAlignment=4;this.colorSpace=colorSpace;this.userData={};this.updateRanges=[];this.version=0;this.onUpdate=null;this.renderTarget=null;this.isRenderTargetTexture=false;this.isArrayTexture=image&&image.depth&&image.depth>1?true:false;this.pmremVersion=0}get width(){return this.source.getSize(_tempVec3).x}get height(){return this.source.getSize(_tempVec3).y}get depth(){return this.source.getSize(_tempVec3).z}get image(){return this.source.data}set image(value=null){this.source.data=value}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name;this.source=source.source;this.mipmaps=source.mipmaps.slice(0);this.mapping=source.mapping;this.channel=source.channel;this.wrapS=source.wrapS;this.wrapT=source.wrapT;this.magFilter=source.magFilter;this.minFilter=source.minFilter;this.anisotropy=source.anisotropy;this.format=source.format;this.internalFormat=source.internalFormat;this.type=source.type;this.offset.copy(source.offset);this.repeat.copy(source.repeat);this.center.copy(source.center);this.rotation=source.rotation;this.matrixAutoUpdate=source.matrixAutoUpdate;this.matrix.copy(source.matrix);this.generateMipmaps=source.generateMipmaps;this.premultiplyAlpha=source.premultiplyAlpha;this.flipY=source.flipY;this.unpackAlignment=source.unpackAlignment;this.colorSpace=source.colorSpace;this.renderTarget=source.renderTarget;this.isRenderTargetTexture=source.isRenderTargetTexture;this.isArrayTexture=source.isArrayTexture;this.userData=JSON.parse(JSON.stringify(source.userData));this.needsUpdate=true;return this}setValues(values){for(const key in values){const newValue=values[key];if(newValue===undefined){warn(`Texture.setValues(): parameter '${key}' has value of undefined.`);continue}const currentValue=this[key];if(currentValue===undefined){warn(`Texture.setValues(): property '${key}' does not exist.`);continue}if(currentValue&&newValue&&currentValue.isVector2&&newValue.isVector2){currentValue.copy(newValue)}else if(currentValue&&newValue&&currentValue.isVector3&&newValue.isVector3){currentValue.copy(newValue)}else if(currentValue&&newValue&&currentValue.isMatrix3&&newValue.isMatrix3){currentValue.copy(newValue)}else{this[key]=newValue}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(!isRootObject&&meta.textures[this.uuid]!==undefined){return meta.textures[this.uuid]}const output={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(meta).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(Object.keys(this.userData).length>0)output.userData=this.userData;if(!isRootObject){meta.textures[this.uuid]=output}return output}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(uv){if(this.mapping!==UVMapping)return uv;uv.applyMatrix3(this.matrix);if(uv.x<0||uv.x>1){switch(this.wrapS){case RepeatWrapping:uv.x=uv.x-Math.floor(uv.x);break;case ClampToEdgeWrapping:uv.x=uv.x<0?0:1;break;case MirroredRepeatWrapping:if(Math.abs(Math.floor(uv.x)%2)===1){uv.x=Math.ceil(uv.x)-uv.x}else{uv.x=uv.x-Math.floor(uv.x)}break;}}if(uv.y<0||uv.y>1){switch(this.wrapT){case RepeatWrapping:uv.y=uv.y-Math.floor(uv.y);break;case ClampToEdgeWrapping:uv.y=uv.y<0?0:1;break;case MirroredRepeatWrapping:if(Math.abs(Math.floor(uv.y)%2)===1){uv.y=Math.ceil(uv.y)-uv.y}else{uv.y=uv.y-Math.floor(uv.y)}break;}}if(this.flipY){uv.y=1-uv.y}return uv}set needsUpdate(value){if(value===true){this.version++;this.source.needsUpdate=true}}set needsPMREMUpdate(value){if(value===true){this.pmremVersion++}}}Texture.DEFAULT_IMAGE=null;Texture.DEFAULT_MAPPING=UVMapping;Texture.DEFAULT_ANISOTROPY=1;class Vector4{constructor(x=0,y=0,z=0,w=1){Vector4.prototype.isVector4=true;this.x=x;this.y=y;this.z=z;this.w=w}get width(){return this.z}set width(value){this.z=value}get height(){return this.w}set height(value){this.w=value}set(x,y,z,w){this.x=x;this.y=y;this.z=z;this.w=w;return this}setScalar(scalar){this.x=scalar;this.y=scalar;this.z=scalar;this.w=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setZ(z){this.z=z;return this}setW(w){this.w=w;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;case 2:this.z=value;break;case 3:this.w=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(v){this.x=v.x;this.y=v.y;this.z=v.z;this.w=v.w!==undefined?v.w:1;return this}add(v){this.x+=v.x;this.y+=v.y;this.z+=v.z;this.w+=v.w;return this}addScalar(s){this.x+=s;this.y+=s;this.z+=s;this.w+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;this.z+=v.z*s;this.w+=v.w*s;return this}sub(v){this.x-=v.x;this.y-=v.y;this.z-=v.z;this.w-=v.w;return this}subScalar(s){this.x-=s;this.y-=s;this.z-=s;this.w-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this}multiply(v){this.x*=v.x;this.y*=v.y;this.z*=v.z;this.w*=v.w;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;this.z*=scalar;this.w*=scalar;return this}applyMatrix4(m){const x=this.x,y=this.y,z=this.z,w=this.w;const e=m.elements;this.x=e[0]*x+e[4]*y+e[8]*z+e[12]*w;this.y=e[1]*x+e[5]*y+e[9]*z+e[13]*w;this.z=e[2]*x+e[6]*y+e[10]*z+e[14]*w;this.w=e[3]*x+e[7]*y+e[11]*z+e[15]*w;return this}divide(v){this.x/=v.x;this.y/=v.y;this.z/=v.z;this.w/=v.w;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}setAxisAngleFromQuaternion(q){this.w=2*Math.acos(q.w);const s=Math.sqrt(1-q.w*q.w);if(s<0.0001){this.x=1;this.y=0;this.z=0}else{this.x=q.x/s;this.y=q.y/s;this.z=q.z/s}return this}setAxisAngleFromRotationMatrix(m){let angle,x,y,z;const epsilon=0.01,epsilon2=0.1,te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10];if(Math.abs(m12-m21)<epsilon&&Math.abs(m13-m31)<epsilon&&Math.abs(m23-m32)<epsilon){if(Math.abs(m12+m21)<epsilon2&&Math.abs(m13+m31)<epsilon2&&Math.abs(m23+m32)<epsilon2&&Math.abs(m11+m22+m33-3)<epsilon2){this.set(1,0,0,0);return this}angle=Math.PI;const xx=(m11+1)/2;const yy=(m22+1)/2;const zz=(m33+1)/2;const xy=(m12+m21)/4;const xz=(m13+m31)/4;const yz=(m23+m32)/4;if(xx>yy&&xx>zz){if(xx<epsilon){x=0;y=0.707106781;z=0.707106781}else{x=Math.sqrt(xx);y=xy/x;z=xz/x}}else if(yy>zz){if(yy<epsilon){x=0.707106781;y=0;z=0.707106781}else{y=Math.sqrt(yy);x=xy/y;z=yz/y}}else{if(zz<epsilon){x=0.707106781;y=0.707106781;z=0}else{z=Math.sqrt(zz);x=xz/z;y=yz/z}}this.set(x,y,z,angle);return this}let s=Math.sqrt((m32-m23)*(m32-m23)+(m13-m31)*(m13-m31)+(m21-m12)*(m21-m12));if(Math.abs(s)<0.001)s=1;this.x=(m32-m23)/s;this.y=(m13-m31)/s;this.z=(m21-m12)/s;this.w=Math.acos((m11+m22+m33-1)/2);return this}setFromMatrixPosition(m){const e=m.elements;this.x=e[12];this.y=e[13];this.z=e[14];this.w=e[15];return this}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);this.z=Math.min(this.z,v.z);this.w=Math.min(this.w,v.w);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);this.z=Math.max(this.z,v.z);this.w=Math.max(this.w,v.w);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);this.z=clamp(this.z,min.z,max.z);this.w=clamp(this.w,min.w,max.w);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);this.z=clamp(this.z,minVal,maxVal);this.w=clamp(this.w,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);this.z=Math.trunc(this.z);this.w=Math.trunc(this.w);return this}negate(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z+this.w*v.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;this.z+=(v.z-this.z)*alpha;this.w+=(v.w-this.w)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;this.z=v1.z+(v2.z-v1.z)*alpha;this.w=v1.w+(v2.w-v1.w)*alpha;return this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z&&v.w===this.w}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];this.z=array[offset+2];this.w=array[offset+3];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;array[offset+2]=this.z;array[offset+3]=this.w;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);this.z=attribute.getZ(index);this.w=attribute.getW(index);return this}random(){this.x=Math.random();this.y=Math.random();this.z=Math.random();this.w=Math.random();return this}*[Symbol.iterator](){yield this.x;yield this.y;yield this.z;yield this.w}}class RenderTarget extends EventDispatcher{constructor(width=1,height=1,options={}){super();options=Object.assign({generateMipmaps:false,internalFormat:null,minFilter:LinearFilter,depthBuffer:true,stencilBuffer:false,resolveDepthBuffer:true,resolveStencilBuffer:true,depthTexture:null,samples:0,count:1,depth:1,multiview:false},options);this.isRenderTarget=true;this.width=width;this.height=height;this.depth=options.depth;this.scissor=new Vector4(0,0,width,height);this.scissorTest=false;this.viewport=new Vector4(0,0,width,height);const image={width:width,height:height,depth:options.depth};const texture=new Texture(image);this.textures=[];const count=options.count;for(let i=0;i<count;i++){this.textures[i]=texture.clone();this.textures[i].isRenderTargetTexture=true;this.textures[i].renderTarget=this}this._setTextureOptions(options);this.depthBuffer=options.depthBuffer;this.stencilBuffer=options.stencilBuffer;this.resolveDepthBuffer=options.resolveDepthBuffer;this.resolveStencilBuffer=options.resolveStencilBuffer;this._depthTexture=null;this.depthTexture=options.depthTexture;this.samples=options.samples;this.multiview=options.multiview}_setTextureOptions(options={}){const values={minFilter:LinearFilter,generateMipmaps:false,flipY:false,internalFormat:null};if(options.mapping!==undefined)values.mapping=options.mapping;if(options.wrapS!==undefined)values.wrapS=options.wrapS;if(options.wrapT!==undefined)values.wrapT=options.wrapT;if(options.wrapR!==undefined)values.wrapR=options.wrapR;if(options.magFilter!==undefined)values.magFilter=options.magFilter;if(options.minFilter!==undefined)values.minFilter=options.minFilter;if(options.format!==undefined)values.format=options.format;if(options.type!==undefined)values.type=options.type;if(options.anisotropy!==undefined)values.anisotropy=options.anisotropy;if(options.colorSpace!==undefined)values.colorSpace=options.colorSpace;if(options.flipY!==undefined)values.flipY=options.flipY;if(options.generateMipmaps!==undefined)values.generateMipmaps=options.generateMipmaps;if(options.internalFormat!==undefined)values.internalFormat=options.internalFormat;for(let i=0;i<this.textures.length;i++){const texture=this.textures[i];texture.setValues(values)}}get texture(){return this.textures[0]}set texture(value){this.textures[0]=value}set depthTexture(current){if(this._depthTexture!==null)this._depthTexture.renderTarget=null;if(current!==null)current.renderTarget=this;this._depthTexture=current}get depthTexture(){return this._depthTexture}setSize(width,height,depth=1){if(this.width!==width||this.height!==height||this.depth!==depth){this.width=width;this.height=height;this.depth=depth;for(let i=0,il=this.textures.length;i<il;i++){this.textures[i].image.width=width;this.textures[i].image.height=height;this.textures[i].image.depth=depth;if(this.textures[i].isData3DTexture!==true){this.textures[i].isArrayTexture=this.textures[i].image.depth>1}}this.dispose()}this.viewport.set(0,0,width,height);this.scissor.set(0,0,width,height)}clone(){return new this.constructor().copy(this)}copy(source){this.width=source.width;this.height=source.height;this.depth=source.depth;this.scissor.copy(source.scissor);this.scissorTest=source.scissorTest;this.viewport.copy(source.viewport);this.textures.length=0;for(let i=0,il=source.textures.length;i<il;i++){this.textures[i]=source.textures[i].clone();this.textures[i].isRenderTargetTexture=true;this.textures[i].renderTarget=this;const image=Object.assign({},source.textures[i].image);this.textures[i].source=new Source(image)}this.depthBuffer=source.depthBuffer;this.stencilBuffer=source.stencilBuffer;this.resolveDepthBuffer=source.resolveDepthBuffer;this.resolveStencilBuffer=source.resolveStencilBuffer;if(source.depthTexture!==null)this.depthTexture=source.depthTexture.clone();this.samples=source.samples;return this}dispose(){this.dispatchEvent({type:"dispose"})}}class WebGLRenderTarget extends RenderTarget{constructor(width=1,height=1,options={}){super(width,height,options);this.isWebGLRenderTarget=true}}class DataArrayTexture extends Texture{constructor(data=null,width=1,height=1,depth=1){super(null);this.isDataArrayTexture=true;this.image={data,width,height,depth};this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.wrapR=ClampToEdgeWrapping;this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1;this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}}class WebGLArrayRenderTarget extends WebGLRenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isWebGLArrayRenderTarget=true;this.depth=depth;this.texture=new DataArrayTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Data3DTexture extends Texture{constructor(data=null,width=1,height=1,depth=1){super(null);this.isData3DTexture=true;this.image={data,width,height,depth};this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.wrapR=ClampToEdgeWrapping;this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1}}class WebGL3DRenderTarget extends WebGLRenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isWebGL3DRenderTarget=true;this.depth=depth;this.texture=new Data3DTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Box3{constructor(min=new Vector3(+Infinity,+Infinity,+Infinity),max=new Vector3(-Infinity,-Infinity,-Infinity)){this.isBox3=true;this.min=min;this.max=max}set(min,max){this.min.copy(min);this.max.copy(max);return this}setFromArray(array){this.makeEmpty();for(let i=0,il=array.length;i<il;i+=3){this.expandByPoint(_vector$b.fromArray(array,i))}return this}setFromBufferAttribute(attribute){this.makeEmpty();for(let i=0,il=attribute.count;i<il;i++){this.expandByPoint(_vector$b.fromBufferAttribute(attribute,i))}return this}setFromPoints(points){this.makeEmpty();for(let i=0,il=points.length;i<il;i++){this.expandByPoint(points[i])}return this}setFromCenterAndSize(center,size){const halfSize=_vector$b.copy(size).multiplyScalar(0.5);this.min.copy(center).sub(halfSize);this.max.copy(center).add(halfSize);return this}setFromObject(object,precise=false){this.makeEmpty();return this.expandByObject(object,precise)}clone(){return new this.constructor().copy(this)}copy(box){this.min.copy(box.min);this.max.copy(box.max);return this}makeEmpty(){this.min.x=this.min.y=this.min.z=+Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(target){return this.isEmpty()?target.set(0,0,0):target.addVectors(this.min,this.max).multiplyScalar(0.5)}getSize(target){return this.isEmpty()?target.set(0,0,0):target.subVectors(this.max,this.min)}expandByPoint(point){this.min.min(point);this.max.max(point);return this}expandByVector(vector){this.min.sub(vector);this.max.add(vector);return this}expandByScalar(scalar){this.min.addScalar(-scalar);this.max.addScalar(scalar);return this}expandByObject(object,precise=false){object.updateWorldMatrix(false,false);const geometry=object.geometry;if(geometry!==undefined){const positionAttribute=geometry.getAttribute("position");if(precise===true&&positionAttribute!==undefined&&object.isInstancedMesh!==true){for(let i=0,l=positionAttribute.count;i<l;i++){if(object.isMesh===true){object.getVertexPosition(i,_vector$b)}else{_vector$b.fromBufferAttribute(positionAttribute,i)}_vector$b.applyMatrix4(object.matrixWorld);this.expandByPoint(_vector$b)}}else{if(object.boundingBox!==undefined){if(object.boundingBox===null){object.computeBoundingBox()}_box$4.copy(object.boundingBox)}else{if(geometry.boundingBox===null){geometry.computeBoundingBox()}_box$4.copy(geometry.boundingBox)}_box$4.applyMatrix4(object.matrixWorld);this.union(_box$4)}}const children=object.children;for(let i=0,l=children.length;i<l;i++){this.expandByObject(children[i],precise)}return this}containsPoint(point){return point.x>=this.min.x&&point.x<=this.max.x&&point.y>=this.min.y&&point.y<=this.max.y&&point.z>=this.min.z&&point.z<=this.max.z}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y&&this.min.z<=box.min.z&&box.max.z<=this.max.z}getParameter(point,target){return target.set((point.x-this.min.x)/(this.max.x-this.min.x),(point.y-this.min.y)/(this.max.y-this.min.y),(point.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y&&box.max.z>=this.min.z&&box.min.z<=this.max.z}intersectsSphere(sphere){this.clampPoint(sphere.center,_vector$b);return _vector$b.distanceToSquared(sphere.center)<=sphere.radius*sphere.radius}intersectsPlane(plane){let min,max;if(plane.normal.x>0){min=plane.normal.x*this.min.x;max=plane.normal.x*this.max.x}else{min=plane.normal.x*this.max.x;max=plane.normal.x*this.min.x}if(plane.normal.y>0){min+=plane.normal.y*this.min.y;max+=plane.normal.y*this.max.y}else{min+=plane.normal.y*this.max.y;max+=plane.normal.y*this.min.y}if(plane.normal.z>0){min+=plane.normal.z*this.min.z;max+=plane.normal.z*this.max.z}else{min+=plane.normal.z*this.max.z;max+=plane.normal.z*this.min.z}return min<=-plane.constant&&max>=-plane.constant}intersectsTriangle(triangle){if(this.isEmpty()){return false}this.getCenter(_center);_extents.subVectors(this.max,_center);_v0$3.subVectors(triangle.a,_center);_v1$7.subVectors(triangle.b,_center);_v2$4.subVectors(triangle.c,_center);_f0.subVectors(_v1$7,_v0$3);_f1.subVectors(_v2$4,_v1$7);_f2.subVectors(_v0$3,_v2$4);let axes=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];if(!satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)){return false}axes=[1,0,0,0,1,0,0,0,1];if(!satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)){return false}_triangleNormal.crossVectors(_f0,_f1);axes=[_triangleNormal.x,_triangleNormal.y,_triangleNormal.z];return satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)}clampPoint(point,target){return target.copy(point).clamp(this.min,this.max)}distanceToPoint(point){return this.clampPoint(point,_vector$b).distanceTo(point)}getBoundingSphere(target){if(this.isEmpty()){target.makeEmpty()}else{this.getCenter(target.center);target.radius=this.getSize(_vector$b).length()*0.5}return target}intersect(box){this.min.max(box.min);this.max.min(box.max);if(this.isEmpty())this.makeEmpty();return this}union(box){this.min.min(box.min);this.max.max(box.max);return this}applyMatrix4(matrix){if(this.isEmpty())return this;_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(matrix);_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(matrix);_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(matrix);_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(matrix);_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(matrix);_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(matrix);_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(matrix);_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(matrix);this.setFromPoints(_points);return this}translate(offset){this.min.add(offset);this.max.add(offset);return this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(json){this.min.fromArray(json.min);this.max.fromArray(json.max);return this}}const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3];const _vector$b=new Vector3;const _box$4=new Box3;const _v0$3=new Vector3;const _v1$7=new Vector3;const _v2$4=new Vector3;const _f0=new Vector3;const _f1=new Vector3;const _f2=new Vector3;const _center=new Vector3;const _extents=new Vector3;const _triangleNormal=new Vector3;const _testAxis=new Vector3;function satForAxes(axes,v0,v1,v2,extents){for(let i=0,j=axes.length-3;i<=j;i+=3){_testAxis.fromArray(axes,i);const r=extents.x*Math.abs(_testAxis.x)+extents.y*Math.abs(_testAxis.y)+extents.z*Math.abs(_testAxis.z);const p0=v0.dot(_testAxis);const p1=v1.dot(_testAxis);const p2=v2.dot(_testAxis);if(Math.max(-Math.max(p0,p1,p2),Math.min(p0,p1,p2))>r){return false}}return true}const _box$3=new Box3;const _v1$6=new Vector3;const _v2$3=new Vector3;class Sphere{constructor(center=new Vector3,radius=-1){this.isSphere=true;this.center=center;this.radius=radius}set(center,radius){this.center.copy(center);this.radius=radius;return this}setFromPoints(points,optionalCenter){const center=this.center;if(optionalCenter!==undefined){center.copy(optionalCenter)}else{_box$3.setFromPoints(points).getCenter(center)}let maxRadiusSq=0;for(let i=0,il=points.length;i<il;i++){maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(points[i]))}this.radius=Math.sqrt(maxRadiusSq);return this}copy(sphere){this.center.copy(sphere.center);this.radius=sphere.radius;return this}isEmpty(){return this.radius<0}makeEmpty(){this.center.set(0,0,0);this.radius=-1;return this}containsPoint(point){return point.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(point){return point.distanceTo(this.center)-this.radius}intersectsSphere(sphere){const radiusSum=this.radius+sphere.radius;return sphere.center.distanceToSquared(this.center)<=radiusSum*radiusSum}intersectsBox(box){return box.intersectsSphere(this)}intersectsPlane(plane){return Math.abs(plane.distanceToPoint(this.center))<=this.radius}clampPoint(point,target){const deltaLengthSq=this.center.distanceToSquared(point);target.copy(point);if(deltaLengthSq>this.radius*this.radius){target.sub(this.center).normalize();target.multiplyScalar(this.radius).add(this.center)}return target}getBoundingBox(target){if(this.isEmpty()){target.makeEmpty();return target}target.set(this.center,this.center);target.expandByScalar(this.radius);return target}applyMatrix4(matrix){this.center.applyMatrix4(matrix);this.radius=this.radius*matrix.getMaxScaleOnAxis();return this}translate(offset){this.center.add(offset);return this}expandByPoint(point){if(this.isEmpty()){this.center.copy(point);this.radius=0;return this}_v1$6.subVectors(point,this.center);const lengthSq=_v1$6.lengthSq();if(lengthSq>this.radius*this.radius){const length=Math.sqrt(lengthSq);const delta=(length-this.radius)*0.5;this.center.addScaledVector(_v1$6,delta/length);this.radius+=delta}return this}union(sphere){if(sphere.isEmpty()){return this}if(this.isEmpty()){this.copy(sphere);return this}if(this.center.equals(sphere.center)===true){this.radius=Math.max(this.radius,sphere.radius)}else{_v2$3.subVectors(sphere.center,this.center).setLength(sphere.radius);this.expandByPoint(_v1$6.copy(sphere.center).add(_v2$3));this.expandByPoint(_v1$6.copy(sphere.center).sub(_v2$3))}return this}equals(sphere){return sphere.center.equals(this.center)&&sphere.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(json){this.radius=json.radius;this.center.fromArray(json.center);return this}}const _vector$a=new Vector3;const _segCenter=new Vector3;const _segDir=new Vector3;const _diff=new Vector3;const _edge1=new Vector3;const _edge2=new Vector3;const _normal$1=new Vector3;class Ray{constructor(origin=new Vector3,direction=new Vector3(0,0,-1)){this.origin=origin;this.direction=direction}set(origin,direction){this.origin.copy(origin);this.direction.copy(direction);return this}copy(ray){this.origin.copy(ray.origin);this.direction.copy(ray.direction);return this}at(t,target){return target.copy(this.origin).addScaledVector(this.direction,t)}lookAt(v){this.direction.copy(v).sub(this.origin).normalize();return this}recast(t){this.origin.copy(this.at(t,_vector$a));return this}closestPointToPoint(point,target){target.subVectors(point,this.origin);const directionDistance=target.dot(this.direction);if(directionDistance<0){return target.copy(this.origin)}return target.copy(this.origin).addScaledVector(this.direction,directionDistance)}distanceToPoint(point){return Math.sqrt(this.distanceSqToPoint(point))}distanceSqToPoint(point){const directionDistance=_vector$a.subVectors(point,this.origin).dot(this.direction);if(directionDistance<0){return this.origin.distanceToSquared(point)}_vector$a.copy(this.origin).addScaledVector(this.direction,directionDistance);return _vector$a.distanceToSquared(point)}distanceSqToSegment(v0,v1,optionalPointOnRay,optionalPointOnSegment){_segCenter.copy(v0).add(v1).multiplyScalar(0.5);_segDir.copy(v1).sub(v0).normalize();_diff.copy(this.origin).sub(_segCenter);const segExtent=v0.distanceTo(v1)*0.5;const a01=-this.direction.dot(_segDir);const b0=_diff.dot(this.direction);const b1=-_diff.dot(_segDir);const c=_diff.lengthSq();const det=Math.abs(1-a01*a01);let s0,s1,sqrDist,extDet;if(det>0){s0=a01*b1-b0;s1=a01*b0-b1;extDet=segExtent*det;if(s0>=0){if(s1>=-extDet){if(s1<=extDet){const invDet=1/det;s0*=invDet;s1*=invDet;sqrDist=s0*(s0+a01*s1+2*b0)+s1*(a01*s0+s1+2*b1)+c}else{s1=segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}}else{s1=-segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}}else{if(s1<=-extDet){s0=Math.max(0,-(-a01*segExtent+b0));s1=s0>0?-segExtent:Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=-s0*s0+s1*(s1+2*b1)+c}else if(s1<=extDet){s0=0;s1=Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=s1*(s1+2*b1)+c}else{s0=Math.max(0,-(a01*segExtent+b0));s1=s0>0?segExtent:Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=-s0*s0+s1*(s1+2*b1)+c}}}else{s1=a01>0?-segExtent:segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}if(optionalPointOnRay){optionalPointOnRay.copy(this.origin).addScaledVector(this.direction,s0)}if(optionalPointOnSegment){optionalPointOnSegment.copy(_segCenter).addScaledVector(_segDir,s1)}return sqrDist}intersectSphere(sphere,target){_vector$a.subVectors(sphere.center,this.origin);const tca=_vector$a.dot(this.direction);const d2=_vector$a.dot(_vector$a)-tca*tca;const radius2=sphere.radius*sphere.radius;if(d2>radius2)return null;const thc=Math.sqrt(radius2-d2);const t0=tca-thc;const t1=tca+thc;if(t1<0)return null;if(t0<0)return this.at(t1,target);return this.at(t0,target)}intersectsSphere(sphere){if(sphere.radius<0)return false;return this.distanceSqToPoint(sphere.center)<=sphere.radius*sphere.radius}distanceToPlane(plane){const denominator=plane.normal.dot(this.direction);if(denominator===0){if(plane.distanceToPoint(this.origin)===0){return 0}return null}const t=-(this.origin.dot(plane.normal)+plane.constant)/denominator;return t>=0?t:null}intersectPlane(plane,target){const t=this.distanceToPlane(plane);if(t===null){return null}return this.at(t,target)}intersectsPlane(plane){const distToPoint=plane.distanceToPoint(this.origin);if(distToPoint===0){return true}const denominator=plane.normal.dot(this.direction);if(denominator*distToPoint<0){return true}return false}intersectBox(box,target){let tmin,tmax,tymin,tymax,tzmin,tzmax;const invdirx=1/this.direction.x,invdiry=1/this.direction.y,invdirz=1/this.direction.z;const origin=this.origin;if(invdirx>=0){tmin=(box.min.x-origin.x)*invdirx;tmax=(box.max.x-origin.x)*invdirx}else{tmin=(box.max.x-origin.x)*invdirx;tmax=(box.min.x-origin.x)*invdirx}if(invdiry>=0){tymin=(box.min.y-origin.y)*invdiry;tymax=(box.max.y-origin.y)*invdiry}else{tymin=(box.max.y-origin.y)*invdiry;tymax=(box.min.y-origin.y)*invdiry}if(tmin>tymax||tymin>tmax)return null;if(tymin>tmin||isNaN(tmin))tmin=tymin;if(tymax<tmax||isNaN(tmax))tmax=tymax;if(invdirz>=0){tzmin=(box.min.z-origin.z)*invdirz;tzmax=(box.max.z-origin.z)*invdirz}else{tzmin=(box.max.z-origin.z)*invdirz;tzmax=(box.min.z-origin.z)*invdirz}if(tmin>tzmax||tzmin>tmax)return null;if(tzmin>tmin||tmin!==tmin)tmin=tzmin;if(tzmax<tmax||tmax!==tmax)tmax=tzmax;if(tmax<0)return null;return this.at(tmin>=0?tmin:tmax,target)}intersectsBox(box){return this.intersectBox(box,_vector$a)!==null}intersectTriangle(a,b,c,backfaceCulling,target){_edge1.subVectors(b,a);_edge2.subVectors(c,a);_normal$1.crossVectors(_edge1,_edge2);let DdN=this.direction.dot(_normal$1);let sign;if(DdN>0){if(backfaceCulling)return null;sign=1}else if(DdN<0){sign=-1;DdN=-DdN}else{return null}_diff.subVectors(this.origin,a);const DdQxE2=sign*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(DdQxE2<0){return null}const DdE1xQ=sign*this.direction.dot(_edge1.cross(_diff));if(DdE1xQ<0){return null}if(DdQxE2+DdE1xQ>DdN){return null}const QdN=-sign*_diff.dot(_normal$1);if(QdN<0){return null}return this.at(QdN/DdN,target)}applyMatrix4(matrix4){this.origin.applyMatrix4(matrix4);this.direction.transformDirection(matrix4);return this}equals(ray){return ray.origin.equals(this.origin)&&ray.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Matrix4{constructor(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){Matrix4.prototype.isMatrix4=true;this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];if(n11!==undefined){this.set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44)}}set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){const te=this.elements;te[0]=n11;te[4]=n12;te[8]=n13;te[12]=n14;te[1]=n21;te[5]=n22;te[9]=n23;te[13]=n24;te[2]=n31;te[6]=n32;te[10]=n33;te[14]=n34;te[3]=n41;te[7]=n42;te[11]=n43;te[15]=n44;return this}identity(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this}clone(){return new Matrix4().fromArray(this.elements)}copy(m){const te=this.elements;const me=m.elements;te[0]=me[0];te[1]=me[1];te[2]=me[2];te[3]=me[3];te[4]=me[4];te[5]=me[5];te[6]=me[6];te[7]=me[7];te[8]=me[8];te[9]=me[9];te[10]=me[10];te[11]=me[11];te[12]=me[12];te[13]=me[13];te[14]=me[14];te[15]=me[15];return this}copyPosition(m){const te=this.elements,me=m.elements;te[12]=me[12];te[13]=me[13];te[14]=me[14];return this}setFromMatrix3(m){const me=m.elements;this.set(me[0],me[3],me[6],0,me[1],me[4],me[7],0,me[2],me[5],me[8],0,0,0,0,1);return this}extractBasis(xAxis,yAxis,zAxis){if(this.determinant()===0){xAxis.set(1,0,0);yAxis.set(0,1,0);zAxis.set(0,0,1);return this}xAxis.setFromMatrixColumn(this,0);yAxis.setFromMatrixColumn(this,1);zAxis.setFromMatrixColumn(this,2);return this}makeBasis(xAxis,yAxis,zAxis){this.set(xAxis.x,yAxis.x,zAxis.x,0,xAxis.y,yAxis.y,zAxis.y,0,xAxis.z,yAxis.z,zAxis.z,0,0,0,0,1);return this}extractRotation(m){if(m.determinant()===0){return this.identity()}const te=this.elements;const me=m.elements;const scaleX=1/_v1$5.setFromMatrixColumn(m,0).length();const scaleY=1/_v1$5.setFromMatrixColumn(m,1).length();const scaleZ=1/_v1$5.setFromMatrixColumn(m,2).length();te[0]=me[0]*scaleX;te[1]=me[1]*scaleX;te[2]=me[2]*scaleX;te[3]=0;te[4]=me[4]*scaleY;te[5]=me[5]*scaleY;te[6]=me[6]*scaleY;te[7]=0;te[8]=me[8]*scaleZ;te[9]=me[9]*scaleZ;te[10]=me[10]*scaleZ;te[11]=0;te[12]=0;te[13]=0;te[14]=0;te[15]=1;return this}makeRotationFromEuler(euler){const te=this.elements;const x=euler.x,y=euler.y,z=euler.z;const a=Math.cos(x),b=Math.sin(x);const c=Math.cos(y),d=Math.sin(y);const e=Math.cos(z),f=Math.sin(z);if(euler.order==="XYZ"){const ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e;te[4]=-c*f;te[8]=d;te[1]=af+be*d;te[5]=ae-bf*d;te[9]=-b*c;te[2]=bf-ae*d;te[6]=be+af*d;te[10]=a*c}else if(euler.order==="YXZ"){const ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce+df*b;te[4]=de*b-cf;te[8]=a*d;te[1]=a*f;te[5]=a*e;te[9]=-b;te[2]=cf*b-de;te[6]=df+ce*b;te[10]=a*c}else if(euler.order==="ZXY"){const ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce-df*b;te[4]=-a*f;te[8]=de+cf*b;te[1]=cf+de*b;te[5]=a*e;te[9]=df-ce*b;te[2]=-a*d;te[6]=b;te[10]=a*c}else if(euler.order==="ZYX"){const ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e;te[4]=be*d-af;te[8]=ae*d+bf;te[1]=c*f;te[5]=bf*d+ae;te[9]=af*d-be;te[2]=-d;te[6]=b*c;te[10]=a*c}else if(euler.order==="YZX"){const ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e;te[4]=bd-ac*f;te[8]=bc*f+ad;te[1]=f;te[5]=a*e;te[9]=-b*e;te[2]=-d*e;te[6]=ad*f+bc;te[10]=ac-bd*f}else if(euler.order==="XZY"){const ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e;te[4]=-f;te[8]=d*e;te[1]=ac*f+bd;te[5]=a*e;te[9]=ad*f-bc;te[2]=bc*f-ad;te[6]=b*e;te[10]=bd*f+ac}te[3]=0;te[7]=0;te[11]=0;te[12]=0;te[13]=0;te[14]=0;te[15]=1;return this}makeRotationFromQuaternion(q){return this.compose(_zero,q,_one)}lookAt(eye,target,up){const te=this.elements;_z.subVectors(eye,target);if(_z.lengthSq()===0){_z.z=1}_z.normalize();_x.crossVectors(up,_z);if(_x.lengthSq()===0){if(Math.abs(up.z)===1){_z.x+=0.0001}else{_z.z+=0.0001}_z.normalize();_x.crossVectors(up,_z)}_x.normalize();_y.crossVectors(_z,_x);te[0]=_x.x;te[4]=_y.x;te[8]=_z.x;te[1]=_x.y;te[5]=_y.y;te[9]=_z.y;te[2]=_x.z;te[6]=_y.z;te[10]=_z.z;return this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a,b){const ae=a.elements;const be=b.elements;const te=this.elements;const a11=ae[0],a12=ae[4],a13=ae[8],a14=ae[12];const a21=ae[1],a22=ae[5],a23=ae[9],a24=ae[13];const a31=ae[2],a32=ae[6],a33=ae[10],a34=ae[14];const a41=ae[3],a42=ae[7],a43=ae[11],a44=ae[15];const b11=be[0],b12=be[4],b13=be[8],b14=be[12];const b21=be[1],b22=be[5],b23=be[9],b24=be[13];const b31=be[2],b32=be[6],b33=be[10],b34=be[14];const b41=be[3],b42=be[7],b43=be[11],b44=be[15];te[0]=a11*b11+a12*b21+a13*b31+a14*b41;te[4]=a11*b12+a12*b22+a13*b32+a14*b42;te[8]=a11*b13+a12*b23+a13*b33+a14*b43;te[12]=a11*b14+a12*b24+a13*b34+a14*b44;te[1]=a21*b11+a22*b21+a23*b31+a24*b41;te[5]=a21*b12+a22*b22+a23*b32+a24*b42;te[9]=a21*b13+a22*b23+a23*b33+a24*b43;te[13]=a21*b14+a22*b24+a23*b34+a24*b44;te[2]=a31*b11+a32*b21+a33*b31+a34*b41;te[6]=a31*b12+a32*b22+a33*b32+a34*b42;te[10]=a31*b13+a32*b23+a33*b33+a34*b43;te[14]=a31*b14+a32*b24+a33*b34+a34*b44;te[3]=a41*b11+a42*b21+a43*b31+a44*b41;te[7]=a41*b12+a42*b22+a43*b32+a44*b42;te[11]=a41*b13+a42*b23+a43*b33+a44*b43;te[15]=a41*b14+a42*b24+a43*b34+a44*b44;return this}multiplyScalar(s){const te=this.elements;te[0]*=s;te[4]*=s;te[8]*=s;te[12]*=s;te[1]*=s;te[5]*=s;te[9]*=s;te[13]*=s;te[2]*=s;te[6]*=s;te[10]*=s;te[14]*=s;te[3]*=s;te[7]*=s;te[11]*=s;te[15]*=s;return this}determinant(){const te=this.elements;const n11=te[0],n12=te[4],n13=te[8],n14=te[12];const n21=te[1],n22=te[5],n23=te[9],n24=te[13];const n31=te[2],n32=te[6],n33=te[10],n34=te[14];const n41=te[3],n42=te[7],n43=te[11],n44=te[15];const t11=n23*n34-n24*n33;const t12=n22*n34-n24*n32;const t13=n22*n33-n23*n32;const t21=n21*n34-n24*n31;const t22=n21*n33-n23*n31;const t23=n21*n32-n22*n31;return n11*(n42*t11-n43*t12+n44*t13)-n12*(n41*t11-n43*t21+n44*t22)+n13*(n41*t12-n42*t21+n44*t23)-n14*(n41*t13-n42*t22+n43*t23)}transpose(){const te=this.elements;let tmp;tmp=te[1];te[1]=te[4];te[4]=tmp;tmp=te[2];te[2]=te[8];te[8]=tmp;tmp=te[6];te[6]=te[9];te[9]=tmp;tmp=te[3];te[3]=te[12];te[12]=tmp;tmp=te[7];te[7]=te[13];te[13]=tmp;tmp=te[11];te[11]=te[14];te[14]=tmp;return this}setPosition(x,y,z){const te=this.elements;if(x.isVector3){te[12]=x.x;te[13]=x.y;te[14]=x.z}else{te[12]=x;te[13]=y;te[14]=z}return this}invert(){const te=this.elements,n11=te[0],n21=te[1],n31=te[2],n41=te[3],n12=te[4],n22=te[5],n32=te[6],n42=te[7],n13=te[8],n23=te[9],n33=te[10],n43=te[11],n14=te[12],n24=te[13],n34=te[14],n44=te[15],t11=n23*n34*n42-n24*n33*n42+n24*n32*n43-n22*n34*n43-n23*n32*n44+n22*n33*n44,t12=n14*n33*n42-n13*n34*n42-n14*n32*n43+n12*n34*n43+n13*n32*n44-n12*n33*n44,t13=n13*n24*n42-n14*n23*n42+n14*n22*n43-n12*n24*n43-n13*n22*n44+n12*n23*n44,t14=n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34;const det=n11*t11+n21*t12+n31*t13+n41*t14;if(det===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const detInv=1/det;te[0]=t11*detInv;te[1]=(n24*n33*n41-n23*n34*n41-n24*n31*n43+n21*n34*n43+n23*n31*n44-n21*n33*n44)*detInv;te[2]=(n22*n34*n41-n24*n32*n41+n24*n31*n42-n21*n34*n42-n22*n31*n44+n21*n32*n44)*detInv;te[3]=(n23*n32*n41-n22*n33*n41-n23*n31*n42+n21*n33*n42+n22*n31*n43-n21*n32*n43)*detInv;te[4]=t12*detInv;te[5]=(n13*n34*n41-n14*n33*n41+n14*n31*n43-n11*n34*n43-n13*n31*n44+n11*n33*n44)*detInv;te[6]=(n14*n32*n41-n12*n34*n41-n14*n31*n42+n11*n34*n42+n12*n31*n44-n11*n32*n44)*detInv;te[7]=(n12*n33*n41-n13*n32*n41+n13*n31*n42-n11*n33*n42-n12*n31*n43+n11*n32*n43)*detInv;te[8]=t13*detInv;te[9]=(n14*n23*n41-n13*n24*n41-n14*n21*n43+n11*n24*n43+n13*n21*n44-n11*n23*n44)*detInv;te[10]=(n12*n24*n41-n14*n22*n41+n14*n21*n42-n11*n24*n42-n12*n21*n44+n11*n22*n44)*detInv;te[11]=(n13*n22*n41-n12*n23*n41-n13*n21*n42+n11*n23*n42+n12*n21*n43-n11*n22*n43)*detInv;te[12]=t14*detInv;te[13]=(n13*n24*n31-n14*n23*n31+n14*n21*n33-n11*n24*n33-n13*n21*n34+n11*n23*n34)*detInv;te[14]=(n14*n22*n31-n12*n24*n31-n14*n21*n32+n11*n24*n32+n12*n21*n34-n11*n22*n34)*detInv;te[15]=(n12*n23*n31-n13*n22*n31+n13*n21*n32-n11*n23*n32-n12*n21*n33+n11*n22*n33)*detInv;return this}scale(v){const te=this.elements;const x=v.x,y=v.y,z=v.z;te[0]*=x;te[4]*=y;te[8]*=z;te[1]*=x;te[5]*=y;te[9]*=z;te[2]*=x;te[6]*=y;te[10]*=z;te[3]*=x;te[7]*=y;te[11]*=z;return this}getMaxScaleOnAxis(){const te=this.elements;const scaleXSq=te[0]*te[0]+te[1]*te[1]+te[2]*te[2];const scaleYSq=te[4]*te[4]+te[5]*te[5]+te[6]*te[6];const scaleZSq=te[8]*te[8]+te[9]*te[9]+te[10]*te[10];return Math.sqrt(Math.max(scaleXSq,scaleYSq,scaleZSq))}makeTranslation(x,y,z){if(x.isVector3){this.set(1,0,0,x.x,0,1,0,x.y,0,0,1,x.z,0,0,0,1)}else{this.set(1,0,0,x,0,1,0,y,0,0,1,z,0,0,0,1)}return this}makeRotationX(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(1,0,0,0,0,c,-s,0,0,s,c,0,0,0,0,1);return this}makeRotationY(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(c,0,s,0,0,1,0,0,-s,0,c,0,0,0,0,1);return this}makeRotationZ(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(c,-s,0,0,s,c,0,0,0,0,1,0,0,0,0,1);return this}makeRotationAxis(axis,angle){const c=Math.cos(angle);const s=Math.sin(angle);const t=1-c;const x=axis.x,y=axis.y,z=axis.z;const tx=t*x,ty=t*y;this.set(tx*x+c,tx*y-s*z,tx*z+s*y,0,tx*y+s*z,ty*y+c,ty*z-s*x,0,tx*z-s*y,ty*z+s*x,t*z*z+c,0,0,0,0,1);return this}makeScale(x,y,z){this.set(x,0,0,0,0,y,0,0,0,0,z,0,0,0,0,1);return this}makeShear(xy,xz,yx,yz,zx,zy){this.set(1,yx,zx,0,xy,1,zy,0,xz,yz,1,0,0,0,0,1);return this}compose(position,quaternion,scale){const te=this.elements;const x=quaternion._x,y=quaternion._y,z=quaternion._z,w=quaternion._w;const x2=x+x,y2=y+y,z2=z+z;const xx=x*x2,xy=x*y2,xz=x*z2;const yy=y*y2,yz=y*z2,zz=z*z2;const wx=w*x2,wy=w*y2,wz=w*z2;const sx=scale.x,sy=scale.y,sz=scale.z;te[0]=(1-(yy+zz))*sx;te[1]=(xy+wz)*sx;te[2]=(xz-wy)*sx;te[3]=0;te[4]=(xy-wz)*sy;te[5]=(1-(xx+zz))*sy;te[6]=(yz+wx)*sy;te[7]=0;te[8]=(xz+wy)*sz;te[9]=(yz-wx)*sz;te[10]=(1-(xx+yy))*sz;te[11]=0;te[12]=position.x;te[13]=position.y;te[14]=position.z;te[15]=1;return this}decompose(position,quaternion,scale){const te=this.elements;position.x=te[12];position.y=te[13];position.z=te[14];if(this.determinant()===0){scale.set(1,1,1);quaternion.identity();return this}let sx=_v1$5.set(te[0],te[1],te[2]).length();const sy=_v1$5.set(te[4],te[5],te[6]).length();const sz=_v1$5.set(te[8],te[9],te[10]).length();const det=this.determinant();if(det<0)sx=-sx;_m1$4.copy(this);const invSX=1/sx;const invSY=1/sy;const invSZ=1/sz;_m1$4.elements[0]*=invSX;_m1$4.elements[1]*=invSX;_m1$4.elements[2]*=invSX;_m1$4.elements[4]*=invSY;_m1$4.elements[5]*=invSY;_m1$4.elements[6]*=invSY;_m1$4.elements[8]*=invSZ;_m1$4.elements[9]*=invSZ;_m1$4.elements[10]*=invSZ;quaternion.setFromRotationMatrix(_m1$4);scale.x=sx;scale.y=sy;scale.z=sz;return this}makePerspective(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const te=this.elements;const x=2*near/(right-left);const y=2*near/(top-bottom);const a=(right+left)/(right-left);const b=(top+bottom)/(top-bottom);let c,d;if(reversedDepth){c=near/(far-near);d=far*near/(far-near)}else{if(coordinateSystem===WebGLCoordinateSystem){c=-(far+near)/(far-near);d=-2*far*near/(far-near)}else if(coordinateSystem===WebGPUCoordinateSystem){c=-far/(far-near);d=-far*near/(far-near)}else{throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+coordinateSystem)}}te[0]=x;te[4]=0;te[8]=a;te[12]=0;te[1]=0;te[5]=y;te[9]=b;te[13]=0;te[2]=0;te[6]=0;te[10]=c;te[14]=d;te[3]=0;te[7]=0;te[11]=-1;te[15]=0;return this}makeOrthographic(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const te=this.elements;const x=2/(right-left);const y=2/(top-bottom);const a=-(right+left)/(right-left);const b=-(top+bottom)/(top-bottom);let c,d;if(reversedDepth){c=1/(far-near);d=far/(far-near)}else{if(coordinateSystem===WebGLCoordinateSystem){c=-2/(far-near);d=-(far+near)/(far-near)}else if(coordinateSystem===WebGPUCoordinateSystem){c=-1/(far-near);d=-near/(far-near)}else{throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+coordinateSystem)}}te[0]=x;te[4]=0;te[8]=0;te[12]=a;te[1]=0;te[5]=y;te[9]=0;te[13]=b;te[2]=0;te[6]=0;te[10]=c;te[14]=d;te[3]=0;te[7]=0;te[11]=0;te[15]=1;return this}equals(matrix){const te=this.elements;const me=matrix.elements;for(let i=0;i<16;i++){if(te[i]!==me[i])return false}return true}fromArray(array,offset=0){for(let i=0;i<16;i++){this.elements[i]=array[i+offset]}return this}toArray(array=[],offset=0){const te=this.elements;array[offset]=te[0];array[offset+1]=te[1];array[offset+2]=te[2];array[offset+3]=te[3];array[offset+4]=te[4];array[offset+5]=te[5];array[offset+6]=te[6];array[offset+7]=te[7];array[offset+8]=te[8];array[offset+9]=te[9];array[offset+10]=te[10];array[offset+11]=te[11];array[offset+12]=te[12];array[offset+13]=te[13];array[offset+14]=te[14];array[offset+15]=te[15];return array}}const _v1$5=new Vector3;const _m1$4=new Matrix4;const _zero=new Vector3(0,0,0);const _one=new Vector3(1,1,1);const _x=new Vector3;const _y=new Vector3;const _z=new Vector3;const _matrix$2=new Matrix4;const _quaternion$3=new Quaternion;class Euler{constructor(x=0,y=0,z=0,order=Euler.DEFAULT_ORDER){this.isEuler=true;this._x=x;this._y=y;this._z=z;this._order=order}get x(){return this._x}set x(value){this._x=value;this._onChangeCallback()}get y(){return this._y}set y(value){this._y=value;this._onChangeCallback()}get z(){return this._z}set z(value){this._z=value;this._onChangeCallback()}get order(){return this._order}set order(value){this._order=value;this._onChangeCallback()}set(x,y,z,order=this._order){this._x=x;this._y=y;this._z=z;this._order=order;this._onChangeCallback();return this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(euler){this._x=euler._x;this._y=euler._y;this._z=euler._z;this._order=euler._order;this._onChangeCallback();return this}setFromRotationMatrix(m,order=this._order,update=true){const te=m.elements;const m11=te[0],m12=te[4],m13=te[8];const m21=te[1],m22=te[5],m23=te[9];const m31=te[2],m32=te[6],m33=te[10];switch(order){case"XYZ":this._y=Math.asin(clamp(m13,-1,1));if(Math.abs(m13)<0.9999999){this._x=Math.atan2(-m23,m33);this._z=Math.atan2(-m12,m11)}else{this._x=Math.atan2(m32,m22);this._z=0}break;case"YXZ":this._x=Math.asin(-clamp(m23,-1,1));if(Math.abs(m23)<0.9999999){this._y=Math.atan2(m13,m33);this._z=Math.atan2(m21,m22)}else{this._y=Math.atan2(-m31,m11);this._z=0}break;case"ZXY":this._x=Math.asin(clamp(m32,-1,1));if(Math.abs(m32)<0.9999999){this._y=Math.atan2(-m31,m33);this._z=Math.atan2(-m12,m22)}else{this._y=0;this._z=Math.atan2(m21,m11)}break;case"ZYX":this._y=Math.asin(-clamp(m31,-1,1));if(Math.abs(m31)<0.9999999){this._x=Math.atan2(m32,m33);this._z=Math.atan2(m21,m11)}else{this._x=0;this._z=Math.atan2(-m12,m22)}break;case"YZX":this._z=Math.asin(clamp(m21,-1,1));if(Math.abs(m21)<0.9999999){this._x=Math.atan2(-m23,m22);this._y=Math.atan2(-m31,m11)}else{this._x=0;this._y=Math.atan2(m13,m33)}break;case"XZY":this._z=Math.asin(-clamp(m12,-1,1));if(Math.abs(m12)<0.9999999){this._x=Math.atan2(m32,m22);this._y=Math.atan2(m13,m11)}else{this._x=Math.atan2(-m23,m33);this._y=0}break;default:warn("Euler: .setFromRotationMatrix() encountered an unknown order: "+order);}this._order=order;if(update===true)this._onChangeCallback();return this}setFromQuaternion(q,order,update){_matrix$2.makeRotationFromQuaternion(q);return this.setFromRotationMatrix(_matrix$2,order,update)}setFromVector3(v,order=this._order){return this.set(v.x,v.y,v.z,order)}reorder(newOrder){_quaternion$3.setFromEuler(this);return this.setFromQuaternion(_quaternion$3,newOrder)}equals(euler){return euler._x===this._x&&euler._y===this._y&&euler._z===this._z&&euler._order===this._order}fromArray(array){this._x=array[0];this._y=array[1];this._z=array[2];if(array[3]!==undefined)this._order=array[3];this._onChangeCallback();return this}toArray(array=[],offset=0){array[offset]=this._x;array[offset+1]=this._y;array[offset+2]=this._z;array[offset+3]=this._order;return array}_onChange(callback){this._onChangeCallback=callback;return this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x;yield this._y;yield this._z;yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1|0}set(layer){this.mask=(1<<layer|0)>>>0}enable(layer){this.mask|=1<<layer|0}enableAll(){this.mask=4294967295|0}toggle(layer){this.mask^=1<<layer|0}disable(layer){this.mask&=~(1<<layer|0)}disableAll(){this.mask=0}test(layers){return(this.mask&layers.mask)!==0}isEnabled(layer){return(this.mask&(1<<layer|0))!==0}}let _object3DId=0;const _v1$4=new Vector3;const _q1=new Quaternion;const _m1$3=new Matrix4;const _target=new Vector3;const _position$3=new Vector3;const _scale$2=new Vector3;const _quaternion$2=new Quaternion;const _xAxis=new Vector3(1,0,0);const _yAxis=new Vector3(0,1,0);const _zAxis=new Vector3(0,0,1);const _addedEvent={type:"added"};const _removedEvent={type:"removed"};const _childaddedEvent={type:"childadded",child:null};const _childremovedEvent={type:"childremoved",child:null};class Object3D extends EventDispatcher{constructor(){super();this.isObject3D=true;Object.defineProperty(this,"id",{value:_object3DId++});this.uuid=generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=Object3D.DEFAULT_UP.clone();const position=new Vector3;const rotation=new Euler;const quaternion=new Quaternion;const scale=new Vector3(1,1,1);function onRotationChange(){quaternion.setFromEuler(rotation,false)}function onQuaternionChange(){rotation.setFromQuaternion(quaternion,undefined,false)}rotation._onChange(onRotationChange);quaternion._onChange(onQuaternionChange);Object.defineProperties(this,{position:{configurable:true,enumerable:true,value:position},rotation:{configurable:true,enumerable:true,value:rotation},quaternion:{configurable:true,enumerable:true,value:quaternion},scale:{configurable:true,enumerable:true,value:scale},modelViewMatrix:{value:new Matrix4},normalMatrix:{value:new Matrix3}});this.matrix=new Matrix4;this.matrixWorld=new Matrix4;this.matrixAutoUpdate=Object3D.DEFAULT_MATRIX_AUTO_UPDATE;this.matrixWorldAutoUpdate=Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE;this.matrixWorldNeedsUpdate=false;this.layers=new Layers;this.visible=true;this.castShadow=false;this.receiveShadow=false;this.frustumCulled=true;this.renderOrder=0;this.animations=[];this.customDepthMaterial=undefined;this.customDistanceMaterial=undefined;this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(matrix){if(this.matrixAutoUpdate)this.updateMatrix();this.matrix.premultiply(matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(q){this.quaternion.premultiply(q);return this}setRotationFromAxisAngle(axis,angle){this.quaternion.setFromAxisAngle(axis,angle)}setRotationFromEuler(euler){this.quaternion.setFromEuler(euler,true)}setRotationFromMatrix(m){this.quaternion.setFromRotationMatrix(m)}setRotationFromQuaternion(q){this.quaternion.copy(q)}rotateOnAxis(axis,angle){_q1.setFromAxisAngle(axis,angle);this.quaternion.multiply(_q1);return this}rotateOnWorldAxis(axis,angle){_q1.setFromAxisAngle(axis,angle);this.quaternion.premultiply(_q1);return this}rotateX(angle){return this.rotateOnAxis(_xAxis,angle)}rotateY(angle){return this.rotateOnAxis(_yAxis,angle)}rotateZ(angle){return this.rotateOnAxis(_zAxis,angle)}translateOnAxis(axis,distance){_v1$4.copy(axis).applyQuaternion(this.quaternion);this.position.add(_v1$4.multiplyScalar(distance));return this}translateX(distance){return this.translateOnAxis(_xAxis,distance)}translateY(distance){return this.translateOnAxis(_yAxis,distance)}translateZ(distance){return this.translateOnAxis(_zAxis,distance)}localToWorld(vector){this.updateWorldMatrix(true,false);return vector.applyMatrix4(this.matrixWorld)}worldToLocal(vector){this.updateWorldMatrix(true,false);return vector.applyMatrix4(_m1$3.copy(this.matrixWorld).invert())}lookAt(x,y,z){if(x.isVector3){_target.copy(x)}else{_target.set(x,y,z)}const parent=this.parent;this.updateWorldMatrix(true,false);_position$3.setFromMatrixPosition(this.matrixWorld);if(this.isCamera||this.isLight){_m1$3.lookAt(_position$3,_target,this.up)}else{_m1$3.lookAt(_target,_position$3,this.up)}this.quaternion.setFromRotationMatrix(_m1$3);if(parent){_m1$3.extractRotation(parent.matrixWorld);_q1.setFromRotationMatrix(_m1$3);this.quaternion.premultiply(_q1.invert())}}add(object){if(arguments.length>1){for(let i=0;i<arguments.length;i++){this.add(arguments[i])}return this}if(object===this){error("Object3D.add: object can't be added as a child of itself.",object);return this}if(object&&object.isObject3D){object.removeFromParent();object.parent=this;this.children.push(object);object.dispatchEvent(_addedEvent);_childaddedEvent.child=object;this.dispatchEvent(_childaddedEvent);_childaddedEvent.child=null}else{error("Object3D.add: object not an instance of THREE.Object3D.",object)}return this}remove(object){if(arguments.length>1){for(let i=0;i<arguments.length;i++){this.remove(arguments[i])}return this}const index=this.children.indexOf(object);if(index!==-1){object.parent=null;this.children.splice(index,1);object.dispatchEvent(_removedEvent);_childremovedEvent.child=object;this.dispatchEvent(_childremovedEvent);_childremovedEvent.child=null}return this}removeFromParent(){const parent=this.parent;if(parent!==null){parent.remove(this)}return this}clear(){return this.remove(...this.children)}attach(object){this.updateWorldMatrix(true,false);_m1$3.copy(this.matrixWorld).invert();if(object.parent!==null){object.parent.updateWorldMatrix(true,false);_m1$3.multiply(object.parent.matrixWorld)}object.applyMatrix4(_m1$3);object.removeFromParent();object.parent=this;this.children.push(object);object.updateWorldMatrix(false,true);object.dispatchEvent(_addedEvent);_childaddedEvent.child=object;this.dispatchEvent(_childaddedEvent);_childaddedEvent.child=null;return this}getObjectById(id){return this.getObjectByProperty("id",id)}getObjectByName(name){return this.getObjectByProperty("name",name)}getObjectByProperty(name,value){if(this[name]===value)return this;for(let i=0,l=this.children.length;i<l;i++){const child=this.children[i];const object=child.getObjectByProperty(name,value);if(object!==undefined){return object}}return undefined}getObjectsByProperty(name,value,result=[]){if(this[name]===value)result.push(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].getObjectsByProperty(name,value,result)}return result}getWorldPosition(target){this.updateWorldMatrix(true,false);return target.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(target){this.updateWorldMatrix(true,false);this.matrixWorld.decompose(_position$3,target,_scale$2);return target}getWorldScale(target){this.updateWorldMatrix(true,false);this.matrixWorld.decompose(_position$3,_quaternion$2,target);return target}getWorldDirection(target){this.updateWorldMatrix(true,false);const e=this.matrixWorld.elements;return target.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(callback){callback(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].traverse(callback)}}traverseVisible(callback){if(this.visible===false)return;callback(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].traverseVisible(callback)}}traverseAncestors(callback){const parent=this.parent;if(parent!==null){callback(parent);parent.traverseAncestors(callback)}}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=true}updateMatrixWorld(force){if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldNeedsUpdate||force){if(this.matrixWorldAutoUpdate===true){if(this.parent===null){this.matrixWorld.copy(this.matrix)}else{this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)}}this.matrixWorldNeedsUpdate=false;force=true}const children=this.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.updateMatrixWorld(force)}}updateWorldMatrix(updateParents,updateChildren){const parent=this.parent;if(updateParents===true&&parent!==null){parent.updateWorldMatrix(true,false)}if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldAutoUpdate===true){if(this.parent===null){this.matrixWorld.copy(this.matrix)}else{this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)}}if(updateChildren===true){const children=this.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.updateWorldMatrix(false,true)}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";const output={};if(isRootObject){meta={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}};output.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"}}const object={};object.uuid=this.uuid;object.type=this.type;if(this.name!=="")object.name=this.name;if(this.castShadow===true)object.castShadow=true;if(this.receiveShadow===true)object.receiveShadow=true;if(this.visible===false)object.visible=false;if(this.frustumCulled===false)object.frustumCulled=false;if(this.renderOrder!==0)object.renderOrder=this.renderOrder;if(Object.keys(this.userData).length>0)object.userData=this.userData;object.layers=this.layers.mask;object.matrix=this.matrix.toArray();object.up=this.up.toArray();if(this.matrixAutoUpdate===false)object.matrixAutoUpdate=false;if(this.isInstancedMesh){object.type="InstancedMesh";object.count=this.count;object.instanceMatrix=this.instanceMatrix.toJSON();if(this.instanceColor!==null)object.instanceColor=this.instanceColor.toJSON()}if(this.isBatchedMesh){object.type="BatchedMesh";object.perObjectFrustumCulled=this.perObjectFrustumCulled;object.sortObjects=this.sortObjects;object.drawRanges=this._drawRanges;object.reservedRanges=this._reservedRanges;object.geometryInfo=this._geometryInfo.map(info=>({...info,boundingBox:info.boundingBox?info.boundingBox.toJSON():undefined,boundingSphere:info.boundingSphere?info.boundingSphere.toJSON():undefined}));object.instanceInfo=this._instanceInfo.map(info=>({...info}));object.availableInstanceIds=this._availableInstanceIds.slice();object.availableGeometryIds=this._availableGeometryIds.slice();object.nextIndexStart=this._nextIndexStart;object.nextVertexStart=this._nextVertexStart;object.geometryCount=this._geometryCount;object.maxInstanceCount=this._maxInstanceCount;object.maxVertexCount=this._maxVertexCount;object.maxIndexCount=this._maxIndexCount;object.geometryInitialized=this._geometryInitialized;object.matricesTexture=this._matricesTexture.toJSON(meta);object.indirectTexture=this._indirectTexture.toJSON(meta);if(this._colorsTexture!==null){object.colorsTexture=this._colorsTexture.toJSON(meta)}if(this.boundingSphere!==null){object.boundingSphere=this.boundingSphere.toJSON()}if(this.boundingBox!==null){object.boundingBox=this.boundingBox.toJSON()}}function serialize(library,element){if(library[element.uuid]===undefined){library[element.uuid]=element.toJSON(meta)}return element.uuid}if(this.isScene){if(this.background){if(this.background.isColor){object.background=this.background.toJSON()}else if(this.background.isTexture){object.background=this.background.toJSON(meta).uuid}}if(this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==true){object.environment=this.environment.toJSON(meta).uuid}}else if(this.isMesh||this.isLine||this.isPoints){object.geometry=serialize(meta.geometries,this.geometry);const parameters=this.geometry.parameters;if(parameters!==undefined&&parameters.shapes!==undefined){const shapes=parameters.shapes;if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];serialize(meta.shapes,shape)}}else{serialize(meta.shapes,shapes)}}}if(this.isSkinnedMesh){object.bindMode=this.bindMode;object.bindMatrix=this.bindMatrix.toArray();if(this.skeleton!==undefined){serialize(meta.skeletons,this.skeleton);object.skeleton=this.skeleton.uuid}}if(this.material!==undefined){if(Array.isArray(this.material)){const uuids=[];for(let i=0,l=this.material.length;i<l;i++){uuids.push(serialize(meta.materials,this.material[i]))}object.material=uuids}else{object.material=serialize(meta.materials,this.material)}}if(this.children.length>0){object.children=[];for(let i=0;i<this.children.length;i++){object.children.push(this.children[i].toJSON(meta).object)}}if(this.animations.length>0){object.animations=[];for(let i=0;i<this.animations.length;i++){const animation=this.animations[i];object.animations.push(serialize(meta.animations,animation))}}if(isRootObject){const geometries=extractFromCache(meta.geometries);const materials=extractFromCache(meta.materials);const textures=extractFromCache(meta.textures);const images=extractFromCache(meta.images);const shapes=extractFromCache(meta.shapes);const skeletons=extractFromCache(meta.skeletons);const animations=extractFromCache(meta.animations);const nodes=extractFromCache(meta.nodes);if(geometries.length>0)output.geometries=geometries;if(materials.length>0)output.materials=materials;if(textures.length>0)output.textures=textures;if(images.length>0)output.images=images;if(shapes.length>0)output.shapes=shapes;if(skeletons.length>0)output.skeletons=skeletons;if(animations.length>0)output.animations=animations;if(nodes.length>0)output.nodes=nodes}output.object=object;return output;function extractFromCache(cache){const values=[];for(const key in cache){const data=cache[key];delete data.metadata;values.push(data)}return values}}clone(recursive){return new this.constructor().copy(this,recursive)}copy(source,recursive=true){this.name=source.name;this.up.copy(source.up);this.position.copy(source.position);this.rotation.order=source.rotation.order;this.quaternion.copy(source.quaternion);this.scale.copy(source.scale);this.matrix.copy(source.matrix);this.matrixWorld.copy(source.matrixWorld);this.matrixAutoUpdate=source.matrixAutoUpdate;this.matrixWorldAutoUpdate=source.matrixWorldAutoUpdate;this.matrixWorldNeedsUpdate=source.matrixWorldNeedsUpdate;this.layers.mask=source.layers.mask;this.visible=source.visible;this.castShadow=source.castShadow;this.receiveShadow=source.receiveShadow;this.frustumCulled=source.frustumCulled;this.renderOrder=source.renderOrder;this.animations=source.animations.slice();this.userData=JSON.parse(JSON.stringify(source.userData));if(recursive===true){for(let i=0;i<source.children.length;i++){const child=source.children[i];this.add(child.clone())}}return this}}Object3D.DEFAULT_UP=new Vector3(0,1,0);Object3D.DEFAULT_MATRIX_AUTO_UPDATE=true;Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=true;const _v0$2=new Vector3;const _v1$3=new Vector3;const _v2$2=new Vector3;const _v3$2=new Vector3;const _vab=new Vector3;const _vac=new Vector3;const _vbc=new Vector3;const _vap=new Vector3;const _vbp=new Vector3;const _vcp=new Vector3;const _v40=new Vector4;const _v41=new Vector4;const _v42=new Vector4;class Triangle{constructor(a=new Vector3,b=new Vector3,c=new Vector3){this.a=a;this.b=b;this.c=c}static getNormal(a,b,c,target){target.subVectors(c,b);_v0$2.subVectors(a,b);target.cross(_v0$2);const targetLengthSq=target.lengthSq();if(targetLengthSq>0){return target.multiplyScalar(1/Math.sqrt(targetLengthSq))}return target.set(0,0,0)}static getBarycoord(point,a,b,c,target){_v0$2.subVectors(c,a);_v1$3.subVectors(b,a);_v2$2.subVectors(point,a);const dot00=_v0$2.dot(_v0$2);const dot01=_v0$2.dot(_v1$3);const dot02=_v0$2.dot(_v2$2);const dot11=_v1$3.dot(_v1$3);const dot12=_v1$3.dot(_v2$2);const denom=dot00*dot11-dot01*dot01;if(denom===0){target.set(0,0,0);return null}const invDenom=1/denom;const u=(dot11*dot02-dot01*dot12)*invDenom;const v=(dot00*dot12-dot01*dot02)*invDenom;return target.set(1-u-v,v,u)}static containsPoint(point,a,b,c){if(this.getBarycoord(point,a,b,c,_v3$2)===null){return false}return _v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(point,p1,p2,p3,v1,v2,v3,target){if(this.getBarycoord(point,p1,p2,p3,_v3$2)===null){target.x=0;target.y=0;if("z"in target)target.z=0;if("w"in target)target.w=0;return null}target.setScalar(0);target.addScaledVector(v1,_v3$2.x);target.addScaledVector(v2,_v3$2.y);target.addScaledVector(v3,_v3$2.z);return target}static getInterpolatedAttribute(attr,i1,i2,i3,barycoord,target){_v40.setScalar(0);_v41.setScalar(0);_v42.setScalar(0);_v40.fromBufferAttribute(attr,i1);_v41.fromBufferAttribute(attr,i2);_v42.fromBufferAttribute(attr,i3);target.setScalar(0);target.addScaledVector(_v40,barycoord.x);target.addScaledVector(_v41,barycoord.y);target.addScaledVector(_v42,barycoord.z);return target}static isFrontFacing(a,b,c,direction){_v0$2.subVectors(c,b);_v1$3.subVectors(a,b);return _v0$2.cross(_v1$3).dot(direction)<0?true:false}set(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this}setFromPointsAndIndices(points,i0,i1,i2){this.a.copy(points[i0]);this.b.copy(points[i1]);this.c.copy(points[i2]);return this}setFromAttributeAndIndices(attribute,i0,i1,i2){this.a.fromBufferAttribute(attribute,i0);this.b.fromBufferAttribute(attribute,i1);this.c.fromBufferAttribute(attribute,i2);return this}clone(){return new this.constructor().copy(this)}copy(triangle){this.a.copy(triangle.a);this.b.copy(triangle.b);this.c.copy(triangle.c);return this}getArea(){_v0$2.subVectors(this.c,this.b);_v1$3.subVectors(this.a,this.b);return _v0$2.cross(_v1$3).length()*0.5}getMidpoint(target){return target.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(target){return Triangle.getNormal(this.a,this.b,this.c,target)}getPlane(target){return target.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(point,target){return Triangle.getBarycoord(point,this.a,this.b,this.c,target)}getInterpolation(point,v1,v2,v3,target){return Triangle.getInterpolation(point,this.a,this.b,this.c,v1,v2,v3,target)}containsPoint(point){return Triangle.containsPoint(point,this.a,this.b,this.c)}isFrontFacing(direction){return Triangle.isFrontFacing(this.a,this.b,this.c,direction)}intersectsBox(box){return box.intersectsTriangle(this)}closestPointToPoint(p,target){const a=this.a,b=this.b,c=this.c;let v,w;_vab.subVectors(b,a);_vac.subVectors(c,a);_vap.subVectors(p,a);const d1=_vab.dot(_vap);const d2=_vac.dot(_vap);if(d1<=0&&d2<=0){return target.copy(a)}_vbp.subVectors(p,b);const d3=_vab.dot(_vbp);const d4=_vac.dot(_vbp);if(d3>=0&&d4<=d3){return target.copy(b)}const vc=d1*d4-d3*d2;if(vc<=0&&d1>=0&&d3<=0){v=d1/(d1-d3);return target.copy(a).addScaledVector(_vab,v)}_vcp.subVectors(p,c);const d5=_vab.dot(_vcp);const d6=_vac.dot(_vcp);if(d6>=0&&d5<=d6){return target.copy(c)}const vb=d5*d2-d1*d6;if(vb<=0&&d2>=0&&d6<=0){w=d2/(d2-d6);return target.copy(a).addScaledVector(_vac,w)}const va=d3*d6-d5*d4;if(va<=0&&d4-d3>=0&&d5-d6>=0){_vbc.subVectors(c,b);w=(d4-d3)/(d4-d3+(d5-d6));return target.copy(b).addScaledVector(_vbc,w)}const denom=1/(va+vb+vc);v=vb*denom;w=vc*denom;return target.copy(a).addScaledVector(_vab,v).addScaledVector(_vac,w)}equals(triangle){return triangle.a.equals(this.a)&&triangle.b.equals(this.b)&&triangle.c.equals(this.c)}}const _colorKeywords={"aliceblue":15792383,"antiquewhite":16444375,"aqua":65535,"aquamarine":8388564,"azure":15794175,"beige":16119260,"bisque":16770244,"black":0,"blanchedalmond":16772045,"blue":255,"blueviolet":9055202,"brown":10824234,"burlywood":14596231,"cadetblue":6266528,"chartreuse":8388352,"chocolate":13789470,"coral":16744272,"cornflowerblue":6591981,"cornsilk":16775388,"crimson":14423100,"cyan":65535,"darkblue":139,"darkcyan":35723,"darkgoldenrod":12092939,"darkgray":11119017,"darkgreen":25600,"darkgrey":11119017,"darkkhaki":12433259,"darkmagenta":9109643,"darkolivegreen":5597999,"darkorange":16747520,"darkorchid":10040012,"darkred":9109504,"darksalmon":15308410,"darkseagreen":9419919,"darkslateblue":4734347,"darkslategray":3100495,"darkslategrey":3100495,"darkturquoise":52945,"darkviolet":9699539,"deeppink":16716947,"deepskyblue":49151,"dimgray":6908265,"dimgrey":6908265,"dodgerblue":2003199,"firebrick":11674146,"floralwhite":16775920,"forestgreen":2263842,"fuchsia":16711935,"gainsboro":14474460,"ghostwhite":16316671,"gold":16766720,"goldenrod":14329120,"gray":8421504,"green":32768,"greenyellow":11403055,"grey":8421504,"honeydew":15794160,"hotpink":16738740,"indianred":13458524,"indigo":4915330,"ivory":16777200,"khaki":15787660,"lavender":15132410,"lavenderblush":16773365,"lawngreen":8190976,"lemonchiffon":16775885,"lightblue":11393254,"lightcoral":15761536,"lightcyan":14745599,"lightgoldenrodyellow":16448210,"lightgray":13882323,"lightgreen":9498256,"lightgrey":13882323,"lightpink":16758465,"lightsalmon":16752762,"lightseagreen":2142890,"lightskyblue":8900346,"lightslategray":7833753,"lightslategrey":7833753,"lightsteelblue":11584734,"lightyellow":16777184,"lime":65280,"limegreen":3329330,"linen":16445670,"magenta":16711935,"maroon":8388608,"mediumaquamarine":6737322,"mediumblue":205,"mediumorchid":12211667,"mediumpurple":9662683,"mediumseagreen":3978097,"mediumslateblue":8087790,"mediumspringgreen":64154,"mediumturquoise":4772300,"mediumvioletred":13047173,"midnightblue":1644912,"mintcream":16121850,"mistyrose":16770273,"moccasin":16770229,"navajowhite":16768685,"navy":128,"oldlace":16643558,"olive":8421376,"olivedrab":7048739,"orange":16753920,"orangered":16729344,"orchid":14315734,"palegoldenrod":15657130,"palegreen":10025880,"paleturquoise":11529966,"palevioletred":14381203,"papayawhip":16773077,"peachpuff":16767673,"peru":13468991,"pink":16761035,"plum":14524637,"powderblue":11591910,"purple":8388736,"rebeccapurple":6697881,"red":16711680,"rosybrown":12357519,"royalblue":4286945,"saddlebrown":9127187,"salmon":16416882,"sandybrown":16032864,"seagreen":3050327,"seashell":16774638,"sienna":10506797,"silver":12632256,"skyblue":8900331,"slateblue":6970061,"slategray":7372944,"slategrey":7372944,"snow":16775930,"springgreen":65407,"steelblue":4620980,"tan":13808780,"teal":32896,"thistle":14204888,"tomato":16737095,"turquoise":4251856,"violet":15631086,"wheat":16113331,"white":16777215,"whitesmoke":16119285,"yellow":16776960,"yellowgreen":10145074};const _hslA={h:0,s:0,l:0};const _hslB={h:0,s:0,l:0};function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*6*(2/3-t);return p}class Color{constructor(r,g,b){this.isColor=true;this.r=1;this.g=1;this.b=1;return this.set(r,g,b)}set(r,g,b){if(g===undefined&&b===undefined){const value=r;if(value&&value.isColor){this.copy(value)}else if(typeof value==="number"){this.setHex(value)}else if(typeof value==="string"){this.setStyle(value)}}else{this.setRGB(r,g,b)}return this}setScalar(scalar){this.r=scalar;this.g=scalar;this.b=scalar;return this}setHex(hex,colorSpace=SRGBColorSpace){hex=Math.floor(hex);this.r=(hex>>16&255)/255;this.g=(hex>>8&255)/255;this.b=(hex&255)/255;ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setRGB(r,g,b,colorSpace=ColorManagement.workingColorSpace){this.r=r;this.g=g;this.b=b;ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setHSL(h,s,l,colorSpace=ColorManagement.workingColorSpace){h=euclideanModulo(h,1);s=clamp(s,0,1);l=clamp(l,0,1);if(s===0){this.r=this.g=this.b=l}else{const p=l<=0.5?l*(1+s):l+s-l*s;const q=2*l-p;this.r=hue2rgb(q,p,h+1/3);this.g=hue2rgb(q,p,h);this.b=hue2rgb(q,p,h-1/3)}ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setStyle(style,colorSpace=SRGBColorSpace){function handleAlpha(string){if(string===undefined)return;if(parseFloat(string)<1){warn("Color: Alpha component of "+style+" will be ignored.")}}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(style)){let color;const name=m[1];const components=m[2];switch(name){case"rgb":case"rgba":if(color=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setRGB(Math.min(255,parseInt(color[1],10))/255,Math.min(255,parseInt(color[2],10))/255,Math.min(255,parseInt(color[3],10))/255,colorSpace)}if(color=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setRGB(Math.min(100,parseInt(color[1],10))/100,Math.min(100,parseInt(color[2],10))/100,Math.min(100,parseInt(color[3],10))/100,colorSpace)}break;case"hsl":case"hsla":if(color=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setHSL(parseFloat(color[1])/360,parseFloat(color[2])/100,parseFloat(color[3])/100,colorSpace)}break;default:warn("Color: Unknown color model "+style);}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(style)){const hex=m[1];const size=hex.length;if(size===3){return this.setRGB(parseInt(hex.charAt(0),16)/15,parseInt(hex.charAt(1),16)/15,parseInt(hex.charAt(2),16)/15,colorSpace)}else if(size===6){return this.setHex(parseInt(hex,16),colorSpace)}else{warn("Color: Invalid hex color "+style)}}else if(style&&style.length>0){return this.setColorName(style,colorSpace)}return this}setColorName(style,colorSpace=SRGBColorSpace){const hex=_colorKeywords[style.toLowerCase()];if(hex!==undefined){this.setHex(hex,colorSpace)}else{warn("Color: Unknown color "+style)}return this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(color){this.r=color.r;this.g=color.g;this.b=color.b;return this}copySRGBToLinear(color){this.r=SRGBToLinear(color.r);this.g=SRGBToLinear(color.g);this.b=SRGBToLinear(color.b);return this}copyLinearToSRGB(color){this.r=LinearToSRGB(color.r);this.g=LinearToSRGB(color.g);this.b=LinearToSRGB(color.b);return this}convertSRGBToLinear(){this.copySRGBToLinear(this);return this}convertLinearToSRGB(){this.copyLinearToSRGB(this);return this}getHex(colorSpace=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);return Math.round(clamp(_color.r*255,0,255))*65536+Math.round(clamp(_color.g*255,0,255))*256+Math.round(clamp(_color.b*255,0,255))}getHexString(colorSpace=SRGBColorSpace){return("000000"+this.getHex(colorSpace).toString(16)).slice(-6)}getHSL(target,colorSpace=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);const r=_color.r,g=_color.g,b=_color.b;const max=Math.max(r,g,b);const min=Math.min(r,g,b);let hue,saturation;const lightness=(min+max)/2;if(min===max){hue=0;saturation=0}else{const delta=max-min;saturation=lightness<=0.5?delta/(max+min):delta/(2-max-min);switch(max){case r:hue=(g-b)/delta+(g<b?6:0);break;case g:hue=(b-r)/delta+2;break;case b:hue=(r-g)/delta+4;break;}hue/=6}target.h=hue;target.s=saturation;target.l=lightness;return target}getRGB(target,colorSpace=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);target.r=_color.r;target.g=_color.g;target.b=_color.b;return target}getStyle(colorSpace=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);const r=_color.r,g=_color.g,b=_color.b;if(colorSpace!==SRGBColorSpace){return`color(${colorSpace} ${r.toFixed(3)} ${g.toFixed(3)} ${b.toFixed(3)})`}return`rgb(${Math.round(r*255)},${Math.round(g*255)},${Math.round(b*255)})`}offsetHSL(h,s,l){this.getHSL(_hslA);return this.setHSL(_hslA.h+h,_hslA.s+s,_hslA.l+l)}add(color){this.r+=color.r;this.g+=color.g;this.b+=color.b;return this}addColors(color1,color2){this.r=color1.r+color2.r;this.g=color1.g+color2.g;this.b=color1.b+color2.b;return this}addScalar(s){this.r+=s;this.g+=s;this.b+=s;return this}sub(color){this.r=Math.max(0,this.r-color.r);this.g=Math.max(0,this.g-color.g);this.b=Math.max(0,this.b-color.b);return this}multiply(color){this.r*=color.r;this.g*=color.g;this.b*=color.b;return this}multiplyScalar(s){this.r*=s;this.g*=s;this.b*=s;return this}lerp(color,alpha){this.r+=(color.r-this.r)*alpha;this.g+=(color.g-this.g)*alpha;this.b+=(color.b-this.b)*alpha;return this}lerpColors(color1,color2,alpha){this.r=color1.r+(color2.r-color1.r)*alpha;this.g=color1.g+(color2.g-color1.g)*alpha;this.b=color1.b+(color2.b-color1.b)*alpha;return this}lerpHSL(color,alpha){this.getHSL(_hslA);color.getHSL(_hslB);const h=lerp(_hslA.h,_hslB.h,alpha);const s=lerp(_hslA.s,_hslB.s,alpha);const l=lerp(_hslA.l,_hslB.l,alpha);this.setHSL(h,s,l);return this}setFromVector3(v){this.r=v.x;this.g=v.y;this.b=v.z;return this}applyMatrix3(m){const r=this.r,g=this.g,b=this.b;const e=m.elements;this.r=e[0]*r+e[3]*g+e[6]*b;this.g=e[1]*r+e[4]*g+e[7]*b;this.b=e[2]*r+e[5]*g+e[8]*b;return this}equals(c){return c.r===this.r&&c.g===this.g&&c.b===this.b}fromArray(array,offset=0){this.r=array[offset];this.g=array[offset+1];this.b=array[offset+2];return this}toArray(array=[],offset=0){array[offset]=this.r;array[offset+1]=this.g;array[offset+2]=this.b;return array}fromBufferAttribute(attribute,index){this.r=attribute.getX(index);this.g=attribute.getY(index);this.b=attribute.getZ(index);return this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r;yield this.g;yield this.b}}const _color=new Color;Color.NAMES=_colorKeywords;let _materialId=0;class Material extends EventDispatcher{constructor(){super();this.isMaterial=true;Object.defineProperty(this,"id",{value:_materialId++});this.uuid=generateUUID();this.name="";this.type="Material";this.blending=NormalBlending;this.side=FrontSide;this.vertexColors=false;this.opacity=1;this.transparent=false;this.alphaHash=false;this.blendSrc=SrcAlphaFactor;this.blendDst=OneMinusSrcAlphaFactor;this.blendEquation=AddEquation;this.blendSrcAlpha=null;this.blendDstAlpha=null;this.blendEquationAlpha=null;this.blendColor=new Color(0,0,0);this.blendAlpha=0;this.depthFunc=LessEqualDepth;this.depthTest=true;this.depthWrite=true;this.stencilWriteMask=255;this.stencilFunc=AlwaysStencilFunc;this.stencilRef=0;this.stencilFuncMask=255;this.stencilFail=KeepStencilOp;this.stencilZFail=KeepStencilOp;this.stencilZPass=KeepStencilOp;this.stencilWrite=false;this.clippingPlanes=null;this.clipIntersection=false;this.clipShadows=false;this.shadowSide=null;this.colorWrite=true;this.precision=null;this.polygonOffset=false;this.polygonOffsetFactor=0;this.polygonOffsetUnits=0;this.dithering=false;this.alphaToCoverage=false;this.premultipliedAlpha=false;this.forceSinglePass=false;this.allowOverride=true;this.visible=true;this.toneMapped=true;this.userData={};this.version=0;this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(value){if(this._alphaTest>0!==value>0){this.version++}this._alphaTest=value}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(values){if(values===undefined)return;for(const key in values){const newValue=values[key];if(newValue===undefined){warn(`Material: parameter '${key}' has value of undefined.`);continue}const currentValue=this[key];if(currentValue===undefined){warn(`Material: '${key}' is not a property of THREE.${this.type}.`);continue}if(currentValue&&currentValue.isColor){currentValue.set(newValue)}else if(currentValue&&currentValue.isVector3&&newValue&&newValue.isVector3){currentValue.copy(newValue)}else{this[key]=newValue}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(isRootObject){meta={textures:{},images:{}}}const data={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(this.color&&this.color.isColor)data.color=this.color.getHex();if(this.roughness!==undefined)data.roughness=this.roughness;if(this.metalness!==undefined)data.metalness=this.metalness;if(this.sheen!==undefined)data.sheen=this.sheen;if(this.sheenColor&&this.sheenColor.isColor)data.sheenColor=this.sheenColor.getHex();if(this.sheenRoughness!==undefined)data.sheenRoughness=this.sheenRoughness;if(this.emissive&&this.emissive.isColor)data.emissive=this.emissive.getHex();if(this.emissiveIntensity!==undefined&&this.emissiveIntensity!==1)data.emissiveIntensity=this.emissiveIntensity;if(this.specular&&this.specular.isColor)data.specular=this.specular.getHex();if(this.specularIntensity!==undefined)data.specularIntensity=this.specularIntensity;if(this.specularColor&&this.specularColor.isColor)data.specularColor=this.specularColor.getHex();if(this.shininess!==undefined)data.shininess=this.shininess;if(this.clearcoat!==undefined)data.clearcoat=this.clearcoat;if(this.clearcoatRoughness!==undefined)data.clearcoatRoughness=this.clearcoatRoughness;if(this.clearcoatMap&&this.clearcoatMap.isTexture){data.clearcoatMap=this.clearcoatMap.toJSON(meta).uuid}if(this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture){data.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(meta).uuid}if(this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture){data.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(meta).uuid;data.clearcoatNormalScale=this.clearcoatNormalScale.toArray()}if(this.sheenColorMap&&this.sheenColorMap.isTexture){data.sheenColorMap=this.sheenColorMap.toJSON(meta).uuid}if(this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture){data.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(meta).uuid}if(this.dispersion!==undefined)data.dispersion=this.dispersion;if(this.iridescence!==undefined)data.iridescence=this.iridescence;if(this.iridescenceIOR!==undefined)data.iridescenceIOR=this.iridescenceIOR;if(this.iridescenceThicknessRange!==undefined)data.iridescenceThicknessRange=this.iridescenceThicknessRange;if(this.iridescenceMap&&this.iridescenceMap.isTexture){data.iridescenceMap=this.iridescenceMap.toJSON(meta).uuid}if(this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture){data.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(meta).uuid}if(this.anisotropy!==undefined)data.anisotropy=this.anisotropy;if(this.anisotropyRotation!==undefined)data.anisotropyRotation=this.anisotropyRotation;if(this.anisotropyMap&&this.anisotropyMap.isTexture){data.anisotropyMap=this.anisotropyMap.toJSON(meta).uuid}if(this.map&&this.map.isTexture)data.map=this.map.toJSON(meta).uuid;if(this.matcap&&this.matcap.isTexture)data.matcap=this.matcap.toJSON(meta).uuid;if(this.alphaMap&&this.alphaMap.isTexture)data.alphaMap=this.alphaMap.toJSON(meta).uuid;if(this.lightMap&&this.lightMap.isTexture){data.lightMap=this.lightMap.toJSON(meta).uuid;data.lightMapIntensity=this.lightMapIntensity}if(this.aoMap&&this.aoMap.isTexture){data.aoMap=this.aoMap.toJSON(meta).uuid;data.aoMapIntensity=this.aoMapIntensity}if(this.bumpMap&&this.bumpMap.isTexture){data.bumpMap=this.bumpMap.toJSON(meta).uuid;data.bumpScale=this.bumpScale}if(this.normalMap&&this.normalMap.isTexture){data.normalMap=this.normalMap.toJSON(meta).uuid;data.normalMapType=this.normalMapType;data.normalScale=this.normalScale.toArray()}if(this.displacementMap&&this.displacementMap.isTexture){data.displacementMap=this.displacementMap.toJSON(meta).uuid;data.displacementScale=this.displacementScale;data.displacementBias=this.displacementBias}if(this.roughnessMap&&this.roughnessMap.isTexture)data.roughnessMap=this.roughnessMap.toJSON(meta).uuid;if(this.metalnessMap&&this.metalnessMap.isTexture)data.metalnessMap=this.metalnessMap.toJSON(meta).uuid;if(this.emissiveMap&&this.emissiveMap.isTexture)data.emissiveMap=this.emissiveMap.toJSON(meta).uuid;if(this.specularMap&&this.specularMap.isTexture)data.specularMap=this.specularMap.toJSON(meta).uuid;if(this.specularIntensityMap&&this.specularIntensityMap.isTexture)data.specularIntensityMap=this.specularIntensityMap.toJSON(meta).uuid;if(this.specularColorMap&&this.specularColorMap.isTexture)data.specularColorMap=this.specularColorMap.toJSON(meta).uuid;if(this.envMap&&this.envMap.isTexture){data.envMap=this.envMap.toJSON(meta).uuid;if(this.combine!==undefined)data.combine=this.combine}if(this.envMapRotation!==undefined)data.envMapRotation=this.envMapRotation.toArray();if(this.envMapIntensity!==undefined)data.envMapIntensity=this.envMapIntensity;if(this.reflectivity!==undefined)data.reflectivity=this.reflectivity;if(this.refractionRatio!==undefined)data.refractionRatio=this.refractionRatio;if(this.gradientMap&&this.gradientMap.isTexture){data.gradientMap=this.gradientMap.toJSON(meta).uuid}if(this.transmission!==undefined)data.transmission=this.transmission;if(this.transmissionMap&&this.transmissionMap.isTexture)data.transmissionMap=this.transmissionMap.toJSON(meta).uuid;if(this.thickness!==undefined)data.thickness=this.thickness;if(this.thicknessMap&&this.thicknessMap.isTexture)data.thicknessMap=this.thicknessMap.toJSON(meta).uuid;if(this.attenuationDistance!==undefined&&this.attenuationDistance!==Infinity)data.attenuationDistance=this.attenuationDistance;if(this.attenuationColor!==undefined)data.attenuationColor=this.attenuationColor.getHex();if(this.size!==undefined)data.size=this.size;if(this.shadowSide!==null)data.shadowSide=this.shadowSide;if(this.sizeAttenuation!==undefined)data.sizeAttenuation=this.sizeAttenuation;if(this.blending!==NormalBlending)data.blending=this.blending;if(this.side!==FrontSide)data.side=this.side;if(this.vertexColors===true)data.vertexColors=true;if(this.opacity<1)data.opacity=this.opacity;if(this.transparent===true)data.transparent=true;if(this.blendSrc!==SrcAlphaFactor)data.blendSrc=this.blendSrc;if(this.blendDst!==OneMinusSrcAlphaFactor)data.blendDst=this.blendDst;if(this.blendEquation!==AddEquation)data.blendEquation=this.blendEquation;if(this.blendSrcAlpha!==null)data.blendSrcAlpha=this.blendSrcAlpha;if(this.blendDstAlpha!==null)data.blendDstAlpha=this.blendDstAlpha;if(this.blendEquationAlpha!==null)data.blendEquationAlpha=this.blendEquationAlpha;if(this.blendColor&&this.blendColor.isColor)data.blendColor=this.blendColor.getHex();if(this.blendAlpha!==0)data.blendAlpha=this.blendAlpha;if(this.depthFunc!==LessEqualDepth)data.depthFunc=this.depthFunc;if(this.depthTest===false)data.depthTest=this.depthTest;if(this.depthWrite===false)data.depthWrite=this.depthWrite;if(this.colorWrite===false)data.colorWrite=this.colorWrite;if(this.stencilWriteMask!==255)data.stencilWriteMask=this.stencilWriteMask;if(this.stencilFunc!==AlwaysStencilFunc)data.stencilFunc=this.stencilFunc;if(this.stencilRef!==0)data.stencilRef=this.stencilRef;if(this.stencilFuncMask!==255)data.stencilFuncMask=this.stencilFuncMask;if(this.stencilFail!==KeepStencilOp)data.stencilFail=this.stencilFail;if(this.stencilZFail!==KeepStencilOp)data.stencilZFail=this.stencilZFail;if(this.stencilZPass!==KeepStencilOp)data.stencilZPass=this.stencilZPass;if(this.stencilWrite===true)data.stencilWrite=this.stencilWrite;if(this.rotation!==undefined&&this.rotation!==0)data.rotation=this.rotation;if(this.polygonOffset===true)data.polygonOffset=true;if(this.polygonOffsetFactor!==0)data.polygonOffsetFactor=this.polygonOffsetFactor;if(this.polygonOffsetUnits!==0)data.polygonOffsetUnits=this.polygonOffsetUnits;if(this.linewidth!==undefined&&this.linewidth!==1)data.linewidth=this.linewidth;if(this.dashSize!==undefined)data.dashSize=this.dashSize;if(this.gapSize!==undefined)data.gapSize=this.gapSize;if(this.scale!==undefined)data.scale=this.scale;if(this.dithering===true)data.dithering=true;if(this.alphaTest>0)data.alphaTest=this.alphaTest;if(this.alphaHash===true)data.alphaHash=true;if(this.alphaToCoverage===true)data.alphaToCoverage=true;if(this.premultipliedAlpha===true)data.premultipliedAlpha=true;if(this.forceSinglePass===true)data.forceSinglePass=true;if(this.allowOverride===false)data.allowOverride=false;if(this.wireframe===true)data.wireframe=true;if(this.wireframeLinewidth>1)data.wireframeLinewidth=this.wireframeLinewidth;if(this.wireframeLinecap!=="round")data.wireframeLinecap=this.wireframeLinecap;if(this.wireframeLinejoin!=="round")data.wireframeLinejoin=this.wireframeLinejoin;if(this.flatShading===true)data.flatShading=true;if(this.visible===false)data.visible=false;if(this.toneMapped===false)data.toneMapped=false;if(this.fog===false)data.fog=false;if(Object.keys(this.userData).length>0)data.userData=this.userData;function extractFromCache(cache){const values=[];for(const key in cache){const data=cache[key];delete data.metadata;values.push(data)}return values}if(isRootObject){const textures=extractFromCache(meta.textures);const images=extractFromCache(meta.images);if(textures.length>0)data.textures=textures;if(images.length>0)data.images=images}return data}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name;this.blending=source.blending;this.side=source.side;this.vertexColors=source.vertexColors;this.opacity=source.opacity;this.transparent=source.transparent;this.blendSrc=source.blendSrc;this.blendDst=source.blendDst;this.blendEquation=source.blendEquation;this.blendSrcAlpha=source.blendSrcAlpha;this.blendDstAlpha=source.blendDstAlpha;this.blendEquationAlpha=source.blendEquationAlpha;this.blendColor.copy(source.blendColor);this.blendAlpha=source.blendAlpha;this.depthFunc=source.depthFunc;this.depthTest=source.depthTest;this.depthWrite=source.depthWrite;this.stencilWriteMask=source.stencilWriteMask;this.stencilFunc=source.stencilFunc;this.stencilRef=source.stencilRef;this.stencilFuncMask=source.stencilFuncMask;this.stencilFail=source.stencilFail;this.stencilZFail=source.stencilZFail;this.stencilZPass=source.stencilZPass;this.stencilWrite=source.stencilWrite;const srcPlanes=source.clippingPlanes;let dstPlanes=null;if(srcPlanes!==null){const n=srcPlanes.length;dstPlanes=new Array(n);for(let i=0;i!==n;++i){dstPlanes[i]=srcPlanes[i].clone()}}this.clippingPlanes=dstPlanes;this.clipIntersection=source.clipIntersection;this.clipShadows=source.clipShadows;this.shadowSide=source.shadowSide;this.colorWrite=source.colorWrite;this.precision=source.precision;this.polygonOffset=source.polygonOffset;this.polygonOffsetFactor=source.polygonOffsetFactor;this.polygonOffsetUnits=source.polygonOffsetUnits;this.dithering=source.dithering;this.alphaTest=source.alphaTest;this.alphaHash=source.alphaHash;this.alphaToCoverage=source.alphaToCoverage;this.premultipliedAlpha=source.premultipliedAlpha;this.forceSinglePass=source.forceSinglePass;this.allowOverride=source.allowOverride;this.visible=source.visible;this.toneMapped=source.toneMapped;this.userData=JSON.parse(JSON.stringify(source.userData));return this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(value){if(value===true)this.version++}}class MeshBasicMaterial extends Material{constructor(parameters){super();this.isMeshBasicMaterial=true;this.type="MeshBasicMaterial";this.color=new Color(16777215);this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.fog=source.fog;return this}}const _tables=_generateTables();function _generateTables(){const buffer=new ArrayBuffer(4);const floatView=new Float32Array(buffer);const uint32View=new Uint32Array(buffer);const baseTable=new Uint32Array(512);const shiftTable=new Uint32Array(512);for(let i=0;i<256;++i){const e=i-127;if(e<-27){baseTable[i]=0;baseTable[i|256]=32768;shiftTable[i]=24;shiftTable[i|256]=24}else if(e<-14){baseTable[i]=1024>>-e-14;baseTable[i|256]=1024>>-e-14|32768;shiftTable[i]=-e-1;shiftTable[i|256]=-e-1}else if(e<=15){baseTable[i]=e+15<<10;baseTable[i|256]=e+15<<10|32768;shiftTable[i]=13;shiftTable[i|256]=13}else if(e<128){baseTable[i]=31744;baseTable[i|256]=64512;shiftTable[i]=24;shiftTable[i|256]=24}else{baseTable[i]=31744;baseTable[i|256]=64512;shiftTable[i]=13;shiftTable[i|256]=13}}const mantissaTable=new Uint32Array(2048);const exponentTable=new Uint32Array(64);const offsetTable=new Uint32Array(64);for(let i=1;i<1024;++i){let m=i<<13;let e=0;while((m&8388608)===0){m<<=1;e-=8388608}m&=-8388609;e+=947912704;mantissaTable[i]=m|e}for(let i=1024;i<2048;++i){mantissaTable[i]=939524096+(i-1024<<13)}for(let i=1;i<31;++i){exponentTable[i]=i<<23}exponentTable[31]=1199570944;exponentTable[32]=2147483648;for(let i=33;i<63;++i){exponentTable[i]=2147483648+(i-32<<23)}exponentTable[63]=3347054592;for(let i=1;i<64;++i){if(i!==32){offsetTable[i]=1024}}return{floatView:floatView,uint32View:uint32View,baseTable:baseTable,shiftTable:shiftTable,mantissaTable:mantissaTable,exponentTable:exponentTable,offsetTable:offsetTable}}function toHalfFloat(val){if(Math.abs(val)>65504)warn("DataUtils.toHalfFloat(): Value out of range.");val=clamp(val,-65504,65504);_tables.floatView[0]=val;const f=_tables.uint32View[0];const e=f>>23&511;return _tables.baseTable[e]+((f&8388607)>>_tables.shiftTable[e])}function fromHalfFloat(val){const m=val>>10;_tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[m]+(val&1023)]+_tables.exponentTable[m];return _tables.floatView[0]}class DataUtils{static toHalfFloat(val){return toHalfFloat(val)}static fromHalfFloat(val){return fromHalfFloat(val)}}const _vector$9=new Vector3;const _vector2$1=new Vector2;let _id$3=0;class BufferAttribute{constructor(array,itemSize,normalized=false){if(Array.isArray(array)){throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.")}this.isBufferAttribute=true;Object.defineProperty(this,"id",{value:_id$3++});this.name="";this.array=array;this.itemSize=itemSize;this.count=array!==undefined?array.length/itemSize:0;this.normalized=normalized;this.usage=StaticDrawUsage;this.updateRanges=[];this.gpuType=FloatType;this.version=0}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}setUsage(value){this.usage=value;return this}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){this.name=source.name;this.array=new source.array.constructor(source.array);this.itemSize=source.itemSize;this.count=source.count;this.normalized=source.normalized;this.usage=source.usage;this.gpuType=source.gpuType;return this}copyAt(index1,attribute,index2){index1*=this.itemSize;index2*=attribute.itemSize;for(let i=0,l=this.itemSize;i<l;i++){this.array[index1+i]=attribute.array[index2+i]}return this}copyArray(array){this.array.set(array);return this}applyMatrix3(m){if(this.itemSize===2){for(let i=0,l=this.count;i<l;i++){_vector2$1.fromBufferAttribute(this,i);_vector2$1.applyMatrix3(m);this.setXY(i,_vector2$1.x,_vector2$1.y)}}else if(this.itemSize===3){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyMatrix3(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}}return this}applyMatrix4(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyMatrix4(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyNormalMatrix(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.transformDirection(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}set(value,offset=0){this.array.set(value,offset);return this}getComponent(index,component){let value=this.array[index*this.itemSize+component];if(this.normalized)value=denormalize(value,this.array);return value}setComponent(index,component,value){if(this.normalized)value=normalize(value,this.array);this.array[index*this.itemSize+component]=value;return this}getX(index){let x=this.array[index*this.itemSize];if(this.normalized)x=denormalize(x,this.array);return x}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.array[index*this.itemSize]=x;return this}getY(index){let y=this.array[index*this.itemSize+1];if(this.normalized)y=denormalize(y,this.array);return y}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.array[index*this.itemSize+1]=y;return this}getZ(index){let z=this.array[index*this.itemSize+2];if(this.normalized)z=denormalize(z,this.array);return z}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.array[index*this.itemSize+2]=z;return this}getW(index){let w=this.array[index*this.itemSize+3];if(this.normalized)w=denormalize(w,this.array);return w}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.array[index*this.itemSize+3]=w;return this}setXY(index,x,y){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.array[index+0]=x;this.array[index+1]=y;return this}setXYZ(index,x,y,z){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.array[index+0]=x;this.array[index+1]=y;this.array[index+2]=z;return this}setXYZW(index,x,y,z,w){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.array[index+0]=x;this.array[index+1]=y;this.array[index+2]=z;this.array[index+3]=w;return this}onUpload(callback){this.onUploadCallback=callback;return this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const data={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};if(this.name!=="")data.name=this.name;if(this.usage!==StaticDrawUsage)data.usage=this.usage;return data}}class Int8BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int8Array(array),itemSize,normalized)}}class Uint8BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint8Array(array),itemSize,normalized)}}class Uint8ClampedBufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint8ClampedArray(array),itemSize,normalized)}}class Int16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int16Array(array),itemSize,normalized)}}class Uint16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint16Array(array),itemSize,normalized)}}class Int32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int32Array(array),itemSize,normalized)}}class Uint32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint32Array(array),itemSize,normalized)}}class Float16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint16Array(array),itemSize,normalized);this.isFloat16BufferAttribute=true}getX(index){let x=fromHalfFloat(this.array[index*this.itemSize]);if(this.normalized)x=denormalize(x,this.array);return x}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.array[index*this.itemSize]=toHalfFloat(x);return this}getY(index){let y=fromHalfFloat(this.array[index*this.itemSize+1]);if(this.normalized)y=denormalize(y,this.array);return y}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.array[index*this.itemSize+1]=toHalfFloat(y);return this}getZ(index){let z=fromHalfFloat(this.array[index*this.itemSize+2]);if(this.normalized)z=denormalize(z,this.array);return z}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.array[index*this.itemSize+2]=toHalfFloat(z);return this}getW(index){let w=fromHalfFloat(this.array[index*this.itemSize+3]);if(this.normalized)w=denormalize(w,this.array);return w}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.array[index*this.itemSize+3]=toHalfFloat(w);return this}setXY(index,x,y){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);return this}setXYZ(index,x,y,z){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);this.array[index+2]=toHalfFloat(z);return this}setXYZW(index,x,y,z,w){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);this.array[index+2]=toHalfFloat(z);this.array[index+3]=toHalfFloat(w);return this}}class Float32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Float32Array(array),itemSize,normalized)}}let _id$2=0;const _m1$2=new Matrix4;const _obj=new Object3D;const _offset=new Vector3;const _box$2=new Box3;const _boxMorphTargets=new Box3;const _vector$8=new Vector3;class BufferGeometry extends EventDispatcher{constructor(){super();this.isBufferGeometry=true;Object.defineProperty(this,"id",{value:_id$2++});this.uuid=generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.indirect=null;this.indirectOffset=0;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=false;this.groups=[];this.boundingBox=null;this.boundingSphere=null;this.drawRange={start:0,count:Infinity};this.userData={}}getIndex(){return this.index}setIndex(index){if(Array.isArray(index)){this.index=new(arrayNeedsUint32(index)?Uint32BufferAttribute:Uint16BufferAttribute)(index,1)}else{this.index=index}return this}setIndirect(indirect,indirectOffset=0){this.indirect=indirect;this.indirectOffset=indirectOffset;return this}getIndirect(){return this.indirect}getAttribute(name){return this.attributes[name]}setAttribute(name,attribute){this.attributes[name]=attribute;return this}deleteAttribute(name){delete this.attributes[name];return this}hasAttribute(name){return this.attributes[name]!==undefined}addGroup(start,count,materialIndex=0){this.groups.push({start:start,count:count,materialIndex:materialIndex})}clearGroups(){this.groups=[]}setDrawRange(start,count){this.drawRange.start=start;this.drawRange.count=count}applyMatrix4(matrix){const position=this.attributes.position;if(position!==undefined){position.applyMatrix4(matrix);position.needsUpdate=true}const normal=this.attributes.normal;if(normal!==undefined){const normalMatrix=new Matrix3().getNormalMatrix(matrix);normal.applyNormalMatrix(normalMatrix);normal.needsUpdate=true}const tangent=this.attributes.tangent;if(tangent!==undefined){tangent.transformDirection(matrix);tangent.needsUpdate=true}if(this.boundingBox!==null){this.computeBoundingBox()}if(this.boundingSphere!==null){this.computeBoundingSphere()}return this}applyQuaternion(q){_m1$2.makeRotationFromQuaternion(q);this.applyMatrix4(_m1$2);return this}rotateX(angle){_m1$2.makeRotationX(angle);this.applyMatrix4(_m1$2);return this}rotateY(angle){_m1$2.makeRotationY(angle);this.applyMatrix4(_m1$2);return this}rotateZ(angle){_m1$2.makeRotationZ(angle);this.applyMatrix4(_m1$2);return this}translate(x,y,z){_m1$2.makeTranslation(x,y,z);this.applyMatrix4(_m1$2);return this}scale(x,y,z){_m1$2.makeScale(x,y,z);this.applyMatrix4(_m1$2);return this}lookAt(vector){_obj.lookAt(vector);_obj.updateMatrix();this.applyMatrix4(_obj.matrix);return this}center(){this.computeBoundingBox();this.boundingBox.getCenter(_offset).negate();this.translate(_offset.x,_offset.y,_offset.z);return this}setFromPoints(points){const positionAttribute=this.getAttribute("position");if(positionAttribute===undefined){const position=[];for(let i=0,l=points.length;i<l;i++){const point=points[i];position.push(point.x,point.y,point.z||0)}this.setAttribute("position",new Float32BufferAttribute(position,3))}else{const l=Math.min(points.length,positionAttribute.count);for(let i=0;i<l;i++){const point=points[i];positionAttribute.setXYZ(i,point.x,point.y,point.z||0)}if(points.length>positionAttribute.count){warn("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.")}positionAttribute.needsUpdate=true}return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const position=this.attributes.position;const morphAttributesPosition=this.morphAttributes.position;if(position&&position.isGLBufferAttribute){error("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this);this.boundingBox.set(new Vector3(-Infinity,-Infinity,-Infinity),new Vector3(+Infinity,+Infinity,+Infinity));return}if(position!==undefined){this.boundingBox.setFromBufferAttribute(position);if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];_box$2.setFromBufferAttribute(morphAttribute);if(this.morphTargetsRelative){_vector$8.addVectors(this.boundingBox.min,_box$2.min);this.boundingBox.expandByPoint(_vector$8);_vector$8.addVectors(this.boundingBox.max,_box$2.max);this.boundingBox.expandByPoint(_vector$8)}else{this.boundingBox.expandByPoint(_box$2.min);this.boundingBox.expandByPoint(_box$2.max)}}}}else{this.boundingBox.makeEmpty()}if(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z)){error("BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.",this)}}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}const position=this.attributes.position;const morphAttributesPosition=this.morphAttributes.position;if(position&&position.isGLBufferAttribute){error("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this);this.boundingSphere.set(new Vector3,Infinity);return}if(position){const center=this.boundingSphere.center;_box$2.setFromBufferAttribute(position);if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];_boxMorphTargets.setFromBufferAttribute(morphAttribute);if(this.morphTargetsRelative){_vector$8.addVectors(_box$2.min,_boxMorphTargets.min);_box$2.expandByPoint(_vector$8);_vector$8.addVectors(_box$2.max,_boxMorphTargets.max);_box$2.expandByPoint(_vector$8)}else{_box$2.expandByPoint(_boxMorphTargets.min);_box$2.expandByPoint(_boxMorphTargets.max)}}}_box$2.getCenter(center);let maxRadiusSq=0;for(let i=0,il=position.count;i<il;i++){_vector$8.fromBufferAttribute(position,i);maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(_vector$8))}if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];const morphTargetsRelative=this.morphTargetsRelative;for(let j=0,jl=morphAttribute.count;j<jl;j++){_vector$8.fromBufferAttribute(morphAttribute,j);if(morphTargetsRelative){_offset.fromBufferAttribute(position,j);_vector$8.add(_offset)}maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(_vector$8))}}}this.boundingSphere.radius=Math.sqrt(maxRadiusSq);if(isNaN(this.boundingSphere.radius)){error("BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.",this)}}}computeTangents(){const index=this.index;const attributes=this.attributes;if(index===null||attributes.position===undefined||attributes.normal===undefined||attributes.uv===undefined){error("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const positionAttribute=attributes.position;const normalAttribute=attributes.normal;const uvAttribute=attributes.uv;if(this.hasAttribute("tangent")===false){this.setAttribute("tangent",new BufferAttribute(new Float32Array(4*positionAttribute.count),4))}const tangentAttribute=this.getAttribute("tangent");const tan1=[],tan2=[];for(let i=0;i<positionAttribute.count;i++){tan1[i]=new Vector3;tan2[i]=new Vector3}const vA=new Vector3,vB=new Vector3,vC=new Vector3,uvA=new Vector2,uvB=new Vector2,uvC=new Vector2,sdir=new Vector3,tdir=new Vector3;function handleTriangle(a,b,c){vA.fromBufferAttribute(positionAttribute,a);vB.fromBufferAttribute(positionAttribute,b);vC.fromBufferAttribute(positionAttribute,c);uvA.fromBufferAttribute(uvAttribute,a);uvB.fromBufferAttribute(uvAttribute,b);uvC.fromBufferAttribute(uvAttribute,c);vB.sub(vA);vC.sub(vA);uvB.sub(uvA);uvC.sub(uvA);const r=1/(uvB.x*uvC.y-uvC.x*uvB.y);if(!isFinite(r))return;sdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC,-uvB.y).multiplyScalar(r);tdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB,-uvC.x).multiplyScalar(r);tan1[a].add(sdir);tan1[b].add(sdir);tan1[c].add(sdir);tan2[a].add(tdir);tan2[b].add(tdir);tan2[c].add(tdir)}let groups=this.groups;if(groups.length===0){groups=[{start:0,count:index.count}]}for(let i=0,il=groups.length;i<il;++i){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){handleTriangle(index.getX(j+0),index.getX(j+1),index.getX(j+2))}}const tmp=new Vector3,tmp2=new Vector3;const n=new Vector3,n2=new Vector3;function handleVertex(v){n.fromBufferAttribute(normalAttribute,v);n2.copy(n);const t=tan1[v];tmp.copy(t);tmp.sub(n.multiplyScalar(n.dot(t))).normalize();tmp2.crossVectors(n2,t);const test=tmp2.dot(tan2[v]);const w=test<0?-1:1;tangentAttribute.setXYZW(v,tmp.x,tmp.y,tmp.z,w)}for(let i=0,il=groups.length;i<il;++i){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){handleVertex(index.getX(j+0));handleVertex(index.getX(j+1));handleVertex(index.getX(j+2))}}}computeVertexNormals(){const index=this.index;const positionAttribute=this.getAttribute("position");if(positionAttribute!==undefined){let normalAttribute=this.getAttribute("normal");if(normalAttribute===undefined){normalAttribute=new BufferAttribute(new Float32Array(positionAttribute.count*3),3);this.setAttribute("normal",normalAttribute)}else{for(let i=0,il=normalAttribute.count;i<il;i++){normalAttribute.setXYZ(i,0,0,0)}}const pA=new Vector3,pB=new Vector3,pC=new Vector3;const nA=new Vector3,nB=new Vector3,nC=new Vector3;const cb=new Vector3,ab=new Vector3;if(index){for(let i=0,il=index.count;i<il;i+=3){const vA=index.getX(i+0);const vB=index.getX(i+1);const vC=index.getX(i+2);pA.fromBufferAttribute(positionAttribute,vA);pB.fromBufferAttribute(positionAttribute,vB);pC.fromBufferAttribute(positionAttribute,vC);cb.subVectors(pC,pB);ab.subVectors(pA,pB);cb.cross(ab);nA.fromBufferAttribute(normalAttribute,vA);nB.fromBufferAttribute(normalAttribute,vB);nC.fromBufferAttribute(normalAttribute,vC);nA.add(cb);nB.add(cb);nC.add(cb);normalAttribute.setXYZ(vA,nA.x,nA.y,nA.z);normalAttribute.setXYZ(vB,nB.x,nB.y,nB.z);normalAttribute.setXYZ(vC,nC.x,nC.y,nC.z)}}else{for(let i=0,il=positionAttribute.count;i<il;i+=3){pA.fromBufferAttribute(positionAttribute,i+0);pB.fromBufferAttribute(positionAttribute,i+1);pC.fromBufferAttribute(positionAttribute,i+2);cb.subVectors(pC,pB);ab.subVectors(pA,pB);cb.cross(ab);normalAttribute.setXYZ(i+0,cb.x,cb.y,cb.z);normalAttribute.setXYZ(i+1,cb.x,cb.y,cb.z);normalAttribute.setXYZ(i+2,cb.x,cb.y,cb.z)}}this.normalizeNormals();normalAttribute.needsUpdate=true}}normalizeNormals(){const normals=this.attributes.normal;for(let i=0,il=normals.count;i<il;i++){_vector$8.fromBufferAttribute(normals,i);_vector$8.normalize();normals.setXYZ(i,_vector$8.x,_vector$8.y,_vector$8.z)}}toNonIndexed(){function convertBufferAttribute(attribute,indices){const array=attribute.array;const itemSize=attribute.itemSize;const normalized=attribute.normalized;const array2=new array.constructor(indices.length*itemSize);let index=0,index2=0;for(let i=0,l=indices.length;i<l;i++){if(attribute.isInterleavedBufferAttribute){index=indices[i]*attribute.data.stride+attribute.offset}else{index=indices[i]*itemSize}for(let j=0;j<itemSize;j++){array2[index2++]=array[index++]}}return new BufferAttribute(array2,itemSize,normalized)}if(this.index===null){warn("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.");return this}const geometry2=new BufferGeometry;const indices=this.index.array;const attributes=this.attributes;for(const name in attributes){const attribute=attributes[name];const newAttribute=convertBufferAttribute(attribute,indices);geometry2.setAttribute(name,newAttribute)}const morphAttributes=this.morphAttributes;for(const name in morphAttributes){const morphArray=[];const morphAttribute=morphAttributes[name];for(let i=0,il=morphAttribute.length;i<il;i++){const attribute=morphAttribute[i];const newAttribute=convertBufferAttribute(attribute,indices);morphArray.push(newAttribute)}geometry2.morphAttributes[name]=morphArray}geometry2.morphTargetsRelative=this.morphTargetsRelative;const groups=this.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];geometry2.addGroup(group.start,group.count,group.materialIndex)}return geometry2}toJSON(){const data={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(Object.keys(this.userData).length>0)data.userData=this.userData;if(this.parameters!==undefined){const parameters=this.parameters;for(const key in parameters){if(parameters[key]!==undefined)data[key]=parameters[key]}return data}data.data={attributes:{}};const index=this.index;if(index!==null){data.data.index={type:index.array.constructor.name,array:Array.prototype.slice.call(index.array)}}const attributes=this.attributes;for(const key in attributes){const attribute=attributes[key];data.data.attributes[key]=attribute.toJSON(data.data)}const morphAttributes={};let hasMorphAttributes=false;for(const key in this.morphAttributes){const attributeArray=this.morphAttributes[key];const array=[];for(let i=0,il=attributeArray.length;i<il;i++){const attribute=attributeArray[i];array.push(attribute.toJSON(data.data))}if(array.length>0){morphAttributes[key]=array;hasMorphAttributes=true}}if(hasMorphAttributes){data.data.morphAttributes=morphAttributes;data.data.morphTargetsRelative=this.morphTargetsRelative}const groups=this.groups;if(groups.length>0){data.data.groups=JSON.parse(JSON.stringify(groups))}const boundingSphere=this.boundingSphere;if(boundingSphere!==null){data.data.boundingSphere=boundingSphere.toJSON()}return data}clone(){return new this.constructor().copy(this)}copy(source){this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingBox=null;this.boundingSphere=null;const data={};this.name=source.name;const index=source.index;if(index!==null){this.setIndex(index.clone())}const attributes=source.attributes;for(const name in attributes){const attribute=attributes[name];this.setAttribute(name,attribute.clone(data))}const morphAttributes=source.morphAttributes;for(const name in morphAttributes){const array=[];const morphAttribute=morphAttributes[name];for(let i=0,l=morphAttribute.length;i<l;i++){array.push(morphAttribute[i].clone(data))}this.morphAttributes[name]=array}this.morphTargetsRelative=source.morphTargetsRelative;const groups=source.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];this.addGroup(group.start,group.count,group.materialIndex)}const boundingBox=source.boundingBox;if(boundingBox!==null){this.boundingBox=boundingBox.clone()}const boundingSphere=source.boundingSphere;if(boundingSphere!==null){this.boundingSphere=boundingSphere.clone()}this.drawRange.start=source.drawRange.start;this.drawRange.count=source.drawRange.count;this.userData=source.userData;return this}dispose(){this.dispatchEvent({type:"dispose"})}}const _inverseMatrix$3=new Matrix4;const _ray$3=new Ray;const _sphere$6=new Sphere;const _sphereHitAt=new Vector3;const _vA$1=new Vector3;const _vB$1=new Vector3;const _vC$1=new Vector3;const _tempA=new Vector3;const _morphA=new Vector3;const _intersectionPoint=new Vector3;const _intersectionPointWorld=new Vector3;class Mesh extends Object3D{constructor(geometry=new BufferGeometry,material=new MeshBasicMaterial){super();this.isMesh=true;this.type="Mesh";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.count=1;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);if(source.morphTargetInfluences!==undefined){this.morphTargetInfluences=source.morphTargetInfluences.slice()}if(source.morphTargetDictionary!==undefined){this.morphTargetDictionary=Object.assign({},source.morphTargetDictionary)}this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}getVertexPosition(index,target){const geometry=this.geometry;const position=geometry.attributes.position;const morphPosition=geometry.morphAttributes.position;const morphTargetsRelative=geometry.morphTargetsRelative;target.fromBufferAttribute(position,index);const morphInfluences=this.morphTargetInfluences;if(morphPosition&&morphInfluences){_morphA.set(0,0,0);for(let i=0,il=morphPosition.length;i<il;i++){const influence=morphInfluences[i];const morphAttribute=morphPosition[i];if(influence===0)continue;_tempA.fromBufferAttribute(morphAttribute,index);if(morphTargetsRelative){_morphA.addScaledVector(_tempA,influence)}else{_morphA.addScaledVector(_tempA.sub(target),influence)}}target.add(_morphA)}return target}raycast(raycaster,intersects){const geometry=this.geometry;const material=this.material;const matrixWorld=this.matrixWorld;if(material===undefined)return;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$6.copy(geometry.boundingSphere);_sphere$6.applyMatrix4(matrixWorld);_ray$3.copy(raycaster.ray).recast(raycaster.near);if(_sphere$6.containsPoint(_ray$3.origin)===false){if(_ray$3.intersectSphere(_sphere$6,_sphereHitAt)===null)return;if(_ray$3.origin.distanceToSquared(_sphereHitAt)>(raycaster.far-raycaster.near)**2)return}_inverseMatrix$3.copy(matrixWorld).invert();_ray$3.copy(raycaster.ray).applyMatrix4(_inverseMatrix$3);if(geometry.boundingBox!==null){if(_ray$3.intersectsBox(geometry.boundingBox)===false)return}this._computeIntersections(raycaster,intersects,_ray$3)}_computeIntersections(raycaster,intersects,rayLocalSpace){let intersection;const geometry=this.geometry;const material=this.material;const index=geometry.index;const position=geometry.attributes.position;const uv=geometry.attributes.uv;const uv1=geometry.attributes.uv1;const normal=geometry.attributes.normal;const groups=geometry.groups;const drawRange=geometry.drawRange;if(index!==null){if(Array.isArray(material)){for(let i=0,il=groups.length;i<il;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];const start=Math.max(group.start,drawRange.start);const end=Math.min(index.count,Math.min(group.start+group.count,drawRange.start+drawRange.count));for(let j=start,jl=end;j<jl;j+=3){const a=index.getX(j);const b=index.getX(j+1);const c=index.getX(j+2);intersection=checkGeometryIntersection(this,groupMaterial,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(j/3);intersection.face.materialIndex=group.materialIndex;intersects.push(intersection)}}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i+=3){const a=index.getX(i);const b=index.getX(i+1);const c=index.getX(i+2);intersection=checkGeometryIntersection(this,material,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(i/3);intersects.push(intersection)}}}}else if(position!==undefined){if(Array.isArray(material)){for(let i=0,il=groups.length;i<il;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];const start=Math.max(group.start,drawRange.start);const end=Math.min(position.count,Math.min(group.start+group.count,drawRange.start+drawRange.count));for(let j=start,jl=end;j<jl;j+=3){const a=j;const b=j+1;const c=j+2;intersection=checkGeometryIntersection(this,groupMaterial,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(j/3);intersection.face.materialIndex=group.materialIndex;intersects.push(intersection)}}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(position.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i+=3){const a=i;const b=i+1;const c=i+2;intersection=checkGeometryIntersection(this,material,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(i/3);intersects.push(intersection)}}}}}}function checkIntersection$1(object,material,raycaster,ray,pA,pB,pC,point){let intersect;if(material.side===BackSide){intersect=ray.intersectTriangle(pC,pB,pA,true,point)}else{intersect=ray.intersectTriangle(pA,pB,pC,material.side===FrontSide,point)}if(intersect===null)return null;_intersectionPointWorld.copy(point);_intersectionPointWorld.applyMatrix4(object.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_intersectionPointWorld);if(distance<raycaster.near||distance>raycaster.far)return null;return{distance:distance,point:_intersectionPointWorld.clone(),object:object}}function checkGeometryIntersection(object,material,raycaster,ray,uv,uv1,normal,a,b,c){object.getVertexPosition(a,_vA$1);object.getVertexPosition(b,_vB$1);object.getVertexPosition(c,_vC$1);const intersection=checkIntersection$1(object,material,raycaster,ray,_vA$1,_vB$1,_vC$1,_intersectionPoint);if(intersection){const barycoord=new Vector3;Triangle.getBarycoord(_intersectionPoint,_vA$1,_vB$1,_vC$1,barycoord);if(uv){intersection.uv=Triangle.getInterpolatedAttribute(uv,a,b,c,barycoord,new Vector2)}if(uv1){intersection.uv1=Triangle.getInterpolatedAttribute(uv1,a,b,c,barycoord,new Vector2)}if(normal){intersection.normal=Triangle.getInterpolatedAttribute(normal,a,b,c,barycoord,new Vector3);if(intersection.normal.dot(ray.direction)>0){intersection.normal.multiplyScalar(-1)}}const face={a:a,b:b,c:c,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA$1,_vB$1,_vC$1,face.normal);intersection.face=face;intersection.barycoord=barycoord}return intersection}class BoxGeometry extends BufferGeometry{constructor(width=1,height=1,depth=1,widthSegments=1,heightSegments=1,depthSegments=1){super();this.type="BoxGeometry";this.parameters={width:width,height:height,depth:depth,widthSegments:widthSegments,heightSegments:heightSegments,depthSegments:depthSegments};const scope=this;widthSegments=Math.floor(widthSegments);heightSegments=Math.floor(heightSegments);depthSegments=Math.floor(depthSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let numberOfVertices=0;let groupStart=0;buildPlane("z","y","x",-1,-1,depth,height,width,depthSegments,heightSegments,0);buildPlane("z","y","x",1,-1,depth,height,-width,depthSegments,heightSegments,1);buildPlane("x","z","y",1,1,width,depth,height,widthSegments,depthSegments,2);buildPlane("x","z","y",1,-1,width,depth,-height,widthSegments,depthSegments,3);buildPlane("x","y","z",1,-1,width,height,depth,widthSegments,heightSegments,4);buildPlane("x","y","z",-1,-1,width,height,-depth,widthSegments,heightSegments,5);this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function buildPlane(u,v,w,udir,vdir,width,height,depth,gridX,gridY,materialIndex){const segmentWidth=width/gridX;const segmentHeight=height/gridY;const widthHalf=width/2;const heightHalf=height/2;const depthHalf=depth/2;const gridX1=gridX+1;const gridY1=gridY+1;let vertexCounter=0;let groupCount=0;const vector=new Vector3;for(let iy=0;iy<gridY1;iy++){const y=iy*segmentHeight-heightHalf;for(let ix=0;ix<gridX1;ix++){const x=ix*segmentWidth-widthHalf;vector[u]=x*udir;vector[v]=y*vdir;vector[w]=depthHalf;vertices.push(vector.x,vector.y,vector.z);vector[u]=0;vector[v]=0;vector[w]=depth>0?1:-1;normals.push(vector.x,vector.y,vector.z);uvs.push(ix/gridX);uvs.push(1-iy/gridY);vertexCounter+=1}}for(let iy=0;iy<gridY;iy++){for(let ix=0;ix<gridX;ix++){const a=numberOfVertices+ix+gridX1*iy;const b=numberOfVertices+ix+gridX1*(iy+1);const c=numberOfVertices+(ix+1)+gridX1*(iy+1);const d=numberOfVertices+(ix+1)+gridX1*iy;indices.push(a,b,d);indices.push(b,c,d);groupCount+=6}}scope.addGroup(groupStart,groupCount,materialIndex);groupStart+=groupCount;numberOfVertices+=vertexCounter}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new BoxGeometry(data.width,data.height,data.depth,data.widthSegments,data.heightSegments,data.depthSegments)}}function cloneUniforms(src){const dst={};for(const u in src){dst[u]={};for(const p in src[u]){const property=src[u][p];if(property&&(property.isColor||property.isMatrix3||property.isMatrix4||property.isVector2||property.isVector3||property.isVector4||property.isTexture||property.isQuaternion)){if(property.isRenderTargetTexture){warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().");dst[u][p]=null}else{dst[u][p]=property.clone()}}else if(Array.isArray(property)){dst[u][p]=property.slice()}else{dst[u][p]=property}}}return dst}function mergeUniforms(uniforms){const merged={};for(let u=0;u<uniforms.length;u++){const tmp=cloneUniforms(uniforms[u]);for(const p in tmp){merged[p]=tmp[p]}}return merged}function cloneUniformsGroups(src){const dst=[];for(let u=0;u<src.length;u++){dst.push(src[u].clone())}return dst}function getUnlitUniformColorSpace(renderer){const currentRenderTarget=renderer.getRenderTarget();if(currentRenderTarget===null){return renderer.outputColorSpace}if(currentRenderTarget.isXRRenderTarget===true){return currentRenderTarget.texture.colorSpace}return ColorManagement.workingColorSpace}const UniformsUtils={clone:cloneUniforms,merge:mergeUniforms};var default_vertex="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";var default_fragment="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";class ShaderMaterial extends Material{constructor(parameters){super();this.isShaderMaterial=true;this.type="ShaderMaterial";this.defines={};this.uniforms={};this.uniformsGroups=[];this.vertexShader=default_vertex;this.fragmentShader=default_fragment;this.linewidth=1;this.wireframe=false;this.wireframeLinewidth=1;this.fog=false;this.lights=false;this.clipping=false;this.forceSinglePass=true;this.extensions={clipCullDistance:false,multiDraw:false};this.defaultAttributeValues={"color":[1,1,1],"uv":[0,0],"uv1":[0,0]};this.index0AttributeName=undefined;this.uniformsNeedUpdate=false;this.glslVersion=null;if(parameters!==undefined){this.setValues(parameters)}}copy(source){super.copy(source);this.fragmentShader=source.fragmentShader;this.vertexShader=source.vertexShader;this.uniforms=cloneUniforms(source.uniforms);this.uniformsGroups=cloneUniformsGroups(source.uniformsGroups);this.defines=Object.assign({},source.defines);this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.fog=source.fog;this.lights=source.lights;this.clipping=source.clipping;this.extensions=Object.assign({},source.extensions);this.glslVersion=source.glslVersion;this.defaultAttributeValues=Object.assign({},source.defaultAttributeValues);this.index0AttributeName=source.index0AttributeName;this.uniformsNeedUpdate=source.uniformsNeedUpdate;return this}toJSON(meta){const data=super.toJSON(meta);data.glslVersion=this.glslVersion;data.uniforms={};for(const name in this.uniforms){const uniform=this.uniforms[name];const value=uniform.value;if(value&&value.isTexture){data.uniforms[name]={type:"t",value:value.toJSON(meta).uuid}}else if(value&&value.isColor){data.uniforms[name]={type:"c",value:value.getHex()}}else if(value&&value.isVector2){data.uniforms[name]={type:"v2",value:value.toArray()}}else if(value&&value.isVector3){data.uniforms[name]={type:"v3",value:value.toArray()}}else if(value&&value.isVector4){data.uniforms[name]={type:"v4",value:value.toArray()}}else if(value&&value.isMatrix3){data.uniforms[name]={type:"m3",value:value.toArray()}}else if(value&&value.isMatrix4){data.uniforms[name]={type:"m4",value:value.toArray()}}else{data.uniforms[name]={value:value}}}if(Object.keys(this.defines).length>0)data.defines=this.defines;data.vertexShader=this.vertexShader;data.fragmentShader=this.fragmentShader;data.lights=this.lights;data.clipping=this.clipping;const extensions={};for(const key in this.extensions){if(this.extensions[key]===true)extensions[key]=true}if(Object.keys(extensions).length>0)data.extensions=extensions;return data}}class Camera extends Object3D{constructor(){super();this.isCamera=true;this.type="Camera";this.matrixWorldInverse=new Matrix4;this.projectionMatrix=new Matrix4;this.projectionMatrixInverse=new Matrix4;this.coordinateSystem=WebGLCoordinateSystem;this._reversedDepth=false}get reversedDepth(){return this._reversedDepth}copy(source,recursive){super.copy(source,recursive);this.matrixWorldInverse.copy(source.matrixWorldInverse);this.projectionMatrix.copy(source.projectionMatrix);this.projectionMatrixInverse.copy(source.projectionMatrixInverse);this.coordinateSystem=source.coordinateSystem;return this}getWorldDirection(target){return super.getWorldDirection(target).negate()}updateMatrixWorld(force){super.updateMatrixWorld(force);this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(updateParents,updateChildren){super.updateWorldMatrix(updateParents,updateChildren);this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const _v3$1=new Vector3;const _minTarget=new Vector2;const _maxTarget=new Vector2;class PerspectiveCamera extends Camera{constructor(fov=50,aspect=1,near=0.1,far=2000){super();this.isPerspectiveCamera=true;this.type="PerspectiveCamera";this.fov=fov;this.zoom=1;this.near=near;this.far=far;this.focus=10;this.aspect=aspect;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}copy(source,recursive){super.copy(source,recursive);this.fov=source.fov;this.zoom=source.zoom;this.near=source.near;this.far=source.far;this.focus=source.focus;this.aspect=source.aspect;this.view=source.view===null?null:Object.assign({},source.view);this.filmGauge=source.filmGauge;this.filmOffset=source.filmOffset;return this}setFocalLength(focalLength){const vExtentSlope=0.5*this.getFilmHeight()/focalLength;this.fov=RAD2DEG*2*Math.atan(vExtentSlope);this.updateProjectionMatrix()}getFocalLength(){const vExtentSlope=Math.tan(DEG2RAD*0.5*this.fov);return 0.5*this.getFilmHeight()/vExtentSlope}getEffectiveFOV(){return RAD2DEG*2*Math.atan(Math.tan(DEG2RAD*0.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(distance,minTarget,maxTarget){_v3$1.set(-1,-1,0.5).applyMatrix4(this.projectionMatrixInverse);minTarget.set(_v3$1.x,_v3$1.y).multiplyScalar(-distance/_v3$1.z);_v3$1.set(1,1,0.5).applyMatrix4(this.projectionMatrixInverse);maxTarget.set(_v3$1.x,_v3$1.y).multiplyScalar(-distance/_v3$1.z)}getViewSize(distance,target){this.getViewBounds(distance,_minTarget,_maxTarget);return target.subVectors(_maxTarget,_minTarget)}setViewOffset(fullWidth,fullHeight,x,y,width,height){this.aspect=fullWidth/fullHeight;if(this.view===null){this.view={enabled:true,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}}this.view.enabled=true;this.view.fullWidth=fullWidth;this.view.fullHeight=fullHeight;this.view.offsetX=x;this.view.offsetY=y;this.view.width=width;this.view.height=height;this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null){this.view.enabled=false}this.updateProjectionMatrix()}updateProjectionMatrix(){const near=this.near;let top=near*Math.tan(DEG2RAD*0.5*this.fov)/this.zoom;let height=2*top;let width=this.aspect*height;let left=-0.5*width;const view=this.view;if(this.view!==null&&this.view.enabled){const fullWidth=view.fullWidth,fullHeight=view.fullHeight;left+=view.offsetX*width/fullWidth;top-=view.offsetY*height/fullHeight;width*=view.width/fullWidth;height*=view.height/fullHeight}const skew=this.filmOffset;if(skew!==0)left+=near*skew/this.getFilmWidth();this.projectionMatrix.makePerspective(left,left+width,top,top-height,near,this.far,this.coordinateSystem,this.reversedDepth);this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(meta){const data=super.toJSON(meta);data.object.fov=this.fov;data.object.zoom=this.zoom;data.object.near=this.near;data.object.far=this.far;data.object.focus=this.focus;data.object.aspect=this.aspect;if(this.view!==null)data.object.view=Object.assign({},this.view);data.object.filmGauge=this.filmGauge;data.object.filmOffset=this.filmOffset;return data}}const fov=-90;const aspect=1;class CubeCamera extends Object3D{constructor(near,far,renderTarget){super();this.type="CubeCamera";this.renderTarget=renderTarget;this.coordinateSystem=null;this.activeMipmapLevel=0;const cameraPX=new PerspectiveCamera(fov,aspect,near,far);cameraPX.layers=this.layers;this.add(cameraPX);const cameraNX=new PerspectiveCamera(fov,aspect,near,far);cameraNX.layers=this.layers;this.add(cameraNX);const cameraPY=new PerspectiveCamera(fov,aspect,near,far);cameraPY.layers=this.layers;this.add(cameraPY);const cameraNY=new PerspectiveCamera(fov,aspect,near,far);cameraNY.layers=this.layers;this.add(cameraNY);const cameraPZ=new PerspectiveCamera(fov,aspect,near,far);cameraPZ.layers=this.layers;this.add(cameraPZ);const cameraNZ=new PerspectiveCamera(fov,aspect,near,far);cameraNZ.layers=this.layers;this.add(cameraNZ)}updateCoordinateSystem(){const coordinateSystem=this.coordinateSystem;const cameras=this.children.concat();const[cameraPX,cameraNX,cameraPY,cameraNY,cameraPZ,cameraNZ]=cameras;for(const camera of cameras)this.remove(camera);if(coordinateSystem===WebGLCoordinateSystem){cameraPX.up.set(0,1,0);cameraPX.lookAt(1,0,0);cameraNX.up.set(0,1,0);cameraNX.lookAt(-1,0,0);cameraPY.up.set(0,0,-1);cameraPY.lookAt(0,1,0);cameraNY.up.set(0,0,1);cameraNY.lookAt(0,-1,0);cameraPZ.up.set(0,1,0);cameraPZ.lookAt(0,0,1);cameraNZ.up.set(0,1,0);cameraNZ.lookAt(0,0,-1)}else if(coordinateSystem===WebGPUCoordinateSystem){cameraPX.up.set(0,-1,0);cameraPX.lookAt(-1,0,0);cameraNX.up.set(0,-1,0);cameraNX.lookAt(1,0,0);cameraPY.up.set(0,0,1);cameraPY.lookAt(0,1,0);cameraNY.up.set(0,0,-1);cameraNY.lookAt(0,-1,0);cameraPZ.up.set(0,-1,0);cameraPZ.lookAt(0,0,1);cameraNZ.up.set(0,-1,0);cameraNZ.lookAt(0,0,-1)}else{throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+coordinateSystem)}for(const camera of cameras){this.add(camera);camera.updateMatrixWorld()}}update(renderer,scene){if(this.parent===null)this.updateMatrixWorld();const{renderTarget,activeMipmapLevel}=this;if(this.coordinateSystem!==renderer.coordinateSystem){this.coordinateSystem=renderer.coordinateSystem;this.updateCoordinateSystem()}const[cameraPX,cameraNX,cameraPY,cameraNY,cameraPZ,cameraNZ]=this.children;const currentRenderTarget=renderer.getRenderTarget();const currentActiveCubeFace=renderer.getActiveCubeFace();const currentActiveMipmapLevel=renderer.getActiveMipmapLevel();const currentXrEnabled=renderer.xr.enabled;renderer.xr.enabled=false;const generateMipmaps=renderTarget.texture.generateMipmaps;renderTarget.texture.generateMipmaps=false;renderer.setRenderTarget(renderTarget,0,activeMipmapLevel);renderer.render(scene,cameraPX);renderer.setRenderTarget(renderTarget,1,activeMipmapLevel);renderer.render(scene,cameraNX);renderer.setRenderTarget(renderTarget,2,activeMipmapLevel);renderer.render(scene,cameraPY);renderer.setRenderTarget(renderTarget,3,activeMipmapLevel);renderer.render(scene,cameraNY);renderer.setRenderTarget(renderTarget,4,activeMipmapLevel);renderer.render(scene,cameraPZ);renderTarget.texture.generateMipmaps=generateMipmaps;renderer.setRenderTarget(renderTarget,5,activeMipmapLevel);renderer.render(scene,cameraNZ);renderer.setRenderTarget(currentRenderTarget,currentActiveCubeFace,currentActiveMipmapLevel);renderer.xr.enabled=currentXrEnabled;renderTarget.texture.needsPMREMUpdate=true}}class CubeTexture extends Texture{constructor(images=[],mapping=CubeReflectionMapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace){super(images,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isCubeTexture=true;this.flipY=false}get images(){return this.image}set images(value){this.image=value}}class WebGLCubeRenderTarget extends WebGLRenderTarget{constructor(size=1,options={}){super(size,size,options);this.isWebGLCubeRenderTarget=true;const image={width:size,height:size,depth:1};const images=[image,image,image,image,image,image];this.texture=new CubeTexture(images);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}fromEquirectangularTexture(renderer,texture){this.texture.type=texture.type;this.texture.colorSpace=texture.colorSpace;this.texture.generateMipmaps=texture.generateMipmaps;this.texture.minFilter=texture.minFilter;this.texture.magFilter=texture.magFilter;const shader={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {

					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`};const geometry=new BoxGeometry(5,5,5);const material=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(shader.uniforms),vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader,side:BackSide,blending:NoBlending});material.uniforms.tEquirect.value=texture;const mesh=new Mesh(geometry,material);const currentMinFilter=texture.minFilter;if(texture.minFilter===LinearMipmapLinearFilter)texture.minFilter=LinearFilter;const camera=new CubeCamera(1,10,this);camera.update(renderer,mesh);texture.minFilter=currentMinFilter;mesh.geometry.dispose();mesh.material.dispose();return this}clear(renderer,color=true,depth=true,stencil=true){const currentRenderTarget=renderer.getRenderTarget();for(let i=0;i<6;i++){renderer.setRenderTarget(this,i);renderer.clear(color,depth,stencil)}renderer.setRenderTarget(currentRenderTarget)}}class Group extends Object3D{constructor(){super();this.isGroup=true;this.type="Group"}}const _moveEvent={type:"move"};class WebXRController{constructor(){this._targetRay=null;this._grip=null;this._hand=null}getHandSpace(){if(this._hand===null){this._hand=new Group;this._hand.matrixAutoUpdate=false;this._hand.visible=false;this._hand.joints={};this._hand.inputState={pinching:false}}return this._hand}getTargetRaySpace(){if(this._targetRay===null){this._targetRay=new Group;this._targetRay.matrixAutoUpdate=false;this._targetRay.visible=false;this._targetRay.hasLinearVelocity=false;this._targetRay.linearVelocity=new Vector3;this._targetRay.hasAngularVelocity=false;this._targetRay.angularVelocity=new Vector3}return this._targetRay}getGripSpace(){if(this._grip===null){this._grip=new Group;this._grip.matrixAutoUpdate=false;this._grip.visible=false;this._grip.hasLinearVelocity=false;this._grip.linearVelocity=new Vector3;this._grip.hasAngularVelocity=false;this._grip.angularVelocity=new Vector3}return this._grip}dispatchEvent(event){if(this._targetRay!==null){this._targetRay.dispatchEvent(event)}if(this._grip!==null){this._grip.dispatchEvent(event)}if(this._hand!==null){this._hand.dispatchEvent(event)}return this}connect(inputSource){if(inputSource&&inputSource.hand){const hand=this._hand;if(hand){for(const inputjoint of inputSource.hand.values()){this._getHandJoint(hand,inputjoint)}}}this.dispatchEvent({type:"connected",data:inputSource});return this}disconnect(inputSource){this.dispatchEvent({type:"disconnected",data:inputSource});if(this._targetRay!==null){this._targetRay.visible=false}if(this._grip!==null){this._grip.visible=false}if(this._hand!==null){this._hand.visible=false}return this}update(inputSource,frame,referenceSpace){let inputPose=null;let gripPose=null;let handPose=null;const targetRay=this._targetRay;const grip=this._grip;const hand=this._hand;if(inputSource&&frame.session.visibilityState!=="visible-blurred"){if(hand&&inputSource.hand){handPose=true;for(const inputjoint of inputSource.hand.values()){const jointPose=frame.getJointPose(inputjoint,referenceSpace);const joint=this._getHandJoint(hand,inputjoint);if(jointPose!==null){joint.matrix.fromArray(jointPose.transform.matrix);joint.matrix.decompose(joint.position,joint.rotation,joint.scale);joint.matrixWorldNeedsUpdate=true;joint.jointRadius=jointPose.radius}joint.visible=jointPose!==null}const indexTip=hand.joints["index-finger-tip"];const thumbTip=hand.joints["thumb-tip"];const distance=indexTip.position.distanceTo(thumbTip.position);const distanceToPinch=0.02;const threshold=0.005;if(hand.inputState.pinching&&distance>distanceToPinch+threshold){hand.inputState.pinching=false;this.dispatchEvent({type:"pinchend",handedness:inputSource.handedness,target:this})}else if(!hand.inputState.pinching&&distance<=distanceToPinch-threshold){hand.inputState.pinching=true;this.dispatchEvent({type:"pinchstart",handedness:inputSource.handedness,target:this})}}else{if(grip!==null&&inputSource.gripSpace){gripPose=frame.getPose(inputSource.gripSpace,referenceSpace);if(gripPose!==null){grip.matrix.fromArray(gripPose.transform.matrix);grip.matrix.decompose(grip.position,grip.rotation,grip.scale);grip.matrixWorldNeedsUpdate=true;if(gripPose.linearVelocity){grip.hasLinearVelocity=true;grip.linearVelocity.copy(gripPose.linearVelocity)}else{grip.hasLinearVelocity=false}if(gripPose.angularVelocity){grip.hasAngularVelocity=true;grip.angularVelocity.copy(gripPose.angularVelocity)}else{grip.hasAngularVelocity=false}}}}if(targetRay!==null){inputPose=frame.getPose(inputSource.targetRaySpace,referenceSpace);if(inputPose===null&&gripPose!==null){inputPose=gripPose}if(inputPose!==null){targetRay.matrix.fromArray(inputPose.transform.matrix);targetRay.matrix.decompose(targetRay.position,targetRay.rotation,targetRay.scale);targetRay.matrixWorldNeedsUpdate=true;if(inputPose.linearVelocity){targetRay.hasLinearVelocity=true;targetRay.linearVelocity.copy(inputPose.linearVelocity)}else{targetRay.hasLinearVelocity=false}if(inputPose.angularVelocity){targetRay.hasAngularVelocity=true;targetRay.angularVelocity.copy(inputPose.angularVelocity)}else{targetRay.hasAngularVelocity=false}this.dispatchEvent(_moveEvent)}}}if(targetRay!==null){targetRay.visible=inputPose!==null}if(grip!==null){grip.visible=gripPose!==null}if(hand!==null){hand.visible=handPose!==null}return this}_getHandJoint(hand,inputjoint){if(hand.joints[inputjoint.jointName]===undefined){const joint=new Group;joint.matrixAutoUpdate=false;joint.visible=false;hand.joints[inputjoint.jointName]=joint;hand.add(joint)}return hand.joints[inputjoint.jointName]}}class FogExp2{constructor(color,density=0.00025){this.isFogExp2=true;this.name="";this.color=new Color(color);this.density=density}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Fog{constructor(color,near=1,far=1000){this.isFog=true;this.name="";this.color=new Color(color);this.near=near;this.far=far}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Scene extends Object3D{constructor(){super();this.isScene=true;this.type="Scene";this.background=null;this.environment=null;this.fog=null;this.backgroundBlurriness=0;this.backgroundIntensity=1;this.backgroundRotation=new Euler;this.environmentIntensity=1;this.environmentRotation=new Euler;this.overrideMaterial=null;if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}copy(source,recursive){super.copy(source,recursive);if(source.background!==null)this.background=source.background.clone();if(source.environment!==null)this.environment=source.environment.clone();if(source.fog!==null)this.fog=source.fog.clone();this.backgroundBlurriness=source.backgroundBlurriness;this.backgroundIntensity=source.backgroundIntensity;this.backgroundRotation.copy(source.backgroundRotation);this.environmentIntensity=source.environmentIntensity;this.environmentRotation.copy(source.environmentRotation);if(source.overrideMaterial!==null)this.overrideMaterial=source.overrideMaterial.clone();this.matrixAutoUpdate=source.matrixAutoUpdate;return this}toJSON(meta){const data=super.toJSON(meta);if(this.fog!==null)data.object.fog=this.fog.toJSON();if(this.backgroundBlurriness>0)data.object.backgroundBlurriness=this.backgroundBlurriness;if(this.backgroundIntensity!==1)data.object.backgroundIntensity=this.backgroundIntensity;data.object.backgroundRotation=this.backgroundRotation.toArray();if(this.environmentIntensity!==1)data.object.environmentIntensity=this.environmentIntensity;data.object.environmentRotation=this.environmentRotation.toArray();return data}}class InterleavedBuffer{constructor(array,stride){this.isInterleavedBuffer=true;this.array=array;this.stride=stride;this.count=array!==undefined?array.length/stride:0;this.usage=StaticDrawUsage;this.updateRanges=[];this.version=0;this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}setUsage(value){this.usage=value;return this}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){this.array=new source.array.constructor(source.array);this.count=source.count;this.stride=source.stride;this.usage=source.usage;return this}copyAt(index1,interleavedBuffer,index2){index1*=this.stride;index2*=interleavedBuffer.stride;for(let i=0,l=this.stride;i<l;i++){this.array[index1+i]=interleavedBuffer.array[index2+i]}return this}set(value,offset=0){this.array.set(value,offset);return this}clone(data){if(data.arrayBuffers===undefined){data.arrayBuffers={}}if(this.array.buffer._uuid===undefined){this.array.buffer._uuid=generateUUID()}if(data.arrayBuffers[this.array.buffer._uuid]===undefined){data.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer}const array=new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]);const ib=new this.constructor(array,this.stride);ib.setUsage(this.usage);return ib}onUpload(callback){this.onUploadCallback=callback;return this}toJSON(data){if(data.arrayBuffers===undefined){data.arrayBuffers={}}if(this.array.buffer._uuid===undefined){this.array.buffer._uuid=generateUUID()}if(data.arrayBuffers[this.array.buffer._uuid]===undefined){data.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))}return{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const _vector$7=new Vector3;class InterleavedBufferAttribute{constructor(interleavedBuffer,itemSize,offset,normalized=false){this.isInterleavedBufferAttribute=true;this.name="";this.data=interleavedBuffer;this.itemSize=itemSize;this.offset=offset;this.normalized=normalized}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(value){this.data.needsUpdate=value}applyMatrix4(m){for(let i=0,l=this.data.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.applyMatrix4(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.applyNormalMatrix(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.transformDirection(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}getComponent(index,component){let value=this.array[index*this.data.stride+this.offset+component];if(this.normalized)value=denormalize(value,this.array);return value}setComponent(index,component,value){if(this.normalized)value=normalize(value,this.array);this.data.array[index*this.data.stride+this.offset+component]=value;return this}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.data.array[index*this.data.stride+this.offset]=x;return this}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.data.array[index*this.data.stride+this.offset+1]=y;return this}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.data.array[index*this.data.stride+this.offset+2]=z;return this}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.data.array[index*this.data.stride+this.offset+3]=w;return this}getX(index){let x=this.data.array[index*this.data.stride+this.offset];if(this.normalized)x=denormalize(x,this.array);return x}getY(index){let y=this.data.array[index*this.data.stride+this.offset+1];if(this.normalized)y=denormalize(y,this.array);return y}getZ(index){let z=this.data.array[index*this.data.stride+this.offset+2];if(this.normalized)z=denormalize(z,this.array);return z}getW(index){let w=this.data.array[index*this.data.stride+this.offset+3];if(this.normalized)w=denormalize(w,this.array);return w}setXY(index,x,y){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;return this}setXYZ(index,x,y,z){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;this.data.array[index+2]=z;return this}setXYZW(index,x,y,z,w){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;this.data.array[index+2]=z;this.data.array[index+3]=w;return this}clone(data){if(data===undefined){log("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const array=[];for(let i=0;i<this.count;i++){const index=i*this.data.stride+this.offset;for(let j=0;j<this.itemSize;j++){array.push(this.data.array[index+j])}}return new BufferAttribute(new this.array.constructor(array),this.itemSize,this.normalized)}else{if(data.interleavedBuffers===undefined){data.interleavedBuffers={}}if(data.interleavedBuffers[this.data.uuid]===undefined){data.interleavedBuffers[this.data.uuid]=this.data.clone(data)}return new InterleavedBufferAttribute(data.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}}toJSON(data){if(data===undefined){log("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const array=[];for(let i=0;i<this.count;i++){const index=i*this.data.stride+this.offset;for(let j=0;j<this.itemSize;j++){array.push(this.data.array[index+j])}}return{itemSize:this.itemSize,type:this.array.constructor.name,array:array,normalized:this.normalized}}else{if(data.interleavedBuffers===undefined){data.interleavedBuffers={}}if(data.interleavedBuffers[this.data.uuid]===undefined){data.interleavedBuffers[this.data.uuid]=this.data.toJSON(data)}return{isInterleavedBufferAttribute:true,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}}class SpriteMaterial extends Material{constructor(parameters){super();this.isSpriteMaterial=true;this.type="SpriteMaterial";this.color=new Color(16777215);this.map=null;this.alphaMap=null;this.rotation=0;this.sizeAttenuation=true;this.transparent=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.alphaMap=source.alphaMap;this.rotation=source.rotation;this.sizeAttenuation=source.sizeAttenuation;this.fog=source.fog;return this}}let _geometry;const _intersectPoint=new Vector3;const _worldScale=new Vector3;const _mvPosition=new Vector3;const _alignedPosition=new Vector2;const _rotatedPosition=new Vector2;const _viewWorldMatrix=new Matrix4;const _vA=new Vector3;const _vB=new Vector3;const _vC=new Vector3;const _uvA=new Vector2;const _uvB=new Vector2;const _uvC=new Vector2;class Sprite extends Object3D{constructor(material=new SpriteMaterial){super();this.isSprite=true;this.type="Sprite";if(_geometry===undefined){_geometry=new BufferGeometry;const float32Array=new Float32Array([-0.5,-0.5,0,0,0,0.5,-0.5,0,1,0,0.5,0.5,0,1,1,-0.5,0.5,0,0,1]);const interleavedBuffer=new InterleavedBuffer(float32Array,5);_geometry.setIndex([0,1,2,0,2,3]);_geometry.setAttribute("position",new InterleavedBufferAttribute(interleavedBuffer,3,0,false));_geometry.setAttribute("uv",new InterleavedBufferAttribute(interleavedBuffer,2,3,false))}this.geometry=_geometry;this.material=material;this.center=new Vector2(0.5,0.5);this.count=1}raycast(raycaster,intersects){if(raycaster.camera===null){error("Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.")}_worldScale.setFromMatrixScale(this.matrixWorld);_viewWorldMatrix.copy(raycaster.camera.matrixWorld);this.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse,this.matrixWorld);_mvPosition.setFromMatrixPosition(this.modelViewMatrix);if(raycaster.camera.isPerspectiveCamera&&this.material.sizeAttenuation===false){_worldScale.multiplyScalar(-_mvPosition.z)}const rotation=this.material.rotation;let sin,cos;if(rotation!==0){cos=Math.cos(rotation);sin=Math.sin(rotation)}const center=this.center;transformVertex(_vA.set(-0.5,-0.5,0),_mvPosition,center,_worldScale,sin,cos);transformVertex(_vB.set(0.5,-0.5,0),_mvPosition,center,_worldScale,sin,cos);transformVertex(_vC.set(0.5,0.5,0),_mvPosition,center,_worldScale,sin,cos);_uvA.set(0,0);_uvB.set(1,0);_uvC.set(1,1);let intersect=raycaster.ray.intersectTriangle(_vA,_vB,_vC,false,_intersectPoint);if(intersect===null){transformVertex(_vB.set(-0.5,0.5,0),_mvPosition,center,_worldScale,sin,cos);_uvB.set(0,1);intersect=raycaster.ray.intersectTriangle(_vA,_vC,_vB,false,_intersectPoint);if(intersect===null){return}}const distance=raycaster.ray.origin.distanceTo(_intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,point:_intersectPoint.clone(),uv:Triangle.getInterpolation(_intersectPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2),face:null,object:this})}copy(source,recursive){super.copy(source,recursive);if(source.center!==undefined)this.center.copy(source.center);this.material=source.material;return this}}function transformVertex(vertexPosition,mvPosition,center,scale,sin,cos){_alignedPosition.subVectors(vertexPosition,center).addScalar(0.5).multiply(scale);if(sin!==undefined){_rotatedPosition.x=cos*_alignedPosition.x-sin*_alignedPosition.y;_rotatedPosition.y=sin*_alignedPosition.x+cos*_alignedPosition.y}else{_rotatedPosition.copy(_alignedPosition)}vertexPosition.copy(mvPosition);vertexPosition.x+=_rotatedPosition.x;vertexPosition.y+=_rotatedPosition.y;vertexPosition.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3;const _v2$1=new Vector3;class LOD extends Object3D{constructor(){super();this.isLOD=true;this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:true,value:[]}});this.autoUpdate=true}copy(source){super.copy(source,false);const levels=source.levels;for(let i=0,l=levels.length;i<l;i++){const level=levels[i];this.addLevel(level.object.clone(),level.distance,level.hysteresis)}this.autoUpdate=source.autoUpdate;return this}addLevel(object,distance=0,hysteresis=0){distance=Math.abs(distance);const levels=this.levels;let l;for(l=0;l<levels.length;l++){if(distance<levels[l].distance){break}}levels.splice(l,0,{distance:distance,hysteresis:hysteresis,object:object});this.add(object);return this}removeLevel(distance){const levels=this.levels;for(let i=0;i<levels.length;i++){if(levels[i].distance===distance){const removedElements=levels.splice(i,1);this.remove(removedElements[0].object);return true}}return false}getCurrentLevel(){return this._currentLevel}getObjectForDistance(distance){const levels=this.levels;if(levels.length>0){let i,l;for(i=1,l=levels.length;i<l;i++){let levelDistance=levels[i].distance;if(levels[i].object.visible){levelDistance-=levelDistance*levels[i].hysteresis}if(distance<levelDistance){break}}return levels[i-1].object}return null}raycast(raycaster,intersects){const levels=this.levels;if(levels.length>0){_v1$2.setFromMatrixPosition(this.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(distance).raycast(raycaster,intersects)}}update(camera){const levels=this.levels;if(levels.length>1){_v1$2.setFromMatrixPosition(camera.matrixWorld);_v2$1.setFromMatrixPosition(this.matrixWorld);const distance=_v1$2.distanceTo(_v2$1)/camera.zoom;levels[0].object.visible=true;let i,l;for(i=1,l=levels.length;i<l;i++){let levelDistance=levels[i].distance;if(levels[i].object.visible){levelDistance-=levelDistance*levels[i].hysteresis}if(distance>=levelDistance){levels[i-1].object.visible=false;levels[i].object.visible=true}else{break}}this._currentLevel=i-1;for(;i<l;i++){levels[i].object.visible=false}}}toJSON(meta){const data=super.toJSON(meta);if(this.autoUpdate===false)data.object.autoUpdate=false;data.object.levels=[];const levels=this.levels;for(let i=0,l=levels.length;i<l;i++){const level=levels[i];data.object.levels.push({object:level.object.uuid,distance:level.distance,hysteresis:level.hysteresis})}return data}}const _basePosition=new Vector3;const _skinIndex=new Vector4;const _skinWeight=new Vector4;const _vector3=new Vector3;const _matrix4=new Matrix4;const _vertex=new Vector3;const _sphere$5=new Sphere;const _inverseMatrix$2=new Matrix4;const _ray$2=new Ray;class SkinnedMesh extends Mesh{constructor(geometry,material){super(geometry,material);this.isSkinnedMesh=true;this.type="SkinnedMesh";this.bindMode=AttachedBindMode;this.bindMatrix=new Matrix4;this.bindMatrixInverse=new Matrix4;this.boundingBox=null;this.boundingSphere=null}computeBoundingBox(){const geometry=this.geometry;if(this.boundingBox===null){this.boundingBox=new Box3}this.boundingBox.makeEmpty();const positionAttribute=geometry.getAttribute("position");for(let i=0;i<positionAttribute.count;i++){this.getVertexPosition(i,_vertex);this.boundingBox.expandByPoint(_vertex)}}computeBoundingSphere(){const geometry=this.geometry;if(this.boundingSphere===null){this.boundingSphere=new Sphere}this.boundingSphere.makeEmpty();const positionAttribute=geometry.getAttribute("position");for(let i=0;i<positionAttribute.count;i++){this.getVertexPosition(i,_vertex);this.boundingSphere.expandByPoint(_vertex)}}copy(source,recursive){super.copy(source,recursive);this.bindMode=source.bindMode;this.bindMatrix.copy(source.bindMatrix);this.bindMatrixInverse.copy(source.bindMatrixInverse);this.skeleton=source.skeleton;if(source.boundingBox!==null)this.boundingBox=source.boundingBox.clone();if(source.boundingSphere!==null)this.boundingSphere=source.boundingSphere.clone();return this}raycast(raycaster,intersects){const material=this.material;const matrixWorld=this.matrixWorld;if(material===undefined)return;if(this.boundingSphere===null)this.computeBoundingSphere();_sphere$5.copy(this.boundingSphere);_sphere$5.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$5)===false)return;_inverseMatrix$2.copy(matrixWorld).invert();_ray$2.copy(raycaster.ray).applyMatrix4(_inverseMatrix$2);if(this.boundingBox!==null){if(_ray$2.intersectsBox(this.boundingBox)===false)return}this._computeIntersections(raycaster,intersects,_ray$2)}getVertexPosition(index,target){super.getVertexPosition(index,target);this.applyBoneTransform(index,target);return target}bind(skeleton,bindMatrix){this.skeleton=skeleton;if(bindMatrix===undefined){this.updateMatrixWorld(true);this.skeleton.calculateInverses();bindMatrix=this.matrixWorld}this.bindMatrix.copy(bindMatrix);this.bindMatrixInverse.copy(bindMatrix).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const vector=new Vector4;const skinWeight=this.geometry.attributes.skinWeight;for(let i=0,l=skinWeight.count;i<l;i++){vector.fromBufferAttribute(skinWeight,i);const scale=1/vector.manhattanLength();if(scale!==Infinity){vector.multiplyScalar(scale)}else{vector.set(1,0,0,0)}skinWeight.setXYZW(i,vector.x,vector.y,vector.z,vector.w)}}updateMatrixWorld(force){super.updateMatrixWorld(force);if(this.bindMode===AttachedBindMode){this.bindMatrixInverse.copy(this.matrixWorld).invert()}else if(this.bindMode===DetachedBindMode){this.bindMatrixInverse.copy(this.bindMatrix).invert()}else{warn("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}}applyBoneTransform(index,target){const skeleton=this.skeleton;const geometry=this.geometry;_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex,index);_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight,index);_basePosition.copy(target).applyMatrix4(this.bindMatrix);target.set(0,0,0);for(let i=0;i<4;i++){const weight=_skinWeight.getComponent(i);if(weight!==0){const boneIndex=_skinIndex.getComponent(i);_matrix4.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld,skeleton.boneInverses[boneIndex]);target.addScaledVector(_vector3.copy(_basePosition).applyMatrix4(_matrix4),weight)}}return target.applyMatrix4(this.bindMatrixInverse)}}class Bone extends Object3D{constructor(){super();this.isBone=true;this.type="Bone"}}class DataTexture extends Texture{constructor(data=null,width=1,height=1,format,type,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isDataTexture=true;this.image={data:data,width:width,height:height};this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1}}const _offsetMatrix=new Matrix4;const _identityMatrix=new Matrix4;class Skeleton{constructor(bones=[],boneInverses=[]){this.uuid=generateUUID();this.bones=bones.slice(0);this.boneInverses=boneInverses;this.boneMatrices=null;this.previousBoneMatrices=null;this.boneTexture=null;this.init()}init(){const bones=this.bones;const boneInverses=this.boneInverses;this.boneMatrices=new Float32Array(bones.length*16);if(boneInverses.length===0){this.calculateInverses()}else{if(bones.length!==boneInverses.length){warn("Skeleton: Number of inverse bone matrices does not match amount of bones.");this.boneInverses=[];for(let i=0,il=this.bones.length;i<il;i++){this.boneInverses.push(new Matrix4)}}}}calculateInverses(){this.boneInverses.length=0;for(let i=0,il=this.bones.length;i<il;i++){const inverse=new Matrix4;if(this.bones[i]){inverse.copy(this.bones[i].matrixWorld).invert()}this.boneInverses.push(inverse)}}pose(){for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone){bone.matrixWorld.copy(this.boneInverses[i]).invert()}}for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone){if(bone.parent&&bone.parent.isBone){bone.matrix.copy(bone.parent.matrixWorld).invert();bone.matrix.multiply(bone.matrixWorld)}else{bone.matrix.copy(bone.matrixWorld)}bone.matrix.decompose(bone.position,bone.quaternion,bone.scale)}}}update(){const bones=this.bones;const boneInverses=this.boneInverses;const boneMatrices=this.boneMatrices;const boneTexture=this.boneTexture;for(let i=0,il=bones.length;i<il;i++){const matrix=bones[i]?bones[i].matrixWorld:_identityMatrix;_offsetMatrix.multiplyMatrices(matrix,boneInverses[i]);_offsetMatrix.toArray(boneMatrices,i*16)}if(boneTexture!==null){boneTexture.needsUpdate=true}}clone(){return new Skeleton(this.bones,this.boneInverses)}computeBoneTexture(){let size=Math.sqrt(this.bones.length*4);size=Math.ceil(size/4)*4;size=Math.max(size,4);const boneMatrices=new Float32Array(size*size*4);boneMatrices.set(this.boneMatrices);const boneTexture=new DataTexture(boneMatrices,size,size,RGBAFormat,FloatType);boneTexture.needsUpdate=true;this.boneMatrices=boneMatrices;this.boneTexture=boneTexture;return this}getBoneByName(name){for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone.name===name){return bone}}return undefined}dispose(){if(this.boneTexture!==null){this.boneTexture.dispose();this.boneTexture=null}}fromJSON(json,bones){this.uuid=json.uuid;for(let i=0,l=json.bones.length;i<l;i++){const uuid=json.bones[i];let bone=bones[uuid];if(bone===undefined){warn("Skeleton: No bone found with UUID:",uuid);bone=new Bone}this.bones.push(bone);this.boneInverses.push(new Matrix4().fromArray(json.boneInverses[i]))}this.init();return this}toJSON(){const data={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};data.uuid=this.uuid;const bones=this.bones;const boneInverses=this.boneInverses;for(let i=0,l=bones.length;i<l;i++){const bone=bones[i];data.bones.push(bone.uuid);const boneInverse=boneInverses[i];data.boneInverses.push(boneInverse.toArray())}return data}}class InstancedBufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized,meshPerAttribute=1){super(array,itemSize,normalized);this.isInstancedBufferAttribute=true;this.meshPerAttribute=meshPerAttribute}copy(source){super.copy(source);this.meshPerAttribute=source.meshPerAttribute;return this}toJSON(){const data=super.toJSON();data.meshPerAttribute=this.meshPerAttribute;data.isInstancedBufferAttribute=true;return data}}const _instanceLocalMatrix=new Matrix4;const _instanceWorldMatrix=new Matrix4;const _instanceIntersects=[];const _box3=new Box3;const _identity=new Matrix4;const _mesh$1=new Mesh;const _sphere$4=new Sphere;class InstancedMesh extends Mesh{constructor(geometry,material,count){super(geometry,material);this.isInstancedMesh=true;this.instanceMatrix=new InstancedBufferAttribute(new Float32Array(count*16),16);this.instanceColor=null;this.morphTexture=null;this.count=count;this.boundingBox=null;this.boundingSphere=null;for(let i=0;i<count;i++){this.setMatrixAt(i,_identity)}}computeBoundingBox(){const geometry=this.geometry;const count=this.count;if(this.boundingBox===null){this.boundingBox=new Box3}if(geometry.boundingBox===null){geometry.computeBoundingBox()}this.boundingBox.makeEmpty();for(let i=0;i<count;i++){this.getMatrixAt(i,_instanceLocalMatrix);_box3.copy(geometry.boundingBox).applyMatrix4(_instanceLocalMatrix);this.boundingBox.union(_box3)}}computeBoundingSphere(){const geometry=this.geometry;const count=this.count;if(this.boundingSphere===null){this.boundingSphere=new Sphere}if(geometry.boundingSphere===null){geometry.computeBoundingSphere()}this.boundingSphere.makeEmpty();for(let i=0;i<count;i++){this.getMatrixAt(i,_instanceLocalMatrix);_sphere$4.copy(geometry.boundingSphere).applyMatrix4(_instanceLocalMatrix);this.boundingSphere.union(_sphere$4)}}copy(source,recursive){super.copy(source,recursive);this.instanceMatrix.copy(source.instanceMatrix);if(source.morphTexture!==null)this.morphTexture=source.morphTexture.clone();if(source.instanceColor!==null)this.instanceColor=source.instanceColor.clone();this.count=source.count;if(source.boundingBox!==null)this.boundingBox=source.boundingBox.clone();if(source.boundingSphere!==null)this.boundingSphere=source.boundingSphere.clone();return this}getColorAt(index,color){color.fromArray(this.instanceColor.array,index*3)}getMatrixAt(index,matrix){matrix.fromArray(this.instanceMatrix.array,index*16)}getMorphAt(index,object){const objectInfluences=object.morphTargetInfluences;const array=this.morphTexture.source.data.data;const len=objectInfluences.length+1;const dataIndex=index*len+1;for(let i=0;i<objectInfluences.length;i++){objectInfluences[i]=array[dataIndex+i]}}raycast(raycaster,intersects){const matrixWorld=this.matrixWorld;const raycastTimes=this.count;_mesh$1.geometry=this.geometry;_mesh$1.material=this.material;if(_mesh$1.material===undefined)return;if(this.boundingSphere===null)this.computeBoundingSphere();_sphere$4.copy(this.boundingSphere);_sphere$4.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$4)===false)return;for(let instanceId=0;instanceId<raycastTimes;instanceId++){this.getMatrixAt(instanceId,_instanceLocalMatrix);_instanceWorldMatrix.multiplyMatrices(matrixWorld,_instanceLocalMatrix);_mesh$1.matrixWorld=_instanceWorldMatrix;_mesh$1.raycast(raycaster,_instanceIntersects);for(let i=0,l=_instanceIntersects.length;i<l;i++){const intersect=_instanceIntersects[i];intersect.instanceId=instanceId;intersect.object=this;intersects.push(intersect)}_instanceIntersects.length=0}}setColorAt(index,color){if(this.instanceColor===null){this.instanceColor=new InstancedBufferAttribute(new Float32Array(this.instanceMatrix.count*3).fill(1),3)}color.toArray(this.instanceColor.array,index*3)}setMatrixAt(index,matrix){matrix.toArray(this.instanceMatrix.array,index*16)}setMorphAt(index,object){const objectInfluences=object.morphTargetInfluences;const len=objectInfluences.length+1;if(this.morphTexture===null){this.morphTexture=new DataTexture(new Float32Array(len*this.count),len,this.count,RedFormat,FloatType)}const array=this.morphTexture.source.data.data;let morphInfluencesSum=0;for(let i=0;i<objectInfluences.length;i++){morphInfluencesSum+=objectInfluences[i]}const morphBaseInfluence=this.geometry.morphTargetsRelative?1:1-morphInfluencesSum;const dataIndex=len*index;array[dataIndex]=morphBaseInfluence;array.set(objectInfluences,dataIndex+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"});if(this.morphTexture!==null){this.morphTexture.dispose();this.morphTexture=null}}}const _vector1=new Vector3;const _vector2=new Vector3;const _normalMatrix=new Matrix3;class Plane{constructor(normal=new Vector3(1,0,0),constant=0){this.isPlane=true;this.normal=normal;this.constant=constant}set(normal,constant){this.normal.copy(normal);this.constant=constant;return this}setComponents(x,y,z,w){this.normal.set(x,y,z);this.constant=w;return this}setFromNormalAndCoplanarPoint(normal,point){this.normal.copy(normal);this.constant=-point.dot(this.normal);return this}setFromCoplanarPoints(a,b,c){const normal=_vector1.subVectors(c,b).cross(_vector2.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(normal,a);return this}copy(plane){this.normal.copy(plane.normal);this.constant=plane.constant;return this}normalize(){const inverseNormalLength=1/this.normal.length();this.normal.multiplyScalar(inverseNormalLength);this.constant*=inverseNormalLength;return this}negate(){this.constant*=-1;this.normal.negate();return this}distanceToPoint(point){return this.normal.dot(point)+this.constant}distanceToSphere(sphere){return this.distanceToPoint(sphere.center)-sphere.radius}projectPoint(point,target){return target.copy(point).addScaledVector(this.normal,-this.distanceToPoint(point))}intersectLine(line,target){const direction=line.delta(_vector1);const denominator=this.normal.dot(direction);if(denominator===0){if(this.distanceToPoint(line.start)===0){return target.copy(line.start)}return null}const t=-(line.start.dot(this.normal)+this.constant)/denominator;if(t<0||t>1){return null}return target.copy(line.start).addScaledVector(direction,t)}intersectsLine(line){const startSign=this.distanceToPoint(line.start);const endSign=this.distanceToPoint(line.end);return startSign<0&&endSign>0||endSign<0&&startSign>0}intersectsBox(box){return box.intersectsPlane(this)}intersectsSphere(sphere){return sphere.intersectsPlane(this)}coplanarPoint(target){return target.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(matrix,optionalNormalMatrix){const normalMatrix=optionalNormalMatrix||_normalMatrix.getNormalMatrix(matrix);const referencePoint=this.coplanarPoint(_vector1).applyMatrix4(matrix);const normal=this.normal.applyMatrix3(normalMatrix).normalize();this.constant=-referencePoint.dot(normal);return this}translate(offset){this.constant-=offset.dot(this.normal);return this}equals(plane){return plane.normal.equals(this.normal)&&plane.constant===this.constant}clone(){return new this.constructor().copy(this)}}const _sphere$3=new Sphere;const _defaultSpriteCenter=new Vector2(0.5,0.5);const _vector$6=new Vector3;class Frustum{constructor(p0=new Plane,p1=new Plane,p2=new Plane,p3=new Plane,p4=new Plane,p5=new Plane){this.planes=[p0,p1,p2,p3,p4,p5]}set(p0,p1,p2,p3,p4,p5){const planes=this.planes;planes[0].copy(p0);planes[1].copy(p1);planes[2].copy(p2);planes[3].copy(p3);planes[4].copy(p4);planes[5].copy(p5);return this}copy(frustum){const planes=this.planes;for(let i=0;i<6;i++){planes[i].copy(frustum.planes[i])}return this}setFromProjectionMatrix(m,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const planes=this.planes;const me=m.elements;const me0=me[0],me1=me[1],me2=me[2],me3=me[3];const me4=me[4],me5=me[5],me6=me[6],me7=me[7];const me8=me[8],me9=me[9],me10=me[10],me11=me[11];const me12=me[12],me13=me[13],me14=me[14],me15=me[15];planes[0].setComponents(me3-me0,me7-me4,me11-me8,me15-me12).normalize();planes[1].setComponents(me3+me0,me7+me4,me11+me8,me15+me12).normalize();planes[2].setComponents(me3+me1,me7+me5,me11+me9,me15+me13).normalize();planes[3].setComponents(me3-me1,me7-me5,me11-me9,me15-me13).normalize();if(reversedDepth){planes[4].setComponents(me2,me6,me10,me14).normalize();planes[5].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize()}else{planes[4].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize();if(coordinateSystem===WebGLCoordinateSystem){planes[5].setComponents(me3+me2,me7+me6,me11+me10,me15+me14).normalize()}else if(coordinateSystem===WebGPUCoordinateSystem){planes[5].setComponents(me2,me6,me10,me14).normalize()}else{throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+coordinateSystem)}}return this}intersectsObject(object){if(object.boundingSphere!==undefined){if(object.boundingSphere===null)object.computeBoundingSphere();_sphere$3.copy(object.boundingSphere).applyMatrix4(object.matrixWorld)}else{const geometry=object.geometry;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$3.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld)}return this.intersectsSphere(_sphere$3)}intersectsSprite(sprite){_sphere$3.center.set(0,0,0);const offset=_defaultSpriteCenter.distanceTo(sprite.center);_sphere$3.radius=0.7071067811865476+offset;_sphere$3.applyMatrix4(sprite.matrixWorld);return this.intersectsSphere(_sphere$3)}intersectsSphere(sphere){const planes=this.planes;const center=sphere.center;const negRadius=-sphere.radius;for(let i=0;i<6;i++){const distance=planes[i].distanceToPoint(center);if(distance<negRadius){return false}}return true}intersectsBox(box){const planes=this.planes;for(let i=0;i<6;i++){const plane=planes[i];_vector$6.x=plane.normal.x>0?box.max.x:box.min.x;_vector$6.y=plane.normal.y>0?box.max.y:box.min.y;_vector$6.z=plane.normal.z>0?box.max.z:box.min.z;if(plane.distanceToPoint(_vector$6)<0){return false}}return true}containsPoint(point){const planes=this.planes;for(let i=0;i<6;i++){if(planes[i].distanceToPoint(point)<0){return false}}return true}clone(){return new this.constructor().copy(this)}}const _projScreenMatrix$2=new Matrix4;const _frustum$1=new Frustum;class FrustumArray{constructor(){this.coordinateSystem=WebGLCoordinateSystem}intersectsObject(object,cameraArray){if(!cameraArray.isArrayCamera||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsObject(object)){return true}}return false}intersectsSprite(sprite,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsSprite(sprite)){return true}}return false}intersectsSphere(sphere,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsSphere(sphere)){return true}}return false}intersectsBox(box,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsBox(box)){return true}}return false}containsPoint(point,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.containsPoint(point)){return true}}return false}clone(){return new FrustumArray}}function ascIdSort(a,b){return a-b}function sortOpaque(a,b){return a.z-b.z}function sortTransparent(a,b){return b.z-a.z}class MultiDrawRenderList{constructor(){this.index=0;this.pool=[];this.list=[]}push(start,count,z,index){const pool=this.pool;const list=this.list;if(this.index>=pool.length){pool.push({start:-1,count:-1,z:-1,index:-1})}const item=pool[this.index];list.push(item);this.index++;item.start=start;item.count=count;item.z=z;item.index=index}reset(){this.list.length=0;this.index=0}}const _matrix$1=new Matrix4;const _whiteColor=new Color(1,1,1);const _frustum=new Frustum;const _frustumArray=new FrustumArray;const _box$1=new Box3;const _sphere$2=new Sphere;const _vector$5=new Vector3;const _forward$1=new Vector3;const _temp=new Vector3;const _renderList=new MultiDrawRenderList;const _mesh=new Mesh;const _batchIntersects=[];function copyAttributeData(src,target,targetOffset=0){const itemSize=target.itemSize;if(src.isInterleavedBufferAttribute||src.array.constructor!==target.array.constructor){const vertexCount=src.count;for(let i=0;i<vertexCount;i++){for(let c=0;c<itemSize;c++){target.setComponent(i+targetOffset,c,src.getComponent(i,c))}}}else{target.array.set(src.array,targetOffset*itemSize)}target.needsUpdate=true}function copyArrayContents(src,target){if(src.constructor!==target.constructor){const len=Math.min(src.length,target.length);for(let i=0;i<len;i++){target[i]=src[i]}}else{const len=Math.min(src.length,target.length);target.set(new src.constructor(src.buffer,0,len))}}class BatchedMesh extends Mesh{constructor(maxInstanceCount,maxVertexCount,maxIndexCount=maxVertexCount*2,material){super(new BufferGeometry,material);this.isBatchedMesh=true;this.perObjectFrustumCulled=true;this.sortObjects=true;this.boundingBox=null;this.boundingSphere=null;this.customSort=null;this._instanceInfo=[];this._geometryInfo=[];this._availableInstanceIds=[];this._availableGeometryIds=[];this._nextIndexStart=0;this._nextVertexStart=0;this._geometryCount=0;this._visibilityChanged=true;this._geometryInitialized=false;this._maxInstanceCount=maxInstanceCount;this._maxVertexCount=maxVertexCount;this._maxIndexCount=maxIndexCount;this._multiDrawCounts=new Int32Array(maxInstanceCount);this._multiDrawStarts=new Int32Array(maxInstanceCount);this._multiDrawCount=0;this._multiDrawInstances=null;this._matricesTexture=null;this._indirectTexture=null;this._colorsTexture=null;this._initMatricesTexture();this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let size=Math.sqrt(this._maxInstanceCount*4);size=Math.ceil(size/4)*4;size=Math.max(size,4);const matricesArray=new Float32Array(size*size*4);const matricesTexture=new DataTexture(matricesArray,size,size,RGBAFormat,FloatType);this._matricesTexture=matricesTexture}_initIndirectTexture(){let size=Math.sqrt(this._maxInstanceCount);size=Math.ceil(size);const indirectArray=new Uint32Array(size*size);const indirectTexture=new DataTexture(indirectArray,size,size,RedIntegerFormat,UnsignedIntType);this._indirectTexture=indirectTexture}_initColorsTexture(){let size=Math.sqrt(this._maxInstanceCount);size=Math.ceil(size);const colorsArray=new Float32Array(size*size*4).fill(1);const colorsTexture=new DataTexture(colorsArray,size,size,RGBAFormat,FloatType);colorsTexture.colorSpace=ColorManagement.workingColorSpace;this._colorsTexture=colorsTexture}_initializeGeometry(reference){const geometry=this.geometry;const maxVertexCount=this._maxVertexCount;const maxIndexCount=this._maxIndexCount;if(this._geometryInitialized===false){for(const attributeName in reference.attributes){const srcAttribute=reference.getAttribute(attributeName);const{array,itemSize,normalized}=srcAttribute;const dstArray=new array.constructor(maxVertexCount*itemSize);const dstAttribute=new BufferAttribute(dstArray,itemSize,normalized);geometry.setAttribute(attributeName,dstAttribute)}if(reference.getIndex()!==null){const indexArray=maxVertexCount>65535?new Uint32Array(maxIndexCount):new Uint16Array(maxIndexCount);geometry.setIndex(new BufferAttribute(indexArray,1))}this._geometryInitialized=true}}_validateGeometry(geometry){const batchGeometry=this.geometry;if(Boolean(geometry.getIndex())!==Boolean(batchGeometry.getIndex())){throw new Error("THREE.BatchedMesh: All geometries must consistently have \"index\".")}for(const attributeName in batchGeometry.attributes){if(!geometry.hasAttribute(attributeName)){throw new Error(`THREE.BatchedMesh: Added geometry missing "${attributeName}". All geometries must have consistent attributes.`)}const srcAttribute=geometry.getAttribute(attributeName);const dstAttribute=batchGeometry.getAttribute(attributeName);if(srcAttribute.itemSize!==dstAttribute.itemSize||srcAttribute.normalized!==dstAttribute.normalized){throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}}validateInstanceId(instanceId){const instanceInfo=this._instanceInfo;if(instanceId<0||instanceId>=instanceInfo.length||instanceInfo[instanceId].active===false){throw new Error(`THREE.BatchedMesh: Invalid instanceId ${instanceId}. Instance is either out of range or has been deleted.`)}}validateGeometryId(geometryId){const geometryInfoList=this._geometryInfo;if(geometryId<0||geometryId>=geometryInfoList.length||geometryInfoList[geometryId].active===false){throw new Error(`THREE.BatchedMesh: Invalid geometryId ${geometryId}. Geometry is either out of range or has been deleted.`)}}setCustomSort(func){this.customSort=func;return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const boundingBox=this.boundingBox;const instanceInfo=this._instanceInfo;boundingBox.makeEmpty();for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active===false)continue;const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingBoxAt(geometryId,_box$1).applyMatrix4(_matrix$1);boundingBox.union(_box$1)}}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}const boundingSphere=this.boundingSphere;const instanceInfo=this._instanceInfo;boundingSphere.makeEmpty();for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active===false)continue;const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);boundingSphere.union(_sphere$2)}}addInstance(geometryId){const atCapacity=this._instanceInfo.length>=this.maxInstanceCount;if(atCapacity&&this._availableInstanceIds.length===0){throw new Error("THREE.BatchedMesh: Maximum item count reached.")}const instanceInfo={visible:true,active:true,geometryIndex:geometryId};let drawId=null;if(this._availableInstanceIds.length>0){this._availableInstanceIds.sort(ascIdSort);drawId=this._availableInstanceIds.shift();this._instanceInfo[drawId]=instanceInfo}else{drawId=this._instanceInfo.length;this._instanceInfo.push(instanceInfo)}const matricesTexture=this._matricesTexture;_matrix$1.identity().toArray(matricesTexture.image.data,drawId*16);matricesTexture.needsUpdate=true;const colorsTexture=this._colorsTexture;if(colorsTexture){_whiteColor.toArray(colorsTexture.image.data,drawId*4);colorsTexture.needsUpdate=true}this._visibilityChanged=true;return drawId}addGeometry(geometry,reservedVertexCount=-1,reservedIndexCount=-1){this._initializeGeometry(geometry);this._validateGeometry(geometry);const geometryInfo={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:true};const geometryInfoList=this._geometryInfo;geometryInfo.vertexStart=this._nextVertexStart;geometryInfo.reservedVertexCount=reservedVertexCount===-1?geometry.getAttribute("position").count:reservedVertexCount;const index=geometry.getIndex();const hasIndex=index!==null;if(hasIndex){geometryInfo.indexStart=this._nextIndexStart;geometryInfo.reservedIndexCount=reservedIndexCount===-1?index.count:reservedIndexCount}if(geometryInfo.indexStart!==-1&&geometryInfo.indexStart+geometryInfo.reservedIndexCount>this._maxIndexCount||geometryInfo.vertexStart+geometryInfo.reservedVertexCount>this._maxVertexCount){throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.")}let geometryId;if(this._availableGeometryIds.length>0){this._availableGeometryIds.sort(ascIdSort);geometryId=this._availableGeometryIds.shift();geometryInfoList[geometryId]=geometryInfo}else{geometryId=this._geometryCount;this._geometryCount++;geometryInfoList.push(geometryInfo)}this.setGeometryAt(geometryId,geometry);this._nextIndexStart=geometryInfo.indexStart+geometryInfo.reservedIndexCount;this._nextVertexStart=geometryInfo.vertexStart+geometryInfo.reservedVertexCount;return geometryId}setGeometryAt(geometryId,geometry){if(geometryId>=this._geometryCount){throw new Error("THREE.BatchedMesh: Maximum geometry count reached.")}this._validateGeometry(geometry);const batchGeometry=this.geometry;const hasIndex=batchGeometry.getIndex()!==null;const dstIndex=batchGeometry.getIndex();const srcIndex=geometry.getIndex();const geometryInfo=this._geometryInfo[geometryId];if(hasIndex&&srcIndex.count>geometryInfo.reservedIndexCount||geometry.attributes.position.count>geometryInfo.reservedVertexCount){throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.")}const vertexStart=geometryInfo.vertexStart;const reservedVertexCount=geometryInfo.reservedVertexCount;geometryInfo.vertexCount=geometry.getAttribute("position").count;for(const attributeName in batchGeometry.attributes){const srcAttribute=geometry.getAttribute(attributeName);const dstAttribute=batchGeometry.getAttribute(attributeName);copyAttributeData(srcAttribute,dstAttribute,vertexStart);const itemSize=srcAttribute.itemSize;for(let i=srcAttribute.count,l=reservedVertexCount;i<l;i++){const index=vertexStart+i;for(let c=0;c<itemSize;c++){dstAttribute.setComponent(index,c,0)}}dstAttribute.needsUpdate=true;dstAttribute.addUpdateRange(vertexStart*itemSize,reservedVertexCount*itemSize)}if(hasIndex){const indexStart=geometryInfo.indexStart;const reservedIndexCount=geometryInfo.reservedIndexCount;geometryInfo.indexCount=geometry.getIndex().count;for(let i=0;i<srcIndex.count;i++){dstIndex.setX(indexStart+i,vertexStart+srcIndex.getX(i))}for(let i=srcIndex.count,l=reservedIndexCount;i<l;i++){dstIndex.setX(indexStart+i,vertexStart)}dstIndex.needsUpdate=true;dstIndex.addUpdateRange(indexStart,geometryInfo.reservedIndexCount)}geometryInfo.start=hasIndex?geometryInfo.indexStart:geometryInfo.vertexStart;geometryInfo.count=hasIndex?geometryInfo.indexCount:geometryInfo.vertexCount;geometryInfo.boundingBox=null;if(geometry.boundingBox!==null){geometryInfo.boundingBox=geometry.boundingBox.clone()}geometryInfo.boundingSphere=null;if(geometry.boundingSphere!==null){geometryInfo.boundingSphere=geometry.boundingSphere.clone()}this._visibilityChanged=true;return geometryId}deleteGeometry(geometryId){const geometryInfoList=this._geometryInfo;if(geometryId>=geometryInfoList.length||geometryInfoList[geometryId].active===false){return this}const instanceInfo=this._instanceInfo;for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active&&instanceInfo[i].geometryIndex===geometryId){this.deleteInstance(i)}}geometryInfoList[geometryId].active=false;this._availableGeometryIds.push(geometryId);this._visibilityChanged=true;return this}deleteInstance(instanceId){this.validateInstanceId(instanceId);this._instanceInfo[instanceId].active=false;this._availableInstanceIds.push(instanceId);this._visibilityChanged=true;return this}optimize(){let nextVertexStart=0;let nextIndexStart=0;const geometryInfoList=this._geometryInfo;const indices=geometryInfoList.map((e,i)=>i).sort((a,b)=>{return geometryInfoList[a].vertexStart-geometryInfoList[b].vertexStart});const geometry=this.geometry;for(let i=0,l=geometryInfoList.length;i<l;i++){const index=indices[i];const geometryInfo=geometryInfoList[index];if(geometryInfo.active===false){continue}if(geometry.index!==null){if(geometryInfo.indexStart!==nextIndexStart){const{indexStart,vertexStart,reservedIndexCount}=geometryInfo;const index=geometry.index;const array=index.array;const elementDelta=nextVertexStart-vertexStart;for(let j=indexStart;j<indexStart+reservedIndexCount;j++){array[j]=array[j]+elementDelta}index.array.copyWithin(nextIndexStart,indexStart,indexStart+reservedIndexCount);index.addUpdateRange(nextIndexStart,reservedIndexCount);index.needsUpdate=true;geometryInfo.indexStart=nextIndexStart}nextIndexStart+=geometryInfo.reservedIndexCount}if(geometryInfo.vertexStart!==nextVertexStart){const{vertexStart,reservedVertexCount}=geometryInfo;const attributes=geometry.attributes;for(const key in attributes){const attribute=attributes[key];const{array,itemSize}=attribute;array.copyWithin(nextVertexStart*itemSize,vertexStart*itemSize,(vertexStart+reservedVertexCount)*itemSize);attribute.addUpdateRange(nextVertexStart*itemSize,reservedVertexCount*itemSize);attribute.needsUpdate=true}geometryInfo.vertexStart=nextVertexStart}nextVertexStart+=geometryInfo.reservedVertexCount;geometryInfo.start=geometry.index?geometryInfo.indexStart:geometryInfo.vertexStart;this._nextIndexStart=geometry.index?geometryInfo.indexStart+geometryInfo.reservedIndexCount:0;this._nextVertexStart=geometryInfo.vertexStart+geometryInfo.reservedVertexCount}this._visibilityChanged=true;return this}getBoundingBoxAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const geometry=this.geometry;const geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingBox===null){const box=new Box3;const index=geometry.index;const position=geometry.attributes.position;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}box.expandByPoint(_vector$5.fromBufferAttribute(position,iv))}geometryInfo.boundingBox=box}target.copy(geometryInfo.boundingBox);return target}getBoundingSphereAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const geometry=this.geometry;const geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingSphere===null){const sphere=new Sphere;this.getBoundingBoxAt(geometryId,_box$1);_box$1.getCenter(sphere.center);const index=geometry.index;const position=geometry.attributes.position;let maxRadiusSq=0;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}_vector$5.fromBufferAttribute(position,iv);maxRadiusSq=Math.max(maxRadiusSq,sphere.center.distanceToSquared(_vector$5))}sphere.radius=Math.sqrt(maxRadiusSq);geometryInfo.boundingSphere=sphere}target.copy(geometryInfo.boundingSphere);return target}setMatrixAt(instanceId,matrix){this.validateInstanceId(instanceId);const matricesTexture=this._matricesTexture;const matricesArray=this._matricesTexture.image.data;matrix.toArray(matricesArray,instanceId*16);matricesTexture.needsUpdate=true;return this}getMatrixAt(instanceId,matrix){this.validateInstanceId(instanceId);return matrix.fromArray(this._matricesTexture.image.data,instanceId*16)}setColorAt(instanceId,color){this.validateInstanceId(instanceId);if(this._colorsTexture===null){this._initColorsTexture()}color.toArray(this._colorsTexture.image.data,instanceId*4);this._colorsTexture.needsUpdate=true;return this}getColorAt(instanceId,color){this.validateInstanceId(instanceId);return color.fromArray(this._colorsTexture.image.data,instanceId*4)}setVisibleAt(instanceId,visible){this.validateInstanceId(instanceId);if(this._instanceInfo[instanceId].visible===visible){return this}this._instanceInfo[instanceId].visible=visible;this._visibilityChanged=true;return this}getVisibleAt(instanceId){this.validateInstanceId(instanceId);return this._instanceInfo[instanceId].visible}setGeometryIdAt(instanceId,geometryId){this.validateInstanceId(instanceId);this.validateGeometryId(geometryId);this._instanceInfo[instanceId].geometryIndex=geometryId;return this}getGeometryIdAt(instanceId){this.validateInstanceId(instanceId);return this._instanceInfo[instanceId].geometryIndex}getGeometryRangeAt(geometryId,target={}){this.validateGeometryId(geometryId);const geometryInfo=this._geometryInfo[geometryId];target.vertexStart=geometryInfo.vertexStart;target.vertexCount=geometryInfo.vertexCount;target.reservedVertexCount=geometryInfo.reservedVertexCount;target.indexStart=geometryInfo.indexStart;target.indexCount=geometryInfo.indexCount;target.reservedIndexCount=geometryInfo.reservedIndexCount;target.start=geometryInfo.start;target.count=geometryInfo.count;return target}setInstanceCount(maxInstanceCount){const availableInstanceIds=this._availableInstanceIds;const instanceInfo=this._instanceInfo;availableInstanceIds.sort(ascIdSort);while(availableInstanceIds[availableInstanceIds.length-1]===instanceInfo.length-1){instanceInfo.pop();availableInstanceIds.pop()}if(maxInstanceCount<instanceInfo.length){throw new Error(`BatchedMesh: Instance ids outside the range ${maxInstanceCount} are being used. Cannot shrink instance count.`)}const multiDrawCounts=new Int32Array(maxInstanceCount);const multiDrawStarts=new Int32Array(maxInstanceCount);copyArrayContents(this._multiDrawCounts,multiDrawCounts);copyArrayContents(this._multiDrawStarts,multiDrawStarts);this._multiDrawCounts=multiDrawCounts;this._multiDrawStarts=multiDrawStarts;this._maxInstanceCount=maxInstanceCount;const indirectTexture=this._indirectTexture;const matricesTexture=this._matricesTexture;const colorsTexture=this._colorsTexture;indirectTexture.dispose();this._initIndirectTexture();copyArrayContents(indirectTexture.image.data,this._indirectTexture.image.data);matricesTexture.dispose();this._initMatricesTexture();copyArrayContents(matricesTexture.image.data,this._matricesTexture.image.data);if(colorsTexture){colorsTexture.dispose();this._initColorsTexture();copyArrayContents(colorsTexture.image.data,this._colorsTexture.image.data)}}setGeometrySize(maxVertexCount,maxIndexCount){const validRanges=[...this._geometryInfo].filter(info=>info.active);const requiredVertexLength=Math.max(...validRanges.map(range=>range.vertexStart+range.reservedVertexCount));if(requiredVertexLength>maxVertexCount){throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${maxIndexCount}. Cannot shrink further.`)}if(this.geometry.index){const requiredIndexLength=Math.max(...validRanges.map(range=>range.indexStart+range.reservedIndexCount));if(requiredIndexLength>maxIndexCount){throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${maxIndexCount}. Cannot shrink further.`)}}const oldGeometry=this.geometry;oldGeometry.dispose();this._maxVertexCount=maxVertexCount;this._maxIndexCount=maxIndexCount;if(this._geometryInitialized){this._geometryInitialized=false;this.geometry=new BufferGeometry;this._initializeGeometry(oldGeometry)}const geometry=this.geometry;if(oldGeometry.index){copyArrayContents(oldGeometry.index.array,geometry.index.array)}for(const key in oldGeometry.attributes){copyArrayContents(oldGeometry.attributes[key].array,geometry.attributes[key].array)}}raycast(raycaster,intersects){const instanceInfo=this._instanceInfo;const geometryInfoList=this._geometryInfo;const matrixWorld=this.matrixWorld;const batchGeometry=this.geometry;_mesh.material=this.material;_mesh.geometry.index=batchGeometry.index;_mesh.geometry.attributes=batchGeometry.attributes;if(_mesh.geometry.boundingBox===null){_mesh.geometry.boundingBox=new Box3}if(_mesh.geometry.boundingSphere===null){_mesh.geometry.boundingSphere=new Sphere}for(let i=0,l=instanceInfo.length;i<l;i++){if(!instanceInfo[i].visible||!instanceInfo[i].active){continue}const geometryId=instanceInfo[i].geometryIndex;const geometryInfo=geometryInfoList[geometryId];_mesh.geometry.setDrawRange(geometryInfo.start,geometryInfo.count);this.getMatrixAt(i,_mesh.matrixWorld).premultiply(matrixWorld);this.getBoundingBoxAt(geometryId,_mesh.geometry.boundingBox);this.getBoundingSphereAt(geometryId,_mesh.geometry.boundingSphere);_mesh.raycast(raycaster,_batchIntersects);for(let j=0,l=_batchIntersects.length;j<l;j++){const intersect=_batchIntersects[j];intersect.object=this;intersect.batchId=i;intersects.push(intersect)}_batchIntersects.length=0}_mesh.material=null;_mesh.geometry.index=null;_mesh.geometry.attributes={};_mesh.geometry.setDrawRange(0,Infinity)}copy(source){super.copy(source);this.geometry=source.geometry.clone();this.perObjectFrustumCulled=source.perObjectFrustumCulled;this.sortObjects=source.sortObjects;this.boundingBox=source.boundingBox!==null?source.boundingBox.clone():null;this.boundingSphere=source.boundingSphere!==null?source.boundingSphere.clone():null;this._geometryInfo=source._geometryInfo.map(info=>({...info,boundingBox:info.boundingBox!==null?info.boundingBox.clone():null,boundingSphere:info.boundingSphere!==null?info.boundingSphere.clone():null}));this._instanceInfo=source._instanceInfo.map(info=>({...info}));this._availableInstanceIds=source._availableInstanceIds.slice();this._availableGeometryIds=source._availableGeometryIds.slice();this._nextIndexStart=source._nextIndexStart;this._nextVertexStart=source._nextVertexStart;this._geometryCount=source._geometryCount;this._maxInstanceCount=source._maxInstanceCount;this._maxVertexCount=source._maxVertexCount;this._maxIndexCount=source._maxIndexCount;this._geometryInitialized=source._geometryInitialized;this._multiDrawCounts=source._multiDrawCounts.slice();this._multiDrawStarts=source._multiDrawStarts.slice();this._indirectTexture=source._indirectTexture.clone();this._indirectTexture.image.data=this._indirectTexture.image.data.slice();this._matricesTexture=source._matricesTexture.clone();this._matricesTexture.image.data=this._matricesTexture.image.data.slice();if(this._colorsTexture!==null){this._colorsTexture=source._colorsTexture.clone();this._colorsTexture.image.data=this._colorsTexture.image.data.slice()}return this}dispose(){this.geometry.dispose();this._matricesTexture.dispose();this._matricesTexture=null;this._indirectTexture.dispose();this._indirectTexture=null;if(this._colorsTexture!==null){this._colorsTexture.dispose();this._colorsTexture=null}}onBeforeRender(renderer,scene,camera,geometry,material){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects){return}const index=geometry.getIndex();const bytesPerElement=index===null?1:index.array.BYTES_PER_ELEMENT;const instanceInfo=this._instanceInfo;const multiDrawStarts=this._multiDrawStarts;const multiDrawCounts=this._multiDrawCounts;const geometryInfoList=this._geometryInfo;const perObjectFrustumCulled=this.perObjectFrustumCulled;const indirectTexture=this._indirectTexture;const indirectArray=indirectTexture.image.data;const frustum=camera.isArrayCamera?_frustumArray:_frustum;if(perObjectFrustumCulled&&!camera.isArrayCamera){_matrix$1.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse).multiply(this.matrixWorld);_frustum.setFromProjectionMatrix(_matrix$1,camera.coordinateSystem,camera.reversedDepth)}let multiDrawCount=0;if(this.sortObjects){_matrix$1.copy(this.matrixWorld).invert();_vector$5.setFromMatrixPosition(camera.matrixWorld).applyMatrix4(_matrix$1);_forward$1.set(0,0,-1).transformDirection(camera.matrixWorld).transformDirection(_matrix$1);for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].visible&&instanceInfo[i].active){const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);let culled=false;if(perObjectFrustumCulled){culled=!frustum.intersectsSphere(_sphere$2,camera)}if(!culled){const geometryInfo=geometryInfoList[geometryId];const z=_temp.subVectors(_sphere$2.center,_vector$5).dot(_forward$1);_renderList.push(geometryInfo.start,geometryInfo.count,z,i)}}}const list=_renderList.list;const customSort=this.customSort;if(customSort===null){list.sort(material.transparent?sortTransparent:sortOpaque)}else{customSort.call(this,list,camera)}for(let i=0,l=list.length;i<l;i++){const item=list[i];multiDrawStarts[multiDrawCount]=item.start*bytesPerElement;multiDrawCounts[multiDrawCount]=item.count;indirectArray[multiDrawCount]=item.index;multiDrawCount++}_renderList.reset()}else{for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].visible&&instanceInfo[i].active){const geometryId=instanceInfo[i].geometryIndex;let culled=false;if(perObjectFrustumCulled){this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);culled=!frustum.intersectsSphere(_sphere$2,camera)}if(!culled){const geometryInfo=geometryInfoList[geometryId];multiDrawStarts[multiDrawCount]=geometryInfo.start*bytesPerElement;multiDrawCounts[multiDrawCount]=geometryInfo.count;indirectArray[multiDrawCount]=i;multiDrawCount++}}}}indirectTexture.needsUpdate=true;this._multiDrawCount=multiDrawCount;this._visibilityChanged=false}onBeforeShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial){this.onBeforeRender(renderer,null,shadowCamera,geometry,depthMaterial)}}class LineBasicMaterial extends Material{constructor(parameters){super();this.isLineBasicMaterial=true;this.type="LineBasicMaterial";this.color=new Color(16777215);this.map=null;this.linewidth=1;this.linecap="round";this.linejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.linewidth=source.linewidth;this.linecap=source.linecap;this.linejoin=source.linejoin;this.fog=source.fog;return this}}const _vStart=new Vector3;const _vEnd=new Vector3;const _inverseMatrix$1=new Matrix4;const _ray$1=new Ray;const _sphere$1=new Sphere;const _intersectPointOnRay=new Vector3;const _intersectPointOnSegment=new Vector3;class Line extends Object3D{constructor(geometry=new BufferGeometry,material=new LineBasicMaterial){super();this.isLine=true;this.type="Line";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}computeLineDistances(){const geometry=this.geometry;if(geometry.index===null){const positionAttribute=geometry.attributes.position;const lineDistances=[0];for(let i=1,l=positionAttribute.count;i<l;i++){_vStart.fromBufferAttribute(positionAttribute,i-1);_vEnd.fromBufferAttribute(positionAttribute,i);lineDistances[i]=lineDistances[i-1];lineDistances[i]+=_vStart.distanceTo(_vEnd)}geometry.setAttribute("lineDistance",new Float32BufferAttribute(lineDistances,1))}else{warn("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.")}return this}raycast(raycaster,intersects){const geometry=this.geometry;const matrixWorld=this.matrixWorld;const threshold=raycaster.params.Line.threshold;const drawRange=geometry.drawRange;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$1.copy(geometry.boundingSphere);_sphere$1.applyMatrix4(matrixWorld);_sphere$1.radius+=threshold;if(raycaster.ray.intersectsSphere(_sphere$1)===false)return;_inverseMatrix$1.copy(matrixWorld).invert();_ray$1.copy(raycaster.ray).applyMatrix4(_inverseMatrix$1);const localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3);const localThresholdSq=localThreshold*localThreshold;const step=this.isLineSegments?2:1;const index=geometry.index;const attributes=geometry.attributes;const positionAttribute=attributes.position;if(index!==null){const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,l=end-1;i<l;i+=step){const a=index.getX(i);const b=index.getX(i+1);const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,a,b,i);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const a=index.getX(end-1);const b=index.getX(start);const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,a,b,end-1);if(intersect){intersects.push(intersect)}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(let i=start,l=end-1;i<l;i+=step){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,i,i+1,i);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,end-1,start,end-1);if(intersect){intersects.push(intersect)}}}}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}}function checkIntersection(object,raycaster,ray,thresholdSq,a,b,i){const positionAttribute=object.geometry.attributes.position;_vStart.fromBufferAttribute(positionAttribute,a);_vEnd.fromBufferAttribute(positionAttribute,b);const distSq=ray.distanceSqToSegment(_vStart,_vEnd,_intersectPointOnRay,_intersectPointOnSegment);if(distSq>thresholdSq)return;_intersectPointOnRay.applyMatrix4(object.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_intersectPointOnRay);if(distance<raycaster.near||distance>raycaster.far)return;return{distance:distance,point:_intersectPointOnSegment.clone().applyMatrix4(object.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:object}}const _start=new Vector3;const _end=new Vector3;class LineSegments extends Line{constructor(geometry,material){super(geometry,material);this.isLineSegments=true;this.type="LineSegments"}computeLineDistances(){const geometry=this.geometry;if(geometry.index===null){const positionAttribute=geometry.attributes.position;const lineDistances=[];for(let i=0,l=positionAttribute.count;i<l;i+=2){_start.fromBufferAttribute(positionAttribute,i);_end.fromBufferAttribute(positionAttribute,i+1);lineDistances[i]=i===0?0:lineDistances[i-1];lineDistances[i+1]=lineDistances[i]+_start.distanceTo(_end)}geometry.setAttribute("lineDistance",new Float32BufferAttribute(lineDistances,1))}else{warn("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.")}return this}}class LineLoop extends Line{constructor(geometry,material){super(geometry,material);this.isLineLoop=true;this.type="LineLoop"}}class PointsMaterial extends Material{constructor(parameters){super();this.isPointsMaterial=true;this.type="PointsMaterial";this.color=new Color(16777215);this.map=null;this.alphaMap=null;this.size=1;this.sizeAttenuation=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.alphaMap=source.alphaMap;this.size=source.size;this.sizeAttenuation=source.sizeAttenuation;this.fog=source.fog;return this}}const _inverseMatrix=new Matrix4;const _ray=new Ray;const _sphere=new Sphere;const _position$2=new Vector3;class Points extends Object3D{constructor(geometry=new BufferGeometry,material=new PointsMaterial){super();this.isPoints=true;this.type="Points";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}raycast(raycaster,intersects){const geometry=this.geometry;const matrixWorld=this.matrixWorld;const threshold=raycaster.params.Points.threshold;const drawRange=geometry.drawRange;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere.copy(geometry.boundingSphere);_sphere.applyMatrix4(matrixWorld);_sphere.radius+=threshold;if(raycaster.ray.intersectsSphere(_sphere)===false)return;_inverseMatrix.copy(matrixWorld).invert();_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix);const localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3);const localThresholdSq=localThreshold*localThreshold;const index=geometry.index;const attributes=geometry.attributes;const positionAttribute=attributes.position;if(index!==null){const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i++){const a=index.getX(i);_position$2.fromBufferAttribute(positionAttribute,a);testPoint(_position$2,a,localThresholdSq,matrixWorld,raycaster,intersects,this)}}else{const start=Math.max(0,drawRange.start);const end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(let i=start,l=end;i<l;i++){_position$2.fromBufferAttribute(positionAttribute,i);testPoint(_position$2,i,localThresholdSq,matrixWorld,raycaster,intersects,this)}}}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}}function testPoint(point,index,localThresholdSq,matrixWorld,raycaster,intersects,object){const rayPointDistanceSq=_ray.distanceSqToPoint(point);if(rayPointDistanceSq<localThresholdSq){const intersectPoint=new Vector3;_ray.closestPointToPoint(point,intersectPoint);intersectPoint.applyMatrix4(matrixWorld);const distance=raycaster.ray.origin.distanceTo(intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,distanceToRay:Math.sqrt(rayPointDistanceSq),point:intersectPoint,index:index,face:null,faceIndex:null,barycoord:null,object:object})}}class VideoTexture extends Texture{constructor(video,mapping,wrapS,wrapT,magFilter=LinearFilter,minFilter=LinearFilter,format,type,anisotropy){super(video,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isVideoTexture=true;this.generateMipmaps=false;this._requestVideoFrameCallbackId=0;const scope=this;function updateVideo(){scope.needsUpdate=true;scope._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo)}if("requestVideoFrameCallback"in video){this._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo)}}clone(){return new this.constructor(this.image).copy(this)}update(){const video=this.image;const hasVideoFrameCallback=("requestVideoFrameCallback"in video);if(hasVideoFrameCallback===false&&video.readyState>=video.HAVE_CURRENT_DATA){this.needsUpdate=true}}dispose(){if(this._requestVideoFrameCallbackId!==0){this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId);this._requestVideoFrameCallbackId=0}super.dispose()}}class VideoFrameTexture extends VideoTexture{constructor(mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super({},mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isVideoFrameTexture=true}update(){}clone(){return new this.constructor().copy(this)}setFrame(frame){this.image=frame;this.needsUpdate=true}}class FramebufferTexture extends Texture{constructor(width,height){super({width,height});this.isFramebufferTexture=true;this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.generateMipmaps=false;this.needsUpdate=true}}class CompressedTexture extends Texture{constructor(mipmaps,width,height,format,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isCompressedTexture=true;this.image={width:width,height:height};this.mipmaps=mipmaps;this.flipY=false;this.generateMipmaps=false}}class CompressedArrayTexture extends CompressedTexture{constructor(mipmaps,width,height,depth,format,type){super(mipmaps,width,height,format,type);this.isCompressedArrayTexture=true;this.image.depth=depth;this.wrapR=ClampToEdgeWrapping;this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}}class CompressedCubeTexture extends CompressedTexture{constructor(images,format,type){super(undefined,images[0].width,images[0].height,format,type,CubeReflectionMapping);this.isCompressedCubeTexture=true;this.isCubeTexture=true;this.image=images}}class CanvasTexture extends Texture{constructor(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isCanvasTexture=true;this.needsUpdate=true}}class DepthTexture extends Texture{constructor(width,height,type=UnsignedIntType,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,format=DepthFormat,depth=1){if(format!==DepthFormat&&format!==DepthStencilFormat){throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat")}const image={width:width,height:height,depth:depth};super(image,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isDepthTexture=true;this.flipY=false;this.generateMipmaps=false;this.compareFunction=null}copy(source){super.copy(source);this.source=new Source(Object.assign({},source.image));this.compareFunction=source.compareFunction;return this}toJSON(meta){const data=super.toJSON(meta);if(this.compareFunction!==null)data.compareFunction=this.compareFunction;return data}}class CubeDepthTexture extends DepthTexture{constructor(size,type=UnsignedIntType,mapping=CubeReflectionMapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,format=DepthFormat){const image={width:size,height:size,depth:1};const images=[image,image,image,image,image,image];super(size,size,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,format);this.image=images;this.isCubeDepthTexture=true;this.isCubeTexture=true}get images(){return this.image}set images(value){this.image=value}}class ExternalTexture extends Texture{constructor(sourceTexture=null){super();this.sourceTexture=sourceTexture;this.isExternalTexture=true}copy(source){super.copy(source);this.sourceTexture=source.sourceTexture;return this}}class CapsuleGeometry extends BufferGeometry{constructor(radius=1,height=1,capSegments=4,radialSegments=8,heightSegments=1){super();this.type="CapsuleGeometry";this.parameters={radius:radius,height:height,capSegments:capSegments,radialSegments:radialSegments,heightSegments:heightSegments};height=Math.max(0,height);capSegments=Math.max(1,Math.floor(capSegments));radialSegments=Math.max(3,Math.floor(radialSegments));heightSegments=Math.max(1,Math.floor(heightSegments));const indices=[];const vertices=[];const normals=[];const uvs=[];const halfHeight=height/2;const capArcLength=Math.PI/2*radius;const cylinderPartLength=height;const totalArcLength=2*capArcLength+cylinderPartLength;const numVerticalSegments=capSegments*2+heightSegments;const verticesPerRow=radialSegments+1;const normal=new Vector3;const vertex=new Vector3;for(let iy=0;iy<=numVerticalSegments;iy++){let currentArcLength=0;let profileY=0;let profileRadius=0;let normalYComponent=0;if(iy<=capSegments){const segmentProgress=iy/capSegments;const angle=segmentProgress*Math.PI/2;profileY=-halfHeight-radius*Math.cos(angle);profileRadius=radius*Math.sin(angle);normalYComponent=-radius*Math.cos(angle);currentArcLength=segmentProgress*capArcLength}else if(iy<=capSegments+heightSegments){const segmentProgress=(iy-capSegments)/heightSegments;profileY=-halfHeight+segmentProgress*height;profileRadius=radius;normalYComponent=0;currentArcLength=capArcLength+segmentProgress*cylinderPartLength}else{const segmentProgress=(iy-capSegments-heightSegments)/capSegments;const angle=segmentProgress*Math.PI/2;profileY=halfHeight+radius*Math.sin(angle);profileRadius=radius*Math.cos(angle);normalYComponent=radius*Math.sin(angle);currentArcLength=capArcLength+cylinderPartLength+segmentProgress*capArcLength}const v=Math.max(0,Math.min(1,currentArcLength/totalArcLength));let uOffset=0;if(iy===0){uOffset=0.5/radialSegments}else if(iy===numVerticalSegments){uOffset=-0.5/radialSegments}for(let ix=0;ix<=radialSegments;ix++){const u=ix/radialSegments;const theta=u*Math.PI*2;const sinTheta=Math.sin(theta);const cosTheta=Math.cos(theta);vertex.x=-profileRadius*cosTheta;vertex.y=profileY;vertex.z=profileRadius*sinTheta;vertices.push(vertex.x,vertex.y,vertex.z);normal.set(-profileRadius*cosTheta,normalYComponent,profileRadius*sinTheta);normal.normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u+uOffset,v)}if(iy>0){const prevIndexRow=(iy-1)*verticesPerRow;for(let ix=0;ix<radialSegments;ix++){const i1=prevIndexRow+ix;const i2=prevIndexRow+ix+1;const i3=iy*verticesPerRow+ix;const i4=iy*verticesPerRow+ix+1;indices.push(i1,i2,i3);indices.push(i2,i4,i3)}}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CapsuleGeometry(data.radius,data.height,data.capSegments,data.radialSegments,data.heightSegments)}}class CircleGeometry extends BufferGeometry{constructor(radius=1,segments=32,thetaStart=0,thetaLength=Math.PI*2){super();this.type="CircleGeometry";this.parameters={radius:radius,segments:segments,thetaStart:thetaStart,thetaLength:thetaLength};segments=Math.max(3,segments);const indices=[];const vertices=[];const normals=[];const uvs=[];const vertex=new Vector3;const uv=new Vector2;vertices.push(0,0,0);normals.push(0,0,1);uvs.push(0.5,0.5);for(let s=0,i=3;s<=segments;s++,i+=3){const segment=thetaStart+s/segments*thetaLength;vertex.x=radius*Math.cos(segment);vertex.y=radius*Math.sin(segment);vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,0,1);uv.x=(vertices[i]/radius+1)/2;uv.y=(vertices[i+1]/radius+1)/2;uvs.push(uv.x,uv.y)}for(let i=1;i<=segments;i++){indices.push(i,i+1,0)}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CircleGeometry(data.radius,data.segments,data.thetaStart,data.thetaLength)}}class CylinderGeometry extends BufferGeometry{constructor(radiusTop=1,radiusBottom=1,height=1,radialSegments=32,heightSegments=1,openEnded=false,thetaStart=0,thetaLength=Math.PI*2){super();this.type="CylinderGeometry";this.parameters={radiusTop:radiusTop,radiusBottom:radiusBottom,height:height,radialSegments:radialSegments,heightSegments:heightSegments,openEnded:openEnded,thetaStart:thetaStart,thetaLength:thetaLength};const scope=this;radialSegments=Math.floor(radialSegments);heightSegments=Math.floor(heightSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let index=0;const indexArray=[];const halfHeight=height/2;let groupStart=0;generateTorso();if(openEnded===false){if(radiusTop>0)generateCap(true);if(radiusBottom>0)generateCap(false)}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function generateTorso(){const normal=new Vector3;const vertex=new Vector3;let groupCount=0;const slope=(radiusBottom-radiusTop)/height;for(let y=0;y<=heightSegments;y++){const indexRow=[];const v=y/heightSegments;const radius=v*(radiusBottom-radiusTop)+radiusTop;for(let x=0;x<=radialSegments;x++){const u=x/radialSegments;const theta=u*thetaLength+thetaStart;const sinTheta=Math.sin(theta);const cosTheta=Math.cos(theta);vertex.x=radius*sinTheta;vertex.y=-v*height+halfHeight;vertex.z=radius*cosTheta;vertices.push(vertex.x,vertex.y,vertex.z);normal.set(sinTheta,slope,cosTheta).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u,1-v);indexRow.push(index++)}indexArray.push(indexRow)}for(let x=0;x<radialSegments;x++){for(let y=0;y<heightSegments;y++){const a=indexArray[y][x];const b=indexArray[y+1][x];const c=indexArray[y+1][x+1];const d=indexArray[y][x+1];if(radiusTop>0||y!==0){indices.push(a,b,d);groupCount+=3}if(radiusBottom>0||y!==heightSegments-1){indices.push(b,c,d);groupCount+=3}}}scope.addGroup(groupStart,groupCount,0);groupStart+=groupCount}function generateCap(top){const centerIndexStart=index;const uv=new Vector2;const vertex=new Vector3;let groupCount=0;const radius=top===true?radiusTop:radiusBottom;const sign=top===true?1:-1;for(let x=1;x<=radialSegments;x++){vertices.push(0,halfHeight*sign,0);normals.push(0,sign,0);uvs.push(0.5,0.5);index++}const centerIndexEnd=index;for(let x=0;x<=radialSegments;x++){const u=x/radialSegments;const theta=u*thetaLength+thetaStart;const cosTheta=Math.cos(theta);const sinTheta=Math.sin(theta);vertex.x=radius*sinTheta;vertex.y=halfHeight*sign;vertex.z=radius*cosTheta;vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,sign,0);uv.x=cosTheta*0.5+0.5;uv.y=sinTheta*0.5*sign+0.5;uvs.push(uv.x,uv.y);index++}for(let x=0;x<radialSegments;x++){const c=centerIndexStart+x;const i=centerIndexEnd+x;if(top===true){indices.push(i,i+1,c)}else{indices.push(i+1,i,c)}groupCount+=3}scope.addGroup(groupStart,groupCount,top===true?1:2);groupStart+=groupCount}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CylinderGeometry(data.radiusTop,data.radiusBottom,data.height,data.radialSegments,data.heightSegments,data.openEnded,data.thetaStart,data.thetaLength)}}class ConeGeometry extends CylinderGeometry{constructor(radius=1,height=1,radialSegments=32,heightSegments=1,openEnded=false,thetaStart=0,thetaLength=Math.PI*2){super(0,radius,height,radialSegments,heightSegments,openEnded,thetaStart,thetaLength);this.type="ConeGeometry";this.parameters={radius:radius,height:height,radialSegments:radialSegments,heightSegments:heightSegments,openEnded:openEnded,thetaStart:thetaStart,thetaLength:thetaLength}}static fromJSON(data){return new ConeGeometry(data.radius,data.height,data.radialSegments,data.heightSegments,data.openEnded,data.thetaStart,data.thetaLength)}}class PolyhedronGeometry extends BufferGeometry{constructor(vertices=[],indices=[],radius=1,detail=0){super();this.type="PolyhedronGeometry";this.parameters={vertices:vertices,indices:indices,radius:radius,detail:detail};const vertexBuffer=[];const uvBuffer=[];subdivide(detail);applyRadius(radius);generateUVs();this.setAttribute("position",new Float32BufferAttribute(vertexBuffer,3));this.setAttribute("normal",new Float32BufferAttribute(vertexBuffer.slice(),3));this.setAttribute("uv",new Float32BufferAttribute(uvBuffer,2));if(detail===0){this.computeVertexNormals()}else{this.normalizeNormals()}function subdivide(detail){const a=new Vector3;const b=new Vector3;const c=new Vector3;for(let i=0;i<indices.length;i+=3){getVertexByIndex(indices[i+0],a);getVertexByIndex(indices[i+1],b);getVertexByIndex(indices[i+2],c);subdivideFace(a,b,c,detail)}}function subdivideFace(a,b,c,detail){const cols=detail+1;const v=[];for(let i=0;i<=cols;i++){v[i]=[];const aj=a.clone().lerp(c,i/cols);const bj=b.clone().lerp(c,i/cols);const rows=cols-i;for(let j=0;j<=rows;j++){if(j===0&&i===cols){v[i][j]=aj}else{v[i][j]=aj.clone().lerp(bj,j/rows)}}}for(let i=0;i<cols;i++){for(let j=0;j<2*(cols-i)-1;j++){const k=Math.floor(j/2);if(j%2===0){pushVertex(v[i][k+1]);pushVertex(v[i+1][k]);pushVertex(v[i][k])}else{pushVertex(v[i][k+1]);pushVertex(v[i+1][k+1]);pushVertex(v[i+1][k])}}}}function applyRadius(radius){const vertex=new Vector3;for(let i=0;i<vertexBuffer.length;i+=3){vertex.x=vertexBuffer[i+0];vertex.y=vertexBuffer[i+1];vertex.z=vertexBuffer[i+2];vertex.normalize().multiplyScalar(radius);vertexBuffer[i+0]=vertex.x;vertexBuffer[i+1]=vertex.y;vertexBuffer[i+2]=vertex.z}}function generateUVs(){const vertex=new Vector3;for(let i=0;i<vertexBuffer.length;i+=3){vertex.x=vertexBuffer[i+0];vertex.y=vertexBuffer[i+1];vertex.z=vertexBuffer[i+2];const u=azimuth(vertex)/2/Math.PI+0.5;const v=inclination(vertex)/Math.PI+0.5;uvBuffer.push(u,1-v)}correctUVs();correctSeam()}function correctSeam(){for(let i=0;i<uvBuffer.length;i+=6){const x0=uvBuffer[i+0];const x1=uvBuffer[i+2];const x2=uvBuffer[i+4];const max=Math.max(x0,x1,x2);const min=Math.min(x0,x1,x2);if(max>0.9&&min<0.1){if(x0<0.2)uvBuffer[i+0]+=1;if(x1<0.2)uvBuffer[i+2]+=1;if(x2<0.2)uvBuffer[i+4]+=1}}}function pushVertex(vertex){vertexBuffer.push(vertex.x,vertex.y,vertex.z)}function getVertexByIndex(index,vertex){const stride=index*3;vertex.x=vertices[stride+0];vertex.y=vertices[stride+1];vertex.z=vertices[stride+2]}function correctUVs(){const a=new Vector3;const b=new Vector3;const c=new Vector3;const centroid=new Vector3;const uvA=new Vector2;const uvB=new Vector2;const uvC=new Vector2;for(let i=0,j=0;i<vertexBuffer.length;i+=9,j+=6){a.set(vertexBuffer[i+0],vertexBuffer[i+1],vertexBuffer[i+2]);b.set(vertexBuffer[i+3],vertexBuffer[i+4],vertexBuffer[i+5]);c.set(vertexBuffer[i+6],vertexBuffer[i+7],vertexBuffer[i+8]);uvA.set(uvBuffer[j+0],uvBuffer[j+1]);uvB.set(uvBuffer[j+2],uvBuffer[j+3]);uvC.set(uvBuffer[j+4],uvBuffer[j+5]);centroid.copy(a).add(b).add(c).divideScalar(3);const azi=azimuth(centroid);correctUV(uvA,j+0,a,azi);correctUV(uvB,j+2,b,azi);correctUV(uvC,j+4,c,azi)}}function correctUV(uv,stride,vector,azimuth){if(azimuth<0&&uv.x===1){uvBuffer[stride]=uv.x-1}if(vector.x===0&&vector.z===0){uvBuffer[stride]=azimuth/2/Math.PI+0.5}}function azimuth(vector){return Math.atan2(vector.z,-vector.x)}function inclination(vector){return Math.atan2(-vector.y,Math.sqrt(vector.x*vector.x+vector.z*vector.z))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new PolyhedronGeometry(data.vertices,data.indices,data.radius,data.detail)}}class DodecahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const t=(1+Math.sqrt(5))/2;const r=1/t;const vertices=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-t,0,-r,t,0,r,-t,0,r,t,-r,-t,0,-r,t,0,r,-t,0,r,t,0,-t,0,-r,t,0,-r,-t,0,r,t,0,r];const indices=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(vertices,indices,radius,detail);this.type="DodecahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new DodecahedronGeometry(data.radius,data.detail)}}const _v0$1=new Vector3;const _v1$1=new Vector3;const _normal=new Vector3;const _triangle=new Triangle;class EdgesGeometry extends BufferGeometry{constructor(geometry=null,thresholdAngle=1){super();this.type="EdgesGeometry";this.parameters={geometry:geometry,thresholdAngle:thresholdAngle};if(geometry!==null){const precisionPoints=4;const precision=Math.pow(10,precisionPoints);const thresholdDot=Math.cos(DEG2RAD*thresholdAngle);const indexAttr=geometry.getIndex();const positionAttr=geometry.getAttribute("position");const indexCount=indexAttr?indexAttr.count:positionAttr.count;const indexArr=[0,0,0];const vertKeys=["a","b","c"];const hashes=new Array(3);const edgeData={};const vertices=[];for(let i=0;i<indexCount;i+=3){if(indexAttr){indexArr[0]=indexAttr.getX(i);indexArr[1]=indexAttr.getX(i+1);indexArr[2]=indexAttr.getX(i+2)}else{indexArr[0]=i;indexArr[1]=i+1;indexArr[2]=i+2}const{a,b,c}=_triangle;a.fromBufferAttribute(positionAttr,indexArr[0]);b.fromBufferAttribute(positionAttr,indexArr[1]);c.fromBufferAttribute(positionAttr,indexArr[2]);_triangle.getNormal(_normal);hashes[0]=`${Math.round(a.x*precision)},${Math.round(a.y*precision)},${Math.round(a.z*precision)}`;hashes[1]=`${Math.round(b.x*precision)},${Math.round(b.y*precision)},${Math.round(b.z*precision)}`;hashes[2]=`${Math.round(c.x*precision)},${Math.round(c.y*precision)},${Math.round(c.z*precision)}`;if(hashes[0]===hashes[1]||hashes[1]===hashes[2]||hashes[2]===hashes[0]){continue}for(let j=0;j<3;j++){const jNext=(j+1)%3;const vecHash0=hashes[j];const vecHash1=hashes[jNext];const v0=_triangle[vertKeys[j]];const v1=_triangle[vertKeys[jNext]];const hash=`${vecHash0}_${vecHash1}`;const reverseHash=`${vecHash1}_${vecHash0}`;if(reverseHash in edgeData&&edgeData[reverseHash]){if(_normal.dot(edgeData[reverseHash].normal)<=thresholdDot){vertices.push(v0.x,v0.y,v0.z);vertices.push(v1.x,v1.y,v1.z)}edgeData[reverseHash]=null}else if(!(hash in edgeData)){edgeData[hash]={index0:indexArr[j],index1:indexArr[jNext],normal:_normal.clone()}}}}for(const key in edgeData){if(edgeData[key]){const{index0,index1}=edgeData[key];_v0$1.fromBufferAttribute(positionAttr,index0);_v1$1.fromBufferAttribute(positionAttr,index1);vertices.push(_v0$1.x,_v0$1.y,_v0$1.z);vertices.push(_v1$1.x,_v1$1.y,_v1$1.z)}}this.setAttribute("position",new Float32BufferAttribute(vertices,3))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}}class Curve{constructor(){this.type="Curve";this.arcLengthDivisions=200;this.needsUpdate=false;this.cacheArcLengths=null}getPoint(){warn("Curve: .getPoint() not implemented.")}getPointAt(u,optionalTarget){const t=this.getUtoTmapping(u);return this.getPoint(t,optionalTarget)}getPoints(divisions=5){const points=[];for(let d=0;d<=divisions;d++){points.push(this.getPoint(d/divisions))}return points}getSpacedPoints(divisions=5){const points=[];for(let d=0;d<=divisions;d++){points.push(this.getPointAt(d/divisions))}return points}getLength(){const lengths=this.getLengths();return lengths[lengths.length-1]}getLengths(divisions=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===divisions+1&&!this.needsUpdate){return this.cacheArcLengths}this.needsUpdate=false;const cache=[];let current,last=this.getPoint(0);let sum=0;cache.push(0);for(let p=1;p<=divisions;p++){current=this.getPoint(p/divisions);sum+=current.distanceTo(last);cache.push(sum);last=current}this.cacheArcLengths=cache;return cache}updateArcLengths(){this.needsUpdate=true;this.getLengths()}getUtoTmapping(u,distance=null){const arcLengths=this.getLengths();let i=0;const il=arcLengths.length;let targetArcLength;if(distance){targetArcLength=distance}else{targetArcLength=u*arcLengths[il-1]}let low=0,high=il-1,comparison;while(low<=high){i=Math.floor(low+(high-low)/2);comparison=arcLengths[i]-targetArcLength;if(comparison<0){low=i+1}else if(comparison>0){high=i-1}else{high=i;break}}i=high;if(arcLengths[i]===targetArcLength){return i/(il-1)}const lengthBefore=arcLengths[i];const lengthAfter=arcLengths[i+1];const segmentLength=lengthAfter-lengthBefore;const segmentFraction=(targetArcLength-lengthBefore)/segmentLength;const t=(i+segmentFraction)/(il-1);return t}getTangent(t,optionalTarget){const delta=0.0001;let t1=t-delta;let t2=t+delta;if(t1<0)t1=0;if(t2>1)t2=1;const pt1=this.getPoint(t1);const pt2=this.getPoint(t2);const tangent=optionalTarget||(pt1.isVector2?new Vector2:new Vector3);tangent.copy(pt2).sub(pt1).normalize();return tangent}getTangentAt(u,optionalTarget){const t=this.getUtoTmapping(u);return this.getTangent(t,optionalTarget)}computeFrenetFrames(segments,closed=false){const normal=new Vector3;const tangents=[];const normals=[];const binormals=[];const vec=new Vector3;const mat=new Matrix4;for(let i=0;i<=segments;i++){const u=i/segments;tangents[i]=this.getTangentAt(u,new Vector3)}normals[0]=new Vector3;binormals[0]=new Vector3;let min=Number.MAX_VALUE;const tx=Math.abs(tangents[0].x);const ty=Math.abs(tangents[0].y);const tz=Math.abs(tangents[0].z);if(tx<=min){min=tx;normal.set(1,0,0)}if(ty<=min){min=ty;normal.set(0,1,0)}if(tz<=min){normal.set(0,0,1)}vec.crossVectors(tangents[0],normal).normalize();normals[0].crossVectors(tangents[0],vec);binormals[0].crossVectors(tangents[0],normals[0]);for(let i=1;i<=segments;i++){normals[i]=normals[i-1].clone();binormals[i]=binormals[i-1].clone();vec.crossVectors(tangents[i-1],tangents[i]);if(vec.length()>Number.EPSILON){vec.normalize();const theta=Math.acos(clamp(tangents[i-1].dot(tangents[i]),-1,1));normals[i].applyMatrix4(mat.makeRotationAxis(vec,theta))}binormals[i].crossVectors(tangents[i],normals[i])}if(closed===true){let theta=Math.acos(clamp(normals[0].dot(normals[segments]),-1,1));theta/=segments;if(tangents[0].dot(vec.crossVectors(normals[0],normals[segments]))>0){theta=-theta}for(let i=1;i<=segments;i++){normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i],theta*i));binormals[i].crossVectors(tangents[i],normals[i])}}return{tangents:tangents,normals:normals,binormals:binormals}}clone(){return new this.constructor().copy(this)}copy(source){this.arcLengthDivisions=source.arcLengthDivisions;return this}toJSON(){const data={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};data.arcLengthDivisions=this.arcLengthDivisions;data.type=this.type;return data}fromJSON(json){this.arcLengthDivisions=json.arcLengthDivisions;return this}}class EllipseCurve extends Curve{constructor(aX=0,aY=0,xRadius=1,yRadius=1,aStartAngle=0,aEndAngle=Math.PI*2,aClockwise=false,aRotation=0){super();this.isEllipseCurve=true;this.type="EllipseCurve";this.aX=aX;this.aY=aY;this.xRadius=xRadius;this.yRadius=yRadius;this.aStartAngle=aStartAngle;this.aEndAngle=aEndAngle;this.aClockwise=aClockwise;this.aRotation=aRotation}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const twoPi=Math.PI*2;let deltaAngle=this.aEndAngle-this.aStartAngle;const samePoints=Math.abs(deltaAngle)<Number.EPSILON;while(deltaAngle<0)deltaAngle+=twoPi;while(deltaAngle>twoPi)deltaAngle-=twoPi;if(deltaAngle<Number.EPSILON){if(samePoints){deltaAngle=0}else{deltaAngle=twoPi}}if(this.aClockwise===true&&!samePoints){if(deltaAngle===twoPi){deltaAngle=-twoPi}else{deltaAngle=deltaAngle-twoPi}}const angle=this.aStartAngle+t*deltaAngle;let x=this.aX+this.xRadius*Math.cos(angle);let y=this.aY+this.yRadius*Math.sin(angle);if(this.aRotation!==0){const cos=Math.cos(this.aRotation);const sin=Math.sin(this.aRotation);const tx=x-this.aX;const ty=y-this.aY;x=tx*cos-ty*sin+this.aX;y=tx*sin+ty*cos+this.aY}return point.set(x,y)}copy(source){super.copy(source);this.aX=source.aX;this.aY=source.aY;this.xRadius=source.xRadius;this.yRadius=source.yRadius;this.aStartAngle=source.aStartAngle;this.aEndAngle=source.aEndAngle;this.aClockwise=source.aClockwise;this.aRotation=source.aRotation;return this}toJSON(){const data=super.toJSON();data.aX=this.aX;data.aY=this.aY;data.xRadius=this.xRadius;data.yRadius=this.yRadius;data.aStartAngle=this.aStartAngle;data.aEndAngle=this.aEndAngle;data.aClockwise=this.aClockwise;data.aRotation=this.aRotation;return data}fromJSON(json){super.fromJSON(json);this.aX=json.aX;this.aY=json.aY;this.xRadius=json.xRadius;this.yRadius=json.yRadius;this.aStartAngle=json.aStartAngle;this.aEndAngle=json.aEndAngle;this.aClockwise=json.aClockwise;this.aRotation=json.aRotation;return this}}class ArcCurve extends EllipseCurve{constructor(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){super(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise);this.isArcCurve=true;this.type="ArcCurve"}}function CubicPoly(){let c0=0,c1=0,c2=0,c3=0;function init(x0,x1,t0,t1){c0=x0;c1=t0;c2=-3*x0+3*x1-2*t0-t1;c3=2*x0-2*x1+t0+t1}return{initCatmullRom:function(x0,x1,x2,x3,tension){init(x1,x2,tension*(x2-x0),tension*(x3-x1))},initNonuniformCatmullRom:function(x0,x1,x2,x3,dt0,dt1,dt2){let t1=(x1-x0)/dt0-(x2-x0)/(dt0+dt1)+(x2-x1)/dt1;let t2=(x2-x1)/dt1-(x3-x1)/(dt1+dt2)+(x3-x2)/dt2;t1*=dt1;t2*=dt1;init(x1,x2,t1,t2)},calc:function(t){const t2=t*t;const t3=t2*t;return c0+c1*t+c2*t2+c3*t3}}}const tmp=new Vector3;const px=new CubicPoly;const py=new CubicPoly;const pz=new CubicPoly;class CatmullRomCurve3 extends Curve{constructor(points=[],closed=false,curveType="centripetal",tension=0.5){super();this.isCatmullRomCurve3=true;this.type="CatmullRomCurve3";this.points=points;this.closed=closed;this.curveType=curveType;this.tension=tension}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const points=this.points;const l=points.length;const p=(l-(this.closed?0:1))*t;let intPoint=Math.floor(p);let weight=p-intPoint;if(this.closed){intPoint+=intPoint>0?0:(Math.floor(Math.abs(intPoint)/l)+1)*l}else if(weight===0&&intPoint===l-1){intPoint=l-2;weight=1}let p0,p3;if(this.closed||intPoint>0){p0=points[(intPoint-1)%l]}else{tmp.subVectors(points[0],points[1]).add(points[0]);p0=tmp}const p1=points[intPoint%l];const p2=points[(intPoint+1)%l];if(this.closed||intPoint+2<l){p3=points[(intPoint+2)%l]}else{tmp.subVectors(points[l-1],points[l-2]).add(points[l-1]);p3=tmp}if(this.curveType==="centripetal"||this.curveType==="chordal"){const pow=this.curveType==="chordal"?0.5:0.25;let dt0=Math.pow(p0.distanceToSquared(p1),pow);let dt1=Math.pow(p1.distanceToSquared(p2),pow);let dt2=Math.pow(p2.distanceToSquared(p3),pow);if(dt1<1e-4)dt1=1;if(dt0<1e-4)dt0=dt1;if(dt2<1e-4)dt2=dt1;px.initNonuniformCatmullRom(p0.x,p1.x,p2.x,p3.x,dt0,dt1,dt2);py.initNonuniformCatmullRom(p0.y,p1.y,p2.y,p3.y,dt0,dt1,dt2);pz.initNonuniformCatmullRom(p0.z,p1.z,p2.z,p3.z,dt0,dt1,dt2)}else if(this.curveType==="catmullrom"){px.initCatmullRom(p0.x,p1.x,p2.x,p3.x,this.tension);py.initCatmullRom(p0.y,p1.y,p2.y,p3.y,this.tension);pz.initCatmullRom(p0.z,p1.z,p2.z,p3.z,this.tension)}point.set(px.calc(weight),py.calc(weight),pz.calc(weight));return point}copy(source){super.copy(source);this.points=[];for(let i=0,l=source.points.length;i<l;i++){const point=source.points[i];this.points.push(point.clone())}this.closed=source.closed;this.curveType=source.curveType;this.tension=source.tension;return this}toJSON(){const data=super.toJSON();data.points=[];for(let i=0,l=this.points.length;i<l;i++){const point=this.points[i];data.points.push(point.toArray())}data.closed=this.closed;data.curveType=this.curveType;data.tension=this.tension;return data}fromJSON(json){super.fromJSON(json);this.points=[];for(let i=0,l=json.points.length;i<l;i++){const point=json.points[i];this.points.push(new Vector3().fromArray(point))}this.closed=json.closed;this.curveType=json.curveType;this.tension=json.tension;return this}}function CatmullRom(t,p0,p1,p2,p3){const v0=(p2-p0)*0.5;const v1=(p3-p1)*0.5;const t2=t*t;const t3=t*t2;return(2*p1-2*p2+v0+v1)*t3+(-3*p1+3*p2-2*v0-v1)*t2+v0*t+p1}function QuadraticBezierP0(t,p){const k=1-t;return k*k*p}function QuadraticBezierP1(t,p){return 2*(1-t)*t*p}function QuadraticBezierP2(t,p){return t*t*p}function QuadraticBezier(t,p0,p1,p2){return QuadraticBezierP0(t,p0)+QuadraticBezierP1(t,p1)+QuadraticBezierP2(t,p2)}function CubicBezierP0(t,p){const k=1-t;return k*k*k*p}function CubicBezierP1(t,p){const k=1-t;return 3*k*k*t*p}function CubicBezierP2(t,p){return 3*(1-t)*t*t*p}function CubicBezierP3(t,p){return t*t*t*p}function CubicBezier(t,p0,p1,p2,p3){return CubicBezierP0(t,p0)+CubicBezierP1(t,p1)+CubicBezierP2(t,p2)+CubicBezierP3(t,p3)}class CubicBezierCurve extends Curve{constructor(v0=new Vector2,v1=new Vector2,v2=new Vector2,v3=new Vector2){super();this.isCubicBezierCurve=true;this.type="CubicBezierCurve";this.v0=v0;this.v1=v1;this.v2=v2;this.v3=v3}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2,v3=this.v3;point.set(CubicBezier(t,v0.x,v1.x,v2.x,v3.x),CubicBezier(t,v0.y,v1.y,v2.y,v3.y));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);this.v3.copy(source.v3);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();data.v3=this.v3.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);this.v3.fromArray(json.v3);return this}}class CubicBezierCurve3 extends Curve{constructor(v0=new Vector3,v1=new Vector3,v2=new Vector3,v3=new Vector3){super();this.isCubicBezierCurve3=true;this.type="CubicBezierCurve3";this.v0=v0;this.v1=v1;this.v2=v2;this.v3=v3}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2,v3=this.v3;point.set(CubicBezier(t,v0.x,v1.x,v2.x,v3.x),CubicBezier(t,v0.y,v1.y,v2.y,v3.y),CubicBezier(t,v0.z,v1.z,v2.z,v3.z));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);this.v3.copy(source.v3);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();data.v3=this.v3.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);this.v3.fromArray(json.v3);return this}}class LineCurve extends Curve{constructor(v1=new Vector2,v2=new Vector2){super();this.isLineCurve=true;this.type="LineCurve";this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;if(t===1){point.copy(this.v2)}else{point.copy(this.v2).sub(this.v1);point.multiplyScalar(t).add(this.v1)}return point}getPointAt(u,optionalTarget){return this.getPoint(u,optionalTarget)}getTangent(t,optionalTarget=new Vector2){return optionalTarget.subVectors(this.v2,this.v1).normalize()}getTangentAt(u,optionalTarget){return this.getTangent(u,optionalTarget)}copy(source){super.copy(source);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class LineCurve3 extends Curve{constructor(v1=new Vector3,v2=new Vector3){super();this.isLineCurve3=true;this.type="LineCurve3";this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;if(t===1){point.copy(this.v2)}else{point.copy(this.v2).sub(this.v1);point.multiplyScalar(t).add(this.v1)}return point}getPointAt(u,optionalTarget){return this.getPoint(u,optionalTarget)}getTangent(t,optionalTarget=new Vector3){return optionalTarget.subVectors(this.v2,this.v1).normalize()}getTangentAt(u,optionalTarget){return this.getTangent(u,optionalTarget)}copy(source){super.copy(source);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class QuadraticBezierCurve extends Curve{constructor(v0=new Vector2,v1=new Vector2,v2=new Vector2){super();this.isQuadraticBezierCurve=true;this.type="QuadraticBezierCurve";this.v0=v0;this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2;point.set(QuadraticBezier(t,v0.x,v1.x,v2.x),QuadraticBezier(t,v0.y,v1.y,v2.y));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class QuadraticBezierCurve3 extends Curve{constructor(v0=new Vector3,v1=new Vector3,v2=new Vector3){super();this.isQuadraticBezierCurve3=true;this.type="QuadraticBezierCurve3";this.v0=v0;this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2;point.set(QuadraticBezier(t,v0.x,v1.x,v2.x),QuadraticBezier(t,v0.y,v1.y,v2.y),QuadraticBezier(t,v0.z,v1.z,v2.z));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class SplineCurve extends Curve{constructor(points=[]){super();this.isSplineCurve=true;this.type="SplineCurve";this.points=points}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const points=this.points;const p=(points.length-1)*t;const intPoint=Math.floor(p);const weight=p-intPoint;const p0=points[intPoint===0?intPoint:intPoint-1];const p1=points[intPoint];const p2=points[intPoint>points.length-2?points.length-1:intPoint+1];const p3=points[intPoint>points.length-3?points.length-1:intPoint+2];point.set(CatmullRom(weight,p0.x,p1.x,p2.x,p3.x),CatmullRom(weight,p0.y,p1.y,p2.y,p3.y));return point}copy(source){super.copy(source);this.points=[];for(let i=0,l=source.points.length;i<l;i++){const point=source.points[i];this.points.push(point.clone())}return this}toJSON(){const data=super.toJSON();data.points=[];for(let i=0,l=this.points.length;i<l;i++){const point=this.points[i];data.points.push(point.toArray())}return data}fromJSON(json){super.fromJSON(json);this.points=[];for(let i=0,l=json.points.length;i<l;i++){const point=json.points[i];this.points.push(new Vector2().fromArray(point))}return this}}var Curves=Object.freeze({__proto__:null,ArcCurve:ArcCurve,CatmullRomCurve3:CatmullRomCurve3,CubicBezierCurve:CubicBezierCurve,CubicBezierCurve3:CubicBezierCurve3,EllipseCurve:EllipseCurve,LineCurve:LineCurve,LineCurve3:LineCurve3,QuadraticBezierCurve:QuadraticBezierCurve,QuadraticBezierCurve3:QuadraticBezierCurve3,SplineCurve:SplineCurve});class CurvePath extends Curve{constructor(){super();this.type="CurvePath";this.curves=[];this.autoClose=false}add(curve){this.curves.push(curve)}closePath(){const startPoint=this.curves[0].getPoint(0);const endPoint=this.curves[this.curves.length-1].getPoint(1);if(!startPoint.equals(endPoint)){const lineType=startPoint.isVector2===true?"LineCurve":"LineCurve3";this.curves.push(new Curves[lineType](endPoint,startPoint))}return this}getPoint(t,optionalTarget){const d=t*this.getLength();const curveLengths=this.getCurveLengths();let i=0;while(i<curveLengths.length){if(curveLengths[i]>=d){const diff=curveLengths[i]-d;const curve=this.curves[i];const segmentLength=curve.getLength();const u=segmentLength===0?0:1-diff/segmentLength;return curve.getPointAt(u,optionalTarget)}i++}return null}getLength(){const lens=this.getCurveLengths();return lens[lens.length-1]}updateArcLengths(){this.needsUpdate=true;this.cacheLengths=null;this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length){return this.cacheLengths}const lengths=[];let sums=0;for(let i=0,l=this.curves.length;i<l;i++){sums+=this.curves[i].getLength();lengths.push(sums)}this.cacheLengths=lengths;return lengths}getSpacedPoints(divisions=40){const points=[];for(let i=0;i<=divisions;i++){points.push(this.getPoint(i/divisions))}if(this.autoClose){points.push(points[0])}return points}getPoints(divisions=12){const points=[];let last;for(let i=0,curves=this.curves;i<curves.length;i++){const curve=curves[i];const resolution=curve.isEllipseCurve?divisions*2:curve.isLineCurve||curve.isLineCurve3?1:curve.isSplineCurve?divisions*curve.points.length:divisions;const pts=curve.getPoints(resolution);for(let j=0;j<pts.length;j++){const point=pts[j];if(last&&last.equals(point))continue;points.push(point);last=point}}if(this.autoClose&&points.length>1&&!points[points.length-1].equals(points[0])){points.push(points[0])}return points}copy(source){super.copy(source);this.curves=[];for(let i=0,l=source.curves.length;i<l;i++){const curve=source.curves[i];this.curves.push(curve.clone())}this.autoClose=source.autoClose;return this}toJSON(){const data=super.toJSON();data.autoClose=this.autoClose;data.curves=[];for(let i=0,l=this.curves.length;i<l;i++){const curve=this.curves[i];data.curves.push(curve.toJSON())}return data}fromJSON(json){super.fromJSON(json);this.autoClose=json.autoClose;this.curves=[];for(let i=0,l=json.curves.length;i<l;i++){const curve=json.curves[i];this.curves.push(new Curves[curve.type]().fromJSON(curve))}return this}}class Path extends CurvePath{constructor(points){super();this.type="Path";this.currentPoint=new Vector2;if(points){this.setFromPoints(points)}}setFromPoints(points){this.moveTo(points[0].x,points[0].y);for(let i=1,l=points.length;i<l;i++){this.lineTo(points[i].x,points[i].y)}return this}moveTo(x,y){this.currentPoint.set(x,y);return this}lineTo(x,y){const curve=new LineCurve(this.currentPoint.clone(),new Vector2(x,y));this.curves.push(curve);this.currentPoint.set(x,y);return this}quadraticCurveTo(aCPx,aCPy,aX,aY){const curve=new QuadraticBezierCurve(this.currentPoint.clone(),new Vector2(aCPx,aCPy),new Vector2(aX,aY));this.curves.push(curve);this.currentPoint.set(aX,aY);return this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){const curve=new CubicBezierCurve(this.currentPoint.clone(),new Vector2(aCP1x,aCP1y),new Vector2(aCP2x,aCP2y),new Vector2(aX,aY));this.curves.push(curve);this.currentPoint.set(aX,aY);return this}splineThru(pts){const npts=[this.currentPoint.clone()].concat(pts);const curve=new SplineCurve(npts);this.curves.push(curve);this.currentPoint.copy(pts[pts.length-1]);return this}arc(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){const x0=this.currentPoint.x;const y0=this.currentPoint.y;this.absarc(aX+x0,aY+y0,aRadius,aStartAngle,aEndAngle,aClockwise);return this}absarc(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){this.absellipse(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise);return this}ellipse(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation){const x0=this.currentPoint.x;const y0=this.currentPoint.y;this.absellipse(aX+x0,aY+y0,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation);return this}absellipse(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation){const curve=new EllipseCurve(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation);if(this.curves.length>0){const firstPoint=curve.getPoint(0);if(!firstPoint.equals(this.currentPoint)){this.lineTo(firstPoint.x,firstPoint.y)}}this.curves.push(curve);const lastPoint=curve.getPoint(1);this.currentPoint.copy(lastPoint);return this}copy(source){super.copy(source);this.currentPoint.copy(source.currentPoint);return this}toJSON(){const data=super.toJSON();data.currentPoint=this.currentPoint.toArray();return data}fromJSON(json){super.fromJSON(json);this.currentPoint.fromArray(json.currentPoint);return this}}class Shape extends Path{constructor(points){super(points);this.uuid=generateUUID();this.type="Shape";this.holes=[]}getPointsHoles(divisions){const holesPts=[];for(let i=0,l=this.holes.length;i<l;i++){holesPts[i]=this.holes[i].getPoints(divisions)}return holesPts}extractPoints(divisions){return{shape:this.getPoints(divisions),holes:this.getPointsHoles(divisions)}}copy(source){super.copy(source);this.holes=[];for(let i=0,l=source.holes.length;i<l;i++){const hole=source.holes[i];this.holes.push(hole.clone())}return this}toJSON(){const data=super.toJSON();data.uuid=this.uuid;data.holes=[];for(let i=0,l=this.holes.length;i<l;i++){const hole=this.holes[i];data.holes.push(hole.toJSON())}return data}fromJSON(json){super.fromJSON(json);this.uuid=json.uuid;this.holes=[];for(let i=0,l=json.holes.length;i<l;i++){const hole=json.holes[i];this.holes.push(new Path().fromJSON(hole))}return this}}function earcut(data,holeIndices,dim=2){const hasHoles=holeIndices&&holeIndices.length;const outerLen=hasHoles?holeIndices[0]*dim:data.length;let outerNode=linkedList(data,0,outerLen,dim,true);const triangles=[];if(!outerNode||outerNode.next===outerNode.prev)return triangles;let minX,minY,invSize;if(hasHoles)outerNode=eliminateHoles(data,holeIndices,outerNode,dim);if(data.length>80*dim){minX=data[0];minY=data[1];let maxX=minX;let maxY=minY;for(let i=dim;i<outerLen;i+=dim){const x=data[i];const y=data[i+1];if(x<minX)minX=x;if(y<minY)minY=y;if(x>maxX)maxX=x;if(y>maxY)maxY=y}invSize=Math.max(maxX-minX,maxY-minY);invSize=invSize!==0?32767/invSize:0}earcutLinked(outerNode,triangles,dim,minX,minY,invSize,0);return triangles}function linkedList(data,start,end,dim,clockwise){let last;if(clockwise===signedArea(data,start,end,dim)>0){for(let i=start;i<end;i+=dim)last=insertNode(i/dim|0,data[i],data[i+1],last)}else{for(let i=end-dim;i>=start;i-=dim)last=insertNode(i/dim|0,data[i],data[i+1],last)}if(last&&equals(last,last.next)){removeNode(last);last=last.next}return last}function filterPoints(start,end){if(!start)return start;if(!end)end=start;let p=start,again;do{again=false;if(!p.steiner&&(equals(p,p.next)||area(p.prev,p,p.next)===0)){removeNode(p);p=end=p.prev;if(p===p.next)break;again=true}else{p=p.next}}while(again||p!==end);return end}function earcutLinked(ear,triangles,dim,minX,minY,invSize,pass){if(!ear)return;if(!pass&&invSize)indexCurve(ear,minX,minY,invSize);let stop=ear;while(ear.prev!==ear.next){const prev=ear.prev;const next=ear.next;if(invSize?isEarHashed(ear,minX,minY,invSize):isEar(ear)){triangles.push(prev.i,ear.i,next.i);removeNode(ear);ear=next.next;stop=next.next;continue}ear=next;if(ear===stop){if(!pass){earcutLinked(filterPoints(ear),triangles,dim,minX,minY,invSize,1)}else if(pass===1){ear=cureLocalIntersections(filterPoints(ear),triangles);earcutLinked(ear,triangles,dim,minX,minY,invSize,2)}else if(pass===2){splitEarcut(ear,triangles,dim,minX,minY,invSize)}break}}}function isEar(ear){const a=ear.prev,b=ear,c=ear.next;if(area(a,b,c)>=0)return false;const ax=a.x,bx=b.x,cx=c.x,ay=a.y,by=b.y,cy=c.y;const x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy);let p=c.next;while(p!==a){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.next}return true}function isEarHashed(ear,minX,minY,invSize){const a=ear.prev,b=ear,c=ear.next;if(area(a,b,c)>=0)return false;const ax=a.x,bx=b.x,cx=c.x,ay=a.y,by=b.y,cy=c.y;const x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy);const minZ=zOrder(x0,y0,minX,minY,invSize),maxZ=zOrder(x1,y1,minX,minY,invSize);let p=ear.prevZ,n=ear.nextZ;while(p&&p.z>=minZ&&n&&n.z<=maxZ){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&p!==a&&p!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.prevZ;if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a&&n!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return false;n=n.nextZ}while(p&&p.z>=minZ){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&p!==a&&p!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.prevZ}while(n&&n.z<=maxZ){if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a&&n!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return false;n=n.nextZ}return true}function cureLocalIntersections(start,triangles){let p=start;do{const a=p.prev,b=p.next.next;if(!equals(a,b)&&intersects(a,p,p.next,b)&&locallyInside(a,b)&&locallyInside(b,a)){triangles.push(a.i,p.i,b.i);removeNode(p);removeNode(p.next);p=start=b}p=p.next}while(p!==start);return filterPoints(p)}function splitEarcut(start,triangles,dim,minX,minY,invSize){let a=start;do{let b=a.next.next;while(b!==a.prev){if(a.i!==b.i&&isValidDiagonal(a,b)){let c=splitPolygon(a,b);a=filterPoints(a,a.next);c=filterPoints(c,c.next);earcutLinked(a,triangles,dim,minX,minY,invSize,0);earcutLinked(c,triangles,dim,minX,minY,invSize,0);return}b=b.next}a=a.next}while(a!==start)}function eliminateHoles(data,holeIndices,outerNode,dim){const queue=[];for(let i=0,len=holeIndices.length;i<len;i++){const start=holeIndices[i]*dim;const end=i<len-1?holeIndices[i+1]*dim:data.length;const list=linkedList(data,start,end,dim,false);if(list===list.next)list.steiner=true;queue.push(getLeftmost(list))}queue.sort(compareXYSlope);for(let i=0;i<queue.length;i++){outerNode=eliminateHole(queue[i],outerNode)}return outerNode}function compareXYSlope(a,b){let result=a.x-b.x;if(result===0){result=a.y-b.y;if(result===0){const aSlope=(a.next.y-a.y)/(a.next.x-a.x);const bSlope=(b.next.y-b.y)/(b.next.x-b.x);result=aSlope-bSlope}}return result}function eliminateHole(hole,outerNode){const bridge=findHoleBridge(hole,outerNode);if(!bridge){return outerNode}const bridgeReverse=splitPolygon(bridge,hole);filterPoints(bridgeReverse,bridgeReverse.next);return filterPoints(bridge,bridge.next)}function findHoleBridge(hole,outerNode){let p=outerNode;const hx=hole.x;const hy=hole.y;let qx=-Infinity;let m;if(equals(hole,p))return p;do{if(equals(hole,p.next))return p.next;else if(hy<=p.y&&hy>=p.next.y&&p.next.y!==p.y){const x=p.x+(hy-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(x<=hx&&x>qx){qx=x;m=p.x<p.next.x?p:p.next;if(x===hx)return m}}p=p.next}while(p!==outerNode);if(!m)return null;const stop=m;const mx=m.x;const my=m.y;let tanMin=Infinity;p=m;do{if(hx>=p.x&&p.x>=mx&&hx!==p.x&&pointInTriangle(hy<my?hx:qx,hy,mx,my,hy<my?qx:hx,hy,p.x,p.y)){const tan=Math.abs(hy-p.y)/(hx-p.x);if(locallyInside(p,hole)&&(tan<tanMin||tan===tanMin&&(p.x>m.x||p.x===m.x&&sectorContainsSector(m,p)))){m=p;tanMin=tan}}p=p.next}while(p!==stop);return m}function sectorContainsSector(m,p){return area(m.prev,m,p.prev)<0&&area(p.next,m,m.next)<0}function indexCurve(start,minX,minY,invSize){let p=start;do{if(p.z===0)p.z=zOrder(p.x,p.y,minX,minY,invSize);p.prevZ=p.prev;p.nextZ=p.next;p=p.next}while(p!==start);p.prevZ.nextZ=null;p.prevZ=null;sortLinked(p)}function sortLinked(list){let numMerges;let inSize=1;do{let p=list;let e;list=null;let tail=null;numMerges=0;while(p){numMerges++;let q=p;let pSize=0;for(let i=0;i<inSize;i++){pSize++;q=q.nextZ;if(!q)break}let qSize=inSize;while(pSize>0||qSize>0&&q){if(pSize!==0&&(qSize===0||!q||p.z<=q.z)){e=p;p=p.nextZ;pSize--}else{e=q;q=q.nextZ;qSize--}if(tail)tail.nextZ=e;else list=e;e.prevZ=tail;tail=e}p=q}tail.nextZ=null;inSize*=2}while(numMerges>1);return list}function zOrder(x,y,minX,minY,invSize){x=(x-minX)*invSize|0;y=(y-minY)*invSize|0;x=(x|x<<8)&16711935;x=(x|x<<4)&252645135;x=(x|x<<2)&858993459;x=(x|x<<1)&1431655765;y=(y|y<<8)&16711935;y=(y|y<<4)&252645135;y=(y|y<<2)&858993459;y=(y|y<<1)&1431655765;return x|y<<1}function getLeftmost(start){let p=start,leftmost=start;do{if(p.x<leftmost.x||p.x===leftmost.x&&p.y<leftmost.y)leftmost=p;p=p.next}while(p!==start);return leftmost}function pointInTriangle(ax,ay,bx,by,cx,cy,px,py){return(cx-px)*(ay-py)>=(ax-px)*(cy-py)&&(ax-px)*(by-py)>=(bx-px)*(ay-py)&&(bx-px)*(cy-py)>=(cx-px)*(by-py)}function pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,px,py){return!(ax===px&&ay===py)&&pointInTriangle(ax,ay,bx,by,cx,cy,px,py)}function isValidDiagonal(a,b){return a.next.i!==b.i&&a.prev.i!==b.i&&!intersectsPolygon(a,b)&&(locallyInside(a,b)&&locallyInside(b,a)&&middleInside(a,b)&&(area(a.prev,a,b.prev)||area(a,b.prev,b))||equals(a,b)&&area(a.prev,a,a.next)>0&&area(b.prev,b,b.next)>0)}function area(p,q,r){return(q.y-p.y)*(r.x-q.x)-(q.x-p.x)*(r.y-q.y)}function equals(p1,p2){return p1.x===p2.x&&p1.y===p2.y}function intersects(p1,q1,p2,q2){const o1=sign(area(p1,q1,p2));const o2=sign(area(p1,q1,q2));const o3=sign(area(p2,q2,p1));const o4=sign(area(p2,q2,q1));if(o1!==o2&&o3!==o4)return true;if(o1===0&&onSegment(p1,p2,q1))return true;if(o2===0&&onSegment(p1,q2,q1))return true;if(o3===0&&onSegment(p2,p1,q2))return true;if(o4===0&&onSegment(p2,q1,q2))return true;return false}function onSegment(p,q,r){return q.x<=Math.max(p.x,r.x)&&q.x>=Math.min(p.x,r.x)&&q.y<=Math.max(p.y,r.y)&&q.y>=Math.min(p.y,r.y)}function sign(num){return num>0?1:num<0?-1:0}function intersectsPolygon(a,b){let p=a;do{if(p.i!==a.i&&p.next.i!==a.i&&p.i!==b.i&&p.next.i!==b.i&&intersects(p,p.next,a,b))return true;p=p.next}while(p!==a);return false}function locallyInside(a,b){return area(a.prev,a,a.next)<0?area(a,b,a.next)>=0&&area(a,a.prev,b)>=0:area(a,b,a.prev)<0||area(a,a.next,b)<0}function middleInside(a,b){let p=a;let inside=false;const px=(a.x+b.x)/2;const py=(a.y+b.y)/2;do{if(p.y>py!==p.next.y>py&&p.next.y!==p.y&&px<(p.next.x-p.x)*(py-p.y)/(p.next.y-p.y)+p.x)inside=!inside;p=p.next}while(p!==a);return inside}function splitPolygon(a,b){const a2=createNode(a.i,a.x,a.y),b2=createNode(b.i,b.x,b.y),an=a.next,bp=b.prev;a.next=b;b.prev=a;a2.next=an;an.prev=a2;b2.next=a2;a2.prev=b2;bp.next=b2;b2.prev=bp;return b2}function insertNode(i,x,y,last){const p=createNode(i,x,y);if(!last){p.prev=p;p.next=p}else{p.next=last.next;p.prev=last;last.next.prev=p;last.next=p}return p}function removeNode(p){p.next.prev=p.prev;p.prev.next=p.next;if(p.prevZ)p.prevZ.nextZ=p.nextZ;if(p.nextZ)p.nextZ.prevZ=p.prevZ}function createNode(i,x,y){return{i,x,y,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:false}}function signedArea(data,start,end,dim){let sum=0;for(let i=start,j=end-dim;i<end;i+=dim){sum+=(data[j]-data[i])*(data[i+1]+data[j+1]);j=i}return sum}class Earcut{static triangulate(data,holeIndices,dim=2){return earcut(data,holeIndices,dim)}}class ShapeUtils{static area(contour){const n=contour.length;let a=0;for(let p=n-1,q=0;q<n;p=q++){a+=contour[p].x*contour[q].y-contour[q].x*contour[p].y}return a*0.5}static isClockWise(pts){return ShapeUtils.area(pts)<0}static triangulateShape(contour,holes){const vertices=[];const holeIndices=[];const faces=[];removeDupEndPts(contour);addContour(vertices,contour);let holeIndex=contour.length;holes.forEach(removeDupEndPts);for(let i=0;i<holes.length;i++){holeIndices.push(holeIndex);holeIndex+=holes[i].length;addContour(vertices,holes[i])}const triangles=Earcut.triangulate(vertices,holeIndices);for(let i=0;i<triangles.length;i+=3){faces.push(triangles.slice(i,i+3))}return faces}}function removeDupEndPts(points){const l=points.length;if(l>2&&points[l-1].equals(points[0])){points.pop()}}function addContour(vertices,contour){for(let i=0;i<contour.length;i++){vertices.push(contour[i].x);vertices.push(contour[i].y)}}class ExtrudeGeometry extends BufferGeometry{constructor(shapes=new Shape([new Vector2(0.5,0.5),new Vector2(-0.5,0.5),new Vector2(-0.5,-0.5),new Vector2(0.5,-0.5)]),options={}){super();this.type="ExtrudeGeometry";this.parameters={shapes:shapes,options:options};shapes=Array.isArray(shapes)?shapes:[shapes];const scope=this;const verticesArray=[];const uvArray=[];for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];addShape(shape)}this.setAttribute("position",new Float32BufferAttribute(verticesArray,3));this.setAttribute("uv",new Float32BufferAttribute(uvArray,2));this.computeVertexNormals();function addShape(shape){const placeholder=[];const curveSegments=options.curveSegments!==undefined?options.curveSegments:12;const steps=options.steps!==undefined?options.steps:1;const depth=options.depth!==undefined?options.depth:1;let bevelEnabled=options.bevelEnabled!==undefined?options.bevelEnabled:true;let bevelThickness=options.bevelThickness!==undefined?options.bevelThickness:0.2;let bevelSize=options.bevelSize!==undefined?options.bevelSize:bevelThickness-0.1;let bevelOffset=options.bevelOffset!==undefined?options.bevelOffset:0;let bevelSegments=options.bevelSegments!==undefined?options.bevelSegments:3;const extrudePath=options.extrudePath;const uvgen=options.UVGenerator!==undefined?options.UVGenerator:WorldUVGenerator;let extrudePts,extrudeByPath=false;let splineTube,binormal,normal,position2;if(extrudePath){extrudePts=extrudePath.getSpacedPoints(steps);extrudeByPath=true;bevelEnabled=false;const isClosed=extrudePath.isCatmullRomCurve3?extrudePath.closed:false;splineTube=extrudePath.computeFrenetFrames(steps,isClosed);binormal=new Vector3;normal=new Vector3;position2=new Vector3}if(!bevelEnabled){bevelSegments=0;bevelThickness=0;bevelSize=0;bevelOffset=0}const shapePoints=shape.extractPoints(curveSegments);let vertices=shapePoints.shape;const holes=shapePoints.holes;const reverse=!ShapeUtils.isClockWise(vertices);if(reverse){vertices=vertices.reverse();for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];if(ShapeUtils.isClockWise(ahole)){holes[h]=ahole.reverse()}}}function mergeOverlappingPoints(points){const THRESHOLD=1e-10;const THRESHOLD_SQ=THRESHOLD*THRESHOLD;let prevPos=points[0];for(let i=1;i<=points.length;i++){const currentIndex=i%points.length;const currentPos=points[currentIndex];const dx=currentPos.x-prevPos.x;const dy=currentPos.y-prevPos.y;const distSq=dx*dx+dy*dy;const scalingFactorSqrt=Math.max(Math.abs(currentPos.x),Math.abs(currentPos.y),Math.abs(prevPos.x),Math.abs(prevPos.y));const thresholdSqScaled=THRESHOLD_SQ*scalingFactorSqrt*scalingFactorSqrt;if(distSq<=thresholdSqScaled){points.splice(currentIndex,1);i--;continue}prevPos=currentPos}}mergeOverlappingPoints(vertices);holes.forEach(mergeOverlappingPoints);const numHoles=holes.length;const contour=vertices;for(let h=0;h<numHoles;h++){const ahole=holes[h];vertices=vertices.concat(ahole)}function scalePt2(pt,vec,size){if(!vec)error("ExtrudeGeometry: vec does not exist");return pt.clone().addScaledVector(vec,size)}const vlen=vertices.length;function getBevelVec(inPt,inPrev,inNext){let v_trans_x,v_trans_y,shrink_by;const v_prev_x=inPt.x-inPrev.x,v_prev_y=inPt.y-inPrev.y;const v_next_x=inNext.x-inPt.x,v_next_y=inNext.y-inPt.y;const v_prev_lensq=v_prev_x*v_prev_x+v_prev_y*v_prev_y;const collinear0=v_prev_x*v_next_y-v_prev_y*v_next_x;if(Math.abs(collinear0)>Number.EPSILON){const v_prev_len=Math.sqrt(v_prev_lensq);const v_next_len=Math.sqrt(v_next_x*v_next_x+v_next_y*v_next_y);const ptPrevShift_x=inPrev.x-v_prev_y/v_prev_len;const ptPrevShift_y=inPrev.y+v_prev_x/v_prev_len;const ptNextShift_x=inNext.x-v_next_y/v_next_len;const ptNextShift_y=inNext.y+v_next_x/v_next_len;const sf=((ptNextShift_x-ptPrevShift_x)*v_next_y-(ptNextShift_y-ptPrevShift_y)*v_next_x)/(v_prev_x*v_next_y-v_prev_y*v_next_x);v_trans_x=ptPrevShift_x+v_prev_x*sf-inPt.x;v_trans_y=ptPrevShift_y+v_prev_y*sf-inPt.y;const v_trans_lensq=v_trans_x*v_trans_x+v_trans_y*v_trans_y;if(v_trans_lensq<=2){return new Vector2(v_trans_x,v_trans_y)}else{shrink_by=Math.sqrt(v_trans_lensq/2)}}else{let direction_eq=false;if(v_prev_x>Number.EPSILON){if(v_next_x>Number.EPSILON){direction_eq=true}}else{if(v_prev_x<-Number.EPSILON){if(v_next_x<-Number.EPSILON){direction_eq=true}}else{if(Math.sign(v_prev_y)===Math.sign(v_next_y)){direction_eq=true}}}if(direction_eq){v_trans_x=-v_prev_y;v_trans_y=v_prev_x;shrink_by=Math.sqrt(v_prev_lensq)}else{v_trans_x=v_prev_x;v_trans_y=v_prev_y;shrink_by=Math.sqrt(v_prev_lensq/2)}}return new Vector2(v_trans_x/shrink_by,v_trans_y/shrink_by)}const contourMovements=[];for(let i=0,il=contour.length,j=il-1,k=i+1;i<il;i++,j++,k++){if(j===il)j=0;if(k===il)k=0;contourMovements[i]=getBevelVec(contour[i],contour[j],contour[k])}const holesMovements=[];let oneHoleMovements,verticesMovements=contourMovements.concat();for(let h=0,hl=numHoles;h<hl;h++){const ahole=holes[h];oneHoleMovements=[];for(let i=0,il=ahole.length,j=il-1,k=i+1;i<il;i++,j++,k++){if(j===il)j=0;if(k===il)k=0;oneHoleMovements[i]=getBevelVec(ahole[i],ahole[j],ahole[k])}holesMovements.push(oneHoleMovements);verticesMovements=verticesMovements.concat(oneHoleMovements)}let faces;if(bevelSegments===0){faces=ShapeUtils.triangulateShape(contour,holes)}else{const contractedContourVertices=[];const expandedHoleVertices=[];for(let b=0;b<bevelSegments;b++){const t=b/bevelSegments;const z=bevelThickness*Math.cos(t*Math.PI/2);const bs=bevelSize*Math.sin(t*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i<il;i++){const vert=scalePt2(contour[i],contourMovements[i],bs);v(vert.x,vert.y,-z);if(t===0)contractedContourVertices.push(vert)}for(let h=0,hl=numHoles;h<hl;h++){const ahole=holes[h];oneHoleMovements=holesMovements[h];const oneHoleVertices=[];for(let i=0,il=ahole.length;i<il;i++){const vert=scalePt2(ahole[i],oneHoleMovements[i],bs);v(vert.x,vert.y,-z);if(t===0)oneHoleVertices.push(vert)}if(t===0)expandedHoleVertices.push(oneHoleVertices)}}faces=ShapeUtils.triangulateShape(contractedContourVertices,expandedHoleVertices)}const flen=faces.length;const bs=bevelSize+bevelOffset;for(let i=0;i<vlen;i++){const vert=bevelEnabled?scalePt2(vertices[i],verticesMovements[i],bs):vertices[i];if(!extrudeByPath){v(vert.x,vert.y,0)}else{normal.copy(splineTube.normals[0]).multiplyScalar(vert.x);binormal.copy(splineTube.binormals[0]).multiplyScalar(vert.y);position2.copy(extrudePts[0]).add(normal).add(binormal);v(position2.x,position2.y,position2.z)}}for(let s=1;s<=steps;s++){for(let i=0;i<vlen;i++){const vert=bevelEnabled?scalePt2(vertices[i],verticesMovements[i],bs):vertices[i];if(!extrudeByPath){v(vert.x,vert.y,depth/steps*s)}else{normal.copy(splineTube.normals[s]).multiplyScalar(vert.x);binormal.copy(splineTube.binormals[s]).multiplyScalar(vert.y);position2.copy(extrudePts[s]).add(normal).add(binormal);v(position2.x,position2.y,position2.z)}}}for(let b=bevelSegments-1;b>=0;b--){const t=b/bevelSegments;const z=bevelThickness*Math.cos(t*Math.PI/2);const bs=bevelSize*Math.sin(t*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i<il;i++){const vert=scalePt2(contour[i],contourMovements[i],bs);v(vert.x,vert.y,depth+z)}for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];oneHoleMovements=holesMovements[h];for(let i=0,il=ahole.length;i<il;i++){const vert=scalePt2(ahole[i],oneHoleMovements[i],bs);if(!extrudeByPath){v(vert.x,vert.y,depth+z)}else{v(vert.x,vert.y+extrudePts[steps-1].y,extrudePts[steps-1].x+z)}}}}buildLidFaces();buildSideFaces();function buildLidFaces(){const start=verticesArray.length/3;if(bevelEnabled){let layer=0;let offset=vlen*layer;for(let i=0;i<flen;i++){const face=faces[i];f3(face[2]+offset,face[1]+offset,face[0]+offset)}layer=steps+bevelSegments*2;offset=vlen*layer;for(let i=0;i<flen;i++){const face=faces[i];f3(face[0]+offset,face[1]+offset,face[2]+offset)}}else{for(let i=0;i<flen;i++){const face=faces[i];f3(face[2],face[1],face[0])}for(let i=0;i<flen;i++){const face=faces[i];f3(face[0]+vlen*steps,face[1]+vlen*steps,face[2]+vlen*steps)}}scope.addGroup(start,verticesArray.length/3-start,0)}function buildSideFaces(){const start=verticesArray.length/3;let layeroffset=0;sidewalls(contour,layeroffset);layeroffset+=contour.length;for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];sidewalls(ahole,layeroffset);layeroffset+=ahole.length}scope.addGroup(start,verticesArray.length/3-start,1)}function sidewalls(contour,layeroffset){let i=contour.length;while(--i>=0){const j=i;let k=i-1;if(k<0)k=contour.length-1;for(let s=0,sl=steps+bevelSegments*2;s<sl;s++){const slen1=vlen*s;const slen2=vlen*(s+1);const a=layeroffset+j+slen1,b=layeroffset+k+slen1,c=layeroffset+k+slen2,d=layeroffset+j+slen2;f4(a,b,c,d)}}}function v(x,y,z){placeholder.push(x);placeholder.push(y);placeholder.push(z)}function f3(a,b,c){addVertex(a);addVertex(b);addVertex(c);const nextIndex=verticesArray.length/3;const uvs=uvgen.generateTopUV(scope,verticesArray,nextIndex-3,nextIndex-2,nextIndex-1);addUV(uvs[0]);addUV(uvs[1]);addUV(uvs[2])}function f4(a,b,c,d){addVertex(a);addVertex(b);addVertex(d);addVertex(b);addVertex(c);addVertex(d);const nextIndex=verticesArray.length/3;const uvs=uvgen.generateSideWallUV(scope,verticesArray,nextIndex-6,nextIndex-3,nextIndex-2,nextIndex-1);addUV(uvs[0]);addUV(uvs[1]);addUV(uvs[3]);addUV(uvs[1]);addUV(uvs[2]);addUV(uvs[3])}function addVertex(index){verticesArray.push(placeholder[index*3+0]);verticesArray.push(placeholder[index*3+1]);verticesArray.push(placeholder[index*3+2])}function addUV(vector2){uvArray.push(vector2.x);uvArray.push(vector2.y)}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();const shapes=this.parameters.shapes;const options=this.parameters.options;return toJSON$1(shapes,options,data)}static fromJSON(data,shapes){const geometryShapes=[];for(let j=0,jl=data.shapes.length;j<jl;j++){const shape=shapes[data.shapes[j]];geometryShapes.push(shape)}const extrudePath=data.options.extrudePath;if(extrudePath!==undefined){data.options.extrudePath=new Curves[extrudePath.type]().fromJSON(extrudePath)}return new ExtrudeGeometry(geometryShapes,data.options)}}const WorldUVGenerator={generateTopUV:function(geometry,vertices,indexA,indexB,indexC){const a_x=vertices[indexA*3];const a_y=vertices[indexA*3+1];const b_x=vertices[indexB*3];const b_y=vertices[indexB*3+1];const c_x=vertices[indexC*3];const c_y=vertices[indexC*3+1];return[new Vector2(a_x,a_y),new Vector2(b_x,b_y),new Vector2(c_x,c_y)]},generateSideWallUV:function(geometry,vertices,indexA,indexB,indexC,indexD){const a_x=vertices[indexA*3];const a_y=vertices[indexA*3+1];const a_z=vertices[indexA*3+2];const b_x=vertices[indexB*3];const b_y=vertices[indexB*3+1];const b_z=vertices[indexB*3+2];const c_x=vertices[indexC*3];const c_y=vertices[indexC*3+1];const c_z=vertices[indexC*3+2];const d_x=vertices[indexD*3];const d_y=vertices[indexD*3+1];const d_z=vertices[indexD*3+2];if(Math.abs(a_y-b_y)<Math.abs(a_x-b_x)){return[new Vector2(a_x,1-a_z),new Vector2(b_x,1-b_z),new Vector2(c_x,1-c_z),new Vector2(d_x,1-d_z)]}else{return[new Vector2(a_y,1-a_z),new Vector2(b_y,1-b_z),new Vector2(c_y,1-c_z),new Vector2(d_y,1-d_z)]}}};function toJSON$1(shapes,options,data){data.shapes=[];if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];data.shapes.push(shape.uuid)}}else{data.shapes.push(shapes.uuid)}data.options=Object.assign({},options);if(options.extrudePath!==undefined)data.options.extrudePath=options.extrudePath.toJSON();return data}class IcosahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const t=(1+Math.sqrt(5))/2;const vertices=[-1,t,0,1,t,0,-1,-t,0,1,-t,0,0,-1,t,0,1,t,0,-1,-t,0,1,-t,t,0,-1,t,0,1,-t,0,-1,-t,0,1];const indices=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(vertices,indices,radius,detail);this.type="IcosahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new IcosahedronGeometry(data.radius,data.detail)}}class LatheGeometry extends BufferGeometry{constructor(points=[new Vector2(0,-0.5),new Vector2(0.5,0),new Vector2(0,0.5)],segments=12,phiStart=0,phiLength=Math.PI*2){super();this.type="LatheGeometry";this.parameters={points:points,segments:segments,phiStart:phiStart,phiLength:phiLength};segments=Math.floor(segments);phiLength=clamp(phiLength,0,Math.PI*2);const indices=[];const vertices=[];const uvs=[];const initNormals=[];const normals=[];const inverseSegments=1/segments;const vertex=new Vector3;const uv=new Vector2;const normal=new Vector3;const curNormal=new Vector3;const prevNormal=new Vector3;let dx=0;let dy=0;for(let j=0;j<=points.length-1;j++){switch(j){case 0:dx=points[j+1].x-points[j].x;dy=points[j+1].y-points[j].y;normal.x=dy*1;normal.y=-dx;normal.z=dy*0;prevNormal.copy(normal);normal.normalize();initNormals.push(normal.x,normal.y,normal.z);break;case points.length-1:initNormals.push(prevNormal.x,prevNormal.y,prevNormal.z);break;default:dx=points[j+1].x-points[j].x;dy=points[j+1].y-points[j].y;normal.x=dy*1;normal.y=-dx;normal.z=dy*0;curNormal.copy(normal);normal.x+=prevNormal.x;normal.y+=prevNormal.y;normal.z+=prevNormal.z;normal.normalize();initNormals.push(normal.x,normal.y,normal.z);prevNormal.copy(curNormal);}}for(let i=0;i<=segments;i++){const phi=phiStart+i*inverseSegments*phiLength;const sin=Math.sin(phi);const cos=Math.cos(phi);for(let j=0;j<=points.length-1;j++){vertex.x=points[j].x*sin;vertex.y=points[j].y;vertex.z=points[j].x*cos;vertices.push(vertex.x,vertex.y,vertex.z);uv.x=i/segments;uv.y=j/(points.length-1);uvs.push(uv.x,uv.y);const x=initNormals[3*j+0]*sin;const y=initNormals[3*j+1];const z=initNormals[3*j+0]*cos;normals.push(x,y,z)}}for(let i=0;i<segments;i++){for(let j=0;j<points.length-1;j++){const base=j+i*points.length;const a=base;const b=base+points.length;const c=base+points.length+1;const d=base+1;indices.push(a,b,d);indices.push(c,d,b)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));this.setAttribute("normal",new Float32BufferAttribute(normals,3))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new LatheGeometry(data.points,data.segments,data.phiStart,data.phiLength)}}class OctahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const vertices=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1];const indices=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(vertices,indices,radius,detail);this.type="OctahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new OctahedronGeometry(data.radius,data.detail)}}class PlaneGeometry extends BufferGeometry{constructor(width=1,height=1,widthSegments=1,heightSegments=1){super();this.type="PlaneGeometry";this.parameters={width:width,height:height,widthSegments:widthSegments,heightSegments:heightSegments};const width_half=width/2;const height_half=height/2;const gridX=Math.floor(widthSegments);const gridY=Math.floor(heightSegments);const gridX1=gridX+1;const gridY1=gridY+1;const segment_width=width/gridX;const segment_height=height/gridY;const indices=[];const vertices=[];const normals=[];const uvs=[];for(let iy=0;iy<gridY1;iy++){const y=iy*segment_height-height_half;for(let ix=0;ix<gridX1;ix++){const x=ix*segment_width-width_half;vertices.push(x,-y,0);normals.push(0,0,1);uvs.push(ix/gridX);uvs.push(1-iy/gridY)}}for(let iy=0;iy<gridY;iy++){for(let ix=0;ix<gridX;ix++){const a=ix+gridX1*iy;const b=ix+gridX1*(iy+1);const c=ix+1+gridX1*(iy+1);const d=ix+1+gridX1*iy;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new PlaneGeometry(data.width,data.height,data.widthSegments,data.heightSegments)}}class RingGeometry extends BufferGeometry{constructor(innerRadius=0.5,outerRadius=1,thetaSegments=32,phiSegments=1,thetaStart=0,thetaLength=Math.PI*2){super();this.type="RingGeometry";this.parameters={innerRadius:innerRadius,outerRadius:outerRadius,thetaSegments:thetaSegments,phiSegments:phiSegments,thetaStart:thetaStart,thetaLength:thetaLength};thetaSegments=Math.max(3,thetaSegments);phiSegments=Math.max(1,phiSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let radius=innerRadius;const radiusStep=(outerRadius-innerRadius)/phiSegments;const vertex=new Vector3;const uv=new Vector2;for(let j=0;j<=phiSegments;j++){for(let i=0;i<=thetaSegments;i++){const segment=thetaStart+i/thetaSegments*thetaLength;vertex.x=radius*Math.cos(segment);vertex.y=radius*Math.sin(segment);vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,0,1);uv.x=(vertex.x/outerRadius+1)/2;uv.y=(vertex.y/outerRadius+1)/2;uvs.push(uv.x,uv.y)}radius+=radiusStep}for(let j=0;j<phiSegments;j++){const thetaSegmentLevel=j*(thetaSegments+1);for(let i=0;i<thetaSegments;i++){const segment=i+thetaSegmentLevel;const a=segment;const b=segment+thetaSegments+1;const c=segment+thetaSegments+2;const d=segment+1;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new RingGeometry(data.innerRadius,data.outerRadius,data.thetaSegments,data.phiSegments,data.thetaStart,data.thetaLength)}}class ShapeGeometry extends BufferGeometry{constructor(shapes=new Shape([new Vector2(0,0.5),new Vector2(-0.5,-0.5),new Vector2(0.5,-0.5)]),curveSegments=12){super();this.type="ShapeGeometry";this.parameters={shapes:shapes,curveSegments:curveSegments};const indices=[];const vertices=[];const normals=[];const uvs=[];let groupStart=0;let groupCount=0;if(Array.isArray(shapes)===false){addShape(shapes)}else{for(let i=0;i<shapes.length;i++){addShape(shapes[i]);this.addGroup(groupStart,groupCount,i);groupStart+=groupCount;groupCount=0}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function addShape(shape){const indexOffset=vertices.length/3;const points=shape.extractPoints(curveSegments);let shapeVertices=points.shape;const shapeHoles=points.holes;if(ShapeUtils.isClockWise(shapeVertices)===false){shapeVertices=shapeVertices.reverse()}for(let i=0,l=shapeHoles.length;i<l;i++){const shapeHole=shapeHoles[i];if(ShapeUtils.isClockWise(shapeHole)===true){shapeHoles[i]=shapeHole.reverse()}}const faces=ShapeUtils.triangulateShape(shapeVertices,shapeHoles);for(let i=0,l=shapeHoles.length;i<l;i++){const shapeHole=shapeHoles[i];shapeVertices=shapeVertices.concat(shapeHole)}for(let i=0,l=shapeVertices.length;i<l;i++){const vertex=shapeVertices[i];vertices.push(vertex.x,vertex.y,0);normals.push(0,0,1);uvs.push(vertex.x,vertex.y)}for(let i=0,l=faces.length;i<l;i++){const face=faces[i];const a=face[0]+indexOffset;const b=face[1]+indexOffset;const c=face[2]+indexOffset;indices.push(a,b,c);groupCount+=3}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();const shapes=this.parameters.shapes;return toJSON(shapes,data)}static fromJSON(data,shapes){const geometryShapes=[];for(let j=0,jl=data.shapes.length;j<jl;j++){const shape=shapes[data.shapes[j]];geometryShapes.push(shape)}return new ShapeGeometry(geometryShapes,data.curveSegments)}}function toJSON(shapes,data){data.shapes=[];if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];data.shapes.push(shape.uuid)}}else{data.shapes.push(shapes.uuid)}return data}class SphereGeometry extends BufferGeometry{constructor(radius=1,widthSegments=32,heightSegments=16,phiStart=0,phiLength=Math.PI*2,thetaStart=0,thetaLength=Math.PI){super();this.type="SphereGeometry";this.parameters={radius:radius,widthSegments:widthSegments,heightSegments:heightSegments,phiStart:phiStart,phiLength:phiLength,thetaStart:thetaStart,thetaLength:thetaLength};widthSegments=Math.max(3,Math.floor(widthSegments));heightSegments=Math.max(2,Math.floor(heightSegments));const thetaEnd=Math.min(thetaStart+thetaLength,Math.PI);let index=0;const grid=[];const vertex=new Vector3;const normal=new Vector3;const indices=[];const vertices=[];const normals=[];const uvs=[];for(let iy=0;iy<=heightSegments;iy++){const verticesRow=[];const v=iy/heightSegments;let uOffset=0;if(iy===0&&thetaStart===0){uOffset=0.5/widthSegments}else if(iy===heightSegments&&thetaEnd===Math.PI){uOffset=-0.5/widthSegments}for(let ix=0;ix<=widthSegments;ix++){const u=ix/widthSegments;vertex.x=-radius*Math.cos(phiStart+u*phiLength)*Math.sin(thetaStart+v*thetaLength);vertex.y=radius*Math.cos(thetaStart+v*thetaLength);vertex.z=radius*Math.sin(phiStart+u*phiLength)*Math.sin(thetaStart+v*thetaLength);vertices.push(vertex.x,vertex.y,vertex.z);normal.copy(vertex).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u+uOffset,1-v);verticesRow.push(index++)}grid.push(verticesRow)}for(let iy=0;iy<heightSegments;iy++){for(let ix=0;ix<widthSegments;ix++){const a=grid[iy][ix+1];const b=grid[iy][ix];const c=grid[iy+1][ix];const d=grid[iy+1][ix+1];if(iy!==0||thetaStart>0)indices.push(a,b,d);if(iy!==heightSegments-1||thetaEnd<Math.PI)indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new SphereGeometry(data.radius,data.widthSegments,data.heightSegments,data.phiStart,data.phiLength,data.thetaStart,data.thetaLength)}}class TetrahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const vertices=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1];const indices=[2,1,0,0,3,2,1,3,0,2,3,1];super(vertices,indices,radius,detail);this.type="TetrahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new TetrahedronGeometry(data.radius,data.detail)}}class TorusGeometry extends BufferGeometry{constructor(radius=1,tube=0.4,radialSegments=12,tubularSegments=48,arc=Math.PI*2){super();this.type="TorusGeometry";this.parameters={radius:radius,tube:tube,radialSegments:radialSegments,tubularSegments:tubularSegments,arc:arc};radialSegments=Math.floor(radialSegments);tubularSegments=Math.floor(tubularSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];const center=new Vector3;const vertex=new Vector3;const normal=new Vector3;for(let j=0;j<=radialSegments;j++){for(let i=0;i<=tubularSegments;i++){const u=i/tubularSegments*arc;const v=j/radialSegments*Math.PI*2;vertex.x=(radius+tube*Math.cos(v))*Math.cos(u);vertex.y=(radius+tube*Math.cos(v))*Math.sin(u);vertex.z=tube*Math.sin(v);vertices.push(vertex.x,vertex.y,vertex.z);center.x=radius*Math.cos(u);center.y=radius*Math.sin(u);normal.subVectors(vertex,center).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(i/tubularSegments);uvs.push(j/radialSegments)}}for(let j=1;j<=radialSegments;j++){for(let i=1;i<=tubularSegments;i++){const a=(tubularSegments+1)*j+i-1;const b=(tubularSegments+1)*(j-1)+i-1;const c=(tubularSegments+1)*(j-1)+i;const d=(tubularSegments+1)*j+i;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new TorusGeometry(data.radius,data.tube,data.radialSegments,data.tubularSegments,data.arc)}}class TorusKnotGeometry extends BufferGeometry{constructor(radius=1,tube=0.4,tubularSegments=64,radialSegments=8,p=2,q=3){super();this.type="TorusKnotGeometry";this.parameters={radius:radius,tube:tube,tubularSegments:tubularSegments,radialSegments:radialSegments,p:p,q:q};tubularSegments=Math.floor(tubularSegments);radialSegments=Math.floor(radialSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];const vertex=new Vector3;const normal=new Vector3;const P1=new Vector3;const P2=new Vector3;const B=new Vector3;const T=new Vector3;const N=new Vector3;for(let i=0;i<=tubularSegments;++i){const u=i/tubularSegments*p*Math.PI*2;calculatePositionOnCurve(u,p,q,radius,P1);calculatePositionOnCurve(u+0.01,p,q,radius,P2);T.subVectors(P2,P1);N.addVectors(P2,P1);B.crossVectors(T,N);N.crossVectors(B,T);B.normalize();N.normalize();for(let j=0;j<=radialSegments;++j){const v=j/radialSegments*Math.PI*2;const cx=-tube*Math.cos(v);const cy=tube*Math.sin(v);vertex.x=P1.x+(cx*N.x+cy*B.x);vertex.y=P1.y+(cx*N.y+cy*B.y);vertex.z=P1.z+(cx*N.z+cy*B.z);vertices.push(vertex.x,vertex.y,vertex.z);normal.subVectors(vertex,P1).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(i/tubularSegments);uvs.push(j/radialSegments)}}for(let j=1;j<=tubularSegments;j++){for(let i=1;i<=radialSegments;i++){const a=(radialSegments+1)*(j-1)+(i-1);const b=(radialSegments+1)*j+(i-1);const c=(radialSegments+1)*j+i;const d=(radialSegments+1)*(j-1)+i;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function calculatePositionOnCurve(u,p,q,radius,position){const cu=Math.cos(u);const su=Math.sin(u);const quOverP=q/p*u;const cs=Math.cos(quOverP);position.x=radius*(2+cs)*0.5*cu;position.y=radius*(2+cs)*su*0.5;position.z=radius*Math.sin(quOverP)*0.5}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new TorusKnotGeometry(data.radius,data.tube,data.tubularSegments,data.radialSegments,data.p,data.q)}}class TubeGeometry extends BufferGeometry{constructor(path=new QuadraticBezierCurve3(new Vector3(-1,-1,0),new Vector3(-1,1,0),new Vector3(1,1,0)),tubularSegments=64,radius=1,radialSegments=8,closed=false){super();this.type="TubeGeometry";this.parameters={path:path,tubularSegments:tubularSegments,radius:radius,radialSegments:radialSegments,closed:closed};const frames=path.computeFrenetFrames(tubularSegments,closed);this.tangents=frames.tangents;this.normals=frames.normals;this.binormals=frames.binormals;const vertex=new Vector3;const normal=new Vector3;const uv=new Vector2;let P=new Vector3;const vertices=[];const normals=[];const uvs=[];const indices=[];generateBufferData();this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function generateBufferData(){for(let i=0;i<tubularSegments;i++){generateSegment(i)}generateSegment(closed===false?tubularSegments:0);generateUVs();generateIndices()}function generateSegment(i){P=path.getPointAt(i/tubularSegments,P);const N=frames.normals[i];const B=frames.binormals[i];for(let j=0;j<=radialSegments;j++){const v=j/radialSegments*Math.PI*2;const sin=Math.sin(v);const cos=-Math.cos(v);normal.x=cos*N.x+sin*B.x;normal.y=cos*N.y+sin*B.y;normal.z=cos*N.z+sin*B.z;normal.normalize();normals.push(normal.x,normal.y,normal.z);vertex.x=P.x+radius*normal.x;vertex.y=P.y+radius*normal.y;vertex.z=P.z+radius*normal.z;vertices.push(vertex.x,vertex.y,vertex.z)}}function generateIndices(){for(let j=1;j<=tubularSegments;j++){for(let i=1;i<=radialSegments;i++){const a=(radialSegments+1)*(j-1)+(i-1);const b=(radialSegments+1)*j+(i-1);const c=(radialSegments+1)*j+i;const d=(radialSegments+1)*(j-1)+i;indices.push(a,b,d);indices.push(b,c,d)}}}function generateUVs(){for(let i=0;i<=tubularSegments;i++){for(let j=0;j<=radialSegments;j++){uv.x=i/tubularSegments;uv.y=j/radialSegments;uvs.push(uv.x,uv.y)}}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();data.path=this.parameters.path.toJSON();return data}static fromJSON(data){return new TubeGeometry(new Curves[data.path.type]().fromJSON(data.path),data.tubularSegments,data.radius,data.radialSegments,data.closed)}}class WireframeGeometry extends BufferGeometry{constructor(geometry=null){super();this.type="WireframeGeometry";this.parameters={geometry:geometry};if(geometry!==null){const vertices=[];const edges=new Set;const start=new Vector3;const end=new Vector3;if(geometry.index!==null){const position=geometry.attributes.position;const indices=geometry.index;let groups=geometry.groups;if(groups.length===0){groups=[{start:0,count:indices.count,materialIndex:0}]}for(let o=0,ol=groups.length;o<ol;++o){const group=groups[o];const groupStart=group.start;const groupCount=group.count;for(let i=groupStart,l=groupStart+groupCount;i<l;i+=3){for(let j=0;j<3;j++){const index1=indices.getX(i+j);const index2=indices.getX(i+(j+1)%3);start.fromBufferAttribute(position,index1);end.fromBufferAttribute(position,index2);if(isUniqueEdge(start,end,edges)===true){vertices.push(start.x,start.y,start.z);vertices.push(end.x,end.y,end.z)}}}}}else{const position=geometry.attributes.position;for(let i=0,l=position.count/3;i<l;i++){for(let j=0;j<3;j++){const index1=3*i+j;const index2=3*i+(j+1)%3;start.fromBufferAttribute(position,index1);end.fromBufferAttribute(position,index2);if(isUniqueEdge(start,end,edges)===true){vertices.push(start.x,start.y,start.z);vertices.push(end.x,end.y,end.z)}}}}this.setAttribute("position",new Float32BufferAttribute(vertices,3))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}}function isUniqueEdge(start,end,edges){const hash1=`${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`;const hash2=`${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`;if(edges.has(hash1)===true||edges.has(hash2)===true){return false}else{edges.add(hash1);edges.add(hash2);return true}}var Geometries=Object.freeze({__proto__:null,BoxGeometry:BoxGeometry,CapsuleGeometry:CapsuleGeometry,CircleGeometry:CircleGeometry,ConeGeometry:ConeGeometry,CylinderGeometry:CylinderGeometry,DodecahedronGeometry:DodecahedronGeometry,EdgesGeometry:EdgesGeometry,ExtrudeGeometry:ExtrudeGeometry,IcosahedronGeometry:IcosahedronGeometry,LatheGeometry:LatheGeometry,OctahedronGeometry:OctahedronGeometry,PlaneGeometry:PlaneGeometry,PolyhedronGeometry:PolyhedronGeometry,RingGeometry:RingGeometry,ShapeGeometry:ShapeGeometry,SphereGeometry:SphereGeometry,TetrahedronGeometry:TetrahedronGeometry,TorusGeometry:TorusGeometry,TorusKnotGeometry:TorusKnotGeometry,TubeGeometry:TubeGeometry,WireframeGeometry:WireframeGeometry});class ShadowMaterial extends Material{constructor(parameters){super();this.isShadowMaterial=true;this.type="ShadowMaterial";this.color=new Color(0);this.transparent=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.fog=source.fog;return this}}class RawShaderMaterial extends ShaderMaterial{constructor(parameters){super(parameters);this.isRawShaderMaterial=true;this.type="RawShaderMaterial"}}class MeshStandardMaterial extends Material{constructor(parameters){super();this.isMeshStandardMaterial=true;this.type="MeshStandardMaterial";this.defines={"STANDARD":""};this.color=new Color(16777215);this.roughness=1;this.metalness=0;this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.roughnessMap=null;this.metalnessMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.envMapIntensity=1;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.defines={"STANDARD":""};this.color.copy(source.color);this.roughness=source.roughness;this.metalness=source.metalness;this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.roughnessMap=source.roughnessMap;this.metalnessMap=source.metalnessMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.envMapIntensity=source.envMapIntensity;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(parameters){super();this.isMeshPhysicalMaterial=true;this.defines={"STANDARD":"","PHYSICAL":""};this.type="MeshPhysicalMaterial";this.anisotropyRotation=0;this.anisotropyMap=null;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new Vector2(1,1);this.clearcoatNormalMap=null;this.ior=1.5;Object.defineProperty(this,"reflectivity",{get:function(){return clamp(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(reflectivity){this.ior=(1+0.4*reflectivity)/(1-0.4*reflectivity)}});this.iridescenceMap=null;this.iridescenceIOR=1.3;this.iridescenceThicknessRange=[100,400];this.iridescenceThicknessMap=null;this.sheenColor=new Color(0);this.sheenColorMap=null;this.sheenRoughness=1;this.sheenRoughnessMap=null;this.transmissionMap=null;this.thickness=0;this.thicknessMap=null;this.attenuationDistance=Infinity;this.attenuationColor=new Color(1,1,1);this.specularIntensity=1;this.specularIntensityMap=null;this.specularColor=new Color(1,1,1);this.specularColorMap=null;this._anisotropy=0;this._clearcoat=0;this._dispersion=0;this._iridescence=0;this._sheen=0;this._transmission=0;this.setValues(parameters)}get anisotropy(){return this._anisotropy}set anisotropy(value){if(this._anisotropy>0!==value>0){this.version++}this._anisotropy=value}get clearcoat(){return this._clearcoat}set clearcoat(value){if(this._clearcoat>0!==value>0){this.version++}this._clearcoat=value}get iridescence(){return this._iridescence}set iridescence(value){if(this._iridescence>0!==value>0){this.version++}this._iridescence=value}get dispersion(){return this._dispersion}set dispersion(value){if(this._dispersion>0!==value>0){this.version++}this._dispersion=value}get sheen(){return this._sheen}set sheen(value){if(this._sheen>0!==value>0){this.version++}this._sheen=value}get transmission(){return this._transmission}set transmission(value){if(this._transmission>0!==value>0){this.version++}this._transmission=value}copy(source){super.copy(source);this.defines={"STANDARD":"","PHYSICAL":""};this.anisotropy=source.anisotropy;this.anisotropyRotation=source.anisotropyRotation;this.anisotropyMap=source.anisotropyMap;this.clearcoat=source.clearcoat;this.clearcoatMap=source.clearcoatMap;this.clearcoatRoughness=source.clearcoatRoughness;this.clearcoatRoughnessMap=source.clearcoatRoughnessMap;this.clearcoatNormalMap=source.clearcoatNormalMap;this.clearcoatNormalScale.copy(source.clearcoatNormalScale);this.dispersion=source.dispersion;this.ior=source.ior;this.iridescence=source.iridescence;this.iridescenceMap=source.iridescenceMap;this.iridescenceIOR=source.iridescenceIOR;this.iridescenceThicknessRange=[...source.iridescenceThicknessRange];this.iridescenceThicknessMap=source.iridescenceThicknessMap;this.sheen=source.sheen;this.sheenColor.copy(source.sheenColor);this.sheenColorMap=source.sheenColorMap;this.sheenRoughness=source.sheenRoughness;this.sheenRoughnessMap=source.sheenRoughnessMap;this.transmission=source.transmission;this.transmissionMap=source.transmissionMap;this.thickness=source.thickness;this.thicknessMap=source.thicknessMap;this.attenuationDistance=source.attenuationDistance;this.attenuationColor.copy(source.attenuationColor);this.specularIntensity=source.specularIntensity;this.specularIntensityMap=source.specularIntensityMap;this.specularColor.copy(source.specularColor);this.specularColorMap=source.specularColorMap;return this}}class MeshPhongMaterial extends Material{constructor(parameters){super();this.isMeshPhongMaterial=true;this.type="MeshPhongMaterial";this.color=new Color(16777215);this.specular=new Color(1118481);this.shininess=30;this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.specular.copy(source.specular);this.shininess=source.shininess;this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshToonMaterial extends Material{constructor(parameters){super();this.isMeshToonMaterial=true;this.defines={"TOON":""};this.type="MeshToonMaterial";this.color=new Color(16777215);this.map=null;this.gradientMap=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.gradientMap=source.gradientMap;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.alphaMap=source.alphaMap;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.fog=source.fog;return this}}class MeshNormalMaterial extends Material{constructor(parameters){super();this.isMeshNormalMaterial=true;this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=false;this.wireframeLinewidth=1;this.flatShading=false;this.setValues(parameters)}copy(source){super.copy(source);this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.flatShading=source.flatShading;return this}}class MeshLambertMaterial extends Material{constructor(parameters){super();this.isMeshLambertMaterial=true;this.type="MeshLambertMaterial";this.color=new Color(16777215);this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshDepthMaterial extends Material{constructor(parameters){super();this.isMeshDepthMaterial=true;this.type="MeshDepthMaterial";this.depthPacking=BasicDepthPacking;this.map=null;this.alphaMap=null;this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=false;this.wireframeLinewidth=1;this.setValues(parameters)}copy(source){super.copy(source);this.depthPacking=source.depthPacking;this.map=source.map;this.alphaMap=source.alphaMap;this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;return this}}class MeshDistanceMaterial extends Material{constructor(parameters){super();this.isMeshDistanceMaterial=true;this.type="MeshDistanceMaterial";this.map=null;this.alphaMap=null;this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.setValues(parameters)}copy(source){super.copy(source);this.map=source.map;this.alphaMap=source.alphaMap;this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;return this}}class MeshMatcapMaterial extends Material{constructor(parameters){super();this.isMeshMatcapMaterial=true;this.defines={"MATCAP":""};this.type="MeshMatcapMaterial";this.color=new Color(16777215);this.matcap=null;this.map=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=false;this.wireframeLinewidth=1;this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.defines={"MATCAP":""};this.color.copy(source.color);this.matcap=source.matcap;this.map=source.map;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.alphaMap=source.alphaMap;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class LineDashedMaterial extends LineBasicMaterial{constructor(parameters){super();this.isLineDashedMaterial=true;this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(parameters)}copy(source){super.copy(source);this.scale=source.scale;this.dashSize=source.dashSize;this.gapSize=source.gapSize;return this}}function convertArray(array,type){if(!array||array.constructor===type)return array;if(typeof type.BYTES_PER_ELEMENT==="number"){return new type(array)}return Array.prototype.slice.call(array)}function getKeyframeOrder(times){function compareTime(i,j){return times[i]-times[j]}const n=times.length;const result=new Array(n);for(let i=0;i!==n;++i)result[i]=i;result.sort(compareTime);return result}function sortedArray(values,stride,order){const nValues=values.length;const result=new values.constructor(nValues);for(let i=0,dstOffset=0;dstOffset!==nValues;++i){const srcOffset=order[i]*stride;for(let j=0;j!==stride;++j){result[dstOffset++]=values[srcOffset+j]}}return result}function flattenJSON(jsonKeys,times,values,valuePropertyName){let i=1,key=jsonKeys[0];while(key!==undefined&&key[valuePropertyName]===undefined){key=jsonKeys[i++]}if(key===undefined)return;let value=key[valuePropertyName];if(value===undefined)return;if(Array.isArray(value)){do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);values.push(...value)}key=jsonKeys[i++]}while(key!==undefined)}else if(value.toArray!==undefined){do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);value.toArray(values,values.length)}key=jsonKeys[i++]}while(key!==undefined)}else{do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);values.push(value)}key=jsonKeys[i++]}while(key!==undefined)}}function subclip(sourceClip,name,startFrame,endFrame,fps=30){const clip=sourceClip.clone();clip.name=name;const tracks=[];for(let i=0;i<clip.tracks.length;++i){const track=clip.tracks[i];const valueSize=track.getValueSize();const times=[];const values=[];for(let j=0;j<track.times.length;++j){const frame=track.times[j]*fps;if(frame<startFrame||frame>=endFrame)continue;times.push(track.times[j]);for(let k=0;k<valueSize;++k){values.push(track.values[j*valueSize+k])}}if(times.length===0)continue;track.times=convertArray(times,track.times.constructor);track.values=convertArray(values,track.values.constructor);tracks.push(track)}clip.tracks=tracks;let minStartTime=Infinity;for(let i=0;i<clip.tracks.length;++i){if(minStartTime>clip.tracks[i].times[0]){minStartTime=clip.tracks[i].times[0]}}for(let i=0;i<clip.tracks.length;++i){clip.tracks[i].shift(-1*minStartTime)}clip.resetDuration();return clip}function makeClipAdditive(targetClip,referenceFrame=0,referenceClip=targetClip,fps=30){if(fps<=0)fps=30;const numTracks=referenceClip.tracks.length;const referenceTime=referenceFrame/fps;for(let i=0;i<numTracks;++i){const referenceTrack=referenceClip.tracks[i];const referenceTrackType=referenceTrack.ValueTypeName;if(referenceTrackType==="bool"||referenceTrackType==="string")continue;const targetTrack=targetClip.tracks.find(function(track){return track.name===referenceTrack.name&&track.ValueTypeName===referenceTrackType});if(targetTrack===undefined)continue;let referenceOffset=0;const referenceValueSize=referenceTrack.getValueSize();if(referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline){referenceOffset=referenceValueSize/3}let targetOffset=0;const targetValueSize=targetTrack.getValueSize();if(targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline){targetOffset=targetValueSize/3}const lastIndex=referenceTrack.times.length-1;let referenceValue;if(referenceTime<=referenceTrack.times[0]){const startIndex=referenceOffset;const endIndex=referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else if(referenceTime>=referenceTrack.times[lastIndex]){const startIndex=lastIndex*referenceValueSize+referenceOffset;const endIndex=startIndex+referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else{const interpolant=referenceTrack.createInterpolant();const startIndex=referenceOffset;const endIndex=referenceValueSize-referenceOffset;interpolant.evaluate(referenceTime);referenceValue=interpolant.resultBuffer.slice(startIndex,endIndex)}if(referenceTrackType==="quaternion"){const referenceQuat=new Quaternion().fromArray(referenceValue).normalize().conjugate();referenceQuat.toArray(referenceValue)}const numTimes=targetTrack.times.length;for(let j=0;j<numTimes;++j){const valueStart=j*targetValueSize+targetOffset;if(referenceTrackType==="quaternion"){Quaternion.multiplyQuaternionsFlat(targetTrack.values,valueStart,referenceValue,0,targetTrack.values,valueStart)}else{const valueEnd=targetValueSize-targetOffset*2;for(let k=0;k<valueEnd;++k){targetTrack.values[valueStart+k]-=referenceValue[k]}}}}targetClip.blendMode=AdditiveAnimationBlendMode;return targetClip}class AnimationUtils{static convertArray(array,type){return convertArray(array,type)}static isTypedArray(object){return isTypedArray(object)}static getKeyframeOrder(times){return getKeyframeOrder(times)}static sortedArray(values,stride,order){return sortedArray(values,stride,order)}static flattenJSON(jsonKeys,times,values,valuePropertyName){flattenJSON(jsonKeys,times,values,valuePropertyName)}static subclip(sourceClip,name,startFrame,endFrame,fps=30){return subclip(sourceClip,name,startFrame,endFrame,fps)}static makeClipAdditive(targetClip,referenceFrame=0,referenceClip=targetClip,fps=30){return makeClipAdditive(targetClip,referenceFrame,referenceClip,fps)}}class Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){this.parameterPositions=parameterPositions;this._cachedIndex=0;this.resultBuffer=resultBuffer!==undefined?resultBuffer:new sampleValues.constructor(sampleSize);this.sampleValues=sampleValues;this.valueSize=sampleSize;this.settings=null;this.DefaultSettings_={}}evaluate(t){const pp=this.parameterPositions;let i1=this._cachedIndex,t1=pp[i1],t0=pp[i1-1];validate_interval:{seek:{let right;linear_scan:{forward_scan:if(!(t<t1)){for(let giveUpAt=i1+2;;){if(t1===undefined){if(t<t0)break forward_scan;i1=pp.length;this._cachedIndex=i1;return this.copySampleValue_(i1-1)}if(i1===giveUpAt)break;t0=t1;t1=pp[++i1];if(t<t1){break seek}}right=pp.length;break linear_scan}if(!(t>=t0)){const t1global=pp[1];if(t<t1global){i1=2;t0=t1global}for(let giveUpAt=i1-2;;){if(t0===undefined){this._cachedIndex=0;return this.copySampleValue_(0)}if(i1===giveUpAt)break;t1=t0;t0=pp[--i1-1];if(t>=t0){break seek}}right=i1;i1=0;break linear_scan}break validate_interval}while(i1<right){const mid=i1+right>>>1;if(t<pp[mid]){right=mid}else{i1=mid+1}}t1=pp[i1];t0=pp[i1-1];if(t0===undefined){this._cachedIndex=0;return this.copySampleValue_(0)}if(t1===undefined){i1=pp.length;this._cachedIndex=i1;return this.copySampleValue_(i1-1)}}this._cachedIndex=i1;this.intervalChanged_(i1,t0,t1)}return this.interpolate_(i1,t0,t,t1)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(index){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,offset=index*stride;for(let i=0;i!==stride;++i){result[i]=values[offset+i]}return result}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class CubicInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer);this._weightPrev=-0;this._offsetPrev=-0;this._weightNext=-0;this._offsetNext=-0;this.DefaultSettings_={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding}}intervalChanged_(i1,t0,t1){const pp=this.parameterPositions;let iPrev=i1-2,iNext=i1+1,tPrev=pp[iPrev],tNext=pp[iNext];if(tPrev===undefined){switch(this.getSettings_().endingStart){case ZeroSlopeEnding:iPrev=i1;tPrev=2*t0-t1;break;case WrapAroundEnding:iPrev=pp.length-2;tPrev=t0+pp[iPrev]-pp[iPrev+1];break;default:iPrev=i1;tPrev=t1;}}if(tNext===undefined){switch(this.getSettings_().endingEnd){case ZeroSlopeEnding:iNext=i1;tNext=2*t1-t0;break;case WrapAroundEnding:iNext=1;tNext=t1+pp[1]-pp[0];break;default:iNext=i1-1;tNext=t0;}}const halfDt=(t1-t0)*0.5,stride=this.valueSize;this._weightPrev=halfDt/(t0-tPrev);this._weightNext=halfDt/(tNext-t1);this._offsetPrev=iPrev*stride;this._offsetNext=iNext*stride}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,o1=i1*stride,o0=o1-stride,oP=this._offsetPrev,oN=this._offsetNext,wP=this._weightPrev,wN=this._weightNext,p=(t-t0)/(t1-t0),pp=p*p,ppp=pp*p;const sP=-wP*ppp+2*wP*pp-wP*p;const s0=(1+wP)*ppp+(-1.5-2*wP)*pp+(-0.5+wP)*p+1;const s1=(-1-wN)*ppp+(1.5+wN)*pp+0.5*p;const sN=wN*ppp-wN*pp;for(let i=0;i!==stride;++i){result[i]=sP*values[oP+i]+s0*values[o0+i]+s1*values[o1+i]+sN*values[oN+i]}return result}}class LinearInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,offset1=i1*stride,offset0=offset1-stride,weight1=(t-t0)/(t1-t0),weight0=1-weight1;for(let i=0;i!==stride;++i){result[i]=values[offset0+i]*weight0+values[offset1+i]*weight1}return result}}class DiscreteInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1){return this.copySampleValue_(i1-1)}}class KeyframeTrack{constructor(name,times,values,interpolation){if(name===undefined)throw new Error("THREE.KeyframeTrack: track name is undefined");if(times===undefined||times.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+name);this.name=name;this.times=convertArray(times,this.TimeBufferType);this.values=convertArray(values,this.ValueBufferType);this.setInterpolation(interpolation||this.DefaultInterpolation)}static toJSON(track){const trackType=track.constructor;let json;if(trackType.toJSON!==this.toJSON){json=trackType.toJSON(track)}else{json={"name":track.name,"times":convertArray(track.times,Array),"values":convertArray(track.values,Array)};const interpolation=track.getInterpolation();if(interpolation!==track.DefaultInterpolation){json.interpolation=interpolation}}json.type=track.ValueTypeName;return json}InterpolantFactoryMethodDiscrete(result){return new DiscreteInterpolant(this.times,this.values,this.getValueSize(),result)}InterpolantFactoryMethodLinear(result){return new LinearInterpolant(this.times,this.values,this.getValueSize(),result)}InterpolantFactoryMethodSmooth(result){return new CubicInterpolant(this.times,this.values,this.getValueSize(),result)}setInterpolation(interpolation){let factoryMethod;switch(interpolation){case InterpolateDiscrete:factoryMethod=this.InterpolantFactoryMethodDiscrete;break;case InterpolateLinear:factoryMethod=this.InterpolantFactoryMethodLinear;break;case InterpolateSmooth:factoryMethod=this.InterpolantFactoryMethodSmooth;break;}if(factoryMethod===undefined){const message="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===undefined){if(interpolation!==this.DefaultInterpolation){this.setInterpolation(this.DefaultInterpolation)}else{throw new Error(message)}}warn("KeyframeTrack:",message);return this}this.createInterpolant=factoryMethod;return this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return InterpolateSmooth;}}getValueSize(){return this.values.length/this.times.length}shift(timeOffset){if(timeOffset!==0){const times=this.times;for(let i=0,n=times.length;i!==n;++i){times[i]+=timeOffset}}return this}scale(timeScale){if(timeScale!==1){const times=this.times;for(let i=0,n=times.length;i!==n;++i){times[i]*=timeScale}}return this}trim(startTime,endTime){const times=this.times,nKeys=times.length;let from=0,to=nKeys-1;while(from!==nKeys&&times[from]<startTime){++from}while(to!==-1&&times[to]>endTime){--to}++to;if(from!==0||to!==nKeys){if(from>=to){to=Math.max(to,1);from=to-1}const stride=this.getValueSize();this.times=times.slice(from,to);this.values=this.values.slice(from*stride,to*stride)}return this}validate(){let valid=true;const valueSize=this.getValueSize();if(valueSize-Math.floor(valueSize)!==0){error("KeyframeTrack: Invalid value size in track.",this);valid=false}const times=this.times,values=this.values,nKeys=times.length;if(nKeys===0){error("KeyframeTrack: Track is empty.",this);valid=false}let prevTime=null;for(let i=0;i!==nKeys;i++){const currTime=times[i];if(typeof currTime==="number"&&isNaN(currTime)){error("KeyframeTrack: Time is not a valid number.",this,i,currTime);valid=false;break}if(prevTime!==null&&prevTime>currTime){error("KeyframeTrack: Out of order keys.",this,i,currTime,prevTime);valid=false;break}prevTime=currTime}if(values!==undefined){if(isTypedArray(values)){for(let i=0,n=values.length;i!==n;++i){const value=values[i];if(isNaN(value)){error("KeyframeTrack: Value is not a valid number.",this,i,value);valid=false;break}}}}return valid}optimize(){const times=this.times.slice(),values=this.values.slice(),stride=this.getValueSize(),smoothInterpolation=this.getInterpolation()===InterpolateSmooth,lastIndex=times.length-1;let writeIndex=1;for(let i=1;i<lastIndex;++i){let keep=false;const time=times[i];const timeNext=times[i+1];if(time!==timeNext&&(i!==1||time!==times[0])){if(!smoothInterpolation){const offset=i*stride,offsetP=offset-stride,offsetN=offset+stride;for(let j=0;j!==stride;++j){const value=values[offset+j];if(value!==values[offsetP+j]||value!==values[offsetN+j]){keep=true;break}}}else{keep=true}}if(keep){if(i!==writeIndex){times[writeIndex]=times[i];const readOffset=i*stride,writeOffset=writeIndex*stride;for(let j=0;j!==stride;++j){values[writeOffset+j]=values[readOffset+j]}}++writeIndex}}if(lastIndex>0){times[writeIndex]=times[lastIndex];for(let readOffset=lastIndex*stride,writeOffset=writeIndex*stride,j=0;j!==stride;++j){values[writeOffset+j]=values[readOffset+j]}++writeIndex}if(writeIndex!==times.length){this.times=times.slice(0,writeIndex);this.values=values.slice(0,writeIndex*stride)}else{this.times=times;this.values=values}return this}clone(){const times=this.times.slice();const values=this.values.slice();const TypedKeyframeTrack=this.constructor;const track=new TypedKeyframeTrack(this.name,times,values);track.createInterpolant=this.createInterpolant;return track}}KeyframeTrack.prototype.ValueTypeName="";KeyframeTrack.prototype.TimeBufferType=Float32Array;KeyframeTrack.prototype.ValueBufferType=Float32Array;KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;class BooleanKeyframeTrack extends KeyframeTrack{constructor(name,times,values){super(name,times,values)}}BooleanKeyframeTrack.prototype.ValueTypeName="bool";BooleanKeyframeTrack.prototype.ValueBufferType=Array;BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=undefined;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class ColorKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,alpha=(t-t0)/(t1-t0);let offset=i1*stride;for(let end=offset+stride;offset!==end;offset+=4){Quaternion.slerpFlat(result,0,values,offset-stride,values,offset,alpha)}return result}}class QuaternionKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}InterpolantFactoryMethodLinear(result){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),result)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion";QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class StringKeyframeTrack extends KeyframeTrack{constructor(name,times,values){super(name,times,values)}}StringKeyframeTrack.prototype.ValueTypeName="string";StringKeyframeTrack.prototype.ValueBufferType=Array;StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=undefined;StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class VectorKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(name="",duration=-1,tracks=[],blendMode=NormalAnimationBlendMode){this.name=name;this.tracks=tracks;this.duration=duration;this.blendMode=blendMode;this.uuid=generateUUID();this.userData={};if(this.duration<0){this.resetDuration()}}static parse(json){const tracks=[],jsonTracks=json.tracks,frameTime=1/(json.fps||1);for(let i=0,n=jsonTracks.length;i!==n;++i){tracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime))}const clip=new this(json.name,json.duration,tracks,json.blendMode);clip.uuid=json.uuid;clip.userData=JSON.parse(json.userData||"{}");return clip}static toJSON(clip){const tracks=[],clipTracks=clip.tracks;const json={"name":clip.name,"duration":clip.duration,"tracks":tracks,"uuid":clip.uuid,"blendMode":clip.blendMode,"userData":JSON.stringify(clip.userData)};for(let i=0,n=clipTracks.length;i!==n;++i){tracks.push(KeyframeTrack.toJSON(clipTracks[i]))}return json}static CreateFromMorphTargetSequence(name,morphTargetSequence,fps,noLoop){const numMorphTargets=morphTargetSequence.length;const tracks=[];for(let i=0;i<numMorphTargets;i++){let times=[];let values=[];times.push((i+numMorphTargets-1)%numMorphTargets,i,(i+1)%numMorphTargets);values.push(0,1,0);const order=getKeyframeOrder(times);times=sortedArray(times,1,order);values=sortedArray(values,1,order);if(!noLoop&&times[0]===0){times.push(numMorphTargets);values.push(values[0])}tracks.push(new NumberKeyframeTrack(".morphTargetInfluences["+morphTargetSequence[i].name+"]",times,values).scale(1/fps))}return new this(name,-1,tracks)}static findByName(objectOrClipArray,name){let clipArray=objectOrClipArray;if(!Array.isArray(objectOrClipArray)){const o=objectOrClipArray;clipArray=o.geometry&&o.geometry.animations||o.animations}for(let i=0;i<clipArray.length;i++){if(clipArray[i].name===name){return clipArray[i]}}return null}static CreateClipsFromMorphTargetSequences(morphTargets,fps,noLoop){const animationToMorphTargets={};const pattern=/^([\w-]*?)([\d]+)$/;for(let i=0,il=morphTargets.length;i<il;i++){const morphTarget=morphTargets[i];const parts=morphTarget.name.match(pattern);if(parts&&parts.length>1){const name=parts[1];let animationMorphTargets=animationToMorphTargets[name];if(!animationMorphTargets){animationToMorphTargets[name]=animationMorphTargets=[]}animationMorphTargets.push(morphTarget)}}const clips=[];for(const name in animationToMorphTargets){clips.push(this.CreateFromMorphTargetSequence(name,animationToMorphTargets[name],fps,noLoop))}return clips}static parseAnimation(animation,bones){warn("AnimationClip: parseAnimation() is deprecated and will be removed with r185");if(!animation){error("AnimationClip: No animation in JSONLoader data.");return null}const addNonemptyTrack=function(trackType,trackName,animationKeys,propertyName,destTracks){if(animationKeys.length!==0){const times=[];const values=[];flattenJSON(animationKeys,times,values,propertyName);if(times.length!==0){destTracks.push(new trackType(trackName,times,values))}}};const tracks=[];const clipName=animation.name||"default";const fps=animation.fps||30;const blendMode=animation.blendMode;let duration=animation.length||-1;const hierarchyTracks=animation.hierarchy||[];for(let h=0;h<hierarchyTracks.length;h++){const animationKeys=hierarchyTracks[h].keys;if(!animationKeys||animationKeys.length===0)continue;if(animationKeys[0].morphTargets){const morphTargetNames={};let k;for(k=0;k<animationKeys.length;k++){if(animationKeys[k].morphTargets){for(let m=0;m<animationKeys[k].morphTargets.length;m++){morphTargetNames[animationKeys[k].morphTargets[m]]=-1}}}for(const morphTargetName in morphTargetNames){const times=[];const values=[];for(let m=0;m!==animationKeys[k].morphTargets.length;++m){const animationKey=animationKeys[k];times.push(animationKey.time);values.push(animationKey.morphTarget===morphTargetName?1:0)}tracks.push(new NumberKeyframeTrack(".morphTargetInfluence["+morphTargetName+"]",times,values))}duration=morphTargetNames.length*fps}else{const boneName=".bones["+bones[h].name+"]";addNonemptyTrack(VectorKeyframeTrack,boneName+".position",animationKeys,"pos",tracks);addNonemptyTrack(QuaternionKeyframeTrack,boneName+".quaternion",animationKeys,"rot",tracks);addNonemptyTrack(VectorKeyframeTrack,boneName+".scale",animationKeys,"scl",tracks)}}if(tracks.length===0){return null}const clip=new this(clipName,duration,tracks,blendMode);return clip}resetDuration(){const tracks=this.tracks;let duration=0;for(let i=0,n=tracks.length;i!==n;++i){const track=this.tracks[i];duration=Math.max(duration,track.times[track.times.length-1])}this.duration=duration;return this}trim(){for(let i=0;i<this.tracks.length;i++){this.tracks[i].trim(0,this.duration)}return this}validate(){let valid=true;for(let i=0;i<this.tracks.length;i++){valid=valid&&this.tracks[i].validate()}return valid}optimize(){for(let i=0;i<this.tracks.length;i++){this.tracks[i].optimize()}return this}clone(){const tracks=[];for(let i=0;i<this.tracks.length;i++){tracks.push(this.tracks[i].clone())}const clip=new this.constructor(this.name,this.duration,tracks,this.blendMode);clip.userData=JSON.parse(JSON.stringify(this.userData));return clip}toJSON(){return this.constructor.toJSON(this)}}function getTrackTypeForValueTypeName(typeName){switch(typeName.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return VectorKeyframeTrack;case"color":return ColorKeyframeTrack;case"quaternion":return QuaternionKeyframeTrack;case"bool":case"boolean":return BooleanKeyframeTrack;case"string":return StringKeyframeTrack;}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+typeName)}function parseKeyframeTrack(json){if(json.type===undefined){throw new Error("THREE.KeyframeTrack: track type undefined, can not parse")}const trackType=getTrackTypeForValueTypeName(json.type);if(json.times===undefined){const times=[],values=[];flattenJSON(json.keys,times,values,"value");json.times=times;json.values=values}if(trackType.parse!==undefined){return trackType.parse(json)}else{return new trackType(json.name,json.times,json.values,json.interpolation)}}const Cache={enabled:false,files:{},add:function(key,file){if(this.enabled===false)return;this.files[key]=file},get:function(key){if(this.enabled===false)return;return this.files[key]},remove:function(key){delete this.files[key]},clear:function(){this.files={}}};class LoadingManager{constructor(onLoad,onProgress,onError){const scope=this;let isLoading=false;let itemsLoaded=0;let itemsTotal=0;let urlModifier=undefined;const handlers=[];this.onStart=undefined;this.onLoad=onLoad;this.onProgress=onProgress;this.onError=onError;this._abortController=null;this.itemStart=function(url){itemsTotal++;if(isLoading===false){if(scope.onStart!==undefined){scope.onStart(url,itemsLoaded,itemsTotal)}}isLoading=true};this.itemEnd=function(url){itemsLoaded++;if(scope.onProgress!==undefined){scope.onProgress(url,itemsLoaded,itemsTotal)}if(itemsLoaded===itemsTotal){isLoading=false;if(scope.onLoad!==undefined){scope.onLoad()}}};this.itemError=function(url){if(scope.onError!==undefined){scope.onError(url)}};this.resolveURL=function(url){if(urlModifier){return urlModifier(url)}return url};this.setURLModifier=function(transform){urlModifier=transform;return this};this.addHandler=function(regex,loader){handlers.push(regex,loader);return this};this.removeHandler=function(regex){const index=handlers.indexOf(regex);if(index!==-1){handlers.splice(index,2)}return this};this.getHandler=function(file){for(let i=0,l=handlers.length;i<l;i+=2){const regex=handlers[i];const loader=handlers[i+1];if(regex.global)regex.lastIndex=0;if(regex.test(file)){return loader}}return null};this.abort=function(){this.abortController.abort();this._abortController=null;return this}}get abortController(){if(!this._abortController){this._abortController=new AbortController}return this._abortController}}const DefaultLoadingManager=new LoadingManager;class Loader{constructor(manager){this.manager=manager!==undefined?manager:DefaultLoadingManager;this.crossOrigin="anonymous";this.withCredentials=false;this.path="";this.resourcePath="";this.requestHeader={}}load(){}loadAsync(url,onProgress){const scope=this;return new Promise(function(resolve,reject){scope.load(url,resolve,onProgress,reject)})}parse(){}setCrossOrigin(crossOrigin){this.crossOrigin=crossOrigin;return this}setWithCredentials(value){this.withCredentials=value;return this}setPath(path){this.path=path;return this}setResourcePath(resourcePath){this.resourcePath=resourcePath;return this}setRequestHeader(requestHeader){this.requestHeader=requestHeader;return this}abort(){return this}}Loader.DEFAULT_MATERIAL_NAME="__DEFAULT";const loading={};class HttpError extends Error{constructor(message,response){super(message);this.response=response}}class FileLoader extends Loader{constructor(manager){super(manager);this.mimeType="";this.responseType="";this._abortController=new AbortController}load(url,onLoad,onProgress,onError){if(url===undefined)url="";if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const cached=Cache.get(`file:${url}`);if(cached!==undefined){this.manager.itemStart(url);setTimeout(()=>{if(onLoad)onLoad(cached);this.manager.itemEnd(url)},0);return cached}if(loading[url]!==undefined){loading[url].push({onLoad:onLoad,onProgress:onProgress,onError:onError});return}loading[url]=[];loading[url].push({onLoad:onLoad,onProgress:onProgress,onError:onError});const req=new Request(url,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any==="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal});const mimeType=this.mimeType;const responseType=this.responseType;fetch(req).then(response=>{if(response.status===200||response.status===0){if(response.status===0){warn("FileLoader: HTTP Status 0 received.")}if(typeof ReadableStream==="undefined"||response.body===undefined||response.body.getReader===undefined){return response}const callbacks=loading[url];const reader=response.body.getReader();const contentLength=response.headers.get("X-File-Size")||response.headers.get("Content-Length");const total=contentLength?parseInt(contentLength):0;const lengthComputable=total!==0;let loaded=0;const stream=new ReadableStream({start(controller){readData();function readData(){reader.read().then(({done,value})=>{if(done){controller.close()}else{loaded+=value.byteLength;const event=new ProgressEvent("progress",{lengthComputable,loaded,total});for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onProgress)callback.onProgress(event)}controller.enqueue(value);readData()}},e=>{controller.error(e)})}}});return new Response(stream)}else{throw new HttpError(`fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`,response)}}).then(response=>{switch(responseType){case"arraybuffer":return response.arrayBuffer();case"blob":return response.blob();case"document":return response.text().then(text=>{const parser=new DOMParser;return parser.parseFromString(text,mimeType)});case"json":return response.json();default:if(mimeType===""){return response.text()}else{const re=/charset="?([^;"\s]*)"?/i;const exec=re.exec(mimeType);const label=exec&&exec[1]?exec[1].toLowerCase():undefined;const decoder=new TextDecoder(label);return response.arrayBuffer().then(ab=>decoder.decode(ab))}}}).then(data=>{Cache.add(`file:${url}`,data);const callbacks=loading[url];delete loading[url];for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onLoad)callback.onLoad(data)}}).catch(err=>{const callbacks=loading[url];if(callbacks===undefined){this.manager.itemError(url);throw err}delete loading[url];for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onError)callback.onError(err)}this.manager.itemError(url)}).finally(()=>{this.manager.itemEnd(url)});this.manager.itemStart(url)}setResponseType(value){this.responseType=value;return this}setMimeType(value){this.mimeType=value;return this}abort(){this._abortController.abort();this._abortController=new AbortController;return this}}class AnimationLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const animations=[];for(let i=0;i<json.length;i++){const clip=AnimationClip.parse(json[i]);animations.push(clip)}return animations}}class CompressedTextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const images=[];const texture=new CompressedTexture;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(scope.withCredentials);let loaded=0;function loadTexture(i){loader.load(url[i],function(buffer){const texDatas=scope.parse(buffer,true);images[i]={width:texDatas.width,height:texDatas.height,format:texDatas.format,mipmaps:texDatas.mipmaps};loaded+=1;if(loaded===6){if(texDatas.mipmapCount===1)texture.minFilter=LinearFilter;texture.image=images;texture.format=texDatas.format;texture.needsUpdate=true;if(onLoad)onLoad(texture)}},onProgress,onError)}if(Array.isArray(url)){for(let i=0,il=url.length;i<il;++i){loadTexture(i)}}else{loader.load(url,function(buffer){const texDatas=scope.parse(buffer,true);if(texDatas.isCubemap){const faces=texDatas.mipmaps.length/texDatas.mipmapCount;for(let f=0;f<faces;f++){images[f]={mipmaps:[]};for(let i=0;i<texDatas.mipmapCount;i++){images[f].mipmaps.push(texDatas.mipmaps[f*texDatas.mipmapCount+i]);images[f].format=texDatas.format;images[f].width=texDatas.width;images[f].height=texDatas.height}}texture.image=images}else{texture.image.width=texDatas.width;texture.image.height=texDatas.height;texture.mipmaps=texDatas.mipmaps}if(texDatas.mipmapCount===1){texture.minFilter=LinearFilter}texture.format=texDatas.format;texture.needsUpdate=true;if(onLoad)onLoad(texture)},onProgress,onError)}return texture}}const _loading=new WeakMap;class ImageLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const scope=this;const cached=Cache.get(`image:${url}`);if(cached!==undefined){if(cached.complete===true){scope.manager.itemStart(url);setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0)}else{let arr=_loading.get(cached);if(arr===undefined){arr=[];_loading.set(cached,arr)}arr.push({onLoad,onError})}return cached}const image=createElementNS("img");function onImageLoad(){removeEventListeners();if(onLoad)onLoad(this);const callbacks=_loading.get(this)||[];for(let i=0;i<callbacks.length;i++){const callback=callbacks[i];if(callback.onLoad)callback.onLoad(this)}_loading.delete(this);scope.manager.itemEnd(url)}function onImageError(event){removeEventListeners();if(onError)onError(event);Cache.remove(`image:${url}`);const callbacks=_loading.get(this)||[];for(let i=0;i<callbacks.length;i++){const callback=callbacks[i];if(callback.onError)callback.onError(event)}_loading.delete(this);scope.manager.itemError(url);scope.manager.itemEnd(url)}function removeEventListeners(){image.removeEventListener("load",onImageLoad,false);image.removeEventListener("error",onImageError,false)}image.addEventListener("load",onImageLoad,false);image.addEventListener("error",onImageError,false);if(url.slice(0,5)!=="data:"){if(this.crossOrigin!==undefined)image.crossOrigin=this.crossOrigin}Cache.add(`image:${url}`,image);scope.manager.itemStart(url);image.src=url;return image}}class CubeTextureLoader extends Loader{constructor(manager){super(manager)}load(urls,onLoad,onProgress,onError){const texture=new CubeTexture;texture.colorSpace=SRGBColorSpace;const loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);loader.setPath(this.path);let loaded=0;function loadTexture(i){loader.load(urls[i],function(image){texture.images[i]=image;loaded++;if(loaded===6){texture.needsUpdate=true;if(onLoad)onLoad(texture)}},undefined,onError)}for(let i=0;i<urls.length;++i){loadTexture(i)}return texture}}class DataTextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const texture=new DataTexture;const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setPath(this.path);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(buffer){let texData;try{texData=scope.parse(buffer)}catch(error){if(onError!==undefined){onError(error)}else{error(error);return}}if(texData.image!==undefined){texture.image=texData.image}else if(texData.data!==undefined){texture.image.width=texData.width;texture.image.height=texData.height;texture.image.data=texData.data}texture.wrapS=texData.wrapS!==undefined?texData.wrapS:ClampToEdgeWrapping;texture.wrapT=texData.wrapT!==undefined?texData.wrapT:ClampToEdgeWrapping;texture.magFilter=texData.magFilter!==undefined?texData.magFilter:LinearFilter;texture.minFilter=texData.minFilter!==undefined?texData.minFilter:LinearFilter;texture.anisotropy=texData.anisotropy!==undefined?texData.anisotropy:1;if(texData.colorSpace!==undefined){texture.colorSpace=texData.colorSpace}if(texData.flipY!==undefined){texture.flipY=texData.flipY}if(texData.format!==undefined){texture.format=texData.format}if(texData.type!==undefined){texture.type=texData.type}if(texData.mipmaps!==undefined){texture.mipmaps=texData.mipmaps;texture.minFilter=LinearMipmapLinearFilter}if(texData.mipmapCount===1){texture.minFilter=LinearFilter}if(texData.generateMipmaps!==undefined){texture.generateMipmaps=texData.generateMipmaps}texture.needsUpdate=true;if(onLoad)onLoad(texture,texData)},onProgress,onError);return texture}}class TextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const texture=new Texture;const loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);loader.setPath(this.path);loader.load(url,function(image){texture.image=image;texture.needsUpdate=true;if(onLoad!==undefined){onLoad(texture)}},onProgress,onError);return texture}}class Light extends Object3D{constructor(color,intensity=1){super();this.isLight=true;this.type="Light";this.color=new Color(color);this.intensity=intensity}dispose(){this.dispatchEvent({type:"dispose"})}copy(source,recursive){super.copy(source,recursive);this.color.copy(source.color);this.intensity=source.intensity;return this}toJSON(meta){const data=super.toJSON(meta);data.object.color=this.color.getHex();data.object.intensity=this.intensity;return data}}class HemisphereLight extends Light{constructor(skyColor,groundColor,intensity){super(skyColor,intensity);this.isHemisphereLight=true;this.type="HemisphereLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.groundColor=new Color(groundColor)}copy(source,recursive){super.copy(source,recursive);this.groundColor.copy(source.groundColor);return this}toJSON(meta){const data=super.toJSON(meta);data.object.groundColor=this.groundColor.getHex();return data}}const _projScreenMatrix$1=new Matrix4;const _lightPositionWorld$1=new Vector3;const _lookTarget$1=new Vector3;class LightShadow{constructor(camera){this.camera=camera;this.intensity=1;this.bias=0;this.normalBias=0;this.radius=1;this.blurSamples=8;this.mapSize=new Vector2(512,512);this.mapType=UnsignedByteType;this.map=null;this.mapPass=null;this.matrix=new Matrix4;this.autoUpdate=true;this.needsUpdate=false;this._frustum=new Frustum;this._frameExtents=new Vector2(1,1);this._viewportCount=1;this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(light){const shadowCamera=this.camera;const shadowMatrix=this.matrix;_lightPositionWorld$1.setFromMatrixPosition(light.matrixWorld);shadowCamera.position.copy(_lightPositionWorld$1);_lookTarget$1.setFromMatrixPosition(light.target.matrixWorld);shadowCamera.lookAt(_lookTarget$1);shadowCamera.updateMatrixWorld();_projScreenMatrix$1.multiplyMatrices(shadowCamera.projectionMatrix,shadowCamera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(_projScreenMatrix$1,shadowCamera.coordinateSystem,shadowCamera.reversedDepth);if(shadowCamera.reversedDepth){shadowMatrix.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,1,0,0,0,0,1)}else{shadowMatrix.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,0.5,0.5,0,0,0,1)}shadowMatrix.multiply(_projScreenMatrix$1)}getViewport(viewportIndex){return this._viewports[viewportIndex]}getFrameExtents(){return this._frameExtents}dispose(){if(this.map){this.map.dispose()}if(this.mapPass){this.mapPass.dispose()}}copy(source){this.camera=source.camera.clone();this.intensity=source.intensity;this.bias=source.bias;this.radius=source.radius;this.autoUpdate=source.autoUpdate;this.needsUpdate=source.needsUpdate;this.normalBias=source.normalBias;this.blurSamples=source.blurSamples;this.mapSize.copy(source.mapSize);return this}clone(){return new this.constructor().copy(this)}toJSON(){const object={};if(this.intensity!==1)object.intensity=this.intensity;if(this.bias!==0)object.bias=this.bias;if(this.normalBias!==0)object.normalBias=this.normalBias;if(this.radius!==1)object.radius=this.radius;if(this.mapSize.x!==512||this.mapSize.y!==512)object.mapSize=this.mapSize.toArray();object.camera=this.camera.toJSON(false).object;delete object.camera.matrix;return object}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,0.5,500));this.isSpotLightShadow=true;this.focus=1;this.aspect=1}updateMatrices(light){const camera=this.camera;const fov=RAD2DEG*2*light.angle*this.focus;const aspect=this.mapSize.width/this.mapSize.height*this.aspect;const far=light.distance||camera.far;if(fov!==camera.fov||aspect!==camera.aspect||far!==camera.far){camera.fov=fov;camera.aspect=aspect;camera.far=far;camera.updateProjectionMatrix()}super.updateMatrices(light)}copy(source){super.copy(source);this.focus=source.focus;return this}}class SpotLight extends Light{constructor(color,intensity,distance=0,angle=Math.PI/3,penumbra=0,decay=2){super(color,intensity);this.isSpotLight=true;this.type="SpotLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.target=new Object3D;this.distance=distance;this.angle=angle;this.penumbra=penumbra;this.decay=decay;this.map=null;this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(power){this.intensity=power/Math.PI}dispose(){super.dispose();this.shadow.dispose()}copy(source,recursive){super.copy(source,recursive);this.distance=source.distance;this.angle=source.angle;this.penumbra=source.penumbra;this.decay=source.decay;this.target=source.target.clone();this.map=source.map;this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.distance=this.distance;data.object.angle=this.angle;data.object.decay=this.decay;data.object.penumbra=this.penumbra;data.object.target=this.target.uuid;if(this.map&&this.map.isTexture)data.object.map=this.map.toJSON(meta).uuid;data.object.shadow=this.shadow.toJSON();return data}}class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,0.5,500));this.isPointLightShadow=true}}class PointLight extends Light{constructor(color,intensity,distance=0,decay=2){super(color,intensity);this.isPointLight=true;this.type="PointLight";this.distance=distance;this.decay=decay;this.shadow=new PointLightShadow}get power(){return this.intensity*4*Math.PI}set power(power){this.intensity=power/(4*Math.PI)}dispose(){super.dispose();this.shadow.dispose()}copy(source,recursive){super.copy(source,recursive);this.distance=source.distance;this.decay=source.decay;this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.distance=this.distance;data.object.decay=this.decay;data.object.shadow=this.shadow.toJSON();return data}}class OrthographicCamera extends Camera{constructor(left=-1,right=1,top=1,bottom=-1,near=0.1,far=2000){super();this.isOrthographicCamera=true;this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=left;this.right=right;this.top=top;this.bottom=bottom;this.near=near;this.far=far;this.updateProjectionMatrix()}copy(source,recursive){super.copy(source,recursive);this.left=source.left;this.right=source.right;this.top=source.top;this.bottom=source.bottom;this.near=source.near;this.far=source.far;this.zoom=source.zoom;this.view=source.view===null?null:Object.assign({},source.view);return this}setViewOffset(fullWidth,fullHeight,x,y,width,height){if(this.view===null){this.view={enabled:true,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}}this.view.enabled=true;this.view.fullWidth=fullWidth;this.view.fullHeight=fullHeight;this.view.offsetX=x;this.view.offsetY=y;this.view.width=width;this.view.height=height;this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null){this.view.enabled=false}this.updateProjectionMatrix()}updateProjectionMatrix(){const dx=(this.right-this.left)/(2*this.zoom);const dy=(this.top-this.bottom)/(2*this.zoom);const cx=(this.right+this.left)/2;const cy=(this.top+this.bottom)/2;let left=cx-dx;let right=cx+dx;let top=cy+dy;let bottom=cy-dy;if(this.view!==null&&this.view.enabled){const scaleW=(this.right-this.left)/this.view.fullWidth/this.zoom;const scaleH=(this.top-this.bottom)/this.view.fullHeight/this.zoom;left+=scaleW*this.view.offsetX;right=left+scaleW*this.view.width;top-=scaleH*this.view.offsetY;bottom=top-scaleH*this.view.height}this.projectionMatrix.makeOrthographic(left,right,top,bottom,this.near,this.far,this.coordinateSystem,this.reversedDepth);this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(meta){const data=super.toJSON(meta);data.object.zoom=this.zoom;data.object.left=this.left;data.object.right=this.right;data.object.top=this.top;data.object.bottom=this.bottom;data.object.near=this.near;data.object.far=this.far;if(this.view!==null)data.object.view=Object.assign({},this.view);return data}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,0.5,500));this.isDirectionalLightShadow=true}}class DirectionalLight extends Light{constructor(color,intensity){super(color,intensity);this.isDirectionalLight=true;this.type="DirectionalLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.target=new Object3D;this.shadow=new DirectionalLightShadow}dispose(){super.dispose();this.shadow.dispose()}copy(source){super.copy(source);this.target=source.target.clone();this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.shadow=this.shadow.toJSON();data.object.target=this.target.uuid;return data}}class AmbientLight extends Light{constructor(color,intensity){super(color,intensity);this.isAmbientLight=true;this.type="AmbientLight"}}class RectAreaLight extends Light{constructor(color,intensity,width=10,height=10){super(color,intensity);this.isRectAreaLight=true;this.type="RectAreaLight";this.width=width;this.height=height}get power(){return this.intensity*this.width*this.height*Math.PI}set power(power){this.intensity=power/(this.width*this.height*Math.PI)}copy(source){super.copy(source);this.width=source.width;this.height=source.height;return this}toJSON(meta){const data=super.toJSON(meta);data.object.width=this.width;data.object.height=this.height;return data}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=true;this.coefficients=[];for(let i=0;i<9;i++){this.coefficients.push(new Vector3)}}set(coefficients){for(let i=0;i<9;i++){this.coefficients[i].copy(coefficients[i])}return this}zero(){for(let i=0;i<9;i++){this.coefficients[i].set(0,0,0)}return this}getAt(normal,target){const x=normal.x,y=normal.y,z=normal.z;const coeff=this.coefficients;target.copy(coeff[0]).multiplyScalar(0.282095);target.addScaledVector(coeff[1],0.488603*y);target.addScaledVector(coeff[2],0.488603*z);target.addScaledVector(coeff[3],0.488603*x);target.addScaledVector(coeff[4],1.092548*(x*y));target.addScaledVector(coeff[5],1.092548*(y*z));target.addScaledVector(coeff[6],0.315392*(3*z*z-1));target.addScaledVector(coeff[7],1.092548*(x*z));target.addScaledVector(coeff[8],0.546274*(x*x-y*y));return target}getIrradianceAt(normal,target){const x=normal.x,y=normal.y,z=normal.z;const coeff=this.coefficients;target.copy(coeff[0]).multiplyScalar(0.886227);target.addScaledVector(coeff[1],2*0.511664*y);target.addScaledVector(coeff[2],2*0.511664*z);target.addScaledVector(coeff[3],2*0.511664*x);target.addScaledVector(coeff[4],2*0.429043*x*y);target.addScaledVector(coeff[5],2*0.429043*y*z);target.addScaledVector(coeff[6],0.743125*z*z-0.247708);target.addScaledVector(coeff[7],2*0.429043*x*z);target.addScaledVector(coeff[8],0.429043*(x*x-y*y));return target}add(sh){for(let i=0;i<9;i++){this.coefficients[i].add(sh.coefficients[i])}return this}addScaledSH(sh,s){for(let i=0;i<9;i++){this.coefficients[i].addScaledVector(sh.coefficients[i],s)}return this}scale(s){for(let i=0;i<9;i++){this.coefficients[i].multiplyScalar(s)}return this}lerp(sh,alpha){for(let i=0;i<9;i++){this.coefficients[i].lerp(sh.coefficients[i],alpha)}return this}equals(sh){for(let i=0;i<9;i++){if(!this.coefficients[i].equals(sh.coefficients[i])){return false}}return true}copy(sh){return this.set(sh.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(array,offset=0){const coefficients=this.coefficients;for(let i=0;i<9;i++){coefficients[i].fromArray(array,offset+i*3)}return this}toArray(array=[],offset=0){const coefficients=this.coefficients;for(let i=0;i<9;i++){coefficients[i].toArray(array,offset+i*3)}return array}static getBasisAt(normal,shBasis){const x=normal.x,y=normal.y,z=normal.z;shBasis[0]=0.282095;shBasis[1]=0.488603*y;shBasis[2]=0.488603*z;shBasis[3]=0.488603*x;shBasis[4]=1.092548*x*y;shBasis[5]=1.092548*y*z;shBasis[6]=0.315392*(3*z*z-1);shBasis[7]=1.092548*x*z;shBasis[8]=0.546274*(x*x-y*y)}}class LightProbe extends Light{constructor(sh=new SphericalHarmonics3,intensity=1){super(undefined,intensity);this.isLightProbe=true;this.sh=sh}copy(source){super.copy(source);this.sh.copy(source.sh);return this}toJSON(meta){const data=super.toJSON(meta);data.object.sh=this.sh.toArray();return data}}class MaterialLoader extends Loader{constructor(manager){super(manager);this.textures={}}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(scope.manager);loader.setPath(scope.path);loader.setRequestHeader(scope.requestHeader);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const textures=this.textures;function getTexture(name){if(textures[name]===undefined){warn("MaterialLoader: Undefined texture",name)}return textures[name]}const material=this.createMaterialFromType(json.type);if(json.uuid!==undefined)material.uuid=json.uuid;if(json.name!==undefined)material.name=json.name;if(json.color!==undefined&&material.color!==undefined)material.color.setHex(json.color);if(json.roughness!==undefined)material.roughness=json.roughness;if(json.metalness!==undefined)material.metalness=json.metalness;if(json.sheen!==undefined)material.sheen=json.sheen;if(json.sheenColor!==undefined)material.sheenColor=new Color().setHex(json.sheenColor);if(json.sheenRoughness!==undefined)material.sheenRoughness=json.sheenRoughness;if(json.emissive!==undefined&&material.emissive!==undefined)material.emissive.setHex(json.emissive);if(json.specular!==undefined&&material.specular!==undefined)material.specular.setHex(json.specular);if(json.specularIntensity!==undefined)material.specularIntensity=json.specularIntensity;if(json.specularColor!==undefined&&material.specularColor!==undefined)material.specularColor.setHex(json.specularColor);if(json.shininess!==undefined)material.shininess=json.shininess;if(json.clearcoat!==undefined)material.clearcoat=json.clearcoat;if(json.clearcoatRoughness!==undefined)material.clearcoatRoughness=json.clearcoatRoughness;if(json.dispersion!==undefined)material.dispersion=json.dispersion;if(json.iridescence!==undefined)material.iridescence=json.iridescence;if(json.iridescenceIOR!==undefined)material.iridescenceIOR=json.iridescenceIOR;if(json.iridescenceThicknessRange!==undefined)material.iridescenceThicknessRange=json.iridescenceThicknessRange;if(json.transmission!==undefined)material.transmission=json.transmission;if(json.thickness!==undefined)material.thickness=json.thickness;if(json.attenuationDistance!==undefined)material.attenuationDistance=json.attenuationDistance;if(json.attenuationColor!==undefined&&material.attenuationColor!==undefined)material.attenuationColor.setHex(json.attenuationColor);if(json.anisotropy!==undefined)material.anisotropy=json.anisotropy;if(json.anisotropyRotation!==undefined)material.anisotropyRotation=json.anisotropyRotation;if(json.fog!==undefined)material.fog=json.fog;if(json.flatShading!==undefined)material.flatShading=json.flatShading;if(json.blending!==undefined)material.blending=json.blending;if(json.combine!==undefined)material.combine=json.combine;if(json.side!==undefined)material.side=json.side;if(json.shadowSide!==undefined)material.shadowSide=json.shadowSide;if(json.opacity!==undefined)material.opacity=json.opacity;if(json.transparent!==undefined)material.transparent=json.transparent;if(json.alphaTest!==undefined)material.alphaTest=json.alphaTest;if(json.alphaHash!==undefined)material.alphaHash=json.alphaHash;if(json.depthFunc!==undefined)material.depthFunc=json.depthFunc;if(json.depthTest!==undefined)material.depthTest=json.depthTest;if(json.depthWrite!==undefined)material.depthWrite=json.depthWrite;if(json.colorWrite!==undefined)material.colorWrite=json.colorWrite;if(json.blendSrc!==undefined)material.blendSrc=json.blendSrc;if(json.blendDst!==undefined)material.blendDst=json.blendDst;if(json.blendEquation!==undefined)material.blendEquation=json.blendEquation;if(json.blendSrcAlpha!==undefined)material.blendSrcAlpha=json.blendSrcAlpha;if(json.blendDstAlpha!==undefined)material.blendDstAlpha=json.blendDstAlpha;if(json.blendEquationAlpha!==undefined)material.blendEquationAlpha=json.blendEquationAlpha;if(json.blendColor!==undefined&&material.blendColor!==undefined)material.blendColor.setHex(json.blendColor);if(json.blendAlpha!==undefined)material.blendAlpha=json.blendAlpha;if(json.stencilWriteMask!==undefined)material.stencilWriteMask=json.stencilWriteMask;if(json.stencilFunc!==undefined)material.stencilFunc=json.stencilFunc;if(json.stencilRef!==undefined)material.stencilRef=json.stencilRef;if(json.stencilFuncMask!==undefined)material.stencilFuncMask=json.stencilFuncMask;if(json.stencilFail!==undefined)material.stencilFail=json.stencilFail;if(json.stencilZFail!==undefined)material.stencilZFail=json.stencilZFail;if(json.stencilZPass!==undefined)material.stencilZPass=json.stencilZPass;if(json.stencilWrite!==undefined)material.stencilWrite=json.stencilWrite;if(json.wireframe!==undefined)material.wireframe=json.wireframe;if(json.wireframeLinewidth!==undefined)material.wireframeLinewidth=json.wireframeLinewidth;if(json.wireframeLinecap!==undefined)material.wireframeLinecap=json.wireframeLinecap;if(json.wireframeLinejoin!==undefined)material.wireframeLinejoin=json.wireframeLinejoin;if(json.rotation!==undefined)material.rotation=json.rotation;if(json.linewidth!==undefined)material.linewidth=json.linewidth;if(json.dashSize!==undefined)material.dashSize=json.dashSize;if(json.gapSize!==undefined)material.gapSize=json.gapSize;if(json.scale!==undefined)material.scale=json.scale;if(json.polygonOffset!==undefined)material.polygonOffset=json.polygonOffset;if(json.polygonOffsetFactor!==undefined)material.polygonOffsetFactor=json.polygonOffsetFactor;if(json.polygonOffsetUnits!==undefined)material.polygonOffsetUnits=json.polygonOffsetUnits;if(json.dithering!==undefined)material.dithering=json.dithering;if(json.alphaToCoverage!==undefined)material.alphaToCoverage=json.alphaToCoverage;if(json.premultipliedAlpha!==undefined)material.premultipliedAlpha=json.premultipliedAlpha;if(json.forceSinglePass!==undefined)material.forceSinglePass=json.forceSinglePass;if(json.allowOverride!==undefined)material.allowOverride=json.allowOverride;if(json.visible!==undefined)material.visible=json.visible;if(json.toneMapped!==undefined)material.toneMapped=json.toneMapped;if(json.userData!==undefined)material.userData=json.userData;if(json.vertexColors!==undefined){if(typeof json.vertexColors==="number"){material.vertexColors=json.vertexColors>0?true:false}else{material.vertexColors=json.vertexColors}}if(json.uniforms!==undefined){for(const name in json.uniforms){const uniform=json.uniforms[name];material.uniforms[name]={};switch(uniform.type){case"t":material.uniforms[name].value=getTexture(uniform.value);break;case"c":material.uniforms[name].value=new Color().setHex(uniform.value);break;case"v2":material.uniforms[name].value=new Vector2().fromArray(uniform.value);break;case"v3":material.uniforms[name].value=new Vector3().fromArray(uniform.value);break;case"v4":material.uniforms[name].value=new Vector4().fromArray(uniform.value);break;case"m3":material.uniforms[name].value=new Matrix3().fromArray(uniform.value);break;case"m4":material.uniforms[name].value=new Matrix4().fromArray(uniform.value);break;default:material.uniforms[name].value=uniform.value;}}}if(json.defines!==undefined)material.defines=json.defines;if(json.vertexShader!==undefined)material.vertexShader=json.vertexShader;if(json.fragmentShader!==undefined)material.fragmentShader=json.fragmentShader;if(json.glslVersion!==undefined)material.glslVersion=json.glslVersion;if(json.extensions!==undefined){for(const key in json.extensions){material.extensions[key]=json.extensions[key]}}if(json.lights!==undefined)material.lights=json.lights;if(json.clipping!==undefined)material.clipping=json.clipping;if(json.size!==undefined)material.size=json.size;if(json.sizeAttenuation!==undefined)material.sizeAttenuation=json.sizeAttenuation;if(json.map!==undefined)material.map=getTexture(json.map);if(json.matcap!==undefined)material.matcap=getTexture(json.matcap);if(json.alphaMap!==undefined)material.alphaMap=getTexture(json.alphaMap);if(json.bumpMap!==undefined)material.bumpMap=getTexture(json.bumpMap);if(json.bumpScale!==undefined)material.bumpScale=json.bumpScale;if(json.normalMap!==undefined)material.normalMap=getTexture(json.normalMap);if(json.normalMapType!==undefined)material.normalMapType=json.normalMapType;if(json.normalScale!==undefined){let normalScale=json.normalScale;if(Array.isArray(normalScale)===false){normalScale=[normalScale,normalScale]}material.normalScale=new Vector2().fromArray(normalScale)}if(json.displacementMap!==undefined)material.displacementMap=getTexture(json.displacementMap);if(json.displacementScale!==undefined)material.displacementScale=json.displacementScale;if(json.displacementBias!==undefined)material.displacementBias=json.displacementBias;if(json.roughnessMap!==undefined)material.roughnessMap=getTexture(json.roughnessMap);if(json.metalnessMap!==undefined)material.metalnessMap=getTexture(json.metalnessMap);if(json.emissiveMap!==undefined)material.emissiveMap=getTexture(json.emissiveMap);if(json.emissiveIntensity!==undefined)material.emissiveIntensity=json.emissiveIntensity;if(json.specularMap!==undefined)material.specularMap=getTexture(json.specularMap);if(json.specularIntensityMap!==undefined)material.specularIntensityMap=getTexture(json.specularIntensityMap);if(json.specularColorMap!==undefined)material.specularColorMap=getTexture(json.specularColorMap);if(json.envMap!==undefined)material.envMap=getTexture(json.envMap);if(json.envMapRotation!==undefined)material.envMapRotation.fromArray(json.envMapRotation);if(json.envMapIntensity!==undefined)material.envMapIntensity=json.envMapIntensity;if(json.reflectivity!==undefined)material.reflectivity=json.reflectivity;if(json.refractionRatio!==undefined)material.refractionRatio=json.refractionRatio;if(json.lightMap!==undefined)material.lightMap=getTexture(json.lightMap);if(json.lightMapIntensity!==undefined)material.lightMapIntensity=json.lightMapIntensity;if(json.aoMap!==undefined)material.aoMap=getTexture(json.aoMap);if(json.aoMapIntensity!==undefined)material.aoMapIntensity=json.aoMapIntensity;if(json.gradientMap!==undefined)material.gradientMap=getTexture(json.gradientMap);if(json.clearcoatMap!==undefined)material.clearcoatMap=getTexture(json.clearcoatMap);if(json.clearcoatRoughnessMap!==undefined)material.clearcoatRoughnessMap=getTexture(json.clearcoatRoughnessMap);if(json.clearcoatNormalMap!==undefined)material.clearcoatNormalMap=getTexture(json.clearcoatNormalMap);if(json.clearcoatNormalScale!==undefined)material.clearcoatNormalScale=new Vector2().fromArray(json.clearcoatNormalScale);if(json.iridescenceMap!==undefined)material.iridescenceMap=getTexture(json.iridescenceMap);if(json.iridescenceThicknessMap!==undefined)material.iridescenceThicknessMap=getTexture(json.iridescenceThicknessMap);if(json.transmissionMap!==undefined)material.transmissionMap=getTexture(json.transmissionMap);if(json.thicknessMap!==undefined)material.thicknessMap=getTexture(json.thicknessMap);if(json.anisotropyMap!==undefined)material.anisotropyMap=getTexture(json.anisotropyMap);if(json.sheenColorMap!==undefined)material.sheenColorMap=getTexture(json.sheenColorMap);if(json.sheenRoughnessMap!==undefined)material.sheenRoughnessMap=getTexture(json.sheenRoughnessMap);return material}setTextures(value){this.textures=value;return this}createMaterialFromType(type){return MaterialLoader.createMaterialFromType(type)}static createMaterialFromType(type){const materialLib={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new materialLib[type]}}class LoaderUtils{static extractUrlBase(url){const index=url.lastIndexOf("/");if(index===-1)return"./";return url.slice(0,index+1)}static resolveURL(url,path){if(typeof url!=="string"||url==="")return"";if(/^https?:\/\//i.test(path)&&/^\//.test(url)){path=path.replace(/(^https?:\/\/[^\/]+).*/i,"$1")}if(/^(https?:)?\/\//i.test(url))return url;if(/^data:.*,.*$/i.test(url))return url;if(/^blob:.*$/i.test(url))return url;return path+url}}class InstancedBufferGeometry extends BufferGeometry{constructor(){super();this.isInstancedBufferGeometry=true;this.type="InstancedBufferGeometry";this.instanceCount=Infinity}copy(source){super.copy(source);this.instanceCount=source.instanceCount;return this}toJSON(){const data=super.toJSON();data.instanceCount=this.instanceCount;data.isInstancedBufferGeometry=true;return data}}class BufferGeometryLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(scope.manager);loader.setPath(scope.path);loader.setRequestHeader(scope.requestHeader);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const interleavedBufferMap={};const arrayBufferMap={};function getInterleavedBuffer(json,uuid){if(interleavedBufferMap[uuid]!==undefined)return interleavedBufferMap[uuid];const interleavedBuffers=json.interleavedBuffers;const interleavedBuffer=interleavedBuffers[uuid];const buffer=getArrayBuffer(json,interleavedBuffer.buffer);const array=getTypedArray(interleavedBuffer.type,buffer);const ib=new InterleavedBuffer(array,interleavedBuffer.stride);ib.uuid=interleavedBuffer.uuid;interleavedBufferMap[uuid]=ib;return ib}function getArrayBuffer(json,uuid){if(arrayBufferMap[uuid]!==undefined)return arrayBufferMap[uuid];const arrayBuffers=json.arrayBuffers;const arrayBuffer=arrayBuffers[uuid];const ab=new Uint32Array(arrayBuffer).buffer;arrayBufferMap[uuid]=ab;return ab}const geometry=json.isInstancedBufferGeometry?new InstancedBufferGeometry:new BufferGeometry;const index=json.data.index;if(index!==undefined){const typedArray=getTypedArray(index.type,index.array);geometry.setIndex(new BufferAttribute(typedArray,1))}const attributes=json.data.attributes;for(const key in attributes){const attribute=attributes[key];let bufferAttribute;if(attribute.isInterleavedBufferAttribute){const interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{const typedArray=getTypedArray(attribute.type,attribute.array);const bufferAttributeConstr=attribute.isInstancedBufferAttribute?InstancedBufferAttribute:BufferAttribute;bufferAttribute=new bufferAttributeConstr(typedArray,attribute.itemSize,attribute.normalized)}if(attribute.name!==undefined)bufferAttribute.name=attribute.name;if(attribute.usage!==undefined)bufferAttribute.setUsage(attribute.usage);geometry.setAttribute(key,bufferAttribute)}const morphAttributes=json.data.morphAttributes;if(morphAttributes){for(const key in morphAttributes){const attributeArray=morphAttributes[key];const array=[];for(let i=0,il=attributeArray.length;i<il;i++){const attribute=attributeArray[i];let bufferAttribute;if(attribute.isInterleavedBufferAttribute){const interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{const typedArray=getTypedArray(attribute.type,attribute.array);bufferAttribute=new BufferAttribute(typedArray,attribute.itemSize,attribute.normalized)}if(attribute.name!==undefined)bufferAttribute.name=attribute.name;array.push(bufferAttribute)}geometry.morphAttributes[key]=array}}const morphTargetsRelative=json.data.morphTargetsRelative;if(morphTargetsRelative){geometry.morphTargetsRelative=true}const groups=json.data.groups||json.data.drawcalls||json.data.offsets;if(groups!==undefined){for(let i=0,n=groups.length;i!==n;++i){const group=groups[i];geometry.addGroup(group.start,group.count,group.materialIndex)}}const boundingSphere=json.data.boundingSphere;if(boundingSphere!==undefined){geometry.boundingSphere=new Sphere().fromJSON(boundingSphere)}if(json.name)geometry.name=json.name;if(json.userData)geometry.userData=json.userData;return geometry}}class ObjectLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const path=this.path===""?LoaderUtils.extractUrlBase(url):this.path;this.resourcePath=this.resourcePath||path;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(text){let json=null;try{json=JSON.parse(text)}catch(error){if(onError!==undefined)onError(error);error("ObjectLoader: Can't parse "+url+".",error.message);return}const metadata=json.metadata;if(metadata===undefined||metadata.type===undefined||metadata.type.toLowerCase()==="geometry"){if(onError!==undefined)onError(new Error("THREE.ObjectLoader: Can't load "+url));error("ObjectLoader: Can't load "+url);return}scope.parse(json,onLoad)},onProgress,onError)}async loadAsync(url,onProgress){const scope=this;const path=this.path===""?LoaderUtils.extractUrlBase(url):this.path;this.resourcePath=this.resourcePath||path;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);const text=await loader.loadAsync(url,onProgress);const json=JSON.parse(text);const metadata=json.metadata;if(metadata===undefined||metadata.type===undefined||metadata.type.toLowerCase()==="geometry"){throw new Error("THREE.ObjectLoader: Can't load "+url)}return await scope.parseAsync(json)}parse(json,onLoad){const animations=this.parseAnimations(json.animations);const shapes=this.parseShapes(json.shapes);const geometries=this.parseGeometries(json.geometries,shapes);const images=this.parseImages(json.images,function(){if(onLoad!==undefined)onLoad(object)});const textures=this.parseTextures(json.textures,images);const materials=this.parseMaterials(json.materials,textures);const object=this.parseObject(json.object,geometries,materials,textures,animations);const skeletons=this.parseSkeletons(json.skeletons,object);this.bindSkeletons(object,skeletons);this.bindLightTargets(object);if(onLoad!==undefined){let hasImages=false;for(const uuid in images){if(images[uuid].data instanceof HTMLImageElement){hasImages=true;break}}if(hasImages===false)onLoad(object)}return object}async parseAsync(json){const animations=this.parseAnimations(json.animations);const shapes=this.parseShapes(json.shapes);const geometries=this.parseGeometries(json.geometries,shapes);const images=await this.parseImagesAsync(json.images);const textures=this.parseTextures(json.textures,images);const materials=this.parseMaterials(json.materials,textures);const object=this.parseObject(json.object,geometries,materials,textures,animations);const skeletons=this.parseSkeletons(json.skeletons,object);this.bindSkeletons(object,skeletons);this.bindLightTargets(object);return object}parseShapes(json){const shapes={};if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const shape=new Shape().fromJSON(json[i]);shapes[shape.uuid]=shape}}return shapes}parseSkeletons(json,object){const skeletons={};const bones={};object.traverse(function(child){if(child.isBone)bones[child.uuid]=child});if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const skeleton=new Skeleton().fromJSON(json[i],bones);skeletons[skeleton.uuid]=skeleton}}return skeletons}parseGeometries(json,shapes){const geometries={};if(json!==undefined){const bufferGeometryLoader=new BufferGeometryLoader;for(let i=0,l=json.length;i<l;i++){let geometry;const data=json[i];switch(data.type){case"BufferGeometry":case"InstancedBufferGeometry":geometry=bufferGeometryLoader.parse(data);break;default:if(data.type in Geometries){geometry=Geometries[data.type].fromJSON(data,shapes)}else{warn(`ObjectLoader: Unsupported geometry type "${data.type}"`)}}geometry.uuid=data.uuid;if(data.name!==undefined)geometry.name=data.name;if(data.userData!==undefined)geometry.userData=data.userData;geometries[data.uuid]=geometry}}return geometries}parseMaterials(json,textures){const cache={};const materials={};if(json!==undefined){const loader=new MaterialLoader;loader.setTextures(textures);for(let i=0,l=json.length;i<l;i++){const data=json[i];if(cache[data.uuid]===undefined){cache[data.uuid]=loader.parse(data)}materials[data.uuid]=cache[data.uuid]}}return materials}parseAnimations(json){const animations={};if(json!==undefined){for(let i=0;i<json.length;i++){const data=json[i];const clip=AnimationClip.parse(data);animations[clip.uuid]=clip}}return animations}parseImages(json,onLoad){const scope=this;const images={};let loader;function loadImage(url){scope.manager.itemStart(url);return loader.load(url,function(){scope.manager.itemEnd(url)},undefined,function(){scope.manager.itemError(url);scope.manager.itemEnd(url)})}function deserializeImage(image){if(typeof image==="string"){const url=image;const path=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(url)?url:scope.resourcePath+url;return loadImage(path)}else{if(image.data){return{data:getTypedArray(image.type,image.data),width:image.width,height:image.height}}else{return null}}}if(json!==undefined&&json.length>0){const manager=new LoadingManager(onLoad);loader=new ImageLoader(manager);loader.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i<il;i++){const image=json[i];const url=image.url;if(Array.isArray(url)){const imageArray=[];for(let j=0,jl=url.length;j<jl;j++){const currentUrl=url[j];const deserializedImage=deserializeImage(currentUrl);if(deserializedImage!==null){if(deserializedImage instanceof HTMLImageElement){imageArray.push(deserializedImage)}else{imageArray.push(new DataTexture(deserializedImage.data,deserializedImage.width,deserializedImage.height))}}}images[image.uuid]=new Source(imageArray)}else{const deserializedImage=deserializeImage(image.url);images[image.uuid]=new Source(deserializedImage)}}}return images}async parseImagesAsync(json){const scope=this;const images={};let loader;async function deserializeImage(image){if(typeof image==="string"){const url=image;const path=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(url)?url:scope.resourcePath+url;return await loader.loadAsync(path)}else{if(image.data){return{data:getTypedArray(image.type,image.data),width:image.width,height:image.height}}else{return null}}}if(json!==undefined&&json.length>0){loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i<il;i++){const image=json[i];const url=image.url;if(Array.isArray(url)){const imageArray=[];for(let j=0,jl=url.length;j<jl;j++){const currentUrl=url[j];const deserializedImage=await deserializeImage(currentUrl);if(deserializedImage!==null){if(deserializedImage instanceof HTMLImageElement){imageArray.push(deserializedImage)}else{imageArray.push(new DataTexture(deserializedImage.data,deserializedImage.width,deserializedImage.height))}}}images[image.uuid]=new Source(imageArray)}else{const deserializedImage=await deserializeImage(image.url);images[image.uuid]=new Source(deserializedImage)}}}return images}parseTextures(json,images){function parseConstant(value,type){if(typeof value==="number")return value;warn("ObjectLoader.parseTexture: Constant should be in numeric form.",value);return type[value]}const textures={};if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const data=json[i];if(data.image===undefined){warn("ObjectLoader: No \"image\" specified for",data.uuid)}if(images[data.image]===undefined){warn("ObjectLoader: Undefined image",data.image)}const source=images[data.image];const image=source.data;let texture;if(Array.isArray(image)){texture=new CubeTexture;if(image.length===6)texture.needsUpdate=true}else{if(image&&image.data){texture=new DataTexture}else{texture=new Texture}if(image)texture.needsUpdate=true}texture.source=source;texture.uuid=data.uuid;if(data.name!==undefined)texture.name=data.name;if(data.mapping!==undefined)texture.mapping=parseConstant(data.mapping,TEXTURE_MAPPING);if(data.channel!==undefined)texture.channel=data.channel;if(data.offset!==undefined)texture.offset.fromArray(data.offset);if(data.repeat!==undefined)texture.repeat.fromArray(data.repeat);if(data.center!==undefined)texture.center.fromArray(data.center);if(data.rotation!==undefined)texture.rotation=data.rotation;if(data.wrap!==undefined){texture.wrapS=parseConstant(data.wrap[0],TEXTURE_WRAPPING);texture.wrapT=parseConstant(data.wrap[1],TEXTURE_WRAPPING)}if(data.format!==undefined)texture.format=data.format;if(data.internalFormat!==undefined)texture.internalFormat=data.internalFormat;if(data.type!==undefined)texture.type=data.type;if(data.colorSpace!==undefined)texture.colorSpace=data.colorSpace;if(data.minFilter!==undefined)texture.minFilter=parseConstant(data.minFilter,TEXTURE_FILTER);if(data.magFilter!==undefined)texture.magFilter=parseConstant(data.magFilter,TEXTURE_FILTER);if(data.anisotropy!==undefined)texture.anisotropy=data.anisotropy;if(data.flipY!==undefined)texture.flipY=data.flipY;if(data.generateMipmaps!==undefined)texture.generateMipmaps=data.generateMipmaps;if(data.premultiplyAlpha!==undefined)texture.premultiplyAlpha=data.premultiplyAlpha;if(data.unpackAlignment!==undefined)texture.unpackAlignment=data.unpackAlignment;if(data.compareFunction!==undefined)texture.compareFunction=data.compareFunction;if(data.userData!==undefined)texture.userData=data.userData;textures[data.uuid]=texture}}return textures}parseObject(data,geometries,materials,textures,animations){let object;function getGeometry(name){if(geometries[name]===undefined){warn("ObjectLoader: Undefined geometry",name)}return geometries[name]}function getMaterial(name){if(name===undefined)return undefined;if(Array.isArray(name)){const array=[];for(let i=0,l=name.length;i<l;i++){const uuid=name[i];if(materials[uuid]===undefined){warn("ObjectLoader: Undefined material",uuid)}array.push(materials[uuid])}return array}if(materials[name]===undefined){warn("ObjectLoader: Undefined material",name)}return materials[name]}function getTexture(uuid){if(textures[uuid]===undefined){warn("ObjectLoader: Undefined texture",uuid)}return textures[uuid]}let geometry,material;switch(data.type){case"Scene":object=new Scene;if(data.background!==undefined){if(Number.isInteger(data.background)){object.background=new Color(data.background)}else{object.background=getTexture(data.background)}}if(data.environment!==undefined){object.environment=getTexture(data.environment)}if(data.fog!==undefined){if(data.fog.type==="Fog"){object.fog=new Fog(data.fog.color,data.fog.near,data.fog.far)}else if(data.fog.type==="FogExp2"){object.fog=new FogExp2(data.fog.color,data.fog.density)}if(data.fog.name!==""){object.fog.name=data.fog.name}}if(data.backgroundBlurriness!==undefined)object.backgroundBlurriness=data.backgroundBlurriness;if(data.backgroundIntensity!==undefined)object.backgroundIntensity=data.backgroundIntensity;if(data.backgroundRotation!==undefined)object.backgroundRotation.fromArray(data.backgroundRotation);if(data.environmentIntensity!==undefined)object.environmentIntensity=data.environmentIntensity;if(data.environmentRotation!==undefined)object.environmentRotation.fromArray(data.environmentRotation);break;case"PerspectiveCamera":object=new PerspectiveCamera(data.fov,data.aspect,data.near,data.far);if(data.focus!==undefined)object.focus=data.focus;if(data.zoom!==undefined)object.zoom=data.zoom;if(data.filmGauge!==undefined)object.filmGauge=data.filmGauge;if(data.filmOffset!==undefined)object.filmOffset=data.filmOffset;if(data.view!==undefined)object.view=Object.assign({},data.view);break;case"OrthographicCamera":object=new OrthographicCamera(data.left,data.right,data.top,data.bottom,data.near,data.far);if(data.zoom!==undefined)object.zoom=data.zoom;if(data.view!==undefined)object.view=Object.assign({},data.view);break;case"AmbientLight":object=new AmbientLight(data.color,data.intensity);break;case"DirectionalLight":object=new DirectionalLight(data.color,data.intensity);object.target=data.target||"";break;case"PointLight":object=new PointLight(data.color,data.intensity,data.distance,data.decay);break;case"RectAreaLight":object=new RectAreaLight(data.color,data.intensity,data.width,data.height);break;case"SpotLight":object=new SpotLight(data.color,data.intensity,data.distance,data.angle,data.penumbra,data.decay);object.target=data.target||"";break;case"HemisphereLight":object=new HemisphereLight(data.color,data.groundColor,data.intensity);break;case"LightProbe":const sh=new SphericalHarmonics3().fromArray(data.sh);object=new LightProbe(sh,data.intensity);break;case"SkinnedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new SkinnedMesh(geometry,material);if(data.bindMode!==undefined)object.bindMode=data.bindMode;if(data.bindMatrix!==undefined)object.bindMatrix.fromArray(data.bindMatrix);if(data.skeleton!==undefined)object.skeleton=data.skeleton;break;case"Mesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new Mesh(geometry,material);break;case"InstancedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);const count=data.count;const instanceMatrix=data.instanceMatrix;const instanceColor=data.instanceColor;object=new InstancedMesh(geometry,material,count);object.instanceMatrix=new InstancedBufferAttribute(new Float32Array(instanceMatrix.array),16);if(instanceColor!==undefined)object.instanceColor=new InstancedBufferAttribute(new Float32Array(instanceColor.array),instanceColor.itemSize);break;case"BatchedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new BatchedMesh(data.maxInstanceCount,data.maxVertexCount,data.maxIndexCount,material);object.geometry=geometry;object.perObjectFrustumCulled=data.perObjectFrustumCulled;object.sortObjects=data.sortObjects;object._drawRanges=data.drawRanges;object._reservedRanges=data.reservedRanges;object._geometryInfo=data.geometryInfo.map(info=>{let box=null;let sphere=null;if(info.boundingBox!==undefined){box=new Box3().fromJSON(info.boundingBox)}if(info.boundingSphere!==undefined){sphere=new Sphere().fromJSON(info.boundingSphere)}return{...info,boundingBox:box,boundingSphere:sphere}});object._instanceInfo=data.instanceInfo;object._availableInstanceIds=data._availableInstanceIds;object._availableGeometryIds=data._availableGeometryIds;object._nextIndexStart=data.nextIndexStart;object._nextVertexStart=data.nextVertexStart;object._geometryCount=data.geometryCount;object._maxInstanceCount=data.maxInstanceCount;object._maxVertexCount=data.maxVertexCount;object._maxIndexCount=data.maxIndexCount;object._geometryInitialized=data.geometryInitialized;object._matricesTexture=getTexture(data.matricesTexture.uuid);object._indirectTexture=getTexture(data.indirectTexture.uuid);if(data.colorsTexture!==undefined){object._colorsTexture=getTexture(data.colorsTexture.uuid)}if(data.boundingSphere!==undefined){object.boundingSphere=new Sphere().fromJSON(data.boundingSphere)}if(data.boundingBox!==undefined){object.boundingBox=new Box3().fromJSON(data.boundingBox)}break;case"LOD":object=new LOD;break;case"Line":object=new Line(getGeometry(data.geometry),getMaterial(data.material));break;case"LineLoop":object=new LineLoop(getGeometry(data.geometry),getMaterial(data.material));break;case"LineSegments":object=new LineSegments(getGeometry(data.geometry),getMaterial(data.material));break;case"PointCloud":case"Points":object=new Points(getGeometry(data.geometry),getMaterial(data.material));break;case"Sprite":object=new Sprite(getMaterial(data.material));break;case"Group":object=new Group;break;case"Bone":object=new Bone;break;default:object=new Object3D;}object.uuid=data.uuid;if(data.name!==undefined)object.name=data.name;if(data.matrix!==undefined){object.matrix.fromArray(data.matrix);if(data.matrixAutoUpdate!==undefined)object.matrixAutoUpdate=data.matrixAutoUpdate;if(object.matrixAutoUpdate)object.matrix.decompose(object.position,object.quaternion,object.scale)}else{if(data.position!==undefined)object.position.fromArray(data.position);if(data.rotation!==undefined)object.rotation.fromArray(data.rotation);if(data.quaternion!==undefined)object.quaternion.fromArray(data.quaternion);if(data.scale!==undefined)object.scale.fromArray(data.scale)}if(data.up!==undefined)object.up.fromArray(data.up);if(data.castShadow!==undefined)object.castShadow=data.castShadow;if(data.receiveShadow!==undefined)object.receiveShadow=data.receiveShadow;if(data.shadow){if(data.shadow.intensity!==undefined)object.shadow.intensity=data.shadow.intensity;if(data.shadow.bias!==undefined)object.shadow.bias=data.shadow.bias;if(data.shadow.normalBias!==undefined)object.shadow.normalBias=data.shadow.normalBias;if(data.shadow.radius!==undefined)object.shadow.radius=data.shadow.radius;if(data.shadow.mapSize!==undefined)object.shadow.mapSize.fromArray(data.shadow.mapSize);if(data.shadow.camera!==undefined)object.shadow.camera=this.parseObject(data.shadow.camera)}if(data.visible!==undefined)object.visible=data.visible;if(data.frustumCulled!==undefined)object.frustumCulled=data.frustumCulled;if(data.renderOrder!==undefined)object.renderOrder=data.renderOrder;if(data.userData!==undefined)object.userData=data.userData;if(data.layers!==undefined)object.layers.mask=data.layers;if(data.children!==undefined){const children=data.children;for(let i=0;i<children.length;i++){object.add(this.parseObject(children[i],geometries,materials,textures,animations))}}if(data.animations!==undefined){const objectAnimations=data.animations;for(let i=0;i<objectAnimations.length;i++){const uuid=objectAnimations[i];object.animations.push(animations[uuid])}}if(data.type==="LOD"){if(data.autoUpdate!==undefined)object.autoUpdate=data.autoUpdate;const levels=data.levels;for(let l=0;l<levels.length;l++){const level=levels[l];const child=object.getObjectByProperty("uuid",level.object);if(child!==undefined){object.addLevel(child,level.distance,level.hysteresis)}}}return object}bindSkeletons(object,skeletons){if(Object.keys(skeletons).length===0)return;object.traverse(function(child){if(child.isSkinnedMesh===true&&child.skeleton!==undefined){const skeleton=skeletons[child.skeleton];if(skeleton===undefined){warn("ObjectLoader: No skeleton found with UUID:",child.skeleton)}else{child.bind(skeleton,child.bindMatrix)}}})}bindLightTargets(object){object.traverse(function(child){if(child.isDirectionalLight||child.isSpotLight){const uuid=child.target;const target=object.getObjectByProperty("uuid",uuid);if(target!==undefined){child.target=target}else{child.target=new Object3D}}})}}const TEXTURE_MAPPING={UVMapping:UVMapping,CubeReflectionMapping:CubeReflectionMapping,CubeRefractionMapping:CubeRefractionMapping,EquirectangularReflectionMapping:EquirectangularReflectionMapping,EquirectangularRefractionMapping:EquirectangularRefractionMapping,CubeUVReflectionMapping:CubeUVReflectionMapping};const TEXTURE_WRAPPING={RepeatWrapping:RepeatWrapping,ClampToEdgeWrapping:ClampToEdgeWrapping,MirroredRepeatWrapping:MirroredRepeatWrapping};const TEXTURE_FILTER={NearestFilter:NearestFilter,NearestMipmapNearestFilter:NearestMipmapNearestFilter,NearestMipmapLinearFilter:NearestMipmapLinearFilter,LinearFilter:LinearFilter,LinearMipmapNearestFilter:LinearMipmapNearestFilter,LinearMipmapLinearFilter:LinearMipmapLinearFilter};const _errorMap=new WeakMap;class ImageBitmapLoader extends Loader{constructor(manager){super(manager);this.isImageBitmapLoader=true;if(typeof createImageBitmap==="undefined"){warn("ImageBitmapLoader: createImageBitmap() not supported.")}if(typeof fetch==="undefined"){warn("ImageBitmapLoader: fetch() not supported.")}this.options={premultiplyAlpha:"none"};this._abortController=new AbortController}setOptions(options){this.options=options;return this}load(url,onLoad,onProgress,onError){if(url===undefined)url="";if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const scope=this;const cached=Cache.get(`image-bitmap:${url}`);if(cached!==undefined){scope.manager.itemStart(url);if(cached.then){cached.then(imageBitmap=>{if(_errorMap.has(cached)===true){if(onError)onError(_errorMap.get(cached));scope.manager.itemError(url);scope.manager.itemEnd(url)}else{if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url);return imageBitmap}});return}setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0);return cached}const fetchOptions={};fetchOptions.credentials=this.crossOrigin==="anonymous"?"same-origin":"include";fetchOptions.headers=this.requestHeader;fetchOptions.signal=typeof AbortSignal.any==="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const promise=fetch(url,fetchOptions).then(function(res){return res.blob()}).then(function(blob){return createImageBitmap(blob,Object.assign(scope.options,{colorSpaceConversion:"none"}))}).then(function(imageBitmap){Cache.add(`image-bitmap:${url}`,imageBitmap);if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url);return imageBitmap}).catch(function(e){if(onError)onError(e);_errorMap.set(promise,e);Cache.remove(`image-bitmap:${url}`);scope.manager.itemError(url);scope.manager.itemEnd(url)});Cache.add(`image-bitmap:${url}`,promise);scope.manager.itemStart(url)}abort(){this._abortController.abort();this._abortController=new AbortController;return this}}let _context;class AudioContext{static getContext(){if(_context===undefined){_context=new(window.AudioContext||window.webkitAudioContext)}return _context}static setContext(value){_context=value}}class AudioLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(buffer){try{const bufferCopy=buffer.slice(0);const context=AudioContext.getContext();context.decodeAudioData(bufferCopy,function(audioBuffer){onLoad(audioBuffer)}).catch(handleError)}catch(e){handleError(e)}},onProgress,onError);function handleError(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}}}const _eyeRight=new Matrix4;const _eyeLeft=new Matrix4;const _projectionMatrix=new Matrix4;class StereoCamera{constructor(){this.type="StereoCamera";this.aspect=1;this.eyeSep=0.064;this.cameraL=new PerspectiveCamera;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=false;this.cameraR=new PerspectiveCamera;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=false;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(camera){const cache=this._cache;const needsUpdate=cache.focus!==camera.focus||cache.fov!==camera.fov||cache.aspect!==camera.aspect*this.aspect||cache.near!==camera.near||cache.far!==camera.far||cache.zoom!==camera.zoom||cache.eyeSep!==this.eyeSep;if(needsUpdate){cache.focus=camera.focus;cache.fov=camera.fov;cache.aspect=camera.aspect*this.aspect;cache.near=camera.near;cache.far=camera.far;cache.zoom=camera.zoom;cache.eyeSep=this.eyeSep;_projectionMatrix.copy(camera.projectionMatrix);const eyeSepHalf=cache.eyeSep/2;const eyeSepOnProjection=eyeSepHalf*cache.near/cache.focus;const ymax=cache.near*Math.tan(DEG2RAD*cache.fov*0.5)/cache.zoom;let xmin,xmax;_eyeLeft.elements[12]=-eyeSepHalf;_eyeRight.elements[12]=eyeSepHalf;xmin=-ymax*cache.aspect+eyeSepOnProjection;xmax=ymax*cache.aspect+eyeSepOnProjection;_projectionMatrix.elements[0]=2*cache.near/(xmax-xmin);_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin);this.cameraL.projectionMatrix.copy(_projectionMatrix);xmin=-ymax*cache.aspect-eyeSepOnProjection;xmax=ymax*cache.aspect-eyeSepOnProjection;_projectionMatrix.elements[0]=2*cache.near/(xmax-xmin);_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin);this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft);this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight)}}class ArrayCamera extends PerspectiveCamera{constructor(array=[]){super();this.isArrayCamera=true;this.isMultiViewCamera=false;this.cameras=array}}class Clock{constructor(autoStart=true){this.autoStart=autoStart;this.startTime=0;this.oldTime=0;this.elapsedTime=0;this.running=false}start(){this.startTime=performance.now();this.oldTime=this.startTime;this.elapsedTime=0;this.running=true}stop(){this.getElapsedTime();this.running=false;this.autoStart=false}getElapsedTime(){this.getDelta();return this.elapsedTime}getDelta(){let diff=0;if(this.autoStart&&!this.running){this.start();return 0}if(this.running){const newTime=performance.now();diff=(newTime-this.oldTime)/1000;this.oldTime=newTime;this.elapsedTime+=diff}return diff}}const _position$1=new Vector3;const _quaternion$1=new Quaternion;const _scale$1=new Vector3;const _forward=new Vector3;const _up=new Vector3;class AudioListener extends Object3D{constructor(){super();this.type="AudioListener";this.context=AudioContext.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Clock}getInput(){return this.gain}removeFilter(){if(this.filter!==null){this.gain.disconnect(this.filter);this.filter.disconnect(this.context.destination);this.gain.connect(this.context.destination);this.filter=null}return this}getFilter(){return this.filter}setFilter(value){if(this.filter!==null){this.gain.disconnect(this.filter);this.filter.disconnect(this.context.destination)}else{this.gain.disconnect(this.context.destination)}this.filter=value;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(value){this.gain.gain.setTargetAtTime(value,this.context.currentTime,0.01);return this}updateMatrixWorld(force){super.updateMatrixWorld(force);const listener=this.context.listener;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(_position$1,_quaternion$1,_scale$1);_forward.set(0,0,-1).applyQuaternion(_quaternion$1);_up.set(0,1,0).applyQuaternion(_quaternion$1);if(listener.positionX){const endTime=this.context.currentTime+this.timeDelta;listener.positionX.linearRampToValueAtTime(_position$1.x,endTime);listener.positionY.linearRampToValueAtTime(_position$1.y,endTime);listener.positionZ.linearRampToValueAtTime(_position$1.z,endTime);listener.forwardX.linearRampToValueAtTime(_forward.x,endTime);listener.forwardY.linearRampToValueAtTime(_forward.y,endTime);listener.forwardZ.linearRampToValueAtTime(_forward.z,endTime);listener.upX.linearRampToValueAtTime(_up.x,endTime);listener.upY.linearRampToValueAtTime(_up.y,endTime);listener.upZ.linearRampToValueAtTime(_up.z,endTime)}else{listener.setPosition(_position$1.x,_position$1.y,_position$1.z);listener.setOrientation(_forward.x,_forward.y,_forward.z,_up.x,_up.y,_up.z)}}}class Audio extends Object3D{constructor(listener){super();this.type="Audio";this.listener=listener;this.context=listener.context;this.gain=this.context.createGain();this.gain.connect(listener.getInput());this.autoplay=false;this.buffer=null;this.detune=0;this.loop=false;this.loopStart=0;this.loopEnd=0;this.offset=0;this.duration=undefined;this.playbackRate=1;this.isPlaying=false;this.hasPlaybackControl=true;this.source=null;this.sourceType="empty";this._startedAt=0;this._progress=0;this._connected=false;this.filters=[]}getOutput(){return this.gain}setNodeSource(audioNode){this.hasPlaybackControl=false;this.sourceType="audioNode";this.source=audioNode;this.connect();return this}setMediaElementSource(mediaElement){this.hasPlaybackControl=false;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(mediaElement);this.connect();return this}setMediaStreamSource(mediaStream){this.hasPlaybackControl=false;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(mediaStream);this.connect();return this}setBuffer(audioBuffer){this.buffer=audioBuffer;this.sourceType="buffer";if(this.autoplay)this.play();return this}play(delay=0){if(this.isPlaying===true){warn("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+delay;const source=this.context.createBufferSource();source.buffer=this.buffer;source.loop=this.loop;source.loopStart=this.loopStart;source.loopEnd=this.loopEnd;source.onended=this.onEnded.bind(this);source.start(this._startedAt,this._progress+this.offset,this.duration);this.isPlaying=true;this.source=source;this.setDetune(this.detune);this.setPlaybackRate(this.playbackRate);return this.connect()}pause(){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}if(this.isPlaying===true){this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate;if(this.loop===true){this._progress=this._progress%(this.duration||this.buffer.duration)}this.source.stop();this.source.onended=null;this.isPlaying=false}return this}stop(delay=0){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this._progress=0;if(this.source!==null){this.source.stop(this.context.currentTime+delay);this.source.onended=null}this.isPlaying=false;return this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let i=1,l=this.filters.length;i<l;i++){this.filters[i-1].connect(this.filters[i])}this.filters[this.filters.length-1].connect(this.getOutput())}else{this.source.connect(this.getOutput())}this._connected=true;return this}disconnect(){if(this._connected===false){return}if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let i=1,l=this.filters.length;i<l;i++){this.filters[i-1].disconnect(this.filters[i])}this.filters[this.filters.length-1].disconnect(this.getOutput())}else{this.source.disconnect(this.getOutput())}this._connected=false;return this}getFilters(){return this.filters}setFilters(value){if(!value)value=[];if(this._connected===true){this.disconnect();this.filters=value.slice();this.connect()}else{this.filters=value.slice()}return this}setDetune(value){this.detune=value;if(this.isPlaying===true&&this.source.detune!==undefined){this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,0.01)}return this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(filter){return this.setFilters(filter?[filter]:[])}setPlaybackRate(value){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this.playbackRate=value;if(this.isPlaying===true){this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,0.01)}return this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=false;this._progress=0}getLoop(){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return false}return this.loop}setLoop(value){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this.loop=value;if(this.isPlaying===true){this.source.loop=this.loop}return this}setLoopStart(value){this.loopStart=value;return this}setLoopEnd(value){this.loopEnd=value;return this}getVolume(){return this.gain.gain.value}setVolume(value){this.gain.gain.setTargetAtTime(value,this.context.currentTime,0.01);return this}copy(source,recursive){super.copy(source,recursive);if(source.sourceType!=="buffer"){warn("Audio: Audio source type cannot be copied.");return this}this.autoplay=source.autoplay;this.buffer=source.buffer;this.detune=source.detune;this.loop=source.loop;this.loopStart=source.loopStart;this.loopEnd=source.loopEnd;this.offset=source.offset;this.duration=source.duration;this.playbackRate=source.playbackRate;this.hasPlaybackControl=source.hasPlaybackControl;this.sourceType=source.sourceType;this.filters=source.filters.slice();return this}clone(recursive){return new this.constructor(this.listener).copy(this,recursive)}}const _position=new Vector3;const _quaternion=new Quaternion;const _scale=new Vector3;const _orientation=new Vector3;class PositionalAudio extends Audio{constructor(listener){super(listener);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}connect(){super.connect();this.panner.connect(this.gain);return this}disconnect(){super.disconnect();this.panner.disconnect(this.gain);return this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(value){this.panner.refDistance=value;return this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(value){this.panner.rolloffFactor=value;return this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(value){this.panner.distanceModel=value;return this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(value){this.panner.maxDistance=value;return this}setDirectionalCone(coneInnerAngle,coneOuterAngle,coneOuterGain){this.panner.coneInnerAngle=coneInnerAngle;this.panner.coneOuterAngle=coneOuterAngle;this.panner.coneOuterGain=coneOuterGain;return this}updateMatrixWorld(force){super.updateMatrixWorld(force);if(this.hasPlaybackControl===true&&this.isPlaying===false)return;this.matrixWorld.decompose(_position,_quaternion,_scale);_orientation.set(0,0,1).applyQuaternion(_quaternion);const panner=this.panner;if(panner.positionX){const endTime=this.context.currentTime+this.listener.timeDelta;panner.positionX.linearRampToValueAtTime(_position.x,endTime);panner.positionY.linearRampToValueAtTime(_position.y,endTime);panner.positionZ.linearRampToValueAtTime(_position.z,endTime);panner.orientationX.linearRampToValueAtTime(_orientation.x,endTime);panner.orientationY.linearRampToValueAtTime(_orientation.y,endTime);panner.orientationZ.linearRampToValueAtTime(_orientation.z,endTime)}else{panner.setPosition(_position.x,_position.y,_position.z);panner.setOrientation(_orientation.x,_orientation.y,_orientation.z)}}}class AudioAnalyser{constructor(audio,fftSize=2048){this.analyser=audio.context.createAnalyser();this.analyser.fftSize=fftSize;this.data=new Uint8Array(this.analyser.frequencyBinCount);audio.getOutput().connect(this.analyser)}getFrequencyData(){this.analyser.getByteFrequencyData(this.data);return this.data}getAverageFrequency(){let value=0;const data=this.getFrequencyData();for(let i=0;i<data.length;i++){value+=data[i]}return value/data.length}}class PropertyMixer{constructor(binding,typeName,valueSize){this.binding=binding;this.valueSize=valueSize;let mixFunction,mixFunctionAdditive,setIdentity;switch(typeName){case"quaternion":mixFunction=this._slerp;mixFunctionAdditive=this._slerpAdditive;setIdentity=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(valueSize*6);this._workIndex=5;break;case"string":case"bool":mixFunction=this._select;mixFunctionAdditive=this._select;setIdentity=this._setAdditiveIdentityOther;this.buffer=new Array(valueSize*5);break;default:mixFunction=this._lerp;mixFunctionAdditive=this._lerpAdditive;setIdentity=this._setAdditiveIdentityNumeric;this.buffer=new Float64Array(valueSize*5);}this._mixBufferRegion=mixFunction;this._mixBufferRegionAdditive=mixFunctionAdditive;this._setIdentity=setIdentity;this._origIndex=3;this._addIndex=4;this.cumulativeWeight=0;this.cumulativeWeightAdditive=0;this.useCount=0;this.referenceCount=0}accumulate(accuIndex,weight){const buffer=this.buffer,stride=this.valueSize,offset=accuIndex*stride+stride;let currentWeight=this.cumulativeWeight;if(currentWeight===0){for(let i=0;i!==stride;++i){buffer[offset+i]=buffer[i]}currentWeight=weight}else{currentWeight+=weight;const mix=weight/currentWeight;this._mixBufferRegion(buffer,offset,0,mix,stride)}this.cumulativeWeight=currentWeight}accumulateAdditive(weight){const buffer=this.buffer,stride=this.valueSize,offset=stride*this._addIndex;if(this.cumulativeWeightAdditive===0){this._setIdentity()}this._mixBufferRegionAdditive(buffer,offset,0,weight,stride);this.cumulativeWeightAdditive+=weight}apply(accuIndex){const stride=this.valueSize,buffer=this.buffer,offset=accuIndex*stride+stride,weight=this.cumulativeWeight,weightAdditive=this.cumulativeWeightAdditive,binding=this.binding;this.cumulativeWeight=0;this.cumulativeWeightAdditive=0;if(weight<1){const originalValueOffset=stride*this._origIndex;this._mixBufferRegion(buffer,offset,originalValueOffset,1-weight,stride)}if(weightAdditive>0){this._mixBufferRegionAdditive(buffer,offset,this._addIndex*stride,1,stride)}for(let i=stride,e=stride+stride;i!==e;++i){if(buffer[i]!==buffer[i+stride]){binding.setValue(buffer,offset);break}}}saveOriginalState(){const binding=this.binding;const buffer=this.buffer,stride=this.valueSize,originalValueOffset=stride*this._origIndex;binding.getValue(buffer,originalValueOffset);for(let i=stride,e=originalValueOffset;i!==e;++i){buffer[i]=buffer[originalValueOffset+i%stride]}this._setIdentity();this.cumulativeWeight=0;this.cumulativeWeightAdditive=0}restoreOriginalState(){const originalValueOffset=this.valueSize*3;this.binding.setValue(this.buffer,originalValueOffset)}_setAdditiveIdentityNumeric(){const startIndex=this._addIndex*this.valueSize;const endIndex=startIndex+this.valueSize;for(let i=startIndex;i<endIndex;i++){this.buffer[i]=0}}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric();this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const startIndex=this._origIndex*this.valueSize;const targetIndex=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++){this.buffer[targetIndex+i]=this.buffer[startIndex+i]}}_select(buffer,dstOffset,srcOffset,t,stride){if(t>=0.5){for(let i=0;i!==stride;++i){buffer[dstOffset+i]=buffer[srcOffset+i]}}}_slerp(buffer,dstOffset,srcOffset,t){Quaternion.slerpFlat(buffer,dstOffset,buffer,dstOffset,buffer,srcOffset,t)}_slerpAdditive(buffer,dstOffset,srcOffset,t,stride){const workOffset=this._workIndex*stride;Quaternion.multiplyQuaternionsFlat(buffer,workOffset,buffer,dstOffset,buffer,srcOffset);Quaternion.slerpFlat(buffer,dstOffset,buffer,dstOffset,buffer,workOffset,t)}_lerp(buffer,dstOffset,srcOffset,t,stride){const s=1-t;for(let i=0;i!==stride;++i){const j=dstOffset+i;buffer[j]=buffer[j]*s+buffer[srcOffset+i]*t}}_lerpAdditive(buffer,dstOffset,srcOffset,t,stride){for(let i=0;i!==stride;++i){const j=dstOffset+i;buffer[j]=buffer[j]+buffer[srcOffset+i]*t}}}const _RESERVED_CHARS_RE="\\[\\]\\.:\\/";const _reservedRe=new RegExp("["+_RESERVED_CHARS_RE+"]","g");const _wordChar="[^"+_RESERVED_CHARS_RE+"]";const _wordCharOrDot="[^"+_RESERVED_CHARS_RE.replace("\\.","")+"]";const _directoryRe=/((?:WC+[\/:])*)/.source.replace("WC",_wordChar);const _nodeRe=/(WCOD+)?/.source.replace("WCOD",_wordCharOrDot);const _objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",_wordChar);const _propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",_wordChar);const _trackRe=new RegExp(""+"^"+_directoryRe+_nodeRe+_objectRe+_propertyRe+"$");const _supportedObjectNames=["material","materials","bones","map"];class Composite{constructor(targetGroup,path,optionalParsedPath){const parsedPath=optionalParsedPath||PropertyBinding.parseTrackName(path);this._targetGroup=targetGroup;this._bindings=targetGroup.subscribe_(path,parsedPath)}getValue(array,offset){this.bind();const firstValidIndex=this._targetGroup.nCachedObjects_,binding=this._bindings[firstValidIndex];if(binding!==undefined)binding.getValue(array,offset)}setValue(array,offset){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].setValue(array,offset)}}bind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].bind()}}unbind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].unbind()}}}class PropertyBinding{constructor(rootNode,path,parsedPath){this.path=path;this.parsedPath=parsedPath||PropertyBinding.parseTrackName(path);this.node=PropertyBinding.findNode(rootNode,this.parsedPath.nodeName);this.rootNode=rootNode;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}static create(root,path,parsedPath){if(!(root&&root.isAnimationObjectGroup)){return new PropertyBinding(root,path,parsedPath)}else{return new PropertyBinding.Composite(root,path,parsedPath)}}static sanitizeNodeName(name){return name.replace(/\s/g,"_").replace(_reservedRe,"")}static parseTrackName(trackName){const matches=_trackRe.exec(trackName);if(matches===null){throw new Error("PropertyBinding: Cannot parse trackName: "+trackName)}const results={nodeName:matches[2],objectName:matches[3],objectIndex:matches[4],propertyName:matches[5],propertyIndex:matches[6]};const lastDot=results.nodeName&&results.nodeName.lastIndexOf(".");if(lastDot!==undefined&&lastDot!==-1){const objectName=results.nodeName.substring(lastDot+1);if(_supportedObjectNames.indexOf(objectName)!==-1){results.nodeName=results.nodeName.substring(0,lastDot);results.objectName=objectName}}if(results.propertyName===null||results.propertyName.length===0){throw new Error("PropertyBinding: can not parse propertyName from trackName: "+trackName)}return results}static findNode(root,nodeName){if(nodeName===undefined||nodeName===""||nodeName==="."||nodeName===-1||nodeName===root.name||nodeName===root.uuid){return root}if(root.skeleton){const bone=root.skeleton.getBoneByName(nodeName);if(bone!==undefined){return bone}}if(root.children){const searchNodeSubtree=function(children){for(let i=0;i<children.length;i++){const childNode=children[i];if(childNode.name===nodeName||childNode.uuid===nodeName){return childNode}const result=searchNodeSubtree(childNode.children);if(result)return result}return null};const subTreeNode=searchNodeSubtree(root.children);if(subTreeNode){return subTreeNode}}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(buffer,offset){buffer[offset]=this.targetObject[this.propertyName]}_getValue_array(buffer,offset){const source=this.resolvedProperty;for(let i=0,n=source.length;i!==n;++i){buffer[offset++]=source[i]}}_getValue_arrayElement(buffer,offset){buffer[offset]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(buffer,offset){this.resolvedProperty.toArray(buffer,offset)}_setValue_direct(buffer,offset){this.targetObject[this.propertyName]=buffer[offset]}_setValue_direct_setNeedsUpdate(buffer,offset){this.targetObject[this.propertyName]=buffer[offset];this.targetObject.needsUpdate=true}_setValue_direct_setMatrixWorldNeedsUpdate(buffer,offset){this.targetObject[this.propertyName]=buffer[offset];this.targetObject.matrixWorldNeedsUpdate=true}_setValue_array(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}}_setValue_array_setNeedsUpdate(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}this.targetObject.needsUpdate=true}_setValue_array_setMatrixWorldNeedsUpdate(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}this.targetObject.matrixWorldNeedsUpdate=true}_setValue_arrayElement(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset]}_setValue_arrayElement_setNeedsUpdate(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset];this.targetObject.needsUpdate=true}_setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset];this.targetObject.matrixWorldNeedsUpdate=true}_setValue_fromArray(buffer,offset){this.resolvedProperty.fromArray(buffer,offset)}_setValue_fromArray_setNeedsUpdate(buffer,offset){this.resolvedProperty.fromArray(buffer,offset);this.targetObject.needsUpdate=true}_setValue_fromArray_setMatrixWorldNeedsUpdate(buffer,offset){this.resolvedProperty.fromArray(buffer,offset);this.targetObject.matrixWorldNeedsUpdate=true}_getValue_unbound(targetArray,offset){this.bind();this.getValue(targetArray,offset)}_setValue_unbound(sourceArray,offset){this.bind();this.setValue(sourceArray,offset)}bind(){let targetObject=this.node;const parsedPath=this.parsedPath;const objectName=parsedPath.objectName;const propertyName=parsedPath.propertyName;let propertyIndex=parsedPath.propertyIndex;if(!targetObject){targetObject=PropertyBinding.findNode(this.rootNode,parsedPath.nodeName);this.node=targetObject}this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(!targetObject){warn("PropertyBinding: No target node found for track: "+this.path+".");return}if(objectName){let objectIndex=parsedPath.objectIndex;switch(objectName){case"materials":if(!targetObject.material){error("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.materials){error("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}targetObject=targetObject.material.materials;break;case"bones":if(!targetObject.skeleton){error("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}targetObject=targetObject.skeleton.bones;for(let i=0;i<targetObject.length;i++){if(targetObject[i].name===objectIndex){objectIndex=i;break}}break;case"map":if("map"in targetObject){targetObject=targetObject.map;break}if(!targetObject.material){error("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.map){error("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}targetObject=targetObject.material.map;break;default:if(targetObject[objectName]===undefined){error("PropertyBinding: Can not bind to objectName of node undefined.",this);return}targetObject=targetObject[objectName];}if(objectIndex!==undefined){if(targetObject[objectIndex]===undefined){error("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,targetObject);return}targetObject=targetObject[objectIndex]}}const nodeProperty=targetObject[propertyName];if(nodeProperty===undefined){const nodeName=parsedPath.nodeName;error("PropertyBinding: Trying to update property for track: "+nodeName+"."+propertyName+" but it wasn't found.",targetObject);return}let versioning=this.Versioning.None;this.targetObject=targetObject;if(targetObject.isMaterial===true){versioning=this.Versioning.NeedsUpdate}else if(targetObject.isObject3D===true){versioning=this.Versioning.MatrixWorldNeedsUpdate}let bindingType=this.BindingType.Direct;if(propertyIndex!==undefined){if(propertyName==="morphTargetInfluences"){if(!targetObject.geometry){error("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!targetObject.geometry.morphAttributes){error("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}if(targetObject.morphTargetDictionary[propertyIndex]!==undefined){propertyIndex=targetObject.morphTargetDictionary[propertyIndex]}}bindingType=this.BindingType.ArrayElement;this.resolvedProperty=nodeProperty;this.propertyIndex=propertyIndex}else if(nodeProperty.fromArray!==undefined&&nodeProperty.toArray!==undefined){bindingType=this.BindingType.HasFromToArray;this.resolvedProperty=nodeProperty}else if(Array.isArray(nodeProperty)){bindingType=this.BindingType.EntireArray;this.resolvedProperty=nodeProperty}else{this.propertyName=propertyName}this.getValue=this.GetterByBindingType[bindingType];this.setValue=this.SetterByBindingTypeAndVersioning[bindingType][versioning]}unbind(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}}PropertyBinding.Composite=Composite;PropertyBinding.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};PropertyBinding.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};PropertyBinding.prototype.GetterByBindingType=[PropertyBinding.prototype._getValue_direct,PropertyBinding.prototype._getValue_array,PropertyBinding.prototype._getValue_arrayElement,PropertyBinding.prototype._getValue_toArray];PropertyBinding.prototype.SetterByBindingTypeAndVersioning=[[PropertyBinding.prototype._setValue_direct,PropertyBinding.prototype._setValue_direct_setNeedsUpdate,PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_array,PropertyBinding.prototype._setValue_array_setNeedsUpdate,PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_arrayElement,PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_fromArray,PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class AnimationObjectGroup{constructor(){this.isAnimationObjectGroup=true;this.uuid=generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;const indices={};this._indicesByUUID=indices;for(let i=0,n=arguments.length;i!==n;++i){indices[arguments[i].uuid]=i}this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};const scope=this;this.stats={objects:{get total(){return scope._objects.length},get inUse(){return this.total-scope.nCachedObjects_}},get bindingsPerObject(){return scope._bindings.length}}}add(){const objects=this._objects,indicesByUUID=this._indicesByUUID,paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,nBindings=bindings.length;let knownObject=undefined,nObjects=objects.length,nCachedObjects=this.nCachedObjects_;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid;let index=indicesByUUID[uuid];if(index===undefined){index=nObjects++;indicesByUUID[uuid]=index;objects.push(object);for(let j=0,m=nBindings;j!==m;++j){bindings[j].push(new PropertyBinding(object,paths[j],parsedPaths[j]))}}else if(index<nCachedObjects){knownObject=objects[index];const firstActiveIndex=--nCachedObjects,lastCachedObject=objects[firstActiveIndex];indicesByUUID[lastCachedObject.uuid]=index;objects[index]=lastCachedObject;indicesByUUID[uuid]=firstActiveIndex;objects[firstActiveIndex]=object;for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],lastCached=bindingsForPath[firstActiveIndex];let binding=bindingsForPath[index];bindingsForPath[index]=lastCached;if(binding===undefined){binding=new PropertyBinding(object,paths[j],parsedPaths[j])}bindingsForPath[firstActiveIndex]=binding}}else if(objects[index]!==knownObject){error("AnimationObjectGroup: Different objects with the same UUID "+"detected. Clean the caches or recreate your infrastructure when reloading scenes.")}}this.nCachedObjects_=nCachedObjects}remove(){const objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length;let nCachedObjects=this.nCachedObjects_;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid,index=indicesByUUID[uuid];if(index!==undefined&&index>=nCachedObjects){const lastCachedIndex=nCachedObjects++,firstActiveObject=objects[lastCachedIndex];indicesByUUID[firstActiveObject.uuid]=index;objects[index]=firstActiveObject;indicesByUUID[uuid]=lastCachedIndex;objects[lastCachedIndex]=object;for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],firstActive=bindingsForPath[lastCachedIndex],binding=bindingsForPath[index];bindingsForPath[index]=firstActive;bindingsForPath[lastCachedIndex]=binding}}}this.nCachedObjects_=nCachedObjects}uncache(){const objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length;let nCachedObjects=this.nCachedObjects_,nObjects=objects.length;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid,index=indicesByUUID[uuid];if(index!==undefined){delete indicesByUUID[uuid];if(index<nCachedObjects){const firstActiveIndex=--nCachedObjects,lastCachedObject=objects[firstActiveIndex],lastIndex=--nObjects,lastObject=objects[lastIndex];indicesByUUID[lastCachedObject.uuid]=index;objects[index]=lastCachedObject;indicesByUUID[lastObject.uuid]=firstActiveIndex;objects[firstActiveIndex]=lastObject;objects.pop();for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],lastCached=bindingsForPath[firstActiveIndex],last=bindingsForPath[lastIndex];bindingsForPath[index]=lastCached;bindingsForPath[firstActiveIndex]=last;bindingsForPath.pop()}}else{const lastIndex=--nObjects,lastObject=objects[lastIndex];if(lastIndex>0){indicesByUUID[lastObject.uuid]=index}objects[index]=lastObject;objects.pop();for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j];bindingsForPath[index]=bindingsForPath[lastIndex];bindingsForPath.pop()}}}}this.nCachedObjects_=nCachedObjects}subscribe_(path,parsedPath){const indicesByPath=this._bindingsIndicesByPath;let index=indicesByPath[path];const bindings=this._bindings;if(index!==undefined)return bindings[index];const paths=this._paths,parsedPaths=this._parsedPaths,objects=this._objects,nObjects=objects.length,nCachedObjects=this.nCachedObjects_,bindingsForPath=new Array(nObjects);index=bindings.length;indicesByPath[path]=index;paths.push(path);parsedPaths.push(parsedPath);bindings.push(bindingsForPath);for(let i=nCachedObjects,n=objects.length;i!==n;++i){const object=objects[i];bindingsForPath[i]=new PropertyBinding(object,path,parsedPath)}return bindingsForPath}unsubscribe_(path){const indicesByPath=this._bindingsIndicesByPath,index=indicesByPath[path];if(index!==undefined){const paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,lastBindingsIndex=bindings.length-1,lastBindings=bindings[lastBindingsIndex],lastBindingsPath=path[lastBindingsIndex];indicesByPath[lastBindingsPath]=index;bindings[index]=lastBindings;bindings.pop();parsedPaths[index]=parsedPaths[lastBindingsIndex];parsedPaths.pop();paths[index]=paths[lastBindingsIndex];paths.pop()}}}class AnimationAction{constructor(mixer,clip,localRoot=null,blendMode=clip.blendMode){this._mixer=mixer;this._clip=clip;this._localRoot=localRoot;this.blendMode=blendMode;const tracks=clip.tracks,nTracks=tracks.length,interpolants=new Array(nTracks);const interpolantSettings={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let i=0;i!==nTracks;++i){const interpolant=tracks[i].createInterpolant(null);interpolants[i]=interpolant;interpolant.settings=interpolantSettings}this._interpolantSettings=interpolantSettings;this._interpolants=interpolants;this._propertyBindings=new Array(nTracks);this._cacheIndex=null;this._byClipCacheIndex=null;this._timeScaleInterpolant=null;this._weightInterpolant=null;this.loop=LoopRepeat;this._loopCount=-1;this._startTime=null;this.time=0;this.timeScale=1;this._effectiveTimeScale=1;this.weight=1;this._effectiveWeight=1;this.repetitions=Infinity;this.paused=false;this.enabled=true;this.clampWhenFinished=false;this.zeroSlopeAtStart=true;this.zeroSlopeAtEnd=true}play(){this._mixer._activateAction(this);return this}stop(){this._mixer._deactivateAction(this);return this.reset()}reset(){this.paused=false;this.enabled=true;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(time){this._startTime=time;return this}setLoop(mode,repetitions){this.loop=mode;this.repetitions=repetitions;return this}setEffectiveWeight(weight){this.weight=weight;this._effectiveWeight=this.enabled?weight:0;return this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(duration){return this._scheduleFading(duration,0,1)}fadeOut(duration){return this._scheduleFading(duration,1,0)}crossFadeFrom(fadeOutAction,duration,warp=false){fadeOutAction.fadeOut(duration);this.fadeIn(duration);if(warp===true){const fadeInDuration=this._clip.duration,fadeOutDuration=fadeOutAction._clip.duration,startEndRatio=fadeOutDuration/fadeInDuration,endStartRatio=fadeInDuration/fadeOutDuration;fadeOutAction.warp(1,startEndRatio,duration);this.warp(endStartRatio,1,duration)}return this}crossFadeTo(fadeInAction,duration,warp=false){return fadeInAction.crossFadeFrom(this,duration,warp)}stopFading(){const weightInterpolant=this._weightInterpolant;if(weightInterpolant!==null){this._weightInterpolant=null;this._mixer._takeBackControlInterpolant(weightInterpolant)}return this}setEffectiveTimeScale(timeScale){this.timeScale=timeScale;this._effectiveTimeScale=this.paused?0:timeScale;return this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(duration){this.timeScale=this._clip.duration/duration;return this.stopWarping()}syncWith(action){this.time=action.time;this.timeScale=action.timeScale;return this.stopWarping()}halt(duration){return this.warp(this._effectiveTimeScale,0,duration)}warp(startTimeScale,endTimeScale,duration){const mixer=this._mixer,now=mixer.time,timeScale=this.timeScale;let interpolant=this._timeScaleInterpolant;if(interpolant===null){interpolant=mixer._lendControlInterpolant();this._timeScaleInterpolant=interpolant}const times=interpolant.parameterPositions,values=interpolant.sampleValues;times[0]=now;times[1]=now+duration;values[0]=startTimeScale/timeScale;values[1]=endTimeScale/timeScale;return this}stopWarping(){const timeScaleInterpolant=this._timeScaleInterpolant;if(timeScaleInterpolant!==null){this._timeScaleInterpolant=null;this._mixer._takeBackControlInterpolant(timeScaleInterpolant)}return this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(time,deltaTime,timeDirection,accuIndex){if(!this.enabled){this._updateWeight(time);return}const startTime=this._startTime;if(startTime!==null){const timeRunning=(time-startTime)*timeDirection;if(timeRunning<0||timeDirection===0){deltaTime=0}else{this._startTime=null;deltaTime=timeDirection*timeRunning}}deltaTime*=this._updateTimeScale(time);const clipTime=this._updateTime(deltaTime);const weight=this._updateWeight(time);if(weight>0){const interpolants=this._interpolants;const propertyMixers=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let j=0,m=interpolants.length;j!==m;++j){interpolants[j].evaluate(clipTime);propertyMixers[j].accumulateAdditive(weight)}break;case NormalAnimationBlendMode:default:for(let j=0,m=interpolants.length;j!==m;++j){interpolants[j].evaluate(clipTime);propertyMixers[j].accumulate(accuIndex,weight)}}}}_updateWeight(time){let weight=0;if(this.enabled){weight=this.weight;const interpolant=this._weightInterpolant;if(interpolant!==null){const interpolantValue=interpolant.evaluate(time)[0];weight*=interpolantValue;if(time>interpolant.parameterPositions[1]){this.stopFading();if(interpolantValue===0){this.enabled=false}}}}this._effectiveWeight=weight;return weight}_updateTimeScale(time){let timeScale=0;if(!this.paused){timeScale=this.timeScale;const interpolant=this._timeScaleInterpolant;if(interpolant!==null){const interpolantValue=interpolant.evaluate(time)[0];timeScale*=interpolantValue;if(time>interpolant.parameterPositions[1]){this.stopWarping();if(timeScale===0){this.paused=true}else{this.timeScale=timeScale}}}}this._effectiveTimeScale=timeScale;return timeScale}_updateTime(deltaTime){const duration=this._clip.duration;const loop=this.loop;let time=this.time+deltaTime;let loopCount=this._loopCount;const pingPong=loop===LoopPingPong;if(deltaTime===0){if(loopCount===-1)return time;return pingPong&&(loopCount&1)===1?duration-time:time}if(loop===LoopOnce){if(loopCount===-1){this._loopCount=0;this._setEndings(true,true,false)}handle_stop:{if(time>=duration){time=duration}else if(time<0){time=0}else{this.time=time;break handle_stop}if(this.clampWhenFinished)this.paused=true;else this.enabled=false;this.time=time;this._mixer.dispatchEvent({type:"finished",action:this,direction:deltaTime<0?-1:1})}}else{if(loopCount===-1){if(deltaTime>=0){loopCount=0;this._setEndings(true,this.repetitions===0,pingPong)}else{this._setEndings(this.repetitions===0,true,pingPong)}}if(time>=duration||time<0){const loopDelta=Math.floor(time/duration);time-=duration*loopDelta;loopCount+=Math.abs(loopDelta);const pending=this.repetitions-loopCount;if(pending<=0){if(this.clampWhenFinished)this.paused=true;else this.enabled=false;time=deltaTime>0?duration:0;this.time=time;this._mixer.dispatchEvent({type:"finished",action:this,direction:deltaTime>0?1:-1})}else{if(pending===1){const atStart=deltaTime<0;this._setEndings(atStart,!atStart,pingPong)}else{this._setEndings(false,false,pingPong)}this._loopCount=loopCount;this.time=time;this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:loopDelta})}}else{this.time=time}if(pingPong&&(loopCount&1)===1){return duration-time}}return time}_setEndings(atStart,atEnd,pingPong){const settings=this._interpolantSettings;if(pingPong){settings.endingStart=ZeroSlopeEnding;settings.endingEnd=ZeroSlopeEnding}else{if(atStart){settings.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding}else{settings.endingStart=WrapAroundEnding}if(atEnd){settings.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding}else{settings.endingEnd=WrapAroundEnding}}}_scheduleFading(duration,weightNow,weightThen){const mixer=this._mixer,now=mixer.time;let interpolant=this._weightInterpolant;if(interpolant===null){interpolant=mixer._lendControlInterpolant();this._weightInterpolant=interpolant}const times=interpolant.parameterPositions,values=interpolant.sampleValues;times[0]=now;values[0]=weightNow;times[1]=now+duration;values[1]=weightThen;return this}}const _controlInterpolantsResultBuffer=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(root){super();this._root=root;this._initMemoryManager();this._accuIndex=0;this.time=0;this.timeScale=1}_bindAction(action,prototypeAction){const root=action._localRoot||this._root,tracks=action._clip.tracks,nTracks=tracks.length,bindings=action._propertyBindings,interpolants=action._interpolants,rootUuid=root.uuid,bindingsByRoot=this._bindingsByRootAndName;let bindingsByName=bindingsByRoot[rootUuid];if(bindingsByName===undefined){bindingsByName={};bindingsByRoot[rootUuid]=bindingsByName}for(let i=0;i!==nTracks;++i){const track=tracks[i],trackName=track.name;let binding=bindingsByName[trackName];if(binding!==undefined){++binding.referenceCount;bindings[i]=binding}else{binding=bindings[i];if(binding!==undefined){if(binding._cacheIndex===null){++binding.referenceCount;this._addInactiveBinding(binding,rootUuid,trackName)}continue}const path=prototypeAction&&prototypeAction._propertyBindings[i].binding.parsedPath;binding=new PropertyMixer(PropertyBinding.create(root,trackName,path),track.ValueTypeName,track.getValueSize());++binding.referenceCount;this._addInactiveBinding(binding,rootUuid,trackName);bindings[i]=binding}interpolants[i].resultBuffer=binding.buffer}}_activateAction(action){if(!this._isActiveAction(action)){if(action._cacheIndex===null){const rootUuid=(action._localRoot||this._root).uuid,clipUuid=action._clip.uuid,actionsForClip=this._actionsByClip[clipUuid];this._bindAction(action,actionsForClip&&actionsForClip.knownActions[0]);this._addInactiveAction(action,clipUuid,rootUuid)}const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(binding.useCount++===0){this._lendBinding(binding);binding.saveOriginalState()}}this._lendAction(action)}}_deactivateAction(action){if(this._isActiveAction(action)){const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(--binding.useCount===0){binding.restoreOriginalState();this._takeBackBinding(binding)}}this._takeBackAction(action)}}_initMemoryManager(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;const scope=this;this.stats={actions:{get total(){return scope._actions.length},get inUse(){return scope._nActiveActions}},bindings:{get total(){return scope._bindings.length},get inUse(){return scope._nActiveBindings}},controlInterpolants:{get total(){return scope._controlInterpolants.length},get inUse(){return scope._nActiveControlInterpolants}}}}_isActiveAction(action){const index=action._cacheIndex;return index!==null&&index<this._nActiveActions}_addInactiveAction(action,clipUuid,rootUuid){const actions=this._actions,actionsByClip=this._actionsByClip;let actionsForClip=actionsByClip[clipUuid];if(actionsForClip===undefined){actionsForClip={knownActions:[action],actionByRoot:{}};action._byClipCacheIndex=0;actionsByClip[clipUuid]=actionsForClip}else{const knownActions=actionsForClip.knownActions;action._byClipCacheIndex=knownActions.length;knownActions.push(action)}action._cacheIndex=actions.length;actions.push(action);actionsForClip.actionByRoot[rootUuid]=action}_removeInactiveAction(action){const actions=this._actions,lastInactiveAction=actions[actions.length-1],cacheIndex=action._cacheIndex;lastInactiveAction._cacheIndex=cacheIndex;actions[cacheIndex]=lastInactiveAction;actions.pop();action._cacheIndex=null;const clipUuid=action._clip.uuid,actionsByClip=this._actionsByClip,actionsForClip=actionsByClip[clipUuid],knownActionsForClip=actionsForClip.knownActions,lastKnownAction=knownActionsForClip[knownActionsForClip.length-1],byClipCacheIndex=action._byClipCacheIndex;lastKnownAction._byClipCacheIndex=byClipCacheIndex;knownActionsForClip[byClipCacheIndex]=lastKnownAction;knownActionsForClip.pop();action._byClipCacheIndex=null;const actionByRoot=actionsForClip.actionByRoot,rootUuid=(action._localRoot||this._root).uuid;delete actionByRoot[rootUuid];if(knownActionsForClip.length===0){delete actionsByClip[clipUuid]}this._removeInactiveBindingsForAction(action)}_removeInactiveBindingsForAction(action){const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(--binding.referenceCount===0){this._removeInactiveBinding(binding)}}}_lendAction(action){const actions=this._actions,prevIndex=action._cacheIndex,lastActiveIndex=this._nActiveActions++,firstInactiveAction=actions[lastActiveIndex];action._cacheIndex=lastActiveIndex;actions[lastActiveIndex]=action;firstInactiveAction._cacheIndex=prevIndex;actions[prevIndex]=firstInactiveAction}_takeBackAction(action){const actions=this._actions,prevIndex=action._cacheIndex,firstInactiveIndex=--this._nActiveActions,lastActiveAction=actions[firstInactiveIndex];action._cacheIndex=firstInactiveIndex;actions[firstInactiveIndex]=action;lastActiveAction._cacheIndex=prevIndex;actions[prevIndex]=lastActiveAction}_addInactiveBinding(binding,rootUuid,trackName){const bindingsByRoot=this._bindingsByRootAndName,bindings=this._bindings;let bindingByName=bindingsByRoot[rootUuid];if(bindingByName===undefined){bindingByName={};bindingsByRoot[rootUuid]=bindingByName}bindingByName[trackName]=binding;binding._cacheIndex=bindings.length;bindings.push(binding)}_removeInactiveBinding(binding){const bindings=this._bindings,propBinding=binding.binding,rootUuid=propBinding.rootNode.uuid,trackName=propBinding.path,bindingsByRoot=this._bindingsByRootAndName,bindingByName=bindingsByRoot[rootUuid],lastInactiveBinding=bindings[bindings.length-1],cacheIndex=binding._cacheIndex;lastInactiveBinding._cacheIndex=cacheIndex;bindings[cacheIndex]=lastInactiveBinding;bindings.pop();delete bindingByName[trackName];if(Object.keys(bindingByName).length===0){delete bindingsByRoot[rootUuid]}}_lendBinding(binding){const bindings=this._bindings,prevIndex=binding._cacheIndex,lastActiveIndex=this._nActiveBindings++,firstInactiveBinding=bindings[lastActiveIndex];binding._cacheIndex=lastActiveIndex;bindings[lastActiveIndex]=binding;firstInactiveBinding._cacheIndex=prevIndex;bindings[prevIndex]=firstInactiveBinding}_takeBackBinding(binding){const bindings=this._bindings,prevIndex=binding._cacheIndex,firstInactiveIndex=--this._nActiveBindings,lastActiveBinding=bindings[firstInactiveIndex];binding._cacheIndex=firstInactiveIndex;bindings[firstInactiveIndex]=binding;lastActiveBinding._cacheIndex=prevIndex;bindings[prevIndex]=lastActiveBinding}_lendControlInterpolant(){const interpolants=this._controlInterpolants,lastActiveIndex=this._nActiveControlInterpolants++;let interpolant=interpolants[lastActiveIndex];if(interpolant===undefined){interpolant=new LinearInterpolant(new Float32Array(2),new Float32Array(2),1,_controlInterpolantsResultBuffer);interpolant.__cacheIndex=lastActiveIndex;interpolants[lastActiveIndex]=interpolant}return interpolant}_takeBackControlInterpolant(interpolant){const interpolants=this._controlInterpolants,prevIndex=interpolant.__cacheIndex,firstInactiveIndex=--this._nActiveControlInterpolants,lastActiveInterpolant=interpolants[firstInactiveIndex];interpolant.__cacheIndex=firstInactiveIndex;interpolants[firstInactiveIndex]=interpolant;lastActiveInterpolant.__cacheIndex=prevIndex;interpolants[prevIndex]=lastActiveInterpolant}clipAction(clip,optionalRoot,blendMode){const root=optionalRoot||this._root,rootUuid=root.uuid;let clipObject=typeof clip==="string"?AnimationClip.findByName(root,clip):clip;const clipUuid=clipObject!==null?clipObject.uuid:clip;const actionsForClip=this._actionsByClip[clipUuid];let prototypeAction=null;if(blendMode===undefined){if(clipObject!==null){blendMode=clipObject.blendMode}else{blendMode=NormalAnimationBlendMode}}if(actionsForClip!==undefined){const existingAction=actionsForClip.actionByRoot[rootUuid];if(existingAction!==undefined&&existingAction.blendMode===blendMode){return existingAction}prototypeAction=actionsForClip.knownActions[0];if(clipObject===null)clipObject=prototypeAction._clip}if(clipObject===null)return null;const newAction=new AnimationAction(this,clipObject,optionalRoot,blendMode);this._bindAction(newAction,prototypeAction);this._addInactiveAction(newAction,clipUuid,rootUuid);return newAction}existingAction(clip,optionalRoot){const root=optionalRoot||this._root,rootUuid=root.uuid,clipObject=typeof clip==="string"?AnimationClip.findByName(root,clip):clip,clipUuid=clipObject?clipObject.uuid:clip,actionsForClip=this._actionsByClip[clipUuid];if(actionsForClip!==undefined){return actionsForClip.actionByRoot[rootUuid]||null}return null}stopAllAction(){const actions=this._actions,nActions=this._nActiveActions;for(let i=nActions-1;i>=0;--i){actions[i].stop()}return this}update(deltaTime){deltaTime*=this.timeScale;const actions=this._actions,nActions=this._nActiveActions,time=this.time+=deltaTime,timeDirection=Math.sign(deltaTime),accuIndex=this._accuIndex^=1;for(let i=0;i!==nActions;++i){const action=actions[i];action._update(time,deltaTime,timeDirection,accuIndex)}const bindings=this._bindings,nBindings=this._nActiveBindings;for(let i=0;i!==nBindings;++i){bindings[i].apply(accuIndex)}return this}setTime(time){this.time=0;for(let i=0;i<this._actions.length;i++){this._actions[i].time=0}return this.update(time)}getRoot(){return this._root}uncacheClip(clip){const actions=this._actions,clipUuid=clip.uuid,actionsByClip=this._actionsByClip,actionsForClip=actionsByClip[clipUuid];if(actionsForClip!==undefined){const actionsToRemove=actionsForClip.knownActions;for(let i=0,n=actionsToRemove.length;i!==n;++i){const action=actionsToRemove[i];this._deactivateAction(action);const cacheIndex=action._cacheIndex,lastInactiveAction=actions[actions.length-1];action._cacheIndex=null;action._byClipCacheIndex=null;lastInactiveAction._cacheIndex=cacheIndex;actions[cacheIndex]=lastInactiveAction;actions.pop();this._removeInactiveBindingsForAction(action)}delete actionsByClip[clipUuid]}}uncacheRoot(root){const rootUuid=root.uuid,actionsByClip=this._actionsByClip;for(const clipUuid in actionsByClip){const actionByRoot=actionsByClip[clipUuid].actionByRoot,action=actionByRoot[rootUuid];if(action!==undefined){this._deactivateAction(action);this._removeInactiveAction(action)}}const bindingsByRoot=this._bindingsByRootAndName,bindingByName=bindingsByRoot[rootUuid];if(bindingByName!==undefined){for(const trackName in bindingByName){const binding=bindingByName[trackName];binding.restoreOriginalState();this._removeInactiveBinding(binding)}}}uncacheAction(clip,optionalRoot){const action=this.existingAction(clip,optionalRoot);if(action!==null){this._deactivateAction(action);this._removeInactiveAction(action)}}}class RenderTarget3D extends RenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isRenderTarget3D=true;this.depth=depth;this.texture=new Data3DTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Uniform{constructor(value){this.value=value}clone(){return new Uniform(this.value.clone===undefined?this.value:this.value.clone())}}let _id$1=0;class UniformsGroup extends EventDispatcher{constructor(){super();this.isUniformsGroup=true;Object.defineProperty(this,"id",{value:_id$1++});this.name="";this.usage=StaticDrawUsage;this.uniforms=[]}add(uniform){this.uniforms.push(uniform);return this}remove(uniform){const index=this.uniforms.indexOf(uniform);if(index!==-1)this.uniforms.splice(index,1);return this}setName(name){this.name=name;return this}setUsage(value){this.usage=value;return this}dispose(){this.dispatchEvent({type:"dispose"})}copy(source){this.name=source.name;this.usage=source.usage;const uniformsSource=source.uniforms;this.uniforms.length=0;for(let i=0,l=uniformsSource.length;i<l;i++){const uniforms=Array.isArray(uniformsSource[i])?uniformsSource[i]:[uniformsSource[i]];for(let j=0;j<uniforms.length;j++){this.uniforms.push(uniforms[j].clone())}}return this}clone(){return new this.constructor().copy(this)}}class InstancedInterleavedBuffer extends InterleavedBuffer{constructor(array,stride,meshPerAttribute=1){super(array,stride);this.isInstancedInterleavedBuffer=true;this.meshPerAttribute=meshPerAttribute}copy(source){super.copy(source);this.meshPerAttribute=source.meshPerAttribute;return this}clone(data){const ib=super.clone(data);ib.meshPerAttribute=this.meshPerAttribute;return ib}toJSON(data){const json=super.toJSON(data);json.isInstancedInterleavedBuffer=true;json.meshPerAttribute=this.meshPerAttribute;return json}}class GLBufferAttribute{constructor(buffer,type,itemSize,elementSize,count,normalized=false){this.isGLBufferAttribute=true;this.name="";this.buffer=buffer;this.type=type;this.itemSize=itemSize;this.elementSize=elementSize;this.count=count;this.normalized=normalized;this.version=0}set needsUpdate(value){if(value===true)this.version++}setBuffer(buffer){this.buffer=buffer;return this}setType(type,elementSize){this.type=type;this.elementSize=elementSize;return this}setItemSize(itemSize){this.itemSize=itemSize;return this}setCount(count){this.count=count;return this}}const _matrix=new Matrix4;class Raycaster{constructor(origin,direction,near=0,far=Infinity){this.ray=new Ray(origin,direction);this.near=near;this.far=far;this.camera=null;this.layers=new Layers;this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(origin,direction){this.ray.set(origin,direction)}setFromCamera(coords,camera){if(camera.isPerspectiveCamera){this.ray.origin.setFromMatrixPosition(camera.matrixWorld);this.ray.direction.set(coords.x,coords.y,0.5).unproject(camera).sub(this.ray.origin).normalize();this.camera=camera}else if(camera.isOrthographicCamera){this.ray.origin.set(coords.x,coords.y,(camera.near+camera.far)/(camera.near-camera.far)).unproject(camera);this.ray.direction.set(0,0,-1).transformDirection(camera.matrixWorld);this.camera=camera}else{error("Raycaster: Unsupported camera type: "+camera.type)}}setFromXRController(controller){_matrix.identity().extractRotation(controller.matrixWorld);this.ray.origin.setFromMatrixPosition(controller.matrixWorld);this.ray.direction.set(0,0,-1).applyMatrix4(_matrix);return this}intersectObject(object,recursive=true,intersects=[]){intersect(object,this,intersects,recursive);intersects.sort(ascSort);return intersects}intersectObjects(objects,recursive=true,intersects=[]){for(let i=0,l=objects.length;i<l;i++){intersect(objects[i],this,intersects,recursive)}intersects.sort(ascSort);return intersects}}function ascSort(a,b){return a.distance-b.distance}function intersect(object,raycaster,intersects,recursive){let propagate=true;if(object.layers.test(raycaster.layers)){const result=object.raycast(raycaster,intersects);if(result===false)propagate=false}if(propagate===true&&recursive===true){const children=object.children;for(let i=0,l=children.length;i<l;i++){intersect(children[i],raycaster,intersects,true)}}}class Timer{constructor(){this._previousTime=0;this._currentTime=0;this._startTime=performance.now();this._delta=0;this._elapsed=0;this._timescale=1;this._document=null;this._pageVisibilityHandler=null}connect(document){this._document=document;if(document.hidden!==undefined){this._pageVisibilityHandler=handleVisibilityChange.bind(this);document.addEventListener("visibilitychange",this._pageVisibilityHandler,false)}}disconnect(){if(this._pageVisibilityHandler!==null){this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler);this._pageVisibilityHandler=null}this._document=null}getDelta(){return this._delta/1000}getElapsed(){return this._elapsed/1000}getTimescale(){return this._timescale}setTimescale(timescale){this._timescale=timescale;return this}reset(){this._currentTime=performance.now()-this._startTime;return this}dispose(){this.disconnect()}update(timestamp){if(this._pageVisibilityHandler!==null&&this._document.hidden===true){this._delta=0}else{this._previousTime=this._currentTime;this._currentTime=(timestamp!==undefined?timestamp:performance.now())-this._startTime;this._delta=(this._currentTime-this._previousTime)*this._timescale;this._elapsed+=this._delta}return this}}function handleVisibilityChange(){if(this._document.hidden===false)this.reset()}class Spherical{constructor(radius=1,phi=0,theta=0){this.radius=radius;this.phi=phi;this.theta=theta}set(radius,phi,theta){this.radius=radius;this.phi=phi;this.theta=theta;return this}copy(other){this.radius=other.radius;this.phi=other.phi;this.theta=other.theta;return this}makeSafe(){const EPS=0.000001;this.phi=clamp(this.phi,EPS,Math.PI-EPS);return this}setFromVector3(v){return this.setFromCartesianCoords(v.x,v.y,v.z)}setFromCartesianCoords(x,y,z){this.radius=Math.sqrt(x*x+y*y+z*z);if(this.radius===0){this.theta=0;this.phi=0}else{this.theta=Math.atan2(x,z);this.phi=Math.acos(clamp(y/this.radius,-1,1))}return this}clone(){return new this.constructor().copy(this)}}class Cylindrical{constructor(radius=1,theta=0,y=0){this.radius=radius;this.theta=theta;this.y=y}set(radius,theta,y){this.radius=radius;this.theta=theta;this.y=y;return this}copy(other){this.radius=other.radius;this.theta=other.theta;this.y=other.y;return this}setFromVector3(v){return this.setFromCartesianCoords(v.x,v.y,v.z)}setFromCartesianCoords(x,y,z){this.radius=Math.sqrt(x*x+z*z);this.theta=Math.atan2(x,z);this.y=y;return this}clone(){return new this.constructor().copy(this)}}class Matrix2{constructor(n11,n12,n21,n22){Matrix2.prototype.isMatrix2=true;this.elements=[1,0,0,1];if(n11!==undefined){this.set(n11,n12,n21,n22)}}identity(){this.set(1,0,0,1);return this}fromArray(array,offset=0){for(let i=0;i<4;i++){this.elements[i]=array[i+offset]}return this}set(n11,n12,n21,n22){const te=this.elements;te[0]=n11;te[2]=n12;te[1]=n21;te[3]=n22;return this}}const _vector$4=new Vector2;class Box2{constructor(min=new Vector2(+Infinity,+Infinity),max=new Vector2(-Infinity,-Infinity)){this.isBox2=true;this.min=min;this.max=max}set(min,max){this.min.copy(min);this.max.copy(max);return this}setFromPoints(points){this.makeEmpty();for(let i=0,il=points.length;i<il;i++){this.expandByPoint(points[i])}return this}setFromCenterAndSize(center,size){const halfSize=_vector$4.copy(size).multiplyScalar(0.5);this.min.copy(center).sub(halfSize);this.max.copy(center).add(halfSize);return this}clone(){return new this.constructor().copy(this)}copy(box){this.min.copy(box.min);this.max.copy(box.max);return this}makeEmpty(){this.min.x=this.min.y=+Infinity;this.max.x=this.max.y=-Infinity;return this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(target){return this.isEmpty()?target.set(0,0):target.addVectors(this.min,this.max).multiplyScalar(0.5)}getSize(target){return this.isEmpty()?target.set(0,0):target.subVectors(this.max,this.min)}expandByPoint(point){this.min.min(point);this.max.max(point);return this}expandByVector(vector){this.min.sub(vector);this.max.add(vector);return this}expandByScalar(scalar){this.min.addScalar(-scalar);this.max.addScalar(scalar);return this}containsPoint(point){return point.x>=this.min.x&&point.x<=this.max.x&&point.y>=this.min.y&&point.y<=this.max.y}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y}getParameter(point,target){return target.set((point.x-this.min.x)/(this.max.x-this.min.x),(point.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y}clampPoint(point,target){return target.copy(point).clamp(this.min,this.max)}distanceToPoint(point){return this.clampPoint(point,_vector$4).distanceTo(point)}intersect(box){this.min.max(box.min);this.max.min(box.max);if(this.isEmpty())this.makeEmpty();return this}union(box){this.min.min(box.min);this.max.max(box.max);return this}translate(offset){this.min.add(offset);this.max.add(offset);return this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}}const _startP=new Vector3;const _startEnd=new Vector3;const _d1=new Vector3;const _d2=new Vector3;const _r=new Vector3;const _c1=new Vector3;const _c2=new Vector3;class Line3{constructor(start=new Vector3,end=new Vector3){this.start=start;this.end=end}set(start,end){this.start.copy(start);this.end.copy(end);return this}copy(line){this.start.copy(line.start);this.end.copy(line.end);return this}getCenter(target){return target.addVectors(this.start,this.end).multiplyScalar(0.5)}delta(target){return target.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,target){return this.delta(target).multiplyScalar(t).add(this.start)}closestPointToPointParameter(point,clampToLine){_startP.subVectors(point,this.start);_startEnd.subVectors(this.end,this.start);const startEnd2=_startEnd.dot(_startEnd);const startEnd_startP=_startEnd.dot(_startP);let t=startEnd_startP/startEnd2;if(clampToLine){t=clamp(t,0,1)}return t}closestPointToPoint(point,clampToLine,target){const t=this.closestPointToPointParameter(point,clampToLine);return this.delta(target).multiplyScalar(t).add(this.start)}distanceSqToLine3(line,c1=_c1,c2=_c2){const EPSILON=1e-8*1e-8;let s,t;const p1=this.start;const p2=line.start;const q1=this.end;const q2=line.end;_d1.subVectors(q1,p1);_d2.subVectors(q2,p2);_r.subVectors(p1,p2);const a=_d1.dot(_d1);const e=_d2.dot(_d2);const f=_d2.dot(_r);if(a<=EPSILON&&e<=EPSILON){c1.copy(p1);c2.copy(p2);c1.sub(c2);return c1.dot(c1)}if(a<=EPSILON){s=0;t=f/e;t=clamp(t,0,1)}else{const c=_d1.dot(_r);if(e<=EPSILON){t=0;s=clamp(-c/a,0,1)}else{const b=_d1.dot(_d2);const denom=a*e-b*b;if(denom!==0){s=clamp((b*f-c*e)/denom,0,1)}else{s=0}t=(b*s+f)/e;if(t<0){t=0;s=clamp(-c/a,0,1)}else if(t>1){t=1;s=clamp((b-c)/a,0,1)}}}c1.copy(p1).add(_d1.multiplyScalar(s));c2.copy(p2).add(_d2.multiplyScalar(t));c1.sub(c2);return c1.dot(c1)}applyMatrix4(matrix){this.start.applyMatrix4(matrix);this.end.applyMatrix4(matrix);return this}equals(line){return line.start.equals(this.start)&&line.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const _vector$3=new Vector3;class SpotLightHelper extends Object3D{constructor(light,color){super();this.light=light;this.matrixAutoUpdate=false;this.color=color;this.type="SpotLightHelper";const geometry=new BufferGeometry;const positions=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let i=0,j=1,l=32;i<l;i++,j++){const p1=i/l*Math.PI*2;const p2=j/l*Math.PI*2;positions.push(Math.cos(p1),Math.sin(p1),1,Math.cos(p2),Math.sin(p2),1)}geometry.setAttribute("position",new Float32BufferAttribute(positions,3));const material=new LineBasicMaterial({fog:false,toneMapped:false});this.cone=new LineSegments(geometry,material);this.add(this.cone);this.update()}dispose(){this.cone.geometry.dispose();this.cone.material.dispose()}update(){this.light.updateWorldMatrix(true,false);this.light.target.updateWorldMatrix(true,false);if(this.parent){this.parent.updateWorldMatrix(true);this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)}else{this.matrix.copy(this.light.matrixWorld)}this.matrixWorld.copy(this.light.matrixWorld);const coneLength=this.light.distance?this.light.distance:1000;const coneWidth=coneLength*Math.tan(this.light.angle);this.cone.scale.set(coneWidth,coneWidth,coneLength);_vector$3.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(_vector$3);if(this.color!==undefined){this.cone.material.color.set(this.color)}else{this.cone.material.color.copy(this.light.color)}}}const _vector$2=new Vector3;const _boneMatrix=new Matrix4;const _matrixWorldInv=new Matrix4;class SkeletonHelper extends LineSegments{constructor(object){const bones=getBoneList(object);const geometry=new BufferGeometry;const vertices=[];const colors=[];for(let i=0;i<bones.length;i++){const bone=bones[i];if(bone.parent&&bone.parent.isBone){vertices.push(0,0,0);vertices.push(0,0,0);colors.push(0,0,0);colors.push(0,0,0)}}geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,depthTest:false,depthWrite:false,toneMapped:false,transparent:true});super(geometry,material);this.isSkeletonHelper=true;this.type="SkeletonHelper";this.root=object;this.bones=bones;this.matrix=object.matrixWorld;this.matrixAutoUpdate=false;const color1=new Color(255);const color2=new Color(65280);this.setColors(color1,color2)}updateMatrixWorld(force){const bones=this.bones;const geometry=this.geometry;const position=geometry.getAttribute("position");_matrixWorldInv.copy(this.root.matrixWorld).invert();for(let i=0,j=0;i<bones.length;i++){const bone=bones[i];if(bone.parent&&bone.parent.isBone){_boneMatrix.multiplyMatrices(_matrixWorldInv,bone.matrixWorld);_vector$2.setFromMatrixPosition(_boneMatrix);position.setXYZ(j,_vector$2.x,_vector$2.y,_vector$2.z);_boneMatrix.multiplyMatrices(_matrixWorldInv,bone.parent.matrixWorld);_vector$2.setFromMatrixPosition(_boneMatrix);position.setXYZ(j+1,_vector$2.x,_vector$2.y,_vector$2.z);j+=2}}geometry.getAttribute("position").needsUpdate=true;super.updateMatrixWorld(force)}setColors(color1,color2){const geometry=this.geometry;const colorAttribute=geometry.getAttribute("color");for(let i=0;i<colorAttribute.count;i+=2){colorAttribute.setXYZ(i,color1.r,color1.g,color1.b);colorAttribute.setXYZ(i+1,color2.r,color2.g,color2.b)}colorAttribute.needsUpdate=true;return this}dispose(){this.geometry.dispose();this.material.dispose()}}function getBoneList(object){const boneList=[];if(object.isBone===true){boneList.push(object)}for(let i=0;i<object.children.length;i++){boneList.push(...getBoneList(object.children[i]))}return boneList}class PointLightHelper extends Mesh{constructor(light,sphereSize,color){const geometry=new SphereGeometry(sphereSize,4,2);const material=new MeshBasicMaterial({wireframe:true,fog:false,toneMapped:false});super(geometry,material);this.light=light;this.color=color;this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=false;this.update()}dispose(){this.geometry.dispose();this.material.dispose()}update(){this.light.updateWorldMatrix(true,false);if(this.color!==undefined){this.material.color.set(this.color)}else{this.material.color.copy(this.light.color)}}}const _vector$1=new Vector3;const _color1=new Color;const _color2=new Color;class HemisphereLightHelper extends Object3D{constructor(light,size,color){super();this.light=light;this.matrix=light.matrixWorld;this.matrixAutoUpdate=false;this.color=color;this.type="HemisphereLightHelper";const geometry=new OctahedronGeometry(size);geometry.rotateY(Math.PI*0.5);this.material=new MeshBasicMaterial({wireframe:true,fog:false,toneMapped:false});if(this.color===undefined)this.material.vertexColors=true;const position=geometry.getAttribute("position");const colors=new Float32Array(position.count*3);geometry.setAttribute("color",new BufferAttribute(colors,3));this.add(new Mesh(geometry,this.material));this.update()}dispose(){this.children[0].geometry.dispose();this.children[0].material.dispose()}update(){const mesh=this.children[0];if(this.color!==undefined){this.material.color.set(this.color)}else{const colors=mesh.geometry.getAttribute("color");_color1.copy(this.light.color);_color2.copy(this.light.groundColor);for(let i=0,l=colors.count;i<l;i++){const color=i<l/2?_color1:_color2;colors.setXYZ(i,color.r,color.g,color.b)}colors.needsUpdate=true}this.light.updateWorldMatrix(true,false);mesh.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate())}}class GridHelper extends LineSegments{constructor(size=10,divisions=10,color1=4473924,color2=8947848){color1=new Color(color1);color2=new Color(color2);const center=divisions/2;const step=size/divisions;const halfSize=size/2;const vertices=[],colors=[];for(let i=0,j=0,k=-halfSize;i<=divisions;i++,k+=step){vertices.push(-halfSize,0,k,halfSize,0,k);vertices.push(k,0,-halfSize,k,0,halfSize);const color=i===center?color1:color2;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3}const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="GridHelper"}dispose(){this.geometry.dispose();this.material.dispose()}}class PolarGridHelper extends LineSegments{constructor(radius=10,sectors=16,rings=8,divisions=64,color1=4473924,color2=8947848){color1=new Color(color1);color2=new Color(color2);const vertices=[];const colors=[];if(sectors>1){for(let i=0;i<sectors;i++){const v=i/sectors*(Math.PI*2);const x=Math.sin(v)*radius;const z=Math.cos(v)*radius;vertices.push(0,0,0);vertices.push(x,0,z);const color=i&1?color1:color2;colors.push(color.r,color.g,color.b);colors.push(color.r,color.g,color.b)}}for(let i=0;i<rings;i++){const color=i&1?color1:color2;const r=radius-radius/rings*i;for(let j=0;j<divisions;j++){let v=j/divisions*(Math.PI*2);let x=Math.sin(v)*r;let z=Math.cos(v)*r;vertices.push(x,0,z);colors.push(color.r,color.g,color.b);v=(j+1)/divisions*(Math.PI*2);x=Math.sin(v)*r;z=Math.cos(v)*r;vertices.push(x,0,z);colors.push(color.r,color.g,color.b)}}const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="PolarGridHelper"}dispose(){this.geometry.dispose();this.material.dispose()}}const _v1=new Vector3;const _v2=new Vector3;const _v3=new Vector3;class DirectionalLightHelper extends Object3D{constructor(light,size,color){super();this.light=light;this.matrix=light.matrixWorld;this.matrixAutoUpdate=false;this.color=color;this.type="DirectionalLightHelper";if(size===undefined)size=1;let geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([-size,size,0,size,size,0,size,-size,0,-size,-size,0,-size,size,0],3));const material=new LineBasicMaterial({fog:false,toneMapped:false});this.lightPlane=new Line(geometry,material);this.add(this.lightPlane);geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,0,1],3));this.targetLine=new Line(geometry,material);this.add(this.targetLine);this.update()}dispose(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(true,false);this.light.target.updateWorldMatrix(true,false);_v1.setFromMatrixPosition(this.light.matrixWorld);_v2.setFromMatrixPosition(this.light.target.matrixWorld);_v3.subVectors(_v2,_v1);this.lightPlane.lookAt(_v2);if(this.color!==undefined){this.lightPlane.material.color.set(this.color);this.targetLine.material.color.set(this.color)}else{this.lightPlane.material.color.copy(this.light.color);this.targetLine.material.color.copy(this.light.color)}this.targetLine.lookAt(_v2);this.targetLine.scale.z=_v3.length()}}const _vector=new Vector3;const _camera=new Camera;class CameraHelper extends LineSegments{constructor(camera){const geometry=new BufferGeometry;const material=new LineBasicMaterial({color:16777215,vertexColors:true,toneMapped:false});const vertices=[];const colors=[];const pointMap={};addLine("n1","n2");addLine("n2","n4");addLine("n4","n3");addLine("n3","n1");addLine("f1","f2");addLine("f2","f4");addLine("f4","f3");addLine("f3","f1");addLine("n1","f1");addLine("n2","f2");addLine("n3","f3");addLine("n4","f4");addLine("p","n1");addLine("p","n2");addLine("p","n3");addLine("p","n4");addLine("u1","u2");addLine("u2","u3");addLine("u3","u1");addLine("c","t");addLine("p","c");addLine("cn1","cn2");addLine("cn3","cn4");addLine("cf1","cf2");addLine("cf3","cf4");function addLine(a,b){addPoint(a);addPoint(b)}function addPoint(id){vertices.push(0,0,0);colors.push(0,0,0);if(pointMap[id]===undefined){pointMap[id]=[]}pointMap[id].push(vertices.length/3-1)}geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));super(geometry,material);this.type="CameraHelper";this.camera=camera;if(this.camera.updateProjectionMatrix)this.camera.updateProjectionMatrix();this.matrix=camera.matrixWorld;this.matrixAutoUpdate=false;this.pointMap=pointMap;this.update();const colorFrustum=new Color(16755200);const colorCone=new Color(16711680);const colorUp=new Color(43775);const colorTarget=new Color(16777215);const colorCross=new Color(3355443);this.setColors(colorFrustum,colorCone,colorUp,colorTarget,colorCross)}setColors(frustum,cone,up,target,cross){const geometry=this.geometry;const colorAttribute=geometry.getAttribute("color");colorAttribute.setXYZ(0,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(1,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(2,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(3,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(4,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(5,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(6,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(7,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(8,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(9,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(10,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(11,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(12,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(13,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(14,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(15,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(16,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(17,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(18,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(19,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(20,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(21,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(22,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(23,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(24,cone.r,cone.g,cone.b);colorAttribute.setXYZ(25,cone.r,cone.g,cone.b);colorAttribute.setXYZ(26,cone.r,cone.g,cone.b);colorAttribute.setXYZ(27,cone.r,cone.g,cone.b);colorAttribute.setXYZ(28,cone.r,cone.g,cone.b);colorAttribute.setXYZ(29,cone.r,cone.g,cone.b);colorAttribute.setXYZ(30,cone.r,cone.g,cone.b);colorAttribute.setXYZ(31,cone.r,cone.g,cone.b);colorAttribute.setXYZ(32,up.r,up.g,up.b);colorAttribute.setXYZ(33,up.r,up.g,up.b);colorAttribute.setXYZ(34,up.r,up.g,up.b);colorAttribute.setXYZ(35,up.r,up.g,up.b);colorAttribute.setXYZ(36,up.r,up.g,up.b);colorAttribute.setXYZ(37,up.r,up.g,up.b);colorAttribute.setXYZ(38,target.r,target.g,target.b);colorAttribute.setXYZ(39,target.r,target.g,target.b);colorAttribute.setXYZ(40,cross.r,cross.g,cross.b);colorAttribute.setXYZ(41,cross.r,cross.g,cross.b);colorAttribute.setXYZ(42,cross.r,cross.g,cross.b);colorAttribute.setXYZ(43,cross.r,cross.g,cross.b);colorAttribute.setXYZ(44,cross.r,cross.g,cross.b);colorAttribute.setXYZ(45,cross.r,cross.g,cross.b);colorAttribute.setXYZ(46,cross.r,cross.g,cross.b);colorAttribute.setXYZ(47,cross.r,cross.g,cross.b);colorAttribute.setXYZ(48,cross.r,cross.g,cross.b);colorAttribute.setXYZ(49,cross.r,cross.g,cross.b);colorAttribute.needsUpdate=true;return this}update(){const geometry=this.geometry;const pointMap=this.pointMap;const w=1,h=1;let nearZ,farZ;_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);if(this.camera.reversedDepth===true){nearZ=1;farZ=0}else{if(this.camera.coordinateSystem===WebGLCoordinateSystem){nearZ=-1;farZ=1}else if(this.camera.coordinateSystem===WebGPUCoordinateSystem){nearZ=0;farZ=1}else{throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem)}}setPoint("c",pointMap,geometry,_camera,0,0,nearZ);setPoint("t",pointMap,geometry,_camera,0,0,farZ);setPoint("n1",pointMap,geometry,_camera,-w,-h,nearZ);setPoint("n2",pointMap,geometry,_camera,w,-h,nearZ);setPoint("n3",pointMap,geometry,_camera,-w,h,nearZ);setPoint("n4",pointMap,geometry,_camera,w,h,nearZ);setPoint("f1",pointMap,geometry,_camera,-w,-h,farZ);setPoint("f2",pointMap,geometry,_camera,w,-h,farZ);setPoint("f3",pointMap,geometry,_camera,-w,h,farZ);setPoint("f4",pointMap,geometry,_camera,w,h,farZ);setPoint("u1",pointMap,geometry,_camera,w*0.7,h*1.1,nearZ);setPoint("u2",pointMap,geometry,_camera,-w*0.7,h*1.1,nearZ);setPoint("u3",pointMap,geometry,_camera,0,h*2,nearZ);setPoint("cf1",pointMap,geometry,_camera,-w,0,farZ);setPoint("cf2",pointMap,geometry,_camera,w,0,farZ);setPoint("cf3",pointMap,geometry,_camera,0,-h,farZ);setPoint("cf4",pointMap,geometry,_camera,0,h,farZ);setPoint("cn1",pointMap,geometry,_camera,-w,0,nearZ);setPoint("cn2",pointMap,geometry,_camera,w,0,nearZ);setPoint("cn3",pointMap,geometry,_camera,0,-h,nearZ);setPoint("cn4",pointMap,geometry,_camera,0,h,nearZ);geometry.getAttribute("position").needsUpdate=true}dispose(){this.geometry.dispose();this.material.dispose()}}function setPoint(point,pointMap,geometry,camera,x,y,z){_vector.set(x,y,z).unproject(camera);const points=pointMap[point];if(points!==undefined){const position=geometry.getAttribute("position");for(let i=0,l=points.length;i<l;i++){position.setXYZ(points[i],_vector.x,_vector.y,_vector.z)}}}const _box=new Box3;class BoxHelper extends LineSegments{constructor(object,color=16776960){const indices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);const positions=new Float32Array(8*3);const geometry=new BufferGeometry;geometry.setIndex(new BufferAttribute(indices,1));geometry.setAttribute("position",new BufferAttribute(positions,3));super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.object=object;this.type="BoxHelper";this.matrixAutoUpdate=false;this.update()}update(){if(this.object!==undefined){_box.setFromObject(this.object)}if(_box.isEmpty())return;const min=_box.min;const max=_box.max;const position=this.geometry.attributes.position;const array=position.array;array[0]=max.x;array[1]=max.y;array[2]=max.z;array[3]=min.x;array[4]=max.y;array[5]=max.z;array[6]=min.x;array[7]=min.y;array[8]=max.z;array[9]=max.x;array[10]=min.y;array[11]=max.z;array[12]=max.x;array[13]=max.y;array[14]=min.z;array[15]=min.x;array[16]=max.y;array[17]=min.z;array[18]=min.x;array[19]=min.y;array[20]=min.z;array[21]=max.x;array[22]=min.y;array[23]=min.z;position.needsUpdate=true;this.geometry.computeBoundingSphere()}setFromObject(object){this.object=object;this.update();return this}copy(source,recursive){super.copy(source,recursive);this.object=source.object;return this}dispose(){this.geometry.dispose();this.material.dispose()}}class Box3Helper extends LineSegments{constructor(box,color=16776960){const indices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);const positions=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1];const geometry=new BufferGeometry;geometry.setIndex(new BufferAttribute(indices,1));geometry.setAttribute("position",new Float32BufferAttribute(positions,3));super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.box=box;this.type="Box3Helper";this.geometry.computeBoundingSphere()}updateMatrixWorld(force){const box=this.box;if(box.isEmpty())return;box.getCenter(this.position);box.getSize(this.scale);this.scale.multiplyScalar(0.5);super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose()}}class PlaneHelper extends Line{constructor(plane,size=1,hex=16776960){const color=hex;const positions=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0];const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(positions,3));geometry.computeBoundingSphere();super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.type="PlaneHelper";this.plane=plane;this.size=size;const positions2=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0];const geometry2=new BufferGeometry;geometry2.setAttribute("position",new Float32BufferAttribute(positions2,3));geometry2.computeBoundingSphere();this.add(new Mesh(geometry2,new MeshBasicMaterial({color:color,opacity:0.2,transparent:true,depthWrite:false,toneMapped:false})))}updateMatrixWorld(force){this.position.set(0,0,0);this.scale.set(0.5*this.size,0.5*this.size,1);this.lookAt(this.plane.normal);this.translateZ(-this.plane.constant);super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose();this.children[0].geometry.dispose();this.children[0].material.dispose()}}const _axis=new Vector3;let _lineGeometry,_coneGeometry;class ArrowHelper extends Object3D{constructor(dir=new Vector3(0,0,1),origin=new Vector3(0,0,0),length=1,color=16776960,headLength=length*0.2,headWidth=headLength*0.2){super();this.type="ArrowHelper";if(_lineGeometry===undefined){_lineGeometry=new BufferGeometry;_lineGeometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,1,0],3));_coneGeometry=new ConeGeometry(0.5,1,5,1);_coneGeometry.translate(0,-0.5,0)}this.position.copy(origin);this.line=new Line(_lineGeometry,new LineBasicMaterial({color:color,toneMapped:false}));this.line.matrixAutoUpdate=false;this.add(this.line);this.cone=new Mesh(_coneGeometry,new MeshBasicMaterial({color:color,toneMapped:false}));this.cone.matrixAutoUpdate=false;this.add(this.cone);this.setDirection(dir);this.setLength(length,headLength,headWidth)}setDirection(dir){if(dir.y>0.99999){this.quaternion.set(0,0,0,1)}else if(dir.y<-0.99999){this.quaternion.set(1,0,0,0)}else{_axis.set(dir.z,0,-dir.x).normalize();const radians=Math.acos(dir.y);this.quaternion.setFromAxisAngle(_axis,radians)}}setLength(length,headLength=length*0.2,headWidth=headLength*0.2){this.line.scale.set(1,Math.max(0.0001,length-headLength),1);this.line.updateMatrix();this.cone.scale.set(headWidth,headLength,headWidth);this.cone.position.y=length;this.cone.updateMatrix()}setColor(color){this.line.material.color.set(color);this.cone.material.color.set(color)}copy(source){super.copy(source,false);this.line.copy(source.line);this.cone.copy(source.cone);return this}dispose(){this.line.geometry.dispose();this.line.material.dispose();this.cone.geometry.dispose();this.cone.material.dispose()}}class AxesHelper extends LineSegments{constructor(size=1){const vertices=[0,0,0,size,0,0,0,0,0,0,size,0,0,0,0,0,0,size];const colors=[1,0,0,1,0.6,0,0,1,0,0.6,1,0,0,0,1,0,0.6,1];const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="AxesHelper"}setColors(xAxisColor,yAxisColor,zAxisColor){const color=new Color;const array=this.geometry.attributes.color.array;color.set(xAxisColor);color.toArray(array,0);color.toArray(array,3);color.set(yAxisColor);color.toArray(array,6);color.toArray(array,9);color.set(zAxisColor);color.toArray(array,12);color.toArray(array,15);this.geometry.attributes.color.needsUpdate=true;return this}dispose(){this.geometry.dispose();this.material.dispose()}}class ShapePath{constructor(){this.type="ShapePath";this.color=new Color;this.subPaths=[];this.currentPath=null}moveTo(x,y){this.currentPath=new Path;this.subPaths.push(this.currentPath);this.currentPath.moveTo(x,y);return this}lineTo(x,y){this.currentPath.lineTo(x,y);return this}quadraticCurveTo(aCPx,aCPy,aX,aY){this.currentPath.quadraticCurveTo(aCPx,aCPy,aX,aY);return this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){this.currentPath.bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY);return this}splineThru(pts){this.currentPath.splineThru(pts);return this}toShapes(isCCW){function toShapesNoHoles(inSubpaths){const shapes=[];for(let i=0,l=inSubpaths.length;i<l;i++){const tmpPath=inSubpaths[i];const tmpShape=new Shape;tmpShape.curves=tmpPath.curves;shapes.push(tmpShape)}return shapes}function isPointInsidePolygon(inPt,inPolygon){const polyLen=inPolygon.length;let inside=false;for(let p=polyLen-1,q=0;q<polyLen;p=q++){let edgeLowPt=inPolygon[p];let edgeHighPt=inPolygon[q];let edgeDx=edgeHighPt.x-edgeLowPt.x;let edgeDy=edgeHighPt.y-edgeLowPt.y;if(Math.abs(edgeDy)>Number.EPSILON){if(edgeDy<0){edgeLowPt=inPolygon[q];edgeDx=-edgeDx;edgeHighPt=inPolygon[p];edgeDy=-edgeDy}if(inPt.y<edgeLowPt.y||inPt.y>edgeHighPt.y)continue;if(inPt.y===edgeLowPt.y){if(inPt.x===edgeLowPt.x)return true}else{const perpEdge=edgeDy*(inPt.x-edgeLowPt.x)-edgeDx*(inPt.y-edgeLowPt.y);if(perpEdge===0)return true;if(perpEdge<0)continue;inside=!inside}}else{if(inPt.y!==edgeLowPt.y)continue;if(edgeHighPt.x<=inPt.x&&inPt.x<=edgeLowPt.x||edgeLowPt.x<=inPt.x&&inPt.x<=edgeHighPt.x)return true}}return inside}const isClockWise=ShapeUtils.isClockWise;const subPaths=this.subPaths;if(subPaths.length===0)return[];let solid,tmpPath,tmpShape;const shapes=[];if(subPaths.length===1){tmpPath=subPaths[0];tmpShape=new Shape;tmpShape.curves=tmpPath.curves;shapes.push(tmpShape);return shapes}let holesFirst=!isClockWise(subPaths[0].getPoints());holesFirst=isCCW?!holesFirst:holesFirst;const betterShapeHoles=[];const newShapes=[];let newShapeHoles=[];let mainIdx=0;let tmpPoints;newShapes[mainIdx]=undefined;newShapeHoles[mainIdx]=[];for(let i=0,l=subPaths.length;i<l;i++){tmpPath=subPaths[i];tmpPoints=tmpPath.getPoints();solid=isClockWise(tmpPoints);solid=isCCW?!solid:solid;if(solid){if(!holesFirst&&newShapes[mainIdx])mainIdx++;newShapes[mainIdx]={s:new Shape,p:tmpPoints};newShapes[mainIdx].s.curves=tmpPath.curves;if(holesFirst)mainIdx++;newShapeHoles[mainIdx]=[]}else{newShapeHoles[mainIdx].push({h:tmpPath,p:tmpPoints[0]})}}if(!newShapes[0])return toShapesNoHoles(subPaths);if(newShapes.length>1){let ambiguous=false;let toChange=0;for(let sIdx=0,sLen=newShapes.length;sIdx<sLen;sIdx++){betterShapeHoles[sIdx]=[]}for(let sIdx=0,sLen=newShapes.length;sIdx<sLen;sIdx++){const sho=newShapeHoles[sIdx];for(let hIdx=0;hIdx<sho.length;hIdx++){const ho=sho[hIdx];let hole_unassigned=true;for(let s2Idx=0;s2Idx<newShapes.length;s2Idx++){if(isPointInsidePolygon(ho.p,newShapes[s2Idx].p)){if(sIdx!==s2Idx)toChange++;if(hole_unassigned){hole_unassigned=false;betterShapeHoles[s2Idx].push(ho)}else{ambiguous=true}}}if(hole_unassigned){betterShapeHoles[sIdx].push(ho)}}}if(toChange>0&&ambiguous===false){newShapeHoles=betterShapeHoles}}let tmpHoles;for(let i=0,il=newShapes.length;i<il;i++){tmpShape=newShapes[i].s;shapes.push(tmpShape);tmpHoles=newShapeHoles[i];for(let j=0,jl=tmpHoles.length;j<jl;j++){tmpShape.holes.push(tmpHoles[j].h)}}return shapes}}class Controls extends EventDispatcher{constructor(object,domElement=null){super();this.object=object;this.domElement=domElement;this.enabled=true;this.state=-1;this.keys={};this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null};this.touches={ONE:null,TWO:null}}connect(element){if(element===undefined){warn("Controls: connect() now requires an element.");return}if(this.domElement!==null)this.disconnect();this.domElement=element}disconnect(){}dispose(){}update(){}}function contain(texture,aspect){const imageAspect=texture.image&&texture.image.width?texture.image.width/texture.image.height:1;if(imageAspect>aspect){texture.repeat.x=1;texture.repeat.y=imageAspect/aspect;texture.offset.x=0;texture.offset.y=(1-texture.repeat.y)/2}else{texture.repeat.x=aspect/imageAspect;texture.repeat.y=1;texture.offset.x=(1-texture.repeat.x)/2;texture.offset.y=0}return texture}function cover(texture,aspect){const imageAspect=texture.image&&texture.image.width?texture.image.width/texture.image.height:1;if(imageAspect>aspect){texture.repeat.x=aspect/imageAspect;texture.repeat.y=1;texture.offset.x=(1-texture.repeat.x)/2;texture.offset.y=0}else{texture.repeat.x=1;texture.repeat.y=imageAspect/aspect;texture.offset.x=0;texture.offset.y=(1-texture.repeat.y)/2}return texture}function fill(texture){texture.repeat.x=1;texture.repeat.y=1;texture.offset.x=0;texture.offset.y=0;return texture}function getByteLength(width,height,format,type){const typeByteLength=getTextureTypeByteLength(type);switch(format){case AlphaFormat:return width*height;case RedFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RedIntegerFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RGFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGIntegerFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGBFormat:return width*height*3/typeByteLength.components*typeByteLength.byteLength;case RGBAFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGBAIntegerFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGB_S3TC_DXT1_Format:case RGBA_S3TC_DXT1_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_S3TC_DXT3_Format:case RGBA_S3TC_DXT5_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGB_PVRTC_2BPPV1_Format:case RGBA_PVRTC_2BPPV1_Format:return Math.max(width,16)*Math.max(height,8)/4;case RGB_PVRTC_4BPPV1_Format:case RGBA_PVRTC_4BPPV1_Format:return Math.max(width,8)*Math.max(height,8)/2;case RGB_ETC1_Format:case RGB_ETC2_Format:case R11_EAC_Format:case SIGNED_R11_EAC_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_ETC2_EAC_Format:case RG11_EAC_Format:case SIGNED_RG11_EAC_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_4x4_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x4_Format:return Math.floor((width+4)/5)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x5_Format:return Math.floor((width+4)/5)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x5_Format:return Math.floor((width+5)/6)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x6_Format:return Math.floor((width+5)/6)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x5_Format:return Math.floor((width+7)/8)*Math.floor((height+4)/5)*16;case RGBA_ASTC_8x6_Format:return Math.floor((width+7)/8)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x8_Format:return Math.floor((width+7)/8)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x5_Format:return Math.floor((width+9)/10)*Math.floor((height+4)/5)*16;case RGBA_ASTC_10x6_Format:return Math.floor((width+9)/10)*Math.floor((height+5)/6)*16;case RGBA_ASTC_10x8_Format:return Math.floor((width+9)/10)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x10_Format:return Math.floor((width+9)/10)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x10_Format:return Math.floor((width+11)/12)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x12_Format:return Math.floor((width+11)/12)*Math.floor((height+11)/12)*16;case RGBA_BPTC_Format:case RGB_BPTC_SIGNED_Format:case RGB_BPTC_UNSIGNED_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16;case RED_RGTC1_Format:case SIGNED_RED_RGTC1_Format:return Math.ceil(width/4)*Math.ceil(height/4)*8;case RED_GREEN_RGTC2_Format:case SIGNED_RED_GREEN_RGTC2_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16;}throw new Error(`Unable to determine texture byte length for ${format} format.`)}function getTextureTypeByteLength(type){switch(type){case UnsignedByteType:case ByteType:return{byteLength:1,components:1};case UnsignedShortType:case ShortType:case HalfFloatType:return{byteLength:2,components:1};case UnsignedShort4444Type:case UnsignedShort5551Type:return{byteLength:2,components:4};case UnsignedIntType:case IntType:case FloatType:return{byteLength:4,components:1};case UnsignedInt5999Type:case UnsignedInt101111Type:return{byteLength:4,components:3};}throw new Error(`Unknown texture type ${type}.`)}class TextureUtils{static contain(texture,aspect){return contain(texture,aspect)}static cover(texture,aspect){return cover(texture,aspect)}static fill(texture){return fill(texture)}static getByteLength(width,height,format,type){return getByteLength(width,height,format,type)}}if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:REVISION}}))}if(typeof window!=="undefined"){if(window.__THREE__){warn("WARNING: Multiple instances of Three.js being imported.")}else{window.__THREE__=REVISION}}function WebGLAnimation(){let context=null;let isAnimating=false;let animationLoop=null;let requestId=null;function onAnimationFrame(time,frame){animationLoop(time,frame);requestId=context.requestAnimationFrame(onAnimationFrame)}return{start:function(){if(isAnimating===true)return;if(animationLoop===null)return;requestId=context.requestAnimationFrame(onAnimationFrame);isAnimating=true},stop:function(){context.cancelAnimationFrame(requestId);isAnimating=false},setAnimationLoop:function(callback){animationLoop=callback},setContext:function(value){context=value}}}function WebGLAttributes(gl){const buffers=new WeakMap;function createBuffer(attribute,bufferType){const array=attribute.array;const usage=attribute.usage;const size=array.byteLength;const buffer=gl.createBuffer();gl.bindBuffer(bufferType,buffer);gl.bufferData(bufferType,array,usage);attribute.onUploadCallback();let type;if(array instanceof Float32Array){type=gl.FLOAT}else if(typeof Float16Array!=="undefined"&&array instanceof Float16Array){type=gl.HALF_FLOAT}else if(array instanceof Uint16Array){if(attribute.isFloat16BufferAttribute){type=gl.HALF_FLOAT}else{type=gl.UNSIGNED_SHORT}}else if(array instanceof Int16Array){type=gl.SHORT}else if(array instanceof Uint32Array){type=gl.UNSIGNED_INT}else if(array instanceof Int32Array){type=gl.INT}else if(array instanceof Int8Array){type=gl.BYTE}else if(array instanceof Uint8Array){type=gl.UNSIGNED_BYTE}else if(array instanceof Uint8ClampedArray){type=gl.UNSIGNED_BYTE}else{throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+array)}return{buffer:buffer,type:type,bytesPerElement:array.BYTES_PER_ELEMENT,version:attribute.version,size:size}}function updateBuffer(buffer,attribute,bufferType){const array=attribute.array;const updateRanges=attribute.updateRanges;gl.bindBuffer(bufferType,buffer);if(updateRanges.length===0){gl.bufferSubData(bufferType,0,array)}else{updateRanges.sort((a,b)=>a.start-b.start);let mergeIndex=0;for(let i=1;i<updateRanges.length;i++){const previousRange=updateRanges[mergeIndex];const range=updateRanges[i];if(range.start<=previousRange.start+previousRange.count+1){previousRange.count=Math.max(previousRange.count,range.start+range.count-previousRange.start)}else{++mergeIndex;updateRanges[mergeIndex]=range}}updateRanges.length=mergeIndex+1;for(let i=0,l=updateRanges.length;i<l;i++){const range=updateRanges[i];gl.bufferSubData(bufferType,range.start*array.BYTES_PER_ELEMENT,array,range.start,range.count)}attribute.clearUpdateRanges()}attribute.onUploadCallback()}function get(attribute){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;return buffers.get(attribute)}function remove(attribute){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;const data=buffers.get(attribute);if(data){gl.deleteBuffer(data.buffer);buffers.delete(attribute)}}function update(attribute,bufferType){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;if(attribute.isGLBufferAttribute){const cached=buffers.get(attribute);if(!cached||cached.version<attribute.version){buffers.set(attribute,{buffer:attribute.buffer,type:attribute.type,bytesPerElement:attribute.elementSize,version:attribute.version})}return}const data=buffers.get(attribute);if(data===undefined){buffers.set(attribute,createBuffer(attribute,bufferType))}else if(data.version<attribute.version){if(data.size!==attribute.array.byteLength){throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.")}updateBuffer(data.buffer,attribute,bufferType);data.version=attribute.version}}return{get:get,remove:remove,update:update}}var alphahash_fragment="#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif";var alphahash_pars_fragment="#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif";var alphamap_fragment="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif";var alphamap_pars_fragment="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";var alphatest_fragment="#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif";var alphatest_pars_fragment="#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif";var aomap_fragment="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif";var aomap_pars_fragment="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";var batching_pars_vertex="#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n\tfloat getIndirectIndex( const in int i ) {\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif";var batching_vertex="#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif";var begin_vertex="vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif";var beginnormal_vertex="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif";var bsdfs="float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated";var iridescence_fragment="#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif";var bumpmap_pars_fragment="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif";var clipping_planes_fragment="#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif";var clipping_planes_pars_fragment="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif";var clipping_planes_pars_vertex="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif";var clipping_planes_vertex="#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif";var color_fragment="#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif";var color_pars_fragment="#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif";var color_pars_vertex="#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif";var color_vertex="#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.xyz;\n#endif";var common="#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated";var cube_uv_reflection_fragment="#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif";var defaultnormal_vertex="vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif";var displacementmap_pars_vertex="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif";var displacementmap_vertex="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif";var emissivemap_fragment="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n\t\temissiveColor = sRGBTransferEOTF( emissiveColor );\n\t#endif\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif";var emissivemap_pars_fragment="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif";var colorspace_fragment="gl_FragColor = linearToOutputTexel( gl_FragColor );";var colorspace_pars_fragment="vec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}";var envmap_fragment="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif";var envmap_common_pars_fragment="#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n#endif";var envmap_pars_fragment="#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif";var envmap_pars_vertex="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif";var envmap_vertex="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif";var fog_vertex="#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif";var fog_pars_vertex="#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif";var fog_fragment="#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif";var fog_pars_fragment="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif";var gradientmap_pars_fragment="#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}";var lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";var lights_lambert_fragment="LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;";var lights_lambert_pars_fragment="varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert";var lights_pars_begin="uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif";var envmap_physical_pars_fragment="#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif";var lights_toon_fragment="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;";var lights_toon_pars_fragment="varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon";var lights_phong_fragment="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;";var lights_phong_pars_fragment="varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong";var lights_physical_fragment="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.metalness = metalnessFactor;\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = vec3( 0.04 );\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif";var lights_physical_pars_fragment="uniform sampler2D dfgLUT;\nstruct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tvec3 diffuseContribution;\n\tvec3 specularColor;\n\tvec3 specularColorBlended;\n\tfloat roughness;\n\tfloat metalness;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t\tvec3 iridescenceFresnelDielectric;\n\t\tvec3 iridescenceFresnelMetallic;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn v;\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColorBlended;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat rInv = 1.0 / ( roughness + 0.1 );\n\tfloat a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;\n\tfloat b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;\n\tfloat DG = exp( a * dotNV + b );\n\treturn saturate( DG );\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;\n\tvec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;\n\tvec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;\n\tvec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;\n\tfloat Ess_V = dfgV.x + dfgV.y;\n\tfloat Ess_L = dfgL.x + dfgL.y;\n\tfloat Ems_V = 1.0 - Ess_V;\n\tfloat Ems_L = 1.0 - Ess_L;\n\tvec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;\n\tvec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );\n\tfloat compensationFactor = Ems_V * Ems_L;\n\tvec3 multiScatter = Fms * compensationFactor;\n\treturn singleScatter + multiScatter;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColorBlended * t2.x + ( vec3( 1.0 ) - material.specularColorBlended ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n \n \t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n \n \t\tfloat sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n \t\tfloat sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );\n \n \t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );\n \n \t\tirradiance *= sheenEnergyComp;\n \n \t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );\n\t#ifdef USE_SHEEN\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\t\tdiffuse *= sheenEnergyComp;\n\t#endif\n\treflectedLight.indirectDiffuse += diffuse;\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;\n \t#endif\n\tvec3 singleScatteringDielectric = vec3( 0.0 );\n\tvec3 multiScatteringDielectric = vec3( 0.0 );\n\tvec3 singleScatteringMetallic = vec3( 0.0 );\n\tvec3 multiScatteringMetallic = vec3( 0.0 );\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\t#endif\n\tvec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );\n\tvec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );\n\tvec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;\n\tvec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tvec3 indirectSpecular = radiance * singleScattering;\n\tindirectSpecular += multiScattering * cosineWeightedIrradiance;\n\tvec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\t\tindirectSpecular *= sheenEnergyComp;\n\t\tindirectDiffuse *= sheenEnergyComp;\n\t#endif\n\treflectedLight.indirectSpecular += indirectSpecular;\n\treflectedLight.indirectDiffuse += indirectDiffuse;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}";var lights_fragment_begin="\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );\n\t\tmaterial.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif";var lights_fragment_maps="#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif";var lights_fragment_end="#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif";var logdepthbuf_fragment="#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";var logdepthbuf_pars_fragment="#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_pars_vertex="#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_vertex="#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif";var map_fragment="#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif";var map_pars_fragment="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif";var map_particle_fragment="#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif";var map_particle_pars_fragment="#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";var metalnessmap_fragment="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif";var metalnessmap_pars_fragment="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";var morphinstance_vertex="#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif";var morphcolor_vertex="#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif";var morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif";var morphtarget_pars_vertex="#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif";var morphtarget_vertex="#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif";var normal_fragment_begin="float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;";var normal_fragment_maps="#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif";var normal_pars_fragment="#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";var normal_pars_vertex="#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";var normal_vertex="#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif";var normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif";var clearcoat_normal_fragment_begin="#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif";var clearcoat_normal_fragment_maps="#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif";var clearcoat_pars_fragment="#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif";var iridescence_pars_fragment="#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif";var opaque_fragment="#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );";var packing="vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}";var premultiplied_alpha_fragment="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif";var project_vertex="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;";var dithering_fragment="#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif";var dithering_pars_fragment="#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif";var roughnessmap_fragment="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif";var roughnessmap_pars_fragment="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";var shadowmap_pars_fragment="#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\t#else\n\t\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\t#else\n\t\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\t\t\tuniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat interleavedGradientNoise( vec2 position ) {\n\t\t\treturn fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );\n\t\t}\n\t\tvec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {\n\t\t\tconst float goldenAngle = 2.399963229728653;\n\t\t\tfloat r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );\n\t\t\tfloat theta = float( sampleIndex ) * goldenAngle + phi;\n\t\t\treturn vec2( cos( theta ), sin( theta ) ) * r;\n\t\t}\n\t#endif\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\t\tfloat radius = shadowRadius * texelSize.x;\n\t\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )\n\t\t\t\t) * 0.2;\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tvec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;\n\t\t\t\tfloat mean = distribution.x;\n\t\t\t\tfloat variance = distribution.y * distribution.y;\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\t\tfloat hard_shadow = step( mean, shadowCoord.z );\n\t\t\t\t#else\n\t\t\t\t\tfloat hard_shadow = step( shadowCoord.z, mean );\n\t\t\t\t#endif\n\t\t\t\tif ( hard_shadow == 1.0 ) {\n\t\t\t\t\tshadow = 1.0;\n\t\t\t\t} else {\n\t\t\t\t\tvariance = max( variance, 0.0000001 );\n\t\t\t\t\tfloat d = shadowCoord.z - mean;\n\t\t\t\t\tfloat p_max = variance / ( variance + d * d );\n\t\t\t\t\tp_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );\n\t\t\t\t\tshadow = max( hard_shadow, p_max );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#else\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tfloat depth = texture2D( shadowMap, shadowCoord.xy ).r;\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\t\tshadow = step( depth, shadowCoord.z );\n\t\t\t\t#else\n\t\t\t\t\tshadow = step( shadowCoord.z, depth );\n\t\t\t\t#endif\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\tfloat getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\t\t\tfloat texelSize = shadowRadius / shadowMapSize.x;\n\t\t\tvec3 absDir = abs( bd3D );\n\t\t\tvec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );\n\t\t\ttangent = normalize( cross( bd3D, tangent ) );\n\t\t\tvec3 bitangent = cross( bd3D, tangent );\n\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n\t\t\tshadow = (\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) )\n\t\t\t) * 0.2;\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\tfloat getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\t\t\tfloat depth = textureCube( shadowMap, bd3D ).r;\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\tshadow = step( depth, dp );\n\t\t\t#else\n\t\t\t\tshadow = step( dp, depth );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\t#endif\n\t#endif\n#endif";var shadowmap_pars_vertex="#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif";var shadowmap_vertex="#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif";var shadowmask_pars_fragment="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}";var skinbase_vertex="#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";var skinning_pars_vertex="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif";var skinning_vertex="#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif";var skinnormal_vertex="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif";var specularmap_fragment="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif";var specularmap_pars_fragment="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";var tonemapping_fragment="#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";var tonemapping_pars_fragment="#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }";var transmission_fragment="#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif";var transmission_pars_fragment="#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t#else\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif";var uv_pars_fragment="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";var uv_pars_vertex="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";var uv_vertex="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif";var worldpos_vertex="#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif";const vertex$h="varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}";const fragment$h="uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$g="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";const fragment$g="#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$f="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";const fragment$f="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$e="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}";const fragment$e="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\t#else\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\t#endif\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}";const vertex$d="#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}";const fragment$d="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n}";const vertex$c="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}";const fragment$c="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$b="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";const fragment$b="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";const vertex$a="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$a="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$9="#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$9="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$8="#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}";const fragment$8="#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$7="#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}";const fragment$7="#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}";const vertex$6="#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$6="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$5="#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}";const fragment$5="#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n \n\t\toutgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n \t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$4="#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$4="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$3="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}";const fragment$3="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";const vertex$2="#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$2="uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";const vertex$1="uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";const fragment$1="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";const ShaderChunk={alphahash_fragment:alphahash_fragment,alphahash_pars_fragment:alphahash_pars_fragment,alphamap_fragment:alphamap_fragment,alphamap_pars_fragment:alphamap_pars_fragment,alphatest_fragment:alphatest_fragment,alphatest_pars_fragment:alphatest_pars_fragment,aomap_fragment:aomap_fragment,aomap_pars_fragment:aomap_pars_fragment,batching_pars_vertex:batching_pars_vertex,batching_vertex:batching_vertex,begin_vertex:begin_vertex,beginnormal_vertex:beginnormal_vertex,bsdfs:bsdfs,iridescence_fragment:iridescence_fragment,bumpmap_pars_fragment:bumpmap_pars_fragment,clipping_planes_fragment:clipping_planes_fragment,clipping_planes_pars_fragment:clipping_planes_pars_fragment,clipping_planes_pars_vertex:clipping_planes_pars_vertex,clipping_planes_vertex:clipping_planes_vertex,color_fragment:color_fragment,color_pars_fragment:color_pars_fragment,color_pars_vertex:color_pars_vertex,color_vertex:color_vertex,common:common,cube_uv_reflection_fragment:cube_uv_reflection_fragment,defaultnormal_vertex:defaultnormal_vertex,displacementmap_pars_vertex:displacementmap_pars_vertex,displacementmap_vertex:displacementmap_vertex,emissivemap_fragment:emissivemap_fragment,emissivemap_pars_fragment:emissivemap_pars_fragment,colorspace_fragment:colorspace_fragment,colorspace_pars_fragment:colorspace_pars_fragment,envmap_fragment:envmap_fragment,envmap_common_pars_fragment:envmap_common_pars_fragment,envmap_pars_fragment:envmap_pars_fragment,envmap_pars_vertex:envmap_pars_vertex,envmap_physical_pars_fragment:envmap_physical_pars_fragment,envmap_vertex:envmap_vertex,fog_vertex:fog_vertex,fog_pars_vertex:fog_pars_vertex,fog_fragment:fog_fragment,fog_pars_fragment:fog_pars_fragment,gradientmap_pars_fragment:gradientmap_pars_fragment,lightmap_pars_fragment:lightmap_pars_fragment,lights_lambert_fragment:lights_lambert_fragment,lights_lambert_pars_fragment:lights_lambert_pars_fragment,lights_pars_begin:lights_pars_begin,lights_toon_fragment:lights_toon_fragment,lights_toon_pars_fragment:lights_toon_pars_fragment,lights_phong_fragment:lights_phong_fragment,lights_phong_pars_fragment:lights_phong_pars_fragment,lights_physical_fragment:lights_physical_fragment,lights_physical_pars_fragment:lights_physical_pars_fragment,lights_fragment_begin:lights_fragment_begin,lights_fragment_maps:lights_fragment_maps,lights_fragment_end:lights_fragment_end,logdepthbuf_fragment:logdepthbuf_fragment,logdepthbuf_pars_fragment:logdepthbuf_pars_fragment,logdepthbuf_pars_vertex:logdepthbuf_pars_vertex,logdepthbuf_vertex:logdepthbuf_vertex,map_fragment:map_fragment,map_pars_fragment:map_pars_fragment,map_particle_fragment:map_particle_fragment,map_particle_pars_fragment:map_particle_pars_fragment,metalnessmap_fragment:metalnessmap_fragment,metalnessmap_pars_fragment:metalnessmap_pars_fragment,morphinstance_vertex:morphinstance_vertex,morphcolor_vertex:morphcolor_vertex,morphnormal_vertex:morphnormal_vertex,morphtarget_pars_vertex:morphtarget_pars_vertex,morphtarget_vertex:morphtarget_vertex,normal_fragment_begin:normal_fragment_begin,normal_fragment_maps:normal_fragment_maps,normal_pars_fragment:normal_pars_fragment,normal_pars_vertex:normal_pars_vertex,normal_vertex:normal_vertex,normalmap_pars_fragment:normalmap_pars_fragment,clearcoat_normal_fragment_begin:clearcoat_normal_fragment_begin,clearcoat_normal_fragment_maps:clearcoat_normal_fragment_maps,clearcoat_pars_fragment:clearcoat_pars_fragment,iridescence_pars_fragment:iridescence_pars_fragment,opaque_fragment:opaque_fragment,packing:packing,premultiplied_alpha_fragment:premultiplied_alpha_fragment,project_vertex:project_vertex,dithering_fragment:dithering_fragment,dithering_pars_fragment:dithering_pars_fragment,roughnessmap_fragment:roughnessmap_fragment,roughnessmap_pars_fragment:roughnessmap_pars_fragment,shadowmap_pars_fragment:shadowmap_pars_fragment,shadowmap_pars_vertex:shadowmap_pars_vertex,shadowmap_vertex:shadowmap_vertex,shadowmask_pars_fragment:shadowmask_pars_fragment,skinbase_vertex:skinbase_vertex,skinning_pars_vertex:skinning_pars_vertex,skinning_vertex:skinning_vertex,skinnormal_vertex:skinnormal_vertex,specularmap_fragment:specularmap_fragment,specularmap_pars_fragment:specularmap_pars_fragment,tonemapping_fragment:tonemapping_fragment,tonemapping_pars_fragment:tonemapping_pars_fragment,transmission_fragment:transmission_fragment,transmission_pars_fragment:transmission_pars_fragment,uv_pars_fragment:uv_pars_fragment,uv_pars_vertex:uv_pars_vertex,uv_vertex:uv_vertex,worldpos_vertex:worldpos_vertex,background_vert:vertex$h,background_frag:fragment$h,backgroundCube_vert:vertex$g,backgroundCube_frag:fragment$g,cube_vert:vertex$f,cube_frag:fragment$f,depth_vert:vertex$e,depth_frag:fragment$e,distance_vert:vertex$d,distance_frag:fragment$d,equirect_vert:vertex$c,equirect_frag:fragment$c,linedashed_vert:vertex$b,linedashed_frag:fragment$b,meshbasic_vert:vertex$a,meshbasic_frag:fragment$a,meshlambert_vert:vertex$9,meshlambert_frag:fragment$9,meshmatcap_vert:vertex$8,meshmatcap_frag:fragment$8,meshnormal_vert:vertex$7,meshnormal_frag:fragment$7,meshphong_vert:vertex$6,meshphong_frag:fragment$6,meshphysical_vert:vertex$5,meshphysical_frag:fragment$5,meshtoon_vert:vertex$4,meshtoon_frag:fragment$4,points_vert:vertex$3,points_frag:fragment$3,shadow_vert:vertex$2,shadow_frag:fragment$2,sprite_vert:vertex$1,sprite_frag:fragment$1};const UniformsLib={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},envMapRotation:{value:new Matrix3},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:0.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:0.00025},fogNear:{value:1},fogFar:{value:2000},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(0.5,0.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}};const ShaderLib={basic:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.fog]),vertexShader:ShaderChunk.meshbasic_vert,fragmentShader:ShaderChunk.meshbasic_frag},lambert:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshlambert_vert,fragmentShader:ShaderChunk.meshlambert_frag},phong:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:ShaderChunk.meshphong_vert,fragmentShader:ShaderChunk.meshphong_frag},standard:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.roughnessmap,UniformsLib.metalnessmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag},toon:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.gradientmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshtoon_vert,fragmentShader:ShaderChunk.meshtoon_frag},matcap:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,{matcap:{value:null}}]),vertexShader:ShaderChunk.meshmatcap_vert,fragmentShader:ShaderChunk.meshmatcap_frag},points:{uniforms:mergeUniforms([UniformsLib.points,UniformsLib.fog]),vertexShader:ShaderChunk.points_vert,fragmentShader:ShaderChunk.points_frag},dashed:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ShaderChunk.linedashed_vert,fragmentShader:ShaderChunk.linedashed_frag},depth:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap]),vertexShader:ShaderChunk.depth_vert,fragmentShader:ShaderChunk.depth_frag},normal:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,{opacity:{value:1}}]),vertexShader:ShaderChunk.meshnormal_vert,fragmentShader:ShaderChunk.meshnormal_frag},sprite:{uniforms:mergeUniforms([UniformsLib.sprite,UniformsLib.fog]),vertexShader:ShaderChunk.sprite_vert,fragmentShader:ShaderChunk.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ShaderChunk.background_vert,fragmentShader:ShaderChunk.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Matrix3}},vertexShader:ShaderChunk.backgroundCube_vert,fragmentShader:ShaderChunk.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ShaderChunk.cube_vert,fragmentShader:ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ShaderChunk.equirect_vert,fragmentShader:ShaderChunk.equirect_frag},distance:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1000}}]),vertexShader:ShaderChunk.distance_vert,fragmentShader:ShaderChunk.distance_frag},shadow:{uniforms:mergeUniforms([UniformsLib.lights,UniformsLib.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:ShaderChunk.shadow_vert,fragmentShader:ShaderChunk.shadow_frag}};ShaderLib.physical={uniforms:mergeUniforms([ShaderLib.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag};const _rgb={r:0,b:0,g:0};const _e1$1=new Euler;const _m1$1=new Matrix4;function WebGLBackground(renderer,cubemaps,cubeuvmaps,state,objects,alpha,premultipliedAlpha){const clearColor=new Color(0);let clearAlpha=alpha===true?0:1;let planeMesh;let boxMesh;let currentBackground=null;let currentBackgroundVersion=0;let currentTonemapping=null;function getBackground(scene){let background=scene.isScene===true?scene.background:null;if(background&&background.isTexture){const usePMREM=scene.backgroundBlurriness>0;background=(usePMREM?cubeuvmaps:cubemaps).get(background)}return background}function render(scene){let forceClear=false;const background=getBackground(scene);if(background===null){setClear(clearColor,clearAlpha)}else if(background&&background.isColor){setClear(background,1);forceClear=true}const environmentBlendMode=renderer.xr.getEnvironmentBlendMode();if(environmentBlendMode==="additive"){state.buffers.color.setClear(0,0,0,1,premultipliedAlpha)}else if(environmentBlendMode==="alpha-blend"){state.buffers.color.setClear(0,0,0,0,premultipliedAlpha)}if(renderer.autoClear||forceClear){state.buffers.depth.setTest(true);state.buffers.depth.setMask(true);state.buffers.color.setMask(true);renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil)}}function addToRenderList(renderList,scene){const background=getBackground(scene);if(background&&(background.isCubeTexture||background.mapping===CubeUVReflectionMapping)){if(boxMesh===undefined){boxMesh=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:"BackgroundCubeMaterial",uniforms:cloneUniforms(ShaderLib.backgroundCube.uniforms),vertexShader:ShaderLib.backgroundCube.vertexShader,fragmentShader:ShaderLib.backgroundCube.fragmentShader,side:BackSide,depthTest:false,depthWrite:false,fog:false,allowOverride:false}));boxMesh.geometry.deleteAttribute("normal");boxMesh.geometry.deleteAttribute("uv");boxMesh.onBeforeRender=function(renderer,scene,camera){this.matrixWorld.copyPosition(camera.matrixWorld)};Object.defineProperty(boxMesh.material,"envMap",{get:function(){return this.uniforms.envMap.value}});objects.update(boxMesh)}_e1$1.copy(scene.backgroundRotation);_e1$1.x*=-1;_e1$1.y*=-1;_e1$1.z*=-1;if(background.isCubeTexture&&background.isRenderTargetTexture===false){_e1$1.y*=-1;_e1$1.z*=-1}boxMesh.material.uniforms.envMap.value=background;boxMesh.material.uniforms.flipEnvMap.value=background.isCubeTexture&&background.isRenderTargetTexture===false?-1:1;boxMesh.material.uniforms.backgroundBlurriness.value=scene.backgroundBlurriness;boxMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity;boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4(_m1$1.makeRotationFromEuler(_e1$1));boxMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer;if(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer.toneMapping){boxMesh.material.needsUpdate=true;currentBackground=background;currentBackgroundVersion=background.version;currentTonemapping=renderer.toneMapping}boxMesh.layers.enableAll();renderList.unshift(boxMesh,boxMesh.geometry,boxMesh.material,0,0,null)}else if(background&&background.isTexture){if(planeMesh===undefined){planeMesh=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:"BackgroundMaterial",uniforms:cloneUniforms(ShaderLib.background.uniforms),vertexShader:ShaderLib.background.vertexShader,fragmentShader:ShaderLib.background.fragmentShader,side:FrontSide,depthTest:false,depthWrite:false,fog:false,allowOverride:false}));planeMesh.geometry.deleteAttribute("normal");Object.defineProperty(planeMesh.material,"map",{get:function(){return this.uniforms.t2D.value}});objects.update(planeMesh)}planeMesh.material.uniforms.t2D.value=background;planeMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity;planeMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer;if(background.matrixAutoUpdate===true){background.updateMatrix()}planeMesh.material.uniforms.uvTransform.value.copy(background.matrix);if(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer.toneMapping){planeMesh.material.needsUpdate=true;currentBackground=background;currentBackgroundVersion=background.version;currentTonemapping=renderer.toneMapping}planeMesh.layers.enableAll();renderList.unshift(planeMesh,planeMesh.geometry,planeMesh.material,0,0,null)}}function setClear(color,alpha){color.getRGB(_rgb,getUnlitUniformColorSpace(renderer));state.buffers.color.setClear(_rgb.r,_rgb.g,_rgb.b,alpha,premultipliedAlpha)}function dispose(){if(boxMesh!==undefined){boxMesh.geometry.dispose();boxMesh.material.dispose();boxMesh=undefined}if(planeMesh!==undefined){planeMesh.geometry.dispose();planeMesh.material.dispose();planeMesh=undefined}}return{getClearColor:function(){return clearColor},setClearColor:function(color,alpha=1){clearColor.set(color);clearAlpha=alpha;setClear(clearColor,clearAlpha)},getClearAlpha:function(){return clearAlpha},setClearAlpha:function(alpha){clearAlpha=alpha;setClear(clearColor,clearAlpha)},render:render,addToRenderList:addToRenderList,dispose:dispose}}function WebGLBindingStates(gl,attributes){const maxVertexAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS);const bindingStates={};const defaultState=createBindingState(null);let currentState=defaultState;let forceUpdate=false;function setup(object,material,program,geometry,index){let updateBuffers=false;const state=getBindingState(geometry,program,material);if(currentState!==state){currentState=state;bindVertexArrayObject(currentState.object)}updateBuffers=needsUpdate(object,geometry,program,index);if(updateBuffers)saveCache(object,geometry,program,index);if(index!==null){attributes.update(index,gl.ELEMENT_ARRAY_BUFFER)}if(updateBuffers||forceUpdate){forceUpdate=false;setupVertexAttributes(object,material,program,geometry);if(index!==null){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,attributes.get(index).buffer)}}}function createVertexArrayObject(){return gl.createVertexArray()}function bindVertexArrayObject(vao){return gl.bindVertexArray(vao)}function deleteVertexArrayObject(vao){return gl.deleteVertexArray(vao)}function getBindingState(geometry,program,material){const wireframe=material.wireframe===true;let programMap=bindingStates[geometry.id];if(programMap===undefined){programMap={};bindingStates[geometry.id]=programMap}let stateMap=programMap[program.id];if(stateMap===undefined){stateMap={};programMap[program.id]=stateMap}let state=stateMap[wireframe];if(state===undefined){state=createBindingState(createVertexArrayObject());stateMap[wireframe]=state}return state}function createBindingState(vao){const newAttributes=[];const enabledAttributes=[];const attributeDivisors=[];for(let i=0;i<maxVertexAttributes;i++){newAttributes[i]=0;enabledAttributes[i]=0;attributeDivisors[i]=0}return{geometry:null,program:null,wireframe:false,newAttributes:newAttributes,enabledAttributes:enabledAttributes,attributeDivisors:attributeDivisors,object:vao,attributes:{},index:null}}function needsUpdate(object,geometry,program,index){const cachedAttributes=currentState.attributes;const geometryAttributes=geometry.attributes;let attributesNum=0;const programAttributes=program.getAttributes();for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){const cachedAttribute=cachedAttributes[name];let geometryAttribute=geometryAttributes[name];if(geometryAttribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)geometryAttribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)geometryAttribute=object.instanceColor}if(cachedAttribute===undefined)return true;if(cachedAttribute.attribute!==geometryAttribute)return true;if(geometryAttribute&&cachedAttribute.data!==geometryAttribute.data)return true;attributesNum++}}if(currentState.attributesNum!==attributesNum)return true;if(currentState.index!==index)return true;return false}function saveCache(object,geometry,program,index){const cache={};const attributes=geometry.attributes;let attributesNum=0;const programAttributes=program.getAttributes();for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){let attribute=attributes[name];if(attribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)attribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)attribute=object.instanceColor}const data={};data.attribute=attribute;if(attribute&&attribute.data){data.data=attribute.data}cache[name]=data;attributesNum++}}currentState.attributes=cache;currentState.attributesNum=attributesNum;currentState.index=index}function initAttributes(){const newAttributes=currentState.newAttributes;for(let i=0,il=newAttributes.length;i<il;i++){newAttributes[i]=0}}function enableAttribute(attribute){enableAttributeAndDivisor(attribute,0)}function enableAttributeAndDivisor(attribute,meshPerAttribute){const newAttributes=currentState.newAttributes;const enabledAttributes=currentState.enabledAttributes;const attributeDivisors=currentState.attributeDivisors;newAttributes[attribute]=1;if(enabledAttributes[attribute]===0){gl.enableVertexAttribArray(attribute);enabledAttributes[attribute]=1}if(attributeDivisors[attribute]!==meshPerAttribute){gl.vertexAttribDivisor(attribute,meshPerAttribute);attributeDivisors[attribute]=meshPerAttribute}}function disableUnusedAttributes(){const newAttributes=currentState.newAttributes;const enabledAttributes=currentState.enabledAttributes;for(let i=0,il=enabledAttributes.length;i<il;i++){if(enabledAttributes[i]!==newAttributes[i]){gl.disableVertexAttribArray(i);enabledAttributes[i]=0}}}function vertexAttribPointer(index,size,type,normalized,stride,offset,integer){if(integer===true){gl.vertexAttribIPointer(index,size,type,stride,offset)}else{gl.vertexAttribPointer(index,size,type,normalized,stride,offset)}}function setupVertexAttributes(object,material,program,geometry){initAttributes();const geometryAttributes=geometry.attributes;const programAttributes=program.getAttributes();const materialDefaultAttributeValues=material.defaultAttributeValues;for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){let geometryAttribute=geometryAttributes[name];if(geometryAttribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)geometryAttribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)geometryAttribute=object.instanceColor}if(geometryAttribute!==undefined){const normalized=geometryAttribute.normalized;const size=geometryAttribute.itemSize;const attribute=attributes.get(geometryAttribute);if(attribute===undefined)continue;const buffer=attribute.buffer;const type=attribute.type;const bytesPerElement=attribute.bytesPerElement;const integer=type===gl.INT||type===gl.UNSIGNED_INT||geometryAttribute.gpuType===IntType;if(geometryAttribute.isInterleavedBufferAttribute){const data=geometryAttribute.data;const stride=data.stride;const offset=geometryAttribute.offset;if(data.isInstancedInterleavedBuffer){for(let i=0;i<programAttribute.locationSize;i++){enableAttributeAndDivisor(programAttribute.location+i,data.meshPerAttribute)}if(object.isInstancedMesh!==true&&geometry._maxInstanceCount===undefined){geometry._maxInstanceCount=data.meshPerAttribute*data.count}}else{for(let i=0;i<programAttribute.locationSize;i++){enableAttribute(programAttribute.location+i)}}gl.bindBuffer(gl.ARRAY_BUFFER,buffer);for(let i=0;i<programAttribute.locationSize;i++){vertexAttribPointer(programAttribute.location+i,size/programAttribute.locationSize,type,normalized,stride*bytesPerElement,(offset+size/programAttribute.locationSize*i)*bytesPerElement,integer)}}else{if(geometryAttribute.isInstancedBufferAttribute){for(let i=0;i<programAttribute.locationSize;i++){enableAttributeAndDivisor(programAttribute.location+i,geometryAttribute.meshPerAttribute)}if(object.isInstancedMesh!==true&&geometry._maxInstanceCount===undefined){geometry._maxInstanceCount=geometryAttribute.meshPerAttribute*geometryAttribute.count}}else{for(let i=0;i<programAttribute.locationSize;i++){enableAttribute(programAttribute.location+i)}}gl.bindBuffer(gl.ARRAY_BUFFER,buffer);for(let i=0;i<programAttribute.locationSize;i++){vertexAttribPointer(programAttribute.location+i,size/programAttribute.locationSize,type,normalized,size*bytesPerElement,size/programAttribute.locationSize*i*bytesPerElement,integer)}}}else if(materialDefaultAttributeValues!==undefined){const value=materialDefaultAttributeValues[name];if(value!==undefined){switch(value.length){case 2:gl.vertexAttrib2fv(programAttribute.location,value);break;case 3:gl.vertexAttrib3fv(programAttribute.location,value);break;case 4:gl.vertexAttrib4fv(programAttribute.location,value);break;default:gl.vertexAttrib1fv(programAttribute.location,value);}}}}}disableUnusedAttributes()}function dispose(){reset();for(const geometryId in bindingStates){const programMap=bindingStates[geometryId];for(const programId in programMap){const stateMap=programMap[programId];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[programId]}delete bindingStates[geometryId]}}function releaseStatesOfGeometry(geometry){if(bindingStates[geometry.id]===undefined)return;const programMap=bindingStates[geometry.id];for(const programId in programMap){const stateMap=programMap[programId];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[programId]}delete bindingStates[geometry.id]}function releaseStatesOfProgram(program){for(const geometryId in bindingStates){const programMap=bindingStates[geometryId];if(programMap[program.id]===undefined)continue;const stateMap=programMap[program.id];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[program.id]}}function reset(){resetDefaultState();forceUpdate=true;if(currentState===defaultState)return;currentState=defaultState;bindVertexArrayObject(currentState.object)}function resetDefaultState(){defaultState.geometry=null;defaultState.program=null;defaultState.wireframe=false}return{setup:setup,reset:reset,resetDefaultState:resetDefaultState,dispose:dispose,releaseStatesOfGeometry:releaseStatesOfGeometry,releaseStatesOfProgram:releaseStatesOfProgram,initAttributes:initAttributes,enableAttribute:enableAttribute,disableUnusedAttributes:disableUnusedAttributes}}function WebGLBufferRenderer(gl,extensions,info){let mode;function setMode(value){mode=value}function render(start,count){gl.drawArrays(mode,start,count);info.update(count,mode,1)}function renderInstances(start,count,primcount){if(primcount===0)return;gl.drawArraysInstanced(mode,start,count,primcount);info.update(count,mode,primcount)}function renderMultiDraw(starts,counts,drawCount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");extension.multiDrawArraysWEBGL(mode,starts,0,counts,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]}info.update(elementCount,mode,1)}function renderMultiDrawInstances(starts,counts,drawCount,primcount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");if(extension===null){for(let i=0;i<starts.length;i++){renderInstances(starts[i],counts[i],primcount[i])}}else{extension.multiDrawArraysInstancedWEBGL(mode,starts,0,counts,0,primcount,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]*primcount[i]}info.update(elementCount,mode,1)}}this.setMode=setMode;this.render=render;this.renderInstances=renderInstances;this.renderMultiDraw=renderMultiDraw;this.renderMultiDrawInstances=renderMultiDrawInstances}function WebGLCapabilities(gl,extensions,parameters,utils){let maxAnisotropy;function getMaxAnisotropy(){if(maxAnisotropy!==undefined)return maxAnisotropy;if(extensions.has("EXT_texture_filter_anisotropic")===true){const extension=extensions.get("EXT_texture_filter_anisotropic");maxAnisotropy=gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else{maxAnisotropy=0}return maxAnisotropy}function textureFormatReadable(textureFormat){if(textureFormat!==RGBAFormat&&utils.convert(textureFormat)!==gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT)){return false}return true}function textureTypeReadable(textureType){const halfFloatSupportedByExt=textureType===HalfFloatType&&(extensions.has("EXT_color_buffer_half_float")||extensions.has("EXT_color_buffer_float"));if(textureType!==UnsignedByteType&&utils.convert(textureType)!==gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE)&&textureType!==FloatType&&!halfFloatSupportedByExt){return false}return true}function getMaxPrecision(precision){if(precision==="highp"){if(gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.HIGH_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.HIGH_FLOAT).precision>0){return"highp"}precision="mediump"}if(precision==="mediump"){if(gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.MEDIUM_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.MEDIUM_FLOAT).precision>0){return"mediump"}}return"lowp"}let precision=parameters.precision!==undefined?parameters.precision:"highp";const maxPrecision=getMaxPrecision(precision);if(maxPrecision!==precision){warn("WebGLRenderer:",precision,"not supported, using",maxPrecision,"instead.");precision=maxPrecision}const logarithmicDepthBuffer=parameters.logarithmicDepthBuffer===true;const reversedDepthBuffer=parameters.reversedDepthBuffer===true&&extensions.has("EXT_clip_control");const maxTextures=gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);const maxVertexTextures=gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);const maxTextureSize=gl.getParameter(gl.MAX_TEXTURE_SIZE);const maxCubemapSize=gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);const maxAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS);const maxVertexUniforms=gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);const maxVaryings=gl.getParameter(gl.MAX_VARYING_VECTORS);const maxFragmentUniforms=gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);const maxSamples=gl.getParameter(gl.MAX_SAMPLES);const samples=gl.getParameter(gl.SAMPLES);return{isWebGL2:true,getMaxAnisotropy:getMaxAnisotropy,getMaxPrecision:getMaxPrecision,textureFormatReadable:textureFormatReadable,textureTypeReadable:textureTypeReadable,precision:precision,logarithmicDepthBuffer:logarithmicDepthBuffer,reversedDepthBuffer:reversedDepthBuffer,maxTextures:maxTextures,maxVertexTextures:maxVertexTextures,maxTextureSize:maxTextureSize,maxCubemapSize:maxCubemapSize,maxAttributes:maxAttributes,maxVertexUniforms:maxVertexUniforms,maxVaryings:maxVaryings,maxFragmentUniforms:maxFragmentUniforms,maxSamples:maxSamples,samples:samples}}function WebGLClipping(properties){const scope=this;let globalState=null,numGlobalPlanes=0,localClippingEnabled=false,renderingShadows=false;const plane=new Plane,viewNormalMatrix=new Matrix3,uniform={value:null,needsUpdate:false};this.uniform=uniform;this.numPlanes=0;this.numIntersection=0;this.init=function(planes,enableLocalClipping){const enabled=planes.length!==0||enableLocalClipping||numGlobalPlanes!==0||localClippingEnabled;localClippingEnabled=enableLocalClipping;numGlobalPlanes=planes.length;return enabled};this.beginShadows=function(){renderingShadows=true;projectPlanes(null)};this.endShadows=function(){renderingShadows=false};this.setGlobalState=function(planes,camera){globalState=projectPlanes(planes,camera,0)};this.setState=function(material,camera,useCache){const planes=material.clippingPlanes,clipIntersection=material.clipIntersection,clipShadows=material.clipShadows;const materialProperties=properties.get(material);if(!localClippingEnabled||planes===null||planes.length===0||renderingShadows&&!clipShadows){if(renderingShadows){projectPlanes(null)}else{resetGlobalState()}}else{const nGlobal=renderingShadows?0:numGlobalPlanes,lGlobal=nGlobal*4;let dstArray=materialProperties.clippingState||null;uniform.value=dstArray;dstArray=projectPlanes(planes,camera,lGlobal,useCache);for(let i=0;i!==lGlobal;++i){dstArray[i]=globalState[i]}materialProperties.clippingState=dstArray;this.numIntersection=clipIntersection?this.numPlanes:0;this.numPlanes+=nGlobal}};function resetGlobalState(){if(uniform.value!==globalState){uniform.value=globalState;uniform.needsUpdate=numGlobalPlanes>0}scope.numPlanes=numGlobalPlanes;scope.numIntersection=0}function projectPlanes(planes,camera,dstOffset,skipTransform){const nPlanes=planes!==null?planes.length:0;let dstArray=null;if(nPlanes!==0){dstArray=uniform.value;if(skipTransform!==true||dstArray===null){const flatSize=dstOffset+nPlanes*4,viewMatrix=camera.matrixWorldInverse;viewNormalMatrix.getNormalMatrix(viewMatrix);if(dstArray===null||dstArray.length<flatSize){dstArray=new Float32Array(flatSize)}for(let i=0,i4=dstOffset;i!==nPlanes;++i,i4+=4){plane.copy(planes[i]).applyMatrix4(viewMatrix,viewNormalMatrix);plane.normal.toArray(dstArray,i4);dstArray[i4+3]=plane.constant}}uniform.value=dstArray;uniform.needsUpdate=true}scope.numPlanes=nPlanes;scope.numIntersection=0;return dstArray}}function WebGLCubeMaps(renderer){let cubemaps=new WeakMap;function mapTextureMapping(texture,mapping){if(mapping===EquirectangularReflectionMapping){texture.mapping=CubeReflectionMapping}else if(mapping===EquirectangularRefractionMapping){texture.mapping=CubeRefractionMapping}return texture}function get(texture){if(texture&&texture.isTexture){const mapping=texture.mapping;if(mapping===EquirectangularReflectionMapping||mapping===EquirectangularRefractionMapping){if(cubemaps.has(texture)){const cubemap=cubemaps.get(texture).texture;return mapTextureMapping(cubemap,texture.mapping)}else{const image=texture.image;if(image&&image.height>0){const renderTarget=new WebGLCubeRenderTarget(image.height);renderTarget.fromEquirectangularTexture(renderer,texture);cubemaps.set(texture,renderTarget);texture.addEventListener("dispose",onTextureDispose);return mapTextureMapping(renderTarget.texture,texture.mapping)}else{return null}}}}return texture}function onTextureDispose(event){const texture=event.target;texture.removeEventListener("dispose",onTextureDispose);const cubemap=cubemaps.get(texture);if(cubemap!==undefined){cubemaps.delete(texture);cubemap.dispose()}}function dispose(){cubemaps=new WeakMap}return{get:get,dispose:dispose}}const LOD_MIN=4;const EXTRA_LOD_SIGMA=[0.125,0.215,0.35,0.446,0.526,0.582];const MAX_SAMPLES=20;const GGX_SAMPLES=256;const _flatCamera=new OrthographicCamera;const _clearColor=new Color;let _oldTarget=null;let _oldActiveCubeFace=0;let _oldActiveMipmapLevel=0;let _oldXrEnabled=false;const _origin=new Vector3;class PMREMGenerator{constructor(renderer){this._renderer=renderer;this._pingPongRenderTarget=null;this._lodMax=0;this._cubeSize=0;this._sizeLods=[];this._sigmas=[];this._lodMeshes=[];this._backgroundBox=null;this._cubemapMaterial=null;this._equirectMaterial=null;this._blurMaterial=null;this._ggxMaterial=null}fromScene(scene,sigma=0,near=0.1,far=100,options={}){const{size=256,position=_origin}=options;_oldTarget=this._renderer.getRenderTarget();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;this._setSize(size);const cubeUVRenderTarget=this._allocateTargets();cubeUVRenderTarget.depthBuffer=true;this._sceneToCubeUV(scene,near,far,cubeUVRenderTarget,position);if(sigma>0){this._blur(cubeUVRenderTarget,0,0,sigma)}this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}fromEquirectangular(equirectangular,renderTarget=null){return this._fromTexture(equirectangular,renderTarget)}fromCubemap(cubemap,renderTarget=null){return this._fromTexture(cubemap,renderTarget)}compileCubemapShader(){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial();this._compileMaterial(this._cubemapMaterial)}}compileEquirectangularShader(){if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial();this._compileMaterial(this._equirectMaterial)}}dispose(){this._dispose();if(this._cubemapMaterial!==null)this._cubemapMaterial.dispose();if(this._equirectMaterial!==null)this._equirectMaterial.dispose();if(this._backgroundBox!==null){this._backgroundBox.geometry.dispose();this._backgroundBox.material.dispose()}}_setSize(cubeSize){this._lodMax=Math.floor(Math.log2(cubeSize));this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){if(this._blurMaterial!==null)this._blurMaterial.dispose();if(this._ggxMaterial!==null)this._ggxMaterial.dispose();if(this._pingPongRenderTarget!==null)this._pingPongRenderTarget.dispose();for(let i=0;i<this._lodMeshes.length;i++){this._lodMeshes[i].geometry.dispose()}}_cleanup(outputTarget){this._renderer.setRenderTarget(_oldTarget,_oldActiveCubeFace,_oldActiveMipmapLevel);this._renderer.xr.enabled=_oldXrEnabled;outputTarget.scissorTest=false;_setViewport(outputTarget,0,0,outputTarget.width,outputTarget.height)}_fromTexture(texture,renderTarget){if(texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping){this._setSize(texture.image.length===0?16:texture.image[0].width||texture.image[0].image.width)}else{this._setSize(texture.image.width/4)}_oldTarget=this._renderer.getRenderTarget();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;const cubeUVRenderTarget=renderTarget||this._allocateTargets();this._textureToCubeUV(texture,cubeUVRenderTarget);this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}_allocateTargets(){const width=3*Math.max(this._cubeSize,16*7);const height=4*this._cubeSize;const params={magFilter:LinearFilter,minFilter:LinearFilter,generateMipmaps:false,type:HalfFloatType,format:RGBAFormat,colorSpace:LinearSRGBColorSpace,depthBuffer:false};const cubeUVRenderTarget=_createRenderTarget(width,height,params);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==width||this._pingPongRenderTarget.height!==height){if(this._pingPongRenderTarget!==null){this._dispose()}this._pingPongRenderTarget=_createRenderTarget(width,height,params);const{_lodMax}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=_createPlanes(_lodMax));this._blurMaterial=_getBlurShader(_lodMax,width,height);this._ggxMaterial=_getGGXShader(_lodMax,width,height)}return cubeUVRenderTarget}_compileMaterial(material){const mesh=new Mesh(new BufferGeometry(),material);this._renderer.compile(mesh,_flatCamera)}_sceneToCubeUV(scene,near,far,cubeUVRenderTarget,position){const fov=90;const aspect=1;const cubeCamera=new PerspectiveCamera(fov,aspect,near,far);const upSign=[1,-1,1,1,1,1];const forwardSign=[1,1,1,-1,-1,-1];const renderer=this._renderer;const originalAutoClear=renderer.autoClear;const toneMapping=renderer.toneMapping;renderer.getClearColor(_clearColor);renderer.toneMapping=NoToneMapping;renderer.autoClear=false;const reversedDepthBuffer=renderer.state.buffers.depth.getReversed();if(reversedDepthBuffer){renderer.setRenderTarget(cubeUVRenderTarget);renderer.clearDepth();renderer.setRenderTarget(null)}if(this._backgroundBox===null){this._backgroundBox=new Mesh(new BoxGeometry(),new MeshBasicMaterial({name:"PMREM.Background",side:BackSide,depthWrite:false,depthTest:false}))}const backgroundBox=this._backgroundBox;const backgroundMaterial=backgroundBox.material;let useSolidColor=false;const background=scene.background;if(background){if(background.isColor){backgroundMaterial.color.copy(background);scene.background=null;useSolidColor=true}}else{backgroundMaterial.color.copy(_clearColor);useSolidColor=true}for(let i=0;i<6;i++){const col=i%3;if(col===0){cubeCamera.up.set(0,upSign[i],0);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x+forwardSign[i],position.y,position.z)}else if(col===1){cubeCamera.up.set(0,0,upSign[i]);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x,position.y+forwardSign[i],position.z)}else{cubeCamera.up.set(0,upSign[i],0);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x,position.y,position.z+forwardSign[i])}const size=this._cubeSize;_setViewport(cubeUVRenderTarget,col*size,i>2?size:0,size,size);renderer.setRenderTarget(cubeUVRenderTarget);if(useSolidColor){renderer.render(backgroundBox,cubeCamera)}renderer.render(scene,cubeCamera)}renderer.toneMapping=toneMapping;renderer.autoClear=originalAutoClear;scene.background=background}_textureToCubeUV(texture,cubeUVRenderTarget){const renderer=this._renderer;const isCubeTexture=texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping;if(isCubeTexture){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial()}this._cubemapMaterial.uniforms.flipEnvMap.value=texture.isRenderTargetTexture===false?-1:1}else{if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial()}}const material=isCubeTexture?this._cubemapMaterial:this._equirectMaterial;const mesh=this._lodMeshes[0];mesh.material=material;const uniforms=material.uniforms;uniforms["envMap"].value=texture;const size=this._cubeSize;_setViewport(cubeUVRenderTarget,0,0,3*size,2*size);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(mesh,_flatCamera)}_applyPMREM(cubeUVRenderTarget){const renderer=this._renderer;const autoClear=renderer.autoClear;renderer.autoClear=false;const n=this._lodMeshes.length;for(let i=1;i<n;i++){this._applyGGXFilter(cubeUVRenderTarget,i-1,i)}renderer.autoClear=autoClear}_applyGGXFilter(cubeUVRenderTarget,lodIn,lodOut){const renderer=this._renderer;const pingPongRenderTarget=this._pingPongRenderTarget;const ggxMaterial=this._ggxMaterial;const ggxMesh=this._lodMeshes[lodOut];ggxMesh.material=ggxMaterial;const ggxUniforms=ggxMaterial.uniforms;const targetRoughness=lodOut/(this._lodMeshes.length-1);const sourceRoughness=lodIn/(this._lodMeshes.length-1);const incrementalRoughness=Math.sqrt(targetRoughness*targetRoughness-sourceRoughness*sourceRoughness);const blurStrength=0+targetRoughness*1.25;const adjustedRoughness=incrementalRoughness*blurStrength;const{_lodMax}=this;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);ggxUniforms["envMap"].value=cubeUVRenderTarget.texture;ggxUniforms["roughness"].value=adjustedRoughness;ggxUniforms["mipInt"].value=_lodMax-lodIn;_setViewport(pingPongRenderTarget,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(pingPongRenderTarget);renderer.render(ggxMesh,_flatCamera);ggxUniforms["envMap"].value=pingPongRenderTarget.texture;ggxUniforms["roughness"].value=0;ggxUniforms["mipInt"].value=_lodMax-lodOut;_setViewport(cubeUVRenderTarget,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(ggxMesh,_flatCamera)}_blur(cubeUVRenderTarget,lodIn,lodOut,sigma,poleAxis){const pingPongRenderTarget=this._pingPongRenderTarget;this._halfBlur(cubeUVRenderTarget,pingPongRenderTarget,lodIn,lodOut,sigma,"latitudinal",poleAxis);this._halfBlur(pingPongRenderTarget,cubeUVRenderTarget,lodOut,lodOut,sigma,"longitudinal",poleAxis)}_halfBlur(targetIn,targetOut,lodIn,lodOut,sigmaRadians,direction,poleAxis){const renderer=this._renderer;const blurMaterial=this._blurMaterial;if(direction!=="latitudinal"&&direction!=="longitudinal"){error("blur direction must be either latitudinal or longitudinal!")}const STANDARD_DEVIATIONS=3;const blurMesh=this._lodMeshes[lodOut];blurMesh.material=blurMaterial;const blurUniforms=blurMaterial.uniforms;const pixels=this._sizeLods[lodIn]-1;const radiansPerPixel=isFinite(sigmaRadians)?Math.PI/(2*pixels):2*Math.PI/(2*MAX_SAMPLES-1);const sigmaPixels=sigmaRadians/radiansPerPixel;const samples=isFinite(sigmaRadians)?1+Math.floor(STANDARD_DEVIATIONS*sigmaPixels):MAX_SAMPLES;if(samples>MAX_SAMPLES){warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`)}const weights=[];let sum=0;for(let i=0;i<MAX_SAMPLES;++i){const x=i/sigmaPixels;const weight=Math.exp(-x*x/2);weights.push(weight);if(i===0){sum+=weight}else if(i<samples){sum+=2*weight}}for(let i=0;i<weights.length;i++){weights[i]=weights[i]/sum}blurUniforms["envMap"].value=targetIn.texture;blurUniforms["samples"].value=samples;blurUniforms["weights"].value=weights;blurUniforms["latitudinal"].value=direction==="latitudinal";if(poleAxis){blurUniforms["poleAxis"].value=poleAxis}const{_lodMax}=this;blurUniforms["dTheta"].value=radiansPerPixel;blurUniforms["mipInt"].value=_lodMax-lodIn;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);_setViewport(targetOut,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(targetOut);renderer.render(blurMesh,_flatCamera)}}function _createPlanes(lodMax){const sizeLods=[];const sigmas=[];const lodMeshes=[];let lod=lodMax;const totalLods=lodMax-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let i=0;i<totalLods;i++){const sizeLod=Math.pow(2,lod);sizeLods.push(sizeLod);let sigma=1/sizeLod;if(i>lodMax-LOD_MIN){sigma=EXTRA_LOD_SIGMA[i-lodMax+LOD_MIN-1]}else if(i===0){sigma=0}sigmas.push(sigma);const texelSize=1/(sizeLod-2);const min=-texelSize;const max=1+texelSize;const uv1=[min,min,max,min,max,max,min,min,max,max,min,max];const cubeFaces=6;const vertices=6;const positionSize=3;const uvSize=2;const faceIndexSize=1;const position=new Float32Array(positionSize*vertices*cubeFaces);const uv=new Float32Array(uvSize*vertices*cubeFaces);const faceIndex=new Float32Array(faceIndexSize*vertices*cubeFaces);for(let face=0;face<cubeFaces;face++){const x=face%3*2/3-1;const y=face>2?0:-1;const coordinates=[x,y,0,x+2/3,y,0,x+2/3,y+1,0,x,y,0,x+2/3,y+1,0,x,y+1,0];position.set(coordinates,positionSize*vertices*face);uv.set(uv1,uvSize*vertices*face);const fill=[face,face,face,face,face,face];faceIndex.set(fill,faceIndexSize*vertices*face)}const planes=new BufferGeometry;planes.setAttribute("position",new BufferAttribute(position,positionSize));planes.setAttribute("uv",new BufferAttribute(uv,uvSize));planes.setAttribute("faceIndex",new BufferAttribute(faceIndex,faceIndexSize));lodMeshes.push(new Mesh(planes,null));if(lod>LOD_MIN){lod--}}return{lodMeshes,sizeLods,sigmas}}function _createRenderTarget(width,height,params){const cubeUVRenderTarget=new WebGLRenderTarget(width,height,params);cubeUVRenderTarget.texture.mapping=CubeUVReflectionMapping;cubeUVRenderTarget.texture.name="PMREM.cubeUv";cubeUVRenderTarget.scissorTest=true;return cubeUVRenderTarget}function _setViewport(target,x,y,width,height){target.viewport.set(x,y,width,height);target.scissor.set(x,y,width,height)}function _getGGXShader(lodMax,width,height){const shaderMaterial=new ShaderMaterial({name:"PMREMGGXConvolution",defines:{"GGX_SAMPLES":GGX_SAMPLES,"CUBEUV_TEXEL_WIDTH":1/width,"CUBEUV_TEXEL_HEIGHT":1/height,"CUBEUV_MAX_MIP":`${lodMax}.0`},uniforms:{"envMap":{value:null},"roughness":{value:0},"mipInt":{value:0}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision highp float;
			precision highp int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform float roughness;
			uniform float mipInt;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			#define PI 3.14159265359

			// Van der Corput radical inverse
			float radicalInverse_VdC(uint bits) {
				bits = (bits << 16u) | (bits >> 16u);
				bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
				bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
				bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
				bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
				return float(bits) * 2.3283064365386963e-10; // / 0x100000000
			}

			// Hammersley sequence
			vec2 hammersley(uint i, uint N) {
				return vec2(float(i) / float(N), radicalInverse_VdC(i));
			}

			// GGX VNDF importance sampling (Eric Heitz 2018)
			// "Sampling the GGX Distribution of Visible Normals"
			// https://jcgt.org/published/0007/04/01/
			vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {
				float alpha = roughness * roughness;

				// Section 3.2: Transform view direction to hemisphere configuration
				vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z));

				// Section 4.1: Orthonormal basis
				float lensq = Vh.x * Vh.x + Vh.y * Vh.y;
				vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0);
				vec3 T2 = cross(Vh, T1);

				// Section 4.2: Parameterization of projected area
				float r = sqrt(Xi.x);
				float phi = 2.0 * PI * Xi.y;
				float t1 = r * cos(phi);
				float t2 = r * sin(phi);
				float s = 0.5 * (1.0 + Vh.z);
				t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;

				// Section 4.3: Reprojection onto hemisphere
				vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh;

				// Section 3.4: Transform back to ellipsoid configuration
				return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));
			}

			void main() {
				vec3 N = normalize(vOutputDirection);
				vec3 V = N; // Assume view direction equals normal for pre-filtering

				vec3 prefilteredColor = vec3(0.0);
				float totalWeight = 0.0;

				// For very low roughness, just sample the environment directly
				if (roughness < 0.001) {
					gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0);
					return;
				}

				// Tangent space basis for VNDF sampling
				vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
				vec3 tangent = normalize(cross(up, N));
				vec3 bitangent = cross(N, tangent);

				for(uint i = 0u; i < uint(GGX_SAMPLES); i++) {
					vec2 Xi = hammersley(i, uint(GGX_SAMPLES));

					// For PMREM, V = N, so in tangent space V is always (0, 0, 1)
					vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness);

					// Transform H back to world space
					vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z);
					vec3 L = normalize(2.0 * dot(V, H) * H - V);

					float NdotL = max(dot(N, L), 0.0);

					if(NdotL > 0.0) {
						// Sample environment at fixed mip level
						// VNDF importance sampling handles the distribution filtering
						vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt);

						// Weight by NdotL for the split-sum approximation
						// VNDF PDF naturally accounts for the visible microfacet distribution
						prefilteredColor += sampleColor * NdotL;
						totalWeight += NdotL;
					}
				}

				if (totalWeight > 0.0) {
					prefilteredColor = prefilteredColor / totalWeight;
				}

				gl_FragColor = vec4(prefilteredColor, 1.0);
			}
		`,blending:NoBlending,depthTest:false,depthWrite:false});return shaderMaterial}function _getBlurShader(lodMax,width,height){const weights=new Float32Array(MAX_SAMPLES);const poleAxis=new Vector3(0,1,0);const shaderMaterial=new ShaderMaterial({name:"SphericalGaussianBlur",defines:{"n":MAX_SAMPLES,"CUBEUV_TEXEL_WIDTH":1/width,"CUBEUV_TEXEL_HEIGHT":1/height,"CUBEUV_MAX_MIP":`${lodMax}.0`},uniforms:{"envMap":{value:null},"samples":{value:1},"weights":{value:weights},"latitudinal":{value:false},"dTheta":{value:0},"mipInt":{value:0},"poleAxis":{value:poleAxis}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform int samples;
			uniform float weights[ n ];
			uniform bool latitudinal;
			uniform float dTheta;
			uniform float mipInt;
			uniform vec3 poleAxis;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

				float cosTheta = cos( theta );
				// Rodrigues' axis-angle rotation
				vec3 sampleDirection = vOutputDirection * cosTheta
					+ cross( axis, vOutputDirection ) * sin( theta )
					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

				}

				axis = normalize( axis );

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

				for ( int i = 1; i < n; i++ ) {

					if ( i >= samples ) {

						break;

					}

					float theta = dTheta * float( i );
					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

				}

			}
		`,blending:NoBlending,depthTest:false,depthWrite:false});return shaderMaterial}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{"envMap":{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;

			#include <common>

			void main() {

				vec3 outputDirection = normalize( vOutputDirection );
				vec2 uv = equirectUv( outputDirection );

				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );

			}
		`,blending:NoBlending,depthTest:false,depthWrite:false})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{"envMap":{value:null},"flipEnvMap":{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

			}
		`,blending:NoBlending,depthTest:false,depthWrite:false})}function _getCommonVertexShader(){return`

		precision mediump float;
		precision mediump int;

		attribute float faceIndex;

		varying vec3 vOutputDirection;

		// RH coordinate system; PMREM face-indexing convention
		vec3 getDirection( vec2 uv, float face ) {

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

				direction = direction.zyx; // ( 1, v, u ) pos x

			} else if ( face == 1.0 ) {

				direction = direction.xzy;
				direction.xz *= -1.0; // ( -u, 1, -v ) pos y

			} else if ( face == 2.0 ) {

				direction.x *= -1.0; // ( -u, v, 1 ) pos z

			} else if ( face == 3.0 ) {

				direction = direction.zyx;
				direction.xz *= -1.0; // ( -1, v, -u ) neg x

			} else if ( face == 4.0 ) {

				direction = direction.xzy;
				direction.xy *= -1.0; // ( -u, -1, v ) neg y

			} else if ( face == 5.0 ) {

				direction.z *= -1.0; // ( u, v, -1 ) neg z

			}

			return direction;

		}

		void main() {

			vOutputDirection = getDirection( uv, faceIndex );
			gl_Position = vec4( position, 1.0 );

		}
	`}function WebGLCubeUVMaps(renderer){let cubeUVmaps=new WeakMap;let pmremGenerator=null;function get(texture){if(texture&&texture.isTexture){const mapping=texture.mapping;const isEquirectMap=mapping===EquirectangularReflectionMapping||mapping===EquirectangularRefractionMapping;const isCubeMap=mapping===CubeReflectionMapping||mapping===CubeRefractionMapping;if(isEquirectMap||isCubeMap){let renderTarget=cubeUVmaps.get(texture);const currentPMREMVersion=renderTarget!==undefined?renderTarget.texture.pmremVersion:0;if(texture.isRenderTargetTexture&&texture.pmremVersion!==currentPMREMVersion){if(pmremGenerator===null)pmremGenerator=new PMREMGenerator(renderer);renderTarget=isEquirectMap?pmremGenerator.fromEquirectangular(texture,renderTarget):pmremGenerator.fromCubemap(texture,renderTarget);renderTarget.texture.pmremVersion=texture.pmremVersion;cubeUVmaps.set(texture,renderTarget);return renderTarget.texture}else{if(renderTarget!==undefined){return renderTarget.texture}else{const image=texture.image;if(isEquirectMap&&image&&image.height>0||isCubeMap&&image&&isCubeTextureComplete(image)){if(pmremGenerator===null)pmremGenerator=new PMREMGenerator(renderer);renderTarget=isEquirectMap?pmremGenerator.fromEquirectangular(texture):pmremGenerator.fromCubemap(texture);renderTarget.texture.pmremVersion=texture.pmremVersion;cubeUVmaps.set(texture,renderTarget);texture.addEventListener("dispose",onTextureDispose);return renderTarget.texture}else{return null}}}}}return texture}function isCubeTextureComplete(image){let count=0;const length=6;for(let i=0;i<length;i++){if(image[i]!==undefined)count++}return count===length}function onTextureDispose(event){const texture=event.target;texture.removeEventListener("dispose",onTextureDispose);const cubemapUV=cubeUVmaps.get(texture);if(cubemapUV!==undefined){cubeUVmaps.delete(texture);cubemapUV.dispose()}}function dispose(){cubeUVmaps=new WeakMap;if(pmremGenerator!==null){pmremGenerator.dispose();pmremGenerator=null}}return{get:get,dispose:dispose}}function WebGLExtensions(gl){const extensions={};function getExtension(name){if(extensions[name]!==undefined){return extensions[name]}const extension=gl.getExtension(name);extensions[name]=extension;return extension}return{has:function(name){return getExtension(name)!==null},init:function(){getExtension("EXT_color_buffer_float");getExtension("WEBGL_clip_cull_distance");getExtension("OES_texture_float_linear");getExtension("EXT_color_buffer_half_float");getExtension("WEBGL_multisampled_render_to_texture");getExtension("WEBGL_render_shared_exponent")},get:function(name){const extension=getExtension(name);if(extension===null){warnOnce("WebGLRenderer: "+name+" extension not supported.")}return extension}}}function WebGLGeometries(gl,attributes,info,bindingStates){const geometries={};const wireframeAttributes=new WeakMap;function onGeometryDispose(event){const geometry=event.target;if(geometry.index!==null){attributes.remove(geometry.index)}for(const name in geometry.attributes){attributes.remove(geometry.attributes[name])}geometry.removeEventListener("dispose",onGeometryDispose);delete geometries[geometry.id];const attribute=wireframeAttributes.get(geometry);if(attribute){attributes.remove(attribute);wireframeAttributes.delete(geometry)}bindingStates.releaseStatesOfGeometry(geometry);if(geometry.isInstancedBufferGeometry===true){delete geometry._maxInstanceCount}info.memory.geometries--}function get(object,geometry){if(geometries[geometry.id]===true)return geometry;geometry.addEventListener("dispose",onGeometryDispose);geometries[geometry.id]=true;info.memory.geometries++;return geometry}function update(geometry){const geometryAttributes=geometry.attributes;for(const name in geometryAttributes){attributes.update(geometryAttributes[name],gl.ARRAY_BUFFER)}}function updateWireframeAttribute(geometry){const indices=[];const geometryIndex=geometry.index;const geometryPosition=geometry.attributes.position;let version=0;if(geometryIndex!==null){const array=geometryIndex.array;version=geometryIndex.version;for(let i=0,l=array.length;i<l;i+=3){const a=array[i+0];const b=array[i+1];const c=array[i+2];indices.push(a,b,b,c,c,a)}}else if(geometryPosition!==undefined){const array=geometryPosition.array;version=geometryPosition.version;for(let i=0,l=array.length/3-1;i<l;i+=3){const a=i+0;const b=i+1;const c=i+2;indices.push(a,b,b,c,c,a)}}else{return}const attribute=new(arrayNeedsUint32(indices)?Uint32BufferAttribute:Uint16BufferAttribute)(indices,1);attribute.version=version;const previousAttribute=wireframeAttributes.get(geometry);if(previousAttribute)attributes.remove(previousAttribute);wireframeAttributes.set(geometry,attribute)}function getWireframeAttribute(geometry){const currentAttribute=wireframeAttributes.get(geometry);if(currentAttribute){const geometryIndex=geometry.index;if(geometryIndex!==null){if(currentAttribute.version<geometryIndex.version){updateWireframeAttribute(geometry)}}}else{updateWireframeAttribute(geometry)}return wireframeAttributes.get(geometry)}return{get:get,update:update,getWireframeAttribute:getWireframeAttribute}}function WebGLIndexedBufferRenderer(gl,extensions,info){let mode;function setMode(value){mode=value}let type,bytesPerElement;function setIndex(value){type=value.type;bytesPerElement=value.bytesPerElement}function render(start,count){gl.drawElements(mode,count,type,start*bytesPerElement);info.update(count,mode,1)}function renderInstances(start,count,primcount){if(primcount===0)return;gl.drawElementsInstanced(mode,count,type,start*bytesPerElement,primcount);info.update(count,mode,primcount)}function renderMultiDraw(starts,counts,drawCount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");extension.multiDrawElementsWEBGL(mode,counts,0,type,starts,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]}info.update(elementCount,mode,1)}function renderMultiDrawInstances(starts,counts,drawCount,primcount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");if(extension===null){for(let i=0;i<starts.length;i++){renderInstances(starts[i]/bytesPerElement,counts[i],primcount[i])}}else{extension.multiDrawElementsInstancedWEBGL(mode,counts,0,type,starts,0,primcount,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]*primcount[i]}info.update(elementCount,mode,1)}}this.setMode=setMode;this.setIndex=setIndex;this.render=render;this.renderInstances=renderInstances;this.renderMultiDraw=renderMultiDraw;this.renderMultiDrawInstances=renderMultiDrawInstances}function WebGLInfo(gl){const memory={geometries:0,textures:0};const render={frame:0,calls:0,triangles:0,points:0,lines:0};function update(count,mode,instanceCount){render.calls++;switch(mode){case gl.TRIANGLES:render.triangles+=instanceCount*(count/3);break;case gl.LINES:render.lines+=instanceCount*(count/2);break;case gl.LINE_STRIP:render.lines+=instanceCount*(count-1);break;case gl.LINE_LOOP:render.lines+=instanceCount*count;break;case gl.POINTS:render.points+=instanceCount*count;break;default:error("WebGLInfo: Unknown draw mode:",mode);break;}}function reset(){render.calls=0;render.triangles=0;render.points=0;render.lines=0}return{memory:memory,render:render,programs:null,autoReset:true,reset:reset,update:update}}function WebGLMorphtargets(gl,capabilities,textures){const morphTextures=new WeakMap;const morph=new Vector4;function update(object,geometry,program){const objectInfluences=object.morphTargetInfluences;const morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color;const morphTargetsCount=morphAttribute!==undefined?morphAttribute.length:0;let entry=morphTextures.get(geometry);if(entry===undefined||entry.count!==morphTargetsCount){if(entry!==undefined)entry.texture.dispose();const hasMorphPosition=geometry.morphAttributes.position!==undefined;const hasMorphNormals=geometry.morphAttributes.normal!==undefined;const hasMorphColors=geometry.morphAttributes.color!==undefined;const morphTargets=geometry.morphAttributes.position||[];const morphNormals=geometry.morphAttributes.normal||[];const morphColors=geometry.morphAttributes.color||[];let vertexDataCount=0;if(hasMorphPosition===true)vertexDataCount=1;if(hasMorphNormals===true)vertexDataCount=2;if(hasMorphColors===true)vertexDataCount=3;let width=geometry.attributes.position.count*vertexDataCount;let height=1;if(width>capabilities.maxTextureSize){height=Math.ceil(width/capabilities.maxTextureSize);width=capabilities.maxTextureSize}const buffer=new Float32Array(width*height*4*morphTargetsCount);const texture=new DataArrayTexture(buffer,width,height,morphTargetsCount);texture.type=FloatType;texture.needsUpdate=true;const vertexDataStride=vertexDataCount*4;for(let i=0;i<morphTargetsCount;i++){const morphTarget=morphTargets[i];const morphNormal=morphNormals[i];const morphColor=morphColors[i];const offset=width*height*4*i;for(let j=0;j<morphTarget.count;j++){const stride=j*vertexDataStride;if(hasMorphPosition===true){morph.fromBufferAttribute(morphTarget,j);buffer[offset+stride+0]=morph.x;buffer[offset+stride+1]=morph.y;buffer[offset+stride+2]=morph.z;buffer[offset+stride+3]=0}if(hasMorphNormals===true){morph.fromBufferAttribute(morphNormal,j);buffer[offset+stride+4]=morph.x;buffer[offset+stride+5]=morph.y;buffer[offset+stride+6]=morph.z;buffer[offset+stride+7]=0}if(hasMorphColors===true){morph.fromBufferAttribute(morphColor,j);buffer[offset+stride+8]=morph.x;buffer[offset+stride+9]=morph.y;buffer[offset+stride+10]=morph.z;buffer[offset+stride+11]=morphColor.itemSize===4?morph.w:1}}}entry={count:morphTargetsCount,texture:texture,size:new Vector2(width,height)};morphTextures.set(geometry,entry);function disposeTexture(){texture.dispose();morphTextures.delete(geometry);geometry.removeEventListener("dispose",disposeTexture)}geometry.addEventListener("dispose",disposeTexture)}if(object.isInstancedMesh===true&&object.morphTexture!==null){program.getUniforms().setValue(gl,"morphTexture",object.morphTexture,textures)}else{let morphInfluencesSum=0;for(let i=0;i<objectInfluences.length;i++){morphInfluencesSum+=objectInfluences[i]}const morphBaseInfluence=geometry.morphTargetsRelative?1:1-morphInfluencesSum;program.getUniforms().setValue(gl,"morphTargetBaseInfluence",morphBaseInfluence);program.getUniforms().setValue(gl,"morphTargetInfluences",objectInfluences)}program.getUniforms().setValue(gl,"morphTargetsTexture",entry.texture,textures);program.getUniforms().setValue(gl,"morphTargetsTextureSize",entry.size)}return{update:update}}function WebGLObjects(gl,geometries,attributes,info){let updateMap=new WeakMap;function update(object){const frame=info.render.frame;const geometry=object.geometry;const buffergeometry=geometries.get(object,geometry);if(updateMap.get(buffergeometry)!==frame){geometries.update(buffergeometry);updateMap.set(buffergeometry,frame)}if(object.isInstancedMesh){if(object.hasEventListener("dispose",onInstancedMeshDispose)===false){object.addEventListener("dispose",onInstancedMeshDispose)}if(updateMap.get(object)!==frame){attributes.update(object.instanceMatrix,gl.ARRAY_BUFFER);if(object.instanceColor!==null){attributes.update(object.instanceColor,gl.ARRAY_BUFFER)}updateMap.set(object,frame)}}if(object.isSkinnedMesh){const skeleton=object.skeleton;if(updateMap.get(skeleton)!==frame){skeleton.update();updateMap.set(skeleton,frame)}}return buffergeometry}function dispose(){updateMap=new WeakMap}function onInstancedMeshDispose(event){const instancedMesh=event.target;instancedMesh.removeEventListener("dispose",onInstancedMeshDispose);attributes.remove(instancedMesh.instanceMatrix);if(instancedMesh.instanceColor!==null)attributes.remove(instancedMesh.instanceColor)}return{update:update,dispose:dispose}}const toneMappingMap={[LinearToneMapping]:"LINEAR_TONE_MAPPING",[ReinhardToneMapping]:"REINHARD_TONE_MAPPING",[CineonToneMapping]:"CINEON_TONE_MAPPING",[ACESFilmicToneMapping]:"ACES_FILMIC_TONE_MAPPING",[AgXToneMapping]:"AGX_TONE_MAPPING",[NeutralToneMapping]:"NEUTRAL_TONE_MAPPING",[CustomToneMapping]:"CUSTOM_TONE_MAPPING"};function WebGLOutput(type,width,height,depth,stencil){const targetA=new WebGLRenderTarget(width,height,{type:type,depthBuffer:depth,stencilBuffer:stencil});const targetB=new WebGLRenderTarget(width,height,{type:HalfFloatType,depthBuffer:false,stencilBuffer:false});const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3));geometry.setAttribute("uv",new Float32BufferAttribute([0,2,0,0,2,0],2));const material=new RawShaderMaterial({uniforms:{tDiffuse:{value:null}},vertexShader:`
			precision highp float;

			uniform mat4 modelViewMatrix;
			uniform mat4 projectionMatrix;

			attribute vec3 position;
			attribute vec2 uv;

			varying vec2 vUv;

			void main() {
				vUv = uv;
				gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
			}`,fragmentShader:`
			precision highp float;

			uniform sampler2D tDiffuse;

			varying vec2 vUv;

			#include <tonemapping_pars_fragment>
			#include <colorspace_pars_fragment>

			void main() {
				gl_FragColor = texture2D( tDiffuse, vUv );

				#ifdef LINEAR_TONE_MAPPING
					gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );
				#elif defined( REINHARD_TONE_MAPPING )
					gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );
				#elif defined( CINEON_TONE_MAPPING )
					gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );
				#elif defined( ACES_FILMIC_TONE_MAPPING )
					gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );
				#elif defined( AGX_TONE_MAPPING )
					gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );
				#elif defined( NEUTRAL_TONE_MAPPING )
					gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );
				#elif defined( CUSTOM_TONE_MAPPING )
					gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );
				#endif

				#ifdef SRGB_TRANSFER
					gl_FragColor = sRGBTransferOETF( gl_FragColor );
				#endif
			}`,depthTest:false,depthWrite:false});const mesh=new Mesh(geometry,material);const camera=new OrthographicCamera(-1,1,1,-1,0,1);let _outputColorSpace=null;let _outputToneMapping=null;let _isCompositing=false;let _savedToneMapping;let _savedRenderTarget=null;let _effects=[];let _hasRenderPass=false;this.setSize=function(width,height){targetA.setSize(width,height);targetB.setSize(width,height);for(let i=0;i<_effects.length;i++){const effect=_effects[i];if(effect.setSize)effect.setSize(width,height)}};this.setEffects=function(effects){_effects=effects;_hasRenderPass=_effects.length>0&&_effects[0].isRenderPass===true;const width=targetA.width;const height=targetA.height;for(let i=0;i<_effects.length;i++){const effect=_effects[i];if(effect.setSize)effect.setSize(width,height)}};this.begin=function(renderer,renderTarget){if(_isCompositing)return false;if(renderer.toneMapping===NoToneMapping&&_effects.length===0)return false;_savedRenderTarget=renderTarget;if(renderTarget!==null){const width=renderTarget.width;const height=renderTarget.height;if(targetA.width!==width||targetA.height!==height){this.setSize(width,height)}}if(_hasRenderPass===false){renderer.setRenderTarget(targetA)}_savedToneMapping=renderer.toneMapping;renderer.toneMapping=NoToneMapping;return true};this.hasRenderPass=function(){return _hasRenderPass};this.end=function(renderer,deltaTime){renderer.toneMapping=_savedToneMapping;_isCompositing=true;let readBuffer=targetA;let writeBuffer=targetB;for(let i=0;i<_effects.length;i++){const effect=_effects[i];if(effect.enabled===false)continue;effect.render(renderer,writeBuffer,readBuffer,deltaTime);if(effect.needsSwap!==false){const temp=readBuffer;readBuffer=writeBuffer;writeBuffer=temp}}if(_outputColorSpace!==renderer.outputColorSpace||_outputToneMapping!==renderer.toneMapping){_outputColorSpace=renderer.outputColorSpace;_outputToneMapping=renderer.toneMapping;material.defines={};if(ColorManagement.getTransfer(_outputColorSpace)===SRGBTransfer)material.defines.SRGB_TRANSFER="";const toneMapping=toneMappingMap[_outputToneMapping];if(toneMapping)material.defines[toneMapping]="";material.needsUpdate=true}material.uniforms.tDiffuse.value=readBuffer.texture;renderer.setRenderTarget(_savedRenderTarget);renderer.render(mesh,camera);_savedRenderTarget=null;_isCompositing=false};this.isCompositing=function(){return _isCompositing};this.dispose=function(){targetA.dispose();targetB.dispose();geometry.dispose();material.dispose()}}const emptyTexture=new Texture;const emptyShadowTexture=new DepthTexture(1,1);const emptyArrayTexture=new DataArrayTexture;const empty3dTexture=new Data3DTexture;const emptyCubeTexture=new CubeTexture;const arrayCacheF32=[];const arrayCacheI32=[];const mat4array=new Float32Array(16);const mat3array=new Float32Array(9);const mat2array=new Float32Array(4);function flatten(array,nBlocks,blockSize){const firstElem=array[0];if(firstElem<=0||firstElem>0)return array;const n=nBlocks*blockSize;let r=arrayCacheF32[n];if(r===undefined){r=new Float32Array(n);arrayCacheF32[n]=r}if(nBlocks!==0){firstElem.toArray(r,0);for(let i=1,offset=0;i!==nBlocks;++i){offset+=blockSize;array[i].toArray(r,offset)}}return r}function arraysEqual(a,b){if(a.length!==b.length)return false;for(let i=0,l=a.length;i<l;i++){if(a[i]!==b[i])return false}return true}function copyArray(a,b){for(let i=0,l=b.length;i<l;i++){a[i]=b[i]}}function allocTexUnits(textures,n){let r=arrayCacheI32[n];if(r===undefined){r=new Int32Array(n);arrayCacheI32[n]=r}for(let i=0;i!==n;++i){r[i]=textures.allocateTextureUnit()}return r}function setValueV1f(gl,v){const cache=this.cache;if(cache[0]===v)return;gl.uniform1f(this.addr,v);cache[0]=v}function setValueV2f(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y){gl.uniform2f(this.addr,v.x,v.y);cache[0]=v.x;cache[1]=v.y}}else{if(arraysEqual(cache,v))return;gl.uniform2fv(this.addr,v);copyArray(cache,v)}}function setValueV3f(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z){gl.uniform3f(this.addr,v.x,v.y,v.z);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z}}else if(v.r!==undefined){if(cache[0]!==v.r||cache[1]!==v.g||cache[2]!==v.b){gl.uniform3f(this.addr,v.r,v.g,v.b);cache[0]=v.r;cache[1]=v.g;cache[2]=v.b}}else{if(arraysEqual(cache,v))return;gl.uniform3fv(this.addr,v);copyArray(cache,v)}}function setValueV4f(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z||cache[3]!==v.w){gl.uniform4f(this.addr,v.x,v.y,v.z,v.w);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z;cache[3]=v.w}}else{if(arraysEqual(cache,v))return;gl.uniform4fv(this.addr,v);copyArray(cache,v)}}function setValueM2(gl,v){const cache=this.cache;const elements=v.elements;if(elements===undefined){if(arraysEqual(cache,v))return;gl.uniformMatrix2fv(this.addr,false,v);copyArray(cache,v)}else{if(arraysEqual(cache,elements))return;mat2array.set(elements);gl.uniformMatrix2fv(this.addr,false,mat2array);copyArray(cache,elements)}}function setValueM3(gl,v){const cache=this.cache;const elements=v.elements;if(elements===undefined){if(arraysEqual(cache,v))return;gl.uniformMatrix3fv(this.addr,false,v);copyArray(cache,v)}else{if(arraysEqual(cache,elements))return;mat3array.set(elements);gl.uniformMatrix3fv(this.addr,false,mat3array);copyArray(cache,elements)}}function setValueM4(gl,v){const cache=this.cache;const elements=v.elements;if(elements===undefined){if(arraysEqual(cache,v))return;gl.uniformMatrix4fv(this.addr,false,v);copyArray(cache,v)}else{if(arraysEqual(cache,elements))return;mat4array.set(elements);gl.uniformMatrix4fv(this.addr,false,mat4array);copyArray(cache,elements)}}function setValueV1i(gl,v){const cache=this.cache;if(cache[0]===v)return;gl.uniform1i(this.addr,v);cache[0]=v}function setValueV2i(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y){gl.uniform2i(this.addr,v.x,v.y);cache[0]=v.x;cache[1]=v.y}}else{if(arraysEqual(cache,v))return;gl.uniform2iv(this.addr,v);copyArray(cache,v)}}function setValueV3i(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z){gl.uniform3i(this.addr,v.x,v.y,v.z);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z}}else{if(arraysEqual(cache,v))return;gl.uniform3iv(this.addr,v);copyArray(cache,v)}}function setValueV4i(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z||cache[3]!==v.w){gl.uniform4i(this.addr,v.x,v.y,v.z,v.w);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z;cache[3]=v.w}}else{if(arraysEqual(cache,v))return;gl.uniform4iv(this.addr,v);copyArray(cache,v)}}function setValueV1ui(gl,v){const cache=this.cache;if(cache[0]===v)return;gl.uniform1ui(this.addr,v);cache[0]=v}function setValueV2ui(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y){gl.uniform2ui(this.addr,v.x,v.y);cache[0]=v.x;cache[1]=v.y}}else{if(arraysEqual(cache,v))return;gl.uniform2uiv(this.addr,v);copyArray(cache,v)}}function setValueV3ui(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z){gl.uniform3ui(this.addr,v.x,v.y,v.z);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z}}else{if(arraysEqual(cache,v))return;gl.uniform3uiv(this.addr,v);copyArray(cache,v)}}function setValueV4ui(gl,v){const cache=this.cache;if(v.x!==undefined){if(cache[0]!==v.x||cache[1]!==v.y||cache[2]!==v.z||cache[3]!==v.w){gl.uniform4ui(this.addr,v.x,v.y,v.z,v.w);cache[0]=v.x;cache[1]=v.y;cache[2]=v.z;cache[3]=v.w}}else{if(arraysEqual(cache,v))return;gl.uniform4uiv(this.addr,v);copyArray(cache,v)}}function setValueT1(gl,v,textures){const cache=this.cache;const unit=textures.allocateTextureUnit();if(cache[0]!==unit){gl.uniform1i(this.addr,unit);cache[0]=unit}let emptyTexture2D;if(this.type===gl.SAMPLER_2D_SHADOW){emptyShadowTexture.compareFunction=textures.isReversedDepthBuffer()?GreaterEqualCompare:LessEqualCompare;emptyTexture2D=emptyShadowTexture}else{emptyTexture2D=emptyTexture}textures.setTexture2D(v||emptyTexture2D,unit)}function setValueT3D1(gl,v,textures){const cache=this.cache;const unit=textures.allocateTextureUnit();if(cache[0]!==unit){gl.uniform1i(this.addr,unit);cache[0]=unit}textures.setTexture3D(v||empty3dTexture,unit)}function setValueT6(gl,v,textures){const cache=this.cache;const unit=textures.allocateTextureUnit();if(cache[0]!==unit){gl.uniform1i(this.addr,unit);cache[0]=unit}textures.setTextureCube(v||emptyCubeTexture,unit)}function setValueT2DArray1(gl,v,textures){const cache=this.cache;const unit=textures.allocateTextureUnit();if(cache[0]!==unit){gl.uniform1i(this.addr,unit);cache[0]=unit}textures.setTexture2DArray(v||emptyArrayTexture,unit)}function getSingularSetter(type){switch(type){case 5126:return setValueV1f;case 35664:return setValueV2f;case 35665:return setValueV3f;case 35666:return setValueV4f;case 35674:return setValueM2;case 35675:return setValueM3;case 35676:return setValueM4;case 5124:case 35670:return setValueV1i;case 35667:case 35671:return setValueV2i;case 35668:case 35672:return setValueV3i;case 35669:case 35673:return setValueV4i;case 5125:return setValueV1ui;case 36294:return setValueV2ui;case 36295:return setValueV3ui;case 36296:return setValueV4ui;case 35678:case 36198:case 36298:case 36306:case 35682:return setValueT1;case 35679:case 36299:case 36307:return setValueT3D1;case 35680:case 36300:case 36308:case 36293:return setValueT6;case 36289:case 36303:case 36311:case 36292:return setValueT2DArray1;}}function setValueV1fArray(gl,v){gl.uniform1fv(this.addr,v)}function setValueV2fArray(gl,v){const data=flatten(v,this.size,2);gl.uniform2fv(this.addr,data)}function setValueV3fArray(gl,v){const data=flatten(v,this.size,3);gl.uniform3fv(this.addr,data)}function setValueV4fArray(gl,v){const data=flatten(v,this.size,4);gl.uniform4fv(this.addr,data)}function setValueM2Array(gl,v){const data=flatten(v,this.size,4);gl.uniformMatrix2fv(this.addr,false,data)}function setValueM3Array(gl,v){const data=flatten(v,this.size,9);gl.uniformMatrix3fv(this.addr,false,data)}function setValueM4Array(gl,v){const data=flatten(v,this.size,16);gl.uniformMatrix4fv(this.addr,false,data)}function setValueV1iArray(gl,v){gl.uniform1iv(this.addr,v)}function setValueV2iArray(gl,v){gl.uniform2iv(this.addr,v)}function setValueV3iArray(gl,v){gl.uniform3iv(this.addr,v)}function setValueV4iArray(gl,v){gl.uniform4iv(this.addr,v)}function setValueV1uiArray(gl,v){gl.uniform1uiv(this.addr,v)}function setValueV2uiArray(gl,v){gl.uniform2uiv(this.addr,v)}function setValueV3uiArray(gl,v){gl.uniform3uiv(this.addr,v)}function setValueV4uiArray(gl,v){gl.uniform4uiv(this.addr,v)}function setValueT1Array(gl,v,textures){const cache=this.cache;const n=v.length;const units=allocTexUnits(textures,n);if(!arraysEqual(cache,units)){gl.uniform1iv(this.addr,units);copyArray(cache,units)}let emptyTexture2D;if(this.type===gl.SAMPLER_2D_SHADOW){emptyTexture2D=emptyShadowTexture}else{emptyTexture2D=emptyTexture}for(let i=0;i!==n;++i){textures.setTexture2D(v[i]||emptyTexture2D,units[i])}}function setValueT3DArray(gl,v,textures){const cache=this.cache;const n=v.length;const units=allocTexUnits(textures,n);if(!arraysEqual(cache,units)){gl.uniform1iv(this.addr,units);copyArray(cache,units)}for(let i=0;i!==n;++i){textures.setTexture3D(v[i]||empty3dTexture,units[i])}}function setValueT6Array(gl,v,textures){const cache=this.cache;const n=v.length;const units=allocTexUnits(textures,n);if(!arraysEqual(cache,units)){gl.uniform1iv(this.addr,units);copyArray(cache,units)}for(let i=0;i!==n;++i){textures.setTextureCube(v[i]||emptyCubeTexture,units[i])}}function setValueT2DArrayArray(gl,v,textures){const cache=this.cache;const n=v.length;const units=allocTexUnits(textures,n);if(!arraysEqual(cache,units)){gl.uniform1iv(this.addr,units);copyArray(cache,units)}for(let i=0;i!==n;++i){textures.setTexture2DArray(v[i]||emptyArrayTexture,units[i])}}function getPureArraySetter(type){switch(type){case 5126:return setValueV1fArray;case 35664:return setValueV2fArray;case 35665:return setValueV3fArray;case 35666:return setValueV4fArray;case 35674:return setValueM2Array;case 35675:return setValueM3Array;case 35676:return setValueM4Array;case 5124:case 35670:return setValueV1iArray;case 35667:case 35671:return setValueV2iArray;case 35668:case 35672:return setValueV3iArray;case 35669:case 35673:return setValueV4iArray;case 5125:return setValueV1uiArray;case 36294:return setValueV2uiArray;case 36295:return setValueV3uiArray;case 36296:return setValueV4uiArray;case 35678:case 36198:case 36298:case 36306:case 35682:return setValueT1Array;case 35679:case 36299:case 36307:return setValueT3DArray;case 35680:case 36300:case 36308:case 36293:return setValueT6Array;case 36289:case 36303:case 36311:case 36292:return setValueT2DArrayArray;}}class SingleUniform{constructor(id,activeInfo,addr){this.id=id;this.addr=addr;this.cache=[];this.type=activeInfo.type;this.setValue=getSingularSetter(activeInfo.type)}}class PureArrayUniform{constructor(id,activeInfo,addr){this.id=id;this.addr=addr;this.cache=[];this.type=activeInfo.type;this.size=activeInfo.size;this.setValue=getPureArraySetter(activeInfo.type)}}class StructuredUniform{constructor(id){this.id=id;this.seq=[];this.map={}}setValue(gl,value,textures){const seq=this.seq;for(let i=0,n=seq.length;i!==n;++i){const u=seq[i];u.setValue(gl,value[u.id],textures)}}}const RePathPart=/(\w+)(\])?(\[|\.)?/g;function addUniform(container,uniformObject){container.seq.push(uniformObject);container.map[uniformObject.id]=uniformObject}function parseUniform(activeInfo,addr,container){const path=activeInfo.name,pathLength=path.length;RePathPart.lastIndex=0;while(true){const match=RePathPart.exec(path),matchEnd=RePathPart.lastIndex;let id=match[1];const idIsIndex=match[2]==="]",subscript=match[3];if(idIsIndex)id=id|0;if(subscript===undefined||subscript==="["&&matchEnd+2===pathLength){addUniform(container,subscript===undefined?new SingleUniform(id,activeInfo,addr):new PureArrayUniform(id,activeInfo,addr));break}else{const map=container.map;let next=map[id];if(next===undefined){next=new StructuredUniform(id);addUniform(container,next)}container=next}}}class WebGLUniforms{constructor(gl,program){this.seq=[];this.map={};const n=gl.getProgramParameter(program,gl.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const info=gl.getActiveUniform(program,i),addr=gl.getUniformLocation(program,info.name);parseUniform(info,addr,this)}const shadowSamplers=[];const otherUniforms=[];for(const u of this.seq){if(u.type===gl.SAMPLER_2D_SHADOW||u.type===gl.SAMPLER_CUBE_SHADOW||u.type===gl.SAMPLER_2D_ARRAY_SHADOW){shadowSamplers.push(u)}else{otherUniforms.push(u)}}if(shadowSamplers.length>0){this.seq=shadowSamplers.concat(otherUniforms)}}setValue(gl,name,value,textures){const u=this.map[name];if(u!==undefined)u.setValue(gl,value,textures)}setOptional(gl,object,name){const v=object[name];if(v!==undefined)this.setValue(gl,name,v)}static upload(gl,seq,values,textures){for(let i=0,n=seq.length;i!==n;++i){const u=seq[i],v=values[u.id];if(v.needsUpdate!==false){u.setValue(gl,v.value,textures)}}}static seqWithValue(seq,values){const r=[];for(let i=0,n=seq.length;i!==n;++i){const u=seq[i];if(u.id in values)r.push(u)}return r}}function WebGLShader(gl,type,string){const shader=gl.createShader(type);gl.shaderSource(shader,string);gl.compileShader(shader);return shader}const COMPLETION_STATUS_KHR=37297;let programIdCount=0;function handleSource(string,errorLine){const lines=string.split("\n");const lines2=[];const from=Math.max(errorLine-6,0);const to=Math.min(errorLine+6,lines.length);for(let i=from;i<to;i++){const line=i+1;lines2.push(`${line===errorLine?">":" "} ${line}: ${lines[i]}`)}return lines2.join("\n")}const _m0=new Matrix3;function getEncodingComponents(colorSpace){ColorManagement._getMatrix(_m0,ColorManagement.workingColorSpace,colorSpace);const encodingMatrix=`mat3( ${_m0.elements.map(v=>v.toFixed(4))} )`;switch(ColorManagement.getTransfer(colorSpace)){case LinearTransfer:return[encodingMatrix,"LinearTransferOETF"];case SRGBTransfer:return[encodingMatrix,"sRGBTransferOETF"];default:warn("WebGLProgram: Unsupported color space: ",colorSpace);return[encodingMatrix,"LinearTransferOETF"];}}function getShaderErrors(gl,shader,type){const status=gl.getShaderParameter(shader,gl.COMPILE_STATUS);const shaderInfoLog=gl.getShaderInfoLog(shader)||"";const errors=shaderInfoLog.trim();if(status&&errors==="")return"";const errorMatches=/ERROR: 0:(\d+)/.exec(errors);if(errorMatches){const errorLine=parseInt(errorMatches[1]);return type.toUpperCase()+"\n\n"+errors+"\n\n"+handleSource(gl.getShaderSource(shader),errorLine)}else{return errors}}function getTexelEncodingFunction(functionName,colorSpace){const components=getEncodingComponents(colorSpace);return[`vec4 ${functionName}( vec4 value ) {`,`	return ${components[1]}( vec4( value.rgb * ${components[0]}, value.a ) );`,"}"].join("\n")}const toneMappingFunctions={[LinearToneMapping]:"Linear",[ReinhardToneMapping]:"Reinhard",[CineonToneMapping]:"Cineon",[ACESFilmicToneMapping]:"ACESFilmic",[AgXToneMapping]:"AgX",[NeutralToneMapping]:"Neutral",[CustomToneMapping]:"Custom"};function getToneMappingFunction(functionName,toneMapping){const toneMappingName=toneMappingFunctions[toneMapping];if(toneMappingName===undefined){warn("WebGLProgram: Unsupported toneMapping:",toneMapping);return"vec3 "+functionName+"( vec3 color ) { return LinearToneMapping( color ); }"}return"vec3 "+functionName+"( vec3 color ) { return "+toneMappingName+"ToneMapping( color ); }"}const _v0=new Vector3;function getLuminanceFunction(){ColorManagement.getLuminanceCoefficients(_v0);const r=_v0.x.toFixed(4);const g=_v0.y.toFixed(4);const b=_v0.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",`	const vec3 weights = vec3( ${r}, ${g}, ${b} );`,"\treturn dot( weights, rgb );","}"].join("\n")}function generateVertexExtensions(parameters){const chunks=[parameters.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",parameters.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""];return chunks.filter(filterEmptyLine).join("\n")}function generateDefines(defines){const chunks=[];for(const name in defines){const value=defines[name];if(value===false)continue;chunks.push("#define "+name+" "+value)}return chunks.join("\n")}function fetchAttributeLocations(gl,program){const attributes={};const n=gl.getProgramParameter(program,gl.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const info=gl.getActiveAttrib(program,i);const name=info.name;let locationSize=1;if(info.type===gl.FLOAT_MAT2)locationSize=2;if(info.type===gl.FLOAT_MAT3)locationSize=3;if(info.type===gl.FLOAT_MAT4)locationSize=4;attributes[name]={type:info.type,location:gl.getAttribLocation(program,name),locationSize:locationSize}}return attributes}function filterEmptyLine(string){return string!==""}function replaceLightNums(string,parameters){const numSpotLightCoords=parameters.numSpotLightShadows+parameters.numSpotLightMaps-parameters.numSpotLightShadowsWithMaps;return string.replace(/NUM_DIR_LIGHTS/g,parameters.numDirLights).replace(/NUM_SPOT_LIGHTS/g,parameters.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,parameters.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,numSpotLightCoords).replace(/NUM_RECT_AREA_LIGHTS/g,parameters.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,parameters.numPointLights).replace(/NUM_HEMI_LIGHTS/g,parameters.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,parameters.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,parameters.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,parameters.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,parameters.numPointLightShadows)}function replaceClippingPlaneNums(string,parameters){return string.replace(/NUM_CLIPPING_PLANES/g,parameters.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,parameters.numClippingPlanes-parameters.numClipIntersection)}const includePattern=/^[ \t]*#include +<([\w\d./]+)>/gm;function resolveIncludes(string){return string.replace(includePattern,includeReplacer)}const shaderChunkMap=new Map;function includeReplacer(match,include){let string=ShaderChunk[include];if(string===undefined){const newInclude=shaderChunkMap.get(include);if(newInclude!==undefined){string=ShaderChunk[newInclude];warn("WebGLRenderer: Shader chunk \"%s\" has been deprecated. Use \"%s\" instead.",include,newInclude)}else{throw new Error("Can not resolve #include <"+include+">")}}return resolveIncludes(string)}const unrollLoopPattern=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function unrollLoops(string){return string.replace(unrollLoopPattern,loopReplacer)}function loopReplacer(match,start,end,snippet){let string="";for(let i=parseInt(start);i<parseInt(end);i++){string+=snippet.replace(/\[\s*i\s*\]/g,"[ "+i+" ]").replace(/UNROLLED_LOOP_INDEX/g,i)}return string}function generatePrecision(parameters){let precisionstring=`precision ${parameters.precision} float;
	precision ${parameters.precision} int;
	precision ${parameters.precision} sampler2D;
	precision ${parameters.precision} samplerCube;
	precision ${parameters.precision} sampler3D;
	precision ${parameters.precision} sampler2DArray;
	precision ${parameters.precision} sampler2DShadow;
	precision ${parameters.precision} samplerCubeShadow;
	precision ${parameters.precision} sampler2DArrayShadow;
	precision ${parameters.precision} isampler2D;
	precision ${parameters.precision} isampler3D;
	precision ${parameters.precision} isamplerCube;
	precision ${parameters.precision} isampler2DArray;
	precision ${parameters.precision} usampler2D;
	precision ${parameters.precision} usampler3D;
	precision ${parameters.precision} usamplerCube;
	precision ${parameters.precision} usampler2DArray;
	`;if(parameters.precision==="highp"){precisionstring+="\n#define HIGH_PRECISION"}else if(parameters.precision==="mediump"){precisionstring+="\n#define MEDIUM_PRECISION"}else if(parameters.precision==="lowp"){precisionstring+="\n#define LOW_PRECISION"}return precisionstring}const shadowMapTypeDefines={[PCFShadowMap]:"SHADOWMAP_TYPE_PCF",[VSMShadowMap]:"SHADOWMAP_TYPE_VSM"};function generateShadowMapTypeDefine(parameters){return shadowMapTypeDefines[parameters.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}const envMapTypeDefines={[CubeReflectionMapping]:"ENVMAP_TYPE_CUBE",[CubeRefractionMapping]:"ENVMAP_TYPE_CUBE",[CubeUVReflectionMapping]:"ENVMAP_TYPE_CUBE_UV"};function generateEnvMapTypeDefine(parameters){if(parameters.envMap===false)return"ENVMAP_TYPE_CUBE";return envMapTypeDefines[parameters.envMapMode]||"ENVMAP_TYPE_CUBE"}const envMapModeDefines={[CubeRefractionMapping]:"ENVMAP_MODE_REFRACTION"};function generateEnvMapModeDefine(parameters){if(parameters.envMap===false)return"ENVMAP_MODE_REFLECTION";return envMapModeDefines[parameters.envMapMode]||"ENVMAP_MODE_REFLECTION"}const envMapBlendingDefines={[MultiplyOperation]:"ENVMAP_BLENDING_MULTIPLY",[MixOperation]:"ENVMAP_BLENDING_MIX",[AddOperation]:"ENVMAP_BLENDING_ADD"};function generateEnvMapBlendingDefine(parameters){if(parameters.envMap===false)return"ENVMAP_BLENDING_NONE";return envMapBlendingDefines[parameters.combine]||"ENVMAP_BLENDING_NONE"}function generateCubeUVSize(parameters){const imageHeight=parameters.envMapCubeUVHeight;if(imageHeight===null)return null;const maxMip=Math.log2(imageHeight)-2;const texelHeight=1/imageHeight;const texelWidth=1/(3*Math.max(Math.pow(2,maxMip),7*16));return{texelWidth,texelHeight,maxMip}}function WebGLProgram(renderer,cacheKey,parameters,bindingStates){const gl=renderer.getContext();const defines=parameters.defines;let vertexShader=parameters.vertexShader;let fragmentShader=parameters.fragmentShader;const shadowMapTypeDefine=generateShadowMapTypeDefine(parameters);const envMapTypeDefine=generateEnvMapTypeDefine(parameters);const envMapModeDefine=generateEnvMapModeDefine(parameters);const envMapBlendingDefine=generateEnvMapBlendingDefine(parameters);const envMapCubeUVSize=generateCubeUVSize(parameters);const customVertexExtensions=generateVertexExtensions(parameters);const customDefines=generateDefines(defines);const program=gl.createProgram();let prefixVertex,prefixFragment;let versionString=parameters.glslVersion?"#version "+parameters.glslVersion+"\n":"";if(parameters.isRawShaderMaterial){prefixVertex=["#define SHADER_TYPE "+parameters.shaderType,"#define SHADER_NAME "+parameters.shaderName,customDefines].filter(filterEmptyLine).join("\n");if(prefixVertex.length>0){prefixVertex+="\n"}prefixFragment=["#define SHADER_TYPE "+parameters.shaderType,"#define SHADER_NAME "+parameters.shaderName,customDefines].filter(filterEmptyLine).join("\n");if(prefixFragment.length>0){prefixFragment+="\n"}}else{prefixVertex=[generatePrecision(parameters),"#define SHADER_TYPE "+parameters.shaderType,"#define SHADER_NAME "+parameters.shaderName,customDefines,parameters.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",parameters.batching?"#define USE_BATCHING":"",parameters.batchingColor?"#define USE_BATCHING_COLOR":"",parameters.instancing?"#define USE_INSTANCING":"",parameters.instancingColor?"#define USE_INSTANCING_COLOR":"",parameters.instancingMorph?"#define USE_INSTANCING_MORPH":"",parameters.useFog&&parameters.fog?"#define USE_FOG":"",parameters.useFog&&parameters.fogExp2?"#define FOG_EXP2":"",parameters.map?"#define USE_MAP":"",parameters.envMap?"#define USE_ENVMAP":"",parameters.envMap?"#define "+envMapModeDefine:"",parameters.lightMap?"#define USE_LIGHTMAP":"",parameters.aoMap?"#define USE_AOMAP":"",parameters.bumpMap?"#define USE_BUMPMAP":"",parameters.normalMap?"#define USE_NORMALMAP":"",parameters.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",parameters.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",parameters.displacementMap?"#define USE_DISPLACEMENTMAP":"",parameters.emissiveMap?"#define USE_EMISSIVEMAP":"",parameters.anisotropy?"#define USE_ANISOTROPY":"",parameters.anisotropyMap?"#define USE_ANISOTROPYMAP":"",parameters.clearcoatMap?"#define USE_CLEARCOATMAP":"",parameters.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",parameters.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",parameters.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",parameters.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",parameters.specularMap?"#define USE_SPECULARMAP":"",parameters.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",parameters.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",parameters.roughnessMap?"#define USE_ROUGHNESSMAP":"",parameters.metalnessMap?"#define USE_METALNESSMAP":"",parameters.alphaMap?"#define USE_ALPHAMAP":"",parameters.alphaHash?"#define USE_ALPHAHASH":"",parameters.transmission?"#define USE_TRANSMISSION":"",parameters.transmissionMap?"#define USE_TRANSMISSIONMAP":"",parameters.thicknessMap?"#define USE_THICKNESSMAP":"",parameters.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",parameters.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",parameters.mapUv?"#define MAP_UV "+parameters.mapUv:"",parameters.alphaMapUv?"#define ALPHAMAP_UV "+parameters.alphaMapUv:"",parameters.lightMapUv?"#define LIGHTMAP_UV "+parameters.lightMapUv:"",parameters.aoMapUv?"#define AOMAP_UV "+parameters.aoMapUv:"",parameters.emissiveMapUv?"#define EMISSIVEMAP_UV "+parameters.emissiveMapUv:"",parameters.bumpMapUv?"#define BUMPMAP_UV "+parameters.bumpMapUv:"",parameters.normalMapUv?"#define NORMALMAP_UV "+parameters.normalMapUv:"",parameters.displacementMapUv?"#define DISPLACEMENTMAP_UV "+parameters.displacementMapUv:"",parameters.metalnessMapUv?"#define METALNESSMAP_UV "+parameters.metalnessMapUv:"",parameters.roughnessMapUv?"#define ROUGHNESSMAP_UV "+parameters.roughnessMapUv:"",parameters.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+parameters.anisotropyMapUv:"",parameters.clearcoatMapUv?"#define CLEARCOATMAP_UV "+parameters.clearcoatMapUv:"",parameters.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+parameters.clearcoatNormalMapUv:"",parameters.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+parameters.clearcoatRoughnessMapUv:"",parameters.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+parameters.iridescenceMapUv:"",parameters.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+parameters.iridescenceThicknessMapUv:"",parameters.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+parameters.sheenColorMapUv:"",parameters.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+parameters.sheenRoughnessMapUv:"",parameters.specularMapUv?"#define SPECULARMAP_UV "+parameters.specularMapUv:"",parameters.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+parameters.specularColorMapUv:"",parameters.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+parameters.specularIntensityMapUv:"",parameters.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+parameters.transmissionMapUv:"",parameters.thicknessMapUv?"#define THICKNESSMAP_UV "+parameters.thicknessMapUv:"",parameters.vertexTangents&&parameters.flatShading===false?"#define USE_TANGENT":"",parameters.vertexColors?"#define USE_COLOR":"",parameters.vertexAlphas?"#define USE_COLOR_ALPHA":"",parameters.vertexUv1s?"#define USE_UV1":"",parameters.vertexUv2s?"#define USE_UV2":"",parameters.vertexUv3s?"#define USE_UV3":"",parameters.pointsUvs?"#define USE_POINTS_UV":"",parameters.flatShading?"#define FLAT_SHADED":"",parameters.skinning?"#define USE_SKINNING":"",parameters.morphTargets?"#define USE_MORPHTARGETS":"",parameters.morphNormals&&parameters.flatShading===false?"#define USE_MORPHNORMALS":"",parameters.morphColors?"#define USE_MORPHCOLORS":"",parameters.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+parameters.morphTextureStride:"",parameters.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+parameters.morphTargetsCount:"",parameters.doubleSided?"#define DOUBLE_SIDED":"",parameters.flipSided?"#define FLIP_SIDED":"",parameters.shadowMapEnabled?"#define USE_SHADOWMAP":"",parameters.shadowMapEnabled?"#define "+shadowMapTypeDefine:"",parameters.sizeAttenuation?"#define USE_SIZEATTENUATION":"",parameters.numLightProbes>0?"#define USE_LIGHT_PROBES":"",parameters.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",parameters.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(filterEmptyLine).join("\n");prefixFragment=[generatePrecision(parameters),"#define SHADER_TYPE "+parameters.shaderType,"#define SHADER_NAME "+parameters.shaderName,customDefines,parameters.useFog&&parameters.fog?"#define USE_FOG":"",parameters.useFog&&parameters.fogExp2?"#define FOG_EXP2":"",parameters.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",parameters.map?"#define USE_MAP":"",parameters.matcap?"#define USE_MATCAP":"",parameters.envMap?"#define USE_ENVMAP":"",parameters.envMap?"#define "+envMapTypeDefine:"",parameters.envMap?"#define "+envMapModeDefine:"",parameters.envMap?"#define "+envMapBlendingDefine:"",envMapCubeUVSize?"#define CUBEUV_TEXEL_WIDTH "+envMapCubeUVSize.texelWidth:"",envMapCubeUVSize?"#define CUBEUV_TEXEL_HEIGHT "+envMapCubeUVSize.texelHeight:"",envMapCubeUVSize?"#define CUBEUV_MAX_MIP "+envMapCubeUVSize.maxMip+".0":"",parameters.lightMap?"#define USE_LIGHTMAP":"",parameters.aoMap?"#define USE_AOMAP":"",parameters.bumpMap?"#define USE_BUMPMAP":"",parameters.normalMap?"#define USE_NORMALMAP":"",parameters.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",parameters.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",parameters.emissiveMap?"#define USE_EMISSIVEMAP":"",parameters.anisotropy?"#define USE_ANISOTROPY":"",parameters.anisotropyMap?"#define USE_ANISOTROPYMAP":"",parameters.clearcoat?"#define USE_CLEARCOAT":"",parameters.clearcoatMap?"#define USE_CLEARCOATMAP":"",parameters.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",parameters.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",parameters.dispersion?"#define USE_DISPERSION":"",parameters.iridescence?"#define USE_IRIDESCENCE":"",parameters.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",parameters.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",parameters.specularMap?"#define USE_SPECULARMAP":"",parameters.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",parameters.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",parameters.roughnessMap?"#define USE_ROUGHNESSMAP":"",parameters.metalnessMap?"#define USE_METALNESSMAP":"",parameters.alphaMap?"#define USE_ALPHAMAP":"",parameters.alphaTest?"#define USE_ALPHATEST":"",parameters.alphaHash?"#define USE_ALPHAHASH":"",parameters.sheen?"#define USE_SHEEN":"",parameters.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",parameters.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",parameters.transmission?"#define USE_TRANSMISSION":"",parameters.transmissionMap?"#define USE_TRANSMISSIONMAP":"",parameters.thicknessMap?"#define USE_THICKNESSMAP":"",parameters.vertexTangents&&parameters.flatShading===false?"#define USE_TANGENT":"",parameters.vertexColors||parameters.instancingColor||parameters.batchingColor?"#define USE_COLOR":"",parameters.vertexAlphas?"#define USE_COLOR_ALPHA":"",parameters.vertexUv1s?"#define USE_UV1":"",parameters.vertexUv2s?"#define USE_UV2":"",parameters.vertexUv3s?"#define USE_UV3":"",parameters.pointsUvs?"#define USE_POINTS_UV":"",parameters.gradientMap?"#define USE_GRADIENTMAP":"",parameters.flatShading?"#define FLAT_SHADED":"",parameters.doubleSided?"#define DOUBLE_SIDED":"",parameters.flipSided?"#define FLIP_SIDED":"",parameters.shadowMapEnabled?"#define USE_SHADOWMAP":"",parameters.shadowMapEnabled?"#define "+shadowMapTypeDefine:"",parameters.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",parameters.numLightProbes>0?"#define USE_LIGHT_PROBES":"",parameters.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",parameters.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",parameters.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",parameters.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",parameters.toneMapping!==NoToneMapping?"#define TONE_MAPPING":"",parameters.toneMapping!==NoToneMapping?ShaderChunk["tonemapping_pars_fragment"]:"",parameters.toneMapping!==NoToneMapping?getToneMappingFunction("toneMapping",parameters.toneMapping):"",parameters.dithering?"#define DITHERING":"",parameters.opaque?"#define OPAQUE":"",ShaderChunk["colorspace_pars_fragment"],getTexelEncodingFunction("linearToOutputTexel",parameters.outputColorSpace),getLuminanceFunction(),parameters.useDepthPacking?"#define DEPTH_PACKING "+parameters.depthPacking:"","\n"].filter(filterEmptyLine).join("\n")}vertexShader=resolveIncludes(vertexShader);vertexShader=replaceLightNums(vertexShader,parameters);vertexShader=replaceClippingPlaneNums(vertexShader,parameters);fragmentShader=resolveIncludes(fragmentShader);fragmentShader=replaceLightNums(fragmentShader,parameters);fragmentShader=replaceClippingPlaneNums(fragmentShader,parameters);vertexShader=unrollLoops(vertexShader);fragmentShader=unrollLoops(fragmentShader);if(parameters.isRawShaderMaterial!==true){versionString="#version 300 es\n";prefixVertex=[customVertexExtensions,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+prefixVertex;prefixFragment=["#define varying in",parameters.glslVersion===GLSL3?"":"layout(location = 0) out highp vec4 pc_fragColor;",parameters.glslVersion===GLSL3?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+prefixFragment}const vertexGlsl=versionString+prefixVertex+vertexShader;const fragmentGlsl=versionString+prefixFragment+fragmentShader;const glVertexShader=WebGLShader(gl,gl.VERTEX_SHADER,vertexGlsl);const glFragmentShader=WebGLShader(gl,gl.FRAGMENT_SHADER,fragmentGlsl);gl.attachShader(program,glVertexShader);gl.attachShader(program,glFragmentShader);if(parameters.index0AttributeName!==undefined){gl.bindAttribLocation(program,0,parameters.index0AttributeName)}else if(parameters.morphTargets===true){gl.bindAttribLocation(program,0,"position")}gl.linkProgram(program);function onFirstUse(self){if(renderer.debug.checkShaderErrors){const programInfoLog=gl.getProgramInfoLog(program)||"";const vertexShaderInfoLog=gl.getShaderInfoLog(glVertexShader)||"";const fragmentShaderInfoLog=gl.getShaderInfoLog(glFragmentShader)||"";const programLog=programInfoLog.trim();const vertexLog=vertexShaderInfoLog.trim();const fragmentLog=fragmentShaderInfoLog.trim();let runnable=true;let haveDiagnostics=true;if(gl.getProgramParameter(program,gl.LINK_STATUS)===false){runnable=false;if(typeof renderer.debug.onShaderError==="function"){renderer.debug.onShaderError(gl,program,glVertexShader,glFragmentShader)}else{const vertexErrors=getShaderErrors(gl,glVertexShader,"vertex");const fragmentErrors=getShaderErrors(gl,glFragmentShader,"fragment");error("THREE.WebGLProgram: Shader Error "+gl.getError()+" - "+"VALIDATE_STATUS "+gl.getProgramParameter(program,gl.VALIDATE_STATUS)+"\n\n"+"Material Name: "+self.name+"\n"+"Material Type: "+self.type+"\n\n"+"Program Info Log: "+programLog+"\n"+vertexErrors+"\n"+fragmentErrors)}}else if(programLog!==""){warn("WebGLProgram: Program Info Log:",programLog)}else if(vertexLog===""||fragmentLog===""){haveDiagnostics=false}if(haveDiagnostics){self.diagnostics={runnable:runnable,programLog:programLog,vertexShader:{log:vertexLog,prefix:prefixVertex},fragmentShader:{log:fragmentLog,prefix:prefixFragment}}}}gl.deleteShader(glVertexShader);gl.deleteShader(glFragmentShader);cachedUniforms=new WebGLUniforms(gl,program);cachedAttributes=fetchAttributeLocations(gl,program)}let cachedUniforms;this.getUniforms=function(){if(cachedUniforms===undefined){onFirstUse(this)}return cachedUniforms};let cachedAttributes;this.getAttributes=function(){if(cachedAttributes===undefined){onFirstUse(this)}return cachedAttributes};let programReady=parameters.rendererExtensionParallelShaderCompile===false;this.isReady=function(){if(programReady===false){programReady=gl.getProgramParameter(program,COMPLETION_STATUS_KHR)}return programReady};this.destroy=function(){bindingStates.releaseStatesOfProgram(this);gl.deleteProgram(program);this.program=undefined};this.type=parameters.shaderType;this.name=parameters.shaderName;this.id=programIdCount++;this.cacheKey=cacheKey;this.usedTimes=1;this.program=program;this.vertexShader=glVertexShader;this.fragmentShader=glFragmentShader;return this}let _id=0;class WebGLShaderCache{constructor(){this.shaderCache=new Map;this.materialCache=new Map}update(material){const vertexShader=material.vertexShader;const fragmentShader=material.fragmentShader;const vertexShaderStage=this._getShaderStage(vertexShader);const fragmentShaderStage=this._getShaderStage(fragmentShader);const materialShaders=this._getShaderCacheForMaterial(material);if(materialShaders.has(vertexShaderStage)===false){materialShaders.add(vertexShaderStage);vertexShaderStage.usedTimes++}if(materialShaders.has(fragmentShaderStage)===false){materialShaders.add(fragmentShaderStage);fragmentShaderStage.usedTimes++}return this}remove(material){const materialShaders=this.materialCache.get(material);for(const shaderStage of materialShaders){shaderStage.usedTimes--;if(shaderStage.usedTimes===0)this.shaderCache.delete(shaderStage.code)}this.materialCache.delete(material);return this}getVertexShaderID(material){return this._getShaderStage(material.vertexShader).id}getFragmentShaderID(material){return this._getShaderStage(material.fragmentShader).id}dispose(){this.shaderCache.clear();this.materialCache.clear()}_getShaderCacheForMaterial(material){const cache=this.materialCache;let set=cache.get(material);if(set===undefined){set=new Set;cache.set(material,set)}return set}_getShaderStage(code){const cache=this.shaderCache;let stage=cache.get(code);if(stage===undefined){stage=new WebGLShaderStage(code);cache.set(code,stage)}return stage}}class WebGLShaderStage{constructor(code){this.id=_id++;this.code=code;this.usedTimes=0}}function WebGLPrograms(renderer,cubemaps,cubeuvmaps,extensions,capabilities,bindingStates,clipping){const _programLayers=new Layers;const _customShaders=new WebGLShaderCache;const _activeChannels=new Set;const programs=[];const programsMap=new Map;const logarithmicDepthBuffer=capabilities.logarithmicDepthBuffer;let precision=capabilities.precision;const shaderIDs={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function getChannel(value){_activeChannels.add(value);if(value===0)return"uv";return`uv${value}`}function getParameters(material,lights,shadows,scene,object){const fog=scene.fog;const geometry=object.geometry;const environment=material.isMeshStandardMaterial?scene.environment:null;const envMap=(material.isMeshStandardMaterial?cubeuvmaps:cubemaps).get(material.envMap||environment);const envMapCubeUVHeight=!!envMap&&envMap.mapping===CubeUVReflectionMapping?envMap.image.height:null;const shaderID=shaderIDs[material.type];if(material.precision!==null){precision=capabilities.getMaxPrecision(material.precision);if(precision!==material.precision){warn("WebGLProgram.getParameters:",material.precision,"not supported, using",precision,"instead.")}}const morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color;const morphTargetsCount=morphAttribute!==undefined?morphAttribute.length:0;let morphTextureStride=0;if(geometry.morphAttributes.position!==undefined)morphTextureStride=1;if(geometry.morphAttributes.normal!==undefined)morphTextureStride=2;if(geometry.morphAttributes.color!==undefined)morphTextureStride=3;let vertexShader,fragmentShader;let customVertexShaderID,customFragmentShaderID;if(shaderID){const shader=ShaderLib[shaderID];vertexShader=shader.vertexShader;fragmentShader=shader.fragmentShader}else{vertexShader=material.vertexShader;fragmentShader=material.fragmentShader;_customShaders.update(material);customVertexShaderID=_customShaders.getVertexShaderID(material);customFragmentShaderID=_customShaders.getFragmentShaderID(material)}const currentRenderTarget=renderer.getRenderTarget();const reversedDepthBuffer=renderer.state.buffers.depth.getReversed();const IS_INSTANCEDMESH=object.isInstancedMesh===true;const IS_BATCHEDMESH=object.isBatchedMesh===true;const HAS_MAP=!!material.map;const HAS_MATCAP=!!material.matcap;const HAS_ENVMAP=!!envMap;const HAS_AOMAP=!!material.aoMap;const HAS_LIGHTMAP=!!material.lightMap;const HAS_BUMPMAP=!!material.bumpMap;const HAS_NORMALMAP=!!material.normalMap;const HAS_DISPLACEMENTMAP=!!material.displacementMap;const HAS_EMISSIVEMAP=!!material.emissiveMap;const HAS_METALNESSMAP=!!material.metalnessMap;const HAS_ROUGHNESSMAP=!!material.roughnessMap;const HAS_ANISOTROPY=material.anisotropy>0;const HAS_CLEARCOAT=material.clearcoat>0;const HAS_DISPERSION=material.dispersion>0;const HAS_IRIDESCENCE=material.iridescence>0;const HAS_SHEEN=material.sheen>0;const HAS_TRANSMISSION=material.transmission>0;const HAS_ANISOTROPYMAP=HAS_ANISOTROPY&&!!material.anisotropyMap;const HAS_CLEARCOATMAP=HAS_CLEARCOAT&&!!material.clearcoatMap;const HAS_CLEARCOAT_NORMALMAP=HAS_CLEARCOAT&&!!material.clearcoatNormalMap;const HAS_CLEARCOAT_ROUGHNESSMAP=HAS_CLEARCOAT&&!!material.clearcoatRoughnessMap;const HAS_IRIDESCENCEMAP=HAS_IRIDESCENCE&&!!material.iridescenceMap;const HAS_IRIDESCENCE_THICKNESSMAP=HAS_IRIDESCENCE&&!!material.iridescenceThicknessMap;const HAS_SHEEN_COLORMAP=HAS_SHEEN&&!!material.sheenColorMap;const HAS_SHEEN_ROUGHNESSMAP=HAS_SHEEN&&!!material.sheenRoughnessMap;const HAS_SPECULARMAP=!!material.specularMap;const HAS_SPECULAR_COLORMAP=!!material.specularColorMap;const HAS_SPECULAR_INTENSITYMAP=!!material.specularIntensityMap;const HAS_TRANSMISSIONMAP=HAS_TRANSMISSION&&!!material.transmissionMap;const HAS_THICKNESSMAP=HAS_TRANSMISSION&&!!material.thicknessMap;const HAS_GRADIENTMAP=!!material.gradientMap;const HAS_ALPHAMAP=!!material.alphaMap;const HAS_ALPHATEST=material.alphaTest>0;const HAS_ALPHAHASH=!!material.alphaHash;const HAS_EXTENSIONS=!!material.extensions;let toneMapping=NoToneMapping;if(material.toneMapped){if(currentRenderTarget===null||currentRenderTarget.isXRRenderTarget===true){toneMapping=renderer.toneMapping}}const parameters={shaderID:shaderID,shaderType:material.type,shaderName:material.name,vertexShader:vertexShader,fragmentShader:fragmentShader,defines:material.defines,customVertexShaderID:customVertexShaderID,customFragmentShaderID:customFragmentShaderID,isRawShaderMaterial:material.isRawShaderMaterial===true,glslVersion:material.glslVersion,precision:precision,batching:IS_BATCHEDMESH,batchingColor:IS_BATCHEDMESH&&object._colorsTexture!==null,instancing:IS_INSTANCEDMESH,instancingColor:IS_INSTANCEDMESH&&object.instanceColor!==null,instancingMorph:IS_INSTANCEDMESH&&object.morphTexture!==null,outputColorSpace:currentRenderTarget===null?renderer.outputColorSpace:currentRenderTarget.isXRRenderTarget===true?currentRenderTarget.texture.colorSpace:LinearSRGBColorSpace,alphaToCoverage:!!material.alphaToCoverage,map:HAS_MAP,matcap:HAS_MATCAP,envMap:HAS_ENVMAP,envMapMode:HAS_ENVMAP&&envMap.mapping,envMapCubeUVHeight:envMapCubeUVHeight,aoMap:HAS_AOMAP,lightMap:HAS_LIGHTMAP,bumpMap:HAS_BUMPMAP,normalMap:HAS_NORMALMAP,displacementMap:HAS_DISPLACEMENTMAP,emissiveMap:HAS_EMISSIVEMAP,normalMapObjectSpace:HAS_NORMALMAP&&material.normalMapType===ObjectSpaceNormalMap,normalMapTangentSpace:HAS_NORMALMAP&&material.normalMapType===TangentSpaceNormalMap,metalnessMap:HAS_METALNESSMAP,roughnessMap:HAS_ROUGHNESSMAP,anisotropy:HAS_ANISOTROPY,anisotropyMap:HAS_ANISOTROPYMAP,clearcoat:HAS_CLEARCOAT,clearcoatMap:HAS_CLEARCOATMAP,clearcoatNormalMap:HAS_CLEARCOAT_NORMALMAP,clearcoatRoughnessMap:HAS_CLEARCOAT_ROUGHNESSMAP,dispersion:HAS_DISPERSION,iridescence:HAS_IRIDESCENCE,iridescenceMap:HAS_IRIDESCENCEMAP,iridescenceThicknessMap:HAS_IRIDESCENCE_THICKNESSMAP,sheen:HAS_SHEEN,sheenColorMap:HAS_SHEEN_COLORMAP,sheenRoughnessMap:HAS_SHEEN_ROUGHNESSMAP,specularMap:HAS_SPECULARMAP,specularColorMap:HAS_SPECULAR_COLORMAP,specularIntensityMap:HAS_SPECULAR_INTENSITYMAP,transmission:HAS_TRANSMISSION,transmissionMap:HAS_TRANSMISSIONMAP,thicknessMap:HAS_THICKNESSMAP,gradientMap:HAS_GRADIENTMAP,opaque:material.transparent===false&&material.blending===NormalBlending&&material.alphaToCoverage===false,alphaMap:HAS_ALPHAMAP,alphaTest:HAS_ALPHATEST,alphaHash:HAS_ALPHAHASH,combine:material.combine,mapUv:HAS_MAP&&getChannel(material.map.channel),aoMapUv:HAS_AOMAP&&getChannel(material.aoMap.channel),lightMapUv:HAS_LIGHTMAP&&getChannel(material.lightMap.channel),bumpMapUv:HAS_BUMPMAP&&getChannel(material.bumpMap.channel),normalMapUv:HAS_NORMALMAP&&getChannel(material.normalMap.channel),displacementMapUv:HAS_DISPLACEMENTMAP&&getChannel(material.displacementMap.channel),emissiveMapUv:HAS_EMISSIVEMAP&&getChannel(material.emissiveMap.channel),metalnessMapUv:HAS_METALNESSMAP&&getChannel(material.metalnessMap.channel),roughnessMapUv:HAS_ROUGHNESSMAP&&getChannel(material.roughnessMap.channel),anisotropyMapUv:HAS_ANISOTROPYMAP&&getChannel(material.anisotropyMap.channel),clearcoatMapUv:HAS_CLEARCOATMAP&&getChannel(material.clearcoatMap.channel),clearcoatNormalMapUv:HAS_CLEARCOAT_NORMALMAP&&getChannel(material.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:HAS_CLEARCOAT_ROUGHNESSMAP&&getChannel(material.clearcoatRoughnessMap.channel),iridescenceMapUv:HAS_IRIDESCENCEMAP&&getChannel(material.iridescenceMap.channel),iridescenceThicknessMapUv:HAS_IRIDESCENCE_THICKNESSMAP&&getChannel(material.iridescenceThicknessMap.channel),sheenColorMapUv:HAS_SHEEN_COLORMAP&&getChannel(material.sheenColorMap.channel),sheenRoughnessMapUv:HAS_SHEEN_ROUGHNESSMAP&&getChannel(material.sheenRoughnessMap.channel),specularMapUv:HAS_SPECULARMAP&&getChannel(material.specularMap.channel),specularColorMapUv:HAS_SPECULAR_COLORMAP&&getChannel(material.specularColorMap.channel),specularIntensityMapUv:HAS_SPECULAR_INTENSITYMAP&&getChannel(material.specularIntensityMap.channel),transmissionMapUv:HAS_TRANSMISSIONMAP&&getChannel(material.transmissionMap.channel),thicknessMapUv:HAS_THICKNESSMAP&&getChannel(material.thicknessMap.channel),alphaMapUv:HAS_ALPHAMAP&&getChannel(material.alphaMap.channel),vertexTangents:!!geometry.attributes.tangent&&(HAS_NORMALMAP||HAS_ANISOTROPY),vertexColors:material.vertexColors,vertexAlphas:material.vertexColors===true&&!!geometry.attributes.color&&geometry.attributes.color.itemSize===4,pointsUvs:object.isPoints===true&&!!geometry.attributes.uv&&(HAS_MAP||HAS_ALPHAMAP),fog:!!fog,useFog:material.fog===true,fogExp2:!!fog&&fog.isFogExp2,flatShading:material.flatShading===true&&material.wireframe===false,sizeAttenuation:material.sizeAttenuation===true,logarithmicDepthBuffer:logarithmicDepthBuffer,reversedDepthBuffer:reversedDepthBuffer,skinning:object.isSkinnedMesh===true,morphTargets:geometry.morphAttributes.position!==undefined,morphNormals:geometry.morphAttributes.normal!==undefined,morphColors:geometry.morphAttributes.color!==undefined,morphTargetsCount:morphTargetsCount,morphTextureStride:morphTextureStride,numDirLights:lights.directional.length,numPointLights:lights.point.length,numSpotLights:lights.spot.length,numSpotLightMaps:lights.spotLightMap.length,numRectAreaLights:lights.rectArea.length,numHemiLights:lights.hemi.length,numDirLightShadows:lights.directionalShadowMap.length,numPointLightShadows:lights.pointShadowMap.length,numSpotLightShadows:lights.spotShadowMap.length,numSpotLightShadowsWithMaps:lights.numSpotLightShadowsWithMaps,numLightProbes:lights.numLightProbes,numClippingPlanes:clipping.numPlanes,numClipIntersection:clipping.numIntersection,dithering:material.dithering,shadowMapEnabled:renderer.shadowMap.enabled&&shadows.length>0,shadowMapType:renderer.shadowMap.type,toneMapping:toneMapping,decodeVideoTexture:HAS_MAP&&material.map.isVideoTexture===true&&ColorManagement.getTransfer(material.map.colorSpace)===SRGBTransfer,decodeVideoTextureEmissive:HAS_EMISSIVEMAP&&material.emissiveMap.isVideoTexture===true&&ColorManagement.getTransfer(material.emissiveMap.colorSpace)===SRGBTransfer,premultipliedAlpha:material.premultipliedAlpha,doubleSided:material.side===DoubleSide,flipSided:material.side===BackSide,useDepthPacking:material.depthPacking>=0,depthPacking:material.depthPacking||0,index0AttributeName:material.index0AttributeName,extensionClipCullDistance:HAS_EXTENSIONS&&material.extensions.clipCullDistance===true&&extensions.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(HAS_EXTENSIONS&&material.extensions.multiDraw===true||IS_BATCHEDMESH)&&extensions.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:extensions.has("KHR_parallel_shader_compile"),customProgramCacheKey:material.customProgramCacheKey()};parameters.vertexUv1s=_activeChannels.has(1);parameters.vertexUv2s=_activeChannels.has(2);parameters.vertexUv3s=_activeChannels.has(3);_activeChannels.clear();return parameters}function getProgramCacheKey(parameters){const array=[];if(parameters.shaderID){array.push(parameters.shaderID)}else{array.push(parameters.customVertexShaderID);array.push(parameters.customFragmentShaderID)}if(parameters.defines!==undefined){for(const name in parameters.defines){array.push(name);array.push(parameters.defines[name])}}if(parameters.isRawShaderMaterial===false){getProgramCacheKeyParameters(array,parameters);getProgramCacheKeyBooleans(array,parameters);array.push(renderer.outputColorSpace)}array.push(parameters.customProgramCacheKey);return array.join()}function getProgramCacheKeyParameters(array,parameters){array.push(parameters.precision);array.push(parameters.outputColorSpace);array.push(parameters.envMapMode);array.push(parameters.envMapCubeUVHeight);array.push(parameters.mapUv);array.push(parameters.alphaMapUv);array.push(parameters.lightMapUv);array.push(parameters.aoMapUv);array.push(parameters.bumpMapUv);array.push(parameters.normalMapUv);array.push(parameters.displacementMapUv);array.push(parameters.emissiveMapUv);array.push(parameters.metalnessMapUv);array.push(parameters.roughnessMapUv);array.push(parameters.anisotropyMapUv);array.push(parameters.clearcoatMapUv);array.push(parameters.clearcoatNormalMapUv);array.push(parameters.clearcoatRoughnessMapUv);array.push(parameters.iridescenceMapUv);array.push(parameters.iridescenceThicknessMapUv);array.push(parameters.sheenColorMapUv);array.push(parameters.sheenRoughnessMapUv);array.push(parameters.specularMapUv);array.push(parameters.specularColorMapUv);array.push(parameters.specularIntensityMapUv);array.push(parameters.transmissionMapUv);array.push(parameters.thicknessMapUv);array.push(parameters.combine);array.push(parameters.fogExp2);array.push(parameters.sizeAttenuation);array.push(parameters.morphTargetsCount);array.push(parameters.morphAttributeCount);array.push(parameters.numDirLights);array.push(parameters.numPointLights);array.push(parameters.numSpotLights);array.push(parameters.numSpotLightMaps);array.push(parameters.numHemiLights);array.push(parameters.numRectAreaLights);array.push(parameters.numDirLightShadows);array.push(parameters.numPointLightShadows);array.push(parameters.numSpotLightShadows);array.push(parameters.numSpotLightShadowsWithMaps);array.push(parameters.numLightProbes);array.push(parameters.shadowMapType);array.push(parameters.toneMapping);array.push(parameters.numClippingPlanes);array.push(parameters.numClipIntersection);array.push(parameters.depthPacking)}function getProgramCacheKeyBooleans(array,parameters){_programLayers.disableAll();if(parameters.instancing)_programLayers.enable(0);if(parameters.instancingColor)_programLayers.enable(1);if(parameters.instancingMorph)_programLayers.enable(2);if(parameters.matcap)_programLayers.enable(3);if(parameters.envMap)_programLayers.enable(4);if(parameters.normalMapObjectSpace)_programLayers.enable(5);if(parameters.normalMapTangentSpace)_programLayers.enable(6);if(parameters.clearcoat)_programLayers.enable(7);if(parameters.iridescence)_programLayers.enable(8);if(parameters.alphaTest)_programLayers.enable(9);if(parameters.vertexColors)_programLayers.enable(10);if(parameters.vertexAlphas)_programLayers.enable(11);if(parameters.vertexUv1s)_programLayers.enable(12);if(parameters.vertexUv2s)_programLayers.enable(13);if(parameters.vertexUv3s)_programLayers.enable(14);if(parameters.vertexTangents)_programLayers.enable(15);if(parameters.anisotropy)_programLayers.enable(16);if(parameters.alphaHash)_programLayers.enable(17);if(parameters.batching)_programLayers.enable(18);if(parameters.dispersion)_programLayers.enable(19);if(parameters.batchingColor)_programLayers.enable(20);if(parameters.gradientMap)_programLayers.enable(21);array.push(_programLayers.mask);_programLayers.disableAll();if(parameters.fog)_programLayers.enable(0);if(parameters.useFog)_programLayers.enable(1);if(parameters.flatShading)_programLayers.enable(2);if(parameters.logarithmicDepthBuffer)_programLayers.enable(3);if(parameters.reversedDepthBuffer)_programLayers.enable(4);if(parameters.skinning)_programLayers.enable(5);if(parameters.morphTargets)_programLayers.enable(6);if(parameters.morphNormals)_programLayers.enable(7);if(parameters.morphColors)_programLayers.enable(8);if(parameters.premultipliedAlpha)_programLayers.enable(9);if(parameters.shadowMapEnabled)_programLayers.enable(10);if(parameters.doubleSided)_programLayers.enable(11);if(parameters.flipSided)_programLayers.enable(12);if(parameters.useDepthPacking)_programLayers.enable(13);if(parameters.dithering)_programLayers.enable(14);if(parameters.transmission)_programLayers.enable(15);if(parameters.sheen)_programLayers.enable(16);if(parameters.opaque)_programLayers.enable(17);if(parameters.pointsUvs)_programLayers.enable(18);if(parameters.decodeVideoTexture)_programLayers.enable(19);if(parameters.decodeVideoTextureEmissive)_programLayers.enable(20);if(parameters.alphaToCoverage)_programLayers.enable(21);array.push(_programLayers.mask)}function getUniforms(material){const shaderID=shaderIDs[material.type];let uniforms;if(shaderID){const shader=ShaderLib[shaderID];uniforms=UniformsUtils.clone(shader.uniforms)}else{uniforms=material.uniforms}return uniforms}function acquireProgram(parameters,cacheKey){let program=programsMap.get(cacheKey);if(program!==undefined){++program.usedTimes}else{program=new WebGLProgram(renderer,cacheKey,parameters,bindingStates);programs.push(program);programsMap.set(cacheKey,program)}return program}function releaseProgram(program){if(--program.usedTimes===0){const i=programs.indexOf(program);programs[i]=programs[programs.length-1];programs.pop();programsMap.delete(program.cacheKey);program.destroy()}}function releaseShaderCache(material){_customShaders.remove(material)}function dispose(){_customShaders.dispose()}return{getParameters:getParameters,getProgramCacheKey:getProgramCacheKey,getUniforms:getUniforms,acquireProgram:acquireProgram,releaseProgram:releaseProgram,releaseShaderCache:releaseShaderCache,programs:programs,dispose:dispose}}function WebGLProperties(){let properties=new WeakMap;function has(object){return properties.has(object)}function get(object){let map=properties.get(object);if(map===undefined){map={};properties.set(object,map)}return map}function remove(object){properties.delete(object)}function update(object,key,value){properties.get(object)[key]=value}function dispose(){properties=new WeakMap}return{has:has,get:get,remove:remove,update:update,dispose:dispose}}function painterSortStable(a,b){if(a.groupOrder!==b.groupOrder){return a.groupOrder-b.groupOrder}else if(a.renderOrder!==b.renderOrder){return a.renderOrder-b.renderOrder}else if(a.material.id!==b.material.id){return a.material.id-b.material.id}else if(a.z!==b.z){return a.z-b.z}else{return a.id-b.id}}function reversePainterSortStable(a,b){if(a.groupOrder!==b.groupOrder){return a.groupOrder-b.groupOrder}else if(a.renderOrder!==b.renderOrder){return a.renderOrder-b.renderOrder}else if(a.z!==b.z){return b.z-a.z}else{return a.id-b.id}}function WebGLRenderList(){const renderItems=[];let renderItemsIndex=0;const opaque=[];const transmissive=[];const transparent=[];function init(){renderItemsIndex=0;opaque.length=0;transmissive.length=0;transparent.length=0}function getNextRenderItem(object,geometry,material,groupOrder,z,group){let renderItem=renderItems[renderItemsIndex];if(renderItem===undefined){renderItem={id:object.id,object:object,geometry:geometry,material:material,groupOrder:groupOrder,renderOrder:object.renderOrder,z:z,group:group};renderItems[renderItemsIndex]=renderItem}else{renderItem.id=object.id;renderItem.object=object;renderItem.geometry=geometry;renderItem.material=material;renderItem.groupOrder=groupOrder;renderItem.renderOrder=object.renderOrder;renderItem.z=z;renderItem.group=group}renderItemsIndex++;return renderItem}function push(object,geometry,material,groupOrder,z,group){const renderItem=getNextRenderItem(object,geometry,material,groupOrder,z,group);if(material.transmission>0){transmissive.push(renderItem)}else if(material.transparent===true){transparent.push(renderItem)}else{opaque.push(renderItem)}}function unshift(object,geometry,material,groupOrder,z,group){const renderItem=getNextRenderItem(object,geometry,material,groupOrder,z,group);if(material.transmission>0){transmissive.unshift(renderItem)}else if(material.transparent===true){transparent.unshift(renderItem)}else{opaque.unshift(renderItem)}}function sort(customOpaqueSort,customTransparentSort){if(opaque.length>1)opaque.sort(customOpaqueSort||painterSortStable);if(transmissive.length>1)transmissive.sort(customTransparentSort||reversePainterSortStable);if(transparent.length>1)transparent.sort(customTransparentSort||reversePainterSortStable)}function finish(){for(let i=renderItemsIndex,il=renderItems.length;i<il;i++){const renderItem=renderItems[i];if(renderItem.id===null)break;renderItem.id=null;renderItem.object=null;renderItem.geometry=null;renderItem.material=null;renderItem.group=null}}return{opaque:opaque,transmissive:transmissive,transparent:transparent,init:init,push:push,unshift:unshift,finish:finish,sort:sort}}function WebGLRenderLists(){let lists=new WeakMap;function get(scene,renderCallDepth){const listArray=lists.get(scene);let list;if(listArray===undefined){list=new WebGLRenderList;lists.set(scene,[list])}else{if(renderCallDepth>=listArray.length){list=new WebGLRenderList;listArray.push(list)}else{list=listArray[renderCallDepth]}}return list}function dispose(){lists=new WeakMap}return{get:get,dispose:dispose}}function UniformsCache(){const lights={};return{get:function(light){if(lights[light.id]!==undefined){return lights[light.id]}let uniforms;switch(light.type){case"DirectionalLight":uniforms={direction:new Vector3,color:new Color};break;case"SpotLight":uniforms={position:new Vector3,direction:new Vector3,color:new Color,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":uniforms={position:new Vector3,color:new Color,distance:0,decay:0};break;case"HemisphereLight":uniforms={direction:new Vector3,skyColor:new Color,groundColor:new Color};break;case"RectAreaLight":uniforms={color:new Color,position:new Vector3,halfWidth:new Vector3,halfHeight:new Vector3};break;}lights[light.id]=uniforms;return uniforms}}}function ShadowUniformsCache(){const lights={};return{get:function(light){if(lights[light.id]!==undefined){return lights[light.id]}let uniforms;switch(light.type){case"DirectionalLight":uniforms={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"SpotLight":uniforms={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"PointLight":uniforms={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2,shadowCameraNear:1,shadowCameraFar:1000};break;}lights[light.id]=uniforms;return uniforms}}}let nextVersion=0;function shadowCastingAndTexturingLightsFirst(lightA,lightB){return(lightB.castShadow?2:0)-(lightA.castShadow?2:0)+(lightB.map?1:0)-(lightA.map?1:0)}function WebGLLights(extensions){const cache=new UniformsCache;const shadowCache=ShadowUniformsCache();const state={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let i=0;i<9;i++)state.probe.push(new Vector3);const vector3=new Vector3;const matrix4=new Matrix4;const matrix42=new Matrix4;function setup(lights){let r=0,g=0,b=0;for(let i=0;i<9;i++)state.probe[i].set(0,0,0);let directionalLength=0;let pointLength=0;let spotLength=0;let rectAreaLength=0;let hemiLength=0;let numDirectionalShadows=0;let numPointShadows=0;let numSpotShadows=0;let numSpotMaps=0;let numSpotShadowsWithMaps=0;let numLightProbes=0;lights.sort(shadowCastingAndTexturingLightsFirst);for(let i=0,l=lights.length;i<l;i++){const light=lights[i];const color=light.color;const intensity=light.intensity;const distance=light.distance;let shadowMap=null;if(light.shadow&&light.shadow.map){if(light.shadow.map.texture.format===RGFormat){shadowMap=light.shadow.map.texture}else{shadowMap=light.shadow.map.depthTexture||light.shadow.map.texture}}if(light.isAmbientLight){r+=color.r*intensity;g+=color.g*intensity;b+=color.b*intensity}else if(light.isLightProbe){for(let j=0;j<9;j++){state.probe[j].addScaledVector(light.sh.coefficients[j],intensity)}numLightProbes++}else if(light.isDirectionalLight){const uniforms=cache.get(light);uniforms.color.copy(light.color).multiplyScalar(light.intensity);if(light.castShadow){const shadow=light.shadow;const shadowUniforms=shadowCache.get(light);shadowUniforms.shadowIntensity=shadow.intensity;shadowUniforms.shadowBias=shadow.bias;shadowUniforms.shadowNormalBias=shadow.normalBias;shadowUniforms.shadowRadius=shadow.radius;shadowUniforms.shadowMapSize=shadow.mapSize;state.directionalShadow[directionalLength]=shadowUniforms;state.directionalShadowMap[directionalLength]=shadowMap;state.directionalShadowMatrix[directionalLength]=light.shadow.matrix;numDirectionalShadows++}state.directional[directionalLength]=uniforms;directionalLength++}else if(light.isSpotLight){const uniforms=cache.get(light);uniforms.position.setFromMatrixPosition(light.matrixWorld);uniforms.color.copy(color).multiplyScalar(intensity);uniforms.distance=distance;uniforms.coneCos=Math.cos(light.angle);uniforms.penumbraCos=Math.cos(light.angle*(1-light.penumbra));uniforms.decay=light.decay;state.spot[spotLength]=uniforms;const shadow=light.shadow;if(light.map){state.spotLightMap[numSpotMaps]=light.map;numSpotMaps++;shadow.updateMatrices(light);if(light.castShadow)numSpotShadowsWithMaps++}state.spotLightMatrix[spotLength]=shadow.matrix;if(light.castShadow){const shadowUniforms=shadowCache.get(light);shadowUniforms.shadowIntensity=shadow.intensity;shadowUniforms.shadowBias=shadow.bias;shadowUniforms.shadowNormalBias=shadow.normalBias;shadowUniforms.shadowRadius=shadow.radius;shadowUniforms.shadowMapSize=shadow.mapSize;state.spotShadow[spotLength]=shadowUniforms;state.spotShadowMap[spotLength]=shadowMap;numSpotShadows++}spotLength++}else if(light.isRectAreaLight){const uniforms=cache.get(light);uniforms.color.copy(color).multiplyScalar(intensity);uniforms.halfWidth.set(light.width*0.5,0,0);uniforms.halfHeight.set(0,light.height*0.5,0);state.rectArea[rectAreaLength]=uniforms;rectAreaLength++}else if(light.isPointLight){const uniforms=cache.get(light);uniforms.color.copy(light.color).multiplyScalar(light.intensity);uniforms.distance=light.distance;uniforms.decay=light.decay;if(light.castShadow){const shadow=light.shadow;const shadowUniforms=shadowCache.get(light);shadowUniforms.shadowIntensity=shadow.intensity;shadowUniforms.shadowBias=shadow.bias;shadowUniforms.shadowNormalBias=shadow.normalBias;shadowUniforms.shadowRadius=shadow.radius;shadowUniforms.shadowMapSize=shadow.mapSize;shadowUniforms.shadowCameraNear=shadow.camera.near;shadowUniforms.shadowCameraFar=shadow.camera.far;state.pointShadow[pointLength]=shadowUniforms;state.pointShadowMap[pointLength]=shadowMap;state.pointShadowMatrix[pointLength]=light.shadow.matrix;numPointShadows++}state.point[pointLength]=uniforms;pointLength++}else if(light.isHemisphereLight){const uniforms=cache.get(light);uniforms.skyColor.copy(light.color).multiplyScalar(intensity);uniforms.groundColor.copy(light.groundColor).multiplyScalar(intensity);state.hemi[hemiLength]=uniforms;hemiLength++}}if(rectAreaLength>0){if(extensions.has("OES_texture_float_linear")===true){state.rectAreaLTC1=UniformsLib.LTC_FLOAT_1;state.rectAreaLTC2=UniformsLib.LTC_FLOAT_2}else{state.rectAreaLTC1=UniformsLib.LTC_HALF_1;state.rectAreaLTC2=UniformsLib.LTC_HALF_2}}state.ambient[0]=r;state.ambient[1]=g;state.ambient[2]=b;const hash=state.hash;if(hash.directionalLength!==directionalLength||hash.pointLength!==pointLength||hash.spotLength!==spotLength||hash.rectAreaLength!==rectAreaLength||hash.hemiLength!==hemiLength||hash.numDirectionalShadows!==numDirectionalShadows||hash.numPointShadows!==numPointShadows||hash.numSpotShadows!==numSpotShadows||hash.numSpotMaps!==numSpotMaps||hash.numLightProbes!==numLightProbes){state.directional.length=directionalLength;state.spot.length=spotLength;state.rectArea.length=rectAreaLength;state.point.length=pointLength;state.hemi.length=hemiLength;state.directionalShadow.length=numDirectionalShadows;state.directionalShadowMap.length=numDirectionalShadows;state.pointShadow.length=numPointShadows;state.pointShadowMap.length=numPointShadows;state.spotShadow.length=numSpotShadows;state.spotShadowMap.length=numSpotShadows;state.directionalShadowMatrix.length=numDirectionalShadows;state.pointShadowMatrix.length=numPointShadows;state.spotLightMatrix.length=numSpotShadows+numSpotMaps-numSpotShadowsWithMaps;state.spotLightMap.length=numSpotMaps;state.numSpotLightShadowsWithMaps=numSpotShadowsWithMaps;state.numLightProbes=numLightProbes;hash.directionalLength=directionalLength;hash.pointLength=pointLength;hash.spotLength=spotLength;hash.rectAreaLength=rectAreaLength;hash.hemiLength=hemiLength;hash.numDirectionalShadows=numDirectionalShadows;hash.numPointShadows=numPointShadows;hash.numSpotShadows=numSpotShadows;hash.numSpotMaps=numSpotMaps;hash.numLightProbes=numLightProbes;state.version=nextVersion++}}function setupView(lights,camera){let directionalLength=0;let pointLength=0;let spotLength=0;let rectAreaLength=0;let hemiLength=0;const viewMatrix=camera.matrixWorldInverse;for(let i=0,l=lights.length;i<l;i++){const light=lights[i];if(light.isDirectionalLight){const uniforms=state.directional[directionalLength];uniforms.direction.setFromMatrixPosition(light.matrixWorld);vector3.setFromMatrixPosition(light.target.matrixWorld);uniforms.direction.sub(vector3);uniforms.direction.transformDirection(viewMatrix);directionalLength++}else if(light.isSpotLight){const uniforms=state.spot[spotLength];uniforms.position.setFromMatrixPosition(light.matrixWorld);uniforms.position.applyMatrix4(viewMatrix);uniforms.direction.setFromMatrixPosition(light.matrixWorld);vector3.setFromMatrixPosition(light.target.matrixWorld);uniforms.direction.sub(vector3);uniforms.direction.transformDirection(viewMatrix);spotLength++}else if(light.isRectAreaLight){const uniforms=state.rectArea[rectAreaLength];uniforms.position.setFromMatrixPosition(light.matrixWorld);uniforms.position.applyMatrix4(viewMatrix);matrix42.identity();matrix4.copy(light.matrixWorld);matrix4.premultiply(viewMatrix);matrix42.extractRotation(matrix4);uniforms.halfWidth.set(light.width*0.5,0,0);uniforms.halfHeight.set(0,light.height*0.5,0);uniforms.halfWidth.applyMatrix4(matrix42);uniforms.halfHeight.applyMatrix4(matrix42);rectAreaLength++}else if(light.isPointLight){const uniforms=state.point[pointLength];uniforms.position.setFromMatrixPosition(light.matrixWorld);uniforms.position.applyMatrix4(viewMatrix);pointLength++}else if(light.isHemisphereLight){const uniforms=state.hemi[hemiLength];uniforms.direction.setFromMatrixPosition(light.matrixWorld);uniforms.direction.transformDirection(viewMatrix);hemiLength++}}}return{setup:setup,setupView:setupView,state:state}}function WebGLRenderState(extensions){const lights=new WebGLLights(extensions);const lightsArray=[];const shadowsArray=[];function init(camera){state.camera=camera;lightsArray.length=0;shadowsArray.length=0}function pushLight(light){lightsArray.push(light)}function pushShadow(shadowLight){shadowsArray.push(shadowLight)}function setupLights(){lights.setup(lightsArray)}function setupLightsView(camera){lights.setupView(lightsArray,camera)}const state={lightsArray:lightsArray,shadowsArray:shadowsArray,camera:null,lights:lights,transmissionRenderTarget:{}};return{init:init,state:state,setupLights:setupLights,setupLightsView:setupLightsView,pushLight:pushLight,pushShadow:pushShadow}}function WebGLRenderStates(extensions){let renderStates=new WeakMap;function get(scene,renderCallDepth=0){const renderStateArray=renderStates.get(scene);let renderState;if(renderStateArray===undefined){renderState=new WebGLRenderState(extensions);renderStates.set(scene,[renderState])}else{if(renderCallDepth>=renderStateArray.length){renderState=new WebGLRenderState(extensions);renderStateArray.push(renderState)}else{renderState=renderStateArray[renderCallDepth]}}return renderState}function dispose(){renderStates=new WeakMap}return{get:get,dispose:dispose}}const vertex="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}";const fragment="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );\n\tgl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );\n}";const _cubeDirections=[new Vector3(1,0,0),new Vector3(-1,0,0),new Vector3(0,1,0),new Vector3(0,-1,0),new Vector3(0,0,1),new Vector3(0,0,-1)];const _cubeUps=[new Vector3(0,-1,0),new Vector3(0,-1,0),new Vector3(0,0,1),new Vector3(0,0,-1),new Vector3(0,-1,0),new Vector3(0,-1,0)];const _projScreenMatrix=new Matrix4;const _lightPositionWorld=new Vector3;const _lookTarget=new Vector3;function WebGLShadowMap(renderer,objects,capabilities){let _frustum=new Frustum;const _shadowMapSize=new Vector2,_viewportSize=new Vector2,_viewport=new Vector4,_depthMaterial=new MeshDepthMaterial,_distanceMaterial=new MeshDistanceMaterial,_materialCache={},_maxTextureSize=capabilities.maxTextureSize;const shadowSide={[FrontSide]:BackSide,[BackSide]:FrontSide,[DoubleSide]:DoubleSide};const shadowMaterialVertical=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:vertex,fragmentShader:fragment});const shadowMaterialHorizontal=shadowMaterialVertical.clone();shadowMaterialHorizontal.defines.HORIZONTAL_PASS=1;const fullScreenTri=new BufferGeometry;fullScreenTri.setAttribute("position",new BufferAttribute(new Float32Array([-1,-1,0.5,3,-1,0.5,-1,3,0.5]),3));const fullScreenMesh=new Mesh(fullScreenTri,shadowMaterialVertical);const scope=this;this.enabled=false;this.autoUpdate=true;this.needsUpdate=false;this.type=PCFShadowMap;let _previousType=this.type;this.render=function(lights,scene,camera){if(scope.enabled===false)return;if(scope.autoUpdate===false&&scope.needsUpdate===false)return;if(lights.length===0)return;if(lights.type===PCFSoftShadowMap){warn("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead.");lights.type=PCFShadowMap}const currentRenderTarget=renderer.getRenderTarget();const activeCubeFace=renderer.getActiveCubeFace();const activeMipmapLevel=renderer.getActiveMipmapLevel();const _state=renderer.state;_state.setBlending(NoBlending);if(_state.buffers.depth.getReversed()===true){_state.buffers.color.setClear(0,0,0,0)}else{_state.buffers.color.setClear(1,1,1,1)}_state.buffers.depth.setTest(true);_state.setScissorTest(false);const typeChanged=_previousType!==this.type;if(typeChanged){scene.traverse(function(object){if(object.material){if(Array.isArray(object.material)){object.material.forEach(mat=>mat.needsUpdate=true)}else{object.material.needsUpdate=true}}})}for(let i=0,il=lights.length;i<il;i++){const light=lights[i];const shadow=light.shadow;if(shadow===undefined){warn("WebGLShadowMap:",light,"has no shadow.");continue}if(shadow.autoUpdate===false&&shadow.needsUpdate===false)continue;_shadowMapSize.copy(shadow.mapSize);const shadowFrameExtents=shadow.getFrameExtents();_shadowMapSize.multiply(shadowFrameExtents);_viewportSize.copy(shadow.mapSize);if(_shadowMapSize.x>_maxTextureSize||_shadowMapSize.y>_maxTextureSize){if(_shadowMapSize.x>_maxTextureSize){_viewportSize.x=Math.floor(_maxTextureSize/shadowFrameExtents.x);_shadowMapSize.x=_viewportSize.x*shadowFrameExtents.x;shadow.mapSize.x=_viewportSize.x}if(_shadowMapSize.y>_maxTextureSize){_viewportSize.y=Math.floor(_maxTextureSize/shadowFrameExtents.y);_shadowMapSize.y=_viewportSize.y*shadowFrameExtents.y;shadow.mapSize.y=_viewportSize.y}}if(shadow.map===null||typeChanged===true){if(shadow.map!==null){if(shadow.map.depthTexture!==null){shadow.map.depthTexture.dispose();shadow.map.depthTexture=null}shadow.map.dispose()}if(this.type===VSMShadowMap){if(light.isPointLight){warn("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}shadow.map=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y,{format:RGFormat,type:HalfFloatType,minFilter:LinearFilter,magFilter:LinearFilter,generateMipmaps:false});shadow.map.texture.name=light.name+".shadowMap";shadow.map.depthTexture=new DepthTexture(_shadowMapSize.x,_shadowMapSize.y,FloatType);shadow.map.depthTexture.name=light.name+".shadowMapDepth";shadow.map.depthTexture.format=DepthFormat;shadow.map.depthTexture.compareFunction=null;shadow.map.depthTexture.minFilter=NearestFilter;shadow.map.depthTexture.magFilter=NearestFilter}else{if(light.isPointLight){shadow.map=new WebGLCubeRenderTarget(_shadowMapSize.x);shadow.map.depthTexture=new CubeDepthTexture(_shadowMapSize.x,UnsignedIntType)}else{shadow.map=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y);shadow.map.depthTexture=new DepthTexture(_shadowMapSize.x,_shadowMapSize.y,UnsignedIntType)}shadow.map.depthTexture.name=light.name+".shadowMap";shadow.map.depthTexture.format=DepthFormat;const reversedDepthBuffer=renderer.state.buffers.depth.getReversed();if(this.type===PCFShadowMap){shadow.map.depthTexture.compareFunction=reversedDepthBuffer?GreaterEqualCompare:LessEqualCompare;shadow.map.depthTexture.minFilter=LinearFilter;shadow.map.depthTexture.magFilter=LinearFilter}else{shadow.map.depthTexture.compareFunction=null;shadow.map.depthTexture.minFilter=NearestFilter;shadow.map.depthTexture.magFilter=NearestFilter}}shadow.camera.updateProjectionMatrix()}const faceCount=shadow.map.isWebGLCubeRenderTarget?6:1;for(let face=0;face<faceCount;face++){if(shadow.map.isWebGLCubeRenderTarget){renderer.setRenderTarget(shadow.map,face);renderer.clear()}else{if(face===0){renderer.setRenderTarget(shadow.map);renderer.clear()}const viewport=shadow.getViewport(face);_viewport.set(_viewportSize.x*viewport.x,_viewportSize.y*viewport.y,_viewportSize.x*viewport.z,_viewportSize.y*viewport.w);_state.viewport(_viewport)}if(light.isPointLight){const camera=shadow.camera;const shadowMatrix=shadow.matrix;const far=light.distance||camera.far;if(far!==camera.far){camera.far=far;camera.updateProjectionMatrix()}_lightPositionWorld.setFromMatrixPosition(light.matrixWorld);camera.position.copy(_lightPositionWorld);_lookTarget.copy(camera.position);_lookTarget.add(_cubeDirections[face]);camera.up.copy(_cubeUps[face]);camera.lookAt(_lookTarget);camera.updateMatrixWorld();shadowMatrix.makeTranslation(-_lightPositionWorld.x,-_lightPositionWorld.y,-_lightPositionWorld.z);_projScreenMatrix.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);shadow._frustum.setFromProjectionMatrix(_projScreenMatrix,camera.coordinateSystem,camera.reversedDepth)}else{shadow.updateMatrices(light)}_frustum=shadow.getFrustum();renderObject(scene,camera,shadow.camera,light,this.type)}if(shadow.isPointLightShadow!==true&&this.type===VSMShadowMap){VSMPass(shadow,camera)}shadow.needsUpdate=false}_previousType=this.type;scope.needsUpdate=false;renderer.setRenderTarget(currentRenderTarget,activeCubeFace,activeMipmapLevel)};function VSMPass(shadow,camera){const geometry=objects.update(fullScreenMesh);if(shadowMaterialVertical.defines.VSM_SAMPLES!==shadow.blurSamples){shadowMaterialVertical.defines.VSM_SAMPLES=shadow.blurSamples;shadowMaterialHorizontal.defines.VSM_SAMPLES=shadow.blurSamples;shadowMaterialVertical.needsUpdate=true;shadowMaterialHorizontal.needsUpdate=true}if(shadow.mapPass===null){shadow.mapPass=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y,{format:RGFormat,type:HalfFloatType})}shadowMaterialVertical.uniforms.shadow_pass.value=shadow.map.depthTexture;shadowMaterialVertical.uniforms.resolution.value=shadow.mapSize;shadowMaterialVertical.uniforms.radius.value=shadow.radius;renderer.setRenderTarget(shadow.mapPass);renderer.clear();renderer.renderBufferDirect(camera,null,geometry,shadowMaterialVertical,fullScreenMesh,null);shadowMaterialHorizontal.uniforms.shadow_pass.value=shadow.mapPass.texture;shadowMaterialHorizontal.uniforms.resolution.value=shadow.mapSize;shadowMaterialHorizontal.uniforms.radius.value=shadow.radius;renderer.setRenderTarget(shadow.map);renderer.clear();renderer.renderBufferDirect(camera,null,geometry,shadowMaterialHorizontal,fullScreenMesh,null)}function getDepthMaterial(object,material,light,type){let result=null;const customMaterial=light.isPointLight===true?object.customDistanceMaterial:object.customDepthMaterial;if(customMaterial!==undefined){result=customMaterial}else{result=light.isPointLight===true?_distanceMaterial:_depthMaterial;if(renderer.localClippingEnabled&&material.clipShadows===true&&Array.isArray(material.clippingPlanes)&&material.clippingPlanes.length!==0||material.displacementMap&&material.displacementScale!==0||material.alphaMap&&material.alphaTest>0||material.map&&material.alphaTest>0||material.alphaToCoverage===true){const keyA=result.uuid,keyB=material.uuid;let materialsForVariant=_materialCache[keyA];if(materialsForVariant===undefined){materialsForVariant={};_materialCache[keyA]=materialsForVariant}let cachedMaterial=materialsForVariant[keyB];if(cachedMaterial===undefined){cachedMaterial=result.clone();materialsForVariant[keyB]=cachedMaterial;material.addEventListener("dispose",onMaterialDispose)}result=cachedMaterial}}result.visible=material.visible;result.wireframe=material.wireframe;if(type===VSMShadowMap){result.side=material.shadowSide!==null?material.shadowSide:material.side}else{result.side=material.shadowSide!==null?material.shadowSide:shadowSide[material.side]}result.alphaMap=material.alphaMap;result.alphaTest=material.alphaToCoverage===true?0.5:material.alphaTest;result.map=material.map;result.clipShadows=material.clipShadows;result.clippingPlanes=material.clippingPlanes;result.clipIntersection=material.clipIntersection;result.displacementMap=material.displacementMap;result.displacementScale=material.displacementScale;result.displacementBias=material.displacementBias;result.wireframeLinewidth=material.wireframeLinewidth;result.linewidth=material.linewidth;if(light.isPointLight===true&&result.isMeshDistanceMaterial===true){const materialProperties=renderer.properties.get(result);materialProperties.light=light}return result}function renderObject(object,camera,shadowCamera,light,type){if(object.visible===false)return;const visible=object.layers.test(camera.layers);if(visible&&(object.isMesh||object.isLine||object.isPoints)){if((object.castShadow||object.receiveShadow&&type===VSMShadowMap)&&(!object.frustumCulled||_frustum.intersectsObject(object))){object.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse,object.matrixWorld);const geometry=objects.update(object);const material=object.material;if(Array.isArray(material)){const groups=geometry.groups;for(let k=0,kl=groups.length;k<kl;k++){const group=groups[k];const groupMaterial=material[group.materialIndex];if(groupMaterial&&groupMaterial.visible){const depthMaterial=getDepthMaterial(object,groupMaterial,light,type);object.onBeforeShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial,group);renderer.renderBufferDirect(shadowCamera,null,geometry,depthMaterial,object,group);object.onAfterShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial,group)}}}else if(material.visible){const depthMaterial=getDepthMaterial(object,material,light,type);object.onBeforeShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial,null);renderer.renderBufferDirect(shadowCamera,null,geometry,depthMaterial,object,null);object.onAfterShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial,null)}}}const children=object.children;for(let i=0,l=children.length;i<l;i++){renderObject(children[i],camera,shadowCamera,light,type)}}function onMaterialDispose(event){const material=event.target;material.removeEventListener("dispose",onMaterialDispose);for(const id in _materialCache){const cache=_materialCache[id];const uuid=event.target.uuid;if(uuid in cache){const shadowMaterial=cache[uuid];shadowMaterial.dispose();delete cache[uuid]}}}}const reversedFuncs={[NeverDepth]:AlwaysDepth,[LessDepth]:GreaterDepth,[EqualDepth]:NotEqualDepth,[LessEqualDepth]:GreaterEqualDepth,[AlwaysDepth]:NeverDepth,[GreaterDepth]:LessDepth,[NotEqualDepth]:EqualDepth,[GreaterEqualDepth]:LessEqualDepth};function WebGLState(gl,extensions){function ColorBuffer(){let locked=false;const color=new Vector4;let currentColorMask=null;const currentColorClear=new Vector4(0,0,0,0);return{setMask:function(colorMask){if(currentColorMask!==colorMask&&!locked){gl.colorMask(colorMask,colorMask,colorMask,colorMask);currentColorMask=colorMask}},setLocked:function(lock){locked=lock},setClear:function(r,g,b,a,premultipliedAlpha){if(premultipliedAlpha===true){r*=a;g*=a;b*=a}color.set(r,g,b,a);if(currentColorClear.equals(color)===false){gl.clearColor(r,g,b,a);currentColorClear.copy(color)}},reset:function(){locked=false;currentColorMask=null;currentColorClear.set(-1,0,0,0)}}}function DepthBuffer(){let locked=false;let currentReversed=false;let currentDepthMask=null;let currentDepthFunc=null;let currentDepthClear=null;return{setReversed:function(reversed){if(currentReversed!==reversed){const ext=extensions.get("EXT_clip_control");if(reversed){ext.clipControlEXT(ext.LOWER_LEFT_EXT,ext.ZERO_TO_ONE_EXT)}else{ext.clipControlEXT(ext.LOWER_LEFT_EXT,ext.NEGATIVE_ONE_TO_ONE_EXT)}currentReversed=reversed;const oldDepth=currentDepthClear;currentDepthClear=null;this.setClear(oldDepth)}},getReversed:function(){return currentReversed},setTest:function(depthTest){if(depthTest){enable(gl.DEPTH_TEST)}else{disable(gl.DEPTH_TEST)}},setMask:function(depthMask){if(currentDepthMask!==depthMask&&!locked){gl.depthMask(depthMask);currentDepthMask=depthMask}},setFunc:function(depthFunc){if(currentReversed)depthFunc=reversedFuncs[depthFunc];if(currentDepthFunc!==depthFunc){switch(depthFunc){case NeverDepth:gl.depthFunc(gl.NEVER);break;case AlwaysDepth:gl.depthFunc(gl.ALWAYS);break;case LessDepth:gl.depthFunc(gl.LESS);break;case LessEqualDepth:gl.depthFunc(gl.LEQUAL);break;case EqualDepth:gl.depthFunc(gl.EQUAL);break;case GreaterEqualDepth:gl.depthFunc(gl.GEQUAL);break;case GreaterDepth:gl.depthFunc(gl.GREATER);break;case NotEqualDepth:gl.depthFunc(gl.NOTEQUAL);break;default:gl.depthFunc(gl.LEQUAL);}currentDepthFunc=depthFunc}},setLocked:function(lock){locked=lock},setClear:function(depth){if(currentDepthClear!==depth){if(currentReversed){depth=1-depth}gl.clearDepth(depth);currentDepthClear=depth}},reset:function(){locked=false;currentDepthMask=null;currentDepthFunc=null;currentDepthClear=null;currentReversed=false}}}function StencilBuffer(){let locked=false;let currentStencilMask=null;let currentStencilFunc=null;let currentStencilRef=null;let currentStencilFuncMask=null;let currentStencilFail=null;let currentStencilZFail=null;let currentStencilZPass=null;let currentStencilClear=null;return{setTest:function(stencilTest){if(!locked){if(stencilTest){enable(gl.STENCIL_TEST)}else{disable(gl.STENCIL_TEST)}}},setMask:function(stencilMask){if(currentStencilMask!==stencilMask&&!locked){gl.stencilMask(stencilMask);currentStencilMask=stencilMask}},setFunc:function(stencilFunc,stencilRef,stencilMask){if(currentStencilFunc!==stencilFunc||currentStencilRef!==stencilRef||currentStencilFuncMask!==stencilMask){gl.stencilFunc(stencilFunc,stencilRef,stencilMask);currentStencilFunc=stencilFunc;currentStencilRef=stencilRef;currentStencilFuncMask=stencilMask}},setOp:function(stencilFail,stencilZFail,stencilZPass){if(currentStencilFail!==stencilFail||currentStencilZFail!==stencilZFail||currentStencilZPass!==stencilZPass){gl.stencilOp(stencilFail,stencilZFail,stencilZPass);currentStencilFail=stencilFail;currentStencilZFail=stencilZFail;currentStencilZPass=stencilZPass}},setLocked:function(lock){locked=lock},setClear:function(stencil){if(currentStencilClear!==stencil){gl.clearStencil(stencil);currentStencilClear=stencil}},reset:function(){locked=false;currentStencilMask=null;currentStencilFunc=null;currentStencilRef=null;currentStencilFuncMask=null;currentStencilFail=null;currentStencilZFail=null;currentStencilZPass=null;currentStencilClear=null}}}const colorBuffer=new ColorBuffer;const depthBuffer=new DepthBuffer;const stencilBuffer=new StencilBuffer;const uboBindings=new WeakMap;const uboProgramMap=new WeakMap;let enabledCapabilities={};let currentBoundFramebuffers={};let currentDrawbuffers=new WeakMap;let defaultDrawbuffers=[];let currentProgram=null;let currentBlendingEnabled=false;let currentBlending=null;let currentBlendEquation=null;let currentBlendSrc=null;let currentBlendDst=null;let currentBlendEquationAlpha=null;let currentBlendSrcAlpha=null;let currentBlendDstAlpha=null;let currentBlendColor=new Color(0,0,0);let currentBlendAlpha=0;let currentPremultipledAlpha=false;let currentFlipSided=null;let currentCullFace=null;let currentLineWidth=null;let currentPolygonOffsetFactor=null;let currentPolygonOffsetUnits=null;const maxTextures=gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let lineWidthAvailable=false;let version=0;const glVersion=gl.getParameter(gl.VERSION);if(glVersion.indexOf("WebGL")!==-1){version=parseFloat(/^WebGL (\d)/.exec(glVersion)[1]);lineWidthAvailable=version>=1}else if(glVersion.indexOf("OpenGL ES")!==-1){version=parseFloat(/^OpenGL ES (\d)/.exec(glVersion)[1]);lineWidthAvailable=version>=2}let currentTextureSlot=null;let currentBoundTextures={};const scissorParam=gl.getParameter(gl.SCISSOR_BOX);const viewportParam=gl.getParameter(gl.VIEWPORT);const currentScissor=new Vector4().fromArray(scissorParam);const currentViewport=new Vector4().fromArray(viewportParam);function createTexture(type,target,count,dimensions){const data=new Uint8Array(4);const texture=gl.createTexture();gl.bindTexture(type,texture);gl.texParameteri(type,gl.TEXTURE_MIN_FILTER,gl.NEAREST);gl.texParameteri(type,gl.TEXTURE_MAG_FILTER,gl.NEAREST);for(let i=0;i<count;i++){if(type===gl.TEXTURE_3D||type===gl.TEXTURE_2D_ARRAY){gl.texImage3D(target,0,gl.RGBA,1,1,dimensions,0,gl.RGBA,gl.UNSIGNED_BYTE,data)}else{gl.texImage2D(target+i,0,gl.RGBA,1,1,0,gl.RGBA,gl.UNSIGNED_BYTE,data)}}return texture}const emptyTextures={};emptyTextures[gl.TEXTURE_2D]=createTexture(gl.TEXTURE_2D,gl.TEXTURE_2D,1);emptyTextures[gl.TEXTURE_CUBE_MAP]=createTexture(gl.TEXTURE_CUBE_MAP,gl.TEXTURE_CUBE_MAP_POSITIVE_X,6);emptyTextures[gl.TEXTURE_2D_ARRAY]=createTexture(gl.TEXTURE_2D_ARRAY,gl.TEXTURE_2D_ARRAY,1,1);emptyTextures[gl.TEXTURE_3D]=createTexture(gl.TEXTURE_3D,gl.TEXTURE_3D,1,1);colorBuffer.setClear(0,0,0,1);depthBuffer.setClear(1);stencilBuffer.setClear(0);enable(gl.DEPTH_TEST);depthBuffer.setFunc(LessEqualDepth);setFlipSided(false);setCullFace(CullFaceBack);enable(gl.CULL_FACE);setBlending(NoBlending);function enable(id){if(enabledCapabilities[id]!==true){gl.enable(id);enabledCapabilities[id]=true}}function disable(id){if(enabledCapabilities[id]!==false){gl.disable(id);enabledCapabilities[id]=false}}function bindFramebuffer(target,framebuffer){if(currentBoundFramebuffers[target]!==framebuffer){gl.bindFramebuffer(target,framebuffer);currentBoundFramebuffers[target]=framebuffer;if(target===gl.DRAW_FRAMEBUFFER){currentBoundFramebuffers[gl.FRAMEBUFFER]=framebuffer}if(target===gl.FRAMEBUFFER){currentBoundFramebuffers[gl.DRAW_FRAMEBUFFER]=framebuffer}return true}return false}function drawBuffers(renderTarget,framebuffer){let drawBuffers=defaultDrawbuffers;let needsUpdate=false;if(renderTarget){drawBuffers=currentDrawbuffers.get(framebuffer);if(drawBuffers===undefined){drawBuffers=[];currentDrawbuffers.set(framebuffer,drawBuffers)}const textures=renderTarget.textures;if(drawBuffers.length!==textures.length||drawBuffers[0]!==gl.COLOR_ATTACHMENT0){for(let i=0,il=textures.length;i<il;i++){drawBuffers[i]=gl.COLOR_ATTACHMENT0+i}drawBuffers.length=textures.length;needsUpdate=true}}else{if(drawBuffers[0]!==gl.BACK){drawBuffers[0]=gl.BACK;needsUpdate=true}}if(needsUpdate){gl.drawBuffers(drawBuffers)}}function useProgram(program){if(currentProgram!==program){gl.useProgram(program);currentProgram=program;return true}return false}const equationToGL={[AddEquation]:gl.FUNC_ADD,[SubtractEquation]:gl.FUNC_SUBTRACT,[ReverseSubtractEquation]:gl.FUNC_REVERSE_SUBTRACT};equationToGL[MinEquation]=gl.MIN;equationToGL[MaxEquation]=gl.MAX;const factorToGL={[ZeroFactor]:gl.ZERO,[OneFactor]:gl.ONE,[SrcColorFactor]:gl.SRC_COLOR,[SrcAlphaFactor]:gl.SRC_ALPHA,[SrcAlphaSaturateFactor]:gl.SRC_ALPHA_SATURATE,[DstColorFactor]:gl.DST_COLOR,[DstAlphaFactor]:gl.DST_ALPHA,[OneMinusSrcColorFactor]:gl.ONE_MINUS_SRC_COLOR,[OneMinusSrcAlphaFactor]:gl.ONE_MINUS_SRC_ALPHA,[OneMinusDstColorFactor]:gl.ONE_MINUS_DST_COLOR,[OneMinusDstAlphaFactor]:gl.ONE_MINUS_DST_ALPHA,[ConstantColorFactor]:gl.CONSTANT_COLOR,[OneMinusConstantColorFactor]:gl.ONE_MINUS_CONSTANT_COLOR,[ConstantAlphaFactor]:gl.CONSTANT_ALPHA,[OneMinusConstantAlphaFactor]:gl.ONE_MINUS_CONSTANT_ALPHA};function setBlending(blending,blendEquation,blendSrc,blendDst,blendEquationAlpha,blendSrcAlpha,blendDstAlpha,blendColor,blendAlpha,premultipliedAlpha){if(blending===NoBlending){if(currentBlendingEnabled===true){disable(gl.BLEND);currentBlendingEnabled=false}return}if(currentBlendingEnabled===false){enable(gl.BLEND);currentBlendingEnabled=true}if(blending!==CustomBlending){if(blending!==currentBlending||premultipliedAlpha!==currentPremultipledAlpha){if(currentBlendEquation!==AddEquation||currentBlendEquationAlpha!==AddEquation){gl.blendEquation(gl.FUNC_ADD);currentBlendEquation=AddEquation;currentBlendEquationAlpha=AddEquation}if(premultipliedAlpha){switch(blending){case NormalBlending:gl.blendFuncSeparate(gl.ONE,gl.ONE_MINUS_SRC_ALPHA,gl.ONE,gl.ONE_MINUS_SRC_ALPHA);break;case AdditiveBlending:gl.blendFunc(gl.ONE,gl.ONE);break;case SubtractiveBlending:gl.blendFuncSeparate(gl.ZERO,gl.ONE_MINUS_SRC_COLOR,gl.ZERO,gl.ONE);break;case MultiplyBlending:gl.blendFuncSeparate(gl.DST_COLOR,gl.ONE_MINUS_SRC_ALPHA,gl.ZERO,gl.ONE);break;default:error("WebGLState: Invalid blending: ",blending);break;}}else{switch(blending){case NormalBlending:gl.blendFuncSeparate(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA,gl.ONE,gl.ONE_MINUS_SRC_ALPHA);break;case AdditiveBlending:gl.blendFuncSeparate(gl.SRC_ALPHA,gl.ONE,gl.ONE,gl.ONE);break;case SubtractiveBlending:error("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case MultiplyBlending:error("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:error("WebGLState: Invalid blending: ",blending);break;}}currentBlendSrc=null;currentBlendDst=null;currentBlendSrcAlpha=null;currentBlendDstAlpha=null;currentBlendColor.set(0,0,0);currentBlendAlpha=0;currentBlending=blending;currentPremultipledAlpha=premultipliedAlpha}return}blendEquationAlpha=blendEquationAlpha||blendEquation;blendSrcAlpha=blendSrcAlpha||blendSrc;blendDstAlpha=blendDstAlpha||blendDst;if(blendEquation!==currentBlendEquation||blendEquationAlpha!==currentBlendEquationAlpha){gl.blendEquationSeparate(equationToGL[blendEquation],equationToGL[blendEquationAlpha]);currentBlendEquation=blendEquation;currentBlendEquationAlpha=blendEquationAlpha}if(blendSrc!==currentBlendSrc||blendDst!==currentBlendDst||blendSrcAlpha!==currentBlendSrcAlpha||blendDstAlpha!==currentBlendDstAlpha){gl.blendFuncSeparate(factorToGL[blendSrc],factorToGL[blendDst],factorToGL[blendSrcAlpha],factorToGL[blendDstAlpha]);currentBlendSrc=blendSrc;currentBlendDst=blendDst;currentBlendSrcAlpha=blendSrcAlpha;currentBlendDstAlpha=blendDstAlpha}if(blendColor.equals(currentBlendColor)===false||blendAlpha!==currentBlendAlpha){gl.blendColor(blendColor.r,blendColor.g,blendColor.b,blendAlpha);currentBlendColor.copy(blendColor);currentBlendAlpha=blendAlpha}currentBlending=blending;currentPremultipledAlpha=false}function setMaterial(material,frontFaceCW){material.side===DoubleSide?disable(gl.CULL_FACE):enable(gl.CULL_FACE);let flipSided=material.side===BackSide;if(frontFaceCW)flipSided=!flipSided;setFlipSided(flipSided);material.blending===NormalBlending&&material.transparent===false?setBlending(NoBlending):setBlending(material.blending,material.blendEquation,material.blendSrc,material.blendDst,material.blendEquationAlpha,material.blendSrcAlpha,material.blendDstAlpha,material.blendColor,material.blendAlpha,material.premultipliedAlpha);depthBuffer.setFunc(material.depthFunc);depthBuffer.setTest(material.depthTest);depthBuffer.setMask(material.depthWrite);colorBuffer.setMask(material.colorWrite);const stencilWrite=material.stencilWrite;stencilBuffer.setTest(stencilWrite);if(stencilWrite){stencilBuffer.setMask(material.stencilWriteMask);stencilBuffer.setFunc(material.stencilFunc,material.stencilRef,material.stencilFuncMask);stencilBuffer.setOp(material.stencilFail,material.stencilZFail,material.stencilZPass)}setPolygonOffset(material.polygonOffset,material.polygonOffsetFactor,material.polygonOffsetUnits);material.alphaToCoverage===true?enable(gl.SAMPLE_ALPHA_TO_COVERAGE):disable(gl.SAMPLE_ALPHA_TO_COVERAGE)}function setFlipSided(flipSided){if(currentFlipSided!==flipSided){if(flipSided){gl.frontFace(gl.CW)}else{gl.frontFace(gl.CCW)}currentFlipSided=flipSided}}function setCullFace(cullFace){if(cullFace!==CullFaceNone){enable(gl.CULL_FACE);if(cullFace!==currentCullFace){if(cullFace===CullFaceBack){gl.cullFace(gl.BACK)}else if(cullFace===CullFaceFront){gl.cullFace(gl.FRONT)}else{gl.cullFace(gl.FRONT_AND_BACK)}}}else{disable(gl.CULL_FACE)}currentCullFace=cullFace}function setLineWidth(width){if(width!==currentLineWidth){if(lineWidthAvailable)gl.lineWidth(width);currentLineWidth=width}}function setPolygonOffset(polygonOffset,factor,units){if(polygonOffset){enable(gl.POLYGON_OFFSET_FILL);if(currentPolygonOffsetFactor!==factor||currentPolygonOffsetUnits!==units){gl.polygonOffset(factor,units);currentPolygonOffsetFactor=factor;currentPolygonOffsetUnits=units}}else{disable(gl.POLYGON_OFFSET_FILL)}}function setScissorTest(scissorTest){if(scissorTest){enable(gl.SCISSOR_TEST)}else{disable(gl.SCISSOR_TEST)}}function activeTexture(webglSlot){if(webglSlot===undefined)webglSlot=gl.TEXTURE0+maxTextures-1;if(currentTextureSlot!==webglSlot){gl.activeTexture(webglSlot);currentTextureSlot=webglSlot}}function bindTexture(webglType,webglTexture,webglSlot){if(webglSlot===undefined){if(currentTextureSlot===null){webglSlot=gl.TEXTURE0+maxTextures-1}else{webglSlot=currentTextureSlot}}let boundTexture=currentBoundTextures[webglSlot];if(boundTexture===undefined){boundTexture={type:undefined,texture:undefined};currentBoundTextures[webglSlot]=boundTexture}if(boundTexture.type!==webglType||boundTexture.texture!==webglTexture){if(currentTextureSlot!==webglSlot){gl.activeTexture(webglSlot);currentTextureSlot=webglSlot}gl.bindTexture(webglType,webglTexture||emptyTextures[webglType]);boundTexture.type=webglType;boundTexture.texture=webglTexture}}function unbindTexture(){const boundTexture=currentBoundTextures[currentTextureSlot];if(boundTexture!==undefined&&boundTexture.type!==undefined){gl.bindTexture(boundTexture.type,null);boundTexture.type=undefined;boundTexture.texture=undefined}}function compressedTexImage2D(){try{gl.compressedTexImage2D(...arguments)}catch(e){error("WebGLState:",e)}}function compressedTexImage3D(){try{gl.compressedTexImage3D(...arguments)}catch(e){error("WebGLState:",e)}}function texSubImage2D(){try{gl.texSubImage2D(...arguments)}catch(e){error("WebGLState:",e)}}function texSubImage3D(){try{gl.texSubImage3D(...arguments)}catch(e){error("WebGLState:",e)}}function compressedTexSubImage2D(){try{gl.compressedTexSubImage2D(...arguments)}catch(e){error("WebGLState:",e)}}function compressedTexSubImage3D(){try{gl.compressedTexSubImage3D(...arguments)}catch(e){error("WebGLState:",e)}}function texStorage2D(){try{gl.texStorage2D(...arguments)}catch(e){error("WebGLState:",e)}}function texStorage3D(){try{gl.texStorage3D(...arguments)}catch(e){error("WebGLState:",e)}}function texImage2D(){try{gl.texImage2D(...arguments)}catch(e){error("WebGLState:",e)}}function texImage3D(){try{gl.texImage3D(...arguments)}catch(e){error("WebGLState:",e)}}function scissor(scissor){if(currentScissor.equals(scissor)===false){gl.scissor(scissor.x,scissor.y,scissor.z,scissor.w);currentScissor.copy(scissor)}}function viewport(viewport){if(currentViewport.equals(viewport)===false){gl.viewport(viewport.x,viewport.y,viewport.z,viewport.w);currentViewport.copy(viewport)}}function updateUBOMapping(uniformsGroup,program){let mapping=uboProgramMap.get(program);if(mapping===undefined){mapping=new WeakMap;uboProgramMap.set(program,mapping)}let blockIndex=mapping.get(uniformsGroup);if(blockIndex===undefined){blockIndex=gl.getUniformBlockIndex(program,uniformsGroup.name);mapping.set(uniformsGroup,blockIndex)}}function uniformBlockBinding(uniformsGroup,program){const mapping=uboProgramMap.get(program);const blockIndex=mapping.get(uniformsGroup);if(uboBindings.get(program)!==blockIndex){gl.uniformBlockBinding(program,blockIndex,uniformsGroup.__bindingPointIndex);uboBindings.set(program,blockIndex)}}function reset(){gl.disable(gl.BLEND);gl.disable(gl.CULL_FACE);gl.disable(gl.DEPTH_TEST);gl.disable(gl.POLYGON_OFFSET_FILL);gl.disable(gl.SCISSOR_TEST);gl.disable(gl.STENCIL_TEST);gl.disable(gl.SAMPLE_ALPHA_TO_COVERAGE);gl.blendEquation(gl.FUNC_ADD);gl.blendFunc(gl.ONE,gl.ZERO);gl.blendFuncSeparate(gl.ONE,gl.ZERO,gl.ONE,gl.ZERO);gl.blendColor(0,0,0,0);gl.colorMask(true,true,true,true);gl.clearColor(0,0,0,0);gl.depthMask(true);gl.depthFunc(gl.LESS);depthBuffer.setReversed(false);gl.clearDepth(1);gl.stencilMask(4294967295);gl.stencilFunc(gl.ALWAYS,0,4294967295);gl.stencilOp(gl.KEEP,gl.KEEP,gl.KEEP);gl.clearStencil(0);gl.cullFace(gl.BACK);gl.frontFace(gl.CCW);gl.polygonOffset(0,0);gl.activeTexture(gl.TEXTURE0);gl.bindFramebuffer(gl.FRAMEBUFFER,null);gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER,null);gl.bindFramebuffer(gl.READ_FRAMEBUFFER,null);gl.useProgram(null);gl.lineWidth(1);gl.scissor(0,0,gl.canvas.width,gl.canvas.height);gl.viewport(0,0,gl.canvas.width,gl.canvas.height);enabledCapabilities={};currentTextureSlot=null;currentBoundTextures={};currentBoundFramebuffers={};currentDrawbuffers=new WeakMap;defaultDrawbuffers=[];currentProgram=null;currentBlendingEnabled=false;currentBlending=null;currentBlendEquation=null;currentBlendSrc=null;currentBlendDst=null;currentBlendEquationAlpha=null;currentBlendSrcAlpha=null;currentBlendDstAlpha=null;currentBlendColor=new Color(0,0,0);currentBlendAlpha=0;currentPremultipledAlpha=false;currentFlipSided=null;currentCullFace=null;currentLineWidth=null;currentPolygonOffsetFactor=null;currentPolygonOffsetUnits=null;currentScissor.set(0,0,gl.canvas.width,gl.canvas.height);currentViewport.set(0,0,gl.canvas.width,gl.canvas.height);colorBuffer.reset();depthBuffer.reset();stencilBuffer.reset()}return{buffers:{color:colorBuffer,depth:depthBuffer,stencil:stencilBuffer},enable:enable,disable:disable,bindFramebuffer:bindFramebuffer,drawBuffers:drawBuffers,useProgram:useProgram,setBlending:setBlending,setMaterial:setMaterial,setFlipSided:setFlipSided,setCullFace:setCullFace,setLineWidth:setLineWidth,setPolygonOffset:setPolygonOffset,setScissorTest:setScissorTest,activeTexture:activeTexture,bindTexture:bindTexture,unbindTexture:unbindTexture,compressedTexImage2D:compressedTexImage2D,compressedTexImage3D:compressedTexImage3D,texImage2D:texImage2D,texImage3D:texImage3D,updateUBOMapping:updateUBOMapping,uniformBlockBinding:uniformBlockBinding,texStorage2D:texStorage2D,texStorage3D:texStorage3D,texSubImage2D:texSubImage2D,texSubImage3D:texSubImage3D,compressedTexSubImage2D:compressedTexSubImage2D,compressedTexSubImage3D:compressedTexSubImage3D,scissor:scissor,viewport:viewport,reset:reset}}function WebGLTextures(_gl,extensions,state,properties,capabilities,utils,info){const multisampledRTTExt=extensions.has("WEBGL_multisampled_render_to_texture")?extensions.get("WEBGL_multisampled_render_to_texture"):null;const supportsInvalidateFramebuffer=typeof navigator==="undefined"?false:/OculusBrowser/g.test(navigator.userAgent);const _imageDimensions=new Vector2;const _videoTextures=new WeakMap;let _canvas;const _sources=new WeakMap;let useOffscreenCanvas=false;try{useOffscreenCanvas=typeof OffscreenCanvas!=="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch(err){}function createCanvas(width,height){return useOffscreenCanvas?new OffscreenCanvas(width,height):createElementNS("canvas")}function resizeImage(image,needsNewCanvas,maxSize){let scale=1;const dimensions=getDimensions(image);if(dimensions.width>maxSize||dimensions.height>maxSize){scale=maxSize/Math.max(dimensions.width,dimensions.height)}if(scale<1){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap||typeof VideoFrame!=="undefined"&&image instanceof VideoFrame){const width=Math.floor(scale*dimensions.width);const height=Math.floor(scale*dimensions.height);if(_canvas===undefined)_canvas=createCanvas(width,height);const canvas=needsNewCanvas?createCanvas(width,height):_canvas;canvas.width=width;canvas.height=height;const context=canvas.getContext("2d");context.drawImage(image,0,0,width,height);warn("WebGLRenderer: Texture has been resized from ("+dimensions.width+"x"+dimensions.height+") to ("+width+"x"+height+").");return canvas}else{if("data"in image){warn("WebGLRenderer: Image in DataTexture is too big ("+dimensions.width+"x"+dimensions.height+").")}return image}}return image}function textureNeedsGenerateMipmaps(texture){return texture.generateMipmaps}function generateMipmap(target){_gl.generateMipmap(target)}function getTargetType(texture){if(texture.isWebGLCubeRenderTarget)return _gl.TEXTURE_CUBE_MAP;if(texture.isWebGL3DRenderTarget)return _gl.TEXTURE_3D;if(texture.isWebGLArrayRenderTarget||texture.isCompressedArrayTexture)return _gl.TEXTURE_2D_ARRAY;return _gl.TEXTURE_2D}function getInternalFormat(internalFormatName,glFormat,glType,colorSpace,forceLinearTransfer=false){if(internalFormatName!==null){if(_gl[internalFormatName]!==undefined)return _gl[internalFormatName];warn("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+internalFormatName+"'")}let internalFormat=glFormat;if(glFormat===_gl.RED){if(glType===_gl.FLOAT)internalFormat=_gl.R32F;if(glType===_gl.HALF_FLOAT)internalFormat=_gl.R16F;if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.R8}if(glFormat===_gl.RED_INTEGER){if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.R8UI;if(glType===_gl.UNSIGNED_SHORT)internalFormat=_gl.R16UI;if(glType===_gl.UNSIGNED_INT)internalFormat=_gl.R32UI;if(glType===_gl.BYTE)internalFormat=_gl.R8I;if(glType===_gl.SHORT)internalFormat=_gl.R16I;if(glType===_gl.INT)internalFormat=_gl.R32I}if(glFormat===_gl.RG){if(glType===_gl.FLOAT)internalFormat=_gl.RG32F;if(glType===_gl.HALF_FLOAT)internalFormat=_gl.RG16F;if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.RG8}if(glFormat===_gl.RG_INTEGER){if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.RG8UI;if(glType===_gl.UNSIGNED_SHORT)internalFormat=_gl.RG16UI;if(glType===_gl.UNSIGNED_INT)internalFormat=_gl.RG32UI;if(glType===_gl.BYTE)internalFormat=_gl.RG8I;if(glType===_gl.SHORT)internalFormat=_gl.RG16I;if(glType===_gl.INT)internalFormat=_gl.RG32I}if(glFormat===_gl.RGB_INTEGER){if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.RGB8UI;if(glType===_gl.UNSIGNED_SHORT)internalFormat=_gl.RGB16UI;if(glType===_gl.UNSIGNED_INT)internalFormat=_gl.RGB32UI;if(glType===_gl.BYTE)internalFormat=_gl.RGB8I;if(glType===_gl.SHORT)internalFormat=_gl.RGB16I;if(glType===_gl.INT)internalFormat=_gl.RGB32I}if(glFormat===_gl.RGBA_INTEGER){if(glType===_gl.UNSIGNED_BYTE)internalFormat=_gl.RGBA8UI;if(glType===_gl.UNSIGNED_SHORT)internalFormat=_gl.RGBA16UI;if(glType===_gl.UNSIGNED_INT)internalFormat=_gl.RGBA32UI;if(glType===_gl.BYTE)internalFormat=_gl.RGBA8I;if(glType===_gl.SHORT)internalFormat=_gl.RGBA16I;if(glType===_gl.INT)internalFormat=_gl.RGBA32I}if(glFormat===_gl.RGB){if(glType===_gl.UNSIGNED_INT_5_9_9_9_REV)internalFormat=_gl.RGB9_E5;if(glType===_gl.UNSIGNED_INT_10F_11F_11F_REV)internalFormat=_gl.R11F_G11F_B10F}if(glFormat===_gl.RGBA){const transfer=forceLinearTransfer?LinearTransfer:ColorManagement.getTransfer(colorSpace);if(glType===_gl.FLOAT)internalFormat=_gl.RGBA32F;if(glType===_gl.HALF_FLOAT)internalFormat=_gl.RGBA16F;if(glType===_gl.UNSIGNED_BYTE)internalFormat=transfer===SRGBTransfer?_gl.SRGB8_ALPHA8:_gl.RGBA8;if(glType===_gl.UNSIGNED_SHORT_4_4_4_4)internalFormat=_gl.RGBA4;if(glType===_gl.UNSIGNED_SHORT_5_5_5_1)internalFormat=_gl.RGB5_A1}if(internalFormat===_gl.R16F||internalFormat===_gl.R32F||internalFormat===_gl.RG16F||internalFormat===_gl.RG32F||internalFormat===_gl.RGBA16F||internalFormat===_gl.RGBA32F){extensions.get("EXT_color_buffer_float")}return internalFormat}function getInternalDepthFormat(useStencil,depthType){let glInternalFormat;if(useStencil){if(depthType===null||depthType===UnsignedIntType||depthType===UnsignedInt248Type){glInternalFormat=_gl.DEPTH24_STENCIL8}else if(depthType===FloatType){glInternalFormat=_gl.DEPTH32F_STENCIL8}else if(depthType===UnsignedShortType){glInternalFormat=_gl.DEPTH24_STENCIL8;warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")}}else{if(depthType===null||depthType===UnsignedIntType||depthType===UnsignedInt248Type){glInternalFormat=_gl.DEPTH_COMPONENT24}else if(depthType===FloatType){glInternalFormat=_gl.DEPTH_COMPONENT32F}else if(depthType===UnsignedShortType){glInternalFormat=_gl.DEPTH_COMPONENT16}}return glInternalFormat}function getMipLevels(texture,image){if(textureNeedsGenerateMipmaps(texture)===true||texture.isFramebufferTexture&&texture.minFilter!==NearestFilter&&texture.minFilter!==LinearFilter){return Math.log2(Math.max(image.width,image.height))+1}else if(texture.mipmaps!==undefined&&texture.mipmaps.length>0){return texture.mipmaps.length}else if(texture.isCompressedTexture&&Array.isArray(texture.image)){return image.mipmaps.length}else{return 1}}function onTextureDispose(event){const texture=event.target;texture.removeEventListener("dispose",onTextureDispose);deallocateTexture(texture);if(texture.isVideoTexture){_videoTextures.delete(texture)}}function onRenderTargetDispose(event){const renderTarget=event.target;renderTarget.removeEventListener("dispose",onRenderTargetDispose);deallocateRenderTarget(renderTarget)}function deallocateTexture(texture){const textureProperties=properties.get(texture);if(textureProperties.__webglInit===undefined)return;const source=texture.source;const webglTextures=_sources.get(source);if(webglTextures){const webglTexture=webglTextures[textureProperties.__cacheKey];webglTexture.usedTimes--;if(webglTexture.usedTimes===0){deleteTexture(texture)}if(Object.keys(webglTextures).length===0){_sources.delete(source)}}properties.remove(texture)}function deleteTexture(texture){const textureProperties=properties.get(texture);_gl.deleteTexture(textureProperties.__webglTexture);const source=texture.source;const webglTextures=_sources.get(source);delete webglTextures[textureProperties.__cacheKey];info.memory.textures--}function deallocateRenderTarget(renderTarget){const renderTargetProperties=properties.get(renderTarget);if(renderTarget.depthTexture){renderTarget.depthTexture.dispose();properties.remove(renderTarget.depthTexture)}if(renderTarget.isWebGLCubeRenderTarget){for(let i=0;i<6;i++){if(Array.isArray(renderTargetProperties.__webglFramebuffer[i])){for(let level=0;level<renderTargetProperties.__webglFramebuffer[i].length;level++)_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i][level])}else{_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i])}if(renderTargetProperties.__webglDepthbuffer)_gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer[i])}}else{if(Array.isArray(renderTargetProperties.__webglFramebuffer)){for(let level=0;level<renderTargetProperties.__webglFramebuffer.length;level++)_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[level])}else{_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer)}if(renderTargetProperties.__webglDepthbuffer)_gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer);if(renderTargetProperties.__webglMultisampledFramebuffer)_gl.deleteFramebuffer(renderTargetProperties.__webglMultisampledFramebuffer);if(renderTargetProperties.__webglColorRenderbuffer){for(let i=0;i<renderTargetProperties.__webglColorRenderbuffer.length;i++){if(renderTargetProperties.__webglColorRenderbuffer[i])_gl.deleteRenderbuffer(renderTargetProperties.__webglColorRenderbuffer[i])}}if(renderTargetProperties.__webglDepthRenderbuffer)_gl.deleteRenderbuffer(renderTargetProperties.__webglDepthRenderbuffer)}const textures=renderTarget.textures;for(let i=0,il=textures.length;i<il;i++){const attachmentProperties=properties.get(textures[i]);if(attachmentProperties.__webglTexture){_gl.deleteTexture(attachmentProperties.__webglTexture);info.memory.textures--}properties.remove(textures[i])}properties.remove(renderTarget)}let textureUnits=0;function resetTextureUnits(){textureUnits=0}function allocateTextureUnit(){const textureUnit=textureUnits;if(textureUnit>=capabilities.maxTextures){warn("WebGLTextures: Trying to use "+textureUnit+" texture units while this GPU supports only "+capabilities.maxTextures)}textureUnits+=1;return textureUnit}function getTextureCacheKey(texture){const array=[];array.push(texture.wrapS);array.push(texture.wrapT);array.push(texture.wrapR||0);array.push(texture.magFilter);array.push(texture.minFilter);array.push(texture.anisotropy);array.push(texture.internalFormat);array.push(texture.format);array.push(texture.type);array.push(texture.generateMipmaps);array.push(texture.premultiplyAlpha);array.push(texture.flipY);array.push(texture.unpackAlignment);array.push(texture.colorSpace);return array.join()}function setTexture2D(texture,slot){const textureProperties=properties.get(texture);if(texture.isVideoTexture)updateVideoTexture(texture);if(texture.isRenderTargetTexture===false&&texture.isExternalTexture!==true&&texture.version>0&&textureProperties.__version!==texture.version){const image=texture.image;if(image===null){warn("WebGLRenderer: Texture marked for update but no image data found.")}else if(image.complete===false){warn("WebGLRenderer: Texture marked for update but image is incomplete")}else{uploadTexture(textureProperties,texture,slot);return}}else if(texture.isExternalTexture){textureProperties.__webglTexture=texture.sourceTexture?texture.sourceTexture:null}state.bindTexture(_gl.TEXTURE_2D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture2DArray(texture,slot){const textureProperties=properties.get(texture);if(texture.isRenderTargetTexture===false&&texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}else if(texture.isExternalTexture){textureProperties.__webglTexture=texture.sourceTexture?texture.sourceTexture:null}state.bindTexture(_gl.TEXTURE_2D_ARRAY,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture3D(texture,slot){const textureProperties=properties.get(texture);if(texture.isRenderTargetTexture===false&&texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_3D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTextureCube(texture,slot){const textureProperties=properties.get(texture);if(texture.isCubeDepthTexture!==true&&texture.version>0&&textureProperties.__version!==texture.version){uploadCubeTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}const wrappingToGL={[RepeatWrapping]:_gl.REPEAT,[ClampToEdgeWrapping]:_gl.CLAMP_TO_EDGE,[MirroredRepeatWrapping]:_gl.MIRRORED_REPEAT};const filterToGL={[NearestFilter]:_gl.NEAREST,[NearestMipmapNearestFilter]:_gl.NEAREST_MIPMAP_NEAREST,[NearestMipmapLinearFilter]:_gl.NEAREST_MIPMAP_LINEAR,[LinearFilter]:_gl.LINEAR,[LinearMipmapNearestFilter]:_gl.LINEAR_MIPMAP_NEAREST,[LinearMipmapLinearFilter]:_gl.LINEAR_MIPMAP_LINEAR};const compareToGL={[NeverCompare]:_gl.NEVER,[AlwaysCompare]:_gl.ALWAYS,[LessCompare]:_gl.LESS,[LessEqualCompare]:_gl.LEQUAL,[EqualCompare]:_gl.EQUAL,[GreaterEqualCompare]:_gl.GEQUAL,[GreaterCompare]:_gl.GREATER,[NotEqualCompare]:_gl.NOTEQUAL};function setTextureParameters(textureType,texture){if(texture.type===FloatType&&extensions.has("OES_texture_float_linear")===false&&(texture.magFilter===LinearFilter||texture.magFilter===LinearMipmapNearestFilter||texture.magFilter===NearestMipmapLinearFilter||texture.magFilter===LinearMipmapLinearFilter||texture.minFilter===LinearFilter||texture.minFilter===LinearMipmapNearestFilter||texture.minFilter===NearestMipmapLinearFilter||texture.minFilter===LinearMipmapLinearFilter)){warn("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.")}_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_S,wrappingToGL[texture.wrapS]);_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_T,wrappingToGL[texture.wrapT]);if(textureType===_gl.TEXTURE_3D||textureType===_gl.TEXTURE_2D_ARRAY){_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_R,wrappingToGL[texture.wrapR])}_gl.texParameteri(textureType,_gl.TEXTURE_MAG_FILTER,filterToGL[texture.magFilter]);_gl.texParameteri(textureType,_gl.TEXTURE_MIN_FILTER,filterToGL[texture.minFilter]);if(texture.compareFunction){_gl.texParameteri(textureType,_gl.TEXTURE_COMPARE_MODE,_gl.COMPARE_REF_TO_TEXTURE);_gl.texParameteri(textureType,_gl.TEXTURE_COMPARE_FUNC,compareToGL[texture.compareFunction])}if(extensions.has("EXT_texture_filter_anisotropic")===true){if(texture.magFilter===NearestFilter)return;if(texture.minFilter!==NearestMipmapLinearFilter&&texture.minFilter!==LinearMipmapLinearFilter)return;if(texture.type===FloatType&&extensions.has("OES_texture_float_linear")===false)return;if(texture.anisotropy>1||properties.get(texture).__currentAnisotropy){const extension=extensions.get("EXT_texture_filter_anisotropic");_gl.texParameterf(textureType,extension.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(texture.anisotropy,capabilities.getMaxAnisotropy()));properties.get(texture).__currentAnisotropy=texture.anisotropy}}}function initTexture(textureProperties,texture){let forceUpload=false;if(textureProperties.__webglInit===undefined){textureProperties.__webglInit=true;texture.addEventListener("dispose",onTextureDispose)}const source=texture.source;let webglTextures=_sources.get(source);if(webglTextures===undefined){webglTextures={};_sources.set(source,webglTextures)}const textureCacheKey=getTextureCacheKey(texture);if(textureCacheKey!==textureProperties.__cacheKey){if(webglTextures[textureCacheKey]===undefined){webglTextures[textureCacheKey]={texture:_gl.createTexture(),usedTimes:0};info.memory.textures++;forceUpload=true}webglTextures[textureCacheKey].usedTimes++;const webglTexture=webglTextures[textureProperties.__cacheKey];if(webglTexture!==undefined){webglTextures[textureProperties.__cacheKey].usedTimes--;if(webglTexture.usedTimes===0){deleteTexture(texture)}}textureProperties.__cacheKey=textureCacheKey;textureProperties.__webglTexture=webglTextures[textureCacheKey].texture}return forceUpload}function getRow(index,rowLength,componentStride){return Math.floor(Math.floor(index/componentStride)/rowLength)}function updateTexture(texture,image,glFormat,glType){const componentStride=4;const updateRanges=texture.updateRanges;if(updateRanges.length===0){state.texSubImage2D(_gl.TEXTURE_2D,0,0,0,image.width,image.height,glFormat,glType,image.data)}else{updateRanges.sort((a,b)=>a.start-b.start);let mergeIndex=0;for(let i=1;i<updateRanges.length;i++){const previousRange=updateRanges[mergeIndex];const range=updateRanges[i];const previousEnd=previousRange.start+previousRange.count;const currentRow=getRow(range.start,image.width,componentStride);const previousRow=getRow(previousRange.start,image.width,componentStride);if(range.start<=previousEnd+1&&currentRow===previousRow&&getRow(range.start+range.count-1,image.width,componentStride)===currentRow){previousRange.count=Math.max(previousRange.count,range.start+range.count-previousRange.start)}else{++mergeIndex;updateRanges[mergeIndex]=range}}updateRanges.length=mergeIndex+1;const currentUnpackRowLen=_gl.getParameter(_gl.UNPACK_ROW_LENGTH);const currentUnpackSkipPixels=_gl.getParameter(_gl.UNPACK_SKIP_PIXELS);const currentUnpackSkipRows=_gl.getParameter(_gl.UNPACK_SKIP_ROWS);_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,image.width);for(let i=0,l=updateRanges.length;i<l;i++){const range=updateRanges[i];const pixelStart=Math.floor(range.start/componentStride);const pixelCount=Math.ceil(range.count/componentStride);const x=pixelStart%image.width;const y=Math.floor(pixelStart/image.width);const width=pixelCount;const height=1;_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,x);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,y);state.texSubImage2D(_gl.TEXTURE_2D,0,x,y,width,height,glFormat,glType,image.data)}texture.clearUpdateRanges();_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,currentUnpackRowLen);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,currentUnpackSkipPixels);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,currentUnpackSkipRows)}}function uploadTexture(textureProperties,texture,slot){let textureType=_gl.TEXTURE_2D;if(texture.isDataArrayTexture||texture.isCompressedArrayTexture)textureType=_gl.TEXTURE_2D_ARRAY;if(texture.isData3DTexture)textureType=_gl.TEXTURE_3D;const forceUpload=initTexture(textureProperties,texture);const source=texture.source;state.bindTexture(textureType,textureProperties.__webglTexture,_gl.TEXTURE0+slot);const sourceProperties=properties.get(source);if(source.version!==sourceProperties.__version||forceUpload===true){state.activeTexture(_gl.TEXTURE0+slot);const workingPrimaries=ColorManagement.getPrimaries(ColorManagement.workingColorSpace);const texturePrimaries=texture.colorSpace===NoColorSpace?null:ColorManagement.getPrimaries(texture.colorSpace);const unpackConversion=texture.colorSpace===NoColorSpace||workingPrimaries===texturePrimaries?_gl.NONE:_gl.BROWSER_DEFAULT_WEBGL;_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,texture.flipY);_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,texture.premultiplyAlpha);_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,texture.unpackAlignment);_gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,unpackConversion);let image=resizeImage(texture.image,false,capabilities.maxTextureSize);image=verifyColorSpace(texture,image);const glFormat=utils.convert(texture.format,texture.colorSpace);const glType=utils.convert(texture.type);let glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace,texture.isVideoTexture);setTextureParameters(textureType,texture);let mipmap;const mipmaps=texture.mipmaps;const useTexStorage=texture.isVideoTexture!==true;const allocateMemory=sourceProperties.__version===undefined||forceUpload===true;const dataReady=source.dataReady;const levels=getMipLevels(texture,image);if(texture.isDepthTexture){glInternalFormat=getInternalDepthFormat(texture.format===DepthStencilFormat,texture.type);if(allocateMemory){if(useTexStorage){state.texStorage2D(_gl.TEXTURE_2D,1,glInternalFormat,image.width,image.height)}else{state.texImage2D(_gl.TEXTURE_2D,0,glInternalFormat,image.width,image.height,0,glFormat,glType,null)}}}else if(texture.isDataTexture){if(mipmaps.length>0){if(useTexStorage&&allocateMemory){state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,mipmaps[0].width,mipmaps[0].height)}for(let i=0,il=mipmaps.length;i<il;i++){mipmap=mipmaps[i];if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_2D,i,0,0,mipmap.width,mipmap.height,glFormat,glType,mipmap.data)}}else{state.texImage2D(_gl.TEXTURE_2D,i,glInternalFormat,mipmap.width,mipmap.height,0,glFormat,glType,mipmap.data)}}texture.generateMipmaps=false}else{if(useTexStorage){if(allocateMemory){state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,image.width,image.height)}if(dataReady){updateTexture(texture,image,glFormat,glType)}}else{state.texImage2D(_gl.TEXTURE_2D,0,glInternalFormat,image.width,image.height,0,glFormat,glType,image.data)}}}else if(texture.isCompressedTexture){if(texture.isCompressedArrayTexture){if(useTexStorage&&allocateMemory){state.texStorage3D(_gl.TEXTURE_2D_ARRAY,levels,glInternalFormat,mipmaps[0].width,mipmaps[0].height,image.depth)}for(let i=0,il=mipmaps.length;i<il;i++){mipmap=mipmaps[i];if(texture.format!==RGBAFormat){if(glFormat!==null){if(useTexStorage){if(dataReady){if(texture.layerUpdates.size>0){const layerByteLength=getByteLength(mipmap.width,mipmap.height,texture.format,texture.type);for(const layerIndex of texture.layerUpdates){const layerData=mipmap.data.subarray(layerIndex*layerByteLength/mipmap.data.BYTES_PER_ELEMENT,(layerIndex+1)*layerByteLength/mipmap.data.BYTES_PER_ELEMENT);state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,layerIndex,mipmap.width,mipmap.height,1,glFormat,layerData)}texture.clearLayerUpdates()}else{state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image.depth,glFormat,mipmap.data)}}}else{state.compressedTexImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image.depth,0,mipmap.data,0,0)}}else{warn("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()")}}else{if(useTexStorage){if(dataReady){state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image.depth,glFormat,glType,mipmap.data)}}else{state.texImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image.depth,0,glFormat,glType,mipmap.data)}}}}else{if(useTexStorage&&allocateMemory){state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,mipmaps[0].width,mipmaps[0].height)}for(let i=0,il=mipmaps.length;i<il;i++){mipmap=mipmaps[i];if(texture.format!==RGBAFormat){if(glFormat!==null){if(useTexStorage){if(dataReady){state.compressedTexSubImage2D(_gl.TEXTURE_2D,i,0,0,mipmap.width,mipmap.height,glFormat,mipmap.data)}}else{state.compressedTexImage2D(_gl.TEXTURE_2D,i,glInternalFormat,mipmap.width,mipmap.height,0,mipmap.data)}}else{warn("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()")}}else{if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_2D,i,0,0,mipmap.width,mipmap.height,glFormat,glType,mipmap.data)}}else{state.texImage2D(_gl.TEXTURE_2D,i,glInternalFormat,mipmap.width,mipmap.height,0,glFormat,glType,mipmap.data)}}}}}else if(texture.isDataArrayTexture){if(useTexStorage){if(allocateMemory){state.texStorage3D(_gl.TEXTURE_2D_ARRAY,levels,glInternalFormat,image.width,image.height,image.depth)}if(dataReady){if(texture.layerUpdates.size>0){const layerByteLength=getByteLength(image.width,image.height,texture.format,texture.type);for(const layerIndex of texture.layerUpdates){const layerData=image.data.subarray(layerIndex*layerByteLength/image.data.BYTES_PER_ELEMENT,(layerIndex+1)*layerByteLength/image.data.BYTES_PER_ELEMENT);state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,0,0,0,layerIndex,image.width,image.height,1,glFormat,glType,layerData)}texture.clearLayerUpdates()}else{state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,0,0,0,0,image.width,image.height,image.depth,glFormat,glType,image.data)}}}else{state.texImage3D(_gl.TEXTURE_2D_ARRAY,0,glInternalFormat,image.width,image.height,image.depth,0,glFormat,glType,image.data)}}else if(texture.isData3DTexture){if(useTexStorage){if(allocateMemory){state.texStorage3D(_gl.TEXTURE_3D,levels,glInternalFormat,image.width,image.height,image.depth)}if(dataReady){state.texSubImage3D(_gl.TEXTURE_3D,0,0,0,0,image.width,image.height,image.depth,glFormat,glType,image.data)}}else{state.texImage3D(_gl.TEXTURE_3D,0,glInternalFormat,image.width,image.height,image.depth,0,glFormat,glType,image.data)}}else if(texture.isFramebufferTexture){if(allocateMemory){if(useTexStorage){state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,image.width,image.height)}else{let width=image.width,height=image.height;for(let i=0;i<levels;i++){state.texImage2D(_gl.TEXTURE_2D,i,glInternalFormat,width,height,0,glFormat,glType,null);width>>=1;height>>=1}}}}else{if(mipmaps.length>0){if(useTexStorage&&allocateMemory){const dimensions=getDimensions(mipmaps[0]);state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,dimensions.width,dimensions.height)}for(let i=0,il=mipmaps.length;i<il;i++){mipmap=mipmaps[i];if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_2D,i,0,0,glFormat,glType,mipmap)}}else{state.texImage2D(_gl.TEXTURE_2D,i,glInternalFormat,glFormat,glType,mipmap)}}texture.generateMipmaps=false}else{if(useTexStorage){if(allocateMemory){const dimensions=getDimensions(image);state.texStorage2D(_gl.TEXTURE_2D,levels,glInternalFormat,dimensions.width,dimensions.height)}if(dataReady){state.texSubImage2D(_gl.TEXTURE_2D,0,0,0,glFormat,glType,image)}}else{state.texImage2D(_gl.TEXTURE_2D,0,glInternalFormat,glFormat,glType,image)}}}if(textureNeedsGenerateMipmaps(texture)){generateMipmap(textureType)}sourceProperties.__version=source.version;if(texture.onUpdate)texture.onUpdate(texture)}textureProperties.__version=texture.version}function uploadCubeTexture(textureProperties,texture,slot){if(texture.image.length!==6)return;const forceUpload=initTexture(textureProperties,texture);const source=texture.source;state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture,_gl.TEXTURE0+slot);const sourceProperties=properties.get(source);if(source.version!==sourceProperties.__version||forceUpload===true){state.activeTexture(_gl.TEXTURE0+slot);const workingPrimaries=ColorManagement.getPrimaries(ColorManagement.workingColorSpace);const texturePrimaries=texture.colorSpace===NoColorSpace?null:ColorManagement.getPrimaries(texture.colorSpace);const unpackConversion=texture.colorSpace===NoColorSpace||workingPrimaries===texturePrimaries?_gl.NONE:_gl.BROWSER_DEFAULT_WEBGL;_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,texture.flipY);_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,texture.premultiplyAlpha);_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,texture.unpackAlignment);_gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,unpackConversion);const isCompressed=texture.isCompressedTexture||texture.image[0].isCompressedTexture;const isDataTexture=texture.image[0]&&texture.image[0].isDataTexture;const cubeImage=[];for(let i=0;i<6;i++){if(!isCompressed&&!isDataTexture){cubeImage[i]=resizeImage(texture.image[i],true,capabilities.maxCubemapSize)}else{cubeImage[i]=isDataTexture?texture.image[i].image:texture.image[i]}cubeImage[i]=verifyColorSpace(texture,cubeImage[i])}const image=cubeImage[0],glFormat=utils.convert(texture.format,texture.colorSpace),glType=utils.convert(texture.type),glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace);const useTexStorage=texture.isVideoTexture!==true;const allocateMemory=sourceProperties.__version===undefined||forceUpload===true;const dataReady=source.dataReady;let levels=getMipLevels(texture,image);setTextureParameters(_gl.TEXTURE_CUBE_MAP,texture);let mipmaps;if(isCompressed){if(useTexStorage&&allocateMemory){state.texStorage2D(_gl.TEXTURE_CUBE_MAP,levels,glInternalFormat,image.width,image.height)}for(let i=0;i<6;i++){mipmaps=cubeImage[i].mipmaps;for(let j=0;j<mipmaps.length;j++){const mipmap=mipmaps[j];if(texture.format!==RGBAFormat){if(glFormat!==null){if(useTexStorage){if(dataReady){state.compressedTexSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j,0,0,mipmap.width,mipmap.height,glFormat,mipmap.data)}}else{state.compressedTexImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j,glInternalFormat,mipmap.width,mipmap.height,0,mipmap.data)}}else{warn("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()")}}else{if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j,0,0,mipmap.width,mipmap.height,glFormat,glType,mipmap.data)}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j,glInternalFormat,mipmap.width,mipmap.height,0,glFormat,glType,mipmap.data)}}}}}else{mipmaps=texture.mipmaps;if(useTexStorage&&allocateMemory){if(mipmaps.length>0)levels++;const dimensions=getDimensions(cubeImage[0]);state.texStorage2D(_gl.TEXTURE_CUBE_MAP,levels,glInternalFormat,dimensions.width,dimensions.height)}for(let i=0;i<6;i++){if(isDataTexture){if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,0,0,cubeImage[i].width,cubeImage[i].height,glFormat,glType,cubeImage[i].data)}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,glInternalFormat,cubeImage[i].width,cubeImage[i].height,0,glFormat,glType,cubeImage[i].data)}for(let j=0;j<mipmaps.length;j++){const mipmap=mipmaps[j];const mipmapImage=mipmap.image[i].image;if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j+1,0,0,mipmapImage.width,mipmapImage.height,glFormat,glType,mipmapImage.data)}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j+1,glInternalFormat,mipmapImage.width,mipmapImage.height,0,glFormat,glType,mipmapImage.data)}}}else{if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,0,0,glFormat,glType,cubeImage[i])}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,glInternalFormat,glFormat,glType,cubeImage[i])}for(let j=0;j<mipmaps.length;j++){const mipmap=mipmaps[j];if(useTexStorage){if(dataReady){state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j+1,0,0,glFormat,glType,mipmap.image[i])}}else{state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,j+1,glInternalFormat,glFormat,glType,mipmap.image[i])}}}}}if(textureNeedsGenerateMipmaps(texture)){generateMipmap(_gl.TEXTURE_CUBE_MAP)}sourceProperties.__version=source.version;if(texture.onUpdate)texture.onUpdate(texture)}textureProperties.__version=texture.version}function setupFrameBufferTexture(framebuffer,renderTarget,texture,attachment,textureTarget,level){const glFormat=utils.convert(texture.format,texture.colorSpace);const glType=utils.convert(texture.type);const glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace);const renderTargetProperties=properties.get(renderTarget);const textureProperties=properties.get(texture);textureProperties.__renderTarget=renderTarget;if(!renderTargetProperties.__hasExternalTextures){const width=Math.max(1,renderTarget.width>>level);const height=Math.max(1,renderTarget.height>>level);if(textureTarget===_gl.TEXTURE_3D||textureTarget===_gl.TEXTURE_2D_ARRAY){state.texImage3D(textureTarget,level,glInternalFormat,width,height,renderTarget.depth,0,glFormat,glType,null)}else{state.texImage2D(textureTarget,level,glInternalFormat,width,height,0,glFormat,glType,null)}}state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(useMultisampledRTT(renderTarget)){multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,attachment,textureTarget,textureProperties.__webglTexture,0,getRenderTargetSamples(renderTarget))}else if(textureTarget===_gl.TEXTURE_2D||textureTarget>=_gl.TEXTURE_CUBE_MAP_POSITIVE_X&&textureTarget<=_gl.TEXTURE_CUBE_MAP_NEGATIVE_Z){_gl.framebufferTexture2D(_gl.FRAMEBUFFER,attachment,textureTarget,textureProperties.__webglTexture,level)}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function setupRenderBufferStorage(renderbuffer,renderTarget,useMultisample){_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer);if(renderTarget.depthBuffer){const depthTexture=renderTarget.depthTexture;const depthType=depthTexture&&depthTexture.isDepthTexture?depthTexture.type:null;const glInternalFormat=getInternalDepthFormat(renderTarget.stencilBuffer,depthType);const glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;if(useMultisampledRTT(renderTarget)){multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER,getRenderTargetSamples(renderTarget),glInternalFormat,renderTarget.width,renderTarget.height)}else if(useMultisample){_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,getRenderTargetSamples(renderTarget),glInternalFormat,renderTarget.width,renderTarget.height)}else{_gl.renderbufferStorage(_gl.RENDERBUFFER,glInternalFormat,renderTarget.width,renderTarget.height)}_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}else{const textures=renderTarget.textures;for(let i=0;i<textures.length;i++){const texture=textures[i];const glFormat=utils.convert(texture.format,texture.colorSpace);const glType=utils.convert(texture.type);const glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace);if(useMultisampledRTT(renderTarget)){multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER,getRenderTargetSamples(renderTarget),glInternalFormat,renderTarget.width,renderTarget.height)}else if(useMultisample){_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,getRenderTargetSamples(renderTarget),glInternalFormat,renderTarget.width,renderTarget.height)}else{_gl.renderbufferStorage(_gl.RENDERBUFFER,glInternalFormat,renderTarget.width,renderTarget.height)}}}_gl.bindRenderbuffer(_gl.RENDERBUFFER,null)}function setupDepthTexture(framebuffer,renderTarget,cubeFace){const isCube=renderTarget.isWebGLCubeRenderTarget===true;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(!(renderTarget.depthTexture&&renderTarget.depthTexture.isDepthTexture)){throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture")}const textureProperties=properties.get(renderTarget.depthTexture);textureProperties.__renderTarget=renderTarget;if(!textureProperties.__webglTexture||renderTarget.depthTexture.image.width!==renderTarget.width||renderTarget.depthTexture.image.height!==renderTarget.height){renderTarget.depthTexture.image.width=renderTarget.width;renderTarget.depthTexture.image.height=renderTarget.height;renderTarget.depthTexture.needsUpdate=true}if(isCube){if(textureProperties.__webglInit===undefined){textureProperties.__webglInit=true;renderTarget.depthTexture.addEventListener("dispose",onTextureDispose)}if(textureProperties.__webglTexture===undefined){textureProperties.__webglTexture=_gl.createTexture();state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture);setTextureParameters(_gl.TEXTURE_CUBE_MAP,renderTarget.depthTexture);const glFormat=utils.convert(renderTarget.depthTexture.format);const glType=utils.convert(renderTarget.depthTexture.type);let glInternalFormat;if(renderTarget.depthTexture.format===DepthFormat){glInternalFormat=_gl.DEPTH_COMPONENT24}else if(renderTarget.depthTexture.format===DepthStencilFormat){glInternalFormat=_gl.DEPTH24_STENCIL8}for(let i=0;i<6;i++){_gl.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,glInternalFormat,renderTarget.width,renderTarget.height,0,glFormat,glType,null)}}}else{setTexture2D(renderTarget.depthTexture,0)}const webglDepthTexture=textureProperties.__webglTexture;const samples=getRenderTargetSamples(renderTarget);const glTextureType=isCube?_gl.TEXTURE_CUBE_MAP_POSITIVE_X+cubeFace:_gl.TEXTURE_2D;const glAttachmentType=renderTarget.depthTexture.format===DepthStencilFormat?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;if(renderTarget.depthTexture.format===DepthFormat){if(useMultisampledRTT(renderTarget)){multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,glAttachmentType,glTextureType,webglDepthTexture,0,samples)}else{_gl.framebufferTexture2D(_gl.FRAMEBUFFER,glAttachmentType,glTextureType,webglDepthTexture,0)}}else if(renderTarget.depthTexture.format===DepthStencilFormat){if(useMultisampledRTT(renderTarget)){multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,glAttachmentType,glTextureType,webglDepthTexture,0,samples)}else{_gl.framebufferTexture2D(_gl.FRAMEBUFFER,glAttachmentType,glTextureType,webglDepthTexture,0)}}else{throw new Error("Unknown depthTexture format")}}function setupDepthRenderbuffer(renderTarget){const renderTargetProperties=properties.get(renderTarget);const isCube=renderTarget.isWebGLCubeRenderTarget===true;if(renderTargetProperties.__boundDepthTexture!==renderTarget.depthTexture){const depthTexture=renderTarget.depthTexture;if(renderTargetProperties.__depthDisposeCallback){renderTargetProperties.__depthDisposeCallback()}if(depthTexture){const disposeEvent=()=>{delete renderTargetProperties.__boundDepthTexture;delete renderTargetProperties.__depthDisposeCallback;depthTexture.removeEventListener("dispose",disposeEvent)};depthTexture.addEventListener("dispose",disposeEvent);renderTargetProperties.__depthDisposeCallback=disposeEvent}renderTargetProperties.__boundDepthTexture=depthTexture}if(renderTarget.depthTexture&&!renderTargetProperties.__autoAllocateDepthBuffer){if(isCube){for(let i=0;i<6;i++){setupDepthTexture(renderTargetProperties.__webglFramebuffer[i],renderTarget,i)}}else{const mipmaps=renderTarget.texture.mipmaps;if(mipmaps&&mipmaps.length>0){setupDepthTexture(renderTargetProperties.__webglFramebuffer[0],renderTarget,0)}else{setupDepthTexture(renderTargetProperties.__webglFramebuffer,renderTarget,0)}}}else{if(isCube){renderTargetProperties.__webglDepthbuffer=[];for(let i=0;i<6;i++){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[i]);if(renderTargetProperties.__webglDepthbuffer[i]===undefined){renderTargetProperties.__webglDepthbuffer[i]=_gl.createRenderbuffer();setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i],renderTarget,false)}else{const glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;const renderbuffer=renderTargetProperties.__webglDepthbuffer[i];_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}}}else{const mipmaps=renderTarget.texture.mipmaps;if(mipmaps&&mipmaps.length>0){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[0])}else{state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer)}if(renderTargetProperties.__webglDepthbuffer===undefined){renderTargetProperties.__webglDepthbuffer=_gl.createRenderbuffer();setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer,renderTarget,false)}else{const glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;const renderbuffer=renderTargetProperties.__webglDepthbuffer;_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}}}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function rebindTextures(renderTarget,colorTexture,depthTexture){const renderTargetProperties=properties.get(renderTarget);if(colorTexture!==undefined){setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,renderTarget.texture,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,0)}if(depthTexture!==undefined){setupDepthRenderbuffer(renderTarget)}}function setupRenderTarget(renderTarget){const texture=renderTarget.texture;const renderTargetProperties=properties.get(renderTarget);const textureProperties=properties.get(texture);renderTarget.addEventListener("dispose",onRenderTargetDispose);const textures=renderTarget.textures;const isCube=renderTarget.isWebGLCubeRenderTarget===true;const isMultipleRenderTargets=textures.length>1;if(!isMultipleRenderTargets){if(textureProperties.__webglTexture===undefined){textureProperties.__webglTexture=_gl.createTexture()}textureProperties.__version=texture.version;info.memory.textures++}if(isCube){renderTargetProperties.__webglFramebuffer=[];for(let i=0;i<6;i++){if(texture.mipmaps&&texture.mipmaps.length>0){renderTargetProperties.__webglFramebuffer[i]=[];for(let level=0;level<texture.mipmaps.length;level++){renderTargetProperties.__webglFramebuffer[i][level]=_gl.createFramebuffer()}}else{renderTargetProperties.__webglFramebuffer[i]=_gl.createFramebuffer()}}}else{if(texture.mipmaps&&texture.mipmaps.length>0){renderTargetProperties.__webglFramebuffer=[];for(let level=0;level<texture.mipmaps.length;level++){renderTargetProperties.__webglFramebuffer[level]=_gl.createFramebuffer()}}else{renderTargetProperties.__webglFramebuffer=_gl.createFramebuffer()}if(isMultipleRenderTargets){for(let i=0,il=textures.length;i<il;i++){const attachmentProperties=properties.get(textures[i]);if(attachmentProperties.__webglTexture===undefined){attachmentProperties.__webglTexture=_gl.createTexture();info.memory.textures++}}}if(renderTarget.samples>0&&useMultisampledRTT(renderTarget)===false){renderTargetProperties.__webglMultisampledFramebuffer=_gl.createFramebuffer();renderTargetProperties.__webglColorRenderbuffer=[];state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);for(let i=0;i<textures.length;i++){const texture=textures[i];renderTargetProperties.__webglColorRenderbuffer[i]=_gl.createRenderbuffer();_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderTargetProperties.__webglColorRenderbuffer[i]);const glFormat=utils.convert(texture.format,texture.colorSpace);const glType=utils.convert(texture.type);const glInternalFormat=getInternalFormat(texture.internalFormat,glFormat,glType,texture.colorSpace,renderTarget.isXRRenderTarget===true);const samples=getRenderTargetSamples(renderTarget);_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.RENDERBUFFER,renderTargetProperties.__webglColorRenderbuffer[i])}_gl.bindRenderbuffer(_gl.RENDERBUFFER,null);if(renderTarget.depthBuffer){renderTargetProperties.__webglDepthRenderbuffer=_gl.createRenderbuffer();setupRenderBufferStorage(renderTargetProperties.__webglDepthRenderbuffer,renderTarget,true)}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}}if(isCube){state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture);setTextureParameters(_gl.TEXTURE_CUBE_MAP,texture);for(let i=0;i<6;i++){if(texture.mipmaps&&texture.mipmaps.length>0){for(let level=0;level<texture.mipmaps.length;level++){setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i][level],renderTarget,texture,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,level)}}else{setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i],renderTarget,texture,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0)}}if(textureNeedsGenerateMipmaps(texture)){generateMipmap(_gl.TEXTURE_CUBE_MAP)}state.unbindTexture()}else if(isMultipleRenderTargets){for(let i=0,il=textures.length;i<il;i++){const attachment=textures[i];const attachmentProperties=properties.get(attachment);let glTextureType=_gl.TEXTURE_2D;if(renderTarget.isWebGL3DRenderTarget||renderTarget.isWebGLArrayRenderTarget){glTextureType=renderTarget.isWebGL3DRenderTarget?_gl.TEXTURE_3D:_gl.TEXTURE_2D_ARRAY}state.bindTexture(glTextureType,attachmentProperties.__webglTexture);setTextureParameters(glTextureType,attachment);setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,attachment,_gl.COLOR_ATTACHMENT0+i,glTextureType,0);if(textureNeedsGenerateMipmaps(attachment)){generateMipmap(glTextureType)}}state.unbindTexture()}else{let glTextureType=_gl.TEXTURE_2D;if(renderTarget.isWebGL3DRenderTarget||renderTarget.isWebGLArrayRenderTarget){glTextureType=renderTarget.isWebGL3DRenderTarget?_gl.TEXTURE_3D:_gl.TEXTURE_2D_ARRAY}state.bindTexture(glTextureType,textureProperties.__webglTexture);setTextureParameters(glTextureType,texture);if(texture.mipmaps&&texture.mipmaps.length>0){for(let level=0;level<texture.mipmaps.length;level++){setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[level],renderTarget,texture,_gl.COLOR_ATTACHMENT0,glTextureType,level)}}else{setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,texture,_gl.COLOR_ATTACHMENT0,glTextureType,0)}if(textureNeedsGenerateMipmaps(texture)){generateMipmap(glTextureType)}state.unbindTexture()}if(renderTarget.depthBuffer){setupDepthRenderbuffer(renderTarget)}}function updateRenderTargetMipmap(renderTarget){const textures=renderTarget.textures;for(let i=0,il=textures.length;i<il;i++){const texture=textures[i];if(textureNeedsGenerateMipmaps(texture)){const targetType=getTargetType(renderTarget);const webglTexture=properties.get(texture).__webglTexture;state.bindTexture(targetType,webglTexture);generateMipmap(targetType);state.unbindTexture()}}}const invalidationArrayRead=[];const invalidationArrayDraw=[];function updateMultisampleRenderTarget(renderTarget){if(renderTarget.samples>0){if(useMultisampledRTT(renderTarget)===false){const textures=renderTarget.textures;const width=renderTarget.width;const height=renderTarget.height;let mask=_gl.COLOR_BUFFER_BIT;const depthStyle=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;const renderTargetProperties=properties.get(renderTarget);const isMultipleRenderTargets=textures.length>1;if(isMultipleRenderTargets){for(let i=0;i<textures.length;i++){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.RENDERBUFFER,null);state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer);_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.TEXTURE_2D,null,0)}}state.bindFramebuffer(_gl.READ_FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);const mipmaps=renderTarget.texture.mipmaps;if(mipmaps&&mipmaps.length>0){state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[0])}else{state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglFramebuffer)}for(let i=0;i<textures.length;i++){if(renderTarget.resolveDepthBuffer){if(renderTarget.depthBuffer)mask|=_gl.DEPTH_BUFFER_BIT;if(renderTarget.stencilBuffer&&renderTarget.resolveStencilBuffer)mask|=_gl.STENCIL_BUFFER_BIT}if(isMultipleRenderTargets){_gl.framebufferRenderbuffer(_gl.READ_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.RENDERBUFFER,renderTargetProperties.__webglColorRenderbuffer[i]);const webglTexture=properties.get(textures[i]).__webglTexture;_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,webglTexture,0)}_gl.blitFramebuffer(0,0,width,height,0,0,width,height,mask,_gl.NEAREST);if(supportsInvalidateFramebuffer===true){invalidationArrayRead.length=0;invalidationArrayDraw.length=0;invalidationArrayRead.push(_gl.COLOR_ATTACHMENT0+i);if(renderTarget.depthBuffer&&renderTarget.resolveDepthBuffer===false){invalidationArrayRead.push(depthStyle);invalidationArrayDraw.push(depthStyle);_gl.invalidateFramebuffer(_gl.DRAW_FRAMEBUFFER,invalidationArrayDraw)}_gl.invalidateFramebuffer(_gl.READ_FRAMEBUFFER,invalidationArrayRead)}}state.bindFramebuffer(_gl.READ_FRAMEBUFFER,null);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,null);if(isMultipleRenderTargets){for(let i=0;i<textures.length;i++){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.RENDERBUFFER,renderTargetProperties.__webglColorRenderbuffer[i]);const webglTexture=properties.get(textures[i]).__webglTexture;state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer);_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,_gl.TEXTURE_2D,webglTexture,0)}}state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer)}else{if(renderTarget.depthBuffer&&renderTarget.resolveDepthBuffer===false&&supportsInvalidateFramebuffer){const depthStyle=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT;_gl.invalidateFramebuffer(_gl.DRAW_FRAMEBUFFER,[depthStyle])}}}}function getRenderTargetSamples(renderTarget){return Math.min(capabilities.maxSamples,renderTarget.samples)}function useMultisampledRTT(renderTarget){const renderTargetProperties=properties.get(renderTarget);return renderTarget.samples>0&&extensions.has("WEBGL_multisampled_render_to_texture")===true&&renderTargetProperties.__useRenderToTexture!==false}function updateVideoTexture(texture){const frame=info.render.frame;if(_videoTextures.get(texture)!==frame){_videoTextures.set(texture,frame);texture.update()}}function verifyColorSpace(texture,image){const colorSpace=texture.colorSpace;const format=texture.format;const type=texture.type;if(texture.isCompressedTexture===true||texture.isVideoTexture===true)return image;if(colorSpace!==LinearSRGBColorSpace&&colorSpace!==NoColorSpace){if(ColorManagement.getTransfer(colorSpace)===SRGBTransfer){if(format!==RGBAFormat||type!==UnsignedByteType){warn("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.")}}else{error("WebGLTextures: Unsupported texture color space:",colorSpace)}}return image}function getDimensions(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement){_imageDimensions.width=image.naturalWidth||image.width;_imageDimensions.height=image.naturalHeight||image.height}else if(typeof VideoFrame!=="undefined"&&image instanceof VideoFrame){_imageDimensions.width=image.displayWidth;_imageDimensions.height=image.displayHeight}else{_imageDimensions.width=image.width;_imageDimensions.height=image.height}return _imageDimensions}this.allocateTextureUnit=allocateTextureUnit;this.resetTextureUnits=resetTextureUnits;this.setTexture2D=setTexture2D;this.setTexture2DArray=setTexture2DArray;this.setTexture3D=setTexture3D;this.setTextureCube=setTextureCube;this.rebindTextures=rebindTextures;this.setupRenderTarget=setupRenderTarget;this.updateRenderTargetMipmap=updateRenderTargetMipmap;this.updateMultisampleRenderTarget=updateMultisampleRenderTarget;this.setupDepthRenderbuffer=setupDepthRenderbuffer;this.setupFrameBufferTexture=setupFrameBufferTexture;this.useMultisampledRTT=useMultisampledRTT;this.isReversedDepthBuffer=function(){return state.buffers.depth.getReversed()}}function WebGLUtils(gl,extensions){function convert(p,colorSpace=NoColorSpace){let extension;const transfer=ColorManagement.getTransfer(colorSpace);if(p===UnsignedByteType)return gl.UNSIGNED_BYTE;if(p===UnsignedShort4444Type)return gl.UNSIGNED_SHORT_4_4_4_4;if(p===UnsignedShort5551Type)return gl.UNSIGNED_SHORT_5_5_5_1;if(p===UnsignedInt5999Type)return gl.UNSIGNED_INT_5_9_9_9_REV;if(p===UnsignedInt101111Type)return gl.UNSIGNED_INT_10F_11F_11F_REV;if(p===ByteType)return gl.BYTE;if(p===ShortType)return gl.SHORT;if(p===UnsignedShortType)return gl.UNSIGNED_SHORT;if(p===IntType)return gl.INT;if(p===UnsignedIntType)return gl.UNSIGNED_INT;if(p===FloatType)return gl.FLOAT;if(p===HalfFloatType)return gl.HALF_FLOAT;if(p===AlphaFormat)return gl.ALPHA;if(p===RGBFormat)return gl.RGB;if(p===RGBAFormat)return gl.RGBA;if(p===DepthFormat)return gl.DEPTH_COMPONENT;if(p===DepthStencilFormat)return gl.DEPTH_STENCIL;if(p===RedFormat)return gl.RED;if(p===RedIntegerFormat)return gl.RED_INTEGER;if(p===RGFormat)return gl.RG;if(p===RGIntegerFormat)return gl.RG_INTEGER;if(p===RGBAIntegerFormat)return gl.RGBA_INTEGER;if(p===RGB_S3TC_DXT1_Format||p===RGBA_S3TC_DXT1_Format||p===RGBA_S3TC_DXT3_Format||p===RGBA_S3TC_DXT5_Format){if(transfer===SRGBTransfer){extension=extensions.get("WEBGL_compressed_texture_s3tc_srgb");if(extension!==null){if(p===RGB_S3TC_DXT1_Format)return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(p===RGBA_S3TC_DXT1_Format)return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(p===RGBA_S3TC_DXT3_Format)return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(p===RGBA_S3TC_DXT5_Format)return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{return null}}else{extension=extensions.get("WEBGL_compressed_texture_s3tc");if(extension!==null){if(p===RGB_S3TC_DXT1_Format)return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;if(p===RGBA_S3TC_DXT1_Format)return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(p===RGBA_S3TC_DXT3_Format)return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(p===RGBA_S3TC_DXT5_Format)return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT}else{return null}}}if(p===RGB_PVRTC_4BPPV1_Format||p===RGB_PVRTC_2BPPV1_Format||p===RGBA_PVRTC_4BPPV1_Format||p===RGBA_PVRTC_2BPPV1_Format){extension=extensions.get("WEBGL_compressed_texture_pvrtc");if(extension!==null){if(p===RGB_PVRTC_4BPPV1_Format)return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(p===RGB_PVRTC_2BPPV1_Format)return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(p===RGBA_PVRTC_4BPPV1_Format)return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(p===RGBA_PVRTC_2BPPV1_Format)return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else{return null}}if(p===RGB_ETC1_Format||p===RGB_ETC2_Format||p===RGBA_ETC2_EAC_Format||p===R11_EAC_Format||p===SIGNED_R11_EAC_Format||p===RG11_EAC_Format||p===SIGNED_RG11_EAC_Format){extension=extensions.get("WEBGL_compressed_texture_etc");if(extension!==null){if(p===RGB_ETC1_Format||p===RGB_ETC2_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ETC2:extension.COMPRESSED_RGB8_ETC2;if(p===RGBA_ETC2_EAC_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:extension.COMPRESSED_RGBA8_ETC2_EAC;if(p===R11_EAC_Format)return extension.COMPRESSED_R11_EAC;if(p===SIGNED_R11_EAC_Format)return extension.COMPRESSED_SIGNED_R11_EAC;if(p===RG11_EAC_Format)return extension.COMPRESSED_RG11_EAC;if(p===SIGNED_RG11_EAC_Format)return extension.COMPRESSED_SIGNED_RG11_EAC}else{return null}}if(p===RGBA_ASTC_4x4_Format||p===RGBA_ASTC_5x4_Format||p===RGBA_ASTC_5x5_Format||p===RGBA_ASTC_6x5_Format||p===RGBA_ASTC_6x6_Format||p===RGBA_ASTC_8x5_Format||p===RGBA_ASTC_8x6_Format||p===RGBA_ASTC_8x8_Format||p===RGBA_ASTC_10x5_Format||p===RGBA_ASTC_10x6_Format||p===RGBA_ASTC_10x8_Format||p===RGBA_ASTC_10x10_Format||p===RGBA_ASTC_12x10_Format||p===RGBA_ASTC_12x12_Format){extension=extensions.get("WEBGL_compressed_texture_astc");if(extension!==null){if(p===RGBA_ASTC_4x4_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:extension.COMPRESSED_RGBA_ASTC_4x4_KHR;if(p===RGBA_ASTC_5x4_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:extension.COMPRESSED_RGBA_ASTC_5x4_KHR;if(p===RGBA_ASTC_5x5_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:extension.COMPRESSED_RGBA_ASTC_5x5_KHR;if(p===RGBA_ASTC_6x5_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:extension.COMPRESSED_RGBA_ASTC_6x5_KHR;if(p===RGBA_ASTC_6x6_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:extension.COMPRESSED_RGBA_ASTC_6x6_KHR;if(p===RGBA_ASTC_8x5_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:extension.COMPRESSED_RGBA_ASTC_8x5_KHR;if(p===RGBA_ASTC_8x6_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:extension.COMPRESSED_RGBA_ASTC_8x6_KHR;if(p===RGBA_ASTC_8x8_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:extension.COMPRESSED_RGBA_ASTC_8x8_KHR;if(p===RGBA_ASTC_10x5_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:extension.COMPRESSED_RGBA_ASTC_10x5_KHR;if(p===RGBA_ASTC_10x6_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:extension.COMPRESSED_RGBA_ASTC_10x6_KHR;if(p===RGBA_ASTC_10x8_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:extension.COMPRESSED_RGBA_ASTC_10x8_KHR;if(p===RGBA_ASTC_10x10_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:extension.COMPRESSED_RGBA_ASTC_10x10_KHR;if(p===RGBA_ASTC_12x10_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:extension.COMPRESSED_RGBA_ASTC_12x10_KHR;if(p===RGBA_ASTC_12x12_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:extension.COMPRESSED_RGBA_ASTC_12x12_KHR}else{return null}}if(p===RGBA_BPTC_Format||p===RGB_BPTC_SIGNED_Format||p===RGB_BPTC_UNSIGNED_Format){extension=extensions.get("EXT_texture_compression_bptc");if(extension!==null){if(p===RGBA_BPTC_Format)return transfer===SRGBTransfer?extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(p===RGB_BPTC_SIGNED_Format)return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(p===RGB_BPTC_UNSIGNED_Format)return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else{return null}}if(p===RED_RGTC1_Format||p===SIGNED_RED_RGTC1_Format||p===RED_GREEN_RGTC2_Format||p===SIGNED_RED_GREEN_RGTC2_Format){extension=extensions.get("EXT_texture_compression_rgtc");if(extension!==null){if(p===RED_RGTC1_Format)return extension.COMPRESSED_RED_RGTC1_EXT;if(p===SIGNED_RED_RGTC1_Format)return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(p===RED_GREEN_RGTC2_Format)return extension.COMPRESSED_RED_GREEN_RGTC2_EXT;if(p===SIGNED_RED_GREEN_RGTC2_Format)return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else{return null}}if(p===UnsignedInt248Type)return gl.UNSIGNED_INT_24_8;return gl[p]!==undefined?gl[p]:null}return{convert:convert}}const _occlusion_vertex=`
void main() {

	gl_Position = vec4( position, 1.0 );

}`;const _occlusion_fragment=`
uniform sampler2DArray depthColor;
uniform float depthWidth;
uniform float depthHeight;

void main() {

	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );

	if ( coord.x >= 1.0 ) {

		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;

	} else {

		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;

	}

}`;class WebXRDepthSensing{constructor(){this.texture=null;this.mesh=null;this.depthNear=0;this.depthFar=0}init(depthData,renderState){if(this.texture===null){const texture=new ExternalTexture(depthData.texture);if(depthData.depthNear!==renderState.depthNear||depthData.depthFar!==renderState.depthFar){this.depthNear=depthData.depthNear;this.depthFar=depthData.depthFar}this.texture=texture}}getMesh(cameraXR){if(this.texture!==null){if(this.mesh===null){const viewport=cameraXR.cameras[0].viewport;const material=new ShaderMaterial({vertexShader:_occlusion_vertex,fragmentShader:_occlusion_fragment,uniforms:{depthColor:{value:this.texture},depthWidth:{value:viewport.z},depthHeight:{value:viewport.w}}});this.mesh=new Mesh(new PlaneGeometry(20,20),material)}}return this.mesh}reset(){this.texture=null;this.mesh=null}getDepthTexture(){return this.texture}}class WebXRManager extends EventDispatcher{constructor(renderer,gl){super();const scope=this;let session=null;let framebufferScaleFactor=1;let referenceSpace=null;let referenceSpaceType="local-floor";let foveation=1;let customReferenceSpace=null;let pose=null;let glBinding=null;let glProjLayer=null;let glBaseLayer=null;let xrFrame=null;const supportsGlBinding=typeof XRWebGLBinding!=="undefined";const depthSensing=new WebXRDepthSensing;const cameraAccessTextures={};const attributes=gl.getContextAttributes();let initialRenderTarget=null;let newRenderTarget=null;const controllers=[];const controllerInputSources=[];const currentSize=new Vector2;let currentPixelRatio=null;const cameraL=new PerspectiveCamera;cameraL.viewport=new Vector4;const cameraR=new PerspectiveCamera;cameraR.viewport=new Vector4;const cameras=[cameraL,cameraR];const cameraXR=new ArrayCamera;let _currentDepthNear=null;let _currentDepthFar=null;this.cameraAutoUpdate=true;this.enabled=false;this.isPresenting=false;this.getController=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getTargetRaySpace()};this.getControllerGrip=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getGripSpace()};this.getHand=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getHandSpace()};function onSessionEvent(event){const controllerIndex=controllerInputSources.indexOf(event.inputSource);if(controllerIndex===-1){return}const controller=controllers[controllerIndex];if(controller!==undefined){controller.update(event.inputSource,event.frame,customReferenceSpace||referenceSpace);controller.dispatchEvent({type:event.type,data:event.inputSource})}}function onSessionEnd(){session.removeEventListener("select",onSessionEvent);session.removeEventListener("selectstart",onSessionEvent);session.removeEventListener("selectend",onSessionEvent);session.removeEventListener("squeeze",onSessionEvent);session.removeEventListener("squeezestart",onSessionEvent);session.removeEventListener("squeezeend",onSessionEvent);session.removeEventListener("end",onSessionEnd);session.removeEventListener("inputsourceschange",onInputSourcesChange);for(let i=0;i<controllers.length;i++){const inputSource=controllerInputSources[i];if(inputSource===null)continue;controllerInputSources[i]=null;controllers[i].disconnect(inputSource)}_currentDepthNear=null;_currentDepthFar=null;depthSensing.reset();for(const key in cameraAccessTextures){delete cameraAccessTextures[key]}renderer.setRenderTarget(initialRenderTarget);glBaseLayer=null;glProjLayer=null;glBinding=null;session=null;newRenderTarget=null;animation.stop();scope.isPresenting=false;renderer.setPixelRatio(currentPixelRatio);renderer.setSize(currentSize.width,currentSize.height,false);scope.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(value){framebufferScaleFactor=value;if(scope.isPresenting===true){warn("WebXRManager: Cannot change framebuffer scale while presenting.")}};this.setReferenceSpaceType=function(value){referenceSpaceType=value;if(scope.isPresenting===true){warn("WebXRManager: Cannot change reference space type while presenting.")}};this.getReferenceSpace=function(){return customReferenceSpace||referenceSpace};this.setReferenceSpace=function(space){customReferenceSpace=space};this.getBaseLayer=function(){return glProjLayer!==null?glProjLayer:glBaseLayer};this.getBinding=function(){if(glBinding===null&&supportsGlBinding){glBinding=new XRWebGLBinding(session,gl)}return glBinding};this.getFrame=function(){return xrFrame};this.getSession=function(){return session};this.setSession=async function(value){session=value;if(session!==null){initialRenderTarget=renderer.getRenderTarget();session.addEventListener("select",onSessionEvent);session.addEventListener("selectstart",onSessionEvent);session.addEventListener("selectend",onSessionEvent);session.addEventListener("squeeze",onSessionEvent);session.addEventListener("squeezestart",onSessionEvent);session.addEventListener("squeezeend",onSessionEvent);session.addEventListener("end",onSessionEnd);session.addEventListener("inputsourceschange",onInputSourcesChange);if(attributes.xrCompatible!==true){await gl.makeXRCompatible()}currentPixelRatio=renderer.getPixelRatio();renderer.getSize(currentSize);const supportsLayers=supportsGlBinding&&"createProjectionLayer"in XRWebGLBinding.prototype;if(!supportsLayers){const layerInit={antialias:attributes.antialias,alpha:true,depth:attributes.depth,stencil:attributes.stencil,framebufferScaleFactor:framebufferScaleFactor};glBaseLayer=new XRWebGLLayer(session,gl,layerInit);session.updateRenderState({baseLayer:glBaseLayer});renderer.setPixelRatio(1);renderer.setSize(glBaseLayer.framebufferWidth,glBaseLayer.framebufferHeight,false);newRenderTarget=new WebGLRenderTarget(glBaseLayer.framebufferWidth,glBaseLayer.framebufferHeight,{format:RGBAFormat,type:UnsignedByteType,colorSpace:renderer.outputColorSpace,stencilBuffer:attributes.stencil,resolveDepthBuffer:glBaseLayer.ignoreDepthValues===false,resolveStencilBuffer:glBaseLayer.ignoreDepthValues===false})}else{let depthFormat=null;let depthType=null;let glDepthFormat=null;if(attributes.depth){glDepthFormat=attributes.stencil?gl.DEPTH24_STENCIL8:gl.DEPTH_COMPONENT24;depthFormat=attributes.stencil?DepthStencilFormat:DepthFormat;depthType=attributes.stencil?UnsignedInt248Type:UnsignedIntType}const projectionlayerInit={colorFormat:gl.RGBA8,depthFormat:glDepthFormat,scaleFactor:framebufferScaleFactor};glBinding=this.getBinding();glProjLayer=glBinding.createProjectionLayer(projectionlayerInit);session.updateRenderState({layers:[glProjLayer]});renderer.setPixelRatio(1);renderer.setSize(glProjLayer.textureWidth,glProjLayer.textureHeight,false);newRenderTarget=new WebGLRenderTarget(glProjLayer.textureWidth,glProjLayer.textureHeight,{format:RGBAFormat,type:UnsignedByteType,depthTexture:new DepthTexture(glProjLayer.textureWidth,glProjLayer.textureHeight,depthType,undefined,undefined,undefined,undefined,undefined,undefined,depthFormat),stencilBuffer:attributes.stencil,colorSpace:renderer.outputColorSpace,samples:attributes.antialias?4:0,resolveDepthBuffer:glProjLayer.ignoreDepthValues===false,resolveStencilBuffer:glProjLayer.ignoreDepthValues===false})}newRenderTarget.isXRRenderTarget=true;this.setFoveation(foveation);customReferenceSpace=null;referenceSpace=await session.requestReferenceSpace(referenceSpaceType);animation.setContext(session);animation.start();scope.isPresenting=true;scope.dispatchEvent({type:"sessionstart"})}};this.getEnvironmentBlendMode=function(){if(session!==null){return session.environmentBlendMode}};this.getDepthTexture=function(){return depthSensing.getDepthTexture()};function onInputSourcesChange(event){for(let i=0;i<event.removed.length;i++){const inputSource=event.removed[i];const index=controllerInputSources.indexOf(inputSource);if(index>=0){controllerInputSources[index]=null;controllers[index].disconnect(inputSource)}}for(let i=0;i<event.added.length;i++){const inputSource=event.added[i];let controllerIndex=controllerInputSources.indexOf(inputSource);if(controllerIndex===-1){for(let i=0;i<controllers.length;i++){if(i>=controllerInputSources.length){controllerInputSources.push(inputSource);controllerIndex=i;break}else if(controllerInputSources[i]===null){controllerInputSources[i]=inputSource;controllerIndex=i;break}}if(controllerIndex===-1)break}const controller=controllers[controllerIndex];if(controller){controller.connect(inputSource)}}}const cameraLPos=new Vector3;const cameraRPos=new Vector3;function setProjectionFromUnion(camera,cameraL,cameraR){cameraLPos.setFromMatrixPosition(cameraL.matrixWorld);cameraRPos.setFromMatrixPosition(cameraR.matrixWorld);const ipd=cameraLPos.distanceTo(cameraRPos);const projL=cameraL.projectionMatrix.elements;const projR=cameraR.projectionMatrix.elements;const near=projL[14]/(projL[10]-1);const far=projL[14]/(projL[10]+1);const topFov=(projL[9]+1)/projL[5];const bottomFov=(projL[9]-1)/projL[5];const leftFov=(projL[8]-1)/projL[0];const rightFov=(projR[8]+1)/projR[0];const left=near*leftFov;const right=near*rightFov;const zOffset=ipd/(-leftFov+rightFov);const xOffset=zOffset*-leftFov;cameraL.matrixWorld.decompose(camera.position,camera.quaternion,camera.scale);camera.translateX(xOffset);camera.translateZ(zOffset);camera.matrixWorld.compose(camera.position,camera.quaternion,camera.scale);camera.matrixWorldInverse.copy(camera.matrixWorld).invert();if(projL[10]===-1){camera.projectionMatrix.copy(cameraL.projectionMatrix);camera.projectionMatrixInverse.copy(cameraL.projectionMatrixInverse)}else{const near2=near+zOffset;const far2=far+zOffset;const left2=left-xOffset;const right2=right+(ipd-xOffset);const top2=topFov*far/far2*near2;const bottom2=bottomFov*far/far2*near2;camera.projectionMatrix.makePerspective(left2,right2,top2,bottom2,near2,far2);camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert()}}function updateCamera(camera,parent){if(parent===null){camera.matrixWorld.copy(camera.matrix)}else{camera.matrixWorld.multiplyMatrices(parent.matrixWorld,camera.matrix)}camera.matrixWorldInverse.copy(camera.matrixWorld).invert()}this.updateCamera=function(camera){if(session===null)return;let depthNear=camera.near;let depthFar=camera.far;if(depthSensing.texture!==null){if(depthSensing.depthNear>0)depthNear=depthSensing.depthNear;if(depthSensing.depthFar>0)depthFar=depthSensing.depthFar}cameraXR.near=cameraR.near=cameraL.near=depthNear;cameraXR.far=cameraR.far=cameraL.far=depthFar;if(_currentDepthNear!==cameraXR.near||_currentDepthFar!==cameraXR.far){session.updateRenderState({depthNear:cameraXR.near,depthFar:cameraXR.far});_currentDepthNear=cameraXR.near;_currentDepthFar=cameraXR.far}cameraXR.layers.mask=camera.layers.mask|6;cameraL.layers.mask=cameraXR.layers.mask&3;cameraR.layers.mask=cameraXR.layers.mask&5;const parent=camera.parent;const cameras=cameraXR.cameras;updateCamera(cameraXR,parent);for(let i=0;i<cameras.length;i++){updateCamera(cameras[i],parent)}if(cameras.length===2){setProjectionFromUnion(cameraXR,cameraL,cameraR)}else{cameraXR.projectionMatrix.copy(cameraL.projectionMatrix)}updateUserCamera(camera,cameraXR,parent)};function updateUserCamera(camera,cameraXR,parent){if(parent===null){camera.matrix.copy(cameraXR.matrixWorld)}else{camera.matrix.copy(parent.matrixWorld);camera.matrix.invert();camera.matrix.multiply(cameraXR.matrixWorld)}camera.matrix.decompose(camera.position,camera.quaternion,camera.scale);camera.updateMatrixWorld(true);camera.projectionMatrix.copy(cameraXR.projectionMatrix);camera.projectionMatrixInverse.copy(cameraXR.projectionMatrixInverse);if(camera.isPerspectiveCamera){camera.fov=RAD2DEG*2*Math.atan(1/camera.projectionMatrix.elements[5]);camera.zoom=1}}this.getCamera=function(){return cameraXR};this.getFoveation=function(){if(glProjLayer===null&&glBaseLayer===null){return undefined}return foveation};this.setFoveation=function(value){foveation=value;if(glProjLayer!==null){glProjLayer.fixedFoveation=value}if(glBaseLayer!==null&&glBaseLayer.fixedFoveation!==undefined){glBaseLayer.fixedFoveation=value}};this.hasDepthSensing=function(){return depthSensing.texture!==null};this.getDepthSensingMesh=function(){return depthSensing.getMesh(cameraXR)};this.getCameraTexture=function(xrCamera){return cameraAccessTextures[xrCamera]};let onAnimationFrameCallback=null;function onAnimationFrame(time,frame){pose=frame.getViewerPose(customReferenceSpace||referenceSpace);xrFrame=frame;if(pose!==null){const views=pose.views;if(glBaseLayer!==null){renderer.setRenderTargetFramebuffer(newRenderTarget,glBaseLayer.framebuffer);renderer.setRenderTarget(newRenderTarget)}let cameraXRNeedsUpdate=false;if(views.length!==cameraXR.cameras.length){cameraXR.cameras.length=0;cameraXRNeedsUpdate=true}for(let i=0;i<views.length;i++){const view=views[i];let viewport=null;if(glBaseLayer!==null){viewport=glBaseLayer.getViewport(view)}else{const glSubImage=glBinding.getViewSubImage(glProjLayer,view);viewport=glSubImage.viewport;if(i===0){renderer.setRenderTargetTextures(newRenderTarget,glSubImage.colorTexture,glSubImage.depthStencilTexture);renderer.setRenderTarget(newRenderTarget)}}let camera=cameras[i];if(camera===undefined){camera=new PerspectiveCamera;camera.layers.enable(i);camera.viewport=new Vector4;cameras[i]=camera}camera.matrix.fromArray(view.transform.matrix);camera.matrix.decompose(camera.position,camera.quaternion,camera.scale);camera.projectionMatrix.fromArray(view.projectionMatrix);camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();camera.viewport.set(viewport.x,viewport.y,viewport.width,viewport.height);if(i===0){cameraXR.matrix.copy(camera.matrix);cameraXR.matrix.decompose(cameraXR.position,cameraXR.quaternion,cameraXR.scale)}if(cameraXRNeedsUpdate===true){cameraXR.cameras.push(camera)}}const enabledFeatures=session.enabledFeatures;const gpuDepthSensingEnabled=enabledFeatures&&enabledFeatures.includes("depth-sensing")&&session.depthUsage=="gpu-optimized";if(gpuDepthSensingEnabled&&supportsGlBinding){glBinding=scope.getBinding();const depthData=glBinding.getDepthInformation(views[0]);if(depthData&&depthData.isValid&&depthData.texture){depthSensing.init(depthData,session.renderState)}}const cameraAccessEnabled=enabledFeatures&&enabledFeatures.includes("camera-access");if(cameraAccessEnabled&&supportsGlBinding){renderer.state.unbindTexture();glBinding=scope.getBinding();for(let i=0;i<views.length;i++){const camera=views[i].camera;if(camera){let cameraTex=cameraAccessTextures[camera];if(!cameraTex){cameraTex=new ExternalTexture;cameraAccessTextures[camera]=cameraTex}const glTexture=glBinding.getCameraImage(camera);cameraTex.sourceTexture=glTexture}}}}for(let i=0;i<controllers.length;i++){const inputSource=controllerInputSources[i];const controller=controllers[i];if(inputSource!==null&&controller!==undefined){controller.update(inputSource,frame,customReferenceSpace||referenceSpace)}}if(onAnimationFrameCallback)onAnimationFrameCallback(time,frame);if(frame.detectedPlanes){scope.dispatchEvent({type:"planesdetected",data:frame})}xrFrame=null}const animation=new WebGLAnimation;animation.setAnimationLoop(onAnimationFrame);this.setAnimationLoop=function(callback){onAnimationFrameCallback=callback};this.dispose=function(){}}}const _e1=new Euler;const _m1=new Matrix4;function WebGLMaterials(renderer,properties){function refreshTransformUniform(map,uniform){if(map.matrixAutoUpdate===true){map.updateMatrix()}uniform.value.copy(map.matrix)}function refreshFogUniforms(uniforms,fog){fog.color.getRGB(uniforms.fogColor.value,getUnlitUniformColorSpace(renderer));if(fog.isFog){uniforms.fogNear.value=fog.near;uniforms.fogFar.value=fog.far}else if(fog.isFogExp2){uniforms.fogDensity.value=fog.density}}function refreshMaterialUniforms(uniforms,material,pixelRatio,height,transmissionRenderTarget){if(material.isMeshBasicMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshLambertMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshToonMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsToon(uniforms,material)}else if(material.isMeshPhongMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsPhong(uniforms,material)}else if(material.isMeshStandardMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsStandard(uniforms,material);if(material.isMeshPhysicalMaterial){refreshUniformsPhysical(uniforms,material,transmissionRenderTarget)}}else if(material.isMeshMatcapMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsMatcap(uniforms,material)}else if(material.isMeshDepthMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshDistanceMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsDistance(uniforms,material)}else if(material.isMeshNormalMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isLineBasicMaterial){refreshUniformsLine(uniforms,material);if(material.isLineDashedMaterial){refreshUniformsDash(uniforms,material)}}else if(material.isPointsMaterial){refreshUniformsPoints(uniforms,material,pixelRatio,height)}else if(material.isSpriteMaterial){refreshUniformsSprites(uniforms,material)}else if(material.isShadowMaterial){uniforms.color.value.copy(material.color);uniforms.opacity.value=material.opacity}else if(material.isShaderMaterial){material.uniformsNeedUpdate=false}}function refreshUniformsCommon(uniforms,material){uniforms.opacity.value=material.opacity;if(material.color){uniforms.diffuse.value.copy(material.color)}if(material.emissive){uniforms.emissive.value.copy(material.emissive).multiplyScalar(material.emissiveIntensity)}if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.bumpMap){uniforms.bumpMap.value=material.bumpMap;refreshTransformUniform(material.bumpMap,uniforms.bumpMapTransform);uniforms.bumpScale.value=material.bumpScale;if(material.side===BackSide){uniforms.bumpScale.value*=-1}}if(material.normalMap){uniforms.normalMap.value=material.normalMap;refreshTransformUniform(material.normalMap,uniforms.normalMapTransform);uniforms.normalScale.value.copy(material.normalScale);if(material.side===BackSide){uniforms.normalScale.value.negate()}}if(material.displacementMap){uniforms.displacementMap.value=material.displacementMap;refreshTransformUniform(material.displacementMap,uniforms.displacementMapTransform);uniforms.displacementScale.value=material.displacementScale;uniforms.displacementBias.value=material.displacementBias}if(material.emissiveMap){uniforms.emissiveMap.value=material.emissiveMap;refreshTransformUniform(material.emissiveMap,uniforms.emissiveMapTransform)}if(material.specularMap){uniforms.specularMap.value=material.specularMap;refreshTransformUniform(material.specularMap,uniforms.specularMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}const materialProperties=properties.get(material);const envMap=materialProperties.envMap;const envMapRotation=materialProperties.envMapRotation;if(envMap){uniforms.envMap.value=envMap;_e1.copy(envMapRotation);_e1.x*=-1;_e1.y*=-1;_e1.z*=-1;if(envMap.isCubeTexture&&envMap.isRenderTargetTexture===false){_e1.y*=-1;_e1.z*=-1}uniforms.envMapRotation.value.setFromMatrix4(_m1.makeRotationFromEuler(_e1));uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===false?-1:1;uniforms.reflectivity.value=material.reflectivity;uniforms.ior.value=material.ior;uniforms.refractionRatio.value=material.refractionRatio}if(material.lightMap){uniforms.lightMap.value=material.lightMap;uniforms.lightMapIntensity.value=material.lightMapIntensity;refreshTransformUniform(material.lightMap,uniforms.lightMapTransform)}if(material.aoMap){uniforms.aoMap.value=material.aoMap;uniforms.aoMapIntensity.value=material.aoMapIntensity;refreshTransformUniform(material.aoMap,uniforms.aoMapTransform)}}function refreshUniformsLine(uniforms,material){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}}function refreshUniformsDash(uniforms,material){uniforms.dashSize.value=material.dashSize;uniforms.totalSize.value=material.dashSize+material.gapSize;uniforms.scale.value=material.scale}function refreshUniformsPoints(uniforms,material,pixelRatio,height){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;uniforms.size.value=material.size*pixelRatio;uniforms.scale.value=height*0.5;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.uvTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}}function refreshUniformsSprites(uniforms,material){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;uniforms.rotation.value=material.rotation;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}}function refreshUniformsPhong(uniforms,material){uniforms.specular.value.copy(material.specular);uniforms.shininess.value=Math.max(material.shininess,1e-4)}function refreshUniformsToon(uniforms,material){if(material.gradientMap){uniforms.gradientMap.value=material.gradientMap}}function refreshUniformsStandard(uniforms,material){uniforms.metalness.value=material.metalness;if(material.metalnessMap){uniforms.metalnessMap.value=material.metalnessMap;refreshTransformUniform(material.metalnessMap,uniforms.metalnessMapTransform)}uniforms.roughness.value=material.roughness;if(material.roughnessMap){uniforms.roughnessMap.value=material.roughnessMap;refreshTransformUniform(material.roughnessMap,uniforms.roughnessMapTransform)}if(material.envMap){uniforms.envMapIntensity.value=material.envMapIntensity}}function refreshUniformsPhysical(uniforms,material,transmissionRenderTarget){uniforms.ior.value=material.ior;if(material.sheen>0){uniforms.sheenColor.value.copy(material.sheenColor).multiplyScalar(material.sheen);uniforms.sheenRoughness.value=material.sheenRoughness;if(material.sheenColorMap){uniforms.sheenColorMap.value=material.sheenColorMap;refreshTransformUniform(material.sheenColorMap,uniforms.sheenColorMapTransform)}if(material.sheenRoughnessMap){uniforms.sheenRoughnessMap.value=material.sheenRoughnessMap;refreshTransformUniform(material.sheenRoughnessMap,uniforms.sheenRoughnessMapTransform)}}if(material.clearcoat>0){uniforms.clearcoat.value=material.clearcoat;uniforms.clearcoatRoughness.value=material.clearcoatRoughness;if(material.clearcoatMap){uniforms.clearcoatMap.value=material.clearcoatMap;refreshTransformUniform(material.clearcoatMap,uniforms.clearcoatMapTransform)}if(material.clearcoatRoughnessMap){uniforms.clearcoatRoughnessMap.value=material.clearcoatRoughnessMap;refreshTransformUniform(material.clearcoatRoughnessMap,uniforms.clearcoatRoughnessMapTransform)}if(material.clearcoatNormalMap){uniforms.clearcoatNormalMap.value=material.clearcoatNormalMap;refreshTransformUniform(material.clearcoatNormalMap,uniforms.clearcoatNormalMapTransform);uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale);if(material.side===BackSide){uniforms.clearcoatNormalScale.value.negate()}}}if(material.dispersion>0){uniforms.dispersion.value=material.dispersion}if(material.iridescence>0){uniforms.iridescence.value=material.iridescence;uniforms.iridescenceIOR.value=material.iridescenceIOR;uniforms.iridescenceThicknessMinimum.value=material.iridescenceThicknessRange[0];uniforms.iridescenceThicknessMaximum.value=material.iridescenceThicknessRange[1];if(material.iridescenceMap){uniforms.iridescenceMap.value=material.iridescenceMap;refreshTransformUniform(material.iridescenceMap,uniforms.iridescenceMapTransform)}if(material.iridescenceThicknessMap){uniforms.iridescenceThicknessMap.value=material.iridescenceThicknessMap;refreshTransformUniform(material.iridescenceThicknessMap,uniforms.iridescenceThicknessMapTransform)}}if(material.transmission>0){uniforms.transmission.value=material.transmission;uniforms.transmissionSamplerMap.value=transmissionRenderTarget.texture;uniforms.transmissionSamplerSize.value.set(transmissionRenderTarget.width,transmissionRenderTarget.height);if(material.transmissionMap){uniforms.transmissionMap.value=material.transmissionMap;refreshTransformUniform(material.transmissionMap,uniforms.transmissionMapTransform)}uniforms.thickness.value=material.thickness;if(material.thicknessMap){uniforms.thicknessMap.value=material.thicknessMap;refreshTransformUniform(material.thicknessMap,uniforms.thicknessMapTransform)}uniforms.attenuationDistance.value=material.attenuationDistance;uniforms.attenuationColor.value.copy(material.attenuationColor)}if(material.anisotropy>0){uniforms.anisotropyVector.value.set(material.anisotropy*Math.cos(material.anisotropyRotation),material.anisotropy*Math.sin(material.anisotropyRotation));if(material.anisotropyMap){uniforms.anisotropyMap.value=material.anisotropyMap;refreshTransformUniform(material.anisotropyMap,uniforms.anisotropyMapTransform)}}uniforms.specularIntensity.value=material.specularIntensity;uniforms.specularColor.value.copy(material.specularColor);if(material.specularColorMap){uniforms.specularColorMap.value=material.specularColorMap;refreshTransformUniform(material.specularColorMap,uniforms.specularColorMapTransform)}if(material.specularIntensityMap){uniforms.specularIntensityMap.value=material.specularIntensityMap;refreshTransformUniform(material.specularIntensityMap,uniforms.specularIntensityMapTransform)}}function refreshUniformsMatcap(uniforms,material){if(material.matcap){uniforms.matcap.value=material.matcap}}function refreshUniformsDistance(uniforms,material){const light=properties.get(material).light;uniforms.referencePosition.value.setFromMatrixPosition(light.matrixWorld);uniforms.nearDistance.value=light.shadow.camera.near;uniforms.farDistance.value=light.shadow.camera.far}return{refreshFogUniforms:refreshFogUniforms,refreshMaterialUniforms:refreshMaterialUniforms}}function WebGLUniformsGroups(gl,info,capabilities,state){let buffers={};let updateList={};let allocatedBindingPoints=[];const maxBindingPoints=gl.getParameter(gl.MAX_UNIFORM_BUFFER_BINDINGS);function bind(uniformsGroup,program){const webglProgram=program.program;state.uniformBlockBinding(uniformsGroup,webglProgram)}function update(uniformsGroup,program){let buffer=buffers[uniformsGroup.id];if(buffer===undefined){prepareUniformsGroup(uniformsGroup);buffer=createBuffer(uniformsGroup);buffers[uniformsGroup.id]=buffer;uniformsGroup.addEventListener("dispose",onUniformsGroupsDispose)}const webglProgram=program.program;state.updateUBOMapping(uniformsGroup,webglProgram);const frame=info.render.frame;if(updateList[uniformsGroup.id]!==frame){updateBufferData(uniformsGroup);updateList[uniformsGroup.id]=frame}}function createBuffer(uniformsGroup){const bindingPointIndex=allocateBindingPointIndex();uniformsGroup.__bindingPointIndex=bindingPointIndex;const buffer=gl.createBuffer();const size=uniformsGroup.__size;const usage=uniformsGroup.usage;gl.bindBuffer(gl.UNIFORM_BUFFER,buffer);gl.bufferData(gl.UNIFORM_BUFFER,size,usage);gl.bindBuffer(gl.UNIFORM_BUFFER,null);gl.bindBufferBase(gl.UNIFORM_BUFFER,bindingPointIndex,buffer);return buffer}function allocateBindingPointIndex(){for(let i=0;i<maxBindingPoints;i++){if(allocatedBindingPoints.indexOf(i)===-1){allocatedBindingPoints.push(i);return i}}error("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.");return 0}function updateBufferData(uniformsGroup){const buffer=buffers[uniformsGroup.id];const uniforms=uniformsGroup.uniforms;const cache=uniformsGroup.__cache;gl.bindBuffer(gl.UNIFORM_BUFFER,buffer);for(let i=0,il=uniforms.length;i<il;i++){const uniformArray=Array.isArray(uniforms[i])?uniforms[i]:[uniforms[i]];for(let j=0,jl=uniformArray.length;j<jl;j++){const uniform=uniformArray[j];if(hasUniformChanged(uniform,i,j,cache)===true){const offset=uniform.__offset;const values=Array.isArray(uniform.value)?uniform.value:[uniform.value];let arrayOffset=0;for(let k=0;k<values.length;k++){const value=values[k];const info=getUniformSize(value);if(typeof value==="number"||typeof value==="boolean"){uniform.__data[0]=value;gl.bufferSubData(gl.UNIFORM_BUFFER,offset+arrayOffset,uniform.__data)}else if(value.isMatrix3){uniform.__data[0]=value.elements[0];uniform.__data[1]=value.elements[1];uniform.__data[2]=value.elements[2];uniform.__data[3]=0;uniform.__data[4]=value.elements[3];uniform.__data[5]=value.elements[4];uniform.__data[6]=value.elements[5];uniform.__data[7]=0;uniform.__data[8]=value.elements[6];uniform.__data[9]=value.elements[7];uniform.__data[10]=value.elements[8];uniform.__data[11]=0}else{value.toArray(uniform.__data,arrayOffset);arrayOffset+=info.storage/Float32Array.BYTES_PER_ELEMENT}}gl.bufferSubData(gl.UNIFORM_BUFFER,offset,uniform.__data)}}}gl.bindBuffer(gl.UNIFORM_BUFFER,null)}function hasUniformChanged(uniform,index,indexArray,cache){const value=uniform.value;const indexString=index+"_"+indexArray;if(cache[indexString]===undefined){if(typeof value==="number"||typeof value==="boolean"){cache[indexString]=value}else{cache[indexString]=value.clone()}return true}else{const cachedObject=cache[indexString];if(typeof value==="number"||typeof value==="boolean"){if(cachedObject!==value){cache[indexString]=value;return true}}else{if(cachedObject.equals(value)===false){cachedObject.copy(value);return true}}}return false}function prepareUniformsGroup(uniformsGroup){const uniforms=uniformsGroup.uniforms;let offset=0;const chunkSize=16;for(let i=0,l=uniforms.length;i<l;i++){const uniformArray=Array.isArray(uniforms[i])?uniforms[i]:[uniforms[i]];for(let j=0,jl=uniformArray.length;j<jl;j++){const uniform=uniformArray[j];const values=Array.isArray(uniform.value)?uniform.value:[uniform.value];for(let k=0,kl=values.length;k<kl;k++){const value=values[k];const info=getUniformSize(value);const chunkOffset=offset%chunkSize;const chunkPadding=chunkOffset%info.boundary;const chunkStart=chunkOffset+chunkPadding;offset+=chunkPadding;if(chunkStart!==0&&chunkSize-chunkStart<info.storage){offset+=chunkSize-chunkStart}uniform.__data=new Float32Array(info.storage/Float32Array.BYTES_PER_ELEMENT);uniform.__offset=offset;offset+=info.storage}}}const chunkOffset=offset%chunkSize;if(chunkOffset>0)offset+=chunkSize-chunkOffset;uniformsGroup.__size=offset;uniformsGroup.__cache={};return this}function getUniformSize(value){const info={boundary:0,storage:0};if(typeof value==="number"||typeof value==="boolean"){info.boundary=4;info.storage=4}else if(value.isVector2){info.boundary=8;info.storage=8}else if(value.isVector3||value.isColor){info.boundary=16;info.storage=12}else if(value.isVector4){info.boundary=16;info.storage=16}else if(value.isMatrix3){info.boundary=48;info.storage=48}else if(value.isMatrix4){info.boundary=64;info.storage=64}else if(value.isTexture){warn("WebGLRenderer: Texture samplers can not be part of an uniforms group.")}else{warn("WebGLRenderer: Unsupported uniform value type.",value)}return info}function onUniformsGroupsDispose(event){const uniformsGroup=event.target;uniformsGroup.removeEventListener("dispose",onUniformsGroupsDispose);const index=allocatedBindingPoints.indexOf(uniformsGroup.__bindingPointIndex);allocatedBindingPoints.splice(index,1);gl.deleteBuffer(buffers[uniformsGroup.id]);delete buffers[uniformsGroup.id];delete updateList[uniformsGroup.id]}function dispose(){for(const id in buffers){gl.deleteBuffer(buffers[id])}allocatedBindingPoints=[];buffers={};updateList={}}return{bind:bind,update:update,dispose:dispose}}const DATA=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let lut=null;function getDFGLUT(){if(lut===null){lut=new DataTexture(DATA,16,16,RGFormat,HalfFloatType);lut.name="DFG_LUT";lut.minFilter=LinearFilter;lut.magFilter=LinearFilter;lut.wrapS=ClampToEdgeWrapping;lut.wrapT=ClampToEdgeWrapping;lut.generateMipmaps=false;lut.needsUpdate=true}return lut}class WebGLRenderer{constructor(parameters={}){const{canvas=createCanvasElement(),context=null,depth=true,stencil=false,alpha=false,antialias=false,premultipliedAlpha=true,preserveDrawingBuffer=false,powerPreference="default",failIfMajorPerformanceCaveat=false,reversedDepthBuffer=false,outputBufferType=UnsignedByteType}=parameters;this.isWebGLRenderer=true;let _alpha;if(context!==null){if(typeof WebGLRenderingContext!=="undefined"&&context instanceof WebGLRenderingContext){throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.")}_alpha=context.getContextAttributes().alpha}else{_alpha=alpha}const _outputBufferType=outputBufferType;const INTEGER_FORMATS=new Set([RGBAIntegerFormat,RGIntegerFormat,RedIntegerFormat]);const UNSIGNED_TYPES=new Set([UnsignedByteType,UnsignedIntType,UnsignedShortType,UnsignedInt248Type,UnsignedShort4444Type,UnsignedShort5551Type]);const uintClearColor=new Uint32Array(4);const intClearColor=new Int32Array(4);let currentRenderList=null;let currentRenderState=null;const renderListStack=[];const renderStateStack=[];let output=null;this.domElement=canvas;this.debug={checkShaderErrors:true,onShaderError:null};this.autoClear=true;this.autoClearColor=true;this.autoClearDepth=true;this.autoClearStencil=true;this.sortObjects=true;this.clippingPlanes=[];this.localClippingEnabled=false;this.toneMapping=NoToneMapping;this.toneMappingExposure=1;this.transmissionResolutionScale=1;const _this=this;let _isContextLost=false;this._outputColorSpace=SRGBColorSpace;let _currentActiveCubeFace=0;let _currentActiveMipmapLevel=0;let _currentRenderTarget=null;let _currentMaterialId=-1;let _currentCamera=null;const _currentViewport=new Vector4;const _currentScissor=new Vector4;let _currentScissorTest=null;const _currentClearColor=new Color(0);let _currentClearAlpha=0;let _width=canvas.width;let _height=canvas.height;let _pixelRatio=1;let _opaqueSort=null;let _transparentSort=null;const _viewport=new Vector4(0,0,_width,_height);const _scissor=new Vector4(0,0,_width,_height);let _scissorTest=false;const _frustum=new Frustum;let _clippingEnabled=false;let _localClippingEnabled=false;const _projScreenMatrix=new Matrix4;const _vector3=new Vector3;const _vector4=new Vector4;const _emptyScene={background:null,fog:null,environment:null,overrideMaterial:null,isScene:true};let _renderBackground=false;function getTargetPixelRatio(){return _currentRenderTarget===null?_pixelRatio:1}let _gl=context;function getContext(contextName,contextAttributes){return canvas.getContext(contextName,contextAttributes)}try{const contextAttributes={alpha:true,depth,stencil,antialias,premultipliedAlpha,preserveDrawingBuffer,powerPreference,failIfMajorPerformanceCaveat};if("setAttribute"in canvas)canvas.setAttribute("data-engine",`three.js r${REVISION}`);canvas.addEventListener("webglcontextlost",onContextLost,false);canvas.addEventListener("webglcontextrestored",onContextRestore,false);canvas.addEventListener("webglcontextcreationerror",onContextCreationError,false);if(_gl===null){const contextName="webgl2";_gl=getContext(contextName,contextAttributes);if(_gl===null){if(getContext(contextName)){throw new Error("Error creating WebGL context with your selected attributes.")}else{throw new Error("Error creating WebGL context.")}}}}catch(e){error("WebGLRenderer: "+e.message);throw e}let extensions,capabilities,state,info;let properties,textures,cubemaps,cubeuvmaps,attributes,geometries,objects;let programCache,materials,renderLists,renderStates,clipping,shadowMap;let background,morphtargets,bufferRenderer,indexedBufferRenderer;let utils,bindingStates,uniformsGroups;function initGLContext(){extensions=new WebGLExtensions(_gl);extensions.init();utils=new WebGLUtils(_gl,extensions);capabilities=new WebGLCapabilities(_gl,extensions,parameters,utils);state=new WebGLState(_gl,extensions);if(capabilities.reversedDepthBuffer&&reversedDepthBuffer){state.buffers.depth.setReversed(true)}info=new WebGLInfo(_gl);properties=new WebGLProperties;textures=new WebGLTextures(_gl,extensions,state,properties,capabilities,utils,info);cubemaps=new WebGLCubeMaps(_this);cubeuvmaps=new WebGLCubeUVMaps(_this);attributes=new WebGLAttributes(_gl);bindingStates=new WebGLBindingStates(_gl,attributes);geometries=new WebGLGeometries(_gl,attributes,info,bindingStates);objects=new WebGLObjects(_gl,geometries,attributes,info);morphtargets=new WebGLMorphtargets(_gl,capabilities,textures);clipping=new WebGLClipping(properties);programCache=new WebGLPrograms(_this,cubemaps,cubeuvmaps,extensions,capabilities,bindingStates,clipping);materials=new WebGLMaterials(_this,properties);renderLists=new WebGLRenderLists;renderStates=new WebGLRenderStates(extensions);background=new WebGLBackground(_this,cubemaps,cubeuvmaps,state,objects,_alpha,premultipliedAlpha);shadowMap=new WebGLShadowMap(_this,objects,capabilities);uniformsGroups=new WebGLUniformsGroups(_gl,info,capabilities,state);bufferRenderer=new WebGLBufferRenderer(_gl,extensions,info);indexedBufferRenderer=new WebGLIndexedBufferRenderer(_gl,extensions,info);info.programs=programCache.programs;_this.capabilities=capabilities;_this.extensions=extensions;_this.properties=properties;_this.renderLists=renderLists;_this.shadowMap=shadowMap;_this.state=state;_this.info=info}initGLContext();if(_outputBufferType!==UnsignedByteType){output=new WebGLOutput(_outputBufferType,canvas.width,canvas.height,depth,stencil)}const xr=new WebXRManager(_this,_gl);this.xr=xr;this.getContext=function(){return _gl};this.getContextAttributes=function(){return _gl.getContextAttributes()};this.forceContextLoss=function(){const extension=extensions.get("WEBGL_lose_context");if(extension)extension.loseContext()};this.forceContextRestore=function(){const extension=extensions.get("WEBGL_lose_context");if(extension)extension.restoreContext()};this.getPixelRatio=function(){return _pixelRatio};this.setPixelRatio=function(value){if(value===undefined)return;_pixelRatio=value;this.setSize(_width,_height,false)};this.getSize=function(target){return target.set(_width,_height)};this.setSize=function(width,height,updateStyle=true){if(xr.isPresenting){warn("WebGLRenderer: Can't change size while VR device is presenting.");return}_width=width;_height=height;canvas.width=Math.floor(width*_pixelRatio);canvas.height=Math.floor(height*_pixelRatio);if(updateStyle===true){canvas.style.width=width+"px";canvas.style.height=height+"px"}if(output!==null){output.setSize(canvas.width,canvas.height)}this.setViewport(0,0,width,height)};this.getDrawingBufferSize=function(target){return target.set(_width*_pixelRatio,_height*_pixelRatio).floor()};this.setDrawingBufferSize=function(width,height,pixelRatio){_width=width;_height=height;_pixelRatio=pixelRatio;canvas.width=Math.floor(width*pixelRatio);canvas.height=Math.floor(height*pixelRatio);this.setViewport(0,0,width,height)};this.setEffects=function(effects){if(_outputBufferType===UnsignedByteType){console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(effects){for(let i=0;i<effects.length;i++){if(effects[i].isOutputPass===true){console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}}output.setEffects(effects||[])};this.getCurrentViewport=function(target){return target.copy(_currentViewport)};this.getViewport=function(target){return target.copy(_viewport)};this.setViewport=function(x,y,width,height){if(x.isVector4){_viewport.set(x.x,x.y,x.z,x.w)}else{_viewport.set(x,y,width,height)}state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).round())};this.getScissor=function(target){return target.copy(_scissor)};this.setScissor=function(x,y,width,height){if(x.isVector4){_scissor.set(x.x,x.y,x.z,x.w)}else{_scissor.set(x,y,width,height)}state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).round())};this.getScissorTest=function(){return _scissorTest};this.setScissorTest=function(boolean){state.setScissorTest(_scissorTest=boolean)};this.setOpaqueSort=function(method){_opaqueSort=method};this.setTransparentSort=function(method){_transparentSort=method};this.getClearColor=function(target){return target.copy(background.getClearColor())};this.setClearColor=function(){background.setClearColor(...arguments)};this.getClearAlpha=function(){return background.getClearAlpha()};this.setClearAlpha=function(){background.setClearAlpha(...arguments)};this.clear=function(color=true,depth=true,stencil=true){let bits=0;if(color){let isIntegerFormat=false;if(_currentRenderTarget!==null){const targetFormat=_currentRenderTarget.texture.format;isIntegerFormat=INTEGER_FORMATS.has(targetFormat)}if(isIntegerFormat){const targetType=_currentRenderTarget.texture.type;const isUnsignedType=UNSIGNED_TYPES.has(targetType);const clearColor=background.getClearColor();const a=background.getClearAlpha();const r=clearColor.r;const g=clearColor.g;const b=clearColor.b;if(isUnsignedType){uintClearColor[0]=r;uintClearColor[1]=g;uintClearColor[2]=b;uintClearColor[3]=a;_gl.clearBufferuiv(_gl.COLOR,0,uintClearColor)}else{intClearColor[0]=r;intClearColor[1]=g;intClearColor[2]=b;intClearColor[3]=a;_gl.clearBufferiv(_gl.COLOR,0,intClearColor)}}else{bits|=_gl.COLOR_BUFFER_BIT}}if(depth){bits|=_gl.DEPTH_BUFFER_BIT}if(stencil){bits|=_gl.STENCIL_BUFFER_BIT;this.state.buffers.stencil.setMask(4294967295)}_gl.clear(bits)};this.clearColor=function(){this.clear(true,false,false)};this.clearDepth=function(){this.clear(false,true,false)};this.clearStencil=function(){this.clear(false,false,true)};this.dispose=function(){canvas.removeEventListener("webglcontextlost",onContextLost,false);canvas.removeEventListener("webglcontextrestored",onContextRestore,false);canvas.removeEventListener("webglcontextcreationerror",onContextCreationError,false);background.dispose();renderLists.dispose();renderStates.dispose();properties.dispose();cubemaps.dispose();cubeuvmaps.dispose();objects.dispose();bindingStates.dispose();uniformsGroups.dispose();programCache.dispose();xr.dispose();xr.removeEventListener("sessionstart",onXRSessionStart);xr.removeEventListener("sessionend",onXRSessionEnd);animation.stop()};function onContextLost(event){event.preventDefault();log("WebGLRenderer: Context Lost.");_isContextLost=true}function onContextRestore(){log("WebGLRenderer: Context Restored.");_isContextLost=false;const infoAutoReset=info.autoReset;const shadowMapEnabled=shadowMap.enabled;const shadowMapAutoUpdate=shadowMap.autoUpdate;const shadowMapNeedsUpdate=shadowMap.needsUpdate;const shadowMapType=shadowMap.type;initGLContext();info.autoReset=infoAutoReset;shadowMap.enabled=shadowMapEnabled;shadowMap.autoUpdate=shadowMapAutoUpdate;shadowMap.needsUpdate=shadowMapNeedsUpdate;shadowMap.type=shadowMapType}function onContextCreationError(event){error("WebGLRenderer: A WebGL context could not be created. Reason: ",event.statusMessage)}function onMaterialDispose(event){const material=event.target;material.removeEventListener("dispose",onMaterialDispose);deallocateMaterial(material)}function deallocateMaterial(material){releaseMaterialProgramReferences(material);properties.remove(material)}function releaseMaterialProgramReferences(material){const programs=properties.get(material).programs;if(programs!==undefined){programs.forEach(function(program){programCache.releaseProgram(program)});if(material.isShaderMaterial){programCache.releaseShaderCache(material)}}}this.renderBufferDirect=function(camera,scene,geometry,material,object,group){if(scene===null)scene=_emptyScene;const frontFaceCW=object.isMesh&&object.matrixWorld.determinant()<0;const program=setProgram(camera,scene,geometry,material,object);state.setMaterial(material,frontFaceCW);let index=geometry.index;let rangeFactor=1;if(material.wireframe===true){index=geometries.getWireframeAttribute(geometry);if(index===undefined)return;rangeFactor=2}const drawRange=geometry.drawRange;const position=geometry.attributes.position;let drawStart=drawRange.start*rangeFactor;let drawEnd=(drawRange.start+drawRange.count)*rangeFactor;if(group!==null){drawStart=Math.max(drawStart,group.start*rangeFactor);drawEnd=Math.min(drawEnd,(group.start+group.count)*rangeFactor)}if(index!==null){drawStart=Math.max(drawStart,0);drawEnd=Math.min(drawEnd,index.count)}else if(position!==undefined&&position!==null){drawStart=Math.max(drawStart,0);drawEnd=Math.min(drawEnd,position.count)}const drawCount=drawEnd-drawStart;if(drawCount<0||drawCount===Infinity)return;bindingStates.setup(object,material,program,geometry,index);let attribute;let renderer=bufferRenderer;if(index!==null){attribute=attributes.get(index);renderer=indexedBufferRenderer;renderer.setIndex(attribute)}if(object.isMesh){if(material.wireframe===true){state.setLineWidth(material.wireframeLinewidth*getTargetPixelRatio());renderer.setMode(_gl.LINES)}else{renderer.setMode(_gl.TRIANGLES)}}else if(object.isLine){let lineWidth=material.linewidth;if(lineWidth===undefined)lineWidth=1;state.setLineWidth(lineWidth*getTargetPixelRatio());if(object.isLineSegments){renderer.setMode(_gl.LINES)}else if(object.isLineLoop){renderer.setMode(_gl.LINE_LOOP)}else{renderer.setMode(_gl.LINE_STRIP)}}else if(object.isPoints){renderer.setMode(_gl.POINTS)}else if(object.isSprite){renderer.setMode(_gl.TRIANGLES)}if(object.isBatchedMesh){if(object._multiDrawInstances!==null){warnOnce("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.");renderer.renderMultiDrawInstances(object._multiDrawStarts,object._multiDrawCounts,object._multiDrawCount,object._multiDrawInstances)}else{if(!extensions.get("WEBGL_multi_draw")){const starts=object._multiDrawStarts;const counts=object._multiDrawCounts;const drawCount=object._multiDrawCount;const bytesPerElement=index?attributes.get(index).bytesPerElement:1;const uniforms=properties.get(material).currentProgram.getUniforms();for(let i=0;i<drawCount;i++){uniforms.setValue(_gl,"_gl_DrawID",i);renderer.render(starts[i]/bytesPerElement,counts[i])}}else{renderer.renderMultiDraw(object._multiDrawStarts,object._multiDrawCounts,object._multiDrawCount)}}}else if(object.isInstancedMesh){renderer.renderInstances(drawStart,drawCount,object.count)}else if(geometry.isInstancedBufferGeometry){const maxInstanceCount=geometry._maxInstanceCount!==undefined?geometry._maxInstanceCount:Infinity;const instanceCount=Math.min(geometry.instanceCount,maxInstanceCount);renderer.renderInstances(drawStart,drawCount,instanceCount)}else{renderer.render(drawStart,drawCount)}};function prepareMaterial(material,scene,object){if(material.transparent===true&&material.side===DoubleSide&&material.forceSinglePass===false){material.side=BackSide;material.needsUpdate=true;getProgram(material,scene,object);material.side=FrontSide;material.needsUpdate=true;getProgram(material,scene,object);material.side=DoubleSide}else{getProgram(material,scene,object)}}this.compile=function(scene,camera,targetScene=null){if(targetScene===null)targetScene=scene;currentRenderState=renderStates.get(targetScene);currentRenderState.init(camera);renderStateStack.push(currentRenderState);targetScene.traverseVisible(function(object){if(object.isLight&&object.layers.test(camera.layers)){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}});if(scene!==targetScene){scene.traverseVisible(function(object){if(object.isLight&&object.layers.test(camera.layers)){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}})}currentRenderState.setupLights();const materials=new Set;scene.traverse(function(object){if(!(object.isMesh||object.isPoints||object.isLine||object.isSprite)){return}const material=object.material;if(material){if(Array.isArray(material)){for(let i=0;i<material.length;i++){const material2=material[i];prepareMaterial(material2,targetScene,object);materials.add(material2)}}else{prepareMaterial(material,targetScene,object);materials.add(material)}}});currentRenderState=renderStateStack.pop();return materials};this.compileAsync=function(scene,camera,targetScene=null){const materials=this.compile(scene,camera,targetScene);return new Promise(resolve=>{function checkMaterialsReady(){materials.forEach(function(material){const materialProperties=properties.get(material);const program=materialProperties.currentProgram;if(program.isReady()){materials.delete(material)}});if(materials.size===0){resolve(scene);return}setTimeout(checkMaterialsReady,10)}if(extensions.get("KHR_parallel_shader_compile")!==null){checkMaterialsReady()}else{setTimeout(checkMaterialsReady,10)}})};let onAnimationFrameCallback=null;function onAnimationFrame(time){if(onAnimationFrameCallback)onAnimationFrameCallback(time)}function onXRSessionStart(){animation.stop()}function onXRSessionEnd(){animation.start()}const animation=new WebGLAnimation;animation.setAnimationLoop(onAnimationFrame);if(typeof self!=="undefined")animation.setContext(self);this.setAnimationLoop=function(callback){onAnimationFrameCallback=callback;xr.setAnimationLoop(callback);callback===null?animation.stop():animation.start()};xr.addEventListener("sessionstart",onXRSessionStart);xr.addEventListener("sessionend",onXRSessionEnd);this.render=function(scene,camera){if(camera!==undefined&&camera.isCamera!==true){error("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(_isContextLost===true)return;const isXRPresenting=xr.enabled===true&&xr.isPresenting===true;const useOutput=output!==null&&(_currentRenderTarget===null||isXRPresenting)&&output.begin(_this,_currentRenderTarget);if(scene.matrixWorldAutoUpdate===true)scene.updateMatrixWorld();if(camera.parent===null&&camera.matrixWorldAutoUpdate===true)camera.updateMatrixWorld();if(xr.enabled===true&&xr.isPresenting===true&&(output===null||output.isCompositing()===false)){if(xr.cameraAutoUpdate===true)xr.updateCamera(camera);camera=xr.getCamera()}if(scene.isScene===true)scene.onBeforeRender(_this,scene,camera,_currentRenderTarget);currentRenderState=renderStates.get(scene,renderStateStack.length);currentRenderState.init(camera);renderStateStack.push(currentRenderState);_projScreenMatrix.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum.setFromProjectionMatrix(_projScreenMatrix,WebGLCoordinateSystem,camera.reversedDepth);_localClippingEnabled=this.localClippingEnabled;_clippingEnabled=clipping.init(this.clippingPlanes,_localClippingEnabled);currentRenderList=renderLists.get(scene,renderListStack.length);currentRenderList.init();renderListStack.push(currentRenderList);if(xr.enabled===true&&xr.isPresenting===true){const depthSensingMesh=_this.xr.getDepthSensingMesh();if(depthSensingMesh!==null){projectObject(depthSensingMesh,camera,-Infinity,_this.sortObjects)}}projectObject(scene,camera,0,_this.sortObjects);currentRenderList.finish();if(_this.sortObjects===true){currentRenderList.sort(_opaqueSort,_transparentSort)}_renderBackground=xr.enabled===false||xr.isPresenting===false||xr.hasDepthSensing()===false;if(_renderBackground){background.addToRenderList(currentRenderList,scene)}this.info.render.frame++;if(_clippingEnabled===true)clipping.beginShadows();const shadowsArray=currentRenderState.state.shadowsArray;shadowMap.render(shadowsArray,scene,camera);if(_clippingEnabled===true)clipping.endShadows();if(this.info.autoReset===true)this.info.reset();const skipSceneRender=useOutput&&output.hasRenderPass();if(skipSceneRender===false){const opaqueObjects=currentRenderList.opaque;const transmissiveObjects=currentRenderList.transmissive;currentRenderState.setupLights();if(camera.isArrayCamera){const cameras=camera.cameras;if(transmissiveObjects.length>0){for(let i=0,l=cameras.length;i<l;i++){const camera2=cameras[i];renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera2)}}if(_renderBackground)background.render(scene);for(let i=0,l=cameras.length;i<l;i++){const camera2=cameras[i];renderScene(currentRenderList,scene,camera2,camera2.viewport)}}else{if(transmissiveObjects.length>0)renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera);if(_renderBackground)background.render(scene);renderScene(currentRenderList,scene,camera)}}if(_currentRenderTarget!==null&&_currentActiveMipmapLevel===0){textures.updateMultisampleRenderTarget(_currentRenderTarget);textures.updateRenderTargetMipmap(_currentRenderTarget)}if(useOutput){output.end(_this)}if(scene.isScene===true)scene.onAfterRender(_this,scene,camera);bindingStates.resetDefaultState();_currentMaterialId=-1;_currentCamera=null;renderStateStack.pop();if(renderStateStack.length>0){currentRenderState=renderStateStack[renderStateStack.length-1];if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,currentRenderState.state.camera)}else{currentRenderState=null}renderListStack.pop();if(renderListStack.length>0){currentRenderList=renderListStack[renderListStack.length-1]}else{currentRenderList=null}};function projectObject(object,camera,groupOrder,sortObjects){if(object.visible===false)return;const visible=object.layers.test(camera.layers);if(visible){if(object.isGroup){groupOrder=object.renderOrder}else if(object.isLOD){if(object.autoUpdate===true)object.update(camera)}else if(object.isLight){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}else if(object.isSprite){if(!object.frustumCulled||_frustum.intersectsSprite(object)){if(sortObjects){_vector4.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix)}const geometry=objects.update(object);const material=object.material;if(material.visible){currentRenderList.push(object,geometry,material,groupOrder,_vector4.z,null)}}}else if(object.isMesh||object.isLine||object.isPoints){if(!object.frustumCulled||_frustum.intersectsObject(object)){const geometry=objects.update(object);const material=object.material;if(sortObjects){if(object.boundingSphere!==undefined){if(object.boundingSphere===null)object.computeBoundingSphere();_vector4.copy(object.boundingSphere.center)}else{if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_vector4.copy(geometry.boundingSphere.center)}_vector4.applyMatrix4(object.matrixWorld).applyMatrix4(_projScreenMatrix)}if(Array.isArray(material)){const groups=geometry.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];if(groupMaterial&&groupMaterial.visible){currentRenderList.push(object,geometry,groupMaterial,groupOrder,_vector4.z,group)}}}else if(material.visible){currentRenderList.push(object,geometry,material,groupOrder,_vector4.z,null)}}}}const children=object.children;for(let i=0,l=children.length;i<l;i++){projectObject(children[i],camera,groupOrder,sortObjects)}}function renderScene(currentRenderList,scene,camera,viewport){const{opaque:opaqueObjects,transmissive:transmissiveObjects,transparent:transparentObjects}=currentRenderList;currentRenderState.setupLightsView(camera);if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,camera);if(viewport)state.viewport(_currentViewport.copy(viewport));if(opaqueObjects.length>0)renderObjects(opaqueObjects,scene,camera);if(transmissiveObjects.length>0)renderObjects(transmissiveObjects,scene,camera);if(transparentObjects.length>0)renderObjects(transparentObjects,scene,camera);state.buffers.depth.setTest(true);state.buffers.depth.setMask(true);state.buffers.color.setMask(true);state.setPolygonOffset(false)}function renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera){const overrideMaterial=scene.isScene===true?scene.overrideMaterial:null;if(overrideMaterial!==null){return}if(currentRenderState.state.transmissionRenderTarget[camera.id]===undefined){const hasHalfFloatSupport=extensions.has("EXT_color_buffer_half_float")||extensions.has("EXT_color_buffer_float");currentRenderState.state.transmissionRenderTarget[camera.id]=new WebGLRenderTarget(1,1,{generateMipmaps:true,type:hasHalfFloatSupport?HalfFloatType:UnsignedByteType,minFilter:LinearMipmapLinearFilter,samples:capabilities.samples,stencilBuffer:stencil,resolveDepthBuffer:false,resolveStencilBuffer:false,colorSpace:ColorManagement.workingColorSpace})}const transmissionRenderTarget=currentRenderState.state.transmissionRenderTarget[camera.id];const activeViewport=camera.viewport||_currentViewport;transmissionRenderTarget.setSize(activeViewport.z*_this.transmissionResolutionScale,activeViewport.w*_this.transmissionResolutionScale);const currentRenderTarget=_this.getRenderTarget();const currentActiveCubeFace=_this.getActiveCubeFace();const currentActiveMipmapLevel=_this.getActiveMipmapLevel();_this.setRenderTarget(transmissionRenderTarget);_this.getClearColor(_currentClearColor);_currentClearAlpha=_this.getClearAlpha();if(_currentClearAlpha<1)_this.setClearColor(16777215,0.5);_this.clear();if(_renderBackground)background.render(scene);const currentToneMapping=_this.toneMapping;_this.toneMapping=NoToneMapping;const currentCameraViewport=camera.viewport;if(camera.viewport!==undefined)camera.viewport=undefined;currentRenderState.setupLightsView(camera);if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,camera);renderObjects(opaqueObjects,scene,camera);textures.updateMultisampleRenderTarget(transmissionRenderTarget);textures.updateRenderTargetMipmap(transmissionRenderTarget);if(extensions.has("WEBGL_multisampled_render_to_texture")===false){let renderTargetNeedsUpdate=false;for(let i=0,l=transmissiveObjects.length;i<l;i++){const renderItem=transmissiveObjects[i];const{object,geometry,material,group}=renderItem;if(material.side===DoubleSide&&object.layers.test(camera.layers)){const currentSide=material.side;material.side=BackSide;material.needsUpdate=true;renderObject(object,scene,camera,geometry,material,group);material.side=currentSide;material.needsUpdate=true;renderTargetNeedsUpdate=true}}if(renderTargetNeedsUpdate===true){textures.updateMultisampleRenderTarget(transmissionRenderTarget);textures.updateRenderTargetMipmap(transmissionRenderTarget)}}_this.setRenderTarget(currentRenderTarget,currentActiveCubeFace,currentActiveMipmapLevel);_this.setClearColor(_currentClearColor,_currentClearAlpha);if(currentCameraViewport!==undefined)camera.viewport=currentCameraViewport;_this.toneMapping=currentToneMapping}function renderObjects(renderList,scene,camera){const overrideMaterial=scene.isScene===true?scene.overrideMaterial:null;for(let i=0,l=renderList.length;i<l;i++){const renderItem=renderList[i];const{object,geometry,group}=renderItem;let material=renderItem.material;if(material.allowOverride===true&&overrideMaterial!==null){material=overrideMaterial}if(object.layers.test(camera.layers)){renderObject(object,scene,camera,geometry,material,group)}}}function renderObject(object,scene,camera,geometry,material,group){object.onBeforeRender(_this,scene,camera,geometry,material,group);object.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse,object.matrixWorld);object.normalMatrix.getNormalMatrix(object.modelViewMatrix);material.onBeforeRender(_this,scene,camera,geometry,object,group);if(material.transparent===true&&material.side===DoubleSide&&material.forceSinglePass===false){material.side=BackSide;material.needsUpdate=true;_this.renderBufferDirect(camera,scene,geometry,material,object,group);material.side=FrontSide;material.needsUpdate=true;_this.renderBufferDirect(camera,scene,geometry,material,object,group);material.side=DoubleSide}else{_this.renderBufferDirect(camera,scene,geometry,material,object,group)}object.onAfterRender(_this,scene,camera,geometry,material,group)}function getProgram(material,scene,object){if(scene.isScene!==true)scene=_emptyScene;const materialProperties=properties.get(material);const lights=currentRenderState.state.lights;const shadowsArray=currentRenderState.state.shadowsArray;const lightsStateVersion=lights.state.version;const parameters=programCache.getParameters(material,lights.state,shadowsArray,scene,object);const programCacheKey=programCache.getProgramCacheKey(parameters);let programs=materialProperties.programs;materialProperties.environment=material.isMeshStandardMaterial?scene.environment:null;materialProperties.fog=scene.fog;materialProperties.envMap=(material.isMeshStandardMaterial?cubeuvmaps:cubemaps).get(material.envMap||materialProperties.environment);materialProperties.envMapRotation=materialProperties.environment!==null&&material.envMap===null?scene.environmentRotation:material.envMapRotation;if(programs===undefined){material.addEventListener("dispose",onMaterialDispose);programs=new Map;materialProperties.programs=programs}let program=programs.get(programCacheKey);if(program!==undefined){if(materialProperties.currentProgram===program&&materialProperties.lightsStateVersion===lightsStateVersion){updateCommonMaterialProperties(material,parameters);return program}}else{parameters.uniforms=programCache.getUniforms(material);material.onBeforeCompile(parameters,_this);program=programCache.acquireProgram(parameters,programCacheKey);programs.set(programCacheKey,program);materialProperties.uniforms=parameters.uniforms}const uniforms=materialProperties.uniforms;if(!material.isShaderMaterial&&!material.isRawShaderMaterial||material.clipping===true){uniforms.clippingPlanes=clipping.uniform}updateCommonMaterialProperties(material,parameters);materialProperties.needsLights=materialNeedsLights(material);materialProperties.lightsStateVersion=lightsStateVersion;if(materialProperties.needsLights){uniforms.ambientLightColor.value=lights.state.ambient;uniforms.lightProbe.value=lights.state.probe;uniforms.directionalLights.value=lights.state.directional;uniforms.directionalLightShadows.value=lights.state.directionalShadow;uniforms.spotLights.value=lights.state.spot;uniforms.spotLightShadows.value=lights.state.spotShadow;uniforms.rectAreaLights.value=lights.state.rectArea;uniforms.ltc_1.value=lights.state.rectAreaLTC1;uniforms.ltc_2.value=lights.state.rectAreaLTC2;uniforms.pointLights.value=lights.state.point;uniforms.pointLightShadows.value=lights.state.pointShadow;uniforms.hemisphereLights.value=lights.state.hemi;uniforms.directionalShadowMap.value=lights.state.directionalShadowMap;uniforms.directionalShadowMatrix.value=lights.state.directionalShadowMatrix;uniforms.spotShadowMap.value=lights.state.spotShadowMap;uniforms.spotLightMatrix.value=lights.state.spotLightMatrix;uniforms.spotLightMap.value=lights.state.spotLightMap;uniforms.pointShadowMap.value=lights.state.pointShadowMap;uniforms.pointShadowMatrix.value=lights.state.pointShadowMatrix}materialProperties.currentProgram=program;materialProperties.uniformsList=null;return program}function getUniformList(materialProperties){if(materialProperties.uniformsList===null){const progUniforms=materialProperties.currentProgram.getUniforms();materialProperties.uniformsList=WebGLUniforms.seqWithValue(progUniforms.seq,materialProperties.uniforms)}return materialProperties.uniformsList}function updateCommonMaterialProperties(material,parameters){const materialProperties=properties.get(material);materialProperties.outputColorSpace=parameters.outputColorSpace;materialProperties.batching=parameters.batching;materialProperties.batchingColor=parameters.batchingColor;materialProperties.instancing=parameters.instancing;materialProperties.instancingColor=parameters.instancingColor;materialProperties.instancingMorph=parameters.instancingMorph;materialProperties.skinning=parameters.skinning;materialProperties.morphTargets=parameters.morphTargets;materialProperties.morphNormals=parameters.morphNormals;materialProperties.morphColors=parameters.morphColors;materialProperties.morphTargetsCount=parameters.morphTargetsCount;materialProperties.numClippingPlanes=parameters.numClippingPlanes;materialProperties.numIntersection=parameters.numClipIntersection;materialProperties.vertexAlphas=parameters.vertexAlphas;materialProperties.vertexTangents=parameters.vertexTangents;materialProperties.toneMapping=parameters.toneMapping}function setProgram(camera,scene,geometry,material,object){if(scene.isScene!==true)scene=_emptyScene;textures.resetTextureUnits();const fog=scene.fog;const environment=material.isMeshStandardMaterial?scene.environment:null;const colorSpace=_currentRenderTarget===null?_this.outputColorSpace:_currentRenderTarget.isXRRenderTarget===true?_currentRenderTarget.texture.colorSpace:LinearSRGBColorSpace;const envMap=(material.isMeshStandardMaterial?cubeuvmaps:cubemaps).get(material.envMap||environment);const vertexAlphas=material.vertexColors===true&&!!geometry.attributes.color&&geometry.attributes.color.itemSize===4;const vertexTangents=!!geometry.attributes.tangent&&(!!material.normalMap||material.anisotropy>0);const morphTargets=!!geometry.morphAttributes.position;const morphNormals=!!geometry.morphAttributes.normal;const morphColors=!!geometry.morphAttributes.color;let toneMapping=NoToneMapping;if(material.toneMapped){if(_currentRenderTarget===null||_currentRenderTarget.isXRRenderTarget===true){toneMapping=_this.toneMapping}}const morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color;const morphTargetsCount=morphAttribute!==undefined?morphAttribute.length:0;const materialProperties=properties.get(material);const lights=currentRenderState.state.lights;if(_clippingEnabled===true){if(_localClippingEnabled===true||camera!==_currentCamera){const useCache=camera===_currentCamera&&material.id===_currentMaterialId;clipping.setState(material,camera,useCache)}}let needsProgramChange=false;if(material.version===materialProperties.__version){if(materialProperties.needsLights&&materialProperties.lightsStateVersion!==lights.state.version){needsProgramChange=true}else if(materialProperties.outputColorSpace!==colorSpace){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batching===false){needsProgramChange=true}else if(!object.isBatchedMesh&&materialProperties.batching===true){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batchingColor===true&&object.colorTexture===null){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batchingColor===false&&object.colorTexture!==null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancing===false){needsProgramChange=true}else if(!object.isInstancedMesh&&materialProperties.instancing===true){needsProgramChange=true}else if(object.isSkinnedMesh&&materialProperties.skinning===false){needsProgramChange=true}else if(!object.isSkinnedMesh&&materialProperties.skinning===true){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingColor===true&&object.instanceColor===null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingColor===false&&object.instanceColor!==null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingMorph===true&&object.morphTexture===null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingMorph===false&&object.morphTexture!==null){needsProgramChange=true}else if(materialProperties.envMap!==envMap){needsProgramChange=true}else if(material.fog===true&&materialProperties.fog!==fog){needsProgramChange=true}else if(materialProperties.numClippingPlanes!==undefined&&(materialProperties.numClippingPlanes!==clipping.numPlanes||materialProperties.numIntersection!==clipping.numIntersection)){needsProgramChange=true}else if(materialProperties.vertexAlphas!==vertexAlphas){needsProgramChange=true}else if(materialProperties.vertexTangents!==vertexTangents){needsProgramChange=true}else if(materialProperties.morphTargets!==morphTargets){needsProgramChange=true}else if(materialProperties.morphNormals!==morphNormals){needsProgramChange=true}else if(materialProperties.morphColors!==morphColors){needsProgramChange=true}else if(materialProperties.toneMapping!==toneMapping){needsProgramChange=true}else if(materialProperties.morphTargetsCount!==morphTargetsCount){needsProgramChange=true}}else{needsProgramChange=true;materialProperties.__version=material.version}let program=materialProperties.currentProgram;if(needsProgramChange===true){program=getProgram(material,scene,object)}let refreshProgram=false;let refreshMaterial=false;let refreshLights=false;const p_uniforms=program.getUniforms(),m_uniforms=materialProperties.uniforms;if(state.useProgram(program.program)){refreshProgram=true;refreshMaterial=true;refreshLights=true}if(material.id!==_currentMaterialId){_currentMaterialId=material.id;refreshMaterial=true}if(refreshProgram||_currentCamera!==camera){const reversedDepthBuffer=state.buffers.depth.getReversed();if(reversedDepthBuffer&&camera.reversedDepth!==true){camera._reversedDepth=true;camera.updateProjectionMatrix()}p_uniforms.setValue(_gl,"projectionMatrix",camera.projectionMatrix);p_uniforms.setValue(_gl,"viewMatrix",camera.matrixWorldInverse);const uCamPos=p_uniforms.map.cameraPosition;if(uCamPos!==undefined){uCamPos.setValue(_gl,_vector3.setFromMatrixPosition(camera.matrixWorld))}if(capabilities.logarithmicDepthBuffer){p_uniforms.setValue(_gl,"logDepthBufFC",2/(Math.log(camera.far+1)/Math.LN2))}if(material.isMeshPhongMaterial||material.isMeshToonMaterial||material.isMeshLambertMaterial||material.isMeshBasicMaterial||material.isMeshStandardMaterial||material.isShaderMaterial){p_uniforms.setValue(_gl,"isOrthographic",camera.isOrthographicCamera===true)}if(_currentCamera!==camera){_currentCamera=camera;refreshMaterial=true;refreshLights=true}}if(materialProperties.needsLights){if(lights.state.directionalShadowMap.length>0){p_uniforms.setValue(_gl,"directionalShadowMap",lights.state.directionalShadowMap,textures)}if(lights.state.spotShadowMap.length>0){p_uniforms.setValue(_gl,"spotShadowMap",lights.state.spotShadowMap,textures)}if(lights.state.pointShadowMap.length>0){p_uniforms.setValue(_gl,"pointShadowMap",lights.state.pointShadowMap,textures)}}if(object.isSkinnedMesh){p_uniforms.setOptional(_gl,object,"bindMatrix");p_uniforms.setOptional(_gl,object,"bindMatrixInverse");const skeleton=object.skeleton;if(skeleton){if(skeleton.boneTexture===null)skeleton.computeBoneTexture();p_uniforms.setValue(_gl,"boneTexture",skeleton.boneTexture,textures)}}if(object.isBatchedMesh){p_uniforms.setOptional(_gl,object,"batchingTexture");p_uniforms.setValue(_gl,"batchingTexture",object._matricesTexture,textures);p_uniforms.setOptional(_gl,object,"batchingIdTexture");p_uniforms.setValue(_gl,"batchingIdTexture",object._indirectTexture,textures);p_uniforms.setOptional(_gl,object,"batchingColorTexture");if(object._colorsTexture!==null){p_uniforms.setValue(_gl,"batchingColorTexture",object._colorsTexture,textures)}}const morphAttributes=geometry.morphAttributes;if(morphAttributes.position!==undefined||morphAttributes.normal!==undefined||morphAttributes.color!==undefined){morphtargets.update(object,geometry,program)}if(refreshMaterial||materialProperties.receiveShadow!==object.receiveShadow){materialProperties.receiveShadow=object.receiveShadow;p_uniforms.setValue(_gl,"receiveShadow",object.receiveShadow)}if(material.isMeshGouraudMaterial&&material.envMap!==null){m_uniforms.envMap.value=envMap;m_uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===false?-1:1}if(material.isMeshStandardMaterial&&material.envMap===null&&scene.environment!==null){m_uniforms.envMapIntensity.value=scene.environmentIntensity}if(m_uniforms.dfgLUT!==undefined){m_uniforms.dfgLUT.value=getDFGLUT()}if(refreshMaterial){p_uniforms.setValue(_gl,"toneMappingExposure",_this.toneMappingExposure);if(materialProperties.needsLights){markUniformsLightsNeedsUpdate(m_uniforms,refreshLights)}if(fog&&material.fog===true){materials.refreshFogUniforms(m_uniforms,fog)}materials.refreshMaterialUniforms(m_uniforms,material,_pixelRatio,_height,currentRenderState.state.transmissionRenderTarget[camera.id]);WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures)}if(material.isShaderMaterial&&material.uniformsNeedUpdate===true){WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures);material.uniformsNeedUpdate=false}if(material.isSpriteMaterial){p_uniforms.setValue(_gl,"center",object.center)}p_uniforms.setValue(_gl,"modelViewMatrix",object.modelViewMatrix);p_uniforms.setValue(_gl,"normalMatrix",object.normalMatrix);p_uniforms.setValue(_gl,"modelMatrix",object.matrixWorld);if(material.isShaderMaterial||material.isRawShaderMaterial){const groups=material.uniformsGroups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];uniformsGroups.update(group,program);uniformsGroups.bind(group,program)}}return program}function markUniformsLightsNeedsUpdate(uniforms,value){uniforms.ambientLightColor.needsUpdate=value;uniforms.lightProbe.needsUpdate=value;uniforms.directionalLights.needsUpdate=value;uniforms.directionalLightShadows.needsUpdate=value;uniforms.pointLights.needsUpdate=value;uniforms.pointLightShadows.needsUpdate=value;uniforms.spotLights.needsUpdate=value;uniforms.spotLightShadows.needsUpdate=value;uniforms.rectAreaLights.needsUpdate=value;uniforms.hemisphereLights.needsUpdate=value}function materialNeedsLights(material){return material.isMeshLambertMaterial||material.isMeshToonMaterial||material.isMeshPhongMaterial||material.isMeshStandardMaterial||material.isShadowMaterial||material.isShaderMaterial&&material.lights===true}this.getActiveCubeFace=function(){return _currentActiveCubeFace};this.getActiveMipmapLevel=function(){return _currentActiveMipmapLevel};this.getRenderTarget=function(){return _currentRenderTarget};this.setRenderTargetTextures=function(renderTarget,colorTexture,depthTexture){const renderTargetProperties=properties.get(renderTarget);renderTargetProperties.__autoAllocateDepthBuffer=renderTarget.resolveDepthBuffer===false;if(renderTargetProperties.__autoAllocateDepthBuffer===false){renderTargetProperties.__useRenderToTexture=false}properties.get(renderTarget.texture).__webglTexture=colorTexture;properties.get(renderTarget.depthTexture).__webglTexture=renderTargetProperties.__autoAllocateDepthBuffer?undefined:depthTexture;renderTargetProperties.__hasExternalTextures=true};this.setRenderTargetFramebuffer=function(renderTarget,defaultFramebuffer){const renderTargetProperties=properties.get(renderTarget);renderTargetProperties.__webglFramebuffer=defaultFramebuffer;renderTargetProperties.__useDefaultFramebuffer=defaultFramebuffer===undefined};const _scratchFrameBuffer=_gl.createFramebuffer();this.setRenderTarget=function(renderTarget,activeCubeFace=0,activeMipmapLevel=0){_currentRenderTarget=renderTarget;_currentActiveCubeFace=activeCubeFace;_currentActiveMipmapLevel=activeMipmapLevel;let framebuffer=null;let isCube=false;let isRenderTarget3D=false;if(renderTarget){const renderTargetProperties=properties.get(renderTarget);if(renderTargetProperties.__useDefaultFramebuffer!==undefined){state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer);_currentViewport.copy(renderTarget.viewport);_currentScissor.copy(renderTarget.scissor);_currentScissorTest=renderTarget.scissorTest;state.viewport(_currentViewport);state.scissor(_currentScissor);state.setScissorTest(_currentScissorTest);_currentMaterialId=-1;return}else if(renderTargetProperties.__webglFramebuffer===undefined){textures.setupRenderTarget(renderTarget)}else if(renderTargetProperties.__hasExternalTextures){textures.rebindTextures(renderTarget,properties.get(renderTarget.texture).__webglTexture,properties.get(renderTarget.depthTexture).__webglTexture)}else if(renderTarget.depthBuffer){const depthTexture=renderTarget.depthTexture;if(renderTargetProperties.__boundDepthTexture!==depthTexture){if(depthTexture!==null&&properties.has(depthTexture)&&(renderTarget.width!==depthTexture.image.width||renderTarget.height!==depthTexture.image.height)){throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.")}textures.setupDepthRenderbuffer(renderTarget)}}const texture=renderTarget.texture;if(texture.isData3DTexture||texture.isDataArrayTexture||texture.isCompressedArrayTexture){isRenderTarget3D=true}const __webglFramebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget){if(Array.isArray(__webglFramebuffer[activeCubeFace])){framebuffer=__webglFramebuffer[activeCubeFace][activeMipmapLevel]}else{framebuffer=__webglFramebuffer[activeCubeFace]}isCube=true}else if(renderTarget.samples>0&&textures.useMultisampledRTT(renderTarget)===false){framebuffer=properties.get(renderTarget).__webglMultisampledFramebuffer}else{if(Array.isArray(__webglFramebuffer)){framebuffer=__webglFramebuffer[activeMipmapLevel]}else{framebuffer=__webglFramebuffer}}_currentViewport.copy(renderTarget.viewport);_currentScissor.copy(renderTarget.scissor);_currentScissorTest=renderTarget.scissorTest}else{_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor();_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor();_currentScissorTest=_scissorTest}if(activeMipmapLevel!==0){framebuffer=_scratchFrameBuffer}const framebufferBound=state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(framebufferBound){state.drawBuffers(renderTarget,framebuffer)}state.viewport(_currentViewport);state.scissor(_currentScissor);state.setScissorTest(_currentScissorTest);if(isCube){const textureProperties=properties.get(renderTarget.texture);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+activeCubeFace,textureProperties.__webglTexture,activeMipmapLevel)}else if(isRenderTarget3D){const layer=activeCubeFace;for(let i=0;i<renderTarget.textures.length;i++){const textureProperties=properties.get(renderTarget.textures[i]);_gl.framebufferTextureLayer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0+i,textureProperties.__webglTexture,activeMipmapLevel,layer)}}else if(renderTarget!==null&&activeMipmapLevel!==0){const textureProperties=properties.get(renderTarget.texture);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,textureProperties.__webglTexture,activeMipmapLevel)}_currentMaterialId=-1};this.readRenderTargetPixels=function(renderTarget,x,y,width,height,buffer,activeCubeFaceIndex,textureIndex=0){if(!(renderTarget&&renderTarget.isWebGLRenderTarget)){error("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==undefined){framebuffer=framebuffer[activeCubeFaceIndex]}if(framebuffer){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);try{const texture=renderTarget.textures[textureIndex];const textureFormat=texture.format;const textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat)){error("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!capabilities.textureTypeReadable(textureType)){error("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}if(x>=0&&x<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height){if(renderTarget.textures.length>1)_gl.readBuffer(_gl.COLOR_ATTACHMENT0+textureIndex);_gl.readPixels(x,y,width,height,utils.convert(textureFormat),utils.convert(textureType),buffer)}}finally{const framebuffer=_currentRenderTarget!==null?properties.get(_currentRenderTarget).__webglFramebuffer:null;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer)}}};this.readRenderTargetPixelsAsync=async function(renderTarget,x,y,width,height,buffer,activeCubeFaceIndex,textureIndex=0){if(!(renderTarget&&renderTarget.isWebGLRenderTarget)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")}let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==undefined){framebuffer=framebuffer[activeCubeFaceIndex]}if(framebuffer){if(x>=0&&x<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);const texture=renderTarget.textures[textureIndex];const textureFormat=texture.format;const textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.")}if(!capabilities.textureTypeReadable(textureType)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.")}const glBuffer=_gl.createBuffer();_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer);_gl.bufferData(_gl.PIXEL_PACK_BUFFER,buffer.byteLength,_gl.STREAM_READ);if(renderTarget.textures.length>1)_gl.readBuffer(_gl.COLOR_ATTACHMENT0+textureIndex);_gl.readPixels(x,y,width,height,utils.convert(textureFormat),utils.convert(textureType),0);const currFramebuffer=_currentRenderTarget!==null?properties.get(_currentRenderTarget).__webglFramebuffer:null;state.bindFramebuffer(_gl.FRAMEBUFFER,currFramebuffer);const sync=_gl.fenceSync(_gl.SYNC_GPU_COMMANDS_COMPLETE,0);_gl.flush();await probeAsync(_gl,sync,4);_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer);_gl.getBufferSubData(_gl.PIXEL_PACK_BUFFER,0,buffer);_gl.deleteBuffer(glBuffer);_gl.deleteSync(sync);return buffer}else{throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}}};this.copyFramebufferToTexture=function(texture,position=null,level=0){const levelScale=Math.pow(2,-level);const width=Math.floor(texture.image.width*levelScale);const height=Math.floor(texture.image.height*levelScale);const x=position!==null?position.x:0;const y=position!==null?position.y:0;textures.setTexture2D(texture,0);_gl.copyTexSubImage2D(_gl.TEXTURE_2D,level,0,0,x,y,width,height);state.unbindTexture()};const _srcFramebuffer=_gl.createFramebuffer();const _dstFramebuffer=_gl.createFramebuffer();this.copyTextureToTexture=function(srcTexture,dstTexture,srcRegion=null,dstPosition=null,srcLevel=0,dstLevel=null){if(dstLevel===null){if(srcLevel!==0){warnOnce("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.");dstLevel=srcLevel;srcLevel=0}else{dstLevel=0}}let width,height,depth,minX,minY,minZ;let dstX,dstY,dstZ;const image=srcTexture.isCompressedTexture?srcTexture.mipmaps[dstLevel]:srcTexture.image;if(srcRegion!==null){width=srcRegion.max.x-srcRegion.min.x;height=srcRegion.max.y-srcRegion.min.y;depth=srcRegion.isBox3?srcRegion.max.z-srcRegion.min.z:1;minX=srcRegion.min.x;minY=srcRegion.min.y;minZ=srcRegion.isBox3?srcRegion.min.z:0}else{const levelScale=Math.pow(2,-srcLevel);width=Math.floor(image.width*levelScale);height=Math.floor(image.height*levelScale);if(srcTexture.isDataArrayTexture){depth=image.depth}else if(srcTexture.isData3DTexture){depth=Math.floor(image.depth*levelScale)}else{depth=1}minX=0;minY=0;minZ=0}if(dstPosition!==null){dstX=dstPosition.x;dstY=dstPosition.y;dstZ=dstPosition.z}else{dstX=0;dstY=0;dstZ=0}const glFormat=utils.convert(dstTexture.format);const glType=utils.convert(dstTexture.type);let glTarget;if(dstTexture.isData3DTexture){textures.setTexture3D(dstTexture,0);glTarget=_gl.TEXTURE_3D}else if(dstTexture.isDataArrayTexture||dstTexture.isCompressedArrayTexture){textures.setTexture2DArray(dstTexture,0);glTarget=_gl.TEXTURE_2D_ARRAY}else{textures.setTexture2D(dstTexture,0);glTarget=_gl.TEXTURE_2D}_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,dstTexture.flipY);_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dstTexture.premultiplyAlpha);_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,dstTexture.unpackAlignment);const currentUnpackRowLen=_gl.getParameter(_gl.UNPACK_ROW_LENGTH);const currentUnpackImageHeight=_gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT);const currentUnpackSkipPixels=_gl.getParameter(_gl.UNPACK_SKIP_PIXELS);const currentUnpackSkipRows=_gl.getParameter(_gl.UNPACK_SKIP_ROWS);const currentUnpackSkipImages=_gl.getParameter(_gl.UNPACK_SKIP_IMAGES);_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,image.width);_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,image.height);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,minX);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,minY);_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,minZ);const isSrc3D=srcTexture.isDataArrayTexture||srcTexture.isData3DTexture;const isDst3D=dstTexture.isDataArrayTexture||dstTexture.isData3DTexture;if(srcTexture.isDepthTexture){const srcTextureProperties=properties.get(srcTexture);const dstTextureProperties=properties.get(dstTexture);const srcRenderTargetProperties=properties.get(srcTextureProperties.__renderTarget);const dstRenderTargetProperties=properties.get(dstTextureProperties.__renderTarget);state.bindFramebuffer(_gl.READ_FRAMEBUFFER,srcRenderTargetProperties.__webglFramebuffer);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,dstRenderTargetProperties.__webglFramebuffer);for(let i=0;i<depth;i++){if(isSrc3D){_gl.framebufferTextureLayer(_gl.READ_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,properties.get(srcTexture).__webglTexture,srcLevel,minZ+i);_gl.framebufferTextureLayer(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,properties.get(dstTexture).__webglTexture,dstLevel,dstZ+i)}_gl.blitFramebuffer(minX,minY,width,height,dstX,dstY,width,height,_gl.DEPTH_BUFFER_BIT,_gl.NEAREST)}state.bindFramebuffer(_gl.READ_FRAMEBUFFER,null);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,null)}else if(srcLevel!==0||srcTexture.isRenderTargetTexture||properties.has(srcTexture)){const srcTextureProperties=properties.get(srcTexture);const dstTextureProperties=properties.get(dstTexture);state.bindFramebuffer(_gl.READ_FRAMEBUFFER,_srcFramebuffer);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,_dstFramebuffer);for(let i=0;i<depth;i++){if(isSrc3D){_gl.framebufferTextureLayer(_gl.READ_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,srcTextureProperties.__webglTexture,srcLevel,minZ+i)}else{_gl.framebufferTexture2D(_gl.READ_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,srcTextureProperties.__webglTexture,srcLevel)}if(isDst3D){_gl.framebufferTextureLayer(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,dstTextureProperties.__webglTexture,dstLevel,dstZ+i)}else{_gl.framebufferTexture2D(_gl.DRAW_FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,dstTextureProperties.__webglTexture,dstLevel)}if(srcLevel!==0){_gl.blitFramebuffer(minX,minY,width,height,dstX,dstY,width,height,_gl.COLOR_BUFFER_BIT,_gl.NEAREST)}else if(isDst3D){_gl.copyTexSubImage3D(glTarget,dstLevel,dstX,dstY,dstZ+i,minX,minY,width,height)}else{_gl.copyTexSubImage2D(glTarget,dstLevel,dstX,dstY,minX,minY,width,height)}}state.bindFramebuffer(_gl.READ_FRAMEBUFFER,null);state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,null)}else{if(isDst3D){if(srcTexture.isDataTexture||srcTexture.isData3DTexture){_gl.texSubImage3D(glTarget,dstLevel,dstX,dstY,dstZ,width,height,depth,glFormat,glType,image.data)}else if(dstTexture.isCompressedArrayTexture){_gl.compressedTexSubImage3D(glTarget,dstLevel,dstX,dstY,dstZ,width,height,depth,glFormat,image.data)}else{_gl.texSubImage3D(glTarget,dstLevel,dstX,dstY,dstZ,width,height,depth,glFormat,glType,image)}}else{if(srcTexture.isDataTexture){_gl.texSubImage2D(_gl.TEXTURE_2D,dstLevel,dstX,dstY,width,height,glFormat,glType,image.data)}else if(srcTexture.isCompressedTexture){_gl.compressedTexSubImage2D(_gl.TEXTURE_2D,dstLevel,dstX,dstY,image.width,image.height,glFormat,image.data)}else{_gl.texSubImage2D(_gl.TEXTURE_2D,dstLevel,dstX,dstY,width,height,glFormat,glType,image)}}}_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,currentUnpackRowLen);_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,currentUnpackImageHeight);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,currentUnpackSkipPixels);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,currentUnpackSkipRows);_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,currentUnpackSkipImages);if(dstLevel===0&&dstTexture.generateMipmaps){_gl.generateMipmap(glTarget)}state.unbindTexture()};this.initRenderTarget=function(target){if(properties.get(target).__webglFramebuffer===undefined){textures.setupRenderTarget(target)}};this.initTexture=function(texture){if(texture.isCubeTexture){textures.setTextureCube(texture,0)}else if(texture.isData3DTexture){textures.setTexture3D(texture,0)}else if(texture.isDataArrayTexture||texture.isCompressedArrayTexture){textures.setTexture2DArray(texture,0)}else{textures.setTexture2D(texture,0)}state.unbindTexture()};this.resetState=function(){_currentActiveCubeFace=0;_currentActiveMipmapLevel=0;_currentRenderTarget=null;state.reset();bindingStates.reset()};if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}get coordinateSystem(){return WebGLCoordinateSystem}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(colorSpace){this._outputColorSpace=colorSpace;const gl=this.getContext();gl.drawingBufferColorSpace=ColorManagement._getDrawingBufferColorSpace(colorSpace);gl.unpackColorSpace=ColorManagement._getUnpackColorSpace()}}exports.ACESFilmicToneMapping=ACESFilmicToneMapping;exports.AddEquation=AddEquation;exports.AddOperation=AddOperation;exports.AdditiveAnimationBlendMode=AdditiveAnimationBlendMode;exports.AdditiveBlending=AdditiveBlending;exports.AgXToneMapping=AgXToneMapping;exports.AlphaFormat=AlphaFormat;exports.AlwaysCompare=AlwaysCompare;exports.AlwaysDepth=AlwaysDepth;exports.AlwaysStencilFunc=AlwaysStencilFunc;exports.AmbientLight=AmbientLight;exports.AnimationAction=AnimationAction;exports.AnimationClip=AnimationClip;exports.AnimationLoader=AnimationLoader;exports.AnimationMixer=AnimationMixer;exports.AnimationObjectGroup=AnimationObjectGroup;exports.AnimationUtils=AnimationUtils;exports.ArcCurve=ArcCurve;exports.ArrayCamera=ArrayCamera;exports.ArrowHelper=ArrowHelper;exports.AttachedBindMode=AttachedBindMode;exports.Audio=Audio;exports.AudioAnalyser=AudioAnalyser;exports.AudioContext=AudioContext;exports.AudioListener=AudioListener;exports.AudioLoader=AudioLoader;exports.AxesHelper=AxesHelper;exports.BackSide=BackSide;exports.BasicDepthPacking=BasicDepthPacking;exports.BasicShadowMap=BasicShadowMap;exports.BatchedMesh=BatchedMesh;exports.Bone=Bone;exports.BooleanKeyframeTrack=BooleanKeyframeTrack;exports.Box2=Box2;exports.Box3=Box3;exports.Box3Helper=Box3Helper;exports.BoxGeometry=BoxGeometry;exports.BoxHelper=BoxHelper;exports.BufferAttribute=BufferAttribute;exports.BufferGeometry=BufferGeometry;exports.BufferGeometryLoader=BufferGeometryLoader;exports.ByteType=ByteType;exports.Cache=Cache;exports.Camera=Camera;exports.CameraHelper=CameraHelper;exports.CanvasTexture=CanvasTexture;exports.CapsuleGeometry=CapsuleGeometry;exports.CatmullRomCurve3=CatmullRomCurve3;exports.CineonToneMapping=CineonToneMapping;exports.CircleGeometry=CircleGeometry;exports.ClampToEdgeWrapping=ClampToEdgeWrapping;exports.Clock=Clock;exports.Color=Color;exports.ColorKeyframeTrack=ColorKeyframeTrack;exports.ColorManagement=ColorManagement;exports.CompressedArrayTexture=CompressedArrayTexture;exports.CompressedCubeTexture=CompressedCubeTexture;exports.CompressedTexture=CompressedTexture;exports.CompressedTextureLoader=CompressedTextureLoader;exports.ConeGeometry=ConeGeometry;exports.ConstantAlphaFactor=ConstantAlphaFactor;exports.ConstantColorFactor=ConstantColorFactor;exports.Controls=Controls;exports.CubeCamera=CubeCamera;exports.CubeDepthTexture=CubeDepthTexture;exports.CubeReflectionMapping=CubeReflectionMapping;exports.CubeRefractionMapping=CubeRefractionMapping;exports.CubeTexture=CubeTexture;exports.CubeTextureLoader=CubeTextureLoader;exports.CubeUVReflectionMapping=CubeUVReflectionMapping;exports.CubicBezierCurve=CubicBezierCurve;exports.CubicBezierCurve3=CubicBezierCurve3;exports.CubicInterpolant=CubicInterpolant;exports.CullFaceBack=CullFaceBack;exports.CullFaceFront=CullFaceFront;exports.CullFaceFrontBack=CullFaceFrontBack;exports.CullFaceNone=CullFaceNone;exports.Curve=Curve;exports.CurvePath=CurvePath;exports.CustomBlending=CustomBlending;exports.CustomToneMapping=CustomToneMapping;exports.CylinderGeometry=CylinderGeometry;exports.Cylindrical=Cylindrical;exports.Data3DTexture=Data3DTexture;exports.DataArrayTexture=DataArrayTexture;exports.DataTexture=DataTexture;exports.DataTextureLoader=DataTextureLoader;exports.DataUtils=DataUtils;exports.DecrementStencilOp=DecrementStencilOp;exports.DecrementWrapStencilOp=DecrementWrapStencilOp;exports.DefaultLoadingManager=DefaultLoadingManager;exports.DepthFormat=DepthFormat;exports.DepthStencilFormat=DepthStencilFormat;exports.DepthTexture=DepthTexture;exports.DetachedBindMode=DetachedBindMode;exports.DirectionalLight=DirectionalLight;exports.DirectionalLightHelper=DirectionalLightHelper;exports.DiscreteInterpolant=DiscreteInterpolant;exports.DodecahedronGeometry=DodecahedronGeometry;exports.DoubleSide=DoubleSide;exports.DstAlphaFactor=DstAlphaFactor;exports.DstColorFactor=DstColorFactor;exports.DynamicCopyUsage=DynamicCopyUsage;exports.DynamicDrawUsage=DynamicDrawUsage;exports.DynamicReadUsage=DynamicReadUsage;exports.EdgesGeometry=EdgesGeometry;exports.EllipseCurve=EllipseCurve;exports.EqualCompare=EqualCompare;exports.EqualDepth=EqualDepth;exports.EqualStencilFunc=EqualStencilFunc;exports.EquirectangularReflectionMapping=EquirectangularReflectionMapping;exports.EquirectangularRefractionMapping=EquirectangularRefractionMapping;exports.Euler=Euler;exports.EventDispatcher=EventDispatcher;exports.ExternalTexture=ExternalTexture;exports.ExtrudeGeometry=ExtrudeGeometry;exports.FileLoader=FileLoader;exports.Float16BufferAttribute=Float16BufferAttribute;exports.Float32BufferAttribute=Float32BufferAttribute;exports.FloatType=FloatType;exports.Fog=Fog;exports.FogExp2=FogExp2;exports.FramebufferTexture=FramebufferTexture;exports.FrontSide=FrontSide;exports.Frustum=Frustum;exports.FrustumArray=FrustumArray;exports.GLBufferAttribute=GLBufferAttribute;exports.GLSL1=GLSL1;exports.GLSL3=GLSL3;exports.GreaterCompare=GreaterCompare;exports.GreaterDepth=GreaterDepth;exports.GreaterEqualCompare=GreaterEqualCompare;exports.GreaterEqualDepth=GreaterEqualDepth;exports.GreaterEqualStencilFunc=GreaterEqualStencilFunc;exports.GreaterStencilFunc=GreaterStencilFunc;exports.GridHelper=GridHelper;exports.Group=Group;exports.HalfFloatType=HalfFloatType;exports.HemisphereLight=HemisphereLight;exports.HemisphereLightHelper=HemisphereLightHelper;exports.IcosahedronGeometry=IcosahedronGeometry;exports.ImageBitmapLoader=ImageBitmapLoader;exports.ImageLoader=ImageLoader;exports.ImageUtils=ImageUtils;exports.IncrementStencilOp=IncrementStencilOp;exports.IncrementWrapStencilOp=IncrementWrapStencilOp;exports.InstancedBufferAttribute=InstancedBufferAttribute;exports.InstancedBufferGeometry=InstancedBufferGeometry;exports.InstancedInterleavedBuffer=InstancedInterleavedBuffer;exports.InstancedMesh=InstancedMesh;exports.Int16BufferAttribute=Int16BufferAttribute;exports.Int32BufferAttribute=Int32BufferAttribute;exports.Int8BufferAttribute=Int8BufferAttribute;exports.IntType=IntType;exports.InterleavedBuffer=InterleavedBuffer;exports.InterleavedBufferAttribute=InterleavedBufferAttribute;exports.Interpolant=Interpolant;exports.InterpolateDiscrete=InterpolateDiscrete;exports.InterpolateLinear=InterpolateLinear;exports.InterpolateSmooth=InterpolateSmooth;exports.InterpolationSamplingMode=InterpolationSamplingMode;exports.InterpolationSamplingType=InterpolationSamplingType;exports.InvertStencilOp=InvertStencilOp;exports.KeepStencilOp=KeepStencilOp;exports.KeyframeTrack=KeyframeTrack;exports.LOD=LOD;exports.LatheGeometry=LatheGeometry;exports.Layers=Layers;exports.LessCompare=LessCompare;exports.LessDepth=LessDepth;exports.LessEqualCompare=LessEqualCompare;exports.LessEqualDepth=LessEqualDepth;exports.LessEqualStencilFunc=LessEqualStencilFunc;exports.LessStencilFunc=LessStencilFunc;exports.Light=Light;exports.LightProbe=LightProbe;exports.Line=Line;exports.Line3=Line3;exports.LineBasicMaterial=LineBasicMaterial;exports.LineCurve=LineCurve;exports.LineCurve3=LineCurve3;exports.LineDashedMaterial=LineDashedMaterial;exports.LineLoop=LineLoop;exports.LineSegments=LineSegments;exports.LinearFilter=LinearFilter;exports.LinearInterpolant=LinearInterpolant;exports.LinearMipMapLinearFilter=LinearMipMapLinearFilter;exports.LinearMipMapNearestFilter=LinearMipMapNearestFilter;exports.LinearMipmapLinearFilter=LinearMipmapLinearFilter;exports.LinearMipmapNearestFilter=LinearMipmapNearestFilter;exports.LinearSRGBColorSpace=LinearSRGBColorSpace;exports.LinearToneMapping=LinearToneMapping;exports.LinearTransfer=LinearTransfer;exports.Loader=Loader;exports.LoaderUtils=LoaderUtils;exports.LoadingManager=LoadingManager;exports.LoopOnce=LoopOnce;exports.LoopPingPong=LoopPingPong;exports.LoopRepeat=LoopRepeat;exports.MOUSE=MOUSE;exports.Material=Material;exports.MaterialLoader=MaterialLoader;exports.MathUtils=MathUtils;exports.Matrix2=Matrix2;exports.Matrix3=Matrix3;exports.Matrix4=Matrix4;exports.MaxEquation=MaxEquation;exports.Mesh=Mesh;exports.MeshBasicMaterial=MeshBasicMaterial;exports.MeshDepthMaterial=MeshDepthMaterial;exports.MeshDistanceMaterial=MeshDistanceMaterial;exports.MeshLambertMaterial=MeshLambertMaterial;exports.MeshMatcapMaterial=MeshMatcapMaterial;exports.MeshNormalMaterial=MeshNormalMaterial;exports.MeshPhongMaterial=MeshPhongMaterial;exports.MeshPhysicalMaterial=MeshPhysicalMaterial;exports.MeshStandardMaterial=MeshStandardMaterial;exports.MeshToonMaterial=MeshToonMaterial;exports.MinEquation=MinEquation;exports.MirroredRepeatWrapping=MirroredRepeatWrapping;exports.MixOperation=MixOperation;exports.MultiplyBlending=MultiplyBlending;exports.MultiplyOperation=MultiplyOperation;exports.NearestFilter=NearestFilter;exports.NearestMipMapLinearFilter=NearestMipMapLinearFilter;exports.NearestMipMapNearestFilter=NearestMipMapNearestFilter;exports.NearestMipmapLinearFilter=NearestMipmapLinearFilter;exports.NearestMipmapNearestFilter=NearestMipmapNearestFilter;exports.NeutralToneMapping=NeutralToneMapping;exports.NeverCompare=NeverCompare;exports.NeverDepth=NeverDepth;exports.NeverStencilFunc=NeverStencilFunc;exports.NoBlending=NoBlending;exports.NoColorSpace=NoColorSpace;exports.NoNormalPacking=NoNormalPacking;exports.NoToneMapping=NoToneMapping;exports.NormalAnimationBlendMode=NormalAnimationBlendMode;exports.NormalBlending=NormalBlending;exports.NormalGAPacking=NormalGAPacking;exports.NormalRGPacking=NormalRGPacking;exports.NotEqualCompare=NotEqualCompare;exports.NotEqualDepth=NotEqualDepth;exports.NotEqualStencilFunc=NotEqualStencilFunc;exports.NumberKeyframeTrack=NumberKeyframeTrack;exports.Object3D=Object3D;exports.ObjectLoader=ObjectLoader;exports.ObjectSpaceNormalMap=ObjectSpaceNormalMap;exports.OctahedronGeometry=OctahedronGeometry;exports.OneFactor=OneFactor;exports.OneMinusConstantAlphaFactor=OneMinusConstantAlphaFactor;exports.OneMinusConstantColorFactor=OneMinusConstantColorFactor;exports.OneMinusDstAlphaFactor=OneMinusDstAlphaFactor;exports.OneMinusDstColorFactor=OneMinusDstColorFactor;exports.OneMinusSrcAlphaFactor=OneMinusSrcAlphaFactor;exports.OneMinusSrcColorFactor=OneMinusSrcColorFactor;exports.OrthographicCamera=OrthographicCamera;exports.PCFShadowMap=PCFShadowMap;exports.PCFSoftShadowMap=PCFSoftShadowMap;exports.PMREMGenerator=PMREMGenerator;exports.Path=Path;exports.PerspectiveCamera=PerspectiveCamera;exports.Plane=Plane;exports.PlaneGeometry=PlaneGeometry;exports.PlaneHelper=PlaneHelper;exports.PointLight=PointLight;exports.PointLightHelper=PointLightHelper;exports.Points=Points;exports.PointsMaterial=PointsMaterial;exports.PolarGridHelper=PolarGridHelper;exports.PolyhedronGeometry=PolyhedronGeometry;exports.PositionalAudio=PositionalAudio;exports.PropertyBinding=PropertyBinding;exports.PropertyMixer=PropertyMixer;exports.QuadraticBezierCurve=QuadraticBezierCurve;exports.QuadraticBezierCurve3=QuadraticBezierCurve3;exports.Quaternion=Quaternion;exports.QuaternionKeyframeTrack=QuaternionKeyframeTrack;exports.QuaternionLinearInterpolant=QuaternionLinearInterpolant;exports.R11_EAC_Format=R11_EAC_Format;exports.RED_GREEN_RGTC2_Format=RED_GREEN_RGTC2_Format;exports.RED_RGTC1_Format=RED_RGTC1_Format;exports.REVISION=REVISION;exports.RG11_EAC_Format=RG11_EAC_Format;exports.RGBADepthPacking=RGBADepthPacking;exports.RGBAFormat=RGBAFormat;exports.RGBAIntegerFormat=RGBAIntegerFormat;exports.RGBA_ASTC_10x10_Format=RGBA_ASTC_10x10_Format;exports.RGBA_ASTC_10x5_Format=RGBA_ASTC_10x5_Format;exports.RGBA_ASTC_10x6_Format=RGBA_ASTC_10x6_Format;exports.RGBA_ASTC_10x8_Format=RGBA_ASTC_10x8_Format;exports.RGBA_ASTC_12x10_Format=RGBA_ASTC_12x10_Format;exports.RGBA_ASTC_12x12_Format=RGBA_ASTC_12x12_Format;exports.RGBA_ASTC_4x4_Format=RGBA_ASTC_4x4_Format;exports.RGBA_ASTC_5x4_Format=RGBA_ASTC_5x4_Format;exports.RGBA_ASTC_5x5_Format=RGBA_ASTC_5x5_Format;exports.RGBA_ASTC_6x5_Format=RGBA_ASTC_6x5_Format;exports.RGBA_ASTC_6x6_Format=RGBA_ASTC_6x6_Format;exports.RGBA_ASTC_8x5_Format=RGBA_ASTC_8x5_Format;exports.RGBA_ASTC_8x6_Format=RGBA_ASTC_8x6_Format;exports.RGBA_ASTC_8x8_Format=RGBA_ASTC_8x8_Format;exports.RGBA_BPTC_Format=RGBA_BPTC_Format;exports.RGBA_ETC2_EAC_Format=RGBA_ETC2_EAC_Format;exports.RGBA_PVRTC_2BPPV1_Format=RGBA_PVRTC_2BPPV1_Format;exports.RGBA_PVRTC_4BPPV1_Format=RGBA_PVRTC_4BPPV1_Format;exports.RGBA_S3TC_DXT1_Format=RGBA_S3TC_DXT1_Format;exports.RGBA_S3TC_DXT3_Format=RGBA_S3TC_DXT3_Format;exports.RGBA_S3TC_DXT5_Format=RGBA_S3TC_DXT5_Format;exports.RGBDepthPacking=RGBDepthPacking;exports.RGBFormat=RGBFormat;exports.RGBIntegerFormat=RGBIntegerFormat;exports.RGB_BPTC_SIGNED_Format=RGB_BPTC_SIGNED_Format;exports.RGB_BPTC_UNSIGNED_Format=RGB_BPTC_UNSIGNED_Format;exports.RGB_ETC1_Format=RGB_ETC1_Format;exports.RGB_ETC2_Format=RGB_ETC2_Format;exports.RGB_PVRTC_2BPPV1_Format=RGB_PVRTC_2BPPV1_Format;exports.RGB_PVRTC_4BPPV1_Format=RGB_PVRTC_4BPPV1_Format;exports.RGB_S3TC_DXT1_Format=RGB_S3TC_DXT1_Format;exports.RGDepthPacking=RGDepthPacking;exports.RGFormat=RGFormat;exports.RGIntegerFormat=RGIntegerFormat;exports.RawShaderMaterial=RawShaderMaterial;exports.Ray=Ray;exports.Raycaster=Raycaster;exports.RectAreaLight=RectAreaLight;exports.RedFormat=RedFormat;exports.RedIntegerFormat=RedIntegerFormat;exports.ReinhardToneMapping=ReinhardToneMapping;exports.RenderTarget=RenderTarget;exports.RenderTarget3D=RenderTarget3D;exports.RepeatWrapping=RepeatWrapping;exports.ReplaceStencilOp=ReplaceStencilOp;exports.ReverseSubtractEquation=ReverseSubtractEquation;exports.RingGeometry=RingGeometry;exports.SIGNED_R11_EAC_Format=SIGNED_R11_EAC_Format;exports.SIGNED_RED_GREEN_RGTC2_Format=SIGNED_RED_GREEN_RGTC2_Format;exports.SIGNED_RED_RGTC1_Format=SIGNED_RED_RGTC1_Format;exports.SIGNED_RG11_EAC_Format=SIGNED_RG11_EAC_Format;exports.SRGBColorSpace=SRGBColorSpace;exports.SRGBTransfer=SRGBTransfer;exports.Scene=Scene;exports.ShaderChunk=ShaderChunk;exports.ShaderLib=ShaderLib;exports.ShaderMaterial=ShaderMaterial;exports.ShadowMaterial=ShadowMaterial;exports.Shape=Shape;exports.ShapeGeometry=ShapeGeometry;exports.ShapePath=ShapePath;exports.ShapeUtils=ShapeUtils;exports.ShortType=ShortType;exports.Skeleton=Skeleton;exports.SkeletonHelper=SkeletonHelper;exports.SkinnedMesh=SkinnedMesh;exports.Source=Source;exports.Sphere=Sphere;exports.SphereGeometry=SphereGeometry;exports.Spherical=Spherical;exports.SphericalHarmonics3=SphericalHarmonics3;exports.SplineCurve=SplineCurve;exports.SpotLight=SpotLight;exports.SpotLightHelper=SpotLightHelper;exports.Sprite=Sprite;exports.SpriteMaterial=SpriteMaterial;exports.SrcAlphaFactor=SrcAlphaFactor;exports.SrcAlphaSaturateFactor=SrcAlphaSaturateFactor;exports.SrcColorFactor=SrcColorFactor;exports.StaticCopyUsage=StaticCopyUsage;exports.StaticDrawUsage=StaticDrawUsage;exports.StaticReadUsage=StaticReadUsage;exports.StereoCamera=StereoCamera;exports.StreamCopyUsage=StreamCopyUsage;exports.StreamDrawUsage=StreamDrawUsage;exports.StreamReadUsage=StreamReadUsage;exports.StringKeyframeTrack=StringKeyframeTrack;exports.SubtractEquation=SubtractEquation;exports.SubtractiveBlending=SubtractiveBlending;exports.TOUCH=TOUCH;exports.TangentSpaceNormalMap=TangentSpaceNormalMap;exports.TetrahedronGeometry=TetrahedronGeometry;exports.Texture=Texture;exports.TextureLoader=TextureLoader;exports.TextureUtils=TextureUtils;exports.Timer=Timer;exports.TimestampQuery=TimestampQuery;exports.TorusGeometry=TorusGeometry;exports.TorusKnotGeometry=TorusKnotGeometry;exports.Triangle=Triangle;exports.TriangleFanDrawMode=TriangleFanDrawMode;exports.TriangleStripDrawMode=TriangleStripDrawMode;exports.TrianglesDrawMode=TrianglesDrawMode;exports.TubeGeometry=TubeGeometry;exports.UVMapping=UVMapping;exports.Uint16BufferAttribute=Uint16BufferAttribute;exports.Uint32BufferAttribute=Uint32BufferAttribute;exports.Uint8BufferAttribute=Uint8BufferAttribute;exports.Uint8ClampedBufferAttribute=Uint8ClampedBufferAttribute;exports.Uniform=Uniform;exports.UniformsGroup=UniformsGroup;exports.UniformsLib=UniformsLib;exports.UniformsUtils=UniformsUtils;exports.UnsignedByteType=UnsignedByteType;exports.UnsignedInt101111Type=UnsignedInt101111Type;exports.UnsignedInt248Type=UnsignedInt248Type;exports.UnsignedInt5999Type=UnsignedInt5999Type;exports.UnsignedIntType=UnsignedIntType;exports.UnsignedShort4444Type=UnsignedShort4444Type;exports.UnsignedShort5551Type=UnsignedShort5551Type;exports.UnsignedShortType=UnsignedShortType;exports.VSMShadowMap=VSMShadowMap;exports.Vector2=Vector2;exports.Vector3=Vector3;exports.Vector4=Vector4;exports.VectorKeyframeTrack=VectorKeyframeTrack;exports.VideoFrameTexture=VideoFrameTexture;exports.VideoTexture=VideoTexture;exports.WebGL3DRenderTarget=WebGL3DRenderTarget;exports.WebGLArrayRenderTarget=WebGLArrayRenderTarget;exports.WebGLCoordinateSystem=WebGLCoordinateSystem;exports.WebGLCubeRenderTarget=WebGLCubeRenderTarget;exports.WebGLRenderTarget=WebGLRenderTarget;exports.WebGLRenderer=WebGLRenderer;exports.WebGLUtils=WebGLUtils;exports.WebGPUCoordinateSystem=WebGPUCoordinateSystem;exports.WebXRController=WebXRController;exports.WireframeGeometry=WireframeGeometry;exports.WrapAroundEnding=WrapAroundEnding;exports.ZeroCurvatureEnding=ZeroCurvatureEnding;exports.ZeroFactor=ZeroFactor;exports.ZeroSlopeEnding=ZeroSlopeEnding;exports.ZeroStencilOp=ZeroStencilOp;exports.createCanvasElement=createCanvasElement;exports.error=error;exports.getConsoleFunction=getConsoleFunction;exports.log=log;exports.setConsoleFunction=setConsoleFunction;exports.warn=warn;exports.warnOnce=warnOnce});(function(t,e){e(t.MeshBVHLib=t.MeshBVHLib||{},t.THREE=t.THREE||{})})(this,function(exports,three){const CENTER=0;const AVERAGE=1;const SAH=2;const NOT_INTERSECTED=0;const INTERSECTED=1;const CONTAINED=2;const TRIANGLE_INTERSECT_COST=1.25;const TRAVERSAL_COST=1;const BYTES_PER_NODE=6*4+4+4;const IS_LEAFNODE_FLAG=65535;const FLOAT32_EPSILON=Math.pow(2,-24);const SKIP_GENERATION=Symbol("SKIP_GENERATION");function getVertexCount(geo){return geo.index?geo.index.count:geo.attributes.position.count}function getTriCount(geo){return getVertexCount(geo)/3}function getIndexArray(vertexCount,BufferConstructor=ArrayBuffer){if(vertexCount>65535){return new Uint32Array(new BufferConstructor(4*vertexCount))}else{return new Uint16Array(new BufferConstructor(2*vertexCount))}}function ensureIndex(geo,options){if(!geo.index){const vertexCount=geo.attributes.position.count;const BufferConstructor=options.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;const index=getIndexArray(vertexCount,BufferConstructor);geo.setIndex(new three.BufferAttribute(index,1));for(let i=0;i<vertexCount;i++){index[i]=i}}}function getFullGeometryRange(geo){const triCount=getTriCount(geo);const drawRange=geo.drawRange;const start=drawRange.start/3;const end=(drawRange.start+drawRange.count)/3;const offset=Math.max(0,start);const count=Math.min(triCount,end)-offset;return[{offset:Math.floor(offset),count:Math.floor(count)}]}function getRootIndexRanges(geo){if(!geo.groups||!geo.groups.length){return getFullGeometryRange(geo)}const ranges=[];const rangeBoundaries=new Set;const drawRange=geo.drawRange;const drawRangeStart=drawRange.start/3;const drawRangeEnd=(drawRange.start+drawRange.count)/3;for(const group of geo.groups){const groupStart=group.start/3;const groupEnd=(group.start+group.count)/3;rangeBoundaries.add(Math.max(drawRangeStart,groupStart));rangeBoundaries.add(Math.min(drawRangeEnd,groupEnd))}const sortedBoundaries=Array.from(rangeBoundaries.values()).sort((a,b)=>a-b);for(let i=0;i<sortedBoundaries.length-1;i++){const start=sortedBoundaries[i];const end=sortedBoundaries[i+1];ranges.push({offset:Math.floor(start),count:Math.floor(end-start)})}return ranges}function hasGroupGaps(geometry){if(geometry.groups.length===0){return false}const vertexCount=getTriCount(geometry);const groups=getRootIndexRanges(geometry).sort((a,b)=>a.offset-b.offset);const finalGroup=groups[groups.length-1];finalGroup.count=Math.min(vertexCount-finalGroup.offset,finalGroup.count);let total=0;groups.forEach(({count})=>total+=count);return vertexCount!==total}function getBounds(triangleBounds,offset,count,target,centroidTarget){let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;let cminx=Infinity;let cminy=Infinity;let cminz=Infinity;let cmaxx=-Infinity;let cmaxy=-Infinity;let cmaxz=-Infinity;for(let i=offset*6,end=(offset+count)*6;i<end;i+=6){const cx=triangleBounds[i+0];const hx=triangleBounds[i+1];const lx=cx-hx;const rx=cx+hx;if(lx<minx)minx=lx;if(rx>maxx)maxx=rx;if(cx<cminx)cminx=cx;if(cx>cmaxx)cmaxx=cx;const cy=triangleBounds[i+2];const hy=triangleBounds[i+3];const ly=cy-hy;const ry=cy+hy;if(ly<miny)miny=ly;if(ry>maxy)maxy=ry;if(cy<cminy)cminy=cy;if(cy>cmaxy)cmaxy=cy;const cz=triangleBounds[i+4];const hz=triangleBounds[i+5];const lz=cz-hz;const rz=cz+hz;if(lz<minz)minz=lz;if(rz>maxz)maxz=rz;if(cz<cminz)cminz=cz;if(cz>cmaxz)cmaxz=cz}target[0]=minx;target[1]=miny;target[2]=minz;target[3]=maxx;target[4]=maxy;target[5]=maxz;centroidTarget[0]=cminx;centroidTarget[1]=cminy;centroidTarget[2]=cminz;centroidTarget[3]=cmaxx;centroidTarget[4]=cmaxy;centroidTarget[5]=cmaxz}function computeTriangleBounds(geo,target=null,offset=null,count=null){const posAttr=geo.attributes.position;const index=geo.index?geo.index.array:null;const triCount=getTriCount(geo);const normalized=posAttr.normalized;let triangleBounds;if(target===null){triangleBounds=new Float32Array(triCount*6*4);offset=0;count=triCount}else{triangleBounds=target;offset=offset||0;count=count||triCount}const posArr=posAttr.array;const bufferOffset=posAttr.offset||0;let stride=3;if(posAttr.isInterleavedBufferAttribute){stride=posAttr.data.stride}const getters=["getX","getY","getZ"];for(let tri=offset;tri<offset+count;tri++){const tri3=tri*3;const tri6=tri*6;let ai=tri3+0;let bi=tri3+1;let ci=tri3+2;if(index){ai=index[ai];bi=index[bi];ci=index[ci]}if(!normalized){ai=ai*stride+bufferOffset;bi=bi*stride+bufferOffset;ci=ci*stride+bufferOffset}for(let el=0;el<3;el++){let a,b,c;if(normalized){a=posAttr[getters[el]](ai);b=posAttr[getters[el]](bi);c=posAttr[getters[el]](ci)}else{a=posArr[ai+el];b=posArr[bi+el];c=posArr[ci+el]}let min=a;if(b<min)min=b;if(c<min)min=c;let max=a;if(b>max)max=b;if(c>max)max=c;const halfExtents=(max-min)/2;const el2=el*2;triangleBounds[tri6+el2+0]=min+halfExtents;triangleBounds[tri6+el2+1]=halfExtents+(Math.abs(min)+halfExtents)*FLOAT32_EPSILON}}return triangleBounds}function arrayToBox(nodeIndex32,array,target){target.min.x=array[nodeIndex32];target.min.y=array[nodeIndex32+1];target.min.z=array[nodeIndex32+2];target.max.x=array[nodeIndex32+3];target.max.y=array[nodeIndex32+4];target.max.z=array[nodeIndex32+5];return target}function makeEmptyBounds(target){target[0]=target[1]=target[2]=Infinity;target[3]=target[4]=target[5]=-Infinity}function getLongestEdgeIndex(bounds){let splitDimIdx=-1;let splitDist=-Infinity;for(let i=0;i<3;i++){const dist=bounds[i+3]-bounds[i];if(dist>splitDist){splitDist=dist;splitDimIdx=i}}return splitDimIdx}function copyBounds(source,target){target.set(source)}function unionBounds(a,b,target){let aVal,bVal;for(let d=0;d<3;d++){const d3=d+3;aVal=a[d];bVal=b[d];target[d]=aVal<bVal?aVal:bVal;aVal=a[d3];bVal=b[d3];target[d3]=aVal>bVal?aVal:bVal}}function expandByTriangleBounds(startIndex,triangleBounds,bounds){for(let d=0;d<3;d++){const tCenter=triangleBounds[startIndex+2*d];const tHalf=triangleBounds[startIndex+2*d+1];const tMin=tCenter-tHalf;const tMax=tCenter+tHalf;if(tMin<bounds[d]){bounds[d]=tMin}if(tMax>bounds[d+3]){bounds[d+3]=tMax}}}function computeSurfaceArea(bounds){const d0=bounds[3]-bounds[0];const d1=bounds[4]-bounds[1];const d2=bounds[5]-bounds[2];return 2*(d0*d1+d1*d2+d2*d0)}const BIN_COUNT=32;const binsSort=(a,b)=>a.candidate-b.candidate;const sahBins=new Array(BIN_COUNT).fill().map(()=>{return{count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0}});const leftBounds=new Float32Array(6);function getOptimalSplit(nodeBoundingData,centroidBoundingData,triangleBounds,offset,count,strategy){let axis=-1;let pos=0;if(strategy===CENTER){axis=getLongestEdgeIndex(centroidBoundingData);if(axis!==-1){pos=(centroidBoundingData[axis]+centroidBoundingData[axis+3])/2}}else if(strategy===AVERAGE){axis=getLongestEdgeIndex(nodeBoundingData);if(axis!==-1){pos=getAverage(triangleBounds,offset,count,axis)}}else if(strategy===SAH){const rootSurfaceArea=computeSurfaceArea(nodeBoundingData);let bestCost=TRIANGLE_INTERSECT_COST*count;const cStart=offset*6;const cEnd=(offset+count)*6;for(let a=0;a<3;a++){const axisLeft=centroidBoundingData[a];const axisRight=centroidBoundingData[a+3];const axisLength=axisRight-axisLeft;const binWidth=axisLength/BIN_COUNT;if(count<BIN_COUNT/4){const truncatedBins=[...sahBins];truncatedBins.length=count;let b=0;for(let c=cStart;c<cEnd;c+=6,b++){const bin=truncatedBins[b];bin.candidate=triangleBounds[c+2*a];bin.count=0;const{bounds,leftCacheBounds,rightCacheBounds}=bin;for(let d=0;d<3;d++){rightCacheBounds[d]=Infinity;rightCacheBounds[d+3]=-Infinity;leftCacheBounds[d]=Infinity;leftCacheBounds[d+3]=-Infinity;bounds[d]=Infinity;bounds[d+3]=-Infinity}expandByTriangleBounds(c,triangleBounds,bounds)}truncatedBins.sort(binsSort);let splitCount=count;for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];while(bi+1<splitCount&&truncatedBins[bi+1].candidate===bin.candidate){truncatedBins.splice(bi+1,1);splitCount--}}for(let c=cStart;c<cEnd;c+=6){const center=triangleBounds[c+2*a];for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];if(center>=bin.candidate){expandByTriangleBounds(c,triangleBounds,bin.rightCacheBounds)}else{expandByTriangleBounds(c,triangleBounds,bin.leftCacheBounds);bin.count++}}}for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];const leftCount=bin.count;const rightCount=count-bin.count;const leftBounds=bin.leftCacheBounds;const rightBounds=bin.rightCacheBounds;let leftProb=0;if(leftCount!==0){leftProb=computeSurfaceArea(leftBounds)/rootSurfaceArea}let rightProb=0;if(rightCount!==0){rightProb=computeSurfaceArea(rightBounds)/rootSurfaceArea}const cost=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(leftProb*leftCount+rightProb*rightCount);if(cost<bestCost){axis=a;bestCost=cost;pos=bin.candidate}}}else{for(let i=0;i<BIN_COUNT;i++){const bin=sahBins[i];bin.count=0;bin.candidate=axisLeft+binWidth+i*binWidth;const bounds=bin.bounds;for(let d=0;d<3;d++){bounds[d]=Infinity;bounds[d+3]=-Infinity}}for(let c=cStart;c<cEnd;c+=6){const triCenter=triangleBounds[c+2*a];const relativeCenter=triCenter-axisLeft;let binIndex=~~(relativeCenter/binWidth);if(binIndex>=BIN_COUNT)binIndex=BIN_COUNT-1;const bin=sahBins[binIndex];bin.count++;expandByTriangleBounds(c,triangleBounds,bin.bounds)}const lastBin=sahBins[BIN_COUNT-1];copyBounds(lastBin.bounds,lastBin.rightCacheBounds);for(let i=BIN_COUNT-2;i>=0;i--){const bin=sahBins[i];const nextBin=sahBins[i+1];unionBounds(bin.bounds,nextBin.rightCacheBounds,bin.rightCacheBounds)}let leftCount=0;for(let i=0;i<BIN_COUNT-1;i++){const bin=sahBins[i];const binCount=bin.count;const bounds=bin.bounds;const nextBin=sahBins[i+1];const rightBounds=nextBin.rightCacheBounds;if(binCount!==0){if(leftCount===0){copyBounds(bounds,leftBounds)}else{unionBounds(bounds,leftBounds,leftBounds)}}leftCount+=binCount;let leftProb=0;let rightProb=0;if(leftCount!==0){leftProb=computeSurfaceArea(leftBounds)/rootSurfaceArea}const rightCount=count-leftCount;if(rightCount!==0){rightProb=computeSurfaceArea(rightBounds)/rootSurfaceArea}const cost=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(leftProb*leftCount+rightProb*rightCount);if(cost<bestCost){axis=a;bestCost=cost;pos=bin.candidate}}}}}else{console.warn(`MeshBVH: Invalid build strategy value ${strategy} used.`)}return{axis,pos}}function getAverage(triangleBounds,offset,count,axis){let avg=0;for(let i=offset,end=offset+count;i<end;i++){avg+=triangleBounds[i*6+axis*2]}return avg/count}class MeshBVHNode{constructor(){this.boundingData=new Float32Array(6)}}function partition(indirectBuffer,index,triangleBounds,offset,count,split){let left=offset;let right=offset+count-1;const pos=split.pos;const axisOffset=split.axis*2;while(true){while(left<=right&&triangleBounds[left*6+axisOffset]<pos){left++}while(left<=right&&triangleBounds[right*6+axisOffset]>=pos){right--}if(left<right){for(let i=0;i<3;i++){let t0=index[left*3+i];index[left*3+i]=index[right*3+i];index[right*3+i]=t0}for(let i=0;i<6;i++){let tb=triangleBounds[left*6+i];triangleBounds[left*6+i]=triangleBounds[right*6+i];triangleBounds[right*6+i]=tb}left++;right--}else{return left}}}function partition_indirect(indirectBuffer,index,triangleBounds,offset,count,split){let left=offset;let right=offset+count-1;const pos=split.pos;const axisOffset=split.axis*2;while(true){while(left<=right&&triangleBounds[left*6+axisOffset]<pos){left++}while(left<=right&&triangleBounds[right*6+axisOffset]>=pos){right--}if(left<right){let t=indirectBuffer[left];indirectBuffer[left]=indirectBuffer[right];indirectBuffer[right]=t;for(let i=0;i<6;i++){let tb=triangleBounds[left*6+i];triangleBounds[left*6+i]=triangleBounds[right*6+i];triangleBounds[right*6+i]=tb}left++;right--}else{return left}}}function IS_LEAF(n16,uint16Array){return uint16Array[n16+15]===65535}function OFFSET(n32,uint32Array){return uint32Array[n32+6]}function COUNT(n16,uint16Array){return uint16Array[n16+14]}function LEFT_NODE(n32){return n32+8}function RIGHT_NODE(n32,uint32Array){return uint32Array[n32+6]}function SPLIT_AXIS(n32,uint32Array){return uint32Array[n32+7]}function BOUNDING_DATA_INDEX(n32){return n32}let float32Array,uint32Array,uint16Array,uint8Array;const MAX_POINTER=Math.pow(2,32);function countNodes(node){if("count"in node){return 1}else{return 1+countNodes(node.left)+countNodes(node.right)}}function populateBuffer(byteOffset,node,buffer){float32Array=new Float32Array(buffer);uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);uint8Array=new Uint8Array(buffer);return _populateBuffer(byteOffset,node)}function _populateBuffer(byteOffset,node){const stride4Offset=byteOffset/4;const stride2Offset=byteOffset/2;const isLeaf=("count"in node);const boundingData=node.boundingData;for(let i=0;i<6;i++){float32Array[stride4Offset+i]=boundingData[i]}if(isLeaf){if(node.buffer){const buffer=node.buffer;uint8Array.set(new Uint8Array(buffer),byteOffset);for(let offset=byteOffset,l=byteOffset+buffer.byteLength;offset<l;offset+=BYTES_PER_NODE){const offset2=offset/2;if(!IS_LEAF(offset2,uint16Array)){uint32Array[offset/4+6]+=stride4Offset}}return byteOffset+buffer.byteLength}else{const offset=node.offset;const count=node.count;uint32Array[stride4Offset+6]=offset;uint16Array[stride2Offset+14]=count;uint16Array[stride2Offset+15]=IS_LEAFNODE_FLAG;return byteOffset+BYTES_PER_NODE}}else{const left=node.left;const right=node.right;const splitAxis=node.splitAxis;let nextUnusedPointer;nextUnusedPointer=_populateBuffer(byteOffset+BYTES_PER_NODE,left);if(nextUnusedPointer/4>MAX_POINTER){throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.")}uint32Array[stride4Offset+6]=nextUnusedPointer/4;nextUnusedPointer=_populateBuffer(nextUnusedPointer,right);uint32Array[stride4Offset+7]=splitAxis;return nextUnusedPointer}}function generateIndirectBuffer(geometry,useSharedArrayBuffer){const triCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;const useUint32=triCount>2**16;const byteCount=useUint32?4:2;const buffer=useSharedArrayBuffer?new SharedArrayBuffer(triCount*byteCount):new ArrayBuffer(triCount*byteCount);const indirectBuffer=useUint32?new Uint32Array(buffer):new Uint16Array(buffer);for(let i=0,l=indirectBuffer.length;i<l;i++){indirectBuffer[i]=i}return indirectBuffer}function buildTree(bvh,triangleBounds,offset,count,options){const{maxDepth,verbose,maxLeafTris,strategy,onProgress,indirect}=options;const indirectBuffer=bvh._indirectBuffer;const geometry=bvh.geometry;const indexArray=geometry.index?geometry.index.array:null;const partionFunc=indirect?partition_indirect:partition;const totalTriangles=getTriCount(geometry);const cacheCentroidBoundingData=new Float32Array(6);let reachedMaxDepth=false;const root=new MeshBVHNode;getBounds(triangleBounds,offset,count,root.boundingData,cacheCentroidBoundingData);splitNode(root,offset,count,cacheCentroidBoundingData);return root;function triggerProgress(trianglesProcessed){if(onProgress){onProgress(trianglesProcessed/totalTriangles)}}function splitNode(node,offset,count,centroidBoundingData=null,depth=0){if(!reachedMaxDepth&&depth>=maxDepth){reachedMaxDepth=true;if(verbose){console.warn(`MeshBVH: Max depth of ${maxDepth} reached when generating BVH. Consider increasing maxDepth.`);console.warn(geometry)}}if(count<=maxLeafTris||depth>=maxDepth){triggerProgress(offset+count);node.offset=offset;node.count=count;return node}const split=getOptimalSplit(node.boundingData,centroidBoundingData,triangleBounds,offset,count,strategy);if(split.axis===-1){triggerProgress(offset+count);node.offset=offset;node.count=count;return node}const splitOffset=partionFunc(indirectBuffer,indexArray,triangleBounds,offset,count,split);if(splitOffset===offset||splitOffset===offset+count){triggerProgress(offset+count);node.offset=offset;node.count=count}else{node.splitAxis=split.axis;const left=new MeshBVHNode;const lstart=offset;const lcount=splitOffset-offset;node.left=left;getBounds(triangleBounds,lstart,lcount,left.boundingData,cacheCentroidBoundingData);splitNode(left,lstart,lcount,cacheCentroidBoundingData,depth+1);const right=new MeshBVHNode;const rstart=splitOffset;const rcount=count-lcount;node.right=right;getBounds(triangleBounds,rstart,rcount,right.boundingData,cacheCentroidBoundingData);splitNode(right,rstart,rcount,cacheCentroidBoundingData,depth+1)}return node}}function buildPackedTree(bvh,options){const geometry=bvh.geometry;if(options.indirect){bvh._indirectBuffer=generateIndirectBuffer(geometry,options.useSharedArrayBuffer);if(hasGroupGaps(geometry)&&!options.verbose){console.warn("MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the \"indirect\" option. "+"BVH may incorrectly report intersections on unrendered portions of the geometry.")}}if(!bvh._indirectBuffer){ensureIndex(geometry,options)}const BufferConstructor=options.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;const triangleBounds=computeTriangleBounds(geometry);const geometryRanges=options.indirect?getFullGeometryRange(geometry):getRootIndexRanges(geometry);bvh._roots=geometryRanges.map(range=>{const root=buildTree(bvh,triangleBounds,range.offset,range.count,options);const nodeCount=countNodes(root);const buffer=new BufferConstructor(BYTES_PER_NODE*nodeCount);populateBuffer(0,root,buffer);return buffer})}class SeparatingAxisBounds{constructor(){this.min=Infinity;this.max=-Infinity}setFromPointsField(points,field){let min=Infinity;let max=-Infinity;for(let i=0,l=points.length;i<l;i++){const p=points[i];const val=p[field];min=val<min?val:min;max=val>max?val:max}this.min=min;this.max=max}setFromPoints(axis,points){let min=Infinity;let max=-Infinity;for(let i=0,l=points.length;i<l;i++){const p=points[i];const val=axis.dot(p);min=val<min?val:min;max=val>max?val:max}this.min=min;this.max=max}isSeparated(other){return this.min>other.max||other.min>this.max}}SeparatingAxisBounds.prototype.setFromBox=function(){const p=new three.Vector3;return function setFromBox(axis,box){const boxMin=box.min;const boxMax=box.max;let min=Infinity;let max=-Infinity;for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){p.x=boxMin.x*x+boxMax.x*(1-x);p.y=boxMin.y*y+boxMax.y*(1-y);p.z=boxMin.z*z+boxMax.z*(1-z);const val=axis.dot(p);min=Math.min(val,min);max=Math.max(val,max)}}}this.min=min;this.max=max}}();const areIntersecting=function(){const cacheSatBounds=new SeparatingAxisBounds;return function areIntersecting(shape1,shape2){const points1=shape1.points;const satAxes1=shape1.satAxes;const satBounds1=shape1.satBounds;const points2=shape2.points;const satAxes2=shape2.satAxes;const satBounds2=shape2.satBounds;for(let i=0;i<3;i++){const sb=satBounds1[i];const sa=satAxes1[i];cacheSatBounds.setFromPoints(sa,points2);if(sb.isSeparated(cacheSatBounds))return false}for(let i=0;i<3;i++){const sb=satBounds2[i];const sa=satAxes2[i];cacheSatBounds.setFromPoints(sa,points1);if(sb.isSeparated(cacheSatBounds))return false}}}();const closestPointLineToLine=function(){const dir1=new three.Vector3;const dir2=new three.Vector3;const v02=new three.Vector3;return function closestPointLineToLine(l1,l2,result){const v0=l1.start;const v10=dir1;const v2=l2.start;const v32=dir2;v02.subVectors(v0,v2);dir1.subVectors(l1.end,l1.start);dir2.subVectors(l2.end,l2.start);const d0232=v02.dot(v32);const d3210=v32.dot(v10);const d3232=v32.dot(v32);const d0210=v02.dot(v10);const d1010=v10.dot(v10);const denom=d1010*d3232-d3210*d3210;let d,d2;if(denom!==0){d=(d0232*d3210-d0210*d3232)/denom}else{d=0}d2=(d0232+d*d3210)/d3232;result.x=d;result.y=d2}}();const closestPointsSegmentToSegment=function(){const paramResult=new three.Vector2;const temp1=new three.Vector3;const temp2=new three.Vector3;return function closestPointsSegmentToSegment(l1,l2,target1,target2){closestPointLineToLine(l1,l2,paramResult);let d=paramResult.x;let d2=paramResult.y;if(d>=0&&d<=1&&d2>=0&&d2<=1){l1.at(d,target1);l2.at(d2,target2);return}else if(d>=0&&d<=1){if(d2<0){l2.at(0,target2)}else{l2.at(1,target2)}l1.closestPointToPoint(target2,true,target1);return}else if(d2>=0&&d2<=1){if(d<0){l1.at(0,target1)}else{l1.at(1,target1)}l2.closestPointToPoint(target1,true,target2);return}else{let p;if(d<0){p=l1.start}else{p=l1.end}let p2;if(d2<0){p2=l2.start}else{p2=l2.end}const closestPoint=temp1;const closestPoint2=temp2;l1.closestPointToPoint(p2,true,temp1);l2.closestPointToPoint(p,true,temp2);if(closestPoint.distanceToSquared(p2)<=closestPoint2.distanceToSquared(p)){target1.copy(closestPoint);target2.copy(p2);return}else{target1.copy(p);target2.copy(closestPoint2);return}}}}();const sphereIntersectTriangle=function(){const closestPointTemp=new three.Vector3;const projectedPointTemp=new three.Vector3;const planeTemp=new three.Plane;const lineTemp=new three.Line3;return function sphereIntersectTriangle(sphere,triangle){const{radius,center}=sphere;const{a,b,c}=triangle;lineTemp.start=a;lineTemp.end=b;const closestPoint1=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint1.distanceTo(center)<=radius)return true;lineTemp.start=a;lineTemp.end=c;const closestPoint2=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint2.distanceTo(center)<=radius)return true;lineTemp.start=b;lineTemp.end=c;const closestPoint3=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint3.distanceTo(center)<=radius)return true;const plane=triangle.getPlane(planeTemp);const dp=Math.abs(plane.distanceToPoint(center));if(dp<=radius){const pp=plane.projectPoint(center,projectedPointTemp);const cp=triangle.containsPoint(pp);if(cp)return true}return false}}();const ZERO_EPSILON=1e-15;function isNearZero(value){return Math.abs(value)<ZERO_EPSILON}class ExtendedTriangle extends three.Triangle{constructor(...args){super(...args);this.isExtendedTriangle=true;this.satAxes=new Array(4).fill().map(()=>new three.Vector3);this.satBounds=new Array(4).fill().map(()=>new SeparatingAxisBounds);this.points=[this.a,this.b,this.c];this.sphere=new three.Sphere;this.plane=new three.Plane;this.needsUpdate=true}intersectsSphere(sphere){return sphereIntersectTriangle(sphere,this)}update(){const a=this.a;const b=this.b;const c=this.c;const points=this.points;const satAxes=this.satAxes;const satBounds=this.satBounds;const axis0=satAxes[0];const sab0=satBounds[0];this.getNormal(axis0);sab0.setFromPoints(axis0,points);const axis1=satAxes[1];const sab1=satBounds[1];axis1.subVectors(a,b);sab1.setFromPoints(axis1,points);const axis2=satAxes[2];const sab2=satBounds[2];axis2.subVectors(b,c);sab2.setFromPoints(axis2,points);const axis3=satAxes[3];const sab3=satBounds[3];axis3.subVectors(c,a);sab3.setFromPoints(axis3,points);this.sphere.setFromPoints(this.points);this.plane.setFromNormalAndCoplanarPoint(axis0,a);this.needsUpdate=false}}ExtendedTriangle.prototype.closestPointToSegment=function(){const point1=new three.Vector3;const point2=new three.Vector3;const edge=new three.Line3;return function distanceToSegment(segment,target1=null,target2=null){const{start,end}=segment;const points=this.points;let distSq;let closestDistanceSq=Infinity;for(let i=0;i<3;i++){const nexti=(i+1)%3;edge.start.copy(points[i]);edge.end.copy(points[nexti]);closestPointsSegmentToSegment(edge,segment,point1,point2);distSq=point1.distanceToSquared(point2);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(point2)}}this.closestPointToPoint(start,point1);distSq=start.distanceToSquared(point1);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(start)}this.closestPointToPoint(end,point1);distSq=end.distanceToSquared(point1);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(end)}return Math.sqrt(closestDistanceSq)}}();ExtendedTriangle.prototype.intersectsTriangle=function(){const saTri2=new ExtendedTriangle;const arr1=new Array(3);const arr2=new Array(3);const cachedSatBounds=new SeparatingAxisBounds;const cachedSatBounds2=new SeparatingAxisBounds;const cachedAxis=new three.Vector3;const dir=new three.Vector3;const dir1=new three.Vector3;const dir2=new three.Vector3;const tempDir=new three.Vector3;const edge=new three.Line3;const edge1=new three.Line3;const edge2=new three.Line3;const tempPoint=new three.Vector3;function triIntersectPlane(tri,plane,targetEdge){const points=tri.points;let count=0;let startPointIntersection=-1;for(let i=0;i<3;i++){const{start,end}=edge;start.copy(points[i]);end.copy(points[(i+1)%3]);edge.delta(dir);const startIntersects=isNearZero(plane.distanceToPoint(start));if(isNearZero(plane.normal.dot(dir))&&startIntersects){targetEdge.copy(edge);count=2;break}const doesIntersect=plane.intersectLine(edge,tempPoint);if(!doesIntersect&&startIntersects){tempPoint.copy(start)}if((doesIntersect||startIntersects)&&!isNearZero(tempPoint.distanceTo(end))){if(count<=1){const point=count===1?targetEdge.start:targetEdge.end;point.copy(tempPoint);if(startIntersects){startPointIntersection=count}}else if(count>=2){const point=startPointIntersection===1?targetEdge.start:targetEdge.end;point.copy(tempPoint);count=2;break}count++;if(count===2&&startPointIntersection===-1){break}}}return count}return function intersectsTriangle(other,target=null,suppressLog=false){if(this.needsUpdate){this.update()}if(!other.isExtendedTriangle){saTri2.copy(other);saTri2.update();other=saTri2}else if(other.needsUpdate){other.update()}const plane1=this.plane;const plane2=other.plane;if(Math.abs(plane1.normal.dot(plane2.normal))>1-1e-10){const satBounds1=this.satBounds;const satAxes1=this.satAxes;arr2[0]=other.a;arr2[1]=other.b;arr2[2]=other.c;for(let i=0;i<4;i++){const sb=satBounds1[i];const sa=satAxes1[i];cachedSatBounds.setFromPoints(sa,arr2);if(sb.isSeparated(cachedSatBounds))return false}const satBounds2=other.satBounds;const satAxes2=other.satAxes;arr1[0]=this.a;arr1[1]=this.b;arr1[2]=this.c;for(let i=0;i<4;i++){const sb=satBounds2[i];const sa=satAxes2[i];cachedSatBounds.setFromPoints(sa,arr1);if(sb.isSeparated(cachedSatBounds))return false}for(let i=0;i<4;i++){const sa1=satAxes1[i];for(let i2=0;i2<4;i2++){const sa2=satAxes2[i2];cachedAxis.crossVectors(sa1,sa2);cachedSatBounds.setFromPoints(cachedAxis,arr1);cachedSatBounds2.setFromPoints(cachedAxis,arr2);if(cachedSatBounds.isSeparated(cachedSatBounds2))return false}}if(target){if(!suppressLog){console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0.")}target.start.set(0,0,0);target.end.set(0,0,0)}return true}else{const count1=triIntersectPlane(this,plane2,edge1);if(count1===1&&other.containsPoint(edge1.end)){if(target){target.start.copy(edge1.end);target.end.copy(edge1.end)}return true}else if(count1!==2){return false}const count2=triIntersectPlane(other,plane1,edge2);if(count2===1&&this.containsPoint(edge2.end)){if(target){target.start.copy(edge2.end);target.end.copy(edge2.end)}return true}else if(count2!==2){return false}edge1.delta(dir1);edge2.delta(dir2);if(dir1.dot(dir2)<0){let tmp=edge2.start;edge2.start=edge2.end;edge2.end=tmp}const s1=edge1.start.dot(dir1);const e1=edge1.end.dot(dir1);const s2=edge2.start.dot(dir1);const e2=edge2.end.dot(dir1);const separated1=e1<s2;const separated2=s1<e2;if(s1!==e2&&s2!==e1&&separated1===separated2){return false}if(target){tempDir.subVectors(edge1.start,edge2.start);if(tempDir.dot(dir1)>0){target.start.copy(edge1.start)}else{target.start.copy(edge2.start)}tempDir.subVectors(edge1.end,edge2.end);if(tempDir.dot(dir1)<0){target.end.copy(edge1.end)}else{target.end.copy(edge2.end)}}return true}}}();ExtendedTriangle.prototype.distanceToPoint=function(){const target=new three.Vector3;return function distanceToPoint(point){this.closestPointToPoint(point,target);return point.distanceTo(target)}}();ExtendedTriangle.prototype.distanceToTriangle=function(){const point=new three.Vector3;const point2=new three.Vector3;const cornerFields=["a","b","c"];const line1=new three.Line3;const line2=new three.Line3;return function distanceToTriangle(other,target1=null,target2=null){const lineTarget=target1||target2?line1:null;if(this.intersectsTriangle(other,lineTarget)){if(target1||target2){if(target1)lineTarget.getCenter(target1);if(target2)lineTarget.getCenter(target2)}return 0}let closestDistanceSq=Infinity;for(let i=0;i<3;i++){let dist;const field=cornerFields[i];const otherVec=other[field];this.closestPointToPoint(otherVec,point);dist=otherVec.distanceToSquared(point);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point);if(target2)target2.copy(otherVec)}const thisVec=this[field];other.closestPointToPoint(thisVec,point);dist=thisVec.distanceToSquared(point);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(thisVec);if(target2)target2.copy(point)}}for(let i=0;i<3;i++){const f11=cornerFields[i];const f12=cornerFields[(i+1)%3];line1.set(this[f11],this[f12]);for(let i2=0;i2<3;i2++){const f21=cornerFields[i2];const f22=cornerFields[(i2+1)%3];line2.set(other[f21],other[f22]);closestPointsSegmentToSegment(line1,line2,point,point2);const dist=point.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point);if(target2)target2.copy(point2)}}}return Math.sqrt(closestDistanceSq)}}();class OrientedBox{constructor(min,max,matrix){this.isOrientedBox=true;this.min=new three.Vector3;this.max=new three.Vector3;this.matrix=new three.Matrix4;this.invMatrix=new three.Matrix4;this.points=new Array(8).fill().map(()=>new three.Vector3);this.satAxes=new Array(3).fill().map(()=>new three.Vector3);this.satBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds);this.alignedSatBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds);this.needsUpdate=false;if(min)this.min.copy(min);if(max)this.max.copy(max);if(matrix)this.matrix.copy(matrix)}set(min,max,matrix){this.min.copy(min);this.max.copy(max);this.matrix.copy(matrix);this.needsUpdate=true}copy(other){this.min.copy(other.min);this.max.copy(other.max);this.matrix.copy(other.matrix);this.needsUpdate=true}}OrientedBox.prototype.update=function(){return function update(){const matrix=this.matrix;const min=this.min;const max=this.max;const points=this.points;for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){const i=(1<<0)*x|(1<<1)*y|(1<<2)*z;const v=points[i];v.x=x?max.x:min.x;v.y=y?max.y:min.y;v.z=z?max.z:min.z;v.applyMatrix4(matrix)}}}const satBounds=this.satBounds;const satAxes=this.satAxes;const minVec=points[0];for(let i=0;i<3;i++){const axis=satAxes[i];const sb=satBounds[i];const index=1<<i;const pi=points[index];axis.subVectors(minVec,pi);sb.setFromPoints(axis,points)}const alignedSatBounds=this.alignedSatBounds;alignedSatBounds[0].setFromPointsField(points,"x");alignedSatBounds[1].setFromPointsField(points,"y");alignedSatBounds[2].setFromPointsField(points,"z");this.invMatrix.copy(this.matrix).invert();this.needsUpdate=false}}();OrientedBox.prototype.intersectsBox=function(){const aabbBounds=new SeparatingAxisBounds;return function intersectsBox(box){if(this.needsUpdate){this.update()}const min=box.min;const max=box.max;const satBounds=this.satBounds;const satAxes=this.satAxes;const alignedSatBounds=this.alignedSatBounds;aabbBounds.min=min.x;aabbBounds.max=max.x;if(alignedSatBounds[0].isSeparated(aabbBounds))return false;aabbBounds.min=min.y;aabbBounds.max=max.y;if(alignedSatBounds[1].isSeparated(aabbBounds))return false;aabbBounds.min=min.z;aabbBounds.max=max.z;if(alignedSatBounds[2].isSeparated(aabbBounds))return false;for(let i=0;i<3;i++){const axis=satAxes[i];const sb=satBounds[i];aabbBounds.setFromBox(axis,box);if(sb.isSeparated(aabbBounds))return false}return true}}();OrientedBox.prototype.intersectsTriangle=function(){const saTri=new ExtendedTriangle;const pointsArr=new Array(3);const cachedSatBounds=new SeparatingAxisBounds;const cachedSatBounds2=new SeparatingAxisBounds;const cachedAxis=new three.Vector3;return function intersectsTriangle(triangle){if(this.needsUpdate){this.update()}if(!triangle.isExtendedTriangle){saTri.copy(triangle);saTri.update();triangle=saTri}else if(triangle.needsUpdate){triangle.update()}const satBounds=this.satBounds;const satAxes=this.satAxes;pointsArr[0]=triangle.a;pointsArr[1]=triangle.b;pointsArr[2]=triangle.c;for(let i=0;i<3;i++){const sb=satBounds[i];const sa=satAxes[i];cachedSatBounds.setFromPoints(sa,pointsArr);if(sb.isSeparated(cachedSatBounds))return false}const triSatBounds=triangle.satBounds;const triSatAxes=triangle.satAxes;const points=this.points;for(let i=0;i<3;i++){const sb=triSatBounds[i];const sa=triSatAxes[i];cachedSatBounds.setFromPoints(sa,points);if(sb.isSeparated(cachedSatBounds))return false}for(let i=0;i<3;i++){const sa1=satAxes[i];for(let i2=0;i2<4;i2++){const sa2=triSatAxes[i2];cachedAxis.crossVectors(sa1,sa2);cachedSatBounds.setFromPoints(cachedAxis,pointsArr);cachedSatBounds2.setFromPoints(cachedAxis,points);if(cachedSatBounds.isSeparated(cachedSatBounds2))return false}}return true}}();OrientedBox.prototype.closestPointToPoint=function(){return function closestPointToPoint(point,target1){if(this.needsUpdate){this.update()}target1.copy(point).applyMatrix4(this.invMatrix).clamp(this.min,this.max).applyMatrix4(this.matrix);return target1}}();OrientedBox.prototype.distanceToPoint=function(){const target=new three.Vector3;return function distanceToPoint(point){this.closestPointToPoint(point,target);return point.distanceTo(target)}}();OrientedBox.prototype.distanceToBox=function(){const xyzFields=["x","y","z"];const segments1=new Array(12).fill().map(()=>new three.Line3);const segments2=new Array(12).fill().map(()=>new three.Line3);const point1=new three.Vector3;const point2=new three.Vector3;return function distanceToBox(box,threshold=0,target1=null,target2=null){if(this.needsUpdate){this.update()}if(this.intersectsBox(box)){if(target1||target2){box.getCenter(point2);this.closestPointToPoint(point2,point1);box.closestPointToPoint(point1,point2);if(target1)target1.copy(point1);if(target2)target2.copy(point2)}return 0}const threshold2=threshold*threshold;const min=box.min;const max=box.max;const points=this.points;let closestDistanceSq=Infinity;for(let i=0;i<8;i++){const p=points[i];point2.copy(p).clamp(min,max);const dist=p.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(p);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}let count=0;for(let i=0;i<3;i++){for(let i1=0;i1<=1;i1++){for(let i2=0;i2<=1;i2++){const nextIndex=(i+1)%3;const nextIndex2=(i+2)%3;const index=i1<<nextIndex|i2<<nextIndex2;const index2=1<<i|i1<<nextIndex|i2<<nextIndex2;const p1=points[index];const p2=points[index2];const line1=segments1[count];line1.set(p1,p2);const f1=xyzFields[i];const f2=xyzFields[nextIndex];const f3=xyzFields[nextIndex2];const line2=segments2[count];const start=line2.start;const end=line2.end;start[f1]=min[f1];start[f2]=i1?min[f2]:max[f2];start[f3]=i2?min[f3]:max[f2];end[f1]=max[f1];end[f2]=i1?min[f2]:max[f2];end[f3]=i2?min[f3]:max[f2];count++}}}for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){point2.x=x?max.x:min.x;point2.y=y?max.y:min.y;point2.z=z?max.z:min.z;this.closestPointToPoint(point2,point1);const dist=point2.distanceToSquared(point1);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point1);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}}}for(let i=0;i<12;i++){const l1=segments1[i];for(let i2=0;i2<12;i2++){const l2=segments2[i2];closestPointsSegmentToSegment(l1,l2,point1,point2);const dist=point1.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point1);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}}return Math.sqrt(closestDistanceSq)}}();class PrimitivePool{constructor(getNewPrimitive){this._getNewPrimitive=getNewPrimitive;this._primitives=[]}getPrimitive(){const primitives=this._primitives;if(primitives.length===0){return this._getNewPrimitive()}else{return primitives.pop()}}releasePrimitive(primitive){this._primitives.push(primitive)}}class ExtendedTrianglePoolBase extends PrimitivePool{constructor(){super(()=>new ExtendedTriangle)}}const ExtendedTrianglePool=new ExtendedTrianglePoolBase;class _BufferStack{constructor(){this.float32Array=null;this.uint16Array=null;this.uint32Array=null;const stack=[];let prevBuffer=null;this.setBuffer=buffer=>{if(prevBuffer){stack.push(prevBuffer)}prevBuffer=buffer;this.float32Array=new Float32Array(buffer);this.uint16Array=new Uint16Array(buffer);this.uint32Array=new Uint32Array(buffer)};this.clearBuffer=()=>{prevBuffer=null;this.float32Array=null;this.uint16Array=null;this.uint32Array=null;if(stack.length!==0){this.setBuffer(stack.pop())}}}}const BufferStack=new _BufferStack;let _box1$1,_box2$1;const boxStack=[];const boxPool=new PrimitivePool(()=>new three.Box3);function shapecast(bvh,root,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset){_box1$1=boxPool.getPrimitive();_box2$1=boxPool.getPrimitive();boxStack.push(_box1$1,_box2$1);BufferStack.setBuffer(bvh._roots[root]);const result=shapecastTraverse(0,bvh.geometry,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset);BufferStack.clearBuffer();boxPool.releasePrimitive(_box1$1);boxPool.releasePrimitive(_box2$1);boxStack.pop();boxStack.pop();const length=boxStack.length;if(length>0){_box2$1=boxStack[length-1];_box1$1=boxStack[length-2]}return result}function shapecastTraverse(nodeIndex32,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc=null,nodeIndexByteOffset=0,depth=0){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,_box1$1);return intersectsRangeFunc(offset,count,false,depth,nodeIndexByteOffset+nodeIndex32,_box1$1)}else{const left=LEFT_NODE(nodeIndex32);const right=RIGHT_NODE(nodeIndex32,uint32Array);let c1=left;let c2=right;let score1,score2;let box1,box2;if(nodeScoreFunc){box1=_box1$1;box2=_box2$1;arrayToBox(BOUNDING_DATA_INDEX(c1),float32Array,box1);arrayToBox(BOUNDING_DATA_INDEX(c2),float32Array,box2);score1=nodeScoreFunc(box1);score2=nodeScoreFunc(box2);if(score2<score1){c1=right;c2=left;const temp=score1;score1=score2;score2=temp;box1=box2}}if(!box1){box1=_box1$1;arrayToBox(BOUNDING_DATA_INDEX(c1),float32Array,box1)}const isC1Leaf=IS_LEAF(c1*2,uint16Array);const c1Intersection=intersectsBoundsFunc(box1,isC1Leaf,score1,depth+1,nodeIndexByteOffset+c1);let c1StopTraversal;if(c1Intersection===CONTAINED){const offset=getLeftOffset(c1);const end=getRightEndOffset(c1);const count=end-offset;c1StopTraversal=intersectsRangeFunc(offset,count,true,depth+1,nodeIndexByteOffset+c1,box1)}else{c1StopTraversal=c1Intersection&&shapecastTraverse(c1,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc,nodeIndexByteOffset,depth+1)}if(c1StopTraversal)return true;box2=_box2$1;arrayToBox(BOUNDING_DATA_INDEX(c2),float32Array,box2);const isC2Leaf=IS_LEAF(c2*2,uint16Array);const c2Intersection=intersectsBoundsFunc(box2,isC2Leaf,score2,depth+1,nodeIndexByteOffset+c2);let c2StopTraversal;if(c2Intersection===CONTAINED){const offset=getLeftOffset(c2);const end=getRightEndOffset(c2);const count=end-offset;c2StopTraversal=intersectsRangeFunc(offset,count,true,depth+1,nodeIndexByteOffset+c2,box2)}else{c2StopTraversal=c2Intersection&&shapecastTraverse(c2,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc,nodeIndexByteOffset,depth+1)}if(c2StopTraversal)return true;return false;function getLeftOffset(nodeIndex32){const{uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;while(!IS_LEAF(nodeIndex16,uint16Array)){nodeIndex32=LEFT_NODE(nodeIndex32);nodeIndex16=nodeIndex32*2}return OFFSET(nodeIndex32,uint32Array)}function getRightEndOffset(nodeIndex32){const{uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;while(!IS_LEAF(nodeIndex16,uint16Array)){nodeIndex32=RIGHT_NODE(nodeIndex32,uint32Array);nodeIndex16=nodeIndex32*2}return OFFSET(nodeIndex32,uint32Array)+COUNT(nodeIndex16,uint16Array)}}}const temp=new three.Vector3;const temp1$2=new three.Vector3;function closestPointToPoint(bvh,point,target={},minThreshold=0,maxThreshold=Infinity){const minThresholdSq=minThreshold*minThreshold;const maxThresholdSq=maxThreshold*maxThreshold;let closestDistanceSq=Infinity;let closestDistanceTriIndex=null;bvh.shapecast({boundsTraverseOrder:box=>{temp.copy(point).clamp(box.min,box.max);return temp.distanceToSquared(point)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistanceSq&&score<maxThresholdSq},intersectsTriangle:(tri,triIndex)=>{tri.closestPointToPoint(point,temp);const distSq=point.distanceToSquared(temp);if(distSq<closestDistanceSq){temp1$2.copy(temp);closestDistanceSq=distSq;closestDistanceTriIndex=triIndex}if(distSq<minThresholdSq){return true}else{return false}}});if(closestDistanceSq===Infinity)return null;const closestDistance=Math.sqrt(closestDistanceSq);if(!target.point)target.point=temp1$2.clone();else target.point.copy(temp1$2);target.distance=closestDistance,target.faceIndex=closestDistanceTriIndex;return target}const _vA=new three.Vector3;const _vB=new three.Vector3;const _vC=new three.Vector3;const _uvA=new three.Vector2;const _uvB=new three.Vector2;const _uvC=new three.Vector2;const _normalA=new three.Vector3;const _normalB=new three.Vector3;const _normalC=new three.Vector3;const _intersectionPoint=new three.Vector3;function checkIntersection(ray,pA,pB,pC,point,side){let intersect;if(side===three.BackSide){intersect=ray.intersectTriangle(pC,pB,pA,true,point)}else{intersect=ray.intersectTriangle(pA,pB,pC,side!==three.DoubleSide,point)}if(intersect===null)return null;const distance=ray.origin.distanceTo(point);return{distance:distance,point:point.clone()}}function checkBufferGeometryIntersection(ray,position,normal,uv,uv1,a,b,c,side){_vA.fromBufferAttribute(position,a);_vB.fromBufferAttribute(position,b);_vC.fromBufferAttribute(position,c);const intersection=checkIntersection(ray,_vA,_vB,_vC,_intersectionPoint,side);if(intersection){if(uv){_uvA.fromBufferAttribute(uv,a);_uvB.fromBufferAttribute(uv,b);_uvC.fromBufferAttribute(uv,c);intersection.uv=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new three.Vector2)}if(uv1){_uvA.fromBufferAttribute(uv1,a);_uvB.fromBufferAttribute(uv1,b);_uvC.fromBufferAttribute(uv1,c);intersection.uv1=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new three.Vector2)}if(normal){_normalA.fromBufferAttribute(normal,a);_normalB.fromBufferAttribute(normal,b);_normalC.fromBufferAttribute(normal,c);intersection.normal=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_normalA,_normalB,_normalC,new three.Vector3);if(intersection.normal.dot(ray.direction)>0){intersection.normal.multiplyScalar(-1)}}const face={a:a,b:b,c:c,normal:new three.Vector3,materialIndex:0};three.Triangle.getNormal(_vA,_vB,_vC,face.normal);intersection.face=face;intersection.faceIndex=a}return intersection}function intersectTri(geo,side,ray,tri,intersections){const triOffset=tri*3;let a=triOffset+0;let b=triOffset+1;let c=triOffset+2;const index=geo.index;if(geo.index){a=index.getX(a);b=index.getX(b);c=index.getX(c)}const{position,normal,uv,uv1}=geo.attributes;const intersection=checkBufferGeometryIntersection(ray,position,normal,uv,uv1,a,b,c,side);if(intersection){intersection.faceIndex=tri;if(intersections)intersections.push(intersection);return intersection}return null}function setTriangle(tri,i,index,pos){const ta=tri.a;const tb=tri.b;const tc=tri.c;let i0=i;let i1=i+1;let i2=i+2;if(index){i0=index.getX(i0);i1=index.getX(i1);i2=index.getX(i2)}ta.x=pos.getX(i0);ta.y=pos.getY(i0);ta.z=pos.getZ(i0);tb.x=pos.getX(i1);tb.y=pos.getY(i1);tb.z=pos.getZ(i1);tc.x=pos.getX(i2);tc.y=pos.getY(i2);tc.z=pos.getZ(i2)}const tempV1=new three.Vector3;const tempV2=new three.Vector3;const tempV3=new three.Vector3;const tempUV1=new three.Vector2;const tempUV2=new three.Vector2;const tempUV3=new three.Vector2;function getTriangleHitPointInfo(point,geometry,triangleIndex,target){const indices=geometry.getIndex().array;const positions=geometry.getAttribute("position");const uvs=geometry.getAttribute("uv");const a=indices[triangleIndex*3];const b=indices[triangleIndex*3+1];const c=indices[triangleIndex*3+2];tempV1.fromBufferAttribute(positions,a);tempV2.fromBufferAttribute(positions,b);tempV3.fromBufferAttribute(positions,c);let materialIndex=0;const groups=geometry.groups;const firstVertexIndex=triangleIndex*3;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];const{start,count}=group;if(firstVertexIndex>=start&&firstVertexIndex<start+count){materialIndex=group.materialIndex;break}}let uv=null;if(uvs){tempUV1.fromBufferAttribute(uvs,a);tempUV2.fromBufferAttribute(uvs,b);tempUV3.fromBufferAttribute(uvs,c);if(target&&target.uv)uv=target.uv;else uv=new three.Vector2;three.Triangle.getInterpolation(point,tempV1,tempV2,tempV3,tempUV1,tempUV2,tempUV3,uv)}if(target){if(!target.face)target.face={};target.face.a=a;target.face.b=b;target.face.c=c;target.face.materialIndex=materialIndex;if(!target.face.normal)target.face.normal=new three.Vector3;three.Triangle.getNormal(tempV1,tempV2,tempV3,target.face.normal);if(uv)target.uv=uv;return target}else{return{face:{a:a,b:b,c:c,materialIndex:materialIndex,normal:three.Triangle.getNormal(tempV1,tempV2,tempV3,new three.Vector3)},uv:uv}}}function intersectTris(bvh,side,ray,offset,count,intersections){const{geometry,_indirectBuffer}=bvh;for(let i=offset,end=offset+count;i<end;i++){intersectTri(geometry,side,ray,i,intersections)}}function intersectClosestTri(bvh,side,ray,offset,count){const{geometry,_indirectBuffer}=bvh;let dist=Infinity;let res=null;for(let i=offset,end=offset+count;i<end;i++){let intersection;intersection=intersectTri(geometry,side,ray,i);if(intersection&&intersection.distance<dist){res=intersection;dist=intersection.distance}}return res}function iterateOverTriangles(offset,count,bvh,intersectsTriangleFunc,contained,depth,triangle){const{geometry}=bvh;const{index}=geometry;const pos=geometry.attributes.position;for(let i=offset,l=count+offset;i<l;i++){let tri;tri=i;setTriangle(triangle,tri*3,index,pos);triangle.needsUpdate=true;if(intersectsTriangleFunc(triangle,tri,contained,depth)){return true}}return false}function refit(bvh,nodeIndices=null){if(nodeIndices&&Array.isArray(nodeIndices)){nodeIndices=new Set(nodeIndices)}const geometry=bvh.geometry;const indexArr=geometry.index?geometry.index.array:null;const posAttr=geometry.attributes.position;let buffer,uint32Array,uint16Array,float32Array;let byteOffset=0;const roots=bvh._roots;for(let i=0,l=roots.length;i<l;i++){buffer=roots[i];uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);float32Array=new Float32Array(buffer);_traverse(0,byteOffset);byteOffset+=buffer.byteLength}function _traverse(node32Index,byteOffset,force=false){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;for(let i=3*offset,l=3*(offset+count);i<l;i++){let index=indexArr[i];const x=posAttr.getX(index);const y=posAttr.getY(index);const z=posAttr.getZ(index);if(x<minx)minx=x;if(x>maxx)maxx=x;if(y<miny)miny=y;if(y>maxy)maxy=y;if(z<minz)minz=z;if(z>maxz)maxz=z}if(float32Array[node32Index+0]!==minx||float32Array[node32Index+1]!==miny||float32Array[node32Index+2]!==minz||float32Array[node32Index+3]!==maxx||float32Array[node32Index+4]!==maxy||float32Array[node32Index+5]!==maxz){float32Array[node32Index+0]=minx;float32Array[node32Index+1]=miny;float32Array[node32Index+2]=minz;float32Array[node32Index+3]=maxx;float32Array[node32Index+4]=maxy;float32Array[node32Index+5]=maxz;return true}else{return false}}else{const left=node32Index+8;const right=uint32Array[node32Index+6];const offsetLeft=left+byteOffset;const offsetRight=right+byteOffset;let forceChildren=force;let includesLeft=false;let includesRight=false;if(nodeIndices){if(!forceChildren){includesLeft=nodeIndices.has(offsetLeft);includesRight=nodeIndices.has(offsetRight);forceChildren=!includesLeft&&!includesRight}}else{includesLeft=true;includesRight=true}const traverseLeft=forceChildren||includesLeft;const traverseRight=forceChildren||includesRight;let leftChange=false;if(traverseLeft){leftChange=_traverse(left,byteOffset,forceChildren)}let rightChange=false;if(traverseRight){rightChange=_traverse(right,byteOffset,forceChildren)}const didChange=leftChange||rightChange;if(didChange){for(let i=0;i<3;i++){const lefti=left+i;const righti=right+i;const minLeftValue=float32Array[lefti];const maxLeftValue=float32Array[lefti+3];const minRightValue=float32Array[righti];const maxRightValue=float32Array[righti+3];float32Array[node32Index+i]=minLeftValue<minRightValue?minLeftValue:minRightValue;float32Array[node32Index+i+3]=maxLeftValue>maxRightValue?maxLeftValue:maxRightValue}}return didChange}}}function intersectRay(nodeIndex32,array,ray){let tmin,tmax,tymin,tymax,tzmin,tzmax;const invdirx=1/ray.direction.x,invdiry=1/ray.direction.y,invdirz=1/ray.direction.z;const ox=ray.origin.x;const oy=ray.origin.y;const oz=ray.origin.z;let minx=array[nodeIndex32];let maxx=array[nodeIndex32+3];let miny=array[nodeIndex32+1];let maxy=array[nodeIndex32+3+1];let minz=array[nodeIndex32+2];let maxz=array[nodeIndex32+3+2];if(invdirx>=0){tmin=(minx-ox)*invdirx;tmax=(maxx-ox)*invdirx}else{tmin=(maxx-ox)*invdirx;tmax=(minx-ox)*invdirx}if(invdiry>=0){tymin=(miny-oy)*invdiry;tymax=(maxy-oy)*invdiry}else{tymin=(maxy-oy)*invdiry;tymax=(miny-oy)*invdiry}if(tmin>tymax||tymin>tmax)return false;if(tymin>tmin||isNaN(tmin))tmin=tymin;if(tymax<tmax||isNaN(tmax))tmax=tymax;if(invdirz>=0){tzmin=(minz-oz)*invdirz;tzmax=(maxz-oz)*invdirz}else{tzmin=(maxz-oz)*invdirz;tzmax=(minz-oz)*invdirz}if(tmin>tzmax||tzmin>tmax)return false;if(tzmax<tmax||tmax!==tmax)tmax=tzmax;if(tmax<0)return false;return true}function intersectTris_indirect(bvh,side,ray,offset,count,intersections){const{geometry,_indirectBuffer}=bvh;for(let i=offset,end=offset+count;i<end;i++){let vi=_indirectBuffer?_indirectBuffer[i]:i;intersectTri(geometry,side,ray,vi,intersections)}}function intersectClosestTri_indirect(bvh,side,ray,offset,count){const{geometry,_indirectBuffer}=bvh;let dist=Infinity;let res=null;for(let i=offset,end=offset+count;i<end;i++){let intersection;intersection=intersectTri(geometry,side,ray,_indirectBuffer?_indirectBuffer[i]:i);if(intersection&&intersection.distance<dist){res=intersection;dist=intersection.distance}}return res}function iterateOverTriangles_indirect(offset,count,bvh,intersectsTriangleFunc,contained,depth,triangle){const{geometry}=bvh;const{index}=geometry;const pos=geometry.attributes.position;for(let i=offset,l=count+offset;i<l;i++){let tri;tri=bvh.resolveTriangleIndex(i);setTriangle(triangle,tri*3,index,pos);triangle.needsUpdate=true;if(intersectsTriangleFunc(triangle,tri,contained,depth)){return true}}return false}function raycast(bvh,root,side,ray,intersects){BufferStack.setBuffer(bvh._roots[root]);_raycast$1(0,bvh,side,ray,intersects);BufferStack.clearBuffer()}function _raycast$1(nodeIndex32,bvh,side,ray,intersects){const{float32Array,uint16Array,uint32Array}=BufferStack;const nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);intersectTris(bvh,side,ray,offset,count,intersects)}else{const leftIndex=LEFT_NODE(nodeIndex32);if(intersectRay(leftIndex,float32Array,ray)){_raycast$1(leftIndex,bvh,side,ray,intersects)}const rightIndex=RIGHT_NODE(nodeIndex32,uint32Array);if(intersectRay(rightIndex,float32Array,ray)){_raycast$1(rightIndex,bvh,side,ray,intersects)}}}const _xyzFields$1=["x","y","z"];function raycastFirst(bvh,root,side,ray){BufferStack.setBuffer(bvh._roots[root]);const result=_raycastFirst$1(0,bvh,side,ray);BufferStack.clearBuffer();return result}function _raycastFirst$1(nodeIndex32,bvh,side,ray){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);return intersectClosestTri(bvh,side,ray,offset,count)}else{const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);const xyzAxis=_xyzFields$1[splitAxis];const rayDir=ray.direction[xyzAxis];const leftToRight=rayDir>=0;let c1,c2;if(leftToRight){c1=LEFT_NODE(nodeIndex32);c2=RIGHT_NODE(nodeIndex32,uint32Array)}else{c1=RIGHT_NODE(nodeIndex32,uint32Array);c2=LEFT_NODE(nodeIndex32)}const c1Intersection=intersectRay(c1,float32Array,ray);const c1Result=c1Intersection?_raycastFirst$1(c1,bvh,side,ray):null;if(c1Result){const point=c1Result.point[xyzAxis];const isOutside=leftToRight?point<=float32Array[c2+splitAxis]:point>=float32Array[c2+splitAxis+3];if(isOutside){return c1Result}}const c2Intersection=intersectRay(c2,float32Array,ray);const c2Result=c2Intersection?_raycastFirst$1(c2,bvh,side,ray):null;if(c1Result&&c2Result){return c1Result.distance<=c2Result.distance?c1Result:c2Result}else{return c1Result||c2Result||null}}}const boundingBox$2=new three.Box3;const triangle$1=new ExtendedTriangle;const triangle2$1=new ExtendedTriangle;const invertedMat$1=new three.Matrix4;const obb$4=new OrientedBox;const obb2$3=new OrientedBox;function intersectsGeometry(bvh,root,otherGeometry,geometryToBvh){BufferStack.setBuffer(bvh._roots[root]);const result=_intersectsGeometry$1(0,bvh,otherGeometry,geometryToBvh);BufferStack.clearBuffer();return result}function _intersectsGeometry$1(nodeIndex32,bvh,otherGeometry,geometryToBvh,cachedObb=null){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;if(cachedObb===null){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$4.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);cachedObb=obb$4}const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const thisGeometry=bvh.geometry;const thisIndex=thisGeometry.index;const thisPos=thisGeometry.attributes.position;const index=otherGeometry.index;const pos=otherGeometry.attributes.position;const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);invertedMat$1.copy(geometryToBvh).invert();if(otherGeometry.boundsTree){arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,obb2$3);obb2$3.matrix.copy(invertedMat$1);obb2$3.needsUpdate=true;const res=otherGeometry.boundsTree.shapecast({intersectsBounds:box=>obb2$3.intersectsBox(box),intersectsTriangle:tri=>{tri.a.applyMatrix4(geometryToBvh);tri.b.applyMatrix4(geometryToBvh);tri.c.applyMatrix4(geometryToBvh);tri.needsUpdate=true;for(let i=offset*3,l=(count+offset)*3;i<l;i+=3){setTriangle(triangle2$1,i,thisIndex,thisPos);triangle2$1.needsUpdate=true;if(tri.intersectsTriangle(triangle2$1)){return true}}return false}});return res}else{for(let i=offset*3,l=(count+offset)*3;i<l;i+=3){setTriangle(triangle$1,i,thisIndex,thisPos);triangle$1.a.applyMatrix4(invertedMat$1);triangle$1.b.applyMatrix4(invertedMat$1);triangle$1.c.applyMatrix4(invertedMat$1);triangle$1.needsUpdate=true;for(let i2=0,l2=index.count;i2<l2;i2+=3){setTriangle(triangle2$1,i2,index,pos);triangle2$1.needsUpdate=true;if(triangle$1.intersectsTriangle(triangle2$1)){return true}}}}}else{const left=nodeIndex32+8;const right=uint32Array[nodeIndex32+6];arrayToBox(BOUNDING_DATA_INDEX(left),float32Array,boundingBox$2);const leftIntersection=cachedObb.intersectsBox(boundingBox$2)&&_intersectsGeometry$1(left,bvh,otherGeometry,geometryToBvh,cachedObb);if(leftIntersection)return true;arrayToBox(BOUNDING_DATA_INDEX(right),float32Array,boundingBox$2);const rightIntersection=cachedObb.intersectsBox(boundingBox$2)&&_intersectsGeometry$1(right,bvh,otherGeometry,geometryToBvh,cachedObb);if(rightIntersection)return true;return false}}const tempMatrix$1=new three.Matrix4;const obb$3=new OrientedBox;const obb2$2=new OrientedBox;const temp1$1=new three.Vector3;const temp2$1=new three.Vector3;const temp3$1=new three.Vector3;const temp4$1=new three.Vector3;function closestPointToGeometry(bvh,otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$3.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);obb$3.needsUpdate=true;const geometry=bvh.geometry;const pos=geometry.attributes.position;const index=geometry.index;const otherPos=otherGeometry.attributes.position;const otherIndex=otherGeometry.index;const triangle=ExtendedTrianglePool.getPrimitive();const triangle2=ExtendedTrianglePool.getPrimitive();let tempTarget1=temp1$1;let tempTargetDest1=temp2$1;let tempTarget2=null;let tempTargetDest2=null;if(target2){tempTarget2=temp3$1;tempTargetDest2=temp4$1}let closestDistance=Infinity;let closestDistanceTriIndex=null;let closestDistanceOtherTriIndex=null;tempMatrix$1.copy(geometryToBvh).invert();obb2$2.matrix.copy(tempMatrix$1);bvh.shapecast({boundsTraverseOrder:box=>{return obb$3.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{if(score<closestDistance&&score<maxThreshold){if(isLeaf){obb2$2.min.copy(box.min);obb2$2.max.copy(box.max);obb2$2.needsUpdate=true}return true}return false},intersectsRange:(offset,count)=>{if(otherGeometry.boundsTree){const otherBvh=otherGeometry.boundsTree;return otherBvh.shapecast({boundsTraverseOrder:box=>{return obb2$2.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistance&&score<maxThreshold},intersectsRange:(otherOffset,otherCount)=>{for(let i2=otherOffset,l2=otherOffset+otherCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){setTriangle(triangle,3*i,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}})}else{const triCount=getTriCount(otherGeometry);for(let i2=0,l2=triCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){setTriangle(triangle,3*i,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}}});ExtendedTrianglePool.releasePrimitive(triangle);ExtendedTrianglePool.releasePrimitive(triangle2);if(closestDistance===Infinity){return null}if(!target1.point){target1.point=tempTargetDest1.clone()}else{target1.point.copy(tempTargetDest1)}target1.distance=closestDistance,target1.faceIndex=closestDistanceTriIndex;if(target2){if(!target2.point)target2.point=tempTargetDest2.clone();else target2.point.copy(tempTargetDest2);target2.point.applyMatrix4(tempMatrix$1);tempTargetDest1.applyMatrix4(tempMatrix$1);target2.distance=tempTargetDest1.sub(target2.point).length();target2.faceIndex=closestDistanceOtherTriIndex}return target1}function refit_indirect(bvh,nodeIndices=null){if(nodeIndices&&Array.isArray(nodeIndices)){nodeIndices=new Set(nodeIndices)}const geometry=bvh.geometry;const indexArr=geometry.index?geometry.index.array:null;const posAttr=geometry.attributes.position;let buffer,uint32Array,uint16Array,float32Array;let byteOffset=0;const roots=bvh._roots;for(let i=0,l=roots.length;i<l;i++){buffer=roots[i];uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);float32Array=new Float32Array(buffer);_traverse(0,byteOffset);byteOffset+=buffer.byteLength}function _traverse(node32Index,byteOffset,force=false){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;for(let i=offset,l=offset+count;i<l;i++){const t=3*bvh.resolveTriangleIndex(i);for(let j=0;j<3;j++){let index=t+j;index=indexArr?indexArr[index]:index;const x=posAttr.getX(index);const y=posAttr.getY(index);const z=posAttr.getZ(index);if(x<minx)minx=x;if(x>maxx)maxx=x;if(y<miny)miny=y;if(y>maxy)maxy=y;if(z<minz)minz=z;if(z>maxz)maxz=z}}if(float32Array[node32Index+0]!==minx||float32Array[node32Index+1]!==miny||float32Array[node32Index+2]!==minz||float32Array[node32Index+3]!==maxx||float32Array[node32Index+4]!==maxy||float32Array[node32Index+5]!==maxz){float32Array[node32Index+0]=minx;float32Array[node32Index+1]=miny;float32Array[node32Index+2]=minz;float32Array[node32Index+3]=maxx;float32Array[node32Index+4]=maxy;float32Array[node32Index+5]=maxz;return true}else{return false}}else{const left=node32Index+8;const right=uint32Array[node32Index+6];const offsetLeft=left+byteOffset;const offsetRight=right+byteOffset;let forceChildren=force;let includesLeft=false;let includesRight=false;if(nodeIndices){if(!forceChildren){includesLeft=nodeIndices.has(offsetLeft);includesRight=nodeIndices.has(offsetRight);forceChildren=!includesLeft&&!includesRight}}else{includesLeft=true;includesRight=true}const traverseLeft=forceChildren||includesLeft;const traverseRight=forceChildren||includesRight;let leftChange=false;if(traverseLeft){leftChange=_traverse(left,byteOffset,forceChildren)}let rightChange=false;if(traverseRight){rightChange=_traverse(right,byteOffset,forceChildren)}const didChange=leftChange||rightChange;if(didChange){for(let i=0;i<3;i++){const lefti=left+i;const righti=right+i;const minLeftValue=float32Array[lefti];const maxLeftValue=float32Array[lefti+3];const minRightValue=float32Array[righti];const maxRightValue=float32Array[righti+3];float32Array[node32Index+i]=minLeftValue<minRightValue?minLeftValue:minRightValue;float32Array[node32Index+i+3]=maxLeftValue>maxRightValue?maxLeftValue:maxRightValue}}return didChange}}}function raycast_indirect(bvh,root,side,ray,intersects){BufferStack.setBuffer(bvh._roots[root]);_raycast(0,bvh,side,ray,intersects);BufferStack.clearBuffer()}function _raycast(nodeIndex32,bvh,side,ray,intersects){const{float32Array,uint16Array,uint32Array}=BufferStack;const nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);intersectTris_indirect(bvh,side,ray,offset,count,intersects)}else{const leftIndex=LEFT_NODE(nodeIndex32);if(intersectRay(leftIndex,float32Array,ray)){_raycast(leftIndex,bvh,side,ray,intersects)}const rightIndex=RIGHT_NODE(nodeIndex32,uint32Array);if(intersectRay(rightIndex,float32Array,ray)){_raycast(rightIndex,bvh,side,ray,intersects)}}}const _xyzFields=["x","y","z"];function raycastFirst_indirect(bvh,root,side,ray){BufferStack.setBuffer(bvh._roots[root]);const result=_raycastFirst(0,bvh,side,ray);BufferStack.clearBuffer();return result}function _raycastFirst(nodeIndex32,bvh,side,ray){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);return intersectClosestTri_indirect(bvh,side,ray,offset,count)}else{const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);const xyzAxis=_xyzFields[splitAxis];const rayDir=ray.direction[xyzAxis];const leftToRight=rayDir>=0;let c1,c2;if(leftToRight){c1=LEFT_NODE(nodeIndex32);c2=RIGHT_NODE(nodeIndex32,uint32Array)}else{c1=RIGHT_NODE(nodeIndex32,uint32Array);c2=LEFT_NODE(nodeIndex32)}const c1Intersection=intersectRay(c1,float32Array,ray);const c1Result=c1Intersection?_raycastFirst(c1,bvh,side,ray):null;if(c1Result){const point=c1Result.point[xyzAxis];const isOutside=leftToRight?point<=float32Array[c2+splitAxis]:point>=float32Array[c2+splitAxis+3];if(isOutside){return c1Result}}const c2Intersection=intersectRay(c2,float32Array,ray);const c2Result=c2Intersection?_raycastFirst(c2,bvh,side,ray):null;if(c1Result&&c2Result){return c1Result.distance<=c2Result.distance?c1Result:c2Result}else{return c1Result||c2Result||null}}}const boundingBox$1=new three.Box3;const triangle=new ExtendedTriangle;const triangle2=new ExtendedTriangle;const invertedMat=new three.Matrix4;const obb$2=new OrientedBox;const obb2$1=new OrientedBox;function intersectsGeometry_indirect(bvh,root,otherGeometry,geometryToBvh){BufferStack.setBuffer(bvh._roots[root]);const result=_intersectsGeometry(0,bvh,otherGeometry,geometryToBvh);BufferStack.clearBuffer();return result}function _intersectsGeometry(nodeIndex32,bvh,otherGeometry,geometryToBvh,cachedObb=null){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;if(cachedObb===null){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$2.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);cachedObb=obb$2}const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const thisGeometry=bvh.geometry;const thisIndex=thisGeometry.index;const thisPos=thisGeometry.attributes.position;const index=otherGeometry.index;const pos=otherGeometry.attributes.position;const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);invertedMat.copy(geometryToBvh).invert();if(otherGeometry.boundsTree){arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,obb2$1);obb2$1.matrix.copy(invertedMat);obb2$1.needsUpdate=true;const res=otherGeometry.boundsTree.shapecast({intersectsBounds:box=>obb2$1.intersectsBox(box),intersectsTriangle:tri=>{tri.a.applyMatrix4(geometryToBvh);tri.b.applyMatrix4(geometryToBvh);tri.c.applyMatrix4(geometryToBvh);tri.needsUpdate=true;for(let i=offset,l=count+offset;i<l;i++){setTriangle(triangle2,3*bvh.resolveTriangleIndex(i),thisIndex,thisPos);triangle2.needsUpdate=true;if(tri.intersectsTriangle(triangle2)){return true}}return false}});return res}else{for(let i=offset,l=count+offset;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,thisIndex,thisPos);triangle.a.applyMatrix4(invertedMat);triangle.b.applyMatrix4(invertedMat);triangle.c.applyMatrix4(invertedMat);triangle.needsUpdate=true;for(let i2=0,l2=index.count;i2<l2;i2+=3){setTriangle(triangle2,i2,index,pos);triangle2.needsUpdate=true;if(triangle.intersectsTriangle(triangle2)){return true}}}}}else{const left=nodeIndex32+8;const right=uint32Array[nodeIndex32+6];arrayToBox(BOUNDING_DATA_INDEX(left),float32Array,boundingBox$1);const leftIntersection=cachedObb.intersectsBox(boundingBox$1)&&_intersectsGeometry(left,bvh,otherGeometry,geometryToBvh,cachedObb);if(leftIntersection)return true;arrayToBox(BOUNDING_DATA_INDEX(right),float32Array,boundingBox$1);const rightIntersection=cachedObb.intersectsBox(boundingBox$1)&&_intersectsGeometry(right,bvh,otherGeometry,geometryToBvh,cachedObb);if(rightIntersection)return true;return false}}const tempMatrix=new three.Matrix4;const obb$1=new OrientedBox;const obb2=new OrientedBox;const temp1=new three.Vector3;const temp2=new three.Vector3;const temp3=new three.Vector3;const temp4=new three.Vector3;function closestPointToGeometry_indirect(bvh,otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$1.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);obb$1.needsUpdate=true;const geometry=bvh.geometry;const pos=geometry.attributes.position;const index=geometry.index;const otherPos=otherGeometry.attributes.position;const otherIndex=otherGeometry.index;const triangle=ExtendedTrianglePool.getPrimitive();const triangle2=ExtendedTrianglePool.getPrimitive();let tempTarget1=temp1;let tempTargetDest1=temp2;let tempTarget2=null;let tempTargetDest2=null;if(target2){tempTarget2=temp3;tempTargetDest2=temp4}let closestDistance=Infinity;let closestDistanceTriIndex=null;let closestDistanceOtherTriIndex=null;tempMatrix.copy(geometryToBvh).invert();obb2.matrix.copy(tempMatrix);bvh.shapecast({boundsTraverseOrder:box=>{return obb$1.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{if(score<closestDistance&&score<maxThreshold){if(isLeaf){obb2.min.copy(box.min);obb2.max.copy(box.max);obb2.needsUpdate=true}return true}return false},intersectsRange:(offset,count)=>{if(otherGeometry.boundsTree){const otherBvh=otherGeometry.boundsTree;return otherBvh.shapecast({boundsTraverseOrder:box=>{return obb2.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistance&&score<maxThreshold},intersectsRange:(otherOffset,otherCount)=>{for(let i2=otherOffset,l2=otherOffset+otherCount;i2<l2;i2++){const ti2=otherBvh.resolveTriangleIndex(i2);setTriangle(triangle2,3*ti2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}})}else{const triCount=getTriCount(otherGeometry);for(let i2=0,l2=triCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}}});ExtendedTrianglePool.releasePrimitive(triangle);ExtendedTrianglePool.releasePrimitive(triangle2);if(closestDistance===Infinity){return null}if(!target1.point){target1.point=tempTargetDest1.clone()}else{target1.point.copy(tempTargetDest1)}target1.distance=closestDistance,target1.faceIndex=closestDistanceTriIndex;if(target2){if(!target2.point)target2.point=tempTargetDest2.clone();else target2.point.copy(tempTargetDest2);target2.point.applyMatrix4(tempMatrix);tempTargetDest1.applyMatrix4(tempMatrix);target2.distance=tempTargetDest1.sub(target2.point).length();target2.faceIndex=closestDistanceOtherTriIndex}return target1}function isSharedArrayBufferSupported(){return typeof SharedArrayBuffer!=="undefined"}function convertToBufferType(array,BufferConstructor){if(array===null){return array}else if(array.buffer){const buffer=array.buffer;if(buffer.constructor===BufferConstructor){return array}const ArrayConstructor=array.constructor;const result=new ArrayConstructor(new BufferConstructor(buffer.byteLength));result.set(array);return result}else{if(array.constructor===BufferConstructor){return array}const result=new BufferConstructor(array.byteLength);new Uint8Array(result).set(new Uint8Array(array));return result}}const _bufferStack1=new BufferStack.constructor;const _bufferStack2=new BufferStack.constructor;const _boxPool=new PrimitivePool(()=>new three.Box3);const _leftBox1=new three.Box3;const _rightBox1=new three.Box3;const _leftBox2=new three.Box3;const _rightBox2=new three.Box3;let _active=false;function bvhcast(bvh,otherBvh,matrixToLocal,intersectsRanges){if(_active){throw new Error("MeshBVH: Recursive calls to bvhcast not supported.")}_active=true;const roots=bvh._roots;const otherRoots=otherBvh._roots;let result;let offset1=0;let offset2=0;const invMat=new three.Matrix4().copy(matrixToLocal).invert();for(let i=0,il=roots.length;i<il;i++){_bufferStack1.setBuffer(roots[i]);offset2=0;const localBox=_boxPool.getPrimitive();arrayToBox(BOUNDING_DATA_INDEX(0),_bufferStack1.float32Array,localBox);localBox.applyMatrix4(invMat);for(let j=0,jl=otherRoots.length;j<jl;j++){_bufferStack2.setBuffer(otherRoots[i]);result=_traverse(0,0,matrixToLocal,invMat,intersectsRanges,offset1,offset2,0,0,localBox);_bufferStack2.clearBuffer();offset2+=otherRoots[j].length;if(result){break}}_boxPool.releasePrimitive(localBox);_bufferStack1.clearBuffer();offset1+=roots[i].length;if(result){break}}_active=false;return result}function _traverse(node1Index32,node2Index32,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset=0,node2IndexByteOffset=0,depth1=0,depth2=0,currBox=null,reversed=false){let bufferStack1,bufferStack2;if(reversed){bufferStack1=_bufferStack2;bufferStack2=_bufferStack1}else{bufferStack1=_bufferStack1;bufferStack2=_bufferStack2}const float32Array1=bufferStack1.float32Array,uint32Array1=bufferStack1.uint32Array,uint16Array1=bufferStack1.uint16Array,float32Array2=bufferStack2.float32Array,uint32Array2=bufferStack2.uint32Array,uint16Array2=bufferStack2.uint16Array;const node1Index16=node1Index32*2;const node2Index16=node2Index32*2;const isLeaf1=IS_LEAF(node1Index16,uint16Array1);const isLeaf2=IS_LEAF(node2Index16,uint16Array2);let result=false;if(isLeaf2&&isLeaf1){if(reversed){result=intersectsRangesFunc(OFFSET(node2Index32,uint32Array2),COUNT(node2Index32*2,uint16Array2),OFFSET(node1Index32,uint32Array1),COUNT(node1Index32*2,uint16Array1),depth2,node2IndexByteOffset+node2Index32,depth1,node1IndexByteOffset+node1Index32)}else{result=intersectsRangesFunc(OFFSET(node1Index32,uint32Array1),COUNT(node1Index32*2,uint16Array1),OFFSET(node2Index32,uint32Array2),COUNT(node2Index32*2,uint16Array2),depth1,node1IndexByteOffset+node1Index32,depth2,node2IndexByteOffset+node2Index32)}}else if(isLeaf2){const newBox=_boxPool.getPrimitive();arrayToBox(BOUNDING_DATA_INDEX(node2Index32),float32Array2,newBox);newBox.applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(node2Index32,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(node2Index32,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}else{const cl2=LEFT_NODE(node2Index32);const cr2=RIGHT_NODE(node2Index32,uint32Array2);arrayToBox(BOUNDING_DATA_INDEX(cl2),float32Array2,_leftBox2);arrayToBox(BOUNDING_DATA_INDEX(cr2),float32Array2,_rightBox2);const leftIntersects=currBox.intersectsBox(_leftBox2);const rightIntersects=currBox.intersectsBox(_rightBox2);if(leftIntersects&&rightIntersects){result=_traverse(node1Index32,cl2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)||_traverse(node1Index32,cr2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else if(leftIntersects){if(isLeaf1){result=_traverse(node1Index32,cl2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else{const newBox=_boxPool.getPrimitive();newBox.copy(_leftBox2).applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(cl2,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(cl2,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}}else if(rightIntersects){if(isLeaf1){result=_traverse(node1Index32,cr2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else{const newBox=_boxPool.getPrimitive();newBox.copy(_rightBox2).applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(cr2,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(cr2,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}}}return result}const obb=new OrientedBox;const tempBox=new three.Box3;const DEFAULT_OPTIONS={strategy:CENTER,maxDepth:40,maxLeafTris:10,useSharedArrayBuffer:false,setBoundingBox:true,onProgress:null,indirect:false,verbose:true};class MeshBVH{static serialize(bvh,options={}){options={cloneBuffers:true,...options};const geometry=bvh.geometry;const rootData=bvh._roots;const indirectBuffer=bvh._indirectBuffer;const indexAttribute=geometry.getIndex();let result;if(options.cloneBuffers){result={roots:rootData.map(root=>root.slice()),index:indexAttribute?indexAttribute.array.slice():null,indirectBuffer:indirectBuffer?indirectBuffer.slice():null}}else{result={roots:rootData,index:indexAttribute?indexAttribute.array:null,indirectBuffer:indirectBuffer}}return result}static deserialize(data,geometry,options={}){options={setIndex:true,indirect:Boolean(data.indirectBuffer),...options};const{index,roots,indirectBuffer}=data;const bvh=new MeshBVH(geometry,{...options,[SKIP_GENERATION]:true});bvh._roots=roots;bvh._indirectBuffer=indirectBuffer||null;if(options.setIndex){const indexAttribute=geometry.getIndex();if(indexAttribute===null){const newIndex=new three.BufferAttribute(data.index,1,false);geometry.setIndex(newIndex)}else if(indexAttribute.array!==index){indexAttribute.array.set(index);indexAttribute.needsUpdate=true}}return bvh}get indirect(){return!!this._indirectBuffer}constructor(geometry,options={}){if(!geometry.isBufferGeometry){throw new Error("MeshBVH: Only BufferGeometries are supported.")}else if(geometry.index&&geometry.index.isInterleavedBufferAttribute){throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}options=Object.assign({...DEFAULT_OPTIONS,[SKIP_GENERATION]:false},options);if(options.useSharedArrayBuffer&&!isSharedArrayBufferSupported()){throw new Error("MeshBVH: SharedArrayBuffer is not available.")}this.geometry=geometry;this._roots=null;this._indirectBuffer=null;if(!options[SKIP_GENERATION]){buildPackedTree(this,options);if(!geometry.boundingBox&&options.setBoundingBox){geometry.boundingBox=this.getBoundingBox(new three.Box3)}}this.resolveTriangleIndex=this._indirectBuffer?i=>this._indirectBuffer[i]:i=>i}refit(nodeIndices=null){const refitFunc=this.indirect?refit_indirect:refit;return refitFunc(this,nodeIndices)}traverse(callback,rootIndex=0){const buffer=this._roots[rootIndex];const uint32Array=new Uint32Array(buffer);const uint16Array=new Uint16Array(buffer);_traverse(0);function _traverse(node32Index,depth=0){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];callback(depth,isLeaf,new Float32Array(buffer,node32Index*4,6),offset,count)}else{const left=node32Index+BYTES_PER_NODE/4;const right=uint32Array[node32Index+6];const splitAxis=uint32Array[node32Index+7];const stopTraversal=callback(depth,isLeaf,new Float32Array(buffer,node32Index*4,6),splitAxis);if(!stopTraversal){_traverse(left,depth+1);_traverse(right,depth+1)}}}}raycast(ray,materialOrSide=three.FrontSide){const roots=this._roots;const geometry=this.geometry;const intersects=[];const isMaterial=materialOrSide.isMaterial;const isArrayMaterial=Array.isArray(materialOrSide);const groups=geometry.groups;const side=isMaterial?materialOrSide.side:materialOrSide;const raycastFunc=this.indirect?raycast_indirect:raycast;for(let i=0,l=roots.length;i<l;i++){const materialSide=isArrayMaterial?materialOrSide[groups[i].materialIndex].side:side;const startCount=intersects.length;raycastFunc(this,i,materialSide,ray,intersects);if(isArrayMaterial){const materialIndex=groups[i].materialIndex;for(let j=startCount,jl=intersects.length;j<jl;j++){intersects[j].face.materialIndex=materialIndex}}}return intersects}raycastFirst(ray,materialOrSide=three.FrontSide){const roots=this._roots;const geometry=this.geometry;const isMaterial=materialOrSide.isMaterial;const isArrayMaterial=Array.isArray(materialOrSide);let closestResult=null;const groups=geometry.groups;const side=isMaterial?materialOrSide.side:materialOrSide;const raycastFirstFunc=this.indirect?raycastFirst_indirect:raycastFirst;for(let i=0,l=roots.length;i<l;i++){const materialSide=isArrayMaterial?materialOrSide[groups[i].materialIndex].side:side;const result=raycastFirstFunc(this,i,materialSide,ray);if(result!=null&&(closestResult==null||result.distance<closestResult.distance)){closestResult=result;if(isArrayMaterial){result.face.materialIndex=groups[i].materialIndex}}}return closestResult}intersectsGeometry(otherGeometry,geomToMesh){let result=false;const roots=this._roots;const intersectsGeometryFunc=this.indirect?intersectsGeometry_indirect:intersectsGeometry;for(let i=0,l=roots.length;i<l;i++){result=intersectsGeometryFunc(this,i,otherGeometry,geomToMesh);if(result){break}}return result}shapecast(callbacks){const triangle=ExtendedTrianglePool.getPrimitive();const iterateFunc=this.indirect?iterateOverTriangles_indirect:iterateOverTriangles;let{boundsTraverseOrder,intersectsBounds,intersectsRange,intersectsTriangle}=callbacks;if(intersectsRange&&intersectsTriangle){const originalIntersectsRange=intersectsRange;intersectsRange=(offset,count,contained,depth,nodeIndex)=>{if(!originalIntersectsRange(offset,count,contained,depth,nodeIndex)){return iterateFunc(offset,count,this,intersectsTriangle,contained,depth,triangle)}return true}}else if(!intersectsRange){if(intersectsTriangle){intersectsRange=(offset,count,contained,depth)=>{return iterateFunc(offset,count,this,intersectsTriangle,contained,depth,triangle)}}else{intersectsRange=(offset,count,contained)=>{return contained}}}let result=false;let byteOffset=0;const roots=this._roots;for(let i=0,l=roots.length;i<l;i++){const root=roots[i];result=shapecast(this,i,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset);if(result){break}byteOffset+=root.byteLength}ExtendedTrianglePool.releasePrimitive(triangle);return result}bvhcast(otherBvh,matrixToLocal,callbacks){let{intersectsRanges,intersectsTriangles}=callbacks;const triangle1=ExtendedTrianglePool.getPrimitive();const indexAttr1=this.geometry.index;const positionAttr1=this.geometry.attributes.position;const assignTriangle1=this.indirect?i1=>{const ti=this.resolveTriangleIndex(i1);setTriangle(triangle1,ti*3,indexAttr1,positionAttr1)}:i1=>{setTriangle(triangle1,i1*3,indexAttr1,positionAttr1)};const triangle2=ExtendedTrianglePool.getPrimitive();const indexAttr2=otherBvh.geometry.index;const positionAttr2=otherBvh.geometry.attributes.position;const assignTriangle2=otherBvh.indirect?i2=>{const ti2=otherBvh.resolveTriangleIndex(i2);setTriangle(triangle2,ti2*3,indexAttr2,positionAttr2)}:i2=>{setTriangle(triangle2,i2*3,indexAttr2,positionAttr2)};if(intersectsTriangles){const iterateOverDoubleTriangles=(offset1,count1,offset2,count2,depth1,index1,depth2,index2)=>{for(let i2=offset2,l2=offset2+count2;i2<l2;i2++){assignTriangle2(i2);triangle2.a.applyMatrix4(matrixToLocal);triangle2.b.applyMatrix4(matrixToLocal);triangle2.c.applyMatrix4(matrixToLocal);triangle2.needsUpdate=true;for(let i1=offset1,l1=offset1+count1;i1<l1;i1++){assignTriangle1(i1);triangle1.needsUpdate=true;if(intersectsTriangles(triangle1,triangle2,i1,i2,depth1,index1,depth2,index2)){return true}}}return false};if(intersectsRanges){const originalIntersectsRanges=intersectsRanges;intersectsRanges=function(offset1,count1,offset2,count2,depth1,index1,depth2,index2){if(!originalIntersectsRanges(offset1,count1,offset2,count2,depth1,index1,depth2,index2)){return iterateOverDoubleTriangles(offset1,count1,offset2,count2,depth1,index1,depth2,index2)}return true}}else{intersectsRanges=iterateOverDoubleTriangles}}return bvhcast(this,otherBvh,matrixToLocal,intersectsRanges)}intersectsBox(box,boxToMesh){obb.set(box.min,box.max,boxToMesh);obb.needsUpdate=true;return this.shapecast({intersectsBounds:box=>obb.intersectsBox(box),intersectsTriangle:tri=>obb.intersectsTriangle(tri)})}intersectsSphere(sphere){return this.shapecast({intersectsBounds:box=>sphere.intersectsBox(box),intersectsTriangle:tri=>tri.intersectsSphere(sphere)})}closestPointToGeometry(otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){const closestPointToGeometryFunc=this.indirect?closestPointToGeometry_indirect:closestPointToGeometry;return closestPointToGeometryFunc(this,otherGeometry,geometryToBvh,target1,target2,minThreshold,maxThreshold)}closestPointToPoint(point,target={},minThreshold=0,maxThreshold=Infinity){return closestPointToPoint(this,point,target,minThreshold,maxThreshold)}getBoundingBox(target){target.makeEmpty();const roots=this._roots;roots.forEach(buffer=>{arrayToBox(0,new Float32Array(buffer),tempBox);target.union(tempBox)});return target}}const boundingBox=new three.Box3;class MeshBVHRootHelper extends three.Object3D{get isMesh(){return!this.displayEdges}get isLineSegments(){return this.displayEdges}get isLine(){return this.displayEdges}constructor(bvh,material,depth=10,group=0){super();this.material=material;this.geometry=new three.BufferGeometry;this.name="MeshBVHRootHelper";this.depth=depth;this.displayParents=false;this.bvh=bvh;this.displayEdges=true;this._group=group}raycast(){}update(){const geometry=this.geometry;const boundsTree=this.bvh;const group=this._group;geometry.dispose();this.visible=false;if(boundsTree){const targetDepth=this.depth-1;const displayParents=this.displayParents;let boundsCount=0;boundsTree.traverse((depth,isLeaf)=>{if(depth>=targetDepth||isLeaf){boundsCount++;return true}else if(displayParents){boundsCount++}},group);let posIndex=0;const positionArray=new Float32Array(8*3*boundsCount);boundsTree.traverse((depth,isLeaf,boundingData)=>{const terminate=depth>=targetDepth||isLeaf;if(terminate||displayParents){arrayToBox(0,boundingData,boundingBox);const{min,max}=boundingBox;for(let x=-1;x<=1;x+=2){const xVal=x<0?min.x:max.x;for(let y=-1;y<=1;y+=2){const yVal=y<0?min.y:max.y;for(let z=-1;z<=1;z+=2){const zVal=z<0?min.z:max.z;positionArray[posIndex+0]=xVal;positionArray[posIndex+1]=yVal;positionArray[posIndex+2]=zVal;posIndex+=3}}}return terminate}},group);let indexArray;let indices;if(this.displayEdges){indices=new Uint8Array([0,4,1,5,2,6,3,7,0,2,1,3,4,6,5,7,0,1,2,3,4,5,6,7])}else{indices=new Uint8Array([0,1,2,2,1,3,4,6,5,6,7,5,1,4,5,0,4,1,2,3,6,3,7,6,0,2,4,2,6,4,1,5,3,3,5,7])}if(positionArray.length>65535){indexArray=new Uint32Array(indices.length*boundsCount)}else{indexArray=new Uint16Array(indices.length*boundsCount)}const indexLength=indices.length;for(let i=0;i<boundsCount;i++){const posOffset=i*8;const indexOffset=i*indexLength;for(let j=0;j<indexLength;j++){indexArray[indexOffset+j]=posOffset+indices[j]}}geometry.setIndex(new three.BufferAttribute(indexArray,1,false));geometry.setAttribute("position",new three.BufferAttribute(positionArray,3,false));this.visible=true}}}class MeshBVHHelper extends three.Group{get color(){return this.edgeMaterial.color}get opacity(){return this.edgeMaterial.opacity}set opacity(v){this.edgeMaterial.opacity=v;this.meshMaterial.opacity=v}constructor(mesh=null,bvh=null,depth=10){if(mesh instanceof MeshBVH){depth=bvh||10;bvh=mesh;mesh=null}if(typeof bvh==="number"){depth=bvh;bvh=null}super();this.name="MeshBVHHelper";this.depth=depth;this.mesh=mesh;this.bvh=bvh;this.displayParents=false;this.displayEdges=true;this._roots=[];const edgeMaterial=new three.LineBasicMaterial({color:65416,transparent:true,opacity:0.3,depthWrite:false});const meshMaterial=new three.MeshBasicMaterial({color:65416,transparent:true,opacity:0.3,depthWrite:false});meshMaterial.color=edgeMaterial.color;this.edgeMaterial=edgeMaterial;this.meshMaterial=meshMaterial;this.update()}update(){const bvh=this.bvh||this.mesh.geometry.boundsTree;const totalRoots=bvh?bvh._roots.length:0;while(this._roots.length>totalRoots){const root=this._roots.pop();root.geometry.dispose();this.remove(root)}for(let i=0;i<totalRoots;i++){const{depth,edgeMaterial,meshMaterial,displayParents,displayEdges}=this;if(i>=this._roots.length){const root=new MeshBVHRootHelper(bvh,edgeMaterial,depth,i);this.add(root);this._roots.push(root)}const root=this._roots[i];root.bvh=bvh;root.depth=depth;root.displayParents=displayParents;root.displayEdges=displayEdges;root.material=displayEdges?edgeMaterial:meshMaterial;root.update()}}updateMatrixWorld(...args){const mesh=this.mesh;const parent=this.parent;if(mesh!==null){mesh.updateWorldMatrix(true,false);if(parent){this.matrix.copy(parent.matrixWorld).invert().multiply(mesh.matrixWorld)}else{this.matrix.copy(mesh.matrixWorld)}this.matrix.decompose(this.position,this.quaternion,this.scale)}super.updateMatrixWorld(...args)}copy(source){this.depth=source.depth;this.mesh=source.mesh;this.bvh=source.bvh;this.opacity=source.opacity;this.color.copy(source.color)}clone(){return new MeshBVHHelper(this.mesh,this.bvh,this.depth)}dispose(){this.edgeMaterial.dispose();this.meshMaterial.dispose();const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].geometry.dispose()}}}class MeshBVHVisualizer extends MeshBVHHelper{constructor(...args){super(...args);console.warn("MeshBVHVisualizer: MeshBVHVisualizer has been deprecated. Use MeshBVHHelper, instead.")}}const _box1=new three.Box3;const _box2=new three.Box3;const _vec=new three.Vector3;function getPrimitiveSize(el){switch(typeof el){case"number":return 8;case"string":return el.length*2;case"boolean":return 4;default:return 0;}}function isTypedArray(arr){const regex=/(Uint|Int|Float)(8|16|32)Array/;return regex.test(arr.constructor.name)}function getRootExtremes(bvh,group){const result={nodeCount:0,leafNodeCount:0,depth:{min:Infinity,max:-Infinity},tris:{min:Infinity,max:-Infinity},splits:[0,0,0],surfaceAreaScore:0};bvh.traverse((depth,isLeaf,boundingData,offsetOrSplit,count)=>{const l0=boundingData[0+3]-boundingData[0];const l1=boundingData[1+3]-boundingData[1];const l2=boundingData[2+3]-boundingData[2];const surfaceArea=2*(l0*l1+l1*l2+l2*l0);result.nodeCount++;if(isLeaf){result.leafNodeCount++;result.depth.min=Math.min(depth,result.depth.min);result.depth.max=Math.max(depth,result.depth.max);result.tris.min=Math.min(count,result.tris.min);result.tris.max=Math.max(count,result.tris.max);result.surfaceAreaScore+=surfaceArea*TRIANGLE_INTERSECT_COST*count}else{result.splits[offsetOrSplit]++;result.surfaceAreaScore+=surfaceArea*TRAVERSAL_COST}},group);if(result.tris.min===Infinity){result.tris.min=0;result.tris.max=0}if(result.depth.min===Infinity){result.depth.min=0;result.depth.max=0}return result}function getBVHExtremes(bvh){return bvh._roots.map((root,i)=>getRootExtremes(bvh,i))}function estimateMemoryInBytes(obj){const traversed=new Set;const stack=[obj];let bytes=0;while(stack.length){const curr=stack.pop();if(traversed.has(curr)){continue}traversed.add(curr);for(let key in curr){if(!curr.hasOwnProperty(key)){continue}bytes+=getPrimitiveSize(key);const value=curr[key];if(value&&(typeof value==="object"||typeof value==="function")){if(isTypedArray(value)){bytes+=value.byteLength}else if(isSharedArrayBufferSupported()&&value instanceof SharedArrayBuffer){bytes+=value.byteLength}else if(value instanceof ArrayBuffer){bytes+=value.byteLength}else{stack.push(value)}}else{bytes+=getPrimitiveSize(value)}}}return bytes}function validateBounds(bvh){const geometry=bvh.geometry;const depthStack=[];const index=geometry.index;const position=geometry.getAttribute("position");let passes=true;bvh.traverse((depth,isLeaf,boundingData,offset,count)=>{const info={depth,isLeaf,boundingData,offset,count};depthStack[depth]=info;arrayToBox(0,boundingData,_box1);const parent=depthStack[depth-1];if(isLeaf){for(let i=offset,l=offset+count;i<l;i++){const triIndex=bvh.resolveTriangleIndex(i);let i0=3*triIndex;let i1=3*triIndex+1;let i2=3*triIndex+2;if(index){i0=index.getX(i0);i1=index.getX(i1);i2=index.getX(i2)}let isContained;_vec.fromBufferAttribute(position,i0);isContained=_box1.containsPoint(_vec);_vec.fromBufferAttribute(position,i1);isContained=isContained&&_box1.containsPoint(_vec);_vec.fromBufferAttribute(position,i2);isContained=isContained&&_box1.containsPoint(_vec);console.assert(isContained,"Leaf bounds does not fully contain triangle.");passes=passes&&isContained}}if(parent){arrayToBox(0,boundingData,_box2);const isContained=_box2.containsBox(_box1);console.assert(isContained,"Parent bounds does not fully contain child.");passes=passes&&isContained}});return passes}function getJSONStructure(bvh){const depthStack=[];bvh.traverse((depth,isLeaf,boundingData,offset,count)=>{const info={bounds:arrayToBox(0,boundingData,new three.Box3)};if(isLeaf){info.count=count;info.offset=offset}else{info.left=null;info.right=null}depthStack[depth]=info;const parent=depthStack[depth-1];if(parent){if(parent.left===null){parent.left=info}else{parent.right=info}}});return depthStack[0]}function convertRaycastIntersect(hit,object,raycaster){if(hit===null){return null}hit.point.applyMatrix4(object.matrixWorld);hit.distance=hit.point.distanceTo(raycaster.ray.origin);hit.object=object;if(hit.distance<raycaster.near||hit.distance>raycaster.far){return null}else{return hit}}const ray=new three.Ray;const tmpInverseMatrix=new three.Matrix4;const origMeshRaycastFunc=three.Mesh.prototype.raycast;function acceleratedRaycast(raycaster,intersects){if(this.geometry.boundsTree){if(this.material===undefined)return;tmpInverseMatrix.copy(this.matrixWorld).invert();ray.copy(raycaster.ray).applyMatrix4(tmpInverseMatrix);const bvh=this.geometry.boundsTree;if(raycaster.firstHitOnly===true){const hit=convertRaycastIntersect(bvh.raycastFirst(ray,this.material),this,raycaster);if(hit){intersects.push(hit)}}else{const hits=bvh.raycast(ray,this.material);for(let i=0,l=hits.length;i<l;i++){const hit=convertRaycastIntersect(hits[i],this,raycaster);if(hit){intersects.push(hit)}}}}else{origMeshRaycastFunc.call(this,raycaster,intersects)}}function computeBoundsTree(options){this.boundsTree=new MeshBVH(this,options);return this.boundsTree}function disposeBoundsTree(){this.boundsTree=null}function countToStringFormat(count){switch(count){case 1:return"R";case 2:return"RG";case 3:return"RGBA";case 4:return"RGBA";}throw new Error}function countToFormat(count){switch(count){case 1:return three.RedFormat;case 2:return three.RGFormat;case 3:return three.RGBAFormat;case 4:return three.RGBAFormat;}}function countToIntFormat(count){switch(count){case 1:return three.RedIntegerFormat;case 2:return three.RGIntegerFormat;case 3:return three.RGBAIntegerFormat;case 4:return three.RGBAIntegerFormat;}}class VertexAttributeTexture extends three.DataTexture{constructor(){super();this.minFilter=three.NearestFilter;this.magFilter=three.NearestFilter;this.generateMipmaps=false;this.overrideItemSize=null;this._forcedType=null}updateFrom(attr){const overrideItemSize=this.overrideItemSize;const originalItemSize=attr.itemSize;const originalCount=attr.count;if(overrideItemSize!==null){if(originalItemSize*originalCount%overrideItemSize!==0){throw new Error("VertexAttributeTexture: overrideItemSize must divide evenly into buffer length.")}attr.itemSize=overrideItemSize;attr.count=originalCount*originalItemSize/overrideItemSize}const itemSize=attr.itemSize;const count=attr.count;const normalized=attr.normalized;const originalBufferCons=attr.array.constructor;const byteCount=originalBufferCons.BYTES_PER_ELEMENT;let targetType=this._forcedType;let finalStride=itemSize;if(targetType===null){switch(originalBufferCons){case Float32Array:targetType=three.FloatType;break;case Uint8Array:case Uint16Array:case Uint32Array:targetType=three.UnsignedIntType;break;case Int8Array:case Int16Array:case Int32Array:targetType=three.IntType;break;}}let type,format,normalizeValue,targetBufferCons;let internalFormat=countToStringFormat(itemSize);switch(targetType){case three.FloatType:normalizeValue=1;format=countToFormat(itemSize);if(normalized&&byteCount===1){targetBufferCons=originalBufferCons;internalFormat+="8";if(originalBufferCons===Uint8Array){type=three.UnsignedByteType}else{type=three.ByteType;internalFormat+="_SNORM"}}else{targetBufferCons=Float32Array;internalFormat+="32F";type=three.FloatType}break;case three.IntType:internalFormat+=byteCount*8+"I";normalizeValue=normalized?Math.pow(2,originalBufferCons.BYTES_PER_ELEMENT*8-1):1;format=countToIntFormat(itemSize);if(byteCount===1){targetBufferCons=Int8Array;type=three.ByteType}else if(byteCount===2){targetBufferCons=Int16Array;type=three.ShortType}else{targetBufferCons=Int32Array;type=three.IntType}break;case three.UnsignedIntType:internalFormat+=byteCount*8+"UI";normalizeValue=normalized?Math.pow(2,originalBufferCons.BYTES_PER_ELEMENT*8-1):1;format=countToIntFormat(itemSize);if(byteCount===1){targetBufferCons=Uint8Array;type=three.UnsignedByteType}else if(byteCount===2){targetBufferCons=Uint16Array;type=three.UnsignedShortType}else{targetBufferCons=Uint32Array;type=three.UnsignedIntType}break;}if(finalStride===3&&(format===three.RGBAFormat||format===three.RGBAIntegerFormat)){finalStride=4}const dimension=Math.ceil(Math.sqrt(count))||1;const length=finalStride*dimension*dimension;const dataArray=new targetBufferCons(length);const originalNormalized=attr.normalized;attr.normalized=false;for(let i=0;i<count;i++){const ii=finalStride*i;dataArray[ii]=attr.getX(i)/normalizeValue;if(itemSize>=2){dataArray[ii+1]=attr.getY(i)/normalizeValue}if(itemSize>=3){dataArray[ii+2]=attr.getZ(i)/normalizeValue;if(finalStride===4){dataArray[ii+3]=1}}if(itemSize>=4){dataArray[ii+3]=attr.getW(i)/normalizeValue}}attr.normalized=originalNormalized;this.internalFormat=internalFormat;this.format=format;this.type=type;this.image.width=dimension;this.image.height=dimension;this.image.data=dataArray;this.needsUpdate=true;this.dispose();attr.itemSize=originalItemSize;attr.count=originalCount}}class UIntVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.UnsignedIntType}}class IntVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.IntType}}class FloatVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.FloatType}}class MeshBVHUniformStruct{constructor(){this.index=new UIntVertexAttributeTexture;this.position=new FloatVertexAttributeTexture;this.bvhBounds=new three.DataTexture;this.bvhContents=new three.DataTexture;this._cachedIndexAttr=null;this.index.overrideItemSize=3}updateFrom(bvh){const{geometry}=bvh;bvhToTextures(bvh,this.bvhBounds,this.bvhContents);this.position.updateFrom(geometry.attributes.position);if(bvh.indirect){const indirectBuffer=bvh._indirectBuffer;if(this._cachedIndexAttr===null||this._cachedIndexAttr.count!==indirectBuffer.length){if(geometry.index){this._cachedIndexAttr=geometry.index.clone()}else{const array=getIndexArray(getVertexCount(geometry));this._cachedIndexAttr=new three.BufferAttribute(array,1,false)}}dereferenceIndex(geometry,indirectBuffer,this._cachedIndexAttr);this.index.updateFrom(this._cachedIndexAttr)}else{this.index.updateFrom(geometry.index)}}dispose(){const{index,position,bvhBounds,bvhContents}=this;if(index)index.dispose();if(position)position.dispose();if(bvhBounds)bvhBounds.dispose();if(bvhContents)bvhContents.dispose()}}function dereferenceIndex(geometry,indirectBuffer,target){const unpacked=target.array;const indexArray=geometry.index?geometry.index.array:null;for(let i=0,l=indirectBuffer.length;i<l;i++){const i3=3*i;const v3=3*indirectBuffer[i];for(let c=0;c<3;c++){unpacked[i3+c]=indexArray?indexArray[v3+c]:v3+c}}}function bvhToTextures(bvh,boundsTexture,contentsTexture){const roots=bvh._roots;if(roots.length!==1){throw new Error("MeshBVHUniformStruct: Multi-root BVHs not supported.")}const root=roots[0];const uint16Array=new Uint16Array(root);const uint32Array=new Uint32Array(root);const float32Array=new Float32Array(root);const nodeCount=root.byteLength/BYTES_PER_NODE;const boundsDimension=2*Math.ceil(Math.sqrt(nodeCount/2));const boundsArray=new Float32Array(4*boundsDimension*boundsDimension);const contentsDimension=Math.ceil(Math.sqrt(nodeCount));const contentsArray=new Uint32Array(2*contentsDimension*contentsDimension);for(let i=0;i<nodeCount;i++){const nodeIndex32=i*BYTES_PER_NODE/4;const nodeIndex16=nodeIndex32*2;const boundsIndex=BOUNDING_DATA_INDEX(nodeIndex32);for(let b=0;b<3;b++){boundsArray[8*i+0+b]=float32Array[boundsIndex+0+b];boundsArray[8*i+4+b]=float32Array[boundsIndex+3+b]}if(IS_LEAF(nodeIndex16,uint16Array)){const count=COUNT(nodeIndex16,uint16Array);const offset=OFFSET(nodeIndex32,uint32Array);const mergedLeafCount=4294901760|count;contentsArray[i*2+0]=mergedLeafCount;contentsArray[i*2+1]=offset}else{const rightIndex=4*RIGHT_NODE(nodeIndex32,uint32Array)/BYTES_PER_NODE;const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);contentsArray[i*2+0]=splitAxis;contentsArray[i*2+1]=rightIndex}}boundsTexture.image.data=boundsArray;boundsTexture.image.width=boundsDimension;boundsTexture.image.height=boundsDimension;boundsTexture.format=three.RGBAFormat;boundsTexture.type=three.FloatType;boundsTexture.internalFormat="RGBA32F";boundsTexture.minFilter=three.NearestFilter;boundsTexture.magFilter=three.NearestFilter;boundsTexture.generateMipmaps=false;boundsTexture.needsUpdate=true;boundsTexture.dispose();contentsTexture.image.data=contentsArray;contentsTexture.image.width=contentsDimension;contentsTexture.image.height=contentsDimension;contentsTexture.format=three.RGIntegerFormat;contentsTexture.type=three.UnsignedIntType;contentsTexture.internalFormat="RG32UI";contentsTexture.minFilter=three.NearestFilter;contentsTexture.magFilter=three.NearestFilter;contentsTexture.generateMipmaps=false;contentsTexture.needsUpdate=true;contentsTexture.dispose()}const _positionVector=new three.Vector3;const _normalVector=new three.Vector3;const _tangentVector=new three.Vector3;const _tangentVector4=new three.Vector4;const _morphVector=new three.Vector3;const _temp=new three.Vector3;const _skinIndex=new three.Vector4;const _skinWeight=new three.Vector4;const _matrix=new three.Matrix4;const _boneMatrix=new three.Matrix4;function validateAttributes(attr1,attr2){if(!attr1&&!attr2){return}const sameCount=attr1.count===attr2.count;const sameNormalized=attr1.normalized===attr2.normalized;const sameType=attr1.array.constructor===attr2.array.constructor;const sameItemSize=attr1.itemSize===attr2.itemSize;if(!sameCount||!sameNormalized||!sameType||!sameItemSize){throw new Error}}function createAttributeClone(attr,countOverride=null){const cons=attr.array.constructor;const normalized=attr.normalized;const itemSize=attr.itemSize;const count=countOverride===null?attr.count:countOverride;return new three.BufferAttribute(new cons(itemSize*count),itemSize,normalized)}function copyAttributeContents(attr,target,targetOffset=0){if(attr.isInterleavedBufferAttribute){const itemSize=attr.itemSize;for(let i=0,l=attr.count;i<l;i++){const io=i+targetOffset;target.setX(io,attr.getX(i));if(itemSize>=2)target.setY(io,attr.getY(i));if(itemSize>=3)target.setZ(io,attr.getZ(i));if(itemSize>=4)target.setW(io,attr.getW(i))}}else{const array=target.array;const cons=array.constructor;const byteOffset=array.BYTES_PER_ELEMENT*attr.itemSize*targetOffset;const temp=new cons(array.buffer,byteOffset,attr.array.length);temp.set(attr.array)}}function addScaledMatrix(target,matrix,scale){const targetArray=target.elements;const matrixArray=matrix.elements;for(let i=0,l=matrixArray.length;i<l;i++){targetArray[i]+=matrixArray[i]*scale}}function boneNormalTransform(mesh,index,target){const skeleton=mesh.skeleton;const geometry=mesh.geometry;const bones=skeleton.bones;const boneInverses=skeleton.boneInverses;_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex,index);_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight,index);_matrix.elements.fill(0);for(let i=0;i<4;i++){const weight=_skinWeight.getComponent(i);if(weight!==0){const boneIndex=_skinIndex.getComponent(i);_boneMatrix.multiplyMatrices(bones[boneIndex].matrixWorld,boneInverses[boneIndex]);addScaledMatrix(_matrix,_boneMatrix,weight)}}_matrix.multiply(mesh.bindMatrix).premultiply(mesh.bindMatrixInverse);target.transformDirection(_matrix);return target}function applyMorphTarget(morphData,morphInfluences,morphTargetsRelative,i,target){_morphVector.set(0,0,0);for(let j=0,jl=morphData.length;j<jl;j++){const influence=morphInfluences[j];const morphAttribute=morphData[j];if(influence===0)continue;_temp.fromBufferAttribute(morphAttribute,i);if(morphTargetsRelative){_morphVector.addScaledVector(_temp,influence)}else{_morphVector.addScaledVector(_temp.sub(target),influence)}}target.add(_morphVector)}function mergeBufferGeometries(geometries,options={useGroups:false,updateIndex:false,skipAttributes:[]},targetGeometry=new three.BufferGeometry){const isIndexed=geometries[0].index!==null;const{useGroups=false,updateIndex=false,skipAttributes=[]}=options;const attributesUsed=new Set(Object.keys(geometries[0].attributes));const attributes={};let offset=0;targetGeometry.clearGroups();for(let i=0;i<geometries.length;++i){const geometry=geometries[i];let attributesCount=0;if(isIndexed!==(geometry.index!==null)){throw new Error("StaticGeometryGenerator: All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.")}for(const name in geometry.attributes){if(!attributesUsed.has(name)){throw new Error("StaticGeometryGenerator: All geometries must have compatible attributes; make sure \""+name+"\" attribute exists among all geometries, or in none of them.")}if(attributes[name]===undefined){attributes[name]=[]}attributes[name].push(geometry.attributes[name]);attributesCount++}if(attributesCount!==attributesUsed.size){throw new Error("StaticGeometryGenerator: Make sure all geometries have the same number of attributes.")}if(useGroups){let count;if(isIndexed){count=geometry.index.count}else if(geometry.attributes.position!==undefined){count=geometry.attributes.position.count}else{throw new Error("StaticGeometryGenerator: The geometry must have either an index or a position attribute")}targetGeometry.addGroup(offset,count,i);offset+=count}}if(isIndexed){let forceUpdateIndex=false;if(!targetGeometry.index){let indexCount=0;for(let i=0;i<geometries.length;++i){indexCount+=geometries[i].index.count}targetGeometry.setIndex(new three.BufferAttribute(new Uint32Array(indexCount),1,false));forceUpdateIndex=true}if(updateIndex||forceUpdateIndex){const targetIndex=targetGeometry.index;let targetOffset=0;let indexOffset=0;for(let i=0;i<geometries.length;++i){const geometry=geometries[i];const index=geometry.index;if(skipAttributes[i]!==true){for(let j=0;j<index.count;++j){targetIndex.setX(targetOffset,index.getX(j)+indexOffset);targetOffset++}}indexOffset+=geometry.attributes.position.count}}}for(const name in attributes){const attrList=attributes[name];if(!(name in targetGeometry.attributes)){let count=0;for(const key in attrList){count+=attrList[key].count}targetGeometry.setAttribute(name,createAttributeClone(attributes[name][0],count))}const targetAttribute=targetGeometry.attributes[name];let offset=0;for(let i=0,l=attrList.length;i<l;i++){const attr=attrList[i];if(skipAttributes[i]!==true){copyAttributeContents(attr,targetAttribute,offset)}offset+=attr.count}}return targetGeometry}function checkTypedArrayEquality(a,b){if(a===null||b===null){return a===b}if(a.length!==b.length){return false}for(let i=0,l=a.length;i<l;i++){if(a[i]!==b[i]){return false}}return true}function invertGeometry(geometry){const{index,attributes}=geometry;if(index){for(let i=0,l=index.count;i<l;i+=3){const v0=index.getX(i);const v2=index.getX(i+2);index.setX(i,v2);index.setX(i+2,v0)}}else{for(const key in attributes){const attr=attributes[key];const itemSize=attr.itemSize;for(let i=0,l=attr.count;i<l;i+=3){for(let j=0;j<itemSize;j++){const v0=attr.getComponent(i,j);const v2=attr.getComponent(i+2,j);attr.setComponent(i,j,v2);attr.setComponent(i+2,j,v0)}}}}return geometry}class GeometryDiff{constructor(mesh){this.matrixWorld=new three.Matrix4;this.geometryHash=null;this.boneMatrices=null;this.primitiveCount=-1;this.mesh=mesh;this.update()}update(){const mesh=this.mesh;const geometry=mesh.geometry;const skeleton=mesh.skeleton;const primitiveCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;this.matrixWorld.copy(mesh.matrixWorld);this.geometryHash=geometry.attributes.position.version;this.primitiveCount=primitiveCount;if(skeleton){if(!skeleton.boneTexture){skeleton.computeBoneTexture()}skeleton.update();const boneMatrices=skeleton.boneMatrices;if(!this.boneMatrices||this.boneMatrices.length!==boneMatrices.length){this.boneMatrices=boneMatrices.slice()}else{this.boneMatrices.set(boneMatrices)}}else{this.boneMatrices=null}}didChange(){const mesh=this.mesh;const geometry=mesh.geometry;const primitiveCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;const identical=this.matrixWorld.equals(mesh.matrixWorld)&&this.geometryHash===geometry.attributes.position.version&&checkTypedArrayEquality(mesh.skeleton&&mesh.skeleton.boneMatrices||null,this.boneMatrices)&&this.primitiveCount===primitiveCount;return!identical}}class StaticGeometryGenerator{constructor(meshes){if(!Array.isArray(meshes)){meshes=[meshes]}const finalMeshes=[];meshes.forEach(object=>{object.traverseVisible(c=>{if(c.isMesh){finalMeshes.push(c)}})});this.meshes=finalMeshes;this.useGroups=true;this.applyWorldTransforms=true;this.attributes=["position","normal","color","tangent","uv","uv2"];this._intermediateGeometry=new Array(finalMeshes.length).fill().map(()=>new three.BufferGeometry);this._diffMap=new WeakMap}getMaterials(){const materials=[];this.meshes.forEach(mesh=>{if(Array.isArray(mesh.material)){materials.push(...mesh.material)}else{materials.push(mesh.material)}});return materials}generate(targetGeometry=new three.BufferGeometry){let skipAttributes=[];const{meshes,useGroups,_intermediateGeometry,_diffMap}=this;for(let i=0,l=meshes.length;i<l;i++){const mesh=meshes[i];const geom=_intermediateGeometry[i];const diff=_diffMap.get(mesh);if(!diff||diff.didChange(mesh)){this._convertToStaticGeometry(mesh,geom);skipAttributes.push(false);if(!diff){_diffMap.set(mesh,new GeometryDiff(mesh))}else{diff.update()}}else{skipAttributes.push(true)}}if(_intermediateGeometry.length===0){targetGeometry.setIndex(null);const attrs=targetGeometry.attributes;for(const key in attrs){targetGeometry.deleteAttribute(key)}for(const key in this.attributes){targetGeometry.setAttribute(this.attributes[key],new three.BufferAttribute(new Float32Array(0),4,false))}}else{mergeBufferGeometries(_intermediateGeometry,{useGroups,skipAttributes},targetGeometry)}for(const key in targetGeometry.attributes){targetGeometry.attributes[key].needsUpdate=true}return targetGeometry}_convertToStaticGeometry(mesh,targetGeometry=new three.BufferGeometry){const geometry=mesh.geometry;const applyWorldTransforms=this.applyWorldTransforms;const includeNormal=this.attributes.includes("normal");const includeTangent=this.attributes.includes("tangent");const attributes=geometry.attributes;const targetAttributes=targetGeometry.attributes;if(!targetGeometry.index&&geometry.index){targetGeometry.index=geometry.index.clone()}if(!targetAttributes.position){targetGeometry.setAttribute("position",createAttributeClone(attributes.position))}if(includeNormal&&!targetAttributes.normal&&attributes.normal){targetGeometry.setAttribute("normal",createAttributeClone(attributes.normal))}if(includeTangent&&!targetAttributes.tangent&&attributes.tangent){targetGeometry.setAttribute("tangent",createAttributeClone(attributes.tangent))}validateAttributes(geometry.index,targetGeometry.index);validateAttributes(attributes.position,targetAttributes.position);if(includeNormal){validateAttributes(attributes.normal,targetAttributes.normal)}if(includeTangent){validateAttributes(attributes.tangent,targetAttributes.tangent)}const position=attributes.position;const normal=includeNormal?attributes.normal:null;const tangent=includeTangent?attributes.tangent:null;const morphPosition=geometry.morphAttributes.position;const morphNormal=geometry.morphAttributes.normal;const morphTangent=geometry.morphAttributes.tangent;const morphTargetsRelative=geometry.morphTargetsRelative;const morphInfluences=mesh.morphTargetInfluences;const normalMatrix=new three.Matrix3;normalMatrix.getNormalMatrix(mesh.matrixWorld);if(geometry.index){targetGeometry.index.array.set(geometry.index.array)}for(let i=0,l=attributes.position.count;i<l;i++){_positionVector.fromBufferAttribute(position,i);if(normal){_normalVector.fromBufferAttribute(normal,i)}if(tangent){_tangentVector4.fromBufferAttribute(tangent,i);_tangentVector.fromBufferAttribute(tangent,i)}if(morphInfluences){if(morphPosition){applyMorphTarget(morphPosition,morphInfluences,morphTargetsRelative,i,_positionVector)}if(morphNormal){applyMorphTarget(morphNormal,morphInfluences,morphTargetsRelative,i,_normalVector)}if(morphTangent){applyMorphTarget(morphTangent,morphInfluences,morphTargetsRelative,i,_tangentVector)}}if(mesh.isSkinnedMesh){mesh.applyBoneTransform(i,_positionVector);if(normal){boneNormalTransform(mesh,i,_normalVector)}if(tangent){boneNormalTransform(mesh,i,_tangentVector)}}if(applyWorldTransforms){_positionVector.applyMatrix4(mesh.matrixWorld)}targetAttributes.position.setXYZ(i,_positionVector.x,_positionVector.y,_positionVector.z);if(normal){if(applyWorldTransforms){_normalVector.applyNormalMatrix(normalMatrix)}targetAttributes.normal.setXYZ(i,_normalVector.x,_normalVector.y,_normalVector.z)}if(tangent){if(applyWorldTransforms){_tangentVector.transformDirection(mesh.matrixWorld)}targetAttributes.tangent.setXYZW(i,_tangentVector.x,_tangentVector.y,_tangentVector.z,_tangentVector4.w)}}for(const i in this.attributes){const key=this.attributes[i];if(key==="position"||key==="tangent"||key==="normal"||!(key in attributes)){continue}if(!targetAttributes[key]){targetGeometry.setAttribute(key,createAttributeClone(attributes[key]))}validateAttributes(attributes[key],targetAttributes[key]);copyAttributeContents(attributes[key],targetAttributes[key])}if(mesh.matrixWorld.determinant()<0){invertGeometry(targetGeometry)}return targetGeometry}}const common_functions=`

// A stack of uint32 indices can can store the indices for
// a perfectly balanced tree with a depth up to 31. Lower stack
// depth gets higher performance.
//
// However not all trees are balanced. Best value to set this to
// is the trees max depth.
#ifndef BVH_STACK_DEPTH
#define BVH_STACK_DEPTH 60
#endif

#ifndef INFINITY
#define INFINITY 1e20
#endif

// Utilities
uvec4 uTexelFetch1D( usampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

ivec4 iTexelFetch1D( isampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

vec4 texelFetch1D( sampler2D tex, uint index ) {

	uint width = uint( textureSize( tex, 0 ).x );
	uvec2 uv;
	uv.x = index % width;
	uv.y = index / width;

	return texelFetch( tex, ivec2( uv ), 0 );

}

vec4 textureSampleBarycoord( sampler2D tex, vec3 barycoord, uvec3 faceIndices ) {

	return
		barycoord.x * texelFetch1D( tex, faceIndices.x ) +
		barycoord.y * texelFetch1D( tex, faceIndices.y ) +
		barycoord.z * texelFetch1D( tex, faceIndices.z );

}

void ndcToCameraRay(
	vec2 coord, mat4 cameraWorld, mat4 invProjectionMatrix,
	out vec3 rayOrigin, out vec3 rayDirection
) {

	// get camera look direction and near plane for camera clipping
	vec4 lookDirection = cameraWorld * vec4( 0.0, 0.0, - 1.0, 0.0 );
	vec4 nearVector = invProjectionMatrix * vec4( 0.0, 0.0, - 1.0, 1.0 );
	float near = abs( nearVector.z / nearVector.w );

	// get the camera direction and position from camera matrices
	vec4 origin = cameraWorld * vec4( 0.0, 0.0, 0.0, 1.0 );
	vec4 direction = invProjectionMatrix * vec4( coord, 0.5, 1.0 );
	direction /= direction.w;
	direction = cameraWorld * direction - origin;

	// slide the origin along the ray until it sits at the near clip plane position
	origin.xyz += direction.xyz * near / dot( direction, lookDirection );

	rayOrigin = origin.xyz;
	rayDirection = direction.xyz;

}
`;const bvh_distance_functions=`

float dot2( vec3 v ) {

	return dot( v, v );

}

// https://www.shadertoy.com/view/ttfGWl
vec3 closestPointToTriangle( vec3 p, vec3 v0, vec3 v1, vec3 v2, out vec3 barycoord ) {

    vec3 v10 = v1 - v0;
    vec3 v21 = v2 - v1;
    vec3 v02 = v0 - v2;

	vec3 p0 = p - v0;
	vec3 p1 = p - v1;
	vec3 p2 = p - v2;

    vec3 nor = cross( v10, v02 );

    // method 2, in barycentric space
    vec3  q = cross( nor, p0 );
    float d = 1.0 / dot2( nor );
    float u = d * dot( q, v02 );
    float v = d * dot( q, v10 );
    float w = 1.0 - u - v;

	if( u < 0.0 ) {

		w = clamp( dot( p2, v02 ) / dot2( v02 ), 0.0, 1.0 );
		u = 0.0;
		v = 1.0 - w;

	} else if( v < 0.0 ) {

		u = clamp( dot( p0, v10 ) / dot2( v10 ), 0.0, 1.0 );
		v = 0.0;
		w = 1.0 - u;

	} else if( w < 0.0 ) {

		v = clamp( dot( p1, v21 ) / dot2( v21 ), 0.0, 1.0 );
		w = 0.0;
		u = 1.0-v;

	}

	barycoord = vec3( u, v, w );
    return u * v1 + v * v2 + w * v0;

}

float distanceToTriangles(
	// geometry info and triangle range
	sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count,

	// point and cut off range
	vec3 point, float closestDistanceSquared,

	// outputs
	inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord, inout float side, inout vec3 outPoint
) {

	bool found = false;
	vec3 localBarycoord;
	for ( uint i = offset, l = offset + count; i < l; i ++ ) {

		uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz;
		vec3 a = texelFetch1D( positionAttr, indices.x ).rgb;
		vec3 b = texelFetch1D( positionAttr, indices.y ).rgb;
		vec3 c = texelFetch1D( positionAttr, indices.z ).rgb;

		// get the closest point and barycoord
		vec3 closestPoint = closestPointToTriangle( point, a, b, c, localBarycoord );
		vec3 delta = point - closestPoint;
		float sqDist = dot2( delta );
		if ( sqDist < closestDistanceSquared ) {

			// set the output results
			closestDistanceSquared = sqDist;
			faceIndices = uvec4( indices.xyz, i );
			faceNormal = normalize( cross( a - b, b - c ) );
			barycoord = localBarycoord;
			outPoint = closestPoint;
			side = sign( dot( faceNormal, delta ) );

		}

	}

	return closestDistanceSquared;

}

float distanceSqToBounds( vec3 point, vec3 boundsMin, vec3 boundsMax ) {

	vec3 clampedPoint = clamp( point, boundsMin, boundsMax );
	vec3 delta = point - clampedPoint;
	return dot( delta, delta );

}

float distanceSqToBVHNodeBoundsPoint( vec3 point, sampler2D bvhBounds, uint currNodeIndex ) {

	uint cni2 = currNodeIndex * 2u;
	vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz;
	vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz;
	return distanceSqToBounds( point, boundsMin, boundsMax );

}

// use a macro to hide the fact that we need to expand the struct into separate fields
#define\
	bvhClosestPointToPoint(\
		bvh,\
		point, faceIndices, faceNormal, barycoord, side, outPoint\
	)\
	_bvhClosestPointToPoint(\
		bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents,\
		point, faceIndices, faceNormal, barycoord, side, outPoint\
	)

float _bvhClosestPointToPoint(
	// bvh info
	sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents,

	// point to check
	vec3 point,

	// output variables
	inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
	inout float side, inout vec3 outPoint
 ) {

	// stack needs to be twice as long as the deepest tree we expect because
	// we push both the left and right child onto the stack every traversal
	int ptr = 0;
	uint stack[ BVH_STACK_DEPTH ];
	stack[ 0 ] = 0u;

	float closestDistanceSquared = pow( 100000.0, 2.0 );
	bool found = false;
	while ( ptr > - 1 && ptr < BVH_STACK_DEPTH ) {

		uint currNodeIndex = stack[ ptr ];
		ptr --;

		// check if we intersect the current bounds
		float boundsHitDistance = distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, currNodeIndex );
		if ( boundsHitDistance > closestDistanceSquared ) {

			continue;

		}

		uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy;
		bool isLeaf = bool( boundsInfo.x & 0xffff0000u );
		if ( isLeaf ) {

			uint count = boundsInfo.x & 0x0000ffffu;
			uint offset = boundsInfo.y;
			closestDistanceSquared = distanceToTriangles(
				bvh_position, bvh_index, offset, count, point, closestDistanceSquared,

				// outputs
				faceIndices, faceNormal, barycoord, side, outPoint
			);

		} else {

			uint leftIndex = currNodeIndex + 1u;
			uint splitAxis = boundsInfo.x & 0x0000ffffu;
			uint rightIndex = boundsInfo.y;
			bool leftToRight = distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, leftIndex ) < distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, rightIndex );//rayDirection[ splitAxis ] >= 0.0;
			uint c1 = leftToRight ? leftIndex : rightIndex;
			uint c2 = leftToRight ? rightIndex : leftIndex;

			// set c2 in the stack so we traverse it later. We need to keep track of a pointer in
			// the stack while we traverse. The second pointer added is the one that will be
			// traversed first
			ptr ++;
			stack[ ptr ] = c2;
			ptr ++;
			stack[ ptr ] = c1;

		}

	}

	return sqrt( closestDistanceSquared );

}
`;const bvh_ray_functions=`

#ifndef TRI_INTERSECT_EPSILON
#define TRI_INTERSECT_EPSILON 1e-5
#endif

// Raycasting
bool intersectsBounds( vec3 rayOrigin, vec3 rayDirection, vec3 boundsMin, vec3 boundsMax, out float dist ) {

	// https://www.reddit.com/r/opengl/comments/8ntzz5/fast_glsl_ray_box_intersection/
	// https://tavianator.com/2011/ray_box.html
	vec3 invDir = 1.0 / rayDirection;

	// find intersection distances for each plane
	vec3 tMinPlane = invDir * ( boundsMin - rayOrigin );
	vec3 tMaxPlane = invDir * ( boundsMax - rayOrigin );

	// get the min and max distances from each intersection
	vec3 tMinHit = min( tMaxPlane, tMinPlane );
	vec3 tMaxHit = max( tMaxPlane, tMinPlane );

	// get the furthest hit distance
	vec2 t = max( tMinHit.xx, tMinHit.yz );
	float t0 = max( t.x, t.y );

	// get the minimum hit distance
	t = min( tMaxHit.xx, tMaxHit.yz );
	float t1 = min( t.x, t.y );

	// set distance to 0.0 if the ray starts inside the box
	dist = max( t0, 0.0 );

	return t1 >= dist;

}

bool intersectsTriangle(
	vec3 rayOrigin, vec3 rayDirection, vec3 a, vec3 b, vec3 c,
	out vec3 barycoord, out vec3 norm, out float dist, out float side
) {

	// https://stackoverflow.com/questions/42740765/intersection-between-line-and-triangle-in-3d
	vec3 edge1 = b - a;
	vec3 edge2 = c - a;
	norm = cross( edge1, edge2 );

	float det = - dot( rayDirection, norm );
	float invdet = 1.0 / det;

	vec3 AO = rayOrigin - a;
	vec3 DAO = cross( AO, rayDirection );

	vec4 uvt;
	uvt.x = dot( edge2, DAO ) * invdet;
	uvt.y = - dot( edge1, DAO ) * invdet;
	uvt.z = dot( AO, norm ) * invdet;
	uvt.w = 1.0 - uvt.x - uvt.y;

	// set the hit information
	barycoord = uvt.wxy; // arranged in A, B, C order
	dist = uvt.z;
	side = sign( det );
	norm = side * normalize( norm );

	// add an epsilon to avoid misses between triangles
	uvt += vec4( TRI_INTERSECT_EPSILON );

	return all( greaterThanEqual( uvt, vec4( 0.0 ) ) );

}

bool intersectTriangles(
	// geometry info and triangle range
	sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count,

	// ray
	vec3 rayOrigin, vec3 rayDirection,

	// outputs
	inout float minDistance, inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
	inout float side, inout float dist
) {

	bool found = false;
	vec3 localBarycoord, localNormal;
	float localDist, localSide;
	for ( uint i = offset, l = offset + count; i < l; i ++ ) {

		uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz;
		vec3 a = texelFetch1D( positionAttr, indices.x ).rgb;
		vec3 b = texelFetch1D( positionAttr, indices.y ).rgb;
		vec3 c = texelFetch1D( positionAttr, indices.z ).rgb;

		if (
			intersectsTriangle( rayOrigin, rayDirection, a, b, c, localBarycoord, localNormal, localDist, localSide )
			&& localDist < minDistance
		) {

			found = true;
			minDistance = localDist;

			faceIndices = uvec4( indices.xyz, i );
			faceNormal = localNormal;

			side = localSide;
			barycoord = localBarycoord;
			dist = localDist;

		}

	}

	return found;

}

bool intersectsBVHNodeBounds( vec3 rayOrigin, vec3 rayDirection, sampler2D bvhBounds, uint currNodeIndex, out float dist ) {

	uint cni2 = currNodeIndex * 2u;
	vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz;
	vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz;
	return intersectsBounds( rayOrigin, rayDirection, boundsMin, boundsMax, dist );

}

// use a macro to hide the fact that we need to expand the struct into separate fields
#define\
	bvhIntersectFirstHit(\
		bvh,\
		rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist\
	)\
	_bvhIntersectFirstHit(\
		bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents,\
		rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist\
	)

bool _bvhIntersectFirstHit(
	// bvh info
	sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents,

	// ray
	vec3 rayOrigin, vec3 rayDirection,

	// output variables split into separate variables due to output precision
	inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
	inout float side, inout float dist
) {

	// stack needs to be twice as long as the deepest tree we expect because
	// we push both the left and right child onto the stack every traversal
	int ptr = 0;
	uint stack[ BVH_STACK_DEPTH ];
	stack[ 0 ] = 0u;

	float triangleDistance = INFINITY;
	bool found = false;
	while ( ptr > - 1 && ptr < BVH_STACK_DEPTH ) {

		uint currNodeIndex = stack[ ptr ];
		ptr --;

		// check if we intersect the current bounds
		float boundsHitDistance;
		if (
			! intersectsBVHNodeBounds( rayOrigin, rayDirection, bvh_bvhBounds, currNodeIndex, boundsHitDistance )
			|| boundsHitDistance > triangleDistance
		) {

			continue;

		}

		uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy;
		bool isLeaf = bool( boundsInfo.x & 0xffff0000u );

		if ( isLeaf ) {

			uint count = boundsInfo.x & 0x0000ffffu;
			uint offset = boundsInfo.y;

			found = intersectTriangles(
				bvh_position, bvh_index, offset, count,
				rayOrigin, rayDirection, triangleDistance,
				faceIndices, faceNormal, barycoord, side, dist
			) || found;

		} else {

			uint leftIndex = currNodeIndex + 1u;
			uint splitAxis = boundsInfo.x & 0x0000ffffu;
			uint rightIndex = boundsInfo.y;

			bool leftToRight = rayDirection[ splitAxis ] >= 0.0;
			uint c1 = leftToRight ? leftIndex : rightIndex;
			uint c2 = leftToRight ? rightIndex : leftIndex;

			// set c2 in the stack so we traverse it later. We need to keep track of a pointer in
			// the stack while we traverse. The second pointer added is the one that will be
			// traversed first
			ptr ++;
			stack[ ptr ] = c2;

			ptr ++;
			stack[ ptr ] = c1;

		}

	}

	return found;

}
`;const bvh_struct_definitions=`
struct BVH {

	usampler2D index;
	sampler2D position;

	sampler2D bvhBounds;
	usampler2D bvhContents;

};
`;var BVHShaderGLSL=Object.freeze({__proto__:null,bvh_distance_functions:bvh_distance_functions,bvh_ray_functions:bvh_ray_functions,bvh_struct_definitions:bvh_struct_definitions,common_functions:common_functions});const shaderStructs=bvh_struct_definitions;const shaderDistanceFunction=bvh_distance_functions;const shaderIntersectFunction=`
	${common_functions}
	${bvh_ray_functions}
`;exports.AVERAGE=AVERAGE;exports.BVHShaderGLSL=BVHShaderGLSL;exports.CENTER=CENTER;exports.CONTAINED=CONTAINED;exports.ExtendedTriangle=ExtendedTriangle;exports.FloatVertexAttributeTexture=FloatVertexAttributeTexture;exports.INTERSECTED=INTERSECTED;exports.IntVertexAttributeTexture=IntVertexAttributeTexture;exports.MeshBVH=MeshBVH;exports.MeshBVHHelper=MeshBVHHelper;exports.MeshBVHUniformStruct=MeshBVHUniformStruct;exports.NOT_INTERSECTED=NOT_INTERSECTED;exports.OrientedBox=OrientedBox;exports.SAH=SAH;exports.StaticGeometryGenerator=StaticGeometryGenerator;exports.UIntVertexAttributeTexture=UIntVertexAttributeTexture;exports.VertexAttributeTexture=VertexAttributeTexture;exports.acceleratedRaycast=acceleratedRaycast;exports.computeBoundsTree=computeBoundsTree;exports.disposeBoundsTree=disposeBoundsTree;exports.estimateMemoryInBytes=estimateMemoryInBytes;exports.getBVHExtremes=getBVHExtremes;exports.getJSONStructure=getJSONStructure;exports.getTriangleHitPointInfo=getTriangleHitPointInfo;exports.shaderDistanceFunction=shaderDistanceFunction;exports.shaderIntersectFunction=shaderIntersectFunction;exports.shaderStructs=shaderStructs;exports.validateBounds=validateBounds;Object.defineProperty(exports,"__esModule",{value:true});three.BufferGeometry.prototype.computeBoundsTree=computeBoundsTree;three.BufferGeometry.prototype.disposeBoundsTree=disposeBoundsTree;three.Mesh.prototype.raycast=acceleratedRaycast});THREE.MeshoptDecoder=function(){"use strict";var wasm_base="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb";var wasm_simd="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb";var detector=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]);var wasmpack=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!=="object"){return{supported:false}}var wasm=WebAssembly.validate(detector)?wasm_simd:wasm_base;var instance;var ready=WebAssembly.instantiate(unpack(wasm),{}).then(function(result){instance=result.instance;instance.exports.__wasm_call_ctors()});function unpack(data){var result=new Uint8Array(data.length);for(var i=0;i<data.length;++i){var ch=data.charCodeAt(i);result[i]=ch>96?ch-97:ch>64?ch-39:ch+4}var write=0;for(var i=0;i<data.length;++i){result[write++]=result[i]<60?wasmpack[result[i]]:(result[i]-60)*64+result[++i]}return result.buffer.slice(0,write)}function decode(fun,target,count,size,source,filter){var sbrk=instance.exports.sbrk;var count4=count+3&~3;var tp=sbrk(count4*size);var sp=sbrk(source.length);var heap=new Uint8Array(instance.exports.memory.buffer);heap.set(source,sp);var res=fun(tp,count,size,sp,source.length);if(res==0&&filter){filter(tp,count4,size)}target.set(heap.subarray(tp,tp+count*size));sbrk(tp-sbrk(0));if(res!=0){throw new Error("Malformed buffer data: "+res)}}var filters={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"};var decoders={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};var workers=[];var requestId=0;function createWorker(url){var worker={object:new Worker(url),pending:0,requests:{}};worker.object.onmessage=function(event){var data=event.data;worker.pending-=data.count;worker.requests[data.id][data.action](data.value);delete worker.requests[data.id]};return worker}function initWorkers(count){var source="var instance; var ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(unpack(wasm))+"]), {})"+".then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });"+"self.onmessage = workerProcess;"+decode.toString()+workerProcess.toString();var blob=new Blob([source],{type:"text/javascript"});var url=URL.createObjectURL(blob);for(var i=0;i<count;++i){workers[i]=createWorker(url)}URL.revokeObjectURL(url)}function decodeWorker(count,size,source,mode,filter){var worker=workers[0];for(var i=1;i<workers.length;++i){if(workers[i].pending<worker.pending){worker=workers[i]}}return new Promise(function(resolve,reject){var data=new Uint8Array(source);var id=requestId++;worker.pending+=count;worker.requests[id]={resolve:resolve,reject:reject};worker.object.postMessage({id:id,count:count,size:size,source:data,mode:mode,filter:filter},[data.buffer])})}function workerProcess(event){ready.then(function(){var data=event.data;try{var target=new Uint8Array(data.count*data.size);decode(instance.exports[data.mode],target,data.count,data.size,data.source,instance.exports[data.filter]);self.postMessage({id:data.id,count:data.count,action:"resolve",value:target},[target.buffer])}catch(error){self.postMessage({id:data.id,count:data.count,action:"reject",value:error})}})}return{ready:ready,supported:true,useWorkers:function(count){initWorkers(count)},decodeVertexBuffer:function(target,count,size,source,filter){decode(instance.exports.meshopt_decodeVertexBuffer,target,count,size,source,instance.exports[filters[filter]])},decodeIndexBuffer:function(target,count,size,source){decode(instance.exports.meshopt_decodeIndexBuffer,target,count,size,source)},decodeIndexSequence:function(target,count,size,source){decode(instance.exports.meshopt_decodeIndexSequence,target,count,size,source)},decodeGltfBuffer:function(target,count,size,source,mode,filter){decode(instance.exports[decoders[mode]],target,count,size,source,instance.exports[filters[filter]])},decodeGltfBufferAsync:function(count,size,source,mode,filter){if(workers.length>0){return decodeWorker(count,size,source,decoders[mode],filters[filter])}return ready.then(function(){var target=new Uint8Array(count*size);decode(instance.exports[decoders[mode]],target,count,size,source,instance.exports[filters[filter]]);return target})}}}();(function(t,e){e(t.THREE=t.THREE||{})})(this,function(THREE){var Color=THREE.Color,Vector3=THREE.Vector3;class Face3{constructor(a,b,c,normal,color,materialIndex=0){this.a=a;this.b=b;this.c=c;this.normal=normal&&normal.isVector3?normal:new Vector3;this.vertexNormals=Array.isArray(normal)?normal:[];this.color=color&&color.isColor?color:new Color;this.vertexColors=Array.isArray(color)?color:[];this.materialIndex=materialIndex}clone(){return new this.constructor().copy(this)}copy(source){this.a=source.a;this.b=source.b;this.c=source.c;this.normal.copy(source.normal);this.color.copy(source.color);this.materialIndex=source.materialIndex;for(let i=0,il=source.vertexNormals.length;i<il;i++){this.vertexNormals[i]=source.vertexNormals[i].clone()}for(let i=0,il=source.vertexColors.length;i<il;i++){this.vertexColors[i]=source.vertexColors[i].clone()}return this}}THREE.Face3=Face3});(function(t,e){e(t.THREE=t.THREE||{})})(this,function(THREE){var Box3=THREE.Box3,BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,Color=THREE.Color,EventDispatcher=THREE.EventDispatcher,Float32BufferAttribute=THREE.Float32BufferAttribute,Matrix3=THREE.Matrix3,Matrix4=THREE.Matrix4,MathUtils=THREE.MathUtils,Object3D=THREE.Object3D,Sphere=THREE.Sphere,Vector2=THREE.Vector2,Vector3=THREE.Vector3;const _m1=new Matrix4;const _obj=new Object3D;const _offset=new Vector3;class Geometry extends EventDispatcher{constructor(){super();this.uuid=MathUtils.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingBox=null;this.boundingSphere=null;this.elementsNeedUpdate=false;this.verticesNeedUpdate=false;this.uvsNeedUpdate=false;this.normalsNeedUpdate=false;this.colorsNeedUpdate=false;this.lineDistancesNeedUpdate=false;this.groupsNeedUpdate=false}applyMatrix4(matrix){const normalMatrix=new Matrix3().getNormalMatrix(matrix);for(let i=0,il=this.vertices.length;i<il;i++){const vertex=this.vertices[i];vertex.applyMatrix4(matrix)}for(let i=0,il=this.faces.length;i<il;i++){const face=this.faces[i];face.normal.applyMatrix3(normalMatrix).normalize();for(let j=0,jl=face.vertexNormals.length;j<jl;j++){face.vertexNormals[j].applyMatrix3(normalMatrix).normalize()}}if(this.boundingBox!==null){this.computeBoundingBox()}if(this.boundingSphere!==null){this.computeBoundingSphere()}this.verticesNeedUpdate=true;this.normalsNeedUpdate=true;return this}rotateX(angle){_m1.makeRotationX(angle);this.applyMatrix4(_m1);return this}rotateY(angle){_m1.makeRotationY(angle);this.applyMatrix4(_m1);return this}rotateZ(angle){_m1.makeRotationZ(angle);this.applyMatrix4(_m1);return this}translate(x,y,z){_m1.makeTranslation(x,y,z);this.applyMatrix4(_m1);return this}scale(x,y,z){_m1.makeScale(x,y,z);this.applyMatrix4(_m1);return this}lookAt(vector){_obj.lookAt(vector);_obj.updateMatrix();this.applyMatrix4(_obj.matrix);return this}fromBufferGeometry(geometry){const scope=this;const index=geometry.index!==null?geometry.index:undefined;const attributes=geometry.attributes;if(attributes.position===undefined){console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion.");return this}const position=attributes.position;const normal=attributes.normal;const color=attributes.color;const uv=attributes.uv;const uv2=attributes.uv2;if(uv2!==undefined)this.faceVertexUvs[1]=[];for(let i=0;i<position.count;i++){scope.vertices.push(new Vector3().fromBufferAttribute(position,i));if(color!==undefined){scope.colors.push(new Color().fromBufferAttribute(color,i))}}function addFace(a,b,c,materialIndex){const vertexColors=color===undefined?[]:[scope.colors[a].clone(),scope.colors[b].clone(),scope.colors[c].clone()];const vertexNormals=normal===undefined?[]:[new Vector3().fromBufferAttribute(normal,a),new Vector3().fromBufferAttribute(normal,b),new Vector3().fromBufferAttribute(normal,c)];const face=new Face3(a,b,c,vertexNormals,vertexColors,materialIndex);scope.faces.push(face);if(uv!==undefined){scope.faceVertexUvs[0].push([new Vector2().fromBufferAttribute(uv,a),new Vector2().fromBufferAttribute(uv,b),new Vector2().fromBufferAttribute(uv,c)])}if(uv2!==undefined){scope.faceVertexUvs[1].push([new Vector2().fromBufferAttribute(uv2,a),new Vector2().fromBufferAttribute(uv2,b),new Vector2().fromBufferAttribute(uv2,c)])}}const groups=geometry.groups;if(groups.length>0){for(let i=0;i<groups.length;i++){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){if(index!==undefined){addFace(index.getX(j),index.getX(j+1),index.getX(j+2),group.materialIndex)}else{addFace(j,j+1,j+2,group.materialIndex)}}}}else{if(index!==undefined){for(let i=0;i<index.count;i+=3){addFace(index.getX(i),index.getX(i+1),index.getX(i+2))}}else{for(let i=0;i<position.count;i+=3){addFace(i,i+1,i+2)}}}this.computeFaceNormals();if(geometry.boundingBox!==null){this.boundingBox=geometry.boundingBox.clone()}if(geometry.boundingSphere!==null){this.boundingSphere=geometry.boundingSphere.clone()}return this}center(){this.computeBoundingBox();this.boundingBox.getCenter(_offset).negate();this.translate(_offset.x,_offset.y,_offset.z);return this}normalize(){this.computeBoundingSphere();const center=this.boundingSphere.center;const radius=this.boundingSphere.radius;const s=radius===0?1:1/radius;const matrix=new Matrix4;matrix.set(s,0,0,-s*center.x,0,s,0,-s*center.y,0,0,s,-s*center.z,0,0,0,1);this.applyMatrix4(matrix);return this}computeFaceNormals(){const cb=new Vector3,ab=new Vector3;for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const vA=this.vertices[face.a];const vB=this.vertices[face.b];const vC=this.vertices[face.c];cb.subVectors(vC,vB);ab.subVectors(vA,vB);cb.cross(ab);cb.normalize();face.normal.copy(cb)}}computeVertexNormals(areaWeighted=true){const vertices=new Array(this.vertices.length);for(let v=0,vl=this.vertices.length;v<vl;v++){vertices[v]=new Vector3}if(areaWeighted){const cb=new Vector3,ab=new Vector3;for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const vA=this.vertices[face.a];const vB=this.vertices[face.b];const vC=this.vertices[face.c];cb.subVectors(vC,vB);ab.subVectors(vA,vB);cb.cross(ab);vertices[face.a].add(cb);vertices[face.b].add(cb);vertices[face.c].add(cb)}}else{this.computeFaceNormals();for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];vertices[face.a].add(face.normal);vertices[face.b].add(face.normal);vertices[face.c].add(face.normal)}}for(let v=0,vl=this.vertices.length;v<vl;v++){vertices[v].normalize()}for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const vertexNormals=face.vertexNormals;if(vertexNormals.length===3){vertexNormals[0].copy(vertices[face.a]);vertexNormals[1].copy(vertices[face.b]);vertexNormals[2].copy(vertices[face.c])}else{vertexNormals[0]=vertices[face.a].clone();vertexNormals[1]=vertices[face.b].clone();vertexNormals[2]=vertices[face.c].clone()}}if(this.faces.length>0){this.normalsNeedUpdate=true}}computeFlatVertexNormals(){this.computeFaceNormals();for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const vertexNormals=face.vertexNormals;if(vertexNormals.length===3){vertexNormals[0].copy(face.normal);vertexNormals[1].copy(face.normal);vertexNormals[2].copy(face.normal)}else{vertexNormals[0]=face.normal.clone();vertexNormals[1]=face.normal.clone();vertexNormals[2]=face.normal.clone()}}if(this.faces.length>0){this.normalsNeedUpdate=true}}computeMorphNormals(){for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];if(!face.__originalFaceNormal){face.__originalFaceNormal=face.normal.clone()}else{face.__originalFaceNormal.copy(face.normal)}if(!face.__originalVertexNormals)face.__originalVertexNormals=[];for(let i=0,il=face.vertexNormals.length;i<il;i++){if(!face.__originalVertexNormals[i]){face.__originalVertexNormals[i]=face.vertexNormals[i].clone()}else{face.__originalVertexNormals[i].copy(face.vertexNormals[i])}}}const tmpGeo=new Geometry;tmpGeo.faces=this.faces;for(let i=0,il=this.morphTargets.length;i<il;i++){if(!this.morphNormals[i]){this.morphNormals[i]={};this.morphNormals[i].faceNormals=[];this.morphNormals[i].vertexNormals=[];const dstNormalsFace=this.morphNormals[i].faceNormals;const dstNormalsVertex=this.morphNormals[i].vertexNormals;for(let f=0,fl=this.faces.length;f<fl;f++){const faceNormal=new Vector3;const vertexNormals={a:new Vector3,b:new Vector3,c:new Vector3};dstNormalsFace.push(faceNormal);dstNormalsVertex.push(vertexNormals)}}const morphNormals=this.morphNormals[i];tmpGeo.vertices=this.morphTargets[i].vertices;tmpGeo.computeFaceNormals();tmpGeo.computeVertexNormals();for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];const faceNormal=morphNormals.faceNormals[f];const vertexNormals=morphNormals.vertexNormals[f];faceNormal.copy(face.normal);vertexNormals.a.copy(face.vertexNormals[0]);vertexNormals.b.copy(face.vertexNormals[1]);vertexNormals.c.copy(face.vertexNormals[2])}}for(let f=0,fl=this.faces.length;f<fl;f++){const face=this.faces[f];face.normal=face.__originalFaceNormal;face.vertexNormals=face.__originalVertexNormals}}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}this.boundingBox.setFromPoints(this.vertices)}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}this.boundingSphere.setFromPoints(this.vertices)}merge(geometry,matrix,materialIndexOffset=0){if(!(geometry&&geometry.isGeometry)){console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",geometry);return}let normalMatrix;const vertexOffset=this.vertices.length,vertices1=this.vertices,vertices2=geometry.vertices,faces1=this.faces,faces2=geometry.faces,colors1=this.colors,colors2=geometry.colors;if(matrix!==undefined){normalMatrix=new Matrix3().getNormalMatrix(matrix)}for(let i=0,il=vertices2.length;i<il;i++){const vertex=vertices2[i];const vertexCopy=vertex.clone();if(matrix!==undefined)vertexCopy.applyMatrix4(matrix);vertices1.push(vertexCopy)}for(let i=0,il=colors2.length;i<il;i++){colors1.push(colors2[i].clone())}for(let i=0,il=faces2.length;i<il;i++){const face=faces2[i];let normal,color;const faceVertexNormals=face.vertexNormals,faceVertexColors=face.vertexColors;const faceCopy=new Face3(face.a+vertexOffset,face.b+vertexOffset,face.c+vertexOffset);faceCopy.normal.copy(face.normal);if(normalMatrix!==undefined){faceCopy.normal.applyMatrix3(normalMatrix).normalize()}for(let j=0,jl=faceVertexNormals.length;j<jl;j++){normal=faceVertexNormals[j].clone();if(normalMatrix!==undefined){normal.applyMatrix3(normalMatrix).normalize()}faceCopy.vertexNormals.push(normal)}faceCopy.color.copy(face.color);for(let j=0,jl=faceVertexColors.length;j<jl;j++){color=faceVertexColors[j];faceCopy.vertexColors.push(color.clone())}faceCopy.materialIndex=face.materialIndex+materialIndexOffset;faces1.push(faceCopy)}for(let i=0,il=geometry.faceVertexUvs.length;i<il;i++){const faceVertexUvs2=geometry.faceVertexUvs[i];if(this.faceVertexUvs[i]===undefined)this.faceVertexUvs[i]=[];for(let j=0,jl=faceVertexUvs2.length;j<jl;j++){const uvs2=faceVertexUvs2[j],uvsCopy=[];for(let k=0,kl=uvs2.length;k<kl;k++){uvsCopy.push(uvs2[k].clone())}this.faceVertexUvs[i].push(uvsCopy)}}}mergeMesh(mesh){if(!(mesh&&mesh.isMesh)){console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",mesh);return}if(mesh.matrixAutoUpdate)mesh.updateMatrix();this.merge(mesh.geometry,mesh.matrix)}mergeVertices(precisionPoints=4){const verticesMap={};const unique=[],changes=[];const precision=Math.pow(10,precisionPoints);for(let i=0,il=this.vertices.length;i<il;i++){const v=this.vertices[i];const key=Math.round(v.x*precision)+"_"+Math.round(v.y*precision)+"_"+Math.round(v.z*precision);if(verticesMap[key]===undefined){verticesMap[key]=i;unique.push(this.vertices[i]);changes[i]=unique.length-1}else{changes[i]=changes[verticesMap[key]]}}const faceIndicesToRemove=[];for(let i=0,il=this.faces.length;i<il;i++){const face=this.faces[i];face.a=changes[face.a];face.b=changes[face.b];face.c=changes[face.c];const indices=[face.a,face.b,face.c];for(let n=0;n<3;n++){if(indices[n]===indices[(n+1)%3]){faceIndicesToRemove.push(i);break}}}for(let i=faceIndicesToRemove.length-1;i>=0;i--){const idx=faceIndicesToRemove[i];this.faces.splice(idx,1);for(let j=0,jl=this.faceVertexUvs.length;j<jl;j++){this.faceVertexUvs[j].splice(idx,1)}}const diff=this.vertices.length-unique.length;this.vertices=unique;return diff}setFromPoints(points){this.vertices=[];for(let i=0,l=points.length;i<l;i++){const point=points[i];this.vertices.push(new Vector3(point.x,point.y,point.z||0))}return this}sortFacesByMaterialIndex(){const faces=this.faces;const length=faces.length;for(let i=0;i<length;i++){faces[i]._id=i}function materialIndexSort(a,b){return a.materialIndex-b.materialIndex}faces.sort(materialIndexSort);const uvs1=this.faceVertexUvs[0];const uvs2=this.faceVertexUvs[1];let newUvs1,newUvs2;if(uvs1&&uvs1.length===length)newUvs1=[];if(uvs2&&uvs2.length===length)newUvs2=[];for(let i=0;i<length;i++){const id=faces[i]._id;if(newUvs1)newUvs1.push(uvs1[id]);if(newUvs2)newUvs2.push(uvs2[id])}if(newUvs1)this.faceVertexUvs[0]=newUvs1;if(newUvs2)this.faceVertexUvs[1]=newUvs2}toJSON(){const data={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(this.parameters!==undefined){const parameters=this.parameters;for(const key in parameters){if(parameters[key]!==undefined)data[key]=parameters[key]}return data}const vertices=[];for(let i=0;i<this.vertices.length;i++){const vertex=this.vertices[i];vertices.push(vertex.x,vertex.y,vertex.z)}const faces=[];const normals=[];const normalsHash={};const colors=[];const colorsHash={};const uvs=[];const uvsHash={};for(let i=0;i<this.faces.length;i++){const face=this.faces[i];const hasMaterial=true;const hasFaceUv=false;const hasFaceVertexUv=this.faceVertexUvs[0][i]!==undefined;const hasFaceNormal=face.normal.length()>0;const hasFaceVertexNormal=face.vertexNormals.length>0;const hasFaceColor=face.color.r!==1||face.color.g!==1||face.color.b!==1;const hasFaceVertexColor=face.vertexColors.length>0;let faceType=0;faceType=setBit(faceType,0,0);faceType=setBit(faceType,1,hasMaterial);faceType=setBit(faceType,2,hasFaceUv);faceType=setBit(faceType,3,hasFaceVertexUv);faceType=setBit(faceType,4,hasFaceNormal);faceType=setBit(faceType,5,hasFaceVertexNormal);faceType=setBit(faceType,6,hasFaceColor);faceType=setBit(faceType,7,hasFaceVertexColor);faces.push(faceType);faces.push(face.a,face.b,face.c);faces.push(face.materialIndex);if(hasFaceVertexUv){const faceVertexUvs=this.faceVertexUvs[0][i];faces.push(getUvIndex(faceVertexUvs[0]),getUvIndex(faceVertexUvs[1]),getUvIndex(faceVertexUvs[2]))}if(hasFaceNormal){faces.push(getNormalIndex(face.normal))}if(hasFaceVertexNormal){const vertexNormals=face.vertexNormals;faces.push(getNormalIndex(vertexNormals[0]),getNormalIndex(vertexNormals[1]),getNormalIndex(vertexNormals[2]))}if(hasFaceColor){faces.push(getColorIndex(face.color))}if(hasFaceVertexColor){const vertexColors=face.vertexColors;faces.push(getColorIndex(vertexColors[0]),getColorIndex(vertexColors[1]),getColorIndex(vertexColors[2]))}}function setBit(value,position,enabled){return enabled?value|1<<position:value&~(1<<position)}function getNormalIndex(normal){const hash=normal.x.toString()+normal.y.toString()+normal.z.toString();if(normalsHash[hash]!==undefined){return normalsHash[hash]}normalsHash[hash]=normals.length/3;normals.push(normal.x,normal.y,normal.z);return normalsHash[hash]}function getColorIndex(color){const hash=color.r.toString()+color.g.toString()+color.b.toString();if(colorsHash[hash]!==undefined){return colorsHash[hash]}colorsHash[hash]=colors.length;colors.push(color.getHex());return colorsHash[hash]}function getUvIndex(uv){const hash=uv.x.toString()+uv.y.toString();if(uvsHash[hash]!==undefined){return uvsHash[hash]}uvsHash[hash]=uvs.length/2;uvs.push(uv.x,uv.y);return uvsHash[hash]}data.data={};data.data.vertices=vertices;data.data.normals=normals;if(colors.length>0)data.data.colors=colors;if(uvs.length>0)data.data.uvs=[uvs];data.data.faces=faces;return data}clone(){return new Geometry().copy(this)}copy(source){this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingBox=null;this.boundingSphere=null;this.name=source.name;const vertices=source.vertices;for(let i=0,il=vertices.length;i<il;i++){this.vertices.push(vertices[i].clone())}const colors=source.colors;for(let i=0,il=colors.length;i<il;i++){this.colors.push(colors[i].clone())}const faces=source.faces;for(let i=0,il=faces.length;i<il;i++){this.faces.push(faces[i].clone())}for(let i=0,il=source.faceVertexUvs.length;i<il;i++){const faceVertexUvs=source.faceVertexUvs[i];if(this.faceVertexUvs[i]===undefined){this.faceVertexUvs[i]=[]}for(let j=0,jl=faceVertexUvs.length;j<jl;j++){const uvs=faceVertexUvs[j],uvsCopy=[];for(let k=0,kl=uvs.length;k<kl;k++){const uv=uvs[k];uvsCopy.push(uv.clone())}this.faceVertexUvs[i].push(uvsCopy)}}const morphTargets=source.morphTargets;for(let i=0,il=morphTargets.length;i<il;i++){const morphTarget={};morphTarget.name=morphTargets[i].name;if(morphTargets[i].vertices!==undefined){morphTarget.vertices=[];for(let j=0,jl=morphTargets[i].vertices.length;j<jl;j++){morphTarget.vertices.push(morphTargets[i].vertices[j].clone())}}if(morphTargets[i].normals!==undefined){morphTarget.normals=[];for(let j=0,jl=morphTargets[i].normals.length;j<jl;j++){morphTarget.normals.push(morphTargets[i].normals[j].clone())}}this.morphTargets.push(morphTarget)}const morphNormals=source.morphNormals;for(let i=0,il=morphNormals.length;i<il;i++){const morphNormal={};if(morphNormals[i].vertexNormals!==undefined){morphNormal.vertexNormals=[];for(let j=0,jl=morphNormals[i].vertexNormals.length;j<jl;j++){const srcVertexNormal=morphNormals[i].vertexNormals[j];const destVertexNormal={};destVertexNormal.a=srcVertexNormal.a.clone();destVertexNormal.b=srcVertexNormal.b.clone();destVertexNormal.c=srcVertexNormal.c.clone();morphNormal.vertexNormals.push(destVertexNormal)}}if(morphNormals[i].faceNormals!==undefined){morphNormal.faceNormals=[];for(let j=0,jl=morphNormals[i].faceNormals.length;j<jl;j++){morphNormal.faceNormals.push(morphNormals[i].faceNormals[j].clone())}}this.morphNormals.push(morphNormal)}const skinWeights=source.skinWeights;for(let i=0,il=skinWeights.length;i<il;i++){this.skinWeights.push(skinWeights[i].clone())}const skinIndices=source.skinIndices;for(let i=0,il=skinIndices.length;i<il;i++){this.skinIndices.push(skinIndices[i].clone())}const lineDistances=source.lineDistances;for(let i=0,il=lineDistances.length;i<il;i++){this.lineDistances.push(lineDistances[i])}const boundingBox=source.boundingBox;if(boundingBox!==null){this.boundingBox=boundingBox.clone()}const boundingSphere=source.boundingSphere;if(boundingSphere!==null){this.boundingSphere=boundingSphere.clone()}this.elementsNeedUpdate=source.elementsNeedUpdate;this.verticesNeedUpdate=source.verticesNeedUpdate;this.uvsNeedUpdate=source.uvsNeedUpdate;this.normalsNeedUpdate=source.normalsNeedUpdate;this.colorsNeedUpdate=source.colorsNeedUpdate;this.lineDistancesNeedUpdate=source.lineDistancesNeedUpdate;this.groupsNeedUpdate=source.groupsNeedUpdate;return this}toBufferGeometry(){const geometry=new DirectGeometry().fromGeometry(this);const buffergeometry=new BufferGeometry;const positions=new Float32Array(geometry.vertices.length*3);buffergeometry.setAttribute("position",copyVector3sArray(new BufferAttribute(positions,3),geometry.vertices));if(geometry.normals.length>0){const normals=new Float32Array(geometry.normals.length*3);buffergeometry.setAttribute("normal",copyVector3sArray(new BufferAttribute(normals,3),geometry.normals))}if(geometry.colors.length>0){const colors=new Float32Array(geometry.colors.length*3);buffergeometry.setAttribute("color",copyColorsArray(new BufferAttribute(colors,3),geometry.colors))}if(geometry.uvs.length>0){const uvs=new Float32Array(geometry.uvs.length*2);buffergeometry.setAttribute("uv",copyVector2sArray(new BufferAttribute(uvs,2),geometry.uvs))}if(geometry.uvs2.length>0){const uvs2=new Float32Array(geometry.uvs2.length*2);buffergeometry.setAttribute("uv2",copyVector2sArray(new BufferAttribute(uvs2,2),geometry.uvs2))}buffergeometry.groups=geometry.groups;for(const name in geometry.morphTargets){const array=[];const morphTargets=geometry.morphTargets[name];for(let i=0,l=morphTargets.length;i<l;i++){const morphTarget=morphTargets[i];const attribute=new Float32BufferAttribute(morphTarget.data.length*3,3);attribute.name=morphTarget.name;array.push(copyVector3sArray(attribute,morphTarget.data))}buffergeometry.morphAttributes[name]=array}if(geometry.skinIndices.length>0){const skinIndices=new Float32BufferAttribute(geometry.skinIndices.length*4,4);buffergeometry.setAttribute("skinIndex",copyVector4sArray(skinIndices,geometry.skinIndices))}if(geometry.skinWeights.length>0){const skinWeights=new Float32BufferAttribute(geometry.skinWeights.length*4,4);buffergeometry.setAttribute("skinWeight",copyVector4sArray(skinWeights,geometry.skinWeights))}if(geometry.boundingSphere!==null){buffergeometry.boundingSphere=geometry.boundingSphere.clone()}if(geometry.boundingBox!==null){buffergeometry.boundingBox=geometry.boundingBox.clone()}return buffergeometry}computeTangents(){console.error("THREE.Geometry: .computeTangents() has been removed.")}computeLineDistances(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}applyMatrix(matrix){console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().");return this.applyMatrix4(matrix)}dispose(){this.dispatchEvent({type:"dispose"})}static createBufferGeometryFromObject(object){let buffergeometry=new BufferGeometry;const geometry=object.geometry;if(object.isPoints||object.isLine){const positions=new Float32BufferAttribute(geometry.vertices.length*3,3);const colors=new Float32BufferAttribute(geometry.colors.length*3,3);buffergeometry.setAttribute("position",copyVector3sArray(positions,geometry.vertices));buffergeometry.setAttribute("color",copyColorsArray(colors,geometry.colors));if(geometry.lineDistances&&geometry.lineDistances.length===geometry.vertices.length){const lineDistances=new Float32BufferAttribute(geometry.lineDistances.length,1);buffergeometry.setAttribute("lineDistance",lineDistances.copyArray(geometry.lineDistances))}if(geometry.boundingSphere!==null){buffergeometry.boundingSphere=geometry.boundingSphere.clone()}if(geometry.boundingBox!==null){buffergeometry.boundingBox=geometry.boundingBox.clone()}}else if(object.isMesh){buffergeometry=geometry.toBufferGeometry()}return buffergeometry}}Geometry.prototype.isGeometry=true;class DirectGeometry{constructor(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingBox=null;this.boundingSphere=null;this.verticesNeedUpdate=false;this.normalsNeedUpdate=false;this.colorsNeedUpdate=false;this.uvsNeedUpdate=false;this.groupsNeedUpdate=false}computeGroups(geometry){const groups=[];let group,i;let materialIndex=undefined;const faces=geometry.faces;for(i=0;i<faces.length;i++){const face=faces[i];if(face.materialIndex!==materialIndex){materialIndex=face.materialIndex;if(group!==undefined){group.count=i*3-group.start;groups.push(group)}group={start:i*3,materialIndex:materialIndex}}}if(group!==undefined){group.count=i*3-group.start;groups.push(group)}this.groups=groups}fromGeometry(geometry){const faces=geometry.faces;const vertices=geometry.vertices;const faceVertexUvs=geometry.faceVertexUvs;const hasFaceVertexUv=faceVertexUvs[0]&&faceVertexUvs[0].length>0;const hasFaceVertexUv2=faceVertexUvs[1]&&faceVertexUvs[1].length>0;const morphTargets=geometry.morphTargets;const morphTargetsLength=morphTargets.length;let morphTargetsPosition;if(morphTargetsLength>0){morphTargetsPosition=[];for(let i=0;i<morphTargetsLength;i++){morphTargetsPosition[i]={name:morphTargets[i].name,data:[]}}this.morphTargets.position=morphTargetsPosition}const morphNormals=geometry.morphNormals;const morphNormalsLength=morphNormals.length;let morphTargetsNormal;if(morphNormalsLength>0){morphTargetsNormal=[];for(let i=0;i<morphNormalsLength;i++){morphTargetsNormal[i]={name:morphNormals[i].name,data:[]}}this.morphTargets.normal=morphTargetsNormal}const skinIndices=geometry.skinIndices;const skinWeights=geometry.skinWeights;const hasSkinIndices=skinIndices.length===vertices.length;const hasSkinWeights=skinWeights.length===vertices.length;if(vertices.length>0&&faces.length===0){console.error("THREE.DirectGeometry: Faceless geometries are not supported.")}for(let i=0;i<faces.length;i++){const face=faces[i];this.vertices.push(vertices[face.a],vertices[face.b],vertices[face.c]);const vertexNormals=face.vertexNormals;if(vertexNormals.length===3){this.normals.push(vertexNormals[0],vertexNormals[1],vertexNormals[2])}else{const normal=face.normal;this.normals.push(normal,normal,normal)}const vertexColors=face.vertexColors;if(vertexColors.length===3){this.colors.push(vertexColors[0],vertexColors[1],vertexColors[2])}else{const color=face.color;this.colors.push(color,color,color)}if(hasFaceVertexUv===true){const vertexUvs=faceVertexUvs[0][i];if(vertexUvs!==undefined){this.uvs.push(vertexUvs[0],vertexUvs[1],vertexUvs[2])}else{console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",i);this.uvs.push(new Vector2,new Vector2,new Vector2)}}if(hasFaceVertexUv2===true){const vertexUvs=faceVertexUvs[1][i];if(vertexUvs!==undefined){this.uvs2.push(vertexUvs[0],vertexUvs[1],vertexUvs[2])}else{console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",i);this.uvs2.push(new Vector2,new Vector2,new Vector2)}}for(let j=0;j<morphTargetsLength;j++){const morphTarget=morphTargets[j].vertices;morphTargetsPosition[j].data.push(morphTarget[face.a],morphTarget[face.b],morphTarget[face.c])}for(let j=0;j<morphNormalsLength;j++){const morphNormal=morphNormals[j].vertexNormals[i];morphTargetsNormal[j].data.push(morphNormal.a,morphNormal.b,morphNormal.c)}if(hasSkinIndices){this.skinIndices.push(skinIndices[face.a],skinIndices[face.b],skinIndices[face.c])}if(hasSkinWeights){this.skinWeights.push(skinWeights[face.a],skinWeights[face.b],skinWeights[face.c])}}this.computeGroups(geometry);this.verticesNeedUpdate=geometry.verticesNeedUpdate;this.normalsNeedUpdate=geometry.normalsNeedUpdate;this.colorsNeedUpdate=geometry.colorsNeedUpdate;this.uvsNeedUpdate=geometry.uvsNeedUpdate;this.groupsNeedUpdate=geometry.groupsNeedUpdate;if(geometry.boundingSphere!==null){this.boundingSphere=geometry.boundingSphere.clone()}if(geometry.boundingBox!==null){this.boundingBox=geometry.boundingBox.clone()}return this}}function copyColorsArray(bufferAttribute,colors){const array=bufferAttribute.array;let offset=0;for(let i=0,l=colors.length;i<l;i++){let color=colors[i];if(color===undefined){console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i);color=new Color}if(bufferAttribute.normalized){array[offset++]=normalize(color.r,array);array[offset++]=normalize(color.g,array);array[offset++]=normalize(color.b,array)}else{array[offset++]=color.r;array[offset++]=color.g;array[offset++]=color.b}}return bufferAttribute}function copyVector2sArray(bufferAttribute,vectors){const array=bufferAttribute.array;let offset=0;for(let i=0,l=vectors.length;i<l;i++){let vector=vectors[i];if(vector===undefined){console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i);vector=new Vector2}if(bufferAttribute.normalized){array[offset++]=normalize(vector.x,array);array[offset++]=normalize(vector.y,array)}else{array[offset++]=vector.x;array[offset++]=vector.y}}return bufferAttribute}function copyVector3sArray(bufferAttribute,vectors){const array=bufferAttribute.array;let offset=0;for(let i=0,l=vectors.length;i<l;i++){let vector=vectors[i];if(vector===undefined){console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i);vector=new Vector3}if(bufferAttribute.normalized){array[offset++]=normalize(vector.x,array);array[offset++]=normalize(vector.y,array);array[offset++]=normalize(vector.z,array)}else{array[offset++]=vector.x;array[offset++]=vector.y;array[offset++]=vector.z}}return bufferAttribute}function copyVector4sArray(bufferAttribute,vectors){const array=bufferAttribute.array;let offset=0;for(let i=0,l=vectors.length;i<l;i++){let vector=vectors[i];if(vector===undefined){console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i);vector=new Vector4}if(bufferAttribute.normalized){array[offset++]=normalize(vector.x,array);array[offset++]=normalize(vector.y,array);array[offset++]=normalize(vector.z,array);array[offset++]=normalize(vector.w,array)}else{array[offset++]=vector.x;array[offset++]=vector.y;array[offset++]=vector.z;array[offset++]=vector.w}}return this}THREE.Geometry=Geometry});(function(){var BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,Float32BufferAttribute=THREE.Float32BufferAttribute,InstancedBufferAttribute=THREE.InstancedBufferAttribute,InterleavedBuffer=THREE.InterleavedBuffer,InterleavedBufferAttribute=THREE.InterleavedBufferAttribute,TriangleFanDrawMode=THREE.TriangleFanDrawMode,TriangleStripDrawMode=THREE.TriangleStripDrawMode,TrianglesDrawMode=THREE.TrianglesDrawMode,Vector3=THREE.Vector3;function computeMikkTSpaceTangents(geometry,MikkTSpace,negateSign=true){if(!MikkTSpace||!MikkTSpace.isReady){throw new Error("BufferGeometryUtils: Initialized MikkTSpace library required.")}if(!geometry.hasAttribute("position")||!geometry.hasAttribute("normal")||!geometry.hasAttribute("uv")){throw new Error("BufferGeometryUtils: Tangents require \"position\", \"normal\", and \"uv\" attributes.")}function getAttributeArray(attribute){if(attribute.normalized||attribute.isInterleavedBufferAttribute){const dstArray=new Float32Array(attribute.getCount()*attribute.itemSize);for(let i=0,j=0;i<attribute.getCount();i++){dstArray[j++]=attribute.getX(i);dstArray[j++]=attribute.getY(i);if(attribute.itemSize>2){dstArray[j++]=attribute.getZ(i)}}return dstArray}if(attribute.array instanceof Float32Array){return attribute.array}return new Float32Array(attribute.array)}const _geometry=geometry.index?geometry.toNonIndexed():geometry;const tangents=MikkTSpace.generateTangents(getAttributeArray(_geometry.attributes.position),getAttributeArray(_geometry.attributes.normal),getAttributeArray(_geometry.attributes.uv));if(negateSign){for(let i=3;i<tangents.length;i+=4){tangents[i]*=-1}}_geometry.setAttribute("tangent",new BufferAttribute(tangents,4));if(geometry!==_geometry){geometry.copy(_geometry)}return geometry}function mergeGeometries(geometries,useGroups=false){const isIndexed=geometries[0].index!==null;const attributesUsed=new Set(Object.keys(geometries[0].attributes));const morphAttributesUsed=new Set(Object.keys(geometries[0].morphAttributes));const attributes={};const morphAttributes={};const morphTargetsRelative=geometries[0].morphTargetsRelative;const mergedGeometry=new BufferGeometry;let offset=0;for(let i=0;i<geometries.length;++i){const geometry=geometries[i];let attributesCount=0;if(isIndexed!==(geometry.index!==null)){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.");return null}for(const name in geometry.attributes){if(!attributesUsed.has(name)){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". All geometries must have compatible attributes; make sure \""+name+"\" attribute exists among all geometries, or in none of them.");return null}if(attributes[name]===undefined)attributes[name]=[];attributes[name].push(geometry.attributes[name]);attributesCount++}if(attributesCount!==attributesUsed.size){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". Make sure all geometries have the same number of attributes.");return null}if(morphTargetsRelative!==geometry.morphTargetsRelative){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". .morphTargetsRelative must be consistent throughout all geometries.");return null}for(const name in geometry.morphAttributes){if(!morphAttributesUsed.has(name)){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+".  .morphAttributes must be consistent throughout all geometries.");return null}if(morphAttributes[name]===undefined)morphAttributes[name]=[];morphAttributes[name].push(geometry.morphAttributes[name])}if(useGroups){let count;if(isIndexed){count=geometry.index.count}else if(geometry.attributes.position!==undefined){count=geometry.attributes.position.count}else{console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+i+". The geometry must have either an index or a position attribute");return null}mergedGeometry.addGroup(offset,count,i);offset+=count}}if(isIndexed){let indexOffset=0;const mergedIndex=[];for(let i=0;i<geometries.length;++i){const index=geometries[i].index;for(let j=0;j<index.count;++j){mergedIndex.push(index.getX(j)+indexOffset)}indexOffset+=geometries[i].attributes.position.count}mergedGeometry.setIndex(mergedIndex)}for(const name in attributes){const mergedAttribute=mergeAttributes(attributes[name]);if(!mergedAttribute){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+name+" attribute.");return null}mergedGeometry.setAttribute(name,mergedAttribute)}for(const name in morphAttributes){const numMorphTargets=morphAttributes[name][0].length;if(numMorphTargets===0)break;mergedGeometry.morphAttributes=mergedGeometry.morphAttributes||{};mergedGeometry.morphAttributes[name]=[];for(let i=0;i<numMorphTargets;++i){const morphAttributesToMerge=[];for(let j=0;j<morphAttributes[name].length;++j){morphAttributesToMerge.push(morphAttributes[name][j][i])}const mergedMorphAttribute=mergeAttributes(morphAttributesToMerge);if(!mergedMorphAttribute){console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+name+" morphAttribute.");return null}mergedGeometry.morphAttributes[name].push(mergedMorphAttribute)}}return mergedGeometry}function mergeAttributes(attributes){let TypedArray;let itemSize;let normalized;let arrayLength=0;for(let i=0;i<attributes.length;++i){const attribute=attributes[i];if(attribute.isInterleavedBufferAttribute){console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. InterleavedBufferAttributes are not supported.");return null}if(TypedArray===undefined)TypedArray=attribute.array.constructor;if(TypedArray!==attribute.array.constructor){console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes.");return null}if(itemSize===undefined)itemSize=attribute.itemSize;if(itemSize!==attribute.itemSize){console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes.");return null}if(normalized===undefined)normalized=attribute.normalized;if(normalized!==attribute.normalized){console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes.");return null}arrayLength+=attribute.array.length}const array=new TypedArray(arrayLength);let offset=0;for(let i=0;i<attributes.length;++i){array.set(attributes[i].array,offset);offset+=attributes[i].array.length}return new BufferAttribute(array,itemSize,normalized)}function deepCloneAttribute(attribute){if(attribute.isInstancedInterleavedBufferAttribute||attribute.isInterleavedBufferAttribute){return deinterleaveAttribute(attribute)}if(attribute.isInstancedBufferAttribute){return new InstancedBufferAttribute().copy(attribute)}return new BufferAttribute().copy(attribute)}function interleaveAttributes(attributes){let TypedArray;let arrayLength=0;let stride=0;for(let i=0,l=attributes.length;i<l;++i){const attribute=attributes[i];if(TypedArray===undefined)TypedArray=attribute.array.constructor;if(TypedArray!==attribute.array.constructor){console.error("AttributeBuffers of different types cannot be interleaved");return null}arrayLength+=attribute.array.length;stride+=attribute.itemSize}const interleavedBuffer=new InterleavedBuffer(new TypedArray(arrayLength),stride);let offset=0;const res=[];const getters=["getX","getY","getZ","getW"];const setters=["setX","setY","setZ","setW"];for(let j=0,l=attributes.length;j<l;j++){const attribute=attributes[j];const itemSize=attribute.itemSize;const count=attribute.count;const iba=new InterleavedBufferAttribute(interleavedBuffer,itemSize,offset,attribute.normalized);res.push(iba);offset+=itemSize;for(let c=0;c<count;c++){for(let k=0;k<itemSize;k++){iba[setters[k]](c,attribute[getters[k]](c))}}}return res}function deinterleaveAttribute(attribute){const cons=attribute.data.array.constructor;const count=attribute.count;const itemSize=attribute.itemSize;const normalized=attribute.normalized;const array=new cons(count*itemSize);let newAttribute;if(attribute.isInstancedInterleavedBufferAttribute){newAttribute=new InstancedBufferAttribute(array,itemSize,normalized,attribute.meshPerAttribute)}else{newAttribute=new BufferAttribute(array,itemSize,normalized)}for(let i=0;i<count;i++){newAttribute.setX(i,attribute.getX(i));if(itemSize>=2){newAttribute.setY(i,attribute.getY(i))}if(itemSize>=3){newAttribute.setZ(i,attribute.getZ(i))}if(itemSize>=4){newAttribute.setW(i,attribute.getW(i))}}return newAttribute}function deinterleaveGeometry(geometry){const attributes=geometry.attributes;const morphTargets=geometry.morphTargets;const attrMap=new Map;for(const key in attributes){const attr=attributes[key];if(attr.isInterleavedBufferAttribute){if(!attrMap.has(attr)){attrMap.set(attr,deinterleaveAttribute(attr))}attributes[key]=attrMap.get(attr)}}for(const key in morphTargets){const attr=morphTargets[key];if(attr.isInterleavedBufferAttribute){if(!attrMap.has(attr)){attrMap.set(attr,deinterleaveAttribute(attr))}morphTargets[key]=attrMap.get(attr)}}}function estimateBytesUsed(geometry){let mem=0;for(const name in geometry.attributes){const attr=geometry.getAttribute(name);mem+=attr.count*attr.itemSize*attr.array.BYTES_PER_ELEMENT}const indices=geometry.getIndex();mem+=indices?indices.count*indices.itemSize*indices.array.BYTES_PER_ELEMENT:0;return mem}function mergeVertices(geometry,tolerance=1e-4){tolerance=Math.max(tolerance,Number.EPSILON);const hashToIndex={};const indices=geometry.getIndex();const positions=geometry.getAttribute("position");const vertexCount=indices?indices.count:positions.count;let nextIndex=0;const attributeNames=Object.keys(geometry.attributes);const tmpAttributes={};const tmpMorphAttributes={};const newIndices=[];const getters=["getX","getY","getZ","getW"];const setters=["setX","setY","setZ","setW"];for(let i=0,l=attributeNames.length;i<l;i++){const name=attributeNames[i];const attr=geometry.attributes[name];tmpAttributes[name]=new BufferAttribute(new attr.array.constructor(attr.count*attr.itemSize),attr.itemSize,attr.normalized);const morphAttr=geometry.morphAttributes[name];if(morphAttr){tmpMorphAttributes[name]=new BufferAttribute(new morphAttr.array.constructor(morphAttr.count*morphAttr.itemSize),morphAttr.itemSize,morphAttr.normalized)}}const decimalShift=Math.log10(1/tolerance);const shiftMultiplier=Math.pow(10,decimalShift);for(let i=0;i<vertexCount;i++){const index=indices?indices.getX(i):i;let hash="";for(let j=0,l=attributeNames.length;j<l;j++){const name=attributeNames[j];const attribute=geometry.getAttribute(name);const itemSize=attribute.itemSize;for(let k=0;k<itemSize;k++){hash+=`${~~(attribute[getters[k]](index)*shiftMultiplier)},`}}if(hash in hashToIndex){newIndices.push(hashToIndex[hash])}else{for(let j=0,l=attributeNames.length;j<l;j++){const name=attributeNames[j];const attribute=geometry.getAttribute(name);const morphAttr=geometry.morphAttributes[name];const itemSize=attribute.itemSize;const newarray=tmpAttributes[name];const newMorphArrays=tmpMorphAttributes[name];for(let k=0;k<itemSize;k++){const getterFunc=getters[k];const setterFunc=setters[k];newarray[setterFunc](nextIndex,attribute[getterFunc](index));if(morphAttr){for(let m=0,ml=morphAttr.length;m<ml;m++){newMorphArrays[m][setterFunc](nextIndex,morphAttr[m][getterFunc](index))}}}}hashToIndex[hash]=nextIndex;newIndices.push(nextIndex);nextIndex++}}const result=geometry.clone();for(const name in geometry.attributes){const tmpAttribute=tmpAttributes[name];result.setAttribute(name,new BufferAttribute(tmpAttribute.array.slice(0,nextIndex*tmpAttribute.itemSize),tmpAttribute.itemSize,tmpAttribute.normalized));if(!(name in tmpMorphAttributes))continue;for(let j=0;j<tmpMorphAttributes[name].length;j++){const tmpMorphAttribute=tmpMorphAttributes[name][j];result.morphAttributes[name][j]=new BufferAttribute(tmpMorphAttribute.array.slice(0,nextIndex*tmpMorphAttribute.itemSize),tmpMorphAttribute.itemSize,tmpMorphAttribute.normalized)}}result.setIndex(newIndices);return result}function toTrianglesDrawMode(geometry,drawMode){if(drawMode===TrianglesDrawMode){console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.");return geometry}if(drawMode===TriangleFanDrawMode||drawMode===TriangleStripDrawMode){let index=geometry.getIndex();if(index===null){const indices=[];const position=geometry.getAttribute("position");if(position!==undefined){for(let i=0;i<position.count;i++){indices.push(i)}geometry.setIndex(indices);index=geometry.getIndex()}else{console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.");return geometry}}const numberOfTriangles=index.count-2;const newIndices=[];if(drawMode===TriangleFanDrawMode){for(let i=1;i<=numberOfTriangles;i++){newIndices.push(index.getX(0));newIndices.push(index.getX(i));newIndices.push(index.getX(i+1))}}else{for(let i=0;i<numberOfTriangles;i++){if(i%2===0){newIndices.push(index.getX(i));newIndices.push(index.getX(i+1));newIndices.push(index.getX(i+2))}else{newIndices.push(index.getX(i+2));newIndices.push(index.getX(i+1));newIndices.push(index.getX(i))}}}if(newIndices.length/3!==numberOfTriangles){console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.")}const newGeometry=geometry.clone();newGeometry.setIndex(newIndices);newGeometry.clearGroups();return newGeometry}else{console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",drawMode);return geometry}}function computeMorphedAttributes(object){const _vA=new Vector3;const _vB=new Vector3;const _vC=new Vector3;const _tempA=new Vector3;const _tempB=new Vector3;const _tempC=new Vector3;const _morphA=new Vector3;const _morphB=new Vector3;const _morphC=new Vector3;function _calculateMorphedAttributeData(object,attribute,morphAttribute,morphTargetsRelative,a,b,c,modifiedAttributeArray){_vA.fromBufferAttribute(attribute,a);_vB.fromBufferAttribute(attribute,b);_vC.fromBufferAttribute(attribute,c);const morphInfluences=object.morphTargetInfluences;if(morphAttribute&&morphInfluences){_morphA.set(0,0,0);_morphB.set(0,0,0);_morphC.set(0,0,0);for(let i=0,il=morphAttribute.length;i<il;i++){const influence=morphInfluences[i];const morph=morphAttribute[i];if(influence===0)continue;_tempA.fromBufferAttribute(morph,a);_tempB.fromBufferAttribute(morph,b);_tempC.fromBufferAttribute(morph,c);if(morphTargetsRelative){_morphA.addScaledVector(_tempA,influence);_morphB.addScaledVector(_tempB,influence);_morphC.addScaledVector(_tempC,influence)}else{_morphA.addScaledVector(_tempA.sub(_vA),influence);_morphB.addScaledVector(_tempB.sub(_vB),influence);_morphC.addScaledVector(_tempC.sub(_vC),influence)}}_vA.add(_morphA);_vB.add(_morphB);_vC.add(_morphC)}if(object.isSkinnedMesh){object.applyBoneTransform(a,_vA);object.applyBoneTransform(b,_vB);object.applyBoneTransform(c,_vC)}modifiedAttributeArray[a*3+0]=_vA.x;modifiedAttributeArray[a*3+1]=_vA.y;modifiedAttributeArray[a*3+2]=_vA.z;modifiedAttributeArray[b*3+0]=_vB.x;modifiedAttributeArray[b*3+1]=_vB.y;modifiedAttributeArray[b*3+2]=_vB.z;modifiedAttributeArray[c*3+0]=_vC.x;modifiedAttributeArray[c*3+1]=_vC.y;modifiedAttributeArray[c*3+2]=_vC.z}const geometry=object.geometry;const material=object.material;let a,b,c;const index=geometry.index;const positionAttribute=geometry.attributes.position;const morphPosition=geometry.morphAttributes.position;const morphTargetsRelative=geometry.morphTargetsRelative;const normalAttribute=geometry.attributes.normal;const morphNormal=geometry.morphAttributes.position;const groups=geometry.groups;const drawRange=geometry.drawRange;let i,j,il,jl;let group;let start,end;const modifiedPosition=new Float32Array(positionAttribute.count*positionAttribute.itemSize);const modifiedNormal=new Float32Array(normalAttribute.count*normalAttribute.itemSize);if(index!==null){if(Array.isArray(material)){for(i=0,il=groups.length;i<il;i++){group=groups[i];start=Math.max(group.start,drawRange.start);end=Math.min(group.start+group.count,drawRange.start+drawRange.count);for(j=start,jl=end;j<jl;j+=3){a=index.getX(j);b=index.getX(j+1);c=index.getX(j+2);_calculateMorphedAttributeData(object,positionAttribute,morphPosition,morphTargetsRelative,a,b,c,modifiedPosition);_calculateMorphedAttributeData(object,normalAttribute,morphNormal,morphTargetsRelative,a,b,c,modifiedNormal)}}}else{start=Math.max(0,drawRange.start);end=Math.min(index.count,drawRange.start+drawRange.count);for(i=start,il=end;i<il;i+=3){a=index.getX(i);b=index.getX(i+1);c=index.getX(i+2);_calculateMorphedAttributeData(object,positionAttribute,morphPosition,morphTargetsRelative,a,b,c,modifiedPosition);_calculateMorphedAttributeData(object,normalAttribute,morphNormal,morphTargetsRelative,a,b,c,modifiedNormal)}}}else{if(Array.isArray(material)){for(i=0,il=groups.length;i<il;i++){group=groups[i];start=Math.max(group.start,drawRange.start);end=Math.min(group.start+group.count,drawRange.start+drawRange.count);for(j=start,jl=end;j<jl;j+=3){a=j;b=j+1;c=j+2;_calculateMorphedAttributeData(object,positionAttribute,morphPosition,morphTargetsRelative,a,b,c,modifiedPosition);_calculateMorphedAttributeData(object,normalAttribute,morphNormal,morphTargetsRelative,a,b,c,modifiedNormal)}}}else{start=Math.max(0,drawRange.start);end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(i=start,il=end;i<il;i+=3){a=i;b=i+1;c=i+2;_calculateMorphedAttributeData(object,positionAttribute,morphPosition,morphTargetsRelative,a,b,c,modifiedPosition);_calculateMorphedAttributeData(object,normalAttribute,morphNormal,morphTargetsRelative,a,b,c,modifiedNormal)}}}const morphedPositionAttribute=new Float32BufferAttribute(modifiedPosition,3);const morphedNormalAttribute=new Float32BufferAttribute(modifiedNormal,3);return{positionAttribute:positionAttribute,normalAttribute:normalAttribute,morphedPositionAttribute:morphedPositionAttribute,morphedNormalAttribute:morphedNormalAttribute}}function mergeGroups(geometry){if(geometry.groups.length===0){console.warn("THREE.BufferGeometryUtils.mergeGroups(): No groups are defined. Nothing to merge.");return geometry}let groups=geometry.groups;groups=groups.sort((a,b)=>{if(a.materialIndex!==b.materialIndex)return a.materialIndex-b.materialIndex;return a.start-b.start});if(geometry.getIndex()===null){const positionAttribute=geometry.getAttribute("position");const indices=[];for(let i=0;i<positionAttribute.count;i+=3){indices.push(i,i+1,i+2)}geometry.setIndex(indices)}const index=geometry.getIndex();const newIndices=[];for(let i=0;i<groups.length;i++){const group=groups[i];const groupStart=group.start;const groupLength=groupStart+group.count;for(let j=groupStart;j<groupLength;j++){newIndices.push(index.getX(j))}}geometry.dispose();geometry.setIndex(newIndices);let start=0;for(let i=0;i<groups.length;i++){const group=groups[i];group.start=start;start+=group.count}let currentGroup=groups[0];geometry.groups=[currentGroup];for(let i=1;i<groups.length;i++){const group=groups[i];if(currentGroup.materialIndex===group.materialIndex){currentGroup.count+=group.count}else{currentGroup=group;geometry.groups.push(currentGroup)}}return geometry}function toCreasedNormals(geometry,creaseAngle=Math.PI/3){const creaseDot=Math.cos(creaseAngle);const hashMultiplier=(1+1e-10)*100;const verts=[new Vector3,new Vector3,new Vector3];const tempVec1=new Vector3;const tempVec2=new Vector3;const tempNorm=new Vector3;const tempNorm2=new Vector3;function hashVertex(v){const x=~~(v.x*hashMultiplier);const y=~~(v.y*hashMultiplier);const z=~~(v.z*hashMultiplier);return`${x},${y},${z}`}const resultGeometry=geometry.toNonIndexed();const posAttr=resultGeometry.attributes.position;const vertexMap={};for(let i=0,l=posAttr.count/3;i<l;i++){const i3=3*i;const a=verts[0].fromBufferAttribute(posAttr,i3+0);const b=verts[1].fromBufferAttribute(posAttr,i3+1);const c=verts[2].fromBufferAttribute(posAttr,i3+2);tempVec1.subVectors(c,b);tempVec2.subVectors(a,b);const normal=new Vector3().crossVectors(tempVec1,tempVec2).normalize();for(let n=0;n<3;n++){const vert=verts[n];const hash=hashVertex(vert);if(!(hash in vertexMap)){vertexMap[hash]=[]}vertexMap[hash].push(normal)}}const normalArray=new Float32Array(posAttr.count*3);const normAttr=new BufferAttribute(normalArray,3,false);for(let i=0,l=posAttr.count/3;i<l;i++){const i3=3*i;const a=verts[0].fromBufferAttribute(posAttr,i3+0);const b=verts[1].fromBufferAttribute(posAttr,i3+1);const c=verts[2].fromBufferAttribute(posAttr,i3+2);tempVec1.subVectors(c,b);tempVec2.subVectors(a,b);tempNorm.crossVectors(tempVec1,tempVec2).normalize();for(let n=0;n<3;n++){const vert=verts[n];const hash=hashVertex(vert);const otherNormals=vertexMap[hash];tempNorm2.set(0,0,0);for(let k=0,lk=otherNormals.length;k<lk;k++){const otherNorm=otherNormals[k];if(tempNorm.dot(otherNorm)>creaseDot){tempNorm2.add(otherNorm)}}tempNorm2.normalize();normAttr.setXYZ(i3+n,tempNorm2.x,tempNorm2.y,tempNorm2.z)}}resultGeometry.setAttribute("normal",normAttr);return resultGeometry}function mergeBufferGeometries(geometries,useGroups=false){console.warn("THREE.BufferGeometryUtils: mergeBufferGeometries() has been renamed to mergeGeometries().");return mergeGeometries(geometries,useGroups)}function mergeBufferAttributes(attributes){console.warn("THREE.BufferGeometryUtils: mergeBufferAttributes() has been renamed to mergeAttributes().");return mergeAttributes(attributes)}var BufferGeometryUtils={computeMikkTSpaceTangents,deepCloneAttribute,deinterleaveAttribute,deinterleaveGeometry,mergeGeometries,mergeBufferGeometries,mergeAttributes,mergeBufferAttributes,interleaveAttributes,estimateBytesUsed,mergeVertices,toTrianglesDrawMode,computeMorphedAttributes,mergeGroups,toCreasedNormals};THREE.BufferGeometryUtils=BufferGeometryUtils})();(function(){class WorkerPool{constructor(pool=4){this.pool=pool;this.queue=[];this.workers=[];this.workersResolve=[];this.workerStatus=0}_initWorker(workerId){if(!this.workers[workerId]){const worker=this.workerCreator();worker.addEventListener("message",this._onMessage.bind(this,workerId));this.workers[workerId]=worker}}_getIdleWorker(){for(let i=0;i<this.pool;i++)if(!(this.workerStatus&1<<i))return i;return-1}_onMessage(workerId,msg){const resolve=this.workersResolve[workerId];resolve&&resolve(msg);if(this.queue.length){const{resolve,msg,transfer}=this.queue.shift();this.workersResolve[workerId]=resolve;this.workers[workerId].postMessage(msg,transfer)}else{this.workerStatus^=1<<workerId}}setWorkerCreator(workerCreator){this.workerCreator=workerCreator}setWorkerLimit(pool){this.pool=pool}postMessage(msg,transfer){return new Promise(resolve=>{const workerId=this._getIdleWorker();if(workerId!==-1){this._initWorker(workerId);this.workerStatus|=1<<workerId;this.workersResolve[workerId]=resolve;this.workers[workerId].postMessage(msg,transfer)}else{this.queue.push({resolve,msg,transfer})}})}dispose(){this.workers.forEach(worker=>worker.terminate());this.workersResolve.length=0;this.workers.length=0;this.queue.length=0;this.workerStatus=0}}THREE.WorkerPool=WorkerPool})();(function(){const t=0,e=1,n=2,i=3,s=0,a=0,r=2,o=0,l=1,f=160,U=161,c=162,h=163,_=0,p=1,g=0,y=1,x=2,u=3,b=4,d=5,m=6,w=7,D=8,B=9,L=10,A=11,k=12,v=13,S=14,I=15,O=16,T=17,V=18,E=0,F=1,P=2,C=3,z=4,M=5,W=6,N=7,H=8,K=9,X=10,j=11,R=0,Y=1,q=2,G=13,J=14,Q=15,Z=128,$=64,tt=32,et=16,nt=0,it=1,st=2,at=3,rt=4,ot=5,lt=6,ft=7,Ut=8,ct=9,ht=10,_t=13,pt=14,gt=15,yt=16,xt=17,ut=20,bt=21,dt=22,mt=23,wt=24,Dt=27,Bt=28,Lt=29,At=30,kt=31,vt=34,St=35,It=36,Ot=37,Tt=38,Vt=41,Et=42,Ft=43,Pt=44,Ct=45,zt=48,Mt=49,Wt=50,Nt=58,Ht=59,Kt=62,Xt=63,jt=64,Rt=65,Yt=68,qt=69,Gt=70,Jt=71,Qt=74,Zt=75,$t=76,te=77,ee=78,ne=81,ie=82,se=83,ae=84,re=85,oe=88,le=89,fe=90,Ue=91,ce=92,he=95,_e=96,pe=97,ge=98,ye=99,xe=100,ue=101,be=102,de=103,me=104,we=105,De=106,Be=107,Le=108,Ae=109,ke=110,ve=111,Se=112,Ie=113,Oe=114,Te=115,Ve=116,Ee=117,Fe=118,Pe=119,Ce=120,ze=121,Me=122,We=123,Ne=124,He=125,Ke=126,Xe=127,je=128,Re=129,Ye=130,qe=131,Ge=132,Je=133,Qe=134,Ze=135,$e=136,tn=137,en=138,nn=139,sn=140,an=141,rn=142,on=143,ln=144,fn=145,Un=146,cn=147,hn=148,_n=149,pn=150,gn=151,yn=152,xn=153,un=154,bn=155,dn=156,mn=157,wn=158,Dn=159,Bn=160,Ln=161,An=162,kn=163,vn=164,Sn=165,In=166,On=167,Tn=168,Vn=169,En=170,Fn=171,Pn=172,Cn=173,zn=174,Mn=175,Wn=176,Nn=177,Hn=178,Kn=179,Xn=180,jn=181,Rn=182,Yn=183,qn=184,Gn=1000156007,Jn=1000156008,Qn=1000156009,Zn=1000156010,$n=1000156011,ti=1000156017,ei=1000156018,ni=1000156019,ii=1000156020,si=1000156021,ai=1000054e3,ri=1000054001,oi=1000054002,li=1000054003,fi=1000054004,Ui=1000054005,ci=1000054006,hi=1000054007,_i=1000066e3,pi=1000066001,gi=1000066002,yi=1000066003,xi=1000066004,ui=1000066005,bi=1000066006,di=1000066007,mi=1000066008,wi=1000066009,Di=1000066010,Bi=1000066011,Li=1000066012,Ai=1000066013,ki=100034e4,vi=1000340001;class Si{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class Ii{constructor(t,e,n,i){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=i,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==e&&i<t;)i++,this._offset++;return i<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}const Oi=new Uint8Array([0]),Ti=[171,75,84,88,32,50,48,187,13,10,26,10];function Vi(t){return"undefined"!=typeof TextEncoder?new TextEncoder().encode(t):Buffer.from(t)}function Ei(t){return"undefined"!=typeof TextDecoder?new TextDecoder().decode(t):Buffer.from(t).toString("utf8")}function Fi(t){let e=0;for(const n of t)e+=n.byteLength;const n=new Uint8Array(e);let i=0;for(const e of t)n.set(new Uint8Array(e),i),i+=e.byteLength;return n}function Pi(t){const e=new Uint8Array(t.buffer,t.byteOffset,Ti.length);if(e[0]!==Ti[0]||e[1]!==Ti[1]||e[2]!==Ti[2]||e[3]!==Ti[3]||e[4]!==Ti[4]||e[5]!==Ti[5]||e[6]!==Ti[6]||e[7]!==Ti[7]||e[8]!==Ti[8]||e[9]!==Ti[9]||e[10]!==Ti[10]||e[11]!==Ti[11])throw new Error("Missing KTX 2.0 identifier.");const n=new Si,i=17*Uint32Array.BYTES_PER_ELEMENT,s=new Ii(t,Ti.length,i,!0);n.vkFormat=s._nextUint32(),n.typeSize=s._nextUint32(),n.pixelWidth=s._nextUint32(),n.pixelHeight=s._nextUint32(),n.pixelDepth=s._nextUint32(),n.layerCount=s._nextUint32(),n.faceCount=s._nextUint32();const a=s._nextUint32();n.supercompressionScheme=s._nextUint32();const r=s._nextUint32(),o=s._nextUint32(),l=s._nextUint32(),f=s._nextUint32(),U=s._nextUint64(),c=s._nextUint64(),h=new Ii(t,Ti.length+i,3*a*8,!0);for(let e=0;e<a;e++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+h._nextUint64(),h._nextUint64()),uncompressedByteLength:h._nextUint64()});const _=new Ii(t,r,o,!0),p={vendorId:_._skip(4)._nextUint16(),descriptorType:_._nextUint16(),versionNumber:_._nextUint16(),descriptorBlockSize:_._nextUint16(),colorModel:_._nextUint8(),colorPrimaries:_._nextUint8(),transferFunction:_._nextUint8(),flags:_._nextUint8(),texelBlockDimension:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],bytesPlane:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],samples:[]},g=(p.descriptorBlockSize/4-6)/4;for(let t=0;t<g;t++){const e={bitOffset:_._nextUint16(),bitLength:_._nextUint8(),channelType:_._nextUint8(),samplePosition:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],sampleLower:-Infinity,sampleUpper:Infinity};64&e.channelType?(e.sampleLower=_._nextInt32(),e.sampleUpper=_._nextInt32()):(e.sampleLower=_._nextUint32(),e.sampleUpper=_._nextUint32()),p.samples[t]=e}n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(p);const y=new Ii(t,l,f,!0);for(;y._offset<f;){const t=y._nextUint32(),e=y._scan(t),i=Ei(e),s=y._scan(t-e.byteLength);n.keyValue[i]=i.match(/^ktx/i)?Ei(s):s,y._offset%4&&y._skip(4-y._offset%4)}if(c<=0)return n;const x=new Ii(t,U,c,!0),u=x._nextUint16(),b=x._nextUint16(),d=x._nextUint32(),m=x._nextUint32(),w=x._nextUint32(),D=x._nextUint32(),B=[];for(let t=0;t<a;t++)B.push({imageFlags:x._nextUint32(),rgbSliceByteOffset:x._nextUint32(),rgbSliceByteLength:x._nextUint32(),alphaSliceByteOffset:x._nextUint32(),alphaSliceByteLength:x._nextUint32()});const L=U+x._offset,A=L+d,k=A+m,v=k+w,S=new Uint8Array(t.buffer,t.byteOffset+L,d),I=new Uint8Array(t.buffer,t.byteOffset+A,m),O=new Uint8Array(t.buffer,t.byteOffset+k,w),T=new Uint8Array(t.buffer,t.byteOffset+v,D);return n.globalData={endpointCount:u,selectorCount:b,imageDescs:B,endpointsData:S,selectorsData:I,tablesData:O,extendedData:T},n}function Ci(){return(Ci=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}const zi={keepWriter:!1};function Mi(t,e={}){e=Ci({},zi,e);let n=new ArrayBuffer(0);if(t.globalData){const e=new ArrayBuffer(20+5*t.globalData.imageDescs.length*4),i=new DataView(e);i.setUint16(0,t.globalData.endpointCount,!0),i.setUint16(2,t.globalData.selectorCount,!0),i.setUint32(4,t.globalData.endpointsData.byteLength,!0),i.setUint32(8,t.globalData.selectorsData.byteLength,!0),i.setUint32(12,t.globalData.tablesData.byteLength,!0),i.setUint32(16,t.globalData.extendedData.byteLength,!0);for(let e=0;e<t.globalData.imageDescs.length;e++){const n=t.globalData.imageDescs[e];i.setUint32(20+5*e*4+0,n.imageFlags,!0),i.setUint32(20+5*e*4+4,n.rgbSliceByteOffset,!0),i.setUint32(20+5*e*4+8,n.rgbSliceByteLength,!0),i.setUint32(20+5*e*4+12,n.alphaSliceByteOffset,!0),i.setUint32(20+5*e*4+16,n.alphaSliceByteLength,!0)}n=Fi([e,t.globalData.endpointsData,t.globalData.selectorsData,t.globalData.tablesData,t.globalData.extendedData])}const i=[];let s=t.keyValue;e.keepWriter||(s=Ci({},t.keyValue,{KTXwriter:"KTX-Parse v0.3.1"}));for(const t in s){const e=s[t],n=Vi(t),a="string"==typeof e?Vi(e):e,r=n.byteLength+1+a.byteLength+1,o=r%4?4-r%4:0;i.push(Fi([new Uint32Array([r]),n,Oi,a,Oi,new Uint8Array(o).fill(0)]))}const a=Fi(i);if(1!==t.dataFormatDescriptor.length||0!==t.dataFormatDescriptor[0].descriptorType)throw new Error("Only BASICFORMAT Data Format Descriptor output supported.");const r=t.dataFormatDescriptor[0],o=new ArrayBuffer(28+16*r.samples.length),l=new DataView(o),f=24+16*r.samples.length;if(l.setUint32(0,o.byteLength,!0),l.setUint16(4,r.vendorId,!0),l.setUint16(6,r.descriptorType,!0),l.setUint16(8,r.versionNumber,!0),l.setUint16(10,f,!0),l.setUint8(12,r.colorModel),l.setUint8(13,r.colorPrimaries),l.setUint8(14,r.transferFunction),l.setUint8(15,r.flags),!Array.isArray(r.texelBlockDimension))throw new Error("texelBlockDimension is now an array. For dimensionality `d`, set `d - 1`.");l.setUint8(16,r.texelBlockDimension[0]),l.setUint8(17,r.texelBlockDimension[1]),l.setUint8(18,r.texelBlockDimension[2]),l.setUint8(19,r.texelBlockDimension[3]);for(let t=0;t<8;t++)l.setUint8(20+t,r.bytesPlane[t]);for(let t=0;t<r.samples.length;t++){const e=r.samples[t],n=28+16*t;if(e.channelID)throw new Error("channelID has been renamed to channelType.");l.setUint16(n+0,e.bitOffset,!0),l.setUint8(n+2,e.bitLength),l.setUint8(n+3,e.channelType),l.setUint8(n+4,e.samplePosition[0]),l.setUint8(n+5,e.samplePosition[1]),l.setUint8(n+6,e.samplePosition[2]),l.setUint8(n+7,e.samplePosition[3]),64&e.channelType?(l.setInt32(n+8,e.sampleLower,!0),l.setInt32(n+12,e.sampleUpper,!0)):(l.setUint32(n+8,e.sampleLower,!0),l.setUint32(n+12,e.sampleUpper,!0))}const U=Ti.length+68+3*t.levels.length*8,c=U+o.byteLength;let h=n.byteLength>0?c+a.byteLength:0;h%8&&(h+=8-h%8);const _=[],p=new DataView(new ArrayBuffer(3*t.levels.length*8));let g=(h||c+a.byteLength)+n.byteLength;for(let e=0;e<t.levels.length;e++){const n=t.levels[e];_.push(n.levelData),p.setBigUint64(24*e+0,BigInt(g),!0),p.setBigUint64(24*e+8,BigInt(n.levelData.byteLength),!0),p.setBigUint64(24*e+16,BigInt(n.uncompressedByteLength),!0),g+=n.levelData.byteLength}const y=new ArrayBuffer(68),x=new DataView(y);return x.setUint32(0,t.vkFormat,!0),x.setUint32(4,t.typeSize,!0),x.setUint32(8,t.pixelWidth,!0),x.setUint32(12,t.pixelHeight,!0),x.setUint32(16,t.pixelDepth,!0),x.setUint32(20,t.layerCount,!0),x.setUint32(24,t.faceCount,!0),x.setUint32(28,t.levels.length,!0),x.setUint32(32,t.supercompressionScheme,!0),x.setUint32(36,U,!0),x.setUint32(40,o.byteLength,!0),x.setUint32(44,c,!0),x.setUint32(48,a.byteLength,!0),x.setBigUint64(52,BigInt(n.byteLength>0?h:0),!0),x.setBigUint64(60,BigInt(n.byteLength),!0),new Uint8Array(Fi([new Uint8Array(Ti).buffer,y,p.buffer,o,a,h>0?new ArrayBuffer(h-(c+a.byteLength)):new ArrayBuffer(0),n,..._]))}var KTXParse=THREE.KTXParse={};KTXParse.KHR_DF_CHANNEL_RGBSDA_ALPHA=Q,KTXParse.KHR_DF_CHANNEL_RGBSDA_BLUE=q,KTXParse.KHR_DF_CHANNEL_RGBSDA_DEPTH=J,KTXParse.KHR_DF_CHANNEL_RGBSDA_GREEN=Y,KTXParse.KHR_DF_CHANNEL_RGBSDA_RED=R,KTXParse.KHR_DF_CHANNEL_RGBSDA_STENCIL=G,KTXParse.KHR_DF_FLAG_ALPHA_PREMULTIPLIED=p,KTXParse.KHR_DF_FLAG_ALPHA_STRAIGHT=_,KTXParse.KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT=s,KTXParse.KHR_DF_MODEL_ASTC=c,KTXParse.KHR_DF_MODEL_ETC1=f,KTXParse.KHR_DF_MODEL_ETC1S=h,KTXParse.KHR_DF_MODEL_ETC2=U,KTXParse.KHR_DF_MODEL_RGBSDA=l,KTXParse.KHR_DF_MODEL_UNSPECIFIED=o,KTXParse.KHR_DF_PRIMARIES_ACES=W,KTXParse.KHR_DF_PRIMARIES_ACESCC=N,KTXParse.KHR_DF_PRIMARIES_ADOBERGB=j,KTXParse.KHR_DF_PRIMARIES_BT2020=z,KTXParse.KHR_DF_PRIMARIES_BT601_EBU=P,KTXParse.KHR_DF_PRIMARIES_BT601_SMPTE=C,KTXParse.KHR_DF_PRIMARIES_BT709=F,KTXParse.KHR_DF_PRIMARIES_CIEXYZ=M,KTXParse.KHR_DF_PRIMARIES_DISPLAYP3=X,KTXParse.KHR_DF_PRIMARIES_NTSC1953=H,KTXParse.KHR_DF_PRIMARIES_PAL525=K,KTXParse.KHR_DF_PRIMARIES_UNSPECIFIED=E,KTXParse.KHR_DF_SAMPLE_DATATYPE_EXPONENT=tt,KTXParse.KHR_DF_SAMPLE_DATATYPE_FLOAT=Z,KTXParse.KHR_DF_SAMPLE_DATATYPE_LINEAR=et,KTXParse.KHR_DF_SAMPLE_DATATYPE_SIGNED=$,KTXParse.KHR_DF_TRANSFER_ACESCC=O,KTXParse.KHR_DF_TRANSFER_ACESCCT=T,KTXParse.KHR_DF_TRANSFER_ADOBERGB=V,KTXParse.KHR_DF_TRANSFER_BT1886=w,KTXParse.KHR_DF_TRANSFER_DCIP3=k,KTXParse.KHR_DF_TRANSFER_HLG_EOTF=B,KTXParse.KHR_DF_TRANSFER_HLG_OETF=D,KTXParse.KHR_DF_TRANSFER_ITU=u,KTXParse.KHR_DF_TRANSFER_LINEAR=y,KTXParse.KHR_DF_TRANSFER_NTSC=b,KTXParse.KHR_DF_TRANSFER_PAL625_EOTF=S,KTXParse.KHR_DF_TRANSFER_PAL_OETF=v,KTXParse.KHR_DF_TRANSFER_PQ_EOTF=L,KTXParse.KHR_DF_TRANSFER_PQ_OETF=A,KTXParse.KHR_DF_TRANSFER_SLOG=d,KTXParse.KHR_DF_TRANSFER_SLOG2=m,KTXParse.KHR_DF_TRANSFER_SRGB=x,KTXParse.KHR_DF_TRANSFER_ST240=I,KTXParse.KHR_DF_TRANSFER_UNSPECIFIED=g,KTXParse.KHR_DF_VENDORID_KHRONOS=a,KTXParse.KHR_DF_VERSION=r,KTXParse.KHR_SUPERCOMPRESSION_BASISLZ=e,KTXParse.KHR_SUPERCOMPRESSION_NONE=t,KTXParse.KHR_SUPERCOMPRESSION_ZLIB=i,KTXParse.KHR_SUPERCOMPRESSION_ZSTD=n,KTXParse.KTX2Container=Si,KTXParse.VK_FORMAT_A1R5G5B5_UNORM_PACK16=Ut,KTXParse.VK_FORMAT_A2B10G10R10_SINT_PACK32=qt,KTXParse.VK_FORMAT_A2B10G10R10_SNORM_PACK32=Rt,KTXParse.VK_FORMAT_A2B10G10R10_UINT_PACK32=Yt,KTXParse.VK_FORMAT_A2B10G10R10_UNORM_PACK32=jt,KTXParse.VK_FORMAT_A2R10G10B10_SINT_PACK32=Xt,KTXParse.VK_FORMAT_A2R10G10B10_SNORM_PACK32=Ht,KTXParse.VK_FORMAT_A2R10G10B10_UINT_PACK32=Kt,KTXParse.VK_FORMAT_A2R10G10B10_UNORM_PACK32=Nt,KTXParse.VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT=vi,KTXParse.VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT=ki,KTXParse.VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT=Bi,KTXParse.VK_FORMAT_ASTC_10x10_SRGB_BLOCK=Xn,KTXParse.VK_FORMAT_ASTC_10x10_UNORM_BLOCK=Kn,KTXParse.VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT=mi,KTXParse.VK_FORMAT_ASTC_10x5_SRGB_BLOCK=zn,KTXParse.VK_FORMAT_ASTC_10x5_UNORM_BLOCK=Cn,KTXParse.VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT=wi,KTXParse.VK_FORMAT_ASTC_10x6_SRGB_BLOCK=Wn,KTXParse.VK_FORMAT_ASTC_10x6_UNORM_BLOCK=Mn,KTXParse.VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT=Di,KTXParse.VK_FORMAT_ASTC_10x8_SRGB_BLOCK=Hn,KTXParse.VK_FORMAT_ASTC_10x8_UNORM_BLOCK=Nn,KTXParse.VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT=Li,KTXParse.VK_FORMAT_ASTC_12x10_SRGB_BLOCK=Rn,KTXParse.VK_FORMAT_ASTC_12x10_UNORM_BLOCK=jn,KTXParse.VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT=Ai,KTXParse.VK_FORMAT_ASTC_12x12_SRGB_BLOCK=qn,KTXParse.VK_FORMAT_ASTC_12x12_UNORM_BLOCK=Yn,KTXParse.VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT=_i,KTXParse.VK_FORMAT_ASTC_4x4_SRGB_BLOCK=wn,KTXParse.VK_FORMAT_ASTC_4x4_UNORM_BLOCK=mn,KTXParse.VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT=pi,KTXParse.VK_FORMAT_ASTC_5x4_SRGB_BLOCK=Bn,KTXParse.VK_FORMAT_ASTC_5x4_UNORM_BLOCK=Dn,KTXParse.VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT=gi,KTXParse.VK_FORMAT_ASTC_5x5_SRGB_BLOCK=An,KTXParse.VK_FORMAT_ASTC_5x5_UNORM_BLOCK=Ln,KTXParse.VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT=yi,KTXParse.VK_FORMAT_ASTC_6x5_SRGB_BLOCK=vn,KTXParse.VK_FORMAT_ASTC_6x5_UNORM_BLOCK=kn,KTXParse.VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT=xi,KTXParse.VK_FORMAT_ASTC_6x6_SRGB_BLOCK=In,KTXParse.VK_FORMAT_ASTC_6x6_UNORM_BLOCK=Sn,KTXParse.VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT=ui,KTXParse.VK_FORMAT_ASTC_8x5_SRGB_BLOCK=Tn,KTXParse.VK_FORMAT_ASTC_8x5_UNORM_BLOCK=On,KTXParse.VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT=bi,KTXParse.VK_FORMAT_ASTC_8x6_SRGB_BLOCK=En,KTXParse.VK_FORMAT_ASTC_8x6_UNORM_BLOCK=Vn,KTXParse.VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT=di,KTXParse.VK_FORMAT_ASTC_8x8_SRGB_BLOCK=Pn,KTXParse.VK_FORMAT_ASTC_8x8_UNORM_BLOCK=Fn,KTXParse.VK_FORMAT_B10G11R11_UFLOAT_PACK32=Me,KTXParse.VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16=$n,KTXParse.VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16=si,KTXParse.VK_FORMAT_B4G4R4A4_UNORM_PACK16=at,KTXParse.VK_FORMAT_B5G5R5A1_UNORM_PACK16=ft,KTXParse.VK_FORMAT_B5G6R5_UNORM_PACK16=ot,KTXParse.VK_FORMAT_B8G8R8A8_SINT=Mt,KTXParse.VK_FORMAT_B8G8R8A8_SNORM=Ct,KTXParse.VK_FORMAT_B8G8R8A8_SRGB=Wt,KTXParse.VK_FORMAT_B8G8R8A8_UINT=zt,KTXParse.VK_FORMAT_B8G8R8A8_UNORM=Pt,KTXParse.VK_FORMAT_B8G8R8_SINT=St,KTXParse.VK_FORMAT_B8G8R8_SNORM=kt,KTXParse.VK_FORMAT_B8G8R8_SRGB=It,KTXParse.VK_FORMAT_B8G8R8_UINT=vt,KTXParse.VK_FORMAT_B8G8R8_UNORM=At,KTXParse.VK_FORMAT_BC1_RGBA_SRGB_BLOCK=Qe,KTXParse.VK_FORMAT_BC1_RGBA_UNORM_BLOCK=Je,KTXParse.VK_FORMAT_BC1_RGB_SRGB_BLOCK=Ge,KTXParse.VK_FORMAT_BC1_RGB_UNORM_BLOCK=qe,KTXParse.VK_FORMAT_BC2_SRGB_BLOCK=$e,KTXParse.VK_FORMAT_BC2_UNORM_BLOCK=Ze,KTXParse.VK_FORMAT_BC3_SRGB_BLOCK=en,KTXParse.VK_FORMAT_BC3_UNORM_BLOCK=tn,KTXParse.VK_FORMAT_BC4_SNORM_BLOCK=sn,KTXParse.VK_FORMAT_BC4_UNORM_BLOCK=nn,KTXParse.VK_FORMAT_BC5_SNORM_BLOCK=rn,KTXParse.VK_FORMAT_BC5_UNORM_BLOCK=an,KTXParse.VK_FORMAT_BC6H_SFLOAT_BLOCK=ln,KTXParse.VK_FORMAT_BC6H_UFLOAT_BLOCK=on,KTXParse.VK_FORMAT_BC7_SRGB_BLOCK=Un,KTXParse.VK_FORMAT_BC7_UNORM_BLOCK=fn,KTXParse.VK_FORMAT_D16_UNORM=Ne,KTXParse.VK_FORMAT_D16_UNORM_S8_UINT=je,KTXParse.VK_FORMAT_D24_UNORM_S8_UINT=Re,KTXParse.VK_FORMAT_D32_SFLOAT=Ke,KTXParse.VK_FORMAT_D32_SFLOAT_S8_UINT=Ye,KTXParse.VK_FORMAT_E5B9G9R9_UFLOAT_PACK32=We,KTXParse.VK_FORMAT_EAC_R11G11_SNORM_BLOCK=dn,KTXParse.VK_FORMAT_EAC_R11G11_UNORM_BLOCK=bn,KTXParse.VK_FORMAT_EAC_R11_SNORM_BLOCK=un,KTXParse.VK_FORMAT_EAC_R11_UNORM_BLOCK=xn,KTXParse.VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK=pn,KTXParse.VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK=_n,KTXParse.VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK=yn,KTXParse.VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK=gn,KTXParse.VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK=hn,KTXParse.VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK=cn,KTXParse.VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16=Zn,KTXParse.VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16=ii,KTXParse.VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG=fi,KTXParse.VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG=ai,KTXParse.VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG=Ui,KTXParse.VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG=ri,KTXParse.VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG=ci,KTXParse.VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG=oi,KTXParse.VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG=hi,KTXParse.VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG=li,KTXParse.VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16=Qn,KTXParse.VK_FORMAT_R10X6G10X6_UNORM_2PACK16=Jn,KTXParse.VK_FORMAT_R10X6_UNORM_PACK16=Gn,KTXParse.VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16=ni,KTXParse.VK_FORMAT_R12X4G12X4_UNORM_2PACK16=ei,KTXParse.VK_FORMAT_R12X4_UNORM_PACK16=ti,KTXParse.VK_FORMAT_R16G16B16A16_SFLOAT=pe,KTXParse.VK_FORMAT_R16G16B16A16_SINT=_e,KTXParse.VK_FORMAT_R16G16B16A16_SNORM=ce,KTXParse.VK_FORMAT_R16G16B16A16_UINT=he,KTXParse.VK_FORMAT_R16G16B16A16_UNORM=Ue,KTXParse.VK_FORMAT_R16G16B16_SFLOAT=fe,KTXParse.VK_FORMAT_R16G16B16_SINT=le,KTXParse.VK_FORMAT_R16G16B16_SNORM=re,KTXParse.VK_FORMAT_R16G16B16_UINT=oe,KTXParse.VK_FORMAT_R16G16B16_UNORM=ae,KTXParse.VK_FORMAT_R16G16_SFLOAT=se,KTXParse.VK_FORMAT_R16G16_SINT=ie,KTXParse.VK_FORMAT_R16G16_SNORM=ee,KTXParse.VK_FORMAT_R16G16_UINT=ne,KTXParse.VK_FORMAT_R16G16_UNORM=te,KTXParse.VK_FORMAT_R16_SFLOAT=$t,KTXParse.VK_FORMAT_R16_SINT=Zt,KTXParse.VK_FORMAT_R16_SNORM=Jt,KTXParse.VK_FORMAT_R16_UINT=Qt,KTXParse.VK_FORMAT_R16_UNORM=Gt,KTXParse.VK_FORMAT_R32G32B32A32_SFLOAT=Ae,KTXParse.VK_FORMAT_R32G32B32A32_SINT=Le,KTXParse.VK_FORMAT_R32G32B32A32_UINT=Be,KTXParse.VK_FORMAT_R32G32B32_SFLOAT=De,KTXParse.VK_FORMAT_R32G32B32_SINT=we,KTXParse.VK_FORMAT_R32G32B32_UINT=me,KTXParse.VK_FORMAT_R32G32_SFLOAT=de,KTXParse.VK_FORMAT_R32G32_SINT=be,KTXParse.VK_FORMAT_R32G32_UINT=ue,KTXParse.VK_FORMAT_R32_SFLOAT=xe,KTXParse.VK_FORMAT_R32_SINT=ye,KTXParse.VK_FORMAT_R32_UINT=ge,KTXParse.VK_FORMAT_R4G4B4A4_UNORM_PACK16=st,KTXParse.VK_FORMAT_R4G4_UNORM_PACK8=it,KTXParse.VK_FORMAT_R5G5B5A1_UNORM_PACK16=lt,KTXParse.VK_FORMAT_R5G6B5_UNORM_PACK16=rt,KTXParse.VK_FORMAT_R64G64B64A64_SFLOAT=ze,KTXParse.VK_FORMAT_R64G64B64A64_SINT=Ce,KTXParse.VK_FORMAT_R64G64B64A64_UINT=Pe,KTXParse.VK_FORMAT_R64G64B64_SFLOAT=Fe,KTXParse.VK_FORMAT_R64G64B64_SINT=Ee,KTXParse.VK_FORMAT_R64G64B64_UINT=Ve,KTXParse.VK_FORMAT_R64G64_SFLOAT=Te,KTXParse.VK_FORMAT_R64G64_SINT=Oe,KTXParse.VK_FORMAT_R64G64_UINT=Ie,KTXParse.VK_FORMAT_R64_SFLOAT=Se,KTXParse.VK_FORMAT_R64_SINT=ve,KTXParse.VK_FORMAT_R64_UINT=ke,KTXParse.VK_FORMAT_R8G8B8A8_SINT=Et,KTXParse.VK_FORMAT_R8G8B8A8_SNORM=Tt,KTXParse.VK_FORMAT_R8G8B8A8_SRGB=Ft,KTXParse.VK_FORMAT_R8G8B8A8_UINT=Vt,KTXParse.VK_FORMAT_R8G8B8A8_UNORM=Ot,KTXParse.VK_FORMAT_R8G8B8_SINT=Bt,KTXParse.VK_FORMAT_R8G8B8_SNORM=wt,KTXParse.VK_FORMAT_R8G8B8_SRGB=Lt,KTXParse.VK_FORMAT_R8G8B8_UINT=Dt,KTXParse.VK_FORMAT_R8G8B8_UNORM=mt,KTXParse.VK_FORMAT_R8G8_SINT=bt,KTXParse.VK_FORMAT_R8G8_SNORM=xt,KTXParse.VK_FORMAT_R8G8_SRGB=dt,KTXParse.VK_FORMAT_R8G8_UINT=ut,KTXParse.VK_FORMAT_R8G8_UNORM=yt,KTXParse.VK_FORMAT_R8_SINT=pt,KTXParse.VK_FORMAT_R8_SNORM=ht,KTXParse.VK_FORMAT_R8_SRGB=gt,KTXParse.VK_FORMAT_R8_UINT=_t,KTXParse.VK_FORMAT_R8_UNORM=ct,KTXParse.VK_FORMAT_S8_UINT=Xe,KTXParse.VK_FORMAT_UNDEFINED=nt,KTXParse.VK_FORMAT_X8_D24_UNORM_PACK32=He,KTXParse.read=Pi,KTXParse.write=Mi})();(function(){var CompressedTexture=THREE.CompressedTexture,Data3DTexture=THREE.Data3DTexture,DataTexture=THREE.DataTexture,FileLoader=THREE.FileLoader,FloatType=THREE.FloatType,HalfFloatType=THREE.HalfFloatType,LinearEncoding=THREE.LinearEncoding,LinearFilter=THREE.LinearFilter,LinearMipmapLinearFilter=THREE.LinearMipmapLinearFilter,Loader=THREE.Loader,RedFormat=THREE.RedFormat,RGB_ETC1_Format=THREE.RGB_ETC1_Format,RGB_ETC2_Format=THREE.RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format=THREE.RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format=THREE.RGB_S3TC_DXT1_Format,RGBA_ASTC_4x4_Format=THREE.RGBA_ASTC_4x4_Format,RGBA_BPTC_Format=THREE.RGBA_BPTC_Format,RGBA_ETC2_EAC_Format=THREE.RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format=THREE.RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format=THREE.RGBA_S3TC_DXT5_Format,RGBAFormat=THREE.RGBAFormat,RGFormat=THREE.RGFormat,sRGBEncoding=THREE.sRGBEncoding,UnsignedByteType=THREE.UnsignedByteType,WorkerPool=THREE.WorkerPool;var read=THREE.KTXParse.read,KHR_DF_FLAG_ALPHA_PREMULTIPLIED=THREE.KTXParse.KHR_DF_FLAG_ALPHA_PREMULTIPLIED,KHR_DF_TRANSFER_SRGB=THREE.KTXParse.KHR_DF_TRANSFER_SRGB,KHR_SUPERCOMPRESSION_NONE=THREE.KTXParse.KHR_SUPERCOMPRESSION_NONE,KHR_SUPERCOMPRESSION_ZSTD=THREE.KTXParse.KHR_SUPERCOMPRESSION_ZSTD,VK_FORMAT_UNDEFINED=THREE.KTXParse.VK_FORMAT_UNDEFINED,VK_FORMAT_R16_SFLOAT=THREE.KTXParse.VK_FORMAT_R16_SFLOAT,VK_FORMAT_R16G16_SFLOAT=THREE.KTXParse.VK_FORMAT_R16G16_SFLOAT,VK_FORMAT_R16G16B16A16_SFLOAT=THREE.KTXParse.VK_FORMAT_R16G16B16A16_SFLOAT,VK_FORMAT_R32_SFLOAT=THREE.KTXParse.VK_FORMAT_R32_SFLOAT,VK_FORMAT_R32G32_SFLOAT=THREE.KTXParse.VK_FORMAT_R32G32_SFLOAT,VK_FORMAT_R32G32B32A32_SFLOAT=THREE.KTXParse.VK_FORMAT_R32G32B32A32_SFLOAT,VK_FORMAT_R8_SRGB=THREE.KTXParse.VK_FORMAT_R8_SRGB,VK_FORMAT_R8_UNORM=THREE.KTXParse.VK_FORMAT_R8_UNORM,VK_FORMAT_R8G8_SRGB=THREE.KTXParse.VK_FORMAT_R8G8_SRGB,VK_FORMAT_R8G8_UNORM=THREE.KTXParse.VK_FORMAT_R8G8_UNORM,VK_FORMAT_R8G8B8A8_SRGB=THREE.KTXParse.VK_FORMAT_R8G8B8A8_SRGB,VK_FORMAT_R8G8B8A8_UNORM=THREE.KTXParse.VK_FORMAT_R8G8B8A8_UNORM;var ZSTDDecoder=THREE.ZSTDDecoder;const _taskCache=new WeakMap;let _activeLoaders=0;let _zstd;class KTX2Loader extends Loader{constructor(manager){super(manager);this.transcoderPath="";this.transcoderBinary=null;this.transcoderPending=null;this.workerPool=new WorkerPool;this.workerSourceURL="";this.workerConfig=null;if(typeof MSC_TRANSCODER!=="undefined"){console.warn("THREE.KTX2Loader: Please update to latest \"basis_transcoder\"."+" \"msc_basis_transcoder\" is no longer supported in three.js r125+.")}}setTranscoderPath(path){this.transcoderPath=path;return this}setWorkerLimit(num){this.workerPool.setWorkerLimit(num);return this}detectSupport(renderer){this.workerConfig={astcSupported:renderer.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:renderer.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:renderer.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:renderer.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:renderer.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:renderer.extensions.has("WEBGL_compressed_texture_pvrtc")||renderer.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")};if(renderer.capabilities.isWebGL2){this.workerConfig.etc1Supported=false}return this}init(){if(!this.transcoderPending){const jsLoader=new FileLoader(this.manager);jsLoader.setPath(this.transcoderPath);jsLoader.setWithCredentials(this.withCredentials);const jsContent=jsLoader.loadAsync("basis_transcoder.js");const binaryLoader=new FileLoader(this.manager);binaryLoader.setPath(this.transcoderPath);binaryLoader.setResponseType("arraybuffer");binaryLoader.setWithCredentials(this.withCredentials);const binaryContent=binaryLoader.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([jsContent,binaryContent]).then(([jsContent,binaryContent])=>{const fn=KTX2Loader.BasisWorker.toString();const body=["/* constants */","let _EngineFormat = "+JSON.stringify(KTX2Loader.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(KTX2Loader.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(KTX2Loader.BasisFormat),"/* basis_transcoder.js */",jsContent,"/* worker */",fn.substring(fn.indexOf("{")+1,fn.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([body]));this.transcoderBinary=binaryContent;this.workerPool.setWorkerCreator(()=>{const worker=new Worker(this.workerSourceURL);const transcoderBinary=this.transcoderBinary.slice(0);worker.postMessage({type:"init",config:this.workerConfig,transcoderBinary},[transcoderBinary]);return worker})});if(_activeLoaders>0){console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues."+" Use a single KTX2Loader instance, or call .dispose() on old instances.")}_activeLoaders++}return this.transcoderPending}load(url,onLoad,onProgress,onError){if(this.workerConfig===null){throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.")}const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setWithCredentials(this.withCredentials);loader.load(url,buffer=>{if(_taskCache.has(buffer)){const cachedTask=_taskCache.get(buffer);return cachedTask.promise.then(onLoad).catch(onError)}this._createTexture(buffer).then(texture=>onLoad?onLoad(texture):null).catch(onError)},onProgress,onError)}_createTextureFrom(transcodeResult){const{mipmaps,width,height,format,type,error,dfdTransferFn,dfdFlags}=transcodeResult;if(type==="error")return Promise.reject(error);const texture=new CompressedTexture(mipmaps,width,height,format,UnsignedByteType);texture.minFilter=mipmaps.length===1?LinearFilter:LinearMipmapLinearFilter;texture.magFilter=LinearFilter;texture.generateMipmaps=false;texture.needsUpdate=true;texture.encoding=dfdTransferFn===KHR_DF_TRANSFER_SRGB?sRGBEncoding:LinearEncoding;texture.premultiplyAlpha=!!(dfdFlags&KHR_DF_FLAG_ALPHA_PREMULTIPLIED);return texture}_createTexture(buffer,config={}){const container=read(new Uint8Array(buffer));if(container.vkFormat!==VK_FORMAT_UNDEFINED){return createDataTexture(container)}const taskConfig=config;const texturePending=this.init().then(()=>{return this.workerPool.postMessage({type:"transcode",buffer,taskConfig:taskConfig},[buffer])}).then(e=>this._createTextureFrom(e.data));_taskCache.set(buffer,{promise:texturePending});return texturePending}dispose(){this.workerPool.dispose();if(this.workerSourceURL)URL.revokeObjectURL(this.workerSourceURL);_activeLoaders--;return this}}KTX2Loader.BasisFormat={ETC1S:0,UASTC_4x4:1};KTX2Loader.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16};KTX2Loader.EngineFormat={RGBAFormat:RGBAFormat,RGBA_ASTC_4x4_Format:RGBA_ASTC_4x4_Format,RGBA_BPTC_Format:RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format:RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format:RGBA_S3TC_DXT5_Format,RGB_ETC1_Format:RGB_ETC1_Format,RGB_ETC2_Format:RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format:RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:RGB_S3TC_DXT1_Format};KTX2Loader.BasisWorker=function(){let config;let transcoderPending;let BasisModule;const EngineFormat=_EngineFormat;const TranscoderFormat=_TranscoderFormat;const BasisFormat=_BasisFormat;self.addEventListener("message",function(e){const message=e.data;switch(message.type){case"init":config=message.config;init(message.transcoderBinary);break;case"transcode":transcoderPending.then(()=>{try{const{width,height,hasAlpha,mipmaps,format,dfdTransferFn,dfdFlags}=transcode(message.buffer);const buffers=[];for(let i=0;i<mipmaps.length;++i){buffers.push(mipmaps[i].data.buffer)}self.postMessage({type:"transcode",id:message.id,width,height,hasAlpha,mipmaps,format,dfdTransferFn,dfdFlags},buffers)}catch(error){console.error(error);self.postMessage({type:"error",id:message.id,error:error.message})}});break;}});function init(wasmBinary){transcoderPending=new Promise(resolve=>{BasisModule={wasmBinary,onRuntimeInitialized:resolve};BASIS(BasisModule)}).then(()=>{BasisModule.initializeBasis();if(BasisModule.KTX2File===undefined){console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}})}function transcode(buffer){const ktx2File=new BasisModule.KTX2File(new Uint8Array(buffer));function cleanup(){ktx2File.close();ktx2File.delete()}if(!ktx2File.isValid()){cleanup();throw new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file")}const basisFormat=ktx2File.isUASTC()?BasisFormat.UASTC_4x4:BasisFormat.ETC1S;const width=ktx2File.getWidth();const height=ktx2File.getHeight();const levels=ktx2File.getLevels();const hasAlpha=ktx2File.getHasAlpha();const dfdTransferFn=ktx2File.getDFDTransferFunc();const dfdFlags=ktx2File.getDFDFlags();const{transcoderFormat,engineFormat}=getTranscoderFormat(basisFormat,width,height,hasAlpha);if(!width||!height||!levels){cleanup();throw new Error("THREE.KTX2Loader:\tInvalid texture")}if(!ktx2File.startTranscoding()){cleanup();throw new Error("THREE.KTX2Loader: .startTranscoding failed")}const mipmaps=[];for(let mip=0;mip<levels;mip++){const levelInfo=ktx2File.getImageLevelInfo(mip,0,0);const mipWidth=levelInfo.origWidth;const mipHeight=levelInfo.origHeight;const dst=new Uint8Array(ktx2File.getImageTranscodedSizeInBytes(mip,0,0,transcoderFormat));const status=ktx2File.transcodeImage(dst,mip,0,0,transcoderFormat,0,-1,-1);if(!status){cleanup();throw new Error("THREE.KTX2Loader: .transcodeImage failed.")}mipmaps.push({data:dst,width:mipWidth,height:mipHeight})}cleanup();return{width,height,hasAlpha,mipmaps,format:engineFormat,dfdTransferFn,dfdFlags}}const FORMAT_OPTIONS=[{if:"astcSupported",basisFormat:[BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.ASTC_4x4,TranscoderFormat.ASTC_4x4],engineFormat:[EngineFormat.RGBA_ASTC_4x4_Format,EngineFormat.RGBA_ASTC_4x4_Format],priorityETC1S:Infinity,priorityUASTC:1,needsPowerOfTwo:false},{if:"bptcSupported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.BC7_M5,TranscoderFormat.BC7_M5],engineFormat:[EngineFormat.RGBA_BPTC_Format,EngineFormat.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:false},{if:"dxtSupported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.BC1,TranscoderFormat.BC3],engineFormat:[EngineFormat.RGB_S3TC_DXT1_Format,EngineFormat.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:false},{if:"etc2Supported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.ETC1,TranscoderFormat.ETC2],engineFormat:[EngineFormat.RGB_ETC2_Format,EngineFormat.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:false},{if:"etc1Supported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.ETC1],engineFormat:[EngineFormat.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:false},{if:"pvrtcSupported",basisFormat:[BasisFormat.ETC1S,BasisFormat.UASTC_4x4],transcoderFormat:[TranscoderFormat.PVRTC1_4_RGB,TranscoderFormat.PVRTC1_4_RGBA],engineFormat:[EngineFormat.RGB_PVRTC_4BPPV1_Format,EngineFormat.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:true}];const ETC1S_OPTIONS=FORMAT_OPTIONS.sort(function(a,b){return a.priorityETC1S-b.priorityETC1S});const UASTC_OPTIONS=FORMAT_OPTIONS.sort(function(a,b){return a.priorityUASTC-b.priorityUASTC});function getTranscoderFormat(basisFormat,width,height,hasAlpha){let transcoderFormat;let engineFormat;const options=basisFormat===BasisFormat.ETC1S?ETC1S_OPTIONS:UASTC_OPTIONS;for(let i=0;i<options.length;i++){const opt=options[i];if(!config[opt.if])continue;if(!opt.basisFormat.includes(basisFormat))continue;if(hasAlpha&&opt.transcoderFormat.length<2)continue;if(opt.needsPowerOfTwo&&!(isPowerOfTwo(width)&&isPowerOfTwo(height)))continue;transcoderFormat=opt.transcoderFormat[hasAlpha?1:0];engineFormat=opt.engineFormat[hasAlpha?1:0];return{transcoderFormat,engineFormat}}console.warn("THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32.");transcoderFormat=TranscoderFormat.RGBA32;engineFormat=EngineFormat.RGBAFormat;return{transcoderFormat,engineFormat}}function isPowerOfTwo(value){if(value<=2)return true;return(value&value-1)===0&&value!==0}};const FORMAT_MAP={[VK_FORMAT_R32G32B32A32_SFLOAT]:RGBAFormat,[VK_FORMAT_R16G16B16A16_SFLOAT]:RGBAFormat,[VK_FORMAT_R8G8B8A8_UNORM]:RGBAFormat,[VK_FORMAT_R8G8B8A8_SRGB]:RGBAFormat,[VK_FORMAT_R32G32_SFLOAT]:RGFormat,[VK_FORMAT_R16G16_SFLOAT]:RGFormat,[VK_FORMAT_R8G8_UNORM]:RGFormat,[VK_FORMAT_R8G8_SRGB]:RGFormat,[VK_FORMAT_R32_SFLOAT]:RedFormat,[VK_FORMAT_R16_SFLOAT]:RedFormat,[VK_FORMAT_R8_SRGB]:RedFormat,[VK_FORMAT_R8_UNORM]:RedFormat};const TYPE_MAP={[VK_FORMAT_R32G32B32A32_SFLOAT]:FloatType,[VK_FORMAT_R16G16B16A16_SFLOAT]:HalfFloatType,[VK_FORMAT_R8G8B8A8_UNORM]:UnsignedByteType,[VK_FORMAT_R8G8B8A8_SRGB]:UnsignedByteType,[VK_FORMAT_R32G32_SFLOAT]:FloatType,[VK_FORMAT_R16G16_SFLOAT]:HalfFloatType,[VK_FORMAT_R8G8_UNORM]:UnsignedByteType,[VK_FORMAT_R8G8_SRGB]:UnsignedByteType,[VK_FORMAT_R32_SFLOAT]:FloatType,[VK_FORMAT_R16_SFLOAT]:HalfFloatType,[VK_FORMAT_R8_SRGB]:UnsignedByteType,[VK_FORMAT_R8_UNORM]:UnsignedByteType};const ENCODING_MAP={[VK_FORMAT_R8G8B8A8_SRGB]:sRGBEncoding,[VK_FORMAT_R8G8_SRGB]:sRGBEncoding,[VK_FORMAT_R8_SRGB]:sRGBEncoding};async function createDataTexture(container){const{vkFormat,pixelWidth,pixelHeight,pixelDepth}=container;if(FORMAT_MAP[vkFormat]===undefined){throw new Error("THREE.KTX2Loader: Unsupported vkFormat.")}const level=container.levels[0];let levelData;let view;if(container.supercompressionScheme===KHR_SUPERCOMPRESSION_NONE){levelData=level.levelData}else if(container.supercompressionScheme===KHR_SUPERCOMPRESSION_ZSTD){if(!_zstd){_zstd=new Promise(async resolve=>{const zstd=new ZSTDDecoder;await zstd.init();resolve(zstd)})}levelData=(await _zstd).decode(level.levelData,level.uncompressedByteLength)}else{throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.")}if(TYPE_MAP[vkFormat]===FloatType){view=new Float32Array(levelData.buffer,levelData.byteOffset,levelData.byteLength/Float32Array.BYTES_PER_ELEMENT)}else if(TYPE_MAP[vkFormat]===HalfFloatType){view=new Uint16Array(levelData.buffer,levelData.byteOffset,levelData.byteLength/Uint16Array.BYTES_PER_ELEMENT)}else{view=levelData}const texture=pixelDepth===0?new DataTexture(view,pixelWidth,pixelHeight):new Data3DTexture(view,pixelWidth,pixelHeight,pixelDepth);texture.type=TYPE_MAP[vkFormat];texture.format=FORMAT_MAP[vkFormat];texture.encoding=ENCODING_MAP[vkFormat]||LinearEncoding;texture.needsUpdate=true;return Promise.resolve(texture)}THREE.KTX2Loader=KTX2Loader})();(function(){let A,I,B;const g={env:{emscripten_notify_memory_growth:function(A){B=new Uint8Array(I.exports.memory.buffer)}}};class Q{init(){return A||(A="undefined"!=typeof fetch?fetch("data:application/wasm;base64,"+C).then(A=>A.arrayBuffer()).then(A=>WebAssembly.instantiate(A,g)).then(this._init):WebAssembly.instantiate(Buffer.from(C,"base64"),g).then(this._init),A)}_init(A){I=A.instance,g.env.emscripten_notify_memory_growth(0)}decode(A,g=0){if(!I)throw new Error("ZSTDDecoder: Await .init() before decoding.");const Q=A.byteLength,C=I.exports.malloc(Q);B.set(A,C),g=g||Number(I.exports.ZSTD_findDecompressedSize(C,Q));const E=I.exports.malloc(g),i=I.exports.ZSTD_decompress(E,g,C,Q),D=B.slice(E,E+i);return I.exports.free(C),I.exports.free(E),D}}const C=" ";THREE.ZSTDDecoder=Q})();(function(){var BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,Color=THREE.Color,FileLoader=THREE.FileLoader,Loader=THREE.Loader,LinearSRGBColorSpace=THREE.LinearSRGBColorSpace,SRGBColorSpace=THREE.SRGBColorSpace;const _taskCache=new WeakMap;class DRACOLoader extends Loader{constructor(manager){super(manager);this.decoderPath="";this.decoderConfig={};this.decoderBinary=null;this.decoderPending=null;this.workerLimit=4;this.workerPool=[];this.workerNextTaskID=1;this.workerSourceURL="";this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"};this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(path){this.decoderPath=path;return this}setDecoderConfig(config){this.decoderConfig=config;return this}setWorkerLimit(workerLimit){this.workerLimit=workerLimit;return this}load(url,onLoad,onProgress,onError){const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,buffer=>{this.parse(buffer,onLoad,onError)},onProgress,onError)}parse(buffer,onLoad,onError=()=>{}){this.decodeDracoFile(buffer,onLoad,null,null,SRGBColorSpace).catch(onError)}decodeDracoFile(buffer,callback,attributeIDs,attributeTypes,vertexColorSpace=LinearSRGBColorSpace,onError=()=>{}){const taskConfig={attributeIDs:attributeIDs||this.defaultAttributeIDs,attributeTypes:attributeTypes||this.defaultAttributeTypes,useUniqueIDs:!!attributeIDs,vertexColorSpace:vertexColorSpace};return this.decodeGeometry(buffer,taskConfig).then(callback).catch(onError)}decodeGeometry(buffer,taskConfig){const taskKey=JSON.stringify(taskConfig);if(_taskCache.has(buffer)){const cachedTask=_taskCache.get(buffer);if(cachedTask.key===taskKey){return cachedTask.promise}else if(buffer.byteLength===0){throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different "+"settings. Buffer has already been transferred.")}}let worker;const taskID=this.workerNextTaskID++;const taskCost=buffer.byteLength;const geometryPending=this._getWorker(taskID,taskCost).then(_worker=>{worker=_worker;return new Promise((resolve,reject)=>{worker._callbacks[taskID]={resolve,reject};worker.postMessage({type:"decode",id:taskID,taskConfig,buffer},[buffer])})}).then(message=>this._createGeometry(message.geometry));geometryPending.catch(()=>true).then(()=>{if(worker&&taskID){this._releaseTask(worker,taskID)}});_taskCache.set(buffer,{key:taskKey,promise:geometryPending});return geometryPending}_createGeometry(geometryData){const geometry=new BufferGeometry;if(geometryData.index){geometry.setIndex(new BufferAttribute(geometryData.index.array,1))}for(let i=0;i<geometryData.attributes.length;i++){const result=geometryData.attributes[i];const name=result.name;const array=result.array;const itemSize=result.itemSize;const attribute=new BufferAttribute(array,itemSize);if(name==="color"){this._assignVertexColorSpace(attribute,result.vertexColorSpace);attribute.normalized=array instanceof Float32Array===false}geometry.setAttribute(name,attribute)}return geometry}_assignVertexColorSpace(attribute,inputColorSpace){if(inputColorSpace!==SRGBColorSpace)return;const _color=new Color;for(let i=0,il=attribute.count;i<il;i++){_color.fromBufferAttribute(attribute,i).convertSRGBToLinear();attribute.setXYZ(i,_color.r,_color.g,_color.b)}}_loadLibrary(url,responseType){const loader=new FileLoader(this.manager);loader.setPath(this.decoderPath);loader.setResponseType(responseType);loader.setWithCredentials(this.withCredentials);return new Promise((resolve,reject)=>{loader.load(url,resolve,undefined,reject)})}preload(){this._initDecoder();return this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const useJS=typeof WebAssembly!=="object"||this.decoderConfig.type==="js";const librariesPending=[];if(useJS){librariesPending.push(this._loadLibrary("draco_decoder.js","text"))}else{librariesPending.push(this._loadLibrary("draco_wasm_wrapper.js","text"));librariesPending.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))}this.decoderPending=Promise.all(librariesPending).then(libraries=>{const jsContent=libraries[0];if(!useJS){this.decoderConfig.wasmBinary=libraries[1]}const fn=DRACOWorker.toString();const body=["/* draco decoder */",jsContent,"","/* worker */",fn.substring(fn.indexOf("{")+1,fn.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([body]))});return this.decoderPending}_getWorker(taskID,taskCost){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const worker=new Worker(this.workerSourceURL);worker._callbacks={};worker._taskCosts={};worker._taskLoad=0;worker.postMessage({type:"init",decoderConfig:this.decoderConfig});worker.onmessage=function(e){const message=e.data;switch(message.type){case"decode":worker._callbacks[message.id].resolve(message);break;case"error":worker._callbacks[message.id].reject(message);break;default:console.error("THREE.DRACOLoader: Unexpected message, \""+message.type+"\"");}};this.workerPool.push(worker)}else{this.workerPool.sort(function(a,b){return a._taskLoad>b._taskLoad?-1:1})}const worker=this.workerPool[this.workerPool.length-1];worker._taskCosts[taskID]=taskCost;worker._taskLoad+=taskCost;return worker})}_releaseTask(worker,taskID){worker._taskLoad-=worker._taskCosts[taskID];delete worker._callbacks[taskID];delete worker._taskCosts[taskID]}debug(){console.log("Task load: ",this.workerPool.map(worker=>worker._taskLoad))}dispose(){for(let i=0;i<this.workerPool.length;++i){this.workerPool[i].terminate()}this.workerPool.length=0;if(this.workerSourceURL!==""){URL.revokeObjectURL(this.workerSourceURL)}return this}}function DRACOWorker(){let decoderConfig;let decoderPending;onmessage=function(e){const message=e.data;switch(message.type){case"init":decoderConfig=message.decoderConfig;decoderPending=new Promise(function(resolve){decoderConfig.onModuleLoaded=function(draco){resolve({draco:draco})};DracoDecoderModule(decoderConfig)});break;case"decode":const buffer=message.buffer;const taskConfig=message.taskConfig;decoderPending.then(module=>{const draco=module.draco;const decoder=new draco.Decoder;try{const geometry=decodeGeometry(draco,decoder,new Int8Array(buffer),taskConfig);const buffers=geometry.attributes.map(attr=>attr.array.buffer);if(geometry.index)buffers.push(geometry.index.array.buffer);self.postMessage({type:"decode",id:message.id,geometry},buffers)}catch(error){console.error(error);self.postMessage({type:"error",id:message.id,error:error.message})}finally{draco.destroy(decoder)}});break;}};function decodeGeometry(draco,decoder,array,taskConfig){const attributeIDs=taskConfig.attributeIDs;const attributeTypes=taskConfig.attributeTypes;let dracoGeometry;let decodingStatus;const geometryType=decoder.GetEncodedGeometryType(array);if(geometryType===draco.TRIANGULAR_MESH){dracoGeometry=new draco.Mesh;decodingStatus=decoder.DecodeArrayToMesh(array,array.byteLength,dracoGeometry)}else if(geometryType===draco.POINT_CLOUD){dracoGeometry=new draco.PointCloud;decodingStatus=decoder.DecodeArrayToPointCloud(array,array.byteLength,dracoGeometry)}else{throw new Error("THREE.DRACOLoader: Unexpected geometry type.")}if(!decodingStatus.ok()||dracoGeometry.ptr===0){throw new Error("THREE.DRACOLoader: Decoding failed: "+decodingStatus.error_msg())}const geometry={index:null,attributes:[]};for(const attributeName in attributeIDs){const attributeType=self[attributeTypes[attributeName]];let attribute;let attributeID;if(taskConfig.useUniqueIDs){attributeID=attributeIDs[attributeName];attribute=decoder.GetAttributeByUniqueId(dracoGeometry,attributeID)}else{attributeID=decoder.GetAttributeId(dracoGeometry,draco[attributeIDs[attributeName]]);if(attributeID===-1)continue;attribute=decoder.GetAttribute(dracoGeometry,attributeID)}const attributeResult=decodeAttribute(draco,decoder,dracoGeometry,attributeName,attributeType,attribute);if(attributeName==="color"){attributeResult.vertexColorSpace=taskConfig.vertexColorSpace}geometry.attributes.push(attributeResult)}if(geometryType===draco.TRIANGULAR_MESH){geometry.index=decodeIndex(draco,decoder,dracoGeometry)}draco.destroy(dracoGeometry);return geometry}function decodeIndex(draco,decoder,dracoGeometry){const numFaces=dracoGeometry.num_faces();const numIndices=numFaces*3;const byteLength=numIndices*4;const ptr=draco._malloc(byteLength);decoder.GetTrianglesUInt32Array(dracoGeometry,byteLength,ptr);const index=new Uint32Array(draco.HEAPF32.buffer,ptr,numIndices).slice();draco._free(ptr);return{array:index,itemSize:1}}function decodeAttribute(draco,decoder,dracoGeometry,attributeName,attributeType,attribute){const numComponents=attribute.num_components();const numPoints=dracoGeometry.num_points();const numValues=numPoints*numComponents;const byteLength=numValues*attributeType.BYTES_PER_ELEMENT;const dataType=getDracoDataType(draco,attributeType);const ptr=draco._malloc(byteLength);decoder.GetAttributeDataArrayForAllPoints(dracoGeometry,attribute,dataType,byteLength,ptr);const array=new attributeType(draco.HEAPF32.buffer,ptr,numValues).slice();draco._free(ptr);return{name:attributeName,array:array,itemSize:numComponents}}function getDracoDataType(draco,attributeType){switch(attributeType){case Float32Array:return draco.DT_FLOAT32;case Int8Array:return draco.DT_INT8;case Int16Array:return draco.DT_INT16;case Int32Array:return draco.DT_INT32;case Uint8Array:return draco.DT_UINT8;case Uint16Array:return draco.DT_UINT16;case Uint32Array:return draco.DT_UINT32;}}}THREE.DRACOLoader=DRACOLoader})();(function(e){var modifiedJSON={};modifiedJSON.parse=function(data){json=JSON.parse(data);json.nodes&&json.nodes.forEach((node,index)=>{(node.extras||(node.extras={})).id=index.toString()});return json};e(modifiedJSON)})(function(JSON){(function(){var AnimationClip=THREE.AnimationClip,Bone=THREE.Bone,Box3=THREE.Box3,BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,ClampToEdgeWrapping=THREE.ClampToEdgeWrapping,Color=THREE.Color,ColorManagement=THREE.ColorManagement,DirectionalLight=THREE.DirectionalLight,DoubleSide=THREE.DoubleSide,FileLoader=THREE.FileLoader,FrontSide=THREE.FrontSide,Group=THREE.Group,ImageBitmapLoader=THREE.ImageBitmapLoader,InstancedMesh=THREE.InstancedMesh,InterleavedBuffer=THREE.InterleavedBuffer,InterleavedBufferAttribute=THREE.InterleavedBufferAttribute,Interpolant=THREE.Interpolant,InterpolateDiscrete=THREE.InterpolateDiscrete,InterpolateLinear=THREE.InterpolateLinear,Line=THREE.Line,LineBasicMaterial=THREE.LineBasicMaterial,LineLoop=THREE.LineLoop,LineSegments=THREE.LineSegments,LinearFilter=THREE.LinearFilter,LinearMipmapLinearFilter=THREE.LinearMipmapLinearFilter,LinearMipmapNearestFilter=THREE.LinearMipmapNearestFilter,LinearSRGBColorSpace=THREE.LinearSRGBColorSpace,Loader=THREE.Loader,LoaderUtils=THREE.LoaderUtils,Material=THREE.Material,MathUtils=THREE.MathUtils,Matrix4=THREE.Matrix4,Mesh=THREE.Mesh,MeshBasicMaterial=THREE.MeshBasicMaterial,MeshPhysicalMaterial=THREE.MeshPhysicalMaterial,MeshStandardMaterial=THREE.MeshStandardMaterial,MirroredRepeatWrapping=THREE.MirroredRepeatWrapping,NearestFilter=THREE.NearestFilter,NearestMipmapLinearFilter=THREE.NearestMipmapLinearFilter,NearestMipmapNearestFilter=THREE.NearestMipmapNearestFilter,NumberKeyframeTrack=THREE.NumberKeyframeTrack,Object3D=THREE.Object3D,OrthographicCamera=THREE.OrthographicCamera,PerspectiveCamera=THREE.PerspectiveCamera,PointLight=THREE.PointLight,Points=THREE.Points,PointsMaterial=THREE.PointsMaterial,PropertyBinding=THREE.PropertyBinding,Quaternion=THREE.Quaternion,QuaternionKeyframeTrack=THREE.QuaternionKeyframeTrack,RepeatWrapping=THREE.RepeatWrapping,Skeleton=THREE.Skeleton,SkinnedMesh=THREE.SkinnedMesh,Sphere=THREE.Sphere,SpotLight=THREE.SpotLight,Texture=THREE.Texture,TextureLoader=THREE.TextureLoader,TriangleFanDrawMode=THREE.TriangleFanDrawMode,TriangleStripDrawMode=THREE.TriangleStripDrawMode,Vector2=THREE.Vector2,Vector3=THREE.Vector3,VectorKeyframeTrack=THREE.VectorKeyframeTrack,SRGBColorSpace=THREE.SRGBColorSpace,InstancedBufferAttribute=THREE.InstancedBufferAttribute;var toTrianglesDrawMode=THREE.BufferGeometryUtils.toTrianglesDrawMode;class GLTFLoader extends Loader{constructor(manager){super(manager);this.dracoLoader=null;this.ktx2Loader=null;this.meshoptDecoder=null;this.pluginCallbacks=[];this.register(function(parser){return new GLTFMaterialsClearcoatExtension(parser)});this.register(function(parser){return new GLTFMaterialsDispersionExtension(parser)});this.register(function(parser){return new GLTFTextureBasisUExtension(parser)});this.register(function(parser){return new GLTFTextureWebPExtension(parser)});this.register(function(parser){return new GLTFTextureAVIFExtension(parser)});this.register(function(parser){return new GLTFMaterialsSheenExtension(parser)});this.register(function(parser){return new GLTFMaterialsTransmissionExtension(parser)});this.register(function(parser){return new GLTFMaterialsVolumeExtension(parser)});this.register(function(parser){return new GLTFMaterialsIorExtension(parser)});this.register(function(parser){return new GLTFMaterialsEmissiveStrengthExtension(parser)});this.register(function(parser){return new GLTFMaterialsSpecularExtension(parser)});this.register(function(parser){return new GLTFMaterialsIridescenceExtension(parser)});this.register(function(parser){return new GLTFMaterialsAnisotropyExtension(parser)});this.register(function(parser){return new GLTFMaterialsBumpExtension(parser)});this.register(function(parser){return new GLTFLightsExtension(parser)});this.register(function(parser){return new GLTFMeshoptCompression(parser)});this.register(function(parser){return new GLTFMeshGpuInstancing(parser)})}load(url,onLoad,onProgress,onError){const scope=this;let resourcePath;if(this.resourcePath!==""){resourcePath=this.resourcePath}else if(this.path!==""){const relativeUrl=LoaderUtils.extractUrlBase(url);resourcePath=LoaderUtils.resolveURL(relativeUrl,this.path)}else{resourcePath=LoaderUtils.extractUrlBase(url)}this.manager.itemStart(url);const _onError=function(e){if(onError){onError(e)}else{console.error(e)}scope.manager.itemError(url);scope.manager.itemEnd(url)};const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(data){try{scope.parse(data,resourcePath,function(gltf){onLoad(gltf);scope.manager.itemEnd(url)},_onError)}catch(e){_onError(e)}},onProgress,_onError)}setDRACOLoader(dracoLoader){this.dracoLoader=dracoLoader;return this}setDDSLoader(){throw new Error("THREE.GLTFLoader: \"MSFT_texture_dds\" no longer supported. Please update to \"KHR_texture_basisu\".")}setKTX2Loader(ktx2Loader){this.ktx2Loader=ktx2Loader;return this}setMeshoptDecoder(meshoptDecoder){this.meshoptDecoder=meshoptDecoder;return this}register(callback){if(this.pluginCallbacks.indexOf(callback)===-1){this.pluginCallbacks.push(callback)}return this}unregister(callback){if(this.pluginCallbacks.indexOf(callback)!==-1){this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(callback),1)}return this}parse(data,path,onLoad,onError){let json;const extensions={};const plugins={};const textDecoder=new TextDecoder;if(typeof data==="string"){json=JSON.parse(data)}else if(data instanceof ArrayBuffer){const magic=textDecoder.decode(new Uint8Array(data,0,4));if(magic===BINARY_EXTENSION_HEADER_MAGIC){try{extensions[EXTENSIONS.KHR_BINARY_GLTF]=new GLTFBinaryExtension(data)}catch(error){if(onError)onError(error);return}json=JSON.parse(extensions[EXTENSIONS.KHR_BINARY_GLTF].content)}else{json=JSON.parse(textDecoder.decode(data))}}else{json=data}if(json.asset===undefined||json.asset.version[0]<2){if(onError)onError(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const parser=new GLTFParser(json,{path:path||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});parser.fileLoader.setRequestHeader(this.requestHeader);for(let i=0;i<this.pluginCallbacks.length;i++){const plugin=this.pluginCallbacks[i](parser);if(!plugin.name)console.error("THREE.GLTFLoader: Invalid plugin found: missing name");plugins[plugin.name]=plugin;extensions[plugin.name]=true}if(json.extensionsUsed){for(let i=0;i<json.extensionsUsed.length;++i){const extensionName=json.extensionsUsed[i];const extensionsRequired=json.extensionsRequired||[];switch(extensionName){case EXTENSIONS.KHR_MATERIALS_UNLIT:extensions[extensionName]=new GLTFMaterialsUnlitExtension;break;case EXTENSIONS.KHR_DRACO_MESH_COMPRESSION:extensions[extensionName]=new GLTFDracoMeshCompressionExtension(json,this.dracoLoader);break;case EXTENSIONS.KHR_TEXTURE_TRANSFORM:extensions[extensionName]=new GLTFTextureTransformExtension;break;case EXTENSIONS.KHR_MESH_QUANTIZATION:extensions[extensionName]=new GLTFMeshQuantizationExtension;break;default:if(extensionsRequired.indexOf(extensionName)>=0&&plugins[extensionName]===undefined){console.warn("THREE.GLTFLoader: Unknown extension \""+extensionName+"\".")}}}}parser.setExtensions(extensions);parser.setPlugins(plugins);parser.parse(onLoad,onError)}parseAsync(data,path){const scope=this;return new Promise(function(resolve,reject){scope.parse(data,path,resolve,reject)})}}function GLTFRegistry(){let objects={};return{get:function(key){return objects[key]},add:function(key,object){objects[key]=object},remove:function(key){delete objects[key]},removeAll:function(){objects={}}}}const EXTENSIONS={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class GLTFLightsExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_LIGHTS_PUNCTUAL;this.cache={refs:{},uses:{}}}_markDefs(){const parser=this.parser;const nodeDefs=this.parser.json.nodes||[];for(let nodeIndex=0,nodeLength=nodeDefs.length;nodeIndex<nodeLength;nodeIndex++){const nodeDef=nodeDefs[nodeIndex];if(nodeDef.extensions&&nodeDef.extensions[this.name]&&nodeDef.extensions[this.name].light!==undefined){parser._addNodeRef(this.cache,nodeDef.extensions[this.name].light)}}}_loadLight(lightIndex){const parser=this.parser;const cacheKey="light:"+lightIndex;let dependency=parser.cache.get(cacheKey);if(dependency)return dependency;const json=parser.json;const extensions=json.extensions&&json.extensions[this.name]||{};const lightDefs=extensions.lights||[];const lightDef=lightDefs[lightIndex];let lightNode;const color=new Color(16777215);if(lightDef.color!==undefined)color.setRGB(lightDef.color[0],lightDef.color[1],lightDef.color[2],LinearSRGBColorSpace);const range=lightDef.range!==undefined?lightDef.range:0;switch(lightDef.type){case"directional":lightNode=new DirectionalLight(color);lightNode.target.position.set(0,0,-1);lightNode.add(lightNode.target);break;case"point":lightNode=new PointLight(color);lightNode.distance=range;break;case"spot":lightNode=new SpotLight(color);lightNode.distance=range;lightDef.spot=lightDef.spot||{};lightDef.spot.innerConeAngle=lightDef.spot.innerConeAngle!==undefined?lightDef.spot.innerConeAngle:0;lightDef.spot.outerConeAngle=lightDef.spot.outerConeAngle!==undefined?lightDef.spot.outerConeAngle:Math.PI/4;lightNode.angle=lightDef.spot.outerConeAngle;lightNode.penumbra=1-lightDef.spot.innerConeAngle/lightDef.spot.outerConeAngle;lightNode.target.position.set(0,0,-1);lightNode.add(lightNode.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+lightDef.type);}lightNode.position.set(0,0,0);lightNode.decay=2;assignExtrasToUserData(lightNode,lightDef);if(lightDef.intensity!==undefined)lightNode.intensity=lightDef.intensity;lightNode.name=parser.createUniqueName(lightDef.name||"light_"+lightIndex);dependency=Promise.resolve(lightNode);parser.cache.add(cacheKey,dependency);return dependency}getDependency(type,index){if(type!=="light")return;return this._loadLight(index)}createNodeAttachment(nodeIndex){const self=this;const parser=this.parser;const json=parser.json;const nodeDef=json.nodes[nodeIndex];const lightDef=nodeDef.extensions&&nodeDef.extensions[this.name]||{};const lightIndex=lightDef.light;if(lightIndex===undefined)return null;return this._loadLight(lightIndex).then(function(light){return parser._getNodeRef(self.cache,lightIndex,light)})}}class GLTFMaterialsUnlitExtension{constructor(){this.name=EXTENSIONS.KHR_MATERIALS_UNLIT}getMaterialType(){return MeshBasicMaterial}extendParams(materialParams,materialDef,parser){const pending=[];materialParams.color=new Color(1,1,1);materialParams.opacity=1;const metallicRoughness=materialDef.pbrMetallicRoughness;if(metallicRoughness){if(Array.isArray(metallicRoughness.baseColorFactor)){const array=metallicRoughness.baseColorFactor;materialParams.color.setRGB(array[0],array[1],array[2],LinearSRGBColorSpace);materialParams.opacity=array[3]}if(metallicRoughness.baseColorTexture!==undefined){pending.push(parser.assignTexture(materialParams,"map",metallicRoughness.baseColorTexture,SRGBColorSpace))}}return Promise.all(pending)}}class GLTFMaterialsEmissiveStrengthExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const emissiveStrength=materialDef.extensions[this.name].emissiveStrength;if(emissiveStrength!==undefined){materialParams.emissiveIntensity=emissiveStrength}return Promise.resolve()}}class GLTFMaterialsClearcoatExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_CLEARCOAT}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];if(extension.clearcoatFactor!==undefined){materialParams.clearcoat=extension.clearcoatFactor}if(extension.clearcoatTexture!==undefined){pending.push(parser.assignTexture(materialParams,"clearcoatMap",extension.clearcoatTexture))}if(extension.clearcoatRoughnessFactor!==undefined){materialParams.clearcoatRoughness=extension.clearcoatRoughnessFactor}if(extension.clearcoatRoughnessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"clearcoatRoughnessMap",extension.clearcoatRoughnessTexture))}if(extension.clearcoatNormalTexture!==undefined){pending.push(parser.assignTexture(materialParams,"clearcoatNormalMap",extension.clearcoatNormalTexture));if(extension.clearcoatNormalTexture.scale!==undefined){const scale=extension.clearcoatNormalTexture.scale;materialParams.clearcoatNormalScale=new Vector2(scale,scale)}}return Promise.all(pending)}}class GLTFMaterialsDispersionExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_DISPERSION}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const extension=materialDef.extensions[this.name];materialParams.dispersion=extension.dispersion!==undefined?extension.dispersion:0;return Promise.resolve()}}class GLTFMaterialsIridescenceExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_IRIDESCENCE}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];if(extension.iridescenceFactor!==undefined){materialParams.iridescence=extension.iridescenceFactor}if(extension.iridescenceTexture!==undefined){pending.push(parser.assignTexture(materialParams,"iridescenceMap",extension.iridescenceTexture))}if(extension.iridescenceIor!==undefined){materialParams.iridescenceIOR=extension.iridescenceIor}if(materialParams.iridescenceThicknessRange===undefined){materialParams.iridescenceThicknessRange=[100,400]}if(extension.iridescenceThicknessMinimum!==undefined){materialParams.iridescenceThicknessRange[0]=extension.iridescenceThicknessMinimum}if(extension.iridescenceThicknessMaximum!==undefined){materialParams.iridescenceThicknessRange[1]=extension.iridescenceThicknessMaximum}if(extension.iridescenceThicknessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"iridescenceThicknessMap",extension.iridescenceThicknessTexture))}return Promise.all(pending)}}class GLTFMaterialsSheenExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_SHEEN}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];materialParams.sheenColor=new Color(0,0,0);materialParams.sheenRoughness=0;materialParams.sheen=1;const extension=materialDef.extensions[this.name];if(extension.sheenColorFactor!==undefined){const colorFactor=extension.sheenColorFactor;materialParams.sheenColor.setRGB(colorFactor[0],colorFactor[1],colorFactor[2],LinearSRGBColorSpace)}if(extension.sheenRoughnessFactor!==undefined){materialParams.sheenRoughness=extension.sheenRoughnessFactor}if(extension.sheenColorTexture!==undefined){pending.push(parser.assignTexture(materialParams,"sheenColorMap",extension.sheenColorTexture,SRGBColorSpace))}if(extension.sheenRoughnessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"sheenRoughnessMap",extension.sheenRoughnessTexture))}return Promise.all(pending)}}class GLTFMaterialsTransmissionExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_TRANSMISSION}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];if(extension.transmissionFactor!==undefined){materialParams.transmission=extension.transmissionFactor}if(extension.transmissionTexture!==undefined){pending.push(parser.assignTexture(materialParams,"transmissionMap",extension.transmissionTexture))}return Promise.all(pending)}}class GLTFMaterialsVolumeExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_VOLUME}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];materialParams.thickness=extension.thicknessFactor!==undefined?extension.thicknessFactor:0;if(extension.thicknessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"thicknessMap",extension.thicknessTexture))}materialParams.attenuationDistance=extension.attenuationDistance||Infinity;const colorArray=extension.attenuationColor||[1,1,1];materialParams.attenuationColor=new Color().setRGB(colorArray[0],colorArray[1],colorArray[2],LinearSRGBColorSpace);return Promise.all(pending)}}class GLTFMaterialsIorExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_IOR}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const extension=materialDef.extensions[this.name];materialParams.ior=extension.ior!==undefined?extension.ior:1.5;return Promise.resolve()}}class GLTFMaterialsSpecularExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_SPECULAR}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];materialParams.specularIntensity=extension.specularFactor!==undefined?extension.specularFactor:1;if(extension.specularTexture!==undefined){pending.push(parser.assignTexture(materialParams,"specularIntensityMap",extension.specularTexture))}const colorArray=extension.specularColorFactor||[1,1,1];materialParams.specularColor=new Color().setRGB(colorArray[0],colorArray[1],colorArray[2],LinearSRGBColorSpace);if(extension.specularColorTexture!==undefined){pending.push(parser.assignTexture(materialParams,"specularColorMap",extension.specularColorTexture,SRGBColorSpace))}return Promise.all(pending)}}class GLTFMaterialsBumpExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.EXT_MATERIALS_BUMP}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];materialParams.bumpScale=extension.bumpFactor!==undefined?extension.bumpFactor:1;if(extension.bumpTexture!==undefined){pending.push(parser.assignTexture(materialParams,"bumpMap",extension.bumpTexture))}return Promise.all(pending)}}class GLTFMaterialsAnisotropyExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_MATERIALS_ANISOTROPY}getMaterialType(materialIndex){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name])return null;return MeshPhysicalMaterial}extendMaterialParams(materialIndex,materialParams){const parser=this.parser;const materialDef=parser.json.materials[materialIndex];if(!materialDef.extensions||!materialDef.extensions[this.name]){return Promise.resolve()}const pending=[];const extension=materialDef.extensions[this.name];if(extension.anisotropyStrength!==undefined){materialParams.anisotropy=extension.anisotropyStrength}if(extension.anisotropyRotation!==undefined){materialParams.anisotropyRotation=extension.anisotropyRotation}if(extension.anisotropyTexture!==undefined){pending.push(parser.assignTexture(materialParams,"anisotropyMap",extension.anisotropyTexture))}return Promise.all(pending)}}class GLTFTextureBasisUExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.KHR_TEXTURE_BASISU}loadTexture(textureIndex){const parser=this.parser;const json=parser.json;const textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[this.name]){return null}const extension=textureDef.extensions[this.name];const loader=parser.options.ktx2Loader;if(!loader){if(json.extensionsRequired&&json.extensionsRequired.indexOf(this.name)>=0){throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures")}else{return null}}return parser.loadTextureImage(textureIndex,extension.source,loader)}}class GLTFTextureWebPExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.EXT_TEXTURE_WEBP;this.isSupported=null}loadTexture(textureIndex){const name=this.name;const parser=this.parser;const json=parser.json;const textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[name]){return null}const extension=textureDef.extensions[name];const source=json.images[extension.source];let loader=parser.textureLoader;if(source.uri){const handler=parser.options.manager.getHandler(source.uri);if(handler!==null)loader=handler}return this.detectSupport().then(function(isSupported){if(isSupported)return parser.loadTextureImage(textureIndex,extension.source,loader);if(json.extensionsRequired&&json.extensionsRequired.indexOf(name)>=0){throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.")}return parser.loadTexture(textureIndex)})}detectSupport(){if(!this.isSupported){this.isSupported=new Promise(function(resolve){const image=new Image;image.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA";image.onload=image.onerror=function(){resolve(image.height===1)}})}return this.isSupported}}class GLTFTextureAVIFExtension{constructor(parser){this.parser=parser;this.name=EXTENSIONS.EXT_TEXTURE_AVIF;this.isSupported=null}loadTexture(textureIndex){const name=this.name;const parser=this.parser;const json=parser.json;const textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[name]){return null}const extension=textureDef.extensions[name];const source=json.images[extension.source];let loader=parser.textureLoader;if(source.uri){const handler=parser.options.manager.getHandler(source.uri);if(handler!==null)loader=handler}return this.detectSupport().then(function(isSupported){if(isSupported)return parser.loadTextureImage(textureIndex,extension.source,loader);if(json.extensionsRequired&&json.extensionsRequired.indexOf(name)>=0){throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.")}return parser.loadTexture(textureIndex)})}detectSupport(){if(!this.isSupported){this.isSupported=new Promise(function(resolve){const image=new Image;image.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=";image.onload=image.onerror=function(){resolve(image.height===1)}})}return this.isSupported}}class GLTFMeshoptCompression{constructor(parser){this.name=EXTENSIONS.EXT_MESHOPT_COMPRESSION;this.parser=parser}loadBufferView(index){const json=this.parser.json;const bufferView=json.bufferViews[index];if(bufferView.extensions&&bufferView.extensions[this.name]){const extensionDef=bufferView.extensions[this.name];const buffer=this.parser.getDependency("buffer",extensionDef.buffer);const decoder=this.parser.options.meshoptDecoder;if(!decoder||!decoder.supported){if(json.extensionsRequired&&json.extensionsRequired.indexOf(this.name)>=0){throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files")}else{return null}}return buffer.then(function(res){const byteOffset=extensionDef.byteOffset||0;const byteLength=extensionDef.byteLength||0;const count=extensionDef.count;const stride=extensionDef.byteStride;const source=new Uint8Array(res,byteOffset,byteLength);if(decoder.decodeGltfBufferAsync){return decoder.decodeGltfBufferAsync(count,stride,source,extensionDef.mode,extensionDef.filter).then(function(res){return res.buffer})}else{return decoder.ready.then(function(){const result=new ArrayBuffer(count*stride);decoder.decodeGltfBuffer(new Uint8Array(result),count,stride,source,extensionDef.mode,extensionDef.filter);return result})}})}else{return null}}}class GLTFMeshGpuInstancing{constructor(parser){this.name=EXTENSIONS.EXT_MESH_GPU_INSTANCING;this.parser=parser}createNodeMesh(nodeIndex){const json=this.parser.json;const nodeDef=json.nodes[nodeIndex];if(!nodeDef.extensions||!nodeDef.extensions[this.name]||nodeDef.mesh===undefined){return null}const meshDef=json.meshes[nodeDef.mesh];for(const primitive of meshDef.primitives){if(primitive.mode!==WEBGL_CONSTANTS.TRIANGLES&&primitive.mode!==WEBGL_CONSTANTS.TRIANGLE_STRIP&&primitive.mode!==WEBGL_CONSTANTS.TRIANGLE_FAN&&primitive.mode!==undefined){return null}}const extensionDef=nodeDef.extensions[this.name];const attributesDef=extensionDef.attributes;const pending=[];const attributes={};for(const key in attributesDef){pending.push(this.parser.getDependency("accessor",attributesDef[key]).then(accessor=>{attributes[key]=accessor;return attributes[key]}))}if(pending.length<1){return null}pending.push(this.parser.createNodeMesh(nodeIndex));return Promise.all(pending).then(results=>{const nodeObject=results.pop();const meshes=nodeObject.isGroup?nodeObject.children:[nodeObject];const count=results[0].count;const instancedMeshes=[];for(const mesh of meshes){const m=new Matrix4;const p=new Vector3;const q=new Quaternion;const s=new Vector3(1,1,1);const instancedMesh=new InstancedMesh(mesh.geometry,mesh.material,count);for(let i=0;i<count;i++){if(attributes.TRANSLATION){p.fromBufferAttribute(attributes.TRANSLATION,i)}if(attributes.ROTATION){q.fromBufferAttribute(attributes.ROTATION,i)}if(attributes.SCALE){s.fromBufferAttribute(attributes.SCALE,i)}instancedMesh.setMatrixAt(i,m.compose(p,q,s))}for(const attributeName in attributes){if(attributeName==="_COLOR_0"){const attr=attributes[attributeName];instancedMesh.instanceColor=new InstancedBufferAttribute(attr.array,attr.itemSize,attr.normalized)}else if(attributeName!=="TRANSLATION"&&attributeName!=="ROTATION"&&attributeName!=="SCALE"){mesh.geometry.setAttribute(attributeName,attributes[attributeName])}}Object3D.prototype.copy.call(instancedMesh,mesh);this.parser.assignFinalMaterial(instancedMesh);instancedMeshes.push(instancedMesh)}if(nodeObject.isGroup){nodeObject.clear();nodeObject.add(...instancedMeshes);return nodeObject}return instancedMeshes[0]})}}const BINARY_EXTENSION_HEADER_MAGIC="glTF";const BINARY_EXTENSION_HEADER_LENGTH=12;const BINARY_EXTENSION_CHUNK_TYPES={JSON:1313821514,BIN:5130562};class GLTFBinaryExtension{constructor(data){this.name=EXTENSIONS.KHR_BINARY_GLTF;this.content=null;this.body=null;const headerView=new DataView(data,0,BINARY_EXTENSION_HEADER_LENGTH);const textDecoder=new TextDecoder;this.header={magic:textDecoder.decode(new Uint8Array(data.slice(0,4))),version:headerView.getUint32(4,true),length:headerView.getUint32(8,true)};if(this.header.magic!==BINARY_EXTENSION_HEADER_MAGIC){throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.")}else if(this.header.version<2){throw new Error("THREE.GLTFLoader: Legacy binary file detected.")}const chunkContentsLength=this.header.length-BINARY_EXTENSION_HEADER_LENGTH;const chunkView=new DataView(data,BINARY_EXTENSION_HEADER_LENGTH);let chunkIndex=0;while(chunkIndex<chunkContentsLength){const chunkLength=chunkView.getUint32(chunkIndex,true);chunkIndex+=4;const chunkType=chunkView.getUint32(chunkIndex,true);chunkIndex+=4;if(chunkType===BINARY_EXTENSION_CHUNK_TYPES.JSON){const contentArray=new Uint8Array(data,BINARY_EXTENSION_HEADER_LENGTH+chunkIndex,chunkLength);this.content=textDecoder.decode(contentArray)}else if(chunkType===BINARY_EXTENSION_CHUNK_TYPES.BIN){const byteOffset=BINARY_EXTENSION_HEADER_LENGTH+chunkIndex;this.body=data.slice(byteOffset,byteOffset+chunkLength)}chunkIndex+=chunkLength}if(this.content===null){throw new Error("THREE.GLTFLoader: JSON content not found.")}}}class GLTFDracoMeshCompressionExtension{constructor(json,dracoLoader){if(!dracoLoader){throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.")}this.name=EXTENSIONS.KHR_DRACO_MESH_COMPRESSION;this.json=json;this.dracoLoader=dracoLoader;this.dracoLoader.preload()}decodePrimitive(primitive,parser){const json=this.json;const dracoLoader=this.dracoLoader;const bufferViewIndex=primitive.extensions[this.name].bufferView;const gltfAttributeMap=primitive.extensions[this.name].attributes;const threeAttributeMap={};const attributeNormalizedMap={};const attributeTypeMap={};for(const attributeName in gltfAttributeMap){const threeAttributeName=ATTRIBUTES[attributeName]||attributeName.toLowerCase();threeAttributeMap[threeAttributeName]=gltfAttributeMap[attributeName]}for(const attributeName in primitive.attributes){const threeAttributeName=ATTRIBUTES[attributeName]||attributeName.toLowerCase();if(gltfAttributeMap[attributeName]!==undefined){const accessorDef=json.accessors[primitive.attributes[attributeName]];const componentType=WEBGL_COMPONENT_TYPES[accessorDef.componentType];attributeTypeMap[threeAttributeName]=componentType.name;attributeNormalizedMap[threeAttributeName]=accessorDef.normalized===true}}return parser.getDependency("bufferView",bufferViewIndex).then(function(bufferView){return new Promise(function(resolve,reject){dracoLoader.decodeDracoFile(bufferView,function(geometry){for(const attributeName in geometry.attributes){const attribute=geometry.attributes[attributeName];const normalized=attributeNormalizedMap[attributeName];if(normalized!==undefined)attribute.normalized=normalized}resolve(geometry)},threeAttributeMap,attributeTypeMap,LinearSRGBColorSpace,reject)})})}}class GLTFTextureTransformExtension{constructor(){this.name=EXTENSIONS.KHR_TEXTURE_TRANSFORM}extendTexture(texture,transform){if((transform.texCoord===undefined||transform.texCoord===texture.channel)&&transform.offset===undefined&&transform.rotation===undefined&&transform.scale===undefined){return texture}texture=texture.clone();if(transform.texCoord!==undefined){texture.channel=transform.texCoord}if(transform.offset!==undefined){texture.offset.fromArray(transform.offset)}if(transform.rotation!==undefined){texture.rotation=transform.rotation}if(transform.scale!==undefined){texture.repeat.fromArray(transform.scale)}texture.needsUpdate=true;return texture}}class GLTFMeshQuantizationExtension{constructor(){this.name=EXTENSIONS.KHR_MESH_QUANTIZATION}}class GLTFCubicSplineInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}copySampleValue_(index){const result=this.resultBuffer,values=this.sampleValues,valueSize=this.valueSize,offset=index*valueSize*3+valueSize;for(let i=0;i!==valueSize;i++){result[i]=values[offset+i]}return result}interpolate_(i1,t0,t,t1){const result=this.resultBuffer;const values=this.sampleValues;const stride=this.valueSize;const stride2=stride*2;const stride3=stride*3;const td=t1-t0;const p=(t-t0)/td;const pp=p*p;const ppp=pp*p;const offset1=i1*stride3;const offset0=offset1-stride3;const s2=-2*ppp+3*pp;const s3=ppp-pp;const s0=1-s2;const s1=s3-pp+p;for(let i=0;i!==stride;i++){const p0=values[offset0+i+stride];const m0=values[offset0+i+stride2]*td;const p1=values[offset1+i+stride];const m1=values[offset1+i]*td;result[i]=s0*p0+s1*m0+s2*p1+s3*m1}return result}}const _q=new Quaternion;class GLTFCubicSplineQuaternionInterpolant extends GLTFCubicSplineInterpolant{interpolate_(i1,t0,t,t1){const result=super.interpolate_(i1,t0,t,t1);_q.fromArray(result).normalize().toArray(result);return result}}const WEBGL_CONSTANTS={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123};const WEBGL_COMPONENT_TYPES={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};const WEBGL_FILTERS={9728:NearestFilter,9729:LinearFilter,9984:NearestMipmapNearestFilter,9985:LinearMipmapNearestFilter,9986:NearestMipmapLinearFilter,9987:LinearMipmapLinearFilter};const WEBGL_WRAPPINGS={33071:ClampToEdgeWrapping,33648:MirroredRepeatWrapping,10497:RepeatWrapping};const WEBGL_TYPE_SIZES={"SCALAR":1,"VEC2":2,"VEC3":3,"VEC4":4,"MAT2":4,"MAT3":9,"MAT4":16};const ATTRIBUTES={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"};const PATH_PROPERTIES={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"};const INTERPOLATION={CUBICSPLINE:undefined,LINEAR:InterpolateLinear,STEP:InterpolateDiscrete};const ALPHA_MODES={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function createDefaultMaterial(cache){if(cache["DefaultMaterial"]===undefined){cache["DefaultMaterial"]=new MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:false,depthTest:true,side:FrontSide})}return cache["DefaultMaterial"]}function addUnknownExtensionsToUserData(knownExtensions,object,objectDef){for(const name in objectDef.extensions){if(knownExtensions[name]===undefined){object.userData.gltfExtensions=object.userData.gltfExtensions||{};object.userData.gltfExtensions[name]=objectDef.extensions[name]}}}function assignExtrasToUserData(object,gltfDef){if(gltfDef.extras!==undefined){if(typeof gltfDef.extras==="object"){Object.assign(object.userData,gltfDef.extras)}else{console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+gltfDef.extras)}}}function addMorphTargets(geometry,targets,parser){let hasMorphPosition=false;let hasMorphNormal=false;let hasMorphColor=false;for(let i=0,il=targets.length;i<il;i++){const target=targets[i];if(target.POSITION!==undefined)hasMorphPosition=true;if(target.NORMAL!==undefined)hasMorphNormal=true;if(target.COLOR_0!==undefined)hasMorphColor=true;if(hasMorphPosition&&hasMorphNormal&&hasMorphColor)break}if(!hasMorphPosition&&!hasMorphNormal&&!hasMorphColor)return Promise.resolve(geometry);const pendingPositionAccessors=[];const pendingNormalAccessors=[];const pendingColorAccessors=[];for(let i=0,il=targets.length;i<il;i++){const target=targets[i];if(hasMorphPosition){const pendingAccessor=target.POSITION!==undefined?parser.getDependency("accessor",target.POSITION):geometry.attributes.position;pendingPositionAccessors.push(pendingAccessor)}if(hasMorphNormal){const pendingAccessor=target.NORMAL!==undefined?parser.getDependency("accessor",target.NORMAL):geometry.attributes.normal;pendingNormalAccessors.push(pendingAccessor)}if(hasMorphColor){const pendingAccessor=target.COLOR_0!==undefined?parser.getDependency("accessor",target.COLOR_0):geometry.attributes.color;pendingColorAccessors.push(pendingAccessor)}}return Promise.all([Promise.all(pendingPositionAccessors),Promise.all(pendingNormalAccessors),Promise.all(pendingColorAccessors)]).then(function(accessors){const morphPositions=accessors[0];const morphNormals=accessors[1];const morphColors=accessors[2];if(hasMorphPosition)geometry.morphAttributes.position=morphPositions;if(hasMorphNormal)geometry.morphAttributes.normal=morphNormals;if(hasMorphColor)geometry.morphAttributes.color=morphColors;geometry.morphTargetsRelative=true;return geometry})}function updateMorphTargets(mesh,meshDef){mesh.updateMorphTargets();if(meshDef.weights!==undefined){for(let i=0,il=meshDef.weights.length;i<il;i++){mesh.morphTargetInfluences[i]=meshDef.weights[i]}}if(meshDef.extras&&Array.isArray(meshDef.extras.targetNames)){const targetNames=meshDef.extras.targetNames;if(mesh.morphTargetInfluences.length===targetNames.length){mesh.morphTargetDictionary={};for(let i=0,il=targetNames.length;i<il;i++){mesh.morphTargetDictionary[targetNames[i]]=i}}else{console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function createPrimitiveKey(primitiveDef){let geometryKey;const dracoExtension=primitiveDef.extensions&&primitiveDef.extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION];if(dracoExtension){geometryKey="draco:"+dracoExtension.bufferView+":"+dracoExtension.indices+":"+createAttributesKey(dracoExtension.attributes)}else{geometryKey=primitiveDef.indices+":"+createAttributesKey(primitiveDef.attributes)+":"+primitiveDef.mode}if(primitiveDef.targets!==undefined){for(let i=0,il=primitiveDef.targets.length;i<il;i++){geometryKey+=":"+createAttributesKey(primitiveDef.targets[i])}}return geometryKey}function createAttributesKey(attributes){let attributesKey="";const keys=Object.keys(attributes).sort();for(let i=0,il=keys.length;i<il;i++){attributesKey+=keys[i]+":"+attributes[keys[i]]+";"}return attributesKey}function getNormalizedComponentScale(constructor){switch(constructor){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");}}function getImageURIMimeType(uri){if(uri.search(/\.jpe?g($|\?)/i)>0||uri.search(/^data\:image\/jpeg/)===0)return"image/jpeg";if(uri.search(/\.webp($|\?)/i)>0||uri.search(/^data\:image\/webp/)===0)return"image/webp";return"image/png"}const _identityMatrix=new Matrix4;class GLTFParser{constructor(json={},options={}){this.json=json;this.extensions={};this.plugins={};this.options=options;this.cache=new GLTFRegistry;this.associations=new Map;this.primitiveCache={};this.nodeCache={};this.meshCache={refs:{},uses:{}};this.cameraCache={refs:{},uses:{}};this.lightCache={refs:{},uses:{}};this.sourceCache={};this.textureCache={};this.nodeNamesUsed={};let isSafari=false;let isFirefox=false;let firefoxVersion=-1;if(typeof navigator!=="undefined"){isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===true;isFirefox=navigator.userAgent.indexOf("Firefox")>-1;firefoxVersion=isFirefox?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1}if(typeof createImageBitmap==="undefined"||isSafari||isFirefox&&firefoxVersion<98){this.textureLoader=new TextureLoader(this.options.manager)}else{this.textureLoader=new ImageBitmapLoader(this.options.manager)}this.textureLoader.setCrossOrigin(this.options.crossOrigin);this.textureLoader.setRequestHeader(this.options.requestHeader);this.fileLoader=new FileLoader(this.options.manager);this.fileLoader.setResponseType("arraybuffer");if(this.options.crossOrigin==="use-credentials"){this.fileLoader.setWithCredentials(true)}}setExtensions(extensions){this.extensions=extensions}setPlugins(plugins){this.plugins=plugins}parse(onLoad,onError){const parser=this;const json=this.json;const extensions=this.extensions;this.cache.removeAll();this.nodeCache={};this._invokeAll(function(ext){return ext._markDefs&&ext._markDefs()});Promise.all(this._invokeAll(function(ext){return ext.beforeRoot&&ext.beforeRoot()})).then(function(){return Promise.all([parser.getDependencies("scene"),parser.getDependencies("animation"),parser.getDependencies("camera")])}).then(function(dependencies){const result={scene:dependencies[0][json.scene||0],scenes:dependencies[0],animations:dependencies[1],cameras:dependencies[2],asset:json.asset,parser:parser,userData:{}};addUnknownExtensionsToUserData(extensions,result,json);assignExtrasToUserData(result,json);return Promise.all(parser._invokeAll(function(ext){return ext.afterRoot&&ext.afterRoot(result)})).then(function(){for(const scene of result.scenes){scene.updateMatrixWorld()}onLoad(result)})}).catch(onError)}_markDefs(){const nodeDefs=this.json.nodes||[];const skinDefs=this.json.skins||[];const meshDefs=this.json.meshes||[];for(let skinIndex=0,skinLength=skinDefs.length;skinIndex<skinLength;skinIndex++){const joints=skinDefs[skinIndex].joints;for(let i=0,il=joints.length;i<il;i++){nodeDefs[joints[i]].isBone=true}}for(let nodeIndex=0,nodeLength=nodeDefs.length;nodeIndex<nodeLength;nodeIndex++){const nodeDef=nodeDefs[nodeIndex];if(nodeDef.mesh!==undefined){this._addNodeRef(this.meshCache,nodeDef.mesh);if(nodeDef.skin!==undefined){meshDefs[nodeDef.mesh].isSkinnedMesh=true}}if(nodeDef.camera!==undefined){this._addNodeRef(this.cameraCache,nodeDef.camera)}}}_addNodeRef(cache,index){if(index===undefined)return;if(cache.refs[index]===undefined){cache.refs[index]=cache.uses[index]=0}cache.refs[index]++}_getNodeRef(cache,index,object){if(cache.refs[index]<=1)return object;const ref=object.clone();const updateMappings=(original,clone)=>{const mappings=this.associations.get(original);if(mappings!=null){this.associations.set(clone,mappings)}for(const[i,child]of original.children.entries()){updateMappings(child,clone.children[i])}};updateMappings(object,ref);ref.name+="_instance_"+cache.uses[index]++;return ref}_invokeOne(func){const extensions=Object.values(this.plugins);extensions.push(this);for(let i=0;i<extensions.length;i++){const result=func(extensions[i]);if(result)return result}return null}_invokeAll(func){const extensions=Object.values(this.plugins);extensions.unshift(this);const pending=[];for(let i=0;i<extensions.length;i++){const result=func(extensions[i]);if(result)pending.push(result)}return pending}getDependency(type,index){const cacheKey=type+":"+index;let dependency=this.cache.get(cacheKey);if(!dependency){switch(type){case"scene":dependency=this.loadScene(index);break;case"node":dependency=this._invokeOne(function(ext){return ext.loadNode&&ext.loadNode(index)});break;case"mesh":dependency=this._invokeOne(function(ext){return ext.loadMesh&&ext.loadMesh(index)});break;case"accessor":dependency=this.loadAccessor(index);break;case"bufferView":dependency=this._invokeOne(function(ext){return ext.loadBufferView&&ext.loadBufferView(index)});break;case"buffer":dependency=this.loadBuffer(index);break;case"material":dependency=this._invokeOne(function(ext){return ext.loadMaterial&&ext.loadMaterial(index)});break;case"texture":dependency=this._invokeOne(function(ext){return ext.loadTexture&&ext.loadTexture(index)});break;case"skin":dependency=this.loadSkin(index);break;case"animation":dependency=this._invokeOne(function(ext){return ext.loadAnimation&&ext.loadAnimation(index)});break;case"camera":dependency=this.loadCamera(index);break;default:dependency=this._invokeOne(function(ext){return ext!=this&&ext.getDependency&&ext.getDependency(type,index)});if(!dependency){throw new Error("Unknown type: "+type)}break;}this.cache.add(cacheKey,dependency)}return dependency}getDependencies(type){let dependencies=this.cache.get(type);if(!dependencies){const parser=this;const defs=this.json[type+(type==="mesh"?"es":"s")]||[];dependencies=Promise.all(defs.map(function(def,index){return parser.getDependency(type,index)}));this.cache.add(type,dependencies)}return dependencies}loadBuffer(bufferIndex){const bufferDef=this.json.buffers[bufferIndex];const loader=this.fileLoader;if(bufferDef.type&&bufferDef.type!=="arraybuffer"){throw new Error("THREE.GLTFLoader: "+bufferDef.type+" buffer type is not supported.")}if(bufferDef.uri===undefined&&bufferIndex===0){return Promise.resolve(this.extensions[EXTENSIONS.KHR_BINARY_GLTF].body)}const options=this.options;return new Promise(function(resolve,reject){loader.load(LoaderUtils.resolveURL(bufferDef.uri,options.path),resolve,undefined,function(){reject(new Error("THREE.GLTFLoader: Failed to load buffer \""+bufferDef.uri+"\"."))})})}loadBufferView(bufferViewIndex){const bufferViewDef=this.json.bufferViews[bufferViewIndex];return this.getDependency("buffer",bufferViewDef.buffer).then(function(buffer){const byteLength=bufferViewDef.byteLength||0;const byteOffset=bufferViewDef.byteOffset||0;return buffer.slice(byteOffset,byteOffset+byteLength)})}loadAccessor(accessorIndex){const parser=this;const json=this.json;const accessorDef=this.json.accessors[accessorIndex];if(accessorDef.bufferView===undefined&&accessorDef.sparse===undefined){const itemSize=WEBGL_TYPE_SIZES[accessorDef.type];const TypedArray=WEBGL_COMPONENT_TYPES[accessorDef.componentType];const normalized=accessorDef.normalized===true;const array=new TypedArray(accessorDef.count*itemSize);return Promise.resolve(new BufferAttribute(array,itemSize,normalized))}const pendingBufferViews=[];if(accessorDef.bufferView!==undefined){pendingBufferViews.push(this.getDependency("bufferView",accessorDef.bufferView))}else{pendingBufferViews.push(null)}if(accessorDef.sparse!==undefined){pendingBufferViews.push(this.getDependency("bufferView",accessorDef.sparse.indices.bufferView));pendingBufferViews.push(this.getDependency("bufferView",accessorDef.sparse.values.bufferView))}return Promise.all(pendingBufferViews).then(function(bufferViews){const bufferView=bufferViews[0];const itemSize=WEBGL_TYPE_SIZES[accessorDef.type];const TypedArray=WEBGL_COMPONENT_TYPES[accessorDef.componentType];const elementBytes=TypedArray.BYTES_PER_ELEMENT;const itemBytes=elementBytes*itemSize;const byteOffset=accessorDef.byteOffset||0;const byteStride=accessorDef.bufferView!==undefined?json.bufferViews[accessorDef.bufferView].byteStride:undefined;const normalized=accessorDef.normalized===true;let array,bufferAttribute;if(byteStride&&byteStride!==itemBytes){const ibSlice=Math.floor(byteOffset/byteStride);const ibCacheKey="InterleavedBuffer:"+accessorDef.bufferView+":"+accessorDef.componentType+":"+ibSlice+":"+accessorDef.count;let ib=parser.cache.get(ibCacheKey);if(!ib){array=new TypedArray(bufferView,ibSlice*byteStride,accessorDef.count*byteStride/elementBytes);ib=new InterleavedBuffer(array,byteStride/elementBytes);parser.cache.add(ibCacheKey,ib)}bufferAttribute=new InterleavedBufferAttribute(ib,itemSize,byteOffset%byteStride/elementBytes,normalized)}else{if(bufferView===null){array=new TypedArray(accessorDef.count*itemSize)}else{array=new TypedArray(bufferView,byteOffset,accessorDef.count*itemSize)}bufferAttribute=new BufferAttribute(array,itemSize,normalized)}if(accessorDef.sparse!==undefined){const itemSizeIndices=WEBGL_TYPE_SIZES.SCALAR;const TypedArrayIndices=WEBGL_COMPONENT_TYPES[accessorDef.sparse.indices.componentType];const byteOffsetIndices=accessorDef.sparse.indices.byteOffset||0;const byteOffsetValues=accessorDef.sparse.values.byteOffset||0;const sparseIndices=new TypedArrayIndices(bufferViews[1],byteOffsetIndices,accessorDef.sparse.count*itemSizeIndices);const sparseValues=new TypedArray(bufferViews[2],byteOffsetValues,accessorDef.sparse.count*itemSize);if(bufferView!==null){bufferAttribute=new BufferAttribute(bufferAttribute.array.slice(),bufferAttribute.itemSize,bufferAttribute.normalized)}for(let i=0,il=sparseIndices.length;i<il;i++){const index=sparseIndices[i];bufferAttribute.setX(index,sparseValues[i*itemSize]);if(itemSize>=2)bufferAttribute.setY(index,sparseValues[i*itemSize+1]);if(itemSize>=3)bufferAttribute.setZ(index,sparseValues[i*itemSize+2]);if(itemSize>=4)bufferAttribute.setW(index,sparseValues[i*itemSize+3]);if(itemSize>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return bufferAttribute})}loadTexture(textureIndex){const json=this.json;const options=this.options;const textureDef=json.textures[textureIndex];const sourceIndex=textureDef.source;const sourceDef=json.images[sourceIndex];let loader=this.textureLoader;if(sourceDef.uri){const handler=options.manager.getHandler(sourceDef.uri);if(handler!==null)loader=handler}return this.loadTextureImage(textureIndex,sourceIndex,loader)}loadTextureImage(textureIndex,sourceIndex,loader){const parser=this;const json=this.json;const textureDef=json.textures[textureIndex];const sourceDef=json.images[sourceIndex];const cacheKey=(sourceDef.uri||sourceDef.bufferView)+":"+textureDef.sampler;if(this.textureCache[cacheKey]){return this.textureCache[cacheKey]}const promise=this.loadImageSource(sourceIndex,loader).then(function(texture){texture.flipY=false;texture.name=textureDef.name||sourceDef.name||"";if(texture.name===""&&typeof sourceDef.uri==="string"&&sourceDef.uri.startsWith("data:image/")===false){texture.name=sourceDef.uri}const samplers=json.samplers||{};const sampler=samplers[textureDef.sampler]||{};texture.magFilter=WEBGL_FILTERS[sampler.magFilter]||LinearFilter;texture.minFilter=WEBGL_FILTERS[sampler.minFilter]||LinearMipmapLinearFilter;texture.wrapS=WEBGL_WRAPPINGS[sampler.wrapS]||RepeatWrapping;texture.wrapT=WEBGL_WRAPPINGS[sampler.wrapT]||RepeatWrapping;parser.associations.set(texture,{textures:textureIndex});return texture}).catch(function(){return null});this.textureCache[cacheKey]=promise;return promise}loadImageSource(sourceIndex,loader){const parser=this;const json=this.json;const options=this.options;if(this.sourceCache[sourceIndex]!==undefined){return this.sourceCache[sourceIndex].then(texture=>texture.clone())}const sourceDef=json.images[sourceIndex];const URL=self.URL||self.webkitURL;let sourceURI=sourceDef.uri||"";let isObjectURL=false;if(sourceDef.bufferView!==undefined){sourceURI=parser.getDependency("bufferView",sourceDef.bufferView).then(function(bufferView){isObjectURL=true;const blob=new Blob([bufferView],{type:sourceDef.mimeType});sourceURI=URL.createObjectURL(blob);return sourceURI})}else if(sourceDef.uri===undefined){throw new Error("THREE.GLTFLoader: Image "+sourceIndex+" is missing URI and bufferView")}const promise=Promise.resolve(sourceURI).then(function(sourceURI){return new Promise(function(resolve,reject){let onLoad=resolve;if(loader.isImageBitmapLoader===true){onLoad=function(imageBitmap){const texture=new Texture(imageBitmap);texture.needsUpdate=true;resolve(texture)}}loader.load(LoaderUtils.resolveURL(sourceURI,options.path),onLoad,undefined,reject)})}).then(function(texture){if(isObjectURL===true){URL.revokeObjectURL(sourceURI)}texture.userData.mimeType=sourceDef.mimeType||getImageURIMimeType(sourceDef.uri);return texture}).catch(function(error){console.error("THREE.GLTFLoader: Couldn't load texture",sourceURI);throw error});this.sourceCache[sourceIndex]=promise;return promise}assignTexture(materialParams,mapName,mapDef,colorSpace){const parser=this;return this.getDependency("texture",mapDef.index).then(function(texture){if(!texture)return null;if(mapDef.texCoord!==undefined&&mapDef.texCoord>0){texture=texture.clone();texture.channel=mapDef.texCoord}if(parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM]){const transform=mapDef.extensions!==undefined?mapDef.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM]:undefined;if(transform){const gltfReference=parser.associations.get(texture);texture=parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM].extendTexture(texture,transform);parser.associations.set(texture,gltfReference)}}if(colorSpace!==undefined){texture.colorSpace=colorSpace}materialParams[mapName]=texture;return texture})}assignFinalMaterial(mesh){const geometry=mesh.geometry;let material=mesh.material;const useDerivativeTangents=geometry.attributes.tangent===undefined;const useVertexColors=geometry.attributes.color!==undefined;const useFlatShading=geometry.attributes.normal===undefined;if(mesh.isPoints){const cacheKey="PointsMaterial:"+material.uuid;let pointsMaterial=this.cache.get(cacheKey);if(!pointsMaterial){pointsMaterial=new PointsMaterial;Material.prototype.copy.call(pointsMaterial,material);pointsMaterial.color.copy(material.color);pointsMaterial.map=material.map;pointsMaterial.sizeAttenuation=false;this.cache.add(cacheKey,pointsMaterial)}material=pointsMaterial}else if(mesh.isLine){const cacheKey="LineBasicMaterial:"+material.uuid;let lineMaterial=this.cache.get(cacheKey);if(!lineMaterial){lineMaterial=new LineBasicMaterial;Material.prototype.copy.call(lineMaterial,material);lineMaterial.color.copy(material.color);lineMaterial.map=material.map;this.cache.add(cacheKey,lineMaterial)}material=lineMaterial}if(useDerivativeTangents||useVertexColors||useFlatShading){let cacheKey="ClonedMaterial:"+material.uuid+":";if(useDerivativeTangents)cacheKey+="derivative-tangents:";if(useVertexColors)cacheKey+="vertex-colors:";if(useFlatShading)cacheKey+="flat-shading:";let cachedMaterial=this.cache.get(cacheKey);if(!cachedMaterial){cachedMaterial=material.clone();if(useVertexColors)cachedMaterial.vertexColors=true;if(useFlatShading)cachedMaterial.flatShading=true;if(useDerivativeTangents){if(cachedMaterial.normalScale)cachedMaterial.normalScale.y*=-1;if(cachedMaterial.clearcoatNormalScale)cachedMaterial.clearcoatNormalScale.y*=-1}this.cache.add(cacheKey,cachedMaterial);this.associations.set(cachedMaterial,this.associations.get(material))}material=cachedMaterial}mesh.material=material}getMaterialType(){return MeshStandardMaterial}loadMaterial(materialIndex){const parser=this;const json=this.json;const extensions=this.extensions;const materialDef=json.materials[materialIndex];let materialType;const materialParams={};const materialExtensions=materialDef.extensions||{};const pending=[];if(materialExtensions[EXTENSIONS.KHR_MATERIALS_UNLIT]){const kmuExtension=extensions[EXTENSIONS.KHR_MATERIALS_UNLIT];materialType=kmuExtension.getMaterialType();pending.push(kmuExtension.extendParams(materialParams,materialDef,parser))}else{const metallicRoughness=materialDef.pbrMetallicRoughness||{};materialParams.color=new Color(1,1,1);materialParams.opacity=1;if(Array.isArray(metallicRoughness.baseColorFactor)){const array=metallicRoughness.baseColorFactor;materialParams.color.setRGB(array[0],array[1],array[2],LinearSRGBColorSpace);materialParams.opacity=array[3]}if(metallicRoughness.baseColorTexture!==undefined){pending.push(parser.assignTexture(materialParams,"map",metallicRoughness.baseColorTexture,SRGBColorSpace))}materialParams.metalness=metallicRoughness.metallicFactor!==undefined?metallicRoughness.metallicFactor:1;materialParams.roughness=metallicRoughness.roughnessFactor!==undefined?metallicRoughness.roughnessFactor:1;if(metallicRoughness.metallicRoughnessTexture!==undefined){pending.push(parser.assignTexture(materialParams,"metalnessMap",metallicRoughness.metallicRoughnessTexture));pending.push(parser.assignTexture(materialParams,"roughnessMap",metallicRoughness.metallicRoughnessTexture))}materialType=this._invokeOne(function(ext){return ext.getMaterialType&&ext.getMaterialType(materialIndex)});pending.push(Promise.all(this._invokeAll(function(ext){return ext.extendMaterialParams&&ext.extendMaterialParams(materialIndex,materialParams)})))}if(materialDef.doubleSided===true){materialParams.side=DoubleSide}const alphaMode=materialDef.alphaMode||ALPHA_MODES.OPAQUE;if(alphaMode===ALPHA_MODES.BLEND){materialParams.transparent=true;materialParams.depthWrite=false}else{materialParams.transparent=false;if(alphaMode===ALPHA_MODES.MASK){materialParams.alphaTest=materialDef.alphaCutoff!==undefined?materialDef.alphaCutoff:0.5}}if(materialDef.normalTexture!==undefined&&materialType!==MeshBasicMaterial){pending.push(parser.assignTexture(materialParams,"normalMap",materialDef.normalTexture));materialParams.normalScale=new Vector2(1,1);if(materialDef.normalTexture.scale!==undefined){const scale=materialDef.normalTexture.scale;materialParams.normalScale.set(scale,scale)}}if(materialDef.occlusionTexture!==undefined&&materialType!==MeshBasicMaterial){pending.push(parser.assignTexture(materialParams,"aoMap",materialDef.occlusionTexture));if(materialDef.occlusionTexture.strength!==undefined){materialParams.aoMapIntensity=materialDef.occlusionTexture.strength}}if(materialDef.emissiveFactor!==undefined&&materialType!==MeshBasicMaterial){const emissiveFactor=materialDef.emissiveFactor;materialParams.emissive=new Color().setRGB(emissiveFactor[0],emissiveFactor[1],emissiveFactor[2],LinearSRGBColorSpace)}if(materialDef.emissiveTexture!==undefined&&materialType!==MeshBasicMaterial){pending.push(parser.assignTexture(materialParams,"emissiveMap",materialDef.emissiveTexture,SRGBColorSpace))}return Promise.all(pending).then(function(){const material=new materialType(materialParams);if(materialDef.name)material.name=materialDef.name;assignExtrasToUserData(material,materialDef);parser.associations.set(material,{materials:materialIndex});if(materialDef.extensions)addUnknownExtensionsToUserData(extensions,material,materialDef);return material})}createUniqueName(originalName){const sanitizedName=PropertyBinding.sanitizeNodeName(originalName||"");if(sanitizedName in this.nodeNamesUsed){return sanitizedName+"_"+ ++this.nodeNamesUsed[sanitizedName]}else{this.nodeNamesUsed[sanitizedName]=0;return sanitizedName}}loadGeometries(primitives){const parser=this;const extensions=this.extensions;const cache=this.primitiveCache;function createDracoPrimitive(primitive){return extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(primitive,parser).then(function(geometry){return addPrimitiveAttributes(geometry,primitive,parser)})}const pending=[];for(let i=0,il=primitives.length;i<il;i++){const primitive=primitives[i];const cacheKey=createPrimitiveKey(primitive);const cached=cache[cacheKey];if(cached){pending.push(cached.promise)}else{let geometryPromise;if(primitive.extensions&&primitive.extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION]){geometryPromise=createDracoPrimitive(primitive)}else{geometryPromise=addPrimitiveAttributes(new BufferGeometry,primitive,parser)}cache[cacheKey]={primitive:primitive,promise:geometryPromise};pending.push(geometryPromise)}}return Promise.all(pending)}loadMesh(meshIndex){const parser=this;const json=this.json;const extensions=this.extensions;const meshDef=json.meshes[meshIndex];const primitives=meshDef.primitives;const pending=[];for(let i=0,il=primitives.length;i<il;i++){const material=primitives[i].material===undefined?createDefaultMaterial(this.cache):this.getDependency("material",primitives[i].material);pending.push(material)}pending.push(parser.loadGeometries(primitives));return Promise.all(pending).then(function(results){const materials=results.slice(0,results.length-1);const geometries=results[results.length-1];const meshes=[];for(let i=0,il=geometries.length;i<il;i++){const geometry=geometries[i];const primitive=primitives[i];let mesh;const material=materials[i];if(primitive.mode===WEBGL_CONSTANTS.TRIANGLES||primitive.mode===WEBGL_CONSTANTS.TRIANGLE_STRIP||primitive.mode===WEBGL_CONSTANTS.TRIANGLE_FAN||primitive.mode===undefined){mesh=meshDef.isSkinnedMesh===true?new SkinnedMesh(geometry,material):new Mesh(geometry,material);if(mesh.isSkinnedMesh===true){mesh.normalizeSkinWeights()}if(primitive.mode===WEBGL_CONSTANTS.TRIANGLE_STRIP){mesh.geometry=toTrianglesDrawMode(mesh.geometry,TriangleStripDrawMode)}else if(primitive.mode===WEBGL_CONSTANTS.TRIANGLE_FAN){mesh.geometry=toTrianglesDrawMode(mesh.geometry,TriangleFanDrawMode)}}else if(primitive.mode===WEBGL_CONSTANTS.LINES){mesh=new LineSegments(geometry,material)}else if(primitive.mode===WEBGL_CONSTANTS.LINE_STRIP){mesh=new Line(geometry,material)}else if(primitive.mode===WEBGL_CONSTANTS.LINE_LOOP){mesh=new LineLoop(geometry,material)}else if(primitive.mode===WEBGL_CONSTANTS.POINTS){mesh=new Points(geometry,material)}else{throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+primitive.mode)}if(Object.keys(mesh.geometry.morphAttributes).length>0){updateMorphTargets(mesh,meshDef)}mesh.name=parser.createUniqueName(meshDef.name||"mesh_"+meshIndex);assignExtrasToUserData(mesh,meshDef);if(primitive.extensions)addUnknownExtensionsToUserData(extensions,mesh,primitive);parser.assignFinalMaterial(mesh);meshes.push(mesh)}for(let i=0,il=meshes.length;i<il;i++){parser.associations.set(meshes[i],{meshes:meshIndex,primitives:i})}if(meshes.length===1){if(meshDef.extensions)addUnknownExtensionsToUserData(extensions,meshes[0],meshDef);return meshes[0]}const group=new Group;if(meshDef.extensions)addUnknownExtensionsToUserData(extensions,group,meshDef);parser.associations.set(group,{meshes:meshIndex});for(let i=0,il=meshes.length;i<il;i++){group.add(meshes[i])}return group})}loadCamera(cameraIndex){let camera;const cameraDef=this.json.cameras[cameraIndex];const params=cameraDef[cameraDef.type];if(!params){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}if(cameraDef.type==="perspective"){camera=new PerspectiveCamera(MathUtils.radToDeg(params.yfov),params.aspectRatio||1,params.znear||1,params.zfar||2e6)}else if(cameraDef.type==="orthographic"){camera=new OrthographicCamera(-params.xmag,params.xmag,params.ymag,-params.ymag,params.znear,params.zfar)}if(cameraDef.name)camera.name=this.createUniqueName(cameraDef.name);assignExtrasToUserData(camera,cameraDef);return Promise.resolve(camera)}loadSkin(skinIndex){const skinDef=this.json.skins[skinIndex];const pending=[];for(let i=0,il=skinDef.joints.length;i<il;i++){pending.push(this._loadNodeShallow(skinDef.joints[i]))}if(skinDef.inverseBindMatrices!==undefined){pending.push(this.getDependency("accessor",skinDef.inverseBindMatrices))}else{pending.push(null)}return Promise.all(pending).then(function(results){const inverseBindMatrices=results.pop();const jointNodes=results;const bones=[];const boneInverses=[];for(let i=0,il=jointNodes.length;i<il;i++){const jointNode=jointNodes[i];if(jointNode){bones.push(jointNode);const mat=new Matrix4;if(inverseBindMatrices!==null){mat.fromArray(inverseBindMatrices.array,i*16)}boneInverses.push(mat)}else{console.warn("THREE.GLTFLoader: Joint \"%s\" could not be found.",skinDef.joints[i])}}return new Skeleton(bones,boneInverses)})}loadAnimation(animationIndex){const json=this.json;const parser=this;const animationDef=json.animations[animationIndex];const animationName=animationDef.name?animationDef.name:"animation_"+animationIndex;const pendingNodes=[];const pendingInputAccessors=[];const pendingOutputAccessors=[];const pendingSamplers=[];const pendingTargets=[];for(let i=0,il=animationDef.channels.length;i<il;i++){const channel=animationDef.channels[i];const sampler=animationDef.samplers[channel.sampler];const target=channel.target;const name=target.node;const input=animationDef.parameters!==undefined?animationDef.parameters[sampler.input]:sampler.input;const output=animationDef.parameters!==undefined?animationDef.parameters[sampler.output]:sampler.output;if(target.node===undefined)continue;pendingNodes.push(this.getDependency("node",name));pendingInputAccessors.push(this.getDependency("accessor",input));pendingOutputAccessors.push(this.getDependency("accessor",output));pendingSamplers.push(sampler);pendingTargets.push(target)}return Promise.all([Promise.all(pendingNodes),Promise.all(pendingInputAccessors),Promise.all(pendingOutputAccessors),Promise.all(pendingSamplers),Promise.all(pendingTargets)]).then(function(dependencies){const nodes=dependencies[0];const inputAccessors=dependencies[1];const outputAccessors=dependencies[2];const samplers=dependencies[3];const targets=dependencies[4];const tracks=[];for(let i=0,il=nodes.length;i<il;i++){const node=nodes[i];const inputAccessor=inputAccessors[i];const outputAccessor=outputAccessors[i];const sampler=samplers[i];const target=targets[i];if(node===undefined)continue;if(node.updateMatrix){node.updateMatrix()}const createdTracks=parser._createAnimationTracks(node,inputAccessor,outputAccessor,sampler,target);if(createdTracks){for(let k=0;k<createdTracks.length;k++){tracks.push(createdTracks[k])}}}return new AnimationClip(animationName,undefined,tracks)})}createNodeMesh(nodeIndex){const json=this.json;const parser=this;const nodeDef=json.nodes[nodeIndex];if(nodeDef.mesh===undefined)return null;return parser.getDependency("mesh",nodeDef.mesh).then(function(mesh){const node=parser._getNodeRef(parser.meshCache,nodeDef.mesh,mesh);if(nodeDef.weights!==undefined){node.traverse(function(o){if(!o.isMesh)return;for(let i=0,il=nodeDef.weights.length;i<il;i++){o.morphTargetInfluences[i]=nodeDef.weights[i]}})}return node})}loadNode(nodeIndex){const json=this.json;const parser=this;const nodeDef=json.nodes[nodeIndex];const nodePending=parser._loadNodeShallow(nodeIndex);const childPending=[];const childrenDef=nodeDef.children||[];for(let i=0,il=childrenDef.length;i<il;i++){childPending.push(parser.getDependency("node",childrenDef[i]))}const skeletonPending=nodeDef.skin===undefined?Promise.resolve(null):parser.getDependency("skin",nodeDef.skin);return Promise.all([nodePending,Promise.all(childPending),skeletonPending]).then(function(results){const node=results[0];const children=results[1];const skeleton=results[2];if(skeleton!==null){node.traverse(function(mesh){if(!mesh.isSkinnedMesh)return;mesh.bind(skeleton,_identityMatrix)})}for(let i=0,il=children.length;i<il;i++){node.add(children[i])}return node})}_loadNodeShallow(nodeIndex){const json=this.json;const extensions=this.extensions;const parser=this;if(this.nodeCache[nodeIndex]!==undefined){return this.nodeCache[nodeIndex]}const nodeDef=json.nodes[nodeIndex];const nodeName=nodeDef.name?parser.createUniqueName(nodeDef.name):"";const pending=[];const meshPromise=parser._invokeOne(function(ext){return ext.createNodeMesh&&ext.createNodeMesh(nodeIndex)});if(meshPromise){pending.push(meshPromise)}if(nodeDef.camera!==undefined){pending.push(parser.getDependency("camera",nodeDef.camera).then(function(camera){return parser._getNodeRef(parser.cameraCache,nodeDef.camera,camera)}))}parser._invokeAll(function(ext){return ext.createNodeAttachment&&ext.createNodeAttachment(nodeIndex)}).forEach(function(promise){pending.push(promise)});this.nodeCache[nodeIndex]=Promise.all(pending).then(function(objects){let node;if(nodeDef.isBone===true){node=new Bone}else if(objects.length>1){node=new Group}else if(objects.length===1){node=objects[0]}else{node=new Object3D}if(node!==objects[0]){for(let i=0,il=objects.length;i<il;i++){node.add(objects[i])}}if(nodeDef.name){node.userData.name=nodeDef.name;node.name=nodeName}assignExtrasToUserData(node,nodeDef);if(nodeDef.extensions)addUnknownExtensionsToUserData(extensions,node,nodeDef);if(nodeDef.matrix!==undefined){const matrix=new Matrix4;matrix.fromArray(nodeDef.matrix);node.applyMatrix4(matrix)}else{if(nodeDef.translation!==undefined){node.position.fromArray(nodeDef.translation)}if(nodeDef.rotation!==undefined){node.quaternion.fromArray(nodeDef.rotation)}if(nodeDef.scale!==undefined){node.scale.fromArray(nodeDef.scale)}}if(!parser.associations.has(node)){parser.associations.set(node,{})}parser.associations.get(node).nodes=nodeIndex;return node});return this.nodeCache[nodeIndex]}loadScene(sceneIndex){const extensions=this.extensions;const sceneDef=this.json.scenes[sceneIndex];const parser=this;const scene=new Group;if(sceneDef.name)scene.name=parser.createUniqueName(sceneDef.name);assignExtrasToUserData(scene,sceneDef);if(sceneDef.extensions)addUnknownExtensionsToUserData(extensions,scene,sceneDef);const nodeIds=sceneDef.nodes||[];const pending=[];for(let i=0,il=nodeIds.length;i<il;i++){pending.push(parser.getDependency("node",nodeIds[i]))}return Promise.all(pending).then(function(nodes){for(let i=0,il=nodes.length;i<il;i++){scene.add(nodes[i])}const reduceAssociations=node=>{const reducedAssociations=new Map;for(const[key,value]of parser.associations){if(key instanceof Material||key instanceof Texture){reducedAssociations.set(key,value)}}node.traverse(node=>{const mappings=parser.associations.get(node);if(mappings!=null){reducedAssociations.set(node,mappings)}});return reducedAssociations};parser.associations=reduceAssociations(scene);return scene})}_createAnimationTracks(node,inputAccessor,outputAccessor,sampler,target){const tracks=[];const targetName=node.name?node.name:node.uuid;const targetNames=[];if(PATH_PROPERTIES[target.path]===PATH_PROPERTIES.weights){node.traverse(function(object){if(object.morphTargetInfluences){targetNames.push(object.name?object.name:object.uuid)}})}else{targetNames.push(targetName)}let TypedKeyframeTrack;switch(PATH_PROPERTIES[target.path]){case PATH_PROPERTIES.weights:TypedKeyframeTrack=NumberKeyframeTrack;break;case PATH_PROPERTIES.rotation:TypedKeyframeTrack=QuaternionKeyframeTrack;break;case PATH_PROPERTIES.position:case PATH_PROPERTIES.scale:TypedKeyframeTrack=VectorKeyframeTrack;break;default:switch(outputAccessor.itemSize){case 1:TypedKeyframeTrack=NumberKeyframeTrack;break;case 2:case 3:default:TypedKeyframeTrack=VectorKeyframeTrack;break;}break;}const interpolation=sampler.interpolation!==undefined?INTERPOLATION[sampler.interpolation]:InterpolateLinear;const outputArray=this._getArrayFromAccessor(outputAccessor);for(let j=0,jl=targetNames.length;j<jl;j++){const track=new TypedKeyframeTrack(targetNames[j]+"."+PATH_PROPERTIES[target.path],inputAccessor.array,outputArray,interpolation);if(sampler.interpolation==="CUBICSPLINE"){this._createCubicSplineTrackInterpolant(track)}tracks.push(track)}return tracks}_getArrayFromAccessor(accessor){let outputArray=accessor.array;if(accessor.normalized){const scale=getNormalizedComponentScale(outputArray.constructor);const scaled=new Float32Array(outputArray.length);for(let j=0,jl=outputArray.length;j<jl;j++){scaled[j]=outputArray[j]*scale}outputArray=scaled}return outputArray}_createCubicSplineTrackInterpolant(track){track.createInterpolant=function InterpolantFactoryMethodGLTFCubicSpline(result){const interpolantType=this instanceof QuaternionKeyframeTrack?GLTFCubicSplineQuaternionInterpolant:GLTFCubicSplineInterpolant;return new interpolantType(this.times,this.values,this.getValueSize()/3,result)};track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=true}}function computeBounds(geometry,primitiveDef,parser){const attributes=primitiveDef.attributes;const box=new Box3;if(attributes.POSITION!==undefined){const accessor=parser.json.accessors[attributes.POSITION];const min=accessor.min;const max=accessor.max;if(min!==undefined&&max!==undefined){box.set(new Vector3(min[0],min[1],min[2]),new Vector3(max[0],max[1],max[2]));if(accessor.normalized){const boxScale=getNormalizedComponentScale(WEBGL_COMPONENT_TYPES[accessor.componentType]);box.min.multiplyScalar(boxScale);box.max.multiplyScalar(boxScale)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else{return}const targets=primitiveDef.targets;if(targets!==undefined){const maxDisplacement=new Vector3;const vector=new Vector3;for(let i=0,il=targets.length;i<il;i++){const target=targets[i];if(target.POSITION!==undefined){const accessor=parser.json.accessors[target.POSITION];const min=accessor.min;const max=accessor.max;if(min!==undefined&&max!==undefined){vector.setX(Math.max(Math.abs(min[0]),Math.abs(max[0])));vector.setY(Math.max(Math.abs(min[1]),Math.abs(max[1])));vector.setZ(Math.max(Math.abs(min[2]),Math.abs(max[2])));if(accessor.normalized){const boxScale=getNormalizedComponentScale(WEBGL_COMPONENT_TYPES[accessor.componentType]);vector.multiplyScalar(boxScale)}maxDisplacement.max(vector)}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}}box.expandByVector(maxDisplacement)}geometry.boundingBox=box;const sphere=new Sphere;box.getCenter(sphere.center);sphere.radius=box.min.distanceTo(box.max)/2;geometry.boundingSphere=sphere}function addPrimitiveAttributes(geometry,primitiveDef,parser){const attributes=primitiveDef.attributes;const pending=[];function assignAttributeAccessor(accessorIndex,attributeName){return parser.getDependency("accessor",accessorIndex).then(function(accessor){geometry.setAttribute(attributeName,accessor)})}for(const gltfAttributeName in attributes){const threeAttributeName=ATTRIBUTES[gltfAttributeName]||gltfAttributeName.toLowerCase();if(threeAttributeName in geometry.attributes)continue;pending.push(assignAttributeAccessor(attributes[gltfAttributeName],threeAttributeName))}if(primitiveDef.indices!==undefined&&!geometry.index){const accessor=parser.getDependency("accessor",primitiveDef.indices).then(function(accessor){geometry.setIndex(accessor)});pending.push(accessor)}if(ColorManagement.workingColorSpace!==LinearSRGBColorSpace&&"COLOR_0"in attributes){console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ColorManagement.workingColorSpace}" not supported.`)}assignExtrasToUserData(geometry,primitiveDef);computeBounds(geometry,primitiveDef,parser);return Promise.all(pending).then(function(){return primitiveDef.targets!==undefined?addMorphTargets(geometry,primitiveDef.targets,parser):geometry})}THREE.GLTFLoader=GLTFLoader})()});(function(t,e){e(t.THREE=t.THREE||{})})(this,function(THREE){var Object3D=THREE.Object3D;var deviceMax=Number.POSITIVE_INFINITY;var deviceMin=Number.NEGATIVE_INFINITY;class CSS3DObject extends Object3D{constructor(element){super();this.containerElement=document.createElement("div");this.containerElement.style.position="absolute";this.containerElement.style.pointerEvents="none";this.containerElement.style.overflow="hidden";this.cameraElement=document.createElement("div");this.containerElement.appendChild(this.cameraElement);this.cameraElement.style.transformStyle="preserve-3d";this.cameraElement.style.position="absolute";this.cameraElement.style.pointerEvents="none";this.element=element||document.createElement("div");this.cameraElement.appendChild(this.element);this.element.style.position="absolute";this.element.style.pointerEvents="none";this.contentWidth=100;this.contentHeight=100;this.vertices=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.projectedVertices=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.addEventListener("removed",function(){this.traverse(function(object){if(object.containerElement instanceof Element&&object.containerElement.parentNode!==null)object.containerElement.parentNode.removeChild(object.containerElement)})})}copy(source,recursive){super.copy(source,recursive);this.element=source.element.cloneNode(true);return this}updateVertices(){this.vertices[0].set(-this.contentWidth*0.5,+this.contentHeight*0.5,0);this.vertices[1].set(+this.contentWidth*0.5,+this.contentHeight*0.5,0);this.vertices[2].set(+this.contentWidth*0.5,-this.contentHeight*0.5,0);this.vertices[3].set(-this.contentWidth*0.5,-this.contentHeight*0.5,0)}projectVertices(camera){if(this.matrixWorldNeedsUpdate)this.updateMatrixWorld();projectVertices(this,camera);var pv=this.projectedVertices;this.isDrawable=true;pv=pv.filter(function(p){return p.z<0});var x=0,y=0;var max=0,min=0;pv.forEach(function(p){if(p.x<-1)x-=1;else if(p.x>1)x+=1;if(p.y<-1)y-=1;else if(p.y>1)y+=1;max=Math.max(p.x*camera.aspect,p.y,max);min=Math.min(p.x*camera.aspect,p.y,min)});this.isVisible=this.isDrawable&&Math.abs(x)<pv.length&&Math.abs(y)<pv.length&&max<deviceMax&&min>deviceMin}}CSS3DObject.prototype.isCSS3DObject=true;THREE.CSS3DObject=CSS3DObject;class CSS3DQuad extends Object3D{constructor(element){super();this.contentWidth=100;this.contentHeight=100;this.vertices=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.projectedVertices=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.containerElement=document.createElement("div");this.containerElement.style.position="absolute";this.containerElement.style.pointerEvents="none";this.containerElement.style.overflow="hidden";this.element=element||document.createElement("div");this.containerElement.appendChild(this.element);this.element.style.position="absolute";this.element.style.pointerEvents="none"}copy(source,recursive){super.copy(source,recursive);for(var i=0;i<4;i++)this.vertices[i].copy(source.vertices[i]);return this}projectVertices(camera){if(this.matrixWorldNeedsUpdate)this.updateMatrixWorld();projectVertices(this,camera);var pv=this.projectedVertices;this.isDrawable=pv[0].z<0&&pv[1].z<0&&pv[2].z<0&&pv[3].z<0;var x=0,y=0;var max=0,min=0;pv.forEach(function(p){if(p.x<-1)x-=1;else if(p.x>1)x+=1;if(p.y<-1)y-=1;else if(p.y>1)y+=1;max=Math.max(p.x*camera.aspect,p.y,max);min=Math.min(p.x*camera.aspect,p.y,min)});this.isVisible=this.isDrawable&&Math.abs(x)<pv.length&&Math.abs(y)<pv.length&&max<deviceMax&&min>deviceMin}}CSS3DQuad.prototype.isCSS3DQuad=true;THREE.CSS3DQuad=CSS3DQuad;class CSS3DRectangle extends CSS3DQuad{constructor(element){super(element)}updateVertices(){this.vertices[0].set(-this.contentWidth*0.5,+this.contentHeight*0.5,0);this.vertices[1].set(+this.contentWidth*0.5,+this.contentHeight*0.5,0);this.vertices[2].set(+this.contentWidth*0.5,-this.contentHeight*0.5,0);this.vertices[3].set(-this.contentWidth*0.5,-this.contentHeight*0.5,0)}}CSS3DRectangle.prototype.isCSS3DRectangle=true;THREE.CSS3DRectangle=CSS3DRectangle;var _matrix=new THREE.Matrix4;class CSS3DRenderer{constructor(){var _this=this;var _width,_height;var _widthHalf,_heightHalf;var _fov;var _cameraStyle;var cache={objects:new WeakMap};var domElement=document.createElement("div");domElement.style.overflow="hidden";this.domElement=domElement;this.getSize=function(){return{width:_width,height:_height}};this.render=function(scene,camera){_fov=camera.projectionMatrix.elements[5]*_heightHalf;if(scene.matrixWorldAutoUpdate===true)scene.updateMatrixWorld();_cameraStyle="translateZ("+_fov+"px)"+getCameraCSSMatrix(camera.matrixWorldInverse)+"translate("+_widthHalf+"px,"+_heightHalf+"px)";renderObject(scene,scene,camera)};this.setSize=function(width,height){_width=width;_height=height;_widthHalf=_width/2;_heightHalf=_height/2;domElement.style.width=_width+"px";domElement.style.height=_height+"px"};function renderObject(object,scene,camera){if(object.isCSS3DObject||object.isCSS3DQuad){object.onBeforeRender(_this,scene,camera);var cachedObject=cache.objects.get(object)||{};var cacheChanged=false;if(object.isVisible){if(object.isCSS3DQuad){var pv=object.projectedVertices;var x0=(1+pv[0].x)*0.5*_width,y0=(1-pv[0].y)*0.5*_height,x1=(1+pv[1].x)*0.5*_width,y1=(1-pv[1].y)*0.5*_height,x2=(1+pv[2].x)*0.5*_width,y2=(1-pv[2].y)*0.5*_height,x3=(1+pv[3].x)*0.5*_width,y3=(1-pv[3].y)*0.5*_height;createQuadMatrix(object.contentWidth,object.contentHeight,x0,y0,x1,y1,x3,y3,x2,y2,_matrix.elements);var elementStyle=getQuadCSSMatrix(_matrix);if(cachedObject.elementStyle!=elementStyle){cachedObject.elementStyle=object.element.style.transform=elementStyle;cacheChanged=true}if(cachedObject.width!==_width||cachedObject.height!==_height){object.containerElement.style.width=(cachedObject.width=_width)+"px";object.containerElement.style.height=(cachedObject.height=_height)+"px";cacheChanged=true}}else{var elementStyle=getObjectCSSMatrix(object.matrixWorld);if(cachedObject.cameraFov!==_fov){object.containerElement.style.perspective=(cachedObject.cameraFov=_fov)+"px";cacheChanged=true}if(cachedObject.width!==_width||cachedObject.height!==_height){object.cameraElement.style.width=object.containerElement.style.width=(cachedObject.width=_width)+"px";object.cameraElement.style.height=object.containerElement.style.height=(cachedObject.height=_height)+"px";cacheChanged=true}if(cachedObject.cameraStyle!==_cameraStyle){cachedObject.cameraStyle=object.cameraElement.style.transform=_cameraStyle;cacheChanged=true}if(cachedObject.elementStyle!==elementStyle){cachedObject.elementStyle=object.element.style.transform=elementStyle;cacheChanged=true}}object.containerElement.style.left="0"}else{object.containerElement.style.left=_width+"px"}if(cacheChanged)cache.objects.set(object,cachedObject);object.containerElement.style.display=object.visible?"":"none";if(object.containerElement.parentNode!==domElement)domElement.appendChild(object.containerElement);object.onAfterRender(_this,scene,camera)}for(var i=0,l=object.children.length;i<l;i++)renderObject(object.children[i],scene,camera)}function epsilon(value){return value<1e-10&&value>-1e-10?0:value}function getCameraCSSMatrix(matrix){var elements=matrix.elements;return"matrix3d("+epsilon(elements[0])+","+epsilon(-elements[1])+","+epsilon(elements[2])+","+epsilon(elements[3])+","+epsilon(elements[4])+","+epsilon(-elements[5])+","+epsilon(elements[6])+","+epsilon(elements[7])+","+epsilon(elements[8])+","+epsilon(-elements[9])+","+epsilon(elements[10])+","+epsilon(elements[11])+","+epsilon(elements[12])+","+epsilon(-elements[13])+","+epsilon(elements[14])+","+epsilon(elements[15])+")"}function getObjectCSSMatrix(matrix){var elements=matrix.elements;var matrix3d="matrix3d("+epsilon(elements[0])+","+epsilon(elements[1])+","+epsilon(elements[2])+","+epsilon(elements[3])+","+epsilon(-elements[4])+","+epsilon(-elements[5])+","+epsilon(-elements[6])+","+epsilon(-elements[7])+","+epsilon(elements[8])+","+epsilon(elements[9])+","+epsilon(elements[10])+","+epsilon(elements[11])+","+epsilon(elements[12])+","+epsilon(elements[13])+","+epsilon(elements[14])+","+epsilon(elements[15])+")";return"translate(-50%,-50%)"+matrix3d}function getQuadCSSMatrix(matrix){var elements=matrix.elements;var matrix3d="matrix3d("+epsilon(elements[0])+","+epsilon(elements[1])+","+epsilon(elements[2])+","+epsilon(elements[3])+","+epsilon(elements[4])+","+epsilon(elements[5])+","+epsilon(elements[6])+","+epsilon(elements[7])+","+epsilon(elements[8])+","+epsilon(elements[9])+","+epsilon(elements[10])+","+epsilon(elements[11])+","+epsilon(elements[12])+","+epsilon(elements[13])+","+epsilon(elements[14])+","+epsilon(elements[15])+")";return matrix3d}}};THREE.CSS3DRenderer=CSS3DRenderer;function projectVertices(object,camera){for(var index=0;index<object.vertices.length;index++){var vertex=object.vertices[index];var projectedVertex=object.projectedVertices[index];projectedVertex.copy(vertex);projectedVertex.applyMatrix4(object.matrixWorld);projectedVertex.applyMatrix4(camera.matrixWorldInverse);var z=projectedVertex.z;projectedVertex.applyMatrix4(camera.projectionMatrix);projectedVertex.z=z}}function setArray(){var a=arguments[0];for(var i=1;i<arguments.length;i++)a[i-1]=arguments[i];return a}function copyArray(t,s){for(var i=0;i<s.length;i++)t[i]=s[i];return t}function adjugate(m,out){setArray(out,m[4]*m[8]-m[5]*m[7],m[2]*m[7]-m[1]*m[8],m[1]*m[5]-m[2]*m[4],m[5]*m[6]-m[3]*m[8],m[0]*m[8]-m[2]*m[6],m[2]*m[3]-m[0]*m[5],m[3]*m[7]-m[4]*m[6],m[1]*m[6]-m[0]*m[7],m[0]*m[4]-m[1]*m[3])}function multmm(a,b,out){for(var i=0;i!=3;++i){for(var j=0;j!=3;++j){var cij=0;for(var k=0;k!=3;++k){cij+=a[3*i+k]*b[3*k+j]}out[3*i+j]=cij}}}function multmv(m,v,out){return setArray(out,m[0]*v[0]+m[1]*v[1]+m[2]*v[2],m[3]*v[0]+m[4]*v[1]+m[5]*v[2],m[6]*v[0]+m[7]*v[1]+m[8]*v[2])}var m=new Array(9);var m2=new Array(9);var mAdj=new Array(9);var p=new Array(3);var v=new Array(3);var s=new Array(9);var d=new Array(9);var sAdj=new Array(9);var t=new Array(9);function basisToPoints(x1,y1,x2,y2,x3,y3,x4,y4,out){setArray(m,x1,x2,x3,y1,y2,y3,1,1,1);adjugate(m,mAdj);setArray(p,x4,y4,1);multmv(mAdj,p,v);setArray(m2,v[0],0,0,0,v[1],0,0,0,v[2]);return multmm(m,m2,out)}function general2DProjection(x1s,y1s,x1d,y1d,x2s,y2s,x2d,y2d,x3s,y3s,x3d,y3d,x4s,y4s,x4d,y4d,out){basisToPoints(x1s,y1s,x2s,y2s,x3s,y3s,x4s,y4s,s);basisToPoints(x1d,y1d,x2d,y2d,x3d,y3d,x4d,y4d,d);adjugate(s,sAdj);return multmm(d,sAdj,out)}function createQuadMatrix(w,h,x1,y1,x2,y2,x3,y3,x4,y4,out){general2DProjection(0,0,x1,y1,w,0,x2,y2,0,h,x3,y3,w,h,x4,y4,t);setArray(out,t[0]/t[8],t[3]/t[8],0,t[6]/t[8],t[1]/t[8],t[4]/t[8],0,t[7]/t[8],0,0,1,0,t[2]/t[8],t[5]/t[8],0,1)}});(function(){var BackSide=THREE.BackSide,BoxGeometry=THREE.BoxGeometry,Mesh=THREE.Mesh,MeshBasicMaterial=THREE.MeshBasicMaterial,MeshStandardMaterial=THREE.MeshStandardMaterial,PointLight=THREE.PointLight,Scene=THREE.Scene;class RoomEnvironment extends Scene{constructor(renderer=null){super();const geometry=new BoxGeometry;geometry.deleteAttribute("uv");const roomMaterial=new MeshStandardMaterial({side:BackSide});const boxMaterial=new MeshStandardMaterial;let intensity=5;if(renderer!==null&&renderer._useLegacyLights===false)intensity=900;const mainLight=new PointLight(16777215,intensity,28,2);mainLight.position.set(0.418,16.199,0.3);this.add(mainLight);const room=new Mesh(geometry,roomMaterial);room.position.set(-0.757,13.219,0.717);room.scale.set(31.713,28.305,28.591);this.add(room);const box1=new Mesh(geometry,boxMaterial);box1.position.set(-10.906,2.009,1.846);box1.rotation.set(0,-0.195,0);box1.scale.set(2.328,7.905,4.651);this.add(box1);const box2=new Mesh(geometry,boxMaterial);box2.position.set(-5.607,-0.754,-0.758);box2.rotation.set(0,0.994,0);box2.scale.set(1.97,1.534,3.955);this.add(box2);const box3=new Mesh(geometry,boxMaterial);box3.position.set(6.167,0.857,7.803);box3.rotation.set(0,0.561,0);box3.scale.set(3.927,6.285,3.687);this.add(box3);const box4=new Mesh(geometry,boxMaterial);box4.position.set(-2.017,0.018,6.124);box4.rotation.set(0,0.333,0);box4.scale.set(2.002,4.566,2.064);this.add(box4);const box5=new Mesh(geometry,boxMaterial);box5.position.set(2.291,-0.756,-2.621);box5.rotation.set(0,-0.286,0);box5.scale.set(1.546,1.552,1.496);this.add(box5);const box6=new Mesh(geometry,boxMaterial);box6.position.set(-2.193,-0.369,-5.547);box6.rotation.set(0,0.516,0);box6.scale.set(3.875,3.487,2.986);this.add(box6);const light1=new Mesh(geometry,createAreaLightMaterial(50));light1.position.set(-16.116,14.37,8.208);light1.scale.set(0.1,2.428,2.739);this.add(light1);const light2=new Mesh(geometry,createAreaLightMaterial(50));light2.position.set(-16.109,18.021,-8.207);light2.scale.set(0.1,2.425,2.751);this.add(light2);const light3=new Mesh(geometry,createAreaLightMaterial(17));light3.position.set(14.904,12.198,-1.832);light3.scale.set(0.15,4.265,6.331);this.add(light3);const light4=new Mesh(geometry,createAreaLightMaterial(43));light4.position.set(-0.462,8.89,14.52);light4.scale.set(4.38,5.441,0.088);this.add(light4);const light5=new Mesh(geometry,createAreaLightMaterial(20));light5.position.set(3.235,11.486,-12.541);light5.scale.set(2.5,2,0.1);this.add(light5);const light6=new Mesh(geometry,createAreaLightMaterial(100));light6.position.set(0,20,0);light6.scale.set(1,0.1,1);this.add(light6)}dispose(){const resources=new Set;this.traverse(object=>{if(object.isMesh){resources.add(object.geometry);resources.add(object.material)}});for(const resource of resources){resource.dispose()}}}function createAreaLightMaterial(intensity){const material=new MeshBasicMaterial;material.color.setScalar(intensity);return material}THREE.RoomEnvironment=RoomEnvironment})();(function(t,e){e(t.THREE=t.THREE||{})})(this,function(THREE){var CubeReflectionMapping=THREE.CubeReflectionMapping,CubeRefractionMapping=THREE.CubeRefractionMapping,CubeUVReflectionMapping=THREE.CubeUVReflectionMapping,LinearEncoding=THREE.LinearEncoding,LinearFilter=THREE.LinearFilter,NoToneMapping=THREE.NoToneMapping,NoBlending=THREE.NoBlending,RGBAFormat=THREE.RGBAFormat,HalfFloatType=THREE.HalfFloatType,BufferAttribute=THREE.BufferAttribute,BufferGeometry=THREE.BufferGeometry,Mesh=THREE.Mesh,OrthographicCamera=THREE.OrthographicCamera,PerspectiveCamera=THREE.PerspectiveCamera,ShaderMaterial=THREE.ShaderMaterial,Vector3=THREE.Vector3,Color=THREE.Color,WebGLRenderTarget=THREE.WebGLRenderTarget,MeshBasicMaterial=THREE.MeshBasicMaterial,BoxGeometry=THREE.BoxGeometry,BackSide=THREE.BackSide;const LOD_MIN=4;const EXTRA_LOD_SIGMA=[0.125,0.215,0.35,0.446,0.526,0.582];const MAX_SAMPLES=20;const _flatCamera=new OrthographicCamera;const _clearColor=new Color;let _oldTarget=null;const PHI=(1+Math.sqrt(5))/2;const INV_PHI=1/PHI;const _axisDirections=[new Vector3(1,1,1),new Vector3(-1,1,1),new Vector3(1,1,-1),new Vector3(-1,1,-1),new Vector3(0,PHI,INV_PHI),new Vector3(0,PHI,-INV_PHI),new Vector3(INV_PHI,0,PHI),new Vector3(-INV_PHI,0,PHI),new Vector3(PHI,INV_PHI,0),new Vector3(-PHI,INV_PHI,0)];class PMREMGenerator{constructor(renderer){this._renderer=renderer;this._pingPongRenderTarget=null;this._lodMax=0;this._cubeSize=0;this._lodPlanes=[];this._sizeLods=[];this._sigmas=[];this._blurMaterial=null;this._cubemapMaterial=null;this._equirectMaterial=null;this._compileMaterial(this._blurMaterial)}fromScene(scene,sigma=0,near=0.1,far=100){_oldTarget=this._renderer.getRenderTarget();this._setSize(256);const cubeUVRenderTarget=this._allocateTargets();cubeUVRenderTarget.depthBuffer=true;this._sceneToCubeUV(scene,near,far,cubeUVRenderTarget);if(sigma>0){this._blur(cubeUVRenderTarget,0,0,sigma)}this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}fromEquirectangular(equirectangular,renderTarget=null){return this._fromTexture(equirectangular,renderTarget)}fromCubemap(cubemap,renderTarget=null){return this._fromTexture(cubemap,renderTarget)}compileCubemapShader(){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial();this._compileMaterial(this._cubemapMaterial)}}compileEquirectangularShader(){if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial();this._compileMaterial(this._equirectMaterial)}}dispose(){this._dispose();if(this._cubemapMaterial!==null)this._cubemapMaterial.dispose();if(this._equirectMaterial!==null)this._equirectMaterial.dispose()}_setSize(cubeSize){this._lodMax=Math.floor(Math.log2(cubeSize));this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){if(this._blurMaterial!==null)this._blurMaterial.dispose();if(this._pingPongRenderTarget!==null)this._pingPongRenderTarget.dispose();for(let i=0;i<this._lodPlanes.length;i++){this._lodPlanes[i].dispose()}}_cleanup(outputTarget){this._renderer.setRenderTarget(_oldTarget);outputTarget.scissorTest=false;_setViewport(outputTarget,0,0,outputTarget.width,outputTarget.height)}_fromTexture(texture,renderTarget){if(texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping){this._setSize(texture.image.length===0?16:texture.image[0].width||texture.image[0].image.width)}else{this._setSize(texture.image.width/4)}_oldTarget=this._renderer.getRenderTarget();const cubeUVRenderTarget=renderTarget||this._allocateTargets();this._textureToCubeUV(texture,cubeUVRenderTarget);this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}_allocateTargets(){const width=3*Math.max(this._cubeSize,16*7);const height=4*this._cubeSize;const params={magFilter:LinearFilter,minFilter:LinearFilter,generateMipmaps:false,type:HalfFloatType,format:RGBAFormat,encoding:LinearEncoding,depthBuffer:false};const cubeUVRenderTarget=_createRenderTarget(width,height,params);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==width){if(this._pingPongRenderTarget!==null){this._dispose()}this._pingPongRenderTarget=_createRenderTarget(width,height,params);const{_lodMax}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=_createPlanes(_lodMax));this._blurMaterial=_getBlurShader(_lodMax,width,height)}return cubeUVRenderTarget}_compileMaterial(material){const tmpMesh=new Mesh(this._lodPlanes[0],material);this._renderer.compile(tmpMesh,_flatCamera)}_sceneToCubeUV(scene,near,far,cubeUVRenderTarget){const fov=90;const aspect=1;const cubeCamera=new PerspectiveCamera(fov,aspect,near,far);const upSign=[1,-1,1,1,1,1];const forwardSign=[1,1,1,-1,-1,-1];const renderer=this._renderer;const originalAutoClear=renderer.autoClear;const toneMapping=renderer.toneMapping;renderer.getClearColor(_clearColor);renderer.toneMapping=NoToneMapping;renderer.autoClear=false;const backgroundMaterial=new MeshBasicMaterial({name:"PMREM.Background",side:BackSide,depthWrite:false,depthTest:false});const backgroundBox=new Mesh(new BoxGeometry(),backgroundMaterial);let useSolidColor=false;const background=scene.background;if(background){if(background.isColor){backgroundMaterial.color.copy(background);scene.background=null;useSolidColor=true}}else{backgroundMaterial.color.copy(_clearColor);useSolidColor=true}for(let i=0;i<6;i++){const col=i%3;if(col===0){cubeCamera.up.set(0,upSign[i],0);cubeCamera.lookAt(forwardSign[i],0,0)}else if(col===1){cubeCamera.up.set(0,0,upSign[i]);cubeCamera.lookAt(0,forwardSign[i],0)}else{cubeCamera.up.set(0,upSign[i],0);cubeCamera.lookAt(0,0,forwardSign[i])}const size=this._cubeSize;_setViewport(cubeUVRenderTarget,col*size,i>2?size:0,size,size);renderer.setRenderTarget(cubeUVRenderTarget);if(useSolidColor){renderer.render(backgroundBox,cubeCamera)}renderer.render(scene,cubeCamera)}backgroundBox.geometry.dispose();backgroundBox.material.dispose();renderer.toneMapping=toneMapping;renderer.autoClear=originalAutoClear;scene.background=background}_textureToCubeUV(texture,cubeUVRenderTarget){const renderer=this._renderer;const isCubeTexture=texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping;if(isCubeTexture){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial()}this._cubemapMaterial.uniforms.flipEnvMap.value=texture.isRenderTargetTexture===false?-1:1}else{if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial()}}const material=isCubeTexture?this._cubemapMaterial:this._equirectMaterial;const mesh=new Mesh(this._lodPlanes[0],material);const uniforms=material.uniforms;uniforms["envMap"].value=texture;const size=this._cubeSize;_setViewport(cubeUVRenderTarget,0,0,3*size,2*size);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(mesh,_flatCamera)}_applyPMREM(cubeUVRenderTarget){const renderer=this._renderer;const autoClear=renderer.autoClear;renderer.autoClear=false;for(let i=1;i<this._lodPlanes.length;i++){const sigma=Math.sqrt(this._sigmas[i]*this._sigmas[i]-this._sigmas[i-1]*this._sigmas[i-1]);const poleAxis=_axisDirections[(i-1)%_axisDirections.length];this._blur(cubeUVRenderTarget,i-1,i,sigma,poleAxis)}renderer.autoClear=autoClear}_blur(cubeUVRenderTarget,lodIn,lodOut,sigma,poleAxis){const pingPongRenderTarget=this._pingPongRenderTarget;this._halfBlur(cubeUVRenderTarget,pingPongRenderTarget,lodIn,lodOut,sigma,"latitudinal",poleAxis);this._halfBlur(pingPongRenderTarget,cubeUVRenderTarget,lodOut,lodOut,sigma,"longitudinal",poleAxis)}_halfBlur(targetIn,targetOut,lodIn,lodOut,sigmaRadians,direction,poleAxis){const renderer=this._renderer;const blurMaterial=this._blurMaterial;if(direction!=="latitudinal"&&direction!=="longitudinal"){console.error("blur direction must be either latitudinal or longitudinal!")}const STANDARD_DEVIATIONS=3;const blurMesh=new Mesh(this._lodPlanes[lodOut],blurMaterial);const blurUniforms=blurMaterial.uniforms;const pixels=this._sizeLods[lodIn]-1;const radiansPerPixel=isFinite(sigmaRadians)?Math.PI/(2*pixels):2*Math.PI/(2*MAX_SAMPLES-1);const sigmaPixels=sigmaRadians/radiansPerPixel;const samples=isFinite(sigmaRadians)?1+Math.floor(STANDARD_DEVIATIONS*sigmaPixels):MAX_SAMPLES;if(samples>MAX_SAMPLES){console.warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`)}const weights=[];let sum=0;for(let i=0;i<MAX_SAMPLES;++i){const x=i/sigmaPixels;const weight=Math.exp(-x*x/2);weights.push(weight);if(i===0){sum+=weight}else if(i<samples){sum+=2*weight}}for(let i=0;i<weights.length;i++){weights[i]=weights[i]/sum}blurUniforms["envMap"].value=targetIn.texture;blurUniforms["samples"].value=samples;blurUniforms["weights"].value=weights;blurUniforms["latitudinal"].value=direction==="latitudinal";if(poleAxis){blurUniforms["poleAxis"].value=poleAxis}const{_lodMax}=this;blurUniforms["dTheta"].value=radiansPerPixel;blurUniforms["mipInt"].value=_lodMax-lodIn;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);_setViewport(targetOut,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(targetOut);renderer.render(blurMesh,_flatCamera)}}function _createPlanes(lodMax){const lodPlanes=[];const sizeLods=[];const sigmas=[];let lod=lodMax;const totalLods=lodMax-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let i=0;i<totalLods;i++){const sizeLod=Math.pow(2,lod);sizeLods.push(sizeLod);let sigma=1/sizeLod;if(i>lodMax-LOD_MIN){sigma=EXTRA_LOD_SIGMA[i-lodMax+LOD_MIN-1]}else if(i===0){sigma=0}sigmas.push(sigma);const texelSize=1/(sizeLod-2);const min=-texelSize;const max=1+texelSize;const uv1=[min,min,max,min,max,max,min,min,max,max,min,max];const cubeFaces=6;const vertices=6;const positionSize=3;const uvSize=2;const faceIndexSize=1;const position=new Float32Array(positionSize*vertices*cubeFaces);const uv=new Float32Array(uvSize*vertices*cubeFaces);const faceIndex=new Float32Array(faceIndexSize*vertices*cubeFaces);for(let face=0;face<cubeFaces;face++){const x=face%3*2/3-1;const y=face>2?0:-1;const coordinates=[x,y,0,x+2/3,y,0,x+2/3,y+1,0,x,y,0,x+2/3,y+1,0,x,y+1,0];position.set(coordinates,positionSize*vertices*face);uv.set(uv1,uvSize*vertices*face);const fill=[face,face,face,face,face,face];faceIndex.set(fill,faceIndexSize*vertices*face)}const planes=new BufferGeometry;planes.setAttribute("position",new BufferAttribute(position,positionSize));planes.setAttribute("uv",new BufferAttribute(uv,uvSize));planes.setAttribute("faceIndex",new BufferAttribute(faceIndex,faceIndexSize));lodPlanes.push(planes);if(lod>LOD_MIN){lod--}}return{lodPlanes,sizeLods,sigmas}}function _createRenderTarget(width,height,params){const cubeUVRenderTarget=new WebGLRenderTarget(width,height,params);cubeUVRenderTarget.texture.mapping=CubeUVReflectionMapping;cubeUVRenderTarget.texture.name="PMREM.cubeUv";cubeUVRenderTarget.scissorTest=true;return cubeUVRenderTarget}function _setViewport(target,x,y,width,height){target.viewport.set(x,y,width,height);target.scissor.set(x,y,width,height)}function _getBlurShader(lodMax,width,height){const weights=new Float32Array(MAX_SAMPLES);const poleAxis=new Vector3(0,1,0);const shaderMaterial=new ShaderMaterial({name:"SphericalGaussianBlur",defines:{"n":MAX_SAMPLES,"CUBEUV_TEXEL_WIDTH":1/width,"CUBEUV_TEXEL_HEIGHT":1/height,"CUBEUV_MAX_MIP":`${lodMax}.0`},uniforms:{"envMap":{value:null},"samples":{value:1},"weights":{value:weights},"latitudinal":{value:false},"dTheta":{value:0},"mipInt":{value:0},"poleAxis":{value:poleAxis}},vertexShader:_getCommonVertexShader(),fragmentShader:`

                precision mediump float;
                precision mediump int;

                varying vec3 vOutputDirection;

                uniform sampler2D envMap;
                uniform int samples;
                uniform float weights[ n ];
                uniform bool latitudinal;
                uniform float dTheta;
                uniform float mipInt;
                uniform vec3 poleAxis;

                #define ENVMAP_TYPE_CUBE_UV
                #include <cube_uv_reflection_fragment>

                vec3 getSample( float theta, vec3 axis ) {

                    float cosTheta = cos( theta );
                    // Rodrigues' axis-angle rotation
                    vec3 sampleDirection = vOutputDirection * cosTheta
                        + cross( axis, vOutputDirection ) * sin( theta )
                        + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

                    return bilinearCubeUV( envMap, sampleDirection, mipInt );

                }

                void main() {

                    vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

                    if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

                        axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

                    }

                    axis = normalize( axis );

                    gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
                    gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

                    for ( int i = 1; i < n; i++ ) {

                        if ( i >= samples ) {

                            break;

                        }

                        float theta = dTheta * float( i );
                        gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
                        gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

                    }

                }
            `,blending:NoBlending,depthTest:false,depthWrite:false});return shaderMaterial}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{"envMap":{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:`

                precision mediump float;
                precision mediump int;

                varying vec3 vOutputDirection;

                uniform sampler2D envMap;

                #include <common>

                void main() {

                    vec3 outputDirection = normalize( vOutputDirection );
                    vec2 uv = equirectUv( outputDirection );

                    gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );

                }
            `,blending:NoBlending,depthTest:false,depthWrite:false})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{"envMap":{value:null},"flipEnvMap":{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:`

                precision mediump float;
                precision mediump int;

                uniform float flipEnvMap;

                varying vec3 vOutputDirection;

                uniform samplerCube envMap;

                void main() {

                    gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

                }
            `,blending:NoBlending,depthTest:false,depthWrite:false})}function _getCommonVertexShader(){return`

            precision mediump float;
            precision mediump int;

            attribute float faceIndex;

            varying vec3 vOutputDirection;

            // RH coordinate system; PMREM face-indexing convention
            vec3 getDirection( vec2 uv, float face ) {

                uv = 2.0 * uv - 1.0;

                vec3 direction = vec3( uv, 1.0 );

                if ( face == 0.0 ) {

                    direction = direction.zyx; // ( 1, v, u ) pos x

                } else if ( face == 1.0 ) {

                    direction = direction.xzy;
                    direction.xz *= -1.0; // ( -u, 1, -v ) pos y

                } else if ( face == 2.0 ) {

                    direction.x *= -1.0; // ( -u, v, 1 ) pos z

                } else if ( face == 3.0 ) {

                    direction = direction.zyx;
                    direction.xz *= -1.0; // ( -1, v, -u ) neg x

                } else if ( face == 4.0 ) {

                    direction = direction.xzy;
                    direction.xy *= -1.0; // ( -u, -1, v ) neg y

                } else if ( face == 5.0 ) {

                    direction.z *= -1.0; // ( u, v, -1 ) neg z

                }

                return direction;

            }

            void main() {

                vOutputDirection = getDirection( uv, faceIndex );
                gl_Position = vec4( position, 1.0 );

            }
        `}THREE.PMREMGenerator=PMREMGenerator});(function(t,e){e(t,t.THREE=t.THREE||{})})(this,function(globalThis,THREE){const $5OpyM$Spherical=THREE.Spherical;const $5OpyM$Vector3=THREE.Vector3;const $5OpyM$MathUtils=THREE.MathUtils;const $5OpyM$Sphere=THREE.Sphere;const $5OpyM$Group=THREE.Group;const $5OpyM$PointsMaterial=THREE.PointsMaterial;const $5OpyM$MeshStandardMaterial=THREE.MeshStandardMaterial;const $5OpyM$Box3Helper=THREE.Box3Helper;const $5OpyM$Color=THREE.Color;const $5OpyM$Matrix4=THREE.Matrix4;const $5OpyM$LoadingManager=THREE.LoadingManager;const $5OpyM$Vector2=THREE.Vector2;const $5OpyM$Frustum=THREE.Frustum;const $5OpyM$DefaultLoadingManager=THREE.DefaultLoadingManager;const $5OpyM$BufferGeometry=THREE.BufferGeometry;const $5OpyM$BufferAttribute=THREE.BufferAttribute;const $5OpyM$Points=THREE.Points;const $5OpyM$Quaternion=THREE.Quaternion;const $5OpyM$InstancedMesh=THREE.InstancedMesh;const $5OpyM$Ray=THREE.Ray;const $5OpyM$Box3=THREE.Box3;const $5OpyM$LineBasicMaterial=THREE.LineBasicMaterial;const $5OpyM$LineSegments=THREE.LineSegments;const $5OpyM$BoxGeometry=THREE.BoxGeometry;const $5OpyM$EdgesGeometry=THREE.EdgesGeometry;const $5OpyM$Mesh=THREE.Mesh;const $5OpyM$Euler=THREE.Euler;const $5OpyM$GLTFLoader=THREE.GLTFLoader;var $parcel$global=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:{};var $parcel$modules={};var $parcel$inits={};var parcelRequire=$parcel$global["parcelRequire5fa1"];if(parcelRequire==null){parcelRequire=function(id){if(id in $parcel$modules){return $parcel$modules[id].exports}if(id in $parcel$inits){var init=$parcel$inits[id];delete $parcel$inits[id];var module={id:id,exports:{}};$parcel$modules[id]=module;init.call(module.exports,module,module.exports);return module.exports}var err=new Error("Cannot find module '"+id+"'");err.code="MODULE_NOT_FOUND";throw err};parcelRequire.register=function register(id,init){$parcel$inits[id]=init};$parcel$global["parcelRequire5fa1"]=parcelRequire}parcelRequire.register("1hGdn",function(module,exports){"use strict";Object.defineProperty(module.exports,"__esModule",{value:true});module.exports.latitudeToSphericalPhi=$0ef81fee344e2f3b$var$latitudeToSphericalPhi;module.exports.sphericalPhiToLatitude=$0ef81fee344e2f3b$var$sphericalPhiToLatitude;module.exports.swapToGeoFrame=$0ef81fee344e2f3b$var$swapToGeoFrame;module.exports.swapToThreeFrame=$0ef81fee344e2f3b$var$swapToThreeFrame;module.exports.toLatLonString=$0ef81fee344e2f3b$var$toLatLonString;const $0ef81fee344e2f3b$var$_spherical=new $5OpyM$Spherical;const $0ef81fee344e2f3b$var$_vec=new $5OpyM$Vector3;const $0ef81fee344e2f3b$var$_geoResults={};function $0ef81fee344e2f3b$var$swapToGeoFrame(target){const{x:x,y:y,z:z}=target;target.x=z;target.y=x;target.z=y}function $0ef81fee344e2f3b$var$swapToThreeFrame(target){const{x:x,y:y,z:z}=target;target.z=x;target.x=y;target.y=z}function $0ef81fee344e2f3b$var$sphericalPhiToLatitude(phi){return-(phi-Math.PI/2)}function $0ef81fee344e2f3b$var$latitudeToSphericalPhi(latitude){return-latitude+Math.PI/2}function $0ef81fee344e2f3b$var$correctGeoCoordWrap(lat,lon,target={}){$0ef81fee344e2f3b$var$_spherical.theta=lon;$0ef81fee344e2f3b$var$_spherical.phi=$0ef81fee344e2f3b$var$latitudeToSphericalPhi(lat);$0ef81fee344e2f3b$var$_vec.setFromSpherical($0ef81fee344e2f3b$var$_spherical);$0ef81fee344e2f3b$var$_spherical.setFromVector3($0ef81fee344e2f3b$var$_vec);target.lat=$0ef81fee344e2f3b$var$sphericalPhiToLatitude($0ef81fee344e2f3b$var$_spherical.phi);target.lon=$0ef81fee344e2f3b$var$_spherical.theta;return target}function $0ef81fee344e2f3b$var$toHoursMinutesSecondsString(value,pos="E",neg="W"){const direction=value<0?neg:pos;value=Math.abs(value);const hours=~~value;const minDec=(value-hours)*60;const minutes=~~minDec;const secDec=(minDec-minutes)*60;const seconds=~~secDec;return`${hours}° ${minutes}' ${seconds}" ${direction}`}function $0ef81fee344e2f3b$var$toLatLonString(lat,lon,decimalFormat=false){const result=$0ef81fee344e2f3b$var$correctGeoCoordWrap(lat,lon,$0ef81fee344e2f3b$var$_geoResults);let latString,lonString;if(decimalFormat){latString=`${($5OpyM$MathUtils.RAD2DEG*result.lat).toFixed(4)}°`;lonString=`${($5OpyM$MathUtils.RAD2DEG*result.lon).toFixed(4)}°`}else{latString=$0ef81fee344e2f3b$var$toHoursMinutesSecondsString($5OpyM$MathUtils.RAD2DEG*result.lat,"N","S");lonString=$0ef81fee344e2f3b$var$toHoursMinutesSecondsString($5OpyM$MathUtils.RAD2DEG*result.lon,"E","W")}return`${latString} ${lonString}`}});var $cf838c15c8b009ba$exports={};"use strict";Object.defineProperty($cf838c15c8b009ba$exports,"__esModule",{value:true});var $cf838c15c8b009ba$var$_exportNames={DebugTilesRenderer:true,NONE:true,SCREEN_ERROR:true,GEOMETRIC_ERROR:true,DISTANCE:true,DEPTH:true,RELATIVE_DEPTH:true,IS_LEAF:true,RANDOM_COLOR:true,RANDOM_NODE_COLOR:true,CUSTOM_COLOR:true,TilesRenderer:true,B3DMLoader:true,PNTSLoader:true,I3DMLoader:true,CMPTLoader:true,GLTFCesiumRTCExtension:true,GLTFExtensionLoader:true,EllipsoidRegionHelper:true,EllipsoidRegionLineHelper:true,SphereHelper:true,Ellipsoid:true,EllipsoidRegion:true,GeoUtils:true,TilesRendererBase:true,LoaderBase:true,B3DMLoaderBase:true,I3DMLoaderBase:true,PNTSLoaderBase:true,CMPTLoaderBase:true,LRUCache:true,PriorityQueue:true};Object.defineProperty($cf838c15c8b009ba$exports,"B3DMLoader",{enumerable:true,get:function(){return $0aa3d1def57e98b1$exports.B3DMLoader}});Object.defineProperty($cf838c15c8b009ba$exports,"B3DMLoaderBase",{enumerable:true,get:function(){return $f5d9b5dde53306bf$exports.B3DMLoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"CMPTLoader",{enumerable:true,get:function(){return $54879e9a7dc345e0$exports.CMPTLoader}});Object.defineProperty($cf838c15c8b009ba$exports,"CMPTLoaderBase",{enumerable:true,get:function(){return $cb66a16334732244$exports.CMPTLoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"CUSTOM_COLOR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.CUSTOM_COLOR}});Object.defineProperty($cf838c15c8b009ba$exports,"DEPTH",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.DEPTH}});Object.defineProperty($cf838c15c8b009ba$exports,"DISTANCE",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.DISTANCE}});Object.defineProperty($cf838c15c8b009ba$exports,"DebugTilesRenderer",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.DebugTilesRenderer}});Object.defineProperty($cf838c15c8b009ba$exports,"Ellipsoid",{enumerable:true,get:function(){return $9160f8f2e0578e98$exports.Ellipsoid}});Object.defineProperty($cf838c15c8b009ba$exports,"EllipsoidRegion",{enumerable:true,get:function(){return $aa7b3b269f245cbe$exports.EllipsoidRegion}});Object.defineProperty($cf838c15c8b009ba$exports,"EllipsoidRegionHelper",{enumerable:true,get:function(){return $3b9225051b507460$exports.EllipsoidRegionHelper}});Object.defineProperty($cf838c15c8b009ba$exports,"EllipsoidRegionLineHelper",{enumerable:true,get:function(){return $3b9225051b507460$exports.EllipsoidRegionLineHelper}});Object.defineProperty($cf838c15c8b009ba$exports,"GEOMETRIC_ERROR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.GEOMETRIC_ERROR}});Object.defineProperty($cf838c15c8b009ba$exports,"GLTFCesiumRTCExtension",{enumerable:true,get:function(){return $44c3bffa5e49f297$exports.GLTFCesiumRTCExtension}});Object.defineProperty($cf838c15c8b009ba$exports,"GLTFExtensionLoader",{enumerable:true,get:function(){return $29ced67d26e5c4e2$exports.GLTFExtensionLoader}});$cf838c15c8b009ba$exports.GeoUtils=void 0;Object.defineProperty($cf838c15c8b009ba$exports,"I3DMLoader",{enumerable:true,get:function(){return $0bc85483bdeca322$exports.I3DMLoader}});Object.defineProperty($cf838c15c8b009ba$exports,"I3DMLoaderBase",{enumerable:true,get:function(){return $bcb352fb74bed4a5$exports.I3DMLoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"IS_LEAF",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.IS_LEAF}});Object.defineProperty($cf838c15c8b009ba$exports,"LRUCache",{enumerable:true,get:function(){return $e0d7a242557dc8e6$exports.LRUCache}});Object.defineProperty($cf838c15c8b009ba$exports,"LoaderBase",{enumerable:true,get:function(){return $e6b785bba9ea128d$exports.LoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"NONE",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.NONE}});Object.defineProperty($cf838c15c8b009ba$exports,"PNTSLoader",{enumerable:true,get:function(){return $1ddd6ca16eb224df$exports.PNTSLoader}});Object.defineProperty($cf838c15c8b009ba$exports,"PNTSLoaderBase",{enumerable:true,get:function(){return $d408eda5a179398a$exports.PNTSLoaderBase}});Object.defineProperty($cf838c15c8b009ba$exports,"PriorityQueue",{enumerable:true,get:function(){return $096d2234d1235002$exports.PriorityQueue}});Object.defineProperty($cf838c15c8b009ba$exports,"RANDOM_COLOR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.RANDOM_COLOR}});Object.defineProperty($cf838c15c8b009ba$exports,"RANDOM_NODE_COLOR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.RANDOM_NODE_COLOR}});Object.defineProperty($cf838c15c8b009ba$exports,"RELATIVE_DEPTH",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.RELATIVE_DEPTH}});Object.defineProperty($cf838c15c8b009ba$exports,"SCREEN_ERROR",{enumerable:true,get:function(){return $1909f04f34bd6630$exports.SCREEN_ERROR}});Object.defineProperty($cf838c15c8b009ba$exports,"SphereHelper",{enumerable:true,get:function(){return $1cb839fa4db014d3$exports.SphereHelper}});Object.defineProperty($cf838c15c8b009ba$exports,"TilesRenderer",{enumerable:true,get:function(){return $06d26e8e9f5361d3$exports.TilesRenderer}});Object.defineProperty($cf838c15c8b009ba$exports,"TilesRendererBase",{enumerable:true,get:function(){return $5a6f7a997885dc30$exports.TilesRendererBase}});var $1909f04f34bd6630$exports={};"use strict";Object.defineProperty($1909f04f34bd6630$exports,"__esModule",{value:true});$1909f04f34bd6630$exports.SCREEN_ERROR=$1909f04f34bd6630$exports.RELATIVE_DEPTH=$1909f04f34bd6630$exports.RANDOM_NODE_COLOR=$1909f04f34bd6630$exports.RANDOM_COLOR=$1909f04f34bd6630$exports.NONE=$1909f04f34bd6630$exports.IS_LEAF=$1909f04f34bd6630$exports.GEOMETRIC_ERROR=$1909f04f34bd6630$exports.DebugTilesRenderer=$1909f04f34bd6630$exports.DISTANCE=$1909f04f34bd6630$exports.DEPTH=$1909f04f34bd6630$exports.CUSTOM_COLOR=void 0;var $3a66585ec6f85053$exports={};"use strict";Object.defineProperty($3a66585ec6f85053$exports,"__esModule",{value:true});$3a66585ec6f85053$exports.getIndexedRandomColor=$3a66585ec6f85053$var$getIndexedRandomColor;const $3a66585ec6f85053$var$colors={};function $3a66585ec6f85053$var$getIndexedRandomColor(index){if(!$3a66585ec6f85053$var$colors[index]){const h=Math.random();const s=0.5+Math.random()*0.5;const l=0.375+Math.random()*0.25;$3a66585ec6f85053$var$colors[index]=new $5OpyM$Color().setHSL(h,s,l)}return $3a66585ec6f85053$var$colors[index]}var $06d26e8e9f5361d3$exports={};"use strict";Object.defineProperty($06d26e8e9f5361d3$exports,"__esModule",{value:true});$06d26e8e9f5361d3$exports.TilesRenderer=void 0;var $5a6f7a997885dc30$exports={};"use strict";Object.defineProperty($5a6f7a997885dc30$exports,"__esModule",{value:true});$5a6f7a997885dc30$exports.TilesRendererBase=void 0;var $7ff9fb142d83939f$exports={};"use strict";Object.defineProperty($7ff9fb142d83939f$exports,"__esModule",{value:true});$7ff9fb142d83939f$exports.getUrlExtension=$7ff9fb142d83939f$var$getUrlExtension;function $7ff9fb142d83939f$var$getUrlExtension(url){let parsedUrl;try{parsedUrl=new URL(url,"http://fakehost.com/")}catch(_){return null}const filename=parsedUrl.pathname.split("/").pop();const dotIndex=filename.lastIndexOf(".");if(dotIndex===-1||dotIndex===filename.length-1)return null;const extension=filename.substring(dotIndex+1);return extension}var $e0d7a242557dc8e6$exports={};"use strict";Object.defineProperty($e0d7a242557dc8e6$exports,"__esModule",{value:true});$e0d7a242557dc8e6$exports.LRUCache=void 0;function $e0d7a242557dc8e6$var$enqueueMicrotask(callback){Promise.resolve().then(callback)}class $e0d7a242557dc8e6$var$LRUCache{constructor(){this.maxSize=800;this.minSize=600;this.unloadPercent=0.05;this.itemSet=new Map;this.itemList=[];this.usedSet=new Set;this.callbacks=new Map;this.unloadPriorityCallback=null;const itemSet=this.itemSet;this.defaultPriorityCallback=item=>itemSet.get(item)}isFull(){return this.itemSet.size>=this.maxSize}add(item,removeCb){const itemSet=this.itemSet;if(itemSet.has(item))return false;if(this.isFull())return false;const usedSet=this.usedSet;const itemList=this.itemList;const callbacks=this.callbacks;itemList.push(item);usedSet.add(item);itemSet.set(item,Date.now());callbacks.set(item,removeCb);return true}remove(item){const usedSet=this.usedSet;const itemSet=this.itemSet;const itemList=this.itemList;const callbacks=this.callbacks;if(itemSet.has(item)){callbacks.get(item)(item);const index=itemList.indexOf(item);itemList.splice(index,1);usedSet.delete(item);itemSet.delete(item);callbacks.delete(item);return true}return false}markUsed(item){const itemSet=this.itemSet;const usedSet=this.usedSet;if(itemSet.has(item)&&!usedSet.has(item)){itemSet.set(item,Date.now());usedSet.add(item)}}markAllUnused(){this.usedSet.clear()}unloadUnusedContent(){const unloadPercent=this.unloadPercent;const targetSize=this.minSize;const itemList=this.itemList;const itemSet=this.itemSet;const usedSet=this.usedSet;const callbacks=this.callbacks;const unused=itemList.length-usedSet.size;const excess=itemList.length-targetSize;const unloadPriorityCallback=this.unloadPriorityCallback||this.defaultPriorityCallback;if(excess>0&&unused>0){itemList.sort((a,b)=>{const usedA=usedSet.has(a);const usedB=usedSet.has(b);if(usedA&&usedB)return 0;else if(!usedA&&!usedB)return unloadPriorityCallback(b)-unloadPriorityCallback(a);else return usedA?1:-1});const unusedExcess=Math.min(excess,unused);const maxUnload=Math.max(targetSize*unloadPercent,unusedExcess*unloadPercent);let nodesToUnload=Math.min(maxUnload,unused);nodesToUnload=Math.ceil(nodesToUnload);const removedItems=itemList.splice(0,nodesToUnload);for(let i=0,l=removedItems.length;i<l;i++){const item=removedItems[i];callbacks.get(item)(item);itemSet.delete(item);callbacks.delete(item)}}}scheduleUnload(markAllUnused=true){if(!this.scheduled){this.scheduled=true;$e0d7a242557dc8e6$var$enqueueMicrotask(()=>{this.scheduled=false;this.unloadUnusedContent();if(markAllUnused)this.markAllUnused()})}}}$e0d7a242557dc8e6$exports.LRUCache=$e0d7a242557dc8e6$var$LRUCache;var $096d2234d1235002$exports={};"use strict";Object.defineProperty($096d2234d1235002$exports,"__esModule",{value:true});$096d2234d1235002$exports.PriorityQueue=void 0;class $096d2234d1235002$var$PriorityQueue{constructor(){this.maxJobs=6;this.items=[];this.callbacks=new Map;this.currJobs=0;this.scheduled=false;this.autoUpdate=true;this.priorityCallback=()=>{throw new Error("PriorityQueue: PriorityCallback function not defined.")};this.schedulingCallback=func=>{requestAnimationFrame(func)};this._runjobs=()=>{this.tryRunJobs();this.scheduled=false}}sort(){const priorityCallback=this.priorityCallback;const items=this.items;items.sort(priorityCallback)}add(item,callback){return new Promise((resolve,reject)=>{const prCallback=(...args)=>callback(...args).then(resolve).catch(reject);const items=this.items;const callbacks=this.callbacks;items.push(item);callbacks.set(item,prCallback);if(this.autoUpdate)this.scheduleJobRun()})}remove(item){const items=this.items;const callbacks=this.callbacks;const index=items.indexOf(item);if(index!==-1){items.splice(index,1);callbacks.delete(item)}}tryRunJobs(){this.sort();const items=this.items;const callbacks=this.callbacks;const maxJobs=this.maxJobs;let currJobs=this.currJobs;while(maxJobs>currJobs&&items.length>0){currJobs++;const item=items.pop();const callback=callbacks.get(item);callbacks.delete(item);callback(item).then(()=>{this.currJobs--;if(this.autoUpdate)this.scheduleJobRun()}).catch(()=>{this.currJobs--;if(this.autoUpdate)this.scheduleJobRun()})}this.currJobs=currJobs}scheduleJobRun(){if(!this.scheduled){this.schedulingCallback(this._runjobs);this.scheduled=true}}}$096d2234d1235002$exports.PriorityQueue=$096d2234d1235002$var$PriorityQueue;var $cd531a5f1c18e9cc$exports={};"use strict";Object.defineProperty($cd531a5f1c18e9cc$exports,"__esModule",{value:true});$cd531a5f1c18e9cc$exports.determineFrustumSet=$cd531a5f1c18e9cc$var$determineFrustumSet;$cd531a5f1c18e9cc$exports.markUsedSetLeaves=$cd531a5f1c18e9cc$var$markUsedSetLeaves;$cd531a5f1c18e9cc$exports.skipTraversal=$cd531a5f1c18e9cc$var$skipTraversal;$cd531a5f1c18e9cc$exports.toggleTiles=$cd531a5f1c18e9cc$var$toggleTiles;$cd531a5f1c18e9cc$exports.traverseSet=$cd531a5f1c18e9cc$var$traverseSet;var $002d29a772485791$exports={};"use strict";Object.defineProperty($002d29a772485791$exports,"__esModule",{value:true});$002d29a772485791$exports.WGS84_RADIUS=$002d29a772485791$exports.WGS84_HEIGHT=$002d29a772485791$exports.WGS84_FLATTENING=$002d29a772485791$exports.UNLOADED=$002d29a772485791$exports.PARSING=$002d29a772485791$exports.LOADING=$002d29a772485791$exports.LOADED=$002d29a772485791$exports.FAILED=void 0;const $002d29a772485791$var$UNLOADED=0;$002d29a772485791$exports.UNLOADED=$002d29a772485791$var$UNLOADED;const $002d29a772485791$var$LOADING=1;$002d29a772485791$exports.LOADING=$002d29a772485791$var$LOADING;const $002d29a772485791$var$PARSING=2;$002d29a772485791$exports.PARSING=$002d29a772485791$var$PARSING;const $002d29a772485791$var$LOADED=3;$002d29a772485791$exports.LOADED=$002d29a772485791$var$LOADED;const $002d29a772485791$var$FAILED=4;$002d29a772485791$exports.FAILED=$002d29a772485791$var$FAILED;const $002d29a772485791$var$WGS84_RADIUS=6378137;$002d29a772485791$exports.WGS84_RADIUS=$002d29a772485791$var$WGS84_RADIUS;const $002d29a772485791$var$WGS84_FLATTENING=1/298.257223563;$002d29a772485791$exports.WGS84_FLATTENING=$002d29a772485791$var$WGS84_FLATTENING;const $002d29a772485791$var$WGS84_HEIGHT=-($002d29a772485791$var$WGS84_FLATTENING*$002d29a772485791$var$WGS84_RADIUS-$002d29a772485791$var$WGS84_RADIUS);$002d29a772485791$exports.WGS84_HEIGHT=$002d29a772485791$var$WGS84_HEIGHT;function $cd531a5f1c18e9cc$var$isDownloadFinished(value){return value===$002d29a772485791$exports.LOADED||value===$002d29a772485791$exports.FAILED}function $cd531a5f1c18e9cc$var$isUsedThisFrame(tile,frameCount){return tile.__lastFrameVisited===frameCount&&tile.__used}function $cd531a5f1c18e9cc$var$resetFrameState(tile,frameCount){if(tile.__lastFrameVisited!==frameCount){tile.__lastFrameVisited=frameCount;tile.__used=false;tile.__inFrustum=false;tile.__isLeaf=false;tile.__visible=false;tile.__active=false;tile.__error=Infinity;tile.__distanceFromCamera=Infinity;tile.__childrenWereVisible=false;tile.__allChildrenLoaded=false}}function $cd531a5f1c18e9cc$var$recursivelyMarkUsed(tile,frameCount,lruCache,renderer){renderer.ensureChildrenArePreprocessed(tile);$cd531a5f1c18e9cc$var$resetFrameState(tile,frameCount);tile.__used=true;lruCache.markUsed(tile);if(tile.__contentEmpty){const children=tile.children;for(let i=0,l=children.length;i<l;i++)$cd531a5f1c18e9cc$var$recursivelyMarkUsed(children[i],frameCount,lruCache,renderer)}}function $cd531a5f1c18e9cc$var$recursivelyLoadTiles(tile,depthFromRenderedParent,renderer){renderer.ensureChildrenArePreprocessed(tile);const doTraverse=tile.__contentEmpty&&(!tile.__externalTileSet||$cd531a5f1c18e9cc$var$isDownloadFinished(tile.__loadingState));if(doTraverse){const children=tile.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.__depthFromRenderedParent=depthFromRenderedParent;$cd531a5f1c18e9cc$var$recursivelyLoadTiles(child,depthFromRenderedParent,renderer)}}else renderer.requestTileContents(tile)}function $cd531a5f1c18e9cc$var$traverseSet(tile,beforeCb=null,afterCb=null,parent=null,depth=0){if(beforeCb&&beforeCb(tile,parent,depth)){if(afterCb)afterCb(tile,parent,depth);return}const children=tile.children;for(let i=0,l=children.length;i<l;i++)$cd531a5f1c18e9cc$var$traverseSet(children[i],beforeCb,afterCb,tile,depth+1);if(afterCb)afterCb(tile,parent,depth)}function $cd531a5f1c18e9cc$var$determineFrustumSet(tile,renderer){renderer.ensureChildrenArePreprocessed(tile);const stats=renderer.stats;const frameCount=renderer.frameCount;const errorTarget=renderer.errorTarget;const maxDepth=renderer.maxDepth;const loadSiblings=renderer.loadSiblings;const lruCache=renderer.lruCache;const stopAtEmptyTiles=renderer.stopAtEmptyTiles;$cd531a5f1c18e9cc$var$resetFrameState(tile,frameCount);const inFrustum=renderer.tileInView(tile);if(inFrustum===false)return false;tile.__used=true;lruCache.markUsed(tile);tile.__inFrustum=true;stats.inFrustum++;if((stopAtEmptyTiles||!tile.__contentEmpty)&&!tile.__externalTileSet){renderer.calculateError(tile);const error=tile.__error;if(error<=errorTarget)return true;if(renderer.maxDepth>0&&tile.__depth+1>=maxDepth)return true}let anyChildrenUsed=false;const children=tile.children;for(let i=0,l=children.length;i<l;i++){const c=children[i];const r=$cd531a5f1c18e9cc$var$determineFrustumSet(c,renderer);anyChildrenUsed=anyChildrenUsed||r}if(anyChildrenUsed&&loadSiblings)for(let i=0,l=children.length;i<l;i++){const c=children[i];$cd531a5f1c18e9cc$var$recursivelyMarkUsed(c,frameCount,lruCache,renderer)}return true}function $cd531a5f1c18e9cc$var$markUsedSetLeaves(tile,renderer){const stats=renderer.stats;const frameCount=renderer.frameCount;if(!$cd531a5f1c18e9cc$var$isUsedThisFrame(tile,frameCount))return;stats.used++;const children=tile.children;let anyChildrenUsed=false;for(let i=0,l=children.length;i<l;i++){const c=children[i];anyChildrenUsed=anyChildrenUsed||$cd531a5f1c18e9cc$var$isUsedThisFrame(c,frameCount)}if(!anyChildrenUsed)tile.__isLeaf=true;else{let childrenWereVisible=false;let allChildrenLoaded=true;for(let i=0,l=children.length;i<l;i++){const c=children[i];$cd531a5f1c18e9cc$var$markUsedSetLeaves(c,renderer);childrenWereVisible=childrenWereVisible||c.__wasSetVisible||c.__childrenWereVisible;if($cd531a5f1c18e9cc$var$isUsedThisFrame(c,frameCount)){const childLoaded=c.__allChildrenLoaded||!c.__contentEmpty&&$cd531a5f1c18e9cc$var$isDownloadFinished(c.__loadingState)||c.__externalTileSet&&c.__loadingState===$002d29a772485791$exports.FAILED;allChildrenLoaded=allChildrenLoaded&&childLoaded}}tile.__childrenWereVisible=childrenWereVisible;tile.__allChildrenLoaded=allChildrenLoaded}}function $cd531a5f1c18e9cc$var$skipTraversal(tile,renderer){const stats=renderer.stats;const frameCount=renderer.frameCount;if(!$cd531a5f1c18e9cc$var$isUsedThisFrame(tile,frameCount))return;const parent=tile.parent;const parentDepthToParent=parent?parent.__depthFromRenderedParent:-1;tile.__depthFromRenderedParent=parentDepthToParent;const lruCache=renderer.lruCache;if(tile.__isLeaf){tile.__depthFromRenderedParent++;if(tile.__loadingState===$002d29a772485791$exports.LOADED){if(tile.__inFrustum){tile.__visible=true;stats.visible++}tile.__active=true;stats.active++}else if(!lruCache.isFull()&&(!tile.__contentEmpty||tile.__externalTileSet))renderer.requestTileContents(tile);return}const errorRequirement=(renderer.errorTarget+1)*renderer.errorThreshold;const meetsSSE=tile.__error<=errorRequirement;const includeTile=meetsSSE||tile.refine==="ADD";const hasModel=!tile.__contentEmpty;const hasContent=hasModel||tile.__externalTileSet;const loadedContent=$cd531a5f1c18e9cc$var$isDownloadFinished(tile.__loadingState)&&hasContent;const childrenWereVisible=tile.__childrenWereVisible;const children=tile.children;const allChildrenHaveContent=tile.__allChildrenLoaded;if(includeTile&&hasModel)tile.__depthFromRenderedParent++;if(includeTile&&!loadedContent&&!lruCache.isFull()&&hasContent)renderer.requestTileContents(tile);if(meetsSSE&&!allChildrenHaveContent&&!childrenWereVisible&&loadedContent||tile.refine==="ADD"&&loadedContent){if(tile.__inFrustum){tile.__visible=true;stats.visible++}tile.__active=true;stats.active++}if(tile.refine!=="ADD"&&meetsSSE&&!allChildrenHaveContent&&loadedContent)for(let i=0,l=children.length;i<l;i++){const c=children[i];if($cd531a5f1c18e9cc$var$isUsedThisFrame(c,frameCount)&&!lruCache.isFull()){c.__depthFromRenderedParent=tile.__depthFromRenderedParent+1;$cd531a5f1c18e9cc$var$recursivelyLoadTiles(c,c.__depthFromRenderedParent,renderer)}}else for(let i=0,l=children.length;i<l;i++){const c=children[i];if($cd531a5f1c18e9cc$var$isUsedThisFrame(c,frameCount))$cd531a5f1c18e9cc$var$skipTraversal(c,renderer)}}function $cd531a5f1c18e9cc$var$toggleTiles(tile,renderer){const frameCount=renderer.frameCount;const isUsed=$cd531a5f1c18e9cc$var$isUsedThisFrame(tile,frameCount);if(isUsed||tile.__usedLastFrame){let setActive=false;let setVisible=false;if(isUsed){setActive=tile.__active;if(renderer.displayActiveTiles)setVisible=tile.__active||tile.__visible;else setVisible=tile.__visible}if(!tile.__contentEmpty&&tile.__loadingState===$002d29a772485791$exports.LOADED){if(tile.__wasSetActive!==setActive)renderer.setTileActive(tile,setActive);if(tile.__wasSetVisible!==setVisible)renderer.setTileVisible(tile,setVisible)}tile.__wasSetActive=setActive;tile.__wasSetVisible=setVisible;tile.__usedLastFrame=isUsed;const children=tile.children;for(let i=0,l=children.length;i<l;i++){const c=children[i];$cd531a5f1c18e9cc$var$toggleTiles(c,renderer)}}}const $5a6f7a997885dc30$var$priorityCallback=(a,b)=>{if(a.__depth!==b.__depth)return a.__depth>b.__depth?-1:1;else if(a.__inFrustum!==b.__inFrustum)return a.__inFrustum?1:-1;else if(a.__used!==b.__used)return a.__used?1:-1;else if(a.__error!==b.__error)return a.__error>b.__error?1:-1;else if(a.__distanceFromCamera!==b.__distanceFromCamera)return a.__distanceFromCamera>b.__distanceFromCamera?-1:1;return 0};const $5a6f7a997885dc30$var$lruPriorityCallback=tile=>1/(tile.__depthFromRenderedParent+1);class $5a6f7a997885dc30$var$TilesRendererBase{get rootTileSet(){const tileSet=this.tileSets[this.rootURL];if(!tileSet||tileSet instanceof Promise)return null;else return tileSet}get root(){const tileSet=this.rootTileSet;return tileSet?tileSet.root:null}constructor(url){this.tileSets={};this.rootURL=url;this.fetchOptions={};this.preprocessURL=null;const lruCache=new $e0d7a242557dc8e6$exports.LRUCache;lruCache.unloadPriorityCallback=$5a6f7a997885dc30$var$lruPriorityCallback;const downloadQueue=new $096d2234d1235002$exports.PriorityQueue;downloadQueue.maxJobs=4;downloadQueue.priorityCallback=$5a6f7a997885dc30$var$priorityCallback;const parseQueue=new $096d2234d1235002$exports.PriorityQueue;parseQueue.maxJobs=1;parseQueue.priorityCallback=$5a6f7a997885dc30$var$priorityCallback;this.lruCache=lruCache;this.downloadQueue=downloadQueue;this.parseQueue=parseQueue;this.stats={parsing:0,downloading:0,failed:0,inFrustum:0,used:0,active:0,visible:0};this.frameCount=0;this.errorTarget=6;this.errorThreshold=Infinity;this.loadSiblings=true;this.displayActiveTiles=false;this.maxDepth=Infinity;this.stopAtEmptyTiles=true}traverse(beforecb,aftercb){const tileSets=this.tileSets;const rootTileSet=tileSets[this.rootURL];if(!rootTileSet||!rootTileSet.root)return;(0,$cd531a5f1c18e9cc$exports.traverseSet)(rootTileSet.root,(tile,...args)=>{this.ensureChildrenArePreprocessed(tile);return beforecb?beforecb(tile,...args):false},aftercb)}update(){const stats=this.stats;const lruCache=this.lruCache;const tileSets=this.tileSets;const rootTileSet=tileSets[this.rootURL];if(!(this.rootURL in tileSets)){this.loadRootTileSet(this.rootURL);return}else if(!rootTileSet||!rootTileSet.root)return;const root=rootTileSet.root;stats.inFrustum=0,stats.used=0,stats.active=0,stats.visible=0,this.frameCount++;(0,$cd531a5f1c18e9cc$exports.determineFrustumSet)(root,this);(0,$cd531a5f1c18e9cc$exports.markUsedSetLeaves)(root,this);(0,$cd531a5f1c18e9cc$exports.skipTraversal)(root,this);(0,$cd531a5f1c18e9cc$exports.toggleTiles)(root,this);lruCache.scheduleUnload()}parseTile(buffer,tile,extension){return null}disposeTile(tile){}preprocessNode(tile,tileSetDir,parentTile=null){if(tile.content){if(!("uri"in tile.content)&&"url"in tile.content){tile.content.uri=tile.content.url;delete tile.content.url}if(tile.content.uri)tile.content.uri=new URL(tile.content.uri,tileSetDir+"/").toString();if(tile.content.boundingVolume&&!("box"in tile.content.boundingVolume||"sphere"in tile.content.boundingVolume||"region"in tile.content.boundingVolume))delete tile.content.boundingVolume}tile.parent=parentTile;tile.children=tile.children||[];const uri=tile.content&&tile.content.uri;if(uri){const extension=(0,$7ff9fb142d83939f$exports.getUrlExtension)(tile.content.uri);const isExternalTileSet=Boolean(extension&&extension.toLowerCase()==="json");tile.__externalTileSet=isExternalTileSet;tile.__contentEmpty=isExternalTileSet}else{tile.__externalTileSet=false;tile.__contentEmpty=true}tile.__distanceFromCamera=Infinity;tile.__error=Infinity;tile.__inFrustum=false;tile.__isLeaf=false;tile.__usedLastFrame=false;tile.__used=false;tile.__wasSetVisible=false;tile.__visible=false;tile.__childrenWereVisible=false;tile.__allChildrenLoaded=false;tile.__wasSetActive=false;tile.__active=false;tile.__loadingState=$002d29a772485791$exports.UNLOADED;tile.__loadIndex=0;tile.__loadAbort=null;tile.__depthFromRenderedParent=-1;if(parentTile===null){tile.__depth=0;tile.refine=tile.refine||"REPLACE"}else{tile.__depth=parentTile.__depth+1;tile.refine=tile.refine||parentTile.refine}tile.__basePath=tileSetDir}setTileActive(tile,state){}setTileVisible(tile,state){}calculateError(tile){return 0}tileInView(tile){return true}ensureChildrenArePreprocessed(tile){const children=tile.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];if("__depth"in child)break;this.preprocessNode(child,tile.__basePath,tile)}}resetFailedTiles(){const stats=this.stats;if(stats.failed===0)return;this.traverse(tile=>{if(tile.__loadingState===$002d29a772485791$exports.FAILED)tile.__loadingState=$002d29a772485791$exports.UNLOADED});stats.failed=0}fetchTileSet(url,fetchOptions,parent=null){return fetch(url,fetchOptions).then(res=>{if(res.ok)return res.json();else throw new Error(`TilesRenderer: Failed to load tileset "${url}" with status ${res.status} : ${res.statusText}`)}).then(json=>{const version=json.asset.version;console.assert(version==="1.0"||version==="0.0","asset.version is expected to be a string of \"1.0\" or \"0.0\"");let basePath=url.replace(/\/[^\/]*\/?$/,"");basePath=new URL(basePath,window.location.href).toString();this.preprocessNode(json.root,basePath,parent);return json})}loadRootTileSet(url){const tileSets=this.tileSets;if(!(url in tileSets)){const pr=this.fetchTileSet(this.preprocessURL?this.preprocessURL(url):url,this.fetchOptions).then(json=>{tileSets[url]=json});pr.catch(err=>{console.error(err);tileSets[url]=err});tileSets[url]=pr;return pr}else if(tileSets[url]instanceof Error)return Promise.reject(tileSets[url]);else return Promise.resolve(tileSets[url])}requestTileContents(tile){if(tile.__loadingState!==$002d29a772485791$exports.UNLOADED)return;const stats=this.stats;const lruCache=this.lruCache;const downloadQueue=this.downloadQueue;const parseQueue=this.parseQueue;const isExternalTileSet=tile.__externalTileSet;lruCache.add(tile,t=>{if(t.__loadingState===$002d29a772485791$exports.LOADING){t.__loadAbort.abort();t.__loadAbort=null}else if(isExternalTileSet)t.children.length=0;else this.disposeTile(t);if(t.__loadingState===$002d29a772485791$exports.LOADING)stats.downloading--;else if(t.__loadingState===$002d29a772485791$exports.PARSING)stats.parsing--;t.__loadingState=$002d29a772485791$exports.UNLOADED;t.__loadIndex++;parseQueue.remove(t);downloadQueue.remove(t)});tile.__loadIndex++;const loadIndex=tile.__loadIndex;const controller=new AbortController;const signal=controller.signal;stats.downloading++;tile.__loadAbort=controller;tile.__loadingState=$002d29a772485791$exports.LOADING;const errorCallback=e=>{if(tile.__loadIndex!==loadIndex)return;if(e.name!=="AbortError"){parseQueue.remove(tile);downloadQueue.remove(tile);if(tile.__loadingState===$002d29a772485791$exports.PARSING)stats.parsing--;else if(tile.__loadingState===$002d29a772485791$exports.LOADING)stats.downloading--;stats.failed++;console.error(`TilesRenderer : Failed to load tile at url "${tile.content.uri}".`);console.error(e);tile.__loadingState=$002d29a772485791$exports.FAILED}else lruCache.remove(tile)};if(isExternalTileSet)downloadQueue.add(tile,tileCb=>{if(tileCb.__loadIndex!==loadIndex)return Promise.resolve();const uri=this.preprocessURL?this.preprocessURL(tileCb.content.uri):tileCb.content.uri;return this.fetchTileSet(uri,Object.assign({signal:signal},this.fetchOptions),tileCb)}).then(json=>{if(tile.__loadIndex!==loadIndex)return;stats.downloading--;tile.__loadAbort=null;tile.__loadingState=$002d29a772485791$exports.LOADED;tile.children.push(json.root)}).catch(errorCallback);else downloadQueue.add(tile,downloadTile=>{if(downloadTile.__loadIndex!==loadIndex)return Promise.resolve();const uri=this.preprocessURL?this.preprocessURL(downloadTile.content.uri):downloadTile.content.uri;return fetch(uri,Object.assign({signal:signal},this.fetchOptions))}).then(res=>{if(tile.__loadIndex!==loadIndex)return;if(res.ok)return res.arrayBuffer();else throw new Error(`Failed to load model with error code ${res.status}`)}).then(buffer=>{if(tile.__loadIndex!==loadIndex)return;stats.downloading--;stats.parsing++;tile.__loadAbort=null;tile.__loadingState=$002d29a772485791$exports.PARSING;return parseQueue.add(tile,parseTile=>{if(parseTile.__loadIndex!==loadIndex)return Promise.resolve();const uri=parseTile.content.uri;const extension=(0,$7ff9fb142d83939f$exports.getUrlExtension)(uri);return this.parseTile(buffer,parseTile,extension)})}).then(()=>{if(tile.__loadIndex!==loadIndex)return;stats.parsing--;tile.__loadingState=$002d29a772485791$exports.LOADED;if(tile.__wasSetVisible)this.setTileVisible(tile,true);if(tile.__wasSetActive)this.setTileActive(tile,true)}).catch(errorCallback)}dispose(){const lruCache=this.lruCache;const toRemove=[];this.traverse(t=>{toRemove.push(t);return false});for(let i=0,l=toRemove.length;i<l;i++)lruCache.remove(toRemove[i]);this.stats={parsing:0,downloading:0,failed:0,inFrustum:0,used:0,active:0,visible:0};this.frameCount=0}}$5a6f7a997885dc30$exports.TilesRendererBase=$5a6f7a997885dc30$var$TilesRendererBase;var $0aa3d1def57e98b1$exports={};"use strict";Object.defineProperty($0aa3d1def57e98b1$exports,"__esModule",{value:true});$0aa3d1def57e98b1$exports.B3DMLoader=void 0;var $f5d9b5dde53306bf$exports={};"use strict";Object.defineProperty($f5d9b5dde53306bf$exports,"__esModule",{value:true});$f5d9b5dde53306bf$exports.B3DMLoaderBase=void 0;var $5bfd2e53a5ab8bef$exports={};"use strict";Object.defineProperty($5bfd2e53a5ab8bef$exports,"__esModule",{value:true});$5bfd2e53a5ab8bef$exports.FeatureTable=$5bfd2e53a5ab8bef$exports.BatchTable=void 0;var $5d480c6739d4b949$exports={};"use strict";Object.defineProperty($5d480c6739d4b949$exports,"__esModule",{value:true});$5d480c6739d4b949$exports.arrayToString=$5d480c6739d4b949$var$arrayToString;function $5d480c6739d4b949$var$arrayToString(array){const utf8decoder=new TextDecoder;return utf8decoder.decode(array)}class $5bfd2e53a5ab8bef$var$FeatureTable{constructor(buffer,start,headerLength,binLength){this.buffer=buffer;this.binOffset=start+headerLength;this.binLength=binLength;let header=null;if(headerLength!==0){const headerData=new Uint8Array(buffer,start,headerLength);header=JSON.parse((0,$5d480c6739d4b949$exports.arrayToString)(headerData))}else header={};this.header=header}getKeys(){return Object.keys(this.header)}getData(key,count,defaultComponentType=null,defaultType=null){const header=this.header;if(!(key in header))return null;const feature=header[key];if(!(feature instanceof Object))return feature;else if(Array.isArray(feature))return feature;else{const{buffer:buffer,binOffset:binOffset,binLength:binLength}=this;const byteOffset=feature.byteOffset||0;const featureType=feature.type||defaultType;const featureComponentType=feature.componentType||defaultComponentType;if("type"in feature&&defaultType&&feature.type!==defaultType)throw new Error("FeatureTable: Specified type does not match expected type.");let stride;switch(featureType){case"SCALAR":stride=1;break;case"VEC2":stride=2;break;case"VEC3":stride=3;break;case"VEC4":stride=4;break;default:throw new Error(`FeatureTable : Feature type not provided for "${key}".`);}let data;const arrayStart=binOffset+byteOffset;const arrayLength=count*stride;switch(featureComponentType){case"BYTE":data=new Int8Array(buffer,arrayStart,arrayLength);break;case"UNSIGNED_BYTE":data=new Uint8Array(buffer,arrayStart,arrayLength);break;case"SHORT":data=new Int16Array(buffer,arrayStart,arrayLength);break;case"UNSIGNED_SHORT":data=new Uint16Array(buffer,arrayStart,arrayLength);break;case"INT":data=new Int32Array(buffer,arrayStart,arrayLength);break;case"UNSIGNED_INT":data=new Uint32Array(buffer,arrayStart,arrayLength);break;case"FLOAT":data=new Float32Array(buffer,arrayStart,arrayLength);break;case"DOUBLE":data=new Float64Array(buffer,arrayStart,arrayLength);break;default:throw new Error(`FeatureTable : Feature component type not provided for "${key}".`);}const dataEnd=arrayStart+arrayLength*data.BYTES_PER_ELEMENT;if(dataEnd>binOffset+binLength)throw new Error("FeatureTable: Feature data read outside binary body length.");return data}}getBuffer(byteOffset,byteLength){const{buffer:buffer,binOffset:binOffset}=this;return buffer.slice(binOffset+byteOffset,binOffset+byteOffset+byteLength)}}$5bfd2e53a5ab8bef$exports.FeatureTable=$5bfd2e53a5ab8bef$var$FeatureTable;class $5bfd2e53a5ab8bef$var$BatchTable extends $5bfd2e53a5ab8bef$var$FeatureTable{constructor(buffer,batchSize,start,headerLength,binLength){super(buffer,start,headerLength,binLength);this.batchSize=batchSize}getData(key,componentType=null,type=null){return super.getData(key,this.batchSize,componentType,type)}}$5bfd2e53a5ab8bef$exports.BatchTable=$5bfd2e53a5ab8bef$var$BatchTable;var $e6b785bba9ea128d$exports={};"use strict";Object.defineProperty($e6b785bba9ea128d$exports,"__esModule",{value:true});$e6b785bba9ea128d$exports.LoaderBase=void 0;class $e6b785bba9ea128d$var$LoaderBase{constructor(){this.fetchOptions={};this.workingPath=""}load(url){return fetch(url,this.fetchOptions).then(res=>{if(!res.ok)throw new Error(`Failed to load file "${url}" with status ${res.status} : ${res.statusText}`);return res.arrayBuffer()}).then(buffer=>{if(this.workingPath==="")this.workingPath=this.workingPathForURL(url);return this.parse(buffer)})}resolveExternalURL(url){if(/^[^\\/]/.test(url))return this.workingPath+"/"+url;else return url}workingPathForURL(url){const splits=url.split(/[\\/]/g);splits.pop();const workingPath=splits.join("/");return workingPath+"/"}parse(buffer){throw new Error("LoaderBase: Parse not implemented.")}}$e6b785bba9ea128d$exports.LoaderBase=$e6b785bba9ea128d$var$LoaderBase;var $9e3e194659cc5776$exports={};"use strict";Object.defineProperty($9e3e194659cc5776$exports,"__esModule",{value:true});$9e3e194659cc5776$exports.readMagicBytes=$9e3e194659cc5776$var$readMagicBytes;function $9e3e194659cc5776$var$readMagicBytes(bufferOrDataView){let view;if(bufferOrDataView instanceof DataView)view=bufferOrDataView;else view=new DataView(bufferOrDataView);if(String.fromCharCode(view.getUint8(0))==="{")return null;let magicBytes="";for(let i=0;i<4;i++)magicBytes+=String.fromCharCode(view.getUint8(i));return magicBytes}class $f5d9b5dde53306bf$var$B3DMLoaderBase extends $e6b785bba9ea128d$exports.LoaderBase{parse(buffer){const dataView=new DataView(buffer);const magic=(0,$9e3e194659cc5776$exports.readMagicBytes)(dataView);console.assert(magic==="b3dm");const version=dataView.getUint32(4,true);console.assert(version===1);const byteLength=dataView.getUint32(8,true);console.assert(byteLength===buffer.byteLength);const featureTableJSONByteLength=dataView.getUint32(12,true);const featureTableBinaryByteLength=dataView.getUint32(16,true);const batchTableJSONByteLength=dataView.getUint32(20,true);const batchTableBinaryByteLength=dataView.getUint32(24,true);const featureTableStart=28;const featureTableBuffer=buffer.slice(featureTableStart,featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength);const featureTable=new $5bfd2e53a5ab8bef$exports.FeatureTable(featureTableBuffer,0,featureTableJSONByteLength,featureTableBinaryByteLength);const batchTableStart=featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength;const batchTableBuffer=buffer.slice(batchTableStart,batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength);const batchTable=new $5bfd2e53a5ab8bef$exports.BatchTable(batchTableBuffer,featureTable.getData("BATCH_LENGTH"),0,batchTableJSONByteLength,batchTableBinaryByteLength);const glbStart=batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength;const glbBytes=new Uint8Array(buffer,glbStart,byteLength-glbStart);return{version:version,featureTable:featureTable,batchTable:batchTable,glbBytes:glbBytes}}}$f5d9b5dde53306bf$exports.B3DMLoaderBase=$f5d9b5dde53306bf$var$B3DMLoaderBase;class $0aa3d1def57e98b1$var$B3DMLoader extends $f5d9b5dde53306bf$exports.B3DMLoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager;this.adjustmentTransform=new $5OpyM$Matrix4}parse(buffer){const b3dm=super.parse(buffer);const gltfBuffer=b3dm.glbBytes.slice().buffer;return new Promise((resolve,reject)=>{const manager=this.manager;const fetchOptions=this.fetchOptions;const loader=manager.getHandler("path.gltf")||new $5OpyM$GLTFLoader(manager);if(fetchOptions.credentials==="include"&&fetchOptions.mode==="cors")loader.setCrossOrigin("use-credentials");if("credentials"in fetchOptions)loader.setWithCredentials(fetchOptions.credentials==="include");if(fetchOptions.headers)loader.setRequestHeader(fetchOptions.headers);let workingPath=this.workingPath;if(!/[\\/]$/.test(workingPath)&&workingPath.length)workingPath+="/";const adjustmentTransform=this.adjustmentTransform;loader.parse(gltfBuffer,workingPath,model=>{const{batchTable:batchTable,featureTable:featureTable}=b3dm;const{scene:scene}=model;const rtcCenter=featureTable.getData("RTC_CENTER");if(rtcCenter){scene.position.x+=rtcCenter[0];scene.position.y+=rtcCenter[1];scene.position.z+=rtcCenter[2]}model.scene.updateMatrix();model.scene.matrix.multiply(adjustmentTransform);model.scene.matrix.decompose(model.scene.position,model.scene.quaternion,model.scene.scale);model.batchTable=batchTable;model.featureTable=featureTable;scene.batchTable=batchTable;scene.featureTable=featureTable;resolve(model)},reject)})}}$0aa3d1def57e98b1$exports.B3DMLoader=$0aa3d1def57e98b1$var$B3DMLoader;var $1ddd6ca16eb224df$exports={};"use strict";Object.defineProperty($1ddd6ca16eb224df$exports,"__esModule",{value:true});$1ddd6ca16eb224df$exports.PNTSLoader=void 0;var $d408eda5a179398a$exports={};"use strict";Object.defineProperty($d408eda5a179398a$exports,"__esModule",{value:true});$d408eda5a179398a$exports.PNTSLoaderBase=void 0;class $d408eda5a179398a$var$PNTSLoaderBase extends $e6b785bba9ea128d$exports.LoaderBase{parse(buffer){const dataView=new DataView(buffer);const magic=(0,$9e3e194659cc5776$exports.readMagicBytes)(dataView);console.assert(magic==="pnts");const version=dataView.getUint32(4,true);console.assert(version===1);const byteLength=dataView.getUint32(8,true);console.assert(byteLength===buffer.byteLength);const featureTableJSONByteLength=dataView.getUint32(12,true);const featureTableBinaryByteLength=dataView.getUint32(16,true);const batchTableJSONByteLength=dataView.getUint32(20,true);const batchTableBinaryByteLength=dataView.getUint32(24,true);const featureTableStart=28;const featureTableBuffer=buffer.slice(featureTableStart,featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength);const featureTable=new $5bfd2e53a5ab8bef$exports.FeatureTable(featureTableBuffer,0,featureTableJSONByteLength,featureTableBinaryByteLength);const batchTableStart=featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength;const batchTableBuffer=buffer.slice(batchTableStart,batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength);const batchTable=new $5bfd2e53a5ab8bef$exports.BatchTable(batchTableBuffer,featureTable.getData("BATCH_LENGTH")||featureTable.getData("POINTS_LENGTH"),0,batchTableJSONByteLength,batchTableBinaryByteLength);return Promise.resolve({version:version,featureTable:featureTable,batchTable:batchTable})}}$d408eda5a179398a$exports.PNTSLoaderBase=$d408eda5a179398a$var$PNTSLoaderBase;const $1ddd6ca16eb224df$var$DRACO_ATTRIBUTE_MAP={RGB:"color",POSITION:"position"};class $1ddd6ca16eb224df$var$PNTSLoader extends $d408eda5a179398a$exports.PNTSLoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager}parse(buffer){return super.parse(buffer).then(async result=>{const{featureTable:featureTable}=result;const material=new $5OpyM$PointsMaterial;const extensions=featureTable.header.extensions;const translationOffset=new $5OpyM$Vector3;let geometry;if(extensions&&extensions["3DTILES_draco_point_compression"]){const{byteOffset:byteOffset,byteLength:byteLength,properties:properties}=extensions["3DTILES_draco_point_compression"];const dracoLoader=this.manager.getHandler("draco.drc");if(dracoLoader==null)throw new Error("PNTSLoader: dracoLoader not available.");const attributeIDs={};for(const key in properties)if(key in $1ddd6ca16eb224df$var$DRACO_ATTRIBUTE_MAP&&key in properties){const mappedKey=$1ddd6ca16eb224df$var$DRACO_ATTRIBUTE_MAP[key];attributeIDs[mappedKey]=properties[key]}const taskConfig={attributeIDs:attributeIDs,attributeTypes:{position:"Float32Array",color:"Uint8Array"},useUniqueIDs:true};const buffer=featureTable.getBuffer(byteOffset,byteLength);geometry=await dracoLoader.decodeGeometry(buffer,taskConfig);if(geometry.attributes.color)material.vertexColors=true}else{const POINTS_LENGTH=featureTable.getData("POINTS_LENGTH");const POSITION=featureTable.getData("POSITION",POINTS_LENGTH,"FLOAT","VEC3");const RGB=featureTable.getData("RGB",POINTS_LENGTH,"UNSIGNED_BYTE","VEC3");const POSITION_QUANTIZED=featureTable.getData("POSITION_QUANTIZED",POINTS_LENGTH,"UNSIGNED_SHORT","VEC3");const QUANTIZED_VOLUME_SCALE=featureTable.getData("QUANTIZED_VOLUME_SCALE",POINTS_LENGTH,"FLOAT","VEC3");const QUANTIZED_VOLUME_OFFSET=featureTable.getData("QUANTIZED_VOLUME_OFFSET",POINTS_LENGTH,"FLOAT","VEC3");geometry=new $5OpyM$BufferGeometry;if(POSITION_QUANTIZED){const decodedPositions=new Float32Array(POINTS_LENGTH*3);for(let i=0;i<POINTS_LENGTH;i++)for(let j=0;j<3;j++){const index=3*i+j;decodedPositions[index]=POSITION_QUANTIZED[index]/65535*QUANTIZED_VOLUME_SCALE[j]}translationOffset.x=QUANTIZED_VOLUME_OFFSET[0];translationOffset.y=QUANTIZED_VOLUME_OFFSET[1];translationOffset.z=QUANTIZED_VOLUME_OFFSET[2];geometry.setAttribute("position",new $5OpyM$BufferAttribute(decodedPositions,3,false))}else geometry.setAttribute("position",new $5OpyM$BufferAttribute(POSITION,3,false));if(RGB!==null){geometry.setAttribute("color",new $5OpyM$BufferAttribute(RGB,3,true));material.vertexColors=true}}["CONSTANT_RGBA","BATCH_LENGTH","RGBA","RGB565","NORMAL","NORMAL_OCT16P"].forEach(feature=>{if(feature in featureTable.header)console.warn(`PNTSLoader: Unsupported FeatureTable feature "${feature}" detected.`)});const object=new $5OpyM$Points(geometry,material);object.position.copy(translationOffset);result.scene=object;result.scene.featureTable=featureTable;const rtcCenter=featureTable.getData("RTC_CENTER");if(rtcCenter){result.scene.position.x+=rtcCenter[0];result.scene.position.y+=rtcCenter[1];result.scene.position.z+=rtcCenter[2]}return result})}}$1ddd6ca16eb224df$exports.PNTSLoader=$1ddd6ca16eb224df$var$PNTSLoader;var $0bc85483bdeca322$exports={};"use strict";Object.defineProperty($0bc85483bdeca322$exports,"__esModule",{value:true});$0bc85483bdeca322$exports.I3DMLoader=void 0;var $bcb352fb74bed4a5$exports={};"use strict";Object.defineProperty($bcb352fb74bed4a5$exports,"__esModule",{value:true});$bcb352fb74bed4a5$exports.I3DMLoaderBase=void 0;class $bcb352fb74bed4a5$var$I3DMLoaderBase extends $e6b785bba9ea128d$exports.LoaderBase{parse(buffer){const dataView=new DataView(buffer);const magic=(0,$9e3e194659cc5776$exports.readMagicBytes)(dataView);console.assert(magic==="i3dm");const version=dataView.getUint32(4,true);console.assert(version===1);const byteLength=dataView.getUint32(8,true);console.assert(byteLength===buffer.byteLength);const featureTableJSONByteLength=dataView.getUint32(12,true);const featureTableBinaryByteLength=dataView.getUint32(16,true);const batchTableJSONByteLength=dataView.getUint32(20,true);const batchTableBinaryByteLength=dataView.getUint32(24,true);const gltfFormat=dataView.getUint32(28,true);const featureTableStart=32;const featureTableBuffer=buffer.slice(featureTableStart,featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength);const featureTable=new $5bfd2e53a5ab8bef$exports.FeatureTable(featureTableBuffer,0,featureTableJSONByteLength,featureTableBinaryByteLength);const batchTableStart=featureTableStart+featureTableJSONByteLength+featureTableBinaryByteLength;const batchTableBuffer=buffer.slice(batchTableStart,batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength);const batchTable=new $5bfd2e53a5ab8bef$exports.BatchTable(batchTableBuffer,featureTable.getData("INSTANCES_LENGTH"),0,batchTableJSONByteLength,batchTableBinaryByteLength);const glbStart=batchTableStart+batchTableJSONByteLength+batchTableBinaryByteLength;const bodyBytes=new Uint8Array(buffer,glbStart,byteLength-glbStart);let glbBytes=null;let promise=null;if(gltfFormat){glbBytes=bodyBytes;promise=Promise.resolve()}else{const externalUri=this.resolveExternalURL((0,$5d480c6739d4b949$exports.arrayToString)(bodyBytes));promise=fetch(externalUri,this.fetchOptions).then(res=>{if(!res.ok)throw new Error(`I3DMLoaderBase : Failed to load file "${externalUri}" with status ${res.status} : ${res.statusText}`);return res.arrayBuffer()}).then(buffer=>{glbBytes=new Uint8Array(buffer)})}return promise.then(()=>{return{version:version,featureTable:featureTable,batchTable:batchTable,glbBytes:glbBytes}})}}$bcb352fb74bed4a5$exports.I3DMLoaderBase=$bcb352fb74bed4a5$var$I3DMLoaderBase;const $0bc85483bdeca322$var$tempFwd=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempUp=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempRight=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempPos=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempQuat=new $5OpyM$Quaternion;const $0bc85483bdeca322$var$tempSca=new $5OpyM$Vector3;const $0bc85483bdeca322$var$tempMat=new $5OpyM$Matrix4;class $0bc85483bdeca322$var$I3DMLoader extends $bcb352fb74bed4a5$exports.I3DMLoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager;this.adjustmentTransform=new $5OpyM$Matrix4}resolveExternalURL(url){return this.manager.resolveURL(super.resolveExternalURL(url))}parse(buffer){return super.parse(buffer).then(i3dm=>{const{featureTable:featureTable,batchTable:batchTable}=i3dm;const gltfBuffer=i3dm.glbBytes.slice().buffer;return new Promise((resolve,reject)=>{const fetchOptions=this.fetchOptions;const manager=this.manager;const loader=manager.getHandler("path.gltf")||new $5OpyM$GLTFLoader(manager);if(fetchOptions.credentials==="include"&&fetchOptions.mode==="cors")loader.setCrossOrigin("use-credentials");if("credentials"in fetchOptions)loader.setWithCredentials(fetchOptions.credentials==="include");if(fetchOptions.headers)loader.setRequestHeader(fetchOptions.headers);let workingPath=this.workingPath;if(!/[\\/]$/.test(workingPath))workingPath+="/";const adjustmentTransform=this.adjustmentTransform;loader.parse(gltfBuffer,workingPath,model=>{const INSTANCES_LENGTH=featureTable.getData("INSTANCES_LENGTH");const POSITION=featureTable.getData("POSITION",INSTANCES_LENGTH,"FLOAT","VEC3");const NORMAL_UP=featureTable.getData("NORMAL_UP",INSTANCES_LENGTH,"FLOAT","VEC3");const NORMAL_RIGHT=featureTable.getData("NORMAL_RIGHT",INSTANCES_LENGTH,"FLOAT","VEC3");const SCALE_NON_UNIFORM=featureTable.getData("SCALE_NON_UNIFORM",INSTANCES_LENGTH,"FLOAT","VEC3");const SCALE=featureTable.getData("SCALE",INSTANCES_LENGTH,"FLOAT","SCALAR");["RTC_CENTER","QUANTIZED_VOLUME_OFFSET","QUANTIZED_VOLUME_SCALE","EAST_NORTH_UP","POSITION_QUANTIZED","NORMAL_UP_OCT32P","NORMAL_RIGHT_OCT32P"].forEach(feature=>{if(feature in featureTable.header)console.warn(`I3DMLoader: Unsupported FeatureTable feature "${feature}" detected.`)});const instanceMap=new Map;const instances=[];model.scene.traverse(child=>{if(child.isMesh){const{geometry:geometry,material:material}=child;const instancedMesh=new $5OpyM$InstancedMesh(geometry,material,INSTANCES_LENGTH);instancedMesh.position.copy(child.position);instancedMesh.rotation.copy(child.rotation);instancedMesh.scale.copy(child.scale);instances.push(instancedMesh);instanceMap.set(child,instancedMesh)}});const averageVector=new $5OpyM$Vector3;for(let i=0;i<INSTANCES_LENGTH;i++){averageVector.x+=POSITION[i*3+0]/INSTANCES_LENGTH;averageVector.y+=POSITION[i*3+1]/INSTANCES_LENGTH;averageVector.z+=POSITION[i*3+2]/INSTANCES_LENGTH}instanceMap.forEach((instancedMesh,mesh)=>{const parent=mesh.parent;if(parent){parent.remove(mesh);parent.add(instancedMesh);instancedMesh.updateMatrixWorld();instancedMesh.position.copy(averageVector).applyMatrix4(instancedMesh.matrixWorld)}});for(let i=0;i<INSTANCES_LENGTH;i++){$0bc85483bdeca322$var$tempPos.set(POSITION[i*3+0]-averageVector.x,POSITION[i*3+1]-averageVector.y,POSITION[i*3+2]-averageVector.z);if(NORMAL_UP){$0bc85483bdeca322$var$tempUp.set(NORMAL_UP[i*3+0],NORMAL_UP[i*3+1],NORMAL_UP[i*3+2]);$0bc85483bdeca322$var$tempRight.set(NORMAL_RIGHT[i*3+0],NORMAL_RIGHT[i*3+1],NORMAL_RIGHT[i*3+2]);$0bc85483bdeca322$var$tempFwd.crossVectors($0bc85483bdeca322$var$tempRight,$0bc85483bdeca322$var$tempUp).normalize();$0bc85483bdeca322$var$tempMat.makeBasis($0bc85483bdeca322$var$tempRight,$0bc85483bdeca322$var$tempUp,$0bc85483bdeca322$var$tempFwd);$0bc85483bdeca322$var$tempQuat.setFromRotationMatrix($0bc85483bdeca322$var$tempMat)}else $0bc85483bdeca322$var$tempQuat.set(0,0,0,1);if(SCALE)$0bc85483bdeca322$var$tempSca.setScalar(SCALE[i]);else if(SCALE_NON_UNIFORM)$0bc85483bdeca322$var$tempSca.set(SCALE_NON_UNIFORM[i*3+0],SCALE_NON_UNIFORM[i*3+1],SCALE_NON_UNIFORM[i*3+2]);else $0bc85483bdeca322$var$tempSca.set(1,1,1);$0bc85483bdeca322$var$tempMat.compose($0bc85483bdeca322$var$tempPos,$0bc85483bdeca322$var$tempQuat,$0bc85483bdeca322$var$tempSca).multiply(adjustmentTransform);for(let j=0,l=instances.length;j<l;j++){const instance=instances[j];instance.setMatrixAt(i,$0bc85483bdeca322$var$tempMat)}}model.batchTable=batchTable;model.featureTable=featureTable;model.scene.batchTable=batchTable;model.scene.featureTable=featureTable;resolve(model)},reject)})})}}$0bc85483bdeca322$exports.I3DMLoader=$0bc85483bdeca322$var$I3DMLoader;var $54879e9a7dc345e0$exports={};"use strict";Object.defineProperty($54879e9a7dc345e0$exports,"__esModule",{value:true});$54879e9a7dc345e0$exports.CMPTLoader=void 0;var $cb66a16334732244$exports={};"use strict";Object.defineProperty($cb66a16334732244$exports,"__esModule",{value:true});$cb66a16334732244$exports.CMPTLoaderBase=void 0;class $cb66a16334732244$var$CMPTLoaderBase extends $e6b785bba9ea128d$exports.LoaderBase{parse(buffer){const dataView=new DataView(buffer);const magic=(0,$9e3e194659cc5776$exports.readMagicBytes)(dataView);console.assert(magic==="cmpt","CMPTLoader: The magic bytes equal \"cmpt\".");const version=dataView.getUint32(4,true);console.assert(version===1,"CMPTLoader: The version listed in the header is \"1\".");const byteLength=dataView.getUint32(8,true);console.assert(byteLength===buffer.byteLength,"CMPTLoader: The contents buffer length listed in the header matches the file.");const tilesLength=dataView.getUint32(12,true);const tiles=[];let offset=16;for(let i=0;i<tilesLength;i++){const tileView=new DataView(buffer,offset,12);const tileMagic=(0,$9e3e194659cc5776$exports.readMagicBytes)(tileView);const tileVersion=tileView.getUint32(4,true);const byteLength=tileView.getUint32(8,true);const tileBuffer=new Uint8Array(buffer,offset,byteLength);tiles.push({type:tileMagic,buffer:tileBuffer,version:tileVersion});offset+=byteLength}return{version:version,tiles:tiles}}}$cb66a16334732244$exports.CMPTLoaderBase=$cb66a16334732244$var$CMPTLoaderBase;class $54879e9a7dc345e0$var$CMPTLoader extends $cb66a16334732244$exports.CMPTLoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager;this.adjustmentTransform=new $5OpyM$Matrix4}parse(buffer){const result=super.parse(buffer);const manager=this.manager;const adjustmentTransform=this.adjustmentTransform;const promises=[];for(const i in result.tiles){const{type:type,buffer:buffer}=result.tiles[i];switch(type){case"b3dm":{const slicedBuffer=buffer.slice();const loader=new $0aa3d1def57e98b1$exports.B3DMLoader(manager);loader.workingPath=this.workingPath;loader.fetchOptions=this.fetchOptions;loader.adjustmentTransform.copy(adjustmentTransform);const promise=loader.parse(slicedBuffer.buffer);promises.push(promise);break}case"pnts":{const slicedBuffer=buffer.slice();const loader=new $1ddd6ca16eb224df$exports.PNTSLoader(manager);loader.workingPath=this.workingPath;loader.fetchOptions=this.fetchOptions;const promise=loader.parse(slicedBuffer.buffer);promises.push(promise);break}case"i3dm":{const slicedBuffer=buffer.slice();const loader=new $0bc85483bdeca322$exports.I3DMLoader(manager);loader.workingPath=this.workingPath;loader.fetchOptions=this.fetchOptions;loader.adjustmentTransform.copy(adjustmentTransform);const promise=loader.parse(slicedBuffer.buffer);promises.push(promise);break}}}return Promise.all(promises).then(results=>{const group=new $5OpyM$Group;results.forEach(result=>{group.add(result.scene)});return{tiles:results,scene:group}})}}$54879e9a7dc345e0$exports.CMPTLoader=$54879e9a7dc345e0$var$CMPTLoader;var $29ced67d26e5c4e2$exports={};"use strict";Object.defineProperty($29ced67d26e5c4e2$exports,"__esModule",{value:true});$29ced67d26e5c4e2$exports.GLTFExtensionLoader=void 0;var $44c3bffa5e49f297$exports={};"use strict";Object.defineProperty($44c3bffa5e49f297$exports,"__esModule",{value:true});$44c3bffa5e49f297$exports.GLTFCesiumRTCExtension=void 0;class $44c3bffa5e49f297$var$GLTFCesiumRTCExtension{constructor(){this.name="CESIUM_RTC"}afterRoot(res){if(res.parser.json.extensions&&res.parser.json.extensions.CESIUM_RTC){const{center:center}=res.parser.json.extensions.CESIUM_RTC;if(center){res.scene.position.x+=center[0];res.scene.position.y+=center[1];res.scene.position.z+=center[2]}}}}$44c3bffa5e49f297$exports.GLTFCesiumRTCExtension=$44c3bffa5e49f297$var$GLTFCesiumRTCExtension;class $29ced67d26e5c4e2$var$GLTFExtensionLoader extends $e6b785bba9ea128d$exports.LoaderBase{constructor(manager=$5OpyM$DefaultLoadingManager){super();this.manager=manager}parse(buffer){return new Promise((resolve,reject)=>{const manager=this.manager;const fetchOptions=this.fetchOptions;let loader=manager.getHandler("path.gltf")||manager.getHandler("path.glb");if(!loader){loader=new $5OpyM$GLTFLoader(manager);loader.register(()=>new $44c3bffa5e49f297$exports.GLTFCesiumRTCExtension);if(fetchOptions.credentials==="include"&&fetchOptions.mode==="cors")loader.setCrossOrigin("use-credentials");if("credentials"in fetchOptions)loader.setWithCredentials(fetchOptions.credentials==="include");if(fetchOptions.headers)loader.setRequestHeader(fetchOptions.headers)}let resourcePath=loader.resourcePath||loader.path||this.workingPath;if(!/[\\/]$/.test(resourcePath)&&resourcePath.length)resourcePath+="/";loader.parse(buffer,resourcePath,model=>{resolve(model)},reject)})}}$29ced67d26e5c4e2$exports.GLTFExtensionLoader=$29ced67d26e5c4e2$var$GLTFExtensionLoader;var $3fcce8a4f74b2abc$exports={};"use strict";Object.defineProperty($3fcce8a4f74b2abc$exports,"__esModule",{value:true});$3fcce8a4f74b2abc$exports.TilesGroup=void 0;const $3fcce8a4f74b2abc$var$tempMat=new $5OpyM$Matrix4;class $3fcce8a4f74b2abc$var$TilesGroup extends $5OpyM$Group{constructor(tilesRenderer){super();this.name="TilesRenderer.TilesGroup";this.tilesRenderer=tilesRenderer}raycast(raycaster,intersects){if(this.tilesRenderer.optimizeRaycast)this.tilesRenderer.raycast(raycaster,intersects)}updateMatrixWorld(force){if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldNeedsUpdate||force){if(this.parent===null)$3fcce8a4f74b2abc$var$tempMat.copy(this.matrix);else $3fcce8a4f74b2abc$var$tempMat.multiplyMatrices(this.parent.matrixWorld,this.matrix);this.matrixWorldNeedsUpdate=false;const elA=$3fcce8a4f74b2abc$var$tempMat.elements;const elB=this.matrixWorld.elements;let isDifferent=false;for(let i=0;i<16;i++){const itemA=elA[i];const itemB=elB[i];const diff=Math.abs(itemA-itemB);if(diff>Number.EPSILON){isDifferent=true;break}}if(isDifferent){this.matrixWorld.copy($3fcce8a4f74b2abc$var$tempMat);const children=this.children;for(let i=0,l=children.length;i<l;i++)children[i].updateMatrixWorld()}}}}$3fcce8a4f74b2abc$exports.TilesGroup=$3fcce8a4f74b2abc$var$TilesGroup;var $c1ac95a1e8efcc86$exports={};"use strict";Object.defineProperty($c1ac95a1e8efcc86$exports,"__esModule",{value:true});$c1ac95a1e8efcc86$exports.raycastTraverse=$c1ac95a1e8efcc86$var$raycastTraverse;$c1ac95a1e8efcc86$exports.raycastTraverseFirstHit=$c1ac95a1e8efcc86$var$raycastTraverseFirstHit;const $c1ac95a1e8efcc86$var$_mat=new $5OpyM$Matrix4;const $c1ac95a1e8efcc86$var$_localRay=new $5OpyM$Ray;const $c1ac95a1e8efcc86$var$_vec=new $5OpyM$Vector3;const $c1ac95a1e8efcc86$var$_hitArray=[];function $c1ac95a1e8efcc86$var$distanceSort(a,b){return a.distance-b.distance}function $c1ac95a1e8efcc86$var$intersectTileScene(scene,raycaster,intersects){scene.traverse(c=>{Object.getPrototypeOf(c).raycast.call(c,raycaster,intersects)})}function $c1ac95a1e8efcc86$var$intersectTileSceneFirstHist(scene,raycaster){$c1ac95a1e8efcc86$var$intersectTileScene(scene,raycaster,$c1ac95a1e8efcc86$var$_hitArray);$c1ac95a1e8efcc86$var$_hitArray.sort($c1ac95a1e8efcc86$var$distanceSort);const hit=$c1ac95a1e8efcc86$var$_hitArray[0]||null;$c1ac95a1e8efcc86$var$_hitArray.length=0;return hit}function $c1ac95a1e8efcc86$var$raycastTraverseFirstHit(renderer,tile,raycaster,localRay=null){const{group:group,activeTiles:activeTiles}=renderer;renderer.ensureChildrenArePreprocessed(tile);if(localRay===null){localRay=$c1ac95a1e8efcc86$var$_localRay;$c1ac95a1e8efcc86$var$_mat.copy(group.matrixWorld).invert();localRay.copy(raycaster.ray).applyMatrix4($c1ac95a1e8efcc86$var$_mat)}const array=[];const children=tile.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];if(!child.__used)continue;const boundingVolume=child.cached.boundingVolume;if(boundingVolume.intersectRay(localRay,$c1ac95a1e8efcc86$var$_vec)!==null){$c1ac95a1e8efcc86$var$_vec.applyMatrix4(group.matrixWorld);array.push({distance:$c1ac95a1e8efcc86$var$_vec.distanceToSquared(raycaster.ray.origin),tile:child})}}array.sort($c1ac95a1e8efcc86$var$distanceSort);let bestHit=null;let bestHitDistSq=Infinity;if(activeTiles.has(tile)){const hit=$c1ac95a1e8efcc86$var$intersectTileSceneFirstHist(tile.cached.scene,raycaster);if(hit){bestHit=hit;bestHitDistSq=hit.distance*hit.distance}}for(let i=0,l=array.length;i<l;i++){const data=array[i];const boundingVolumeDistSq=data.distance;const tile=data.tile;if(boundingVolumeDistSq>bestHitDistSq)break;const hit=$c1ac95a1e8efcc86$var$raycastTraverseFirstHit(renderer,tile,raycaster,localRay);if(hit){const hitDistSq=hit.distance*hit.distance;if(hitDistSq<bestHitDistSq){bestHit=hit;bestHitDistSq=hitDistSq}}}return bestHit}function $c1ac95a1e8efcc86$var$raycastTraverse(renderer,tile,raycaster,intersects,localRay=null){const{group:group,activeTiles:activeTiles}=renderer;const{scene:scene,boundingVolume:boundingVolume}=tile.cached;renderer.ensureChildrenArePreprocessed(tile);if(localRay===null){localRay=$c1ac95a1e8efcc86$var$_localRay;$c1ac95a1e8efcc86$var$_mat.copy(group.matrixWorld).invert();localRay.copy(raycaster.ray).applyMatrix4($c1ac95a1e8efcc86$var$_mat)}if(!tile.__used||!boundingVolume.intersectsRay(localRay))return;if(activeTiles.has(tile))$c1ac95a1e8efcc86$var$intersectTileScene(scene,raycaster,intersects);const children=tile.children;for(let i=0,l=children.length;i<l;i++)$c1ac95a1e8efcc86$var$raycastTraverse(renderer,children[i],raycaster,intersects,localRay)}var $163be4c04da1c269$exports={};"use strict";Object.defineProperty($163be4c04da1c269$exports,"__esModule",{value:true});$163be4c04da1c269$exports.TileBoundingVolume=void 0;var $9e13f7da58b2928b$exports={};"use strict";Object.defineProperty($9e13f7da58b2928b$exports,"__esModule",{value:true});$9e13f7da58b2928b$exports.OBB=void 0;class $9e13f7da58b2928b$var$OBB{constructor(box=new $5OpyM$Box3,transform=new $5OpyM$Matrix4){this.box=box.clone();this.transform=transform.clone();this.inverseTransform=new $5OpyM$Matrix4;this.points=new Array(8).fill().map(()=>new $5OpyM$Vector3)}update(){const{points:points,inverseTransform:inverseTransform,transform:transform,box:box}=this;inverseTransform.copy(transform).invert();const{min:min,max:max}=box;let index=0;for(let x=-1;x<=1;x+=2){for(let y=-1;y<=1;y+=2)for(let z=-1;z<=1;z+=2){points[index].set(x<0?min.x:max.x,y<0?min.y:max.y,z<0?min.z:max.z).applyMatrix4(transform);index++}}}intersectsFrustum(frustum){const{points:points}=this;const{planes:planes}=frustum;for(let i=0;i<6;i++){const plane=planes[i];let maxDistance=-Infinity;for(let j=0;j<8;j++){const v=points[j];const dist=plane.distanceToPoint(v);maxDistance=maxDistance<dist?dist:maxDistance}if(maxDistance<0)return false}return true}}$9e13f7da58b2928b$exports.OBB=$9e13f7da58b2928b$var$OBB;var $aa7b3b269f245cbe$exports={};"use strict";Object.defineProperty($aa7b3b269f245cbe$exports,"__esModule",{value:true});$aa7b3b269f245cbe$exports.EllipsoidRegion=void 0;var $9160f8f2e0578e98$exports={};"use strict";Object.defineProperty($9160f8f2e0578e98$exports,"__esModule",{value:true});$9160f8f2e0578e98$exports.Ellipsoid=void 0;var $1hGdn=parcelRequire("1hGdn");const $9160f8f2e0578e98$var$_spherical=new $5OpyM$Spherical;const $9160f8f2e0578e98$var$_norm=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vec=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vec2=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vec3=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vecX=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vecY=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_vecZ=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$_pos=new $5OpyM$Vector3;const $9160f8f2e0578e98$var$EPSILON12=1e-12;const $9160f8f2e0578e98$var$CENTER_EPS=0.1;class $9160f8f2e0578e98$var$Ellipsoid{constructor(x=1,y=1,z=1){this.radius=new $5OpyM$Vector3(x,y,z)}constructLatLonFrame(lat,lon,target){this.getCartographicToPosition(lat,lon,0,$9160f8f2e0578e98$var$_pos);this.getCartographicToNormal(lat,lon,$9160f8f2e0578e98$var$_vecZ);this.getNorthernTangent(lat,lon,$9160f8f2e0578e98$var$_vecY);$9160f8f2e0578e98$var$_vecX.crossVectors($9160f8f2e0578e98$var$_vecY,$9160f8f2e0578e98$var$_vecZ);return target.makeBasis($9160f8f2e0578e98$var$_vecX,$9160f8f2e0578e98$var$_vecY,$9160f8f2e0578e98$var$_vecZ).setPosition($9160f8f2e0578e98$var$_pos)}getNorthernTangent(lat,lon,target,westTarget=$9160f8f2e0578e98$var$_vec3){let multiplier=1;let latPrime=lat+1e-7;if(lat>Math.PI/4){multiplier=-1;latPrime=lat-1e-7}const norm=this.getCartographicToNormal(lat,lon,$9160f8f2e0578e98$var$_vec).normalize();const normPrime=this.getCartographicToNormal(latPrime,lon,$9160f8f2e0578e98$var$_vec2).normalize();westTarget.crossVectors(norm,normPrime).normalize().multiplyScalar(multiplier);return target.crossVectors(westTarget,norm).normalize()}getCartographicToPosition(lat,lon,height,target){this.getCartographicToNormal(lat,lon,$9160f8f2e0578e98$var$_norm);const radius=this.radius;$9160f8f2e0578e98$var$_vec.copy($9160f8f2e0578e98$var$_norm);$9160f8f2e0578e98$var$_vec.x*=radius.x**2;$9160f8f2e0578e98$var$_vec.y*=radius.y**2;$9160f8f2e0578e98$var$_vec.z*=radius.z**2;const gamma=Math.sqrt($9160f8f2e0578e98$var$_norm.dot($9160f8f2e0578e98$var$_vec));$9160f8f2e0578e98$var$_vec.divideScalar(gamma);return target.copy($9160f8f2e0578e98$var$_vec).addScaledVector($9160f8f2e0578e98$var$_norm,height)}getPositionToCartographic(pos,target){this.getPositionToSurfacePoint(pos,$9160f8f2e0578e98$var$_vec);this.getPositionToNormal(pos,$9160f8f2e0578e98$var$_norm);const heightDelta=$9160f8f2e0578e98$var$_vec2.subVectors(pos,$9160f8f2e0578e98$var$_vec);target.lon=Math.atan2($9160f8f2e0578e98$var$_norm.y,$9160f8f2e0578e98$var$_norm.x);target.lat=Math.asin($9160f8f2e0578e98$var$_norm.z);target.height=Math.sign(heightDelta.dot(pos))*heightDelta.length();return target}getCartographicToNormal(lat,lon,target){$9160f8f2e0578e98$var$_spherical.set(1,(0,$1hGdn.latitudeToSphericalPhi)(lat),lon);target.setFromSpherical($9160f8f2e0578e98$var$_spherical).normalize();(0,$1hGdn.swapToGeoFrame)(target);return target}getPositionToNormal(pos,target){const radius=this.radius;target.copy(pos);target.x/=radius.x**2;target.y/=radius.y**2;target.z/=radius.z**2;target.normalize();return target}getPositionToSurfacePoint(pos,target){const radius=this.radius;const invRadiusSqX=1/radius.x**2;const invRadiusSqY=1/radius.y**2;const invRadiusSqZ=1/radius.z**2;const x2=pos.x*pos.x*invRadiusSqX;const y2=pos.y*pos.y*invRadiusSqY;const z2=pos.z*pos.z*invRadiusSqZ;const squaredNorm=x2+y2+z2;const ratio=Math.sqrt(1/squaredNorm);const intersection=$9160f8f2e0578e98$var$_vec.copy(pos).multiplyScalar(ratio);if(squaredNorm<$9160f8f2e0578e98$var$CENTER_EPS)return!isFinite(ratio)?null:target.copy(intersection);const gradient=$9160f8f2e0578e98$var$_vec2.set(intersection.x*invRadiusSqX*2,intersection.y*invRadiusSqY*2,intersection.z*invRadiusSqZ*2);let lambda=(1-ratio)*pos.length()/(0.5*gradient.length());let correction=0;let func,denominator;let xMultiplier,yMultiplier,zMultiplier;let xMultiplier2,yMultiplier2,zMultiplier2;let xMultiplier3,yMultiplier3,zMultiplier3;do{lambda-=correction;xMultiplier=1/(1+lambda*invRadiusSqX);yMultiplier=1/(1+lambda*invRadiusSqY);zMultiplier=1/(1+lambda*invRadiusSqZ);xMultiplier2=xMultiplier*xMultiplier;yMultiplier2=yMultiplier*yMultiplier;zMultiplier2=zMultiplier*zMultiplier;xMultiplier3=xMultiplier2*xMultiplier;yMultiplier3=yMultiplier2*yMultiplier;zMultiplier3=zMultiplier2*zMultiplier;func=x2*xMultiplier2+y2*yMultiplier2+z2*zMultiplier2-1;denominator=x2*xMultiplier3*invRadiusSqX+y2*yMultiplier3*invRadiusSqY+z2*zMultiplier3*invRadiusSqZ;const derivative=-2*denominator;correction=func/derivative}while(Math.abs(func)>$9160f8f2e0578e98$var$EPSILON12);return target.set(pos.x*xMultiplier,pos.y*yMultiplier,pos.z*zMultiplier)}}$9160f8f2e0578e98$exports.Ellipsoid=$9160f8f2e0578e98$var$Ellipsoid;const $aa7b3b269f245cbe$var$PI=Math.PI;const $aa7b3b269f245cbe$var$HALF_PI=$aa7b3b269f245cbe$var$PI/2;const $aa7b3b269f245cbe$var$_orthoX=new $5OpyM$Vector3;const $aa7b3b269f245cbe$var$_orthoY=new $5OpyM$Vector3;const $aa7b3b269f245cbe$var$_orthoZ=new $5OpyM$Vector3;const $aa7b3b269f245cbe$var$_invMatrix=new $5OpyM$Matrix4;let $aa7b3b269f245cbe$var$_poolIndex=0;const $aa7b3b269f245cbe$var$_pointsPool=[];function $aa7b3b269f245cbe$var$getVector(usePool=false){if(!usePool)return new $5OpyM$Vector3;if(!$aa7b3b269f245cbe$var$_pointsPool[$aa7b3b269f245cbe$var$_poolIndex])$aa7b3b269f245cbe$var$_pointsPool[$aa7b3b269f245cbe$var$_poolIndex]=new $5OpyM$Vector3;$aa7b3b269f245cbe$var$_poolIndex++;return $aa7b3b269f245cbe$var$_pointsPool[$aa7b3b269f245cbe$var$_poolIndex-1]}function $aa7b3b269f245cbe$var$resetPool(){$aa7b3b269f245cbe$var$_poolIndex=0}class $aa7b3b269f245cbe$var$EllipsoidRegion extends $9160f8f2e0578e98$exports.Ellipsoid{constructor(x,y,z,latStart=-$aa7b3b269f245cbe$var$HALF_PI,latEnd=$aa7b3b269f245cbe$var$HALF_PI,lonStart=0,lonEnd=2*$aa7b3b269f245cbe$var$PI,heightStart=0,heightEnd=0){super(x,y,z);this.latStart=latStart;this.latEnd=latEnd;this.lonStart=lonStart;this.lonEnd=lonEnd;this.heightStart=heightStart;this.heightEnd=heightEnd}_getPoints(usePool=false){const{latStart:latStart,latEnd:latEnd,lonStart:lonStart,lonEnd:lonEnd,heightStart:heightStart,heightEnd:heightEnd}=this;const midLat=$5OpyM$MathUtils.mapLinear(0.5,0,1,latStart,latEnd);const midLon=$5OpyM$MathUtils.mapLinear(0.5,0,1,lonStart,lonEnd);const lonOffset=Math.floor(lonStart/$aa7b3b269f245cbe$var$HALF_PI)*$aa7b3b269f245cbe$var$HALF_PI;const latlon=[[-$aa7b3b269f245cbe$var$PI/2,0],[$aa7b3b269f245cbe$var$PI/2,0],[0,lonOffset],[0,lonOffset+$aa7b3b269f245cbe$var$PI/2],[0,lonOffset+$aa7b3b269f245cbe$var$PI],[0,lonOffset+3*$aa7b3b269f245cbe$var$PI/2],[latStart,lonEnd],[latEnd,lonEnd],[latStart,lonStart],[latEnd,lonStart],[0,lonStart],[0,lonEnd],[midLat,midLon],[latStart,midLon],[latEnd,midLon],[midLat,lonStart],[midLat,lonEnd]];const target=[];const total=latlon.length;for(let z=0;z<=1;z++){const height=$5OpyM$MathUtils.mapLinear(z,0,1,heightStart,heightEnd);for(let i=0,l=total;i<l;i++){const[lat,lon]=latlon[i];if(lat>=latStart&&lat<=latEnd&&lon>=lonStart&&lon<=lonEnd){const v=$aa7b3b269f245cbe$var$getVector(usePool);target.push(v);this.getCartographicToPosition(lat,lon,height,v)}}}return target}getBoundingBox(box,matrix){$aa7b3b269f245cbe$var$resetPool();const{latStart:latStart,latEnd:latEnd,lonStart:lonStart,lonEnd:lonEnd}=this;const latRange=latEnd-latStart;if(latRange<$aa7b3b269f245cbe$var$PI/2){const midLat=$5OpyM$MathUtils.mapLinear(0.5,0,1,latStart,latEnd);const midLon=$5OpyM$MathUtils.mapLinear(0.5,0,1,lonStart,lonEnd);this.getCartographicToNormal(midLat,midLon,$aa7b3b269f245cbe$var$_orthoZ);$aa7b3b269f245cbe$var$_orthoY.set(0,0,1);$aa7b3b269f245cbe$var$_orthoX.crossVectors($aa7b3b269f245cbe$var$_orthoY,$aa7b3b269f245cbe$var$_orthoZ);$aa7b3b269f245cbe$var$_orthoY.crossVectors($aa7b3b269f245cbe$var$_orthoX,$aa7b3b269f245cbe$var$_orthoZ);matrix.makeBasis($aa7b3b269f245cbe$var$_orthoX,$aa7b3b269f245cbe$var$_orthoY,$aa7b3b269f245cbe$var$_orthoZ)}else{$aa7b3b269f245cbe$var$_orthoX.set(1,0,0);$aa7b3b269f245cbe$var$_orthoY.set(0,1,0);$aa7b3b269f245cbe$var$_orthoZ.set(0,0,1);matrix.makeBasis($aa7b3b269f245cbe$var$_orthoX,$aa7b3b269f245cbe$var$_orthoY,$aa7b3b269f245cbe$var$_orthoZ)}$aa7b3b269f245cbe$var$_invMatrix.copy(matrix).invert();const points=this._getPoints(true);for(let i=0,l=points.length;i<l;i++)points[i].applyMatrix4($aa7b3b269f245cbe$var$_invMatrix);box.makeEmpty();box.setFromPoints(points)}getBoundingSphere(sphere,center){$aa7b3b269f245cbe$var$resetPool();const points=this._getPoints(true);sphere.makeEmpty();sphere.setFromPoints(points,center)}}$aa7b3b269f245cbe$exports.EllipsoidRegion=$aa7b3b269f245cbe$var$EllipsoidRegion;const $163be4c04da1c269$var$_vecX=new $5OpyM$Vector3;const $163be4c04da1c269$var$_vecY=new $5OpyM$Vector3;const $163be4c04da1c269$var$_vecZ=new $5OpyM$Vector3;const $163be4c04da1c269$var$_vec=new $5OpyM$Vector3;const $163be4c04da1c269$var$_sphereVec=new $5OpyM$Vector3;const $163be4c04da1c269$var$_obbVec=new $5OpyM$Vector3;const $163be4c04da1c269$var$_ray=new $5OpyM$Ray;class $163be4c04da1c269$var$TileBoundingVolume{constructor(){this.sphere=null;this.obb=null;this.region=null;this.regionObb=null}intersectsRay(ray){const sphere=this.sphere;const obb=this.obb||this.regionObb;if(sphere&&!ray.intersectsSphere(sphere))return false;if(obb){$163be4c04da1c269$var$_ray.copy(ray).applyMatrix4(obb.inverseTransform);if(!$163be4c04da1c269$var$_ray.intersectsBox(obb.box))return false}return true}intersectRay(ray,target=null){const sphere=this.sphere;const obb=this.obb||this.regionObb;let sphereDistSq=-Infinity;let obbDistSq=-Infinity;if(sphere){if(ray.intersectSphere(sphere,$163be4c04da1c269$var$_sphereVec))sphereDistSq=sphere.containsPoint(ray.origin)?0:ray.origin.distanceToSquared($163be4c04da1c269$var$_sphereVec)}if(obb){$163be4c04da1c269$var$_ray.copy(ray).applyMatrix4(obb.inverseTransform);if($163be4c04da1c269$var$_ray.intersectBox(obb.box,$163be4c04da1c269$var$_obbVec))obbDistSq=obb.box.containsPoint($163be4c04da1c269$var$_ray.origin)?0:$163be4c04da1c269$var$_ray.origin.distanceToSquared($163be4c04da1c269$var$_obbVec)}const furthestDist=Math.max(sphereDistSq,obbDistSq);if(furthestDist===-Infinity)return null;ray.at(Math.sqrt(furthestDist),target);return target}distanceToPoint(point){const sphere=this.sphere;const obb=this.obb||this.regionObb;let sphereDistance=-Infinity;let obbDistance=-Infinity;if(sphere)sphereDistance=Math.max(sphere.distanceToPoint(point),0);if(obb){$163be4c04da1c269$var$_vec.copy(point).applyMatrix4(obb.inverseTransform);obbDistance=obb.box.distanceToPoint($163be4c04da1c269$var$_vec)}return sphereDistance>obbDistance?sphereDistance:obbDistance}intersectsFrustum(frustum){const obb=this.obb||this.regionObb;const sphere=this.sphere;if(sphere&&!frustum.intersectsSphere(sphere))return false;if(obb&&!obb.intersectsFrustum(frustum))return false;return Boolean(sphere||obb)}getOBB(targetBox,targetMatrix){const obb=this.obb||this.regionObb;if(obb){targetBox.copy(obb.box);targetMatrix.copy(obb.transform)}else{this.getAABB(targetBox);targetMatrix.identity()}}getAABB(target){if(this.sphere)this.sphere.getBoundingBox(target);else{const obb=this.obb||this.regionObb;target.copy(obb.box).applyMatrix4(obb.transform)}}getSphere(target){if(this.sphere)target.copy(this.sphere);else if(this.region)this.region.getBoundingSphere(target);else{const obb=this.obb||this.regionObb;obb.box.getBoundingSphere(target);target.applyMatrix4(obb.transform)}}setObbData(data,transform){const obb=new $9e13f7da58b2928b$exports.OBB;$163be4c04da1c269$var$_vecX.set(data[3],data[4],data[5]);$163be4c04da1c269$var$_vecY.set(data[6],data[7],data[8]);$163be4c04da1c269$var$_vecZ.set(data[9],data[10],data[11]);const scaleX=$163be4c04da1c269$var$_vecX.length();const scaleY=$163be4c04da1c269$var$_vecY.length();const scaleZ=$163be4c04da1c269$var$_vecZ.length();$163be4c04da1c269$var$_vecX.normalize();$163be4c04da1c269$var$_vecY.normalize();$163be4c04da1c269$var$_vecZ.normalize();if(scaleX===0)$163be4c04da1c269$var$_vecX.crossVectors($163be4c04da1c269$var$_vecY,$163be4c04da1c269$var$_vecZ);if(scaleY===0)$163be4c04da1c269$var$_vecY.crossVectors($163be4c04da1c269$var$_vecX,$163be4c04da1c269$var$_vecZ);if(scaleZ===0)$163be4c04da1c269$var$_vecZ.crossVectors($163be4c04da1c269$var$_vecX,$163be4c04da1c269$var$_vecY);obb.transform.set($163be4c04da1c269$var$_vecX.x,$163be4c04da1c269$var$_vecY.x,$163be4c04da1c269$var$_vecZ.x,data[0],$163be4c04da1c269$var$_vecX.y,$163be4c04da1c269$var$_vecY.y,$163be4c04da1c269$var$_vecZ.y,data[1],$163be4c04da1c269$var$_vecX.z,$163be4c04da1c269$var$_vecY.z,$163be4c04da1c269$var$_vecZ.z,data[2],0,0,0,1).premultiply(transform);obb.box.min.set(-scaleX,-scaleY,-scaleZ);obb.box.max.set(scaleX,scaleY,scaleZ);obb.update();this.obb=obb}setSphereData(x,y,z,radius,transform){const sphere=new $5OpyM$Sphere;sphere.center.set(x,y,z);sphere.radius=radius;sphere.applyMatrix4(transform);this.sphere=sphere}setRegionData(west,south,east,north,minHeight,maxHeight){const region=new $aa7b3b269f245cbe$exports.EllipsoidRegion($002d29a772485791$exports.WGS84_RADIUS,$002d29a772485791$exports.WGS84_RADIUS,$002d29a772485791$exports.WGS84_HEIGHT,south,north,west,east,minHeight,maxHeight);const obb=new $9e13f7da58b2928b$exports.OBB;region.getBoundingBox(obb.box,obb.transform);obb.update();this.region=region;this.regionObb=obb}}$163be4c04da1c269$exports.TileBoundingVolume=$163be4c04da1c269$var$TileBoundingVolume;const $06d26e8e9f5361d3$var$INITIAL_FRUSTUM_CULLED=Symbol("INITIAL_FRUSTUM_CULLED");const $06d26e8e9f5361d3$var$tempMat=new $5OpyM$Matrix4;const $06d26e8e9f5361d3$var$tempMat2=new $5OpyM$Matrix4;const $06d26e8e9f5361d3$var$tempVector=new $5OpyM$Vector3;const $06d26e8e9f5361d3$var$X_AXIS=new $5OpyM$Vector3(1,0,0);const $06d26e8e9f5361d3$var$Y_AXIS=new $5OpyM$Vector3(0,1,0);function $06d26e8e9f5361d3$var$updateFrustumCulled(object,toInitialValue){object.traverse(c=>{c.frustumCulled=c[$06d26e8e9f5361d3$var$INITIAL_FRUSTUM_CULLED]&&toInitialValue})}class $06d26e8e9f5361d3$var$TilesRenderer extends $5a6f7a997885dc30$exports.TilesRendererBase{get autoDisableRendererCulling(){return this._autoDisableRendererCulling}set autoDisableRendererCulling(value){if(this._autoDisableRendererCulling!==value){super._autoDisableRendererCulling=value;this.forEachLoadedModel(scene=>{$06d26e8e9f5361d3$var$updateFrustumCulled(scene,!value)})}}constructor(...args){super(...args);this.group=new $3fcce8a4f74b2abc$exports.TilesGroup(this);this.cameras=[];this.cameraMap=new Map;this.cameraInfo=[];this.activeTiles=new Set;this.visibleTiles=new Set;this._autoDisableRendererCulling=true;this.optimizeRaycast=true;this.onLoadTileSet=null;this.onLoadModel=null;this.onDisposeModel=null;this.onTileVisibilityChange=null;const manager=new $5OpyM$LoadingManager;manager.setURLModifier(url=>{if(this.preprocessURL)return this.preprocessURL(url);else return url});this.manager=manager;const tilesRenderer=this;this._overridenRaycast=function(raycaster,intersects){if(!tilesRenderer.optimizeRaycast)Object.getPrototypeOf(this).raycast.call(this,raycaster,intersects)}}getBounds(target){if(!this.root)return false;const boundingVolume=this.root.cached.boundingVolume;if(boundingVolume){boundingVolume.getAABB(target);return true}else return true}getOrientedBounds(targetBox,targetMatrix){if(!this.root)return false;const boundingVolume=this.root.cached.boundingVolume;if(boundingVolume){boundingVolume.getOBB(targetBox,targetMatrix);return true}else return true}getBoundingSphere(target){if(!this.root)return false;const boundingVolume=this.root.cached.boundingVolume;if(boundingVolume){boundingVolume.getSphere(target);return true}else return false}forEachLoadedModel(callback){this.traverse(tile=>{const scene=tile.cached.scene;if(scene)callback(scene,tile)})}raycast(raycaster,intersects){if(!this.root)return;if(raycaster.firstHitOnly){const hit=(0,$c1ac95a1e8efcc86$exports.raycastTraverseFirstHit)(this,this.root,raycaster);if(hit)intersects.push(hit)}else(0,$c1ac95a1e8efcc86$exports.raycastTraverse)(this,this.root,raycaster,intersects)}hasCamera(camera){return this.cameraMap.has(camera)}setCamera(camera){const cameras=this.cameras;const cameraMap=this.cameraMap;if(!cameraMap.has(camera)){cameraMap.set(camera,new $5OpyM$Vector2);cameras.push(camera);return true}return false}setResolution(camera,xOrVec,y){const cameraMap=this.cameraMap;if(!cameraMap.has(camera))return false;if(xOrVec instanceof $5OpyM$Vector2)cameraMap.get(camera).copy(xOrVec);else cameraMap.get(camera).set(xOrVec,y);return true}setResolutionFromRenderer(camera,renderer){const cameraMap=this.cameraMap;if(!cameraMap.has(camera))return false;const resolution=cameraMap.get(camera);renderer.getSize(resolution);resolution.multiplyScalar(renderer.getPixelRatio());return true}deleteCamera(camera){const cameras=this.cameras;const cameraMap=this.cameraMap;if(cameraMap.has(camera)){const index=cameras.indexOf(camera);cameras.splice(index,1);cameraMap.delete(camera);return true}return false}fetchTileSet(url,...rest){const pr=super.fetchTileSet(url,...rest);pr.then(json=>{if(this.onLoadTileSet)Promise.resolve().then(()=>{this.onLoadTileSet(json,url)})});return pr}update(){const group=this.group;const cameras=this.cameras;const cameraMap=this.cameraMap;const cameraInfo=this.cameraInfo;if(cameras.length===0){console.warn("TilesRenderer: no cameras defined. Cannot update 3d tiles.");return}while(cameraInfo.length>cameras.length)cameraInfo.pop();while(cameraInfo.length<cameras.length)cameraInfo.push({frustum:new $5OpyM$Frustum,isOrthographic:false,sseDenominator:-1,position:new $5OpyM$Vector3,invScale:-1,pixelSize:0});$06d26e8e9f5361d3$var$tempMat2.copy(group.matrixWorld).invert();$06d26e8e9f5361d3$var$tempVector.setFromMatrixScale($06d26e8e9f5361d3$var$tempMat2);const invScale=$06d26e8e9f5361d3$var$tempVector.x;if(Math.abs(Math.max($06d26e8e9f5361d3$var$tempVector.x-$06d26e8e9f5361d3$var$tempVector.y,$06d26e8e9f5361d3$var$tempVector.x-$06d26e8e9f5361d3$var$tempVector.z))>1e-6)console.warn("ThreeTilesRenderer : Non uniform scale used for tile which may cause issues when calculating screen space error.");for(let i=0,l=cameraInfo.length;i<l;i++){const camera=cameras[i];const info=cameraInfo[i];const frustum=info.frustum;const position=info.position;const resolution=cameraMap.get(camera);if(resolution.width===0||resolution.height===0)console.warn("TilesRenderer: resolution for camera error calculation is not set.");const projection=camera.projectionMatrix.elements;info.isOrthographic=projection[15]===1;if(info.isOrthographic){const w=2/projection[0];const h=2/projection[5];info.pixelSize=Math.max(h/resolution.height,w/resolution.width)}else info.sseDenominator=2/projection[5]/resolution.height;info.invScale=invScale;$06d26e8e9f5361d3$var$tempMat.copy(group.matrixWorld);$06d26e8e9f5361d3$var$tempMat.premultiply(camera.matrixWorldInverse);$06d26e8e9f5361d3$var$tempMat.premultiply(camera.projectionMatrix);frustum.setFromProjectionMatrix($06d26e8e9f5361d3$var$tempMat);position.set(0,0,0);position.applyMatrix4(camera.matrixWorld);position.applyMatrix4($06d26e8e9f5361d3$var$tempMat2)}super.update()}preprocessNode(tile,tileSetDir,parentTile=null){super.preprocessNode(tile,tileSetDir,parentTile);const transform=new $5OpyM$Matrix4;if(tile.transform){const transformArr=tile.transform;for(let i=0;i<16;i++)transform.elements[i]=transformArr[i]}else transform.identity();if(parentTile)transform.premultiply(parentTile.cached.transform);const transformInverse=new $5OpyM$Matrix4().copy(transform).invert();const boundingVolume=new $163be4c04da1c269$exports.TileBoundingVolume;if("sphere"in tile.boundingVolume)boundingVolume.setSphereData(...tile.boundingVolume.sphere,transform);if("box"in tile.boundingVolume)boundingVolume.setObbData(tile.boundingVolume.box,transform);if("region"in tile.boundingVolume)boundingVolume.setRegionData(...tile.boundingVolume.region);tile.cached={loadIndex:0,transform:transform,transformInverse:transformInverse,active:false,inFrustum:[],boundingVolume:boundingVolume,scene:null,geometry:null,material:null}}parseTile(buffer,tile,extension){tile._loadIndex=tile._loadIndex||0;tile._loadIndex++;const uri=tile.content.uri;const uriSplits=uri.split(/[\\\/]/g);uriSplits.pop();const workingPath=uriSplits.join("/");const fetchOptions=this.fetchOptions;const manager=this.manager;const loadIndex=tile._loadIndex;let promise=null;const upAxis=this.rootTileSet.asset&&this.rootTileSet.asset.gltfUpAxis||"y";const cached=tile.cached;const cachedTransform=cached.transform;const upAdjustment=new $5OpyM$Matrix4;switch(upAxis.toLowerCase()){case"x":upAdjustment.makeRotationAxis($06d26e8e9f5361d3$var$Y_AXIS,-Math.PI/2);break;case"y":upAdjustment.makeRotationAxis($06d26e8e9f5361d3$var$X_AXIS,Math.PI/2);break;case"z":upAdjustment.identity();break;}const fileType=((0,$9e3e194659cc5776$exports.readMagicBytes)(buffer)||extension).toLowerCase();switch(fileType){case"b3dm":{const loader=new $0aa3d1def57e98b1$exports.B3DMLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;loader.adjustmentTransform.copy(upAdjustment);promise=loader.parse(buffer);break}case"pnts":{const loader=new $1ddd6ca16eb224df$exports.PNTSLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;promise=loader.parse(buffer);break}case"i3dm":{const loader=new $0bc85483bdeca322$exports.I3DMLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;loader.adjustmentTransform.copy(upAdjustment);promise=loader.parse(buffer);break}case"cmpt":{const loader=new $54879e9a7dc345e0$exports.CMPTLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;loader.adjustmentTransform.copy(upAdjustment);promise=loader.parse(buffer).then(res=>res.scene);break}case"gltf":case"glb":const loader=new $29ced67d26e5c4e2$exports.GLTFExtensionLoader(manager);loader.workingPath=workingPath;loader.fetchOptions=fetchOptions;promise=loader.parse(buffer);break;default:console.warn(`TilesRenderer: Content type "${fileType}" not supported.`);promise=Promise.resolve(null);break;}return promise.then(result=>{let scene;let metadata;if(result.isObject3D){scene=result;metadata=null}else{scene=result.scene;metadata=result}if(tile._loadIndex!==loadIndex)return;scene.updateMatrix();if(fileType==="glb"||fileType==="gltf")scene.matrix.multiply(upAdjustment);scene.matrix.premultiply(cachedTransform);scene.matrix.decompose(scene.position,scene.quaternion,scene.scale);scene.traverse(c=>{c[$06d26e8e9f5361d3$var$INITIAL_FRUSTUM_CULLED]=c.frustumCulled});$06d26e8e9f5361d3$var$updateFrustumCulled(scene,!this.autoDisableRendererCulling);scene.traverse(c=>{c.raycast=this._overridenRaycast});const materials=[];const geometry=[];const textures=[];scene.traverse(c=>{if(c.geometry)geometry.push(c.geometry);if(c.material){const material=c.material;materials.push(c.material);for(const key in material){const value=material[key];if(value&&value.isTexture)textures.push(value)}}});cached.materials=materials;cached.geometry=geometry;cached.textures=textures;cached.scene=scene;cached.metadata=metadata;if(this.onLoadModel)this.onLoadModel(scene,tile)})}disposeTile(tile){const cached=tile.cached;if(cached.scene){const materials=cached.materials;const geometry=cached.geometry;const textures=cached.textures;const parent=cached.scene.parent;for(let i=0,l=geometry.length;i<l;i++)geometry[i].dispose();for(let i=0,l=materials.length;i<l;i++)materials[i].dispose();for(let i=0,l=textures.length;i<l;i++){const texture=textures[i];texture.dispose()}if(parent)parent.remove(cached.scene);if(this.onDisposeModel)this.onDisposeModel(cached.scene,tile);cached.scene=null;cached.materials=null;cached.textures=null;cached.geometry=null;cached.metadata=null}this.activeTiles.delete(tile);this.visibleTiles.delete(tile);tile._loadIndex++}setTileVisible(tile,visible){const scene=tile.cached.scene;const visibleTiles=this.visibleTiles;const group=this.group;if(visible){group.add(scene);visibleTiles.add(tile);scene.updateMatrixWorld(true)}else{group.remove(scene);visibleTiles.delete(tile)}if(this.onTileVisibilityChange)this.onTileVisibilityChange(scene,tile,visible)}setTileActive(tile,active){const activeTiles=this.activeTiles;if(active)activeTiles.add(tile);else activeTiles.delete(tile)}calculateError(tile){const cached=tile.cached;const inFrustum=cached.inFrustum;const cameras=this.cameras;const cameraInfo=this.cameraInfo;const boundingVolume=cached.boundingVolume;let maxError=-Infinity;let minDistance=Infinity;for(let i=0,l=cameras.length;i<l;i++){if(!inFrustum[i])continue;const info=cameraInfo[i];const invScale=info.invScale;let error;if(info.isOrthographic){const pixelSize=info.pixelSize;error=tile.geometricError/(pixelSize*invScale)}else{const distance=boundingVolume.distanceToPoint(info.position);const scaledDistance=distance*invScale;const sseDenominator=info.sseDenominator;error=tile.geometricError/(scaledDistance*sseDenominator);minDistance=Math.min(minDistance,scaledDistance)}maxError=Math.max(maxError,error)}tile.__distanceFromCamera=minDistance;tile.__error=maxError}tileInView(tile){const cached=tile.cached;const boundingVolume=cached.boundingVolume;const inFrustum=cached.inFrustum;const cameraInfo=this.cameraInfo;let inView=false;for(let i=0,l=cameraInfo.length;i<l;i++){const frustum=cameraInfo[i].frustum;if(boundingVolume.intersectsFrustum(frustum)){inView=true;inFrustum[i]=true}else inFrustum[i]=false}return inView}}$06d26e8e9f5361d3$exports.TilesRenderer=$06d26e8e9f5361d3$var$TilesRenderer;var $1cb839fa4db014d3$exports={};"use strict";Object.defineProperty($1cb839fa4db014d3$exports,"__esModule",{value:true});$1cb839fa4db014d3$exports.SphereHelper=void 0;const $1cb839fa4db014d3$var$_vector=new $5OpyM$Vector3;const $1cb839fa4db014d3$var$axes=["x","y","z"];class $1cb839fa4db014d3$var$SphereHelper extends $5OpyM$LineSegments{constructor(sphere,color=16776960,angleSteps=40){const geometry=new $5OpyM$BufferGeometry;const positions=[];for(let i=0;i<3;i++){const axis1=$1cb839fa4db014d3$var$axes[i];const axis2=$1cb839fa4db014d3$var$axes[(i+1)%3];$1cb839fa4db014d3$var$_vector.set(0,0,0);for(let a=0;a<angleSteps;a++){let angle;angle=2*Math.PI*a/(angleSteps-1);$1cb839fa4db014d3$var$_vector[axis1]=Math.sin(angle);$1cb839fa4db014d3$var$_vector[axis2]=Math.cos(angle);positions.push($1cb839fa4db014d3$var$_vector.x,$1cb839fa4db014d3$var$_vector.y,$1cb839fa4db014d3$var$_vector.z);angle=2*Math.PI*(a+1)/(angleSteps-1);$1cb839fa4db014d3$var$_vector[axis1]=Math.sin(angle);$1cb839fa4db014d3$var$_vector[axis2]=Math.cos(angle);positions.push($1cb839fa4db014d3$var$_vector.x,$1cb839fa4db014d3$var$_vector.y,$1cb839fa4db014d3$var$_vector.z)}}geometry.setAttribute("position",new $5OpyM$BufferAttribute(new Float32Array(positions),3));geometry.computeBoundingSphere();super(geometry,new $5OpyM$LineBasicMaterial({color:color,toneMapped:false}));this.sphere=sphere;this.type="SphereHelper"}updateMatrixWorld(force){const sphere=this.sphere;this.position.copy(sphere.center);this.scale.setScalar(sphere.radius);super.updateMatrixWorld(force)}}$1cb839fa4db014d3$exports.SphereHelper=$1cb839fa4db014d3$var$SphereHelper;var $3b9225051b507460$exports={};"use strict";Object.defineProperty($3b9225051b507460$exports,"__esModule",{value:true});$3b9225051b507460$exports.EllipsoidRegionLineHelper=$3b9225051b507460$exports.EllipsoidRegionHelper=void 0;const $3b9225051b507460$var$_norm=new $5OpyM$Vector3;const $3b9225051b507460$var$_norm2=new $5OpyM$Vector3;const $3b9225051b507460$var$_pos=new $5OpyM$Vector3;const $3b9225051b507460$var$_vec1=new $5OpyM$Vector3;const $3b9225051b507460$var$_vec2=new $5OpyM$Vector3;function $3b9225051b507460$var$toGroupGeometry(geometry){geometry=geometry.toNonIndexed();const{groups:groups}=geometry;const{position:position,normal:normal}=geometry.attributes;const newNorm=[];const newPos=[];for(const group of groups){const{start:start,count:count}=group;for(let i=start,l=start+count;i<l;i++){$3b9225051b507460$var$_vec1.fromBufferAttribute(position,i);$3b9225051b507460$var$_vec2.fromBufferAttribute(normal,i);newPos.push(...$3b9225051b507460$var$_vec1);newNorm.push(...$3b9225051b507460$var$_vec2)}}const newGeometry=new $5OpyM$BufferGeometry;newGeometry.setAttribute("position",new $5OpyM$BufferAttribute(new Float32Array(newPos),3));newGeometry.setAttribute("normal",new $5OpyM$BufferAttribute(new Float32Array(newNorm),3));return newGeometry}function $3b9225051b507460$var$getRegionGeometry(ellipsoidRegion){const{latStart=-Math.PI/2,latEnd=Math.PI/2,lonStart=0,lonEnd=2*Math.PI,heightStart=0,heightEnd=0}=ellipsoidRegion;const geometry=new $5OpyM$BoxGeometry(1,1,1,32,32);const{normal:normal,position:position}=geometry.attributes;const refPosition=position.clone();for(let i=0,l=position.count;i<l;i++){$3b9225051b507460$var$_pos.fromBufferAttribute(position,i);const lat=$5OpyM$MathUtils.mapLinear($3b9225051b507460$var$_pos.x,-0.5,0.5,latStart,latEnd);const lon=$5OpyM$MathUtils.mapLinear($3b9225051b507460$var$_pos.y,-0.5,0.5,lonStart,lonEnd);let height=heightStart;ellipsoidRegion.getCartographicToNormal(lat,lon,$3b9225051b507460$var$_norm);if($3b9225051b507460$var$_pos.z<0)height=heightEnd;ellipsoidRegion.getCartographicToPosition(lat,lon,height,$3b9225051b507460$var$_pos);position.setXYZ(i,...$3b9225051b507460$var$_pos)}geometry.computeVertexNormals();for(let i=0,l=refPosition.count;i<l;i++){$3b9225051b507460$var$_pos.fromBufferAttribute(refPosition,i);const lat=$5OpyM$MathUtils.mapLinear($3b9225051b507460$var$_pos.x,-0.5,0.5,latStart,latEnd);const lon=$5OpyM$MathUtils.mapLinear($3b9225051b507460$var$_pos.y,-0.5,0.5,lonStart,lonEnd);$3b9225051b507460$var$_norm.fromBufferAttribute(normal,i);ellipsoidRegion.getCartographicToNormal(lat,lon,$3b9225051b507460$var$_norm2);if(Math.abs($3b9225051b507460$var$_norm.dot($3b9225051b507460$var$_norm2))>0.1){if($3b9225051b507460$var$_pos.z>0)$3b9225051b507460$var$_norm2.multiplyScalar(-1);normal.setXYZ(i,...$3b9225051b507460$var$_norm2)}}return geometry}class $3b9225051b507460$var$EllipsoidRegionLineHelper extends $5OpyM$LineSegments{constructor(ellipsoidRegion=new $aa7b3b269f245cbe$exports.EllipsoidRegion,color=16776960){super();this.ellipsoidRegion=ellipsoidRegion;this.material.color.set(color);this.update()}update(){const geometry=$3b9225051b507460$var$getRegionGeometry(this.ellipsoidRegion);this.geometry.dispose();this.geometry=new $5OpyM$EdgesGeometry(geometry,80)}dispose(){this.geometry.dispose();this.material.dispose()}}$3b9225051b507460$exports.EllipsoidRegionLineHelper=$3b9225051b507460$var$EllipsoidRegionLineHelper;class $3b9225051b507460$var$EllipsoidRegionHelper extends $5OpyM$Mesh{constructor(ellipsoidRegion=new $aa7b3b269f245cbe$exports.EllipsoidRegion,color=16776960){super();this.ellipsoidRegion=ellipsoidRegion;this.material.color.set(color);this.update()}update(){this.geometry.dispose();const geometry=$3b9225051b507460$var$getRegionGeometry(this.ellipsoidRegion);const{lonStart:lonStart,lonEnd:lonEnd}=this;if(lonEnd-lonStart>=2*Math.PI){geometry.groups.splice(2,2);this.geometry=$3b9225051b507460$var$toGroupGeometry(geometry)}else this.geometry=geometry}dispose(){this.geometry.dispose();this.material.dispose()}}$3b9225051b507460$exports.EllipsoidRegionHelper=$3b9225051b507460$var$EllipsoidRegionHelper;const $1909f04f34bd6630$var$ORIGINAL_MATERIAL=Symbol("ORIGINAL_MATERIAL");const $1909f04f34bd6630$var$HAS_RANDOM_COLOR=Symbol("HAS_RANDOM_COLOR");const $1909f04f34bd6630$var$HAS_RANDOM_NODE_COLOR=Symbol("HAS_RANDOM_NODE_COLOR");function $1909f04f34bd6630$var$emptyRaycast(){}const $1909f04f34bd6630$var$NONE=0;$1909f04f34bd6630$exports.NONE=$1909f04f34bd6630$var$NONE;const $1909f04f34bd6630$var$SCREEN_ERROR=1;$1909f04f34bd6630$exports.SCREEN_ERROR=$1909f04f34bd6630$var$SCREEN_ERROR;const $1909f04f34bd6630$var$GEOMETRIC_ERROR=2;$1909f04f34bd6630$exports.GEOMETRIC_ERROR=$1909f04f34bd6630$var$GEOMETRIC_ERROR;const $1909f04f34bd6630$var$DISTANCE=3;$1909f04f34bd6630$exports.DISTANCE=$1909f04f34bd6630$var$DISTANCE;const $1909f04f34bd6630$var$DEPTH=4;$1909f04f34bd6630$exports.DEPTH=$1909f04f34bd6630$var$DEPTH;const $1909f04f34bd6630$var$RELATIVE_DEPTH=5;$1909f04f34bd6630$exports.RELATIVE_DEPTH=$1909f04f34bd6630$var$RELATIVE_DEPTH;const $1909f04f34bd6630$var$IS_LEAF=6;$1909f04f34bd6630$exports.IS_LEAF=$1909f04f34bd6630$var$IS_LEAF;const $1909f04f34bd6630$var$RANDOM_COLOR=7;$1909f04f34bd6630$exports.RANDOM_COLOR=$1909f04f34bd6630$var$RANDOM_COLOR;const $1909f04f34bd6630$var$RANDOM_NODE_COLOR=8;$1909f04f34bd6630$exports.RANDOM_NODE_COLOR=$1909f04f34bd6630$var$RANDOM_NODE_COLOR;const $1909f04f34bd6630$var$CUSTOM_COLOR=9;$1909f04f34bd6630$exports.CUSTOM_COLOR=$1909f04f34bd6630$var$CUSTOM_COLOR;const $1909f04f34bd6630$var$_sphere=new $5OpyM$Sphere;class $1909f04f34bd6630$var$DebugTilesRenderer extends $06d26e8e9f5361d3$exports.TilesRenderer{constructor(...args){super(...args);const tilesGroup=this.group;const boxGroup=new $5OpyM$Group;boxGroup.name="DebugTilesRenderer.boxGroup";tilesGroup.add(boxGroup);const sphereGroup=new $5OpyM$Group;sphereGroup.name="DebugTilesRenderer.sphereGroup";tilesGroup.add(sphereGroup);const regionGroup=new $5OpyM$Group;regionGroup.name="DebugTilesRenderer.regionGroup";tilesGroup.add(regionGroup);this.displayBoxBounds=false;this.displaySphereBounds=false;this.displayRegionBounds=false;this.colorMode=$1909f04f34bd6630$var$NONE;this.customColorCallback=null;this.boxGroup=boxGroup;this.sphereGroup=sphereGroup;this.regionGroup=regionGroup;this.maxDebugDepth=-1;this.maxDebugDistance=-1;this.maxDebugError=-1;this.getDebugColor=(value,target)=>{target.setRGB(value,value,value)};this.extremeDebugDepth=-1;this.extremeDebugError=-1}initExtremes(){let maxDepth=-1;this.traverse(tile=>{maxDepth=Math.max(maxDepth,tile.__depth)});let maxError=-1;this.traverse(tile=>{maxError=Math.max(maxError,tile.geometricError)});this.extremeDebugDepth=maxDepth;this.extremeDebugError=maxError}fetchTileSet(...args){const pr=super.fetchTileSet(...args);pr.then(()=>{Promise.resolve().then(()=>{this.initExtremes()})}).catch(()=>{});return pr}getTileInformationFromActiveObject(object){let targetTile=null;const activeTiles=this.activeTiles;activeTiles.forEach(tile=>{if(targetTile)return true;const scene=tile.cached.scene;if(scene)scene.traverse(c=>{if(c===object)targetTile=tile})});if(targetTile)return{distanceToCamera:targetTile.__distanceFromCamera,geometricError:targetTile.geometricError,screenSpaceError:targetTile.__error,depth:targetTile.__depth,isLeaf:targetTile.__isLeaf};else return null}update(){super.update();if(!this.root)return;this.boxGroup.visible=this.displayBoxBounds;this.sphereGroup.visible=this.displaySphereBounds;this.regionGroup.visible=this.displayRegionBounds;let maxDepth=-1;if(this.maxDebugDepth===-1)maxDepth=this.extremeDebugDepth;else maxDepth=this.maxDebugDepth;let maxError=-1;if(this.maxDebugError===-1)maxError=this.extremeDebugError;else maxError=this.maxDebugError;let maxDistance=-1;if(this.maxDebugDistance===-1){this.root.cached.boundingVolume.getSphere($1909f04f34bd6630$var$_sphere);maxDistance=$1909f04f34bd6630$var$_sphere.radius}else maxDistance=this.maxDebugDistance;const errorTarget=this.errorTarget;const colorMode=this.colorMode;const visibleTiles=this.visibleTiles;visibleTiles.forEach(tile=>{const scene=tile.cached.scene;let h,s,l;if(colorMode===$1909f04f34bd6630$var$RANDOM_COLOR){h=Math.random();s=0.5+Math.random()*0.5;l=0.375+Math.random()*0.25}scene.traverse(c=>{if(colorMode===$1909f04f34bd6630$var$RANDOM_NODE_COLOR){h=Math.random();s=0.5+Math.random()*0.5;l=0.375+Math.random()*0.25}const currMaterial=c.material;if(currMaterial){const originalMaterial=c[$1909f04f34bd6630$var$ORIGINAL_MATERIAL];if(colorMode===$1909f04f34bd6630$var$NONE&&currMaterial!==originalMaterial){c.material.dispose();c.material=c[$1909f04f34bd6630$var$ORIGINAL_MATERIAL]}else if(colorMode!==$1909f04f34bd6630$var$NONE&&currMaterial===originalMaterial){if(c.isPoints){const pointsMaterial=new $5OpyM$PointsMaterial;pointsMaterial.size=originalMaterial.size;pointsMaterial.sizeAttenuation=originalMaterial.sizeAttenuation;c.material=pointsMaterial}else{c.material=new $5OpyM$MeshStandardMaterial;c.material.flatShading=true}}if(colorMode!==$1909f04f34bd6630$var$RANDOM_COLOR)delete c.material[$1909f04f34bd6630$var$HAS_RANDOM_COLOR];if(colorMode!==$1909f04f34bd6630$var$RANDOM_NODE_COLOR)delete c.material[$1909f04f34bd6630$var$HAS_RANDOM_NODE_COLOR];switch(colorMode){case $1909f04f34bd6630$var$DEPTH:{const val=tile.__depth/maxDepth;this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$RELATIVE_DEPTH:{const val=tile.__depthFromRenderedParent/maxDepth;this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$SCREEN_ERROR:{const val=tile.__error/errorTarget;if(val>1)c.material.color.setRGB(1,0,0);else this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$GEOMETRIC_ERROR:{const val=Math.min(tile.geometricError/maxError,1);this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$DISTANCE:{const val=Math.min(tile.__distanceFromCamera/maxDistance,1);this.getDebugColor(val,c.material.color);break}case $1909f04f34bd6630$var$IS_LEAF:if(!tile.children||tile.children.length===0)this.getDebugColor(1,c.material.color);else this.getDebugColor(0,c.material.color);break;case $1909f04f34bd6630$var$RANDOM_NODE_COLOR:if(!c.material[$1909f04f34bd6630$var$HAS_RANDOM_NODE_COLOR]){c.material.color.setHSL(h,s,l);c.material[$1909f04f34bd6630$var$HAS_RANDOM_NODE_COLOR]=true}break;case $1909f04f34bd6630$var$RANDOM_COLOR:if(!c.material[$1909f04f34bd6630$var$HAS_RANDOM_COLOR]){c.material.color.setHSL(h,s,l);c.material[$1909f04f34bd6630$var$HAS_RANDOM_COLOR]=true}break;case $1909f04f34bd6630$var$CUSTOM_COLOR:if(this.customColorCallback)this.customColorCallback(tile,c);else console.warn("DebugTilesRenderer: customColorCallback not defined");break;}}})})}setTileVisible(tile,visible){super.setTileVisible(tile,visible);const cached=tile.cached;const sphereGroup=this.sphereGroup;const boxGroup=this.boxGroup;const regionGroup=this.regionGroup;const boxHelperGroup=cached.boxHelperGroup;const sphereHelper=cached.sphereHelper;const regionHelper=cached.regionHelper;if(!visible){if(boxHelperGroup)boxGroup.remove(boxHelperGroup);if(sphereHelper)sphereGroup.remove(sphereHelper);if(regionHelper)regionGroup.remove(regionHelper)}else{if(boxHelperGroup){boxGroup.add(boxHelperGroup);boxHelperGroup.updateMatrixWorld(true)}if(sphereHelper){sphereGroup.add(sphereHelper);sphereHelper.updateMatrixWorld(true)}if(regionHelper){regionGroup.add(regionHelper);regionHelper.updateMatrixWorld(true)}}}parseTile(buffer,tile,extension){return super.parseTile(buffer,tile,extension).then(()=>{const cached=tile.cached;const scene=cached.scene;if(scene){const{sphere:sphere,obb:obb,region:region}=cached.boundingVolume;if(obb){const boxHelperGroup=new $5OpyM$Group;boxHelperGroup.name="DebugTilesRenderer.boxHelperGroup";boxHelperGroup.matrix.copy(obb.transform);boxHelperGroup.matrixAutoUpdate=false;const boxHelper=new $5OpyM$Box3Helper(obb.box,(0,$3a66585ec6f85053$exports.getIndexedRandomColor)(tile.__depth));boxHelper.raycast=$1909f04f34bd6630$var$emptyRaycast;boxHelperGroup.add(boxHelper);cached.boxHelperGroup=boxHelperGroup;if(this.visibleTiles.has(tile)&&this.displayBoxBounds){this.boxGroup.add(boxHelperGroup);boxHelperGroup.updateMatrixWorld(true)}}if(sphere){const sphereHelper=new $1cb839fa4db014d3$exports.SphereHelper(sphere,(0,$3a66585ec6f85053$exports.getIndexedRandomColor)(tile.__depth));sphereHelper.raycast=$1909f04f34bd6630$var$emptyRaycast;cached.sphereHelper=sphereHelper;if(this.visibleTiles.has(tile)&&this.displaySphereBounds){this.sphereGroup.add(sphereHelper);sphereHelper.updateMatrixWorld(true)}}if(region){const regionHelper=new $3b9225051b507460$exports.EllipsoidRegionLineHelper(region,(0,$3a66585ec6f85053$exports.getIndexedRandomColor)(tile.__depth));regionHelper.raycast=$1909f04f34bd6630$var$emptyRaycast;const sphere=new $5OpyM$Sphere;region.getBoundingSphere(sphere);regionHelper.position.copy(sphere.center);sphere.center.multiplyScalar(-1);regionHelper.geometry.translate(...sphere.center);cached.regionHelper=regionHelper;if(this.visibleTiles.has(tile)&&this.displayRegionBounds){this.regionGroup.add(regionHelper);regionHelper.updateMatrixWorld(true)}}scene.traverse(c=>{const material=c.material;if(material)c[$1909f04f34bd6630$var$ORIGINAL_MATERIAL]=material})}})}disposeTile(tile){super.disposeTile(tile);const cached=tile.cached;if(cached.boxHelperGroup){cached.boxHelperGroup.children[0].geometry.dispose();delete cached.boxHelperGroup}if(cached.sphereHelper){cached.sphereHelper.geometry.dispose();delete cached.sphereHelper}}}$1909f04f34bd6630$exports.DebugTilesRenderer=$1909f04f34bd6630$var$DebugTilesRenderer;var $cf838c15c8b009ba$var$_GeoUtils=$cf838c15c8b009ba$var$_interopRequireWildcard(parcelRequire("1hGdn"));$cf838c15c8b009ba$exports.GeoUtils=$cf838c15c8b009ba$var$_GeoUtils;var $74a95d3099be71d6$exports={};"use strict";Object.defineProperty($74a95d3099be71d6$exports,"__esModule",{value:true});$74a95d3099be71d6$exports.WGS84_ELLIPSOID=void 0;const $74a95d3099be71d6$var$WGS84_ELLIPSOID=new $9160f8f2e0578e98$exports.Ellipsoid($002d29a772485791$exports.WGS84_RADIUS,$002d29a772485791$exports.WGS84_RADIUS,$002d29a772485791$exports.WGS84_HEIGHT);$74a95d3099be71d6$exports.WGS84_ELLIPSOID=$74a95d3099be71d6$var$WGS84_ELLIPSOID;Object.keys($74a95d3099be71d6$exports).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call($cf838c15c8b009ba$var$_exportNames,key))return;if(key in $cf838c15c8b009ba$exports&&$cf838c15c8b009ba$exports[key]===$74a95d3099be71d6$exports[key])return;Object.defineProperty($cf838c15c8b009ba$exports,key,{enumerable:true,get:function(){return $74a95d3099be71d6$exports[key]}})});var $e41589f0d6e8ce27$exports={};"use strict";Object.defineProperty($e41589f0d6e8ce27$exports,"__esModule",{value:true});$e41589f0d6e8ce27$exports.GoogleTilesRenderer=$e41589f0d6e8ce27$exports.DebugGoogleTilesRenderer=void 0;var $f462b5e10a0d334c$exports={};"use strict";Object.defineProperty($f462b5e10a0d334c$exports,"__esModule",{value:true});$f462b5e10a0d334c$exports.GoogleMapsTilesCredits=void 0;class $f462b5e10a0d334c$var$GoogleMapsTilesCredits{constructor(){this.creditsCount={}}_adjustCredits(line,add){const creditsCount=this.creditsCount;const tokens=line.split(/;/g);for(let i=0,l=tokens.length;i<l;i++){const t=tokens[i];if(!(t in creditsCount))creditsCount[t]=0;creditsCount[t]+=add?1:-1;if(creditsCount[t]<=0)delete creditsCount[t]}}addCredits(line){this._adjustCredits(line,true)}removeCredits(line){this._adjustCredits(line,false)}toString(){const tokens=Object.keys(this.creditsCount).sort();return tokens.join(", ")}}$f462b5e10a0d334c$exports.GoogleMapsTilesCredits=$f462b5e10a0d334c$var$GoogleMapsTilesCredits;const $e41589f0d6e8ce27$var$API_ORIGIN="https://tile.googleapis.com";const $e41589f0d6e8ce27$var$TILE_URL=`${$e41589f0d6e8ce27$var$API_ORIGIN}/v1/3dtiles/root.json`;const $e41589f0d6e8ce27$var$_mat=new $5OpyM$Matrix4;const $e41589f0d6e8ce27$var$_euler=new $5OpyM$Euler;const $e41589f0d6e8ce27$var$GoogleTilesRendererMixin=base=>class extends base{get ellipsoid(){return $74a95d3099be71d6$exports.WGS84_ELLIPSOID}constructor(apiKey,baseUrl=$e41589f0d6e8ce27$var$TILE_URL){super(new URL(`${baseUrl}?key=${apiKey}`).toString());this._credits=new $f462b5e10a0d334c$exports.GoogleMapsTilesCredits;this.fetchOptions.mode="cors";this.parseQueue.maxJobs=10;this.downloadQueue.maxJobs=30;this.lruCache.minSize=3000;this.lruCache.maxSize=5000;this.errorTarget=20;this.onLoadTileSet=tileset=>{let session;this.traverse(tile=>{if(tile.content&&tile.content.uri){session=new URL(tile.content.uri).searchParams.get("session");return true}return false});this.preprocessURL=uri=>{uri=new URL(uri);if(/^http/.test(uri.protocol)){uri.searchParams.append("session",session);uri.searchParams.append("key",apiKey)}return uri.toString()};this.onLoadTileSet=null};this.onTileVisibilityChange=(scene,tile,visible)=>{const copyright=tile.cached.metadata.asset.copyright||"";if(visible)this._credits.addCredits(copyright);else this._credits.removeCredits(copyright)}}getCreditsString(){return this._credits.toString()}setLatLonToYUp(lat,lon){const{ellipsoid:ellipsoid,group:group}=this;$e41589f0d6e8ce27$var$_euler.set(Math.PI/2,Math.PI/2,0);$e41589f0d6e8ce27$var$_mat.makeRotationFromEuler($e41589f0d6e8ce27$var$_euler);ellipsoid.constructLatLonFrame(lat,lon,group.matrix).multiply($e41589f0d6e8ce27$var$_mat).invert().decompose(group.position,group.quaternion,group.scale)}};const $e41589f0d6e8ce27$var$GoogleTilesRenderer=$e41589f0d6e8ce27$var$GoogleTilesRendererMixin($06d26e8e9f5361d3$exports.TilesRenderer);$e41589f0d6e8ce27$exports.GoogleTilesRenderer=$e41589f0d6e8ce27$var$GoogleTilesRenderer;const $e41589f0d6e8ce27$var$DebugGoogleTilesRenderer=$e41589f0d6e8ce27$var$GoogleTilesRendererMixin($1909f04f34bd6630$exports.DebugTilesRenderer);$e41589f0d6e8ce27$exports.DebugGoogleTilesRenderer=$e41589f0d6e8ce27$var$DebugGoogleTilesRenderer;Object.keys($e41589f0d6e8ce27$exports).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call($cf838c15c8b009ba$var$_exportNames,key))return;if(key in $cf838c15c8b009ba$exports&&$cf838c15c8b009ba$exports[key]===$e41589f0d6e8ce27$exports[key])return;Object.defineProperty($cf838c15c8b009ba$exports,key,{enumerable:true,get:function(){return $e41589f0d6e8ce27$exports[key]}})});var $3b72713b91ab2ada$exports={};"use strict";Object.defineProperty($3b72713b91ab2ada$exports,"__esModule",{value:true});$3b72713b91ab2ada$exports.DebugCesiumIonTilesRenderer=$3b72713b91ab2ada$exports.CesiumIonTilesRenderer=void 0;const $3b72713b91ab2ada$var$UNLOADED=0;const $3b72713b91ab2ada$var$LOADING=1;const $3b72713b91ab2ada$var$LOADED=2;const $3b72713b91ab2ada$var$FAILED=3;const $3b72713b91ab2ada$var$CesiumIonTilesRendererMixin=base=>class extends base{constructor(ionAssetId,ionAccessToken){super();this._tokenState=$3b72713b91ab2ada$var$UNLOADED;this._ionAccessToken=ionAccessToken;this._ionAssetId=ionAssetId;this._tileSetVersion=-1;this.preprocessURL=uri=>{uri=new URL(uri);if(/^http/.test(uri.protocol)&&this._tileSetVersion!=-1)uri.searchParams.append("v",this._tileSetVersion);return uri.toString()}}update(){const state=this._tokenState;if(state===$3b72713b91ab2ada$var$UNLOADED){this._tokenState=$3b72713b91ab2ada$var$LOADING;const url=new URL(`https://api.cesium.com/v1/assets/${this._ionAssetId}/endpoint`);url.searchParams.append("access_token",this._ionAccessToken);fetch(url,{mode:"cors"}).then(res=>{if(res.ok)return res.json();else return Promise.reject(`${res.status} : ${res.statusText}`)}).then(json=>{this._tokenState=$3b72713b91ab2ada$var$LOADED;const url=new URL(json.url);this._tileSetVersion=url.searchParams.get("v");this.rootURL=url;this.fetchOptions.headers=this.fetchOptions.headers||{};this.fetchOptions.headers.Authorization=`Bearer ${json.accessToken}`}).catch(()=>{this._tokenState=$3b72713b91ab2ada$var$FAILED})}else if(state===$3b72713b91ab2ada$var$LOADED)super.update()}};const $3b72713b91ab2ada$var$CesiumIonTilesRenderer=$3b72713b91ab2ada$var$CesiumIonTilesRendererMixin($06d26e8e9f5361d3$exports.TilesRenderer);$3b72713b91ab2ada$exports.CesiumIonTilesRenderer=$3b72713b91ab2ada$var$CesiumIonTilesRenderer;const $3b72713b91ab2ada$var$DebugCesiumIonTilesRenderer=$3b72713b91ab2ada$var$CesiumIonTilesRendererMixin($1909f04f34bd6630$exports.DebugTilesRenderer);$3b72713b91ab2ada$exports.DebugCesiumIonTilesRenderer=$3b72713b91ab2ada$var$DebugCesiumIonTilesRenderer;Object.keys($3b72713b91ab2ada$exports).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call($cf838c15c8b009ba$var$_exportNames,key))return;if(key in $cf838c15c8b009ba$exports&&$cf838c15c8b009ba$exports[key]===$3b72713b91ab2ada$exports[key])return;Object.defineProperty($cf838c15c8b009ba$exports,key,{enumerable:true,get:function(){return $3b72713b91ab2ada$exports[key]}})});Object.keys($002d29a772485791$exports).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call($cf838c15c8b009ba$var$_exportNames,key))return;if(key in $cf838c15c8b009ba$exports&&$cf838c15c8b009ba$exports[key]===$002d29a772485791$exports[key])return;Object.defineProperty($cf838c15c8b009ba$exports,key,{enumerable:true,get:function(){return $002d29a772485791$exports[key]}})});function $cf838c15c8b009ba$var$_getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap;var cacheNodeInterop=new WeakMap;return($cf838c15c8b009ba$var$_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function $cf838c15c8b009ba$var$_interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(obj===null||typeof obj!=="object"&&typeof obj!=="function")return{default:obj};var cache=$cf838c15c8b009ba$var$_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set))Object.defineProperty(newObj,key,desc);else newObj[key]=obj[key]}newObj.default=obj;if(cache)cache.set(obj,newObj);return newObj}THREE.TDTiles=$cf838c15c8b009ba$exports});(function(){const Constants={Handedness:Object.freeze({NONE:"none",LEFT:"left",RIGHT:"right"}),ComponentState:Object.freeze({DEFAULT:"default",TOUCHED:"touched",PRESSED:"pressed"}),ComponentProperty:Object.freeze({BUTTON:"button",X_AXIS:"xAxis",Y_AXIS:"yAxis",STATE:"state"}),ComponentType:Object.freeze({TRIGGER:"trigger",SQUEEZE:"squeeze",TOUCHPAD:"touchpad",THUMBSTICK:"thumbstick",BUTTON:"button"}),ButtonTouchThreshold:0.05,AxisTouchThreshold:0.1,VisualResponseProperty:Object.freeze({TRANSFORM:"transform",VISIBILITY:"visibility"})};async function fetchJsonFile(path){const response=await fetch(path);if(!response.ok){throw new Error(response.statusText)}else{return response.json()}}async function fetchProfilesList(basePath){if(!basePath){throw new Error("No basePath supplied")}const profileListFileName="profilesList.json";const profilesList=await fetchJsonFile(`${basePath}/${profileListFileName}`);return profilesList}async function fetchProfile(xrInputSource,basePath,defaultProfile=null,getAssetPath=true){if(!xrInputSource){throw new Error("No xrInputSource supplied")}if(!basePath){throw new Error("No basePath supplied")}const supportedProfilesList=await fetchProfilesList(basePath);let match;xrInputSource.profiles.some(profileId=>{const supportedProfile=supportedProfilesList[profileId];if(supportedProfile){match={profileId,profilePath:`${basePath}/${supportedProfile.path}`,deprecated:!!supportedProfile.deprecated}}return!!match});if(!match){if(!defaultProfile){throw new Error("No matching profile name found")}const supportedProfile=supportedProfilesList[defaultProfile];if(!supportedProfile){throw new Error(`No matching profile name found and default profile "${defaultProfile}" missing.`)}match={profileId:defaultProfile,profilePath:`${basePath}/${supportedProfile.path}`,deprecated:!!supportedProfile.deprecated}}const profile=await fetchJsonFile(match.profilePath);let assetPath;if(getAssetPath){let layout;if(xrInputSource.handedness==="any"){layout=profile.layouts[Object.keys(profile.layouts)[0]]}else{layout=profile.layouts[xrInputSource.handedness]}if(!layout){throw new Error(`No matching handedness, ${xrInputSource.handedness}, in profile ${match.profileId}`)}if(layout.assetPath){assetPath=match.profilePath.replace("profile.json",layout.assetPath)}}return{profile,assetPath}}const defaultComponentValues={xAxis:0,yAxis:0,button:0,state:Constants.ComponentState.DEFAULT};function normalizeAxes(x=0,y=0){let xAxis=x;let yAxis=y;const hypotenuse=Math.sqrt(x*x+y*y);if(hypotenuse>1){const theta=Math.atan2(y,x);xAxis=Math.cos(theta);yAxis=Math.sin(theta)}const result={normalizedXAxis:xAxis*0.5+0.5,normalizedYAxis:yAxis*0.5+0.5};return result}class VisualResponse{constructor(visualResponseDescription){this.componentProperty=visualResponseDescription.componentProperty;this.states=visualResponseDescription.states;this.valueNodeName=visualResponseDescription.valueNodeName;this.valueNodeProperty=visualResponseDescription.valueNodeProperty;if(this.valueNodeProperty===Constants.VisualResponseProperty.TRANSFORM){this.minNodeName=visualResponseDescription.minNodeName;this.maxNodeName=visualResponseDescription.maxNodeName}this.value=0;this.updateFromComponent(defaultComponentValues)}updateFromComponent({xAxis,yAxis,button,state}){const{normalizedXAxis,normalizedYAxis}=normalizeAxes(xAxis,yAxis);switch(this.componentProperty){case Constants.ComponentProperty.X_AXIS:this.value=this.states.includes(state)?normalizedXAxis:0.5;break;case Constants.ComponentProperty.Y_AXIS:this.value=this.states.includes(state)?normalizedYAxis:0.5;break;case Constants.ComponentProperty.BUTTON:this.value=this.states.includes(state)?button:0;break;case Constants.ComponentProperty.STATE:if(this.valueNodeProperty===Constants.VisualResponseProperty.VISIBILITY){this.value=this.states.includes(state)}else{this.value=this.states.includes(state)?1:0}break;default:throw new Error(`Unexpected visualResponse componentProperty ${this.componentProperty}`);}}}class Component{constructor(componentId,componentDescription){if(!componentId||!componentDescription||!componentDescription.visualResponses||!componentDescription.gamepadIndices||Object.keys(componentDescription.gamepadIndices).length===0){throw new Error("Invalid arguments supplied")}this.id=componentId;this.type=componentDescription.type;this.rootNodeName=componentDescription.rootNodeName;this.touchPointNodeName=componentDescription.touchPointNodeName;this.visualResponses={};Object.keys(componentDescription.visualResponses).forEach(responseName=>{const visualResponse=new VisualResponse(componentDescription.visualResponses[responseName]);this.visualResponses[responseName]=visualResponse});this.gamepadIndices=Object.assign({},componentDescription.gamepadIndices);this.values={state:Constants.ComponentState.DEFAULT,button:this.gamepadIndices.button!==undefined?0:undefined,xAxis:this.gamepadIndices.xAxis!==undefined?0:undefined,yAxis:this.gamepadIndices.yAxis!==undefined?0:undefined}}get data(){const data={id:this.id,...this.values};return data}updateFromGamepad(gamepad){this.values.state=Constants.ComponentState.DEFAULT;if(this.gamepadIndices.button!==undefined&&gamepad.buttons.length>this.gamepadIndices.button){const gamepadButton=gamepad.buttons[this.gamepadIndices.button];this.values.button=gamepadButton.value;this.values.button=this.values.button<0?0:this.values.button;this.values.button=this.values.button>1?1:this.values.button;if(gamepadButton.pressed||this.values.button===1){this.values.state=Constants.ComponentState.PRESSED}else if(gamepadButton.touched||this.values.button>Constants.ButtonTouchThreshold){this.values.state=Constants.ComponentState.TOUCHED}}if(this.gamepadIndices.xAxis!==undefined&&gamepad.axes.length>this.gamepadIndices.xAxis){this.values.xAxis=gamepad.axes[this.gamepadIndices.xAxis];this.values.xAxis=this.values.xAxis<-1?-1:this.values.xAxis;this.values.xAxis=this.values.xAxis>1?1:this.values.xAxis;if(this.values.state===Constants.ComponentState.DEFAULT&&Math.abs(this.values.xAxis)>Constants.AxisTouchThreshold){this.values.state=Constants.ComponentState.TOUCHED}}if(this.gamepadIndices.yAxis!==undefined&&gamepad.axes.length>this.gamepadIndices.yAxis){this.values.yAxis=gamepad.axes[this.gamepadIndices.yAxis];this.values.yAxis=this.values.yAxis<-1?-1:this.values.yAxis;this.values.yAxis=this.values.yAxis>1?1:this.values.yAxis;if(this.values.state===Constants.ComponentState.DEFAULT&&Math.abs(this.values.yAxis)>Constants.AxisTouchThreshold){this.values.state=Constants.ComponentState.TOUCHED}}Object.values(this.visualResponses).forEach(visualResponse=>{visualResponse.updateFromComponent(this.values)})}}class MotionController{constructor(xrInputSource,profile,assetUrl){if(!xrInputSource){throw new Error("No xrInputSource supplied")}if(!profile){throw new Error("No profile supplied")}this.xrInputSource=xrInputSource;this.assetUrl=assetUrl;this.id=profile.profileId;this.layoutDescription=profile.layouts[xrInputSource.handedness];this.components={};Object.keys(this.layoutDescription.components).forEach(componentId=>{const componentDescription=this.layoutDescription.components[componentId];this.components[componentId]=new Component(componentId,componentDescription)});this.updateFromGamepad()}get gripSpace(){return this.xrInputSource.gripSpace}get targetRaySpace(){return this.xrInputSource.targetRaySpace}get data(){const data=[];Object.values(this.components).forEach(component=>{data.push(component.data)});return data}updateFromGamepad(){Object.values(this.components).forEach(component=>{component.updateFromGamepad(this.xrInputSource.gamepad)})}}THREE.MontionControllers={};THREE.MontionControllers.Constants=Constants;THREE.MontionControllers.MotionController=MotionController;THREE.MontionControllers.fetchProfile=fetchProfile;THREE.MontionControllers.fetchProfilesList=fetchProfilesList})();(function(){var Mesh=THREE.Mesh,MeshBasicMaterial=THREE.MeshBasicMaterial,Object3D=THREE.Object3D,SphereGeometry=THREE.SphereGeometry;var GLTFLoader=THREE.GLTFLoader;var MotionControllerConstants=THREE.MontionControllers.Constants,fetchProfile=THREE.MontionControllers.fetchProfile,MotionController=THREE.MontionControllers.MotionController;const DEFAULT_PROFILES_PATH="https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles";const DEFAULT_PROFILE="generic-trigger";class XRControllerModel extends Object3D{constructor(){super();this.motionController=null;this.envMap=null}setEnvironmentMap(envMap){if(this.envMap==envMap){return this}this.envMap=envMap;this.traverse(child=>{if(child.isMesh){child.material.envMap=this.envMap;child.material.needsUpdate=true}});return this}updateMatrixWorld(force){super.updateMatrixWorld(force);if(!this.motionController)return;this.motionController.updateFromGamepad();Object.values(this.motionController.components).forEach(component=>{Object.values(component.visualResponses).forEach(visualResponse=>{const{valueNode,minNode,maxNode,value,valueNodeProperty}=visualResponse;if(!valueNode)return;if(valueNodeProperty===MotionControllerConstants.VisualResponseProperty.VISIBILITY){valueNode.visible=value}else if(valueNodeProperty===MotionControllerConstants.VisualResponseProperty.TRANSFORM){valueNode.quaternion.slerpQuaternions(minNode.quaternion,maxNode.quaternion,value);valueNode.position.lerpVectors(minNode.position,maxNode.position,value)}})})}}function findNodes(motionController,scene){Object.values(motionController.components).forEach(component=>{const{type,touchPointNodeName,visualResponses}=component;if(type===MotionControllerConstants.ComponentType.TOUCHPAD){component.touchPointNode=scene.getObjectByName(touchPointNodeName);if(component.touchPointNode){const sphereGeometry=new SphereGeometry(0.001);const material=new MeshBasicMaterial({color:255});const sphere=new Mesh(sphereGeometry,material);component.touchPointNode.add(sphere)}else{console.warn(`Could not find touch dot, ${component.touchPointNodeName}, in touchpad component ${component.id}`)}}Object.values(visualResponses).forEach(visualResponse=>{const{valueNodeName,minNodeName,maxNodeName,valueNodeProperty}=visualResponse;if(valueNodeProperty===MotionControllerConstants.VisualResponseProperty.TRANSFORM){visualResponse.minNode=scene.getObjectByName(minNodeName);visualResponse.maxNode=scene.getObjectByName(maxNodeName);if(!visualResponse.minNode){console.warn(`Could not find ${minNodeName} in the model`);return}if(!visualResponse.maxNode){console.warn(`Could not find ${maxNodeName} in the model`);return}}visualResponse.valueNode=scene.getObjectByName(valueNodeName);if(!visualResponse.valueNode){console.warn(`Could not find ${valueNodeName} in the model`)}})})}function addAssetSceneToControllerModel(controllerModel,scene){findNodes(controllerModel.motionController,scene);if(controllerModel.envMap){scene.traverse(child=>{if(child.isMesh){child.material.envMap=controllerModel.envMap;child.material.needsUpdate=true}})}controllerModel.add(scene)}class XRControllerModelFactory{constructor(gltfLoader=null){this.gltfLoader=gltfLoader;this.path=DEFAULT_PROFILES_PATH;this._assetCache={};if(!this.gltfLoader){this.gltfLoader=new GLTFLoader}this}createControllerModel(controller,profiles=null){const controllerModel=new XRControllerModel;let scene=null;controller.addEventListener("connected",event=>{const xrInputSource=event.data;const profileInfo={profiles:profiles&&profiles(xrInputSource)||xrInputSource.profiles,handedness:xrInputSource.handedness};if(xrInputSource.targetRayMode!=="tracked-pointer"||!xrInputSource.gamepad)return;fetchProfile(profileInfo,this.path,DEFAULT_PROFILE).then(({profile,assetPath})=>{controllerModel.motionController=new MotionController(xrInputSource,profile,assetPath);const cachedAsset=this._assetCache[controllerModel.motionController.assetUrl];if(cachedAsset){scene=cachedAsset.scene.clone();addAssetSceneToControllerModel(controllerModel,scene);setTimeout(function(){controllerModel.dispatchEvent({type:"loaded"})},0)}else{if(!this.gltfLoader){throw new Error("GLTFLoader not set.")}this.gltfLoader.setPath("");this.gltfLoader.load(controllerModel.motionController.assetUrl,asset=>{this._assetCache[controllerModel.motionController.assetUrl]=asset;scene=asset.scene.clone();addAssetSceneToControllerModel(controllerModel,scene);controllerModel.dispatchEvent({type:"loaded"})},null,()=>{throw new Error(`Asset ${controllerModel.motionController.assetUrl} missing or malformed.`)})}}).catch(err=>{console.warn(err)})});controller.addEventListener("disconnected",()=>{controllerModel.motionController=null;controllerModel.remove(scene);scene=null});return controllerModel}}THREE.XRControllerModelFactory=XRControllerModelFactory})();(function(){const DepthLimitedBlurShader={defines:{"KERNEL_RADIUS":4,"DEPTH_PACKING":1,"PERSPECTIVE_CAMERA":1},uniforms:{"tDiffuse":{value:null},"size":{value:new THREE.Vector2(512,512)},"sampleUvOffsets":{value:[new THREE.Vector2(0,0)]},"sampleWeights":{value:[1]},"tDepth":{value:null},"cameraNear":{value:10},"cameraFar":{value:1000},"depthCutoff":{value:10}},vertexShader:`

		#include <common>

		uniform vec2 size;

		varying vec2 vUv;
		varying vec2 vInvSize;

		void main() {
			vUv = uv;
			vInvSize = 1.0 / size;

			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
		}`,fragmentShader:`

		#include <common>
		#include <packing>

		uniform sampler2D tDiffuse;
		uniform sampler2D tDepth;

		uniform float cameraNear;
		uniform float cameraFar;
		uniform float depthCutoff;

		uniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ];
		uniform float sampleWeights[ KERNEL_RADIUS + 1 ];

		varying vec2 vUv;
		varying vec2 vInvSize;

		float getDepth( const in vec2 screenPosition ) {
			#if DEPTH_PACKING == 1
			return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );
			#else
			return texture2D( tDepth, screenPosition ).x;
			#endif
		}

		float getViewZ( const in float depth ) {
			#if PERSPECTIVE_CAMERA == 1
			return perspectiveDepthToViewZ( depth, cameraNear, cameraFar );
			#else
			return orthographicDepthToViewZ( depth, cameraNear, cameraFar );
			#endif
		}

		void main() {
			float depth = getDepth( vUv );
			if( depth >= ( 1.0 - EPSILON ) ) {
				discard;
			}

			float centerViewZ = -getViewZ( depth );
			bool rBreak = false, lBreak = false;

			float weightSum = sampleWeights[0];
			vec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum;

			for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {

				float sampleWeight = sampleWeights[i];
				vec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize;

				vec2 sampleUv = vUv + sampleUvOffset;
				float viewZ = -getViewZ( getDepth( sampleUv ) );

				if( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true;

				if( ! rBreak ) {
					diffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;
					weightSum += sampleWeight;
				}

				sampleUv = vUv - sampleUvOffset;
				viewZ = -getViewZ( getDepth( sampleUv ) );

				if( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true;

				if( ! lBreak ) {
					diffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;
					weightSum += sampleWeight;
				}

			}

			gl_FragColor = diffuseSum / weightSum;
		}`};const BlurShaderUtils={createSampleWeights:function(kernelRadius,stdDev){const weights=[];for(let i=0;i<=kernelRadius;i++){weights.push(gaussian(i,stdDev))}return weights},createSampleOffsets:function(kernelRadius,uvIncrement){const offsets=[];for(let i=0;i<=kernelRadius;i++){offsets.push(uvIncrement.clone().multiplyScalar(i))}return offsets},configure:function(material,kernelRadius,stdDev,uvIncrement){material.defines["KERNEL_RADIUS"]=kernelRadius;material.uniforms["sampleUvOffsets"].value=BlurShaderUtils.createSampleOffsets(kernelRadius,uvIncrement);material.uniforms["sampleWeights"].value=BlurShaderUtils.createSampleWeights(kernelRadius,stdDev);material.needsUpdate=true}};function gaussian(x,stdDev){return Math.exp(-(x*x)/(2*(stdDev*stdDev)))/(Math.sqrt(2*Math.PI)*stdDev)}THREE.BlurShaderUtils=BlurShaderUtils;THREE.DepthLimitedBlurShader=DepthLimitedBlurShader})();(function(){class EffectComposer{constructor(renderer,renderTarget){this.renderer=renderer;if(renderTarget===undefined){const size=renderer.getSize(new THREE.Vector2);this._pixelRatio=renderer.getPixelRatio();this._width=size.width;this._height=size.height;renderTarget=new THREE.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio);renderTarget.texture.name="EffectComposer.rt1"}else{this._pixelRatio=1;this._width=renderTarget.width;this._height=renderTarget.height}this.renderTarget1=renderTarget;this.renderTarget2=renderTarget.clone();this.renderTarget2.texture.name="EffectComposer.rt2";this.writeBuffer=this.renderTarget1;this.readBuffer=this.renderTarget2;this.renderToScreen=true;this.passes=[];if(THREE.CopyShader===undefined){console.error("THREE.EffectComposer relies on THREE.CopyShader")}if(THREE.ShaderPass===undefined){console.error("THREE.EffectComposer relies on THREE.ShaderPass")}this.copyPass=new THREE.ShaderPass(THREE.CopyShader);this.clock=new THREE.Clock}swapBuffers(){const tmp=this.readBuffer;this.readBuffer=this.writeBuffer;this.writeBuffer=tmp}addPass(pass){this.passes.push(pass);pass.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(pass,index){this.passes.splice(index,0,pass);pass.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(pass){const index=this.passes.indexOf(pass);if(index!==-1){this.passes.splice(index,1)}}isLastEnabledPass(passIndex){for(let i=passIndex+1;i<this.passes.length;i++){if(this.passes[i].enabled){return false}}return true}render(deltaTime){if(deltaTime===undefined){deltaTime=this.clock.getDelta()}const currentRenderTarget=this.renderer.getRenderTarget();let maskActive=false;for(let i=0,il=this.passes.length;i<il;i++){const pass=this.passes[i];if(pass.enabled===false)continue;pass.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(i);pass.render(this.renderer,this.writeBuffer,this.readBuffer,deltaTime,maskActive);if(pass.needsSwap){if(maskActive){const context=this.renderer.getContext();const stencil=this.renderer.state.buffers.stencil;stencil.setFunc(context.NOTEQUAL,1,4294967295);this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,deltaTime);stencil.setFunc(context.EQUAL,1,4294967295)}this.swapBuffers()}if(THREE.MaskPass!==undefined){if(pass instanceof THREE.MaskPass){maskActive=true}else if(pass instanceof THREE.ClearMaskPass){maskActive=false}}}this.renderer.setRenderTarget(currentRenderTarget)}reset(renderTarget){if(renderTarget===undefined){const size=this.renderer.getSize(new THREE.Vector2);this._pixelRatio=this.renderer.getPixelRatio();this._width=size.width;this._height=size.height;renderTarget=this.renderTarget1.clone();renderTarget.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose();this.renderTarget2.dispose();this.renderTarget1=renderTarget;this.renderTarget2=renderTarget.clone();this.writeBuffer=this.renderTarget1;this.readBuffer=this.renderTarget2}setSize(width,height){this._width=width;this._height=height;const effectiveWidth=this._width*this._pixelRatio;const effectiveHeight=this._height*this._pixelRatio;this.renderTarget1.setSize(effectiveWidth,effectiveHeight);this.renderTarget2.setSize(effectiveWidth,effectiveHeight);for(let i=0;i<this.passes.length;i++){this.passes[i].setSize(effectiveWidth,effectiveHeight)}}setPixelRatio(pixelRatio){this._pixelRatio=pixelRatio;this.setSize(this._width,this._height)}}class Pass{constructor(){this.enabled=true;this.needsSwap=true;this.clear=false;this.renderToScreen=false}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}const _camera=new THREE.OrthographicCamera(-1,1,1,-1,0,1);const _geometry=new THREE.BufferGeometry;_geometry.setAttribute("position",new THREE.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3));_geometry.setAttribute("uv",new THREE.Float32BufferAttribute([0,2,0,0,2,0],2));class FullScreenQuad{constructor(material){this._mesh=new THREE.Mesh(_geometry,material)}dispose(){this._mesh.geometry.dispose()}render(renderer){renderer.render(this._mesh,_camera)}get material(){return this._mesh.material}set material(value){this._mesh.material=value}}THREE.EffectComposer=EffectComposer;THREE.FullScreenQuad=FullScreenQuad;THREE.Pass=Pass})();(function(){const BlendShader={uniforms:{"tDiffuse1":{value:null},"tDiffuse2":{value:null},"mixRatio":{value:0.5},"opacity":{value:1}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform float opacity;
		uniform float mixRatio;

		uniform sampler2D tDiffuse1;
		uniform sampler2D tDiffuse2;

		varying vec2 vUv;

		void main() {

			vec4 texel1 = texture2D( tDiffuse1, vUv );
			vec4 texel2 = texture2D( tDiffuse2, vUv );
			gl_FragColor = mix( texel1, texel2, mixRatio );
			gl_FragColor.a *= opacity;

		}`};THREE.BlendShader=BlendShader})();(function(){const CopyShader={uniforms:{"tDiffuse":{value:null},"opacity":{value:1}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		void main() {

			gl_FragColor = texture2D( tDiffuse, vUv );
			gl_FragColor.a *= opacity;


		}`};THREE.CopyShader=CopyShader})();(function(){const FXAAShader={uniforms:{"tDiffuse":{value:null},"resolution":{value:new THREE.Vector2(1/1024,1/512)}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`
	precision highp float;

	uniform sampler2D tDiffuse;

	uniform vec2 resolution;

	varying vec2 vUv;

	// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)

	//----------------------------------------------------------------------------------
	// File:        es3-kepler\FXAA\assets\shaders/FXAA_DefaultES.frag
	// SDK Version: v3.00
	// Email:       gameworks@nvidia.com
	// Site:        http://developer.nvidia.com/
	//
	// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
	//
	// Redistribution and use in source and binary forms, with or without
	// modification, are permitted provided that the following conditions
	// are met:
	//  * Redistributions of source code must retain the above copyright
	//    notice, this list of conditions and the following disclaimer.
	//  * Redistributions in binary form must reproduce the above copyright
	//    notice, this list of conditions and the following disclaimer in the
	//    documentation and/or other materials provided with the distribution.
	//  * Neither the name of NVIDIA CORPORATION nor the names of its
	//    contributors may be used to endorse or promote products derived
	//    from this software without specific prior written permission.
	//
	// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
	// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
	// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
	// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
	// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
	// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
	// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
	// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
	// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
	// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
	// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	//
	//----------------------------------------------------------------------------------

	#ifndef FXAA_DISCARD
			//
			// Only valid for PC OpenGL currently.
			// Probably will not work when FXAA_GREEN_AS_LUMA = 1.
			//
			// 1 = Use discard on pixels which don't need AA.
			//     For APIs which enable concurrent TEX+ROP from same surface.
			// 0 = Return unchanged color on pixels which don't need AA.
			//
			#define FXAA_DISCARD 0
	#endif

	/*--------------------------------------------------------------------------*/
	#define FxaaTexTop(t, p) texture2D(t, p, -100.0)
	#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), -100.0)
	/*--------------------------------------------------------------------------*/

	#define NUM_SAMPLES 5

	// assumes colors have premultipliedAlpha, so that the calculated color contrast is scaled by alpha
	float contrast( vec4 a, vec4 b ) {
			vec4 diff = abs( a - b );
			return max( max( max( diff.r, diff.g ), diff.b ), diff.a );
	}

	/*============================================================================

									FXAA3 QUALITY - PC

	============================================================================*/

	/*--------------------------------------------------------------------------*/
	vec4 FxaaPixelShader(
			vec2 posM,
			sampler2D tex,
			vec2 fxaaQualityRcpFrame,
			float fxaaQualityEdgeThreshold,
			float fxaaQualityinvEdgeThreshold
	) {
			vec4 rgbaM = FxaaTexTop(tex, posM);
			vec4 rgbaS = FxaaTexOff(tex, posM, vec2( 0.0, 1.0), fxaaQualityRcpFrame.xy);
			vec4 rgbaE = FxaaTexOff(tex, posM, vec2( 1.0, 0.0), fxaaQualityRcpFrame.xy);
			vec4 rgbaN = FxaaTexOff(tex, posM, vec2( 0.0,-1.0), fxaaQualityRcpFrame.xy);
			vec4 rgbaW = FxaaTexOff(tex, posM, vec2(-1.0, 0.0), fxaaQualityRcpFrame.xy);
			// . S .
			// W M E
			// . N .

			bool earlyExit = max( max( max(
					contrast( rgbaM, rgbaN ),
					contrast( rgbaM, rgbaS ) ),
					contrast( rgbaM, rgbaE ) ),
					contrast( rgbaM, rgbaW ) )
					< fxaaQualityEdgeThreshold;
			// . 0 .
			// 0 0 0
			// . 0 .

			#if (FXAA_DISCARD == 1)
					if(earlyExit) FxaaDiscard;
			#else
					if(earlyExit) return rgbaM;
			#endif

			float contrastN = contrast( rgbaM, rgbaN );
			float contrastS = contrast( rgbaM, rgbaS );
			float contrastE = contrast( rgbaM, rgbaE );
			float contrastW = contrast( rgbaM, rgbaW );

			float relativeVContrast = ( contrastN + contrastS ) - ( contrastE + contrastW );
			relativeVContrast *= fxaaQualityinvEdgeThreshold;

			bool horzSpan = relativeVContrast > 0.;
			// . 1 .
			// 0 0 0
			// . 1 .

			// 45 deg edge detection and corners of objects, aka V/H contrast is too similar
			if( abs( relativeVContrast ) < .3 ) {
					// locate the edge
					vec2 dirToEdge;
					dirToEdge.x = contrastE > contrastW ? 1. : -1.;
					dirToEdge.y = contrastS > contrastN ? 1. : -1.;
					// . 2 .      . 1 .
					// 1 0 2  ~=  0 0 1
					// . 1 .      . 0 .

					// tap 2 pixels and see which ones are "outside" the edge, to
					// determine if the edge is vertical or horizontal

					vec4 rgbaAlongH = FxaaTexOff(tex, posM, vec2( dirToEdge.x, -dirToEdge.y ), fxaaQualityRcpFrame.xy);
					float matchAlongH = contrast( rgbaM, rgbaAlongH );
					// . 1 .
					// 0 0 1
					// . 0 H

					vec4 rgbaAlongV = FxaaTexOff(tex, posM, vec2( -dirToEdge.x, dirToEdge.y ), fxaaQualityRcpFrame.xy);
					float matchAlongV = contrast( rgbaM, rgbaAlongV );
					// V 1 .
					// 0 0 1
					// . 0 .

					relativeVContrast = matchAlongV - matchAlongH;
					relativeVContrast *= fxaaQualityinvEdgeThreshold;

					if( abs( relativeVContrast ) < .3 ) { // 45 deg edge
							// 1 1 .
							// 0 0 1
							// . 0 1

							// do a simple blur
							return mix(
									rgbaM,
									(rgbaN + rgbaS + rgbaE + rgbaW) * .25,
									.4
							);
					}

					horzSpan = relativeVContrast > 0.;
			}

			if(!horzSpan) rgbaN = rgbaW;
			if(!horzSpan) rgbaS = rgbaE;
			// . 0 .      1
			// 1 0 1  ->  0
			// . 0 .      1

			bool pairN = contrast( rgbaM, rgbaN ) > contrast( rgbaM, rgbaS );
			if(!pairN) rgbaN = rgbaS;

			vec2 offNP;
			offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
			offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;

			bool doneN = false;
			bool doneP = false;

			float nDist = 0.;
			float pDist = 0.;

			vec2 posN = posM;
			vec2 posP = posM;

			int iterationsUsed = 0;
			int iterationsUsedN = 0;
			int iterationsUsedP = 0;
			for( int i = 0; i < NUM_SAMPLES; i++ ) {
					iterationsUsed = i;

					float increment = float(i + 1);

					if(!doneN) {
							nDist += increment;
							posN = posM + offNP * nDist;
							vec4 rgbaEndN = FxaaTexTop(tex, posN.xy);
							doneN = contrast( rgbaEndN, rgbaM ) > contrast( rgbaEndN, rgbaN );
							iterationsUsedN = i;
					}

					if(!doneP) {
							pDist += increment;
							posP = posM - offNP * pDist;
							vec4 rgbaEndP = FxaaTexTop(tex, posP.xy);
							doneP = contrast( rgbaEndP, rgbaM ) > contrast( rgbaEndP, rgbaN );
							iterationsUsedP = i;
					}

					if(doneN || doneP) break;
			}


			if ( !doneP && !doneN ) return rgbaM; // failed to find end of edge

			float dist = min(
					doneN ? float( iterationsUsedN ) / float( NUM_SAMPLES - 1 ) : 1.,
					doneP ? float( iterationsUsedP ) / float( NUM_SAMPLES - 1 ) : 1.
			);

			// hacky way of reduces blurriness of mostly diagonal edges
			// but reduces AA quality
			dist = pow(dist, .5);

			dist = 1. - dist;

			return mix(
					rgbaM,
					rgbaN,
					dist * .5
			);
	}

	void main() {
			const float edgeDetectionQuality = .2;
			const float invEdgeDetectionQuality = 1. / edgeDetectionQuality;

			gl_FragColor = FxaaPixelShader(
					vUv,
					tDiffuse,
					resolution,
					edgeDetectionQuality, // [0,1] contrast needed, otherwise early discard
					invEdgeDetectionQuality
			);

	}
	`};THREE.FXAAShader=FXAAShader})();(function(){const GammaCorrectionShader={uniforms:{"tDiffuse":{value:null}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		

		void main() {

			vec4 tex = texture2D( tDiffuse, vUv );

			gl_FragColor = sRGBTransferOETF( tex );

		}`};THREE.GammaCorrectionShader=GammaCorrectionShader})();(function(require){class CustomRenderPass extends THREE.Pass{constructor(renderCallback){super();this.renderCallback=renderCallback;this.scene=null;this.camera=null;this.clear=true;this.clearDepth=false;this.needsSwap=false}render(renderer,writeBuffer,readBuffer,delta,maskActive){var oldAutoClear=renderer.autoClear;renderer.autoClear=false;this.renderCallback(renderer,this.scene,this.camera,this.renderToScreen?null:readBuffer,this.clear);renderer.autoClear=oldAutoClear}}THREE.CustomRenderPass=CustomRenderPass})();(function(){class MaskPass extends THREE.Pass{constructor(scene,camera){super();this.scene=scene;this.camera=camera;this.clear=true;this.needsSwap=false;this.inverse=false}render(renderer,writeBuffer,readBuffer){const context=renderer.getContext();const state=renderer.state;state.buffers.color.setMask(false);state.buffers.depth.setMask(false);state.buffers.color.setLocked(true);state.buffers.depth.setLocked(true);let writeValue,clearValue;if(this.inverse){writeValue=0;clearValue=1}else{writeValue=1;clearValue=0}state.buffers.stencil.setTest(true);state.buffers.stencil.setOp(context.REPLACE,context.REPLACE,context.REPLACE);state.buffers.stencil.setFunc(context.ALWAYS,writeValue,4294967295);state.buffers.stencil.setClear(clearValue);state.buffers.stencil.setLocked(true);renderer.setRenderTarget(readBuffer);if(this.clear)renderer.clear();renderer.render(this.scene,this.camera);renderer.setRenderTarget(writeBuffer);if(this.clear)renderer.clear();renderer.render(this.scene,this.camera);state.buffers.color.setLocked(false);state.buffers.depth.setLocked(false);state.buffers.stencil.setLocked(false);state.buffers.stencil.setFunc(context.EQUAL,1,4294967295);state.buffers.stencil.setOp(context.KEEP,context.KEEP,context.KEEP);state.buffers.stencil.setLocked(true)}}class ClearMaskPass extends THREE.Pass{constructor(){super();this.needsSwap=false}render(renderer){renderer.state.buffers.stencil.setLocked(false);renderer.state.buffers.stencil.setTest(false)}}THREE.ClearMaskPass=ClearMaskPass;THREE.MaskPass=MaskPass})();(function(){var vertexShader=["varying vec2 vUv;","void main() {","    gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","    vUv = uv;","}"].join("\n");var fragmentShader=["varying vec2 vUv;","uniform sampler2D tDepth;","uniform sampler2D tColor;","uniform mat4 inverseProjectionMatrix;","uniform float near;","uniform float far;","uniform float depthLimit;","uniform mat4 clipToWorldMatrix;","uniform mat4 previousWorldToClipMatrix;","uniform vec3 cameraMove;    ","uniform float velocityFactor;","uniform float delta;","void main() {","    float zOverW = texture2D(tDepth, vUv).x;","    vec4 clipPosition = vec4(vUv.x * 2. - 1., vUv.y * 2. - 1., zOverW * 2. - 1., 1.);","    vec4 cameraSpacePosition = inverseProjectionMatrix * clipPosition;","    cameraSpacePosition /= cameraSpacePosition.w;","    float depth = -(cameraSpacePosition.z - near) / (far - near);","    if (depth > depthLimit)","    {","       gl_FragColor = texture2D(tColor, vUv);","       return;","    }","    vec4 worldPosition = clipToWorldMatrix * clipPosition;","    worldPosition /= worldPosition.w;","    vec4 previousClipPosition = worldPosition;","    previousClipPosition.xyz -= cameraMove * (","        1. - smoothstep(.3, 1., clamp(length(clipPosition.xy), 0., 1.))","    );","    previousClipPosition = previousWorldToClipMatrix * previousClipPosition;","    previousClipPosition /= previousClipPosition.w;","    vec2 velocity = velocityFactor * (clipPosition - previousClipPosition).xy / delta * 16.67;","    vec4 finalColor = vec4(0.);","    vec2 offset = vec2(0.);","    float weight = 0.;","    for(int i = 0; i < SAMPLE_COUNT; i++) {","            offset = velocity * (float(i) / (float(SAMPLE_COUNT) - 1.) - .5);","            vec4 c = texture2D(tColor, vUv + offset);","        finalColor += c;","    }","    finalColor /= float(SAMPLE_COUNT);","    gl_FragColor = vec4(finalColor.rgb, 1.);","}"].join("\n");var uniforms={"tDepth":{type:"t",value:null},"tColor":{type:"t",value:null},"velocityFactor":{type:"f",value:1},"delta":{type:"f",value:16.67},"inverseProjectionMatrix":{type:"m4",value:new THREE.Matrix4},"clipToWorldMatrix":{type:"m4",value:new THREE.Matrix4},"previousWorldToClipMatrix":{type:"m4",value:new THREE.Matrix4},"cameraMove":{type:"v3",value:new THREE.Vector3},"near":{type:"f",value:1},"far":{type:"f",value:1000},"depthLimit":{type:"f",value:0.99}};class MotionBlurPass extends THREE.Pass{constructor(sampleCount){super();this._sampleCount=sampleCount;this.uniforms=THREE.UniformsUtils.clone(uniforms);this.material=new THREE.ShaderMaterial({defines:{},uniforms:this.uniforms,vertexShader:vertexShader,fragmentShader:"#define SAMPLE_COUNT "+sampleCount+"\n"+fragmentShader});this.fsQuad=new THREE.FullScreenQuad(this.material)}getSampleCount(){return this._sampleCount}render(renderer,writeBuffer,readBuffer,deltaTime,maskActive){this.uniforms["tColor"].value=readBuffer.texture;this.uniforms["tDepth"].value=readBuffer.depthTexture;this.fsQuad.material=this.material;if(this.renderToScreen){renderer.setRenderTarget(null);this.fsQuad.render(renderer)}else{renderer.setRenderTarget(writeBuffer);if(this.clear)renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil);this.fsQuad.render(renderer)}}dispose(){this.fsQuad.dispose();this.material.dispose()}};THREE.MotionBlurPass=MotionBlurPass})();(function(){class RenderPass extends THREE.Pass{constructor(scene,camera,overrideMaterial,clearColor,clearAlpha){super();this.scene=scene;this.camera=camera;this.overrideMaterial=overrideMaterial;this.clearColor=clearColor;this.clearAlpha=clearAlpha!==undefined?clearAlpha:0;this.clear=true;this.clearDepth=false;this.needsSwap=false;this._oldClearColor=new THREE.Color}render(renderer,writeBuffer,readBuffer){const oldAutoClear=renderer.autoClear;renderer.autoClear=false;let oldClearAlpha,oldOverrideMaterial;if(this.overrideMaterial!==undefined){oldOverrideMaterial=this.scene.overrideMaterial;this.scene.overrideMaterial=this.overrideMaterial}if(this.clearColor){renderer.getClearColor(this._oldClearColor);oldClearAlpha=renderer.getClearAlpha();renderer.setClearColor(this.clearColor,this.clearAlpha)}if(this.clearDepth){renderer.clearDepth()}renderer.setRenderTarget(this.renderToScreen?null:readBuffer);if(this.clear)renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil);renderer.render(this.scene,this.camera);if(this.clearColor){renderer.setClearColor(this._oldClearColor,oldClearAlpha)}if(this.overrideMaterial!==undefined){this.scene.overrideMaterial=oldOverrideMaterial}renderer.autoClear=oldAutoClear}}THREE.RenderPass=RenderPass})();(function(){class SAOPass extends THREE.Pass{constructor(scene,camera,useDepthTexture=false,useNormals=false,resolution=new THREE.Vector2(256,256)){super();this.scene=scene;this.camera=camera;this.clear=true;this.needsSwap=false;this.supportsDepthTextureExtension=useDepthTexture;this.supportsNormalTexture=useNormals;this.originalClearColor=new THREE.Color;this._oldClearColor=new THREE.Color;this.oldClearAlpha=1;this.params={output:0,saoBias:0.5,saoIntensity:0.18,saoScale:1,saoKernelRadius:100,saoMinResolution:0,saoBlur:true,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:0.01};this.resolution=new THREE.Vector2(resolution.x,resolution.y);this.saoRenderTarget=new THREE.WebGLRenderTarget(this.resolution.x,this.resolution.y);this.blurIntermediateRenderTarget=this.saoRenderTarget.clone();this.beautyRenderTarget=this.saoRenderTarget.clone();this.normalRenderTarget=new THREE.WebGLRenderTarget(this.resolution.x,this.resolution.y,{minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter});this.depthRenderTarget=this.normalRenderTarget.clone();let depthTexture;if(this.supportsDepthTextureExtension){depthTexture=new THREE.DepthTexture;depthTexture.type=THREE.UnsignedShortType;this.beautyRenderTarget.depthTexture=depthTexture;this.beautyRenderTarget.depthBuffer=true}this.depthMaterial=new THREE.MeshDepthMaterial;this.depthMaterial.depthPacking=THREE.RGBADepthPacking;this.depthMaterial.blending=THREE.NoBlending;this.normalMaterial=new THREE.MeshNormalMaterial;this.normalMaterial.blending=THREE.NoBlending;if(THREE.SAOShader===undefined){console.error("THREE.SAOPass relies on THREE.SAOShader")}this.saoMaterial=new THREE.ShaderMaterial({defines:Object.assign({},THREE.SAOShader.defines),fragmentShader:THREE.SAOShader.fragmentShader,vertexShader:THREE.SAOShader.vertexShader,uniforms:THREE.UniformsUtils.clone(THREE.SAOShader.uniforms)});this.saoMaterial.extensions.derivatives=true;this.saoMaterial.defines["DEPTH_PACKING"]=this.supportsDepthTextureExtension?0:1;this.saoMaterial.defines["NORMAL_TEXTURE"]=this.supportsNormalTexture?1:0;this.saoMaterial.defines["PERSPECTIVE_CAMERA"]=this.camera.isPerspectiveCamera?1:0;this.saoMaterial.uniforms["tDepth"].value=this.supportsDepthTextureExtension?depthTexture:this.depthRenderTarget.texture;this.saoMaterial.uniforms["tNormal"].value=this.normalRenderTarget.texture;this.saoMaterial.uniforms["size"].value.set(this.resolution.x,this.resolution.y);this.saoMaterial.uniforms["cameraInverseProjectionMatrix"].value.copy(this.camera.projectionMatrixInverse);this.saoMaterial.uniforms["cameraProjectionMatrix"].value=this.camera.projectionMatrix;this.saoMaterial.blending=THREE.NoBlending;if(THREE.DepthLimitedBlurShader===undefined){console.error("THREE.SAOPass relies on THREE.DepthLimitedBlurShader")}this.vBlurMaterial=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.clone(THREE.DepthLimitedBlurShader.uniforms),defines:Object.assign({},THREE.DepthLimitedBlurShader.defines),vertexShader:THREE.DepthLimitedBlurShader.vertexShader,fragmentShader:THREE.DepthLimitedBlurShader.fragmentShader});this.vBlurMaterial.defines["DEPTH_PACKING"]=this.supportsDepthTextureExtension?0:1;this.vBlurMaterial.defines["PERSPECTIVE_CAMERA"]=this.camera.isPerspectiveCamera?1:0;this.vBlurMaterial.uniforms["tDiffuse"].value=this.saoRenderTarget.texture;this.vBlurMaterial.uniforms["tDepth"].value=this.supportsDepthTextureExtension?depthTexture:this.depthRenderTarget.texture;this.vBlurMaterial.uniforms["size"].value.set(this.resolution.x,this.resolution.y);this.vBlurMaterial.blending=THREE.NoBlending;this.hBlurMaterial=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.clone(THREE.DepthLimitedBlurShader.uniforms),defines:Object.assign({},THREE.DepthLimitedBlurShader.defines),vertexShader:THREE.DepthLimitedBlurShader.vertexShader,fragmentShader:THREE.DepthLimitedBlurShader.fragmentShader});this.hBlurMaterial.defines["DEPTH_PACKING"]=this.supportsDepthTextureExtension?0:1;this.hBlurMaterial.defines["PERSPECTIVE_CAMERA"]=this.camera.isPerspectiveCamera?1:0;this.hBlurMaterial.uniforms["tDiffuse"].value=this.blurIntermediateRenderTarget.texture;this.hBlurMaterial.uniforms["tDepth"].value=this.supportsDepthTextureExtension?depthTexture:this.depthRenderTarget.texture;this.hBlurMaterial.uniforms["size"].value.set(this.resolution.x,this.resolution.y);this.hBlurMaterial.blending=THREE.NoBlending;if(THREE.CopyShader===undefined){console.error("THREE.SAOPass relies on THREE.CopyShader")}this.materialCopy=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.clone(THREE.CopyShader.uniforms),vertexShader:THREE.CopyShader.vertexShader,fragmentShader:THREE.CopyShader.fragmentShader,blending:THREE.NoBlending});this.materialCopy.transparent=true;this.materialCopy.depthTest=false;this.materialCopy.depthWrite=false;this.materialCopy.blending=THREE.CustomBlending;this.materialCopy.blendSrc=THREE.DstColorFactor;this.materialCopy.blendDst=THREE.ZeroFactor;this.materialCopy.blendEquation=THREE.AddEquation;this.materialCopy.blendSrcAlpha=THREE.DstAlphaFactor;this.materialCopy.blendDstAlpha=THREE.ZeroFactor;this.materialCopy.blendEquationAlpha=THREE.AddEquation;if(THREE.UnpackDepthRGBAShader===undefined){console.error("THREE.SAOPass relies on THREE.UnpackDepthRGBAShader")}this.depthCopy=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.clone(THREE.UnpackDepthRGBAShader.uniforms),vertexShader:THREE.UnpackDepthRGBAShader.vertexShader,fragmentShader:THREE.UnpackDepthRGBAShader.fragmentShader,blending:THREE.NoBlending});this.fsQuad=new THREE.FullScreenQuad(null)}render(renderer,writeBuffer,readBuffer){if(this.renderToScreen){this.materialCopy.blending=THREE.NoBlending;this.materialCopy.uniforms["tDiffuse"].value=readBuffer.texture;this.materialCopy.needsUpdate=true;this.renderPass(renderer,this.materialCopy,null)}if(this.params.output===1){return}renderer.getClearColor(this._oldClearColor);this.oldClearAlpha=renderer.getClearAlpha();const oldAutoClear=renderer.autoClear;renderer.autoClear=false;renderer.setRenderTarget(this.depthRenderTarget);renderer.clear();this.saoMaterial.uniforms["bias"].value=this.params.saoBias;this.saoMaterial.uniforms["intensity"].value=this.params.saoIntensity;this.saoMaterial.uniforms["scale"].value=this.params.saoScale;this.saoMaterial.uniforms["kernelRadius"].value=this.params.saoKernelRadius;this.saoMaterial.uniforms["minResolution"].value=this.params.saoMinResolution;this.saoMaterial.uniforms["cameraNear"].value=this.camera.near;this.saoMaterial.uniforms["cameraFar"].value=this.camera.far;const depthCutoff=this.params.saoBlurDepthCutoff*(this.camera.far-this.camera.near);this.vBlurMaterial.uniforms["depthCutoff"].value=depthCutoff;this.hBlurMaterial.uniforms["depthCutoff"].value=depthCutoff;this.vBlurMaterial.uniforms["cameraNear"].value=this.camera.near;this.vBlurMaterial.uniforms["cameraFar"].value=this.camera.far;this.hBlurMaterial.uniforms["cameraNear"].value=this.camera.near;this.hBlurMaterial.uniforms["cameraFar"].value=this.camera.far;this.params.saoBlurRadius=Math.floor(this.params.saoBlurRadius);if(this.prevStdDev!==this.params.saoBlurStdDev||this.prevNumSamples!==this.params.saoBlurRadius){THREE.BlurShaderUtils.configure(this.vBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new THREE.Vector2(0,1));THREE.BlurShaderUtils.configure(this.hBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new THREE.Vector2(1,0));this.prevStdDev=this.params.saoBlurStdDev;this.prevNumSamples=this.params.saoBlurRadius}renderer.setClearColor(0);renderer.setRenderTarget(this.beautyRenderTarget);renderer.clear();renderer.render(this.scene,this.camera);if(!this.supportsDepthTextureExtension){this.renderOverride(renderer,this.depthMaterial,this.depthRenderTarget,0,1)}if(this.supportsNormalTexture){this.renderOverride(renderer,this.normalMaterial,this.normalRenderTarget,7829503,1)}this.renderPass(renderer,this.saoMaterial,this.saoRenderTarget,16777215,1);if(this.params.saoBlur){this.renderPass(renderer,this.vBlurMaterial,this.blurIntermediateRenderTarget,16777215,1);this.renderPass(renderer,this.hBlurMaterial,this.saoRenderTarget,16777215,1)}let outputMaterial=this.materialCopy;if(this.params.output===3){if(this.supportsDepthTextureExtension){this.materialCopy.uniforms["tDiffuse"].value=this.beautyRenderTarget.depthTexture;this.materialCopy.needsUpdate=true}else{this.depthCopy.uniforms["tDiffuse"].value=this.depthRenderTarget.texture;this.depthCopy.needsUpdate=true;outputMaterial=this.depthCopy}}else if(this.params.output===4){this.materialCopy.uniforms["tDiffuse"].value=this.normalRenderTarget.texture;this.materialCopy.needsUpdate=true}else{this.materialCopy.uniforms["tDiffuse"].value=this.saoRenderTarget.texture;this.materialCopy.needsUpdate=true}if(this.params.output===0){outputMaterial.blending=THREE.CustomBlending}else{outputMaterial.blending=THREE.NoBlending}this.renderPass(renderer,outputMaterial,this.renderToScreen?null:readBuffer);renderer.setClearColor(this._oldClearColor,this.oldClearAlpha);renderer.autoClear=oldAutoClear}renderPass(renderer,passMaterial,renderTarget,clearColor,clearAlpha){renderer.getClearColor(this.originalClearColor);const originalClearAlpha=renderer.getClearAlpha();const originalAutoClear=renderer.autoClear;renderer.setRenderTarget(renderTarget);renderer.autoClear=false;if(clearColor!==undefined&&clearColor!==null){renderer.setClearColor(clearColor);renderer.setClearAlpha(clearAlpha||0);renderer.clear()}this.fsQuad.material=passMaterial;this.fsQuad.render(renderer);renderer.autoClear=originalAutoClear;renderer.setClearColor(this.originalClearColor);renderer.setClearAlpha(originalClearAlpha)}renderOverride(renderer,overrideMaterial,renderTarget,clearColor,clearAlpha){renderer.getClearColor(this.originalClearColor);const originalClearAlpha=renderer.getClearAlpha();const originalAutoClear=renderer.autoClear;renderer.setRenderTarget(renderTarget);renderer.autoClear=false;clearColor=overrideMaterial.clearColor||clearColor;clearAlpha=overrideMaterial.clearAlpha||clearAlpha;if(clearColor!==undefined&&clearColor!==null){renderer.setClearColor(clearColor);renderer.setClearAlpha(clearAlpha||0);renderer.clear()}this.scene.overrideMaterial=overrideMaterial;renderer.render(this.scene,this.camera);this.scene.overrideMaterial=null;renderer.autoClear=originalAutoClear;renderer.setClearColor(this.originalClearColor);renderer.setClearAlpha(originalClearAlpha)}setSize(width,height){this.beautyRenderTarget.setSize(width,height);this.saoRenderTarget.setSize(width,height);this.blurIntermediateRenderTarget.setSize(width,height);this.normalRenderTarget.setSize(width,height);this.depthRenderTarget.setSize(width,height);this.saoMaterial.uniforms["size"].value.set(width,height);this.saoMaterial.uniforms["cameraInverseProjectionMatrix"].value.copy(this.camera.projectionMatrixInverse);this.saoMaterial.uniforms["cameraProjectionMatrix"].value=this.camera.projectionMatrix;this.saoMaterial.needsUpdate=true;this.vBlurMaterial.uniforms["size"].value.set(width,height);this.vBlurMaterial.needsUpdate=true;this.hBlurMaterial.uniforms["size"].value.set(width,height);this.hBlurMaterial.needsUpdate=true}}SAOPass.OUTPUT={"Beauty":1,"Default":0,"SAO":2,"Depth":3,"Normal":4};THREE.SAOPass=SAOPass})();(function(){const SAOShader={defines:{"NUM_SAMPLES":7,"NUM_RINGS":4,"NORMAL_TEXTURE":0,"DIFFUSE_TEXTURE":0,"DEPTH_PACKING":1,"PERSPECTIVE_CAMERA":1},uniforms:{"tDepth":{value:null},"tDiffuse":{value:null},"tNormal":{value:null},"size":{value:new THREE.Vector2(512,512)},"cameraNear":{value:1},"cameraFar":{value:100},"cameraProjectionMatrix":{value:new THREE.Matrix4},"cameraInverseProjectionMatrix":{value:new THREE.Matrix4},"scale":{value:1},"intensity":{value:0.1},"bias":{value:0.5},"minResolution":{value:0},"kernelRadius":{value:100},"randomSeed":{value:0}},vertexShader:`

		varying vec2 vUv;

		void main() {
			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
		}`,fragmentShader:`

		#include <common>

		varying vec2 vUv;

		#if DIFFUSE_TEXTURE == 1
		uniform sampler2D tDiffuse;
		#endif

		uniform sampler2D tDepth;

		#if NORMAL_TEXTURE == 1
		uniform sampler2D tNormal;
		#endif

		uniform float cameraNear;
		uniform float cameraFar;
		uniform mat4 cameraProjectionMatrix;
		uniform mat4 cameraInverseProjectionMatrix;

		uniform float scale;
		uniform float intensity;
		uniform float bias;
		uniform float kernelRadius;
		uniform float minResolution;
		uniform vec2 size;
		uniform float randomSeed;

		// RGBA depth

		#include <packing>

		vec4 getDefaultColor( const in vec2 screenPosition ) {
			#if DIFFUSE_TEXTURE == 1
			return texture2D( tDiffuse, vUv );
			#else
			return vec4( 1.0 );
			#endif
		}

		float getDepth( const in vec2 screenPosition ) {
			#if DEPTH_PACKING == 1
			return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );
			#else
			return texture2D( tDepth, screenPosition ).x;
			#endif
		}

		float getViewZ( const in float depth ) {
			#if PERSPECTIVE_CAMERA == 1
			return perspectiveDepthToViewZ( depth, cameraNear, cameraFar );
			#else
			return orthographicDepthToViewZ( depth, cameraNear, cameraFar );
			#endif
		}

		vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {
			float clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];
			vec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );
			clipPosition *= clipW; // unprojection.

			return ( cameraInverseProjectionMatrix * clipPosition ).xyz;
		}

		vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) {
			#if NORMAL_TEXTURE == 1
			return unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );
			#else
			return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );
			#endif
		}

		float scaleDividedByCameraFar;
		float minResolutionMultipliedByCameraFar;

		float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {
			vec3 viewDelta = sampleViewPosition - centerViewPosition;
			float viewDistance = length( viewDelta );
			float scaledScreenDistance = scaleDividedByCameraFar * viewDistance;

			return max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) );
		}

		// moving costly divides into consts
		const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );
		const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );

		float getAmbientOcclusion( const in vec3 centerViewPosition ) {
			// precompute some variables require in getOcclusion.
			scaleDividedByCameraFar = scale / cameraFar;
			minResolutionMultipliedByCameraFar = minResolution * cameraFar;
			vec3 centerViewNormal = getViewNormal( centerViewPosition, vUv );

			// jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/
			float angle = rand( vUv + randomSeed ) * PI2;
			vec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size;
			vec2 radiusStep = radius;

			float occlusionSum = 0.0;
			float weightSum = 0.0;

			for( int i = 0; i < NUM_SAMPLES; i ++ ) {
				vec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius;
				radius += radiusStep;
				angle += ANGLE_STEP;

				float sampleDepth = getDepth( sampleUv );
				if( sampleDepth >= ( 1.0 - EPSILON ) ) {
					continue;
				}

				float sampleViewZ = getViewZ( sampleDepth );
				vec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ );
				occlusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );
				weightSum += 1.0;
			}

			if( weightSum == 0.0 ) discard;

			return occlusionSum * ( intensity / weightSum );
		}

		void main() {
			float centerDepth = getDepth( vUv );
			if( centerDepth >= ( 1.0 - EPSILON ) ) {
				discard;
			}

			float centerViewZ = getViewZ( centerDepth );
			vec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ );

			float ambientOcclusion = getAmbientOcclusion( viewPosition );

			gl_FragColor = getDefaultColor( vUv );
			gl_FragColor.xyz *=  1.0 - ambientOcclusion;
		}`};THREE.SAOShader=SAOShader})();(function(){class SavePass extends THREE.Pass{constructor(renderTarget){super();if(THREE.CopyShader===undefined)console.error("THREE.SavePass relies on THREE.CopyShader");const shader=THREE.CopyShader;this.textureID="tDiffuse";this.uniforms=THREE.UniformsUtils.clone(shader.uniforms);this.material=new THREE.ShaderMaterial({uniforms:this.uniforms,vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader});this.renderTarget=renderTarget;if(this.renderTarget===undefined){this.renderTarget=new THREE.WebGLRenderTarget(window.innerWidth,window.innerHeight);this.renderTarget.texture.name="SavePass.rt"}this.needsSwap=false;this.fsQuad=new THREE.FullScreenQuad(this.material)}render(renderer,writeBuffer,readBuffer){if(this.uniforms[this.textureID]){this.uniforms[this.textureID].value=readBuffer.texture}renderer.setRenderTarget(this.renderTarget);if(this.clear)renderer.clear();this.fsQuad.render(renderer)}}THREE.SavePass=SavePass})();(function(){class ShaderPass extends THREE.Pass{constructor(shader,textureID){super();this.textureID=textureID!==undefined?textureID:"tDiffuse";if(shader instanceof THREE.ShaderMaterial){this.uniforms=shader.uniforms;this.material=shader}else if(shader){this.uniforms=THREE.UniformsUtils.clone(shader.uniforms);this.material=new THREE.ShaderMaterial({defines:Object.assign({},shader.defines),uniforms:this.uniforms,vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader})}this.fsQuad=new THREE.FullScreenQuad(this.material)}render(renderer,writeBuffer,readBuffer){if(this.uniforms[this.textureID]){this.uniforms[this.textureID].value=readBuffer.texture}this.fsQuad.material=this.material;if(this.renderToScreen){renderer.setRenderTarget(null);this.fsQuad.render(renderer)}else{renderer.setRenderTarget(writeBuffer);if(this.clear)renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil);this.fsQuad.render(renderer)}}}THREE.ShaderPass=ShaderPass})();(function(){class SMAAPass extends THREE.Pass{constructor(width,height){super();this.edgesRT=new THREE.WebGLRenderTarget(width,height,{depthBuffer:false});this.edgesRT.texture.name="SMAAPass.edges";this.weightsRT=new THREE.WebGLRenderTarget(width,height,{depthBuffer:false});this.weightsRT.texture.name="SMAAPass.weights";const scope=this;const areaTextureImage=new Image;areaTextureImage.src=this.getAreaTexture();areaTextureImage.onload=function(){scope.areaTexture.needsUpdate=true};this.areaTexture=new THREE.Texture;this.areaTexture.name="SMAAPass.area";this.areaTexture.image=areaTextureImage;this.areaTexture.minFilter=THREE.LinearFilter;this.areaTexture.generateMipmaps=false;this.areaTexture.flipY=false;const searchTextureImage=new Image;searchTextureImage.src=this.getSearchTexture();searchTextureImage.onload=function(){scope.searchTexture.needsUpdate=true};this.searchTexture=new THREE.Texture;this.searchTexture.name="SMAAPass.search";this.searchTexture.image=searchTextureImage;this.searchTexture.magFilter=THREE.NearestFilter;this.searchTexture.minFilter=THREE.NearestFilter;this.searchTexture.generateMipmaps=false;this.searchTexture.flipY=false;if(THREE.SMAAEdgesShader===undefined){console.error("THREE.SMAAPass relies on SMAAShader")}this.uniformsEdges=THREE.UniformsUtils.clone(THREE.SMAAEdgesShader.uniforms);this.uniformsEdges["resolution"].value.set(1/width,1/height);this.materialEdges=new THREE.ShaderMaterial({defines:Object.assign({},THREE.SMAAEdgesShader.defines),uniforms:this.uniformsEdges,vertexShader:THREE.SMAAEdgesShader.vertexShader,fragmentShader:THREE.SMAAEdgesShader.fragmentShader});this.uniformsWeights=THREE.UniformsUtils.clone(THREE.SMAAWeightsShader.uniforms);this.uniformsWeights["resolution"].value.set(1/width,1/height);this.uniformsWeights["tDiffuse"].value=this.edgesRT.texture;this.uniformsWeights["tArea"].value=this.areaTexture;this.uniformsWeights["tSearch"].value=this.searchTexture;this.materialWeights=new THREE.ShaderMaterial({defines:Object.assign({},THREE.SMAAWeightsShader.defines),uniforms:this.uniformsWeights,vertexShader:THREE.SMAAWeightsShader.vertexShader,fragmentShader:THREE.SMAAWeightsShader.fragmentShader});this.uniformsBlend=THREE.UniformsUtils.clone(THREE.SMAABlendShader.uniforms);this.uniformsBlend["resolution"].value.set(1/width,1/height);this.uniformsBlend["tDiffuse"].value=this.weightsRT.texture;this.materialBlend=new THREE.ShaderMaterial({uniforms:this.uniformsBlend,vertexShader:THREE.SMAABlendShader.vertexShader,fragmentShader:THREE.SMAABlendShader.fragmentShader});this.needsSwap=false;this.fsQuad=new THREE.FullScreenQuad(null)}render(renderer,writeBuffer,readBuffer){this.uniformsEdges["tDiffuse"].value=readBuffer.texture;this.fsQuad.material=this.materialEdges;renderer.setRenderTarget(this.edgesRT);if(this.clear)renderer.clear();this.fsQuad.render(renderer);this.fsQuad.material=this.materialWeights;renderer.setRenderTarget(this.weightsRT);if(this.clear)renderer.clear();this.fsQuad.render(renderer);this.uniformsBlend["tColor"].value=readBuffer.texture;this.fsQuad.material=this.materialBlend;if(this.renderToScreen){renderer.setRenderTarget(null);this.fsQuad.render(renderer)}else{renderer.setRenderTarget(writeBuffer);if(this.clear)renderer.clear();this.fsQuad.render(renderer)}}setSize(width,height){this.edgesRT.setSize(width,height);this.weightsRT.setSize(width,height);this.materialEdges.uniforms["resolution"].value.set(1/width,1/height);this.materialWeights.uniforms["resolution"].value.set(1/width,1/height);this.materialBlend.uniforms["resolution"].value.set(1/width,1/height)}getAreaTexture(){return"data:image/png;base64, "}getSearchTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="}}THREE.SMAAPass=SMAAPass})();(function(){const SMAAEdgesShader={defines:{"SMAA_THRESHOLD":"0.1"},uniforms:{"tDiffuse":{value:null},"resolution":{value:new THREE.Vector2(1/1024,1/512)}},vertexShader:`

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];

		void SMAAEdgeDetectionVS( vec2 texcoord ) {
			vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0,  1.0 ); // WebGL port note: Changed sign in W component
			vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4(  1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component
			vOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0,  2.0 ); // WebGL port note: Changed sign in W component
		}

		void main() {

			vUv = uv;

			SMAAEdgeDetectionVS( vUv );

			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];

		vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {
			vec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );

			// Calculate color deltas:
			vec4 delta;
			vec3 C = texture2D( colorTex, texcoord ).rgb;

			vec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;
			vec3 t = abs( C - Cleft );
			delta.x = max( max( t.r, t.g ), t.b );

			vec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;
			t = abs( C - Ctop );
			delta.y = max( max( t.r, t.g ), t.b );

			// We do the usual threshold:
			vec2 edges = step( threshold, delta.xy );

			// Then discard if there is no edge:
			if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )
				discard;

			// Calculate right and bottom deltas:
			vec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;
			t = abs( C - Cright );
			delta.z = max( max( t.r, t.g ), t.b );

			vec3 Cbottom  = texture2D( colorTex, offset[1].zw ).rgb;
			t = abs( C - Cbottom );
			delta.w = max( max( t.r, t.g ), t.b );

			// Calculate the maximum delta in the direct neighborhood:
			float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );

			// Calculate left-left and top-top deltas:
			vec3 Cleftleft  = texture2D( colorTex, offset[2].xy ).rgb;
			t = abs( C - Cleftleft );
			delta.z = max( max( t.r, t.g ), t.b );

			vec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;
			t = abs( C - Ctoptop );
			delta.w = max( max( t.r, t.g ), t.b );

			// Calculate the final maximum delta:
			maxDelta = max( max( maxDelta, delta.z ), delta.w );

			// Local contrast adaptation in action:
			edges.xy *= step( 0.5 * maxDelta, delta.xy );

			return vec4( edges, 0.0, 0.0 );
		}

		void main() {

			gl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );

		}`};const SMAAWeightsShader={defines:{"SMAA_MAX_SEARCH_STEPS":"8","SMAA_AREATEX_MAX_DISTANCE":"16","SMAA_AREATEX_PIXEL_SIZE":"( 1.0 / vec2( 160.0, 560.0 ) )","SMAA_AREATEX_SUBTEX_SIZE":"( 1.0 / 7.0 )"},uniforms:{"tDiffuse":{value:null},"tArea":{value:null},"tSearch":{value:null},"resolution":{value:new THREE.Vector2(1/1024,1/512)}},vertexShader:`

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];
		varying vec2 vPixcoord;

		void SMAABlendingWeightCalculationVS( vec2 texcoord ) {
			vPixcoord = texcoord / resolution;

			// We will use these offsets for the searches later on (see @PSEUDO_GATHER4):
			vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 ); // WebGL port note: Changed sign in Y and W components
			vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 ); // WebGL port note: Changed sign in Y and W components

			// And these for the searches, they indicate the ends of the loops:
			vOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );

		}

		void main() {

			vUv = uv;

			SMAABlendingWeightCalculationVS( vUv );

			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		#define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )

		uniform sampler2D tDiffuse;
		uniform sampler2D tArea;
		uniform sampler2D tSearch;
		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[3];
		varying vec2 vPixcoord;

		#if __VERSION__ == 100
		vec2 round( vec2 x ) {
			return sign( x ) * floor( abs( x ) + 0.5 );
		}
		#endif

		float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {
			// Not required if searchTex accesses are set to point:
			// float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0);
			// e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE +
			//     e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE;
			e.r = bias + e.r * scale;
			return 255.0 * texture2D( searchTex, e, 0.0 ).r;
		}

		float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
			/**
				* @PSEUDO_GATHER4
				* This texcoord has been offset by (-0.25, -0.125) in the vertex shader to
				* sample between edge, thus fetching four edges in a row.
				* Sampling with different offsets in each direction allows to disambiguate
				* which edges are active from the four fetched ones.
				*/
			vec2 e = vec2( 0.0, 1.0 );

			for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
				e = texture2D( edgesTex, texcoord, 0.0 ).rg;
				texcoord -= vec2( 2.0, 0.0 ) * resolution;
				if ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;
			}

			// We correct the previous (-0.25, -0.125) offset we applied:
			texcoord.x += 0.25 * resolution.x;

			// The searches are bias by 1, so adjust the coords accordingly:
			texcoord.x += resolution.x;

			// Disambiguate the length added by the last step:
			texcoord.x += 2.0 * resolution.x; // Undo last step
			texcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);

			return texcoord.x;
		}

		float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
			vec2 e = vec2( 0.0, 1.0 );

			for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
				e = texture2D( edgesTex, texcoord, 0.0 ).rg;
				texcoord += vec2( 2.0, 0.0 ) * resolution;
				if ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;
			}

			texcoord.x -= 0.25 * resolution.x;
			texcoord.x -= resolution.x;
			texcoord.x -= 2.0 * resolution.x;
			texcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );

			return texcoord.x;
		}

		float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
			vec2 e = vec2( 1.0, 0.0 );

			for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
				e = texture2D( edgesTex, texcoord, 0.0 ).rg;
				texcoord += vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign
				if ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;
			}

			texcoord.y -= 0.25 * resolution.y; // WebGL port note: Changed sign
			texcoord.y -= resolution.y; // WebGL port note: Changed sign
			texcoord.y -= 2.0 * resolution.y; // WebGL port note: Changed sign
			texcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 ); // WebGL port note: Changed sign

			return texcoord.y;
		}

		float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
			vec2 e = vec2( 1.0, 0.0 );

			for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
				e = texture2D( edgesTex, texcoord, 0.0 ).rg;
				texcoord -= vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign
				if ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;
			}

			texcoord.y += 0.25 * resolution.y; // WebGL port note: Changed sign
			texcoord.y += resolution.y; // WebGL port note: Changed sign
			texcoord.y += 2.0 * resolution.y; // WebGL port note: Changed sign
			texcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 ); // WebGL port note: Changed sign

			return texcoord.y;
		}

		vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {
			// Rounding prevents precision errors of bilinear filtering:
			vec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;

			// We do a scale and bias for mapping to texel space:
			texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );

			// Move to proper place, according to the subpixel offset:
			texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;

			return texture2D( areaTex, texcoord, 0.0 ).rg;
		}

		vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {
			vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );

			vec2 e = texture2D( edgesTex, texcoord ).rg;

			if ( e.g > 0.0 ) { // Edge at north
				vec2 d;

				// Find the distance to the left:
				vec2 coords;
				coords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );
				coords.y = offset[ 1 ].y; // offset[1].y = texcoord.y - 0.25 * resolution.y (@CROSSING_OFFSET)
				d.x = coords.x;

				// Now fetch the left crossing edges, two at a time using bilinear
				// filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to
				// discern what value each edge has:
				float e1 = texture2D( edgesTex, coords, 0.0 ).r;

				// Find the distance to the right:
				coords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );
				d.y = coords.x;

				// We want the distances to be in pixel units (doing this here allow to
				// better interleave arithmetic and memory accesses):
				d = d / resolution.x - pixcoord.x;

				// SMAAArea below needs a sqrt, as the areas texture is compressed
				// quadratically:
				vec2 sqrt_d = sqrt( abs( d ) );

				// Fetch the right crossing edges:
				coords.y -= 1.0 * resolution.y; // WebGL port note: Added
				float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;

				// Ok, we know how this pattern looks like, now it is time for getting
				// the actual area:
				weights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );
			}

			if ( e.r > 0.0 ) { // Edge at west
				vec2 d;

				// Find the distance to the top:
				vec2 coords;

				coords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );
				coords.x = offset[ 0 ].x; // offset[1].x = texcoord.x - 0.25 * resolution.x;
				d.x = coords.y;

				// Fetch the top crossing edges:
				float e1 = texture2D( edgesTex, coords, 0.0 ).g;

				// Find the distance to the bottom:
				coords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );
				d.y = coords.y;

				// We want the distances to be in pixel units:
				d = d / resolution.y - pixcoord.y;

				// SMAAArea below needs a sqrt, as the areas texture is compressed
				// quadratically:
				vec2 sqrt_d = sqrt( abs( d ) );

				// Fetch the bottom crossing edges:
				coords.y -= 1.0 * resolution.y; // WebGL port note: Added
				float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;

				// Get the area for this direction:
				weights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );
			}

			return weights;
		}

		void main() {

			gl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );

		}`};const SMAABlendShader={uniforms:{"tDiffuse":{value:null},"tColor":{value:null},"resolution":{value:new THREE.Vector2(1/1024,1/512)}},vertexShader:`

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 2 ];

		void SMAANeighborhoodBlendingVS( vec2 texcoord ) {
			vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component
			vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component
		}

		void main() {

			vUv = uv;

			SMAANeighborhoodBlendingVS( vUv );

			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;
		uniform sampler2D tColor;
		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 2 ];

		vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {
			// Fetch the blending weights for current pixel:
			vec4 a;
			a.xz = texture2D( blendTex, texcoord ).xz;
			a.y = texture2D( blendTex, offset[ 1 ].zw ).g;
			a.w = texture2D( blendTex, offset[ 1 ].xy ).a;

			// Is there any blending weight with a value greater than 0.0?
			if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {
				return texture2D( colorTex, texcoord, 0.0 );
			} else {
				// Up to 4 lines can be crossing a pixel (one through each edge). We
				// favor blending by choosing the line with the maximum weight for each
				// direction:
				vec2 offset;
				offset.x = a.a > a.b ? a.a : -a.b; // left vs. right
				offset.y = a.g > a.r ? -a.g : a.r; // top vs. bottom // WebGL port note: Changed signs

				// Then we go in the direction that has the maximum weight:
				if ( abs( offset.x ) > abs( offset.y )) { // horizontal vs. vertical
					offset.y = 0.0;
				} else {
					offset.x = 0.0;
				}

				// Fetch the opposite color and lerp by hand:
				vec4 C = texture2D( colorTex, texcoord, 0.0 );
				texcoord += sign( offset ) * resolution;
				vec4 Cop = texture2D( colorTex, texcoord, 0.0 );
				float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );

				// WebGL port note: Added gamma correction
				C.xyz = pow(C.xyz, vec3(2.2));
				Cop.xyz = pow(Cop.xyz, vec3(2.2));
				vec4 mixed = mix(C, Cop, s);
				mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));

				return mixed;
			}
		}

		void main() {

			gl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );

		}`};THREE.SMAABlendShader=SMAABlendShader;THREE.SMAAEdgesShader=SMAAEdgesShader;THREE.SMAAWeightsShader=SMAAWeightsShader})();(function(){class SSAARenderPass extends THREE.Pass{constructor(scene,camera,clearColor,clearAlpha){super();this.scene=scene;this.camera=camera;this.sampleLevel=4;this.unbiased=true;this.clearColor=clearColor!==undefined?clearColor:0;this.clearAlpha=clearAlpha!==undefined?clearAlpha:0;this._oldClearColor=new THREE.Color;if(THREE.CopyShader===undefined)console.error("THREE.SSAARenderPass relies on THREE.CopyShader");const copyShader=THREE.CopyShader;this.copyUniforms=THREE.UniformsUtils.clone(copyShader.uniforms);this.copyMaterial=new THREE.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:copyShader.vertexShader,fragmentShader:copyShader.fragmentShader,transparent:true,blending:THREE.AdditiveBlending,depthTest:false,depthWrite:false});this.fsQuad=new THREE.FullScreenQuad(this.copyMaterial)}dispose(){if(this.sampleRenderTarget){this.sampleRenderTarget.dispose();this.sampleRenderTarget=null}}setSize(width,height){if(this.sampleRenderTarget)this.sampleRenderTarget.setSize(width,height)}render(renderer,writeBuffer,readBuffer){if(!this.sampleRenderTarget){this.sampleRenderTarget=new THREE.WebGLRenderTarget(readBuffer.width,readBuffer.height);this.sampleRenderTarget.texture.name="SSAARenderPass.sample"}const jitterOffsets=_JitterVectors[Math.max(0,Math.min(this.sampleLevel,5))];const autoClear=renderer.autoClear;renderer.autoClear=false;renderer.getClearColor(this._oldClearColor);const oldClearAlpha=renderer.getClearAlpha();const baseSampleWeight=1/jitterOffsets.length;const roundingRange=1/32;this.copyUniforms["tDiffuse"].value=this.sampleRenderTarget.texture;const viewOffset={fullWidth:readBuffer.width,fullHeight:readBuffer.height,offsetX:0,offsetY:0,width:readBuffer.width,height:readBuffer.height};const originalViewOffset=Object.assign({},this.camera.view);if(originalViewOffset.enabled)Object.assign(viewOffset,originalViewOffset);for(let i=0;i<jitterOffsets.length;i++){const jitterOffset=jitterOffsets[i];if(this.camera.setViewOffset){this.camera.setViewOffset(viewOffset.fullWidth,viewOffset.fullHeight,viewOffset.offsetX+jitterOffset[0]*0.0625,viewOffset.offsetY+jitterOffset[1]*0.0625,viewOffset.width,viewOffset.height)}let sampleWeight=baseSampleWeight;if(this.unbiased){const uniformCenteredDistribution=-0.5+(i+0.5)/jitterOffsets.length;sampleWeight+=roundingRange*uniformCenteredDistribution}this.copyUniforms["opacity"].value=sampleWeight;renderer.setClearColor(this.clearColor,this.clearAlpha);renderer.setRenderTarget(this.sampleRenderTarget);renderer.clear();renderer.render(this.scene,this.camera);renderer.setRenderTarget(this.renderToScreen?null:writeBuffer);if(i===0){renderer.setClearColor(0,0);renderer.clear()}this.fsQuad.render(renderer)}if(this.camera.setViewOffset&&originalViewOffset.enabled){this.camera.setViewOffset(originalViewOffset.fullWidth,originalViewOffset.fullHeight,originalViewOffset.offsetX,originalViewOffset.offsetY,originalViewOffset.width,originalViewOffset.height)}else if(this.camera.clearViewOffset){this.camera.clearViewOffset()}renderer.autoClear=autoClear;renderer.setClearColor(this._oldClearColor,oldClearAlpha)}}const _JitterVectors=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];THREE.SSAARenderPass=SSAARenderPass})();(function(){const UnpackDepthRGBAShader={uniforms:{"tDiffuse":{value:null},"opacity":{value:1}},vertexShader:`

		varying vec2 vUv;

		void main() {

			vUv = uv;
			gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		#include <packing>

		void main() {

			float depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );
			gl_FragColor = vec4( vec3( depth ), opacity );

		}`};THREE.UnpackDepthRGBAShader=UnpackDepthRGBAShader})();

})(); } catch (e) { console.log(e.message, e.stack); throw e; };