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 la=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,m,k){if(a==Array.prototype||a==Object.prototype)return a;a[m]=k.value;return a};function ma(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 k=a[m];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");}var na=ma(this);
function oa(a,m){if(m)a:{var k=na;a=a.split(".");for(var p=0;p<a.length-1;p++){var h=a[p];if(!(h in k))break a;k=k[h]}a=a[a.length-1];p=k[a];m=m(p);m!=p&&m!=null&&la(k,a,{configurable:!0,writable:!0,value:m})}}oa("Set.prototype.union",function(a){return a?a:function(m){pa(this);Kb(m);var k=new Set(this);m=Lb(m.keys());for(var p=m.next();!p.done;)k.add(p.value),p=m.next();return k}});
oa("Set.prototype.difference",function(a){return a?a:function(m){pa(this);Kb(m);var k=Mb(this,m);m=new Set(this);var p=k.Bpa;k=k.Yma;for(var h=p.next();!h.done;)k.has(h.value)&&m.delete(h.value),h=p.next();return m}});oa("Set.prototype.intersection",function(a){return a?a:function(m){pa(this);Kb(m);var k=new Set,p=Mb(this,m);m=p.Bpa;p=p.Yma;for(var h=m.next();!h.done;)p.has(h.value)&&k.add(h.value),h=m.next();return k}});
function Kb(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 Lb(a){if(typeof a!=="object"||a===null||typeof a.next!=="function")throw new TypeError("Invalid iterator.");return a}function Mb(a,m){return a.size<=m.size?{Bpa:a.keys(),Yma:m}:{Bpa:Lb(m.keys()),Yma:a}}
function pa(a){if(!(a instanceof Set))throw new TypeError("Method must be called on an instance of Set.");}
oa("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 k=new RegExp(m,m instanceof RegExp?void 0:"g"),p=this,h=!1,g={next:function(){if(h)return{value:void 0,done:!0};var e=k.exec(p);if(!e)return h=!0,{value:void 0,done:!0};e[0]===""&&(k.lastIndex+=1);return{value:e,done:!1}}};g[Symbol.iterator]=function(){return g};return g}});
oa("Object.fromEntries",function(a){return a?a:function(m){var k={};if(!(Symbol.iterator in m))throw new TypeError(""+m+" is not iterable");m=m[Symbol.iterator].call(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;if(Object(p)!==p)throw new TypeError("iterable for fromEntries should yield objects");k[p[0]]=p[1]}return k}});
(function(){function a(d){this.Zq=d;this.bv=null;this.bd={}}function m(){this.lj={};this.lj[m.SCRIPT_URL]=[];this.lj[m.THREE_JS_WEBGL_URL]="lib/ThreeWebGL.js";this.lj[m.WEBVR_POLYFILL_URL]="lib/WebVRPolyfill.js";this.lj[m.WEBXR_POLYFILL_URL]="lib/webxr-polyfill.js";this.lj[m.HLS_URL]="lib/Hls.js";this.lj[m.GS_URL]="lib/tdvgs.js";this.lj[m.w9]="lib/basis/";this.lj[m.N9]="lib/draco/";this.lj[m.CURSORS_DIR_URL]="lib/cursors";this.lj[m.SERVICE_WORKER_URL]="tdvplayersw.js";this.lj[m.qB]="lib/webxr-input-profiles/";
this.lj[m.BACKGROUND_PRELOAD_ENABLED]=void 0;this.lj[m.AY]=void 0}function k(){this.dT=[];this.X2=[];this.P2a=[];this.hZ=null}function p(d){return Object.prototype.toString.call(d)=="[object Array]"}function h(d){return!!(window.location.hash&&window.location.hash.indexOf("device="+d)>=0)}function g(d){return b.search(d.toLowerCase())>=0}var e=window.TDV=window.TDV||{},b=navigator.userAgent.toLowerCase();k.prototype.getVersion=k.prototype.OIa=function(){return{MAJOR:"0",MINOR:"2254"}};
k.prototype.getClassByName=function(){};k.prototype.dBa=function(){if(this.hZ)for(;this.dT.length>0;){var d=this.dT[0];this.dT=this.dT.slice(1);this.X2.push(d);this.rXa(d)}};k.prototype.rya=function(d){var f=document.createElement("a");f.href=d;return f.href};k.prototype.OZa=function(){var d=document.currentScript;d||(d=document.getElementsByTagName("head")[0].getElementsByTagName("script"),d=d[d.length-1]);return this.rya(d.src)};k.prototype.rXa=function(d){var f=this,n=d.Zq.get(m.SELECTED_SCRIPT_URL);
setTimeout(function(){var l=document.createElement("script");l.type="text/javascript";l.src=n;document.getElementsByTagName("head")[0].appendChild(l);f.hZ.Mib(d)},1)};k.prototype.defineScript=function(d){for(var f=[],n=this.OZa(),l=0;l<this.X2.length;l++){var q=this.X2[l],r=this.rya(q.Zq.get(m.SELECTED_SCRIPT_URL));r==n?(q.Zq.set(m.SCRIPT_DATA,d),q.chb(new this.hZ(q,q.Zq)),this.P2a.push(q)):f.push(r)}this.X2=f};k.prototype.create=k.prototype.create=function(d){var f=d.get(m.SCRIPT_URL);f=p(f)?this.L3a(f):
typeof f==="string"?f:"script.js";d.set(m.SELECTED_SCRIPT_URL,f);d=new e.Zra(d);this.dT.push(d);this.dBa();return d};k.prototype.setPlayerClass=k.prototype.bhb=function(d){this.hZ=d;this.dBa();this.o({name:"classesReady",source:this})};k.prototype.bind=k.prototype.bind=function(d,f,n,l){this.bd=this.bd||{};this.bd[d]=this.bd[d]||[];this.bd[d].push({handler:f,context:n,immediate:l||!1})};k.prototype.unbind=k.prototype.h=function(d,f,n,l){this.bd&&d in this.bd&&(this.bd[d]=this.bd[d].filter(function(q){return q.handler!=
f||q.context!=n||q.immediate!=l}))};k.prototype.o=function(d){this.bd&&d.name in this.bd&&(this.DB(d,!0),setTimeout(function(){this.DB(d,!1)}.bind(this),0))};k.prototype.DB=function(d,f){d.unbindCurrentHandler=function(){}.bind(this);for(var n=this.bd[d.name],l=0;l<n.length;l++)if(n[l].immediate==f)try{n[l].handler.call(n[l].context||window,d)}catch(q){setTimeout(function(){throw q;},0)}};k.prototype.getOrientation=k.prototype.ot=function(){var d=screen.orientation&&screen.orientation.type||window.orientation;
return d=="portrait-primary"||d=="portrait-secondary"||d===0||d==180?e.ob.K$:d=="landscape-primary"||d=="landscape-secondary"||d==90||d==-90?e.ob.J$:window.innerWidth<window.innerHeight?e.ob.K$:e.ob.J$};k.prototype.L3a=function(d){if(d.length>0){for(var f=0;f<d.length;f++){var n=d[f];if(p(n)){if(this.rDa(n[0]))return n[1]}else if(typeof n==="string")return n}return d[0][1]}return"script.js"};k.prototype.rDa=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.Od==
f[1].toLowerCase();if(f=d.match(/^\s*browser\s*=\s*(\w+)\s*$/))return this.Rb==f[1].toLowerCase();if(f=d.match(/^\s*device\s*=\s*(\w+)\s*$/))return this.pk==f[1].toLowerCase();if(f=d.match(/^\s*screen_size\s*(<|>|=|<=|>=)\s*(\d+)\s*x\s*(\d+)\s*$/)){d=parseInt(f[2]);var n=parseInt(f[3]);switch(f[1]){case "<":var l=function(q,r){return q<r};break;case ">":l=function(q,r){return q>r};break;case "=":l=function(q,r){return q==r};break;case "<=":l=function(q,r){return q<=r};break;case ">=":l=function(q,
r){return q>=r}}return l(screen.width,d)&&l(screen.height,n)||this.mobile&&l(screen.width,n)&&l(screen.height,d)}return!1}if(p(d)){for(f=0;f<d.length;f++)if(!this.rDa(d[f]))return!1;return!0}return!1};k.prototype.ORIENTATION_LANDSCAPE=k.prototype.J$="landscape";k.prototype.ORIENTATION_PORTRAIT=k.prototype.K$="portrait";k.prototype.OS_IOS=k.prototype.RY="ios";k.prototype.OS_ANDROID=k.prototype.L$="android";k.prototype.OS_WINDOWS=k.prototype.Qra="windows";k.prototype.OS_WINDOWS_PHONE=k.prototype.P$=
"windows_phone";k.prototype.OS_MACOSX=k.prototype.M$="osx";k.prototype.OS_LINUX=k.prototype.Pra="linux";k.prototype.OS_QNX=k.prototype.O$="qnx";k.prototype.OS_OTHER=k.prototype.N$="other";k.prototype.BROWSER_TYPE_WEBKIT=k.prototype.CP="webkit";k.prototype.BROWSER_TYPE_OPERA=k.prototype.C9="opera";k.prototype.BROWSER_TYPE_MSIE=k.prototype.B9="msie";k.prototype.BROWSER_TYPE_MOZILLA=k.prototype.A9="mozilla";k.prototype.BROWSER_TYPE_OTHER=k.prototype.D9="other";k.prototype.BROWSER_SAFARI_IOS=k.prototype.xi=
"safari_ios";k.prototype.BROWSER_OPERA=k.prototype.rY="opera";k.prototype.BROWSER_SAFARI=k.prototype.Fk="safari";k.prototype.BROWSER_CHROME=k.prototype.Ap="chrome";k.prototype.BROWSER_EDGE=k.prototype.ZJ="edge";k.prototype.BROWSER_MSIE=k.prototype.NE="msie";k.prototype.BROWSER_ANDROID=k.prototype.qY="android";k.prototype.BROWSER_MOZILLA=k.prototype.Iw="mozilla";k.prototype.BROWSER_OTHER=k.prototype.x9="other";k.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET=k.prototype.tY="samsunginternet";k.prototype.BROWSER_SUBTYPE_OCULUS_BROWSER=
k.prototype.Jw="oculusbrowser";k.prototype.BROWSER_SUBTYPE_PICO_BROWSER=k.prototype.Kw="picobrowser";k.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET_FOR_GEAR_VR=k.prototype.uY="samsunginternetgearvr";k.prototype.BROWSER_SUBTYPE_MI_BROWSER=k.prototype.y9="mibrowser";k.prototype.BROWSER_SUBTYPE_CHROME_IOS=k.prototype.$J="chromeios";k.prototype.BROWSER_SUBTYPE_SAFARI_IOS=k.prototype.AP="safari_ios";k.prototype.BROWSER_SUBTYPE_CHROME_WEBVIEW=k.prototype.aK="chrome_webview";k.prototype.BROWSER_SUBTYPE_SAFARI_WEBVIEW=
k.prototype.BP="safari_webview";k.prototype.BROWSER_SUBTYPE_TOUR_LAUNCHER=k.prototype.SA="tour_launcher";k.prototype.BROWSER_SUBTYPE_CHROMIUM_EDGE=k.prototype.aK="chromium_edge";k.prototype.BROWSER_SUBTYPE_FIREFOX_REALITY=k.prototype.RA="firefox_reality";k.prototype.BROWSER_SUBTYPE_VR_APP=k.prototype.cu="vrapp";k.prototype.BROWSER_SUBTYPE_XR_APP=k.prototype.du="xrapp";k.prototype.BROWSER_SUBTYPE_FACEBOOK_IOS_WEBVIEW=k.prototype.sY="facebook_ios_webview";k.prototype.BROWSER_SUBTYPE_OTHER=k.prototype.z9=
"other";k.prototype.BROWSER_VERSION_UNKNOWN=k.prototype.E9=-1;k.prototype.DEVICE_IPHONE=k.prototype.wY="iphone";k.prototype.DEVICE_IPAD=k.prototype.FP="ipad";k.prototype.DEVICE_IPOD=k.prototype.I9="ipod";k.prototype.DEVICE_OCULUS_QUEST_2=k.prototype.eK="oculusquest2";k.prototype.DEVICE_OCULUS_QUEST_3=k.prototype.GP="oculusquest3";k.prototype.DEVICE_PICO_G2=k.prototype.xY="picog2";k.prototype.DEVICE_PICO_G3=k.prototype.JP="picog3";k.prototype.DEVICE_PICO_NEO2=k.prototype.yY="piconeo2";k.prototype.DEVICE_PICO_NEO3=
k.prototype.KP="piconeo3";k.prototype.DEVICE_PICO_4=k.prototype.HP="pico4";k.prototype.DEVICE_PICO_4_ULTRA=k.prototype.IP="pico4ultra";k.prototype.DEVICE_VIVE_FOCUS=k.prototype.zY="vivefocus";k.prototype.DEVICE_OTHER=k.prototype.J9="other";k.prototype.os=k.prototype.Od=g("iphone")||g("ipad")||g("ipod")?k.prototype.RY:g("qnx")?k.prototype.O$:g("android")||g("oculusbrowser")&&g("linux")?k.prototype.L$:g("windows phone")?k.prototype.P$:g("windows")?k.prototype.Qra:g("mac_powerpc")?k.prototype.M$:g("macintosh")?
navigator.maxTouchPoints>1?k.prototype.RY:k.prototype.M$:g("linux")||g("x11")?k.prototype.Pra:k.prototype.N$;k.prototype.browser=k.prototype.Rb=g("ipad")||g("iphone")||g("ipod")||g("macintosh")&&navigator.maxTouchPoints>1?k.prototype.xi:g("opera")?k.prototype.rY:g("edge")?k.prototype.ZJ:g("chrome")||g("crmo")?k.prototype.Ap:g("safari")?k.prototype.Fk:g("trident")||g("msie")?k.prototype.NE:!g("compatible")&&g("mozilla")?k.prototype.Iw:g("android")?k.prototype.qY:k.prototype.x9;k.prototype.browserType=
k.prototype.EN=k.prototype.Rb==k.prototype.xi||k.prototype.Rb==k.prototype.Ap||k.prototype.Rb==k.prototype.qY||k.prototype.Rb==k.prototype.Fk||g("webkit")?k.prototype.CP:k.prototype.Rb==k.prototype.rY||g("opera")?k.prototype.C9:g("trident")||g("msie")?k.prototype.B9:!g("compatible")&&g("mozilla")?k.prototype.A9:k.prototype.D9;k.prototype.browserSubtype=k.prototype.Dc=window.location.hash&&window.location.hash.indexOf("xrapp")>=0?k.prototype.du:window.location.hash&&window.location.hash.indexOf("vrapp")>=
0?k.prototype.cu:g("picobrowser")?k.prototype.Kw:g("oculusbrowser")?k.prototype.Jw:g("xiaomi")||g("miui")?k.prototype.y9:g("samsungbrowser")&&g("android")?g("mobile vr")?k.prototype.uY:k.prototype.tY:g("ipad")||g("iphone")||g("ipod")?g("crios")?k.prototype.$J:g("fban")||g("fbav")?k.prototype.sY:g("safari")&&g("version")&&!navigator.standalone?k.prototype.AP:k.prototype.BP:g("electron")?k.prototype.SA:g("chrome")&&g("wv")?k.prototype.aK:g("edg/")?k.prototype.Hqa:!g("compatible")&&g("mozilla")&&g("mobile vr")?
k.prototype.RA:k.prototype.z9;k.prototype.browserVersion=k.prototype.SFa=function(){if(k.prototype.Rb==k.prototype.NE){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 k.prototype.E9}();k.prototype.device=k.prototype.pk=g("ipad")||g("macintosh")&&navigator.maxTouchPoints>1?k.prototype.FP:g("iphone")?k.prototype.wY:g("ipod")?k.prototype.I9:h("picog2")?k.prototype.xY:
h("piconeo2")?k.prototype.yY:h("piconeo3")?k.prototype.KP:h("vivefocus")?k.prototype.zY:h("oculusquest3")?k.prototype.GP:h("oculusquest2")?k.prototype.eK:h("oculusquest")?k.prototype.eK:k.prototype.Dc==k.prototype.Kw&&g("pico 4 ultra")?k.prototype.IP:k.prototype.Dc==k.prototype.du&&g("picoa9210")?k.prototype.IP:k.prototype.Dc==k.prototype.Kw&&g("pico 4")?k.prototype.HP:k.prototype.Dc==k.prototype.du&&g("picoa8110")?k.prototype.HP:k.prototype.Dc==k.prototype.Kw&&g("pico g3")?k.prototype.JP:k.prototype.Dc==
k.prototype.du&&g("picoa7q10")?k.prototype.JP:k.prototype.Dc==k.prototype.du&&g("pico neo 3")?k.prototype.KP:k.prototype.Dc==k.prototype.Jw&&(g("quest 3")||g("quest pro"))?k.prototype.GP:k.prototype.Dc==k.prototype.Jw&&g("quest 2")?k.prototype.eK:k.prototype.J9;a:{switch(k.prototype.Od){case k.prototype.L$:case k.prototype.RY:case k.prototype.P$:case k.prototype.O$:var c=!0;break a}c=!1}k.prototype.mobile=k.prototype.mobile=c;e.PlayerAPI=e.ob=new k;m.prototype.append=m.prototype.append=function(d,
f,n){d==m.SCRIPT_URL&&(typeof n=="undefined"&&(n=f,f="default"),f=[f,n]);p(this.lj[d])||(this.lj[d]=[]);this.lj[d].push(f)};m.prototype.set=m.prototype.set=function(d,f){this.lj[d]=f};m.prototype.get=m.prototype.get=function(d){return this.lj[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.qB="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.w9="BasisURL";m.DRACO_URL=m.N9="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.eSa="PinchToZoomEnabled";m.DOWNLOAD_DISABLED=m.AY="DownloadDisabled";e.PlayerSettings=e.PlayerSettings=m;e.PlayerEvent=e.VY=function(d,f,n,l){this.name=d;this.data=this.originalEvent=f;this.sourceClassName=n[n.length-1];this.sourceClassPath=n;this.sourceId=l};a.prototype.chb=function(d){this.bv=d};a.prototype["delete"]=function(){this.bv&&(this.bv.clear(),this.bv=null)};a.prototype.getById=a.prototype.wD=function(d){return this.bv?
this.bv.Ubb(d):null};a.prototype.getByClassName=a.prototype.ri=function(d){return this.bv?this.bv.ri(d):[]};a.prototype.createInstance=a.prototype.ni=function(d){return this.bv.ni(d)};a.prototype.disposeInstance=a.prototype.Nv=function(d){return this.bv.Nv(d)};a.prototype.bind=a.prototype.bind=function(d,f,n,l){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:n,immediate:l});return this};a.prototype.unbind=
a.prototype.h=function(d,f,n,l){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==n&&v.immediate==l||r.push(v)}this.bd[d][q]=r}};a.prototype.bindOnObject=function(d,f,n,l,q){return this.bind(f+":"+this.Eda(d),n,l,q)};a.prototype.unbindOnObject=function(d,f,n,l,q){return this.h(f+":"+this.Eda(d),n,l,q)};a.prototype.bindOnObjectsOf=function(d,f,n,l,q){return this.bind(f+":"+this.tda(d),
n,l,q)};a.prototype.unbindOnObjectsOf=function(d,f,n,l,q){return this.h(f+":"+this.tda(d),n,l,q)};a.prototype.cookiesEnabled=a.prototype.u$a=!1;a.DEFAULT_PANORAMA_HFOV=a.MQa=k.prototype.mobile?90:110;a.prototype.o=function(d){if(d.name in this.bd){this.DB(d,!0);var f=this;setTimeout(function(){f.DB(d,!1)},0)}};a.prototype.DB=function(d,f){f=this.$Ya(d,f);for(var n=0;n<f.length;n++)try{f[n].handler.call(f[n].context||window,d)}catch(l){console.log("Exception handling event "+(d&&d.name),l.message,
l.stack)}};a.prototype.$Ya=function(d,f){var n=[];if(d.name in this.bd){for(var l=[],q=0;q<d.sourceClassPath.length;q++)l.push(this.tda(d.sourceClassPath[q]));d.sourceId&&l.push(this.Eda(d.sourceId));l.push("*");d=this.bd[d.name];for(q=0;q<l.length;q++)for(var r=d[l[q]]||[],t=0;t<r.length;t++)!!r[t].immediate==!!f&&n.push(r[t])}return n};a.prototype.Eda=function(d){return"instance("+d+")"};a.prototype.tda=function(d){return"className("+d+")"};e.Player=e.Zra=a})();
var P=this&&this.Tkb||function(){function a(m,k){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(p[g]=h[g])};return a(m,k)}return function(m,k){function p(){this.constructor=m}if(typeof k!=="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");a(m,k);m.prototype=k===null?Object.create(k):(p.prototype=k.prototype,new p)}}();
define("tdv/utils",["require","exports"],function(){function a(l,q){function r(){}r.prototype=q.prototype;l.prototype=new r;l.prototype.constructor=l}function m(l,q){q.forEach(function(r){Object.getOwnPropertyNames(r).forEach(function(t){l.prototype[t]=r[t]})})}function k(l){setTimeout(function(){try{l()}catch(q){h("Deferred callback failed",q)}},1)}function p(l){if(l!=c){c=l;try{if(b){var q=document.createElement("div");q.innerText=l;b.insertBefore(q,b.childNodes[0]||null)}else console.log(l)}catch(r){}}}
function h(l,q){var r=[];r.push("Exception: "+l);q.message?(r.push(q.message),r.push(q.stack)):r.push(q);p(r.join("\n"))}function g(l){var q="[object "+l+"]";return function(r){return Object.prototype.toString.call(r)===q}}function e(l){var q=[];l.forEach(function(r){q.includes(r)||q.push(r)});return q}var b,c,d=g("String"),f=g("Function"),n=g("Number");return{I4:m,gab:function(l){for(;;){var q=l.pop();if(!q)break;if(q==l.length)break;l.splice(q,1)}q=[];for(var r=0;r<256;r+=1)q[r]=String.fromCharCode(r);
var t=256,u=String.fromCharCode(l[0]),v=u;for(r=1;r<l.length;r+=1){var w=l[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:k,wlb:function(l,q){return function(){var r=arguments;k(function(){l.apply(q||window,r)})}},extend:function(l){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,l);m(r,q);return r},yab:function(l){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";l?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){p(q)}},log:p,sW:h,Qq:function(l,q){var r=!1;return function(){r||(r=!0,k(function(){r=!1;l.apply(q||window)}))}},jfb:function(l){for(var q=
[],r=0;r<l;r++)q.push(Math.floor(Math.random()*16).toString(16));return q.join("")},toArray:function(l){return l===void 0||l===null?[]:Array.isArray(l)?l:[l]},Mcb:function(l,q){if(l.length!=q.length)return!1;for(var r=0;r<l.length;r++)if(l[r]!=q[r])return!1;return!0},IJa:f,Yz:d,LJa:n,Sma:function(l){return(l===null||l===void 0?void 0:l.constructor)===Object},Kma:function(l,q){if(l.length!==q.length)return!1;for(var r=0;r<l.length;r++)if(l[r]!==q[r])return!1;return!0},difference:function(l,q){return l.filter(function(r){return!q.includes(r)})},
intersection:function(l,q){return l.filter(function(r){return q.includes(r)})},union:function(l,q){return l.concat(q.filter(function(r){return!l.includes(r)}))},unique:e,Vlb:e,Vpa:function(l,q,r){function t(){var A=Date.now();z||r.Odb!==!1||(z=A);var D=q-(A-z);w=this;y=arguments;D<=0||D>q?(v&&(clearTimeout(v),v=null),z=A,x=l.apply(w,y),v||(w=y=null)):v||r.Ulb===!1||(v=setTimeout(u,D));return x}function u(){z=r.Odb===!1?0:Date.now();v=null;x=l.apply(w,y);v||(w=y=null)}var v,w,y,x,z=0;r||(r={});t.cancel=
function(){v&&clearTimeout(v);z=0;v=w=y=null};return t},bma:function(l,q,r){var t=new XMLHttpRequest;t.responseType="json";t.open("GET",l,!0);t.onload=function(){q(t.response)};t.onerror=function(){r(t.statusText)};t.send(null)},Bab:function(l,q,r){var t=new XMLHttpRequest;t.open("GET",l,!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()},jcb:function(l){var q=document.createElement("script");q.textContent=l;document.head.appendChild(q);document.head.removeChild(q)},offset:function(l){l=l.getBoundingClientRect();return{left:l.left+window.scrollX,top:l.top+window.scrollY}},uab:function(l){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(l,1):document.addEventListener("DOMContentLoaded",l)}}});
define("tdv/constants/EventName",["require","exports"],function(){return{K:function(a){return a+"_change"},gf:"default",Ra:"mouseDown",mb:"mouseMove",bb:"mouseUp",tr:"mouseWheel",oa:"click",Ik:"doubleClick",rc:"rollOver",Db:"rollOut",lF:"mouseEnter",sr:"mouseLeave",Gm:"pointerOver",xkb:"pointerOut",mu:"pointerDown",lB:"pointerUp",Pf:"pointerClick",gRa:"focusIn",hRa:"focusOut",$A:"gestureStart",B$:"gestureChange",hK:"gestureEnd",rRa:"gestureRotate",iK:"gestureScale",wc:"progress",VA:"close",OPEN:"open",
Ar:"select",Yb:"resize",vY:"changing",V:"change",Ye:"stateChange",sl:"cueChange",pF:"preloaded",ha:"loaded",$c:"loadingError",Gp:"start",tg:"stop",ax:"play",sK:"pause",pY:"beforeFrame",me:"frame",td:"ready",yRa:"instanceCreation",gr:"begin",Qb:"end",kkb:"cancel",Jk:"press",Im:"release",yr:"repeatEnd",zr:"scroll",vra:"movementChange",jkb:"beforeShow",DQa:"beforeHide",INIT:"init",Cd:"show",sd:"hide",VP:"showEnd",kK:"hideEnd",zRa:"loadingScript",hSa:"processingScript",fK:"enableCookies",AQa:"applicationSet",
wF:"userInteraction",wsa:"userInteractionStart",vsa:"userInteractionEnd",daa:"transitionEnd",ASa:"toolTipShow",lsa:"toolTipHide",Hm:"positionSet",fsa:"sizeSet",Lqa:"controllerConnected",Mqa:"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,625,666,566,725,34,291,114,315,91,699,260,701,703,705,115,707,709,76,101,740,635,335,103,
97,431,434,608,484,319,49,615,583,593,529,335,542,115,65,117,368,111,764,609,485,271,487,489,769,547,495,572,678,402,324,748,101,750,704,706,117,708,101,756,740,461,405,632,99,107,326,521,421,673,360,425,363,320,632,114,326,806,103,275,117,110,100,67,496,575,310,292,268,105,629,742,618,91,338,114,105,122,629,553,108,287,689,280,538,108,759,726,354,112,541,543,545,600,616,571,461,328,625,268,367,83,850,852,621,854,320,582,787,549,400,348,499,259,818,107,820,622,823,825,108,575,82,551,831,814,256,869,
288,744,746,602,114,848,34,859,318,862,850,87,512,514,855,376,575,91,893,287,360,709,294,895,816,66,575,260,114,884,368,117,887,505,601,584,872,315,874,100,865,544,83,274,455,100,742,893,858,850,915,114,917,919,105,921,936,925,335,727,101,112,876,878,822,824,826,114,828,318,831,110,833,518,835,575,838,840,578,843,675,846,895,897,861,929,864,542,866,79,290,99,105,373,946,771,858,648,898,975,950,940,917,83,838,710,889,595,947,726,987,974,863,950,930,119,657,837,839,294,578,756,432,903,868,591,997,985,
383,973,354,989,951,633,953,880,956,884,280,111,922,996,891,121,907,528,895,100,798,885,832,904,507,1017,637,873,934,1004,979,554,982,121,984,536,1018,976,853,932,292,259,1052,603,1055,866,86,970,1010,293,103,1013,888,1015,937,1054,950,1048,981,983,1041,592,1053,1044,927,934,991,278,943,945,1078,1016,1080,288,313,1082,259,1004,881,575,742,429,882,772,999,860,1020,1002,851,977,544,66,108,798,1086,1030,1071,998,570,291,1084,114,1096,809,1014,569,1099,1097,926,121,928,1004,1064,361,846,1011,1068,104,
1060,1101,896,1E3,1104,939,916,278,1120,1098,956,938,1003,1107,1005,965,1008,841,1133,1069,923,616,1072,335,816,1075,1050,1136,461,1092,1127,1046,1149,1006,966,1009,108,1154,1135,1088,1158,849,950,901,513,1174,1122,616,906,908,32,910,323,895,1165,928,1118,1144,1088,1124,1137,1190,934,1179,1155,996,1184,528,909,278,911,116,913,1117,1142,114,993,122,995,1114,1043,288,914,1023,821,1025,1100,1027,886,742,1032,1034,771,1189,1045,875,1210,1212,1214,924,1216,1138,1103,899,950,1163,1073,1106,853,1193,1182,
376,1195,986,1238,1021,952,1220,955,1100,742,906,1226,1195,93,287,1259,461,1218,819,1253,1245,1070,569,1257,114,745,1033,1259,1261,956,972,939,1219,879,1254,1097,1088,1270,1272,91,1274,32,1262,1126,1128,1149,742,857,1290,934,72,500,502,504,1201,114,1227,520,1204,799,912,1147,1022,1265,1280,1120,1223,1029,1225,1271,892,1035,1308,1297,501,503,1256,1302,1185,1187,1307,1018,1139,1239,951,1210,1112,1241,948,1329,1251,1279,954,1120,958,830,1040,1246,296,834,836,1170,841,969,1131,578,1277,1148,853,1109,
1111,259,944,1113,1235,1090,896,1062,544,1161,1077,1344,1079,603,1336,1105,1004,1057,934,1334,1091,1230,100,1366,1051,1175,1115,1197,1094,1149,1356,918,1358,1087,1368,1089,1370,1250,1105,1320,1299,1323,1303,278,1305,1206,1229,1093,100,1252,1311,956,1341,1028,961,1088,1346,1151,967,842,32,844,105,971,1308,1192,1146,1194,1146,1242,1118,1233,1376,1237,988,1372,1149,1267,1156,1247,1425,1081,1166,875,1338,1221,1282,1391,1284,746,1287,1289,948,850,1360,1157,1115,1019,1330,1129,1065,1172,1067,1200,1215,
1362,684,604,1410,1429,1454,1021,1380,1241,790,639,296,85,73,825,109,684,413,403,383,793,795,752,754,800,757,648,672,423,713,887,1471,560,288,1482,1484,798,755,1487,572,335,405,350,727,408,356,421,1487,294,922,727,276,371,311,68,608,278,292,935,783,736,1054,291,504,1515,1517,1271,367,735,489,383,472,103,763,421,1526,266,1528,1520,32,784,737,335,293,1540,256,1537,1518,1529,1521,1531,1493,324,696,329,331,333,637,1490,813,371,366,368,370,1088,77,367,369,938,551,1234,616,834,1512,112,277,100,457,553,
361,432,909,348,729,1579,276,112,729,895,314,472,497,1088,727,837,432,301,636,288,932,499,292,647,649,651,420,320,811,675,714,320,1248,561,765,610,296,35,265,1619,102,445,288,996,1248,383,745,920,922,562,782,32,53,786,1369,1137,577,120,1333,1382,1236,475,477,479,727,780,766,1530,626,1435,870,1501,288,109,431,1639,1391,1072,1553,640,642,278,645,108,1604,417,1557,300,383,692,97,694,412,414,305,648,1666,419,504,1609,1491,1514,693,1572,376,1670,694,1497,799,461,428,430,1597,1614,781,440,442,444,1634,
617,963,453,413,456,32,458,98,635,1659,390,314,413,1665,650,1667,269,653,655,100,657,116,659,116,661,575,663,97,665,667,315,1489,712,1561,364,1709,288,1720,1722,1724,745,688,1729,1051,1717,682,1721,684,1723,686,1725,1741,690,315,1686,695,327,710,1509,1721,371,104,605,1514,115,1516,1538,1519,1648,1018,338,867,1547,1764,1527,1767,1551,737,1735,325,1756,1606,269,1559,1732,676,421,276,1049,1367,607,1695,284,768,1623,1461,594,368,727,686,709,1429,105,1683,742,1754,1688,1800,1126,805,107,80,1029,982,960,
1451,376,1226,681,100,1739,1726,1728,1752,121,804,633,1811,1464,960,895,1418,709,1815,296,1226,1820,577,1811,431,1207,1598,383,84,104,471,645,105,1172,351,427,666,1510,371,555,686,694,1763,1765,1549,1540,1542,1599,321,791,376,1474,1476,1478,639,1783,812,1785,320,275,108,108,1822,1506,558,100,368,432,84,1513,1640,1362,982,355,76,97,1592,70,840,87,1298,1322,1412,963,494,108,1578,32,1899,917,287,453,1299,1400,32,49,48,48,287,50,1911,287,51,1915,32,52,1918,53,1918,703,1912,32,55,1918,56,1918,57,1918,
596,1352,461,1887,346,259,1881,103,1883,671,1885,1393,988,1506,1406,1339,1026,1039,1833,890,1316,1033,893,895,1874,1876,689,1506,1889,1592,479,642,1047,980,1162,1943,1137,1936,1961,648,1963,540,1149,1130,845,1066,1012,1181,1268,1452,1236,1957,1877,354,109,1118,756,102,116,1656,1981,770,1362,1984,1959,1986,1118,915,552,111,109,82,1321,1991,1389,1951,1392,1137,348,622,1300,1015,834,1831,968,32,1347,1152,1934,383,1936,1118,2004,1299,1434,1624,1437,1102,1945,1998,1210,2E3,340,2003,2005,1992,1650,1635,
461,1996,278,1960,1890,1972,101,1964,1433,1423,1391,1625,1335,1250,1506,1843,1845,762,108,1965,1788,1381,1657,1453,1336,1946,1210,1941,2038,996,1176,1430,974,2066,941,1085,2005,2027,1015,2052,288,2042,114,2074,942,2005,1428,1968,1935,1986,1004,1293,788,2041,496,1958,2043,1998,1441,1281,1121,1993,296,1445,1273,1276,1275,1100,1956,2095,1985,355,1118,1941,2087,2063,1236,1970,2045,108,1973,2060,1076,2062,2102,2040,2022,1986,1879,1939,2025,1896,2116,1362,1467,2055,1844,519,1846,2059,1975,1457,1173,1429,
2082,2084,278,1941,1989,2006,1628,1466,2065,1986,1971,2120,2047,1974,853,1469,2088,1626,2110,1997,2112,1210,2149,2078,1123,2029,2072,1020,1878,1938,729,2149,1801,2032,2075,114,2114,994,2177,2112,2099,2168,1183,1302,1258,2106,1288,1276,2089,2165,2179,2034,2002,2186,1436,1255,1328,2054,2178,917,2068,2037,2007,2183,1987,2166,608,116,2198,296,2080,34,1936,2056,2138,2058,669,120,1396,2132,2125,2009,858,99,1957,808,2160,2133,603,2228,2095,808,1199,1980,2039,2226,2201,2031,355,2129,729,2196,1507,2232,1969,
2203,278,2246,2115,2225,2071,2135,2098,1310,1948,1100,1409,960,962,451,2019,1415,1350,1977,847,1164,348,1504,2013,569,1503,1849,2127,355,2218,98,2139,2223,2273,1982,1886,1986,2279,2139,1004,1169,2020,1458,1979,2144,2163,2097,2194,917,2149,2253,2239,2071,2023,1332,2086,2182,2161,2053,2242,2209,2179,2131,540,2306,2248,2193,1937,1880,2245,339,2035,2152,2202,2278,2137,2280,2058,1422,1255,1424,2200,731,2250,918,2206,2151,2307,2030,2073,2333,2213,288,2215,2118,1962,2157,2289,1414,1171,2143,2337,2171,367,
2136,2057,1847,1373,933,1059,2351,2145,2333,2300,2070,2064,2323,1987,2099,2231,2254,1115,2303,2195,2320,2002,2069,1795,2249,1888,2119,1827,1813,1343,2225,834,625,1990,287,340,112,287,837,1299,631,2374,109,972,2153,2324,2355,2140,853,2290,1415,2350,2315,2241,2339,355,2369,2301,2365,2309,1999,2395,2341,34,2343,2333,1941,2416,2215,2361,2399,2219,2356,1292,1088,1294,2332,355,1976,1419,578,342,501,1411,1391,834,494,2001,109,287,1654,1880,625,2388,276,2109,1875,2111,2310,917,2252,2314,2370,1236,115,2234,
1875,808,2403,1171,669,442,1535,2406,2430,109,2287,2058,2091,2428,2093,2277,2367,2258,823,2410,2364,2457,2398,109,2155,1892,294,2363,1015,1202,771,457,994,460,731,115,2115,1861,335,2423,2469,2325,2139,2479,2377,2094,2450,2164,2483,2119,2121,1168,2348,1153,1459,2238,2480,1362,1761,260,83,2459,108,66,117,2001,110,2008,2429,288,2372,2204,276,2149,2376,1361,594,2344,648,70,822,1342,2437,2225,42,2316,2470,1847,1427,2455,2411,2481,2366,2546,1876,1966,1789,2550,2285,2379,2345,2048,1244,2050,2225,2422,2295,
2083,2154,2119,2485,2212,2563,2239,2215,2016,108,2435,103,2542,2239,2439,2395,2443,512,100,2446,1541,2448,1249,2413,2067,2532,2211,2534,2284,2536,2340,2572,2028,2331,2529,2568,1592,2462,841,2577,2579,996,834,1206,1908,2386,116,2391,2005,895,2217,2501,2327,1332,2207,2351,2537,108,71,670,1466,2521,808,699,604,624,1684,1345,963,2082,287,578,119,315,115,2449,2096,2567,2297,1143,2598,2079,2170,2499,1947,1442,1388,1028,2008,1226,1955,2505,2643,2044,1891,1893,1895,2283,449,1898,496,1901,1903,2611,2005,1908,
1910,1925,1914,1925,1917,1925,1920,1925,1922,1925,1924,287,1927,1925,1929,1925,1931,1925,1933,2269,2162,2506,2296,2476,877,1266,1408,105,829,1465,1897,2264,2512,2017,2575,2616,2333,2246,2312,2594,1994,594,2499,2503,2535,2378,2508,2661,2486,373,625,2263,619,982,578,1419,287,2691,2708,2424,2326,2426,2159,2555,2124,2557,2714,2566,2173,2318,432,2246,2208,2553,2716,2595,2718,2553,2237,2322,2309,2553,1095,2647,2169,2600,34,2650,2620,2336,2467,2338,2172,2128,2174,1882,1884,2763,2352,100,2660,2538,840,2421,
2170,344,2525,2520,1957,85,1942,1444,2188,1953,91,906,1555,2523,2525,287,73,429,110,2790,340,110,93,1260,32,2788,1756,2796,629,2792,2794,2804,2798,2397,2366,2472,1391,2528,2216,2257,2697,1407,1222,1950,1315,1285,2657,2475,1988,2211,2487,2717,461,553,98,262,260,120,1429,2265,1171,2606,2724,1286,323,2611,2211,2614,1299,972,2628,291,2776,2758,2617,2400,2520,578,1674,260,2839,574,413,287,102,1847,1416,2861,116,95,431,604,260,2860,982,95,2012,2868,626,2864,95,340,95,511,1180,2870,2865,2878,499,2615,2589,
2408,2452,2251,2395,2827,2748,2887,2765,2645,114,2167,2756,616,2418,2896,2205,1299,2712,1042,1995,2740,2090,2427,2813,2474,2468,2024,2621,2770,2499,2754,1386,1110,1388,2762,2456,2134,2482,2414,2441,2533,2915,2923,2739,2694,2644,2889,817,2415,2899,2199,1125,2913,2591,112,2905,2126,2468,2155,1973,1516,429,745,2702,2438,963,954,667,454,287,111,689,1702,626,2960,45,477,821,502,2729,629,101,913,2524,2797,2780,2095,2312,1398,1226,2802,328,2808,2806,629,2808,2799,2957,1302,2789,2971,2805,32,2793,2982,2988,
2809,461,761,2783,2930,1137,2499,2244,432,2176,2360,2908,2559,2046,2561,1063,2142,2514,2752,2888,2553,2548,1213,2627,2229,291,2464,1534,2607,2504,2693,2659,2602,2774,2721,121,2723,2703,2725,841,2728,32,2730,2545,2618,2734,3009,1351,2292,1134,3012,2895,2719,3007,2158,866,1387,2943,2240,2468,647,1646,1616,517,575,597,1622,2580,963,2691,2388,3038,108,45,629,108,121,1905,2119,3067,110,3069,2731,2696,1024,2100,2261,2383,3061,2704,1007,2266,1417,1457,3076,2918,2562,2329,2051,2170,2256,3006,2156,3008,544,
2604,1978,3043,2351,3094,3077,2698,3091,2225,2104,1286,2190,1448,2601,2732,2139,2328,1443,2564,2649,3005,2934,2420,2937,2214,3118,2932,2146,2180,276,3051,2071,2760,2311,2335,1359,3017,2235,291,2432,846,3020,2466,2998,2658,2451,3001,103,2975,3102,2925,2210,1990,3129,1115,2917,3065,2357,1058,1546,2738,2999,3119,3014,1232,2549,2516,2931,3025,3095,2510,1355,2920,3152,2551,2590,2311,2929,3159,3143,2507,3089,978,2736,2208,2484,840,2892,905,1324,1203,1705,2492,3060,311,2496,1522,2498,3119,2926,2035,3172,
2558,109,2747,2713,3160,3125,2286,3065,3115,2101,2573,3093,3149,2179,2299,3164,3023,2468,2553,2221,2751,3148,2366,2024,3133,1390,3142,2824,3163,3016,2351,2794,354,294,1048,113,489,2092,871,2308,2888,3184,294,1894,2005,2839,1903,2394,1900,2670,1907,114,287,2673,1913,1918,55,2677,287,2679,287,2681,287,2683,1926,1928,1930,1932,3058,2021,2945,2569,840,258,1654,3069,742,1595,729,3178,2695,3224,2026,3122,2342,2170,2623,3169,3049,3171,3176,3165,1137,2778,2972,2521,3003,2784,91,2977,2986,2803,2993,2981,2795,
2993,2984,2801,3300,2979,3302,2990,2807,3305,2810,3174,2531,851,3216,2828,2407,3045,2113,276,2849,2939,2764,2353,3026,3096,3048,544,3324,3205,3167,2500,2852,2511,3084,2349,3011,3222,2309,3242,540,2722,2633,288,834,2726,453,99,2967,587,2692,3240,3045,2946,2157,2948,1725,2951,2384,2953,823,2955,2859,2801,2959,2956,32,2962,2964,622,2966,3035,2968,3314,2888,3145,3147,2770,3103,3180,544,3238,1652,2771,2354,2425,2401,3288,1357,2922,3177,2475,3343,3332,2316,3099,2576,1906,3022,569,2609,2841,3252,3370,2843,
32,2392,503,2642,2451,3357,642,3359,2950,2262,3031,91,2954,690,3369,2958,3365,2961,454,2963,104,2965,104,2967,413,3412,2507,3343,3186,2103,3188,2490,3190,1213,2493,2529,2495,2314,2497,1217,2993,2973,1875,68,544,3402,2187,3298,2786,2978,695,3310,2991,3304,2525,3306,3458,2980,3311,2992,3463,3076,3145,3296,3227,2940,2373,2927,2593,3290,3217,3326,2772,3328,3287,544,3138,3100,1460,3319,3196,3206,3113,2471,2141,3041,2405,3473,3112,3335,3389,3156,1375,2622,2333,2928,3393,3291,3279,2933,3383,119,3397,3024,
2451,2651,1379,3182,3341,2888,3198,2375,3478,3488,2081,3197,2033,2395,3504,3134,3502,3491,3039,1108,3289,3505,3479,2759,3524,2179,2903,503,3200,1944,3518,3229,3346,2240,1862,1836,97,67,663,278,1565,1608,1560,1872,123,1778,82,339,1039,1663,3550,366,745,803,378,557,2271,1849,810,3555,1611,1547,1986,2655,2786,391,340,2275,1505,1986,1708,637,679,404,3569,1645,383,825,111,107,362,1811,3350,2737,1680,1733,320,798,1593,1391,3277,1597,2494,733,3601,3447,34,694,111,820,670,1761,99,65,1058,2976,2786,3603,103,
2800,3620,3583,1091,3585,296,1555,1781,461,1737,1747,3548,1822,691,1803,3571,1784,3573,1778,3631,685,687,1727,2959,1753,1683,1555,803,1749,1740,97,1838,1494,358,3638,922,121,97,1771,3394,637,982,555,1470,3584,1864,3627,1780,1715,461,669,112,3580,352,1986,1731,1871,3573,34,1563,1569,1566,2626,1126,386,3683,3673,385,529,1778,3674,1506,698,700,67,3237,1508,1851,1759,421,1533,3141,2216,1773,1766,1550,1541,3195,3347,823,1857,1774,3707,1861,1778,3628,3670,1870,1610,922,1545,84,1802,3545,2255,1580,116,3723,
366,1470,1481,281,119,278,3616,455,3677,3720,371,716,98,718,720,3483,3510,3283,2417,2170,1165,1809,808,80,275,820,282,115,3203,2906,594,109,1675,2120,557,3650,1726,84,745,115,314,1410,68,1038,3361,34,1630,767,3261,1794,3522,384,315,3751,291,2282,1398,1325,1205,1188,858,717,982,720,2755,3106,3211,2758,487,686,1828,629,3054,3419,2632,823,1585,627,259,101,2872,2524,95,436,260,2866,2798,461,118,114,2625,1213,3653,643,72,605,3729,3725,1383,3754,292,115,115,3514,3758,2944,288,1797,496,666,3767,3799,2382,
110,3772,3417,3081,3506,400,3829,3756,3015,3827,1236,3293,629,752,3727,3618,1285,3465,3460,3312,3469,2985,91,2987,2791,3467,3462,2797,2799,1164,3849,3831,808,3514,2416,3108,1447,2192,1018,3791,719,282,2744,1283,3439,1304,1186,3788,1327,1438,3783,2897,105,666,68,745,103,3021,433,2473,3239,1377,3782,633,808,3559,2932,310,312,348,3385,3817,2180,2325,727,1419,107,3559,553,1410,1105,3055,1631,1925,3661,288,2861,114,727,3840,2526,3842,3844,3561,1429,3750,3906,1117,2185,3747,3878,3110,3880,335,538,941,494,
291,1819,111,1839,2646,3795,2599,3325,570,2993,405,558,921,3545,3108,3860,3867,3461,2983,2800,3965,2797,3303,3968,2270,3905,806,2461,1167,3170,3392,3528,2770,3938,3976,3784,1083,3941,3955,2488,2785,1285,3879,2108,3914,3822,278,83,1139,960,1434,3776,376,1618,102,54,1924,3060,3956,1196,348,3893,3472,2239,2489,3888,1326,1840,1808,3939,114,3753,3611,3830,3832,3987,827,2700,959,3846,2014,963,2836,1349,3086,3041,2970,2525,1883,3899,625,83,3882,720,3858,746,3970,2989,3967,3313,3864,3866,3971,3868,3973,383,
102,111,99,921,3736,97,2853,3030,320,4001,271,48,46,1633,3779,2893,3881,114,436,709,705,845,4040,3998,629,4E3,1615,1631,34,4003,1620,4007,2648,2758,3983,807,291,4021,3755,3874,3544,1466,4042,3884,4096,2351,120,918,2095,1429,3854,110,405,4044,1033,4046,110,3972,4049,3307,3865,3301,3966,3862,3870,972,798,4074,101,4076,1419,625,2410,4065,32,4067,54,1699,2255,4098,3832,1210,3511,948,4135,2947,267,3360,3418,2952,451,3421,2960,2957,3368,3366,3371,3429,3373,3431,3375,3433,3974,121,3893,3876,2699,2701,4144,
3362,3083,1348,2706,3087,1263,3449,2389,4109,2787,3308,3459,4118,3468,4120,4050,4117,4052,4048,3469,4158,3893,1297,1385,853,3913,4018,3984,114,4187,929,2049,3988,2757,3957,1797,1165,1883,496,280,112,262,4041,4073,554,101,3997,1103,4164,3775,4082,319,1542,1699,2814,4090,3875,2761,3981,3496,896,4135,3471,2211,3937,4010,4019,3380,3107,3887,1908,4016,4121,3742,3792,282,2812,2225,2814,97,97,69,645,2632,3158,4129,4217,4070,493,2912,1091,3873,115,3785,3886,1399,3406,4236,4185,4019,4093,4023,4161,2819,2654,
2821,1317,1228,3790,4238,3883,115,4246,1890,625,4249,4215,1648,4218,4254,34,3818,3995,1119,2572,4129,4084,1620,265,4087,4198,1137,716,4208,4075,101,4077,4210,4079,110,4128,4281,271,1793,3927,711,4094,115,4012,1301,4260,1401,3789,4191,4091,2935,2441,3786,3189,4262,3848,4022,3850,3940,2477,2100,1313,3576,2822,1318,383,4286,3952,294,278,3910,553,110,1800,1694,1647,271,50,4133,1453,4226,2767,103,3885,2770,2157,1662,578,1825,4192,742,4358,4319,4263,4192,4194,2914,3534,3780,4220,3985,259,3221,3297,3787,
1306,4017,3892,4019,4194,3834,3052,726,4140,2346,2919,3980,3226,4309,673,4311,3209,1145,2758,4336,3953,114,1822,4081,1791,1617,1911,55,554,99,4294,2900,3749,4256,4366,4223,4388,4230,4192,3833,3516,4354,1661,644,4357,4408,291,4360,4420,4009,3975,4319,4194,2347,3338,2513,2293,4101,4020,3663,2515,3535,3818,1892,666,3936,4344,3056,3926,3847,3946,3950,3949,941,4287,4340,1799,3852,1462,4423,4380,2071,4369,2935,2179,3437,3835,4285,4020,4337,643,4211,4028,110,3826,3924,767,2675,4348,2457,4350,2742,1940,2769,
4224,4389,4266,4025,2653,1224,1088,2656,4334,4377,4192,4265,3850,4222,4387,4444,3904,4159,4019,4372,4233,4315,3889,4375,1403,4496,4192,4455,4349,4274,3793,3337,4167,3042,3487,4071,4139,4508,282,2625,2997,4309,340,117,555,1822,4060,4062,710,4129,4308,4494,372,745,2526,3770,960,3932,3800,110,932,101,3707,4224,3947,100,4447,3951,4395,4466,2541,4138,4382,4516,115,3745,3399,3495,4388,4423,4409,4493,3535,3741,3743,3884,2368,4415,4479,4420,4329,1340,4027,2541,2839,4032,4168,4035,4273,4563,115,2570,3273,
1847,2737,996,3620,4577,4239,2495,4385,2921,4410,4530,4562,4587,4267,3116,3796,3957,4457,4365,4137,3747,2215,3798,4533,3561,4536,3934,3773,4213,4530,290,3643,1883,1604,3840,3769,3561,3935,3774,4528,1911,4443,4561,4135,4506,1236,4599,3986,4569,4162,4467,4573,2705,1416,2707,4363,4426,3978,3040,2268,4556,4611,4256,4626,1362,4106,86,82,699,101,3660,4314,3299,4116,3309,4177,3869,629,3464,4175,3466,4183,4120,4637,3752,4568,2817,2259,4596,4653,2786,3992,575,1036,351,4451,4470,1792,4473,2134,4135,1456,3494,
3340,3381,4135,3485,3400,2436,2839,2389,2583,2445,626,2440,2035,4121,4298,4124,4300,4126,101,4398,4345,288,4085,1619,4405,2938,1137,4200,348,4202,439,105,4205,4468,622,555,2780,4540,2526,4190,1783,4390,4328,4668,2652,3080,3454,2665,4166,2291,2267,2433,3354,4255,4326,3831,4232,4013,4234,4261,3890,4376,3448,2525,3961,697,4259,4654,4051,4047,4119,4659,3969,4661,3861,4178,4756,4665,4370,1719,2663,4322,3440,4324,1159,625,3805,1882,4532,4537,4619,4610,3535,4604,4774,4609,4029,3780,4593,4275,2122,1967,4686,
4552,3399,2838,3419,2612,1261,3405,2844,3411,2829,4773,4534,629,4607,1410,4277,4248,4724,4551,4578,3745,4645,594,4090,863,1571,2839,1575,1577,1583,315,3806,290,3962,100,1036,622,2632,67,3350,107,65,4572,4441,4083,340,4039,3809,102,438,566,2228,4722,4709,2634,451,4833,103,625,3812,4837,2458,292,293,3432,2969,4586,4275,3379,3245,3102,4135,2570,4460,34,4014,1908,604,3442,3872,4739,4024,4630,4197,3455,2189,2108,2107,4674,4867,4726,4458,917,4550,3781,4504,4638,4188,866,1374,2359,4787,4807,4384,853,4688,
4642,3535,4480,4491,4321,4259,4374,1402,537,4446,111,3950,4287,4548,1410,4469,2351,4896,3874,1209,4459,3318,4514,288,4102,89,3659,4097,4552,2570,4881,4628,1440,4870,883,2820,4485,2786,2823,4488,4884,1405,4100,3982,4412,4934,4785,2556,4611,4938,4666,4868,4391,2330,3957,4783,3744,4478,4742,4500,4768,288,118,3733,3802,4145,619,1798,823,3950,843,894,4854,720,2570,3244,1397,3803,2667,3248,1904,3370,2671,3406,3254,32,4472,32,3257,1919,1921,1923,1918,2685,287,2687,287,2689,3352,597,4237,4578,4860,3345,2839,
3349,3034,3036,4318,4221,2179,3511,383,1758,922,4956,4651,647,67,542,432,710,1548,1539,1768,1778,1866,2002,1868,614,1653,4300,338,100,922,1165,677,3584,3962,5030,849,4478,1626,480,1524,677,1862,3723,4279,1805,797,799,801,1488,3637,3678,922,275,3746,822,2664,3759,1137,1099,825,5053,3665,3625,3667,288,5043,753,1498,1486,802,383,83,453,260,79,2524,317,1607,3655,5049,387,779,4791,3408,4692,3409,2005,2394,2441,3624,1863,1472,288,5075,1716,335,915,120,1713,3629,3698,323,5028,1812,3922,4300,3712,3706,1860,
3709,896,994,3997,1525,3705,1859,5018,3666,5090,297,4417,1663,5097,3718,4738,5078,561,3898,761,2632,88,825,294,1874,115,4704,3056,4291,102,4622,48,4841,3284,2758,2960,4498,4214,4399,1909,4680,594,4123,5134,4083,4707,4293,1699,2215,1654,110,5144,4530,2960,4305,5146,4529,3535,5157,4258,2770,100,5126,4278,101,89,5130,487,496,5133,4289,4306,4706,1911,265,1911,5140,3748,2758,1642,478,480,4678,1776,4283,3903,3775,5170,2632,90,5174,5132,5151,324,35,5138,5154,4252,3123,5186,5195,625,3616,5051,4556,4129,1922,
5148,1137,2880,1155,4528,5215,461,5187,5190,5147,5205,4461,5157,1516,476,4435,3780,2960,5200,4002,4292,1621,5155,2170,5169,1671,5127,4040,112,1602,4124,3176,5213,5220,383,2885,4970,4064,5179,5164,4368,5102,960,3897,5240,5171,5223,565,567,5225,570,4284,4865,101,5258,3899,5260,4831,564,578,5263,2239,2814,4123,5162,4705,4623,3319,1862,3641,116,3672,3634,315,3672,3738,1681,1734,5116,1494,34,5284,5286,3645,121,1754,3648,383,1713,1806,710,3597,3556,289,5256,629,599,5252,5146,5281,4916,5308,4537,580,5312,
5280,5248,637,5309,110,589,5319,4442,5321,3523,3921,960,5311,1790,5320,5264,3130,3560,1410,5325,5333,5327,5335,3153,5337,960,79,2179,5223,34,88,89,524,1699,834,5350,90,287,88,90,89,287,89,5358,5361,90,88,287,5365,5360,32,5359,88,895,3600,3276,728,3604,3444,3606,1768,3196,5330,629,5318,5340,3925,5328,34,739,648,1629,5179,91,2800,2239,1226,5303,5044,1499,758,2227,2854,5223,5254,5315,431,844,5332,5145,4705,5262,1649,996,2814,5406,424,5339,5409,3056,5411,5192,3386,5415,279,5384,5418,1631,5420,5264,2814,
4778,4799,110,5425,4129,5314,3204,4797,3799,5432,5417,5435,5387,5431,3561,5408,5442,5342,1017,1778,5397,5065,5045,1500,461,5070,605,262,5092,5290,3598,256,628,2247,4165,619,4792,2587,2390,5084,2393,1902,2395,5088,638,5294,5459,383,70,3770,3633,5298,4361,2381,3774,5306,3679,1787,2123,1429,280,366,1798,1477,1429,3658,4652,3535,1957,3937,4434,5060,5089,5294,3717,1678,461,5479,551,5284,5481,1742,5300,1756,1850,5100,1760,1762,1536,5113,5017,1776,1769,3384,5519,1858,5521,3708,1552,5293,1554,3669,5506,3719,
5291,320,5488,4786,5385,767,5387,1797,4341,4343,3381,846,4527,5253,5387,4090,5484,1814,4270,1033,5508,1748,3643,5287,1824,4938,5551,4659,1935,3636,1391,5064,1485,461,111,265,328,116,5425,4530,5569,102,5571,5417,4530,5250,2224,4309,4574,4689,2578,2839,2610,3406,5467,3410,4746,34,5217,5230,5315,1588,116,3664,2351,2575,4790,4959,91,4696,2002,4693,2585,626,2389,2846,2854,4958,5465,91,2861,1875,2882,3815,2874,5617,2873,605,5617,2878,5593,5623,111,95,5580,2613,4156,4853,383,5496,2294,1875,3731,5094,1756,
901,823,5524,320,5007,1853,882,4750,320,5016,1775,5528,1543,1217,608,575,101,3824,2856,5525,3713,5107,5529,5061,5117,5174,762,413,521,5534,5461,2417,5646,4176,2797,3753,3756,367,4809,5056,5672,2808,4595,4483,1314,4930,4333,4272,383,99,5680,3959,4023,367,4946,3092,2758,928,2251,4482,4173,4673,4965,5688,5690,4748,4351,4353,4224,5697,817,4565,2061,2835,934,2890,3475,2035,4881,5689,1029,5673,3855,2566,5682,4730,4633,4429,4575,2268,895,4563,5375,1596,433,5703,5720,2808,3908,2643,5694,3117,3797,4239,4923,
4602,2170,5709,5724,4571,3774,2608,4031,4634,4735,1420,5735,4656,2797,5167,5708,5714,4879,3996,4915,5437,5249,5761,5740,4597,5679,5736,2993,5738,1822,5682,5700,3944,3993,1532,305,121,3281,503,4861,2071,494,100,5781,5711,5489,2351,5747,2941,4881,4056,339,5715,2085,3282,4871,4710,537,5704,5674,5692,1405,5699,4751,4672,5777,4876,5779,5787,3145,5707,4309,5795,643,3519,109,4881,5786,5781,3525,2441,5821,5780,5775,5808,3991,5810,5702,773,5761,4856,5251,4542,5803,629,5675,3831,5693,4482,5725,3419,5583,5754,
3269,3928,495,5818,5807,3297,4873,4674,4875,5832,2342,5838,110,3461,5759,5582,5834,5706,2395,1429,5817,5797,278,3215,3230,2770,5822,5768,4008,1263,5827,2941,5784,1115,5822,3145,1941,5490,5743,3185,5764,3438,4500,5267,3443,3704,3194,1531,3946,5859,3461,5159,3535,5792,3214,2826,5888,4461,5868,5762,3127,3317,5872,5837,5771,2525,3461,5826,5813,4351,4741,4530,5719,5757,5839,4351,4313,3535,5874,4482,4331,5553,4260,913,5878,5716,2002,5880,1236,4563,4808,4566,5863,3808,4020,4351,5884,5791,5767,5879,5904,
4381,3680,305,578,4805,5265,5787,2825,1990,5718,5859,5773,689,5682,5928,5685,4271,520,5730,5886,3243,4765,4971,1900,4973,3250,503,2672,1918,4980,4982,3259,1632,4985,1925,4987,32,4989,32,4991,3375,3353,895,5906,5782,2313,5910,4309,5920,5721,4107,5805,3851,4105,5932,992,5948,2071,5997,5737,5723,4936,5911,5921,4107,5943,4951,5579,5946,3132,1299,5935,1362,5992,5793,5745,2758,6007,5691,5676,5806,4927,5683,4332,5965,278,895,6026,2525,5875,4088,3957,5747,5927,4929,1391,4486,5687,446,4239,4141,2949,4440,
5602,4147,3423,4150,3426,413,3428,3430,4852,895,5709,5862,4530,4563,4789,3401,2839,5467,5587,4795,5591,6036,5674,5917,4857,2770,6073,629,5899,3780,5937,4891,866,5915,5823,3538,3323,6024,3957,5874,3150,5994,4452,5149,5850,5869,2897,2211,6085,4227,1990,6002,5955,2304,5799,4670,6039,1137,4563,6101,5054,4461,5709,6111,1429,6078,5999,6028,3461,350,413,6080,5315,6110,6014,4519,6064,6048,6083,3098,4634,4894,3780,6117,4559,2008,2071,6082,3097,119,4893,4685,6011,5998,5828,5853,5809,4874,2191,5778,335,5992,
5789,5538,4520,5968,3344,3029,3545,3348,3033,3351,5989,4993,2829,6129,6140,3050,3521,6124,4239,5814,5866,5945,5941,5993,4881,5709,4688,5601,5613,5604,2442,32,2444,5607,2447,112,6035,5859,5840,328,2772,2794,5958,5912,2797,5960,2043,2794,6121,101,6123,5765,5896,6197,5722,2932,4414,5712,2351,5926,6030,5844,5602,5846,4034,5729,5802,6207,110,6199,2083,6195,6089,5770,6012,6120,454,6204,5055,461,6022,5004,6226,858,1770,3278,5272,284,5428,5276,4284,6117,6192,5842,4329,5678,6220,6012,5748,4163,4781,1573,5752,
5727,4635,4169,4055,6096,5907,2454,5995,4530,5906,6063,3535,6117,6223,6249,5766,6176,6092,6196,6251,6010,5940,2453,5824,2035,6020,594,4563,4580,663,4582,5732,3278,6260,5796,5710,6030,5963,6044,4931,4487,5849,6291,6252,4632,5845,5753,6218,4736,5991,6261,6001,2351,6125,4476,5918,6268,5859,6271,6206,6251,6154,4941,3023,1862,1818,5511,1823,5483,5323,5460,5307,5537,6319,6081,3724,5493,6127,4436,970,3679,1031,3577,3765,1837,4464,5474,3626,288,5505,652,1502,6340,3549,3551,745,3910,1165,5561,2579,5486,1492,
5530,376,3920,3561,578,3563,3552,6353,348,6355,461,5346,98,982,350,5836,617,3699,5101,4537,5111,5105,5114,5522,1778,6373,1322,5669,5307,115,1149,1883,625,4532,5544,5539,284,4067,4069,5996,5178,5146,5136,4086,5237,2758,5634,6240,4066,5387,538,727,4241,5426,5273,566,5412,1015,2814,6388,853,2038,4129,56,5387,3953,3933,2556,5219,5448,1362,4712,315,1297,108,360,5261,5274,6415,569,2814,3761,5658,5326,4083,2861,120,367,2877,5627,1580,694,1782,5264,834,6444,6446,2878,538,3564,97,2870,6445,100,6447,2877,291,
6450,2109,5382,3843,5208,5547,5146,6242,5413,4284,5596,5598,6442,319,5436,6232,1769,1355,369,5391,5313,5387,6418,866,3672,2300,4129,1920,57,4132,6428,398,1862,4450,4342,101,3548,6364,745,304,666,366,3654,711,5124,285,6359,296,6499,4075,5344,629,6363,6351,97,6505,355,639,383,1011,4579,314,292,6323,3912,5048,3739,421,6405,3982,5501,6212,625,554,1761,1693,6478,6395,5387,2632,6539,729,6514,6471,5280,46,52,5248,3691,6349,5558,3694,749,3548,5515,1852,1508,3711,5659,5106,5380,2342,489,5012,1855,5015,5520,
5650,3715,6512,411,6349,3060,6357,1853,489,6032,1033,1482,3696,5632,335,882,4951,4129,6473,6416,4284,437,2389,6530,6542,5191,5429,2474,5283,683,339,5297,5512,3647,5514,6531,5535,256,5600,6067,6406,1653,2584,2723,5353,2666,2441,5606,2586,5609,5563,1671,3545,5566,5066,5568,5570,4300,5434,5179,6480,4461,5575,5577,5223,6633,5949,5629,6637,5387,5583,6181,6412,1247,3405,5184,3404,4338,5588,3408,5590,895,5593,6641,6496,1137,2737,5447,4309,2834,6613,6638,2255,5546,5612,6645,296,5615,497,6617,451,2858,2875,
2862,5617,2867,5622,627,2871,5621,2869,6680,2883,5627,5625,6684,6463,5629,6343,5062,1779,328,3629,383,1811,112,463,6529,1730,6608,5670,100,291,107,293,3514,5223,4251,6243,5193,5550,5323,6582,91,6697,6699,6555,5482,5560,5323,2616,5564,2225,6626,1689,4335,311,105,2632,6435,6414,5421,3817,700,742,1496,5398,448,400,6536,3982,276,463,6548,2294,6468,5408,4530,275,6468,5578,5498,6516,5433,5495,4920,2351,6588,4828,2639,121,1883,5657,101,4909,6597,4979,4622,6487,3921,6549,5135,4815,1529,6672,4960,2389,4816,
1186,1584,1582,1186,437,6193,1189,6744,112,2221,6267,1269,4743,44,4954,34,2518,101,69,327,6239,6768,5388,454,4421,6777,452,6804,3406,3236,259,3815,287,6810,6462,2012,6813,1718,3815,3810,5630,4058,6371,99,6812,1288,623,1419,6820,1261,6827,6824,431,6829,32,6810,279,6825,6836,2865,6816,6835,655,6837,6833,6841,3236,1839,6838,117,6848,6846,6850,294,6819,2012,1590,495,6761,315,6764,5518,6768,6710,6474,5193,6388,544,6799,604,6541,6394,296,2960,6805,6452,1701,6808,6817,6811,431,6879,6815,2524,6882,6855,6884,
6826,6823,6825,6822,6828,6841,6891,6832,110,6834,6839,6849,1524,6897,6843,2865,6845,6887,6847,6854,6881,6842,6851,6905,6853,6903,6896,6856,498,605,4775,3081,4621,1918,4388,6788,3220,902,5594,3187,4315,6795,6867,119,6918,2579,6920,6664,1115,104,4056,118,1429,6588,6334,6438,6593,2524,276,6596,4242,6600,1544,6376,5517,260,4246,3158,5649,3714,5108,1798,354,6569,5014,6380,5527,3608,1545,6963,6573,5108,5689,3918,6967,3707,5411,5523,119,6954,6972,5661,1777,6575,336,6719,1742,3060,366,477,305,1511,4172,5292,
4495,5033,321,5032,6991,6796,6862,3557,948,1770,5039,5069,5243,278,1419,3548,70,1740,5305,3572,1511,7004,292,1398,6726,709,287,1482,702,796,5452,709,1353,292,111,1601,278,3963,1302,7016,626,7019,751,6739,6691,5117,7007,7009,3671,450,3693,5099,6561,1873,2110,2524,6978,6566,3536,2932,7048,5522,5896,6971,6564,6381,3807,6414,1862,5475,5531,6694,5122,6509,6532,1612,1761,1900,402,5929,1567,470,1506,1590,2119,6288,1597,399,5069,4122,4209,4125,23,5689,2855,1676,1714,5506,6702,5307,5542,4677,6663,6642,4634,
6732,5275,6865,3386,5187,1644,504,4250,736,6734,7060,6344,5118,643,5120,3762,1677,6347,1600,1747,6384,504,5644,810,5323,6379,7056,6964,1522,6383,3245,6386,3679,7091,6500,6656,6922,4774,6470,7096,6437,856,6593,432,4063,6872,32,703,5541,267,6701,6768,4347,6657,537,6399,4705,6401,4708,6403,3957,6534,7141,6935,4627,6742,7158,6487,1149,6420,5548,7149,6482,3049,6484,7131,4530,6424,1464,6659,7166,4309,6430,121,6432,6434,6613,6591,6943,5193,6662,6768,7159,2907,6468,5269,5241,6773,5427,6436,7105,4445,6410,
2910,7141,7183,7137,5193,7175,6486,7167,637,618,98,3565,7093,7206,288,122,7171,4561,1149,6490,2549,6492,48,6494,6553,6696,3567,776,778,6327,3639,6981,1567,1564,7226,831,3566,392,6503,3652,6326,7089,3679,4583,3535,7186,4224,839,2002,258,268,6107,5282,6981,6346,1668,335,5510,6983,1823,4060,6560,3700,320,3761,3962,756,97,666,7052,5651,383,7263,328,2782,7268,6974,335,7271,5268,3453,7274,6436,3512,7047,7122,6968,5895,3523,7051,7284,6957,7286,5671,7055,5648,6572,6973,7281,7276,622,328,4246,643,7268,6574,
5663,5504,5532,1558,5123,7066,256,4058,3930,7250,6255,451,3776,287,3612,98,287,5013,1901,3761,666,4675,3911,6860,788,4204,262,1883,4522,104,4721,293,6485,4705,6864,6592,5193,577,112,3877,1302,1195,44,3348,1683,44,4778,7061,44,686,121,3871,530,328,72,686,824,798,753,3210,7098,2829,788,3723,6942,616,4585,7079,335,1818,7256,5557,5298,1754,7228,6358,7305,680,1718,7375,1750,3644,6605,6624,5301,335,6370,982,1713,7237,7379,1514,110,1813,578,6746,6613,5404,6205,1653,97,120,7400,2770,5227,4676,7130,2351,621,
623,625,4826,3918,4829,4620,5179,2417,6647,6806,6070,5631,7036,5294,7393,6519,461,2155,7395,421,4056,3028,7140,3082,3032,2727,6163,5001,335,6611,4690,3419,5083,6186,2586,6183,5730,3358,4142,3845,4731,4842,619,6053,3366,3424,3422,4151,3427,3372,117,3374,6674,6306,294,4581,3275,1594,5376,5734,446,2157,7077,7473,1623,6130,6141,3010,4431,2770,354,6168,3533,4591,5900,4634,6644,5751,451,6069,4794,5470,4796,6260,5969,6076,6182,4972,5472,3249,5588,4976,3253,5977,3256,1918,5980,3778,3263,5984,5986,5988,7441,
5849,2486,5948,4863,3406,5891,3192,3445,5872,3608,7484,3330,3746,5800,5206,3957,7527,4940,7242,3780,7434,2571,7530,5141,7532,7479,4555,6143,3394,5019,1475,5021,2968,1480,7390,1715,308,7260,922,882,3808,6955,7295,6979,7106,6692,5020,1477,7549,6451,7065,6609,34,612,3551,6715,7031,895,7157,7545,5478,3770,7384,3651,6556,7240,7380,5503,324,7579,1821,5298,461,262,5667,5121,7088,3554,3656,371,829,500,666,6411,7365,383,111,1715,73,3158,4584,7472,4902,7198,4189,3902,789,7230,7111,7087,7113,34,6604,1823,7432,
6511,7381,376,7253,5093,6345,4181,3081,7118,3554,3756,7303,5108,292,6538,5647,1772,5526,7285,5652,7292,806,7280,7059,7546,1867,7565,6578,7011,1489,6028,6223,6300,4830,6216,6303,4636,3848,6028,3745,6142,7482,4567,7652,2566,6049,4143,6254,4732,7456,3364,7460,626,7459,4148,4975,6057,7463,7465,3376,2829,7479,4924,5805,7431,7471,5733,461,1591,5047,3602,7608,7659,5841,100,6223,4860,7519,6793,3441,4853,2494,5894,7641,2082,7534,6940,315,2012,5726,4511,5847,4737,372,7451,6050,5750,4030,4146,7672,7676,7675,
3369,4152,6059,7425,3872,7665,2932,4968,5970,5602,3247,7502,4974,1906,5975,4977,7507,2676,7509,4984,2682,4986,3265,2688,3267,5990,3507,5744,7539,5185,4598,5805,6223,3745,6169,4367,5595,7755,6009,5933,5820,6236,7694,6193,6285,3274,7535,7370,7693,731,2794,6231,288,7520,4316,3891,4255,7729,5739,6105,5783,6005,3828,6119,2794,6791,3455,4900,4317,1559,6028,7600,7340,3386,933,7695,7653,5947,6264,6754,2932,5938,6211,3982,6E3,7801,6094,6109,7542,6132,7544,4643,7781,1877,7774,6925,4766,4015,4745,1189,7761,
7730,3272,6286,7470,7692,7688,383,7533,4589,3541,3333,1822,4996,6159,4998,6162,4992,5848,422,6028,6308,2916,2566,3794,7314,5801,7270,1675,2839,6698,6388,2447,4834,7823,7816,689,4683,4641,7814,7803,7782,6018,503,4881,7706,7199,6711,7797,7824,2643,7661,7481,3101,7807,7844,6274,7765,7474,6140,6315,7517,7538,7849,7531,7835,7860,7833,6170,7403,7843,7799,7666,7479,7884,7894,6193,7800,6087,7343,7881,7780,7695,5898,7819,4899,4323,7822,3507,5962,6043,2225,6045,5966,7728,7895,3125,7788,7732,4499,7791,7779,
7899,367,7901,5798,7867,7904,7926,100,7731,7499,7437,5603,7501,2669,7504,3251,7506,2674,7508,2678,7743,3262,7745,2686,3266,2690,3268,7714,7798,6193,5819,5794,5887,7802,6792,5890,3191,7703,3446,5108,2830,2832,2047,3937,5805,4554,7813,7663,4557,7859,278,7837,7436,7491,7438,3350,7841,7953,5805,7848,7364,6108,7918,7900,7762,6279,2441,6282,7889,6097,5871,7810,3507,7875,4684,7973,7815,7919,7865,2298,5903,7959,5315,2082,7698,8007,6927,1185,7522,7963,7525,5108,7537,863,7838,3419,4999,7440,7952,7858,8003,
1822,7985,4392,7754,7844,6318,7770,7893,7537,4969,5581,7979,7937,5972,7735,5974,643,7942,3255,7741,7945,2680,5982,2684,7746,4990,7748,6165,7766,5693,6092,7993,7988,7927,7896,6140,7543,8001,4895,7970,7897,5939,8002,7989,6209,6042,4269,5964,1954,6297,7932,6038,4295,8059,4935,7866,7886,7986,8079,3512,7890,2402,7972,7877,7664,7695,7751,7887,7540,7811,6140,7662,8090,7974,8026,8087,3391,4590,4560,4368,7808,7763,8058,8086,3996,3493,7862,8064,3780,2082,7956,7931,7954,8060,7825,294,7684,7975,5907,2898,7752,
2565,7804,7812,6257,6133,8008,7990,2890,7992,7785,1236,6643,6612,5602,7424,5589,2886,8055,8081,7929,6093,4105,2993,71,821,7369,376,7371,7793,8101,5698,6030,5776,6149,3111,7932,7667,7453,2839,7457,7674,6055,1905,7462,4153,7464,4155,7466,7912,8032,7969,8031,6293,7914,5395,6296,6046,288,2996,8178,8157,5907,8109,3489,8004,2147,6088,8127,4407,6028,7977,6160,963,8022,7982,1830,1457,7490,7719,619,6183,6620,5608,2588,8110,6224,629,7789,8012,7910,4502,8080,7861,4736,8132,7893,8119,6029,4728,3079,5749,4776,
3403,6256,7712,6304,5755,7773,2982,5654,292,7686,2911,6712,7984,7891,7759,8223,7873,8027,7870,7601,8191,1822,3745,7868,8061,116,3416,6051,5613,8167,4149,3425,8170,7678,8172,7680,4157,8145,5953,7869,1056,2358,7606,7864,5774,7880,8195,4089,8246,5961,4601,8276,8030,8188,8252,7931,8116,7809,8187,6193,4428,4511,8222,6481,6152,7826,7769,7476,7912,8280,8094,7753,1196,8066,6140,8123,8188,6210,5790,7878,7695,7757,7486,8105,8133,8071,8159,5829,1446,5831,3434,6097,8190,7287,7874,7479,7758,7487,8106,7794,1149,
4887,8272,8328,8188,3500,4888,8091,8070,2643,7898,8224,8340,8278,8111,8088,8131,7863,8333,7955,5852,4499,5854,894,5856,8025,8289,1149,7898,8116,5843,8228,7669,7455,964,6257,7713,8355,8120,2643,7707,3004,6209,7783,8148,8371,2659,7818,1180,7820,4235,7911,8145,8010,7029,7961,4866,8015,526,3608,8224,3322,7903,8281,7994,114,7768,6287,7687,6289,8235,110,8215,5889,7924,5591,8009,2662,7935,8038,7734,7939,8170,7941,1909,7740,1916,7742,8048,7744,5983,8051,5987,8053,2021,1862,699,2578,4300,354,1713,1827,116,
673,1832,6870,3901,7594,6510,7311,7151,5135,5202,5138,5139,7155,1969,110,5667,7165,5313,46,55,5387,6329,7204,6550,51,8453,2524,1085,5246,7176,3847,5450,7615,8431,8433,3756,8399,288,3897,276,3452,119,2579,7630,7311,5013,1856,7289,7560,7646,7548,1479,7566,6579,421,8269,866,5953,1165,2272,4360,3587,7626,711,1477,6112,1363,7830,3355,367,6697,2782,6146,5741,4598,276,2782,5883,6015,4895,8508,1243,3181,7806,4479,8513,4518,8288,367,5210,3331,7931,7537,7469,8033,296,8155,7478,8304,8118,8513,8307,6155,4530,
744,1108,8237,800,7076,7612,6233,2775,8532,112,8504,4492,6137,1383,8513,8290,2291,8292,4461,7966,3364,7244,4309,8359,8316,6147,5830,8161,3945,8530,8255,7452,8257,7936,8259,3367,8261,7677,101,6058,4154,6060,1164,8551,8243,8327,8314,5739,8072,4484,6295,5686,7917,7831,7479,8098,4513,7893,7690,3601,2225,8529,6796,7489,8140,5613,7493,6650,6071,6787,8546,1309,8226,7957,7518,8011,8403,3189,8014,3444,7704,8145,6223,8522,7529,8300,2215,8537,119,7775,5949,8224,7653,8350,4952,8352,2800,8162,8390,8630,4671,8563,
5855,6150,5811,5322,8607,7795,7184,7797,8513,5835,8037,4777,8067,8516,8100,8349,8180,8073,8587,6033,5857,743,1271,544,8519,4910,8242,7611,8240,8646,8643,8112,8221,8347,5315,8186,2351,8035,7922,7936,8410,2667,8042,5976,7943,8046,3258,7946,7142,7948,4988,7950,8202,2894,8502,8513,8093,8084,4406,2758,2082,8503,8608,3078,4924,8580,3090,8622,2170,7832,8345,8291,8672,8034,3185,4997,8021,7840,6164,7842,684,8607,6115,4910,8694,8544,8393,8080,6223,8644,7202,8668,2782,8335,8332,8583,4524,8661,8621,8696,7850,
7882,7528,8326,8313,7893,8624,8402,4461,8624,8305,8338,5774,8585,5684,8657,8075,8184,5308,8720,5865,4898,7846,2932,8700,8695,8029,3690,383,5296,670,5558,7378,7582,6993,7061,376,8768,112,8770,6606,697,8767,84,77,724,8772,7433,8713,8020,5602,8201,8717,7714,7527,8256,7718,8230,7720,917,7722,8169,8574,8576,8173,8578,7497,116,8526,8297,8590,8097,7876,8593,8293,8566,1004,8742,8549,1236,3232,5090,8597,7772,7885,8036,8498,2581,8040,8411,4975,8413,4978,5978,8417,3260,8049,3264,7949,7747,7951,7749,8805,4861,
7777,7701,5892,3193,7964,7291,8708,6084,7931,8849,1365,8068,3535,7537,4881,7527,8205,8796,619,7424,106,921,280,102,3070,3407,2387,7495,5591,8852,1150,8346,8114,4071,8482,7564,8484,461,943,646,7615,6366,315,5459,8785,5252,2526,6766,3724,1516,6947,6668,4981,46,7188,603,401,328,258,260,7248,340,3210,5435,46,7402,8813,4214,8889,8901,101,8903,4596,8906,8908,5226,431,1802,395,4464,6491,5179,50,8896,6487,277,367,8914,8905,6632,46,50,6397,8463,7614,416,309,311,1165,5477,335,1894,98,7008,3551,1562,5025,6988,
7596,608,148,3830,1980,7561,5117,7563,5022,8485,7650,421,5374,8398,5377,3704,5379,7053,726,2521,4803,4279,5953,578,882,119,1941,78,7266,501,8569,7103,785,6599,5193,822,7556,100,87,499,8401,2584,293,5953,2867,4300,1118,4190,8425,6736,7043,7261,256,6966,8480,7049,4058,4703,8478,6571,7639,7290,6980,7623,296,7231,1569,7127,922,8139,7444,6802,5587,6648,963,8142,6652,8144,3946,6581,5929,6584,489,6035,798,791,6767,4224,109,8459,7135,7196,2342,4153,577,1843,8953,2667,5713,8408,6268,9043,3549,7931,6655,3102,
6772,7853,6782,103,909,6785,367,1586,1576,367,1830,8999,1391,6738,7022,6740,4769,1545,6801,7162,7212,3775,4780,7454,4461,7443,5585,6613,3680,6615,448,6806,8208,6185,9085,6188,5610,625,6667,4290,2876,6678,2856,6806,6674,6677,3933,6683,2876,6682,6675,6685,2879,6925,5626,5628,2663,895,6594,6946,7146,7141,7339,8645,7689,495,4519,6590,7195,8983,3386,555,275,577,83,3761,339,6540,8436,3227,1862,65,519,281,3234,99,5689,921,960,8430,1029,8432,275,8434,9074,7567,5670,2458,5402,7401,6921,5574,2524,6698,7102,
7420,4001,6806,7317,32,97,111,2616,4338,6425,8455,3056,8917,5949,6371,327,7215,3780,624,4386,7337,3056,6552,9076,455,8435,6932,5223,3778,4309,6706,644,648,8449,4705,8934,5387,5157,1484,1110,7419,7205,7545,8937,7086,8466,9148,8468,7078,6348,3643,7237,3997,3236,428,7010,7595,6996,8774,296,6361,1410,6518,6458,9213,489,7130,6696,6349,3692,3676,8887,365,1568,3553,2225,6559,5688,7429,1088,6502,7429,3685,8738,390,9229,3689,1598,6981,9230,409,5069,574,119,6700,3596,8960,320,1798,279,9187,6613,2675,9156,4561,
2389,9261,7147,5138,6771,4813,9083,1165,3278,6806,9273,6783,214,6775,4822,1935,7397,280,578,4812,354,5348,9276,730,6876,451,9287,9063,1577,1277,1524,9284,8199,9290,9058,9292,9065,9280,3233,7174,6637,4068,8927,4540,4280,8450,9196,7167,6554,7376,6984,6524,7935,8486,7622,7584,7624,7307,7254,288,5555,7586,1751,348,7259,9232,3640,6602,5556,7385,5558,7259,383,6548,9221,960,9223,3552,6521,6507,1679,9257,256,6937,2958,8892,553,6757,6931,648,9351,4910,4434,9350,9235,9203,9013,288,9339,6517,108,7237,9343,6523,
5094,2993,7621,256,2145,2794,722,8784,7829,9274,5378,734,8967,2216,9374,723,8297,3605,9380,7269,8156,6193,3461,9375,9385,9379,3607,5108,8628,2740,9383,9376,8821,7688,9386,9395,5662,9320,3668,6012,3649,3643,7233,5080,8437,7310,5450,9234,9411,461,4060,8776,7581,9413,6609,9331,1746,6603,8769,7588,3589,6831,7038,8947,9232,2417,623,6625,1683,5304,5877,8760,6725,9437,6739,7366,8153,296,7031,1263,633,1804,9442,9070,1147,7025,3696,472,9450,6624,9438,1626,9049,569,9447,4055,613,8498,9463,6587,4228,1088,9463,
9313,7385,8946,3730,6696,3689,7072,117,7042,5643,6951,421,6970,7643,9004,271,6974,3716,9322,8959,9217,320,8595,8808,6321,1718,9474,6501,7257,8893,8476,5950,7264,455,7267,9486,9388,288,6797,7633,7291,6930,9511,7641,4056,4058,3757,7283,7294,9010,7560,8250,9519,7638,5660,7049,9516,921,262,9514,8212,9531,7054,9485,9520,9526,9487,7297,1653,7299,6798,6650,9531,9472,7580,7588,104,9017,672,6721,4537,6715,6322,9500,315,6325,4537,5373,7358,7360,3696,7313,9244,1217,4284,9054,2770,8962,9377,8964,732,9387,3608,
7178,4714,7330,4718,7333,7335,4723,8542,5006,4247,8971,6613,9118,8729,3817,6336,6715,3548,3822,5730,7367,4716,8808,5833,9461,5405,6650,554,4802,9583,4541,8894,9586,4253,5193,8819,294,262,643,9601,3895,7193,6413,7097,7796,6623,8479,5565,9451,5567,7831,4773,9219,6768,7201,9607,789,7224,392,9371,5592,7908,2770,1802,6624,9457,1687,9443,5766,9598,8034,453,4205,1683,3399,7828,6948,5193,1037,8165,2351,437,778,9590,7225,777,831,7426,324,9015,370,1669,6724,6375,5516,9483,4827,7644,328,8955,5294,8957,7648,
9548,421,9019,9082,8141,7494,8143,2845,522,9387,9401,9378,8965,9572,6958,6666,7852,3419,9100,6680,5616,6688,9097,9106,6820,5619,6688,5624,9109,9703,5627,6690,9588,3041,8859,7315,8207,2582,9089,4694,9091,1841,335,65,7397,577,2172,9622,6627,9433,292,277,551,9177,5315,7570,366,9267,4224,2861,1663,9498,5348,314,1645,6806,3929,727,3071,727,2109,5052,6508,4592,9056,9083,9278,9023,451,9278,4817,121,4819,9061,9279,5688,496,5058,9749,4436,6729,2632,79,4538,6990,6863,7104,9125,6233,7009,9764,8498,2071,9114,
5029,9585,9773,7871,9248,3347,9482,9258,3857,9507,6965,6563,9536,6565,9381,9727,455,116,6977,9790,7124,6981,9447,7276,8949,5027,9549,9116,678,6995,9319,1575,7002,335,84,6465,4300,9363,3562,6519,8884,121,9367,6508,9318,888,9816,3344,7028,4022,3613,1419,8930,5490,9827,72,6938,9834,442,4300,4919,5497,4368,551,6926,8363,9683,503,457,836,354,9744,3370,629,694,9746,9453,794,3612,5243,9832,9601,575,4539,9604,6064,9827,80,7161,9360,9406,9362,6755,9341,6504,3424,9344,803,4423,9633,1264,8609,4631,7655,5613,
6217,7658,1159,4727,8702,3942,3990,8318,8564,6151,1217,4913,942,7892,8909,4016,4105,9897,3954,8706,2758,1160,8854,9178,9903,1211,8137,4646,9889,3105,4928,8656,7915,8183,8589,8877,8958,3630,8782,76,1973,9633,4849,3136,114,8626,6665,3018,4288,8725,1018,2847,114,3140,9079,5949,9928,2460,291,7898,9942,2522,3137,9767,7978,8206,91,2636,9165,108,6762,2641,498,116,109,8596,2239,8598,9946,2629,1457,9939,1429,7459,102,8974,4814,2521,7321,8991,4112,1417,9949,6586,8968,9933,3399,9967,2161,9921,7648,1744,100,
1482,9255,9633,6713,9551,5929,9553,9314,6324,9550,3842,895,293,5171,2772,110,4648,6709,9783,8249,9042,9128,97,9045,282,338,1900,1429,9574,7329,4716,7331,4719,7334,4839,7336,5953,3813,329,2524,9734,8894,4980,4309,1831,6337,1015,1835,9229,6342,1690,9603,10003,4812,4962,941,10006,8982,9784,6728,749,6737,700,9459,9072,4771,9134,8894,8897,5056,9029,8074,747,3695,9032,6735,749,2630,6730,4127,9770,8511,9119,5688,9051,4881,6959,9615,8154,6779,6776,9289,6778,1587,9062,6781,4818,6783,4820,6786,9619,9436,9458,
9641,335,8454,5403,5443,9594,9445,849,8500,2529,9600,2541,8970,9604,8981,7136,9629,10039,10002,262,3550,3948,4904,10044,9782,10046,10008,2417,9051,9130,5850,9133,10016,7410,6393,4309,3962,7359,880,7362,8300,2814,10001,4804,10116,10107,1651,6233,3808,262,10029,4129,10031,5160,9121,8972,6945,9781,8667,9785,9667,7044,365,9541,7265,9506,9793,7057,3608,10075,6961,9620,9525,9794,9508,6997,6441,10164,10159,6958,7001,9800,7291,9528,9518,5112,9521,7049,9259,10177,9537,10166,9006,10162,9009,10182,3608,1984,
9524,3704,10178,9381,9003,10158,7123,10174,4057,9529,2579,6956,9522,8323,1822,9533,5858,7293,10169,5527,7275,9540,3962,7301,3686,10195,7640,9673,324,9990,9804,6987,9806,810,6947,9809,7637,1054,5035,1862,6202,7592,333,9433,10094,7401,6408,8440,5152,5235,5184,2215,7100,5189,10136,9041,9634,8378,10235,9076,6449,4300,5446,6632,5443,9827,6631,9202,9866,9839,116,5441,10253,9312,6981,641,7109,8882,8938,6695,9814,9827,7428,6458,9823,9345,9492,9826,10259,7407,4224,10250,10260,6758,2770,5496,558,5218,7420,
6867,279,5189,6806,9847,5630,10289,9851,5630,882,5014,9856,7831,9827,6749,4777,10255,9838,6450,6753,6081,9827,4438,10306,4300,9868,5597,9845,2126,8464,8938,9366,9876,9368,303,339,960,1387,9145,727,8467,3831,9150,9825,2216,9169,9304,10248,4309,115,663,313,7128,8924,10057,10151,9626,7618,8465,9146,10329,8435,3630,9332,7619,9328,3617,9E3,5050,7046,10181,10165,10188,2566,10205,7642,107,9671,9012,9871,6693,1556,5533,7309,7568,7342,7344,3109,1100,7347,8200,7349,7351,679,7353,110,7355,9558,5656,9560,10131,
9563,5265,5193,340,496,7368,9495,3732,749,5304,5046,9961,10332,9568,9687,9570,721,9690,8848,591,10404,7477,743,6433,542,3672,9392,8963,9288,9689,9404,7641,1463,643,10416,9569,10418,9571,10420,9464,6519,9285,3102,708,5098,1391,2544,9642,6374,4530,9566,4542,1675,4404,5845,50,54,4069,104,10445,52,913,982,2950,7997,10217,9321,7063,5506,5302,7615,9212,101,9214,7411,9422,5670,9796,9729,10336,4530,577,4962,8904,9171,7194,6733,9774,5036,10180,10274,9769,85,328,2083,10102,9201,5410,9124,10047,2498,5037,279,
10274,8892,9116,4309,7324,6522,9610,8557,1429,10497,9344,6715,10272,9342,10321,1327,5006,9787,256,10161,9008,10363,3702,10200,7559,7049,10194,10208,10216,10490,9728,9798,9792,10520,9011,10455,9407,10370,7308,3680,9805,5028,10224,5031,10226,1449,10228,1842,9867,6349,10320,6506,8820,9151,3556,1778,9815,10259,9818,9874,6520,10507,8495,4663,7629,10510,7899,10363,7635,9185,10186,10360,6969,9670,9507,9488,6981,9675,8879,9677,7045,7920,629,10424,10410,7523,8966,10166,8224,9391,9384,10417,10578,10407,7641,
9081,9940,2581,6619,9715,6187,5468,8367,7696,2566,8342,8124,10582,9400,9962,8822,8599,6257,9711,7670,452,3408,7424,6653,1935,9399,9393,10419,7049,6440,9297,619,7854,4155,4844,625,4036,2797,8151,622,10098,8499,8469,372,1890,7967,8558,6750,10597,9908,6124,9625,559,99,121,7418,9614,8490,5805,10598,7695,8997,5302,9416,9659,9412,5077,7310,743,10148,8893,7601,1778,9417,383,10551,9365,6519,10274,7554,427,10525,10191,10187,9801,9361,10369,3629,10572,482,9078,1429,9185,9150,8038,6874,6809,6818,6908,6814,6901,
6880,6914,6887,6894,6890,6831,6834,10692,6904,5630,6898,10686,6902,10688,6844,10690,10698,6912,6849,6910,10705,6848,10697,7574,3659,9864,8733,7893,9348,118,10714,5500,10315,10719,9984,9228,3643,405,10214,10654,7568,4106,4108,8317,4110,4758,4657,3968,4180,6012,4113,4184,1532,2993,10112,4544,10114,9988,3733,4173,4111,10739,4179,4115,4753,9976,10556,2994,383,8624,75,101,121,775,9884,8894,3536,9056,6806,6751,1571,2388,4798,10769,7727,6728,4651,3735,10355,9068,3733,10776,3737,4072,4123,4907,960,6180,7139,
10454,1159,2993,90,495,109,9530,10732,4174,4655,5998,10750,4756,10737,10798,4053,3313,4170,2525,6521,6312,7960,4752,7628,10754,4755,2809,10801,4662,10813,7356,474,8940,6367,348,9421,7200,10488,10118,4106,863,10070,4872,3457,10734,4182,10817,4757,10797,10816,4760,10756,773,9837,6212,3959,9061,10748,10832,4754,10838,4660,10836,4759,4658,10839,4955,9067,2225,7033,5139,2162,6468,10104,10715,10138,6741,10315,8149,2525,3856,5038,10795,10749,10803,3863,10752,10811,10799,10853,34,6706,4159,10745,4536,3770,
4302,4212,629,9720,4845,10076,271,1931,9197,670,10726,10390,3108,3672,10894,2800,10897,3689,9066,5010,9693,5602,4961,6704,941,1261,4903,4963,1417,8659,453,666,3548,9821,4361,808,1105,2527,4284,7246,109,10861,10645,648,4904,100,10925,10244,10477,7298,8938,10894,742,8430,9247,5633,10283,4224,4956,6558,6349,10917,4943,4421,9581,4139,4699,10784,8214,7489,10787,1429,9601,655,108,72,70,79,86,1466,9751,10905,10078,1901,9291,6784,4821,6035,9239,1391,9241,6458,7366,7333,5198,496,6667,8038,5239,103,95,4403,
987,7453,287,10982,95,10768,1410,9113,4245,10040,5953,10914,9499,3643,10945,4425,808,5953,761,1213,647,10930,9627,10825,9618,10757,268,10957,86,10960,10962,5791,5169,10916,10820,9555,10946,10390,2814,7413,4825,4827,10643,6919,7420,431,1602,982,9754,619,10622,4835,4848,10023,9976,5444,354,287,11031,7005,5591,11004,7085,10759,121,825,10168,10602,10100,3609,121,275,2458,674,4688,7191,729,11007,9650,3386,4106,4038,10888,71,11056,1029,429,516,8351,10831,10850,10735,4114,10871,10755,10818,4747,5674,348,
10808,10830,3859,10846,10812,10848,10835,10753,10876,11081,3958,4748,6367,10844,10870,11088,11093,11091,10875,10872,4664,4055,120,4244,11063,10489,3836,11020,5559,11001,10947,10150,1523,279,9036,5996,9034,323,11119,4530,10730,348,8473,9940,3964,11100,11104,10800,10874,10738,11131,10877,11125,315,7273,11099,11076,10833,11090,10815,10851,4054,10789,2779,11039,6867,8498,11129,11141,10847,10852,10849,11092,11135,11094,4297,10783,4303,11109,10118,7277,10978,1664,10904,5613,10989,10985,6391,3561,10988,
3898,10990,6755,10624,5839,2271,9469,8562,4045,11130,11080,11102,11134,11185,10805,2797,11067,625,5284,2008,11152,11157,11185,11144,11077,10740,11147,2797,6521,5924,10809,11075,11196,10834,11198,11142,11155,11178,10004,4649,10747,11140,11207,11143,11133,10802,11188,5249,9332,4276,10995,10931,11110,10364,11028,6933,7420,6674,11034,91,1165,95,10087,626,8175,10741,2525,10791,2002,5073,11151,9892,10733,11153,11089,11211,11209,11154,11146,8323,10866,11202,3424,11139,11182,11247,11217,11250,11219,10837,
11211,11189,4800,3611,11068,97,11005,11168,8631,11206,11103,11197,11263,11145,10804,11240,11256,3896,7279,11216,11275,11208,11277,11199,11105,3584,3643,4360,6577,11280,11267,4834,4207,11161,10885,11128,11246,10796,11261,10736,11287,11210,11253,5950,11052,8038,436,9852,6810,453,373,895,6706,950,1713,76,10928,367,901,6987,2524,11320,538,10486,5419,11009,10071,335,259,106,4209,294,9591,6714,11163,11010,760,11070,11058,277,11339,11331,9509,11018,10944,11112,10918,291,10920,8997,6950,9668,320,5009,119,
5011,10513,10173,7641,10502,323,10185,10363,10512,6570,10363,3681,97,6765,11370,9234,541,5642,10526,10202,462,10483,9611,3552,10103,10669,10201,7049,933,8986,9663,11376,3660,11386,9381,6457,3552,6355,11366,11362,738,10928,729,4490,3831,10363,3962,10484,9612,2541,4812,279,9544,7252,9490,6985,10533,1562,3424,1883,672,291,3551,643,814,91,3142,335,645,3730,296,5634,302,11426,517,9432,1091,5501,11432,3177,11427,11435,7050,1652,11433,595,11441,10717,301,93,7851,11282,8474,6993,10923,11244,6993,10497,4232,
1328,101,10365,810,11421,6986,278,11424,11444,11428,616,1463,3842,11448,10225,606,11450,101,11258,6999,726,7266,4210,11149,378,8773,9061,7394,9218,10535,999,8806,7009,9556,11471,11462,7009,11423,284,11425,11439,11434,11429,1091,6326,125,11449,1438,11458,10538,2997,1126,11477,1328,1723,7239,1608,11463,4300,11465,11497,11467,11441,11431,287,11520,11501,289,11437,11523,11499,11445,11525,5499,11438,3506,11440,11525,11447,11504,11512,9498,4801,960,6368,11494,11422,11518,271,11498,11534,11500,11469,11503,
11505,2081,10491,481,11475,3472,383,6450,9579,11543,1873,4300,798,9580,1623,115,58,123,120,271,1185,121,11572,528,125,47,11570,58,1925,11574,48,125,6578,11516,11496,11547,11524,616,11522,2315,11535,11469,11437,11553,4882,11558,760,10313,10037,4537,8951,116,11565,814,372,11568,123,5496,11575,4767,4434,11611,520,11577,11609,3659,11580,909,11613,11583,11585,11495,11546,32,11548,2504,11593,376,2834,11533,11628,11550,376,1743,11596,3830,345,4703,10972,11478,4882,11127,11453,10792,10794,285,9136,10652,
9438,9433,4949,282,10576,11053,9688,10427,9527,3808,11244,11119,6660,4530,761,3703,6427,4309,11268,10579,10577,9403,10616,112,51,11670,11656,10405,10579,7304,10368,7625,9409,9334,6720,4425,11562,10728,5670,10234,7846,6752,6747,3561,5573,4777,6332,553,5494,2351,7575,5579,10841,6535,10865,5599,11703,4224,5499,9984,11413,10457,7617,3674,10667,9483,8478,9150,11393,7058,9672,3946,11361,10215,10527,9489,11712,300,10676,3387,10500,3529,109,9590,8494,7074,9718,6576,9211,10665,10554,9371,3558,9873,10664,10273,
11741,3589,10893,9554,2737,9502,7277,10156,10563,10170,7291,10189,10359,11756,7705,10362,11399,9534,11461,11724,1540,10210,9503,7300,9543,11399,9545,7587,6984,11729,7129,10126,10635,10964,10824,10476,11227,1855,7436,11663,3535,10128,10388,9562,8993,9666,996,9467,9509,11707,4309,454,361,9359,9123,11782,10659,10459,8938,9720,9637,5485,9346,10333,2833,10955,9721,4618,8361,11230,6400,2691,11233,3063,9954,10266,354,895,11468,9596,6567,1528,294,11123,8855,431,578,9738,9083,9740,7566,11310,2700,9852,11836,
9033,11828,8255,11815,2839,4056,114,2639,10908,1902,633,11849,9761,1449,9271,6802,9753,6806,9756,10084,9758,10086,9760,1036,10678,6759,10146,7182,11330,9587,10757,10657,10495,11801,9617,10071,10509,11356,10511,6772,11398,11766,6241,9539,1700,7558,10192,11720,7705,950,9797,9799,11883,9538,7645,11711,10530,11728,5024,10221,10534,9808,10536,11474,11508,6993,292,689,10226,3547,10542,6519,11687,10546,7229,10673,10663,7237,6368,383,8886,10465,7090,11866,4354,6800,6871,7936,10683,6885,10700,6811,6852,10689,
10695,10694,6908,10692,6893,11937,10704,6879,10703,11943,6840,6911,6900,10697,6817,10710,9976,6906,11946,10709,6907,10704,9113,11813,3771,11845,9694,7952,2637,439,4356,11823,9120,10829,10108,1862,78,9502,10180,10366,10429,11501,11378,11884,7059,10490,11909,9542,11887,10182,11768,10519,10670,10165,11768,11908,11465,4210,9789,11894,11889,10528,7627,11727,7566,6986,5026,922,538,6500,8596,1126,6993,9812,6996,11990,3930,11905,8185,10313,11514,9372,11564,644,11606,1658,10397,794,7020,9250,5464,11915,922,
11371,10050,749,7020,4902,10975,1088,11918,9242,11855,11118,3724,4229,397,10390,9591,10938,3691,11735,3676,8767,10352,9427,6984,9433,7342,742,9420,5298,5289,8212,9821,5953,11788,10130,11790,11869,11802,11340,10203,1959,11792,1015,12055,7387,1856,8212,5289,1088,12071,1823,12057,731,12069,569,12077,3635,9638,3320,10105,5179,9628,10863,1544,11225,9772,10117,12066,3387,12081,616,12083,3646,12085,8501,100,12075,1391,12099,9822,3684,11332,1058,6715,12106,4060,9661,376,10353,1730,1842,837,684,824,11749,
9996,8893,9825,1778,3550,3673,11750,461,10549,6450,12035,11746,10544,9824,11809,290,8812,3710,7492,9026,5471,10295,480,1905,9854,480,5730,9867,9869,10258,6450,9836,2958,10312,10282,9842,8876,6981,12133,10506,12135,8495,6559,12052,670,11326,3561,9181,91,1631,5393,1699,10036,3643,3672,12168,10992,461,10617,1172,4057,12169,5223,12172,5264,12174,7385,11319,12182,12178,790,9282,9961,10118,10717,77,3703,4314,908,6795,6476,2238,11786,3780,11447,3231,10910,941,9478,10936,450,550,10652,9590,6349,9411,1830,
11796,6265,7009,12215,3643,9498,9113,100,11334,1206,3548,6715,65,12226,11335,9333,3651,6061,6938,2221,10124,4961,709,1883,5479,495,8931,5163,8451,5387,9970,10019,9647,4634,9649,11227,3818,12210,1566,12212,7602,5298,12222,11684,1742,12114,9014,9234,6557,794,9990,9433,9992,3842,12261,9546,1742,11492,12191,12091,10110,11213,10045,10137,9564,9608,9051,10012,6867,10015,7412,11112,9575,10019,9577,4720,11149,5953,3804,1939,9730,8034,11660,10028,11925,7141,10144,8855,10140,3843,12303,10030,9264,3780,10134,
5042,9770,7360,3950,12281,10245,10942,794,12029,794,10052,11436,11705,5545,5611,11272,11838,9697,9096,9102,9700,9105,9110,6687,2876,2884,2663,8804,7442,12219,6268,10059,8754,10061,749,6585,6467,3561,10308,8133,6468,11695,3780,9637,10163,2239,11794,4285,700,10066,9768,10069,10628,2814,9127,2002,9052,9935,11855,10431,11857,10966,11233,11860,10968,11237,11854,11254,2351,11690,7141,9173,6138,10097,11826,10333,11408,9602,10002,12318,10932,3710,12279,10743,4545,12393,11227,12368,9129,9131,477,10681,3535,
11777,10788,288,12061,7361,12063,11116,12278,10135,12093,12282,10391,3386,12206,10284,10940,4309,6941,10147,6595,10495,10659,11355,10153,11769,1486,11480,11367,11881,11723,11977,9381,9510,11763,726,10172,11994,3608,10175,11455,12440,1363,10869,12443,6969,6568,12436,11987,11760,7282,11759,10196,7641,11986,11719,12444,10198,115,11647,79,12437,10166,2082,10363,9484,11765,12466,11768,7277,10213,3210,12461,10672,10368,10219,11900,12001,9807,2124,11473,12007,9771,3557,8998,12030,703,9633,12320,10653,4952,
10857,5304,2637,2786,12496,7035,9066,749,1002,7025,1398,12500,9070,12498,1285,12507,1485,7356,1778,9989,11293,335,10900,12041,9633,12053,3687,11266,6222,5337,4703,882,806,511,7637,11273,11087,11248,11101,11251,11249,11307,11364,294,10980,9951,2794,1595,5666,10083,612,4540,95,10982,2860,4850,12548,11175,7360,11176,6468,457,121,4342,9108,477,3812,281,1900,2872,102,95,11358,11212,9221,4703,879,643,4826,4057,107,12529,8384,10810,11187,11286,11079,10834,12523,11242,3202,10190,8637,11183,12533,11158,11186,
11220,12583,11294,110,12585,12465,12531,12589,11303,11078,11184,12594,7442,10779,114,9329,10778,10775,12607,3617,11971,10558,12538,2212,12453,12477,9405,10345,11682,10220,12482,421,11454,9524,383,10923,12465,10227,11509,5381,1571,9777,1143,12527,12576,311,12012,10765,12633,12636,12577,9813,303,12212,10356,7596,10358,10560,11762,12450,7291,12470,11974,9415,7073,3676,11729,12383,7177,10125,10889,4979,5387,8560,9882,12371,12067,7976,8724,9905,3957,8525,7827,8527,10099,10630,1467,8505,5769,9448,8561,
8506,8394,9945,1336,8764,4947,1137,8856,7765,5040,68,5041,282,5451,5567,9433,8986,993,624,729,12170,4216,10007,7796,455,961,5006,8661,2180,9827,5223,6495,4388,291,328,2221,74,7603,12704,284,8457,9076,108,488,3550,555,414,431,8923,5146,3263,4309,1518,575,12286,10014,10862,4461,12726,117,12728,499,2221,12732,4705,5986,7177,3453,11389,7405,12720,98,12722,271,12715,10470,7405,5228,12139,3546,9204,649,12324,5295,9332,12269,9481,11879,7569,12463,12598,12618,9515,12463,12446,12652,10367,10345,12480,12026,
1731,1678,12087,6472,11870,11970,8250,689,12059,10948,12395,4248,262,10005,12064,11876,11871,7276,670,12756,11626,5394,6338,12532,9325,12768,11750,3672,287,9326,7386,12078,670,287,7374,12809,12123,5288,670,11094,1936,12803,12185,8182,12807,7578,12819,12262,1823,1754,12812,12830,12274,12832,7349,32,12818,9425,12234,11774,12837,6624,11094,12313,2353,4538,7081,709,10951,11816,7338,12706,11346,2759,10462,6850,5650,11781,12799,12789,12794,9584,12416,10245,608,299,8498,8942,12669,114,11922,2225,12871,7569,
12307,10142,10342,10343,9582,12279,10042,10907,9309,12854,12094,12856,4395,9613,629,11109,10106,12867,10040,12796,82,11323,104,3820,6501,4464,10727,11227,2499,12825,12805,10035,11075,12808,12841,9255,12833,32,12813,8778,6624,12817,7383,12835,12843,12084,694,11094,12410,9561,7363,5953,5587,1822,12792,12413,12864,12848,12397,10745,9040,12394,12877,5072,12302,9653,9268,12881,12790,278,3672,12907,12173,12910,12829,12912,12810,12816,12915,12921,9327,12821,5469,12840,1738,12954,6189,9113,12110,12184,12908,
569,4654,12911,12962,12820,10642,1058,12834,12953,12973,4060,12919,1745,12972,12831,10354,455,12513,10662,11744,10461,10463,10126,10332,10467,9778,1115,10471,6704,10473,8268,11555,10480,110,10482,2043,10485,8229,12800,11554,10479,10554,10494,12676,5949,12615,10633,10501,10554,6715,12161,9875,12163,5088,9502,12460,10517,9795,11891,551,11893,12466,11680,12620,11414,12622,8950,10223,11903,3625,9810,12488,7577,5509,12957,12814,668,2626,9330,6981,12971,3632,11750,5513,8780,12517,10347,4395,11715,7262,
9541,6521,11370,9541,11644,12447,12654,12447,11025,7415,10566,12779,7851,3962,11477,12454,12458,11996,10674,7064,10332,965,3021,12352,7893,13080,431,12355,5315,13084,12596,10124,6253,13089,12289,13091,13082,8909,368,13091,13086,5765,5040,3065,8151,512,13057,8477,11369,11772,10569,7547,8878,1869,10372,10466,3119,8510,10628,2302,3328,7934,10438,9951,8679,7503,8412,7738,8044,6769,8684,4983,8418,7947,8420,8837,8052,8839,8054,2468,13116,3044,3327,2184,8655,8586,9918,8588,6034,3507,2773,3329,8370,9636,
3482,8591,8811,10316,5949,3131,8005,3151,9899,4461,13158,8135,3199,3225,8817,3201,6177,7931,3103,5819,2711,13161,13157,3119,3414,7528,10074,2482,3509,12686,3223,2941,7834,8692,3481,2896,2312,8253,3490,2934,2312,8322,2815,355,8728,12863,11442,3513,8636,3989,3456,8638,8353,8640,8659,13163,5908,13194,3286,8651,8308,4224,1936,8648,12994,3173,3013,3155,8670,1132,8711,8909,13208,2148,3477,8244,8909,3103,13177,13151,11708,3537,13159,8083,8765,13186,2741,1939,11204,5405,2419,276,13210,2816,9890,7752,3943,
9894,8641,3497,8117,12668,3387,13243,2942,13166,2208,5956,13236,12689,3037,2400,6790,8677,4592,9937,8358,3161,13220,8666,11064,2227,9933,9931,2412,3378,8759,2321,11732,5819,13194,13171,8360,13091,7711,4734,8233,8718,8494,8493,315,8492,2475,2553,8746,5949,2851,3499,4510,8553,13223,4461,1936,8626,8843,6795,2530,2076,6019,9912,3542,3321,8373,13245,2243,13279,2002,13140,13187,3498,2733,2522,8299,10390,2901,13192,13258,3517,13314,6235,13254,13211,8062,8089,12762,2255,13180,13271,4886,8271,5635,3334,7845,
4224,13284,6248,10637,7893,13309,4320,3199,13174,13118,3095,11914,10682,5082,276,6071,5086,4697,13238,3207,3336,8709,13302,8875,7893,3103,13182,3315,13164,2197,7931,13351,3121,13333,1986,12197,5158,9635,13214,1986,6180,8601,8678,9714,7447,8210,6189,13148,2709,2891,13312,4296,9937,9982,6465,12198,3535,13299,13323,13197,12090,13252,8177,13330,13141,3046,108,8383,8379,7521,7962,8616,8847,11761,13191,2746,13349,13224,13176,2509,8130,8710,13369,8909,6797,3450,2522,2993,10921,5193,13377,2592,13160,13228,
13304,13365,3389,13345,10337,13339,2400,7898,13334,13178,8285,13424,2720,13261,5695,3957,10588,3246,13389,9090,10594,13364,2902,13437,2150,8582,13350,1986,13297,13307,8381,3474,4880,13376,3328,6066,9020,5613,9025,8869,10611,13295,3208,8548,3183,2119,8663,5545,9933,12363,9950,8860,9952,2566,11964,9956,8320,2933,8078,8697,3957,2650,8752,6715,4932,12872,13149,13120,8649,13491,13123,7736,7505,8414,8683,8416,8047,8834,8419,8050,13134,8422,13136,7842,13501,6214,11961,7656,8365,13289,7714,13351,2710,13329,
8761,3334,13447,13119,8787,13490,9712,91,8790,7516,13195,13322,2288,8357,13422,13162,13115,13318,12025,7172,13441,13323,13536,3530,108,13276,13218,3045,3509,13190,13344,13483,13409,13321,13139,13566,13506,12671,13326,2777,3449,2521,13073,12588,11260,11285,11218,12582,11090,13461,109,13405,12283,5422,13246,9915,6031,5929,13504,13544,13260,13194,8556,11811,5791,8600,13476,7936,13478,5630,13480,948,9937,4881,2623,6924,10247,13152,13557,4526,12540,13491,9695,6670,9101,9702,9104,2524,13619,2871,9704,2881,
9706,9111,9027,3480,3126,6263,12408,13255,2896,8126,12672,2718,8391,13173,13439,13175,13191,13585,12418,2316,6136,13343,2451,3509,8816,13320,13630,3526,13227,13465,13423,13191,13253,13636,13645,13184,13354,2371,13153,3415,8568,8795,13540,8571,7723,7461,8263,7726,11239,12102,3388,13404,8581,8743,8909,8674,13534,3144,5923,11181,13233,13191,13231,13221,3486,13156,13338,2552,13482,4914,8612,13440,355,13265,9643,13656,3334,3436,8714,8789,8716,13543,9969,9971,3419,9946,9974,1880,4851,9977,2631,10623,13263,
13300,4892,13155,13651,13664,8741,8312,13167,2596,13698,12329,9951,11820,477,2400,3073,3069,3071,1592,13734,7355,13645,13285,6301,13527,8232,9887,3497,13562,13170,2482,13688,13367,2404,13303,9941,2925,13201,11205,13204,8633,8565,13544,3162,13332,13659,8212,3126,13378,13764,12946,13497,8057,13396,13393,13462,2942,13662,1983,13234,13310,3540,13776,3201,13381,13297,9932,9929,4688,9983,13682,2507,13216,2208,13609,13337,13277,13331,13235,13185,13765,13554,13546,8270,3157,13647,3179,13694,6004,13696,13641,
13702,13425,7485,9180,13722,13188,13781,3166,13648,13340,8853,8652,13553,3095,13413,7909,3440,8615,5893,13418,13799,2896,2710,13816,2718,13269,13420,13806,9904,13572,2758,13171,13771,13808,13355,13545,2220,7405,13559,2924,13183,8082,13798,13471,5763,13843,1115,9609,116,3235,3697,12933,13633,13411,13507,8825,2666,8827,8680,7940,13126,13513,8045,13515,8685,13131,8687,13133,8689,8838,8691,9936,9933,13788,13384,13823,8295,8397,10425,13773,13328,6106,13839,3957,13448,8815,13725,13814,3120,13244,13772,
12086,13321,8391,13179,2366,13750,8850,13254,3154,13366,866,8063,8099,4592,13749,3271,7435,10618,13541,13706,8024,13583,13177,8794,13006,10607,13669,8800,7725,8577,10773,13675,2766,6311,13700,4461,3382,13819,12158,13198,2623,12688,13454,2718,13475,9680,13477,9682,12142,7496,13769,13149,8164,8569,8038,13927,8573,13929,8803,13931,13505,13537,8611,8384,8013,13416,13828,8016,7291,10827,2521,13063,11259,11302,13579,11262,13581,11265,2475,8721,13611,2934,2246,3527,13679,13936,13915,2560,7528,8592,13691,
5343,13836,13910,3484,13721,11732,3509,8331,13259,6092,13852,13961,13612,4196,13768,14003,3104,1280,13372,3543,7763,14002,13199,2507,5819,13984,13726,2749,13938,13650,8375,3513,13184,13533,13346,3213,13807,10454,10229,9614,12165,12770,12430,12993,13029,13074,10216,11773,577,7649,10276,10333,7398,13412,7009,13015,8675,7009,11541,4800,12039,14048,3551,9821,11830,5282,9665,10091,9452,12699,1500,7572,9724,5453,5400,13076,11682,10540,98,661,7691,9002,10558,1854,6962,13108,10673,5665,11798,14041,8438,2771,
9815,98,8284,13254,2830,4579,13571,13237,13901,14084,13942,12684,1164,6624,13568,7483,1890,115,7756,7683,8851,14100,7697,13538,13918,13542,13921,10301,12755,14102,13812,8104,14018,2829,14100,13953,13667,13926,7721,6054,13957,8171,13673,7681,678,1672,13551,13320,14084,8534,6330,6124,14105,8254,13232,4520,14118,13426,13368,13913,10304,12755,13824,4373,8614,13966,8846,13968,7641,14088,14106,8122,14104,12755,13357,9951,5467,5083,5590,13362,2002,12149,12755,14133,13012,13692,988,14132,13756,3455,7346,
9165,6148,4674,14165,14101,14137,13689,4512,13991,5936,14100,8396,12253,7607,11054,14088,13864,13457,13867,13124,8829,13870,8831,7944,13874,13517,13132,13519,13878,13135,13880,12102,14171,13143,8753,13145,8658,14178,12680,4314,14174,8632,3377,1020,14093,7958,13964,14148,8386,13417,14151,14111,4869,12667,9916,13144,12827,14211,13186,14084,14119,13925,8363,13956,7673,8262,8575,7679,8174,14127,446,14100,13595,14140,8810,8E3,14143,10309,12755,8311,13813,6309,14136,8315,14228,10895,7345,956,12509,9893,
14177,14233,1890,7805,13213,14139,14253,13212,8535,4561,1336,14219,7498,13121,13509,7938,13868,13125,8043,13871,13128,13873,13130,14200,13876,14202,5985,8690,8791,14178,3145,9834,14112,8254,13924,8362,12140,7671,8798,14123,14239,8801,14242,12341,3625,14129,4476,13241,7893,14153,2566,14146,7923,14222,7702,14224,8388,6958,2065,11731,14099,14145,14107,7839,7439,14205,14309,10034,12969,2786,14084,14071,108,558,12924,14117,14297,14258,3078,14010,14218,14267,14141,13752,13428,13986,1250,14234,13154,14250,
13794,14184,14271,8531,13254,1467,14352,14114,14013,14314,94,14342,13589,6294,14210,8755,8589,14245,12755,13486,10280,14257,2643,14191,5971,2668,14281,14195,14283,14197,13129,7510,8835,7513,14292,13543,290,14310,2130,13935,5949,14364,8324,13335,8874,14251,5315,14360,1890,8198,14328,7981,14293,14340,775,13387,8038,11820,5423,5263,5587,1708,14069,14336,14338,9216,14082,9494,10584,13076,14079,5667,461,3550,110,118,327,1673,10231,5076,12783,9483,686,14429,2008,10436,4445,14428,327,3826,6333,10679,4342,
1692,10055,4290,1706,11233,11930,1705,1697,12264,411,1711,7085,1605,3670,9631,3579,12046,409,12052,12266,9240,3567,12032,3552,4360,3567,7394,13076,12024,461,6548,10505,13020,10498,10275,14082,5496,9358,12239,5543,5268,9354,9359,6265,9349,14488,10720,555,14484,4101,14495,2770,122,14497,4224,121,14500,9870,10345,14478,10553,12163,5507,12952,12982,12836,12923,14419,9414,13048,14510,13050,12973,13052,9071,12645,1564,9633,13732,3389,11676,14188,11657,10406,10428,6587,8541,13888,14067,11414,7003,837,8429,
7615,10434,11688,5307,11041,960,6202,5233,1617,10239,8445,5438,4605,1410,6202,5279,9172,5549,5323,7191,5271,11008,12065,12856,5267,65,552,450,8980,12088,12788,13406,1700,429,12298,9752,1697,14451,6878,14453,459,10089,9639,4700,9452,383,10982,7192,6202,5144,11667,4530,10242,1645,11226,12195,13266,12406,6470,14554,5939,14590,14597,5259,5128,11166,5177,3795,4290,4003,5138,10240,3093,5546,10095,10249,10771,3771,7134,12798,12417,2814,10440,7177,6470,5197,840,5199,10237,5201,5203,5236,5264,4603,14616,14545,
454,13489,12663,12089,13586,5221,6470,7027,292,14547,4706,14549,14632,5238,14598,454,14645,7153,5204,12681,9624,5439,3561,14588,13383,8894,12385,1115,14586,5171,5173,14626,5176,14652,8442,5182,8444,14648,3797,14634,629,8554,5949,14664,2632,14643,5245,3393,5247,14615,14657,1410,10252,10257,4777,14675,5324,12299,8909,14544,5383,14693,8747,4342,836,10256,6550,8935,3535,1799,836,10261,8450,14703,3780,14679,5209,8736,5212,5179,5214,9076,5267,14559,6731,14619,7105,11878,12430,11470,5103,12457,10521,726,
5110,5104,14077,10368,10265,4356,11167,10268,7064,12E3,13035,320,6450,9868,6445,2059,14613,8487,12017,11566,4862,7700,2954,9736,9301,7372,411,6788,9255,12276,4213,12992,6755,10303,8115,6755,13095,13549,12354,5885,5492,11698,13117,1115,11701,5900,12343,4368,12151,6320,11897,10269,11738,12983,10495,12125,14780,14460,335,9498,12769,14073,12771,11753,9505,11755,13075,773,6998,14037,10527,7E3,11377,14799,11379,12445,10190,12775,12456,10363,10175,12774,13025,12467,12651,13030,10565,10207,14803,11978,11721,
10211,11770,7302,14732,12781,12129,11729,118,14776,5595,9998,1410,12273,12922,11021,11686,6722,522,9559,12062,12928,12793,12640,5338,11693,1410,13099,8909,10403,11677,10426,14530,7049,11709,5168,12290,10018,4717,7332,12294,4850,11566,13273,12882,12415,9117,12855,13007,6796,14829,14313,12387,14422,9597,14278,9599,12390,960,12893,5179,9606,14571,14622,4530,14774,14777,12326,10441,9169,352,13005,10157,12861,14620,4284,12357,10090,9640,14584,446,10639,5062,14893,14722,12021,795,10935,13047,10673,12043,
12519,14905,14907,11923,3679,11137,13012,11195,13975,11304,13977,11307,7178,405,10823,8894,14639,13644,12595,3960,11098,13973,14921,12602,12590,11221,9028,11843,14056,5315,12470,11229,5348,11232,9275,348,11236,9061,14308,11095,2972,12487,12599,13578,12580,13580,12603,13582,383,4102,11345,14868,10730,14931,11074,12532,12601,10873,14933,11200,849,11856,5613,12377,9299,10969,10088,10048,12321,1088,1482,5221,11350,11022,12060,328,1482,9498,1027,12663,14881,14640,12595,10868,11411,11284,14955,13976,14957,
13978,10819,7327,11113,4883,808,262,88,82,5953,11358,10780,14489,1015,4650,3734,12611,10781,14723,9001,12448,6960,12617,14812,3608,11371,11373,12447,11371,11391,11412,10673,12621,12481,14740,11880,5035,1438,11484,13039,11459,12471,1863,11545,3930,11519,11529,11825,296,14725,2262,11538,10490,11973,1734,1862,15007,5640,8489,421,14739,10222,320,12439,9811,12442,273,11586,11625,11627,9119,11629,2214,3405,1529,11538,11726,6203,431,8489,11776,14618,14561,12862,14571,9114,67,6647,14721,10477,11911,12175,
12167,12190,14760,11809,14168,12995,13046,1391,12079,890,10954,4101,1429,4956,13716,3545,1294,15076,14781,6982,3643,83,645,112,11150,9991,12015,2239,10974,11396,11503,12080,9638,9470,14064,1807,15109,14787,10323,8938,10399,5454,9433,14849,14528,11678,10586,10301,103,12949,5264,3108,834,3761,6371,10623,2800,15144,7603,1847,2969,14455,13077,10458,335,7031,10400,14524,1671,11194,11301,834,11388,10928,44,15145,15151,44,4716,259,673,44,10198,1110,115,103,111,15166,15150,739,3252,15167,15181,50,694,4112,
629,260,12996,3306,15163,7635,15165,15183,490,15170,100,15172,15174,921,15177,15179,15146,757,15182,15180,15205,15185,4851,15188,355,7360,12925,9686,14850,10585,14531,8185,1272,9153,13539,13198,6640,2351,14883,8065,355,563,4716,453,8521,10413,15012,11877,14786,15155,288,15086,1847,729,12127,14790,14434,9319,10345,15242,12129,8767,68,82,14032,14542,3679,1110,5157,4451,10185,14939,7893,1637,8920,2483,345,11832,10464,9037,7405,76,15264,645,6500,10185,10722,7408,8919,9038,15263,15256,15266,14504,7107,
9237,7255,13043,5558,12104,15253,7583,10345,12916,7377,8779,14521,10346,10934,10348,9207,10330,11928,10332,1797,12392,15088,11227,15302,2632,8988,15151,6505,9150,11875,14894,5193,12847,12886,3056,14991,14928,15001,5171,15308,625,13003,11407,11383,280,11928,15312,14722,15236,7617,12574,9408,9433,1419,14676,6230,14660,8069,2353,6201,15338,13610,8337,8368,7817,4080,8118,8343,8213,110,14659,15344,8559,9398,15337,6122,15339,13402,6225,13254,10581,15361,14006,14014,6200,15348,9935,15076,2808,14426,967,
14080,15059,11416,715,2521,9611,111,15014,11420,11624,15044,11588,2239,10570,13112,11530,2900,7068,935,15051,9980,2095,11419,11544,11464,15384,11626,11589,11630,410,15401,11430,11472,9985,10571,13113,6387,9937,14637,2839,9953,2638,2640,2846,9981,4634,13883,12423,7709,12587,9951,14100,496,8459,7713,7321,4634,15417,9929,5718,840,323,13859,15107,6244,15391,402,11382,745,11384,15303,13861,9964,291,13848,2233,13882,13400,9940,13785,9943,4396,13548,5949,13681,5708,13599,13946,13601,13948,13479,13628,4285,
8204,14409,13122,13458,9716,13460,13881,13786,9966,15451,9968,689,9970,14802,8038,13711,2018,9975,843,9978,6035,15439,8992,10060,15387,7925,4839,3561,3594,1419,13012,3348,110,12231,14429,6500,10988,648,397,9761,1862,15491,7117,12614,10155,14794,9514,1699,304,10212,3699,7366,10394,4716,15029,12447,15063,12472,11885,9513,10567,11885,7277,13073,12775,15514,9541,69,15517,7831,10097,15026,13070,731,9281,13061,3962,13972,14815,12888,616,15515,7300,15535,474,4824,13068,14817,15531,5264,15548,6798,15550,
10203,14806,15023,14867,12115,15533,15559,15366,12476,15562,15546,15564,15516,10322,10364,15513,15556,15565,15573,3830,2549,14807,7298,10212,11771,12779,15532,15572,1480,15128,10371,15244,888,10097,13791,6212,6280,2375,14025,4520,10097,14254,14115,6002,13851,13833,15518,2120,4716,6173,9440,4309,10956,578,13784,5881,2099,1754,14527,1015,4585,11672,9381,10393,15607,112,14316,4952,13965,14223,13967,14321,8848,10097,14377,7733,14280,14194,7737,14382,8415,4981,8833,5981,13518,8836,14203,13521,14330,9084,
13382,15354,6064,10097,14055,14052,6077,3405,14847,4461,5587,14766,9941,8248,12095,15612,13558,15359,9178,8275,15365,15623,7368,14186,13012,8598,1809,13247,4026,13286,6302,13528,13745,5265,13695,13632,494,7902,14013,6930,12874,2239,12876,15671,4716,14403,8715,14329,14406,9460,14875,8216,4767,13470,10101,15381,14842,6488,931,13342,15595,7763,14017,15603,3316,13194,15686,13797,15605,5779,15610,12199,8217,4901,15536,15519,12128,4476,5944,3982,6126,15713,8193,13257,2904,15718,7E3,8705,13892,3292,14172,
6927,8632,8354,15606,7368,7999,8113,14399,14871,15725,13945,10589,1701,10609,7494,13604,9564,8082,15715,15596,2003,15735,1623,14872,14534,1159,15760,13595,10097,13646,8664,1787,761,6960,13069,14863,15540,9142,260,262,1889,121,7710,14842,290,14311,13685,15599,15725,8028,13262,7168,13995,14354,14183,1362,15693,112,7971,14398,14355,15796,10097,8220,13222,14349,15662,2735,13821,5925,13565,5873,8373,6178,14596,7960,8404,9066,15106,5953,15797,14094,14655,9888,13348,15809,6081,15803,13678,14116,5779,13763,
15738,14096,4476,5815,15652,10628,13469,8218,383,15226,15816,15722,7792,15763,15725,14213,13202,14174,834,10381,791,11094,2082,7898,5166,15815,14876,15326,14878,12092,15776,12441,13751,3339,15806,12386,15847,6277,5919,10389,2839,9164,7322,9593,15869,15832,14091,446,15600,14103,14359,15829,15731,5908,15712,5791,605,15690,996,15692,15828,15865,4430,15748,14694,15633,2095,544,15557,5953,1637,15448,15739,14208,13503,8076,15716,15732,8857,15769,13408,7483,15893,13341,13803,6309,10097,7898,12660,15652,
15789,13547,15826,6124,15593,13684,6102,15710,13235,15759,7763,15911,15725,14268,14273,3780,1637,15614,4627,6075,15700,8909,2612,13414,7778,4017,6498,11815,4357,12216,10652,9633,14885,5315,15261,15277,10887,15222,9900,14778,7251,14909,15952,7227,11804,7086,15117,7133,14603,11785,14569,14562,14868,1691,14574,11857,14576,10292,14578,1706,4698,4123,7083,9093,1655,15762,1116,4329,3548,11655,15136,14851,11679,5108,311,11320,7557,12938,11227,632,6706,100,1973,798,10341,12787,15974,13198,686,12193,6484,
2175,15133,7187,5541,12309,4611,12903,10390,9145,13056,9936,2854,14719,15972,16008,15083,14992,948,7013,4736,7359,576,629,1419,115,2221,1516,3755,12663,12945,15846,15624,12388,15638,6715,7116,9294,12373,7141,1363,10082,935,14945,10085,9059,14976,10083,9278,10971,12033,15099,10460,12036,3710,4956,613,9344,11382,9170,14614,5996,539,13643,5277,3611,1516,16072,7211,10337,12850,10884,4467,14879,16028,15313,3386,11160,4209,12852,825,608,5223,12724,16082,4699,15985,414,7405,14013,15676,13589,1398,15850,
963,15852,1188,5991,6588,15602,9155,5387,14429,837,16011,12388,7597,9614,16076,7138,311,339,359,9832,1847,643,16014,802,16081,6265,11832,14045,11435,16052,11836,11233,9743,10297,539,895,7603,1678,15141,14231,1033,14432,5591,4056,103,14669,14647,15823,5329,4618,15081,14903,12939,686,11807,5552,10060,1713,11806,9722,1829,6233,16111,5862,12204,5315,7178,15890,1015,1713,9821,12876,1588,14744,1313,13381,4526,16073,11124,15616,1683,15992,15619,7608,15621,10166,4102,12256,15099,12258,14937,9035,15655,9735,
16111,14555,1631,14662,1236,1637,78,455,3830,13858,1715,115,15412,16131,3535,119,575,1900,85,9281,4614,11517,15399,8517,10328,15298,10350,6613,12826,12806,746,10327,9147,4057,9208,3621,3790,16098,4701,7084,9194,14556,9184,14428,2700,629,9344,16188,569,15620,9394,9527,16111,10375,16106,4843,14901,16109,12179,3762,10936,7615,12766,684,4395,16145,16230,16147,13055,6650,6857,11969,15084,11873,10474,9616,16088,10151,9502,13065,15585,15576,3962,1713,15534,15573,13067,12526,15554,15569,12417,15557,16284,
15535,9415,14523,13034,15061,256,16216,690,100,4730,1883,12168,9961,292,11604,12018,376,1064,7249,114,51,11623,15043,11466,2239,16311,8904,16314,15071,11111,13286,11632,569,669,728,120,52,3060,15047,7404,16328,87,16217,15392,11596,10149,11642,11237,6993,16300,1900,6355,16304,12182,16306,14748,11606,16319,575,16321,5061,16316,15045,996,16351,16313,16331,11441,15049,832,16325,15547,551,837,16329,16360,11525,9722,16367,16335,16301,11472,11599,5285,4300,259,551,9359,16307,11605,15741,10384,287,14752,
454,12380,16053,12631,12013,540,11039,11914,16382,16309,296,1721,11569,11571,3035,3189,11574,16402,3440,15105,10067,101,271,571,12708,125,124,470,5636,3666,16355,15385,16357,318,16352,16369,11551,11602,16364,6927,3620,16386,3364,14753,9279,16322,4862,14460,11596,6450,6548,12242,16111,11603,16383,8613,3440,16387,413,16432,16354,15398,16317,16420,16312,16353,15389,376,16362,12709,16338,14817,16396,14749,906,1713,15557,15441,328,2541,16429,435,16388,5892,401,16418,15400,15046,11441,11631,11528,11549,
16454,15405,15393,7715,1505,6650,16466,3774,16460,11606,906,571,16468,608,16470,16315,16449,16356,15013,16421,16359,16433,16456,49,15403,16318,16499,16453,16332,5316,3842,50,16375,16392,16327,16372,16336,16441,16397,7776,1302,16514,105,16329,16492,16431,16471,15067,15399,15069,3455,16428,32,16445,9301,16433,13104,15075,3589,15391,16148,13105,16509,14726,15030,14733,5119,10267,7086,10675,15409,3679,16456,16026,14638,14570,16030,6614,5158,16336,1883,14743,648,16183,8675,16133,11834,6802,16137,9742,
11839,16140,10300,2494,15998,260,15316,10475,16029,15319,9896,16003,16005,3830,16E3,10118,9652,13954,4561,14746,6768,16204,7189,5445,14697,13175,11692,16214,14764,14768,16597,14400,11780,10764,11858,10080,11234,14975,12379,9300,16389,15479,4928,14683,5253,16043,16542,5331,16594,4456,5323,14701,5341,7132,3842,14707,5334,10337,5546,16553,16584,12095,10991,5345,5347,9083,5362,5352,16605,5355,5357,5359,5361,5363,32,5351,5366,5370,5350,5367,5362,10971,7610,15058,13861,16115,369,9765,16249,10603,16143,
318,16266,12909,1285,16148,12350,14617,15971,16554,16009,15084,11959,16162,12346,16164,16672,5562,10757,552,6539,16560,6344,16158,11227,16611,4193,8677,16171,14313,14691,14688,16626,6064,14691,16625,16622,15871,14938,16199,5816,16201,14600,10262,4520,14691,16621,5386,12725,11868,13861,15903,16559,557,16522,16562,16589,9037,16260,1566,16262,10092,11554,709,16120,15663,12856,9780,8893,15329,15089,383,71,495,10888,12948,308,12695,16038,16720,14060,14914,5028,12717,16100,120,12754,12803,1910,5387,670,
105,11049,12388,12736,12712,10259,5223,1914,5387,10298,1534,11604,11309,3535,16754,12738,9047,16113,12725,12727,6539,16744,12747,3056,2681,16615,4534,16762,13632,866,3074,10928,12719,12721,16095,16776,16770,12729,16182,7219,5179,2677,12881,10548,12694,15151,16738,15131,16721,34,13103,955,1009,15374,16741,1514,13380,431,15904,13274,9929,13399,2465,15452,1115,13456,4971,10591,13390,9717,15473,15454,15433,14889,15436,12929,15488,5860,13005,12892,15862,11227,15446,9930,15667,13242,355,13468,7700,6929,
9937,15420,13267,9933,7898,15458,5582,15460,15752,451,13602,8605,2316,13306,16839,15703,13544,13699,15943,13697,109,13783,15858,13370,15411,9978,15413,13493,9954,13495,16810,15454,13787,15476,12382,15478,13709,10905,9973,15483,13713,9976,16407,2632,3076,13793,15795,594,555,1847,5169,15489,12346,15508,6035,1058,1410,15495,10641,4998,15499,100,15501,7017,32,306,15505,15153,15508,461,15057,14802,15060,9018,6998,6975,15382,16473,16529,376,14424,386,16501,3585,16426,10138,16433,5587,15074,11449,15076,
16911,545,14827,500,2140,6868,265,10232,1391,12876,666,1847,10375,15742,13206,8203,1847,6765,16174,569,16941,16935,7898,16942,9365,1949,9917,16146,5930,9588,16943,9883,14120,8363,9886,6259,15055,15251,686,14072,15591,3775,12662,16184,3535,7575,16688,8909,13857,742,16909,6741,14744,16563,7187,8896,48,16591,1796,16157,14926,16555,16579,11308,5952,15304,10118,12202,16618,1115,15085,15087,15082,16277,14535,11998,3671,14540,3670,12647,9678,14798,15581,12441,14802,17014,12431,15530,16290,13071,328,15544,
14818,9795,12649,12447,12468,13064,15775,17024,7269,15589,10531,13079,16702,5163,6642,605,15322,1674,4956,15328,15973,16578,2814,6797,1555,1379,3843,16974,16997,12095,15315,12897,12399,10118,16108,294,4060,10643,14892,16992,16670,16556,11380,10387,14840,8915,14880,15563,14571,15315,17056,17053,16938,14433,15891,17076,8495,2082,16950,616,12876,17054,12315,10043,16576,12705,15570,17072,12896,11213,12899,12901,4287,12929,2095,512,14560,14866,17090,17065,6797,17040,15324,15441,9613,17043,16087,10245,
15797,16118,2566,16086,12887,17005,7793,8986,16630,12856,12470,17115,15317,17071,14992,1862,11682,9433,12997,15234,616,14439,2529,12740,2216,260,294,105,2861,6497,14461,393,381,16541,13024,11888,13031,7107,9663,14081,10655,8491,3570,10973,3567,11714,11400,16272,17065,9655,14230,16267,6716,7225,394,109,12217,11737,7108,14735,16540,9433,16275,6543,9076,8558,16978,4461,7214,16600,8223,679,7605,9495,12764,7112,9323,10346,12163,3578,111,11486,16805,561,16018,16764,11927,10055,10682,14578,10687,11932,6883,
10705,11935,11940,6889,11938,10694,17207,6828,11949,6842,11948,11952,10701,11934,10703,6901,11951,11950,6854,6852,11951,6820,9168,14044,14158,2274,14472,11913,15122,1623,9867,15118,996,17191,11919,11503,3691,17231,10975,12048,3338,16801,17172,17194,5536,17036,4705,16989,4711,3895,6729,629,16747,16615,14592,9160,5146,15318,2814,820,512,16152,4292,14611,6025,3405,6202,14606,17069,6400,5153,14631,16154,5109,5995,4621,6553,10264,16546,14736,16548,15129,34,9137,6371,323,7116,9633,1613,6802,17275,17268,
13893,10334,6155,14601,15963,10368,17291,7577,121,1822,14506,9633,11317,112,16170,17070,17102,16994,12407,17E3,16205,431,15940,6429,15552,16288,806,14942,9083,10923,11233,10923,8804,10318,7086,14473,9210,9473,7039,9433,14525,13323,15618,16658,9402,16251,9381,7675,2640,5929,9255,972,15114,11150,14833,9129,17349,378,15153,14068,335,12597,9666,9502,11406,17107,11384,11983,10564,7291,8986,9604,17017,16103,1311,17030,17017,17361,16829,12315,14995,15539,8968,2854,11882,15545,12780,7107,16909,11729,14896,
14312,13229,16716,11797,1683,12927,8300,834,15874,15213,14581,15125,14059,9623,9028,1512,109,16838,6928,16856,9517,2035,16854,17406,15840,15123,694,17319,2536,1683,16809,2022,1683,15728,13346,9692,16763,13491,12332,13622,11954,17427,6463,12337,13623,9707,12340,6826,17403,14415,335,9069,12698,17248,16299,101,98,109,17339,7771,17341,10615,9381,11653,721,10583,13888,16191,15024,112,52,17446,10077,17448,11658,12438,327,9417,14594,12095,15224,2770,15842,13087,3899,17459,8528,16190,17342,10166,5389,741,
10060,17439,5066,10400,895,11665,12853,16242,15281,6692,17356,9362,5666,15243,17035,8652,8906,9311,10337,3727,12879,5146,9263,16615,1575,17500,9195,9269,9076,17293,16052,17295,14550,1523,16051,10764,9287,11233,10968,16061,9280,14044,9296,9286,9058,17517,14975,17519,11117,3344,14972,7936,17518,10966,9168,9303,17299,8932,14709,14400,8928,17088,6395,9306,10263,15964,12973,17008,10319,11641,16972,1637,14763,15956,7405,15658,13013,7405,15661,2302,5607,9225,9215,16261,17548,9224,12858,17562,1328,12990,
16007,4705,16229,16663,16231,16065,17565,17569,895,5157,10311,6309,3724,1883,7605,15960,4461,16999,2351,1637,10314,6477,4224,14960,16831,16729,16684,12155,11700,12422,7172,9281,369,2059,17566,15280,996,14506,17561,9227,12372,12663,16390,1577,17525,16057,9060,4821,16609,9113,6945,16207,291,258,12245,10487,17064,16994,5157,17555,2071,5157,17558,12995,431,17552,7893,3818,17123,16577,17117,1623,14691,15274,12384,9197,431,17590,16887,1636,431,9841,10501,7405,17580,9636,17601,11833,17597,6768,55,17538,
12300,17624,9172,12311,5315,9114,17621,8395,291,6390,3552,15280,17178,16595,3561,17643,14661,6423,17656,579,17316,1886,17680,16695,16707,11797,17680,16691,16696,3535,10879,4545,17638,17089,17640,14043,12193,17651,17181,13096,17051,17655,17228,9869,17674,17630,15533,17594,17312,17696,1637,17699,2770,1703,17663,3925,8896,17252,461,15096,1236,10634,3535,17180,2406,15018,6377,3842,7121,17378,17066,15325,15442,9602,17364,12455,335,17374,14877,629,11410,14727,11725,15331,11899,10532,11901,3740,12014,11602,
15397,16222,16450,1015,2544,16501,11552,12006,9218,14964,12630,12007,4300,10828,1519,11914,16472,16496,16419,17755,16423,16455,17758,1862,5861,12049,8777,7588,14908,10368,12106,17547,17331,11740,14508,17011,320,9732,14795,14728,11886,16544,13032,17007,11729,121,17677,4530,120,17798,4895,4434,17801,7536,3808,7008,2002,10029,6265,3808,1883,17809,17724,17804,9731,2958,17815,12300,260,1883,8703,17751,16016,9076,16586,16964,4461,10680,11928,17200,17715,11931,17216,11933,11947,6462,17213,10696,9976,11939,
10691,11941,10702,6913,11945,17844,6886,11955,17845,6909,17223,6911,17225,6915,4055,17806,9128,4881,5496,17818,17701,12240,4210,17540,5637,15130,9205,14463,12025,10332,12028,16719,8938,4158,12904,17606,8465,12044,9249,17869,12267,3568,13293,407,9231,17441,10532,14523,14980,6736,17528,15259,9900,9247,17890,6558,17879,14909,17881,9987,15291,1742,12608,15288,11484,6692,17902,7258,12612,335,13019,7238,17823,17905,715,643,9858,745,9860,99,9833,17598,13939,13429,14870,15961,14887,17488,5117,17490,7618,
9185,16006,17247,14791,12430,12407,17381,17031,15024,1675,17939,14807,1778,14734,4418,17284,14459,15590,10332,322,97,3436,7699,8385,9979,5388,2119,16202,5540,17825,12662,3396,7931,12407,2155,7898,17259,17120,14868,17952,17960,17175,6922,1839,2221,14013,17952,2155,15848,8085,5322,1839,17266,6402,14673,3957,17979,13916,8806,12675,12388,401,12193,6548,17980,15740,7888,550,10777,9075,12716,11799,108,17996,17959,15456,2071,5161,17250,17487,16019,1839,5269,4924,1524,17602,18006,13452,8807,14873,12409,9281,
12803,17747,837,4404,6806,6986,18027,11043,1477,7005,8718,4464,4397,8851,10409,16603,729,6616,16605,8435,85,2586,9038,4715,10340,7326,14486,3343,18021,15765,11111,15002,558,18004,18019,16971,12894,16159,1058,17967,18008,1115,8595,15626,4528,7148,15627,14318,8845,7524,15631,7641,18066,13886,14187,16189,11054,17989,13452,8703,17976,15987,13640,2071,17966,2119,17981,13499,1196,4464,14013,17994,18018,17963,17990,4881,17315,17700,12741,18098,14628,5234,17267,17512,14532,1592,12680,14608,8443,14672,17277,
7178,18058,9961,18060,11783,1058,17985,7154,17987,17253,15002,4060,8239,16683,16998,18017,7399,18097,13452,8842,7700,7522,400,4464,16662,14333,16664,17933,1603,17009,1678,9592,16259,17424,13540,15493,11042,32,1568,5630,12568,7689,14651,18104,14548,18106,18123,14982,17863,17954,13808,8843,18136,6587,15343,10287,17037,9312,12048,12977,14783,5299,15293,16541,15523,17940,10171,17016,17020,17033,17746,17494,14269,17300,16172,17702,17422,9154,16590,5549,14831,16673,14368,6716,11750,14759,16677,12632,14844,
3004,16599,9636,12097,1685,15126,15294,12420,14501,17599,7488,10605,15468,13491,16851,8870,1189,15962,5315,16816,15635,16818,13459,6622,16024,9093,13729,17425,6676,9698,12333,5620,13621,6679,12338,6686,9705,18238,13627,5471,13674,4955,17926,13549,5636,10723,12517,15098,17915,7262,15276,345,12585,17922,2770,17344,10761,7071,12050,1823,5991,12563,1379,102,15014,8770,12333,7898,17470,13350,17688,10792,18257,13214,18207,9446,18209,498,16863,8909,17140,1900,79,18267,3733,5558,1112,16985,9735,18265,18286,
18268,7377,12333,5794,9645,1754,9648,13012,5277,18293,18287,4651,5558,11244,2874,10074,17423,13918,13616,2871,9699,18235,1721,18237,17432,9108,13625,18241,9708,7270,7405,15262,18256,9862,10390,2071,18284,18266,18295,1742,18308,605,6271,16295,1569,17142,380,345,17465,17441,18338,97,10661,9719,12232,12228,6577,17787,10511,1139,12655,17745,9491,14082,18100,15729,11291,9240,12516,12934,10041,16083,12852,17074,12856,17073,17466,12856,15955,7893,1809,11853,17713,9135,12987,6468,10552,10917,15118,10332,
949,7025,9859,3614,18276,17929,5294,17912,11920,1502,17165,381,14913,18252,256,14916,10845,14935,12581,14999,12537,9541,14050,16849,8207,4770,1939,457,2521,11212,16207,642,18401,14967,10751,14969,11289,11082,11179,9555,14964,14953,13974,14997,14920,18404,11279,12605,12610,17904,16318,12606,9336,15880,7333,18407,3246,18410,3806,9946,11212,10828,15838,11301,18420,11132,18449,10877,17593,15444,15863,14950,5922,13039,18426,18451,11156,14919,18431,14971,17514,15481,10966,9757,9759,10970,16259,3962,18407,
17813,9178,5772,11555,18417,18462,14968,18430,14970,289,18395,345,14471,392,18341,382,11201,5839,11908,831,13985,14750,13203,12600,18479,18419,18481,18421,372,10021,18473,17196,17301,11972,12435,13107,17731,15025,17013,17020,9804,1564,15521,13070,18184,11999,15376,1608,11488,6994,10537,5034,16391,595,7475,12009,18477,9218,18492,7299,12644,377,7236,17549,18384,18311,2857,2968,13618,18318,17428,18543,17430,18240,18319,18323,18518,9418,15953,11652,16602,14449,12375,11859,18467,11861,18469,14977,11332,
18552,1391,9411,12766,17451,15014,15011,10050,18433,17910,288,12424,17052,15235,9786,12771,15053,17731,11368,14076,17731,17146,10671,12619,7107,15032,17747,12623,18521,13037,18523,12639,12008,11648,5478,12301,9798,17079,11742,10264,18600,14912,14457,17935,10152,15019,18584,17365,7641,10184,15022,17147,12478,12781,18605,18144,17034,11809,9006,6715,9031,17957,7312,16198,11976,10496,9039,18575,14868,14896,14582,12766,15976,15311,10288,15979,16605,14452,15982,537,12285,3429,10013,16767,6077,10073,13170,
16602,8038,12378,9760,17618,10064,14979,10778,10398,16799,12297,18636,14689,14710,18505,17666,16274,17970,13198,18574,17004,10245,12401,4061,12403,10123,18249,9872,18380,11745,14470,9433,9114,16166,99,9818,17677,17280,9076,512,4078,17569,742,17912,17608,1807,15540,17228,17236,1015,18392,17233,17697,17602,18694,3545,18693,17604,18695,3836,5126,729,18389,18188,7893,7178,10274,6715,12131,9817,12988,9820,11112,10274,17619,2035,885,99,12585,18686,16614,5541,11112,5346,501,17646,18698,569,17912,18382,16425,
12091,643,3822,729,6764,2348,18667,14571,10471,10957,18685,17865,7401,12749,4530,17309,262,18697,4537,9769,10882,14568,17110,12939,328,17569,13018,18720,17576,9226,7023,12179,686,10957,18728,18752,18193,9076,338,689,18712,16703,6128,366,17583,5607,5502,17794,11898,8495,1567,327,17934,18618,268,3822,15954,1429,17723,3780,17725,9135,18356,11683,3651,12189,11327,15094,14042,18373,18283,575,709,1604,16574,18661,17625,17045,6475,18221,7893,17721,1362,18799,15956,16718,16064,17874,12627,18787,18587,14536,
14788,16570,80,11465,3801,17575,18680,17887,17309,17311,17261,17125,17627,7405,1395,18282,15659,17098,604,629,1516,354,10763,18118,16585,17321,7416,17323,18855,7420,11041,9086,16605,18863,14949,12636,15901,18630,11970,17330,649,17332,14456,12519,5519,86,2727,10596,339,4282,16550,5008,4463,3069,6670,18291,15611,538,15189,1419,87,1571,587,114,807,6174,14147,15702,17412,15763,7333,1516,4956,11778,12095,965,323,16587,13491,684,279,745,982,3071,823,9153,277,11212,16219,9038,18465,13202,12579,12593,14956,
18402,14958,7276,18629,13861,554,3808,1654,99,18893,643,577,18896,17421,18070,18900,15723,11332,18890,355,18892,18894,18939,107,17388,16519,4953,17407,12208,100,65,14429,1847,17100,16684,11038,14861,14961,13198,16090,12851,4303,18958,2058,18961,10826,2993,77,18931,14965,18497,18428,14934,18418,4761,9762,3591,3593,496,15496,4173,3590,3592,282,16898,7355,287,18989,18985,3595,9593,7333,18965,14571,3818,11166,6391,18970,18960,14720,16710,12646,12346,10894,9478,11736,12595,11191,414,18976,18459,18500,
18450,19019,10877,16780,8986,17694,14819,17696,17370,954,5675,19024,17709,18843,17313,2814,4106,12475,2539,1875,4849,4840,14996,18926,14998,18928,15E3,8185,11342,11072,101,19005,1591,17585,16994,311,304,15204,5953,3776,4648,17096,11835,1756,5668,16605,11047,9745,13147,14959,5942,413,17479,12346,15007,14336,6061,327,13156,8598,2639,18938,6705,18368,14868,15195,12197,112,7342,1588,432,19E3,17160,18946,18935,18937,278,18950,11085,15701,7821,18901,5388,12575,5677,837,18909,17827,1700,9290,575,3798,18915,
3370,7360,18918,17957,19036,120,982,19038,4838,14861,18478,18979,18480,19045,11307,11066,11268,625,19120,19040,16892,18977,14954,19043,18429,19126,18463,743,19093,18948,19081,18896,18747,17065,4836,19039,11039,258,1875,1809,5348,2012,12565,3812,7039,6806,19154,5569,19156,3551,14949,4102,14336,11224,18454,17063,18818,5193,3818,19051,18972,12095,11371,17061,3561,9094,7420,511,5641,16933,16605,19180,866,631,3305,6233,18963,4722,19172,19007,18455,16469,17601,17256,5929,7625,5892,1210,6395,14585,282,107,
2389,19086,19088,11062,16831,11164,9541,8988,4540,108,19025,6598,15305,4215,16194,18197,6453,19189,13714,18922,626,16632,18982,17727,3740,11993,15524,11979,16519,9139,6468,17943,14812,11768,17739,15860,3081,11719,11768,2867,14486,67,16896,4213,17944,6981,16921,19064,18589,15034,3609,4300,65,12755,15426,354,11676,16488,17460,9688,17768,17753,16497,17340,9688,16508,5374,16482,9613,14429,354,18343,15066,15383,17754,569,16399,40,41,32,61,62,1417,3952,16055,11634,2214,8973,19152,16482,18150,261,2526,14486,
16517,14749,18588,19265,11587,16474,15993,17772,2214,9740,115,8977,9475,11596,311,262,17863,18286,4826,327,5050,16349,10108,16417,17769,19304,18079,19269,11441,5689,19318,19310,14521,2225,18588,16508,19244,4677,16482,4200,5720,19314,19298,17752,19303,16919,10529,16549,16480,10101,17863,16512,19255,116,66,11050,19308,19330,19299,11606,1226,19198,16495,19266,17770,19268,8964,16508,19328,3831,19356,16537,335,3772,727,17493,11809,12660,8916,18731,19349,6663,17543,17498,8472,12309,10143,17507,17498,1524,
17505,3056,17502,10236,14607,7420,17511,18161,17513,17611,17516,16056,11862,16058,17527,18696,12193,17522,9272,17524,19400,18443,17533,1570,279,19406,5602,17532,16054,17534,7336,17536,8450,17719,1018,18776,7158,8933,17281,17545,18175,9878,111,12785,12103,18894,17602,18606,18384,1485,18377,10337,1485,342,5243,11800,18782,10304,10259,9455,6766,2157,16006,742,17133,18527,4092,14457,19145,12418,12708,858,1485,17635,14694,9827,19439,12152,19256,15233,17682,603,1485,19448,16582,3545,19453,10281,19462,8555,
10305,14256,10259,17632,2457,107,5823,17177,17044,16088,19459,1018,1485,17629,1453,19438,18830,6692,17946,7110,14737,15237,15295,17868,18876,17887,18400,19042,11264,19137,18981,11136,3959,11097,18458,13577,18427,19136,18980,18498,18982,18490,4718,11296,274,1887,15161,18496,19135,19507,19517,19124,18501,18625,11122,16699,11124,4171,17159,18495,18925,19528,19125,19509,11094,14963,19513,18924,11274,19530,19020,19138,18482,10075,4814,18558,18652,18470,14585,14983,11114,11023,5266,19523,9851,19215,5651,
10245,4106,14994,11245,19526,19515,19540,18499,19550,18501,12180,17563,15968,10774,15015,18434,16357,18436,12612,19228,7433,17335,11994,11768,15164,259,11390,15065,18180,9512,18508,18582,17382,7270,9234,15538,19598,18514,369,18516,19598,18550,16297,11902,12484,11904,6993,6450,1604,16561,14745,18192,12016,16308,14749,3726,15036,2342,670,16308,6766,111,68,16380,11655,19262,17474,11054,10338,7599,11482,18881,18529,18579,13040,9719,17138,2727,327,16232,10349,10331,11809,3831,4244,83,10339,625,15158,9262,
9197,11272,14449,10338,370,11859,19659,44,102,11107,97,15153,19645,16226,6289,125,19416,12210,11915,9292,8697,14113,6828,3001,11720,9025,17798]});
define("tdv/events/async",["require","exports","tdv/utils"],function(a,m,k){function p(){var d=e.length,f=e.splice(0,d);g+=d;for(var n=0;n<d;n++){var l=f[n];if(l)try{l()}catch(q){k.sW("Error in async task",q)}}}var h=0,g=0,e=[],b,c=new Promise(function(d){d()});setInterval(function(){e.length>0&&(new Date).getTime()-b>100&&p()},100);return{iE: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(p),b=(new Date).getTime());h++;e.push(d);return h-1},
cancel:function(d){if(d<0)clearTimeout(-1-d);else{var f=d-g;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,k,p,h){var g=function(){return function(){}}();return function(){function e(){this.bd={}}e.prototype.D9a=function(b,c,d){this.Ita(b,c,d,!0,c,!0,!1)};e.prototype.bind=function(b,c,d,f,n,l){l===void 0&&(l=!1);return this.Ita(b,c,d,f,n||c,!1,l)};e.prototype.Ita=function(b,c,d,f,n,l,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 g;r.eW=c;r.rcb=n||c;r.context=d;r.uJa=f;r.mdb=q;b=this.bd[b];l?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.eW!=c||f.context!=d}),this.bd[b].length==0&&delete this.bd[b]);return this};e.prototype.Sib=function(b){b in this.bd&&delete this.bd[b]};e.prototype.cqa=function(){this.bd={}};e.prototype.o=function(b,c){c===void 0&&(c=void 0);typeof b=="string"&&
(b=new k(b,c));b.name in this.bd&&(b.source=this,this.DB(b,!0),b.name in this.bd&&this.aXa(b));return this};e.prototype.aXa=function(b){e.d_.push({caller:this,event:b});e.oca||(e.oca=!0,p.iE(e.Vua))};e.Vua=function(){for(var b=(new Date).getTime()+1E3;e.d_.length;){var c=e.d_.shift();e.prototype.DB.call(c.caller,c.event,!1);if((new Date).getTime()>b)break}e.d_.length>0?p.iE(e.Vua,1):e.oca=!1};e.prototype.j6=function(b){return b in this.bd};e.prototype.fW=function(b){if(b in this.bd){b=this.bd[b];
for(var c=0;c<b.length;c++)if(b[c].mdb)return!0}return!1};e.prototype.gO=function(b,c){var d=[];b=this.bd[b]||[];for(var f=0;f<b.length;f++){var n=b[f];c!==void 0&&n.uJa!=c||d.push(n.rcb)}return d};e.prototype.DB=function(b,c){var d=this;b.unbindCurrentHandler=function(){l&&d.h(b.name,l.eW,l.context)};if(b.name in this.bd)for(var f=this.bd[b.name],n=0;n<f.length;n++){var l=f[n];if(l.uJa==c)try{l.eW.call(l.context,b)}catch(q){h.sW("Exception handling event "+b.name,q)}}};e.d_=[];e.oca=!1;return e}()});
define("tdv/player/view/util/URL",["require","exports"],function(){return function(){function a(){}a.Lma=function(m){if(this.Kg("crossorigin",!1))return!0;if(this.w6(m)){var k=window.location.protocol+"//"+window.location.hostname;window.location.port&&(k+=":"+window.location.port);return m.substring(0,k.length)!=k}return!1};a.FA=function(m,k){if(this.Fdb(m))m=window.location.protocol+m;else if(!this.w6(m)&&!this.GD(m)){if(k)if(m.indexOf("/")==0){var p=k.indexOf("//"),h="";p>=0&&(h=k.substr(0,p+2),
k=k.substr(p+2));p=k.indexOf("/");p>0&&(k=k.substr(0,p));m=h+k+m}else m=k+m;this.Oo.href=m;m=this.Oo.href}return m};a.pdb=function(){switch(window.location.protocol){case "http:":case "https:":return!0;default:return!1}};a.Fdb=function(m){return m.indexOf("//")===0};a.w6=function(m){if(!m)return!1;var k=m.indexOf("://");return k>=3&&k<=5?!0:m.indexOf("filesystem:")==0};a.zdb=function(m){return m&&m.indexOf("/pdfjs/")>=0};a.getDirectory=function(m){m=this.FA(m);m=m.split("?")[0];m=m.split("/");m.length>
1&&m.splice(m.length-1,1);return m.join("/")+"/"};a.tk=function(m){this.pM||(this.pM=this.Dwa());return this.pM[m]!==void 0};a.getQueryParameter=function(m){this.pM||(this.pM=this.Dwa());return this.pM[m]};a.GOa=function(m,k){var p=m.split(k);m=p[0];(p=p.slice(1).join(k))&&(p=k+p);return[m,p]};a.hD=function(m,k){if(!k)return m;var p=this.GOa(m,"#"),h=p[1];p=this.GOa(p[0],"?");var g=p[1];return g.indexOf(k)>=0?m:p[0]+(g+(g?"&":"?")+k)+h};a.parse=function(m){this.Oo.href=m;m={};m.protocol=this.Oo.protocol;
m.hostname=this.Oo.hostname;m.port=this.Oo.port;m.pathname=this.Oo.pathname;m.search=this.Oo.search;m.hash=this.Oo.hash;m.host=this.Oo.host;var k=m.pathname?m.pathname.lastIndexOf("."):-1;m.Cab=k>=0?m.pathname.substr(k).toLowerCase():"";return m};a.getExtension=function(m){m=this.parse(m).pathname;var k=m.lastIndexOf(".");return k>=0?m.substr(k,m.length):""};a.Kg=function(m,k){m=(this.getQueryParameter(m)||"").toLowerCase();return this.Teb(m,k)};a.Teb=function(m,k){switch(m){case "false":case "0":case "no":case "n":return!1;
case "true":case "1":case "yes":case "y":return!0;default:return k}};a.hIa=function(m,k){m=parseInt(this.getQueryParameter(m));return isNaN(m)?k:m};a.Q5=function(m){m=parseFloat(this.getQueryParameter(m));return isNaN(m)?void 0:m};a.Dwa=function(){for(var m={},k=window.location.hash.substring(1).split("&").concat(window.location.search.substring(1).split("&")),p=0;p<k.length;p++){var h=k[p].split("="),g=decodeURIComponent(h[0]);h=h.length>1?decodeURIComponent(h[1]):null;m[g]=h}return m};a.Oo=document.createElement("a");
a.pM=null;a.GD=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,k,p){var h={};h.fj=TDV.ob.RY;h.OA=TDV.ob.L$;h.Bsa=TDV.ob.Qra;h.Rkb=TDV.ob.P$;h.NY=TDV.ob.M$;h.kra=TDV.ob.Pra;h.Akb=TDV.ob.O$;h.N$=TDV.ob.N$;h.CP=TDV.ob.CP;h.C9=TDV.ob.C9;h.B9=TDV.ob.B9;h.A9=TDV.ob.A9;h.D9=TDV.ob.D9;h.xi=TDV.ob.xi;h.rY=TDV.ob.rY;h.Fk=TDV.ob.Fk;h.Ap=TDV.ob.Ap;h.ZJ=TDV.ob.ZJ;h.NE=TDV.ob.NE;h.qY=TDV.ob.qY;h.Iw=TDV.ob.Iw;h.x9=TDV.ob.x9;h.tY=TDV.ob.tY;h.Jw=TDV.ob.Jw;h.Kw=TDV.ob.Kw;
h.uY=TDV.ob.uY;h.y9=TDV.ob.y9;h.AP=TDV.ob.AP;h.$J=TDV.ob.$J;h.aK=TDV.ob.aK;h.BP=TDV.ob.BP;h.SA=TDV.ob.SA;h.Hqa=TDV.ob.Hqa;h.RA=TDV.ob.RA;h.cu=TDV.ob.cu;h.du=TDV.ob.du;h.sY=TDV.ob.sY;h.z9=TDV.ob.z9;h.E9=TDV.ob.E9;h.wY=TDV.ob.wY;h.FP=TDV.ob.FP;h.I9=TDV.ob.I9;h.eK=TDV.ob.eK;h.GP=TDV.ob.GP;h.xY=TDV.ob.xY;h.JP=TDV.ob.JP;h.yY=TDV.ob.yY;h.KP=TDV.ob.KP;h.HP=TDV.ob.HP;h.IP=TDV.ob.IP;h.zY=TDV.ob.zY;h.J9=TDV.ob.J9;h.vG=function(e){e="force_"+e;if(p.tk("debug")&&p.tk(e))return p.getQueryParameter(e)};h.mYa=h.vG("os");
h.Od=function(){return h.mYa||TDV.ob.Od};h.hYa=h.vG("browser");h.Rb=function(){return h.hYa||TDV.ob.Rb};h.iYa=h.vG("browser_type");h.EN=function(){return h.iYa||TDV.ob.EN};h.Jva=h.vG("browser_subtype");h.Dc=function(){return h.Jva?h.Jva:TDV.ob.Dc};h.jYa=h.vG("browser_version");h.SFa=function(){return h.jYa||TDV.ob.SFa};h.lYa=h.vG("device");h.pk=function(){return h.lYa||TDV.ob.pk};h.yb=function(){return TDV.ob.mobile};h.RXa=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}();h.wVa=h.Rb()!=h.Ap||navigator.userAgent.indexOf("; wv")<0?!1:!0;h.kYa=!!h.vG("chromewebview");h.hGa=function(){return h.kYa||h.wVa};h.$f=function(){return h.Dc()==h.Jw||h.Dc()==h.Kw||h.Dc()==h.uY||h.Dc()==h.cu||h.Dc()==h.du||h.Dc()==h.RA};h.E6=function(){return h.WI()};h.D6=function(){return h.uO()||h.KJa()||h.VJa()||h.PJa()};h.Mma=function(){return h.Dc()==h.cu};h.ika=void 0;h.$jb=function(){if(h.ika===void 0){var e=void 0;
h.HD()&&(window.location.hash.split("&").forEach(function(b){b.split("=")[0]=="app-version"&&(e=b.split("=")[1])}),e&&(e=parseInt(e)));e=e||0;h.ika=e}return h.ika};h.HD=function(){return h.qW()||h.Mma()};h.qW=function(){return h.Dc()==h.du};h.Cdb=function(){return h.pk()==h.xY};h.tdb=function(){return h.pk()==h.yY};h.KJa=function(){return h.pk()==h.KP};h.Adb=function(){return h.pk()==h.HP};h.Bdb=function(){return h.pk()==h.IP};h.OJa=function(){return h.pk()==h.JP};h.PJa=function(){return!!(window.location.hash&&
window.location.hash.indexOf("device=picoxr")>=0)};h.VJa=function(){return h.pk()==h.zY};h.WI=function(){return h.pk()==h.GP};h.uO=function(){return h.pk()==h.eK};h.wH=void 0;h.ffb=function(){h.wH===void 0&&(h.wH=parseInt(p.getQueryParameter("sts")),isNaN(h.wH)&&(h.$f()&&!h.RXa?h.wH=512:h.yb()&&h.Od()==h.fj?h.wH=512:h.wH=h.yb()?256:1024));return h.wH};h.F3a=function(){if(h.Rb()==h.Fk||h.Rb()==h.xi)try{var e=/Version\/([0-9]+\.[0-9]+)/i.exec(navigator.userAgent);if(e)return parseFloat(e[1])}catch(b){}}();
h.Foa=function(){return h.F3a};h.p_a=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=h.Foa());return e}();h.yma=function(){return h.p_a};h.VTa=function(){if(h.Od()==h.OA)try{var e=/Android ([0-9]+\.?[0-9]*)/i.exec(navigator.userAgent);if(e)return parseFloat(e[1])}catch(b){}}();h.o9a=function(){return h.VTa};h.Swa=function(){var e={RIa:"unknown",
Sdb: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.RIa=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.Sdb=b.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}return e}();h.kcb=
function(){return h.Swa};h.XTa=function(){var e=h.Swa.RIa.match(/Apple\s+(.+)\s+GPU/);return e?e[1].toUpperCase():"unknown"}();h.qlb=function(){return h.XTa};h.c0a=h.pk()==h.FP?!0:!1;h.Xz=function(){return h.c0a};h.ZFa=function(){return h.Rb()==h.Fk&&h.Foa()>=14};var g=!1;try{g=window.localStorage.getItem("tdvp_video_drift_2")=="true"}catch(e){}h.Hcb=function(){return g};h.phb=function(){g=!0;try{window.localStorage.setItem("tdvp_video_drift_2","true")}catch(e){}};h.AR="ontouchstart"in window||typeof window.PointerEvent!==
"undefined"&&typeof navigator.maxTouchPoints!=="undefined"&&navigator.maxTouchPoints>0?!0:!1;h.b9=function(){return h.AR};h.j0a=p.tk("touchenabled")?p.Kg("touchenabled"):"ontouchstart"in window?h.Od()==h.Bsa?!1:!0:!1;h.br=function(){return h.j0a};h.summary=function(){return["browser: "+h.Rb(),"browserType: "+h.EN(),"browserSubtype: "+h.Dc(),"device: "+h.pk(),"isMobile: "+h.yb(),"chromeWebView: "+h.hGa(),"touchDevice"+h.b9(),"touchEnabled"+h.br()].join(", ")};h.log=function(){k.log("browser: "+h.Rb());
k.log("browserType: "+h.EN());k.log("browserSubtype: "+h.Dc());k.log("device: "+h.pk());k.log("isMobile: "+h.yb());k.log("chromeWebView: "+h.hGa());k.log("touchDevice: "+h.b9());k.log("touchEnabled: "+h.br())};return h});
define("tdv/player/view/util/Flags",["require","exports","tdv/player/view/util/URL"],function(a,m,k){a={};a.Nw=k.Kg("debug",!1);a.uRa=k.tk("hqhls");a.Fqa=k.Kg("audiocontext",!0);a.Kkb=k.Kg("testhash",!1);a.fRa=k.Kg("exitvronblur",!1);a.PQa=k.Kg("download",!0);a.FSa=k.Kg("updatewhilehidden",!1);a.lRa=k.Kg("webgl2",!1);a.kRa=k.Kg("webgl1",!1);a.iRa=k.Kg("lowp",!1);a.bra=k.Kg("antialias");a.JSa=k.Kg("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","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","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.",
"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?",reject:"\u041e\u0442\u0445\u0432\u044a\u0440\u043b\u0435\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.",
"refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435","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","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.","refresh-downloaded":"P\u00e4ivit\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","rotate-device":"Oto\u010dte svoje zariadenie","exit-vr":"Ukon\u010denie VR","storage-not-provided-launch-from-desktop":"Znovu na\u010d\u00edtajte prehliadku pomocou desktop ikony pre jej stiahnite.",
"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?",reject:"Odmietnu\u0165",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.",
"refresh-downloaded":"Obnovi\u0165","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","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","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.","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?",reject:"\u0412\u0456\u0434\u0445\u0438\u043b\u0438\u0442\u0438",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.",
"refresh-downloaded":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438","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","rotate-device":"Please rotate your device","exit-vr":"Exit VR","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.","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?",
reject:"Reject",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.","refresh-downloaded":"Refresh","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","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.","refresh-downloaded":"Refresh","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","rotate-device":"Please rotate your device","exit-vr":"Exit VR","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.","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?",
reject:"Menolak",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.","refresh-downloaded":"Refresh","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","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.","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?",reject:"Rejeitar",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","refresh-downloaded":"Atualizar","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",
"rotate-device":"Ruota il dispositivo","exit-vr":"Esci dalla VR","storage-not-provided-launch-from-desktop":"Avvia il tour dall'icona sul desktop per scaricarlo.","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?",reject:"Rifiuta",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.","refresh-downloaded":"Aggiorna","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","rotate-device":"Please rotate your device","exit-vr":"Exit VR","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",
"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?",reject:"\u62d2\u7d55",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.","refresh-downloaded":"\u91cd\u65b0\u6574\u7406","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","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.","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?",reject:"Avvis",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.","refresh-downloaded":"Last inn p\u00e5 nytt","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","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.","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?",reject:"Rejeitar",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","refresh-downloaded":"Atualizar","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","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.","refresh-downloaded":"Refresh","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","rotate-device":"\u7aef\u672b\u3092\u56de\u8ee2\u3055\u305b\u3066\u304f\u3060\u3055\u3044",
"exit-vr":"VR\u30d3\u30e5\u30fc \u7d42\u4e86","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","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",reject:"\u62d2\u5426\u3059\u308b",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","refresh-downloaded":"\u66f4\u65b0","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","rotate-device":"Please rotate your device","exit-vr":"Exit VR","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",
"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",reject:"\u62d2\u7edd",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.","refresh-downloaded":"\u5237\u65b0","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","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.","refresh-downloaded":"Verversen","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","rotate-device":"Forgasd el a telefont!","exit-vr":"Kil\u00e9p\u00e9s a VR m\u00f3db\u00f3l","storage-not-provided-launch-from-desktop":"K\u00e9rlek ind\u00edtsd \u00fajra az oldalt az asztalon tal\u00e1lhat\u00f3 iconra kattintva.",
"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",reject:"Elutas\u00edt",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.","refresh-downloaded":"Friss\u00edt\u00e9s",
"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","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.","refresh-downloaded":"Refresh","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","rotate-device":"Gireu el dispositiu","exit-vr":"Surt de VR","storage-not-provided-launch-from-desktop":"Torneu a iniciar la visita virtual des de la icona de l'escriptori per a descarregar-la.","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?",reject:"Rebutjar",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.","refresh-downloaded":"Actualitzaci\u00f3","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","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.",
"refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c","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","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.","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?",reject:"Avvis",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.","refresh-downloaded":"Last inn p\u00e5 nytt","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","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.","refresh-downloaded":"Actualizar","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","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.","refresh-downloaded":"Refresh","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","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.","refresh-downloaded":"Refresh","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","rotate-device":"Obr\u00f3\u0107 urz\u0105dzenie","exit-vr":"Wyjd\u017a z VR","storage-not-provided-launch-from-desktop":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 pulpitu.","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?",reject:"Odrzuca\u0107",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.","refresh-downloaded":"Od\u015bwie\u017c","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","rotate-device":"Veuillez faire pivoter votre appareil","exit-vr":"Quitter la r\u00e9alit\u00e9 virtuelle","storage-not-provided-launch-from-desktop":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne du bureau pour t\u00e9l\u00e9charger.",
"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?",reject:"Rejeter",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.","refresh-downloaded":"Rafra\u00eechir","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","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.","refresh-downloaded":"Aktualisieren","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","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.","refresh-downloaded":"Refresh","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,k,p,h){function g(f){return k[d][f]||k.en[f]||f}for(var e in k)k[e.substring(0,2)]=k[e];k["zh-hk"]=k["zh-mo"]=k["zh-tw"];k.no=k.nn;var b=function(){var f=window.navigator,n=["language","browserLanguage","systemLanguage","userLanguage"],l,q,r=[];(l=h.getQueryParameter("language"))&&r.push(l.toLowerCase());var t=f.languages;if(Array.isArray(t))for(l=0;l<t.length;l++)(q=t[l])&&q.length&&
(q=q.toLowerCase(),r.indexOf(q)==-1&&r.push(q));for(l=0;l<n.length;l++)(q=f[n[l]])&&q.length&&(q=q.toLowerCase(),r.indexOf(q)==-1&&r.push(q));return r}(),c=Object.keys(k),d=function(){for(var f=0;f<b.length;f++){var n=b[f];if(c.indexOf(n)>=0)return n;n=n.substr(0,2);if(c.indexOf(n)>=0)return n}return"en"}();g.log=function(){p.log("translation lang: "+d);p.log("browser lang: "+b.join(", "))};return g});
define("tdv/view/util/UserInitiatedAction",["require","exports","tdv/player/view/util/Device"],function(a,m,k){function p(){for(;f.length;)f.shift()();document.body.removeEventListener("click",p,!0);document.body.removeEventListener("touchstart",e,!0);document.body.removeEventListener("touchmove",g,!0);document.body.removeEventListener("touchend",h,!0);c=!1}function h(){d&&p()}function g(){d=!1}function e(){d=!0;k.Od()==k.fj&&p()}function b(){document.body.addEventListener("click",p,!0);document.body.addEventListener("touchstart",
e,!0);document.body.addEventListener("touchmove",g,!0);document.body.addEventListener("touchend",h,!0)}var c=!1,d=!1,f=[];a={wait:function(l){f.push(l);c||(c=!0,document.body?b():document.addEventListener("DOMContentLoaded",b))},Slb:function(l){l=f.indexOf(l);l>=0&&f.splice(l,1)}};var n=0;a.Dm=function(l,q){var r=this;return function(){q&&p();n+=1;var t=l.apply(r,arguments);--n;return t}};a.B6=function(){return n>0};return a});
define("tdv/view/av/DummyVideoData",["require"],function(){var a={};a.src=a.Nlb="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";
return a});
define("tdv/view/av/PlaybackRequiresUserAction",["require","tdv/view/av/DummyVideoData","tdv/player/view/util/Device"],function(a){function m(l){var q=document.createElement("video");q.setAttribute("webkit-playsinline","true");q.setAttribute("playsinline","true");q.src=e.src;var r=q.play();if(r){var t=!1;r.then(function(){t=!0;q.pause();l(!1)})["catch"](function(){t||l(!0)})}else q.pause(),l(!1)}function k(l){var q=!1,r=document.createElement("video");r.setAttribute("webkit-playsinline","true");r.setAttribute("playsinline",
"true");r.src="";(r=r.play())?r["catch"](function(t){q=t.name!=="NotAllowedError"}).then(function(){l(!q)}):l(!0)}function p(l){n=l;d=!0;h()}function h(){for(;f.length;)f.shift().call(window,n)}function g(){c||(c=!0,b.Rb()==b.Fk&&b.Foa()>=11?p(!0):b.Rb()==b.xi?m(p):k(function(l){l?m(p):p(!1)}))}var e=a("tdv/view/av/DummyVideoData"),b=a("tdv/player/view/util/Device"),c=!1,d=!1,f=[],n;return{test:function(l){d||c||g();f.push(l);d&&h()}}});
define("tdv/view/util/AudioActivation",["require","tdv/player/l10n","tdv/view/util/UserInitiatedAction","tdv/view/av/PlaybackRequiresUserAction"],function(a){function m(e,b){this.Wf=e;this.Gq=b;this.Es=this.Es.bind(this);this.Fs=!1}function k(){this.Es=this.Es.bind(this);this.Yja=this.Yja.bind(this);this.H="not tested";this.dta=[];this.vx=[];this.Y1=!1;h.wait(this.Yja)}var p=a("tdv/player/l10n"),h=a("tdv/view/util/UserInitiatedAction"),g=a("tdv/view/av/PlaybackRequiresUserAction");k.prototype.Hib=
function(){this.H=="not tested"&&(this.H="testing",g.test(function(e){this.H=e?"requires action":"allowed";this.$0a()}.bind(this)))};k.prototype.$0a=function(){this.H=="allowed"?this.Es(!0):this.Y1&&(this.Y1=!1,this.vx.forEach(function(e){e.request()}))};k.prototype.Bqa=function(e){this.H=="allowed"?e.call(this,!0):this.dta.push(e)};k.prototype.request=function(e){this.MC(e)};k.prototype.cancel=function(e){this.uQ(e)};k.prototype.active=function(){return this.H=="allowed"};k.prototype.jhb=function(){this.H==
"allowed"&&(this.H="requires action")};k.prototype.Yja=function(){setTimeout(this.rVa.bind(this),300);this.xu(!0)};k.prototype.rVa=function(){for(;this.vx.length;)this.vx.pop().cancel()};k.prototype.MC=function(e){this.H=="testing"||this.H=="not tested"?(this.Daa(e),this.Y1=!0):this.H=="requires action"&&this.Daa(e).request()};k.prototype.uQ=function(e){this.H=="testing"||this.H=="not tested"?this.Y1=!1:this.H=="requires action"&&this.Daa(e).cancel()};k.prototype.Es=function(e){var b=this.vx;this.vx=
[];b.forEach(function(c){e||c.Wf.set("mute",!0);c.cancel()});this.xu(e)};k.prototype.xu=function(e){this.H="allowed";this.dta.forEach(function(b){b.call(window,e)})};k.prototype.Daa=function(e){for(var b=null,c=0;c<this.vx.length&&!b;c++)this.vx[c].Wf==e&&(b=this.vx[c]);b||(b=new m(e,this.Es),this.vx.push(b));return b};m.prototype.request=function(){this.Fs||(this.Fs=!0,this.Wf.get("mediaActivationMode")=="button"?this.Wf.mN.Hfb(this.Es):this.Wf.RL.show(p("enable-audio-prompt"),this.Es))};m.prototype.cancel=
function(){this.Wf.mN.R9a(this.Es);this.Wf.RL.Pe(this.Es)};m.prototype.Es=function(e){this.Gq(e!==!1);this.Fs=!1};return new k});
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,k,p,h,g){return new (function(e){function b(){var c=e.call(this)||this;c.visible=!0;c.jb=!1;c.n9=!1;c.visible=!0;c.jb=!1;c.n9=!1;c.KMa=g.getQueryParameter("redirect-when-hidden")||"";c.mfb=g.Kg("reload-when-hidden",!1);document.addEventListener("visibilitychange",c.onChange.bind(c),!1);c.onChange();return c}P(b,e);b.prototype.wA=function(c){if(this.jb=
c)this.n9=!1;this.onChange()};b.prototype.wpa=function(c){this.n9=c;this.onChange()};b.prototype.onChange=function(){var c=this.jb?!this.n9:!document.hidden;this.visible!=c&&((this.visible=c)&&this.Leb(),this.o(new p(k.V)))};b.prototype.Leb=function(){this.KMa?window.location.href=this.KMa:this.mfb&&window.location.reload()};return b}(h))});
define("tdv/view/av/SharedAudioContext",["require","tdv/constants/EventName","tdv/player/view/util/Flags","tdv/view/util/AudioActivation","tdv/view/util/Visibility"],function(a){var m=a("tdv/constants/EventName"),k=a("tdv/player/view/util/Flags"),p=a("tdv/view/util/AudioActivation"),h=a("tdv/view/util/Visibility");if(!k.Fqa||"AudioContext"in window===!1)return null;var g=new AudioContext;p.Bqa(function(){g.state!=="running"&&g.resume()});h.bind(m.V,function(){h.visible&&g.state=="interrupted"&&g.resume()});
return g});
define("tdv/player/view/util/Capabilities","require tdv/utils tdv/view/av/SharedAudioContext tdv/player/view/util/Device tdv/player/view/util/Flags tdv/player/view/util/URL".split(" "),function(a){function m(){}var k=a("tdv/utils"),p=a("tdv/view/av/SharedAudioContext"),h=a("tdv/player/view/util/Device"),g=a("tdv/player/view/util/Flags");a=a("tdv/player/view/util/URL");m.jka=!1;m.Lhb=function(){m.jka=!0};m.g_a=function(){window.MediaSource=window.MediaSource||window.Skb;return window.MediaSource&&typeof window.MediaSource.isTypeSupported===
"function"&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')};m.q_a=function(){if(h.Rb()==h.xi){var c=h.yma();if(c>=10&&c<11||c>=11.3)return!0}return!1};m.h_a=function(){return h.Rb()==h.Fk||h.Rb()==h.xi?!0:!1};var e;m.bGa=function(c){try{return e||(e=document.createElement("audio")),!!e.canPlayType(c).replace(/^no$/,"")}catch(d){}return!1};var b;m.JN=function(c){try{return b||(b=document.createElement("video"),b.setAttribute("webkit-playsinline","true"),b.setAttribute("playsinline",
"true")),!!b.canPlayType(c).replace(/^no$/,"")}catch(d){}return!1};m.J9a=function(){return h.Rb()==h.xi?h.yma()>=15||p?!0:!1:!0};m.j_a=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};m.dPa=function(c,d,f,n){if(g.JSa)return!0;if(h.Od()==h.fj)if(!f||f>30){if(c<=3168&&d<=1584)return!0}else{if(c<=4096&&d<=2048)return!0}else if((h.uO()||h.WI())&&!h.HD()){if(c<=
4320&&d<=4320||c<=8192&&d<=4096)return!0}else if((h.uO()||h.WI())&&h.Mma()){if(n=="h264"&&(c<=5760&&d<=5760||c<=7680&&d<=3840)||c<=3840&&d<=2160)return!0}else if(h.qW())if(n=="h264"){if(c<=5760&&d<=5760||c<=7680&&d<=3840)return!0}else{if(c<=4400&&d<=2200)return!0}else if(h.yb()){if(c<=3840&&d<=2160)return!0}else if(c<=4096&&d<=2048)return!0;return!1};m.L9a=function(){return h.qW()||(h.uO()||h.WI())&&h.Dc()==h.Jw||!h.yb()&&m.jka&&h.Rb()==h.Ap?!0:!1};m.cPa=function(c){return m.dPa(c.get("width"),c.get("height"),
c.get("framerate"),c.get("codec"))};m.K9a=function(){return m.jka?!0:!1};m.tMa=!g.lRa&&g.kRa?1:2;m.M9a=function(){return g.bra!==void 0?g.bra:h.WI()||h.qW()||h.Adb()||h.Bdb()||h.OJa()||h.uO()&&!h.HD()||!h.$f()&&h.Od()!=h.OA&&h.Od()!=h.fj?!0:!1};m.Cib=function(c,d){return m.dPa(c,d,30)};m.log=function(){k.log("webgl: "+m.bu);k.log("html5 audio: "+m.qJa);k.log("html5 video: "+m.tJa)};m.n6a=function(){return["webgl:"+m.bu,"html5audio:"+m.qJa,"html5video:"+m.tJa].join(" ")};m.sJa=m.bGa('audio/ogg; codecs="vorbis"');
m.rJa=m.bGa("audio/mpeg");m.qJa=m.sJa||m.rJa;m.tma=m.JN('video/ogg; codecs="theora"');m.JN('video/mp4; codecs="avc1.42E01E"');m.uma=m.JN('video/webm; codecs="vp8, vorbis"');m.Rcb=m.JN('video/mp4; codecs="hev1"');m.m6=m.JN("video/mp4");m.Scb=m.JN("video/quicktime");m.Tcb=m.q_a();m.eJa=m.h_a();m.zcb=m.eJa||m.m6&&m.g_a();m.tJa=m.tma||m.m6||m.uma;m.bu=m.j_a();a.tk("debug")&&a.tk("capabilities")&&m.log();m.summary=m.n6a();return m});
define("tdv/player/view/util/geo/Quaternion",["require"],function(){var a=Math.PI/180,m=180/Math.PI,k=new THREE.Euler(0,0,0,"YXZ"),p=new THREE.Quaternion;return{create:function(){return{x:0,y:0,z:0,w:0}},KHa:function(h,g,e){p.setFromEuler(k.set(g*a,-h*a,e*a,"YXZ"));h={};h.x=p.x;h.y=p.y;h.z=p.z;h.w=p.w;return h},a9:function(h,g){k.setFromQuaternion(p.set(h.x,h.y,h.z,h.w),"YXZ");h={};h.Za=-k.y*m;h.pitch=k.x*m;h.fh=k.z*m;g||(h.pitch=Math.min(90,Math.max(-90,h.pitch)));return h},Za:function(h){k.setFromQuaternion(p.set(h.x,
h.y,h.z,h.w),"YXZ");return-k.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,k){this.x=m||0;this.y=k||0};a.Vector2.prototype={constructor:a.Vector2,set:function(m,k){this.x=m;this.y=k;return this},copy:function(m){this.x=m.x;this.y=m.y;return this},subVectors:function(m,k){this.x=m.x-k.x;this.y=m.y-k.y;return this}};a.Vector3=function(m,k,p){this.x=m||0;this.y=k||0;this.z=p||0};a.Vector3.prototype={constructor:a.Vector3,set:function(m,k,
p){this.x=m;this.y=k;this.z=p;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 k=this.x,p=this.y,h=this.z,g=m.x,e=m.y,b=m.z;m=m.w;var c=m*k+e*h-b*p,d=m*p+b*k-g*h,f=m*h+g*p-e*k;k=-g*k-e*p-b*h;this.x=
c*m+k*-g+d*-b-f*-e;this.y=d*m+k*-e+f*-g-c*-b;this.z=f*m+k*-b+c*-e-d*-g;return this},dot:function(m){return this.x*m.x+this.y*m.y+this.z*m.z},crossVectors:function(m,k){var p=m.x,h=m.y;m=m.z;var g=k.x,e=k.y;k=k.z;this.x=h*k-m*e;this.y=m*g-p*k;this.z=p*e-h*g;return this}};a.Quaternion=function(m,k,p,h){this.x=m||0;this.y=k||0;this.z=p||0;this.w=h!==void 0?h:1};a.Quaternion.prototype={constructor:a.Quaternion,set:function(m,k,p,h){this.x=m;this.y=k;this.z=p;this.w=h;return this},copy:function(m){this.x=
m.x;this.y=m.y;this.z=m.z;this.w=m.w;return this},INa:function(m,k,p){var h=Math.cos(m/2),g=Math.cos(k/2),e=Math.cos(p/2);m=Math.sin(m/2);k=Math.sin(k/2);p=Math.sin(p/2);this.x=m*g*e+h*k*p;this.y=h*k*e-m*g*p;this.z=h*g*p-m*k*e;this.w=h*g*e+m*k*p;return this},setFromAxisAngle:function(m,k){k/=2;var p=Math.sin(k);this.x=m.x*p;this.y=m.y*p;this.z=m.z*p;this.w=Math.cos(k);return this},multiply:function(m){return this.multiplyQuaternions(this,m)},multiplyQuaternions:function(m,k){var p=m.x,h=m.y,g=m.z;
m=m.w;var e=k.x,b=k.y,c=k.z;k=k.w;this.x=p*k+m*e+h*c-g*b;this.y=h*k+m*b+g*e-p*c;this.z=g*k+m*c+p*b-h*e;this.w=m*k-p*e-h*b-g*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,k){if(k===0)return this;if(k===1)return this.copy(m);var p=this.x,h=
this.y,g=this.z,e=this.w,b=e*m.w+p*m.x+h*m.y+g*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=p,this.y=h,this.z=g,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*(p+this.x),this.y=.5*(h+this.y),this.z=.5*(g+this.z),this;b=Math.sin((1-k)*m)/c;k=Math.sin(k*m)/c;this.w=e*b+this.w*k;this.x=p*b+this.x*k;this.y=h*b+this.y*k;this.z=g*b+this.z*k;return this},setFromUnitVectors:function(){var m,
k;return function(p,h){m===void 0&&(m=new a.Vector3);k=p.dot(h)+1;k<1E-6?(k=0,Math.abs(p.x)>Math.abs(p.z)?m.set(-p.y,p.x,0):m.set(0,-p.z,p.y)):m.crossVectors(p,h);this.x=m.x;this.y=m.y;this.z=m.z;this.w=k;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,p(),window.addEventListener("orientationchange",p,!1),window.addEventListener("deviceorientation",h,!1),k())}function k(){if(v&&n!==void 0&&l!==void 0){v=!1;var x=c.degToRad*l;u.INa(c.degToRad*
n.beta,c.degToRad*n.alpha,-(c.degToRad*n.gamma));u.multiply(t);u.multiply(r.setFromAxisAngle(q,-x));w||(y++,y>=5&&(w=!0,f.o(new e(g.td))));f.o(new e(g.V))}}function p(){l=window.orientation||0;v=!0;k()}function h(x){n=x;v=!0;k()}var g=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,n,l,q,r,t,u,v,w=!1,y=0;m.prototype.ot=function(){k();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",p,!1);window.removeEventListener("deviceorientation",h,!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(n){this.Mdb=n;this.cla=new h;this.f5=new h;this.ioa=new h;this.DI=new c.Quaternion;this.hoa=new c.Quaternion;this.hFa=new c.Quaternion;this.MJa=!1;this.q5=new c.Vector3;this.kna=new c.Vector3;this.lcb=new c.Quaternion}function k(){this.deviceId="webvr-polyfill:fused";this.EKa=!1;this.DKa=
0;this.XU=new c.Vector3;this.h6=new c.Vector3;this.filter=new m(.98);this.dfb=new p(.04);this.qO=f.qO();this.Lq=f.Lq();f.Qla();this.Wma=f.ldb();this.v5=new c.Quaternion;f.Lq()?this.v5.setFromAxisAngle(new c.Vector3(1,0,0),Math.PI/2):this.v5.setFromAxisAngle(new c.Vector3(1,0,0),-Math.PI/2);this.v6=new c.Quaternion;this.xP=new c.Quaternion;this.PLa=new c.Quaternion;this.PLa.setFromAxisAngle(new c.Vector3(0,0,1),-window.orientation*Math.PI/180);this.fOa();f.JJa()&&this.v5.multiply(this.v6);this.tw=
new c.Quaternion;this.qO=f.qO();this.Lq=f.Lq();this.kdb=f.Qla()>=66;this.eJ=this.eJ.bind(this);this.JW=this.JW.bind(this);this.IW=this.IW.bind(this);screen&&screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",this.eJ):window.addEventListener("orientationchange",this.eJ);this.Wma?window.addEventListener("deviceorientation",this.JW):window.addEventListener("devicemotion",this.IW)}function p(n){this.efb=n;this.R7=new c.Quaternion;this.WO=null;this.SGa=
new c.Quaternion;this.QW=new c.Quaternion}function h(n,l){this.set(n,l)}var g=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.Q8a=function(n,l){this.cla.set(n,l)};m.prototype.Y8a=function(n,l){this.f5.set(n,l);f.Hdb(l-this.ioa.Y8)&&this.Sfb();this.ioa.copy(this.f5)};m.prototype.Sfb=function(){if(this.MJa){var n=this.mcb(this.f5.sample,this.f5.Y8-this.ioa.Y8);this.lcb.multiply(n);
this.DI.copy(this.hoa);this.DI.multiply(n);n=new c.Quaternion;n.copy(this.DI);n.inverse();this.q5.set(0,0,-1);this.q5.applyQuaternion(n);this.q5.normalize();this.kna.copy(this.cla.sample);this.kna.normalize();n=new c.Quaternion;n.setFromUnitVectors(this.q5,this.kna);n.inverse();var l=new c.Quaternion;l.copy(this.DI);l.multiply(n);this.DI.slerp(l,1-this.Mdb);this.hoa.copy(this.DI)}else this.hFa=this.P8a(this.cla.sample),this.hoa.copy(this.hFa),this.MJa=!0};m.prototype.ot=function(){return this.DI};
m.prototype.P8a=function(n){var l=new c.Vector3;l.copy(n);l.normalize();n=new c.Quaternion;n.setFromUnitVectors(new c.Vector3(0,0,-1),l);n.inverse();return n};m.prototype.mcb=function(n,l){var q=new c.Quaternion,r=new c.Vector3;r.copy(n);r.normalize();q.setFromAxisAngle(r,n.length()*l);return q};k.prototype.stop=function(){screen&&screen.orientation&&screen.orientation.addEventListener&&screen.orientation.removeEventListener("change",this.eJ);window.removeEventListener("orientationchange",this.eJ);
window.removeEventListener("deviceorientation",this.JW);window.removeEventListener("devicemotion",this.IW)};k.prototype.pm=function(){return null};k.prototype.ot=function(){var n=void 0;if(this.Wma&&this.e_){this.UGa=this.UGa||function(){var q=(new c.Quaternion).setFromAxisAngle(new c.Vector3(0,0,-1),0),r=new c.Quaternion;this.W2=="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.TGa=this.TGa||
function(){var q=new c.Quaternion;q.setFromAxisAngle(new c.Vector3(1,0,0),-Math.PI/2);return q}();n=this.e_;var l=new c.Quaternion;l.copy(n);l.multiply(this.TGa);l.multiply(this.tw);l.multiply(this.xP);l.multiplyQuaternions(this.UGa,l);this.Xlb&&(l.x=0,l.z=0,l.normalize());this.F7[0]=l.x;this.F7[1]=l.y;this.F7[2]=l.z;this.F7[3]=l.w;return this.F7}n=this.filter.ot();n=this.dfb.Qbb(n,this.h6,this.WO);l=new c.Quaternion;l.copy(this.v5);l.multiply(this.tw);l.multiply(n);l.multiply(this.xP);return l};
k.prototype.resetPose=function(){this.tw.copy(this.filter.ot());this.tw.x=0;this.tw.y=0;this.tw.z*=-1;this.tw.normalize();f.JJa()&&this.tw.multiply(this.v6);this.tw.multiply(this.PLa)};k.prototype.JW=function(n){this.e_=this.e_||new c.Quaternion;var l=n.alpha,q=n.beta;n=n.gamma;l=(l||0)*Math.PI/180;q=(q||0)*Math.PI/180;n=(n||0)*Math.PI/180;this.e_.INa(q,l,-n)};k.prototype.IW=function(n){var l=n.rotationRate;if(l){var q=n.accelerationIncludingGravity;n=n.timeStamp/1E3;this.qO&&(n/=1E3);var r=n-this.WO;
r<=f.rra||r>f.nra?this.WO=n:(this.XU.set(-q.x,-q.y,-q.z),this.h6.set(l.alpha,l.beta,l.gamma),(this.Lq||this.qO||this.kdb)&&this.h6.multiplyScalar(Math.PI/180),this.filter.Q8a(this.XU,n),this.filter.Y8a(this.h6,n),this.WO=n,this.EKa||(this.DKa++,this.DKa>=5&&(this.EKa=!0,d.o(new e(g.td)))),this.W2!=this.SHa()&&this.eJ(),d.o(new e(g.V)))}else this.Wma=!0,window.addEventListener("deviceorientation",this.JW),window.removeEventListener("devicemotion",this.IW)};k.prototype.bind=function(){d.bind.apply(d,
arguments)};k.prototype.h=function(){d.h.apply(d,arguments)};k.prototype.eJ=function(){this.fOa();d.o(new e(g.V))};k.prototype.fOa=function(){this.xP.set(0,0,0,1);this.W2=this.SHa();switch(this.W2){case "landscape-primary":this.xP.setFromAxisAngle(new c.Vector3(0,0,1),-Math.PI/2);break;case "landscape-secondary":this.xP.setFromAxisAngle(new c.Vector3(0,0,1),Math.PI/2)}this.v6.copy(this.xP);this.v6.inverse()};k.prototype.SHa=function(){var n=screen.orientation&&screen.orientation.type;if(!n)switch(window.orientation){case 0:n=
"portrait-primary";break;case 90:n="landscape-primary";break;case -90:n="landscape-secondary";break;case 180:n="portrait-secondary"}n=="landscape-primary"&&(this.XU.z>4.9||this.XU.z<-4.9?n=this.W2||n:this.XU.x>0&&(n="landscape-secondary"));return n};p.prototype.Qbb=function(n,l,q){if(!this.WO)return this.R7.copy(n),this.WO=q,n;q=new c.Vector3;q.copy(l);q.normalize();l=l.length();if(l<c.degToRad*20)return this.QW.copy(n),this.R7.copy(n),this.QW;this.SGa.setFromAxisAngle(q,l*this.efb);this.QW.copy(this.R7);
this.QW.multiply(this.SGa);this.R7.copy(n);return this.QW};h.prototype.set=function(n,l){this.sample=n;this.Y8=l};h.prototype.copy=function(n){this.set(n.sample,n.Y8)};var f={rra:.001,nra:1,Hdb:function(n){return isNaN(n)||n<=f.rra||n>f.nra?!1:!0}};f.Lq=function(){var n=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return n}}();f.Glb=function(){var n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return n}}();f.qO=function(){var n=navigator.userAgent.indexOf("Firefox")!==
-1&&navigator.userAgent.indexOf("Android")!==-1;return function(){return n}}();f.Qla=function(){var n=navigator.userAgent.match(/.*Chrome\/([0-9]+)/),l=n?parseInt(n[1],10):null;return function(){return l}}();f.ldb=function(){var n=!1;if(f.Qla()===65){var l=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(l){l=l[1].split(".");var q=l[3];n=parseInt(l[2],10)===3325&&parseInt(q,10)<148}}return function(){return n}}();f.JJa=function(){return window.orientation==90||window.orientation==-90};return k});
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(){l=!0;f.o(new p(k.V))}function y(){var B;!E||!x&&A?A&&(B=z):B=D;q!=B&&(q&&(q.h(k.V,w),q.stop()),q=B)&&(q.bind(k.V,w,this,!0),w())}var x=e.Od()==e.fj||d.tk("debug")&&
d.getQueryParameter("sensor")=="deviceorientation",z=new c,A=!1;z.bind(k.td,function(){A=!0;y()},this,!0);var D=new b,E=!1;D.bind(k.td,function(){E=!0;y()},this,!0)}a("tdv/utils");var k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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 h,n={},l=!1,q,r=
[],t=!1,u=!1;n.xoa=function(w){w&&r.push(w);if(!n.disabled)for(;r.length;)r.pop()();else if(e.Od()==e.fj&&window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission){DeviceOrientationEvent.requestPermission().then(function(x){x==="granted"&&(u=!0,y())})["catch"](function(){});DeviceMotionEvent.requestPermission().then(function(x){x==="granted"&&(t=!0,y())})["catch"](function(){});var y=function(){if(n.disabled&&t&&u)for(n.disabled=!1,m();r.length;)r.pop()()};y()}};n.bind=function(w,y){f.bind(k.V,
w,y)};n.h=function(w,y){f.h(k.V,w,y)};n.Meb=function(){return l};n.ot=function(){l=!1;if(q){var w=q.ot();w=g.a9(w);return{yaw:w.Za,pitch:w.pitch,roll:w.fh}}return{yaw:0,pitch:0,roll:0}};if(e.Od()==e.Bsa||e.Od()==e.NY||e.Od()==e.kra||e.$f())n.dl=!1,n.disabled=!1;else if(e.Od()==e.OA&&e.Rb()==e.Ap&&window.location.protocol!="https:"&&window.location.hostname!="localhost")n.dl=!0,n.disabled=!0;else if(e.Od()==e.fj)if(n.dl=!0,n.disabled=!0,window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission)n.xoa();
else{var v=function(){window.removeEventListener("deviceorientation",v,!1);n.disabled=!1;m()};window.addEventListener("deviceorientation",v,!1)}else n.dl=window.DeviceMotionEvent!=void 0,n.disabled=!1;n.dl&&!n.disabled&&m();return n});
define("tdv/player/view/util/LibsLoader",["require","exports","tdv/player/view/util/URL"],function(a,m,k){m=function(){function h(){this.O6=null;this.S4=[]}h.prototype.initialize=function(g){this.O6=k.FA(g);this.jY=this.jY.bind(this);this.update()};h.prototype.load=function(g,e){this.S4.push({call:g,context:e||window});this.BO||(this.BO=this.w5());this.update()};h.prototype.aj=function(){return this.BO!==void 0};h.prototype.update=function(){this.S4.length>0&&(this.BO!==void 0?this.jab():this.O6&&
this.dna())};h.prototype.jY=function(){var g=this.w5();g===void 0?setTimeout(this.jY,250):(this.BO=g,this.update())};h.prototype.dna=function(){throw Error("Method not implemented.");};h.prototype.w5=function(){throw Error("Method not implemented.");};h.prototype.jab=function(){for(;this.S4.length>0;){var g=this.S4.pop();g.call.call(g.context,this.BO)}};return h}();a=function(h){function g(e){var b=h.call(this)||this;b.dKa=e;return b}P(g,h);g.prototype.dna=function(){this.script||(this.script=document.createElement("script"),
this.script.type="text/javascript",this.script.src=this.O6,document.getElementsByTagName("head")[0].appendChild(this.script),this.jY())};g.prototype.w5=function(){for(var e=window,b=0;b<this.dKa.length&&e!==void 0;b++)e=e[this.dKa[b]];return e};return g}(m);m=function(h){function g(e){var b=h.call(this)||this;b.xna=e;return b}P(g,h);g.prototype.dna=function(){this.module||(g.edb(),this.module=document.createElement("script"),this.module.type="module",this.module.textContent=['import * as all from "'+
this.O6+'";',"window."+this.xna.join(".")+" = all;"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.module),this.jY())};g.prototype.w5=function(){for(var e=window,b=0;b<this.xna.length&&e!==void 0;b++)e=e[this.xna[b]];return e};g.edb=function(){this.o6||(this.o6=document.createElement("script"),this.o6.type="importmap",this.o6.textContent=['{\n"imports":\n{','"three": "'+this.U$a()+'"',"}\n}"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.o6))};g.U$a=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 g}(m);var p={};p.GS=new m(["TDV","GS"]);p.PSa=new a(["WebVRConfig","FORCE_ENABLE_VR"]);p.zsa=new a(["WebXRPolyfill"]);p.HLS=new a(["Hls"]);p.initialize=function(h){this.HLS.initialize(h.get(TDV.PlayerSettings.HLS_URL));this.PSa.initialize(h.get(TDV.PlayerSettings.WEBVR_POLYFILL_URL));this.zsa.initialize(h.get(TDV.PlayerSettings.WEBXR_POLYFILL_URL));
this.GS.initialize(h.get(TDV.PlayerSettings.GS_URL))};return p});
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,k,p,h,g,e){return function(){function b(){}b.initialize=function(c){this.XR.c8?(this.mpa(!0),c()):(this.Gma||(this.Gma=this.Bib().then(function(d){this.mpa(d);return d}.bind(this)).catch(function(){this.mpa(!1);return!1}.bind(this))),this.Gma.then(function(){c()}))};
b.mpa=function(c){this.XR.wP=c;this.XR.akb=c&&(k.$f()||!k.yb());c&&p.Lhb()};b.Bib=function(){return this.Dib().then(function(c){return c?Promise.resolve(!0):this.Eib()}.bind(this))};b.Dib=function(){return navigator.xr&&e.getQueryParameter("vr_mode")!="cardboard"?this.Fib():Promise.resolve(!1)};b.Eib=function(){return this.H9a()?this.r9a():Promise.resolve(!1)};b.Fib=function(){return navigator.xr&&navigator.xr.isSessionSupported?navigator.xr.isSessionSupported("immersive-vr"):navigator.xr&&navigator.xr.supportsSession?
navigator.xr.supportsSession("immersive-vr"):Promise.reject()};b.H9a=function(){return h.dl&&k.yb()&&k.pk()!=k.FP&&this.I9a()};b.I9a=function(){return k.pk()==k.wY?this.Idb():!0};b.Idb=function(){try{return window.self===window.top}catch(c){return!1}};b.r9a=function(){var c=this;return new Promise(function(d){g.zsa.load(function(){var f;c.bfb=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.Q7,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!1}});c.XR.tO=!0;d(!0)})})};b.Gma=null;b.bfb=null;return b}()});define("three.mod",["require","exports"],function(){var a=window.THREE,m=new TDV.PlayerSettings;a.Gqa=m.get(TDV.PlayerSettings.w9);a.Pqa=m.get(TDV.PlayerSettings.N9);a.qB=m.get(TDV.PlayerSettings.qB);return a});
define("tdv/player/view/util/xr/CameraPosition",["require","exports","tdv/constants/EventName","three.mod"],function(a,m,k,p){var h=function(){function r(){}r.initialize=function(){this.XR.mk=new p.Group;this.XR.mk.matrixAutoUpdate=!1;this.XR.im=new p.Group;this.XR.im.matrixAutoUpdate=!1;this.XR.mk.add(this.XR.im);this.XR.O.bind(k.pY,this.WD,this,!0);this.XR.O.bind(k.V,this.kb,this,!0)};r.setScale=function(t){this.Eg!==t&&(this.Eg=t,this.XR.jm=1/t,this.setPosition({x:this.XR.Qc.x,y:this.XR.Qc.y,z:this.XR.Qc.z,
yaw:-c.setFromQuaternion(this.XR.yg,"YXZ").y*q}))};r.bP=function(t){var u,v;this.S6(this.HE,e);this.S6(n.copy(this.HE).premultiply(this.XR.mk.matrixWorld),g);var w=this.XR.mk.matrix;w.identity();w.multiply(n.makeRotationY(t===void 0?g.yaw:-t*l));w.multiply(n.makeRotationY(-e.yaw));w.multiply(n.makeScale(this.XR.jm,this.XR.jm,this.XR.jm));w.multiply(n.makeTranslation(-e.x,-e.y,-e.z));t!==void 0&&(w=this.XR.im.matrix,w.identity(),w.multiply(n.makeTranslation(e.x,e.y,e.z)),w.multiply(n.makeRotationY(-e.yaw*
l)));this.XR.mk.updateMatrixWorld(!0);(u=this.camera)===null||u===void 0||u.updateMatrixWorld(!0);(v=this.rl)===null||v===void 0||v.updateMatrixWorld(!0);this.xqa()};r.Coa=function(){this.XR.jm=1;c.setFromQuaternion(this.XR.Bm,"YXZ");this.setPosition({x:this.XR.m9.x,y:this.XR.m9.y,z:this.XR.m9.z,yaw:-c.y*q,pitch:c.x*q,roll:c.z*q})};r.setPosition=function(t){var u,v;this.S6(this.HE,e);this.S6(n.copy(this.HE).premultiply(this.XR.mk.matrixWorld),g);var w=this.XR.mk.matrix;w.identity();w.multiply(n.makeTranslation(t.x===
void 0?g.x:t.x,t.y===void 0?g.y:t.y,t.z===void 0?g.z:t.z));w.multiply(n.makeRotationY(t.yaw===void 0?g.yaw:-t.yaw*l));w.multiply(n.makeRotationX(t.pitch===void 0?g.pitch:t.pitch*l));w.multiply(n.makeRotationZ(t.roll===void 0?g.roll:t.roll*l));w.multiply(n.makeRotationZ(-e.roll));w.multiply(n.makeRotationX(-e.pitch));w.multiply(n.makeRotationY(-e.yaw));w.multiply(n.makeScale(this.XR.jm,this.XR.jm,this.XR.jm));w.multiply(n.makeTranslation(-e.x,-e.y,-e.z));if(t.yaw!==void 0||t.pitch!==void 0||t.roll!==
void 0)w=this.XR.im.matrix,w.identity(),w.multiply(n.makeTranslation(e.x,e.y,e.z)),w.multiply(n.makeRotationY(-e.yaw*l)),w.multiply(n.makeRotationX(e.pitch*l)),w.multiply(n.makeRotationX(e.roll*l));this.XR.mk.updateMatrixWorld(!0);(u=this.camera)===null||u===void 0||u.updateMatrixWorld(!0);(v=this.rl)===null||v===void 0||v.updateMatrixWorld(!0);this.xqa()};r.WD=function(){var t,u,v,w;this.Aw(this.XR.qA);this.qOa(((t=this.XR.Dg)===null||t===void 0?void 0:t.xr.getCamera())||null);this.setCamera(this.XR.pw);
if(u=(u=(t=(u=this.XR.Dg)===null||u===void 0?void 0:u.xr.getFrame())&&this.XR.referenceSpace&&t.getViewerPose(this.XR.referenceSpace))&&u.transform)this.XR.IN=u.position.y,this.HE.fromArray(u.matrix),this.HE.decompose(this.XR.m9,this.XR.Bm,f),(v=this.camera)===null||v===void 0||v.updateMatrixWorld(!0),(w=this.rl)===null||w===void 0||w.updateMatrixWorld(!0),this.xqa()};r.kb=function(){this.XR.isPresenting?this.scene&&this.camera&&(this.XR.qA!=this.scene||this.XR.pw!=this.camera)&&(this.Aw(this.XR.qA),
this.setCamera(this.XR.pw),this.XR.Dg.xr.updateCamera(this.XR.pw),this.setPosition({x:this.XR.Qc.x,y:this.XR.Qc.y,z:this.XR.Qc.z,Za:-c.setFromQuaternion(this.XR.yg,"YXZ").y*q})):(this.Aw(null),this.qOa(null),this.setCamera(null))};r.xqa=function(){n.copy(this.HE).premultiply(this.XR.mk.matrixWorld).decompose(this.XR.Qc,this.XR.yg,f);c.setFromRotationMatrix(this.XR.im.matrix,"YXZ");d.setFromMatrixPosition(this.HE);this.XR.im.matrix.identity();this.XR.im.matrix.multiply(n.makeTranslation(d.x,d.y,d.z));
this.XR.im.matrix.multiply(n.makeRotationFromEuler(c));this.XR.im.updateMatrixWorld(!0)};r.Aw=function(t){this.scene!==t&&(this.scene&&this.scene.remove(this.XR.mk),t==null&&(this.XMa(),this.ZMa()),(this.scene=t)&&this.scene.add(this.XR.mk))};r.setCamera=function(t){this.camera!==t&&(this.XMa(),(this.camera=t)&&this.XR.mk.add(this.camera))};r.qOa=function(t){this.rl!==t&&(this.ZMa(),(this.rl=t)&&this.XR.mk.add(this.rl))};r.XMa=function(){this.scene&&this.camera&&this.camera.parent===this.XR.mk&&(this.scene.add(this.camera),
this.camera=null)};r.ZMa=function(){this.rl&&this.rl.parent===this.XR.mk&&(this.rl.parent.remove(this.rl),this.rl=null)};r.S6=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.HE=new p.Matrix4;r.Eg=1;r.scene=null;r.camera=null;r.rl=null;return r}(),g={x:void 0,y:void 0,z:void 0,Za:void 0},e={x:void 0,y:void 0,z:void 0,Za:void 0},b=new p.Quaternion,c=new p.Euler,d=new p.Vector3,f=new p.Vector3,n=new p.Matrix4,l=Math.PI/180,q=180/
Math.PI;window.cj=function(r){h.setPosition({x:void 0,y:void 0,z:void 0,Za:r})};return h});define("tdv/player/view/util/xr/pointer/PointerType",["require","exports"],function(){return{gK:"gaze",OP:"laser"}});
define("tdv/player/view/util/xr/RendererList",["require","exports","tdv/constants/EventName"],function(a,m,k){return function(){function p(){}p.Cgb=function(h,g,e){var b=this.XR.Pn.indexOf(h);b>-1&&b!==this.XR.Pn.length-1&&(this.XR.Pn.splice(b,1),this.XR.Pn.splice(this.XR.Pn.length,0,h));this.XR.voa.set(h,g);this.XR.uoa.set(h,e);h!==this.XR.Dg||this.XR.qA===g&&this.XR.pw===e||(this.XR.qA=g,this.XR.pw=e,this.XR.O.o(k.V))};p.add=function(h){this.remove(h);this.XR.Pn.push(h)};p.remove=function(h){var g=
this.XR.Pn.indexOf(h);g!=-1&&(this.XR.Pn.splice(g,1),this.XR.voa.delete(h),this.XR.uoa.delete(h))};return p}()});define("tdv/player/view/util/xr/RendererType",["require","exports"],function(){return{Q$:"Panorama",H$:"Model3D"}});define("tdv/player/view/util/xr/pointer/SelectionMode",["require","exports"],function(){return{gK:"gaze",oRa:"gaze_click"}});define("tdv/player/view/util/xr/Type",["require","exports"],function(){return{eo:"Cardboard",Qkb:"WebVR",QSa:"WebXR"}});
define("tdv/constants/RenderOrder",["require","exports"],function(){return{KRa:-1,URa:0,LRa:0,sRa:0,okb:1,QQa:2,RQa:101,rSa:0,sSa:2,ySa:2,GRa:2,xSa:2,pRa:2,ESa:100,Dsa:900,iSa:10,CQa:-1E3,Zqa:1E3,TSa:999,SSa:999,RSa:1E3,oSa:1E3,USa:1001,VSa:1E3,$Ra:1E3,Csa: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,k,p){p===void 0&&(p=void 0);this.name=a;this.from=m;this.to=k;this.Tdb=p}}()});
define("tdv/view/util/Ease",["require","exports","tdv/view/util/EaseDimension"],function(a,m,k){function p(c){return function(d,f,n){d=Math.abs(f-d);return d/n<1?0:1/(1-Math.pow((d-n)/d,1/c))}}function h(c){var d=new b;d.Kla=function(f,n,l,q){return f+(n-f)*Math.pow(l<=0?0:l>=q?1:l/q,c)};d.nna=p(c);return d}function g(c){var d=new b;d.Kla=function(f,n,l,q){return f+(n-f)*(1-Math.pow(1-(l<=0?0:l>=q?1:l/q),c))};d.nna=p(c);return d}function e(c){var d=new b;d.Kla=function(f,n,l,q){l=l<=0?0:l>=q?1:l/
q;l<.5?l=Math.pow(l*2,c):(l=1-Math.pow(1-(l*2-1),c),l+=1);return f+l*.5*(n-f)};d.nna=p(c);return d}a=function(){function c(d,f,n){n===void 0&&(n=void 0);switch(d){case "quad_in":this.curve=h(2);break;case "quad_out":this.curve=g(2);break;case "quad_in_out":this.curve=e(2);break;case "cubic_in":this.curve=h(3);break;case "cubic_out":this.curve=g(3);break;case "cubic_in_out":this.curve=e(3);break;case "quart_in":this.curve=h(4);break;case "quart_out":this.curve=g(4);break;case "quart_in_out":this.curve=
e(4);break;case "quint_in":this.curve=h(5);break;case "quint_out":this.curve=g(5);break;case "quint_in_out":this.curve=e(5);break;default:this.curve=h(1)}this.Ez=f.slice();this.time=0;this.duration=this.VFa(f,n);this.hla={};for(d=0;d<this.Ez.length;d++)this.hla[this.Ez[d].name]=f[d].from}c.prototype.PV=function(d){for(var f=0;f<this.Ez.length;f++)if(this.Ez[f].name==d)return this.Ez[f];return null};c.prototype.ib=function(d){return this.hla[d]};c.prototype.Vma=function(){return this.time>0};c.prototype.Qe=
function(){return this.time>=this.duration};c.prototype.Zi=function(){return this.duration};c.prototype.pm=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.Ez.length;d++){var f=this.Ez[d];this.hla[f.name]=this.curve.Kla(f.from,f.to,this.time,this.duration)}};c.prototype.Lb=function(d){this.setTime(this.time+d)};c.prototype.VFa=function(d,f,n){n===void 0&&(n=void 0);
for(var l=[],q=0;q<this.Ez.length;q++){var r=this.Ez[q],t=n?n:r.Tdb;t!==void 0&&t>0&&l.push(this.curve.nna(r.from,r.to,t/1E3))}if(l.length>0){d=l[0];for(q=1;q<l.length;q++)d=Math.max(d,l[q]);return f!==void 0&&f>0?Math.max(f,d):d}return f!==void 0?Math.max(f,.001):this.VFa(d,f,1E3)};c.Zi=function(){return(new c(void 0,[new k("",void 0,void 0,void 0)])).Zi()};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,k,p,h){var g=window.requestAnimationFrame.bind(window),e=window.cancelAnimationFrame.bind(window),b=function(){function d(){}d.requestFrame=function(f,n,l){for(var q=0;q<d.zt.length;q++)if(d.zt[q].is(f,n))return;q=d.L6;l!==void 0&&(q+=l);d.zt.push(new c(f,n,q));d.paused||d.sw!==void 0||(d.sw=d.eX(d.E5))};d.dGa=function(f,n){for(var l=0;l<d.zt.length;l++)if(d.zt[l].is(f,
n)){d.zt.splice(l,1);break}};d.GX=function(f){d.paused!=f&&(d.paused=f,d.paused?d.sw!==void 0&&(d.Nka(d.sw),d.sw=void 0):d.zt.length>0&&(d.sw=d.eX(d.E5)))};d.eOa=function(f,n){d.eX!=f&&(d.sw!==void 0&&(d.Nka(d.sw),d.sw=f(d.E5)),d.eX=f,d.Nka=n)};d.Lfb=function(){d.eOa(g,e)};d.E5=function(f){d.qHa(f);d.sw=d.zt.length>0?d.eX(d.E5):void 0};d.qHa=function(f){f<d.vf&&(d.startTime=f-d.L6*d.z$,d.vf=f);var n=0;d.startTime===void 0?d.startTime=f:n=Math.round((f-d.startTime)/d.z$);var l=(n-d.L6)*d.z$,q=d.zt;
d.zt=[];d.p6=!0;d.L6=n;l=l>1?l<100?l:100:1;d.vf=f;d.D5=l;for(f=0;f<q.length;f++){var r=q[f];n<r.yKa?d.zt.push(r):r.call(l)}d.p6=!1};d.vf=(new Date).getTime();d.D5=0;d.p6=!1;d.eX=g;d.Nka=e;d.zt=[];d.sw=void 0;d.paused=!1;d.z$=1E3/60;d.L6=0;d.startTime=void 0;return d}();h.FSa&&setInterval(function(){p.visible||b.qHa(b.vf+100)},100);var c=function(){function d(f,n,l){this.yKa=0;this.Gq=f;this.context=n;this.yKa=l}d.prototype.is=function(f,n){return this.Gq==f&&this.context==n};d.prototype.call=function(f){try{this.Gq.call(this.context,
f)}catch(n){k.sW("Error in animation frame",n)}};return d}();return b});
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".split(" "),function(a,m,k,p,h,g,e,b,c,d){a=function(){function D(){this.oi=this.Pg=null;this.M7=this.Xi=this.Yi=0;this.draggable=this.N4=this.BW=!1;this.eHa=this.dHa=0;this.qla=1;this.canvas=document.createElement("canvas");
this.Yi=this.Xi=64;this.canvas.width=this.Yi;this.canvas.height=this.Xi;this.Se=this.H$a();this.BV=this.A$a();this.BV.scale.set(100,100,1);this.Se.add(this.BV);this.group=new k.Group;this.nl=new k.Group;this.nl.rotation.order="YXZ";this.group.add(this.nl);this.nl.add(this.Se);this.Gz=this.y$a();this.draggable=!1;this.DN=null;this.z9a=new k.Quaternion;this.N4=!1;this.sp(1);this.HX(.001);this.rX(!0);D.XR.O.bind(p.me,this.Bg,this,!0);this.m5=new k.Sphere;this.Ov=new k.Group;this.k5=new k.Object3D;this.Ov.add(this.k5)}
D.prototype.dispose=function(){D.XR.O.h(p.me,this.Bg,this);this.pab();this.h5()};D.prototype.Xgb=function(E){this.Gz.renderOrder=this.Se.renderOrder=h.Dsa+E/100};D.prototype.H$a=function(){var E=this.QN(),B=this.lm(this.canvas);E=new k.Mesh(E,B);E.rotation.order="YXZ";return E};D.prototype.A$a=function(){var E=this.QN(),B=new k.MeshBasicMaterial({color:65280,side:k.DoubleSide,depthTest:!1,transparent:!0});E=new k.Mesh(E,B);E.visible=!1;return E};D.prototype.y$a=function(){var E=this.QN(),B=document.createElement("canvas");
B.width=256;B.height=64;var C=B.getContext("2d");C.shadowColor="rgba(0, 0, 0, 0.5)";C.shadowBlur=16;C.shadowOffsetX=0;C.shadowOffsetY=0;C.fillStyle="#ffffff";C.beginPath();C.roundRect(16,16,224,32,16);C.closePath();C.fill();B=this.lm(B);B.depthTest=!1;B.transparent=!0;B.opacity=0;E=new k.Mesh(E,B);E.renderOrder=h.Dsa;return E};D.prototype.QN=function(){return new k.PlaneGeometry(1,1)};D.prototype.lm=function(E){return new k.MeshBasicMaterial({map:this.createTexture(E),side:k.DoubleSide,depthTest:!1,
transparent:!0})};D.prototype.createTexture=function(E){E=new k.CanvasTexture(E);E.colorSpace=k.SRGBColorSpace;return E};D.prototype.pab=function(){this.Se.geometry.dispose()};D.prototype.h5=function(){this.i5();this.Se.material.dispose()};D.prototype.i5=function(){this.Se.material.map.dispose()};D.prototype.p8=function(E){this.BW=E};D.prototype.pO=function(){var E;return((E=this.oi)===null||E===void 0?void 0:E.pressed)||!1};D.prototype.uE=function(E,B){this.Pg&&(this.Pg.Te=E,this.Pg.Rq=B)};D.prototype.uP=
function(E){this.ijb(E);this.hjb();this.Njb(E)};D.prototype.Njb=function(E){var B;if(E){w.ray.copy(E.ray).applyMatrix4(E.matrixWorld);var C=this.oi?[]:w.intersectObjects([this.Se],!1);if((C=C.length>0?C[0]:null)&&C.uv.x>=0&&C.uv.x<=1&&C.uv.y>=0&&C.uv.y<=1){var I=C.uv.x;var F=C.uv.y;var G=C.distance}else if((B=this.Pg)===null||B===void 0?0:B.pressed)C=w.intersectObjects([this.BV],!1),(C=C.length>0?C[0]:null)&&C.uv.x>=0&&C.uv.x<=1&&C.uv.y>=0&&C.uv.y<=1&&(I=(C.uv.x-.5)*this.BV.scale.x+.5,F=(C.uv.y-.5)*
this.BV.scale.y+.5,G=C.distance);C?(B=I*this.canvas.width,F=(1-F)*this.canvas.height,this.Pg||(this.Pg=new e),this.Pg.YLa=B,this.Pg.ZLa=F,this.Pg.distance=G,this.Pg.pressed=E.pressed):this.Pg=null}else this.Pg=null};D.prototype.ijb=function(E){var B;if(E){w.ray.copy(E.ray).applyMatrix4(E.matrixWorld);if(E.pressed){if(!this.oi)return;this.oi.pressed||(this.oi.pressed=!0,this.aib(w))}else this.Hpa(),E=w.intersectObjects([this.Gz],!1),E.length>0?(this.oi||(this.oi=new g),this.oi.Te=!0,this.oi.Rq=!0,
this.oi.pressed=!1,this.oi.distance=E[0].distance):this.oi=null;if((B=this.oi)===null||B===void 0?0:B.pressed)this.gjb(w),w.ray.intersectSphere(this.m5,q)&&(this.oi.distance=q.distanceTo(w.ray.origin))}else this.oi=null};D.prototype.hjb=function(){var E,B,C;(E=this.oi)===null||E===void 0||!E.Te||(B=this.oi)!==null&&B!==void 0&&B.pressed?this.ENa(.75):this.ENa(1);this.ngb(((C=this.oi)===null||C===void 0?0:C.pressed)?1:.75)};D.prototype.aib=function(E){E=E.intersectObjects([this.Gz],!1);E.length===
0?this.Hpa():(q.copy(E[0].point).applyMatrix4(l.copy(this.group.matrixWorld).invert()),this.m5.radius=q.length(),q.normalize(),this.group.add(this.Ov),this.Ov.rotation.set(q.y==0&&q.z==0?0:-Math.atan2(q.y,Math.sqrt(q.z*q.z+q.x*q.x)),q.x==0&&q.z==0?0:Math.atan2(q.x,q.z),0,"YXZ"),this.Ov.updateMatrixWorld(!0),this.Se.updateMatrixWorld(!0),q.setFromMatrixPosition(this.Se.matrixWorld).applyMatrix4(l.copy(this.Ov.matrixWorld).invert()),this.k5.position.set(q.x,q.y,q.z))};D.prototype.Hpa=function(){var E;
(E=this.Ov.parent)===null||E===void 0||E.remove(this.Ov)};D.prototype.gjb=function(E){this.Ov.updateMatrixWorld(!0);this.m5.center.setFromMatrixPosition(this.Ov.matrixWorld);if(E.ray.intersectSphere(this.m5,q)){this.group.updateMatrixWorld(!0);q.applyMatrix4(l.copy(this.group.matrixWorld).invert()).normalize();this.Ov.rotation.set(q.y==0&&q.z==0?0:-Math.atan2(q.y,Math.sqrt(q.z*q.z+q.x*q.x)),q.x==0&&q.z==0?0:Math.atan2(q.x,q.z),0,"YXZ");this.group.updateMatrixWorld(!0);this.k5.updateMatrixWorld(!0);
E=u;var B=v;B.setFromUnitVectors(r,q.setFromMatrixPosition(this.k5.matrixWorld).applyMatrix4(l.copy(this.group.matrixWorld).invert()).normalize());E.setFromEuler(t.set(this.nl.rotation.x,this.nl.rotation.y,0,"YXZ"));E.slerp(B,.2);E.angleTo(B)<.001&&E.copy(B);t.setFromQuaternion(E,"YXZ");this.nl.rotation.x=t.x;this.nl.rotation.y=t.y}else this.Hpa()};D.prototype.Rc=function(){return this.group};D.prototype.Sn=function(E){this.Se.material.opacity=E;this.Se.material.needsUpdate=!0};D.prototype.sp=function(E){this.Se.position.set(0,
0,-E)};D.prototype.cj=function(E){this.nl.rotation.y=-E*f};D.prototype.Jc=function(){return-this.nl.rotation.y*n};D.prototype.Tn=function(E){this.nl.rotation.x=E*f};D.prototype.Ic=function(){return this.nl.rotation.x*n};D.prototype.Kjb=function(E){E.width!==this.Yi||E.height!==this.Xi?(this.h5(),this.Se.material=this.lm(E)):this.canvas!==E&&(this.i5(),this.Se.material.map=this.createTexture(E));this.Se.material.map.needsUpdate=!0;this.Se.material.needsUpdate=!0;this.canvas=E;this.Yi=this.canvas.width;
this.Xi=this.canvas.height;this.XPa();this.OPa();this.dqa()};D.prototype.HX=function(E){this.M7!==E&&(this.M7=E,this.XPa())};D.prototype.XPa=function(){this.Se.scale.set(this.Yi*this.M7,this.Xi*this.M7,1);this.dqa()};D.prototype.Bg=function(){this.N4&&this.Wib()};D.prototype.e8=function(E){this.N4!=E&&(this.N4=E)&&(t.setFromQuaternion(D.XR.Bm,"YXZ"),this.nl.rotation.x=t.x,this.nl.rotation.y=t.y)};D.prototype.Wib=function(){t.setFromQuaternion(D.XR.Bm,"YXZ");t.z=0;y.setFromEuler(t);x.setFromEuler(this.nl.rotation);
if(this.DN){if(this.DN.Lb(d.D5),x.slerp(y,this.DN.ib("centering")),t.setFromQuaternion(x,"YXZ"),this.nl.rotation.x=t.x,this.nl.rotation.y=t.y,y.angleTo(x)<A||this.DN.Qe())this.DN=null}else y.angleTo(x)>z&&(this.z9a.copy(y),this.DN=new b("linear",[new c("centering",0,1)],2E3))};D.prototype.rX=function(E){this.draggable!=E&&((this.draggable=E)?this.Se.add(this.Gz):this.Se.remove(this.Gz))};D.prototype.mgb=function(E,B){this.dHa=E;this.eHa=B;this.dqa()};D.prototype.ENa=function(E){this.qla=E;this.OPa()};
D.prototype.OPa=function(){this.Gz.scale.set(128/this.Yi*this.qla,32/this.Xi*this.qla,1)};D.prototype.ngb=function(E){this.Gz.material.opacity=E;this.Gz.material.needsUpdate=!0};D.prototype.dqa=function(){this.Gz.position.set(-.5+this.dHa/this.Yi,.5-this.eHa/this.Xi,0)};return D}();var f=Math.PI/180,n=180/Math.PI,l=new k.Matrix4,q=new k.Vector3,r=new k.Vector3(0,0,-1),t=new k.Euler,u=new k.Quaternion,v=new k.Quaternion,w=new k.Raycaster,y=new k.Quaternion,x=new k.Quaternion,z=35*f,A=2*f;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,k,p){return function(){function h(){}h.I$a=function(){var g=new k;this.ll.push(g);this.XR.im.add(g.Rc());return g};h.hab=function(g){var e=this.ll.indexOf(g);e!==-1&&(this.XR.im.remove(g.Rc()),this.ll.splice(e,1),g.dispose())};h.initialize=function(){this.XR.O.bind(p.V,this.kb,this,!0);this.kb()};h.kb=function(){this.XR.isPresenting?this.XR.O.bind(p.me,this.Bg,this,
!0):this.XR.O.h(p.me,this.Bg,this)};h.tjb=function(){this.ll=[].concat(this.ll.filter(function(g){return!g.BW&&!g.pO()}),this.ll.filter(function(g){return!g.BW&&g.pO()}),this.ll.filter(function(g){return g.BW}));this.ll.forEach(function(g,e){return g.Xgb(e)})};h.Bg=function(){this.tjb();this.bY()};h.bY=function(){for(var g,e,b=this.XR.fe.reduce(function(r,t){return r===null||r.VO<t.VO||r.VO===t.VO&&t.handedness==="right"?t:r},null),c=!1,d=!1,f=Number.POSITIVE_INFINITY,n=!1,l=this.ll.length-1;l>=0;l--)if(c)this.ll[l].uP(null);
else{n=n||((g=this.ll[l].oi)===null||g===void 0?void 0:g.pressed)||((e=this.ll[l].Pg)===null||e===void 0?void 0:e.pressed)||!1;this.ll[l].uP(b);var q=this.ll[l].oi;q&&q.Te&&q.distance<f&&(c=!0,d=q.Rq,f=q.distance);(q=this.ll[l].Pg)&&q.Te&&q.distance<f&&(c=!0,d=q.Rq,f=q.distance)}n&&b&&!b.pressed&&this.XR.oX(b,50);g=this.ll.some(function(r){return r.BW});if(c||this.Te||g)for(l=0;l<this.XR.fe.length;l++)this.XR.fe[l]===b?this.GFa(this.XR.fe[l],g,c,d,f):this.GFa(this.XR.fe[l],g,!1,!1);this.Te=c};h.GFa=
function(g,e,b,c,d){b||e?(g.pressed||g.Rq===c||this.XR.oX(g,5),g.mD||this.XR.bOa(g,!0),this.XR.uE(g,b,c,d)):g.mD&&(!g.pressed&&g.Rq&&this.XR.oX(g,5),this.XR.bOa(g,!1),g.Te&&this.XR.uE(g,!1,!1))};h.ll=[];h.Te=!1;return h}()});
define("tdv/player/view/util/xr/VisibilityListener",["require","exports","tdv/constants/EventName","tdv/player/view/util/Flags","tdv/view/util/Visibility"],function(a,m,k,p,h){return function(){function g(){}g.initialize=function(){this.kb=this.kb.bind(this);this.D7=this.D7.bind(this);this.XR.O.bind(k.V,this.kb,this,!0);window.addEventListener("vrdisplayblur",function(){h.wpa(!0)},!0);window.addEventListener("vrdisplayfocus",function(){h.wpa(!1)},!0)};g.kb=function(){this.XR.session?(this.JE=this.XR.session,
this.JE.addEventListener("visibilitychange",this.D7)):(this.JE&&this.JE.removeEventListener("visibilitychange",this.D7),this.JE=null);h.wA(this.XR.isPresenting)};g.D7=function(){h.wpa(!this.JE||this.JE.visibilityState!="visible");p.fRa&&this.JE.visibilityState!="visible"&&this.XR.Ela()};g.JE=null;return g}()});
define("tdv/player/view/util/xr/VRAutoStart",["require","exports","tdv/player/view/util/Device","tdv/player/view/util/URL"],function(a,m,k,p){return function(){function h(){}h.initialize=function(){this.HD=[k.cu,k.du].indexOf(k.Dc())>-1;this.cQa=p.tk("vr");if(this.HD||this.cQa)this.DPa(),document.addEventListener("visibilitychange",function(){document.hidden||this.DPa()}.bind(this),!1)};h.DPa=function(){this.d$a();this.Bka=0;this.POa()};h.POa=function(){this.Bka++;this.X8=setTimeout(this.Jeb.bind(this),
this.cQa?500:this.Bka*1E3)};h.d$a=function(){this.X8&&(clearTimeout(this.X8),this.X8=null)};h.Jeb=function(){this.X8=null;this.HD&&this.Bka>5?window.location.reload():document.hidden||h.XR.isPresenting||(!this.AV()||this.HD)&&this.POa()};h.AV=function(){if(!this.XR.kJ)return!1;for(var g=this.XR.kJ.ri("PanoramaPlayer"),e=0;e<g.length;e++){var b=g[e];if(b.get("panorama"))return b.get("viewerArea").set("viewMode","vr"),!0}g=this.XR.kJ.ri("Model3DPlayer");for(e=0;e<g.length;e++)if(b=g[e],b.get("model")&&
b.get("model").get("isLoaded"))return b.get("viewerArea").set("viewMode","vr"),!0;g=this.XR.kJ.ri("VideoPlayer");for(e=0;e<g.length;e++)if(b=g[e],b.get("video"))return b.get("viewerArea").set("viewMode","vr"),!0;g=this.XR.kJ.ri("PhotoAlbumPlayer");for(e=0;e<g.length;e++)if(b=g[e],b.get("photoAlbum"))return b.get("viewerArea").set("viewMode","vr"),!0;return!1};return h}()});
define("tdv/player/view/util/Color",["require","exports","three.mod"],function(a,m,k){return function(){function p(){}p.Ufb=function(h,g){if(p.QJa(h)){var e=p.qp(h),b,c=256;g.forEach(function(d){if(p.QJa(d)){var f=p.$Ma(e,p.qp(d));f<c&&(b=d,c=f)}});if(b&&c<=5)return b}return h};p.N5=function(h,g){return p.$Ma(p.qp(h),p.qp(g))};p.QJa=function(h){return!!h&&h.indexOf("#")===0};p.qp=function(h){return[parseInt(h.substr(1,2),16),parseInt(h.substr(3,2),16),parseInt(h.substr(5,2),16)]};p.$Ma=function(h,
g){return Math.max(Math.abs(h[0]-g[0]),Math.abs(h[1]-g[1]),Math.abs(h[2]-g[2]))};p.Z8=function(h,g){h=p.qp(h);return"rgba(".concat(h[0],", ").concat(h[1],", ").concat(h[2],", ").concat(g,")")};p.Jib=function(h){h=p.qp(h);return h[0]<<16|h[1]<<8|h[2]<<0};p.ar=function(h){return new k.Color(p.Jib(h))};return p}()});
define("tdv/player/view/util/xr/pointer/VRControllerLaser",["require","exports","tdv/constants/RenderOrder","tdv/player/view/util/Color","three.mod"],function(a,m,k,p,h){a=function(){function c(d,f){this.dot=this.ray=this.ta=null;this.ta=new h.Group;this.ray=new g(d,f);this.ta.add(this.ray.ta);this.dot=new e(d,f);this.ta.add(this.dot.ta)}c.prototype.update=function(){this.ray.update();this.dot.update()};c.prototype.dispose=function(){var d;this.ta&&(this.ray.dispose(),this.ray=null,this.dot.dispose(),
this.dot=null,(d=this.ta.parent)===null||d===void 0||d.remove(this.ta),this.ta=null)};return c}();var g=function(){function c(d,f){this.Oq=this.material=this.ta=null;this.color="#ffffff";this.ub=d;this.Cm=f;this.rpa();this.ta=new h.Mesh(new h.CylinderGeometry(5E-4,5E-4,.35,8),this.material);this.ta.renderOrder=k.TSa;this.ta.position.z=-.175;this.ta.position.y=-.001;this.ta.rotation.copy(new h.Euler(-Math.PI/2,0,0,"YXZ"));this.ta.updateMatrix()}c.prototype.update=function(){this.aY();this.wqa()};c.prototype.dispose=
function(){var d;this.ta&&(this.ta.geometry.dispose(),this.Mpa(),(d=this.ta.parent)===null||d===void 0||d.remove(this.ta),this.ta=null)};c.prototype.rpa=function(){if(!this.material){var d=document.createElement("canvas");d.width=d.height=256;this.Oq=d.getContext("2d");this.material=new h.MeshBasicMaterial;this.material.map=new h.Texture(d);this.material.map.colorSpace=h.SRGBColorSpace;this.material.transparent=!0;this.aY()}};c.prototype.Mpa=function(){var d,f;if(this.material){var n=(d=this.material.map)===
null||d===void 0?void 0:d.image;n.width=n.height=1;(f=this.material.map)===null||f===void 0||f.dispose();this.material.map=null;this.material.dispose();this.Oq=this.material=null}};c.prototype.aY=function(){var d=this.Rla();if(this.color!==d){this.color=d;d=p.qp(this.color).join(", ");var f=this.material.map.image,n=this.Oq.createLinearGradient(0,0,0,f.height);n.addColorStop(0,"rgba("+d+", 0)");n.addColorStop(.5,"rgba("+d+", 1)");n.addColorStop(1,"rgba("+d+", 1)");this.Oq.fillStyle=n;this.Oq.clearRect(0,
0,f.width,f.height);this.Oq.fillRect(0,0,f.width,f.height);this.material.map.needsUpdate=!0;this.material.needsUpdate=!0}};c.prototype.wqa=function(){this.ta.visible=!this.ub.disabled&&!this.ub.hidden};c.prototype.Rla=function(){return this.ub.pressed?this.Cm.P7:this.ub.Rq?this.Cm.boa:this.Cm.N7};return c}(),e=function(){function c(d,f){this.Oq=this.Fv=this.material=this.border=this.dot=this.ta=null;this.color="#ffffff";this.ub=d;this.Cm=f;this.xhb();this.rpa();this.ta=new h.Group;this.ta.renderOrder=
k.SSa;this.border=new h.Mesh(new h.SphereGeometry(.0046,32,32),this.Fv);this.dot=new h.Mesh(new h.SphereGeometry(.004,32,32),this.material);this.ta.add(this.dot);this.ta.add(this.border);this.MPa()}c.prototype.update=function(){this.aY();this.MPa();this.wqa()};c.prototype.dispose=function(){var d;this.ta&&(this.ta.remove(this.dot),this.dot.geometry.dispose(),this.Mpa(),this.ta.remove(this.border),this.border.geometry.dispose(),this.vib(),(d=this.ta.parent)===null||d===void 0||d.remove(this.ta),this.ta=
null)};c.prototype.xhb=function(){if(!this.Fv){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 h.MeshBasicMaterial;f.map=new h.Texture(d);f.map.colorSpace=h.SRGBColorSpace;f.map.needsUpdate=!0;f.transparent=!0;f.depthTest=!1;f.side=h.BackSide;this.Fv=f;this.Fv.needsUpdate=!0}};c.prototype.vib=function(){var d,f;if(this.Fv){var n=(d=this.Fv.map)===null||d===
void 0?void 0:d.image;n.width=n.height=1;(f=this.Fv.map)===null||f===void 0||f.dispose();this.Fv.map=null;this.Fv.dispose();this.Fv=null}};c.prototype.rpa=function(){if(!this.material){var d=document.createElement("canvas");d.width=d.height=256;this.Oq=d.getContext("2d");var f=new h.MeshBasicMaterial;f.map=new h.Texture(d);f.map.colorSpace=h.SRGBColorSpace;f.transparent=!0;f.depthTest=!1;this.material=f;this.aY()}};c.prototype.Mpa=function(){var d,f;if(this.material){var n=(d=this.material.map)===
null||d===void 0?void 0:d.image;n.width=n.height=1;(f=this.material.map)===null||f===void 0||f.dispose();this.material.map=null;this.material.dispose();this.Oq=this.material=null}};c.prototype.wqa=function(){this.ta.visible=!this.ub.hidden&&!this.ub.disabled&&this.ub.cw!==void 0};c.prototype.MPa=function(){var d,f=this.ta.parent?b.setFromMatrixScale((d=this.ta)===null||d===void 0?void 0:d.parent.matrixWorld).x:1;d=(this.ub.cw||500)/f;this.ta.position.z=-d;this.ta.scale.set(d,d,d);this.ta.updateMatrix()};
c.prototype.aY=function(){var d=this.Rla();this.color!==d&&(this.color=d,d=this.material.map.image,this.Oq.fillStyle=this.color,this.Oq.clearRect(0,0,d.width,d.height),this.Oq.fillRect(0,0,d.width,d.height),this.material.map.needsUpdate=!0,this.material.needsUpdate=!0)};c.prototype.Rla=function(){return this.ub.pressed?this.Cm.P7:this.ub.Rq?this.Cm.boa:this.Cm.N7};return c}();new h.Matrix4;var b=new h.Vector3;return a});
define("tdv/player/view/util/xr/pointer/PointerState",["require","exports","three.mod"],function(a,m,k){return function(){function p(){this.id=0;this.ray=new k.Ray;this.matrixWorld=new k.Matrix4;this.disabled=!1;this.handedness="";this.Te=this.Rq=!1;this.XLa=0;this.cw=void 0;this.pressed=!1;this.VO=0;this.hidden=this.Zs=!1;this.Tb=new k.Vector2;this.mD=this.EA=!1;this.id=p.DW++}p.DW=0;p.oB="gaze";p.dZ="laser";return p}()});
define("tdv/player/view/util/xr/pointer/VRControllers","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,k,p,h,g,e,b,c){var d=[0,1],f="trigger grip unknown0 thumbstick buttonA buttonB pico".split(" ");a=function(){function n(){}n.initialize=function(){this.XR.O.bind(k.V,this.kb.bind(this),this,!0);this.XR.O.bind(k.me,
this.Bg.bind(this),this,!0);this.iA=this.iA.bind(this);this.hA=this.hA.bind(this);this.h7=this.h7.bind(this);this.k7=this.k7.bind(this);this.i7=this.i7.bind(this);this.Dka=b.getQueryParameter("backURL")};n.Ua=function(l){this.enabled=l};n.isConnected=function(){return this.PN.some(function(l){return l})};n.YNa=function(l){var q;if(this.si.length>0!==l)if(l){var r=new c.DirectionalLight(16777215,Math.PI);r.position.set(10,20,0);(q=this.On)===null||q===void 0||q.add(r);this.si.push(r)}else for(;this.si.length;)q=
this.si.pop(),(r=this.On)===null||r===void 0||r.remove(q)};n.jOa=function(l){this.d9!==l&&((this.d9=l)?this.Lv.forEach(this.CKa.bind(this)):this.Lv.forEach(this.YMa.bind(this)))};n.Yfb=function(l,q){l=this.Nbb(l);l!=-1&&(l=this.b5[l])&&l.hapticActuators&&l.hapticActuators.length&&(l=l.hapticActuators[0],l.pulse&&l.pulse(.6,q))};n.kb=function(){this.XR.isPresenting?this.Ya():this.Ba()};n.Ya=function(){d.forEach(function(l){this.zhb(l);this.Ahb(l)}.bind(this))};n.Ba=function(){d.forEach(function(l){this.zib(l);
this.yib(l);this.xib(l)}.bind(this))};n.Bg=function(){this.$gb(this.enabled&&this.XR.mk||null);this.bY();this.djb()};n.bY=function(){if(this.enabled){for(;this.XR.fe.length;)this.XR.fe.pop();d.forEach(function(l){var q=this.controllers[l];if(q&&this.PN[l]){var r=this.pD[l];this.ejb(l);r.matrixWorld.copy(q.matrixWorld);r.ray.origin.set(0,0,0);r.ray.direction.set(0,0,-1);l=(l=(l=this.Lv[l].motionController)&&l.components["xr-standard-thumbstick"])&&l.values;r.EA=l&&l.state=="pressed"||!1;r.Tb.set(l&&
l.xAxis||0,l&&l.yAxis||0);this.XR.fe.push(r)}}.bind(this))}};n.djb=function(){this.enabled&&d.forEach(function(l){l=this.qV[l];l===null||l===void 0||l.update()}.bind(this))};n.Ghb=function(){if(!this.Cla){var l=this.XR.Dg,q=l.xr.enabled;l.zn=!0;l.xr.enabled=!1;var r=new c.RoomEnvironment(l);this.Cla=(new c.PMREMGenerator(l)).fromScene(r).texture;l.zn=!1;l.xr.enabled=q}};n.zhb=function(l){var q=this.XR.Dg.xr.getController(l);this.controllers[l]!=q&&(q.addEventListener("selectstart",this.iA),q.addEventListener("selectend",
this.hA),q.addEventListener("connected",this.h7),q.addEventListener("disconnected",this.k7),q.userData.b7=!0,this.controllers[l]=q,this.pD[l]=new e,this.Xka[l]=0,this.pD[l].type=e.dZ)};n.xib=function(l){var q=this.controllers[l];q&&(q.removeEventListener("selectstart",this.iA),q.removeEventListener("selectend",this.hA),q.removeEventListener("connected",this.h7),q.removeEventListener("disconnected",this.k7),this.controllers[l]=null)};n.Ahb=function(l){if(!this.uI[l]){var q=this.XR.Dg.xr.getControllerGrip(l);
q.userData.b7=!0;this.c5||(this.c5=new c.XRControllerModelFactory);this.c5.path=c.qB.endsWith("/")?c.qB.slice(0,-1):c.qB;var r=this.c5.createControllerModel(q,this.gkb);r.addEventListener("loaded",this.i7);this.Lv[l]=r;q.add(r);this.uI[l]=q}};n.gkb=function(l){l=Array.from(l.profiles);if(h.WI())l=["meta-quest-touch-plus"].concat(l);else if(h.uO())l=["oculus-touch-v3"].concat(l);else if(h.OJa())l=["generic-trigger"].concat(l);else if(h.PJa()||l.indexOf("pico-phoenix")>=0||l.indexOf("pico-4")>=0)l=
["pico-4"].concat(l);else if(h.VJa()||l.indexOf("htc-vive-focus-3")>=0||l.indexOf("htc-vive-focus-3-plus")>=0)l=["htc-vive-focus-3"].concat(l);else if(h.Cdb()||h.tdb()||h.KJa()||l.indexOf("pico-g2")>=0||l.indexOf("pico-neo2")>=0||l.indexOf("pico-neo3")>=0)l=["generic-trigger"].concat(l);return l};n.yib=function(l){var q,r=this.uI[l];if(r){var t=this.Lv[l];this.Lv[l]=null;t.removeEventListener("loaded",this.i7);r.remove(t);this.uI[l]=null;(q=r.parent)===null||q===void 0||q.remove(r)}};n.Bhb=function(l){if(!this.qV[l]){var q=
new g(this.pD[l],this.XR.Cm);this.qV[l]=q;this.controllers[l].add(q.ta)}};n.zib=function(l){var q=this.qV[l];q&&(q.dispose(),this.qV[l]=null)};n.$gb=function(l){this.On!==l&&(this.On=l,this.vjb())};n.vjb=function(){this.controllers.forEach(function(l){var q,r;l&&l.parent!=this.On&&((q=l.parent)===null||q===void 0||q.remove(l),(r=this.On)===null||r===void 0||r.add(l))}.bind(this));this.uI.forEach(function(l){var q,r;l&&l.parent!=this.On&&((q=l.parent)===null||q===void 0||q.remove(l),(r=this.On)===
null||r===void 0||r.add(l))}.bind(this));this.si.forEach(function(l){var q,r;l.parent!==this.On&&((q=l.parent)===null||q===void 0||q.remove(l),(r=this.On)===null||r===void 0||r.add(l))}.bind(this))};n.iA=function(l){l=this.K5(l.target);if(this.PN[l]){var q=this.pD[l];q.pressed=!0;q.VO=Date.now();this.XR.O.o(k.mu,{pointerState:q});this.Xka[l]=Date.now()}};n.hA=function(l){l=this.K5(l.target);if(this.PN[l]){var q=this.pD[l];q.pressed=!1;this.Dka&&(this.FJa(l,"buttonB")||this.FJa(l,"pico"))?window.location.href=
this.Dka:(this.XR.O.o(k.lB,{pointerState:q}),this.Xka[l]+300>Date.now()&&this.XR.O.o(k.Pf,{pointerState:q}))}};n.h7=function(l){var q,r;if(l.data.targetRayMode!="gaze"){var t=this.K5(l.target);this.Bhb(t);(q=this.On)===null||q===void 0||q.add(this.controllers[t]);(r=this.On)===null||r===void 0||r.add(this.uI[t]);this.PN[t]=!0;this.b5[t]=l.data.gamepad;this.pD[t].handedness=l.data.handedness;this.XR.O.o(k.Lqa)}};n.Oma=function(l){return l.profiles.some(function(q){return q.indexOf("hand")>=0})};n.k7=
function(l){var q,r;l=this.K5(l.target);(q=this.On)===null||q===void 0||q.remove(this.controllers[l]);(r=this.On)===null||r===void 0||r.remove(this.uI[l]);this.PN[l]=!1;this.b5[l]=null;this.XR.O.o(k.Mqa)};n.i7=function(l){var q=this.Lv[this.gbb(l.target)];q.userData.Oma=this.Oma(l.target.motionController.xrInputSource);q.userData.aj=!0;q.userData.SJa=!1};n.Chb=function(l){l=this.Lv[l];this.Ghb();l.setEnvironmentMap(this.Cla);this.d9?this.CKa(l):this.YMa(l);l.userData.SJa=!0};n.ejb=function(l){var q=
this.Lv[l];q.userData.aj&&(q.userData.SJa||this.Chb(l),l=this.pD[l],q.visible=q.userData.Oma||l.hidden?!1:!0)};n.FJa=function(l,q){q=f.indexOf(q);l=this.b5[l];if(!l)return!1;l=l.buttons.length>q?l.buttons[q]:null;return!!l&&l.pressed};n.CKa=function(l){l&&l.traverse(function(q){if("isMesh"in q&&q.material){var r=q.material;if(!r.userData.yt){var t=r.userData.Xdb;t||(t=r.clone(),r.userData.Xdb=t,t.userData.yt=r,t.transparent||(t.transparent=!0,t.opacity=1,"map"in t&&t.map&&(t.map=this.t$a(t.map)),
t.needsUpdate=!0));q.material=t}q.userData.Una===void 0&&(q.userData.Una=q.renderOrder);q.renderOrder=p.RSa}}.bind(this))};n.YMa=function(l){l&&l.traverse(function(q){if("isMesh"in q&&q.material){var r=q.material;r.userData.yt&&(q.material=r.userData.yt);q.userData.Una==void 0&&(q.renderOrder=q.userData.Una)}}.bind(this))};n.t$a=function(l){if(!l)return null;var q=document.createElement("canvas");q.width=l.image.width;q.height=l.image.height;var r=q.getContext("2d");r.drawImage(l.image,0,0);for(var t=
r.getImageData(0,0,q.width,q.height),u=t.data,v=0;v<u.length;v+=4)u[v+3]=255;r.putImageData(t,0,0);l=(new c.Texture).copy(l);l.image=q;l.needsUpdate=!0;return l};n.K5=function(l){return this.controllers.indexOf(l)};n.gbb=function(l){return this.Lv.indexOf(l)};n.Nbb=function(l){return this.XR.fe.indexOf(l)};n.enabled=!0;n.controllers=[null,null];n.PN=[!1,!1];n.uI=[null,null];n.Lv=[null,null];n.c5=null;n.qV=[null,null];n.b5=[null,null];n.si=[];n.d9=!1;n.pD=[];n.Xka=[];n.On=null;n.Cla=null;n.Dka=null;
return n}();new c.Matrix4;return a});
define("tdv/player/canvas/ReticleCanvas",["require","exports"],function(){return function(){function a(m){this.Ie=this.Nu(m.N7);this.az=this.Nu(m.P7);this.mz=this.Xl([0,0,0],0);this.n3=this.Xl([0,0,0],.125);this.oXa=this.Xl(this.Ie,1);this.pXa=this.Xl(this.az,1);this.AVa=this.Xl(this.az,1);this.zVa=this.Xl(this.Ie,.5);this.xVa=this.Xl(this.Ie,1);this.yVa=this.Xl(this.az,1);this.Mm=this.Ch=128;this.Maa=4E3;this.gva=.1;this.Nm=.16;this.pq=.04;this.iua=this.HZ=.68-this.pq;this.GZ=1-this.pq;this.ea=document.createElement("canvas");
this.ea.width=this.Ch;this.ea.height=this.Mm;this.Da=this.ea.getContext("2d");this.zd=this.Cx=!1;this.KL=this.P1=void 0;this.IF=0}a.prototype.Nu=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.Xl=function(m,k){return"rgba("+m.join(",")+", "+k+")"};a.prototype.AJ=function(m,k){this.zd=m;this.P1=k};a.prototype.vA=function(m){this.Cx=m};a.prototype.Zf=function(){return this.Ch};a.prototype.pg=function(){return this.Mm};
a.prototype.zg=function(){return this.ea};a.prototype.update=function(m){return this.Cx?this.sXa(m):this.zd?this.xXa():this.wXa()};a.prototype.dispose=function(){this.Da=null;this.ea.width=this.ea.height=1};a.prototype.VK=function(){var m;(m=this.Da)===null||m===void 0||m.clearRect(0,0,this.Ch,this.Mm)};a.prototype.wXa=function(){if(this.KL==a.jra)return!1;this.VK();this.mva(this.oXa,1);this.KL=a.jra;return!0};a.prototype.xXa=function(){if(this.P1===void 0){if(this.KL==a.fa)return!1;this.VK();this.mva(this.pXa,
2)}else this.o2a(this.P1);this.KL=a.fa;return!0};a.prototype.sXa=function(m){for(this.IF+=m;this.IF>this.Maa;)this.IF-=this.Maa;this.uVa(this.IF/this.Maa);this.KL=a.vY;return!0};a.prototype.mva=function(m,k){this.Pk(this.gva*k+this.pq,0,this.mz,this.n3,0,2*Math.PI);this.Pk(this.gva*k,0,this.mz,m,0,2*Math.PI)};a.prototype.yXa=function(m){this.Pk(this.HZ-(this.Nm+this.pq)*.5,this.Nm+this.pq,this.n3,this.mz,0,2*Math.PI);this.Pk(this.HZ-this.Nm*.5,this.Nm,this.zVa,this.mz,0,2*Math.PI);this.Pk(this.HZ-
this.Nm*.5,this.Nm,this.AVa,this.mz,.5*Math.PI,(.5+m*2)*Math.PI)};a.prototype.tXa=function(m,k){this.Pk(this.iua-(this.Nm+this.pq)*.5,this.Nm+this.pq,this.n3,this.mz,0,2*Math.PI);this.Pk(this.iua-this.Nm*.5,this.Nm,this.xVa,this.mz,0,2*Math.PI);m=(.5+m*2)*Math.PI;for(k=(.5+k*2)*Math.PI;k<m;)k+=2*Math.PI;var p=m-this.pq/(this.GZ*2*Math.PI),h=k+this.pq/(this.GZ*2*Math.PI);Math.abs(h-p+2*Math.PI)<this.pq*2&&(p=0,h=k);this.Pk(this.GZ-(this.Nm+this.pq)*.5,this.Nm+this.pq,this.n3,this.mz,p,h);this.Pk(this.GZ-
this.Nm*.5,this.Nm,this.yVa,this.mz,m,k)};a.prototype.Pk=function(m,k,p,h,g,e){var b=Math.round(this.Ch*.5),c=Math.round(this.Mm*.5),d=Math.min(b,c);m=Math.round(m*d);var f=this.Da;f&&(f.imageSmoothingEnabled=!0,f.lineWidth=k*d,f.strokeStyle=p,f.fillStyle=h,f.beginPath(),f.arc(b,c,m,g,e,!1),f.stroke(),f.fill())};a.prototype.uVa=function(m){this.VK();if(m<.25){var k=m/.25;m=.5*k}else m<.5?(k=(m-.25)/.25,m=.5+k,k=1+k*.5):m<.75?(k=(m-.5)/.25,m=.5+.5*k,k=.5+k):(m=k=(m-.75)/.25,k=.5+k*.5);this.tXa(m,k)};
a.prototype.o2a=function(m){this.VK();this.yXa(m)};a.jra="initial";a.vY="changing";a.fa="over";return a}()});define("tdv/player/view/panorama/renderer/constants/Face",["require"],function(){return{Jkb:"single",FRONT:"front",$a:"left",BACK:"back",Cb:"right",Tc:"top",Fc:"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={},k=Math.PI/180,p=new THREE.Matrix4;new THREE.Matrix4;var h=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];m.jh=500;m.G9=m.jh*.5;m.qSa=m.jh;m.ksa=[a.FRONT,a.Cb,a.BACK,a.$a,a.Tc,a.Fc];m.LGa=function(g,e){for(var b=m.jh,c=m.G9,d=g*e,f=this.Hx(),
n=[],l=0,q=6*d;l<q;l++)n.push(l);l=[];var r=d;l.push(this.EK(f,g,e,-c,+c,-c,+b,0,-b,0,n.slice(0,r)));q=r;r+=d;l.push(this.EK(f,g,e,+c,+c,-c,0,+b,-b,0,n.slice(q,r)));q=r;r+=d;l.push(this.EK(f,g,e,+c,+c,+c,-b,0,-b,0,n.slice(q,r)));q=r;r+=d;l.push(this.EK(f,g,e,-c,+c,+c,0,-b,-b,0,n.slice(q,r)));q=r;r+=d;l.push(this.EK(f,g,e,-c,+c,+c,+b,0,0,-b,n.slice(q,r)));l.push(this.EK(f,g,e,-c,-c,-c,+b,0,0,+b,n.slice(r,r+d)));f.mergeVertices();f.computeFaceNormals();f.userData.type="cube";f.userData.pJa=g;f.userData.hQa=
e;f.userData.Xeb=l;return m.nU(f)};m.RN=function(){var g=this.Hx();this.lta(g,-.5,.5,0,1,0,0,0,-1,0,0);g.mergeVertices();g.computeFaceNormals();g.userData.type="plane";return m.nU(g)};m.KGa=function(g,e,b,c,d,f,n,l,q,r,t,u){var v=this.Hx();v.vertices.push(new THREE.Vector3(g,e,b));v.vertices.push(new THREE.Vector3(c,d,f));v.vertices.push(new THREE.Vector3(n,l,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.nU(v)};m.aOa=function(g,e,b,c,d){g=m.Tia(g);var f=g.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=g.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;g.uvsNeedUpdate=
!0;return m.nU(g,!0)};m.mt=function(){return m.G9};m.ima=function(g,e){return 2*g*Math.tan(e*.5*k)};m.jma=function(g,e){return 2*g*Math.tan(e*.5*k)};m.Vv=function(g){return Math.max(Math.min(3.539647*g-6.669366*g*g+4.7454*g*g*g,m.G9),.1)};m.Hx=function(){var g=new THREE.Geometry;g.userData={};return g};m.dispose=function(g){g&&(g.isBufferGeometry&&g.userData&&g.userData.geometry&&g.userData.geometry.dispose(),g.isGeometry&&g.userData&&g.userData.FN&&g.userData.FN.dispose(),g.dispose())};m.nU=function(g,
e){if(g.isBufferGeometry)return g;if(g.isGeometry){if(!g.userData.FN||e)g.userData.FN&&g.userData.FN.dispose(),e=g.toBufferGeometry(),(e.userData={}).geometry=g,g.userData.FN=e;return g.userData.FN}return null};m.Tia=function(g){return g.isGeometry?g:g.isBufferGeometry&&g.userData&&g.userData.geometry?g.userData.geometry:null};m.EK=function(g,e,b,c,d,f,n,l,q,r,t){for(var u={},v=0,w=0;w<b;w++){u[w]={};for(var y=0;y<e;y++)this.lta(g,c+n*y/e+0*w/b,d+0*y/e+q*w/b,f+l*y/e+r*w/b,n/e,0/e,l/e,0/b,q/b,r/b,
t[v]),u[w][y]=g.faces.slice(g.faces.length-2,g.faces.length),v+=1}return u};m.ylb=function(g,e,b){e=e*.5/Math.tan(b*.5);p.copy(g);g=h[0];g.x=0;g.y=0;g.z=0;g.applyMatrix4(p);b=Math.sqrt(g.x*g.x+g.y*g.y+g.z*g.z);var c=e/g.z,d=h[1];d.x=g.x*c;d.y=g.y*c;d.z=e;return b/Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)};m.Ebb=function(g,e,b){g=m.Tia(g);p.copy(e.matrixWorldInverse).multiply(b);switch(g.userData.type){case "cube":return m.TZa(g,p,e.projectionMatrix);default:return m.UZa(g)}};m.xbb=function(g,e,b){g=m.Tia(g);
switch(g.userData.type){case "plane":return m.xZa(g,e,b);case "quad":return m.lwa(g,1,e,b)||m.lwa(g,0,e,b);default:return null}};m.lta=function(g,e,b,c,d,f,n,l,q,r,t){var u=g.vertices.length;g.vertices.push(new THREE.Vector3(e,b,c));g.vertices.push(new THREE.Vector3(e+l,b+q,c+r));g.vertices.push(new THREE.Vector3(e+d+l,b+f+q,c+n+r));g.vertices.push(new THREE.Vector3(e+d,b+f,c+n));g.faces.push(new THREE.Face3(u,u+1,u+2,null,null,t));g.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(0,
0),new THREE.Vector2(1,0)]);g.faces.push(new THREE.Face3(u,u+2,u+3,null,null,t));g.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(1,0),new THREE.Vector2(1,1)])};m.xZa=function(g,e,b){var c=g.faces[0],d=g.faces[1],f=h[0],n=h[1],l=h[2];f.copy(g.vertices[c.a]).applyMatrix4(e);n.copy(g.vertices[d.c]).applyMatrix4(e);l.copy(g.vertices[c.b]).applyMatrix4(e);e=n.x-f.x;d=n.y-f.y;var q=n.z-f.z;n=l.x-f.x;var r=l.y-f.y;l=l.z-f.z;var t=d*l-q*r,u=q*n-e*l,v=e*r-d*n,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=(n*t+r*u+l*f)/(n*n+r*r+l*l),e=g.faceVertexUvs[0][0][0],d=g.faceVertexUvs[0][1][2],g=g.faceVertexUvs[0][0][1],b<0||b>1||f<0||f>1))))return{EPa:e.x+(d.x-e.x)*b+(g.x-e.x)*f,eQa:e.y+(d.y-e.y)*b+(g.y-e.y)*f,materialIndex:c.materialIndex}};m.lwa=function(g,e,b,c){var d=g.faces[e],
f=h[0],n=h[1],l=h[2];f.copy(g.vertices[d.a]).applyMatrix4(b);n.copy(g.vertices[d.b]).applyMatrix4(b);l.copy(g.vertices[d.c]).applyMatrix4(b);b=n.x-f.x;var q=n.y-f.y,r=n.z-f.z;n=l.x-f.x;var t=l.y-f.y;l=l.z-f.z;var u=q*l-r*t,v=r*n-b*l,w=b*t-q*n,y=c.direction.x*u+c.direction.y*v+c.direction.z*w;if(y!=0&&(w=-(u*(c.origin.x-f.x)+v*(c.origin.y-f.y)+w*(c.origin.z-f.z))/y,!(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-n*q)!=0)b=(v*b-
u*q)/f,q=(v*n-u*t)/-f;else if((f=l*b-n*r)!=0)b=(v*b-u*q)/f,q=(v*n-u*t)/-f;else if((f=l*q-t*r)!=0)b=(c*q-v*r)/f,q=(c*t-v*l)/-f;else return;if(!(q<0||q>1||b<0||b>1||q+b>1))return n=g.faceVertexUvs[0][e][0],t=g.faceVertexUvs[0][e][1],g=g.faceVertexUvs[0][e][2],{EPa:n.x+(t.x-n.x)*q+(g.x-n.x)*b,eQa:n.y+(t.y-n.y)*q+(g.y-n.y)*b,materialIndex:d.materialIndex}}};m.TZa=function(g,e,b){var c=Array.prototype.concat.apply([],g.userData.Xeb.map(function(d){return m.Fwa(e,b,d,g.vertices,0,0,g.userData.pJa,g.userData.hQa).map(function(f){return f.materialIndex})}));
return m.Qwa(c)};m.UZa=function(g){g=g.faces.map(function(e){return e.materialIndex});return m.Qwa(g)};m.Qwa=function(g){var e={};g.forEach(function(c){e[c]=!0});g=[];for(var b in e)g.push(b);return g};m.Fwa=function(g,e,b,c,d,f,n,l){var q=[];if(m.y6a(g,e,c[b[f][d][0].a],c[b[f+l-1][d][0].b],c[b[f+l-1][d+n-1][0].c],c[b[f][d+n-1][1].c]))if(n==1&&l==1)q.push(b[f][d][0]);else for(f=l>1?[f,f+Math.ceil(l*.5),f+l]:[f,f+l],d=n>1?[d,d+Math.ceil(n*.5),d+n]:[d,d+n],n=1;n<f.length;n++){l=f[n-1];for(var r=f[n]-
l,t=1;t<d.length;t++){var u=d[t-1];q=q.concat(m.Fwa(g,e,b,c,u,l,d[t]-u,r))}}return q};m.y6a=function(g,e,b,c,d,f){var n=[null,null,null,null,null];h[0].copy(b).applyMatrix4(g);h[1].copy(c).applyMatrix4(g);h[2].copy(d).applyMatrix4(g);h[3].copy(f).applyMatrix4(g);b=0;c=4;for(g=0;g<4;g++){d=h[(g+3)%4];f=h[g];var l=h[(g+1)%4];if(f.z<=0)n[b++]=f;else{if(d.z<=0){var q=h[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;n[b++]=q}l.z<=0&&(q=h[c++],r=f.z/(f.z-l.z),q.x=f.x+(l.x-f.x)*r,
q.y=f.y+(l.y-f.y)*r,q.z=-1E-5,n[b++]=q)}}if(b>2){for(g=0;g<b;g++)n[g].applyMatrix4(e);g=0;for(e=b-2;g<e;g++)if(b=n[g],c=n[g+1],d=n[g+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.MGa=function(g,e,b,c,d,f,n,l,q){var r=g*k,t=-r*.5+Math.PI*.5,u=e*k,v=(Math.PI-u)*.5-b*k,w=m.qSa*.5,y=64/Math.PI,x=Math.max(2,Math.ceil(r/c*y));y=Math.max(2,Math.ceil(u/d*y));for(var z=c*x,A=d*y,D=this.Hx(),E=0,B=[],C=0;C<=A;C++){for(var I=[],F=v+C*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(F),+w*Math.cos(F),+w*Math.sin(N)*Math.sin(F)));I.push(E++)}B.push(I)}for(t=r=0;t<d;t++)for(u=t*y,v=0;v<c;v++){w=v*x;for(C=0;C<y;C++)for(z=n+(1-C/y)*q,A=n+(1-(C+1)/y)*q,G=0;G<x;G++){E=f+G/x*l;I=f+(G+1)/x*l;F=B[u+C][w+G];N=B[u+C+1][w+G+1];var O=B[u+C][w+G+1];D.faces.push(new THREE.Face3(F,B[u+C+1][w+G],N,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(E,z),new THREE.Vector2(E,A),new THREE.Vector2(I,A)]);
D.faces.push(new THREE.Face3(F,N,O,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(E,z),new THREE.Vector2(I,A),new THREE.Vector2(I,z)])}r++}D.mergeVertices();D.computeFaceNormals();D.userData.type="sphere";D.userData.Wd=g;D.userData.Ek=e;D.userData.pitch=b;D.userData.pJa=c;D.userData.hQa=d;return m.nU(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,k,p,h,g,e){a=function(){function c(d,f){this.Kz=this.Uq=null;this.ub=d;this.Cm=f;this.canvas=new p(f);this.M$a();this.z$a();this.ta=new g.Group;this.ta.add(this.Uq);this.ta.add(this.Kz)}c.prototype.update=function(){this.canvas.update(h.D5)&&(this.Uq.material.map.needsUpdate=
!0);var d=e.Vv(this.Cm.jMa||2),f=2*d*Math.tan(c.hu/2);this.ta.matrixAutoUpdate=!1;this.ta.matrixWorldNeedsUpdate=!1;this.ta.matrix.identity();this.ta.matrix.multiply(b.makeTranslation(0,0,-d));this.ta.matrix.multiply(b.makeScale(f,f,f));this.ta.updateMatrixWorld(!0)};c.prototype.zf=function(d){this.Uq.material.opacity=d};c.prototype.AJ=function(d,f){f===void 0&&(f=void 0);this.canvas.AJ(d,f)};c.prototype.vA=function(d){this.canvas.vA(d)};c.prototype.dispose=function(){var d;this.rab();this.nab();
this.canvas.dispose();(d=this.ta.parent)===null||d===void 0||d.remove(this.ta);this.ta=null};c.prototype.nab=function(){var d;if(this.Kz){this.Kz.geometry.dispose();var f=this.Kz.material.map.source;f.width=f.height=1;this.Kz.material.map.dispose();(d=this.Kz.parent)===null||d===void 0||d.remove(this.Kz);this.Kz=null}};c.prototype.z$a=function(){var d=document.createElement("canvas");d.width=d.height=256;var f=d.getContext("2d");f.fillStyle="rgba(0, 0, 0, 0)";f.fillRect(0,0,256,256);f=new g.Texture;
f.image=d;f.generateMipmaps=!0;f.minFilter=g.LinearMipMapLinearFilter;f.needsUpdate=!0;d=new g.MeshBasicMaterial({map:f,transparent:!0});d.map.needsUpdate=!0;d.needsUpdate=!0;d=new g.Mesh(new g.PlaneGeometry,d);d.renderOrder=k.Csa;this.Kz=d};c.prototype.rab=function(){var d;this.Uq&&(this.Uq.geometry.dispose(),this.Uq.material.map.dispose(),this.Uq.material.dispose(),(d=this.Uq.parent)===null||d===void 0||d.remove(this.Uq),this.Uq=null)};c.prototype.M$a=function(){var d=new g.PlaneGeometry,f=new g.Texture;
this.canvas.update(10);f.colorSpace=g.SRGBColorSpace;f.image=this.canvas.zg();f.generateMipmaps=!0;f.minFilter=g.LinearMipMapLinearFilter;f.needsUpdate=!0;f=new g.MeshBasicMaterial({map:f,transparent:!0});this.Uq=new g.Mesh(d,f);this.Uq.renderOrder=k.Csa};c.hu=6*Math.PI/180;return c}();var b=new g.Matrix4;return a});
define("tdv/player/view/util/xr/pointer/VRGazePointer","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,k,p,h,g,e){a=function(){function d(){}d.initialize=function(){this.iA=this.iA.bind(this);this.hA=this.hA.bind(this);this.XR.O.bind(k.V,this.kb.bind(this),this,!0);this.XR.O.bind(k.me,this.Bg.bind(this),this,!0);this.XR.O.bind(k.Ar,this.Aeb.bind(this),
this,!0);this.ub.type=p.oB};d.Ua=function(f){this.enabled=f;this.SJ()};d.kb=function(){this.SJ()};d.Bg=function(){this.setCamera(this.enabled&&this.XR.pw||null);this.bY();this.Ajb()};d.Aeb=function(){this.XR.Joa==g.cZ&&this.XR.O.o(k.Pf,{pointerState:this.ub})};d.SJ=function(){this.XR.isPresenting&&this.enabled?this.vpa():this.Qpa()};d.setCamera=function(f){this.camera!==f&&(this.camera=f,this.Cjb())};d.bY=function(){this.XR.cO.origin.copy(this.XR.Qc);this.XR.cO.direction.set(0,0,-1).applyQuaternion(this.XR.yg);
if(this.enabled){if(this.XR.fe.length!=1&&this.XR.fe[0]!==this.ub){for(;this.XR.fe.length;)this.XR.fe.pop();this.XR.fe.push(this.ub)}this.ub.matrixWorld.copy(b.compose(this.XR.Qc,this.XR.yg,c));this.ub.ray.origin.set(0,0,0);this.ub.ray.direction.set(0,0,-1)}};d.Cjb=function(){this.yf&&this.yf.ta.parent!==this.camera&&(this.yf.ta.parent&&this.yf.ta.parent.remove(this.yf.ta),this.camera.add(this.yf.ta))};d.vpa=function(){var f;this.yf||(this.yf=new h(this.ub,this.XR.Cm),(f=this.camera)===null||f===
void 0||f.add(this.yf.ta),this.controller=this.XR.Dg.xr.getController(0),this.controller.addEventListener("selectstart",this.iA),this.controller.addEventListener("selectend",this.hA))};d.Qpa=function(){this.yf&&(this.yf.dispose(),this.yf=null,this.controller.removeEventListener("selectstart",this.iA),this.controller.removeEventListener("selectend",this.hA),this.controller=null)};d.Ajb=function(){var f,n,l,q;if(this.enabled){if(this.Te=this.ub.Te)this.OOa=this.ub.XLa;var r=Date.now();if(this.XR.Joa==
g.gK){var t=this.Te?r-this.OOa:0;var u=this.XR.Cm.nMa;this.WLa<u&&t>=u&&this.XR.O.o(k.Pf,{pointerState:this.ub});this.WLa=t;(f=this.yf)===null||f===void 0||f.AJ(this.Te&&this.ub.Rq,Math.min(1,t/u))}else(t=this.yf)===null||t===void 0||t.AJ(this.ub.Rq);this.ub.Te||this.ub.Zs?this.hW=void 0:this.hW==void 0&&(f=this.XR.Cm.NHa,f!==void 0&&(this.hW=r+f));r=(this.hW!==void 0?this.hW:Infinity)-r;(n=this.yf)===null||n===void 0||n.zf(this.ub.hidden?0:Math.max(.01,Math.min(1,r/500)));(l=this.yf)===null||l===
void 0||l.vA(this.ub.Zs);(q=this.yf)===null||q===void 0||q.update()}};d.iA=function(){this.ub.pressed=!0;this.ub.VO=Date.now();this.XR.O.o(k.mu,{pointerState:this.ub})};d.hA=function(){this.ub.pressed=!1;this.XR.O.o(k.mu,{pointerState:this.ub});this.XR.O.o(k.Pf,{pointerState:this.ub})};d.ub=new p;d.enabled=!1;d.camera=null;d.yf=null;d.Te=!1;d.OOa=0;d.WLa=0;d.hW=void 0;d.controller=null;return d}();var b=new e.Matrix4,c=new e.Vector3(1,1,1);return a});
define("tdv/player/view/util/xr/pointer/VRPointer","require exports tdv/constants/EventName tdv/player/view/util/xr/pointer/PointerType tdv/player/view/util/xr/pointer/VRControllers tdv/player/view/util/xr/pointer/VRGazePointer".split(" "),function(a,m,k,p,h,g){return function(){function e(){}e.ihb=function(b){this.sMa=b};e.initialize=function(){this.XR.O.bind(k.V,this.kb.bind(this),this,!0);this.XR.O.bind(k.me,this.Bg.bind(this),this,!0);this.XR.O.bind(k.Lqa,this.heb.bind(this),this,!0);this.XR.O.bind(k.Mqa,
this.ieb.bind(this),this,!0)};e.kb=function(){this.pqa()};e.Bg=function(){};e.heb=function(){this.pqa()};e.ieb=function(){this.pqa()};e.pqa=function(){var b=this.XR.isPresenting?this.sMa===p.OP&&h.isConnected()?p.OP:p.gK:null;this.pointerType!==b&&(this.pointerType=b,h.Ua(b===p.OP),g.Ua(b===p.gK))};e.sMa=p.OP;e.pointerType=null;return e}()});
define("tdv/player/view/util/xr/VRSettings",["require","exports"],function(){return function(){return function(){this.NHa=1E3;this.N7="#ffffff";this.jMa=2;this.boa="#007acc";this.P7="#ff6600";this.nMa=1200;this.IHa=0}}()});define("tdv/view/core/ZIndex",["require","exports"],function(){return{usa:"1",ISa:"auto",pSa:"1",Rra:"2",WRa:"auto",v9:"2",Kqa:"3",FQa:"auto",esa:"5",BSa:"100",mkb:"101",jRa:999998,Pkb:999999,xRa:1E6}});
define("tdv/view/util/Assets",["require","exports"],function(){return{eo:"data:image/png;base64, ",qRa:"data:image/png;base64, ",
mSa:"data:image/png;base64, ",
YY:"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==",
zSa:"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",
F9:"data:image/png;base64, ",
ax:"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",
tK:115,SY:115,sK:"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=",
bSa:115,aSa:115,KSa:"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==",
LSa:115,Okb:117,SQa:"data:image/png;base64, ",
NSa:"data:image/png;base64, ",
uF:"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,k,p,h,g){if(g.Dc()!=g.BP){var e=document.createElement("div"),b=function(l){return!(!(l||e).requestFullscreen&&!document.exitFullscreen)&&g.Dc()!=g.$J};if(!(a=b()))try{a=window.self===window.top}catch(l){a=!1}if(a)a=function(l){function q(r){var t=l.call(this)||this;t.pa=r;t.ga=t.xda();document.addEventListener("fullscreenchange",
function(){t.Kia()});window.addEventListener("resize",function(){t.Kia()});return t}P(q,l);q.Roa=function(){};q.prototype.dl=function(){return b(this.pa)};q.prototype.o5=function(){this.enabled()||this.toggle()};q.prototype.gt=function(){this.enabled()&&this.toggle()};q.prototype.toggle=function(){this.enabled()?document.exitFullscreen():this.pa.requestFullscreen();this.Kia()};q.prototype.enabled=function(){return this.ga&&this.xda()};q.prototype.xda=function(){return this.pa===document.fullscreenElement};
q.prototype.Kia=function(){var r=this.xda();this.ga!=r&&(this.ga=r,this.o(new p(k.V)),q.O.o(k.V))};q.enabled=function(){return!!document.fullscreenElement};q.fullscreenElement=function(){return document.fullscreenElement};q.gt=function(){q.enabled()&&document.exitFullscreen()};q.O=new h;return q}(h);else{var c=!0;a=function(l){function q(r){var t=l.call(this)||this;t.pa=r;return t}P(q,l);q.Roa=function(r){c=r=="out_of_frame"};q.prototype.dl=function(){return c};q.prototype.o5=function(){this.toggle()};
q.prototype.gt=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.gt=function(){};q.O=new h;return q}(h)}}else{a=function(l){function q(r){var t=l.call(this)||this;t.pa=r;return t}P(q,l);q.prototype.dl=function(){return!0};q.prototype.o5=function(){this.enabled()||this.toggle()};q.prototype.gt=function(){this.enabled()&&this.toggle()};
q.prototype.toggle=function(){if(this.enabled())d("fullscreen"),q.Xx=null;else{q.Xx&&q.Xx.gt();d("fullscreen");var r=f();r.push("fullscreen");n(r);q.Xx=this}this.o(new p(k.V));q.O.o(k.V)};q.prototype.enabled=function(){return this==q.Xx};q.enabled=function(){return!!q.fullscreenElement()};q.fullscreenElement=function(){return q.Xx&&q.Xx.pa};q.gt=function(){q.enabled()&&q.Xx&&q.Xx.gt()};q.Roa=function(){};q.O=new h;q.Xx=null;return q}(h);var d=function(l){for(var q=f(),r=[],t=0;t<q.length;t++)q[t]!=
l&&r.push(q[t]);n(r)},f=function(){var l=window.location.hash.substring(1);return l.length?l.split("&"):[]},n=function(l){window.location.hash="#"+(l.length?l.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(p){}m=!1}if(m)a.setItem=function(p,h){window.localStorage.setItem(p,h)},a.getItem=function(p){return window.localStorage.getItem(p)},a.removeItem=function(p){return window.localStorage.removeItem(p)},a.clear=function(){try{window.localStorage.clear()}catch(p){}};
else{var k={};a.setItem=function(p,h){k[p]=h};a.getItem=function(p){return k[p]};a.removeItem=function(p){delete k[p]};a.clear=function(){k={}}}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(O,R){this.F8a=O;this.aWa=R;this.Gia=[];this.Mc=null;this.fz=!1}var k=a("tdv/utils"),p=a("tdv/player/l10n"),h=a("tdv/player/view/util/Device"),g=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;",n="",l="border-color:#b2b2b2;",q=l,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.eo+'"/>',v='<img style="width:24vmin;" src="'+b.eo+'"/>',w='<img style="width:34vmin;" src="'+b.F9+'"/>',y='<img style="width:34vmin;" src="'+b.qRa+'"/>',
x='<img style="width:24vmin;" src="'+b.mSa+'"/>';h.yb()?(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;",n+=" margin:5vmin 0;",l+="  margin:5vmin 0;",q+="  margin:3vmin 0;",t+=" height:4vmin; margin:0 1vmin 0 0; width:4vmin;"):r+=" font-size:19px; padding:17px 34px;";n+=f;m.prototype.Uba=function(){this.Mc||(this.Mc=document.createElement("div"),this.Mc.style.position="fixed",this.Mc.style.zIndex=
e.xRa,this.Mc.style.left="0",this.Mc.style.top="0",this.Mc.style.margin="0",this.Mc.style.padding="0",this.Mc.style.height="100%",this.Mc.style.width="100%",this.Mc.style.backgroundColor="rgba(255, 255, 255, 0.99)",this.Mc.innerHTML=this.aWa,this.Mc.querySelectorAll("button").forEach(O=>O.addEventListener("click",R=>this.b1a(R.currentTarget.id))))};m.prototype.Xha=function(O,R){var S={},K;for(K in R)S[K]=O.style[K];this.Gia.push({el:O,css:S});for(K in R)O.style[K]=R[K]};m.prototype.C3a=function(){for(;this.Gia.length;){var O=
this.Gia.pop(),R;for(R in O.css)O.el.style[R]=O.css[R]}};m.prototype.show=function(O,R,S){O||(O=function(){});R||(R=function(){});if(this.fz){var K=this.PZ;this.PZ=function(){K();O()};var L=this.EZ;this.EZ=function(){L();R()}}else{this.Uba();this.PZ=O;this.EZ=R;var Q=this.QYa();if(Q===void 0){this.fz=!0;Q=c.fullscreenElement()||document.body;if(S!==!0)for(S=0;S<Q.children.length;S++)this.Xha(Q.children[S],{visibility:"hidden"});else for(this.Xha(Q,{overflow:"hidden"}),S=0;S<Q.children.length;S++)this.Xha(Q.children[S],
{position:"absolute","z-index":0});Q.appendChild(this.Mc)}else this.fz=!1,Q?this.PZ():this.EZ()}};m.prototype.Pe=function(){this.fz&&(this.fz=!1,this.Mc.parentElement.removeChild(this.Mc),this.C3a())};m.prototype.QYa=function(){var O=d.getItem(this.fwa());if(O=="true")return!0;if(O=="false")return!1};m.prototype.kCa=function(O){d.setItem(this.fwa(),O?"true":"false")};m.prototype.fwa=function(){return this.F8a+"DontDisplay:"+window.location.pathname};m.prototype.b1a=function(O){var R=this.Mc.querySelector("#tdvvriw_dontdisplay");
R=R&&R.checked;this.Pe();O=="tdvvriw_continue"?(this.PZ(),R&&this.kCa(!0)):O=="tdvvriw_cancel"&&(this.EZ(),R&&this.kCa(!1))};a=k.extend(m,function(){var O=['<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="'+n+'">'+p("use-cardboard-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">'+p("use-cardboard")+"</button></div>","</div>",'<hr style="'+
l+'">',"<div>",'<div style="'+n+'">','<div style="margin-bottom:2vmin;">'+p("samsung-internet-vr-app-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_cancel">'+p("launch-default-browser")+"</button></div>","</div>",y,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+n+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+p("dont-display-again")+"</label>",
"</div>"].join("\n");m.call(this,"ChromeAppInfoWindow",O)});var z=k.extend(m,function(){var O=['<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="'+n+'">'+p("use-cardboard-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div>",'<hr style="'+l+'">',"<div>",'<div style="'+n+'">','<div style="margin-bottom:2vmin;">'+
p("samsung-internet-vr-info")+"</div>","</div>",y,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+n+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+p("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"SamsungInternetInfoWindow",O)}),A=k.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>',
y,'<div style="'+n+'">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=k.extend(m,function(){var O=['<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="'+
n+'"></div>','<div style="text-align:center;"><button style="'+r+' box-shadow:0 0 4px rgba(0, 0, 0, 0.5);" id="tdvvriw_continue">'+p("exit-vr")+"</button></div>","</div></div>"].join("\n");m.call(this,"ExternalVRDisplayVRInfoWindow",O)});D.prototype.Uba=function(){m.prototype.Uba.call(this);g.Kg("vrv")===!0&&(this.Mc.style.backgroundColor="")};var E=k.extend(m,function(){var O=h.Rb()==h.xi?window.location.protocol!="https:"&&window.location.hostname!="localhost"?"<div>"+p("giroscope-disabled-http")+
"</div>":p("giroscope-disabled-safari-request-permission").map(function(R){return"<div>"+R+"</div>"}).join("\n"):"<div>"+p("giroscope-disabled-http")+"</div>";O=['<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="'+n+'">',O,"</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; '+
n+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+p("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"GiroscopeDisabledInfoWindow",O)}),B=k.extend(m,function(){var O=['<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="'+n+'">'+p("use-cardboard-info")+
'</div><div><button style="'+r+'" id="tdvvriw_continue">'+p("use-cardboard")+"</button></div>","</div>",'<hr style="'+l+'">',"<div>",y,'<div style="'+n+'">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",O)}),C=k.extend(m,
function(){var O=['<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;">'+p("cardboard-v1")+"</div>",'<div><button style="'+r+'" id="tdvvriw_cancel">'+p("use-default-cardboard")+"</button></div>","</div>",'<hr style="'+q+'">',"<div>",'<div style="'+f+' margin-bottom:2vmin;">'+p("cardboard-v2")+"</div>",'<div><button style="'+r+
'" id="tdvvriw_continue">'+p("use-cardboard-v2")+"</button></div>",w,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+n+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+p("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"CardboardV2InfoWindow",O)}),I=k.extend(m,function(){var O=['<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="'+n+'"></div>','<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">'+p("enter-vr")+"</button></div>","</div></div>"].join("\n");m.call(this,"EnterVRInfoWindow",O)}),F=k.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="'+n+'">Preparing VR...</div>',"</div></div>"].join("\n"))}),
G=k.extend(m,function(){var O=['<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;">',x,'<div style="'+n+'">'+p("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; '+
n+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+p("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"UseSafariVRInfoWindow",O)});k=k.extend(m,function(){var O=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+b.eo+'"/>','</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.YY+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+p("rotate-device")+"</div>","</div>\n</div>"].join("\n");m.call(this,"RotateVRInfoWindow",O)});var N={};N.Fkb=new z;N.Gkb=new A;N.Yqa=new D;N.lkb=new B;N.pkb=new I;N.zkb=new F;N.xsa=new G;N.YY=new k;N.dra=new E;N.EQa=new a;N.F9=new C;return N});
define("tdv/view/constants/State",["require","exports"],function(){return{gf:void 0,fa:"over",Mb:"pressed",vc:"pressedOver",qa:"selected"}});
define("tdv/binding/Bindable",["require","exports","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a,m,k,p,h){return function(g){function e(){var b=g.call(this)||this;b.Lr={};return b}P(e,g);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 n=b[f],l=n[0];n=n[1];this.Lr[l]!==n&&(this.Lr[l]=n,c.push(l))}c.forEach(function(q){return d.dja(q)})}else this.Lr[b]!==c&&(this.Lr[b]=c,this.dja(b))};e.prototype.dja=
function(b){b=new p(k.K(b));this.o(b)};e.prototype.copy=function(b){this.Lr={};for(var c in b.Lr)this.Lr[c]=b.Lr[c];return this};e.prototype.get=function(b,c){c===void 0&&(c=void 0);b=this.Lr[b];return b!==void 0?b:c};return e}(h)});define("tdv/constants/Priority",["require","exports"],function(){return{HRa:7,v9:6,ora:5,Fp:4,gsa:3,SP:2,R$:1,ukb:0,sra:3,kF:2,dSa:1,cSa:2,ZRa:2,Ip:2,CSa:3,Nkb:4}});
define("tdv/view/constants/Cursor",["require","exports"],function(){return function(){function a(){}a.aB="grab";a.Ai="grabbing";a.wra="move";a.Gra="move-n";a.Hra="move-ne";a.xra="move-e";a.Kra="move-se";a.Jra="move-s";a.Lra="move-sw";a.Mra="move-w";a.Ira="move-nw";a.NRa="move-ew";a.PRa="move-ns";a.ORa="move-nesw";a.QRa="move-nwse";a.zra="move-fast-n";a.Ara="move-fast-ne";a.yra="move-fast-e";a.Dra="move-fast-se";a.Cra="move-fast-s";a.Era="move-fast-sw";a.Fra="move-fast-w";a.Bra="move-fast-nw";a.hf=
"hand";a.uF="transparent";a.gf="default";a.dB="inherit";return a}()});define("tdv/view/constants/GradientDirection",["require","exports"],function(){return{MY:"horizontal",caa:"vertical"}});
define("tdv/view/core/visualprops/UIBaseVisualProperties",["require","exports","tdv/view/constants/GradientDirection"],function(a,m,k){return function(){return function(){this.backgroundColor=this.BN=this.ariaLabel=void 0;this.lk=[];this.O4=void 0;this.jD=k.caa;this.Ev=null;this.hm=1;this.sf=this.tf=this.Oe=this.Ne=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.Kc=this.height=0;this.XI=!0;this.offsetY=this.offsetX=0;this.opacity=1;this.RW=this.lw=!0;this.paddingTop=this.paddingRight=this.paddingLeft=this.paddingBottom=0;this.CA=!1;this.Rt=0;this.St=4;this.Xn=6;this.GJ=0;this.shadowColor="#000000";this.Cw=1;this.tabIndex=void 0;this.ge=this.ze=this.Bd=this.Af=this.Lc=0;this.visible=!1;this.width=0;this.y=this.x=void 0}}()});
define("tdv/view/images/fliputil",["require","exports"],function(){return{ycb:function(a){return!!a&&a.indexOf("&tdvflipx")>=0},mFa:function(a){a&&(a.indexOf("#")<0&&(a+="#"),a+="&tdvflipx");return a},Lab:function(a,m,k){var p=document.createElement("canvas");p.width=m;p.height=k;k=p.getContext("2d");k.translate(m,0);k.scale(-1,1);k.drawImage(a,0,0);a.src=p.toDataURL()}}});
define("tdv/util/LoadRequest",["require","exports"],function(){return function(){function a(m,k,p,h,g,e){this.moa=m;this.url=k;this.priority=p;this.time=h;this.$hb=g;this.O9a=e}a.prototype.loaded=function(){this.moa.AX(this.url);this.moa.remove(this)};a.prototype.cancel=function(){this.moa.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,k,p,h,g){var e=k.Dc()===k.SA,b=!(p.tk("debug")&&p.Kg("disable-cache"));return function(){function c(){}c.add=function(d,f,n,l){d=new g(this,d,f,(new Date).getTime(),n,l);this.Vy.push(d);this.ya();return d};c.oib=function(d){this.aN.push(d);this.ya()};c.nib=function(d){d=this.aN.indexOf(d);d>=0&&this.aN.splice(d,1);this.ya()};c.ckb=function(d){var f;
return e?!0:b?(f=this.Mxa[d])!==null&&f!==void 0?f:!1:!1};c.AX=function(d){e||b&&(this.Mxa[d]=!0)};c.ya=function(){this.Sja||(this.Sja=h.iE(c.x7a.bind(this)))};c.x7a=function(){this.Sja=null;for(var d=this.N3a(),f=0,n=this.OL;f<n.length;f++){var l=n[f];d.includes(l)||l.O9a()}f=this.OL;this.OL=d;d=0;for(n=this.OL;d<n.length;d++)l=n[d],f.includes(l)||l.$hb()};c.I5a=function(){this.Vy.sort(function(d,f){return d.priority-f.priority||f.time-d.time});this.aN.sort(function(d,f){return d-f})};c.N3a=function(){this.I5a();
var d=[];if(this.Vy.length)for(var f=this.aN.length?this.aN[0]:this.Vy[0].priority,n=0;n<10&&n<this.Vy.length&&this.Vy[n].priority<=f;n++)d.push(this.Vy[n]);return d};c.remove=function(d){var f=this.Vy.indexOf(d);f>=0&&this.Vy.splice(f,1);f=this.OL.indexOf(d);f>=0&&this.OL.splice(f,1);this.ya()};c.Vy=[];c.OL=[];c.aN=[];c.Sja=null;c.Mxa={};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,k,p,h,g,e,b,c){var d=0;return function(f){function n(l){var q=f.call(this)||this;q.le=null;q.Id=null;q.Pa=null;q.Ga=null;q.lC=!1;q.Up=null;q.HM=null;q.K2=0;q.pea=[];q.FG=d++;q.W_=q.W_.bind(q);q.X_=q.X_.bind(q);q.dv=l||g.HRa;return q}P(n,f);n.prototype.load=function(l){this.cancel();
this.le=l;this.K2=0;this.EBa()};n.prototype.EBa=function(){this.Up=c.add(this.le,this.dv,this.R5a.bind(this),this.qVa.bind(this))};n.prototype.cancel=function(){this.Up&&(this.Up.cancel(),this.Up=null);this.jua();this.le=null};n.prototype.rdb=function(){return!!this.Id&&!this.lC||!!this.HM};n.prototype.aj=function(){return this.lC};n.prototype.qg=function(l){return l?(l=this.Id.cloneNode(!0),this.pea.push(l),l):this.Id};n.prototype.Zf=function(){return this.Pa};n.prototype.pg=function(){return this.Ga};
n.prototype.hl=function(){return this.le};n.prototype.R5a=function(){this.Id=this.DWa(this.le)};n.prototype.qVa=function(){this.rdb()&&this.jua()};n.prototype.jua=function(){if(this.Id){this.HM&&(clearTimeout(this.HM),this.HM=null);for(this.lC=!1;this.pea.length;)this.dva(this.pea.shift());this.dva(this.Id);this.Id=null}};n.prototype.yTa=function(l){l.addEventListener("load",this.W_);l.addEventListener("error",this.X_)};n.prototype.xBa=function(l){l.removeEventListener("load",this.W_);l.removeEventListener("error",
this.X_)};n.prototype.W_=function(){this.Id.width&&this.Id.height||!(this.le.indexOf(".svg")>-1)||this.VXa();this.Up.loaded();this.Up=null;this.xBa(this.Id);this.lC=!0;this.Pa=this.Id.width;this.Ga=this.Id.height;b.ycb(this.le)&&b.Lab(this.Id,this.Pa,this.Ga);this.o(new k(h.ha))};n.prototype.X_=function(){var l=this;if(this.le){var q=this.le;this.cancel();this.le=q;this.K2<5?(this.K2++,this.HM=setTimeout(function(){l.HM=null;l.EBa()},Math.pow(2,this.K2)*1E3)):this.o(new k(h.$c))}};n.prototype.VXa=
function(){var l=new XMLHttpRequest;l.open("GET",this.le,!1);l.send();var q=document.createElement("div");q.innerHTML=l.responseText;l=q.children[0];this.Id.width=l.width.baseVal.value;this.Id.height=l.height.baseVal.value};n.prototype.DWa=function(l){var q=document.createElement("img");e.Lma(l)?q.setAttribute("crossOrigin","Anonymous"):q.removeAttribute("crossOrigin");q.setAttribute("draggable","false");q.style.position="static";q.style.border="none";q.style.display="none";this.yTa(q);q.src=l;return q};
n.prototype.dva=function(l){this.xBa(l);l.parentNode&&l.parentNode.removeChild(l);l.src=""};n.W8=function(l){return c.ckb(l)};return n}(p)});
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,k,p,h,g,e,b,c){function d(n){if(n!==void 0)return typeof n==="string"?parseInt(n):n}function f(n){if(n!==void 0)return typeof n==="string"?parseFloat(n):n}return function(n){function l(){var q=n.call(this)||this;q.FG=l.FG++;q.u=q.aL();q.u.id=
q.FG;q.Fea=!1;q.Fb=null;q.Ha=null;q.xB=null;q.sZ=void 0;q.Hi=e.gf;q.my=!1;q.Go=!0;q.$m=0;q.Zm=0;q.VR=0;q.UR=0;q.yJ(!0);q.eia(!0);return q}P(l,n);l.prototype.aL=function(){return new b};l.prototype.cf=function(q){this.UK=q};l.prototype.Pz=function(){return this.UK};l.prototype.Wb=function(){return this.Fb};l.prototype.wa=function(){if(!this.v4)throw Error("Visuals not initialized");return this.v4};l.prototype.gIa=function(){if(!this.DL)throw Error("Input event manager not initialized");return this.DL};
l.prototype.z6=function(q,r){return this.jI||this.vR?this.jI===q&&this.vR===r:!0};l.prototype.Wn=function(q,r,t,u){this.Fb&&this.oD();this.Fb=q;if(!this.z6(r,t))throw Error("Component visuals already created for a different rendering type");this.v4||(this.jI=r,this.v4=r.create(this));this.DL||(this.vR=t,this.DL=t.create(this,u));this.uR();this.sz();this.BU();this.o(p.AQa)};l.prototype.oD=function(){this.Fea=!1;this.Fb=null;this.sz()};l.prototype.opa=function(q){q=q||this.UK;this.u.className!==q&&
(this.u.className=q,this.rb())};l.prototype.Mfb=function(){this.opa()};l.prototype.getParent=function(){return this.Ha};l.prototype.Sv=function(){return this.u.x||0};l.prototype.Oz=function(){return this.u.y||0};l.prototype.cb=function(){return this.u.width};l.prototype.Kb=function(){return this.u.height};l.prototype.ucb=function(){return this.u.width!==void 0&&this.u.height!==void 0};l.prototype.Ph=function(){return this.u.width-this.u.Bd-this.u.ze};l.prototype.Oh=function(){return this.u.height-
this.u.ge-this.u.Af};l.prototype.cg=function(q){this.u.visible!=q&&(this.u.visible=q,this.Ff(),this.Ha&&(this.Ha.jc(),this.Ha.wf()),this.sz())};l.prototype.sz=function(){var q=!1;this.Fb&&this.u.visible&&this.Uv()>0&&(q=!this.Ha||this.Ha.my);this.my!=q&&this.Vaa(q)};l.prototype.Vaa=function(q){this.my=q;this.set("inView",q);this.my?this.o(new g(p.Cd)):this.o(new g(p.sd))};l.prototype.R4a=function(q){this.Go!=q&&(this.Go=q,this.Ha&&this.Ha.wf())};l.prototype.B4a=function(q){q=d(q);this.pL!=q&&(this.pL=
q,this.jc())};l.prototype.A4a=function(q){q=d(q);this.oL!=q&&(this.oL=q,this.jc())};l.prototype.z4a=function(q){q=d(q);this.nL!=q&&(this.nL=q,this.jc())};l.prototype.y4a=function(q){q=d(q);this.mL!=q&&(this.mL=q,this.jc())};l.prototype.C4a=function(q){q=d(q);this.Co!=q&&(this.Co=q,this.Co!==void 0&&(this.Zo=void 0),this.jc())};l.prototype.x4a=function(q){q=d(q);this.oG!=q&&(this.oG=q,this.oG!==void 0&&(this.Yo=void 0),this.jc())};l.prototype.d5a=function(q){q=f(q);this.Zo!=q&&(this.Zo=q,this.Zo!==
void 0&&(this.Co=void 0),this.jc())};l.prototype.$4a=function(q){q=f(q);this.Yo!=q&&(this.Yo=q,this.Yo!==void 0&&(this.oG=void 0),this.jc())};l.prototype.U4a=function(q){q=d(q);this.sy!=q&&(q!==void 0&&(this.c2=void 0),this.sy=q,this.Ha&&this.Ha.wf(),this.jc())};l.prototype.u5a=function(q){q=d(q);this.Ns!=q&&(q!==void 0&&(this.e2=void 0),this.Ns=q,this.Ha&&this.Ha.wf(),this.jc())};l.prototype.f5a=function(q){q=d(q);this.DT!=q&&(q!==void 0&&(this.d2=void 0),this.DT=q,this.Ha&&this.Ha.wf(),this.jc())};
l.prototype.m4a=function(q){q=d(q);this.mQ!=q&&(q!==void 0&&(this.b2=void 0),this.mQ=q,this.Ha&&this.Ha.wf(),this.jc())};l.prototype.a5a=function(q){q=f(q);this.c2!=q&&(q!==void 0&&(this.sy=void 0),this.c2=q,this.Ha&&this.Ha.wf(),this.jc())};l.prototype.c5a=function(q){q=f(q);this.e2!=q&&(q!==void 0&&(this.Ns=void 0),this.e2=q,this.Ha&&this.Ha.wf(),this.jc())};l.prototype.b5a=function(q){q=f(q);this.d2!=q&&(q!==void 0&&(this.DT=void 0),this.d2=q,this.Ha&&this.Ha.wf(),this.jc())};l.prototype.Z4a=function(q){q=
f(q);this.b2!=q&&(q!==void 0&&(this.mQ=void 0),this.b2=q,this.Ha&&this.Ha.wf(),this.jc())};l.prototype.q4a=function(q){q=f(q);this.FB!=q&&(this.FB=q,this.Ha&&this.Ha.wf())};l.prototype.r4a=function(q){q=f(q);this.GB!=q&&(this.GB=q,this.Ha&&this.Ha.wf())};l.prototype.Xv=function(){return isNaN(this.Co)?this.$m:this.Co};l.prototype.Wv=function(){return isNaN(this.oG)?this.Zm:this.oG};l.prototype.BZa=function(){return isNaN(this.OXa)?this.Vxa:this.OXa};l.prototype.Tv=function(){return isNaN(this.pL)?
this.VR:this.pL};l.prototype.Rz=function(){return isNaN(this.oL)?this.UR:this.oL};l.prototype.Z5=function(){return isNaN(this.nL)?1E4:this.nL};l.prototype.Y5=function(){return isNaN(this.mL)?1E4:this.mL};l.prototype.zCa=function(q){this.u.paddingLeft!=q&&(this.u.paddingLeft=q,this.u.Bd=this.u.paddingLeft+this.u.Ne,this.jc(),this.rb())};l.prototype.zwa=function(){return this.u.paddingLeft};l.prototype.BCa=function(q){this.u.paddingTop!=q&&(this.u.paddingTop=q,this.u.ge=this.u.paddingTop+this.u.Oe,
this.jc(),this.rb())};l.prototype.Bwa=function(){return this.u.paddingTop};l.prototype.ACa=function(q){this.u.paddingRight!=q&&(this.u.paddingRight=q,this.u.ze=this.u.paddingRight+this.u.tf,this.jc(),this.rb())};l.prototype.Awa=function(){return this.u.paddingRight};l.prototype.yCa=function(q){this.u.paddingBottom!=q&&(this.u.paddingBottom=q,this.u.Af=this.u.paddingBottom+this.u.sf,this.jc(),this.rb())};l.prototype.ywa=function(){return this.u.paddingBottom};l.prototype.PM=function(q){this.u.lw!=
q&&(this.u.lw=q,this.rb())};l.prototype.P4a=function(q){this.u.Kc!=q&&(this.u.Kc=q,this.rb())};l.prototype.A5a=function(q){this.u.Lc!=q&&(this.u.Lc=q,this.rb())};l.prototype.EX=function(q){if(this.u.offsetX!=q){var r=this.u.offsetX==0!=(q==0);this.u.offsetX=q;this.rb();r&&this.Ha&&this.Ha.wf()}};l.prototype.uIa=function(){return this.u.offsetX};l.prototype.FX=function(q){if(this.u.offsetY!=q){var r=this.u.offsetY==0!=(q==0);this.u.offsetY=q;this.rb();r&&this.Ha&&this.Ha.wf()}};l.prototype.vIa=function(){return this.u.offsetY};
l.prototype.Dcb=function(){return this.u.offsetX!=0||this.u.offsetY!=0};l.prototype.Sn=function(q){this.u.opacity!=q&&(this.u.opacity=q,this.sz(),this.rb())};l.prototype.Uv=function(){return this.u.opacity};l.prototype.j4a=function(q){this.u.borderTopLeftRadius!=q&&(this.u.borderTopLeftRadius=q,this.rb())};l.prototype.k4a=function(q){this.u.borderTopRightRadius!=q&&(this.u.borderTopRightRadius=q,this.rb())};l.prototype.b4a=function(q){this.u.borderBottomLeftRadius!=q&&(this.u.borderBottomLeftRadius=
q,this.rb())};l.prototype.c4a=function(q){this.u.borderBottomRightRadius!=q&&(this.u.borderBottomRightRadius=q,this.rb())};l.prototype.f4a=function(q){this.u.Ne!=q&&(this.u.Ne=q,this.u.Bd=this.u.paddingLeft+this.u.Ne,this.jc(),this.rb())};l.prototype.l4a=function(q){this.u.Oe!=q&&(this.u.Oe=q,this.u.ge=this.u.paddingTop+this.u.Oe,this.jc(),this.rb())};l.prototype.h4a=function(q){this.u.tf!=q&&(this.u.tf=q,this.u.ze=this.u.paddingRight+this.u.tf,this.jc(),this.rb())};l.prototype.d4a=function(q){this.u.sf!=
q&&(this.u.sf=q,this.u.Af=this.u.paddingBottom+this.u.sf,this.jc(),this.rb())};l.prototype.e4a=function(q){this.u.borderLeftColor!=q&&(this.u.borderLeftColor=q,this.rb())};l.prototype.i4a=function(q){this.u.borderTopColor!=q&&(this.u.borderTopColor=q,this.rb())};l.prototype.g4a=function(q){this.u.borderRightColor!=q&&(this.u.borderRightColor=q,this.rb())};l.prototype.a4a=function(q){this.u.borderBottomColor!=q&&(this.u.borderBottomColor=q,this.rb())};l.prototype.j3=function(q){this.u.CA!=q&&(this.u.CA=
q,this.rb())};l.prototype.l5a=function(q){this.u.Rt!=q&&(this.u.Rt=q,this.rb())};l.prototype.o5a=function(q){this.u.St!=q&&(this.u.St=q,this.rb())};l.prototype.j5a=function(q){this.u.Xn!=q&&(this.u.Xn=q,this.rb())};l.prototype.n5a=function(q){this.u.GJ!=q&&(this.u.GJ=q,this.rb())};l.prototype.m5a=function(q){this.u.Cw!=q&&(this.u.Cw=q,this.rb())};l.prototype.k5a=function(q){this.u.shadowColor!=q&&(this.u.shadowColor=q,this.rb())};l.prototype.fCa=function(q){this.u.hm!=q&&(this.u.hm=q,this.rb())};
l.prototype.eCa=function(q){this.u.backgroundColor!==q&&(this.u.backgroundColor=q,q===void 0?q=[]:Array.isArray(q)||(q=[q]),this.W3a(q))};l.prototype.W3a=function(q){this.u.lk!==q&&(this.u.lk=q,this.rb())};l.prototype.V3a=function(q){this.u.O4!==q&&(this.u.O4=q,this.rb())};l.prototype.U3a=function(q){this.u.jD!=q&&(this.u.jD=q,this.rb())};l.prototype.X3a=function(q){if(this.sZ!=q){this.xB&&(this.xB.h(p.ha,this.Hta,this),this.xB.cancel(),this.xB=null,this.u.Ev=null);if(this.sZ=q)this.xB=new c(h.gsa),
this.xB.bind(p.ha,this.Hta,this,!1),this.xB.load(this.sZ);this.rb()}};l.prototype.Hta=function(){this.u.Ev=this.xB.qg();this.rb()};l.prototype.RC=function(q){this.Hi!=q&&(this.Hi=q,this.BU())};l.prototype.BU=function(){var q=this.Fb&&this.Fb.kca.QHa(this.Hi)||"inherit";this.u.cursor!=q&&(this.u.cursor=q,this.rb())};l.prototype.r5a=function(q){this.u.tabIndex!==q&&(this.u.tabIndex=q,this.rb())};l.prototype.S3a=function(q){this.u.ariaLabel!=q&&(this.u.ariaLabel=q,this.rb())};l.prototype.T3a=function(q){this.u.BN!=
q&&(this.u.BN=q,this.rb())};l.prototype.yJ=function(q){this.u.XI!=q&&(this.u.XI=q,this.rb())};l.prototype.eia=function(q){this.u.RW!=q&&(this.u.RW=q,this.rb())};l.prototype.Ir=function(){this.sz();this.kW()};l.prototype.ap=function(){this.sz()};l.prototype.Cha=function(){};l.prototype.uR=function(){this.kW();this.Ff();this.jc();this.wf();this.rb()};l.prototype.xy=function(){this.UR=this.VR=this.Zm=this.$m=0;this.Vxa=void 0};l.prototype.kW=function(){var q=this.Wb();q&&q.LL.kW(this)};l.prototype.Ff=
function(){var q=this.Wb();q&&q.LL.Ff(this)};l.prototype.jc=function(){var q=this.Wb();q&&q.LL.jc(this)};l.prototype.wf=function(){var q=this.Wb();q&&q.LL.wf(this)};l.prototype.rb=function(){var q=this.Wb();q&&q.LL.rb(this)};l.prototype.Wda=function(){var q=isNaN(this.c2)&&isNaN(this.sy),r=isNaN(this.d2)&&isNaN(this.DT);return isNaN(this.Co)&&isNaN(this.Zo)&&(q||r)?!0:!1};l.prototype.Twa=function(){var q=isNaN(this.e2)&&isNaN(this.Ns),r=isNaN(this.b2)&&isNaN(this.mQ);return isNaN(this.oG)&&isNaN(this.Yo)&&
(q||r)?!0:!1};l.prototype.Z7a=function(){this.xy();var q=this.BZa();if(q){var r=this.Wda(),t=this.Twa();r&&!t?(r=this.Oh(),r!=0&&(this.$m=r*q+this.u.Bd+this.u.ze,this.Zm=r+this.u.ge+this.u.Af)):!r&&t&&(r=this.Ph(),r!=0&&(this.Zm=r/q+this.u.Bd+this.u.ze,this.$m=r+this.u.Bd+this.u.ze))}!isNaN(this.pL)&&this.$m<this.pL&&(this.$m=this.pL);!isNaN(this.nL)&&this.$m>this.nL&&(this.$m=this.nL);!isNaN(this.oL)&&this.Zm<this.oL&&(this.Zm=this.oL);!isNaN(this.mL)&&this.Zm>this.mL&&(this.Zm=this.mL)};l.prototype.Ib=
function(){};l.prototype.rjb=function(){this.Z7a();var q=this.Xv(),r=this.Wv(),t=this.Tv(),u=this.Rz();return q!=this.V0a||r!=this.U0a||t!=this.R0a||u!=this.Q0a||this.Zo!=this.T0a||this.Yo!=this.S0a?(this.V0a=q,this.U0a=r,this.R0a=t,this.Q0a=u,this.T0a=this.Zo,this.S0a=this.Yo,!0):!1};l.prototype.eb=function(){this.rb()};l.prototype.Ck=function(){};l.prototype.xNa=function(q,r,t,u){if(this.u.x!=q||this.u.y!=r||this.u.width!=t||this.u.height!=u)this.u.x=q,this.u.y=r,this.u.width=t,this.u.height=u,
this.wf(),this.rb(),this.o(new g(p.Yb))};l.prototype.Zt=function(){!this.Fea&&this.Fb&&(this.Fea=!0,this.Fb.Vma()?this.CL():this.Fb.bind(p.Gp,this.CL,this,!0))};l.prototype.CL=function(){this.o(p.INIT)};l.FG=0;return l}(k)});
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,k,p,h,g){return function(e){function b(){var c=e.call(this)||this;c.j0=!1;c.ny=!1;c.i0=!1;c.B={};c.Kva=void 0;c.Uy=void 0;c.IC={};c.Hva=!0;c.aDa={};c.bXa();c.Nb();c.cf("UICustomizable");c.Ff();c.set("inView",!1);c.set("toolTip",void 0);return c}P(b,e);b.prototype.bXa=function(){this.aDa[h.vc]=h.Mb};b.prototype.Nb=function(){this.zl(b.ad)};
b.prototype.zl=function(c){for(var d in c){var f=c[d],n=f&&f.length;n&&typeof f!="string"?n==1?this.j(d,f[0]):n==2?this.D(d,f[0],f[1]):n==3&&this.D(d,f[0],f[1],f[2]):this.j(d,f)}};b.prototype.j=function(c,d){this.B[c]={i:!0,d}};b.prototype.GZa=function(){var c=[],d;for(d in this.B)c.push(d);return c};b.prototype.PT=function(c){this.ny!=c&&(this.ny=c,this.$g())};b.prototype.QM=function(c){this.i0!=c&&(this.i0=c,this.$g())};b.prototype.FCa=function(c){this.j0!=c&&(this.j0=c,this.$g())};b.prototype.$g=
function(){this.ny?this.RM(h.qa):this.i0&&this.j0?this.RM(h.vc):this.i0?this.RM(h.Mb):this.j0?this.RM(h.fa):this.RM(h.gf)};b.prototype.D=function(c,d,f,n){this.IC[d]||(this.IC[d]={});this.j(c,n);this.IC[d][f]=c};b.prototype.RM=function(c,d){d===void 0&&(d=!1);if(d)this.Kva=c;else if(this.Kva!=void 0)return;if(this.Uy!=c){if(d=this.IC[this.Uy])for(var f in d)(this.B[f]||(this.B[f]={})).i=!0;this.Uy=c;if(d=this.IC[this.Uy])for(f in d)(this.B[f]||(this.B[f]={})).i=!0;this.Ff()}};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.B[c];f?(d==void 0&&(d=f.d),this.get(c)!==d&&(c=="state"&&this.RM(d,!0),e.prototype.set.call(this,c,d),f.i=!0,this.Ff())):e.prototype.set.call(this,c,d)};b.prototype.get=function(c,d){switch(c){case "actualWidth":return this.cb();case "actualHeight":return this.Kb();default:var f=e.prototype.get.call(this,c);f===void 0&&((c=this.B[c])&&(f=c.d),f===void 0&&(f=d));return f}};b.prototype.Paa=
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.B[c]||{}).i?!0:this.Uy!==void 0?(c=this.IC[this.Uy][c],!!(this.B[c]||{}).i):!1};b.prototype.TC=function(c){(this.B[c]||(this.B[c]={})).i=!0;this.Ff()};b.prototype.$=function(c){(this.B[c]||(this.B[c]={})).i=!1;this.Uy!=void 0&&(c=this.IC[this.Uy][c])&&((this.B[c]||(this.B[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],n=this.Uy;n;){if(d=this.IC[n][f])if(d=this.get(d),d!=void 0&&d!=null)return d;n=this.aDa[n]}d=this.get(f);if(d!=void 0&&d!=null)return d}};b.prototype.pia=function(c){c.source.h(k.Qb,this.pia,this);this.o(new p(k.VP))};b.prototype.hea=function(c){c.source.h(k.Qb,this.hea,this);this.o(new p(k.kK))};b.prototype.xx=function(){return this.get("ariaLabel")||this.get("toolTip")};b.prototype.eb=function(){if(this.Hva)this.Hva=!1;else if(this.S("visible")){var c=this.G("visible"),d=this.get(c?
"hideEffect":"showEffect");d&&d.sO(this)&&(d.h(k.Qb,c?this.hea:this.pia,this),d.end());(d=this.get(c?"showEffect":"hideEffect"))?d.sO(this)||(this.$("visible"),d.bind(k.Qb,c?this.pia:this.hea,this),d.play(this)):this.o(new p(c?k.VP:k.kK))}this.S("visible")&&(this.cg(this.G("visible")),this.$("visible"));this.S("includeInLayout")&&(this.R4a(this.G("includeInLayout")),this.$("includeInLayout"));this.S("left")&&(d=this.G("left"),c=b.pp(d),d=c===void 0?d:void 0,this.a5a(c),this.U4a(d),this.$("left"));
this.S("top")&&(d=this.G("top"),c=b.pp(d),d=c===void 0?d:void 0,this.c5a(c),this.u5a(d),this.$("top"));this.S("right")&&(d=this.G("right"),c=b.pp(d),d=c===void 0?d:void 0,this.b5a(c),this.f5a(d),this.$("right"));this.S("bottom")&&(d=this.G("bottom"),c=b.pp(d),d=c===void 0?d:void 0,this.Z4a(c),this.m4a(d),this.$("bottom"));this.S("centerX")&&(this.q4a(this.G("centerX")),this.$("centerX"));this.S("centerY")&&(this.r4a(this.G("centerY")),this.$("centerY"));this.S("width")&&(d=this.G("width"),c=b.pp(d),
d=c===void 0?d:void 0,this.d5a(c),this.C4a(d),this.$("width"));this.S("height")&&(d=this.G("height"),c=b.pp(d),d=c===void 0?d:void 0,this.$4a(c),this.x4a(d),this.$("height"));this.S("minWidth")&&(d=this.G("minWidth"),this.B4a(d),this.$("minWidth"));this.S("minHeight")&&(d=this.G("minHeight"),this.A4a(d),this.$("minHeight"));this.S("maxWidth")&&(d=this.G("maxWidth"),this.z4a(d),this.$("maxWidth"));this.S("maxHeight")&&(d=this.G("maxHeight"),this.y4a(d),this.$("maxHeight"));this.S("paddingLeft")&&(this.zCa(this.G("paddingLeft")),
this.$("paddingLeft"));this.S("paddingTop")&&(this.BCa(this.G("paddingTop")),this.$("paddingTop"));this.S("paddingRight")&&(this.ACa(this.G("paddingRight")),this.$("paddingRight"));this.S("paddingBottom")&&(this.yCa(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 n=!1;this.S("borderRightRadius")&&(this.$("borderRightRadius"),
n=!0);var l=!1;this.S("borderBottomRadius")&&(this.$("borderBottomRadius"),l=!0);if(this.S("borderTopLeftRadius")||f||d||c)this.j4a(this.G("borderTopLeftRadius","borderLeftRadius","borderTopRadius","borderRadius")),this.$("borderTopLeftRadius");if(this.S("borderTopRightRadius")||f||n||c)this.k4a(this.G("borderTopRightRadius","borderRightRadius","borderTopRadius","borderRadius")),this.$("borderTopRightRadius");if(this.S("borderBottomLeftRadius")||l||d||c)this.b4a(this.G("borderBottomLeftRadius","borderLeftRadius",
"borderBottomRadius","borderRadius")),this.$("borderBottomLeftRadius");if(this.S("borderBottomRightRadius")||l||n||c)this.c4a(this.G("borderBottomRightRadius","borderRightRadius","borderBottomRadius","borderRadius")),this.$("borderBottomRightRadius");c=!1;this.S("borderSize")&&(this.$("borderSize"),c=!0);if(this.S("borderLeftSize")||c)this.f4a(this.G("borderLeftSize","borderSize")),this.$("borderLeftSize");if(this.S("borderTopSize")||c)this.l4a(this.G("borderTopSize","borderSize")),this.$("borderTopSize");
if(this.S("borderRightSize")||c)this.h4a(this.G("borderRightSize","borderSize")),this.$("borderRightSize");if(this.S("borderBottomSize")||c)this.d4a(this.G("borderBottomSize","borderSize")),this.$("borderBottomSize");c=!1;this.S("borderColor")&&(this.$("borderColor"),c=!0);if(this.S("borderLeftColor")||c)this.e4a(this.G("borderLeftColor","borderColor")),this.$("borderLeftColor");if(this.S("borderTopColor")||c)this.i4a(this.G("borderTopColor","borderColor")),this.$("borderTopColor");if(this.S("borderRightColor")||
c)this.g4a(this.G("borderRightColor","borderColor")),this.$("borderRightColor");if(this.S("borderBottomColor")||c)this.a4a(this.G("borderBottomColor","borderColor")),this.$("borderBottomColor");this.S("shadow")&&(this.j3(this.G("shadow")),this.$("shadow"));this.S("shadowHorizontalLength")&&(this.l5a(this.G("shadowHorizontalLength")),this.$("shadowHorizontalLength"));this.S("shadowVerticalLength")&&(this.o5a(this.G("shadowVerticalLength")),this.$("shadowVerticalLength"));this.S("shadowBlurRadius")&&
(this.j5a(this.G("shadowBlurRadius")),this.$("shadowBlurRadius"));this.S("shadowSpread")&&(this.n5a(this.G("shadowSpread")),this.$("shadowSpread"));this.S("shadowColor")&&(this.k5a(this.G("shadowColor")),this.$("shadowColor"));this.S("tabIndex")&&(this.r5a(this.G("tabIndex")),this.$("tabIndex"));c=!1;this.S("opacity")&&(this.Sn(this.G("opacity")),this.$("opacity"),c=!0);if(this.S("shadowOpacity")||c)this.m5a(this.G("shadowOpacity","opacity")),this.$("shadowOpacity");this.S("backgroundOpacity")&&(this.fCa(this.G("backgroundOpacity")),
this.$("backgroundOpacity"));this.S("backgroundColor")&&(this.eCa(this.G("backgroundColor")),this.$("backgroundColor"));this.S("backgroundColorRatios")&&(this.V3a(this.G("backgroundColorRatios")),this.$("backgroundColorRatios"));this.S("backgroundColorDirection")&&(this.U3a(this.G("backgroundColorDirection")),this.$("backgroundColorDirection"));this.S("backgroundImageUrl")&&(this.X3a(this.G("backgroundImageUrl")),this.$("backgroundImageUrl"));this.S("ariaRole")&&(this.T3a(this.G("ariaRole")),this.$("ariaRole"));
this.S3a(this.xx());e.prototype.eb.call(this)};b.pp=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,backgroundOpacity:1,backgroundColor:void 0,backgroundColorRatios:void 0,backgroundColorDirection:void 0,backgroundImageUrl:void 0,hideEffect:void 0,showEffect:void 0};return b}(g)});
define("tdv/view/core/UIComponent",["require","exports","tdv/constants/EventName","tdv/view/constants/State","tdv/view/core/UICustomizable"],function(a,m,k,p,h){return function(g){function e(){var b=g.call(this)||this;b.cf("UIComponent");b.set("propagateClick",!0);return b}P(e,g);e.prototype.Nb=function(){this.zl(e.ad)};e.prototype.Gta=function(){this.FCa(!0)};e.prototype.Fta=function(){this.FCa(!1)};e.prototype.Dta=function(){this.QM(!0)};e.prototype.Eta=function(){this.QM(!1)};e.prototype.uR=function(){this.TC("interactionEnabled");
g.prototype.uR.call(this)};e.prototype.eb=function(){this.S("autoRolledOver")&&(this.h(k.rc,this.Gta,this),this.h(k.Db,this.Fta,this),this.G("autoRolledOver")&&(this.bind(k.rc,this.Gta,this,!1),this.bind(k.Db,this.Fta,this,!1)),this.$("autoRolledOver"));this.S("autoPressed")&&(this.h(k.Ra,this.Dta,this),this.h(k.bb,this.Eta,this),this.G("autoPressed")&&(this.bind(k.Ra,this.Dta,this,!1),this.bind(k.bb,this.Eta,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);h.prototype.eb.call(this);if(b){var c=!!(this.u.hm>0&&this.u.lk.length>0),d=this.G("contentOpaque"),f=this.G("inheritedInteractionEnabled"),n=this.G("interactionEnabled"),l=this.G("inView");this.KH(f&&n&&(d||c)&&l)}if(b||this.S("cursor")||this.S("inheritedCursor"))this.$("cursor"),
this.$("inheritedCursor"),this.DL.iIa()?this.RC(this.G("cursor")):this.RC(this.G("inheritedCursor"))};e.prototype.Zt=function(){this.v4.update(this.u);g.prototype.Zt.call(this)};e.prototype.KH=function(b){this.DL.MNa(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.Lr}))}else console.log(this.Lr)};e.ad=Object.assign({},h.ad,{autoRolledOver:!1,autoPressed:!1,contentOpaque:!0,cursor:void 0,inView:void 0,inheritedCursor:void 0,
inheritedInteractionEnabled:!0,interactionEnabled:!0,rollOverOpacity:[p.fa,"opacity"],rollOverShadow:[p.fa,"shadow"],toolTipFollowMouse:!1});return e}(h)});
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"),k=a("tdv/binding/Bindable");a("tdv/constants/EventName");var p=a("tdv/events/Event"),h=a("tdv/view/util/Animation"),g=a("tdv/view/util/Ease"),e=a("tdv/view/util/EaseDimension"),b={},c=m.extend(k,function(){k.call(this);this.H="stopped";this.Zb=void 0;this.vq=[];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.sO(d)||(this.H=="stopped"||this.vq.indexOf(d)<0?(this.H="playing",this.vq.push(d),this.Ug=0,this.Zb=Math.max(this.get("duration",1E3),1),this.Tg=new g(this.get("easing","linear"),[new e("pos",0,1)],this.Zb),this.Tg.setTime(this.Ug),this.UM(),this.ez(),this.nT()):this.H="playing")};c.prototype.reverse=function(d){d||(d=b);this.Ddb(d)||(this.H=="stopped"||this.vq.indexOf(d)<
0?(this.H="playingReverse",this.vq.push(d),this.Ug=this.Zb=Math.max(this.get("duration",1E3),0),this.Tg=new g(this.get("easing","linear"),[new e("pos",0,1)],this.Zb),this.Tg.setTime(this.Ug),this.UM(),this.ez(),this.nT()):this.H="playingReverse")};c.prototype.stop=function(){this.H!="stopped"&&(this.H="stopped",this.Ug!==0&&(this.Ug=0,this.Tg.setTime(this.Ug),this.ez(),this.nT()))};c.prototype.end=function(){this.H!="stopped"&&(this.Ug=this.Zb,this.Tg.setTime(this.Ug),this.ez(),this.nT())};c.prototype.cancel=
function(){this.H="stopped";this.Ug=0;this.vq=[]};c.prototype.sO=function(d){return this.H=="playing"&&this.vq.indexOf(d)>=0};c.prototype.Ddb=function(d){return this.H=="playingReverse"&&this.vq.indexOf(d)>=0};c.prototype.Xp=function(d){this.H!="stopped"&&(this.Ug=this.H=="playing"?Math.min(this.Zb,this.Ug+d):Math.max(0,this.Ug-d),this.Tg.setTime(this.Ug),this.ez(),this.nT())};c.prototype.pm=function(){return this.Tg&&this.Tg.ib("pos")||0};c.prototype.UB=function(d){if(this.vq)for(var f=0;f<this.vq.length;f++)d.call(this,
this.vq[f],f)};c.prototype.UM=function(){this.o(new p(this.H=="playingReverse"?c.bRa:c.dRa))};c.prototype.ez=function(){this.o(new p(c.V9))};c.prototype.SM=function(){this.o(new p(c.tl))};c.prototype.TM=function(){this.o(new p(c.Rw))};c.prototype.nT=function(){this.H=="playingReverse"&&this.Ug<=0?(this.Ug=0,this.TM(),this.vq=[],this.H!="stopped"&&(this.H="stopped",this.get("loop")&&this.play())):this.H=="playing"&&this.Ug>=this.Zb?(this.Ug=this.Zb,this.SM(),this.vq=[],this.H!="stopped"&&(this.H="stopped",
this.get("animationDirection")=="alternate"?this.reverse():this.get("loop")&&this.play())):this.H!="stopped"&&h.requestFrame(this.Xp,this)};c.dRa="start";c.V9="frame";c.tl="end";c.bRa="reverseStart";c.Rw="reverseEnd";return c});
define("tdv/view/effects/FadeEffect",["require","tdv/utils","tdv/view/effects/Effect"],function(a){var m=a("tdv/utils"),k=a("tdv/view/effects/Effect");a=m.extend(k,function(){k.call(this);this.Iaa=this.Gaa=null});a.prototype.UM=function(){k.prototype.UM.call(this);this.Gaa=[];this.Iaa=[];this.UB(function(p){this.Gaa.push(this.get("alphaFrom",p.Uv()));this.Iaa.push(this.get("alphaTo",p.Uv()))});this.F2()};a.prototype.ez=function(){k.prototype.ez.call(this);this.F2()};a.prototype.F2=function(){this.UB(function(p,
h){var g=this.Gaa[h];h=g+(this.Iaa[h]-g)*this.pm();!(p.Uv()>0&&p.u.visible)&&h>0?(p.Sn(0),p.cg(!0),p.Sn(h)):h==0?(p.cg(!1),p.Sn(1)):p.Sn(h)})};a.prototype.SM=function(){this.F2();k.prototype.SM.call(this)};a.prototype.TM=function(){this.F2();k.prototype.TM.call(this)};return a});
define("tdv/view/effects/FadeInEffect",["require","tdv/utils","tdv/view/effects/FadeEffect"],function(a){var m=a("tdv/utils"),k=a("tdv/view/effects/FadeEffect");return m.extend(k,function(){k.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"),k=a("tdv/view/effects/FadeEffect");return m.extend(k,function(){k.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,k,p,h,g,e,b){a=function(q){function r(){var t=q.call(this)||this;t.cf("UserInteractionWindow");t.Bc=null;t.gv=[];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(p.Yb,t.$ja,t,!0);t.bind(p.oa,t.u8a,t,!0);return t}P(r,q);r.prototype.$ja=function(){this.Bc&&this.Bc.setSize(this.Ph(),this.Oh())};r.prototype.u8a=function(){var t=this.gv.slice();this.gv=[];this.j4();t.forEach(function(u){u.Gq.call(u.context)})};r.prototype.Ib=function(){q.prototype.Ib.call(this);if(!this.Bc){this.Bc=new l;this.Bc.setSize(this.Ph(),this.Oh());this.Bc.cg(!0);var t=this.Bc.ac();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().kk(t);this.j4()}};r.prototype.Ir=function(){q.prototype.Ir.call(this);this.getParent().bind(p.Yb,this.$ja,this,!0);r.CTa(this)};r.prototype.ap=function(){this.getParent().h(p.Yb,this.$ja,this,!0);q.prototype.ap.call(this);r.h3a(this)};r.prototype.Hfb=function(t){this.MC(f,t)};r.prototype.dX=function(t){this.MC(d,t)};r.prototype.MC=function(t,u){this.gv.push(new c(t,u));this.gv.sort(function(v,
w){return n[v.reason]-n[w.reason]});this.j4()};r.prototype.R9a=function(t){this.cancel(f,t)};r.prototype.P9a=function(){var t;t===void 0&&(t=void 0);this.cancel(d,t)};r.prototype.cancel=function(t,u){t=this.JZa(t,u);t>=0&&this.s3a(t)};r.prototype.JZa=function(t,u){for(var v=0;v<this.gv.length;v++){var w=this.gv[v];if(w.reason==t&&w.Gq==u)return v}return-1};r.prototype.j4=function(){if(this.Bc){var t=this.VZa();if(t){switch(t.reason){case d:this.Bc.Woa(l.gra);break;case f:this.Bc.Woa(l.C$)}this.set("visible",
!0)}else this.set("visible",!1)}};r.prototype.s3a=function(t){this.gv.splice(t,1);t==this.gv.length&&this.j4()};r.prototype.VZa=function(){return this.gv.length>0?this.gv[0]:null};r.CTa=function(t){r.wd.push(t);r.Fga.forEach(function(u){r.jxa(t,u)});r.Fga=[]};r.h3a=function(t){r.wd.splice(r.wd.indexOf(t),1)};r.ready=function(){return r.wd.length>0};r.dX=function(t){r.wd.length?r.wd.forEach(function(u){r.jxa(u,t)}):r.Fga.push(t)};r.jxa=function(t,u){t.dX(function(){r.wd.forEach(function(v){v!=t&&v.P9a()});
u()})};r.wd=[];r.Fga=[];return r}(g);var c=function(){return function(q,r){this.reason=q;this.Gq=r;this.context=this}}(),d="vr",f="play",n={};n[d]=0;n[f]=1;var l=function(){function q(){this.Md=!1;this.kU=null;this.Ga=this.Pa=100;this.lea=this.sj=void 0;this.mea=100;this.pa=document.createElement("div");this.pa.style.opacity="0";this.pa.style.display="none";this.pa.style.transition="opacity 0.3s";this.pa.addEventListener("transitionend",this.Xia.bind(this,!1));this.Zd=document.createElement("div");
this.vNa(!0);this.Zd.style.position="absolute";this.Zd.style.left="0";this.Zd.style.top="0";this.Zd.style.right="0";this.Zd.style.bottom="0";this.pa.appendChild(this.Zd);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.pa.appendChild(this.Id)}q.prototype.ac=function(){return this.pa};q.prototype.setSize=function(r,t){if(this.Pa!==r||this.Ga!==
t)this.Pa=r,this.Ga=t,this.EEa()};q.prototype.vNa=function(r){this.Zd.style.backdropFilter=r?"blur(8px)":"none"};q.prototype.cg=function(r){this.Md!=r&&(this.Md=r,this.kU&&(clearTimeout(this.kU),this.kU=null),this.Md?(this.pa.style.display="block",this.pa.style.opacity="0",this.kU=setTimeout(function(){this.kU=null;this.pa.style.opacity="1"}.bind(this),30)):this.pa.style.opacity="0")};q.prototype.Woa=function(r){this.sj!=r&&(this.sj=r,this.F7a())};q.prototype.Xia=function(){this.Md||(this.pa.style.display=
"none")};q.prototype.F7a=function(){switch(this.sj){case q.C$:this.lea=k.ax;this.mea=k.tK;break;case q.gra:this.lea=k.KSa,this.mea=k.LSa}this.Id.src=this.lea||"";this.EEa()};q.prototype.EEa=function(){h.yb()?(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.mea+"px")};q.C$="play";q.gra="vr";return q}();a.Sra=l;return a});
define("tdv/player/view/util/xr/Hash",["require","exports"],function(){return function(){function a(){}a.addParameter=function(m){this.removeParameter(m);var k=this.toArray();k.push(m);this.mPa(k)};a.removeParameter=function(m){var k=this.toArray().filter(function(p){return p!=m});this.mPa(k)};a.toArray=function(){var m=window.location.hash.substring(1);return m.length?m.split("&"):[]};a.mPa=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/URL".split(" "),function(a,m,k,p,h,g,e,b,c,d,f){var n=!1;e.wait(function(){setTimeout(function(){n=!0},10)});return function(){function l(){}l.FJ=
function(q){this.kHa(q)};l.kHa=function(q){function r(){u.kHa(q)}function t(){u.Shb(q)}var u=this;this.XR.tO?p.disabled?h.dra.show(function(){p.xoa(r)}):g.enabled()||!e.B6()?(g.gt(),b.dX(r)):t():this.XR.c8?t():k.HD()?t():k.Dc()==k.Jw||k.Dc()==k.Kw?n?t():e.B6()?setTimeout(t,10):b.dX(function(){setTimeout(t,10)}):e.B6()?t():b.dX(t)};l.Shb=function(q){function r(){t.Vfb(q)}var t=this;k.Dc()==k.aK?(c.removeParameter("vr"),h.EQa.show(r,function(){c.addParameter("vr")}.bind(this))):k.Dc()==k.$J?h.xsa.show(r):
k.Dc()==k.sY?h.xsa.show():r()};l.Vfb=function(q){function r(){u.XR.Joa=d.oRa;q()}function t(){u.XR.Joa=d.gK;q()}var u=this;!k.yb()||k.$f()?t():f.getQueryParameter("cardboard_version")=="1"?t():f.getQueryParameter("cardboard_version")=="2"?r():h.F9.show(r,t)};return l}()});
define("tdv/view/util/FullWindow",["require","exports","tdv/view/util/Fullscreen"],function(a,m,k){function p(){d==document.body&&(g.style.height=window.innerHeight+"px")}function h(l,q){var r={},t=l.style,u;for(u in q)r[u]=t[u];f.push({el:l,css:r});for(u in q)t[u]=q[u]}var g=document.createElement("div");g.style.position="fixed";g.style.bottom="0";g.style.left="0";g.style.height="100vh";g.style.width="100vw";var e=document.createElement("div"),b=null,c=null,d=null,f=[],n=null;return function(){function l(q){this.pa=
q}l.prototype.o5=function(){this.enabled()||this.toggle()};l.prototype.gt=function(){this.enabled()&&this.toggle()};l.prototype.toggle=function(){this.enabled()?l.cancel():l.request(this.pa)};l.prototype.enabled=function(){return l.enabled(this.pa)};l.request=function(q){if(q!==b){l.cancel();b=q;d=k.fullscreenElement()||document.body;c=q;c.parentElement.insertBefore(e,c);g.appendChild(c);for(q=0;q<d.children.length;q++)h(d.children[q],{visibility:"hidden"});h(c,{position:"absolute",left:0,top:0,width:"100%",
height:"100%"});d==document.body?h(g,{position:"fixed",left:0,top:"",right:"",bottom:0,height:"100vh",width:"100vw",margin:0,padding:0}):h(g,{position:"absolute",left:0,top:0,right:"",bottom:"",width:"100%",height:"100%",margin:0,padding:0});d.appendChild(g);p();n=setInterval(p,300)}};l.cancel=function(){if(b){g.parentElement.removeChild(g);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(n)}};
l.enabled=function(q){return b==q};return l}()});
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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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.eo+'"/>','</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.YY+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+g("rotate-device")+"</div>"].join("\n")+"</div>\n</div>",c=e+['<img style="width:13vmin; vertical-align:middle;" src="'+a.zSa+'"/>','<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(h,function(){h.call(this);this.us=this.MB=this.OB=this.LR=this.MR=this.$ea=this.afa=void 0;this.Z_=!1;this.OC=this.Uga=this.Zea=this.Mc=null;this.Nva=[];this.CL=this.Fs=!1;this.jd=this.jd.bind(this)});m.prototype.request=function(){this.Fs||(this.Fs=!0,this.tWa(),window.addEventListener("resize",this.jd),document.body.appendChild(this.Mc),document.body.appendChild(this.OC),this.l6a=document.documentElement.style.overflow,this.k6a=document.body.style.overflow,document.documentElement.style.overflow=
"auto",document.body.style.overflow="auto",this.US())};m.prototype.cancel=function(){this.Fs&&(this.Fs=!1,window.removeEventListener("resize",this.jd),document.body.style.overflow=this.k6a,document.documentElement.style.overflow=this.l6a,document.body.removeChild(this.Mc),document.body.removeChild(this.OC),this.pCa(!1))};m.prototype.enabled=function(){return this.Z_};m.prototype.tWa=function(){this.Mc||(this.Mc=this.TZ({position:"fixed",top:0,left:0,zIndex:9999998},!0),this.Mc.id="tdvminuictr",this.Uga=
this.TZ({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,b),this.Mc.appendChild(this.Uga),this.Zea=this.TZ({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,c),this.Mc.appendChild(this.Zea),this.OC=this.TZ({position:"absolute",top:0,left:0,right:0,height:"999999999vmax",zIndex:9999999},!1),this.OC.id="tdvminuiscrl",this.OC.addEventListener("touchend",this.jd))};m.prototype.TZ=function(d,f,n){var l=document.createElement("div");this.JT(l,d);n!==
void 0&&this.N4a(l,n);f&&this.Nva.push(l);return l};m.prototype.jd=function(){[0,250,1E3,2E3].forEach(function(d){setTimeout(this.TS.bind(this),d)}.bind(this))};m.prototype.TS=function(){this.OB==window.innerWidth&&this.MB==window.innerHeight||this.US()};m.prototype.US=function(){this.OB=window.innerWidth;this.MB=window.innerHeight;this.us=this.OB>this.MB?"landscape":"portrait";if(this.us=="landscape"){this.afa&&this.$ea&&this.g0a(this.afa,this.$ea)&&(!this.MR&&!this.LR||this.h0a(this.MR,this.LR))&&
(this.MR=this.OB,this.LR=this.MB);this.a0a()&&(this.MR=this.OB,this.LR=this.MB);this.afa=this.OB;this.$ea=this.MB;var d=this.MR==this.OB&&this.LR==this.MB}else d=!1;this.Nva.forEach(function(q){q.style.height=this.MB+"px";q.style.width=this.OB+"px"}.bind(this));var f=this.Fs&&this.us=="portrait",n=this.Fs&&this.us=="landscape"&&!d,l=this.Fs&&this.us=="landscape";this.JT(this.Mc,{display:f||n?"block":"none"});this.JT(this.Uga,{display:f?"block":"none"});this.JT(this.Zea,{display:n?"block":"none"});
this.JT(this.OC,{display:l?"block":"none",right:n?0:"99.9%"});this.pCa(d)};m.prototype.pCa=function(d){this.c3!=null&&(clearTimeout(this.c3),this.c3=null);this.Z_!=d&&(this.c3=setTimeout(function(){this.c3=null;(this.Z_=d)?this.o(new p(k.gr)):this.o(new p(k.Qb));this.o(new p(k.V))}.bind(this),d?1E3:0))};m.prototype.a0a=function(){var d=window.innerWidth,f=window.innerHeight,n=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(l){n=Math.min(n,Math.abs(100-d*l[1]*100/(f*l[0])))});return n<=1?!0:!1};m.prototype.g0a=function(d,f){return d*window.innerHeight>f*window.innerWidth};m.prototype.h0a=function(d,f){return d*window.innerHeight>=f*window.innerWidth};m.prototype.JT=function(d,f){for(var n in f)d.style[n]=f[n]};m.prototype.N4a=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,k,p){return new (function(){function h(){this.container=null;this.enabled=!1;this.jd=this.jd.bind(this);this.TS=this.TS.bind(this)}h.prototype.Hx=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="'+p.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="'+
p.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;">'+k("rotate-device")+"</div>","</div>\n</div>"].join("\n"))};h.prototype.show=function(g){this.enabled||(this.enabled=!0,this.Hx(),g.appendChild(this.container),window.addEventListener("resize",this.jd),this.US())};h.prototype.Pe=function(){this.enabled&&(this.enabled=!1,window.removeEventListener("resize",this.jd),this.container.parentElement.removeChild(this.container))};
h.prototype.jd=function(){[0,250,1E3,2E3].forEach(function(g){setTimeout(this.TS,g)}.bind(this))};h.prototype.TS=function(){this.QGa==window.innerWidth&&this.PGa==window.innerHeight||this.US()};h.prototype.US=function(){this.QGa=window.innerWidth;this.PGa=window.innerHeight;this.orientation=this.QGa>this.PGa?"landscape":"portrait";this.container.style.display=this.orientation!="landscape"?"block":"none"};return h}())});
define("tdv/player/view/util/xr/VRSessionManager","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/InfoWindow tdv/player/view/util/xr/Hash tdv/view/util/Fullscreen tdv/view/util/FullWindow tdv/view/util/IOSFullscreen tdv/view/util/KeepAwake tdv/view/util/LandscapeAnimation tdv/view/util/Animation".split(" "),function(a,m,k,p,h,g,e,b,c,d,f,n){function l(q,r){q?setTimeout(r,200):r()}return function(){function q(){}q.request=function(r,t){this.XR.isPresenting||
this.XR.pW||(this.xm=r,this.yoa=t,this.xm&&(this.XR.pW=!0,this.beb(),this.requestSession().then(function(u){this.Eeb(u);this.xm.xr.setReferenceSpaceType("local-floor");this.xm.xr.setFoveation(this.yoa.IHa);return this.xm.xr.setSession(u)}.bind(this)).then(function(){this.XR.referenceSpace=this.xm.xr.getReferenceSpace();this.XR.pW=!1;this.Feb()}.bind(this)).catch(function(u){console.error(u);this.XR.pW=!1;this.Deb()}.bind(this))))};q.end=function(){this.XR.session&&this.XR.session.end()};q.requestSession=
function(){var r,t=["local-floor","bounded-floor","hand-tracking"];((r=this.xm)===null||r===void 0?0:r.capabilities.isWebGL2)&&t.push("layers");return navigator.xr.requestSession("immersive-vr",{optionalFeatures:t})};q.beb=function(){n.GX(!0);this.vgb(this.xm);this.Qhb()};q.Eeb=function(r){this.Qna||(this.Qna=this.Ceb.bind(this));this.Rna||(this.Rna=this.Geb.bind(this));r.addEventListener("end",q.Qna);r.addEventListener("select",q.Rna)};q.Deb=function(){n.GX(!1);this.$Oa()};q.Feb=function(){var r;
(r=this.xm)===null||r===void 0||r.xr.setAnimationLoop(this.op.bind(this));n.eOa(this.requestFrame.bind(this),this.S9a.bind(this));n.GX(!1);this.cOa(this.xm,this.yoa);this.xm=null;p.yb()?e.enabled()&&p.Dc()!=p.AP&&f.show(e.fullscreenElement()):h.Yqa.show(this.XR.Ela.bind(this.XR))};q.Ceb=function(){var r;this.XR.session&&(this.XR.session.removeEventListener("end",q.Qna),this.XR.session.removeEventListener("select",q.Rna),(r=this.xm)===null||r===void 0||r.xr.setAnimationLoop(null),n.Lfb(),this.$Oa(),
this.cOa(null,null))};q.Geb=function(){this.XR.O.o(k.Ar)};q.cOa=function(r,t){this.XR.Dg!==r&&(this.XR.Dg=r,this.XR.Cm=t,this.XR.session=r?r.xr.getSession():null,this.XR.isPresenting=!!r,this.XR.qA=r?this.XR.voa.get(r)||null:null,this.XR.pw=r?this.XR.uoa.get(r)||null:null,this.PPa(),l(!this.XR.isPresenting,function(){this.XR.O.o(k.V)}.bind(this)))};q.vgb=function(r){var t=void 0;p.WI()?t=1.2545454545454546:p.$f()?t=1.4222222222:p.yb()&&this.XR.tO&&(t=this.XR.Q7);t&&r.xr.setFramebufferScaleFactor(t)};
q.Qhb=function(){var r;b.request((r=this.xm)===null||r===void 0?void 0:r.domElement);this.XR.tO&&(this.xm.domElement.width=this.xm.domElement.height=100,p.Dc()==p.BP?g.addParameter("vr"):d.enable(),p.Dc()==p.AP&&c.request())};q.$Oa=function(){b.cancel();f.Pe();p.yb()||h.Yqa.Pe();this.XR.tO&&(g.removeParameter("vr"),c.cancel(),d.disable())};q.op=function(r){var t;(t=this.XR.Dg)!==null&&t!==void 0&&t.xr.getFrame()&&(this.PPa(),t=this.F5,this.F5=null,this.XR.O.o(k.pY),t&&t(r),this.XR.O.o(k.me))};q.PPa=
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 r=this.XR.session.renderState.layers;r&&r.length>0&&r[0].textureWidth&&(this.XR.framebufferWidth=r[0].textureWidth,this.XR.framebufferHeight=r[0].textureHeight)}};q.requestFrame=function(r){this.F5=r;return 0};q.S9a=function(){this.F5=
null};q.xm=null;q.yoa=null;q.F5=null;return q}()});
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 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/VRControllers tdv/player/view/util/xr/pointer/VRGazePointer tdv/player/view/util/xr/pointer/VRPointer tdv/player/view/util/xr/VRSettings tdv/player/view/util/xr/VRPreconditionsChecker tdv/player/view/util/xr/VRSessionManager three.mod".split(" "),function(a,
m,k,p,h,g,e,b,c,d,f,n,l,q,r,t,u,v,w,y,x,z){a=function(){function A(){}A.initialize=function(D){h.initialize(function(){this.Pn.forEach(function(E){E.xr.enabled=this.wP}.bind(this));q.initialize();r.initialize();t.initialize();u.initialize();v.initialize();g.initialize();n.initialize();this.wJa=!0;D()}.bind(this))};A.getType=function(){return this.tO?this.kx.eo:this.kx.QSa};A.AV=function(D,E){this.wJa?!this.wP||this.isPresenting||this.pW||this.FJ(function(){x.request(D,E)}.bind(x)):this.initialize(function(){A.AV(D,
E)}.bind(A))};A.Ela=function(){x.end()};A.nOa=function(D){v.ihb(D)};A.setScale=function(D){g.setScale(D)};A.setPosition=function(D){g.setPosition(D)};A.bP=function(D){g.bP(D)};A.Coa=function(){g.Coa()};A.gpa=function(D,E,B,C){b.Cgb(D,E,B);switch(C){case c.Q$:t.jOa(!0);t.YNa(!0);break;default:t.jOa(!1),t.YNa(!1)}};A.i9a=function(D){D.xr.enabled=this.wP;b.add(D)};A.Bfb=function(D){b.remove(D)};A.uE=function(D,E,B,C){C===void 0&&(C=void 0);D.Te=E;D.Rq=B;D.cw=C;E&&(D.XLa=Date.now())};A.bOa=function(D,
E){D.mD=E};A.epa=function(D,E){E!=D.disabled&&(D.disabled=E)};A.oX=function(D,E){t.Yfb(D,E)};A.ehb=function(D,E){D.Zs=E};A.fpa=function(D,E){D.hidden=E};A.log=function(){k.log("VR: "+(this.wP?"available":"not available"))};A.FJ=function(D){y.FJ(D)};A.$ra=e;A.kx=f;A.UP=c;A.ysa=w;A.wP=!0;A.tO=!1;A.Dg=null;A.qA=null;A.pw=null;A.isPresenting=!1;A.pW=!1;A.session=null;A.framebufferWidth=void 0;A.framebufferHeight=void 0;A.yg=new z.Quaternion;A.IN=1.7;A.Qc=new z.Vector3;A.jm=1;A.Bm=new z.Quaternion;A.m9=
new z.Vector3;A.Q7=Math.min(1,1280/(Math.max(screen.width,screen.height)*window.devicePixelRatio));A.Pn=[];A.Cm=null;A.voa=new Map;A.uoa=new Map;A.O=new p;A.referenceSpace=null;A.wJa=!1;A.fe=[];A.cO=new z.Ray;A.c8=null;return A}();h.XR=a;g.XR=a;b.XR=a;n.XR=a;l.XR=a;q.XR=a;r.XR=a;t.XR=a;u.XR=a;v.XR=a;y.XR=a;return x.XR=a});
define("tdv/player/parser/helper/AppResizeUpdater",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR"],function(a,m,k,p){var h=/^\s*((\+|\-)?(\d*\.)?\d+)\s*(vmin|vmax|vw|vh|px|%)?\s*$/i;return function(){function g(e){this.Fb=e;this.HN=this.HN.bind(this);this.Fb.bind(k.Yb,this.jd,this,!0);p.O.bind(k.V,this.jd,this,!0);this.mia=new Map;this.CZ=[];this.jd()}g.prototype.jd=function(){var e=this;this.p8a();this.mia.forEach(function(b){for(var c in b)e.HN(b[c])});this.CZ.forEach(this.HN)};
g.prototype.p8a=function(){var e;if(p.isPresenting)var b=e=1024;else e=this.Fb.cb(),b=this.Fb.Kb();this.w4=e*.01;this.p4=b*.01;this.aFa=Math.min(this.w4,this.p4);this.$Ea=Math.max(this.w4,this.p4)};g.prototype.HN=function(e){e(this.w4,this.p4,this.aFa,this.$Ea)};g.prototype.R8a=function(e){this.CZ.push(e)};g.prototype.qfb=function(e){e=this.CZ.indexOf(e);e>=0&&this.CZ.splice(e,1)};g.prototype.E4=function(e,b,c,d){function f(l,q,r,t){b.call(e,c,n(l,q,r,t))}var n=g.AYa(d);(d=this.mia.get(e))||this.mia.set(e,
d={});d[c]=f;f(this.w4,this.p4,this.aFa,this.$Ea)};g.get=function(e){var b=g.wd.get(e);b||(b=new g(e),g.wd.set(e,b));return b};g.E4=function(e,b,c,d){var f=e.get&&e.get("application")||e.Wb&&e.Wb();f?(g.eBa(),g.get(f).E4(e,b,c,d)):g.LTa(e,b,c,d)};g.LTa=function(e,b,c,d){g.Gga.push({instance:e,Phb:b,name:c,value:d});g.sM||(g.sM=setTimeout(function(){g.sM=null;g.eBa()},100))};g.eBa=function(){g.sM&&(clearTimeout(g.sM),g.sM=null);var e=g.Gga;g.Gga=[];e.forEach(function(b){g.E4(b.instance,b.Phb,b.name,
b.value)})};g.AYa=function(e){var b=g.VF[e];if(b)return b;if(typeof e!="string")return g.VF[e]=function(){return e};var c=(b=h.exec(e))&&parseFloat(b[1]);switch(b&&b[4]&&b[4].toLowerCase()){case "vw":return g.VF[e]=function(d){return d*c};case "vh":return g.VF[e]=function(d,f){return f*c};case "vmin":return g.VF[e]=function(d,f,n){return n*c};case "vmax":return g.VF[e]=function(d,f,n,l){return l*c};default:return g.VF[e]=function(){return e}}};g.wd=new Map;g.Gga=[];g.sM=null;g.VF={};return g}()});
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,k,p,h,g){k=g.gab(k);var e=function(){function b(c,d,f){this.UK=c;this.xQ=f;this.U1=d.parent;this.k0a=d.isValidRoot||!1;this.yga={};this.uga=[];this.LAa=[];this.KAa=[];this.c_={};c=d.properties||{};for(var n in c)f=c[n],this.yga[n]=f.type,f.isUrl&&this.LAa.push(n),f.isSize&&this.KAa.push(n),f.order!==void 0&&(this.uga[f.order]=
n),f["default"]!==void 0&&(this.c_[n]=f["default"]);this.IAa=[];this.JAa=[];d=d.events||{};for(var l in d)d[l].isDeferred?this.IAa.push(l):this.JAa.push(l);this.fC=this.RB=this.UQ=this.p3=this.MH=this.l4=this.dI=this.jL=this.IK=this.iQ=void 0;this.yxa=!1}b.prototype.Kbb=function(){if(this.U1)return b.ri(this.U1)};b.prototype.Pz=function(){return this.UK};b.prototype.OV=function(){return this.aC()?this.by().OV().concat(this.UK):[this.UK]};b.prototype.hasAttributes=function(){return this.getAttributeNames().length>
0};b.prototype.hasAttribute=function(c){return this.Nla(c)?!0:!1};b.prototype.getAttributeNames=function(){this.iQ==void 0&&this.Hua();return this.iQ};b.prototype.wIa=function(){return this.uga?this.uga:this.aC()?this.by().wIa():[]};b.prototype.UHa=function(){if(this.jL)return this.jL;this.jL={};if(this.aC()){var c=this.by().UHa(),d;for(d in c)this.jL[d]=c[d]}if(this.c_)for(d in this.c_)this.jL[d]=this.c_[d];return this.jL};b.prototype.Nla=function(c){this.IK==void 0&&this.Hua();return this.IK[c]};
b.prototype.Kcb=function(){return this.MIa().length>0};b.prototype.MIa=function(){this.dI==void 0&&this.Oua();return this.dI};b.prototype.$bb=function(){this.l4==void 0&&this.Oua();return this.l4};b.prototype.Icb=function(){return this.HIa().length>0};b.prototype.HIa=function(){this.MH==void 0&&this.Nua();return this.MH};b.prototype.Xbb=function(){this.p3==void 0&&this.Nua();return this.p3};b.prototype.vcb=function(){return this.Sla().length>0};b.prototype.cJa=function(c){this.RB==void 0&&this.$K();
return this.RB.indexOf(c)!=-1};b.prototype.Sla=function(){this.RB==void 0&&this.$K();return this.RB};b.prototype.Acb=function(){return this.$la().length>0};b.prototype.dJa=function(c){this.fC==void 0&&this.$K();return this.fC.indexOf(c)!=-1};b.prototype.$la=function(){this.fC==void 0&&this.$K();return this.fC};b.prototype.xcb=function(c){this.UQ==void 0&&this.$K();return this.UQ.indexOf(c)!=-1};b.prototype.mbb=function(){this.UQ==void 0&&this.$K();return this.UQ};b.prototype.jIa=function(){return this.k0a||
this.aC()&&this.by().jIa()};b.prototype.ni=function(c,d,f,n){this.L2a(d,f);var l=this.xQ;var q=n&&n.length>0?new (g.extend(l,function(){l.apply(this,n)})):new l;q.set("application",c);q.set("baseDirectoy",d);q.set("queryStringParameters",f);q.set("class",this.Pz());return q};b.prototype.Aka=function(c){var d=this.UHa(),f;for(f in d)c.set(f,d[f])};b.prototype.L2a=function(c,d){this.yxa||(this.yxa=!0,this.ZWa(c,d),this.PXa(),this.tTa())};b.prototype.ZWa=function(c,d){if(this.Kcb()||this.Icb()){var f=
this.xQ.prototype,n=this.$bb(),l=this.Xbb(),q=f.set;f.set=function(r,t){n[r]?(!t||h.GD(t)||h.w6(t)||h.zdb(t)||(t=h.hD(h.FA(t,c),d)),q.call(this,r,t)):l[r]?p.E4(this,q,r,t):q.call(this,r,t)}}};b.prototype.tTa=function(){var c=this.xQ.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.PXa=function(){var c=this.xQ.prototype,d=this;this.hasAttributes()&&(c.set=
c.set,c.get=c.get);if(this.vcb()||this.Acb())c.bind=c.bind,c.getBindings=c.gO,c.hasBindings=c.j6,c.trigger=c.o,c.unbind=c.h;c.getClassName=function(){return d.Pz()};c.getClassPath=function(){return d.OV()};c.getAttributeNames=function(){return d.getAttributeNames()};c.getEventNames=function(){return d.mbb()};c.hasEvent=function(f){return d.xcb(f)}};b.prototype.Hua=function(){this.iQ=[];this.IK={};for(var c in this.yga)this.iQ.push(c),this.IK[c]=b.zda(this.yga[c]);if(this.aC())for(var d=this.by(),
f=d.getAttributeNames(),n=0;n<f.length;n++)c=f[n],this.IK[c]||(this.iQ.push(c),this.IK[c]=d.Nla(c))};b.prototype.Oua=function(){this.dI=this.LAa.slice();this.aC()&&(this.dI=g.union(this.dI,this.by().MIa()));this.l4={};for(var c=0;c<this.dI.length;c++)this.l4[this.dI[c]]=!0};b.prototype.Nua=function(){this.MH=this.KAa.slice();this.aC()&&(this.MH=g.union(this.MH,this.by().HIa()));this.p3={};for(var c=0;c<this.MH.length;c++)this.p3[this.MH[c]]=!0};b.prototype.$K=function(){this.RB=this.IAa.slice();this.fC=
this.JAa.slice();this.aC()&&(this.RB=g.union(this.RB,this.by().Sla()),this.fC=g.union(this.fC,this.by().$la()));this.UQ=g.union(this.RB,this.fC)};b.prototype.aC=function(){return this.U1?!0:!1};b.prototype.by=function(){return b.ri(this.U1)};b.define=function(c,d,f){d=g.extend(d,function(){f.apply(this,arguments);n.Aka(this)});var n=new b(c,k[c],d);b.IZ.set(c,n);b.wba.set(d,n);return d};b.create=function(c,d){var f=new b(c,k[c],d);b.IZ.set(c,f);b.wba.set(d,f);return f};b.getAll=function(){var c=[];
b.IZ.forEach(function(d){c.push(d)});return c};b.ri=function(c){return b.IZ.get(c)};b.Yab=function(c){return b.wba.get(c)};b.Qa=function(c,d){c=b.ri(c);if(d===null)return!0;if(d&&d.constructor)for(d=b.Yab(d.constructor);d;){if(d==c)return!0;d=d.Kbb()}return!1};b.zda=function(c){switch(c){case "string":case "code":return b.m6a;case "number":return b.O0a;case "bool":return b.VUa;case "color":return b.VVa;case "percent":return b.u2a;case "size":return b.H5a;case "identifier":return b.s_a;case "array":return b.pta;
case "canvas":return b.sVa;case "img":return b.v_a;case "dict":return b.v2a;case "*":return b.zXa;default:if(b.R_a(c))switch(b.FYa(c)){case "array":var d=b.zda(b.Tva(c));return function(l,q){l=b.pta(l,q);for(var r=0;r<l.length;r++)l[r]=d(l[r],q);return l};case "enum":var f=b.Uva(c);return b.HYa(f);case "or":f=b.Uva(c);var n=f.map(function(l){return b.zda(l)});return function(l,q){for(var r=0;r<n.length;r++)try{return n[r](l,q)}catch(t){}throw"Invalid value";};default:throw"Invalid type validator definition: "+
c;}else return b.Ao(function(l){return b.Qa(c,l)})}};b.R_a=function(c){return c.indexOf("[")>=0&&c.lastIndexOf("]")==c.length-1};b.FYa=function(c){return c.substring(0,c.indexOf("["))};b.Tva=function(c){return c.substring(c.indexOf("[")+1,c.lastIndexOf("]"))};b.Uva=function(c){c=b.Tva(c);for(var d=[],f="",n=0,l=0;l<c.length;l++){var q=c.charAt(l);f+=q;switch(q){case "[":n++;break;case "]":n--;break;case ",":n==0&&(d.push(f.substr(0,f.length-1)),f="")}}f!=""&&d.push(f);return d.map(function(r){return b.c7a(r)})};
b.c7a=function(c){return c.replace(/^\s+|\s+$/g,"")};b.Ao=function(c){return function(d,f){if(!c(d)){if(typeof d!="string")throw"Invalid value";d=b.NXa(d,f);if(!c(d))throw"Invalid value";}return d}};b.NXa=function(c,d){return function(){return eval(c)}.call(d)};b.zXa=function(c){return c};b.HYa=function(c){return b.Ao(function(d){return c.indexOf(d)!=-1})};b.w_=function(c,d){return g.Yz(c)&&d.test(c)};b.IZ=new Map;b.wba=new Map;b.O0a=b.Ao(function(c){return Object.prototype.toString.call(c)=="[object Number]"});
b.m6a=b.Ao(function(c){return typeof c=="string"||c===null});b.VUa=b.Ao(function(c){return c===!0||c===!1});b.pta=b.Ao(function(c){return Object.prototype.toString.call(c)=="[object Array]"});b.sVa=b.Ao(function(c){return c&&c.tagName=="CANVAS"});b.v_a=b.Ao(function(c){return c&&c.tagName=="IMG"});b.s_a=b.Ao(function(c){return b.w_(c,RegExp("^[a-z][a-z0-9_]*$","i"))});b.u2a=b.Ao(function(c){return b.w_(c,RegExp("^\\s*([+-]?\\d+\\.?\\d*)%\\s*$","i"))});b.H5a=b.Ao(function(c){return b.w_(c,RegExp("^\\s*([+-]?\\d+\\.?\\d*)\\s*((vw)|(vh)|(vmin)|(vmax)|(px))\\s*$",
"i"))});b.VVa=b.Ao(function(c){return b.w_(c,RegExp("^#[0-9a-f]{6}$","i"))});b.v2a=b.Ao(function(c){try{return g.Sma(c)}catch(d){return!1}});return b}();window.TDV.PlayerAPI.getClassByName=function(b){return e.ri(b).xQ};return e});
define("tdv/util/Sha256",["require"],function(){function a(){g[0]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=g[16]=0;this.Jka=g;this.XV=1779033703;this.YV=3144134277;this.ZV=1013904242;this.$V=2773480762;this.aW=1359893119;this.bW=2600822924;this.cW=528734635;this.dW=1541459225;this.block=this.start=this.bytes=this.qma=0;this.Ila=this.l6=!1;this.first=!0}var m="0123456789abcdef".split(""),k=[-2147483648,8388608,32768,128],p=[24,16,8,0],h=[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],g=[];a.prototype.update=function(e){if(!this.Ila){for(var b,c=0,d,f=e.length,n=this.Jka;c<f;){this.l6&&(this.l6=!1,n[0]=this.block,n[16]=n[1]=n[2]=n[3]=n[4]=n[5]=n[6]=n[7]=n[8]=n[9]=n[10]=n[11]=n[12]=n[13]=n[14]=n[15]=0);for(d=this.start;c<f&&d<64;++c)b=e.charCodeAt(c),b<128?n[d>>2]|=b<<p[d++&3]:(b<2048?n[d>>2]|=(192|b>>6)<<p[d++&3]:(b<55296||
b>=57344?n[d>>2]|=(224|b>>12)<<p[d++&3]:(b=65536+((b&1023)<<10|e.charCodeAt(++c)&1023),n[d>>2]|=(240|b>>18)<<p[d++&3],n[d>>2]|=(128|b>>12&63)<<p[d++&3]),n[d>>2]|=(128|b>>6&63)<<p[d++&3]),n[d>>2]|=(128|b&63)<<p[d++&3]);this.Ndb=d;this.bytes+=d-this.start;d>=64?(this.block=n[16],this.start=d-64,this.hash(),this.l6=!0):this.start=d}this.bytes>4294967295&&(this.qma+=this.bytes/4294967296<<0,this.bytes%=4294967296);return this}};a.prototype.tHa=function(){if(!this.Ila){this.Ila=!0;var e=this.Jka,b=this.Ndb;
e[16]=this.block;e[b>>2]|=k[b&3];this.block=e[16];b>=56&&(this.l6||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.qma<<3|this.bytes>>>29;e[15]=this.bytes<<3;this.hash()}};a.prototype.hash=function(){var e=this.XV,b=this.YV,c=this.ZV,d=this.$V,f=this.aW,n=this.bW,l=this.cW,q=this.dW,r=this.Jka,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 y=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);y=e&b;var x=y^e&c^w;var z=f&n^~f&l;u=q+u+z+h[t]+r[t];v+=x;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;x=w^d&b^y;z=q&f^~q&n;u=l+u+z+h[t+1]+r[t+1];v+=x;l=c+u<<0;c=u+v<<0;v=(c>>>2|c<<30)^(c>>>
13|c<<19)^(c>>>22|c<<10);u=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7);y=c&d;x=y^c&e^w;z=l&q^~l&f;u=n+u+z+h[t+2]+r[t+2];v+=x;n=b+u<<0;b=u+v<<0;v=(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10);u=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7);w=b&c;x=w^b&d^y;z=n&l^~n&q;u=f+u+z+h[t+3]+r[t+3];v+=x;f=e+u<<0;e=u+v<<0}this.XV=this.XV+e<<0;this.YV=this.YV+b<<0;this.ZV=this.ZV+c<<0;this.$V=this.$V+d<<0;this.aW=this.aW+f<<0;this.bW=this.bW+n<<0;this.cW=this.cW+l<<0;this.dW=this.dW+q<<0};a.prototype.Ncb=function(){this.tHa();
var e=this.XV,b=this.YV,c=this.ZV,d=this.$V,f=this.aW,n=this.bW,l=this.cW,q=this.dW;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[n>>28&15]+m[n>>24&15]+m[n>>20&15]+m[n>>16&15]+m[n>>12&15]+m[n>>8&15]+m[n>>4&15]+m[n&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[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.tHa();var e=this.XV,b=this.YV,c=this.ZV,d=this.$V,f=this.aW,n=this.bW,l=this.cW,q=this.dW;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,n>>24&255,n>>16&255,n>>8&255,n&255,l>>24&255,l>>16&255,l>>8&255,l&255,q>>24&255,q>>16&255,q>>8&255,q&255]};return function(e){return(new a(!0)).update(e).Ncb()}});
define("tdv/player/parser/Sign",["require","tdv/util/Sha256"],function(a){function m(){for(var g=[[256,"9799e3eb6096a48f515a94324200b7af24251a4131eccf9a2cd65d012a1f5c71"],[1024,"cbab1f6d618e723188cfdb1c7c3f47146e46da4da56030386d85055016afd5d9"],[1E4,"d9c4539649520e3f4a35e5a3331b0fbdc67958dd64ef65a83a75d545413643dd"]],e=0;e<g.length;e++){var b=Array.apply(null,Array(g[e][0])).map((c,d)=>String.fromCharCode(d%256)).join("");if(h(b)!=g[e][1])return!1}return!0}function k(g){var e=Array.isArray(g)?"array":
g===null?"null":typeof g;switch(e){case "array":return"["+g.map(k).join(",")+"]";case "object":return"{"+Object.keys(g).sort().map(function(b){return k(b)+":"+k(g[b])}).join(",")+"}";case "boolean":return g?"true":"false";case "number":return g.toFixed(3);case "string":return'"'+g.split('"').join('\\"')+'"';case "null":case "undefined":return e;case "function":return"<"+e+">"}return""}function p(g){return g.map(function(e){return String.fromCharCode(e)}).join("")}var h=a("tdv/util/Sha256");return{validate:function(g){var e=
[104,97,115,104],b=[116,100,118],c=window.location[p([111,114,105,103,105,110])],d=g[p(e)];delete g[p(e)];g=p(b)+k(g);g=h(g);b=p(b)+c;b=h(b);return g==d||b==d||!m()}}});
define("tdv/player/view/util/geo/Point",["require"],function(){function a(m,k,p){this.set(typeof m!="undefined"?m:0,typeof k!="undefined"?k:0,typeof p!="undefined"?p:0)}a.prototype.set=function(m,k,p){this.x=m;this.y=k;this.z=p;return this};a.prototype.clone=function(){return new a(this.x,this.y,this.z)};a.prototype.apply=function(m){m.AN(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"),k=a("tdv/player/view/util/geo/Point"),p=m.extend(k,function(h,g,e){k.call(this,h,g,e)});p.prototype.clone=function(){return new p(this.x,this.y,this.z)};p.prototype.Jc=function(){return this.x==0&&this.z==0?0:-Math.atan2(this.x,this.z)};p.prototype.Ic=function(){return this.y==0&&this.z==0?0:Math.atan2(this.y,Math.sqrt(this.z*this.z+this.x*this.x))};p.prototype.dma=function(){return Math.sqrt(this.x*
this.x+this.y*this.y+this.z*this.z)};p.prototype.BX=function(h){h/=this.dma();this.x*=h;this.y*=h;this.z*=h;return this};p.prototype.normalize=function(){return this.BX(1)};p.prototype.yI=function(h){return this.x*h.x+this.y*h.y+this.z*h.z};p.prototype.e5=function(h){var g=this.z*h.x-this.x*h.z,e=this.x*h.y-this.y*h.x;this.x=this.y*h.z-this.z*h.y;this.y=g;this.z=e;return this};p.vD=function(h,g){return new p(g.x-h.x,g.y-h.y,g.z-h.z)};p.N5=function(h,g){h=NaN-h;g=NaN-g;return Math.sqrt(h*h+g*g+NaN)};
p.Nz=function(h,g){return new p(Math.cos(g)*Math.sin(h),Math.sin(g),Math.cos(g)*Math.cos(h))};return p});
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"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/view/util/geo/Vector");a=k.define("AdjacentPanorama",m,function(){m.call(this);this.cka=this.Mx=void 0});a.prototype.WHa=function(){if(this.Mx===void 0){for(this.Mx=this.iwa()-this.get("yaw");this.Mx>180;)this.Mx-=360;for(;this.Mx<-180;)this.Mx+=360}return this.Mx};
a.prototype.lbb=function(){this.cka===void 0&&(this.cka=p.Nz(this.iwa()*Math.PI/180,0));return this.cka};a.prototype.N9a=function(){return this.get("yaw")!==void 0&&this.get("backwardYaw")!==void 0};a.prototype.iwa=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.xE=function(k){this.Bq!==k&&(this.Bq=k,this.cEa())};a.prototype.tp=function(k){this.WL!==k&&(this.WL=k,this.cEa())};a.prototype.cEa=function(){this.set("disabled",this.WL&&this.get("disableWhileMoving")||this.Bq&&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"),k=a("tdv/player/script/Model3DPostprocessing");return m.define("AmbientOcclusionModel3DPostprocessing",k,function(){k.call(this)})});define("tdv/constants/PlaybackState",["require","exports"],function(){return{aa:"stopped",PLAYING:"playing",Xb:"paused"}});
define("tdv/player/script/ImageResource",["require","exports","tdv/player/parser/ClassInfo","tdv/binding/Bindable"],function(a,m,k,p){a=function(h){function g(){return h.call(this)||this}P(g,h);return g}(p);k.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"),k=a("tdv/constants/PlaybackState"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/ImageResource");a=p.define("AnimatedImageResource",h,function(){h.call(this)});a.prototype.play=a.prototype.play=function(){this.set("state",k.PLAYING)};a.prototype.pause=
a.prototype.pause=function(){this.set("state",k.Xb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",k.aa)};a.prototype.set=function(g,e){switch(g){case "state":(this.get("state")||k.aa)==k.aa&&e==k.PLAYING&&this.o(m.Gp)}h.prototype.set.call(this,g,e)};a.prototype.rk=function(g,e,b){e||(e=1);b||(b=1);return h.prototype.rk.call(this,g,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"),k=a("tdv/player/script/Model3DPostprocessing");return m.define("AntialiasModel3DPostprocessing",k,function(){k.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(k){m.call(this);this.IM=k===void 0?!0:k;this.ML=this.Is=this.Gs=this.Ia=void 0});a.prototype.getItem=function(){if(this.Ia===void 0){var k=this.get("image");this.Ia=k?k.d5(this.IM):null}return this.Ia};a.prototype.CIa=function(){if(this.Gs===void 0){var k=this.get("rollOverImage");
this.Gs=k?k.d5(this.IM):null}return this.Gs};a.prototype.GIa=function(){if(this.Is===void 0){var k=this.get("selectedImage");this.Is=k?k.d5(this.IM):null}return this.Is};a.prototype.Bbb=function(){if(this.ML===void 0){this.ML=[];var k=this.getItem();k&&this.ML.push(k);(k=this.CIa())&&this.ML.push(k);(k=this.GIa())&&this.ML.push(k)}return this.ML};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"),k=a("tdv/player/script/HotspotMapOverlay");return m.define("AreaHotspotMapOverlay",k,function(){k.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{mK:"inAdvance",Nqa:"delayed"}});
define("tdv/view/buttons/ButtonGroup",["require","exports","tdv/constants/EventName"],function(a,m,k){return function(){function p(){var h=this;this.Wj=[];this.Pya=function(g){h.gCa(g.source)}}p.prototype.register=function(h){this.uTa(h);this.Wj.push(h);h.get("pressed")&&this.gCa(h)};p.prototype.unregister=function(h){this.a3a(h)};p.prototype.uTa=function(h){h.bind(k.Jk,this.Pya,this,!0)};p.prototype.a3a=function(h){h.unbind(k.Jk,this.Pya,this)};p.prototype.gCa=function(h){this.Wj.forEach(function(g){g.set("pressed",
g==h)})};p.register=function(h,g){this.unregister(h);g=this.rj(g);h.set("__button_group",g);g.register(h)};p.unregister=function(h){var g=h.get("__button_group");g&&(g.unregister(h),h.set("__button_group",void 0))};p.rj=function(h){return this.kxa[h]||(this.kxa[h]=new p)};p.kxa={};return p}()});define("tdv/view/constants/ButtonMode",["require","exports"],function(){return{jf:"push",Mk:"toggle"}});
define("tdv/view/constants/OverflowPolicy",["require","exports"],function(){return{wK:"visible",fra:"hidden",zr:"scroll"}});define("tdv/view/constants/Alignment",["require","exports"],function(){return{$a:"left",Cb:"right",Xe:"center",Tc:"top",Fc:"bottom",Pd:"middle"}});define("tdv/view/constants/ScrollBarVisiblePolicy",["require","exports"],function(){return{rc:"rollOver",ALWAYS:"always"}});
define("tdv/view/constants/LayoutMode",["require","exports"],function(){return{oY:"absolute",Wh:"horizontal",bB:"grid",Tj:"vertical"}});define("tdv/view/containers/layout/ChildBounds",["require","exports"],function(){return function(){return function(a){this.de=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,k,p,h){return function(){function g(){this.bc=null;this.eD=k.Tc;this.bC=k.$a;this.eI=this.hy=0}g.prototype.LNa=function(e){this.hy!=e&&(this.hy=e,this.mh())};g.prototype.A8=function(e){this.eI!=e&&(this.eI=e,this.mh())};g.prototype.gOa=function(e){this.bc=e;this.mh()};g.prototype.cP=function(e){this.bC!=e&&
(this.bC=e,this.mh())};g.prototype.hO=function(){return this.bC};g.prototype.iP=function(e){this.eD!=e&&(this.eD=e,this.mh())};g.prototype.jO=function(){return this.eD};g.prototype.measure=function(){return new h};g.prototype.update=function(){var e=this.nWa();this.AU(e);this.t4a(e)};g.prototype.AU=function(){};g.prototype.I_=function(){for(var e=this.Rwa(),b=[],c=0;c<e.length;c++){var d=e[c];d.Go&&b.push(d)}return b};g.prototype.Rwa=function(){if(!this.bc)return[];for(var e=this.bc.Ab(),b=[],c=0;c<
e.length;c++){var d=e[c];d.u.visible&&b.push(d)}return b};g.prototype.nWa=function(){for(var e=this.Rwa(),b=[],c=0;c<e.length;c++)b.push(new p(e[c]));return b};g.prototype.t4a=function(e){for(var b=0;b<e.length;b++){var c=e[b];c.de.xNa(c.x,c.y,c.width,c.height)}};g.prototype.mh=function(){this.bc&&(this.bc.jc(),this.bc.wf())};return g}()});
define("tdv/view/containers/layout/AbsoluteLayout",["require","exports","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,k,p){return function(h){function g(){return h.call(this)||this}P(g,h);g.prototype.measure=function(){for(var e=new p,b=this.I_(),c=0;c<b.length;c++){var d=b[c],f=d.sy,n=d.DT,l=0;f!==void 0&&(l+=f);n!==void 0&&(l+=n);e.width=Math.max(l+d.Xv(),e.width);e.minWidth=Math.max(l+d.Tv(),e.minWidth);f=d.Ns;n=d.mQ;l=0;f!==void 0&&(l+=f);n!==void 0&&
(l+=n);e.height=Math.max(l+d.Wv(),e.height);e.minHeight=Math.max(l+d.Rz(),e.minHeight)}this.bc&&(b=this.bc.u.Bd+this.bc.u.ze,e.width+=b,e.minWidth+=b,b=this.bc.u.ge+this.bc.u.Af,e.height+=b,e.minHeight+=b);return e};g.prototype.AU=function(e){if(this.bc)for(var b=this.bc.Ph(),c=this.bc.Oh(),d=0;d<e.length;d++){var f=e[d],n=f.de,l=n.sy;if(l===void 0){var q=n.c2;q!==void 0&&(l=Math.round(q*b*.01))}q=n.DT;if(q===void 0){var r=n.d2;r!==void 0&&(q=Math.round(r*b*.01))}r=n.FB;var t=n.Co;if(t===void 0){var u=
n.Zo;u!==void 0?t=Math.round(u*b*.01):l!==void 0&&q!==void 0&&(t=b-l-q)}u=n.Ns;if(u===void 0){var v=n.e2;v!==void 0&&(u=Math.round(v*c*.01))}v=n.mQ;if(v===void 0){var w=n.b2;w!==void 0&&(v=Math.round(w*c*.01))}w=n.GB;var y=n.oG;if(y===void 0){var x=n.Yo;x!==void 0?y=Math.round(x*c*.01):u!==void 0&&v!==void 0&&(y=c-u-v)}f.width=t===void 0?n.Xv():Math.max(n.Tv(),Math.min(n.Z5(),t));f.height=y===void 0?n.Wv():Math.max(n.Rz(),Math.min(n.Y5(),y));f.x=l!==void 0&&q!==void 0?Math.round(l+(b-q-l-f.width)*
.5):l!==void 0?l: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 g}(k)});
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,k,p,h){return function(g){function e(){var b=g.call(this)||this;b.Co=void 0;b.hC=void 0;b.FR=void 0;b.py=void 0;b.oy=void 0;b.SG=void 0;b.DR=void 0;b.CR=void 0;b.BR=void 0;b.tua=void 0;b.OBa=void 0;return b}P(e,g);e.prototype.qgb=function(b){this.Co!=b&&(this.Co=b,this.mh())};e.prototype.Hgb=function(b){this.py!=
b&&(this.py=b,this.py!=void 0&&(this.hC=void 0),this.mh())};e.prototype.Ggb=function(b){this.oy!=b&&(this.oy=b,this.oy!=void 0&&(this.FR=void 0),this.mh())};e.prototype.Ogb=function(b){this.hC!=b&&(this.hC=b,this.py!=void 0&&(this.py=void 0),this.mh())};e.prototype.Ngb=function(b){this.FR!=b&&(this.FR=b,this.oy!=void 0&&(this.oy=void 0),this.mh())};e.prototype.Mgb=function(b){this.SG!=b&&(this.SG=b,this.mh())};e.prototype.Lgb=function(b){this.DR!=b&&(this.DR=b,this.mh())};e.prototype.Kgb=function(b){this.CR!=
b&&(this.CR=b,this.mh())};e.prototype.Jgb=function(b){this.BR!=b&&(this.BR=b,this.mh())};e.prototype.measure=function(){for(var b=new h,c=this.I_(),d=0,f=0;f<c.length;f++)c[f].Go&&d++;if(!isNaN(this.hC))for(isNaN(this.SG)||(b.minWidth=this.SG),f=0;f<c.length;f++){var n=c[f].Tv();isNaN(n)||(b.minWidth=Math.max(n,b.minWidth))}if(isNaN(this.py))for(f=0;f<c.length;f++)n=c[f].Xv(),isNaN(n)||(b.width=Math.max(n,b.width));else b.width=this.py;if(isNaN(this.oy))for(f=0;f<c.length;f++)n=c[f].Wv(),isNaN(n)||
(b.height=Math.max(n,b.height));else b.height=this.oy;c=isNaN(this.hC)?!isNaN(this.Co)&&this.bc?Math.max(1,Math.floor((this.Co-this.bc.u.Bd-this.bc.u.ze+this.hy)/(b.width+this.hy))):Math.ceil(Math.sqrt(d)):Math.max(1,Math.floor(100/this.hC));d=Math.ceil(d/c);this.bc&&(b.width=b.width*c+Math.max(0,c-1)*this.hy+this.bc.u.Bd+this.bc.u.ze,b.minWidth=b.minWidth+this.bc.u.Bd+this.bc.u.ze,b.height=b.height*d+Math.max(0,d-1)*this.eI+this.bc.u.ge+this.bc.u.Af);b.minHeight=0;return b};e.prototype.AU=function(b){if(this.bc){for(var c,
d,f=[],n=[],l=0;l<b.length;l++)d=b[l].de,d.Go?f.push(b[l]):n.push(b[l]);var q=f.length,r=this.bc.Ph();c=this.hy;if(isNaN(this.py))if(isNaN(this.hC)){for(l=b=0;l<f.length;l++)d=f[l].de,b=Math.max(d.Tv(),d.Xv(),b);b=Math.min(r,b)}else b=Math.max(1,Math.floor(100/this.hC)),b=(r-(b-1)*c)/b,l=!1,!isNaN(this.CR)&&this.CR<b&&(b=this.CR,l=!0),!isNaN(this.SG)&&this.SG>b&&(b=this.SG,l=!0),l&&(b=Math.max(1,Math.floor((r+c)/(b+c))),b=(r-(b-1)*c)/b);else b=this.py;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;l=0;if(r>=v)switch(this.hO()){case k.Cb:l=r-v;break;case k.Xe:l=Math.round((r-v)*.5);break;default:l=0}r=[];v=[];for(var w=0;w<t;w++)d=Math.round(u/(t-w)),u-=d,v.push(l),l+=d+c,r.push(d);w=this.bc.Oh();c=this.eI;if(isNaN(this.oy))if(isNaN(this.FR))for(u=1,l=0;l<f.length;l++)d=f[l].de,u=Math.max(d.Rz(),d.Wv(),u);else u=Math.max(1,100/this.FR),u=(w-(u-1)*c)/u,l=!1,!isNaN(this.BR)&&this.BR<u&&(u=this.BR,l=!0),!isNaN(this.DR)&&this.DR>u&&(u=this.DR,l=!0),l&&(u=Math.max(1,
Math.floor((w+c)/(u+c))),u=(w-(u-1)*c)/u);else u=this.oy;q=Math.max(1,Math.ceil(q/t));l=q*u;d=q*(u+c)-c;var y=0;if(w>=d)switch(this.jO()){case k.Fc:y=w-d;break;case k.Pd:y=Math.round((w-d)*.5);break;default:y=0}d=[];for(var x=[],z=0;z<q;z++)w=Math.round(l/(q-z)),l-=w,x.push(y),y+=w+c,d.push(w);for(l=0;l<f.length;l++)c=f[l],w=l%t,z=Math.floor(l/t),c.x=v[w],c.width=r[w],c.y=x[z],c.height=d[z];for(l=0;l<n.length;l++)c=n[l],c.x=0,c.width=Math.round(b),c.y=0,c.height=Math.round(u);this.tua=t;this.OBa=
q}};return e}(p)});
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,k,p,h){return function(g){function e(){return g.call(this)||this}P(e,g);e.prototype.measure=function(){for(var b=new h,c=this.I_(),d=0;d<c.length;d++){var f=c[d];b.height=Math.max(f.Wv(),b.height);b.minHeight=Math.max(f.Rz(),b.minHeight);b.width+=f.Xv();b.minWidth+=f.Tv()}this.bc&&(c=Math.max(0,c.length-
1)*this.hy+this.bc.u.Bd+this.bc.u.ze,b.width+=c,b.minWidth+=c,c=this.bc.u.ge+this.bc.u.Af,b.height+=c,b.minHeight+=c);return b};e.prototype.AU=function(b){this.oja(b);this.nja(b)};e.prototype.oja=function(b){if(this.bc){for(var c=0,d=0;d<b.length;d++)b[d].de.Go&&c++;var f=this.bc.Ph()-Math.max(0,c-1)*this.hy,n=this.bc.Oh();c=f;var l=0,q=[];for(d=0;d<b.length;d++){var r=b[d],t=r.de,u=t.Yo;r.height=u!==void 0?Math.max(t.Rz(),Math.min(t.Y5(),Math.round(n*u*.01))):t.Wv();u=t.Zo;u!==void 0?t.Go?(l+=u,
q.push(r)):r.width=Math.max(t.Tv(),Math.min(t.Z5(),Math.round(f*u*.01))):(r.width=t.Xv(),c-=r.width)}c-=Math.max(0,c-f*l*.01);do{b=!1;f=Math.max(0,l>0?c/l:0);n=[];for(d=l=0;d<q.length;d++){r=q[d];t=r.de;u=Math.round(t.Zo*f);var v=t.Tv(),w=t.Z5();u<v?(r.width=v,c-=r.width,b=!0):u>w?(r.width=w,c-=r.width,b=!0):(l+=t.Zo,n.push(r))}q.length=0;q.push.apply(q,n)}while(b);for(d=0;d<q.length;d++)r=q[d],t=r.de,f=Math.max(0,l>0?c/l:0),r.width=Math.round(t.Zo*f),c-=r.width,l-=t.Zo}};e.prototype.nja=function(b){if(this.bc){for(var c=
this.hy,d=this.bc.Ph(),f=this.bc.Oh(),n=0,l=0,q=0;q<b.length;q++){var r=b[q];r.de.Go&&(n+=b[q].width,l++)}n+=c*(l-1);if(d>=n)switch(this.hO()){case k.Cb:d-=n;break;case k.Xe:d=Math.round((d-n)*.5);break;default:d=0}else d=0;for(q=0;q<b.length;q++)if(r=b[q],r.de.Go){if(f>=r.height)switch(this.jO()){case k.Fc:r.y=f-r.height;break;case k.Pd: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}(p)});
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,k,p,h){return function(g){function e(){return g.call(this)||this}P(e,g);e.prototype.measure=function(){for(var b=new h,c=this.I_(),d=0;d<c.length;d++){var f=c[d];b.width=Math.max(f.Xv(),b.width);b.minWidth=Math.max(f.Tv(),b.minWidth);b.height+=f.Wv();b.minHeight+=f.Rz()}this.bc&&(c=Math.max(0,c.length-1)*
this.eI+this.bc.u.ge+this.bc.u.Af,b.height+=c,b.minHeight+=c,c=this.bc.u.Bd+this.bc.u.ze,b.width+=c,b.minWidth+=c);return b};e.prototype.AU=function(b){this.oja(b);this.nja(b)};e.prototype.oja=function(b){if(this.bc){for(var c=0,d=0;d<b.length;d++)b[d].de.Go&&c++;var f=this.bc.Ph(),n=this.bc.Oh()-Math.max(0,c-1)*this.eI;c=n;var l=0,q=[];for(d=0;d<b.length;d++){var r=b[d],t=r.de,u=t.Zo;r.width=u!==void 0?Math.max(t.Tv(),Math.min(t.Z5(),Math.round(f*u*.01))):t.Xv();u=t.Yo;u!==void 0?t.Go?(l+=u,q.push(r)):
r.height=Math.max(t.Rz(),Math.min(t.Y5(),Math.round(n*u*.01))):(r.height=t.Wv(),c-=r.height)}c-=Math.max(0,c-n*l*.01);do{b=!1;f=Math.max(0,l>0?c/l:0);n=[];for(d=l=0;d<q.length;d++){r=q[d];t=r.de;u=Math.round(t.Yo*f);var v=t.Rz(),w=t.Y5();u<v?(r.height=v,c-=r.height,b=!0):u>w?(r.height=w,c-=r.height,b=!0):(l+=t.Yo,n.push(r))}q.length=0;q.push.apply(q,n)}while(b);for(d=0;d<q.length;d++)r=q[d],t=r.de,f=Math.max(0,l>0?c/l:0),r.height=Math.round(t.Yo*f),c-=r.height,l-=t.Yo}};e.prototype.nja=function(b){if(this.bc){for(var c=
this.eI,d=this.bc.Oh(),f=this.bc.Ph(),n=0,l=0,q=0;q<b.length;q++){var r=b[q];r.de.Go&&(n+=r.height,r.width>f&&(f=r.width),l++)}n+=c*(l-1);if(d>=n)switch(this.jO()){case k.Fc:d-=n;break;case k.Pd:d=Math.round((d-n)*.5);break;default:d=0}else d=0;for(q=0;q<b.length;q++)if(r=b[q],r.de.Go){switch(this.hO()){case k.Cb:r.x=f-r.width;break;case k.Xe: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}(p)});
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,k,p,h,g,e,b,c,d,f){return function(n){function l(){var q=n.call(this)||this;q.cf("BaseContainer");q.Wm=null;q.oe=[];q.Pp=
[];q.WZ=g.Nqa;q.Ava=[];q.set("contentOpaque",!1);return q}P(l,n);l.prototype.Nb=function(){this.zl(l.ad)};l.prototype.set=function(q,r){q=="children"?this.Uh(r):q=="creationPolicy"?this.ggb(r):p.prototype.set.call(this,q,r)};l.prototype.get=function(q,r){return q=="children"?this.Ab():q=="creationPolicy"?this.WZ:p.prototype.get.call(this,q,r)};l.prototype.ggb=function(q){this.WZ!=q&&(this.WZ=q,this.Y3())};l.prototype.Uh=function(q){var r=this.Ab(),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.hb(u[q]);for(q=0;q<t.length;q++)this.Vq(t[q],q)};l.prototype.Ab=function(){return this.oe};l.prototype.hb=function(q){q.getParent()&&q.getParent().removeChild(q);this.oe.push(q);q.Ha=this;this.uta(q);q.eia(this.u.XI);this.Pp.push(q);this.Y3();q.Ir()};l.prototype.removeChild=function(q){q.getParent()==this&&(q.ap(),q.Ha=null,this.Pp.includes(q)?this.Pp=this.Pp.filter(function(r){return r!==
q}):(this.wa().removeChild(q.wa()),q.oD(),this.jc(),this.wf()),this.oe=this.oe.filter(function(r){return r!==q}),q.Cha())};l.prototype.LMa=function(){var q=this;this.Ab().forEach(function(r){q.removeChild(r)})};l.prototype.Pla=function(q){return this.oe.indexOf(q)};l.prototype.Vq=function(q,r){var t=this.Pla(q);if(t<0)throw"Can't set index. This is not a child of this container";var u=this.oe.slice();u.splice(t,1);u.splice(r,0,q);if(!k.Kma(this.oe,u)&&(this.oe=u,!this.Pp.includes(q))){r=this.Pla(q);
this.wa().removeChild(q.wa());u=t=null;for(var v=r-1;v>=0&&!t;v--)this.Pp.includes(this.oe[v])||(t=this.oe[v]);for(v=r+1;v<this.oe.length&&!u&&!t;v++)this.Pp.includes(this.oe[v])||(u=this.oe[v]);t?this.wa().zJa(q.wa(),t.wa()):u?this.wa().AJa(q.wa(),u.wa()):this.wa().appendChild(q.wa());this.wf()}};l.prototype.KH=function(q){n.prototype.KH.call(this,q);this.YDa()};l.prototype.YDa=function(){this.oe.forEach(function(q){this.uta(q)}.bind(this))};l.prototype.uta=function(q){q.set("inheritedInteractionEnabled",
this.G("interactionEnabled")&&this.G("inheritedInteractionEnabled")&&this.G("childrenInteractionEnabled"))};l.prototype.yJ=function(q){var r=this;n.prototype.yJ.call(this,q);this.oe&&this.oe.forEach(function(t){t.eia(r.u.XI)})};l.prototype.Vaa=function(q){n.prototype.Vaa.call(this,q);this.Ab().forEach(function(r){r.sz()});this.Y3()};l.prototype.i_a=function(){return!!(this.jI&&this.vR&&this.Wb())};l.prototype.Wn=function(q,r,t,u){n.prototype.Wn.call(this,q,r,t,u);this.Ava=u;this.Y3()};l.prototype.oD=
function(){var q=this;n.prototype.oD.call(this);this.Ab().forEach(function(r){q.Pp.includes(r)||(q.wa().removeChild(r.wa()),r.oD())});this.Pp=this.Ab()};l.prototype.Y3=function(){var q=this;this.i_a()&&(this.WZ!=g.Nqa||this.my)&&this.Pp.length!=0&&(this.Pp.forEach(function(r){var t;r.z6(q.jI,q.vR)?(r.Wn(q.Wb(),q.jI,q.vR,q.Ava),q.wa().appendChild(r.wa())):console.error("Child of class "+r.Pz()+" is not compatible with visuals type: "+((t=q.jI)===null||t===void 0?void 0:t.getType()))}),this.Pp=[],this.jc(),
this.wf())};l.prototype.yX=function(q){this.Wm!=q&&(this.Wm&&this.Wm.gOa(null),(this.Wm=q)&&this.Wm.gOa(this))};l.prototype.eb=function(){var q=!1,r=this.G("layout");if(this.S("layout")){switch(r){case e.bB:this.yX(new c);break;case e.Wh:this.yX(new d);break;case e.Tj:this.yX(new f);break;default:this.yX(new b)}this.$("layout");q=!0}var t=this.Wm;if(this.S("horizontalAlign")||q)t.cP(this.G("horizontalAlign")),this.$("horizontalAlign");if(this.S("verticalAlign")||q)t.iP(this.G("verticalAlign")),this.$("verticalAlign");
if(this.S("gap")||q)r==e.bB?(t.LNa(this.G("gap")),t.A8(this.G("gap"))):r==e.Wh?t.LNa(this.G("gap")):r==e.Tj&&t.A8(this.G("gap")),this.$("gap");if(r==e.bB){if(this.S("itemWidth")||q){var u=this.G("itemWidth"),v=p.pp(u);v!==void 0?t.Ogb(v):t.Hgb(u);this.$("itemWidth")}if(this.S("itemHeight")||q)u=this.G("itemHeight"),v=p.pp(u),v!==void 0?t.Ngb(v):t.Ggb(u),this.$("itemHeight");this.S("itemMinWidth")&&(t.Mgb(this.G("itemMinWidth")),this.$("itemMinWidth"));this.S("itemMinHeight")&&(t.Lgb(this.G("itemMinHeight")),
this.$("itemMinHeight"));this.S("itemMaxWidth")&&(t.Kgb(this.G("itemMaxWidth")),this.$("itemMaxWidth"));this.S("itemMaxHeight")&&(t.Jgb(this.G("itemMaxHeight")),this.$("itemMaxHeight"))}this.S("childrenInteractionEnabled")&&(this.$("childrenInteractionEnabled"),this.YDa());this.Oc(["cursor"],{cursor:"inheritedCursor"},this.oe,!0,!1);p.prototype.eb.call(this);r==e.bB&&t.qgb(this.Co)};l.prototype.Oc=function(q,r,t,u,v){for(var w=0;w<q.length;w++){var y=q[w];if(!u||this.S(y)){for(var x=0;x<t.length;x++)t[x].set(r[y]?
r[y]:y,this.G(y));v&&this.$(y)}}};l.prototype.xy=function(){if(this.Wm){var q=this.Wm.measure();this.$m=q.width;this.Zm=q.height;this.VR=q.minWidth;this.UR=q.minHeight}else n.prototype.xy.call(this)};l.prototype.Ck=function(){this.Wm&&this.Wm.update();p.prototype.Ck.call(this)};l.ad=Object.assign({},p.ad,{children:[[]],childrenInteractionEnabled:!0,gap:0,horizontalAlign:h.$a,itemHeight:void 0,itemMaxHeight:void 0,itemMaxWidth:void 0,itemMinHeight:void 0,itemMinWidth:void 0,itemWidth:void 0,layout:e.oY,
verticalAlign:h.Tc});return l}(p)});define("tdv/view/core/visuals/Visuals",["require","exports","tdv/events/EventDispatcher"],function(a,m,k){return function(p){function h(){var g=p.call(this)||this;g.J=g.hp();return g}P(h,p);h.prototype.hp=function(){throw Error("Not implemented");};h.prototype.TOa=function(g){var e=this;Object.keys(g).forEach(function(b){e.J[b]=g[b]})};return h}(k)});
define("tdv/view/core/visuals/util",["require","exports"],function(){var a={UFa:function(m){var k=[];if(m.lk&&m.lk.length>0){var p=m.lk.slice();p=[].concat([p[0]],p,[p[p.length-1]]);m=a.F9a(m);m=[].concat([0],m,[1]);for(var h=0;h<p.length;h++){var g=m[h];g>=0&&k.push({color:p[h],ratio:g})}for(h=0;h<k.length-1;)k[h].ratio==k[h+1].ratio&&k[h].color==k[h+1].color?k.splice(h,1):h++;for(h=1;h<k.length-1;)k[h-1].ratio==k[h+1].ratio?k.splice(h,1):h++}return k},F9a:function(m){var k=m.lk.length;for(m=m.O4&&
m.lk.length>0?m.O4.map(function(p){return Math.min(1,Math.max(0,p))}):k==1?[.5]:Array.from({length:k}).map(function(p,h){return 1*h/(k-1)});m.length<k;)m.push(1);m.length>k&&m.splice(k,m.length-k);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,k,p,h,g,e,b){return function(c){function d(){var f=c.call(this)||this;f.element=null;f.Ak=null;f.Fe=null;f.xh=null;f.ol=null;f.Kv=null;f.iHa=!1;return f}P(d,c);d.prototype.hp=function(){return new p};d.prototype.kk=function(f){this.xD().appendChild(f)};
d.prototype.X7=function(f){this.xD().removeChild(f)};d.prototype.appendChild=function(f){this.xD().appendChild(f.ac())};d.prototype.zJa=function(f,n){this.xD().insertBefore(f.ac(),n.ac().nextSibling)};d.prototype.AJa=function(f,n){this.xD().insertBefore(f.ac(),n.ac())};d.prototype.removeChild=function(f){f=f.ac();f.parentElement==this.xD()&&this.xD().removeChild(f)};d.prototype.ac=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=h.usa);return this.element};d.prototype.AIa=function(f){var n=b.offset(this.element);f=b.offset(f.ac());return{left:n.left-f.left,top:n.top-f.top}};d.prototype.Wbb=function(){this.Ak||(this.Ak=document.createElement("div"),this.Ak.setAttribute("tdvlayer","shadow"),
this.Ak.style.position="absolute",this.Ak.style.left="0",this.Ak.style.top="0",this.Ak.style.right="0",this.Ak.style.bottom="0",this.Ak.style.zIndex=h.pSa);return this.Ak};d.prototype.fma=function(){this.xh||(this.xh=document.createElement("div"),this.xh.setAttribute("tdvlayer","overShadow"),this.xh.style.cursor="inherit",this.xh.style.height="0",this.xh.style.left="0",this.xh.style.position="absolute",this.xh.style.top="0",this.xh.style.width="0",this.xh.style.zIndex=h.Rra);return this.xh};d.prototype.Wab=
function(){this.Fe||(this.Fe=document.createElement("canvas"),this.Fe.setAttribute("tdvlayer","background"),this.Fe.style.cursor="inherit",this.Fe.style.display="none",this.Fe.style.left="0",this.Fe.style.position="absolute",this.Fe.style.top="0",this.Fe.style.userSelect="none",this.Fe.style["-webkit-user-select"]="none",this.Fe.style.zIndex=h.v9);return this.Fe};d.prototype.DIa=function(){this.ol||(this.ol=document.createElement("div"),this.ol.setAttribute("tdvlayer","content"),this.ol.style.position=
"absolute",this.ol.style.cursor="inherit",this.ol.style.inset="0",this.ol.style.overflow="visible",this.ol.style.zIndex=h.Kqa);return this.ol};d.prototype.xD=function(){this.Kv||(this.Kv=document.createElement("div"),this.Kv.style.cursor="inherit",this.Kv.style.inset="0",this.Kv.style.position="absolute");return this.Kv};d.prototype.kjb=function(){this.iHa||(this.iHa=!0,this.Dz())};d.prototype.Dz=function(){this.ac().appendChild(this.Wbb());this.ac().appendChild(this.fma());this.fma().appendChild(this.Wab());
this.fma().appendChild(this.DIa());this.DIa().appendChild(this.xD())};d.prototype.update=function(f){this.kjb();this.hh(f);this.TOa(f)};d.prototype.hh=function(f){this.sjb(f);this.TJ(f);this.Ejb(f);this.Xib(f);this.vqa(f)};d.prototype.sjb=function(f){this.J.id!==f.id&&(f.id?this.element.setAttribute("id",f.id.toString()):this.element.removeAttribute("id"));this.J.className!==f.className&&(f.className?this.element.setAttribute("tdvclass",f.className):this.element.removeAttribute("tdvclass"));this.J.tabIndex!==
f.tabIndex&&(f.tabIndex!==void 0?this.element.setAttribute("tabIndex",f.tabIndex.toString()):this.element.removeAttribute("tabIndex"));this.J.ariaLabel!==f.ariaLabel&&(f.ariaLabel?this.element.setAttribute("aria-label",f.ariaLabel):this.element.removeAttribute("aria-label"));this.J.BN!==f.BN&&(f.BN?this.element.setAttribute("aria-role",f.BN):this.element.removeAttribute("aria-role"));this.J.XI!==f.XI&&(f.XI?(this.xh.style.zIndex=h.Rra,this.ol.style.zIndex=h.Kqa):(this.xh.style.zIndex=h.WRa,this.ol.style.zIndex=
h.FQa));this.J.RW!==f.RW&&(this.element.style.zIndex=f.RW?h.usa:h.ISa);this.J.cursor!==f.cursor&&(this.element.style.cursor=f.cursor)};d.prototype.TJ=function(f){this.J.opacity!==f.opacity&&(this.element.style.opacity=f.opacity.toString());if(this.J.x!==f.x||this.J.y!==f.y||this.J.width!==f.width||this.J.height!==f.height||this.J.offsetX!==f.offsetX||this.J.offsetY!==f.offsetY||this.J.visible!==f.visible)f.visible?(this.xh.style.width=f.width+"px",this.xh.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.xh.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.xh.style.width=
"0",this.xh.style.height="0")};d.prototype.vqa=function(f){this.J.lw!==f.lw&&(this.ol.style.overflow=f.lw?"visible":"hidden",this.Kv.style.right=f.lw?"0":"initial",this.Kv.style.bottom=f.lw?"0":"initial");this.J.Bd!==f.Bd&&(this.ol.style.left=f.Bd+"px");this.J.ge!==f.ge&&(this.ol.style.top=f.ge+"px");this.J.ze!==f.ze&&(this.ol.style.right=f.ze+"px");this.J.Af!==f.Af&&(this.ol.style.bottom=f.Af+"px");this.J.Kc!==f.Kc&&(this.Kv.style.left=-f.Kc+"px");this.J.Lc!==f.Lc&&(this.Kv.style.top=-f.Lc+"px")};
d.prototype.Ejb=function(f){if(this.J.borderTopLeftRadius!==f.borderTopLeftRadius||this.J.borderTopRightRadius!==f.borderTopRightRadius||this.J.borderBottomLeftRadius!==f.borderBottomLeftRadius||this.J.borderBottomRightRadius!==f.borderBottomRightRadius||this.J.CA!==f.CA||this.J.Rt!==f.Rt||this.J.St!==f.St||this.J.Xn!==f.Xn||this.J.GJ!==f.GJ||this.J.shadowColor!==f.shadowColor||this.J.Cw!==f.Cw){var n=f.Rt+"px "+f.St+"px "+f.Xn+"px "+f.GJ+"px "+f.shadowColor;this.Ak.style.display=f.CA?"block":"none";
this.Ak.style.boxShadow=n;this.Ak.style.borderTopLeftRadius=f.borderTopLeftRadius+"px";this.Ak.style.borderTopRightRadius=f.borderTopRightRadius+"px";this.Ak.style.borderBottomLeftRadius=f.borderBottomLeftRadius+"px";this.Ak.style.borderBottomRightRadius=f.borderBottomRightRadius+"px";this.Ak.style.opacity=f.Cw.toString()}};d.prototype.Xib=function(f){if(this.J.width!==f.width||this.J.height!==f.height||this.J.lk!==f.lk||this.J.jD!==f.jD||this.J.hm!==f.hm||this.J.Ne!==f.Ne||this.J.borderLeftColor!==
f.borderLeftColor||this.J.Oe!==f.Oe||this.J.borderTopColor!==f.borderTopColor||this.J.tf!==f.tf||this.J.borderRightColor!==f.borderRightColor||this.J.sf!==f.sf||this.J.borderBottomColor!==f.borderBottomColor||this.J.Ev!==f.Ev||this.J.visible!==f.visible){var n=f.lk&&f.lk.length>0,l=!!f.Ev,q=f.Ne>0&&f.borderLeftColor||f.Oe>0&&f.borderTopColor||f.tf>0&&f.borderRightColor||f.sf>0&&f.borderBottomColor;if(f.visible&&(n||l||q)){q=Math.max(0,f.width-(f.Ne+f.tf));var r=Math.max(0,f.height-(f.Oe+f.sf));this.Fe.width=
q;this.Fe.height=r;var t=this.Fe.getContext("2d");if(n){n=e.UFa(f);var u=f.jD==k.MY?t.createLinearGradient(0,0,q,0):t.createLinearGradient(0,0,0,r);n.forEach(function(v){u.addColorStop(v.ratio,v.color)});t.fillStyle=u;t.fillRect(0,0,q,r)}else t.clearRect(0,0,q,r);l&&t.drawImage(f.Ev,0,0,q,r);this.Fe.style.opacity=f.hm.toString();this.Fe.style.borderTopLeftRadius=f.borderTopLeftRadius+"px";this.Fe.style.borderTopRightRadius=f.borderTopRightRadius+"px";this.Fe.style.borderBottomLeftRadius=f.borderBottomLeftRadius+
"px";this.Fe.style.borderBottomRightRadius=f.borderBottomRightRadius+"px";this.Fe.style.borderLeft=this.J5(f.Ne,f.borderLeftColor);this.Fe.style.borderTop=this.J5(f.Oe,f.borderTopColor);this.Fe.style.borderRight=this.J5(f.tf,f.borderRightColor);this.Fe.style.borderBottom=this.J5(f.sf,f.borderBottomColor);this.Fe.style.width=q+"px";this.Fe.style.height=r+"px";this.Fe.style.display="block";this.Fe.clientWidth===0&&this.Fe.width!==0&&(this.Fe.style.width="0",this.Fe.style.width=this.Fe.width+"px")}else this.Fe.style.display=
"none"}};d.prototype.J5=function(f,n){return f>0?n?f+"px solid "+n:f+"px solid transparent":"none"};return d}(g)});define("tdv/view/core/visualprops/ContainerVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,k){return function(p){function h(){var g=p!==null&&p.apply(this,arguments)||this;g.contentHeight=0;g.contentWidth=0;g.uk=!1;g.Ng=0;g.xf=0;g.Kt="#000000";g.Lt=.5;g.gh=10;g.Qn=5;g.Rn=5;g.Dk=!1;return g}P(h,p);return h}(k)});
define("tdv/constants/Key",["require","exports"],function(){var a={Sj:38,yi:40,Cb:39,$a:37,uK:32,yp:65,WSa:90,lo:87,io:83,Dp:68,Q:81,E:69,TY:187,PY:189,CY:27,ua:{}};a.ua.Sj="ArrowUp";a.ua.yi="ArrowDown";a.ua.Cb="ArrowRight";a.ua.$a="ArrowLeft";a.ua.yp="KeyA";a.ua.WSa="KeyZ";a.ua.lo="KeyW";a.ua.io="KeyS";a.ua.Dp="KeyD";a.ua.Q="KeyQ";a.ua.E="KeyE";a.ua.TY="BracketRight";a.ua.PY="Slash";a.ua.CY="Escape";a.ua.uK="Space";a.ua.BY="Enter";return a});
define("tdv/view/util/KeyboardControl",["require","exports","tdv/constants/EventName","tdv/constants/Key","tdv/events/EventDispatcher"],function(a,m,k,p,h){a=function(){function e(){}e.lp=function(){return document.activeElement&&document.activeElement!==document.body};e.pbb=function(){return document.activeElement};e.ndb=function(b){return Array.isArray(b)?b.includes(document.activeElement):b==document.activeElement};e.Aoa=function(b,c){b===void 0&&(b=void 0);c===void 0&&(c=void 0);this.Kj||(this.Kj=
document.createElement("div"));document.querySelectorAll("*[tabindex]").forEach(function(d){d.tabIndex>this.Kj.tabIndex&&(this.Kj.tabIndex=d.tabIndex+1)}.bind(this));document.body.appendChild(this.Kj);b!=void 0&&c!=void 0?(this.Kj.style.position="absolute",this.Kj.style.top=c+"px",this.Kj.style.left=b+"px",this.Kj.style.width="1px",this.Kj.style.height="1px"):(this.Kj.style.position="fixed",this.Kj.style.top="0",this.Kj.style.left="0",this.Kj.style.width="100%",this.Kj.style.height="100%");this.Kj.focus();
this.Kj.blur();document.body.removeChild(this.Kj);this.IV.o(k.V)};e.blur=function(){document.activeElement.blur()};e.vka=function(b){this.vV.push(b)};e.poa=function(b){b=this.vV.indexOf(b);b!=-1&&this.vV.splice(b,1)};e.j9a=function(b){this.nX.push(b)};e.Dfb=function(b){b=this.nX.indexOf(b);b!=-1&&this.nX.splice(b,1)};e.tFa=function(b,c){this.Poa(b,c.map(function(d){return[d]}))};e.$8a=function(b,c){this.Poa(b,[c])};e.X8a=function(b,c,d,f){for(var n=[],l=0;l<d;l++)n.push(c.slice(l*f,(l+1)*f));this.Poa(b,
n)};e.Poa=function(b,c){this.dla.set(b,new g(c))};e.ooa=function(b){this.dla.delete(b)};e.Lna=function(b){if(b.code==p.ua.uK||b.code==p.ua.BY){var c=this.EIa();c&&this.kab(c)}else b.code!=p.ua.CY&&[p.ua.Sj,p.ua.yi,p.ua.Cb,p.ua.$a].includes(b.code)&&this.dla.forEach(function(d){d.wcb()&&d.Nab(b.code)})};e.Mna=function(b){b.code==p.ua.uK||b.code==p.ua.BY?(b=this.EIa())?b.dispatchEvent(this.FGa("mouseup",b)):this.nX.length&&this.nX.pop()():b.code==p.ua.CY&&(this.vV.length?this.vV.pop()():this.lp()&&
this.Aoa())};e.ef=function(b){!b.isTrusted||b.target&&["BUTTON","INPUT","SELECT","TEXTAREA"].includes(b.target.tagName)||setTimeout(function(){this.Aoa(b.pageX,b.pageY)}.bind(this),0)};e.leb=function(){this.IV.o(k.V)};e.kab=function(b){b.dispatchEvent(this.FGa("mousedown",b))};e.EIa=function(){return this.lp()?document.activeElement:null};e.FGa=function(b,c){c=c.getBoundingClientRect();return new window.MouseEvent(b,{clientX:c.left+c.width/2,clientY:c.top+c.height/2})};e.Ya=function(){document.addEventListener("mouseup",
this.ef.bind(this),!0);document.addEventListener("keydown",this.Lna.bind(this),!0);document.addEventListener("keyup",this.Mna.bind(this),!0);document.addEventListener("focusin",this.leb.bind(this),!0)};e.IV=new h;e.Kj=null;e.vV=[];e.nX=[];e.dla=new Map;return e}();var g=function(){function e(b){b===void 0&&(b=[]);this.XN=b}e.prototype.wcb=function(){return this.ZHa()!=null};e.prototype.ZHa=function(){for(var b=document.activeElement,c=0;c<this.XN.length;c++)for(var d=0;d<this.XN[c].length;d++)if(this.XN[c][d]==
b)return{Rfb:c,m$a:d};return null};e.prototype.Nab=function(b){var c=this.ZHa();if(c!=null){var d=0,f=0;switch(b){case p.ua.Cb:d=1;break;case p.ua.$a:d=-1;break;case p.ua.Sj:f=-1;break;case p.ua.yi:f=1}b=c.Rfb+f;b<0||b>=this.XN.length||(c=c.m$a+d,c<0||c>=this.XN[b].length||this.XN[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,k,p,h,g,e,b,c,d,f,n,l,q){return function(r){function t(){var u=
r.call(this)||this;u.cf("ScrollableContainer");u.Dua=0;u.Eua=0;u.bn=!1;u.cn=!1;u.elb=!1;u.$kb=!1;u.Rha=!1;u.Hs=null;u.xga=g.fra;u.jR=!1;u.NU=!1;u.aha=void 0;u.bha=void 0;return u}P(t,r);t.prototype.aL=function(){return new d};t.prototype.sz=function(){r.prototype.sz.call(this);this.my?(q.IV.bind(k.V,this.bga,this,!1),this.bga()):q.IV.h(k.V,this.bga,this)};t.prototype.bga=function(){if(q.lp()){var u=this.wa();u&&u instanceof c&&(u=this.Ab().map(function(v){return v.wa().ac()}).indexOf(q.pbb()),u!==
-1&&this.scrollIntoView(this.Ab()[u]))}};t.prototype.scrollIntoView=function(u){var v=u.Sv(),w=u.Oz();this.scrollTo(Math.min(v,Math.max(v+u.cb()-this.u.xf,this.u.Kc)),Math.min(w,Math.max(w+u.Kb()-this.u.Ng,this.u.Lc)))};t.prototype.scrollTo=function(u,v){var w=this.u.Kc;u>this.u.Kc?this.W4()&&(w=Math.min(u,this.u.contentWidth-this.u.xf)):u<this.u.Kc&&this.V4()&&(w=Math.max(u,0));u=this.u.Lc;v>this.u.Lc?this.KN()&&(u=Math.min(v,this.u.contentHeight-this.u.Ng)):v<this.u.Lc&&this.MN()&&(u=Math.max(v,
0));this.cU(w,u)};t.prototype.hNa=function(){if(this.KN()){for(var u=Math.max(0,this.u.contentHeight-this.u.Ng),v=Math.min(u,this.u.Lc+this.u.Ng*.5),w=u=Math.min(u,this.u.Lc+this.u.Ng),y=this.Ab().slice(),x=y.shift();y.length;x=y.shift())if(x.get("visible")){var z=x.Oz();z+x.Kb()>this.u.Lc+this.u.Ng&&z>=v&&z<u&&z<w&&(w=z)}this.cU(this.u.Kc,w)}};t.prototype.KN=function(){return this.NN()&&this.u.Lc+this.u.Ng<this.u.contentHeight};t.prototype.lNa=function(){if(this.MN()){for(var u=Math.max(0,this.u.Lc-
this.u.Ng),v=Math.max(0,this.u.Lc-this.u.Ng*.5),w=u,y=this.Ab().slice(),x=y.shift();y.length;x=y.shift())if(x.get("visible")){var z=x.Oz();x=z+x.Kb();z<this.u.Lc&&x>=u+this.u.Ng&&x<v+this.u.Ng&&x>w+this.u.Ng&&(w=x-this.u.Ng)}this.cU(this.u.Kc,w)}};t.prototype.MN=function(){return this.NN()&&this.u.Lc>0};t.prototype.kNa=function(){if(this.W4()){for(var u=Math.max(0,this.u.contentWidth-this.u.xf),v=Math.min(u,this.u.Kc+this.u.xf*.5),w=u=Math.min(u,this.u.Kc+this.u.xf),y=this.Ab().slice(),x=y.shift();y.length;x=
y.shift())if(x.get("visible")){var z=x.Sv();z+x.cb()>this.u.Kc+this.u.xf&&z>=v&&z<u&&z<w&&(w=z)}this.cU(w,this.u.Lc)}};t.prototype.W4=function(){return this.LN()&&this.u.Kc+this.u.xf<this.u.contentWidth};t.prototype.scrollLeft=function(){if(this.V4()){for(var u=Math.max(0,this.u.Kc-this.u.xf),v=Math.max(0,this.u.Kc-this.u.xf*.5),w=u,y=this.Ab().slice(),x=y.shift();y.length;x=y.shift())if(x.get("visible")){var z=x.Sv();x=z+x.cb();z<this.u.Kc&&x>=u+this.u.xf&&x<v+this.u.xf&&x>w+this.u.xf&&(w=x-this.u.xf)}this.cU(w,
this.u.Lc)}};t.prototype.V4=function(){return this.LN()&&this.u.Kc>0};t.prototype.cU=function(u,v){this.yw(this.u.Kc!=u);this.zw(this.u.Lc!=v);this.HU();this.p9a(u,v)};t.prototype.NN=function(){return this.NU&&this.u.Ng<this.u.contentHeight};t.prototype.LN=function(){return this.jR&&this.u.xf<this.u.contentWidth};t.prototype.Nb=function(){this.zl(t.ad)};t.prototype.GO=function(u,v,w){var y=1,x=1;w=="content"?(y=this.u.contentWidth,x=this.u.contentHeight):w=="page"&&(y=this.u.xf,x=this.u.Ng);this.u.Kc+=
u*y;this.u.Lc+=v*x;this.aI()};t.prototype.p9a=function(u,v){var w=[];this.u.Kc!=u&&w.push(new l("hScrollPosition",this.u.Kc,u));this.u.Lc!=v&&w.push(new l("vScrollPosition",this.u.Lc,v));w.length!=0&&(this.Hs=new n("cubic_in_out",w,500),f.requestFrame(this.kga,this))};t.prototype.wFa=function(u,v,w){var y=[];u&&y.push(new l("hScrollPosition",this.u.Kc,this.u.Kc+u));v&&y.push(new l("vScrollPosition",this.u.Lc,this.u.Lc+v));y.length==0?this.Hs||(this.yw(!1),this.zw(!1)):(this.Hs=new n("linear",y,w),
f.requestFrame(this.kga,this))};t.prototype.kga=function(u){if(this.Hs&&!this.Hs.Qe()){this.Hs.Lb(u);var v=u=!1;this.Hs.PV("hScrollPosition")&&(this.u.Kc=this.Hs.ib("hScrollPosition"),u=this.u.Kc<0||this.u.Kc>this.u.contentWidth-this.u.xf?!1:!0);this.Hs.PV("vScrollPosition")&&(this.u.Lc=this.Hs.ib("vScrollPosition"),v=this.u.Lc<0||this.u.Lc>this.u.contentHeight-this.u.Ng?!1:!0);this.yw(u);this.zw(v);this.aI();f.requestFrame(this.kga,this)}else this.yw(!1),this.zw(!1),this.Hs=null};t.prototype.aI=
function(u){if(u){if(!this.jR)switch(this.G("horizontalAlign")){case h.Cb:this.u.Kc=this.u.contentWidth-this.u.xf;break;case h.Xe:this.u.Kc=(this.u.contentWidth-this.u.xf)/2;break;default:this.u.Kc=0}if(!this.NU)switch(this.G("verticalAlign")){case h.Fc:this.u.Lc=this.u.contentHeight-this.u.Ng;break;case h.Pd:this.u.Lc=(this.u.contentHeight-this.u.Ng)/2;break;default:this.u.Lc=0}}this.u.Kc=Math.max(0,Math.min(this.u.contentWidth-this.u.xf,this.u.Kc));this.u.Lc=Math.max(0,Math.min(this.u.contentHeight-
this.u.Ng,this.u.Lc));this.P4a(this.u.Kc);this.A5a(this.u.Lc);this.rb();if(this.aha!=this.u.Kc||this.bha!=this.u.Lc)this.aha!==void 0&&this.bha!==void 0&&this.o(new p(k.zr)),this.aha=this.u.Kc,this.bha=this.u.Lc};t.prototype.wE=function(u){this.Rha!==u&&(this.Rha=u,this.HU())};t.prototype.yw=function(u){this.bn!==u&&(this.bn=u,this.HU())};t.prototype.zw=function(u){this.cn!==u&&(this.cn=u,this.HU())};t.prototype.HU=function(){var u=this.get("scrollBarVisible")==e.ALWAYS||this.bn||this.cn||this.Rha;
this.u.uk=this.jR&&u;this.u.Dk=this.NU&&u;this.rb()};t.prototype.eb=function(){this.S("overflow")&&(this.xga=this.G("overflow"),this.$("overflow"),this.wf());this.S("scrollBarColor")&&(this.u.Kt=this.G("scrollBarColor"),this.$("scrollBarColor"));this.S("scrollBarWidth")&&(this.u.gh=this.G("scrollBarWidth"),this.$("scrollBarWidth"));if(this.S("scrollBarMargin")||this.S("scrollBarVerticalMargin")||this.S("scrollBarHorizontalMargin"))this.u.Qn=this.G("scrollBarHorizontalMargin","scrollBarMargin"),this.u.Rn=
this.G("scrollBarVerticalMargin","scrollBarMargin"),this.$("scrollBarMargin"),this.$("scrollBarVerticalMargin"),this.$("scrollBarHorizontalMargin");this.S("scrollBarOpacity")&&(this.u.Lt=this.G("scrollBarOpacity"),this.$("scrollBarOpacity"));r.prototype.eb.call(this)};t.prototype.Ck=function(){r.prototype.Ck.call(this);this.w7a();this.T7a();this.R7a();this.HU();this.rb()};t.prototype.w7a=function(){for(var u=0,v=0,w=0,y=0,x=this.Ab(),z=0;z<x.length;z++){var A=x[z];A.get("visible")&&(y=Math.min(y,
A.Sv()),w=Math.min(w,A.Oz()),u=Math.max(u,A.Sv()+A.cb()),v=Math.max(v,A.Oz()+A.Kb()))}this.Dua=y;this.Eua=w;this.u.contentWidth=u;this.u.contentHeight=v};t.prototype.T7a=function(){this.u.xf=Math.min(this.Ph(),this.u.contentWidth);this.u.Ng=Math.min(this.Oh(),this.u.contentHeight)};t.prototype.R7a=function(){var u=this.oe.some(function(w){return w.Dcb()}),v=this.Dua<0||this.Eua<0||this.u.contentWidth>this.u.xf||this.u.contentHeight>this.u.Ng;this.xga==g.zr?(this.jR=this.u.xf<this.u.contentWidth,this.NU=
this.u.Ng<this.u.contentHeight,this.PM(!v&&!u)):(this.NU=this.jR=!1,this.xga==g.wK?this.PM(!0):this.PM(!v&&!u));this.aI(!0)};t.ad=Object.assign({},b.ad,{overflow:g.wK,scrollBarColor:"#000000",scrollBarWidth:10,scrollBarMargin:5,scrollBarHorizontalMargin:void 0,scrollBarVerticalMargin:void 0,scrollBarOpacity:.5,scrollBarVisible:e.rc});return t}(b)});
define("tdv/view/containers/Container",["require","exports","tdv/view/containers/ScrollableContainer"],function(a,m,k){return function(p){function h(){var g=p.call(this)||this;g.cf("Container");return g}P(h,p);return h}(k)});define("tdv/view/constants/Direction",["require","exports"],function(){return{Tj:"vertical",Wh:"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,k,p,h){return function(g){function e(){var b=g!==null&&g.apply(this,arguments)||this;b.direction=h.Wh;b.it=void 0;b.fontFamily=void 0;b.A5=!1;b.fontSize=void 0;b.fontStyle="normal";b.fontWeight="normal";b.sh=p.$a;b.verticalAlign=p.Pd;b.textDecoration="none";b.Vt=0;b.Wt=0;b.Yn=3;b.Ew=0;b.Dw="#000000";
b.text="";return b}P(e,g);return e}(k)});
define("tdv/view/util/Font",["require","exports"],function(){return function(){function a(){}a.Lz=function(m){return m?m.split(",").map(function(k){return k.trim()}).filter(function(k){return k!=""}).map(function(k){k[0]!="'"&&k[0]!='"'&&(k="'"+k+"'");return k}).join(", "):""};a.d6=function(m){var k=[];m.fontStyle?k.push(m.fontStyle):k.push("normal");m.fontWeight?k.push(m.fontWeight):k.push("normal");m.fontSize?typeof m.fontSize==="number"?k.push(m.fontSize+"px"):k.push(m.fontSize):k.push("12px");
m.fontFamily?k.push(a.Lz(m.fontFamily)):k.push("Arial");return k.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,k,p,h,g,e,b){a=function(d){function f(){var n=d.call(this)||this;n.lfa=null;n.cf("Label");n.PM(!1);return n}P(f,d);f.prototype.wa=function(){return d.prototype.wa.call(this)};f.prototype.aL=function(){return new e};f.prototype.Nb=function(){this.zl(f.ad)};f.prototype.xy=
function(){this.Zt();d.prototype.xy.call(this);this.$m=this.LI()+this.u.Bd+this.u.ze;this.Zm=this.KI()+this.u.ge+this.u.Af;c(this)};f.prototype.l3=function(n){this.u.text!==n&&(this.u.text=n,setTimeout(function(){this.jc();this.rb()}.bind(this),0))};f.prototype.w4a=function(n){this.u.direction!==n&&(this.u.direction=n,setTimeout(function(){this.jc();this.rb()}.bind(this),0))};f.prototype.E4a=function(n){this.u.fontFamily!==n&&(this.u.fontFamily=n,this.s6(),this.jc(),this.rb())};f.prototype.F4a=function(n){this.u.fontSize!==
n&&(k.LJa(n)?this.u.fontSize=n:k.Yz(n)&&n.match(/^\d+(\.\d+)?px$/)?this.u.fontSize=parseFloat(n):this.u.fontSize=void 0,this.s6(),this.jc(),this.wf(),this.rb())};f.prototype.D4a=function(n){this.u.it!==n&&(this.u.it=n,this.rb())};f.prototype.H4a=function(n){if(this.u.fontWeight!==n){switch(n){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:n="normal"}this.u.fontWeight=n;this.s6();
this.jc();this.rb()}};f.prototype.G4a=function(n){if(this.u.fontStyle!==n){switch(n){case "italic":case "normal":break;default:n="normal"}this.u.fontStyle=n;this.s6();this.jc();this.rb()}};f.prototype.s5a=function(n){if(this.u.textDecoration!==n){switch(n){case "underline":case "overline":case "line-through":case "none":break;default:n="none"}this.u.textDecoration=n;this.jc();this.rb()}};f.prototype.O4a=function(n){this.u.sh!==n&&(this.u.sh=n,this.rb())};f.prototype.z5a=function(n){this.u.verticalAlign!==
n&&(this.u.verticalAlign=n,this.rb())};f.prototype.nCa=function(n){this.u.A5!==n&&(this.u.A5=n,this.jc(),this.rb())};f.prototype.t5a=function(n,l,q,r,t){if(this.u.Vt!==n||this.u.Wt!==l||this.u.Yn!==q||this.u.Ew!==r||this.u.Dw!==t)this.u.Vt=n,this.u.Wt=l,this.u.Yn=q,this.u.Ew=r,this.u.Dw=t,this.rb()};f.prototype.eb=function(){var n=this;this.S("direction")&&(this.w4a(this.G("direction")),this.$("direction"));if(this.S("text")){var l=this.G("text");this.l3(l===void 0?"":l.toString());this.$("text")}this.S("fontFamily")&&
(this.E4a(this.G("fontFamily")),this.$("fontFamily"));this.S("fontSize")&&(this.F4a(this.G("fontSize")),this.$("fontSize"));this.S("fontColor")&&(this.D4a(this.G("fontColor")),this.$("fontColor"));this.S("fontWeight")&&(this.H4a(this.G("fontWeight")),this.$("fontWeight"));this.S("fontStyle")&&(this.G4a(this.G("fontStyle")),this.$("fontStyle"));this.S("textDecoration")&&(this.s5a(this.G("textDecoration")),this.$("textDecoration"));this.S("horizontalAlign")&&(this.O4a(this.G("horizontalAlign")),this.wf(),
this.$("horizontalAlign"));this.S("verticalAlign")&&(this.z5a(this.G("verticalAlign")),this.wf(),this.$("verticalAlign"));l=["textShadowColor","textShadowHorizontalLength","textShadowVerticalLength","textShadowBlurRadius","textShadowOpacity"];if(l.some(function(r){return n.S(r)})){var q={};l.forEach(function(r){q[r]=n.G(r);n.$(r)});this.t5a(q.textShadowHorizontalLength,q.textShadowVerticalLength,q.textShadowBlurRadius,q.textShadowOpacity,q.textShadowColor);this.PM((q.textShadowHorizontalLength>0||
q.textShadowVerticalLength>0||q.textShadowBlurRadius>0)&&q.textShadowOpacity>0)}d.prototype.eb.call(this)};f.prototype.s6=function(){var n=this,l=b.d6({fontSize:this.u.fontSize,fontFamily:this.u.fontFamily,fontWeight:this.u.fontWeight,fontStyle:this.u.fontStyle});this.lfa!==l&&(this.nCa(!1),this.lfa=l,document.fonts.load(l).then(function(){n.lfa===l&&n.nCa(!0)}))};f.prototype.LI=function(){return this.wa().LI()};f.prototype.KI=function(){return this.wa().KI()};f.ad=Object.assign({},g.ad,{fontFamily:void 0,
fontSize:void 0,fontColor:void 0,fontWeight:void 0,fontStyle:void 0,horizontalAlign:p.$a,verticalAlign:p.Pd,direction:h.Wh,text:"",textDecoration:void 0,textShadowBlurRadius:3,textShadowColor:"#000000",textShadowHorizontalLength:0,textShadowOpacity:0,textShadowVerticalLength:0});return f}(g);var c=function(){function d(){l||f()&&(l=setTimeout(function(){l=null;var q=(new Date).getTime()-5E3,r;for(r in n){var t=n[r];t.timestamp<q&&delete n[r];var u=t.label;if(t.width!=u.LI()||t.height!=u.KI())u.jc(),
u.wf()}d()},500))}function f(){for(var q in n)return!0;return!1}var n={},l=null;return function(q){n[q.FG]={label:q,timestamp:(new Date).getTime(),width:q.LI(),height:q.KI()};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,k,p,h,g,e,b,c,d,f,n){var l="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),
q={};l.forEach(function(r){q[r]=r});return function(r){function t(){var u=r.call(this)||this;u.cf("Button");u.opa("Button");u.Wa=null;u.sj=null;u.set("childrenInteractionEnabled",!1);u.set("contentOpaque",!0);u.set("creationPolicy",k.mK);u.set("overflow",c.fra);u.set("autoRolledOver",!0);u.set("autoPressed",!0);u.set("cursor",p.hf);u.set("ariaRole","button");return u}P(t,r);t.prototype.Nb=function(){r.prototype.Nb.call(this);this.j("label");this.j("fontFamily");this.j("fontSize");this.j("fontColor");
this.j("fontWeight");this.j("fontStyle");this.j("textDecoration");this.j("textShadowBlurRadius");this.j("textShadowColor");this.j("textShadowHorizontalLength");this.j("textShadowOpacity");this.j("textShadowVerticalLength");this.j("layout","horizontal");this.j("iconWidth");this.j("iconHeight");this.j("iconBeforeLabel");this.j("gap",5);this.j("mode",b.jf);this.j("buttonGroup");this.j("paddingLeft",5);this.j("paddingTop",5);this.j("paddingRight",5);this.j("paddingBottom",5);this.j("pressed");this.D("rollOverOpacity",
d.fa,"opacity");this.D("rollOverIconWidth",d.fa,"iconWidth");this.D("rollOverIconHeight",d.fa,"iconHeight");this.D("rollOverFontSize",d.fa,"fontSize");this.D("rollOverFontColor",d.fa,"fontColor");this.D("rollOverFontWeight",d.fa,"fontWeight");this.D("rollOverFontStyle",d.fa,"fontStyle");this.D("rollOverTextDecoration",d.fa,"textDecoration");this.D("rollOverTextShadowBlurRadius",d.fa,"textShadowBlurRadius");this.D("rollOverTextShadowColor",d.fa,"textShadowColor");this.D("rollOverTextShadowHorizontalLength",
d.fa,"textShadowHorizontalLength");this.D("rollOverTextShadowOpacity",d.fa,"textShadowOpacity");this.D("rollOverTextShadowVerticalLength",d.fa,"textShadowVerticalLength");this.D("rollOverBorderSize",d.fa,"borderSize");this.D("rollOverBorderLeftSize",d.fa,"borderLeftSize");this.D("rollOverBorderTopSize",d.fa,"borderTopSize");this.D("rollOverBorderRightSize",d.fa,"borderRightSize");this.D("rollOverBorderBottomSize",d.fa,"borderBottomSize");this.D("rollOverBorderColor",d.fa,"borderColor");this.D("rollOverBorderLeftColor",
d.fa,"borderLeftColor");this.D("rollOverBorderTopColor",d.fa,"borderTopColor");this.D("rollOverBorderRightColor",d.fa,"borderRightColor");this.D("rollOverBorderBottomColor",d.fa,"borderBottomColor");this.D("rollOverShadow",d.fa,"shadow");this.D("rollOverShadowHorizontalLength",d.fa,"shadowHorizontalLength");this.D("rollOverShadowVerticalLength",d.fa,"shadowVerticalLength");this.D("rollOverShadowBlurRadius",d.fa,"shadowBlurRadius");this.D("rollOverShadowSpread",d.fa,"shadowSpread");this.D("rollOverShadowOpacity",
d.fa,"shadowOpacity");this.D("rollOverShadowColor",d.fa,"shadowColor");this.D("rollOverBackgroundOpacity",d.fa,"backgroundOpacity");this.D("rollOverBackgroundColor",d.fa,"backgroundColor");this.D("rollOverBackgroundColorRatios",d.fa,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",d.fa,"backgroundColorDirection");this.D("pressedLabel",d.Mb,"label");this.D("pressedOpacity",d.Mb,"opacity");this.D("pressedIconWidth",d.Mb,"iconWidth");this.D("pressedIconHeight",d.Mb,"iconHeight");this.D("pressedFontSize",
d.Mb,"fontSize");this.D("pressedFontColor",d.Mb,"fontColor");this.D("pressedFontWeight",d.Mb,"fontWeight");this.D("pressedFontStyle",d.Mb,"fontStyle");this.D("pressedTextDecoration",d.Mb,"textDecoration");this.D("pressedTextShadowBlurRadius",d.Mb,"textShadowBlurRadius");this.D("pressedTextShadowColor",d.Mb,"textShadowColor");this.D("pressedTextShadowHorizontalLength",d.Mb,"textShadowHorizontalLength");this.D("pressedTextShadowOpacity",d.Mb,"textShadowOpacity");this.D("pressedTextShadowVerticalLength",
d.Mb,"textShadowVerticalLength");this.D("pressedBorderSize",d.Mb,"borderSize");this.D("pressedBorderLeftSize",d.Mb,"borderLeftSize");this.D("pressedBorderTopSize",d.Mb,"borderTopSize");this.D("pressedBorderRightSize",d.Mb,"borderRightSize");this.D("pressedBorderBottomSize",d.Mb,"borderBottomSize");this.D("pressedBorderColor",d.Mb,"borderColor");this.D("pressedBorderLeftColor",d.Mb,"borderLeftColor");this.D("pressedBorderTopColor",d.Mb,"borderTopColor");this.D("pressedBorderRightColor",d.Mb,"borderRightColor");
this.D("pressedBorderBottomColor",d.Mb,"borderBottomColor");this.D("pressedShadow",d.Mb,"shadow");this.D("pressedShadowHorizontalLength",d.Mb,"shadowHorizontalLength");this.D("pressedShadowVerticalLength",d.Mb,"shadowVerticalLength");this.D("pressedShadowBlurRadius",d.Mb,"shadowBlurRadius");this.D("pressedShadowSpread",d.Mb,"shadowSpread");this.D("pressedShadowOpacity",d.Mb,"shadowOpacity");this.D("pressedShadowColor",d.Mb,"shadowColor");this.D("pressedBackgroundOpacity",d.Mb,"backgroundOpacity");
this.D("pressedBackgroundColor",d.Mb,"backgroundColor");this.D("pressedBackgroundColorRatios",d.Mb,"backgroundColorRatios");this.D("pressedBackgroundColorDirection",d.Mb,"backgroundColorDirection");this.D("pressedLabel",d.vc,"label");this.D("pressedRollOverOpacity",d.vc,"opacity");this.D("pressedRollOverIconWidth",d.vc,"iconWidth");this.D("pressedRollOverIconHeight",d.vc,"iconHeight");this.D("pressedRollOverFontSize",d.vc,"fontSize");this.D("pressedRollOverFontColor",d.vc,"fontColor");this.D("pressedRollOverFontWeight",
d.vc,"fontWeight");this.D("pressedRollOverFontStyle",d.vc,"fontStyle");this.D("pressedRollOverTextDecoration",d.vc,"textDecoration");this.D("pressedRollOverTextShadowBlurRadius",d.vc,"textShadowBlurRadius");this.D("pressedRollOverTextShadowColor",d.vc,"textShadowColor");this.D("pressedRollOverTextShadowHorizontalLength",d.vc,"textShadowHorizontalLength");this.D("pressedRollOverTextShadowOpacity",d.vc,"textShadowOpacity");this.D("pressedRollOverTextShadowVerticalLength",d.vc,"textShadowVerticalLength");
this.D("pressedRollOverBorderSize",d.vc,"borderSize");this.D("pressedRollOverBorderLeftSize",d.vc,"borderLeftSize");this.D("pressedRollOverBorderTopSize",d.vc,"borderTopSize");this.D("pressedRollOverBorderRightSize",d.vc,"borderRightSize");this.D("pressedRollOverBorderBottomSize",d.vc,"borderBottomSize");this.D("pressedRollOverBorderColor",d.vc,"borderColor");this.D("pressedRollOverBorderLeftColor",d.vc,"borderLeftColor");this.D("pressedRollOverBorderTopColor",d.vc,"borderTopColor");this.D("pressedRollOverBorderRightColor",
d.vc,"borderRightColor");this.D("pressedRollOverBorderBottomColor",d.vc,"borderBottomColor");this.D("pressedRollOverShadow",d.vc,"shadow");this.D("pressedRollOverShadowHorizontalLength",d.vc,"shadowHorizontalLength");this.D("pressedRollOverShadowVerticalLength",d.vc,"shadowVerticalLength");this.D("pressedRollOverShadowBlurRadius",d.vc,"shadowBlurRadius");this.D("pressedRollOverShadowSpread",d.vc,"shadowSpread");this.D("pressedRollOverShadowOpacity",d.vc,"shadowOpacity");this.D("pressedRollOverShadowColor",
d.vc,"shadowColor");this.D("pressedRollOverBackgroundOpacity",d.vc,"backgroundOpacity");this.D("pressedRollOverBackgroundColor",d.vc,"backgroundColor");this.D("pressedRollOverBackgroundColorRatios",d.vc,"backgroundColorRatios");this.D("pressedRollOverBackgroundColorDirection",d.vc,"backgroundColorDirection")};t.prototype.Vba=function(){};t.prototype.Ib=function(){r.prototype.Ib.call(this);this.sj||(this.sj=this.Vba(),this.hb(this.sj));this.Wa||(this.Wa=new n,this.hb(this.Wa))};t.prototype.oQ=function(){this.get("pressed")?
(this.set("pressed",!1),this.o(new g(h.Im))):(this.set("pressed",!0),this.o(new g(h.Jk)))};t.prototype.xx=function(){return this.get("label")||r.prototype.xx.call(this)};t.prototype.eb=function(){var u=!1;this.S("mode")&&(this.G("mode")==b.jf?(this.h(h.oa,this.oQ,this),this.set("autoPressed",!0)):(this.bind(h.oa,this.oQ,this,!0),this.set("autoPressed",!1)),this.$("mode"),u=!0);if(u||this.S("pressed"))this.G("mode")==b.Mk?this.QM(this.G("pressed")==1):u&&this.QM(!1);this.S("label")&&(u=this.G("label"),
this.Wa.set("text",u),this.Wa.set("visible",u?!0:!1),this.$("label"));this.Oc(t.eTa,t.fTa,[this.Wa],!0,!0);this.S("iconBeforeLabel")&&(this.G("iconBeforeLabel")==0?this.Vq(this.Wa,0):this.Vq(this.sj,0),this.$("iconBeforeLabel"));this.S("iconWidth")&&(this.sj.set("width",this.G("iconWidth")),this.$("iconWidth"));this.S("iconHeight")&&(this.sj.set("height",this.G("iconHeight")),this.$("iconHeight"));this.S("buttonGroup")&&((u=this.G("buttonGroup"))?e.register(this,u):e.unregister(this),this.$("buttonGroup"));
this.Oc(["horizontalAlign","verticalAlign"],{},[this.sj],!0,!1);r.prototype.eb.call(this)};t.eTa=l;t.fTa=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"),k=a("tdv/view/buttons/BaseButton");return m.define("BaseButton",k,function(){k.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,k,p){return function(h){function g(){return h.call(this)||this}P(g,h);g.prototype.Nb=function(){this.zl(g.ad)};g.ad=Object.assign({},k.ad,{layout:p.Wh});return g}(k)});
define("tdv/view/containers/VerticalContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,k,p){return function(h){function g(){return h.call(this)||this}P(g,h);g.prototype.Nb=function(){this.zl(g.ad)};g.ad=Object.assign({},k.ad,{layout:p.Tj});return g}(k)});
define("tdv/view/core/visualprops/CanvasVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,k){return function(p){function h(){var g=p!==null&&p.apply(this,arguments)||this;g.canvas=null;g.jV=0;return g}P(h,p);return h}(k)});
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,k,p,h,g){return function(e){function b(){var c=e.call(this)||this;c.tVa=function(){c.lW()};c.cf("Canvas");c.Jca=!0;c.u.canvas=null;c.bind(k.Yb,c.tVa,c,!1);return c}P(b,e);b.prototype.aL=function(){return new g};b.prototype.lW=function(){this.Jca=!0;this.rb()};b.prototype.Ib=function(){e.prototype.Ib.call(this);
this.u.canvas||(this.u.canvas=document.createElement("canvas"))};b.prototype.eb=function(){this.Paa("paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "))&&this.lW();e.prototype.eb.call(this)};b.prototype.Zt=function(){this.Jca&&(this.Jca=!1,this.u.canvas.width=
this.Ph(),this.u.canvas.height=this.Oh(),this.u.jV+=1,this.eqa());e.prototype.Zt.call(this)};b.prototype.XHa=function(){return this.u.canvas.getContext("2d")};b.prototype.eqa=function(){this.o(new p(k.V))};return b}(h)});
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,k,p,h,g){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.Ck=function(){e.prototype.Ck.call(this)};b.prototype.Nb=function(){e.prototype.Nb.call(this);this.j("iconColor");this.D("rollOverIconColor",p.fa,"iconColor");this.D("pressedIconColor",p.Mb,"iconColor");this.D("pressedRollOverIconColor",
p.vc,"iconColor")};b.prototype.Vba=function(){var c=new g;c.bind(k.V,this.QPa,this,!0);return c};b.prototype.eb=function(){this.S("iconColor")&&(this.sj.lW(),this.$("iconColor"));e.prototype.eb.call(this)};b.prototype.bZa=function(){return this.G("iconColor")};b.prototype.cZa=function(){return this.sj.XHa()};b.prototype.QPa=function(){};return b}(h)});
define("tdv/view/buttons/CloseButton",["require","exports","tdv/view/buttons/CanvasButton","tdv/view/constants/Alignment","tdv/view/constants/State"],function(a,m,k,p,h){return function(g){function e(){var b=g.call(this)||this;b.xa({horizontalAlign:p.Xe,verticalAlign:p.Pd});return b}P(e,g);e.prototype.Nb=function(){g.prototype.Nb.call(this);this.j("iconLineWidth");this.D("rollOverIconLineWidth",h.fa,"iconLineWidth");this.D("pressedIconLineWidth",h.Mb,"iconLineWidth");this.D("pressedRollOverIconLineWidth",
h.vc,"iconLineWidth")};e.prototype.lZa=function(){return this.G("iconLineWidth")};e.prototype.eb=function(){this.S("iconLineWidth")&&(this.sj.lW(),this.$("iconLineWidth"));g.prototype.eb.call(this)};e.prototype.QPa=function(){var b=this.cZa(),c=this.bZa(),d=this.sj.u.canvas.width,f=this.sj.u.canvas.height,n=this.lZa();b.clearRect(0,0,d,f);b.lineWidth=n||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}(k)});
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,k,p,h,g,e,b,c,d){return function(f){function n(){var l=f.call(this)||this;l.Tm=null;l.mU=null;l.XK=null;l.zB=null;l.hba=new g;l.sL=null;l.nka=void 0;l.mka=void 0;l.fz=!1;return l}
P(n,f);n.prototype.set=function(l,q){switch(l){case "children":this.hba.set(l,q);break;default:f.prototype.set.call(this,l,q)}};n.prototype.R4=function(){this.fz=!0;this.set("visible",!1)};n.prototype.Q4=function(){this.get("visible")&&this.get("visible")&&this.o(k.DQa);this.fz=!1};n.prototype.get=function(l,q){return l=="children"?this.hba.get(l,q):l=="showing"?this.fz:f.prototype.get.call(this,l,q)};n.prototype.Nb=function(){this.zl(n.ad)};n.prototype.Ib=function(){f.prototype.Ib.call(this);this.Tm==
null&&(this.Tm=new e,this.Tm.set("width","100%"),this.Tm.bind(k.Ra,this.Uwa,this,!1),this.hb(this.Tm));this.mU==null&&(this.mU=new d,this.mU.set("width","100%"),this.Tm.hb(this.mU));this.XK==null&&(this.XK=new c,this.XK.xa({horizontalAlign:p.Xe,verticalAlign:p.Pd}),this.XK.bind(k.oa,this.UVa,this,!1),this.Tm.hb(this.XK));this.zB==null&&(this.zB=this.hba,this.zB.xa({width:"100%",height:"100%"}),this.hb(this.zB));this.sL==null&&(this.sL=new g,this.sL.set("width","100%"),this.hb(this.sL))};n.prototype.Pe=
function(){throw Error("Not implemented");};n.prototype.UVa=function(){this.Pe()};n.prototype.Uwa=function(){};n.prototype.eb=function(){this.Oc(n.Osa,n.Psa,[this.Tm],!0,!0);this.Oc(n.jaa,n.kaa,[this.Tm],!0,!1);this.get("headerHeight")===0?this.Oc(n.jaa,n.kaa,[this.zB],!0,!1):this.Oc(n.jaa,n.kaa,[this.Tm],!0,!1);this.Oc(n.bta,n.cta,[this.mU],!0,!0);this.Oc(n.Isa,n.Jsa,[this.XK],!0,!0);this.Oc(n.Fsa,n.Gsa,[this.zB],!0,!0);this.Oc(n.YSa,n.Hsa,[this.zB],!0,!1);this.Oc(n.Ksa,n.Lsa,[this.sL],!0,!0);this.get("footerHeight")===
0?this.Oc(n.Msa,n.Nsa,[this.zB],!0,!1):this.Oc(n.Msa,n.Nsa,[this.sL],!0,!1);this.xa({layout:h.Tj,horizontalAlign:p.Xe,verticalAlign:p.Pd});f.prototype.eb.call(this);this.Wm.A8(0)};n.Psa={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"};n.Osa=Object.keys(n.Psa);n.kaa={borderRadius:"borderTopRadius",borderTopRadius:"borderTopRadius",
borderLeftRadius:"borderTopLeftRadius",borderRightRadius:"borderTopRightRadius",borderTopLeftRadius:"borderTopLeftRadius",borderTopRightRadius:"borderTopRightRadius"};n.jaa="borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderTopRadius borderRadius".split(" ");n.cta={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"};n.bta=Object.keys(n.cta);n.Jsa={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",closeButtonRollOverBackgroundColor:"rollOverBackgroundColor",closeButtonRollOverBackgroundColorDirection:"rollOverBackgroundColorDirection",closeButtonRollOverBackgroundColorRatios:"rollOverBackgroundColorRatios",closeButtonRollOverBackgroundOpacity:"rollOverBackgroundOpacity",closeButtonRollOverBorderColor:"rollOverBorderColor",closeButtonRollOverBorderSize:"rollOverBorderSize",closeButtonRollOverIconColor:"rollOverIconColor",
closeButtonRollOverIconLineWidth:"rollOverIconLineWidth",closeButtonRollOverOpacity:"rollOverOpacity",closeButtonPressedBackgroundColor:"pressedBackgroundColor",closeButtonPressedBackgroundColorDirection:"pressedBackgroundColorDirection",closeButtonPressedBackgroundColorRatios:"pressedBackgroundColorRatios",closeButtonPressedBackgroundOpacity:"pressedBackgroundOpacity",closeButtonPressedBorderColor:"pressedBorderColor",closeButtonPressedBorderSize:"pressedBorderSize",closeButtonPressedIconColor:"pressedIconColor",
closeButtonPressedIconLineWidth:"pressedIconLineWidth",closeButtonPressedOpacity:"pressedOpacity"};n.Isa=Object.keys(n.Jsa);n.Lsa={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"};n.Ksa=Object.keys(n.Lsa);n.Nsa={borderRadius:"borderBottomRadius",borderBottomRadius:"borderBottomRadius",borderLeftRadius:"borderBottomLeftRadius",borderRightRadius:"borderBottomRightRadius",borderBottomLeftRadius:"borderBottomLeftRadius",borderBottomRightRadius:"borderBottomRightRadius"};
n.Msa="borderLeftRadius borderRightRadius borderBottomLeftRadius borderBottomRightRadius borderBottomRadius borderRadius".split(" ");n.Gsa={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"};n.Fsa=Object.keys(n.Gsa);n.Hsa={layout:"layout",horizontalAlign:"horizontalAlign",verticalAlign:"verticalAlign"};n.YSa=Object.keys(n.Hsa);n.iZ={veilOpacity:"backgroundOpacity",veilColor:"backgroundColor",veilColorRatios:"backgroundColorRatios",veilColorDirection:"backgroundColorDirection"};n.xaa=Object.keys(n.iZ);n.ad=Object.assign({},b.ad,function(){for(var l={modal:!1,visible:!1},q=[].concat(n.Osa,n.bta,n.Isa,n.Fsa,n.Ksa),r=0;r<q.length;r++)l[q[r]]=
void 0;return l}());return n}(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"),k=a("tdv/view/effects/Effect");return{CXa:function(){this.Al=this.Bf=null;this.bind(m.Cd,this.vva,this,!0);this.bind(m.sd,this.qva,this,!0);this.bind(m.rc,this.sva,this,!0);this.bind(m.Db,this.rva,this,!0);this.bind(m.K("effect"),this.ova,this,!0);this.bind(m.K("rollOverEffect"),this.tva,this,!0);this.kG=!1},Zkb:function(){this.h(m.Cd,this.vva,
this,!0);this.h(m.sd,this.qva,this,!0);this.h(m.rc,this.sva,this,!0);this.h(m.Db,this.rva,this,!0);this.h(m.K("effect"),this.ova,this,!0);this.h(m.K("rollOverEffect"),this.tva,this,!0)},vva:function(){this.Bf&&this.Bf.play()},qva:function(){this.Bf&&this.Bf.stop();this.Al&&this.Al.stop();this.kG=!1},sva:function(){this.kG||(this.kG=!0,this.Al&&(this.Bf&&this.Bf.get("loop")&&this.Bf.pm()>0?this.Bf.reverse():this.Bf&&this.Bf.pm()!=0&&this.Bf.pm()!=1||(this.Bf&&this.Bf.stop(),this.Al.play())))},rva:function(){this.kG&&
(this.kG=!1,this.Al&&(this.Al.pm()>0?this.Al.reverse():this.Bf&&this.Bf.get("loop")&&this.Bf.play()))},pva:function(){this.Nca()},Nca:function(){this.kG&&this.Al&&(this.Bf.stop(),this.Al.play())},uva:function(){this.kG||(this.Al.stop(),this.Bf&&this.Bf.get("loop")&&this.Bf.play())},ova:function(){this.Bf&&this.Bf.h(k.tl,this.pva,this,!0);this.Bf&&this.Bf.h(k.Rw,this.Nca,this,!0);(this.Bf=this.get("effect"))&&this.Bf.bind(k.tl,this.pva,this,!0);this.Bf&&this.Bf.bind(k.Rw,this.Nca,this,!0)},tva:function(){this.Al&&
this.Al.h(k.Rw,this.uva,this,!0);(this.Al=this.get("rollOverEffect"))&&this.Al.bind(k.Rw,this.uva,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"),k=a("tdv/binding/Bindable"),p=a("tdv/player/parser/ClassInfo");a=a("tdv/player/script/mixin/EffectsMixin");p=p.define("Model3DObject",k,function(){k.call(this);this.set("hidden",!1);this.CXa();this.Bq=this.WL=this.eea=this.dea=!1;this.sea=!0;this.tea=this.IG=!1});m.I4(p,[a]);var h="enabledInStandard enabledInVR enabledInVRWithGazePointer hideBasedOnDistance hideWhileUserInteracting hideWhileMoving".split(" ");
p.prototype.set=function(g,e){k.prototype.set.call(this,g,e);h.indexOf(g)!=-1&&this.bD()};p.prototype.Voa=function(g){this.eea!==g&&(this.eea=g,this.bD())};p.prototype.xE=function(g){this.Bq!==g&&(this.Bq=g,this.bD())};p.prototype.tp=function(g){this.WL!==g&&(this.WL=g,this.bD())};p.prototype.l8=function(g){this.sea!==g&&(this.sea=g,this.bD())};p.prototype.wA=function(g){this.IG!==g&&(this.IG=g,this.bD())};p.prototype.m8=function(g){this.tea!==g&&(this.tea=g,this.bD())};p.prototype.Uoa=function(g){this.dea!==
g&&(this.dea=g,this.bD())};p.prototype.bD=function(){this.set("hidden",this.eea||this.dea||this.IG&&this.get("enabledInVR")===!1||this.tea&&this.get("enabledInVRWithGazePointer",this.get("enabledInVR"))===!1||this.sea&&this.get("enabledInStandard")===!1||this.WL&&this.get("hideWhileMoving")||this.Bq&&this.get("hideWhileUserInteracting"))};return p});
define("tdv/player/script/BoxModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Model3DObject");return m.define("BoxModel3DObject",k,function(){k.call(this)})});define("tdv/view/constants/ScaleMode",["require","exports"],function(){return{NONE:"none",ZA:"fill",ej:"fit_inside",nr:"fit_outside",Ep:"fit_to_width",Hk:"fit_to_height",HQa:"custom"}});
define("tdv/view/core/visualprops/ImageVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties","tdv/view/constants/Alignment"],function(a,m,k,p){return function(h){function g(){var e=h!==null&&h.apply(this,arguments)||this;e.image=null;e.sh=p.$a;e.verticalAlign=p.Pd;e.contentWidth=0;e.contentHeight=0;return e}P(g,h);return g}(k)});
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,k,p,h,g,e,b,c){a=function(f){function n(l){var q=f.call(this)||this;q.t_a=function(){q.NZ=!0;q.Ff()};q.u_a=function(){q.JEa()};q.cf("Image");q.nba=l||1;q.Wja=!1;q.Oha=!1;q.lM=0;q.kM=0;q.vga=!1;q.NZ=!1;q.od=null;q.bind(k.Yb,
q.t_a,q,!1);q.bind(k.Cd,q.u_a,q,!1);return q}P(n,f);n.prototype.aL=function(){return new c};n.prototype.Kda=function(){var l=this;this.od=new d(this.nba);this.Kda=function(){return l.od};return this.od};n.prototype.Nb=function(){f.prototype.Nb.call(this);this.j("horizontalAlign",h.$a);this.j("verticalAlign",h.Tc);this.j("scaleMode",g.NONE)};n.prototype.set=function(l,q){l=="url"&&this.get("url")!=q&&(this.Wja=!0,this.Ff());f.prototype.set.call(this,l,q)};n.prototype.cP=function(l){this.u.sh!=l&&(this.u.sh=
l,this.rb())};n.prototype.hO=function(){return this.u.sh};n.prototype.iP=function(l){this.u.verticalAlign!=l&&(this.u.verticalAlign=l,this.rb())};n.prototype.jO=function(){return this.u.verticalAlign};n.prototype.eP=function(l){this.ji!=l&&(this.ji=l,this.Oha=!0,this.Ff(),this.jc())};n.prototype.u4a=function(l,q){if(this.u.contentWidth!=l||this.u.contentHeight!=q)this.u.contentWidth=l,this.u.contentHeight=q,this.rb()};n.prototype.vta=function(l,q,r){this.lM=q?q:0;this.kM=r?r:0;this.u.image=l;this.vga=
!0;this.Ff();this.jc();this.rb();this.u.image&&this.o(k.ha)};n.prototype.xy=function(){this.$m=this.lM+this.u.Bd+this.u.ze;this.Zm=this.kM+this.u.ge+this.u.Af;this.Vxa=this.lM==0&&this.kM==0?0:this.lM/this.kM;this.UR=this.VR=0};n.prototype.eb=function(){this.S("scaleMode")&&(this.eP(this.G("scaleMode")),this.$("scaleMode"));this.S("horizontalAlign")&&(this.cP(this.G("horizontalAlign")),this.$("horizontalAlign"));this.S("verticalAlign")&&(this.iP(this.G("verticalAlign")),this.$("verticalAlign"));this.Paa("paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "))&&
(this.NZ=!0);f.prototype.eb.call(this);this.JEa();if(this.ucb()||this.Oha||this.vga||this.NZ){var l=this.Ph(),q=this.Oh(),r=this.lM,t=this.kM,u=0,v=0;if(r==0||t==0)v=u=0;else switch(this.ji){case g.NONE:u=r;v=t;break;case g.ZA:u=l;v=q;break;case g.ej:r*q>t*l?(u=l,v=t*l/r):(u=r*q/t,v=q);break;case g.nr:r*q>t*l?(u=r*q/t,v=q):(u=l,v=t*l/r);break;case g.Ep:u=l;v=t*l/r;break;case g.Hk:u=r*q/t,v=q}this.u4a(u,v);this.NZ=this.vga=this.Oha=!1;this.jc();this.rb()}};n.prototype.JEa=function(){if(this.Wja){var l=
this.get("url");l?this.Kda().load(l,this.vta,this):(this.Kda().clear(),this.vta(null,0,0));this.Wja=!1}};return n}(e);var d=function(){function f(n){this.nba=n;this.Sd=[];this.Om=null}f.prototype.XVa=function(n){f.Oo.href=n;return f.Oo.href};f.prototype.load=function(n,l,q){var r=this;n=this.XVa(n);this.Om&&!this.Om.aj()&&(this.Om.cancel(),this.Sd=this.Sd.filter(function(v){return v!==r.Om}));(this.Om=this.Sd.find(function(v){return v.hl()==n})||null)?this.Sd=this.Sd.filter(function(v){return v!==
r.Om}):(this.Om=new b(p.gsa),this.Om.load(n));for(this.Sd.splice(0,0,this.Om);this.Sd.length>this.nba;)this.Sd.pop().cancel();if(l){var t=this.Om,u=function(){l.call(q||window,t.qg(),t.Zf(),t.pg())};this.Om.aj()?u():this.Om.bind(k.ha,u,void 0,!1)}};f.prototype.clear=function(){this.Sd.forEach(function(n){n.cancel()});this.Om=null};f.Oo=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,k,p,h,g){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.Nb=function(){e.prototype.Nb.call(this);this.j("iconURL");this.D("rollOverIconURL",p.fa,"iconURL");this.D("pressedIconURL",p.Mb,"iconURL");this.D("pressedRollOverIconURL",p.vc,"iconURL")};b.prototype.Vba=function(){var c=new g(3);c.set("scaleMode",
k.ej);return c};b.prototype.eb=function(){if(this.S("iconURL")){var c=this.G("iconURL");this.sj.set("url",c);this.sj.set("visible",c?!0:!1);this.$("iconURL")}e.prototype.eb.call(this)};return b}(h)});define("tdv/player/script/Button",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/Button"],function(a){var m=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/buttons/Button");return m.define("Button",k,function(){k.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"),k=a("tdv/player/script/Model3DObject");return m.define("ExternalModel3DObject",k,function(){k.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"),k=a("tdv/player/script/ExternalModel3DObject");return m.define("PlaneModel3DObject",k,function(){k.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"),k=a("tdv/player/script/PlaneModel3DObject");return m.define("CanvasPlaneModel3DObject",k,function(){k.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"),k=a("tdv/player/script/CapPanoramaOverlay");return m.define("CeilingCapPanoramaOverlay",k,function(){k.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"),k=a("tdv/player/script/Model3DObject");return m.define("ChildModel3DObject",k,function(){k.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"),k=a("tdv/view/buttons/CloseButton");return m.define("CloseButton",k,function(){k.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"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/view/containers/Container");a=k.define("Container",p,function(){p.call(this)});a.prototype.scrollTo=function(h,g){p.prototype.scrollTo.call(this,h,g)};a.prototype.scrollIntoView=function(h){m.iE(function(){p.prototype.scrollIntoView.call(this,h)}.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"),k=a("tdv/player/parser/ClassInfo");a=k.define("PanoramaFrame",m,function(){m.call(this);this.Aa=null});a.prototype.get=function(p,h){switch(p){case "overlays":return this.Mda();case "hfov":case "vfov":case "pitch":case "flipImageHorizontally":case "minFaceSize":if(this.Aa)return this.Aa.get(p,h)}return m.prototype.get.call(this,p,h)};a.prototype.Mda=
function(){var p=m.prototype.get.call(this,"overlays");p||(p=[]);return this.tia(p)};a.prototype.tia=function(p){if(this.VM===void 0||this.v0!=p){var h=function(e){return k.Qa("PopupPanoramaOverlay",e)},g=function(e){return k.Qa("LensFlarePanoramaOverlay",e)};this.v0=p;this.VM=[].concat(p.filter(function(e){return!(h(e)||g(e))}),p.filter(g),p.filter(h))}return this.VM};a.prototype.u9a=function(p){this.Aa=p};a.prototype.AD=function(){return this.Aa};a.prototype.Fn=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"),k=a("tdv/player/script/PanoramaFrame");return m.define("CubicPanoramaFrame",k,function(){k.call(this)})});
define("tdv/view/av/AudioController","require tdv/view/av/SharedAudioContext tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/URL tdv/player/view/util/Flags tdv/view/util/Visibility".split(" "),function(a){function m(b){this.aq=this.aq.bind(this);this.Wu=this.Wu.bind(this);this.Cf=!1;this.Ws=this.D_=1;this.O_=!0;this.WB=this.KK=null;this.da=b;this.da.addEventListener("play",this.aq,!0);this.da.addEventListener("playing",this.Wu,!0);this.LCa();this.bI()}var k=a("tdv/view/av/SharedAudioContext");
a("tdv/constants/EventName");var p=a("tdv/player/view/util/Device"),h=a("tdv/player/view/util/URL"),g=a("tdv/player/view/util/Flags");a("tdv/view/util/Visibility");var e;m.prototype.clear=function(){this.da&&(this.t6a(),this.da.removeEventListener("play",this.aq,!0),this.da.removeEventListener("playing",this.Wu,!0),this.da=null)};m.prototype.LCa=function(){g.Fqa&&p.Rb()==p.xi&&p.Dc()!=p.$J&&k&&!this.KK&&this.XB()&&(e||(e=k.createDelay(),e.delayTime.value=.3,e.connect(k.destination)),this.KK=k.createMediaElementSource(this.da),
this.WB=k.createGain(),this.KK.connect(this.WB),this.WB.connect(e))};m.prototype.t6a=function(){this.KK&&(this.KK.disconnect(),this.KK=null);this.WB&&(this.WB.disconnect(),this.WB=null)};m.prototype.xgb=function(b){this.O_!=b&&(this.da.log("AudioController","set hasAudio: "+b),this.O_=b,this.bI())};m.prototype.rg=function(b){this.Cf!=b&&(this.da.log("AudioController","set muted: "+b),this.Cf=b,this.bI())};m.prototype.BA=function(b){this.Ws!=b&&(this.da.log("AudioController","set volume: "+b),this.Ws=
b,this.bI())};m.prototype.tX=function(b){this.D_!=b&&(this.da.log("AudioController","set gain: "+b),this.D_=Math.max(0,Math.min(1,b)),this.bI())};m.prototype.aq=function(){this.bI()};m.prototype.Wu=function(){this.bI()};m.prototype.bI=function(){this.da.log("AudioController","updateVolume paused: "+this.da.paused+" outputVolume: "+(!this.O_||this.Cf?0:this.Ws*this.D_));var b=!this.O_||this.Cf?0:this.Ws*this.D_;b>0&&b<1&&this.LCa();this.WB?(this.WB.gain.value=b,this.da.volume=1):this.da.volume=b;this.da.muted=
b==0};m.prototype.XB=function(){var b=this.da.currentSrc||this.da.children.length&&this.da.children[0].src||"";h.GD(b)&&(b=void 0);return b};return m});define("tdv/view/av/MediaType",["require"],function(){return{Ip:"video",BQa:"audio"}});
define("tdv/view/av/PlaybackController","require tdv/utils 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){var m=a("tdv/utils"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/constants/Priority"),g=a("tdv/events/Event"),e=a("tdv/events/EventDispatcher"),b=a("tdv/player/view/util/Device"),
c=a("tdv/player/view/util/URL"),d=a("tdv/util/LoadQueue"),f=a("tdv/view/util/Visibility"),n=m.extend(e,function(l){e.call(this);this.da=l;this.dH=this.dH.bind(this);this.yy=this.yy.bind(this);this.dn=this.dn.bind(this);this.$L=this.$L.bind(this);this.Yk=this.Yk.bind(this);this.gn=this.gn.bind(this);this.Wu=this.Wu.bind(this);this.FU=this.FU.bind(this);this.da.addEventListener("ended",this.dn,!0);this.da.addEventListener("pause",this.gn,!1);this.da.addEventListener("stalled",this.gn,!1);this.da.addEventListener("waiting",
this.gn,!1);this.da.addEventListener("canplay",this.dH,!0);this.da.addEventListener("canplaythrough",this.yy,!1);this.da.addEventListener("loadedmetadata",this.Yk,!0);this.da.addEventListener("playing",this.Wu,!1);this.da.addEventListener("error",this.$L,!1);this.Eca=!1;this.H=p.aa;this.rM=this.Vi=null;f.bind(k.V,this.z8a,this)});n.prototype.clear=function(){this.da&&(this.da.removeEventListener("ended",this.dn,!0),this.da.removeEventListener("pause",this.gn,!1),this.da.removeEventListener("stalled",
this.gn,!1),this.da.removeEventListener("waiting",this.gn,!1),this.da.removeEventListener("canplay",this.dH,!0),this.da.removeEventListener("canplaythrough",this.yy,!1),this.da.removeEventListener("loadedmetadata",this.Yk,!0),this.da.removeEventListener("error",this.$L,!1),this.da=null)};n.prototype.play=function(){this.da.log("PlaybackController","play");this.rM=p.PLAYING;this.sT()};n.prototype.stop=function(){this.da.log("PlaybackController","stop");this.rM=p.aa;this.sT()};n.prototype.getState=
function(){return this.Vi||this.H};n.prototype.OI=function(){return this.da.readyState==this.da.HAVE_NOTHING||this.da.readyState==this.da.HAVE_METADATA||this.da.currentTime===0?!1:!0};n.prototype.sT=function(){!this.Vi&&this.rM&&(this.Vi=this.rM,this.rM=null,this.Vi==p.PLAYING?this.yia():this.xia())};n.prototype.z8a=function(){if(f.visible)this.da.log("PlaybackController","visibile changed to true, setting state to "+this.H),this.Vi=this.H,this.Vi==p.PLAYING?this.yia():this.xia();else if(!this.da.paused){this.da.log("PlaybackController",
"paused by visibile changed to false");var l=this.da.pause();l&&l["catch"](this.$L)}};n.prototype.XB=function(){return this.da.currentSrc||this.da.children.length&&this.da.children[0].src||""};n.prototype.yia=function(){var l=this.XB();this.b3(l&&!c.GD(l));this.pZ=b.Rb()==b.xi;this.da.paused?(this.da.log("PlaybackController","startPlaying calling play"),this.da.muted=!0,this.da.log("PlaybackController","this._media.play()"),this.da.play()["catch"](q=>{this.$L(q)}).then(()=>{this.Sza()}).finally(()=>
{})):(this.da.log("PlaybackController","startPlaying already playing"),this.Sza())};n.prototype.Wu=function(){this.da.log("PlaybackController","onPlaying event received. Visible: "+f.visible)};n.prototype.Sza=function(){this.Vi==p.PLAYING?(this.da.log("PlaybackController","onPlay promise fullfilled received when waiting to play"),this.Vi=null,this.H=p.PLAYING,this.o(new g(n.q$)),this.sT()):this.da.log("PlaybackController","onPlay promise fullfilled received. Visible: "+f.visible)};n.prototype.xia=
function(){this.b3(!1);this.pZ=!1;this.da.paused?(this.da.log("PlaybackController","startPausing already paused"),this.gn()):(this.da.log("PlaybackController","startPausing calling pause"),this.da.pause())};n.prototype.gn=function(){this.Vi==p.aa?(this.da.log("PlaybackController","onPause event received when waiting to stop"),this.Vi=null,this.H=p.aa,this.sT()):f.visible?(this.da.log("PlaybackController","onPause event received without calling to pause"),(this.H==p.PLAYING&&!this.Vi||this.Vi==p.PLAYING)&&
!this.da.hasAttribute("loop")&&!isNaN(this.da.duration)&&this.da.currentTime==this.da.duration&&this.da.duration>0&&this.dn(),this.FU()):this.da.log("PlaybackController","onPause event received when not visible")};n.prototype.dH=function(){this.da.log("PlaybackController","on can play");this.FU()};n.prototype.yy=function(){this.da.log("PlaybackController","can play through");this.FU();this.b3(!1)};n.prototype.FU=function(){if(this.OCa()){if(this.pZ&&this.da.currentTime==0){this.da.log("PlaybackController",
"updatePlaying applying ios hack");this.pZ=!1;try{this.da.currentTime=.3}catch(l){}}b.Rb()!=b.ZJ&&this.KBa()}};n.prototype.OCa=function(){return this.H==p.PLAYING&&f.visible&&this.da.paused&&this.da.readyState>=3};n.prototype.KBa=function(l){this.LBa||(l?this.OCa()&&(this.da.log("PlaybackController","updatePlaying retrying play"),this.Vi=p.PLAYING,this.yia()):this.LBa=setTimeout(function(){this.LBa=null;this.KBa(!0)}.bind(this),500))};n.prototype.$L=function(){this.Vi==p.PLAYING&&(this.da.log("PlaybackController",
"onError waiting to play"),this.Vi=null,this.rM?this.sT():b.Rb()==b.xi?this.o(new g(n.U9)):this.Vi=p.PLAYING)};n.prototype.Yk=function(){this.da.log("PlaybackController","on loaded metadata");!isNaN(this.da.duration)&&this.da.currentTime==this.da.duration&&this.da.duration>0&&this.dn()};n.prototype.dn=function(){this.da.log("PlaybackController","onEnded");this.pZ=!1;if(this.H==p.PLAYING&&!this.Vi||this.Vi==p.aa)this.da.log("PlaybackController","onEnded finalizing video"),this.b3(!1),this.Vi=p.aa,
this.xia(),this.o(new g(n.tl))};n.prototype.b3=function(l){this.Eca!=l&&(this.da.log("PlaybackController","downloading changed to: "+l),(this.Eca=l)?d.oib(h.ora):d.nib(h.ora))};n.U9="deactivated";n.tl="end";n.q$="play";return n});
define("tdv/view/av/TextTracksController",["require","tdv/utils","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a){var m=a("tdv/utils"),k=a("tdv/constants/EventName");a("tdv/events/Event");var p=a("tdv/events/EventDispatcher");a=m.extend(p,function(h){p.call(this);this.Yk=this.Yk.bind(this);this.Mfa=this.Mfa.bind(this);this.vj=this.vj.bind(this);this.da=h;this.am=null;this.kf=[];this.da.addEventListener("loadedmetadata",this.Yk,!0);this.da.textTracks.addEventListener("addtrack",
this.Mfa,!1)});a.prototype.set=function(h){h&&this.PTa(h)};a.prototype.clear=function(){this.u3a()};a.prototype.KV=function(){var h=this.am&&this.am.track.activeCues;h&&(h=Array.prototype.slice.call(h,0));return h||[]};a.prototype.Yk=function(){this.HEa()};a.prototype.Mfa=function(){this.HEa()};a.prototype.vj=function(){this.aCa(this.am.track.activeCues)};a.prototype.aCa=function(h){h||(h=[]);if(this.kf.length!=0||h.length!=0)this.kf=Array.prototype.slice.call(h),this.o(k.sl,this.kf)};a.prototype.PTa=
function(h){this.da.log("TextTracksController","add text track src: "+h);this.am=document.createElement("track");this.am.kind="subtitles";this.am.src=h;this.da.appendChild(this.am)};a.prototype.u3a=function(){this.am&&(this.da.log("TextTracksController","remove text track"),this.am.track.removeEventListener("cuechange",this.vj),this.am.track.mode="disabled",this.am.src="",this.da.removeChild(this.am),this.am=null,this.aCa([]))};a.prototype.HEa=function(){for(var h=0;h<this.da.textTracks.length;h++){var g=
this.da.textTracks[h];g.removeEventListener("cuechange",this.vj);g.mode=this.am&&g==this.am.track?"hidden":"disabled";g.mode=="hidden"&&g.addEventListener("cuechange",this.vj)}};return a});
define("tdv/player/view/util/FileType",["require","exports","tdv/player/view/util/URL"],function(a,m,k){return function(){function p(){}p.is=function(h,g){h=k.parse(h).Cab;return g.indexOf(h)!=-1};p.GD=function(h,g){return!!h&&g.some(function(e){return h.indexOf(e)===0})};p.Ora=[".mp4",".m4v",".m4p"];p.tRa=[".hevc"];p.ura=[".mov"];p.OSa=[".webm"];p.VRa=[".ogv",".ogg"];p.HLS=[".m3u8"];p.cra=".ply .bin .splat .spz .sog .zip".split(" ");p.XSa=[".json"];p.vRa=".jpg .jpeg .png .webp .gif .avif .apng .bmp".split(" ");
p.Ip=".m3u8 .mpd .mp4 .m4v .m4p .webm .ogv .ogg .mpg .mpeg .m3u8 .mpd".split(" ");p.wRa=["data:image/"];return p}()});
define("tdv/view/av/TimeController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/FileType".split(" "),function(a){var m=a("tdv/utils");a("tdv/constants/EventName");var k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/util/Device"),g=a("tdv/player/view/util/FileType"),e=m.extend(p,function(b){p.call(this);this.da=b;this.yy=this.yy.bind(this);this.gn=this.gn.bind(this);this.aq=this.aq.bind(this);
this.Yk=this.Yk.bind(this);this.dn=this.dn.bind(this);this.L1=this.L1.bind(this);this.Jf=this.Jf.bind(this);this.cfa=this.XL=this.SH=void 0;this.Qia=0;this.da.addEventListener("ended",this.dn,!0);this.da.addEventListener("pause",this.gn,!1);this.da.addEventListener("canplaythrough",this.yy,!1);this.da.addEventListener("timeupdate",this.L1,!1);this.da.addEventListener("play",this.aq,!1);this.da.addEventListener("playing",this.Wu,!1)});e.prototype.clear=function(){this.da&&(this.da.removeEventListener("ended",
this.dn,!0),this.da.removeEventListener("pause",this.gn,!1),this.da.removeEventListener("canplaythrough",this.yy,!1),this.da.removeEventListener("timeupdate",this.L1,!1),this.da.removeEventListener("play",this.aq,!1),this.da.removeEventListener("playing",this.Wu,!1),this.da=null,this.SH&&clearInterval(this.SH))};e.prototype.setTime=function(b){if(!this.da.srcObject){this.Qia=0;this.w0=void 0;this.da.log("TimeController","setTime: "+b);h.ZFa()&&!g.is(this.XB(),g.HLS)?this.hQ=b||0:this.hQ=void 0;try{this.da.currentTime=
b}catch(c){}h.Rb()==h.NE||h.Rb()==h.ZJ||h.Dc()==h.tY&&b==0||(this.XL=b,this.bEa())}};e.prototype.getTime=function(){return this.XL||this.da.currentTime||0};e.prototype.Zi=function(){return this.da.duration||0};e.prototype.aq=function(){this.iia(!0)};e.prototype.gn=function(){this.iia(!1);this.w0=void 0};e.prototype.yy=function(){this.da.log("TimeController","on can play through");this.bEa()};e.prototype.dn=function(){this.hQ=void 0;this.iia(!1)};e.prototype.Yk=function(){this.o(new k(e.Pj))};e.prototype.bEa=
function(){if(this.da.readyState>=this.da.HAVE_ENOUGH_DATA&&this.XL!==void 0){this.da.log("TimeController","updateCurrentTime when can play through set time to: "+this.XL);try{this.da.currentTime=this.XL}catch(b){}this.XL=void 0}};e.prototype.Jf=function(){this.o(new k(e.sg))};e.prototype.L1=function(){if(h.ZFa()&&!h.Hcb()&&!this.da.paused&&this.da.readyState>=this.da.HAVE_ENOUGH_DATA){var b=(new Date).getTime();this.w0||(this.w0=b);this.cfa&&b-this.cfa>500&&(this.Qia++,this.Qia/((b-this.w0)*.001)>
.4&&h.phb());this.cfa=b}if(this.hQ!==void 0&&this.da.currentTime>this.hQ){this.hQ=void 0;try{this.da.currentTime-=.01}catch(c){}}this.Jf()};e.prototype.iia=function(b){!!this.SH!=b&&(this.SH?(clearInterval(this.SH),this.SH=null):this.SH=setInterval(this.Jf,16))};e.prototype.XB=function(){return this.da.currentSrc||this.da.children.length&&this.da.children[0].src||""};e.sg="time update";e.Pj="duration update";return e});
define("tdv/view/av/DummyAudioData",["require"],function(){var a={MKa:"data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjM2LjEwMAAAAAAAAAAAAAAA//OEAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAEAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV6urq6urq6urq6urq6urq6urq6urq6urq6v////////////////////////////////8AAAAATGF2YzU2LjQxAAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs90hvAAAAAAAAAAAAAAAAAAAA//MUZAAAAAGkAAAAAAAAA0gAAAAATEFN//MUZAMAAAGkAAAAAAAAA0gAAAAARTMu//MUZAYAAAGkAAAAAAAAA0gAAAAAOTku//MUZAkAAAGkAAAAAAAAA0gAAAAANVVV"};a.src=
a.MKa;return a});
define("tdv/view/av/SrcSetter","require tdv/utils 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){function m(l,q,r){this.src=l||"";this.zm=q||"";this.startTime=r||0}var k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/util/Capabilities"),
b=a("tdv/player/view/util/URL"),c=a("tdv/player/view/util/Flags"),d=a("tdv/player/view/util/FileType"),f=a("tdv/player/view/util/LibsLoader"),n=a("tdv/view/av/DummyAudioData");a=k.extend(g,function(l,q){g.call(this);this.da=l;this.fp=q;this.mfa=!1;this.s3=[];this.Sf=this.af=this.iL=null});a.prototype.set=function(l,q,r){this.da.log("SrcSetter","set: "+l+" subtitles: "+q+" startTime: "+r);l=new m(l,q,r);this.af&&this.af.isEqual(l)||(!this.af&&this.iL&&this.iL.isEqual(l)?this.W3():(this.af=l,this.t0a()))};
a.prototype.clear=function(){this.Sf&&(this.Sf.destroy(),this.Sf=null);this.iL=null;this.t3a();this.fp.clear()};a.prototype.Ecb=function(){return!!this.af};a.prototype.t0a=function(){this.mfa=!0;this.GBa(this.af.src)&&!f.HLS.aj()?(this.da.log("SrcSetter","hls lib required"),f.HLS.load(this.Ixa,this)):this.Ixa()};a.prototype.Ixa=function(){this.mfa&&(this.mfa=!1,this.uUa())};a.prototype.uUa=function(){this.clear();this.v4a(this.x3a(this.af.src));this.GBa(this.af.src)?this.iUa():this.Hea(this.af.src)?
this.vUa():this.wUa()};a.prototype.iUa=function(){var l=f.HLS.BO,q=(navigator.connection?Math.max(navigator.connection.downlink,2):2)*1024*1024,r=q*.66;this.Sf=new l({debug:c.Nw,startPosition:this.af.startTime===0?-1:this.af.startTime,playlistLoadPolicy:{"default":{maxTimeToFirstByteMs:6E4,maxLoadTimeMs:6E4}},startLevel:-1,maxMaxBufferLength:12,autoStartLoad:!1,abrEwmaDefaultEstimate:q});this.Sf.loadSource(this.af.src);this.Sf.attachMedia(this.da);var t=function(){this.Sf.off(l.Events.MANIFEST_PARSED,
t);var u=this.Sf.levels.filter(function(w){return w.bitrate<=q});if(u.length){u.sort(function(w,y){return y.width-w.width});var v=this.Sf.levels.indexOf(u[0]);this.Sf.startLevel=v}u=this.Sf.levels.filter(function(w){return w.bitrate<=r});u.length&&(u.sort(function(w,y){return y.width-w.width}),this.Sf.config.minAutoBitrate=u[0].bitrate-1);u=this.Sf.levels.filter(function(w){return e.Cib(w.width,w.height)});c.uRa&&(u.sort(function(w,y){return y.width-w.width}),v=this.Sf.levels.indexOf(u[0]),this.Sf.startLevel=
v);u.length&&u.length<this.Sf.levels.length&&(u.sort(function(w,y){return y.width-w.width}),this.Sf.autoLevelCapping=this.Sf.levels.indexOf(u[0]));this.da.log("SrcSetter","bandwidth: "+q+" lowBandwidth: "+r);this.da.log("SrcSetter","levels: "+this.Sf.levels);this.da.log("SrcSetter","startLevel: "+this.Sf.levels[this.Sf.startLevel]);this.da.log("SrcSetter","minLevel: "+this.Sf.levels[this.Sf.minAutoLevel]);this.Sf.startLoad(this.af.startTime===0?-1:this.af.startTime);this.af.startTime!=0&&this.lv(this.af.startTime);
this.af.zm&&this.fp.set(this.af.zm);this.iL=this.af;this.af=null;this.W3()}.bind(this);this.Sf.on(l.Events.MANIFEST_PARSED,t);this.Sf.on(l.Events.qkb,function(u,v){v.fatal&&v.type==l.ErrorTypes.vkb&&this.Sf.recoverMediaError()}.bind(this))};a.prototype.wUa=function(){this.af.src?this.mta(this.af.src):this.mta(n.MKa,"audio/mpeg");this.af.zm&&this.fp.set(this.af.zm);this.da.load();this.af.startTime!=0&&this.lv(this.af.startTime);this.iL=this.af;this.af=null;this.W3()};a.prototype.vUa=function(){this.da.srcObject=
this.af.src;this.iL=this.af;this.af=null;this.W3()};a.prototype.W3=function(){this.da.log("SrcSetter","src ready");this.o(new h(p.td))};a.prototype.GBa=function(l){return!!l&&!this.Hea(l)&&d.is(l,d.HLS)&&!e.eJa};a.prototype.x3a=function(l){return!!l&&!this.Hea(l)&&b.Lma(l)};a.prototype.v4a=function(l){l&&!this.da.hasAttribute("crossorigin")?this.da.setAttribute("crossorigin","anonymous"):!l&&this.da.hasAttribute("crossorigin")&&this.da.removeAttribute("crossorigin")};a.prototype.Hea=function(l){return l instanceof
MediaStream};a.prototype.lv=function(l){try{this.da.currentTime=l}catch(q){}};a.prototype.mta=function(l,q){var r=document.createElement("source");q||(q=this.b_a(l));q&&(r.type=q);b.GD(l)||(l=b.hD(l,"swbypass=true"));r.src=l;this.da.appendChild(r);this.s3.push(r)};a.prototype.t3a=function(){for(;this.s3&&this.s3.length;){var l=this.s3.shift();l.src="";this.da.removeChild(l)}this.da.srcObject=null};a.prototype.b_a=function(l){switch(b.getExtension(l).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"}};m.prototype.isEqual=function(l){return this.src==l.src&&this.zm==l.zm};return a});
define("tdv/view/av/HTMLMediaPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Flags tdv/view/core/UIComponent 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){function m(w){setTimeout(w,0)}var k=a("tdv/utils"),
p=a("tdv/constants/EventName"),h=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/util/Flags");a("tdv/view/core/UIComponent");var c=a("tdv/view/util/AudioActivation"),d=a("tdv/view/util/UserInitiatedAction"),f=a("tdv/view/av/AudioController"),n=a("tdv/view/av/MediaType"),l=a("tdv/view/av/PlaybackController"),q=a("tdv/view/av/TextTracksController"),r=a("tdv/view/av/TimeController"),t=a("tdv/view/av/SrcSetter"),u=0,v=k.extend(g,function(w,
y){g.call(this);this.Lf=w;this.C8a=y;this.Yk=this.Yk.bind(this);this.xu=this.xu.bind(this);this.jga=this.jga.bind(this);this.eq=this.gL=null;this.Z1=void 0;this.Hc=this.Fb=null;this.mo="inactive";this.xq=this.Ta=this.ne=this.hz=this.fp=null;this.Cf=!1;this.MCa(document.createElement(this.Lf));y&&d.wait(this.xu)});v.prototype.MCa=function(w){this.pDa();this.Hc=w;for(this.Hc.parentNode&&this.Hc.parentNode.removeChild(this.Hc);this.Hc.children.length;)this.Hc.removeChild(this.Hc.children[0]);this.D5a();
this.Hc.autoplay=!1;this.Hc.autobuffer="autobuffer";this.Hc.preload=e.Rb()==e.xi?"metadata":"none";this.Hc.setAttribute("preload",e.Rb()==e.xi?"metadata":"none");this.Hc.setAttribute("webkit-playsinline","true");this.Hc.setAttribute("playsinline","true");this.Hc.addEventListener("loadedmetadata",this.Yk,!0);this.fp=new q(this.Hc);this.fp.bind(p.sl,this.vj,this,!0);this.hz=new t(this.Hc,this.fp);this.hz.bind(p.td,this.vAa,this,!0);this.ne=new f(this.Hc);this.Ta=new l(this.Hc);this.Ta.bind(l.U9,this.Vya,
this,!0);this.Ta.bind(l.tl,this.dn,this,!0);this.Ta.bind(l.q$,this.aq,this,!0);this.xq=new r(this.Hc);this.xq.bind(r.sg,this.Jf,this,!0);this.xq.bind(r.Pj,this.Qo,this,!0)};v.prototype.D5a=function(){if(b.Nw){var w="["+this.Lf+" "+u++ +"]";this.Hc.log=function(y,x){console.log(w+"["+(new Date).toISOString().split("T")[1]+"] "+y+" "+x)}}else this.Hc.log=function(){}};v.prototype.pDa=function(){this.Hc&&(this.Hc.removeEventListener("loadedmetadata",this.Yk,!0),this.hz&&(this.hz.h(p.td,this.vAa,this,
!0),this.hz.clear(),this.hz=null),this.fp&&(this.fp.h(p.sl,this.vj,this,!0),this.fp.clear(),this.fp=null),this.ne&&(this.ne.clear(),this.ne=null),this.Ta&&(this.Ta.h(l.U9,this.Vya,this,!0),this.Ta.h(l.tl,this.dn,this,!0),this.Ta.h(l.q$,this.aq,this,!0),this.Ta.clear(),this.Ta=null),this.xq&&(this.xq.h(r.sg,this.Jf,this,!0),this.xq.h(r.Pj,this.Qo,this,!0),this.xq.clear(),this.xq=null),this.Hc=null)};v.prototype.clear=function(){this.pDa()};v.prototype.VN=function(w,y,x){if(this.Fn()&&this.OI())try{return w.drawImage(this.Hc,
0,0,y,x),!0}catch(z){}w.fillRect(0,0,y,x);return!1};v.prototype.play=function(w,y,x){this.Hc.log("HTMLMediaPlayer","play src: "+y.src+" subtitlesSrc: "+y.zm+" hasAudio: "+y.ED+" gain: "+y.gain);this.Fb=w;this.gL=null;this.eq=y.clone();this.Z1=x||0;this.bUa()};v.prototype.x6=function(){return this.mo=="activated"};v.prototype.o9=function(){return this.C8a};v.prototype.stop=function(){this.Hc.log("HTMLMediaPlayer","stop");this.Ta.stop();this.eq=null};v.prototype.getState=function(){return this.Ta.getState()};
v.prototype.OI=function(){return this.hz.Ecb()?!1:this.Ta.OI()};v.prototype.rg=function(w){this.ne.rg(w);this.Cf=w;this.Fb&&this.mo=="requested"&&(this.Cf?c.cancel(this.Fb):c.request(this.Fb))};v.prototype.BA=function(w){this.ne.BA(w)};v.prototype.tX=function(w){this.ne.tX(w)};v.prototype.setLoop=function(w){this.qUa(w)};v.prototype.getCurrentTime=function(){return this.xq.getTime()};v.prototype.setCurrentTime=function(w){return this.xq.setTime(w)};v.prototype.Zi=function(){return this.xq.Zi()};v.prototype.Fn=
function(){return this.Lf==n.Ip};v.prototype.getType=function(){return this.Lf};v.prototype.Zf=function(){return this.Hc&&this.Fn()&&this.Hc.videoWidth||0};v.prototype.pg=function(){return this.Hc&&this.Fn()&&this.Hc.videoHeight||0};v.prototype.KV=function(){return this.fp.KV()};v.prototype.bUa=function(){this.Hc.log("HTMLMediaPlayer","assert can play");this.mo=="activated"||!this.eq.ED||this.eq.gain==0||this.Cf?(this.Hc.log("HTMLMediaPlayer","can play activationState: "+this.mo+" pending media has audio: "+
this.eq.ED+" muted: "+this.Cf),this.dH()):this.mo=="inactive"&&(this.Hc.log("HTMLMediaPlayer","needs activation"),this.Fb&&this.Lf==n.Ip&&this.f_a()?this.sTa():this.Fb&&d.B6()?this.xu():this.Fb&&this.aUa())};v.prototype.f_a=function(){var w=this.Rva();return!w||w.currentSrc&&!w.paused||w.muted?!1:!0};v.prototype.Rva=function(){return this.Fb.get("settings").get(TDV.PlayerSettings.ACTIVE_VIDEO_ELEMENT)};v.prototype.sTa=function(){this.Hc.log("HTMLMediaPlayer","activate with application parameter");
this.MCa(this.Rva());this.xu()};v.prototype.aUa=function(){this.Hc.log("HTMLMediaPlayer","ask for activation");this.mo="requested";c.Bqa(this.xu);this.Fb&&!this.Cf&&c.request(this.Fb)};v.prototype.xu=function(){if(this.mo=="inactive"||this.mo=="requested")this.Hc.log("HTMLMediaPlayer","activate received when state: "+this.mo+" and has media: "+!!this.gL),this.gL?m(function(){d.wait(this.xu)}.bind(this)):(this.mo="activating",this.hz.set("","",0))};v.prototype.dH=function(){this.Hc.log("HTMLMediaPlayer",
"media can play. Has pending properties: "+!!this.eq);this.eq&&this.hz.set(this.eq.src,this.eq.zm,this.Z1)};v.prototype.vAa=function(){this.mo=="activating"?this.X1a():this.eq&&this.F1a()};v.prototype.X1a=function(){this.Hc.log("HTMLMediaPlayer","on src ready activating");this.Ta.play()};v.prototype.aq=function(){this.mo=="activating"&&(this.Hc.log("HTMLMediaPlayer","on play activating"),this.Ta.stop(),this.mo="activated",this.dH())};v.prototype.F1a=function(){this.Hc.log("HTMLMediaPlayer","on pending src ready");
this.gL=this.eq;this.eq=null;this.jUa(this.gL.ED);this.hUa(this.gL.gain);this.xq.setTime(this.Z1);this.Z1=void 0;this.Ta.play()};v.prototype.jUa=function(w){this.ne.xgb(w)};v.prototype.hUa=function(w){this.ne.tX(w)};v.prototype.qUa=function(w){w&&!this.Hc.hasAttribute("loop")?this.Hc.setAttribute("loop",""):!w&&this.Hc.hasAttribute("loop")&&this.Hc.removeAttribute("loop")};v.prototype.Vya=function(){this.Hc.log("HTMLMediaPlayer","on deactivated");c.jhb();d.wait(this.jga);this.Fb&&m(function(){c.request(this.Fb)}.bind(this))};
v.prototype.jga=function(){this.Hc.log("HTMLMediaPlayer","on reactivated");this.Ta.play()};v.prototype.vj=function(){this.o(p.sl,this.fp.KV())};v.prototype.Yk=function(){this.o(new h(v.cRa))};v.prototype.Jf=function(){this.o(new h(v.sg))};v.prototype.Qo=function(){this.o(new h(v.Pj))};v.prototype.dn=function(){this.o(new h(v.tl))};v.sg="time update";v.Pj="duration update";v.cRa="size update";v.tl="end";return v});
define("tdv/view/av/Subtitle",["require"],function(){return function(a){this.cue=a;this.text=a.text}});define("tdv/view/av/AVProperties",["require"],function(){function a(){this.zm=this.src=void 0;this.ED=!1;this.gain=1}a.prototype.clone=function(){var m=new a;m.src=this.src;m.zm=this.zm;m.ED=this.ED;m.gain=this.gain;return m};return a});
define("tdv/view/av/SharedPlayerOrchestrator","require tdv/utils 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){function m(t){this.yx=t;this.Ia=null;this.dfa=(new Date).getTime()}var k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),e=
a("tdv/events/EventDispatcher"),b=a("tdv/player/view/util/Capabilities"),c=a("tdv/player/view/util/Device"),d=a("tdv/player/view/util/URL"),f=a("tdv/view/av/HTMLMediaPlayer"),n=a("tdv/view/av/MediaType");m.prototype.Nma=function(){return this.Ia==null};m.prototype.x6=function(){return this.yx.x6()};m.prototype.o9=function(){return this.yx.o9()};m.prototype.item=function(){return this.Ia};m.prototype.Qab=function(){this.Ia.cKa();this.Ia=null};m.prototype.use=function(t){this.Ia=t;this.Ia.mHa(this.yx);
this.dfa=(new Date).getTime()};var l=k.extend(e,function(){e.call(this);this.ov=[];var t=d.hIa("avs",10);var u=c.Dc()==c.SA?10:b.J9a()?4:1;u=d.hIa("avpas",u);for(var v=0;v<t;v++)this.ov.push(new m(new f(n.Ip,v<u)));this.Df=[];this.H=h.aa});l.prototype.sO=function(){return this.Lwa().length>0};l.prototype.W7=function(t){this.Df=[t].concat(this.Df.filter(u=>u!==t));this.Kga();r()};l.prototype.appendItem=function(t){this.Df.push(t);this.Kga();r()};l.prototype.VW=function(t){this.Df=this.Df.filter(u=>
u!==t);this.Kga()};l.prototype.Kga=function(){var t=this.FZa();if(l.mJa())for(;this.ov.length<t.length;)this.ov.push(new m(new f(n.Ip,!1)));this.Lwa().forEach(function(u){t.indexOf(u.item())<0&&u.Qab()});this.Kd(t.length>0?h.PLAYING:h.aa);t.forEach(function(u){if(!this.dZa(u)){var v=this.VYa(u.getType(),u.zoa());v||u.zoa()||this.ov.push(v=new m(new f(n.Ip,!1)));v&&v.use(u)}}.bind(this));this.WYa().forEach(function(u){u.yx.stop()})};l.prototype.FZa=function(){return this.Df.map(function(t,u){var v=
{};v.index=u;v.priority=t.zIa();v.item=t;return v}).sort(function(t,u){return t.priority-u.priority||t.index-u.index}).map(function(t){return t.item})};l.prototype.Kd=function(t){this.H!=t&&(this.H=t,this.o(new g(this.H==h.aa?p.tg:p.Gp)))};l.prototype.VYa=function(t,u){t=this.ov.filter(function(v){return v.Nma()});return t.length?(u?(u=t.filter(function(v){return v.x6()}),u.length||(u=t.filter(function(v){return v.o9()}))):(u=t.filter(function(v){return!v.o9()}),u.length||(u=t.filter(function(v){return!v.x6()}))),
u.length&&(t=u),c.Rb()==c.Fk?(t.sort(function(v,w){return w.dfa-v.dfa}),t[Math.min(2,t.length-1)]):t[0]):null};l.prototype.WYa=function(){return this.ov.filter(function(t){return t.Nma()})};l.prototype.Lwa=function(){return this.ov.filter(function(t){return!t.Nma()})};l.prototype.dZa=function(t){for(var u=0;u<this.ov.length;u++)if(this.ov[u].item()==t)return this.ov[u];return null};l.El=null;l.bind=function(){var t=l.rj();t.bind.apply(t,arguments)};l.h=function(){var t=l.rj();t.h.apply(t,arguments)};
var q=[c.RA,c.cu].indexOf(c.Dc())>=0;l.mJa=function(){return q};l.sO=function(){return l.rj().sO()};l.appendItem=function(t){l.rj().appendItem(t)};l.W7=function(t){l.rj().W7(t)};l.VW=function(t){l.rj().VW(t)};l.Hx=function(){l.El===null&&(l.El=new l);return l.El};l.rj=l.Hx;l.Hx();var r=function(){if([c.RA,c.cu].indexOf(c.Dc())>=0){var t=document.createElement("video");t.muted=!1;t.setAttribute("loop","");t.src="data:video/mp4;base64, ";
return function(){try{t.pause(),setTimeout(function(){t.play()["catch"](function(){})},0)}catch(u){}}}return function(){}}();return l});
define("tdv/view/av/AudioPlayer","require tdv/utils 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){var m=a("tdv/utils"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),
e=a("tdv/view/av/HTMLMediaPlayer"),b=a("tdv/view/av/Subtitle"),c=a("tdv/view/av/AVProperties"),d=a("tdv/view/av/MediaType"),f=a("tdv/view/av/SharedPlayerOrchestrator"),n=a("tdv/view/util/Animation"),l=a("tdv/player/view/util/Capabilities"),q=m.extend(p,function(r,t,u){p.call(this);this.Fb=r;this.C=t;this.dv=u;this.B=null;this.UT();this.d1=this.d1.bind(this);this.C.bind(h.K("gain"),this.bM,this,!0);this.C.bind(h.K("mp3Url"),this.Kl,this,!0);this.C.bind(h.K("oggUrl"),this.Kl,this,!0);this.C.bind(h.K("subtitlesURL"),
this.Kl,this,!0);this.H=g.aa;this.Hl=!1;this.KB=this.Zb=0;this.Cf=!1;this.Ws=1;this.WQ=!1;this.qL=1;this.Ud=null;this.Jp=[]});q.prototype.Wb=function(){return this.Fb};q.prototype.Yc=function(r){this.H==r||r==g.Xb&&this.H!=g.PLAYING||(this.H=r,this.H==g.PLAYING?(this.pVa(),f.W7(this)):this.O5a(),this.eja())};q.prototype.O5a=function(){this.WQ||(this.WQ=!0,this.Eva=this.C.get("fadeOutTime"),this.Eva==0?this.iDa():this.d1(0))};q.prototype.d1=function(r){this.Ud&&this.qL!=0&&this.WQ&&!this.P_a()?(this.qL=
Math.max(0,this.qL-r/this.Eva),this.qZ(),n.requestFrame(this.d1)):this.iDa()};q.prototype.pVa=function(){this.WQ=!1;this.qL=1;this.qZ()};q.prototype.iDa=function(){this.WQ=!1;this.qL=1;this.Ud&&(f.VW(this),this.H==g.aa&&this.hia())};q.prototype.getState=function(){return this.H};q.prototype.Zi=function(){return this.Zb};q.prototype.setCurrentTime=function(r){this.KB=r;this.Ud&&this.Ud.play(this.Fb,this.B,this.KB)};q.prototype.getCurrentTime=function(){return this.KB};q.prototype.BA=function(r){this.Ws=
r;this.qZ()};q.prototype.qZ=function(){this.Ud&&this.Ud.BA(this.Ws*this.qL)};q.prototype.rg=function(r){this.Cf=r;this.Ud&&this.Ud.rg(r)};q.prototype.setLoop=function(r){this.Hl=r;this.Ud&&this.Ud.setLoop(r)};q.prototype.zoa=function(){return!this.Cf};q.prototype.getType=function(){return d.BQa};q.prototype.zIa=function(){return this.dv};q.prototype.mHa=function(r){this.Ud=r;setTimeout(function(){this.Ud&&this.Ud.bind(e.tl,this.rS,this,!0)}.bind(this),0);this.UT();this.Ud.bind(e.sg,this.Jf,this,!0);
this.Ud.bind(e.Pj,this.Qo,this,!0);this.Ud.bind(h.sl,this.vj,this,!0);this.Ud.rg(this.Cf);this.qZ();this.Ud.setLoop(this.Hl);this.Ud.play(this.Fb,this.B,this.KB)};q.prototype.cKa=function(){this.KB=this.Ud.getCurrentTime();this.Ud.h(e.tl,this.rS,this,!0);this.Ud.h(e.sg,this.Jf,this,!0);this.Ud.h(e.Pj,this.Qo,this,!0);this.Ud.h(h.sl,this.vj,this,!0);this.Ud=null};q.prototype.clear=function(){this.Yc(g.aa);this.C&&(this.C.h(h.K("gain"),this.bM,this,!0),this.C.h(h.K("mp3Url"),this.Kl,this,!0),this.C.h(h.K("oggUrl"),
this.Kl,this,!0),this.C.h(h.K("subtitlesURL"),this.Kl,this,!0),this.C=null)};q.prototype.Kl=function(){this.zH&&clearTimeout(this.zH);this.zH=setTimeout(function(){this.zH=null;this.Ud&&(this.B.src=this.XB(this.C),this.B.zm=this.C.get("subtitlesURL"),this.Ud.play(this.Fb,this.B,this.KB))}.bind(this),10)};q.prototype.bM=function(){if(this.Ud){var r=this.C.get("gain");this.B.gain!=r&&(this.B.gain=r,this.Ud.tX(this.B.gain))}};q.prototype.UT=function(){this.B=new c;this.B.src=this.XB(this.C);this.B.zm=
this.C.get("subtitlesURL");this.B.ED=!0;this.B.gain=this.C.get("gain")};q.prototype.XB=function(r){var t=r.get("mp3Url");return t&&l.rJa?t:(r=r.get("oggUrl"))&&l.sJa?r:t||r};q.prototype.Qo=function(){this.Zb=this.Ud.Zi();this.$ia()};q.prototype.Jf=function(){this.Zb!=this.Ud.Zi()&&this.Qo();this.KB=this.Ud.getCurrentTime();this.yU()};q.prototype.vj=function(){this.Jp=this.Ud.KV().map(function(r){for(var t=null,u=0;u<this.Jp.length&&!t;u++)this.Jp[u].cue==r&&(t=this.Jp[u]);t||(t=new b(r));return t}.bind(this));
this.o(new k(h.sl))};q.prototype.rS=function(){this.Yc(g.aa);this.aja()};q.prototype.P_a=function(){return this.Ud&&this.Ud.getCurrentTime()&&this.Ud.getCurrentTime()==this.Ud.Zi()};q.prototype.hia=function(){this.KB=0;this.yU()};q.prototype.yU=function(){this.o(new k(q.sg))};q.prototype.$ia=function(){this.o(new k(q.Pj))};q.prototype.aja=function(){this.o(new k(h.Qb))};q.prototype.eja=function(){this.o(new k(h.Ye))};q.sg="time update";q.Pj="duration update";return q});
define("tdv/view/av/VideoFrame",["require"],function(){function a(k,p,h){this.le=k;this.wDa=p;this.Hu=h||m}var m=function(){var k=document.createElement("canvas");k.width=k.height=256;k.getContext("2d").clearRect(0,0,k.width,k.height);return k}();a.prototype.isEmpty=function(){return this.Hu==m||this.Hu.tagName=="CANVAS"&&(this.Hu.width==0||this.Hu.height==0)};a.prototype.isEqual=function(k,p){return this.le==k.le&&Math.abs(this.wDa-k.wDa)<=(p||0)&&this.Hu==k.Hu};return a});
define("tdv/view/av/VideoLevelUtil",["require","tdv/player/view/util/Capabilities","tdv/player/view/util/Device","tdv/player/view/util/FileType"],function(a){function m(b){return h.cPa(b)}function k(b,c){if(!c)return!0;var d=b.get("url"),f=b.get("srcObject");b=b.get("type")||"";switch(c){case "srcObj":return!!f;case "webm":return g.is(d,g.OSa)||p(b,"webm");case "h265":return g.is(d,g.tRa)||(g.is(d,g.Ora)||g.is(d,g.ura)||!d)&&(p(b,"hev1")||p(b,"h265")||p(b,"heic"))?!0:!1;case "mp4":return g.is(d,g.Ora)||
p(b,"mp4");case "hls":return g.is(d,g.HLS)||p(b,"x-mpegurl");case "ogv":return g.is(d,g.VRa)||p(b,"ogg");case "mov":return g.is(d,g.ura)||p(b,"quicktime");default:return!1}}function p(b,c){return(b||"").toLowerCase().indexOf(c)>=0}var h=a("tdv/player/view/util/Capabilities");a("tdv/player/view/util/Device");var g=a("tdv/player/view/util/FileType"),e={fcb:function(b){return e.select(b.get("levels"))},ccb:function(b){return e.select(b.get("levels"))},select:function(b){b||(b=[]);b=b.slice();var c=[];
c.push({type:"srcObj",Tt:!0});h.zcb&&c.push({type:"hls",Tt:!1});h.Rcb&&c.push({type:"h265",Tt:!0});h.uma&&c.push({type:"webm",Tt:!0});h.m6&&c.push({type:"mp4",Tt:!0});h.Scb&&c.push({type:"mov",Tt:!0});h.tma&&c.push({type:"ogv",Tt:!0});c.push({type:"mp4",Tt:!0});c.push({type:"webm",Tt:!0});c.push({type:"mp4",Tt:!1});c.push({type:"webm",Tt:!1});for(var d=0;d<c.length;d++){var f=b;c[d].Tt&&(f=f.filter(m));f=f.filter(function(n){if(k(n,c[d].type))return!0});c[d].type!="hls"&&f.sort(function(n,l){return l.get("width")-
n.get("width")});if(f.length)return f[0]}return null}};return e});
define("tdv/view/av/VideoPlayer","require tdv/utils 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){function m(y){d.Rb()==d.Fk&&(y=f.hD(y,"playbacksession="+
(new Date).getTime()));return y}var k=a("tdv/utils"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/constants/EventName"),e=a("tdv/constants/PlaybackState"),b=a("tdv/constants/Priority"),c=a("tdv/player/parser/ClassInfo"),d=a("tdv/player/view/util/Device"),f=a("tdv/player/view/util/URL"),n=a("tdv/view/av/HTMLMediaPlayer"),l=a("tdv/view/av/Subtitle"),q=a("tdv/view/av/VideoFrame"),r=a("tdv/view/av/AVProperties"),t=a("tdv/view/av/MediaType"),u=a("tdv/view/av/SharedPlayerOrchestrator"),
v=a("tdv/view/av/VideoLevelUtil"),w=k.extend(h,function(y,x){h.call(this);this.Fb=y;this.C=x;this.pb=w.rk(this.C);this.B=null;this.UT();this.C.bind(g.K("subtitlesURL"),this.Kl,this,!0);this.C.bind(g.K("gain"),this.bM,this,!0);this.pb.bind(g.K("srcObject"),this.Kl,this,!0);this.pb.bind(g.K("subtitlesURL"),this.Kl,this,!0);this.pb.bind(g.K("url"),this.Kl,this,!0);this.pb.bind(g.K("gain"),this.bM,this,!0);this.H=e.aa;this.gg=this.Zb=0;this.Cf=!1;this.Ws=1;this.Hl=!1;this.ea=this.lc=null;this.SK=!1;this.FZ=
void 0;this.nua=!1;this.Jp=[]});w.prototype.Wb=function(){return this.Fb};w.prototype.Yc=function(y){this.H==y||y==e.Xb&&this.H!=e.PLAYING||(this.nua&&y==e.PLAYING&&this.H==e.aa&&this.xba(),this.H=y,this.H==e.PLAYING?(this.lc&&this.lc.play(this.Fb,this.B,this.gg),u.W7(this)):(u.mJa()?this.lc&&this.lc.stop():u.VW(this),this.H==e.aa&&this.hia()),this.eja())};w.prototype.getState=function(){return this.H};w.prototype.Zi=function(){return this.Zb};w.prototype.setCurrentTime=function(y){this.gg=y;this.lc&&
(this.lc.OI()&&this.QQ(),this.lc.play(this.Fb,this.B,this.gg))};w.prototype.getCurrentTime=function(){return this.gg};w.prototype.BA=function(y){this.Ws=y;this.lc&&this.lc.BA(y)};w.prototype.rg=function(y){this.Cf=y;this.lc&&this.lc.rg(y)};w.prototype.setLoop=function(y){this.Hl=y;this.lc&&this.lc.setLoop(y)};w.prototype.dgb=function(){this.nua=!0};w.prototype.VN=function(y,x,z){this.lc&&this.lc.OI()?this.lc.VN(y,x,z):this.SK?y.drawImage(this.ea,0,0,x,z):y.fillRect(0,0,x,z)};w.prototype.M5=function(){if(this.lc&&
this.lc.OI()){var y=this.lc.getCurrentTime(),x=this.lc.Hc;if(this.yR())return new q(this.B.src,this.FZ,this.ea);this.xba();return new q(this.B.src,y,x)}return this.SK?new q(this.B.src,this.gg,this.ea):new q(this.B.src,this.gg,null)};w.prototype.zoa=function(){return!this.Cf&&this.C.get("hasAudio")};w.prototype.getType=function(){return t.Ip};w.prototype.zIa=function(){return b.Ip};w.prototype.mHa=function(y){this.lc=y;setTimeout(function(){this.lc&&this.lc.bind(n.tl,this.rS,this,!0)}.bind(this),0);
this.UT();this.lc.bind(n.sg,this.Jf,this,!0);this.lc.bind(n.Pj,this.Qo,this,!0);this.lc.bind(g.sl,this.vj,this,!0);this.lc.rg(this.Cf);this.lc.BA(this.Ws);this.lc.setLoop(this.Hl);this.lc.play(this.Fb,this.B,this.gg)};w.prototype.cKa=function(){this.lc.OI()&&this.QQ();this.gg=this.lc.getCurrentTime();this.lc.h(n.tl,this.rS,this,!0);this.lc.h(n.sg,this.Jf,this,!0);this.lc.h(n.Pj,this.Qo,this,!0);this.lc.h(g.sl,this.vj,this,!0);this.H==e.aa&&(this.lc.stop(),this.lc.setCurrentTime(0),this.LVa());this.lc=
null};w.prototype.clear=function(){u.VW(this);this.xba();this.C&&(this.C.h(g.K("subtitlesURL"),this.Kl,this,!0),this.C.h(g.K("gain"),this.bM,this,!0),this.C=null);this.pb&&(this.pb.h(g.K("subtitlesURL"),this.Kl,this,!0),this.pb.h(g.K("url"),this.Kl,this,!0),this.pb.h(g.K("srcObject"),this.Kl,this,!0),this.pb=null)};w.prototype.Kl=function(){this.zH&&clearTimeout(this.zH);this.zH=setTimeout(function(){this.zH=null;this.lc&&(this.B.zm=this.C.get("subtitlesURL")||this.pb.get("subtitlesURL"),this.B.src=
this.pb.get("srcObject")||m(this.pb.get("url")),this.lc.play(this.Fb,this.B,this.gg))}.bind(this),10)};w.prototype.bM=function(){this.lc&&(this.B.gain=this.C.get("gain",1)*this.pb.get("gain",1),this.lc.tX(this.B.gain))};w.prototype.UT=function(){this.B=new r;this.B.src=this.pb.get("srcObject")||m(this.pb.get("url"));this.B.zm=this.C.get("subtitlesURL")||this.pb.get("subtitlesURL");this.B.ED=this.C.get("hasAudio",!0)&&this.pb.get("hasAudio",!0);this.B.gain=this.C.get("gain",1)*this.pb.get("gain",1)};
w.prototype.QQ=function(){this.ea||(this.ea=document.createElement("canvas"));if(!this.yR()){this.ea.width=this.lc.Zf();this.ea.height=this.lc.pg();this.FZ=this.lc.getCurrentTime();var y=this.ea.getContext("2d");y.clearRect(0,0,this.ea.width,this.ea.height);this.SK=this.lc.VN(y,this.ea.width,this.ea.height)}};w.prototype.yR=function(){var y=this.lc.getCurrentTime();this.Zb&&(y=Math.min(y,this.Zb));return this.SK&&Math.abs(y-this.FZ)<=.15};w.prototype.xba=function(){this.SK&&(this.FZ=void 0,this.SK=
!1,d.Rb()!=d.Fk&&(this.ea.width=0,this.ea.height=0,this.ea=null))};w.prototype.Qo=function(){this.Zb=this.lc.Zi();this.$ia()};w.prototype.Jf=function(){var y=this.lc.Zi();y!==0&&(this.Zb!=y&&this.Qo(),this.gg=this.lc.getCurrentTime(),d.Od()==d.fj&&this.gg>0&&this.gg>this.Zb-.15&&!this.yR()&&!this.Hl?this.QQ():d.Rb()==d.Fk&&this.gg>0&&this.gg>this.Zb-.05&&!this.yR()&&!this.Hl?this.QQ():d.Rb()==d.Ap&&this.gg>0&&this.gg>this.Zb-.05&&!this.yR()&&this.Hl&&this.QQ(),this.yU())};w.prototype.vj=function(){this.Jp=
this.lc.KV().map(function(y){for(var x=null,z=0;z<this.Jp.length&&!x;z++)this.Jp[z].cue==y&&(x=this.Jp[z]);x||(x=new l(y));return x}.bind(this));this.o(new p(g.sl))};w.prototype.LVa=function(){this.Jp.length!=0&&(this.Jp=[],this.o(new p(g.sl)))};w.prototype.rS=function(){this.Yc(e.aa);this.aja()};w.prototype.hia=function(){this.gg=0;this.yU()};w.prototype.yU=function(){this.o(new p(w.sg))};w.prototype.$ia=function(){this.o(new p(w.Pj))};w.prototype.aja=function(){this.o(new p(g.Qb))};w.prototype.eja=
function(){this.o(new p(g.Ye))};w.sg="time update";w.Pj="duration update";w.rk=function(y){if(c.Qa("Video360Resource",y))return v.ccb(y);if(c.Qa("VideoResource",y))return v.fcb(y);throw"invalid video resource object: "+y;};return w});
define("tdv/view/av/SubtitleController",["require","tdv/view/av/VideoPlayer","tdv/constants/EventName"],function(a){function m(p,h){this.rZ=p;this.yx=h;this.Baa=[];this.IUa();this.vj()}a("tdv/view/av/VideoPlayer");var k=a("tdv/constants/EventName");m.prototype.clear=function(){this.EVa();this.d7a();this.yx=this.rZ=null};m.prototype.IUa=function(){this.yx.bind(k.sl,this.vj,this,!0)};m.prototype.d7a=function(){this.yx.h(k.sl,this.vj,this,!0)};m.prototype.vj=function(){this.rZ.set("activeSubtitles",
this.Baa=this.yx.Jp)};m.prototype.EVa=function(){this.rZ.get("activeSubtitles")==this.Baa&&this.rZ.set("activeSubtitles",this.Baa=[])};return m});
define("tdv/player/script/Audio","require 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){var m=a("tdv/constants/EventName"),k=a("tdv/constants/Priority"),p=a("tdv/constants/PlaybackState"),h=a("tdv/binding/Bindable"),g=a("tdv/events/Event"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/view/av/AudioPlayer"),c=a("tdv/view/av/SubtitleController");
a=e.define("Audio",h,function(d){h.call(this);this.dv=d||k.CSa;this.Mp=void 0;this.rn=null});a.prototype.EI=function(){if(this.Mp==void 0){this.rn&&(this.rn.clear(),this.rn=null);var d=this.get("audio");d?(this.Mp=new b(this.get("application"),d,this.dv),d=function(){this.Mp.setLoop(this.get("loop",!1))},d.call(this),this.bind(m.K("loop"),d,this),d=function(){this.Mp.rg(this.get("application").get("mute",!1))},d.call(this),this.get("application").bind(m.K("mute"),d,this,!0),d=function(){this.set("state",
this.Mp.getState())},d.call(this),this.Mp.bind(m.Ye,d,this,!0),this.Mp.bind(m.Qb,this.Z0a,this,!0),this.rn=new c(this,this.Mp)):this.Mp=null}return this.Mp};a.prototype.set=function(d,f){switch(d){case "state":var n=this.get("state")||p.aa,l=this.Mp&&this.Mp.getState()||p.aa;l!=n&&(n==p.aa&&l==p.PLAYING&&this.o(m.Gp),this.o(new g(m.Ye,{oldState:n,state:l})));break;case "subtitlesViewerArea":(n=h.prototype.get.call(this,d))&&n.H3.remove(this),f&&f.H3.add(this)}h.prototype.set.call(this,d,f)};a.prototype.Yv=
function(){return[]};a.prototype.Z0a=function(){this.o(new g(m.Qb))};a.prototype.play=a.prototype.Ql=function(){var d=this.EI();d&&d.Yc(p.PLAYING)};a.prototype.stop=a.prototype.sq=function(){var d=this.EI();d&&d.Yc(p.aa)};a.prototype.pause=a.prototype.ws=function(){var d=this.EI();d&&d.Yc(p.Xb)};return a});
define("tdv/player/script/MediaAudio",["require","tdv/player/parser/ClassInfo","tdv/player/script/Audio"],function(a){var m=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/Audio");return m.define("MediaAudio",k,function(p){k.call(this,p)})});
define("tdv/player/script/PanoramaAudio",["require","tdv/constants/Priority","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio"],function(a){var m=a("tdv/constants/Priority"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/script/MediaAudio");return k.define("PanoramaAudio",p,function(){p.call(this,m.ZRa)})});
define("tdv/player/script/DirectionalPanoramaAudio",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaAudio"],function(a){var m=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PanoramaAudio");return m.define("DirectionalPanoramaAudio",k,function(){k.call(this)})});
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"),k=a("tdv/player/script/Model3DCameraMovement");return m.define("DistanceModel3DCameraMovement",k,function(){k.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,k,p){return function(){function h(g,e,b,c,d){this.Xr=null;this.Ifa=g;this.Rf=k.K(this.Ifa);this.Rda=e;this.Da=b||window;this.qea=c;this.qya=d;this.Cea=!1}h.prototype.EE=function(){this.Hha(null)};h.prototype.Hha=function(g){var e=this;p.toArray(this.Xr).forEach(function(b){b&&b.h(this.Rf,e.eua,e)}.bind(this));this.Xr=g;p.toArray(this.Xr).forEach(function(b){b&&b.bind(this.Rf,this.eua,e,e.qea)}.bind(this));
this.HBa()};h.prototype.HBa=function(){this.qya&&this.qya.Hha(this.aZa())};h.prototype.aZa=function(){return this.Xr==null?null:Array.isArray(this.Xr)?this.Xr.map(function(g){return g?g.get(this.Ifa):null}.bind(this)):this.Xr.get(this.Ifa)};h.prototype.eua=function(g){if(!this.Cea){try{this.Cea=!0,this.HBa(),this.Rda.call(this.Da,g)}catch(e){p.sW("ChangeWatcher._changeHandler",e)}this.Cea=!1}};h.Fw=function(g,e,b,c,d){d===void 0&&(d=!1);p.Yz(e)&&(e=e.split("."));return e.length>0?(e=new h(e[0],b,
c,d,h.Fw(null,e.slice(1),b,c,d)),e.Hha(g),e):null};return h}()});
define("tdv/view/list/dropdown/DropDownArrow",["require","exports","tdv/view/canvas/Canvas"],function(a,m,k){return function(p){function h(){var g=p.call(this)||this;g.cf("DropDownArrow");return g}P(h,p);h.prototype.Nb=function(){p.prototype.Nb.call(this);this.j("color","#000000");this.j("direction",h.K9)};h.prototype.eb=function(){this.Paa(["color","direction"])&&(this.$("color"),this.$("direction"),this.lW());p.prototype.eb.call(this)};h.prototype.eqa=function(){var g=this.u.canvas.width,e=this.u.canvas.height,
b=this.G("color"),c=this.G("direction"),d=[g*.5,0,g];c=c==h.K9?[e,0,0]:[0,e,e];var f=this.XHa();f.clearRect(0,0,g,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();p.prototype.eqa.call(this)};h.K9="down";return h}(k)});
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,k,p,h,g,e,b,c,d,f){return function(n){function l(){var q=n.call(this)||this;q.cf("DropDownButton");q.Wa=null;q.sB=null;q.Yea=!0;q.set("ariaRole","dropdown");q.set("autoRolledOver",
!0);q.set("autoPressed",!0);q.set("childrenInteractionEnabled",!1);q.set("contentOpaque",!0);q.set("cursor",h.hf);q.bind(g.oa,q.Kca,q,!1);return q}P(l,n);l.prototype.Nb=function(){n.prototype.Nb.call(this);this.j("arrowColor","#000000");this.j("arrowBeforeLabel");this.j("arrowWidth",9);this.j("arrowHeight",5);this.j("arrowGap",5);this.j("shadow",!1);this.j("layout",e.Wh);this.j("verticalAlign",p.Pd);this.j("borderRadius",5);this.j("borderColor","#AAAAAA");this.j("borderSize",1);this.j("backgroundColor",
["#FAFAFA","#E5E5E5"]);this.j("backgroundColorRatios",[0,1]);this.j("backgroundColorDirection","vertical");this.j("paddingLeft",5);this.j("paddingTop",5);this.j("paddingRight",5);this.j("paddingBottom",5);this.j("fontFamily");this.j("fontSize");this.j("fontColor","#555555");this.j("fontWeight");this.j("fontStyle");this.j("textDecoration");this.j("textShadowColor");this.j("textShadowHorizontalLength");this.j("textShadowVerticalLength");this.j("textShadowBlurRadius");this.j("textShadowOpacity");this.D("rollOverBorderColor",
b.fa,"borderColor");this.D("rollOverArrowColor",b.fa,"arrowColor");this.D("rollOverBackgroundColor",b.fa,"backgroundColor");this.D("rollOverBackgroundColorRatios",b.fa,"backgroundColorRatios");this.D("rollOverShadow",b.fa,"shadow");this.D("pressedBorderColor",b.Mb,"borderColor");this.D("pressedArrowColor",b.Mb,"arrowColor");this.D("pressedBackgroundColor",b.Mb,"backgroundColor");this.D("pressedBackgroundColorRatios",b.Mb,"backgroundColorRatios");this.D("pressedShadow",b.Mb,"shadow");this.D("pressedRollOverBorderColor",
b.vc,"borderColor");this.D("pressedRollOverArrowColor",b.vc,"arrowColor");this.D("pressedRollOverBackgroundColor",b.vc,"backgroundColor");this.D("pressedRollOverBackgroundColorRatios",b.vc,"backgroundColorRatios");this.D("pressedRollOverShadow",b.vc,"shadow");this.D("pressedBorderColor",b.qa,"borderColor");this.D("pressedArrowColor",b.qa,"arrowColor");this.D("pressedBackgroundColor",b.qa,"backgroundColor");this.D("pressedBackgroundColorRatios",b.qa,"backgroundColorRatios");this.D("pressedShadow",
b.qa,"shadow")};l.prototype.set=function(q,r){q=="label"&&this.get("label")!=r&&(this.Yea=!0,this.Ff());n.prototype.set.call(this,q,r)};l.prototype.Ib=function(){n.prototype.Ib.call(this);this.Wa||(this.Wa=new f,this.Wa.set("width","100%"),this.hb(this.Wa));this.sB||(this.sB=new d,this.sB.set("direction",d.K9),this.hb(this.sB))};l.prototype.Kca=function(){this.open();this.o(new k(g.OPEN))};l.prototype.open=function(){this.h(g.oa,this.Kca,this);this.PT(!0)};l.prototype.close=function(){this.bind(g.oa,
this.Kca,this,!1);this.PT(!1)};l.prototype.xx=function(){return this.Wa&&this.Wa.get("text")||n.prototype.xx.call(this)};l.prototype.eb=function(){if(this.Yea){var q=this.get("label");this.Wa.set("text",q);this.Yea=!1}this.Oc("horizontalAlign fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),{},[this.Wa],!0,!0);this.S("arrowGap")&&(this.set("gap",this.G("arrowGap")),
this.$("arrowGap"));this.S("arrowColor")&&(this.sB.set("color",this.G("arrowColor")),this.$("arrowColor"));this.S("arrowBeforeLabel")&&(this.G("arrowBeforeLabel")==1?this.Vq(this.sB,0):this.Vq(this.Wa,0),this.$("arrowBeforeLabel"));this.S("arrowWidth")&&(this.sB.set("width",this.G("arrowWidth")),this.$("arrowWidth"));this.S("arrowHeight")&&(this.sB.set("height",this.G("arrowHeight")),this.$("arrowHeight"));n.prototype.eb.call(this)};return l}(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,k,p,h,g,e,b,c,d,f){return function(n){function l(q){var r=n.call(this)||this;r.iba=!1;r.Ub=null;r.KR=[];r.XC=!0;r.Y2=!1;r.he=q;r.cf("DropDownPopup");r.set("ariaRole","listbox");
return r}P(l,n);l.prototype.qIa=function(){return this.Ub.Ab()};l.prototype.open=function(){this.TF=this.PHa();this.iba=!0;this.TF.hb(this);this.set("overIndex",-1);this.set("visible",!0);this.bind(b.Ra,this.re,this,!1);this.TF.bind(b.bb,this.Tu,this,!1);this.TF.bind(b.Yb,this.jd,this,!1)};l.prototype.close=function(){this.set("visible",!1);this.Ub.set("overflow",e.wK);this.Ub.set("contentOpaque",!0);this.h(b.Ra,this.re,this);this.TF.h(b.bb,this.Tu,this);this.TF.bind(b.Yb,this.jd,this,!1);this.TF.removeChild(this);
this.TF=null};l.prototype.Ib=function(){c.prototype.Ib.call(this);this.Ub||(this.Ub=new d,this.Ub.set("overflow",e.wK),this.Ub.bind(b.Yb,this.jd,this,!1),this.Ub.bind(b.zr,this.OC,this,!1),this.hb(this.Ub))};l.prototype.PHa=function(){for(var q=this.he.getParent();q.getParent();)q=q.getParent();return q};l.prototype.jd=function(){this.vEa()};l.prototype.re=function(){this.Y2=!1};l.prototype.OC=function(){this.Y2=!0};l.prototype.Tu=function(){this.get("overIndex")!=-1||this.Y2&&k.br()||this.o(new p(b.VA));
this.Y2=!1};l.prototype.o1a=function(q){this.set("overIndex",this.Jda(q.source))};l.prototype.p1a=function(q){q=this.Jda(q.source);this.get("overIndex")==q&&this.set("overIndex",-1)};l.prototype.n1a=function(q){q=this.Jda(q.source);this.set("overIndex",q);this.set("selectedIndex",q);this.o(new p(b.Ar))};l.prototype.Jda=function(q){for(var r=0;r<this.KR.length;r++)if(this.KR[r]==q)return r;return-1};l.prototype.Nb=function(){this.zl(l.ad)};l.prototype.IZa=function(q){var r;for(r=q;r.getParent();r=
r.getParent());q=q.wa().AIa(r.wa());if(r=this.he.Wb())q.left/=r.AC,q.top/=r.AC;return q};l.prototype.eb=function(){var q=!1,r=!1;if(this.S("items")){q=this.G("items")||[];for(var t=this.KR.length;t<q.length;t++){var u=new f;u.xa({width:"100%",paddingLeft:5,paddingRight:5,paddingBottom:2,paddingTop:2,cursor:g.hf});u.bind(b.lF,this.o1a,this,!1);u.bind(b.sr,this.p1a,this,!1);u.bind(b.oa,this.n1a,this,!1);this.KR.push(u)}u=this.Ub.Ab();for(t=q.length;t<u.length;t++)this.Ub.removeChild(u[t]);for(t=u.length;t<
q.length;t++)this.Ub.hb(this.KR[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.Ub.Ab(),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"),y=this.G("rollOverPopUpFontColor")||w,x=this.G("selectedPopUpFontColor")||w,z=this.G("selectedIndex"),A=this.G("overIndex");u=this.Ub.Ab();for(t=0;t<u.length;t++)t==z?u[t].xa({fontColor:x,backgroundColor:v}):t==A?u[t].xa({fontColor:y,backgroundColor:r}):u[t].xa({fontColor:w,backgroundColor:q})}if(this.iba||this.S("popUpGap")||
this.S("buttonWidth"))this.he&&this.Ub.set("minWidth",this.he.cb()),this.$("popUpGap"),this.vEa(),this.iba=!1;this.Oc("popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{popUpShadow:"shadow",popUpShadowBlurRadius:"shadowBlurRadius",popUpShadowColor:"shadowColor",popUpShadowHorizontalLength:"shadowHorizontalLength",popUpShadowOpacity:"shadowOpacity",popUpShadowSpread:"shadowSpread",popUpShadowVerticalLength:"shadowVerticalLength"},
[this.Ub],!0,!0);this.XDa();c.prototype.eb.call(this)};l.prototype.vEa=function(){var q=this.PHa(),r=this.IZa(this.he),t=this.he.cb(),u=this.he.Kb(),v=this.G("popUpGap"),w=this.Ub.u.contentWidth,y=this.Ub.u.contentHeight,x=q.Kb()-(r.top+u+v)-5,z=r.top-5-v,A=this.G("horizontalAlign");y<=x?(this.XC=!0,this.Ub.set("top",r.top+u+v),this.Ub.set("maxHeight",void 0),this.Ub.set("overflow",e.wK)):y<=z?(this.XC=!1,this.Ub.set("top",r.top-y-v),this.Ub.set("maxHeight",void 0),this.Ub.set("overflow",e.wK)):(x>=
z?(this.XC=!0,this.Ub.set("top",r.top+u+v),this.Ub.set("maxHeight",x)):(this.XC=!1,this.Ub.set("top",r.top-z+v),this.Ub.set("maxHeight",z)),this.Ub.set("overflow",e.zr));u=A==h.Xe?r.left+Math.round((t-w)*.5):A==h.Cb?r.left+t-w:r.left;u<0?u=r.left:r.left+w>q.cb()&&(u=r.left+t-w);this.Ub.set("left",u);this.XDa()};l.prototype.XDa=function(){var q=this.G("popUpBorderRadius");this.Ub.xa({borderTopRadius:this.XC?0:q,borderBottomRadius:this.XC?q:0});for(var r=this.Ub.Ab(),t=0;t<r.length;t++){var u=t==0,
v=t==r.length-1;r[t].xa({borderTopRadius:!this.XC&&u?q:0,borderBottomRadius:this.XC&&v?q:0})}};l.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,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 l}(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,k,p,h,g,e){return function(b){function c(){var d=b.call(this)||this;d.cf("DropDown");d.he=new g;d.he.bind(p.Yb,d.d1a,d,!1);d.he.bind(p.OPEN,d.D1a,d,!1);d.he.bind(p.VA,d.YL,d,!1);d.he.bind(p.sd,d.c1a,d,!1);d.he.set("width","100%");d.he.set("height","100%");d.he.set("toolTipDisabled",
!0);d.ek=new e(d.he);d.ek.bind(p.VA,d.YL,d,!1);d.ek.bind(p.Ar,d.T1a,d,!1);d.SCa=!0;d.vn=!1;return d}P(c,b);c.prototype.Nb=function(){b.prototype.Nb.call(this);this.j("prompt","");this.j("label","");this.j("items",[]);this.j("selectedIndex",-1);this.j("arrowBeforeLabel");this.j("arrowWidth",9);this.j("arrowHeight",5);this.j("arrowGap",5);this.j("borderRadius",5);this.j("borderSize",1);this.j("backgroundColorDirection","vertical");this.j("horizontalAlign","left");this.j("paddingLeft",5);this.j("paddingTop",
5);this.j("paddingRight",5);this.j("paddingBottom",5);this.j("fontFamily");this.j("fontSize");this.j("fontColor","#555555");this.j("fontWeight");this.j("fontStyle");this.j("textDecoration");this.j("textShadowColor");this.j("textShadowHorizontalLength");this.j("textShadowVerticalLength");this.j("textShadowBlurRadius");this.j("textShadowOpacity");this.j("popUpGap",0);this.j("popUpBorderRadius");this.j("popUpPaddingBottom",2);this.j("popUpPaddingLeft",5);this.j("popUpPaddingRight",5);this.j("popUpPaddingTop",
2);this.j("popUpShadow",!0);this.j("popUpShadowBlurRadius");this.j("popUpShadowColor");this.j("popUpShadowHorizontalLength");this.j("popUpShadowOpacity");this.j("popUpShadowSpread");this.j("popUpShadowVerticalLength");this.j("popUpBackgroundColor","#FFFFFF");this.j("popUpBackgroundOpacity");this.j("rollOverPopUpBackgroundColor");this.j("selectedPopUpBackgroundColor");this.j("popUpFontColor","#555555");this.j("rollOverPopUpFontColor");this.j("selectedPopUpFontColor");this.j("borderColor","#AAAAAA");
this.j("arrowColor","#000000");this.j("backgroundColor",["#FAFAFA","#E5E5E5"]);this.j("backgroundColorRatios",[0,1]);this.j("shadow",!1);this.j("rollOverBorderColor");this.j("rollOverArrowColor");this.j("rollOverBackgroundColor");this.j("rollOverBackgroundColorRatios");this.j("rollOverShadow");this.j("pressedBorderColor");this.j("pressedArrowColor");this.j("pressedBackgroundColor");this.j("pressedBackgroundColorRatios");this.j("pressedShadow");this.j("pressedRollOverBorderColor");this.j("pressedRollOverArrowColor");
this.j("pressedRollOverBackgroundColor");this.j("pressedRollOverBackgroundColorRatios");this.j("pressedRollOverShadow")};c.prototype.Ib=function(){b.prototype.Ib.call(this);this.he.getParent()||this.hb(this.he)};c.prototype.close=function(){this.YL()};c.prototype.d1a=function(){this.SCa=!0;this.Ff()};c.prototype.D1a=function(){this.he.open();this.ek.set("selectedIndex",this.get("selectedIndex"));this.ek.open()};c.prototype.YL=function(){this.o(new k(p.VA));this.he.close();this.ek.close()};c.prototype.c1a=
function(){this.he.close();this.ek.close()};c.prototype.T1a=function(){this.set("selectedIndex",this.ek.get("selectedIndex"));this.YL();this.vn=!0};c.prototype.eb=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"),n=this.G("items");f>=0&&f>=n.length&&(f=-1);this.set("selectedIndex",f);this.ek.set("items",this.G("items"));this.ek.set("selectedIndex",this.G("selectedIndex"));this.$("items");
this.$("selectedIndex");this.vn&&(this.vn=!1,this.o(new k(p.V)))}d&&(d=this.G("label"),d||(f=this.G("selectedIndex"),d=f<0?this.G("prompt"):this.G("items")[f]),this.he.set("label",d));this.SCa&&(this.ek.set("minWidth",this.he.cb()),this.ek.set("buttonWidth",this.he.cb()));this.Oc("fontFamily fontSize fontColor fontWeight fontStyle tabIndex textDecoration horizontalAlign textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),{},[this.he,
this.ek],!0,!0);this.Oc("popUpBorderRadius popUpGap popUpPaddingBottom popUpPaddingLeft popUpPaddingRight popUpPaddingTop popUpBackgroundColor popUpBackgroundOpacity rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{},[this.ek],!0,!0);this.Oc("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.he],!0,!0);b.prototype.eb.call(this)};return c}(h)});
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"),k=a("tdv/constants/EventName"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/list/dropdown/DropDown");a=p.define("DropDown",h,function(){h.call(this);this.Td=null;this.Axa=[];this.bind(k.V,this.g1a,this)});a.prototype.set=function(g,e){if(g=="playList"){if(this.Td)for(this.Td.h("change",
this.Jy,this);this.Axa.length;)this.Axa.shift().EE();(this.Td=e)?(m.Fw(this.Td,"items.label",this.b4,this),m.Fw(this.Td,"items.media.label",this.b4,this),this.b4(),this.Td.bind("change",this.Jy,this),this.Jy()):this.b4()}h.prototype.set.call(this,g,e)};a.prototype.b4=function(){this.Td?this.set("items",this.Td.get("items").map(function(g){return g.get("label")||g.get("media")&&g.get("media").get("label")})):this.set("items",[])};a.prototype.Jy=function(){this.set("selectedIndex",this.Td.get("selectedIndex"))};
a.prototype.g1a=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(k,p){k=="startState"&&p===void 0&&(p=this.get("initialState"));return m.prototype.get.call(this,k,p)};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"),k=a("tdv/view/effects/Effect");a=m.define("Effect",k,function(){k.call(this)});a.prototype.cancel=function(){return k.prototype.cancel.apply(this,arguments)};a.prototype.getPosition=function(){return k.prototype.pm.apply(this,arguments)};a.prototype.play=function(){return k.prototype.play.apply(this,arguments)};a.prototype.reverse=function(){return k.prototype.reverse.apply(this,
arguments)};a.prototype.stop=function(){return k.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"),k=a("tdv/view/effects/FadeInEffect");return m.define("FadeInEffect",k,function(){k.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"),k=a("tdv/view/effects/FadeOutEffect");return m.define("FadeOutEffect",k,function(){k.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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/parser/ClassInfo"),g=a("tdv/events/async");a=h.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.Bca=this.H0a=this.Eba=this.Dba=!1;"distance fov yaw pitch x y z".split(" ").forEach(function(e){this.bind(k.K(e),this.N1a,this,!0)}.bind(this))});a.prototype.mib=function(){this.$M={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.p5a=function(e){this.$M||(this.$M={});for(var b in e)this.$M[b]=e[b]};a.prototype.Ofb=function(){this.$M&&this.setPosition(this.$M)};a.prototype.VNa=function(e){this.Yxa!==e&&(this.Yxa=e,this.O7a())};a.prototype.O7a=function(){this.set("mouseDisabled",
this.H0a||this.Yxa)};a.prototype.egb=function(e){this.Dba!==e&&(this.Dba=e,this.ZDa())};a.prototype.yNa=function(e){this.Eba!==e&&(this.Eba=e,this.ZDa())};a.prototype.ZDa=function(){this.set("clickTranslationDisabled",this.Dba||this.Eba)};a.prototype.lgb=function(e){this.Bca!==e&&(this.Bca=e,this.y7a())};a.prototype.y7a=function(){this.set("doubleClickDisabled",this.Bca)};a.prototype.N1a=function(){this.SAa||(this.SAa=!0,g.iE(function(){this.SAa=!1;this.Z6a()}.bind(this)))};a.prototype.Z6a=function(){this.o(k.Hm)};
a.ykb=100;a.prototype.setStoredPosition=function(e){this.p5a(e)};a.prototype.play=function(){this.set("state",p.PLAYING)};a.prototype.pause=function(){this.set("state",p.Xb)};a.prototype.stop=function(){this.set("state",p.aa)};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"),k=a("tdv/player/script/Model3DCamera");return m.define("FirstPersonModel3DCamera",k,function(){k.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"),k=a("tdv/constants/EventName"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/effects/Effect");a=p.define("HotspotPanoramaOverlay",m,function(){m.call(this);this.bind(k.Cd,this.To,this,!0);this.bind(k.sd,this.Ro,this,!0);this.jj=[];this.Md=!1});a.prototype.set=function(g,e){switch(g){case "enabledInCardboard":this.set("enabledInVR",
e);break;case "effect":case "rollOverEffect":case "areas":this.e3a(),this.jj=[]}m.prototype.set.call(this,g,e);switch(g){case "enabledInCardboard":this.set("enabledInVR",e);break;case "effect":case "rollOverEffect":case "areas":this.xTa()}};a.prototype.xTa=function(){this.get("effect")&&this.get("effect").bind(h.Rw,this.Xya,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").bind(h.Rw,this.jAa,this,!0);this.get("areas",[]).forEach(function(g){g.bind(k.rc,this.Mya,this,!0);g.bind(k.Db,
this.Lya,this,!0)}.bind(this))};a.prototype.e3a=function(){this.get("effect")&&this.get("effect").h(h.Rw,this.Xya,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").h(h.Rw,this.jAa,this,!0);this.get("areas",[]).forEach(function(g){g.h(k.rc,this.Mya,this,!0);g.h(k.Db,this.Lya,this,!0)}.bind(this))};a.prototype.Mya=function(g){this.jj.indexOf(g.source)<0&&(this.jj.push(g.source),this.jj.length==1&&this.F1())};a.prototype.Lya=function(g){g=this.jj.indexOf(g.source);g>=0&&(this.jj.splice(g,
1),this.jj.length==0&&this.ps())};a.prototype.F1=function(){var g=this.get("effect"),e=this.get("rollOverEffect");e&&(g&&g.pm()>0?g.reverse():e.play())};a.prototype.ps=function(){var g=this.get("rollOverEffect");if(g){var e=this.get("effect");g.pm()>0?g.reverse():e&&e.get("loop")&&e.play()}};a.prototype.Xya=function(){if(this.jj.length>0){var g=this.get("rollOverEffect");g&&(this.get("effect").stop(),g.play())}};a.prototype.jAa=function(){if(this.jj.length==0){this.get("rollOverEffect").stop();var g=
this.get("effect");g&&g.get("loop")&&g.play()}};a.prototype.To=function(){var g=this.get("effect");g&&g.play()};a.prototype.Ro=function(){var g=this.get("effect");g&&g.stop();(g=this.get("rollOverEffect"))&&g.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"),k=a("tdv/player/script/HotspotPanoramaOverlay");return m.define("FlatHotspotPanoramaOverlay",k,function(){k.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"),k=a("tdv/player/script/HotspotPanoramaOverlayArea");return m.define("FlatHotspotPanoramaOverlayArea",k,function(){k.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(k,p,h){m.call(this);k!==void 0&&this.set("vertices",k);this.set("opacity",p!==void 0?p:1);h!==void 0&&this.set("timestamp",h)})});
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(k,p,h,g,e){m.call(this);k!==void 0&&this.set("yaw",k);p!==void 0&&this.set("pitch",p);h!==void 0&&this.set("roll",h);this.set("opacity",g!==void 0?g: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(k,p,h,g,e,b,c,d,f){m.call(this);k!==void 0&&this.set("yaw",k);p!==void 0&&this.set("pitch",p);h!==void 0&&this.set("rotationX",h);g!==void 0&&this.set("rotationY",g);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(k,p){m.call(this);this.set("yaw",k);this.set("pitch",p)})});
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(k,p,h,g,e,b,c){m.call(this);k!==void 0&&this.set("yaw",k);p!==void 0&&this.set("pitch",p);h!==void 0&&this.set("rotationX",h);g!==void 0&&this.set("rotationY",g);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"),k=a("tdv/player/script/QuadPanoramaOverlayPlaybackPosition"),p=a("tdv/player/script/FlatPanoramaOverlayPlaybackPosition"),h=
a("tdv/player/script/PanoramaOverlayPlaybackPosition"),g=a("tdv/player/script/PanoramaPoint"),e=a("tdv/player/script/PopupPanoramaOverlayPlaybackPosition");return{obb:function(b){return this.J_(b,this.cYa)},kma:function(b){return this.J_(b,this.B2a)},Pbb:function(b){return this.J_(b,this.I2a)},lma:function(b){return this.J_(b,this.S2a)},cYa:function(b){return new p(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)},S2a:function(b){var c=m.prototype.get.call(b,"vertices",[null,null,null,null]);return new k([c[0]||new g(0,0),c[1]||new g(0,0),c[2]||new g(0,0),c[3]||new g(0,0)],m.prototype.get.call(b,"opacity",1),0)},B2a:function(b){function c(d,f){return m.prototype.get.call(b,d,f)}return new h(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)},I2a: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)},J_:function(b,c){var d=m.prototype.get.call(b,"playbackPositions")||[];return d.length>0?d.slice().sort(function(f,n){return f.get("timestamp")-n.get("timestamp")||d.indexOf(f)-d.indexOf(n)}):[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"),k=a("tdv/constants/EventName"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/PlaybackPositionHelper");a=p.define("FlatHotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Fd=void 0});a.prototype.get=function(g,e){switch(g){case "playbackPositions":return this.Fd===
void 0&&(this.Fd=h.obb(this)),this.Fd}return m.prototype.get.call(this,g,e)};a.prototype.set=function(g,e){var b=!1;switch(g){case "opacity":case "distance":case "pitch":case "roll":case "yaw":case "playbackPositions":this.Fd=void 0,b=!0}m.prototype.set.call(this,g,e);b&&g!="playbackPositions"&&this.o(k.K("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"),k=a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");return m.define("FlatHotspotPanoramaOverlayImage",k,function(){k.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"),k=a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");return m.define("FlatHotspotPanoramaOverlayMap",k,function(){k.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"),k=a("tdv/player/script/Model3DCamera");return m.define("FlyOverModel3DCamera",k,function(){k.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"),k=a("tdv/constants/EventName"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/PlaybackPositionHelper");a=p.define("FramePanoramaOverlay",m,function(){m.call(this);this.Fd=void 0});a.prototype.set=function(g,e){var b=!1;switch(g){case "hfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.Fd=
void 0,b=!0}m.prototype.set.call(this,g,e);b&&g!="playbackPositions"&&this.o(k.K("playbackPositions"))};a.prototype.get=function(g,e){switch(g){case "playbackPositions":return this.Fd===void 0&&(this.Fd=h.kma(this)),this.Fd}return m.prototype.get.call(this,g,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(k,p){switch(k){case "levels":p=[this];break;case "url":for(var h=m.prototype.get.call(this,k),g=this.get("levels"),e=0;g&&e<g.length&&h===void 0;e++){var b=g[e];b!=this&&(h=b.get(k))}return h!==void 0?h:p}return m.prototype.get.call(this,
k,p)};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.aZ="mobile";a.prototype.get=function(k,p){switch(k){case "levels":p=[this];break;case "url":for(var h=m.prototype.get.call(this,k),g=this.get("levels"),e=0;g&&e<g.length&&h===void 0;e++){var b=g[e];b!=this&&(h=b.get(k))}return h!==void 0?h:p}return m.prototype.get.call(this,
k,p)};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"),k=a("tdv/player/script/Model3DResourceLevel");a=a("tdv/player/parser/ClassInfo").define("GoogleMaps3DTilesModel3DResource",m,function(){m.call(this)});a.prototype.set=function(g,e){m.prototype.set.call(this,g,e);switch(g){case "latitude":case "longitude":this.Vf();break;
case "apiKey":this.J7a()}};a.prototype.Vf=function(){var g=this.get("latitude"),e=this.get("longitude");if(g!==void 0&&e!==void 0){g=this.bwa(g,e);e=(new THREE.Vector3).crossVectors(g,(new THREE.Vector3).crossVectors(this.bwa(90,0),g));var b=new THREE.Vector3(0,0,0);e=(new THREE.Matrix4).lookAt(g,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*h);this.set("rotationY",
e.y*h);this.set("rotationZ",e.z*h);this.set("positionX",-g.x);this.set("positionY",-g.y);this.set("positionZ",-g.z)}};a.prototype.bwa=function(g,e){g*=p;e*=p;var b=1/298.257223563;const c=Math.sin(g);g=Math.cos(g);b=2*b-b*b;const d=6378137/Math.sqrt(1-b*c*c);return new THREE.Vector3((d+0)*g*Math.cos(e),(d+0)*g*Math.sin(e),d*(1-b)*c)};a.prototype.J7a=function(){var g=this.get("apiKey");if(g!==void 0){var e=new k;e.set("url","https://tile.googleapis.com/v1/3dtiles/root.json?key="+g);this.set("levels",
[e])}};var p=Math.PI/180,h=180/Math.PI;return a});define("tdv/view/containers/GridContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,k,p){return function(h){function g(){return h.call(this)||this}P(g,h);g.prototype.Nb=function(){this.zl(g.ad)};g.ad=Object.assign({},k.ad,{layout:p.bB});return g}(k)});
define("tdv/player/script/GridContainer",["require","tdv/player/parser/ClassInfo","tdv/view/containers/GridContainer"],function(a){var m=a("tdv/player/parser/ClassInfo"),k=a("tdv/view/containers/GridContainer");return m.define("GridContainer",k,function(){k.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 k(l){this.lfb=l;this.items=[];this.priority=0}var p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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"),n=f.extend(h,function(l){h.call(this);this.url=l;this.noa=this.priority=0;this.status=n.W$;this.MA=null});n.prototype.qna=function(l){this.noa+=l};n.prototype.FO=function(l){this.priority+=l};n.prototype.start=function(){this.status=n.$Y;c.W8(this.url)?this.lC():this.Up=d.add(this.url,e.v9,this.Q3a.bind(this),this.Yta.bind(this))};n.prototype.Q3a=function(){this.MA=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.MA.open("GET",
this.url);this.MA.onreadystatechange=function(){this.MA.readyState>3&&this.lC()}.bind(this);this.MA.send()};n.prototype.Yta=function(){this.MA&&(this.MA.abort(),this.MA=null)};n.prototype.stop=function(){this.status==n.$Y&&(this.status=n.W$,this.Yta(),this.Up&&this.Up.cancel())};n.prototype.lC=function(){this.MA=null;this.Up&&(this.Up.loaded(),this.Up=null);this.status=n.tSa;this.o(new p(g.ha))};n.W$="not loaded";n.$Y="loading";n.tSa="loaded";k.prototype.c9a=function(l){l.forEach(function(q){this.items.indexOf(q)<
0&&(this.items.push(q),q.FO(this.priority),q.qna(1))}.bind(this))};k.prototype.vfb=function(l){var q=this.items;this.items=[];q.forEach(function(r){l.indexOf(r)<0?this.items.push(r):(r.FO(-this.priority),r.qna(-1))}.bind(this))};k.prototype.nfb=function(){this.items.forEach(function(l){l.FO(-this.priority);l.qna(-1)}.bind(this));this.items=[];this.priority=0};k.prototype.FO=function(l){this.priority+=l;this.items.forEach(function(q){q.FO(l)})};m.ei=[];m.vBa=[];m.nYa=0;m.sFa=function(l,q){this.A2(l).c9a(q.map(function(r){return this.Ia(r)}.bind(this)));
this.r3();this.ya()};m.Efb=function(l,q){this.A2(l).vfb(q.map(function(r){return this.Ia(r)}.bind(this)));this.r3();this.ya()};m.ofb=function(l){this.A2(l).nfb();this.r3();this.ya()};m.W6=function(l,q){this.A2(l).FO(q);this.r3();this.ya()};m.r3=function(){this.ei.sort(function(l,q){return q.priority-l.priority})};m.ya=function(l){if(this.enabled()&&(l||!this.zv))if(l){this.zv&&clearTimeout(this.zv);this.zv=null;l=this.fZa();var q=this.gZa();f.difference(l,q).forEach(function(r){r.stop()});f.difference(q,
l).forEach(function(r){r.start()})}else this.zv=setTimeout(function(){this.zv=null;this.ya(!0)}.bind(this),1E3)};m.zv=null;m.fZa=function(){return this.ei.filter(function(l){return l.status==n.$Y})};m.gZa=function(){for(var l=this.hZa(),q=[],r=0;r<this.ei.length&&q.length<l;r++){var t=this.ei[r];t.noa>0&&(t.status==n.W$||t.status==n.$Y)&&q.push(t)}return q};m.hZa=function(){return this.nYa>0?0:5};m.A2=function(l){var q=this.vBa.find(function(r){return r.lfb==l});q||(q=new k(l),this.vBa.push(q));return q};
m.Ia=function(l){var q=this.ei.find(function(r){return r.url==l});q||(q=new n(l),q.bind(g.ha,this.ya,this),this.ei.push(q));return q};m.enabled=function(l){if(l===void 0)return m.fXa||m.gXa?!1:m.Qca!==void 0?m.Qca:m.ga;m.ga=l};m.ga=!0;m.npa=function(l){m.Qca=l.get(TDV.PlayerSettings.BACKGROUND_PRELOAD_ENABLED)};m.Qca=void 0;m.gXa=b.Kg("disable-background-preload",!1);m.fXa=!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,k,p,h,g){a=function(e){function b(){var c=e.call(this)||this;c.Hja=k.Qq(c.Hja,c);return c}P(b,e);b.prototype.Hja=function(){g.sFa(this,this.Yv())};b.prototype.Yv=function(){return[]};b.prototype.Afb=function(){g.ofb(this)};b.prototype.set=function(c,d){e.prototype.set.call(this,c,d);this.Hja()};return b}(p);h.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"),k=a("tdv/player/script/Media");a=m.define("Panorama",k,function(){k.call(this);this.v0=this.VM=void 0;this.set("minFaceSize",void 0)});a.prototype.get=function(p,h){switch(p){case "overlays":return this.Mda();case "frames":return this.owa();case "partial":if(this.get("hfov")<359.9)return!0}return k.prototype.get.call(this,p,h)};a.prototype.set=
function(p,h){switch(p){case "cardboardMenu":this.set("vrMenu",h)}k.prototype.set.call(this,p,h)};a.prototype.Mda=function(){var p=k.prototype.get.call(this,"overlays");p||(p=[]);return this.tia(p)};a.prototype.tia=function(p){if(this.VM===void 0||this.v0!=p){var h=function(e){return m.Qa("PopupPanoramaOverlay",e)},g=function(e){return m.Qa("LensFlarePanoramaOverlay",e)};this.v0=p;this.VM=[].concat(p.filter(function(e){return!(h(e)||g(e))}),p.filter(g),p.filter(h))}return this.VM};a.prototype.lJa=
function(){return this.get("overlays").filter(function(p){return m.Qa("TripodCapPanoramaOverlay",p)}).length>0};a.prototype.bJa=function(){return this.get("overlays").filter(function(p){return m.Qa("CeilingCapPanoramaOverlay",p)}).length>0};a.prototype.EJa=function(){if(!this.Jma())return!1;var p=this.get("pitch",0),h=this.get("vfov",180);if(h>=179.9)return!0;var g=this.bJa()?90:p+h*.5;p=this.lJa()?-90:p-h*.5;return g-p>=179.9?!0:!1};a.prototype.Jma=function(){return this.get("hfov")>=359.9&&!this.get("partial")};
a.prototype.Fn=function(){var p=this.owa();return p.length>0&&p[0].Fn()};a.prototype.QV=function(){return 0};a.prototype.owa=function(){var p=k.prototype.get.call(this,"frames",[]);p.forEach(function(h){h.u9a(this)}.bind(this));return p};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"),k=a("tdv/player/script/Panorama");a=m.define("HDRPanorama",k,function(){k.call(this)});a.prototype.QV=function(){var p=this.get("frames")||[];return Math.floor((p.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"),k=a("tdv/player/script/Model3DObject");return m.define("HorizonGridModel3DObject",k,function(){k.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,k,p){a=function(h){function g(){return h.call(this)||this}P(g,h);g.prototype.get=function(e,b){switch(e){case "tags":return(e=p.prototype.get.call(this,e))||(e=[]),Array.isArray(e)||(e=[e]),e.indexOf(g.tu)<0&&p.prototype.get.call(this,"grayscale")&&(e=e.concat([g.tu])),e}return p.prototype.get.call(this,e,b)};g.prototype.kJa=function(e){return this.get("tags").indexOf(e)>=
0};g.tu="preload";g.aZ="mobile";g.jsa="ipadpro";g.bZ="mobilevr";g.aaa="mobilevr2gen";g.baa="ondemand";return g}(p);k.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"),k=a("tdv/player/view/util/Device"),p=a("tdv/player/view/util/URL");return{nt:function(h){return this.rk(h,"load")},JI:function(h){return this.rk(h,"preload")},mO:function(h){return this.nt(h)!=this.JI(h)},rk:function(h,g){h=h.get("levels")||[];var e=this.wYa(h);e=this.DZa(g,e);h=this.XXa(h,
g);(g=this.xwa(h,e[0],e[1],this.CZa(g)))||(g=this.xwa(h,e[0],e[1],void 0));return g},XXa:function(h,g){g=="preload"?h=this.XQ(h,m.tu):g=="load"&&(h=this.WXa(h,m.tu));k.Xz()&&(h=this.XQ(h,m.jsa));if(k.D6()||k.E6())h=this.XQ(h,m.aaa);k.$f()&&(h=this.XQ(h,m.bZ));k.yb()&&(h=this.XQ(h,m.aZ));return h},wYa:function(h){if(h.length==0)return 1;h.sort(function(g,e){return e.get("width")-g.get("width")});return h[0].get("width")/h[0].get("height")},DZa:function(h,g){if(h=="preload")return[0,0];h=1E4;this.gYa()||
(k.$f()?h=2048:k.Xz()?h=2048:k.yb()&&(h=2048));return g<1?[h*g,h]:[h,h/g]},CZa:function(h){if(h=="load")return!1},gYa:function(){return k.Xz()&&p.Kg("recent_ipad_use_max_res",!1)},XQ:function(h,g){var e=h.filter(function(b){return b.kJa(g)});e.length==0&&(e=h);return e},WXa:function(h,g){var e=h.filter(function(b){return!b.kJa(g)});e.length==0&&(e=h);return e},xwa:function(h,g,e,b){function c(d){return Math.abs(d.get("width")*d.get("height")-g*e)}h=h.filter(function(d){return b!==void 0&&b!=d.get("grayscale",
!1)?!1:!0});if(h.length==0)return null;h.sort(function(d,f){return c(d)-c(f)});return h[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"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/script/helper/LevelUtil");a=k.define("HotspotMapOverlayImageBase",m,function(){m.call(this)});a.prototype.nt=function(){return this.get("image")?p.nt(this.get("image")):null};a.prototype.JI=function(){return this.get("image")?p.JI(this.get("image")):
null};return a});define("tdv/view/events/ProgressEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),k=a("tdv/events/Event");return m.extend(k,function(p,h){k.call(this,p);this.percent=h})});
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"),k=a("tdv/binding/Bindable"),p=a("tdv/constants/EventName"),h=a("tdv/view/events/ProgressEvent");a=m.extend(k,function(){k.call(this);this.KU=[];this.Jg=void 0;this.H="initial"});a.prototype.CD=function(){return this.KU};a.prototype.gP=function(g){this.KU!=g&&(this.KU=g,this.lC=this.Jg=void 0)};a.prototype.Qgb=function(g){this.Jg!==
g&&(this.H="loading",this.Jg=g,this.o(new h(p.wc,this.Jg)))};a.prototype.AX=function(){this.H!=="loaded"&&(this.H="loaded",this.o(p.ha))};a.prototype.ogb=function(){this.H!=="loaded"&&(this.H="error",this.o(p.$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"),k=a("tdv/player/view/image/Item");a=m.extend(k,function(p){k.call(this);this.Lf=p;this.C=void 0});a.prototype.getType=function(){return this.Lf};a.prototype.Gcb=function(p){return this.C!==void 0&&this.C===p.C};a.ssa="map";a.tsa="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"),k=a("tdv/player/view/map/renderer/item/Item");a=m.extend(k,function(p,h,g){k.call(this,k.tsa);this.p2a=p;this.cc=h;this.dc=g});a.prototype.getX=function(){return this.cc};a.prototype.getY=function(){return this.dc};a.rsa="image";a.qsa="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"),k=a("tdv/player/view/map/renderer/item/Overlay");a=m.extend(k,function(p,h,g,e,b,c,d,f,n,l,q,r){k.call(this,k.rsa,g,e);this.C=p;this.le=h;this.RBa=b;this.Jfa=c;this.Kfa=d;this.Pa=f;this.Ga=n;this.ji=l;this.bC=q;this.eD=r;this.KU=[h]});a.prototype.hl=function(){return this.le};a.prototype.uIa=function(){return this.Jfa};a.prototype.vIa=function(){return this.Kfa};
a.prototype.Zf=function(){return this.Pa};a.prototype.pg=function(){return this.Ga};a.prototype.hO=function(){return this.bC};a.prototype.jO=function(){return this.eD};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"),k=a("tdv/player/script/HotspotMapOverlayImageBase"),p=a("tdv/player/script/helper/LevelUtil"),h=a("tdv/player/view/map/renderer/item/ImageOverlay");a=m.define("HotspotMapOverlayImage",k,function(){k.call(this);this.uy=void 0});
a.prototype.getItem=function(){return this.Iq()};a.prototype.Iq=function(){this.uy===void 0&&(this.uy=this.d5());return this.uy};a.prototype.d5=function(g){var e=this.get("image");return e?(e=p.nt(e),new h(this,e.get("url"),this.get("x"),this.get("y"),g,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"),k=a("tdv/player/script/HotspotMapOverlayImageBase");return m.define("HotspotMapOverlayMap",k,function(){k.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"),k=a("tdv/constants/EventName"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/PlaybackPositionHelper");a=p.define("HotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Fd=void 0});a.prototype.get=function(g,e){switch(g){case "playbackPositions":return this.Fd===
void 0&&(this.Fd=h.kma(this)),this.Fd}return m.prototype.get.call(this,g,e)};a.prototype.set=function(g,e){var b=!1;switch(g){case "distance":case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "yaw":case "opacity":case "playbackPositions":this.Fd=void 0,b=!0}m.prototype.set.call(this,g,e);b&&g!="playbackPositions"&&this.o(k.K("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"),k=a("tdv/player/script/HotspotPanoramaOverlayImageBase");return m.define("HotspotPanoramaOverlayImage",k,function(){k.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"),k=a("tdv/player/script/HotspotPanoramaOverlayImageBase");return m.define("HotspotPanoramaOverlayMap",k,function(){k.call(this)})});
define("tdv/view/html/HTMLParser",["require"],function(){function a(f){var n={};f=f.split(",");for(var l=0;l<f.length;l++)n[f[l]]=!0;return n}var m=/^<([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,k=/^<\/([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)[^>]*>/,p=/([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,h=a("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),g=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,n){function l(w,y,x,z){y=y.toLowerCase();if(g[y])for(;r.JD()&&e[r.JD()];)q("",r.JD());b[y]&&r.JD()==
y&&q("",y);(z=h[y]||!!z)||r.push(y);if(n.start){var A=[];x.replace(p,function(D,E){var B=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:c[E]?E:"";A.push({name:E,value:B,Dla:B.replace(/(^|[^\\])"/g,'$1\\"')})});n.start&&n.start(y,A,z)}}function q(w,y){if(y)for(y=y.toLowerCase(),w=r.length-1;w>=0&&r[w]!=y;w--);else w=0;if(w>=0){for(y=r.length-1;y>=w;y--)n.end&&n.end(r[y]);r.length=w}}var r=[],t=f;for(r.JD=function(){return this[this.length-1]};f;){var u=!0;if(r.JD()&&
d[r.JD()])f=f.replace(new RegExp("(.*?)</"+r.JD()+"[^>]*>"),function(w,y){y=y.replace(/\x3c!--(.*?)--\x3e/g,"$1").replace(/<!\[CDATA\[(.*?)]]\x3e/g,"$1");n.lV&&n.lV(y);return""}),q("",r.JD());else{if(f.indexOf("\x3c!--")==0){var v=f.indexOf("--\x3e");v>=0&&(n.n$a&&n.n$a(f.substring(4,v)),f=f.substring(v+3),u=!1)}else if(f.indexOf("</")==0){if(v=f.match(k))f=f.substring(v[0].length),v[0].replace(k,q),u=!1}else f.indexOf("<")==0&&(v=f.match(m))&&(f=f.substring(v[0].length),v[0].replace(m,l),u=!1);u&&
(v=f.indexOf("<"),u=v<0?f:f.substring(0,v),f=v<0?"":f.substring(v),n.lV&&n.lV(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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/util/Device"),e=a("tdv/view/html/HTMLParser"),b=m.extend(h,function(c){h.call(this);this.Mc=c;this.FT=[];this.NB=null});b.prototype.fdb=function(c){c&&c.toLowerCase().indexOf("<script")>=
0?g.EN()==g.CP?this.A_a(c):this.z_a(c):this.y_a(c)};b.prototype.y_a=function(c){this.Mc.innerHTML=c;this.IDa()};b.prototype.A_a=function(c){this.Mc.empty();var d=this.Mc,f=null,n=[],l=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)}l={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 y in w)r.setAttribute(y,w[y]);d.appendChild(r);
t?f=r:(d=r,f=null)}},lV:function(q){l?l.content+=q:d.append(q)},end:function(q){q=="script"?(n.push(l),l=null):(f=d,d=d.parent())}});this.FT=n;this.z0()};b.prototype.z_a=function(c){function d(){n++;return f+n}this.Mc.empty();var f="fragment_"+m.jfb(6)+"_",n=0,l=d(),q=[l],r=void 0,t=[],u=null,v="";new e(c,{start:function(x,z,A){if(x=="script"){A=void 0;for(x=0;x<z.length&&A===void 0;x++){var D=z[x];D.name=="src"&&(A=D.value)}u={parentClsName:q[q.length-1],previousSiblingClsName:r,src:A,content:""}}else{v+=
"<"+x;var E=d(),B=!1;for(x=0;x<z.length;x++)D=z[x],D.name=="class"&&(D.Dla+=" "+E,B=!0),v+=" "+D.name+'="'+D.Dla+'"';B||(v+=' class="'+E+'"');A?(v+="/>",r=E):(v+=">",q.push(E),r=void 0)}},lV:function(x){u?u.content+=x:v+=x},end:function(x){x=="script"?(t.push(u),u=null):(r=q[q.length-1],q.pop())}});this.Mc.innerHTML=v;this.Mc.plb(l);for(c=0;c<t.length;c++){var w=t[c],y=w.parentClsName;delete w.parentClsName;r=w.previousSiblingClsName;delete w.previousSiblingClsName;w.parent=this.Mc.querySelector("."+
y);w.previousSibling=r?this.Mc.querySelector("."+r):null}this.Mc.Plb(l);this.FT=t;this.z0()};b.prototype.z0=function(){if(!this.NB)if(this.FT.length>0){this.NB=this.FT[0];this.FT.splice(0,1);var c=this.NB.src;if(c){var d=this;b.q0a(c,function(){d.Nxa()},function(){d.x0a()})}else{var f=this.NB.parent;c=this.NB.previousSibling;var n=c?c.nextSibling:f.firstChild;c=document.write;document.write=n?function(l){f.insertBefore(document.createTextNode(l),n)}:function(l){f.append(l)};m.jcb(this.NB.content);
document.write=c;this.Nxa()}}else this.IDa()};b.prototype.x0a=function(){this.NB=null;this.z0()};b.prototype.Nxa=function(){this.NB=null;this.z0()};b.prototype.IDa=function(){this.o(new p(k.Qb))};b.Lxa={};b.q0a=function(c,d,f){b.Lxa[c]?d.call(window):m.Bab(c,()=>{b.Lxa[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,k,p,h){return function(g){function e(b,c){var d=g.call(this)||this;d.J_a=b;d.ga=c;d.ik=null;return d}P(e,g);e.prototype.bind=function(b,c,d,f){b=g.prototype.bind.call(this,b,c,d,f);this.GU();return b};e.prototype.h=function(b,c,d){b=g.prototype.h.call(this,b,c,d);this.GU();return b};e.prototype.start=function(){this.ga=!0;this.GU()};e.prototype.stop=function(){this.ga=
!1;this.GU()};e.prototype.VS=function(){this.o(new p(k.gf))};e.prototype.GU=function(){if(this.ga&&this.j6(k.gf)){if(this.ik==null){var b=this;this.ik=window.setTimeout(function(){b.ik=null;b.VS();b.GU()},this.J_a)}}else this.ik!=null&&(clearTimeout(this.ik),this.ik=null)};return e}(h)});
define("tdv/view/core/visualprops/HTMLVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,k){return function(p){function h(){var g=p!==null&&p.apply(this,arguments)||this;g.nd=null;return g}P(h,p);return h}(k)});
define("tdv/view/html/HTML","require exports tdv/utils tdv/constants/EventName tdv/player/parser/helper/AppResizeUpdater 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,k,p,h,g,e,b,c,d,f){var n=/[^\d]((\d*\.)?\d+)\s*(vmin|vmax|vw|vh)/i;return function(l){function q(){var r=l.call(this)||this;r.cf("HTML");r.ZF=q.gZ;r.I0=0;r.H0=0;r.TCa=(new Date).getTime();
r.u.nd=null;r.FK=r.FK.bind(r);r.Naa=[];return r}P(q,l);q.prototype.wa=function(){return l.prototype.wa.call(this)};q.prototype.Nb=function(){l.prototype.Nb.call(this);this.j("content");this.j("horizontalAlign",g.$a);this.j("verticalAlign",g.Pd);this.j("fontFamily");this.j("fontSize");this.j("fontColor");this.j("fontWeight");this.j("fontStyle");this.j("textAlign");this.j("textDecoration");this.j("textShadowBlurRadius",3);this.j("textShadowColor","#000000");this.j("textShadowHorizontalLength",0);this.j("textShadowOpacity",
0);this.j("textShadowVerticalLength",0)};q.prototype.aL=function(){return new f};q.prototype.Wn=function(r,t,u,v){this.Fb&&h.get(this.Fb).qfb(this.FK);l.prototype.Wn.call(this,r,t,u,v);this.Fb&&(h.get(this.Fb).R8a(this.FK),h.get(this.Fb).HN(this.FK))};q.prototype.Ib=function(){l.prototype.Ib.call(this);this.u.nd||(this.u.nd=document.createElement("div"),this.u.nd.style.display="inline",this.u.nd.style.boxSizing="border-box",this.PM(!1),this.Zwa=new b(this.u.nd),this.Zt(),this.Zwa.bind(p.Qb,this.n_a,
this,!0),this.bind(p.Yb,this.$wa,this,!0))};q.prototype.eb=function(){var r=this,t=!1;this.S("visible")&&(t=!0);this.S("content")&&(t=this.G("content"),this.Zwa.fdb(t),this.$("content"),t=!0);if(this.S("width")||this.S("height"))t=!0;this.S("fontFamily")&&(t=this.G("fontFamily"),k.Yz(t)||(t=""),this.u.nd.style.fontFamily=c.Lz(t),this.$("fontFamily"),t=!0);this.S("fontSize")&&(t=this.G("fontSize"),k.LJa(t)?t+="px":k.Yz(t)||(t=""),this.u.nd.style.fontSize=t,this.$("fontSize"),t=!0);this.S("fontColor")&&
(t=this.G("fontColor"),k.Yz(t)||(t=""),this.u.nd.style.color=t,this.$("fontColor"),t=!0);if(this.S("fontWeight")){t=this.G("fontWeight");switch(t){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:t="normal"}this.u.nd.style.fontWeight=t;this.$("fontWeight");t=!0}if(this.S("fontStyle")){t=this.G("fontStyle");switch(t){case "italic":case "normal":break;default:t="normal"}this.u.nd.style.fontStyle=
t;this.$("fontStyle");t=!0}if(this.S("textDecoration")){t=this.G("textDecoration");switch(t){case "underline":case "overline":case "line-through":case "none":break;default:t="none"}this.u.nd.style.textDecoration=t;this.$("textDecoration");t=!0}if(this.S("textAlign")){t=this.G("textAlign");switch(t){case "left":case "right":case "center":case "justify":break;default:t=""}this.u.nd.style.textAlign=t;this.$("textAlign");t=!0}var u=["textShadowColor","textShadowHorizontalLength","textShadowVerticalLength",
"textShadowBlurRadius","textShadowOpacity"];if(u.some(function(w){return r.S(w)})){var v={};u.forEach(function(w){v[w]=r.G(w);r.$(w)});this.u.nd.style.textShadow=[v.textShadowHorizontalLength+"px",v.textShadowVerticalLength+"px",v.textShadowBlurRadius+"px","rgba("+parseInt("0x"+v.textShadowColor.substr(1,2))+", "+parseInt("0x"+v.textShadowColor.substr(3,2))+", "+parseInt("0x"+v.textShadowColor.substr(5,2))+", "+v.textShadowOpacity+")"].join(" ")}["paddingTop","paddingRight","paddingBottom","paddingLeft"].some(function(w){return r.S(w)})&&
(t=!0);l.prototype.eb.call(this);t&&this.pya()};q.prototype.pya=function(){this.$wa();this.jc();this.G("visible")&&this.G("content")?this.IT(q.iaa):this.IT(q.gZ)};q.prototype.xy=function(){l.prototype.xy.call(this);this.I0=this.wa().Xla();this.H0=this.wa().Wla();this.$m=this.I0+this.u.Bd+this.u.ze;this.Zm=this.H0+this.u.ge+this.u.Af};q.prototype.zCa=function(r){this.zwa()!=r&&(this.u.nd.style.paddingLeft=r+"px",this.jc())};q.prototype.zwa=function(){return parseInt(this.u.nd.style.paddingLeft)||0};
q.prototype.BCa=function(r){this.Bwa()!=r&&(this.u.nd.style.paddingTop=r+"px",this.jc())};q.prototype.Bwa=function(){return parseInt(this.u.nd.style.paddingTop)||0};q.prototype.ACa=function(r){this.Awa()!=r&&(this.u.nd.style.paddingRight=r+"px",this.jc())};q.prototype.Awa=function(){return parseInt(this.u.nd.style.paddingRight)||0};q.prototype.yCa=function(r){this.ywa()!=r&&(this.u.nd.style.paddingBottom=r+"px",this.jc())};q.prototype.ywa=function(){return parseInt(this.u.nd.style.paddingBottom)||
0};q.prototype.n_a=function(){this.Naa=Array.prototype.slice.call(this.u.nd.querySelectorAll("*[style]")).map(function(r){var t={};t.ft=r;t.style=r.getAttribute("style");return t}).filter(function(r){return n.test(r.style)}).map(function(r){for(var t=r.style,u=[];;){var v=n.exec(t);if(v)u.push(function(w){return function(){return w}}(t.substr(0,v.index+1))),u.push(function(w,y){switch(y){case "vw":return function(x){return Math.round(x*w)+"px"};case "vh":return function(x,z){return Math.round(z*w)+
"px"};case "vmin":return function(x,z,A){return Math.round(A*w)+"px"};case "vmax":return function(x,z,A){return Math.round(A*w)+"px"}}}(parseFloat(v[1]),v[3].toLowerCase())),t=t.substr(v.index+v[0].length);else return u.push(function(w){return function(){return w}}(t)),r.Sab=u,r}});this.Fb&&h.get(this.Fb).HN(this.FK)};q.prototype.FK=function(r,t,u,v){this.Naa.length!=0&&(this.Naa.forEach(function(w){var y=w.Sab.map(function(x){return x(r,t,u,v)}).join("");w.ft.setAttribute("style",y)}),this.pya())};
q.prototype.$wa=function(){var r="auto",t="auto";if(!this.Wda()){this.$m!=this.cb()&&this.jc();var u=this.cb()-(this.u.Bd+this.u.ze);u>0&&(r=u+"px")}this.Twa()||(this.Zm!=this.Kb()&&this.jc(),u=this.Kb()-(this.u.ge+this.u.Af),u>0&&(t=u+"px"));this.u.nd.style.width=r;this.u.nd.style.height=t};q.prototype.Rya=function(){var r=this.wa().Xla(),t=this.wa().Wla();this.I0!=r||this.H0!=t?(this.I0=r,this.H0=t,this.jc(),this.IT(q.iaa)):(r=(new Date).getTime()-this.TCa,r>q.oTa?this.IT(q.$Sa):r>q.nTa&&this.IT(q.ZSa))};
q.prototype.B3a=function(){this.TCa=(new Date).getTime()};q.prototype.IT=function(r){this.ZF==q.iaa&&this.B3a();this.ZF!=r&&(this.ZF!=q.gZ&&q.hua[this.ZF].h(p.gf,this.Rya,this),this.ZF=r,this.ZF!=q.gZ&&q.hua[this.ZF].bind(p.gf,this.Rya,this,!0))};q.gZ="stopped";q.$Sa="slow";q.ZSa="normal";q.iaa="fast";q.oTa=3E4;q.nTa=5E3;q.hua={slow:new d(2E3,!0),normal:new d(500,!0),fast:new d(100,!0)};return q}(e)});
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,k,p){return function(h){function g(){return h.call(this)||this}P(g,h);g.prototype.Nb=function(){this.zl(g.ad)};g.ad=Object.assign({},k.ad,{layout:p.oY});return g}(k)});
define("tdv/view/text/HTMLText",["require","exports","tdv/view/constants/OverflowPolicy","tdv/view/containers/AbsoluteContainer","tdv/view/html/HTML"],function(a,m,k,p,h){return function(g){function e(){var b=g.call(this)||this;b.cC=null;b.Ykb=!0;return b}P(e,g);e.prototype.Nb=function(){g.prototype.Nb.call(this);this.j("overflow",k.zr);this.j("html")};e.prototype.Ib=function(){g.prototype.Ib.call(this);this.cC==null&&(this.cC=new h,this.cC.xa({left:0,toolTipDisabled:!0}),this.hb(this.cC))};e.prototype.eb=
function(){this.S("html")&&(this.cC.set("content",this.G("html")),this.$("html"));this.Oc(["paddingLeft","paddingTop","paddingRight","paddingBottom"],{},[this.cC],!0,!0);this.Oc(["cursor"],{},[this.cC],!0,!1);g.prototype.eb.call(this);this.cC.set("width",this.Wda()?void 0:"100%")};return e}(p)});
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,k,p,h,g,e,b,c,d,f,n){var l=g.tk("debug");return function(q){function r(){var t=q.call(this,3)||this;t.r_a=function(){t.H7()};t.oQ=function(){t.get("pressed")?(t.set("pressed",!1),t.o(new h(p.Im))):
(t.set("pressed",!0),t.o(new h(p.Jk)))};t.cf("Button");t.set("ariaRole","button");t.set("autoRolledOver",!0);t.set("autoPressed",!0);t.set("cursor",b.hf);t.set("scaleMode",c.ej);t.Fba=document.createElement("canvas");t.Fba.width=1;t.Fba.height=1;t.Gba=t.Fba.getContext("2d");t.Gba.globalCompositeOperation="copy";t.bind(p.Db,t.r_a,t,!1);return t}P(r,q);r.prototype.Nb=function(){q.prototype.Nb.call(this);this.j("buttonGroup");this.j("mode",f.jf);this.j("pressed");this.j("iconURL");this.j("transparencyActive");
this.D("rollOverOpacity",d.fa,"opacity");this.D("rollOverIconURL",d.fa,"iconURL");this.D("pressedOpacity",d.Mb,"opacity");this.D("pressedIconURL",d.Mb,"iconURL");this.D("pressedRollOverOpacity",d.vc,"opacity");this.D("pressedRollOverIconURL",d.vc,"iconURL")};r.prototype.H7=function(t){t?q.prototype.set.call(this,"cursor",t):q.prototype.set.call(this,"cursor",this.$Wa)};r.prototype.udb=function(t){if(!this.u.image)return!1;var u=this.Fb?this.Fb.AC:1,v=k.offset(this.u.image),w=(t.YD-v.left)/u,y=this.u.image.clientWidth;
t=(t.ZD-v.top)/u;u=this.u.image.clientHeight;if(w>=0&&t>=0&&w<y&&t<u){if(l)return!0;this.Gba.drawImage(this.u.image,w*this.lM/y,t*this.kM/u,1,1,0,0,1,1);if(this.Gba.getImageData(0,0,1,1).data[3]>0)return!0}return!1};r.prototype.set=function(t,u){t==="cursor"&&(this.$Wa=u);return q.prototype.set.call(this,t,u)};r.prototype.eb=function(){this.S("transparencyActive")&&(this.S4a(this.G("transparencyActive")),this.$("transparencyActive"));var t=!1;if(this.S("backgroundOpacity")||this.S("backgroundColor"))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.jf?(this.h(p.oa,this.oQ,this),this.set("autoPressed",!0)):(this.bind(p.oa,this.oQ,this,!0),this.set("autoPressed",!1)),this.$("mode"),u=!0);if(u||this.S("pressed"))this.G("mode")==f.Mk?this.QM(this.G("pressed")==1):u&&this.QM(!1);this.S("buttonGroup")&&((u=this.G("buttonGroup"))?e.register(this,u):e.unregister(this),this.$("buttonGroup"));q.prototype.eb.call(this);!t||this.u.hm!=
0&&this.u.lk.length!=0||(this.fCa(.001),this.eCa(["#000000"]))};r.prototype.S4a=function(t){this.DL.NNa(t)};return r}(n)});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"),k=a("tdv/player/script/HotspotMapOverlay");return m.define("IconHotspotMapOverlay",k,function(){k.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(k,p){m.prototype.set.call(this,k,p)};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"),k=a("tdv/player/script/PlaneModel3DObject");return m.define("ImagePlaneModel3DObject",k,function(){k.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"),k=a("tdv/player/script/Model3DObject");return m.define("InnerModel3DObject",k,function(){k.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"),k=a("tdv/player/script/Model3DObject");return m.define("LineModel3DObject",k,function(){k.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"),k=a("tdv/player/script/Panorama");a=m.define("LivePanorama",k,function(){k.call(this)});a.prototype.QV=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"),k=a("tdv/player/view/map/renderer/item/Item");a=m.extend(k,function(p,h,g,e,b,c,d){k.call(this,k.ssa);this.C=p;this.le=h;this.Pa=g;this.Ga=e;this.ji=b;this.dYa=c;this.cq=d.slice()});a.prototype.CD=function(){for(var p=[this.le],h=0;h<this.cq.length;h++)p=p.concat(this.cq[h].CD());return p};a.prototype.hl=function(){return this.le};a.prototype.Zf=function(){return this.Pa};
a.prototype.pg=function(){return this.Ga};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"),k=a("tdv/view/constants/ScaleMode"),p=a("tdv/player/script/Media"),h=a("tdv/player/script/helper/LevelUtil"),g=a("tdv/player/view/map/renderer/item/Map");a=m.define("Map",p,function(){p.call(this);this.uy=this.oT=void 0});a.prototype.Kfb=function(){this.uy=
this.oT=void 0};a.prototype.mO=function(){return!(!this.get("image")||!h.mO(this.get("image")))};a.prototype.JI=function(){return this.get("image")&&h.JI(this.get("image"))};a.prototype.nt=function(){return this.get("image")&&h.nt(this.get("image"))};a.prototype.yIa=function(){this.oT==void 0&&(this.mO()?this.oT=new g(this,this.JI().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",k.OE),this.get("flipImageHorizontally",!1),[]):this.oT=null);return this.oT};a.prototype.Iq=function(){if(this.uy==
void 0)if(this.get("image")){var e=Array.prototype.concat.apply([],this.get("overlays",[]).map(function(b){return b.Bbb()}));this.uy=new g(this,this.nt().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",k.OE),this.get("flipImageHorizontally",!1),e)}else this.uy=null;return this.uy};a.prototype.Yv=function(){return[].concat(this.rwa(this.yIa()),this.rwa(this.Iq()))};a.prototype.rwa=function(e){return e?e.CD():[]};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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/constants/State");a=m.extend(h,function(b,c,d){h.call(this);this.vua=b;this.Q2a=c;this.Ota=d||g.jf;this.Wj=[];this.UF=[];this.BB=
{};this.BB.mode=this.Ota;this.Ota==g.Mk&&(this.BB.pressed=!1);this.vua.bind(k.K(c),this.qBa,this);this.qBa()});a.prototype.qBa=function(){var b=this.vua.get(this.Q2a);b||(b=[]);Array.isArray(b)||(b=[b]);this.n4a(b)};a.prototype.n4a=function(b){m.difference(this.Wj,b).forEach(c=>{c.h(k.Jk,this.Rta,this,!0);c.h(k.Im,this.Sta,this,!0);c.h(k.oa,this.Nta,this,!0);c.h(k.Ra,this.Pta,this,!0);c.h(k.bb,this.Qta,this,!0);c.h(k.rc,this.Uta,this,!0);c.h(k.Db,this.Tta,this,!0)});m.difference(b,this.Wj).forEach(c=>
{c.xa(this.BB);c.bind(k.Jk,this.Rta,this,!0);c.bind(k.Im,this.Sta,this,!0);c.bind(k.oa,this.Nta,this,!0);c.bind(k.Ra,this.Pta,this,!0);c.bind(k.bb,this.Qta,this,!0);c.bind(k.rc,this.Uta,this,!0);c.bind(k.Db,this.Tta,this,!0)},this);this.Wj=b;this.UF=this.UF.filter(function(c){return this.Wj.indexOf(c)>=0}.bind(this))};a.prototype.Rta=function(){this.o(new p(k.Jk))};a.prototype.Sta=function(){this.o(new p(k.Im))};a.prototype.Nta=function(){this.o(new p(k.oa))};a.prototype.Pta=function(){this.o(new p(k.Ra))};
a.prototype.Qta=function(){this.o(new p(k.bb))};a.prototype.Uta=function(b){this.UF.push(b.source);this.dm()};a.prototype.Tta=function(b){this.UF=this.UF.filter(function(c){return c!=b.source});this.dm()};a.prototype.set=function(b,c){this.BB[b]=c;this.Wj.forEach(function(d){d.xa(this.BB)}.bind(this));this.dm()};a.prototype.dm=function(){this.Wj.forEach(function(b){b.get("state")==e.Mb&&this.UF.indexOf(b)>=0?b.set("state",e.vc):b.get("state")==e.vc&&this.UF.indexOf(b)<0&&b.set("state",e.Mb)}.bind(this))};
return a});
define("tdv/binding/BindingsHandler",["require","exports","tdv/utils","tdv/binding/ChangeWatcher"],function(a,m,k,p){var h=function(){return function(){}}();return function(){function g(){}g.ba=function(e,b,c,d){this.fta(e,b,c,d,!1)};g.fD=function(e,b,c,d){this.fta(e,b,c,d,!0)};g.fta=function(e,b,c,d,f){function n(){for(var r=[],t=0;t<b.length;t++)try{r.push(e.get(b[t]))}catch(u){r.push(void 0),k.sW("BindingsHandler._addBinding",u)}c.apply(this,r)}b=k.toArray(b);f&&(n=k.Qq(n));var l=[];b.forEach(function(r){(r=
p.Fw(e,r,n,this,!f))&&l.push(r)},this);var q=new h;q.dkb=l;q.host=e;q.properties=b;q.eW=c;this.Hka.push(q);d&&n()};g.ca=function(e,b,c){var d=[];this.Hka.forEach(function(f){f.eW==c&&f.host==e&&k.Mcb(f.properties,k.toArray(b))?f.dkb.forEach(function(n){n.EE()}):d.push(f)});this.Hka=d};g.Hka=[];return g}()});
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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/view/constants/State"),g=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.cf("PlaybackBar");this.ln=this.Jg=null;this.Lh=[];this.j2=!1;this.Tga=this.uH=void 0;this.Bia=!1});c.ad=Object.assign({},e.ad,{cursor:g.hf,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.Nb=function(){this.zl(c.ad)};c.prototype.Ib=function(){e.prototype.Ib.call(this);this.Jg&&this.ln||this.bind(k.Yb,this.C2a,this,!0);this.Jg==null&&(this.Jg=new b,this.Jg.xa({left:"0",
height:"100%",cursor:g.hf}),this.hb(this.Jg));this.ln==null&&(this.ln=new b,this.ln.xa({left:"0",cursor:g.hf}),this.ln.bind(k.Yb,this.F2a,this,!0),this.ln.bind(k.Ra,this.D2a,this,!0),this.bind(k.oa,this.A2a,this,!0),this.ln.bind(k.bb,this.E2a,this,!0),this.hb(this.ln));var f=this.get("steps")||0;if(this.Lh.length!=f){for(;this.Lh.length>f;)this.dXa(this.Lh.pop());for(;this.Lh.length<f;)this.Lh.push(this.UWa());this.Oc(c.ata,c.uaa,this.Lh,!1,!0);this.DEa();this.Mja();this.Vq(this.ln,this.Ab().length-
1)}};c.prototype.UWa=function(){var f=new d;f.xa({cursor:g.hf});f.bind(k.oa,this.bDa,this,!0);f.bind(k.Yb,this.cDa,this,!0);this.hb(f);return f};c.prototype.dXa=function(f){f.h(k.oa,this.bDa,this,!0);f.h(k.Yb,this.cDa,this,!0);this.removeChild(f)};c.prototype.eb=function(){var f=!1;if(this.S("position")||this.S("duration"))this.$("position"),this.$("duration"),f=!0;this.S("selectedStep")&&(this.$("selectedStep"),this.DEa());this.S("steps")&&(this.$("steps"),this.kW());this.Oc(c.haa,c.aQ,[this.Jg],
!0,!0);this.Oc(c.kTa,c.Ysa,[this.ln],!0,!0);this.Oc(c.ata,c.uaa,this.Lh,!0,!0);e.prototype.eb.call(this);f&&this.i4()};c.prototype.DEa=function(){var f=this.get("selectedStep");this.Lh.forEach(function(n,l){n.MX(l===f)});this.ln.set("visible",f===void 0)};c.prototype.i4=function(){var f=this.cb(),n=this.ln.cb(),l=this.ln.Kb(),q=this.ZQ(),r=this.Vr(),t=r*f/q;f=Math.round((this.j2?this.uH:r)*f/q-n*.5);f=Math.max(0,Math.min(f,this.Ph()-n));this.ln.xa({left:f,top:Math.round(this.Oh()*.5-l*.5)});this.Jg.set("width",
Math.round(t))};c.prototype.F2a=function(){this.i4()};c.prototype.D2a=function(f){this.j2=!0;this.Tga=f.pageX;this.uH=this.G("position");this.Lha=this.MZa();this.Lha.bind(k.mb,this.Sga,this,!0)};c.prototype.MZa=function(){for(var f=this.getParent();f.getParent();)f=f.getParent();return f};c.prototype.Sga=function(f){if(this.j2){var n=f.pageX-this.Tga;this.Tga=f.pageX;f=this.cb();var l=this.ZQ();this.uH=Math.max(0,Math.min(l,this.uH+l*n/f));this.get("liveDragging")&&(this.set("position",this.uH),this.o(new p(k.V)));
this.i4()}};c.prototype.E2a=function(f){this.Lha.h(k.mb,this.Sga,this);this.Lha=null;this.Sga(f);this.j2=!1;this.get("liveDragging")||(this.set("position",this.uH),this.o(new p(k.V)));this.uH=void 0};c.prototype.A2a=function(f){if(!this.Bia){var n=this.cb(),l=this.ZQ();this.set("position",l*f.x/n);this.o(new p(k.V))}};c.prototype.cDa=function(){this.Mja()};c.prototype.C2a=function(){this.Mja();this.i4()};c.prototype.Mja=function(){for(var f=this.cb(),n=this.Kb(),l=this.Sv(),q=this.getParent().cb()-
(l+f),r=0,t=this.Lh.length;r<t;r++){var u=this.Lh[r],v=u.cb();u.xa({left:r==0&&l==0?0:r==t-1&&q==0?f-v:Math.round(f*r/(t-1)-v*.5),top:Math.round(n*.5-u.Kb()*.5)})}};c.prototype.bDa=function(f){f=this.Lh.indexOf(f.source);var n=this.ZQ();this.set("position",n*f/(this.Lh.length-1));this.Bia=!0;this.o(new p(k.V));setTimeout(function(){this.Bia=!1}.bind(this),0)};c.prototype.ZQ=function(){var f=this.G("duration");return f?f:1};c.prototype.Vr=function(){return Math.max(0,Math.min(this.ZQ(),this.G("position")))};
c.aQ={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};c.haa=Object.keys(c.aQ);c.Ysa={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.kTa=Object.keys(c.Ysa);c.uaa={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.ata=Object.keys(c.uaa);var d=m.extend(b,function(){b.call(this)});d.prototype.MX=function(f){this.PT(f)};d.prototype.Nb=function(){b.prototype.Nb.call(this);this.j("backgroundColor");this.j("backgroundColorDirection");this.j("backgroundColorRatios");this.j("borderColor");
this.j("borderRadius");this.j("borderSize");this.j("opacity");this.j("width");this.j("height");this.j("shadow");this.j("shadowBlurRadius");this.j("shadowColor");this.j("shadowHorizontalLength");this.j("shadowOpacity");this.j("shadowSpread");this.j("shadowVerticalLength");this.D("selectedBackgroundColor",h.qa,"backgroundColor");this.D("selectedBackgroundColorDirection",h.qa,"backgroundColorDirection");this.D("selectedBackgroundColorRatios",h.qa,"backgroundColorRatios");this.D("selectedBorderColor",
h.qa,"borderColor");this.D("selectedBorderRadius",h.qa,"borderRadius");this.D("selectedBorderSize",h.qa,"borderSize");this.D("selectedOpacity",h.qa,"opacity");this.D("selectedWidth",h.qa,"width");this.D("selectedHeight",h.qa,"height");this.D("selectedShadow",h.qa,"shadow");this.D("selectedShadowBlurRadius",h.qa,"shadowBlurRadius");this.D("selectedShadowColor",h.qa,"shadowColor");this.D("selectedShadowHorizontalLength",h.qa,"shadowHorizontalLength");this.D("selectedShadowOpacity",h.qa,"shadowOpacity");
this.D("selectedShadowSpread",h.qa,"shadowSpread");this.D("selectedShadowVerticalLength",h.qa,"shadowVerticalLength")};d.prototype.eb=function(){b.prototype.eb.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"),k=a("tdv/view/containers/AbsoluteContainer"),p=a("tdv/view/core/UIComponent"),h=m.extend(k,function(){k.call(this);this.cf("ProgressBar")});h.ad=Object.assign({},k.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});h.prototype.Nb=function(){this.zl(h.ad)};h.prototype.Ib=function(){k.prototype.Ib.call(this);this.Jg==null&&(this.Jg=new p,this.Jg.xa({left:"0",width:"0%",height:"100%"}),this.hb(this.Jg))};h.prototype.eb=function(){this.S("percent")&&(this.Jg.set("width",Math.round(this.G("percent"))+"%"),this.$("percent"));this.Oc(h.haa,h.aQ,[this.Jg],!0,!0);k.prototype.eb.call(this)};h.aQ={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",
barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};h.haa=Object.keys(h.aQ);return h});
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"),k=a("tdv/player/view/util/Device"),p=a("tdv/player/view/util/FileType"),h=a("tdv/player/view/util/URL"),g=a("tdv/view/util/Fullscreen"),e={Hlb:function(q){return this.wO(q)||this.UJa(q)?!0:!1},ix:function(){var q=k.ffb();e.ix=function(){return q};
return q},UJa:function(q){return typeof q=="string"&&p.is(q,p.Ip)?!0:!1},Clb:function(q){return this.Pma(q)||this.Qma(q)?!0:!1},Qma:function(q){return typeof q=="string"&&(p.is(q,p.vRa)||p.GD(q,p.wRa))?!0:!1},wO:function(q){return!!q&&!!q.tagName&&q.tagName=="VIDEO"},rO:function(q){return typeof q=="string"&&p.is(q,p.HLS)||this.wO(q)&&p.is(q.currentSrc,p.HLS)?!0:!1},Fn:function(q){return typeof q=="string"&&p.is(q,p.Ip)||this.wO(q)&&p.is(q.currentSrc,p.Ip)?!0:!1},Pma:function(q){return!!q&&!!q.tagName&&
q.tagName=="IMG"},idb:function(q){return!!q&&!!q.tagName&&q.tagName=="CANVAS"},xlb:function(q){return Math.pow(2,Math.round(Math.log(q)/Math.LN2))},Elb:function(q){return q!==0&&(q&q-1)===0},HJa:function(){return k.Rb()==k.Fk},Dlb:function(){return k.Rb()==k.NE},Lq:function(){return k.Od()==k.fj}},b=k.Od()==k.OA&&!k.$f()&&k.o9a()<11;e.iQa=function(q){return d||b&&q&&q.currentTime<.2?!0:!1};e.oJa=function(){return e.HJa()||e.Lq()};e.nJa=function(){return e.Lq()&&m.Tcb&&k.yma()<11};var c=!1;e.DJa=function(){c=
!1};e.jdb=function(){return c};e.cgb=function(){c=!0};var d=h.tk("vic");e.Zeb=function(){e.Lq()&&(d=!0)};e.BIa=function(){return{alpha:!0,depth:!0,stencil:!1,antialias:m.M9a()?!0:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"high-performance",xrCompatible:!e.HJa()}};e.bab=function(q){if(m.tMa==2){var r=e.BIa();r=q.getContext("webgl2",r)}r||(r=e.BIa(),r=q.getContext("webgl",r)||q.getContext("experimental-webgl",r));return r};e.bla=function(q,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?k.yb()?2:8:0});q.depthTexture=new THREE.DepthTexture;return q};e.aab=function(q){return new THREE.WebGLCubeRenderTarget(q,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType})};e.getPixelRatio=function(){if(k.yb()){var q=0,r=0;try{q=window.top.innerWidth,r=window.top.innerHeight}catch(t){if(k.Od()==
k.OA&&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=[l[0]/q[0],l[1]/q[1]].sort()[0];if(q!==Infinity)return q}else if(k.Od()==k.kra&&k.Rb()==k.Ap)return 1;return window.devicePixelRatio};e.OHa=function(q){if(!k.yb()||k.Od()!=k.OA||!g.enabled()||!q)return e.getPixelRatio();q=[q.clientWidth,q.clientHeight].sort(function(r,t){return t-r});return[l[0]/q[0],
l[1]/q[1]].sort()[0]};var f=!1,n=[];e.x8=function(q){f=q;n.forEach(function(r){r(q)})};e.k9a=function(q){n.push(q)};e.Gdb=function(){return f};var l=[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.uD=this.$N=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,k,p,h){a=function(){function e(b,c,d,f){this.state=b;this.renderer=c;this.scene=d;this.camera=f;this.$ka()}e.prototype.dispose=function(){this.Ska()};e.prototype.update=function(b,c){if(this.state.uD!==void 0)if(this.pi.material.opacity=1-this.state.uD,b=c.parent!=null?c:b,this.pi.parent!==b&&b.add(this.pi),c.isPerspectiveCamera){this.pi.position.z=
-c.near*1.01;var d=this.renderer.getSize(new p.Vector2),f=d.height;b=this.s5.width;var n=this.s5.height;c=f/(2*Math.tan(c.fov*g/2));c=Math.max(f/c,d.width/(c*b/n));this.pi.scale.y=c;this.pi.scale.x=c*b/n}else c.isOrthographicCamera&&(this.pi.position.z=-(c.near+.1),this.renderer.getSize(new p.Vector2),this.pi.scale.y=c.top-c.bottom,this.pi.scale.x=c.right-c.left)};e.prototype.Mf=function(){return this.scene};e.prototype.$ka=function(){this.s5=this.V9a();this.pi=this.S$a(this.s5)};e.prototype.V9a=
function(){this.renderer.zn=!0;var b=k.bla(this.renderer),c=this.renderer.getRenderTarget();this.renderer.setRenderTarget(b);this.renderer.render(this.scene,this.camera);this.renderer.setRenderTarget(c);this.renderer.zn=!1;return b};e.prototype.S$a=function(b){b=new p.SpriteMaterial({map:b.texture});b.sizeAttenuation=!1;b.transparent=!0;b.visible=!0;b.opacity=1;b.depthTest=!1;b.needsUpdate=!0;b=new p.Sprite(b);b.renderOrder=h.oSa;return b};e.prototype.Ska=function(){var b,c,d,f=this.pi.material;(b=
f.map)===null||b===void 0||b.dispose();(c=f.envMap)===null||c===void 0||c.dispose();f.dispose();this.pi.geometry.dispose();this.s5.dispose();(d=this.pi.parent)===null||d===void 0||d.remove(this.pi)};return e}();var g=Math.PI/180;return a});
define("tdv/player/view/common/XRSceneFader","require exports tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/util/XR three.mod tdv/constants/RenderOrder".split(" "),function(a,m,k,p,h,g){a=function(){function c(d,f,n,l){this.state=d;this.renderer=f;this.scene=n;this.camera=l;this.$ka();this.X$a()}c.prototype.dispose=function(){this.Ska();this.f$a()};c.prototype.update=function(){var d=this.state.uD===void 0?0:1-this.state.uD,f=this.state.$N===void 0?1:1-this.state.$N;d*=f;this.aO.material.opacity=
1*f;this.pi.children.forEach(function(n){n.material.opacity=d})};c.prototype.Mf=function(){return this.scene};c.prototype.$ka=function(){this.pi||(this.rHa=this.W9a(),this.pi=this.x$a(this.rHa),p.im.add(this.pi))};c.prototype.W9a=function(){var d=new h.Vector2(1024,1024),f=this.camera,n=this.renderer,l=this.scene,q=n.getRenderTarget(),r=n.getActiveCubeFace(),t=n.getActiveMipmapLevel(),u=n.xr.enabled,v=new h.PerspectiveCamera(90,1,f.near,f.far);v.matrixAutoUpdate=!1;v.layers=f.layers;this.renderer.zn=
!0;n.xr.enabled=!1;p.im.add(v);f=e.map(function(w){var y=k.bla(n,d);v.matrix.identity();v.matrix.multiply(b.makeRotationFromEuler(w));v.updateMatrixWorld();n.setRenderTarget(y,0,0);n.render(l,v);return y});n.setRenderTarget(q,r,t);n.xr.enabled=u;this.renderer.zn=!1;p.im.remove(v);return f};c.prototype.x$a=function(d){var f=new h.Group;e.forEach(function(n,l){var q=new h.PlaneGeometry(2,2);l=new h.MeshBasicMaterial({side:h.DoubleSide,depthTest:!1,transparent:!0,map:d[l].texture});q=new h.Mesh(q,l);
q.matrixAutoUpdate=!1;q.renderOrder=g.USa;q.userData.b7=!0;q.matrix.identity();q.matrix.multiply(b.makeRotationFromEuler(n));q.matrix.multiply(b.makeTranslation(0,0,-1));f.add(q)});return f};c.prototype.Ska=function(){var d;this.pi.children.forEach(function(f){var n,l;f.material.dispose();(n=f.geometry)===null||n===void 0||n.dispose();(l=f.parent)===null||l===void 0||l.remove(f)});this.rHa.forEach(function(f){f.texture.dispose();f.dispose()});(d=this.pi.parent)===null||d===void 0||d.remove(this.pi)};
c.prototype.X$a=function(){var d=new h.SphereGeometry(1,32,16,0,Math.PI*2,0,Math.PI),f=new h.MeshBasicMaterial({color:0,side:h.DoubleSide,depthTest:!1,transparent:!0});d=new h.Mesh(d,f);d.renderOrder=g.VSa;d.userData.b7=!0;this.aO=d;p.im.add(this.aO)};c.prototype.f$a=function(){var d;this.aO.material.dispose();this.aO.geometry.dispose();(d=this.aO.parent)===null||d===void 0||d.remove(this.aO)};return c}();var e=[new h.Euler(0,0,0,"YXZ"),new h.Euler(0,-.5*Math.PI,0,"YXZ"),new h.Euler(0,-Math.PI,0,
"YXZ"),new h.Euler(0,.5*Math.PI,0,"YXZ"),new h.Euler(.5*Math.PI,0,0,"YXZ"),new h.Euler(-.5*Math.PI,0,0,"YXZ")],b=new h.Matrix4;new h.Euler;return a});
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,k,p,h,g,e,b,c){return function(){function d(f){this.M8=this.L8=this.O8=this.P8=this.N8=this.Q8=void 0;this.Jt=null;this.Uma=!1;this.DV=void 0;this.renderer=f;this.ww=new p;this.QLa=this.renderer.render.bind(f);
this.renderer.render=this.render.bind(this);this.SLa=this.renderer.setSize.bind(f);this.renderer.setSize=this.setSize.bind(this);this.Neb=this.renderer.clear.bind(f);this.renderer.clear=this.clear.bind(this);this.RLa=this.renderer.setRenderTarget.bind(f);this.renderer.setRenderTarget=this.setRenderTarget.bind(this);e.O.bind(k.V,this.kb,this,!0);window.startFadeOut=this.zE.bind(this);window.setFadeOutPosition=this.mE.bind(this);window.endFadeOut=this.sD.bind(this)}d.prototype.dispose=function(){var f;
e.O.h(k.V,this.kb,this);(f=this.Jt)===null||f===void 0||f.dispose()};d.prototype.setSize=function(f,n,l){l===void 0&&(l=!0);!this.renderer.zn&&this.il()?(this.Q8=f,this.N8=n,this.P8=l):this.SLa(f,n,l)};d.prototype.setRenderTarget=function(f,n,l){n===void 0&&(n=0);l===void 0&&(l=0);this.il()&&!this.Kdb(f)?(this.O8=f,this.L8=n,this.M8=l):this.RLa(f,n,l)};d.prototype.Kdb=function(f){return this.Uma||this.renderer.zn||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,n){var l;if(f.isScene){if(!this.renderer.zn){if(this.Jt&&this.Jt.Mf()===f&&f!==this.M6)return;e.gpa(this.renderer,f,n,this.Eqa);if(this.il()||this.renderer.getRenderTarget()===null||(n===null||n===void 0?0:n.isPerspectiveCamera)&&((l=this.renderer.getRenderTarget())===null||l===void 0?0:l.RJa))this.M6=f,this.XJa=n,this.Jt&&this.Jt.update(f,n)}if(this.Iab(f,n))return}this.Uma=!0;try{this.QLa(f,n)}catch(q){c.Nw&&console.error("render error:",q)}this.Uma=!1};d.prototype.clear=
function(f,n,l){this.Neb(f,n,l)};d.prototype.kb=function(){this.il()||(this.Q8!==void 0&&this.N8!==void 0&&this.P8!==void 0&&(this.SLa(this.Q8,this.N8,this.P8),this.P8=this.N8=this.Q8=void 0),this.O8!==void 0&&this.L8!==void 0&&this.M8!==void 0&&(this.RLa(this.O8,this.L8,this.M8),this.M8=this.L8=this.O8=void 0))};d.prototype.il=function(){return e.isPresenting&&e.Dg===this.renderer};d.prototype.zE=function(){this.ww.uD=0;this.dY()};d.prototype.mE=function(f){this.ww.uD=f};d.prototype.sD=function(){this.ww.uD=
void 0;this.dY()};d.prototype.JJ=function(){this.ww.$N=0;this.dY()};d.prototype.wJ=function(f){this.ww.$N=f;this.dY()};d.prototype.BI=function(){this.ww.$N=void 0;this.dY()};d.prototype.Iab=function(f,n){if(!e.isPresenting||this.DV===0)return!1;if(this.DV===void 0){if(b.Dc()!=b.cu&&b.Dc()!=b.RA)return this.DV=0,!1;this.DV=20}this.DV--;var l=n.near,q=n.far;n.near=Math.min(l,.1);n.far=Math.max(q,1E3);this.QLa(f,n);n.near=l;n.far=q;return!0};d.prototype.dY=function(){var f=this.M6&&(e.isPresenting&&
this.ww.$N!==void 0||this.ww.uD!==void 0);f!==!!this.Jt&&(f?this.il()?this.Jt=new g(this.ww,this.renderer,this.M6,this.XJa):this.Jt=new h(this.ww,this.renderer,this.M6,this.XJa):this.Jt&&(this.Jt.dispose(),this.Jt=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,k,p,h,g,e,b,c){return function(){function d(f){this.WU=!0;this.Tq=this.renderer=null;this.toa=void 0;this.zk=0;this.WU=f;this.container=document.createElement("div")}d.prototype.dispose=function(){this.Ba()};
d.prototype.D4=function(){this.zk++};d.prototype.Fcb=function(){return this.zk>0};d.prototype.Y7=function(){this.zk--;this.zk===0&&this.Ba()};d.prototype.ac=function(){return this.container};d.prototype.Dn=function(){this.mOa();return this.renderer};d.prototype.Zab=function(){this.Dhb();return this.qD};d.prototype.$ab=function(){this.Ehb();return this.et};d.prototype.cib=function(){this.v8(d.bsa)};d.prototype.bib=function(){this.v8(d.kSa)};d.prototype.hib=function(){this.v8(d.lSa)};d.prototype.eib=
function(){this.v8(d.csa)};d.prototype.zE=function(){var f;(f=this.Tq)===null||f===void 0||f.zE()};d.prototype.mE=function(f){var n;(n=this.Tq)===null||n===void 0||n.mE(f)};d.prototype.sD=function(){var f;(f=this.Tq)===null||f===void 0||f.sD()};d.prototype.JJ=function(){this.mOa();this.Tq.JJ()};d.prototype.wJ=function(f){this.Tq.wJ(f)};d.prototype.BI=function(){this.Tq.BI()};d.prototype.Dhb=function(){this.qD||(this.qD=new b.CSS3DRenderer,this.qD.domElement.style.position="absolute",this.qD.domElement.style.zIndex=
"0",this.container.prepend(this.qD.domElement))};d.prototype.mOa=function(){if(!this.renderer){var f={alpha:!0};h.iRa&&(f.precision="lowp");d.Vka.length>0?(f.context=d.Vka.pop(),f.canvas=f.context.canvas):(f.canvas=document.createElement("canvas"),f.context=p.bab(f.canvas));this.renderer=new b.WebGLRenderer(f);this.Tq=new e(this.renderer);this.renderer.setAnimationLoop(null);this.renderer.setPixelRatio(p.getPixelRatio());this.renderer.debug.checkShaderErrors=h.Nw;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.et?this.container.insertBefore(this.renderer.domElement,this.et.domElement):this.container.appendChild(this.renderer.domElement);this.YPa();g.i9a(this.renderer);c.O.bind(k.V,this.dLa,this,!0)}};d.prototype.dLa=function(){setTimeout(function(){this.renderer&&this.renderer.setPixelRatio(p.OHa(this.renderer.domElement))}.bind(this),
100)};d.prototype.v8=function(f){this.toa!==f&&(this.toa=f,this.YPa())};d.prototype.YPa=function(){if(this.renderer)switch(this.toa){case d.bsa:this.renderer.autoClear=!0;this.renderer.setClearColor(0,1);this.renderer.shadowMap.enabled=!1;this.renderer.localClippingEnabled=!1;this.Tq.Eqa=g.UP.Q$;break;case d.csa:this.renderer.setClearColor(0,0);this.renderer.autoClear=!1;this.renderer.shadowMap.enabled=!0;this.renderer.localClippingEnabled=!0;this.Tq.Eqa=g.UP.H$;break;default:this.renderer.setClearColor(0,
0),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!0,this.renderer.localClippingEnabled=!1,this.Tq.Eqa=g.UP.H$}};d.prototype.Ehb=function(){this.et||(this.et=new b.CSS3DRenderer,this.et.domElement.style.position="absolute",this.et.domElement.style.zIndex="2",this.et.domElement.style.pointerEvents="none",this.container.appendChild(this.et.domElement))};d.prototype.Ba=function(){var f;this.et&&(this.container.removeChild(this.et.domElement),this.et=null);this.renderer&&(c.O.h(k.V,this.dLa,
this),g.Bfb(this.renderer),this.container.removeChild(this.renderer.domElement),d.Vka.push(this.renderer.getContext()),this.renderer.dispose(),this.renderer=null,(f=this.Tq)===null||f===void 0||f.dispose(),this.Tq=null);this.qD&&(this.container.removeChild(this.qD.domElement),this.qD=null)};d.bsa=0;d.kSa=1;d.lSa=2;d.csa=3;d.Vka=[];return d}()});
define("tdv/player/view/ScreenJoystick",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/player/view/util/Device"],function(a,m,k,p,h){return function(g){function e(b,c){var d=g.call(this)||this;d.enabled=!1;d.Z6=0;d.a7=0;d.Vna=null;d.Jj=null;d.wm=null;d.mP=null;d.zk=0;d.lb=b;d.Vna=c;return d}P(e,g);e.prototype.dispose=function(){this.Ua(!1);this.Vna=this.lb=null};e.prototype.D4=function(){this.zk++;this.zk>=1&&this.Ua(!0)};e.prototype.Y7=function(){this.zk--;this.zk<=
0&&this.Ua(!1)};e.prototype.Ua=function(b){this.enabled!=b&&((this.enabled=b)?(this.lb.opa("Button"),this.m9a()):(this.lb.Mfb(),this.Tka(),this.stop(),this.Ffb()))};e.prototype.getX=function(){return this.Z6};e.prototype.getY=function(){return this.a7};e.prototype.Rh=function(b){this.ef(b);this.enabled&&(this.vna=this.tna=b.x,this.wna=this.una=b.y,this.qhb())};e.prototype.Mj=function(b){this.vna=b.x;this.wna=b.y;this.mP?this.Gib():this.Jj&&this.TJ()};e.prototype.ef=function(){this.Tka();this.stop()};
e.prototype.eLa=function(){this.ef()};e.prototype.kl=function(){this.vmin=Math.min(this.lb.cb(),this.lb.Kb())/100};e.prototype.start=function(){this.Dz();this.o(k.Gp);this.TJ()};e.prototype.stop=function(){this.Jj&&(this.oab(),this.o(k.tg))};e.prototype.Gib=function(){var b=this.vna-this.tna,c=this.wna-this.una;Math.sqrt(b*b+c*c)>this.vmin*e.NQa&&this.Tka()};e.prototype.qhb=function(){this.mP=window.setTimeout(this.gib.bind(this),e.OQa)};e.prototype.Tka=function(){this.mP&&(clearTimeout(this.mP),
this.mP=null)};e.prototype.Dz=function(){this.Jj=document.createElement("div");this.Jj.setAttribute("tdvclass","Button");this.Jj.style.position="absolute";this.Jj.style.width=this.Jj.style.height=Math.round(e.Jqa*2*this.vmin)+"px";this.Jj.style.borderRadius="50%";this.Jj.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.Jj.style.transform="translate(-50%, -50%)";this.Jj.style.zIndex="1000";this.Jj.style.left=this.tna+"px";this.Jj.style.top=this.una+"px";this.Vna.wa().kk(this.Jj);this.wm=document.createElement("div");
this.wm.setAttribute("tdvclass","Button");this.wm.style.position="absolute";this.wm.style.width=this.wm.style.height=Math.round(e.gSa*2*this.vmin)+"px";this.wm.style.borderRadius="50%";this.wm.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.wm.style.transform="translate(-50%, -50%)";this.wm.style.zIndex="1000";this.Jj.appendChild(this.wm)};e.prototype.TJ=function(){var b=this.vna-this.tna,c=this.wna-this.una;if(b==0&&c==0)this.a7=this.Z6=0;else{var d=Math.atan2(-c,b);b=Math.min(Math.sqrt(b*
b+c*c)/(this.vmin*e.Jqa),e.DRa);this.Z6=Math.cos(d)*b;this.a7=Math.sin(d)*b}this.wm.style.left=(50+this.Z6*50).toFixed(2)+"%";this.wm.style.top=(50-this.a7*50).toFixed(2)+"%";this.o(k.V)};e.prototype.oab=function(){var b,c;(b=this.wm.parentNode)===null||b===void 0||b.removeChild(this.wm);this.wm=null;(c=this.Jj.parentNode)===null||c===void 0||c.removeChild(this.Jj);this.Jj=null};e.prototype.gib=function(){this.mP=null;this.start()};e.prototype.m9a=function(){this.lb.bind(k.Ra,this.Rh,this,!0);this.lb.bind(k.mb,
this.Mj,this,!0);this.lb.bind(k.bb,this.ef,this,!0);this.lb.bind(k.Yb,this.kl,this,!0);this.lb.bind(k.$A,this.eLa,this,!0);this.kl()};e.prototype.Ffb=function(){this.lb.h(k.Ra,this.Rh,this);this.lb.h(k.mb,this.Mj,this);this.lb.h(k.bb,this.ef,this);this.lb.h(k.Yb,this.kl,this);this.lb.h(k.$A,this.eLa,this)};e.NQa=h.yb()?5:.5;e.OQa=h.yb()?300:600;e.Jqa=h.yb()?10:6.6;e.gSa=h.yb()?5:3.3;e.DRa=6;return e}(p)});
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.Ipa=f;this.element=document.createElement("div");this.Tpa=document.createElement("span");this.element.appendChild(this.Tpa);this.Tpa.innerHTML=f.text.split("<br>").join("\n").split("\n").map(p).join("<br>");this.a5=!1}function k(f){this.R=f;this.CU=h.Vpa(this.CU.bind(this),100);this.DU=h.Vpa(this.DU.bind(this),
100);this.pa=document.createElement("div");this.pa.style.position="absolute";this.pa.style.left=0;this.pa.style.top=0;this.pa.style.right=0;this.pa.style.bottom=0;this.pa.style.zIndex=1;this.pa.style.cursor="inherit";this.pa.style.display="none";this.hn=document.createElement("div");this.hn.style.position="absolute";this.hn.style.left=0;this.hn.style.right=0;this.hn.style.zIndex=1;this.hn.style.cursor="inherit";this.pa.appendChild(this.hn);this.XT=[];this.fU=[];this.Oi=[];this.Bga={};this.oN=e.Fc;
this.R.bind(g.K("subtitlesEnabled"),this.zq,this);k.Tra.forEach(function(n){this.R.bind(g.K(n),this.CU,this)}.bind(this));k.Ura.forEach(function(n){this.R.bind(g.K(n),this.DU,this)}.bind(this));this.zq();this.CU();this.DU()}function p(f){d.innerHTML=f;return d.innerText}var h=a("tdv/utils"),g=a("tdv/constants/EventName"),e=a("tdv/view/constants/Alignment"),b=a("tdv/view/util/Animation"),c=a("tdv/view/util/Font");k.prototype.clear=function(){this.Rlb(null);this.R&&(this.R.h(g.K("subtitlesEnabled"),
this.zq,this),k.Tra.forEach(function(f){this.R.h(g.K(f),this.CU,this)}.bind(this)),k.Ura.forEach(function(f){this.R.h(g.K(f),this.DU,this)}.bind(this)),this.R=null)};k.prototype.ac=function(){return this.pa};k.prototype.xka=function(f){this.XT.indexOf(f)<0&&(this.XT.push(f),f.bind(g.K("activeSubtitles"),this.Z0,this,!0),this.Z0())};k.prototype.soa=function(f){var n=this.XT.indexOf(f);n>=0&&(this.XT.splice(n,1),f.h(g.K("activeSubtitles"),this.Z0,this,!0),this.Z0())};k.prototype.Z0=function(){var f=
[];this.XT.forEach(function(n){f=f.concat(n.get("activeSubtitles")||[])});this.q5a(f)};k.prototype.zq=function(){this.ga=this.R.get("subtitlesEnabled");this.Nja()};k.prototype.CU=function(){this.oN=this.aR("subtitlesVerticalAlign",[e.Tc,e.Pd,e.Fc],e.Fc);this.hn.style["text-align"]=this.aR("subtitlesHorizontalAlign",[e.$a,e.Cb,e.Xe],e.Xe);this.hn.style.bottom=this.oN==e.Fc?this.Dl("subtitlesBottom",0):"";this.hn.style.top=this.oN==e.Tc?this.Dl("subtitlesTop",0):this.oN==e.Pd?"50%":"";this.hn.style.transform=
this.oN==e.Pd?"translate(0, -50%)":"";this.Nja()};k.prototype.DU=function(){var f={};f["background-color"]=this.Pda("subtitlesBackgroundColor","subtitlesBackgroundOpacity");f.border=[this.Dl("subtitlesBorderSize"),"solid",this.rj("subtitlesBorderColor")].join(" ");f["box-shadow"]=this.rj("subtitlesShadow",!1)?[this.Dl("subtitlesShadowHorizontalLength"),this.Dl("subtitlesShadowVerticalLength"),this.Dl("subtitlesShadowBlurRadius"),this.Pda("subtitlesShadowColor","subtitlesShadowOpacity","#000000",0)].join(" "):
"";f.display="inline-block";f["font-family"]=c.Lz(this.rj("subtitlesFontFamily"));f["font-size"]=this.Dl("subtitlesFontSize");f.color=this.rj("subtitlesFontColor");f["font-weight"]=this.aR("subtitlesFontWeight","bold bolder lighter 100 200 300 400 500 600 700 800 900 normal".split(" "),"normal");f["font-style"]=this.aR("subtitlesFontStyle",["italic","normal"],"normal");f["margin-bottom"]=this.Dl("subtitlesGap");f.opacity=this.rj("subtitlesOpacity");f["padding-top"]=this.Dl("subtitlesPaddingTop");
f["padding-bottom"]=this.Dl("subtitlesPaddingBottom");f["padding-left"]=this.Dl("subtitlesPaddingLeft");f["padding-right"]=this.Dl("subtitlesPaddingRight");f.position="relative";f["text-align"]=this.aR("subtitlesHorizontalAlign",["left","right","center"],"center");f["text-decoration"]=this.rj("subtitlesTextDecoration",["underline","overline","line-through","none"],"none");f["text-shadow"]=[this.Dl("subtitlesTextShadowHorizontalLength"),this.Dl("subtitlesTextShadowVerticalLength"),this.Dl("subtitlesTextShadowBlurRadius"),
this.Pda("subtitlesTextShadowColor","subtitlesTextShadowOpacity","#000000",0)].join(" ");this.Bga=f;this.sUa()};k.prototype.q5a=function(f){this.fU=f;this.Nja()};k.prototype.Nja=function(){for(var f=this.ga?this.fU:[],n=this.Oi.length-1;n>=0;n--){var l=this.Oi[n];if(f.indexOf(l.Ipa)>=0)break;this.hn.removeChild(l.element)}for(var q=[],r=!1;n>=0;n--)l=this.Oi[n],!l.a5&&f.indexOf(l.Ipa)<0&&(l.a5=!0,l.element.style.visibility="hidden",r=!0),q.splice(0,0,l);r&&b.requestFrame(this.uua,this);this.Oi=q;
var t=this.Oi.filter(function(u){return!u.a5}).map(function(u){return u.Ipa});f.filter(function(u){return t.indexOf(u)<0}).forEach(function(u){u=new m(u);this.xta(u);this.oN==e.Fc&&this.Oi.length>0?this.hn.insertBefore(u.element,this.Oi[this.Oi.length-1].element):this.hn.appendChild(u.element);this.Oi.push(u)}.bind(this));this.pa.style.display=this.Oi.length>0?"block":"none"};k.prototype.uua=function(f){var n=!1;f=Math.round(200*f/1E3);for(var l=0;l<this.Oi.length;l++){var q=this.Oi[l];if(q.a5)if(n=
!0,f>=q.element.clientHeight)f-=q.element.clientHeight,this.hn.removeChild(q.element),this.Oi.splice(l,1),l--;else{q.element.style.height=q.element.clientHeight-f+"px";break}}n&&b.requestFrame(this.uua,this)};k.prototype.sUa=function(){this.Oi.forEach(this.xta.bind(this))};k.prototype.xta=function(f){for(var n in this.Bga)f.Tpa.style[n]=this.Bga[n]};k.prototype.rj=function(f,n){return this.R.get(f,n)};k.prototype.Dl=function(f,n){f=this.R.get(f,n);isNaN(f)||(f=Math.round(f)+"px");return f};k.prototype.aR=
function(f,n,l){f=this.R.get(f);return n.indexOf(f)<0?l:f};k.prototype.Pda=function(f,n,l,q){f=this.R.get(f,l);n=this.R.get(n,q);return"rgba("+parseInt("0x"+f.substr(1,2))+", "+parseInt("0x"+f.substr(3,2))+", "+parseInt("0x"+f.substr(5,2))+", "+n+")"};k.Tra=["subtitlesHorizontalAlign","subtitlesVerticalAlign","subtitlesTop","subtitlesBottom"];k.Ura="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 k});
define("tdv/player/view/SubtitlesListener","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo".split(" "),function(a,m,k,p,h,g){a=function(){function n(l){this.lP=new Map;this.ym=l}n.prototype.add=function(l){g.Qa("PanoramaPlayer",l)?this.lP.set(l,new e(this.ym,l)):g.Qa("VideoPlayer",l)?this.lP.set(l,new b(this.ym,l)):g.Qa("PhotoAlbumPlayer",l)?this.lP.set(l,new c(this.ym,l)):g.Qa("Audio",l)&&this.lP.set(l,new f(this.ym,l))};
n.prototype.remove=function(l){var q=this.lP.get(l);q&&(q.clear(),this.lP.delete(l))};return n}();m=function(){function n(l,q){this.ym=l;this.source=q}n.prototype.clear=function(){};return n}();var e=function(n){function l(q,r){q=n.call(this,q,r)||this;q.oI=new d(q.ym);q.ag=null;q.source.bind(p.K("panorama"),q.Nna,q,!0);q.Nna();return q}P(l,n);l.prototype.clear=function(){this.source&&(this.source.h(p.K("panorama"),this.Nna,this),this.source=null,this.Of(null),this.oI.clear(),this.oI=null)};l.prototype.Nna=
function(){this.Of(this.source.get("panorama"))};l.prototype.Of=function(q){if(this.ag!=q){this.ag&&(this.ag.h(p.K("audios"),this.bJ,this),this.ym.soa(this.ag));if(this.ag=q)this.ym.xka(this.ag),this.ag.bind(p.K("audios"),this.bJ,this,!0);this.bJ()}};l.prototype.bJ=function(){this.oI.Noa(this.ag&&this.ag.get("audios")||[])};return l}(m),b=function(n){function l(q,r){q=n.call(this,q,r)||this;q.video=null;q.source.bind(p.K("video"),q.gJ,q,!0);q.source.bind(p.Ye,q.gJ,q,!0);q.gJ();return q}P(l,n);l.prototype.clear=
function(){this.source&&(this.source.h(p.K("video"),this.gJ,this),this.source.h(p.Ye,this.gJ,this),this.source=null,this.B8(null))};l.prototype.gJ=function(){var q;this.B8(((q=this.source)===null||q===void 0?void 0:q.get("state"))!=h.aa?this.source.get("video"):null)};l.prototype.B8=function(q){this.video!=q&&(this.video&&this.ym.soa(this.video),(this.video=q)&&this.ym.xka(this.video))};return l}(m),c=function(n){function l(q,r){q=n.call(this,q,r)||this;q.dJ=q.dJ.bind(q);q.oI=new d(q.ym);q.qc=null;
k.ba(q.source,"photoAlbum.playList.items",q.dJ,!1);k.ba(q.source,"photoAlbum.playList.selectedIndex",q.dJ,!1);q.dJ();return q}P(l,n);l.prototype.clear=function(){this.source&&(k.ca(this.source,"photoAlbum.playList.items",this.dJ),k.ca(this.source,"photoAlbum.playList.selectedIndex",this.dJ),this.source=null,this.$Na(null),this.oI.clear(),this.oI=null)};l.prototype.dJ=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.$Na(q?q.get("media"):null)};l.prototype.$Na=function(q){this.qc!=q&&(this.qc&&this.qc.h(p.K("audios"),this.bJ,this),(this.qc=q)&&this.qc.bind(p.K("audios"),this.bJ,this,!0),this.bJ())};l.prototype.bJ=function(){this.oI.Noa(this.qc&&this.qc.get("audios")||[])};return l}(m),d=function(){function n(l){this.M4=[];this.L4=new Map;this.ym=l}n.prototype.clear=function(){this.Noa([])};n.prototype.Noa=function(l){this.M4!=l&&(this.M4.forEach(function(q){l.indexOf(q)>=0||(this.L4.get(q).clear(),this.L4.delete(q))}.bind(this)),
this.M4=l,this.M4.forEach(function(q){this.L4.has(q)||this.L4.set(q,new f(this.ym,q))}.bind(this)))};return n}(),f=function(n){function l(q,r){q=n.call(this,q,r)||this;q.fE=!1;q.source.bind(p.K("state"),q.Ena,q,!0);q.Ena();return q}P(l,n);l.prototype.clear=function(){this.source&&(this.uNa(!1),this.source.h(p.K("state"),this.Ena,this),this.source=null)};l.prototype.Ena=function(){this.uNa(this.source.get("state")!=h.aa)};l.prototype.uNa=function(q){this.fE!=q&&(this.fE&&this.ym.soa(this.source),(this.fE=
q)&&this.ym.xka(this.source))};return l}(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.qA==
R&&v.pw==S?O.Dn().render(R,S):v.O.h(g.me,G,this)}v.c8=new b(g.Ikb);var N=I=new v.ysa,O=F=new l,R=new k.Scene,S=new k.PerspectiveCamera;v.gpa(O.Dn(),R,S,v.UP.Q$);v.AV(O.Dn(),N);v.O.bind(g.me,G,this,!0);v.c8=null}var k=a("three.mod"),p=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),g=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"),n=a("tdv/player/view/ProgressBar"),
l=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"),y=a("tdv/view/constants/Cursor"),x=a("tdv/view/constants/CreationPolicy"),z=a("tdv/view/constants/State"),A=a("tdv/view/containers/Container"),D=a("tdv/view/core/UIComponent"),E=180/Math.PI,B=new k.Euler,C=c.define("ViewerArea",A,function(){A.call(this);
this.set("childrenInteractionEnabled",!0);this.set("contentOpaque",!0);this.set("creationPolicy",x.mK);this.set("subtitlesEnabled",!0);this.set("checkToolTipOcclusion",!0);this.set("isKeyboardTarget",!1);this.tv=this.HR=this.Zr=this.Cj=this.LC=this.Ju=this.te=this.t_=this.Ri=null;this.fU=new r(this);this.H3=new t(this.fU);this.Pga=this.av=!1;this.zj=e.aa;this.oo=this.wl=null;this.Io=!1;this.zT=[];this.bind(C.Wra,this.K1a,this,!0);this.bind(C.Vra,this.J1a,this,!0);this.bind(g.Ra,this.Uza,this);this.bind(g.Ra,
this.Uza,this);this.bind(g.rc,this.f2a,this);this.bind(g.Db,this.e2a,this);this.bind(g.Cd,this.N1,this,!0);this.bind(g.sd,this.c2a,this,!0);this.NK=new d(this,"buttonPause",w.Mk);this.NK.bind(g.oa,this.mH,this);this.NK.set("state",z.gf);this.OK=new d(this,"buttonPlay",w.Mk);this.OK.bind(g.oa,this.nH,this);this.OK.set("state",z.gf);this.RF=new d(this,"buttonPlayPause",w.Mk);this.RF.bind(g.oa,this.G1a,this);this.RF.set("state",z.gf);this.QK=new d(this,"buttonStop",w.Mk);this.QK.bind(g.oa,this.xC,this);
this.QK.set("state",z.Mb);this.iVa=new d(this,"buttonRestart",w.jf);this.iVa.bind(g.oa,this.wC,this);this.yZ=new d(this,"buttonToggleSubtitles",w.Mk);this.yZ.bind(g.Jk,function(){this.set("subtitlesEnabled",!0)},this,!0);this.yZ.bind(g.Im,function(){this.set("subtitlesEnabled",!1)},this,!0);this.bind(g.K("subtitlesEnabled"),function(){this.yZ.set("pressed",this.get("subtitlesEnabled"))},this);this.yZ.set("pressed",this.get("subtitlesEnabled"));(new d(this,"buttonVRView",w.jf)).bind(g.oa,function(){this.set("viewMode",
"vr")},this,!0);this.M_a=p.Qq(this.s8a,this);this.bind(g.Ik,this.b2a,this,!0);this.bind(C.WY,this.d2a,this,!0);v.O.bind(g.V,function(){this.set("viewMode",v.isPresenting&&v.Dg==this.Sc().Dn()?"vr":"standard")},this,!0)});C.prototype.play=function(){this.nH()};C.prototype.pause=function(){this.mH()};C.prototype.stop=function(){this.xC()};C.prototype.restart=function(){this.wC()};C.ad=Object.assign({},A.ad,{progressBackgroundColor:void 0,progressBackgroundColorDirection:void 0,progressBackgroundColorRatios:void 0,
progressBackgroundOpacity:void 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,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});C.prototype.get=function(G,N){switch(G){case "viewMode":return v.isPresenting&&v.Dg==this.Sc().Dn()?"vr":"standard";case "xrYaw":return v.isPresenting?-B.setFromQuaternion(v.Bm,"YXZ").y*E:0;case "xrPitch":return v.isPresenting?B.setFromQuaternion(v.Bm,"YXZ").x*E:0;case "xrRoll":return v.isPresenting?-B.setFromQuaternion(v.Bm,"YXZ").z*E:0}return A.prototype.get.call(this,G,N)};
C.prototype.set=function(G,N){G=="playbackState"&&(N=this.zj,this.get(G)!=N&&(this.Pga=!0,this.M_a()));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.EU();
break;case "viewMode":var O=A.prototype.get.call(this,G);this.Sc().Fcb()&&(N!="vr"||v.isPresenting?N!="vr"&&v.isPresenting&&v.Ela():v.AV(this.Sc().Dn(),this.nma()));N=v.isPresenting&&v.Dg==this.Sc().Dn()?"vr":"standard";O!=N&&this.o(C.y$)}A.prototype.set.call(this,G,N)};C.prototype.Nb=function(){this.zl(C.ad)};C.prototype.Ib=function(){A.prototype.Ib.call(this);this.LC==null&&(this.LC=new D,this.LC.set("width","100%"),this.LC.set("height","100%"),this.LC.set("interactionEnabled",!1),this.LC.set("toolTipDisabled",
!0),this.hb(this.LC),this.LC.wa().kk(this.Sc().ac()));this.Zr==null&&(this.Zr=new D,this.Zr.set("width","100%"),this.Zr.set("height","100%"),this.Zr.set("toolTipDisabled",!0),this.Zr.set("interactionEnabled",!1),this.hb(this.Zr),p.defer(function(){this.Zr.set("cursor",y.dB)}.bind(this)),this.HR=new q(this,this.Zr),this.HR.Ua(!1));this.tv==null&&(this.tv=new D,this.tv.set("width","100%"),this.tv.set("height","100%"),this.tv.set("toolTipDisabled",!0),this.tv.set("interactionEnabled",!1),this.hb(this.tv),
this.tv.wa().kk(this.fU.ac()));this.Ri==null&&(this.Ri=new n,this.hb(this.Ri));this.te==null&&(this.te=new f,this.te.bind(g.V,this.Mga,this,!0),this.hb(this.te),this.EU())};C.prototype.nma=function(){if(this.cFa)return this.cFa;if(I){var G=I;I=null}else G=new v.ysa;h.ba(this,"vrGazePointerHideTime vrFoveation vrPointerColor vrPointerDistance vrPointerOverColor vrPointerSelectionColor vrPointerSelectionTime".split(" "),function(){G.NHa=this.get("vrGazePointerHideTime");G.IHa=this.get("vrFoveation");
G.N7=this.get("vrPointerColor");G.jMa=this.get("vrPointerDistance");G.boa=this.get("vrPointerOverColor");G.P7=this.get("vrPointerSelectionColor");G.nMa=this.get("vrPointerSelectionTime")}.bind(this),!0);return this.cFa=G};C.prototype.wbb=function(){return this.te};C.prototype.Sc=function(){this.Cj||(F?(this.Cj=F,F=null):this.Cj=new l(this.get("aaEnabled")));return this.Cj};C.prototype.Ck=function(){A.prototype.Ck.call(this);for(var G=[],N=this.zT.length-1;N>=0;N--)G.push(this.zT[N].m);this.tv&&G.push(this.tv);
this.Zr&&G.push(this.Zr);this.te&&G.push(this.te);this.Ri&&G.push(this.Ri);var O=this.Ab();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,S){R&&this.Pla(R)!=S&&this.Vq(R,S)}.bind(this))};C.prototype.eb=function(){this.S("externalProgressBar")&&((this.t_=this.G("externalProgressBar"))?this.removeChild(this.Ri):this.hb(this.Ri),this.$("externalProgressBar"),C.Zsa.forEach(N=>{this.TC(N)}));this.Oc(C.dTa,C.Rsa,[this.Ri],
!0,!0);var G=[this.Ri];this.t_&&G.push(this.t_);this.Oc(C.Zsa,C.$sa,G,!0,!0);this.S("externalPlaybackBar")&&(this.Ju&&this.Ju.h(g.V,this.Mga,this,!0),(this.Ju=this.G("externalPlaybackBar"))?this.removeChild(this.te):this.hb(this.te),this.EU(),this.Ju&&this.Ju.bind(g.V,this.Mga,this,!0),this.$("externalPlaybackBar"),C.Wsa.forEach(N=>{this.TC(N)}));this.Oc(C.cTa,C.Qsa,[this.te],!0,!0);G=[this.te];this.Ju&&G.push(this.Ju);this.Oc(C.Wsa,C.Xsa,G,!0,!0);A.prototype.eb.call(this)};C.prototype.s8a=function(){this.Pga&&
(this.Pga=!1,this.NK.set("state",this.zj==e.Xb?z.Mb:z.gf),this.OK.set("state",this.zj==e.PLAYING||this.zj==e.Xb?z.Mb:z.gf),this.RF.set("state",this.zj==e.PLAYING?z.Mb:z.gf),this.QK.set("state",this.zj==e.aa?z.Mb:z.gf))};C.prototype.Kd=function(G){this.zj=G;this.set("playbackState",G)};C.prototype.N1=function(){C.To(this)};C.prototype.c2a=function(){C.Ro(this)};C.prototype.mH=function(){this.zj==e.Xb?this.Ql():this.ws()};C.prototype.nH=function(){this.Ql()};C.prototype.G1a=function(){this.zj==e.PLAYING?
this.ws():this.Ql()};C.prototype.xC=function(){this.sq()};C.prototype.wC=function(){this.sq();this.Ql()};C.prototype.b2a=function(){if(!this.wl||!this.wl.Rka())switch(this.get("doubleClickAction")){case "toggle_fullscreen":var G=this.Wb().ck;G&&G.dl()&&G.toggle()}};C.prototype.d2a=function(G){this.zT.forEach(function(N){this.H3.remove(N)}.bind(this));this.zT=G.data.players;this.zT.forEach(function(N){this.H3.add(N)}.bind(this));this.wf()};C.prototype.Ql=function(){this.oo&&this.oo.play()};C.prototype.ws=
function(){this.oo&&this.oo.pause()};C.prototype.sq=function(){this.oo&&this.oo.stop()};C.prototype.K1a=function(G){this.bCa(G.data.player)};C.prototype.J1a=function(G){this.wl==G.data.player&&this.bCa(null)};C.prototype.Uza=function(){C.Xq(this)};C.prototype.f2a=function(){this.Io=!0;this.EU()};C.prototype.e2a=function(){this.Io=!1;this.EU()};C.prototype.EU=function(){this.te&&this.te.set("visible",this.get("playbackBarVisible")&&(this.Io||!this.get("playbackBarRollOverDisplay")||u.br()))};C.prototype.bCa=
function(G){this.wl!=G&&(this.set("playbackBarVisible",!1),this.wl&&this.wl.Xq(!1),this.oo&&this.oo.h(g.K("state"),this.Aaa,this),this.M2a=this.wl,(this.wl=G)&&this.wl.Xq(!!this.Ho),(this.oo=this.wl&&this.wl.oVa?this.wl:null)&&this.oo.bind(g.K("state"),this.Aaa,this,!0),this.Aaa())};C.prototype.Xq=function(G){this.Ho=G;this.set("isKeyboardTarget",G);this.wl&&this.wl.Xq(!!this.Ho)};C.prototype.bkb=function(){return!this.M2a};C.prototype.Aaa=function(){this.oo?this.Kd(this.oo.get("state")):this.Kd(e.aa)};
C.prototype.Mga=function(){var G=(this.Ju?this.Ju:this.te).get("position");this.o(new b(C.r$,{position:G}))};C.Rsa={progressBackgroundColor:"backgroundColor",progressBackgroundColorDirection:"backgroundColorDirection",progressBackgroundColorRatios:"backgroundColorRatios",progressBackgroundOpacity:"backgroundOpacity",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"};C.dTa=Object.keys(C.Rsa);C.$sa={progressPercent:"percent",progressVisible:"visible"};C.Zsa=Object.keys(C.$sa);C.Qsa={playbackBarBackgroundColor:"backgroundColor",playbackBarBackgroundColorDirection:"backgroundColorDirection",
playbackBarBackgroundOpacity:"backgroundOpacity",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"};C.cTa=Object.keys(C.Qsa);C.Xsa={playbackBarDuration:"duration",playbackBarPosition:"position",playbackBarSteps:"steps",playbackBarSelectedStep:"selectedStep",playbackBarVisible:"visible"};C.Wsa=Object.keys(C.Xsa);
C.WY="requestByPlayer";C.Wra="playerShow";C.Vra="playerHide";C.r$="playbackBarPositionChange";C.y$="viewModeChange";C.VG=null;C.Xq=function(G){C.VG!=G&&(C.VG&&C.VG.Xq(!1),C.VG=G,C.VG&&C.VG.Xq(!0))};C.iI=[];C.To=function(G){var N=C.iI.indexOf(G);N>-1&&C.iI.splice(N,1);C.iI.push(G);this.Xq(this.Iwa())};C.Ro=function(G){var N=C.iI.indexOf(G);N>-1&&C.iI.splice(N,1);C.VG==G&&C.Xq(C.iI.length?this.Iwa():null)};C.Iwa=function(){var G=C.iI.slice();G.sort(function(N,O){var R=N.get("actualWidth")*N.get("actualHeight"),
S=O.get("actualWidth")*O.get("actualHeight");N=G.indexOf(N)-G.indexOf(O);return R-S||N});return G[G.length-1]};var I=null,F=null;navigator.xr&&navigator.xr.addEventListener("sessiongranted",function(){m()});return C});
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"),k=a("tdv/binding/Bindable"),p=a("tdv/events/Event"),h=a("tdv/player/script/ViewerArea"),g=m.extend(k,function(e){k.call(this);this.oVa=e;this.WT=this.pC=null});g.Vh="mediaShow";g.fo="mediaHide";g.prototype.Xq=function(){};g.prototype.Rka=function(){return!1};g.prototype.TT=function(e){this.pC!=e&&(this.pC&&this.kja(this.pC),(this.pC=
e)&&this.fba(this.pC))};g.prototype.fba=function(e){e.bind(h.WY,this.YEa,this,!0);e.bind(h.r$,this.iT,this)};g.prototype.kja=function(e){e.h(h.WY,this.YEa,this);e.h(h.r$,this.iT,this)};g.prototype.rJ=function(e){this.pC.o(new p(h.WY,{players:e||[this]}))};g.prototype.YEa=function(e){e.data.players.indexOf(this)<0&&this.ZM()};g.prototype.iT=function(){};g.prototype.ZM=function(){};g.prototype.YR=function(e){this.o(new p(g.Vh,{media:e}));this.WT=this.pC;this.WT.o(new p(h.Wra,{player:this}))};g.prototype.WR=
function(e){this.o(new p(g.fo,{media:e}));this.WT&&(this.WT.o(new p(h.Vra,{player:this})),this.WT=null)};return g});define("tdv/player/view/map/constants/MovementMode",["require"],function(){return{OE:"constrained",nRa:"free_drag",skb:"free_drag_and_rotation",Y$:"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.dc=this.cc=.5;this.Dd=0;this.hc=1;this.ji=p.ej;this.Po=k.OE;this.sfa=this.vfa=1;this.nf=this.pf=this.po=this.qo=100;this.bp=m.AF}a("tdv/utils");var k=a("tdv/player/view/map/constants/MovementMode"),p=a("tdv/view/constants/ScaleMode");m.prototype.hJa=function(){return this.bp!==m.AF};m.prototype.gJa=function(){return this.bp&
m.BK?!0:!1};m.prototype.iJa=function(){return this.bp&m.CK?!0:!1};m.prototype.jJa=function(){return this.bp&m.DF?!0:!1};m.prototype.fJa=function(){return this.bp&m.zF?!0:!1};m.prototype.getX=function(){this.gp();return this.cc};m.prototype.getY=function(){this.gp();return this.dc};m.prototype.Uz=function(){this.gp();return this.hc};m.prototype.fO=function(){this.gp();return this.Dd};m.prototype.setConfiguration=function(h,g,e,b,c){this.pf=h;this.nf=g;this.ji=e;this.vfa=b;this.sfa=c;this.dc=this.cc=
.5;this.Dd=0;this.hc=b;this.Rd=!0};m.prototype.setPosition=function(h,g,e,b){this.cc=h;this.dc=g;this.Dd=e;this.hc=b;this.Rd=!0};m.prototype.Ot=function(h){this.Po=h;this.Rd=!0};m.prototype.setSize=function(h,g){this.qo=h;this.po=g;this.Rd=!0};m.prototype.gp=function(){if(this.Rd){this.Rd=!1;var h=m.AF;this.hc>this.sfa?(this.hc=this.sfa,h|=m.gTa):this.hc<this.vfa&&(this.hc=this.vfa,h|=m.hTa);if(this.Po==k.OE){switch(this.ji){case p.NONE:var g=this.pf;var e=this.nf;break;case p.Ep:g=this.qo;e=this.nf*
this.qo/this.pf;break;case p.Hk:g=this.pf*this.po/this.nf;e=this.po;break;case p.nr:this.pf*this.po>this.nf*this.qo?(g=this.pf*this.po/this.nf,e=this.po):(g=this.qo,e=this.nf*this.qo/this.pf);break;default:case p.ej:this.pf*this.po>this.nf*this.qo?(g=this.qo,e=this.nf*this.qo/this.pf):(g=this.pf*this.po/this.nf,e=this.po)}g*=this.hc;e*=this.hc;var b=Math.min(.5*this.qo/g,.5);g=Math.max(1-.5*this.qo/g,.5);var c=Math.min(.5*this.po/e,.5);e=Math.max(1-.5*this.po/e,.5)}else b=0,g=1,c=0,e=1;this.cc<b?
(this.cc=b,h|=m.BK):this.cc>g&&(this.cc=g,h|=m.CK);this.dc<c?(this.dc=c,h|=m.DF):this.dc>e&&(this.dc=e,h|=m.zF);this.Po!=k.OE&&this.Po!=k.nRa||this.Dd==0||(this.Dd=0,h|=m.mTa);this.bp=h}};m.AF=0;m.BK=1;m.CK=2;m.DF=4;m.zF=8;m.hTa=16;m.gTa=32;m.mTa=64;return m});
define("tdv/player/view/map/control/camera/MovementManager",["require"],function(){function a(){this.RQ=.1;this.b_=this.Zba=this.bca=this.aca=this.ica=this.Yba=this.gca=this.fca=this.VU=this.tka=this.GF=this.Laa=this.TU=this.qka=this.SU=this.oka=0}a.prototype.h8=function(m){this.RQ=m};a.prototype.WNa=function(m,k,p,h,g,e,b,c){this.oka=m;this.qka=k;this.Laa=p;this.tka=h;this.SU+=g;this.TU+=e;this.GF+=b;this.VU+=c};a.prototype.Nf=function(){return this.fca!=0||this.gca!=0||this.Yba!=0||this.ica!=0||
this.oka!=0||this.qka!=0||this.Laa!=0||this.tka!=0||this.SU!=0||this.TU!=0||this.GF!=0||this.VU!=0};a.prototype.Lb=function(m){m=1E3/m;this.aca=this.o_(this.fca/m,this.oka/m+this.SU,this.RQ);this.bca=this.o_(this.gca/m,this.qka/m+this.TU,this.RQ);this.Zba=this.o_(this.Yba/m,this.Laa/m+this.GF,this.RQ);this.b_=this.o_(this.ica/m,this.tka/m+this.VU,this.RQ);this.fca=this.aca*m;this.gca=this.bca*m;this.Yba=this.Zba*m;this.ica=this.b_*m;this.VU=this.GF=this.TU=this.SU=0};a.prototype.o_=function(m,k,p){return k==
0?this.Tg(m,k,p):k};a.prototype.Tg=function(m,k,p){m=(k-m)*(1-p);Math.abs(m)<.01&&(m=0);return k-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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher");a("tdv/view/constants/ScaleMode");var g=m.extend(h,function(){h.call(this);this.PQ=7;this.T0=this.Jea=!1;this.V0=void 0;this.Dd=0;this.hc=1;this.nf=this.pf=100;this.t0=1;this.Vga=!0;this.Wga=!1;
this.O8a=!0;this.ska=!1;this.wb=null});g.prototype.sX=function(e){this.PQ=e};g.prototype.Yc=function(e,b,c,d){this.Dd=e;this.hc=b;this.pf=c;this.nf=d};g.prototype.hhb=function(e){this.Vga=e;this.g3(this.Vga&&!!this.wb)};g.prototype.Mt=function(e){this.wb!=e&&(this.g3(!1),this.lia(!1),this.An(),this.wb=e,this.g3(this.Vga&&!!this.wb),this.lia(this.O8a&&!!this.wb))};g.prototype.An=function(){this.g3(!1);this.lia(!1);this.wb=null};g.prototype.g3=function(e){this.Wga!=e&&((this.Wga=e)?this.QUa():this.g7a())};
g.prototype.lia=function(e){this.ska!=e&&((this.ska=e)?this.TUa():this.i7a())};g.prototype.QUa=function(){this.wb.bind(k.Ra,this.re,this,!0);this.wb.bind(k.mb,this.Uk,this,!0);this.wb.bind(k.bb,this.Vk,this,!0)};g.prototype.g7a=function(){this.wb.h(k.Ra,this.re,this);this.wb.h(k.mb,this.Uk,this);this.wb.h(k.bb,this.Vk,this)};g.prototype.TUa=function(){this.wb.bind(k.tr,this.bH,this,!0);this.wb.bind(k.iK,this.uG,this,!0)};g.prototype.i7a=function(){this.wb.h(k.tr,this.bH,this);this.wb.h(k.iK,this.uG,
this)};g.prototype.re=function(e){this.T5a(e)};g.prototype.Uk=function(e){this.uEa(e)};g.prototype.Vk=function(){this.Tca()};g.prototype.bH=function(e){this.Uja(e)};g.prototype.uG=function(e){this.Vja(e)};g.prototype.T5a=function(e){this.Jea=!0;this.T0=!1;this.V0=e;this.uEa(e)};g.prototype.uEa=function(e){if(this.Jea){var b=e.pageX-this.V0.pageX,c=e.pageY-this.V0.pageY;this.T0||(Math.sqrt(b*b+c*c)>this.PQ?this.T0=!0:b=c=0);this.T0&&(this.V0=e);e=this.Dd*Math.PI/180;this.o(new p(g.kr,{xDelta:-((b*
Math.cos(e)+c*Math.sin(e))/this.pf),yDelta:-((c*Math.cos(e)-b*Math.sin(e))/this.nf)}))}};g.prototype.Tca=function(){this.Jea=!1};g.prototype.Vja=function(e){if(this.t0!=e.scale){this.Tca();var b=this.t0;this.t0=e.scale;this.o(new p(g.mr,{zoomDelta:this.hc*this.t0/b-this.hc}))}};g.prototype.Uja=function(e){e.delta!=0&&(this.Tca(),this.o(new p(g.mr,{zoomDelta:this.hc*e.SN*.1})))};g.kr="position change";g.mr="zoom change";g.Ekb="vieport navigation";g.Dkb="relative navigation";g.Ckb="relative exponential navigation";
g.Bkb="dragging";return g});define("tdv/player/view/map/control/constants/Movement",["require"],function(){return{S$:"rotateClockwise",T$:"rotateCounterClockwise",mx:"zoomIn",nx:"zoomOut",tg:"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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/view/constants/ScaleMode"),g=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(p,function(f,n){p.call(this);this.m=f;this.va=n;this.Pu=this.z2=this.ga=!1;this.dc=this.cc=.5;this.Dd=0;this.hc=1;this.nf=this.pf=100;this.ji=h.OE;this.zc=new e;this.Gb=new b;g.br()?(this.Gb.sX(d.vaa),this.zc.h8(d.waa)):(this.Gb.sX(0),this.zc.h8(1));this.Gb.bind(b.kr,this.w1a,this,!0);this.Gb.bind(b.mr,
this.uC,this,!0)});d.prototype.clear=function(){this.Gb.h(b.kr,this.Olb,this,!0);this.Gb.h(b.mr,this.uC,this,!0);this.Gb.An();this.m=this.va=this.zc=this.Gb=null};d.prototype.pl=function(f){switch(f){case c.S$:this.ld(0,0,+d.laa,0,0,0,0,0);break;case c.T$:this.ld(0,0,-d.laa,0,0,0,0,0);break;case c.mx:this.ld(0,0,0,+d.bQ,0,0,0,0);break;case c.nx:this.ld(0,0,0,-d.bQ,0,0,0,0);break;case c.tg:this.ld(0,0,0,0,0,0,0,0)}};d.prototype.setPosition=function(f,n,l,q,r,t){this.cc=f;this.dc=n;this.Dd=l;this.hc=
q;this.pf=r;this.nf=t;this.Gb.Yc(this.Dd,this.hc,this.pf,this.nf)};d.prototype.Nf=function(){return this.ga&&this.zc.Nf()};d.prototype.Lb=function(f){this.zc.Lb(f);this.va.setPosition(this.cc+this.zc.aca,this.dc+this.zc.bca,this.Dd+this.zc.Zba,this.hc+this.zc.b_);this.cc=this.va.getX();this.dc=this.va.getY();this.Dd=this.va.fO();this.hc=this.va.Uz()};d.prototype.wX=function(f){this.Pu=f;this.Gb.hhb(!this.Pu)};d.prototype.Ua=function(f){(this.ga=f)?this.Gb.Mt(this.m.getParent()):this.Gb.An()};d.prototype.w1a=
function(f){this.ld(0,0,0,0,f.data.xDelta,f.data.yDelta,0,0)};d.prototype.uC=function(f){this.ld(0,0,0,0,0,0,0,f.data.zoomDelta)};d.prototype.ld=function(f,n,l,q,r,t,u,v){this.zc.WNa(f,n,l,q,r,t,u,v);this.Ti()};d.prototype.Ti=function(){this.o(new k(d.zi))};d.zi="position change request";d.vaa=7;d.waa=.2;d.bQ=.5;d.laa=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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/view/util/Ease"),
g=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(p,function(n,l){p.call(this);this.m=n;this.va=l;this.ga=!1;this.dc=this.cc=.5;this.Dd=0;this.hc=1;this.nf=this.pf=100;this.ja=null;this.Mca=!0;this.qd=null;this.S1=0;this.wv=this.$l=this.jz=void 0;this.zc=new b;this.Gb=new c;
e.br()?(this.Gb.sX(f.vaa),this.zc.h8(f.waa)):(this.Gb.sX(0),this.zc.h8(1));this.Gb.bind(c.mr,this.uC,this,!0)});f.prototype.Rgb=function(n,l){this.pf=n;this.nf=l;this.kN()};f.prototype.AA=function(n){this.qd!=n&&(this.qd=n,this.S1=void 0,this.kN())};f.prototype.Yq=function(n,l){this.qd==n&&(this.S1=l,this.kN())};f.prototype.kN=function(){if(this.qd&&this.S1!=void 0){var n=this.qd.get("x",0)/this.pf;var l=this.qd.get("y",0)/this.nf;var q=-(this.S1+this.qd.get("angle",0))}else q=l=n=void 0;this.wv!=
q&&(this.wv=q,this.Ti());if(this.jz!=n||this.$l!=l)this.jz=n,this.$l=l,this.L_a(),this.Ti()};f.prototype.L_a=function(){this.Mca=!0;this.Ti()};f.prototype.XH=function(){if(this.Mca||this.ja&&this.ja.Qe())if(this.Mca=!1,this.ja=null,this.jz!=void 0&&this.$l!=void 0&&this.wv!=void 0){for(var n=this.wv-this.Dd;n>180;)n-=360;for(;n<-180;)n+=360;this.cc!=this.jz||this.dc!=this.$l?this.ja=new h("quad_in_out",[new g("x",this.cc,this.jz,1),new g("y",this.dc,this.$l,1),new g("angleDif",n,n,360)],500):this.wv!=
this.Dd&&(this.ja=new h("quad_in_out",[new g("x",this.cc,this.cc,1),new g("y",this.dc,this.dc,1),new g("angleDif",n,0,360)],500))}};f.prototype.clear=function(){this.Gb.h(c.mr,this.uC,this,!0);this.Gb.An();this.m=this.va=this.ja=this.zc=this.Gb=null};f.prototype.pl=function(n){switch(n){case d.mx:this.ld(+f.bQ,0);break;case d.nx:this.ld(-f.bQ,0);break;case d.tg:this.ld(0,0)}};f.prototype.setPosition=function(n,l,q,r,t,u){this.cc=n;this.dc=l;this.Dd=q;this.hc=r;this.Gb.Yc(this.Dd,this.hc,t,u)};f.prototype.Nf=
function(){return this.ga&&(this.ja||this.zc.Nf()||this.jz!=void 0&&this.cc!=this.jz||this.$l!=void 0&&this.dc!=this.$l||this.wv!=void 0&&this.Dd!=this.wv)?!0:!1};f.prototype.Lb=function(n){this.XH();this.ja?(this.ja.Lb(n),this.cc=this.ja.ib("x"),this.dc=this.ja.ib("y"),this.Dd=this.wv-this.ja.ib("angleDif")):(this.jz!=void 0&&(this.cc=this.jz),this.$l!=void 0&&(this.dc=this.$l),this.wv!=void 0&&(this.Dd=this.wv));this.zc.Lb(n);this.va.setPosition(this.cc,this.dc,this.Dd,this.hc+this.zc.b_);this.cc=
this.va.getX();this.dc=this.va.getY();this.Dd=this.va.fO();this.hc=this.va.Uz()};f.prototype.Ua=function(n){(this.ga=n)?(this.Gb.Mt(this.m.getParent()),this.kN()):this.Gb.An()};f.prototype.uC=function(n){this.ld(0,n.data.zoomDelta)};f.prototype.ld=function(n,l){this.zc.WNa(0,0,0,n,0,0,0,l);this.Ti()};f.prototype.Ti=function(){this.o(new k(f.zi))};f.zi="position change request";f.vaa=7;f.waa=.2;f.bQ=.5;f.laa=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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/map/constants/MovementMode"),
g=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(p,function(n){p.call(this);this.m=n;this.m.bind(d.Yb,this.jd,this);this.Po=h.OE;this.qd=null;this.dc=this.cc=.5;this.Dd=0;this.hc=1;this.ab=null;this.P2=this.O2=this.Dv=this.Cv=!1;this.cp=!0;this.ga=!1;this.va=new e;this.va.Ot(this.Po);
this.oc=new b(this.m,this.va);this.oc.bind(b.zi,this.ns,this,!0);this.Gj=new c(this.m,this.va);this.Gj.bind(c.zi,this.ns,this,!0);this.B2()});f.prototype.clear=function(){this.oc.h(b.zi,this.ns,this);this.oc.clear();this.oc=null;this.Gj.h(c.zi,this.ns,this);this.Gj.clear();this.ab=this.va=this.Gj=null;this.m.h(d.Yb,this.jd,this);this.m=null};f.prototype.stop=function(){this.Ce=this.ab=null;this.ga=!1;this.oc.Ua(!1);this.Gj.Ua(!1);this.bz(0,0,0)};f.prototype.start=function(n){var l=n.ab,q=l.get("width",
100),r=l.get("height",100),t=l.get("scaleMode",g.ej),u=l.get("minimumZoomFactor",1),v=l.get("maximumZoomFactor",1),w=l.get("initialZoomFactor",1);this.ab=l;this.ga=!0;this.Ce=n.getItem();this.bz(0,0,0);this.Gj.Rgb(q,r);this.va.setConfiguration(q,r,t,u,v);this.va.setPosition(.5,.5,0,w);this.m.Zoa(this.Ce,this.va.getX(),this.va.getY(),this.va.fO(),this.va.Uz());this.B2()};f.prototype.pl=function(n){this.oc.pl(n);this.Gj.pl(n)};f.prototype.Ot=function(n){this.Po!=n&&(this.Po=n,this.va.Ot(n),this.B2())};
f.prototype.AA=function(n){this.qd!=n&&(this.qd=n,this.Gj.AA(n),this.B2())};f.prototype.wX=function(n){this.oc&&this.oc.wX(n)};f.prototype.Yq=function(n,l,q,r){this.Gj.Yq(n,l,q,r)};f.prototype.rA=function(n){this.ga&&(this.Gj.Nf()?(this.Gj.Lb(n),this.pn(this.Gj.cc,this.Gj.dc,this.Gj.Dd,this.Gj.hc),this.Sa()):this.oc.Nf()?(this.oc.Lb(n),this.pn(this.oc.cc,this.oc.dc,this.oc.Dd,this.oc.hc),this.Sa()):this.bz(0,0,0))};f.prototype.xe=function(){if(this.Ce){var n=this.m.V5(this.Ce),l=this.m.W5(this.Ce),
q=this.m.U5(this.Ce),r=this.m.zbb(this.Ce),t=this.m.T5(this.Ce),u=this.m.S5(this.Ce),v=n-this.cc,w=l-this.dc,y=r-this.hc;this.cc=n;this.dc=l;this.Dd=q;this.hc=r;this.bz(v,w,y);this.Gj.setPosition(n,l,q,r,t,u);this.oc.setPosition(n,l,q,r,t,u)}};f.prototype.B2=function(){this.Po==h.Y$&&this.qd!=null&&this.qd.get("map")==this.ab?(this.oc.Ua(!1),this.Gj.Ua(!0)):(this.oc.Ua(!0),this.Gj.Ua(!1))};f.prototype.ns=function(){this.Sa()};f.prototype.jd=function(){this.va.setSize(this.m.cb(),this.m.Kb());this.Sa()};
f.prototype.Sa=function(){this.o(new k(f.nc))};f.prototype.pn=function(n,l,q,r){this.m.Zoa(this.Ce,n,l,q,r)};f.prototype.bz=function(n,l,q){n=!1;this.Dv!=q<0&&(this.Dv=!this.Dv,n=!0);this.Cv!=q>0&&(this.Cv=!this.Cv,n=!0);this.O2!=this.GF>0&&(this.O2=!this.O2,n=!0);this.P2!=this.GF<0&&(this.P2=!this.P2,n=!0);this.cp!=(q==0)&&(this.cp=!this.cp,n=!0);n&&this.o(new k(f.ul,{rotatingClockwise:this.O2,rotatingCounterClockwise:this.P2,zoomingIn:this.Cv,zoomingOut:this.Dv,stopped:this.cp}))};f.nc="request frame";
f.ul="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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/view/constants/ScaleMode"),g=a("tdv/player/view/map/control/camera/LimitsManager"),e=m.extend(p,function(b,c){p.call(this);this.R=b;this.m=c;this.va=new g;this.qh=[];this.Na=e.Di;this.Sr=this.Nk=
this.Pm=null;this.Uf=this.R.get("transitionDuration");this.un=void 0});e.prototype.Ot=function(b){this.va.Ot(b)};e.prototype.xV=function(b){b.nW()&&this.Aba();this.qh.push(b);this.B1()};e.prototype.Pe=function(){this.Aba();this.qh.push(null);this.B1()};e.prototype.clear=function(){this.Na=e.Di;this.Aba();this.b3a();this.uha();this.m=null};e.prototype.xe=function(b){this.Na==e.Di||this.Na!=e.ij&&this.Na!=e.vu||(this.un+=b,b=Math.min(1,this.un/this.Uf),this.Na==e.ij?this.m.xA(this.Sr,b):this.m.xA(this.g_,
1-b),this.un<this.Uf?this.Sa():this.Na==e.ij?this.Sca():this.EXa())};e.prototype.B1=function(){if(this.Na==e.Di){for(;this.qh.length>0&&this.$Ta(this.qh[0],this.Nk);)this.qh.shift();this.qh.length>0&&this.Kr()}};e.prototype.$Ta=function(b,c){return b==c||!!b&&!!c&&b.isEqual(c)};e.prototype.Kr=function(){!this.Nk||this.qh[0]&&!this.qh[0].nW()||this.Nk.ab==(this.qh[0]&&this.qh[0].ab)||this.o(new k(e.SE,{map:this.Nk.ab}));this.R.get("transitionMode","blending")!="fade_out_fade_in"||!this.Nk||this.qh[0]&&
!this.qh[0].nW()?(this.Sr=(this.Pm=this.qh.shift())&&this.Pm.getItem(),this.Pm?this.LF():this.Nk&&this.yB()):this.yB()};e.prototype.LF=function(){this.wTa();this.Pm.nW()&&this.$3a();this.un=0;this.Na=e.ij;this.Sa()};e.prototype.Sca=function(){this.uha();this.Nk=this.Pm;this.g_=this.Sr;this.Sr=this.Pm=null;this.VB()};e.prototype.yB=function(){this.un=0;this.Na=e.vu;this.Sa()};e.prototype.EXa=function(){this.uha();this.Nk=null;this.VB()};e.prototype.VB=function(){this.Na=e.Di;this.Nk&&this.Nk.nW()&&
this.o(new k(e.TE,{map:this.Nk.ab}));this.qh.length==0?this.Nk?this.o(new k(e.e$,{level:this.Nk})):this.o(new k(e.P9)):this.Kr()};e.prototype.$3a=function(){var b=this.Pm.ab;this.Pm.rk();this.va.setConfiguration(b.get("width",100),b.get("height",100),b.get("scaleMode",h.ej),b.get("minimumZoomFactor",1),b.get("maximumZoomFactor",1));this.va.setPosition(.5,.5,0,b.get("initialZoomFactor",1));this.m.Zoa(this.Sr,this.va.getX(),this.va.getY(),this.va.fO(),this.va.Uz())};e.prototype.Sa=function(){this.o(new k(e.nc))};
e.prototype.Aba=function(){for(;this.qh.length>0;){var b=this.qh.shift();b&&this.m.Zn(b.getItem())}};e.prototype.wTa=function(){this.Pm&&(this.m.b9a(this.Sr),this.m.E9a(this.Sr),this.m.xA(this.Sr,0),this.o(new k(e.d$,{level:this.Pm})))};e.prototype.uha=function(){this.Nk&&(this.m.removeItem(this.g_),this.o(new k(e.EY,{level:this.Nk})),this.m.Zn(this.g_),this.g_=this.Nk=null)};e.prototype.b3a=function(){this.Pm&&(this.m.removeItem(this.Sr),this.o(new k(e.EY,{level:this.Pm})),this.m.Zn(this.Sr),this.Sr=
this.Pm=null)};e.Di="stopped";e.ij="blending";e.vu="disolving";e.nc="request frame";e.d$="level added";e.EY="level removed";e.e$="level fully displayed";e.P9="all pending maps hidden";e.TE="map show";e.SE="map hide";return e});
define("tdv/player/view/map/control/Level",["require"],function(){function a(m,k){this.ab=m;this.gb=m.get("image");this.Lf=k;this.Dea=void 0}a.prototype.getItem=function(){switch(this.Lf){case a.UY:return this.ab.yIa();default:return this.ab.Iq()}};a.prototype.rk=function(){switch(this.Lf){case a.UY:return this.ab.JI();default:return this.ab.nt()}};a.prototype.nW=function(){return this.Dea===void 0?this.getIndex()==0:this.Dea};a.prototype.Egb=function(m){this.Dea=m};a.prototype.oW=function(){return this.Lf==
a.lra};a.prototype.isEqual=function(m){return m&&this.ab==m.map&&this.Lf==m.type};a.prototype.getIndex=function(){return this.Lf==a.UY||this.ab.mO()?0:1};a.prototype.THa=function(){return this.ab.mO()?2:1};a.UY="preload";a.lra="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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/map/control/Level"),b=a("tdv/player/view/util/Device"),c=m.extend(g,function(d){g.call(this);
this.m=d;this.qh=[];this.JQ=this.XG=this.Eh=null;this.PG=!1;this.u0=null;this.m1=m.Qq(this.m1,this)});c.prototype.clear=function(){this.stop();this.m=null};c.prototype.nKa=function(d,f){if(this.u0!=d||f)this.stop(),this.ab=d,this.ab.Kfb(),k.fD(this.ab,"image.levels.url",this.m1),f=[],d.mO()&&b.yb()&&f.push(new e(d,e.UY)),f.push(new e(d,e.lra)),f=f.filter(function(n){return n.getItem().hl()}),f.length&&(this.qh=this.qh.concat(f),this.B1())};c.prototype.m1=function(){this.reload()};c.prototype.reload=
function(){this.nKa(this.ab,!0)};c.prototype.stop=function(){k.ca(this.ab,"image.levels.url",this.m1);this.u0=this.ab=null;this.qh=[];this.gDa();this.PG&&(this.PG=!1,this.hja(),this.m.Zn(this.Eh.getItem()),this.Eh=null,this.o(new h(c.FY)))};c.prototype.B1=function(){this.PG||this.kfa()};c.prototype.kfa=function(){this.qh.length>0?(this.Eh=this.qh.shift(),this.PG||(this.PG=!0,this.o(new h(c.DY,{level:this.Eh,percent:0}))),this.KUa(),this.m.Zz(this.Eh.getItem()),this.m.Rpa(this.Eh.getItem())&&this.Qfa()):
this.PG&&(this.PG=!1,this.o(new h(c.FY)))};c.prototype.Qfa=function(){this.hja();this.K5a();this.Eh=null;this.kfa()};c.prototype.K5a=function(){this.gDa();this.XG=this.Eh;var d=this;this.JQ=setTimeout(function(){d.JQ=null;d.f1a()},500)};c.prototype.f1a=function(){var d=this.XG.ab;this.XG.Egb(d!=this.u0);this.u0=d;this.o(new h(c.f$,{level:this.XG}));this.XG=null};c.prototype.gDa=function(){this.JQ!=null&&(clearTimeout(this.JQ),this.JQ=null,this.m.Zn(this.XG.getItem()),this.XG=null)};c.prototype.Tya=
function(){this.hja();this.Eh=null;this.kfa()};c.prototype.Uya=function(d){this.o(new h(c.DY,{level:this.Eh,percent:d.percent}))};c.prototype.KUa=function(){var d=this.Eh.getItem();d.bind(p.ha,this.Qfa,this);d.bind(p.$c,this.Tya,this);d.bind(p.wc,this.Uya,this)};c.prototype.hja=function(){var d=this.Eh.getItem();d.h(p.ha,this.Qfa,this);d.h(p.$c,this.Tya,this);d.h(p.wc,this.Uya,this)};c.DY="level loading progress";c.f$="level loaded";c.FY="load stopped";return c});
define("tdv/player/view/map/control/overlays/Point",["require"],function(){function a(m,k){this.x=m;this.y=k}a.prototype.rotate=function(m){var k=Math.cos(m);m=Math.sin(m);var p=this.x*m+this.y*k;this.x=this.x*k-this.y*m;this.y=p;return this};a.prototype.translate=function(m,k){this.x+=m;this.y+=k;return this};a.prototype.scale=function(m,k){this.x*=m;this.y*=k;return this};return a});
define("tdv/view/images/ScalableImage",["require","tdv/view/constants/ScaleMode","tdv/view/constants/Alignment"],function(a){function m(h,g,e){this.Xg=h;this.WCa=g;this.UCa=e;this.ji=k.ZA;this.bC=p.Xe;this.eD=p.Pd}var k=a("tdv/view/constants/ScaleMode"),p=a("tdv/view/constants/Alignment");m.prototype.eP=function(h){this.ji=h};m.prototype.cP=function(h){this.bC=h};m.prototype.iP=function(h){this.eD=h};m.prototype.VN=function(h,g,e){var b=this.WCa,c=this.UCa,d;switch(this.ji){case k.NONE:var f=d=1;
break;case k.ej:d=f=Math.min(g/b,e/c);break;case k.nr:d=f=Math.max(g/b,e/c);break;case k.Ep:d=f=g/b;break;case k.Hk:d=f=e/c;break;default:d=g/b,f=e/c}var n=Math.min(this.WCa*d,g);d=Math.min(g/d,b);switch(this.bC){case p.$a:b=g=0;break;case p.Cb:g-=n;b-=d;break;default:g=(g-n)*.5,b=(b-d)*.5}var l=Math.min(this.UCa*f,e);f=Math.min(e/f,c);switch(this.eD){case p.Tc:c=e=0;break;case p.Fc:e-=l;c-=f;break;default:e=(e-l)*.5,c=(c-f)*.5}h.drawImage(this.Xg,Math.round(b),Math.round(c),Math.round(d+b-Math.round(b)),
Math.round(f+c-Math.round(c)),Math.round(g),Math.round(e),Math.round(n+g-Math.round(g)),Math.round(l+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.m=b;this.ab=c;this.pf=this.ab.get("width");this.nf=this.ab.get("height");this.Ce=this.ab.Iq();this.Xwa=d;this.Sp=f;this.DG=null;if(this.Sp){if(this.IM=this.Xwa.IM,this.Pa=this.Sp.get("width"),this.Ga=this.Sp.get("height"),
this.cc=this.Sp.get("x",0),this.dc=this.Sp.get("y",0),this.Jfa=this.Sp.get("offsetX",0),this.Kfa=this.Sp.get("offsetY",0),this.pb=this.Sp.nt())this.dC=new g(p.Fp),this.dC.load(this.pb.get("url")),this.dC.bind(k.ha,this.zza,this)}else this.dC=null}var k=a("tdv/constants/EventName"),p=a("tdv/constants/Priority"),h=a("tdv/player/view/map/control/overlays/Point"),g=a("tdv/view/images/ImageLoader"),e=a("tdv/view/images/ScalableImage");m.prototype.clear=function(){this.Sp=this.Xwa=this.Ce=this.ab=this.m=
null;this.dC&&(this.dC.h(k.ha,this.zza,this),this.dC.cancel(),this.dC=null);this.DG=null};m.prototype.mIa=function(b,c){this.Ywa=void 0;if(this.DG&&b!=void 0&&c!=void 0){var d=this.m.cb()*.5,f=this.m.Kb()*.5,n=this.m.U5(this.Ce)*Math.PI/180,l=this.m.T5(this.Ce),q=this.m.S5(this.Ce),r=this.m.V5(this.Ce),t=this.m.W5(this.Ce);b=new h(b,c);b.translate(-d,-f);b.rotate(-n);b.scale(1/l,1/q);b.translate(r,t);b.scale(this.pf,this.nf);b.translate(-this.cc,-this.dc);this.IM||(b.rotate(n),b.scale(l/this.pf,q/
this.nf));b.translate(this.Jfa,this.Kfa);d=Math.round(b.x);f=Math.round(b.y);d>=0&&d<this.DG.width&&f>=0&&f<this.DG.height&&(d=(this.DG.width*f+d)*4,f=this.DG.data,this.Ywa=f[d+3]>0?"#"+this.mba(f[d+0])+this.mba(f[d+1])+this.mba(f[d+2]):"transparent")}return this.Ywa};m.prototype.zza=function(){var b=new e(this.dC.qg(),this.pb.get("width"),this.pb.get("height"));b.eP(this.Sp.get("scaleMode"));b.cP(this.Sp.get("horizontalAlign"));b.iP(this.Sp.get("verticalAlign"));var c=document.createElement("canvas");
c.width=Math.round(this.Pa);c.height=Math.round(this.Ga);var d=c.getContext("2d");b.VN(d,c.width,c.height);this.DG=d.getImageData(0,0,c.width,c.height);c.width=c.height=0};m.prototype.mba=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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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"),n=m.extend(h,function(l,q,r){h.call(this);this.m=l;this.ab=q;this.Bc=r;this.Ia=this.Bc.getItem();this.Gs=this.Bc.CIa();this.Is=this.Bc.GIa();this.ny=this.Io=void 0;this.R=this.m.getParent();this.R.bind(k.mb,this.lg,this);this.R.bind(k.Db,this.DS,this);this.R.bind(k.Ra,this.Zp,this);this.R.bind(k.bb,
this.Ey,this);this.R.bind(k.oa,this.Dy,this);r.bind(k.K("selected"),this.oAa,this);r.bind(k.K("enabled"),this.js,this);this.B0=new b(this.m,this.ab,this.Bc,this.Bc.get("map",null));this.D0=new b(this.m,this.ab,this.Bc,this.Bc.get("rollOverMap",this.Bc.get("map",null)));this.E0=new b(this.m,this.ab,this.Bc,this.Bc.get("selectedMap",this.Bc.get("rollOverMap",this.Bc.get("map",null))));this.T_=new b(this.m,this.ab,this.Bc,this.Bc.get("image",null));this.U_=new b(this.m,this.ab,this.Bc,this.Bc.get("rollOverImage",
this.Bc.get("image",null)));this.V_=new b(this.m,this.ab,this.Bc,this.Bc.get("selectedImage",this.Bc.get("rollOverImage",this.Bc.get("image",null))));this.yd=this.xd=void 0;this.hN=null;this.wx=[];this.yu=[];this.wQ=[];this.Ei={};this.Rxa=[];this.gy=!1;this.Xja=this.Bc.get("useHandCursor");this.ja=null;this.YM=void 0;this.Z2=this.M2=this.l0=0;l=this.Bc.get("areas",[]);for(q=0;q<l.length;q++){r=l[q];var t=r.get("mapColor");t&&(t=t.toLowerCase(),this.Ei[t]===void 0&&(this.Ei[t]=[],this.Rxa.push(t)),
this.Ei[t].push(r))}this.Ia&&(this.m.C4(this.ab.Iq(),this.Ia),this.m.xA(this.Ia,this.l0));this.Gs&&(this.m.C4(this.ab.Iq(),this.Gs),this.m.xA(this.Gs,this.M2));this.Is&&(this.m.C4(this.ab.Iq(),this.Is),this.m.xA(this.Is,this.Z2));this.ST("none");this.uja();this.qCa(!1);this.rCa(this.Bc.get("selected"))});n.prototype.clear=function(){this.R.h(k.mb,this.lg,this);this.R.h(k.Db,this.DS,this);this.R.h(k.Ra,this.Zp,this);this.R.h(k.bb,this.Ey,this);this.R.h(k.oa,this.Dy,this);this.R=null;this.B0&&this.B0.clear();
this.B0=null;this.D0&&this.D0.clear();this.D0=null;this.E0&&this.E0.clear();this.E0=null;this.T_&&this.T_.clear();this.T_=null;this.U_&&this.U_.clear();this.U_=null;this.V_&&this.V_.clear();this.V_=null;this.wx=[];this.Io=!1;this.uja();this.yu=[];this.wQ=[];this.Ei={};this.lDa();this.IU();this.ab=this.m=null;this.Bc.h(k.K("selected"),this.oAa,this);this.Is=this.Gs=this.Ia=this.Bc=null};n.prototype.match=function(l){return this.Bc==l};n.prototype.xe=function(l){this.EL(!1);this.ja&&(this.ja.Lb(l),
this.l0=this.ja.ib("itemAlpha"),this.M2=this.ja.ib("rollOverItemAlpha"),this.Z2=this.ja.ib("selectedItemAlpha"),this.Ia&&this.m.xA(this.Ia,this.l0),this.Gs&&this.m.xA(this.Gs,this.M2),this.Is&&this.m.xA(this.Is,this.Z2),this.ja.Qe()?this.ja=null:this.Sa())};n.prototype.Zp=function(l){this.xd=l.x-this.R.u.Bd;this.yd=l.y-this.R.u.ge;this.EL(!0);this.yu=this.wx.slice()};n.prototype.lg=function(l){this.xd=l.x-this.R.u.Bd;this.yd=l.y-this.R.u.ge;this.EL(!0)};n.prototype.Ey=function(l){this.xd=l.x-this.R.u.Bd;
this.yd=l.y-this.R.u.ge;this.EL(!0);this.wQ=m.intersection(this.yu,this.wx);this.yu=[]};n.prototype.Dy=function(){this.wQ&&(this.Zia(this.wQ,"click"),this.wQ=[])};n.prototype.DS=function(){this.yd=this.xd=void 0;this.EL(!0);this.yu=this.wx.slice()};n.prototype.oAa=function(){this.rCa(this.Bc.get("selected"))};n.prototype.js=function(){this.EL(!0);this.$g();this.Sa()};n.prototype.EL=function(l){this.mxa=!0;l?this.gN():this.d0a()||this.e6a()};n.prototype.e6a=function(){this.lDa();var l=this;this.hN=
setTimeout(function(){l.hN=null;l.gN()},200)};n.prototype.d0a=function(){return this.hN?!0:!1};n.prototype.lDa=function(){this.hN&&(clearTimeout(this.hN),this.hN=null)};n.prototype.gN=function(){if(this.mxa){this.mxa=!1;var l=this.wx,q=this.vYa();this.wx=q;e.br()||(this.Zia(m.difference(q,l),"rollOver"),this.qCa(q.length>0),this.Zia(m.difference(l,q),"rollOut"),this.IU())}};n.prototype.IU=function(){for(var l="",q=0;q<this.wx.length&&!l;q++){var r=this.wx[q];r.get("toolTip")&&(l=r.get("toolTip"))}this.fc!=
l&&(this.fc&&this.m.cfb(this.fc),(this.fc=l)&&this.m.ifb(this.fc))};n.prototype.uja=function(){var l=this.Io&&(this.Xja!==!1||this.wx.some(q=>q.get("useHandCursor")===!0));this.gy!=l&&((this.gy=l)?this.m.V7(c.hf):this.m.TO(c.hf))};n.prototype.vYa=function(){if(this.Bc.get("enabled")===!1)return[];var l=[],q=this.ny?this.E0:this.Io?this.D0:this.B0;q&&(q=q.mIa(this.xd,this.yd))&&(this.Ei.any&&(l=l.concat(this.Ei.any)),q=="transparent"&&this.Ei.transparent&&(l=l.concat(this.Ei.transparent)),q!="transparent"&&
(l=this.Ei[q]?l.concat(this.Ei[q]):l.concat(this.Ei[g.Ufb(q,this.Rxa)]||[]),this.Ei.image&&(l=l.concat(this.Ei.image))));if(q=this.ny?this.V_:this.Io?this.U_:this.T_)if(q=q.mIa(this.xd,this.yd))this.Ei.any&&(l=l.concat(this.Ei.any)),q=="transparent"&&this.Ei.transparent&&(l=l.concat(this.Ei.transparent)),q!="transparent"&&this.Ei.image&&(l=l.concat(this.Ei.image));q=[];for(var r=0;r<l.length;r++){var t=l[r];q.indexOf(t)<0&&q.push(t)}return q};n.prototype.Zia=function(l,q){if(l)for(var r=0;r<l.length;r++)l[r].o(new p(q))};
n.prototype.Nq=function(){return this.Io};n.prototype.qCa=function(l){this.Io!=l&&(this.Io=l,this.o(new p(n.Z9)),this.$g(),this.uja(),this.Sa())};n.prototype.rCa=function(l){this.ny!=l&&(this.ny=l,this.$g(),this.Sa())};n.prototype.$g=function(){!this.Io&&this.Bc.get("rollOverDisplay")==1||this.Bc.get("enabled")===!1?this.ST("none"):this.ny?this.ST("selected"):this.Io?this.ST("roll over"):this.ST("visible")};n.prototype.ST=function(l){if(this.YM!=l){this.YM=l;var q;if(["selected"].includes(this.YM)&&
this.Is){var r=1;l=q=0}else["selected","roll over"].includes(this.YM)&&this.Gs?(q=1,l=r=0):["selected","roll over","visible"].includes(this.YM)?(l=1,r=q=0):l=r=q=0;var t=this.l0,u=this.M2,v=this.Z2,w=Math.max(200*Math.abs(l-t),200*Math.abs(q-u),200*Math.abs(r-v));this.ja=new d(this.YM=="none"?"quad_out":"quad_in",[new f("itemAlpha",t,l),new f("rollOverItemAlpha",u,q),new f("selectedItemAlpha",v,r)],w)}};n.prototype.Sa=function(){this.o(new p(n.nc))};n.nc="request frame";n.Z9="is over update";return n});
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"),k=a("tdv/player/view/map/renderer/item/Overlay");a=m.extend(k,function(p,h,g,e,b,c,d){k.call(this,k.qsa,p,h);this.B_a=g;this.C_a=e;this.m2a=b;this.n2a=c;this.Vc=d;this.KU=[]});a.prototype.Tz=function(){return this.Vc};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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/map/control/overlays/Point"),e=a("tdv/player/view/map/renderer/item/FovOverlay"),b=m.extend(h,function(c,
d,f){h.call(this);this.m=c;this.R=this.m.getParent();this.R.bind(k.Ra,this.Zp,this,!0);this.R.bind(k.mb,this.lg,this,!0);this.R.bind(k.sr,this.DS,this,!0);this.ab=d;this.pf=this.ab.get("width");this.nf=this.ab.get("height");this.T2a=Math.sqrt(this.pf*this.pf+this.nf*this.nf)*this.ab.get("fieldOfViewOverlayRadiusScale",1);this.Ce=this.ab.Iq();this.qd=f;this.nM=this.qd.get("x",0);this.oM=this.qd.get("y",0);this.R1=this.qd.get("angle",0);this.Ia=this.FWa();this.Pu=!1;this.Fa=0;this.fb=Math.PI*.5;this.re=
!1;this.yd=this.xd=void 0;this.m.C4(this.ab.Iq(),this.Ia)});b.prototype.ZNa=function(c,d){this.Fa=c+this.R1-90;this.fb=d;this.Sa()};b.prototype.clear=function(){this.R.h(k.Ra,this.Zp,this);this.R.h(k.mb,this.lg,this);this.R.h(k.sr,this.DS,this);this.R=null;this.m.rfb(this.ab.Iq(),this.Ia);this.Ia=this.qd=this.Ce=this.ab=this.m=null};b.prototype.xe=function(){this.m.Igb(this.Ia,this.Fa,this.fb)};b.prototype.FWa=function(){return new e(this.nM,this.oM,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.Sa=function(){this.o(new p(b.nc))};b.prototype.yja=function(){var c=!1;if(this.xd!=void 0&&this.yd!=void 0){var d=this.m.cb()*.5,f=this.m.Kb()*.5,n=this.m.U5(this.Ce)*Math.PI/180,l=this.m.T5(this.Ce),q=this.m.S5(this.Ce),r=this.m.V5(this.Ce),t=this.m.W5(this.Ce);c=new g(this.xd,this.yd);
c.translate(-d,-f);c.rotate(-n);c.scale(1/l,1/q);c.translate(r,t);c.scale(this.pf,this.nf);c.translate(-this.nM,-this.oM);c.rotate(-this.Fa*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.T2a&&Math.abs(d)<this.fb*.5}this.Pu!=c&&(this.Pu=c,this.o(new p(b.I$,{inFOV:this.Pu})))};b.prototype.Ycb=function(){return this.Pu};b.prototype.Zp=function(c){this.xd=c.x;this.yd=c.y;this.re=!0;this.yja()};b.prototype.lg=function(c){this.re||(this.xd=c.x,
this.yd=c.y,this.yja())};b.prototype.DS=function(){this.yd=this.xd=void 0;this.re=!1;this.yja()};b.nc="request frame";b.I$="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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/player/script/HotspotMapOverlay"),g=a("tdv/player/view/map/control/overlays/HotspotMapOverlayController"),e=a("tdv/player/view/map/control/overlays/FovOverlayController"),
b=m.extend(p,function(c){p.call(this);this.m=c;this.SR=[];this.jy=[];this.Do=[];this.Wo=this.qd=null});b.prototype.clear=function(){for(var c=0;c<this.jy.length;c++)this.jy[c].clear();for(c=0;c<this.Do.length;c++)this.Do[c].clear();this.m=this.SR=this.qd=this.Do=this.jy=null};b.prototype.xV=function(c){c.oW()&&this.ITa(c.ab)};b.prototype.sma=function(c){c.oW()&&this.l3a(c.ab)};b.prototype.AA=function(c){this.qd!=c&&(this.qd&&this.xha(this.qd.get("map")),this.qd=c,this.Wo=null,this.qd&&(c=this.qd.get("map"),
this.Gea(c)&&this.ita(c)))};b.prototype.Yq=function(c,d,f,n){this.Wo={yaw:d,pitch:f,hfov:n};for(f=0;f<this.Do.length;f++){var l=this.Do[f];if(l.qd==c){l.ZNa(d,n);break}}};b.prototype.ITa=function(c){this.Gea(c)&&(this.yBa(c),this.xha(c));this.SR.push(c);this.ATa(c);this.ita(c)};b.prototype.l3a=function(c){var d=this.SR.indexOf(c);d>=0&&this.SR.splice(d,1);this.Gea(c)||(this.yBa(c),this.xha(c))};b.prototype.Gea=function(c){return this.SR.includes(c)};b.prototype.xe=function(c){for(var d=0;d<this.jy.length;d++)this.jy[d].xe(c);
for(d=0;d<this.Do.length;d++)this.Do[d].xe(c)};b.prototype.ATa=function(c){for(var d=c.get("overlays",[]),f=0;f<d.length;f++){var n=d[f];n instanceof h&&(n=new g(this.m,c,n),n.bind(g.nc,this.Sa,this,!0),n.bind(g.Z9,this.vxa,this,!0),this.jy.push(n))}};b.prototype.ita=function(c){this.qd&&this.qd.get("map")==c&&this.qd.get("visible")!==!1&&(c=new e(this.m,c,this.qd),c.bind(e.nc,this.Sa,this,!0),c.bind(e.I$,this.g1,this,!0),this.Do.push(c),this.Wo&&c.ZNa(this.Wo.yaw,this.Wo.hfov));this.g1()};b.prototype.yBa=
function(c){c=c.get("overlays",[]);for(var d=0;d<c.length;d++)for(var f=c[d],n=0;n<this.jy.length;n++){var l=this.jy[n];if(l.match(f)){l.h(g.nc,this.Sa,this);l.h(g.Z9,this.vxa,this);l.clear();this.jy.splice(n,1);break}}};b.prototype.xha=function(c){for(var d=0;d<this.Do.length;d++){var f=this.Do[d];if(f.ab==c){f.h(e.nc,this.Sa,this);f.h(e.I$,this.g1,this);f.clear();this.Do.splice(d,1);break}}this.g1()};b.prototype.vxa=function(){};b.prototype.Sa=function(){this.o(new k(b.nc))};b.prototype.g1=function(){for(var c=
!1,d=0;d<this.Do.length;d++)this.Do[d].Ycb()&&(c=!0);this.o(new k(b.Y9,{inFOV:c}))};b.nc="request frame";b.Y9="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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/map/constants/MovementMode"),e=a("tdv/player/view/map/control/overlays/Point"),b=m.extend(h,function(c){h.call(this);
this.m=c;this.R=this.m.getParent();this.R.bind(k.mb,this.lg,this,!0);this.R.bind(k.Ra,this.Zp,this,!0);this.R.bind(k.bb,this.Ey,this,!0);this.ab=null;this.Ce=this.nf=this.pf=void 0;this.qd=null;this.R1=this.oM=this.nM=void 0;this.Pu=!1;this.yd=this.xd=this.Po=void 0;this.re=!1;this.Fa=0});b.prototype.clear=function(){this.R.h(k.mb,this.lg,this);this.R.h(k.Ra,this.Zp,this);this.R.h(k.bb,this.Ey,this);this.m=this.qd=this.Ce=this.ab=this.R=null};b.prototype.wX=function(c){this.Pu=c;this.qja()};b.prototype.xV=
function(c){c.oW()&&this.uCa(c.ab)};b.prototype.sma=function(c){c.oW()&&this.ab==c.ab&&this.uCa(null)};b.prototype.uCa=function(c){this.ab!=c&&((this.ab=c)?(this.pf=this.ab.get("width"),this.nf=this.ab.get("height"),this.Ce=this.ab.Iq()):(this.nf=this.pf=void 0,this.Ce=null))};b.prototype.AA=function(c){this.qd!=c&&((this.qd=c)?(this.nM=this.qd.get("x",0),this.oM=this.qd.get("y",0),this.R1=this.qd.get("angle",0)):this.R1=this.oM=this.nM=void 0)};b.prototype.Yq=function(c,d){this.qd==c&&(this.Fa=d)};
b.prototype.Ot=function(c){this.Po=c};b.prototype.Zp=function(c){this.xd=c.x;this.yd=c.y;this.re=!0;this.qja()};b.prototype.lg=function(c){this.xd=c.x;this.yd=c.y;this.pj&&(c=this.wwa(),this.o(new p(b.dj,{yawDelta:c-this.Dd})),this.Dd=c)};b.prototype.Ey=function(c){this.xd=c.x;this.yd=c.y;this.re=!1;this.qja()};b.prototype.qja=function(){var c=this.re&&this.qd&&this.ab&&(this.Po==g.Y$||this.Pu);this.pj!=c&&(this.pj=c)&&(this.Dd=this.wwa())};b.prototype.wwa=function(){var c=this.m.cb()*.5,d=this.m.Kb()*
.5,f=new e(this.xd,this.yd);f.translate(-c,-d);if(this.Po==g.Y$)return-Math.atan2(f.y,f.x)*180/Math.PI;c=this.m.U5(this.Ce)*Math.PI/180;d=this.m.T5(this.Ce);var n=this.m.S5(this.Ce),l=this.m.V5(this.Ce),q=this.m.W5(this.Ce);f.rotate(-c);f.scale(1/d,1/n);f.translate(l,q);f.scale(this.pf,this.nf);f.translate(-this.nM,-this.oM);return Math.atan2(f.y,f.x)*180/Math.PI};b.dj="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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/view/util/Animation"),g=m.extend(p,function(e){p.call(this);this.ga=!0;this.kda=!1;this.m=e});g.prototype.clear=function(){this.ga=!1;this.m=null};g.prototype.requestFrame=function(){this.kda||(this.kda=!0,h.requestFrame(this.Xp,this))};g.prototype.Xp=
function(e){this.ga&&(this.kda=!1,this.o(new k(g.dF,{frameTime:e})),this.o(new k(g.eF,{frameTime:e})),this.m.render())};g.dF="frameStart";g.eF="positionSet";return g});
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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),
h=a("tdv/events/EventDispatcher"),g=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"),n=m.extend(h,function(l,q){h.call(this);this.R=l;this.m=q;this.m.set("visible",!1);this.X1=null;this.Wl=new f(this.m);this.Be=new b(this.m);this.Va=
new e(this.R,this.m);this.tb=new g(this.m);this.vs=new c(this.m);this.Zu=new d(this.m);this.R.bind(k.Cd,this.N1,this,!0);this.Wl.bind(f.dF,this.QS,this,!0);this.Wl.bind(f.eF,this.RS,this,!0);this.Be.bind(b.FY,this.zS,this);this.Be.bind(b.f$,this.oza,this);this.Be.bind(b.DY,this.pza,this);this.Va.bind(e.nc,this.Tf,this,!0);this.Va.bind(e.d$,this.mza,this,!0);this.Va.bind(e.EY,this.qza,this,!0);this.Va.bind(e.e$,this.nza,this,!0);this.Va.bind(e.SE,this.Ay,this,!0);this.Va.bind(e.TE,this.sC,this,!0);
this.Va.bind(e.P9,this.Aya,this,!0);this.tb.bind(g.nc,this.Tf,this,!0);this.tb.bind(g.ul,this.ks,this);this.vs.bind(c.nc,this.Tf,this,!0);this.vs.bind(c.Y9,this.cza,this,!0);this.Zu.bind(d.dj,this.SS,this,!0);this.wva=!1});n.prototype.Ot=function(l){this.tb.Ot(l);this.Va.Ot(l);this.Zu.Ot(l)};n.prototype.clear=function(){this.wva=!0;this.Be.clear();this.Wl.clear();this.tb.clear();this.Va.clear();this.vs.clear();this.Zu.clear();this.R.h(k.Cd,this.N1,this);this.Be.h(b.FY,this.zS,this);this.Be.h(b.f$,
this.oza,this);this.Be.h(b.DY,this.pza,this);this.Wl.h(f.dF,this.QS,this);this.Wl.h(f.eF,this.RS,this);this.Va.h(e.nc,this.Tf,this);this.Va.h(e.d$,this.mza,this);this.Va.h(e.EY,this.qza,this);this.Va.h(e.e$,this.nza,this);this.Va.h(e.SE,this.Ay,this);this.Va.h(e.TE,this.sC,this);this.Va.h(e.P9,this.Aya,this);this.tb.h(g.eRa,this.Tf,this);this.tb.h(g.ul,this.ks,this);this.vs.h(c.nc,this.Tf,this);this.vs.h(c.Y9,this.cza,this);this.Zu.h(d.dj,this.SS,this);this.R=this.m=this.Zu=this.vs=this.Va=this.tb=
this.Wl=this.Be=null};n.prototype.N1=function(){this.X1&&(this.SNa(this.X1),this.X1=null)};n.prototype.SNa=function(l){this.m.set("visible",!0);this.R.my?this.Be.nKa(l):(this.Be.stop(),this.tb.stop(),this.Va.Pe(),this.X1=l)};n.prototype.uA=function(){this.Be.stop();this.tb.stop();this.Va.Pe()};n.prototype.pl=function(l){this.tb.pl(l)};n.prototype.AA=function(l){this.wva||(this.tb.AA(l),this.vs.AA(l),this.Zu.AA(l))};n.prototype.Yq=function(l,q,r,t){this.tb.Yq(l,q,r,t);this.vs.Yq(l,q,r,t);this.Zu.Yq(l,
q,r,t)};n.prototype.pza=function(l){var q=l.data.level;l=(l.data.percent+100*q.getIndex())/q.THa();this.o(new p(n.Qw,{percent:l}))};n.prototype.oza=function(l){this.m.set("visible",!0);l=l.data.level;this.tb.stop();this.Va.xV(l)};n.prototype.zS=function(){this.o(new p(n.RE))};n.prototype.Tf=function(){this.Wl.requestFrame()};n.prototype.QS=function(l){this.tb.rA(l.data.frameTime)};n.prototype.RS=function(l){l=l.data.frameTime;this.Va.xe(l);this.tb.xe(l);this.vs.xe(l)};n.prototype.mza=function(l){l=
l.data.level;this.vs.xV(l);this.Zu.xV(l)};n.prototype.qza=function(l){l=l.data.level;this.vs.sma(l);this.Zu.sma(l)};n.prototype.nza=function(l){l=l.data.level;l.oW()&&this.tb.start(l)};n.prototype.Aya=function(){this.m.set("visible",!1)};n.prototype.cza=function(l){l=l.data.inFOV;this.tb.wX(l);this.Zu.wX(l)};n.prototype.sC=function(l){this.o(new p(n.TE,{map:l.data.map}))};n.prototype.Ay=function(l){this.o(new p(n.SE,{map:l.data.map}))};n.prototype.ks=function(l){this.o(new p(n.ul,l.data))};n.prototype.SS=
function(l){this.o(new p(n.dj,{yawDelta:l.data.yawDelta}))};n.ul="movementChange";n.RE="loadingEnd";n.Qw="loadingProgress";n.TE="mapShow";n.SE="mapHide";n.dj="requestYawChange";return n});define("tdv/player/view/image/RepositoryEntry",["require","tdv/constants/Priority"],function(a){function m(){this.status=m.QY;this.progress=this.zk=0;this.joa=[]}a("tdv/constants/Priority");m.LOADING="loading";m.ha="loaded";m.QY="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.yva={};this.ei=[];this.nC=[];this.Sd={}}function k(b,c){c=b.indexOf(c);c>=0&&b.splice(c,1)}var p=a("tdv/utils"),h=a("tdv/constants/EventName"),g=a("tdv/view/images/ImageLoader"),e=a("tdv/player/view/image/RepositoryEntry");m.prototype.Rpa=function(b){b=b.CD();for(var c=0,d=b.length;c<d;c++)if(this.$Q(b[c]).status!=
e.ha)return!1;return!0};m.prototype.Zz=function(b,c){this.ei.push(b);this.DTa(b,c)};m.prototype.Zn=function(b,c){var d=this.ei.indexOf(b);d<0&&p.log("Unloading item not loaded");this.ei.splice(d,1);this.i3a(b,c)};m.prototype.qg=function(b,c){return this.Sd[b].qg(c)};m.prototype.DTa=function(b,c){this.nC.push(b);b=b.CD();for(var d=0,f=b.length;d<f;d++){var n=b[d],l=this.$Q(n);l.zk++;l.joa.push(c);l.status==e.QY&&(l.status=e.LOADING,this.v0a(n,Math.min.apply(Math,l.joa)))}this.pEa()};m.prototype.i3a=
function(b,c){this.nC=this.nC.filter(r=>r!==b);for(var d=b.CD(),f=0,n=d.length;f<n;f++){var l=d[f],q=this.$Q(l);q.zk--;k(q.joa,c);q.zk==0&&q.status!=e.QY&&(q.status=e.QY,q.progress=0,this.m7a(l))}};m.prototype.pEa=function(b){b=(b==void 0?this.nC:this.uwa(b)).slice();for(var c=0;c<b.length;c++){for(var d=b[c],f=d.CD(),n=0,l=0,q=f.length,r=0;r<f.length;r++){var t=this.$Q(f[r]);n+=t.progress;t.status==e.ha&&l++}d.Qgb(n/q);l==q&&(d.AX(),this.nC=this.nC.filter(u=>u!==d))}};m.prototype.$Q=function(b){var c=
this.yva[b];c||(this.yva[b]=c=new e);return c};m.prototype.uwa=function(b){for(var c=[],d=0;d<this.nC.length;d++){var f=this.nC[d];f.CD().includes(b)&&c.push(f)}return c};m.prototype.v0a=function(b,c){c=new g(c);this.Sd[b]=c;c.bind(h.ha,this.AS,this,!0);c.bind(h.$c,this.BS,this,!0);c.load(b)};m.prototype.m7a=function(b){var c=this.Sd[b];delete this.Sd[b];c.h(h.ha,this.AS,this);c.h(h.$c,this.BS,this);c.cancel()};m.prototype.AS=function(b){b=b.source.hl();var c=this.$Q(b);c.progress=100;c.status=e.ha;
this.pEa(b)};m.prototype.BS=function(b){b=b.source.hl();for(var c=this.uwa(b),d=0;d<c.length;d++){var f=c[d];this.Zn(f);f.ogb()}p.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(k,p){this.Ia=k;this.Ha=p;this.ffa=0;this.kv=this.jv=.5;this.al=0;this.$e=1;this.Ns=this.sy=this.Ga=this.Pa=0;this.Vc=1;this.c0=this.e0=!0;this.ea=document.createElement("canvas");this.Da=this.ea.getContext("2d")}a=a("tdv/player/view/util/Device");m.prototype.getItem=function(){return this.Ia};m.prototype.EV=function(k){return this.Ia==k?this:null};m.prototype.x5=function(k){return this.Ia==
k?[this]:[]};m.prototype.mi=function(){this.Ha&&this.Ha.Mka(this)};m.prototype.zf=function(k){this.W4a(k)};m.prototype.sCa=function(k){this.ffa!=k&&(this.ffa=k,this.Ha&&this.Ha.u6())};m.prototype.W4a=function(k){this.$e!=k&&(this.$e=k,this.t6())};m.prototype.h3=function(k){this.al!=k&&(this.al=k,this.t6())};m.prototype.RT=function(k,p){if(this.Pa!=k||this.Ga!=p)this.Pa=k,this.Ga=p,this.q6()};m.prototype.pn=function(k,p){if(this.sy!=k||this.Ns!=p)this.sy=k,this.Ns=p,this.t6()};m.prototype.t6=function(){this.Ha&&
this.Ha.r6()};m.prototype.Ff=function(){this.e0=!0};m.prototype.eb=function(){this.e0&&(this.e0=!1,this.Mh())};m.prototype.Mh=function(){};m.prototype.q6=function(){this.c0=!0;this.t6()};m.prototype.xp=function(){if(this.c0){this.c0=!1;if(this.ea.width!=this.Pa||this.ea.height!=this.Ga)this.ea.width=Math.round(this.Pa),this.ea.height=Math.round(this.Ga);this.Da.clearRect(0,0,this.ea.width,this.ea.height);this.Yg()}};m.prototype.Yg=function(){};m.prototype.xab=function(k){if(this.$e>0&&this.Pa>=1&&
this.Ga>=1){k.save();var p=Math.round(this.sy),h=Math.round(this.Ns),g=Math.round(this.Pa*this.jv),e=Math.round(this.Ga*this.kv);k.scale(this.Vc,this.Vc);k.translate(p+g,h+e);k.rotate(this.al*Math.PI/180);k.globalAlpha=this.$e;k.drawImage(this.ea,-g,-e);k.restore()}};m.prototype.G5=function(){this.ea.width=this.ea.height=1;this.e0=this.c0=!0};m.mra=Math.min(window.devicePixelRatio||1,a.Od()==a.OA?2:Infinity);m.ml=m.mra;m.BRa=a.Od()==a.fj?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"),k=a("tdv/player/view/map/renderer/renderers/ItemRenderer");a=m.extend(k,function(p,h){k.call(this,p,h);this.lf=[];this.A4=null;this.rka=!0});a.prototype.lFa=function(p){p=this.Rba(p);if(!p)throw"Container renderer can't create child renderer for an item";this.lf.push(p);this.u6();this.r6()};a.prototype.Rba=function(){};
a.prototype.PMa=function(p){var h=this.Pv(p);h&&(this.lf=this.lf.filter(g=>g!==h),this.u6(),this.r6())};a.prototype.EV=function(p){for(var h=k.prototype.EV.call(this,p),g=0;g<this.lf.length&&!h;g++)h=this.lf[g].EV(p);return h};a.prototype.x5=function(p){for(var h=k.prototype.x5.call(this,p),g=0;g<this.lf.length;g++)h=h.concat(this.lf[g].x5(p));return h};a.prototype.Pv=function(p){for(var h=null,g=0;g<this.lf.length&&!h;g++)this.lf[g].getItem()==p&&(h=this.lf[g]);for(g=0;g<this.lf.length&&!h;g++)this.lf[g].getItem().Gcb(p)&&
(h=this.lf[g]);return h};a.prototype.Mka=function(p){this.lf=this.lf.filter(h=>h!==p);this.lf.push(p);this.u6();this.r6()};a.prototype.u6=function(){this.rka=!0;this.Ff()};a.prototype.r6=function(){this.q6()};a.prototype.eb=function(){k.prototype.eb.call(this);for(var p=0;p<this.lf.length;p++)this.lf[p].eb()};a.prototype.Mh=function(){if(this.rka){this.rka=!1;for(var p=[],h=0;h<this.lf.length;h++){var g=this.lf[h];p.push({l:g.ffa,z:h,r:g})}p.sort(function(e,b){return e.l==b.l?e.z-b.z:e.l-b.l});this.A4=
[];for(h=0;h<p.length;h++)this.A4.push(p[h].r);this.q6()}k.prototype.Mh.call(this)};a.prototype.xp=function(){for(var p=0;p<this.lf.length;p++)this.lf[p].xp();k.prototype.xp.call(this)};a.prototype.Yg=function(){for(var p=0;p<this.A4.length;p++)this.A4[p].xab(this.Da);k.prototype.Yg.call(this)};a.prototype.G5=function(){for(var p=0;p<this.lf.length;p++)this.lf[p].G5();k.prototype.G5.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"),k=a("tdv/player/view/map/renderer/renderers/ItemRenderer");a=m.extend(k,function(p,h){k.call(this,p,h)});a.prototype.n8=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"),k=a("tdv/player/view/map/renderer/renderers/OverlayRenderer"),p=a("tdv/player/view/util/Device");a=m.extend(k,function(h,g){k.call(this,h,g);this.W1=this.Ha.getItem().Zf();this.V1=this.Ha.getItem().pg();this.Vc=2;this.f_=0;this.fb=Math.PI*.5;this.Aea=this.Bea=!0;this.Ym=1;this.d0=!0;this.sCa(1)});
a.prototype.n8=function(h,g){this.Ym!=g&&(this.Ym=g,this.d0=!0,this.Ff())};a.prototype.GNa=function(h,g){this.fb!=g&&(this.fb=g,this.Bea=!0,this.Ff());this.f_!=h&&(this.f_=h,this.Aea=!0,this.Ff())};a.prototype.Mh=function(){this.Bea&&(this.Bea=!1,this.q6());if(this.d0||this.Aea){this.Aea=this.d0=!1;this.Vc=Math.max(1,Math.ceil(Math.sqrt(this.W1*this.W1+this.V1*this.V1))/(p.Od()==p.fj?1024:4096));var h=this.Ym/this.Vc,g=this.Ia.getX()*h,e=this.Ia.getY()*h,b=Math.max(g,h*this.W1-g);h=Math.max(e,h*this.V1-
e);b=Math.ceil(Math.sqrt(b*b+h*h))*2;var c=this.f_*Math.PI/180;h=Math.cos(c);c=Math.sin(c);g=g-this.jv*b-(.5-this.jv)*b*h+(.5-this.kv)*b*c;e=e-this.kv*b-(.5-this.kv)*b*h-(.5-this.jv)*b*c;this.d0=!1;this.pn(g,e);this.RT(b,b);this.h3(this.f_)}k.prototype.Mh.call(this)};a.prototype.Yg=function(){var h=this.Ia.C_a,g=this.Ia.n2a;if(g>0||h>0){var e=this.Ym*this.W1,b=this.Ym*this.V1;e=Math.ceil(Math.sqrt(e*e+b*b))*this.Ia.Tz()/this.Vc;b=Math.round(this.Pa*.5);var c=Math.round(this.Ga*.5),d=this.fb*Math.PI/
180,f=-d*.5;d=f+d;g>0&&(this.Da.fillStyle=this.Ia.m2a,this.Da.globalAlpha=g,this.Da.rect(0,0,this.Pa,this.Ga),this.Da.fill(),this.Da.globalCompositeOperation="destination-out",this.Da.fillStyle="#FFFFFF",this.Da.globalAlpha=1,this.Da.beginPath(),this.Da.moveTo(b,c),this.Da.arc(b,c,e,f,d,!1),this.Da.lineTo(b,c),this.Da.closePath(),this.Da.fill(),this.Da.globalCompositeOperation="source-over");h>0&&(this.Da.fillStyle=this.Ia.B_a,this.Da.globalAlpha=h,this.Da.beginPath(),this.Da.moveTo(b,c),this.Da.arc(b,
c,e,f,d,!1),this.Da.lineTo(b,c),this.Da.closePath(),this.Da.fill())}k.prototype.Yg.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"),k=a("tdv/player/view/map/renderer/renderers/ItemRenderer"),p=a("tdv/player/view/map/renderer/renderers/OverlayRenderer"),h=a("tdv/player/view/image/Repository"),g=a("tdv/view/images/ScalableImage");
a=m.extend(p,function(e,b){p.call(this,e,b);this.sCa(this.Ia.RBa?0:2);this.Id=h.qg(this.Ia.hl());this.S2=new g(this.Id,this.Id.width,this.Id.height);this.S2.eP(this.Ia.ji);this.S2.iP(this.Ia.jO());this.S2.cP(this.Ia.hO());this.QR=0;this.Ym=1;this.pfa=!0});a.prototype.n8=function(e,b){if(this.QR!=e||this.Ym!=b)this.QR=e,this.Ym=b,this.pfa=!0,this.Ff()};a.prototype.Mh=function(){if(this.pfa){this.pfa=!1;var e=this.Ia.getX(),b=this.Ia.getY(),c=this.Ia.Zf(),d=this.Ia.pg(),f=this.Ia.uIa(),n=this.Ia.vIa();
if(this.Ia.RBa)this.h3(0),this.pn((e-f)*this.Ym,(b-n)*this.Ym),this.RT(c*this.Ym,d*this.Ym);else{c*=k.ml;d*=k.ml;f*=k.ml;n*=k.ml;var l=Math.cos(-this.QR*Math.PI/180),q=Math.sin(-this.QR*Math.PI/180);e=e*this.Ym-this.jv*c-(f-this.jv*c)*l+(n-this.kv*d)*q;b=b*this.Ym-this.kv*d-(n-this.kv*d)*l-(f-this.jv*c)*q;this.h3(-this.QR);this.pn(e,b);this.RT(c,d)}}p.prototype.Mh.call(this)};a.prototype.Yg=function(){this.S2.VN(this.Da,this.ea.width,this.ea.height);p.prototype.Yg.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"),k=a("tdv/view/constants/ScaleMode"),p=a("tdv/player/view/image/Repository"),
h=a("tdv/player/view/map/renderer/item/Item"),g=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.cq);this.bi=this.Ia.Zf();this.Xj=this.Ia.pg();this.ji=this.Ia.ji;this.eYa=this.Ia.dYa;this.Fg=this.Gg=100;this.Jba=!0;this.dc=this.cc=.5;this.Dd=0;this.hc=1;this.n2=
!0;this.Dj=1;this.Id=p.qg(this.Ia.hl())});a.prototype.Rba=function(d){if(d.getType()!=h.tsa)throw"Invalid item type";switch(d.p2a){case g.qsa:d=new e(d,this);break;case g.rsa:d=new b(d,this);break;default:d=null}d&&d.n8(this.Dd,this.Dj*this.hc);return d};a.prototype.getX=function(){return this.cc};a.prototype.getY=function(){return this.dc};a.prototype.fO=function(){return this.Dd};a.prototype.Uz=function(){return this.hc};a.prototype.cb=function(){return Math.round(this.bi*this.hc*this.Dj)};a.prototype.Kb=
function(){return Math.round(this.Xj*this.hc*this.Dj)};a.prototype.f8=function(d,f){if(this.Gg!=d||this.Fg!=f)this.Gg=d,this.Fg=f,this.Jba=!0,this.Ff()};a.prototype.setPosition=function(d,f,n,l){if(this.cc!=d||this.dc!=f||this.Dd!=n||this.hc!=l)this.cc=d,this.dc=f,this.Dd=n,this.hc=l,this.n2=!0,this.Ff()};a.prototype.Mh=function(){if(this.Jba){this.Jba=!1;switch(this.ji){case k.NONE:this.Dj=1;break;case k.Ep:this.Dj=this.Gg/this.bi;break;case k.Hk:this.Dj=this.Fg/this.Xj;break;case k.nr:this.Dj=this.bi*
this.Fg>this.Xj*this.Gg?this.Fg/this.Xj:this.Gg/this.bi;break;default:this.Dj=this.bi*this.Fg>this.Xj*this.Gg?this.Gg/this.bi:this.Fg/this.Xj}this.n2=!0}if(this.n2){this.n2=!1;var d=this.cb(),f=this.Kb(),n=Math.cos(this.Dd*Math.PI/180),l=Math.sin(this.Dd*Math.PI/180);this.pn(this.Gg*.5-this.jv*d+(this.jv-this.cc)*n*d-(this.kv-this.dc)*l*f,this.Fg*.5-this.kv*f+(this.kv-this.dc)*n*f+(this.jv-this.cc)*l*d);this.h3(this.Dd);this.RT(d,f);for(d=0;d<this.lf.length;d++)this.lf[d].n8(this.Dd,this.Dj*this.hc)}c.prototype.Mh.call(this)};
a.prototype.Yg=function(){var d=Math.round(this.Pa),f=Math.round(this.Ga);this.eYa?(this.Da.save(),this.Da.translate(d,0),this.Da.scale(-1,1),this.Da.drawImage(this.Id,0,0,d,f),this.Da.restore()):this.Da.drawImage(this.Id,0,0,d,f);c.prototype.Yg.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"),k=a("tdv/player/view/map/renderer/item/Item"),p=a("tdv/player/view/map/renderer/renderers/ItemContainerRenderer"),h=a("tdv/player/view/map/renderer/renderers/MapRenderer");a=m.extend(p,function(){p.call(this,null,null);this.vba=
!0});a.prototype.ac=function(){return this.ea};a.prototype.render=function(){this.eb();this.xp()};a.prototype.Hbb=function(){for(var g=1,e=0;e<this.lf.length;e++){var b=this.lf[e];b=b.cb()*b.Kb();g<b&&(g=b)}return g};a.prototype.Rba=function(g){if(g.getType()!=k.ssa)throw"Invalid item type";g=new h(g,this);g.f8(this.Pa,this.Ga);g.setPosition(.5,.5,0,1);return g};a.prototype.setSize=function(g,e){this.RT(g,e);this.vba=!0;this.Ff()};a.prototype.Mh=function(){if(this.vba){this.vba=!1;for(var g=0;g<this.lf.length;g++)this.lf[g].f8(this.Pa,
this.Ga)}p.prototype.Mh.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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/Priority"),h=a("tdv/player/view/image/Repository"),g=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.cf("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",c.dB);this.QB=[];this.TH=[];this.fc="";this.fi=new e;this.bind(k.Yb,this.jd,this,!0);this.bind(k.Cd,this.To,this,!0);this.bind(k.sd,this.Ro,this,!0);b.O.bind(k.V,this.Ija,this,!0);this.Eha=this.Dha=!1});a.prototype.Ib=function(){d.prototype.Ib.call(this);
var f=this.fi.ac();f.parentElement||this.wa().kk(f)};a.prototype.Zz=function(f){h.Zz(f,p.Fp)};a.prototype.Rpa=function(f){return h.Rpa(f)};a.prototype.Zn=function(f){h.Zn(f,p.Fp)};a.prototype.b9a=function(f){this.fi.lFa(f)};a.prototype.removeItem=function(f){this.fi.PMa(f)};a.prototype.C4=function(f,n){this.fi.Pv(f).lFa(n);this.Fja()};a.prototype.rfb=function(f,n){(f=this.fi.Pv(f))&&f.PMa(n)};a.prototype.E9a=function(f){this.fi.EV(f).mi()};a.prototype.xA=function(f,n){this.fi.x5(f).forEach(function(l){l.zf(n)})};
a.prototype.Zoa=function(f,n,l,q,r){this.fi.Pv(f).setPosition(n,l,q,r);this.Fja()};a.prototype.Fja=function(){var f=this.fi.Hbb();f&&(g.ml=Math.min(g.mra,g.ml*Math.sqrt(g.BRa/f)),this.qEa())};a.prototype.Igb=function(f,n,l){this.fi.EV(f).GNa(n,l)};a.prototype.V5=function(f){return this.fi.Pv(f).getX()};a.prototype.W5=function(f){return this.fi.Pv(f).getY()};a.prototype.U5=function(f){return this.fi.Pv(f).fO()};a.prototype.zbb=function(f){return this.fi.Pv(f).Uz()};a.prototype.T5=function(f){return this.fi.Pv(f).cb()/
g.ml};a.prototype.S5=function(f){return this.fi.Pv(f).Kb()/g.ml};a.prototype.render=function(){this.Eha&&this.fi.render()};a.prototype.V7=function(f){this.QB.push(f);this.BU()};a.prototype.TO=function(f){f=this.QB.lastIndexOf(f);f>=0&&this.QB.splice(f,1);this.BU()};a.prototype.BU=function(){var f=this.QB.length>0?this.QB[this.QB.length-1]:c.gf;this.getParent().set("cursor",f)};a.prototype.KZ=function(){this.QB.length>0&&(this.getParent().set("cursor",c.gf),this.QB=[])};a.prototype.ifb=function(f){this.TH.push(f);
this.IU()};a.prototype.cfb=function(f){f=this.TH.lastIndexOf(f);f>=0&&this.TH.splice(f,1);this.IU()};a.prototype.IU=function(){var f=this.TH.length==0?"":this.TH[this.TH.length-1]||"";this.fc!=f&&(this.fc=f,this.getParent().set("toolTip",this.fc))};a.prototype.MVa=function(){this.fc&&this.getParent().set("toolTip","");this.fc="";this.TH=[]};a.prototype.ap=function(){this.MVa();this.KZ();d.prototype.ap.call(this)};a.prototype.jd=function(){this.qEa();this.Fja()};a.prototype.qEa=function(){var f=this.fi.ac();
f.style.transform=g.ml!=1?"scale("+(1/g.ml).toFixed(3)+")":"none";f.style.transformOrigin="0% 0%";this.fi.setSize(this.cb()*g.ml,this.Kb()*g.ml);this.render()};a.prototype.To=function(){this.Dha=!0;this.Ija()};a.prototype.Ro=function(){this.Dha=!1;this.Ija()};a.prototype.Ija=function(){var f=this.Dha&&!b.isPresenting;this.Eha!=f&&((this.Eha=f)?(this.jd(),this.render()):this.fi.G5())};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"),k=a("tdv/events/Event"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/ButtonProperty"),
g=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"),n=a("tdv/view/constants/State"),l=p.define("MapPlayer",g,function(){g.call(this,"map");this.U0=this.ofa=this.Ui=!1;this.Wo=this.qd=this.U=this.m=null;this.BB={};for(var q in l.ox)this.BB[q]=this.kWa(q);this.$d=m.Qq(this.Mh,this)});l.prototype.stop=function(){this.ld(b.tg)};
l.prototype.rotateClockwise=function(){this.ld(b.S$)};l.prototype.rotateCounterClockwise=function(){this.ld(b.T$)};l.prototype.zoomIn=function(){this.ld(b.mx)};l.prototype.zoomOut=function(){this.ld(b.nx)};l.prototype.set=function(q,r){if(this.get(q)!=r){switch(q){case "map":this.ofa=!0;this.$d();break;case "viewerArea":this.Ui=!0;this.$d();break;case "panoramaMapLocation":this.Ega=!0;this.$d();break;case "movementMode":this.U0=!0,this.$d()}g.prototype.set.call(this,q,r)}};l.prototype.kWa=function(q){var r=
l.ox[q];q=new h(this,q,f.jf);q.bind(d.Ra,function(){this.ld(r.movement)},this);r.stopOnRelease&&q.bind(d.bb,function(){this.ld(b.tg)},this);return q};l.prototype.h9a=function(q){this.Wo=null;this.set("map",q.get("map"));this.set("panoramaMapLocation",q)};l.prototype.yfb=function(q){this.get("panoramaMapLocation")==q&&(this.set("panoramaMapLocation",null),this.Wo=null)};l.prototype.Yq=function(q,r,t,u){this.U&&this.U.Yq(q,r,t,u);this.Wo={yaw:r,pitch:t,hfov:u}};l.prototype.Mh=function(){this.Ui&&(this.Ui=
!1,this.Lx(),this.get("viewerArea")&&this.Kx(),this.TT(this.get("viewerArea")));if(this.U){if(this.ofa){this.ofa=!1;var q=this.get("map");q?(this.rJ(),this.U.SNa(q)):this.U.uA();this.Ega=this.U0=!0}this.Ega&&(this.Ega=!1,q=this.get("panoramaMapLocation"),this.U.AA(q),q&&this.Wo&&this.U.Yq(q,this.Wo.yaw,this.Wo.pitch,this.Wo.hfov));this.U0&&(this.U0=!1,this.U.Ot(this.get("movementMode")))}};l.prototype.ZM=function(){this.set("map",null)};l.prototype.Kx=function(){var q=this.get("viewerArea");this.m=
new c;this.m.xa({left:0,top:0,bottom:0,right:0});q.hb(this.m);this.U=new e(q,this.m);this.U.bind(e.ul,this.ks,this);this.U.bind(e.Qw,this.wj,this);this.U.bind(e.RE,this.eM,this);this.U.bind(e.TE,this.sC,this);this.U.bind(e.SE,this.Ay,this);this.U.bind(e.dj,this.SS,this,!0)};l.prototype.Lx=function(){this.m&&(this.U.h(e.ul,this.ks,this),this.U.h(e.Qw,this.wj,this),this.U.h(e.RE,this.eM,this),this.U.h(e.TE,this.sC,this),this.U.h(e.SE,this.Ay,this),this.U.h(e.dj,this.SS,this),this.U.clear(),this.m.getParent().removeChild(this.m),
this.m=null)};l.prototype.sC=function(q){this.YR(q.data.map)};l.prototype.Ay=function(q){this.WR(q.data.map)};l.prototype.ks=function(q){for(var r in l.ox)this.BB[r].set("state",q.data[l.ox[r].pressedOn]?n.Mb:n.gf);this.o(new k(d.vra,q.data))};l.prototype.SS=function(q){this.o(new k(l.dj,{yawDelta:q.data.yawDelta}))};l.prototype.wj=function(q){this.m.getParent().xa({progressPercent:q.data.percent,progressVisible:!0})};l.prototype.eM=function(){this.m.getParent().set("progressVisible",!1)};l.prototype.ld=
function(q){this.U&&this.U.pl(q)};l.ox={buttonRotateClockwise:{movement:b.S$,pressedOn:"rotatingClockwise",stopOnRelease:!0},buttonRotateCounterClockwise:{movement:b.T$,pressedOn:"rotatingCounterClockwise",stopOnRelease:!0},buttonZoomIn:{movement:b.mx,pressedOn:"zoomingIn",stopOnRelease:!0},buttonZoomOut:{movement:b.nx,pressedOn:"zoomingOut",stopOnRelease:!0}};l.dj="requestYawChange";return l});
define("tdv/player/script/PlayListItem","require exports tdv/player/parser/ClassInfo tdv/constants/EventName tdv/events/Event tdv/binding/Bindable".split(" "),function(a,m,k,p,h,g){a=function(e){function b(){var c=e.call(this)||this;c.H="stopped";return c}P(b,e);b.prototype.get=function(c,d){d===void 0&&(d=void 0);return c=="state"?this.H:g.prototype.get.call(this,c,d)};b.prototype.start=function(){this.Rib()};b.prototype.Rib=function(){if(this.H=="stopped"||this.H=="stopping")this.H="startin",this.o(new h(p.Gp))};
b.prototype.kD=function(){this.yPa()};b.prototype.yPa=function(){if(this.H=="startin"||this.H=="stopping")this.H="playing",this.o(new h(p.gr))};b.prototype.stop=function(){this.rP()};b.prototype.rP=function(){if(this.H=="playing"||this.H=="startin")this.H="stopping",this.o(new h(p.tg))};b.prototype.end=function(){this.zPa()};b.prototype.zPa=function(){if(this.H=="stopping"||this.H=="startin")this.H="stopped",this.o(new h(p.Qb))};return b}(g);k.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"),k=a("tdv/player/script/MediaPlayer"),p=a("tdv/player/script/PlayListItem");a=m.define("MapPlayListItem",p,function(){p.call(this)});a.prototype.start=function(){p.prototype.start.call(this);var h=this.get("player");h&&(h.bind(k.Vh,this.sC,this),h.set("map",this.get("media")))};a.prototype.stop=function(){var h=
this.get("player");h&&h.get("map")==this.get("media")&&h.set("map",null);p.prototype.stop.call(this)};a.prototype.sC=function(){this.get("player").h(k.Vh,this.sC,this);this.get("player").bind(k.fo,this.Ay,this);this.kD();this.get("player").get("map")!=this.get("media")&&this.Ay()};a.prototype.Ay=function(){this.get("player").h(k.fo,this.Ay,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"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/script/ExternalModel3DObject"),h=k.define("MeasureModel3DObject",p,function(){p.call(this);this.bind(m.K("mode"),function(){this.o(h.ZQa)},this,!0);this.bind(m.K("distance"),function(){this.o(h.VQa)},this,!0)});h.ZQa="modeChange";h.VQa="distanceChange";
return h});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"),k=a("tdv/player/script/Model3DCamera");return m.define("OrbitModel3DCamera",k,function(){k.call(this)})});
define("tdv/player/view/util/LoadingGroup",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,m,k,p){var h=function(){return function(g){this.sGa=g;this.percent=0;this.finished=!1}}();return function(g){function e(b){var c=g.call(this)||this;c.Jo=new Map;c.lL=b||c;return c}P(e,g);e.prototype.pgb=function(b){if(this.lL=b)this.jk(),this.d4()};e.prototype.update=function(){this.jk();this.d4()};e.prototype.jGa=function(){this.Jo.forEach(function(b,c){this.C2(c)}.bind(this));
this.Jo=new Map};e.prototype.aj=function(){var b=0;this.Jo.forEach(function(c){c.finished&&b++});return b==this.Jo.size};e.prototype.dispose=function(){this.jGa();this.Jo.clear();this.lL=void 0};e.prototype.xN=function(b,c){c===void 0&&(c=1);if(this.Jo.has(b))return b;this.Jo.set(b,new h(c));this.FTa(b);return b};e.prototype.XO=function(b){this.Jo.has(b)&&(this.Jo["delete"](b),this.C2(b))};e.prototype.Mv=function(b){b===void 0&&(b=1);var c=new p;return this.xN(c,b)};e.prototype.Ke=function(b){b=b.source;
var c=this.Jo.get(b);c&&(this.C2(b),c.percent=100,c.finished=!0,this.jk(),this.d4())};e.prototype.wj=function(b){this.Jo.get(b.source).percent=b.data.percent;this.jk()};e.prototype.oh=function(b){b=b.source;this.C2(b);b=this.Jo.get(b);b.finished=!0;b.percent=100;this.lL.o(k.$c);this.jk();this.d4()};e.prototype.jk=function(){var b=0,c=0;this.Jo.forEach(function(d){c+=d.sGa;b+=d.percent*d.sGa});this.lL.o(k.wc,{percent:c?b/c:100})};e.prototype.d4=function(){this.aj()&&this.lL.o(k.ha)};e.prototype.FTa=
function(b){b.bind(k.ha,this.Ke,this,!0);b.bind(k.wc,this.wj,this,!0);b.bind(k.$c,this.oh,this,!0)};e.prototype.C2=function(b){b.h(k.ha,this.Ke,this);b.h(k.wc,this.wj,this);b.h(k.$c,this.oh,this)};return e}(p)});
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 k(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function p(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 h=a("tdv/constants/EventName"),
g=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.Boa=function(){this.Bj&&(this.Bj.h(h.ha,this.iM,this),this.Bj.dispose());this.Bj=new d;this.Bj.bind(h.ha,this.iM,
this,!0);this.mf&&this.mf.dispose();this.mf=new d(this)};a.prototype.iM=function(){this.o(h.pF)};a.prototype.X5=function(){this.mf||this.Boa();return this.mf};a.prototype.a6=function(){this.Bj||this.Boa();return this.Bj};a.prototype.pause=function(){this.get("state")==g.PLAYING&&this.set("state",g.Xb)};a.prototype.play=function(){this.set("state",g.PLAYING)};a.prototype.stop=function(){this.set("state",g.aa)};a.prototype.worldPositionToLocal=function(r,t){k(f,r);m(l,t);l.invert();f.applyMatrix4(l);
return p(f,r)};a.prototype.getMatrixWorld=function(r){var t=this.get("objectQuery");return t&&t.oIa(r)};a.prototype.worldDirectionToLocal=function(r,t){k(f,r);m(q,t);l.extractRotation(q);l.invert();f.applyMatrix4(l);return p(f,r)};a.prototype.testIntersection=function(r,t){var u=this.get("geometryQuery");if(u)return k(f,r),k(n,t),u.MJ(f,n)};a.prototype.getDistanceToFloor=function(r){var t=this.get("geometryQuery");if(t)return k(f,r),t.kbb(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.aoa(r,t)};a.prototype.getScreenPosition=function(r,t){var u=this.get("projectionQuery");if(u)return u.mma(k(f,r),t)};var f=new THREE.Vector3,n=new THREE.Vector3,l=new THREE.Matrix4,q=new THREE.Matrix4;a.prototype.Yv=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"),k=a("tdv/constants/PlaybackState"),p=a("tdv/constants/EventName");a=a("tdv/player/parser/ClassInfo").define("Model3DAnimation",m,function(){m.call(this);this.bind(p.K("state"),function(){this.o(p.Ye)},this,!0)});a.prototype.pause=function(){this.get("state")==k.PLAYING&&this.set("state",k.Xb)};
a.prototype.play=function(){this.set("currentDirection","forward");this.set("state",k.PLAYING)};a.prototype.reverse=function(){this.set("currentDirection","backward");this.set("state",k.PLAYING)};a.prototype.stop=function(){this.set("currentTime",0);this.set("state",k.aa)};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"),k=a("tdv/constants/PlaybackState"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/constants/EventName");a=p.define("Model3DCameraSequence",m,function(){m.call(this);this.set("state",k.aa);this.bind(h.K("state"),function(){this.o(h.Ye)},this,!0)});a.prototype.play=a.prototype.play=function(){this.set("state",
k.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.get("state")==k.PLAYING&&this.set("state",k.Xb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",k.aa)};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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/player/script/helper/ButtonProperty"),g=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(g,function(){g.call(this,!0);this.av=!1;this.XM=!0;this.H=e.aa;this.RF=new h(this,"buttonPlayPause",b.Mk);this.RF.bind(k.Jk,this.H1a,this,!0);this.RF.bind(k.Im,this.I1a,this,!0);this.NK=new h(this,"buttonPause",b.jf);this.NK.bind(k.oa,this.mH,this,!0);this.OK=new h(this,"buttonPlay",b.jf);this.OK.bind(k.oa,this.nH,this,!0);this.QK=new h(this,"buttonStop",b.jf);this.QK.bind(k.oa,this.xC,this,!0);this.jVa=new h(this,"buttonRestart",b.jf);this.jVa.bind(k.oa,
this.wC,this,!0);this.nxa=m.Qq(this.X7a,this);this.nxa()});a.prototype.set=function(d,f){d!="state"&&g.prototype.set.call(this,d,f)};a.prototype.get=function(d,f){switch(d){case "state":return this.H}return g.prototype.get.call(this,d,f)};a.prototype.X7a=function(){this.XM&&(this.XM=!1,this.NK.set("state",this.H==e.Xb?c.Mb:c.gf),this.OK.set("state",this.H==e.PLAYING||this.H==e.Xb?c.Mb:c.gf),this.RF.set("pressed",this.H==e.PLAYING),this.QK.set("state",this.H==e.aa?c.Mb:c.gf))};a.prototype.SC=function(d){this.av!=
d&&((this.av=d)||this.Kd(e.aa))};a.prototype.Kd=function(d){var f=this.H;this.H=d;g.prototype.set.call(this,"state",d);f!=this.H&&(this.XM=!0,this.nxa(),this.o(new p(k.Ye,{oldState:f,state:this.H})))};a.prototype.mH=function(){this.av&&(this.H==e.Xb?this.Ql():this.ws())};a.prototype.nH=function(){this.av&&this.Ql()};a.prototype.H1a=function(){this.av&&this.Ql()};a.prototype.I1a=function(){this.av&&this.ws()};a.prototype.xC=function(){this.av&&this.sq()};a.prototype.wC=function(){this.av&&(this.sq(),
this.Ql())};a.prototype.Ql=function(){};a.prototype.ws=function(){};a.prototype.sq=function(){};return a});
define("tdv/player/view/model3d/controller/DisplayController",["require","tdv/utils","tdv/view/util/Animation","tdv/events/Event","tdv/events/EventDispatcher"],function(a){var m=a("tdv/utils"),k=a("tdv/view/util/Animation"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=m.extend(h,function(e,b){h.call(this);this.R=e;this.m=b;this.xs=null;this.Na=g.Di;this.mj=this.nj=null;this.Hj=this.Uf=void 0;this.Xfa=[]});g.prototype.display=function(e){this.xs=null;if(this.mj!=e||this.Na!=g.Di)this.xs=
e,this.Nza()};g.prototype.Pe=function(){this.xs="none";this.Nza()};g.prototype.clear=function(){this.Na=g.Di;this.xs=null;this.c3a();this.vha();this.m=null};g.prototype.yh=function(e){for(;this.Xfa.length;)this.Xfa.shift()();this.Na==g.Di||this.Na!=g.ij&&this.Na!=g.vu&&this.Na!=g.qx||(this.Hj+=e,e=Math.min(1,this.Hj/this.Uf),this.Na==g.ij?(this.nj.set("opacity",e),this.R.Sc().wJ(e)):this.Na==g.qx?(this.R.Sc().wJ(e),this.R.Sc().mE(e)):(this.R.Sc().mE(e),this.mj.set("opacity",1-e)),this.m.Xa(),this.Hj<
this.Uf?this.Sa():this.VB())};g.prototype.RV=function(){return this.mj&&this.m.RV(this.mj)||void 0};g.prototype.Nza=function(){this.xs&&this.Na==g.Di&&this.Kr()};g.prototype.Kr=function(){this.mj&&this.o(new p(g.UE,{model:this.mj}));this.R.get("transitionMode","blending")=="fade_out_fade_in"&&this.mj?this.yB():(this.nj=this.xs=="none"?null:this.xs,this.xs=null,this.nj?this.mj?this.dba():this.LF():this.mj&&this.yB())};g.prototype.LF=function(){this.Na=g.ij;this.gta();this.m.cpa(this.nj,!1);this.R.Sc().JJ();
this.Hj=0;this.Uf=this.R.get("transitionDuration");this.Sa()};g.prototype.dba=function(){this.Na=g.qx;this.R.Sc().zE();this.vha();this.gta();this.m.cpa(this.nj,!1);this.R.Sc().JJ();this.Hj=0;this.Uf=this.R.get("transitionDuration")*2;this.Sa()};g.prototype.yB=function(){this.Na=g.vu;this.nj=null;this.Hj=0;this.Uf=this.R.get("transitionDuration");this.R.Sc().zE();this.m.cpa(this.mj,!0);this.Sa()};g.prototype.VB=function(){this.xs!=this.mj&&this.vha();this.mj=this.nj;this.nj=null;this.Na==g.vu?this.R.Sc().sD():
this.Na==g.ij?this.R.Sc().BI():this.Na==g.qx&&(this.R.Sc().BI(),this.R.Sc().sD());this.Na=g.Di;this.mj?this.o(new p(g.VE,{model:this.mj})):this.xs||this.o(new p(g.Q9));this.xs&&this.Kr()};g.prototype.Sa=function(){k.requestFrame(this.yh,this)};g.prototype.gta=function(){if(this.nj){this.nj.set("opacity",this.Na==g.qx?1:.01);this.nj.set("currentTime",0);this.m.oFa(this.nj);this.o(new p(g.g$,{model:this.nj}));var e=this.nj;this.Xfa.push(function(){this.o(new p(g.WE,{model:e}))}.bind(this))}};g.prototype.vha=
function(){this.mj&&(this.m.roa(this.mj),this.o(new p(g.GY,{model:this.mj})),this.mj=null)};g.prototype.c3a=function(){this.nj&&(this.m.roa(this.nj),this.o(new p(g.GY,{model:this.nj})),this.nj=null)};g.Di="stopped";g.ij="blending";g.qx="double blending";g.vu="disolving";g.nc="request frame";g.g$="model added";g.GY="model removed";g.WE="model start";g.VE="model show";g.UE="model hide";g.Q9="all pending models hidden";return g});
define("tdv/player/view/model3d/controller/LoadController",["require","tdv/utils","tdv/events/EventDispatcher","tdv/constants/EventName"],function(a){var m=a("tdv/utils"),k=a("tdv/events/EventDispatcher"),p=a("tdv/constants/EventName");a=m.extend(k,function(h,g){k.call(this);this.R=h;this.m=g;this.nh=null});a.prototype.clear=function(){this.stop();this.m=null};a.prototype.load=function(h){h!=this.nh&&(this.stop(),this.m.Ccb(h)?(this.NDa(h),this.T3(h)):(this.nh=h,this.nh.set("opacity",0),this.OUa(),
this.m.oFa(this.nh)))};a.prototype.stop=function(){this.nh&&(this.jja(),this.m.roa(this.nh),this.nh=null)};a.prototype.iM=function(){this.QDa();this.NDa(this.nh)};a.prototype.Ke=function(){this.nh.j6(p.pF)&&this.iM();this.jja();var h=this.nh;this.nh=null;this.R.set("progressVisible",!1);this.T3(h)};a.prototype.oh=function(){this.jja();this.nh=null;this.R.set("progressVisible",!1)};a.prototype.wj=function(h){this.R.xa({progressPercent:h.data.percent,progressVisible:!0})};a.prototype.RUa=function(){this.nh.bind(p.pF,
this.iM,this,!0)};a.prototype.QDa=function(){this.nh.h(p.pF,this.iM,this,!0)};a.prototype.OUa=function(){this.RUa();this.nh.bind(p.ha,this.Ke,this,!0);this.nh.bind(p.wc,this.wj,this,!0);this.nh.bind(p.$c,this.oh,this,!0)};a.prototype.jja=function(){this.QDa();this.nh.h(p.ha,this.Ke,this,!0);this.nh.h(p.wc,this.wj,this,!0);this.nh.h(p.$c,this.oh,this,!0)};a.prototype.NDa=function(h){this.o(p.pF,{model:h})};a.prototype.T3=function(h){this.o(p.ha,{model:h})};a.prototype.Edb=function(){return this.nh&&
this.nh.j6(p.pF)};a.Xqa=p.pF;a.Uqa=p.ha;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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/constants/PlaybackState"),e=m.extend(h,function(){h.call(this);this.ma=null;this.H=g.aa});e.prototype.start=function(b){this.ma=b;this.ma.bind(k.K("camera"),this.Ofa,this,!0);this.ma.bind(k.K("state"),
this.pga,this,!0);this.ma.bind(k.K("currentTime"),this.K1,this,!0);this.ma.bind(k.K("duration"),this.K1,this,!0);this.pga();this.Ofa()};e.prototype.end=function(){this.stop();this.yc&&(this.yc.h(k.K("state"),this.pS,this,!0),this.yc=null);this.ma&&(this.ma.h(k.K("camera"),this.Ofa,this,!0),this.ma.h(k.K("state"),this.pga,this,!0),this.ma.h(k.K("currentTime"),this.K1,this,!0),this.ma.h(k.K("duration"),this.K1,this,!0),this.ma=null)};e.prototype.clear=function(){this.end()};e.prototype.play=function(){this.ma&&
this.ma.set("state",g.PLAYING)};e.prototype.pause=function(){this.ma&&this.ma.set("state",g.Xb)};e.prototype.stop=function(){this.ma&&this.ma.set("state",g.aa)};e.prototype.setTime=function(b){this.ma&&this.ma.set("currentTime",b)};e.prototype.getTime=function(){return this.ma&&this.ma.get("currentTime")||void 0};e.prototype.pga=function(){var b=this.ma.get("state");this.H!=b&&(this.H=b,this.yc&&this.yc.set("state",b),this.o(new p(e.dd,{state:this.H})))};e.prototype.K1=function(){this.o(new p(e.Gk,
{model:this.ma,time:this.ma.get("currentTime"),duration:this.ma.get("duration")}));this.pS()};e.prototype.Ofa=function(){this.yc&&this.yc.h(k.K("state"),this.pS,this,!0);(this.yc=this.ma.get("camera"))&&this.yc.bind(k.K("state"),this.pS,this,!0);this.pS()};e.prototype.pS=function(){this.ma.get("duration")===0&&this.ma.set("state",this.yc?this.yc.get("state"):g.aa)};e.dd="playback state change";e.Gk="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"),k=a("tdv/constants/PlaybackState"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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(h,function(d,f){h.call(this);this.R=d;this.m=f;this.m.set("visible",!1);this.Be=new e(this.R,this.m);this.Va=new g(this.R,this.m);this.Ta=new b(this.m);this.Be.bind(e.Xqa,this.Eza,this,!0);this.Be.bind(e.Uqa,this.Cy,this,!0);this.Va.bind(g.UE,this.tC,this,!0);this.Va.bind(g.VE,this.fn,this,!0);this.Va.bind(g.WE,this.CS,this,!0);this.Va.bind(g.g$,this.Bza,this,!0);this.Va.bind(g.GY,
this.Fza,this,!0);this.Va.bind(g.Q9,this.Bya,this,!0);this.Ta.bind(b.dd,this.If,this,!0);this.Ta.bind(b.Gk,this.qs,this,!0)});c.prototype.clear=function(){this.Be.clear();this.Va.clear();this.Ta.clear();this.Be.h(e.Xqa,this.Eza,this);this.Be.h(e.Uqa,this.Cy,this);this.Va.h(g.UE,this.tC,this);this.Va.h(g.VE,this.fn,this);this.Va.h(g.WE,this.CS,this);this.Va.h(g.g$,this.Bza,this);this.Va.h(g.GY,this.Fza,this);this.Va.h(g.Q9,this.Bya,this);this.Ta.h(b.dd,this.If,this);this.Ta.h(b.Gk,this.qs,this);this.R=
this.m=this.Ta=this.Va=this.Be=null};c.prototype.Ugb=function(d){this.m.set("visible",!0);this.Be.load(d)};c.prototype.uA=function(){this.Be.Edb()&&this.Be.stop();this.Va.Pe();this.Ta.end()};c.prototype.play=function(){this.Ta.play()};c.prototype.stop=function(){this.Ta.stop()};c.prototype.pause=function(){this.Ta.pause()};c.prototype.setTime=function(d){this.Ta.setTime(d)};c.prototype.getTime=function(){return this.Ta.getTime()};c.prototype.RV=function(){return this.Va.RV()};c.prototype.Eza=function(d){this.Va.display(d.data.model)};
c.prototype.Cy=function(){};c.prototype.Bza=function(d){this.Ta.start(d.data.model)};c.prototype.CS=function(d){d=d.data.model;this.m.set("visible",!0);this.o(new p(c.WE,{model:d}))};c.prototype.Fza=function(){};c.prototype.fn=function(d){d=d.data.model;d.get("autoplay")&&d.get("state")!=k.PLAYING&&d.set("state",k.PLAYING);this.o(new p(c.VE,{model:d}))};c.prototype.tC=function(d){this.o(new p(c.UE,{model:d.data.model}))};c.prototype.Bya=function(){this.m.set("visible",!1)};c.prototype.qs=function(d){this.o(new p(c.h$,
d.data))};c.prototype.If=function(d){this.o(new p(c.dd,{state:d.data.state}))};c.VE="modelShow";c.UE="modelHide";c.rkb="modelEnd";c.WE="modelStart";c.h$="videoTimeChange";c.dd="playbackStateChange";return c});define("tdv/player/view/webgl/ecs/Component",["require","exports"],function(){return function(){function a(){}a.prototype.clear=function(){};a.Bb=function(m){this.id=m+"Component";this.ia="!"+this.id};a.Sb=function(m){this.Bb(m+"SystemState");this.G6=!0};a.G6=!1;return a}()});
define("tdv/player/view/webgl/components",["require","exports","tdv/player/view/webgl/ecs/Component","three.mod"],function(a,m,k,p){var h;(function(g){var e=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.bias=0;H.gHa=500;H.intensity=1;H.scale=100;H.WJa=25;H.xKa=0;H.Kka=4;H.output=null;return H}P(M,J);return M}(k);g.XJ=e;e.Bb("AmbientOcclusionEffect");var b=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.color="#ffffff";H.intensity=1;return H}P(M,
J);return M}(k);g.AmbientLight=b;b.Bb("AmbientLight");var c=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.light=null;return H}P(M,J);return M}(k);g.PA=c;c.Sb("AmbientLight");var d=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;return H}P(M,J);return M}(k);g.Animation=d;d.Bb("Animation");var f=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.Gw=f;f.Sb("Animation");
var n=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.LHa=!1;H.KOa=!1;H.QX=2;return H}P(M,J);return M}(k);g.LE=n;n.Bb("AntialiasEffect");var l=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.v=[];H.renderOrder=null;H.O=null;return H}P(M,J);return M}(k);g.co=l;l.Bb("Area");var q=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.v=[];return H}P(M,J);return M}(k);g.QA=q;q.Sb("Area");var r=function(J){function M(){var H=J!==null&&
J.apply(this,arguments)||this;H.J4=[];return H}P(M,J);return M}(k);g.ME=r;r.Sb("AreaPoint");var t=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.TA=t;t.Bb("Beacon");var u=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.position=null;return H}P(M,J);return M}(k);g.UA=u;u.Sb("Beacon");var v=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.O=null;return H}P(M,J);return M}(k);g.Bp=v;v.Bb("BeaconTracker");var w=
function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.position=null;return H}P(M,J);return M}(k);g.Lw=w;w.Sb("BeaconTracker");var y=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.ah=null;H.fNa=null;H.ID=!0;H.enabled=!0;H.locked=!1;H.TN=!0;H.Eg=void 0;H.ql=0;return H}P(M,J);return M}(k);g.nkb=y;var x=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.Oa=null;H.rotate=!1;return H}P(M,J);return M}(k);g.bK=x;x.Bb("CameraOffsetTransform");
var z=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.Oa=null;return H}P(M,J);return M}(k);g.JQa=z;z.Sb("CameraOffsetTransform");var A=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;return H}P(M,J);return M}(k);g.cK=A;A.Bb("CameraSequence");var D=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.Mw=D;D.Sb("CameraSequence");var E=function(J){function M(){var H=J!==null&&
J.apply(this,arguments)||this;H.source=null;H.HJ=null;H.opacity=1;H.isSprite=!1;H.hidden=!1;H.depthTest=!0;return H}P(M,J);return M}(k);g.Gf=E;E.Bb("CanvasMaterial");var B=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.WA=B;B.Sb("CanvasMaterial");var C=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.PE=C;C.Bb("ClippingRect");var I=function(J){function M(){return J!==null&&J.apply(this,
arguments)||this}P(M,J);return M}(k);g.XA=I;I.Sb("ClippingRect");var F=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.MP=F;F.Bb("Data");var G=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.target=null;return H}P(M,J);return M}(k);g.DirectionalLight=G;G.Bb("DirectionalLight");var N=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.mp=null;return H}P(M,J);return M}(k);g.hr=N;N.Sb("DirectionalLight");var O=
function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.O=null;H.direction=null;H.min=null;return H}P(M,J);return M}(k);g.Pw=O;O.Bb("Draggable");var R=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.rla=null;return H}P(M,J);return M}(k);g.YA=R;R.Sb("Draggable");var S=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.Em=S;S.Bb("Dragging");var K=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}
P(M,J);return M}(y);g.iF=K;K.Bb("FirstPersonControls");var L=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.eu=L;L.Sb("FirstPersonControls");var Q=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.color="#ffffff";H.opacity=1;H.height=0;H.radius=1;H.renderOrder=0;return H}P(M,J);return M}(k);g.pr=Q;Q.Bb("Floor");var T=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.floor=null;return H}
P(M,J);return M}(k);g.Tw=T;T.Sb("Floor");var W=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.distance=0;H.iW=!1;H.x=0;H.y=0;H.z=0;return H}P(M,J);return M}(k);g.Uw=W;W.Bb("FloorTransform");var X=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.fu=X;X.Sb("FloorTransform");var Y=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(y);g.jF=Y;Y.Bb("FlyOverControls");var ca=
function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.Vw=ca;ca.Sb("FlyOverControls");var ea=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.geometry=null;return H}P(M,J);return M}(k);g.Geometry=ea;ea.Bb("Geometry");var Z=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.eGa="#ffffff";H.depthTest=!0;H.nla=10;H.SIa="#ffffff";H.size=10;return H}P(M,J);return M}(k);g.gu=Z;Z.Bb("Grid");var U=
function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.grid=null;return H}P(M,J);return M}(k);g.cB=U;U.Sb("Grid");var V=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.group=null;return H}P(M,J);return M}(k);g.Group=V;V.Bb("Group");var aa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.group=null;return H}P(M,J);return M}(k);g.jK=aa;aa.Sb("Group");var ba=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=
null;H.aw=null;H.O=null;H.np=null;H.priority=void 0;H.isSprite=!1;H.pGa=null;return H}P(M,J);return M}(k);g.Bi=ba;ba.Bb("ImageMaterial");var da=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.eB=da;da.Sb("ImageMaterial");var fa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.cNa=7;H.intensity=1;return H}P(M,J);return M}(k);g.QP=fa;fa.Bb("MotionBlurEffect");var ha=function(J){function M(){var H=J!==null&&
J.apply(this,arguments)||this;H.line=null;H.renderOrder=0;return H}P(M,J);return M}(k);g.Line=ha;ha.Bb("Line");var ka=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.line=null;return H}P(M,J);return M}(k);g.hB=ka;ka.Sb("Line");var ia=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.color="#ffffff";H.opacity=1;H.width=1;H.transparent=!0;H.depthTest=!0;return H}P(M,J);return M}(k);g.Xh=ia;ia.Bb("LineMaterial");var ja=function(J){function M(){var H=J!==
null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.gB=ja;ja.Sb("LineMaterial");var qa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.F=null;H.position=null;return H}P(M,J);return M}(k);g.iu=qa;qa.Bb("LineToTransform");var ra=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.iB=ra;ra.Sb("LineToTransform");var sa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.material=null;
return H}P(M,J);return M}(k);g.Material=sa;sa.Bb("Material");var ta=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.name=null;return H}P(M,J);return M}(k);g.Xw=ta;ta.Bb("MaterialVariant");var ua=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.ur=ua;ua.Sb("MaterialVariant");var va=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.Se=null;H.renderOrder=0;return H}P(M,J);return M}(k);
g.Mesh=va;va.Bb("Mesh");var wa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.Se=null;return H}P(M,J);return M}(k);g.ku=wa;wa.Sb("Mesh");var xa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;H.pna=null;H.uMa=null;H.np=null;H.O=null;H.oma=null;H.lb=null;return H}P(M,J);return M}(k);g.Ci=xa;xa.Bb("Model");var ya=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.Yw=ya;
ya.Sb("Model");var za=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.mF=za;za.Bb("NotCollidable");var Aa=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.TRa=Aa;Aa.Sb("NotCollidable");var Ba=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.aqa=!0;H.bqa=!0;return H}P(M,J);return M}(k);g.vr=Ba;Ba.Bb("NotSelectable");var Ca=function(J){function M(){return J!==null&&J.apply(this,arguments)||
this}P(M,J);return M}(k);g.nF=Ca;Ca.Sb("NotSelectable");var Da=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.ta=null;return H}P(M,J);return M}(k);g.Object3D=Da;Da.Bb("Object3D");var Ea=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.id=null;H.container=null;return H}P(M,J);return M}(k);g.rK=Ea;Ea.Bb("Object3DId");var Fa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.Zw=Fa;Fa.Sb("Object3DId");
var Ga=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.ZU=void 0;H.castShadow=void 0;H.receiveShadow=void 0;H.opacity=1;H.gV=void 0;H.O=null;return H}P(M,J);return M}(k);g.Yh=Ga;Ga.Bb("ObjectTransform");var Ha=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.jB=Ha;Ha.Sb("ObjectTransform");var Ia=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(y);g.oF=Ia;Ia.Bb("OrbitControls");var Ja=function(J){function M(){var H=
J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.$w=Ja;Ja.Sb("OrbitControls");var Ka=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.width=100;H.height=100;return H}P(M,J);return M}(k);g.OrthographicCamera=Ka;Ka.Bb("OrthographicCamera");var La=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.camera=null;H.width=void 0;H.height=void 0;return H}P(M,J);return M}(k);g.lu=La;La.Sb("OrthographicCamera");var Ma=function(J){function M(){var H=
J!==null&&J.apply(this,arguments)||this;H.F=null;H.attach=!1;H.id=null;return H}P(M,J);return M}(k);g.nb=Ma;Ma.Bb("Parent");var Na=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.parent=null;H.de=null;H.id=void 0;H.attach=!1;return H}P(M,J);return M}(k);g.nu=Na;Na.Sb("Parent");var Oa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.width=100;H.height=100;H.Ek=void 0;H.Wd=void 0;H.fov=75;H.near=.01;H.far=100;H.Cka=!1;H.JFa=0;H.il=!1;return H}P(M,J);
return M}(k);g.PerspectiveCamera=Oa;Oa.Bb("PerspectiveCamera");var Pa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.camera=null;H.rl=null;H.scene=null;H.boundingBox=null;H.Lka=null;H.J7=!1;H.width=void 0;H.height=void 0;H.fov=void 0;H.Wd=void 0;H.Ek=void 0;H.near=void 0;H.far=void 0;return H}P(M,J);return M}(k);g.Kk=Pa;Pa.Sb("PerspectiveCamera");var Qa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.Ge=1;H.Ve=1;H.zh=1;H.scale=1;H.MD=void 0;H.ND=
void 0;return H}P(M,J);return M}(k);g.Lk=Qa;Qa.Bb("PixelScaleTransform");var Ra=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.qF=Ra;Ra.Sb("PixelScaleTransform");var Sa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.renderOrder=null;return H}P(M,J);return M}(k);g.Plane=Sa;Sa.Bb("Plane");var Ta=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.geometry=null;return H}P(M,J);return M}(k);g.mB=Ta;Ta.Sb("Plane");
var Ua=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.Oa=null;H.O=null;H.matrixWorld=null;H.origin=new p.Vector3;H.direction=new p.Vector3;H.Tb=new p.Vector2;H.EA=!1;H.Wka=!1;H.Lg=!1;H.enabled=!0;return H}P(M,J);return M}(k);g.xc=Ua;Ua.Bb("Pointer");var Va=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.F=null;H.rotate=!0;H.O=null;return H}P(M,J);return M}(k);g.vl=Va;Va.Bb("PointerOverTransform");var Wa=function(J){function M(){var H=J!==null&&J.apply(this,
arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.ou=Wa;Wa.Sb("PointerOverTransform");var Xa=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.bx=Xa;Xa.Sb("PointerDragging");var Ya=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.gx=Ya;Ya.Sb("PointerSelection");var Za=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.yE=null;H.NX=
null;H.VX=null;return H}P(M,J);return M}(k);g.ho=Za;Za.Bb("ProjectedMaterial");var $a=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.yE=null;H.ta=null;H.jP=null;H.eA=null;H.material=null;H.DO=null;return H}P(M,J);return M}(k);g.wr=$a;$a.Sb("ProjectedMaterial");var ab=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.lb=null;H.renderer=null;H.kX=[];return H}P(M,J);return M}(k);g.gj=ab;ab.Bb("Renderer");var bb=function(J){function M(){var H=J!==null&&
J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.pu=bb;bb.Sb("Renderer");var cb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.opacity=1;H.locked=!1;H.enabled=!0;H.scene=null;H.Oa=null;H.backgroundColor=null;H.Eka=null;H.KFa=null;H.environmentIntensity=1;H.pHa=null;H.Bla=null;H.GHa=null;H.HHa=0;H.CV=0;H.outputColorSpace=null;H.L7=1;H.O=null;return H}P(M,J);return M}(k);g.Scene=cb;cb.Bb("Scene");var db=function(J){function M(){var H=J!==null&&J.apply(this,
arguments)||this;H.scene=null;H.manager=null;return H}P(M,J);return M}(k);g.Hp=db;db.Sb("Scene");var eb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.O=null;H.CE=!1;H.$s=!0;H.It=!1;H.JA=!1;return H}P(M,J);return M}(k);g.ud=eb;eb.Bb("Selectable");var fb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.rF=fb;fb.Sb("Selectable");var gb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.color="#ffffff";H.opacity=
1;H.depthTest=!0;H.doubleSided=!1;return H}P(M,J);return M}(k);g.vd=gb;gb.Bb("SolidMaterial");var hb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.hx=hb;hb.Sb("SolidMaterial");var ib=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.radius=1;H.widthSegments=32;H.heightSegments=16;H.renderOrder=0;return H}P(M,J);return M}(k);g.Sphere=ib;ib.Bb("Sphere");var jb=function(J){function M(){return J!==null&&J.apply(this,
arguments)||this}P(M,J);return M}(k);g.sF=jb;jb.Sb("Sphere");var kb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.SpotLight=kb;kb.Bb("SpotLight");var lb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.light=null;H.mp=null;return H}P(M,J);return M}(k);g.ru=lb;lb.Sb("SpotLight");var mb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.yN=.5;H.zN=.5;H.height=100;H.width=100;H.scale=1;H.sizeAttenuation=!1;
H.ti=null;H.renderOrder=0;return H}P(M,J);return M}(k);g.Sprite=mb;mb.Bb("Sprite");var nb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.su=nb;nb.Sb("Sprite");var ob=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.xz=!1;H.positionX=0;H.positionY=0;H.positionZ=0;H.Yd=0;H.Ad=0;H.Ue=0;H.ff="XYZ";H.scale=1;H.Ge=1;H.Ve=1;H.zh=1;H.translationX=0;H.translationY=0;H.We=0;H.easing=0;H.O=null;return H}P(M,J);return M}(k);
g.sa=ob;ob.Bb("Transform");var pb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.xz=!1;H.positionX=0;H.positionY=0;H.positionZ=0;H.Yd=0;H.Ad=0;H.Ue=0;H.ff="XYZ";H.scale=1;H.Ge=1;H.Ve=1;H.zh=1;H.translationX=0;H.translationY=0;H.We=0;return H}P(M,J);return M}(k);g.ug=pb;pb.Sb("Transform");var qb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.vF=qb;qb.Sb("TransformEasing");var rb=function(J){function M(){var H=J!==null&&J.apply(this,
arguments)||this;H.translate=!0;H.rotate=!0;H.scale=!0;H.O=null;return H}P(M,J);return M}(k);g.Bh=rb;rb.Bb("TransformControls");var sb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.c9=null;H.xk=null;H.Sh=null;return H}P(M,J);return M}(k);g.Jm=sb;sb.Sb("TransformControls");var tb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.Eg=void 0;return H}P(M,J);return M}(y);g.jx=tb;tb.Bb("TransitionControls");var ub=function(J){function M(){var H=J!==null&&
J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.uu=ub;ub.Sb("TransitionControlsSystemState");var vb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.properties=null;H.yqa=null;H.O=null;return H}P(M,J);return M}(k);g.jo=vb;vb.Bb("VideoMaterial");var wb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.pB=wb;wb.Sb("VideoMaterial");var xb=function(J){function M(){var H=J!==null&&J.apply(this,
arguments)||this;H.Oa=null;H.width=null;H.height=null;return H}P(M,J);return M}(k);g.ko=xb;xb.Bb("Viewport");var yb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.Oa=null;H.properties=null;return H}P(M,J);return M}(k);g.xF=yb;yb.Bb("ViewportPlaneGeometry");var zb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.geometry=null;H.AOa=void 0;H.yOa=void 0;H.sh=void 0;H.verticalAlign=void 0;H.jE=void 0;H.zIndex=void 0;return H}P(M,J);return M}(k);g.lx=zb;
zb.Sb("ViewportPlaneGeometry");var Ab=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.VLa=1;H.xJa=.5;H.color="#000000";H.opacity=.5;return H}P(M,J);return M}(k);g.xK=Ab;Ab.Bb("VignetteEffect");var Bb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(k);g.hj=Bb;Bb.Sb("XRPerspectiveCamera");var Cb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.locked=!0;return H}P(M,J);return M}(k);g.yF=Cb;Cb.Bb("XRBasicControls");
var Db=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.Cr=Db;Db.Sb("XRBasicControlsSystemState");var Eb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(y);g.yK=Eb;Eb.Bb("XRDragControls");var Fb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.Dr=Fb;Fb.Sb("XRDragControlsSystemState");var Gb=function(J){function M(){return J!==
null&&J.apply(this,arguments)||this}P(M,J);return M}(y);g.zK=Gb;Gb.Bb("XRFlyControls");var Hb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);g.Er=Hb;Hb.Sb("XRFlyControlsSystemState");var Ib=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(y);g.AK=Ib;Ib.Bb("XRTeleportControls");var Jb=function(J){function M(){var H=J!==null&&J.apply(this,arguments)||this;H.manager=null;return H}P(M,J);return M}(k);
g.Fr=Jb;Jb.Sb("XRTeleportControlsSystemState")})(h||(h={}));return h});
define("tdv/player/view/Flash",["require","exports","tdv/player/view/util/Device"],function(a,m,k){return function(){function p(){this.pa=document.createElement("div");this.pa.style.position="absolute";this.pa.style.left="0";this.pa.style.top="0";this.pa.style.right="0";this.pa.style.bottom="0";this.pa.style.zIndex="0";this.pa.style.pointerEvents="none";this.pa.style.backgroundColor="#ffffff";this.pa.style.display="none";this.pa.style.opacity="0";this.pa.style.transition="opacity 100ms ease-in-out";
this.Ina=this.Ina.bind(this);this.l7=this.l7.bind(this)}p.prototype.ac=function(){return this.pa};p.prototype.Ina=function(){this.pa.removeEventListener("transitionend",this.Ina);this.pa.style.opacity="0";this.pa.addEventListener("transitionend",this.l7)};p.prototype.l7=function(){this.pa.removeEventListener("transitionend",this.l7);this.pa.style.display="none"};p.prototype.o=function(){k.Rb()!==k.xi&&(this.pa.style.display="block",this.pa.style.opacity="0",this.pa.offsetHeight,this.pa.style.opacity=
"1",this.pa.addEventListener("transitionend",this.ilb))};return p}()});
define("tdv/player/view/webgl/ecs/Entity",["require","exports"],function(){return function(){function a(m,k){this.T=m;this.tag=k||"Entity";this.id=this.tag+"_"+a.DW++;this.components={};this.cX={};this.Jpa=0}a.prototype.getComponent=function(m){return this.components[m.id]};a.prototype.N=function(m,k){k===void 0&&(k=!1);var p=this.components[m.id];p?this.T.Y9a(this,m):k&&(p=this.L(m));return p};a.prototype.L=function(m){if(m.id in this.components)return this.components[m.id];m.G6&&this.Jpa++;var k=
this.components[m.id]=new m;this.T.V8a(this,m);return k};a.prototype.ka=function(m){var k;k===void 0&&(k=!1);m.id in this.components&&(m.G6&&this.Jpa--,k?this.components[m.id].clear():this.cX[m.id]=this.components[m.id],delete this.components[m.id],this.T.RMa(this,m,k))};a.prototype.b$a=function(){for(var m in this.cX)this.cX[m].clear(),delete this.cX[m]};a.prototype.pfb=function(){for(var m in this.components){var k=this.components[m].constructor;k.G6||(this.cX[m]=this.components[m],delete this.components[m],
this.T.RMa(this,k,!1))}};a.DW=0;return a}()});define("tdv/player/view/webgl/ecs/Query",["require","exports"],function(){return function(){function a(){this.id=a.N0a++;this.v=[]}a.N0a=0;return a}()});
define("tdv/player/view/webgl/ecs/SystemQuery",["require","exports"],function(){return function(){function a(m,k){this.id=a.DW++;this.name=k;this.v=m.v;this.ce=m.v.slice();this.Ca=[];this.Og=[]}a.prototype.Z9a=function(){this.ce.length&&(this.ce=[]);this.Ca.length&&(this.Ca=[]);this.Og.length&&(this.Og=[])};a.DW=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,k,p){function h(b){return typeof b=="string"?b:b.id}function g(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.Lcb={};this.M={};this.qJ={};this.YN={};this.Mz={};this.oJ={};this.pV={};this.nJ={}}b.prototype.na=function(c){this.pV[c.id]={};this.pV[c.ia]={}};
b.prototype.T$a=function(c,d){c=this.HZa(c);d=new p(c,d);this.qJ[c.id].push(d);return d};b.prototype.HZa=function(c){var d=this.Sbb(c);if(d=this.Lcb[d])return d;d=new k;this.M[d.id]=d;c=c.map(h);this.nJ[d.id]={};for(var f=0;f<c.length;f++){var n=c[f];this.nJ[d.id][n]=!0;this.pV[n][d.id]=!0}this.oJ[d.id]={};this.qJ[d.id]=[];return d};b.prototype.Sbb=function(c){c=c.map(h);c.sort();return c.join("-")};b.prototype.jeb=function(c){this.YN[c.id]={};this.Mz[c.id]={}};b.prototype.keb=function(c){delete this.YN[c.id];
delete this.Mz[c.id]};b.prototype.eeb=function(c,d){var f=d.id,n=d.ia;d=c.id;this.YN[d][f]=!0;for(var l in this.Mz[d])if(n in this.nJ[l]){delete this.oJ[l][d];delete this.Mz[d][l];e(this.M[l].v,c);for(var q=this.qJ[l],r=0,t=q.length;r<t;r++){var u=q[r];g(u.Og,c);e(u.ce,c);e(u.Ca,c)}}for(l in this.pV[f])if(!(d in this.oJ[l])){f=!0;for(var v in this.nJ[l])if(n=v[0]!="!",(n?v:v.slice(1))in this.YN[d]!=n){f=!1;break}if(f)for(this.oJ[l][d]=!0,this.Mz[d][l]=!0,g(this.M[l].v,c),q=this.qJ[l],r=0,t=q.length;r<
t;r++)u=q[r],g(u.ce,c),e(u.Og,c),e(u.Ca,c)}};b.prototype.geb=function(c,d){var f=d.id,n="!"+f;d=c.id;delete this.YN[d][f];for(var l in this.Mz[d])if(f in this.nJ[l]){delete this.oJ[l][d];delete this.Mz[d][l];e(this.M[l].v,c);for(var q=this.qJ[l],r=0,t=q.length;r<t;r++){var u=q[r];g(u.Og,c);e(u.ce,c);e(u.Ca,c)}}for(l in this.pV[n])if(!(d in this.oJ[l])){f=!0;for(var v in this.nJ[l])if(n=v[0]!="!",(n?v:v.slice(1))in this.YN[d]!=n){f=!1;break}if(f)for(this.oJ[l][d]=!0,this.Mz[d][l]=!0,this.M[l].v.push(c),
q=this.qJ[l],r=0,t=q.length;r<t;r++)u=q[r],g(u.ce,c),e(u.Og,c),e(u.Ca,c)}};b.prototype.feb=function(c,d){d=d.id;var f=c.id,n;for(n in this.Mz[f])if(d in this.nJ[n]){f=this.qJ[n];for(var l=0,q=f.length;l<q;l++)g(f[l].Ca,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,k,p,h,g){return function(){function e(b){this.enabled=!0;this.v={};this.uV=[];this.components={};this.UX=[];this.pJ=new h;this.p5=[];this.bE=!1;this.kJ=b}e.prototype.j8=function(b){this.Oab=b};e.prototype.Jq=function(){return this.kJ};e.prototype.na=function(b){this.components[b.id]=b;this.pJ.na(b);
return this};e.prototype.gd=function(b,c){var d=(new b).initialize(this,c,this.UX.length);this.UX.push(d);for(var f in b.M)d[f]=this.pJ.T$a(b.M[f],c+"."+f);this.UX.sort(function(n,l){return n.order-l.order});return this};e.prototype.tc=function(b){b=new p(this,b);this.v[b.id]=b;this.pJ.jeb(b);this.Xa();return b};e.prototype.fd=function(b){b.id in this.v&&(delete this.v[b.id],this.uV.push(b),b.pfb(),this.Xa())};e.prototype.V8a=function(b,c){this.pJ.eeb(b,c);this.Xa()};e.prototype.RMa=function(b,c,
d){this.pJ.geb(b,c);d||this.p5.push(b);this.Xa()};e.prototype.Y9a=function(b,c){this.pJ.feb(b,c);this.Xa()};e.prototype.Ua=function(b){this.enabled=b;this.Xa()};e.prototype.Xa=function(){this.enabled&&!this.bE&&(this.bE=!0,k.requestFrame(this.update,this,g.isPresenting?void 0:this.Oab))};e.prototype.update=function(b){b=b||0;this.bE=!1;if(this.enabled){for(var c=(new Date).getTime(),d=0;d<this.UX.length;d++){var f=this.UX[d];f.cd(b,c);for(var n in f.constructor.M)f[n].Z9a()}for(d=0;d<this.p5.length;d++)this.p5[d].b$a();
this.p5.length=0;for(d=this.uV.length-1;d>=0;d--)this.uV[d].Jpa==0&&(this.pJ.keb(this.uV[d]),this.uV.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,k,p){p===void 0&&(p=0);this.T=m;this.name=k;this.order=p;return this};a.prototype.cd=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,k,p,h,g){a=function(e){function b(){var c=e.call(this)||this;c.Eb=c.Eb.bind(c);c.sb=c.sb.bind(c);c.Xf=c.Xf.bind(c);c.Ea=c.Ea.bind(c);return c}P(b,e);b.prototype.cd=function(){this.KD.v.length&&this.KD.v.slice().forEach(this.Eb);this.LD.v.length&&this.LD.v.slice().forEach(this.Ea);this.si.Ca.length&&
this.si.Ca.slice().forEach(this.sb);this.si.v.length&&this.si.v.slice().forEach(this.Xf)};b.prototype.Eb=function(c){var d=c.L(h.PA),f=c.L(h.Object3D);d.light=f.ta=new k.AmbientLight;this.sb(c)};b.prototype.sb=function(c){var d=c.getComponent(h.AmbientLight);c=c.getComponent(h.PA).light;c.color=p.ar(d.color).convertLinearToSRGB();c.intensity=d.intensity*Math.PI;c.visible=c.intensity>0};b.prototype.Xf=function(){};b.prototype.Ea=function(c){var d=c.getComponent(h.PA).light;d.parent&&d.parent.remove(d);
c.ka(h.PA);c.ka(h.Object3D)};b.M={};return b}(g);a.M={};a.M.KD=[h.AmbientLight,h.PA.ia];a.M.si=[h.AmbientLight,h.PA];a.M.LD=[h.AmbientLight.ia,h.PA];return a});
define("tdv/player/view/webgl/system/animation/AutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(h,g,e,b,c){this.B=h;this.De=g;this.Qg=e;this.xl=b;this.Ma=c;this.m3()}var k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState");m.prototype.getAnimations=function(){return this.Qg};m.prototype.LV=function(){return this.xl};m.prototype.frame=function(h){this.H==p.PLAYING&&(this.lv(this.$h.time+h/1E3),this.Ma())};m.prototype.dispose=
function(){this.L3();this.rB=this.HF=this.$h=this.Ma=this.xl=this.Qg=this.De=this.B=null};m.prototype.m3=function(){this.$h=new THREE.AnimationMixer(this.De);this.Zb=0;this.Ob=!1;this.HF=[];this.rB=[];for(var h=0;h<this.Qg.length;h++){var g=this.Qg[h],e=g.get("animationDirection")=="alternate",b=this.Zb;this.Zb+=this.xl[h].duration*(e?2:1);this.rB.push({start:b,end:this.Zb});b=this.$h.clipAction(this.xl[h]);e?b.setLoop(THREE.LoopPingPong,2):b.setLoop(THREE.LoopOnce,1);this.HF.push(b);g.set("state",
p.aa);g.set("currentTime",0);g.set("duration",this.xl[h].duration)}this.H=p.aa;this.Km=void 0;this.B.bind(k.K("state"),this.xj,this,!0);this.B.bind(k.K("currentTime"),this.eH,this,!0);this.B.bind(k.K("animationDirection"),this.Wya,this,!0);this.B.set("duration",this.Zb);this.lv(0);this.B.get("autoplay")&&this.B.set("state",p.PLAYING)};m.prototype.L3=function(){this.B.h(k.K("state"),this.xj,this,!0);this.B.h(k.K("currentTime"),this.eH,this,!0);this.B.h(k.K("animationDirection"),this.Wya,this,!0);this.B.set("state",
p.aa);for(var h=0;h<this.Qg.length;h++)this.HF[h].stop(),this.$h.uncacheClip(this.xl[h]),this.Qg[h].set("state",p.aa),this.Qg[h].set("currentTime",0);this.B.set("duration",void 0);this.B.set("currentTime",void 0)};m.prototype.Wya=function(){this.L3();this.m3()};m.prototype.xj=function(){var h=this.B.get("state");this.H!=h&&(this.H==p.aa?h==p.Xb?this.B.set("state",p.aa):h==p.PLAYING&&(this.H=p.PLAYING,this.Ob=!1,this.lv(0),this.Ma()):this.H==p.PLAYING?h==p.aa?(this.H=p.aa,this.Ob&&this.B.get("finalFrame")==
"last"?this.lv(this.Zb):this.lv(0)):h==p.Xb&&(this.H=p.Xb):this.H==p.Xb&&(h==p.PLAYING?(this.H=p.PLAYING,this.Ma()):h==p.aa&&(this.H=p.aa,this.lv(0))),this.Km!==void 0&&this.Qg[this.Km].set("state",this.H),this.B.set("state",this.H))};m.prototype.eH=function(){var h=this.B.get("currentTime");this.$h.time!=h&&(this.H!=p.aa&&this.lv(h),this.B.set("currentTime",this.$h.time))};m.prototype.lv=function(h){if(this.$h.time!=h||this.Km===void 0)if(h>this.Zb)this.B.get("loop")?this.B.set("currentTime",h%this.Zb):
(this.Ob=!0,this.B.o(k.Qb),this.B.set("state",p.aa));else{for(var g=this.Km||0;h>this.rB[g].end;)g++;for(;h<this.rB[g].start;)g--;if(this.Km!==g){for(var e=this.Km||0;e<g;e++){var b=this.Qg[e],c=this.HF[e],d=this.rB[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",p.aa)}b=this.Qg[g];c=this.HF[g];d=this.rB[g];
c.reset();c.startAt(d.start);c.clampWhenFinished=b.get("finalFrame")=="last"&&b.get("animationDirection")=="normal";c.play();for(e=this.Km||0;e>g;e--)b=this.Qg[e],c=this.HF[e],b.set("currentTime",0),c.stop();this.Km=g}else c=this.HF[this.Km],h<this.$h.time&&(c.reset(),c.startAt(this.rB[this.Km].start)),c.paused=!1;this.$h.update(h-this.$h.time);b=this.Qg[this.Km];b.set("state",this.H);h=this.$h.time-this.rB[this.Km].start;b=b.get("duration");g=h>b;this.Qg[this.Km].set("currentTime",g?2*b-h:h);this.Qg[this.Km].set("currentDirection",
g?"backward":"forward");this.B.set("currentTime",this.$h.time);this.Ma()}};return m});
define("tdv/player/view/webgl/system/animation/NonAutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(h,g,e,b,c){this.B=h;this.De=g;this.Qg=e;this.xl=b;this.Ma=c;this.ega=this.ega.bind(this);this.Wfa=this.Wfa.bind(this);this.m3()}var k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState");m.prototype.dispose=function(){this.L3();this.Ma=this.xl=this.Qg=this.De=this.B=null};m.prototype.getAnimations=function(){return this.Qg};m.prototype.LV=
function(){return this.xl};m.prototype.frame=function(h){this.ux.length>0&&(this.$h.update(h/1E3),this.ux.forEach(function(g){this.sta(g)}.bind(this)),this.Ma())};m.prototype.m3=function(){this.$h=new THREE.AnimationMixer(this.De);this.$h.addEventListener("loop",this.ega);this.$h.addEventListener("finished",this.Wfa);this.tx=new Map;this.nZ=new Map;this.ux=[];for(var h=0;h<this.Qg.length;h++){var g=this.Qg[h],e=this.xl[h];this.nZ.set(g,e);var b=this.$h.clipAction(e);this.tx.set(g,b);g.set("duration",
e.duration);g.set("currentTime",g.get("currentTime")||0);g.set("currentDirection","forward");g.bind(k.K("state"),this.Kya,this,!0);g.bind(k.K("animationDirection"),this.Hya,this,!0);g.bind(k.K("currentTime"),this.Gya,this,!0);g.bind(k.K("currentDirection"),this.Fya,this,!0);g.bind(k.K("loop"),this.Jya,this,!0);g.bind(k.K("finalFrame"),this.Iya,this,!0);this.fN(g);this.TDa(g)}this.Ma()};m.prototype.L3=function(){for(var h=0;h<this.Qg.length;h++){var g=this.Qg[h];g.h(k.K("state"),this.Kya,this,!0);
g.h(k.K("animationDirection"),this.Hya,this,!0);g.h(k.K("currentTime"),this.Gya,this,!0);g.h(k.K("currentDirection"),this.Fya,this,!0);g.h(k.K("loop"),this.Jya,this,!0);g.h(k.K("finalFrame"),this.Iya,this,!0);this.tx.get(g).stop();this.tx["delete"](g);this.$h.uncacheClip(this.nZ.get(g));this.nZ["delete"](g);this.Qg[h].set("state",p.aa);this.Qg[h].set("currentTime",0)}this.$h=this.nZ=this.tx=null};m.prototype.ega=function(h){this.tx.forEach(function(g,e){h.action==g&&e.get("loop")&&e.o(k.yr)})};m.prototype.Wfa=
function(h){this.tx.forEach(function(g,e){h.action==g&&(this.sta(e),e.set("state",p.aa),e.get("animationDirection")=="alternate"&&e.set("currentDirection",e.get("currentDirection")=="forward"?"backward":"forward"),e.o(k.Qb))}.bind(this))};m.prototype.Hya=function(h){this.fN(h.source)};m.prototype.Jya=function(h){this.fN(h.source)};m.prototype.Iya=function(h){this.fN(h.source)};m.prototype.Fya=function(h){this.fN(h.source)};m.prototype.Gya=function(h){this.fN(h.source)};m.prototype.sta=function(h){this.qta=
!0;var g=this.tx.get(h),e=h.get("animationDirection")=="alternate";e=g._loopCount>0&&g._loopCount%2==1&&e;h.set("currentDirection",e?"backward":"forward");g=g.time;var b=h.get("duration");e?h.set("currentTime",b-g):h.set("currentTime",g);this.qta=!1};m.prototype.fN=function(h){if(!this.qta){var g=this.tx.get(h),e=h.get("animationDirection")=="alternate",b=h.get("currentDirection")=="backward"&&e,c=h.get("loop"),d=h.get("finalFrame")=="last",f=h.get("currentTime");h=h.get("duration");c?(g.loop=e?THREE.LoopPingPong:
THREE.LoopRepeat,g.repetitions=Infinity,g.clampWhenFinished=!1):b?(g.loop=THREE.LoopPingPong,g.repetitions=2,g.clampWhenFinished=!1):(g.loop=THREE.LoopOnce,g.repetitions=1,g.clampWhenFinished=d||e);e=!e||g._loopCount!=-1&&g._loopCount%2!=0?e&&g._loopCount%2==1?h-f:f:b?h+h-f:f;g.time!=e&&(g.time=e,g.paused&&g.enabled&&e==0&&g.stop());this.Ma()}};m.prototype.Kya=function(h){this.TDa(h.source)};m.prototype.TDa=function(h){var g=this.tx.get(h),e=h.get("state");var b=this.ux.indexOf(h)>=0?p.PLAYING:g.paused&&
g.enabled&&g.time<h.get("duration")?p.Xb:p.aa;b!=e&&(b==p.PLAYING?e==p.Xb?(this.ux.splice(this.ux.indexOf(h),1),g.paused=!0):e==p.aa&&(this.ux.splice(this.ux.indexOf(h),1),!g.paused&&g.enabled&&g.stop()):b==p.Xb?e==p.PLAYING?(this.ux.push(h),g.paused=!1):e==p.aa&&g.stop():b==p.aa&&(e==p.PLAYING?(this.ux.push(h),g.paused&&g.enabled&&h.get("animationDirection")=="alternate"&&h.get("currentDirection")=="backward"?g.paused=!1:(g.reset(),g.play(),g.fadeIn(.1))):e==p.Xb&&(g.play(),g.paused=!0,this.$h.update(0))),
h.set("state",e),this.Ma())};return m});define("tdv/player/view/util/geo/Fov",["require","exports"],function(){return function(){function a(){}a.qm=function(m,k,p){return this.vI(m,k,p)};a.er=function(m,k,p){return this.vI(m,p,k)};a.vI=function(m,k,p){return 2*Math.atan(p*Math.tan(m*this.tF*.5)/k)*this.DSa};a.DSa=180/Math.PI;a.tF=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,k,p,h){return function(){function g(){}g.Rc=function(e){return e?e.isObject3D?e:(e=e.getComponent(k.Object3D))?e.ta:null:null};g.getWorldPosition=function(e,b){b=b||new h.Vector3;e=this.Rc(e);if(!e)return null;b.setFromMatrixPosition(e.matrixWorld);return b};g.CX=function(e,b){(e=e.getComponent(k.Object3D))&&e.ta!==null&&(e=e.ta,e.matrixAutoUpdate=
!1,e.matrixWorldNeedsUpdate=!1,b.xz&&e.parent?(e.parent.updateWorldMatrix(!0,!1),e.matrix.copy(e.parent.matrixWorld).invert()):e.matrix.identity(),e.matrix.multiply(this.R6.makeTranslation(b.translationX,b.translationY,b.We)),e.matrix.multiply(this.R6.makeRotationFromEuler(this.Aab.set(b.Yd*this.tF,b.Ad*this.tF,b.Ue*this.tF,b.ff))),e.matrix.multiply(this.R6.makeTranslation(b.positionX,b.positionY,b.positionZ)),e.matrix.multiply(this.R6.makeScale(b.scale*b.Ge,b.scale*b.Ve,b.scale*b.zh)),e.updateMatrixWorld(!0),
e.matrix.decompose(e.position,e.quaternion,e.scale))};g.LV=function(e){if(!e)return[];e=e.getComponent(k.Ci);return(e=e===null||e===void 0?void 0:e.oma)?e.animations||[]:[]};g.NV=function(e){return e.getComponent(k.lu)||e.getComponent(k.Kk)};g.jt=function(e){var b=e.getComponent(k.lu);return b?b.camera:(e=e.getComponent(k.Kk))?e.rl||e.camera:null};g.Mf=function(e){return this.SV(this.Rc(e))};g.SV=function(e){for(;e&&!e.isScene;)e=e.parent;return e};g.lhb=function(e,b){e.userData.camera=b};g.ohb=function(e,
b,c){e.userData.width=b;e.userData.height=c};g.mhb=function(e,b){e.userData.colorSpace!==b&&(e.userData.colorSpace=b,this.qqa(e))};g.nhb=function(e,b){e.userData.MHa!==b&&(e.userData.MHa=b,this.qqa(e))};g.Zv=function(e){return e.userData.camera};g.WV=function(e){return e.userData.width};g.BD=function(e){return e.userData.height};g.VV=function(e){return e.userData.colorSpace};g.w8=function(e,b){e.userData.background!==b&&(e.userData.background=b,this.qqa(e))};g.qqa=function(e){if(e&&e.userData){var b=
e.userData.background,c=e.userData.colorSpace,d=e.userData.MHa;b&&b.isColor?e.background=c==h.SRGBColorSpace||d?b:b.clone().convertLinearToSRGB():(b&&b.isTexture&&(b.colorSpace=c==h.SRGBColorSpace?h.SRGBColorSpace:h.LinearSRGBColorSpace),e.background=b)}};g.S8a=function(e,b){var c=e.userData.Fpa||(e.userData.Fpa=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.e9(e))};g.MMa=function(e,b){var c=e.userData.Fpa;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};g.e9=function(e){var b=e.userData.Fpa;
if(b){var c=-e.far*.99;b.forEach(function(d){d.position.z=c})}};g.U8a=function(e,b){var c=e.userData.Apa||(e.userData.Apa=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.KPa(e))};g.OMa=function(e,b){var c=e.userData.Apa;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};g.KPa=function(e){var b=e.userData.Apa;if(b){var c=e.far*.99;b.forEach(function(d){d.scale.x=d.scale.y=d.scale.z=c})}};g.T8a=function(e,b){var c=e.userData.yna||(e.userData.yna=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.JPa(e))};
g.NMa=function(e,b){var c=e.userData.yna;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};g.JPa=function(e){var b=e.userData.yna;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?p.er(e.fov,e.aspect,1):e.fov)*this.tF*.5)*c*2}.bind(this))}};g.II=function(e){if((e=this.Rc(e))&&e.parent){var b=this.PIa(e);if(b)return this.FW.setFromMatrixScale(e.parent.matrixWorld),b/Math.max(this.FW.x,this.FW.y,this.FW.z)}};g.PIa=function(e){if((e=
this.Rc(e))&&e.parent){var b=this.SV(e);if(b){var c=this.Zv(b);if(c)return e.matrixWorld.decompose(this.objectPosition,this.$db,this.FW),this.objectPosition.applyMatrix4(c.matrixWorldInverse),this.jm.setFromMatrixScale(c.matrixWorld),Math.abs(this.objectPosition.z)*2*Math.tan(c.fov*this.tF/2)*Math.max(this.jm.x,this.jm.y,this.jm.z)/this.BD(b)}}};g.wD=function(e,b){if(e.userData.id===b)return e;var c=null;if(e.children)for(var d=0;d<e.children.length&&!c;d++)c=this.wD(e.children[d],b);if(!c&&e.skeleton)for(d=
0;d<e.skeleton.bones.length&&!c;d++)c=this.wD(e.skeleton.bones[d],b);return c};g.YHa=function(){this.ula||(this.ula=new h.WebGLRenderer);return this.ula};g.lOa=function(e){this.pla||(this.pla=new h.DRACOLoader,this.pla.setDecoderPath(h.Pqa));this.K6||(this.K6=new h.KTX2Loader,this.K6.setTranscoderPath(h.Gqa),this.K6.detectSupport(this.YHa()));e.setKTX2Loader(this.K6);e.setMeshoptDecoder(h.MeshoptDecoder);e.setDRACOLoader(this.pla);return e};g.R6=new h.Matrix4;g.Aab=new h.Euler;g.objectPosition=new h.Vector3;
g.$db=new h.Quaternion;g.FW=new h.Vector3;g.jm=new h.Vector3;g.tF=Math.PI/180;g.ula=null;return g}()});
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.A=f;this.xl=this.De=null;this.oZ={};this.n_=new Map;this.Uu=this.Lm=this.B=null;this.Zg=!1;this.nS=this.nS.bind(this);
this.update()}function k(f,n){if(f==n||!(f!=null&&f.length!=0||n!=null&&n.length!=0))return!0;if(f==null||n==null||f.length!=n.length)return!1;for(var l=0;l<f.length;l++)if(f[l]!=n[l])return!1;return!0}var p=a("tdv/binding/BindingsHandler"),h=a("tdv/constants/PlaybackState"),g=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.A.getComponent(g.Animation);this.Fj(f&&f.properties)};m.prototype.frame=function(f,n){this.kN();this.Zg&&(this.Zg=!1,this.Lm&&this.Lm.frame(f,n),this.Uu&&this.Uu.frame(f,n))};m.prototype.dispose=function(){this.Fj(null)};m.prototype.Fj=function(f){this.B!=f&&(this.B&&(p.ca(this.B,["animations.autoplay"],this.nS),this.z3a()),(this.B=f)&&p.fD(this.B,["animations.autoplay"],this.nS),this.nS())};m.prototype.nS=function(){this.aEa()};m.prototype.kN=function(){if(!this.De){var f=
d.Rc(this.A),n=d.LV(this.A);if(this.De!=f||this.xl!=n)this.De=f,this.xl=n,this.oZ={},this.xl.forEach(function(l){l.name&&(this.oZ[l.name]=l)}.bind(this)),this.aEa()}};m.prototype.aEa=function(){var f=this.B&&this.B.get("animations")||[],n=this.xl||[],l=n.slice(),q=[],r=[],t=[],u=[];f.length&&n.length&&f.forEach(function(v){var w=v.get("index"),y=v.get("name"),x;w!==void 0&&w<n.length?x=n[w]:y!==void 0&&y in this.oZ&&(x=this.oZ[y]);l.indexOf(x)>=0&&(l.splice(l.indexOf(x),1),v.get("autoplay")?(q.push(x),
r.push(v)):(t.push(x),u.push(v)))}.bind(this));this.B&&r.length==0&&l.length>0&&(r=l.map(function(v){if(this.n_.has(v))return this.n_.get(v);var w=new e;this.n_.set(v,w);return w}.bind(this)),q=l);k(this.Lm&&this.Lm.getAnimations()||[],r)&&k(this.Lm&&this.Lm.LV()||[],q)||(this.Lm&&(this.Lm.dispose(),this.Lm=null),r.length>0&&(this.Lm=new b(this.B,this.De,r,q,this.Ma.bind(this))));k(this.Uu&&this.Uu.getAnimations()||[],u)&&k(this.Uu&&this.Uu.LV()||[],t)||(this.Uu&&(this.Uu.dispose(),this.Uu=null),
u.length>0&&(this.Uu=new c(this.B,this.De,u,t,this.Ma.bind(this))))};m.prototype.z3a=function(){(this.B&&this.B.get("animations")||[]).forEach(function(f){f.set("state",h.aa);f.set("currentTime",0)});this.n_.clear()};m.prototype.Ma=function(){this.Zg||(this.Zg=!0,this.A.T.Xa())};m.Ya=function(f){f.L(g.Gw).manager=new m(f)};m.Ba=function(f){var n=f.getComponent(g.Gw);n.manager.dispose();n.manager=null;f.ka(g.Gw)};m.update=function(f){f.getComponent(g.Gw).manager.update()};m.frame=function(f,n,l){f.getComponent(g.Gw).manager.frame(n,
l)};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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/animation/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(g,e){this.yFa.v.length&&this.yFa.v.slice().forEach(h.Ya);this.animations.Ca.length&&
this.animations.Ca.slice().forEach(function(b){h.update(b,g,e)});this.animations.v.length&&this.animations.v.slice().forEach(function(b){h.frame(b,g,e)});this.zFa.v.length&&this.zFa.v.slice().forEach(h.Ba)};a.M={};a.M.yFa=[p.Animation,p.Gw.ia];a.M.zFa=[p.Animation.ia,p.Gw];a.M.animations=[p.Animation,p.Gw];return a});
define("tdv/player/view/util/geo/Tessellate",["require"],function(){function a(v,w,y,x,z){for(var A,D=0,E=w,B=y-x;E<y;E+=x)D+=(v[B]-v[E])*(v[E+1]+v[B+1]),B=E;if(z===D>0)for(z=w;z<y;z+=x)A=r(z,v[z],v[z+1],A);else for(z=y-x;z>=w;z-=x)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 y=!1;if(v.QOa||!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;y=!0}}while(y||v!==w);return w}function k(v,w,y,x,z,A,D){if(v){if(!D&&
A){var E=v,B=E;do B.z===0&&(B.z=g(B.x,B.y,x,z,A)),B.Ft=B.Xd,B=B.Ln=B.next;while(B!==E);B.Ft.Ln=null;B.Ft=null;E=B;var C,I,F,G,N=1;do{B=E;var O=E=null;for(I=0;B;){I++;var R=B;for(C=F=0;C<N&&(F++,R=R.Ln,R);C++);for(G=N;F>0||G>0&&R;)F!==0&&(G===0||!R||B.z<=R.z)?(C=B,B=B.Ln,F--):(C=R,R=R.Ln,G--),O?O.Ln=C:E=C,C.Ft=O,O=C;B=R}O.Ln=null;N*=2}while(I>1)}for(E=v;v.Xd!==v.next;){B=v.Xd;R=v.next;if(A)O=p(v,x,z,A);else a:{var S=v;O=S.Xd;G=S.next;if(b(O,S,G)>=0)O=!1;else{I=O.x;F=S.x;N=G.x;C=O.y;S=S.y;var K=G.y,
L=I<F?I<N?I:N:F<N?F:N,Q=C<S?C<K?C:K:S<K?S:K,T=I>F?I>N?I:N:F>N?F:N,W=C>S?C>K?C:K:S>K?S:K;for(G=G.next;G!==O;){if(G.x>=L&&G.x<=T&&G.y>=Q&&G.y<=W&&e(I,C,F,S,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(B.th/y|0),w.push(v.th/y|0),w.push(R.th/y|0),t(v),E=v=R.next;else if(v=R,v===E){if(D)if(D===1){v=m(v);D=w;E=y;B=v;do R=B.Xd,O=B.next.next,!c(R,O)&&d(R,B,B.next,O)&&l(R,O)&&l(O,R)&&(D.push(R.th/E|0),D.push(B.th/E|0),D.push(O.th/E|0),t(B),t(B.next),B=v=O),B=B.next;while(B!==
v);v=m(B);k(v,w,y,x,z,A,2)}else{if(D===2)a:{D=v;do{for(E=D.next.next;E!==D.Xd;){if(B=D.th!==E.th){B=D;R=E;if(O=B.next.th!==R.th&&B.Xd.th!==R.th){b:{O=B;do{if(O.th!==B.th&&O.next.th!==B.th&&O.th!==R.th&&O.next.th!==R.th&&d(O,O.next,B,R)){O=!0;break b}O=O.next}while(O!==B);O=!1}O=!O}if(O){if(O=l(B,R)&&l(R,B)){O=B;I=!1;F=(B.x+R.x)/2;N=(B.y+R.y)/2;do O.y>N!==O.next.y>N&&O.next.y!==O.y&&F<(O.next.x-O.x)*(N-O.y)/(O.next.y-O.y)+O.x&&(I=!I),O=O.next;while(O!==B);O=I}O=O&&(b(B.Xd,B,R.Xd)||b(B,R.Xd,R))||c(B,
R)&&b(B.Xd,B,B.next)>0&&b(R.Xd,R,R.next)>0}B=O}if(B){v=q(D,E);D=m(D,D.next);v=m(v,v.next);k(D,w,y,x,z,A,0);k(v,w,y,x,z,A,0);break a}E=E.next}D=D.next}while(D!==v)}}else k(m(v),w,y,x,z,A,1);break}}}}function p(v,w,y,x){var z=v.Xd,A=v.next;if(b(z,v,A)>=0)return!1;var D=z.x,E=v.x,B=A.x,C=z.y,I=v.y,F=A.y,G=D<E?D<B?D:B:E<B?E:B,N=C<I?C<F?C:F:I<F?I:F,O=D>E?D>B?D:B:E>B?E:B,R=C>I?C>F?C:F:I>F?I:F,S=g(G,N,w,y,x);w=g(O,R,w,y,x);y=v.Ft;for(v=v.Ln;y&&y.z>=S&&v&&v.z<=w;){if(y.x>=G&&y.x<=O&&y.y>=N&&y.y<=R&&y!==z&&
y!==A&&e(D,C,E,I,B,F,y.x,y.y)&&b(y.Xd,y,y.next)>=0)return!1;y=y.Ft;if(v.x>=G&&v.x<=O&&v.y>=N&&v.y<=R&&v!==z&&v!==A&&e(D,C,E,I,B,F,v.x,v.y)&&b(v.Xd,v,v.next)>=0)return!1;v=v.Ln}for(;y&&y.z>=S;){if(y.x>=G&&y.x<=O&&y.y>=N&&y.y<=R&&y!==z&&y!==A&&e(D,C,E,I,B,F,y.x,y.y)&&b(y.Xd,y,y.next)>=0)return!1;y=y.Ft}for(;v&&v.z<=w;){if(v.x>=G&&v.x<=O&&v.y>=N&&v.y<=R&&v!==z&&v!==A&&e(D,C,E,I,B,F,v.x,v.y)&&b(v.Xd,v,v.next)>=0)return!1;v=v.Ln}return!0}function h(v,w){return v.x-w.x}function g(v,w,y,x,z){v=(v-y)*z|0;
w=(w-x)*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,y,x,z,A,D,E){return(z-D)*(w-E)>=(v-D)*(A-E)&&(v-D)*(x-E)>=(y-D)*(w-E)&&(y-D)*(A-E)>=(z-D)*(x-E)}function b(v,w,y){return(w.y-v.y)*(y.x-w.x)-(w.x-v.x)*(y.y-w.y)}function c(v,w){return v.x===w.x&&v.y===w.y}function d(v,w,y,x){var z=n(b(v,w,y)),A=n(b(v,w,x)),D=n(b(y,x,v)),E=n(b(y,x,w));return z!==A&&D!==
E||z===0&&f(v,y,w)||A===0&&f(v,x,w)||D===0&&f(y,v,x)||E===0&&f(y,w,x)?!0:!1}function f(v,w,y){return w.x<=Math.max(v.x,y.x)&&w.x>=Math.min(v.x,y.x)&&w.y<=Math.max(v.y,y.y)&&w.y>=Math.min(v.y,y.y)}function n(v){return v>0?1:v<0?-1:0}function l(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 y=new u(v.th,v.x,v.y),x=new u(w.th,w.x,w.y),z=v.next,A=w.Xd;v.next=w;w.Xd=v;y.next=z;z.Xd=y;x.next=y;y.Xd=x;A.next=x;x.Xd=A;return x}function r(v,
w,y,x){v=new u(v,w,y);x?(v.next=x.next,v.Xd=x,x.next.Xd=v,x.next=v):(v.Xd=v,v.next=v);return v}function t(v){v.next.Xd=v.Xd;v.Xd.next=v.next;v.Ft&&(v.Ft.Ln=v.Ln);v.Ln&&(v.Ln.Ft=v.Ft)}function u(v,w,y){this.th=v;this.x=w;this.y=y;this.next=this.Xd=null;this.z=0;this.Ln=this.Ft=null;this.QOa=!1}return function(v,w,y){y=y||2;var x=w&&w.length,z=x?w[0]*y:v.length,A=a(v,0,z,y,!0),D=[];if(!A||A.next===A.Xd)return D;var E;if(x){var B=A;var C=y;A=[];var I;x=0;for(I=w.length;x<I;x++){var F=w[x]*C;var G=x<
I-1?w[x+1]*C:v.length;F=a(v,F,G,C,!1);F===F.next&&(F.QOa=!0);G=A;var N=G.push,O=F,R=F;do{if(O.x<R.x||O.x===R.x&&O.y<R.y)R=O;O=O.next}while(O!==F);N.call(G,R)}A.sort(h);for(x=0;x<A.length;x++){C=void 0;w=A[x];b:{I=B;F=w.x;G=w.y;N=-Infinity;do{if(G<=I.y&&G>=I.next.y&&I.next.y!==I.y&&(O=I.x+(G-I.y)*(I.next.x-I.x)/(I.next.y-I.y),O<=F&&O>N&&(N=O,C=I.x<I.next.x?I:I.next,O===F)))break b;I=I.next}while(I!==B);if(C){R=C;var S=C.x,K=C.y,L=Infinity;I=C;do{if(F>=I.x&&I.x>=S&&F!==I.x&&e(G<K?F:N,G,S,K,G<K?N:F,
G,I.x,I.y)){O=Math.abs(G-I.y)/(F-I.x);var Q;if((Q=l(I,w))&&!(Q=O<L)&&(Q=O===L)&&!(Q=I.x>C.x)&&(Q=I.x===C.x)){Q=C;var T=I;Q=b(Q.Xd,Q,T.Xd)<0&&b(T.next,Q,Q.next)<0}Q&&(C=I,L=O)}I=I.next}while(I!==R)}else C=null}C&&(w=q(C,w),m(w,w.next),B=m(C,C.next))}A=B}if(v.length>80*y){var W=E=v[0];var X=x=v[1];for(B=y;B<z;B+=y)w=v[B],C=v[B+1],w<W&&(W=w),C<X&&(X=C),w>E&&(E=w),C>x&&(x=C);E=Math.max(E-W,x-X);E=E!==0?32767/E:0}k(A,D,y,W,X,E,0);return D}});
define("tdv/player/view/webgl/system/util/material/Util",["require","exports","three.mod"],function(a,m,k){return function(){function p(){}p.Ibb=function(h){return h.userData.yt||h.material};p.iD=function(h,g){if(h.material!=g&&h.userData.yt!=g){var e=h.userData.wW,b=h.userData.hna;this.gX(h);h.material=g;b?this.EGa(h):e&&this.Ala(h);h.needsUpdate=!0}};p.Ala=function(h,g){g===void 0&&(g=null);h.userData.wW||(h.userData.wW=!0,h.userData.yt=h.material,h.material=g||this.l$a(h.material))};p.gX=function(h){h.userData.wW&&
(this.h5(h.material),h.material=h.userData.yt,delete h.userData.yt,delete h.userData.wW,delete h.userData.hna)};p.ajb=function(h){if(h.userData.wW){var g=h.userData.yt;h=h.material;h.side=g.side;h.depthTest=g.depthTest;h.map&&g.map&&(h.map.colorSpace=g.map.colorSpace);h.emissiveMap&&g.emissiveMap&&(h.emissiveMap.colorSpace=g.emissiveMap.colorSpace)}};p.EGa=function(h){this.tcb(h)||(this.gX(h),this.Ala(h,this.k$a(h.material)),h.userData.hna=!0)};p.tcb=function(h){return!(!h.userData.hna&&h.material&&
!this.y6(h.material))};p.y6=function(h){return Array.isArray(h)?!!h.every(function(g){return p.y6(g)}):h?!(h.isMeshPhysicalMaterial||h.isMeshStandardMaterial):!1};p.k$a=function(h){return Array.isArray(h)?h.map(function(g){return p.qGa(g)}):h?this.qGa(h):h};p.qGa=function(h){return(new k.MeshBasicMaterial).copy(h)};p.l$a=function(h){return Array.isArray(h)?h.map(function(g){return g.clone()}):h?h.clone():h};p.h5=function(h){Array.isArray(h)?h.forEach(function(g){g.dispose()}):h&&h.dispose()};return p}()});
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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/util/geo/Tessellate"),h=a("tdv/player/view/webgl/ecs/System"),g=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(h,function(){h.apply(this,arguments);this.Eb=this.Eb.bind(this);this.sb=this.sb.bind(this);this.Ea=this.Ea.bind(this);this.g9=this.g9.bind(this)});a.prototype.cd=function(){this.CFa.v.length&&this.CFa.v.slice().forEach(this.Eb);this.BFa.Ca.length&&this.Vib(this.BFa.Ca.slice());this.areas.Ca.length&&this.areas.Ca.slice().forEach(this.sb);this.DFa.v.length&&this.DFa.v.slice().forEach(this.Ea);this.EFa.v.length&&this.EFa.v.slice().forEach(this.Ea)};
a.prototype.Eb=function(F){F.L(g.QA);this.sb(F)};a.prototype.sb=function(F){this.njb(F);this.$n(F)};a.prototype.Vib=function(F){var G=[];F.forEach(function(N){N.getComponent(g.ME).J4.forEach(function(O){G.indexOf(O)===-1&&G.push(O)})});G.forEach(this.g9)};a.prototype.njb=function(F){this.xjb(F);this.g9(F)};a.prototype.xjb=function(F){var G=F.getComponent(g.co),N=G&&G.v||[],O=(G=F.getComponent(g.QA))&&G.v||[];O.forEach(function(R){if(N.indexOf(R)===-1){var S=R.getComponent(g.ME).J4.filter(function(K){return K!==
K});S.length==0?R.ka(g.ME):R.N(g.ME).J4=S}});N.forEach(function(R){O.indexOf(R)===-1&&R.N(g.ME,!0).J4.push(F)})};var c=new THREE.Matrix4,d=[];a.prototype.g9=function(F){var G=F.getComponent(g.co);for(G=G&&G.v||[];d.length<G.length;)d.push(new THREE.Vector3);var N=G.map(function(L,Q){return L.getComponent(g.Object3D).ta.getWorldPosition(d[Q])});N=N.filter(function(L,Q){return L.distanceTo(N[(Q+1)%N.length])>1E-4});G=this.Zbb(N);if(G.length===0)this.bva(F),this.FDa(F);else{this.M4a(F,G.length*3);this.yjb(F,
d,G);c.copy(F.getComponent(g.Object3D).ta.matrixWorld).invert();d.forEach(function(L){L.applyMatrix4(c)});F=F.getComponent(g.Geometry);for(var O=F.geometry.attributes.position.array,R=0,S=0;R<G.length;){var K=d[G[R++]];O[S++]=K.x;O[S++]=K.y;O[S++]=K.z;K=d[G[R++]];O[S++]=K.x;O[S++]=K.y;O[S++]=K.z;K=d[G[R++]];O[S++]=K.x;O[S++]=K.y;O[S++]=K.z}F.geometry.attributes.position.needsUpdate=!0}};var f=new THREE.Plane,n=new THREE.Vector3,l=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,y=new THREE.Vector3,x=5*Math.PI/180;a.prototype.Zbb=function(F){if(F.length<3)return[];var G=F[0];for(var N=Number.NEGATIVE_INFINITY,O=1;O<F.length;++O){var R=G.distanceToSquared(F[O]);if(!(R<=N)){N=R;var S=F[O]}}if(N<=0)return[];r.set(G,S);N=Number.NEGATIVE_INFINITY;for(O=0;O<F.length;++O)if(R=r.closestPointToPoint(F[O],!0,t).distanceToSquared(F[O]),!(R<=N)){N=R;var K=F[O]}if(N<=0)return[];f.setFromCoplanarPoints(G,S,K);for(O=0;O<F.length;++O)if(N=
F[O],N!==G&&N!==S&&N!==K){u.copy(G).sub(N).normalize();v.copy(S).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?y.copy(u).cross(v):R<L?y.copy(u).cross(w):y.copy(v).cross(w);y.normalize();N=Math.abs(Math.acos(y.dot(f.normal)));N>Math.PI*.5&&(N=Math.PI-N);if(N>x)return[]}l.copy(F[1]).sub(F[0]).normalize();q.copy(f.normal).cross(l).normalize();G=[];for(O=0;O<F.length;++O)f.projectPoint(F[O],n),G.push(n.dot(l),n.dot(q));return p(G,null,2)};var z=new THREE.Vector3,
A=new THREE.Vector3,D=new THREE.Vector3,E=new THREE.Vector3,B=new THREE.Vector3,C=new THREE.Vector3,I=new THREE.Vector3;a.prototype.yjb=function(F,G,N){var O=0;z.set(0,0,0);for(var R=0;R<N.length;){D.copy(G[N[R++]]);E.copy(G[N[R++]]);B.copy(G[N[R++]]);A.copy(D).add(E).add(B).divideScalar(3);var S=I.subVectors(B,D).cross(C.subVectors(E,D)).length()*.5;A.multiplyScalar(S);z.add(A);O+=S}z.divideScalar(O);G=F.N(g.sa,!0);G.positionX=z.x;G.positionY=z.y;G.positionZ=z.z;e.CX(F,G);this.FDa(F,O)};a.prototype.FDa=
function(F,G){(F=(F=F.N(g.co))&&F.O)&&F.o(k.V,{area:G})};a.prototype.$n=function(F){var G=F.getComponent(g.Object3D);if(G=G&&G.ta){var N=F.getComponent(g.Material).material;N&&b.iD(G,N);G.renderOrder=F.getComponent(g.co).renderOrder}};a.prototype.bva=function(F){var G=F.getComponent(g.Geometry);G&&(G.geometry&&G.geometry.dispose(),F.ka(g.Geometry),F.getComponent(g.Object3D).ta.geometry=null);if(G=F.getComponent(g.Object3D))G.ta&&G.ta.parent&&G.ta.parent.remove(G.ta),F.ka(g.Object3D)};a.prototype.M4a=
function(F,G){var N=F.getComponent(g.Geometry);N&&N.geometry&&N.geometry.attributes.position.array.length===G*3||(N=F.N(g.Geometry,!0),N.geometry&&N.geometry.dispose(),N.geometry=this.jWa(G),G=F.getComponent(g.Object3D),G||(G=F.L(g.Object3D),G.ta=new THREE.Mesh,this.$n(F)),G.ta.geometry=N.geometry)};a.prototype.jWa=function(F){var G=new THREE.BufferGeometry,N=G.setAttribute,O=THREE.Float32BufferAttribute;F*=3;for(var R=[],S=0;S<F;S++)R.push(0);N.call(G,"position",new O(R,3));return G};a.prototype.Ea=
function(F){this.bva(F);F.ka(g.QA);F.ka(g.Object3D)};a.M={};a.M.CFa=[g.Material,g.co,g.QA.ia];a.M.BFa=[g.Object3D,g.sa,g.ME];a.M.areas=[g.co,g.Material,g.QA];a.M.DFa=[g.co.ia,g.QA];a.M.EFa=[g.Material.ia,g.QA];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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/webgl/ecs/System"),h=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(p,function(){p.apply(this,arguments);this.qpa=this.qpa.bind(this);this.V8=
this.V8.bind(this);this.ppa=this.ppa.bind(this);this.U8=this.U8.bind(this);this.hV=new Map;this.RKa=new Map;this.P4=new Map;this.SKa=new Map});a.prototype.cd=function(){this.LFa.v.length&&this.LFa.v.slice().forEach(this.qpa);this.MFa.v.length&&this.MFa.v.slice().forEach(this.V8);this.NFa.v.length&&this.NFa.v.slice().forEach(this.V8);this.OFa.v.length&&this.OFa.v.slice().forEach(this.ppa);this.PFa.v.length&&this.PFa.v.slice().forEach(this.U8);this.QFa.v.length&&this.QFa.v.slice().forEach(this.U8);
this.frame()};a.M={};a.M.LFa=[h.Object3D,h.Bp,h.Lw.ia];a.M.C9a=[h.Object3D,h.Bp,h.Lw];a.M.MFa=[h.Object3D.ia,h.Lw];a.M.NFa=[h.Bp.ia,h.Lw];a.M.OFa=[h.Object3D,h.TA,h.UA.ia];a.M.PFa=[h.Object3D.ia,h.UA];a.M.QFa=[h.TA.ia,h.UA];a.prototype.frame=function(){this.C9a.v.length!=0&&this.P4.forEach(function(e,b){var c=this.hV.get(b)||[];c.forEach(function(d){var f=d.getComponent(h.Object3D).ta;d.getComponent(h.UA).position.set(0,0,0).applyMatrix4(f.matrixWorld)});e.forEach(function(d){var f=d.getComponent(h.Object3D).ta;
d.getComponent(h.Lw).position.set(0,0,0).applyMatrix4(f.matrixWorld)});e.forEach(function(d){var f=d.getComponent(h.Bp).O;d=this.MV(c,d.getComponent(h.Lw).position);f.o(k.V,{beacons:d})}.bind(this))}.bind(this))};a.prototype.Xab=function(e){return function(b){var c=this.hV.get(e.T)||[];return this.MV(c,b)}.bind(this)};a.prototype.MV=function(e,b){e=e.map(function(c){return{entity:c,distance:b.distanceTo(c.getComponent(h.UA).position)}});e.sort(function(c,d){return c.distance-d.distance});return e};
a.prototype.qpa=function(e){e.L(h.Lw).position=new THREE.Vector3;this.SKa.set(e,g.Rc(e));var b=this.P4.get(e.T);b||this.P4.set(e.T,b=[]);b.indexOf(e)<0&&b.push(e);e.getComponent(h.Bp).MV=this.Xab(e)};a.prototype.V8=function(e){var b=this.P4.get(e.T),c=b.indexOf(e);c>=0&&b.splice(c,1);this.SKa["delete"](e);e.ka(h.Lw)};a.prototype.ppa=function(e){e.L(h.UA).position=new THREE.Vector3;this.RKa.set(e,g.Rc(e));var b=this.hV.get(e.T);b||this.hV.set(e.T,b=[]);b.indexOf(e)<0&&b.push(e)};a.prototype.U8=function(e){var b=
this.hV.get(e.T),c=b.indexOf(e);c>=0&&b.splice(c,1);this.RKa["delete"](e);e.ka(h.UA)};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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/webgl/ecs/System"),h=a("tdv/player/view/webgl/components"),g=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(p,function(){p.apply(this,arguments);this.spa=this.spa.bind(this);this.tpa=this.tpa.bind(this);this.h9=this.h9.bind(this);this.i9=this.i9.bind(this);this.Npa=this.Npa.bind(this);this.Opa=this.Opa.bind(this);e.O.bind(k.V,this.kb,this,!0)});a.prototype.cd=function(){this.TLa.v.length&&this.TLa.v.slice().forEach(this.spa);this.bMa.v.length&&this.bMa.v.slice().forEach(this.tpa);this.hJ.Ca.length&&this.hJ.Ca.slice().forEach(this.h9);this.Bt.Ca.length&&this.Bt.Ca.slice().forEach(this.i9);this.ULa.v.length&&
this.ULa.v.slice().forEach(this.Npa);this.cMa.v.length&&this.cMa.v.slice().forEach(this.Opa)};a.prototype.kb=function(){this.Bt.v.forEach(function(q){q.N(h.PerspectiveCamera)})};a.prototype.spa=function(q){var r=q.N(h.OrthographicCamera),t=q.L(h.lu);q.L(h.Object3D).ta=t.camera=r.camera=new THREE.OrthographicCamera;this.h9(q)};a.prototype.tpa=function(q){var r=q.N(h.PerspectiveCamera),t=q.L(h.Kk);t.boundingBox=new THREE.Box3;t.J7=!0;q.L(h.Object3D).ta=t.camera=r.camera=new THREE.PerspectiveCamera;
this.i9(q)};a.prototype.h9=function(q){var r=q.getComponent(h.OrthographicCamera);q=q.getComponent(h.lu);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.i9=function(q){var r=q.getComponent(h.PerspectiveCamera),t=q.getComponent(h.Kk);r.il&&e.Dg?(q.L(h.hj),t.width=e.framebufferWidth?e.framebufferWidth*.5:r.width,t.height=e.framebufferHeight||r.height,q=t.rl=e.Dg.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.e9(q)):(q.ka(h.hj),t.fov=r.fov,t.Wd=r.Wd,t.Ek=r.Ek,t.width=r.width,t.height=r.height,t.rl=null,q=t.camera,q.aspect=t.width/t.height,q.fov=r.Wd?g.qm(r.Wd,t.width,t.height):r.Ek?r.Ek:t.width>t.height?g.qm(t.fov,t.width,t.height):t.fov,q.near=t.near=r.near,q.far=t.far=r.far,b.e9(q),t.camera.updateProjectionMatrix())};a.prototype.Npa=function(q){var r=q.getComponent(h.lu);
r.camera.parent&&r.camera.parent.remove(r.camera);r.camera=null;q.ka(h.lu);q.ka(h.Object3D)};a.prototype.Opa=function(q){var r=q.getComponent(h.Kk),t=r.camera;e.Flb&&t.parent&&t.parent.remove(t);r.camera=null;q.ka(h.Kk);q.ka(h.Object3D)};a.M={};a.M.TLa=[h.OrthographicCamera,h.lu.ia];a.M.ULa=[h.OrthographicCamera.ia,h.lu];a.M.bMa=[h.PerspectiveCamera,h.Kk.ia];a.M.cMa=[h.PerspectiveCamera.ia,h.Kk];a.M.hJ=[h.OrthographicCamera,h.lu];a.M.Bt=[h.PerspectiveCamera,h.Kk];a.YJ=m.extend(p,function(){p.apply(this,
arguments);this.$na=this.$na.bind(this)});a.YJ.prototype.cd=function(){this.Bt.v.length&&this.Bt.v.slice().forEach(this.$na)};a.YJ.prototype.$na=function(q){var r=q.getComponent(h.PerspectiveCamera);if(r.Cka){var t=q.getComponent(h.Kk),u=t.scene||b.Mf(q),v=t.camera;if(u&&v&&b.SV(v)===u){var w=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(r.il)w=.1,y=1E3;else{var x=!1;t.J7&&(t.boundingBox=this.YVa(u,t.boundingBox),t.J7=!1,x=!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++)l.set(u[0][z],u[1][A],u[2][D]).applyMatrix4(v.matrixWorldInverse),-l.z>y&&(y=-l.z),-l.z<w&&(w=-l.z);u=Math.max(r.JFa||0,0);z=(w+y)*.5;w+=(w-z)*u;y+=(y-z)*u;y=y==Infinity||isNaN(y)?2E3:y;w=w>0?w:y>20?.1:.01}if(Math.abs(r.near-w)>d||Math.abs(r.far-y)>d)v.far=t.far=r.far=y,v.near=t.near=r.near=w,b.e9(v),b.KPa(v),b.JPa(v),v.updateProjectionMatrix();x||t.Lka||(t.Lka=setTimeout(function(){t.Lka=null;t.J7=!0;q.T&&q.T.Xa()},c))}}};a.YJ.prototype.YVa=
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.dw||t.material&&!t.material.visible)return;t.updateWorldMatrix(!1,!1);u=t.geometry;u.boundingBox===null&&u.computeBoundingBox();u=u.boundingBox}n.copy(u);n.applyMatrix4(t.matrixWorld);r.union(n)});return r};var c=500,d=1E-4,f=180/Math.PI,n=new THREE.Box3,l=new THREE.Vector3;a.YJ.M={};a.YJ.M.Bt=[h.PerspectiveCamera,h.Kk];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,k,p,h){a=function(){function d(){}d.K4=function(f,n,l){f.camera=n;n=l.getComponent(p.xc);l=(l=h.Rc(l))&&l.matrixWorld;l||(l=n.matrixWorld);l?(f.ray.origin.copy(n.origin).applyMatrix4(l),f.ray.direction.copy(n.origin).add(n.direction).applyMatrix4(l).sub(f.ray.origin).normalize()):(f.ray.origin.copy(n.origin),f.ray.direction.copy(n.direction).normalize());
return f};d.intersect=function(f,n){g.length=0;n.forEach(function(l){this.vMa(l);l.isSkinnedMesh&&!l.userData.Gka&&(l.userData.Gka=l.geometry.boundingBox,l.geometry.boundingBox=b,l.userData.TFa=l.geometry.boundingSphere,l.geometry.boundingSphere=c,g.push(l))}.bind(this));f.firstHitOnly=!0;n=n.filter(function(l){return(l.isScene||l.parent)&&(!l.isMesh||l.geometry)});e.length=0;e=f.intersectObjects(n,!1,e);g.forEach(function(l){l.geometry.boundingBox=l.userData.Gka;delete l.userData.Gka;l.geometry.boundingSphere=
l.userData.TFa;delete l.userData.TFa});e=e.filter(function(l){return l.object.isLine?!1:!0});e.length>1&&e.sort(function(l,q){var r=-l.object.renderOrder,t=-q.object.renderOrder;r==t&&(r=l.object.material&&!l.object.material.depthTest?0:1,t=q.object.material&&!q.object.material.depthTest?0:1);r==t&&(r=l.distance,t=q.distance);return r-t});return e};d.vMa=function(f){if(f.isMesh&&f.geometry&&f.geometry.attributes&&f.geometry.attributes.position&&!f.geometry.userData.RFa&&!f.isSkinnedMesh){try{f.geometry.computeBoundsTree()}catch(n){}f.geometry.userData.RFa=
!0}};return d}();var g=[],e=[],b=new k.Box3;b.min.x=b.min.y=b.min.z=-Infinity;b.max.x=b.max.y=b.max.z=Infinity;var c=new k.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,k,p,h){a=function(){function c(d){this.vJ=null;this.YGa=new h.Vector3;this.mla=void 0;this.Oa=d}c.prototype.refresh=function(){this.vJ=null};c.prototype.MJ=function(d,f){return this.intersect(d,f).length>0};c.prototype.hdb=function(d){var f=k.jt(this.Oa);if(!f)return[];g.far=f.far;g.setFromCamera(d,
f);return p.intersect(g,this.c6())};c.prototype.jW=function(d){var f=k.jt(d.Oa||this.Oa);if(!f)return[];g.far=Infinity;g.camera=f;g.ray.origin.copy(d.origin);g.ray.direction.copy(d.direction);d.matrixWorld&&g.ray.applyMatrix4(d.matrixWorld);return p.intersect(g,this.c6())};c.prototype.intersect=function(d,f){g.far=d.distanceTo(f);g.ray.origin.copy(d);g.ray.direction.copy(f).sub(d).normalize();return p.intersect(g,this.c6())};c.prototype.yV=function(d){if(this.YGa.equals(d)&&this.mla!==void 0)return this.mla;
g.far=Infinity;g.ray.origin.copy(d);var f=[],n=[];this.c6().forEach(function(q){q.isGaussianCloud||q.dw?n.push(q):f.push(q)});var l=Infinity;[f,n].forEach(function(q){(q==n?b:[e]).forEach(function(r){g.ray.direction.copy(r);r=p.intersect(g,q);r.length!=0&&(r=d.y-r[0].point.y,r<l&&(l=r))})});if(l==Infinity)return Infinity;this.YGa.copy(d);return this.mla=l};c.prototype.c6=function(){if(this.vJ)return this.vJ;var d=k.Mf(this.Oa);if(!d)return this.vJ=[];var f=[];(c.EW.get(this.Oa.T)||[]).forEach(function(l){(l=
k.Rc(l))&&f.push(l)});this.vJ=[];for(d=[d];d.length>0;){var n=d.pop();n.userData.b7||n.isSprite||n.isLine||n.isSkinnedMesh||n.material&&!n.material.visible||f.indexOf(n)!==-1||(n.children&&d.push.apply(d,n.children),this.vJ.push(n))}return this.vJ};c.Wgb=function(d){this.EW.clear();d.forEach(function(f){this.EW.has(f.T)||this.EW.set(f.T,[]);this.EW.get(f.T).push(f)}.bind(this))};c.EW=new Map;return c}();var g=new h.Raycaster,e=new h.Vector3(0,-1,0),b=[(new h.Vector3(0,-1,.1)).normalize(),(new h.Vector3(0,
-1,.1)).normalize().applyMatrix4((new h.Matrix4).makeRotationY(Math.PI*2/3)),(new h.Vector3(0,-1,.1)).normalize().applyMatrix4((new h.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,k,p,h,g,e,b){return function(){function c(d,f,n){this.F=d;this.properties=f;this.Th=n;this.woa=0;this.iJ=this.dA=void 0;this.I7=!1;this.q8(0);this.Hla=this.t5=this.Gla=this.r5=this.state=void 0;this.Yc(p.aa);this.Th.bind(k.K("state"),
this.fJ,this,!0);this.Th.bind(k.K("movementIndex"),this.rLa,this,!0)}c.prototype.vP=function(){this.Th.get("mandatory")||(this.Y4(),this.Th.get("restartMovementOnUserInteraction")?this.state==p.PLAYING&&(this.SOa(),this.Yc(p.Xb,!0)):this.state==p.PLAYING&&this.Yc(p.aa))};c.prototype.Rjb=function(){this.state==p.Xb&&this.I7&&this.Th.get("restartMovementOnUserInteraction")&&this.fib()};c.prototype.frame=function(d){this.state==p.PLAYING&&this.uf!==null&&(this.uf.Vma()||this.dA!=0||this.Th.o(k.gr),this.uf.Lb(d),
this.ljb(),this.properties.set("x",this.uf.ib("x")),this.properties.set("y",this.uf.ib("y")),this.properties.set("z",this.uf.ib("z")),this.properties.set("yaw",this.gE(this.uf.ib("yaw"),-180,180)),this.properties.set("pitch",this.uf.ib("pitch")),this.properties.set("distance",this.uf.ib("distance")),this.properties.set("fov",this.uf.ib("fov")),this.properties.set("easing",0),d=this.Th.get("movements")[this.dA],d.set("position",this.uf.pm()),d.o(k.me),this.uf.Qe()&&(d.o(k.Qb),this.q8((this.dA+1)%this.Th.get("movements").length,
!0),this.dA==0&&(this.woa++,this.Th.o(k.yr),this.woa==this.Th.get("repeat")&&(this.SMa(),this.Yc(p.aa),this.Th.o(k.Qb)))))};c.prototype.ljb=function(){var d=this.r5!==void 0&&this.Gla!==void 0,f=this.t5!==void 0&&this.Hla!==void 0;if(d||f){var n=this.F.getComponent(g.nb).F;if(n){var l=this.uf.getTime(),q=this.uf.Zi();n=n.N(g.Scene,!0);d=d&&l<this.r5?1-l/this.r5:0;f=f&&q-l<this.t5?1-(q-l)/this.t5:0;f>0||d>0?f>d?(n.ZN=this.Hla,n.CV=f):(n.ZN=this.Gla,n.CV=d):(n.ZN="#000000",n.CV=0)}}};c.prototype.SMa=
function(){var d=this.F.getComponent(g.nb);if(d=d&&d.F)d.N(g.Scene).CV=0};c.prototype.dispose=function(){this.Y4();this.Th.h(k.K("state"),this.fJ,this);this.Th.h(k.K("movementIndex"),this.rLa,this);this.Yc(p.aa)};c.prototype.fJ=function(){var d=this.Th.get("state");this.state!=d&&(d==p.Xb&&this.state==p.aa?this.Th.set("state",p.aa):this.Yc(d))};c.prototype.Yc=function(d,f){f===void 0&&(f=void 0);this.state!=d&&(this.state=d,this.state==p.PLAYING?(this.Y4(),this.I7=!1,this.GGa(),this.$9a()):this.state==
p.Xb?(this.I7=!!f,this.SOa()):this.state==p.aa&&(this.I7=!1,this.Y4(),this.woa=0,d=this.uf.getTime(),f=this.uf.Zi(),d>0&&d<f&&this.SMa(),this.q8(0)));this.Th.set("state",this.state)};c.prototype.rLa=function(){this.q8(this.Th.get("movementIndex"))};c.prototype.q8=function(d,f){f===void 0&&(f=void 0);if(this.dA!==d||f)this.dA=d,this.GGa(),this.Th.set("movementIndex",this.dA),this.Th.get("movements")[this.dA].set("position",0)};c.prototype.fib=function(){this.Z7=setTimeout(function(){this.Z7=null;this.Yc(p.PLAYING)}.bind(this),
this.Th.get("restartMovementDelay"))};c.prototype.Y4=function(){this.Z7&&(clearTimeout(this.Z7),this.Z7=null)};c.prototype.GGa=function(){var d=this.Th.get("movements")[this.dA],f=this.properties.get("x",this.properties.get("initialX",0)),n=this.properties.get("y",this.properties.get("initialY",0)),l=this.properties.get("z",this.properties.get("initialZ",0)),q=this.gE(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(h.Qa("TargetModel3DCameraMovement",d)){var v=d.get("targetX",f);var w=d.get("targetY",n);var y=d.get("targetZ",l);var x=d.get("targetYaw",q);var z=d.get("targetPitch",r);var A=d.get("targetFov",u);var D=d.get("targetDistance",t);switch(this.Fab(d)){case "left":x=this.gE(x,q-360,q);break;case "right":x=this.gE(x,q,q+360);break;case "longest":x=this.gE(x,q-180,q+180);x=x==q?q+360:x>=q?this.gE(x,
q-360,q):this.gE(x,q,q+360);break;default:x=this.gE(x,q-180,q+180)}}else h.Qa("DistanceModel3DCameraMovement",d)&&(v=f+d.get("xDelta",0),w=n+d.get("yDelta",0),y=l+d.get("zDelta",0),x=q+d.get("yawDelta",0),z=r+d.get("pitchDelta",0),A=u+d.get("fovDelta",0),D=t+d.get("distanceDelta",0));this.uf=new e(d.get("easing"),[new b("x",f,v,d.get("xSpeed")),new b("y",n,w,d.get("ySpeed")),new b("z",l,y,d.get("zSpeed")),new b("yaw",q,x,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.r5=d.get("fadeFromDuration");this.Gla=d.get("fadeFromColor");this.t5=d.get("fadeToDuration");this.Hla=d.get("fadeToColor")};c.prototype.$9a=function(){this.iJ=void 0};c.prototype.SOa=function(){if(this.uf){this.iJ=void 0;var d=this.uf&&this.uf.PV("yaw");d&&(d.to>d.from?this.iJ="right":d.to<d.from&&(this.iJ="left"))}};c.prototype.Fab=function(d){d=d.get("yawPath");d=="longest"&&this.iJ&&(d=this.iJ);this.iJ=void 0;return d};c.prototype.gE=
function(d,f,n){for(;d<f;)d+=n-f;for(;d>n;)d-=n-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,k,p,h,g,e){return function(){function b(c,d){this.F=c;this.properties=d;this.z7=this.z7.bind(this);this.x7=this.x7.bind(this);this.fJ=this.fJ.bind(this);this.rm=this.bw=null;this.aP=[];this.bh=null;
this.FE=!1;this.Cz=new Map;k.ba(this.properties,["userInteracting"],this.z7,!0);k.ba(this.properties,["initialSequence","idleSequence","sequences.movements"],this.x7,!0);k.ba(this.properties,["state"],this.fJ,!0);this.ready=!1}b.prototype.frame=function(c){if(!this.ready){var d=e.Mf(this.F),f=0;d&&d.traverse(function(n){(n.isMesh||n.isSprite)&&f++});if(f>0)this.ready=!0,this.zeb();else return!1}this.bh&&this.Cz.get(this.bh).frame(c);(c=this.bh&&this.bh.get("state")==h.PLAYING)&&this.F.T.Xa();this.properties.set("controllingPosition",
c)};b.prototype.dispose=function(){this.bh&&this.bh.get("mandatory")&&this.properties.set("inMandatorySequence",!1);this.bh&&this.properties.set("controllingPosition",!1);k.ca(this.properties,["userInteracting"],this.z7);k.ca(this.properties,["initialSequence","idleSequence","sequences.movements"],this.x7);k.ca(this.properties,["state"],this.fJ);this.J8();this.rm&&this.UN(this.rm);this.bw&&this.UN(this.bw);this.aP.forEach(this.UN.bind(this));this.aP=[]};b.prototype.RX=function(){this.FE||this.SI||
!this.rm||this.bh||!this.properties.get("timeToIdle")||(this.SI=setTimeout(function(){this.SI=null;this.neb()}.bind(this),this.properties.get("timeToIdle")))};b.prototype.J8=function(){this.SI&&(clearTimeout(this.SI),this.SI=null)};b.prototype.neb=function(){this.rm&&this.rm.set("state",h.PLAYING)};b.prototype.zeb=function(){this.bw?this.bw.set("state",h.PLAYING):this.RX()};b.prototype.fJ=function(){this.bh?this.bh.set("state",this.properties.get("state")):this.properties.get("state")==h.PLAYING?
(this.RX(),this.SI||this.properties.set("state",h.aa)):this.J8()};b.prototype.z7=function(){var c=this.properties.get("userInteracting");this.FE!=c&&(this.FE&&(this.bh&&this.Cz.get(this.bh).Rjb(),!this.rm||this.bh&&this.bh!=this.rm||this.RX()),this.FE=c)&&(this.J8(),this.bh&&this.Cz.get(this.bh).vP())};b.prototype.x7=function(){var c=this.Goa(this.properties.get("initialSequence"));this.bw!=c&&(this.bw&&this.UN(this.bw),(this.bw=c)&&this.ala(this.bw));c=this.Goa(this.properties.get("idleSequence"));
this.rm!=c&&(this.rm&&this.UN(this.rm),(this.rm=c)&&this.ala(this.rm));var d=(this.properties.get("sequences")||[]).filter(this.Goa.bind(this));this.aP.forEach(function(n){d.indexOf(n)<0&&this.UN(n)}.bind(this));var f=this.aP;this.aP=d;this.aP.forEach(function(n){f.indexOf(n)<0&&this.ala(n)}.bind(this));this.bh||!this.rm||this.SI||this.RX()};b.prototype.Goa=function(c){var d=c&&c.get("movements");return d&&d.length!=0?c:null};b.prototype.DLa=function(c){c=c.source;var d=c.get("state");d==h.PLAYING?
(this.J8(),d=this.bh,this.bh=c,d&&d!=this.bh&&d.set("state",h.aa),this.properties.set("state",h.PLAYING),this.properties.set("inMandatorySequence",c.get("mandatory")),this.F.T.Xa()):d==h.Xb?c==this.bh&&this.properties.set("state",h.Xb):d==h.aa&&c==this.bh&&(this.properties.set("state",h.aa),this.properties.set("inMandatorySequence",!1),this.bh=null,c!=this.rm&&this.RX())};b.prototype.ala=function(c){if(this.Cz.has(c))this.Cz.get(c);else{c.set("state",h.aa);c.bind(p.K("state"),this.DLa,this,!0);var d=
new g(this.F,this.properties,c);this.Cz.set(c,d)}};b.prototype.UN=function(c){this.Cz.has(c)&&(c.set("state",h.aa),c.h(p.K("state"),this.DLa,this),this.Cz.get(c).dispose(),this.Cz["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,k,p){return function(){function h(g){this.pX=this.properties=null;this.F=g;this.update()}h.prototype.update=function(){var g=this.F.getComponent(p.cK);this.dP(g&&g.properties)};h.prototype.dP=function(g){var e;this.properties&&((e=this.pX)===null||e===void 0||e.dispose(),this.pX=null);if(this.properties=
g)this.pX=new k(this.F,this.properties)};h.prototype.frame=function(g){this.pX&&this.pX.frame(g)};h.prototype.dispose=function(){this.dP(null)};h.Ya=function(g){g.L(p.Mw).manager=new h(g)};h.update=function(g){g.getComponent(p.Mw).manager.update()};h.frame=function(g,e,b){g.getComponent(p.Mw).manager.frame(e,b)};h.Ba=function(g){g.getComponent(p.Mw).manager.dispose();g.ka(p.Mw)};return h}()});
define("tdv/player/view/webgl/system/cameraControls/DraggingObserver",["require","exports"],function(){return function(){function a(){}a.pO=function(m){return this.q9.indexOf(m)>=0};a.Qoa=function(m){this.q9=[];m.forEach(function(k){k=k.T;this.q9.indexOf(k)<0&&this.q9.push(k)}.bind(this))};a.q9=[];return a}()});
define("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin",["require"],function(){return{Ukb:function(){},Vkb:function(){},g0:function(){return this.B&&this.B.get("inMandatorySequence")||this.B&&!this.B.get("keyboardEnabled")?!0:!1},Um:function(){return this.B&&this.B.get("inMandatorySequence")||this.B&&(!this.B.get("mouseEnabled")||this.B.get("mouseDisabled"))?!0:!1},pxa:function(){return this.B&&this.B.get("doubleClickDisabled")?!0:!1},iza:function(){this.HL()||this.Yx||this.REa()},
hza:function(){this.HL()||this.Yx||this.QEa()},hM:function(){this.qxa()||this.REa()},gM:function(){this.qxa()||this.QEa()},REa:function(){this.B&&this.B.set("userInteracting",!0)},QEa:function(){this.B&&this.B.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,k,p){return function(){function h(g){this.matrixWorld=new p.Matrix4;this.SD=!1;this.timeout=null;this.F=g}h.prototype.dP=function(g,e){if(this.LJ!=g||this.propertyName!=e)this.LJ&&this.LJ.set(this.propertyName,!1),this.LJ=g,this.propertyName=e,this.LJ&&this.LJ.set(this.propertyName,this.SD)};h.prototype.lqa=function(){var g=k.Rc(this.F),
e=!!g&&!g.matrixWorld.equals(this.matrixWorld);e&&this.matrixWorld.copy(g.matrixWorld);this.tp(e);this.timeout&&(clearTimeout(this.timeout),this.timeout=null);e&&(this.timeout=setTimeout(function(){this.timeout=null;this.tp(!1)}.bind(this),h.RRa))};h.prototype.Ba=function(){this.tp(!1);this.timeout&&clearTimeout(this.timeout)};h.prototype.tp=function(g){this.SD!=g&&(this.SD=g,this.LJ&&this.LJ.set(this.propertyName,g))};h.RRa=100;return h}()});
define("tdv/player/view/webgl/system/cameraControls/PropertiesSetter",["require","exports"],function(){return function(){function a(m){this.properties=m}a.prototype.GNa=function(m){this.properties.set("fov",this.CO(m,this.properties.get("minFov",.1),this.properties.get("maxFov",180)))};a.prototype.cj=function(m){this.properties.set("yaw",this.d8(this.Pdb(m,this.properties.get("minYaw"),this.properties.get("maxYaw"),this.properties.get("yaw"))))};a.prototype.Tn=function(m){this.properties.set("pitch",
this.CO(m,this.properties.get("minPitch",-90),this.properties.get("maxPitch",90)))};a.prototype.setX=function(m){this.properties.set("x",this.CO(m,this.properties.get("minX"),this.properties.get("maxX")))};a.prototype.setY=function(m){this.properties.set("y",this.CO(m,this.properties.get("minY"),this.properties.get("maxY")))};a.prototype.setZ=function(m){this.properties.set("z",this.CO(m,this.properties.get("minZ"),this.properties.get("maxZ")))};a.prototype.sp=function(m){this.properties.set("distance",
this.CO(m,this.properties.get("minDistance"),this.properties.get("maxDistance")))};a.prototype.Oj=function(m){this.properties.set("easing",m)};a.prototype.Pdb=function(m,k,p,h){if(k!==void 0||p!==void 0){var g=this.d8(m-h);if(k!==void 0&&g<0){if(this.d8(h)+g<k)return k}else if(p!==void 0&&g>0&&this.d8(h)+g>p)return p}return m};a.prototype.CO=function(m,k,p){if(isNaN(m))throw"invalid value";k!==void 0&&m<k&&(m=k);p!==void 0&&m>p&&(m=p);return m};a.prototype.d8=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{Vea:function(k){this.p0=this.p0.bind(this);this.q0=this.q0.bind(this);this.AQ=this.hk=!1;this.wg={};for(var p=0;p<k.length;p++)this.wg[k[p]]=!1;this.IR=0;this.r0=!1;this.JR(!0)},Wea:function(){this.JR(!1)},JR:function(k){this.r0!=k&&(this.r0&&(document.removeEventListener("keyup",this.q0),document.removeEventListener("keydown",this.p0)),
this.r0=k)&&(document.addEventListener("keyup",this.q0),document.addEventListener("keydown",this.p0))},qxa:function(){return this.IR>0},q0:function(k){if(!(m.lp()||this.g0&&this.g0())){var p=!1;this.hk!=k.shiftKey&&(this.hk=k.shiftKey,p=!0);this.AQ!=k.ctrlKey&&(this.AQ=k.ctrlKey,p=!0);this.wg[k.code]===!0&&(this.wg[k.code]=!1,p=!0,this.Yp&&this.Yp(k.code),this.IR--,this.IR==0&&this.hza&&this.hza());p&&this.yS&&this.yS()}},p0:function(k){if(!(m.lp()||this.g0&&this.g0())){var p=!1;this.hk!=k.shiftKey&&
(this.hk=k.shiftKey,p=!0);this.AQ!=k.ctrlKey&&(this.AQ=k.ctrlKey,p=!0);this.wg[k.code]===!1&&(p=this.wg[k.code]=!0,this.iH&&this.iH(k.code),this.IR++,this.IR==1&&this.iza&&this.iza());p&&this.yS&&this.yS()}},glb:function(){return this.hk},alb:function(){return this.AQ}}});
define("tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager",["require","exports","tdv/view/constants/Cursor"],function(a,m,k){a=function(){function h(){this.Df=[]}h.prototype.Mt=function(g){this.ANa(g);this.wb=g;this.jca=null};h.prototype.BNa=function(g){this.ANa(g?g.IIa():null);this.wb=null;this.jca=g};h.prototype.shb=function(g,e){this.wb&&this.wb.set("cursor",g);this.jca&&this.jca.g8(g,e)};h.prototype.ANa=function(g){this.Je&&(this.Je.ufb(this),this.Je=void 0);g&&(this.Je=p.get(g),
this.Je.a9a(this))};h.prototype.dispose=function(){this.Mt(null);this.Df=[]};h.prototype.push=function(g){this.Df.push(g);this.Je&&this.Je.update()};h.prototype.pop=function(g){for(var e=this.Df.length-1;e>=0;e--)if(this.Df[e]==g){this.Df.splice(e,1);this.Je&&this.Je.update();break}};h.prototype.has=function(g){return this.Df.indexOf(g)>=0};h.prototype.top=function(){if(this.Df.length)return this.Df[this.Df.length-1]};h.prototype.all=function(){return this.Df};return h}();var p=function(){function h(g){this.bc=
g;this.wd=[]}h.prototype.a9a=function(g){this.wd.push(g);this.update()};h.prototype.ufb=function(g){this.wd.splice(this.wd.indexOf(g),1);this.update();this.wd.length==0&&h.clear(this.bc)};h.prototype.update=function(){var g=this.UTa();var e=this.Sda(k.uF)?k.uF:this.Sda(k.Ai)?k.Ai:this.Sda(k.hf)?k.hf:this.Ns()||k.gf;this.wd.forEach(function(b){b.shb(e,g)})};h.prototype.Sda=function(g){for(var e=this.wd.length-1;e>=0;e--)if(this.wd[e].has(g))return!0;return!1};h.prototype.UTa=function(){var g=[];this.wd.forEach(function(e){e.all().forEach(function(b){g.indexOf(b)<
0&&g.push(b)})});return g};h.prototype.Ns=function(){for(var g,e=this.wd.length-1;e>=0&&g===void 0;e--)g=this.wd[e].top();return g};h.get=function(g){var e=this.ab.get(g);e||this.ab.set(g,e=new h(g));return e};h.clear=function(g){this.ab["delete"](g)};h.ab=new Map;return h}();return a});
define("tdv/view/util/MouseLocker",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,m,k,p){return function(h){function g(e){var b=h.call(this)||this;if(e instanceof HTMLElement)b.FKa=e;else throw Error("invalid element");b.v7=b.v7.bind(b);document.addEventListener("pointerlockchange",b.v7.bind(b),!1);return b}P(g,h);g.prototype.dispose=function(){document.removeEventListener("pointerlockchange",this.v7)};g.prototype.lock=function(){if(!this.Mq())return this.FKa.requestPointerLock()};
g.prototype.unlock=function(){this.Mq()&&document.exitPointerLock()};g.prototype.Mq=function(){return document.pointerLockElement===this.FKa};g.prototype.v7=function(){this.o(k.V)};g.Mq=function(){return document.pointerLockElement!==null};return g}(p)});
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 k=a("tdv/constants/EventName"),p=a("tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager"),h=a("tdv/view/util/MouseLocker"),g=180/Math.PI;return{Bfa:function(){this.R0=this.bS=this.Yx=this.Tu=!1;this.q2=
this.Ze=null;this.a0=new p;this.fS=null;this.y1a=this.J0a.bind(this)},Cfa:function(){this.d3(null);this.a0.dispose()},dya:function(e){this.tq(e);if(!this.Um||!this.Um()){var b=this.GL();this.Tu||(this.Tu=!0,b||this.hM&&this.hM());this.bS=!e.Tna||!e.Tna.buttons||(e.Tna.buttons&2)===0;this.q2=e;this.Zp&&this.Zp(e.x,e.y);this.s1&&this.s1(e.x,e.y)}},GL:function(){return this.Tu||this.Yx||this.R0},HL:function(){return this.Tu},blb:function(){return this.Yx},clb:function(){return this.bS},dlb:function(){return this.R0},
fya:function(e){this.tq(e);if(this.Um&&this.Um())this.cS(e);else if(this.lg&&this.lg(e.x,e.y),this.Tu||this.SL.Mq()){var b=e.movementX!==void 0?e.movementX:e.x-this.q2.x,c=e.movementY!==void 0?e.movementY:e.y-this.q2.y;this.SL.Mq()&&(b*=-1,c*=-1);this.q2=e;this.q1&&this.q1(b,c,e.x,e.y)}},cS:function(e){this.Tu&&(e&&this.tq(e),this.bS=this.Tu=!1,this.Ey&&this.Ey(this.xd,this.yd),this.jH&&this.jH(),this.GL()||this.gM&&this.gM())},$xa:function(e){this.Um&&this.Um()||(this.tq(e),this.Dy&&this.Dy(e.x,
e.y))},aya:function(e){this.Um&&this.Um()||this.pxa&&this.pxa()||(this.tq(e),this.fM&&this.fM(e.x,e.y))},gya:function(e){this.tq(e);if(!this.Um||!this.Um()){e=e.SN/10;var b=this.GL();this.fS||(this.R0=!0,this.z1a&&this.z1a(),b||this.hM&&this.hM());this.u1&&this.u1(e);this.fS&&clearTimeout(this.fS);this.fS=setTimeout(this.y1a,100)}},J0a:function(){this.fS=null;this.x1a&&this.x1a();this.R0=!1;this.GL()||this.gM&&this.gM()},cya:function(e){if(!(this.Um&&this.Um()||e.touches.length<2)){var b=this.GL();
this.Yx||(this.Yx=!0,this.K0a(e.touches),b||this.hM&&this.hM());this.aza&&this.aza();this.cS()}},bya:function(e){this.Um&&this.Um()||e.touches.length<2||!this.Yx||(this.hya(e.touches),this.Yfa&&this.Yfa(this.L6a,this.M6a,this.Via,this.N6a),this.$ya&&this.$ya(this.xea,this.yea,this.tU,this.uU,1,this.Via,this.tR,this.Uia,this.wea,this.sU))},Afa:function(){this.Yx&&(this.Yx=!1,this.Zfa&&this.Zfa());this.GL()||this.gM&&this.gM()},K0a:function(e){this.wea=this.yea=this.xea=this.tR=this.Via=this.uU=this.tU=
this.Uia=this.sU=void 0;this.rU=e;this.hya(e)},hya:function(e){m(e[0],this.rU[0])+m(e[1],this.rU[1])>m(e[0],this.rU[1])+m(e[1],this.rU[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)*g;c=m(e[0],e[1]);var d=(e[0].x+e[1].x)/2,f=(e[0].y+e[1].y)/2;this.Via=this.tR!==void 0?c/this.tR:1;this.N6a=this.sU!==void 0?b-this.sU:0;this.sU=b;this.Uia=c;this.L6a=this.tU!==void 0?d-this.tU:0;this.M6a=this.uU!==void 0?f-this.uU:0;this.tU=d;this.uU=f;this.xea!==void 0||(this.xea=this.tU);
this.yea!==void 0||(this.yea=this.uU);this.wea!==void 0||(this.wea=this.sU);this.tR!==void 0||(this.tR=this.Uia);this.rU=e},eya:function(){},KXa:function(){this.cS();this.Afa()},dR:function(){return this.Ze?this.Ze.cb():100},yG:function(){return this.Ze?this.Ze.Kb():100},ay:function(){return this.Ze?Math.max(this.Ze.cb(),this.Ze.Kb()):100},d3:function(e){this.Ze!=e&&(this.Ze&&(this.Ze.h(k.Ra,this.dya,this,!0),this.Ze.h(k.mb,this.fya,this,!0),this.Ze.h(k.bb,this.cS,this,!0),this.Ze.h(k.oa,this.$xa,
this,!0),this.Ze.h(k.Ik,this.aya,this,!0),this.Ze.h(k.tr,this.gya,this,!0),this.Ze.h(k.B$,this.bya,this,!0),this.Ze.h(k.$A,this.cya,this,!0),this.Ze.h(k.hK,this.Afa,this,!0),this.SL.h(k.V,this.eya,this,!0),this.SL.dispose(),this.SL=null),this.Ze=e,this.a0.Mt(this.Ze),this.Ze&&(this.Ze.bind(k.Ra,this.dya,this,!0),this.Ze.bind(k.mb,this.fya,this,!0),this.Ze.bind(k.bb,this.cS,this,!0),this.Ze.bind(k.oa,this.$xa,this,!0),this.Ze.bind(k.Ik,this.aya,this,!0),this.Ze.bind(k.tr,this.gya,this,!0),this.Ze.bind(k.B$,
this.bya,this,!0),this.Ze.bind(k.$A,this.cya,this,!0),this.Ze.bind(k.hK,this.Afa,this,!0),this.SL=new h(this.Ze.wa().ac()),this.SL.bind(k.V,this.eya,this,!0)))},eS:function(e){e.x=-1+2*e.x/this.dR();e.y=1-2*e.y/this.yG();return e},tq:function(e){this.xd=e.x;this.yd=e.y;this.TL=e.pageX;this.UL=e.pageY},AH:function(e){this.a0.push(e)},m2:function(e){this.a0.pop(e)}}});
define("tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{J3a:function(){this.V2=!1;this.nq=null;this.UG=this.IL=0;this.HH=!1;this.VBa(!0)},K3a:function(){this.VBa(!1);this.GCa(null)},VBa:function(k){this.V2!=k&&((this.V2=k)||this.U2())},GCa:function(k){this.nq!=k&&(this.U2(),this.nq&&(this.nq.h(m.Gp,this.WBa,this,!0),this.nq.h(m.tg,this.U2,this,!0),this.nq.h(m.V,this.UBa,this,!0),this.UG=this.IL=
0),this.nq=k)&&(this.nq.bind(m.Gp,this.WBa,this,!0),this.nq.bind(m.tg,this.U2,this,!0),this.nq.bind(m.V,this.UBa,this,!0))},WBa:function(){!this.HH&&this.V2&&(this.HH=!0,this.nAa&&this.nAa())},UBa:function(){this.HH&&(this.IL=this.nq.getX(),this.UG=this.nq.getY(),this.lAa&&this.lAa())},U2:function(){this.HH&&(this.HH=!1,this.UG=this.IL=0,this.mAa&&this.mAa())},flb:function(){return this.HH}}});
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.MQ=
!1;this.Cca=0;this.hva=!1;this.iva=L}function k(L){this.A=L;this.es=new f(L);this.Vea(x);this.Bfa();this.J3a();this.OH=.025;this.an=.25;this.N0=this.O0=this.P0=this.G_=0;this.Ja=null;this.DZ=this.Q3=!1;this.Ga=void 0;this.Dxa=new THREE.Vector3(void 0,void 0,void 0);this.Lu=[];this.D0a=5;this.z0a=10;this.Dx=new c(this.A);this.AH(t.aB);this.JL={};[g.ua.Sj,g.ua.yi,g.ua.$a,g.ua.Cb].forEach(function(Q){this.JL[Q]=new m(300)}.bind(this));[g.ua.yp,g.ua.io,g.ua.Dp,g.ua.lo,g.ua.Q,g.ua.E].forEach(function(Q){this.JL[Q]=
new m(300)}.bind(this));this.update()}var p=a("tdv/utils"),h=a("tdv/constants/EventName"),g=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"),n=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter"),
l=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");p.I4(k,[b,l,q,r]);k.prototype.update=function(){var L=this.A.getComponent(e.iF);this.Fj(L&&L.properties);this.es.dP(L&&L.properties,"moving");var Q=(!L.TN||!d.pO(this.A.T))&&L.enabled;this.d3(L&&(Q?L.ah:null));this.JR(!!L&&
Q&&L.ID);this.GCa(!!L&&Q&&L.fNa);Q||this.jH();Q&&L.ID||(this.Mo=this.Lo=this.Fl=this.Rk=this.Gl=0)};k.prototype.frame=function(L){this.Q_a()?this.d_a(L):this.e_a(L);this.ZXa()};k.prototype.Q_a=function(){return this.properties&&this.properties.get("playingSequence")||this.Ii};k.prototype.d_a=function(L){this.properties&&this.properties.get("playingSequence")||this.YTa(L)};k.prototype.YTa=function(L){this.Ii&&(this.Ii.Lb(L),this.Ja.setX(this.Ii.ib("x")),this.Ja.setY(this.Ii.ib("y")),this.Ja.setZ(this.Ii.ib("z")),
this.Ja.Oj(0),this.Ii.Qe()&&(this.Ii=null),this.A.T.Xa())};var w=1E3/3600*8/1.7;k.prototype.e_a=function(L){I.set(this.B.get("x"),this.B.get("y"),this.B.get("z"));this.iZa(L,N,R);this.tZa(I,N,F);this.Ja.setX(F.x);this.Ja.setY(F.y);this.Ja.setZ(F.z);this.Ja.cj(this.B.get("yaw")+R.x);this.Ja.Tn(this.B.get("pitch")+R.y);this.Ja.Oj(this.an);N.x==0&&N.y==0&&N.z==0&&R.x==0&&R.y==0||this.A.T.Xa()};k.prototype.ZXa=function(){this.o8a();this.s7a();this.es.lqa();this.HH&&this.A.T.Xa();this.Dx.refresh()};k.prototype.iZa=
function(L,Q,T){L/=1E3;var W=this.hk?.2:1,X=1.7*w;X*=this.B.get("translationSpeed")*W;var Y=this.B.get("rotationSpeed")*W;W=this.N0;var ca=this.O0,ea=this.P0,Z=this.G_;this.N0=this.O0=this.P0=this.G_=0;var U=(W*W+ca*ca)/y;U=U>1?1/Math.sqrt(U):1;W*=U;ca*=U;var V=E*Math.atan2(this.IL,Math.abs(this.UG));U=Math.sqrt(this.IL*this.IL+this.UG*this.UG);var aa=Math.max(this.yG(),this.dR()),ba=this.B.get("fov")/aa*2;W=-W*ba*Y;ca=ca*ba*Y;ea=-ea*25*X;ba=this.cR(g.ua.yp,g.ua.Dp)*X;var da=this.cR(g.ua.lo,g.ua.io)*
X,fa=this.cR(g.ua.Q,g.ua.E)*X,ha=this.cR(g.ua.yi,g.ua.Sj)*Y*30,ka=this.cR(g.ua.$a,g.ua.Cb)*Y*30;Z=2*Z*1.7/aa;Y*=V*U*.125;X*=-U*.5*this.UG;(U=this.A.getComponent(e.sa))&&(W||ca||ea||ba||fa||da||ha||ka||Y||X||Z)?(B.makeRotationFromEuler(C.set(0,U.Ad*D,0,U.ff)),Q.set(ba*L,fa*L+Z,(da+X+ea)*L).applyMatrix4(B),T.set(W+(ka+Y)*L,ca+ha*L)):(Q.set(0,0,0),T.set(0,0))};k.prototype.cR=function(L,Q){L=this.JL[L].getState();if(L===m.M9)return-3;if(L===m.yi)return-1.5;Q=this.JL[Q].getState();return Q===m.M9?3:Q===
m.yi?1.5:0};k.prototype.tZa=function(L,Q,T){T.copy(L).add(Q);if(!T.equals(L)){var W=!this.Dxa.equals(L);this.kEa(T,W);this.Ga!==void 0&&Q.y!==0&&(this.Ga=Math.max(.595,this.Ga+Q.y));var X=this.Dx.yV(T);(W||X==Infinity)&&this.HVa();var Y=X!==Infinity?T.y-X:void 0;if(this.B.get("keepHeight")&&X!==Infinity){X=this.bR();if(Y>(W?Y:this.kZa(L))+this.B.get("maxStepHeight",X*.25)){T.copy(L);return}T.y=(W?Y:this.rZa(Y))+X}if(this.B.get("collisionDetection")&&(O.copy(Q).normalize().multiplyScalar(.1).add(T),
this.Dx.MJ(L,O))){T.copy(L);return}Y!==void 0&&this.zTa(Y);this.Dxa.copy(T)}};k.prototype.HVa=function(){this.Lu=[]};k.prototype.kZa=function(L){return this.Lu.length==0?L:this.Lu[this.Lu.length-1]};k.prototype.rZa=function(L){return this.Lu.length<this.D0a?L:this.Lu.reduce((Q,T)=>Q+T,0)/this.Lu.length};k.prototype.zTa=function(L){this.Lu.push(L);this.Lu.length>this.z0a&&this.Lu.shift()};k.prototype.kEa=function(L,Q){if(this.Ga===void 0||Q)L=this.Dx.yV(L),L!==Infinity&&(this.Ga=L)};k.prototype.bR=
function(){return this.Ga===void 0?1.7:this.Ga};k.prototype.iH=function(L){this.A.T.Xa();this.JL[L].Lna()};k.prototype.Yp=function(L){this.JL[L].Mna()};k.prototype.s1=function(){this.pj=!0;this.AH(t.Ai)};k.prototype.fM=function(L,Q){if(this.B.get("doubleClickAction")=="translate"&&(this.eS(K.set(L,Q)),L=this.Dx.hdb(K),L.length!=0)){var T=L[0];L=I.set(this.B.get("x"),this.B.get("y"),this.B.get("z"));Q=F.copy(T.point);this.kEa(L);var W=this.bR();T.face&&T.face.normal?(T=G.copy(T.face.normal).transformDirection(T.object.matrixWorld),
T=Math.abs(Math.acos(T.dot(S)))<Math.PI*.25):T=Q.y<L.y-W*.75;if(T)Q.y+=W;else{N.copy(Q).sub(L);T=N.length();var X=W*2;if(T<X)return;Q.sub(N.multiplyScalar(X/T));Q.y+=W-this.Dx.yV(Q)}this.Dx.MJ(L,Q)||Math.abs(W-this.Dx.yV(Q))>W*.05||(this.Ii=new u("cubic_in_out",[new v("x",L.x,Q.x),new v("y",L.y,Q.y),new v("z",L.z,Q.z)],1500),this.A.T.Xa())}};var y=2500;k.prototype.q1=function(L,Q){this.pj&&(this.N0+=L,this.O0+=Q,this.A.T.Xa())};k.prototype.jH=function(){this.pj=!1;this.m2(t.Ai);this.A.T.Xa()};k.prototype.u1=
function(L){this.P0+=L;this.A.T.Xa()};k.prototype.Yfa=function(L,Q){this.G_+=Q;this.A.T.Xa()};k.prototype.nAa=function(){this.KXa();this.AH(t.Ai)};k.prototype.lAa=function(){this.A.T.Xa()};k.prototype.mAa=function(){this.m2(t.Ai)};k.prototype.Fj=function(L){this.B!=L&&(this.B&&(this.Ja=null,z.forEach(function(Q){this.B.h(h.K(Q),this.sga,this,!0)}.bind(this)),A.forEach(function(Q){this.B.h(h.K(Q),this.Pfa,this,!0)}.bind(this)),this.B.set("userInteracting",!1)),this.B=L)&&(this.Ja=new n(this.B),z.forEach(function(Q){this.B.bind(h.K(Q),
this.sga,this,!0)}.bind(this)),this.sga(),A.forEach(function(Q){this.B.bind(h.K(Q),this.Pfa,this,!0)}.bind(this)),this.Pfa(),this.B.set("userInteracting",!1))};k.prototype.sga=function(){this.Q3||(this.Q3=!0,this.A.T.Xa())};k.prototype.o8a=function(){if(this.Q3&&this.A&&this.B){this.Q3=!1;var L=this.A.N(e.sa,!0);L.translationX=this.B.get("x");L.translationY=this.B.get("y");L.We=this.B.get("z");L.Ad=-this.B.get("yaw");L.Yd=this.B.get("pitch");L.Ue=0;L.ff="YXZ";L.positionX=0;L.positionY=0;L.positionZ=
0;L.easing=this.B.get("easing")}};k.prototype.Pfa=function(){this.DZ||(this.DZ=!0,this.A.T.Xa())};k.prototype.s7a=function(){this.DZ&&this.A&&this.B&&(this.DZ=!1,this.A.N(e.PerspectiveCamera,!0).fov=this.B.get("fov"))};var x=[g.ua.Sj,g.ua.yi,g.ua.$a,g.ua.Cb,g.ua.yp,g.ua.io,g.ua.Dp,g.ua.lo,g.ua.Q,g.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,E=180/Math.PI,B=new THREE.Matrix4,C=new THREE.Euler,
I=new THREE.Vector3,F=new THREE.Vector3,G=new THREE.Vector3,N=new THREE.Vector3,O=new THREE.Vector3,R=new THREE.Vector2,S=new THREE.Vector3(0,1,0),K=new THREE.Vector2;k.prototype.dispose=function(){this.Fj(null);this.Wea();this.Cfa();this.K3a();this.es.Ba();this.Dx=null};k.Ya=function(L){L.L(e.eu).manager=new k(L)};k.Ba=function(L){var Q=L.getComponent(e.eu);Q.manager.dispose();Q.manager=null;L.ka(e.eu)};k.update=function(L){L.getComponent(e.eu).manager.update()};k.frame=function(L,Q,T){L.getComponent(e.eu).manager.frame(Q,
T)};m.prototype.Lna=function(){this.MQ||(this.MQ=!0,this.hva=Date.now()-this.Cca<this.iva,this.Cca=Date.now())};m.prototype.Mna=function(){this.MQ&&(this.MQ=!1)};m.prototype.getState=function(){return this.MQ||Date.now()-this.Cca<this.iva?this.hva?m.M9:m.yi:m.Sj};m.Sj=0;m.yi=1;m.M9=2;return k});
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(U){this.A=
U;this.Vea(O);this.Bfa();this.es=new n(U);this.pd=w;this.zs=this.ak=null;this.OH=.025;this.an=.25;this.Si=void 0;this.PH=1;this.Gl=this.Rk=this.Fl=this.Mo=this.Lo=0;this.Tl=[];this.MG=this.NG=this.OG=this.KG=this.JG=this.TB=this.$j=this.Qx=this.Rx=this.Tx=this.Sx=this.Px=void 0;this.uea=1E3;this.mR=void 0;this.xL=0;this.Ja=null;this.AH(t.aB);this.update()}function k(U,V){U=V-U;U>180?U-=360:U<-180&&(U+=360);return U}function p(){return(new Date).getTime()}var h=a("tdv/utils"),g=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"),n=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),l=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");h.I4(m,[d,q,r]);m.prototype.update=function(){var U=this.A.getComponent(c.jF);this.Fj(U&&U.properties);this.es.dP(U&&U.properties,"moving");var V=(!U.TN||!f.pO(this.A.T))&&U.enabled;this.d3(U&&(V?U.ah:null));this.JR(!!U&&V&&U.ID);V||this.jH();V&&U.ID||(this.Mo=this.Lo=this.Fl=this.Rk=
this.Gl=0)};m.prototype.frame=function(U){this.Ii&&(this.Ii.Lb(U),this.Ja.setX(this.Ii.ib("x")),this.Ja.setY(this.Ii.ib("y")),this.Ja.setZ(this.Ii.ib("z")),this.Ja.sp(this.Ii.ib("distance")),this.Ja.Oj(0),this.Ii.Qe()&&(this.Ii=null));this.kh&&(this.kh=Math.max(0,this.kh-U/this.uea),this.Ja.setX(this.B.get("x")+this.MG*this.kh),this.Ja.setY(this.B.get("y")+this.NG*this.kh),this.Ja.setZ(this.B.get("z")+this.OG*this.kh),this.Ja.cj(this.B.get("yaw")+this.KG*this.kh),this.Ja.Tn(this.B.get("pitch")+this.JG*
this.kh),this.Ja.Oj(0),this.A.T.Xa(),this.kh==0&&this.uT());if(this.Mo||this.Lo||this.Fl||this.Rk||this.Gl){var V=U/1E3;this.Ffa(this.Fl*V,this.Rk*V,this.Gl*V,this.Mo*V,this.Lo*V)}if(this.pd==w&&this.$l!==void 0&&!this.Rk&&this.B.get("keepHeight")&&this.mR!==void 0&&Math.abs(this.$l-this.B.get("y"))>T){this.xL=Math.max(this.xL-U,0);V=this.B.get("y");var aa=this.$l-V;this.Ja.setY(V+Math.min(U*this.mR,Math.abs(aa))*(aa>0?1:-1));this.A.T.Xa()}this.pd!=w||!this.zs||this.kh||this.Ii||(this.aG(),this.A.T.Xa());
this.es.lqa()};m.prototype.yS=function(){this.zja()};m.prototype.zja=function(){var U=this.Gl!=0||this.Rk!=0||this.Fl!=0;this.Mo=this.Lo=this.Gl=this.Rk=this.Fl=0;var V=this.wg[e.ua.yp]?1:this.wg[e.ua.Dp]?-1:0,aa=this.wg[e.ua.lo]?1:this.wg[e.ua.io]?-1:0,ba=this.wg[e.ua.Q]?1:this.wg[e.ua.E]?-1:0,da=this.wg[e.ua.Sj]?1:this.wg[e.ua.yi]?-1:0,fa=this.wg[e.ua.$a]?1:this.wg[e.ua.Cb]?-1:0;if(da||fa||V||aa||ba){var ha=this.hk?.2:1;V&&(this.Fl=-V*ha*this.B.get("translationSpeed"));ba&&(this.Rk=-ba*ha*this.B.get("translationSpeed"));
aa&&(this.Gl=-aa*ha*this.B.get("translationSpeed"));fa&&(this.Mo=-fa*ha*100*this.B.get("rotationSpeed"));da&&(this.Lo=da*ha*100*this.B.get("rotationSpeed"));this.aG();this.A.T.Xa();this.rha();this.JXa();V=this.Gl!=0||this.Rk!=0||this.Fl!=0;!U&&V&&this.uT()}};m.prototype.s1=function(){this.pj=!0;this.pd==E||this.pd==B||p()<this.Pva+500||(this.AH(t.Ai),this.pd=w)};m.prototype.q1=function(U,V,aa,ba){if(this.pj&&!(this.pd==E||this.pd==B||p()<this.Pva+500)){var da=(U*U+V*V)/2500;da=da>1?1/Math.sqrt(da):
1;U*=da;V*=da;da=this.oZa();this.pd!=da?(this.pd=da,this.pd==y?this.M5a(aa,ba):this.pd==x?this.ZCa():this.pd==z?this.$5a():this.pd==D&&this.Y5a()):this.pd!=w&&(this.pd==y?this.z7a(U,V,aa,ba):this.pd==x?this.c8a(U,V):this.pd==z?this.e8a(U,V):this.pd==D&&this.b8a(U,V))}};m.prototype.jH=function(){this.m2(t.Ai);this.pj=!1;this.pd!=w&&(this.pd=w,this.ak=null,this.XCa(),this.rha(),this.fxa(),this.A.T.Xa())};m.prototype.u1=function(U){this.pd!=A?(this.pd=A,this.U5a()):this.P7a(U);this.Efa&&clearTimeout(this.Efa);
this.Efa=setTimeout(function(){this.Efa=null;this.pd==A&&(this.pd=w,this.hv())}.bind(this),1E3)};m.prototype.$ya=function(U,V,aa,ba,da,fa,ha,ka,ia,ja){this.pd!=E&&this.pd!=B?(U=Math.abs(fa-da)>.05,aa=k(ia,ja)>5,V=Math.abs(ba-V)>.02*this.yG(),ia=Math.min(Math.abs(ia),180-Math.abs(ia),Math.abs(ja),180-Math.abs(ja))<10,ha=ha/this.ay()<.2,(U||V)&&(ia||ha)?(this.pd=B,this.Z5a()):!aa&&!U||ia&&ha||(this.pd=E,this.a6a())):this.pd==E?this.f8a(da,fa,ia,ja):this.pd==B&&this.d8a(V,ba,da,fa)};m.prototype.Zfa=
function(){this.ak=null;this.pd==E&&this.XCa();this.pd=w;this.Pva=p();this.rha();this.fxa();this.A.T.Xa()};m.prototype.fM=function(U,V){if(this.B.get("doubleClickAction")=="zoom"){var aa=b.Mf(this.A),ba=b.jt(this.A);ba&&aa&&(ca.set(U,V),this.eS(ca),U=this.xR(ca,ba),U.length!=0&&(this.hv(),this.aG(),U=U[0].point,C.setFromMatrixPosition(ba.matrixWorld),this.Ii=new u("quad_in_out",[new v("x",C.x,(U.x+C.x)*.5),new v("y",C.y,(U.y+C.y)*.5),new v("z",C.z,(U.z+C.z)*.5),new v("distance",0,0)],500)))}};m.prototype.oZa=
function(){return this.bS?this.hk?x:y:this.HL()?this.hk?D:z:w};m.prototype.M5a=function(U,V){this.EM();this.aG();this.eUa(U,V);this.B.get("keepHeight")&&this.F3();this.A.T.Xa()};m.prototype.z7a=function(U,V,aa,ba){var da=b.jt(this.A);da&&(C.setFromMatrixPosition(da.matrixWorld),this.ak?(I.set(aa,ba,0),this.eS(I),I.unproject(da),U=this.ak.x-C.x,V=this.ak.z-C.z,Math.atan2(this.ak.y-C.y,Math.sqrt(V*V+U*U))*Q>-2?(G.copy(this.ak).applyMatrix4(da.matrixWorldInverse),N.copy(I).applyMatrix4(da.matrixWorldInverse),
U=G.z/N.z,F.copy(N).multiplyScalar(U).applyMatrix4(da.matrixWorld).sub(this.ak),F.y!=0&&this.hv()):(U=(this.ak.y-C.y)/(I.y-C.y),F.copy(I).sub(C).multiplyScalar(U).add(C).sub(this.ak)),F.multiplyScalar(-1)):(W.makeRotationFromEuler(ea.set(0,-this.B.get("yaw")*L,0,"YXZ")),X.set(-U*this.B.get("translationSpeed")/this.ay(),0,-V*this.B.get("translationSpeed")/this.ay()).applyMatrix4(W),F.copy(X).multiplyScalar(this.PH*10)),this.Ja.setX(C.x+F.x),this.Ja.setY(C.y+F.y),this.Ja.setZ(C.z+F.z),this.iN(F.x,F.y,
F.z,0,0),this.Ja.Oj(this.an))};m.prototype.ZCa=function(){this.EM();this.ak=null;this.Yaa();this.hv();this.A.T.Xa()};m.prototype.c8a=function(U,V){var aa;aa||(aa=1);U=U*360/this.dR()*this.B.get("rotationSpeed");V=-V*180/this.yG()*this.B.get("rotationSpeed");this.Ja.cj(this.B.get("yaw")+U);this.Ja.Tn(this.B.get("pitch")+V);this.Ja.sp(this.Iga/aa);this.iN(0,0,0,U,V);this.Ja.Oj(this.an);this.A.T.Xa()};m.prototype.$5a=function(){this.ZCa()};m.prototype.e8a=function(U,V){var aa=b.jt(this.A),ba=this.B.get("distance")||
this.Si||1;V=V*ba*2*Math.tan(aa.fov*L/2)/this.yG();V!=0&&this.hv();this.Ja.setY(this.B.get("y")+V);U=U*360/this.dR()*this.B.get("rotationSpeed");this.Ja.cj(this.B.get("yaw")+U);this.iN(0,V,0,U,0);this.Ja.Oj(this.an)};m.prototype.Y5a=function(){this.EM();this.aG();this.hv();this.A.T.Xa()};m.prototype.b8a=function(U,V){U=-U*360/this.dR()*this.B.get("rotationSpeed");V=V*180/this.yG()*this.B.get("rotationSpeed");this.Ja.cj(this.B.get("yaw")+U);this.Ja.Tn(this.B.get("pitch")+V);this.iN(0,0,0,U,V);this.Ja.Oj(this.an);
this.A.T.Xa()};m.prototype.U5a=function(){this.hv();this.EM();this.ak=null;this.aG();this.B.get("keepHeight")&&this.F3();this.A.T.Xa()};m.prototype.P7a=function(U){this.L4a(X);X.multiplyScalar(-U*this.B.get("translationSpeed")*(this.PH||1));this.Si&&this.zta(this.Si+X.y);this.Ja.setX(this.B.get("x")+X.x);this.Ja.setY(this.B.get("y")+X.y);this.Ja.setZ(this.B.get("z")+X.z);this.Ja.Oj(this.OH)};m.prototype.a6a=function(){this.EM();this.ak=null;this.Yaa();this.hv();this.A.T.Xa();this.cv=void 0};m.prototype.f8a=
function(U,V,aa,ba){this.cv!==void 0||(this.cv=aa);aa=k(this.cv,ba);this.cv=ba;this.Ja.cj(this.B.get("yaw")+aa);this.Ja.sp(this.Iga*U/V);this.iN(0,0,0,aa,0);this.Ja.Oj(this.an);this.A.T.Xa()};m.prototype.Z5a=function(){this.EM();this.ak=null;this.Yaa();this.hv();this.A.T.Xa();this.u2=void 0};m.prototype.d8a=function(U,V,aa,ba){this.u2!==void 0||(this.u2=U);U=-(V-this.u2)*180/this.yG();this.u2=V;this.Ja.Tn(this.B.get("pitch")+U);this.Ja.sp(this.Iga*aa/ba);this.iN(0,0,0,0,U);this.Ja.Oj(this.an);this.A.T.Xa()};
m.prototype.eUa=function(U,V){var aa=b.Mf(this.A),ba=b.jt(this.A);this.ak=null;ba&&aa&&(ca.set(U,V),this.eS(ca),U=this.xR(ca,ba),U.length&&(this.ak=U[0].point))};m.prototype.Yaa=function(){this.zs=null;var U=b.Mf(this.A),V=b.jt(this.A);V&&U&&(ca.set(0,0),U=this.xR(ca,V),U.length&&(this.zs=U[0].point),this.zs||(this.zs=(new THREE.Vector3).setFromMatrixPosition(V.matrixWorld)),this.B.set("distance",C.setFromMatrixPosition(V.matrixWorld).distanceTo(this.zs)),this.Iga=this.B.get("distance"),this.B.set("x",
this.zs.x),this.B.set("y",this.zs.y),this.B.set("z",this.zs.z),this.B.set("easing",0))};m.prototype.aG=function(){this.zs&&(this.zs=null,C.setFromMatrixPosition(b.jt(this.A).matrixWorld),this.B.set("distance",0),this.B.set("x",C.x),this.B.set("y",C.y),this.B.set("z",C.z),this.B.set("easing",0))};var w="none",y="dragging",x="rotating",z="rotating yaw dragging y",A="moving front",D="rotating around camera",E="rotating yaw gesture",B="rotating pitch gesture",C=new THREE.Vector3,I=new THREE.Vector3,F=
new THREE.Vector3,G=new THREE.Vector3,N=new THREE.Vector3;m.prototype.Fj=function(U){this.B!=U&&(this.B&&(this.Ja=null,R.forEach(function(V){this.B.h(g.K(V),this.sEa,this,!1)}.bind(this)),S.forEach(function(V){this.B.h(g.K(V),this.vz,this,!1)}.bind(this)),K.forEach(function(V){this.B.h(g.K(V),this.Qs,this,!1)}.bind(this)),this.B.set("userInteracting",!1)),this.B=U)&&(this.Ja=new l(this.B),R.forEach(function(V){this.B.bind(g.K(V),this.sEa,this,!1)}.bind(this)),S.forEach(function(V){this.B.bind(g.K(V),
this.vz,this,!1)}.bind(this)),K.forEach(function(V){this.B.bind(g.K(V),this.Qs,this,!1)}.bind(this)),this.vz(),this.Qs(),this.B.set("userInteracting",!1))};m.prototype.vz=function(){if(this.A&&this.B){var U=this.A.N(c.sa,!0);U.translationX=this.B.get("x");var V=this.B.get("y")-U.translationY;Math.abs(V)>T&&(U.translationY=this.B.get("y"),this.pd!=w||this.Fl||this.Rk||this.Gl||this.Mo||this.Lo||this.Ii||this.kh||this.hv());U.We=this.B.get("z");U.Ad=-this.B.get("yaw");U.Yd=this.B.get("pitch");U.Ue=
0;U.ff="YXZ";U.positionX=0;U.positionY=0;U.positionZ=this.B.get("distance");U.easing=this.B.get("easing");(this.B.get("minHeight")!==void 0||this.B.get("keepHeight"))&&this.FEa()}};m.prototype.Qs=function(){this.A&&this.B&&(this.A.N(c.PerspectiveCamera,!0).fov=this.B.get("fov"))};m.prototype.Ffa=function(U,V,aa,ba,da){var fa=this.A.getComponent(c.sa);fa&&(W.makeRotationFromEuler(ea.set(0,fa.Ad*L,0,fa.ff)),X.set(U,V,aa).applyMatrix4(W).multiplyScalar(this.PH),this.Si!==void 0&&(this.Si+=X.y,this.uT()),
this.Ja.setX(this.B.get("x")+X.x),this.Ja.setY(this.B.get("y")+X.y),this.Ja.setZ(this.B.get("z")+X.z),this.Ja.cj(this.B.get("yaw")+ba),this.Ja.Tn(this.B.get("pitch")+da),this.Ja.Oj(this.an))};m.prototype.L4a=function(U){var V=this.A.getComponent(c.sa);V&&(W.makeRotationFromEuler(ea.set(V.Yd*L,V.Ad*L,V.Ue*L,V.ff)),U.set(0,0,1).applyMatrix4(W))};m.prototype.EM=function(){this.TB=p();this.$j=1;this.Qx=this.Rx=this.Tx=this.Sx=this.Px=0;this.kh=this.MG=this.NG=this.OG=this.KG=this.JG=void 0};m.prototype.iN=
function(U,V,aa,ba,da){var fa=p();this.$j=fa-this.TB;this.TB=fa;this.Qx=U;this.Rx=V;this.Tx=aa;this.Sx=ba;this.Px=da};m.prototype.XCa=function(){this.$j&&(this.MG=this.Qx/this.$j,this.NG=this.Rx/this.$j,this.OG=this.Tx/this.$j,this.KG=this.Sx/this.$j,this.JG=this.Px/this.$j,this.kh=1)};m.prototype.sEa=function(){this.B.get("minHeight")!==void 0&&(this.Si===void 0&&this.F3(),this.Si!==void 0&&this.Si<this.B.get("minHeight")&&(this.Si=this.B.get("minHeight")),this.FEa())};m.prototype.hv=function(){this.Si=
this.$l=void 0;this.vT&&(clearTimeout(this.vT),this.vT=null)};m.prototype.fxa=function(){this.xL=2E3;this.mR=void 0;this.A.T.Xa()};m.prototype.JXa=function(){this.xL=0;this.mR=Infinity;this.A.T.Xa()};m.prototype.rha=function(){this.ak||this.Si!==void 0||this.vT||(this.vT=setTimeout(function(){this.vT=null;this.F3()}.bind(this),0))};m.prototype.F3=function(){var U=this.bR();U!==void 0?this.zta(U):this.uT()};m.prototype.zta=function(U){var V=this.B.get("minHeight")||U;this.Si=Math.max(U,V);this.uT();
this.$l=this.B.get("y")+this.Si-U};m.prototype.uT=function(){if(this.Si)this.PH=Math.min(10,Math.max(this.Si||0,.1));else{this.Vr(X);this.XYa(Y);var U=this.zea(X,Y);this.PH=U.length?X.distanceTo(U[0].point):X.y-(this.B.get("minY")||0)}this.PH=Math.max(Math.abs(this.PH||0),.1)};m.prototype.FEa=function(){this.GEa||this.Si===void 0||(this.GEa=setTimeout(function(){this.GEa=null;var U=this.bR();U!==void 0&&this.Si!==void 0&&(U=this.Si-U,this.mR=this.xL==0?Infinity:Math.abs(U/this.xL),this.$l=this.B.get("y")+
U,U!==0&&this.A.T.Xa())}.bind(this),0))};m.prototype.bR=function(){if(this.B)return this.Vr(X),this.zZa(X.x,X.y,X.z)};m.prototype.zZa=function(U,V,aa){var ba=this.zea(X.set(U,V,aa),Y.set(0,-1,0));if(ba.length>0)return ba[0].distance;ba=this.zea(X.set(U,V+1E3,aa),Y.set(0,-1,0));if(ba.length>0)return ba[ba.length-1].distance-1E3};m.prototype.zea=function(U,V){Z.ray.origin.copy(U);Z.ray.direction.copy(V);return Z.intersectObjects(this.AG(),!1)};m.prototype.xR=function(U,V){Z.setFromCamera(U,V);return Z.intersectObjects(this.AG(),
!1)};m.prototype.AG=function(){var U=this.A&&b.Mf(this.A);if(!U)return[];var V=[];U.traverse(function(aa){aa.isSprite||aa.isLine||V.push(aa)});return V};m.prototype.Vr=function(U){U.set(0,0,0);this.B&&(U.applyMatrix4(W.makeTranslation(0,0,this.B.get("distance"))),U.applyMatrix4(W.makeRotationFromEuler(ea.set(this.B.get("pitch")*L,-this.B.get("yaw")*L,0*L,"YXZ"))),U.applyMatrix4(W.makeTranslation(this.B.get("x"),this.B.get("y"),this.B.get("z"))))};m.prototype.XYa=function(U){this.B?(W.makeRotationFromEuler(ea.set(this.B.get("pitch")*
L,-this.B.get("yaw")*L,0,"YXZ")),U.set(0,0,-1).applyMatrix4(W)):U.set(0,0,-1)};var O=[e.ua.Sj,e.ua.yi,e.ua.$a,e.ua.Cb,e.ua.yp,e.ua.io,e.ua.Dp,e.ua.lo,e.ua.Q,e.ua.E],R=["minHeight"],S="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,Q=180/Math.PI,T=1E-6,W=new THREE.Matrix4,X=new THREE.Vector3(0,0,0),Y=new THREE.Vector3(0,0,0),ca=new THREE.Vector2(0,0),ea=new THREE.Euler,Z=new THREE.Raycaster;m.prototype.dispose=
function(){this.aG();this.Fj(null);this.Wea();this.Cfa();this.es.Ba()};m.Ya=function(U){U.L(c.Vw).manager=new m(U)};m.Ba=function(U){var V=U.getComponent(c.Vw);V.manager.dispose();V.manager=null;U.ka(c.Vw)};m.update=function(U){U.getComponent(c.Vw).manager.update()};m.frame=function(U,V,aa){U.getComponent(c.Vw).manager.frame(V,aa)};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(C){this.A=
C;this.Vea(D);this.Bfa();this.es=new d(C);this.al=new THREE.Matrix4;this.OH=.05;this.an=.25;this.Fl=this.Rk=this.Gl=this.Mo=this.Lo=0;this.MG=this.NG=this.OG=this.KG=this.JG=this.TB=this.$j=this.Qx=this.Rx=this.Tx=this.Sx=this.Px=void 0;this.uea=1E3;this.NBa=720;this.DDa=4;this.Bxa=720;this.Xea=2;this.Ja=null;this.AH(q.aB);this.update()}var k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/constants/Key"),g=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"),n=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),l=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),q=a("tdv/view/constants/Cursor");k.I4(m,[b,n,l]);m.prototype.update=function(){var C=this.A.getComponent(g.oF);
this.Fj(C&&C.properties);this.es.dP(C&&C.properties,"moving");var I=(!C.TN||!c.pO(this.A.T))&&C.enabled;this.d3(C&&(I?C.ah:null));this.JR(!!C&&I&&C.ID);I||this.jH();I&&C.ID||(this.Mo=this.Lo=this.Fl=this.Rk=this.Gl=0)};m.prototype.frame=function(C){this.kh&&(this.kh=Math.max(0,this.kh-C/this.uea),this.Ja.setX(this.B.get("x")+this.MG*this.kh),this.Ja.setY(this.B.get("y")+this.NG*this.kh),this.Ja.setZ(this.B.get("z")+this.OG*this.kh),this.Ja.cj(this.B.get("yaw")+this.KG*this.kh),this.Ja.Tn(this.B.get("pitch")+
this.JG*this.kh),this.A.T.Xa());if(this.Mo||this.Lo||this.Fl||this.Rk||this.Gl)C/=1E3,this.Ffa(this.Fl*C,this.Rk*C,this.Gl*C,this.Mo*C,this.Lo*C);this.es.lqa()};m.prototype.yS=function(){this.zja()};m.prototype.zja=function(){this.Mo=this.Lo=this.Gl=this.Rk=this.Fl=0;var C=this.wg[h.ua.yp]?1:this.wg[h.ua.Dp]?-1:0,I=this.wg[h.ua.lo]?1:this.wg[h.ua.io]?-1:0,F=this.wg[h.ua.Q]?1:this.wg[h.ua.E]?-1:0,G=this.wg[h.ua.Sj]?1:this.wg[h.ua.yi]?-1:0,N=this.wg[h.ua.$a]?1:this.wg[h.ua.Cb]?-1:0;if(C||I||F||G||N){var O=
this.hk?.2:1;C&&(this.Fl=-C*O*this.Xea*this.B.get("translationSpeed"));F&&(this.Rk=-F*O*this.Xea*this.B.get("translationSpeed"));I&&(this.Gl=-I*O*this.Xea*this.B.get("translationSpeed"));N&&(this.Mo=N*O*this.Bxa*this.B.get("rotationSpeed"));G&&(this.Lo=-G*O*this.Bxa*this.B.get("rotationSpeed"));this.A.T.Xa()}};m.prototype.s1=function(){this.AH(q.Ai);this.pj=!0;this.TB=(new Date).getTime();this.$j=1;this.Qx=this.Rx=this.Tx=this.Sx=this.Px=0;this.kh=this.MG=this.NG=this.OG=this.KG=this.JG=void 0;this.A.T.Xa()};
m.prototype.q1=function(C,I){if(this.pj){var F=(C*C+I*I)/2500;F=F>1?1/Math.sqrt(F):1;C*=F;I*=F;F=(new Date).getTime();this.$j=F-this.TB;this.TB=F;this.Qx=this.Rx=this.Tx=this.Sx=this.Px=0;F=this.bS;this.hk&&(F=!F);F?(this.Sx=+C*this.B.get("rotationSpeed")*this.NBa/this.ay(),this.Px=-I*this.B.get("rotationSpeed")*this.NBa/this.ay(),this.MBa(this.Sx,this.Px)):(this.gwa(C*this.DDa/this.ay(),I*this.DDa/this.ay(),u),this.Qx=u.x,this.Rx=u.y,this.Tx=u.z,this.Yia(this.Qx,this.Rx,this.Tx));this.Ja.Oj(this.an)}};
m.prototype.gwa=function(C,I,F){var G=this.A.getComponent(g.sa);F.set(-C*this.B.get("translationSpeed"),+I*this.B.get("translationSpeed"),0*this.B.get("translationSpeed"));F.applyMatrix4(z.makeRotationFromEuler(x.set(G.Yd*r,G.Ad*r,G.Ue*r,G.ff)));F.multiplyScalar(this.B.get("distance"))};m.prototype.jH=function(){this.m2(q.Ai);this.pj&&(this.pj=!1,this.$j&&(this.MG=this.Qx/this.$j,this.NG=this.Rx/this.$j,this.OG=this.Tx/this.$j,this.KG=this.Sx/this.$j,this.JG=this.Px/this.$j,this.kh=1,this.Ja.Oj(this.an)),
this.TB=void 0)};m.prototype.u1=function(C){this.Ja.sp(this.B.get("distance")-C*this.B.get("distance")*this.B.get("translationSpeed"));this.Ja.Oj(this.OH)};m.prototype.fM=function(C,I){if(this.B.get("doubleClickAction")=="center"){var F=e.Mf(this.A),G=e.jt(this.A);G&&F&&(w.set(C,I),this.eS(w),C=this.xR(w,G),C.length!=0&&(C=C[0].point,I=u.setFromMatrixPosition(G.matrixWorld).sub(C),G=I.length(),y.setFromUnitVectors(v.set(0,0,1),I.normalize()),x.setFromQuaternion(y,"YXZ"),I=x.x*t,this.Ja.cj(-x.y*t),
this.Ja.Tn(I),this.Ja.sp(G),this.Ja.setX(C.x),this.Ja.setY(C.y),this.Ja.setZ(C.z),this.Ja.Oj(this.OH)))}};m.prototype.aza=function(){this.gxa=this.B.get("distance");this.pj=!1};m.prototype.Yfa=function(C,I,F){this.gwa(C/this.ay(),I/this.ay(),u);this.Yia(u.x,u.y,u.z);this.Ja.sp(this.gxa/F);this.Ja.Oj(this.an)};m.prototype.Zfa=function(){this.gxa=this.B.get("distance")};m.prototype.Ffa=function(C,I,F,G,N){var O=this.A.getComponent(g.sa);O&&(z.makeRotationFromEuler(x.set(0,O.Ad*r,0,O.ff)),u.set(C,I,
F).applyMatrix4(z).multiplyScalar(this.B.get("distance")),this.Yia(u.x,u.y,u.z),this.MBa(G,N),this.Ja.Oj(this.an))};m.prototype.Yia=function(C,I,F){this.Ja.setX(this.B.get("x")+C);this.Ja.setY(this.B.get("y")+I);this.Ja.setZ(this.B.get("z")+F)};m.prototype.MBa=function(C,I){this.Ja.cj(this.B.get("yaw")+C);this.Ja.Tn(this.B.get("pitch")+I)};m.prototype.Fj=function(C){this.B!=C&&(this.B&&(this.Ja=null,E.forEach(function(I){this.B.h(p.K(I),this.vz,this,!1)}.bind(this)),B.forEach(function(I){this.B.h(p.K(I),
this.Qs,this,!1)}.bind(this)),this.B.set("userInteracting",!1)),this.B=C)&&(this.B.set("userInteracting",!1),this.Ja=new f(this.B),E.forEach(function(I){this.B.bind(p.K(I),this.vz,this,!1)}.bind(this)),B.forEach(function(I){this.B.bind(p.K(I),this.Qs,this,!1)}.bind(this)),this.vz(),this.Qs())};m.prototype.xR=function(C,I){A.setFromCamera(C,I);return A.intersectObjects(this.AG(),!1)};m.prototype.AG=function(){var C=this.A&&e.Mf(this.A);if(!C)return[];var I=[];C.traverse(function(F){F.isSprite||F.isLine||
I.push(F)});return I};m.prototype.vz=function(){if(this.A&&this.B){var C=this.A.N(g.sa,!0);C.translationX=this.B.get("x");C.translationY=this.B.get("y");C.We=this.B.get("z");C.Ad=-this.B.get("yaw");C.Yd=this.B.get("pitch");C.Ue=0;C.ff="YXZ";C.positionX=0;C.positionY=0;C.positionZ=this.B.get("distance");C.easing=this.B.get("easing")}};m.prototype.Qs=function(){this.A&&this.B&&(this.A.N(g.PerspectiveCamera,!0).fov=this.B.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),y=new THREE.Quaternion,x=new THREE.Euler,z=new THREE.Matrix4,A=new THREE.Raycaster,D=[h.ua.Sj,h.ua.yi,h.ua.$a,h.ua.Cb,h.ua.yp,h.ua.io,h.ua.Dp,h.ua.lo,h.ua.Q,h.ua.E],E="easing minYaw maxYaw yaw minPitch maxPitch pitch minDistance maxDistance distance minX maxX x minY maxY y minZ maxZ z".split(" "),B=["minFov","maxFov","fov"];m.prototype.dispose=function(){this.Fj(null);this.Wea();this.Cfa();this.es.Ba()};m.Ya=function(C){C.L(g.$w).manager=new m(C)};m.Ba=function(C){var I=
C.getComponent(g.$w);I.manager.dispose();I.manager=null;C.ka(g.$w)};m.update=function(C){C.getComponent(g.$w).manager.update()};m.frame=function(C,I,F){C.getComponent(g.$w).manager.frame(I,F)};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,k,p,h,g){a=function(){function c(d){this.F=d;this.properties=this.F.getComponent(h.jx).properties;this.il()&&this.y9a();this.update()}c.prototype.update=function(){this.properties=this.F.getComponent(h.jx).properties;this.il()||this.IFa()};c.prototype.frame=function(){this.il()?
this.x9a():this.IFa()};c.prototype.y9a=function(){var d=this.F.getComponent(h.jx).Eg||1;this.lHa();k.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:this.properties.get("yaw")});k.setScale(d)};c.prototype.x9a=function(){this.lHa();k.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:void 0});this.properties.set("yaw",-e.setFromQuaternion(k.yg).y*b)};c.prototype.IFa=function(){var d=this.F.N(h.sa,!0);d.translationX=
this.properties.get("x");d.translationY=this.properties.get("y");d.We=this.properties.get("z");d.Ad=-this.properties.get("yaw");d.Yd=this.properties.get("pitch");d.Ue=0;d.ff="YXZ";d.positionX=0;d.positionY=0;d.positionZ=this.properties.get("distance",0);d.easing=0;this.F.N(h.PerspectiveCamera,!0).fov=this.properties.get("fov")};c.prototype.lHa=function(){var d=p.Mf(this.F),f=this.F.getComponent(h.Kk);f=f&&f.camera;k.pw!==f&&k.gpa(k.Dg,d,f,k.UP.H$)};c.prototype.il=function(){return this.F.getComponent(h.PerspectiveCamera).il};
c.Ya=function(d){d.L(h.uu).manager=new c(d)};c.update=function(d){d.getComponent(h.uu).manager.update()};c.frame=function(d,f,n){d.getComponent(h.uu).manager.frame(f,n)};c.Ba=function(d){d.getComponent(h.uu).manager=null;d.ka(h.uu)};return c}();var e=new g.Euler,b=180/Math.PI;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,k,p,h){return function(){function g(e){this.locked=!0;this.jl=!1;this.F=e;p.O.bind(k.V,this.kb,this,!0);this.update()}g.prototype.update=function(){var e=this.F.getComponent(h.yF);e=(e===null||e===void 0?void 0:e.locked)||!1;!e&&this.locked&&(this.jl=!0);this.locked=e;this.jl&&p.Coa()};g.prototype.frame=function(){this.locked||
(this.jl=!1)};g.prototype.dispose=function(){p.O.h(k.V,this.kb,this)};g.prototype.kb=function(){this.F.N(h.Cr)};g.Ya=function(e){e.L(h.Cr).manager=new g(e)};g.update=function(e){e.getComponent(h.Cr).manager.update()};g.frame=function(e,b,c){e.getComponent(h.Cr).manager.frame(b,c)};g.Ba=function(e){var b=e.getComponent(h.Cr);b.manager.dispose();b.manager=null;e.ka(h.Cr)};return g}()});
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,k,p,h,g,e){a=function(){function x(z){this.locked=!0;this.jl=!1;this.sla=this.nm=this.Re=null;this.l5=new e.Matrix4;this.zI=new e.Vector3;this.RO=new Map;this.Eg=1;this.BE=0;this.au=!1;this.ql=0;this.nk=null;this.cE=new e.Vector3;this.Hd=
new e.Vector3;this.Y6=new e.Quaternion;this.YW=this.ZW=this.$W=0;this.yz=new e.Box3(new e.Vector3(-Infinity,-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=z;this.vk=this.vk.bind(this);this.bt=new h(this.F);p.O.bind(k.V,this.kb,this,!0);this.update()}x.prototype.update=function(){var z=this.F.getComponent(g.yK),A=(z===null||z===void 0?void 0:z.locked)||!1;!A&&this.locked&&(this.jl=!0);this.locked=A;this.Eg=(z===null||z===void 0?void 0:z.Eg)||1;this.ql=z===null||z===void 0?void 0:
z.ql;this.DE();this.properties=z.properties;this.locked||(p.setScale(this.Eg),this.iV(),this.vk());this.jl&&(b.setFromQuaternion(p.Bm),p.setPosition({pitch:b.x*w,roll:b.z*w}),this.nI())};x.prototype.frame=function(z){if(!this.locked){this.Yt();this.hY();this.nI();if(!this.properties.get("controllingPosition")){this.Hd.copy(p.Qc);this.Y6.copy(p.yg);var A;(A=this.$U())||(A=this.yka(z));A||(A=this.aV(z));A&&(z={},p.Qc.equals(this.Hd)||(z.x=this.Hd.x,z.y=this.Hd.y,z.z=this.Hd.z),p.yg.equals(this.Y6)||
(b.setFromQuaternion(this.Y6,"YXZ"),z.yaw=-b.y*w,z.pitch=b.x*w,z.roll=b.z*w),p.setPosition(z))}this.eV();this.CN();this.jl=!1}};x.prototype.dispose=function(){p.O.h(k.V,this.kb,this);this.properties.set("userInteracting",!1);this.DE();this.ef();this.IX([])};x.prototype.DE=function(){x.fB.forEach(function(z){var A;(A=this.properties)===null||A===void 0||A.h(k.K(z),this.vk,this)}.bind(this))};x.prototype.iV=function(){x.fB.forEach(function(z){var A;(A=this.properties)===null||A===void 0||A.bind(k.K(z),
this.vk,this,!0)}.bind(this))};x.prototype.vk=function(){this.yz.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.yz.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};x.prototype.nI=function(){var z=this.properties.get("x"),A=this.properties.get("y"),D=this.properties.get("z"),E=this.properties.get("yaw"),B=this.properties.get("pitch"),C=this.properties.get("distance");
if(z!==this.cE.x||A!==this.cE.y||D!==this.cE.z||E!==this.$W||B!==this.ZW||C!==this.YW)this.cE.set(z,A,D),n.identity(),n.multiply(l.makeTranslation(z,A,D)),n.multiply(l.makeRotationFromEuler(b.set(B*y,-E*y,0,"YXZ"))),n.multiply(l.makeTranslation(0,0,C)),n.decompose(d,c,f),b.setFromQuaternion(c,"YXZ"),p.setPosition({x:d.x,y:d.y,z:d.z,yaw:-b.y*w})};x.prototype.eV=function(){d.copy(p.Qc).sub(this.cE);var z=d.length();b.setFromQuaternion(c.setFromUnitVectors(u,d.multiplyScalar(1/z)),"YXZ");this.properties.set("x",
this.cE.x);this.properties.set("y",this.cE.y);this.properties.set("z",this.cE.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)};x.prototype.CN=function(){this.$W=this.properties.get("yaw");this.ZW=this.properties.get("pitch");this.YW=this.properties.get("distance")};x.prototype.Yt=function(){this.IX((x.IE.get(this.F.T)||[]).map(function(z){return z.getComponent(g.xc)}))};x.prototype.IX=function(z){var A=[],
D=[];this.RO.forEach(function(E){z.indexOf(E)===-1&&A.push(E)}.bind(this));z.forEach(function(E){this.RO.has(E.O)||D.push(E)}.bind(this));this.nm&&z.indexOf(this.nm)===-1&&this.ef();A.forEach(function(E){this.bX(E.O);this.RO.delete(E.O)}.bind(this));D.forEach(function(E){this.YU(E.O);this.RO.set(E.O,E)}.bind(this));this.Re=z.find(function(E){return E.Lg})||null};x.prototype.YU=function(z){z.bind(k.oa,this.vt,this,!0);z.bind(k.Ra,this.Rh,this,!0)};x.prototype.bX=function(z){z.h(k.oa,this.vt,this);
z.h(k.Ra,this.Rh,this)};x.prototype.kb=function(){this.F.N(g.Dr)};x.prototype.vt=function(z){this.properties.get("inMandatorySequence")||z.data.fW||z.data.type=="other"||this.properties.get("clickTranslationDisabled")||(z=this.RO.get(z.source),z=this.bt.jW(z),z.length!=0&&(this.nk=z[0].point))};x.prototype.Rh=function(z){if(!this.properties.get("inMandatorySequence")&&!this.properties.get("mouseDisabled")){this.ef();z=z.source;var A=this.RO.get(z),D=this.bt.jW(A);D.length!=0&&(this.nm=A,this.sla=
z,this.sla.bind(k.bb,this.ef,this,!0),this.zI.copy(D[0].point),this.l5.copy(this.nm.matrixWorld))}};x.prototype.ef=function(){this.nm&&(this.nm.O.h(k.bb,this.ef,this),this.nm=this.sla=null)};x.prototype.$U=function(){if(!this.nk)return!1;this.Hd.copy(this.nk).sub(p.Qc).multiplyScalar(.5).add(p.Qc);this.nk=null;return!0};x.prototype.aV=function(z){return this.bV()?!0:this.cV(z)?!0:!1};x.prototype.bV=function(){if(!this.Re)return!1;if(this.Re.Tb.y===0&&this.Re.Tb.x===0)return this.BE=Date.now(),this.au=
!1;if(this.au)return!0;var z=Math.sqrt(this.Re.Tb.y*this.Re.Tb.y+this.Re.Tb.x*this.Re.Tb.x)*this.properties.get("rotationSpeed",1),A=Math.atan2(-this.Re.Tb.y,this.Re.Tb.x),D=Math.abs(A)<Math.PI*.25;A=Math.abs(A)>Math.PI*.75;return this.ql!==0&&z>.95&&(D||A)&&Date.now()-this.BE<100?(this.au=!0,z=this.ql*(A?-1:1),z=-b.setFromQuaternion(p.yg,"YXZ").y*w+z,p.setPosition({yaw:z}),!0):!1};x.prototype.cV=function(z){if(!this.Re||this.Re.Tb.y===0&&this.Re.Tb.x===0)return!1;z=4E3/3600/this.Eg*this.properties.get("translationSpeed",
1)*(this.Re.EA?3:1)*z/1E3;var A=d.set(0,0,-1).applyQuaternion(p.yg),D=f.set(1,0,0).applyQuaternion(p.yg);A.normalize().multiplyScalar(-this.Re.Tb.y*z);D.normalize().multiplyScalar(this.Re.Tb.x*z);this.Hd.set(p.Qc.x+A.x+D.x,p.Qc.y+A.y+D.y,p.Qc.z+A.z+D.z);return!0};x.prototype.yka=function(z){if(!this.nm)return!1;this.zka(z);z=n.copy(this.l5);var A=l.copy(this.nm.matrixWorld),D=q.compose(p.Qc,p.yg,v);A=r.copy(D).invert().multiply(A);t.copy(z).multiply(A.invert()).decompose(this.Hd,this.Y6,d);return!0};
x.prototype.zka=function(z){if(!this.nm||this.nm.Tb.y===0&&this.nm.Tb.x===0)return!1;z=90*z/1E3*this.properties.get("rotationSpeed",1);var A=q.makeRotationFromQuaternion(c.setFromRotationMatrix(this.l5)),D=r.copy(A).invert(),E=l.identity();E.multiply(n.makeTranslation(this.zI.x,this.zI.y,this.zI.z));E.multiply(A);E.multiply(n.makeRotationFromEuler(b.set(this.nm.Tb.y*z*y,this.nm.Tb.x*z*y,0,"YXZ")));E.multiply(D);E.multiply(n.makeTranslation(-this.zI.x,-this.zI.y,-this.zI.z));this.l5.premultiply(E);
return!0};x.prototype.hY=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.nm?this.properties.set("userInteracting",!0):this.nk?this.properties.set("userInteracting",!0):!this.Re||this.Re.Tb.y===0&&this.Re.Tb.x===0?this.properties.set("userInteracting",!1):this.properties.set("userInteracting",!0)};x.CJ=function(z,A){this.IE.set(z,A)};x.Ya=function(z){z.L(g.Dr).manager=new x(z)};x.update=function(z){z.getComponent(g.Dr).manager.update()};x.frame=
function(z,A,D){z.getComponent(g.Dr).manager.frame(A,D)};x.Ba=function(z){var A=z.getComponent(g.Dr);A.manager.dispose();A.manager=null;z.ka(g.Dr)};x.IE=new Map;x.fB="minX maxX minY maxY minZ maxZ".split(" ");return x}();var b=new e.Euler(0,0,0,"YXZ"),c=new e.Quaternion,d=new e.Vector3,f=new e.Vector3,n=new e.Matrix4,l=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,y=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,k,p,h,g,e){a=function(){function y(x){this.locked=!0;this.jl=!1;this.Lj=this.iX=this.Re=null;this.sna=new e.Matrix4;this.lJ=[];this.Eg=1;this.BE=0;this.au=!1;this.ql=0;this.nk=null;this.Cqa=!1;this.Hd=new e.Vector3;this.YW=this.ZW=this.$W=
this.zMa=this.yMa=this.xMa=0;this.yz=new e.Box3(new e.Vector3(-Infinity,-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=x;this.vk=this.vk.bind(this);this.bt=new h(this.F);p.O.bind(k.V,this.kb,this,!0);this.update()}y.prototype.update=function(){var x=this.F.getComponent(g.zK),z=(x===null||x===void 0?void 0:x.locked)||!1;!z&&this.locked&&(this.jl=!0);this.locked=z;this.Eg=(x===null||x===void 0?void 0:x.Eg)||1;this.ql=x===null||x===void 0?void 0:x.ql;this.DE();this.properties=
x.properties;this.locked||(p.setScale(this.Eg),this.iV(),this.vk());this.jl&&(b.setFromQuaternion(p.Bm),p.setPosition({pitch:b.x*v,roll:b.z*v}),this.nI(!0))};y.prototype.frame=function(x){if(!this.locked){this.Yt();this.hY();this.nI(!1);if(!this.properties.get("controllingPosition")){this.Hd.copy(p.Qc);var z=this.VD=-b.setFromQuaternion(p.yg).y*v;var A=this.$U();this.Cqa&&this.Lj&&this.sna.copy(this.Lj.matrixWorld);this.Cqa=!1;A||(A=this.Cqa=this.zka(x));A||(A=this.yka(x));A||(A=this.aV(x));A&&(x=
{},p.Qc.equals(this.Hd)||(x.x=this.Hd.x,x.y=this.Hd.y,x.z=this.Hd.z),this.VD!=z&&(x.yaw=this.VD),p.setPosition(x))}this.eV();this.CN();this.jl=!1}};y.prototype.dispose=function(){p.O.h(k.V,this.kb,this);this.properties.set("userInteracting",!1);this.DE();this.ef();this.IX([])};y.prototype.DE=function(){y.fB.forEach(function(x){var z;(z=this.properties)===null||z===void 0||z.h(k.K(x),this.vk,this)}.bind(this))};y.prototype.iV=function(){y.fB.forEach(function(x){var z;(z=this.properties)===null||z===
void 0||z.bind(k.K(x),this.vk,this,!0)}.bind(this))};y.prototype.vk=function(){this.yz.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.yz.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};y.prototype.nI=function(x){var z=this.properties.get("x"),A=this.properties.get("y"),D=this.properties.get("z"),E=this.properties.get("controllingPosition"),B=this.properties.get("yaw"),
C=this.properties.get("pitch"),I=this.properties.get("distance");if(z!==this.xMa||A!==this.yMa||D!==this.zMa||B!==this.$W||C!==this.ZW||I!==this.YW)n.identity(),n.multiply(l.makeTranslation(z,A,D)),n.multiply(l.makeRotationFromEuler(b.set(C*w,-B*w,0,"YXZ"))),n.multiply(l.makeTranslation(0,0,I)),n.decompose(d,c,f),b.setFromQuaternion(c,"YXZ"),p.setPosition({x:d.x,y:d.y,z:d.z,yaw:!x||E?void 0:-b.y*v})};y.prototype.eV=function(){this.properties.set("x",p.Qc.x);this.properties.set("y",p.Qc.y);this.properties.set("z",
p.Qc.z);b.setFromQuaternion(p.yg);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)};y.prototype.CN=function(){this.xMa=this.properties.get("x");this.yMa=this.properties.get("y");this.zMa=this.properties.get("z");this.$W=this.properties.get("yaw");this.ZW=this.properties.get("pitch");this.YW=this.properties.get("distance")};y.prototype.Yt=function(){this.IX((y.IE.get(this.F.T)||[]).map(function(x){return x.getComponent(g.xc)}))};
y.prototype.IX=function(x){var z=[],A=[];this.lJ.forEach(function(D){x.indexOf(D)===-1&&z.push(D)}.bind(this));x.forEach(function(D){this.lJ.indexOf(D)===-1&&A.push(D)}.bind(this));this.Lj&&x.indexOf(this.Lj)===-1&&this.ef();z.forEach(function(D){this.bX(D);this.lJ.splice(this.lJ.indexOf(D),1)}.bind(this));A.forEach(function(D){this.YU(D);this.lJ.push(D)}.bind(this));this.Re=x.find(function(D){return D.Lg})||null;this.iX=x.find(function(D){return!D.Lg})||this.Re};y.prototype.YU=function(x){x.O.bind(k.Ra,
this.Rh,this,!0);x.O.bind(k.oa,this.vt,this,!0)};y.prototype.bX=function(x){x.O.h(k.Ra,this.Rh,this);x.O.h(k.oa,this.vt,this)};y.prototype.kb=function(){this.F.N(g.Er)};y.prototype.vt=function(x){if(!(this.properties.get("inMandatorySequence")||x.data.fW||x.data.type=="other"||this.properties.get("clickTranslationDisabled"))){var z=this.lJ.find(function(A){return x.source===A.O});z&&(z=this.bt.jW(z),z.length!=0&&(this.nk=z[0].point))}};y.prototype.Rh=function(x){if(!this.properties.get("inMandatorySequence")&&
!this.properties.get("mouseDisabled")){this.ef();var z=this.lJ.find(function(A){return x.source===A.O});z&&(this.Lj=z,this.Lj.O.bind(k.bb,this.ef,this,!0),this.sna.copy(this.Lj.matrixWorld),z=this.bt.jW(z),z.length!=0&&(this.QD=(new e.Vector3).copy(z[0].point)))}};y.prototype.ef=function(){this.Lj&&(this.Lj.O.h(k.bb,this.ef,this),this.QD=this.Lj=null)};y.prototype.$U=function(){if(!this.nk)return!1;this.Hd.copy(this.nk).sub(p.Qc).multiplyScalar(.5).add(p.Qc);this.nk=null;return!0};y.prototype.aV=
function(x){return this.bV()?!0:this.cV(x)?!0:!1};y.prototype.bV=function(){var x=this.iX;if(!x)return!1;if(x.Tb.y===0&&x.Tb.x===0)return this.BE=Date.now(),this.au=!1;if(this.au)return!0;var z=Math.sqrt(x.Tb.y*x.Tb.y+x.Tb.x*x.Tb.x),A=Math.atan2(-x.Tb.y,x.Tb.x);x=Math.abs(A)<Math.PI*.25;A=Math.abs(A)>Math.PI*.75;return this.ql!==0&&z>.95&&(x||A)&&Date.now()-this.BE<100?(this.au=!0,this.VD+=this.ql*(A?-1:1),!0):!1};y.prototype.cV=function(x){if(!this.Re||this.Re.Tb.y===0&&this.Re.Tb.x===0)return!1;
x=1E4/3600/this.Eg*this.properties.get("translationSpeed",1)*(this.Re.EA?3:1)*x/1E3;this.Re.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.Re.Tb.y*x);A.normalize().multiplyScalar(this.Re.Tb.x*x);this.Hd.set(p.Qc.x+z.x+A.x,p.Qc.y+z.y+A.y,p.Qc.z+z.z+A.z);return!0};y.prototype.yka=function(){if(!this.Lj)return!1;var x=this.mGa(n.copy(this.sna)),z=this.mGa(l.copy(this.Lj.matrixWorld)),A=q.compose(p.Qc,p.yg,u);z=
r.copy(A).invert().multiply(z);t.copy(x).multiply(z.invert()).decompose(this.Hd,c,d);this.VD=-b.setFromQuaternion(c).y*v;return!0};y.prototype.mGa=function(x){return x.decompose(d,c,f).compose(d,c.identity(),f)};y.prototype.zka=function(x){if(!this.Lj||!this.QD||this.Lj.Tb.y===0&&this.Lj.Tb.x===0)return!1;x=90*x/1E3;var z=n.compose(p.Qc,p.yg,u),A=l.identity();A.multiply(q.makeTranslation(this.QD.x,this.QD.y,this.QD.z));A.multiply(q.makeRotationY(-this.VD*w));A.multiply(q.makeRotationFromEuler(b.set(this.Lj.Tb.y*
x*w,this.Lj.Tb.x*x*w,0,"YXZ")));A.multiply(q.makeRotationY(this.VD*w));A.multiply(q.makeTranslation(-this.QD.x,-this.QD.y,-this.QD.z));z.premultiply(A);z.decompose(this.Hd,c,d);this.VD=-b.setFromQuaternion(c).y*v;return!0};y.prototype.hY=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.Lj?this.properties.set("userInteracting",!0):this.nk?this.properties.set("userInteracting",!0):!this.Re||this.Re.Tb.y===0&&this.Re.Tb.x===0?this.properties.set("userInteracting",
!1):this.properties.set("userInteracting",!0)};y.CJ=function(x,z){this.IE.set(x,z)};y.Ya=function(x){x.L(g.Er).manager=new y(x)};y.update=function(x){x.getComponent(g.Er).manager.update()};y.frame=function(x,z,A){x.getComponent(g.Er).manager.frame(z,A)};y.Ba=function(x){var z=x.getComponent(g.Er);z.manager.dispose();z.manager=null;x.ka(g.Er)};y.IE=new Map;y.fB="minX maxX minY maxY minZ maxZ".split(" ");return y}();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,n=new e.Matrix4,l=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,k,p,h,g,e){a=function(){function r(t){this.locked=!0;this.jl=!1;this.iX=this.Sh=this.Sq=null;this.Eg=1;this.BE=0;this.au=!1;this.ql=0;this.nk=null;this.Hd=new e.Vector3;this.GV=[];this.Gt=new e.Vector3;this.yz=new e.Box3(new e.Vector3(-Infinity,
-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=t;this.vk=this.vk.bind(this);this.bt=new h(this.F);p.O.bind(k.V,this.kb,this,!0);this.update()}r.prototype.update=function(){var t=this.F.getComponent(g.AK),u=(t===null||t===void 0?void 0:t.locked)||!1;!u&&this.locked&&(this.jl=!0);this.locked=u;this.Eg=(t===null||t===void 0?void 0:t.Eg)||1;this.ql=t===null||t===void 0?void 0:t.ql;this.DE();this.properties=t.properties;this.locked||(p.setScale(this.Eg),this.iV(),this.vk());this.jl&&
(b.setFromQuaternion(p.Bm),p.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.DE=function(){r.fB.forEach(function(t){var u;(u=this.properties)===null||u===void 0||u.h(k.K(t),this.vk,this)}.bind(this))};r.prototype.iV=function(){r.fB.forEach(function(t){var u;(u=this.properties)===null||u===void 0||u.bind(k.K(t),this.vk,this,!0)}.bind(this))};r.prototype.vk=function(){this.yz.min.set(this.properties.get("minX",
-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.yz.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.Yt(),this.hY(),this.nI(),this.properties.get("controllingPosition")||(this.Hd.copy(p.Qc),this.$U()||this.aV(t),this.Hd.y=this.AFa(this.Gt.y,this.b6(this.Hd.x,this.Hd.y,this.Hd.z),t),this.iab()&&(this.Hd.copy(this.Gt),this.Hd.y=this.AFa(this.Gt.y,
this.b6(this.Hd.x,this.Hd.y,this.Hd.z),t)),this.yz.clampPoint(this.Hd,this.Hd),p.Qc.equals(this.Hd)||p.setPosition({x:this.Hd.x,y:this.Hd.y,z:this.Hd.z,Za:void 0})),this.eV(),this.CN(),this.Jfb(),this.jl=!1)};r.prototype.Jfb=function(){this.bt.refresh();this.GV.forEach(function(t){t.y=NaN})};r.prototype.dispose=function(){p.O.h(k.V,this.kb,this);this.properties.set("userInteracting",!1);this.DE()};r.prototype.nI=function(){var t=this.properties.get("x"),u=this.properties.get("y"),v=this.properties.get("z");
if(this.Gt.x!==t||this.Gt.y!==u||this.Gt.z!==v)this.properties.get("controllingPosition")||(u=this.b6(t,u,v)),p.setPosition({x:t,y:u,z:v,yaw:void 0}),this.CN()};r.prototype.eV=function(){this.properties.set("x",p.Qc.x);this.properties.set("y",p.Qc.y);this.properties.set("z",p.Qc.z);b.setFromQuaternion(p.yg);this.properties.set("yaw",-b.y*q);this.properties.set("pitch",b.x*q);this.properties.set("roll",b.z*q)};r.prototype.CN=function(){this.Gt.copy(p.Qc);this.wMa=this.Ula(this.Gt)};r.prototype.Yt=
function(){var t=null,u=null;(r.IE.get(this.F.T)||[]).forEach(function(v){v=v.getComponent(g.xc);v.Lg?t=v:u=v});this.fhb(t,u)};r.prototype.fhb=function(t,u){this.Sq=t;this.iX=u;t=t?t.O:null;this.Sh!==t&&(this.Sh&&this.bX(this.Sh),(this.Sh=t)&&this.YU(this.Sh))};r.prototype.YU=function(t){t.bind(k.oa,this.vt,this,!0)};r.prototype.bX=function(t){t.h(k.oa,this.vt,this)};r.prototype.kb=function(){this.F.N(g.Fr)};r.prototype.vt=function(t){if(this.Sq&&this.properties&&!this.properties.get("inMandatorySequence")&&
!t.data.fW&&t.data.type!="other"&&!this.properties.get("clickTranslationDisabled")&&this.properties.get("doubleClickAction")=="translate"&&(t=this.bt.jW(this.Sq),t.length!=0)){var u=t[0];if(u.face&&u.face.normal){t=c.copy(p.Qc);var v=d.copy(u.point);u=f.copy(u.face.normal).transformDirection(u.object.matrixWorld);if(Math.abs(Math.acos(u.dot(l)))<Math.PI*.25)v.y+=this.O5();else{u=n.copy(v).sub(t);var w=u.length(),y=this.O5()*.5;if(w<y)return;v.sub(u.multiplyScalar(y/w))}v.y=this.b6(v.x,v.y,v.z);this.bt.MJ(t,
v)||(this.nk=new e.Vector3(v.x,v.y,v.z))}}};r.prototype.$U=function(){if(!this.nk)return!1;this.Hd.copy(this.nk);this.nk=null;return!0};r.prototype.aV=function(t){return this.bV()?!0:this.cV(t)?!0:!1};r.prototype.bV=function(){var t=this.iX;if(!t)return!1;if(t.Tb.y===0&&t.Tb.x===0)return this.BE=Date.now(),this.au=!1;if(this.au)return!0;var u=Math.sqrt(t.Tb.y*t.Tb.y+t.Tb.x*t.Tb.x),v=Math.atan2(-t.Tb.y,t.Tb.x);t=Math.abs(v)<Math.PI*.25;v=Math.abs(v)>Math.PI*.75;return this.ql!==0&&u>.95&&(t||v)&&Date.now()-
this.BE<100?(this.au=!0,u=this.ql*(v?-1:1),u=-b.setFromQuaternion(p.yg,"YXZ").y*q+u,p.setPosition({x:void 0,y:void 0,z:void 0,yaw:u}),!0):!1};r.prototype.cV=function(t){if(!this.Sq||this.Sq.Tb.y===0&&this.Sq.Tb.x===0)return!1;t=4E3/3600/this.Eg*this.properties.get("translationSpeed",1)*(this.Sq.EA?3:1)*t/1E3;var u=c.set(0,0,-1).applyQuaternion(p.yg),v=d.crossVectors(u,l);u.y=0;v.y=0;u.normalize().multiplyScalar(-this.Sq.Tb.y*t);v.normalize().multiplyScalar(this.Sq.Tb.x*t);this.Hd.set(p.Qc.x+u.x+v.x,
p.Qc.y,p.Qc.z+u.z+v.z);return!0};r.prototype.hY=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.nk?this.properties.set("userInteracting",!0):!this.Sq||this.Sq.Tb.y===0&&this.Sq.Tb.x===0?this.properties.set("userInteracting",!1):this.properties.set("userInteracting",!0)};r.prototype.iab=function(){if(!this.properties.get("collisionDetection"))return!1;var t=c,u=d;t.copy(this.Hd).sub(this.Gt);u.copy(this.Gt).add(t.setLength(t.length()+.2/this.Eg));
if(this.bt.MJ(this.Gt,u))return!0;t=this.properties.get("maxStepHeight");t===void 0&&(t=this.O5()*.25);u=this.Ula(this.Hd);return this.wMa>-Infinity&&u>-Infinity&&this.wMa+t<u?!0:!1};r.prototype.AFa=function(t,u,v){var w=u-t,y=Math.abs(w);v=2/this.Eg*(v/1E3);return v>y?u:t+w*v/y};r.prototype.b6=function(t,u,v){t=this.jl?-Infinity:this.Ula(c.set(t,u,v));return t===-Infinity?u:t+this.O5()};r.prototype.Ula=function(t){var u=this.GV.findIndex(function(w){return w.x==t.x&&w.z==t.z&&!isNaN(w.y)});if(u!==
-1)return this.GV[u].y;u=this.bt.yV(t);var v=this.GV.find(function(w){return isNaN(w.y)});v||this.GV.push(v=new e.Vector3);v.set(t.x,t.y-u,t.z);return v.y};r.prototype.O5=function(){return p.IN/this.Eg};r.CJ=function(t,u){this.IE.set(t,u)};r.Ya=function(t){t.L(g.Fr).manager=new r(t)};r.update=function(t){t.getComponent(g.Fr).manager.update()};r.frame=function(t,u,v){t.getComponent(g.Fr).manager.frame(u,v)};r.Ba=function(t){var u=t.getComponent(g.Fr);u.manager.dispose();u.manager=null;t.ka(g.Fr)};
r.IE=new Map;r.fB="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,n=new e.Vector3,l=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/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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/cameraControls/CollidableObjects"),g=a("tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour"),e=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),b=a("tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour"),c=a("tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour"),d=a("tdv/player/view/webgl/system/cameraControls/OrbitBehaviour"),
f=a("tdv/player/view/webgl/system/cameraControls/TransitionBehaviour"),n=a("tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour"),l=a("tdv/player/view/webgl/system/cameraControls/XRDragBehaviour"),q=a("tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour"),r=a("tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(t,u){(this.Ana.ce.length||this.Ana.Og.length)&&h.Wgb(this.Ana.v);this.XFa.v.length&&
this.XFa.v.slice().forEach(g.Ya);this.U4.Ca.length&&this.U4.Ca.slice().forEach(g.update);this.U4.v.length&&this.U4.v.slice().forEach(function(v){g.frame(v,t,u)});this.YFa.v.length&&this.YFa.v.slice().forEach(g.Ba);this.EHa.v.length&&this.EHa.v.slice().forEach(c.Ya);this.HV.Ca.length&&this.HV.Ca.slice().forEach(c.update);this.HV.v.length&&this.HV.v.slice().forEach(function(v){c.frame(v,t,u)});this.FHa.v.length&&this.FHa.v.slice().forEach(c.Ba);this.wHa.v.length&&this.wHa.v.slice().forEach(b.Ya);this.FV.Ca.length&&
this.FV.Ca.slice().forEach(b.update);this.FV.v.length&&this.FV.v.slice().forEach(function(v){b.frame(v,t,u)});this.xHa.v.length&&this.xHa.v.slice().forEach(b.Ba);this.yHa.v.length&&this.yHa.v.slice().forEach(b.Ba);this.LLa.v.length&&this.LLa.v.slice().forEach(d.Ya);this.PW.Ca.length&&this.PW.Ca.slice().forEach(d.update);this.PW.v.length&&this.PW.v.slice().forEach(function(v){d.frame(v,t,u)});this.MLa.v.length&&this.MLa.v.slice().forEach(d.Ba);this.mQa.v.length&&this.mQa.v.slice().forEach(n.Ya);this.kY.Ca.length&&
this.kY.Ca.slice().forEach(n.update);this.kY.v.length&&this.kY.v.slice().forEach(function(v){n.frame(v,t,u)});this.nQa.v.length&&this.nQa.v.slice().forEach(n.Ba);this.oQa.v.length&&this.oQa.v.slice().forEach(n.Ba);r.CJ(this.T,this.yk.v.slice());this.wQa.v.length&&this.wQa.v.slice().forEach(r.Ya);this.nY.Ca.length&&this.nY.Ca.slice().forEach(r.update);this.nY.v.length&&this.nY.v.slice().forEach(function(v){r.frame(v,t,u)});this.xQa.v.length&&this.xQa.v.slice().forEach(r.Ba);this.yQa.v.length&&this.yQa.v.slice().forEach(r.Ba);
l.CJ(this.T,this.yk.v.slice());this.qQa.v.length&&this.qQa.v.slice().forEach(l.Ya);this.lY.Ca.length&&this.lY.Ca.slice().forEach(l.update);this.lY.v.length&&this.lY.v.slice().forEach(function(v){l.frame(v,t,u)});this.rQa.v.length&&this.rQa.v.slice().forEach(l.Ba);this.sQa.v.length&&this.sQa.v.slice().forEach(l.Ba);q.CJ(this.T,this.yk.v.slice());this.tQa.v.length&&this.tQa.v.slice().forEach(q.Ya);this.mY.Ca.length&&this.mY.Ca.slice().forEach(q.update);this.mY.v.length&&this.mY.v.slice().forEach(function(v){q.frame(v,
t,u)});this.uQa.v.length&&this.uQa.v.slice().forEach(q.Ba);this.vQa.v.length&&this.vQa.v.slice().forEach(q.Ba);this.rPa.v.length&&this.rPa.v.slice().forEach(f.Ya);this.pP.Ca.length&&this.pP.Ca.slice().forEach(f.update);this.pP.ce.length&&this.pP.ce.slice().forEach(f.update);this.pP.v.length&&this.pP.v.slice().forEach(function(v){f.frame(v,t,u)});this.sPa.v.length&&this.sPa.v.slice().forEach(f.Ba);this.tPa.v.length&&this.tPa.v.slice().forEach(f.Ba);if(this.Iz.ce.length||this.Iz.Og.length)e.Qoa(this.Iz.v),
this.FV.v.slice().forEach(b.update),this.HV.v.slice().forEach(c.update),this.PW.v.slice().forEach(d.update),this.kY.v.slice().forEach(n.update),this.lY.v.slice().forEach(l.update),this.mY.v.slice().forEach(q.update),this.nY.v.slice().forEach(r.update)};a.M={};a.M.yk=[p.xc];a.M.Iz=[p.Em];a.M.Ana=[p.mF];a.M.wHa=[p.iF,p.hj.ia,p.eu.ia];a.M.FV=[p.iF,p.hj.ia,p.eu];a.M.xHa=[p.iF.ia,p.eu];a.M.yHa=[p.hj,p.eu];a.M.rPa=[p.jx,p.Kk,p.uu.ia];a.M.pP=[p.jx,p.Kk,p.uu];a.M.sPa=[p.Kk.ia,p.uu];a.M.tPa=[p.jx.ia,p.uu];
a.M.wQa=[p.hj,p.AK,p.Fr.ia];a.M.nY=[p.hj,p.AK,p.Fr];a.M.xQa=[p.AK.ia,p.Fr];a.M.yQa=[p.hj.ia,p.Fr];a.M.mQa=[p.hj,p.yF,p.Cr.ia];a.M.kY=[p.hj,p.yF,p.Cr];a.M.nQa=[p.yF.ia,p.Cr];a.M.oQa=[p.hj.ia,p.Cr];a.M.qQa=[p.hj,p.yK,p.Dr.ia];a.M.lY=[p.hj,p.yK,p.Dr];a.M.rQa=[p.yK.ia,p.Dr];a.M.sQa=[p.hj.ia,p.Dr];a.M.tQa=[p.hj,p.zK,p.Er.ia];a.M.mY=[p.hj,p.zK,p.Er];a.M.uQa=[p.zK.ia,p.Er];a.M.vQa=[p.hj.ia,p.Er];a.M.EHa=[p.jF,p.Vw.ia];a.M.HV=[p.jF,p.Vw];a.M.FHa=[p.jF.ia,p.Vw];a.M.LLa=[p.oF,p.$w.ia];a.M.PW=[p.oF,p.$w];a.M.MLa=
[p.oF.ia,p.$w];a.M.XFa=[p.cK,p.Mw.ia];a.M.U4=[p.cK,p.Mw];a.M.YFa=[p.cK.ia,p.Mw];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,k,p,h,g){a=function(q){function r(){var t=q.call(this)||this;t.Xf=t.Xf.bind(t);return t}P(r,q);r.prototype.cd=function(){this.v.v.length&&this.v.v.slice().forEach(this.Xf)};r.prototype.Xf=function(t){var u=t.getComponent(p.Object3D);if(u&&u.ta&&u.ta.parent){u=u.ta;var v=t.getComponent(p.bK);
if(v.Oa){var w=v.Oa,y=w.getComponent(p.PerspectiveCamera);(w=w.getComponent(p.Object3D))&&w.ta&&(w=w.ta,w.updateMatrixWorld(!0),y.il?(c.copy(g.Qc),n.copy(g.yg)):w.matrixWorld.decompose(c,n,f),v.rotate||n.identity(),e.copy(u.parent.matrixWorld).invert(),b.compose(c,n,f.set(1,1,1)).premultiply(e),b.decompose(c,n,f.set(1,1,1)),d.setFromQuaternion(n,"YXZ"),t=t.N(p.sa),t.translationX=c.x,t.translationY=c.y,t.We=c.z,t.Yd=0,t.Ad=d.y*l,t.Ue=0)}}};r.M={};return r}(h);a.M={};a.M.v=[p.bK,p.Object3D,p.sa];var e=
new k.Matrix4,b=new k.Matrix4,c=new k.Vector3,d=new k.Euler,f=new k.Vector3,n=new k.Quaternion,l=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(h){this.A=h;this.VCa=this.za=null;this.Ga=this.Pa=void 0;this.update()}var k=a("tdv/player/view/webgl/components"),p=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){var h=this.A.getComponent(k.Gf),g=h.source&&h.source.width||0,e=h.source&&h.source.height||0;!this.za||!!this.za.isSpriteMaterial==
h.isSprite&&this.Pa==g&&this.Ga==e||(this.za.map.dispose(),this.za.dispose(),this.za=null);this.Pa=g;this.Ga=e;this.za||(h.isSprite?(this.za=new THREE.SpriteMaterial,this.za.sizeAttenuation=!1):this.za=new THREE.MeshBasicMaterial,this.za.map=new THREE.Texture,this.za.transparent=!0,this.A.L(k.Material).material=this.za);this.za.map.image!=h.source&&(this.za.map.image=h.source,this.za.map.needsUpdate=!0);this.VCa!=h.HJ&&(this.VCa=h.HJ,this.za.map.needsUpdate=!0);this.za.opacity=h.opacity||0;this.za.depthTest=
!!h.depthTest;this.za.visible=this.za.opacity>0&&!h.hidden;this.za.needsUpdate=!0;if(h.colorSpace)var b=h.colorSpace;else(h=p.Mf(this.A))&&(b=p.VV(h));this.za.map&&b&&(this.za.map.colorSpace=b);this.A.T.Xa()};m.prototype.dispose=function(){this.za&&(this.za.map.dispose(),this.za.map=null,this.za.dispose(),this.za=null,this.A.ka(k.Material));this.A=null};m.Ya=function(h){h.L(k.WA).manager=new m(h)};m.Ba=function(h){var g=h.getComponent(k.WA);g.manager.dispose();g.manager=null;h.ka(k.WA)};m.update=
function(h){h.getComponent(k.WA).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/canvasMaterial/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.Hn.v.length&&this.Hn.v.slice().forEach(h.Ya);
this.materials.Ca.length&&this.materials.Ca.slice().forEach(h.update);this.In.v.length&&this.In.v.slice().forEach(h.Ba)};a.M={};a.M.Hn=[p.Gf,p.WA.ia];a.M.materials=[p.Gf,p.WA];a.M.In=[p.Gf.ia,p.WA];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,k,p,h){var g=[new k.Vector3(1,0,0),new k.Vector3(-1,0,0),new k.Vector3(0,1,0),new k.Vector3(0,-1,0)];a=function(e){function b(){var c=e.call(this)||this;c.Eb=c.Eb.bind(c);c.sb=c.sb.bind(c);c.Ea=c.Ea.bind(c);return c}P(b,e);b.prototype.cd=function(){this.dE.v.length&&this.dE.v.slice().forEach(this.Eb);this.planes.v.length&&this.planes.v.slice().forEach(this.sb);
this.SW.v.length&&this.SW.v.slice().forEach(this.Ea)};b.prototype.Eb=function(c){c.L(h.XA).planes=[new k.Plane,new k.Plane,new k.Plane,new k.Plane];c.L(h.Object3D).ta=new k.Object3D;this.sb(c)};b.prototype.sb=function(c){var d=c.L(h.Object3D).ta;c=c.L(h.XA);c.planes[0].set(g[0],.5).applyMatrix4(d.matrixWorld);c.planes[1].set(g[1],.5).applyMatrix4(d.matrixWorld);c.planes[2].set(g[2],.5).applyMatrix4(d.matrixWorld);c.planes[3].set(g[3],.5).applyMatrix4(d.matrixWorld)};b.prototype.Ea=function(c){c.ka(h.XA);
c.ka(h.Object3D)};b.M={};return b}(p);a.M={};a.M.dE=[h.PE,h.XA.ia];a.M.planes=[h.PE,h.XA,h.sa,h.Object3D];a.M.SW=[h.PE.ia,h.XA];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,k,p){a=function(){function d(f){this.light=f;f=new k.EdgesGeometry(new k.PlaneGeometry(2,2));var n=new k.LineBasicMaterial({color:16711680,linewidth:1,depthTest:!1,transparent:!0});this.eh=new k.LineSegments(f,n);f=(new k.BufferGeometry).setFromPoints([new k.Vector3,new k.Vector3]);n=new k.LineBasicMaterial({color:65280,depthTest:!1,transparent:!0});
this.line=new k.Line(f,n);this.light.add(this.eh);this.light.add(this.line)}d.prototype.update=function(){var f=this.Mf();this.eh.parent!=f&&(this.eh.parent&&(this.eh.parent.remove(this.eh),this.line.parent.remove(this.line)),f&&(f.add(this.eh),f.add(this.line)));if(f){this.eh.material.color!=this.light.color&&(this.eh.material.color=this.light.color,this.eh.material.needsUpdate=!0,this.line.material.color=this.light.color,this.line.material.needsUpdate=!0);this.light.updateMatrixWorld(!0);h.setFromMatrixPosition(this.light.matrixWorld);
this.light.target.updateMatrixWorld(!0);g.setFromMatrixPosition(this.light.target.matrixWorld);e.copy(g).sub(h).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=p.BD(f);this.eh.quaternion.copy(b);var n=p.II(this.line)*f*2/7;e.setLength(n).multiplyScalar(-1);n=this.line.geometry.attributes.position;n.setXYZ(0,0,0,0);n.setXYZ(1,e.x,e.y,e.z);n.needsUpdate=!0;this.eh.position.copy(e);this.eh.updateMatrixWorld(!0);f=p.II(this.eh)*
f/7;this.eh.scale.set(f,f,f);this.eh.updateMatrixWorld(!0)}};d.prototype.dispose=function(){this.eh.geometry.dispose();this.eh.material.dispose();this.eh.parent&&this.eh.parent.remove(this.eh);this.line.geometry.dispose();this.line.material.dispose();this.line.parent&&this.line.parent.remove(this.line)};d.prototype.Mf=function(){for(var f=this.light.parent;f&&!f.isScene;)f=f.parent;return f};return d}();var h=new k.Vector3,g=new k.Vector3,e=new k.Vector3,b=new k.Quaternion,c=new k.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,k,p,h,g,e,b){function c(n,l){l.makeEmpty();var q=new k.Box3;n.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);l.union(q)}});return l}a=function(n){function l(){var q=n.call(this)||this;q.Eb=q.Eb.bind(q);q.sb=q.sb.bind(q);q.Xf=q.Xf.bind(q);q.Ea=q.Ea.bind(q);return q}P(l,n);l.prototype.cd=function(){this.KD.v.length&&this.KD.v.slice().forEach(this.Eb);this.LD.v.length&&this.LD.v.slice().forEach(this.Ea);this.si.Ca.length&&this.si.Ca.slice().forEach(this.sb);this.si.v.length&&this.si.v.slice().forEach(this.Xf)};l.prototype.Eb=function(q){var r=
q.L(h.hr),t=q.L(h.Object3D);r.light=t.ta=new k.DirectionalLight;this.sb(q)};l.prototype.sb=function(q){var r=q.getComponent(h.DirectionalLight),t=q.getComponent(h.hr),u=t.light;u.color=p.ar(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.ypa: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.zpa;u.shadow.bias=
r.xpa;r.wV!=!!t.mp&&(t=q.N(h.hr),r.wV?t.mp=new b(u):(t.mp.dispose(),t.mp=null))};l.prototype.Xf=function(q){this.Fjb(q);this.jqa(q)};l.prototype.Fjb=function(q){var r=q.getComponent(h.DirectionalLight);if((q=q.getComponent(h.hr).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,y=Number.NEGATIVE_INFINITY,x=Number.POSITIVE_INFINITY,z=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,D=0;D<2;D++)for(var E=
0;E<2;E++)for(var B=0;B<2;B++)f.set(D==0?v.min.x:v.max.x,E==0?v.min.y:v.max.y,B==0?v.min.z:v.max.z).applyMatrix4(u.matrixWorldInverse),f.x<t&&(t=f.x),f.x>w&&(w=f.x),f.y>y&&(y=f.y),f.y<x&&(x=f.y),-f.z>A&&(A=-f.z),-f.z<z&&(z=-f.z);r=r.Rhb||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=(y+x)*.5;y+=(y-v)*r;x+=(x-v)*r;if(u.left!=t||u.right!=w||u.top!=y||u.bottom!=x||u.near!=z||u.far!=A)q.shadow.camera.left=t,q.shadow.camera.top=y,q.shadow.camera.right=w,q.shadow.camera.bottom=x,
q.shadow.camera.near=z,q.shadow.camera.far=A,q.shadow.camera.updateProjectionMatrix(),q.shadow.needsUpdate=!0}}};l.prototype.jqa=function(q){(q=(q=q.getComponent(h.hr))&&q.mp)&&q.update()};l.prototype.Ea=function(q){var r=q.getComponent(h.hr),t=r&&r.mp;t&&t.dispose();(r=r.light)&&r.parent&&r.parent.remove(r);q.ka(h.hr);q.ka(h.Object3D)};l.M={};return l}(g);a.M={};a.M.KD=[h.DirectionalLight,h.hr.ia];a.M.si=[h.DirectionalLight,h.hr];a.M.LD=[h.DirectionalLight.ia,h.hr];var d=new k.Box3,f=new k.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(y){this.rh=y;this.Je=this.Bo=null;this.OQ=!1;this.update()}var k=a("tdv/constants/EventName"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util"),g=a("tdv/view/constants/Cursor");m.prototype.update=function(){var y=this.rh.getComponent(p.xc);this.LT(y&&
y.enabled?y.tD:null);this.KT(y&&y.enabled?y.g5:null)};m.prototype.frame=function(){this.Vf()};m.prototype.LT=function(y){this.Bo!=y&&(this.Bo&&this.Bo.h(k.mb,this.lg,this,!0),(this.Bo=y)&&this.Bo.bind(k.mb,this.lg,this,!0))};m.prototype.KT=function(y){this.Je!=y&&(this.Je&&this.OQ&&this.Je.pop(g.Ai),(this.Je=y)&&this.OQ&&this.Je.push(g.Ai))};m.prototype.lg=function(){var y=v.get(this.rh.T);y&&y.length!=0&&this.rh.T.Xa()};m.prototype.Vf=function(){var y=v.get(this.rh.T),x=y&&y.length||0;this.lCa(x>
0);if(x!=0&&(x=this.rh.getComponent(p.xc))){var z=h.Rc(this.rh);z?(e.copy(x.origin).applyMatrix4(z.matrixWorld),b.copy(x.origin).add(x.direction).applyMatrix4(z.matrixWorld).sub(e).normalize()):(e.copy(x.origin),b.copy(x.direction).normalize());for(x=0;x<y.length;x++){z=y[x];var A=z.getComponent(p.Pw),D=z.getComponent(p.YA),E=w.get(z);E&&A&&D&&(D.aHa||(D.aHa=(new THREE.Vector3).setFromMatrixPosition(E.matrixWorld)),c.copy(D.aHa),d.copy(A.direction),this.qZa(c,d,e,b,f),D.rla||(D.rla=(new THREE.Vector3).copy(f).sub(c)),
f.sub(D.rla),A.min&&n.copy(f).sub(A.min).dot(A.direction)<0&&f.copy(A.min),f.applyMatrix4(l.copy(E.parent.matrixWorld).invert()),z=z.N(p.sa),q.multiply(l.makeTranslation(z.translationX,z.translationY,z.We).invert()),q.multiply(l.makeRotationFromEuler(r.set(z.Yd*u,z.Ad*u,z.Ue*u,z.ff)).invert()),f.applyMatrix4(l),z.positionX=f.x,z.positionY=f.y,z.positionZ=f.z)}}};m.prototype.lCa=function(y){this.OQ!=y&&(this.OQ=y,this.Je&&(this.OQ?this.Je.push(g.Ai):this.Je.pop(g.Ai)))};m.prototype.qZa=function(y,
x,z,A,D){t.copy(y).sub(z);z=x.dot(A);var E=A.dot(A),B=x.dot(x);A=t.dot(A);var C=t.dot(x);D.copy(y);y=z*z-E*B;y!=0&&D.addScaledVector(x,(E*C-A*z)/y)};var e=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Vector3,f=new THREE.Vector3,n=new THREE.Vector3,l=new THREE.Matrix4,q=new THREE.Matrix4,r=new THREE.Euler,t=new THREE.Vector3,u=Math.PI/180;m.prototype.dispose=function(){this.lCa(!1);this.LT(null);this.KT(null);this.A=null};m.upa=function(y){y.L(p.bx).manager=new m(y)};m.Ppa=
function(y){var x=y.getComponent(p.bx);x.manager.dispose();x.manager=null;y.ka(p.bx)};m.Yt=function(y){y.getComponent(p.bx).manager.update()};m.frame=function(y){y.getComponent(p.bx).manager.frame()};var v=new Map,w=new Map;m.Fhb=function(y){y.L(p.YA);y.L(p.Em);m.NPa(y)};m.NPa=function(y){var x=h.Rc(y);w.set(y,x);var z=v.get(y.T);z||v.set(y.T,z=[]);x&&z.indexOf(y)<0&&z.push(y)};m.XOa=function(y){var x=v.get(y.T),z=x.indexOf(y);z>=0&&x.splice(z,1);w["delete"](y);y.ka(p.YA);y.ka(p.Em)};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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/dragging/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.TW.v.length&&this.TW.v.slice().forEach(h.upa);this.yk.Ca.length&&
this.yk.Ca.slice().forEach(h.Yt);this.yk.v.length&&this.yk.v.slice().forEach(h.frame);this.UW.v.length&&this.UW.v.slice().forEach(h.Ppa);this.$Ga.v.length&&this.$Ga.v.slice().forEach(h.Fhb);this.ZGa.v.length&&this.ZGa.v.slice().forEach(h.NPa);this.bHa.v.length&&this.bHa.v.slice().forEach(h.XOa);this.cHa.v.length&&this.cHa.v.slice().forEach(h.XOa)};a.M={};a.M.TW=[p.xc,p.bx.ia];a.M.yk=[p.xc,p.bx];a.M.UW=[p.xc.ia,p.bx];a.M.$Ga=[p.Object3D,p.Pw,p.YA.ia];a.M.ZGa=[p.Object3D,p.Pw,p.YA];a.M.bHa=[p.Object3D.ia,
p.YA];a.M.cHa=[p.Pw.ia,p.YA];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,k,p,h,g){a=function(c){function d(){var f=c.call(this)||this;f.Eb=f.Eb.bind(f);f.sb=f.sb.bind(f);f.Ea=f.Ea.bind(f);f.Xf=f.Xf.bind(f);return f}P(d,c);d.prototype.cd=function(){this.CHa.v.length&&this.CHa.v.slice().forEach(this.Eb);this.DHa.v.length&&this.DHa.v.slice().forEach(this.Ea);this.z5.Ca.length&&this.z5.Ca.slice().forEach(this.sb);
this.z5.v.length&&this.z5.v.slice().forEach(this.Xf)};d.prototype.Eb=function(f){var n=f.L(h.Tw),l=f.L(h.Object3D);n.floor=l.ta=this.B$a();this.$n(f,!0)};d.prototype.sb=function(f){this.$n(f)};d.prototype.Ea=function(f){var n=f.getComponent(h.Tw).floor;n.parent&&n.parent.remove(n);n.geometry.dispose();n.material.dispose();f.ka(h.Tw);f.ka(h.Object3D)};d.prototype.Xf=function(f){this.rgb(f)};d.prototype.rgb=function(f){var n=f.getComponent(h.pr),l=(f=(f=f.getComponent(h.Tw))&&f.floor)&&f.parent&&f.parent.matrixWorld;
if(l){b.setFromMatrixScale(l);var q=Math.max(Math.abs(b.x),Math.abs(b.y),Math.abs(b.z));f.matrix.identity();f.matrix.multiply(e.makeScale(n.radius/q,n.radius/q,n.radius/q));f.matrix.multiply(e.extractRotation(l).invert());f.matrix.multiply(e.makeTranslation(0,n.height/n.radius,0));f.matrix.multiply(e.makeRotationX(-Math.PI*.5));f.updateMatrixWorld(!0)}};d.prototype.B$a=function(){var f=new k.CircleGeometry(1,128);f=new k.Mesh(f);f.receiveShadow=!0;f.needsUpdate=!0;f.matrixAutoUpdate=!1;f.castShadow=
!1;return f};d.prototype.$n=function(f,n){n===void 0&&(n=!1);var l=f.getComponent(h.pr);f=f.getComponent(h.Tw).floor;var q=l.color=="transparent",r=f.material&&f.material.isShadowMaterial||!1;f.material&&(n||r!=q)&&(f.material.dispose(),f.material=null);q?f.material||(f.material=new k.ShadowMaterial):(f.material||(f.material=new k.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=p.ar(l.color));f.material.needsUpdate=!0;f.material.opacity=l.opacity;f.renderOrder=l.renderOrder};d.M={};return d}(g);a.M={};a.M.CHa=[h.pr,h.Tw.ia];a.M.z5=[h.pr,
h.Tw];a.M.DHa=[h.pr.ia,h.Tw];var e=new k.Matrix4,b=new k.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.A=w;this.Zga=!1}var k=a("tdv/player/view/webgl/components"),p=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){this.Zga=!1};m.prototype.frame=function(){this.Vf()};m.prototype.Vf=function(){if(!this.Zga&&(this.zb=this.zb||p.Mf(this.A))){var w=p.Rc(this.A),y=w&&w.parent;if(y&&y.matrixWorld){var x=
[];this.zb.traverse(function(E){E.isSprite||E.isLine||E==w||x.push(E)});var z=this.A.N(k.Uw);f.set(z.x,z.y,z.z).applyMatrix4(y.matrixWorld);d.ray.origin.set(f.x,f.y,f.z);d.ray.direction.set(0,-1,0);var A=d.intersectObjects(x,!1);if(A.length!=0){var D=A[0];e.copy(y.matrixWorld).invert();A=this.A.N(k.sa,!0);b.setFromMatrixPosition(y.matrixWorld);h.copy(D.object.matrixWorld);c.setFromMatrixPosition(h);g.copy(h).invert();!z.iW&&D.face&&D.face.normal?q.copy(D.face.normal).applyMatrix4(h).sub(c).add(b):
q.copy(b).add(r);q.applyMatrix4(e).normalize();u.setFromUnitVectors(l,q);t.setFromQuaternion(u,A.ff);A.Yd=t.x*v;A.Ad=t.y*v;A.Ue=t.z*v;f.copy(D.point).applyMatrix4(e);A.translationX=f.x;A.translationY=f.y;A.We=f.z;n.setFromMatrixScale(e);y=Math.max(n.x,n.y,n.z);A.positionX=0;A.positionY=0;A.positionZ=y*z.distance;this.Zga=!0}}}};m.prototype.dispose=function(){};var h=new THREE.Matrix4,g=new THREE.Matrix4,e=new THREE.Matrix4,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Raycaster,f=new THREE.Vector3,
n=new THREE.Vector3;new THREE.Matrix4;new THREE.Matrix4;var l=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.Ya=function(w){w.L(k.fu).manager=new m(w)};m.Ba=function(w){var y=w.getComponent(k.fu);y.manager.dispose();y.manager=null;w.ka(k.fu)};m.frame=function(w){w.getComponent(k.fu).manager.frame()};m.update=function(w){w.getComponent(k.fu).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/floorTransform/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.zHa.v.length&&this.zHa.v.slice().forEach(h.Ya);
this.y5.Ca.length&&this.y5.v.slice().forEach(h.update);this.y5.v.length&&this.y5.v.slice().forEach(h.frame);this.AHa.v.length&&this.AHa.v.slice().forEach(h.Ba);this.BHa.v.length&&this.BHa.v.slice().forEach(h.Ba)};a.M={};a.M.zHa=[p.Object3D,p.Uw,p.fu.ia];a.M.y5=[p.Object3D,p.Uw,p.fu];a.M.AHa=[p.Object3D.ia,p.fu];a.M.BHa=[p.Uw.ia,p.fu];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{Ya:function(k){var p=k.L(m.jK),h=k.L(m.Object3D);k.L(m.sa);k=k.N(m.Group);h.ta=p.group=k.group=new THREE.Group},Ba:function(k){k.getComponent(m.jK).group=null;k.ka(m.jK);k.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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/group/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.XIa.v.length&&this.XIa.v.slice().forEach(h.Ya);this.YIa.v.length&&
this.YIa.v.slice().forEach(h.Ba)};a.M={};a.M.XIa=[p.Group,p.jK.ia];a.M.YIa=[p.Group.ia,p.jK];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"),k=a("tdv/player/view/util/Color"),p=a("tdv/player/view/webgl/ecs/System"),h=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(p,function(){p.apply(this,arguments);this.Eb=this.Eb.bind(this);this.sb=this.sb.bind(this);this.Ea=this.Ea.bind(this)});a.prototype.cd=function(){this.UIa.v.length&&this.UIa.v.slice().forEach(this.Eb);this.TIa.Ca.length&&this.TIa.Ca.slice().forEach(this.sb);this.VIa.v.length&&this.VIa.v.slice().forEach(this.Ea)};a.prototype.Eb=function(g){var e=g.getComponent(h.gu);e=new THREE.LineSegments(this.QN(e),this.lm(e));g.L(h.Object3D).ta=g.L(h.cB).grid=e};a.prototype.sb=function(g){var e=g.getComponent(h.gu);
g=g.getComponent(h.cB).grid;g.geometry=this.QN(e);g.material=this.lm(e)};a.prototype.Ea=function(g){var e=g.getComponent(h.cB).grid;e.material.dispose();e.geometry.dispose();g.ka(h.Object3D);g.ka(h.cB)};a.prototype.QN=function(g){k.ar(g.eGa);k.ar(g.SIa);var e=g.size/g.nla,b=g.size/2,c=[];for(let d=0,f=-b;d<=g.nla;d++,f+=e)c.push(-b,0,f,b,0,f),c.push(f,0,-b,f,0,b);g=new THREE.BufferGeometry;g.setAttribute("position",new THREE.Float32BufferAttribute(c,3));g.setAttribute("color",new THREE.Float32BufferAttribute([],
3));return g};a.prototype.lm=function(g){var e=new THREE.LineBasicMaterial;e.depthTest=g.depthTest;e.toneMapped=!1;e.vertexColors=!0;return e};a.M={};a.M.UIa=[h.gu,h.cB.ia];a.M.TIa=[h.gu,h.cB];a.M.VIa=[h.gu.ia,h.cB];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,n,l,q){this.Cma=f;this.src=f.src;this.a8=n;this.oV=l;this.frameCount=q;this.frameWidth=this.Cma.width/this.oV;this.frameHeight=this.Cma.height/this.a8}var k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState");a("tdv/events/Event");var g=a("tdv/events/EventDispatcher"),
e=a("tdv/view/util/Animation");a=k.extend(g,function(f,n,l,q,r,t,u){g.call(this);this.Ur=r;this.di=new m(f,n,l,r);this.DBa=t;this.Soa(q);this.bda=u;this.ea=document.createElement("canvas");this.ea.width=this.di.frameWidth;this.ea.height=this.di.frameHeight;this.Da=this.ea.getContext("2d");this.Da.globalCompositeOperation="copy";this.H=h.aa;this.H2=this.xo=0;this.a_=void 0;this.Ki=b.request(this.di);this.Ki.bind(p.V,this.Pk,this,!0);this.Pk()});a.prototype.Soa=function(f){if(this.Ug!==f){var n=this.oU;
this.Ug=f;this.oU=this.Ug*this.di.frameCount;this.cda=this.oU-this.Ug*.1;n!==void 0&&(this.xo=this.xo/n*this.oU)}};a.prototype.FNa=function(f){this.bda!==f&&(this.bda=f,this.Pk())};a.prototype.Yc=function(f){if(this.H!=f){if(f==h.Xb){if(this.H!=h.PLAYING)return}else f==h.PLAYING?this.H==h.aa&&(this.xo=this.H2=0,this.Pk()):f!=h.aa||this.xo==0&&this.H2!=0||(this.xo=this.cda,this.Pk());this.H=f;e.requestFrame(this.Xp,this);this.o(p.Ye)}};a.prototype.getState=function(){return this.H};a.prototype.Xp=
function(f){this.H==h.PLAYING&&(this.xo=Math.min(this.xo+f,this.Ki.Ki.length*this.Ug),this.xo>=this.oU&&(this.H2++,this.DBa&&this.H2==this.DBa?(this.Yc(h.aa),this.xo=this.cda,this.o(p.Qb)):(this.xo%=this.oU,this.o(p.yr))),this.Pk(),this.H==h.PLAYING&&e.requestFrame(this.Xp,this))};a.prototype.clear=function(){this.Yc(h.aa);this.ea.width=this.ea.height=0;this.ea=null;b.release(this.di);this.di=null};a.prototype.zg=function(){return this.ea};a.prototype.Pk=function(){var f=this.bda&&this.xo>=this.cda?
0:Math.floor(this.xo/this.Ug);this.a_!=f&&f<this.Ki.Ki.length&&(this.a_=f,this.Da.drawImage(this.Ki.get(this.a_),0,0),this.o(p.V,{frameIndex:this.a_}))};m.prototype.isEqual=function(f){return this.src==f.src&&this.a8==f.a8&&(this.oV=f.oV)&&(this.frameWidth=f.frameWidth)&&(this.frameHeight=f.frameHeight)&&(this.frameCount=f.frameCount)};var b={Tk:[],lTa:2E3,request:function(f){f=this.rj(f);f.zk++;this.hDa(f);return f.frames},release:function(f){f=this.rj(f);f.zk--;f.zk==0&&this.L5a(f)},rj:function(f){for(var n=
0;n<this.Tk.length;n++)if(this.Tk[n].Pab.isEqual(f))return this.Tk[n];n={};n.Pab=f;n.frames=new c(f);n.zk=0;this.Tk.push(n);return n},L5a:function(f){this.hDa(f);f.gla=setTimeout(function(){b.cXa(f)},b.lTa)},hDa:function(f){f.gla&&(clearTimeout(f.gla),f.gla=null)},cXa:function(f){this.Tk.splice(this.Tk.indexOf(f),1);f.frames.clear()}},c=k.extend(g,function(f){g.call(this);this.di=f;this.Ki=[];d.add(this)});c.prototype.clear=function(){d.remove(this);this.Ki.forEach(function(f){f.width=0;f.height=
0});this.Ki=null};c.prototype.get=function(f){return this.Ki[f]};c.prototype.Eab=function(){var f=this.Ki.length%this.di.oV,n=Math.floor(this.Ki.length/this.di.oV)%this.di.a8,l=document.createElement("canvas");l.width=this.di.frameWidth;l.height=this.di.frameHeight;var q=l.getContext("2d");q.globalCompositeOperation="copy";q.drawImage(this.di.Cma,f*this.di.frameWidth,n*this.di.frameHeight,this.di.frameWidth,this.di.frameHeight,0,0,this.di.frameWidth,this.di.frameHeight);c.fYa(l);this.Ki.push(l);this.o(p.V)};
c.fYa=function(){var f=document.createElement("canvas");f.width=1;f.height=1;var n=f.getContext("2d");return function(l){n.drawImage(l,0,0,1,1,0,0,1,1)}}();var d={Tk:[],Ria:null,add:function(f){this.Tk.push(f);this.TBa()},remove:function(f){this.Tk=this.Tk.filter(function(n){return n!=f})},TBa:function(){this.Ria||(this.Ria=setTimeout(function(){this.Ria=null;this.VS()}.bind(this),40))},VS:function(){if(this.Tk.length!=0){for(var f=(new Date).getTime()+10;(new Date).getTime()<f;){var n=this.Tk.filter(function(l){return l.Ki.length==
0});n=n.length>0?n[0]:this.Tk[0];n.Eab();if(n.Ki.length==n.di.frameCount&&(this.Tk.splice(this.Tk.indexOf(n),1),this.Tk.length==0))return}this.TBa()}}};return a});
define("tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(h,g){this.Qd=h;this.Gc=g;this.Md=!1;this.Caa();this.Faa();this.hH()}var k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.sha();this.yha();this.Qd.get("autoplay")||this.Qd.set("state",p.aa);this.Qd=null;this.Gc.Yc(p.aa);this.Gc=null};m.prototype.cg=function(h){this.Md!=h&&(this.Md=
h,this.yv())};m.prototype.hH=function(){this.Gc.Yc(this.Qd.get("state"))};m.prototype.vS=function(){this.yv()};m.prototype.xS=function(){this.Gc.Soa(this.Qd.get("frameDuration"))};m.prototype.wS=function(){this.Gc.FNa(this.Qd.get("finalFrame")=="first")};m.prototype.tS=function(){this.Qd.o(k.yr)};m.prototype.sS=function(){this.Qd.o(k.Qb)};m.prototype.uS=function(){this.Qd.set("state",this.Gc.getState())};m.prototype.yv=function(){this.Qd.get("autoplay")&&this.Gc.Yc(this.Md?p.PLAYING:p.aa)};m.prototype.Caa=
function(){this.Qd.bind(k.K("state"),this.hH,this,!0);this.Qd.bind(k.K("autoplay"),this.vS,this,!0);this.Qd.bind(k.K("frameDuration"),this.xS,this,!0);this.Qd.bind(k.K("finalFrame"),this.wS,this,!0)};m.prototype.sha=function(){this.Qd.h(k.K("state"),this.hH,this,!0);this.Qd.h(k.K("autoplay"),this.vS,this,!0);this.Qd.h(k.K("frameDuration"),this.xS,this,!0);this.Qd.h(k.K("finalFrame"),this.wS,this,!0)};m.prototype.Faa=function(){this.Gc.bind(k.yr,this.tS,this,!0);this.Gc.bind(k.Qb,this.sS,this,!0);
this.Gc.bind(k.Ye,this.uS,this,!0)};m.prototype.yha=function(){this.Gc.h(k.yr,this.tS,this,!0);this.Gc.h(k.Qb,this.sS,this,!0);this.Gc.h(k.Ye,this.uS,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.qe=e;this.Id=b;this.La=c;this.Ma=d.bind(this);p.Qa("AnimatedImageResource",this.qe)?(this.Gc=new h(this.Id,this.qe.get("rowCount",1),this.qe.get("colCount",1),this.qe.get("frameDuration"),this.qe.get("frameCount",this.qe.get("rowCount",
1)*this.qe.get("colCount",1)),this.qe.get("repeat"),this.qe.get("finalFrame")=="first"),this.La.image=this.Gc.zg(),this.Gc.bind(k.V,this.rR,this,!0),this.Lp=new g(this.qe,this.Gc)):this.La.image=this.Id;this.La.needsUpdate=!0;this.Ma()}var k=a("tdv/constants/EventName"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/images/ImageAnimation"),g=a("tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController");m.prototype.cg=function(e){this.Lp&&this.Lp.cg(e)};m.prototype.dispose=function(){this.Lp&&
(this.Lp.clear(),this.Lp=null);this.Gc&&(this.Gc.h(k.V,this.rR,this,!0),this.Gc.clear(),this.Gc=null);this.La=this.Id=this.qe=null};m.prototype.rR=function(){this.La.needsUpdate=!0;this.Ma()};return m});define("tdv/player/view/webgl/system/util/texture/Util",["require"],function(){var a={},m=null;a.VHa=function(){if(!m){var k=document.createElement("canvas");k.width=128;k.height=128;k.getContext("2d").clearRect(0,0,k.width,k.height);m=k}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"),k=a("tdv/view/constants/Alignment"),p=a("tdv/view/constants/ScaleMode"),h=180/Math.PI,g=Math.PI/180;return{P5:function(e,b,c,d,f,n,l){b||(b=e*d/c);f||(f=p.ZA);var q={};switch(f){case p.ZA:q.width=e;q.height=b;break;case p.NONE:q.width=c;q.height=d;break;case p.ej:q.width=Math.min(b*c/d,e);q.height=Math.min(e*d/c,b);
break;case p.nr:q.width=Math.max(b*c/d,e);q.height=Math.max(e*d/c,b);break;case p.Ep:q.width=e;q.height=e*d/c;break;case p.Hk:q.width=b*c/d,q.height=b}q.width>e?(q.HA=e/q.width,q.ZX=n==k.$a?0:n==k.Cb?1-q.HA:(1-q.HA)*.5,q.width=e):(q.ZX=0,q.HA=1);q.height>b?(q.KA=b/q.height,q.iY=l==k.Tc?1-q.KA:l==k.Fc?0:(1-q.KA)*.5,q.height=b):(q.iY=0,q.KA=1);return q},hma:function(e,b,c,d,f,n,l,q){b||(b=m.qm(e,c,d));f||(f=p.ZA);n||(n=4096/360);var r={};switch(f){case p.ZA:r.Wd=e;r.Ek=b;break;case p.NONE:r.Wd=2*Math.atan2(c*
.5,n*45)*h;r.Ek=m.qm(r.Wd,c,d);break;case p.ej:r.Wd=Math.min(m.er(b,c,d),e);r.Ek=Math.min(m.qm(e,c,d),b);break;case p.nr:r.Wd=Math.max(m.er(b,c,d),e);r.Ek=Math.max(m.qm(e,c,d),b);break;case p.Ep:r.Wd=e;r.Ek=m.qm(e,c,d);break;case p.Hk:r.Wd=m.er(b,c,d),r.Ek=b}r.Wd>e?(r.HA=Math.tan(e*.5*g)*c/Math.tan(r.Wd*.5*g)/c,r.ZX=l==k.$a?0:l==k.Cb?1-r.HA:(1-r.HA)*.5,r.Wd=e):(r.ZX=0,r.HA=1);r.Ek>b?(r.KA=Math.tan(b*.5*g)*d/Math.tan(r.Ek*.5*g)/d,r.iY=q==k.Tc?1-r.KA:q==k.Fc?0:(1-r.KA)*.5,r.Ek=b):(r.iY=0,r.KA=1);return r}}});
define("tdv/player/view/webgl/system/imageMaterial/Behaviour","require tdv/binding/BindingsHandler tdv/constants/EventName 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(v){this.A=v;this.QC=this.QC.bind(this);
this.Ma=this.Ma.bind(this);this.Ij=this.Ij.bind(this);v=v.getComponent(f.Bi);this.Ih=v.np;this.Ae=v.O;this.qe=this.B=null;this.e0a=v.isSprite;this.Zg=!1;this.zo=this.pb=null;this.Ux=0;this.qia=this.pca=this.$e=this.r_=this.ga=void 0;this.bia(v.aw);this.Fj(v.properties)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/view/image/Item"),b=a("tdv/player/view/image/Repository"),c=a("tdv/player/view/webgl/system/imageMaterial/TextureController"),
d=a("tdv/player/view/webgl/system/util/texture/Util"),f=a("tdv/player/view/webgl/components"),n=a("tdv/view/util/Ease"),l=a("tdv/view/util/EaseDimension"),q=a("tdv/view/util/Scale"),r=["height","scaleMode","width"],t=["levels.url","levels.width","levels.height"],u="depthTest enabled encoding hidden side opacity easeDuration".split(" ");m.prototype.frame=function(v){var w=this.A.getComponent(f.Bi);this.bia(w.aw);this.Fj(w.properties);this.zo&&(this.zo.Lb(v),this.Ux=this.zo.ib("alpha"),this.Dja(),this.zo.Qe()&&
(this.zo=null),this.A.T.Xa());this.u7a();this.Zg&&(this.Zg=!1)};m.prototype.QC=function(){if(this.qe&&this.B){var v=this.qe&&this.qe.get("levels")||[];v=v.filter(function(C){return!!C.get("url")});var w=1,y=1;g.Qa("AnimatedImageResource",this.qe)&&(w=this.qe.get("rowCount"),y=this.qe.get("colCount"));var x=null;if(v.length>0){v.sort(function(C,I){return I.get("width")-C.get("width")});x=this.B.get("width");var z=this.B.get("height"),A=this.B.get("scaleMode","fill"),D=v[0].get("width")/y,E=v[0].get("height")/
w,B=q.P5(x,z,D,E,A);x=v.reduce(function(C,I){return!C||C.get("width")>I.get("width")&&I.get("width")/y>=B.width&&I.get("height")/w>=B.height?I:C})}this.MT(x)}};m.prototype.MT=function(v){this.pb!=v&&(this.pb&&(this.lXa(),this.vca(),this.i_(),this.Tr(),this.Zg=!1),this.pb=v)&&(this.Or(),this.Jx(),this.GQ(),this.Zg=!1,this.Ma())};m.prototype.GQ=function(){this.be||(this.be=new e,this.be.gP([this.pb.get("url")]),this.be.bind(p.ha,this.Ke,this,!0),this.be.bind(p.wc,this.sza,this,!0),this.be.bind(p.$c,
this.oh,this,!0),this.dv=this.A.getComponent(f.Bi).priority,b.Zz(this.be,this.dv))};m.prototype.Tr=function(){this.be&&(this.be.h(p.ha,this.Ke,this,!0),this.be.h(p.wc,this.sza,this,!0),this.be.h(p.$c,this.oh,this,!0),b.Zn(this.be,this.dv),this.be=null)};m.prototype.Ke=function(){this.VWa();this.bja(new h(p.ha))};m.prototype.sza=function(v){this.bja(new h(p.wc,{percent:v.percent}))};m.prototype.oh=function(){this.bja(new h(p.$c))};m.prototype.bja=function(v){this.Ih&&this.Ih.o(v)};m.prototype.Ma=function(){this.Zg||
(this.Zg=!0,this.A.T.Xa())};m.prototype.Or=function(){this.La=new THREE.Texture;this.La.image=d.VHa();this.La.generateMipmaps=!0;this.La.minFilter=THREE.LinearMipMapLinearFilter};m.prototype.i_=function(){this.La&&(this.La.dispose(),this.La=null)};m.prototype.Jx=function(){this.e0a?(this.za=new THREE.SpriteMaterial({map:this.La}),this.za.sizeAttenuation=!0):this.za=new THREE.MeshBasicMaterial({map:this.La});this.za.transparent=!0;this.za.needsUpdate=!0;this.A.L(f.Material).material=this.za;this.wta(0);
this.A.N(f.Yh,!0);this.A.N(f.Material,!0);this.Ij(!0)};m.prototype.Ij=function(v){var w=this.B.get("enabled")&&!this.B.get("hidden")&&!!this.wq,y=this.ga!==w;if(y||v){this.ga=w;w=this.Ux;var x=this.ga?1:0,z=this.B.get("hidden")?0:this.B.get("easeDuration",200);this.zo=w!==x?new n("linear",[new l("alpha",w,x,void 0)],Math.abs(w-x)*z):null;this.Dja()}w=this.B.get("encoding");if(this.r_!==w||v)this.r_=w,this.l8a();w=this.B.get("depthTest");if(this.pca!==w||v)this.pca=w,this.L7a();w=this.B.get("opacity");
if(this.$e!==w||v)this.$e=w,this.Dja();w=this.B.get("side");if(this.qia!==w||v)this.qia=w,this.M7a();y&&this.Ae&&this.Ae.o(this.ga?p.Cd:p.sd)};m.prototype.u7a=function(){if(this.za){var v=this.A.getComponent(f.Bi);v=(v=(v=v&&v.pGa)&&v.getComponent(f.XA))?v.planes:null;this.za.clippingPlanes!==v&&(this.za.clippingPlanes=v,this.za.needsUpdate=!0)}};m.prototype.l8a=function(){if(this.za&&(this.za.map||this.za.emissiveMap)){var v=this.r_=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.za.map&&
(this.za.map.colorSpace=v);this.za.emissiveMap&&(this.za.emissiveMap.colorSpace=v);this.za.needsUpdate=!0}this.A.N(f.Yh,!0);this.Ma()};m.prototype.L7a=function(){this.za&&(this.za.depthTest=this.pca);this.A.N(f.Yh,!0);this.Ma()};m.prototype.Dja=function(){this.za&&this.wta((this.$e||0)*this.Ux);this.wq&&this.wq.cg(this.$e>0);this.Ma()};m.prototype.wta=function(v){this.za.opacity=v;this.za.visible=this.za.opacity>0;this.za.isShaderMaterial&&this.za.uniforms.opacity&&(this.za.uniforms.opacity.value=
v);this.A.N(f.Yh,!0)};m.prototype.M7a=function(){if(this.za)switch(this.qia){case "back":this.za.side=THREE.BackSide;break;case "double":this.za.side=THREE.DoubleSide;break;default:this.za.side=THREE.FrontSide}this.A.N(f.Yh,!0);this.Ma()};m.prototype.vca=function(){this.za&&(this.za.dispose(),this.za=null,this.A.ka(f.Material))};m.prototype.VWa=function(){this.wq=new c(this.qe,b.qg(this.pb.get("url")),this.La,this.Ma);this.Ij(!0)};m.prototype.lXa=function(){this.wq&&(this.wq.dispose(),this.wq=null)};
m.prototype.bia=function(v){this.qe!=v&&(this.qe&&k.ca(this.qe,t,this.QC),(this.qe=v)&&k.ba(this.qe,t,this.QC,!1),this.QC())};m.prototype.Fj=function(v){if(this.B!=v){this.B&&(k.ca(this.B,r,this.QC),k.ca(this.B,u,this.Ij));if(this.B=v)k.ba(this.B,r,this.QC,!1),k.ba(this.B,u,this.Ij,!1);this.QC()}};m.prototype.dispose=function(){this.MT(null);this.bia(null);this.Fj(null);this.A=this.Ih=null};m.Ya=function(v){v.L(f.eB).manager=new m(v)};m.Ba=function(v){var w=v.getComponent(f.eB);w.manager.dispose();
w.manager=null;v.ka(f.eB)};m.frame=function(v,w){v.getComponent(f.eB).manager.frame(w)};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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/imageMaterial/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(g,e){this.In.v.length&&this.In.v.slice().forEach(h.Ba);
this.Hn.v.length&&this.Hn.v.slice().forEach(h.Ya);this.materials.v.length&&this.materials.v.slice().forEach(function(b){h.frame(b,g,e)})};a.M={};a.M.Hn=[p.Bi,p.eB.ia];a.M.materials=[p.Bi,p.eB];a.M.In=[p.Bi.ia,p.eB];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(h){this.A=h;this.za=null;this.update()}var k=a("tdv/player/view/util/Color"),p=a("tdv/player/view/webgl/components");m.prototype.update=function(){this.za||(this.za=new THREE.LineBasicMaterial,this.A.L(p.Material).material=this.za);var h=this.A.getComponent(p.Xh);this.za.color=k.ar(h.color||"#ffffff");this.za.lineWidth=h.width||1;this.za.opacity=
h.opacity||0;this.za.transparent=h.transparent;this.za.depthTest=!!h.depthTest;this.za.visible=this.za.opacity>0;this.za.needsUpdate=!0};m.prototype.dispose=function(){this.za&&(this.za.dispose(),this.za=null,this.A.ka(p.Material));this.A=null};m.Ya=function(h){h.L(p.gB).manager=new m(h)};m.Ba=function(h){var g=h.getComponent(p.gB);g.manager.dispose();g.manager=null;h.ka(p.gB)};m.update=function(h){h.getComponent(p.gB).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/lineMaterial/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.Hn.v.length&&this.Hn.v.slice().forEach(h.Ya);
this.materials.Ca.length&&this.materials.Ca.slice().forEach(h.update);this.In.v.length&&this.In.v.slice().forEach(h.Ba)};a.M={};a.M.Hn=[p.Xh,p.gB.ia];a.M.materials=[p.Xh,p.gB];a.M.In=[p.Xh.ia,p.gB];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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components");a("tdv/player/view/webgl/system/util/entity/Util");var h=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(k,function(){k.apply(this,
arguments);this.Eb=this.Eb.bind(this);this.sb=this.sb.bind(this);this.Ea=this.Ea.bind(this)});a.prototype.cd=function(){this.jKa.v.length&&this.jKa.v.slice().forEach(this.Eb);this.lines.Ca.length&&this.lines.Ca.slice().forEach(this.sb);this.kKa.v.length&&this.kKa.v.slice().forEach(this.Ea);this.lKa.v.length&&this.lKa.v.slice().forEach(this.Ea);this.mKa.v.length&&this.mKa.v.slice().forEach(this.Ea)};a.prototype.Eb=function(g){g.L(p.Object3D).ta=new THREE.LineSegments;g.L(p.hB);g.L(p.sa);if(!g.getComponent(p.Geometry)){var e=
(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,1)]);e.userData.GJa=!0;g.L(p.Geometry).geometry=e}this.sb(g)};a.prototype.sb=function(g){var e=g.getComponent(p.Object3D).ta;h.iD(e,g.getComponent(p.Material).material);var b=g.getComponent(p.Geometry).geometry;e.geometry!=b&&(e.geometry&&b.userData.GJa&&e.geometry.dispose(),e.geometry=b,e.needsUpdate=!0);g=g.getComponent(p.Line).renderOrder||0;e.renderOrder!=g&&(e.renderOrder=g,e.needsUpdate=!0)};a.prototype.Ea=
function(g){g.ka(p.hB);g.ka(p.Geometry);var e=g.getComponent(p.Object3D);e&&(e=e.ta,e.geometry&&e.geometry.userData.GJa&&e.geometry.dispose(),e.geometry=null,h.iD(e,null),g.ka(p.Object3D))};a.M={};a.M.jKa=[p.Line,p.Material,p.hB.ia];a.M.lines=[p.Line,p.Geometry,p.Material,p.hB];a.M.kKa=[p.Line.ia,p.hB];a.M.lKa=[p.Material.ia,p.hB];a.M.mKa=[p.Geometry.ia,p.hB];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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(k,function(){k.apply(this,arguments);this.Eb=this.Eb.bind(this);this.Ea=this.Ea.bind(this);this.Xf=this.Xf.bind(this)});a.prototype.cd=
function(){this.fKa.v.length&&this.fKa.v.slice().forEach(this.Eb);this.eKa.v.length&&this.eKa.v.slice().forEach(this.Xf);this.gKa.v.length&&this.gKa.v.slice().forEach(this.Ea);this.hKa.v.length&&this.hKa.v.slice().forEach(this.Ea);this.iKa.v.length&&this.iKa.v.slice().forEach(this.Ea)};a.prototype.Eb=function(n){n.L(p.iB)};a.prototype.Ea=function(n){n.ka(p.iB)};var g=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.Xf=
function(n){var l=n.getComponent(p.sa);if(l){var q=h.Rc(n);if(q&&q.parent){var r=n.getComponent(p.iu),t=r.F;if(t){r=h.Rc(t);if(!r||!r.parent)return;b.setFromMatrixPosition(r.matrixWorld)}else if(r.position)b.copy(r.position);else return;g.copy(q.parent.matrixWorld).invert();b.applyMatrix4(g);b.x-=l.translationX;b.y-=l.translationY;b.z-=l.We;q=b.length();e.setFromUnitVectors(c,b.normalize());d.setFromQuaternion(e,l.ff);d.x*=f;d.y*=f;d.z*=f;if(l.scale!=q||l.Yd!=d.x||l.Ad!=d.y||l.Ue!=d.z)l=n.N(p.sa),
l.scale=q,l.Yd=d.x,l.Ad=d.y,l.Ue=d.z,h.CX(n,l),n.T.Xa()}}};a.M={};a.M.fKa=[p.Object3D,p.iu,p.iB.ia];a.M.eKa=[p.Object3D,p.iu,p.iB,p.sa];a.M.gKa=[p.Object3D.ia,p.iB];a.M.hKa=[p.iu.ia,p.iB];a.M.iKa=[p.sa.ia,p.iB];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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/util/XR"),h=a("tdv/player/view/webgl/ecs/System"),g=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(h,function(){h.apply(this,arguments);this.Eb=this.Eb.bind(this);this.Ea=this.Ea.bind(this);this.sb=this.sb.bind(this)});a.prototype.cd=function(){this.WKa.v.length&&this.WKa.v.slice().forEach(this.Eb);this.Bna.Ca.length&&this.Bna.Ca.slice().forEach(this.sb);this.XKa.v.length&&this.XKa.v.slice().forEach(this.Ea);this.YKa.v.length&&this.YKa.v.slice().forEach(this.Ea)};a.prototype.Eb=function(c){c.L(g.jB);this.Bna.v.forEach(function(d){this.N_a(d,
c)&&this.v2(e.Rc(d))}.bind(this));this.sb(c)};a.prototype.sb=function(c){var d=c.getComponent(g.Yh);if(c=e.Rc(c))this.xUa(c,d),this.v2(c),this.we(c,d)};a.prototype.Ea=function(c){c.ka(g.jB);var d=e.Rc(c);d&&(this.NVa(d),this.v2(d),c.ka(g.jB))};a.prototype.xUa=function(c,d){c.userData.KLa=d.opacity;c.userData.ZU=d.ZU;c.userData.castShadow=d.castShadow;c.userData.receiveShadow=d.receiveShadow;c.userData.gV=d.gV};a.prototype.NVa=function(c){c.userData.KLa=void 0;c.userData.ZU=void 0;c.userData.castShadow=
void 0;c.userData.receiveShadow=void 0;c.userData.gV=void 0};a.prototype.v2=function(c){if(p.mk!=c&&!c.dw){var d=this.Xva(c),f=this.BYa(c),n=this.DYa(c),l=this.EYa(c),q=this.CYa(c);if(c.material){if(d===void 0&&q!==!0)b.gX(c);else{var r=c.userData.yt||c.material,t=b.y6(r),u=b.y6(c.material),v=r.opacity;r=r.transparent;q!==!0&&u&&!t?b.gX(c):q!==!0||u||b.EGa(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.Ala(c),c.material.opacity=
t,c.material.transparent=r,c.material.visible=u,c.material.needsUpdate=!0);b.ajb(c)}var w=this.sYa(f);(c.material.map==null?[]:Array.isArray(c.material.map)?c.material.map:[c.material.map]).forEach(function(y){y.anisotropy!==w&&(y.anisotropy=w,y.needsUpdate=!0)})}c.isMesh&&(n!==void 0&&c.castShadow!==n&&(c.castShadow=n),l!==void 0&&c.receiveShadow!==l&&(c.receiveShadow=l));c.children&&c.children.forEach(function(y){y.userData.bdb=d;y.userData.Zcb=f;y.userData.adb=n;y.userData.cdb=l;y.userData.$cb=
q;this.v2(y)}.bind(this))}};a.prototype.sYa=function(c){return 1+Math.round((c||0)*(e.YHa().capabilities.getMaxAnisotropy()-1))};a.prototype.Xva=function(c){var d=c.userData.KLa;c=c.userData.bdb;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.BYa=function(c){var d=c.userData.ZU;if(d!==void 0)return d;c=c.userData.Zcb;if(c!==void 0)return c};a.prototype.DYa=function(c){var d=c.userData.castShadow;if(d!==void 0)return d;c=c.userData.adb;if(c!==void 0)return c};
a.prototype.EYa=function(c){var d=c.userData.receiveShadow;if(d!==void 0)return d;c=c.userData.cdb;if(c!==void 0)return c};a.prototype.CYa=function(c){var d=c.userData.gV;if(d!==void 0)return d;c=c.userData.$cb;if(c!==void 0)return c};a.prototype.we=function(c,d){var f=this.Xva(c);f!==void 0&&(f=f>0,c.userData.Zjb!==f&&(c.userData.Zjb=f,d.O&&d.O.o(f?k.Cd:k.sd)))};a.prototype.N_a=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.M={};a.M.WKa=
[g.Yh,g.Object3D,g.jB.ia];a.M.Bna=[g.Yh,g.Object3D,g.jB];a.M.XKa=[g.Yh.ia,g.jB];a.M.YKa=[g.Object3D.ia,g.jB];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(h){this.A=h;this.bka=this.Rm=this.De=null;this.nN=-1}var k=a("tdv/player/view/webgl/components"),p=a("tdv/player/view/webgl/system/util/material/Util");m.prototype.frame=function(){if(!this.Rm&&(this.Rm=this.A.getComponent(k.Ci).oma)){var h=this.Rm.userData&&this.Rm.userData.gltfExtensions&&this.Rm.userData.gltfExtensions.KHR_materials_variants;
this.bka=h&&h.variants||[];this.update()}};m.prototype.update=function(){if(this.bka){var h=this.A.getComponent(k.Xw).name,g=this.bka.findIndex(function(b){return b.name==h}),e=this.Rm.scene;this.De!=e?(this.De&&this.IBa(this.De),this.De=e,this.nN=g,this.De&&this.KCa(this.De,this.nN)):this.nN!=g&&(this.nN=g,this.De&&this.KCa(this.De,this.nN));this.A.T.Xa()}};m.prototype.IBa=function(h){this.Ata(h,-1)};m.prototype.KCa=function(h,g){this.w0a(h,g,function(){this.De==h&&this.nN==g&&this.Ata(h,g)}.bind(this))};
m.prototype.w0a=function(h,g,e){var b=[];h.traverse(function(c){var d=c.isMesh&&c.userData.gltfExtensions&&c.userData.gltfExtensions.KHR_materials_variants;if(d=d&&d.mappings){c.userData.Oeb||(c.userData.Oeb=p.Ibb(c));c.userData.GE||(c.userData.GE={});for(var f=null,n=d.length-1;n>=0&&!f;--n)d[n].variants.indexOf(g)!=-1&&(f=d[n]);f&&b.push(this.Rm.parser.getDependency("material",f.material).then(function(l){c.userData.GE[g]||(c.userData.GE[g]=l)}))}}.bind(this));Promise.all(b).then(function(){e(h,
g)})};m.prototype.Ata=function(h,g){h.traverse(function(e){if(e.userData.GE){var b=e.userData.GE[g];b&&(p.iD(e,b),this.Rm.parser.assignFinalMaterial(e),this.A.N(k.Yh,!0))}}.bind(this));this.A.T.Xa()};m.prototype.dispose=function(){this.De&&(this.IBa(this.De),this.A.N(k.Yh,!0),this.De=null)};m.Ya=function(h){h.L(k.ur).manager=new m(h)};m.Ba=function(h){var g=h.getComponent(k.ur);g.manager.dispose();g.manager=null;h.ka(k.ur)};m.update=function(h){h.getComponent(k.ur).manager.update()};m.frame=function(h){h.getComponent(k.ur).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/materialVariant/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.qKa.v.length&&this.qKa.v.slice().forEach(h.Ya);this.Q6.v.length&&
this.Q6.v.slice().forEach(h.frame);this.Q6.Ca.length&&this.Q6.Ca.slice().forEach(h.update);this.rKa.v.length&&this.rKa.v.slice().forEach(h.Ba);this.sKa.v.length&&this.sKa.v.slice().forEach(h.Ba);this.tKa.v.length&&this.tKa.v.slice().forEach(h.Ba)};a.M={};a.M.qKa=[p.Xw,p.Ci,p.Object3D,p.ur.ia];a.M.Q6=[p.Xw,p.Ci,p.Object3D,p.ur];a.M.rKa=[p.Xw.ia,p.ur];a.M.sKa=[p.Object3D.ia,p.ur];a.M.tKa=[p.Ci.ia,p.ur];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{Ya:function(k){var p=k.L(m.ku);k.L(m.sa);var h=k.N(m.Mesh);k.L(m.Object3D).ta=p.Se=h.Se=new THREE.Mesh(k.getComponent(m.Geometry).geometry,k.getComponent(m.Material).material);h.Se.renderOrder=h.renderOrder},update:function(k){var p=k.N(m.ku);p.Se.geometry=k.getComponent(m.Geometry).geometry;p.Se.material=k.getComponent(m.Material).material;
p.Se.renderOrder=k.getComponent(m.Mesh).renderOrder},Ba:function(k){k.getComponent(m.ku).Se=null;k.ka(m.ku);k.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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/mesh/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.wKa.v.length&&this.wKa.v.slice().forEach(h.Ya);this.vKa.Ca.length&&
this.vKa.Ca.slice().forEach(h.update);this.U6.v.length&&this.U6.v.slice().forEach(h.Ba);this.Udb.v.length&&this.U6.v.slice().forEach(h.Ba);this.Vdb.v.length&&this.U6.v.slice().forEach(h.Ba)};a.M={};a.M.wKa=[p.Mesh,p.Geometry,p.Material,p.ku.ia];a.M.vKa=[p.Mesh,p.Geometry,p.Material,p.ku];a.M.U6=[p.Mesh.ia,p.ku];a.M.Udb=[p.Geometry.ia,p.ku];a.M.Vdb=[p.Material.ia,p.ku];return a});
define("tdv/player/view/util/FileLoader",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/util/LoadQueue"],function(a,m,k,p,h){return function(g){function e(b,c){var d=g.call(this)||this;d.jq=null;d.Mta=null;d.EB=!1;d.NL=null;d.le=b;d.dv=c;d.MC=new Request(b);d.aU=d.aU.bind(d);d.uQ=d.uQ.bind(d);return d}P(e,g);e.prototype.start=function(){this.NL||(this.EB=!1,this.NL=h.add(this.le,this.dv,this.aU,this.uQ))};e.prototype.aU=function(){this.le.indexOf("filesystem:")===
0?this.SXa():this.TXa()};e.prototype.SXa=function(){var b=this,c=new XMLHttpRequest;c.open("GET",this.le,!0);c.responseType="arraybuffer";c.onload=function(){b.vza(c.response);c.onload=c.onerror=null};c.onerror=function(){b.rza();c.onload=c.onerror=null};c.send()};e.prototype.TXa=function(){var b=this;fetch(this.MC).then(function(c){function d(t){t===void 0&&(t=null);if(t=t||r)t.close(),r=null,b.jq=null}function f(t){var u;return(u=b.jq.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&&(l&&q<l?t.error("connection closed prematurely"):(l=q,d(t)));l!==void 0&&b.o(k.wc,{totalBytes:l,bytesLoaded:q,percent:q<l?100*q/l:100})}))===null||u===void 0?void 0:u.catch(function(v){console.log("Error reading response",v);t.error(v)})}if(b.EB)return c.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");if(!c.ok)return Promise.resolve(c);var n=c.headers.get("content-length")||c.headers.get("x-content-length"),l,q=0;n!==
null&&(l=parseInt(n,10));b.jq=c.body.getReader();var r=null;return new Response(new ReadableStream({start:function(t){b.EB?t.close():r=t},pull:function(t){return f(t)},cancel:function(){return d()}}))}).then(function(c){return c.arrayBuffer()}).then(function(c){b.vza(c)}).catch(function(){b.rza()})};e.prototype.cancel=function(){this.NL&&(this.NL.cancel(),this.NL=null)};e.prototype.uQ=function(){this.EB=!0;this.jq&&(this.jq.cancel(),this.jq=null)};e.prototype.vza=function(b){var c;this.Mta=b;(c=this.NL)===
null||c===void 0||c.loaded();this.o(k.ha,{buffer:b})};e.prototype.rza=function(){this.cancel();this.o(k.$c)};e.prototype.getData=function(){return this.Mta};return e}(p)});
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,k,p,h,g,e,b,c,d,f,n,l,q){return function(r){function t(u){var v=
r.call(this)||this;v.type=t.TYPE;v.jJ=[];v.aE=[];v.oKa=0;v.F=u;v.Ona=v.Ona.bind(v);v.Pna=v.Pna.bind(v);v.kO=e.lOa(new k.GLTFLoader);return v}P(t,r);t.prototype.Vla=function(){return this.Rm?this.Rm.scene:null};t.prototype.start=function(u){this.url=u;this.kOa();this.ht.start()};t.prototype.update=function(){if(this.jJ.length!=0||this.aE.length!=0)if(c.Gdb())this.F.T.Xa();else{for(var u=Date.now()+8,v=this.F.getComponent(q.Ci).lb.Sc().Dn();this.aE.length>0&&Date.now()<u;){var w=this.aE.shift();v&&
v.initTexture(w)}for(;this.jJ.length>0&&Date.now()<u;)b.vMa(this.jJ.shift());this.jJ.length==0&&this.aE.length==0?this.APa():this.F.T.Xa()}};t.prototype.dispose=function(){this.YOa()};t.prototype.kOa=function(){this.ht=new f(this.url,h.kF);this.W8a()};t.prototype.YOa=function(){this.ht&&(this.tfb(),this.ht.cancel())};t.prototype.W8a=function(){this.ht.bind(p.ha,this.fA,this,!0);this.ht.bind(p.wc,this.LO,this,!0);this.ht.bind(p.$c,this.KO,this,!0)};t.prototype.tfb=function(){this.ht.h(p.ha,this.fA,
this);this.ht.h(p.wc,this.LO,this);this.ht.h(p.$c,this.KO,this)};t.prototype.fA=function(){this.kO.parse(this.ht.getData(),l.getDirectory(this.url),this.Ona,this.Pna)};t.prototype.LO=function(u){this.o(p.wc,u.data)};t.prototype.KO=function(){this.oKa<2?(this.oKa++,this.YOa(),this.kOa(),this.ht.start()):this.o(p.$c)};t.prototype.Pna=function(u){n.Nw&&u&&u.message&&console.error(u.message);this.o(p.$c)};t.prototype.Ona=function(u){this.kO&&(this.jJ=[],this.aE=[],u.scene.traverse(function(v){if(v.isMesh){var w=
v.material;w&&(d.tMa==1&&w.isMeshPhysicalMaterial&&(v.material=w=(new k.MeshStandardMaterial).copy(w)),w.depthWrite=!w.transparent,w=this.Fbb(w),this.aE=this.aE.concat(w))}this.jJ.push(v)}.bind(this)),this.Rm=u,this.jJ.length==0&&this.aE.length==0?this.APa():this.F.T.Xa())};t.prototype.APa=function(){this.o(p.INIT);this.o(p.ha)};t.prototype.Fbb=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}(g)});
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,k,p,h,g){return function(e){function b(c){var d=e.call(this)||this;d.type=b.TYPE;d.sk=null;d.DD=null;d.url="";d.rD=null;d.Bn=null;d.mI=null;d.IJ=null;d.properties=c;d.fA=d.fA.bind(d);d.LO=d.LO.bind(d);d.KO=d.KO.bind(d);d.NW=d.NW.bind(d);return d}P(b,e);b.prototype.Vla=function(){return this.sk};
b.prototype.start=function(c){this.url=c;g.GS.aj()?this.MOa():g.GS.load(this.oeb,this)};b.prototype.update=function(){(!this.DD||this.Bn&&this.Bn.state==TDV.GS.StateFx.PLAYING)&&this.o(k.V)};b.prototype.dispose=function(){this.mI&&(this.properties.h(k.K("antialiasingLevel"),this.Dna,this),this.mI.dispose(),this.mI=null);this.IJ&&(this.properties.h(k.K("sphericalHarmonicsMaxDegree"),this.Sna,this),this.IJ.dispose(),this.IJ=null);this.properties.h(k.K("displayEffect"),this.Gna,this);this.DD&&(this.sk.remove(this.DD),
this.DD=null);this.sk&&(this.sk.removeEventListener("refresh",this.NW),this.sk.dispose(),this.sk=null);this.url=""};b.prototype.oeb=function(){this.url&&this.MOa()};b.prototype.MOa=function(){this.sk=new TDV.GS.GaussianSplattingGroup;this.sk.addEventListener("refresh",this.NW);this.sk.renderOrder=p.sRa;this.sk.dw=!0;this.mI=new TDV.GS.AntialiasingFx;this.IJ=new TDV.GS.SphericalHarmonicsFx;this.sk.fx=(this.sk.fx||[]).concat([this.mI,this.IJ]);this.properties.bind(k.K("antialiasingLevel"),this.Dna,
this,!1);this.properties.bind(k.K("sphericalHarmonicsMaxDegree"),this.Sna,this,!1);this.properties.bind(k.K("displayEffect"),this.Gna,this,!1);this.Dna();this.Sna();this.Gna();(new TDV.GS.GaussianCloudLoader).load(this.url,this.fA,this.LO,this.KO)};b.prototype.fA=function(c){this.sk&&(this.DD=c,this.sk.add(c),this.o(k.INIT),this.o(k.ha))};b.prototype.LO=function(c){var d=c.total;c=c.loaded;this.o(k.wc,{totalBytes:d,bytesLoaded:c,percent:c<d?100*c/d:100})};b.prototype.KO=function(){this.o(k.$c)};b.prototype.Gna=
function(){var c=this.properties.get("displayEffect");if(this.rD!=c&&this.sk){var d=this.sk.fx;this.Bn&&(d=d.filter(function(f){return f!=this.Bn}.bind(this)),this.Bn.dispose(),this.Bn=null);if(this.rD=c)this.Bn=new TDV.GS.RadialFadeInAnimationFx,this.Bn.sparseFadeFactor=this.rD.get("sparseFadeFactor"),this.Bn.denseFadeFactor=this.rD.get("denseFadeFactor"),this.Bn.denseTimeDelay=this.rD.get("denseTimeDelay"),this.Bn.speedFactor=this.rD.get("speedFactor"),this.Bn.minimumPointSize=this.rD.get("minimumPointSize"),
d=d.concat([this.Bn]),this.Bn.play(),this.NW();this.sk.fx=d}};b.prototype.NW=function(){this.o(k.V)};b.prototype.Dna=function(){this.mI&&(this.mI.value=this.properties.get("antialiasingLevel"),this.o(k.V))};b.prototype.Sna=function(){this.IJ&&(this.IJ.maxDegree=this.properties.get("sphericalHarmonicsMaxDegree"),this.o(k.V))};b.TYPE="gs";return b}(h)});
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,k,p,h,g,e,b){a=function(q){function r(){var t=q.call(this)||this;t.type=r.TYPE;t.He=null;t.kO=null;t.camera=null;t.Fq=null;t.width=void 0;t.height=void 0;t.aj=!1;t.H4=null;t.session=null;t.config=null;return t}P(r,q);
r.prototype.Vla=function(){return this.He?this.He.group:null};r.prototype.fgb=function(t){this.config=t};r.prototype.start=function(t){this.H4=this.Uab(t);this.He=new k.TDTiles.TilesRenderer(t);this.kO=g.lOa(new k.GLTFLoader(this.He.manager));this.He.manager.addHandler(/\.gltf$/,this.kO);this.config&&(this.He.maxDepth=this.config.maxDepth,this.He.loadSiblings=this.config.loadSiblings,this.He.parseQueue.maxJobs=this.config.Yna,this.He.downloadQueue.maxJobs=this.config.ola,this.He.lruCache.minSize=
this.config.fna,this.He.lruCache.maxSize=this.config.ena,this.He.errorTarget=this.config.errorTarget,this.He.errorThreshold=this.config.errorThreshold);b.Lma(t)&&(this.He.fetchOptions.mode="cors");this.He.onLoadModel=this.onLoadModel.bind(this);this.He.onDisposeModel=this.onDisposeModel.bind(this);this.He.onLoadTileSet=this.onLoadTileSet.bind(this);this.He.onTileVisibilityChange=this.onTileVisibilityChange.bind(this);this.He.preprocessURL=this.yeb.bind(this);this.o(p.INIT)};r.prototype.dispose=function(){this.He&&
(this.kO=null,this.He.dispose(),this.He=null,this.Fq&&this.Fq.removeFromParent(),this.session=this.H4=null)};r.prototype.setCamera=function(t){this.camera!==t&&(this.camera=t,this.HPa(),this.updateCamera())};r.prototype.setSize=function(t,u){if(this.width!==t||this.height!==u)this.width=t,this.height=u,this.zjb()};r.prototype.update=function(){this.camera&&this.width&&this.height&&(this.HPa(),this.He.update())};r.prototype.Uab=function(t){return(new window.URL(t)).searchParams.get("key")||null};r.prototype.Vbb=
function(t){return(new window.URL(t)).searchParams.get("session")||null};r.prototype.updateCamera=function(){this.He&&this.camera&&(this.He.setCamera(this.camera),this.He.setCamera(this.Fq))};r.prototype.HPa=function(){this.camera&&(this.Fq||(this.Fq=new k.OrthographicCamera(-1,1,-1,1),this.Fq.matrixAutoUpdate=!1),this.Fq.parent!==this.camera&&this.camera.add(this.Fq),this.camera.updateMatrixWorld(!0),l.setFromMatrixPosition(this.camera.matrixWorld),n.copy(l).y-=this.camera.far,n.applyMatrix4(c.copy(this.camera.matrixWorld).invert()),
f.random().cross(n).normalize(),this.Fq.matrix.lookAt(d,n,f),this.Fq.near=this.camera.near,this.Fq.far=this.camera.far)};r.prototype.zjb=function(){this.He&&this.camera&&this.width&&this.height&&(this.He.setResolution(this.camera,this.width,this.height),this.He.setResolution(this.Fq,1,1))};r.prototype.yeb=function(t){t=new window.URL(t);/^http/.test(t.protocol)&&(this.H4&&t.searchParams.append("key",this.H4),this.session&&t.searchParams.append("session",this.session));return t.toString()};r.prototype.onLoadModel=
function(){this.aj||(this.aj=!0,this.o(p.ha));this.o(p.V)};r.prototype.onDisposeModel=function(t){t.traverse(function(u){u instanceof k.Mesh&&e.gX(u)})};r.prototype.onTileVisibilityChange=function(t,u,v){v&&this.o(p.V)};r.prototype.onLoadTileSet=function(){this.session==null&&this.He.traverse(function(t){return t.content&&t.content.uri?(this.session=this.Vbb(t.content.uri),!0):!1}.bind(this));this.o(p.V)};r.TYPE="tiles";return r}(h);var c=new k.Matrix4,d=new k.Vector3,f=new k.Vector3,n=new k.Vector3,
l=new k.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.ola=6;this.Yna=3;this.fna=600;this.ena=800}a.C$a=function(m){var k=new a;k.errorTarget=m.get("errorTarget",k.errorTarget);k.errorThreshold=m.get("errorThreshold",k.errorThreshold);k.maxDepth=m.get("maxDepth",k.maxDepth);k.loadSiblings=m.get("loadSiblings",k.loadSiblings);k.ola=m.get("downloadMaxJobs",
k.ola);k.Yna=m.get("parseMaxJobs",k.Yna);k.fna=m.get("lruCacheMinSize",k.fna);k.ena=m.get("lruCacheMaxSize",k.ena);return k};return a}()});
define("tdv/player/view/webgl/system/model/GeometryQuery",["require","tdv/player/view/webgl/system/util/RaycastUtil"],function(a){function m(b){this.ma=b}var k=a("tdv/player/view/webgl/system/util/RaycastUtil"),p=new THREE.Raycaster,h=new THREE.Vector3,g=new THREE.Vector3(0,-1,0),e=new THREE.Vector3(0,1,0);m.prototype.MJ=function(b,c){p.ray.origin.copy(b);h.copy(c).sub(b);var d=h.length();h.normalize();p.ray.direction.copy(h);b=this.AG();return k.intersect(p,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.kbb=function(b){p.ray.origin.copy(b);p.ray.direction.copy(g);b=this.AG();var c=k.intersect(p,b);if(c.length>0)return c[0].distance;p.ray.direction.copy(e);c=k.intersect(p,b);if(c.length>0)return-c[0].distance};m.prototype.AG=function(){var b=[];this.ma.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.DD=m}a.prototype.getMetadata=function(){return this.DD.metadata};return a}()});
define("tdv/player/view/webgl/system/model/ObjectQuery",["require","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(p,h){this.xb=p;this.a_a=h}var k=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.oIa=function(p){return(p=this.Rc(p))&&p.matrixWorld};m.prototype.Rc=function(p){return p?k.wD(this.a_a,p):k.Rc(this.xb)};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.xb=c;this.P0a=d;this.rYa=f}var k=a("tdv/player/view/webgl/system/util/entity/Util"),p=new THREE.Vector3,h=new THREE.Vector3,g=new THREE.Vector3,e=new THREE.Frustum,b=new THREE.Matrix4;m.prototype.mma=function(c,d){d=this.P0a.oIa(d);if(!d)return null;h.copy(c).applyMatrix4(d);var f=(c=k.Rc(this.xb))&&k.SV(c);c=f&&k.Zv(f);if(!c)return null;b.identity().multiplyMatrices(c.projectionMatrix,
c.matrixWorldInverse);e.setFromProjectionMatrix(b);if(!e.containsPoint(h))return null;d=(f&&k.WV(f))/2;f=(f&&k.BD(f))/2;p.copy(h).project(c);d=p.x*d+d;f=-(p.y*f)+f;g.setFromMatrixPosition(c.matrixWorld);c=this.rYa.MJ(g,h);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,y){this.A=u;this.Rp=v;u=this.A.getComponent(q.Ci);this.B=u.properties;this.Bj=y;this.mf=w;this.Ae=this.Bj.Mv(1);this.mf.xN(this.Ae,1);this.Ka=this.Rm=null;w=this.YZa(u.pna);this.od=this.IWa(w);this.HTa();this.od.type===e.TYPE&&this.od.fgb(b.C$a(u.pna));this.od.start(w)}var k=a("tdv/constants/EventName"),p=a("tdv/player/script/Model3DResourceLevel"),h=a("tdv/player/view/webgl/system/model/loaders/GLTFLoader"),g=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"),n=a("tdv/player/view/webgl/system/model/ProjectionQuery"),l=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.IWa=
function(u){return t.is(u,t.cra)?new g(this.B):t.is(u,t.XSa)?new e:new h(this.A)};m.prototype.YZa=function(u){var v=u.get("levels");if(!w&&r.yb())var w=(w=v.find(function(y){return y.get("tags").indexOf(p.aZ)>-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.od.type===e.TYPE?this.n8a():this.od.type===h.TYPE?this.D7a():this.od.type===g.TYPE&&this.E7a()};m.prototype.n8a=function(){var u=l.Mf(this.A),v=
u&&l.Zv(u);v&&(this.od.setCamera(v),this.od.setSize(l.WV(u),l.BD(u)),this.od.update())};m.prototype.D7a=function(){this.od.update()};m.prototype.E7a=function(){this.od.update()};m.prototype.HTa=function(){this.od.bind(k.INIT,this.dza,this,!0);this.od.bind(k.ha,this.Ke,this,!0);this.od.bind(k.$c,this.oh,this,!0);this.od.bind(k.wc,this.wj,this,!0);this.od.bind(k.V,this.wza,this,!0)};m.prototype.k3a=function(){this.od.h(k.INIT,this.dza,this);this.od.h(k.ha,this.Ke,this);this.od.h(k.$c,this.oh,this);
this.od.h(k.wc,this.wj,this);this.od.h(k.V,this.wza,this)};m.prototype.dza=function(){this.Ka=this.od.Vla();this.Rp.L(q.Object3D).ta=this.Ka;var u=this.od.type==h.TYPE,v=this.od.type==g.TYPE;this.kUa(this.Ka,u||v);v=this.A.N(q.Ci,!0);v.oma=u?this.od.Rm:null;this.A.N(q.Animation,!0).properties=v.properties};m.prototype.Ke=function(){this.B.set("geometryQuery",new c(this.Ka));this.B.set("objectQuery",new f(this.A,this.Ka));this.B.set("projectionQuery",new n(this.A,this.B.get("objectQuery"),this.B.get("geometryQuery")));
this.od.type==g.TYPE&&this.B.set("metadataQuery",new d(this.od.DD));this.T3();this.A.N(q.Yh)};m.prototype.wj=function(u){this.Ae.o(k.wc,u.data)};m.prototype.oh=function(){this.Ae.o(k.$c)};m.prototype.wza=function(){this.A.N(q.Object3D,!0)};m.prototype.T3=function(){this.B.set("isLoaded",!0);this.Ae.o(k.ha)};m.prototype.kUa=function(u,v){u.userData.id===void 0&&(u.userData.id="root");if(v!==!1)for(var w=[u];w.length;){var y=w.shift();u=[];y.children&&(u=u.concat(y.children));y.isSkinnedMesh&&(u=u.concat(y.skeleton.bones));
u.forEach(function(x,z){x.userData.id===void 0&&(x.userData.id=y.userData.id+"/"+z);w.push(x)})}};m.prototype.dispose=function(){this.Ka&&(this.od.type!=g.TYPE&&this.Ka.traverse(function(u){function v(x){x&&w.indexOf(x)<0&&w.push(x)}var w=[];v(u.material);v(u.userData.yt);if(u.userData.GE)for(var y in u.userData.GE)v(u.userData.GE[y]);w.forEach(function(x){x.dispose();Object.keys(x).forEach(function(z){(z=x[z])&&typeof z==="object"&&"minFilter"in z&&z.dispose()})});u.geometry&&u.geometry.userData.RFa&&
u.geometry.disposeBoundsTree();u.geometry&&u.geometry.dispose()}),this.Ka=null,this.Rp.ka(q.Object3D));this.od&&(this.k3a(),this.od.dispose(),this.od=null);this.Ae&&(this.mf.XO(this.Ae),this.Bj.XO(this.Ae),this.mf=this.Ae=null);this.B&&(this.B.set("geometryQuery",null),this.B.set("objectQuery",null),this.B.set("isLoaded",!1),this.B=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.xb=r;this.A=t;this.P=u;this.Jl=this.Jl.bind(this);this.ph=this.ph.bind(this);this.Fy=this.Fy.bind(this);this.Me=null;this.ga=!1;this.w2=[1,1,1,1,1,1];this.Vx=[];this.Sg=[this.sN=
this.Nr(),this.rN=this.Nr(),this.uN=this.Nr(),this.tN=this.Nr(),this.wN=this.Nr(),this.vN=this.Nr()];this.Sg.forEach(function(v){v=v.N(e.vd);v.opacity=.5;v.depthTest=!1}.bind(this));k.ba(this.P,n,this.ph,!0);k.ba(this.P,l,this.Jl,!0);k.ba(this.P,q,this.Fy,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/constants/RenderOrder"),g=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.ga&&(this.Y4a(this.Sg.map(function(C){return b.II(C)||1})),this.Me)){var r=b.Rc(this.A),t=b.Rc(this.vL(this.Me));if(r&&t){d.copy(r.matrixWorld).invert();c.setFromMatrixPosition(t.matrixWorld).applyMatrix4(d);r=this.P.get("x");t=this.P.get("y");var u=this.P.get("z"),v=this.P.get("width"),w=this.P.get("height"),y=this.P.get("depth"),x=0,z=0,A=0,D=0,E=0,B=0;switch(this.Me){case this.sN:D=c.x-v*.5;x=D*.5;break;case this.rN:D=-c.x-v*.5;x=-D*.5;break;case this.uN:E=c.y-w*.5;z=E*.5;break;
case this.tN:E=-c.y-w*.5;z=-E*.5;break;case this.wN:B=c.z-y*.5;A=B*.5;break;case this.vN:B=-c.z-y*.5,A=-B*.5}this.P.set("x",r+x);this.P.set("width",v+D);this.P.set("y",t+z);this.P.set("height",w+E);this.P.set("z",u+A);this.P.set("depth",y+B)}}};var c=new THREE.Vector3,d=new THREE.Matrix4;m.prototype.Nr=function(){var r=this.xb.T.tc("DraggingSphere");this.Vx.push(r);r.L(e.Mesh).renderOrder=h.RQa;r.L(e.Geometry).geometry=new THREE.SphereGeometry;r.L(e.vd);return r};m.prototype.ph=function(){this.sN.N(e.vd).color=
this.P.get("draggableXControlsColor");this.rN.N(e.vd).color=this.P.get("draggableXControlsColor");this.uN.N(e.vd).color=this.P.get("draggableYControlsColor");this.tN.N(e.vd).color=this.P.get("draggableYControlsColor");this.wN.N(e.vd).color=this.P.get("draggableZControlsColor");this.vN.N(e.vd).color=this.P.get("draggableZControlsColor");var r=this.P.get("draggableSphereRadius");this.Sg.forEach(function(t,u){t.N(e.sa,!0).scale=r*this.w2[u]}.bind(this))};m.prototype.Jl=function(){this.sN.N(e.sa,!0).positionX=
this.P.get("width")/2;this.rN.N(e.sa,!0).positionX=-this.P.get("width")/2;this.uN.N(e.sa,!0).positionY=this.P.get("height")/2;this.tN.N(e.sa,!0).positionY=-this.P.get("height")/2;this.wN.N(e.sa,!0).positionZ=this.P.get("depth")/2;this.vN.N(e.sa,!0).positionZ=-this.P.get("depth")/2};m.prototype.Fy=function(){var r=this.P.get("sizeDraggable");this.ga!=r&&(this.ga=r,this.Sg.forEach(function(t){r?(t.L(e.nb).F=this.A,this.Sg.forEach(function(u){u=u.L(e.ud);u.It=!0;u.$s=!0;u.O=new g;u.O.bind(p.rc,this.ZL,
this,!0);u.O.bind(p.Db,this.Tfa,this,!0);u.O.bind(p.Ra,this.Rfa,this,!0);u.O.bind(p.bb,this.Sfa,this,!0)}.bind(this))):(t.ka(e.nb),this.Sg.forEach(function(u){u.ka(e.ud)}.bind(this)))}.bind(this)))};m.prototype.Y4a=function(r){for(var t=!1,u=0;u<this.w2.length&&!t;u++)t=this.w2[u]!=r[u];t&&(this.w2=r,this.ph())};m.prototype.ZL=function(r){(r=this.Zx(r))&&r!=this.Me&&(r.N(e.vd).opacity=1)};m.prototype.Tfa=function(r){(r=this.Zx(r))&&r!=this.Me&&(r.N(e.vd).opacity=.5)};m.prototype.Zx=function(r){r=
this.Sg.map(function(t){return t.getComponent(e.ud).O}).indexOf(r.source);return r==-1?null:this.Sg[r]};m.prototype.Rfa=function(r){r=this.Zx(r);this.QT(r)};m.prototype.Sfa=function(r){r=this.Zx(r);r==this.Me&&(this.QT(null),this.Jl(),(r=this.Sg.indexOf(r)!=-1)&&this.P.o(p.Hm),r&&this.P.o(p.fsa))};m.prototype.QT=function(r){this.Me&&(this.Me.N(e.vd).opacity=.5,this.vL(this.Me).ka(e.Pw));if(this.Me=r)this.Me.N(e.vd).opacity=1,r=this.vL(this.Me).L(e.Pw),r.direction=this.RYa(this.Me),r.min=this.SYa(this.Me)};
m.prototype.RYa=function(r){var t=b.getWorldPosition(this.A);return b.getWorldPosition(r).sub(t)};m.prototype.vL=function(r){return this.Sg.indexOf(r)!=-1?r:null};m.prototype.SYa=function(r){var t=this.uZa(r);if(t){t=b.getWorldPosition(t);var u=b.getWorldPosition(r).sub(t);switch(r){case this.sN:case this.rN:var v=this.P.get("minWidth");break;case this.uN:case this.tN:v=this.P.get("minHeight");break;case this.wN:case this.vN:v=this.P.get("minDepth")}return t.add(u.setLength(v||f))}};m.prototype.uZa=
function(r){switch(r){case this.sN:return this.rN;case this.rN:return this.sN;case this.uN:return this.tN;case this.tN:return this.uN;case this.wN:return this.vN;case this.vN:return this.wN}return null};m.prototype.dispose=function(){k.ca(this.P,n,this.ph);k.ca(this.P,l,this.Jl);k.ca(this.P,q,this.Fy);var r=this.xb.T;this.Vx.forEach(function(t){r.fd(t)});this.P=this.xb=this.Sg=this.A=this.Vx=null};var f=1E-6,n=["draggableSphereRadius","draggableXControlsColor","draggableYControlsColor","draggableZControlsColor"],
l="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,n,l){this.xb=f;this.P=l;this.Jl=this.Jl.bind(this);this.ph=this.ph.bind(this);this.Gy=this.Gy.bind(this);this.A=this.hWa();f=this.A.L(g.nb);f.F=this.xb;f.id=this.P.get("parentId");this.Bu=this.Pba();this.Bu.L(g.nb).F=
this.A;this.VQ=this.vWa();this.VQ.L(g.nb).F=this.A;this.Vx=[this.A,this.Bu,this.VQ];this.Ica=new e(this.xb,this.A,this.P);f=this.A.L(g.ud);f.$s=!0;f.It=!0;f.O=this.P;k.ba(this.P,b,this.ph,!0);k.ba(this.P,c,this.Jl,!0);k.ba(this.P,d,this.Gy,!0);this.P.o(p.Cd)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls");m.prototype.frame=
function(){this.Ica.frame()};m.prototype.hWa=function(){var f=this.xb.T.tc("Box");f.L(g.Group);return f};m.prototype.Pba=function(){var f=this.xb.T.tc("BoxBorder");f.L(g.Line);f.L(g.Geometry).geometry=this.iWa();f.L(g.Xh);return f};m.prototype.vWa=function(){var f=this.xb.T.tc("BoxFace");f.L(g.Mesh);var n=f.L(g.Yh);n.castShadow=!1;n.receiveShadow=!1;f.L(g.Geometry).geometry=new THREE.BoxGeometry(1,1,1);f.L(g.vd);return f};m.prototype.iWa=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.ph=function(){var f=this.Bu.N(g.Xh);f.color=this.P.get("lineColor");f.opacity=this.P.get("lineOpacity");f.width=this.P.get("lineWidth");f.depthTest=this.P.get("depthTest");f=this.VQ.N(g.vd);f.color=this.P.get("faceColor");f.opacity=this.P.get("faceOpacity");f.depthTest=this.P.get("depthTest");
f=this.A.N(g.ud,!0);f.JA=this.P.get("useHandCursor");f.CE=this.P.get("transparentAreaActive")};m.prototype.Jl=function(){var f=this.A.N(g.sa,!0);f.positionX=this.P.get("x");f.positionY=this.P.get("y");f.positionZ=this.P.get("z");f=this.Bu.N(g.sa,!0);var n=this.VQ.N(g.sa,!0);n.Ge=f.Ge=this.P.get("width");n.Ve=f.Ve=this.P.get("height");n.zh=f.zh=this.P.get("depth")};m.prototype.Gy=function(){if(this.P.get("positionDraggable")){var f=this.A.N(g.Bh,!0);f.O||(f.O=new h,f.O.bind(p.V,this.um,this,!0));f.translate=
this.P.get("positionDraggable")||!1;f.rotate=!1;f.scale=!1}else(f=this.A.getComponent(g.Bh))&&f.O.h(p.V,this.um,this),this.A.ka(g.Bh)};m.prototype.um=function(f){this.P.set({x:f.data.position.x,y:f.data.position.y,z:f.data.position.z});this.P.o(p.Hm)};m.prototype.dispose=function(){this.Ica.dispose();this.Ica=null;k.ca(this.P,d,this.Gy);k.ca(this.P,b,this.ph);k.ca(this.P,c,this.Jl);var f=this.xb.T;this.Vx.forEach(function(n){f.fd(n)});this.xb=this.VQ=this.Bu=this.A=this.Vx=null;this.P.o(p.sd);this.P=
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(y,x,z){this.xb=y;this.A=x;this.P=z;this.kH=this.kH.bind(this);this.ph=this.ph.bind(this);this.Fy=this.Fy.bind(this);this.Me=null;this.ga=!1;this.fZ=this.ev=1;this.Du=this.xb.T.tc("DraggingSize2DContainer");
this.Du.L(e.Group);this.Du.L(e.sa);this.Sg=[this.nfa=this.Nr(),this.gfa=this.Nr(),this.Mha=this.Nr(),this.qha=this.Nr()];this.Sg.forEach(function(A){A.L(e.sa);A=A.N(e.vd);A.color="#ffffff";A.opacity=.5;A.depthTest=!1}.bind(this));this.Bu=this.Pba();this.Vx=[this.Du,this.Bu].concat(this.Sg);[this.Bu].concat(this.Sg).forEach(function(A){A.L(e.nb).F=this.Du}.bind(this));k.ba(this.P,v,this.kH,!0);k.ba(this.P,u,this.ph,!0);k.ba(this.P,w,this.Fy,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),
h=a("tdv/constants/RenderOrder"),g=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,n=new THREE.Quaternion,l=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Euler,t=180/Math.PI;m.prototype.frame=function(){if(this.ga){var y=b.Rc(this.Du),x=y&&b.SV(y),z=x&&b.Zv(x);if(z){if(this.Me){var A=b.WV(x);x=b.BD(x);b.getWorldPosition(this.A,q).project(z);q.x=(q.x+1)*A*.5;
q.y=(1-q.y)*x*.5;b.getWorldPosition(this.Me,l).project(z);l.x=(l.x+1)*A*.5;l.y=(1-l.y)*x*.5;A=this.P.get("anchorX");x=this.P.get("anchorY");var D,E,B=q.x-l.x,C=l.y-q.y,I=-B,F=-C;this.gfa===this.Me&&(A>0||x<1)?B>C?D=B/A:E=C/(1-x):this.qha===this.Me&&(A<1||x<1)?I>C?D=I/(1-A):E=C/(1-x):this.nfa===this.Me&&(A>0||x>0)?B>F?D=B/A:E=F/x:this.Mha===this.Me&&(A<1||x>0)&&(I>F?D=I/(1-A):E=F/x);E!==void 0&&D===void 0?D=E*this.rta:D!==void 0&&E===void 0&&(E=D/this.rta);D!==void 0&&E!==void 0&&(A=this.P.get("sizeAttenuation")?
this.ev/this.fZ:1,this.P.set("width",this.Pa=D*A),this.P.set("height",this.Ga=E*A))}D=this.Du.getComponent(e.sa);c.copy(y.parent.matrixWorld).invert().multiply(z.matrixWorld).decompose(d,n,f);r.setFromQuaternion(n,D.ff);r.x*=t;r.y*=t;r.z*=t;if(D.Yd!=r.x||D.Ad!=r.y||D.Ue!=r.z)D=this.Du.N(e.sa),D.Yd=r.x,D.Ad=r.y,D.Ue=r.z;y.parent.getWorldScale(d);this.R3a(1/Math.max(d.x,d.y,d.z));this.dia(b.II(this.Du)||1)}}};m.prototype.q7a=function(y,x){this.mja!=null&&clearTimeout(this.mja);this.mja=setTimeout(function(){this.mja=
null;if(this.Pa!==y||this.Ga!==x)this.Pa=y,this.Ga=x,this.rta=this.Pa/this.Ga}.bind(this),100)};m.prototype.Nr=function(){var y=this.xb.T.tc("DraggingSphere");y.L(e.Mesh).renderOrder=h.QQa;y.L(e.Geometry).geometry=new THREE.SphereGeometry;y.L(e.vd);return y};m.prototype.Pba=function(){var y=this.xb.T.tc("BoxBorder");y.L(e.Line);y.L(e.Geometry).geometry=this.TWa();var x=y.L(e.Xh);x.color="#0000ff";x.depthTest=!1;x.width=1;return y};m.prototype.TWa=function(){var y=[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(y)};m.prototype.ph=function(){var y=this.Bu.N(e.Xh);y.color=this.P.get("draggableLineColor");y.opacity=this.P.get("draggableLineOpacity");y.width=this.P.get("draggableLineWidth");this.Sg.forEach(function(x){x.N(e.vd).color=this.P.get("draggableSphereColor");x.N(e.sa).scale=this.P.get("draggableSphereRadius")*
this.ev}.bind(this))};m.prototype.dia=function(y){this.ev!=y&&(this.ev=y,this.kH(),this.ph())};m.prototype.R3a=function(y){this.fZ!=y&&(this.fZ=y,this.kH(),this.ph())};m.prototype.kH=function(){var y=this.P.get("anchorX"),x=this.P.get("anchorY"),z=this.P.get("width"),A=this.P.get("height"),D=this.P.get("sizeAttenuation")?this.fZ:this.ev,E=this.nfa.N(e.sa,!0);E.positionX=-y*z*D;E.positionY=x*A*D;E=this.Mha.N(e.sa,!0);E.positionX=(1-y)*z*D;E.positionY=x*A*D;E=this.gfa.N(e.sa,!0);E.positionX=-y*z*D;
E.positionY=(x-1)*A*D;E=this.qha.N(e.sa,!0);E.positionX=(1-y)*z*D;E.positionY=(x-1)*A*D;E=this.Bu.N(e.sa,!0);E.positionX=(.5-y)*z*D;E.positionY=(x-.5)*A*D;E.Ge=z*D;E.Ve=A*D;this.q7a(z,A)};m.prototype.Fy=function(){var y=this.P.get("sizeDraggable");this.ga!=y&&((this.ga=y)?(this.Du.L(e.nb).F=this.A,this.Sg.forEach(function(x){x=x.L(e.ud);x.It=!0;x.$s=!0;x.O=new g;x.O.bind(p.rc,this.ZL,this,!0);x.O.bind(p.Db,this.Tfa,this,!0);x.O.bind(p.Ra,this.Rfa,this,!0);x.O.bind(p.bb,this.Sfa,this,!0)}.bind(this))):
(this.Du.ka(e.nb),this.Sg.forEach(function(x){x.ka(e.ud)}.bind(this))))};m.prototype.ZL=function(y){(y=this.Zx(y))&&y!=this.Me&&(y.N(e.vd).opacity=1)};m.prototype.Tfa=function(y){(y=this.Zx(y))&&y!=this.Me&&(y.N(e.vd).opacity=.5)};m.prototype.Rfa=function(y){y=this.Zx(y);this.QT(y)};m.prototype.Sfa=function(y){(y=this.Zx(y))&&y==this.Me&&(this.QT(null),this.kH(),(y=this.Sg.indexOf(y)!=-1)&&this.P.o(p.Hm),y&&this.P.o(p.fsa))};m.prototype.Zx=function(y){y=this.Sg.map(function(x){return x.getComponent(e.ud).O}).indexOf(y.source);
if(y==-1)return null;y=this.Sg[y];return this.Y_a(y)?y:null};m.prototype.Y_a=function(y){var x=this.P.get("anchorX"),z=this.P.get("anchorY");return this.gfa===y&&(x>0||z>0)||this.qha===y&&(x<1||z>0)||this.nfa===y&&(x>0||z<1)||this.Mha===y&&(x<1||z<1)?!0:!1};m.prototype.QT=function(y){this.Me&&(this.Me.N(e.vd).opacity=.5,this.vL(this.Me).ka(e.Pw));if(this.Me=y){this.Me.N(e.vd).opacity=1;var x=this.vL(this.Me).L(e.Pw),z=b.getWorldPosition(this.A);y=b.getWorldPosition(y);y=(new THREE.Vector3).copy(y).sub(z);
var A=Math.min(y.length(),this.ev*10);z=(new THREE.Vector3).copy(z).add(d.copy(y).setLength(A));x.direction=y;x.min=z}};m.prototype.vL=function(y){return this.Sg.indexOf(y)!=-1?y:null};m.prototype.dispose=function(){k.ca(this.P,v,this.kH);k.ca(this.P,u,this.ph);k.ca(this.P,w,this.Fy);var y=this.xb.T;this.Vx.forEach(function(x){y.fd(x)});this.P=this.xb=this.Sg=this.A=this.Vx=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(x,z,A,D,E){this.xb=x;this.mf=A;this.Bj=D;this.P=E;this.Jl=this.Jl.bind(this);this.HS=this.HS.bind(this);this.ph=
this.ph.bind(this);this.z1=this.z1.bind(this);this.Gy=this.Gy.bind(this);this.Ih=this.mf.Mv(1);this.Xta=new THREE.Vector3;this.BZ=new THREE.Euler;this.P.get("preload")&&this.Bj.xN(this.Ih);this.A=this.xb.T.tc("SpriteContainer");this.A.L(b.Group);x=this.A.L(b.nb);x.F=this.xb;x.id=this.P.get("parentId");this.vU=this.xb.T.tc("TranslationSpriteContainer");this.vU.L(b.Group);this.vU.L(b.nb).F=this.A;this.pv=this.xb.T.tc("Sprite");this.pv.L(b.nb).F=this.vU;x=this.pv.L(b.Bi);x.properties=this.P;x.aw=this.P.get("image");
x.O=this.P;x.np=this.Ih;x.isSprite=!0;x.priority=this.P.get("preload")?h.kF:h.sra;this.pv.L(b.ud).O=this.P;this.pv.L(b.TA);this.pv.L(b.MP).object=this.P;this.hfa=!1;this.ev=1E-4;this.ty=this.A.T.tc("TranslationLine");this.ty.L(b.Line);this.ty.L(b.Xh);this.Hca=new c(this.xb,this.vU,this.P);k.ba(this.P,y,this.Gy,!0);k.ba(this.P,t,this.Jl,!0);k.ba(this.P,v,this.HS,!0);k.ba(this.P,w,this.ph,!0);k.ba(this.P,u,this.z1,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/constants/Priority"),
g=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.Hca.frame();this.dia(d.II(this.A)||1E-4)};m.prototype.Jl=function(){this.A.L(b.nb).id!=this.P.get("parentId")&&(this.A.N(b.nb).id=this.P.get("parentId"));var x=this.A.N(b.sa,!0);x.translationX=this.P.get("x");x.translationY=
this.P.get("y");x.We=this.P.get("z")};m.prototype.dia=function(x){this.ev!=x&&(this.ev=x,this.P.set("worldPixelScale",d.PIa(this.A)),this.HS())};m.prototype.HS=function(){var x=this.A.N(b.sa,!0),z=this.vU.N(b.sa,!0),A=this.ty.N(b.sa,!0),D=this.P.get("translationLength");l.set(this.P.get("translationX"),this.P.get("translationY"),this.P.get("translationZ"));D=D!==void 0?D*this.ev:l.length();if(this.Xta.equals(l)){var E=this.BZ.x;var B=this.BZ.y;var C=this.BZ.z}else f.setFromUnitVectors(q,l.normalize()),
B=Math.atan2(l.x,l.z),E=-Math.atan2(l.y,Math.sqrt(l.x*l.x+l.z*l.z)),C=0;z.translationX=0;z.translationX=0;z.translationY=0;z.We=D;A.scale=D;x.Yd=E*r;x.Ad=B*r;x.Ue=C*r;x.ff="YXZ";this.oEa()};var f=new THREE.Quaternion,n=new THREE.Euler,l=new THREE.Vector3,q=new THREE.Vector3(0,0,1),r=180/Math.PI;m.prototype.ph=function(){var x=this.pv.N(b.ud,!0);x.JA=this.P.get("useHandCursor");x.CE=this.P.get("transparentAreaActive");x.$s=this.P.get("clickEnabled");x.It=this.P.get("rollOverEnabled");x=this.ty.N(b.Xh);
x.color=this.P.get("translationLineColor");x.depthTest=this.P.get("depthTest");x.opacity=this.P.get("hidden")?0:this.P.get("translationLineOpacity");x.transparent=!1;x.width=this.P.get("translationLineWidth");this.oEa();x=this.ty.N(b.Line,!0);var z=this.pv.N(b.Sprite,!0);x.renderOrder=z.renderOrder=this.P.get("depthTest")?g.rSa:g.sSa};m.prototype.z1=function(){var x=this.pv.N(b.Sprite,!0);x.yN=this.P.get("anchorX");x.zN=this.P.get("anchorY");x.width=this.P.get("width");x.height=this.P.get("height");
x.scale=this.P.get("scale");x.sizeAttenuation=this.P.get("sizeAttenuation")};m.prototype.Gy=function(){if(this.P.get("positionDraggable")||this.P.get("translationDraggable")){var x=this.A.N(b.Bh,!0);x.O||(x.O=new e,x.O.bind(p.V,this.um,this,!0));x.translate=this.P.get("positionDraggable")||!1;x.rotate=this.P.get("translationDraggable")||!1;x.scale=!1}else(x=this.A.getComponent(b.Bh))&&x.O.h(p.V,this.um,this),this.A.ka(b.Bh)};m.prototype.um=function(x){var z=l.set(this.P.get("translationX"),this.P.get("translationY"),
this.P.get("translationZ")).length();n.setFromQuaternion(x.data.quaternion,this.A.getComponent(b.sa).ff);l.copy(q).setLength(z).applyQuaternion(x.data.quaternion);this.Xta.copy(l);this.BZ.copy(n);this.P.set({x:x.data.position.x,y:x.data.position.y,z:x.data.position.z,translationX:l.x,translationY:l.y,translationZ:l.z});this.P.o(p.Hm)};m.prototype.oEa=function(){var x=this.P.get("translationLineVisible")&&this.P.get("translationLineOpacity")>0&&(this.P.get("translationX")!=0||this.P.get("translationY")!=
0||this.P.get("translationZ")!=0);this.hfa!=x&&((this.hfa=x)?this.ty.L(b.nb).F=this.A:this.ty.ka(b.nb))};m.prototype.dispose=function(){this.Hca.dispose();this.Hca=null;k.ca(this.P,y,this.Gy);k.ca(this.P,t,this.Jl);k.ca(this.P,v,this.HS);k.ca(this.P,w,this.ph);k.ca(this.P,u,this.z1);this.mf.XO(this.Ih);this.Bj.XO(this.Ih);this.Ih=this.Bj=this.mf=null;var x=this.xb.T;this.xb=null;x.fd(this.pv);this.pv=null;x.fd(this.ty);this.ty=null;x.fd(this.A);this.P=this.A=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(" "),y=["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"),k=a("tdv/player/view/webgl/system/model/object/BoxController"),p=a("tdv/player/view/webgl/system/model/object/SpriteController");return{create:function(h,g,e,b,c){return m.Qa("SpriteModel3DObject",c)?new p(h,g,e,b,c):m.Qa("BoxModel3DObject",
c)?new k(h,g,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.A=e;this.Rp=b;this.mf=c;this.Bj=d;this.vya=new p(this.Bj.Mv(.1));this.uya=new p(this.mf.Mv(.1));this.lH=this.lH.bind(this);this.wz=e.T;this.B=this.A.getComponent(h.Ci).properties;this.Ka=(e=this.A.getComponent(h.Object3D))&&e.ta;this.Xk=
[];this.Y0=new Map;k.ba(this.B,["objects.enabled"],this.lH,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/player/view/util/LoadingGroup"),h=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/model/object/ControllerFactory");m.prototype.update=function(){var e=this.A.getComponent(h.Object3D);e=e&&e.ta;if(this.Ka!==e){var b=this.Ka;this.Ka=e;this.g4(!!b)}};m.prototype.frame=function(){this.Y0.forEach(function(e){e&&e.frame&&e.frame()})};m.prototype.dispose=function(){this.Ka=
null;k.ca(this.B,["objects.enabled"],this.lH);this.xCa([])};m.prototype.lH=function(){this.g4()};m.prototype.g4=function(e){var b=this.B.get("objects").filter(function(c){return c.get("enabled")});this.xCa(b,e);this.vya.update();this.uya.update()};m.prototype.xCa=function(e,b){if(this.Xk!=e||b)this.Xk.forEach(function(c){(b||e.indexOf(c)<0)&&this.n3a(c)}.bind(this)),e.forEach(function(c){(b||this.Xk.indexOf(c)<0)&&this.JTa(c)}.bind(this)),this.Xk=e};m.prototype.JTa=function(e){this.Y0.set(e,g.create(this.A,
this.Rp,this.uya,this.vya,e))};m.prototype.n3a=function(e){var b=this.Y0.get(e);b&&b.dispose();this.Y0["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.A=e;this.Rp=b;this.gi=this.Ka=this.B=null;this.Fj(this.A.getComponent(p.Ci).properties);this.update()}var k=a("tdv/constants/EventName"),p=a("tdv/player/view/webgl/components");m.prototype.frame=function(){this.update()};m.prototype.update=function(){var e=this.Rp.getComponent(p.Object3D);e=e&&e.ta;this.Ka!=e&&(this.Ka=e,this.JF())};m.prototype.Fj=
function(e){this.B&&h.forEach(function(b){this.B.h(k.K(b),this.JF,this,!1)}.bind(this));if(this.B=e)h.forEach(function(b){this.B.bind(k.K(b),this.JF,this,!1)}.bind(this)),this.JF()};m.prototype.JF=function(){this.wCa(this.B.get("model"));this.Ka&&this.A.T.Xa()};m.prototype.wCa=function(e){this.gi!=e&&(this.gi&&g.forEach(function(b){this.gi.h(k.K(b),this.Xaa,this,!1)}.bind(this)),this.gi=e)&&(g.forEach(function(b){this.gi.bind(k.K(b),this.Xaa,this,!1)}.bind(this)),this.Xaa())};m.prototype.Xaa=function(){var e=
this.Rp.N(p.sa,!0);e.positionX=this.gi.get("positionX");e.positionY=this.gi.get("positionY");e.positionZ=this.gi.get("positionZ");e.ff=this.gi.get("rotationOrder");e.Yd=this.gi.get("rotationX");e.Ad=this.gi.get("rotationY");e.Ue=this.gi.get("rotationZ");e.scale=this.gi.get("scale");e.Ge=this.gi.get("invertX")?-1:1;e.Ve=this.gi.get("invertY")?-1:1;e.zh=this.gi.get("invertZ")?-1:1;e.translationX=this.gi.get("translationX");e.translationY=this.gi.get("translationY");e.We=this.gi.get("translationZ")};
m.prototype.dispose=function(){this.Ka=null;this.wCa(null);this.Fj(null)};var h=["model"],g="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.A=d;this.A.L(g.Group);d=this.A.getComponent(g.Ci);this.Rp=d.tI;this.Bj=new h(d.uMa);this.mf=new h(d.np);this.Ae=d.O;this.od=new e(this.A,this.Rp,this.mf,this.Bj);
this.Xk=new b(this.A,this.Rp,this.mf,this.Bj);this.B=new c(this.A,this.Rp)}var k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/player/view/util/LoadingGroup"),g=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.od.update();this.Xk.update();this.B.update()};m.prototype.frame=function(){this.od.frame();this.Xk.frame();
this.B.frame();this.Ae.o(new p(k.me))};m.prototype.dispose=function(){this.od&&(this.od.dispose(),this.od=null);this.Xk&&(this.Xk.dispose(),this.Xk=null);this.B&&(this.B.dispose(),this.B=null);this.mf&&(this.mf.dispose(),this.mf=null);this.Ae=this.Rp=null};m.Ya=function(d){d.L(g.Yw).manager=new m(d)};m.Ba=function(d){var f=d.getComponent(g.Yw);f.manager.dispose();f.manager=null;d.ka(g.Yw)};m.update=function(d){d.getComponent(g.Yw).manager.update()};m.frame=function(d){d.getComponent(g.Yw).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/model/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.AKa.v.length&&this.AKa.v.slice().forEach(h.Ya);this.V6.Ca.length&&this.V6.Ca.slice().forEach(h.update);
this.V6.v.length&&this.V6.v.slice().forEach(h.frame);this.BKa.v.length&&this.BKa.v.slice().forEach(h.Ba)};a.M={};a.M.AKa=[p.Ci,p.Yw.ia];a.M.V6=[p.Ci,p.Yw];a.M.BKa=[p.Ci.ia,p.Yw];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(h){this.A=h;this.De=null}var k=a("tdv/player/view/webgl/components"),p=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.frame=function(){if(!this.De){var h=this.A.getComponent(k.rK),g=p.Rc(h.container);if(this.De=g&&h.id&&p.wD(g,h.id)||null)this.A.L(k.Object3D).ta=this.De,this.A.T.Xa()}};m.prototype.update=function(){this.De&&
(this.A.ka(k.Object3D),this.De=null)};m.prototype.dispose=function(){this.De&&(this.A.ka(k.Object3D),this.De=null)};m.Ya=function(h){h.L(k.Zw).manager=new m(h)};m.Ba=function(h){var g=h.getComponent(k.Zw);g.manager.dispose();g.manager=null;h.ka(k.Zw)};m.frame=function(h){h.getComponent(k.Zw).manager.frame()};m.update=function(h){h.getComponent(k.Zw).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/objectId/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.UKa.v.length&&this.UKa.v.slice().forEach(h.Ya);this.c7.Ca.length&&
this.c7.Ca.slice().forEach(h.update);this.c7.v.length&&this.c7.v.slice().forEach(h.frame);this.VKa.v.length&&this.VKa.v.slice().forEach(h.Ba)};a.M={};a.M.UKa=[p.rK,p.Zw.ia];a.M.c7=[p.rK,p.Zw];a.M.VKa=[p.rK.ia,p.Zw];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,k,p,h,g){a=function(e){function b(){var c=e.call(this)||this;c.Eb=c.Eb.bind(c);c.sb=c.sb.bind(c);c.Ea=c.Ea.bind(c);return c}P(b,e);b.prototype.cd=function(){this.dE.v.length&&this.dE.v.slice().forEach(this.Eb);this.planes.Ca.length&&this.planes.Ca.slice().forEach(this.sb);this.hMa.v.length&&
this.hMa.v.slice().forEach(this.Ea);this.iMa.v.length&&this.iMa.v.slice().forEach(this.Ea)};b.prototype.Eb=function(c){var d=new k.PlaneGeometry;c.L(h.mB).geometry=d;c.L(h.Object3D).ta=new k.Mesh(d);this.sb(c)};b.prototype.sb=function(c){var d=c.L(h.Object3D).ta,f=c.getComponent(h.Material).material;f&&g.iD(d,f);d.renderOrder=c.getComponent(h.Plane).renderOrder};b.prototype.Ea=function(c){var d=c.getComponent(h.mB);d.geometry.dispose();d.geometry=null;c.ka(h.mB);c.ka(h.Object3D)};b.M={};return b}(p);
a.M={};a.M.dE=[h.Material,h.Plane,h.mB.ia];a.M.planes=[h.Plane,h.Material,h.mB];a.M.hMa=[h.Plane.ia,h.mB];a.M.iMa=[h.Material.ia,h.mB];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"),k=a("tdv/player/view/webgl/system/util/entity/Util");return{Ya:function(p){var h=p.getComponent(m.nb),g=k.Rc(h.F);if(g){var e=p.L(m.nu);e.parent=g;h.id&&(g=g&&k.wD(g,h.id));e.id=h.id;e.de=k.Rc(p);e.attach=h.attach;g&&e.de&&(e.attach?g.attach(e.de):g.add(e.de))}},update:function(p){var h=p.getComponent(m.nb),
g=p.getComponent(m.nu),e=k.Rc(h.F),b=k.Rc(p);if(g.parent!=e||g.de!=b||h.id!=g.id||h.attach!=g.attach||b&&e&&!b.parent)g=p.N(m.nu),g.de&&g.de.parent&&(h.F.N(m.Object3D),g.de.parent.remove(g.de)),g.parent=e,h.id&&(e=e&&k.wD(e,h.id)),g.id=h.id,g.de=b,g.attach=h.attach,e&&g.de&&(g.attach?e.attach(g.de):e.add(g.de),(h=p.getComponent(m.sa))&&k.CX(p,h))},Ba:function(p){var h=p.getComponent(m.nu);h.de&&h.de.parent&&h.de.parent.remove(h.de);h.parent=null;h.de=null;h.id=void 0;p.ka(m.nu)}}});
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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/parent/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.GW.v.length&&this.GW.v.slice().forEach(h.Ya);this.ut.v.length&&
this.ut.v.slice().forEach(h.update);this.ut.Ca.length&&this.ut.Ca.slice().forEach(h.update);this.ut.ce.length&&this.ut.ce.slice().forEach(h.update);this.fGa.v.length&&this.fGa.v.slice().forEach(h.Ba);this.gGa.v.length&&this.gGa.v.slice().forEach(h.Ba)};a.M={};a.M.GW=[p.Object3D,p.nb,p.nu.ia];a.M.ut=[p.Object3D,p.nb,p.nu];a.M.fGa=[p.Object3D.ia,p.nb,p.nu];a.M.gGa=[p.nb.ia,p.nu];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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(k,function(){k.apply(this,arguments);this.Eb=this.Eb.bind(this);this.Ea=this.Ea.bind(this);this.Xf=this.Xf.bind(this)});
a.prototype.cd=function(){this.eMa.v.length&&this.eMa.v.slice().forEach(this.Eb);this.dMa.v.length&&this.dMa.v.slice().forEach(this.Xf);this.fMa.v.length&&this.fMa.v.slice().forEach(this.Ea);this.gMa.v.length&&this.gMa.v.slice().forEach(this.Ea)};a.prototype.Eb=function(b){b.L(p.qF)};a.prototype.Ea=function(b){b.ka(p.qF)};var g=new THREE.Matrix4,e=new THREE.Vector3;a.prototype.Xf=function(b){var c=b.getComponent(p.Lk),d=b.getComponent(p.sa);if(d){var f=b.getComponent(p.Object3D).ta;if(f&&f.parent){var n=
b.getComponent(p.ug),l=1E-7;n&&(l=h.II(b)||l);g.copy(f.parent.matrixWorld).invert();e.setFromMatrixScale(g);f=Math.max(e.x,e.y,e.z);n&&n.xz&&(l/=f,f=1);n=c.scale*f;c.MD!==void 0&&(n=Math.min(c.MD*l,n));c.ND!==void 0&&(n=Math.max(c.ND*l,n));if(d.scale!=n||d.Ge!=c.Ge||d.Ve!=c.Ve||d.zh!=c.zh)d=b.N(p.sa),d.scale=n,d.Ge=c.Ge,d.Ve=c.Ve,d.zh=c.zh}}};a.M={};a.M.eMa=[p.Object3D,p.Lk,p.qF.ia];a.M.dMa=[p.Object3D,p.Lk,p.qF];a.M.fMa=[p.Object3D.ia,p.qF];a.M.gMa=[p.Lk.ia,p.qF];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.A=u;this.lS=new THREE.Vector3;this.Pb=new THREE.Vector3;this.vea=this.zd=this.Wia=!1;this.vM=null;this.update()}var k=a("tdv/constants/EventName"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){this.wga=this.A.getComponent(p.vl).F};
m.prototype.frame=function(){this.wEa();this.vz()};m.prototype.wEa=function(){var u=(t.get(this.A.T)||[]).map(function(v){return v.getComponent(p.xc)}).filter(function(v){return v&&v.O}).reduce(function(v,w){return!v||!v.Lg&&w.Lg?w:v},null);u=u&&u.O;this.vM!==u&&(this.vM&&this.r3a(this.vM),(this.vM=u)&&this.OTa(this.vM))};m.prototype.OTa=function(u){u.bind(k.mb,this.lg,this,!0);u.bind(k.Db,this.ps,this,!0)};m.prototype.r3a=function(u){u.h(k.mb,this.lg,this);u.h(k.Db,this.ps,this)};m.prototype.lg=
function(u){if(this.wga&&h.wD(h.Rc(this.wga),u.data.objectId)&&["mesh","gs"].includes(u.data.type)){var v=this.zd;this.zd=!0;var w=h.Rc(this.A);if((w=w&&w.parent)&&w.matrixWorld){var y=this.A.getComponent(p.vl);y&&(e.setFromMatrixPosition(w.matrixWorld),b.copy(w.matrixWorld).invert(),c.fromArray(u.data.objectMatrixWorld),g.setFromMatrixPosition(c),d.copy(c).invert(),y.rotate?u.data.normal?this.lS.copy(u.data.normal).applyMatrix4(c).sub(g).add(e):this.lS.copy(u.data.cameraPosition):this.lS.copy(l),
this.lS.applyMatrix4(b).normalize(),this.Pb.copy(u.data.position).applyMatrix4(b),this.Wia=!0,this.A.T.Xa(),v||(u=(y=this.A.getComponent(p.vl))&&y.O)&&u.o(k.rc))}}else this.ps()};var g=new THREE.Vector3,e=new THREE.Vector3,b=new THREE.Matrix4,c=new THREE.Matrix4,d=new THREE.Matrix4;m.prototype.ps=function(){if(this.zd){this.zd=!1;this.A.T.Xa();var u=this.A.getComponent(p.vl);(u=u&&u.O)&&u.o(k.Db)}};m.prototype.vz=function(){if(this.Wia||this.zd){this.Wia=!1;var u=this.A.N(p.sa,!0);u.positionX=0;u.positionY=
0;u.positionZ=0;f.setFromUnitVectors(n,this.lS);q.setFromQuaternion(f,u.ff);u.Yd=q.x*r;u.Ad=q.y*r;u.Ue=q.z*r;u.translationX=this.Pb.x;u.translationY=this.Pb.y;u.We=this.Pb.z;u.easing=this.vea?.4:0;this.vea||(h.CX(this.A,u),this.vea=!0)}};var f=new THREE.Quaternion,n=new THREE.Vector3(0,0,1),l=new THREE.Vector3(0,1,0),q=new THREE.Euler,r=180/Math.PI;m.prototype.dispose=function(){this.wga=null;this.wEa()};m.CJ=function(u,v){t.set(u,v)};var t=new Map;m.Ya=function(u){u.L(p.ou).manager=new m(u)};m.Ba=
function(u){var v=u.getComponent(p.ou);v.manager.dispose();v.manager=null;u.ka(p.ou)};m.frame=function(u){u.getComponent(p.ou).manager.frame()};m.update=function(u){u.getComponent(p.ou).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/pointerOverTransform/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){h.CJ(this.T,this.yk.v.slice());
this.kMa.v.length&&this.kMa.v.slice().forEach(h.Ya);this.O7.Ca.length&&this.O7.v.slice().forEach(h.update);this.O7.v.length&&this.O7.v.slice().forEach(h.frame);this.lMa.v.length&&this.lMa.v.slice().forEach(h.Ba);this.mMa.v.length&&this.mMa.v.slice().forEach(h.Ba)};a.M={};a.M.yk=[p.xc];a.M.kMa=[p.Object3D,p.vl,p.ou.ia];a.M.O7=[p.Object3D,p.vl,p.ou];a.M.lMa=[p.Object3D.ia,p.ou];a.M.mMa=[p.vl.ia,p.ou];return a});
define("tdv/player/view/webgl/system/util/material/ProjectedMaterial",["require"],function(){var a={Cp:function(){this.Yhb=this.zOa=this.Xhb=this.H8=this.G8=this.F8=0;this.Cpa=!1;this.OX=new THREE.CubeTexture;this.tib=this.WOa=this.sib=this.T8=this.targetY=this.targetX=this.E8=0;this.Kpa=!1;this.WX=new THREE.CubeTexture;this.S8=0;this.ff="XYZ"},vlb:function(){return new a.Cp},create:function(p){var h=new THREE.ShaderMaterial;h.uniforms={sCube:{value:p.OX},sPos:{value:new THREE.Vector3},sRot:{value:new THREE.Matrix4},
sEnabled:{value:!1},sCoef:{value:0},tCube:{value:p.WX},tPos:{value:new THREE.Vector3},tRot:{value:new THREE.Matrix4},tEnabled:{value:!1},tCoef:{value:0}};h.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}";
h.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}";h.side=THREE.DoubleSide;h.depthWrite=!0;h.transparent=!0;h.needsUpdate=!0;this.update(h,p);return h},update:function(p,h){p.uniforms.sCube.value=h.OX;p.uniforms.sPos.value.set(h.F8,h.G8,h.H8);p.uniforms.sRot.value.makeRotationFromEuler(m.set(h.Xhb*k,h.zOa*k,h.Yhb*k,h.ff));p.uniforms.sEnabled.value=
h.Cpa&&h.E8>0;p.uniforms.sCoef.value=h.E8;p.uniforms.tCube.value=h.WX;p.uniforms.tPos.value.set(h.targetX,h.targetY,h.T8);p.uniforms.tRot.value.makeRotationFromEuler(m.set(h.sib*k,h.WOa*k,h.tib*k,h.ff));p.uniforms.tEnabled.value=h.Kpa&&h.S8>0;p.uniforms.tCoef.value=h.S8;p.needsUpdate=!0;return p}},m=new THREE.Euler,k=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"),k=a("tdv/constants/RenderOrder");a("tdv/player/view/util/geo/Fov");var p=a("tdv/player/view/webgl/ecs/System"),h=a("tdv/player/view/webgl/components"),
g=a("tdv/player/view/webgl/system/util/material/ProjectedMaterial"),e=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(p,function(){p.apply(this,arguments);this.Eb=this.Eb.bind(this);this.Ea=this.Ea.bind(this);this.sb=this.sb.bind(this)});a.prototype.cd=function(){this.CMa.v.length&&this.CMa.v.slice().forEach(this.Ea);this.DMa.v.length&&this.DMa.v.slice().forEach(this.Ea);this.BMa.v.length&&this.BMa.v.slice().forEach(this.Eb);this.AMa.Ca.length&&this.AMa.Ca.slice().forEach(this.sb)};
a.prototype.Eb=function(c){var d=c.getComponent(h.ho),f=(d=d&&d.yE)&&e.Rc(d),n=e.Mf(d);if(f&&n){var l=c.L(h.wr);l.yE=d;l.DO=new g.Cp;l.material=this.Jx(l.DO);l.ta=this.SVa(f,l.material);l.jP=this.gWa(l.material);l.eA=this.OWa(l.material);l.colorSpace=e.VV(n);c.L(h.Object3D).ta=l.ta;this.sb(c)}};a.prototype.sb=function(c){this.Ij(c);this.k8a(c);this.j8a(c);this.Q7a(c)};a.prototype.Ea=function(c){var d=c.getComponent(h.wr),f=e.Rc(d.yE);f&&(f.visible=!0);d.ta&&d.ta.traverse(function(n){n.material==d.material&&
(n.material=b)});d.jP&&((f=d.jP.parent)&&e.OMa(f,d.jP),d.jP=null);d.eA&&((f=d.eA.parent)&&e.NMa(f,d.eA),d.eA=null);d.material&&(d.DO.OX=null,d.DO.WX=null,d.DO=null,d.material.dispose(),d.material=null);c.ka(h.wr);c.ka(h.Object3D)};a.prototype.Ij=function(c){var d=c.getComponent(h.ho);c=c.getComponent(h.wr);var f=c.DO;d.NX?(f.OX!=d.NX&&(f.OX=d.NX),f.F8=d.F8,f.G8=d.G8,f.H8=d.H8,f.zOa=d.PX,f.E8=d.xOa,f.Cpa=!0):(f.Cpa=!1,f.E8=0);d.VX?(f.WX!=d.VX&&(f.WX=d.VX),f.targetX=d.targetX,f.targetY=d.targetY,f.T8=
d.T8,f.WOa=d.uib,f.S8=d.UOa,f.Kpa=!0):(f.Kpa=!1,f.S8=0);g.update(c.material,f)};a.prototype.k8a=function(c){c=c.getComponent(h.ho);var d=e.Rc(c.yE);d&&(d.visible=(1-(c.NX?c.xOa:0))*(1-(c.VX?c.UOa:0))>0)};a.prototype.j8a=function(c){var d=c.getComponent(h.ho),f=c.getComponent(h.wr).jP;!!f.parent!=d.vOa&&(c=(c=e.Mf(c)||e.Mf(d.yE))&&e.Zv(c),d.vOa?c&&e.U8a(c,f):c&&e.OMa(c,f))};a.prototype.Q7a=function(c){var d=c.getComponent(h.ho),f=c.getComponent(h.wr).eA;!!f.parent!=d.eA&&(c=(c=e.Mf(c)||e.Mf(d.yE))&&
e.Zv(c),d.eA?c&&e.T8a(c,f):e.NMa(c,f))};var b=new THREE.MeshBasicMaterial;a.prototype.Jx=function(c){c=g.create(c);c.polygonOffset=!0;c.polygonOffsetUnits=1;c.polygonOffsetFactor=-10;c.needsUpdate=!0;return c};a.prototype.SVa=function(c,d){if(this.Cva(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.Cva(w)}.bind(this));
t.children.length!=v.length&&(u.children=t.children,t.children=v);f.set(t,u)}}.bind(this));var n=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,n]];c.length;){var l=c.shift(),q=l[0];l=l[1];q.He&&(l.He=q.He);for(var r=0;r<q.children.length;r++)c.push([q.children[r],l.children[r]])}return n};a.prototype.Cva=function(c){return c.dw||c.isGaussianCloud};a.prototype.gWa=function(c){return new THREE.Mesh(new THREE.BoxGeometry(2,
2,2),c)};a.prototype.OWa=function(c){c=new THREE.Mesh(new THREE.PlaneGeometry(1,1),c);c.renderOrder=k.iSa;return c};a.M={};a.M.BMa=[h.ho,h.wr.ia];a.M.AMa=[h.ho,h.Object3D,h.wr];a.M.CMa=[h.ho.ia,h.wr];a.M.DMa=[h.Object3D.ia,h.wr];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(g){this.A=g;this.enabled=!1;this.zo=null;this.Ux=0;this.passes=[];this.tm=this.vm=!1;this.Hf=null;this.Ga=this.Pa=100}var k=a("tdv/player/view/webgl/components"),p=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");m.prototype.dispose=function(){this.Hf&&(this.Hf.saoRenderTarget.dispose(),this.Hf.blurIntermediateRenderTarget.dispose(),
this.Hf.beautyRenderTarget.dispose(),this.Hf.normalRenderTarget.dispose(),this.Hf.depthRenderTarget.dispose(),this.Hf.depthMaterial.dispose(),this.Hf.normalMaterial.dispose(),this.Hf.saoMaterial.dispose(),this.Hf.vBlurMaterial.dispose(),this.Hf.hBlurMaterial.dispose(),this.Hf.materialCopy.dispose(),this.Hf.depthCopy.dispose(),this.Hf=null)};m.prototype.update=function(g,e,b,c,d){var f=this.A.getComponent(k.XJ),n=!!f;if(this.vm=this.enabled!=n)(this.enabled=n)?(!this.Hf&&g&&e&&(this.Hf=new THREE.SAOPass(g,
e,!1,!0)),this.zo=new p("linear",[new h("alpha",0,1,void 0)],f.gHa),this.Ux=0,this.passes=[this.Hf],this.tm=!0):(this.passes=[],this.tm=!1);this.enabled&&(this.zo&&(this.zo.Lb(d),this.Ux=this.zo.ib("alpha"),this.Ux==1&&(this.zo=null),this.A.T.Xa()),f.output!==null&&(this.Hf.params.output=f.output),this.Hf.params.saoBias=f.bias/f.scale,this.Hf.params.saoIntensity=this.Ux*f.intensity,this.Hf.params.saoScale=f.scale,this.Hf.params.saoKernelRadius=f.WJa,this.Hf.params.saoMinResolution=f.xKa/1E3,this.Hf.params.saoBlur=
f.Kka>0,this.Hf.params.saoBlurRadius=f.Kka,this.Hf.params.saoBlurStdDev=8,this.Hf.params.saoBlurDepthCutoff=.01,(this.Pa!=b||this.Ga!=c)&&this.Hf.setSize(this.Pa=b,this.Ga=c))};return m});
define("tdv/player/view/webgl/system/renderer/effect/Antialias",["require","tdv/player/view/webgl/components"],function(a){function m(p){this.A=p;this.enabled=!1;this.passes=[];this.tm=this.vm=!1;this.wu=null}var k=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.wu&&(this.wu.material.dispose(),this.wu=null)};m.prototype.update=function(p,h,g,e){p=this.A.getComponent(k.LE);p=!!p&&p.LHa;if(this.vm=this.enabled!=p)(this.enabled=p)?(this.wu||(this.wu=new THREE.ShaderPass(THREE.FXAAShader),
this.wu.needsSwap=!0),this.passes=[this.wu],this.tm=!0):(this.passes=[],this.tm=!1);!this.enabled||this.Pa==g&&this.Ga==e||(this.Pa=g,this.Ga=e,this.wu.material.uniforms.resolution.value.x=1/this.Pa,this.wu.material.uniforms.resolution.value.y=1/this.Ga,this.wu.setSize(g,e))};return m});
define("tdv/player/view/webgl/system/renderer/effect/MotionBlur",["require","tdv/player/view/webgl/components"],function(a){function m(p){this.A=p;this.enabled=!1;this.$O=void 0;this.zo=null;this.Ux=0;this.passes=[];this.tm=this.vm=!1;this.Mi=null;this.dha=new THREE.Matrix4;this.gha=new THREE.Matrix4;this.cha=new THREE.Vector3}var k=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.Mi&&(this.Mi.dispose(),this.Mi=null)};m.prototype.update=function(p,h){var g=this.A.getComponent(k.QP),
e=!!g,b=g?g.cNa:void 0;if(this.vm=this.enabled!=e||this.$O!=b)(this.enabled=e)?(this.$O!=b&&this.Mi&&(this.Mi.dispose(),this.Mi=null),!this.Mi&&p&&h&&(this.Mi=new THREE.MotionBlurPass(this.$O=b),this.Mi.needsSwap=!0,this.dha.copy(h.matrixWorldInverse),this.gha.copy(h.projectionMatrix),this.cha.copy(h.position)),this.passes=[this.Mi],this.tm=!0):(this.passes=[],this.tm=!1);this.enabled&&(this.Mi.uniforms.inverseProjectionMatrix.value.copy(h.projectionMatrix).invert(),this.Mi.uniforms.near.value=h.near,
this.Mi.uniforms.far.value=h.far,this.Mi.uniforms.depthLimit.value=.99,this.Mi.uniforms.clipToWorldMatrix.value.copy(h.matrixWorld).multiply(this.Mi.uniforms.inverseProjectionMatrix.value),this.Mi.uniforms.previousWorldToClipMatrix.value.copy(this.gha).multiply(this.dha),this.Mi.uniforms.cameraMove.value.copy(h.position).sub(this.cha),this.Mi.uniforms.velocityFactor.value=g.intensity);this.dha.copy(h.matrixWorldInverse);this.gha.copy(h.projectionMatrix);this.cha.copy(h.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(p){this.A=p;this.enabled=!0;this.passes=[];this.zna=this.tm=this.vm=!1;this.v3=void 0;this.Gi=this.Ds=this.Zl=null}a("tdv/player/view/util/Color");var k=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.Zl&&(this.Zl.dispose(),this.Zl=null);this.Ds&&(this.Ds=null);this.Gi&&(this.Gi.material.dispose(),this.Gi=null)};
m.prototype.update=function(p,h,g,e,b,c){b=this.A.getComponent(k.LE);c=!!b&&b.KOa&&c;if(this.vm=this.v3!==c)(this.v3=c)?(this.Zl||(this.Zl=new THREE.SSAARenderPass(p,h),this.Zl.sampleLevel=b.QX,this.Zl.needsSwap=!0,this.Zl.clear=!0,this.Zl.clearColor=65793,this.Zl.clearAlpha=0),this.Gi||(this.Gi=new THREE.ShaderPass(THREE.CopyShader),this.Gi.needsSwap=!0),this.passes=[this.Zl,this.Gi],this.zna=this.tm=!0):(this.Ds||(this.Ds=new THREE.RenderPass,this.Ds.clear=!0,this.Ds.clearColor=65793,this.Ds.clearAlpha=
0),this.passes=[this.Ds],this.zna=this.tm=!1);this.v3?(this.Zl.scene=p,this.Zl.camera=h,this.Zl.sampleLevel=b.QX,this.Gi.uniforms.opacity.value=Math.pow(2,Math.round(b.QX>5?5:b.QX)),this.Zl.setSize(g,e)):(this.Ds.scene=p,this.Ds.camera=h,this.Ds.setSize(g,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(g){this.A=g;this.enabled=!1;this.passes=[];this.tm=this.vm=!1;this.Vs=null;this.Ie=void 0}var k=a("tdv/player/view/util/Color"),p=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.Vs&&(this.Vs.material.dispose(),this.Vs=null)};m.prototype.update=function(){var g=this.A.getComponent(p.xK),e=!!g;if(this.vm=this.enabled!=
e)(this.enabled=e)?(this.Vs||(this.Vs=new THREE.ShaderPass(h),this.Vs.needsSwap=!0),this.passes=[this.Vs],this.tm=!0):(this.passes=[],this.tm=!1);this.enabled&&(this.Vs.uniforms.innerRadius.value=g.xJa,this.Vs.uniforms.outerRadius.value=g.VLa,this.Vs.uniforms.opacity.value=g.opacity,this.Ie!==g.color&&(this.Ie=g.color,this.Vs.uniforms.color.value=k.ar(this.Ie)))};var h={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.Cc=c;this.zb=this.yc=this.hg=null;this.Ga=this.Pa=void 0;
this.xT=null;this.qca=!0;this.Gi=this.Mu=this.m=null;this.p_=[new g(c),new k(c),new h(c),new e(c),new p(c)];this.X0=!1}var k=a("tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion"),p=a("tdv/player/view/webgl/system/renderer/effect/Antialias"),h=a("tdv/player/view/webgl/system/renderer/effect/MotionBlur"),g=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.m&&(this.m.domElement.style.backgroundColor=void 0);for(;this.p_.length;)this.p_.pop().dispose();this.uca();this.Mu&&(this.Mu.material.dispose(),this.Mu=null);this.Gi&&(this.Gi.material.dispose(),this.Gi=null)};m.prototype.setSize=function(c,d){if(this.Pa!=c||this.Ga!=d)this.Pa=c,this.Ga=d,this.hg&&this.hg.setSize(this.Pa,this.Ga),this.m&&!this.m.xr.isPresenting&&this.m.setSize(this.Pa,this.Ga)};m.prototype.Aw=function(c){this.zb=c};m.prototype.setCamera=function(c){this.yc=c};m.prototype.setRenderTarget=
function(c){this.xT!=c&&(this.xT=c,this.uca())};m.prototype.jgb=function(c){this.qca!=c&&(this.qca=c,this.hg&&(this.hg.renderToScreen=c))};m.prototype.u8=function(c){this.m!=c&&(this.m=c,this.m.setSize(this.Pa,this.Ga),this.uca())};m.prototype.render=function(c){this.C5a();this.B7a(c);this.m.domElement.style.backgroundColor=this.X0?"#000000":void 0;this.hg.renderTarget1.RJa=!0;this.hg.renderTarget2.RJa=!0;this.hg.render()};m.prototype.C5a=function(){this.hg||(this.hg=new THREE.EffectComposer(this.m,
this.xT||void 0),this.hg.renderToScreen=this.qca,this.hg.setSize(this.Pa,this.Ga))};m.prototype.B7a=function(c){var d=!1,f=!1;this.X0=!1;this.p_.forEach(function(l){l.update(this.zb,this.yc,this.Pa,this.Ga,c,this.hg.renderToScreen);d||(d=l.vm);f||(f=l.tm);this.X0||(this.X0=l.zna)}.bind(this));f=f&&this.m.outputColorSpace==THREE.SRGBColorSpace&&this.hg.renderToScreen;b.nhb(this.zb,f);f&&!this.Mu?(this.Mu=new THREE.ShaderPass(THREE.GammaCorrectionShader),d=this.Mu.needsSwap=!0):this.Mu&&(this.Mu.enabled=
f);this.hg.renderToScreen||this.Gi?this.Gi&&(this.Gi.enabled=!this.hg.renderToScreen):(this.Gi=new THREE.ShaderPass(THREE.CopyShader),d=this.Gi.needsSwap=!0);if(d){var n=[];this.p_.forEach(function(l){n=n.concat(l.passes)});this.Mu&&n.push(this.Mu);for(this.Gi&&n.push(this.Gi);this.hg.passes.length>0;)this.hg.removePass(this.hg.passes[this.hg.passes.length-1]);n.forEach(function(l){this.hg.addPass(l)}.bind(this))}};m.prototype.uca=function(){this.hg&&(this.hg.renderTarget1!=this.xT&&this.hg.renderTarget1.dispose(),
this.hg.renderTarget2!=this.xT&&this.hg.renderTarget2.dispose(),this.hg=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(n){this.$pa=this.$pa.bind(this);this.hd=n;this.opacity=0;this.height=this.width=void 0;this.renderTarget=null;this.scene=void 0;this.SBa=!1;this.Pha=!0;this.jX=this.camera=
void 0;this.EH=!1;this.O1=void 0;this.Pc=new b(n);this.update()}var k=a("tdv/constants/EventName"),p=a("tdv/player/view/util/XR"),h=a("tdv/player/view/webgl/components"),g=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 n=this.hd.getComponent(h.Scene);this.opacity=n&&n.opacity||0;this.SBa=n?n.locked:!1;this.Pha=n?n.enabled:!0;var l=n&&n.scene;this.scene!=
l&&(this.scene=l,this.EH=!0,this.Pc.Aw(this.scene));var q=(l=n&&n.Oa)&&g.NV(l),r=q&&q.width;q=q&&q.height;if(this.width!=r||this.height!=q)this.width=r,this.height=q,this.EH=!0,this.Pc.setSize(this.width,this.height);n=n&&n.outputColorSpace=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.O1!=n&&(this.O1=n,this.EH=!0,g.mhb(this.scene,n));n=l&&g.jt(l);this.camera!=n&&(this.camera=n,this.EH=!0,this.Pc.setCamera(this.camera));l=l&&g.NV(l).camera;this.jX!=l&&(this.jX=l);this.scene&&(g.lhb(this.scene,
this.camera),g.ohb(this.scene,p.isPresenting?2048:this.width,p.isPresenting?2048:this.height));return this};m.prototype.render=function(n,l,q){if((l||this.EH||!this.SBa)&&this.Pha){this.renderTarget||(this.renderTarget=e.bla(n));l?(n.xr.isPresenting||n.setRenderTarget(null),this.EH=!0):(n.setRenderTarget(this.renderTarget),this.renderTarget.texture.colorSpace=this.O1,this.EH=!1);n.outputColorSpace=this.O1;var r=this.hd.getComponent(h.Scene),t=e.OHa(n.domElement);r&&r.L7!==1&&(t*=r.L7);n.getPixelRatio()!=
t&&n.setPixelRatio(t);this.Qcb(n);n.xr.isPresenting?n.render(this.scene,this.jX):(this.Pc.setRenderTarget(this.renderTarget),this.Pc.jgb(l),this.Pc.u8(n),this.Pc.render(q));this.Pfb(n);(r=this.hd.getComponent(h.Scene))&&r.O&&r.O.o(k.me)}};m.prototype.Qcb=function(n){var l=[],q=[];this.scene.traverse(function(r){r.dw||r.isGaussianCloud?l.push(r):r.visible&&r.material&&r.material.transparent&&r.material.depthTest&&r.renderOrder<=0&&r.renderOrder>=-100&&r.material.opacity>0&&q.push(r)});c.camera=this.jX;
c.ray.origin.setFromMatrixPosition(this.jX.matrixWorld);c.firstHitOnly=!0;q.forEach(function(r){f.setFromMatrixPosition(r.matrixWorld).sub(c.ray.origin);c.ray.direction.copy(f).normalize();var t=f.length();c.far=t;d.length=0;d=c.intersectObjects(l,!1,d);d.length>0&&d[0].distance<t&&(r.visible=!1,r.userData.xPa=!0)});this.Khb(n)};m.prototype.Pfb=function(n){this.Aib(n);this.scene.traverse(function(l){l.userData.xPa&&(l.visible=!0,delete l.userData.xPa)})};m.prototype.Khb=function(n){n.setTransparentSort(this.$pa)};
m.prototype.Aib=function(n){n.setTransparentSort(null)};m.prototype.$pa=function(n,l){return n.pma!==l.pma?n.pma-l.pma:n.renderOrder!==l.renderOrder?n.renderOrder-l.renderOrder:n.object.dw||l.object.dw?(n.object.dw?-1:1)-(l.object.dw?-1:1):n.z!==l.z?l.z-n.z:n.id-l.id};var c=new THREE.Raycaster,d=[],f=new THREE.Vector3;m.prototype.isVisible=function(){return this.scene&&this.camera&&this.opacity>0&&this.Pha};m.prototype.dispose=function(){this.camera=this.scene=this.hd=null;this.Pc&&(this.Pc.dispose(),
this.Pc=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.A=e;this.$y=[];this.Cj=null;this.x5a();this.v5a()}var k=a("tdv/constants/EventName"),p=a("tdv/player/view/util/XR"),h=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/renderer/SceneRenderer");m.prototype.frame=function(e){var b=!!this.m&&
p.Dg==this.m;if(!p.isPresenting||b){var c=this.A.getComponent(h.gj).kX.map(function(n){for(var l=0;l<this.$y.length;l++)if(this.$y[l].hd==n)return this.$y[l].update();return new g(n)}.bind(this));this.$y.filter(function(n){return c.indexOf(n)<0}).forEach(function(n){n.dispose()});this.$y=c;var d=this.$y.filter(function(n){return n.isVisible()});if(d.length>0){b&&d.reduce(function(n,l){return n.opacity>l.opacity?n:l});var f=d.length==1&&d[0].opacity>=1||b;d.forEach(function(n){n.render(this.m,f,e)}.bind(this));
f||this.w3a(d.slice(0,2))}b&&this.A.T.Xa()}};m.prototype.w3a=function(e){this.vo.material.uniforms.t1.value=e[0].renderTarget.texture;this.vo.material.uniforms.o1.value=e[0].opacity;e.length>1?(this.vo.material.uniforms.useT2.value=1,this.vo.material.uniforms.t2.value=e[1].renderTarget.texture,this.vo.material.uniforms.o2.value=e[1].opacity):this.vo.material.uniforms.useT2.value=0;this.m.setSize(e[0].width,e[0].height);this.m.setRenderTarget(null);this.m.setClearColor(0,0);this.m.clear();this.m.render(this.kQ,
this.gba)};m.prototype.dispose=function(){for(;this.$y.length;)this.$y.shift().dispose();this.$y=null;this.u6a();this.w6a()};m.prototype.x5a=function(){var e=this.A.N(h.gj);this.Cj=e.lb.Sc();this.Cj.D4();e.renderer=this.Cj.Dn();this.m=e.renderer;p.O.bind(k.V,this.fFa,this,!0)};m.prototype.w6a=function(){p.O.h(k.V,this.fFa,this);this.m=null;this.Cj.Y7();this.Cj=null};m.prototype.fFa=function(){this.A.T.Xa()};m.prototype.v5a=function(){this.kQ=new THREE.Scene;this.gba=new THREE.OrthographicCamera(window.innerWidth/
-2,window.innerWidth/2,window.innerHeight/2,window.innerHeight/-2,-10,10);this.kQ.add(this.gba);this.vo=new THREE.Mesh(new THREE.PlaneGeometry(window.innerWidth,window.innerHeight),this.fWa());this.kQ.add(this.vo)};m.prototype.u6a=function(){this.kQ.remove(this.vo);this.vo.geometry.dispose();this.vo.geometry=null;this.vo.material.dispose();this.kQ=this.gba=this.vo=this.vo.material=null};m.prototype.fWa=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.Ya=function(e){e.L(h.pu).manager=new m(e)};m.Ba=function(e){var b=e.getComponent(h.pu);b.manager.dispose();b.manager=null;e.ka(h.pu)};m.update=function(e){e.getComponent(h.pu).manager.update()};m.frame=function(e,b,c){e.getComponent(h.pu).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/renderer/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(g,e){this.VMa.v.length&&this.VMa.v.slice().forEach(h.Ya);this.Pn.v.length&&
this.Pn.v.slice().forEach(function(b){h.frame(b,g,e)});this.WMa.v.length&&this.WMa.v.slice().forEach(h.Ba)};a.M={};a.M.VMa=[p.gj,p.pu.ia];a.M.WMa=[p.gj.ia,p.pu];a.M.Pn=[p.gj,p.pu];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".split(" "),function(a){var m=a("tdv/utils"),k=a("tdv/constants/EventName"),p=a("tdv/constants/RenderOrder"),h=a("tdv/events/EventDispatcher"),g=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");a=m.extend(h,function(f,n){h.call(this);this.le=f;this.zb=n;this.Ia=new g;this.Ia.gP([this.le]);this.Ia.bind(k.ha,this.Ke,this,!1);this.Ia.bind(k.$c,this.oh,this,!1);this.md=null;this.$e=0;c.Zz(this.Ia,b.kF)});a.prototype.Sn=function(f){this.$e!==f&&(this.$e=f,this.md&&(this.md.material.opacity=this.$e,this.md.material.visible=this.$e>0,this.md.material.needsUpdate=!0))};a.prototype.aj=function(){return!!this.md};a.prototype.Ke=
function(){this.SWa();this.o(k.ha)};a.prototype.oh=function(){this.o(k.$c)};a.prototype.SWa=function(){var f=new THREE.Texture;f.image=c.qg(this.le);f.generateMipmaps=!0;f.minFilter=THREE.LinearMipMapLinearFilter;f.needsUpdate=!0;f=new THREE.SpriteMaterial({map:f});f.sizeAttenuation=!1;f.transparent=!0;f.visible=this.$e>0;f.opacity=this.$e;f.polygonOffset=!0;f.polygonOffsetUnits=1;f.polygonOffsetFactor=-10;this.md=new THREE.Sprite(f);this.md.renderOrder=p.CQa};a.prototype.update=function(){if(this.md){var f=
e.Zv(this.zb);this.md.parent!=f&&(this.md.parent&&e.MMa(this.md.parent,this.md),f&&e.S8a(f,this.md));if(f){var n=e.BD(this.zb),l=this.md.material.map.image.width,q=this.md.material.map.image.height;f=n/(2*Math.tan(f.fov*d/2));n=Math.max(n/f,e.WV(this.zb)/(f*l/q));this.md.scale.y!=n&&(this.md.scale.y=n,this.md.scale.x=n*l/q)}l=e.VV(this.zb);this.md.material.map.colorSpace!=l&&(this.md.material.map.colorSpace=l,this.md.material.needsUpdate=!0)}};a.prototype.dispose=function(){this.md&&(this.md.parent&&
e.MMa(this.md.parent,this.md),this.md.material.map.dispose(),this.md.material.dispose(),this.md=null);this.Ia&&c.Zn(this.Ia,b.kF)};var d=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.A=b;this.Ih=c;this.Ax=void 0;this.uj=this.so=this.ja=this.zb=null;this.update()}var k=a("tdv/constants/EventName"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/scene/BackgroundSprite"),g=a("tdv/view/util/Ease"),
e=a("tdv/view/util/EaseDimension");m.prototype.frame=function(b){this.ja&&this.XH(b);this.so&&this.so.update();this.uj&&this.uj.update()};m.prototype.update=function(){var b=this.A.getComponent(p.Scene);this.zb=b.scene;if(!this.zb){if(!b.scene)return;this.zb=b.scene}b=b.Eka||null;this.Ax===b||this.ja||(this.LQ(this.uj),this.uj=null,(this.Ax=b)?this.uj=this.eWa(this.Ax):(this.EQ(),this.Ih.o(k.ha)))};m.prototype.XH=function(b){this.ja.Lb(b);this.so&&this.so.Sn(Math.min(1,Math.max(0,this.ja.ib("alpha"))));
this.uj&&this.uj.Sn(Math.min(1,Math.max(0,this.ja.ib("nextAlpha"))));this.ja.Qe()&&(this.ja=null,this.so&&(this.LQ(this.so),this.so=null),this.so=this.uj,this.uj=null,this.update());this.A.T.Xa()};m.prototype.nga=function(){this.uj.h(k.ha,this.nga,this,!0);this.uj.h(k.$c,this.oga,this,!0);this.EQ();this.Ih.o(k.ha)};m.prototype.oga=function(){this.LQ(this.uj);this.uj=null;this.EQ();this.Ih.o(k.ha)};m.prototype.EQ=function(){this.uj&&this.so?this.ja=new g("linear",[new e("nextAlpha",0,2,void 0),new e("alpha",
2,0,void 0)],600):this.uj?this.ja=new g("linear",[new e("nextAlpha",0,1,void 0)],300):this.so&&(this.ja=new g("linear",[new e("alpha",1,0,void 0)],300));this.A.T.Xa()};m.prototype.eWa=function(b){b=new h(b,this.zb);this.JUa(b);b.Sn(0);return b};m.prototype.LQ=function(b){b&&(this.e7a(b),b.dispose())};m.prototype.JUa=function(b){b.bind(k.ha,this.nga,this,!0);b.bind(k.$c,this.oga,this,!0)};m.prototype.e7a=function(b){b.h(k.ha,this.nga,this,!0);b.h(k.$c,this.oga,this,!0)};m.prototype.dispose=function(){this.so&&
(this.LQ(this.so),this.so=null);this.uj&&(this.LQ(this.uj),this.uj=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,n){this.A=f;this.nG=void 0;this.Wca=1;this.T2=this.LM=this.KM=this.wB=this.KF=this.Ax=void 0;this.yc=this.m=this.zb=null;this.Ih=n;this.mf=new g(this.Ih);this.Sd=
[new c(p.kF),new c(p.kF)];this.Sd.forEach(function(l){l.bind(k.ha,this.Ke,this,!0);l.bind(k.$c,this.oh,this,!0)}.bind(this));this.ICa([]);this.update()}var k=a("tdv/constants/EventName"),p=a("tdv/constants/Priority"),h=a("tdv/player/view/util/Color"),g=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.zb){var f=m.Tbb(this.A.T,
this.zb);this.m!=f&&(this.m&&(this.Nx(),this.h_()),this.m=f)&&(this.ya(),this.Bja())}};m.prototype.update=function(){var f=this.A.getComponent(e.Scene),n=!1,l=!1,q=f.pHa||null;this.nG!==q&&(this.nG=q,l=!0);q=f.Eka||null;this.Ax!==q&&(this.Ax=q,l=!0);q=f.KFa||null;this.KF!==q&&(this.KF=q,l=!0);l&&(this.KEa(),this.Bja(),n=!0);this.wB!==f.backgroundColor&&(this.wB=f.backgroundColor,n=!0);this.zb!==f.scene&&(this.zb=f.scene,n=!0);this.Wca!==f.environmentIntensity&&(this.Wca=f.environmentIntensity,n=!0);
n&&this.ya()};m.prototype.KEa=function(){this.ICa(this.ZZa())};m.prototype.ZZa=function(){var f=[];this.nG&&f.indexOf(this.nG)==-1&&f.push(this.nG);!this.Ax&&this.KF&&f.indexOf(this.KF)==-1&&f.push(this.KF);if(this.zb&&this.zb.background&&this.zb.background.image&&this.zb.background.image.src){var n=this.zb.background.image.src;f.indexOf(n)==-1&&f.push(n)}return f};m.prototype.ICa=function(f){var n=[],l=[];this.Sd.forEach(function(q){var r=q.hl();f.indexOf(r)<0?(q.cancel(),n.push(q)):l.push(r)});
f.forEach(function(q){l.indexOf(q)<0&&n.shift().load(q)})};m.prototype.Bja=function(){var f=0;this.mf.jGa();this.Sd.forEach(function(n){n.hl()&&!n.aj()&&(this.mf.xN(n),f++)}.bind(this));f==0&&this.Ih&&this.Ih.o(k.ha)};m.prototype.dispose=function(){this.Sd.forEach(function(f){f.cancel();f.h(k.ha,this.Ke,this,!0);f.h(k.$c,this.oh,this,!0)}.bind(this));this.A&&(this.h_(),this.Nx(),this.A=null)};m.prototype.Ke=function(){this.ya();this.Bja()};m.prototype.ya=function(){if(this.zb&&this.m){this.zb.environmentIntensity=
this.Wca;if(this.nG){var f=this.twa(this.nG);f&&this.fUa(f)}else this.h_();this.Ax?this.Nx():this.KF?(f=this.twa(this.KF))&&this.tta(f):this.wB?this.tta(void 0,this.wB):this.Nx();this.KEa();this.A.T.Xa()}};m.prototype.twa=function(f){for(var n=0;n<this.Sd.length;n++)if(this.Sd[n].aj()&&this.Sd[n].hl()==f)return this.Sd[n];return null};m.prototype.tta=function(f,n){if(this.zb){if(f){var l=f&&f.hl()||void 0;if(l==this.LM)return;this.Nx();b.w8(this.zb,this.Or(f,!1));this.LM=l;this.KM=void 0}n&&n!=this.KM&&
(this.Nx(),b.w8(this.zb,n=="transparent"?null:h.ar(n)),this.KM=n,this.LM=void 0)}};m.prototype.Nx=function(){this.zb&&(this.KM||this.LM)&&(this.LM&&(this.zb.background.dispose(),b.w8(this.zb,null),this.LM=void 0),this.KM&&(b.w8(this.zb,null),this.KM=void 0))};m.prototype.fUa=function(f){if(this.zb){var n=f&&f.hl()||void 0;n!=this.T2&&(this.h_(),this.zb.environment=this.Or(f,d.isPresenting?!1:!0),this.T2=n)}};m.prototype.h_=function(){this.zb&&this.T2&&(this.zb.environment.dispose(),this.zb.environment=
null,this.T2=void 0)};m.prototype.Or=function(f,n){return Math.round(f.Zf()/f.pg())<6?this.uWa(f,n):this.oWa(f,n)};m.prototype.uWa=function(f,n){var l=new THREE.Texture;l.image=f.qg();l.colorSpace=b.VV(this.zb);l.mapping=THREE.EquirectangularReflectionMapping;l.needsUpdate=!0;return n?(this.m.zn=!0,f=new THREE.PMREMGenerator(this.m),l=f.fromEquirectangular(l).texture,f.dispose(),this.m.zn=!1,l):l};m.prototype.oWa=function(f,n){for(var l=Array(6),q=f.Zf()/6,r=f.pg(),t=0;t<6;t++){var u=document.createElement("canvas");
u.width=q;u.height=r;u.getContext("2d").drawImage(f.qg(),t*q,0,q,r,0,0,q,r);l[t]=u}f=new THREE.CubeTexture;f.images=[l[1],l[3],l[4],l[5],l[0],l[2]];f.colorSpace=b.VV(this.zb);f.needsUpdate=!0;return n?(this.m.zn=!0,n=new THREE.PMREMGenerator(this.m),l=n.fromCubemap(f).texture,n.dispose(),this.m.zn=!1,l):f};m.prototype.oh=function(){this.A.getComponent(e.Scene).scene.environment=null;this.A.T.Xa()};m.CBa=new Map;m.hpa=function(f,n){m.CBa.set(f,n||[])};m.Tbb=function(f,n){f=m.CBa.get(f)||[];for(var l=
0;l<f.length;l++){var q=f[l].getComponent(e.gj);if(q&&q.kX.filter(function(r){return r.getComponent(e.Scene).scene==n}).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,k,p,h,g,e,b){a=function(){function d(f){this.opacity=this.ZN=void 0;this.F=f}d.prototype.frame=function(){var f=this.F.getComponent(g.Scene),n=f.scene,l=n&&e.Zv(n),q=f.ZN;f=f.CV;!h.isPresenting&&l&&q&&f>0?(this.R$a(),this.Ijb(n,l),this.Hjb(q,
f)):(this.opacity=this.ZN=void 0,this.nGa())};d.prototype.update=function(){};d.prototype.Ijb=function(f,n){this.ti.parent!=n&&n.add(this.ti);var l=e.WV(f);f=e.BD(f);n.isPerspectiveCamera?(this.ti.position.z=-n.near*1.01,n=f/(2*Math.tan(n.fov*c/2)),n=Math.max(f/n,l/(n*l/f)),this.ti.scale.y=n,this.ti.scale.x=n*l/f):n.isOrthographicCamera&&(this.ti.position.z=-(n.near+1),this.ti.scale.y=n.top-n.bottom,this.ti.scale.x=n.right-n.left)};d.prototype.Hjb=function(f,n){this.ZN!==f&&this.opacity!==n&&(this.ti.material.color=
p.ar(f),this.ti.material.opacity=n,this.ti.material.needsUpdate=!0)};d.prototype.R$a=function(){if(!this.ti){var f=new b.SpriteMaterial;f.depthTest=!1;f.renderOrder=k.Zqa;f.sizeAttenuation=!1;f.transparent=!0;f.visible=!0;f.opacity=0;f.needsUpdate=!0;this.ti=new b.Sprite(f);this.ti.renderOrder=k.Zqa}};d.prototype.nGa=function(){var f,n,l;if(this.ti){var q=this.ti.material;(f=q.map)===null||f===void 0||f.dispose();(n=q.envMap)===null||n===void 0||n.dispose();q.dispose();this.ti.geometry.dispose();
(l=this.ti.parent)===null||l===void 0||l.remove(this.ti)}};d.prototype.dispose=function(){this.nGa()};return d}();var c=Math.PI/180;return a});
define("tdv/player/view/webgl/system/scene/Fog",["require","exports","tdv/player/view/util/Color","tdv/player/view/webgl/components","three.mod"],function(a,m,k,p,h){return function(){function g(e){this.F=e}g.prototype.update=function(){var e=this.F.getComponent(p.Scene),b=e.scene,c=e.HHa;e=k.ar(e.GHa||"#ffffff");c>0?b.fog==null?b.fog=new h.FogExp2(e,c):(b.fog.color=e,b.fog.density=c):b.fog=null};g.prototype.dispose=function(){var e=this.F.getComponent(p.Scene);e&&e.scene&&(e.scene.fog=null)};return g}()});
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.A=c;this.Ih=null;var d=this.A.N(k.Scene),f=this.A.N(k.Hp);this.A.L(k.Object3D).ta=f.scene=d.scene=new THREE.Scene;this.mf=new p;this.TQ=new g(c,this.mf.Mv());
this.Zd=new h(c,this.mf.Mv());this.v_=new b(c);this.Dva=new e(c)}var k=a("tdv/player/view/webgl/components"),p=a("tdv/player/view/util/LoadingGroup"),h=a("tdv/player/view/webgl/system/scene/Background"),g=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.TQ.frame(c);this.Zd.frame(c)};m.prototype.Fla=function(c){this.Dva.frame(c)};m.prototype.update=function(){this.TQ.update();
this.Zd.update();this.v_.update();this.Dva.update();this.K7a()};m.prototype.K7a=function(){var c=this.A.getComponent(k.Scene);this.Ih!=c.Bla&&(this.Ih=c.Bla,this.mf.pgb(this.Ih))};m.prototype.dispose=function(){this.mf&&(this.mf.dispose(),this.mf=null);this.Zd&&(this.Zd.dispose(),this.Zd=null);this.TQ&&(this.TQ.dispose(),this.TQ=null);this.v_&&(this.v_.dispose(),this.v_=null);this.A&&(this.A=null)};m.Ya=function(c){c.L(k.Hp).manager=new m(c)};m.Ba=function(c){var d=c.getComponent(k.Hp);d.manager.dispose();
d.manager=null;c.ka(k.Hp);c.ka(k.Object3D)};m.frame=function(c,d){c.getComponent(k.Hp).manager.frame(d)};m.Fla=function(c,d){(c=c.getComponent(k.Hp))&&c.manager&&c&&c.manager.Fla(d)};m.update=function(c){c.getComponent(k.Hp).manager.update()};m.hpa=function(c,d){g.hpa(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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/scene/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(g){this.dNa.v.length&&this.dNa.v.slice().forEach(h.Ya);this.scenes.Ca.length&&
this.scenes.Ca.slice().forEach(h.update);this.scenes.v.length&&this.scenes.v.slice().forEach(function(e){h.frame(e,g)});h.hpa(this.T,this.Pn.v.slice());this.eNa.v.length&&this.eNa.v.slice().forEach(h.Ba)};a.M={};a.M.dNa=[p.Scene,p.Hp.ia];a.M.scenes=[p.Scene,p.Hp];a.M.eNa=[p.Scene.ia,p.Hp];a.M.Pn=[p.gj,p.pu];a.KY=m.extend(k,function(){k.apply(this,arguments)});a.KY.prototype.cd=function(g){this.scenes.v.length&&this.scenes.v.slice().forEach(function(e){h.Fla(e,g)})};a.KY.M={};a.KY.M.scenes=[p.Scene,
p.Hp];return a});
define("tdv/player/view/util/ColorPicker",["require","tdv/player/view/util/Device"],function(a){function m(b){this.Xg=b;b.tagName=="CANVAS"?(this.ea=b,this.Vc=1):(this.ea=document.createElement("canvas"),this.Vc=h.Od()==h.fj?.5:1,this.ea.width=Math.round(b.width*this.Vc),this.ea.height=Math.round(b.height*this.Vc));this.Da=this.ea.getContext("2d");this.Da.globalCompositeOperation="copy";this.ea!=b&&this.Da.drawImage(b,0,0,b.width,b.height,0,0,this.ea.width,this.ea.height)}function k(b,c,d){b<0?b=
d==THREE.RepeatWrapping?c+b%c:d==THREE.MirroredRepeatWrapping?Math.floor(Math.abs(b/c))%2==0?Math.abs(b%c):c-1+b%c:0:b>=c&&(b=d==THREE.RepeatWrapping?b%c:d==THREE.MirroredRepeatWrapping?Math.floor(b/c)%2==1?c-1-b%c:b%c:c-1);return b}function p(b,c,d){try{if(b instanceof CanvasRenderingContext2D)return b.getImageData(c,d,1,1).data;if(b.tagName&&b.tagName=="CANVAS")return b.X_a?[0,0,0,0]:b.getContext("2d").getImageData(c,d,1,1).data;g.drawImage(b,c,d,1,1,0,0,1,1);return g.getImageData(0,0,1,1).data}catch(f){return[0,
0,0,0]}}var h=a("tdv/player/view/util/Device");m.prototype.transparent=function(b,c){return m.transparent(this.Da,Math.round(b*this.Vc),Math.round(c*this.Vc))};m.prototype.DA=function(b,c){return m.DA(this.Da,Math.round(b*this.Vc),Math.round(c*this.Vc))};m.prototype.info=function(b,c){return m.info(this.Da,Math.round(b*this.Vc),Math.round(c*this.Vc))};m.prototype.dispose=function(){this.ea!=this.Xg&&(this.ea.width=this.ea.height=0);this.Xg=this.ea=this.Da=null};m.Iib=function(b,c,d){if(!b.image||
!b.image.width||!b.image.height)return!0;c=k(Math.round(c*b.image.width),b.image.width,b.wrapS);d=k(Math.round((1-d)*b.image.height),b.image.height,b.wrapT);return!m.transparent(b.image,c,d)};m.transparent=function(b,c,d){return!m.DA(b,c,d)};m.DA=function(b,c,d){return!b.tagName||b.tagName&&b.tagName=="VIDEO"?!0:p(b,c,d)[3]>0};m.info=function(b,c,d){b=p(b,c,d);c=b[3];return{DA:c>0,opacity:c,color:"#"+e[b[0]]+e[b[1]]+e[b[2]]}};a=document.createElement("canvas");a.width=a.height=1;var g=a.getContext("2d");
g.globalCompositeOperation="copy";var e=function(){for(var b=Array(256),c=0;c<16;c++)b[c]="0"+c.toString(16);for(;c<256;c++)b[c]=c.toString(16);return b}();return m});
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(B){this.rh=B;this.MM=this.Wx=this.Je=this.Bo=null;this.kS=void 0;this.gy=!1;this.update()}function k(B,C,I,F){this.F=B;this.ta=C;this.point=I;this.normal=F}function p(B){return{x:B.x,y:B.y,z:B.z}}
function h(B,C,I,F){var G=C.T,N=B.get(G);N||B.set(G,N=[]);B=N.indexOf(C);I&&B<0?N.push(C):!I&&B>=0&&N.splice(B,1);F.delete(G)}var g=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 B=this.rh.getComponent(b.xc);B.Ct=this;this.LT(B&&B.enabled?B.tD:null);this.KT(B&&B.enabled?
B.g5:null)};m.prototype.frame=function(){this.IVa();var B=this.rh.getComponent(b.xc);B&&B.Wka?this.kAa():this.Qha(q)};m.prototype.LT=function(B){if(this.Bo!=B){if(this.Bo)for(var C in u)this.Bo.h(C,this.Ae,this);if(this.Bo=B)for(C in u)this.Bo.bind(C,this.Ae,this,!0)}};m.prototype.Ae=function(B){var C=this.rh.getComponent(b.xc);C&&C.enabled&&(C=u[B.name])&&C.call(this,B)};m.prototype.KT=function(B){this.Je!=B&&(this.Je&&this.gy&&this.Je.pop(f.hf),(this.Je=B)&&this.gy&&this.Je.push(f.hf))};m.prototype.lg=
function(B){this.tq(B);this.HL&&v.indexOf(this.rh.T)==-1&&w.indexOf(this.rh.T)==-1?this.Qha(q):this.Qha(l)};m.prototype.Dy=function(B){this.tq(B);(B=this.uda())&&this.X3(g.oa,B)};m.prototype.fM=function(B){this.tq(B);(B=this.uda())&&this.X3(g.Ik,B)};m.prototype.Zp=function(B){this.HL=!0;this.tq(B);if(B=this.uda())this.Vca=B.F,this.Yca=B.F.getComponent(b.ud).O,this.X3(g.Ra,B)};m.prototype.Ey=function(B){this.HL=!1;this.tq(B);if(this.Vca)var C=(C=this.Vca.getComponent(b.ud))&&C.O;!C&&this.Yca&&(C=this.Yca);
this.Yca=this.Vca=null;C&&(B=this.Vva(),C.o(g.bb,B),C=this.rh.getComponent(b.xc),C.O&&C.O.o(g.bb,B))};m.prototype.tq=function(B){this.xd=B.x;this.yd=B.y;this.TL=B.pageX;this.UL=B.pageY};m.prototype.Qha=function(B){var C=(new Date).getTime()+B;this.kS&&C>=this.kS||(this.kS=C,clearTimeout(this.MM),this.MM=setTimeout(function(){this.MM=null;this.kS=void 0;this.kAa()}.bind(this),B))};m.prototype.kAa=function(){var B=this.LZa();this.mCa(B&&B.F);B&&this.X3(g.mb,B)};m.prototype.aoa=function(B,C,I){var F=
this.xd,G=this.yd,N=this.TL,O=this.UL;this.UL=this.TL=this.yd=this.xd=void 0;B=this.Fda(B,[]);C=this.yda(B,C,I);var R;C&&(R=this.Kwa(C));this.xd=F;this.yd=G;this.TL=N;this.UL=O;return R};m.prototype.LZa=function(){var B=this.rh.getComponent(b.xc);if(!B)return null;var C=this.KZa();return this.yda(C,B.origin,B.direction)||null};m.prototype.uda=function(){var B=this.rh.getComponent(b.xc);if(!B)return null;var C=this.IYa();return this.yda(C,B.origin,B.direction)||null};m.prototype.mCa=function(B){if(this.Wx!=
B){if(this.Wx!=null!=(B!=null)){var C=this.rh.getComponent(b.xc);C&&C.O&&C.O.o(B?g.rc:g.Db)}this.Wx&&this.MDa(this.Wx,g.Db);(this.Wx=B)&&this.MDa(this.Wx,g.rc);B=this.Wx&&this.Wx.getComponent(b.ud);B=!!B&&B.JA;this.gy!=B&&(this.gy=B,this.Je&&(this.gy?this.Je.push(f.hf):this.Je.pop(f.hf)))}};m.prototype.yda=function(B,C,I){var F=Array.from(B.keys());C=this.I_a(F,C,I);for(I=0;I<C.length;I++){F=C[I];var G=F.point,N=F.object,O=F.face&&F.face.normal,R=B.get(N),S=R&&R.getComponent(b.ud);if(S){var K=Array.isArray(N.material)&&
F.face?N.material[F.face.materialIndex]:N.material;if(!K||K.visible)if(S.CE||!K||!K.map||e.Iib(K.map,F.uv.x,F.uv.y))return N.isSkinnedMesh&&(N=this.bYa(N.skeleton.bones,G)),new k(R,N,G,O)}}return null};m.prototype.IYa=function(){var B=this.rh.T,C=D.get(B);if(!C){C=y.get(B);var I=z.get(B);C=this.Fda(C,I);D.set(B,C)}return C};m.prototype.KZa=function(){var B=this.rh.T,C=E.get(B);if(!C){C=x.get(B);var I=A.get(B);C=this.Fda(C,I);E.set(B,C)}return C};m.prototype.Fda=function(B,C){var I=(C&&C.map(function(N){return c.Rc(N)}).filter(function(N){return!!N})||
[]).slice(),F=new Map;B&&B.forEach(function(N){var O=c.Rc(N);O&&I.indexOf(O)==-1&&(I.push(O),F.set(N,O))});var G=new Map;F.forEach(function(N,O){for(var R=[N];R.length;){var S=R.shift();if(S==N||I.indexOf(S)==-1)G.set(S,O),S.children&&(R=R.concat(S.children))}});return G};m.prototype.I_a=function(B,C,I){t.camera=this.Yva();var F=c.Rc(this.rh);F=F&&F.matrixWorld;F||(F=(F=this.rh.getComponent(b.xc))&&F.matrixWorld);F?(t.ray.origin.copy(C).applyMatrix4(F),t.ray.direction.copy(C).add(I).applyMatrix4(F).sub(t.ray.origin).normalize()):
(t.ray.origin.copy(C),t.ray.direction.copy(I).normalize());return d.intersect(t,B)};m.prototype.X3=function(B,C){var I=this.Kwa(C);C=C.F.getComponent(b.ud);I.fW=C&&C.O.fW(B)||!1;C.O&&C.O.o(B,I);C=this.rh.getComponent(b.xc);C.O&&C.O.o(B,I)};m.prototype.Vva=function(){var B={};this.xd!==void 0&&this.yd!==void 0&&(B.x=this.xd,B.y=this.yd);this.TL!==void 0&&this.UL!==void 0&&(B.pageX=this.TL,B.pageY=this.UL);return B};m.prototype.Kwa=function(B){var C=this.Vva(),I=B.ta,F=B.point;B=B.normal;C.position=
p(F);var G=this.Yva();C.cameraPosition=p(G?r.setFromMatrixPosition(G.matrixWorld):r.set(0,0,0));G=I;for(var N=C;;){N.object=G.userData.id;N.name=G.name;N.type=G.isMesh?"mesh":G.isBone?"bone":G.dw||G.isGaussianCloud?"gs":"other";N.localPosition=p(G.worldToLocal(r.copy(F)));r.setFromMatrixScale(G.matrixWorld);N.localScale=Math.max(r.x,r.y,r.z);N.objectMatrixWorld=I.matrixWorld.toArray();B&&(N.normal=p(n(I,B,G,r)));if(!G.parent||!G.parent.userData.id)break;G=G.parent;N=N.parent={}}return C};var n=function(){var B=
new THREE.Vector3,C=new THREE.Matrix4;return function(I,F,G,N){N.copy(F);if(I==G)return N;N.applyMatrix4(I.matrixWorld);N.sub(B.setFromMatrixPosition(I.matrixWorld));N.add(B.setFromMatrixPosition(G.matrixWorld));N.applyMatrix4(C.copy(G.matrixWorld).invert()).normalize();return N}}();m.prototype.Yva=function(){if(this.x_.camera)return this.x_.camera;var B=this.rh.getComponent(b.xc);B=B&&B.Oa;this.x_.camera=B&&c.jt(B);return this.x_.camera};m.prototype.IVa=function(){this.x_={}};m.prototype.MDa=function(B,
C){(B=(B=B.getComponent(b.ud))&&B.O)&&B.o(C)};m.prototype.bYa=function(B,C){var I=null,F=Infinity;for(B=B.slice();B.length;){var G=B.shift(),N=C.distanceTo(G.getWorldPosition(r));N<F&&(I=G,F=N);B.unshift.apply(B,G.children)}return I};m.prototype.dispose=function(){this.MM&&(clearTimeout(this.MM),this.MM=null,this.kS=void 0);this.LT(null);this.KT(null);this.mCa(null)};var l=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[g.mb]=m.prototype.lg;u[g.oa]=m.prototype.Dy;u[g.Ik]=m.prototype.fM;u[g.Ra]=m.prototype.Zp;u[g.bb]=m.prototype.Ey;m.upa=function(B){B.L(b.gx).manager=new m(B)};m.Ppa=function(B){var C=B.getComponent(b.gx);C.manager.dispose();C.manager=null;B.ka(b.gx)};m.frame=function(B){B.getComponent(b.gx).manager.frame()};m.Yt=function(B){B.getComponent(b.gx).manager.update()};m.Jhb=function(B){B.L(b.rF);m.$Pa(B)};
m.$Pa=function(B){var C=c.Rc(B),I=B.getComponent(b.ud);h(y,B,C&&I.$s,D);h(x,B,C&&I.It,E)};m.bPa=function(B){h(y,B,!1,D);h(x,B,!1,E);B.ka(b.rF)};m.Ihb=function(B){B.L(b.nF);m.VPa(B)};m.VPa=function(B){var C=c.Rc(B),I=B.getComponent(b.vr);h(z,B,C&&I.aqa,D);h(A,B,C&&I.bqa,E)};m.aPa=function(B){h(A,B,!1,E);h(z,B,!1,D);B.ka(b.nF)};var v=[];m.ghb=function(B){v=[];B.forEach(function(C){v.indexOf(C.T)<0&&v.push(C.T)})};var w=[];m.Qoa=function(B){w=[];B.forEach(function(C){w.indexOf(C.T)<0&&w.push(C.T)})};
var y=new Map,x=new Map,z=new Map,A=new Map,D=new Map,E=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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/selection/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.TW.v.length&&this.TW.v.slice().forEach(h.upa);this.yk.Ca.length&&
this.yk.Ca.slice().forEach(h.Yt);this.yk.v.length&&this.yk.v.slice().forEach(h.frame);this.UW.v.length&&this.UW.v.slice().forEach(h.Ppa);this.oNa.v.length&&this.oNa.v.slice().forEach(h.Jhb);this.nNa.v.length&&this.nNa.Ca.slice().forEach(h.$Pa);this.pNa.v.length&&this.pNa.v.slice().forEach(h.bPa);this.qNa.v.length&&this.qNa.v.slice().forEach(h.bPa);this.OKa.v.length&&this.OKa.v.slice().forEach(h.Ihb);this.NKa.v.length&&this.NKa.Ca.slice().forEach(h.VPa);this.PKa.v.length&&this.PKa.v.slice().forEach(h.aPa);
this.QKa.v.length&&this.QKa.v.slice().forEach(h.aPa);(this.coa.ce.length||this.coa.Og.length)&&h.ghb(this.coa.v);(this.Iz.ce.length||this.Iz.Og.length)&&h.Qoa(this.Iz.v)};a.M={};a.M.Iz=[p.Em];a.M.coa=[p.vl];a.M.TW=[p.xc,p.gx.ia];a.M.yk=[p.xc,p.gx];a.M.UW=[p.xc.ia,p.gx];a.M.oNa=[p.Object3D,p.ud,p.rF.ia];a.M.nNa=[p.Object3D,p.ud,p.rF];a.M.pNa=[p.Object3D.ia,p.rF];a.M.qNa=[p.ud.ia,p.rF];a.M.OKa=[p.Object3D,p.vr,p.nF.ia];a.M.NKa=[p.Object3D,p.vr,p.nF];a.M.PKa=[p.Object3D.ia,p.nF];a.M.QKa=[p.vr.ia,p.nF];
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,k,p,h,g,e){a=function(b){function c(){var d=b.call(this)||this;d.Eb=d.Eb.bind(d);d.sb=d.sb.bind(d);d.Xf=d.Xf.bind(d);d.Ea=d.Ea.bind(d);return d}P(c,b);c.prototype.cd=function(){this.KD.v.length&&this.KD.v.slice().forEach(this.Eb);this.LD.v.length&&this.LD.v.slice().forEach(this.Ea);
this.si.Ca.length&&this.si.Ca.slice().forEach(this.sb);this.si.v.length&&this.si.v.slice().forEach(this.Xf)};c.prototype.Eb=function(d){var f=d.L(h.ru),n=d.L(h.Object3D);f.light=n.ta=new k.SpotLight;this.sb(d)};c.prototype.sb=function(d){var f=d.getComponent(h.SpotLight),n=d.getComponent(h.ru),l=n.light;l.color=p.ar(f.color).convertLinearToSRGB();l.intensity=f.intensity*Math.PI;l.visible=l.intensity>0;l.castShadow=l.intensity>0&&f.castShadow;l.distance=f.distance;l.angle=f.angle*Math.PI/180;l.penumbra=
f.penumbra;l.decay=f.decay;l.target.position.set(0,0,1);l.add(l.target);var q=l.castShadow?f.ypa:16;q!=l.shadow.mapSize.width&&(l.shadow.dispose(),l.shadow=l.shadow.clone(),l.shadow.mapSize.width=l.shadow.mapSize.height=q);l.shadow.bias=f.xpa;l.shadow.radius=f.zpa;f.wV!=!!n.mp&&(n=d.N(h.ru),f.wV?n.mp=new k.SpotLightHelper(l):(n.mp.dispose(),n.mp=null))};c.prototype.Xf=function(d){this.jqa(d)};c.prototype.jqa=function(d){var f=d.getComponent(h.ru);if(f=f&&f.mp)d=e.Mf(d),f.parent!=d&&(f.parent&&f.parent.remove(f),
d&&d.add(f)),f.update()};c.prototype.Ea=function(d){var f=d.getComponent(h.ru),n=f&&f.mp;n&&n.parent&&n.parent.remove(n);n&&n.dispose();f=f.light;f.parent&&f.parent.remove(f);d.ka(h.ru);d.ka(h.Object3D)};c.M={};return c}(g);a.M={};a.M.KD=[h.SpotLight,h.ru.ia];a.M.si=[h.SpotLight,h.ru];a.M.LD=[h.SpotLight.ia,h.ru];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(h){this.A=h;this.za=null;this.update()}var k=a("tdv/player/view/util/Color"),p=a("tdv/player/view/webgl/components");m.prototype.update=function(){this.za||(this.za=new THREE.MeshBasicMaterial,this.za.transparent=!0,this.A.L(p.Material).material=this.za);var h=this.A.getComponent(p.vd);this.za.color=k.ar(h.color||"#ffffff");this.za.opacity=
h.opacity||0;this.za.depthTest=!!h.depthTest;this.za.side=h.doubleSided?THREE.DoubleSide:THREE.FrontSide;this.za.visible=this.za.opacity>0;this.za.needsUpdate=!0};m.prototype.dispose=function(){this.za&&(this.za.dispose(),this.za=null,this.A.ka(p.Material));this.A=null};m.Ya=function(h){h.L(p.hx).manager=new m(h)};m.Ba=function(h){var g=h.getComponent(p.hx);g.manager.dispose();g.manager=null;h.ka(p.hx)};m.update=function(h){h.getComponent(p.hx).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/solidMaterial/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.Hn.v.length&&this.Hn.v.slice().forEach(h.Ya);
this.materials.Ca.length&&this.materials.Ca.slice().forEach(h.update);this.In.v.length&&this.In.v.slice().forEach(h.Ba)};a.M={};a.M.Hn=[p.vd,p.hx.ia];a.M.materials=[p.vd,p.hx];a.M.In=[p.vd.ia,p.hx];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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(k,function(){k.apply(this,arguments);this.Eb=this.Eb.bind(this);this.sb=this.sb.bind(this);this.Ea=this.Ea.bind(this)});a.prototype.cd=
function(){this.DOa.v.length&&this.DOa.v.slice().forEach(this.Eb);this.COa.Ca.length&&this.COa.Ca.slice().forEach(this.sb);this.EOa.v.length&&this.EOa.v.slice().forEach(this.Ea);this.FOa.v.length&&this.FOa.v.slice().forEach(this.Ea)};a.prototype.Eb=function(g){g.L(p.Object3D).ta=new THREE.Mesh(new THREE.SphereGeometry);g.L(p.sF);this.sb(g)};a.prototype.sb=function(g){var e=g.getComponent(p.Object3D).ta;h.iD(e,g.getComponent(p.Material).material);g=g.getComponent(p.Sphere);var b=e.geometry;if(b.radius!=
g.radius||b.widthSegments!=g.widthSegments||b.heightSegments!=g.heightSegments)b.dispose(),b=new THREE.SphereGeometry(g.radius,g.widthSegments,g.heightSegments),e.geometry=b,e.needsUpdate=!0;g=g.renderOrder||0;e.renderOrder!=g&&(e.renderOrder=g,e.needsUpdate=!0)};a.prototype.Ea=function(g){var e=g.getComponent(p.Object3D);(e=e&&e.ta)&&e.geometry&&(e.geometry.dispose(),e.geometry=null);e&&h.iD(e,null);g.ka(p.sF);g.ka(p.Object3D)};a.M={};a.M.DOa=[p.Sphere,p.Material,p.sF.ia];a.M.COa=[p.Sphere,p.Material,
p.sF];a.M.EOa=[p.Sphere.ia,p.sF];a.M.FOa=[p.Material.ia,p.sF];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(b){this.A=b;this.zb=null;this.pba=90;this.qba=100;this.Pa=this.Ga=void 0;this.o3=!1;this.Vc=1;this.md=this.A.N(k.Sprite).ti=this.A.N(k.Object3D,!0).ta=new THREE.Sprite;this.md.material.opacity=0;this.Ij();this.update();this.frame()}a("tdv/player/view/util/XR");
var k=a("tdv/player/view/webgl/components"),p=a("tdv/player/view/webgl/system/util/entity/Util"),h=a("tdv/player/view/webgl/system/util/material/Util");m.prototype.update=function(){var b=this.A.getComponent(k.Sprite);this.Ga=b.height;this.Pa=b.width;this.o3=b.sizeAttenuation;this.md.center.x=b.yN;this.md.center.y=1-b.zN;this.Vc=b.scale;this.xn();this.md.needsUpdate=!0};m.prototype.frame=function(){this.zb||(this.zb=p.Mf(this.A));this.Qs();this.Ij();this.xn()};m.prototype.Qs=function(){if(this.zb){var b=
p.Zv(this.zb);if(b&&b.isPerspectiveCamera){var c=p.BD(this.zb);if(this.pba!=b.fov||this.qba!=c)this.pba=b.fov,this.qba=c,this.xn(),this.md.needsUpdate=!0}}};m.prototype.Ij=function(){var b=this.zb?this.A.getComponent(k.Material).material:null;b&&h.iD(this.md,b);this.md.renderOrder=this.A.getComponent(k.Sprite).renderOrder;this.md.material&&this.md.material.sizeAttenuation!=this.o3&&(this.md.material.sizeAttenuation=this.o3,this.md.material.needsUpdate=!0)};m.prototype.xn=function(){var b=this.Ga;
this.o3||(b/=this.qba/(2*Math.tan(this.pba*e/2)));var c=this.Vc;this.md.parent&&(this.md.parent.getWorldScale(g),c/=Math.max(g.x,g.y,g.z));b*=c;c=b*this.Pa/this.Ga;var d=this.A.getComponent(k.sa)||this.A.L(k.sa);if(d.Ge!=c||d.Ve!=b||d.zh!=1)d=this.A.N(k.sa,!0),d.Ge=c,d.Ve=b,d.zh=1};var g=new THREE.Vector3,e=Math.PI/180;m.prototype.dispose=function(){};m.Ya=function(b){b.L(k.su).manager=new m(b)};m.Ba=function(b){var c=b.getComponent(k.su);c.manager.dispose();c.manager=null;b.ka(k.su);b.ka(k.Object3D)};
m.update=function(b){b.getComponent(k.su).manager.update()};m.frame=function(b){b.getComponent(k.su).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/sprite/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.HOa.v.length&&this.HOa.v.slice().forEach(h.Ya);this.I8.Ca.length&&
this.I8.v.slice().forEach(h.update);this.I8.v.length&&this.I8.v.slice().forEach(h.frame);this.IOa.v.length&&this.IOa.v.slice().forEach(h.Ba);this.JOa.v.length&&this.JOa.v.slice().forEach(h.Ba)};a.M={};a.M.HOa=[p.Material,p.Sprite,p.su.ia];a.M.I8=[p.Sprite,p.Material,p.su];a.M.IOa=[p.Sprite.ia,p.su];a.M.JOa=[p.Material.ia,p.su];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,n,l){for(;f<n-180;)f+=360;for(;f>n+180;)f-=360;return k(f,n,l)}function k(f,n,l){if(!l)return n;f=(n-f)*(1-l);Math.abs(f)<1E-5&&(f=0);return n-f}var p=a("tdv/utils"),h=a("tdv/constants/EventName"),g=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=p.extend(e,function(){e.apply(this,arguments);this.Eb=this.Eb.bind(this);this.sb=this.sb.bind(this);this.Ea=this.Ea.bind(this)});a.prototype.cd=function(f,n){this.GW.v.length&&this.GW.v.slice().forEach(this.Eb);this.ut.ce.length&&this.ut.ce.slice().forEach(function(l){this.sb(l,f,n)}.bind(this));this.ut.Ca.length&&this.ut.Ca.slice().forEach(function(l){this.sb(l,f,n)}.bind(this));this.ZKa.v.length&&this.ZKa.v.slice().forEach(function(l){this.sb(l,
f,n)}.bind(this));this.nHa.v.length&&this.nHa.v.slice().forEach(this.Ea);this.oHa.v.length&&this.oHa.v.slice().forEach(this.Ea)};a.prototype.Eb=function(f){var n=f.getComponent(b.sa),l=f.L(b.ug);l.positionX=n.positionX;l.positionY=n.positionY;l.positionZ=n.positionZ;l.Yd=n.Yd;l.Ad=n.Ad;l.Ue=n.Ue;l.ff=n.ff;l.scale=n.scale;l.Ge=n.Ge;l.Ve=n.Ve;l.zh=n.zh;l.translationX=n.translationX;l.translationY=n.translationY;l.We=n.We;this.updateMatrixWorld(f)};a.prototype.sb=function(f){var n=f.getComponent(b.sa),
l=f.getComponent(b.ug),q=n.easing||0;q?f.getComponent(b.vF)||f.L(b.vF):f.ka(b.vF);var r=null;n.xz!==l.xz&&(r||(r=f.N(b.ug)),r.xz=n.xz);n.positionX!==l.positionX&&(r||(r=f.N(b.ug)),r.positionX=k(r.positionX,n.positionX,q));n.positionY!==l.positionY&&(r||(r=f.N(b.ug)),r.positionY=k(r.positionY,n.positionY,q));n.positionZ!==l.positionZ&&(r||(r=f.N(b.ug)),r.positionZ=k(r.positionZ,n.positionZ,q));n.Yd!==l.Yd&&(r||(r=f.N(b.ug)),r.Yd=m(r.Yd,n.Yd,q));n.Ad!==l.Ad&&(r||(r=f.N(b.ug)),r.Ad=m(r.Ad,n.Ad,q));n.Ue!==
l.Ue&&(r||(r=f.N(b.ug)),r.Ue=m(r.Ue,n.Ue,q));n.scale!==l.scale&&(r||(r=f.N(b.ug)),r.scale=n.scale);n.Ge!==l.Ge&&(r||(r=f.N(b.ug)),r.Ge=n.Ge);n.Ve!==l.Ve&&(r||(r=f.N(b.ug)),r.Ve=n.Ve);n.zh!==l.zh&&(r||(r=f.N(b.ug)),r.zh=n.zh);n.translationX!==l.translationX&&(r||(r=f.N(b.ug)),r.translationX=k(r.translationX,n.translationX,q));n.translationY!==l.translationY&&(r||(r=f.N(b.ug)),r.translationY=k(r.translationY,n.translationY,q));n.We!==l.We&&(r||(r=f.N(b.ug)),r.We=k(r.We,n.We,q));r?this.updateMatrixWorld(f):
f.ka(b.vF)};var d=new THREE.Vector3;a.prototype.updateMatrixWorld=function(f){c.CX(f,f.getComponent(b.ug));var n=f.getComponent(b.sa).O;n&&(c.getWorldPosition(f,d),f={position:{}},f.position.x=d.x,f.position.y=d.y,f.position.z=d.z,n.o(new g(h.Hm,f)))};a.prototype.Ea=function(f){f.ka(b.ug);f.ka(b.vF)};a.M={};a.M.ut=[b.Object3D,b.sa,b.ug];a.M.GW=[b.Object3D,b.sa,b.ug.ia];a.M.ZKa=[b.Object3D,b.sa,b.ug,b.vF];a.M.nHa=[b.Object3D.ia,b.sa,b.ug];a.M.oHa=[b.sa.ia,b.ug];return a});
define("tdv/player/view/webgl/system/transformControls/TransformControlsGizmo",["require","three.mod","tdv/constants/RenderOrder"],function(a){const m=a("three.mod"),k=a("tdv/constants/RenderOrder");class p extends m.Object3D{constructor(t){function u(L,Q){L=new m.TorusGeometry(L,.0075,3,64,Q*Math.PI*2);L.rotateY(Math.PI/2);L.rotateX(Math.PI/2);return L}function v(L){const Q=new m.Object3D;for(const W in L)for(let X=L[W].length;X--;){const Y=L[W][X][0].clone();var T=L[W][X][1];const ca=L[W][X][2],
ea=L[W][X][3],Z=L[W][X][4];Y.name=W;Y.tag=Z;T&&Y.position.set(T[0],T[1],T[2]);ca&&Y.rotation.set(ca[0],ca[1],ca[2]);ea&&Y.scale.set(ea[0],ea[1],ea[2]);Y.updateMatrix();T=Y.geometry.clone();T.applyMatrix4(Y.matrix);Y.geometry=T;Y.renderOrder=k.ESa;Y.position.set(0,0,0);Y.rotation.set(0,0,0);Y.scale.set(1,1,1);Q.add(Y)}return Q}super();this.type="TransformControlsGizmo";this.properties=t;var w=new m.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),y=new m.LineBasicMaterial({depthTest:!1,
depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0});t=w.clone();t.opacity=.15;y=y.clone();y.opacity=.5;var x=w.clone();x.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 E=w.clone();E.color.setHex(65280);E.opacity=.5;const B=w.clone();B.color.setHex(255);B.opacity=.5;const C=w.clone();C.opacity=.25;var I=w.clone();I.color.setHex(16776960);I.opacity=.25;w.clone().color.setHex(16776960);
var F=w.clone();F.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,x),[.5,0,0],[0,0,-Math.PI/2]],[new m.Mesh(G,x),[-.5,0,0],[0,0,Math.PI/2]],[new m.Mesh(O,x),[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),C.clone()),[0,0,0]]],XY:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),B.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),E.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]]]},S={START:[[new m.Mesh(new m.OctahedronGeometry(.01,2),y),null,null,null,"helper"]],END:[[new m.Mesh(new m.OctahedronGeometry(.01,2),y),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}(),y),null,null,null,"helper"]],X:[[new m.Line(w,y.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new m.Line(w,y.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new m.Line(w,y.clone()),[0,0,-1E3],[0,-Math.PI/2,0],[1E6,1,1],"helper"]]};I={XYZE:[[new m.Mesh(u(.5,1),F),null,[0,Math.PI/2,0]]],X:[[new m.Mesh(u(.5,.5),x)]],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),I),null,[0,Math.PI/
2,0]]]};F={AXIS:[[new m.Line(w,y.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)]]};x={X:[[new m.Mesh(N,x),[.5,0,0],[0,0,-Math.PI/2]],[new m.Mesh(O,x),
[0,0,0],[0,0,-Math.PI/2]],[new m.Mesh(N,x),[-.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),B),[.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),E),[.15,0,.15],
[-Math.PI/2,0,0]]],XYZ:[[new m.Mesh(new m.BoxGeometry(.1,.1,.1),C.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]]]};y={X:[[new m.Line(w,y.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new m.Line(w,y.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new m.Line(w,y.clone()),[0,0,-1E3],[0,-Math.PI/
2,0],[1E6,1,1],"helper"]]};this.Vz={};this.Ct={};this.QI={};this.add(this.Vz.translate=v(G));this.add(this.Vz.rotate=v(I));this.add(this.Vz.scale=v(x));this.add(this.Ct.translate=v(R));this.add(this.Ct.rotate=v(K));this.add(this.Ct.scale=v(t));this.add(this.QI.translate=v(S));this.add(this.QI.rotate=v(F));this.add(this.QI.scale=v(y));this.Ct.translate.visible=!1;this.Ct.rotate.visible=!1;this.Ct.scale.visible=!1}updateMatrixWorld(t){const u=(this.properties.mode==="scale"?"local":this.properties.Epa)===
"local"?this.properties.VJ:n;this.Vz.translate.visible=this.properties.mode==="translate";this.Vz.rotate.visible=this.properties.mode==="rotate";this.Vz.scale.visible=this.properties.mode==="scale";this.QI.translate.visible=this.properties.mode==="translate";this.QI.rotate.visible=this.properties.mode==="rotate";this.QI.scale.visible=this.properties.mode==="scale";let v=[];v=v.concat(this.Ct[this.properties.mode].children);v=v.concat(this.Vz[this.properties.mode].children);v=v.concat(this.QI[this.properties.mode].children);
for(let y=0;y<v.length;y++){const x=v[y];x.visible=!0;x.rotation.set(0,0,0);x.position.copy(this.properties.LA);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.LA.distanceTo(this.properties.Qc)*Math.min(1.9*Math.tan(Math.PI*w.fov/360)/w.zoom,7));x.scale.set(1,1,1).multiplyScalar(w*this.properties.size/4);x.tag==="helper"?(x.visible=!1,x.name==="AXIS"?(x.visible=!!this.properties.axis,this.properties.axis===
"X"&&(g.setFromEuler(e.set(0,0,0)),x.quaternion.copy(u).multiply(g),Math.abs(b.copy(l).applyQuaternion(u).dot(this.properties.eye))>.9&&(x.visible=!1)),this.properties.axis==="Y"&&(g.setFromEuler(e.set(0,0,Math.PI/2)),x.quaternion.copy(u).multiply(g),Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))>.9&&(x.visible=!1)),this.properties.axis==="Z"&&(g.setFromEuler(e.set(0,Math.PI/2,0)),x.quaternion.copy(u).multiply(g),Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))>.9&&
(x.visible=!1)),this.properties.axis==="XYZE"&&(g.setFromEuler(e.set(0,Math.PI/2,0)),b.copy(this.properties.hE),x.quaternion.setFromRotationMatrix(d.lookAt(c,b,q)),x.quaternion.multiply(g),x.visible=this.properties.qk),this.properties.axis==="E"&&(x.visible=!1)):x.name==="START"?(x.position.copy(this.properties.UJ),x.visible=this.properties.qk):x.name==="END"?(x.position.copy(this.properties.LA),x.visible=this.properties.qk):x.name==="DELTA"?(x.position.copy(this.properties.UJ),x.quaternion.copy(this.properties.Dqa),
h.set(1E-10,1E-10,1E-10).add(this.properties.UJ).sub(this.properties.LA).multiplyScalar(-1),h.applyQuaternion(this.properties.Dqa.clone().invert()),x.scale.copy(h),x.visible=this.properties.qk):(x.quaternion.copy(u),this.properties.qk?x.position.copy(this.properties.UJ):x.position.copy(this.properties.LA),this.properties.axis&&(x.visible=this.properties.axis.search(x.name)!==-1))):(x.quaternion.copy(u),this.properties.mode==="translate"||this.properties.mode==="scale"?(x.name==="X"&&Math.abs(b.copy(l).applyQuaternion(u).dot(this.properties.eye))>
.99&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="Y"&&Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))>.99&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="Z"&&Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))>.99&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="XY"&&Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))<.2&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="YZ"&&Math.abs(b.copy(l).applyQuaternion(u).dot(this.properties.eye))<
.2&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),x.name==="XZ"&&Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))<.2&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1)):this.properties.mode==="rotate"&&(f.copy(u),b.copy(this.properties.eye).applyQuaternion(g.copy(u).invert()),x.name.search("E")!==-1&&x.quaternion.setFromRotationMatrix(d.lookAt(this.properties.eye,c,q)),x.name==="X"&&(g.setFromAxisAngle(l,Math.atan2(-b.y,b.z)),g.multiplyQuaternions(f,g),x.quaternion.copy(g)),x.name==="Y"&&
(g.setFromAxisAngle(q,Math.atan2(b.x,b.z)),g.multiplyQuaternions(f,g),x.quaternion.copy(g)),x.name==="Z"&&(g.setFromAxisAngle(r,Math.atan2(b.y,b.x)),g.multiplyQuaternions(f,g),x.quaternion.copy(g))),x.visible=x.visible&&(x.name.indexOf("X")===-1||this.properties.sOa),x.visible=x.visible&&(x.name.indexOf("Y")===-1||this.properties.tOa),x.visible=x.visible&&(x.name.indexOf("Z")===-1||this.properties.uOa),x.visible=x.visible&&(x.name.indexOf("E")===-1||this.properties.sOa&&this.properties.tOa&&this.properties.uOa),
x.material.Ie=x.material.Ie||x.material.color.clone(),x.material.$e=x.material.$e||x.material.opacity,x.material.color.copy(x.material.Ie),x.material.opacity=x.material.$e,this.properties.enabled&&this.properties.axis&&(x.name===this.properties.axis?(x.material.color.setHex(16776960),x.material.opacity=1):this.properties.axis.split("").some(function(z){return x.name===z})&&(x.material.color.setHex(16776960),x.material.opacity=1)))}super.updateMatrixWorld(t)}}const h=new m.Vector3,g=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,n=new m.Quaternion,l=new m.Vector3(1,0,0),q=new m.Vector3(0,1,0),r=new m.Vector3(0,0,1);return p});
define("tdv/player/view/webgl/system/transformControls/TransformControlsPlane",["require","three.mod"],function(a){const m=a("three.mod");class k 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.Epa;this.position.copy(this.properties.LA);this.properties.mode==="scale"&&(t="local");
n.copy(c).applyQuaternion(t==="local"?this.properties.VJ:g);l.copy(d).applyQuaternion(t==="local"?this.properties.VJ:g);q.copy(f).applyQuaternion(t==="local"?this.properties.VJ:g);h.copy(l);switch(this.properties.mode){case "translate":case "scale":switch(this.properties.axis){case "X":h.copy(this.properties.eye).cross(n);e.copy(n).cross(h);break;case "Y":h.copy(this.properties.eye).cross(l);e.copy(l).cross(h);break;case "Z":h.copy(this.properties.eye).cross(q);e.copy(q).cross(h);break;case "XY":e.copy(q);
break;case "YZ":e.copy(n);break;case "XZ":h.copy(q);e.copy(l);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.WFa):(b.lookAt(p.set(0,0,0),e,h),this.quaternion.setFromRotationMatrix(b));super.updateMatrixWorld(r)}}const p=new m.Vector3,h=new m.Vector3(0,1,0),g=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),n=new m.Vector3,l=new m.Vector3,q=new m.Vector3;return k});
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 k=a("three.mod"),p=a("tdv/player/view/webgl/system/transformControls/TransformControlsGizmo"),h=a("tdv/player/view/webgl/system/transformControls/TransformControlsPlane");
const g=new k.Vector3,e=new k.Vector3,b=new k.Quaternion,c={X:new k.Vector3(1,0,0),Y:new k.Vector3(0,1,0),Z:new k.Vector3(0,0,1)},d={type:"change"},f={type:"mouseDown",mode:null},n={type:"mouseUp",mode:null},l={type:"objectChange"};class q extends k.Object3D{constructor(r){super();this.camera=r;this.visible=!1;this.Vz=r=new p(this);this.add(r);this.eh=r=new h(this);this.add(r);this.object=void 0;this.enabled=!0;this.axis=null;this.mode="translate";this.qk=!1;this.uw=this.Eoa=this.wp=null;this.Epa=
"world";this.size=1;this.uOa=this.tOa=this.sOa=!0;this.offset=new k.Vector3;this.NOa=new k.Vector3;this.jHa=new k.Vector3;this.jm=new k.Vector3;this.Reb=new k.Vector3;this.$La=new k.Quaternion;this.Wna=new k.Quaternion;this.Xna=new k.Vector3;this.fkb=new k.Vector3;this.p9=new k.Quaternion;this.ekb=new k.Vector3;this.eoa=new k.Vector3;this.mJ=new k.Quaternion;this.Ioa=new k.Vector3;this.LA=new k.Vector3;this.UJ=new k.Vector3;this.VJ=new k.Quaternion;this.Dqa=new k.Quaternion;this.Qc=new k.Vector3;
this.WFa=new k.Quaternion;this.oA=new k.Vector3;this.nA=new k.Vector3;this.hE=new k.Vector3;this.rotationAngle=0;this.eye=new k.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.Reb,this.$La,this.Xna),this.object.matrixWorld.decompose(this.LA,this.VJ,this.ekb),this.Wna.copy(this.$La).invert(),this.p9.copy(this.VJ).invert());
this.camera.updateMatrixWorld();this.camera.matrixWorld.decompose(this.Qc,this.WFa,this.jm);this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.Qc).sub(this.LA).normalize();super.updateMatrixWorld(r)}$eb(r){if(this.object!==void 0&&this.qk!==!0&&this.axis!==null){if(r=m(this.eh,r,!0))this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.eoa.copy(this.object.position),this.mJ.copy(this.object.quaternion),this.Ioa.copy(this.object.scale),
this.object.matrixWorld.decompose(this.UJ,this.Dqa,this.fkb),this.oA.copy(r.point).sub(this.UJ);this.qk=!0;f.mode=this.mode;this.dispatchEvent(f)}}afb(r){if(this.qk===!1){var t=m(this.Vz.Ct[this.mode],r);this.axis=t?t.object.name:null}else{t=this.axis;var u=this.mode,v=this.object,w=this.Epa;if(u==="scale")w="local";else if(t==="E"||t==="XYZE"||t==="XYZ")w="world";if(v!==void 0&&t!==null&&this.qk!==!1&&(r=m(this.eh,r,!0))){this.nA.copy(r.point).sub(this.UJ);if(u==="translate")this.offset.copy(this.nA).sub(this.oA),
w==="local"&&t!=="XYZ"&&this.offset.applyQuaternion(this.p9),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.mJ).divide(this.Xna):this.offset.applyQuaternion(this.Wna).divide(this.Xna),v.position.copy(this.offset).add(this.eoa),this.wp&&(w==="local"&&(v.position.applyQuaternion(b.copy(this.mJ).invert()),t.search("X")!==-1&&(v.position.x=Math.round(v.position.x/this.wp)*this.wp),
t.search("Y")!==-1&&(v.position.y=Math.round(v.position.y/this.wp)*this.wp),t.search("Z")!==-1&&(v.position.z=Math.round(v.position.z/this.wp)*this.wp),v.position.applyQuaternion(this.mJ)),w==="world"&&(v.parent&&v.position.add(g.setFromMatrixPosition(v.parent.matrixWorld)),t.search("X")!==-1&&(v.position.x=Math.round(v.position.x/this.wp)*this.wp),t.search("Y")!==-1&&(v.position.y=Math.round(v.position.y/this.wp)*this.wp),t.search("Z")!==-1&&(v.position.z=Math.round(v.position.z/this.wp)*this.wp),
v.parent&&v.position.sub(g.setFromMatrixPosition(v.parent.matrixWorld))));else if(u==="scale")t.search("XYZ")!==-1?(w=this.nA.length()/this.oA.length(),this.nA.dot(this.oA)<0&&(w*=-1),e.set(w,w,w)):(g.copy(this.oA),e.copy(this.nA),g.applyQuaternion(this.p9),e.applyQuaternion(this.p9),e.divide(g),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.Ioa).multiply(e),this.uw&&(t.search("X")!==-1&&(v.scale.x=Math.round(v.scale.x/this.uw)*this.uw||this.uw),
t.search("Y")!==-1&&(v.scale.y=Math.round(v.scale.y/this.uw)*this.uw||this.uw),t.search("Z")!==-1&&(v.scale.z=Math.round(v.scale.z/this.uw)*this.uw||this.uw));else if(u==="rotate"){this.offset.copy(this.nA).sub(this.oA);u=20/this.LA.distanceTo(g.setFromMatrixPosition(this.camera.matrixWorld));r=!1;if(t==="XYZE")this.hE.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(g.copy(this.hE).cross(this.eye))*u;else if(t==="X"||t==="Y"||t==="Z")this.hE.copy(c[t]),g.copy(c[t]),
w==="local"&&g.applyQuaternion(this.VJ),g.cross(this.eye),g.length()===0?r=!0:this.rotationAngle=this.offset.dot(g.normalize())*u;if(t==="E"||r)this.hE.copy(this.eye),this.rotationAngle=this.nA.angleTo(this.oA),this.NOa.copy(this.oA).normalize(),this.jHa.copy(this.nA).normalize(),this.rotationAngle*=this.jHa.cross(this.NOa).dot(this.eye)<0?1:-1;this.Eoa&&(this.rotationAngle=Math.round(this.rotationAngle/this.Eoa)*this.Eoa);w==="local"&&t!=="E"&&t!=="XYZE"?(v.quaternion.copy(this.mJ),v.quaternion.multiply(b.setFromAxisAngle(this.hE,
this.rotationAngle)).normalize()):(this.hE.applyQuaternion(this.Wna),v.quaternion.copy(b.setFromAxisAngle(this.hE,this.rotationAngle)),v.quaternion.multiply(this.mJ).normalize())}this.dispatchEvent(d);this.dispatchEvent(l)}}}pMa(){this.qk&&this.axis!==null&&(n.mode=this.mode,this.dispatchEvent(n));this.qk=!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.qk&&(this.object.position.copy(this.eoa),this.object.quaternion.copy(this.mJ),this.object.scale.copy(this.Ioa),this.dispatchEvent(d),this.dispatchEvent(l),this.oA.copy(this.nA))}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".split(" "),function(a,m,k,p,h,g,e,b,c,d){function f(v){var w=this,y=w.getComponent(g.Jm),x=w.getComponent(g.Bh),z=y.c9;y=y.xk;if(z&&y)if(q.fHa.find(function(D){return D!=
w}))z.qk&&z.pMa(b.K4(u,z.camera,y));else{var A=y.getComponent(g.xc).tD;v.name==p.Ra?(z.$eb(b.K4(u,z.camera,y)),A.h(p.oa,f,w),z.qk&&A.bind(p.oa,f,w,!0)):v.name==p.bb?z.pMa(b.K4(u,z.camera,y)):v.name==p.mb?(A.h(p.oa,f,w),z.afb(b.K4(u,z.camera,y))):v.name==p.oa&&(y=l(x),z.mode=y[(y.indexOf(z.mode)+1)%y.length]);z.qk&&!w.getComponent(g.Em)?w.L(g.Em):!z.qk&&w.getComponent(g.Em)&&w.ka(g.Em);x.O&&z.qk&&v.name==p.mb&&(r.compose(z.object.position,z.object.quaternion,z.object.scale),t.multiplyMatrices(z.object.parent.matrixWorld,
r),x.O.o(new h(p.V,{position:z.object.position,quaternion:z.object.quaternion,scale:n(z.object.scale),matrix:r,matrixWorld:t})))}}function n(v){var w=Math.abs(v.x-v.y)+Math.abs(v.x-v.z),y=Math.abs(v.y-v.x)+Math.abs(v.y-v.z),x=Math.abs(v.z-v.x)+Math.abs(v.z-v.y);if(!(w>y&&w>x)){if(y>w&&y>x)return v.y;if(x>w&&x>y)return v.z}return v.x}function l(v){var w=[];v.translate&&w.push("translate");v.rotate&&w.push("rotate");v.scale&&w.push("scale");w.length==0&&w.push("translate");return w}var q=function(v){function w(){var y=
v.call(this)||this;y.Eb=y.Eb.bind(y);y.sb=y.sb.bind(y);y.Ea=y.Ea.bind(y);return y}P(w,v);w.prototype.cd=function(){this.oPa.v.length&&this.oPa.v.slice().forEach(this.Eb);this.pPa.v.length&&this.pPa.v.slice().forEach(this.Ea);this.qPa.v.length&&this.qPa.v.slice().forEach(this.Ea);this.nPa.v.length&&this.nPa.v.slice().forEach(this.sb);w.fHa=this.Iz.v};w.prototype.Eb=function(y){y.L(g.Jm)};w.prototype.sb=function(y){this.Mjb(y);this.Yt(y)};w.prototype.Mjb=function(y){var x=y.getComponent(g.Object3D).ta,
z=c.Mf(y),A=z&&c.Zv(z),D=y.getComponent(g.Bh),E=y.getComponent(g.Jm).c9;E&&x&&E.camera===A&&E.parent===z||(E&&(E.object.parent.remove(E.object),E.detach(),E.dispose()),E=null,A&&x&&z&&(E=new d(A),E.attach(new k.Object3D),z.add(E)),y.N(g.Jm).c9=E);E&&x&&(x.parent!=E.object.parent&&(E.object.parent&&E.object.parent.remove(E.object),x.parent&&x.parent.add(E.object)),y=l(D),y.indexOf(E.mode)==-1&&(E.mode=y[0]),E.object.matrix.copy(x.matrix),E.object.matrix.decompose(E.object.position,E.object.quaternion,
E.object.scale))};w.prototype.Yt=function(y){var x=y.getComponent(g.Jm),z=this.Dbb(y),A=z&&z.getComponent(g.xc).tD||null,D=(x=x.xk)&&x.getComponent(g.xc).tD||null;z!=x&&(D&&(D.h(p.Ra,f,y),D.h(p.bb,f,y),D.h(p.mb,f,y),D.h(p.oa,f,y)),y.N(g.Jm).Sh=A)&&(A.bind(p.Ra,f,y,!0),A.bind(p.bb,f,y,!0),A.bind(p.mb,f,y,!0));z!=x&&(y.N(g.Jm).xk=z)};w.prototype.Dbb=function(y){return this.yk.v.reduce(function(x,z){if(z.T!==y.T)return x;if(!x)return z;var A=z.getComponent(g.xc);return!x.getComponent(g.xc).Lg&&A.Lg?
z:x})};w.prototype.Ea=function(y){var x=y.getComponent(g.Jm),z=x&&x.c9;z&&(z.object.parent.remove(z.object),z.detach(),z.dispose());if(x=x.Sh)x.h(p.Ra,f,y),x.h(p.bb,f,y),x.h(p.mb,f,y),x.h(p.oa,f,y);y.ka(g.Jm)};w.M={};w.fHa=[];return w}(e),r=new k.Matrix4,t=new k.Matrix4,u=new k.Raycaster;q.M.Iz=[g.Em];q.M.yk=[g.xc];q.M.nPa=[g.Object3D,g.Bh,g.Jm];q.M.oPa=[g.Object3D,g.Bh,g.Jm.ia];q.M.pPa=[g.Object3D.ia,g.Jm];q.M.qPa=[g.Bh.ia,g.Jm];return q});
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.B=b;this.Ae=c;this.Ma=d;this.Ee=e.Wb();this.gg=this.B.get("currentTime");this.H=this.B.get("state");this.Hl=this.B.get("loop");this.i2=this.Ee.get("mute");this.W0=this.B.get("mute");this.H=this.B.get("autoplay")?p.PLAYING:p.Xb;this.Eaa();this.B.set("state",this.H);this.ra.rg(this.i2||
this.W0);this.ra.setLoop(this.Hl);this.ra.setCurrentTime(this.gg);this.ra.Yc(this.H)}var k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/events/Event"),g=a("tdv/view/av/VideoPlayer");m.prototype.dispose=function(){this.wha()};m.prototype.dAa=function(){var e=this.B.get("currentTime",0);this.gg!=e&&this.ra.setCurrentTime(this.gg=e)};m.prototype.hAa=function(){var e=this.B.get("state",p.aa);this.H!=e&&this.ra.Yc(this.H=e)};m.prototype.fAa=function(){var e=this.B.get("mute",
!1);this.W0!=e&&this.ra.rg(this.i2||(this.W0=e))};m.prototype.eAa=function(){var e=this.B.get("loop",!1);this.Hl!=e&&this.ra.setLoop(this.Hl=e)};m.prototype.OS=function(){var e=this.Ee.get("mute",!1);this.i2!=e&&this.ra.rg((this.i2=e)||this.W0)};m.prototype.YS=function(){this.B.set("currentTime",this.gg=this.ra.getCurrentTime())};m.prototype.WS=function(){this.B.set("duration",this.ra.Zi())};m.prototype.XS=function(){this.B.set("state",this.H=this.ra.getState());this.Ma()};m.prototype.ZS=function(){this.Ae.o(new h(k.Qb))};
m.prototype.Eaa=function(){this.Ee.bind(k.K("mute"),this.OS,this,!0);this.ra.bind(g.sg,this.YS,this,!0);this.ra.bind(g.Pj,this.WS,this,!0);this.ra.bind(k.Ye,this.XS,this,!0);this.ra.bind(k.Qb,this.ZS,this,!0);this.B.bind(k.K("currentTime"),this.dAa,this,!0);this.B.bind(k.K("state"),this.hAa,this,!0);this.B.bind(k.K("mute"),this.fAa,this,!0);this.B.bind(k.K("loop"),this.eAa,this,!0)};m.prototype.wha=function(){this.Ee.h(k.K("mute"),this.OS,this,!0);this.ra.h(g.sg,this.YS,this,!0);this.ra.h(g.Pj,this.WS,
this,!0);this.ra.h(k.Ye,this.XS,this,!0);this.ra.h(k.Qb,this.ZS,this,!0);this.B.h(k.K("currentTime"),this.dAa,this,!0);this.B.h(k.K("state"),this.hAa,this,!0);this.B.h(k.K("mute"),this.fAa,this,!0);this.B.h(k.K("loop"),this.eAa,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,n,l,q){this.r_=d.Rb()==d.Iw?THREE.LinearSRGBColorSpace:n.get("encoding","srgb")=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;
this.Or();this.ra=f;this.B=n;this.pb=l;this.Ma=q;this.zM=this.pb.get("posterURL");this.WEa=this.pb.get("url");this.Pa=this.pb.get("width");this.Ga=this.pb.get("height");this.vg=null;this.QH=this.RH=void 0;this.Kxa();this.pb.bind(k.K("posterURL"),this.bAa,this,!0);this.Ma();this.Da=this.ea=null}var k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/constants/Priority"),g=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.M5();f.isEmpty()&&(f=null);if(f&&(!this.vg||this.vg&&!this.vg.isEqual(f))){this.vg=f;f=this.vg.Hu;var n=c.wO(f);n&&(f.width=f.videoWidth||this.Pa,f.height=f.videoHeight||this.Ga);!this.ea&&this.WEa&&c.iQa(this.WEa)&&(this.ea=document.createElement("canvas"),this.ea.width=this.Pa,this.ea.height=this.Ga,this.Da=this.ea.getContext("2d"));this.ea&&n&&(this.Da.drawImage(f,0,0,this.ea.width,
this.ea.height),f=this.ea);this.HCa(f)}else!this.vg&&this.Qy&&this.La.image!=this.Qy&&this.HCa(this.Qy);(this.La.needsUpdate||this.ra.getState()==p.PLAYING)&&this.Ma()};m.prototype.bAa=function(){this.e5a(this.pb.get("posterURL"))};m.prototype.e5a=function(f){this.zM!=f&&(this.RDa(),this.zM=f,this.Kxa())};m.prototype.Kxa=function(){this.zM&&(this.Qy=null,this.yM=new g,this.yM.gP([this.zM]),this.yM.bind(k.ha,this.aAa,this,!0),e.Zz(this.yM,this.B.get("loadPriority",h.Fp)))};m.prototype.RDa=function(){this.zM&&
(this.yM.h(k.ha,this.aAa,this,!0),e.Zn(this.yM,this.B.get("loadPriority",h.Fp)),this.Qy=this.yM=null)};m.prototype.aAa=function(){this.Qy=e.qg(this.zM);if(this.Qy.width!=this.Pa||this.Qy.height!=this.Ga){var f=document.createElement("canvas"),n=f.getContext("2d");f.width=this.Pa;f.height=this.Ga;n.drawImage(this.Qy,0,0,this.Pa,this.Ga);this.Qy=f}this.Ma()};m.prototype.HCa=function(f){this.La&&this.RH==f.width&&this.QH==f.height?this.La.image=f:this.Or(f);this.La.needsUpdate=!0};m.prototype.Or=function(f){this.i_();
this.La=new THREE.Texture;this.La.image=f||b.VHa();this.RH=this.La.image.width;this.QH=this.La.image.height;this.La.generateMipmaps=!1;this.La.minFilter=THREE.LinearFilter;this.La.magFilter=THREE.LinearFilter;this.La.format=THREE.RGBAFormat};m.prototype.i_=function(){this.La&&(this.QH=this.RH=void 0,this.La.dispose(),this.La=null)};m.prototype.dispose=function(){this.RDa();this.pb.h(k.K("posterURL"),this.bAa,this,!0);this.Da=this.pb=null;this.ea&&(this.ea=this.ea.width=this.ea.height=0);this.i_();
this.Ma=this.Nh=this.ra=null};m.prototype.e6=function(){return this.La};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,k,p,h,g,e,b){var c=["alphaMap"];return function(){function d(f,n,l){this.Zfb=function(q){this.G4!=q&&(this.GPa(),this.G4=q,this.Qdb())};this.properties=f;this.level=n;this.Xa=l;this.q7=this.q7.bind(this);k.ba(this.level,c,this.q7,!0)}d.prototype.dispose=
function(){k.ca(this.level,c,this.q7);this.GPa();this.i5()};d.prototype.e6=function(){return this.texture};d.prototype.q7=function(){this.Zfb(this.level.get("alphaMapURL"))};d.prototype.Qdb=function(){this.G4&&(this.lI=new g,this.lI.gP([this.G4]),this.lI.bind(p.ha,this.$Ka,this,!0),e.Zz(this.lI,this.properties.get("loadPriority",h.Fp)))};d.prototype.GPa=function(){this.lI&&(this.lI.h(p.ha,this.$Ka,this,!0),e.Zn(this.lI,this.properties.get("loadPriority",h.Fp)),this.uFa=this.lI=null)};d.prototype.$Ka=
function(){this.uFa=e.qg(this.G4);this.createTexture();this.Xa()};d.prototype.createTexture=function(){this.texture=new b.Texture;this.texture.image=this.uFa;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.i5=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{LQa:function(){this.blending=0;this.zO=void 0;this.wOa=this.threshold=0},MSa:function(){this.rO=!1;this.height=this.width=100},create:function(k,p,h){var g=k.rO&&m.oJa(),e=k.rO&&m.nJa(),b=void 0,c=!g,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, "+(g?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(e||p.blending||p.zO){g=[];var f=[];g=g.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;"]);p.blending&&(b=Math.min(k.width,k.height)*.5*p.blending,d.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(b/k.width,b/k.height)},g=g.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(",")));
p.zO&&(d.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(p.zO.substr(1,2),16)/255,parseInt(p.zO.substr(3,2),16)/255,parseInt(p.zO.substr(5,2),16)/255)},d.uniforms.chromaThreshold={type:"f",value:p.threshold},d.uniforms.chromaSmoothing={type:"f",value:p.wOa},g=g.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(g,["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}";
k=new THREE.ShaderMaterial(d);k.transparent=!0;k.depthWrite=!0;k.side=THREE.FrontSide;k.depthTest=!0;k.needsUpdate=!0;k.userData.iPa=c;k.userData.jPa=b;this.fY(k,h);return k},fY:function(k,p){k.uniforms.text1.value!==p&&(k.userData.iPa!==void 0&&(p.flipY=k.userData.iPa),k.userData.jPa!==void 0&&(p.format=k.userData.jPa),k.uniforms.text1.value=p)},Uib:function(k,p){k.uniforms.textAlpha.value!==p&&(k.uniforms.textAlpha.value=p,k.uniforms.validTextAlpha.value=!!p)}}});
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.A=q;this.h1=this.h1.bind(this);q=q.getComponent(f.jo);this.Ae=q.O;this.B=q.properties;this.r4=q.yqa;this.Ee=this.A.T.Jq();this.Ma=this.Ma.bind(this);this.Zg=!1;this.pb=null;k.ba(this.r4,["levels.url","levels.srcObject","levels.width","levels.height"],this.h1,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),g=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"),n=a("tdv/view/av/SubtitleController"),l=a("tdv/view/av/VideoPlayer");m.prototype.update=function(){this.Zg&&(this.Zg=!1,this.wq.update(),c.fY(this.za,this.wq.e6()),c.Uib(this.za,this.Haa.e6()))};m.prototype.h1=function(){this.MT(l.rk(this.r4))};m.prototype.MT=function(q){q=q&&(q.get("url")||
q.get("srcObject"))?q:null;this.pb!=q&&(this.pb&&(this.VEa.dispose(),this.VEa=null,this.B.h(p.K("opacity"),this.gAa,this,!0),this.vca(),this.wq.dispose(),this.wq=null,this.Haa.dispose(),this.Haa=null,this.nXa(),this.Zg=!1),this.pb=q)&&(this.YWa(),this.VEa=new g(this.ra,this.B,this.Ae,this.Ma),this.wq=new e(this.ra,this.B,this.pb,this.Ma),this.Haa=new b(this.B,this.pb,this.Ma),this.Jx(),this.B.bind(p.K("opacity"),this.gAa,this,!0),this.vCa(this.$e=this.B.get("opacity",1)),this.Zg=!1,this.Ma())};m.prototype.Ma=
function(){this.Zg||(this.Zg=!0,this.A.T.Xa())};m.prototype.YWa=function(){this.ra=new l(this.A.T.Jq(),this.r4);this.rn=new n(this.B,this.ra)};m.prototype.nXa=function(){this.ra.Yc(h.aa);this.ra.clear();this.ra=null;this.rn.clear();this.rn=null};m.prototype.Jx=function(){var q=new c.MSa;q.rO=!this.pb.get("srcObject")&&d.rO(this.pb.get("url"));q.width=this.pb.get("width");q.height=this.pb.get("height");var r=new c.LQa;r.blending=this.B.get("blending",0);r.zO=this.B.get("chromaColor");r.threshold=this.B.get("chromaThreshold",
0);r.wOa=this.B.get("chromaSmoothing",0);this.za=c.create(q,r,this.wq.e6());this.A.L(f.Material).material=this.za};m.prototype.vca=function(){this.za.dispose();this.za=null;this.A.ka(f.Material)};m.prototype.dispose=function(){this.MT(null);this.B.set("state",h.aa);this.A=this.Ae=this.B=this.Ee=null;k.ca(this.r4,["levels.url","levels.srcObject","levels.width","levels.height"],this.h1)};m.prototype.gAa=function(){var q=this.B.get("opacity");this.$e!=q&&(this.vCa(this.$e=q),this.Ma())};m.prototype.vCa=
function(q){this.za.opacity=q;this.za.isShaderMaterial&&this.za.uniforms.opacity&&(this.za.uniforms.opacity.value=q)};m.Ya=function(q){q.L(f.pB).manager=new m(q)};m.Ba=function(q){var r=q.getComponent(f.pB);r.manager.dispose();r.manager=null;q.ka(f.pB)};m.update=function(q){q.getComponent(f.pB).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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/videoMaterial/Behaviour");a=m.extend(k,function(){k.apply(this,arguments)});a.prototype.cd=function(){this.Hn.v.length&&this.Hn.v.slice().forEach(h.Ya);
this.In.v.length&&this.In.v.slice().forEach(h.Ba);this.materials.v.length&&this.materials.v.slice().forEach(h.update)};a.M={};a.M.Hn=[p.jo,p.pB.ia];a.M.materials=[p.jo,p.pB];a.M.In=[p.jo.ia,p.pB];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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/system/util/entity/Util"),h=a("tdv/player/view/webgl/components");a=m.extend(k,function(){k.apply(this,arguments);this.kia=this.kia.bind(this);this.lN=this.lN.bind(this)});a.prototype.cd=function(){this.zqa.ce.length&&
this.zqa.ce.slice().forEach(this.kia);this.hJ.Ca.length&&this.hJ.Ca.slice().forEach(this.lN);this.Bt.Ca.length&&this.Bt.Ca.slice().forEach(this.lN);this.hJ.ce.length&&this.hJ.ce.slice().forEach(this.lN);this.Bt.ce.length&&this.Bt.ce.slice().forEach(this.lN)};a.prototype.kia=function(g){var e=g.getComponent(h.ko),b=p.NV(e.Oa),c=b&&b.width||100;b=b&&b.height||100;if(e.width!=c||e.height!=b)e=g.N(h.ko),e.width=c,e.height=b};a.prototype.lN=function(g){var e=p.NV(g);this.zqa.v.forEach(function(b){if(b.getComponent(h.ko).Oa==
g){var c=b.getComponent(h.ko);if(c.width!=e.width||c.height!=e.height)c=b.N(h.ko),c.width=e.width,c.height=e.height}})};a.M={};a.M.zqa=[h.ko];a.M.hJ=[h.OrthographicCamera];a.M.Bt=[h.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,k,p,h,g,e,b,c,d,f,n,l,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]=k;t[11]=t[2]=p;v[6]=v[0]=h;v[7]=v[1]=g;t[3]=t[0]+f;t[4]=t[1]+n;t[5]=t[2]+l;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]-n;t[17]=t[14]-l;v[10]=v[8];v[11]=v[9]-q;m=b*l-c*n;c=c*f-e*l;e=e*n-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(h,g,e){this.Xr=h;this.B=g;this.Rda=e;this.R2=this.R2.bind(this);this.HK=void 0;this.B.forEach(function(b){this.Xr.bind(k.K(b),this.qS,this,!0)}.bind(this));this.R2()}var k=a("tdv/constants/EventName"),p=a("tdv/events/async");m.prototype.stop=function(){this.B.forEach(function(h){this.Xr.h(k.K(h),this.qS,this,!0)}.bind(this));this.HK&&(p.cancel(this.HK),this.HK=
void 0)};m.prototype.qS=function(){this.HK||(this.HK=p.iE(this.R2))};m.prototype.R2=function(){this.HK=void 0;var h=this.Xr;this.Rda.apply(window,this.B.map(function(g){return h.get(g)}))};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"),k=a("tdv/player/view/webgl/ecs/System"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/geometry/Plane"),
g=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(k,function(){k.apply(this,arguments);this.jia=this.jia.bind(this);this.Gja=this.Gja.bind(this);this.Jia=this.Jia.bind(this)});d.prototype.cd=function(){this.dE.v.length&&this.dE.v.slice().forEach(this.jia);this.planes.Ca.length&&this.planes.Ca.slice().forEach(this.Gja);this.SW.v.length&&this.SW.v.slice().forEach(this.Jia)};
d.prototype.jia=function(f){var n=f.getComponent(p.xF),l=f.L(p.ko);l.Oa=n.Oa;var q=e.NV(n.Oa);q&&(l.width=q.width,l.height=q.height);l=f.L(p.lx);l.geometry=h.create();l.HMa=new g(n.properties,"width height horizontalAlign verticalAlign scaleMode zIndex".split(" "),function(r,t,u,v,w,y){var x=f.N(p.lx);x.AOa=r;x.yOa=t;x.sh=u;x.verticalAlign=v;x.jE=w;x.zIndex=y});f.L(p.Geometry).geometry=l.geometry};d.prototype.Jia=function(f){var n=f.getComponent(p.lx);n.geometry.dispose();n.geometry=null;n.HMa.stop();
n.HMa=null;f.ka(p.Geometry);f.ka(p.ko);f.ka(p.lx)};d.prototype.Gja=function(f){var n=f.getComponent(p.lx),l=f.getComponent(p.ko),q=l.width,r=l.height,t=n.AOa,u=n.yOa;switch(n.jE){case c.NONE:l=t;var v=u;break;case c.Ep:l=q;v=u*q/t;break;case c.Hk:v=r;l=t*r/u;break;case c.nr:t*r>u*q?(v=r,l=t*r/u):(l=q,v=u*q/t);break;default:t*r>u*q?(l=q,v=u*q/t):(v=r,l=t*r/u)}switch(n.sh){case b.$a:q=-q*.5;break;case b.Cb:q=q*.5-l;break;default:q=-l*.5}switch(n.verticalAlign){case b.Tc:r=r*.5-v;break;case b.Fc:r=-r*
.5;break;default:r=-v*.5}t=n.zIndex-d.FRa;h.set(n.geometry,q,r,0,0,0,l,0,0,1,0,v,0,1,0);f.N(p.sa,!0).positionZ=t;f.T.Xa()};d.FRa=100;d.M={};d.M.dE=[p.xF,p.lx.ia];d.M.planes=[p.xF,p.lx,p.ko];d.M.SW=[p.xF.ia,p.lx];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/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,k,p,h,g,e,b,c,d,f,n,l,q,r,t,u,v,w,y,x,z,A,D,E,B,C,I,F,G,N,O,R,S,K,L,Q,T,W,X,Y,ca,ea){a={};a.AmbientLight=k;a.Animation=p;a.co=h;a.TA=g;a.Camera=e;a.IQa=b;a.bK=c;a.Gf=d;a.PE=f;a.DirectionalLight=n;a.Em=l;a.pr=q;a.Uw=r;a.gu=u;a.Group=t;a.Bi=v;a.Xh=w;a.Line=y;a.iu=x;a.Yh=z;a.Xw=A;a.Mesh=D;a.Ci=E;a.XRa=B;a.nb=I;a.Plane=C;a.Lk=F;a.vl=G;a.ho=N;a.gj=O;a.Scene=R;a.Selection=S;a.vd=L;a.Sphere=Q;a.SpotLight=K;a.Sprite=T;a.sa=W;a.Bh=X;a.jo=Y;a.ko=ca;a.xF=ea;return a});
define("tdv/view/util/Screenshot",["require","exports"],function(){return function(){function a(){}a.lPa=function(m){var k;k||(k="screenshot.jpg");a:{try{var p=m.toDataURL("image/jpeg");break a}catch(h){}p=void 0}if(!p)return!1;m=p;p=document.createElement("a");typeof p.download==="string"?(document.body.appendChild(p),p.download=k,p.href=m,p.click(),document.body.removeChild(p)):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,k,p,h,g,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.Ee=t;w.R=u;w.I8a=v;w.wz=(new e(t)).na(b.XJ).na(b.AmbientLight).na(b.PA).na(b.Animation).na(b.Gw).na(b.LE).na(b.co).na(b.QA).na(b.ME).na(b.TA).na(b.UA).na(b.Bp).na(b.Lw).na(b.Gf).na(b.WA).na(b.cK).na(b.Mw).na(b.bK).na(b.JQa).na(b.PE).na(b.XA).na(b.DirectionalLight).na(b.hr).na(b.Pw).na(b.YA).na(b.Em).na(b.iF).na(b.eu).na(b.jF).na(b.Vw).na(b.pr).na(b.Tw).na(b.Uw).na(b.fu).na(b.Geometry).na(b.gu).na(b.cB).na(b.Group).na(b.jK).na(b.Bi).na(b.eB).na(b.Line).na(b.Xh).na(b.gB).na(b.iu).na(b.iB).na(b.hB).na(b.Material).na(b.Yh).na(b.jB).na(b.Xw).na(b.ur).na(b.Mesh).na(b.ku).na(b.Ci).na(b.Yw).na(b.mF).na(b.TRa).na(b.vr).na(b.nF).na(b.Object3D).na(b.rK).na(b.Zw).na(b.oF).na(b.$w).na(b.OrthographicCamera).na(b.lu).na(b.PerspectiveCamera).na(b.Kk).na(b.nb).na(b.nu).na(b.Lk).na(b.qF).na(b.Plane).na(b.mB).na(b.xc).na(b.bx).na(b.vl).na(b.ou).na(b.gx).na(b.ho).na(b.wr).na(b.vd).na(b.hx).na(b.sa).na(b.vF).na(b.ug).na(b.Bh).na(b.Jm).na(b.gj).na(b.pu).na(b.Scene).na(b.Hp).na(b.ud).na(b.rF).na(b.Sphere).na(b.sF).na(b.SpotLight).na(b.ru).na(b.Sprite).na(b.su).na(b.vd).na(b.hx).na(b.jx).na(b.uu).na(b.jo).na(b.pB).na(b.ko).na(b.xF).na(b.lx).na(b.xK).na(b.hj).na(b.yF).na(b.Cr).na(b.yK).na(b.Dr).na(b.zK).na(b.Er).na(b.AK).na(b.Fr).gd(c.Camera,
"Camera").gd(c.ko,"Viewport").gd(c.Bi,"ImageMaterial").gd(c.Gf,"CanvasMaterial").gd(c.Xh,"LineMaterial").gd(c.vd,"SolidMaterial").gd(c.jo,"VideoMaterial").gd(c.Xw,"MaterialVariant").gd(c.xF,"ViewportPlaneGeometry").gd(c.gu,"Grid").gd(c.Group,"Group").gd(c.Line,"Line").gd(c.Mesh,"Mesh").gd(c.Plane,"Plane").gd(c.pr,"Floor").gd(c.Sphere,"Sphere").gd(c.Sprite,"Sprite").gd(c.Ci,"Model").gd(c.ho,"ProjectedMaterial").gd(c.AmbientLight,"AmbientLight").gd(c.DirectionalLight,"DirectionalLight").gd(c.SpotLight,
"SpotLight").gd(c.Scene,"Scene").gd(c.nb,"Parent").gd(c.XRa,"ObjectId").gd(c.Animation,"Animation").gd(c.bK,"CameraOffsetTransform").gd(c.Yh,"ObjectTransform").gd(c.Uw,"FloorTransform").gd(c.IQa,"CameraControls").gd(c.Em,"Dragging").gd(c.Selection,"Selection").gd(c.vl,"PointerOverTransform").gd(c.Lk,"PixelScaleTransform").gd(c.sa,"Transform").gd(c.Bh,"TransformControls").gd(c.co,"Area").gd(c.iu,"LineToTransform").gd(c.Camera.YJ,"CameraAutoNearFar").gd(c.PE,"ClippingRect").gd(c.Scene.KY,"SceneFade").gd(c.TA,
"Beacon").gd(c.gj,"Renderer");w.m=w.wz.tc("Renderer");w.GH=[];w.oia=!1;w.bind(k.Cd,w.To,w,!0);w.bind(k.sd,w.Ro,w,!0);return w}P(r,q);r.prototype.Ib=function(){q.prototype.Ib.call(this);this.sG||(this.sG=new g,this.wa().kk(this.sG.ac()))};r.prototype.tc=function(t){return this.wz.tc(t)};r.prototype.fd=function(t){this.wz.fd(t)};r.prototype.Xa=function(){this.wz.Xa()};r.prototype.qFa=function(t){!(this.GH.indexOf(t)>=0)&&(this.GH.push(t),t=this.m.N(b.gj))&&(t.kX=this.GH.slice())};r.prototype.Cfb=function(t){t=
this.GH.indexOf(t);!(t<0)&&(this.GH.splice(t,1),t=this.m.N(b.gj))&&(t.kX=this.GH.slice())};r.prototype.j8=function(t){this.wz.j8(t)};r.prototype.Ua=function(t){this.wz.Ua(t)};r.prototype.tJ=function(){this.sG.o();this.wz.update();return d.lPa(this.m.getComponent(b.gj).renderer.domElement)};r.prototype.Qka=function(){this.wz.update();return this.m.getComponent(b.gj).renderer.domElement.toDataURL("image/png")};r.prototype.To=function(){this.F5a()};r.prototype.Ro=function(){this.x6a()};r.prototype.F5a=
function(){var t=this.m.getComponent(b.gj);if(!t&&(t=this.m.L(b.gj),t.lb=this.R,t.kX=this.GH.slice(),this.Ee.get(n)&&this.I8a)){this.RU=document.createElement("div");for(var u in l)this.RU.style[u]=l[u];this.wa().kk(this.RU)}};r.prototype.x6a=function(){this.m.getComponent(b.gj)&&(this.RU&&this.wa().X7(this.RU),this.RU=null,this.m.ka(b.gj))};return r}(p);var n=f([119,97,116,101,114,109,97,114,107]),l={};l[f([104,101,105,103,104,116])]=f([49,48,48,37]);l[f([119,105,100,116,104])]=f([49,48,48,37]);
l[f([112,111,115,105,116,105,111,110])]=f([97,98,115,111,108,117,116,101]);l[f([116,111,112])]=0;l[f([108,101,102,116])]=0;l[f([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=f([117,114,108,40,34])+h.NSa+f([34,41]);l[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]);l[f([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=f([99,111,110,116,97,105,110]);l[f([112,111,105,110,116,101,114,69,118,101,110,116,115])]=f([110,111,110,101]);
l[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]);l[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,k,p,h,g,e){var b=["autoNearFar","autoNearFarTolerance","near","far","userInteracting"],c=["inTransition"],d={OrbitModel3DCamera:g.oF,FirstPersonModel3DCamera:g.iF,FlyOverModel3DCamera:g.jF},f={FirstPersonModel3DCamera:g.AK,OrbitModel3DCamera:g.yK,FlyOverModel3DCamera:g.zK};
return function(){function n(l,q,r){this.renderer=l;this.model=q;this.Oa=r;this.lb=this.renderer.R;this.camera=null;this.Mg=this.Mg.bind(this);this.j7=this.j7.bind(this);this.renderer.bind(p.Yb,this.kl,this,!0);this.model.bind(p.K("camera"),this.Fna,this,!0);this.lb.bind(p.K("isKeyboardTarget"),this.Kna,this,!0);e.O.bind(p.V,this.kb,this,!0);this.Fna();this.kb();this.Kna();this.kl()}n.prototype.xw=function(l){for(var q in d){var r=this.Oa.N(d[q]);r&&(r.locked=l)}for(q in f)if(r=this.Oa.N(f[q]))r.locked=
l};n.prototype.Ua=function(l){for(var q in d){var r=this.Oa.N(d[q]);r&&(r.enabled=l)}};n.prototype.dispose=function(){this.setCamera(null);this.model.h(p.K("camera"),this.Fna,this);this.lb.h(p.K("isKeyboardTarget"),this.Kna,this);this.renderer.h(p.Yb,this.kl,this);e.O.h(p.V,this.kb,this)};n.prototype.kb=function(){this.Oa.N(g.PerspectiveCamera,!0).il=e.Dg==this.lb.Sc().Dn()};n.prototype.Fna=function(){this.setCamera(this.model.get("camera"))};n.prototype.setCamera=function(l){if(this.camera!==l){this.camera&&
(this.xE(!1),k.ca(this.camera,b,this.Mg),k.ca(this.camera,c,this.j7),this.camera.set("inTransition",!1));if(this.camera=l)k.ba(this.camera,b,this.Mg,!0),k.ba(this.camera,c,this.j7,!0),this.s9a(),this.Oa.N(g.cK,!0).properties=this.camera;this.LPa()}};n.prototype.LPa=function(){var l,q,r,t=!!this.camera&&this.camera.get("inTransition");t?r=this.Oa.N(g.jx,!0):this.Oa.ka(g.jx);for(var u in d){var v=d[u];!t&&this.camera&&h.Qa(u,this.camera)?l=this.Oa.N(v,!0):this.Oa.ka(v);(v=f[u])&&(!t&&this.camera&&h.Qa(u,
this.camera)?q=this.Oa.N(v,!0):this.Oa.ka(v))}l&&(l.properties=this.camera,l.ah=this.renderer.getParent(),l.fNa=this.lb.HR,l.ID=this.lb.get("isKeyboardTarget"));r&&(r.properties=this.camera,r.Eg=this.model.get("worldUnitToMeters"));q&&(q.properties=this.camera,q.Eg=this.model.get("worldUnitToMeters"),q.ql=this.lb.get("vrThumbstickRotationStep"))};n.prototype.Kna=function(){var l=this.hbb();l&&(l.ID=this.lb.get("isKeyboardTarget"))};n.prototype.hbb=function(){if(!this.camera)return null;var l=null,
q;for(q in d){var r=d[q];this.camera&&h.Qa(q,this.camera)&&(l=this.Oa.N(r,!0))}return l};n.prototype.Mg=function(){if(this.camera){var l=this.Oa.N(g.PerspectiveCamera,!0);l.Cka=this.camera.get("autoNearFar");l.JFa=this.camera.get("autoNearFarTolerance");l.near=this.camera.get("near");l.far=this.camera.get("far");this.xE(this.camera.get("userInteracting"))}};n.prototype.j7=function(){this.LPa()};n.prototype.kl=function(){var l=this.Oa.N(g.PerspectiveCamera,!0);l.width=this.renderer.Ph();l.height=this.renderer.Oh()};
n.prototype.s9a=function(){var l=this.camera;l.set("fov",l.get("initialFov"));l.set("x",l.get("initialX"));l.set("y",l.get("initialY"));l.set("z",l.get("initialZ"));l.set("distance",l.get("initialDistance",0));l.set("yaw",l.get("initialYaw"));l.set("pitch",l.get("initialPitch"))};n.prototype.xE=function(l){this.FE!=l&&(this.FE=l,this.camera&&this.camera.o(this.FE?p.wsa:p.vsa))};return n}()});
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,k){return function(){function p(){this.HW=this.HW.bind(this);this.U7=this.object=null;this.elements=[];this.zV=new Map;this.rMa=this.Og=this.ce=this.filter=null}p.prototype.FJ=function(h,g){this.dispose();this.object=h;this.U7=g;k.ba(this.object,[this.U7],this.HW,!0)};p.prototype.HW=function(h){h=h||[];this.filter&&(h=h.filter(this.filter));var g=this.elements,e=this.elements=
h;g.forEach(function(b,c){var d=e.indexOf(b);if(d==-1){var f=this.zV.get(b);this.zV["delete"](b);this.Og&&this.Og(b,f)}else d!=c&&(f=this.zV.get(b),this.rMa&&(c=this.rMa(b,d,f,c),c!=f&&this.zV.set(b,c)))}.bind(this));e.forEach(function(b,c){g.indexOf(b)==-1&&this.ce&&(c=this.ce(b,c),this.zV.set(b,c))}.bind(this))};p.prototype.dispose=function(){this.object&&(k.ca(this.object,[this.U7],this.HW),this.HW([]),this.U7=this.object=null)};return p}()});
define("tdv/player/view/model3d/renderer/adapters/lights/AmbientLightAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a,m,k,p){var h=["color","intensity"];return function(){function g(e,b,c,d,f){this.Mg=this.Mg.bind(this);this.object=e;this.model=b;this.uc=c;this.hd=d;this.Oa=f;this.F=c.T.tc("AmbientLight");this.F.L(p.AmbientLight);this.F.L(p.nb).F=this.hd;k.ba(this.object,h,this.Mg,!0)}g.prototype.dispose=function(){k.ca(this.object,h,this.Mg);
this.F&&(this.F.T.fd(this.F),this.F=null)};g.prototype.Mg=function(){var e=this.F.N(p.AmbientLight);e.color=this.object.get("color");e.intensity=this.object.get("intensity")};return g}()});
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,k,p,h,g,e){a=function(){function q(r,t,u,v,w){this.Mg=this.Mg.bind(this);this.object=r;this.model=t;this.uc=u;this.hd=v;this.Oa=w;this.F=this.uc.T.tc("OrbitLight");this.F.L(e.DirectionalLight).target=this.uc;this.F.L(e.nb);r=this.F.L(e.sa);r.ff="YXZ";r.positionZ=
10;this.sJ=null;p.ba(this.object,b,this.Mg,!0)}q.prototype.dispose=function(){p.ca(this.object,b,this.Mg);this.F&&(this.F.T.fd(this.F),this.F=null);this.sJ&&(this.sJ.dispose(),this.sJ=null)};q.prototype.Mg=function(){var r=this.F.N(e.DirectionalLight);r.castShadow=this.object.get("castShadow");r.color=this.object.get("color");r.wV=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.hd:this.Oa;
this.F.getComponent(e.nb).F!=t&&(this.F.N(e.nb).F=t);t=this.object.get("yaw");var u=-this.object.get("pitch"),v=this.F.getComponent(e.sa);if(v.Yd!=u||v.Ad!=t)v=this.F.N(e.sa),v.Yd=u,v.Ad=t;r.xpa=this.object.get("shadowBias");r.zpa=this.object.get("shadowRadius");r.ypa=this.object.get("shadowMapSize");r.Rhb=this.object.get("shadowTolerance");this.object.get("rotationDraggable")!=!!this.sJ&&(this.object.get("rotationDraggable")?this.sJ=new c(this.object,this.model,this.uc):(this.sJ.dispose(),this.sJ=
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.MO=this.MO.bind(this);this.object=r;this.model=t;this.uc=u;this.O=new g;this.O.bind(h.V,this.um,this,!0);this.jw=this.uc.T.tc("OrbitLightTransformControls");this.jw.L(e.sa).ff="YXZ";this.jw.L(e.Group);this.jw.L(e.nb).F=this.uc;this.Wz=this.uc.T.tc("OrbitLightTransformControlsInner");this.Wz.L(e.sa).ff=
"YXZ";this.Wz.L(e.Group);this.Wz.L(e.nb).F=this.jw;r=this.Wz.L(e.Bh);r.translate=!1;r.rotate=!0;r.scale=!1;r.O=this.O;p.ba(this.object,d,this.MO,!0);p.ba(this.model,f,this.MO,!0)}q.prototype.dispose=function(){p.ca(this.object,d,this.MO);p.ca(this.model,f,this.MO);this.jw&&(this.jw.T.fd(this.jw),this.jw=null);this.Wz&&(this.Wz.T.fd(this.Wz),this.Wz=null)};q.prototype.MO=function(){if(this.object.get("mode")=="fixed_to_target"){var r=this.jw.N(e.sa);r.Ad=0;r.Yd=0}else r=this.jw.N(e.sa),r.Ad=-this.model.get("camera").get("yaw"),
r.Yd=this.model.get("camera").get("pitch");r.Ue=0;r=this.Wz.N(e.sa);r.Ad=this.object.get("yaw");r.Yd=-this.object.get("pitch");r.Ue=0};q.prototype.um=function(r){n.setFromQuaternion(r.data.quaternion,"YXZ");this.object.set({yaw:n.y*l,pitch:-n.x*l});this.object.o(h.Hm)};return q}(),d=["mode","yaw","pitch"],f=["camera.yaw","camera.pitch"],n=new k.Euler,l=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,k,p,h,g,e){a=function(){function f(n,l,q,r,t){this.Mg=this.Mg.bind(this);this.object=n;this.model=l;this.uc=q;this.hd=r;this.Oa=t;this.F=q.T.tc("SpotLight");this.F.L(e.SpotLight);this.F.L(e.nb).F=this.hd;this.F.L(e.sa).ff="YXZ";this.cr=new g;this.cr.bind(h.V,this.um,
this,!0);p.ba(this.object,b,this.Mg,!0)}f.prototype.dispose=function(){p.ca(this.object,b,this.Mg);this.F.T.fd(this.F);this.F=null};f.prototype.Mg=function(){var n=this.F.N(e.SpotLight);n.color=this.object.get("color");n.intensity=this.object.get("intensity");n.distance=this.object.get("distance");n.wV=this.object.get("displayHelper");n.angle=this.object.get("angle");n.penumbra=this.object.get("penumbra");n.decay=this.object.get("decay");n.castShadow=this.object.get("castShadow");n.ypa=this.object.get("shadowMapSize");
n.xpa=this.object.get("shadowBias");n.zpa=this.object.get("shadowRadius");n=this.object.get("yaw");var l=-this.object.get("pitch"),q=this.F.getComponent(e.sa);if(q.Yd!=l||q.Ad!=n||q.positionX!=this.object.get("x")||q.positionY!=this.object.get("y")||q.positionZ!=this.object.get("z"))q=this.F.N(e.sa),q.Yd=l,q.Ad=n,q.translationX=this.object.get("x"),q.translationY=this.object.get("y"),q.We=this.object.get("z");this.object.get("rotationDraggable")||this.object.get("positionDraggable")?(n=this.F.N(e.Bh,
!0),n.O=this.cr,n.rotate=this.object.get("rotationDraggable"),n.translate=this.object.get("positionDraggable"),n.scale=!1):this.F.ka(e.Bh)};f.prototype.um=function(n){c.setFromQuaternion(n.data.quaternion,"YXZ");this.object.set({x:n.data.position.x,y:n.data.position.y,z:n.data.position.z,yaw:c.y*d,pitch:-c.x*d});this.object.o(h.Hm)};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 k.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,k,p,h,g){return function(){function e(){}e.Yka=function(b,c,d,f,n){return k.Qa("AmbientLight",b)?new p(b,c,d,f,n):k.Qa("OrbitLight",b)?new h(b,c,d,f,n):
k.Qa("SpotLight",b)?new g(b,c,d,f,n):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,k,p,h,g){return function(){function e(b,c,d,f){this.tla=this.Jz=null;this.model=b;this.uc=c;this.hd=d;this.Oa=f;this.P6=new h;this.P6.ce=this.hLa.bind(this);this.P6.Og=this.iLa.bind(this);this.P6.FJ(this.model,
"lights");this.q9a()}e.prototype.dispose=function(){this.P6.dispose();this.zfb()};e.prototype.hLa=function(b){return g.Yka(b,this.model,this.uc,this.hd,this.Oa)};e.prototype.iLa=function(b,c){c.dispose()};e.prototype.q9a=function(){var b,c,d,f;k.$f()&&this.model.get("backgroundPanoramaURL")&&(this.Jz=new p,(b=this.Jz)===null||b===void 0||b.set("intensity",.001),(c=this.Jz)===null||c===void 0||c.set("castShadow",!0),(d=this.Jz)===null||d===void 0||d.set("shadowMapWidth",64),(f=this.Jz)===null||f===
void 0||f.set("shadowTolerance",4),this.tla=this.hLa(this.Jz))};e.prototype.zfb=function(){this.Jz&&(this.iLa(this.Jz,this.tla),this.tla=this.Jz=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,k,p,h){var g=["floorColor","floorHeight","floorOpacity","floorRadius"];return function(){function e(b,c,d){this.model=b;this.object=c;this.uc=d;this.Mg=this.Mg.bind(this);this.F=d.T.tc("Floor");this.F.L(h.pr);this.F.L(h.nb).F=this.uc;k.ba(this.object,g,this.Mg,!0)}e.prototype.dispose=function(){k.ca(this.object,
g,this.Mg);this.F.T.fd(this.F);this.F=null};e.prototype.Mg=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 n=this.F.N(h.pr,!0);n.color=b;n.opacity=c;n.height=d;n.radius=f;n.renderOrder=this.model==this.object?p.KRa:p.URa}else this.F.ka(h.pr)};return e}()});
define("tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory",["require","exports","tdv/player/parser/ClassInfo"],function(a,m,k){return function(){function p(){}p.Ht=function(h,g){p.B4[h]=g};p.scb=function(h){for(var g in p.B4)if(k.Qa(g,h))return!0;return!1};p.Yka=function(h,g,e,b,c){for(var d in p.B4)if(k.Qa(d,h))return new p.B4[d](h,g,e,b,c);return null};p.B4={};return p}()});
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,k,p){return function(){function h(g,e,b,c,d){this.Qfb=g;this.model=e;this.uc=b;this.ona=c;this.renderer=d;this.filter=this.filter.bind(this);this.ce=this.ce.bind(this);this.Og=this.Og.bind(this);this.aJ=new k;this.aJ.filter=this.filter;this.aJ.ce=this.ce;this.aJ.Og=
this.Og;this.aJ.FJ(this.model,"objects")}h.prototype.filter=function(g){return p.scb(g)?!0:!1};h.prototype.ce=function(g){return p.Yka(g,this.Qfb,this.uc,this.ona,this.renderer)};h.prototype.Og=function(g,e){e.dispose()};h.prototype.dispose=function(){this.aJ.dispose()};return h}()});
define("tdv/player/view/model3d/renderer/adapters/objects/SpritesEnabledAdapter",["require","exports","tdv/constants/EventName","tdv/player/parser/ClassInfo"],function(a,m,k,p){return function(){function h(g,e){this.$R=g.$R;this.ma=e;this.Xk=[];this.$R.bind(k.K("spritesEnabled"),this.uAa,this,!0);this.ma.bind(k.K("objects"),this.lH,this,!0);this.ya()}h.prototype.dispose=function(){this.$R.h(k.K("spritesEnabled"),this.uAa,this);this.ma.h(k.K("objects"),this.lH,this);this.Xk.forEach(function(g){g.Uoa(!1)});
this.Xk=[]};h.prototype.uAa=function(){this.ya()};h.prototype.lH=function(){this.ya()};h.prototype.ya=function(){var g=[];this.$R.get("spritesEnabled")===!1&&g.push("SpriteModel3DObject");var e=this.ma.get("objects");this.Xk.forEach(function(b){e.indexOf(b)==-1&&b.Uoa(!1)});this.Xk=e;this.Xk.forEach(function(b){var c=g.some(function(d){return p.Qa(d,b)});b.Uoa(c)})};return h}()});
define("tdv/player/view/model3d/renderer/adapters/objects/UserInteractionObjectsVisibleAdapter",["require","exports","tdv/binding/BindingsHandler"],function(a,m,k){var p=["camera","objects","postprocessing"],h=["userInteracting","moving"];return function(){function g(e){this.model=e;this.camera=null;this.bj=[];this.cJ=this.cJ.bind(this);this.e7=this.e7.bind(this);k.ba(this.model,p,this.cJ,!0)}g.prototype.dispose=function(){this.rE([])};g.prototype.cJ=function(){this.setCamera(this.model.get("camera"));
this.rE([].concat(this.model.get("objects"),this.model.get("postprocessing")))};g.prototype.setCamera=function(e){this.camera!==e&&(this.camera&&k.ca(this.camera,h,this.e7),(this.camera=e)&&k.ba(this.camera,h,this.e7,!0))};g.prototype.e7=function(){this.sP()};g.prototype.rE=function(e){this.bj!=e&&(e||(e=[]),this.bj&&this.bj.forEach(function(b){e.indexOf(b)==-1&&(b.xE&&b.xE(!1),b.tp&&b.tp(!1))}.bind(this)),this.bj=e,this.sP())};g.prototype.sP=function(){if(this.bj&&this.camera){var e=this.camera.get("userInteracting"),
b=this.camera.get("moving");this.bj.forEach(function(c){c.xE&&c.xE(e);c.tp&&c.tp(b)}.bind(this))}};return g}()});
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,k,p,h,g){var e=["objects"];return function(){function b(c){this.model=c;this.bj=[];this.cJ=this.cJ.bind(this);h.O.bind(p.V,this.kb,this,!0);h.O.bind(p.me,this.NO,this,!0);k.ba(this.model,e,this.cJ,!0);this.kb();this.NO()}b.prototype.dispose=function(){h.O.h(p.V,
this.kb,this);h.O.h(p.me,this.NO,this);this.rE([])};b.prototype.cJ=function(){this.rE([].concat(this.model.get("objects")))};b.prototype.rE=function(c){this.bj!=c&&(c||(c=[]),this.bj&&this.bj.forEach(function(d){c.indexOf(d)==-1&&(d.l8&&d.l8(!0),d.wA&&d.wA(!1))}.bind(this)),this.bj=c,this.sP())};b.prototype.kb=function(){this.Dgb(h.isPresenting)};b.prototype.NO=function(){this.m8(h.isPresenting&&h.fe.length===1&&h.fe[0].type===g.oB)};b.prototype.Dgb=function(c){this.jb!==c&&(this.jb=c,this.sP())};
b.prototype.m8=function(c){this.vJa!==c&&(this.vJa=c,this.sP())};b.prototype.sP=function(){if(this.bj){var c=this.jb===!1,d=this.jb===!0,f=this.vJa===!0;this.bj.forEach(function(n){n.l8&&n.l8(c);n.wA&&n.wA(d);n.m8&&n.m8(f)}.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,k,p,h,g,e,b,c){var d=["variant"];return function(){function f(n,l,q,r){this.object=n;this.model=l;this.Nj=q;this.renderer=r;this.A7=this.A7.bind(this);this.F=this.Nj.T.tc("Model");n=this.F.L(p.Ci);this.tI=n.tI=this.Nj.T.tc("ModelContent");this.tI.L(p.nb).F=this.F;n.O=this.object;this.object.get("preload")&&(n.uMa=this.model.a6().Mv());n.np=this.model.X5().Mv();n.pna=this.object.get("model");n.properties=this.object;n.lb=this.renderer.R;n=this.F.L(p.ud);n.O=this.object;n.$s=!0;n.It=!0;this.F.L(p.nb).F=
this.Nj;this.F.L(p.sa);k.ba(this.object,d,this.A7,!0);this.aJ=new g(this.model,this.object,this.F,this.tI,this.renderer);this.Zhb=new e(this.renderer,this.object);this.Sjb=new b(this.model);this.hkb=new c(this.model);this.Mab=new h(this.model,this.object,this.F)}f.prototype.$i=function(){return this.F};f.prototype.dispose=function(){k.ca(this.object,d,this.A7);this.F.T.fd(this.tI);this.F.T.fd(this.F);this.aJ.dispose();this.Zhb.dispose();this.Sjb.dispose();this.hkb.dispose();this.Mab.dispose()};f.prototype.A7=
function(){var n=this.object.get("variant");n?this.F.N(p.Xw,!0).name=n:this.F.ka(p.Xw)};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,k,p,h,g,e){var b=["collidable"],c="canvas canvasTimestamp encoding depthTest hidden opacity".split(" "),d=["image"],f=["color","depthTest","opacity","width"],n=["parentId"],l=["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,y=180/Math.PI,x="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"],E=["video"],B=["hidden","enabled","opacity"];return{dK:function(C){return function(I){function F(){return I!==null&&
I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);k.ba(this.object,b,this.bLa||(this.bLa=this.deb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,b,this.bLa);I.prototype.Xc.call(this)};F.prototype.deb=function(){this.object.get("collidable")?this.F.ka(g.mF):this.F.L(g.mF)};return F}(C)},Gf:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);this.F.L(g.Gf);
k.ba(this.object,c,this.aLa||(this.aLa=this.ceb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,c,this.aLa);I.prototype.Xc.call(this)};F.prototype.ceb=function(){var G=this.F.N(g.Gf);G.source=this.object.get("canvas");G.HJ=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 F}(C)},
Bi:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);this.np=this.model.X5().Mv(.1);this.object.get("preload")&&this.model.a6().xN(this.np,.1);var G=this.F.L(g.Bi);G.properties=this.object;G.O=this.object;G.isSprite=!1;G.priority=this.object.get("preload")?h.kF:h.sra;G.np=this.np;k.ba(this.object,d,this.fLa||(this.fLa=this.JO.bind(this)),!0)};F.prototype.Xc=function(){this.model.X5().XO(this.np);this.model.a6().XO(this.np);
k.ca(this.object,d,this.fLa);I.prototype.Xc.call(this)};F.prototype.JO=function(){this.F.N(g.Bi).aw=this.object.get("image")};return F}(C)},Xh:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);this.F.L(g.Xh);k.ba(this.object,f,this.jLa||(this.jLa=this.peb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,f,this.jLa);I.prototype.Xc.call(this)};F.prototype.peb=function(){var G=this.F.N(g.Xh);
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 F}(C)},Plane:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);this.F.L(g.Plane);this.F.L(g.sa);k.ba(this.object,q,this.zLa||(this.zLa=this.web.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,q,this.zLa);I.prototype.Xc.call(this)};F.prototype.web=
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.N(g.sa);G.xz=this.object.get("attachToParent");G.translationX=this.object.get("x",0);G.translationY=this.object.get("y",0);G.We=this.object.get("z",0);G.Ge=this.object.get("width",1);G.Ve=this.object.get("height",1);G.Yd=w.x*y;
G.Ad=w.y*y;G.Ue=w.z*y;G.positionX=0;G.positionY=0;G.positionZ=0};return F}(C)},nb:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);this.F.L(g.nb).F=this.uc;k.ba(this.object,n,this.vLa||(this.vLa=this.ueb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,n,this.vLa);I.prototype.Xc.call(this)};F.prototype.ueb=function(){this.F.N(g.nb).id=this.object.get("parentId")};return F}(C)},jSa:function(C){return function(I){function F(){return I!==
null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);k.ba(this.object,l,this.yLa||(this.yLa=this.veb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,l,this.yLa);I.prototype.Xc.call(this)};F.prototype.veb=function(){var G=this.object.get("maxWorldToPixelScale"),N=this.object.get("minWorldToPixelScale");if(G!==void 0||N!==void 0){var O=this.F.N(g.Lk,!0);O.MD=G;O.ND=N;O.Ge=O.Ve=O.zh=this.object.get("scale")}else(O=this.F)===null||O===void 0||O.ka(g.Lk)};
return F}(C)},asa:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);this.F.L(g.sa);k.ba(this.object,x,this.ALa||(this.ALa=this.xeb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,x,this.ALa);I.prototype.Xc.call(this)};F.prototype.xeb=function(){var G=this.F.N(g.sa);G.xz=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.ff=this.object.get("rotationOrder","XYZ");G.Yd=this.object.get("rotationX",0);G.Ad=this.object.get("rotationY",0);G.Ue=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.We=this.object.get("translationZ",0)};return F}(C)},ud:function(C){return function(I){function F(){return I!==null&&I.apply(this,
arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);k.ba(this.object,z,this.CLa||(this.CLa=this.Beb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,z,this.CLa);I.prototype.Xc.call(this)};F.prototype.Beb=function(){var G=this.object.get("clickEnabled"),N=this.object.get("rollOverEnabled");if(G!==!1&&N!==!1)this.F.ka(g.vr);else{var O=this.F.L(g.vr);O.aqa=G===!1;O.bqa=N===!1}G===!1&&N===!1?this.F.ka(g.ud):(O=this.F.N(g.ud,!0),O.JA=this.object.get("useHandCursor"),
O.CE=this.object.get("transparentAreaActive"),O.O=this.object,O.$s=!!G,O.It=!!N)};return F}(C)},vK:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);k.ba(this.object,A,this.ELa||(this.ELa=this.Heb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,A,this.ELa);I.prototype.Xc.call(this)};F.prototype.Heb=function(){var G=this.F.N(g.Yh,!0);G.castShadow=this.object.get("castShadow");G.receiveShadow=
this.object.get("receiveShadow")};return F}(C)},vd:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);this.F.L(g.vd);this.visible=!1;k.ba(this.object,D,this.FLa||(this.FLa=this.Ieb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,D,this.FLa);this.cg(!1);I.prototype.Xc.call(this)};F.prototype.Ieb=function(){var G=this.F.N(g.vd);G.color=this.object.get("color");G.opacity=this.object.get("hidden")?
0:this.object.get("opacity");G.depthTest=this.object.get("depthTest");this.cg(G.opacity>0)};F.prototype.cg=function(G){this.visible!=G&&((this.visible=G)?this.object.o(p.Cd):this.object.o(p.sd))};return F}(C)},jo:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);var G=this.F.L(g.jo);G.properties=this.object;G.O=this.object;k.ba(this.object,E,this.HLa||(this.HLa=this.gJ.bind(this)),!0)};F.prototype.Xc=
function(){k.ca(this.object,E,this.HLa);I.prototype.Xc.call(this)};F.prototype.gJ=function(){this.F.N(g.jo).yqa=this.object.get("video")};return F}(C)},eZ:function(C){return function(I){function F(){return I!==null&&I.apply(this,arguments)||this}P(F,I);F.prototype.Wc=function(){I.prototype.Wc.call(this);k.ba(this.object,B,this.ILa||(this.ILa=this.Keb.bind(this)),!0)};F.prototype.Xc=function(){k.ca(this.object,B,this.ILa);I.prototype.Xc.call(this)};F.prototype.Keb=function(){var G=this.F.N(g.Yh,!0);
G.opacity=this.object.get("enabled")&&!this.object.get("hidden")?this.object.get("opacity"):0;G.O=this.object};return F}(C)}}});
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,k,p,h,g,e,b,c){a=function(l){function q(r,t,u,v){r=l.call(this,r,t,u,v)||this;r.kA=r.kA.bind(r);r.uc=r.F;r.cr=new g;r.cr.bind(h.V,r.um,r,!0);p.ba(r.object,d,r.kA,!0);
r.Wc();return r}P(q,l);q.prototype.Wc=function(){};q.prototype.Xc=function(){};q.prototype.dispose=function(){p.ca(this.object,d,this.kA);this.cr.h(h.V,this.um,this);this.cr=null;this.Xc();l.prototype.dispose.call(this)};q.prototype.um=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*n);t.set("rotationY",
f.y*n);t.set("rotationZ",f.z*n);r.data.scale>.001&&t.set("scale",r.data.scale);this.object.o(h.Hm)};q.prototype.kA=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.tI.N(c.Bh,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.O=this.cr}else this.tI.ka(c.Bh)};return q}(e);var d=["positionDraggable","rotationDraggable",
"scaleDraggable"],f=new k.Euler,n=180/Math.PI;return b.vK(a)});
define("tdv/view/util/MeasureText",["require","exports","tdv/view/util/Font"],function(a,m,k){function p(e,b,c){c===void 0&&(c=null);g.style.fontFamily=k.Lz(b.fontFamily);g.style.font=k.d6(b);g.innerHTML=e;document.body.appendChild(g);var d=new h(Math.ceil(g.clientWidth),Math.ceil(g.clientHeight));document.body.removeChild(g);c&&(c.font=k.d6(b),e=c.measureText(e).width,e>0&&(d.height*=e/d.width,d.width=e));return d}var h=function(){return function(e,b){this.width=e;this.height=b}}(),g=document.createElement("div");
g.style.display="inline-block";g.style.margin="0";g.style.padding="0";g.style.whiteSpace="nowrap";p.$$=function(){return function(){this.fontFamily="Arial";this.fontSize="12px";this.fontWeight="400";this.fontStyle="normal"}}();return p});
define("tdv/player/canvas/MenuCanvas",["require","exports","tdv/view/util/MeasureText","tdv/view/util/Font"],function(a,m,k,p){var h=function(){function e(b,c,d){this.dh=b;this.item=c;this.label=c.get("label");this.fontFamily=this.dh.get("fontFamily","Arial");this.fontSize=Math.round(12*d)+"px";this.backgroundColor=this.dh.get("backgroundColor","#000000");this.aNa=this.dh.get("rollOverBackgroundColor",this.backgroundColor);this.Wfb=this.dh.get("selectedBackgroundColor",this.aNa);this.it=this.dh.get("fontColor",
"#000000");this.bNa=this.dh.get("rollOverFontColor",this.it);this.Xfb=this.dh.get("selectedFontColor",this.bNa);this.hPa=this.gPa=this.Ut=this.Xt=this.height=this.width=this.left=this.top=0;this.status=!1;this.Ima=!0}e.prototype.Jjb=function(){var b=new k.$$;b.fontFamily=this.fontFamily;b.fontSize=this.fontSize;b=k(this.label,b);this.Xt=b.width;this.Ut=b.height};e.prototype.rhb=function(b){this.status!==b&&(this.status=b,this.Ima=!0)};e.prototype.wab=function(b){if(this.Ima){this.Ima=!1;switch(this.status){case "over":var c=
this.aNa;var d=this.bNa;break;case "selected":c=this.Wfb;d=this.Xfb;break;default:c=this.backgroundColor,d=this.it}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+" "+p.Lz(this.fontFamily);b.textBaseline="middle";b.textAlign="center";b.fillText(this.label,Math.round(this.gPa),Math.round(this.hPa));return!0}return!1};return e}(),g=180/Math.PI;return function(){function e(b,c){this.dh=b;this.items=
c.map(this.F$a.bind(this));this.xO=this.yO=this.Xi=this.Yi=0;this.Ck();this.canvas=document.createElement("canvas");this.canvas.width=this.Yi;this.canvas.height=this.Xi;this.context=this.canvas.getContext("2d");this.selectedIndex=this.kw=-1}e.prototype.F$a=function(b){return new h(this.dh,b,3)};e.prototype.gcb=function(b){return this.Yi/3*b/300};e.prototype.tbb=function(b){return this.Xi/3*b/300};e.prototype.df=function(){return 2*Math.atan2(this.Yi/3*.5,300)*g};e.prototype.Zf=function(){return this.Yi};
e.prototype.pg=function(){return this.Xi};e.prototype.zg=function(){return this.canvas};e.prototype.Ck=function(){var b=0,c=0;this.items.forEach(function(l){l.Jjb();b=Math.max(l.Xt,b);c=Math.max(l.Ut,c)}.bind(this));this.yO=b+30;this.xO=c+30;var d=0,f=0,n=0;this.xW=20;this.items.length>20&&(this.xW=Math.ceil(this.items.length/Math.ceil(this.items.length/20)));this.items.forEach(function(l){n>=this.xW&&(n=0,f+=this.yO,d=0);l.left=f;l.top=d;l.gPa=f+this.yO*.5;l.hPa=d+this.xO*.5;l.width=this.yO;l.height=
this.xO;n+=1;d+=this.xO}.bind(this));this.Yi=Math.ceil(this.items.length/this.xW)*this.yO;this.Xi=Math.min(this.xW,this.items.length)*this.xO};e.prototype.update=function(){for(var b=!1,c=0;c<this.items.length;c++)this.items[c].rhb(this.kw==c?"over":this.selectedIndex==c?"selected":"normal"),b=this.items[c].wab(this.context)||b;return b};e.prototype.ama=function(b,c){var d=-1;b>=0&&b<this.Yi&&c>=0&&c<this.Xi&&(d=Math.floor(b/this.yO)*this.xW+Math.floor(c/this.xO),d>=this.items.length&&(d=-1));return d};
e.prototype.sE=function(b){this.kw=b};e.prototype.Bw=function(b){this.selectedIndex=b};e.prototype.clear=function(){this.items=this.canvas=this.context=this.dh=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,k,p,h,g,e,b,c,d,f,n,l){function q(A){return c.isPresenting?-v.setFromQuaternion(c.Bm,"YXZ").y*x:A.get("camera").get("yaw")}function r(A){return c.isPresenting?
v.setFromQuaternion(c.Bm,"YXZ").x*x:A.get("camera").get("pitch")}a=function(){function A(D,E,B){this.model=D;this.uc=E;this.Oa=B;this.E7=this.E7.bind(this);this.Jn=[];this.EO=[];this.Nq=!1;c.O.bind(h.V,this.kb,this,!0);p.ba(this.model,["xrMenu"],this.E7,!0)}A.prototype.dispose=function(){p.ca(this.model,["xrMenu"],this.E7);c.O.h(h.V,this.kb,this);this.Ba()};A.prototype.kb=function(){this.UPa()};A.prototype.E7=function(){this.UPa()};A.prototype.UPa=function(){var D=c.isPresenting?this.model.get("xrMenu"):
null;D!=this.dh&&(this.dh&&this.Ba(),(this.dh=D)&&this.Ya())};A.prototype.Ya=function(){this.Gv=this.Oa.T.tc("CameraOffsetGroup");this.Gv.L(d.Group);this.Gv.L(d.sa).easing=0;var D=this.Gv.L(d.bK);D.Oa=this.Oa;D.rotate=!1;this.Gv.L(d.nb).F=this.uc;this.gw=new t(this.model,this.dh,this.Gv);this.gw.bind(h.oa,this.qeb,this,!0);this.gw.bind(h.Db,this.reb,this,!0);this.gw.bind(h.rc,this.seb,this,!0)};A.prototype.qeb=function(){this.LOa();this.nFa(this.dh,0);this.gw.cg(!1)};A.prototype.nFa=function(D,E){for(;this.Jn.length>
E;)this.jla(this.Jn.pop());this.Jn.push(this.G$a(D))};A.prototype.rGa=function(){for(this.gw.cg(!0);this.Jn.length;)this.jla(this.Jn.pop())};A.prototype.G$a=function(D){D=new u(this.model,this.dh,D,this.Gv,this.Jn.length>0?this.Jn[this.Jn.length-1]:this.gw);if(this.Jn.length>0){var E=this.Jn[this.Jn.length-1];var B=E.Ic();E=E.Jc()+E.df()/2+1+D.df()/2;D.setPosition(E,B)}else E=q(this.model),B=r(this.model);D.setPosition(E,B);D.lna.get("children",[]).forEach(function(C){C.bind(h.oa,this.nLa,this,!0)},
this);D.bind(h.rc,this.mLa,this,!0);D.bind(h.Db,this.lLa,this,!0);return D};A.prototype.jla=function(D){D.lna.get("children",[]).forEach(function(E){E.h(h.oa,this.nLa,this)},this);D.h(h.rc,this.mLa,this);D.h(h.Db,this.lLa,this);this.qoa(D);D.dispose()};A.prototype.nLa=function(D){D=D.source;if(D.get("children",[]).length){var E=this.Jab(D);this.nFa(D,E+1)}else this.rGa()};A.prototype.mLa=function(D){this.g9a(D.source)};A.prototype.lLa=function(D){this.qoa(D.source)};A.prototype.seb=function(){this.tP()};
A.prototype.reb=function(){this.tP()};A.prototype.g9a=function(D){this.qoa(D);this.EO.push(D);this.EO.length>0&&this.jib();this.tP()};A.prototype.qoa=function(D){this.EO=this.EO.filter(function(E){return E!=D});this.EO.length==0&&this.LOa();this.tP()};A.prototype.tP=function(){this.ONa(this.EO.length>0||this.gw.Nq())};A.prototype.ONa=function(D){this.Nq!==D&&((this.Nq=D)?(this.model.get("camera").yNa(!0),this.model.get("camera").VNa(!0),this.r8&&(clearTimeout(this.r8),this.r8=0)):this.r8=setTimeout(function(){this.r8=
0;this.model.get("camera").yNa(!1);this.model.get("camera").VNa(!1)}.bind(this),100))};A.prototype.LOa=function(){this.Z4||(this.Z4=setTimeout(this.rGa.bind(this),3E3))};A.prototype.jib=function(){this.Z4&&(clearTimeout(this.Z4),this.Z4=0)};A.prototype.Jab=function(D){return this.Jn.findIndex(function(E){return E.lna.get("children",[]).indexOf(D)>=0?!0:!1})};A.prototype.Ba=function(){this.Gv&&(this.Gv.T.fd(this.Gv),this.Gv=null);this.gw&&(this.gw.dispose(),this.gw=null);for(;this.Jn.length;)this.jla(this.Jn.pop());
this.ONa(!1)};return A}();b=function(A){function D(E,B,C,I,F){var G=A.call(this)||this;G.model=E;G.dh=B;G.T6=C;G.Nj=I;G.hw=new e(G.dh,G.T6);G.Za=0;G.pitch=0;G.uf=new f("linear",[new n("coef",0,1)],150);G.kw=-1;G.selectedIndex=-1;G.Te=!1;F?(G.PX=F===null||F===void 0?void 0:F.Jc(),G.Dpa=F===null||F===void 0?void 0:F.Ic()):(G.PX=q(G.model),G.Dpa=r(G.model));G.F=G.Nj.T.tc("MenuItems");G.F.L(d.Plane).renderOrder=g.LRa;G.F.L(d.nb).F=G.Nj;G.F.L(d.sa).ff="YXZ";E=G.F.L(d.Gf);E.source=G.hw.zg();E.isSprite=
!1;E.hidden=!1;E.depthTest=!1;G.F.L(d.mF);E=G.F.L(d.ud);E.JA=!0;E.CE=!1;E.O=G;E.$s=!0;E.It=!0;G.$Ja=Date.now();G.bind(h.mb,G.Mj,G,!0);G.bind(h.rc,G.XD,G,!0);G.bind(h.Db,G.Nn,G,!0);G.bind(h.oa,G.qLa,G,!0);c.O.bind(h.pY,G.WD,G,!0);l.requestFrame(G.op,G);G.xp();G.RJ();G.WD();return G}P(D,A);D.prototype.dispose=function(){this.h(h.mb,this.Mj,this);this.h(h.rc,this.XD,this);this.h(h.Db,this.Nn,this);this.h(h.oa,this.qLa,this);c.O.h(h.pY,this.WD,this);l.dGa(this.op,this);this.F.T.fd(this.F)};D.prototype.Jc=
function(){return this.Za};D.prototype.Ic=function(){return this.pitch};D.prototype.df=function(){return this.hw.df()};D.prototype.FIa=function(){return this.selectedIndex};D.prototype.Nq=function(){return this.Te};D.prototype.setPosition=function(E,B){this.Za=E;this.pitch=B;this.TJ()};D.prototype.Mj=function(E){this.sE(this.$Ha(E))};D.prototype.XD=function(){this.Te=!0;this.RJ()};D.prototype.Nn=function(){this.Te=!1;this.sE(-1);this.RJ()};D.prototype.qLa=function(E){E=this.$Ha(E);this.Bw(E);this.T6[E].o(h.oa)};
D.prototype.$Ha=function(E){var B=(E.data.localPosition.x+.5)*this.hw.Zf();E=(.5-E.data.localPosition.y)*this.hw.pg();return this.hw.ama(B,E)};D.prototype.op=function(){c.isPresenting||this.WD();l.requestFrame(this.op,this)};D.prototype.WD=function(){if(this.uf){var E=Date.now();this.uf.Lb(E-this.$Ja);this.$Ja=E;this.uf.Qe()&&(this.uf=null);this.RJ()}this.TJ()};D.prototype.setScale=function(E){this.F.getComponent(d.sa).scale!=E&&(this.F.N(d.sa).scale=E)};D.prototype.Sn=function(E){this.F.getComponent(d.Gf).opacity!=
E&&(this.F.N(d.Gf).opacity=E)};D.prototype.sE=function(E){this.kw!=E&&(this.kw>=0&&this.T6[this.kw].o(h.Db),this.kw=E,this.kw>=0&&this.T6[this.kw].o(h.rc),this.xp())};D.prototype.Bw=function(E){this.selectedIndex!=E&&(this.selectedIndex=E,this.xp())};D.prototype.xp=function(){this.hw.Bw(this.selectedIndex);this.hw.sE(this.kw);this.hw.update()&&(this.F.N(d.Gf).HJ=Date.now())};D.prototype.TJ=function(){var E=this.dh.get("distance")/this.model.get("worldUnitToMeters",1),B=this.F.N(d.sa);w.identity();
w.multiply(y.makeRotationFromQuaternion(c.yg,"YXZ"));w.multiply(y.makeRotationFromQuaternion(c.Bm,"YXZ").invert());var C=this.Za,I=this.pitch;if(this.uf){var F=this.uf.ib("coef");for(C-=this.PX;C>180;)C-=360;for(;C<-180;)C+=360;I-=this.Dpa;C=this.PX+C*F;I=this.Dpa+I*F}w.multiply(y.makeRotationFromEuler(v.set(I*z,-C*z,0,"YXZ"),"YXZ"));v.setFromRotationMatrix(w,B.ff);B.Yd=v.x*x;B.Ad=v.y*x;B.Ue=v.z*x;B.positionZ=-E;B.Ge=this.hw.gcb(E);B.Ve=this.hw.tbb(E)};D.prototype.RJ=function(){};return D}(b);var t=
function(A){function D(E,B,C){E=A.call(this,E,B,[B],C,null)||this;E.visible=!0;E.F.L(d.sa).easing=.01;E.IO=E.IO.bind(E);p.ba(E.model,["camera.pitch","camera.yaw"],E.IO,!0);return E}P(D,A);D.prototype.dispose=function(){A.prototype.dispose.call(this);p.ca(this.model,["camera.pitch","camera.yaw"],this.IO)};D.prototype.cg=function(E){this.visible!==E&&(this.visible=E,this.visible||(this.sE(-1),this.Bw(-1)),E=!this.visible,this.F.getComponent(d.Gf).hidden!==E&&(this.F.N(d.Gf).hidden=E,this.IO()))};D.prototype.IO=
function(){this.visible&&(this.setPosition(q(this.model),this.JIa()),this.RJ())};D.prototype.WD=function(){this.IO();A.prototype.WD.call(this)};D.prototype.RJ=function(){var E=this.dh.get("opacity",.5),B=this.dh.get("rollOverOpacity",E);E=this.Te?B:E;var C=.66,I=this.model.get("camera"),F=r(this.model);I=Math.abs(F-this.JIa())/(I.get("fov")*.5);I<1&&(C+=(1-I)*(1-C),E+=(1-I)*(B-E));E*=this.uf?this.uf.ib("coef"):1;this.Sn(Math.min(1,Math.max(0,E)));this.setScale(C);this.xp()};D.prototype.JIa=function(){var E=
r(this.model);return Math.min(90,Math.max(-90,40-E))};return D}(b),u=function(A){function D(E,B,C,I,F){E=A.call(this,E,B,C.get("children",[]),I,F)||this;E.lna=C;return E}P(D,A);D.prototype.RJ=function(){var E=this.dh.get("opacity",.5),B=this.dh.get("rollOverOpacity",E);E=this.Te?B:E;E*=this.uf?this.uf.ib("coef"):1;this.Sn(Math.min(1,Math.max(0,E)))};return D}(b),v=new k.Euler,w=new k.Matrix4,y=new k.Matrix4,x=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,k,p){return function(){function h(g,e){this.renderer=g;this.model=e;this.lb=this.renderer.R;this.r7=this.r7.bind(this);this.bj=[];this.GA="";this.iw=null;this.Ya()}h.prototype.dispose=function(){this.Ba()};h.prototype.Ya=function(){k.ba(this.model,"objects",this.r7,!0);this.model.bind(p.rc,this.pLa,this,!0);this.model.bind(p.Db,this.oLa,this,
!0)};h.prototype.Ba=function(){this.model.h(p.rc,this.pLa,this);this.model.h(p.Db,this.oLa,this);k.ca(this.model,"objects",this.r7);this.rE([]);this.iw&&this.Nn(this.iw)};h.prototype.r7=function(){this.rE(this.model.get("objects"))};h.prototype.rE=function(g){this.bj!=g&&(this.bj.forEach(function(e){e.h(p.rc,this.uLa,this);e.h(p.Db,this.tLa,this);e.h(p.sd,this.sLa,this)}.bind(this)),this.iw&&this.bj.indexOf(this.iw)>=0&&g.indexOf(this.iw)<0&&this.Nn(this.iw),this.bj=g,this.bj.forEach(function(e){e.bind(p.rc,
this.uLa,this,!0);e.bind(p.Db,this.tLa,this,!0);e.bind(p.sd,this.sLa,this,!0)}.bind(this)))};h.prototype.uLa=function(g){g=g.source;this.XD(g,g.get("toolTip"))};h.prototype.tLa=function(g){this.Nn(g.source)};h.prototype.sLa=function(g){this.Nn(g.source)};h.prototype.pLa=function(){this.XD(this.model,this.model.get("toolTip"))};h.prototype.oLa=function(){this.Nn(this.model)};h.prototype.Nn=function(g){this.iw==g&&(this.iw=null,this.iOa(""))};h.prototype.XD=function(g,e){this.iw!=g&&(this.iw=g,this.iOa(e||
""))};h.prototype.iOa=function(g){this.GA!=g&&(this.GA=g,this.lb.set("toolTip",this.GA))};return h}()});
define("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas",["require"],function(){function a(m){this.Ie=this.Nu(m.get("surfaceReticleColor"));this.az=this.Nu(m.get("surfaceReticleSelectionColor"));this.$e=m.get("surfaceReticleOpacity");this.P3a=m.get("surfaceReticleSelectionOpacity");this.Mm=this.Ch=128;this.k2a=.456;this.l2a=.088;this.x_a=.18;this.ea=document.createElement("canvas");this.ea.width=this.Ch;this.ea.height=this.Mm;this.Da=this.ea.getContext("2d");this.Da.fillStyle=
"red";this.Da.imageSmoothingEnabled=!0;this.Da.fillRect(0,0,this.Ch,this.Mm);this.zd=this.Cx=!1;this.KL=this.P1=void 0;this.IF=0}a.prototype.vda=function(){return this.Xl(this.az[0]*NaN+NaN*this.Ie[0],this.az[1]*NaN+NaN*this.Ie[1])};a.prototype.Nu=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.Xl=function(m,k){return"rgba("+m.join(",")+", "+k+")"};a.prototype.setPosition=function(m){this.Pb!=m&&(this.Pb=
m,this.Rd=!0)};a.prototype.Zf=function(){return this.Ch};a.prototype.pg=function(){return this.Mm};a.prototype.zg=function(){return this.ea};a.prototype.update=function(){if(!this.Rd)return!1;this.Rd=!1;this.Da.clearRect(0,0,this.Ch,this.Mm);var m=[this.az[0]*this.Pb+(1-this.Pb)*this.Ie[0],this.az[1]*this.Pb+(1-this.Pb)*this.Ie[1],this.az[2]*this.Pb+(1-this.Pb)*this.Ie[2]],k=this.P3a*this.Pb+(1-this.Pb)*this.$e;this.Da.strokeStyle=this.Xl(m,k);this.Da.fillStyle=this.Xl(m,k*this.Pb);this.Da.beginPath();
this.Da.lineWidth=this.Ch*this.l2a;this.Da.arc(.5*this.Ch,.5*this.Ch,this.Ch*this.k2a,0,2*Math.PI,!1);this.Da.stroke();this.Da.beginPath();this.Da.arc(.5*this.Ch,.5*this.Ch,this.Ch*this.x_a,0,2*Math.PI,!1);this.Da.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(l,q,r){this.ma=l;this.xb=q;this.m=r;this.R=this.m.R;this.By=this.By.bind(this);this.Ky=this.Ky.bind(this);this.zd=void 0;
this.ma.bind(p.K("surfaceSelectionEnabled"),this.Rca,this,!0);this.Rca()}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/EventDispatcher"),g=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.Rca=function(){var l=this.ma.get("surfaceSelectionEnabled");!!this.A!=l&&(l?this.lG():this.Qr())};
m.prototype.lG=function(){if(!this.A){this.A=this.xb.T.tc("PointerReticle");this.A.L(d.Plane).renderOrder=g.ySa;this.A.L(d.vl).F=this.xb;this.A.L(d.vr);this.A.L(d.mF);this.A.L(d.nb).F=this.xb;var l=this.A.L(d.Bp);l.O=new h;l.O.bind(p.V,this.oS,this,!0);k.ba(this.ma,f,this.By,!0);this.vv=new e(this.R);this.vv.setPosition(0);this.vv.update();l=this.A.L(d.Gf);l.source=this.vv.zg();l.depthTest=!1;k.ba(this.ma,n,this.Ky,!0);c.O.bind(p.V,this.jM,this,!0);this.Ae=null;this.LH(!1)}};m.prototype.Qr=function(){this.A&&
(this.Ae&&(this.Ae.o(p.Db),this.Ae=null),k.ca(this.ma,n,this.Ky),this.OT(null),this.A.getComponent(d.Bp).O.h(p.V,this.oS,this,!0),this.xb.T.fd(this.A),this.vv=this.A=null,c.O.h(p.V,this.jM,this),k.ca(this.ma,f,this.By))};m.prototype.By=function(){var l=this.A.N(d.Lk,!0);l.Ge=l.Ve=2;l.scale=this.ma.get("surfaceReticleRadius");l.MD=this.ma.get("surfaceReticleMaxRadius");l.ND=this.ma.get("surfaceReticleMinRadius")};m.prototype.oS=function(l){l=this.mwa(l.data.beacons);var q=this.Wva(l);q==0&&(l=null);
this.Z3a(l);this.p4a(q)};m.prototype.Ky=function(){this.OT(this.ma&&this.ma.get("pointer"))};m.prototype.OT=function(l){this.ue!==l&&(this.ue&&(this.ue.h(p.oa,this.Dy,this,!0),this.ue.h(p.mb,this.lg,this,!0),this.ue.h(p.Db,this.ps,this,!0)),this.ue=l)&&(this.ue.bind(p.oa,this.Dy,this,!0),this.ue.bind(p.mb,this.lg,this,!0),this.ue.bind(p.Db,this.ps,this,!0))};m.prototype.Dy=function(l){var q=null;if(b.yb()&&!c.isPresenting){var r=this.A.getComponent(d.Bp);r&&r.MV&&l.data.position&&(l=r.MV((new THREE.Vector3).copy(l.data.position)),
l=this.mwa(l),this.Wva(l)!=0&&(q=this.sda(l)))}else q=this.Ae;q&&q.o(p.oa)};m.prototype.lg=function(l){this.LH(l.data.type=="other"?!1:!0)};m.prototype.ps=function(){this.LH(!1)};m.prototype.LH=function(l){this.zd!==l&&(this.zd=l,this.bm())};m.prototype.jM=function(){this.bm()};m.prototype.bm=function(){this.A.N(d.Gf).opacity=b.yb()&&!c.isPresenting||!this.zd?0:1};m.prototype.Z3a=function(l){l=this.sda(l);this.Ae!=l&&(this.Ae&&this.Ae.o(p.Db),(this.Ae=l)&&this.Ae.o(p.rc))};m.prototype.mwa=function(l){if(!l)return null;
for(var q=0;q<l.length;q++)if(this.sda(l[q]))return l[q];return null};m.prototype.Wva=function(l){if(!l)return 0;var q=this.A.getComponent(d.sa);return q?Math.max(0,1-l.distance/(this.ma.get("surfaceSelectionCoef")*q.scale*q.Ge)):0};m.prototype.sda=function(l){return(l=(l=l&&l.entity)&&l.getComponent(d.MP))&&l.pib||null};m.prototype.p4a=function(l){this.vv.setPosition(l);this.vv.update()&&(this.A.N(d.Gf).HJ=(new Date).getTime())};m.prototype.dispose=function(){this.Qr();this.ma.h(p.K("surfaceSelectionEnabled"),
this.Rca,this,!0)};var f=["surfaceReticleRadius","surfaceReticleMaxRadius","surfaceReticleMinRadius"],n=["pointer"];return m});
define("tdv/player/view/model3d/renderer/adapters/objects/NearestObjectsVisibleAdapter",["require","tdv/binding/BindingsHandler","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/player/view/webgl/components"],function(a){function m(b,c,d){this.ma=b;this.xb=c;this.Mr=d;this.ga=!1;this.p1=this.p1.bind(this);k.ba(this.ma,e,this.p1,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/webgl/components");m.prototype.p1=
function(){var b=!!this.ma.get("maxNearestObjectsVisible");this.ga!=b&&(this.ga&&this.Qr(),(this.ga=b)&&this.lG())};m.prototype.lG=function(){var b=this.Mr.L(g.Bp);b.O=new h;b.O.bind(p.V,this.oS,this,!0);this.xb.T.Xa()};m.prototype.Qr=function(){this.Mr.getComponent(g.Bp).O.h(p.V,this.oS,this,!0);this.Mr.ka(g.Bp);this.ma.get("objects").forEach(function(b){b.get("hideBasedOnDistance")&&b.Voa(!1)})};m.prototype.oS=function(b){var c=0,d=this.ma.get("maxNearestObjectsVisible");b.data.beacons.forEach(function(f){if(f=
this.yYa(f))f.get("hideBasedOnDistance")?(f.Voa(c>=d),c++):f.Voa(!1)}.bind(this))};m.prototype.yYa=function(b){b=(b=b.entity.getComponent(g.MP))&&b.object;b.get&&b.get("hideBasedOnDistance")!==void 0||(b=null);return b};m.prototype.dispose=function(){k.ca(this.ma,e,this.p1);this.ga&&(this.ga=!1,this.Qr())};var e=["maxNearestObjectsVisible"];return m});
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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/webgl/components");a=m.extend(h,function(b,c){h.call(this);this.ae=b;this.xb=c;this.mg=this.mg.bind(this);this.A=null;this.fm=
0;this.Md=!1;this.lT=[];this.ae.bind(p.K("areaOpacity"),this.Kza,this);this.zq()});a.prototype.t8=function(b){this.lT.forEach(function(c){c.h(p.Cd,this.we,this,!0);c.h(p.sd,this.we,this,!0)}.bind(this));this.lT=b;this.lT.forEach(function(c){c.bind(p.Cd,this.we,this,!0);c.bind(p.sd,this.we,this,!0)}.bind(this));this.UDa();this.we()};a.prototype.dispose=function(){this.ae.h(p.K("areaOpacity"),this.Kza,this);this.kz()};a.prototype.$i=function(){return this.A};a.prototype.isVisible=function(){return this.Md};
a.prototype.Kza=function(){this.zq();this.bm()};a.prototype.zq=function(){this.ae.get("areaOpacity")>0?this.UC():this.kz()};a.prototype.UC=function(){if(!this.A){this.A=this.xb.T.tc("MeasureArea");var b=new h;b.bind(p.V,this.rC,this,!0);this.A.L(g.co).O=b;this.A.L(g.vd);this.A.L(g.nb).F=this.xb;k.ba(this.ae,e,this.mg,!0);this.UDa()}};a.prototype.kz=function(){this.A&&(this.A.getComponent(g.co).O.h(p.V,this.rC,this,!0),k.ca(this.ae,e,this.mg),this.A.T.fd(this.A),this.A=null)};a.prototype.mv=function(b){this.Md!=
b&&((this.Md=b)?(this.oq(1),this.o(p.Cd)):(this.oq(0),this.o(p.sd)))};a.prototype.we=function(){this.mv(this.lT.every(function(b){return b.isVisible()}))};a.prototype.rC=function(b){this.ae.set("area",b.data.area)};a.prototype.mg=function(){if(this.A){var b=this.A.N(g.vd);b.color=this.ae.get("areaColor");b.depthTest=this.ae.get("depthTest");b.doubleSided=!0;this.bm()}};a.prototype.oq=function(b){this.fm!=b&&(this.fm=b,this.bm())};a.prototype.bm=function(){this.A&&(this.A.N(g.vd).opacity=this.ae.get("areaOpacity")*
Math.max(1E-4,this.fm))};a.prototype.UDa=function(){this.A&&(this.A.N(g.co).v=this.lT.map(function(b){return b.$i()}))};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.fda=this.Nu("#ffffff");this.wB=this.Nu("#000000");this.Mm=this.Ch=0;this.ea=document.createElement("canvas");this.Da=this.ea.getContext("2d");this.Da.imageSmoothingQuality="high";this.sv=new k.$$;this.gda=this.rL=void 0;this.Jaa=this.Kaa=.5;this.Us=void 0;this.eN=m.G$;this.pz=void 0;this.hP(0)}var k=a("tdv/view/util/MeasureText"),p=
a("tdv/view/util/Font");m.hra="imperial area";m.ira="imperial length";m.pra="metric area";m.G$="metric length";m.prototype.dispose=function(){this.ea.width=this.ea.height=0;this.ea=null};m.prototype.sgb=function(h){this.fda!=h&&(this.fda=h,this.Rd=!0)};m.prototype.agb=function(h){this.wB!=h&&(this.wB=h,this.Rd=!0)};m.prototype.tgb=function(h){this.gda!=h&&(this.gda=h,this.Rd=!0)};m.prototype.ugb=function(h){this.rL!=h&&(this.rL=h,this.Rd=!0)};m.prototype.Koa=function(){this.sv.yN!=.5&&(this.Jaa=.5,
this.Rd=!0)};m.prototype.Loa=function(h){this.sv.zN!=h&&(this.Kaa=h,this.Rd=!0)};m.prototype.hP=function(h){this.Us!=h&&(this.Us=h,this.Aja())};m.prototype.vhb=function(h){this.eN!=h&&(this.eN=h,this.Aja())};m.prototype.whb=function(h){this.pz!=h&&(this.pz=h,this.Aja())};m.prototype.Aja=function(){if(this.pz===void 0)this.Wa=this.Us.toFixed(2);else if(this.eN==m.G$){var h=this.Us*this.pz;this.Wa=h>=1?h.toFixed(2)+"m":(h*100).toFixed(2)+"cm"}else this.eN==m.pra?(h=this.Us*this.pz*this.pz,this.Wa=h>=
.1?h.toFixed(2)+"m\u00b2":(h*1E4).toFixed(2)+"cm\u00b2"):this.eN==m.ira?(h=this.Us*this.pz*1.0936,this.Wa=h>1760?(h/1760).toFixed(2)+"mi":h>=100?h.toFixed(2)+"yd":h*3>=1?(h*3).toFixed(2)+"ft":(h*3*12).toFixed(2)+"in"):this.eN==m.hra&&(h=this.Us*this.pz*this.pz*10.76364864,this.Wa=h>=1?h.toFixed(2)+"ft\u00b2":(h*144).toFixed(2)+"in\u00b2");this.Rd=!0};m.prototype.Nu=function(h){h=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h);return[parseInt(h[1],16),parseInt(h[2],16),parseInt(h[3],16)]};m.prototype.Xl=
function(h,g){return"rgba("+h.join(",")+", "+g+")"};m.prototype.Zf=function(){return this.Ch};m.prototype.pg=function(){return this.Mm};m.prototype.zg=function(){return this.ea};m.prototype.update=function(){if(!this.Rd)return!1;this.Rd=!1;this.sv.fontFamily=this.gda||"Arial";this.sv.fontSize=this.rL?typeof this.rL=="string"?this.rL:this.rL+"px":"30px";var h=k(this.Wa,this.sv),g=this.Nu(this.fda),e=this.Nu(this.wB),b=h.width;h=h.height;var c=.5*h,d=.3*h,f=c+b+.5*h,n=d+h+.2*h,l=.5*n;this.ea.width=
this.ea.height=this.Ch=this.Mm=Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(f,n))/Math.LN2)));var q=this.Ch*this.Jaa-f*this.Jaa,r=this.Mm*this.Kaa-n*this.Kaa;this.VK();this.Da.save();this.Da.translate(q,r);this.Da.fillStyle=this.Xl(e,1);this.Da.beginPath();this.Da.moveTo(0,l);this.Da.quadraticCurveTo(0,0,l,0);this.Da.lineTo(f-l,0);this.Da.quadraticCurveTo(f,0,f,l);this.Da.quadraticCurveTo(f,n,f-l,n);this.Da.lineTo(l,n);this.Da.quadraticCurveTo(0,n,0,n-l);this.Da.closePath();this.Da.fill();
this.Da.fillStyle=this.Xl(g,1);this.Da.font=this.sv.fontSize+" '"+this.sv.fontFamily+"'";this.Da.font=this.sv.fontSize+(isNaN(this.sv.fontSize)?"":"px")+" "+p.Lz(this.sv.fontFamily);this.Da.textBaseline="middle";this.Da.textAlign="center";this.Da.fillText(this.Wa,Math.round(c+b*.5),Math.round(d+h*.5));this.Da.restore();return!0};m.prototype.VK=function(){this.Da.clearRect(0,0,this.Ch,this.Mm)};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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/constants/RenderOrder"),g=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(g,function(f,n,l){g.call(this);this.zfa=f;this.ae=n;this.xb=l;this.mg=this.mg.bind(this);this.qq=this.A=null;this.fm=0;this.Md=!1;this.G3=this.ai=this.FC=this.kC=null;this.Us=void 0;this.Li=new b;this.zfa.bind(p.K("worldUnitToMeters"),this.tga,this,!0);this.ae.bind(p.K("units"),this.fga,this,!0);this.UC()});a.prototype.RNa=function(f){this.f3(f,
null,null)};a.prototype.dhb=function(f){this.f3(null,f,null)};a.prototype.$fb=function(f){this.f3(null,null,f)};a.prototype.f3=function(f,n,l){if(this.FC!=n||this.kC!=f||this.ai!=l)[this.kC,this.FC,this.ai].forEach(function(q){q&&q.h(p.Cd,this.we,this,!0);q&&q.h(p.sd,this.we,this,!0)}.bind(this)),this.kz(),this.kC=f,this.FC=n,this.ai=l,this.UC(),this.mg(),this.Yg(!0),[this.kC,this.FC,this.ai].forEach(function(q){q&&q.bind(p.Cd,this.we,this,!0);q&&q.bind(p.sd,this.we,this,!0)}.bind(this)),this.kC?
(this.A.N(e.nb).F=this.kC.$i(),this.A.N(e.sa).We=.5,f=this.A.N(e.Sprite),f.yN=.5,f.zN=.5,this.Li.Koa(),this.Li.Loa(.5)):this.FC?(this.A.N(e.nb).F=this.FC.$i(),this.A.N(e.sa).We=0,f=this.A.N(e.Sprite),f.yN=.5,f.zN=1.1,this.Li.Koa(),this.Li.Loa(1)):this.ai?(this.A.N(e.nb).F=this.ai.$i(),this.A.N(e.sa).We=0,f=this.A.N(e.Sprite),f.yN=.5,f.zN=.5,this.Li.Koa(),this.Li.Loa(.5)):this.A.N(e.nb).F=null,this.we(),this.fga(),this.tga()};a.wSa="partialDistance";a.isa="distance";a.vSa="area";a.prototype.setStyle=
function(f){this.G3!=f&&(this.G3=f,this.mg())};a.prototype.hP=function(f){f!==void 0&&this.Us!==f&&(this.Us=f,this.Li.hP(f),this.Yg(),this.we())};a.prototype.dispose=function(){this.zfa.h(p.K("worldUnitToMeters"),this.tga,this,!0);this.ae.h(p.K("units"),this.fga,this,!0);this.f3(null,null);this.Li.dispose();this.Li=null;this.kz()};a.prototype.tga=function(){this.Li.whb(this.zfa.get("worldUnitToMeters"));this.Yg()};a.prototype.fga=function(){var f=this.ae.get("units"),n=!!this.ai;this.Li.vhb(f=="imperial"?
n?b.hra:b.ira:n?b.pra:b.G$);this.Yg()};a.prototype.UC=function(){if(!this.A){this.A=this.xb.T.tc("MeasureLabel");this.A.L(e.Sprite).renderOrder=h.GRa;this.A.L(e.vr);var f=this.A.L(e.Gf);f.source=this.Li.zg();f.isSprite=!0;k.ba(this.ae,d,this.mg,!0);this.A.L(e.sa);this.A.L(e.nb)}};a.prototype.kz=function(){this.A&&(k.ca(this.ae,d,this.mg),this.A.T.fd(this.A),this.A=null)};a.prototype.isVisible=function(){return this.Md};a.prototype.mv=function(f){this.Md!=f&&((this.Md=f)?(this.w5a(),this.o(p.Cd)):
(this.v6a(),this.oq(0),this.o(p.sd)))};a.prototype.we=function(){this.mv(this.Us>0&&(this.kC&&this.kC.isVisible()||this.FC&&this.FC.isVisible()||this.ai&&this.ai.isVisible()))};a.prototype.w5a=function(){this.qq||(this.qq=new c,this.qq.set("duration",300),this.qq.bind(c.V9,this.tAa,this,!0),this.qq.bind(c.tl,this.sAa,this,!0),this.qq.play())};a.prototype.v6a=function(){this.qq&&(this.qq.h(c.V9,this.tAa,this,!0),this.qq.h(c.tl,this.sAa,this,!0),this.qq.stop(),this.qq=null)};a.prototype.tAa=function(){this.oq(2*
this.qq.pm()-1)};a.prototype.sAa=function(){this.oq(1)};a.prototype.mg=function(){this.A.N(e.Gf).depthTest=this.wL("depthTest");this.Li.sgb(this.wL("labelFontColor"));this.Li.agb(this.wL("labelBackgroundColor"));this.Li.tgb(this.wL("labelFontFamily"));this.Li.ugb(this.wL("labelFontSize"));this.bm();this.Yg()};a.prototype.wL=function(f){var n;this.G3&&(n=this.ae.get(this.G3+f[0].toUpperCase()+f.substr(1)));n===void 0&&(n=this.ae.get(f));return n};a.prototype.Yg=function(f){if(this.Li.update()||f){f=
this.A.N(e.Gf);var n=this.A.N(e.Sprite);f.HJ=(new Date).getTime();n.width=this.Li.Zf();n.height=this.Li.pg()}};a.prototype.oq=function(f){this.fm!=f&&(this.fm=f,this.bm())};a.prototype.bm=function(){this.A.N(e.Gf).opacity=this.wL("labelOpacity")*Math.max(1E-4,this.fm)};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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/webgl/components");a=m.extend(h,function(b,c){h.call(this);this.ae=b;this.xb=c;this.sn=this.qn=null;this.mg=this.mg.bind(this);this.A=
null;this.fm=0;this.Md=!1;this.UC()});a.prototype.t8=function(b,c){if(this.qn!=b||this.sn!=c)this.qn&&this.qn.h(p.Cd,this.we,this,!0),this.qn&&this.qn.h(p.sd,this.we,this,!0),this.sn&&this.sn.h(p.Cd,this.we,this,!0),this.sn&&this.sn.h(p.sd,this.we,this,!0),this.qn=b,this.sn=c,this.qn&&this.qn.bind(p.Cd,this.we,this,!0),this.qn&&this.qn.bind(p.sd,this.we,this,!0),this.sn&&this.sn.bind(p.Cd,this.we,this,!0),this.sn&&this.sn.bind(p.sd,this.we,this,!0),this.A.N(g.nb,!0).F=this.qn&&this.qn.$i(),this.A.N(g.iu,
!0).F=this.sn&&this.sn.$i(),this.we()};a.prototype.$i=function(){return this.A};a.prototype.dispose=function(){this.t8(null,null);this.kz()};a.prototype.UC=function(){this.A||(this.A=this.xb.T.tc("MeasureLine"),this.A.L(g.Line),this.A.L(g.Xh),this.A.L(g.sa),k.ba(this.ae,e,this.mg,!0))};a.prototype.kz=function(){this.A&&(k.ca(this.ae,e,this.mg),this.A.T.fd(this.A),this.A=null)};a.prototype.isVisible=function(){return this.Md};a.prototype.mv=function(b){this.Md!=b&&((this.Md=b)?(this.oq(1),this.o(p.Cd)):
(this.oq(0),this.o(p.sd)))};a.prototype.we=function(){this.mv(this.qn&&this.qn.isVisible()&&this.sn&&this.sn.isVisible())};a.prototype.mg=function(){var b=this.A.N(g.Xh);b.color=this.ae.get("lineColor");b.depthTest=this.ae.get("depthTest");b.width=this.ae.get("lineWidth");b.depthTest=this.ae.get("depthTest");this.bm()};a.prototype.oq=function(b){this.fm!=b&&(this.fm=b,this.bm())};a.prototype.bm=function(){this.A.N(g.Xh).opacity=this.ae.get("lineOpacity")*Math.max(1E-4,this.fm)};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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/webgl/components");a=m.extend(h,function(d,f,n,l){h.call(this);this.ae=d;this.ma=f;this.xb=n;this.As=l;this.A1=this.A1.bind(this);
this.mg=this.mg.bind(this);this.So=this.So.bind(this);this.A=null;this.pj=this.ET=this.zd=this.vB=!1;this.fm=0;this.Md=!1;this.UC();k.ba(this.ae,e,this.A1,!0);k.ba(this.ae,c,this.mg,!0);k.fD(this.As,b,this.So,!0);this.bind(p.Hm,this.$za,this,!0);this.bind(p.rc,this.F1,this,!0);this.bind(p.Db,this.ps,this,!0);this.So();this.k6()&&this.mv(!0)});a.prototype.dispose=function(){k.ca(this.ae,e,this.A1);k.ca(this.ae,c,this.mg);k.ca(this.As,b,this.So);this.h(p.Hm,this.$za,this,!0);this.h(p.rc,this.F1,this,
!0);this.h(p.Db,this.ps,this,!0);this.kz()};a.prototype.$i=function(){return this.A};a.prototype.tNa=function(d){this.vB!==d&&((this.vB=d)?(d=this.A.L(g.vl),d.F=this.xb,d.rotate=!1,d.O=new h,this.mv(!0),d.O.bind(p.rc,this.ZL,this,!0)):((d=this.A.getComponent(g.vl))&&d.O.h(p.rc,this.ZL,this,!0),this.A.ka(g.vl),d=this.ma.worldPositionToLocal([this.x,this.y,this.z],this.ma.getMatrixWorld()),this.zNa(d[0],d[1],d[2])),this.aD(),this.Lja())};a.prototype.DNa=function(d){d===void 0&&(d=!1);this.pj!==d&&((this.pj=
d)?this.A.L(g.Em):this.A.ka(g.Em))};a.prototype.khb=function(d){this.ET!==d&&(this.ET=d,this.Lja(),this.zd=!1,this.aD())};a.prototype.zNa=function(d,f,n){this.As.set("x",d);this.As.set("y",f);this.As.set("z",n);this.mv(this.k6())};a.prototype.UC=function(){this.A=this.xb.T.tc("MeasurePoint");this.A.L(g.Sphere);this.A.L(g.vd);this.A.L(g.ud).O=this;this.A.L(g.vr);this.A.L(g.sa).O=this;this.A.L(g.Lk);this.A.L(g.nb).F=this.xb;this.Lja();this.bm();this.aD()};a.prototype.kz=function(){this.A.T.fd(this.A);
this.A=null};a.prototype.isVisible=function(){return this.Md};a.prototype.mv=function(d){this.Md!=d&&((this.Md=d)?(this.oq(1),this.o(p.Cd)):(this.oq(0),this.o(p.sd)))};a.prototype.Lja=function(){var d=this.A.N(g.ud);d.JA=this.ET;d.It=this.ET;d.$s=!this.vB;d=this.A.N(g.vr,!0);d.bqa=!this.ET||this.vB;d.aqa=this.vB};a.prototype.ZL=function(){this.mv(!0)};a.prototype.F1=function(){this.zd=!0;this.aD()};a.prototype.ps=function(){this.zd=!1;this.aD()};a.prototype.A1=function(){this.A.N(g.nb).id=this.ae.get("parentId")};
a.prototype.mg=function(){if(this.A){var d=this.A.N(g.Lk);d.Ge=d.Ve=d.zh=1;d.MD=this.ae.get("pointMaxRadius");d.ND=this.ae.get("pointMinRadius");d.scale=this.ae.get("pointRadius")||1;this.A.N(g.vd).depthTest=this.ae.get("depthTest");this.aD()}};a.prototype.aD=function(){if(this.A){var d=this.vB?"pointDragColor":this.zd?"pointOverColor":"pointColor";this.A.N(g.vd).color=this.ae.get(d)}};a.prototype.oq=function(d){this.fm!=d&&(this.fm=d,this.bm())};a.prototype.bm=function(){this.A.N(g.vd).opacity=Math.max(1E-4,
this.fm)};a.prototype.$za=function(d){this.x=d.data.position.x;this.y=d.data.position.y;this.z=d.data.position.z};a.prototype.So=function(){if(this.k6()&&this.A){var d=this.A.N(g.sa,!0);d.positionX=d.positionY=d.positionZ=0;d.Yd=d.Ad=d.Ue=0;d.translationX=this.As.get("x");d.translationY=this.As.get("y");d.We=this.As.get("z")}};a.prototype.k6=function(){var d=this.As.get("x"),f=this.As.get("y"),n=this.As.get("z");return d!==void 0&&f!==void 0||n!==void 0};a.prototype.distanceTo=function(d){var f=this.x-
d.x,n=this.y-d.y;d=this.z-d.z;return Math.sqrt(f*f+n*n+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".split(" "),function(a){function m(u,v,w,y,
x){this.P=u;this.ma=v;this.xb=w;this.m=x;this.R=this.m.R;this.js=this.js.bind(this);this.D1=this.D1.bind(this);this.n1=this.n1.bind(this);this.M1=this.M1.bind(this);this.cM=this.cM.bind(this);this.rC=this.rC.bind(this);this.Ky=this.Ky.bind(this);this.Yp=this.Yp.bind(this);this.ue=null;this.Ej=new Map;this.kT=new Map;this.bs=[];this.WG=[];this.qM=new Map;this.hi=[];this.Aj=null;this.a4();this.Lf=this.pd=void 0;this.ga=!1;k.ba(this.P,["enabled"],this.js,!0)}var k=a("tdv/binding/BindingsHandler"),p=
a("tdv/constants/EventName"),h=a("tdv/constants/Key"),g=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");m.prototype.dispose=function(){this.Qr();k.ca(this.P,["enabled"],this.js);this.Aj=this.hi=this.WG=this.bs=
this.kT=this.Ej=null;this.a4();this.Lf=this.pd=null};m.prototype.js=function(){this.P.get("enabled")?this.lG():this.Qr()};m.prototype.lG=function(){this.ga||(this.ga=!0,this.bWa(),this.Mua(this.P),document.addEventListener("keyup",this.Yp),k.ba(this.P,f,this.D1,!0),k.ba(this.P,l,this.M1,!0),k.ba(this.P,n,this.n1,!0),k.ba(this.P,q,this.cM,!0),k.ba(this.P,r,this.rC,!0),k.ba(this.ma,t,this.Ky,!0))};m.prototype.Qr=function(){this.ga&&(this.ga=!1,this.DCa([]),this.fva(this.P),this.iXa(),document.removeEventListener("keyup",
this.Yp),k.ca(this.P,f,this.D1),k.ca(this.P,l,this.M1),k.ca(this.P,n,this.n1),k.ca(this.P,q,this.cM),k.ca(this.P,r,this.rC),k.ca(this.ma,t,this.Ky),this.OT(null))};m.prototype.Ky=function(){this.OT(this.ma&&this.ma.get("pointer"))};m.prototype.OT=function(u){this.ue!==u&&(this.ue&&(this.ue.h(p.oa,this.Cza,this,!0),this.ue.h(p.Ik,this.Dza,this,!0)),this.ue=u)&&(this.ue.bind(p.oa,this.Cza,this,!0),this.ue.bind(p.Ik,this.Dza,this,!0))};m.prototype.D1=function(){this.DCa(this.P.get("points"))};m.prototype.n1=
function(){var u=this.P.get("mode");if(u!=this.pd){switch(this.pd){case "create":this.hi.length<1||this.Aj&&this.hi.length<2?u="create":this.q3a(this.Aj);break;case "edit":u=="create"?this.P.get("type")==="single"&&this.hi.length>0?u="edit":this.lZ():this.cz(null);break;case "view":u==="create"&&(this.P.get("type")==="single"&&this.hi.length>0?u="view":this.lZ());break;default:u=="create"&&(this.P.get("type")==="single"&&this.hi.length>0&&this.Uda(this.ey(-1))?u="edit":this.cz(this.ey(-1),!1))}this.pd=
u;this.P.set("mode",this.pd);this.xEa()}};m.prototype.M1=function(){var u=this.P.get("type");u!==this.Lf&&(this.Lf=u,this.Lf==="single"&&this.hi.length>1&&this.P.set("points",this.mlb.slice(0,1)))};m.prototype.cM=function(){this.mEa();this.Z3()};m.prototype.rC=function(){var u=this.Ida(this.ai);u&&u.hP(this.P.get("area"))};m.prototype.Yp=function(u){u.which==h.CY&&this.R.get("isKeyboardTarget")&&(this.P.get("mode")=="create"?this.P.set("mode","edit"):this.pd=="edit"&&this.cz(null))};m.prototype.lZ=
function(){this.NTa();this.cz(this.ey(-1),!1)};m.prototype.AR=function(){return d.yb()&&!d.$f()};m.prototype.NTa=function(){var u=this.R.get("application").ni("MeasureModel3DObjectPoint");if(!this.AR()){var v=this.ey(-1);v&&this.Uda(v)&&(u.set("x",v.get("x")),u.set("y",v.get("y")),u.set("z",v.get("z")))}this.P.set("points",this.hi.concat([u]))};m.prototype.ey=function(u){var v=[this.P].concat(this.hi);return u<0&&v.length-u>0?v[v.length+u]:u>=0&&u<v.length?v[u]:null};m.prototype.q3a=function(u){this.P.set("points",
this.hi.filter(function(v){return v!=u}))};m.prototype.Uda=function(u){return!!u&&this.Ej.get(u).k6()};m.prototype.Cza=function(u){if(u.data.type!="other")if(this.P.get("mode")=="create"){if(this.Aj){var v=this.Aj;this.cz(null);this.gUa(v,u)}this.Lf=="single"&&this.hi.length>0?this.P.set("mode","edit"):this.lZ()}else this.P.get("mode")=="edit"&&this.cz(null)};m.prototype.Dza=function(){this.P.get("mode")=="create"&&this.AR()&&this.P.set("mode","edit")};m.prototype.Wza=function(){this.P.get("mode")==
"create"&&this.P.set("mode","edit")};m.prototype.Vza=function(u){if(this.P.get("mode")=="create"){var v=this.ey(-2);u=this.kT.get(u.source);v==u?this.P.set("mode","edit"):(v=this.Aj,this.cz(null),v.set("x",u.get("x")),v.set("y",u.get("y")),v.set("z",u.get("z")),v=this.ey(0),u==v?this.P.set("mode","edit"):this.lZ())}};m.prototype.Xza=function(u){this.P.get("mode")=="edit"&&this.cz(this.kT.get(u.source),!0)};m.prototype.Yza=function(){this.P.get("mode")=="edit"&&this.cz(null)};m.prototype.Zza=function(){this.Z3()};
m.prototype.Z3=function(){for(var u=[],v=this.ey(0),w=this.Oda(),y=0;y<w.length;y++){var x=w[y];v=this.Ej.get(v);var z=this.Ej.get(x);z=v.distanceTo(z);(v=this.Ida(this.bs[y]))&&v.hP(z);u.push(z);v=x}u=u.reduce(function(A,D){return A+D},0);(v=this.Ida(this.Ej.get(w[w.length-1])))&&v.hP(u);this.P.set("distance",isNaN(u)?void 0:u)};m.prototype.gUa=function(u,v){if(v=v&&v.data.position)v=this.ma.worldPositionToLocal(v,this.ma.getMatrixWorld()),this.Ej.get(u).zNa(v.x,v.y,v.z)};m.prototype.cz=function(u,
v){v||(v=!1);if(this.Aj!==u){if(this.Aj){var w=this.Ej.get(this.Aj);w.DNa(!1);w.tNa(!1)}if(this.Aj=u)w=this.Ej.get(this.Aj),w.DNa(v),w.tNa(v||!this.AR());this.nEa();this.xEa();this.a4()}};m.prototype.DCa=function(u){this.hi!=u&&(this.hi.forEach(function(v){u.indexOf(v)==-1&&this.fva(v)}.bind(this)),this.hi=u,this.Aj&&this.hi.indexOf(this.Aj)&&(this.Aj=null),this.a4(),this.hi.forEach(function(v){this.Mua(v)}.bind(this)),this.nEa(),this.mEa(),this.p7a(),this.Z3())};m.prototype.Oda=function(){return this.hi.filter(function(u){return this.Uda(u)||
this.Ej.get(u).vB}.bind(this))};m.prototype.nEa=function(){for(;this.hi.length<this.bs.length;)this.kXa();for(;this.hi.length>this.bs.length;)this.HWa();for(var u=!0,v=0;v<this.hi.length;v++){var w=this.ey(v),y=this.ey(v+1);w==this.Aj&&(u=!1);var x=u?y:w;this.bs[v].t8(this.Ej.get(u?w:y),this.Ej.get(x))}};m.prototype.mEa=function(){this.k7a();var u=this.Oda(),v=u.length==1;this.P.get("displayPartialDistanceLabel")&&!v&&this.bs.forEach(function(w){var y=this.y0(w);y.RNa(w);y.setStyle(e.wSa)}.bind(this));
this.P.get("displayDistanceLabel")&&(v?(u=this.y0(this.bs[0]),u.RNa(this.bs[0]),u.setStyle(e.isa)):u.length>1&&(v=this.Ej.get(u[u.length-1]),u=this.y0(v),u.dhb(v),u.setStyle(e.isa)));this.P.get("displayAreaLabel")&&this.ai&&(u=this.y0(this.ai),u.$fb(this.ai),u.setStyle(e.vSa));this.mXa();this.Z3();this.rC()};m.prototype.xEa=function(){var u=!this.Aj&&this.pd!="view";this.Ej.forEach(function(v){v.khb(u)})};m.prototype.p7a=function(){this.ai&&this.ai.t8([this.P].concat(this.Oda()).map(function(u){return this.Ej.get(u)}.bind(this)))};
m.prototype.Mua=function(u){var v=this.Ej.get(u);v||(v=new c(this.P,this.ma,this.xb,u),this.Ej.set(u,v),this.kT.set(v,u),v.bind(p.Ik,this.Wza,this,!0),v.bind(p.oa,this.Vza,this,!0),v.bind(p.Ra,this.Xza,this,!0),v.bind(p.bb,this.Yza,this,!0),v.bind(p.Hm,this.Zza,this,!1))};m.prototype.fva=function(u){var v=this.Ej.get(u);v&&(v.h(p.Hm,this.Zza,this,!1),v.h(p.Ik,this.Wza,this,!0),v.h(p.oa,this.Vza,this,!0),v.h(p.Ra,this.Xza,this,!0),v.h(p.bb,this.Yza,this,!0),v.dispose(),this.Ej["delete"](u),this.kT["delete"](v))};
m.prototype.HWa=function(){var u=new b(this.P,this.xb);this.bs.push(u)};m.prototype.kXa=function(){this.bs.length!=0&&this.bs.pop().dispose()};m.prototype.GWa=function(){var u=new e(this.ma,this.P,this.xb);this.WG.push(u);return u};m.prototype.k7a=function(){this.qM.clear()};m.prototype.y0=function(u){var v=this.WG.length>this.qM.size?this.WG[this.qM.size]:this.GWa();this.qM.set(u,v);return v};m.prototype.Ida=function(u){return this.qM.get(u)};m.prototype.mXa=function(){for(;this.WG.length>this.qM.size;)this.jXa()};
m.prototype.jXa=function(){this.WG.length!=0&&this.WG.pop().dispose()};m.prototype.bWa=function(){this.ai||(this.ai=new g(this.P,this.xb))};m.prototype.iXa=function(){this.ai&&(this.ai.dispose(),this.ai=null)};m.prototype.a4=function(){this.P.set("draggingPoint",!!this.Aj)};var f=["points"],n=["mode"],l=["type"],q=["displayAreaLabel","displayDistanceLabel","displayPartialDistanceLabel"],r=["area"],t=["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,k,p){a=function(){function h(g,e,b,c,d){this.object=g;this.model=e;this.uc=b;this.renderer=d;this.ee=this.ee.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.ee,!0)}h.prototype.Wc=function(){};h.prototype.Xc=function(){};h.prototype.dispose=function(){this.disable();k.ca(this.object,
["enabled"],this.ee)};h.prototype.ee=function(){this.object.get("enabled")?this.enable():this.disable()};h.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.uc.T.tc("CanvasPlane"),this.Wc())};h.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.fd(this.F),this.F=null)};return h}();a=p.ud(a);a=p.dK(a);a=p.Gf(a);a=p.eZ(a);a=p.vK(a);a=p.nb(a);return a=p.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,k,p,h,g,e,b,c){a=function(l){function q(r,t,u,v,w){r=l.call(this,r,t,u,w)||this;r.kA=r.kA.bind(r);r.uc=u;r.cr=new g;r.cr.bind(h.V,r.um,r,!0);r.F.L(e.TA);r.F.L(e.MP).object=
r.object;p.ba(r.object,d,r.kA,!0);r.Wc();return r}P(q,l);q.prototype.Wc=function(){};q.prototype.Xc=function(){};q.prototype.dispose=function(){p.ca(this.object,d,this.kA);this.cr.h(h.V,this.um,this);this.cr=null;this.Xc();l.prototype.dispose.call(this)};q.prototype.um=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*n,rotationY:f.y*
n,rotationZ:f.z*n,scale:Math.max(r.data.scale,.001)});this.object.o(h.Hm)};q.prototype.kA=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.F.N(e.Bh,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.O=this.cr}else this.F.ka(e.Bh)};return q}(b);var d=["positionDraggable","rotationDraggable","scaleDraggable"],f=
new k.Euler,n=180/Math.PI;k=c.ud(a);k=c.eZ(k);k=c.dK(k);k=c.vK(k);k=c.nb(k);k=c.jSa(k);return k=c.asa(k)});
define("tdv/player/view/model3d/renderer/adapters/objects/ImagePlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,k,p){a=function(){function h(g,e,b,c,d){this.object=g;this.model=e;this.uc=b;this.renderer=d;this.ee=this.ee.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.ee,!0)}h.prototype.Wc=function(){};h.prototype.Xc=function(){};h.prototype.dispose=function(){this.disable();k.ca(this.object,
["enabled"],this.ee)};h.prototype.ee=function(){this.object.get("enabled")?this.enable():this.disable()};h.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.uc.T.tc("ImagePlane"),this.Wc())};h.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.fd(this.F),this.F=null)};return h}();a=p.ud(a);a=p.dK(a);a=p.Bi(a);a=p.vK(a);a=p.nb(a);return a=p.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,k,p,h){var g=["objectId"];a=function(){function e(b,c,d,f,n){this.object=b;this.model=c;this.uc=d;this.renderer=n;this.F=this.uc.T.tc("InnerObject");this.w1=this.w1.bind(this);k.ba(this.object,g,this.w1,!0);this.Wc()}e.prototype.Wc=function(){};e.prototype.Xc=function(){};
e.prototype.w1=function(){var b=this.F.N(p.rK,!0);b.id=this.object.get("objectId");b.container=this.uc};e.prototype.dispose=function(){this.Xc();k.ca(this.object,g,this.w1);this.uc.T.fd(this.F);this.F=null};return e}();a=h.ud(a);a=h.dK(a);a=h.vK(a);return a=h.eZ(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,k,p,h,g){var e=["x","y","z"],b=["targetX","targetY","targetZ"];a=function(){function c(d,f,n,l,q){this.object=d;this.model=f;this.uc=n;this.renderer=q;this.ee=this.ee.bind(this);this.t7=this.t7.bind(this);this.y7=this.y7.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,
["enabled"],this.ee,!0)}c.prototype.Wc=function(){};c.prototype.Xc=function(){};c.prototype.dispose=function(){this.disable();k.ca(this.object,["enabled"],this.ee)};c.prototype.ee=function(){this.object.get("enabled")?this.enable():this.disable()};c.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.uc.T.tc("Line"),this.F.L(p.sa),this.F.L(p.Line),this.F.L(p.iu).position=new g.Vector3,k.ba(this.object,e,this.t7,!0),k.ba(this.object,b,this.y7,!0),this.Wc())};c.prototype.disable=
function(){this.enabled&&(this.enabled=!1,this.Xc(),k.ca(this.object,e,this.t7),k.ca(this.object,b,this.y7),this.F.T.fd(this.F),this.F=null)};c.prototype.t7=function(){var d=this.F.N(p.sa);d.translationX=this.object.get("x",0);d.translationY=this.object.get("y",0);d.We=this.object.get("z",0)};c.prototype.y7=function(){var d=this.F.N(p.iu);d.position.x=this.object.get("targetX");d.position.y=this.object.get("targetY");d.position.z=this.object.get("targetZ")};return c}();a=h.ud(a);a=h.Xh(a);return a=
h.nb(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,k,p,h){var g=["x","y","z"],e="divisions centerLinesColor depthTest gridColor opacity size".split(" ");a=function(){function b(c,d,f,n,l){this.object=c;this.model=d;this.uc=f;this.renderer=l;this.ee=this.ee.bind(this);this.gA=this.gA.bind(this);this.m7=this.m7.bind(this);this.enabled=
!1;this.F=null;k.ba(this.object,["enabled"],this.ee,!0)}b.prototype.Wc=function(){};b.prototype.Xc=function(){};b.prototype.dispose=function(){this.disable();k.ca(this.object,["enabled"],this.ee)};b.prototype.ee=function(){this.object.get("enabled")?this.enable():this.disable()};b.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.uc.T.tc("HorizonGrid"),this.F.L(p.sa),this.F.L(p.gu),k.ba(this.object,g,this.gA,!0),k.ba(this.object,e,this.m7,!0),this.Wc())};b.prototype.disable=function(){this.enabled&&
(this.enabled=!1,this.Xc(),k.ca(this.object,g,this.gA),k.ca(this.object,e,this.m7),this.F.T.fd(this.F),this.F=null)};b.prototype.gA=function(){var c=this.F.N(p.sa);c.translationX=this.object.get("x",0);c.translationY=this.object.get("y",0);c.We=this.object.get("z",0)};b.prototype.m7=function(){var c=this.F.N(p.gu);c.eGa=this.object.get("centerLinesColor");c.depthTest=this.object.get("depthTest");c.nla=this.object.get("divisions");c.SIa=this.object.get("gridColor");c.size=this.object.get("size")};
return b}();a=h.eZ(a);return a=h.nb(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,k,p,h){var g=["radius","maxRadius","minRadius"];a=function(){function e(b,c,d,f,n){this.object=b;this.model=c;this.uc=d;this.renderer=n;this.ee=this.ee.bind(this);this.jA=this.jA.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.ee,!0)}e.prototype.Wc=function(){};
e.prototype.Xc=function(){};e.prototype.dispose=function(){this.disable();k.ca(this.object,["enabled"],this.ee)};e.prototype.ee=function(){this.object.get("enabled")?this.enable():this.disable()};e.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.uc.T.tc("Sphere"),this.F.L(p.Sphere),this.F.L(p.Lk),k.ba(this.object,g,this.jA,!0),this.Wc())};e.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),k.ca(this.object,g,this.jA),this.F.T.fd(this.F),this.F=null)};e.prototype.jA=
function(){var b=this.F.N(p.Lk);b.Ge=b.Ve=b.zh=1;b.scale=this.object.get("radius");b.MD=this.object.get("maxRadius");b.ND=this.object.get("minRadius")};return e}();a=h.ud(a);a=h.dK(a);a=h.vd(a);a=h.nb(a);return a=h.asa(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,k,p,h){var g="cameraBox skyBox sourceAlpha sourceCubeTexture sourceX sourceY sourceYaw sourceZ targetAlpha targetCubeTexture targetX targetY targetYaw targetZ".split(" ");a=function(){function e(b,c,d,f,n){this.object=b;this.model=c;this.uc=d;this.ona=f;this.renderer=
n;this.ee=this.ee.bind(this);this.w7=this.w7.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.ee,!0)}e.prototype.Wc=function(){};e.prototype.Xc=function(){};e.prototype.dispose=function(){this.disable();k.ca(this.object,["enabled"],this.ee)};e.prototype.ee=function(){this.object.get("enabled")?this.enable():this.disable()};e.prototype.enable=function(){if(!this.enabled){this.enabled=!0;this.F=this.uc.T.tc("ProjectedMaterial");this.F.L(p.ho);var b=this.F.L(p.nb);b.F=this.uc;
b.attach=!0;k.ba(this.object,g,this.w7,!0);this.Wc()}};e.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),k.ca(this.object,g,this.w7),this.F.T.fd(this.F),this.F=null)};e.prototype.w7=function(){var b=this.F.N(p.ho);b.eA=this.object.get("nearPlane")||!1;b.vOa=this.object.get("skyBox")||!1;b.xOa=this.object.get("sourceAlpha")||0;b.yE=this.ona;b.F8=this.object.get("sourceX")||0;b.G8=this.object.get("sourceY")||0;b.H8=this.object.get("sourceZ")||0;b.PX=this.object.get("sourceYaw")||
0;b.NX=this.object.get("sourceCubeTexture");b.UOa=this.object.get("targetAlpha")||0;b.targetX=this.object.get("targetX")||0;b.targetY=this.object.get("targetY")||0;b.T8=this.object.get("targetZ")||0;b.uib=this.object.get("targetYaw")||0;b.VX=this.object.get("targetCubeTexture")};return e}();return h.nb(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,n,l,q,r){this.P=f;this.ma=n;this.xb=l;this.m=r;this.R=this.m.R;this.js=this.js.bind(this);this.By=this.By.bind(this);this.So=this.So.bind(this);this.mg=this.mg.bind(this);this.xfa=this.xb.getComponent(e.Ci).np;
this.xfa.bind(p.ha,this.Cy,this,!1);this.yfa=this.Xxa=!1;this.vv=new g(this.R);this.vv.setPosition(0);this.vv.update();this.A=null;k.ba(this.P,["enabled"],this.js,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/constants/RenderOrder"),g=a("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas"),e=a("tdv/player/view/webgl/components");m.prototype.js=function(){this.P.get("enabled")?this.lG():this.Qr()};m.prototype.lG=function(){if(!this.A){this.A=
this.xb.T.tc("Reticle");var f=this.A.L(e.nb);f.F=this.xb;f.id=this.P.get("parentId");this.A.L(e.Plane).renderOrder=h.xSa;this.A.L(e.Gf).source=this.vv.zg();this.A.L(e.TA);f=this.A.L(e.MP);f.pib=this.P;f.object=this.P;k.ba(this.ma,d,this.By,!0);k.ba(this.P,b,this.So,!0);k.ba(this.P,c,this.mg,!0)}};m.prototype.Qr=function(){this.A&&(this.xb.T.fd(this.A),this.A=null,k.ca(this.ma,d,this.By),k.ca(this.P,b,this.So),k.ca(this.P,c,this.mg))};m.prototype.By=function(){var f=this.A.N(e.Lk,!0);f.Ge=f.Ve=2;f.scale=
this.ma.get("surfaceReticleRadius");f.MD=this.ma.get("surfaceReticleMaxRadius");f.ND=this.ma.get("surfaceReticleMinRadius");this.tEa()};m.prototype.So=function(){var f=this.A.N(e.Uw,!0);f.x=this.P.get("x");f.y=this.P.get("y");f.z=this.P.get("z");f.distance=this.P.get("distance");f.iW=this.P.get("horizontal")};m.prototype.mg=function(){var f=this.A.N(e.ud,!0);f.JA=this.P.get("useHandCursor");f.CE=this.P.get("transparentAreaActive");f.O=this.P;f=this.A.N(e.Gf);f.opacity=this.P.get("opacity");f.hidden=
this.P.get("hidden");f.depthTest=this.P.get("depthTest")};m.prototype.Cy=function(){this.Xxa=!0;this.tEa()};m.prototype.tEa=function(){var f=this.Xxa&&this.ma.get("opacity")>.5;this.yfa!=f&&(this.yfa=f)&&this.A&&this.A.N(e.Uw)};m.prototype.dispose=function(){this.Qr();k.ca(this.P,["enabled"],this.js);this.xfa.h(p.ha,this.Cy,this,!1);this.xfa=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,k,p){a=function(){function h(g,e,b,c,d){this.object=g;this.model=e;this.uc=b;this.renderer=d;this.ee=this.ee.bind(this);this.enabled=!1;this.F=null;k.ba(this.object,["enabled"],this.ee,!0)}h.prototype.Wc=function(){};h.prototype.Xc=function(){};h.prototype.dispose=function(){this.disable();k.ca(this.object,
["enabled"],this.ee)};h.prototype.ee=function(){this.object.get("enabled")?this.enable():this.disable()};h.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.uc.T.tc("VideoPlane"),this.Wc())};h.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.fd(this.F),this.F=null)};return h}();a=p.ud(a);a=p.dK(a);a=p.jo(a);a=p.nb(a);a=p.vK(a);return a=p.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,k,p,h,g,e,b,c,d,f,n,l,q){f.Ht("MeasureModel3DObject",k);f.Ht("ChildModel3DObject",h);f.Ht("HorizonGridModel3DObject",c);f.Ht("CanvasPlaneModel3DObject",p);f.Ht("ImagePlaneModel3DObject",g);f.Ht("InnerModel3DObject",e);f.Ht("LineModel3DObject",b);f.Ht("ProjectedMaterialModel3DObject",n);f.Ht("SphereModel3DObject",d);f.Ht("SurfaceReticleModel3DObject",l);f.Ht("VideoPlaneModel3DObject",q);return f});
define("tdv/view/events/MouseEvent",["require","exports","tdv/events/Event"],function(a,m,k){return function(p){function h(g,e,b,c,d,f,n,l){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);n===void 0&&(n=0);l===void 0&&(l=null);g=p.call(this,g)||this;g.x=e;g.y=b;g.pageX=c;g.pageY=d;g.delta=f;g.SN=n;g.Tna=l;g.movementX=l&&l.movementX||void 0;g.movementY=l&&l.movementY||void 0;return g}P(h,p);return h}(k)});
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,k,p,h,g,e,b,c,d,f){return function(n){function l(q,r,t,u,v){var w=n.call(this)||this;w.$I=[];w.kFa=0;w.jFa=0;w.j5=!1;w.hHa=!1;w.Xma=!1;w.ZJa=0;w.renderer=q;w.bu=
r;w.model=t;w.uc=u;w.Oa=v;w.Ys=w.Ys.bind(w);w.T4=w.T4.bind(w);w.fla=c.Qq(w.fla,w);w.cA=w.cA.bind(w);w.J6=w.J6.bind(w);w.I6=w.I6.bind(w);w.lb=w.renderer.R;w.ah=w.renderer.getParent();w.enabled=!0;w.type=l.PP;w.Ya();return w}P(l,n);l.prototype.getType=function(){return this.type};l.prototype.Ua=function(q){this.enabled=q};l.prototype.dispose=function(){this.Ba()};l.prototype.Ya=function(){this.ah.bind(p.mb,this.Ys,this,!0);this.ah.bind(p.oa,this.iFa,this,!0);k.fD(this.model,["camera.lockMouse"],this.T4,
!0);k.fD(this.model,["objects"],this.cA,!0);this.sm=new d(this.ah.wa().ac());this.sm.bind(p.V,this.GKa,this,!0);document.addEventListener("keyup",this.J6);document.addEventListener("keydown",this.I6);this.Pt(l.PP)};l.prototype.Ba=function(){this.ah.h(p.mb,this.Ys,this);this.ah.h(p.oa,this.iFa,this);k.ca(this.model,["camera.lockMouse"],this.T4);k.ca(this.model,["objects"],this.cA);this.DX([]);this.sm.h(p.V,this.GKa,this);this.sm.Mq()&&this.sm.unlock();this.PNa(!1);this.sm.dispose();document.removeEventListener("keyup",
this.J6);document.removeEventListener("keydown",this.I6)};l.prototype.T4=function(){this.rW=!b.yb()&&this.model.get("camera").get("lockMouse");!this.rW&&this.sm.Mq()&&this.sm.unlock();this.SPa()};l.prototype.SPa=function(){this.PNa((!this.j5||!this.hHa)&&(b.yb()||!this.rW))};l.prototype.PNa=function(q){this.Xma!=q&&((this.Xma=q)?this.lb.HR.D4():this.lb.HR.Y7())};l.prototype.Ys=function(){this.sm.Mq()||this.Pt(l.PP)};l.prototype.I6=function(q){l.MRa.indexOf(q.code)!=-1&&(this.type==l.PP&&this.Pt(l.A$),
this.rW&&!this.sm.Mq()&&this.sm.lock())};l.prototype.J6=function(q){q.code==h.ua.uK&&(q=(new Date).getTime(),this.BPa(p.oa),q-this.ZJa<500&&this.BPa(p.Ik),this.ZJa=q)};l.prototype.BPa=function(q){var r=this.lb.cb()/2,t=this.lb.Kb()/2;q=new g(q,r,t,r,t,0,0,void 0);this.ah.o(q)};l.prototype.iFa=function(){this.jFa=(new Date).getTime();this.rW&&!this.sm.Mq()?this.sm.lock():this.fla()};l.prototype.j$a=function(){this.rW&&this.sm.Mq()&&this.sm.unlock()};l.prototype.GKa=function(){this.sm.Mq()?this.Pt(l.A$):
this.Pt(l.PP)};l.prototype.cA=function(){this.DX(this.model.get("objects",[]))};l.prototype.DX=function(q){var r=this;this.$I.forEach(function(t){t.h(p.oa,r.TKa,r)});this.$I=q;this.$I.forEach(function(t){t.bind(p.oa,r.TKa,r,!0);f.Qa("MeasureModel3DObject",t)&&(t.bind(p.K("draggingPoint"),r.yW,r,!0),t.bind(p.K("mode"),r.yW,r,!0))});this.yW()};l.prototype.TKa=function(q){q.source.get("useHandCursor")&&(this.kFa=(new Date).getTime())};l.prototype.yW=function(){var q=!1,r=!1;this.$I.forEach(function(u){f.Qa("MeasureModel3DObject",
u)&&(r=r||!!u.get("draggingPoint"),q=q||u.get("mode")=="edit"&&!!u.get("draggingPoint"))});this.hHa=q;var t=this.model.get("camera");r!=this.j5&&(this.j5=r,setTimeout(function(){t.lgb(this.j5)}.bind(this),0));this.SPa()};l.prototype.fla=function(){Math.abs(this.jFa-this.kFa)>100&&this.j$a()};l.prototype.Pt=function(q){this.type!==q&&(this.type=q,this.o(p.V))};l.PP="mouse";l.A$="gaze";l.MRa=[h.ua.Sj,h.ua.yi,h.ua.$a,h.ua.Cb,h.ua.yp,h.ua.Dp,h.ua.lo,h.ua.io,h.ua.E,h.ua.Q];return l}(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,k,p,h,g,e,b,c,d,f){var n=new k.Vector3(0,0,0),l=new k.Vector3(0,0,-1);a=function(){function r(t,u,v,w,y,x){this.renderer=
t;this.bu=u;this.model=v;this.hd=w;this.uc=y;this.Oa=x;this.cY=this.cY.bind(this);this.sA=this.sA.bind(this);this.zz=this.zz.bind(this);this.lb=this.renderer.R;this.ah=this.renderer.getParent();this.ow=this.model.get("application").ni("Model3DPointer");this.Ya()}r.prototype.Ua=function(t){var u=this.Oa.N(c.xc);u&&(u.enabled=t)};r.prototype.dispose=function(){this.Ba()};r.prototype.Ya=function(){this.ZO=new e(this.lb.nma());this.Tab=new q(this.ah,this.ZO);this.kp=new b;this.kp.BNa(this.Tab);var t=
this.Oa.L(c.xc);t.Oa=this.Oa;t.origin=n;t.direction=l;t.tD=this.ah;t.g5=this.kp;t.O=this.ow;this.lb.set("toolTipCentered",!0);this.model.set("pointer",this.ow);this.yhb();this.vpa();this.kp.push(d.uF);f.requestFrame(this.cY)};r.prototype.Ba=function(){this.kp.pop(d.uF);this.wib();this.Qpa();this.lb.set("toolTipCentered",!1);this.lb.set("toolTipCenteredOffsetY",void 0);this.model.set("pointer",void 0);this.Oa.ka(c.xc);this.kp.dispose();f.dGa(this.cY)};r.prototype.vpa=function(){this.rp=this.uc.T.tc("GazeReticle");
this.rp.L(c.nb).F=this.Oa;this.rp.L(c.Plane).renderOrder=g.pRa;this.rp.L(c.mF);var t=this.rp.L(c.Gf);t.source=this.ZO.zg();t.depthTest=!1;this.rp.L(c.sa).We=-1;this.renderer.bind(h.Yb,this.sA,this,!0);this.sA();this.dV(this.Oa.getComponent(c.xc),this.ow)};r.prototype.dV=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.Qpa=function(){this.rp&&
(this.rp.T.fd(this.rp),this.rp=null)};r.prototype.Bjb=function(){if(this.rp){var t=this.rp.N(c.Lk,!0);t.Ge=t.Ve=2;var u=Math.min(this.lb.cb(),this.lb.Kb())/100;t.ND=t.MD=Math.round(u*4);this.lb.set("toolTipCenteredOffsetY",2*u)}};r.prototype.cY=function(t){this.rp&&this.ZO.update(t)&&(this.rp.N(c.Gf).HJ=(new Date).getTime());f.requestFrame(this.cY)};r.prototype.sA=function(){this.Bjb()};r.prototype.yhb=function(){p.fD(this.model,"camera",this.zz,!0)};r.prototype.wib=function(){p.ca(this.model,"camera",
this.zz);this.CNa(!0)};r.prototype.zz=function(){this.CNa(!1)};r.prototype.CNa=function(t){var u=this.Oa.N(c.iF);u&&(u.TN=t);(u=this.Oa.N(c.jF))&&(u.TN=t);(u=this.Oa.N(c.oF))&&(u.TN=t)};return r}();var q=function(){function r(t,u){this.ah=t;this.ZO=u}r.prototype.IIa=function(){return this.ah};r.prototype.g8=function(t,u){u.indexOf(d.hf)>-1?this.ZO.AJ(!0):this.ZO.AJ(!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/EventDispatcher tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/webgl/components tdv/player/view/util/XR tdv/view/constants/Cursor tdv/player/parser/ClassInfo".split(" "),function(a,m,k,p,h,g,e,b,c,d,f){a=function(){function t(u,v,w,y,x,z){this.$I=[];this.zW=[];this.renderer=u;this.bu=v;this.model=
w;this.hd=y;this.uc=x;this.Oa=z;this.cA=this.cA.bind(this);this.Et=[];this.enabled=!1;this.Ya()}t.prototype.Ua=function(u){this.enabled!==u&&((this.enabled=u)?p.fD(this.model,["objects"],this.cA,!0):(p.ca(this.model,["objects"],this.cA),this.DX([])))};t.prototype.dispose=function(){this.Ba()};t.prototype.Ya=function(){c.O.bind(h.me,this.Bg,this,!0)};t.prototype.Ba=function(){c.O.h(h.me,this.Bg,this);this.KX([])};t.prototype.Bg=function(){this.KX(c.fe)};t.prototype.KX=function(u){if(!this.enabled||
u.find(function(y){return y.mD}))u=[];var v=this.Et;this.Et=u.map(function(y){var x=v.findIndex(function(z){return z.ub==y});return x!==-1?v.splice(x,1)[0]:new n(y,this.model,this.hd,this.Oa)}.bind(this));v.forEach(function(y){y.dispose()});this.Et.forEach(function(y){y.Ua(this.enabled);y.update()}.bind(this));var w=this.Et.reduce(function(y,x){return!y||y.Fz<x.Fz?x:y},null);this.Et.forEach(function(y){y.$oa(y===w)});this.model.set("pointer",w!==null?w.Kn:void 0)};t.prototype.cA=function(){this.DX(this.model.get("objects",
[]))};t.prototype.DX=function(u){this.$I=u;this.yW()};t.prototype.yW=function(){this.zW.forEach(function(u){u.h(h.K("mode"),this.jna,this)}.bind(this));this.zW=[];this.zW=this.$I.filter(function(u){return f.Qa("MeasureModel3DObject",u)});this.zW.forEach(function(u){u.bind(h.K("mode"),this.jna,this,!0)}.bind(this));this.jna()};t.prototype.jna=function(){var u=!1,v=!1;this.zW.forEach(function(w){v=v||w.get("mode")=="create";u=u||w.get("mode")=="edit"}.bind(this));this.model.get("camera").egb(v)};return t}();
var n=function(){function t(u,v,w,y){this.Fz=this.rI=0;this.ub=u;this.model=v;this.hd=w;this.Oa=y;this.Fz=this.rI=this.ub.handedness==="right"?1:0;this.Kn=this.model.get("application").ni("Model3DPointer");this.Lg=this.enabled=!1;this.Ya()}t.prototype.update=function(){this.uP();c.uE(this.ub,this.ela.Te,this.ela.Te,this.model.get("surfaceSelectionEnabled")&&(this.wdb||this.ydb||this.xdb)?void 0:this.distance);c.epa(this.ub,!this.Lg||!this.enabled)};t.prototype.Ua=function(u){this.enabled!==u&&(this.enabled=
u,u=this.xk.N(b.xc,!0))&&(u.enabled=this.enabled)};t.prototype.$oa=function(u){this.Lg!==u&&(this.Lg=u,u=this.xk.N(b.xc,!0))&&(u.Lg=this.Lg)};t.prototype.dispose=function(){this.Ba()};t.prototype.Ya=function(){this.ela=new r(this.Kn);this.kp=new e;this.kp.BNa(this.ela);this.Dt=new g;this.xk=this.hd.T.tc("Pointer");var u=this.xk.N(b.xc,!0);u.Wka=!0;u.matrixWorld=new k.Matrix4;u.Oa=this.Oa;u.tD=this.Dt;u.g5=this.kp;u.O=this.Kn;u.enabled=this.enabled;c.O.bind(h.mu,this.LW,this,!0);c.O.bind(h.lB,this.MW,
this,!0);c.O.bind(h.Pf,this.KW,this,!0);this.Kn.bind(h.Ra,this.Rh,this,!0);this.Kn.bind(h.bb,this.ef,this,!0);this.Kn.bind(h.mb,this.Mj,this,!0);this.Kn.bind(h.Db,this.Nn,this,!0)};t.prototype.Ba=function(){this.Kn.h(h.Ra,this.Rh,this);this.Kn.h(h.bb,this.ef,this);this.Kn.h(h.mb,this.Mj,this);this.Kn.h(h.Db,this.Nn,this);this.xk.T.fd(this.xk);this.kp.dispose();c.O.h(h.mu,this.LW,this);c.O.h(h.lB,this.MW,this);c.O.h(h.Pf,this.KW,this)};t.prototype.uP=function(){var u=this.xk.N(b.xc,!0);u.matrixWorld.copy(this.ub.matrixWorld);
u.origin.copy(this.ub.ray.origin);u.direction.copy(this.ub.ray.direction);u.Tb.copy(this.ub.Tb);u.EA=this.ub.EA;this.dV(u,this.Kn)};t.prototype.dV=function(u,v){q.origin.set(u.origin);q.direction.set(u.direction);q.applyMatrix4(u.matrixWorld);v.set("originX",u.origin.x);v.set("originY",u.origin.y);v.set("originZ",u.origin.z);v.set("directionX",u.direction.x);v.set("directionY",u.direction.y);v.set("directionZ",u.direction.z)};t.prototype.KW=function(u){u.data.pointerState===this.ub&&(u=Date.now()-
this.rI<300,this.rI=Date.now(),this.Dt.o(h.oa),u&&this.Dt.o(h.Ik))};t.prototype.LW=function(u){u.data.pointerState===this.ub&&(this.Fz=Date.now(),this.Dt.o(h.Ra))};t.prototype.MW=function(u){u.data.pointerState===this.ub&&this.Dt.o(h.bb)};t.prototype.Mj=function(u){this.qX(u);this.XNa(u)};t.prototype.qX=function(u){u.data.position?(u=u.data.position,q.copy(this.ub.ray).applyMatrix4(this.ub.matrixWorld),this.distance=q.origin.distanceTo(l.set(u.x,u.y,u.z))):this.distance=void 0};t.prototype.XNa=function(u){this.ydb=
u.data.type=="mesh";this.wdb=u.data.type=="bone";this.xdb=u.data.type=="gs"};t.prototype.Rh=function(u){this.qX(u);this.XNa(u)};t.prototype.ef=function(){this.distance=void 0};t.prototype.Nn=function(){this.distance=void 0};return t}(),l=new k.Vector3,q=new k.Ray,r=function(){function t(u){this.Kn=u}t.prototype.IIa=function(){return this.Kn};t.prototype.g8=function(u,v){this.Te=v.indexOf(d.hf)>-1};return t}();return a});
define("tdv/player/view/model3d/renderer/adapters/pointer/MousePointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/util/geo/Fov tdv/player/view/webgl/components".split(" "),function(a,m,k,p,h,g,e,b){var c=new k.Vector3(0,0,0),d=Math.PI/180,f=new k.Vector3;return function(){function n(l,q,r,t,u,v){this.renderer=l;this.bu=q;this.model=r;this.hd=t;this.uc=u;this.Oa=v;this.C5=
this.C5.bind(this);this.sA=this.sA.bind(this);this.Ys=this.Ys.bind(this);this.lb=this.renderer.R;this.ah=this.renderer.getParent();this.ow=this.model.get("application").ni("Model3DPointer");this.enabled=!0;this.Ya()}n.prototype.Ua=function(l){this.enabled=l;var q=this.Oa.N(b.xc);q&&(q.enabled=l)};n.prototype.dispose=function(){this.Ba()};n.prototype.Ya=function(){var l=this.Oa.L(b.xc);l.Oa=this.Oa;l.origin=c;l.direction=new k.Vector3;l.tD=this.ah;l.O=this.ow;this.kp=new g;this.kp.Mt(this.ah);l.g5=
this.kp;l.enabled=this.enabled;p.ba(this.model,["camera.fov"],this.C5,!0);this.renderer.bind(h.Yb,this.sA,this,!0);this.ah.D9a(h.Ra,this.Ys,this);this.ah.bind(h.mb,this.Ys,this,!0);this.model.set("picker",this);this.model.set("pointer",this.ow)};n.prototype.Ba=function(){p.ca(this.model,["camera.fov"],this.C5);this.renderer.h(h.Yb,this.sA,this);this.ah.h(h.Ra,this.Ys,this);this.ah.h(h.mb,this.Ys,this);this.Oa.ka(b.xc);this.kp.dispose();this.model.set("picker",void 0);this.model.set("pointer",void 0)};
n.prototype.sA=function(){this.kqa()};n.prototype.C5=function(){this.kqa()};n.prototype.Ys=function(l){this.Ydb=l.x;this.Zdb=l.y;this.kqa()};n.prototype.kqa=function(){var l=this.Oa.N(b.xc);this.rIa(this.Ydb,this.Zdb,l.direction);this.dV(l,this.ow)};n.prototype.dV=function(l,q){q.set("originX",l.origin.x);q.set("originY",l.origin.y);q.set("originZ",l.origin.z);q.set("directionX",l.direction.x);q.set("directionY",l.direction.y);q.set("directionZ",l.direction.z)};n.prototype.rIa=function(l,q,r){var t;
r=r||new k.Vector3;var u=((t=this.model.get("camera"))===null||t===void 0?void 0:t.get("fov"))||90;t=this.lb.cb();var v=this.lb.Kb();l===void 0&&(l=t/2);q===void 0&&(q=v/2);r.set(l-t/2,v/2-q,-t/(Math.tan((t>v?u:e.er(u,t,v))*d/2)*2)).normalize();return r};n.prototype.aoa=function(l,q){var r=this.Oa.getComponent(b.xc);if(r&&r.Ct)return r.Ct.aoa([this.uc],c,this.rIa(l,q,f))};return n}()});
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,k,p,h,g,e,b,c){return function(){function d(f,
n,l,q,r,t){this.renderer=f;this.bu=n;this.model=l;this.hd=q;this.uc=r;this.Oa=t;this.enabled=!0;this.zz=this.zz.bind(this);this.Ya()}d.prototype.Ua=function(f){var n;this.enabled=f;(n=this.xI)===null||n===void 0||n.Ua(this.enabled)};d.prototype.dispose=function(){this.Ba()};d.prototype.Ya=function(){k.ba(this.model,"camera",this.zz,!1);c.O.bind(p.V,this.pQa,this,!0);this.nqa()};d.prototype.Ba=function(){k.ca(this.model,"camera",this.zz);c.O.h(p.V,this.pQa,this);this.Pt("none");this.ZOa()};d.prototype.zz=
function(){this.nqa()};d.prototype.pQa=function(){this.nqa()};d.prototype.nqa=function(){c.isPresenting?this.Pt("xr"):this.model.get("camera").get("class")=="FirstPersonModel3DCamera"?this.Hhb():(this.ZOa(),this.Pt("mouse"))};d.prototype.Hhb=function(){this.bO||(this.bO=new h(this.renderer,this.bu,this.model,this.uc,this.Oa),this.bO.bind(p.V,this.cLa,this,!0),this.cLa())};d.prototype.ZOa=function(){var f;this.bO&&((f=this.bO)===null||f===void 0||f.dispose(),this.bO=void 0)};d.prototype.cLa=function(){var f;
switch((f=this.bO)===null||f===void 0?void 0:f.getType()){case h.A$:this.Pt("gaze");break;default:this.Pt("mouse")}};d.prototype.Pt=function(f){var n;if(this.type!==f){this.xI&&this.xI.dispose();this.type=f;switch(this.type){case "mouse":this.xI=new b(this.renderer,this.bu,this.model,this.hd,this.uc,this.Oa);break;case "gaze":this.xI=new g(this.renderer,this.bu,this.model,this.hd,this.uc,this.Oa);break;case "xr":this.xI=new e(this.renderer,this.bu,this.model,this.hd,this.uc,this.Oa);break;default:this.xI=
void 0}(n=this.xI)===null||n===void 0||n.Ua(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(g,e){this.Pc=g;this.Cc=e;this.ga=!1;this.Ni=this.Ni.bind(this);k.ba(this.Pc,h,this.Ni,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/player/view/webgl/components");m.prototype.Ni=function(){var g=this.Pc.get("enabled")&&!this.Pc.get("disabled");this.ga!=g&&(this.ga&&this.Cc.ka(p.XJ),(this.ga=
g)&&this.Cc.L(p.XJ));this.ga&&(g=this.Cc.N(p.XJ),g.gHa=this.Pc.get("easingDuration"),g.bias=this.Pc.get("bias"),g.intensity=this.Pc.get("intensity"),g.scale=this.Pc.get("scale"),g.WJa=this.Pc.get("kernelRadius"),g.xKa=this.Pc.get("minResolution"),g.Kka=this.Pc.get("blurRadius"),g.output=this.Pc.get("output")=="ao"?THREE.SAOPass.OUTPUT.SAO:THREE.SAOPass.OUTPUT.Default)};m.prototype.dispose=function(){this.Cc.ka(p.XJ);this.Cc=null;k.ca(this.Pc,h,this.Ni)};var h="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(g,e){this.Pc=g;this.Cc=e;this.ga=!1;this.Ni=this.Ni.bind(this);k.ba(this.Pc,h,this.Ni,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/player/view/webgl/components");m.prototype.Ni=function(){var g=this.Pc.get("enabled")&&!this.Pc.get("disabled");this.ga!=g&&(this.ga&&this.Cc.ka(p.LE),(this.ga=g)&&this.Cc.L(p.LE));
this.ga&&(g=this.Cc.N(p.LE),g.LHa=this.Pc.get("mode")=="fxaa",g.KOa=this.Pc.get("mode")=="ssaa",g.QX=this.Pc.get("ssaaSampleLevel"))};m.prototype.dispose=function(){this.Cc.ka(p.LE);this.Cc=null;k.ca(this.Pc,h,this.Ni)};var h=["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(g,e){this.Pc=g;this.Cc=e;this.ga=!1;this.Ni=this.Ni.bind(this);k.ba(this.Pc,h,this.Ni,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/player/view/webgl/components");m.prototype.Ni=function(){var g=this.Pc.get("enabled")&&!this.Pc.get("disabled");this.ga!=g&&(this.ga&&this.Cc.ka(p.QP),(this.ga=g)&&this.Cc.L(p.QP));
this.ga&&(g=this.Cc.N(p.QP),g.cNa=this.Pc.get("samples"),g.intensity=this.Pc.get("intensity"))};m.prototype.dispose=function(){this.Cc.ka(p.QP);this.Cc=null;k.ca(this.Pc,h,this.Ni)};var h=["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(g,e){this.Pc=g;this.Cc=e;this.Ni=this.Ni.bind(this);k.ba(this.Pc,h,this.Ni,!0)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/player/view/webgl/components");m.prototype.Ni=function(){var g=this.Pc.get("enabled")&&!this.Pc.get("disabled");this.ga!=g&&(this.ga&&this.Cc.ka(p.xK),(this.ga=g)&&this.Cc.L(p.xK));
this.ga&&(g=this.Cc.N(p.xK),g.xJa=this.Pc.get("innerRadius"),g.VLa=this.Pc.get("outerRadius"),g.color=this.Pc.get("color"),g.opacity=this.Pc.get("opacity"))};m.prototype.dispose=function(){this.Cc.ka(p.xK);this.Cc=null;k.ca(this.Pc,h,this.Ni)};var h="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,k,p,h,g,e,b){return function(){function c(d,f){this.model=d;this.hd=f;this.filter=this.filter.bind(this);this.ce=this.ce.bind(this);this.Og=this.Og.bind(this);this.WW=new k;this.WW.filter=this.filter;this.WW.ce=this.ce;this.WW.Og=this.Og;this.WW.FJ(this.model,"postprocessing")}c.prototype.filter=function(d){return b.Qa("AmbientOcclusionModel3DPostprocessing",d)||b.Qa("AntialiasModel3DPostprocessing",d)||b.Qa("MotionBlurModel3DPostprocessing",d)||b.Qa("VignetteModel3DPostprocessing",d)};c.prototype.ce=
function(d){return b.Qa("AmbientOcclusionModel3DPostprocessing",d)?new p(d,this.hd):b.Qa("AntialiasModel3DPostprocessing",d)?new h(d,this.hd):b.Qa("MotionBlurModel3DPostprocessing",d)?new g(d,this.hd):b.Qa("VignetteModel3DPostprocessing",d)?new e(d,this.hd):null};c.prototype.Og=function(d,f){f.dispose()};c.prototype.dispose=function(){this.WW.dispose()};return c}()});
define("tdv/player/view/util/ScreenFrameRateMonitor",["require","exports"],function(){var a=function(){function m(){}m.init=function(){for(var k=0;k<=m.F$;k++)m.Jla.push(0);window.requestAnimationFrame(m.op)};m.bIa=function(){return m.frameRate};m.op=function(k){m.ZI!==0&&(m.Jla[Math.min(Math.round(1E3/(k-m.ZI)),m.F$)]++,m.$O++);m.ZI=k;m.$O<m.ERa?window.requestAnimationFrame(m.op):m.G9a()};m.G9a=function(){for(var k=0,p=0,h=30;h<=m.F$;h+=10){for(var g=0,e=-5;e<=5;e++)g+=m.Jla[h+e];g>k&&(k=g,p=h)}m.frameRate=
p};m.F$=200;m.ERa=60;m.Jla=[];m.ZI=0;m.$O=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,k,p,h,g,e,b){a=function(){function f(n,l){this.SD=this.enabled=!1;this.KKa=this.LKa=0;this.model=n;this.hd=l;this.Spa=this.Spa.bind(this);this.d7=this.d7.bind(this);this.u7=this.u7.bind(this);k.ba(this.model,
"pixelRatioMinScale",this.u7,!0)}f.prototype.dispose=function(){this.disable();k.ca(this.model,"pixelRatioMinScale",this.u7)};f.prototype.u7=function(){this.disable();this.model.get("pixelRatioMinScale")<1&&this.enable()};f.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.tp(!1),this.QO.h(p.V,this.xLa,this),k.ca(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.d7),this.QO.dispose())};f.prototype.enable=function(){this.enabled||
(this.enabled=!0,this.QO=new c(this.model.get("pixelRatioMinScale")),this.QO.bind(p.V,this.xLa,this,!0),k.ba(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.d7,!0))};f.prototype.d7=function(){this.LKa=Date.now();this.tp(!0)};f.prototype.Spa=function(){Date.now()-this.LKa>f.Nra&&this.tp(!1)};f.prototype.tp=function(n){this.SD!==n&&((this.SD=n)?(this.KKa=window.setInterval(this.Spa,f.Nra),this.QO.enable()):(window.clearInterval(this.KKa),this.QO.disable()),
this.ZPa())};f.prototype.xLa=function(){this.ZPa()};f.prototype.ZPa=function(){var n=this.SD&&this.enabled?this.QO.Tz():1;this.hd.getComponent(e.Scene).L7!=n&&(this.hd.N(e.Scene).L7=n)};f.Nra=100;return f}();var c=function(f){function n(l){var q=f.call(this)||this;q.kE=[];q.AO=0;q.op=q.op.bind(q);q.w9a(l);q.reset();return q}P(n,f);n.prototype.w9a=function(l){for(var q=1;q>l;q-=.1)this.kE.push(q);Math.abs(l-this.kE[this.kE.length-1])>d&&this.kE.push(l);g.Nw&&console.log("steps = ["+this.kE.map(function(r){return r.toFixed(2)}).join(", ")+
"]")};n.prototype.reset=function(){this.disable();this.ZI=0;this.uJ=.5;this.Zma=0;this.scale=this.kE.length*.5;this.Hoa=Math.floor(this.scale);this.kGa();this.enable()};n.prototype.enable=function(){!this.AO&&this.uJ>n.qra&&(this.AO=window.requestAnimationFrame(this.op))};n.prototype.disable=function(){this.AO&&(window.cancelAnimationFrame(this.AO),this.AO=0)};n.prototype.Tz=function(){return this.kE[this.Hoa]};n.prototype.dispose=function(){this.disable()};n.prototype.op=function(l){this.ZI!==0&&
(this.mjb(l-this.ZI),this.wjb());this.ZI=l;this.AO=this.uJ>n.qra?window.requestAnimationFrame(this.op):0};n.prototype.mjb=function(l){for(this.JV.push(l);this.JV.length>n.mRa;)this.JV.shift(),this.pI=this.JV.reduce(function(q,r){return q+r},0)/this.JV.length};n.prototype.kGa=function(){this.JV=[];this.pI=void 0};n.prototype.wjb=function(){if(this.pI!==void 0){var l=1E3/b.bIa(),q=l*n.IRa;l=Math.max(1E3/n.JRa,l*n.CRa);if(this.pI<=l)var r=-1;else if(this.pI>q)r=1;else{g.Nw&&console.log("["+q.toFixed(2)+
" > "+this.pI.toFixed(2)+" > "+l.toFixed(2)+"]");return}this.Zma&&this.Zma!==r&&(this.uJ*=n.nSa);this.Zma=r;this.scale=Math.min(Math.max(this.scale+r*this.uJ,0),this.kE.length-1);r==1?g.Nw&&console.log("["+this.pI.toFixed(2)+" > "+q.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.uJ).toFixed(2)+")"):r==-1&&g.Nw&&console.log("["+this.pI.toFixed(2)+" <= "+l.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.uJ).toFixed(2)+")");q=Math.round(this.scale);this.Hoa!==q&&(this.kGa(),this.Hoa=q,this.o(p.V))}};
n.IRa=1.5;n.CRa=1.1;n.mRa=15;n.nSa=.75;n.qra=.01;n.JRa=60;return n}(h),d=1E-6;return a});
define("tdv/player/view/model3d/renderer/adapters/SceneAdapter","require 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){function m(w,
y,x){this.m=w;this.Gd=y;this.ma=x;this.R=this.m.R;this.ga=!0;this.exa=!1;this.ma.Boa();this.Cc=this.Gd.tc("Scene");w=this.Cc.L(p.Scene);w.Bla=this.ma.X5().xN(this.ma.a6().Mv(.1),.1);w.O=this.ma;w.locked=!0;this.Wxa=new b(this.ma,this.ma,this.Cc,this.m);this.xb=this.Wxa.$i();w.Oa=this.Mr=this.Gd.tc("PerspectiveCamera");this.Mr.L(p.nb).F=this.Cc;this.WF=new g(this.m,this.ma,this.Mr);this.WF.xw(!0);this.B0a=new c(this.ma,this.xb,this.Mr);this.I3a=new r(this.ma,this.Cc);this.o0a=new e(this.ma,this.xb,
this.Cc,this.Mr);this.YAa=new l(this.m,this.Gd,this.ma,this.Cc,this.xb,this.Mr);v.forEach(function(z){this.ma.bind(k.K(z),this.gga,this,!0)}.bind(this));this.K2a=new q(this.ma,this.Cc);this.Gd.qFa(this.Cc);this.M0a=new n(this.ma,this.xb,this.Mr);this.p6a=new f(this.ma,this.xb,this.m);this.G6a=new d(this.m,this.ma);t.O.bind(k.V,this.jM,this,!0);this.gga();this.jM()}var k=a("tdv/constants/EventName"),p=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util"),g=a("tdv/player/view/model3d/renderer/adapters/CameraAdapter"),
e=a("tdv/player/view/model3d/renderer/adapters/lights/LightsAdapter"),b=a("tdv/player/view/model3d/renderer/adapters/ModelAdapter"),c=a("tdv/player/view/model3d/renderer/adapters/MenuAdapter"),d=a("tdv/player/view/model3d/renderer/adapters/ToolTipAdapter"),f=a("tdv/player/view/model3d/renderer/adapters/SurfaceSelectorPointerAdapter"),n=a("tdv/player/view/model3d/renderer/adapters/objects/NearestObjectsVisibleAdapter");a("tdv/player/view/model3d/renderer/adapters/objects/objects");var l=a("tdv/player/view/model3d/renderer/adapters/pointer/PointerAdapter"),
q=a("tdv/player/view/model3d/renderer/adapters/postprocessing/PostprocessingArrayAdapter"),r=a("tdv/player/view/model3d/renderer/adapters/ScenePixelRatioAdapter"),t=a("tdv/player/view/util/XR");m.prototype.xw=function(w){this.Cc.N(p.Scene).locked=w;this.WF.xw(w)};m.prototype.Ua=function(w){this.ga!==w&&(this.ga=w,this.zq())};m.prototype.jM=function(){this.exa=t.Dg==this.R.Sc().Dn();this.zq()};m.prototype.zq=function(){var w=(this.ma.get("camera").get("xrEnabled")||this.ma.get("camera").get("vrEnabled"))&&
!(this.ma.get("application")&&this.ma.get("application").get(u));w=this.ga&&(!this.exa||w);this.Cc.N(p.Scene).enabled=w;this.YAa.Ua(w);this.WF.Ua(w)};m.prototype.dispose=function(){v.forEach(function(w){this.ma.h(k.K(w),this.gga,this,!0)}.bind(this));this.ma.h(k.K("camera"),this.hlb,this,!0);t.O.h(k.V,this.jM,this);this.I3a.dispose();this.B0a.dispose();this.Wxa.dispose();this.WF.dispose();this.o0a.dispose();this.YAa.dispose();this.K2a.dispose();this.p6a.dispose();this.M0a.dispose();this.G6a.dispose();
this.Gd.Cfb(this.Cc);this.Gd.fd(this.Cc);this.Gd.fd(this.Mr)};m.prototype.Lbb=function(){return this.xb?h.II(this.xb):void 0};m.prototype.gga=function(){var w=this.Cc.N(p.Scene);w.opacity=this.ma.get("opacity");w.pHa=this.ma.get("environmentURL");w.Eka=this.ma.get("backgroundImageURL");w.KFa=this.ma.get("backgroundPanoramaURL");w.backgroundColor=this.ma.get("backgroundColor");w.outputColorSpace=this.ma.get("encoding");w.GHa=this.ma.get("fogColor");w.HHa=this.ma.get("fogDensity");w.environmentIntensity=
this.ma.get("environmentIntensity");w=this.ma.get("anisotropicFilteringLevel");var y=this.ma.get("bakedTextures");if(w!=0||y){var x=this.Cc.N(p.Yh,!0);x.ZU=w;x.gV=y}else this.Cc.ka(p.Yh)};var u=function(w){return w.map(function(y){return String.fromCharCode(y)}).join("")}([119,97,116,101,114,109,97,114,107]),v="anisotropicFilteringLevel bakedTextures environmentURL backgroundImageURL backgroundPanoramaURL backgroundColor fogColor fogDensity opacity encoding environmentIntensity".split(" ");return m});
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 k=a("tdv/player/view/webgl/Renderer"),p=a("tdv/player/view/model3d/renderer/adapters/SceneAdapter"),h=a("tdv/view/constants/Cursor"),g=a("tdv/view/constants/LayoutMode"),
e=a("tdv/view/containers/Container");a=m.extend(e,function(b,c,d){e.call(this);this.Ee=b;this.R=c;this.$R=d;this.cf("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",h.dB);this.set("layout",g.oY);this.Gd=null;this.ga=!0;this.$G=[];this.JM=new Map});a.prototype.Ib=function(){e.prototype.Ib.call(this);this.Gd==null&&(this.Gd=new k(this.Ee,this.R,!0),this.Gd.xa({left:0,top:0,right:0,bottom:0,cursor:h.dB,toolTipDisabled:!0}),this.Gd.Ua(this.ga),this.hb(this.Gd),this.$G.forEach(this.JCa.bind(this)))};
a.prototype.Ua=function(b){this.ga!==b&&(this.ga=b,this.Gd&&this.Gd.Ua(this.ga),this.set("interactionEnabled",this.ga))};a.prototype.Xa=function(){this.Gd&&this.Gd.Xa()};a.prototype.Ccb=function(b){return this.$G.indexOf(b)>=0};a.prototype.oFa=function(b){this.$G.indexOf(b)>=0||(this.$G.push(b),this.Gd&&this.JCa(b))};a.prototype.roa=function(b){var c=this.$G.indexOf(b);c<0||(this.$G.splice(c,1),this.Gd&&this.qDa(b),this.$G.length===0&&this.Ua(!0))};a.prototype.cpa=function(b,c){(b=this.JM.get(b))&&
b.xw(c)};a.prototype.TNa=function(b,c){(b=this.JM.get(b))&&b.Ua(c)};a.prototype.RV=function(b){return(b=this.JM.get(b))?b.Lbb():void 0};a.prototype.tJ=function(){return this.Gd&&this.Gd.tJ()};a.prototype.Qka=function(){return this.Gd&&this.Gd.Qka()};a.prototype.JCa=function(b){this.qDa(b);this.JM.set(b,new p(this,this.Gd,b))};a.prototype.qDa=function(b){var c=this.JM.get(b);c&&(this.JM["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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/player/parser/ClassInfo"),g=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=h.define("Model3DPlayer",e,function(){e.call(this,"model");this.Rr=this.M0=this.Ui=!1;this.U=this.m=null;this.Zb=this.qf=0;this.$d=m.Qq(this.Mh,this);this.kba=new g(this,"buttonToggleSprites",d.Mk);this.kba.bind(k.Jk,function(){this.set("spritesEnabled",!0)},this);this.kba.bind(k.Im,function(){this.set("spritesEnabled",
!1)},this);this.kba.set("pressed",this.get("spritesEnabled"))});f.prototype.play=function(){this.nH()};f.prototype.pause=function(){this.mH()};f.prototype.stop=function(){this.xC()};f.prototype.restart=function(){this.wC()};f.prototype.getModelPixelScale=function(){return this.nZa()};f.prototype.captureToDataURL=function(){return this.m&&this.m.Qka()};f.prototype.saveScreenshot=function(){return this.m&&this.m.tJ()};f.prototype.set=function(n,l){if(this.get(n)!=l){switch(n){case "model":this.M0=!0;
this.set("requesterPlayer",null);this.$d();break;case "viewerArea":this.Ui=!0;this.$d();break;case "displayPlaybackBar":this.Rr=!0,this.$d()}e.prototype.set.call(this,n,l)}};f.prototype.get=function(n,l){switch(n){case "currentTime":return this.U&&this.U.getTime()||0}return e.prototype.get.call(this,n,l)};f.prototype.Mh=function(){this.Ui&&(this.Ui=!1,this.Lx(),this.get("viewerArea")&&this.Kx(),this.TT(this.get("viewerArea")),this.M0=!0);var n=!1;if(this.m&&(this.M0||this.z3)){var l=this.get("model");
if(l&&!this.m.Wb()){this.$d();return}this.M0=!1;this.Zb=this.qf=0;n=!0;l?(this.get("viewerArea").Sc().bib(),this.rJ(this.get("requesterPlayer")?[this.get("requesterPlayer"),this]:[this]),this.U.Ugb(l)):this.U.uA()}this.Rr&&(this.Rr=!1,n=!0);n&&this.uz()};f.prototype.ZM=function(){this.set("model",null)};f.prototype.Kx=function(){var n=this.get("application"),l=this.get("viewerArea");this.m=new c(n,l,this);this.m.xa({left:0,top:0,bottom:0,right:0});l.hb(this.m);this.U=new b(l,this.m);this.U.bind(b.VE,
this.fn,this);this.U.bind(b.UE,this.tC,this);this.U.bind(b.WE,this.CS,this);this.U.bind(b.h$,this.Hza,this,!0);this.U.bind(b.dd,this.If,this);this.SC(!0)};f.prototype.Lx=function(){this.m&&(this.U.h(b.VE,this.fn,this),this.U.h(b.UE,this.tC,this),this.U.h(b.WE,this.CS,this),this.U.h(b.h$,this.Hza,this,!0),this.U.h(b.dd,this.If,this),this.U.clear(),this.m.getParent().removeChild(this.m),this.m=null,this.SC(!1))};f.prototype.If=function(n){this.Kd(n.data.state)};f.prototype.fn=function(n){var l=this.get("viewerArea");
this.te=l&&l.te;this.YR(n.data.model);this.uz()};f.prototype.CS=function(n){this.o(new p(f.YQa,{model:n.data.model}))};f.prototype.tC=function(n){this.te=null;this.WR(n.data.model)};f.prototype.Hza=function(n){this.qf=n.data.time;this.Zb=n.data.duration;this.uz()};f.prototype.Rka=function(){var n=this.get("model");return(n=(n=n&&n.get("camera"))&&n.get("doubleClickAction"))&&n!="none"?!0:!1};f.prototype.iT=function(n){this.IH(n.data.position)};f.prototype.Ql=function(){this.U&&this.U.play()};f.prototype.sq=
function(){this.U&&this.U.stop()};f.prototype.ws=function(){this.U&&this.U.pause()};f.prototype.IH=function(n){this.U&&this.U.setTime(n)};f.prototype.nZa=function(){return this.U&&this.U.RV()};f.prototype.uz=function(){if(this.m){var n=this.m.getParent();this.Zb>0&&this.get("displayPlaybackBar")?n.xa({playbackBarPosition:this.qf,playbackBarDuration:this.Zb,playbackBarVisible:!0}):n.set("playbackBarVisible",!1)}};f.YQa="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"),k=a("tdv/constants/PlaybackState"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),g=a("tdv/player/script/PlayListItem");a=p.define("Model3DPlayListItem",g,function(){g.call(this)});a.prototype.start=function(){g.prototype.start.call(this);
var e=this.get("player");e&&(e.bind(h.Vh,this.fn,this),e.get("model")==this.get("media")&&this.get("media").get("isLoaded")?this.fn():e.set("model",this.get("media")))};a.prototype.stop=function(){var e=this.get("player");e&&(e.h(h.Vh,this.fn,this),e.get("model")==this.get("media")&&e.set("model",null));g.prototype.stop.call(this)};a.prototype.fn=function(e){e&&e.data.media!=this.get("media")||(this.get("player").h(h.Vh,this.fn,this),this.get("player").bind(h.fo,this.tC,this),this.A8a())};a.prototype.A8a=
function(){var e=this.get("media").get("camera").get("sequences",[]).find(function(b){return b.get("internal")&&b.get("state")==k.PLAYING});e?e.bind(m.Qb,this.wAa,this,!0):this.kD()};a.prototype.wAa=function(e){e.source.h(m.Qb,this.wAa,this,!0);this.kD()};a.prototype.tC=function(e){e.data.media==this.get("media")&&(this.get("player").h(h.fo,this.tC,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"),k=a("tdv/player/script/Model3DPostprocessing");return m.define("MotionBlurModel3DPostprocessing",k,function(){k.call(this)})});
define("tdv/player/script/PhotoCamera",["require","exports","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a,m,k,p){a=function(h){function g(){return h.call(this)||this}P(g,h);return g}(k);p.create("PhotoCamera",a);return a});define("tdv/player/script/MovementPhotoCamera",["require","exports","tdv/player/script/PhotoCamera","tdv/player/parser/ClassInfo"],function(a,m,k,p){a=function(h){function g(){return h.call(this)||this}P(g,h);return g}(k);p.create("MovementPhotoCamera",a);return a});
define("tdv/player/constants/RotationMode",["require"],function(){var a={QE:"drag_acceleration",Ow:"drag_rotation"};a.tra=a.QE;a.msa=a.Ow;return a});define("tdv/player/view/panorama/control/events/RotationChangeEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),k=a("tdv/events/Event");return m.extend(k,function(p){k.call(this,p);this.PO=this.zP=this.mA=this.NA=0})});
define("tdv/player/view/panorama/control/events/ZoomChangeEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),k=a("tdv/events/Event");return m.extend(k,function(p){k.call(this,p);this.rma=this.Ocb=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 k(q,r){var t=r>0?1:-1;return t*(Math.pow(q,t*r)-1)/(q-1)}function p(q,r){return Math.min(Math.max(q/r,-1),1)}var h=
a("tdv/utils"),g=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"),n=a("tdv/player/view/panorama/control/events/ZoomChangeEvent"),l=h.extend(b,function(){b.call(this);this.Txa=this.Uxa=1800;this.I0a=this.K6a=0;this.zR=!1;this.mq=void 0;this.aH=d.tra;this.CDa=d.msa;this.PQ=0;this.Q2=void 0;this.Bq=!1;this.MK=null;this.CG=
3;this.fb=90;this.Fca=this.NH=this.Vc=1;this.te=this.wb=null;this.hT=!1});l.prototype.setCamera=function(q){this.Uxa=q.get("manualRotationSpeed");this.Txa=q.get("manualRotationSpeed");this.CG=q.get("manualZoomSpeed");this.Fca=q.get("draggingFactor")};l.prototype.qE=function(q){this.aH=q;this.Kja()};l.prototype.EJ=function(q){this.CDa=q;this.Kja()};l.prototype.xJ=function(q){this.fb=q;this.NH=this.fb/90};l.prototype.Mt=function(q){this.An();if(q){this.wb=q;if(this.te=q.wbb&&q.te)this.te.bind(g.Ra,
this.VAa,this,!0),this.te.bind(g.bb,this.WAa,this,!0);this.wb.bind(g.Ra,this.re,this,!0);this.wb.bind(g.mb,this.Uk,this,!0);this.wb.bind(g.bb,this.Vk,this,!0);this.wb.bind(g.tr,this.bH,this,!0);this.wb.Wb().get("settings").get(TDV.PlayerSettings.eSa)!==!1&&this.wb.bind(g.iK,this.uG,this,!0);this.wb.bind(g.$A,this.Qva,this,!0);this.wb.bind(g.hK,this.Ova,this,!0);this.Kja()}};l.prototype.An=function(){this.wb!=null&&(this.te&&(this.te.h(g.Ra,this.VAa,this),this.te.h(g.bb,this.WAa,this),this.te=null),
this.wb.h(g.Ra,this.re,this),this.wb.h(g.mb,this.Uk,this),this.wb.h(g.bb,this.Vk,this),this.wb.h(g.tr,this.bH,this),this.wb.h(g.iK,this.uG,this),this.wb.h(g.$A,this.Qva,this),this.wb.h(g.hK,this.Ova,this),this.wb=null,this.s_())};l.prototype.Kja=function(){this.wb&&(c.br()?(this.Q2=this.CDa,this.PQ=this.K6a):(this.Q2=this.aH,this.PQ=this.I0a))};l.prototype.VAa=function(){this.hT=!0};l.prototype.WAa=function(){this.hT=!1};l.prototype.re=function(q){this.hT||(this.b6a(q),this.zia())};l.prototype.Uk=
function(q){this.hT||this.jN(q)};l.prototype.Vk=function(){this.hT||(this.Uca(),this.s_())};l.prototype.bH=function(q){this.Uja(q);this.zia(500)};l.prototype.Qva=function(){this.zia()};l.prototype.uG=function(q){this.Vja(q)};l.prototype.Ova=function(){this.s_()};l.prototype.b6a=function(q){this.zR=!0;this.mq=q;this.jN(q)};l.prototype.jN=function(q){if(this.zR)switch(this.Q2){case d.QE:this.h8a(q);break;case d.Ow:this.g8a(q)}};l.prototype.h8a=function(q){var r=this.BEa,t=q.x-this.mq.x;t=+m(k(10,p(Math.abs(t)<
3?0:t,this.wb.cb())),this.Uxa*this.NH);q=q.y-this.mq.y;r.call(this,t,-m(k(10,p(Math.abs(q)<3?0:q,this.wb.Kb())),this.Txa*this.NH))};l.prototype.g8a=function(q){this.Jja(-m(p(q.x-this.mq.x,this.wb.cb()),this.fb*this.Fca),+m(p(q.y-this.mq.y,this.wb.cb()),this.fb*this.Fca));this.mq=q};l.prototype.Uca=function(){if(this.zR)switch(this.zR=!1,this.Q2){case d.QE:this.BEa(0,0)}};l.prototype.BEa=function(q,r){var t=new f(l.Sw);t.NA=q;t.mA=r;this.o(t)};l.prototype.Jja=function(q,r){var t=new f(l.Sw);t.zP=q;
t.PO=r;this.o(t)};l.prototype.Vja=function(q){if(this.Vc!=q.scale){this.Uca();var r=this.Vc;this.Vc=q.scale;q=new n(l.mr);q.rma=this.fb*r/this.Vc-this.fb;this.o(q)}};l.prototype.Uja=function(q){if(q.delta!=0){this.Uca();var r=new n(l.mr);r.rma=this.fb*-q.delta*this.CG/100;this.o(r)}};l.prototype.zia=function(q){var r=this.MK!=null;this.eDa();if(q&&(r||!this.Bq)){var t=this;this.MK=setTimeout(function(){t.MK=null;t.s_()},q)}this.Bq||(this.Bq=!0,this.o(new e(l.Rj)))};l.prototype.s_=function(){this.eDa();
this.Bq&&(this.Bq=!1,this.o(new e(l.Qj)))};l.prototype.eDa=function(){this.MK!=null&&(clearTimeout(this.MK),this.MK=null)};l.Sw="rotation change";l.mr="zoom change";l.Rj="user interaction start";l.Qj="user interaction end";return l});
define("tdv/player/view/panorama/control/camera/MovementManager",["require","tdv/player/view/util/Device"],function(a){function m(){this.OH=p.yb()?.066:.1;this.L0a=.5;this.N5a=p.yb()?.066:.1;this.N8a=.1;this.x3=this.D3=!1;this.reset()}function k(h,g,e){h=(g-h)*(1-e);Math.abs(h)<.01&&(h=0);return g-h}var p=a("tdv/player/view/util/Device");m.prototype.reset=function(){this.Sua=this.$ba=this.dL=this.LB=this.IQ=this.dca=this.cca=this.hca=this.yL=this.CG=this.L2=this.N2=this.ys=this.gT=this.Bv=this.UU=
0};m.prototype.jpa=function(h,g,e,b,c,d,f,n,l){return this.UU!=h||(this.gT=g)||this.N2!=e||b!=0||c!=0||this.x3!=f||this.nya!=n||this.D3!=l?(this.UU=h,this.gT=g,this.N2=e,this.Bv+=b,this.ys+=c,this.L2+=d,this.x3=f,this.nya=n,this.D3=l,!0):!1};m.prototype.Ohb=function(h,g){return this.CG!=h||g!=0?(this.CG=h,this.yL+=g,!0):!1};m.prototype.Nf=function(){return this.hca!=0||this.cca!=0||this.dca!=0||this.IQ!=0||this.UU!=0||this.gT!=0||this.N2!=0||this.CG!=0||this.Bv!=0||this.ys!=0||this.yL!=0};m.prototype.Lb=
function(h){h=1E3/h;var g=this.hca/h,e=this.UU/h+this.Bv;this.Bv=0;var b=this.cca/h,c=this.gT/h+this.ys;this.ys=0;var d=this.dca/h,f=this.N2/h+this.L2;this.L2=0;var n=this.CG+this.yL*h;this.yL=0;var l=e==0&&c==0&&f==0,q=g==0&&b==0&&d==0;this.x3&&q&&!l||this.D3&&l&&!q||this.nya&&!l&&!q?(l=l?this.OH:q?this.N5a:this.L0a,this.LB=k(g,e,l),this.dL=k(b,c,l),this.$ba=k(d,f,l)):(this.LB=e,this.dL=c,this.$ba=f);g=this.IQ==0;e=n==0;this.IQ=this.x3&&g&&!e||this.D3&&e&&!g?k(this.IQ,n,this.N8a):n;this.hca=this.LB*
h;this.cca=this.dL*h;this.dca=this.$ba*h;this.Sua=this.IQ/h};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"),k=a("tdv/view/core/UIComponent"),p=a("tdv/player/view/panorama/control/camera/MouseManager"),h=a("tdv/player/view/panorama/control/camera/MovementManager"),g=a("tdv/view/util/Animation"),e=a("tdv/constants/EventName");
a=m.extend(k,function(){k.call(this);this.cf("Renderer");this.ea=document.createElement("canvas");this.ea.style.position="absolute";this.ea.style.left="0";this.ea.style.top="0";this.wa().kk(this.ea);this.eC=null;this.Fa=this.BL=this.zL=this.AL=0;this.Sl=!1;this.G2a=150;this.qR=0;this.Fo=null;this.bind(e.Yb,this.jd,this,!0);this.Gb=new p;this.Gb.Qlb(720);this.Gb.sX(0);this.Gb.qE("drag_rotation");this.Gb.xJ(360);this.Gb.bind(p.Sw,this.S1a,this);this.zc=new h});a.prototype.Bgb=function(b,c,d){this.eC=
b;this.AL=c;this.zL=d;this.BL=Math.floor(this.eC.length*this.Fa/360);this.Iha();this.Gb.Mt(this);this.Sa()};a.prototype.a$a=function(){this.eC=null;this.rv();this.Iha();this.Gb.An()};a.prototype.play=function(){this.Sl=!0;this.Sa()};a.prototype.S1a=function(b){this.rv();this.zc.jpa(b.NA,b.mA,0,b.zP,b.PO,0,!1,!0);this.Sa()};a.prototype.$fa=function(){this.play()};a.prototype.Xp=function(b){this.eC&&(this.zc.Nf()?(this.Sl=!1,this.zc.Lb(b),this.nta(this.zc.LB),this.Sa()):this.Sl?(this.nta(this.G2a*b/
1E3),this.Sa()):this.FL()||this.bU())};a.prototype.cj=function(b){for(this.Fa=b;this.Fa<0;)this.Fa+=360;for(;this.Fa>=360;)this.Fa-=360;this.G7a()};a.prototype.G7a=function(){if(this.eC){var b=Math.floor(this.eC.length*this.Fa/360);this.BL!=b&&(this.BL=b,this.uBa())}};a.prototype.nta=function(b){this.cj(this.Fa+b)};a.prototype.jd=function(){this.Iha()};a.prototype.Iha=function(){var b=this.ea;if(this.AL==0||this.zL==0)b.width=0,b.height=0;else{var c=this.Ph(),d=this.Oh();d*this.AL>c*this.zL?(b.width=
c,b.height=this.zL*c/this.AL):(b.height=d,b.width=this.AL*d/this.zL);b.style.left=Math.round((c-b.width)*.5)+"px";b.style.top=Math.round((d-b.height)*.5)+"px";this.uBa()}};a.prototype.uBa=function(){if(this.eC){var b=this.ea;b.getContext("2d").drawImage(this.eC[this.BL],0,0,this.AL,this.zL,0,0,b.width,b.height)}};a.prototype.FL=function(){return this.Fo?!0:!1};a.prototype.bU=function(){this.rv();if(this.qR>0){var b=this;this.Fo=setTimeout(function(){b.Fo=null;b.$fa()},this.qR)}};a.prototype.rv=function(){this.Fo&&
(clearTimeout(this.Fo),this.Fo=null)};a.prototype.Sa=function(){g.requestFrame(this.Xp,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"),k=a("tdv/constants/Priority"),p=a("tdv/events/Event"),h=a("tdv/player/parser/ClassInfo"),g=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=h.define("Object3D",c,function(){c.call(this);this.Sd=this.No=this.Ri=this.m=null;this.bind(m.Cd,this.To,this);this.bind(m.sd,this.Ro,this)});a.prototype.Ib=function(){c.prototype.Ib.call(this);this.m||(this.m=new b,this.m.xa({left:0,top:0,right:0,bottom:0}),this.hb(this.m));this.Ri||(this.Ri=new e,this.Ri.xa({left:0,bottom:0,right:0,height:20,visible:!1}),this.hb(this.Ri))};a.prototype.To=
function(){this.p0a()};a.prototype.Ro=function(){this.sq()};a.prototype.p0a=function(){this.Ri.set("percent",0);this.Ri.set("visible",!0);this.m.cj(this.get("yaw"));var f=this.get("frames",[]);this.No=[];this.Sd=[];for(var n=0;n<f.length;n++){var l=g.nt(f[n]);this.No.push(l);l=new d(k.Fp);l.bind(m.ha,this.AS,this);l.bind(m.$c,this.BS,this);this.Sd.push(l)}for(n=0;n<f.length;n++)this.Sd[n].load(this.No[n].get("url"))};a.prototype.AS=function(){var f=this.Sd.filter(function(n){return n.aj()});this.Ri.set("percent",
100*f.length/this.Sd.length);f.length==this.Sd.length&&this.Ke()};a.prototype.BS=function(){};a.prototype.Ke=function(){this.Ri.set("visible",!1);var f=this.No[0].get("width",this.Sd[0].Zf()),n=this.No[0].get("height",this.Sd[0].pg()),l=this.Sd.map(function(q){return q.qg()});this.m.Bgb(l,f,n);this.o(new p(m.ha))};a.prototype.sq=function(){this.Sd&&(this.Ri.set("visible",!1),this.m.a$a(),this.Sd=this.Sd.forEach(function(f){f.h(m.ha,this.AS,this);f.h(m.$c,this.BS,this);f.cancel()}),this.No=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(k,p,h){m.call(this);k!==void 0&&this.set("yaw",k);p!==void 0&&this.set("pitch",p);h!==void 0&&this.set("hfov",h)})});
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"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/script/PanoramaCameraPosition"),h=a("tdv/player/script/RotationalCameraPosition"),g=k.define("RotationalCamera",m,function(){m.call(this);this.set("initialPosition",new h)});return k.define("PanoramaCamera",g,function(){g.call(this);
this.set("initialPosition",new p)})});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"),k=a("tdv/events/Event"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/constants/EventName");a=p.define("RotationalCameraSequence",m,function(){m.call(this)});a.prototype.play=a.prototype.play=function(){this.o(new k(h.ax))};a.prototype.pause=a.prototype.pause=function(){this.o(new k(h.sK))};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"),k=a("tdv/player/script/RotationalCameraSequence");return m.define("PanoramaCameraSequence",k,function(){k.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/Vector"],function(a){function m(g){this.m=g;this.Jr=[];this.Vda=!1;this.qb=this.Fa=0}var k=a("tdv/constants/PlaybackState"),p=a("tdv/player/script/DirectionalPanoramaAudio"),h=a("tdv/player/view/util/geo/Vector");m.prototype.clear=function(){this.stop();this.Jr=this.m=null};m.prototype.end=function(g){var e=[],b=[],c=this.Cwa(g);
this.Jr.forEach(function(d){c.indexOf(d)<0?e.push(d):b.push(d)});e.forEach(function(d){d.EI().Yc(k.aa)});this.Jr=b;this.Vda=!1};m.prototype.start=function(g){this.end(g);this.Jr=this.Cwa(g);this.Vda=this.Jr.filter(function(e){return e instanceof p}).length>0;this.WDa();this.a3(k.PLAYING,!0)};m.prototype.play=function(){this.a3(k.PLAYING)};m.prototype.pause=function(){this.a3(k.Xb)};m.prototype.stop=function(){this.a3(k.aa)};m.prototype.xe=function(){this.Fa=this.m.Jc();this.qb=this.m.Ic();this.WDa()};
m.prototype.WDa=function(){if(this.Vda){var g=Math.PI/180,e=this.Fa*g,b=this.qb*g,c=new h(Math.sin(e)*Math.cos(b),Math.sin(b),Math.cos(e)*Math.cos(b));this.Jr.forEach(function(d){if(d instanceof p){var f=d.get("yaw",e)*g,n=d.get("pitch",b)*g,l=d.get("maximumAngle",360)*g;f=new h(Math.sin(f)*Math.cos(n),Math.sin(n),Math.cos(f)*Math.cos(n));l=Math.min(1,Math.max(0,1-Math.acos(c.yI(f))/l));d.EI().BA(l)}}.bind(this))}};m.prototype.Cwa=function(g){return g?g.get("audios",[]):[]};m.prototype.a3=function(g,
e){(e?this.Jr.slice().reverse():this.Jr).forEach(function(b){if(b.get("autoplay",!1)){b=b.EI();var c=b.getState();g==k.PLAYING&&c!=k.PLAYING?b.Yc(k.PLAYING):g==k.Xb&&c==k.PLAYING?b.Yc(k.Xb):g==k.aa&&c!=k.aa&&b.Yc(k.aa)}})};return m});
define("tdv/player/view/util/geo/Transformation",["require"],function(){function a(c){c%=p;c<0&&(c+=p);return e[c*h|0]}function m(c){c%=p;c<0&&(c+=p);return g[c*h|0]}function k(){this.identity()}k.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.wi=this.ui=0};k.prototype.clone=function(){var c=new k;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.ui=this.ui;c.wi=this.wi;c.tz=this.tz;return c};k.prototype.concat=function(c){var d=this.m11,f=this.m12,n=this.m13,l=this.m21,q=this.m22,r=this.m23,t=this.m31,u=this.m32,v=this.m33,w=this.ui,y=this.wi,x=this.tz;this.m11=d*c.m11+f*c.m21+n*c.m31;this.m12=d*c.m12+f*c.m22+n*c.m32;this.m13=d*c.m13+f*c.m23+n*c.m33;this.m21=l*c.m11+q*c.m21+r*c.m31;this.m22=l*c.m12+q*c.m22+r*c.m32;this.m23=l*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.ui=w*c.m11+y*c.m21+x*c.m31+c.ui;this.wi=w*c.m12+y*c.m22+x*c.m32+c.wi;this.tz=w*c.m13+y*c.m23+x*c.m33+c.tz};k.prototype.translate=function(c,d,f){this.ui+=c;this.wi+=d;this.tz+=f};k.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.ui*=c;this.wi*=d;this.tz*=f};k.prototype.rotateX=function(c){var d=a(c);c=m(c);var f=this.m12*d+this.m13*c,n=this.m22*c-this.m23*d,l=this.m22*d+this.m23*
c,q=this.m32*c-this.m33*d,r=this.m32*d+this.m33*c,t=this.wi*c-this.tz*d,u=this.wi*d+this.tz*c;this.m12=this.m12*c-this.m13*d;this.m13=f;this.m22=n;this.m23=l;this.m32=q;this.m33=r;this.wi=t;this.tz=u};k.prototype.rotateY=function(c){var d=a(c);c=m(c);var f=-this.m11*d+this.m13*c,n=this.m21*c+this.m23*d,l=-this.m21*d+this.m23*c,q=this.m31*c+this.m33*d,r=-this.m31*d+this.m33*c,t=this.ui*c+this.tz*d,u=-this.ui*d+this.tz*c;this.m11=this.m11*c+this.m13*d;this.m13=f;this.m21=n;this.m23=l;this.m31=q;this.m33=
r;this.ui=t;this.tz=u};k.prototype.rotateZ=function(c){var d=a(c);c=m(c);var f=this.m11*d+this.m12*c,n=this.m21*c-this.m22*d,l=this.m21*d+this.m22*c,q=this.m31*c-this.m32*d,r=this.m31*d+this.m32*c,t=this.ui*c-this.wi*d,u=this.ui*d+this.wi*c;this.m11=this.m11*c-this.m12*d;this.m12=f;this.m21=n;this.m22=l;this.m31=q;this.m32=r;this.ui=t;this.wi=u};k.prototype.rotate=function(c,d,f){this.rotateX(c);this.rotateY(d);this.rotateZ(f)};k.prototype.invert=function(){var c=this.ibb();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.ui=-(d.ui*this.m11+d.wi*this.m21+d.tz*this.m31);this.wi=-(d.ui*this.m12+d.wi*this.m22+d.tz*this.m32);this.tz=-(d.ui*this.m13+d.wi*this.m23+d.tz*this.m33);
return!0};k.prototype.ibb=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)};k.prototype.AN=function(c){var d=c.x*this.m12+c.y*this.m22+c.z*this.m32+this.wi,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.ui;c.y=d;c.z=f};for(var p=Math.PI*2,h=18E4/p,g=new Float32Array(180001),e=new Float32Array(180001),b=0;b<18E4;b++)g[b]=Math.cos(b/h),e[b]=
Math.sin(b/h);g[18E4]=g[0];e[18E4]=e[0];return k});define("tdv/player/view/panorama/renderer/constants/EyeLayer",["require"],function(){return{Hw:0,$a:1,Cb: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"),k=a("tdv/player/view/util/Capabilities"),p={get:function(h){return h.qTa||(h.qTa=this.$Xa(h))},$Xa:function(h){if(m.Qa("CubicPanoramaFrame",h))return h.get("stereoCube")?p.nB:h.get("cube")?p.Ww:p.Fm;if(m.Qa("SphericPanoramaFrame",h)){var g=h.get("stereoSphere"),e=h.get("sphere"),b=h.get("hfov");h=h.get("vfov");
var c=b>359.9&&h>179.9,d=!1;g&&!e?d=!0:g?e&&!g.get("levels").some(k.cPa)?d=!1:c&&k.L9a()?d=!0:!c&&k.K9a()&&(d=!0):d=!1;return d?(g=g.get("levels"),e=Math.max.apply(Math,g.map(function(f){return f.get("width")})),Math.max.apply(Math,g.map(function(f){return f.get("height")}))/h/(e/b)>1?p.Br:p.qu):p.rr}},nB:"stereoCube_12_1",Ww:"monoCube_6_1",Fm:"monoCube_1_1",rr:"monoSphere_1_1",Br:"stereoSphere_1_2",qu:"stereoSphere_2_1"};return p});
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,Q){return K.split(L).join(Q).split(encodeURI(L)).join(Q)}function k(K,L){return K.indexOf(L)>=0||K.indexOf(encodeURI(L))>=0}function p(){var K=D.Xz()&&E.Kg("recent_ipad_use_max_res",!1);p=function(){return K};return K}function h(K){if(K.length==0)return 1;K.sort(function(L,Q){return Q.get("width")-L.get("width")});return K[0].get("width")/K[0].get("height")}function g(K,L){var Q=1E4;p()||(D.$f()?Q=2048:D.Xz()?Q=1280:D.yb()&&(Q=1024));switch(K){case z.Ww:return[6*Q,Q];case z.Fm:return[Q,
Q];case z.nB:return[12*Q,Q]}switch(K){case z.Br:L*=2;break;case z.qu:L*=.5}return L>2?[Q*4,Q*4/L]:[Q*2*L,Q*2]}function e(K){if(p())return[void 0,void 0];switch(K){case z.Ww:if(D.$f()||D.yb())return[18432,1536];break;case z.Br:if(D.$f())return[5352,5352];if(D.yb())return[6086,6086];break;case z.rr:if(D.$f())return[7168,3584];if(D.yb()&&D.Xz())return[8192,4096]}return[void 0,void 0]}function b(K,L){var Q=e(L);L=K.filter(function(T){return v.Qa("TiledImageResourceLevel",T)?!0:Q[0]!==void 0&&T.get("width")>
Q[0]||Q[1]!==void 0&&T.get("height")>Q[1]?!1:!0});L.length==0&&(L=[d(K)[0]]);return L}function c(){return D.Xz()?[w.jsa]:D.D6()||D.E6()?D.Dc()==D.cu||D.Dc()==D.RA?[w.bZ,w.aaa]:[w.aaa,w.bZ]:D.$f()?[w.bZ]:D.yb()?[w.aZ]:[]}function d(K){K.sort(function(L,Q){return L.get("width")-Q.get("width")});return K}function f(K,L){function Q(T){return Math.abs(T.get("width")*T.get("height")-L[0]*L[1])}K.sort(function(T,W){return Q(T)-Q(W)});return K.length&&K[0]||null}function n(K,L,Q){K=K.filter(function(T){return T.get("tags").indexOf(L)<
0});return K.length?K:Q!==void 0?Q:[]}function l(K,L,Q){K=K.filter(function(T){return T.get("tags").indexOf(L)>=0});return K.length?K:Q!==void 0?Q:[]}function q(K,L,Q){switch(Q){case z.nB:case z.Ww:case z.Fm:return K;case z.rr:case z.qu:return K*L.get("hfov",180)/90;case z.Br:return K*L.get("hfov",180)*2/90}}function r(K,L){switch(L){case z.nB:return K.get("stereoCube").get("levels");case z.Ww:return K.get("cube").get("levels");case z.Fm:return K.get("front").get("levels");case z.rr:return K.get("sphere").get("levels");
case z.Br:case z.qu:return K.get("stereoSphere").get("levels")}}function t(K,L){var Q=r(K,L),T=K.get("minFaceSize");if(T){var W=q(T,K,L);K=Q.filter(function(X){return X.get("height")>=W});K.length>0&&(Q=K)}return Q}function u(K){for(var L=[],Q=0;Q<K.length;Q++){var T=K[Q];L.indexOf(T)<0&&L.push(T)}return L}var v=a("tdv/player/parser/ClassInfo"),w=a("tdv/player/script/ImageResourceLevel"),y=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),x=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 E=a("tdv/player/view/util/URL"),B=a("tdv/view/constants/ScaleMode"),C=a("tdv/view/images/ImageLoader"),I=a("tdv/view/av/VideoPlayer"),F={pIa:function(K){K=K.get("frames");if(K.length==0)return 1;var L=K[0];K=z.get(L)==z.rr&&L.Fn()?(K=I.rk(L.get("sphere")))?[K]:[]:z.get(L)!=z.Br&&z.get(L)!=
z.qu||!L.Fn()?F.cma(L,!1):(K=I.rk(L.get("stereoSphere")))?[K]:[];return Math.max.apply(Math,K.map(function(Q){return F.Mbb(L,Q)}).concat([1]))},Mbb:function(K,L){L=F.Tla(K,L,x.FRONT);L=L.get("width");var Q=K.AD().get("hfov",360);switch(z.get(K)){case z.nB:return L/1080;case z.Ww:return L/540;case z.Fm:return L/90;case z.rr:return L/Q;case z.Br:return L/Q;case z.qu:return L/(2*Q)}},Ema:function(K,L){K=F.ip(K,L);return K.length<=6&&K.every(function(Q){return C.W8(Q)})},foa:function(K,L){return F.ip(K,
L).every(function(Q){return C.W8(Q)})},ip:function(K,L,Q){if(!K)return[];Q||(Q=!1);if(v.Qa("Panorama",K))return Q=K.get("flipImageHorizontally",!1),u([].concat(Array.prototype.concat.apply([],K.get("frames").map(function(V){return F.ip(V,L,Q)})),Array.prototype.concat.apply([],K.get("overlays").map(function(V){return F.ip(V,L,Q)}))));if(v.Qa("PanoramaFrame",K)){var T=Array.prototype.concat.apply([],K.get("overlays").map(function(V){return F.ip(V,L,Q)}));if(z.get(K)==z.rr&&K.Fn())return F.ip(I.rk(K.get("sphere")),
L).concat(T);if((z.get(K)==z.Br||z.get(K)==z.qu)&&K.Fn())return F.ip(I.rk(K.get("stereoSphere")),L).concat(T);var W=F.cma(K,L)[0];Q=K.get("flipImageHorizontally",!1);if(z.get(K)==z.Fm){var X=[x.FRONT,x.$a,x.BACK,x.Cb,x.Tc,x.Fc];return Array.prototype.concat.apply([],X.map(function(V){return(V=F.Tla(K,W,V))?F.ip(V,L,Q):[]})).concat(T)}return F.ip(W,L,Q).concat(T)}if(v.Qa("Video360ResourceLevel",K))return(T=K.get("posterURL"))?[T]:[];if(v.Qa("HotspotPanoramaOverlay",K))return K.get("projected")?Array.prototype.concat.apply([],
K.get("items").map(function(V){return F.ip(V,L,Q)})):[];if(v.Qa("FlatHotspotPanoramaOverlayImage",K)||v.Qa("HotspotPanoramaOverlayImage",K))return T=K.get("image").get("levels"),W=T[0],F.ip(W,L,Q),Array.prototype.concat.apply([],T.map(function(V){return F.ip(V,L,Q)}));if(v.Qa("TiledImageResourceLevel",K)){var Y=[];T=Math.round(K.get("width")/K.get("height"));if(T==1)var ca=z.Fm;else if(T==12)ca=z.wkb;else if(T==6)ca=z.Ww;else return[];var ea=T==12?[y.Cb,y.$a]:[y.Hw];X=[x.Cb,x.$a,x.Tc,x.Fc,x.FRONT,
x.BACK];var Z=K.get("colCount",T)/T,U=K.get("rowCount",1);ea.forEach(function(V){X.forEach(function(aa){for(var ba=0;ba<U;ba++)for(var da=0;da<Z;da++)Y.push(F.LIa(K,ca,V,aa,Q,U,ba,da))})});return Y}return v.Qa("ImageResourceLevel",K)?[K.get("url")]:[]},cma:function(K,L){var Q=z.get(K),T=this.MYa(K);if(T)return L&&!this.oxa(T)&&(K=this.Jwa(K),K!=T)?[K,T]:[T];T=l(t(K,Q),w.baa);if(T.length>0)return d(T);T=this.AZa(K);return L&&!this.oxa(T)&&(K=this.Jwa(K),K!=T)?[K,T]:[T]},vdb:function(K){return K.get("tags").indexOf(w.baa)>=
0},Tla:function(K,L,Q){if(z.get(K)!=z.Fm)return L;switch(Q){case x.FRONT:var T=K.get("front");break;case x.$a:T=K.get("left");break;case x.BACK:T=K.get("back");break;case x.Cb:T=K.get("right");break;case x.Tc:T=K.get("top");break;case x.Fc:T=K.get("bottom")}K=T&&T.get("levels")||[];if(K.length==0)return null;K=K.filter(function(W){return W.get("width")==L.get("width")&&W.get("height")==L.get("height")&&W.get("grayscale",!1)==L.get("grayscale",!1)&&W.get("colCount",1)==L.get("colCount",1)&&W.get("rowCount",
1)==L.get("rowCount",1)});return K[0]},LIa:function(K,L,Q,T,W,X,Y,ca){K=K.get("url");var ea=0;k(K,"{eye}")?K=m(K,"{eye}",S[Q]):ea+=6*(W?O:N)[Q];k(K,"{face}")?K=m(K,"{face}",R[T]):L!=z.Fm&&(ea+=G[T]);K=m(K,"{row}",Y);return K=m(K,"{column}",ca+ea*X)},Obb:function(K,L){return F.eR(F.wG(K.get("image")),90,90,B.ej,L)},ebb:function(K,L){return F.eR(F.wG(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},vbb:function(K,L){return F.eR(F.wG(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),
L)},ecb:function(K,L){return F.eR(F.wG(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},aIa:function(K,L){return F.eR(F.wG(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},wG:function(K){return K&&K.get("levels")||[]},eR:function(K,L,Q,T,W){if(!K||!K.length)return null;K=n(K,w.tu,K);for(var X=c(),Y=0;Y<X.length;Y++)K=l(K,X[Y],K);X=1E4;p()||(D.$f()?X=2048:D.Xz()?X=1280:D.yb()&&(X=1024));Y=d(K)[K.length-1];L=A.hma(L,Q,Y.get("width"),Y.get("height"),T,W);return f(K,
[L.Wd*X/90,L.Ek*X/90])},nbb:function(K){var L=F.wG(K.get("image"));if(!L||!L.length)return null;L=n(L,w.tu,L);for(var Q=c(),T=0;T<Q.length;T++)L=l(L,Q[T],L);Q=d(L)[L.length-1];K=A.P5(K.get("width"),K.get("height"),Q.get("width"),Q.get("height"),K.get("scaleMode"));return f(L,[K.width,K.height])},Rbb:function(K){var L=F.wG(K.get("image"));if(!L||!L.length)return null;L=n(L,w.tu,L);for(var Q=c(),T=0;T<Q.length;T++)L=l(L,Q[T],L);Q=1E4;p()||(D.$f()?Q=2048:D.Xz()?Q=1280:D.yb()&&(Q=1024));var W=T=20;(K=
K.get("vertices"))&&K.length==4&&(T=K[0].get("yaw"),W=K[1].get("yaw"),W<T&&(W+=360),T=W-T,W=K[0].get("pitch"),K=K[3].get("pitch"),W-=K);return f(L,[T*Q/90,W*Q/90])},Jwa:function(K){var L=z.get(K);K=t(K,L);K=b(K,L);K=l(K,w.tu,K);L=c();for(var Q=0;Q<L.length;Q++)K=l(K,L[Q],K);return f(K,[0,0])},AZa:function(K){var L=z.get(K);K=t(K,L);K=b(K,L);K=n(K,w.tu,K);for(var Q=c(),T=0;T<Q.length;T++)K=l(K,Q[T],K);L=g(L,h(K));return f(K,L)},MYa:function(K){var L=c();if(L.length==0)return null;var Q=z.get(K),T=
t(K,Q);T=b(T,Q);T=n(T,w.tu,T);K=[];for(var W=0;W<L.length&&K.length==0;W++)K=l(T,L[W]);if(K.length==0)return null;L=g(Q,h(K));return f(K,L)},oxa:function(K){return K.get("tags").indexOf(w.baa)>=0?!1:D.Dc()==D.SA?!0:C.W8(K.get("url"))}},G=function(){var K={};K[x.Cb]=0;K[x.$a]=1;K[x.Tc]=2;K[x.Fc]=3;K[x.FRONT]=4;K[x.BACK]=5;return K}(),N=function(){var K={};K[y.Cb]=0;K[y.$a]=1;K[y.Hw]=0;return K}(),O=function(){var K={};K[y.Cb]=1;K[y.$a]=0;K[y.Hw]=0;return K}(),R=function(){var K={};K[x.Cb]="r";K[x.$a]=
"l";K[x.Tc]="u";K[x.Fc]="d";K[x.FRONT]="f";K[x.BACK]="b";return K}(),S=function(){var K={};K[y.$a]="l";K[y.Cb]="r";K[y.Hw]="b";return K}();return F});
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(l){this.m=l;this.Rd=!1;this.bp=m.AF;this.ida=this.IG=!1;this.Of(null);this.m.bind(p.Yb,this.jd,this,!0);this.jd()}var k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/player/view/util/geo/Fov"),g=
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.hJa=function(){return this.bp!==m.AF};m.prototype.gJa=function(){return this.bp&m.BK?!0:!1};m.prototype.iJa=function(){return this.bp&m.CK?!0:!1};m.prototype.jJa=function(){return this.bp&m.DF?!0:!1};m.prototype.fJa=function(){return this.bp&m.zF?!0:!1};m.prototype.wA=function(l){this.IG=l};m.prototype.Jc=function(){this.gp();return this.Fa};
m.prototype.Ic=function(){this.gp();return this.qb};m.prototype.Ag=function(){this.gp();return this.Jd};m.prototype.Qz=function(){this.gp();return this.fb};m.prototype.Of=function(l){l?(this.Cga=l.get("hfov",360),this.T1=l.get("vfov",180),this.bT=l.get("pitch",0),this.oH=l.get("partial",!1),this.Yda=l.lJa(),this.Tda=l.bJa(),this.cea=Math.min(l.get("hfovMax",170),170),this.nR=l.get("hfovMin"),this.rfa=b.pIa(l)):(this.Cga=360,this.T1=180,this.bT=0,this.Tda=this.Yda=this.oH=!1,this.cea=120,this.rfa=
this.nR=1);this.Fa=0;this.qb=this.bT;this.Jd=0;this.Rd=!0};m.prototype.setPosition=function(l,q,r,t,u){this.Fa=l;this.qb=q;this.Jd=r;this.fb=t;this.ida=u;this.Rd=!0};m.prototype.jd=function(){var l=this.m.cb(),q=this.m.Kb();if(this.Pa!=l||this.Ga!=q)this.Pa=l,this.Ga=q,this.Rd=!0};m.prototype.gp=function(){if(this.Rd){this.Rd=!1;var l=this.Fa*f,q=this.qb*f,r=this.fb*f,t=(this.ida?h.er(this.cea,this.Pa,this.Ga):this.cea)*f;a:{var u=this.nR;if(k.Yz(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.m.getPixelRatio()*.5,this.rfa*45*u/100):this.nR?(this.ida?h.er(this.nR,this.Pa,this.Ga):this.nR)*f:2*Math.atan2(this.Pa*this.m.getPixelRatio()*.5,this.rfa*45);u=Math.min(t,u);if(this.IG){var v=360;var w=180;var y=0}else if(this.Yda||this.Tda){v=this.Tda?90:this.bT+this.T1*.5;var x=this.Yda?-90:this.bT-this.T1*.5;w=v-x;y=(v+x)*.5;v=this.Cga}else v=this.Cga,y=this.bT,w=this.T1;v*=f;w*=f;y*=f;for(x=this.Pa/this.Ga;l<-c;)l+=
2*c;for(;l>c;)l-=2*c;r=Math.max(Math.min(r,t),u);t=m.AF;if(!this.IG){q>d?t|=m.DF:q<-d&&(t|=m.zF);q=Math.max(Math.min(q,c*.5),-c*.5);var z=2*Math.atan(Math.tan(r*.5)/x);if(z>=w)r=2*Math.atan(Math.tan(w*.5)*x),q=y,t|=m.DF|m.zF;else{var A=Math.min(w*.5+y,c*.5);w=Math.max(-w*.5+y,-c*.5);y=!this.oH&&A>=.99*c*.5?c*.5:A-z*.5;w=!this.oH&&w<=.99*-c*.5?-c*.5:w+z*.5;q>y?(q=y,t|=m.DF):q<w&&(q=w,t|=m.zF)}this.oH&&(w=Math.tan(r*.5),x=w/x,x=new e(-w,q>0?x:-x,1),w=new g,w.rotateX(-q),x.apply(w),x=x.Jc()*2,x<0&&(x+=
2*c),w=Math.max(0,v*.5-x*.5-.25*f),z=Math.min(0,-v*.5+x*.5+.25*f),x>v?(l=0,r=Math.max(u,r*v/x),t|=m.BK|m.CK):l>w?(l=w,t|=m.CK):l<z&&(l=z,t|=m.BK))}this.Fa=l*n;this.qb=q*n;this.fb=r*n;this.bp=t}};var c=Math.PI,d=Math.PI*.5,f=Math.PI/180,n=180/Math.PI;m.AF=0;m.BK=1;m.CK=2;m.DF=4;m.zF=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"),k=a("tdv/constants/EventName"),p=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/panorama/control/events/RotationChangeEvent"),g=m.extend(p,function(){p.call(this);this.zR=!1;this.mq=void 0;this.fb=90;this.Zca=.1;this.yc=this.wb=null});g.prototype.setCamera=
function(e){this.yc&&this.yc.h(k.K("hoverFactor"),this.rja,this);if(this.yc=e)this.yc.bind(k.K("hoverFactor"),this.rja,this),this.rja()};g.prototype.rja=function(){this.Zca=this.yc.get("hoverFactor")};g.prototype.xJ=function(e){this.fb=e};g.prototype.Mt=function(e){this.An();e&&(this.wb=e,this.mq=void 0,this.wb.bind(k.mb,this.Uk,this,!0))};g.prototype.An=function(){this.wb!=null&&(this.wb.h(k.mb,this.Uk,this),this.wb=null)};g.prototype.Uk=function(e){this.jN(e)};g.prototype.jN=function(e){this.mq&&
this.Jja.call(this,+(this.fb*this.Zca*Math.min(Math.max((e.x-this.mq.x)/this.wb.cb(),-1),1)),-(this.fb*this.Zca*Math.min(Math.max((e.y-this.mq.y)/this.wb.cb(),-1),1)));this.mq=e};g.prototype.Jja=function(e,b){if(e!=0||b!=0){var c=new h(g.Sw);c.zP=e;c.PO=b;this.o(c)}};g.Sw="rotation change";return g});
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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/panorama/control/camera/MovementManager"),g=a("tdv/player/view/panorama/control/camera/HoverMouseManager"),e=m.extend(p,function(b,
c,d){p.call(this);this.m=b;this.kd=this.m.kd;this.va=c;this.Ac=d;this.HC=this.kZ=this.ga=!1;this.zc=new h;this.ik=null;this.Jd=this.qb=this.Fa=0;this.fb=90;this.Gb=new g;this.Gb.bind(g.Sw,this.ES,this,!0)});e.prototype.clear=function(){this.Gb.h(g.Sw,this.ES,this,!0);this.Gb.An();this.Gb=null;this.bG();this.m=this.kd=this.Ac=this.va=this.zc=null};e.prototype.setCamera=function(b){this.zc.reset();this.Gb.setCamera(b)};e.prototype.setPosition=function(b,c,d,f){if(this.Fa!=b||this.qb!=c||this.Jd!=d||
this.fb!=f)this.Fa=b,this.qb=c,this.Jd=d,this.fb=f,this.Gb.xJ(this.fb),this.Wha(!1),this.dU()};e.prototype.Nf=function(){return this.kZ&&this.HC?!0:!1};e.prototype.Lb=function(b){this.LU=!1;this.zc.Lb(b);this.HC=!1;b=this.Fa+this.zc.LB;var c=this.qb+this.zc.dL;this.Ac.Wq(this.fb);this.va.setPosition(b,c,this.Jd,this.Ac.df(),this.Ac.Rv());this.Fa=this.va.Jc();this.qb=this.va.Ic();this.Jd=this.va.Ag();this.fb=this.va.Qz()};e.prototype.lt=function(){return this.Fa};e.prototype.kt=function(){return this.qb};
e.prototype.yD=function(){return this.Jd};e.prototype.FI=function(){return this.fb};e.prototype.Ua=function(b){this.ga!=b&&((this.ga=b)?this.dU():(this.bG(),this.Wha(!1)))};e.prototype.ES=function(b){this.ld(b.NA,b.mA,0,0,b.zP,b.PO,0,0,!1,!1,!0,!0)};e.prototype.ld=function(b,c,d,f,n,l,q,r,t,u,v,w){var y=this.zc.jpa(b,c,d,n,l,q,u,v,w)||y;y&&this.Ti()};e.prototype.Ti=function(){this.HC=!0;this.o(new k(e.zi))};e.prototype.dU=function(){this.bG();this.ik=setTimeout(this.VS.bind(this),30)};e.prototype.bG=
function(){this.ik&&(clearTimeout(this.ik),this.ik=null)};e.prototype.VS=function(){this.Wha(this.ga)};e.prototype.Wha=function(b){this.kZ!=b&&((this.kZ=b)?(this.zc.reset(),this.Gb.Mt(this.m.getParent()),this.Ti()):this.Gb.An())};e.zi="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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher");a("tdv/player/view/util/Device");var g=a("tdv/player/view/util/Gyroscope");a=m.extend(h,function(){h.call(this);this.TEa=this.ga=!1;this.Jd=this.qb=this.Fa=
0;this.J2=!1;this.ys=this.Bv=0});a.prototype.Ua=function(e){if(this.ga!=e)if(this.ga=e){g.bind(this.qS,this,!0);e=g.ot();var b=e.pitch;this.Bv=this.Fa-e.yaw;this.ys=this.qb-b;this.vn()}else g.h(this.qS,this,!0)};a.prototype.setPosition=function(e,b,c){this.Fa!=e&&(this.Bv=this.FH(this.Bv+(e-this.FH(this.Fa,e)),0),this.Fa=e);this.qb!=b&&(this.ys+=b-this.qb,this.qb=b);this.Jd=c};a.prototype.lt=function(){return this.Fa};a.prototype.kt=function(){return this.qb};a.prototype.yD=function(){return this.Jd};
a.prototype.Nf=function(){return g.Meb()};a.prototype.Lb=function(e){var b=g.ot(),c=b.roll;e=20*e/1E3;var d=b.pitch+(this.TEa?this.ys:0);this.Fa=this.Tg(this.Fa,this.FH(this.FH(b.yaw,this.Fa)+this.Bv,this.Fa),e);this.qb=this.Tg(this.qb,d,e);this.Jd=this.Tg(this.Jd,c,e)};a.prototype.Mhb=function(e){this.TEa=e};a.prototype.Tg=function(e,b,c){e=(b-e)*(1-c);Math.abs(e)<.01&&(e=0);return b-e};a.prototype.FH=function(e,b){for(;e+180<b;)e+=360;for(;e-180>b;)e-=360;return e};a.prototype.qS=function(){this.ga&&
this.vn()};a.prototype.vn=function(){this.o(new p(k.V))};return a});define("tdv/player/view/panorama/control/constants/Movement",["require"],function(){return{oK:"left",pK:"right",nK:"down",qK:"up",dsa:"rotate10x",Esa:"zoom2x",PLAYING:"playing",mx:"zoomIn",nx:"zoomOut",tg:"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"),k=a("tdv/constants/Key"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/control/constants/Movement"),e=a("tdv/view/util/KeyboardControl"),b=m.extend(h,function(d){h.call(this);this.m=d;this.ga=
!1;this.jg={};this.$T=null;this.hk=this.ZT=!1;this.n0=this.n0.bind(this);this.Vm=this.Vm.bind(this);this.kd=this.m.kd;document.addEventListener("keydown",this.n0);document.addEventListener("keyup",this.Vm)});b.prototype.clear=function(){this.ga=!1;this.kd=this.m=null;document.removeEventListener("keydown",this.n0);document.removeEventListener("keyup",this.Vm)};b.prototype.Ua=function(d){this.ga!=d&&(this.ga=d)&&this.c4()};var c=[k.Sj,k.yi,k.$a,k.Cb,k.yp,k.lo,k.io,k.Dp,k.TY,k.PY];b.prototype.n0=function(d){if(!e.lp()){var f=
d.which,n=!1;!this.jg[f]&&c.indexOf(f)>=0&&(this.$T||this.ZT||(this.$T=setTimeout(this.W1a.bind(this),100)),n=this.jg[f]=!0);this.hk!=d.shiftKey&&(this.hk=d.shiftKey,n=!0);n&&this.c4()}};b.prototype.W1a=function(){this.ZT=!0;this.c4()};b.prototype.Vm=function(d){if(!e.lp()){var f=d.which,n=!1;if(f in this.jg){delete this.jg[f];n=!1;for(f in this.jg)this.jg[f]&&(n=!0);n||(this.$T&&clearTimeout(this.$T),this.$T=null,this.ZT=!1);n=!0}this.hk!=d.shiftKey&&(this.hk=d.shiftKey,n=!0);n&&this.c4()}};b.prototype.c4=
function(){if(this.ga){var d=this.kd.get("gazeModeEnabled"),f=this.kd.get("arrowKeysAction");if(d||f!="none"){d=d||f=="rotate";f=[];this.jg[k.TY]?f.push(g.mx):this.jg[k.PY]&&f.push(g.nx);this.ZT&&(this.jg[k.TY]||this.jg[k.PY])&&f.push(g.Esa);this.jg[k.$a]||this.jg[k.yp]?f.push(g.oK):(this.jg[k.Cb]||this.jg[k.Dp])&&f.push(g.pK);if(d||this.hk)this.jg[k.Sj]||this.jg[k.lo]?f.push(g.qK):(this.jg[k.yi]||this.jg[k.io])&&f.push(g.nK);this.ZT&&(this.jg[k.$a]||this.jg[k.Cb]||this.jg[k.Sj]||this.jg[k.yi]||this.jg[k.yp]||
this.jg[k.Dp]||this.jg[k.lo]||this.jg[k.io])&&f.push(g.dsa);f.length==0&&f.push(g.tg);this.o(new p(b.i$,{JKa:f}))}}};b.i$="movementsChange";return b});
define("tdv/player/view/panorama/control/camera/TargetManager",["require"],function(){function a(){this.FF=!0;this.reset()}function m(k,p,h){k=(p-k)*(1-h);Math.abs(k)<.01&&(k=0);return p-k}a.prototype.reset=function(){this.FF&&(this.FF=!1,this.J3=this.K3=this.iz=this.ep=this.eL=this.hL=this.fL=this.PB=void 0)};a.prototype.moveTo=function(k,p,h,g,e){this.ep=k;this.iz=p;this.K3=h;this.J3=g;this.qea=e;this.FF=!0};a.prototype.setPosition=function(k,p,h,g){this.PB=k;this.fL=p;this.hL=h;this.eL=g};a.prototype.lt=
function(){return this.PB};a.prototype.kt=function(){return this.fL};a.prototype.yD=function(){return this.hL};a.prototype.FI=function(){return this.eL};a.prototype.Nf=function(){return this.FF};a.prototype.Lb=function(){if(this.FF)if(this.qea)this.PB=this.ep,this.fL=this.iz,this.hL=this.K3,this.eL=this.J3,this.FF=!1;else{for(var k=this.PB,p=this.ep-180,h=this.ep+180;k<p;)k+=h-p;for(;k>h;)k-=h-p;this.PB=k;this.PB=m(this.PB,this.ep,.5);this.fL=m(this.fL,this.iz,.5);this.hL=m(this.hL,this.K3,.5);this.eL=
m(this.eL,this.J3,.5);this.PB==this.ep&&this.fL==this.iz&&this.hL==this.K3&&this.eL==this.J3&&(this.FF=!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.m=b;this.ga=!1;this.Jd=this.qb=this.Fa=0;this.P_=void 0}var k=a("tdv/player/view/util/geo/Quaternion"),p=a("tdv/player/view/util/URL"),h=a("tdv/player/view/util/XR");m.prototype.Ua=function(b){this.ga!=b&&(this.ga=b,this.P_=void 0)};m.prototype.setPosition=function(b,c,d){if(this.ga&&this.P_!==void 0){for(var f=
b-this.P_;f>180;)f-=360;for(;f<-180;)f+=360;(f<-1E-4||f>1E-4)&&h.bP(b)}this.Fa=b;this.qb=c;this.Jd=d};m.prototype.lt=function(){return this.Fa};m.prototype.kt=function(){return this.qb};m.prototype.yD=function(){return this.Jd};m.prototype.Nf=function(){return!0};m.prototype.Lb=function(){if(h.Dg&&!this.m.G2){h.bP();var b=k.a9(h.yg,!0);this.P_=this.Fa=b.Za;this.qb=b.pitch;this.Jd=b.fh;this.qb=e===void 0?b.pitch:e;this.Jd=g===void 0?b.fh:g;h.setScale(1)}};var g=p.tk("debug")?p.Q5("force_vr_roll"):
void 0,e=p.tk("debug")?p.Q5("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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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"),n=a("tdv/player/view/panorama/control/camera/VRPoseManager"),
l=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(h,function(u,v,w){h.call(this);this.m=u;this.kd=this.m.kd;this.va=v;this.Ac=w;this.HC=this.ZB=this.iR=this.z2=this.ga=!1;this.zc=new c;this.Ls=new f;this.Jd=this.qb=this.Fa=0;this.fb=90;this.NH=1;this.Hi=void 0;this.aba=this.jQ=5;this.LU=!1;this.Gb=new d;this.Gb.bind(d.Sw,this.ES,this,!0);this.Gb.bind(d.mr,this.uC,this,!0);
this.Gb.bind(d.Rj,this.ss,this,!0);this.Gb.bind(d.Qj,this.rs,this,!0);this.Sm=new e;this.Sm.bind(k.V,this.bza,this);this.YB=!1;this.Ko=new b(this.m);this.Ko.bind(b.i$,this.lza,this,!0);this.Av=new n(this.m);q.O.bind(k.V,this.bq,this,!0);this.bq()});t.prototype.clear=function(){this.Gb.h(d.Sw,this.ES,this,!0);this.Gb.h(d.mr,this.uC,this,!0);this.Gb.h(d.Rj,this.ss,this,!0);this.Gb.h(d.Qj,this.rs,this,!0);this.Gb.An();this.Gb=null;this.Sm.h(k.V,this.bza,this);this.Sm=null;this.Ko.h(b.i$,this.lza,this,
!0);this.Ko.clear();this.Ko=null;q.O.h(k.V,this.bq,this,!0);this.Ac=this.va=this.zc=null;this.KZ();this.m=this.kd=null};t.prototype.setCamera=function(u){this.zc.reset();this.Ls.reset();this.Gb.setCamera(u);this.jQ=u.get("automaticRotationSpeed");this.aba=u.get("automaticZoomSpeed")};t.prototype.pl=function(u){Array.isArray(u)||(u=[u]);var v=0,w=0,y=0,x=!1;u.includes(l.tg)||(u.includes(l.oK)?v=-this.jQ:u.includes(l.pK)&&(v=+this.jQ),u.includes(l.nK)?w=-this.jQ:u.includes(l.qK)&&(w=+this.jQ),u.includes(l.mx)?
y=-this.aba:u.includes(l.nx)&&(y=+this.aba),u.includes(l.PLAYING)&&(x=!0),u.includes(l.Esa)&&(y*=2),u.includes(l.dsa)&&(v*=10,w*=10),v*=this.NH,w*=this.NH);this.ld(v,w,0,y,0,0,0,0,x,!0,!0,!0)};t.prototype.setPosition=function(u,v,w,y){this.Fa=u;this.qb=v;this.Jd=w;this.fb=y;this.NH=this.fb/90;this.Sm.setPosition(this.Fa,this.qb,this.Jd);this.Av.setPosition(this.Fa,this.qb,this.Jd);this.Gb.xJ(this.fb);this.Ls.setPosition(this.Fa,this.qb,this.Jd,this.fb)};t.prototype.moveTo=function(u,v,w,y,x){this.Ls.moveTo(u,
v,w,this.Ac.JHa(y),x);this.z2=!1;this.zc.reset();this.Ti()};t.prototype.kpa=function(u,v,w){this.ld(0,0,0,0,u,v,w,0,!1,!1,!1)};t.prototype.Nf=function(){return this.ga&&(this.HC||this.dQa())?!0:!1};t.prototype.e$a=function(){this.HC=this.LU=!1};t.prototype.dQa=function(){return this.ga?this.LU?!0:this.Av.ga?this.Av.Nf()||this.zc.Nf():this.Sm.ga?this.YB?!0:this.Sm.Nf()||this.zc.Nf():this.zc.Nf()||this.Ls.Nf():!1};t.prototype.Lb=function(u){this.LU=!1;this.zc.Lb(u);this.HC=!1;var v=this.fb;if(this.Av.ga){this.Av.Lb(u);
u=this.Av.lt()+this.zc.LB+this.$Za();var w=this.Av.kt();var y=this.Av.yD()}else this.Ls.Nf()?(this.Ls.Lb(u),u=this.Ls.lt(),w=this.Ls.kt(),y=this.Ls.yD(),v=this.Ls.FI()):(this.Sm.ga?(this.YB=!1,this.Sm.Lb(u),u=this.Sm.lt()+this.zc.LB,w=this.Sm.kt(),this.iR&&(w+=this.zc.dL),y=this.Sm.yD()):(u=this.Fa+this.zc.LB,w=this.qb+this.zc.dL,y=0),v+=this.zc.Sua);this.Ac.Wq(v);this.va.setPosition(u,w,y,this.Ac.df(),this.Ac.Rv());this.Fa=this.va.Jc();this.qb=this.va.Ic();this.Jd=this.va.Ag();this.fb=this.va.Qz();
if(this.z2&&this.va.hJa()){v=this.zc.UU;if(this.va.gJa()||this.va.iJa())v=-v;u=this.zc.gT;if(this.va.jJa()||this.va.fJa())u=-u;this.ld(v,u,0,0,0,0,0,0,!0,!1,!1,!0)}};t.prototype.lt=function(){return this.Fa};t.prototype.kt=function(){return this.qb};t.prototype.yD=function(){return this.Jd};t.prototype.FI=function(){return this.fb};t.prototype.Ua=function(u){this.ga!=u&&((this.ga=u)?(this.RC(this.Gb.aH==g.Ow?r.aB:void 0),this.Gb.Mt(this.m.getParent()),this.Ti()):(this.KZ(),this.Gb.An()),this.Cja())};
t.prototype.uX=function(u){this.ZB!=u&&(this.ZB=u,this.Cja(),this.YB=!0)};t.prototype.oE=function(u){this.Ko.Ua(u)};t.prototype.Cja=function(){var u=this.m.st();this.Sm.Ua(this.ga&&this.ZB&&!u);this.Av.Ua(this.ga&&u)};t.prototype.bza=function(){this.Ti()};t.prototype.vX=function(u){this.iR=u;this.Sm.Mhb(this.iR)};t.prototype.qE=function(u){this.Gb.qE(u);this.RC(this.Gb.aH==g.Ow?r.aB:void 0)};t.prototype.EJ=function(u){this.Gb.EJ(u)};t.prototype.bq=function(){this.ga&&(this.m.st()&&q.bP(this.Fa),this.Cja(),
this.Ti())};t.prototype.ES=function(u){var v=!this.Av.ga&&(!this.Sm.ga||this.iR);if(this.Gb.aH==g.QE){var w=void 0;if(u.NA!=0||u.mA!=0){var y=Math.sqrt(u.mA*u.mA+u.NA*u.NA)>25,x=Math.atan2(u.mA,u.NA)*180/Math.PI;x>=-22.5&&x<22.5?w=y?r.yra:r.xra:x>=22.5&&x<67.5?w=y?r.Ara:r.Hra:x>=67.5&&x<112.5?w=y?r.zra:r.Gra:x>=112.5&&x<157.5?w=y?r.Bra:r.Ira:x>=157.5||x<-157.5?w=y?r.Fra:r.Mra:x>=-157.5&&x<-112.5?w=y?r.Era:r.Lra:x>=-112.5&&x<-67.5?w=y?r.Cra:r.Jra:x>=-67.5&&x<-22.5&&(w=y?r.Dra:r.Kra)}this.RC(w);this.ld(u.NA,
u.mA,0,0,u.zP,u.PO,0,0,!1,!1,!1,v)}else this.ld(u.NA,u.mA,0,0,u.zP,u.PO,0,0,!1,!1,v,v)};t.prototype.uC=function(u){this.ld(0,0,0,u.Ocb,0,0,0,u.rma,!1,!0,!1,!0)};t.prototype.ld=function(u,v,w,y,x,z,A,D,E,B,C,I){var F=!1;this.kd.get("rotationEnabled")&&(F=this.zc.jpa(u,v,w,x,z,A,B,C,I)||F);this.kd.get("zoomEnabled")&&(F=this.zc.Ohb(y,D)||F);F&&(this.Ls.reset(),this.z2=E,this.Ti())};t.prototype.$Za=function(){if(!this.m.st())return 0;this.s2=this.s2||0;for(var u=0,v=0;v<q.fe.length&&u==0;v++)u=q.fe[v].Tb.x;
v=this.m.R.get("vrThumbstickRotationStep");v=u>0&&this.s2<=0?v:u<0&&this.s2>=0?-v:0;this.s2=u;return v};t.prototype.Ti=function(){this.HC=!0;this.o(new p(t.zi))};t.prototype.ss=function(){this.LU=!0;this.o(new p(t.Rj));this.Gb.aH==g.Ow&&this.RC(r.Ai)};t.prototype.rs=function(){this.o(new p(t.Qj));this.Gb.aH==g.Ow&&this.RC(r.aB)};t.prototype.lza=function(u){this.pl(u.data.JKa);u.data.JKa.indexOf(l.tg)<0&&this.m.Wb().o(new p(k.wF,{kP:u}))};t.prototype.RC=function(u){this.Hi!=u&&this.ga&&(this.Hi&&this.m.TO(this.Hi),
(this.Hi=u)&&this.m.V7(this.Hi))};t.prototype.KZ=function(){this.Hi&&(this.m.TO(this.Hi),this.Hi=void 0)};t.zi="position change request";t.Rj="user interaction start";t.Qj="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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/events/Event"),g=
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(g,function(f,n,l){g.call(this);this.m=f;this.va=n;this.Ac=l;this.FM=this.Vb=null;this.jn=this.EC=!1;this.qH=void 0;this.VL=[];this.Fha=0;this.ja=null;this.qb=this.Fa=0;this.fb=90});d.prototype.clear=function(){this.end();this.va=this.m=null};d.prototype.start=
function(f){this.i5a(f);this.w2a();this.jn=!1;this.kua();this.EC=!1;this.Ti();this.bl()};d.prototype.end=function(){this.Vb!=null&&(this.pua(),this.EC=this.jn=!1,this.ja=null,this.bl())};d.prototype.Ueb=function(){this.Vb&&this.Vb.get("restartMovementOnUserInteraction")?this.EC||(this.mDa(),this.Eia(),this.ja=null,this.EC=!0,this.bl()):(this.ja=null,this.pause())};d.prototype.Yeb=function(){this.EC&&(this.EC=!1,this.zxa()||this.X5a())};d.prototype.i5a=function(f){this.pua();this.Vb=f;this.Vb.bind(k.ax,
this.qAa,this,!0);this.Vb.bind(k.sK,this.pAa,this,!0);this.Vb.bind(k.K("movementIndex"),this.v1,this,!0);this.VL=this.Vb.get("movements",[])};d.prototype.pua=function(){this.Eia();this.Vb!=null&&(this.Vb.h(k.ax,this.qAa,this),this.Vb.h(k.sK,this.pAa,this),this.Vb.h(k.K("movementIndex"),this.v1,this),this.Vb.set("movementIndex",-1),this.Vb=null,this.VL=[])};d.prototype.gl=function(){return this.Vb?this.jn?p.Xb:p.PLAYING:p.aa};d.prototype.setPosition=function(f,n,l,q){this.Fa=f;this.qb=n;this.fb=q};
d.prototype.Nf=function(){return!this.Vb||!this.ja||this.jn||this.EC||this.zxa()?!1:!0};d.prototype.Lb=function(f){if(this.Nf()){this.ja.Lb(f);f=this.ja.ib("hfov");if(this.Vo!=this.Ac.Vo){this.Vo=this.Ac.Vo;var n=this.ja.PV("hfov");n.from=this.Ac.rV(n.from);n.to=this.Ac.rV(n.to);f=this.Ac.rV(f)}this.va.setPosition(this.ja.ib("yaw"),this.ja.ib("pitch"),0,f,this.Ac.Rv());this.Fa=this.va.Jc();this.qb=this.va.Ic();this.fb=this.va.Qz();this.ja.Qe()&&this.A1a()}};d.prototype.lt=function(){return this.Fa};
d.prototype.kt=function(){return this.qb};d.prototype.FI=function(){return this.fb};d.prototype.play=function(){this.jn&&(this.jn=!1,this.ja||this.v1(),this.kua(),this.Ti(),this.bl())};d.prototype.pause=function(){this.jn||(this.jn=!0,this.mDa(),this.bl())};d.prototype.qAa=function(){this.play()};d.prototype.pAa=function(){this.pause()};d.prototype.w2a=function(){this.Fha=0;var f=this.Vb.get("movementIndex",-1);f==-1&&(f=0);this.g2(f)};d.prototype.y2a=function(){this.Fha++;var f=this.Vb.get("repeat",
1);this.VL.length>0&&(f==0||this.Fha<f)?this.g2(0):(this.Vb.o(new h(k.Qb)),this.end(),this.a7a())};d.prototype.x2a=function(){this.g2(this.Vb.get("movementIndex",0)+1)};d.prototype.g2=function(f){f<this.VL.length?this.Vb.get("movementIndex")!=f?this.Vb.set("movementIndex",f):this.v1():(this.Vb.o(new h(k.yr)),this.y2a())};d.prototype.v1=function(){var f=this.Vb.get("movementIndex");this.ja=f>=0?this.EQ(this.VL[f]):null};d.prototype.A1a=function(){this.VL[this.Vb.get("movementIndex")].o(new h(k.Qb));
this.x2a()};d.prototype.zxa=function(){return this.FM!=null};d.prototype.X5a=function(){this.Eia();var f=this,n=this.Vb.get("restartMovementDelay")||0;this.FM=setTimeout(function(){f.FM=null;f.R1a()},n);this.bl()};d.prototype.Eia=function(){this.FM&&(clearTimeout(this.FM),this.FM=null)};d.prototype.R1a=function(){this.g2(this.Vb.get("movementIndex"));this.Ti();this.bl()};d.prototype.EQ=function(f){var n,l=this.DH(this.Fa,-180,180),q=this.qb,r=this.fb;if(e.Qa("TargetRotationalCameraMovement",f)){var t=
f.get("targetYaw",l);var u=f.get("targetPitch",q);(n=f.get("targetHfov"))?(this.Ac.QNa(n),n=this.Ac.df()):n=r;this.va.setPosition(t,u,0,n,this.Ac.Rv());if(this.va.oH)t=this.va.Jc();else switch(this.QXa(f)){case "left":t=this.DH(t,l-360,l);break;case "right":t=this.DH(t,l,l+360);break;case "longest":t=this.DH(t,l-180,l+180);t=t>=l?this.DH(t,l-360,l):this.DH(t,l,l+360);break;default:t=this.DH(t,l-180,l+180)}}else e.Qa("DistanceRotationalCameraMovement",f)&&(t=l+f.get("yawDelta",0),this.va.oH&&(t=Math.min(Math.max(-180,
t),180)),u=q+f.get("pitchDelta",0),n=r+f.get("hfovDelta",0),this.va.setPosition(t,u,0,n,this.Ac.Rv()),this.va.oH&&(t=this.va.Jc()));u=this.va.Ic();n=this.va.Qz();this.Vo=this.Ac.Vo;return new b(f.get("easing"),[new c("yaw",l,t,f.get("yawSpeed")),new c("pitch",q,u,f.get("pitchSpeed")),new c("hfov",r,n,f.get("hfovSpeed"))],f.get("duration"))};d.prototype.kua=function(){this.qH=void 0};d.prototype.mDa=function(){if(this.ja){this.qH=void 0;var f=this.ja&&this.ja.PV("yaw");f&&(f.to>f.from?this.qH="right":
f.to<f.from&&(this.qH="left"))}};d.prototype.QXa=function(f){f=f.get("path");f=="longest"&&this.qH&&(f=this.qH);this.qH=void 0;return f};d.prototype.DH=function(f,n,l){for(;f<n;)f+=l-n;for(;f>l;)f-=l-n;return f};d.prototype.Ti=function(){this.o(new h(d.zi))};d.prototype.a7a=function(){this.o(new h(d.v$))};d.prototype.bl=function(){this.o(new h(d.dd))};d.zi="position change request";d.v$="sequence end";d.dd="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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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"),n=a("tdv/constants/PlaybackState"),
l=m.extend(h,function(q,r){h.call(this);this.m=q;this.m.bind(k.Yb,this.jd,this);f.O.bind(k.V,this.bq,this,!0);this.Ac=r;this.Kha=!1;this.fb=this.Jd=this.qb=this.Fa=void 0;this.Dv=this.Cv=this.gS=this.jS=this.iS=this.hS=!1;this.cp=!0;this.yL=this.ys=0;this.ga=!1;this.Fo=null;this.qR=5E3;this.sR=this.nea=null;this.Uha=[];this.zj=this.uB=n.aa;this.va=new g(q);this.oc=new b(this.m,this.va,this.Ac);this.oc.bind(b.zi,this.ns,this,!0);this.oc.bind(b.Rj,this.ss,this,!0);this.oc.bind(b.Qj,this.rs,this,!0);
this.Eo=new e(this.m,this.va,this.Ac);this.Eo.bind(e.zi,this.ns,this,!0);this.Kf=new c(this.m,this.va,this.Ac);this.Kf.bind(c.zi,this.ns,this,!0);this.Kf.bind(c.v$,this.Yu,this,!0);this.Kf.bind(c.dd,this.rAa,this,!0)});l.prototype.clear=function(){this.rv();this.oc.h(b.zi,this.ns,this);this.oc.h(b.Rj,this.ss,this,!0);this.oc.h(b.Qj,this.rs,this,!0);this.oc.clear();this.oc=null;this.Eo.h(e.zi,this.ns,this,!0);this.Eo.clear();this.Eo=null;this.Kf.h(c.zi,this.ns,this);this.Kf.h(c.v$,this.Yu,this);this.Kf.h(c.dd,
this.rAa,this);this.Kf.clear();this.va=this.Kf=null;this.m.h(k.Yb,this.jd,this);f.O.h(k.V,this.bq,this,!0);this.m=null;this.yc&&(this.yc.h(k.K("sequences"),this.lga,this,!0),this.yc=null);this.i3([])};l.prototype.end=function(){this.uB=n.aa;this.rv();this.oc.Ua(!1);this.Eo.Ua(!1);this.Kf.end();this.ga=!1;this.bz(0,0,0);this.sR=this.nea=null;this.yc&&(this.yc.h(k.K("sequences"),this.lga,this,!0),this.yc=null);this.i3([]);this.ZH()};l.prototype.start=function(q,r){this.uB=n.PLAYING;this.ga=!0;this.bz(0,
0,0);this.NT(q);this.o4a(r);this.tBa();this.y3(this.sR);this.Eo.Ua(!0);this.ZH()};l.prototype.gl=function(){return this.zj};l.prototype.play=function(q){this.uB=n.PLAYING;this.Kf.gl()==n.Xb?this.Kf.play():this.Kf.gl()==n.aa&&(!q&&this.sR?this.y3(this.sR):this.FL()||this.bU());this.ZH()};l.prototype.resume=function(){this.uB==n.Xb&&(this.oc.e$a(),this.play(!0))};l.prototype.pause=function(){this.oc.pl(d.tg);this.uB==n.PLAYING&&(this.uB=n.Xb,this.Kf.gl()==n.PLAYING?(this.Kf.pause(),this.ZH()):this.FL()&&
this.rv())};l.prototype.stop=function(){this.uB=n.aa;this.Kf.gl()!=n.aa&&this.Kf.end();this.oc.pl(d.tg);this.ZH();this.FL()&&this.rv()};l.prototype.moveTo=function(q,r,t,u,v){this.oc.moveTo(q,r,t,u,v)};l.prototype.i3=function(q){this.Uha.forEach(function(r){r.h(k.ax,this.ZBa,this,!0)}.bind(this));this.Uha=q;this.Uha.forEach(function(r){r.bind(k.ax,this.ZBa,this,!0)}.bind(this))};l.prototype.bq=function(){this.va.wA(this.m.st())};l.prototype.pl=function(q){this.oc.pl(q)};l.prototype.kpa=function(q,
r,t){this.oc.kpa(q,r,t)};l.prototype.uX=function(q){this.ZB!=q&&(this.ZB=q,this.oc.uX(this.ZB),this.Sa())};l.prototype.vX=function(q){this.oc.vX(q)};l.prototype.qE=function(q){this.oc.qE(q)};l.prototype.EJ=function(q){this.oc.EJ(q)};l.prototype.oE=function(q){this.oc.oE(q)};l.prototype.rA=function(q){this.ga&&(this.oc.Nf()||this.m.st()||this.ZB&&(this.oc.ga||!this.oc.iR)?(this.oc.dQa()&&this.Kf.Ueb(),this.oc.Lb(q),this.pn(this.oc.lt(),this.oc.kt(),this.oc.yD(),this.oc.FI()),this.Sa()):this.Kf.EC?
(this.Kf.Yeb(),this.Sa()):this.Kf.Nf()?(this.Kf.Lb(q),this.pn(this.Kf.lt(),this.Kf.kt(),0,this.Kf.FI()),this.Sa()):this.Eo.Nf()?(this.Eo.Lb(q),this.pn(this.Eo.lt(),this.Eo.kt(),0,this.Eo.FI()),this.Sa()):this.Kha?(this.Kha=!1,this.Ac.Wq(this.m.df()),this.va.setPosition(this.m.Jc(),this.m.Ic(),this.m.Ag(),this.Ac.df(),this.Ac.Rv()),this.pn(this.va.Jc(),this.va.Ic(),this.va.Ag(),this.va.Qz()),this.Sa()):(this.bz(0,0,0),this.uB==n.PLAYING&&this.Kf.gl()!=n.PLAYING&&(this.FL()||this.bU())))};l.prototype.xe=
function(){this.Y7a();this.tBa()};l.prototype.Y7a=function(){var q=this.m.Jc()-this.Fa||0,r=this.m.Ic()-this.qb||0;this.m.Ag();this.bz(q,r,this.m.df()-this.fb||0)};l.prototype.tBa=function(){this.Fa=this.m.Jc();this.qb=this.m.Ic();this.Jd=this.m.Ag();this.fb=this.m.df();this.oc.setPosition(this.Fa,this.qb,this.Jd,this.fb);this.Kf.setPosition(this.Fa,this.qb,this.Jd,this.fb);this.Eo.setPosition(this.Fa,this.qb,this.Jd,this.fb)};l.prototype.NT=function(q){this.va.Of(q)};l.prototype.o4a=function(q){this.yc=
q;this.qR=q.get("timeToIdle",5E3);this.nea=q.get("idleSequence");this.sR=q.get("initialSequence");this.oc.setCamera(q);this.Eo.setCamera(q);q.bind(k.K("sequences"),this.lga,this,!0);this.i3(q.get("sequences",[]))};l.prototype.lga=function(){this.i3(this.yc.get("sequences",[]))};l.prototype.ZBa=function(q){this.y3(q.source)};l.prototype.ns=function(){this.rv();this.Sa()};l.prototype.ss=function(){this.o(new p(l.Rj))};l.prototype.rs=function(){this.o(new p(l.Qj))};l.prototype.y3=function(q){q?(this.oc.Ua(!q.get("mandatory",
!1)),this.Kf.start(q)):this.Yu()};l.prototype.Yu=function(){this.oc.Ua(!0);this.bU()};l.prototype.rAa=function(){this.ZH()};l.prototype.jd=function(){this.Kha=!0;this.Sa()};l.prototype.FL=function(){return this.Fo!=null};l.prototype.bU=function(){this.rv();var q=this;this.Fo=setTimeout(function(){q.Fo=null;q.$fa()},this.qR)};l.prototype.rv=function(){this.Fo&&(clearTimeout(this.Fo),this.Fo=null)};l.prototype.$fa=function(){this.y3(this.nea)};l.prototype.Sa=function(){this.o(new p(l.nc))};l.prototype.pn=
function(q,r,t,u){this.m.setPosition(q,r,t,u)};l.prototype.bz=function(q,r,t){var u=!1,v=Math.abs(q)<.001&&Math.abs(r)<.001&&Math.abs(t)<.001;v||this.ZB?(u=this.cp!=1,this.Dv=this.Cv=this.gS=this.jS=this.iS=this.hS=!1,this.cp=!0):(this.hS!=q<-.001&&(this.hS=!this.hS,u=!0),this.iS!=q>.001&&(this.iS=!this.iS,u=!0),this.gS!=r<-.001&&(this.gS=!this.gS,u=!0),this.jS!=r>.001&&(this.jS=!this.jS,u=!0),this.Cv!=t<-.001&&(this.Cv=!this.Cv,u=!0),this.Dv!=t>.001&&(this.Dv=!this.Dv,u=!0),this.cp!=v&&(this.cp=
!this.cp,u=!0));v||this.o(new p(l.kr,{yaw:this.Fa,pitch:this.qb,roll:this.Jd,hfov:this.fb}));u&&((this.ga||this.cp)&&this.o(new p(l.ul,{movingLeft:this.hS,movingRight:this.iS,movingUp:this.jS,movingDown:this.gS,zoomingIn:this.Cv,zoomingOut:this.Dv,stopped:this.cp})),this.ZH())};l.prototype.ZH=function(){if(this.ga){var q=this.Kf.gl();this.cp||(q=n.PLAYING)}else q=n.aa;this.zj!=q&&(this.zj=q,this.o(new p(l.dd,{state:this.zj})))};l.nc="request frame";l.ul="movement change";l.kr="position change";l.dd=
"playback state change";l.Rj="user interaction start";l.Qj="user interaction end";return l});
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,n){this.m=d;this.Ac=f;this.Vo=this.Ac.Vo;this.Os=n;this.va=new k(d);n.Ah&&this.va.Of(n.Ah);this.Zy=new k(d);this.via=this.iC=this.jC=void 0;this.Fa=this.m.Jc();
this.qb=this.m.Ic();this.Jd=this.m.Ag();this.fb=this.Os.Ah?this.m.df():this.Ac.Rv()?this.Ac.rV(m.H9):m.H9;this.dDa=0;this.Aa=null;this.Jxa=!0}a("tdv/constants/EventName");var k=a("tdv/player/view/panorama/control/camera/LimitsManager");a("tdv/player/view/util/Device");var p=a("tdv/player/view/util/Gyroscope"),h=a("tdv/player/view/util/URL"),g=a("tdv/player/view/util/XR"),e=a("tdv/player/view/util/geo/Quaternion");new THREE.Euler;m.prototype.Of=function(d,f,n){if(this.Aa!=d)if(this.CC=!0,this.Aa=d,
this.m.st()){this.via=this.Fa;for(d=this.via-f;d>180;)d-=360;for(;d<-180;)d+=360;g.bP(f)}else this.ipa(f,n)};m.prototype.ipa=function(d,f){this.Fa=d;this.qb=f};m.prototype.wI=function(d){this.Ac.QNa(d);return this.Ac.df()};m.prototype.Wq=function(d){this.fb=d};m.prototype.zX=function(d){this.Jxa=d};m.prototype.DJ=function(d){this.dDa=d};m.prototype.rA=function(){this.Vo!=this.Ac.Vo&&(this.Vo=this.Ac.Vo,this.fb=this.Ac.rV(this.fb));if(this.Os.jb()){var d=e.a9(g.yg,!0);this.Fa=d.Za;this.qb=c===void 0?
d.pitch:c;this.Jd=b===void 0?d.fh:b;this.jC=this.Fa;this.iC=this.qb}else if(this.Os.ZIa()){d=p.ot();var f=this.FH(d.yaw,this.Fa);this.Fa+=this.jC===void 0?0:f-this.jC;this.qb+=this.iC===void 0?0:d.pitch-this.iC;this.Jd=d.roll;this.jC=d.yaw;this.iC=d.pitch}else d=this.FH(this.m.Jc(),this.Fa),f=this.m.Ic(),this.Fa+=this.jC===void 0?0:d-this.jC,this.qb+=this.iC===void 0?0:f-this.iC,this.Jd=this.m.Ag();this.CC&&this.va.Of(this.Aa);this.va.wA(this.Os.jb());this.va.setPosition(this.Fa,this.qb,this.Jd,this.fb,
this.Ac.Rv());if(this.CC)if(this.CC=!1,this.Os.jb())(d=this.Os.Ah&&this.m.Yf(this.Os.Ah))&&d.set("deltaYaw",this.via-this.va.Jc());else if(d=this.Os.Ah&&this.m.Yf(this.Os.Ah))d.set("deltaYaw",this.m.Jc()-this.va.Jc()),d.set("deltaPitch",this.m.Ic()-this.va.Ic()),d.set("deltaRoll",this.m.Ag()-this.va.Ag());this.Fa=this.va.Jc();this.qb=this.va.Ic();this.Jd=this.va.Ag();this.Os.jb()||this.Os.ZIa()||(this.jC=this.Fa,this.iC=this.qb);this.fb=this.Jxa?this.va.Qz():this.fb;this.m.setPosition(this.Fa,this.qb,
this.Jd,this.fb);this.m.DJ(this.dDa)};m.prototype.b8=function(d,f){this.Zy.Of(d);this.Zy.setPosition(0,0,0,f,this.Ac.Rv());return this.Zy.Qz()};m.prototype.Tfb=function(d,f){this.Zy.Of(d);this.Zy.setPosition(f.Za,f.pitch,f.fh,f.Wd,this.Ac.Rv());f.Za=this.Zy.Jc();f.pitch=this.Zy.Ic();f.fh=this.Zy.Ag();f.Wd=this.Zy.Qz()};m.prototype.FH=function(d,f){for(;d+180<f;)d+=360;for(;d-180>f;)d-=360;return d};m.prototype.RGa=function(){return m.H9};m.H9=TDV.Zra.MQa;var b=h.tk("debug")?h.Q5("force_vr_roll"):
void 0,c=h.tk("debug")?h.Q5("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,n){this.m=b;this.Qh=c;b=this.m.R;this.YX=b.get("transitionMode","blending");c=b.get("transitionDuration",500);this.o_a(d,f)&&(this.YX=m.JY,c=1500);this.Ika=b.get("blendingTransitionDuration",c);this.Kab=b.get("firstTransitionDuration",
c);this.WGa=b.get("disolveTransitionDuration",c);this.vPa=b.get("translationTransitionDuration",1E3);b.get("translationTransitionSpeed");this.wPa=b.get("translationTransitionEnabled",!0);this.NLa=b.get("originTransitionDuration",3E3);this.g6=400;this.r9=1E3;this.Wdb=b.get("modelToPanoramaTraslationDuration",1500);this.Qeb=b.get("panoramaToModelTraslationDuration",1E3);this.Ah=d;this.Uhb=!d||d.Jma();this.Vhb=!d||d.EJa();this.Zc=f;this.VOa=!f||f.Jma();this.Lpa=!f||f.EJa();this.qib=!!f&&this.Nea(f);
c=(this.KJ=n)&&n.get("initialPosition")||new k;this.uh=new k;this.uh.set("yaw",c.get("yaw",0));this.uh.set("pitch",c.get("pitch"));this.uh.set("hfov",c.get("hfov"));this.og=new p;this.og.set("yaw",this.uh.get("yaw"));this.og.set("pitch",this.uh.get("pitch"));this.og.set("hfov",this.uh.get("hfov"));this.og.set("stereographicFactor",0);this.Hq=[];if(!d){this.Hq=n&&n.get("displayMovements")||[];for(c=this.Hq.length-1;c>=0;c--)this.og.set("yaw",this.og.get("yaw",this.Hq[c].get("targetYaw"))),this.og.set("pitch",
this.og.get("pitch",this.Hq[c].get("targetPitch"))),this.og.set("hfov",this.og.get("hfov",this.Hq[c].get("targethfov"))),this.og.set("stereographicFactor",this.og.get("stereographicFactor",this.Hq[c].get("stereographicFactor")));n=n&&n.get("displayOriginPosition")||this.uh;this.og.set("yaw",n.get("yaw"));this.og.set("pitch",n.get("pitch"));this.og.set("hfov",n.get("hfov"));this.og.set("stereographicFactor",n.get("stereographicFactor"))}this.qP=this.YX==m.zp&&this.wPa&&this.VOa&&this.WZa(d,f)||null;
var l=this.YX==m.zp&&this.Zc&&this.VOa&&this.Qh&&this.Zc.get("modelLocations")||[];n=this.YX==m.zp&&this.Ah&&this.Uhb&&this.Qh&&this.Ah.get("modelLocations")||[];var q=[];n.forEach(function(t){l.forEach(function(u){t.get("model")==u.get("model")&&q.push([t,u])})});var r=this.Qh&&this.Qh.get("model");this.Ec=this.mc=null;q.length>1&&this.Qh&&(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.mc=c[0],this.Ec=c[1]):(this.mc=n.find(function(t){return t.get("preferred")}),this.mc||this.Ec||(this.Ec=l.find(function(t){return t.get("preferred")})),[].concat(n,l).forEach(function(t){t.set("preferred",!1)}),this.mc||this.Ec||(this.mc=n.find(function(t){return t.get("model")==r})),this.mc||this.Ec||(this.Ec=l.find(function(t){return t.get("model")==r})),this.mc||this.Ec||(this.mc=n.find(function(t){return t.get("forceModelLoading")})),this.mc||this.Ec||(this.Ec=l.find(function(t){return t.get("forceModelLoading")})));
(this.Ec||this.mc)&&b.get("translationTransitionSpeed")&&(this.Ec||this.mc).get("model").get("worldUnitToMeters")&&(this.vPa=b.get("translationTransitionSpeed")/(this.Ec||this.mc).get("model").get("worldUnitToMeters"));this.ye=null;this.Whb=h.Od()==h.fj?512:1536;this.rib=h.Od()==h.fj?512:this.jb()?1536:1024;this.OD=this.G0a();this.mode=(b=!this.jb()||this.T_a())&&this.mc&&this.Ec&&this.qP?m.faa:b&&this.mc&&this.Ec&&this.wPa?m.osa:this.qP?m.nsa:b&&!this.Ah&&this.Ec?m.eaa:b&&!this.Zc&&this.mc?m.psa:
d?f?this.YX=="blending"?m.zp:m.JY:m.ara:m.$qa;this.mode!=m.zp||this.Vhb&&this.Lpa||!(this.og.get("stereographicFactor",0)>0||this.Hq.filter(function(t){return t.get("targetStereographicFactor",0)>0}).length>0)||(this.mode=m.JY);this.Am=null}var k=a("tdv/player/script/RotationalCameraPosition"),p=a("tdv/player/script/RotationalCameraDisplayPosition"),h=a("tdv/player/view/util/Device"),g=a("tdv/player/view/util/FileType");m.prototype.ZIa=function(){return this.m.kd.get("gyroscopeEnabled")};m.prototype.jb=
function(){return this.m.st()};m.prototype.WZa=function(b,c){if(!b||!c)return null;b=(b.get("adjacentPanoramas")||[]).filter(function(d){return d.get("enabled")&&d.N9a()&&d.get("panorama")==c});return b.length==0?null:b[0]};m.prototype.o_a=function(b,c){return this.jb()&&h.Od()==h.fj&&(this.Nea(b)||this.Nea(c))};m.prototype.Nea=function(b){return!!b&&b.Fn()};m.prototype.G0a=function(){var b=this.Lda()&&this.Lda().get("model");return(b=b&&b.get("levels")[0])&&g.is(b.get("url"),g.cra)};m.prototype.Lda=
function(){var b=this.Ec||this.mc;return b&&b.get("model")};m.prototype.T_a=function(){var b=this.Lda();b=(b=b&&b.get("camera"))&&(b.get("vrEnabled")||b.get("xrEnabled"))&&!this.m.R.Wb().get(e);return this.jb()&&!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.JY="fade_out_fade_in";m.$qa="fade_in";m.ara="fade_out";m.zp="blending";m.nsa="translation";m.eaa="translation_from_model";m.faa="translation_through_model";
m.osa="translation_to_from_model";m.psa="translation_to_model";return m});define("tdv/player/view/panorama/control/transition/steps/Step",["require","exports"],function(){return function(){function a(m,k,p,h){this.U=m;this.Uc=k;this.m=p;this.I=h}a.prototype.wh=function(){return!1};a.prototype.yh=function(){};a.prototype.VI=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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");a=m.extend(k,function(g,e,b,c){k.call(this,g,e,b,c);this.ja=null;this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(g){if(!this.Ob){if(!this.ja){var e=
this.m.Yf(this.I.Zc);e.mi();e.set("alpha",.01);this.ja=new p("linear",[new h("alpha",0,1,void 0)],this.I.Ika)}this.ja.Lb(g);g=this.ja.ib("alpha");e=this.m.Yf(this.I.Zc);e.set("alpha",g);this.ja.Qe()&&(this.Ob=!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"),k=a("tdv/player/script/Model3DObject");return m.define("ProjectedMaterialModel3DObject",k,function(){k.call(this)})});
define("tdv/player/view/panorama/control/transition/steps/SingleOperationStep",["require","exports","tdv/player/view/panorama/control/transition/steps/Step"],function(a,m,k){return function(p){function h(g,e,b,c){g=p.call(this,g,e,b,c)||this;g.Ob=!1;return g}P(h,p);h.prototype.wh=function(){return this.Ob};h.prototype.yh=function(){this.Ob||(this.Kh(),this.Ob=!0)};h.prototype.Kh=function(){};return h}(k)});
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"),k=a("tdv/player/script/ProjectedMaterialModel3DObject"),p=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),h=m.extend(p,function(g,e,b,c,d){p.call(this,g,e,b,c);this.Qi=d||3});h.prototype.Kh=function(){var g=
this.I.mc,e=this.I.Ec,b=this.I.ye=this.I.ye||new k;b.set("sourceAlpha",0);b.set("targetAlpha",0);this.Qi&1&&(b.set("sourceX",g.get("x")),b.set("sourceY",g.get("y")),b.set("sourceZ",g.get("z")),b.set("sourceYaw",g.get("yaw")),b.set("sourceCubeTexture",this.Zta(this.I.Ah,this.I.Whb)),b.set("sourceAlpha",1));this.Qi&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.K4a(this.I.Zc),b.set("targetCubeTexture",this.Zta(this.I.Zc,this.I.rib)));
this.I.OD?(b.set("nearPlane",!0),b.set("skybox",!1)):(b.set("nearPlane",!1),b.set("skybox",!0));g=(g||e).get("model");g.get("objects").indexOf(b)==-1&&g.set("objects",g.get("objects").concat([this.I.ye]))};h.prototype.Zta=function(g,e){g=this.m.Yf(g);var b=g.get("alpha");g.set("alpha",1);e=this.m.Pka(e);g.set("alpha",b);return e};h.prototype.K4a=function(g){g.get("frames").forEach(function(e,b){this.m.Yf(e).set("alpha",b==g.QV()?1:0)}.bind(this))};h.Z$=m.extend(h,function(g,e,b,c){h.call(this,g,e,
b,c,1)});h.gaa=m.extend(h,function(g,e,b,c){h.call(this,g,e,b,c,2)});return h});
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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){this.I.Zc&&!this.m.Yf(this.I.Zc)&&(this.ii=this.m.create(this.I.Zc),this.ii.set("alpha",0),this.m.add(this.ii),this.m.dOa(!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"),k=a("tdv/constants/EventName"),p=a("tdv/player/script/MediaPlayer"),h=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(h,function(g,e,b,c){h.call(this,g,e,b,c)});a.prototype.yh=function(){this.Wy||this.ma||(this.ma=(this.I.mc||this.I.Ec).get("model"),
this.Su=this.I.Qh,this.ma.get("camera").set("inTransition",!0),this.Su.m.Ua(!0),this.Wy=!1,this.ma?this.Su.get("model")==this.ma&&this.ma.get("isLoaded")?(this.Cy(),this.fn(),this.Wy=!0):(this.Su.set("model",this.ma),this.ma.bind(k.ha,this.Cy,this,!0),this.Su.set("requesterPlayer",this.m.kd),this.Su.bind(p.Vh,this.fn,this,!0)):this.Wy=!0)};a.prototype.wh=function(){this.Su.m.TNa(this.ma,!1);return this.Wy};a.prototype.VI=function(){return!0};a.prototype.Cy=function(){this.ma.h(k.ha,this.Cy,this)};
a.prototype.fn=function(){this.Su.h(p.Vh,this.fn,this,!0);this.Wy=!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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),p=a("tdv/view/util/AudioActivation");a=m.extend(k,function(h,g,e,b){k.call(this,h,g,e,b)});a.prototype.Kh=function(){if(this.I.qib){var h=this.I.Zc.get("frames")[0];h=h.get("sphere")||
h.get("stereoSphere");var g=h.get("levels")||[];(h.get("hasAudio")===!0||g.length>0&&g[0].get("hasAudio")===!0)&&p.request(this.m.Wb())}};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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){this.m.Yf(this.I.Zc).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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");a=m.extend(k,function(g,e,b,c){k.call(this,g,e,b,c);this.Cj=this.m.R.Sc();this.ja=null;this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=
function(g){if(!this.Ob){if(!this.ja){var e=this.m.R.bkb()&&!this.I.Ah?this.I.Kab:this.I.Ika;this.I.jb()&&(e=Math.max(e,100));this.ja=new p("linear",[new h("alpha",this.I.jb()?-500/e:0,1,void 0)],e+(this.I.jb()?500:0));this.Cj.JJ()}this.ja.Lb(g);g=Math.max(.001,this.ja.ib("alpha"));this.m.Yf(this.I.Zc).set("alpha",g);this.Cj.wJ(g);this.ja&&this.ja.Qe()&&(this.Ob=!0,this.Cj.BI())}};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"),k=a("tdv/events/EventDispatcher"),p=a("tdv/player/view/panorama/renderer/3d/util/Util");a=m.extend(k,function(){k.call(this);this.Ha=this.Ka=null;this.oe=[];this.Y_=this.Zg=!1;this.mS=null;this.Il=[this];this.aka={};this.Cu={};this.kR=!1;this.kha={};this.lha={};this.Hr(["blendingActive","globalBlendingActive"]);
this.vTa();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.vTa=function(){var h="alpha deltaYaw deltaPitch deltaRoll translationX translationY translationZ".split(" ");Array.isArray(h)||(h=[h]);h.forEach(function(g){this.kha[g]=!0}.bind(this))};a.prototype.Hr=function(h){Array.isArray(h)||(h=[h]);h.forEach(function(g){this.lha[g]=
!0}.bind(this))};a.prototype.set=function(h,g){this.aka[h]!==g&&(this.lha[h]&&this.oe.forEach(function(e){e.set(h,g)}),this.cUa(h,g),this.HT(h))};a.prototype.get=function(h){return this.aka[h]};a.prototype.HT=function(h){this.Cu[h]||(this.Cu[h]=!0,this.kR||(this.kR=!0,this.Ma()),this.kha[h]&&this.oe.forEach(function(g){g.HT(h)}))};a.prototype.FVa=function(){this.kR&&(this.kR=!1,this.Cu={})};a.prototype.W=function(){if(this.kR)for(var h=0;h<arguments.length;h++)if(this.Cu[arguments[h]])return!0;return!1};
a.prototype.cUa=function(h,g){this.aka[h]=g};a.prototype.Ab=function(){return this.oe};a.prototype.Uh=function(h){var g=h||[],e=this.oe.slice();h=g.length!=e.length;for(var b=0;b<g.length&&!h;b++)h=g[b]!=e[b];h&&(h=e.filter(function(c){return g.indexOf(c)==-1}),b=g.filter(function(c){return e.indexOf(c)==-1}),this.oe=g,h.forEach(function(c){c.e3(null)}),b.forEach(function(c){c.remove();c.e3(this)}.bind(this)),this.Ma())};a.prototype.e3=function(h){this.Ha!=h&&(this.Ha&&this.ap(),(this.Ha=h)&&this.Ir(),
this.gia(this.Ha&&this.Ha.Ka))};a.prototype.Ir=function(){for(var h in this.Ha.kha)this.HT(h);for(h in this.Ha.lha)this.set(h,this.Ha.get(h))};a.prototype.ap=function(){};a.prototype.gia=function(h){this.Ka!=h&&(h||this.kc(),(this.Ka=h)&&this.ec(),this.oe.forEach(function(g){g.gia(this.Ka)}.bind(this)))};a.prototype.ec=function(){this.STa()};a.prototype.kc=function(){this.f3a()};a.prototype.STa=function(){this.Il.forEach(function(h){this.Ka.mS.add(h,this)}.bind(this))};a.prototype.f3a=function(){this.Il.forEach(function(h){this.Ka.mS.remove(h,
this)}.bind(this))};a.prototype.mi=function(){this.Ha&&this.Ha.Mka(this)};a.prototype.Mka=function(h){var g=this.oe.indexOf(h);if(g==-1)throw"Child not found";g!=this.oe.length-1&&(this.oe.splice(g,1),this.oe.push(h),this.Ma())};a.prototype.Dab=function(h){var g=this.oe.indexOf(h);if(g==-1)throw"Child not found";this.oe.splice(g,1);h.e3(null);this.Ma()};a.prototype.appendChild=function(h){h.remove();this.oe.push(h);h.e3(this);this.Ma()};a.prototype.remove=function(){this.Ha&&this.Ha.Dab(this)};a.prototype.Un=
function(){};a.prototype.Ma=function(){this.Zg||(this.Zg=!0,this.Ha&&this.Ha.Ma(this))};a.prototype.OVa=function(){this.Zg=!1};a.prototype.Gha=function(){this.Y_||(this.Y_=!0,this.Ha&&this.Ha.Gha())};a.prototype.KVa=function(){this.Y_=!1};a.prototype.ya=function(){this.$Da();this.W("translationX","translationY","translationZ")&&(this.set("composedTranslationX",this.get("translationX")+(this.Ha?this.Ha.get("composedTranslationX"):0)),this.set("composedTranslationY",this.get("translationY")+(this.Ha?
this.Ha.get("composedTranslationY"):0)),this.set("composedTranslationZ",this.get("translationZ")+(this.Ha?this.Ha.get("composedTranslationZ"):0)));this.W("deltaYaw","deltaPitch","deltaRoll")&&(this.set("composedDeltaYaw",this.get("deltaYaw")+(this.Ha?this.Ha.get("composedDeltaYaw"):0)),this.set("composedDeltaPitch",this.get("deltaPitch")+(this.Ha?this.Ha.get("composedDeltaPitch"):0)),this.set("composedDeltaRoll",this.get("deltaRoll")+(this.Ha?this.Ha.get("composedDeltaRoll"):0)),p.DJa())};a.prototype.$Da=
function(){this.W("alpha")&&this.set("composedAlpha",this.get("alpha")*(this.Ha?this.Ha.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"),k=a("tdv/player/view/panorama/renderer/3d/util/Util"),p={F0a:void 0,Tgb:function(h){this.F0a=h},eXa:void 0,igb:function(h){this.eXa=h},createTexture:function(){var h=new THREE.Texture;h.colorSpace=THREE.SRGBColorSpace;h.generateMipmaps=!1;h.minFilter=THREE.LinearFilter;h.magFilter=THREE.LinearFilter;
h.image=p.GI();h.userData={};h.userData.kPa={};return h},zlb:function(h){return h.image==this.GI()},c$a:function(h){h.image!=this.GI()&&(h.image=this.GI(),h.needsUpdate=!0,h.Ilb=!0)},fY:function(h,g){g=this.Vab(g);k.wO(g)&&(g.videoWidth&&g.videoHeight&&(g.width=g.videoWidth,g.height=g.videoHeight),k.iQa(g)&&(g=this.H7a(h,g)));h.image=g;h.needsUpdate=!0;k.DJa()},Vab:function(h){h?k.Qma(h)?h=m.qg(h,!1):k.UJa(h)?h=this.GI():!k.wO(h)||h.readyState>=h.HAVE_CURRENT_DATA&&h.videoWidth>0&&h.videoHeight>0||
(h=this.GI()):h=this.GI();return h},V$a:function(h,g,e,b,c){var d=document.createElement("canvas");d.width=k.ix();d.height=k.ix();d.Iia=!0;var f=d.getContext("2d");if(!f)return null;f.drawImage(h,g,e,b,c,0,0,k.ix(),k.ix());this.B5(d);return d},kla:function(h){k.idb(h)&&h.Iia&&(delete h.Iia,h.width=0,h.height=0)},dispose:function(h){h.Yr&&h.Yr!=h.image&&this.kla(h.Yr);h.image&&this.kla(h.image);h.dispose()},hOa:function(h,g){h.userData.kPa.material=g},KIa:function(h){return h.userData.kPa.material},
rlb:function(h){return k.Pma(h)},decode:function(h){k.Qma(h)&&(h=m.qg(h,!1));k.Pma(h)&&this.B5(h)},B5:function(h){var g=document.createElement("canvas");g.width=1;g.height=1;var e=g.getContext("2d");p.B5=function(b){e.drawImage(b,0,0,1,1,0,0,1,1)};return p.B5(h)},mca:null,GI:function(){if(!this.mca){var h=document.createElement("canvas");h.width=128;h.height=128;h.X_a=!0;h.getContext("2d").clearRect(0,0,h.width,h.height);this.mca=h}return this.mca},H7a:function(h,g){h.Yr||(h.Yr=document.createElement("canvas"),
h.H_a=h.Yr.getContext("2d"),h.Yr.Iia=!0);var e=g.videoWidth;k.Lq()&&(e=Math.min(4096,e));var b=e*g.videoHeight/g.videoWidth;if(h.Yr.width!=e||h.Yr.height!=b)h.Yr.width=e,h.Yr.height=b;g.readyState>=g.HAVE_CURRENT_DATA&&h.H_a.drawImage(g,0,0,e,b);return h.Yr}};return p});
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.$X=(e=k.rO(e))&&k.oJa();this.mW=e&&k.nJa();this.lD=0;this.Hv=void 0;this.mV=this.nV=0;this.premultipliedAlpha=!1;this.side=void 0;this.params={}}var k=a("tdv/player/view/panorama/renderer/3d/util/Util"),p=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil");
a=a("tdv/player/view/util/Device");var h=a.Rb()==a.Iw||a.Rb()==a.Fk||a.Rb()==a.xi,g={ema:function(e){return e.map||e.uniforms&&e.uniforms.textureSampler2D&&e.uniforms.textureSampler2D.value},lm:function(e,b){e||(e=p.createTexture());b||(b=new g.Cp);e=b.$X||b.mW||b.lD||b.Hv||b.premultipliedAlpha||e.isVideoTexture&&h?this.P$a(e,b):this.Zka(e);b.side&&(e.side=b.side);for(var c in b.params)e[c]=b.params[c];return e},t9a:function(e,b){e.isShaderMaterial?e.uniforms.textureSampler2D.value=b:e.map=b;e.needsUpdate=
!0},Zka:function(e){var b=new THREE.MeshBasicMaterial;b.map=e;this.JF(b);return b},P$a:function(e,b){var c={uniforms:{},transparent:!0};c.uniforms.textureSampler2D={type:"sampler2D",value:e};e.flipY=!b.$X;c.vertexShader=["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+(b.$X?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(b.mW||b.lD||b.Hv||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.lD){var n=
e.image.width||e.image.videoWidth,l=e.image.height||e.image.videoHeight,q=Math.min(n,l)*.5*b.lD;c.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(q/n,q/l)};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.Hv&&
(c.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(b.Hv.substr(1,2),16)/255,parseInt(b.Hv.substr(3,2),16)/255,parseInt(b.Hv.substr(5,2),16)/255)},c.uniforms.chromaThreshold={type:"f",value:b.nV},c.uniforms.chromaSmoothing={type:"f",value:b.mV},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.mW?".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.JF(e);return e},dispose:function(e){Array.isArray(e)||(e=[e]);e.forEach(function(b){var c=g.ema(b);c&&p.dispose(c);b.dispose()})},JF:function(e){e.side=THREE.FrontSide;e.transparent=!0;e.depthTest=!1;e.needsUpdate=!0;e.userData={};e.userData.pKa={};p.hOa(g.ema(e),e)},apa:function(e,b){e.userData.pKa.Se=b},nIa:function(e){return e.userData.pKa.Se}};m.prototype.isEqual=function(e){return this.$X===e.$X&&this.mW===e.mW&&this.lD===e.lD&&this.Hv===e.Hv&&
this.nV===e.nV&&this.mV===e.mV&&this.premultipliedAlpha===e.premultipliedAlpha&&this.side===e.side};g.Cp=m;return g});
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(g){return Array.isArray(g)?g:g?[g]:[]}var k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),p=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),h={create:function(g,e){var b=new THREE.Mesh(g,e);b.overdraw=!1;b.matrixAutoUpdate=!1;b.userData.bA={};b.userData.bA.attributes=
{};m(e).forEach(function(c){p.apa(c,b)});return b},HGa:function(g){var e=new THREE.Group;h.forEach(g,function(b){e.add(b)});return e},Sgb:function(g,e){m(e).forEach(function(b){p.apa(b,null)});p.dispose(g.material);g.material=e;m(e).forEach(function(b){p.apa(b,g)})},zD:function(g){return m(g.material)},Gbb:function(g,e){if(g.layers.mask&e.layers.mask){var b=h.zD(g);return k.Ebb(g.geometry,e,g.matrixWorld).map(function(c){return b[c]})}return[]},Toa:function(g,e){g.geometry=e},ybb:function(g,e){var b=
[];h.fl(g,function(c){var d=h.zD(c);e.forEach(function(f){var n=k.xbb(c.geometry,c.matrixWorld,f);if(n){f=p.ema(d[n.materialIndex]).image;var l=Math.round(n.EPa*f.width-.5);l=l<0?0:l>f.width-1?f.width-1:l;n=Math.round((1-n.eQa)*f.height-.5);n=n<0?0:n>f.height-1?f.height-1:n;b.push({x:l,y:n,source:f})}})});return b},Aw:function(g,e){h.forEach(g,function(b){e?e.add(b):b.parent&&b.parent.remove(b)})},KE:"panoramaId",WJ:"panoramaFrameId",u9:"panoramaOverlayId",t9:"levelIndex",setAttribute:function(g,
e,b){h.fl(g,function(c){c.userData.bA.attributes[e]=b})},getAttribute:function(g,e){return g.userData.bA.attributes[e]},sHa:function(g,e,b){for(var c=[],d=0,f=g.length;d<f;d++){var n=g[d];n.userData.bA.attributes[e]!==b&&c.push(n)}return c},u5:function(g,e,b){for(var c=[],d=0,f=g.length;d<f;d++){var n=g[d];n.userData.bA.attributes[e]===b&&c.push(n)}return c},WIa:function(g,e){for(var b={},c=0,d=g.length;c<d;c++){var f=g[c],n=f.userData.bA.attributes[e];n!==void 0&&(b[n]||(b[n]=[])).push(f)}return b},
Mla:function(g){g=g.userData.bA.alpha;return g===void 0?1:g},zf:function(g,e){h.fl(g,function(b){b.userData.bA.alpha=e;h.zD(b).forEach(function(c){c.opacity=e;c.type=="ShaderMaterial"&&c.uniforms&&c.uniforms.opacity&&(c.uniforms.opacity.value=e)})})},ct:function(g,e){h.fl(g,function(b){b.matrix.copy(e);b.matrixWorldNeedsUpdate=!0})},QIa:function(g){return g.renderOrder},C8:function(g,e){h.forEach(g,function(b){b.renderOrder=e})},dispose:function(g){h.fl(g,function(e){e.geometry&&(k.dispose(e.geometry),
e.geometry=void 0);e.material&&(p.dispose(e.material),e.material=void 0)})},om:function(g){var e=[];h.fl(g,function(b){e.push(b)});return e},forEach:function(g,e){Array.isArray(g)?g.forEach(e):g&&g.isObject3D&&(g.isMesh||g.type=="Group")&&e(g)},fl:function(g,e){if(Array.isArray(g))for(var b=0,c=g.length;b<c;b++)h.fl(g[b],e);else if(g&&g.children)for(b=0,c=g.children.length;b<c;b++)h.fl(g.children[b],e);g&&g.isObject3D&&g.isMesh&&e(g)}};return h});
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{om:function(k){var p=[];k.children&&k.children.forEach(function(h){m.fl(h,function(g){g.userData&&g.userData.bA&&p.push(g)})});return p},bgb:function(k,p){k.userData.cameras=p},Ola:function(k){return k.userData.cameras||[]},getCamera:function(k){return k.userData.cameras&&k.userData.cameras.length>
0&&k.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(n,l){return n.reduce(function(q,r){return q?!0:!!(l.layers.mask&r.layers.mask)},!1)}function k(n){n=g(n).loaded;return n===void 0?!1:n}function p(n){n=g(n).active;return n===void 0?!0:n}function h(n){n=g(n).blending;return n===void 0?
!1:n}function g(n){return n.userData.aeb||(n.userData.aeb={})}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.H=void 0;this.tfa=!1});a.prototype.update=function(n){var l=n.jb&&this.H&&!this.H.jb;this.H=n.clone();this.tfa||(l?this.l_a():this.N7a())};a.prototype.N7a=function(){var n=!1,l=f.Ola(this.H.ih),
q=f.om(this.H.ih);d.u5(q,d.WJ,void 0).forEach(function(w){var y=m(l,w)&&d.Mla(w)>0&&p(w);w.visible!=y&&(w.visible=y,n=!0)});q=d.sHa(q,d.WJ,void 0);q=d.WIa(q,d.KE);for(var r in q){var t=q[r],u=l.map(function(){return!1});t.sort(function(w,y){return d.QIa(y)-d.QIa(w)});var v=t.some(h);t.forEach(function(w){var y=m(l,w)&&d.Mla(w)>0&&p(w)&&(!v||k(w));if(y){y=!0;for(var x=v||k(w)&&d.Mla(w)>.999,z=0;z<l.length;z++)w.layers.mask&l[z].layers.mask&&!u[z]&&(y=!1,x&&(u[z]=!0));y=!y}w.visible!=y&&(w.visible=
y,n=!0)})}n&&this.o(b.V)};a.prototype.l_a=function(){this.tfa=!0;f.om(this.H.ih).forEach(function(n){n.visible=!1});setTimeout(function(){this.tfa=!1;this.update(this.H)}.bind(this),300);this.o(b.V)};a.AX=function(n,l){g(n).loaded=l};a.setActive=function(n,l){g(n).active=l};a.wNa=function(n,l){d.fl(n,function(q){g(q).blending=l})};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.$q)&&!(!w.mna&&!w.ina)}function k(w){return w.userData.$q||
(w.userData.$q={})}function p(w){return k(w).OJ}function h(w){return k(w).enabled||!1}function g(w){return!p(w).cna()}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"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),l=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.m=null;this.PL=[];this.mC=[];this.DK=[];this.H=void 0;this.zv=null;this.cD=this.cD.bind(this)});r.prototype.u8=function(w){this.m=w};r.prototype.update=function(w){this.H=w.clone();this.n7a()?this.cD():this.rEa()};r.prototype.rEa=function(){this.zv||(this.zv=setTimeout(this.cD,1E3))};var t=Math.PI/180,u=function(){if(q.yb()){if(q.Mma()&&q.$jb()>=1)return 2;if(q.Dc()==q.Jw||q.Dc()==q.Kw||q.qW())return 1.5}else return 1.5;return 1}();r.prototype.n7a=function(){var w=
this.H.Bk>0?1E3:this.H.Xi/Math.tan(Math.min(this.H.Wi*.5,89.99)*t);w*=u;var y=l.Ola(this.H.ih),x=l.om(this.H.ih).filter(m),z=x.filter(h);var A=n.sHa(z,n.WJ,void 0);A=n.WIa(A,n.WJ);A.none=n.u5(z,n.WJ,void 0);z=[];for(var D in A)for(var E=A[D],B=0,C=E.length;B<C;B++){var I=E[B];(k(I).mna||r.OY)==r.ju&&z.push(I)}for(var F=0,G=y.length;F<G;F++){var N=y[F];for(D in A){E=A[D];var O=null,R=Number.NEGATIVE_INFINITY,S=null,K=Number.POSITIVE_INFINITY;B=0;for(C=E.length;B<C;B++)if(I=E[B],I.layers.mask&N.layers.mask&&
(k(I).mna||r.OY)==r.OY){var L=k(I).Web*90;L<w&&L>R?(O=I,R=L):L>=w&&L<K&&(S=I,K=L)}this.H.jb&&S&&O?R>.75*w?z.push(O):z.push(S):(S&&z.indexOf(S)<0&&z.push(S),O&&z.indexOf(O)<0&&z.push(O))}}w=[];for(y=0;y<z.length;y++)D=z[y],w.indexOf(D)<0&&w.push(D);z=w;a:{w=this.DK;for(y=0;y<w.length;y++)if(z.indexOf(w[y])<0){w=!1;break a}for(y=0;y<z.length;y++)if(w.indexOf(z[y])<0){w=!1;break a}w=!0}w=!w;this.DK=z;B=0;for(C=x.length;B<C;B++)I=x[B],h(I)&&d.setActive(I,this.DK.indexOf(I)>=0);return w};r.prototype.cD=
function(){this.zv=null;for(var w=[],y=[],x=[],z=(new Date).getTime()-v,A=l.Ola(this.H.ih),D=l.om(this.H.ih),E=0,B=D.length;E<B;E++){var C=D[E],I=C.userData.$q;if(I){var F=n.zD(C);if(I.enabled){var G=[];if(this.DK.indexOf(C)>=0){if(this.H.Bk>0||(k(C).ina||r.E$)==r.qr)G=F;else for(var N=0,O=A.length;N<O;N++){var R=n.Gbb(C,A[N]);if(N==0)G=R;else for(var S=0,K=R.length;S<K;S++){var L=R[S];G.indexOf(L)<0&&G.push(L)}}S=0;for(K=G.length;S<K;S++)L=G[S],(L.userData.$q||(L.userData.$q={})).YJa=z}this.Waa(C,
G);S=0;for(K=I.At.length;S<K;S++)w.push(I.At[S]);S=0;for(K=I.tA.length;S<K;S++)y.push(I.tA[S])}else for(I.tA||this.Waa(C,[]),S=0,K=I.tA.length;S<K;S++)L=I.tA[S],I.At.indexOf(L)<0&&y.push(L);S=0;for(K=F.length;S<K;S++)x.push(F[S])}}E=[];S=0;for(K=this.mC.length;S<K;S++)L=this.mC[S],x.indexOf(L)<0?L.userData.$q.OJ.FPa():g(L)?this.cia(L,!1):E.push(L);this.mC=E;S=Math.max(r.uKa(),Math.round(y.length*1.25))-w.length;if(this.mC.length>S)for(this.mC.sort(function(Q,T){return k(Q).YJa-k(T).YJa}),E=this.mC.splice(0,
this.mC.length-S),S=0,K=E.length;S<K;S++)L=E[S],L.userData.$q.OJ.FPa(),this.cia(L,!1);y=[];E=0;for(B=this.DK.length;E<B;E++)C=this.DK[E],I=C.userData.$q,I.At.length>0&&y.push(C);x=Number.POSITIVE_INFINITY;E=0;for(B=y.length;E<B;E++)C=y[E],I=C.userData.$q,S=I.priority,S=S!==void 0?S:Number.POSITIVE_INFINITY,S<x&&(x=S);w=[];E=0;for(B=y.length;E<B;E++)if(C=y[E],I=C.userData.$q,S=I.priority,S=S!==void 0?S:Number.POSITIVE_INFINITY,S==x)for(R=I.At,S=0,K=R.length;S<K;S++)L=R[S],w.push(L);S=0;for(K=this.PL.length;S<
K;S++)L=this.PL[S],w.indexOf(L)<0&&(L=L.userData.$q.OJ,L.h(b.ha,this.Nia,this,!0),L.h(b.$c,this.Oia,this,!0),L.Q9a());E=this.PL;this.PL=w;B=this.PL.slice();S=0;for(K=B.length;S<K;S++)L=B[S],E.indexOf(L)<0&&(L=L.userData.$q.OJ,L.bind(b.ha,this.Nia,this,!0),L.bind(b.$c,this.Oia,this,!0),L.load(this.m))};r.prototype.Nia=function(w){this.uDa(w.source);this.o(b.ha)};r.prototype.Oia=function(w){this.uDa(w.source)};r.prototype.uDa=function(w){w.h(b.ha,this.Nia,this,!0);w.h(b.$c,this.Oia,this,!0);var y=w.material(),
x=this.PL,z=x.indexOf(y);z>=0&&x.splice(z,1);this.mC.push(y);this.cia(y,!0);w=w.Se();k(w).At.indexOf(y)>=0&&this.Waa(w,k(w).tA);this.rEa()};r.prototype.Waa=function(w,y){var x=k(w).tA;x=x?x.length:void 0;var z=k(w).At;z=z?z.length:void 0;k(w).tA=y;k(w).At=y.filter(g);d.AX(w,k(w).At.length==0&&(k(w).ina||r.E$)==r.qr);y=(y=k(w).tA)?y.length:void 0;var A=k(w).At;A=A?A.length:void 0;z===A&&x===y||w.dispatchEvent({type:b.wc,percent:y?100-100*A/y:100});z!==A&&A===0&&w.dispatchEvent({type:b.ha})};r.prototype.cia=
function(w,y){if(y!=w.visible){var x=f.nIa(w),z=n.getAttribute(x,n.KE),A=n.getAttribute(x,n.t9);if(z===void 0||A===void 0)w.visible=y;else{var D=l.om(this.H.ih).filter(m);z=n.u5(D,n.KE,z);A=n.u5(z,n.t9,A);var E=n.zD(x).indexOf(w);w=A.map(function(B){return n.zD(B)[E]});for(x=0;x<w.length&&y;x++)y=y&&p(w[x]).cna();for(x=0;x<w.length;x++)w[x].visible=y}}};r.uKa=function(){var w=q.D6()||q.E6()?384:q.yb()?128:384;r.uKa=function(){return w};return w};r.Ua=function(w,y){n.fl(w,function(x){k(x).enabled=
y})};r.enabled=h;r.s8=function(w,y){n.fl(w,function(x){k(x).Web=y})};r.qr="all";r.E$="in view";r.yA=function(w,y){n.fl(w,function(x){k(x).ina=y})};r.ju="always";r.OY="on demand";r.zA=function(w,y){n.fl(w,function(x){k(x).mna=y})};r.LX=function(w,y){n.fl(w,function(x){k(x).priority=y})};r.zJ=function(w,y){n.fl(w,function(x){k(x).Llb=y;n.zD(x).forEach(function(z){p(z).Pgb(y)})})};r.Klb=function(w){return 100-100*k(w).At.length/k(w).tA.length};r.Jlb=function(w){return k(w).At.length==0};r.fP=function(w,
y){(k(w).OJ=y)&&(w.visible=y.cna())};r.OJ=p;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"),k=a("tdv/player/view/panorama/renderer/object/Base"),p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),
g=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/player/view/panorama/renderer/OcclusionCuller");a=m.extend(k,function(){k.call(this);this.set("tag","WebGLObject");this.set("zOrder",0);this.set("webglScene",null);this.set("meshGroup",null);this.set("camera",null)});a.prototype.Np=function(){return[]};a.prototype.kc=function(){p.dispose(this.get("meshGroup"));p.Aw(this.get("meshGroup"),null);this.set("meshGroup",null);k.prototype.kc.call(this)};a.prototype.ya=function(b){k.prototype.ya.call(this,
b);this.set("camera",h.getCamera(b.ih));this.set("webglScene",b.ih);this.get("meshGroup")||(this.set("meshGroup",p.HGa(this.Np())),this.get("meshGroup").userData.Peb=this);this.W("webglScene","meshGroup")&&p.Aw(this.get("meshGroup"),this.get("webglScene"));this.wn();this.Ss(b);this.cI();this.W("loadingActive","meshGroup")&&g.Ua(this.get("meshGroup"),this.get("loadingActive"));this.W("blendingActive","meshGroup")&&e.wNa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.wn=function(){this.W("composedAlpha",
"meshGroup")&&this.tB()};a.prototype.tB=function(){p.zf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.Ss=function(){throw"Must be overridden in descendants.";};a.prototype.cI=function(){if(this.W("index","meshGroup")){var b=this.get("meshGroup");b&&b.children.forEach(function(c,d,f){p.C8(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"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),p=a("tdv/player/view/panorama/renderer/object/WebGLObject"),h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=new THREE.Matrix4,e=Math.PI/180;a=m.extend(p,
function(){p.call(this);this.set("tag","Frame");this.li=new THREE.Matrix4;this.ie=new THREE.Matrix4;this.mn=new THREE.Matrix4;this.tj=new THREE.Matrix4});a.prototype.ya=function(b){p.prototype.ya.call(this,b)};a.prototype.Ss=function(b){var c=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.li.makeTranslation(-this.get("composedTranslationX")*.5*k.jh,this.get("composedTranslationY")*.5*k.jh,this.get("composedTranslationZ")*.5*k.jh),c=!0);this.W("composedDeltaYaw",
"composedDeltaPitch","composedDeltaRoll")&&(this.ie.makeRotationY(-b.Za*e),this.ie.multiply(g.makeRotationX(-this.get("composedDeltaPitch")*e)),this.ie.multiply(g.makeRotationY(this.get("composedDeltaYaw")*e)),this.ie.multiply(g.makeRotationY(b.Za*e)),c=!0);this.W("flipHorizontally")&&(b=this.get("flipHorizontally")?-1:1,this.mn.makeScale(b,1,1),c=!0);if(c||this.W("meshGroup"))this.tj.copy(this.li),this.tj.multiply(this.ie),this.tj.multiply(this.mn),h.ct(this.get("meshGroup"),this.tj)};return a});
define("tdv/util/Map",["require"],function(){function a(){this.FG=m++;this.RR="_map_"+this.FG+"_key";this.o0={};this.$r=[];this.length=0}var m=0;a.prototype.set=a.prototype.add=function(k,p){this.$r.indexOf(k)<0&&this.$r.push(k);if(typeof k==="object"&&k!==null){var h=k[this.RR];if(!h){h=this.RR;for(var g=[],e=0;e<8;e++)g.push(Math.floor(Math.random()*16).toString(16));h=k[h]=g.join("")}}else h=k;this.o0[h]=p;this.length=this.$r.length};a.prototype.get=function(k){return this.o0[typeof k==="object"&&
k!==null?k[this.RR]:k]};a.prototype.Bcb=function(k){return this.$r.indexOf(k)>=0};a.prototype.remove=function(k){var p=this.$r.indexOf(k);p<0||(this.$r.splice(p,1),typeof k==="object"&&k!==null?(p=k[this.RR],delete k[this.RR]):p=k,delete this.o0[p],this.length=this.$r.length)};a.prototype.forEach=function(k){this.$r.slice().forEach(function(p){k(p,this.get(p))}.bind(this))};a.prototype.dispose=function(){for(;this.$r.length;)this.remove(this.$r.pop());this.$r=this.o0=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.CI=[]}var k=a("tdv/utils"),p=a("tdv/events/EventDispatcher"),h=a("tdv/util/Map");a=k.extend(p,function(g){p.call(this);this.Rf=g;this.wd=[];this.ky=new h;this.QU=[];this.Lca=[];this.aM=this.aM.bind(this)});a.prototype.bg=function(g){this.wd.forEach(function(e){if(e.removeEventListener)e.removeEventListener(this.Rf,this.aM);else if(e.h)e.h(this.Rf,
this.aM,this,!0);else throw"invalid instance type";}.bind(this));this.wd=g.slice();this.wd.forEach(function(e){if(e.addEventListener)e.addEventListener(this.Rf,this.aM);else if(e.bind)e.bind(this.Rf,this.aM,this,!0);else throw"invalid instance type";this.ky.Bcb(e)||this.ky.set(e,new m)}.bind(this));this.pja()};a.prototype.dispose=function(){this.bg([]);this.wd=null;this.ky.dispose();this.Lca=this.QU=this.ky=null};a.prototype.bo=function(g){this.QU.push(g);this.pja();return this};a.prototype.Pq=function(g){this.Lca.push(g);
return this};a.prototype.Qv=function(g){this.wd.forEach(function(e){g(e,this.ky.get(e).CI)}.bind(this))};a.prototype.Gn=function(g){g=this.ky.get(g).CI;return g.length==0?null:g[g.length-1]};a.prototype.aM=function(g){var e=g.target||g.source;if(e=this.ky&&this.ky.get(e))e.CI.push(g),this.Lca.forEach(function(b){b(g,this)}.bind(this)),this.pja()};a.prototype.pja=function(){if(this.wd.length!=0){for(var g=0;g<this.wd.length;g++)if(this.ky.get(this.wd[g]).CI.length==0)return;this.QU.length&&(g=this.QU.slice(),
this.QU=[],g.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.p6?h():k())}function k(){r||(r=!0,f.requestFrame(p,null))}function p(){r=!1;u=void 0;h()}function h(){if(!t){u===
void 0&&(u=Date.now());for(var y=1E3/l.bIa()*.4;q.length&&Date.now()-u<y;)q.shift().add(!0);q.length&&k()}}var g=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"),n=a("tdv/player/view/util/XR"),l=a("tdv/player/view/util/ScreenFrameRateMonitor"),q=[],r=!1,t=!1,u=void 0,v={add:function(y,x,z,A){var D=q.find(function(E){E.texture===
x});D?(D.source=z,D.renderer=y):(D=new w(y,x,z),q.push(D));A&&D.bind(e.ha,A,this,!0);m();return D},wka:function(y,x,z){y=new w(y,x,z);y.add(!0);return y}};d.k9a(function(y){v.GX(y)});v.GX=function(y){if(t!==y)if(t=y)for(;q.length;)q.shift().add();else m()};var w=g.extend(b,function(y,x,z){b.call(this);this.renderer=y;this.texture=x;this.source=z});w.prototype.add=function(y){c.fY(this.texture,this.source);!n.isPresenting&&this.renderer&&y&&this.renderer.initTexture(this.texture);this.o(e.ha)};w.prototype.remove=
function(){var y=q.indexOf(this);y>=0&&q.splice(y,1);c.fY(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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/Priority"),h=a("tdv/events/EventDispatcher"),g=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(h,function(){h.call(this);this.Lf=void 0;this.La=e.createTexture();this.La.colorSpace=THREE.SRGBColorSpace;this.Oea=this.rea=this.Xda=!1;this.H=c.WP;this.OR=p.Fp;this.m=null});c.prototype.type=function(){return this.Lf};c.prototype.texture=function(){return this.La};c.prototype.material=function(){return this.La&&e.KIa(this.La)};c.prototype.Se=function(){var d=this.La&&e.KIa(this.La);return d&&
g.nIa(d)};c.prototype.Pgb=function(d){this.OR=d};c.prototype.ygb=function(d){this.Xda!==d&&(this.Xda=d,this.eEa())};c.prototype.xX=function(d){this.Oea!==d&&(this.Oea=d,this.lEa())};c.prototype.Yoa=function(d){this.rea!==d&&(this.rea=d,this.lEa())};c.prototype.lEa=function(){var d=this.Oea&&!this.rea;!!this.La.isVideoTexture!==d&&(this.La.isVideoTexture=d,this.JMa(),this.eEa())};c.prototype.eEa=function(){this.Xda?this.La.colorSpace=THREE.LinearSRGBColorSpace:!this.La.isVideoTexture||b.Rb()!=b.Iw&&
b.Rb()!=b.Fk&&b.Rb()!=b.xi?this.La.colorSpace=THREE.SRGBColorSpace:this.La.colorSpace=THREE.LinearSRGBColorSpace};c.prototype.load=function(d){this.H===c.WP&&(this.m=d,this.H=c.ZY,this.eba())};c.prototype.Q9a=function(){this.loading()&&(this.H==c.ZY?this.E3():this.eU(),this.H=c.WP)};c.prototype.FPa=function(){this.H!=c.WP&&(this.H==c.ZY?this.E3():this.H==c.V$?this.eU():this.zU(),this.H=c.WP)};c.prototype.JMa=function(){if(this.La){var d=this.material(),f=e.createTexture();f.flipY=this.La.flipY;f.format=
this.La.format;f.colorSpace=this.La.colorSpace;this.La.isVideoTexture&&(f.isVideoTexture=!0,f.update=function(){});e.dispose(this.La);d&&e.hOa(f,d);d&&g.t9a(d,f);this.La=f;this.qga()}};c.prototype.qga=function(){};c.prototype.eba=function(){};c.prototype.E3=function(){};c.prototype.cba=function(){};c.prototype.eU=function(){};c.prototype.zU=function(){e.c$a(this.texture)};c.prototype.loading=function(){return this.H==c.ZY||this.H==c.V$};c.prototype.cna=function(){return this.H==c.U$||this.H==c.hsa};
c.prototype.dispose=function(){e.dispose(this.La);this.La=null};c.prototype.dM=function(d){this.H=d?c.V$:c.hsa;d?this.cba():this.o(k.$c)};c.prototype.yya=function(){this.H=c.U$;this.o(k.ha)};c.WP="initial";c.ZY="loading";c.V$="adding";c.hsa="error loading";c.U$="added";c.GSa="custom";c.HSa="image tile";c.Lkb="image animation";c.Mkb="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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/image/Item"),h=a("tdv/player/view/image/Repository"),g=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.Lf=e.GSa;this.le=b;this.le||(this.H=e.U$);this.Xg=this.be=null;this.QH=this.RH=void 0});a.prototype.Vn=function(b){this.Xg=b;g.add(this.m,this.La,this.Xg,function(){var c=this.La&&this.La.image&&this.La.image.width||void 0,d=this.La&&this.La.image&&this.La.image.height||void 0;this.RH===void 0||this.QH===void 0||this.RH===c&&this.QH===d||this.JMa();this.RH=c;this.QH=d}.bind(this))};
a.prototype.qg=function(){return h.qg(this.le)};a.prototype.update=function(b){b?g.add(this.m,this.La,this.Xg):g.wka(this.m,this.La,this.Xg)};a.prototype.eba=function(){this.le?this.GQ():this.dM(!0)};a.prototype.E3=function(){this.Tr()};a.prototype.cba=function(){this.yya()};a.prototype.zU=function(){this.Tr()};a.prototype.dispose=function(){this.Tr();e.prototype.dispose.call(this)};a.prototype.Ke=function(){this.dM(!0)};a.prototype.oh=function(){this.dM(!1)};a.prototype.qga=function(){this.Xg&&g.wka(this.m,
this.La,this.Xg)};a.prototype.GQ=function(){this.be||(this.be=new p,this.be.gP([this.le]),this.be.bind(k.ha,this.Ke,this,!0),this.be.bind(k.$c,this.oh,this,!0),h.Zz(this.be,this.OR))};a.prototype.Tr=function(){this.be&&(this.be.h(k.ha,this.Ke,this,!0),this.be.h(k.$c,this.oh,this,!0),h.Zn(this.be,this.OR),this.be=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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/image/Item"),h=a("tdv/player/view/image/Repository"),g=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.Lf=e.HSa;this.le=b;this.Xg=this.CM=this.be=null});a.prototype.qg=function(){return this.Xg};a.prototype.eba=function(){this.GQ()};a.prototype.E3=function(){this.Tr()};a.prototype.cba=function(){this.QWa()};a.prototype.eU=function(){this.Tr();this.wca()};a.prototype.zU=function(){this.Tr();this.wca()};a.prototype.dispose=function(){this.Tr();this.wca();e.prototype.dispose.call(this)};
a.prototype.Ke=function(){this.Xg=h.qg(this.le);this.dM(!0)};a.prototype.oh=function(){this.dM(!1)};a.prototype.zya=function(){this.yya()};a.prototype.qga=function(){this.Xg&&g.wka(this.m,this.La,this.Xg)};a.prototype.GQ=function(){this.be||(this.be=new p,this.be.gP([this.le]),this.be.bind(k.ha,this.Ke,this,!0),this.be.bind(k.$c,this.oh,this,!0),h.Zz(this.be,this.OR))};a.prototype.Tr=function(){this.be&&(this.be.h(k.ha,this.Ke,this,!0),this.be.h(k.$c,this.oh,this,!0),h.Zn(this.be,this.OR),this.be=
null)};a.prototype.QWa=function(){this.CM=g.add(this.m,this.La,this.Xg);this.CM.bind(k.ha,this.zya,this,!0)};a.prototype.wca=function(){this.CM&&(this.CM.h(k.ha,this.zya,this,!0),this.CM.remove(),this.CM=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"),k=a("tdv/player/view/image/Repository"),p=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),h=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource");a=m.extend(h,
function(g,e,b,c,d){h.call(this,g.get("url"));this.cc=e;this.dc=b;this.Pa=c;this.Ga=d;this.i0a=this.cc!=0||this.dc!=0||this.Pa!=g.get("width")||this.Ga!=g.get("height")});a.prototype.Ke=function(){this.i0a?(this.WWa(),this.Tr(),this.dM(!!this.Xg)):h.prototype.Ke.call(this)};a.prototype.eU=function(){h.prototype.eU.call(this);this.xca()};a.prototype.zU=function(){h.prototype.zU.call(this);this.xca()};h.prototype.dispose=function(){h.prototype.dispose.call(this);this.xca()};a.prototype.WWa=function(){var g=
k.qg(this.le);this.Xg=p.V$a(g,this.cc,this.dc,this.Pa,this.Ga)};a.prototype.xca=function(){this.Xg&&(p.kla(this.Xg),this.Xg=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"),k=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),p=a("tdv/player/view/panorama/renderer/constants/Face"),h=a("tdv/player/view/panorama/renderer/3d/util/Util"),g=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"),n=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),l=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={E$a:function(u,v){var w=n.get(u);switch(w){case n.nB:case n.Ww:case n.Fm:return this.AWa(w,u,v);case n.rr:case n.Br:case n.qu:return this.CWa(w,u,v)}},Z$a:function(u,
v){var w=new e(v.get("posterURL"));w.xX(!0);return this.Pua(u,v,w)},Y$a:function(u,v){var w=new g;w.xX(!0);return this.Pua(u,v,w)},Pua:function(u,v,w){var y=u.get("hfov"),x=u.get("vfov"),z=u.get("pitch"),A=v.get("width");v=v.get("url");u=n.get(u);var D=u==n.qu?2:1,E=u==n.Br?2:1;u=D+E>2?[k.$a,k.Cb]:[k.Hw];var B=Math.round(A/D);A=new d.Cp(v);var C=d.lm(w.texture(),A);q.fP(C,w);C.visible=!0;return u.map(function(I,F){F=c.MGa(y,x,z,1,1,F%D/D,(E-1-Math.floor(F/D))/E,1/D,1/E);F=f.create(F,[C]);F.layers.set(I);
q.s8(F,B/y);return F}.bind(this))},Q$a:function(u){var v=[p.Cb,p.$a,p.Tc,p.Fc,p.FRONT,p.BACK].map(function(){var y=new g;y.Vn(t.RZa(u));var x=d.lm(y.texture());q.fP(x,y);x.visible=!0;return x}),w=c.LGa(1,1);v=f.create(w,v);q.s8(v,256/90);v.layers.set(k.Hw);return v},ria:{},RZa:function(u){if(!t.ria[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.ria[u]=v}return t.ria[u]},AWa:function(u,v,w){var y=u==n.nB?[k.Cb,
k.$a]:[k.Hw],x=v.get("flipImageHorizontally");x&&(y=y.reverse());var z=u==n.Fm?1:6*y.length,A=w.get("width")/z,D=w.get("height");if(m.Qa("TiledImageResourceLevel",w)){var E=w.get("colCount",z)/z;var B=w.get("rowCount",1)}else this.FBa(u,w)?(E=Math.ceil(A/h.ix()),B=Math.ceil(D/h.ix())):B=E=1;var C=[p.Cb,p.$a,p.Tc,p.Fc,p.FRONT,p.BACK];return y.map(function(I,F){var G=Array(6);C.forEach(function(R,S){var K=l.Tla(v,w,R);m.Qa("TiledImageResourceLevel",w)?G[c.ksa.indexOf(R)]=this.wWa(K,u,I,R,x,E,B):G[c.ksa.indexOf(R)]=
this.Jua(K,E,B,u==n.Fm?0:Math.round((F*C.length+S)*A),0,A,D,E>1||B>1||u!=n.Fm?A>256?1:.5:0)}.bind(this));var N=Array.prototype.concat.apply([],G),O=c.LGa(E,B);N=f.create(O,N);N.layers.set(I);q.s8(N,A/90);return N}.bind(this))},CWa:function(u,v,w){var y=u==n.rr?[k.Hw]:[k.$a,k.Cb];v.get("flipImageHorizontally")&&(y=y.reverse());var x=w.get("width"),z=w.get("height"),A=v.get("hfov"),D=v.get("vfov"),E=v.get("pitch"),B=Math.round(x/A/(z/D)),C=Math.round(x/B),I=Math.round(z/Math.round(z/D/(x/A))),F=(u=
this.FBa(u,w))?Math.ceil(C/h.ix()):1,G=u?Math.ceil(I/h.ix()):1;return y.map(function(N,O){O=this.Jua(w,F,G,O%B*C,Math.floor(O/B)*I,C,I);var R=c.MGa(A,D,E,F,G,0,0,1,1);O=f.create(R,O);O.layers.set(N);q.s8(O,C/A);return O}.bind(this))},FBa:function(u,v){switch(u){case n.nB:case n.Ww:case n.Br:case n.qu:return!0;case n.Fm:return!1;case n.rr:return r.kcb().maxTextureSize<Math.max(v.get("width"),v.get("height"))?!0:h.Lq()||r.yb()?!1:r.Dc()==r.SA?!0:!1}},Jua:function(u,v,w,y,x,z,A,D){D||(D=0);for(var E=
[],B=0;B<w;B++)for(var C=x+D+(A-2*D)*B/w,I=x+D+(A-2*D)*(B+1)/w,F=0;F<v;F++){var G=y+D+(z-2*D)*F/v,N=y+D+(z-2*D)*(F+1)/v;G=u?new b(u,G,C,N-G,I-C):new g;N=d.Zka(G.texture());q.fP(N,G);E.push(N)}return E},wWa:function(u,v,w,y,x,z,A){for(var D=[],E=0;E<A;E++)for(var B=0;B<z;B++){var C=u?new e(l.LIa(u,v,w,y,x,A,E,B)):new g;var I=d.Zka(C.texture());q.fP(I,C);I.visible=!1;D.push(I)}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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/renderer/object/Frame"),h=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),
g=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),e=a("tdv/player/view/panorama/renderer/TextureLoader");a=m.extend(p,function(b){p.call(this);this.Ie=b;this.set("tag","SolidFrame");this.Hh=null});a.prototype.ec=function(){this.Hh=(new h(k.ha)).bo(this.Ke.bind(this));p.prototype.ec.call(this)};a.prototype.kc=function(){this.Hh.dispose();p.prototype.kc.call(this)};a.prototype.Np=function(){var b=[g.Q$a(this.Ie)];e.zA(b,e.ju);e.yA(b,e.qr);this.Hh.bg(b);return b};a.prototype.Ke=function(){this.o(k.td);
this.o(k.ha)};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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/player/view/panorama/renderer/object/SolidFrame"),h=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension"),e=a("tdv/player/view/util/XR");
a=m.extend(k,function(b,c,d,f){k.call(this,b,c,d,f);this.ja=null;this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(b){if(!this.Ob){this.I.Am||(this.I.Am=new p("#000000"),this.I.Am.set("alpha",1),this.m.add(this.I.Am));if(!this.ja){this.I.Am.mi();var c=this.I.Ika*2;this.ja=new h("linear",[new g("alpha",2,0,void 0)],c);this.I.Am.mi()}this.ja.Lb(b);this.I.Am.set("alpha",Math.min(.99,this.ja.ib("alpha")));this.m.Yf(this.I.Zc).set("alpha",1);this.ja&&this.ja.Qe()&&(this.Ob=
!0,this.m.remove(this.I.Am),this.I.Am=null);e.fe.forEach(function(d){e.fpa(d,!this.Ob)}.bind(this))}};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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/player/view/panorama/renderer/3d/util/Util"),h=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(k,function(e,b,c,d){k.call(this,e,
b,c,d);this.Cj=this.m.R.Sc();this.ja=null;this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(e){if(!this.Ob){if(!this.ja){p.x8(!0);this.Cj.zE();this.m.Yf(this.I.Ah).set("alpha",0);var b=this.I.WGa;this.ja=new h("linear",[new g("position",0,1,void 0)],b)}this.ja.Lb(e);this.Cj.mE(this.ja.ib("position"));this.ja.Qe()&&(this.Ob=!0,this.Cj.sD(),p.x8(!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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/player/view/panorama/renderer/object/SolidFrame"),h=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension"),e=a("tdv/player/view/util/XR");
a=m.extend(k,function(b,c,d,f){k.call(this,b,c,d,f);this.ja=null;this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(b){if(!this.Ob){this.I.Am||(this.I.Am=new p("#000000"),this.I.Am.set("alpha",0),this.m.add(this.I.Am));if(!this.ja){this.I.Am.mi();var c=this.I.WGa*2;this.ja=new h("linear",[new g("alpha",0,2,void 0)],c)}this.ja.Lb(b);b=Math.min(1,this.ja.ib("alpha"));this.I.Am.set("alpha",b);e.fe.forEach(function(d){e.fpa(d,!0)});b==1&&this.m.Yf(this.I.Ah).set("alpha",0);
this.ja.Qe()&&(this.Ob=!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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");a=m.extend(k,function(g,e,b,c){k.call(this,g,e,b,c);this.ja=null;this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=
function(g){if(!this.Ob){if(!this.ja){var e=this.m.df(),b=this.Uc.b8(this.I.Zc,e),c=!this.I.jb()&&Math.abs(e-b)>.01?this.I.r9:1;this.ja=new p("cubic_in_out",[new h("hfov",e,b,void 0)],c)}this.ja.Lb(g);this.Uc.Wq(this.ja.ib("hfov"));this.ja.Qe()&&(this.Uc.zX(!0),this.Ob=!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 k=a("tdv/utils"),p=a("tdv/player/view/panorama/control/transition/steps/Step"),h=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=k.extend(p,function(e,b,c,d){p.call(this,e,b,c,d);this.ja=null;this.Ob=
!1;this.S0=0});a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(e){this.Ob||(this.ja||(this.ja=this.S0<this.I.Hq.length?this.MWa(this.S0):this.rWa()),this.ja.Lb(e),this.Uc.ipa(this.ja.ib("yaw"),this.ja.ib("pitch")),this.Uc.Wq(this.ja.ib("hfov")),this.Uc.DJ(this.ja.ib("stereographicFactor")),this.ja.Qe()&&(this.ja=null,this.S0++,this.S0>this.I.Hq.length&&(this.Uc.zX(!0),this.Ob=!0)))};a.prototype.rWa=function(){var e=m(this.m.Jc(),-180,180),b=this.m.Ic();this.m.Ag();var c=this.m.df(),
d=this.m.H.Bk,f=this.I.uh.get("hfov");f={Za:this.I.uh.get("yaw"),pitch:this.I.uh.get("pitch",b),fh:this.m.Ag(),Wd:f?this.Uc.wI(f):c,Bk:0};this.Uc.Tfb(this.I.Zc,f);f.Za=m(f.Za,e-180,e+180);var n=Math.abs(c-f.Wd)>.5,l=Math.abs(d-f.Bk),q=l>.01;n=this.I.jb()?1:Math.max(n?this.I.r9:1,q?this.I.NLa*l:1);return new h(q?"linear":"cubic_in_out",[new g("yaw",e,f.Za,void 0),new g("pitch",b,f.pitch,void 0),new g("hfov",c,f.Wd,void 0),new g("stereographicFactor",d,f.Bk,void 0)],n)};a.prototype.MWa=function(e){var b=
this.I.Hq[e],c=m(this.m.Jc(),-180,180),d=this.m.Ic();this.m.Ag();var f=this.m.df(),n=this.m.H.Bk,l=b.get("targetStereographicFactor",n),q=b.get("targetHfov");if(q)q=this.Uc.wI(q);else{for(q=!1;e<this.I.Hq.length&&!q;e++)q=this.I.Hq[e].get("targetHfov")!==void 0;q?q=f:(q=this.Uc.wI(this.I.uh.get("hfov",this.Uc.RGa())),q=f+(q-f)*(n-l))}e=b.get("targetYaw",c);var r=b.get("targetPitch",d);this.m.Ag();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 h(b.get("easing"),[new g("yaw",c,e,b.get("yawSpeed")),new g("pitch",d,r,b.get("pitchSpeed")),new g("hfov",f,q,b.get("hfovSpeed")),new g("stereographicFactor",n,l,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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");a=m.extend(k,function(g,e,b,c){k.call(this,g,e,b,c);this.ja=null;this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=
function(g){if(!this.Ob){if(!this.ja){var e=this.m.Ic(),b=this.m.df(),c=this.m.H.Bk,d=this.I.og.get("stereographicFactor",0),f=Math.abs(c-d),n=d>0?this.I.og.get("pitch",e):e,l=this.I.og.get("hfov");l=l?this.Uc.wI(l):b;d==0&&(l=Math.min(b,this.Uc.b8(this.I.Zc,l)));this.Uc.zX(!1);f=this.I.jb()?1:Math.max(Math.abs(b-l)>.5?this.I.r9:1,f>.01?this.I.NLa:1);this.ja=new p("cubic_in_out",[new h("hfov",b,l,void 0),new h("pitch",e,n,void 0),new h("stereographicFactor",c,d,void 0)],f)}this.ja.Lb(g);this.Uc.Wq(this.ja.ib("hfov"));
this.Uc.DJ(this.ja.ib("stereographicFactor"));this.Uc.ipa(this.m.Jc(),this.ja.ib("pitch"));this.ja.Qe()&&(this.Uc.Of(this.I.Zc,this.I.og.get("yaw"),this.I.og.get("pitch",this.m.Ic())),this.Ob=!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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/view/util/Ease"),h=a("tdv/view/util/EaseDimension");a=m.extend(k,function(g,e,b,c){k.call(this,g,e,b,c);this.ja=null;this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=
function(g){if(!this.Ob){if(!this.ja){var e=this.m.df(),b=Math.min(this.Uc.b8(this.I.Zc,e),e),c=!this.I.jb()&&Math.abs(e-b)>.01?this.I.r9:1;this.ja=new p("cubic_in_out",[new h("hfov",e,b,void 0)],c);this.Uc.zX(!1)}this.ja.Lb(g);this.Uc.Wq(this.ja.ib("hfov"));this.ja.Qe()&&(this.Uc.Of(this.I.Zc,this.m.Jc()+this.I.qP.WHa(),this.m.Ic()),this.Ob=!0)}};a.prototype.VI=function(){return!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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){var p=this.m.Yf(this.I.Ah);this.m.remove(p)};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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){var p=(this.I.mc||this.I.Ec).get("model");p.set("objects",p.get("objects").filter(function(h){return h!=this.I.ye}.bind(this)));
[this.I.ye.get("sourceCubeTexture"),this.I.ye.get("targetCubeTexture")].forEach(function(h){h&&h.dispose()});this.I.ye=null};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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){var p=[this.m.kd];this.n0a()&&p.push(this.I.Qh);this.m.kd.rJ(p)};a.prototype.n0a=function(){return this.I.Ec?!0:this.m.kd.get("keepModel3DLoadedWithoutLocation")&&
this.I.Ah&&this.I.Qh&&this.I.Qh.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,k){return function(p){function h(g,e,b,c){return p.call(this,g,e,b,c)||this}P(h,p);h.prototype.Kh=function(){var g,e,b;(b=(e=(g=this.I.Qh)===null||g===void 0?void 0:g.get("model"))===null||e===void 0?void 0:e.get("camera"))===null||b===void 0||b.Ofb()};return h}(k)});
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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){this.Uc.Of(this.I.Zc,this.I.uh.get("yaw"),this.I.uh.get("pitch",this.m.Ic()));var p=this.I.uh.get("hfov");p&&(p=this.Uc.wI(p),this.Uc.Wq(p))};
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 k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){var p=this.I.Ec.get("model").get("camera");if(this.I.KJ.get("keepInitialPositionOnTranslation")){var h=this.I.uh.get("yaw");
p=this.I.uh.get("pitch")}else h=p.get("yaw")-this.I.Ec.get("yaw"),p=this.I.KJ.get("enterPointingToHorizon")?0:p.get("pitch");this.Uc.Of(this.I.Zc,h,p);if(h=this.I.uh.get("hfov"))h=this.Uc.wI(h),this.Uc.Wq(h)};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"),k=a("tdv/player/view/util/geo/Quaternion"),p=a("tdv/player/view/util/XR"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(g,e,b,c){h.call(this,g,e,b,c)});a.prototype.Kh=
function(){if(p.isPresenting){var g=k.a9(p.yg,!0);this.I.Ec.get("model").get("camera");var e=g.Za-this.I.Ec.get("yaw");g=g.pitch}else this.I.KJ.get("keepInitialPositionOnTranslation")?(e=this.I.uh.get("yaw"),g=this.I.uh.get("pitch")):(g=this.I.Ec.get("model").get("camera"),e=g.get("yaw")-this.I.Ec.get("yaw"),g=g.get("pitch"));this.Uc.Of(this.I.Zc,e,g)};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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(p,function(h,g,e,b){p.call(this,h,g,e,b);this.ma=null;this.Ob=!1});a.prototype.u1a=function(){this.Ob=!0};a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(){if(!this.ma&&
(this.ma=this.I.mc.get("model"),this.I.Qh.get("model")==this.ma)){var h=this.ma.get("camera");h.set("easing",0);h.set("x",this.I.mc.get("x"));h.set("y",this.I.mc.get("y"));h.set("z",this.I.mc.get("z"));h.set("yaw",this.m.Jc()+this.I.mc.get("yaw"));h.set("pitch",this.m.Ic());h.set("fov",this.m.cb()>this.m.Kb()?this.m.dO():this.m.eO());this.ma.bind(k.me,this.u1a,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,k){a=function(p){function h(g,e,b,c,d){g=p.call(this,g,e,b,c)||this;g.value=!1;g.value=d;return g}P(h,p);h.prototype.Kh=function(){var g,e=(g=this.I.mc||this.I.Ec||this.I.Qh)===null||g===void 0?void 0:g.get("model");e&&e.get("camera").set("inTransition",this.value)};return h}(k);m=function(p){function h(g,e,b,c){return p.call(this,
g,e,b,c,!0)||this}P(h,p);return h}(a);a.Zh=m;m=function(p){function h(g,e,b,c){return p.call(this,g,e,b,c,!1)||this}P(h,p);return h}(a);a.fg=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,k){a=function(p){function h(g,e,b,c,d){g=p.call(this,g,e,b,c)||this;g.enabled=!1;g.enabled=d;return g}P(h,p);h.prototype.Kh=function(){var g;(g=this.I.Qh)===null||g===void 0||g.m.Ua(this.enabled)};return h}(k);m=function(p){function h(g,e,b,c){return p.call(this,g,e,b,c,!0)||this}P(h,p);return h}(a);a.Zh=m;m=function(p){function h(g,
e,b,c){return p.call(this,g,e,b,c,!1)||this}P(h,p);return h}(a);a.fg=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,k){a=function(p){function h(g,e,b,c,d){g=p.call(this,g,e,b,c)||this;g.paused=!1;g.paused=d;return g}P(h,p);h.prototype.Kh=function(){var g,e=(g=this.I.Ec||this.I.mc||this.I.Qh)===null||g===void 0?void 0:g.get("model");e&&this.I.Qh.m.TNa(e,!this.paused)};return h}(k);m=function(p){function h(g,e,b,c){return p.call(this,
g,e,b,c,!0)||this}P(h,p);return h}(a);a.Zh=m;m=function(p){function h(g,e,b,c){return p.call(this,g,e,b,c,!1)||this}P(h,p);return h}(a);a.fg=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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),p=a("tdv/player/view/panorama/control/transition/TransitionData");a=m.extend(k,function(h,g,e,b){k.call(this,h,g,e,b)});a.prototype.Kh=function(){this.I.Zc&&(this.I.mode==
p.eaa||this.I.mode==p.faa?this.I.Zc.set("minFaceSize",1024):this.I.Zc.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"],function(a){var m=a("tdv/utils"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){var p=this.I.Lpa?this.I.og.get("stereographicFactor",0):0;this.Uc.DJ(p);this.Uc.Of(this.I.Zc,this.I.og.get("yaw"),this.I.og.get("pitch",this.m.Ic()));
(p=this.I.og.get("hfov"))||this.I.Ah||(p=this.Uc.RGa());p&&(p=this.Uc.wI(p),this.Uc.Wq(p),this.Uc.zX(!this.I.Lpa))};return a});
define("tdv/player/view/panorama/control/transition/steps/SetRenderingPaused",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,k){a=function(p){function h(g,e,b,c,d){g=p.call(this,g,e,b,c)||this;g.paused=!1;g.paused=d;return g}P(h,p);h.prototype.Kh=function(){this.m.dOa(this.paused)};return h}(k);m=function(p){function h(g,e,b,c){return p.call(this,g,e,b,c,!0)||this}P(h,p);return h}(a);a.Zh=m;m=function(p){function h(g,e,b,c){return p.call(this,
g,e,b,c,!1)||this}P(h,p);return h}(a);a.fg=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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){var p=this.Uc.b8(this.I.Zc,this.m.df());this.Uc.Wq(p);this.Uc.Of(this.I.Zc,this.m.Jc()+this.I.qP.WHa(),this.m.Ic())};a.prototype.VI=function(){return!0};
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,k,p){a=function(h){function g(e,b,c,d,f){e=h.call(this,e,b,c,d)||this;e.value=!1;e.ended=!1;e.wait=!1;e.wh=function(){return this.ended};e.value=f;e.value||(e.wait=!0);return e}P(g,h);g.prototype.yh=function(){p.fe.forEach(function(e){p.fpa(e,!this.value)}.bind(this));this.wait?this.wait=!1:this.ended=
!0};return g}(k);m=function(h){function g(e,b,c,d){return h.call(this,e,b,c,d,!0)||this}P(g,h);return g}(a);a.Zh=m;m=function(h){function g(e,b,c,d){return h.call(this,e,b,c,d,!1)||this}P(g,h);return g}(a);a.fg=m;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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.Kh=function(){this.I.mc&&this.I.Qh.get("model")==this.I.mc.get("model")&&this.m.kd.rJ([this.I.Qh])};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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=a("tdv/player/view/panorama/renderer/3d/util/Util"),h=a("tdv/player/view/util/Device");a=m.extend(k,function(g,e,b,c){k.call(this,g,e,b,c);this.H="not initialized";this.Pb=0});
a.prototype.wh=function(){return this.H=="ended"};a.prototype.yh=function(g){this.wh()||(this.H=="not initialized"&&this.uR(),this.H=="initialized"&&(this.uq.get("ready")||this.uq.Ema())&&this.aU(),this.H=="started"&&this.ya(g),this.Pb>=1&&this.SQ())};a.prototype.uR=function(){this.XAa=this.I.vPa;this.lQ=.25;this.UUa=.75;this.Z2a=.25;this.EDa=this.XZa();this.zaa=.5*this.XAa;this.j7a=this.XAa-2*this.zaa;this.ZG=1/(this.zaa+this.j7a);this.jZ=this.ZG/this.zaa;this.gz=0;this.uq=this.m.Yf(this.I.Zc);this.uia=
this.m.Yf(this.I.Ah);this.kL=this.I.qP.lbb();this.H="initialized"};a.prototype.XZa=function(){var g=this.I.qP.get("distance");return g?Math.min(.99,g/this.I.Ah.get("distanceToFloor")):.75};a.prototype.aU=function(){this.m.UNa(!this.I.jb()&&h.Rb()!=h.Fk);this.uq.mi();this.H="started"};a.prototype.ya=function(g){this.uq.get("ready")&&p.x8(!0);this.uq.get("ready")||this.Pb<this.Z2a?this.Pb>=1-.5*this.gz*this.gz/this.jZ?this.gz=Math.sqrt(2*(1-this.Pb)*this.jZ):this.gz<this.ZG&&(this.gz=Math.min(this.gz+
this.jZ*g,this.ZG)):this.gz=Math.max(this.gz-this.jZ*g,0);this.Pb=Math.min(Math.max(0,this.Pb+this.gz*g),1);this.uq.get("ready")||(this.lQ=Math.max(this.lQ,this.Pb));this.g4(this.Pb,Math.max(0,Math.min(1,(this.Pb-this.lQ)/(this.UUa-this.lQ))))};a.prototype.SQ=function(){this.uq.set("alpha",1);this.m.UNa(!1);this.H="ended";p.x8(!1)};a.prototype.g4=function(g,e){var b=(g-1)*this.EDa;this.uq.set("translationX",b*this.kL.x);this.uq.set("translationY",b*this.kL.y);this.uq.set("translationZ",b*this.kL.z);
this.uq.get("ready");g*=this.EDa;this.uia.set("translationX",g*this.kL.x);this.uia.set("translationY",g*this.kL.y);this.uia.set("translationZ",g*this.kL.z);this.uq.set("alpha",Math.max(.01,Math.min(.99,e)))};a.prototype.VI=function(){return this.Pb<this.lQ};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"),k=a("tdv/player/script/Model3DCameraMovement");return m.define("TargetModel3DCameraMovement",k,function(){k.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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/script/Model3DCameraSequence"),g=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,n,l){e.call(this,d,f,n,l);this.Ks=this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(){this.I.Qh.get("model")!=this.I.mc.get("model")?this.Yu():this.Vb?this.Vb.get("state")==p.aa&&setTimeout(function(){this.Yu()}.bind(this),10):this.Ks||(this.Ks=!0,this.nia(),this.VT())};a.prototype.nia=function(){var d=this.I.mc.get("model").get("camera");this.fha=d.get("sequences").find(function(q){return q.get("state")===
p.PLAYING});var f=d.$M;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.I.mc.get("x"));d.set("y",this.I.mc.get("y"));d.set("z",this.I.mc.get("z"));d.set("distance",0);b.isPresenting||d.set("yaw",this.m.Jc()+this.I.mc.get("yaw"));d.set("pitch",this.m.Ic());
d.set("fov",this.m.cb()>this.m.Kb()?this.m.dO():this.m.eO());var n=[];if(this.I.OD){var l=new g;l.set("duration",this.I.g6);l.set("easing","linear");l.bind(k.me,this.Vfa,this,!0);this.ada=l;n.push(l);this.I.ye.set("sourceAlpha",1)}else this.I.ye.set("sourceAlpha",.99);this.ke=new g;this.ke.set("targetX",f.x);this.ke.set("targetY",f.y);this.ke.set("targetZ",f.z);b.isPresenting||this.ke.set("targetYaw",f.yaw);this.ke.set("targetPitch",f.pitch);this.ke.set("targetFov",f.fov);this.ke.set("targetDistance",
f.distance);this.ke.set("duration",this.I.Qeb);this.ke.set("easing","quad_in_out");this.ke.bind(k.me,this.hga,this,!0);n.push(this.ke);this.Vb=new h;this.Vb.set("movements",n);this.Vb.set("mandatory",!0);this.Vb.set("internal",!0);this.Vb.bind(k.Qb,this.Yu,this,!0);d.set("sequences",d.get("sequences").concat([this.Vb]));this.Vb.play();this.iU=(new THREE.Vector3).set(f.x,f.y,f.z);this.VC=(new THREE.Vector3).set(this.I.mc.get("x"),this.I.mc.get("y"),this.I.mc.get("z"))};a.prototype.Vfa=function(){var d=
this.ada.get("position");this.I.ye.set("sourceAlpha",1-d);this.I.ye.set("targetAlpha",0)};a.prototype.hga=function(){if(this.I.OD)this.I.ye.set("sourceAlpha",0),this.I.ye.set("targetAlpha",0);else{var d=this.hR();this.I.ye.set("sourceAlpha",1-Math.max(.01,Math.min(.99,(d-0)/.33)))}};var c=new THREE.Vector3;a.prototype.hR=function(){var d=this.I.mc.get("model").get("camera");return c.set(d.get("x"),d.get("y"),d.get("z")).distanceTo(this.VC)/this.VC.distanceTo(this.iU)};a.prototype.Yu=function(){if(!this.Ob){var d=
this.I.mc.get("model").get("camera");d.set("sequences",d.get("sequences").filter(function(f){return f!=this.Vb}.bind(this)));this.fha&&d.get("sequences").includes(this.fha)&&this.fha.play();this.Ob=!0;this.CT()}};a.prototype.VT=function(){var d=this.I.mc.get("model");this.qT=d.get("postprocessing");this.rT=d.get("surfaceSelectionEnabled");d.set("postprocessing",!1);d.set("surfaceSelectionEnabled",!1)};a.prototype.CT=function(){var d=this.I.mc.get("model"),f=this.qT,n=this.rT;setTimeout(function(){d.set("postprocessing",
f);d.set("surfaceSelectionEnabled",n)},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"),k=a("tdv/constants/EventName"),p=a("tdv/player/script/Model3DCameraSequence"),h=a("tdv/player/script/TargetModel3DCameraMovement"),g=a("tdv/player/view/panorama/control/transition/steps/Step"),
e=a("tdv/player/view/util/XR");a=m.extend(g,function(c,d,f,n){g.call(this,c,d,f,n);this.Ob=this.Ks=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(){this.I.Qh.get("model")!=this.I.Ec.get("model")?this.Gza():this.Ks||(this.Ks=!0,this.y5a(),this.VT())};a.prototype.y5a=function(){var c=this.I.Ec.get("model").get("camera");c.set("easing",0);c.set("x",this.I.mc.get("x"));c.set("y",this.I.mc.get("y"));c.set("z",this.I.mc.get("z"));c.set("distance",0);e.isPresenting||c.set("yaw",this.m.Jc()+
this.I.mc.get("yaw"));c.set("pitch",this.m.Ic());c.set("fov",this.m.cb()>this.m.Kb()?this.m.dO():this.m.eO());var d=[];if(this.I.OD){var f=new h;f.set("duration",this.I.g6);f.set("easing","linear");f.bind(k.me,this.Vfa,this,!0);this.ada=f;d.push(f);this.I.ye.set("skyBox",!1);this.I.ye.set("nearPlane",!0);this.I.ye.set("sourceAlpha",1);this.I.ye.set("targetAlpha",0)}else this.I.ye.set("skyBox",!0),this.I.ye.set("nearPlane",!1),this.I.ye.set("targetAlpha",.01),this.I.ye.set("sourceAlpha",.99);this.ke=
new h;this.ke.set("targetX",this.I.Ec.get("x"));this.ke.set("targetY",this.I.Ec.get("y"));this.ke.set("targetZ",this.I.Ec.get("z"));this.I.KJ.get("keepInitialPositionOnTranslation")&&(e.isPresenting||(f=this.I.uh.get("yaw")+this.I.Ec.get("yaw"),this.ke.set("targetYaw",f)),f=this.I.uh.get("pitch"),f!==void 0&&this.ke.set("targetPitch",f),f=this.I.uh.get("hfov"),f!==void 0&&this.ke.set("targetFov",f));this.ke.set("duration",1500);this.ke.set("easing","cubic_in_out");this.ke.bind(k.me,this.v1a,this,
!0);d.push(this.ke);this.I.OD&&(f=new h,f.set("duration",this.I.g6),f.set("easing","linear"),f.bind(k.me,this.Ufa,this,!0),this.$ca=f,d.push(f));this.Vb=new p;this.Vb.set("movements",d);this.Vb.set("mandatory",!0);this.Vb.set("internal",!0);this.Vb.bind(k.Qb,this.Gza,this,!0);c.set("sequences",c.get("sequences").concat([this.Vb]));this.Vb.play();this.VC=(new THREE.Vector3).set(this.I.mc.get("x"),this.I.mc.get("y"),this.I.mc.get("z"));this.iU=(new THREE.Vector3).set(this.I.Ec.get("x"),this.I.Ec.get("y"),
this.I.Ec.get("z"))};a.prototype.v1a=function(){if(this.I.OD)this.I.ye.set("sourceAlpha",0),this.I.ye.set("targetAlpha",0);else{var c=this.hR();this.I.ye.set("targetAlpha",Math.max(.01,Math.min(.99,c-0)));this.I.ye.set("sourceAlpha",1)}};var b=new THREE.Vector3;a.prototype.hR=function(){var c=this.I.mc.get("model").get("camera");return b.set(c.get("x"),c.get("y"),c.get("z")).distanceTo(this.VC)/this.VC.distanceTo(this.iU)};a.prototype.Vfa=function(){var c=this.ada.get("position");this.I.ye.set("sourceAlpha",
1-c);this.I.ye.set("targetAlpha",0)};a.prototype.Ufa=function(){var c=this.$ca.get("position");this.I.ye.set("sourceAlpha",0);this.I.ye.set("targetAlpha",c)};a.prototype.Gza=function(){var c=this.I.mc.get("model").get("camera");c.set("sequences",c.get("sequences").filter(function(d){return d!=this.Vb}.bind(this)));this.CT();this.Ob=!0};a.prototype.VT=function(){var c=this.I.mc.get("model"),d=this.I.Qh;this.qT=c.get("postprocessing");this.rT=c.get("surfaceSelectionEnabled");this.N2a=d.get("spritesEnabled");
c.set("postprocessing",!1);c.set("surfaceSelectionEnabled",!1);d.set("spritesEnabled",!1)};a.prototype.CT=function(){var c=this.I.mc.get("model"),d=this.I.Qh,f=this.qT,n=this.rT,l=this.N2a;setTimeout(function(){c.set("postprocessing",f);c.set("surfaceSelectionEnabled",n);d.set("spritesEnabled",l)},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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/script/Model3DCameraSequence"),
g=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,n,l,q){e.call(this,f,n,l,q);this.Ks=this.Ob=!1});a.prototype.wh=function(){return this.Ob};a.prototype.yh=function(){this.Vb?this.Vb.get("state")==p.aa&&setTimeout(function(){this.Yu()}.bind(this),10):this.Ks||(this.Ks=!0,this.nia(),this.VT())};a.prototype.nia=function(){var f=this.I.Ec.get("model").get("camera");
f.mib();var n=Math.abs(f.get("pitch")-this.m.Ic()),l=n>30;this.ke=new g;this.ke.set("targetX",this.I.Ec.get("x"));this.ke.set("targetY",this.I.Ec.get("y"));this.ke.set("targetZ",this.I.Ec.get("z"));this.ke.set("targetDistance",0);this.ke.set("targetFov",this.k_a(this.m.df()));c.isPresenting||this.ke.set("targetYaw",this.m.Jc()+this.I.Ec.get("yaw"));l?this.ke.set("targetPitch",f.get("pitch")):this.ke.set("targetPitch",this.m.Ic());this.ke.set("duration",this.I.Wdb);this.ke.set("easing","cubic_in_out");
this.ke.bind(k.me,this.hga,this,!0);var q=[this.ke];l&&(l=new g,l.set("targetPitch",this.m.Ic()),l.set("duration",n/90*1E3),l.set("easing","quad_in_out"),q.push(l));this.I.OD?(n=new g,n.set("duration",this.I.g6),n.set("easing","linear"),n.bind(k.me,this.Ufa,this,!0),this.$ca=n,q.push(n),this.I.ye.set("targetAlpha",0)):this.I.ye.set("targetAlpha",.01);this.Vb=new h;this.Vb.set("movements",q);this.Vb.set("mandatory",!0);this.Vb.set("internal",!0);this.Vb.bind(k.Qb,this.Yu,this,!0);f.set("sequences",
f.get("sequences").concat([this.Vb]));this.Vb.play();this.VC=(new THREE.Vector3).set(f.get("x"),f.get("y"),f.get("z"));this.iU=(new THREE.Vector3).set(this.I.Ec.get("x"),this.I.Ec.get("y"),this.I.Ec.get("z"))};a.prototype.k_a=function(f){return this.m.cb()<this.m.Kb()?b.qm(f,this.m.cb(),this.m.Kb()):f};a.prototype.hga=function(){if(!this.Ob&&!this.I.OD){var f=this.hR();this.I.ye.set("targetAlpha",Math.max(.01,Math.min(.99,(f-.66)/(1-.66))))}};var d=new THREE.Vector3;a.prototype.hR=function(){var f=
this.I.Ec.get("model").get("camera");return d.set(f.get("x"),f.get("y"),f.get("z")).distanceTo(this.VC)/this.VC.distanceTo(this.iU)};a.prototype.Ufa=function(){var f=this.$ca.get("position");this.I.ye.set("targetAlpha",f)};a.prototype.Yu=function(){this.Ob||this.YXa()};a.prototype.YXa=function(){var f=this.I.Ec.get("model").get("camera");f.set("sequences",f.get("sequences").filter(function(n){return n!=this.Vb}.bind(this)));this.Ob=!0;this.Vb=null;this.CT();this.m.Yf(this.I.Zc).set("alpha",1)};a.prototype.VT=
function(){var f=this.I.Ec.get("model");this.qT=f.get("postprocessing");this.rT=f.get("surfaceSelectionEnabled");f.set("postprocessing",!1);f.set("surfaceSelectionEnabled",!1)};a.prototype.CT=function(){var f=this.I.Ec.get("model"),n=this.qT,l=this.rT;setTimeout(function(){f.set("postprocessing",n);f.set("surfaceSelectionEnabled",l)},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"),k=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(k,function(p,h,g,e,b){k.call(this,p,h,g,e);this.nVa=b});a.prototype.Kh=function(){this.nVa.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"),k=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(k,function(p,h,g,e){k.call(this,p,h,g,e)});a.prototype.wh=function(){var p=this.m.Wb(),h=p&&p.mN;p=p&&p.RL;return!!h&&!h.get("visible")&&!!p&&!p.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"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),p=m.extend(k,function(h,g,e,b){k.call(this,h,g,e,b);this.Yy=null});p.prototype.wh=function(){this.Yy||(this.Yy=this.I.Zc&&this.m.Yf(this.I.Zc));return this.Yy&&this.Yy.get("ready")};p.prototype.VI=function(){return!0};p.SRa=m.extend(p,function(h,g,e,b){p.call(this,
h,g,e,b)});p.SRa.prototype.VI=function(){return!1};p.YRa=m.extend(p,function(h,g,e,b){p.call(this,h,g,e,b)});p.YRa.prototype.wh=function(){this.Yy||(this.Yy=this.I.Zc&&this.m.Yf(this.I.Zc));return this.Yy&&(this.Yy.get("ready")||this.Yy.foa())};return p});
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/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/ReleaseViewerArea 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/utils".split(" "),function(a){var m=
a("tdv/events/Event"),k=a("tdv/events/EventDispatcher"),p=a("tdv/player/view/panorama/control/transition/PositionController"),h=a("tdv/player/view/panorama/control/transition/TransitionData"),g=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"),n=a("tdv/player/view/panorama/control/transition/steps/FadeIn"),l=a("tdv/player/view/panorama/control/transition/steps/FadeInVR"),q=a("tdv/player/view/panorama/control/transition/steps/FadeOut"),r=a("tdv/player/view/panorama/control/transition/steps/FadeOutVR"),t=a("tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition"),u=a("tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition"),v=a("tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition"),
w=a("tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition"),y=a("tdv/player/view/panorama/control/transition/steps/Remove"),x=a("tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel"),z=a("tdv/player/view/panorama/control/transition/steps/RequestViewerArea"),A=a("tdv/player/view/panorama/control/transition/steps/RestoreModelPosition"),D=a("tdv/player/view/panorama/control/transition/steps/SetInitialPosition"),E=a("tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel"),
B=a("tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel"),C=a("tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition"),I=a("tdv/player/view/panorama/control/transition/steps/SetModelInTransition"),F=a("tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled"),G=a("tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused"),N=a("tdv/player/view/panorama/control/transition/steps/SetMinFaceSize"),O=a("tdv/player/view/panorama/control/transition/steps/SetOriginPosition"),
R=a("tdv/player/view/panorama/control/transition/steps/SetRenderingPaused"),S=a("tdv/player/view/panorama/control/transition/steps/SetTranslationPosition"),K=a("tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible"),L=a("tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea"),Q=a("tdv/player/view/panorama/control/transition/steps/Translate"),T=a("tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama"),W=a("tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas"),
X=a("tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama"),Y=a("tdv/player/view/panorama/control/transition/steps/TriggerEvent"),ca=a("tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow"),ea=a("tdv/player/view/panorama/control/transition/steps/WaitReady"),Z=a("tdv/utils").extend(k,function(U,V,aa){k.call(this);this.R=U;this.m=V;this.Ac=aa;this.Uc=this.Su=null;this.$ua=this.Gu=this.eT=this.Oy=void 0;this.I=null;this.Lh=[]});Z.prototype.bpa=function(U){this.Su=
U};Z.prototype.clear=function(){this.Aha(this.Gu);this.I&&this.Aha(this.I.Zc);this.eT=this.Oy=void 0;this.va=this.Ac=this.m=this.R=this.I=null};Z.prototype.start=function(U,V){!this.I&&U==this.Gu||this.I&&U==this.I.Zc?this.eT=this.Oy=void 0:(this.Oy=U,this.eT=V,this.Lh.length==0&&this.B3())};Z.prototype.Pe=function(){this.Oy=null;!this.I&&this.Gu&&this.B3()};Z.prototype.Fma=function(){return this.I!==null};Z.prototype.jbb=function(){return this.I&&this.I.Zc};Z.prototype.B3=function(){this.I=new h(this.m,
this.Su,this.Gu,this.Oy,this.eT);this.Uc=new p(this.m,this.Ac,this.I);this.eT=this.Oy=void 0;this.la(N);this.la(b);switch(this.I.mode){case h.ara:this.la(K.fg);this.la(A);this.I.jb()?(this.la(r),this.sc(this.nz)):(this.sc(this.nz),this.la(q));this.la(R.Zh);this.la(G.fg);this.la(F.Zh);this.sc(this.ZC);this.la(y);this.sc(this.xv);this.la(I.fg);this.la(K.Zh);break;case h.$qa:this.la(z);this.sc(this.WH);this.la(ea);this.la(d);this.la(O);this.sc(this.oz);this.la(n);this.la(ca);this.la(u);this.sc(this.VH);
break;case h.JY:this.la(z);this.sc(this.nz);this.la(K.fg);this.I.jb()?this.la(r):this.la(q);this.sc(this.WH);this.sc(this.ZC);this.la(y);this.sc(this.xv);this.la(ea);this.la(d);this.la(O);this.sc(this.oz);this.I.jb()?this.la(l):this.la(n);this.la(K.Zh);this.la(ca);this.la(u);this.sc(this.VH);break;case h.nsa:this.la(z);this.sc(this.WH);this.sc(this.nz);this.sc(this.ZC);this.I.jb()?(this.la(ea),this.la(S),this.sc(this.oz),this.la(Q),this.la(y),this.sc(this.xv)):(this.la(w),this.sc(this.oz),this.la(Q),
this.la(y),this.sc(this.xv),this.la(t),this.la(d),this.la(ca));this.sc(this.VH);break;case h.zp:this.la(z);this.sc(this.WH);this.la(ea);this.I.jb()?(this.sc(this.nz),this.sc(this.ZC),this.la(D),this.sc(this.oz),this.la(g),this.la(y),this.sc(this.xv)):(this.sc(this.nz),this.sc(this.ZC),this.la(v),this.sc(this.oz),this.la(g),this.la(y),this.sc(this.xv),this.la(d),this.la(ca),this.la(u));this.sc(this.VH);break;case h.eaa:this.la(R.Zh);this.la(z);this.sc(this.WH);this.la(c);this.la(G.fg);this.la(ea);
this.la(K.fg);this.la(e.gaa);this.la(E);this.la(X);this.la(I.fg);this.la(I.Zh);this.sc(this.oz);this.la(R.fg);this.la(F.fg);this.la(x);this.la(K.Zh);this.la(d);this.la(ca);this.la(G.Zh);this.sc(this.VH);break;case h.psa:this.la(c);this.sc(this.nz);this.la(C);this.sc(this.ZC);this.la(K.fg);this.la(e.Z$);this.la(R.Zh);this.la(G.fg);this.la(y);this.sc(this.xv);this.la(T);this.la(I.fg);this.la(x);this.la(K.Zh);this.la(L);break;case h.faa:this.sc(this.WH);this.la(c);this.sc(this.nz);this.sc(this.ZC);this.la(K.fg);
this.la(e.Z$);this.la(ea);this.la(e.gaa);this.la(C);this.la(R.Zh);this.la(G.fg);this.la(y);this.sc(this.xv);this.la(W);this.la(F.fg);this.la(I.fg);this.la(x);this.la(B);this.sc(this.oz);this.la(f);this.la(R.fg);this.la(K.Zh);this.la(d);this.la(ca);this.la(G.Zh);this.sc(this.VH);break;case h.osa:this.sc(this.WH),this.la(c),this.la(K.fg),this.la(e.Z$),this.la(C),this.la(R.Zh),this.la(G.fg),this.la(ea),this.sc(this.nz),this.sc(this.ZC),this.la(y),this.sc(this.xv),this.la(T),this.la(x),this.la(e.gaa),
this.la(E),this.la(X),this.la(I.fg),this.sc(this.oz),this.la(R.fg),this.la(F.fg),this.la(x),this.la(K.Zh),this.la(G.Zh),this.sc(this.VH)}this.sc(this.fja);this.Sa()};Z.prototype.Xia=function(){this.Gu=this.I.Zc;this.$ua=this.I.KJ;this.I=this.Uc=null;this.Oy===void 0?this.Gu?this.O6a(this.Gu,this.$ua):this.P6a():this.B3()};window.o$a=!0;window.p$a=!0;document.addEventListener("keydown",function(U){U.which==67&&(window.o$a=window.p$a=!0)});Z.prototype.rA=function(U){for(;this.Lh.length;){var V=this.Lh[0];
V.d6a||(V.d6a=(new Date).getTime());if(this.Oy!==void 0&&this.Oy!==this.Gu&&V.VI()){this.Aha(this.I.Zc);this.Lh=[];this.B3();break}else if(V.yh(U),this.Sa(),this.Uc.rA(U),V.wh())this.Lh.shift(),this.Lh.length==0&&this.Xia();else break}};document.addEventListener("keydown",function(){(new Date).getTime()});document.addEventListener("keyup",function(){(new Date).getTime()});Z.prototype.xe=function(){};Z.prototype.la=function(U){this.Lh.push(new U(this,this.Uc,this.m,this.I))};Z.prototype.sc=function(U){this.Lh.push(new Y(this,
this.Uc,this.m,this.I,U))};Z.prototype.Aha=function(U){U&&(U=this.m.Yf(U))&&(this.m.remove(U),this.xv())};Z.prototype.WH=function(){this.o(new m(Z.u$,{panorama:this.I.Zc}))};Z.prototype.xv=function(){this.o(new m(Z.l$,{panorama:this.I?this.I.Ah:this.Gu,nextPanorama:this.I?this.I.Zc:null}))};Z.prototype.nz=function(){this.o(new m(Z.YE,{panorama:this.I.Ah}))};Z.prototype.ZC=function(){this.o(new m(Z.XE,{panorama:this.I.Ah,nextPanorama:this.I.Zc}))};Z.prototype.VH=function(){this.o(new m(Z.ZE,{panorama:this.I.Zc,
camera:this.I.KJ}))};Z.prototype.fja=function(){this.o(new m(Z.lr))};Z.prototype.oz=function(){this.o(new m(Z.$E,{panorama:this.I.Zc,camera:this.I.KJ}))};Z.prototype.O6a=function(U,V){this.o(new m(Z.R9,{panorama:U,camera:V}))};Z.prototype.P6a=function(){this.o(new m(Z.S9))};Z.prototype.Sa=function(){this.o(new m(Z.nc))};Z.nc="request frame";Z.u$="request load";Z.l$="panorama removed";Z.R9="all pending panoramas displayed";Z.S9="all pending panoramas hidden";Z.XE="panorama end";Z.$E="panorama start";
Z.ZE="panorama show";Z.YE="panorama hide";Z.lr="transition end";return Z});
define("tdv/player/view/panorama/control/frames/BaseFramesController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher"],function(a){var m=a("tdv/utils"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=m.extend(p,function(g){p.call(this);this.m=g});h.prototype.clear=function(){this.end();this.m=null};h.prototype.nO=function(g){for(var e=this.H_(g),b=g.QV(),c=0;c<e;c++)this.m.Yf(this.Cda(g,c)).set("alpha",c==b?1:0)};h.prototype.getTime=function(){return 0};h.prototype.start=
function(){};h.prototype.end=function(){};h.prototype.play=function(){};h.prototype.pause=function(){};h.prototype.OO=function(){};h.prototype.YO=function(){};h.prototype.K8=function(){};h.prototype.stop=function(){};h.prototype.BJ=function(){};h.prototype.nE=function(){};h.prototype.vP=function(){};h.prototype.xe=function(){};h.prototype.gl=function(){};h.prototype.H_=function(g){return g.get("frames").length};h.prototype.Cda=function(g,e){return g.get("frames")[e]};h.prototype.Sa=function(){this.o(new k(h.nc))};
h.prototype.Ps=function(g,e,b,c,d,f){this.o(new k(h.Gk,{time:g,duration:e,transitionPosition:b,transitionLength:c,steps:d,selectedStep:f}))};h.prototype.bl=function(){this.o(new k(h.dd,{state:this.gl()}))};h.nc="request frame";h.WQa="frame display";h.XQa="frame hide";h.Gk="time change";h.dd="playback state change";return h});
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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/control/frames/BaseFramesController"),g=a("tdv/player/view/util/geo/Point"),
e=a("tdv/player/view/util/geo/Transformation"),b=a("tdv/view/images/ImageLoader"),c=m.extend(h,function(d){h.call(this,d);this.A_=null;this.lda=this.tG=0;this.Aa=this.YG=null;this.Xga=!1;this.fb=360;this.UEa=180;this.qb=.5;this.Vp=.2;this.vy=.45;this.Oxa=5E3;this.Sxa=1;this.J0=[[.5,.25],[.5,.375],[.25,.5],[.375,.5],[.5,.5],[.625,.5],[.75,.5],[.5,.625],[.5,.75]];this.C0a=[.05,.1,.05,.1,.4,.1,.05,.1,.05]});c.prototype.nO=function(d){h.prototype.nO.call(this,d);this.NT(d)};c.prototype.start=function(d){this.NT(d);
this.Sa()};c.prototype.end=function(){this.NT(null)};c.prototype.NT=function(d){this.Aa!=d&&(this.Aa&&(this.f7a(),this.Aa=null,this.l7a()),this.Aa=d)&&(this.PUa(),this.fb=d.get("hfov",360),this.UEa=d.get("vfov",180),this.qb=d.get("pitch",0),this.eha=this.yH=void 0,this.u0a(d),this.Pb=.5)};c.prototype.vP=function(){this.Xga=!1};c.prototype.BJ=function(d){this.Pb=d/c.eQ;this.Sa();this.Xga=!0};c.prototype.nE=function(d){this.BJ(d)};c.prototype.Ps=function(){var d=this.H_(this.Aa),f=this.Pb*(d-1),n=Math.max(0,
Math.min(d-2,Math.floor(f))),l=void 0;f-n<.01?l=n:f-n>.99&&(l=n+1);h.prototype.Ps.call(this,this.Pb*c.eQ,c.eQ,this.Pb*c.eQ,c.eQ,d,l)};c.prototype.xe=function(d){if(this.Aa){var f=this.m.Jc(),n=this.m.Ic(),l=this.m.Ag(),q=0;if(this.yH!==void 0&&this.eha!==void 0&&this.cBa!==void 0){var r=f-this.yH,t=n-this.eha,u=l-this.cBa;q=Math.sqrt(r*r+t*t+u*u)*1E3/d}this.yH=f;this.eha=n;this.cBa=l;r=this.H_(this.Aa);var v=this.Pb*(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,y=[],
x=0;x<r;x++)y.push(0);y[u]=w;y[t]=w<1?1:0;for(x=0;x<r;x++)this.m.Yf(this.Cda(this.Aa,x)).set("alpha",y[x]);this.Ps();if(this.A_&&(q<=this.Sxa||this.m.st())&&!this.Xga){x=Math.PI/180;q=180/Math.PI;y=this.m.cb();var z=this.m.Kb(),A=new e;A.rotateZ(-l*x);A.rotateX(-n*x);A.rotateY(-f*x);f=[];for(x=0;x<this.J0.length;x++)n=new g(this.J0[x][0]*y,this.J0[x][1]*z,0),l=this.m.unproject(n).NIa(),l.apply(A),n=l.Jc()*q,l=l.Ic()*q,f.push(Math.round((90-l)*this.lda/180)*this.tG+Math.round((n+180)*this.tG/360));
n=[];for(x=0;x<r;x++){l=this.A_[x];for(y=q=0;y<this.J0.length;y++)q+=this.C0a[y]*l[f[y]];n.push(q)}x=n[t];f=n[u];t=v*n[t]+w*n[u];d=Math.min(1/r,d/this.Oxa);r=this.Pb;u=Math.max.apply(Math,n);v=Math.min.apply(Math,n);t<this.Vp&&t<u?r=f>t?r+d:r-d:t>this.vy&&t>v&&(r=x<t?r-d:r+d);r=Math.min(1,Math.max(0,r));this.Pb!=r&&(this.Pb=r,this.Sa())}}};c.prototype.u0a=function(d){var f=d.get("frames",[]).map(n=>n.get("thumbnailUrl"));this.YG=f.map(n=>{var l=null;n&&(l=new b(p.Fp),l.bind(k.ha,this.xza,this),l.bind(k.$c,
this.yza,this));return l});this.YG.forEach((n,l)=>{n&&n.load(f[l])})};c.prototype.l7a=function(){this.Wua();this.A_=null};c.prototype.r1a=function(){this.tG=150;this.YG.map(function(d){d&&(this.tG=Math.min(d.Zf()*360/this.fb,this.tG))},this);this.lda=Math.round(this.tG/2);this.A_=this.YG.map(function(d){return this.JWa(d,this.tG,this.lda,this.fb,this.UEa,this.qb)},this);this.Wua()};c.prototype.JWa=function(d,f,n,l,q,r){var t=document.createElement("canvas");t.width=f;t.height=n;var u=t.getContext("2d");
u.fillStyle="#000000";u.fillRect(0,0,f,n);d&&(d=d.qg(),l=Math.round(f*l/360),u.drawImage(d,(f-l)*.5,Math.round(n*(90-(r+q*.5))/180),l,Math.round(n*q/180)));f=[];t=u.getImageData(0,0,t.width,t.height);for(n=u=0;u<t.height;u++)for(q=0;q<t.width;q++,n+=4)f.push((.299*t.data[n]+.587*t.data[n+1]+.114*t.data[n+2])/255);return f};c.prototype.Wua=function(){this.YG.forEach(d=>{d&&(d.h(k.ha,this.xza,this),d.h(k.$c,this.yza,this),d.cancel())});this.YG=null};c.prototype.xza=function(){this.YG.filter(d=>d&&!d.aj()).length==
0&&this.r1a()};c.prototype.yza=function(){};c.prototype.PUa=function(){this.Aa.bind(k.K("minimumLuminance"),this.Hy,this);this.Aa.bind(k.K("maximumLuminance"),this.Hy,this);this.Aa.bind(k.K("luminanceChangeTime"),this.Hy,this);this.Aa.bind(k.K("maxLuminanceChangeSpeed"),this.Hy,this);this.Hy()};c.prototype.f7a=function(){this.Aa.h(k.K("minimumLuminance"),this.Hy,this);this.Aa.h(k.K("maximumLuminance"),this.Hy,this);this.Aa.h(k.K("luminanceChangeTime"),this.Hy,this);this.Aa.h(k.K("maxLuminanceChangeSpeed"),
this.Hy,this)};c.prototype.Hy=function(){this.Vp=this.Aa.get("minimumLuminance");this.vy=this.Aa.get("maximumLuminance");this.Vp==void 0&&this.vy==void 0?(this.Vp=.2,this.vy=.45):this.Vp==void 0?this.Vp=Math.min(.2,this.vy):this.Vp==void 0?this.vy=Math.max(.45,this.Vp):this.Vp=Math.min(this.Vp,this.vy);this.vy=Math.min(1,Math.max(0,this.vy));this.Vp=Math.min(1,Math.max(0,this.Vp));this.Oxa=Math.max(100,this.Aa.get("luminanceChangeTime",5E3));this.Sxa=this.Aa.get("maxLuminanceChangeSpeed",1);this.Sa()};
c.eQ=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"),k=a("tdv/binding/ChangeWatcher"),p=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/control/frames/BaseFramesController");a=m.extend(g,function(e){g.call(this,e);this.y_=this.z_=null;
this.bk=this.Ji=5E3;this.qf=void 0;this.Zb=this.Ji;this.Ur=1;this.Aa=null;this.QG=!1;this.yT=void 0});a.prototype.start=function(e){this.Aa=e;this.QG=!1;this.h0=!0;this.z_=k.Fw(this.Aa,"frameDisplayTime",this.tja,this);this.y_=k.Fw(this.Aa,"frameTransitionTime",this.tja,this);this.Ur=this.H_(this.Aa);this.qf=this.Aa.QV()*(this.Ji+this.bk);this.tja(!0);this.Ps();this.Sa();this.bl()};a.prototype.tja=function(e){var b=Math.max(100,this.Aa.get("frameDisplayTime",5E3)),c=Math.max(100,this.Aa.get("frameTransitionTime",
5E3));if(this.Ji!=b||this.bk!=c||e){e=this.uL();var d=this.OYa();this.Ji=b;this.bk=c;this.Ur>1?(this.qf=e*(this.Ji+this.bk)+d*this.Ji+d*this.bk,this.Zb=this.Ur*(this.Ji+this.bk)):(this.qf=d*this.Ji,this.Zb=this.Ji)}};a.prototype.uL=function(){return this.Ur>1?Math.floor(this.qf/(this.Ji+this.bk)):0};a.prototype.PYa=function(){return this.Ur>1?(this.uL()+1)%this.Ur:0};a.prototype.OYa=function(){return this.Ur>1?Math.max(0,Math.min(1,this.qf-this.uL()*(this.Ji+this.bk))):this.qf/this.Ji};a.prototype.ewa=
function(){return this.Ur>1?Math.max(0,Math.min(1,(this.qf-(this.uL()*(this.Ji+this.bk)+this.Ji))/this.bk)):0};a.prototype.f6a=function(e){var b=Math.floor(e/this.bk);return b*(this.Ji+this.bk)+this.Ji+(e-b*this.bk)};a.prototype.vDa=function(e){var b=Math.floor(e/(this.Ji+this.bk));return b*this.bk+Math.max(0,e-b*(this.Ji+this.bk)-this.Ji)};a.prototype.play=function(){this.QG&&(this.QG=!1,this.h0&&this.Sa(),this.bl())};a.prototype.pause=function(){this.QG=!0;this.bl()};a.prototype.OO=function(){this.pause()};
a.prototype.YO=function(){this.play()};a.prototype.end=function(){this.h0=!1;this.Aa=null;this.z_&&(this.z_.EE(),this.z_=null);this.y_&&(this.y_.EE(),this.y_=null);this.bl()};a.prototype.BJ=function(e){this.qf=e;this.Sa()};a.prototype.nE=function(e){this.qf=this.f6a(e);this.Sa();this.pause()};a.prototype.xe=function(e){if(this.h0){var b=this.qf;this.QG||(b+=e);if(this.yT===void 0&&b>=this.Zb-this.bk)this.yT=this.qf,this.Aa.o(p.yr);else{this.qf=b;this.qf%=this.Zb;this.yT!==void 0&&this.qf<this.yT&&
(this.yT=void 0);e=this.uL();b=this.PYa();var c=this.ewa(),d=b>e?c:1;c=b>e?1:1-c;for(var f=0;f<this.Ur;f++){var n=f==e?c:f==b?d:0;var l=this.m.Yf(this.Cda(this.Aa,f));l.get("alpha")!=n&&(n>0&&n<1&&l.mi(),l.get("alpha"),l.set("alpha",n))}this.Ps();this.QG||this.Sa()}}};a.prototype.gl=function(){return this.h0?this.QG?h.Xb:h.PLAYING:h.aa};a.prototype.bl=function(){g.prototype.bl.call(this,this.gl())};a.prototype.Ps=function(){g.prototype.Ps.call(this,this.qf,this.Zb,this.vDa(this.qf),this.vDa(this.Zb),
this.Ur+1,this.ewa()===0?this.uL():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"),k=a("tdv/player/view/panorama/control/frames/BaseFramesController");return m.extend(k,function(p){k.call(this,p)})});
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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/panorama/control/frames/BaseFramesController");a=m.extend(h,function(g){h.call(this,g);this.Cf=!1});a.prototype.nO=function(){};a.prototype.start=function(g){this.end();
this.Aa=g;this.Aa.set("mute",this.Cf);this.Aa.get("autoplay")&&this.Aa.set("state",p.PLAYING);this.sx()};a.prototype.getTime=function(){return this.Aa?this.Aa.get("currentTime"):0};a.prototype.gl=function(){return this.Aa?this.Aa.get("state"):p.aa};a.prototype.play=function(){this.Aa&&this.Aa.set("state",p.PLAYING)};a.prototype.pause=function(){this.Aa&&this.Aa.set("state",p.Xb)};a.prototype.K8=function(){this.Aa&&this.Aa.set("state",p.Xb)};a.prototype.stop=function(){this.Aa&&this.Aa.set("state",
p.aa)};a.prototype.end=function(){this.Aa&&(this.Xy(),this.Aa=null)};a.prototype.BJ=function(g){this.Aa&&this.Aa.set("state",p.PLAYING);this.Aa&&this.Aa.set("currentTime",g)};a.prototype.rg=function(g){this.Cf=g;this.Aa&&this.Aa.set("mute",this.Cf)};a.prototype.sx=function(){this.Aa.bind(k.K("currentTime"),this.Jf,this,!0);this.Aa.bind(k.K("duration"),this.Qo,this,!0);this.Aa.bind(k.K("state"),this.xj,this,!0);this.Aa.get("state")!=p.aa&&this.bl()};a.prototype.Xy=function(){this.Aa.h(k.K("currentTime"),
this.Jf,this,!0);this.Aa.h(k.K("duration"),this.Qo,this,!0);this.Aa.h(k.K("state"),this.xj,this,!0)};a.prototype.xj=function(){this.bl()};a.prototype.Jf=function(){this.Ps()};a.prototype.Qo=function(){this.Ps()};a.prototype.Ps=function(){this.Aa&&h.prototype.Ps.call(this,this.Aa.get("currentTime"),this.Aa.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 k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/player/parser/ClassInfo"),g=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(p,
function(n){p.call(this);this.m=n;this.ifa=this.SZ(b);this.$da=this.SZ(e);this.q4=this.SZ(d);this.wia=this.SZ(c);this.pe=null});f.prototype.clear=function(){this.JZ(this.ifa);this.ifa=null;this.JZ(this.$da);this.$da=null;this.JZ(this.q4);this.q4=null;this.JZ(this.wia);this.m=this.pe=this.wia=null};f.prototype.SZ=function(n){n=new n(this.m);n.bind(g.nc,this.Tf,this,!0);n.bind(g.Gk,this.qs,this,!0);n.bind(g.dd,this.If,this,!0);return n};f.prototype.JZ=function(n){n.h(g.nc,this.Tf,this);n.h(g.Gk,this.qs,
this);n.h(g.dd,this.If,this);n.clear()};f.prototype.Kea=function(n,l){return h.Qa(l,n)};f.prototype.$va=function(n){return this.Kea(n,"HDRPanorama")?this.$da:this.Kea(n,"LivePanorama")?this.ifa:this.Kea(n,"VideoPanorama")?this.q4:this.wia};f.prototype.nO=function(n){(this.pe=this.$va(n))&&this.pe.nO(n)};f.prototype.start=function(n){this.Tf();(this.pe=this.$va(n))&&this.pe.start(n)};f.prototype.gl=function(){if(this.pe)return this.pe.gl()};f.prototype.getTime=function(){return this.pe?this.pe.getTime():
0};f.prototype.play=function(){this.pe&&this.pe.play()};f.prototype.pause=function(){this.pe&&this.pe.pause()};f.prototype.OO=function(){this.pe&&this.pe.OO()};f.prototype.YO=function(){this.pe&&this.pe.YO()};f.prototype.K8=function(){this.pe&&this.pe.K8()};f.prototype.stop=function(){this.pe&&this.pe.stop();this.o(new k(f.Gk,{duration:0,time:0,steps:void 0,selectedStep:void 0}))};f.prototype.end=function(){this.pe&&(this.pe.end(),this.pe=null)};f.prototype.BJ=function(n){this.pe&&this.pe.BJ(n)};
f.prototype.nE=function(n){this.pe&&this.pe.nE(n)};f.prototype.vP=function(){this.pe&&this.pe.vP()};f.prototype.xe=function(n){this.pe&&this.pe.xe(n)};f.prototype.rg=function(n){this.q4.rg(n)};f.prototype.Tf=function(){this.o(new k(f.nc))};f.prototype.qs=function(n){this.o(new k(f.Gk,n.data))};f.prototype.If=function(n){this.o(new k(f.dd,n.data))};f.nc="request frame";f.WQa="frame display";f.XQa="frame hide";f.Gk="time change";f.dd="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"),k=a("tdv/constants/EventName"),p=a("tdv/events/EventDispatcher"),h=a("tdv/view/events/ProgressEvent");a=m.extend(p,function(g){p.call(this);this.m=g;this.ii=this.Aa=null});a.prototype.start=function(g){this.Aa=g;this.ii=this.m.Yf(this.Aa);this.ii.bind(k.ha,this.Ke,this,!0);this.ii.bind(k.wc,this.Ly,
this,!0);this.ii.get("ready")?this.o(k.td,{panorama:this.Aa}):this.ii.bind(k.td,this.E1,this,!0);this.ii.set("loadingActive",!0)};a.prototype.stop=function(){this.Aa=null;this.ii&&(this.ii.h(k.td,this.E1,this),this.ii.h(k.ha,this.Ke,this),this.ii.h(k.wc,this.Ly,this),this.ii.set("loadingActive",!1),this.ii=null,this.o(k.tg))};a.prototype.clear=function(){this.stop()};a.prototype.E1=function(){this.ii.h(k.td,this.E1,this);this.o(k.td,{panorama:this.Aa})};a.prototype.Ke=function(){this.ii.h(k.td,this.E1,
this);this.ii.h(k.ha,this.Ke,this);this.ii.h(k.wc,this.Ly,this);this.ii=null;this.o(k.ha,{panorama:this.Aa});this.Aa=null;this.o(k.tg)};a.prototype.Ly=function(g){this.o(new h(k.wc,g.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,k,p,h,g){var e=function(c){function d(f){var n=c.call(this)||this;n.renderer=f;n.gna=[];n.vW=new Map;n.ag=null;return n}P(d,c);d.prototype.clear=function(){this.o8([])};d.prototype.o8=function(f){f?Array.isArray(f)||(f=[f]):f=[];this.gna.filter(function(n){return!f.includes(n)}).forEach(this.xfb.bind(this));
f.filter(function(n){return!this.gna.includes(n)}.bind(this)).forEach(this.e9a.bind(this));this.gna=f};d.prototype.display=function(f){this.Of(f)};d.prototype.Pe=function(f){this.ag==f&&this.stop()};d.prototype.stop=function(){this.Of(null)};d.prototype.e9a=function(f){var n=new b(this.renderer,f);n.bind(d.dj,this.fX,this,!0);n.Of(this.ag);this.vW.set(f,n)};d.prototype.xfb=function(f){var n=this.vW.get(f);n.h(d.dj,this.fX,this);n.dispose();this.vW.delete(f)};d.prototype.Of=function(f){this.ag!==f&&
(this.ag=f,this.vW.forEach(function(n){n.Of(f)}))};d.prototype.xe=function(){this.vW.forEach(function(f){f.ujb()})};d.prototype.fX=function(f){this.o(new p(d.dj,{yawDelta:f.data.yawDelta}))};d.dj="request yaw change";return d}(h),b=function(c){function d(f,n){var l=c.call(this)||this;l.renderer=f;l.aA=n;l.ag=null;l.fw=null;l.d9a();return l}P(d,c);d.prototype.dispose=function(){this.wfb();this.Of(null)};d.prototype.Of=function(f){this.ag!==f&&(this.lGa(),this.ag=f,this.f9a())};d.prototype.ujb=function(){this.WPa()};
d.prototype.mNa=function(f,n,l){f=f.get("mapLocations",[]);for(var q=0;q<f.length;q++){var r=f[q];if(r.get("map")==n)return r}return l&&f.length>0?f[0]:null};d.prototype.rOa=function(){this.aA.h9a(this.fw);this.aA.bind(g.dj,this.fX,this,!0);this.WPa()};d.prototype.Pcb=function(){this.aA.yfb(this.fw);this.aA.h(g.dj,this.fX,this)};d.prototype.lGa=function(){this.fw&&(this.Pcb(),this.fw=null)};d.prototype.f9a=function(){this.ag&&(this.fw=this.mNa(this.ag,this.aA.get("map",null),!0))&&this.rOa()};d.prototype.WPa=
function(){if(this.fw){var f=this.renderer.Jc(),n=this.renderer.Ic();this.aA.Yq(this.fw,f,n,this.renderer.df())}};d.prototype.d9a=function(){this.aA.bind(k.K("map"),this.kLa,this,!1)};d.prototype.wfb=function(){this.aA.h(k.K("map"),this.kLa,this)};d.prototype.kLa=function(){this.ag&&(this.lGa(),(this.fw=this.mNa(this.ag,this.aA.get("map",null),!1))&&this.rOa())};d.prototype.fX=function(f){this.o(new p(e.dj,{yawDelta:f.data.yawDelta}))};return d}(h);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.MZ=w;this.Bl=null;this.lba={};for(w=0;w<this.MZ.buttons.length;w++)this.lba[this.MZ.buttons[w]]=!1;this.jba=0;this.GC=null;this.BH=[new THREE.Quaternion,new THREE.Quaternion];this.Vl=this.BH[0];this.Qi=[new THREE.Vector3,new THREE.Vector3];this.Pb=this.Qi[0];this.BM=new THREE.Vector3;
this.xH=new THREE.Quaternion;this.fua=0}function k(w,y,x){this.Ucb=w;this.buttons=y;this.gfb=x}function p(){if(!v&&u!=c.vf){u=c.vf;var w=navigator.getGamepads&&navigator.getGamepads();if(w){for(var y=0;y<q.length;y++)q[y].JNa(null);for(y=0;y<w.length;y++){var x=w[y];if(x&&(x.pose||x.yJa)){var z=x.id||x.Blb,A=z+(x.hand?"-"+x.hand:""),D=t[A];if(!D){a:{for(var E=0;E<f.length;E++){var B=f[E];if(z.indexOf(n[B].Ucb)==0){z=B;break a}}z=void 0}z&&q.push(D=t[A]=new m(n[z]))}D&&t[A].JNa(x)}}(w=r)&&!r.Tma()&&
(r=null);for(y=0;y<q.length;y++)if(D=q[y],D.Tma()&&D.pressed()){r=D;break}if(!r)for(y=0;y<q.length;y++)if(D=q[y],D.Tma()){if(D.hand()=="right"){r=D;break}r||(r=D)}w!=r&&e.iE(h)}}}function h(){l.o(g.V)}var g=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(";"),n={};n["oculus go"]=
new k("Oculus Go",["trackpad","trigger"],"trigger");n["oculus touch"]=new k("Oculus Touch","thumbstick trigger grip abutton bbutton surface".split(" "),"trigger");n["xr-standard"]=new k("xr-standard","trigger grip unknow_button_0 thumbstick abutton bbutton unknow_button".split(" "),"trigger");n["gear vr"]=new k("Gear VR",["trackpad","trigger"],"trigger");n.daydream=new k("Daydream Controller",["trackpad","menu","system"],"trackpad");n.vive=new k("OpenVR",["trackpad","trigger","grip","menu","system"],
"trigger");n["vive focus"]=new k("HTC Vive Focus",["trackpad","trigger","grip"],"trigger");n.microsoft=new k("Spatial Controller (Spatial Interaction Source)",["thumbstick","trigger","grip","menu","thumbpad"],"trigger");n.unknown=new k("",[],void 0);m.prototype.JNa=function(w){if(this.Bl=w){this.c_a=this.Bl.hand||this.Bl.Alb;this.Bl.pose&&this.Bl.pose.orientation?(this.GC=this.Bl.pose,this.GC.orientation&&(this.Vl=this.BH[0]==this.Vl?this.BH[1]:this.BH[0],this.Vl.fromArray(this.GC.orientation)),this.GC.position?
(this.Pb=this.Qi[0]==this.Pb?this.Qi[1]:this.Qi[0],this.Pb.fromArray(this.GC.position)):this.Pb=null):this.Bl.yJa&&(this.GC=this.Bl.yJa.transform,this.Vl=this.BH[0]==this.Vl?this.BH[1]:this.BH[0],this.Vl.copy(this.GC.orientation),this.Pb=this.Qi[0]==this.Pb?this.Qi[1]:this.Qi[0],this.Pb.copy(this.GC.position));w=0;for(var y=Math.min(this.Bl.buttons.length,this.Bl.buttons.length);w<y;w++)this.lba[this.MZ.buttons[w]]=this.Bl.buttons[w].pressed;for(w=this.jba=0;w<this.Bl.buttons.length;w++)this.Bl.buttons[w].pressed&&
this.jba++;(w=!!this.BM!=!!this.Pb||this.Pb&&this.BM.x!=this.Pb.x&&this.BM.y!=this.Pb.y&&this.BM.z!=this.Pb.z)&&(this.Pb?this.BM.copy(this.Pb):this.BM.set(0,0,0,0));(y=!!this.xH!=!!this.Vl||this.Vl&&(this.xH.x!=this.Vl.x||this.xH.y!=this.Vl.y||this.xH.z!=this.Vl.z||this.xH.w!=this.Vl.w))&&(this.Vl?this.xH.copy(this.Vl):this.xH.set(0,0,0));if(w||y)this.fua=c.vf}};m.prototype.Tma=function(){return!!this.Bl};m.prototype.qdb=function(){return c.vf-this.fua>500};m.prototype.hand=function(){return this.c_a};
m.prototype.quaternion=function(){return this.Vl};m.prototype.position=function(){return this.Pb};m.prototype.pressed=function(w){w||(w=this.MZ.gfb);return w?this.lba[w]:this.jba>0};var l=new b;l.all=function(){p();return q};l.Lg=function(){p();return r};l.$a="left";l.Cb="right";var q=[],r=null,t={},u=void 0,v=d.Kg("disable-controller",!1);return l});
define("tdv/player/view/util/geo/Line",["require","tdv/player/view/util/geo/Point","tdv/player/view/util/geo/Vector"],function(a){function m(h,g){this.Cg=h||new k(0,0,0);this.wk=g||new k(1,0,0)}var k=a("tdv/player/view/util/geo/Point"),p=a("tdv/player/view/util/geo/Vector");m.prototype.clone=function(){return new m(this.Cg.clone(),this.wk.clone())};m.prototype.apply=function(h){h.AN(this.Cg);h.AN(this.wk)};m.prototype.NIa=function(){return p.vD(this.Cg,this.wk)};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(h,g,e){this.Pa=h||100;this.Ga=g||100;this.fb=e||Math.PI;this.jha=void 0;this.Cu=!0}var k=a("tdv/player/view/util/geo/Line"),p=a("tdv/player/view/util/geo/Point");m.prototype.xJ=function(h){this.fb!=h&&(this.fb=h,this.Cu=!0)};m.prototype.Qz=function(){return this.fb};m.prototype.pOa=function(h){this.Pa!=h&&(this.Pa=h,this.Cu=!0)};m.prototype.Zf=function(){return this.Pa};
m.prototype.KNa=function(h){this.Ga!=h&&(this.Ga=h,this.Cu=!0)};m.prototype.pg=function(){return this.Ga};m.prototype.project=function(h){if(h.z!=0){this.zEa();var g=1/h.z,e=this.jha*g;h.x=this.Pa*.5-h.x*e;h.y=this.Ga*.5-h.y*e;h.z=g}};m.prototype.unproject=function(h){this.zEa();return new k(new p(0,0,0),new p(this.Pa*.5-h.x,this.Ga*.5-h.y,this.jha))};m.prototype.zEa=function(){this.Cu&&(this.jha=this.Pa*.5/Math.tan(this.fb*.5),this.Cu=!1)};return m});
define("tdv/player/view/panorama/renderer/RendererState",["require"],function(){function a(){this.fh=this.pitch=this.Za=0;this.Wi=this.Wd=90;this.Xi=this.Yi=this.height=this.width=100;this.ml=1;this.TI=this.jb=!1;this.Bk=0;this.Lla=this.WU=this.rna=!1;this.RI=this.XW=!0;this.camera=this.tV=this.sV=this.ih=null;this.enabled=!1;this.vf=0;this.TX=void 0}a.prototype.clone=function(){var m=new a;m.Za=this.Za;m.pitch=this.pitch;m.fh=this.fh;m.Wd=this.Wd;m.Wi=this.Wi;m.width=this.width;m.height=this.height;
m.Yi=this.Yi;m.Xi=this.Xi;m.ml=this.ml;m.jb=this.jb;m.TI=this.TI;m.Bk=this.Bk;m.rna=this.rna;m.Lla=this.Lla;m.WU=this.WU;m.XW=this.XW;m.RI=this.RI;m.ih=this.ih;m.sV=this.sV;m.tV=this.tV;m.camera=this.camera;m.enabled=this.enabled;m.vf=this.vf;m.TX=this.TX;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"),k=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),p=a("tdv/player/view/panorama/renderer/3d/util/Util");return function(h){var g=1,e=new THREE.WebGLCubeRenderTarget(1024),b=new THREE.CubeCamera(.1,1E4,e);b.layers.enable(k.Hw);b.layers.enable(k.$a);
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.$Ra;var d=new THREE.Matrix4;this.DJ=function(n){g=n};this.start=function(n){n.add(c);n.add(b);n.traverse(function(l){l.layers.test(b.layers)&&(l.userData.bna=l.layers.mask,l.layers.mask=b.layers.mask)});b.visible=!0;c.visible=!0;h.setClearColor(16777215,1)};this.stop=function(n){h.setClearColor(0,0);n.traverse(function(l){l.userData.bna!==
void 0&&(l.layers.mask=l.userData.bna,delete l.userData.bna)});b.visible=!1;c.visible=!1;n.remove(c);n.remove(b)};var f=0;this.render=function(n,l){g>0&&(c.matrix.copy(l.matrixWorld),c.matrix.multiply(d.makeTranslation(0,0,-g*5)),c.matrixWorldNeedsUpdate=!0,f++,p.jdb()&&f%10!=0||(p.cgb(),c.visible=!1,b.update(h,n),c.visible=!0))}}});
define("tdv/player/view/panorama/renderer/3d/Renderer","require 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(n){this.R=n;this.yc=new THREE.PerspectiveCamera(90,
16/9,.1,2*e.jh);this.yc.layers.enable(h.$a);this.Eu=new THREE.PerspectiveCamera;this.zb=new THREE.Scene;this.Qua=new THREE.Scene;this.Rua=new THREE.Scene;this.zb.add(this.yc);this.Qp=this.Cia=this.$Z=this.ZZ=this.m=null;this.oya=this.Xba=!1}var k=a("tdv/player/view/util/geo/Fov"),p=a("tdv/player/view/util/geo/Quaternion"),h=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),g=a("tdv/player/view/panorama/renderer/3d/util/StereographicEffect"),e=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
b=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),c=a("tdv/player/view/panorama/renderer/3d/util/Util"),d=a("tdv/player/view/util/XR");m.prototype.Rab=function(){this.DVa()};m.prototype.Dn=function(){return this.m};m.prototype.Mf=function(){return this.zb};m.prototype.getCamera=function(){return this.Eu};m.prototype.st=function(){return d.isPresenting&&d.Dg==this.m&&d.qA==this.zb};m.prototype.abb=function(){return this.Eu.isArrayCamera&&this.Eu.cameras.length>0?Math.atan2(1,this.Eu.cameras[0].projectionMatrix.elements[5])*
2*f:this.Eu.fov};m.prototype.getPixelRatio=function(){return this.m?this.m.getPixelRatio():c.getPixelRatio()};m.prototype.dbb=function(){return d.isPresenting&&d.framebufferWidth?d.framebufferWidth*.5:this.m?this.m.domElement.width:1024};m.prototype.cbb=function(){return d.isPresenting&&d.framebufferHeight?d.framebufferHeight:this.m?this.m.domElement.height:1024};m.prototype.zg=function(){return this.m.domElement};m.prototype.update=function(n){this.a8a(n);this.A7a(n);this.Qs(n)};m.prototype.Pka=
function(n){this.m.zn=!0;n=c.aab(n);var l=new THREE.CubeCamera(this.Eu.near,this.Eu.far,n);this.zb.add(l);l.position.setFromMatrixPosition(this.Eu.matrixWorld);l.update(this.m,this.zb);this.zb.remove(l);this.m.zn=!1;return n.texture};m.prototype.render=function(){this.D2()};m.prototype.a8a=function(n){n.enabled&&(this.m||this.E5a(n),n.jb&&d.getType()==d.kx.eo&&(this.oya=!0));this.oDa==n.width&&this.nDa==n.height||this.m.setSize(this.oDa=n.width,this.nDa=n.height);if(this.Xba=n.enabled&&!n.jb)this.ZZ.setSize(n.width,
n.height),this.$Z.setSize(n.width,n.height)};m.prototype.E5a=function(n){!this.m&&n.enabled&&(this.R.Sc().D4(),this.ZZ=this.R.Sc().Zab(),this.m=this.R.Sc().Dn(),n=this.m.getSize(new THREE.Vector2),this.oDa=n.width,this.nDa=n.height,this.$Z=this.R.Sc().$ab(),this.Cia=new g(this.m,this.yc))};m.prototype.DVa=function(){this.m&&(this.ZZ=this.m=this.$Z=this.Qp=null,this.R.Sc().Y7())};m.prototype.Qs=function(n){n.jb?this.Eu=this.m.xr.getCamera():(this.yc.quaternion.copy(p.KHa(n.Za,n.pitch,n.fh)),this.yc.fov=
k.qm(n.Wd,n.width,n.height),this.yc.aspect=n.width/n.height,this.yc.updateProjectionMatrix(),this.yc.updateMatrixWorld(),this.Eu=this.yc);b.bgb(this.zb,this.st()?this.m.xr.getCamera().cameras:[this.yc]);this.zb.Mlb===!0&&this.zb.updateMatrixWorld()};m.prototype.A7a=function(n){var l=!n.jb&&n.Bk>0?this.Cia:null;this.Qp!=l&&(this.Qp&&this.Qp.stop(this.zb),(this.Qp=l)&&this.Qp.start(this.zb));this.Qp&&this.Qp==this.Cia&&this.Qp.DJ(n.Bk)};m.prototype.D2=function(){this.oya&&this.m.resetState();this.Qp&&
this.Qp.render(this.zb,this.yc);this.m.render(this.zb,this.yc);this.Xba&&(this.ZZ.render(this.Qua,this.yc),this.$Z.render(this.Rua,this.yc))};var f=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"),
k=a("tdv/player/view/panorama/renderer/object/Base"),p=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),h=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),g=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(k,function(){k.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.qfa=new h.Cp);this.Ix&&this.Ix();this.eG&&this.eG();this.JB&&this.JB();this.Op&&this.Op()});a.prototype.ec=function(){k.prototype.ec.call(this);this.gq&&this.gq();this.TR&&this.TR();this.uM&&this.uM()};a.prototype.kc=function(){this.QL&&this.QL();this.wM&&this.wM();this.iq&&this.iq();g.dispose(this.get("meshGroup"));g.Aw(this.get("meshGroup"),null);this.set("meshGroup",
null);k.prototype.kc.call(this)};a.prototype.ya=function(d){this.Vf&&this.Vf(d);k.prototype.ya.call(this,d);this.set("camera",e.getCamera(d.ih));this.set("webglScene",d.ih);this.get("meshGroup")||(this.set("meshGroup",g.HGa(this.Np())),this.get("meshGroup").userData.Peb=this);this.W("webglScene","meshGroup")&&g.Aw(this.get("meshGroup"),this.get("webglScene"));this.wn();this.Ij&&this.Ij(d);this.m8a();this.rz&&this.rz(d);this.Aq&&this.Aq(d);this.cI();this.W("loadingActive","meshGroup")&&b.Ua(this.get("meshGroup"),
this.get("loadingActive"));this.W("blendingActive","meshGroup")&&c.wNa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.wn=function(){this.W("composedAlpha","meshGroup")&&this.tB()};a.prototype.tB=function(){g.zf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.m8a=function(){if(this.W("textureSource")||this.W("materialConfig")&&!this.qfa.isEqual(this.get("materialConfig"))){var d=this.tL();d&&(g.Sgb(d,this.DQ()),this.tB())}};a.prototype.cI=function(){if(this.W("index",
"meshGroup")){var d=this.get("meshGroup");d&&d.children.forEach(function(f,n,l){g.C8(f,this.get("index")+n/l.length)}.bind(this))}};a.prototype.DQ=function(){var d=this.get("textureSource")||new p;this.qfa=this.get("materialConfig");var f=h.lm(d.texture(),this.qfa);b.fP(f,d);return[f]};a.prototype.Iua=function(){var d=new p,f=h.lm(d.texture());b.fP(f,d);return[f]};a.prototype.$x=function(d){return g.ybb(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"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/view/util/Scale"),g=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{Ix: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.Fh=this.IB();this.li=new THREE.Matrix4;this.ie=new THREE.Matrix4;this.hq=new THREE.Matrix4;this.yo=new THREE.Matrix4;this.gk=new THREE.Matrix4;this.$aa=new THREE.Matrix4;this.Cta=new THREE.Quaternion;this.Cua=new THREE.Matrix4;this.nQ=new THREE.Matrix4;this.zQ=new THREE.Matrix4;this.AB=new THREE.Matrix4;
this.Fi=new THREE.Matrix4},rz:function(n){this.Ss(n);this.Qja()},Qja:function(){if(this.W("hfov","vfov","contentWidth","contentHeight","panoramaPixelsPerDegree","scaleMode","horizontalAlign","verticalAlign")){var n=h.hma(this.get("hfov"),this.get("vfov"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("panoramaPixelsPerDegree"),this.get("horizontalAlign"),this.get("verticalAlign"));n=k.aOa(this.Fh[1],n.ZX,n.iY,n.HA,n.KA);this.Fh[1]!=n&&(this.Fh[1]=n,(n=this.tL())&&
p.Toa(n,this.Fh[1]))}},tL:function(){var n=this.get("meshGroup");return n?p.om(n)[1]:null},Np:function(){return[0,1].map(function(n){var l=n==0?this.Iua():this.DQ();n=p.create(this.Fh[n],l);g.yA(n,g.qr);g.zA(n,g.ju);g.zJ(n,m.SP);g.LX(n,1);return n}.bind(this))},IB:function(){return[k.RN(),k.RN()]},Ss:function(n){var l=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.li.makeTranslation(-this.get("composedTranslationX")*.5*k.jh,this.get("composedTranslationY")*
.5*k.jh,this.get("composedTranslationZ")*.5*k.jh),l=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ie.makeRotationY(-n.Za*f),this.ie.multiply(d.makeRotationX(-this.get("composedDeltaPitch")*f)),this.ie.multiply(d.makeRotationY(this.get("composedDeltaYaw")*f)),this.ie.multiply(d.makeRotationY(n.Za*f)),l=!0);this.W("yaw","pitch")&&(this.hq.makeRotationY(-this.get("yaw")*f),this.hq.multiply(d.makeRotationX(this.get("pitch")*f)),l=!0);if(this.W("distance","flipHorizontally",
"scale","hfov","vfov","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign","composedTranslationX","composedTranslationY","composedTranslationZ")){var q=this.Ha.get("composedTranslationX")==0&&this.Ha.get("composedTranslationY")==0&&this.Ha.get("composedTranslationZ")==0&&this.get("distance")!==void 0?k.Vv(this.get("distance")):k.mt();this.yo.makeTranslation(0,0,-q);var r=this.get("contentWidth"),t=this.get("contentHeight"),u=this.get("hfov"),v=this.get("vfov")||e.qm(u,r,t),
w=(this.get("flipHorizontally")?-1:1)*this.get("scale"),y=this.get("scale"),x=this.get("scaleMode"),z=this.get("panoramaPixelsPerDegree");l=this.get("horizontalAlign")||c.Xe;var A=this.get("verticalAlign")||c.Pd;r=h.hma(u,v,r,t,x,z,l,A);u=w*k.ima(q,u);v=y*k.jma(q,v);this.nQ.makeScale(u,v,1);w*=k.ima(q,r.Wd);q=y*k.jma(q,r.Ek);this.zQ.makeScale(w,q,1);this.Cua.makeTranslation(l==c.$a?-(u-w)*.5:l==c.Cb?(u-w)*.5:0,A==c.Tc?(v-q)*.5:A==c.Fc?-(v-q)*.5:0,0);l=!0}this.W("rotationX","rotationY","rotationZ",
"roll")&&(this.gk.makeRotationZ(this.get("roll")*f),this.gk.multiply(d.makeRotationY(this.get("rotationY")*f)),this.gk.multiply(d.makeRotationX(this.get("rotationX")*f)),this.gk.multiply(d.makeRotationZ(this.get("rotationZ")*f)),l=!0);this.set("cameraYaw",n.Za);this.set("cameraPitch",n.pitch);this.set("cameraRoll",n.fh);this.get("attachToCamera")&&this.W("cameraYaw","cameraPitch","cameraRoll")?(this.Cta.copy(b.KHa(n.Za,n.pitch,n.fh)),this.$aa.makeRotationFromQuaternion(this.Cta),l=!0):this.W("attachToCamera")&&
(this.$aa.identity(),l=!0);if(l||this.W("meshGroup"))this.Fi.copy(this.li),this.Fi.multiply(this.ie),this.Fi.multiply(this.$aa),this.Fi.multiply(this.hq),this.Fi.multiply(this.yo),this.Fi.multiply(this.gk),this.AB.copy(this.Fi),this.AB.multiply(this.nQ),this.Fi.multiply(this.Cua),this.Fi.multiply(this.zQ),n=p.om(this.get("meshGroup")),p.ct(n[0],this.AB),p.ct(n[1],this.Fi)}}});
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"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject");a=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin");return m.extend(k,a,function(){k.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?k(v,t,Math.abs(1/(1500*q))):k(v,t,.08)}function k(q,r,t){q=(r-q)*(1-t);Math.abs(q)<1E-5&&(q=0);return r-q}var p=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),g=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"),n=a("tdv/player/view/util/ColorPicker"),l=a("tdv/view/events/ProgressEvent");a=p.extend(b,function(q){b.call(this);this.C=q;this.Il.push(this.C);this.Ig=this.Ig.bind(this);this.Lf=e.Qa("CeilingCapPanoramaOverlay",this.C)?"ceiling":"tripod";this.set("tag","Cap");this.set("pitch",this.Lf=="tripod"?-90:90);this.zd=!1;this.yH=this.hha=this.cv=void 0;this.J2a=this.Lf=="tripod"?1:-1;this.yl=this.Ul=this.Hh=null});a.prototype.ec=function(){b.prototype.ec.call(this);
this.Hh=(new d(g.ha)).bo(this.gs.bind(this));this.Ul=(new d(g.wc)).Pq(this.gH.bind(this));h.ba(this.C,"angle distance hfov image.levels.url inertia rotate".split(" "),this.Ig,!0)};a.prototype.kc=function(){this.yl&&this.yl.dispose();this.yl=null;this.Hh.dispose();this.Ul.dispose();h.ca(this.C,"angle distance hfov image.levels.url inertia rotate".split(" "),this.Ig);b.prototype.kc.call(this)};a.prototype.Ig=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.ebb(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.Np=function(){var q=b.prototype.Np.call(this);this.Hh.bg(q);this.Ul.bg(q);return q};a.prototype.ya=function(q){this.xja();this.jN(q);b.prototype.ya.call(this,q)};a.prototype.xja=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.gs=function(){this.o(g.td);this.o(g.ha)};a.prototype.gH=function(q,r){var t=0;r.Qv(function(u){(u=r.Gn(u))&&(t+=u.percent)});this.o(new l(g.wc,t/r.wd.length))};a.prototype.jN=function(q){this.set("rendererYaw",q.Za);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.J2a*q.Za;t&&(r+=v);var w=0,y=r-v;this.cv!==void 0&&(u&&(t?(w=m(v,this.yH,r,this.cv,this.hha,q.vf),r=this.cv+w*q.vf):(w=m(v,this.yH,y,this.bBa,this.hha,q.vf),y=this.bBa+w*q.vf,r=y+v)),this.cv!=r&&this.Ma());this.bBa=y;this.cv=r;this.hha=w;this.yH=v;this.set("rotationZ",-r)}};a.prototype.Un=function(q){if(q.Rf==g.Gm){var r=!q.km()&&this.Ms(q);r&&(q.gD(this.C),this.C.get("useHandCursor")&&q.kI(this.C),q.gm(this.get("distance")));this.zd!=
r&&(this.zd=r,this.C.o(this.zd?g.rc:g.Db),q.ew()&&this.C.o(this.zd?g.lF:g.sr))}else q.Rf==g.Pf&&!q.km()&&this.Ms(q)&&(this.C.gO(g.oa,!0).length>1&&q.Nt(this.C),q.gm(this.get("distance")),this.C.o(g.oa))};a.prototype.Ms=function(q){return this.$x(q.Cs).some(function(r){var t=this.JYa();return t&&t.DA(r.x,r.y)}.bind(this))};a.prototype.JYa=function(){if(this.yl)return this.yl;var q=this.get("textureSource");if(q=q&&q.qg())this.yl=new n(q);return this.yl};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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/util/XR");a=m.extend(h,function(){h.call(this);this.li=new THREE.Matrix4;this.PEa=!1;this.tj=new THREE.Matrix4;
this.Vg=null;this.mn=new THREE.Matrix4;this.wT=this.jT=0;this.gQ=.75;this.KQ=.5;this.Qu=4;this.ufa=0;this.Ru=-2;this.cs=3;this.F0=0;this.pG=7;this.cT=this.DC=1;this.ZR=.15;this.qG=this.pH=0;this.$_=this.l2=p.aa;this.C3=this.w3=1E3});var e=Math.PI/180,b=new THREE.Matrix4;a.prototype.ro=function(){};a.prototype.ec=function(){h.prototype.ec.call(this);this.o(k.td);this.o(k.ha)};a.prototype.kc=function(){this.yba()};a.prototype.Ll=function(){this.ro();this.AT()};a.prototype.Ml=function(){this.Ma()};a.prototype.AT=
function(){this.Vg&&(this.yba(),this.Kua())};a.prototype.UZ=function(){};a.prototype.Kua=function(){this.A3a();this.Vg=new THREE.Group;for(var c=this.$_==p.PLAYING,d=this.pH,f=this.qG;f+d>0;){var n=Math.random()*(f+d)<=f;n?f--:d--;var l=this.UZ();l.matrixAutoUpdate=!1;l.overdraw=!1;l.material.opacity=0;l.userData={Hab:n,UO:new THREE.Matrix4,xFa:new THREE.Matrix4,Doa:new THREE.Matrix4,y:void 0,zQa:void 0,fE:c};this.Vg.add(l);c&&this.Jha(l,this.Ru,this.cs);this.y3a(l)}this.jT=c?this.Vg.children.length:
0;this.kka.add(this.Vg);this.Bta()};a.prototype.yba=function(){if(this.Vg){this.Vg.parent&&this.Vg.parent.remove(this.Vg);for(var c=0,d=this.Vg&&this.Vg.children.length;c<d;c++)this.Vg.children[c].material.dispose();this.Vg=null;this.wT=0}};a.prototype.A3a=function(){this.mn=(new THREE.Matrix4).makeScale(this.DC,this.DC,this.DC)};a.prototype.Jha=function(c,d,f){d+=Math.random()*(f-d);if(c.userData.Hab){f=this.pG;var n=360*Math.random()*e;c.userData.UO.makeTranslation(f*Math.cos(n),d,f*Math.sin(n))}else f=
Math.random()*2*Math.PI,n=this.ufa+(this.Qu-this.ufa)*Math.sqrt(Math.random()),c.userData.UO.makeTranslation(n*Math.cos(f),d,n*Math.sin(f));c.userData.UO.multiply(this.mn);c.userData.y=d};a.prototype.y3a=function(c){var d=this.ZR+Math.random()*(this.ZG-this.ZR);do var f=Math.random()*this.F0;while(f>80&&f<100);var n=Math.random()*360,l=Math.sin(n*e)*Math.sin(f*e)*d,q=-Math.cos(f*e)*d;d*=Math.cos(n*e)*Math.sin(f*e);c.userData.zQa=q*this.DC;c.userData.xFa.makeTranslation(l,q,d);c.userData.Doa.makeRotationY(n*
e);c.userData.Doa.multiply(b.makeRotationX(-f*e))};a.prototype.ya=function(c){h.prototype.ya.call(this,c);this.t7a(c);this.kka=c.ih;this.kka!=(this.Vg&&this.Vg.parent)?(this.yba(),this.kka&&this.Kua()):this.W("index")&&this.Bta();this.U7a(c)};a.prototype.t7a=function(c){c=c.jb&&g.getType()==g.kx.eo;c!=this.dxa&&(this.dxa=c)&&setTimeout(function(){this.Vg&&this.AT()}.bind(this),0)};a.prototype.U7a=function(c){if(this.Vg){this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&
(this.PEa=this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0,this.li.makeTranslation(-this.get("composedTranslationX")*this.Qu,this.get("composedTranslationY")*this.Qu,this.get("composedTranslationZ")*this.Qu));var d=this.l2==p.PLAYING,f=this.Vg.children,n=f.length,l=d?Math.round(n*c.vf/this.w3):0;if(this.jT+l>0){this.wT=d?0:Math.min(this.jT,this.wT+Math.round(n*c.vf/this.C3));c=this.get("composedAlpha");for(d=0;d<n;d++){var q=f[d];if(!q.userData.fE)if(l>
0)l--,q.userData.fE=!0,this.jT++,this.Jha(q,this.cs,this.cs+(this.cs-this.Ru));else continue;q.userData.UO.multiply(q.userData.xFa);q.userData.y+=q.userData.zQa;if(q.userData.y<this.Ru||q.userData.y>this.cs){if(this.wT>0){this.wT--;q.userData.fE=!1;this.jT--;q.material.opacity=0;continue}var r=q.userData.y<this.Ru?this.cs:this.Ru;this.Jha(q,r,r)}r=c;q.userData.y<this.Ru+this.KQ?r*=(q.userData.y-this.Ru)/this.KQ:q.userData.y>this.cs-this.gQ&&(r*=(this.cs-q.userData.y)/this.gQ);q.material.opacity=r*
this.cT;this.PEa?(q.matrix.copy(this.li),q.matrix.multiply(q.userData.UO)):q.matrix.copy(q.userData.UO);q.matrix.multiply(q.userData.Doa);q.matrixWorldNeedsUpdate=!0}this.Ma()}}};a.prototype.Bta=function(){if(this.Vg)for(var c=this.get("index"),d=0;d<this.Vg.children.length;d++)this.Vg.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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),g=a("tdv/player/view/util/Color"),e=a("tdv/player/view/util/Device");a=m.extend(h,
function(c){h.call(this);this.C=c;this.Ll=this.Ll.bind(this);this.Ml=this.Ml.bind(this);this.ro()});a.prototype.ec=function(){h.prototype.ec.call(this);this.C.set("state",this.C.get("startState"));k.ba(this.C,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),this.Ll,!0);k.ba(this.C,["state"],this.Ml,!0)};a.prototype.kc=function(){k.ca(this.C,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),
this.Ll);k.ca(this.C,["state"],this.Ml);this.C.set("state",p.aa);h.prototype.kc.call(this)};a.prototype.Ll=function(){this.ro();this.AT()};a.prototype.Ml=function(){this.l2=this.C.get("state");this.Ma()};a.prototype.ro=function(){h.prototype.ro.call(this);var c=e.yb()||e.Rb()==e.Iw?2500:e.$f()?4E3:5E3;this.ZR=this.ZG=this.C.get("speed",.2)*.2;this.Qu=this.C.get("distance",.5)*14.5+.5;this.cT=this.C.get("opacity",.1)*1;this.DC=.036;this.pH=this.C.get("intensity",.1)*c;this.Ie=g.qp(this.C.get("color",
"#ffffff"));this.qG=0;this.pG=15;this.$_=this.C.get("initialState");this.w3=this.C.get("startDuration");this.C3=this.C.get("stopDuration");this.gQ=.75;this.KQ=.5;this.Ru=-2;this.cs=4;this.F0=180;this.nva()};a.prototype.UZ=function(){return new THREE.Sprite(this.Jx())};a.prototype.Jx=function(){var c=new THREE.SpriteMaterial;c.map=this.Or();c.side=THREE.FrontSide;c.transparent=!0;c.depthTest=!1;c.needsUpdate=!0;return c};a.prototype.Or=function(){if(this.La)return this.La;var c=document.createElement("canvas");
c.width=c.height=b;this.La=new THREE.Texture;this.La.colorSpace=THREE.SRGBColorSpace;this.La.image=c;this.La.needsUpdate=!0;this.nva();return this.La};a.prototype.nva=function(){if(this.La){var c=this.La.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.Ie[0]+", "+this.Ie[1]+", "+this.Ie[2]+", 1)");f.addColorStop(1,"rgba("+this.Ie[0]+", "+this.Ie[1]+", "+this.Ie[2]+", 0)");d.fillStyle=f;d.clearRect(0,
0,c.width,c.height);d.fillRect(0,0,c.width,c.height);this.La.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"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),
h=a("tdv/view/util/Scale"),g=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/view/constants/Alignment"),b=new THREE.Matrix4,c=Math.PI/180;return{Ix: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.Fh=this.IB();this.li=new THREE.Matrix4;this.ie=new THREE.Matrix4;this.hq=new THREE.Matrix4;this.yo=new THREE.Matrix4;this.RK=new THREE.Matrix4;this.NM=new THREE.Matrix4;this.Lta=new THREE.Matrix4;this.gk=new THREE.Matrix4;this.Fua=new THREE.Matrix4;this.nQ=new THREE.Matrix4;this.zQ=new THREE.Matrix4;this.AB=new THREE.Matrix4;this.Fi=new THREE.Matrix4;this.TK=new THREE.Matrix4;this.XF=new THREE.Vector3},rz:function(d){this.Ss(d);this.Qja()},Qja:function(){if(this.W("width",
"height","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign")){var d=h.P5(this.get("width"),this.get("height"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("horizontalAlign"),this.get("verticalAlign"));d=k.aOa(this.Fh[1],d.ZX,d.iY,d.HA,d.KA);this.Fh[1]!=d&&(this.Fh[1]=d,(d=this.tL())&&p.Toa(d,this.Fh[1]))}},tL:function(){var d=this.get("meshGroup");return d?p.om(d)[1]:null},Np:function(){return[0,1].map(function(d){var f=d==0?this.Iua():
this.DQ();d=p.create(this.Fh[d],f);g.yA(d,g.qr);g.zA(d,g.ju);g.zJ(d,m.SP);g.LX(d,1);return d}.bind(this))},IB:function(){return[k.RN(),k.RN()]},Ss:function(d){var f=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.li.makeTranslation(-this.get("composedTranslationX")*.5*k.jh,this.get("composedTranslationY")*.5*k.jh,this.get("composedTranslationZ")*.5*k.jh),f=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ie.makeRotationY(-d.Za*c),
this.ie.multiply(b.makeRotationX(-this.get("composedDeltaPitch")*c)),this.ie.multiply(b.makeRotationY(this.get("composedDeltaYaw")*c)),this.ie.multiply(b.makeRotationY(d.Za*c)),f=!0);this.W("yaw","pitch")&&(this.hq.makeRotationY(-this.get("yaw")*c),this.hq.multiply(b.makeRotationX(this.get("pitch")*c)),f=!0);if(this.W("distance","composedTranslationX","composedTranslationY","composedTranslationZ")){var n=this.get("composedTranslationX")==0&&this.get("composedTranslationY")==0&&this.get("composedTranslationZ")==
0&&this.get("distance")!==void 0;this.set("z",n?k.Vv(this.get("distance")):k.mt())}this.W("z")&&(this.yo.makeTranslation(0,0,-this.get("z")),f=!0);f&&(this.TK.copy(this.li),this.TK.multiply(this.ie),this.TK.multiply(this.hq),this.TK.multiply(this.yo));n=!1;this.set("rendererYaw",d.Za);this.set("rendererPitch",d.pitch);this.set("rendererRoll",d.fh);this.set("rendererCameraFOV",d.Wi);this.set("rendererWidth",d.width);this.set("rendererHeight",d.height);d.Wi&&this.W("z","rendererCameraFOV")&&this.set("rendererHeightZ",
Math.tan(d.Wi*c*.5)*this.get("z")*2);if(d.Wi&&(f||this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","rendererHeightZ","inVR"))){if(d.jb)this.RK.copy(this.TK),this.NM.identity();else{n=d.camera;this.RK.copy(n.matrixWorld);this.XF.setFromMatrixPosition(n.matrixWorld);this.XF.applyMatrix4(this.TK);this.XF.applyMatrix4(n.matrixWorldInverse);var l=-10,q=-10;this.XF.z<0&&(this.XF.applyMatrix4(n.projectionMatrix),l=this.XF.x*.5,q=this.XF.y*.5);var r=
this.get("rendererHeightZ");this.NM.makeTranslation(r*n.aspect*l,q*r,0)}n=!0}this.W("roll")&&(this.gk.makeRotationZ(this.get("roll")*c),n=!0);if(d.Wi&&(f||this.W("rendererHeight","inVR","rendererHeightZ","width","height","contentWidth","contentHeight","scale","scaleMode","horizontalAlign","verticalAlign","flipHorizontally","offsetX","offsetY"))){f=d.jb?1024:d.height;n=this.get("scale")*this.get("rendererHeightZ")/f*(d.jb?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");l=(this.get("flipHorizontally")?-1:1)*n;var y=this.get("scaleMode");d=this.get("horizontalAlign")||e.Xe;f=this.get("verticalAlign")||e.Pd;y=h.P5(t,q,v,w,y,d,f);v=l*t;w=n*q;this.nQ.makeScale(v,w,1);t=l*(t*.5-u);q=n*(r-q*.5);this.Lta.makeTranslation(t,q,0);l*=y.width;n*=y.height;this.zQ.makeScale(l,n,1);this.Fua.makeTranslation((d==e.$a?-(v-l)*.5:d==e.Cb?(v-l)*.5:0)+t,(f==e.Tc?(w-n)*.5:f==e.Fc?-(w-n)*.5:0)+q,0);n=!0}n&&
(this.Fi.copy(this.RK),this.Fi.multiply(this.yo),this.Fi.multiply(this.NM),this.Fi.multiply(this.gk),this.AB.copy(this.Fi),this.AB.multiply(this.Lta),this.AB.multiply(this.nQ),this.Fi.multiply(this.Fua),this.Fi.multiply(this.zQ),d=p.om(this.get("meshGroup")),p.ct(d[0],this.AB),p.ct(d[1],this.Fi))}}});
define("tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(h,g){this.Qd=h;this.Gc=g;this.Md=!1;this.Caa();this.Faa();this.hH()}var k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.sha();this.yha();this.Qd.get("autoplay")||this.Qd.set("state",p.aa);this.Qd=null;this.Gc.Yc(p.aa);this.Gc=null};m.prototype.cg=function(h){this.Md!=h&&(this.Md=
h,this.yv())};m.prototype.hH=function(){this.Gc.Yc(this.Qd.get("state"))};m.prototype.vS=function(){this.yv()};m.prototype.xS=function(){this.Gc.Soa(this.Qd.get("frameDuration"))};m.prototype.wS=function(){this.Gc.FNa(this.Qd.get("finalFrame")=="first")};m.prototype.tS=function(){this.Qd.o(k.yr)};m.prototype.sS=function(){this.Qd.o(k.Qb)};m.prototype.uS=function(){this.Qd.set("state",this.Gc.getState())};m.prototype.yv=function(){this.Qd.get("autoplay")&&this.Gc.Yc(this.Md?p.PLAYING:p.aa)};m.prototype.Caa=
function(){this.Qd.bind(k.K("state"),this.hH,this,!0);this.Qd.bind(k.K("autoplay"),this.vS,this,!0);this.Qd.bind(k.K("frameDuration"),this.xS,this,!0);this.Qd.bind(k.K("finalFrame"),this.wS,this,!0)};m.prototype.sha=function(){this.Qd.h(k.K("state"),this.hH,this,!0);this.Qd.h(k.K("autoplay"),this.vS,this,!0);this.Qd.h(k.K("frameDuration"),this.xS,this,!0);this.Qd.h(k.K("finalFrame"),this.wS,this,!0)};m.prototype.Faa=function(){this.Gc.bind(k.yr,this.tS,this,!0);this.Gc.bind(k.Qb,this.sS,this,!0);
this.Gc.bind(k.Ye,this.uS,this,!0)};m.prototype.yha=function(){this.Gc.h(k.yr,this.tS,this,!0);this.Gc.h(k.Qb,this.sS,this,!0);this.Gc.h(k.Ye,this.uS,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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/constants/Priority"),g=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"),
n=a("tdv/player/view/util/ColorPicker"),l=a("tdv/view/images/ImageAnimation");return{eG: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.f1=
this.f1.bind(this);this.i1=this.i1.bind(this);this.Gc=null;this.Exa=-1;this.yl=this.gb=this.Lp=null},Ij:function(q){this.xja(q);this.$C(q);this.$7a(q)},xja: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.mua(),this.gb=this.get("image"),this.pb=this.get("level"),this.set("textureSource",new d(this.gb&&this.pb.get("url"))),this.set("premultipliedAlpha",this.gb&&this.pb.get("premultipliedAlpha")),
this.get("textureSource").ygb(this.get("premultipliedAlpha")),this.QTa(),this.gb?(this.BTa(),this.ETa()):(this.o(k.td),this.o(k.ha)));(r=this.get("textureSource"))&&r.Yoa(q.Bk>0);this.W("textureSource","isVideoTexture")&&r&&r.xX(this.get("isVideoTexture"))},$C:function(){if(this.W("blending","chromaColor","chromaThreshold","chromaSmoothing","premultipliedAlpha","side")){var q=new e.Cp;q.lD=this.get("blending");q.Hv=this.get("chromaColor");q.nV=this.get("chromaThreshold");q.mV=this.get("chromaSmoothing");
q.premultipliedAlpha=this.get("premultipliedAlpha");q.side=this.get("side");this.set("materialConfig",q)}},$7a:function(){if(this.W("meshGroup","projected","visible")){var q=this.get("projected")&&this.get("visible")?h.R$:h.SP;b.om(this.get("meshGroup")).forEach(function(r){f.zJ(r,q)}.bind(this))}},wn:function(){this.W("visible","composedAlpha","image","state","visibleOnStop")&&this.set("inView",this.get("visible")&&this.get("composedAlpha")>0&&(this.get("visibleOnStop")||this.get("state")!=p.aa));
this.W("composedAlpha","meshGroup","inView")&&b.zf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0);this.Lp&&this.Lp.cg(this.get("inView"))},f1:function(){this.gb&&g.Qa("AnimatedImageResource",this.gb)?this.set("visibleOnStop",this.gb.get("visibleOnStop")):this.set("visibleOnStop",!0)},i1:function(){this.set("levelURL",this.pb.get("url"))},QL:function(){this.mua()},mua:function(){this.Lp&&(this.Lp.clear(),this.Lp=null);this.Gc&&(this.Gc.h(k.V,this.rR,this,!0),this.Gc.h(k.Ye,this.axa,
this,!0),this.Gc.clear(),this.Gc=null);this.yl&&(this.yl.dispose(),this.yl=null);this.get("textureSource")&&(this.Bha(),this.set("textureSource",null));this.gb&&(this.g3a(),this.gb=null);this.pb&&(this.j3a(),this.pb=null)},BTa:function(){m.ba(this.gb,["visibleOnStop"],this.f1,!0)},g3a:function(){m.ca(this.gb,["visibleOnStop"],this.f1)},ETa:function(){m.ba(this.pb,["url"],this.i1,!0)},j3a:function(){m.ca(this.pb,["url"],this.i1)},bxa:function(){this.Bha();var q=this.get("image");if(g.Qa("AnimatedImageResource",
q)){this.Gc=new l(this.get("textureSource").qg(),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.Gc.zg();this.Gc.bind(k.Ye,this.axa,this,!0);this.Gc.bind(k.V,this.rR,this,!0);this.Lp=new c(q,this.Gc);this.set("visibleOnStop",q.get("visibleOnStop"));this.set("state",this.Gc.getState())}else r=this.get("textureSource").qg(),this.yl=new n(r),this.set("visibleOnStop",!0),
this.set("state",null);this.wn();this.set("contentWidth",r.width);this.set("contentHeight",r.height);this.get("textureSource").Vn(r);this.o(k.td);this.o(k.ha)},cxa:function(){this.Bha();this.o(k.td);this.o(k.ha)},axa:function(){this.set("state",this.Gc.getState())},rR: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.Exa>q;this.Exa=q;this.get("textureSource").update(!u||
r||t);this.Ma()},QTa:function(){var q=this.get("textureSource");q.bind(k.ha,this.bxa,this,!0);q.bind(k.$c,this.cxa,this,!0)},Bha:function(){var q=this.get("textureSource");q.h(k.ha,this.bxa,this,!0);q.h(k.$c,this.cxa,this,!0)},Gda:function(q){return this.yl&&this.yl.Xg==q.source?this.yl.info(q.x,q.y):n.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 k(d){d=d.get("mapColor");return d!="image"&&d!="transparent"&&d!="any"}var p=a("tdv/binding/BindingsHandler"),h=a("tdv/constants/EventName"),g=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{JB:function(){this.set("beamEnabled",!1);this.e1=this.e1.bind(this);this.Q_=null;this.GK={};this.jj=[];this.yu=[];this.iy=null},zgb:function(d){this.iy!=d&&(this.tha(),this.iy=d,this.eta())},Aq:function(d){this.KC=d.Za;this.JC=d.pitch},tha:function(){this.iy&&p.ca(this.iy,["areas"],this.e1)},eta:function(){this.iy&&p.ba(this.iy,["areas"],this.e1,!0)},uM:function(){this.tha();this.eta()},wM:function(){this.dCa([]);
this.tha()},e1:function(){var d=this.iy.get("areas",[]);g.Qa("HotspotPanoramaOverlayImage",this.C)||g.Qa("FlatHotspotPanoramaOverlayImage",this.C)||g.Qa("QuadHotspotPanoramaOverlayImage",this.C)?this.Q_=d.filter(m):this.Q_=d.filter(k);this.Q_.forEach(function(f){c.set(f,0)})},Un:function(d){if(d.Rf==h.Gm){var f=this.rda(d);if(f.length>0){d.gD(f);var n=this.tYa(f),l;for(l in n)d.rFa(n[l],l);d.gm(this.get("distance"));(n=this.fc(f,d.YI()))&&d.F4(n,this.WC(d.YI()))}f=this.uYa(d,f);this.dCa(f,d.ew(),
d.YI())}else if(d.Rf==h.Pf){if(f=this.rda(d),f.length>0){var q=!1;f.forEach(function(r){r.o(h.oa);!q&&r.gO(h.oa,!0).length>1&&(q=!0)});d.gm(this.get("distance"));q&&d.Nt(f)}}else d.Rf==h.mu?(f=this.rda(d),f.length>0&&(q=!1,f.forEach(function(r){var t={};d.ew()&&(t=d.ow().sIa());r.o(h.Ra,t);!q&&r.gO(h.Ra,!0).length>1&&(q=!0)}),this.yu=f,d.gm(this.get("distance")),q&&d.Nt(f))):d.Rf==h.lB&&this.yu.length&&(this.yu.forEach(function(r){var t={};d.ew()&&(t=d.ow().sIa());r.o(h.bb,t)}),this.yu=[])},uYa:function(d,
f){if(!d.Rma())return this.GK={},f;d=d.rxa?"main":"secondary";this.GK[d]=f;f=[];for(d in this.GK)for(var n=0;n<this.GK[d].length;n++)f.indexOf(this.GK[d][n])<0&&f.push(this.GK[d][n]);return f},rda:function(d){if(!this.get("beamEnabled")||this.get("alpha")==0||d.km())return[];var f=this.$x(d.Cs);return f.length==0?[]:this.Q_.filter(function(n){var l=n.get("mapColor");return l=="any"?!0:l=="image"?f.some(function(q){return this.Gda(q).DA}.bind(this)):l=="transparent"?f.every(function(q){return!this.Gda(q).DA}.bind(this)):
l&&l[0]=="#"?f.some(function(q){return e.N5(this.Gda(q).color,l)<10}.bind(this)):!1}.bind(this))},dCa:function(d,f,n){this.jj.forEach(function(q){if(d.indexOf(q)<0){var r=c.get(q)-1;c.set(q,r);r==0&&(q.o(h.Db,{center:n}),f&&q.o(h.sr))}});var l=this.jj;this.jj=d;this.jj.forEach(function(q){if(l.indexOf(q)<0){var r=(c.get(q)||0)+1;c.set(q,r);r==1&&(q.o(h.rc,{center:n}),f&&q.o(h.lF))}})},fc:function(d,f){for(var n="",l=d.length-1;l>=0&&n=="";l--){var q=d[l];if(!f||q.get("displayTooltipInTouchScreens")&&
this.Ka.R.get("displayTooltipInTouchScreens")!==!1)n=q.get("toolTip","")}return n},WC:function(d){if(d){d=this.get("yaw")-this.KC;var f=this.get("pitch")-this.JC;return Math.sqrt(d*d+f*f)}return 0},tYa:function(d){var f={};this.iy.get("useHandCursor")===!0?f[b.hf]=d:this.iy.get("useHandCursor")!==!1&&d.forEach(function(n){var l;(l=n.get("useHandCursor")?b.hf:n.get("cursor"))&&(f[l]?f[l].push(n):f[l]=[n])});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.Qi=void 0;this.BL=this.tH=0;this.Rd=!0;this.LZ=this.Sia=this.nda=void 0;this.Md=!1}var k=a("tdv/player/view/util/Device"),p=a("tdv/player/script/PanoramaPoint"),h=Math.PI/180,g=k.Rb()==k.xi?[-.5,0]:[0,0];m.prototype.vE=function(e){this.Qi!=e&&(this.Qi=e,this.Rd=!0)};m.prototype.tE=function(e){if(e<this.tH+g[0]||
e>this.tH+g[1])this.tH=e,this.Rd=!0};m.prototype.get=function(e,b){b!==void 0||(b=!0);this.Rd&&(this.ya(),this.Rd=!1);var c=this.nda.get(e)||0;e=(this.Sia.get(e)||0)-c;b&&(e>180?e-=360:e<-180&&(e+=360));return c+e*this.LZ};m.prototype.gma=function(){this.Rd&&(this.ya(),this.Rd=!1);for(var e=this.nda.get("vertices"),b=this.Sia.get("vertices"),c=[],d=0;d<e.length;d++){var f=e[d].get("yaw")||0,n=(b[d].get("yaw")||0)-f;n>180?n-=360:n<-180&&(n+=360);var l=e[d].get("pitch")||0,q=(b[d].get("pitch")||0)-
l;c.push(new p(f+n*this.LZ,l+q*this.LZ))}e=this.NR&&this.NR.length==c.length;for(d=0;d<c.length&&e;d++)e=this.NR[d].get("yaw")==c[d].get("yaw")||this.NR[d].get("pitch")==c[d].get("pitch");return e?this.NR:this.NR=c};m.prototype.Uv=function(){return this.get("opacity",!1)};m.prototype.Tz=function(){var e=this.get("hfov")||this.get("vfov"),b=this.Qi[0].get("hfov")||this.Qi[0].get("vfov");return Math.tan(e*.5*h)/Math.tan(b*.5*h)};m.prototype.ya=function(){for(var e=this.BL,b,c=this.Qi.length-1,d,f;;){b=
Math.min(e+1,c);d=this.Owa(e);f=this.Owa(b);if(d<=this.tH&&this.tH<=f)break;if(d>this.tH){if(e==0){b=e;break}--e}else{if(e==c){b=e;break}e+=1}}this.nda=this.Qi[e];this.Sia=this.Qi[b];e=f-d;this.LZ=e>0?(this.tH-d)/e:0};m.prototype.Owa=function(e){return this.Qi[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"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Op:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},gq:function(){m.ba(this.C,
"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.se,!0)},iq:function(){m.ca(this.C,"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.se)},se: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"))},Vf:function(){this.W("playbackPositions","currentTime")&&(this.Hb.vE(this.get("playbackPositions")),this.Hb.tE(this.get("currentTime")),this.set("yaw",this.Hb.get("yaw")),this.set("pitch",this.Hb.get("pitch")),
this.set("roll",this.Hb.get("roll")),this.set("alpha",this.Hb.Uv()))}}});
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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=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"),n=0;a=m.extend(g,e,d,b,c,function(l){g.call(this);this.set("tag","FlatHotspotImage");this.set("id","flat_hs_image_"+n++);this.C=l;this.Il.push(this.C);this.Ig=this.Ig.bind(this)});a.prototype.ec=function(){g.prototype.ec.call(this);k.ba(this.C,["image.levels"],this.Ig,!0)};a.prototype.kc=function(){k.ca(this.C,["image.levels"],this.Ig);g.prototype.kc.call(this)};a.prototype.Ig=function(){this.set("image",this.C.get("image"));this.set("level",
f.nbb(this.C))};a.prototype.ya=function(l){this.YH();g.prototype.ya.call(this,l);this.W("inView")&&this.C.o(this.get("inView")?p.Cd:p.sd)};a.prototype.YH=function(){if(this.W("meshGroup","panoramaId","id")){var l=this.get("meshGroup");l&&l.children.forEach(function(q){h.setAttribute(q,h.KE,this.get("panoramaId"));h.setAttribute(q,h.u9,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"),k=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");a={sja:function(f){if(this.Ka){var n=this.UYa(f);n?(f=this.nwa(this).some(function(l){return n.intersectsObject(l)}),this.$ha(f)):this.$ha(!1)}},nwa:function(f){var n=f.get("meshGroup"),l=[];n&&n.traverse(function(q){q.geometry&&q.visible&&
(Array.isArray(q.material)?q.material.some(function(r){return r.opacity>0}):q.material.opacity>0)&&l.push(q)});f.Ab().forEach(function(q){l=l.concat(this.nwa(q))}.bind(this));return l}};var p=new THREE.Frustum,h=new THREE.PerspectiveCamera,g=90,e=.5,b=new THREE.Matrix4,c=Math.PI/180,d=180/Math.PI;a.UYa=function(f){f=k.getCamera(f.ih);if(!f)return null;var n=this.Ka.R.get("focusAreaScale");if(!h.projectionMatrix.equals(f.projectionMatrix)||!h.matrixWorldInverse.equals(f.matrixWorldInverse)||g!=f.fov||
e!=n){h.copy(f);var l=h.fov*.5*c;h.fov=2*Math.atan2(e*Math.sin(l),Math.cos(l))*d;h.updateProjectionMatrix();p.setFromProjectionMatrix(b.copy(h.projectionMatrix).multiply(h.matrixWorldInverse));g=f.fov;e=n}return p};a.dda=function(){this.Eea=!1};a.eda=function(){this.$ha(!1)};a.Zha=function(f){this.Iva=f};a.$ha=function(f){this.Eea!==f&&(this.Eea=f,this.Iva&&this.Iva.o(this.Eea?m.gRa:m.hRa))};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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/object/Base"),g=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"),n=a("tdv/player/view/util/xr/pointer/PointerState");a=m.extend(h,
g,function(l){h.call(this);this.C=l;this.Il.push(this.C);this.H1=this.H1.bind(this);this.G1=this.G1.bind(this);this.I1=this.I1.bind(this);this.Hr(["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.Raa=this.Saa=this.kq=this.ve=this.kg=null;this.jj=[];this.Qaa=[];this.yn=null;this.Zha(this.C)});a.prototype.ec=function(){this.kg=(new e(p.ha)).bo(this.cH.bind(this));this.ve=(new e(p.wc)).Pq(this.fH.bind(this));this.kq=(new e(p.td)).bo(this.e1a.bind(this));this.Saa=(new e(p.rc)).Pq(this.Y0a.bind(this));this.Raa=(new e(p.Db)).Pq(this.X0a.bind(this));h.prototype.ec.call(this);k.ba(this.C,["items",
"rollOverItems","maps","rollOverMaps"],this.H1,!0);k.ba(this.C,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabledInVRWithGazePointer enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.I1,!0);k.ba(this.C,["areas"],this.G1,!0);this.dda()};a.prototype.kc=function(){this.eda();this.gN([],this.jj);this.lja([],this.Qaa);this.kg.dispose();this.ve.dispose();this.kq.dispose();this.Saa.dispose();this.Raa.dispose();k.ca(this.C,["items",
"rollOverItems","maps","rollOverMaps"],this.H1);k.ca(this.C,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabledInVRWithGazePointer enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.I1);k.ca(this.C,["areas"],this.G1);this.get("visible")&&this.C.o(p.sd);h.prototype.kc.call(this)};a.prototype.H1=function(){this.set("items",this.Ka.Sz(this.C.get("items",[])));this.set("rollOverItems",this.Ka.Sz(this.C.get("rollOverItems",[])));this.set("maps",
this.Ka.Sz(this.C.get("maps",[])));this.set("rollOverMaps",this.Ka.Sz(this.C.get("rollOverMaps",[])));var l=[].concat(this.get("maps"),this.get("items"),this.get("rollOverMaps"),this.get("rollOverItems"));l.forEach(function(q){q.zgb(this.C)}.bind(this));this.get("items").forEach(function(q){q.set("projected",this.C.get("projected"))}.bind(this));this.Uh(l);this.kg.bg(l);this.ve.bg(l);this.kq.bg(l)};a.prototype.I1=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.G1=function(){var l=this.C.get("areas");this.Saa.bg(l);this.Raa.bg(l)};a.prototype.ya=function(l){this.wn(l);h.prototype.ya.call(this,l);this.set("inVR",l.jb);this.set("surfaceSelection",l.TX);this.set("hotspotsEnabled",l.RI);this.set("inVRWithGazePointer",l.jb&&f.fe.length===1&&f.fe[0].type===n.oB);this.we(l);this.sja(l)};a.prototype.we=function(){if(this.W("items","rollOverItems","maps","rollOverMaps","over","centerOver",
"inVR","hotspotsEnabled","enabledInVR","enabledInStandard","enabledInVRWithGazePointer","surfaceSelection","enabledInSurfaceSelection","enabled","interactionEnabled","rollOverDisplay","centerOverDisplay")||this.Ha&&this.Ha.W("composedAlpha")){var l=!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.Ha&&this.Ha.get("composedAlpha")>0,t=this.get("interactionEnabled");r&&(l=this.get("centerOver")&&!this.get("inVR"),q=this.get("over")||l,l=!this.get("rollOverDisplay")&&!this.get("centerOverDisplay")||this.get("over")&&this.get("rollOverDisplay")||l&&this.get("centerOverDisplay")!==!1&&this.get("rollOverDisplay"));this.get("rollOverItems").forEach(function(x){x.set("visible",q);x.set("beamEnabled",r&&q&&t)});var u=this.get("rollOverItems").length==0;this.get("items").forEach(function(x){x.set("visible",
u||!q);x.set("beamEnabled",r&&(u||!q)&&t)});this.get("rollOverMaps").forEach(function(x){x.set("visible",!1);x.set("beamEnabled",r&&q&&t)});var v=this.get("rollOverMaps").length==0;this.get("maps").forEach(function(x){x.set("visible",!1);x.set("beamEnabled",r&&(v||!q)&&t)});this.set("visible",l)}if(this.W("visible")){l=this.get("alpha");var w=this.get("visible")?1:0,y=(this.get("visible")?this.get("fadeInDuration"):this.get("fadeOutDuration"))*Math.abs(l-w);this.yn=new b("linear",[new c("alpha",l,
w)],Math.max(y,1));this.Ma();this.get("visible")?this.C.o(p.Cd):this.C.o(p.sd)}};a.prototype.wn=function(l){this.yn&&(this.yn.Qe()?this.yn=null:(this.yn.Lb(l.vf),this.set("alpha",this.yn.ib("alpha"))),this.Ma())};a.prototype.cH=function(){this.jk();this.o(p.ha)};a.prototype.e1a=function(){this.jk();this.o(p.td)};a.prototype.fH=function(){this.jk()};a.prototype.jk=function(){var l=0;this.ve.Qv(function(q){var r=0,t;this.kg.Gn(q)?r=100:(t=this.ve.Gn(q))&&(r=t.percent);l+=r}.bind(this));this.o(new d(p.wc,
l/this.ve.wd.length))};a.prototype.Y0a=function(l){l.data.center?this.lja([l.source],[]):this.gN([l.source],[])};a.prototype.X0a=function(l){l.data.center?this.lja([],[l.source]):this.gN([],[l.source])};a.prototype.gN=function(l,q){this.VDa(this.jj,l,q);this.set("over",this.jj.length>0)};a.prototype.lja=function(l,q){this.VDa(this.Qaa,l,q);this.set("centerOver",this.Qaa.length>0)};a.prototype.VDa=function(l,q,r){q||(q=[]);r||(r=[]);r.forEach(function(t){t=l.indexOf(t);t>=0&&l.splice(t,1)});q.forEach(function(t){l.indexOf(t)<
0&&l.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"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Op:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},gq:function(){m.ba(this.C,
"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.se,!0)},iq:function(){m.ca(this.C,"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.se)},se: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"))},Vf:function(){this.W("playbackPositions","currentTime")&&(this.Hb.vE(this.get("playbackPositions")),this.Hb.tE(this.get("currentTime")),this.set("yaw",this.Hb.get("yaw")),this.set("pitch",this.Hb.get("pitch")),this.set("roll",this.Hb.get("roll")),this.set("rotationX",this.Hb.get("rotationX")),this.set("rotationY",this.Hb.get("rotationY")),this.set("hfov",this.Hb.get("hfov")),this.set("vfov",this.Hb.get("vfov")),this.set("alpha",this.Hb.Uv()))}}});
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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=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"),n=0;a=m.extend(g,e,b,c,d,function(l){g.call(this);this.set("tag","HotspotImage");this.set("id","hs_image_"+n++);this.set("side",THREE.DoubleSide);this.set("wasInView",!1);this.C=l;this.Il.push(this.C);this.Ig=this.Ig.bind(this)});a.prototype.ec=function(){g.prototype.ec.call(this);k.ba(this.C,["image.levels"],this.Ig,!0)};a.prototype.kc=function(){k.ca(this.C,["image.levels"],this.Ig);g.prototype.kc.call(this)};a.prototype.Ig=function(){this.set("image",
this.C.get("image"));this.set("level",f.vbb(this.C,this.get("panoramaPixelsPerDegree")))};a.prototype.ya=function(l){this.YH();g.prototype.ya.call(this,l);this.W("inView")&&(l=this.get("inView"),l!==this.get("wasInView")&&(this.set("wasInView",l),this.C.o(l?p.Cd:p.sd)))};a.prototype.YH=function(){if(this.W("meshGroup","panoramaId","id")){var l=this.get("meshGroup");l&&l.children.forEach(function(q){h.setAttribute(q,h.KE,this.get("panoramaId"));h.setAttribute(q,h.u9,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(h,g,e){this.Cg=h||new k(0,0,0);this.wk=g||new k(1,0,0);this.$D=e||new k(0,1,0)}var k=a("tdv/player/view/util/geo/Point"),p=a("tdv/player/view/util/geo/Vector");m.prototype.clone=function(){return new m(this.Cg.clone(),this.wk.clone(),this.$D.clone())};m.prototype.apply=function(h){h.AN(this.Cg);h.AN(this.wk);h.AN(this.$D)};m.prototype.intersection=function(h,
g){var e=p.vD(h.Cg,h.wk),b=p.vD(this.Cg,h.Cg),c=p.vD(this.Cg,this.wk);c.e5(p.vD(this.Cg,this.$D));e=e.yI(c);if(!(e==0||g&&e<0))return g=-c.yI(b)/e,new k(h.Cg.x+(h.wk.x-h.Cg.x)*g,h.Cg.y+(h.wk.y-h.Cg.y)*g,h.Cg.z+(h.wk.z-h.Cg.z)*g)};m.prototype.S7=function(h,g){var e=p.vD(this.Cg,this.wk),b=p.vD(this.Cg,this.$D);h=p.vD(this.Cg,h);var c=e.dma(),d=b.dma();return g?new k(h.yI(e)/(c*c),h.yI(b)/(d*d),0):new k(h.yI(e)/c,h.yI(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"),k=a("tdv/player/view/util/geo/Frustum"),p=a("tdv/player/view/util/geo/Line"),h=a("tdv/player/view/util/geo/Point"),g=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,n=new k,l=new g,q=new h;return{get:function(r,t,u,v,w,y,x,z){r*=c;t*=c;t=new h(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?(n.pOa(x),n.KNa(z),n.xJ(y*c),n.project(t),t):null},Xjb:function(r,t,u){f.identity();f.rotateX(-u.Ic()*c);f.rotateZ(-u.Ag()*c);f.rotateY(-u.Jc()*c);q.set(r,t,0);
r=u.unproject(q).NIa();r.apply(f);return{Za:r.Jc()*d,pitch:r.Ic()*d}},Wlb:function(r,t,u,v,w,y,x,z,A,D,E,B,C,I){I||(I=b.ZA);C||(C=m.qm(B,D,E));B||(B=m.er(C,D,E));var F=D*.5/Math.tan(B*.5*c),G=F*Math.tan(B*.5*c)*2,N=F*Math.tan(C*.5*c)*2;l.Cg.set(+G*.5,+N*.5,0);l.wk.set(-G*.5,+N*.5,0);l.$D.set(+G*.5,-N*.5,0);f.identity();f.rotateZ(-A*c);f.rotateX(-x*c);f.rotateY(z*c);f.translate(0,0,F);f.rotateZ(-y*c);f.rotateX(-w*c);f.rotateY(-v*c);f.rotateY(u.Jc()*c);f.rotateZ(u.Ag()*c);f.rotateX(u.Ic()*c);l.apply(f);
q.set(r,t,0);w=l.intersection(u.unproject(q));v={x:void 0,y:void 0,xScaled:void 0,yScaled:void 0};w&&w.z>0&&(w=l.S7(w),v.xScaled=v.x=w.x/G,v.yScaled=v.y=w.y/N);if(I!=b.ZA){switch(I){case b.ej:var O=Math.min(m.er(C,D,E),B);var R=Math.min(m.qm(B,D,E),C);break;case b.nr:O=Math.max(m.er(C,D,E),B);R=Math.max(m.qm(B,D,E),C);break;case b.Ep:O=B;R=m.qm(B,D,E);break;case b.Hk:O=m.er(C,D,E),R=C}if(O!=B||R!=C)G=F*Math.tan(O*.5*c)*2,N=F*Math.tan(R*.5*c)*2,l.Cg.set(+G*.5,+N*.5,0),l.wk.set(-G*.5,+N*.5,0),l.$D.set(+G*
.5,-N*.5,0),l.apply(f),q.set(r,t,0),(w=l.intersection(u.unproject(q)))&&w.z>0&&(w=l.S7(w),v.xScaled=w.x/G,v.yScaled=w.y/N)}return v},slb:function(r,t,u,v,w,y,x){x=w*.5/Math.tan(x*.5*c);l.Cg.set(+w*.5,+y*.5,x);l.wk.set(-w*.5,+y*.5,x);l.$D.set(+w*.5,-y*.5,x);f.identity();f.rotateZ(-v*c);f.rotateX(-u*c);f.rotateY(-t*c);f.rotateY(r.Jc()*c);f.rotateZ(r.Ag()*c);f.rotateX(r.Ic()*c);l.apply(f);r=new p(new h(0,0,0),new h(0,0,1));return(r=l.intersection(r))&&r.z>0?(r=l.S7(r),{x:r.x/w,y:r.y/y}):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"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/player/view/panorama/renderer/TextureLoader"),g=Math.PI/
180;return{Ix: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.Fh=this.IB();this.qda=k.RN();this.yo=new THREE.Matrix4;this.RK=new THREE.Matrix4;this.NM=new THREE.Matrix4;this.xya=new THREE.Matrix4;this.gk=new THREE.Matrix4;this.mn=new THREE.Matrix4;this.tj=new THREE.Matrix4},rz:function(e){this.Ss(e)},tL:function(){var e=this.get("meshGroup");
return e?p.om(e)[0]:null},Np:function(){return[0].map(function(e){var b=this.DQ();e=p.create(this.Fh[e],b);h.yA(e,h.qr);h.zA(e,h.ju);h.zJ(e,m.SP);h.LX(e,1);return e}.bind(this))},IB:function(){return[k.RN()]},Ss:function(e){var b=!1,c=!1;this.set("rendererYaw",e.Za);this.set("rendererPitch",e.pitch);this.set("rendererRoll",e.fh);this.set("rendererCameraFOV",e.Wi);this.set("rendererWidth",e.width);this.set("rendererHeight",e.height);this.set("inVR",e.jb);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?k.Vv(this.get("distance")):k.mt())}this.W("z")&&(this.yo.makeTranslation(0,0,-this.get("z")),c=!0);e.Wi&&this.W("z","rendererCameraFOV")&&this.set("rendererHeightZ",Math.tan(e.Wi*g*.5)*this.get("z")*2);e.camera&&this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth",
"rendererHeight","rendererHeightZ","inVR","centerX","centerY")&&(this.RK.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.NM.makeTranslation(d,b,0),b=!0);this.W("roll")&&(this.gk.makeRotationZ(this.get("roll")*g),b=!0);e.Wi&&(c||this.W("rendererHeight","inVR","rendererHeightZ","width","height","flipHorizontally"))&&(c=e.jb?512/e.height:1,e=(this.get("flipHorizontally")?
-1:1)*this.get("width")*c,c*=this.get("height"),this.mn.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.xya.makeTranslation(e,c,0),b=!0);b&&(this.tj.copy(this.RK),this.tj.multiply(this.yo),this.tj.multiply(this.NM),this.tj.multiply(this.gk),this.tj.multiply(this.mn),this.tj.multiply(this.xya),p.ct(this.get("meshGroup"),this.tj))}}});
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"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject");a=a("tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin");return m.extend(k,a,function(){k.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(p,h,g,e,b,c){this.rq=h;this.ea=document.createElement("canvas");this.ea.width=this.rq;this.ea.height=this.rq;switch(p){case m.DP:this.uXa(g,e,b,c);break;case m.LY:this.vXa(g,e,b,c)}}var k=a("tdv/player/view/util/Color");m.prototype.Zf=function(){return this.rq};m.prototype.pg=function(){return this.rq};m.prototype.zg=function(){return this.ea};m.prototype.uXa=function(p,
h,g,e){var b=this.rq*.5,c=this.rq*.5,d=this.rq*.5,f=this.ea.getContext("2d");h=k.qp(h);for(var n=f.createRadialGradient(b,c,0,b,c,d),l=0;l<g.length;l++)n.addColorStop(e[l],"rgba("+h[0]+","+h[1]+","+h[2]+","+g[l]+")");f.fillStyle=n;f.globalAlpha=p;f.beginPath();f.arc(b,c,d,0,Math.PI*2,!0);f.closePath();f.fill()};m.prototype.vXa=function(p,h,g,e){var b=this.rq*.5,c=this.rq*.5,d=this.rq*.5,f=this.ea.getContext("2d");f.clearRect(0,0,this.rq,this.rq);var n=k.qp(h),l=f.createRadialGradient(b,c,0,b,c,d);
for(h=0;h<g.length;h++)l.addColorStop(e[h],"rgba("+n[0]+","+n[1]+","+n[2]+","+g[h]+")");f.fillStyle=l;f.globalAlpha=p;f.beginPath();for(h=0;h<6;h++)g=45*Math.PI/180+2*Math.PI*h/6,p=b+Math.cos(g)*d,g=c+Math.sin(g)*d,h==0?f.moveTo(p,g):f.lineTo(p,g);f.closePath();f.fill()};m.DP="circle";m.LY="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"),k=a("tdv/binding/BindingsHandler"),
p=a("tdv/constants/EventName"),h=a("tdv/player/view/util/geo/Projection"),g=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(g,function(n){g.call(this);this.C=n;this.Il.push(this.C);this.Ig=this.Ig.bind(this);this.set("tag",
"LensFlare");this.set("translationAlpha",0);this.Taa=this.cWa();this.ng=this.XWa();this.Uh(this.Taa.concat([this.ng]))});a.prototype.ec=function(){g.prototype.ec.call(this);this.o(p.td);this.o(p.ha);k.ba(this.C,["yaw","pitch","bleaching","bleachingDistance"],this.Ig,!0)};a.prototype.kc=function(){k.ca(this.C,["yaw","pitch","bleaching","bleachingDistance"],this.Ig);g.prototype.kc.call(this)};a.prototype.Ig=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.ya=function(n){g.prototype.ya.call(this,n);this.set("rendererYaw",n.Za);this.set("rendererPitch",n.pitch);this.set("rendererRoll",n.fh);this.set("rendererCameraFOV",n.Wi);this.set("rendererWidth",n.width);this.set("rendererHeight",n.height);this.set("inVR",n.jb);if(this.W("composedTranslationX","composedTranslationY","composedTranslationZ")){var l=this.get("composedTranslationX"),q=this.get("composedTranslationY"),
r=this.get("composedTranslationZ");this.set("translationAlpha",Math.max(0,1-Math.sqrt(l*l+q*q+r*r)*10))}if(this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","inVR","yaw","pitch","translationAlpha","composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")){var t=n.Za+this.get("composedDeltaYaw"),u=n.pitch+this.get("composedDeltaPitch"),v=n.fh+this.get("composedDeltaRoll");l=this.get("translationAlpha");r=q=0;if(!n.jb&&(t=h.get(this.get("yaw"),
this.get("pitch"),t,u,v,n.Wi,n.width,n.height))){var w=n.width*.5;var y=n.height*.5;var x=t.x;var z=t.y;w=(w-x)*2;y=(y-z)*2;r=Math.sqrt(w*w+y*y);t=Math.min(n.width,n.height);q=Math.max(0,Math.min(.7,1-r/Math.sqrt(n.width*n.width,n.height*n.height)))*l;n=this.get("bleaching");r=1-Math.max(0,Math.min(1,r/(t*this.get("bleachingDistance"))));r=n*r*l}for(n=0;n<this.Taa.length;n++)l=this.Taa[n],l.set("alpha",q),q>0&&(l.set("centerX",x+w*f[n].position),l.set("centerY",z+y*f[n].position));this.ng.set("alpha",
r)}};a.prototype.cWa=function(){return f.map(function(n){var l=(new c(n.form,n.NJ,n.opacity,n.color,n.MI,n.NI)).zg(),q=new d;q.Vn(l);l=new b;l.set("textureSource",q);l.set("width",n.size);l.set("height",n.size);l.set("offsetX",n.size*.5);l.set("offsetY",n.size*.5);l.set("alpha",0);return l})};a.prototype.XWa=function(){return new e("#ffffff")};var f=[{form:c.LY,position:.1,size:52,NJ:128,opacity:.8,color:"#FCFCFC",MI:[1,.5],NI:[0,.866]},{form:c.LY,position:.2,size:52,NJ:128,opacity:.6,color:"#C8FCC8",
MI:[1,.5],NI:[0,.866]},{form:c.DP,position:.36,size:112,NJ:128,opacity:.5,color:"#C8C8FC",MI:[1,.9,.6,0],NI:[0,.2,.4,1]},{form:c.DP,position:.47,size:32,NJ:128,opacity:.3,color:"#96C8AF",MI:[1,1,0],NI:[0,.9,1]},{form:c.DP,position:.65,size:52,NJ:128,opacity:.7,color:"#FCFCFC",MI:[.7,.7,.2,0],NI:[0,.1,.4,1]},{form:c.LY,position:.88,size:128,NJ:128,opacity:.4,color:"#AF96C8",MI:[1,.5],NI:[0,.866]},{form:c.DP,position:1,size:33,NJ:128,opacity:.8,color:"#C89696",MI:[.8,.8,.6,0],NI:[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(l,q,r){l=(q-l)*(1-r);Math.abs(l)<1E-5&&(l=0);return q-l}var k=a("tdv/utils"),p=a("tdv/binding/BindingsHandler"),
h=a("tdv/constants/EventName"),g=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=k.extend(g,function(l){g.call(this);this.Ub=l;this.hs=this.hs.bind(this);this.fq=this.ea=null;this.iz=this.ep=this.iha=this.Sy=void 0;this.bua=20;this.Rg=null;this.$e=this.Ub.get("opacity",.5);this.aT=this.Ub.get("rollOverOpacity",
this.$e);this.A0a=1;this.E0a=.66;this.set("tag","MenuButton");this.set("visible",!1);this.set("over",!1);this.set("centerDistance",void 0)});a.prototype.ec=function(){g.prototype.ec.call(this);p.ba(this.Ub,["label"],this.hs,!0)};a.prototype.kc=function(){p.ca(this.Ub,["label"],this.hs);g.prototype.kc.call(this)};a.prototype.hs=function(){this.ea=null};a.prototype.ya=function(l){this.Rs(l);this.Yg(l);this.XH(l);this.Vf(l);this.we(l);g.prototype.ya.call(this,l)};a.prototype.Rs=function(l){l.jb&&!this.fq&&
f.getType()==f.kx.eo&&this.Uh([this.fq=new g])};a.prototype.Yg=function(){this.get("visible")&&(this.ea||(this.get("textureSource")||this.set("textureSource",new b),this.ea=new e(this.Ub,[this.Ub]),this.get("textureSource").Vn(this.ea.zg()),this.set("contentWidth",this.ea.Zf()),this.set("contentHeight",this.ea.pg()),this.set("hfov",this.ea.df()),this.set("distance",this.Ub.get("distance"))),this.ea.update()&&(this.get("textureSource").update(),this.Ma()),this.W("over")&&this.ea.sE(this.get("over")?
0:-1))};a.prototype.XH=function(l){this.W("visible")&&(this.Rg=new c("linear",[new d("displayCoef",this.get("visible")?0:1,this.get("visible")?1:0,void 0)],300));this.Rg&&(this.Rg.Qe()?this.Rg=null:this.Rg.Lb(l.vf))};a.prototype.Vf=function(l){if(this.get("visible")||this.Rg){this.ep=l.Za;this.iz=Math.min(90,Math.max(-90,this.bua+this.bua-l.pitch));if(this.W("visible")&&this.get("visible"))this.set("yaw",l.Za),this.set("pitch",l.pitch);else{for(;this.ep+180<this.Sy;)this.Sy-=360;for(;this.ep-180>
this.Sy;)this.Sy+=360;var q=(this.ep-this.Sy)/l.vf,r=(this.iz-this.iha)/l.vf,t=Math.atan2(r,q);r=Math.sqrt(r*r+q*q);r=Math.min(r,10*n);q=Math.cos(t)*r;t=Math.sin(t)*r;this.set("yaw",m(this.get("yaw"),this.ep+q,.02));this.set("pitch",m(this.get("pitch"),this.iz+t,.02))}this.Sy=this.ep;this.iha=this.iz;t=this.get("yaw")-l.Za;l=this.get("pitch")-l.pitch;this.set("centerDistance",Math.sqrt(t*t+l*l))}};a.prototype.we=function(){if(!this.get("visible")&&!this.Rg)this.set("alpha",0);else if(this.W("over",
"centerDistance")||this.Rg){var l=this.get("over")?this.aT:this.$e,q=this.E0a,r=this.get("centerDistance")/this.get("hfov");r<1&&(q+=(1-r)*(this.A0a-q),l+=(1-r)*(this.aT-l));this.Rg&&(l*=this.Rg.ib("displayCoef"),q*=this.Rg.ib("displayCoef"));this.set("alpha",l);this.set("scale",q)}};a.prototype.Un=function(l){if(l.Rf==h.Gm){var q=!1;this.get("visible")&&!l.km()&&(q=this.$x(l.Cs).length>0);q&&(l.gD(this.Ub),l.kI(this.Ub),l.gm(this.get("distance")));this.get("over")!=q&&(this.get("over")&&this.Ub.o(h.Db),
this.set("over",q),this.get("over")&&this.Ub.o(h.rc))}else l.Rf==h.Pf&&this.get("visible")&&!l.km()&&this.$x(l.Cs).length>0&&(l.Nt(this.Ub),this.Ub.o(h.oa),this.o(h.oa))};var n=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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/object/Plane"),
g=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(h,function(f,n){h.call(this);this.Ub=f;this.qC=n;this.hs=this.hs.bind(this);this.ea=null;this.iha=this.Sy=void 0;this.Rg=null;this.$e=this.Ub.get("opacity",.5);this.aT=this.Ub.get("rollOverOpacity",this.$e);this.set("textureSource",new e);this.set("tag","MenuPanel");this.set("overIndex",
-1);this.set("selectedIndex",-1);this.Zua=!1});a.prototype.ec=function(){h.prototype.ec.call(this);k.ba(this.Ub,["label"],this.hs,!0);this.qC.forEach(function(f){k.ba(f,["label"],this.hs,!0)}.bind(this))};a.prototype.kc=function(){k.ca(this.Ub,["label"],this.hs);this.qC.forEach(function(f){k.ca(f,["label"],this.hs)}.bind(this));h.prototype.kc.call(this)};a.prototype.hs=function(){this.ea=null};a.prototype.ya=function(f){this.Rs(f);this.Yg(f);this.XH(f);this.Vf(f);h.prototype.ya.call(this,f)};a.prototype.lWa=
function(){this.ea||(this.ea=new g(this.Ub,this.qC),this.get("textureSource").Vn(this.ea.zg()),this.set("contentWidth",this.ea.Zf()),this.set("contentHeight",this.ea.pg()),this.set("hfov",this.ea.df()),this.set("distance",this.Ub.get("distance")))};a.prototype.Yg=function(){this.ea||this.lWa();this.W("selectedIndex")&&this.ea.sE(this.get("selectedIndex"));this.W("overIndex")&&this.ea.sE(this.get("overIndex"));this.ea.update()&&(this.get("textureSource").update(),this.Ma())};a.prototype.Rs=function(f){f.jb&&
!this.fq&&d.getType()==d.kx.eo&&this.Uh([this.fq=new h])};a.prototype.XH=function(f){this.Rg||this.Zua||(this.Rg=new b("linear",[new c("alpha",0,1,void 0),new c("scale",0,1,void 0),new c("yaw",f.Za,this.get("yaw"),void 0),new c("pitch",f.pitch,this.get("pitch"),void 0)],300));this.Rg&&(this.Rg.Qe()?(this.Zua=!0,this.Rg=null):this.Rg.Lb(f.vf))};a.prototype.Vf=function(){if(this.Rg){var f=this.get("overIndex")<0?this.$e:this.aT;this.set("alpha",f*this.Rg.ib("alpha"));this.set("scale",this.Rg.ib("scale"));
this.set("yaw",this.Rg.ib("yaw"));this.set("pitch",this.Rg.ib("pitch"))}else this.W("overIndex")&&(f=this.get("overIndex")<0?this.$e:this.aT,this.set("alpha",f))};a.prototype.Un=function(f){if(f.Rf==p.Gm){var n=-1;if(!f.km()){var l=this.$x(f.Cs).filter(function(q){return q.source==this.ea.zg()}.bind(this));l.length>0&&(n=this.ea.ama(l[0].x,l[0].y))}n>=0&&(f.gD(this.qC[n]),f.kI(this.qC[n]),f.gm(this.get("distance")));this.get("overIndex")>=0!=n>=0&&(n>0?this.o(p.rc):this.o(p.Db));this.get("overIndex")!=
n&&(this.get("overIndex")>=0&&this.qC[this.get("overIndex")].o(p.Db),this.set("overIndex",n),this.get("overIndex")>=0&&this.qC[this.get("overIndex")].o(p.rc))}else f.Rf!=p.Pf||f.km()||(l=this.$x(f.Cs).filter(function(q){return q.source==this.ea.zg()}.bind(this)),l.length>0&&(n=this.ea.ama(l[0].x,l[0].y),n>=0&&(l=this.qC[n],this.set("selectedIndex",n),f.Nt(l),f.gm(this.get("distance")),l.o(p.oa),this.o(p.oa,{item:l}))))};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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/renderer/object/Base"),h=a("tdv/player/view/panorama/renderer/object/MenuPanel");a=m.extend(p,function(b){p.call(this);this.Ub=b;this.BC=[];this.mM=null;this.set("tag","MenuPanels");this.set("visible",
!1)});a.prototype.ya=function(b){this.W("visible")&&this.get("visible")&&(this.set("yaw",b.Za),this.set("pitch",b.pitch),this.kta(this.Ub));p.prototype.ya.call(this,b)};a.prototype.kta=function(b){b=new h(this.Ub,b.get("children",[]));var c=this.get("yaw");this.Ab().forEach(function(d){c+=d.get("hfov")+e});b.set("yaw",c);b.set("pitch",this.get("pitch"));this.KTa(b);this.appendChild(b)};a.prototype.ABa=function(b){this.Ab().slice(b).forEach(function(c){this.o3a(c);c.remove()}.bind(this));this.BC=this.BC.filter(function(c){return this.Ab().indexOf(c)>=
0}.bind(this))};a.prototype.KTa=function(b){b.bind(k.rc,this.QAa,this,!0);b.bind(k.Db,this.PAa,this,!0);b.bind(k.oa,this.OAa,this,!0)};a.prototype.o3a=function(b){b.h(k.rc,this.QAa,this,!0);b.h(k.Db,this.PAa,this,!0);b.h(k.oa,this.OAa,this,!0)};a.prototype.QAa=function(b){this.BC.indexOf(b.source)<0&&(this.BC.push(b.source),this.BC.length==1&&this.oua())};a.prototype.PAa=function(b){b=this.BC.indexOf(b.source);b>=0&&(this.BC.splice(b,1),this.BC.length==0&&this.X4a())};a.prototype.OAa=function(b){var c=
b.source;b=b.data.item;b.get("children",[]).length?(this.ABa(this.Ab().indexOf(c)+1),this.kta(b)):this.sua()};a.prototype.sua=function(){this.set("visible",!1);this.ABa(0);this.oua();this.o(k.VA)};a.prototype.oua=function(){this.mM&&(clearTimeout(this.mM),this.mM=null)};a.prototype.X4a=function(){this.mM||(this.mM=setTimeout(function(){this.mM=null;this.sua()}.bind(this),g))};var g=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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/renderer/object/Base"),h=a("tdv/player/view/panorama/renderer/object/MenuButton"),g=a("tdv/player/view/panorama/renderer/object/MenuPanels");a=m.extend(p,
function(e){p.call(this);this.C=e;this.Il.push(this.C);this.set("tag","Menu");this.set("visible",!1);this.he=new h(this.C);this.he.bind(k.oa,this.YUa,this,!1);this.Oi=new g(this.C);this.Oi.bind(k.VA,this.q2a,this,!1);this.Uh([this.he,this.Oi])});a.prototype.ec=function(){p.prototype.ec.call(this);this.o(k.td);this.o(k.ha)};a.prototype.ya=function(e){this.set("visible",e.jb);this.W("visible")&&(this.he.set("visible",this.get("visible")),this.Oi.set("visible",!1));p.prototype.ya.call(this,e)};a.prototype.YUa=
function(){this.he.set("visible",!1);this.Oi.set("visible",!0)};a.prototype.q2a=function(){this.he.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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/renderer/object/Plane"),h=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),
g=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),e=a("tdv/view/events/ProgressEvent");a=m.extend(p,function(){p.call(this);this.set("tag","CustomPlane");this.set("source",null);this.set("sourceUpdated",!1);this.set("sourceIsVideo",!1);this.ve=this.Hh=null});a.prototype.ec=function(){this.Hh=(new g(k.ha)).bo(this.gs.bind(this));this.ve=(new g(k.ha)).Pq(this.Ly.bind(this));p.prototype.ec.call(this)};a.prototype.kc=function(){this.Hh.dispose();this.ve.dispose();p.prototype.kc.call(this)};
a.prototype.ya=function(b){var c=this.get("textureSource");this.W("source","sourceUpdated","sourceIsVideo")&&(c||this.set("textureSource",c=new h),this.W("source")&&c.Vn(this.get("source")),this.W("sourceIsVideo")&&c.xX(this.get("sourceIsVideo")),this.W("sourceUpdated")&&(c.update(),this.set("sourceUpdated",!1)));c&&c.Yoa(b.Bk>0);p.prototype.ya.call(this,b);this.W("meshGroup")&&(b=(b=this.get("meshGroup"))&&b.children||[],b.length&&(this.Hh.bg(b),this.ve.bg(b)))};a.prototype.gs=function(){this.o(k.td);
this.o(k.ha)};a.prototype.Ly=function(b,c){var d=0;c.Qv(function(f){(f=c.Gn(f))&&(d+=f.percent)});this.o(new e(k.wc,d/c.wd.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.ag=q;this.ag.bind(h.K("distanceToFloor"),
this.ya,this,!1);this.cl=r;this.cl.bind(h.K("yaw"),this.ya,this,!1);this.cl.bind(h.K("distance"),this.ya,this,!1);this.cl.bind(h.K("enabled"),this.ya,this,!1);this.cl.bind(h.K("enabledInSurfaceSelection"),this.ya,this,!1);this.Pb=null;this.yf=new b;this.yf.set("hfov",20);this.yf.set("vfov",20);this.yf.set("pitch",-90);this.yf.set("source",t.zg());this.yf.set("contentWidth",t.Zf());this.yf.set("contentHeight",t.pg());this.ya()}var k=a("tdv/utils"),p=a("tdv/binding/BindingsHandler"),h=a("tdv/constants/EventName"),
g=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=k.extend(e,function(q){e.call(this);this.c1=this.c1.bind(this);this.Vu=this.Vu.bind(this);this.$0=this.$0.bind(this);this.set("tag","SurfaceSelector");this.set("reticleVisible",
!1);this.set("enabled",!1);this.Aa=q;this.mZ=[];this.YQ=new f;this.$k=new d;this.Le=new b;this.Le.set("hfov",20);this.Le.set("vfov",20);this.Le.set("pitch",-90);this.set("reticleCoef",1);this.Uh([this.Le])});a.prototype.ec=function(){this.KWa();e.prototype.ec.call(this);p.ba(this.Aa,["distanceToFloor"],this.c1,!0);p.ba(this.Aa,["adjacentPanoramas"],this.Vu,!0);p.ba(this.Ka.kd,["adjacentPanoramaPositionsEnabled"],this.$0,!0);this.o(h.td);this.o(h.ha)};a.prototype.kc=function(){e.prototype.kc.call(this);
p.ca(this.Aa,["distanceToFloor"],this.c1);p.ca(this.Aa,["adjacentPanoramas"],this.Vu);p.ca(this.Ka.kd,["adjacentPanoramaPositionsEnabled"],this.$0);this.cCa([])};a.prototype.c1=function(){var q=this.Aa.get("distanceToFloor");this.Le.set("distance",q);q=g.Vv(q);var r=g.ima(q,90),t=g.jma(q,90);this.YQ.Cg.set(-r*.5,-q,-t*.5);this.YQ.wk.set(r*.5,-q,-t*.5);this.YQ.$D.set(-r*.5,-q,t*.5);this.JBa=q/g.mt()};a.prototype.Vu=function(){this.cCa(this.Aa.get("adjacentPanoramas",[]))};a.prototype.$0=function(){this.Vu()};
a.prototype.cCa=function(q){this.mZ.forEach(function(r){r.clear()});this.mZ=q.map(function(r){return new m(this.Aa,r,this.Yga)}.bind(this));q=[];this.Ka.kd.get("adjacentPanoramaPositionsEnabled")&&(q=q.concat(this.mZ.map(function(r){return r.yf})));q=q.concat([this.Le]);this.Uh(q)};a.prototype.ya=function(q){e.prototype.ya.call(this,q);this.set("enabled",q.TX);this.Tja();this.cD(q)};a.prototype.Tja=function(){this.W("enabled","reticleVisible","composedTranslationX","composedTranslationY","composedTranslationZ",
"composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.Le.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.$Da())};a.prototype.KWa=function(){this.GM=new c(this.Ka.R);this.GM.setPosition(this.get("reticleCoef"));this.Le.set("source",this.GM.zg());this.Le.set("contentWidth",
this.GM.Zf());this.Le.set("contentHeight",this.GM.pg());this.Yga=new c(this.Ka.R);this.Yga.setPosition(0);this.Yga.update(1)};a.prototype.cD=function(q){this.W("reticleCoef")&&this.GM.setPosition(this.get("reticleCoef"));this.Le.set("sourceUpdated",this.GM.update(q.vf))};a.prototype.Un=function(q){if(q.rxa)if(!this.get("enabled")||q.Cs.length==0||q.km()||q.Te())this.set("reticleVisible",!1);else{var r=q.Cs[0];this.$k.Cg.set(r.origin.x,r.origin.y,r.origin.z);this.$k.wk.set(r.origin.x+r.direction.x,
r.origin.y+r.direction.y,r.origin.z+r.direction.z);if(r=this.YQ.intersection(this.$k,!0)){var t=this.YQ.S7(r,!0),u=2*(.5-t.x);t=2*(.5-t.y);var v=n*Math.atan2(-u,t),w=-90+n*Math.atan2(Math.sqrt(u*u+t*t),1);if(w<-75||w>-1)this.set("reticleVisible",!1);else{var y={x:u*this.JBa,y:-t*this.JBa};q.ew()||q.Rma()?q.Rf==h.Gm&&(this.set("reticleVisible",!0),this.Le.set("alpha",Math.min(1,(w- -75)/5)),this.Le.set("translationX",y.x),this.Le.set("translationZ",y.y)):this.set("reticleVisible",!1);var x=this.Ka.kd.get("surfaceSelectionHorizontalAngle")*
.5,z=this.Ka.kd.get("surfaceSelectionVerticalAngle")*.5;t=this.mZ.map(function(A){return{cl:A.cl,iW:A.ubb(v),vertical:A.bcb(w),distance:A.N5(y)}}).filter(function(A){return A.iW<x&&A.vertical<z});t.length==0?this.set("reticleCoef",0):(t.sort(function(A,D){return A.distance-D.distance}),u=t[0].cl,this.set("reticleCoef",Math.max(0,Math.min(1,(1-t[0].iW/x)*(1-t[0].vertical/z)))),r=this.Aa.get("distanceToFloor")*Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z)/-r.y,q.Rma()&&q.Z8a([u]),q.gm(r),q.Rf==h.Pf?(q.Nt([u]),
this.get("blendingActive")||u.o(h.Ar)):(q.gD([u]),q.ew()&&q.kI([u]),(r=this.Ka.R.get("displayTooltipInSurfaceSelection")&&u.get("panorama")&&u.get("panorama").get("label"))&&q.F4(r,0)))}}else this.set("reticleVisible",!1)}};m.prototype.clear=function(){this.ag.h(h.K("distanceToFloor"),this.ya,this,!1);this.ag=null;this.cl.h(h.K("yaw"),this.ya,this,!1);this.cl.h(h.K("distance"),this.ya,this,!1);this.cl.h(h.K("enabled"),this.ya,this,!1);this.cl.h(h.K("enabledInSurfaceSelection"),this.ya,this,!1);this.cl=
null};m.prototype.ubb=function(q){if(!this.Pb)return Infinity;q=Math.abs(this.Pb.Za-q);return q>180?360-q:q};m.prototype.bcb=function(q){return this.Pb?Math.abs(this.Pb.pitch-q):Infinity};m.prototype.N5=function(q){if(!this.dN)return Infinity;var r=q.x-this.dN.x;q=q.y-this.dN.y;return Math.sqrt(r*r+q*q)};m.prototype.ya=function(){var q=this.cl.get("yaw"),r=this.cl.get("distance"),t=this.cl.get("enabled")&&this.cl.get("enabledInSurfaceSelection");if(q!==void 0&&r!==void 0&&t){t=this.ag.get("distanceToFloor");
var u=-90+Math.atan2(r,t)*n;this.yf.set("alpha",u<-1?1:0);this.Pb={Za:q,pitch:u};u=g.Vv(t)/g.mt();this.dN={x:-Math.sin(q*l)*r/t*u,y:-Math.cos(q*l)*r/t*u};this.yf.set("translationX",this.dN.x);this.yf.set("translationZ",this.dN.y);this.yf.set("distance",t)}else this.dN=this.Pb=null,this.yf.set("alpha",0)};var n=180/Math.PI,l=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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/view/events/ProgressEvent"),g=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"),n=a("tdv/player/view/util/XR"),l=0;a=m.extend(g,
function(t){g.call(this);this.C=t;this.Il.push(this.C);this.eH=this.eH.bind(this);this.Hg=this.Hg.bind(this);this.Vu=this.Vu.bind(this);this.Hr(["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_"+l++);this.set("ready",
!1);this.p2=[];this.kq=this.ve=this.kg=null;this.Ki=new q;this.fBa=new r;this.o6a=new b(this.C);this.cq=new r;this.Uh([this.Ki,this.fBa,this.o6a,this.cq])});a.prototype.ec=function(){this.kg=(new c(p.ha)).bo(this.gs.bind(this));this.ve=(new c(p.wc)).Pq(this.gH.bind(this));this.kq=(new c(p.td)).bo(this.i1a.bind(this));g.prototype.ec.call(this);this.get("blendingActive")&&this.Ka.set("globalBlendingActive",this.Ka.get("globalBlendingActive")+1);k.ba(this.C,["currentTime"],this.eH,!0);k.ba(this.C,["frames",
"overlays","vrMenu","flipImageHorizontally"],this.Hg,!0);k.ba(this.C,["adjacentPanoramas"],this.Vu,!0)};a.prototype.kc=function(){this.kg.dispose();this.ve.dispose();this.kq.dispose();this.get("blendingActive")&&this.Ka.set("globalBlendingActive",this.Ka.get("globalBlendingActive")-1);g.prototype.kc.call(this);k.ca(this.C,["currentTime"],this.eH);k.ca(this.C,["frames","overlays","vrMenu","flipImageHorizontally"],this.Hg);k.ca(this.C,["adjacentPanoramas"],this.Vu);this.Dia()};a.prototype.Hg=function(){function t(A,
D,E){A=x.indexOf(A);return A<0?E:w[A].get(D,E)}function u(A){return t(A,"projected",!1)}var v=this.Ka.Sz(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"),y=this.Ka.Sz(w),x=y.slice(),z=y.filter(function(A){return t(A,"projected",!1)||t(A,"required",!1)}).filter(function(A){return t(A,"enabled",!0)});this.C.get("vrMenu")&&y.push(this.Ka.Sz(this.C.get("vrMenu")));y.forEach(function(A){A.set("panoramaId",
this.get("id"))}.bind(this));this.kg.bg(v.concat(y));this.ve.bg(v.concat(y));this.kq.bg(v.concat(z));this.fBa.Uh(y.filter(u));this.Ki.Uh(v);this.cq.Uh(y.filter(function(A){return!u(A)}));this.set("panoramaPixelsPerDegree",d.pIa(this.C));this.jEa()};a.prototype.eH=function(){this.set("currentTime",this.C.get("currentTime",0))};a.prototype.Vu=function(){this.set("adjacentPanoramas",this.C.get("adjacentPanoramas",[]))};a.prototype.gs=function(){this.jk();this.o(p.ha)};a.prototype.i1a=function(){this.jk();
this.set("ready",!0);this.o(p.td)};a.prototype.gH=function(){this.jk()};a.prototype.jk=function(){var t=0;this.ve.Qv(function(u){var v=0,w;this.kg.Gn(u)?v=100:(w=this.ve.Gn(u))&&(v=w.percent);t+=v}.bind(this));this.o(new h(p.wc,t/this.ve.wd.length))};a.prototype.ya=function(t){t.jb&&!this.fq&&n.getType()==n.kx.eo&&this.Uh([this.fq=new e].concat(this.Ab()));var u=this.get("blendingActive");this.set("blendingActive",this.get("alpha")<1);u!=this.get("blendingActive")&&this.Ka.set("globalBlendingActive",
this.Ka.get("globalBlendingActive")+(this.get("blendingActive")?1:-1));this.set("backgroundPreloadEnabled",this.Ka.Jq().get("backgroundPreloadEnabled")!==!1);this.set("preloadEnabled",t.XW);this.W("adjacentPanoramas","loadingActive","preloadEnabled","backgroundPreloadEnabled")&&(this.get("loadingActive")&&this.get("backgroundPreloadEnabled")?this.V5a():this.Dia());this.W("index")&&this.jEa();g.prototype.ya.call(this,t)};a.prototype.Ema=function(){return d.Ema(this.C,this.get("preloadEnabled"))};a.prototype.foa=
function(){return d.foa(this.C,this.get("preloadEnabled"))};a.prototype.V5a=function(){this.Dia();this.p2=this.get("adjacentPanoramas").map(function(t){t=t.get("panorama");return[t,d.ip(t,this.get("preloadEnabled"))]}.bind(this));this.p2.forEach(function(t){f.sFa(t[0],t[1]);f.W6(t[0],1)})};a.prototype.Dia=function(){this.p2.forEach(function(t){f.W6(t[0],-1);f.Efb(t[0],t[1])});this.p2=[]};a.prototype.jEa=function(){var t=this.get("index");this.Ki.Ab().forEach(function(u,v,w){u.set("panoramaIndex",
t);u.set("frameIndex",v);u.set("frameCount",w.length)})};var q=m.extend(g,function(){g.call(this);this.Hr(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("currentTime",0);this.set("tag","Group")});q.prototype.ya=function(t){this.Ab().forEach(function(u,v,w){u.set("frontFrame",w[w.length-1])});g.prototype.ya.call(this,t)};var r=m.extend(g,function(){g.call(this);this.Hr(["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"),k=a("tdv/player/view/panorama/renderer/object/Frame"),p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=0;a=m.extend(k,function(){k.call(this);this.set("tag","PanoramaFrame");this.set("panoramaIndex",0);this.set("frameIndex",0);this.set("frameCount",1);this.set("id","frame_"+
h++)});a.prototype.ya=function(g){k.prototype.ya.call(this,g);this.YH()};a.prototype.cI=function(){if(this.W("panoramaIndex","frameIndex","frameCount","meshGroup")){var g=this.get("meshGroup");if(g){var e=this.get("panoramaIndex"),b=this.get("frameIndex"),c=this.get("frameCount"),d=g.children.length;g.children.forEach(function(f,n){p.C8(f,e+(n+b/c)/d)}.bind(this))}}};a.prototype.YH=function(){if(this.W("meshGroup","panoramaId","id")){var g=this.get("meshGroup");g&&g.children.forEach(function(e,b){p.setAttribute(e,
p.KE,this.get("panoramaId"));p.setAttribute(e,p.t9,b);p.setAttribute(e,p.WJ,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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/constants/Priority"),g=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"),n=a("tdv/view/events/ProgressEvent");
a=m.extend(e,function(q){e.call(this);this.set("tag","ImagePanoramaFrame");this.$Aa=!0;this.C=q;this.Il.push(this.C);this.Ul=this.Hh=this.kq=null;this.jfa=[];this.Hg=this.Hg.bind(this);this.Hr(["loadingActive","currentTime","panoramaId","panoramaPixelsPerDegree"]);this.Uh([this.cq=new l])});a.prototype.ec=function(){this.kq=new b(p.ha);this.Hh=new b(p.ha);this.Ul=new b(p.wc);e.prototype.ec.call(this);k.ba(this.C,["overlays"],this.Hg,!0)};a.prototype.kc=function(){this.kq.dispose();this.Hh.dispose();
this.Ul.dispose();k.ca(this.C,["overlays"],this.Hg);e.prototype.kc.call(this)};a.prototype.Hg=function(){this.cq.Uh(this.Ka.Sz(this.C.get("overlays")));this.SDa()};a.prototype.SDa=function(){this.Hh.bg([].concat(this.jfa,this.cq.Ab()));this.Ul.bg([].concat(this.jfa,this.cq.Ab()))};a.prototype.Np=function(){var q=[],r=[],t=[];c.cma(this.C,this.$Aa).forEach(function(u,v){var w=d.E$a(this.C,u);c.vdb(u)?(v==0&&(q=q.concat(w),r=r.concat(w)),f.zA(w,v==0?f.ju:f.OY),f.yA(w,v==0?f.qr:f.E$)):(v==0&&(q=q.concat(w)),
r=r.concat(w),f.zA(w,f.ju),f.yA(w,f.qr));f.zJ(w,v==0?h.R$:h.Fp);f.LX(w,v);t=t.concat(w)}.bind(this));this.kq.bg(q);this.jfa=r;this.SDa();this.Hh.bo(this.gs.bind(this));this.kq.bo(this.O1a.bind(this));this.Ul.Pq(this.gH.bind(this));this.o(new n(p.wc,0));return t};a.prototype.O1a=function(){this.o(p.td)};a.prototype.gs=function(){this.o(p.ha)};a.prototype.ya=function(q){this.$Aa=q.XW;this.S7a();e.prototype.ya.call(this,q)};a.prototype.S7a=function(){var q=this.get("frontFrame");if(this.W("frontFrame")||
q&&q.W("alpha"))q=q&&q!=this?1-q.get("alpha"):1,this.cq.set("alpha",q)};a.prototype.gH=function(){var q=0;this.Ul.Qv(function(r){var t=0,u;this.Hh.Gn(r)?t=100:(u=this.Ul.Gn(r))&&(t=u.percent);q+=t}.bind(this));this.o(new n(p.wc,q/this.Ul.wd.length))};var l=m.extend(g,function(){g.call(this);this.Hr(["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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/renderer/object/Plane"),h=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),
g=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),e=a("tdv/view/events/ProgressEvent");a=m.extend(p,function(){p.call(this);this.set("tag","ImagePlane");this.set("url",null);this.ve=this.kg=null});a.prototype.ec=function(){this.kg=(new g(k.ha)).bo(this.gs.bind(this));this.ve=(new g(k.wc)).Pq(this.Ly.bind(this));p.prototype.ec.call(this)};a.prototype.kc=function(){this.kg.dispose();this.ve.dispose();p.prototype.kc.call(this)};a.prototype.ya=function(b){if(this.W("url")){var c=this.get("url");
c=c?new h(c):null;this.set("textureSource",c)}p.prototype.ya.call(this,b);this.W("meshGroup")&&(b=(b=this.get("meshGroup"))&&b.children||[],b.length&&(this.kg.bg(b),this.ve.bg(b)))};a.prototype.gs=function(){this.o(k.td);this.o(k.ha)};a.prototype.Ly=function(b,c){var d=0;c.Qv(function(f){(f=c.Gn(f))&&(d+=f.percent)});this.o(new e(k.wc,d/c.wd.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.Sl=!1;this.Yj=[];this.wo=this.cL=void 0;this.kf=[];this.SUa();this.Tba();this.A3();this.xj()}function k(c,d,f){this.time=c;this.cue=d;this.action=f}var p=a("tdv/utils"),h=a("tdv/constants/EventName"),g=a("tdv/events/Event"),e=a("tdv/constants/PlaybackState"),
b=a("tdv/view/av/VideoPlayer");m.prototype.clear=function(){this.vQ();this.Yj=[];this.h7a();this.ra=this.Vd=null};m.prototype.SUa=function(){this.ra.bind(b.sg,this.Jf,this,!0);this.ra.bind(h.Ye,this.xj,this,!0);this.ra.bind(h.Qb,this.zC,this,!0)};m.prototype.h7a=function(){this.ra.h(b.sg,this.Jf,this,!0);this.ra.h(h.Ye,this.xj,this,!0);this.ra.h(h.Qb,this.zC,this,!0)};m.prototype.xj=function(){var c=this.ra.getState()!=e.aa;this.Sl!=c&&((this.Sl=c)?this.A3():this.vQ())};m.prototype.zC=function(){this.gI()};
m.prototype.Jf=function(){this.gI()};m.prototype.A3=function(){this.wo=this.cL=0};m.prototype.gI=function(){if(this.ra&&this.Sl){var c=this.kf.slice(),d=this.ra.getCurrentTime(),f=d-this.cL;f<0&&(this.kf=[],this.wo=0);f=f>=0&&f<2;this.cL=d;var n;for(n=this.wo;n<this.Yj.length&&!(this.Yj[n].time>d);n++);for(;this.wo<n;this.wo++)d=this.Yj[this.wo],d.action=="start"?(this.kf=p.union(this.kf,[d.cue]),f&&d.cue.o(new g(h.gr))):(this.kf=p.union(this.kf,[d.cue]),f&&d.cue.o(new g(h.Qb)));c.length==this.kf.length&&
p.intersection(c,this.kf).length==this.kf.length||this.wU()}};m.prototype.vQ=function(){this.kf.length>0&&(this.kf=[],this.wU())};m.prototype.wU=function(){this.Vd.o(new g(h.sl,{activeCues:this.kf.slice()}))};m.prototype.Tba=function(){this.Yj=[];this.Vd.get("cues",[]).forEach(c=>{this.Yj.push(new k(c.get("startTime",0),c,"start"));this.Yj.push(new k(c.get("endTime",Number.POSITIVE_INFINITY),c,"end"))});this.Yj.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.Ee=e;this.Vd=b;this.ra=c;this.ra.setCurrentTime(this.gg=this.Vd.get("currentTime",0));this.ra.rg(this.Cf=this.Ee.get("mute",!1));this.ra.Yc(this.H=this.Vd.get("state",p.aa));this.ra.setLoop(this.Hl=this.Vd.get("loop"));this.Zb=this.ra.Zi();this.MTa();this.TTa();this.sx()}
var k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/events/Event"),g=a("tdv/view/av/VideoPlayer");m.prototype.clear=function(){this.p3a();this.v3a();this.Xy();this.ra.Yc(p.aa);this.Vd.set("state",p.aa);this.Vd.set("currentTime",0);this.Vd.set("duration",void 0)};m.prototype.DAa=function(){var e=this.Vd.get("state",p.aa);this.H!=e&&this.ra.Yc(this.H=e)};m.prototype.BAa=function(){var e=this.Vd.get("currentTime",0);this.gg!=e&&this.ra.setCurrentTime(this.gg=e)};m.prototype.OS=
function(){var e=this.Ee.get("mute",0);this.Cf!=e&&this.ra.rg(this.Cf=e)};m.prototype.CAa=function(){var e=this.Vd.get("loop");this.Hl!=e&&this.ra.setLoop(this.Hl=e)};m.prototype.YS=function(){this.Vd.set("currentTime",this.gg=this.ra.getCurrentTime())};m.prototype.WS=function(){this.Vd.set("duration",this.Zb=this.ra.Zi())};m.prototype.XS=function(){this.Vd.set("state",this.H=this.ra.getState())};m.prototype.ZS=function(){this.Vd.o(new h(k.Qb))};m.prototype.MTa=function(){this.Ee.bind(k.K("mute"),
this.OS,this,!0)};m.prototype.p3a=function(){this.Ee.h(k.K("mute"),this.OS,this,!0)};m.prototype.TTa=function(){this.Vd.bind(k.K("state"),this.DAa,this,!0);this.Vd.bind(k.K("currentTime"),this.BAa,this,!0);this.Vd.bind(k.K("loop"),this.CAa,this,!0)};m.prototype.v3a=function(){this.Vd.h(k.K("state"),this.DAa,this,!0);this.Vd.h(k.K("currentTime"),this.BAa,this,!0);this.Vd.h(k.K("loop"),this.CAa,this,!0)};m.prototype.sx=function(){this.ra.bind(g.sg,this.YS,this,!0);this.ra.bind(g.Pj,this.WS,this,!0);
this.ra.bind(k.Ye,this.XS,this,!0);this.ra.bind(k.Qb,this.ZS,this,!0)};m.prototype.Xy=function(){this.ra.h(g.sg,this.YS,this,!0);this.ra.h(g.Pj,this.WS,this,!0);this.ra.h(k.Ye,this.XS,this,!0);this.ra.h(k.Qb,this.ZS,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/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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/Priority"),h=a("tdv/constants/PlaybackState"),g=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"),
n=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),l=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/view/av/SubtitleController"),u=a("tdv/view/av/VideoPlayer"),v=a("tdv/view/events/ProgressEvent"),w=a("tdv/view/util/Assets"),y=a("tdv/view/util/Ease"),x=a("tdv/view/util/EaseDimension");a=m.extend(e,function(B){e.call(this);this.C=B;this.Il.push(this.C);this.Hr(["loadingActive",
"currentTime","panoramaPixelsPerDegree"]);this.set("tag","VideoPanoramaFrame");this.set("frameEmpty",void 0);this.set("hasStableContent",void 0);this.u_=void 0;this.set("atStart",void 0);n.get(this.C)==n.rr?this.fka=this.C.get("sphere"):this.fka=this.C.get("stereoSphere");this.Sl=!1;this.pb=u.rk(this.fka);this.Lga=this.Yua=!1;this.pN=[];this.vH=[];this.Xo=this.Rl=this.Ul=this.Hh=this.Nh=this.ra=null;this.jn=!1;this.Gxa=this.iC=this.jC=0});a.prototype.ec=function(){this.Hh=(new b(k.ha)).bo(this.gs.bind(this));
this.Ul=(new b(k.wc)).Pq(this.gH.bind(this));this.ra=new u(this.Ka.Jq(),this.fka);this.Pr=new d(this.C.AD(),this.ra);this.Ta=new f(this.Ka.Jq(),this.C.AD(),this.ra);this.rn=new t(this.C.AD(),this.ra);this.sx();this.PWa();this.Yua=this.Ka.kd.get("displayPlayOverlay");this.Lga=this.Ka.kd.get("clickAction")=="play_pause";var B=this.Ka.Yf(this.C.AD());B.appendChild(this.Rl);B.appendChild(this.Xo);e.prototype.ec.call(this)};a.prototype.kc=function(){this.Hh.dispose();this.Ul.dispose();this.Xy();this.Pr.clear();
this.Pr=null;this.Ta.clear();this.Ta=null;this.rn.clear();this.rn=null;this.ra.clear();this.Nh=this.ra=null;this.eva();e.prototype.kc.call(this)};a.prototype.PWa=function(){this.eva();this.Rl=this.Lua(w.ax,w.tK,w.SY);this.Xo=this.Lua(w.sK,w.bSa,w.aSa)};a.prototype.Lua=function(B,C,I){var F=new g;F.set("url",B);F.set("contentWidth",C);F.set("contentHeight",I);F.set("hfov",10);F.set("yaw",0);F.set("pitch",0);F.set("alpha",0);return F};a.prototype.eva=function(){this.Rl&&(this.Rl.remove(),this.Rl=null);
this.Xo&&(this.Xo.remove(),this.Xo=null)};a.prototype.Np=function(){this.pN=c.Y$a(this.C,this.pb);this.y8a=q.OJ(l.zD(this.pN[0])[0]);this.pN.forEach(function(C){q.zA(C,q.ju);q.yA(C,q.qr)});this.pb.get("posterURL")?(this.vH=c.Z$a(this.C,this.pb),this.vH.forEach(function(C){q.zA(C,q.ju);q.yA(C,q.qr);q.zJ(C,p.R$)})):this.vH=[];var B=[].concat(this.pN,this.vH);this.Hh.bg(B);this.Ul.bg(B);this.o(new v(k.wc,0));return B};a.prototype.ya=function(B){this.V7a(B);var C=this.ra.M5();this.set("frameEmpty",C.isEmpty());
this.set("atStart",!(this.get("currentTime")>1));this.vja();e.prototype.ya.call(this,B);this.Nh&&this.Nh.isEqual(C)?this.ra.getState()==h.PLAYING&&this.Ma():(this.Nh=C,this.y8a.Vn(this.Nh.Hu),this.Ma())};a.prototype.vja=function(){this.get("frameEmpty")?this.set("hasStableContent",!1):this.get("currentTime")>this.u_+.2?this.set("hasStableContent",!0):this.get("currentTime")==0&&this.bfa>this.ra.Zi()-.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.W("frameEmpty")&&!this.get("frameEmpty")&&
(this.u_=this.get("currentTime"));!this.get("frameEmpty")&&this.get("currentTime")>0&&(this.bfa=this.get("currentTime"))};a.prototype.wn=function(){this.W("composedAlpha","meshGroup","frameEmpty","hasStableContent","atStart")&&(this.vH.length&&!this.get("hasStableContent")&&this.get("atStart")?(this.vH.forEach(function(B){l.zf(B,this.get("composedAlpha"))}.bind(this)),this.pN.forEach(function(B){l.zf(B,0)}.bind(this))):(this.vH.forEach(function(B){l.zf(B,0)}.bind(this)),this.pN.forEach(function(B){l.zf(B,
this.get("composedAlpha"))}.bind(this))))};a.prototype.gs=function(){this.o(k.td);this.o(k.ha)};a.prototype.gH=function(B,C){var I=0;C.Qv(function(F){(F=C.Gn(F))&&(I+=F.percent)});this.o(new v(k.wc,I/C.wd.length))};a.prototype.xj=function(){this.Ma()};a.prototype.Jf=function(){this.Ma()};a.prototype.Un=function(B){if(B.Rf==k.Pf&&!B.km()&&this.Lga&&(B.Nt(this.C),B=Date.now(),!(B-this.Gxa<500))){this.Gxa=B;B=this.C.AD();var C=B.get("state");C==h.PLAYING?B.set("state",h.Xb):C==h.Xb&&B.set("state",h.PLAYING)}};
a.prototype.V7a=function(B){if(this.Lga){if(this.jn!=(this.ra.getState()==h.Xb))if(this.jn=!this.jn,this.Yua){var C=this.Rl.get("alpha"),I=this.jn?1:0;this.Py=new y("linear",[new x("playAlpha",C,I),new x("playScale",B.jb?1.5:1,B.jb?1.5:1),new x("pauseAlpha",0,0),new x("pauseScale",1,1)],Math.abs(I-C)*z);this.Rl.mi()}else this.Py=new y("linear",this.jn?[new x("playAlpha",0,0),new x("playScale",1,1),new x("pauseAlpha",0,2),new x("pauseScale",.5,1.5)]:[new x("playAlpha",0,2),new x("playScale",.5,1.5),
new x("pauseAlpha",0,0),new x("pauseScale",1,1)],A),this.Rl.mi(),this.Xo.mi();this.Py&&(this.Py.Lb(B.vf),C=this.Py.ib("playAlpha"),this.Rl.set("alpha",C<1?C:2-C),this.Rl.set("scale",this.Py.ib("playScale")),C=this.Py.ib("pauseAlpha"),this.Xo.set("alpha",C<1?C:2-C),this.Xo.set("scale",this.Py.ib("pauseScale")),this.Ma(),this.Py.Qe()&&(this.Py=null));this.Rl.get("alpha")>0&&(this.get("globalBlendingActive")&&this.Rl.set("alpha",0),this.Rl.set("yaw",B.Za),this.Rl.set("pitch",B.pitch),this.Rl.set("hfov",
this.Gwa(B)));this.Xo.get("alpha")>0&&(this.get("globalBlendingActive")&&this.Xo.set("alpha",0),this.Xo.set("yaw",B.Za),this.Xo.set("pitch",B.pitch),this.Xo.set("hfov",this.Gwa(B)))}};var z=300,A=600;a.prototype.Gwa=function(B){return B.jb?15:2*Math.atan((r.yb()?Math.min(B.width,B.height)/100*20:w.tK)*Math.tan(B.Wd*D*.5)/B.width)*E};var D=Math.PI/180,E=180/Math.PI;a.prototype.sx=function(){this.ra.bind(u.sg,this.Jf,this,!0);this.ra.bind(k.Ye,this.xj,this,!0)};a.prototype.Xy=function(){this.ra.h(u.sg,
this.Jf,this,!0);this.ra.h(k.Ye,this.xj,this,!0)};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(B){setTimeout(B,
0)}function k(B,C){for(B-=C;B>180;)B-=360;for(;B<-180;)B+=360;return B+C}var p=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),g=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"),n=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),
l=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"),y=a("tdv/view/util/Ease"),x=a("tdv/view/util/EaseDimension"),z=a("tdv/view/av/VideoPlayer"),A=Math.PI/180;a=p.extend(b,function(B){b.call(this);
this.C=B;this.Il.push(this.C);this.Hg=this.Hg.bind(this);this.J1=this.J1.bind(this);this.Hr(["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.aa);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.Zd=this.Jb=this.gb=this.ve=this.kg=null;this.Hb=new l;this.zx=this.gC=this.yn=this.Nh=this.ra=null});a.prototype.ec=function(){this.kg=(new q(g.ha)).bo(this.cH.bind(this));this.ve=(new q(g.wc)).Pq(this.fH.bind(this));b.prototype.ec.call(this);this.dWa();this.appendChild(this.Zd);h.ba(this.C,D,this.Hg,!0);h.fD(this.C,E,this.J1,!0)};var D="playbackPositions popupDistance popupMaxHeight popupMaxWidth image.levels.url video state".split(" "),
E=["visible"];a.prototype.kc=function(){this.kg.dispose();this.ve.dispose();h.ca(this.C,D,this.Hg);h.ca(this.C,E,this.J1);this.hG();this.SB();this.Nx();b.prototype.kc.call(this)};a.prototype.Hg=function(){var B=r.Obb(this.C,this.get("panoramaPixelsPerDegree"));this.set("imageURL",B&&B.get("url"));this.set("imageWidth",B&&B.get("width"));this.set("imageHeight",B&&B.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.J1=function(){this.set("visible",this.C.get("visible"))};a.prototype.ya=function(B){this.KC=B.Za;this.JC=B.pitch;this.Rs(B);this.W7a();this.JU(B);this.we(B);this.I7a(B);this.r7a(B);b.prototype.ya.call(this,B)};a.prototype.W7a=function(){this.W("playbackPositions","currentTime")&&(this.Hb.vE(this.get("playbackPositions")),
this.Hb.tE(this.get("currentTime")),this.set("sourceYaw",this.Hb.get("yaw")),this.set("sourcePitch",this.Hb.get("pitch")),this.set("sourceRotationX",this.Hb.get("rotationX")),this.set("sourceRotationY",this.Hb.get("rotationY")),this.set("sourceRotationZ",this.Hb.get("rotationZ")),this.set("sourceHFOV",this.Hb.get("hfov")))};a.prototype.Rs=function(){if(this.W("video","imageURL")){var B=[this.Zd];this.W("imageURL")&&(this.FQ(),this.gb&&B.push(this.gb),this.HT("itemVisible"));this.W("video")&&(this.HQ(),
this.Jb&&B.push(this.Jb),this.HT("itemVisible"));this.kg.bg(B);this.ve.bg(B);this.Uh(B)}};a.prototype.JU=function(){if(this.ra){var B=this.ra.M5();this.set("frameEmpty",!!B&&B.isEmpty());!this.Nh||B&&!this.Nh.isEqual(B)?(this.Nh=B,this.Jb.set("source",this.Nh.Hu),this.Jb.set("sourceUpdated",!0),this.Ma()):this.ra.getState()==e.PLAYING&&this.Ma()}else this.set("frameEmpty",!1)};a.prototype.we=function(B){this.set("inVR",B.jb);this.set("hotspotsEnabled",B.RI);this.set("rendererYaw",B.Za);this.set("rendererPitch",
B.pitch);this.set("rendererRoll",B.fh);this.set("rendererWidth",B.Yi);this.set("rendererHeight",B.Xi);this.set("rendererHFOV",B.Wd);if(this.W("visible")){var C=this.get("visiblePosition"),I=this.get("visible")?1:0,F=Math.max(1,this.C.get(this.get("visible")?"showDuration":"hideDuration")*Math.abs(I-C)),G=this.C.get(this.get("visible")?"showEasing":"hideEasing");C!=I&&(this.yn=new y(G,[new x("position",C,I)],F));this.get("visible")||(this.set("actualVisible",!1),this.ra&&this.ra.Yc(e.aa))}this.yn&&
(this.yn.Qe()?(this.yn=null,this.get("visible")?(this.set("actualVisible",!0),this.C.o(g.VP),this.C.get("autoplay")&&this.ra&&this.ra.Yc(e.PLAYING)):m(function(){this.C&&this.C.o(g.kK)}.bind(this))):this.yn.Lb(B.vf),this.yn&&(this.set("visiblePosition",this.yn.ib("position")),this.Ma()));C=!1;if(C=B.jb?this.W("visible","itemVisible"):this.W("rendererYaw","rendererPitch","rendererRoll","rendererWidth","rendererHeight","rendererHFOV","itemVisible","popupMaxWidth","popupMaxHeight","sourceHFOV"))this.set("targetImageScale",
this.Nwa(this.gb,B)),this.set("targetVideoScale",this.Nwa(this.Jb,B)),this.set("targetYaw",k(this.get("rendererYaw"),this.get("sourceYaw"))),this.set("targetPitch",this.get("rendererPitch")),this.set("targetRotationZ",k(B.jb?0:this.get("rendererRoll"),this.get("sourceRotationZ")));if(C||this.W("visiblePosition","targetScale","targetYaw","targetPitch","targetRoll","popupDistance","hfov")){I=this.get("visiblePosition");var N=this.get("targetYaw")*I+this.get("sourceYaw")*(1-I),O=this.get("targetPitch")*
I+this.get("sourcePitch")*(1-I),R=this.get("sourceRotationX")*(1-I),S=this.get("sourceRotationY")*(1-I),K=this.get("targetRotationZ")*I+this.get("sourceRotationZ")*(1-I);B=Math.min(1,2*I);var L=this.get("popupDistance"),Q=this.get("sourceHFOV");C=this.get("targetImageScale")*I+(1-I);I=this.get("targetVideoScale")*I+(1-I);this.set("alpha",B);this.gb&&this.gb.set("scale",C);this.Jb&&this.Jb.set("scale",I);[].concat(this.Jb?[this.Jb]:[],this.gb?[this.gb]:[]).forEach(function(T){T.set("yaw",N);T.set("pitch",
O);T.set("rotationX",R);T.set("rotationY",S);T.set("rotationZ",K);T.set("distance",L);T.set("hfov",Q)})}};a.prototype.I7a=function(B){if(this.W("frameEmpty","state","imageURL","video")){var C="none";!this.Jb||this.gb&&(this.get("frameEmpty")||this.get("state")==e.aa)?this.gb&&(C="image"):C="video";this.set("itemVisible",C)}if(this.W("itemVisible")){this.get("itemVisible")!="video"&&this.ra&&this.ra.Yc(e.aa);C=this.gb?this.gb.get("alpha"):0;var I=this.Jb?this.Jb.get("alpha"):0,F=this.get("itemVisible")==
"image"?1:0,G=this.get("itemVisible")=="video"?1:0,N=this.get("itemVisible")=="video"?1:Math.max(Math.abs(F-C),Math.abs(G-I))*200;this.gC=new y("linear",[new x("imageAlpha",C,F),new x("videoAlpha",I,G)],N)}this.gC&&(this.gC.Qe()?this.gC=null:this.gC.Lb(B.vf),this.gC&&(this.gb&&this.gb.set("alpha",this.gC.ib("imageAlpha")),this.Jb&&this.Jb.set("alpha",this.gC.ib("videoAlpha")),this.Ma()))};a.prototype.r7a=function(B){this.W("gazeOver","inVR","visible","actualVisible")&&(this.lua(),this.get("inVR")&&
this.C.get("lookAwayToHide")&&!this.get("gazeOver")&&this.get("actualVisible")&&this.S5a());B.jb&&this.C.get("darkenBackground")&&this.C.get("lookAwayToHide")?(this.W("visible")&&this.get("visible")&&(this.Zd.set("alpha",.8),this.zx=null),this.W("gazeOver")&&(this.zx=new y(this.get("gazeOver")?"linear":"quad_in",[new x("alpha",this.Zd.get("alpha"),this.get("gazeOver")?.8:0)],this.get("gazeOver")?300:this.C.get("lookAwayToHideTime")))):(this.zx=null,this.Zd.set("alpha",B.jb&&this.C.get("darkenBackground")?
.8:0));this.zx&&(this.zx.Qe()?this.zx=null:this.zx.Lb(B.vf),this.zx&&(this.Zd.set("alpha",this.zx.ib("alpha")),this.Ma()))};a.prototype.S5a=function(){this.lua();this.A0=setTimeout(function(){this.A0=null;this.C.set("visible",!1)}.bind(this),this.C.get("lookAwayToHideTime"))};a.prototype.lua=function(){this.A0&&(clearTimeout(this.A0),this.A0=null)};a.prototype.Nwa=function(B,C){if(!B)return 1;var I=this.get("popupMaxWidth","100%"),F=v.pp(I),G=B.get("contentWidth"),N=B.get("contentHeight"),O=this.get("popupMaxHeight",
"100%"),R=v.pp(O);if(this.get("inVR")){var S=B=this.get("rendererWidth")*.5,K=Math.min(C.Wi,80);C=u.vI(K,B,S);var L=this.get("sourceHFOV");I=Math.min(Math.tan(C*(F!==void 0?F/100:I/B)*.5*A)/Math.tan(L*.5*A),Math.tan(K*(R!==void 0?R/100:O/S)*.5*A)/Math.tan(u.vI(L,G,N)*.5*A))}else B=this.get("rendererWidth"),S=this.get("rendererHeight"),I=G*Math.min((F!==void 0?B*F/100:I)/G,(R!==void 0?S*R/100:O)/N),C=this.get("rendererHFOV"),L=this.get("sourceHFOV"),I=Math.tan(C*.5*A)*I/B/Math.tan(L*.5*A);return I};
a.prototype.FQ=function(){this.hG();this.get("imageURL")&&(this.gb=new f,this.gb.set("url",this.get("imageURL")),this.gb.set("contentWidth",this.get("imageWidth")),this.gb.set("contentHeight",this.get("imageHeight")),this.gb.set("alpha",0))};a.prototype.hG=function(){this.gb&&(this.gb.remove(),this.gb=null)};a.prototype.HQ=function(){this.SB();if(this.get("video")){this.Jb=new d;var B=z.rk(this.get("video"));this.Jb.set("contentWidth",B.get("width"));this.Jb.set("contentHeight",B.get("height"));this.Jb.set("alpha",
0);this.Jb.set("sourceIsVideo",!0);this.ra=new z(this.Ka.Jq(),this.get("video"));this.Ta=new n(this.Ka.Jq(),this.C,this.ra);this.sx()}};a.prototype.SB=function(){this.Jb&&(this.Xy(),this.Ta.clear(),this.Ta=null,this.ra.clear(),this.Nh=this.ra=null,this.Jb.remove(),this.Jb=null)};a.prototype.dWa=function(){this.Nx();this.Zd=new c("#000000")};a.prototype.Nx=function(){this.Zd&&(this.Zd.remove(),this.Zd=null)};a.prototype.cH=function(){this.o(g.td);this.o(g.ha)};a.prototype.fH=function(B,C){var I=0;
C.Qv(function(F){var G=0,N;this.kg.Gn(F)?G=100:(N=this.ve.Gn(F))&&(G=N.percent);I+=G}.bind(this));this.o(new w(g.wc,I/C.wd.length))};a.prototype.xj=function(){this.Ma()};a.prototype.Jf=function(){this.Ma()};a.prototype.zC=function(){this.C.o(g.Qb)};a.prototype.sx=function(){this.ra.bind(z.sg,this.Jf,this,!0);this.ra.bind(g.Ye,this.xj,this,!0);this.ra.bind(g.Qb,this.zC,this,!0)};a.prototype.Xy=function(){this.ra.h(z.sg,this.Jf,this,!0);this.ra.h(g.Ye,this.xj,this,!0);this.ra.h(g.Qb,this.zC,this,!0)};
a.prototype.Un=function(B){B.Rf==g.Gm?(!B.km()&&this.get("visible")?(B.Nt(this.C),this.set("over",this.Ms(B)),this.set("gazeOver",this.z6a(B))):this.set("over",!1),this.get("over")&&(B.gD(this.C),B.ew()&&B.kI(this.C),B.gm(this.get("popupDistance"))),this.W("over")&&(this.C.o(this.get("over")?g.rc:g.Db),B.ew()&&this.C.o(this.get("over")?g.lF:g.sr))):B.Rf==g.Pf&&!B.km()&&this.get("visible")&&(B.Nt(this.C),B.gm(this.get("popupDistance")),this.Ms(B)?B.odb()||this.C.o(g.oa):this.C.set("visible",!1))};
a.prototype.Ms=function(B){return this.tDa(B.Cs)};a.prototype.z6a=function(B){B=B.cO();return!!B&&this.tDa([B])};a.prototype.tDa=function(B){if(this.get("visible")){B=(this.get("itemVisible")=="video"?this.Jb:this.gb).$x(B);for(var C=0;C<B.length;C++){var I=B[C];if(t.DA(I.source,I.x,I.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"),k=a("tdv/player/view/panorama/renderer/object/Base");a=m.extend(k,function(){k.call(this);this.JB&&this.JB();this.Op&&this.Op()});a.prototype.ec=function(){k.prototype.ec.call(this);this.gq&&this.gq();this.uM&&this.uM()};a.prototype.kc=function(){this.iq&&this.iq();this.wM&&this.wM();k.prototype.kc.call(this)};a.prototype.ya=function(p){this.Vf&&
this.Vf(p);k.prototype.ya.call(this,p);this.Aq&&this.Aq(p)};return a});
define("tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{JB:function(){this.set("beamEnabled",!1);this.zd=!1;this.JC=this.KC=void 0},Aq:function(k){this.KC=k.Za;this.JC=k.pitch},Un:function(k){if(k.Rf==m.Gm){var p=!k.km()&&this.Ms(k);if(p){k.gD(this.C);this.C.get("useHandCursor")&&k.kI(this.C);k.gm(this.get("distance"));var h=this.fc(k.YI());h&&k.F4(h,this.WC(k.YI()))}this.zd!=p&&
(this.zd=p,this.C.o(this.zd?m.rc:m.Db),k.ew()&&this.C.o(this.zd?m.lF:m.sr))}else k.Rf==m.Pf&&!k.km()&&this.Ms(k)&&(this.C.gO(m.oa,!0).length>1&&k.Nt(this.C),k.gm(this.get("distance")),this.C.o(m.oa))},Ms:function(k){return this.get("beamEnabled")&&this.Nda().$x(k.Cs).length>0?!0:!1},fc:function(k){return!k||this.C.get("displayTooltipInTouchScreens")&&this.Ka.R.get("displayTooltipInTouchScreens")!==!1?this.C.get("toolTip",""):""},WC:function(k){if(k){k=this.get("yaw")-this.KC;var p=this.get("pitch")-
this.JC;return Math.sqrt(k*k+p*p)}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"),k=a("tdv/binding/BindingsHandler"),
p=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/object/ComposedObject"),g=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(h,a,g,function(c){h.call(this);this.C=c;this.HG=this.jda=this.jea=null;this.Il.push(this.C);this.Hg=this.Hg.bind(this);
this.Hr(["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.vg=this.Ou=this.ve=this.kg=null;this.Zha(this.C)});m.prototype.ec=
function(){this.kg=(new e(p.ha)).bo(this.cH.bind(this));this.ve=(new e(p.wc)).Pq(this.fH.bind(this));this.mWa();h.prototype.ec.call(this);k.ba(this.C,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.Hg,!0);this.dda()};m.prototype.kc=function(){this.eda();this.kg.dispose();this.ve.dispose();k.ca(this.C,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.Hg);this.ava();
this.cva();h.prototype.kc.call(this)};m.prototype.Hg=function(){this.set("url",this.C.get("url"));this.vg.set("url",this.get("url"));this.set("image",this.C.get("image"));this.gb.set("image",this.get("image"));this.gb.set("level",this.get("image")&&b.aIa(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.Ma()};m.prototype.ya=function(c){this.set("loaded",!!this.vg&&this.vg.get("frameLoaded"));this.set("inVR",c.jb);this.set("inScreenshot",c.TI);this.set("hotspotsEnabled",c.RI);h.prototype.ya.call(this,c);this.we(c);this.sja(c)};m.prototype.mWa=function(){this.FQ();this.yWa();this.xWa();var c=[this.gb,this.Ou,this.vg];this.kg.bg(c);this.ve.bg(c);this.Uh(c)};m.prototype.we=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.vg.set("contentInteractive",c&&this.get("interactionEnabled")&&this.get("contentInteractive"))}this.set("frameHidden",!this.vg.get("geometryVisible"));this.W("visible","loaded","frameHidden","transparent","inScreenshot")&&(this.get("visible")||this.set("loaded",!1),this.gb.set("alpha",!this.get("visible")||!this.get("frameHidden")&&this.get("loaded")?0:1),this.gb.set("alpha",1),this.Ou.set("alpha",!this.get("visible")||this.get("frameHidden")||
!this.get("loaded")||this.get("transparent")||this.get("inScreenshot")?0:1),this.vg.set("alpha",this.get("visible")?1:0),this.vg.set("transparent",this.get("transparent")),this.set("inView",this.get("visible")&&(this.get("loaded")||this.get("image"))),this.Ma());this.W("inView")&&this.C.o(this.get("inView")?p.Cd:p.sd)};m.prototype.FQ=function(){this.hG();this.gb=new this.HG;this.gb.set("image",this.get("image"));this.gb.set("level",this.get("image")&&b.aIa(this.C,this.get("panoramaPixelsPerDegree")));
this.gb.set("visible",!0);this.gb.set("alpha",0);this.set("imagePlane",this.gb)};m.prototype.hG=function(){this.gb&&(this.gb.remove(),this.gb=null,this.set("imagePlane",null))};m.prototype.xWa=function(){this.ava();this.vg=new this.jda;this.vg.bind(p.ha,this.Mva,this,!0);this.vg.set("url",this.get("url"));this.vg.set("visible",!0);this.vg.set("alpha",1);this.set("framePlane",this.vg)};m.prototype.ava=function(){this.vg&&(this.vg.h(p.ha,this.Mva,this,!0),this.vg.remove(),this.vg=null,this.set("framePlane",
null))};m.prototype.yWa=function(){this.cva();this.Ou=new this.jea;this.Ou.set("visible",!0);this.Ou.set("alpha",1);this.set("holePlane",this.Ou)};m.prototype.cva=function(){this.Ou&&(this.Ou.remove(),this.Ou=null,this.set("holePlane",null))};m.prototype.Nda=function(){return this.Ou};m.prototype.Mva=function(){this.Ma()};m.prototype.cH=function(){this.o(p.td);this.o(p.ha)};m.prototype.fH=function(c,d){var f=0;d.Qv(function(n){(n=d.Gn(n))&&(f+=n.percent)});this.o(new ProgressEvent(p.wc,f/d.wd.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"),k=a("tdv/player/view/panorama/renderer/object/Base");a=m.extend(k,function(){k.call(this);this.set("tag","ComposedCSSObject");this.set("transparent",!1);this.set("cssScene",null);this.set("cssSceneOver",null);this.set("cssObject",this.Qba());this.Ix&&this.Ix();this.eG&&this.eG();this.JB&&this.JB();this.Op&&this.Op()});a.prototype.Qba=
function(){var p=new THREE.CSS3DObject;p.matrixAutoUpdate=!1;return p};a.prototype.ec=function(){k.prototype.ec.call(this);this.gq&&this.gq();this.TR&&this.TR();this.uM&&this.uM()};a.prototype.kc=function(){this.QL&&this.QL();this.wM&&this.wM();this.iq&&this.iq();var p=this.get("cssObject");p&&p.parent&&p.parent.remove(p);this.set("cssScene",null);k.prototype.kc.call(this)};a.prototype.ya=function(p){this.Vf&&this.Vf(p);k.prototype.ya.call(this,p);this.set("cssScene",p.sV);this.set("cssSceneOver",
p.tV);if(this.W("transparent")){var h=this.get("cssObject");h&&h.parent&&h.parent.remove(h)}this.W("cssScene","cssSceneOver","transparent")&&(h=this.get("transparent")?p.tV:p.sV)&&h.add(this.get("cssObject"));this.wn();this.Ij&&this.Ij(p);this.rz&&this.rz(p);this.cI()};a.prototype.wn=function(){this.W("composedAlpha","meshGroup")&&this.tB()};a.prototype.tB=function(){this.get("cssObject").element.style.display=this.get("composedAlpha")>0?"block":"none"};a.prototype.cI=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"),k=a("tdv/player/view/util/geo/Vector"),p=new THREE.Matrix4,h=Math.PI/180;return{Ix:function(){this.set("vertices",void 0);this.li=new THREE.Matrix4;this.ie=new THREE.Matrix4;this.hq=new THREE.Matrix4;this.yo=new THREE.Matrix4;this.fs=new THREE.Matrix4},
Qba:function(){var g=new THREE.CSS3DQuad;g.matrixAutoUpdate=!1;return g},rz:function(g){var e=!1;if(this.W("vertices","contentWidth","contentHeight")){var b=this.get("vertices");e=k.Nz(b[0].get("yaw")*h,b[0].get("pitch")*h).normalize();var c=k.Nz(b[1].get("yaw")*h,b[1].get("pitch")*h).normalize(),d=k.Nz(b[2].get("yaw")*h,b[2].get("pitch")*h).normalize();b=k.Nz(b[3].get("yaw")*h,b[3].get("pitch")*h).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.li.makeTranslation(-this.get("composedTranslationX")*.5*m.jh,this.get("composedTranslationY")*.5*m.jh,this.get("composedTranslationZ")*.5*m.jh),c=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ie.makeRotationY(-g.Za*h),this.ie.multiply(p.makeRotationX(-this.get("composedDeltaPitch")*
h)),this.ie.multiply(p.makeRotationY(this.get("composedDeltaYaw")*h)),this.ie.multiply(p.makeRotationY(g.Za*h)),c=!0);if(c||this.W("meshGroup"))this.fs.copy(this.li),this.fs.multiply(this.ie),this.get("cssObject").matrix.copy(this.fs),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",g.Za);this.set("cameraPitch",g.pitch);this.set("cameraRoll",g.fh);this.set("cameraHfov",g.Wd);this.set("cameraWidth",g.width);this.set("cameraHeight",g.height);g.camera&&(c||e||this.W("cameraYaw","cameraPitch",
"cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(g.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.W("geometryVisible")&&this.Gha())}}});
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"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/player/view/panorama/renderer/TextureLoader"),
g=a("tdv/player/view/util/geo/Vector"),e=new THREE.Matrix4,b=Math.PI/180;return{Ix:function(){this.set("distance",void 0);this.set("vertices",void 0);this.Fh=null;this.li=new THREE.Matrix4;this.ie=new THREE.Matrix4;this.mn=new THREE.Matrix4;this.tj=new THREE.Matrix4},rz:function(c){this.q8a(c);this.Ss(c)},tL:function(){var c=this.get("meshGroup");return c?p.om(c)[0]:null},Np:function(){this.Fh||(this.Fh=this.IB());return[0].map(function(c){var d=this.DQ();c=p.create(this.Fh[c],d);h.yA(c,h.qr);h.zA(c,
h.ju);h.zJ(c,m.SP);h.LX(c,1);return c}.bind(this))},q8a:function(){if(this.W("vertices")){var c=this.get("meshGroup");if(c)return this.Fh&&this.Fh.forEach(function(d){k.dispose(d)}),this.Fh=this.IB(),p.om(c).map(function(d,f){p.Toa(d,this.Fh[f])}.bind(this))}},IB:function(){function c(w){return w==0||isNaN(w)||!isFinite(w)}var d=this.get("vertices")||[];if(d.length!=4)return[k.KGa(-1,1,1,1,1,1,1,-1,1,-1,-1,1)];var f=g.Nz(d[0].get("yaw")*b,d[0].get("pitch")*b).normalize(),n=g.Nz(d[1].get("yaw")*b,
d[1].get("pitch")*b).normalize(),l=g.Nz(d[2].get("yaw")*b,d[2].get("pitch")*b).normalize();d=g.Nz(d[3].get("yaw")*b,d[3].get("pitch")*b).normalize();var q=f.clone().e5(l),r=d.clone().e5(n),t=q.clone().e5(r).normalize();r=(f.y*2*t.x/f.x-2*t.y)/(-l.y+f.y*l.x/f.x);c(r)&&(r=(f.z*2*t.x/f.x-2*t.z)/(-l.z+f.z*l.x/f.x));c(r)&&(r=(f.z*2*t.y/f.y-2*t.z)/(-l.z+f.z*l.y/f.y));var u=(2*t.x-l.x*r)/f.x;c(u)&&(u=(2*t.y-l.y*r)/f.y);c(u)&&(u=(2*t.z-l.z*r)/f.z);q=(n.y*2*t.x/n.x-2*t.y)/(-d.y+n.y*d.x/n.x);c(q)&&(q=(n.z*
2*t.x/n.x-2*t.z)/(-d.z+n.z*d.x/n.x));c(q)&&(q=(n.z*2*t.y/n.y-2*t.z)/(-d.z+n.z*d.y/n.y));var v=(2*t.x-d.x*q)/n.x;c(v)&&(v=(2*t.y-d.y*q)/n.y);c(v)&&(v=(2*t.z-d.z*q)/n.z);f=f.BX(u);n=n.BX(v);l=l.BX(r);d=d.BX(q);return[k.KGa(f.x,f.y,-f.z,n.x,n.y,-n.z,l.x,l.y,-l.z,d.x,d.y,-d.z)]},Ss:function(c){var d=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.li.makeTranslation(-this.get("composedTranslationX")*.5*k.jh,this.get("composedTranslationY")*.5*k.jh,this.get("composedTranslationZ")*
.5*k.jh),d=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ie.makeRotationY(-c.Za*b),this.ie.multiply(e.makeRotationX(-this.get("composedDeltaPitch")*b)),this.ie.multiply(e.makeRotationY(this.get("composedDeltaYaw")*b)),this.ie.multiply(e.makeRotationY(c.Za*b)),d=!0);this.W("distance","composedTranslationX","composedTranslationY","composedTranslationZ")&&(c=this.Ha.get("composedTranslationX")==0&&this.Ha.get("composedTranslationY")==0&&this.Ha.get("composedTranslationZ")==
0&&this.get("distance")!==void 0?k.Vv(this.get("distance")):k.mt(),this.mn.makeScale(c,c,c),d=!0);if(d||this.W("meshGroup"))this.tj.copy(this.li),this.tj.multiply(this.ie),this.tj.multiply(this.mn),c=p.om(this.get("meshGroup")),p.ct(c[0],this.tj)}}});
define("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{eG: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.Nc=this.Nd=null;this.R_=void 0;this.x4=this.x4.bind(this);this.y4=this.y4.bind(this);this.z4=this.z4.bind(this);this.GG=this.GG.bind(this);
this.oea=this.oea.bind(this)},Ij:function(){this.W("cssObject")&&(this.zWa(),this.get("cssObject").element.appendChild(this.Nd));this.W("url")&&this.Q4a(this.get("url"));this.W("contentWidth","contentHeight")&&(this.Nd.style.width=this.get("contentWidth")+2+"px",this.Nd.style.height=this.get("contentHeight")+2+"px");this.W("contentInteractive")&&(this.Nd.style.pointerEvents=this.get("contentInteractive")?"auto":"none")},wn:function(){this.W("composedAlpha")&&(this.get("composedAlpha")>0?this.Nc&&
!this.Nc.parentNode&&(this.iEa(),this.Nd.appendChild(this.Nc)):this.Nc&&this.Nc.parentNode&&this.Nd.removeChild(this.Nc))},TR:function(){this.o(m.td);this.get("frameLoaded")&&this.o(m.ha)},QL:function(){this.JVa()},y4:function(k){k.preventDefault();k.stopImmediatePropagation()},x4:function(){this.Ka.Jq().lE(null)},z4:function(k){k.preventDefault();k.stopImmediatePropagation()},GG:function(){this.set("frameLoaded",!0);this.o(m.ha)},oea:function(){this.S_=null;this.GG()},zWa:function(){this.Nc||(this.Nd=
document.createElement("div"),this.Nd.style.position="absolute",this.Nd.style.left=this.Nd.style.top="-1px",this.get("cssObject").isCSS3DObject&&(this.Nd.style.transform="translate(-50%, -50%)"),this.Nd.style.overflow="hidden",this.Nd.style["-webkit-overflow-scrolling"]="touch",this.Nd.addEventListener("mouseenter",this.x4,!0),this.Nd.addEventListener("mousemove",this.y4,!0),this.Nd.addEventListener("mousewheel",this.z4,!0),this.Nc=document.createElement("iframe"),this.Nc.setAttribute("allow","fullscreen; accelerometer; geolocation; gyroscope; magnetometer; vr; autoplay; camera; microphone; display-capture; xr-spatial-tracking"),
this.Nc.setAttribute("frameborder","0"),this.Nc.setAttribute("scrolling","auto"),this.Nc.style.width="100%",this.Nc.style.height="100%",this.Nc.addEventListener("load",this.GG,!0),this.get("composedAlpha")>0&&this.Nd.appendChild(this.Nc))},JVa:function(){this.Nc&&(this.Nc.src="",this.zha(),this.HB(),this.Nc.parentNode&&this.Nc.parentNode.removeChild(this.Nc),this.Nc=null);this.Nd&&(this.Nd.parentNode&&this.Nd.parentNode.removeChild(this.Nd),this.Nd.removeEventListener("mouseenter",this.x4,!0),this.Nd.removeEventListener("mousemove",
this.y4,!0),this.Nd.removeEventListener("mousewheel",this.z4,!0),this.Nd=null)},Q4a:function(k){this.R_!==k&&(this.R_=k,this.set("frameLoaded",!1),this.iEa())},iEa:function(){this.R_?(this.V4a(),this.GTa(),this.Nc.src=this.R_):(this.HB(),this.zha(),this.Nc.src="",this.GG())},V4a:function(){this.HB();this.S_=setTimeout(this.oea,3E3)},HB:function(){this.S_&&(clearTimeout(this.S_),this.S_=null)},GTa:function(){this.zha();this.Nc.addEventListener("load",this.GG,!0)},zha:function(){this.Nc.removeEventListener("load",
this.GG,!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"),k=a("tdv/constants/EventName");return{eG:function(){this.get("materialConfig").params.blending=THREE.NoBlending},TR:function(){this.o(k.td);this.o(k.ha)},wn:function(){this.W("meshGroup","composedAlpha")&&m.zf(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"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Op:function(){this.set("playbackPositions",null);this.se=this.se.bind(this);this.Hb=new k},gq:function(){m.ba(this.C,["playbackPositions","width","height"],
this.se,!0)},iq:function(){m.ca(this.C,["playbackPositions","width","height"],this.se)},se:function(){this.set("playbackPositions",this.C.get("playbackPositions"));this.set("contentWidth",this.C.get("width"));this.set("contentHeight",this.C.get("height"))},Vf:function(){this.W("playbackPositions","currentTime")&&(this.Hb.vE(this.get("playbackPositions")),this.Hb.tE(this.get("currentTime")),this.set("vertices",this.Hb.gma()));this.W("framePlane","holePlane","imagePlane","vertices")&&this.Ab().forEach(function(p){p.set("vertices",
this.get("vertices"));p.set("contentWidth",this.get("contentWidth"));p.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"),k=a("tdv/player/view/panorama/renderer/object/FrameHotspot"),p=a("tdv/player/view/panorama/renderer/object/ComposedCSSObject"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),g=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(h,e,c,function(){h.call(this);this.set("tag","QuadFrameHotspotImage")}),n=m.extend(p,g,b,function(){p.call(this);this.set("tag","QuadFrameHotspotFrame")}),l=m.extend(h,e,d,function(){h.call(this);this.set("tag","QuadFrameHotspotHole")});return m.extend(k,a,function(q){k.call(this,q);this.HG=f;this.jda=n;this.jea=l})});
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"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Op:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},gq:function(){m.ba(this.C,["vertices",
"distance","playbackPositions"],this.se,!0)},iq:function(){m.ca(this.C,["vertices","distance","playbackPositions"],this.se)},se:function(){this.set("distance",this.C.get("distance"));this.set("vertices",this.C.get("vertices"));this.set("playbackPositions",this.C.get("playbackPositions"))},Vf:function(){this.W("playbackPositions","currentTime")&&(this.Hb.vE(this.get("playbackPositions")),this.Hb.tE(this.get("currentTime")),this.set("vertices",this.Hb.gma()),this.set("alpha",this.Hb.Uv()))}}});
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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=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"),n=0;a=m.extend(g,e,d,b,c,function(l){g.call(this);this.set("tag","QuadHotspotImage");this.set("id","quad_hs_image_"+n++);this.set("side",THREE.DoubleSide);this.C=l;this.Il.push(this.C);this.Ig=this.Ig.bind(this)});a.prototype.ec=function(){g.prototype.ec.call(this);k.ba(this.C,["image.levels"],this.Ig,!0)};a.prototype.kc=function(){k.ca(this.C,["image.levels"],this.Ig);g.prototype.kc.call(this)};a.prototype.Ig=function(){this.set("image",
this.C.get("image"));this.set("level",f.Rbb(this.C))};a.prototype.ya=function(l){this.YH();g.prototype.ya.call(this,l);this.W("inView")&&this.C.o(this.get("inView")?p.Cd:p.sd)};a.prototype.YH=function(){if(this.W("meshGroup","panoramaId","id")){var l=this.get("meshGroup");l&&l.children.forEach(function(q){h.setAttribute(q,h.KE,this.get("panoramaId"));h.setAttribute(q,h.u9,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(g,e){this.Ee=g;this.Vd=e;this.Md=!1;this.Q1=!0;this.bba=this.Dga=!1;this.Eaa();this.Nfa()}var k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.Lza();this.wha()};m.prototype.cg=function(g){this.Md!=g&&(this.Md=g,this.yv())};m.prototype.Zgb=function(g){this.Q1!=g&&((this.Q1=g)&&
this.Lza(),this.yv())};m.prototype.yv=function(){if(!this.Md||this.Q1)this.Vd.set("state",p.aa);else if(this.Vd.get("autoplay")||this.bba)this.bba=!1,this.Vd.set("state",p.PLAYING)};m.prototype.Nfa=function(){if(!this.Dga){var g=this.Vd.get("video").get("autoplayTime");g!==void 0&&this.Vd.get("video").get("autoplayTimeLimit")<(new Date).getTime()&&(g=void 0);this.Vd.set("currentTime",g);this.bba=g!==void 0}};m.prototype.Lza=function(){this.Dga||(this.Dga=!0,this.Vd.get("state")==p.PLAYING?(this.Vd.get("video").set("autoplayTimeLimit",
(new Date).getTime()+h),this.Vd.get("video").set("autoplayTime",this.Vd.get("currentTime",0))):this.Vd.get("video").set("autoplayTime",void 0))};m.prototype.Eaa=function(){this.Vd.get("video").bind(k.K("autoplayTime"),this.Nfa,this,!0)};m.prototype.wha=function(){this.Vd.get("video").h(k.K("autoplayTime"),this.Nfa,this,!0)};var h=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"),k=a("tdv/player/view/util/ColorPicker");return{JB:function(){this.set("beamEnabled",!1);this.zd=!1;this.JC=this.KC=void 0},Aq:function(p){this.KC=p.Za;this.JC=p.pitch},Un:function(p){if(p.Rf==m.Gm){var h=!p.km()&&this.Ms(p)&&!this.get("blendingActive");if(h){p.gD(this.C);this.C.get("useHandCursor")&&
p.kI(this.C);p.gm(this.get("distance"));var g=this.fc(p.YI());g&&p.F4(g,this.WC(p.YI()))}this.zd!=h&&(this.zd=h,this.C.o(this.zd?m.rc:m.Db),p.ew()&&this.C.o(this.zd?m.lF:m.sr))}else p.Rf==m.Pf&&!p.km()&&this.Ms(p)&&(this.C.gO(m.oa,!0).length>1&&p.Nt(this.C),p.gm(this.get("distance")),this.C.o(m.oa))},Ms:function(p){if(this.get("beamEnabled")){p=this.Nda().$x(p.Cs);for(var h=0;h<p.length;h++){var g=p[h];if(k.DA(g.source,g.x,g.y))return!0}}return!1},fc:function(p){return!p||this.C.get("displayTooltipInTouchScreens")&&
this.Ka.R.get("displayTooltipInTouchScreens")!==!1?this.C.get("toolTip",""):""},WC:function(p){if(p){p=this.get("yaw")-this.KC;var h=this.get("pitch")-this.JC;return Math.sqrt(p*p+h*h)}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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),g=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"),n=a("tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin"),
l=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,n,c,function(v){e.call(this);this.C=v;this.gka=this.HG=null;this.Il.push(this.C);this.Hg=this.Hg.bind(this);this.Hr(["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",h.aa);this.set("itemVisible","none");this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.Jb=this.gb=this.ve=this.kg=null;this.hka=!1;this.Iu=[];this.Zha(this.C)});a.prototype.ec=function(){this.kg=(new d(p.ha)).bo(this.cH.bind(this));
this.ve=(new d(p.wc)).Pq(this.fH.bind(this));this.Lm=new b(this.Ka.Jq(),this.C);e.prototype.ec.call(this);k.ba(this.C,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR enabledInVRWithGazePointer fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),this.Hg,!0);this.dda()};a.prototype.kc=function(){this.eda();this.Lm.clear();this.kg.dispose();this.ve.dispose();k.ca(this.C,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR enabledInVRWithGazePointer fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),
this.Hg);this.hG();this.SB();e.prototype.kc.call(this)};a.prototype.Hg=function(){this.set("image",this.C.get("image"));this.set("imageLevel",f.ecb(this.C,this.get("panoramaPixelsPerDegree")));this.set("video",this.C.get("video"));this.set("videoLevel",g.rk(this.get("video")));this.set("enabled",this.C.get("enabled"));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.ya=function(v){this.set("inVR",v.jb);this.set("hotspotsEnabled",v.RI);this.set("inVRWithGazePointer",v.jb&&t.fe.length===1&&t.fe[0].type===u.oB);this.Rs();this.$C();e.prototype.ya.call(this,v);this.yv();this.JU(v);this.we(v);this.sja(v)};a.prototype.Rs=function(){if(this.W("video","videoLevel","image","imageLevel")){var v=[];this.W("image","imageLevel")&&(this.FQ(),this.gb&&v.push(this.gb));this.W("video","videoLevel")&&(this.HQ(),this.Jb&&v.push(this.Jb));this.Uh(v);this.kg.bg(v);this.ve.bg(v)}};
a.prototype.$C=function(){this.W("video","videoLevel","image","imageLevel","blending","chromaColor","chromaThreshold","chromaSmoothing")&&this.Ab().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.yv=function(){this.W("video","composedAlpha","enabledInVR","enabledInVRWithGazePointer","enabledInStandard","enabled",
"inVR")&&this.Lm.cg(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.Lm.Zgb(this.get("blendingActive"))};a.prototype.JU=function(){this.set("frameEmpty",!this.Jb||!this.Jb.get("hasStableContent"))};a.prototype.we=function(v){var w=this.get("itemVisible");if(this.W("frameEmpty",
"state","image","video","inVR","hotspotsEnabled","enabledInVR","enabledInVRWithGazePointer","enabledInStandard","enabled","interactionEnabled")){var y="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.Jb&&(!this.gb||!this.get("frameEmpty")&&(this.get("state")!=h.aa||this.hka&&this.get("videoVisibleOnStop")))?y="video":
this.gb&&(y="image"),this.get("state")!=h.aa&&(this.hka=!0));this.set("itemVisible",y);this.set("beamEnabled",y!="none"&&this.get("interactionEnabled"))}if(this.W("itemVisible")){y=this.get("itemVisible")!="none";var x=w!="none";if(y&&x&&!this.get("chromaColor")&&this.Iu.length==0)this.gb&&this.gb.set("alpha",this.get("itemVisible")=="image"?1:0),this.Jb&&this.Jb.set("alpha",this.get("itemVisible")=="video"?1:0);else{w=y==x?50:y?this.get("fadeInDuration"):this.get("fadeOutDuration");y!=x&&this.C.o(y?
p.Cd:p.sd);x=this.gb?this.gb.get("alpha"):0;var z=this.Jb?this.Jb.get("alpha"):0;y=[{video:z,image:x}];this.get("itemVisible")=="video"?(y.push({video:1,image:x,time:w*(1-z)}),y.push({video:1,image:0,time:50*(x-0)})):this.get("itemVisible")=="image"?(y.push({video:z,image:1,time:w*(1-x)}),y.push({video:0,image:1,time:50*(z-0)})):y.push({video:0,image:0,time:Math.max(z,x,1/w)*w});this.Iu=[];for(w=1;w<y.length;w++)y[w].time>0&&this.Iu.push(new q("linear",[new r("imageAlpha",y[w-1].image,y[w].image),
new r("videoAlpha",y[w-1].video,y[w].video)],y[w].time))}}this.Iu.length>0&&(this.Iu[0].Qe()?this.Iu.shift():this.Iu[0].Lb(v.vf),this.Iu.length>0&&(this.gb&&this.gb.set("alpha",this.Iu[0].ib("imageAlpha")),this.Jb&&this.Jb.set("alpha",this.Iu[0].ib("videoAlpha")),this.Ma()))};a.prototype.FQ=function(){this.hG();this.get("image")&&this.get("imageLevel")&&(this.gb=new this.HG,this.gb.set("image",this.get("image")),this.gb.set("level",this.get("imageLevel")),this.gb.set("isVideoTexture",!0),this.gb.set("visible",
!0),this.gb.set("alpha",0),this.gb.set("side",THREE.DoubleSide))};a.prototype.hG=function(){this.gb&&(this.gb.remove(),this.gb=null)};a.prototype.HQ=function(){this.SB();this.get("video")&&this.get("videoLevel")&&(this.Jb=new this.gka,this.Jb.set("scriptObject",this.C),this.Jb.set("video",this.get("video")),this.Jb.set("level",this.get("videoLevel")),this.Jb.set("visible",!0),this.Jb.set("alpha",0),this.Jb.set("side",THREE.DoubleSide))};a.prototype.SB=function(){this.Jb&&(this.Jb.remove(),this.Jb=
null)};a.prototype.cH=function(){this.o(p.td);this.o(p.ha)};a.prototype.fH=function(v,w){var y=0;w.Qv(function(x){(x=w.Gn(x))&&(y+=x.percent)});this.o(new l(p.wc,y/w.wd.length))};a.prototype.Nda=function(){return this.get("itemVisible")=="video"?this.Jb:this.gb};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/view/av/SubtitleController tdv/view/av/VideoPlayer".split(" "),function(a){var m=
a("tdv/constants/EventName"),k=a("tdv/constants/PlaybackState"),p=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=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/view/av/SubtitleController"),d=a("tdv/view/av/VideoPlayer");return{eG: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.pb=this.Jb=null;this.hka=!1;this.bN=this.Nh=this.rn=this.Ta=this.Pr=this.ra=null},QL:function(){this.SB()},Ij:function(f){this.r8a();this.$C();this.JU(f)},r8a:function(){this.W("scriptObject",
"video","level")&&(this.SB(),this.Jb=this.get("video"),this.pb=this.get("level"),this.C=this.get("scriptObject"),this.HQ())},$C:function(){if(this.W("video","blending","chromaColor","chromaThreshold","chromaSmoothing","side")&&this.Jb){var f=new p.Cp(this.Jb.hl());f.lD=this.get("blending");f.Hv=this.get("chromaColor");f.nV=this.get("chromaThreshold");f.mV=this.get("chromaSmoothing");f.side=this.get("side");this.set("materialConfig",f)}},wn:function(){this.W("visible","composedAlpha","image","state")&&
this.set("inView",this.get("visible")&&this.get("composedAlpha")>0);this.W("composedAlpha","meshGroup","inView")&&h.zf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0)},JU:function(f){var n=!!this.Nh&&this.Nh.isEmpty(),l=this.ra&&this.ra.M5(),q=!!l&&l.isEmpty();q&&!n&&this.ra.getState()==k.PLAYING&&this.C.get("loop")&&(l=this.Nh,q=!1);this.set("frameEmpty",q);this.vja();this.bN.Yoa(f.Bk>0);!this.Nh||l&&!this.Nh.isEqual(l)?(this.Nh=l,(f=this.Nh.Hu)&&f.tagName=="VIDEO"&&(f.width=
this.get("contentWidth"),f.height=this.get("contentHeight")),this.bN.Vn(f),this.bN.update(),this.Ma()):this.ra.getState()==k.PLAYING&&this.Ma()},vja:function(){var f=this.ra.getCurrentTime(),n=this.ra.Zi();this.get("frameEmpty")?this.set("hasStableContent",!1):f>this.u_+.1?this.set("hasStableContent",!0):f==0&&this.bfa>n-.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.W("frameEmpty")&&!this.get("frameEmpty")&&(this.u_=f);!this.get("frameEmpty")&&f>0&&(this.bfa=f)},HQ:function(){this.Jb&&
this.pb&&this.C&&(this.set("textureSource",this.bN=new b),this.bN.xX(!0),this.set("contentWidth",this.pb.get("width")),this.set("contentHeight",this.pb.get("height")),this.set("alpha",0),this.ra=new d(this.Ka.Jq(),this.Jb),this.ra.dgb(),this.Pr=new g(this.C,this.ra),this.Ta=new e(this.Ka.Jq(),this.C,this.ra),this.rn=new c(this.Ka.kd.get("panorama"),this.ra),this.sx(),this.o(m.td),this.o(m.ha))},SB:function(){this.ra&&(this.set("textureSource",this.bN=null),this.Xy(),this.Ta.clear(),this.Ta=null,this.Pr.clear(),
this.Pr=null,this.rn.clear(),this.rn=null,this.ra.clear(),this.Nh=this.ra=null,this.set("frameEmpty",!0),this.set("hasStableContent",!1),this.pb=this.Jb=null)},sx:function(){this.ra.bind(d.sg,this.Jf,this,!0);this.ra.bind(m.Ye,this.xj,this,!0)},Xy:function(){this.ra.h(d.sg,this.Jf,this,!0);this.ra.h(m.Ye,this.xj,this,!0)},xj:function(){this.Ma()},Jf:function(){this.Ma()}}});
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"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Op:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},gq:function(){m.ba(this.C,["playbackPositions",
"distance"],this.se,!0)},iq:function(){m.ca(this.C,["playbackPositions","distance"],this.se)},se:function(){this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},Vf:function(){this.W("playbackPositions","currentTime")&&(this.Hb.vE(this.get("playbackPositions")),this.Hb.tE(this.get("currentTime")),this.set("vertices",this.Hb.gma()),this.set("alpha",this.Hb.Uv()));this.W("video","image","vertices","distance")&&this.Ab().forEach(function(p){p.set("vertices",
this.get("vertices"));p.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"),k=a("tdv/player/view/panorama/renderer/object/VideoHotspot"),p=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),h=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),g=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(p,h,g,function(){p.call(this);
this.set("tag","QuadVideoHotspotImage")}),c=m.extend(p,h,e,function(){p.call(this);this.set("tag","QuadVideoHotspotVideo")});return m.extend(k,a,function(d){k.call(this,d);this.HG=b;this.gka=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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),g=a("tdv/player/view/util/Color"),e=a("tdv/player/view/util/Device");a=m.extend(h,
function(b){h.call(this);this.C=b;this.Ll=this.Ll.bind(this);this.Ml=this.Ml.bind(this);this.ro()});a.prototype.ec=function(){h.prototype.ec.call(this);this.C.set("state",this.C.get("startState"));k.ba(this.C,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),this.Ll,!0);k.ba(this.C,["state"],this.Ml,!0)};a.prototype.kc=function(){k.ca(this.C,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),
this.Ll);k.ca(this.C,["state"],this.Ml);this.C.set("state",p.aa);h.prototype.kc.call(this)};a.prototype.Ll=function(){this.ro();this.AT()};a.prototype.Ml=function(){this.l2=this.C.get("state");this.Ma()};a.prototype.ro=function(){h.prototype.ro.call(this);if(e.$f()){this.pG=this.Qu=4;this.pH=2400;this.qG=1200;var b=1.5;var c=1.6}else this.Qu=2,this.pG=4,this.pH=4800,this.qG=2400,c=b=1;var d=this.C.get("intensity",.5);this.Ie=g.qp(this.C.get("color","#ffffff"));this.cT=this.C.get("opacity",.25)*.24+
.01;this.cT*=2;this.DC=(d*(.37-.17)+.17)*b;b=(this.C.get("speed",.5)*(.09-.02)+.02)/this.DC*c;this.ZR=b*.9;this.ZG=b*1.1;this.pH=Math.round(this.C.get("particleCount",this.pH)*d);this.qG=Math.round(this.C.get("farPlaneParticleCount",this.qG)*d);this.F0=0;this.cs=2;this.Ru=-2;this.ufa=0;this.gQ=.75;this.KQ=.5;this.$_=this.C.get("initialState");this.w3=this.C.get("startDuration");this.C3=this.C.get("stopDuration");this.Qu=this.C.get("maxDistance",this.Qu);this.pG=this.C.get("farPlaneDistance",this.pG);
this.aD()};a.prototype.UZ=function(){var b=new THREE.MeshBasicMaterial;b.color=new THREE.Color(this.Ie[0]/255,this.Ie[1]/255,this.Ie[2]/255);b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;this.qda||(this.qda=new THREE.BoxGeometry(.01,.2,.01));return new THREE.Mesh(this.qda,b)};a.prototype.aD=function(){var b=this.Vg&&this.Vg.children||[],c=new THREE.Color(this.Ie[0]/255,this.Ie[1]/255,this.Ie[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"),k=a("tdv/util/Map"),p=a("tdv/constants/EventName"),h=a("tdv/events/Event"),g=a("tdv/player/view/panorama/renderer/object/Base"),e=m.extend(g,function(b,c,d,f){g.call(this);this.Ee=b;this.R=c;this.kd=d;this.m=f;this.mS=new k;this.gia(this);this.set("tag","Root");this.set("globalBlendingActive",
0)});e.prototype.Jq=function(){return this.Ee};e.prototype.Yf=function(b){return this.mS.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.oe.length-1;f>=0;f--)c.push(d.oe[f])}return b};e.prototype.update=function(b){var c=this.all(),d=c.length,f;for(f=0;f<d;f++)c[f].OVa();for(f=0;f<d;f++)c[f].set("index",f);for(f=0;f<d;f++)c[f].Ka&&c[f].ya(b);for(f=0;f<d;f++)c[f].FVa();if(this.Y_){for(f=0;f<d;f++)c[f].KVa();this.update(b)}};e.prototype.Ma=function(){this.Zg||
this.o(new h(p.V));g.prototype.Ma.call(this)};e.prototype.Sz=function(b){return Array.isArray(b)?b.map(this.Sz.bind(this)):this.mS.get(b)||e.Gab.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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),g=a("tdv/player/view/util/Device");a=m.extend(h,function(b){h.call(this);this.C=b;this.Ll=this.Ll.bind(this);
this.Ml=this.Ml.bind(this);this.ro()});a.prototype.ec=function(){h.prototype.ec.call(this);this.C.set("state",this.C.get("startState"));k.ba(this.C,["intensity","speed"],this.Ll,!0);k.ba(this.C,["state"],this.Ml,!0)};a.prototype.kc=function(){k.ca(this.C,["intensity","speed"],this.Ll);k.ca(this.C,["state"],this.Ml);this.C.set("state",p.aa);h.prototype.kc.call(this)};a.prototype.Ll=function(){this.ro();this.AT()};a.prototype.Ml=function(){this.l2=this.C.get("state");this.Ma()};a.prototype.ro=function(){h.prototype.ro.call(this);
var b=this.C.get("intensity"),c=this.C.get("speed");if(g.yb()||g.Rb()==g.Iw){var d=1E3;var f=350;var n=1800;var l=400;var q=.8;var r=1.2}else g.$f()?(d=1500,f=500,n=2500,l=500,q=.8,r=1.2):(d=3E3,f=1E3,n=5E3,l=1E3,q=.6,r=1);this.$_=this.C.get("initialState");this.w3=this.C.get("startDuration");this.C3=this.C.get("stopDuration");this.gQ=.75;this.KQ=.5;this.Qu=4;this.Ru=-2;this.cs=3;this.F0=35;this.pG=7;this.DC=(q+b*(r-q))/e;this.ZR=this.ZG=.15+c*1.35;this.pH=f+b*(d-f);this.qG=l+b*(n-l)};a.prototype.UZ=
function(){return new THREE.Sprite(this.Jx())};a.prototype.Jx=function(){var b=new THREE.SpriteMaterial;b.map=this.Or();b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;return b};a.prototype.Or=function(){if(this.La)return this.La;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.La=new THREE.Texture;this.La.colorSpace=THREE.SRGBColorSpace;this.La.image=b;this.La.needsUpdate=!0;return this.La};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"),k=a("tdv/player/view/util/Device"),p=new THREE.Matrix4,h=Math.PI/180;return{Ix: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.li=new THREE.Matrix4;this.ie=new THREE.Matrix4;this.hq=new THREE.Matrix4;this.yo=new THREE.Matrix4;this.gk=new THREE.Matrix4;this.mn=new THREE.Matrix4;this.fs=new THREE.Matrix4},Qba:function(){var g=k.Od()==k.fj||k.Rb()==k.Iw?new THREE.CSS3DRectangle:new THREE.CSS3DObject;g.matrixAutoUpdate=!1;return g},rz:function(g){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.li.makeTranslation(-this.get("composedTranslationX")*.5*m.jh,this.get("composedTranslationY")*.5*m.jh,this.get("composedTranslationZ")*.5*m.jh),e=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ie.makeRotationY(-g.Za*h),this.ie.multiply(p.makeRotationX(-this.get("composedDeltaPitch")*h)),this.ie.multiply(p.makeRotationY(this.get("composedDeltaYaw")*h)),this.ie.multiply(p.makeRotationY(g.Za*
h)),e=!0);this.W("yaw","pitch")&&(this.hq.makeRotationY(-this.get("yaw")*h),this.hq.multiply(p.makeRotationX(this.get("pitch")*h)),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.yo.makeTranslation(0,0,-(e/(2*Math.tan(c*h*.5))));var f=(this.get("flipHorizontally")?-1:1)*this.get("scale"),n=this.get("scale");d&&(n*=e*Math.tan(d*
h*.5)/(b*Math.tan(c*h*.5)));this.mn.makeScale(f,n,1);e=!0}this.W("rotationX","rotationY","rotationZ","roll")&&(this.gk.makeRotationZ(this.get("roll")*h),this.gk.multiply(p.makeRotationY(this.get("rotationY")*h)),this.gk.multiply(p.makeRotationX(this.get("rotationX")*h)),this.gk.multiply(p.makeRotationZ(this.get("rotationZ")*h)),e=!0);if(e||this.W("meshGroup"))this.fs.copy(this.li),this.fs.multiply(this.ie),this.fs.multiply(this.hq),this.fs.multiply(this.yo),this.fs.multiply(this.gk),this.fs.multiply(this.mn),
this.get("cssObject").matrix.copy(this.fs),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",g.Za);this.set("cameraPitch",g.pitch);this.set("cameraRoll",g.fh);this.set("cameraHfov",g.Wd);this.set("cameraWidth",g.width);this.set("cameraHeight",g.height);g.camera&&(e||this.W("cameraYaw","cameraPitch","cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(g.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.W("geometryVisible")&&
this.Gha())}}});
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"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Op:function(){this.set("playbackPositions",null);this.se=this.se.bind(this);this.Hb=new k},gq:function(){m.ba(this.C,["playbackPositions","width",
"height"],this.se,!0)},iq:function(){m.ca(this.C,["playbackPositions","width","height"],this.se)},se:function(){this.set("playbackPositions",this.C.get("playbackPositions"));this.set("contentWidth",this.C.get("width"));this.set("contentHeight",this.C.get("height"))},Vf:function(){this.W("playbackPositions","currentTime")&&(this.Hb.vE(this.get("playbackPositions")),this.Hb.tE(this.get("currentTime")),this.set("yaw",this.Hb.get("yaw")),this.set("pitch",this.Hb.get("pitch")),this.set("roll",this.Hb.get("roll")),
this.set("rotationX",this.Hb.get("rotationX")),this.set("rotationY",this.Hb.get("rotationY")),this.set("hfov",this.Hb.get("hfov")),this.set("vfov",this.Hb.get("vfov")));this.W("framePlane","holePlane","imagePlane","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","contentWidth","contentHeight")&&this.Ab().forEach(function(p){p.set("yaw",this.get("yaw"));p.set("pitch",this.get("pitch"));p.set("roll",this.get("roll"));p.set("rotationX",this.get("rotationX"));p.set("rotationY",this.get("rotationY"));
p.set("hfov",this.get("hfov"));p.set("vfov",this.get("vfov"));p.set("contentWidth",this.get("contentWidth"));p.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"),k=a("tdv/player/view/panorama/renderer/object/FrameHotspot"),p=a("tdv/player/view/panorama/renderer/object/ComposedCSSObject"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),g=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(h,e,c,function(){h.call(this);this.set("tag","RectangleFrameHotspotImage")}),n=m.extend(p,g,b,function(){p.call(this);this.set("tag","RectangleFrameHotspotFrame")}),l=m.extend(h,e,d,function(){h.call(this);this.set("tag","RectangleFrameHotspotHole")});return m.extend(k,a,function(q){k.call(this,q);this.HG=f;this.jda=
n;this.jea=l})});
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"),k=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{Op:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.se=this.se.bind(this);this.Hb=new k},
gq:function(){m.ba(this.C,["playbackPositions","distance","scaleMode"],this.se,!0)},iq:function(){m.ca(this.C,["playbackPositions","distance","scaleMode"],this.se)},se:function(){this.set("scaleMode",this.C.get("scaleMode"));this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},Vf:function(){this.W("playbackPositions","currentTime")&&(this.Hb.vE(this.get("playbackPositions")),this.Hb.tE(this.get("currentTime")),this.set("yaw",this.Hb.get("yaw")),
this.set("pitch",this.Hb.get("pitch")),this.set("roll",this.Hb.get("roll")),this.set("rotationX",this.Hb.get("rotationX")),this.set("rotationY",this.Hb.get("rotationY")),this.set("hfov",this.Hb.get("hfov")),this.set("vfov",this.Hb.get("vfov")),this.set("alpha",this.Hb.Uv()));this.W("video","image","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","distance","scaleMode","image","video")&&this.Ab().forEach(function(p){p.set("yaw",this.get("yaw"));p.set("pitch",this.get("pitch"));p.set("roll",
this.get("roll"));p.set("rotationX",this.get("rotationX"));p.set("rotationY",this.get("rotationY"));p.set("hfov",this.get("hfov"));p.set("vfov",this.get("vfov"));p.set("scaleMode",this.get("scaleMode"));p.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"),k=a("tdv/player/view/panorama/renderer/object/VideoHotspot"),p=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),h=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),g=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(p,
h,g,function(){p.call(this);this.set("tag","RectangleVideoHotspotImage")}),c=m.extend(p,h,e,function(){p.call(this);this.set("tag","RectangleVideoHotspotVideo")});return m.extend(k,a,function(d){k.call(this,d);this.HG=b;this.gka=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,
E){Array.isArray(E)||(E=[E]);for(var B=0;B<E.length;B++)if(k.Qa(E[B],D))return!0;return!1}var k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/view/panorama/renderer/object/Base"),h=a("tdv/player/view/panorama/renderer/object/Cap"),g=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"),n=a("tdv/player/view/panorama/renderer/object/Panorama"),l=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"),
y=a("tdv/player/view/panorama/renderer/object/Root"),x=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={};y.Gab=a;a.create=function(D){if(D instanceof p)return D;if(m(D,["HDRPanorama","LivePanorama","Panorama","VideoPanorama"]))return new n(D);if(m(D,["CubicPanoramaFrame","SphericPanoramaFrame"]))return m(D,
"SphericPanoramaFrame")&&D.Fn()?new q(D):new l(D);if(m(D,["DustPanoramaOverlay"]))return new g(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 h(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 x(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,k){return function(){function p(){}p.tIa=function(h,g,e,b,c,d){return p.bbb(h,g/b*2-1,-(e/c)*2+1,d)};p.bbb=function(h,g,e,b){b||(b=new k.Ray);b.origin.setFromMatrixPosition(h.matrixWorld);b.direction.set(g,e,.5).unproject(h).sub(b.origin).normalize();return b};p.rbb=function(h,g){g||(g=new k.Ray);g.origin.set(0,0,0);g.direction.set(0,0,-1).applyQuaternion(h.quaternion);return g};p.qbb=function(h,
g){g||(g=new k.Ray);g.origin.set(0,0,0).applyMatrix4(h);g.direction.set(0,0,-1).applyMatrix4(h).sub(g.origin).normalize();return g};return p}()});
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"),k=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),p=a("tdv/player/view/panorama/renderer/object/Plane"),h=a("tdv/player/canvas/ReticleCanvas"),
g=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/util/XR");a=m.extend(p,function(){p.call(this);this.ea=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.fq=null});a.prototype.ya=function(b){this.Rs(b);this.Yg(b);this.Vf(b);p.prototype.ya.call(this,b)};a.prototype.Rs=function(b){b.jb&&!this.fq&&e.getType()==e.kx.eo&&this.Uh([this.fq=
new p])};a.prototype.Yg=function(b){this.ea||(this.set("textureSource",new g),this.ea=new h(this.Ka.R.nma()),this.get("textureSource").Vn(this.ea.zg()),this.set("contentWidth",this.ea.Zf()),this.set("contentHeight",this.ea.pg()),this.set("hfov",6),this.set("distance",this.Ka.R.get("vrPointerDistance")));this.W("changing")&&this.ea.vA(b.jb&&this.get("changing"));this.W("over","overProgress")&&this.ea.AJ(this.get("over"),this.get("overProgress"));this.ea.update(b.vf)&&this.get("textureSource").update();
this.get("changing")&&this.Ma()};a.prototype.Vf=function(){this.mi()};a.prototype.wn=function(){this.W("composedAlpha","meshGroup","visible")&&this.tB()};a.prototype.tB=function(){k.zf(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/Device".split(" "),function(a,m,k,p,h,g,e){var b=document.createElement("pre"),c=document.createTextNode("");b.appendChild(c);return function(){function d(f){this.Fb=f;this.ADa=e.br();this.Fb.bind(p.mb,this.lg,this);this.pa=document.createElement("span");this.pa.style.pointerEvents="none";this.pa.style.position="absolute";this.pa.style.zIndex=h.BSa.toString();
this.pa.style.textAlign="center";this.pa.style.display="none";this.Zd=document.createElement("span");this.Zd.style.position="absolute";this.Zd.style.left="0";this.Zd.style.top="0";this.Zd.style.right="0";this.Zd.style.bottom="0";this.pa.appendChild(this.Zd);this.lz=document.createElement("span");this.lz.style.position="relative";this.pa.appendChild(this.lz);this.ik=this.b0=this.Dh=null;this.Ny=this.My=void 0;this.ly=!1;this.BDa=void 0}d.prototype.ac=function(){return this.pa};d.prototype.lE=function(f){var n=
this;if(!this.ADa){for(;f&&f.get("toolTipDisabled");)f=f.getParent();this.Pe();this.Dh&&Object.keys(d.EP).forEach(function(l){n.Dh.h(p.K(l),n.iga,n)});if(this.Dh=f)Object.keys(d.EP).forEach(function(l){n.Dh.bind(p.K(l),n.iga,n,!1)}),this.iga()}};d.prototype.Thb=function(f,n){this.Dh=f;this.BDa=n;this.k0()||(this.ly?this.RCa():this.dU())};d.prototype.PCa=function(f,n,l){this.ly&&this.Dh.o(p.lsa);this.o7a(f);this.lz.innerHTML=this.SZa(n);this.dua=l;this.pa.style.display="inline";this.Vf();this.Dh.o(p.ASa);
this.ly=!0;(l||f.get("checkToolTipOcclusion"))&&this.J5a(f)};d.prototype.Vf=function(){var f=this.Vr(),n=f.x;f=f.y;var l=this.pa.offsetWidth||0,q=this.pa.offsetHeight||0;if(this.dua){n-=(this.pa.clientWidth||0)*.5;var r=this.Dh.get("toolTipCenteredOffsetY");f=r===void 0?f-(this.pa.clientHeight||0)*.5:r>0?f+r:f-((this.pa.clientHeight||0)-r)}n=Math.max(Math.min(n,this.Fb.cb()-l-3),3);f=Math.max(Math.min(f,this.Fb.Kb()-q-3),3);this.pa.style.left=n+"px";this.pa.style.top=f+"px"};d.prototype.Vr=function(){if(this.dua){var f=
k.offset(this.Dh.wa().ac());return{x:f.left+this.Dh.cb()*.5,y:f.top+this.Dh.Kb()*.5}}return{x:this.My||0,y:(this.Ny||0)+25}};d.prototype.Pe=function(){this.bG();this.fDa();this.ly&&(this.pa.style.display="none",this.Dh.o(p.lsa),this.ly=!1)};d.prototype.iga=function(){this.Dh.get("toolTip")?this.k0()||(this.ly?this.QCa():this.dU()):this.k0()?this.bG():this.ly&&this.Pe()};d.prototype.lg=function(f){this.My=f.pageX;this.Ny=f.pageY;this.ly&&this.Dh.get("toolTipFollowMouse")&&this.Vf()};d.prototype.QCa=
function(){this.PCa(this.Dh,this.Dh.get("toolTip"),this.Dh.get("toolTipCentered"))};d.prototype.RCa=function(){this.PCa(this.Dh,this.BDa,!0)};d.prototype.k0=function(){return this.ik!=null};d.prototype.dU=function(){var f=this.Dh&&this.Dh.get("toolTipDisplayTime");if(f===void 0||f===null)f=d.EP.toolTipDisplayTime;this.bG();this.ik=setTimeout(function(){this.ik=null;this.ADa?this.RCa():this.QCa()}.bind(this),f)};d.prototype.bG=function(){this.k0()&&(clearTimeout(this.ik),this.ik=null)};d.prototype.J5a=
function(f){var n=this.Vr();this.fDa();var l=function(){this.pa.style.display=this.ly&&!this.U_a(f,n.x,n.y)?"inline":"none"}.bind(this);this.b0=setInterval(l,300);l()};d.prototype.fDa=function(){this.b0&&(clearInterval(this.b0),this.b0=null)};d.prototype.o7a=function(f){function n(q){var r=f.get(q);return r===void 0?d.EP[q]:r}this.pa.style.opacity=n("toolTipOpacity");this.pa.style.paddingTop=n("toolTipPaddingTop")+"px";this.pa.style.paddingBottom=n("toolTipPaddingBottom")+"px";this.pa.style.paddingLeft=
n("toolTipPaddingLeft")+"px";this.pa.style.paddingRight=n("toolTipPaddingRight")+"px";this.pa.style.textAlign=n("toolTipHorizontalAlign");this.Zd.style.opacity=n("toolTipBackgroundOpacity");this.Zd.style.backgroundColor=n("toolTipBackgroundColor");this.Zd.style.border=[n("toolTipBorderSize")+"px","solid",n("toolTipBorderColor")].join(" ");var l=n("toolTipShadowColor");this.Zd.style.boxShadow=[n("toolTipShadowHorizontalLength")+"px",n("toolTipShadowVerticalLength")+"px",n("toolTipShadowBlurRadius")+
"px",n("toolTipShadowSpread")+"px","rgba("+parseInt("0x"+l.substr(1,2))+", "+parseInt("0x"+l.substr(3,2))+", "+parseInt("0x"+l.substr(5,2))+", "+n("toolTipShadowOpacity")+")"].join(" ");this.Zd.style.borderRadius=n("toolTipBorderRadius")+"px";this.lz.style.fontFamily=g.Lz(n("toolTipFontFamily"));l=n("toolTipFontSize");typeof l==="number"?l+="px":typeof l!=="string"&&(l="");this.lz.style.fontSize=l;this.lz.style.fontWeight=n("toolTipFontWeight");this.lz.style.fontStyle=n("toolTipFontStyle");this.lz.style.color=
n("toolTipFontColor");l=n("toolTipTextShadowColor");this.lz.style.textShadow=[n("toolTipTextShadowHorizontalLength")+"px",n("toolTipTextShadowVerticalLength")+"px",n("toolTipTextShadowBlurRadius")+"px","rgba("+parseInt("0x"+l.substr(1,2))+", "+parseInt("0x"+l.substr(3,2))+", "+parseInt("0x"+l.substr(5,2))+", "+n("toolTipTextShadowOpacity")+")"].join(" ")};d.prototype.U_a=function(f,n,l){n=document.elementsFromPoint(n,l);f=f.wa().ac();l=this.Fb.wa().ac();for(var q=0;q<n.length;q++){var r=n[q];if(f==
r||f.contains(r))break;if(!this.pa.contains(r)&&l.contains(r)){var t=window.getComputedStyle(r);if(t.display!="none"&&t.visibility!="hidden"&&(r.tagName=="CANVAS"?1:this.WVa(t.backgroundColor))*parseFloat(t.opacity)>.29)return!0}}return!1};d.prototype.WVa=function(f){if(!f)return 0;f=f.toLowerCase();var n=f.match(/rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(\d*\.?\d*)\s*\)/);return n?parseFloat(n[1]):f.match(/transparent/)?0:1};d.prototype.SZa=function(f){f=(f||"").split("\n");for(var n=0;n<f.length;n++)f[n]=
this.MXa(f[n]);return f.map(function(l){return"<div>"+l+"</div>"}).join("")};d.prototype.MXa=function(f){c.nodeValue=f;(f=b.innerHTML)||(f="&nbsp;");return f};d.EP={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 d}()});
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.R=e;this.tn=b;this.B5a()}var k=a("tdv/view/core/ToolTip"),p=a("tdv/view/util/MeasureText"),h=a("tdv/view/util/Font"),g=180/Math.PI;m.prototype.zg=function(){return this.ea};m.prototype.Zf=function(){return this.ea.width};m.prototype.pg=function(){return this.ea.height};m.prototype.df=function(){return 2*Math.atan2(this.ea.width/
3*.5,600)*g};m.prototype.B5a=function(){this.ea=document.createElement("canvas");var e=this.tn.split("\n"),b=this.Gh("toolTipBackgroundColor"),c=this.Gh("toolTipBackgroundOpacity"),d=this.Gh("toolTipBorderRadius"),f=this.Gh("toolTipBorderColor"),n=this.Gh("toolTipBorderSize");this.Gh("toolTipDisplayTime");var l=this.Gh("toolTipFontFamily"),q=this.Gh("toolTipFontSize"),r=this.Gh("toolTipFontColor"),t=this.Gh("toolTipFontWeight"),u=this.Gh("toolTipFontStyle"),v=this.Gh("toolTipPaddingBottom"),w=this.Gh("toolTipPaddingLeft"),
y=this.Gh("toolTipPaddingTop"),x=this.Gh("toolTipPaddingRight"),z=this.Gh("toolTipOpacity"),A=this.Gh("toolTipTextShadowBlurRadius"),D=this.Gh("toolTipTextShadowColor"),E=this.Gh("toolTipTextShadowHorizontalLength"),B=this.Gh("toolTipTextShadowVerticalLength"),C=this.Gh("toolTipTextShadowOpacity");isNaN(q)&&(q=12);d=Math.round(d*3);n=Math.round(n*3);q=Math.round(q*3);v=Math.round(v*3);w=Math.round(w*3);y=Math.round(y*3);x=Math.round(x*3);A=Math.round(A*3);E=Math.round(E*3);B=Math.round(B*3);var I=
new p.$$;I.fontFamily=l;I.fontSize=Math.round(q)+"px";I.fontWeight=t;I.fontStyle=u;this.ea=document.createElement("canvas");var F=this.ea.getContext("2d"),G=e.map(function(T){return p(T,I,F)}),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;x=n+w+N+x+n;v=n+y+O+v+n;this.ea.width=this.ea.height=Math.max(256,Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(x,v))/Math.LN2))));F=this.ea.getContext("2d");var S=(this.ea.width-x)*.5,
K=(this.ea.height-v)*.5;F.save();F.translate(S,K);F.globalAlpha=z;F.strokeStyle=f;F.fillStyle=b==="transparent"?"rgba(0,0,0,0)":this.jta(c,b);F.lineWidth=n;F.beginPath();F.moveTo(d,0);F.lineTo(x-d,0);F.quadraticCurveTo(x,0,x,d);F.lineTo(x,v-d);F.quadraticCurveTo(x,v,x-d,v);F.lineTo(d,v);F.quadraticCurveTo(0,v,0,v-d);F.lineTo(0,d);F.quadraticCurveTo(0,0,d,0);F.closePath();F.fill();n>0&&F.stroke();F.fillStyle=r;F.font=t+" "+(u!="normal"?u+" ":"")+q+(isNaN(q)?"":"px")+" "+h.Lz(l);F.shadowColor=this.jta(C,
D);F.shadowOffsetX=E;F.shadowOffsetY=B;F.shadowBlur=A;F.textBaseline="middle";F.textAlign="center";var L=n+w+N*.5,Q=n+y;e.forEach(function(T,W){F.fillText(T,Math.round(L),Math.round(Q+G[W].height*.5));Q+=G[W].height+R})};m.prototype.Gh=function(e){var b=this.R.get(e);return b===void 0?k.EP[e]:b};m.prototype.jta=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"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),p=a("tdv/player/view/panorama/renderer/object/Plane"),
h=a("tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas"),g=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/util/XR");a=m.extend(p,function(){p.call(this);this.ea=null;this.set("tag","ToolTip");this.set("text","");this.Cq=new THREE.Vector3(0,0,-k.mt());this.fq=null});a.prototype.ya=function(f){this.Rs(f);this.Yg(f);p.prototype.ya.call(this,f)};a.prototype.Rs=function(f){f.jb&&!this.fq&&e.getType()==e.kx.eo&&this.Uh([this.fq=new p])};
a.prototype.Yg=function(f){if(!this.ea||this.W("text")){this.get("textureSource")||this.set("textureSource",new g);this.ea=new h(this.Ka.R,this.get("text"));this.get("textureSource").Vn(this.ea.zg());this.set("contentWidth",this.ea.Zf());this.set("contentHeight",this.ea.pg());this.set("hfov",this.ea.df());this.set("distance",this.Ka.R.get("vrPointerDistance"));var n=this.get("matrix"),l=this.get("intersectionYaw"),q=this.get("intersectionPitch");l!==void 0&&q!==void 0?(this.set("yaw",l),this.set("pitch",
q+c),this.set("distance",this.get("intersectionDistance"))):n?(this.Cq.applyMatrix4(n),this.Cq.x==0&&this.Cq.z==0||this.set("yaw",b*Math.atan2(this.Cq.x,-this.Cq.z)),this.Cq.y==0&&this.Cq.z==0||this.set("pitch",b*Math.atan2(this.Cq.y,Math.sqrt(this.Cq.z*this.Cq.z+this.Cq.x*this.Cq.x))+c)):(this.set("yaw",f.Za),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,k,p){return function(){function h(g,e){this.Lf=g;this.m=e}h.prototype.update=function(){};h.prototype.clear=function(){};h.prototype.getType=function(){return this.Lf};h.prototype.cIa=function(g){return this.F_=(g=g.ih&&p.getCamera(g.ih))?k.rbb(g,this.F_):void 0};h.$P="webxr";h.oB="gaze";h.cZ="gaze_click";
h.dZ="laser";h.YP="mouse";h.ZP="touch";return h}()});
define("tdv/player/view/panorama/renderer/pointer/Beam",["require","exports","tdv/player/view/panorama/renderer/pointer/Pointer","tdv/view/constants/Cursor"],function(a,m,k,p){return function(){function h(g,e,b,c,d){d===void 0&&(d=!0);this.ue=g;this.Cs=e;this.F_=b;this.Rf=c;this.rxa=d;this.$ta=[];this.Nl=[];this.YT={};this.gea=[];this.fc="";this.WC=Number.MAX_VALUE}h.prototype.ow=function(){return this.ue};h.prototype.cO=function(){return this.F_};h.prototype.ew=function(){return this.ue.getType()==
k.YP};h.prototype.Rma=function(){return this.ue.getType()==k.$P};h.prototype.YI=function(){return this.ue.getType()==k.ZP};h.prototype.odb=function(){return this.ue.getType()==k.oB};h.prototype.rFa=function(g,e){this.YT[e]=(this.YT[e]||[]).concat(g)};h.prototype.BOa=function(){return h.GQa.find(this.Jcb.bind(this))};h.prototype.Jcb=function(g){return this.YT[g]!==void 0&&this.YT[g].length>0?!0:!1};h.prototype.k9=function(){return Object.keys(this.YT).length>0};h.prototype.kI=function(g){this.rFa(g,
p.hf)};h.prototype.Z8a=function(g){this.gea=this.gea.concat(g)};h.prototype.fab=function(){return!this.BOa()&&this.gea.length>0};h.prototype.gD=function(g){this.Nl=this.Nl.concat(g)};h.prototype.Te=function(){return this.Nl.length>0};h.prototype.gm=function(g){g&&(this.iG===void 0||this.iG>g)&&(this.iG=g)};h.prototype.cw=function(){return this.iG};h.prototype.F4=function(g,e){if(this.fc==""||this.WC>e)this.fc=g,this.WC=e};h.prototype.GA=function(){return this.fc};h.prototype.Nt=function(g){this.$ta=
g===void 0?[]:Array.isArray(g)?g:[g]};h.prototype.km=function(){return this.$ta.length>0};h.GQa=[p.Ai,p.wra,p.aB,p.hf,p.gf];return h}()});
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"),k=a("tdv/constants/EventName"),
p=a("tdv/constants/Key");a("tdv/player/view/panorama/renderer/3d/util/RayUtil");a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");var h=a("tdv/player/view/panorama/renderer/object/Reticle"),g=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.oB,d);this.$k=this.H=null;this.Nl=[];this.zd=this.Cx=!1;this.oR=null;
this.Vwa=void 0;this.GT=null;this.HAa=void 0;this.Le=new h;this.m.add(this.Le);this.yq="";this.fc=new g;this.fc.set("alpha",0);this.m.add(this.fc);this.Tha=f?this.m.R.get("vrPointerSelectionTime"):void 0;this.Wwa=this.m.R.get("vrGazePointerHideTime");this.P3=this.P3.bind(this);this.Vm=this.Vm.bind(this);document.body.addEventListener("touchend",this.P3);document.addEventListener("keyup",this.Vm,!0);c.O.bind(k.Ar,this.bFa,this,!0);this.wja();this.Rja()});a.prototype.clear=function(){document.body.removeEventListener("touchend",
this.P3);document.removeEventListener("keyup",this.Vm,!0);c.O.h(k.Ar,this.bFa,this,!0);this.Fia();this.m.remove(this.Le);this.Le=null;this.m.remove(this.fc);this.fc=null};a.prototype.update=function(d){this.H=d;this.s4a(d.Zs);this.dm()};a.prototype.P3=function(){this.WK()};a.prototype.Vm=function(d){d.code!=p.ua.BY&&d.code!=p.ua.uK||this.WK()};a.prototype.bFa=function(){this.WK()};a.prototype.WK=function(){var d=this.Cl(k.Pf);this.Yl(d);this.LH(!1);this.cja()};a.prototype.cja=function(){this.m.Wb().o(k.wF,
{kP:k.Pf})};a.prototype.dm=function(){var d=this.Cl(k.Gm);this.Yl(d);this.dz(d.GA());a:{var f=this.Nl;for(var n=d.Nl,l=0;l<f.length;l++)if(n.indexOf(f[l])<0){f=!1;break a}for(l=0;l<n.length;l++)if(f.indexOf(n[l])<0){f=!1;break a}f=!0}f||(this.LH(!1),this.Nl=d.Nl,this.Nl.length&&this.LH(!0,d.k9()))};a.prototype.s4a=function(d){this.Cx!=d&&(this.Cx=d,this.Le.set("changing",this.Cx),this.wja(),this.Rja())};a.prototype.LH=function(d,f){this.zd!=d&&(this.zd=d,this.Le.set("over",this.zd&&f),this.wja(),
this.Rja())};a.prototype.dz=function(d){this.yq!=d&&(this.yq=d,this.fc.set("text",this.yq),this.fc.set("alpha",this.yq?1:0),this.yq&&this.fc.mi())};a.prototype.Yl=function(d){this.m.TV().sort(function(f,n){return n.get("index")-f.get("index")}).forEach(function(f){f.Un(d)}.bind(this))};a.prototype.Cl=function(d){this.$k=this.cIa(this.H);return new e(this,this.$k?[this.$k]:[],this.$k,d)};a.prototype.Rja=function(){!this.zd||this.Cx||this.Tha===void 0?this.Fia():this.zd&&!this.GT&&this.c6a()};a.prototype.wja=
function(){this.zd||this.Cx||this.Wwa===void 0?(this.Le.set("alpha",1),this.jDa()):this.Le.get("alpha")!=1||this.oR||this.P5a()};a.prototype.Fia=function(){this.GT&&(clearInterval(this.GT),this.GT=null)};a.prototype.c6a=function(){this.Le.set("overProgress",0);this.HAa=(new Date).getTime();this.GT=setInterval(this.U1a.bind(this),100)};a.prototype.U1a=function(){var d=(new Date).getTime()-this.HAa;d>=this.Tha?(this.Fia(),this.WK()):this.Le.set("overProgress",d/this.Tha)};a.prototype.jDa=function(){this.oR&&
(clearInterval(this.oR),this.oR=null)};a.prototype.P5a=function(){this.Vwa=(new Date).getTime();this.oR=setInterval(this.l1a.bind(this),10)};a.prototype.l1a=function(){var d=this.Wwa-((new Date).getTime()-this.Vwa);this.Le.set("alpha",Math.max(.01,Math.min(1,d/500)));d<=0&&this.jDa()};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"),k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),p=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),
h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=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.nha=this.tT=this.fv=this.mha=null;new THREE.Matrix4;this.oha=new THREE.Matrix4;this.oha.multiply(c.makeRotationX(-90*d));this.oha.multiply(c.makeTranslation(0,f*.5,0));this.m_=this.l_=this.k_=this.Ox=this.zca=null;new THREE.Matrix4;this.Aca=new THREE.Matrix4;this.BQ=this.j_=this.yca=null;new THREE.Matrix4;this.dG=[new THREE.Matrix4,new THREE.Matrix4,new THREE.Matrix4];this.dG[0].multiply(c.makeRotationX(-90*d));this.dG[0].multiply(c.makeTranslation(0,-l*.5,0));this.dG[1].multiply(c.makeRotationX(-90*
d));this.dG[1].multiply(c.makeTranslation(0,-l*.5,-n*.5));this.dG[2].multiply(c.makeRotationX(-90*d));this.dG[2].multiply(c.makeTranslation(0,-l*.5,-n))});a.prototype.ya=function(q){e.prototype.ya.call(this,q);this.Tja();this.cD()};a.prototype.Tja=function(){this.W("visible")&&(this.get("meshGroup").visible=this.get("visible"));this.W("dotVisible")&&h.zf([this.l_,this.j_],this.get("dotVisible")?1:0)};a.prototype.cD=function(){this.W("over","pressed")&&(this.dEa(),this.AEa())};var f=.35,n=.012,l=.1;
a.prototype.Np=function(){this.j_=h.create(new THREE.SphereGeometry(2.3,32,32),this.pWa());this.l_=h.create(new THREE.SphereGeometry(2,32,32),this.qWa());this.nha=h.create(new THREE.CylinderGeometry(.003,.003,f,8),this.RWa());this.ZK=[];this.ZK.push(h.create(new THREE.CylinderGeometry(n,n,l,32),this.Sba()));this.ZK.push(h.create(new THREE.BoxGeometry(2*n,l,n),this.Sba()));this.ZK.push(h.create(new THREE.CylinderGeometry(n,n,l,32),this.Sba()));return[this.j_,this.l_,this.nha].concat(this.ZK)};a.prototype.pWa=
function(){if(this.yca==null){var q=document.createElement("canvas");q.width=q.height=256;var r=q.getContext("2d"),t=new g;t.Vn(q);this.yca=p.lm(t.texture(),new p.Cp);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.yca};a.prototype.qWa=function(){this.zca==null&&(this.Ox=document.createElement("canvas"),this.Ox.width=this.Ox.height=256,this.k_=this.Ox.getContext("2d"),this.m_=new g,this.m_.Vn(this.Ox),this.zca=p.lm(this.m_.texture(),
new p.Cp),this.dEa());return this.zca};a.prototype.dEa=function(){this.k_.fillStyle=this.vda();this.k_.clearRect(0,0,this.Ox.width,this.Ox.height);this.k_.fillRect(0,0,this.Ox.width,this.Ox.height);this.m_.update()};a.prototype.RWa=function(){this.mha==null&&(this.fv=document.createElement("canvas"),this.fv.width=this.fv.height=256,this.tT=this.fv.getContext("2d"),this.pha=new g,this.pha.Vn(this.fv),this.mha=p.lm(this.pha.texture(),new p.Cp),this.AEa());return[this.mha]};a.prototype.AEa=function(){var q=
b.qp(this.vda()).join(", "),r=this.tT.createLinearGradient(0,0,0,this.fv.height);r.addColorStop(0,"rgba("+q+", 0)");r.addColorStop(.5,"rgba("+q+", 1)");r.addColorStop(1,"rgba("+q+", 1)");this.tT.fillStyle=r;this.tT.clearRect(0,0,this.fv.width,this.fv.height);this.tT.fillRect(0,0,this.fv.width,this.fv.height);this.pha.update()};a.prototype.Sba=function(){if(this.BQ==null){var q=document.createElement("canvas");q.width=q.height=256;var r=q.getContext("2d"),t=new g;t.Vn(q);this.BQ=p.lm(t.texture(),new p.Cp);
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.BQ,this.BQ,this.BQ]};a.prototype.Ss=function(){var q=!1,r=!1,t=!1;if(this.W("intersectionDistance")){r=(r=this.get("intersectionDistance"))?k.Vv(r):k.mt();var u=r/k.mt();this.Aca.makeTranslation(0,0,-r);this.Aca.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.Aca),h.ct(this.l_,c),h.ct(this.j_,c));q&&(c.identity(),
(r=this.get("matrix"))&&c.multiply(r),c.multiply(this.oha),h.ct(this.nha,c));if(t)for(r=this.get("matrix"),q=0;q<this.ZK.length;q++)c.identity(),r&&c.multiply(r),c.multiply(this.dG[q]),h.ct(this.ZK[q],c)};a.prototype.cI=function(){if(this.W("index","meshGroup")){var q=this.get("meshGroup");q&&q.children.forEach(function(r){h.C8(r,this.get("index"))}.bind(this))}};a.prototype.vda=function(){return this.get("pressed")?this.Ka.R.get("vrPointerSelectionColor"):this.get("over")?this.Ka.R.get("vrPointerOverColor"):
this.Ka.R.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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),h=a("tdv/player/view/panorama/renderer/object/Laser"),g=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"),n=a("tdv/player/view/util/geo/Quaternion"),l=new THREE.Matrix4,
q=Math.PI/180;a=m.extend(c,function(r){c.call(this,c.dZ,r);this.$k=this.H=null;this.Nl=[];this.Sk=new h;this.m.add(this.Sk);this.Le=new g;this.m.add(this.Le);this.Tl=!1;this.yq="";this.fc=null;this.Qm=new THREE.Matrix4});a.prototype.clear=function(){this.m.remove(this.Sk);this.m.remove(this.Le);this.Le=this.Sk=null;this.fc&&this.m.remove(this.fc);this.fc=null};a.prototype.update=function(r){this.H=r;this.Le.set("changing",r.Zs);this.Le.set("visible",r.Zs);var t=d.Lg();if(t&&!t.qdb()){var u=t.quaternion(),
v=t.position(),w=f.Dg&&f.Qc,y=n.Za(f.Dg&&f.yg);this.Qm.identity();v?(this.Qm.multiply(l.makeRotationY((y-r.Za)*q)),this.Qm.multiply(l.makeTranslation(-w.x,-w.y,-w.z)),this.Qm.multiply(l.makeTranslation(v.x,v.y,v.z)),this.Qm.multiply(l.makeRotationFromQuaternion(u))):(this.Qm.multiply(l.makeRotationY(-r.Za*q)),t.hand()==d.$a?this.Qm.multiply(l.makeTranslation(-.2,-.4,0)):this.Qm.multiply(l.makeTranslation(.2,-.4,0)),this.Qm.multiply(l.makeRotationY(y*q)),this.Qm.multiply(l.makeRotationFromQuaternion(u)),
this.Qm.multiply(l.makeTranslation(0,0,-.3)));this.Sk.set("matrix",null);this.Sk.set("matrix",this.Qm);this.Sk.set("pressed",t.pressed());this.Sk.set("visible",!0)}else this.Sk.set("visible",!1);this.dm();r=!!t&&t.pressed();this.Tl!=r&&(this.Tl&&this.WK(),this.Tl=r);this.Sk.mi();this.Le.mi()};a.prototype.WK=function(){var r=this.Cl(k.Pf);this.Yl(r);this.Sk.set("over",!0);this.Sk.set("dotVisible",!0);this.Sk.set("intersectionDistance",r.cw());d.Lg();this.cja()};a.prototype.cja=function(){this.m.Wb().o(k.wF,
{kP:k.Pf})};a.prototype.dm=function(){var r=this.Cl(k.Gm);this.Yl(r);this.dz(r.GA());a:{var t=this.Nl;for(var u=r.Nl,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.k9()&&!this.Sk.get("over")||(this.Nl=r.Nl,d.Lg());this.Sk.set("over",r.k9());this.Sk.set("intersectionDistance",r.cw());this.Sk.set("dotVisible",!r.fab())};a.prototype.dz=function(r){this.yq!=r&&(this.yq&&this.m.remove(this.fc),this.yq=r)&&(this.fc=new e(this.yq),
this.fc.set("text",this.yq),this.fc.set("matrix",null),this.fc.set("matrix",this.Qm),this.m.add(this.fc))};a.prototype.Yl=function(r){this.m.TV().sort(function(t,u){return u.get("index")-t.get("index")}).forEach(function(t){t.Un(r)}.bind(this))};a.prototype.Cl=function(r){this.$k=p.qbb(this.Qm,this.$k);return new b(this,[this.$k],this.cIa(this.H),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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),h=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),
g=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.YP,c);this.m.R.bind(k.mb,this.Uk,this,!0);this.m.R.bind(k.sr,this.Zxa,this,!0);this.m.R.bind(k.Db,this.E3a,this,!0);this.m.R.bind(k.Ra,this.re,this,!0);this.m.R.bind(k.bb,this.Vk,this,!0);this.Ny=this.My=this.Ry=this.$o=this.yd=this.xd=void 0;this.$k=this.H=null;this.WM=void 0;this.fc=""});a.prototype.clear=function(){this.m.R.h(k.mb,
this.Uk,this,!0);this.m.R.h(k.sr,this.Zxa,this,!0);this.m.R.h(k.Ra,this.re,this,!0);this.m.R.h(k.bb,this.Vk,this,!0);this.Xja&&(this.m.TO(b.hf),this.Xja=!1);this.dz("")};a.prototype.update=function(c){this.H=c;this.Eja()};a.prototype.sIa=function(){return{x:this.xd,y:this.yd,pageX:this.My,pageY:this.Ny}};a.prototype.Uk=function(c){this.xd=c.x;this.yd=c.y;this.My=c.pageX;this.Ny=c.pageY;this.h4()};a.prototype.Zxa=function(){this.Ny=this.My=this.yd=this.xd=void 0;this.h4()};a.prototype.E3a=function(){this.Ny=
this.My=this.yd=this.xd=void 0;this.h4()};a.prototype.re=function(c){this.xd=this.$o=c.x;this.yd=this.Ry=c.y;this.My=c.pageX;this.Ny=c.pageY;this.Yl(this.Cl(k.mu))};a.prototype.Vk=function(c){this.xd=c.x;this.yd=c.y;this.My=c.pageX;this.Ny=c.pageY;this.Yl(this.Cl(k.lB));this.Mea(this.$o,this.Ry,this.xd,this.yd)&&this.Yl(this.Cl(k.Pf))};a.prototype.Eja=function(){this.Ts||(this.Ts=setTimeout(function(){this.Ts=null;this.dm()}.bind(this),300))};a.prototype.h4=function(){this.Ts&&(clearTimeout(this.Ts),
this.Ts=null);this.dm()};a.prototype.dm=function(){var c=this.Cl(k.Gm);this.Yl(c);this.dz(c.GA());c=c.BOa();this.WM!=c&&(this.WM&&this.m.TO(this.WM),(this.WM=c)&&this.m.V7(this.WM))};a.prototype.dz=function(c){this.fc!=c&&(this.fc=c,this.m.R.set("toolTip",this.fc))};a.prototype.Yl=function(c){this.m.TV().sort(function(d,f){return f.get("index")-d.get("index")}).forEach(function(d){d.Un(c)}.bind(this))};a.prototype.Cl=function(c){return new g(this,this.K_(),null,c)};a.prototype.K_=function(){if(this.xd!==
void 0&&this.yd!==void 0&&this.H.ih){var c=h.getCamera(this.H.ih);if(c)return this.$k=p.tIa(c,this.xd,this.yd,this.H.width,this.H.height,this.$k),[this.$k]}return[]};a.prototype.Mea=function(c,d,f,n){c=f-c;d=n-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"),k=a("tdv/constants/EventName"),p=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),h=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),g=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.ZP,c);this.R=this.m.R;this.R.bind(k.Ra,this.re,this,!0);this.R.bind(k.bb,this.Vk,this,!0);this.R.bind(k.K("touchOverAreaScale"),this.rga,this,!0);this.Ry=this.$o=this.yd=this.xd=void 0;this.cua=this.H=null;this.rga();this.H2a=Array(b.length);this.fc="";this.dm=this.dm.bind(this)});a.prototype.clear=function(){this.R.h(k.Ra,this.re,this,!0);this.R.h(k.bb,this.Vk,this,!0);this.R.h(k.K("touchOverAreaScale"),
this.rga,this,!0);this.dz("")};a.prototype.update=function(c){this.H=c;this.Eja()};a.prototype.re=function(c){this.xd=this.$o=c.x;this.yd=this.Ry=c.y;this.Yl(this.Cl(k.mu))};a.prototype.Vk=function(c){this.xd=c.x;this.yd=c.y;this.Yl(this.Cl(k.lB));this.Mea(this.$o,this.Ry,this.xd,this.yd)&&this.Yl(this.Cl(k.Pf))};a.prototype.Eja=function(){this.Ts||(this.Ts=setTimeout(this.dm,300))};a.prototype.h4=function(){this.Ts&&(clearTimeout(this.Ts),this.Ts=null);this.dm()};a.prototype.dm=function(){this.Ts=
null;var c=this.Cl(k.Gm);this.Yl(c);this.dz(c.GA())};a.prototype.dz=function(c){if(this.fc!=c&&(this.fc=c,c=this.m.R,c.set("toolTip",this.fc),!c.get("toolTipDisabled"))){var d=c.Wb().fc;this.fc?d.Thb(c,this.fc):d.Pe()}};a.prototype.Yl=function(c){this.m.TV().sort(function(d,f){return f.get("index")-d.get("index")}).forEach(function(d){d.Un(c)}.bind(this))};a.prototype.Cl=function(c){var d=c==k.Gm?this.K_(this.H.width*.5,this.H.height*.5,this.aua,this.cua):this.K_(this.xd,this.yd,b,this.H2a);return new g(this,
d,null,c)};a.prototype.K_=function(c,d,f,n){var l=this.H.ih&&h.getCamera(this.H.ih);if(l){var q=this.H.width,r=this.H.height,t=Math.min(q,r)/100;f.forEach(function(u,v){n[v]=p.tIa(l,c+u[0]*t,d+u[1]*t,q,r,n[v])});return n}return[]};a.prototype.Mea=function(c,d,f,n){c=f-c;d=n-d;return Math.sqrt(c*c+d*d)<=4*Math.round(1*Math.min(window.screen.width,window.screen.height)/100)};a.prototype.rga=function(){this.aua=this.GYa(this.R.get("touchOverAreaScale"));this.cua=Array(this.aua.length)};a.prototype.GYa=
function(c){var d=[],f=Math.min(50,Math.ceil(c*5)),n=Math.min(50,Math.ceil(c*30));c=Math.min(50,Math.ceil(c*15));for(var l=-f;l<=f;l++)for(var q=-f;q<=f;q++){var r=Math.sqrt(q*q+l*l);r<=f&&d.push([q,l,r])}for(q=-n;q<-f;q++)d.push([q,0,Math.sqrt(q*q)]);for(q=f+1;q<=n;q++)d.push([q,0,Math.sqrt(q*q)]);for(l=-c;l<-f;l++)d.push([0,l,Math.sqrt(l*l)]);for(l=f+1;l<=c;l++)d.push([0,l,Math.sqrt(l*l)]);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,n=0;n<5;n++){var l=-2+4*n/4,q=Math.sqrt(l*l+f*f);q<=2&&c.push([l,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,k,p,h,g,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,g.$P,u)||this;u.Zs=!1;u.oMa=new Map;u.SO=new Map;u.tW=null;u.Ypa=u.Ypa.bind(u);document.body.addEventListener("touchend",u.Ypa);b.O.bind(k.Pf,u.vt,u,!0);return u}P(t,r);t.prototype.clear=function(){b.O.h(k.Pf,this.vt,this);this.SO.forEach(function(u,v,w){this.XGa(u);w.delete(v)}.bind(this))};t.prototype.update=function(u){this.state=u;this.fjb();this.vA(u.Zs);this.tP()};t.prototype.vt=function(u){this.tW=u=u.data.pointerState;u.mD||this.sNa(u)};t.prototype.Ypa=
function(){var u=b.fe[0]||null;u&&!u.mD&&this.sNa(u)};t.prototype.sNa=function(u){f.copy(u.ray).applyMatrix4(u.matrixWorld);var v=new h(this,[f],b.cO,k.Pf,this.tW==u);this.rNa(v);b.uE(u,!1,!1,u.cw);b.oX(u,50);this.Qib()};t.prototype.vA=function(u){this.Zs!==u&&(this.Zs=u,b.fe.forEach(function(v){b.ehb(v,u)}))};t.prototype.fjb=function(){this.SO.forEach(function(u,v){b.fe.includes(v)||(this.XGa(u),this.SO.delete(v))}.bind(this));b.fe.forEach(function(u){this.SO.has(u)||this.SO.set(u,this.W$a());b.epa(u,
!1)}.bind(this))};t.prototype.tP=function(){var u=b.fe.find(function(A){return A.mD})?[]:b.fe;this.tW=this.tW||(b.fe.length?b.fe.find(function(A){return A.handedness=="right"})||b.fe[0]:null);for(var v=0;v<u.length;v++){var w=u[v];f.copy(w.ray).applyMatrix4(w.matrixWorld);var y=new h(this,[f],b.cO,k.Gm,this.tW==w);this.rNa(y);this.Ljb(y,w);var x=this.oMa.get(w),z=y.Nl;x&&d(x,z)||(this.oMa.set(w,z),x=(x=y.cw())?e.Vv(x):e.mt(),z=z.length>0,((y=y.k9())||w.Rq)&&b.oX(w,5),b.uE(w,z,y,x))}};t.prototype.Ljb=
function(u,v){var w=u.GA()||"",y=this.SO.get(v);y&&w!==y.get("text")&&(w?(y.set("text",w),y.set("alpha",1),y.mi(),w=(w=u.cw())?e.Vv(w):e.mt(),n.radius=w,y.set("intersectionYaw",void 0),y.set("intersectionPitch",void 0),f.copy(v.ray).applyMatrix4(v.matrixWorld),f.intersectSphere(n,l)&&(l.x==0&&l.z==0||y.set("intersectionYaw",q*Math.atan2(l.x,-l.z)),l.y==0&&l.z==0||y.set("intersectionPitch",q*Math.atan2(l.y,Math.sqrt(l.z*l.z+l.x*l.x))),y.set("intersectionDistance",u.cw()))):(y.set("text",""),y.set("alpha",
0)))};t.prototype.rNa=function(u){this.m.TV().sort(function(v,w){return w.get("index")-v.get("index")}).forEach(function(v){v.Un(u)}.bind(this))};t.prototype.Qib=function(){var u=this.m.Wb();u&&u.o(k.wF,{kP:k.Pf})};t.prototype.W$a=function(){var u=new p;u.set("alpha",0);this.m.add(u);return u};t.prototype.XGa=function(u){this.m.remove(u)};return t}(g);var f=new c.Ray,n=new c.Sphere,l=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"),k=a("tdv/player/view/panorama/renderer/pointer/LaserPointer"),
p=a("tdv/player/view/panorama/renderer/pointer/MousePointer"),h=a("tdv/player/view/panorama/renderer/pointer/Pointer"),g=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 h.$P:return new e(c);case h.oB:return new m(c,!0);case h.cZ:return new m(c,!1);case h.dZ:return new k(c);case h.YP:return new p(c);case h.ZP:return new g(c)}}}});
define("tdv/player/view/panorama/renderer/util/CursorManager",["require","tdv/view/constants/Cursor"],function(a){function m(p){this.bc=p;this.Df=[]}var k=a("tdv/view/constants/Cursor");m.prototype.push=function(p){this.Df.push(p);this.ya()};m.prototype.pop=function(p){for(var h=this.Df.length-1;h>=0;h--)if(this.Df[h]==p){this.Df.splice(h,1);this.ya();break}};m.prototype.clear=function(){this.Df.length>0&&(this.bc.set("cursor",k.gf),this.Df=[])};m.prototype.ya=function(){this.bc.set("cursor",this.Df.indexOf(k.Ai)>=
0?k.Ai:this.Df.indexOf(k.hf)>=0?k.hf:this.Df.length>0?this.Df[this.Df.length-1]:k.gf)};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"),k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/events/Event"),g=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"),n=a("tdv/player/view/panorama/renderer/RendererState"),l=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"),y=a("tdv/player/view/panorama/renderer/TextureLoader"),x=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"),E=Math.PI/180,B=m.extend(g,function(C,I,F){g.call(this);this.cf("Renderer");this.set("toolTipDisabled",
!0);this.set("cursor",e.dB);this.set("layout","absolute");this.set("interactionEnabled",!1);this.Ee=C;this.R=I;this.kd=F;this.Je=new v(I);this.ue=null;this.pda=!1;this.H=new n;this.Ka=new r(this.Ee,this.R,this.kd,this);this.Ka.bind(p.V,this.requestFrame,this,!0);this.fk=new l(this.R);this.H.ih=this.fk.Mf();this.H.sV=this.fk.Qua;this.H.tV=this.fk.Rua;this.H.camera=this.fk.getCamera();this.Fxa=(new Date).getTime();this.M3=new y;this.M3.bind(p.ha,this.Z1a,this,!0);this.wya=new w;this.wya.bind(p.V,this.C1a,
this,!0);this.C_=new d(this.H.width,this.H.height,this.H.Wd*E);this.bind(p.Yb,this.jd,this,!0);this.bind(p.Cd,this.To,this,!0);this.bind(p.sd,this.Ro,this,!0);z.O.bind(p.V,this.bq,this,!0);c.bind(p.V,this.k1a,this,!0);k.ba(this.kd,["fxaaEnabled","aaEnabled","hotspotsEnabled","preloadEnabled"],function(){this.H.RI=this.kd.get("hotspotsEnabled");this.H.XW=this.kd.get("preloadEnabled");this.H.Lla=this.kd.get("fxaaEnabled");this.H.WU=this.kd.get("aaEnabled");this.requestFrame()}.bind(this),!0);k.ba(this.kd,
["surfaceSelectionEnabled"],this.Oja.bind(this));this.Oja();this.bq();k.ba(this.Ee,["defaultVRPointer"],this.Aq.bind(this));this.Aq()});B.prototype.create=function(C){return q.create(C)};B.prototype.add=function(C){this.Ka.appendChild(C);this.Ka.Ab().length==1&&this.h1a()};B.prototype.remove=function(C){if(C=this.Ka.Yf(C))C.remove(),this.Ka.Ab().length==0&&this.q1a()};B.prototype.Yf=function(C){return this.Ka.Yf(C)};B.prototype.TV=function(){return this.Ka.all()};B.prototype.wgb=function(C){this.pda!=
C&&(this.pda=C,this.Aq())};B.prototype.UNa=function(C){this.H.rna=C};B.prototype.V7=function(C){this.Je.push(C)};B.prototype.TO=function(C){this.Je.pop(C)};B.prototype.vA=function(C){this.H.Zs=C;this.requestFrame()};B.prototype.tJ=function(){this.sG.o();this.H.TI=!0;this.E2();var C=D.lPa(this.fk.zg());this.H.TI=!1;this.E2();return C};B.prototype.Pka=function(C){this.H.TI=!0;this.E2();C=this.fk.Pka(C);this.H.TI=!1;return C};B.prototype.getPixelRatio=function(){return this.fk.getPixelRatio()};B.prototype.st=
function(){return!!this.fk&&this.fk.st()};B.prototype.Ib=function(){g.prototype.Ib.call(this);this.sG||(this.sG=new f,this.wa().kk(this.sG.ac()))};B.prototype.Aq=function(){var C=this.H.jb?u.$P:this.pda?u.cZ:b.yb()?u.ZP:u.YP;this.ue&&this.ue.getType()==C||(this.ue&&this.ue.clear(),this.ue=t.create(C,this),this.Oja(),this.ue.update(this.H))};B.prototype.Oja=function(){this.H.TX=this.kd.get("surfaceSelectionEnabled")&&[u.YP,u.$P,u.ZP,u.cZ].indexOf(this.ue&&this.ue.getType())>=0};B.prototype.ap=function(){this.Je.clear();
g.prototype.ap.call(this)};B.prototype.jd=function(){var C=this.cb(),I=this.Kb();if(this.H.width!=C||this.H.height!=I)C&&I?(this.H.width=C,this.H.height=I,this.C_.pOa(this.H.width),this.C_.KNa(this.H.height),this.requestFrame()):m.log("Invalid size values: "+C+" "+I)};B.prototype.To=function(){this.H.enabled=!0;this.requestFrame()};B.prototype.Ro=function(){this.H.enabled=!1};B.prototype.bq=function(){this.H.jb=z.isPresenting;this.Aq();this.requestFrame()};B.prototype.k1a=function(){this.Aq();this.requestFrame()};
B.prototype.Z1a=function(){this.requestFrame()};B.prototype.C1a=function(){this.requestFrame()};B.prototype.h1a=function(){this.M3.u8(this.R.Sc().Dn())};B.prototype.q1a=function(){this.fk.Rab();this.M3.u8(null)};B.prototype.dOa=function(C){this.G2!=C&&((this.G2=C)||this.requestFrame())};B.prototype.DJ=function(C){this.H.Bk!=C&&(this.H.Bk=C,this.requestFrame())};B.prototype.setPosition=function(C,I,F,G){if(this.H.Za!=C||this.H.pitch!=I||this.H.fh!=F||this.H.Wd!=G)isNaN(C)||isNaN(I)||isNaN(F)||!G?m.log("Invalid position values: "+
C+" "+I+" "+F+" "+G):(this.H.Za=C,this.H.pitch=I,this.H.fh=F,this.H.Wd=G,this.C_.xJ(this.H.Wd*E),this.requestFrame())};B.prototype.Jc=function(){return this.H.Za};B.prototype.Ic=function(){return this.H.pitch};B.prototype.Ag=function(){return this.H.fh};B.prototype.df=function(){return this.H.Wd};B.prototype.dO=function(){return this.H.jb?this.H.Wi:x.er(this.H.Wi,this.H.width,this.H.height)};B.prototype.eO=function(){return this.H.Wi};B.prototype.unproject=function(C){return this.C_.unproject(C)};
B.prototype.requestFrame=function(){A.requestFrame(this.Xp,this)};B.prototype.Xp=function(){if(A.p6){var C=(new Date).getTime(),I=Math.max(1,Math.min(C-this.Fxa,33));this.Fxa=C;this.o(new h(B.t$,{frameTime:I}));this.H.enabled&&(this.H.vf=I,this.E2())}else this.requestFrame()};B.prototype.E2=function(){this.Ka.Ab().length!=0&&(this.fk.update(this.H),this.H.Yi=this.fk.dbb(),this.H.Xi=this.fk.cbb(),this.H.Wi=this.fk.abb(),this.H.ml=this.fk.getPixelRatio(),this.H.camera=this.fk.getCamera(),this.Ka.update(this.H),
this.M3.update(this.H),this.wya.update(this.H),this.ue.update(this.H),this.G2||this.fk.render())};B.t$="render start";B.Tlb=function(){return!0};return B});
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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/panorama/renderer/Renderer"),g=m.extend(p,function(e){p.call(this);this.m=e;this.m.bind(h.t$,this.iAa,this,!0)});g.prototype.clear=function(){this.m.h(h.t$,this.iAa,this,!0);this.m=null};g.prototype.requestFrame=
function(){this.m.requestFrame()};g.prototype.iAa=function(e){e=e.data.frameTime;this.o(new k(g.dF,{frameTime:e}));this.o(new k(g.eF,{frameTime:e}))};g.dF="frameStart";g.eF="positionSet";return g});
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.Ga=this.Pa=0;this.fb=90;this.us="landscape";this.Vo=0;this.f0=k.yb()}var k=a("tdv/player/view/util/Device"),p=a("tdv/player/view/util/geo/Fov");m.prototype.QNa=function(h){this.fb=this.JHa(h)};m.prototype.JHa=function(h){return this.f0&&this.us=="portrait"?p.vI(h,this.Ga,this.Pa):h};m.prototype.Abb=function(h){return this.f0&&
this.us=="portrait"?p.qm(h,this.Pa,this.Ga):h};m.prototype.Wq=function(h){this.fb=this.f0&&this.klb?p.vI(h,this.Ga,this.Pa):h};m.prototype.Rv=function(){return this.f0&&this.us=="portrait"};m.prototype.df=function(){return this.fb};m.prototype.rV=function(h){return p.vI(h,this.Ga,this.Pa)};m.prototype.setSize=function(h,g){this.Pa=h;this.Ga=g;h=this.vZa();this.us!=h&&this.Vo++;this.us=h};m.prototype.vZa=function(){return this.Pa===0||this.Ga===0?"landscape":this.Pa<this.Ga?"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"),k=a("tdv/constants/Key"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/view/util/KeyboardControl"),e=m.extend(h,function(d){h.call(this);this.m=d;this.ga=!1;this.Vm=this.Vm.bind(this);this.kd=this.m.kd});e.prototype.clear=function(){this.kd=this.m=null};e.prototype.Ua=
function(d){this.ga!=d&&(this.ga&&document.removeEventListener("keyup",this.Vm),(this.ga=d)&&document.addEventListener("keyup",this.Vm))};e.prototype.Vm=function(d){g.lp()||this.kd.get("gazeModeEnabled")||this.kd.get("arrowKeysAction")!="translate"||(c.includes(d.which)&&!d.shiftKey?this.o(new p(e.j$)):b.includes(d.which)&&!d.shiftKey&&this.o(new p(e.k$)))};const b=[k.Sj,k.lo],c=[k.yi,k.io];e.k$="moveForward";e.j$="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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/control/translate/KeyboardManager");a=m.extend(h,function(b){h.call(this);this.m=b;this.Ko=new g(b);this.Ko.bind(g.k$,this.kza,this,
!0);this.Ko.bind(g.j$,this.jza,this,!0)});a.prototype.clear=function(){this.Ko.h(g.k$,this.kza,this,!0);this.Ko.h(g.j$,this.jza,this,!0);this.Ko.clear();this.Ko=null};a.prototype.oE=function(b){this.Ko.Ua(b)};a.prototype.Of=function(b){this.Aa=b};a.prototype.end=function(){this.Aa=null};a.prototype.kza=function(b){this.PDa(b);(b=this.YBa(this.m.Jc(),this.swa()))&&b.o(k.Ar)};a.prototype.jza=function(b){this.PDa(b);(b=this.YBa(this.m.Jc()-180,this.swa()))&&b.o(k.Ar)};a.prototype.PDa=function(b){this.m.Wb().o(new p(k.wF,
{kP:b}))};a.prototype.swa=function(){return this.m.kd.get("keyboardTranslateSelectionAngle")};a.prototype.YBa=function(b,c){var d,f;if(!this.Aa)return null;d!==void 0||(d=-90);f!==void 0||(f=360);var n=b-c*.5,l=b+c*.5,q=Math.max(-90,d-f*.5),r=Math.max(90,d+f*.5);c=this.Aa.get("adjacentPanoramas",[]).slice();c=c.filter(function(t){if(!t.get("enabled"))return!1;t=this.Vr(t);if(!t)return!1;var u=t.Za;for(var v=b-180,w=b+180;u<v;)u+=w-v;for(;u>w;)u-=w-v;t=t.pitch;return n<=u&&u<=l&&q<=t&&t<=r}.bind(this));
if(c.length==0)return null;c.sort(function(t,u){t=this.Vr(t);u=this.Vr(u);return(b-t.Za)*(b-t.Za)+(d-t.pitch)*(d-t.pitch)-((b-u.Za)*(b-u.Za)+(d-u.pitch)*(d-u.pitch))}.bind(this));return c[0]};a.prototype.Vr=function(b){var c=b.get("yaw");b=b.get("distance");if(c===void 0||b===void 0)return null;var d=this.Aa.get("distanceToFloor");return{Za: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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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"),n=a("tdv/player/view/panorama/control/RenderingController"),
l=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(h,function(u,v){h.call(this);this.R=u;this.m=v;this.m.set("visible",!1);this.Ac=new l;this.Wl=new n(this.m);this.Be=new d(this.m);this.$b=new b(this.R,this.m,this.Ac);this.tb=new e(this.m,this.Ac);this.ig=new c(this.m);this.wy=new f(this.m);this.ne=new g(this.m);this.S3=new q(this.m);this.Wl.bind(n.dF,this.QS,this,!0);
this.Wl.bind(n.eF,this.RS,this,!0);this.Be.bind(k.td,this.tza,this,!0);this.Be.bind(k.tg,this.zS,this,!0);this.Be.bind(k.wc,this.wj,this,!0);this.$b.bind(b.nc,this.Tf,this,!0);this.$b.bind(b.u$,this.uza,this,!0);this.$b.bind(b.l$,this.Mza,this,!0);this.$b.bind(b.R9,this.Cya,this,!0);this.$b.bind(b.S9,this.Dya,this,!0);this.$b.bind(b.$E,this.JS,this,!0);this.$b.bind(b.YE,this.vC,this,!0);this.$b.bind(b.ZE,this.Iy,this,!0);this.$b.bind(b.XE,this.IS,this,!0);this.$b.bind(b.lr,this.yC,this,!0);this.tb.bind(e.nc,
this.Tf,this,!0);this.tb.bind(e.ul,this.ks,this);this.tb.bind(e.kr,this.So,this);this.tb.bind(e.dd,this.If,this,!0);this.tb.bind(e.Rj,this.ss,this,!0);this.tb.bind(e.Qj,this.rs,this,!0);this.ig.bind(c.nc,this.Tf,this,!0);this.ig.bind(c.Gk,this.qs,this,!0);this.ig.bind(c.dd,this.If,this,!0);this.wy.bind(f.dj,this.Aza,this,!0)});t.prototype.clear=function(){this.Be.clear();this.Wl.clear();this.tb.clear();this.$b.clear();this.ig.clear();this.wy.clear();this.ne.clear();this.Be.h(k.td,this.tza,this);this.Be.h(k.tg,
this.zS,this);this.Be.h(k.wc,this.wj,this);this.Wl.h(n.dF,this.QS,this);this.Wl.h(n.eF,this.RS,this);this.$b.h(b.nc,this.Tf,this);this.$b.h(b.u$,this.uza,this);this.$b.h(b.l$,this.Mza,this);this.$b.h(b.R9,this.Cya,this);this.$b.h(b.S9,this.Dya,this);this.$b.h(b.$E,this.JS,this);this.$b.h(b.YE,this.vC,this);this.$b.h(b.ZE,this.Iy,this);this.$b.h(b.XE,this.IS,this);this.$b.h(b.lr,this.yC,this);this.tb.h(e.eRa,this.Tf,this);this.tb.h(e.ul,this.ks,this);this.tb.h(e.kr,this.So,this);this.tb.h(e.dd,this.If,
this,!0);this.tb.h(e.Rj,this.ss,this);this.tb.h(e.Qj,this.rs,this);this.ig.h(c.nc,this.Tf,this);this.ig.h(c.Gk,this.qs,this);this.ig.h(c.dd,this.If,this);this.wy.h(f.dj,this.Aza,this);this.R=this.m=this.S3=this.ne=this.wy=this.ig=this.$b=this.tb=this.Wl=this.Be=null};t.prototype.o8=function(u){this.wy.o8(u)};t.prototype.bpa=function(u){this.$b.bpa(u)};t.prototype.Of=function(u,v,w){this.m.set("visible",!0);this.ig.K8();u.set("currentTime",w);this.$b.start(u,v)};t.prototype.AD=function(){return this.Be.Aa||
this.$b.jbb()||this.$b.Gu};t.prototype.uA=function(){this.Be.stop();this.ig.end();this.tb.end();this.$b.Pe();this.wy.stop();this.ne.end();this.S3.end()};t.prototype.YO=function(){this.tb.resume();this.ig.YO()};t.prototype.OO=function(){this.tb.pause();this.ig.OO()};t.prototype.play=function(){this.tb.play();this.ne.play();this.ig.play()};t.prototype.pause=function(){this.tb.pause();this.ne.pause();this.ig.pause()};t.prototype.stop=function(){this.tb.stop();this.ne.stop();this.ig.stop()};t.prototype.oE=
function(u){this.tb.oE(u);this.S3.oE(u)};t.prototype.getTime=function(){return this.ig.getTime()};t.prototype.moveTo=function(u,v,w,y,x){this.tb.moveTo(u,v,w,y,x)};t.prototype.Jc=function(){return this.m?this.m.Jc():void 0};t.prototype.Ic=function(){return this.m?this.m.Ic():void 0};t.prototype.Ag=function(){return this.m?this.m.Ag():void 0};t.prototype.df=function(){return this.m?this.Ac.Abb(this.m.df()):void 0};t.prototype.dO=function(){return this.m?this.m.dO():void 0};t.prototype.eO=function(){return this.m?
this.m.eO():void 0};t.prototype.If=function(){var u=this.ig.gl()||this.tb.gl();this.o(new p(t.dd,{state:u}))};t.prototype.pl=function(u){this.tb.pl(u)};t.prototype.uX=function(u){this.tb.uX(u)};t.prototype.qE=function(u){this.tb.qE(u)};t.prototype.vX=function(u){this.tb.vX(u)};t.prototype.rg=function(u){this.ig.rg(u)};t.prototype.EJ=function(u){this.tb.EJ(u)};t.prototype.mma=function(u,v){return(u=r.get(u,v,this.m.Jc(),this.m.Ic(),this.m.Ag(),this.m.df(),this.m.cb(),this.m.Kb()))?{x:u.x,y:u.y}:null};
t.prototype.Jbb=function(u,v){return(u=r.Xjb(u,v,this.m))?{yaw:u.Za,pitch:u.pitch}:null};t.prototype.tJ=function(){this.m.tJ()};t.prototype.Fma=function(){return this.$b.Fma()};t.prototype.uza=function(u){this.Be.start(u.data.panorama)};t.prototype.wj=function(u){this.m.vA(u.percent<100);this.o(new p(t.Qw,{percent:u.percent}))};t.prototype.tza=function(u){this.ig.end();this.S3.Of(u.data.panorama)};t.prototype.zS=function(){this.m.vA(!1);this.o(new p(t.RE))};t.prototype.Tf=function(){this.Wl.requestFrame()};
t.prototype.QS=function(u){u=u.data.frameTime;this.Ac.setSize(this.m.cb(),this.m.Kb());this.$b.rA(u);this.tb.rA(u)};t.prototype.RS=function(u){u=u.data.frameTime;this.$b.xe(u);this.tb.xe(u);this.ig.xe(u);this.wy.xe(u);this.ne.xe(u)};t.prototype.JS=function(u){this.wy.display(u.data.panorama);this.ig.nO(u.data.panorama);this.o(new p(t.$E,{panorama:u.data.panorama}))};t.prototype.Mza=function(u){this.wy.Pe(u.data.panorama)};t.prototype.Cya=function(u){this.ig.start(u.data.panorama);this.ne.start(u.data.panorama)};
t.prototype.Dya=function(){this.ig.end();this.m.set("visible",!1)};t.prototype.IS=function(u){this.tb.end();this.ne.end(u.data.nextPanorama);this.o(new p(t.XE,{panorama:u.data.panorama}))};t.prototype.Iy=function(u){this.tb.start(u.data.panorama,u.data.camera);this.o(new p(t.ZE,{panorama:u.data.panorama}))};t.prototype.vC=function(u){this.o(new p(t.YE,{panorama:u.data.panorama}))};t.prototype.Aza=function(u){this.tb.kpa(u.data.yawDelta,0)};t.prototype.ks=function(u){this.o(new p(t.ul,u.data))};t.prototype.So=
function(u){this.o(new p(t.kr,u.data))};t.prototype.yC=function(u){this.o(new p(t.lr,u.data))};t.prototype.ss=function(){this.ig.vP();this.o(new p(t.Rj))};t.prototype.rs=function(){this.o(new p(t.Qj))};t.prototype.HNa=function(u){this.ig.BJ(u)};t.prototype.nE=function(u){this.ig.nE(u)};t.prototype.qs=function(u){this.o(new p(t.Gk,u.data))};t.Qw="loadingProgress";t.RE="loadingEnd";t.ul="movementChange";t.kr="positionChange";t.$E="panoramaStart";t.XE="panoramaEnd";t.ZE="panoramaShow";t.YE="panoramaHide";
t.dd="playbackStateChange";t.Rj="userInteractionStart";t.Qj="userInteractionEnd";t.Gk="timeChange";t.lr="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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/constants/PlaybackState"),g=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"),n=a("tdv/player/view/panorama/control/constants/Movement"),l=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"),y=a("tdv/view/util/KeyboardControl"),x=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.Hia=this.kea=this.YB=this.E_=this.L0=this.C0=this.oba=this.CC=this.Ui=this.Oaa=!1;this.Qda=!0;this.q3=this.s0=this.Ho=this.QZ=!1;this.sia=y.lp();y.IV.bind(k.V,this.m1a,this,!0);this.Rr=!1;this.B_=this.mda=this.qf=this.Zb=0;this.Oga=this.Qga=void 0;this.Gfa=!0;this.zj=h.aa;this.Yp=this.Yp.bind(this);this.U=this.m=
null;this.mya={};for(var z in x.ox)this.mya[z]=this.LWa(z);this.vZ=new b(this,"buttonToggleGyroscope",v.Mk);this.vZ.bind(k.Jk,function(){this.set("gyroscopeEnabled",!0)},this);this.vZ.bind(k.Im,function(){this.set("gyroscopeEnabled",!1)},this);this.vZ.set("pressed",this.get("gyroscopeEnabled")&&r.dl);(new b(this,"buttonCardboardView",v.jf)).bind(k.oa,function(){this.set("viewMode",x.EF)},this,!0);(new b(this,"buttonVRView",v.jf)).bind(k.oa,function(){this.set("viewMode",x.EF)},this,!0);u.O.bind(k.V,
function(){this.dja("viewMode");this.o(x.y$)},this,!0);this.uZ=new b(this,"buttonToggleGazeMode",v.Mk);this.uZ.bind(k.Jk,function(){this.set("gazeModeEnabled",!0)},this);this.uZ.bind(k.Im,function(){this.set("gazeModeEnabled",!1)},this);this.uZ.set("pressed",this.get("gazeModeEnabled"));this.wZ=new b(this,"buttonToggleHotspots",v.Mk);this.wZ.bind(k.Jk,function(){this.set("hotspotsEnabled",!0)},this);this.wZ.bind(k.Im,function(){this.set("hotspotsEnabled",!1)},this);this.wZ.set("pressed",this.get("hotspotsEnabled"));
this.zZ=new b(this,"buttonToggleSurfaceSelection",v.Mk);this.zZ.bind(k.Jk,function(){this.set("surfaceSelectionEnabled",!0)},this);this.zZ.bind(k.Im,function(){this.set("surfaceSelectionEnabled",!1)},this);this.zZ.set("pressed",this.get("surfaceSelectionEnabled"));this.kVa=new b(this,"buttonScreenshot",v.jf);this.kVa.bind(k.oa,this.QBa,this,!0);this.$d=m.Qq(this.Mh,this)});x.UQa="cameraPositionChange";x.Qw="loadingProgress";x.aRa="preloadMediaShow";x.y$="viewModeChange";x.prototype.moveLeft=function(){this.ld(n.oK)};
x.prototype.moveRight=function(){this.ld(n.pK)};x.prototype.moveUp=function(){this.ld(n.qK)};x.prototype.moveDown=function(){this.ld(n.nK)};x.prototype.playLeft=function(){this.ld([n.oK,n.PLAYING])};x.prototype.playRight=function(){this.ld([n.pK,n.PLAYING])};x.prototype.playUp=function(){this.ld([n.qK,n.PLAYING])};x.prototype.playDown=function(){this.ld([n.nK,n.PLAYING])};x.prototype.play=function(){this.Ql()};x.prototype.pause=function(){this.ws()};x.prototype.stop=function(){this.xC()};x.prototype.seek=
function(z){this.IH(z)};x.prototype.setFramePlaybackPosition=function(z){this.I4a(z)};x.prototype.setFrameTransitionPosition=function(z){this.J4a(z)};x.prototype.restart=function(){this.wC()};x.prototype.zoomIn=function(){this.ld(n.mx)};x.prototype.zoomOut=function(){this.ld(n.nx)};x.prototype.resumeCamera=function(){this.D3a()};x.prototype.pauseCamera=function(){this.t2a()};x.prototype.moveTo=function(z,A,D,E){this.lya(z,A,D,E,!1)};x.prototype.setPosition=function(z,A,D,E){this.lya(z,A,D,E,!0)};
x.prototype.getScreenPosition=function(z,A){return this.NZa(z,A)};x.prototype.getPanoramaPosition=function(z,A){return this.wZa(z,A)};x.prototype.saveScreenshot=function(){return this.QBa()};x.prototype.get=function(z,A){switch(z){case "currentTime":return this.U&&this.U.getTime()||0;case "viewMode":return u.isPresenting?x.EF:x.yaa;case "video":z="panorama";break;case "rendererPanorama":return this.U&&this.U.AD()}if(!A)switch(z){case "mouseControlMode":A=g.tra;break;case "touchControlMode":A=g.msa}return c.prototype.get.call(this,
z,A)};x.prototype.set=function(z,A){if(this.get(z)!=A){switch(z){case "application":this.Oaa=!0;this.$d();break;case "startTime":this.CC=!0;this.$d();break;case "video":case "panorama":z="panorama";this.CC=!0;this.$d();break;case "camera":this.oba=!0;this.$d();break;case "viewerArea":this.Ui=!0;this.$d();break;case "displayPlaybackBar":case "hdrPanoramaDisplayPlaybackBarSteps":case "livePanoramaDisplayPlaybackBarSteps":case "buttonPlay":case "buttonPlayPause":this.Rr=!0;this.$d();break;case "mapPlayer":this.C0=
!0;this.$d();break;case "model3DPlayer":this.L0=!0;this.$d();break;case "gazeModeEnabled":q.b9()&&(A=!1);A&&y.lp()&&y.Aoa();this.E_=!0;this.$d();break;case "gyroscopeEnabled":this.YB=!0;this.$d();break;case "gyroscopeVerticalDraggingEnabled":this.Qda=!0;this.$d();break;case "viewMode":A=="vr"&&(A=x.EF);A==x.EF?this.get("viewerArea").set("viewMode","vr"):this.get("viewerArea").set("viewMode","standard");A=u.isPresenting?x.EF:x.yaa;break;case "hotspotsEnabled":this.kea=!0;this.$d();break;case "mouseControlMode":case "touchControlMode":this.QZ=
!0;this.$d();break;case "surfaceSelectionEnabled":this.Hia=!0,this.$d()}c.prototype.set.call(this,z,A)}};x.prototype.Xq=function(z){this.Ho!=z&&((this.Ho=z)?document.addEventListener("keyup",this.Yp,!0):document.removeEventListener("keyup",this.Yp,!0),this.U&&this.U.oE(this.Ho),this.s0=!0,this.$d())};x.prototype.m1a=function(){var z=y.lp();this.sia!==z&&(this.q3=!0,this.sia=z,this.$d())};x.prototype.Yp=function(z){var A=this.get("gazeModeKeyCode");A&&!y.lp()&&z.code==A&&this.set("gazeModeEnabled",
!this.get("gazeModeEnabled"))};x.prototype.Rka=function(){return this.get("doubleClickAction")!="inherit"};x.prototype.Tib=function(){this.rJ([this])};x.prototype.fba=function(z){c.prototype.fba.call(this,z);z.bind(k.Ik,this.XEa,this,!0)};x.prototype.kja=function(z){c.prototype.kja.call(this,z);z.h(k.Ik,this.XEa,this,!0)};x.prototype.XEa=function(){switch(this.get("doubleClickAction")){case "toggle_fullscreen":var z=this.get("application").ck;z&&z.dl()&&z.toggle()}};x.prototype.LWa=function(z){var A=
x.ox[z];z=new b(this,z,v.jf);z.bind(k.Ra,function(){this.ld(A.movement)},this);A.stopOnRelease&&z.bind(k.bb,function(){this.ld(n.tg)},this);return z};x.prototype.Mh=function(){if(this.Ui||this.Oaa)this.Ui=this.Oaa=!1,this.q3=this.s0=this.QZ=this.YB=this.E_=this.L0=this.C0=!0,this.Lx(),this.get("viewerArea")&&this.get("application")&&this.Kx(),this.TT(this.get("viewerArea"));var z=!1;if(this.m){this.C0&&(this.C0=!1,this.U.o8(this.get("mapPlayer")));this.L0&&(this.L0=!1,this.U.bpa(this.get("model3DPlayer")));
this.QZ&&(this.QZ=!1,this.U.qE(this.get("mouseControlMode")),this.U.EJ(this.get("touchControlMode")));if(this.CC||this.oba)this.B_=this.mda=this.Zb=this.qf=0,this.Oga=this.Qga=void 0,z=!0,this.oba=this.CC=!1,this.get("panorama")?(this.get("viewerArea").Sc().cib(),this.U.Of(this.get("panorama"),this.get("camera",new d),this.get("startTime"))):(this.U.uA(),this.Gfa=!0,this.zj=h.aa,this.Kd(h.aa));if(this.E_||this.s0||this.q3){this.s0=this.q3=this.E_=!1;var A=this.get("gazeModeEnabled");this.m.wgb(A&&
this.Ho&&!this.sia);this.uZ.set("pressed",A)}this.Qda&&(this.Qda=!1,this.U.vX(this.get("gyroscopeVerticalDraggingEnabled",!0)));this.YB&&(this.YB=!1,(A=this.get("gyroscopeEnabled")&&r.dl)&&r.disabled&&(A=!1,t.dra.show(function(){r.xoa(function(){this.set("gyroscopeEnabled",!0)}.bind(this))}.bind(this))),this.set("gyroscopeEnabled",A),this.U.uX(A),this.vZ.set("pressed",A));this.kea&&(this.kea=!1,this.wZ.set("pressed",this.get("hotspotsEnabled")));this.Rr&&(this.Rr=!1,z=!0);this.Hia&&(this.Hia=!1,this.zZ.set("pressed",
this.get("surfaceSelectionEnabled")));z&&this.uz()}};x.prototype.ZM=function(){this.U.Fma()||this.set("panorama",null)};x.prototype.Kx=function(){var z=this.get("viewerArea"),A=this.get("application");this.m=new l(A,z,this);this.m.xa({left:0,top:0,bottom:0,right:0});z.hb(this.m);this.U=new f(z,this.m);this.U.bind(f.ul,this.ks,this);this.U.bind(f.kr,this.Qya,this);this.U.bind(f.Qw,this.wj,this);this.U.bind(f.RE,this.eM,this);this.U.bind(f.ZE,this.Iy,this,!0);this.U.bind(f.YE,this.vC,this,!0);this.U.bind(f.$E,
this.JS,this,!0);this.U.bind(f.XE,this.IS,this,!0);this.U.bind(f.dd,this.If,this);this.U.bind(f.Rj,this.ss,this);this.U.bind(f.Qj,this.rs,this);this.U.bind(f.Gk,this.qs,this);this.U.bind(f.lr,this.yC,this,!0);this.get("application").bind(k.K("mute"),this.FS,this);this.get("application").get("mute",!1)&&this.U.rg(!0);this.U.oE(this.Ho);u.O.bind(k.V,this.bq,this,!0);this.Oba();this.SC(!0)};x.prototype.Lx=function(){this.m&&(this.U.h(f.ul,this.ks,this),this.U.h(f.kr,this.Qya,this),this.U.h(f.Qw,this.wj,
this),this.U.h(f.RE,this.eM,this),this.U.h(f.ZE,this.Iy,this,!0),this.U.h(f.YE,this.vC,this,!0),this.U.h(f.$E,this.JS,this,!0),this.U.h(f.XE,this.IS,this,!0),this.U.h(f.dd,this.If,this),this.U.h(f.Rj,this.ss,this),this.U.h(f.Qj,this.rs,this),this.U.h(f.Gk,this.qs,this),this.U.h(f.lr,this.yC,this),this.U.clear(),this.U=null,this.get("application").h(k.K("mute"),this.FS,this),this.m.getParent().removeChild(this.m),this.m=null,u.O.h(k.V,this.bq,this,!0),this.SC(!1))};x.prototype.FS=function(){this.m&&
this.U.rg(this.get("application").get("mute",!1))};x.prototype.If=function(z){this.zj=z.data.state;this.$g()};x.prototype.$g=function(){this.Kd(this.Gfa||u.isPresenting?this.zj:h.PLAYING)};x.prototype.ss=function(){this.o(new p(k.wsa))};x.prototype.rs=function(){this.o(new p(k.vsa))};x.prototype.JS=function(z){this.o(new p(x.aRa,{panorama:z.data.panorama}))};x.prototype.IS=function(){};x.prototype.Iy=function(z){this.Oba();this.YR(z.data.panorama)};x.prototype.vC=function(z){this.WR(z.data.panorama)};
x.prototype.ks=function(z){for(var A in x.ox)this.mya[A].set("state",z.data[x.ox[A].pressedOn]?w.Mb:w.gf);this.Gfa=z.data.stopped;this.$g();this.o(new p(k.vra,z.data))};x.prototype.Qya=function(z){this.Oba();this.o(new p(x.UQa,z.data))};x.prototype.Oba=function(){this.U&&(this.set("yaw",this.U.Jc()),this.set("pitch",this.U.Ic()),this.set("roll",this.U.Ag()),this.set("hfov",this.U.df()),this.set("actualHFOV",this.U.dO()),this.set("actualVFOV",this.U.eO()))};x.prototype.wj=function(z){this.m.getParent().xa({progressPercent:z.data.percent,
progressVisible:!0});this.o(new p(x.Qw,z.data))};x.prototype.eM=function(){this.m.getParent().set("progressVisible",!1)};x.prototype.yC=function(){this.o(k.daa)};x.prototype.bq=function(){this.set("viewMode",u.isPresenting?x.EF:x.yaa);this.$g()};x.prototype.lya=function(z,A,D,E,B){this.U&&this.U.moveTo(z,A,D,E,B)};x.prototype.ld=function(z){this.U&&this.U.pl(z)};x.prototype.Ql=function(){this.U&&this.U.play()};x.prototype.sq=function(){this.U&&this.U.stop()};x.prototype.ws=function(){this.U&&this.U.pause()};
x.prototype.IH=function(z){this.U&&(this.dwa()?this.U.nE(z):this.U.HNa(z))};x.prototype.I4a=function(z){this.U&&this.U.HNa(z)};x.prototype.J4a=function(z){this.U&&this.U.nE(z)};x.prototype.t2a=function(){this.U&&this.U.OO()};x.prototype.D3a=function(){this.U&&this.U.YO()};x.prototype.NZa=function(z,A){if(this.U)return this.U.mma(z,A)};x.prototype.wZa=function(z,A){if(this.U)return this.U.Jbb(z,A)};x.prototype.QBa=function(){this.U&&this.U.tJ()};x.prototype.iT=function(z){this.IH(z.data.position)};
x.prototype.qs=function(z){this.qf=z.data.time;this.Zb=z.data.duration;this.mda=z.data.transitionPosition;this.B_=z.data.transitionLength;this.Qga=z.data.steps;this.Oga=z.data.selectedStep;this.uz()};x.prototype.uz=function(){var z=this.m.getParent(),A=!1;if(this.NYa()){var D=this.dwa(),E=this.yZa();D?this.B_>0&&(z.xa({playbackBarPosition:this.mda,playbackBarDuration:this.B_,playbackBarSteps:this.Qga,playbackBarSelectedStep:this.Oga,playbackBarLiveDragging:E}),A=!0):this.Zb>0&&(z.xa({playbackBarPosition:this.qf,
playbackBarDuration:this.Zb,playbackBarSteps:void 0,playbackBarSelectedStep:void 0,playbackBarLiveDragging:E}),A=!0)}z.set("playbackBarVisible",A)};x.prototype.NYa=function(){var z=this.get("panorama");return z?e.Qa("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):e.Qa("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):e.Qa("VideoPanorama",z)?this.get("videoPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",
!0)):!1:!1};x.prototype.dwa=function(){var z=this.get("panorama");return z?e.Qa("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBarSteps",!0):e.Qa("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBarSteps",!0):!1:!1};x.prototype.yZa=function(){var z=this.get("panorama");return!z||e.Qa("VideoPanorama",z)?!1:!0};x.EF="cardboard";x.yaa="standard";x.ox={buttonMoveLeft:{movement:n.oK,pressedOn:"movingLeft",stopOnRelease:!0},buttonMoveRight:{movement:n.pK,pressedOn:"movingRight",stopOnRelease:!0},
buttonMoveUp:{movement:n.qK,pressedOn:"movingUp",stopOnRelease:!0},buttonMoveDown:{movement:n.nK,pressedOn:"movingDown",stopOnRelease:!0},buttonPlayLeft:{movement:[n.oK,n.PLAYING],pressedOn:"movingLeft",stopOnRelease:!1},buttonPlayRight:{movement:[n.pK,n.PLAYING],pressedOn:"movingRight",stopOnRelease:!1},buttonPlayUp:{movement:[n.qK,n.PLAYING],pressedOn:"movingUp",stopOnRelease:!1},buttonPlayDown:{movement:[n.nK,n.PLAYING],pressedOn:"movingDown",stopOnRelease:!1},buttonZoomIn:{movement:n.mx,pressedOn:"zoomingIn",
stopOnRelease:!0},buttonZoomOut:{movement:n.nx,pressedOn:"zoomingOut",stopOnRelease:!0}};return x});
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"),k=a("tdv/player/script/MediaPlayer"),p=a("tdv/player/script/PlayListItem");a=m.define("PanoramaPlayListItem",p,function(){p.call(this)});a.prototype.start=function(){p.prototype.start.call(this);var h=this.get("player");h&&(h.bind(k.Vh,this.Iy,this),h.set("panorama",this.get("media")),h.set("camera",
this.get("camera")))};a.prototype.stop=function(){var h=this.get("player");h&&(h.h(k.Vh,this.Iy,this),h.get("panorama")==this.get("media")&&h.set("panorama",null));p.prototype.stop.call(this)};a.prototype.Iy=function(h){h.data.media==this.get("media")&&(this.get("player").h(k.Vh,this.Iy,this),this.get("player").bind(k.fo,this.vC,this),this.kD())};a.prototype.vC=function(h){h.data.media==this.get("media")&&(this.get("player").h(k.fo,this.vC,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,k,p,h){a=function(g){function e(){return g.call(this)||this}P(e,g);e.prototype.Yv=function(){var b=[],c=this.get("image");c&&b.push(h.nt(c).get("url"));this.get("audios",[]).forEach(function(d){b=b.concat(d.Yv())}.bind(this));return b};return e}(p);k.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.Yv=function(){var k=[],p=this.get("playList");p&&p.get("items",[]).forEach(function(h){(h=h.get("media"))&&(k=k.concat(h.Yv()))});this.get("audios",[]).forEach(function(h){k=k.concat(h.Yv())});return k};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"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/script/MediaAudio");return k.define("PhotoAlbumAudio",p,function(){p.call(this,m.cSa)})});
define("tdv/player/view/photo/control/audio/AudioController",["require","tdv/constants/PlaybackState"],function(a){function m(p){this.Jr=p;this.JK=[];this.zu=[];this.Ws=1}var k=a("tdv/constants/PlaybackState");m.prototype.clear=function(){for(var p=0;p<this.JK.length;p++)this.JK[p].Yc(k.aa);this.ZTa();this.zu=this.JK=null};m.prototype.stop=function(){for(var p=0;p<this.zu.length;p++)this.zu[p].Yc(k.aa)};m.prototype.play=function(){for(var p=0;p<this.zu.length;p++){var h=this.zu[p];h.getState()!=k.PLAYING&&
h.Yc(k.PLAYING)}};m.prototype.pause=function(){for(var p=0;p<this.zu.length;p++){var h=this.zu[p];h.getState()==k.PLAYING&&h.Yc(k.Xb)}};m.prototype.start=function(){this.stop();for(var p=0;p<this.Jr.length;p++){var h=this.Jr[p],g=h.EI();g&&(this.JK.push(g),h.get("autoplay",!1)&&this.zu.push(g))}for(p=0;p<this.zu.length;p++)this.zu[p].Yc(k.PLAYING)};m.prototype.xe=function(){};m.prototype.ZTa=function(){for(var p=0;p<this.JK.length;p++)this.JK[p].BA(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"),k=a("tdv/player/view/photo/control/audio/AudioController");return m.extend(k,function(p){k.call(this,p.get("audios",[]));this.f2=p})});
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"),k=a("tdv/player/view/photo/control/audio/AudioController");return m.extend(k,function(p){k.call(this,p.get("audios",[]));this.Qf=p})});
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.Uj=[];this.yj=[]}var k=a("tdv/player/view/photo/control/audio/PhotoAudioController"),p=a("tdv/player/view/photo/control/audio/AlbumAudioController");m.prototype.clear=function(){this.ROa();this.yj=this.Uj=null};m.prototype.ROa=function(){for(var h=0;h<this.Uj.length;h++)this.Uj[h].clear();
for(h=0;h<this.yj.length;h++)this.yj[h].clear();this.Uj=[];this.yj=[]};m.prototype.pause=function(){for(var h=0;h<this.Uj.length;h++)this.Uj[h].pause();for(h=0;h<this.yj.length;h++)this.yj[h].pause()};m.prototype.play=function(){for(var h=0;h<this.Uj.length;h++)this.Uj[h].play();for(h=0;h<this.yj.length;h++)this.yj[h].play()};m.prototype.stop=function(){for(var h=0;h<this.Uj.length;h++)this.Uj[h].stop();for(h=0;h<this.yj.length;h++)this.yj[h].clear();this.yj=[]};m.prototype.dib=function(h){h=new k(h);
this.yj.push(h);h.start()};m.prototype.lib=function(h){for(var g=0;g<this.yj.length;g++)if(this.yj[g].f2==h){this.yj[g].clear();this.yj.splice(g,1);break}};m.prototype.Gpa=function(h){h=new p(h);this.Uj.push(h);h.start()};m.prototype.iib=function(h){for(var g=0;g<this.Uj.length;g++)if(this.Uj[g].Qf==h){this.Uj[g].clear();this.Uj.splice(g,1);break}};m.prototype.xe=function(h){for(var g=0;g<this.Uj.length;g++)this.Uj[g].xe(h);for(g=0;g<this.yj.length;g++)this.yj[g].xe(h)};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.dc=this.cc=.5;this.hc=1;this.ji=k.ej;this.po=this.qo=100}a("tdv/utils");var k=a("tdv/view/constants/ScaleMode");m.prototype.getX=function(){this.gp();return this.cc};m.prototype.getY=function(){this.gp();return this.dc};m.prototype.Uz=function(){this.gp();return this.hc};m.prototype.setConfiguration=function(p,h,g){this.ji=g;this.dc=this.cc=.5;
this.hc=1;this.Rd=!0};m.prototype.setPosition=function(p,h,g){this.cc=p;this.dc=h;this.hc=g;this.Rd=!0};m.prototype.setSize=function(p,h){this.qo=p;this.po=h;this.Rd=!0};m.prototype.gp=function(){if(this.Rd){this.Rd=!1;this.hc<1&&(this.hc=1);var p=Math.min(.5/this.hc,.5),h=Math.max(1-.5/this.hc,.5);this.cc<p?this.cc=p:this.cc>h&&(this.cc=h);p=Math.min(.5/this.hc,.5);h=Math.max(1-.5/this.hc,.5);this.dc<p?this.dc=p:this.dc>h&&(this.dc=h)}};return m});
define("tdv/player/view/photo/control/camera/PhotoCameraController",["require"],function(){function a(m){this.va=m;this.dc=this.cc=.5;this.hc=1;this.J2=!1}a.prototype.start=function(){this.dc=this.cc=.5;this.hc=1;this.J2=!0};a.prototype.clear=function(){this.va=null};a.prototype.setPosition=function(m,k,p){this.cc=m;this.dc=k;this.hc=p};a.prototype.Nf=function(){return this.J2};a.prototype.Lb=function(){this.J2=!1};return a});
define("tdv/player/script/PhotoCameraPosition",["require","exports","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a,m,k,p){a=function(h){function g(e,b,c){var d=h.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(g,h);return g}(k);p.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"),k=a("tdv/player/view/photo/control/camera/PhotoCameraController"),p=a("tdv/player/script/PhotoCameraPosition"),h=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(k,function(e){k.call(this,e);this.ja=
null});a.prototype.start=function(e){var b=e.get("initialPosition",new p(.5,.5,1)),c=e.get("targetPosition",new p(.5,.5,1)),d=e.get("duration",1E3);d==0?(this.cc=b.get("x"),this.dc=b.get("y"),this.hc=b.get("zoomFactor")):this.ja=new h(e.get("easing","linear"),[new g("x",b.get("x",.5),c.get("x",.5)),new g("y",b.get("y",.5),c.get("y",.5)),new g("zoom",b.get("zoomFactor",1),c.get("zoomFactor",1))],d);this.Lb(0)};a.prototype.clear=function(){this.ja=null;k.prototype.clear.call(this)};a.prototype.Nf=function(){return this.ja!=
null};a.prototype.Lb=function(e){this.ja&&(this.ja.Lb(e),this.va.setPosition(this.ja.ib("x"),this.ja.ib("y"),this.ja.ib("zoom")),this.cc=this.va.getX(),this.dc=this.va.getY(),this.hc=this.va.Uz(),this.ja.Qe()&&(this.ja=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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),
h=a("tdv/player/parser/ClassInfo"),g=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"),n=m.extend(p,function(l,q){p.call(this);this.R=l;this.rd=q;this.R.bind(f.Yb,this.jd,this);this.H=g.aa;this.kn=this.f2=this.yc=this.Ia=null;this.va=new b});n.prototype.clear=
function(){this.end();this.va=null;this.R.h(f.Yb,this.jd,this);this.R=null};n.prototype.end=function(l){if(this.Ia==l||typeof l=="undefined")this.Xua(),this.yc=this.f2=this.Ia=null};n.prototype.start=function(l){if(this.Ia!=l){this.end(this.Ia);var q=l.get("media"),r=l.get("camera"),t=q.get("width",100),u=q.get("height",100),v=r?r.get("scaleMode",e.ej):e.ej;this.Ia=l;this.yc=r;this.f2=q;this.ga=!0;this.va.setConfiguration(t,u,v);this.NWa(r);this.Sa()}};n.prototype.stop=function(){this.H!=g.aa&&(this.H=
g.aa,this.kn&&(this.kn.start(this.yc),this.Sa()))};n.prototype.play=function(){if(this.H==g.aa||this.H==g.Xb)this.H=g.PLAYING,this.Sa()};n.prototype.pause=function(){this.H==g.PLAYING&&(this.H=g.Xb)};n.prototype.rA=function(l){this.kn&&this.kn.Nf()&&(this.H==g.PLAYING&&(this.kn.Lb(l),this.Sa()),this.pn(this.kn.cc,this.kn.dc,this.kn.hc))};n.prototype.NWa=function(l){this.Xua();h.Qa("MovementPhotoCamera",l)?this.kn=new d(this.va):this.kn=new c(this.va);this.kn.start(l)};n.prototype.Xua=function(){this.kn&&
(this.kn.clear(),this.kn=null)};n.prototype.jd=function(){this.va.setSize(this.R.cb(),this.R.Kb());this.Sa()};n.prototype.Sa=function(){this.o(new k(n.nc))};n.prototype.pn=function(l,q,r){this.rd.setPosition(this.Ia,l,q,r)};n.nc="request frame";return n});
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,k,p,h,g){return function(e){function b(c,d){var f=e.call(this)||this;f.Veb=c;f.renderer=d;f.camera=c.get("camera");f.qc=c.get("media");f.qc.set("enabled",!1);f.qc.bind(h.ha,f.fA,f,!1);return f}P(b,e);b.prototype.getItem=function(){return this.Veb};b.prototype.preload=function(){this.qc.set("opacity",
0);this.renderer.pFa(this.qc,this.camera);this.qc.get("isLoaded")&&this.CPa()};b.prototype.zf=function(c){this.qc.set("opacity",c);this.SJ()};b.prototype.vp=function(c){this.qc.set("offset",c);this.SJ()};b.prototype.setPosition=function(c,d,f){var n=this.camera.get("position")||new g;this.camera.set("position",n);n.set("x",c);n.set("y",d);n.set("zoomFactor",f)};b.prototype.Nhb=function(c){this.qc.set("zIndex",c)};b.prototype.isEnabled=function(){return this.qc.get("enabled")};b.prototype.SJ=function(){var c=
this.qc.get("offset"),d=this.qc.get("opacity");c>-1&&c<1&&d>0?(this.renderer.pFa(this.qc,this.camera),this.qc.set("enabled",!0)):this.qc.get("enabled")&&(this.renderer.TMa(this.qc),this.qc.set("enabled",!1))};b.prototype.clear=function(){this.renderer.TMa(this.qc);this.qc.h(h.ha,this.fA,this)};b.prototype.fA=function(){this.qc.get("enabled")||this.CPa()};b.prototype.CPa=function(){this.o(new p(b.Yra))};b.Yra="preloadEnd";return b}(k)});
define("tdv/player/view/photo/control/StageController",["require","exports","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/photo/control/StageControllerItem"],function(a,m,k,p,h){return function(g){function e(b){var c=g.call(this)||this;c.Js=[];c.m=b;return c}P(e,g);e.prototype.preload=function(b){this.xG(b).preload();return this};e.prototype.zf=function(b,c){this.xG(b).zf(c);this.zq();return this};e.prototype.vp=function(b,c){this.xG(b).vp(c);this.zq();return this};e.prototype.setPosition=
function(b,c,d,f){this.xG(b).setPosition(c,d,f);return this};e.prototype.mi=function(b){var c=this.Js.findIndex(function(f){return f.getItem()==b}),d=this.Js[c];this.Js.splice(c,1);this.Js.push(d);this.Js.forEach(function(f,n){f.Nhb(n)})};e.prototype.stop=function(){this.AXa(function(b){b.clear()});this.Js=[]};e.prototype.clear=function(){this.stop();this.Js=null};e.prototype.zq=function(){this.Js.find(function(b){return b.isEnabled()})};e.prototype.xG=function(b){var c=this.aYa(b);c||(c=new h(b,
this.m),c.bind(h.Yra,this.m0a,this,!1),this.Js.push(c));return c};e.prototype.AXa=function(b){this.Js.forEach(b.bind(this))};e.prototype.aYa=function(b){return this.Js.find(function(c){return c.getItem()==b})};e.prototype.m0a=function(b){this.o(new k(e.p$,{item:b.source.getItem()}))};e.p$="photo preload end";return e}(p)});define("tdv/player/view/photo/control/constants/TransitionMode",["require","exports"],function(){return{zp:"blending",zr:"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".split(" "),function(a,m,k,p,h,g){var e=function(){function b(c,d,f){this.Dq=c;this.item=d;this.transitionDuration=f;this.index=c&&d?c.get("playList").get("items").indexOf(this.item):0;this.loaded=!1}b.prototype.isEqual=function(c){return c&&c.Dq==this.Dq&&c.item==this.item};
return b}();return function(b){function c(d,f,n){var l=b.call(this)||this;l.R=d;l.m=f;l.rd=n;l.rd.bind(h.p$,l.TAa,l,!1);l.cN=g.zp;l.Na=c.Gr;l.Ed=new e(null,null,0);l.je=null;l.Pl=null;l.Fu=null;l.Hj=void 0;l.PC=0;return l}P(c,b);c.prototype.clear=function(){var d;((d=this.Ed)===null||d===void 0?0:d.item)&&this.xU(this.Ed);this.Na=c.Gr;this.Fu=this.Ed=this.je=this.Pl=null;this.rd.h(h.p$,this.TAa,this)};c.prototype.uhb=function(d){this.cN=d};c.prototype.lpa=function(d){this.PC=d};c.prototype.Zpa=function(d,
f,n){this.Pl=null;d=new e(d,f,n);d.isEqual(this.Na==c.Gr?this.Ed:this.je)||(this.Pl=d,this.Oza())};c.prototype.Oza=function(){this.Pl&&this.Na==c.Gr&&(this.Pl.item&&!this.Pl.loaded?this.rd.preload(this.Pl.item):this.Kr())};c.prototype.TAa=function(d){this.Pl&&this.Pl.item==d.data.item&&(this.Pl.loaded=!0,this.Oza())};c.prototype.Kr=function(){this.Fu&&this.Fu!=this.Pl.Dq&&this.iCa(null);this.o(new k(c.w$));this.R.get("transitionMode")=="fade_out_fade_in"&&this.Pl.item!=null&&this.Ed.item!=null?this.GUa():
(this.je=this.Pl,this.Pl=null,this.Ed.Dq&&!this.Ed.item?this.FUa():this.Ed.item?this.je.item&&this.cN==g.zp?this.LF():this.je.item&&this.cN==g.Hkb?this.HUa():this.Ed.item&&this.EUa():this.DUa())};c.prototype.xe=function(d){if(this.Na!=c.Gr){this.Hj+=d;d=this.je.transitionDuration;d=this.Hj>=d?1:this.Hj/d;switch(this.Na){case c.paa:this.fEa(d);break;case c.qaa:this.C7a(d);break;case c.saa:this.hEa(d);break;case c.raa:this.gEa(d);break;case c.ij:this.$C(d);break;case c.taa:this.CEa(d)}d<1?this.Sa():
this.VB()}};c.prototype.VB=function(){switch(this.Na){case c.saa:this.IXa();break;case c.raa:this.HXa();break;case c.paa:this.FXa();break;case c.ij:this.Sca();break;case c.taa:this.LXa();break;case c.qaa:this.GXa()}this.iCa(this.Ed.Dq);this.Pl==null?this.fja(this.Ed):this.Kr()};c.prototype.GUa=function(){this.Na=c.saa;this.je=new e(this.Ed.Dq,null,this.Ed.transitionDuration);this.Hj=0;this.Uf=this.Ed.transitionDuration;this.rd.vp(this.Ed.item,0);this.hEa(0);this.Sa()};c.prototype.hEa=function(d){this.rd.zf(this.Ed.item,
1-d)};c.prototype.IXa=function(){this.xU(this.Ed);this.Ed=this.je;this.Na=c.Gr};c.prototype.FUa=function(){this.Na=c.raa;this.Hj=0;this.Uf=this.je.transitionDuration;this.U3(this.je);this.rd.vp(this.je.item,0);this.gEa(0);this.Sa()};c.prototype.gEa=function(d){this.rd.zf(this.je.item,d)};c.prototype.HXa=function(){this.Ed=this.je;this.Na=c.Gr;this.V3(this.Ed)};c.prototype.DUa=function(){this.Na=c.paa;this.Hj=0;this.Uf=this.je.transitionDuration;this.U3(this.je);this.rd.vp(this.je.item,0);this.rd.mi(this.je.item);
this.rd.zf(this.je.item,1);this.m.Ua(!0);this.R.Sc().JJ();this.fEa(0);this.Sa()};c.prototype.fEa=function(d){this.rd.zf(this.je.item,d);this.R.Sc().wJ(d)};c.prototype.FXa=function(){this.Ed=this.je;this.R.Sc().BI();this.Na=c.Gr;this.V3(this.Ed)};c.prototype.LF=function(){this.Na=c.ij;this.Hj=0;this.Uf=this.je.transitionDuration;this.U3(this.je);this.rd.vp(this.Ed.item,0);this.rd.vp(this.je.item,0);this.rd.mi(this.je.item);this.$C(0);this.Sa()};c.prototype.$C=function(d){this.rd.zf(this.je.item,Math.min(1,
d*2));this.rd.zf(this.Ed.item,Math.min(1,(1-d)*2))};c.prototype.Sca=function(){this.xU(this.Ed);this.Ed=this.je;this.Na=c.Gr;this.V3(this.Ed)};c.prototype.HUa=function(){this.Na=c.taa;this.Hj=0;this.Uf=this.je.transitionDuration;this.U3(this.je);this.rd.mi(this.je.item);this.CEa(0);this.Sa()};c.prototype.CEa=function(d){var f=this.Ed.Dq!=this.je.Dq||this.Ed.index<this.je.index;this.rd.vp(this.je.item,(f?1-d:d-1)*(1+this.PC)).zf(this.je.item,1);this.rd.vp(this.Ed.item,(f?-d:d)*(1+this.PC)).zf(this.Ed.item,
1)};c.prototype.LXa=function(){this.xU(this.Ed);this.Ed=this.je;this.Na=c.Gr;this.V3(this.Ed)};c.prototype.EUa=function(){this.Na=c.qaa;this.Hj=0;this.Uf=this.Ed.transitionDuration;this.rd.vp(this.Ed.item,0);this.R.Sc().zE();this.rd.zf(this.Ed.item,0);this.m.Ua(!1);this.Sa()};c.prototype.C7a=function(d){this.R.Sc().mE(d)};c.prototype.GXa=function(){this.R.Sc().sD();this.xU(this.Ed);this.Na=c.Gr;this.Ed=this.je};c.prototype.U3=function(d){this.o(new k(c.aF,{album:d.Dq,item:d.item}))};c.prototype.xU=
function(d){this.o(new k(c.cF,{album:d.Dq,item:d.item}))};c.prototype.V3=function(d){this.o(new k(c.bF,{album:d.Dq,item:d.item}))};c.prototype.fja=function(d){this.o(new k(c.lr,{album:d.Dq,item:d.item}))};c.prototype.iCa=function(d){this.Fu!=d&&(this.Fu&&this.X6a(this.Fu),(this.Fu=d)&&this.Y6a(this.Fu))};c.prototype.Y6a=function(d){this.o(new k(c.jr,{album:d}))};c.prototype.X6a=function(d){this.o(new k(c.ir,{album:d}))};c.prototype.Sa=function(){this.o(new k(c.nc))};c.Gr="stopped";c.ij="blending";
c.taa="scrolling";c.qaa="exit_fading_out";c.saa="fading_out_before_fading_in";c.raa="fading_in_after_fading_out";c.paa="entry_fading_in";c.nc="request frame";c.w$="transition begin";c.lr="transition end";c.aF="photo added";c.cF="photo removed";c.bF="photo displayed";c.jr="photo album show";c.ir="photo album hide";return c}(p)});
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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/constants/EventName"),g=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"),n=m.extend(p,function(l,q){p.call(this);this.R=l;this.rd=q;this.lq=this.Tp=this.Ia=this.Qf=this.wb=null;this.$o=void 0;this.u3=0;this.Tl=!1;this.Wp=0;this.K0=this.lq?-1:0;this.G0=this.Tp?1:0;this.ja=null;this.Uf=400;this.PC=0;this.va=new c});n.prototype.clear=function(){this.rd=this.R=this.Fu=null};n.prototype.kgb=
function(l,q){this.Qf=l;this.Ia=q;l=l&&l.get("playList")&&l.get("playList").get("items")||[];q=l.indexOf(q);this.Tp=q>0?l[q-1]:null;this.lq=q<l.length-1?l[q+1]:null;this.Wp=0;this.K0=this.lq?-1:0;this.G0=this.Tp?1:0;this.ZAa()};n.prototype.enable=function(){if(this.wb=this.R)this.wb.bind(h.Ra,this.re,this,!0),this.wb.bind(h.mb,this.Uk,this,!0),this.wb.bind(h.bb,this.Vk,this,!0),this.ZAa()};n.prototype.disable=function(){this.wb&&(this.wb.h(h.Ra,this.re,this),this.wb.h(h.mb,this.Uk,this),this.wb.h(h.bb,
this.Vk,this),this.wb=null)};n.prototype.thb=function(l){this.Uf=l};n.prototype.lpa=function(l){this.PC=l};n.prototype.ZAa=function(){this.wb&&(this.Tp&&this.rd.preload(this.Tp),this.lq&&this.rd.preload(this.lq))};n.prototype.tya=function(){return(new Date).getTime()};n.prototype.re=function(l){this.Tl||(this.$o=l.x,this.u3=0,this.$ga=this.tya(),this.Tl=!0,this.ja=null,this.o(new k(n.W9)),this.Tp&&(l=this.pwa(this.Tp),this.rd.setPosition(this.Tp,l.x,l.y,l.zoom)),this.lq&&(l=this.pwa(this.lq),this.rd.setPosition(this.lq,
l.x,l.y,l.zoom)))};n.prototype.Uk=function(l){if(this.Tl){var q=l.x-this.$o,r=q/this.wb.cb(),t=this.tya()-this.$ga;this.u3=q/t;this.$ga+=t;this.$o=l.x;this.Wp=Math.max(this.K0,Math.min(this.G0,this.Wp+r));this.Sa()}};n.prototype.Vk=function(){if(this.Tl){this.Tl=!1;if(this.u3>1){var l="quad_out";var q=this.G0}else this.u3<-1?(l="quad_out",q=this.K0):(l="quad_in_out",q=this.Wp<-.5?this.K0:this.Wp>.5?this.G0:0);this.ja=new d(l,[new f("offset",this.Wp,q,1E3/this.Uf)],0);this.Sa()}};n.prototype.xe=function(l){if(this.Tl||
this.ja)this.ja&&(this.ja.Lb(l),this.Wp=this.ja.ib("offset"),this.ja.Qe()?(this.ja=null,this.BXa()):this.Sa()),this.Ia&&this.rd.vp(this.Ia,this.Wp*(1+this.PC)).zf(this.Ia,1),this.Tp&&this.rd.vp(this.Tp,(this.Wp-1)*(1+this.PC)).zf(this.Tp,1),this.lq&&this.rd.vp(this.lq,(this.Wp+1)*(1+this.PC)).zf(this.lq,1)};n.prototype.BXa=function(){this.o(new k(n.X9,{album:this.Qf,item:this.Wp<0?this.lq:this.Wp>0?this.Tp:this.Ia}))};n.prototype.Sa=function(){this.o(new k(n.nc))};n.prototype.pwa=function(l){var q=
l&&l.get("camera"),r=l&&l.get("media");l=r&&r.get("width",100)||100;r=r&&r.get("height",100)||100;var t=q?q.get("scaleMode",e.ej):e.ej,u={};g.Qa("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(l,r,t);this.va.setSize(this.R.cb(),this.R.Kb());this.va.setPosition(u.x,u.y,u.zoom);u.x=this.va.getX();u.y=this.va.getY();u.zoom=this.va.Uz();return u};n.nc="request frame";
n.W9="interaction begin";n.X9="interaction end";return n});
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"),k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher");a("tdv/constants/EventName");a("tdv/player/view/photo/control/StageController");
var h=a("tdv/player/view/photo/control/constants/TransitionMode"),g=a("tdv/player/view/photo/control/display/TransitionController"),e=a("tdv/player/view/photo/control/display/ManualScrollController"),b=m.extend(p,function(c,d,f){p.call(this);this.R=c;this.rd=f;this.cN=h.zp;this.Uf=1E3;this.$b=new g(this.R,d,this.rd);this.$b.bind(g.nc,this.Tf,this,!0);this.$b.bind(g.w$,this.Nya,this,!0);this.$b.bind(g.lr,this.Oya,this,!0);this.$b.bind(g.aF,this.KS,this,!0);this.$b.bind(g.cF,this.NS,this,!0);this.$b.bind(g.bF,
this.MS,this,!0);this.$b.bind(g.ir,this.ls,this,!0);this.$b.bind(g.jr,this.$p,this,!0);this.Xm=new e(this.R,this.rd);this.Xm.bind(e.nc,this.Tf,this,!0);this.Xm.bind(e.W9,this.Pxa,this,!0);this.Xm.bind(e.X9,this.Qxa,this,!0)});b.prototype.y8=function(c,d){this.cN=c;this.Uf=d;this.$b.uhb(c);this.Xm.thb(d);this.$b.lpa(.05);this.Xm.lpa(.05)};b.prototype.display=function(c,d){this.$b.Zpa(c,d,this.Uf)};b.prototype.Pe=function(){this.$b.Zpa(null,null,this.Uf)};b.prototype.clear=function(){this.$b.h(g.nc,
this.Tf,this);this.$b.h(g.w$,this.Nya,this);this.$b.h(g.lr,this.Oya,this);this.$b.h(g.aF,this.KS,this);this.$b.h(g.cF,this.NS,this);this.$b.h(g.bF,this.MS,this);this.$b.h(g.ir,this.ls,this);this.$b.h(g.jr,this.$p,this);this.$b.clear();this.$b=null;this.Xm.bind(e.nc,this.Tf,this,!0);this.Xm.bind(e.W9,this.Pxa,this,!0);this.Xm.bind(e.X9,this.Qxa,this,!0);this.Xm.clear();this.rd=this.R=this.Xm=null};b.prototype.xe=function(c){this.$b.xe(c);this.Xm.xe(c)};b.prototype.Tf=function(){this.Sa()};b.prototype.KS=
function(c){this.o(new k(b.aF,c.data))};b.prototype.NS=function(c){this.o(new k(b.cF,c.data))};b.prototype.MS=function(c){this.o(new k(b.bF,c.data));this.Xm.kgb(c.data.album,c.data.item)};b.prototype.ls=function(c){this.o(new k(b.ir,c.data))};b.prototype.$p=function(c){this.o(new k(b.jr,c.data))};b.prototype.Nya=function(){this.Xm.disable()};b.prototype.Oya=function(c){this.cN==h.zr&&c.data.item&&this.Xm.enable();c.data.album||this.o(new k(b.T9))};b.prototype.Pxa=function(){this.o(new k(b.Vqa))};
b.prototype.Qxa=function(c){this.$b.Zpa(c.data.album,c.data.item,0);this.o(new k(b.Wqa,c.data))};b.prototype.Sa=function(){this.o(new k(b.nc))};b.nc="request frame";b.aF="photo added";b.cF="photo removed";b.bF="photo displayed";b.jr="photo album show";b.ir="photo album hide";b.Vqa="manual interaction begin";b.Wqa="manual interaction end";b.T9="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"),k=a("tdv/binding/ChangeWatcher"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/constants/PlaybackState"),e=m.extend(h,function(){h.call(this);this.Qf=null;this.H=g.aa;this.Sha=null});e.prototype.clear=function(){this.zla()};e.prototype.Gpa=function(b){this.zla();
this.Qf=b;this.H=g.PLAYING;this.Sha=k.Fw(this.Qf,"playList.selectedIndex",this.JH,this,!0);this.Qf.get("playList").get("selectedIndex")==0?this.JH():this.Qf.get("playList").set("selectedIndex",0)};e.prototype.zla=function(){this.Qf&&(this.H=g.aa,this.Sha.EE(),this.Qf=this.Sha=null)};e.prototype.stop=function(){this.H!=g.aa&&(this.H=g.aa,this.Qf.get("playList").set("selectedIndex",0))};e.prototype.play=function(){this.H==g.aa?(this.Qf.get("playList").set("selectedIndex",0),this.H=g.PLAYING,this.JH()):
this.H==g.Xb&&(this.H=g.PLAYING)};e.prototype.pause=function(){this.H==g.PLAYING&&(this.H=g.Xb)};e.prototype.next=function(){var b=this.Qf.get("playList"),c=b.get("selectedIndex"),d=b.get("items").length;(c<d-1||this.Qf.get("loop"))&&b.set("selectedIndex",(c+1)%d)};e.prototype.goa=function(){var b=this.Qf.get("playList"),c=b.get("selectedIndex"),d=b.get("items").length;(c>0||this.Qf.get("loop"))&&b.set("selectedIndex",(c-1+d)%d)};e.prototype.H6=function(b){this.h5a(b)};e.prototype.itemEnd=function(b){if(this.Qf){var c=
this.Qf.get("playList").get("items");b!=(c.length>0?c[c.length-1]:void 0)||this.Qf.get("loop")?this.next():(this.H=g.aa,this.o(new p(e.O9,{album:this.Qf})))}};e.prototype.JH=function(){var b=this.PZa();b>=0&&(this.H!=g.PLAYING&&b!=0?this.o(new p(e.s$)):this.o(new p(e.b$,{album:this.Qf,item:this.Qf.get("playList").get("items")[b]})))};e.prototype.PZa=function(){return this.Qf?this.Qf.get("playList").get("selectedIndex"):-1};e.prototype.h5a=function(b){if(this.Qf){var c=this.Qf.get("playList");b=c.get("items").indexOf(b);
c.set("selectedIndex",b)}};e.s$="play request";e.b$="item request";e.O9="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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/constants/PlaybackState"),e=a("tdv/view/util/Visibility"),b=m.extend(h,function(c){h.call(this);this.R=c;this.lU=this.Ia=null;this.CH=void 0;this.m0=!1;this.H=g.aa;
e.bind(k.V,this.GAa,this,!0)});b.prototype.H6=function(c){this.sca();if(this.Ia=c)c=this.Ia.get("media").get("duration",0),this.CH=c==0?void 0:Math.max(0,c-this.R.get("transitionDuration")),this.m0=!1,this.H==g.PLAYING&&this.Pca()};b.prototype.clear=function(){e.h(k.V,this.GAa,this,!0);this.H6(null)};b.prototype.stop=function(){this.H!=g.aa&&(this.sca(),this.Kd(g.aa))};b.prototype.play=function(){if(this.H==g.aa){if(this.Kd(g.PLAYING),this.Ia){this.m0=!1;var c=this.Ia.get("media").get("duration",
0);this.CH=c==0?void 0:c;this.Pca()}}else this.H==g.Xb&&(this.Kd(g.PLAYING),this.Ia&&this.Pca())};b.prototype.pause=function(){this.H==g.PLAYING&&(this.Kd(g.Xb),this.RAa())};b.prototype.Pca=function(){this.m0||(this.m0=!0,this.o(new p(b.c$,{item:this.Ia})));this.xva()};b.prototype.GAa=function(){e.visible?this.xva():e.visible||this.RAa()};b.prototype.xva=function(){if(this.CH!==void 0){var c=this;this.N3=(new Date).getTime()+this.CH;this.lU=setTimeout(function(){c.lU=null;c.C6a()},this.CH)}else this.N3=
void 0};b.prototype.sca=function(){this.lU&&(clearTimeout(this.lU),this.lU=null)};b.prototype.RAa=function(){this.N3!==void 0&&(this.sca(),this.CH=Math.max(1,this.N3-(new Date).getTime()),this.N3=void 0)};b.prototype.C6a=function(){var c=this.Ia;this.Ia=null;this.CH=void 0;this.o(new p(b.a$,{item:c}))};b.prototype.Kd=function(c){this.H!=c&&(this.H=c,this.o(new p(b.dd,{state:this.H})))};b.dd="playback state change";b.c$="item start";b.a$="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 k=a("tdv/events/Event"),p=a("tdv/events/EventDispatcher"),h=a("tdv/player/view/photo/control/AudioController"),g=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"),n=m.extend(p,function(l,q){p.call(this);this.R=l;this.m=q;this.m.set("visible",!1);
this.Pi=new b;this.Ta=new c(this.R);this.rd=new d(this.m);this.Va=new e(this.R,this.m,this.rd);this.tb=new g(this.R,this.rd);this.ne=new h;this.Pi.bind(b.b$,this.fza,this,!0);this.Pi.bind(b.s$,this.Tza,this,!0);this.Pi.bind(b.O9,this.LS,this,!0);this.Ta.bind(c.c$,this.gza,this);this.Ta.bind(c.a$,this.eza,this);this.Ta.bind(c.dd,this.If,this,!0);this.Va.bind(e.nc,this.Tf,this,!0);this.Va.bind(e.aF,this.KS,this,!0);this.Va.bind(e.cF,this.NS,this,!0);this.Va.bind(e.bF,this.MS,this,!0);this.Va.bind(e.ir,
this.ls,this,!0);this.Va.bind(e.jr,this.$p,this,!0);this.Va.bind(e.Vqa,this.s1a,this,!0);this.Va.bind(e.Wqa,this.t1a,this,!0);this.Va.bind(e.T9,this.Eya,this,!0);this.tb.bind(g.nc,this.Tf,this,!0)});n.prototype.clear=function(){this.Pi.clear();this.Ta.clear();this.Va.clear();this.tb.clear();this.ne.clear();this.rd.clear();this.Pi.h(b.b$,this.fza,this);this.Pi.h(b.O9,this.LS,this);this.Pi.h(b.s$,this.Tza,this);this.Ta.h(c.c$,this.gza,this);this.Ta.h(c.a$,this.eza,this);this.Ta.h(c.dd,this.If,this);
this.Va.h(e.nc,this.Tf,this);this.Va.h(e.aF,this.KS,this);this.Va.h(e.cF,this.NS,this);this.Va.h(e.bF,this.MS,this);this.Va.h(e.ir,this.ls,this);this.Va.h(e.jr,this.$p,this);this.Va.h(e.T9,this.Eya,this);this.tb.h(g.nc,this.Tf,this);this.R=this.m=this.rd=this.ne=this.tb=this.Va=this.Ta=this.Pi=null};n.prototype.y8=function(l,q){this.Va.y8(l,q)};n.prototype.ahb=function(l){this.m.set("visible",!0);this.Pi.Gpa(l)};n.prototype.uA=function(){this.Pi.zla();this.Ta.stop();this.Va.Pe();this.tb.end();this.ne.ROa()};
n.prototype.next=function(){this.Pi.next()};n.prototype.goa=function(){this.Pi.goa()};n.prototype.stop=function(){this.Ta.stop();this.ne.stop();this.Pi.stop();this.tb.stop()};n.prototype.play=function(){this.Ta.play();this.ne.play();this.Pi.play();this.tb.play()};n.prototype.pause=function(){this.Ta.pause();this.ne.pause();this.Pi.pause();this.tb.pause()};n.prototype.s1a=function(){this.Ta.pause();this.ne.pause();this.Pi.pause();this.tb.pause()};n.prototype.t1a=function(){this.Ta.play();this.ne.play();
this.Pi.play();this.tb.play()};n.prototype.fza=function(l){this.Va.display(l.data.album,l.data.item)};n.prototype.Tza=function(){this.play()};n.prototype.Tf=function(){f.requestFrame(this.Xp,this)};n.prototype.Xp=function(l){this.tb.rA(l);this.Va.xe(l);this.ne.xe(l)};n.prototype.KS=function(l){this.tb.start(l.data.item)};n.prototype.NS=function(l){var q=l.data.album;l=l.data.item;var r=l.get("media");this.tb.end(l);this.ne.lib(r);this.o(new k(n.o$,{photoAlbum:q,item:l}))};n.prototype.MS=function(l){var q=
l.data.album;l=l.data.item;l.get("media");this.Pi.H6(l);this.Ta.H6(l);this.o(new k(n.n$,{photoAlbum:q,item:l}))};n.prototype.gza=function(l){l=l.data.item.get("media");this.ne.dib(l)};n.prototype.eza=function(l){this.Pi.itemEnd(l.data.item)};n.prototype.LS=function(l){this.Ta.stop();this.ne.stop();this.o(new k(n.m$,{photoAlbum:l.data.album}))};n.prototype.$p=function(l){l=l.data.album;this.ne.Gpa(l);this.Ta.play();this.tb.play();this.o(new k(n.jr,{photoAlbum:l}))};n.prototype.ls=function(l){l=l.data.album;
this.ne.iib(l);this.o(new k(n.ir,{photoAlbum:l}))};n.prototype.Eya=function(){this.m.set("visible",!1)};n.prototype.If=function(l){this.o(new k(n.dd,{state:l.data.state}))};n.jr="photoAlbumShow";n.m$="photoAlbumEnd";n.ir="photoAlbumHide";n.n$="photoBegin";n.o$="photoEnd";n.dd="playbackStateChange";return n});
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,k,p,h){return function(){function g(e,b){this.hd=e;this.renderer=b;this.renderer.bind(k.Yb,this.kl,this,!0);this.kl();this.Qt();this.enabled=!1;h.O.bind(k.V,this.kb,this,!0)}g.prototype.dispose=function(){this.renderer.h(k.Yb,this.kl,this);h.O.h(k.V,this.kb,this);this.Ea()};g.prototype.$i=function(){return this.F};g.prototype.Ua=
function(e){this.enabled!==e&&(this.enabled=e,this.aQa())};g.prototype.kb=function(){this.RPa();this.dg();this.eY()};g.prototype.kl=function(){var e=this.renderer.Ph(),b=this.renderer.Oh();if(this.rw!==e||this.qw!==b)this.rw=e,this.qw=b,this.eY()};g.prototype.eY=function(){if(this.F){var e=this.F.N(p.PerspectiveCamera);e.width=this.rw;e.height=this.qw}};g.prototype.dg=function(){if(this.F)if(h.isPresenting)this.F.ka(p.sa);else{var e=this.F.N(p.sa,!0);e.positionX=e.positionY=e.positionZ=0;e.translationX=
e.translationY=e.We=0;e.Yd=e.Ad=e.Ue=0;e.Ge=e.Ve=e.zh=1}};g.prototype.aQa=function(){this.F&&(this.F.N(p.yF).locked=!this.enabled)};g.prototype.RPa=function(){if(this.F){var e=this.hd.getComponent(p.Object3D);e=(e=e&&e.ta)&&h.isPresenting&&h.qA===e;this.F.N(p.PerspectiveCamera,!0).il=e}};g.prototype.Qt=function(){var e=this.hd.T.tc("Camera");e.L(p.nb).F=this.hd;var b=e.L(p.PerspectiveCamera);b.Wd=g.hu;b.near=.1;b.far=100;b.Cka=!1;e.L(p.yF).locked=!0;this.F=this.hd.N(p.Scene).Oa=e;this.eY();this.dg();
this.aQa();this.RPa()};g.prototype.Ea=function(){this.F&&(this.F.T.fd(this.F),this.F=null)};g.hu=90;return g}()});
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,k,p,h,g,e,b){return function(){function c(d){this.hd=d;h.O.bind(k.V,this.kb,this,!0);h.O.bind(k.me,this.NO,this,!0);this.Qt()}c.prototype.dispose=function(){h.O.h(k.V,this.kb,this);h.O.h(k.me,this.NO,this);this.Ea()};c.prototype.$i=function(){return this.F};
c.prototype.kb=function(){this.FFa()};c.prototype.NO=function(){this.qjb()};c.prototype.FFa=function(){this.F&&(this.F.N(p.sa).positionY=h.isPresenting?h.IN:0)};c.prototype.qjb=function(){if(this.F){var d=this.F.N(p.sa);if(h.isPresenting)if(this.gW){if(this.gW.Lb(b.D5),d.positionY+=(h.IN-d.positionY)*this.gW.ib("leveling"),Math.abs(d.positionY-h.IN)<.01||this.gW.Qe())this.gW=null}else Math.abs(d.positionY-h.IN)>.2&&(this.gW=new g("linear",[new e("leveling",0,1)],2E3));else d.positionY=0}};c.prototype.Qt=
function(){var d=this.hd.T.tc("Media2DGroup");d.L(p.nb).F=this.hd;d.L(p.sa);d.L(p.Group);this.F=d;this.FFa()};c.prototype.Ea=function(){this.F&&(this.F.T.fd(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,k,p,h,g,e){a=function(){function f(n,l){this.hd=n;this.Oa=l;this.Et=[];this.enabled=!1;this.Ya()}f.prototype.Ua=function(n){this.enabled!==n&&(this.enabled=n)};f.prototype.dispose=function(){this.Ba()};f.prototype.Ya=function(){e.O.bind(p.me,this.Bg,this,!0)};f.prototype.Ba=function(){e.O.h(p.me,
this.Bg,this);this.KX([])};f.prototype.Bg=function(){this.KX(e.fe)};f.prototype.KX=function(n){var l=this;if(!this.enabled||n.find(function(t){return t.mD}))n=[];var q=this.Et;this.Et=n.map(function(t){var u=q.findIndex(function(v){return v.ub==t});return u!==-1?q.splice(u,1)[0]:new b(t,l.hd,l.Oa)});q.forEach(function(t){t.dispose()});this.Et.forEach(function(t){t.Ua(this.enabled);t.update()}.bind(this));var r=this.Et.reduce(function(t,u){return!t||t.Fz<u.Fz?u:t},null);this.Et.forEach(function(t){t.$oa(t===
r)})};return f}();var b=function(){function f(n,l,q){this.Fz=this.rI=0;this.ub=n;this.hd=l;this.Oa=q;this.Fz=this.rI=this.ub.handedness==="right"?1:0;this.Lg=this.enabled=!1;this.Ya()}f.prototype.update=function(){this.uP();e.uE(this.ub,this.Te,this.Te,this.distance);e.epa(this.ub,!this.Lg||!this.enabled)};f.prototype.Ua=function(n){this.enabled!==n&&(this.enabled=n,n=this.xk.N(g.xc,!0))&&(n.enabled=this.enabled)};f.prototype.$oa=function(n){this.Lg!==n&&(this.Lg=n,n=this.xk.N(g.xc,!0))&&(n.Lg=this.Lg)};
f.prototype.dispose=function(){this.Ba()};f.prototype.Ya=function(){this.Dt=new h;this.Sh=new h;this.xk=this.hd.T.tc("Pointer");var n=this.xk.N(g.xc,!0);n.Wka=!0;n.matrixWorld=new k.Matrix4;n.Oa=this.Oa;n.tD=this.Dt;n.O=this.Sh;n.enabled=this.enabled;e.O.bind(p.mu,this.LW,this,!0);e.O.bind(p.lB,this.MW,this,!0);e.O.bind(p.Pf,this.KW,this,!0);this.Sh.bind(p.Ra,this.Rh,this,!0);this.Sh.bind(p.bb,this.ef,this,!0);this.Sh.bind(p.mb,this.Mj,this,!0);this.Sh.bind(p.Db,this.Nn,this,!0);this.Sh.bind(p.rc,
this.XD,this,!0)};f.prototype.Ba=function(){this.Sh.h(p.Ra,this.Rh,this);this.Sh.h(p.bb,this.ef,this);this.Sh.h(p.mb,this.Mj,this);this.Sh.h(p.Db,this.Nn,this);this.Sh.h(p.rc,this.XD,this);this.xk.T.fd(this.xk);e.O.h(p.mu,this.LW,this);e.O.h(p.lB,this.MW,this);e.O.h(p.Pf,this.KW,this)};f.prototype.uP=function(){var n=this.xk.N(g.xc,!0);n.matrixWorld.copy(this.ub.matrixWorld);n.origin.copy(this.ub.ray.origin);n.direction.copy(this.ub.ray.direction);n.Tb.copy(this.ub.Tb);n.EA=this.ub.EA};f.prototype.KW=
function(n){n.data.pointerState===this.ub&&(n=Date.now()-this.rI<300,this.rI=Date.now(),this.Dt.o(p.oa),n&&this.Dt.o(p.Ik))};f.prototype.LW=function(n){n.data.pointerState===this.ub&&(this.Fz=Date.now(),this.Dt.o(p.Ra))};f.prototype.MW=function(n){n.data.pointerState===this.ub&&this.Dt.o(p.bb)};f.prototype.Mj=function(n){this.qX(n)};f.prototype.qX=function(n){n.data.position?(n=n.data.position,d.copy(this.ub.ray).applyMatrix4(this.ub.matrixWorld),this.distance=d.origin.distanceTo(c.set(n.x,n.y,n.z))):
this.distance=void 0};f.prototype.Rh=function(n){this.qX(n)};f.prototype.ef=function(){this.distance=void 0};f.prototype.XD=function(){this.Te=!0};f.prototype.Nn=function(){this.Te=!1;this.distance=void 0};return f}(),c=new k.Vector3,d=new k.Ray;return a});
define("tdv/player/view/renderer2d/Renderer","require exports 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,k,p,h,g,e,b,c,d,f,n){a=function(q){function r(t,u,v){var w=q.call(this)||
this;w.Ee=t;w.R=u;w.oC=v;w.cf("Renderer");w.set("toolTipDisabled",!0);w.set("cursor",p.dB);w.set("layout",h.oY);w.ga=!0;w.Gd=null;w.Cc=null;w.lR=!1;n.O.bind(k.V,w.kb,w,!0);return w}P(r,q);r.prototype.Ib=function(){q.prototype.Ib.call(this);this.Gd==null&&(this.Gd=new b(this.Ee,this.R,!1),this.Gd.xa({left:0,top:0,right:0,bottom:0}),this.hb(this.Gd),this.OW())};r.prototype.OW=function(){this.O$a();this.v$a();this.dab()};r.prototype.Ua=function(t){this.ga!=t&&(this.ga=t,this.ee())};r.prototype.ee=function(){this.rqa();
this.IPa()};r.prototype.k8=function(t){this.lR!=t&&(this.lR=t,this.Jna())};r.prototype.Jna=function(){this.bQa();this.IPa()};r.prototype.O$a=function(){this.Cc=this.Gd.tc("Scene");var t=this.Cc.L(e.Scene);t.backgroundColor="transparent";t.outputColorSpace="srgb";this.Gd.qFa(this.Cc);this.N_=new d(this.Cc);this.rqa()};r.prototype.dab=function(){this.K8a=new f(this.Cc,this.WF.$i())};r.prototype.v$a=function(){this.WF=new c(this.Cc,this.Gd)};r.prototype.kb=function(){this.bQa();this.rqa()};r.prototype.bQa=
function(){var t,u=n.isPresenting&&this.lR;(t=this.K8a)===null||t===void 0||t.Ua(u)};r.prototype.rqa=function(){this.Cc&&(this.Cc.N(e.Scene).enabled=this.ga&&(!n.isPresenting||this.Ldb()))};r.prototype.IPa=function(){var t;(t=this.WF)===null||t===void 0||t.Ua(this.ga&&this.lR)};r.prototype.Ldb=function(){return!!this.oC.get("xrEnabled")&&!(this.oC.get("application")&&this.oC.get("application").get(l))};return r}(g);var l=function(q){return q.map(function(r){return String.fromCharCode(r)}).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/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,k,p,h,g,e,b,c){return function(){function d(f,n,l,q,r,t){this.qc=f;this.camera=n;this.Nj=l;this.Yjb=q;this.renderer=r;this.lb=t;this.JO=this.JO.bind(this);this.o7=this.o7.bind(this);this.jA=
this.jA.bind(this);this.lA=this.lA.bind(this);this.s7=this.s7.bind(this);this.Mn=this.Mn.bind(this);this.f7=this.f7.bind(this);this.gA=this.gA.bind(this);this.tt=new k;this.qc.set("isLoaded",!1);this.qc.bind(p.ha,this.wLa,this,!0);g.ba(this.qc,["image"],this.JO,!0);g.ba(this.qc,["image.levels.ulr"],this.o7,!0);g.ba(this.qc,["width","height"],this.jA,!0);g.ba(this.qc,["zIndex"],this.lA,!0);g.ba(this.qc,["opacity"],this.s7,!0);g.ba(this.lb,["distance"],this.Mn,!0);g.ba(this.camera,["scaleMode"],this.f7,
!0);g.ba(this.camera,["position.x","position.y","position.zoomFactor"],this.gA,!0);this.renderer.bind(p.Yb,this.wt,this,!0);c.O.bind(p.V,this.kb,this,!0);this.wt();this.Qt()}d.prototype.dispose=function(){this.qc.h(p.ha,this.wLa,this);g.ca(this.qc,["image"],this.JO);g.ba(this.qc,["image.levels.ulr"],this.o7,!0);g.ca(this.qc,["width","height"],this.jA);g.ca(this.qc,["zIndex"],this.lA);g.ca(this.qc,["opacity"],this.s7);g.ca(this.lb,["distance"],this.Mn);g.ca(this.camera,["scaleMode"],this.f7);g.ca(this.camera,
["position.x","position.y","position.zoomFactor"],this.gA);this.renderer.h(p.Yb,this.wt,this);c.O.h(p.V,this.kb,this);this.Ea()};d.prototype.wLa=function(){this.qc.set("isLoaded",!0)};d.prototype.o7=function(){this.qc.set("isLoaded",!1)};d.prototype.jA=function(){this.nw=this.qc.get("width")||100;this.mw=this.qc.get("height")||100;this.TPa();this.dg()};d.prototype.JO=function(){var f=this.qc.get("image");this.image!==f&&(this.image=f,this.$n())};d.prototype.lA=function(){var f=this.qc.get("zIndex",
0);this.zIndex!==f&&(this.zIndex=f,this.dg())};d.prototype.s7=function(){var f=this.qc.get("opacity",1);this.opacity!==f&&(this.opacity=f,this.TPa())};d.prototype.Mn=function(){var f=this.lb.get("distance",1);this.distance!==f&&(this.distance=f,this.dg())};d.prototype.f7=function(){var f=this.camera.get("scaleMode",h.ej);this.jE!==f&&(this.jE=f,this.dg())};d.prototype.gA=function(){var f=this.camera.get("position"),n=(f===null||f===void 0?void 0:f.x)||.5,l=(f===null||f===void 0?void 0:f.y)||.5;f=
(f===null||f===void 0?void 0:f.s9)||1;if(this.x!==n||this.y!==l||this.s9!==f)this.x=n,this.y=l,this.s9=f,this.dg()};d.prototype.wt=function(){var f=this.renderer.Ph()||1,n=this.renderer.Oh()||1;if(this.rw!==f||this.qw!==n)this.rw=f,this.qw=n,this.dg()};d.prototype.kb=function(){this.dg()};d.prototype.dg=function(){if(this.F){var f=this.distance-.001*this.zIndex,n=c.isPresenting?2048:this.rw,l=c.isPresenting?1024:this.qw,q=2*Math.tan(Math.PI/180*b.hu*.5)*f,r=q*l/n;switch(this.jE){case h.NONE:n=this.nw*
q/n;l=this.mw*r/l;break;case h.Ep:n=q;l=this.mw*q/this.nw;break;case h.Hk:n=this.nw*r/this.mw;l=r;break;case h.nr:this.nw*r>this.mw*q?(n=this.nw*r/this.mw,l=r):(n=q,l=this.mw*q/this.nw);break;default:this.nw*r>this.mw*q?(n=q,l=this.mw*q/this.nw):(l=r,n=this.nw*r/this.mw)}r=n*this.s9;l*=this.s9;q=this.F.N(e.sa);q.Ge=r;q.Ve=l;q.positionX=(.5-this.x)*r;q.positionY=(this.y-.5)*l;q.positionZ=-f}};d.prototype.$n=function(){if(this.F){var f=this.F.N(e.Bi);f.properties=this.tt;f.np=this.qc;f.aw=this.image;
f.pGa=this.Yjb}};d.prototype.sqa=function(){if(this.F){var f=this.F.N(e.ud,!0);f.JA=!0;f.CE=!0;f.O=this.qc;f.$s=!0;f.It=!0}};d.prototype.TPa=function(){this.tt.set("opacity",this.opacity);this.tt.set("depthTest",!0);this.tt.set("enabled",!0);this.tt.set("encoding","srgb");this.tt.set("hidden",!1);this.tt.set("side","double");this.tt.set("width",this.nw);this.tt.set("height",this.mw);this.tt.set("scaleMode","fill");this.tt.set("easeDuration",0)};d.prototype.Qt=function(){var f=this.Nj.T.tc("Photo");
f.L(e.nb).F=this.Nj;f.L(e.Plane);f.L(e.sa);f.L(e.Bi);f.L(e.ud);this.F=f;this.dg();this.$n();this.sqa()};d.prototype.Ea=function(){this.F&&(this.F.T.fd(this.F),this.F=null)};return d}()});
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,k,p,h,g,e){return function(){function b(c,d,f){this.Nj=c;this.renderer=d;this.lb=f;this.C7=this.C7.bind(this);this.enabled=!1}b.prototype.dispose=function(){this.Ua(!1)};b.prototype.$i=function(){return this.F};b.prototype.Ua=function(c){this.enabled!==
c&&((this.enabled=c)?(p.ba(this.lb,["distance"],this.C7,!0),this.renderer.bind(k.Yb,this.wt,this,!0),e.O.bind(k.V,this.kb,this,!0),this.wt(),this.Qt()):(p.ca(this.lb,["distance"],this.C7),this.renderer.h(k.Yb,this.wt,this),e.O.h(k.V,this.kb,this),this.Ea()))};b.prototype.C7=function(){var c=this.lb.get("distance",1);this.distance!==c&&(this.distance=c,this.dg())};b.prototype.kb=function(){this.dg()};b.prototype.wt=function(){this.rw=this.renderer.Ph();this.qw=this.renderer.Oh();this.dg()};b.prototype.dg=
function(){if(this.F){var c=this.distance,d=2*Math.tan(Math.PI/180*g.hu*.5)*c,f=d*(e.isPresenting?1024:this.qw)/(e.isPresenting?2048:this.rw),n=this.F.N(h.sa);n.Ge=d;n.Ve=f;n.positionZ=-c}};b.prototype.Qt=function(){var c=this.Nj.T.tc("Viewport");c.L(h.nb).F=this.Nj;c.L(h.sa);c.L(h.PE);this.F=c;this.dg()};b.prototype.Ea=function(){this.F&&(this.F.T.fd(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,k,p,h){return function(g){function e(b,c,d){b=g.call(this,b,c,d)||this;b.fT=[];b.rba=[];b.tM=[];return b}P(e,g);e.prototype.OW=function(){var b=this;g.prototype.OW.call(this);this.$$a();this.fT.forEach(function(c,d){b.JGa(c,b.rba[d])})};e.prototype.pFa=function(b,c){this.fT.includes(b)||
(this.fT.push(b),this.rba.push(c),this.Gd&&this.JGa(b,c))};e.prototype.$$a=function(){this.ZEa=new h(this.N_.$i(),this.Gd,this.R);this.ZEa.Ua(!0)};e.prototype.JGa=function(b,c){b=new p(b,c,this.N_.$i(),this.ZEa.$i(),this,this.R);this.tM.push(b);this.k8(this.tM.length>0)};e.prototype.TMa=function(b){b=this.fT.indexOf(b);b<0||(this.fT.splice(b,1),this.rba.splice(b,1),this.Gd&&this.qab(this.tM[b]))};e.prototype.qab=function(b){var c=this.tM.indexOf(b);c<0||(this.tM.splice(c,1),b.dispose(),this.k8(this.tM.length>
0))};return e}(k)});
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"),k=a("tdv/events/Event"),p=a("tdv/player/parser/ClassInfo"),h=
a("tdv/player/script/helper/ButtonProperty"),g=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"),n=a("tdv/constants/EventName");a=p.define("PhotoAlbumPlayer",g,function(){g.call(this,"photoAlbum");this.R3=this.Hga=this.Ui=!1;this.U=this.m=null;this.eVa=new h(this,"buttonNext",f.jf);
this.eVa.bind(n.oa,this.Jza,this);this.fVa=new h(this,"buttonPrevious",f.jf);this.fVa.bind(n.oa,this.cAa,this);this.$d=m.Qq(this.Mh,this)});a.prototype.next=function(){this.Jza()};a.prototype.pause=function(){this.mH()};a.prototype.play=function(){this.nH()};a.prototype.previous=function(){this.cAa()};a.prototype.stop=function(){this.xC()};a.prototype.restart=function(){this.wC()};a.prototype.set=function(l,q){if(this.get(l)!=q){switch(l){case "photoAlbum":this.Hga=!0;this.$d();break;case "viewerArea":this.Ui=
!0;this.$d();break;case "touchTransition":case "mouseTransition":case "touchTransitionDuration":case "mouseTransitionDuration":case "transitionDuration":this.R3=!0,this.$d()}g.prototype.set.call(this,l,q)}};a.prototype.Mh=function(){this.Ui&&(this.Ui=!1,this.R3=!0,this.Lx(),this.get("viewerArea")&&this.Kx(),this.TT(this.get("viewerArea")));this.m&&this.Hga&&(this.Hga=!1,this.get("photoAlbum")?(this.get("viewerArea").Sc().eib(),this.rJ(),this.U.ahb(this.get("photoAlbum"))):this.U.uA());this.R3&&(this.R3=
!1,this.IEa())};a.prototype.ZM=function(){this.set("photoAlbum",null)};a.prototype.Kx=function(){var l=this.get("application"),q=this.get("viewerArea");this.m=new c(l,q,this);this.m.xa({left:0,top:0,bottom:0,right:0});q.hb(this.m);this.U=new e(q,this.m);this.IEa();this.U.bind(e.jr,this.$p,this);this.U.bind(e.ir,this.ls,this);this.U.bind(e.m$,this.LS,this);this.U.bind(e.n$,this.Qza,this);this.U.bind(e.o$,this.Rza,this);this.U.bind(e.dd,this.If,this);this.SC(!0)};a.prototype.Lx=function(){this.m&&(this.U.h(e.jr,
this.$p,this),this.U.h(e.ir,this.ls,this),this.U.h(e.m$,this.LS,this),this.U.h(e.n$,this.Qza,this),this.U.h(e.o$,this.Rza,this),this.U.h(e.dd,this.If,this),this.U.clear(),this.m.getParent().removeChild(this.m),this.m=null,this.SC(!1))};a.prototype.IEa=function(){var l=this.get("viewerArea");l&&this.U&&(d.br()?this.U.y8(this.get("touchTransition",b.zp),this.get("touchTransitionDuration",l.get("transitionDuration",1E3))):this.U.y8(this.get("mouseTransition",b.zp),this.get("mouseTransitionDuration",
l.get("transitionDuration",1E3))))};a.prototype.If=function(l){this.Kd(l.data.state)};a.prototype.$p=function(l){this.YR(l.data.photoAlbum)};a.prototype.ls=function(l){this.WR(l.data.photoAlbum)};a.prototype.LS=function(l){l.data.photoAlbum.o(new k(n.Qb))};a.prototype.Qza=function(l){l.data.item.kD()};a.prototype.Rza=function(l){l.data.item.end()};a.prototype.wj=function(l){this.m.getParent().xa({progressPercent:l.data.percent,progressVisible:!0})};a.prototype.eM=function(){this.m.getParent().set("progressVisible",
!1)};a.prototype.Jza=function(){this.U&&this.get("photoAlbum")&&this.U.next()};a.prototype.cAa=function(){this.U&&this.get("photoAlbum")&&this.U.goa()};a.prototype.Ql=function(){this.U&&this.get("photoAlbum")&&this.U.play()};a.prototype.sq=function(){this.U&&this.get("photoAlbum")&&this.U.stop()};a.prototype.ws=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"),k=a("tdv/player/script/MediaPlayer"),p=a("tdv/player/script/PlayListItem");a=m.define("PhotoAlbumPlayListItem",p,function(){p.call(this)});a.prototype.start=function(){p.prototype.start.call(this);var h=this.get("player");h&&(h.bind(k.Vh,this.$p,this),h.set("photoAlbum",this.get("media")))};a.prototype.stop=
function(){var h=this.get("player");h&&(h.h(k.Vh,this.$p,this),h.get("photoAlbum")==this.get("media")&&h.set("photoAlbum",null));p.prototype.stop.call(this)};a.prototype.rP=function(){var h=this.get("media");if(h){var g=h.get("playList");g&&(h=g.get("selectedIndex"),g=g.get("items"),h>=0&&g&&g[h].rP())}p.prototype.rP.call(this)};a.prototype.$p=function(){this.get("player").h(k.Vh,this.$p,this);this.get("player").bind(k.fo,this.ls,this);this.kD()};a.prototype.ls=function(h){h.data.media==this.get("media")&&
(this.get("player").h(k.fo,this.ls,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"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/script/MediaAudio");return k.define("PhotoAudio",p,function(){p.call(this,m.dSa)})});
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"),k=a("tdv/binding/Bindable"),p=a("tdv/events/Event"),h=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/view/util/Preloader"),e=a("tdv/constants/EventName");a=h.define("PlayList",k,function(){k.call(this);this.xg=-1;this.ei=[];this.pT=this.Wk=this.bf=void 0});a.prototype.set=function(b,
c){b=="selectedIndex"?this.g5a(c):b=="items"?this.T4a(c):k.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){return b=="selectedIndex"?this.xg:b=="items"?this.ei:k.prototype.get.call(this,b,c)};a.prototype.dispose=function(){this.bf&&(this.bf.h(e.gr,this.PS,this),this.bf.h(e.tg,this.Xu,this),this.bf.h(e.Qb,this.Xu,this),this.bf=null)};a.prototype.T4a=function(b){b=b||[];if(!m.Kma(this.ei,b)){var c=this.xg;this.ei=b;b=this.PBa(this.xg);this.o(new p(e.vY,{nextSelectedIndex:b}));this.xg=b;
this.CCa(this.xG(this.xg));this.yEa();this.o(new p(e.V,{previousSelectedIndex:c}));k.prototype.set.call(this,"items",this.ei);k.prototype.set.call(this,"selectedIndex",this.xg)}};a.prototype.g5a=function(b){b=this.PBa(b);if(this.xg!=b){var c=this.xg;this.o(new p(e.vY,{nextSelectedIndex:b}));this.xg=b;this.CCa(this.xG(this.xg));this.yEa();this.o(new p(e.V,{previousSelectedIndex:c}));k.prototype.set.call(this,"selectedIndex",this.xg)}};a.prototype.PBa=function(b){return Math.max(-1,Math.min(this.ei.length-
1,b))};a.prototype.xG=function(b){return b>=0?this.ei[b]:null};a.prototype.CCa=function(b){this.bf==b&&this.Wk===void 0||this.Wk===b||(this.Wk===void 0?(this.Wk=b,this.bf?this.Wk&&this.bf.get("player")==this.Wk.get("player")?(this.bf.rP(),this.Xu()):this.$_a(this.bf,this.Wk)?(b=this.bf,b.rP(),this.Xu(),b.zPa()):(this.xxa(this.bf,this.Wk)?this.bf.get("media").get("modelLocations",[]).forEach(function(c){var d=!(c.get("model")!=this.Wk.get("media")||!c.get("forceModelLoading"));c.set("preferred",d)}.bind(this)):
this.B8a(this.bf,this.Wk)&&this.bf.get("player").Tib(),this.bf.stop()):this.Xu()):this.Wk=b)};a.prototype.$_a=function(b,c){return this.Iea(b)&&this.Lea(c)&&this.wxa(c,b)};a.prototype.xxa=function(b,c){return this.Lea(b)&&this.Iea(c)?this.wxa(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.wxa=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.B8a=function(b,c){return this.Lea(b)&&this.Iea(c)&&b.get("player").get("model3DPlayer")==c.get("player")};a.prototype.Lea=function(b){return b&&h.Qa("PanoramaPlayListItem",b)};a.prototype.Iea=function(b){return b&&h.Qa("Model3DPlayListItem",b)};a.prototype.Xu=function(){this.bf&&
(this.bf.h(e.gr,this.PS,this),this.bf.h(e.tg,this.Xu,this),this.bf.h(e.Qb,this.Xu,this));this.Wk?(this.xxa(this.bf,this.Wk)&&this.bf.get("player").bind(e.daa,this.yC,this,!0),this.bf=this.Wk,this.Wk=void 0,this.bf.bind(e.gr,this.PS,this),this.bf.bind(e.tg,this.Xu,this),this.bf.start()):(this.Wk=this.bf=void 0,this.set("selectedIndex",-1))};a.prototype.yC=function(b){b.source.h(e.daa,this.yC,this);this.PS();this.bf.yPa()};a.prototype.PS=function(){this.bf.h(e.gr,this.PS,this);this.bf.h(e.tg,this.Xu,
this);this.bf.bind(e.Qb,this.Xu,this)};a.prototype.yEa=function(){this.pT&&g.W6(this.pT.get("media"),-1);(this.pT=this.ei&&this.xg>=0?this.ei[(this.xg+1)%this.ei.length]:null)&&g.W6(this.pT.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"),k=a("tdv/player/script/PlayList");return m.define("PhotoPlayList",k,function(){k.call(this)})});
define("tdv/player/script/PhotoPlayListItem",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/PlayListItem"],function(a,m,k,p){a=function(h){function g(){return h.call(this)||this}P(g,h);return g}(p);k.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(p){try{for(var h=(k.uW<<12)+k.AW&65535,g="",e=0,b=p.length;e<b;){var c=m.indexOf(p.charAt(e++))<<12|m.indexOf(p.charAt(e++))<<6|m.indexOf(p.charAt(e++))<<0;c=c-h+65536&65535;g+=String.fromCharCode(c)}return g}catch(d){if(p.substr(0,2)=="{%")return""}}var m="";[[65,26],[97,26],[48,10]].forEach(function(p){for(var h=0;h<p[1];h++)m+=String.fromCharCode(p[0]+h)});m+="+/";var k={lab:"true"};k.uW=parseInt("0")||
0;k.AW=parseInt("2254")||1;k.kib="true";k.name=a("AkBAkSAkkAk3AlBAlCAkvAjuAkeAk6AkvAlHAkzAlA");k.kQa=a("");return k});
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,k,p,h,g){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.Wf=A;this.ft=document.createElement("div");this.visible=!1;[k.Yb,k.K(c),k.K(d),k.K(f),k.K(n),k.K(l)].forEach(function(E){D.Wf.bind(E,D.update,D,!0)});
this.update()}z.prototype.update=function(){var A=this;if(this.Wf.get(c)&&!this.interval){var D=function(){A.visible=!A.visible;if(A.visible){for(var S in x)A.ft.style[S]=x[S];S=A.Wf.wa().ac();A.ft.parentElement&&S.removeChild(A.ft);var K=Array.from(S.childNodes).concat([null]);S.insertBefore(A.ft,K[Math.floor(Math.random()*K.length)]);A.ft.style[w]="1"}else A.ft.style[w]="0"};this.interval=setInterval(D,y);D()}D=this.Wf.cb();var E=this.Wf.Kb(),B=this.ft.clientWidth,C=this.ft.clientHeight,I=this.I5(d,
D*.01),F=this.I5(f,E*.01),G=this.I5(n,D*.01),N=this.I5(l,E*.01),O={};I!==void 0?(O[q]=e(Math.max(0,Math.min(D-B,I))),O[t]=v):G!==void 0?(O[t]=e(Math.max(0,Math.min(D-B,G))),O[q]=v):(O[q]=e((D-B)/2),O[t]=v);F!==void 0?(O[r]=e(Math.max(0,Math.min(E-C,F))),O[u]=v):N!==void 0?(O[u]=e(Math.max(0,Math.min(E-C,N))),O[r]=v):(O[r]=e((E-C)/2),O[u]=v);for(var R in O)this.ft.style[R]=O[R]};z.prototype.I5=function(A,D){A=this.Wf.get(A);var E=g.pp(A);return E===void 0?A:E*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]),n=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,82,105,103,104,116]),l=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 y=8E3,x={};x[b([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=b([117,114,108,40,34])+h.SQa+b([34,41]);x[b([112,111,115,105,116,105,111,110])]=b([97,98,115,111,108,117,116,101]);x[b([122,45,105,110,100,101,120])]=b([49,48,48,48]);x[b([119,105,100,116,104])]=p.yb()?b([53,53,118,109,105,110]):b([52,54,48,112,120]);x[b([104,101,105,103,104,116])]=p.yb()?b([49,55,46,57,51,118,109,105,110]):b([49,53,48,112,
120]);x[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]);x[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]);x[b([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=b([99,111,110,116,97,105,110]);x[b([111,112,97,99,105,116,121])]=b([49]);x[b([112,111,105,110,116,101,114,69,118,101,110,116,115])]=b([110,111,110,101]);x[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/constants/Position",["require","exports"],function(){return{$a:"left",Cb:"right",Tc:"top",Fc:"bottom"}});
define("tdv/view/effects/OffsetEffect",["require","tdv/utils","tdv/view/effects/Effect","tdv/view/constants/Direction","tdv/view/constants/Position"],function(a){var m=a("tdv/utils"),k=a("tdv/view/effects/Effect");a("tdv/view/constants/Direction");a("tdv/view/constants/Position");a=m.extend(k,function(){k.call(this)});a.prototype.fR=function(){return 0};a.prototype.gR=function(){return 0};a.prototype.UM=function(){k.prototype.UM.call(this);this.UB(function(p){p.cg(!0)})};a.prototype.ez=function(){k.prototype.ez.call(this);
this.UB(function(p){p.EX(this.fR(p,this.pm()));p.FX(this.gR(p,this.pm()))})};a.prototype.SM=function(){this.UB(function(p){p.EX(this.fR(p,1));p.FX(this.gR(p,1))});k.prototype.SM.call(this)};a.prototype.TM=function(){this.UB(function(p){p.EX(this.fR(p,0));p.FX(this.gR(p,0))});k.prototype.TM.call(this)};return a});
define("tdv/view/effects/SlideInEffect",["require","tdv/utils","tdv/view/effects/OffsetEffect","tdv/view/constants/Position"],function(a){var m=a("tdv/utils"),k=a("tdv/view/effects/OffsetEffect"),p=a("tdv/view/constants/Position");a=m.extend(k,function(){k.call(this)});a.prototype.fR=function(h,g){switch(this.get("from")){case p.Tc:case p.Fc:return 0;case p.$a:var e=h.Sv();h=h.cb();return isNaN(h)||isNaN(e)?1E4:(-e-h)*(1-g);default:e=h.getParent();if(!e)return 0;var b=e.Ph();e=h.Sv();return isNaN(e)||
isNaN(b)?1E4:(b-e)*(1-g)}};a.prototype.gR=function(h,g){switch(this.get("from")){case p.Tc:var e=h.Oz();h=h.Kb();return isNaN(h)||isNaN(e)?1E4:(-e-h)*(1-g);case p.Fc:e=h.getParent();if(!e)return 0;var b=e.Oh();e=h.Oz();return isNaN(e)||isNaN(b)?1E4:(b-e)*(1-g);default:return 0}};a.prototype.TM=function(){this.UB(function(h){h.EX(0);h.FX(0);h.cg(!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"),k=a("tdv/view/effects/OffsetEffect");a("tdv/view/constants/Direction");var p=a("tdv/view/constants/Position");a=m.extend(k,function(){k.call(this)});a.prototype.fR=function(h,g){switch(this.get("to")){case p.Tc:case p.Fc:return 0;case p.$a:var e=h.Sv();h=h.cb();return isNaN(h)||isNaN(e)?1E4:(-e-h)*g;default:e=
h.getParent();if(!e)return 0;var b=e.Ph();e=h.Sv();return isNaN(e)||isNaN(b)?1E4:(b-e)*g}};a.prototype.gR=function(h,g){switch(this.get("to")){case p.Tc:var e=h.Oz();h=h.Kb();return isNaN(h)||isNaN(e)?1E4:(-e-h)*g;case p.Fc:e=h.getParent();if(!e)return 0;var b=e.Oh();e=h.Oz();return isNaN(e)||isNaN(b)?1E4:(b-e)*g;default:return 0}};a.prototype.SM=function(){this.UB(function(h){h.EX(0);h.FX(0);h.cg(!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 k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=
a("tdv/player/l10n"),g=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"),n=a("tdv/view/effects/SlideInEffect"),l=a("tdv/view/effects/SlideOutEffect"),q=a("tdv/player/script/HTML");a=k.extend(f,function(u){f.call(this);this.Ee=u;this.Vj=this.MF=this.CB=this.tn=null;u=new n;u.set("duration",500);u.set("from","bottom");u=new l;u.set("duration",
500);u.set("to","bottom");this.xa({creationPolicy:c.mK,verticalAlign:b.Pd,horizontalAlign:b.Xe,visible:!1,showEffect:this.nlb,hideEffect:this.olb});this.Mia="";u=this.EZa();u===!0?setTimeout(function(){this.o(p.fK)}.bind(this),0):u===void 0&&(this.Ee.bind(p.K("cookiesPolicy"),this.Gua,this),setTimeout(function(){this.Gua()}.bind(this),0))});a.prototype.Ib=function(){f.prototype.Ib.call(this);this.xa({backgroundColor:"#1a1a1a",width:"100%",left:0,bottom:0});this.tn==null&&(this.tn=new q,this.tn.xa({content:this.Mia,
fontColor:"#ffffff",fontWeight:"400",fontFamily:"Open Sans, Arial, sans-serif",width:"100%"}),this.hb(this.tn));this.CB==null&&(this.CB=new f,this.hb(this.CB),this.CB.xa({creationPolicy:c.mK,verticalAlign:b.Pd,layout:d.Wh}));this.MF==null&&(this.MF=new e,this.MF.xa({backgroundColor:"#2aabe2",fontColor:"#ffffff",fontFamily:"Open Sans, Arial, sans-serif",label:h("accept").toUpperCase(),verticalAlign:"middle"}),this.CB.hb(this.MF),this.MF.bind(p.oa,this.XUa,this,!0));this.PK==null&&(this.PK=new e,this.PK.xa({backgroundColor:"#1a1a1a",
fontColor:"#808080",fontFamily:"Open Sans, Arial, sans-serif",label:h("reject").toUpperCase(),textDecoration:"underline",verticalAlign:"middle"}),this.CB.hb(this.PK),this.PK.bind(p.oa,this.hVa,this,!0))};a.prototype.Wn=function(){f.prototype.Wn.apply(this,arguments);var u=this.Wb();u&&(u.bind(p.Yb,this.xn,this,!0),this.xn())};a.prototype.xn=function(){var u=this.Wb();if(u){var v=g.yb(),w=u.Kb()>u.cb(),y=Math.min(u.cb(),u.Kb())/100;u=function(x){return Math.round(x*y)};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.Tj:d.Wh});this.tn&&this.tn.xa({fontSize:v?u(3.15):14,textAlign:v&&w?"center":"left"});this.CB&&this.CB.xa({gap:v?0:13});this.MF&&this.MF.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.PK&&this.PK.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.wf()}};
a.prototype.Gua=function(){var u=k.toArray(this.Ee.get("cookiesPolicy"));this.mT!=u&&(this.mT=u,this.M3a())};a.prototype.M3a=function(){if(this.mT.length==0)this.fia(null);else{var u=this.mT[0];k.toArray(u.get("geographicArea")).length==0?this.fia(u):this.YYa(function(v){for(var w=null,y=0;y<this.mT.length&&!w;y++){var x=this.mT[y],z=k.toArray(x.get("geographicArea"));if(z.length==0)w=x;else for(var A=0;A<z.length&&!w;A++)v.indexOf(z[A])>=0&&(w=x)}this.fia(w)}.bind(this))}};a.prototype.fia=function(u){this.xM!==
u&&(this.xM&&this.xM.h(p.K("url"),this.Pja,this),(this.xM=u)?(this.xM.bind(p.K("url"),this.Pja,this),this.Pja(),this.set("visible",!0)):(this.o(p.fK),this.set("visible",!1)))};a.prototype.Pja=function(){var u=document.createElement("div");u.innerHTML=h("cookies-notice");for(var v=u.querySelectorAll("a"),w=0;w<v.length;w++){var y=v[w];y.style.color="#2aabe2";y.style.cursor="pointer";y.style.textDecoration="underline";y.href=this.xM.get("url");y.target="_blank"}this.Mia=u.innerHTML;this.tn&&this.tn.set("content",
this.Mia)};a.prototype.XUa=function(){this.ECa(!0);this.set("visible",!1);this.o(p.fK)};a.prototype.hVa=function(){this.ECa(!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.YYa=function(u){this.KYa(function(v){var w=[v];r.indexOf(v)&&w.push("EU");u(w)})};a.prototype.KYa=function(u){var v=m("tdvp_country_code");v?u(v):this.Gva||(this.Gva=!0,k.bma("https://geoloc.3dvista.com",w=>{w=w.country.toUpperCase();this.Gva=
!1;try{window.localStorage.setItem("tdvp_country_code",w)}catch(y){}u(w)}))};var t="tdvp_accept_cookies_"+window.location.origin+window.location.pathname;a.prototype.EZa=function(){var u=m(t);if(u=="yes")return!0;if(u=="no")return!1};a.prototype.ECa=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 y=w instanceof Request||w instanceof Response?w.url:w;y&&(y=y.split("#")[0]);y&&(y=y.split("?")[0]);return y&&y.indexOf("://")==-1?(typeof window!=="undefined"?Promise.resolve(window.location.href):self.clients.matchAll({type:"window"}).then(function(x){if(x.length)return x[0].url})).then(function(x){return(new window.URL(y,x)).toString()}):Promise.resolve(y)}function m(w,y){return new Promise(function(x,z){(y===void 0?
h():Promise.resolve(y)).then(function(A){(window.webkitRequestFileSystem||window.requestFileSystem)(A?window.PERSISTENT:window.TEMPORARY,w,function(D){x(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 k(w,y){return w&&w.queryUsageAndQuota?new Promise(function(x,z){w.queryUsageAndQuota(function(A,D){console.log("UsedBytes:",A,"grantedBytes:",
D,"freeBytesRequired:",y);var E=A+y;D>=E?x(E):w==navigator.webkitPersistentStorage||w==navigator.persistentStorage?(console.log("requestQuota:",E),w.requestQuota(E,function(){console.log("Granted bytes:",E);x(E)},function(B){console.log("Not granted bytes:",E,B);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 p(){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 h(){return navigator.storage&&navigator.storage.persisted?navigator.storage.persisted():Promise.resolve(!1)}function g(){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(y){return y!=""})}function b(w){return new Promise(function(y,x){w.remove(function(){y()},function(z){x("can't remove entry"+(z&&z.message?": "+z.message:"")+".")})})}function c(w){return d(w).then(function(y){return Promise.all(y.map(function(x){return x.isDirectory?c(x):b(x)}))}).then(function(){return b(w).then(function(){return Promise.resolve()},function(){return Promise.resolve()})})}function d(w){return new Promise(function(y,
x){w.createReader().readEntries(function(z){y(z)},function(){x("can't list directory")})})}function f(w,y,x){return new Promise(function(z,A){w.getDirectory(y,x,function(D){z(D)},function(){A("can't get directory entry: "+y)})})}function n(w,y){return new Promise(function(x,z){f(w,y,{create:!1}).then(function(A){x(A)})["catch"](function(){f(w,y,{create:!0}).then(function(A){x(A)})["catch"](function(A){console.log("Can't create directory entry: "+y,A);z("can't create directory entry: "+y)})})})}function l(w,
y){return y.length==0?w:n(w,y[0]).then(function(x){return l(x,y.slice(1))})}function q(w,y){return y.length==0?w:f(w,y[0]).then(function(x){return q(x,y.slice(1))})}function r(w,y,x){return new Promise(function(z,A){w.getFile(y,x,function(D){z(D)},function(){A("can't get file entry: "+y)})})}function t(w){return new Promise(function(y,x){w.createWriter(function(z){y(z)},function(){x("can't create File for writing")})})}function u(w){var y=w.lastIndexOf(".");switch((y<0?"":w.substr(y)).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{K7:function(){return h()},
toURL:function(w,y){return a(w).then(function(x){x=new window.URL(x);var z=y?"persistent":"temporary",A=x.pathname.split("/").map(encodeURIComponent).join("/");return"filesystem:"+x.origin+"/"+z+A})},Ifb:function(w){return p().then(function(y){return k(y,w)}).then(function(y){return m(y)}).then(function(y){v=y})},sfb:function(w){w=e(w);var y=w[w.length-1],x=w.slice(0,-1);return g().then(function(z){return q(z.root,x)}).then(function(z){return r(z,y,{create:!0})},function(){return Promise.resolve(null)}).then(function(z){return z&&
b(z)})},QMa:function(w,y){var x=e(w);return m(1024,y).then(function(z){return q(z.root,x)}).then(function(z){return c(z)},function(){return Promise.resolve()})},lQa:function(w,y,x){var z=e(w),A=z[z.length-1],D=z.slice(0,-1);return g().then(function(E){return l(E.root,D)}).then(function(E){return r(E,A,{create:!1}).then(function(B){return Promise.resolve(B)},function(){return r(E,A,{create:!0})})}).then(function(E){return t(E)}).then(function(E){E.seek(E.length);return new Promise(function(B,C){E.onwriteend=
function(){B()};E.onerror=function(I){console.log("Error writing file:",w,I);C("error writing file: "+w)};E.write(new Blob([y],{type:x||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.MC=c;this.EB=!1;this.jq=null;this.Ly=d||function(){}}function k(c){return c.PJ>=1048576}var p=a("tdv/player/view/util/FileSystem"),h=a("tdv/player/view/util/URL"),g=a("tdv/player/view/util/Device").$f()?3:5;a={File:function(c,d){this.url=c;this.PJ=d;this.hX=this.GN=0}};var e=a.Files=function(c,d,f,n){this.Wta=this.BUa=c;this.$u=
d.slice();this.Fva=[];var l=0;this.$u.sort(function(q,r){return q.PJ-r.PJ});this.$u.forEach(function(q){l+=q.PJ});this.yDa=l;this.jG=[];this.AZ=void 0;this.Ku=[];this.sba=!1;this.Jg=f||function(){};this.SQ=n||function(){}};e.prototype.Jv=function(){return this.BVa().then(function(){return this.CVa()}.bind(this))};e.prototype.BVa=function(){return self.caches["delete"](this.Wta)};e.prototype.CVa=function(){var c=(new window.URL(this.BUa)).pathname;return p.QMa(c,!1).then(function(){return p.QMa(c,
!0)})};e.prototype.requestStorage=function(){return p.Ifb(Math.round(this.yDa*1.1+10485760)).then(function(){return p.K7()})};e.prototype.download=function(){this.sba=!1;this.AZ=0;this.Jv().then(function(){this.NQ()}.bind(this))["catch"](function(c){console.log("error cleaning storage",c);p.K7().then(function(d){this.SQ(!1,d)}.bind(this))}.bind(this))};e.prototype.cancelDownload=function(){this.sba=!0;this.Ku.forEach(function(c){c.cancel()});this.Jv()};e.prototype.NQ=function(){if(!(this.sba||this.Ku.length>=
g))if(this.$u.length>0){if(g==1)var c=Math.random()>.5?this.$u.shift():this.$u.pop();else if(this.jG.filter(k).length==0)c=this.$u.pop();else{if(k(this.$u[0]))return;c=this.$u.shift()}this.jG.push(c);var d=h.hD(c.url,"nc="+(new Date).getTime()),f=new m(d,function(l){c.GN=l.GN;this.jk()}.bind(this));this.Ku.push(f);f.fetch().then(function(l){return this.h6a(c.url,l)}.bind(this)).then(function(){this.lva(c,f,!0)}.bind(this))["catch"](function(l){console.log("download error",c.url,c.PJ,c.GN,l);this.lva(c,
f,!1)}.bind(this));this.NQ()}else if(this.Ku.length==0){var n=this.Fva.length<=5;p.K7().then(function(l){this.SQ(n,l)}.bind(this))}};e.prototype.lva=function(c,d,f){f?(this.jG.splice(this.jG.indexOf(c),1),this.Ku.splice(this.Ku.indexOf(d),1),this.AZ+=c.PJ,this.jk(),this.NQ()):(c.GN=0,c.hX+=1,this.jk(),c.hX>=20?(console.log("Error downloading file: "+c.url+" after "+c.hX+" retries."),this.sxa(c.url)?(this.Fva.push(c),this.Ku.splice(this.Ku.indexOf(d),1),this.NQ()):(this.cancelDownload(),p.K7().then(function(n){this.SQ(!1,
n)}.bind(this)))):(console.log("Error downloading file: "+c.url+" attempt "+c.hX+" of 20. Will retry in 2000ms."),setTimeout(function(){this.jG.splice(this.jG.indexOf(c),1);this.Ku.splice(this.Ku.indexOf(d),1);k(c)?this.$u.push(c):this.$u.splice(0,0,c);this.NQ()}.bind(this),2E3)))};e.prototype.h6a=function(c,d){return this.j6a(c,d).then(function(){if(this.t8a(c))return this.i6a(c,d)}.bind(this))};e.prototype.i6a=function(c,d){d=d.clone();return d.status!=200?Promise.reject("response status: "+d.status):
self.caches.open(this.Wta).then(function(f){return f.put(c,d)})};e.prototype.j6a=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(n,l){function q(){y.read().then(function(x){var z=x.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 E=
x.done;w&&E&&A.push(r(v));t(A).then(function(){E?n():q()})["catch"](u)})["catch"](u)}function r(x){if(x.length==0)return new Uint8Array(0);var z=0;x.forEach(function(B){z+=B.length});for(var A=new Uint8Array(z),D=0,E=0;E<x.length;D+=x[E].length,E++)A.set(x[E],D);return A}function t(x){if(x.length==0)return Promise.resolve();var z=x.shift();return p.lQa(f,z).then(function(){t(x)})}function u(x){console.log("Error writing response to file system:",x);p.sfb(f).then(function(){l("Error reading response body")})}
var v=[],w=0,y=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.sxa=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.t8a=function(c){var d=(new window.URL(c)).pathname;return d.indexOf("files/")>=0||d.indexOf("pdfjs/")>=0?!0:this.sxa(c)?!1:!0};e.prototype.jk=function(){var c=this.AZ;
this.jG.forEach(function(d){c+=d.GN});this.Jg(100*c/this.yDa)};m.prototype.fetch=function(){return fetch(this.MC).then(function(c){if(this.EB)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,n=0;d!==null&&(f=parseInt(d,10));this.jq=c.body.getReader();var l=!1,q=function(u){this.EB?u.close():l=!0}.bind(this),r=function(u){return this.jq.read().then(function(v){var w=v.value;
w&&(n+=w.byteLength,u.enqueue(w));v.done&&(f=n,t(u));this.Ly({PJ:f,GN:n})}.bind(this))["catch"](function(v){console.log("Error reading response",v);u.error(v)}.bind(this))}.bind(this),t=function(u){l&&(u.close(),l=!1,this.jq=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.EB=!0;this.jq&&this.jq.cancel()};a.Jv=function(c){return(new e(c,[])).Jv()};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){l=t}var k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/events/EventDispatcher"),g=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"),n=a("tdv/util/Storage"),l=null;window.addEventListener("beforeinstallprompt",m);var q=k.extend(h,function(t){h.call(this);this.Ee=t;this.H="initial";this.Vha=this.nv=this.Qk=null;this.Wy=!1;this.rG=null;this.o4=void 0;this.fG=l;this.x0=q.aKa();this.efa=d.tk("vr");this.fG||this.x0||(window.removeEventListener("beforeinstallprompt",m),window.addEventListener("beforeinstallprompt",
this.a1a.bind(this)));this.x0||window.addEventListener("appinstalled",this.WTa.bind(this))});q.prototype.npa=function(t){this.nv=t;this.uo=d.FA(this.nv.get(TDV.PlayerSettings.BASE_DIR_URL)||d.getDirectory(this.nv.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)));this.uo[this.uo.length-1]!="/"&&(this.uo+="/");this.Qk=new r(this.uo);this.o4=this.sBa=t.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS);this.m_a=d.parse(d.getDirectory(window.location.href)).pathname;this.UXa=d.hD(d.FA("files.json",this.uo),
this.sBa);t=TDV.ob.OIa();this.Vha=d.hD(this.nv.get(TDV.PlayerSettings.SERVICE_WORKER_URL),"swv="+t.MAJOR+"."+t.MINOR);this.Qk=new r(this.uo);this.Qk.bind(p.ha,this.A6a,this,!0);this.Qk.load()};q.prototype.oO=function(){return this.Qk.state==r.LP};q.prototype.aGa=function(){return this.H=="can_install"&&!this.efa};q.prototype.cGa=function(){return this.oO()&&this.o4!=this.Qk.version&&!this.efa};q.prototype.$Fa=function(){return this.Qk.state!=r.Oqa&&!this.efa};q.prototype.BJa=function(){this.H=="can_install"&&
(this.fG?(this.fG.userChoice.then(function(t){t.outcome!="accepted"&&this.Kd("unavailable")}.bind(this)),this.fG.prompt().then(function(){this.fG=null}.bind(this))):this.Dca())};q.prototype.cancel=function(){this.H=="downloading"&&(this.rG&&(this.rG.cancelDownload(),this.rG=null),this.Qk.Jv(),this.Kd("unavailable"))};q.prototype.Jv=function(){e.Jv(this.uo);this.Qk.Jv()};q.prototype.A6a=function(){this.nv&&this.nv.get(TDV.PlayerSettings.AY)?this.Kd("unavailable"):this.Ee.get("downloadEnabled")!==!0?
this.Kd("unavailable"):c.PQa!==!0?this.Kd("unavailable"):g.Rb()!=g.Ap||g.Dc()==g.SA||g.Dc()==g.aK?this.Kd("unavailable"):this.Vha?"serviceWorker"in navigator?this.oO()&&!this.cGa()?this.Kd("unavailable"):navigator.onLine?this.$2a():this.Kd("unavailable"):this.Kd("unavailable"):this.Kd("unavailable")};q.prototype.Kd=function(t){this.H!=t&&(this.H=t,t=["can_install","unavailable"].indexOf(this.H)>=0,this.Wy!=t&&(this.Wy=t)&&this.o(p.td))};q.prototype.$2a=function(){this.Kd("registering_sw");navigator.serviceWorker.register(this.Vha,
{scope:this.m_a}).then(function(){this.$Ba(!0)}.bind(this))["catch"](function(){this.$Ba(!1)}.bind(this))};q.prototype.$Ba=function(t){t?g.$f()?this.Kd("can_install"):this.x0&&this.Qk.state==r.L9?(this.Kd("can_install"),this.Dca()):this.fG?this.Kd("can_install"):(this.Kd("sw_registered"),setTimeout(function(){this.H=="sw_registered"&&this.Kd("can_install")}.bind(this),3E3)):this.Kd("unavailable")};q.prototype.a1a=function(t){this.nv&&this.nv.get(TDV.PlayerSettings.AY)||(this.fG=t,this.H=="sw_registered"&&
this.Kd("can_install"))};q.prototype.WTa=function(){this.nv&&this.nv.get(TDV.PlayerSettings.AY)||(this.H=="sw_registered"&&this.Kd("can_install"),this.Dca())};q.prototype.Dca=function(){this.Kd("downloading");this.o(p.gr);this.ODa(0);this.r0a()};q.prototype.r0a=function(){var t=d.hD(this.UXa,"nc="+(new Date).getTime());k.bma(t,u=>{if(this.H=="downloading"){var v=[],w;for(w in u){var y=u[w].tags;if(y){Array.isArray(y)||(y=[y]);for(var x=0;x<y.length;x++)v.indexOf(y[x])<0&&v.push(y[x])}}var z=[];v.indexOf("mobilevr2gen")>=
0&&(g.D6()||g.E6())?z.push("mobilevr2gen"):v.indexOf("mobilevr")>=0&&g.$f()?z.push("mobilevr"):v.indexOf("mobile")>=0&&g.yb()?z.push("mobile"):v.indexOf("desktop")>=0&&!g.yb()&&z.push("desktop");v=[];for(w in u)if(!(w.indexOf(".DS_Store")>-1)){if(y=u[w].tags){var A=!1;if(Array.isArray(y)){x=0;for(var D=y.length;x<D&&!A;x++)A=z.indexOf(y[x])>=0}else A=z.indexOf(y)>=0;if(!A)continue}y=d.FA(w,this.uo);v.push(new e.File(y,u[w].size))}var E=(new window.URL(window.location.pathname,window.location.href)).toString();
v.filter(function(B){return B.url==E}).length==0&&v.push(new e.File(E,1024));this.rG=new e.Files(this.uo,v,this.ODa.bind(this),this.kva.bind(this));this.rG.requestStorage().then(function(B){this.Qk.storage=B?r.XP:r.X$;this.Qk.state=r.L9;this.Qk.version=this.o4;this.Qk.save();this.rG.download()}.bind(this))["catch"](function(){this.kva(!1,void 0)}.bind(this))}})};q.prototype.ODa=function(t){this.o(new f(p.wc,t))};q.prototype.kva=function(t,u){this.rG=null;this.Kd("unavailable");t&&(this.Qk.state=r.LP,
this.Qk.save());t?this.o(p.Qb,{SX:!0}):u?this.o(p.Qb,{SX:!1,error:q.Rqa}):g.$f()?this.o(p.Qb,{SX:!1,error:q.Qqa}):this.x0?this.o(p.Qb,{SX:!1,error:q.Rqa}):this.o(p.Qb,{SX:!1,error:q.Sqa})};q.aKa=function(){return d.Kg("installed",!1)};q.hfb=function(t,u){var v=new q.D$(t);v.bind(p.ha,function(){var w=!1;v.state==q.D$.LP&&(w=q.aKa()?!0:!navigator.onLine);w?b.toURL(t,v.storage==q.D$.XP).then(function(y){u(y)}):u(t)},this,!0);v.load()};q.Sqa="launchFromHomeScreen";q.Qqa="addToBookmark";q.Rqa="errorDownloading";
var r=k.extend(h,function(t){h.call(this);this.uo=t;this.Uea="installation_state_"+t;this.s2a=d.parse(this.uo).pathname+"installation_state.json";this.state=this.storage=this.version=void 0;this.jCa()});r.prototype.load=function(){if(this.s0a()&&this.state==r.LP)this.sDa(this.storage==r.XP).then(function(){this.o(p.ha)}.bind(this))["catch"](function(){this.sDa(this.storage!=r.XP).then(function(){this.storage=this.storage==r.X$?r.XP:r.X$;this.Nha();this.o(p.ha)}.bind(this))["catch"](function(){this.state=
r.L9;this.Nha();this.o(p.ha)}.bind(this))}.bind(this));else this.o(p.ha)};r.prototype.save=function(){this.Nha();this.state==r.LP&&this.H3a()};r.prototype.s0a=function(){var t=n.getItem(this.Uea);if(!t)return!1;this.qYa(t);return!0};r.prototype.Nha=function(){n.setItem(this.Uea,this.xDa())};r.prototype.sDa=function(t){return new Promise(function(u,v){b.toURL(this.uo+"installation_state.json",t).then(w=>k.bma(w,()=>u(),()=>v()))}.bind(this))};r.prototype.H3a=function(){b.lQa(this.s2a,this.xDa(),"text/json")};
r.prototype.xDa=function(){var t={};t.version=this.version;t.storage=this.storage;t.state=this.state;return JSON.stringify(t)};r.prototype.qYa=function(t){this.pYa(JSON.parse(t))};r.prototype.pYa=function(t){this.version=t.version;this.storage=t.storage;this.state=t.state};r.prototype.Jv=function(){n.removeItem(this.Uea);this.jCa()};r.prototype.jCa=function(){this.version="";this.storage=r.uSa;this.state=r.Oqa};r.uSa="unkonwn";r.X$="temporary";r.XP="persistent";r.Oqa="not started";r.L9="started";
r.LP="completed";q.D$=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.Pd});return t}var k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/player/l10n"),g=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"),n=a("tdv/view/containers/Container"),l=a("tdv/view/core/UIComponent"),q=a("tdv/view/text/Label");a=k.extend(n,function(r,t){n.call(this);
this.Ee=r;this.Wg=t;this.Wg.bind(p.td,this.G_a,this,!0);this.Wg.bind(p.gr,this.D_a,this,!0);this.Wg.bind(p.wc,this.F_a,this,!0);this.Wg.bind(p.Qb,this.E_a,this,!0);this.Na="hidden";this.PU=void 0;this.Rga=!1;this.Jg=void 0;this.Vj=this.Bx=this.OF=this.SF=this.PF=this.t3=this.Wa=null;this.RTa();this.xa({backgroundColor:"#000000",gap:18,height:55,width:"100%",paddingLeft:28,paddingRight:28,verticalAlign:d.Pd,layout:f.Wh});this.$g()});a.prototype.G_a=function(){this.Wg.aGa()||this.Wg.oO()&&this.Wg.$Fa()?
(this.Na="ready",this.Rga&&this.$Ca()):this.Na="hidden";this.$g()};a.prototype.D_a=function(){this.Na="installing";this.$g()};a.prototype.F_a=function(r){this.Jg=r.percent;this.$g()};a.prototype.E_a=function(r){this.Na=r.data.SX?"installed":"failed";this.zva=r.data.error;this.$g()};a.prototype.lg=function(){this.g6a()};a.prototype.C1=function(){this.Rga||(this.Rga=!0,this.Na=="ready"&&this.$Ca())};a.prototype.$Ca=function(){this.PU=setTimeout(function(){this.PU=null;this.g2a()}.bind(this),5E3);this.$g()};
a.prototype.g6a=function(){this.BBa();this.PU&&clearTimeout(this.PU);this.PU=null};a.prototype.g2a=function(){this.BBa();this.Na=="ready"&&(this.Na="hidden",this.$g())};a.prototype.RTa=function(){this.bind(p.mb,this.lg,this);this.Ee.bind(p.mb,this.C1,this);this.Ee.bind(p.Ra,this.C1,this)};a.prototype.BBa=function(){this.h(p.mb,this.lg,this);this.Ee.h(p.mb,this.C1,this);this.Ee.h(p.Ra,this.C1,this)};a.prototype.Ib=function(){n.prototype.Ib.call(this);this.Wa==null&&(this.Wa=new q,this.Wa.xa({fontColor:"#ffffff",
fontWeight:"400",fontFamily:"Arial, sans-serif",fontSize:14,text:h("download-tour")}),this.hb(this.Wa));this.PF==null&&(this.PF=m(h("download")),this.hb(this.PF),this.PF.bind(p.oa,this.aVa,this,!0));this.SF==null&&(this.SF=m(h("refresh-downloaded")),this.hb(this.SF),this.SF.bind(p.oa,this.gVa,this,!0));this.OF==null&&(this.OF=m(h("delete-downloaded")),this.hb(this.OF),this.OF.bind(p.oa,this.$Ua,this,!0));this.t3==null&&(this.t3=new l,this.t3.xa({width:"100%"}),this.hb(this.t3));this.Bx==null&&(this.Bx=
new c,this.Bx.xa({backgroundColor:"#ffffff",borderRadius:2,iconColor:"#000000",iconLineWidth:1,iconWidth:17,iconHeight:17,height:31,width:31}),this.hb(this.Bx),this.Bx.bind(p.oa,this.ZUa,this,!0));this.Vj==null&&(this.Vj=m(h("cancel")),this.hb(this.Vj),this.Vj.bind(p.oa,this.NF,this,!0));g.yb()&&this.xn();this.$g()};a.prototype.Ir=function(){n.prototype.Ir.call(this);g.yb()&&this.getParent().bind(p.Yb,this.xn,this,!0)};a.prototype.ap=function(){g.yb()&&this.getParent().h(p.Yb,this.xn,this,!0);n.prototype.ap.call(this)};
a.prototype.xn=function(){var r=this.getParent();if(r){var t=Math.min(r.cb(),r.Kb())/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.Wa&&this.Wa.xa({fontSize:u(3)});[this.PF,this.Vj,this.SF,this.OF].forEach(function(v){v&&v.xa({borderRadius:u(.4),fontSize:u(3),paddingLeft:u(3),paddingRight:u(3),height:u(6.7)})});this.Bx&&this.Bx.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.$g=function(){switch(this.Na){case "ready":var r=this.Wg.oO()?h("downloaded"):h("download-tour");break;case "installing":r=h("downloading");this.Jg!==void 0&&(r+="..."+this.Jg.toFixed(1)+"%");break;case "installed":r=h("downloaded");break;case "failed":r=this.zva==e.Sqa?g.yb()?h("storage-not-provided-launch-from-homescreen"):h("storage-not-provided-launch-from-desktop"):this.zva==e.Qqa?h("storage-not-provided-bookmark"):h("download-failed")}this.Wa&&this.Wa.set("text",r);this.PF&&this.PF.set("visible",
this.Na=="ready"&&!this.Wg.oO()&&this.Wg.aGa());this.OF&&this.OF.set("visible",this.Na=="ready"&&this.Wg.oO()&&this.Wg.$Fa());this.SF&&this.SF.set("visible",this.Na=="ready"&&this.Wg.cGa());this.Vj&&this.Vj.set("visible",this.Na=="installing");this.Bx&&this.Bx.set("visible",this.Na!="installing");this.set("visible",this.Na!="hidden")};a.prototype.aVa=function(){this.Wg.BJa()};a.prototype.gVa=function(){this.Wg.BJa()};a.prototype.$Ua=function(){this.Wg.Jv();this.Na="hidden";this.$g()};a.prototype.NF=
function(){this.Wg.cancel();this.Na="hidden";this.$g()};a.prototype.ZUa=function(){this.Na=="installing"&&this.Wg.cancel();this.Na="hidden";this.$g()};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.Gq=u}var k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/player/l10n"),
g=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"),n=a("tdv/view/effects/FadeOutEffect"),l=a("tdv/view/text/Label"),q=a("tdv/view/text/HTMLText"),r=a("tdv/view/util/KeyboardControl");a=k.extend(d,function(){d.call(this);this.ds=[];this.Vj=this.QF=this.Wa=this.EG=this.OM=this.Xs=null;this.pQ=this.pQ.bind(this);this.NF=this.NF.bind(this);var t=
new f;t.set("duration",500);t.set("easing","cubic_in");var u=new n;u.set("duration",500);u.set("easing","cubic_out");this.xa({backgroundColor:"#000000",backgroundOpacity:.6,horizontalAlign:b.Xe,gap:5,left:0,top:0,right:0,bottom:0,hideEffect:u,showEffect:t,visible:!1})});a.prototype.Ib=function(){d.prototype.Ib.call(this);this.Xs==null&&(this.Xs=new d,this.Xs.xa({centerX:0,centerY:0,backgroundColor:"#ffffff",horizontalAlign:b.Xe,verticalAlign:b.Pd,layout:c.Tj,shadow:!0,shadowColor:"#000000",shadowHorizontalLength:0,
shadowVerticalLength:0,shadowOpacity:.2}),this.hb(this.Xs));this.Wa==null&&(this.Wa=new l,this.Wa.xa({fontColor:"#808080",fontWeight:"300",fontFamily:"Tahoma, Geneva, sans-serif"}),this.Xs.hb(this.Wa));this.EG==null&&(this.EG=new q,this.EG.xa({width:"80%"}),this.Xs.hb(this.EG));this.OM==null&&(this.OM=new d,this.OM.xa({backgroundColor:"#b3b3b3"}),this.Xs.hb(this.OM));this.Wj==null&&(this.Wj=new d,this.Wj.xa({horizontalAlign:b.Xe,verticalAlign:b.Pd,layout:c.Wh}),this.Xs.hb(this.Wj));this.QF==null&&
(this.QF=new e,this.QF.xa({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.Xe,verticalAlign:b.Pd,label:h("yes").toUpperCase(),pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.QF.bind(p.oa,this.pQ,this,!0),this.Wj.hb(this.QF));this.Vj==null&&(this.Vj=new e,this.Vj.xa({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.Xe,verticalAlign:b.Pd,label:h("no").toUpperCase(),
pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.Vj.bind(p.oa,this.NF,this,!0),this.Wj.hb(this.Vj))};a.prototype.Ir=function(){d.prototype.Ir.call(this);this.getParent().bind(p.Yb,this.xn,this,!0)};a.prototype.ap=function(){this.getParent().h(p.Yb,this.xn,this,!0);d.prototype.ap.call(this)};a.prototype.xn=function(){var t=this.getParent();if(t){var u=t.cb();t=t.Kb();if(g.yb()){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.Xs&&this.Xs.xa({borderRadius:u(1),width:u(80),height:u(40),gap:u(4),shadowBlurRadius:u(1),shadowSpread:u(1)});this.OM&&this.OM.xa({width:u(60),minHeight:2,height:u(.25)});this.Wj&&this.Wj.xa({gap:u(5)});this.Vj&&this.Vj.xa({borderRadius:u(1),width:u(20),height:u(10),fontSize:u(4.25)});this.QF&&this.QF.xa({borderRadius:u(1),width:u(20),height:u(10),fontSize:u(4.5)});this.Wa&&this.Wa.xa({fontSize:u(5)});this.f4()}};a.prototype.show=function(t,u){this.xn();var v=this.vwa(u);v>=0&&this.zBa(v);
this.R2a(new m(t,u));this.WUa()};a.prototype.Pe=function(t){t=this.vwa(t);t>=0&&this.zBa(t)};a.prototype.WUa=function(){var t=this.getParent();t&&t.Vq(this,t.Ab().length-1)};a.prototype.pQ=function(){this.ota(!0)};a.prototype.NF=function(){this.ota(!1)};a.prototype.vwa=function(t){for(var u=0;u<this.ds.length;u++)if(this.ds[u].Gq==t)return u;return-1};a.prototype.f4=function(){if(this.Xs){r.Dfb(this.pQ);r.poa(this.NF);var t=this.Pwa();t?(t.text.length<20?(this.EG.set("visible",!1),this.Wa.set("text",
t.text),this.Wa.set("visible",!0)):(this.Wa.set("visible",!1),this.EG.set("html",this.ZYa(t.text)),this.EG.set("visible",!0)),this.Vj.set("visible",t.Gq?!0:!1),this.set("visible",!0),r.j9a(this.pQ),r.vka(this.NF)):this.set("visible",!1)}};a.prototype.ZYa=function(t){return"<div style=\"color:#808080; font-weight:300; font-family:'Tahoma', 'Geneva', sans-serif; font-size: "+this.Wa.get("fontSize")+'px; text-align:center;" >'+t+"</div>"};a.prototype.ota=function(t){var u=this.Pwa();u&&(u=this.mZa(u.text),
this.m3a(u),u.forEach(v=>{v.Gq&&v.Gq.call(this,t)}))};a.prototype.R2a=function(t){this.ds.push(t);this.f4()};a.prototype.mZa=function(t){return this.ds.filter(u=>u.text==t)};a.prototype.m3a=function(t){this.ds=this.ds.filter(u=>!t.includes(u));this.f4()};a.prototype.zBa=function(t){this.ds.splice(t,1);t==this.ds.length&&this.f4()};a.prototype.Pwa=function(){return this.ds.length>0?this.ds[this.ds.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(F){return F.map(function(G){return String.fromCharCode(G)}).join("")}function k(F){for(;F&&F!=document;){if(F.getAttribute(r)=="Button")return!0;F=F.parentNode}return!1}var p=a("tdv/utils"),h=a("tdv/constants/EventName"),g=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]),n=m([109,111,117,115,101,117,112]),l=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(F){if(!b.yb()||!k(F.target)){var G=b.Od()==b.NY?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(F)});
t=u=v=w=void 0},G)}F.preventDefault();F.stopImmediatePropagation()},!0);var t,u,v,w;document.addEventListener("mousedown",function(F){v=t=F.screenX;w=u=F.screenY},!0);document.addEventListener("mousemove",function(F){v=F.screenX;w=F.screenY},!0);var y=1;p=p.extend(e,function(F,G){e.call(this);this.Fb=F;this.eZa=G;this.a1=this.a1.bind(this);this.re=this.re.bind(this);this.Tea=!1;this.Qea=this.Qea.bind(this);this.Rea=this.Rea.bind(this);this.Pea=this.Pea.bind(this);this.Sea=this.Sea.bind(this);this.pa=
document.createElement("div");this.pa.style.setProperty("z-index",y,I[C]);for(var N in I[x])this.pa.style.setProperty(N,I[x][N],I[C]);d.push(this.a1)});p.prototype.clear=function(){this.l0a()&&this.fea();this.pa=null;d.splice(d.indexOf(this.a1),1)};p.prototype.a1=function(F){var G=this.eZa();if(G.length!=0){this.pa.replaceChildren();this.Tea=!1;var N=0;G.forEach(function(O){var R=document.createElement("div");if(O){R.textContent=O;for(var S in I[A])R.style.setProperty(S,I[A][S],I[C]);var K=N;N++;
R.addEventListener(q,function(L){this.Qea(L,K)}.bind(this));R.addEventListener(l,function(L){this.Rea(L,K)}.bind(this));R.addEventListener(f,function(L){this.Pea(L,K)}.bind(this));R.addEventListener(n,function(L){this.Sea(L,K)}.bind(this))}else for(S in I[D])R.style.setProperty(S,I[D][S],I[C]);for(S in I[z])R.style.setProperty(S,I[z][S],I[C]);this.pa.appendChild(R)}.bind(this));(c.fullscreenElement()||document.body).appendChild(this.pa);this.pa.style.setProperty("display","block",I[C]);G=F.pageX;
F=F.pageY;G+this.pa.clientWidth>document.body.clientWidth-5&&(G=document.body.clientWidth-this.pa.clientWidth-5);F+this.pa.clientHeight>document.body.clientHeight-5&&(F=document.body.clientHeight-this.pa.clientHeight-5);this.pa.style.setProperty("left",G+"px",I[C]);this.pa.style.setProperty("top",F+"px",I[C]);this.Fb.bind(h.Ra,this.re,this);document.addEventListener("mousedown",this.re);this.M8a=setInterval(this.L8a.bind(this),200)}};p.prototype.l0a=function(){return!!this.pa&&!!this.pa.parentNode};
p.prototype.fea=function(){clearInterval(this.M8a);this.pa.parentNode.removeChild(this.pa);document.removeEventListener("mousedown",this.re);this.Fb.h(h.Ra,this.re,this);this.pa.style.setProperty("display","none",I[C])};p.prototype.L8a=function(){this.pa.contains(document.elementFromPoint(this.pa.offsetLeft+this.pa.clientWidth*.5,this.pa.offsetTop+this.pa.clientHeight*.5))||this.pa.style.setProperty("z-index",y*=10,I[C])};p.prototype.re=function(){this.fea()};p.prototype.Pea=function(F){this.Tea=
!0;F.preventDefault();F.stopImmediatePropagation()};p.prototype.Sea=function(F,G){this.Tea&&(this.fea(),F.preventDefault(),F.stopImmediatePropagation(),this.o(new g(h.Ar,{index:G})))};p.prototype.Qea=function(F){for(var G in I[E])F.currentTarget.style.setProperty(G,I[E][G],I[C])};p.prototype.Rea=function(F){for(var G in I[B])F.currentTarget.style.setProperty(G,I[B][G],I[C])};var x="0",z="1",A="2",D="3",E="4",B="5",C="6",I=function(F){return JSON.parse(F.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 p});
define("tdv/view/core/Cursors",["require","exports","tdv/player/view/util/URL","tdv/view/constants/Cursor","tdv/view/util/Assets"],function(a,m,k,p,h){return function(){function g(e){this.Fb=e;this.qv={};this.qv[p.wra]="move";this.qv[p.NRa]="ew-resize";this.qv[p.PRa]="ns-resize";this.qv[p.ORa]="nesw-resize";this.qv[p.QRa]="nwse-resize";this.qv[p.hf]="pointer";this.qv[p.dB]="inherit";this.qv[p.gf]="default";this.ci={};this.ci[p.aB]="grab.cur";this.ci[p.Ai]="grabbing.cur";this.ci[p.Gra]="N.cur";this.ci[p.Hra]=
"NE.cur";this.ci[p.xra]="E.cur";this.ci[p.Kra]="SE.cur";this.ci[p.Jra]="S.cur";this.ci[p.Lra]="SW.cur";this.ci[p.Mra]="W.cur";this.ci[p.Ira]="NW.cur";this.ci[p.zra]="FN.cur";this.ci[p.Ara]="FNE.cur";this.ci[p.yra]="FE.cur";this.ci[p.Dra]="FSE.cur";this.ci[p.Cra]="FS.cur";this.ci[p.Era]="FSW.cur";this.ci[p.Fra]="FW.cur";this.ci[p.Bra]="FNW.cur";this.Uaa={};this.Uaa[p.uF]=h.uF;this.Vta={}}g.prototype.QHa=function(e){return this.f0a(e)?this.Mwa(e):this.V_a(e)?this.LYa(e):this.O_a(e)?this.xYa(e):this.Mwa(p.gf)};
g.prototype.mVa=function(e){if(!(e in this.Vta)){var b=new Image;b.src=this.cwa(e);this.Vta[e]=b}};g.prototype.f0a=function(e){return e in this.qv};g.prototype.Mwa=function(e){return this.qv[e]};g.prototype.V_a=function(e){return!!this.ci[e]};g.prototype.LYa=function(e){this.mVa(e);return"url("+this.cwa(e)+"), default"};g.prototype.cwa=function(e){return k.FA(this.Fb.get("settings").get(TDV.PlayerSettings.CURSORS_DIR_URL))+"/"+this.ci[e]};g.prototype.O_a=function(e){return e in this.Uaa};g.prototype.xYa=
function(e){return"url("+this.Uaa[e]+"), auto"};return g}()});define("tdv/view/helpers/DOMUpdateQueue",["require","exports"],function(){var a=1,m={};return{eab:function(k,p){var h=k.__duqid;h===void 0&&(h=a.toString(),k.__duqid=h,a++);k=m[h]||(m[h]={e:k,s:{}});for(var g in p)k.s[g]=p[g]},process:function(){for(var k in m){var p=m[k],h=p.e.style;p=p.s;for(var g in p)h[g]=p[g]}m={}}}});
define("tdv/view/lifecycle/PriorityQueue",["require","exports"],function(){return function(){function a(){this.Ty={};this.Bs=[];this.CQ=0}a.prototype.push=function(m,k){this.Ty[k]==void 0?(this.Ty[k]=[m],this.Bs.push(k),this.Bs.sort(function(p,h){return p-h}),this.CQ++):(k=this.Ty[k],k.includes(m)||(k.push(m),this.CQ++))};a.prototype.THa=function(){return this.CQ};a.prototype.isEmpty=function(){return this.Bs.length==0};a.prototype.qMa=function(){if(!this.isEmpty()){var m=this.Bs[0],k=this.Ty[m].pop();
this.Ty[m].length==0&&(delete this.Ty[m],this.Bs=this.Bs.slice(1));this.CQ--;return k}};a.prototype.doa=function(){if(!this.isEmpty()){var m=this.Bs[this.Bs.length-1],k=this.Ty[m].pop();this.Ty[m].length==0&&(delete this.Ty[m],this.Bs=this.Bs.slice(0,this.Bs.length-1));this.CQ--;return k}};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,k,p,h,g){return function(){function e(){this.bE=!1;this.aMa=void 0;this.enabled=!0;this.X4=new p;this.T7=new p;this.D8=new p;this.N6=new p;this.Aqa=new p;h.requestFrame(this.Bg,this)}e.prototype.clear=function(){this.enabled=!1};e.prototype.kW=function(b){this.X4.push(b,this.iO(b));this.lX()};e.prototype.Ff=
function(b){this.T7.push(b,this.iO(b));this.lX()};e.prototype.jc=function(b){this.D8.push(b,this.iO(b));this.lX()};e.prototype.wf=function(b){this.N6.push(b,this.iO(b));this.lX()};e.prototype.rb=function(b){this.Aqa.push(b,this.iO(b));this.lX()};e.prototype.update=function(){this.cjb();this.Gjb();this.Zt()};e.prototype.cjb=function(){do{for(;!this.X4.isEmpty();){var b=this.X4.doa();b&&b.Ib()}this.T7.isEmpty()||(b=this.T7.doa())&&b.eb()}while(!this.T7.isEmpty()||!this.X4.isEmpty())};e.prototype.Gjb=
function(){for(;!this.D8.isEmpty()||!this.N6.isEmpty();)this.eY(),this.Ck()};e.prototype.eY=function(){for(;!this.D8.isEmpty();){var b=this.D8.doa();if(b&&b.rjb()){var c=b.getParent();c?(c.jc(),c.wf()):b.xNa(0,0,b.Xv(),b.Wv())}}};e.prototype.Ck=function(){for(;!this.N6.isEmpty();){var b=this.N6.qMa();b&&b.Ck()}};e.prototype.Zt=function(){for(;!this.Aqa.isEmpty();){var b=this.Aqa.qMa();b&&b.Zt()}k.process()};e.prototype.lX=function(){this.bE||(this.bE=!0,this.aMa=(new Date).getTime()+500,g.iE(this.GLa.bind(this)))};
e.prototype.GLa=function(){this.bE=!1;this.enabled&&this.update()};e.prototype.iO=function(b){return(b=b.getParent())?this.iO(b)+1:0};e.prototype.Bg=function(){this.bE&&(new Date).getTime()>=(this.aMa||0)&&this.GLa();h.requestFrame(this.Bg,this)};return e}()});
define("tdv/view/core//visualprops/CanvasVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,k){return function(p){function h(){var g=p!==null&&p.apply(this,arguments)||this;g.canvas=null;g.jV=0;return g}P(h,p);return h}(k)});
define("tdv/view/core/visuals/dom/DOMCanvasVisuals",["require","exports","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core//visualprops/CanvasVisualProperties"],function(a,m,k,p){return function(h){function g(){return h.call(this)||this}P(g,h);g.prototype.hp=function(){return new p};g.prototype.hh=function(e){h.prototype.hh.call(this,e);this.xp(e)};g.prototype.xp=function(e){if(e.canvas!==this.J.canvas&&(this.J.canvas&&this.X7(this.J.canvas),e.canvas)){var b=e.canvas;b.style.position="absolute";
b.style.left="0";b.style.top="0";b.style.cursor="inherit";this.kk(e.canvas)}};return g}(k)});
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,k,p,h){return function(g){function e(){var b=g.call(this)||this;b.En=null;b.qt=null;b.ao=null;b.$t=null;return b}P(e,g);e.prototype.hp=function(){return new h};e.prototype.Dz=function(){g.prototype.Dz.call(this);this.sbb().appendChild(this.R5());this.acb().appendChild(this.f6())};e.prototype.sbb=
function(){this.En||(this.En=document.createElement("div"),this.En.setAttribute("tdvlayer","scrollbar"),this.En.style.position="absolute",this.En.style.zIndex=k.esa);return this.En};e.prototype.acb=function(){this.ao||(this.ao=document.createElement("div"),this.ao.setAttribute("tdvlayer","scrollbar"),this.ao.style.position="absolute",this.ao.style.zIndex=k.esa);return this.ao};e.prototype.R5=function(){this.qt||(this.qt=document.createElement("div"),this.qt.style.position="absolute",this.qt.style.left=
"0",this.qt.style.top="0");return this.qt};e.prototype.f6=function(){this.$t||(this.$t=document.createElement("div"),this.$t.style.position="absolute",this.$t.style.left="0",this.$t.style.top="0");return this.$t};e.prototype.hh=function(b){g.prototype.hh.call(this,b);this.Djb(b)};e.prototype.Djb=function(b){b.uk!==this.J.uk&&(b.uk?this.xh.appendChild(this.En):this.xh.removeChild(this.En));b.Dk!==this.J.Dk&&(b.Dk?this.xh.appendChild(this.ao):this.xh.removeChild(this.ao));if(b.contentWidth!==this.J.contentWidth||
b.contentHeight!==this.J.contentHeight||b.uk!==this.J.uk||b.Kc!==this.J.Kc||b.xf!==this.J.xf||b.Lt!==this.J.Lt||b.Kt!==this.J.Kt||b.gh!==this.J.gh||b.Qn!==this.J.Qn||b.Rn!==this.J.Rn||b.Dk!==this.J.Dk||b.Lc!==this.J.Lc){var c=b.uk&&b.Dk,d=Math.round(b.xf*100/b.contentWidth),f=Math.round(b.Kc*100/b.contentWidth),n=Math.round(b.Ng*100/b.contentHeight),l=Math.round(b.Lc*100/b.contentHeight);this.En.style.opacity=b.Lt.toString();this.En.style.left=b.Qn+"px";this.En.style.right=(c?b.gh:0)+b.Qn+"px";this.En.style.height=
b.gh+"px";this.En.style.bottom=b.Rn+"px";this.qt.style.backgroundColor=b.Kt;this.qt.style.borderRadius=Math.floor(b.gh/2)+"px";this.qt.style.left=f+"%";this.qt.style.width=d+"%";this.qt.style.height=b.gh+"px";this.ao.style.opacity=b.Lt.toString();this.ao.style.top=b.Rn+"px";this.ao.style.right=b.Qn+"px";this.ao.style.width=b.gh+"px";this.ao.style.bottom=(c?b.gh:0)+b.Rn+"px";this.$t.style.backgroundColor=b.Kt;this.$t.style.borderRadius=Math.floor(b.gh/2)+"px";this.$t.style.top=l+"%";this.$t.style.width=
b.gh+"px";this.$t.style.height=n+"%"}};return e}(p)});define("tdv/view/core//visualprops/ImageVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties","tdv/view/constants/Alignment"],function(a,m,k,p){return function(h){function g(){var e=h!==null&&h.apply(this,arguments)||this;e.image=null;e.sh=p.$a;e.verticalAlign=p.Pd;e.contentWidth=0;e.contentHeight=0;return e}P(g,h);return g}(k)});
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,k,p,h,g){return function(e){function b(){var c=e.call(this)||this;c.FD=null;return c}P(b,e);b.prototype.hp=function(){return new p};b.prototype.Dz=function(){e.prototype.Dz.call(this);this.kk(this.fIa())};b.prototype.fIa=function(){this.FD||(this.FD=document.createElement("div"),
this.FD.style.position="static",this.FD.style.overflow="hidden",this.FD.style.cursor="inherit");return this.FD};b.prototype.hh=function(c){e.prototype.hh.call(this,c);this.gqa(c)};b.prototype.gqa=function(c){if(c.image!==this.J.image&&(this.J.image&&this.FD.removeChild(this.J.image),c.image)){var d=c.image;this.FD.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";h.Rb()==h.Ap&&h.yb()&&(d.style.transform="translate3d(0,0,0)")}if(c.image!==this.J.image||c.contentWidth!==this.J.contentWidth||c.contentHeight!==this.J.contentHeight||c.width!==this.J.width||c.height!==this.J.height||c.Bd!==this.J.Bd||c.ze!==this.J.ze||c.ge!==this.J.ge||c.Af!==this.J.Af||c.borderTopLeftRadius!==this.J.borderTopLeftRadius||c.borderTopRightRadius!==this.J.borderTopRightRadius||
c.borderBottomRightRadius!==this.J.borderBottomRightRadius||c.borderBottomLeftRadius!==this.J.borderBottomLeftRadius||c.Oe!==this.J.Oe||c.tf!==this.J.tf||c.sf!==this.J.sf||c.Ne!==this.J.Ne||c.sh!==this.J.sh||c.verticalAlign!==this.J.verticalAlign){d=[Math.max(0,c.borderTopLeftRadius-Math.max(c.Oe,c.Ne)),Math.max(0,c.borderTopRightRadius-Math.max(c.Oe,c.tf)),Math.max(0,c.borderBottomRightRadius-Math.max(c.sf,c.tf)),Math.max(0,c.borderBottomLeftRadius-Math.max(c.sf,c.Ne))];var f=c.width-c.Bd-c.ze,n=
c.height-c.ge-c.Af,l=this.fIa();l.style.width=f+"px";l.style.height=n+"px";l.style.borderTopLeftRadius=d[0]+"px";l.style.borderTopRightRadius=d[1]+"px";l.style.borderBottomRightRadius=d[2]+"px";l.style.borderBottomLeftRadius=d[3]+"px";if(c.image){c.image.style.width=c.contentWidth+"px";c.image.style.height=c.contentHeight+"px";switch(c.sh){case g.$a:c.image.style.marginLeft="0px";c.image.style.marginRight=f-c.contentWidth+"px";break;case g.Cb:c.image.style.marginLeft=f-c.contentWidth+"px";c.image.style.marginRight=
"0px";break;case g.Xe: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 g.Tc:c.image.style.marginTop="0px";c.image.style.marginBottom=n-c.contentHeight+"px";break;case g.Fc:c.image.style.marginTop=n-c.contentHeight+"px";c.image.style.marginBottom="0px";break;case g.Pd:c.image.style.marginTop=Math.floor((n-c.contentHeight)*.5)+"px",c.image.style.marginBottom=Math.ceil((n-c.contentHeight)*.5)+
"px"}}}};return b}(k)});
define("tdv/view/core/visuals/dom/DOMLabelVisuals","require exports 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,k,p,h,g,e){return function(b){function c(){var d=b.call(this)||this;d.span=null;return d}P(c,b);c.prototype.LI=function(){var d=this.span.clientWidth,f=this.span.clientHeight;this.span.style.fontStyle==="italic"&&(d+=f*1/5);return Math.round(d)};
c.prototype.KI=function(){return this.span.clientHeight};c.prototype.hp=function(){return new p};c.prototype.Dz=function(){b.prototype.Dz.call(this);this.kk(this.Ybb())};c.prototype.Ybb=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};
c.prototype.hh=function(d){b.prototype.hh.call(this,d);this.tqa(d)};c.prototype.tqa=function(d){var f=!1;if(d.direction!==this.J.direction||d.text!==this.J.text){switch(d.direction){case g.Tj:this.span.style.lineHeight="100%";this.span.innerHTML=d.text.split("").join("<br/>");break;default:this.span.style.lineHeight="normal",this.span.textContent=d.text,this.span.innerHTML=this.span.innerHTML.split(" ").join("&nbsp;")}f=!0}d.fontFamily!==this.J.fontFamily&&(this.span.style.fontFamily=e.Lz(d.fontFamily||
""),f=!0);d.fontSize!==this.J.fontSize&&(this.span.style.fontSize=d.fontSize!==void 0?d.fontSize+"px":"",f=!0);d.it!==this.J.it&&(this.span.style.color=d.it||"",f=!0);d.fontWeight!==this.J.fontWeight&&(this.span.style.fontWeight=d.fontWeight,f=!0);d.fontStyle!==this.J.fontStyle&&(this.span.style.fontStyle=d.fontStyle,f=!0);d.textDecoration!==this.J.textDecoration&&(this.span.style.textDecoration=d.textDecoration,f=!0);if(f||d.width!==this.J.width||d.height!==this.J.height||d.Bd!==this.J.Bd||d.ze!==
this.J.ze||d.ge!==this.J.ge||d.Af!==this.J.Af||d.sh!==this.J.sh||d.verticalAlign!==this.J.verticalAlign){f=d.width-d.Bd-d.ze;var n=d.height-d.ge-d.Af,l=this.LI(),q=this.KI();switch(d.sh){case h.$a:this.span.style.left="0";break;case h.Cb:this.span.style.left=f-l+"px";break;case h.Xe:this.span.style.left=Math.max(0,Math.round((f-l)*.5))+"px"}switch(d.verticalAlign){case h.Tc:this.span.style.top="0";break;case h.Fc:this.span.style.top=n-q+"px";break;case h.Pd:this.span.style.top=Math.max(0,Math.round((n-
q)*.5))+"px"}}if(d.Vt!==this.J.Vt||d.Wt!==this.J.Wt||d.Yn!==this.J.Yn||d.Ew!==this.J.Ew||d.Dw!==this.J.Dw)this.span.style.textShadow=[d.Vt+"px",d.Wt+"px",d.Yn+"px","rgba("+parseInt("0x"+d.Dw.substring(1,2))+", "+parseInt("0x"+d.Dw.substring(3,2))+", "+parseInt("0x"+d.Dw.substring(5,2))+", "+d.Ew+")"].join(" ")};return c}(k)});
define("tdv/view/core//visualprops/HTMLVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,k){return function(p){function h(){var g=p!==null&&p.apply(this,arguments)||this;g.nd=null;return g}P(h,p);return h}(k)});
define("tdv/view/core/visuals/dom/DOMHTMLVisuals",["require","exports","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core//visualprops/HTMLVisualProperties"],function(a,m,k,p){return function(h){function g(){return h.call(this)||this}P(g,h);g.prototype.hp=function(){return new p};g.prototype.hh=function(e){h.prototype.hh.call(this,e);this.fqa(e)};g.prototype.fqa=function(e){if(e.nd!==this.J.nd&&(this.J.nd&&this.X7(this.J.nd),e.nd)){var b=e.nd;b.style.position="absolute";b.style.left="0";
b.style.top="0";this.kk(e.nd)}};g.prototype.Xla=function(){return this.J&&this.J.nd?this.J.nd.clientWidth:0};g.prototype.Wla=function(){return this.J&&this.J.nd?this.J.nd.clientHeight:0};return g}(k)});define("tdv/view/core/visuals/VisualsType",["require","exports"],function(){return{DOM:"DOM",KQa:"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,k,p,h,g,e,b,c,d,f,n,l,q,r){return function(){function t(){}t.prototype.create=function(u){if(u instanceof l)return new b;if(u instanceof c)return new p;if(u instanceof n)return new g;if(u instanceof q)return new e;if(u instanceof f)return new h;if(u instanceof d)return new k;throw Error("Invalid UI instance");};t.prototype.getType=function(){return r.DOM};t.HI=function(){t.El||(t.El=new t);return t.El};return t}()});
define("tdv/view/events/GestureEvent",["require","exports","tdv/events/Event"],function(a,m,k){return function(p){function h(g,e,b,c,d,f,n,l){g=p.call(this,g)||this;g.scale=typeof e==="number"?e:1;g.rotation=typeof b==="number"?b:0;g.x=c||0;g.y=d||0;g.pageX=f||0;g.pageY=n||0;g.touches=l||[];return g}P(h,p);return h}(k)});
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,k,p,h,g,e,b,c){a=function(){function l(q){this.q_=[];this.jya=0;this.qXa=500;this.Vc=1;this.al=0;this.component=q;this.aS=this.aS.bind(this);this.dS=this.dS.bind(this);this.Q0=this.Q0.bind(this);this.Dfa=this.Dfa.bind(this);
this.qU=this.qU.bind(this);this.pU=this.pU.bind(this);this.YC=this.YC.bind(this)}l.prototype.Jdb=function(){return h.br()};l.prototype.MNa=function(q){this.wR!==q&&((this.wR=q)?this.mG():this.gG(),this.yta())};l.prototype.iIa=function(){return this.wR||!1};l.prototype.wa=function(){return this.component.wa()};l.prototype.JDa=function(q,r){this.component.o(new b(p.Ra,q.x,q.y,q.pageX,q.pageY,void 0,void 0,r))};l.prototype.KDa=function(q,r){this.component.o(new b(p.mb,q.x,q.y,q.pageX,q.pageY,void 0,
void 0,r))};l.prototype.LDa=function(q,r){this.component.o(new b(p.bb,q.x,q.y,q.pageX,q.pageY,void 0,void 0,r))};l.prototype.W6a=function(q,r,t){this.component.o(new b(p.tr,q.x,q.y,q.pageX,q.pageY,r.delta,r.SN,t))};l.prototype.GDa=function(q){this.component.o(new b(p.oa,q.x,q.y,q.pageX,q.pageY))};l.prototype.HDa=function(q){this.component.o(new b(p.Ik,q.x,q.y,q.pageX,q.pageY))};l.prototype.V6a=function(q,r,t){this.component.o(new e(p.$A,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};l.prototype.R6a=function(q,
r,t){this.component.o(new e(p.B$,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};l.prototype.S6a=function(q,r,t){this.component.o(new e(p.hK,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};l.prototype.T6a=function(q){this.component.o(new e(p.rRa,void 0,q))};l.prototype.U6a=function(q){this.component.o(new e(p.iK,q))};l.prototype.Cn=function(){var q=this.component.getParent();if(q)return q.gIa()};l.prototype.qU=function(q){q.stopImmediatePropagation();this.Oca(["touchend"]);this.uxa(q)?this.iBa(q):this.pBa(q,!0)};
l.prototype.pBa=function(q,r){var t,u=this.BG(q);r&&this.J6a(u);this.JDa(u,q);(t=this.Cn())===null||t===void 0||t.pBa(q,r&&this.component.get("propagateClick"))};l.prototype.pU=function(q){q.preventDefault();q.stopImmediatePropagation();this.uxa(q)?this.gBa(q):this.oBa(q)};l.prototype.oBa=function(q){var r,t=this.BG(q);this.I6a(t);this.KDa(t,q);(r=this.Cn())===null||r===void 0||r.oBa(q)};l.prototype.wda=function(q,r){var t=q.pageX-r.pageX;q=q.pageY-r.pageY;return Math.sqrt(t*t+q*q)};l.prototype.YC=
function(q,r){this.rca(["touchend"]);r!==!1&&q.preventDefault();q.stopImmediatePropagation();this.AM?this.hBa(q):(r=this.BG(q),this.nBa(q,this.txa(r)),this.ixa(r));this.AM=void 0;this.yta()};l.prototype.nBa=function(q,r){var t,u=this.BG(q);this.LDa(u,q);this.H6a(r);(t=this.Cn())===null||t===void 0||t.nBa(q,r)};l.prototype.J6a=function(q){this.component.bind(p.Db,this.zDa,this,!0);this.UH=q};l.prototype.I6a=function(q){if(this.UH){q=this.wda(this.UH,q);if(h.yb()){var r=this.component.Wb();r=Math.min(r.cb(),
r.Kb())*.01*l.jTa}else r=l.pTa;q>r&&this.O3()}};l.prototype.H6a=function(q){this.UH&&(this.GDa(this.UH),q&&this.HDa(this.UH),this.O3())};l.prototype.O3=function(){this.UH&&(this.component.h(p.Db,this.zDa,this),this.UH=void 0)};l.prototype.zDa=function(){this.O3()};l.prototype.iBa=function(q){var r,t=this.Dda(q);this.AM=t;this.V6a(t.scale,t.rotation,t.coordinates);(r=this.Cn())===null||r===void 0||r.iBa(q)};l.prototype.gBa=function(q){var r,t=this.Dda(q,this.AM),u=t.rotation-this.AM.rotation,v=t.scale/
this.AM.scale;this.AM=t;this.Vc*=v;for(this.al+=u;this.al>180;)this.al-=360;for(;this.al<-180;)this.al+=360;this.R6a(this.Vc,this.al,t.coordinates);u!=0&&this.T6a(this.al);v!=1&&this.U6a(this.Vc);this.O3();(r=this.Cn())===null||r===void 0||r.gBa(q)};l.prototype.hBa=function(q){var r,t=this.Dda(q);this.S6a(this.Vc,this.al,t.coordinates);(r=this.Cn())===null||r===void 0||r.hBa(q)};l.prototype.aS=function(q){this.Oca(["mouseup"]);q.stopImmediatePropagation();this.jBa(q,!0);f&&this.component.log(q.ctrlKey)};
l.prototype.jBa=function(q,r){var t,u=this.zG(q);r&&this.RVa(u);this.JDa(u,q);(t=this.Cn())===null||t===void 0||t.jBa(q,r&&this.component.get("propagateClick"))};l.prototype.dS=function(q){q.preventDefault();q.stopImmediatePropagation();this.component.Wb().lE(this.component);this.kBa(q)};l.prototype.kBa=function(q){var r,t=this.zG(q);this.QVa(t);this.KDa(t,q);(r=this.Cn())===null||r===void 0||r.kBa(q)};l.prototype.Q0=function(q){this.rca(["mouseup"]);q.preventDefault();q.stopImmediatePropagation();
var r=this.zG(q);this.lBa(q,this.txa(r));this.ixa(r)};l.prototype.lBa=function(q,r){var t,u=this.zG(q);this.LDa(u);this.PVa(r);(t=this.Cn())===null||t===void 0||t.lBa(q,r)};l.prototype.RVa=function(q){this.component.bind(p.Db,this.qua,this,!0);this.cG=q};l.prototype.QVa=function(q){this.cG&&this.wda(this.cG,q)>l.aTa&&this.Cba()};l.prototype.PVa=function(q){this.cG&&(this.GDa(this.cG),q&&this.HDa(this.cG),this.Cba())};l.prototype.Cba=function(){this.cG&&(this.component.h(p.Db,this.qua,this),this.cG=
void 0)};l.prototype.qua=function(){this.Cba()};l.prototype.uxa=function(q){if((q=this.Ada(q))&&q.length>1)for(var r=0,t=0;t<q.length;t++)if(this.S_a(q[t].target)&&(r++,r>1))return!0;return!1};l.prototype.S_a=function(q){for(var r=this.wa().ac();q;){if(q==r)return!0;q=q.parentNode}return!1};l.prototype.tba=function(){return!1};l.prototype.Dfa=function(q){this.component.Wb().kya&&(q.preventDefault(),q.stopImmediatePropagation(),this.mBa(q))};l.prototype.mBa=function(q){var r,t=this.zG(q),u=this.pZa(q);
this.tba(u)||(r=this.Cn())===null||r===void 0||r.mBa(q);this.W6a(t,u,q)};l.prototype.zG=function(q){return this.awa(q.pageX,q.pageY)};l.prototype.pZa=function(q){var r={};r.delta=Math.max(-1,Math.min(1,-q.deltaY));r.SN=r.delta;return r};l.prototype.awa=function(q,r){var t,u=k.offset(this.wa().ac()),v=((t=this.component.Wb())===null||t===void 0?void 0:t.AC)||1;t={};t.x=(q-u.left)/v;t.y=(r-u.top)/v;t.pageX=q/v;t.pageY=r/v;t.YD=q;t.ZD=r;return t};l.prototype.Dda=function(q,r){var t=this.BG(q);return r?
(q=this.kwa(q),{coordinates:t,scale:r.scale*q/r.touchesDistance,rotation:0,touchesDistance:q}):{coordinates:t,scale:1,rotation:0,touchesDistance:this.kwa(q)}};l.prototype.BG=function(q){var r=this.Ada(q);if(r.length==0)var t=this.O2a;else t={x:0,y:0,pageX:0,pageY:0,YD:0,ZD:0,touches:[]},Array.from(r).forEach(function(u){u||(u=r[0]);u=this.awa(u.pageX,u.pageY);t.x+=u.x;t.y+=u.y;t.pageX+=u.pageX;t.pageY+=u.pageY;t.YD+=u.YD;t.ZD+=u.ZD;t.touches.push(u)}.bind(this)),t.x/=r.length,t.y/=r.length,t.pageX/=
r.length,t.pageY/=r.length,t.YD/=r.length,t.ZD/=r.length;return this.O2a=t};l.prototype.Ada=function(q){return q.touches||q.targetTouches||q.changedTouches};l.prototype.kwa=function(q){var r=this.Ada(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};l.prototype.yta=function(){this.wa().ac().style["pointer-events"]=this.Hwa()};l.prototype.Hwa=function(){return this.wR?"auto":"none"};l.prototype.mG=function(){this.Oca(d)};l.prototype.gG=
function(){this.rca(d)};l.prototype.Oca=function(q){n.includes(this.component)||n.push(this.component);this.q_=k.union(this.q_,q);q=this.jwa(q);for(var r=0;r<q.length;r++){var t=q[r];t.target.addEventListener(t.name,t.handler)}};l.prototype.rca=function(q){n.includes(this.component)&&n.splice(n.indexOf(this.component),1);this.q_=k.difference(this.q_,q);q=this.jwa(q);for(var r=0;r<q.length;r++){var t=q[r];t.target.removeEventListener(t.name,t.handler)}};l.prototype.jwa=function(q){this.Bva||(this.Bva=
this.TYa());for(var r=[],t=0;t<q.length;t++)r=r.concat(this.Bva[q[t]]);return r};l.prototype.TYa=function(){var q=this.wa().ac();return{touchstart:[{target:q,name:"touchstart",handler:c.Dm(this.qU)}],touchmove:[{target:q,name:"touchmove",handler:c.Dm(this.pU)}],touchend:[{target:q,name:"touchend",handler:c.Dm(this.YC,!0)},{target:document,name:"touchend",handler:c.Dm(this.YC,!0)},{target:q,name:"touchcancel",handler:c.Dm(this.YC,!0)},{target:document,name:"touchcancel",handler:c.Dm(this.YC,!0)}],
mousedown:[{target:q,name:"mousedown",handler:c.Dm(this.aS)}],mousemove:[{target:q,name:"mousemove",handler:c.Dm(this.dS)}],mouseup:[{target:q,name:"mouseup",handler:c.Dm(this.Q0,!0)},{target:window,name:"mouseup",handler:c.Dm(this.Q0,!0)}],mousewheel:[{target:q,name:"wheel",handler:c.Dm(this.Dfa)}]}};l.prototype.ixa=function(q){this.jya=(new Date).getTime();this.iya=q};l.prototype.txa=function(q){if((new Date).getTime()-this.jya>this.qXa||!this.iya)return!1;q=this.wda(this.iya,q);if(h.yb()){var r=
this.component.Wb();r=Math.min(r.cb(),r.Kb())*.01*l.iTa}else r=l.bTa;return q>r?!1:!0};l.pTa=10;l.jTa=5;l.aTa=10;l.iTa=10;l.bTa=10;return l}();var d=function(){var l=[];l=l.concat(["touchstart","touchmove"]);h.Od()!=h.fj&&(l=l.concat(["mousedown","mousemove","mousewheel"]));return l}(),f=g.Kg("debug"),n=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,k,p,h){return function(g){function e(b){var c=g.call(this,b)||this;c.component=b;c.Fx=0;c.Gx=0;c.Wkb=void 0;c.Xkb=void 0;c.yua=0;c.Kba=void 0;c.Lba=void 0;c.Mba=0;c.Nba=0;c.bn=!1;c.cn=!1;c.$B=c.$B.bind(c);c.dD=c.dD.bind(c);c.xla();return c}P(e,g);e.prototype.xla=
function(){this.wa().R5().addEventListener("mousedown",this.$B,!1);this.wa().R5().addEventListener("touchstart",this.$B,!1);this.wa().f6().addEventListener("mousedown",this.dD,!1);this.wa().f6().addEventListener("touchstart",this.dD,!1);this.Jdb()?this.component.bind(k.Ra,this.zua,this,!1):(this.component.bind(k.Ra,this.ZVa,this,!1),this.component.bind(k.rc,this.Iba,this,!1),this.component.bind(k.Db,this.Hba,this,!1),this.component.bind(k.tr,this.$Va,this,!1))};e.prototype.wa=function(){return this.component.wa()};
e.prototype.$B=function(){this.component.yw(!0);this.bn=!0};e.prototype.dD=function(){this.component.zw(!0);this.cn=!0};e.prototype.Iba=function(){this.component.wE(!0)};e.prototype.Hba=function(){this.component.wE(!1)};e.prototype.ZVa=function(b){this.component.bn||this.component.cn?(this.component.Wb().bind(k.mb,this.wua,this,!1),this.component.Wb().bind(k.bb,this.xua,this,!1),this.Fx=b.pageX,this.Gx=b.pageY):this.zua(b)};e.prototype.wua=function(b){var c=0,d=0;this.bn&&(c=(b.pageX-this.Fx)/this.wa().En.clientWidth);
this.cn&&(d=(b.pageY-this.Gx)/this.wa().ao.clientHeight);this.Fx=b.pageX;this.Gx=b.pageY;c==0&&d==0||this.component.GO(c,d,"content")};e.prototype.xua=function(){this.component.Wb().h(k.mb,this.wua,this);this.component.Wb().h(k.bb,this.xua,this);this.component.yw(!1);this.component.zw(!1);this.cn=this.bn=!1};e.prototype.tba=function(b){return b.delta>0&&this.component.MN()||b.delta<0&&this.component.KN()?!0:!1};e.prototype.$Va=function(b){b=(h.Od()==h.NY?b.SN*.1:b.delta)*.3;this.component.GO(0,-b,
"page")};e.prototype.zua=function(b){if(this.component.LN()||this.component.NN())this.component.Wb().bind(k.mb,this.Aua,this,!1),this.component.Wb().bind(k.bb,this.Bua,this,!1),this.component.wE(!0),this.Fx=b.pageX,this.Gx=b.pageY,this.w_a()};e.prototype.Aua=function(b){var c=b.pageX-this.Fx,d=b.pageY-this.Gx;!this.bn&&!this.cn&&c*c+d*d>25&&(this.bn=this.component.LN(),this.cn=this.component.NN(),this.component.yw(this.bn),this.component.zw(this.cn));if(this.bn||this.cn)this.component.GO(this.bn?
-c:0,this.cn?-d:0),this.Fx=b.pageX,this.Gx=b.pageY,this.v7a()};e.prototype.Bua=function(){this.component.Wb().h(k.mb,this.Aua,this);this.component.Wb().h(k.bb,this.Bua,this);this.component.wE(!1);var b=Math.max(Math.abs(this.Mba/.001),Math.abs(this.Nba/.001));this.component.wFa(-.5*this.Mba*b,-.5*this.Nba*b,b)};e.prototype.w_a=function(){this.Kba=this.Fx;this.Lba=this.Gx};e.prototype.v7a=function(){var b=(new Date).getTime(),c=b-this.yua;c>10&&(this.yua=b,this.Mba=(this.Fx-this.Kba)/c,this.Nba=(this.Gx-
this.Lba)/c,this.Kba=this.Fx,this.Lba=this.Gx)};return e}(p)});
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,k,p,h){return function(g){function e(b){b=g.call(this,b)||this;b.zy=b.zy.bind(b);return b}P(e,g);e.prototype.mG=function(){g.prototype.mG.call(this);h.vka(this.zy)};e.prototype.gG=function(){g.prototype.gG.call(this);h.poa(this.zy)};e.prototype.zy=
function(){this.component.o(k.oa)};return e}(p)});
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,k,p,h){return function(g){function e(b){b=g.call(this,b)||this;b.component.ek.bind(k.Cd,b.M1a,b,!1);b.component.ek.bind(k.sd,b.L1a,b,!0);b.component.bind(k.VA,b.YL,b,!0);b.zy=b.zy.bind(b);return b}P(e,g);e.prototype.M1a=function(){h.tFa(this,[this.component.he.wa().ac()].concat(this.component.ek.qIa().map(function(b){return b.wa().ac()})));
h.vka(this.zy)};e.prototype.L1a=function(){h.poa(this.zy);h.ooa(this)};e.prototype.YL=function(){h.ndb([this.component.he.wa().ac()].concat(this.component.ek.qIa().map(function(b){return b.wa().ac()})))&&this.component.he.wa().ac().focus()};e.prototype.zy=function(){this.component.close()};return e}(p)});
define("tdv/view/core/eventmanager/mousetouch/HTMLMouseTouchEventManager",["require","exports","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager"],function(a,m,k){return function(p){function h(){return p!==null&&p.apply(this,arguments)||this}P(h,p);h.prototype.YC=function(g,e){for(e=g.target;e&&e.tagName!="A"&&e.tagName!="BUTTON";)e=e.parentElement;e=!e;p.prototype.YC.call(this,g,e)};return h}(k)});
define("tdv/view/core/eventmanager/mousetouch/IconButtonMouseTouchEventManager",["require","exports","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","tdv/view/constants/Cursor"],function(a,m,k,p){return function(h){function g(e){var b=h.call(this,e)||this;b.pU=function(c){var d=b.BG(c);b.C6(d)?h.prototype.pU.call(b,c):b.Lva(d,c)};b.aS=function(c){var d=b.zG(c);b.C6(d)?h.prototype.aS.call(b,c):b.Lva(d,c)};b.hda=!1;b.lxa=!1;return b}P(g,h);g.prototype.NNa=function(e){this.lxa=e};g.prototype.wa=
function(){return this.component.wa()};g.prototype.qU=function(e){var b=this.BG(e);this.C6(b)?h.prototype.qU.call(this,e):this.oYa(b,e)};g.prototype.dS=function(e){var b=this.zG(e);if(this.C6(b)||this.hda)h.prototype.dS.call(this,e),this.component.H7();else{this.hda=!0;if(b=this.Bda(b))b.dispatchEvent(this.rua(e)),e.preventDefault(),e.stopImmediatePropagation();this.hwa(b)=="pointer"?this.component.H7(p.hf):this.component.H7(p.gf);this.hda=!1}};g.prototype.C6=function(e){return this.lxa||this.component.udb(e)};
g.prototype.Lva=function(e,b){if(e=this.Bda(e))e.dispatchEvent(this.rua(b)),b.preventDefault(),b.stopImmediatePropagation()};g.prototype.oYa=function(e,b){if(e=this.Bda(e))e.dispatchEvent(this.TVa(b)),b.preventDefault(),b.stopImmediatePropagation()};g.prototype.Bda=function(e){var b=this;this.wa().ac().style.pointerEvents="none";e=document.elementFromPoint(e.YD,e.ZD);setTimeout(function(){b.wa().ac().style.pointerEvents=b.Hwa()},0);return e};g.prototype.rua=function(e){return new MouseEvent(e.type,
e)};g.prototype.TVa=function(e){return new TouchEvent(e.type,e)};g.prototype.hwa=function(e){if(e){var b=e.style.cursor;b=="inherit"&&(b=this.hwa(e.parentElement))}else b="default";return b};return g}(k)});
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,k,p,h,g){return function(e){function b(c){c=e.call(this,c)||this;c.component.bind(k.K("layout"),c.cga,c,!1);c.component.bind(k.K("items"),c.aga,c,!1);return c}P(b,e);b.prototype.mG=function(){e.prototype.mG.call(this);
this.qz()};b.prototype.gG=function(){e.prototype.gG.call(this);this.qz()};b.prototype.cga=function(){this.qz()};b.prototype.aga=function(){this.qz()};b.prototype.qz=function(){this.wR?this.component.get("layout")==g.Wh?h.$8a(this,this.component.Ab().map(function(c){return c.wa().ac()})):h.tFa(this,this.component.Ab().map(function(c){return c.wa().ac()})):h.ooa(this)};return b}(p)});
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,k,p,h){return function(g){function e(b){b=g.call(this,b)||this;b.component.bind(k.K("layout"),b.cga,b,!1);b.component.bind(k.K("items"),b.aga,b,!1);return b}P(e,g);e.prototype.mG=function(){g.prototype.mG.call(this);this.qz()};e.prototype.gG=function(){g.prototype.gG.call(this);
this.qz()};e.prototype.cga=function(){this.qz()};e.prototype.aga=function(){this.qz()};e.prototype.qz=function(){this.wR?h.X8a(this,this.component.Ab().map(function(b){return b.wa().ac()}),this.component.Wm.OBa,this.component.Wm.tua):h.ooa(this)};return e}(p)});
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,k,p,h,g,e,b,c,d,f,n,l,q,r){return function(t){function u(){var v=t.call(this)||
this;v.Ef=null;v.Wa=null;v.YF=[];v.set("ariaRole","option");v.set("autoRolledOver",!0);v.set("childrenInteractionEnabled",!1);v.set("contentOpaque",!0);v.set("creationPolicy",e.mK);v.set("cursor",b.hf);return v}P(u,t);u.prototype.Nb=function(){t.prototype.Nb.call(this);this.j("listLayout");this.j("overflow","hidden");this.j("item");this.j("thumbnailUrlFunction",this.nca);this.j("sourceProperties");this.j("labelFunction",this.lca);this.j("labelFontFamily");this.j("labelFontColor");this.j("labelFontSize");
this.j("labelFontStyle");this.j("labelFontWeight");this.j("labelGap");this.j("labelHorizontalAlign");this.j("labelPosition");this.j("labelTextDecoration");this.j("labelTextShadowColor");this.j("labelTextShadowHorizontalLength");this.j("labelTextShadowVerticalLength");this.j("labelTextShadowBlurRadius");this.j("labelTextShadowOpacity");this.j("thumbnailBorderRadius");this.j("thumbnailOpacity");this.j("thumbnailBorderSize");this.j("thumbnailBorderColor");this.j("thumbnailWidth");this.j("thumbnailHeight");
this.j("thumbnailMaxWidth");this.j("thumbnailMaxHeight");this.j("thumbnailShadow");this.j("thumbnailShadowHorizontalLength");this.j("thumbnailShadowVerticalLength");this.j("thumbnailShadowBlurRadius");this.j("thumbnailShadowSpread");this.j("thumbnailShadowColor");this.j("thumbnailShadowOpacity");this.D("rollOverBackgroundOpacity",n.fa,"backgroundOpacity");this.D("rollOverBackgroundColor",n.fa,"backgroundColor");this.D("rollOverBackgroundColorRatios",n.fa,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",
n.fa,"backgroundColorDirection");this.D("rollOverBorderRadius",n.fa,"borderRadius");this.D("rollOverBorderTopRadius",n.fa,"borderTopRadius");this.D("rollOverBorderBottomRadius",n.fa,"borderBottomRadius");this.D("rollOverBorderLeftRadius",n.fa,"borderLeftRadius");this.D("rollOverBorderRightRadius",n.fa,"borderRightRadius");this.D("rollOverBorderTopLeftRadius",n.fa,"borderTopLeftRadius");this.D("rollOverBorderTopRightRadius",n.fa,"borderTopRightRadius");this.D("rollOverBorderBottomLeftRadius",n.fa,
"borderBottomLeftRadius");this.D("rollOverBorderBottomRightRadius",n.fa,"borderBottomRightRadius");this.D("rollOverBorderSize",n.fa,"borderSize");this.D("rollOverBorderLeftSize",n.fa,"borderLeftSize");this.D("rollOverBorderTopSize",n.fa,"borderTopSize");this.D("rollOverBorderRightSize",n.fa,"borderRightSize");this.D("rollOverBorderBottomSize",n.fa,"borderBottomSize");this.D("rollOverBorderColor",n.fa,"borderColor");this.D("rollOverBorderLeftColor",n.fa,"borderLeftColor");this.D("rollOverBorderTopColor",
n.fa,"borderTopColor");this.D("rollOverBorderRightColor",n.fa,"borderRightColor");this.D("rollOverBorderBottomColor",n.fa,"borderBottomColor");this.D("rollOverLabelFontColor",n.fa,"labelFontColor");this.D("rollOverLabelFontSize",n.fa,"labelFontSize");this.D("rollOverLabelFontStyle",n.fa,"labelFontStyle");this.D("rollOverLabelFontWeight",n.fa,"labelFontWeight");this.D("rollOverLabelTextDecoration",n.fa,"labelTextDecoration");this.D("rollOverLabelTextShadowColor",n.fa,"labelTextShadowColor");this.D("rollOverLabelTextShadowHorizontalLength",
n.fa,"labelTextShadowHorizontalLength");this.D("rollOverLabelTextShadowVerticalLength",n.fa,"labelTextShadowVerticalLength");this.D("rollOverLabelTextShadowBlurRadius",n.fa,"labelTextShadowBlurRadius");this.D("rollOverLabelTextShadowOpacity",n.fa,"labelTextShadowOpacity");this.D("rollOverOpacity",n.fa,"opacity");this.D("rollOverPaddingLeft",n.fa,"paddingLeft");this.D("rollOverPaddingTop",n.fa,"paddingTop");this.D("rollOverPaddingRight",n.fa,"paddingRight");this.D("rollOverPaddingBottom",n.fa,"paddingBottom");
this.D("rollOverShadow",n.fa,"shadow");this.D("rollOverThumbnailOpacity",n.fa,"thumbnailOpacity");this.D("rollOverThumbnailBorderSize",n.fa,"thumbnailBorderSize");this.D("rollOverThumbnailBorderColor",n.fa,"thumbnailBorderColor");this.D("rollOverThumbnailShadow",n.fa,"thumbnailShadow");this.D("rollOverThumbnailShadowHorizontalLength",n.fa,"thumbnailShadowHorizontalLength");this.D("rollOverThumbnailShadowVerticalLength",n.fa,"thumbnailShadowVerticalLength");this.D("rollOverThumbnailShadowBlurRadius",
n.fa,"thumbnailShadowBlurRadius");this.D("rollOverThumbnailShadowSpread",n.fa,"thumbnailShadowSpread");this.D("rollOverThumbnailShadowColor",n.fa,"thumbnailShadowColor");this.D("rollOverThumbnailShadowOpacity",n.fa,"thumbnailShadowOpacity");this.D("selectedBackgroundOpacity",n.qa,"backgroundOpacity");this.D("selectedBackgroundColor",n.qa,"backgroundColor");this.D("selectedBackgroundColorRatios",n.qa,"backgroundColorRatios");this.D("selectedBackgroundColorDirection",n.qa,"backgroundColorDirection");
this.D("selectedBorderRadius",n.qa,"borderRadius");this.D("selectedBorderTopRadius",n.qa,"borderTopRadius");this.D("selectedBorderBottomRadius",n.qa,"borderBottomRadius");this.D("selectedBorderLeftRadius",n.qa,"borderLeftRadius");this.D("selectedBorderRightRadius",n.qa,"borderRightRadius");this.D("selectedBorderTopLeftRadius",n.qa,"borderTopLeftRadius");this.D("selectedBorderTopRightRadius",n.qa,"borderTopRightRadius");this.D("selectedBorderBottomLeftRadius",n.qa,"borderBottomLeftRadius");this.D("selectedBorderBottomRightRadius",
n.qa,"borderBottomRightRadius");this.D("selectedBorderSize",n.qa,"borderSize");this.D("selectedBorderLeftSize",n.qa,"borderLeftSize");this.D("selectedBorderTopSize",n.qa,"borderTopSize");this.D("selectedBorderRightSize",n.qa,"borderRightSize");this.D("selectedBorderBottomSize",n.qa,"borderBottomSize");this.D("selectedBorderColor",n.qa,"borderColor");this.D("selectedBorderLeftColor",n.qa,"borderLeftColor");this.D("selectedBorderTopColor",n.qa,"borderTopColor");this.D("selectedBorderRightColor",n.qa,
"borderRightColor");this.D("selectedBorderBottomColor",n.qa,"borderBottomColor");this.D("selectedLabelFontColor",n.qa,"labelFontColor");this.D("selectedLabelFontSize",n.qa,"labelFontSize");this.D("selectedLabelFontStyle",n.qa,"labelFontStyle");this.D("selectedLabelFontWeight",n.qa,"labelFontWeight");this.D("selectedLabelTextDecoration",n.qa,"labelTextDecoration");this.D("selectedLabelTextShadowColor",n.qa,"labelTextShadowColor");this.D("selectedLabelTextShadowHorizontalLength",n.qa,"labelTextShadowHorizontalLength");
this.D("selectedLabelTextShadowVerticalLength",n.qa,"labelTextShadowVerticalLength");this.D("selectedLabelTextShadowBlurRadius",n.qa,"labelTextShadowBlurRadius");this.D("selectedLabelTextShadowOpacity",n.qa,"labelTextShadowOpacity");this.D("selectedOpacity",n.qa,"opacity");this.D("selectedPaddingLeft",n.qa,"paddingLeft");this.D("selectedPaddingTop",n.qa,"paddingTop");this.D("selectedPaddingRight",n.qa,"paddingRight");this.D("selectedPaddingBottom",n.qa,"paddingBottom");this.D("selectedShadow",n.qa,
"shadow");this.D("selectedThumbnailOpacity",n.qa,"thumbnailOpacity");this.D("selectedThumbnailBorderSize",n.qa,"thumbnailBorderSize");this.D("selectedThumbnailBorderColor",n.qa,"thumbnailBorderColor");this.D("selectedThumbnailShadow",n.qa,"thumbnailShadow");this.D("selectedThumbnailShadowHorizontalLength",n.qa,"thumbnailShadowHorizontalLength");this.D("selectedThumbnailShadowVerticalLength",n.qa,"thumbnailShadowVerticalLength");this.D("selectedThumbnailShadowBlurRadius",n.qa,"thumbnailShadowBlurRadius");
this.D("selectedThumbnailShadowSpread",n.qa,"thumbnailShadowSpread");this.D("selectedThumbnailShadowColor",n.qa,"thumbnailShadowColor");this.D("selectedThumbnailShadowOpacity",n.qa,"thumbnailShadowOpacity")};u.prototype.MX=function(v){this.PT(v)};u.prototype.Ib=function(){t.prototype.Ib.call(this);this.Ef||(this.Ef=new q,this.hb(this.Ef),this.Ef.set("horizontalAlign",g.Xe),this.Ef.set("verticalAlign",g.Pd),this.Ef.bind(h.ha,this.Pia,this,!1));this.Wa||(this.Wa=new r,this.hb(this.Wa))};u.prototype.nca=
function(v){if(k.Yz(v))return v;if(v&&v.Wpa)return v.Wpa};u.prototype.lca=function(v){if(v&&v.label)return v.label};u.prototype.xx=function(){return this.Wa&&this.Wa.get("text")||t.prototype.xx.call(this)};u.prototype.eb=function(){if(this.S("sourceProperties")||this.S("item")){for(;this.YF.length;)this.YF.pop().EE();var v=this.G("sourceProperties"),w=this.G("item");v&&w&&v.forEach(function(x){this.YF.push(p.Fw(w,x,this.mga,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.Ef.get("url")!=v&&this.Ef.xa({url:v,visible:!0,opacity:.5}):this.Ef.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.Wa.xa({text:v,visible:v?!0:!1}),this.$("labelFunction");
this.$("sourceProperties");this.$("item");if(this.S("listLayout"))switch(this.G("listLayout")){case c.Tj: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 y=this;v=function(x,z){x=y.G(x);x===void 0&&(x=z);return x};switch(this.G("labelPosition")){case d.$a:case d.Cb:this.set("layout",c.Wh);this.Wa.set("width","100%");switch(this.G("listLayout")){case c.Tj:this.Ef.xa({height:v("thumbnailHeight"),
width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Hk)});break;default:this.Ef.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Hk)})}break;default:switch(this.set("layout",c.Tj),this.Wa.set("width",void 0),this.G("listLayout")){case c.Tj:this.Ef.xa({height:v("thumbnailHeight"),width:v("thumbnailWidth","100%"),scaleMode:v("thumbnailScaleMode",f.Ep)});break;default:this.Ef.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),
scaleMode:v("thumbnailScaleMode",f.Hk)})}}switch(this.G("labelPosition")){case d.$a:case d.Tc:this.Vq(this.Wa,0);break;default:this.Vq(this.Wa,1)}this.$("labelPosition")}this.$("listLayout");this.Oc(u.maa,u.fQ,[this],!0,!0);this.Oc(u.oaa,u.fQ,[this.Ef],!0,!0);this.Oc(u.naa,u.fQ,[this.Wa],!0,!0);t.prototype.eb.call(this)};u.prototype.mga=function(){this.TC("item")};u.prototype.KH=function(v){t.prototype.KH.call(this,v)};u.prototype.Pia=function(){this.Ef.set("opacity",1)};u.maa=["labelGap"];u.oaa=
"thumbnailBorderColor thumbnailBorderRadius thumbnailBorderSize thumbnailMaxWidth thumbnailMaxHeight thumbnailOpacity thumbnailShadow thumbnailShadowHorizontalLength thumbnailShadowVerticalLength thumbnailShadowBlurRadius thumbnailShadowSpread thumbnailShadowColor thumbnailShadowOpacity".split(" ");u.naa="labelFontFamily labelFontColor labelFontSize labelFontStyle labelFontWeight labelHorizontalAlign labelTextDecoration labelTextShadowColor labelTextShadowHorizontalLength labelTextShadowVerticalLength labelTextShadowBlurRadius labelTextShadowOpacity".split(" ");
u.fQ={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}(l)});
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,k,p,h,g,e,b,c,d){return function(f){function n(){var l=f.call(this)||this;l.vn=!1;l.set("ariaRole","listbox");l.set("contentOpaque",!0);l.bind(h.K("selectedIndex"),l.O3a,l,!1);l.bind(h.Yb,
l.B6a,l,!1);return l}P(n,f);n.prototype.Nb=function(){f.prototype.Nb.call(this);this.j("layout",g.Wh);this.j("selectedIndex",-1);this.j("items",[]);this.j("overflow",e.zr);this.j("itemHorizontalAlign",p.Xe);this.j("itemLabelFontFamily");this.j("itemLabelPosition",b.Fc);this.j("itemLabelFunction");this.j("itemLabelGap");this.j("itemLabelHorizontalAlign",p.Xe);this.j("itemThumbnailBorderRadius");this.j("itemThumbnailScaleMode");this.j("itemThumbnailWidth");this.j("itemThumbnailHeight");this.j("itemThumbnailMaxWidth");
this.j("itemThumbnailMaxHeight");this.j("itemThumbnailUrlFunction");this.j("itemTooltipFunction");this.j("itemSourceProperties");this.j("itemVerticalAlign",p.Pd);this.j("itemBackgroundOpacity");this.j("itemBackgroundColor");this.j("itemBackgroundColorRatios");this.j("itemBackgroundColorDirection");this.j("itemBorderRadius");this.j("itemBorderTopRadius");this.j("itemBorderBottomRadius");this.j("itemBorderLeftRadius");this.j("itemBorderRightRadius");this.j("itemBorderTopLeftRadius");this.j("itemBorderTopRightRadius");
this.j("itemBorderBottomLeftRadius");this.j("itemBorderBottomRightRadius");this.j("itemBorderSize");this.j("itemBorderLeftSize");this.j("itemBorderTopSize");this.j("itemBorderRightSize");this.j("itemBorderBottomSize");this.j("itemBorderColor");this.j("itemBorderLeftColor");this.j("itemBorderTopColor");this.j("itemBorderRightColor");this.j("itemBorderBottomColor");this.j("itemLabelFontColor");this.j("itemLabelFontSize");this.j("itemLabelFontStyle");this.j("itemLabelFontWeight");this.j("itemLabelTextDecoration");
this.j("itemLabelTextShadowColor");this.j("itemLabelTextShadowHorizontalLength");this.j("itemLabelTextShadowVerticalLength");this.j("itemLabelTextShadowBlurRadius");this.j("itemLabelTextShadowOpacity");this.j("itemOpacity");this.j("itemPaddingLeft");this.j("itemPaddingTop");this.j("itemPaddingRight");this.j("itemPaddingBottom");this.j("itemShadow");this.j("itemThumbnailOpacity");this.j("itemThumbnailBorderSize");this.j("itemThumbnailBorderColor");this.j("itemThumbnailShadow");this.j("itemThumbnailShadowHorizontalLength");
this.j("itemThumbnailShadowVerticalLength");this.j("itemThumbnailShadowBlurRadius");this.j("itemThumbnailShadowSpread");this.j("itemThumbnailShadowColor");this.j("itemThumbnailShadowOpacity");this.j("rollOverItemBackgroundOpacity");this.j("rollOverItemBackgroundColor");this.j("rollOverItemBackgroundColorRatios");this.j("rollOverItemBackgroundColorDirection");this.j("rollOverItemBorderRadius");this.j("rollOverItemBorderTopRadius");this.j("rollOverItemBorderBottomRadius");this.j("rollOverItemBorderLeftRadius");
this.j("rollOverItemBorderRightRadius");this.j("rollOverItemBorderTopLeftRadius");this.j("rollOverItemBorderTopRightRadius");this.j("rollOverItemBorderBottomLeftRadius");this.j("rollOverItemBorderBottomRightRadius");this.j("rollOverItemBorderSize");this.j("rollOverItemBorderLeftSize");this.j("rollOverItemBorderTopSize");this.j("rollOverItemBorderRightSize");this.j("rollOverItemBorderBottomSize");this.j("rollOverItemBorderColor");this.j("rollOverItemBorderLeftColor");this.j("rollOverItemBorderTopColor");
this.j("rollOverItemBorderRightColor");this.j("rollOverItemBorderBottomColor");this.j("rollOverItemLabelFontSize");this.j("rollOverItemLabelFontStyle");this.j("rollOverItemLabelFontWeight");this.j("rollOverItemLabelTextDecoration");this.j("rollOverItemLabelTextShadowColor");this.j("rollOverItemLabelTextShadowHorizontalLength");this.j("rollOverItemLabelTextShadowVerticalLength");this.j("rollOverItemLabelTextShadowBlurRadius");this.j("rollOverItemLabelTextShadowOpacity");this.j("rollOverItemOpacity");
this.j("rollOverItemPaddingLeft");this.j("rollOverItemPaddingTop");this.j("rollOverItemPaddingRight");this.j("rollOverItemPaddingBottom");this.j("rollOverItemShadow");this.j("rollOverItemThumbnailOpacity");this.j("rollOverItemThumbnailBorderSize");this.j("rollOverItemThumbnailBorderColor");this.j("rollOverItemThumbnailShadow");this.j("rollOverItemThumbnailShadowHorizontalLength");this.j("rollOverItemThumbnailShadowVerticalLength");this.j("rollOverItemThumbnailShadowBlurRadius");this.j("rollOverItemThumbnailShadowSpread");
this.j("rollOverItemThumbnailShadowColor");this.j("rollOverItemThumbnailShadowOpacity");this.j("selectedItemBackgroundOpacity");this.j("selectedItemBackgroundColor");this.j("selectedItemBackgroundColorRatios");this.j("selectedItemBackgroundColorDirection");this.j("selectedItemBorderRadius");this.j("selectedItemBorderTopRadius");this.j("selectedItemBorderBottomRadius");this.j("selectedItemBorderLeftRadius");this.j("selectedItemBorderRightRadius");this.j("selectedItemBorderTopLeftRadius");this.j("selectedItemBorderTopRightRadius");
this.j("selectedItemBorderBottomLeftRadius");this.j("selectedItemBorderBottomRightRadius");this.j("selectedItemBorderSize");this.j("selectedItemBorderLeftSize");this.j("selectedItemBorderTopSize");this.j("selectedItemBorderRightSize");this.j("selectedItemBorderBottomSize");this.j("selectedItemBorderColor");this.j("selectedItemBorderLeftColor");this.j("selectedItemBorderTopColor");this.j("selectedItemBorderRightColor");this.j("selectedItemBorderBottomColor");this.j("selectedItemLabelFontSize");this.j("selectedItemLabelFontStyle");
this.j("selectedItemLabelFontWeight");this.j("selectedItemLabelTextDecoration");this.j("selectedItemLabelTextShadowColor");this.j("selectedItemLabelTextShadowHorizontalLength");this.j("selectedItemLabelTextShadowVerticalLength");this.j("selectedItemLabelTextShadowBlurRadius");this.j("selectedItemLabelTextShadowOpacity");this.j("selectedItemOpacity");this.j("selectedItemPaddingLeft");this.j("selectedItemPaddingTop");this.j("selectedItemPaddingRight");this.j("selectedItemPaddingBottom");this.j("selectedItemShadow");
this.j("selectedItemThumbnailOpacity");this.j("selectedItemThumbnailBorderSize");this.j("selectedItemThumbnailBorderColor");this.j("selectedItemThumbnailShadow");this.j("selectedItemThumbnailShadowHorizontalLength");this.j("selectedItemThumbnailShadowVerticalLength");this.j("selectedItemThumbnailShadowBlurRadius");this.j("selectedItemThumbnailShadowSpread");this.j("selectedItemThumbnailShadowColor");this.j("selectedItemThumbnailShadowOpacity")};n.prototype.ER=function(l){this.vn=!0;this.set("selectedIndex",
this.Hda(l.source))};n.prototype.O3a=function(){this.XBa()};n.prototype.B6a=function(){setTimeout(function(){this.XBa()}.bind(this),100)};n.prototype.XBa=function(){var l=this.get("selectedIndex"),q=this.Ab();l>=0&&l<q.length&&this.scrollIntoView(q[l])};n.prototype.Hda=function(l){for(var q=this.Ab(),r=0;r<q.length;r++)if(q[r]==l)return r;return-1};n.prototype.eb=function(){if(this.S("layout")){var l=this.G("layout");l!=g.Tj&&l!=g.Wh&&this.set("layout",g.Wh)}var q=!1;if(this.S("items")){q=!0;l=this.G("items")||
[];var r=this.Ab();if(r.length<l.length){for(var t=r.length;t<l.length;t++)r=new d,r.bind(h.oa,this.ER,this,!1),this.Oc(n.cQ,n.BF,[r],!1,!1),this.Oc(n.dQ,n.CF,[r],!1,!1),this.hb(r);r=this.Ab()}if(r.length>l.length){for(t=l.length;t<r.length;t++){var u=r[t];u.h(h.oa,this.ER,this);this.removeChild(u)}r=this.Ab()}for(t=0;t<l.length;t++)r[t].set("item",l[t]);this.$("items")}if(this.S("selectedIndex")||q){l=this.Ab();q=Math.min(l.length-1,Math.max(-1,this.G("selectedIndex")));this.set("selectedIndex",
q);for(t=0;t<l.length;t++)l[t].MX(t==q);this.$("selectedIndex");this.vn&&(this.vn=!1,this.o(new k(h.V)))}this.Oc(n.cQ,n.BF,this.Ab(),!0,!1);this.Oc(n.dQ,n.CF,this.Ab(),!0,!0);f.prototype.eb.call(this)};n.BF={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",shadowBlurRadius:"shadowBlurRadius",shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};n.CF={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",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",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",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"};n.cQ=Object.keys(n.BF);n.dQ=Object.keys(n.CF);return n}(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,k,p,h,g,e,b,c,d,f,n,l,q,r){return function(t){function u(){var v=t.call(this)||
this;v.Ef=null;v.Wa=null;v.YF=[];v.set("ariaRole","option");v.set("autoRolledOver",!0);v.set("childrenInteractionEnabled",!1);v.set("contentOpaque",!0);v.set("creationPolicy",e.mK);v.set("cursor",b.hf);return v}P(u,t);u.prototype.Nb=function(){t.prototype.Nb.call(this);this.j("overflow","hidden");this.j("item");this.j("thumbnailUrlFunction",this.nca);this.j("sourceProperties");this.j("labelFunction",this.lca);this.j("labelFontFamily");this.j("labelFontColor");this.j("labelFontSize");this.j("labelFontStyle");
this.j("labelFontWeight");this.j("labelGap");this.j("labelHorizontalAlign");this.j("labelMaxWidth");this.j("labelPosition");this.j("labelTextDecoration");this.j("labelTextShadowColor");this.j("labelTextShadowHorizontalLength");this.j("labelTextShadowVerticalLength");this.j("labelTextShadowBlurRadius");this.j("labelTextShadowOpacity");this.j("thumbnailBorderRadius");this.j("thumbnailOpacity");this.j("thumbnailBorderSize");this.j("thumbnailBorderColor");this.j("thumbnailWidth");this.j("thumbnailHeight");
this.j("thumbnailMaxWidth");this.j("thumbnailMaxHeight");this.j("thumbnailShadow");this.j("thumbnailShadowHorizontalLength");this.j("thumbnailShadowVerticalLength");this.j("thumbnailShadowBlurRadius");this.j("thumbnailShadowSpread");this.j("thumbnailShadowColor");this.j("thumbnailShadowOpacity");this.D("rollOverBackgroundOpacity",n.fa,"backgroundOpacity");this.D("rollOverBackgroundColor",n.fa,"backgroundColor");this.D("rollOverBackgroundColorRatios",n.fa,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",
n.fa,"backgroundColorDirection");this.D("rollOverBorderRadius",n.fa,"borderRadius");this.D("rollOverBorderTopRadius",n.fa,"borderTopRadius");this.D("rollOverBorderBottomRadius",n.fa,"borderBottomRadius");this.D("rollOverBorderLeftRadius",n.fa,"borderLeftRadius");this.D("rollOverBorderRightRadius",n.fa,"borderRightRadius");this.D("rollOverBorderTopLeftRadius",n.fa,"borderTopLeftRadius");this.D("rollOverBorderTopRightRadius",n.fa,"borderTopRightRadius");this.D("rollOverBorderBottomLeftRadius",n.fa,
"borderBottomLeftRadius");this.D("rollOverBorderBottomRightRadius",n.fa,"borderBottomRightRadius");this.D("rollOverBorderSize",n.fa,"borderSize");this.D("rollOverBorderLeftSize",n.fa,"borderLeftSize");this.D("rollOverBorderTopSize",n.fa,"borderTopSize");this.D("rollOverBorderRightSize",n.fa,"borderRightSize");this.D("rollOverBorderBottomSize",n.fa,"borderBottomSize");this.D("rollOverBorderColor",n.fa,"borderColor");this.D("rollOverBorderLeftColor",n.fa,"borderLeftColor");this.D("rollOverBorderTopColor",
n.fa,"borderTopColor");this.D("rollOverBorderRightColor",n.fa,"borderRightColor");this.D("rollOverBorderBottomColor",n.fa,"borderBottomColor");this.D("rollOverLabelFontColor",n.fa,"labelFontColor");this.D("rollOverLabelFontSize",n.fa,"labelFontSize");this.D("rollOverLabelFontStyle",n.fa,"labelFontStyle");this.D("rollOverLabelFontWeight",n.fa,"labelFontWeight");this.D("rollOverLabelTextDecoration",n.fa,"labelTextDecoration");this.D("rollOverLabelTextShadowColor",n.fa,"labelTextShadowColor");this.D("rollOverLabelTextShadowHorizontalLength",
n.fa,"labelTextShadowHorizontalLength");this.D("rollOverLabelTextShadowVerticalLength",n.fa,"labelTextShadowVerticalLength");this.D("rollOverLabelTextShadowBlurRadius",n.fa,"labelTextShadowBlurRadius");this.D("rollOverLabelTextShadowOpacity",n.fa,"labelTextShadowOpacity");this.D("rollOverOpacity",n.fa,"opacity");this.D("rollOverPaddingLeft",n.fa,"paddingLeft");this.D("rollOverPaddingTop",n.fa,"paddingTop");this.D("rollOverPaddingRight",n.fa,"paddingRight");this.D("rollOverPaddingBottom",n.fa,"paddingBottom");
this.D("rollOverShadow",n.fa,"shadow");this.D("rollOverThumbnailOpacity",n.fa,"thumbnailOpacity");this.D("rollOverThumbnailBorderSize",n.fa,"thumbnailBorderSize");this.D("rollOverThumbnailBorderColor",n.fa,"thumbnailBorderColor");this.D("rollOverThumbnailShadow",n.fa,"thumbnailShadow");this.D("rollOverThumbnailShadowHorizontalLength",n.fa,"thumbnailShadowHorizontalLength");this.D("rollOverThumbnailShadowVerticalLength",n.fa,"thumbnailShadowVerticalLength");this.D("rollOverThumbnailShadowBlurRadius",
n.fa,"thumbnailShadowBlurRadius");this.D("rollOverThumbnailShadowSpread",n.fa,"thumbnailShadowSpread");this.D("rollOverThumbnailShadowColor",n.fa,"thumbnailShadowColor");this.D("rollOverThumbnailShadowOpacity",n.fa,"thumbnailShadowOpacity");this.D("selectedBackgroundOpacity",n.qa,"backgroundOpacity");this.D("selectedBackgroundColor",n.qa,"backgroundColor");this.D("selectedBackgroundColorRatios",n.qa,"backgroundColorRatios");this.D("selectedBackgroundColorDirection",n.qa,"backgroundColorDirection");
this.D("selectedBorderRadius",n.qa,"borderRadius");this.D("selectedBorderTopRadius",n.qa,"borderTopRadius");this.D("selectedBorderBottomRadius",n.qa,"borderBottomRadius");this.D("selectedBorderLeftRadius",n.qa,"borderLeftRadius");this.D("selectedBorderRightRadius",n.qa,"borderRightRadius");this.D("selectedBorderTopLeftRadius",n.qa,"borderTopLeftRadius");this.D("selectedBorderTopRightRadius",n.qa,"borderTopRightRadius");this.D("selectedBorderBottomLeftRadius",n.qa,"borderBottomLeftRadius");this.D("selectedBorderBottomRightRadius",
n.qa,"borderBottomRightRadius");this.D("selectedBorderSize",n.qa,"borderSize");this.D("selectedBorderLeftSize",n.qa,"borderLeftSize");this.D("selectedBorderTopSize",n.qa,"borderTopSize");this.D("selectedBorderRightSize",n.qa,"borderRightSize");this.D("selectedBorderBottomSize",n.qa,"borderBottomSize");this.D("selectedBorderColor",n.qa,"borderColor");this.D("selectedBorderLeftColor",n.qa,"borderLeftColor");this.D("selectedBorderTopColor",n.qa,"borderTopColor");this.D("selectedBorderRightColor",n.qa,
"borderRightColor");this.D("selectedBorderBottomColor",n.qa,"borderBottomColor");this.D("selectedLabelFontColor",n.qa,"labelFontColor");this.D("selectedLabelFontSize",n.qa,"labelFontSize");this.D("selectedLabelFontStyle",n.qa,"labelFontStyle");this.D("selectedLabelFontWeight",n.qa,"labelFontWeight");this.D("selectedLabelTextDecoration",n.qa,"labelTextDecoration");this.D("selectedLabelTextShadowColor",n.qa,"labelTextShadowColor");this.D("selectedLabelTextShadowHorizontalLength",n.qa,"labelTextShadowHorizontalLength");
this.D("selectedLabelTextShadowVerticalLength",n.qa,"labelTextShadowVerticalLength");this.D("selectedLabelTextShadowBlurRadius",n.qa,"labelTextShadowBlurRadius");this.D("selectedLabelTextShadowOpacity",n.qa,"labelTextShadowOpacity");this.D("selectedOpacity",n.qa,"opacity");this.D("selectedPaddingLeft",n.qa,"paddingLeft");this.D("selectedPaddingTop",n.qa,"paddingTop");this.D("selectedPaddingRight",n.qa,"paddingRight");this.D("selectedPaddingBottom",n.qa,"paddingBottom");this.D("selectedShadow",n.qa,
"shadow");this.D("selectedThumbnailOpacity",n.qa,"thumbnailOpacity");this.D("selectedThumbnailBorderSize",n.qa,"thumbnailBorderSize");this.D("selectedThumbnailBorderColor",n.qa,"thumbnailBorderColor");this.D("selectedThumbnailShadow",n.qa,"thumbnailShadow");this.D("selectedThumbnailShadowHorizontalLength",n.qa,"thumbnailShadowHorizontalLength");this.D("selectedThumbnailShadowVerticalLength",n.qa,"thumbnailShadowVerticalLength");this.D("selectedThumbnailShadowBlurRadius",n.qa,"thumbnailShadowBlurRadius");
this.D("selectedThumbnailShadowSpread",n.qa,"thumbnailShadowSpread");this.D("selectedThumbnailShadowColor",n.qa,"thumbnailShadowColor");this.D("selectedThumbnailShadowOpacity",n.qa,"thumbnailShadowOpacity")};u.prototype.MX=function(v){this.PT(v)};u.prototype.Ib=function(){t.prototype.Ib.call(this);this.Ef||(this.Ef=new q,this.hb(this.Ef),this.Ef.set("horizontalAlign",g.Xe),this.Ef.set("verticalAlign",g.Pd),this.Ef.bind(h.ha,this.Pia,this,!1));this.Wa||(this.Wa=new r,this.hb(this.Wa))};u.prototype.nca=
function(v){if(k.Yz(v))return v;if(v&&v.Wpa)return v.Wpa};u.prototype.lca=function(v){if(v&&v.label)return v.label};u.prototype.xx=function(){return this.Wa&&this.Wa.get("text")||t.prototype.xx.call(this)};u.prototype.eb=function(){if(this.S("sourceProperties")||this.S("item")){for(;this.YF.length;)this.YF.pop().EE();var v=this.G("sourceProperties"),w=this.G("item");v&&w&&v.forEach(function(x){this.YF.push(p.Fw(w,x,this.mga,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.Ef.get("url")!=v&&this.Ef.xa({url:v,visible:!0,opacity:.5}):this.Ef.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.Wa.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 y=this;v=function(x,z){x=y.G(x);return x!==void 0?x:z};switch(this.G("labelPosition")){case d.$a:case d.Cb:this.set("layout",c.Wh);this.Wa.set("width","100%");this.Ef.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Hk)});break;default:this.set("layout",c.Tj),this.Wa.set("width","100%"),this.Ef.xa({height:v("thumbnailHeight",
"100%"),width:v("thumbnailWidth","100%"),scaleMode:v("thumbnailScaleMode",f.Hk)})}switch(this.G("labelPosition")){case d.$a:case d.Tc:this.Vq(this.Wa,0);break;default:this.Vq(this.Wa,1)}this.$("labelPosition")}this.Oc(u.maa,u.Ssa,[this],!0,!0);this.Oc(u.oaa,u.Vsa,[this.Ef],!0,!0);this.Oc(u.naa,u.Usa,[this.Wa],!0,!0);t.prototype.eb.call(this)};u.prototype.mga=function(){this.TC("item")};u.prototype.KH=function(v){t.prototype.KH.call(this,v)};u.prototype.Pia=function(){this.Ef.set("opacity",1)};u.Ssa=
{labelGap:"gap"};u.maa=Object.keys(u.Ssa);u.Usa={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.naa=Object.keys(u.Usa);u.Vsa={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.oaa=Object.keys(u.Vsa);return u}(l)});
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,k,p,h,g,e,b,c,d){return function(f){function n(){var l=f.call(this)||this;l.vn=!1;l.set("contentOpaque",!0);l.set("ariaRole","listbox");return l}P(n,f);n.prototype.Nb=function(){f.prototype.Nb.call(this);
this.j("layout",g.bB);this.j("selectedIndex",-1);this.j("items",[]);this.j("overflow",e.zr);this.j("itemHorizontalAlign",p.Xe);this.j("itemLabelFontFamily");this.j("itemLabelPosition",b.Fc);this.j("itemLabelFunction");this.j("itemLabelMaxWidth");this.j("itemLabelGap");this.j("itemLabelHorizontalAlign",p.Xe);this.j("itemSourceProperties");this.j("itemThumbnailBorderRadius");this.j("itemThumbnailScaleMode");this.j("itemThumbnailWidth");this.j("itemThumbnailHeight");this.j("itemThumbnailMaxWidth");this.j("itemThumbnailMaxHeight");
this.j("itemThumbnailUrlFunction");this.j("itemTooltipFunction");this.j("itemVerticalAlign",p.Pd);this.j("itemBackgroundOpacity");this.j("itemBackgroundColor");this.j("itemBackgroundColorRatios");this.j("itemBackgroundColorDirection");this.j("itemBorderRadius");this.j("itemBorderTopRadius");this.j("itemBorderBottomRadius");this.j("itemBorderLeftRadius");this.j("itemBorderRightRadius");this.j("itemBorderTopLeftRadius");this.j("itemBorderTopRightRadius");this.j("itemBorderBottomLeftRadius");this.j("itemBorderBottomRightRadius");
this.j("itemBorderSize");this.j("itemBorderLeftSize");this.j("itemBorderTopSize");this.j("itemBorderRightSize");this.j("itemBorderBottomSize");this.j("itemBorderColor");this.j("itemBorderLeftColor");this.j("itemBorderTopColor");this.j("itemBorderRightColor");this.j("itemBorderBottomColor");this.j("itemLabelFontColor");this.j("itemLabelFontSize");this.j("itemLabelFontStyle");this.j("itemLabelFontWeight");this.j("itemLabelMaxWidth");this.j("itemLabelTextDecoration");this.j("itemLabelTextShadowColor");
this.j("itemLabelTextShadowHorizontalLength");this.j("itemLabelTextShadowVerticalLength");this.j("itemLabelTextShadowBlurRadius");this.j("itemLabelTextShadowOpacity");this.j("itemOpacity");this.j("itemPaddingLeft");this.j("itemPaddingTop");this.j("itemPaddingRight");this.j("itemPaddingBottom");this.j("itemShadow");this.j("itemThumbnailOpacity");this.j("itemThumbnailBorderSize");this.j("itemThumbnailBorderColor");this.j("itemThumbnailShadow");this.j("itemThumbnailShadowHorizontalLength");this.j("itemThumbnailShadowVerticalLength");
this.j("itemThumbnailShadowBlurRadius");this.j("itemThumbnailShadowSpread");this.j("itemThumbnailShadowColor");this.j("itemThumbnailShadowOpacity");this.j("rollOverItemBackgroundOpacity");this.j("rollOverItemBackgroundColor");this.j("rollOverItemBackgroundColorRatios");this.j("rollOverItemBackgroundColorDirection");this.j("rollOverItemBorderRadius");this.j("rollOverItemBorderTopRadius");this.j("rollOverItemBorderBottomRadius");this.j("rollOverItemBorderLeftRadius");this.j("rollOverItemBorderRightRadius");
this.j("rollOverItemBorderTopLeftRadius");this.j("rollOverItemBorderTopRightRadius");this.j("rollOverItemBorderBottomLeftRadius");this.j("rollOverItemBorderBottomRightRadius");this.j("rollOverItemBorderSize");this.j("rollOverItemBorderLeftSize");this.j("rollOverItemBorderTopSize");this.j("rollOverItemBorderRightSize");this.j("rollOverItemBorderBottomSize");this.j("rollOverItemBorderColor");this.j("rollOverItemBorderLeftColor");this.j("rollOverItemBorderTopColor");this.j("rollOverItemBorderRightColor");
this.j("rollOverItemBorderBottomColor");this.j("rollOverItemLabelFontSize");this.j("rollOverItemLabelFontStyle");this.j("rollOverItemLabelFontWeight");this.j("rollOverItemLabelTextDecoration");this.j("rollOverItemLabelTextShadowColor");this.j("rollOverItemLabelTextShadowHorizontalLength");this.j("rollOverItemLabelTextShadowVerticalLength");this.j("rollOverItemLabelTextShadowBlurRadius");this.j("rollOverItemLabelTextShadowOpacity");this.j("rollOverItemOpacity");this.j("rollOverItemPaddingLeft");this.j("rollOverItemPaddingTop");
this.j("rollOverItemPaddingRight");this.j("rollOverItemPaddingBottom");this.j("rollOverItemShadow");this.j("rollOverItemThumbnailOpacity");this.j("rollOverItemThumbnailBorderSize");this.j("rollOverItemThumbnailBorderColor");this.j("rollOverItemThumbnailShadow");this.j("rollOverItemThumbnailShadowHorizontalLength");this.j("rollOverItemThumbnailShadowVerticalLength");this.j("rollOverItemThumbnailShadowBlurRadius");this.j("rollOverItemThumbnailShadowSpread");this.j("rollOverItemThumbnailShadowColor");
this.j("rollOverItemThumbnailShadowOpacity");this.j("selectedItemBackgroundOpacity");this.j("selectedItemBackgroundColor");this.j("selectedItemBackgroundColorRatios");this.j("selectedItemBackgroundColorDirection");this.j("selectedItemBorderRadius");this.j("selectedItemBorderTopRadius");this.j("selectedItemBorderBottomRadius");this.j("selectedItemBorderLeftRadius");this.j("selectedItemBorderRightRadius");this.j("selectedItemBorderTopLeftRadius");this.j("selectedItemBorderTopRightRadius");this.j("selectedItemBorderBottomLeftRadius");
this.j("selectedItemBorderBottomRightRadius");this.j("selectedItemBorderSize");this.j("selectedItemBorderLeftSize");this.j("selectedItemBorderTopSize");this.j("selectedItemBorderRightSize");this.j("selectedItemBorderBottomSize");this.j("selectedItemBorderColor");this.j("selectedItemBorderLeftColor");this.j("selectedItemBorderTopColor");this.j("selectedItemBorderRightColor");this.j("selectedItemBorderBottomColor");this.j("selectedItemLabelFontSize");this.j("selectedItemLabelFontStyle");this.j("selectedItemLabelFontWeight");
this.j("selectedItemLabelTextDecoration");this.j("selectedItemLabelTextShadowColor");this.j("selectedItemLabelTextShadowHorizontalLength");this.j("selectedItemLabelTextShadowVerticalLength");this.j("selectedItemLabelTextShadowBlurRadius");this.j("selectedItemLabelTextShadowOpacity");this.j("selectedItemOpacity");this.j("selectedItemPaddingLeft");this.j("selectedItemPaddingTop");this.j("selectedItemPaddingRight");this.j("selectedItemPaddingBottom");this.j("selectedItemShadow");this.j("selectedItemThumbnailOpacity");
this.j("selectedItemThumbnailBorderSize");this.j("selectedItemThumbnailBorderColor");this.j("selectedItemThumbnailShadow");this.j("selectedItemThumbnailShadowHorizontalLength");this.j("selectedItemThumbnailShadowVerticalLength");this.j("selectedItemThumbnailShadowBlurRadius");this.j("selectedItemThumbnailShadowSpread");this.j("selectedItemThumbnailShadowColor");this.j("selectedItemThumbnailShadowOpacity")};n.prototype.ER=function(l){this.vn=!0;this.set("selectedIndex",this.Hda(l.source))};n.prototype.Hda=
function(l){for(var q=this.Ab(),r=0;r<q.length;r++)if(q[r]==l)return r;return-1};n.prototype.eb=function(){this.S("layout")&&this.G("layout")!=g.bB&&this.set("layout",g.bB);var l=!1;if(this.S("items")){l=!0;var q=this.G("items")||[],r=this.Ab();if(r.length<q.length){for(var t=r.length;t<q.length;t++)r=new d,r.bind(h.oa,this.ER,this,!1),this.Oc(n.cQ,n.BF,[r],!1,!1),this.Oc(n.dQ,n.CF,[r],!1,!1),this.hb(r);r=this.Ab()}if(r.length>q.length){for(t=q.length;t<r.length;t++){var u=r[t];u.h(h.oa,this.ER,this);
this.removeChild(u)}r=this.Ab()}for(t=0;t<q.length;t++)r[t].set("item",q[t]);this.$("items")}if(this.S("selectedIndex")||l){q=this.Ab();l=Math.min(q.length-1,Math.max(-1,this.G("selectedIndex")));this.set("selectedIndex",l);for(t=0;t<q.length;t++)q[t].MX(t==l);this.$("selectedIndex");this.vn&&(this.vn=!1,this.o(new k(h.V)))}this.Oc(n.cQ,n.BF,this.Ab(),!0,!1);this.Oc(n.dQ,n.CF,this.Ab(),!0,!0);f.prototype.eb.call(this)};n.BF={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",
shadowBlurRadius:"shadowBlurRadius",shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};n.CF={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",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",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",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"};n.cQ=Object.keys(n.BF);n.dQ=Object.keys(n.CF);
return n}(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,k,p,h,g,e,b,c,d,f,n,l,q,r,t,u,v){return function(){function w(){}w.prototype.create=function(y){if(y instanceof n)return new p(y);if(y instanceof v)return new d(y);if(y instanceof u)return new c(y);if(y instanceof f)return new k(y);if(y instanceof r)return new e(y);if(y instanceof q)return new g(y);if(y instanceof t)return new b(y);if(y instanceof l)return new h(y);throw Error("Invalid UI instance");};w.HI=function(){w.El||(w.El=new w);return w.El};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,k,p,h,g,e,b,c,d,f,n,l,q,r,t){return function(u){function v(w,y){var x=u.call(this)||this;x.M_=x.M_.bind(x);x.L_=x.L_.bind(x);x.b1=x.b1.bind(x);x.LL=new c;x.kca=new e(x);x.Wn(x,r.HI(),t.HI(),[]);x.cf("Application");x.Mc=w;x.m4=y;x.Mc.style.overflow="hidden";x.Mc.style.userSelect="none";x.Mc.style["-webkit-user-select"]="none";x.Mc.style.touchAction="none";x.Mc.style.visibility="visible";x.Mc.style["-webkit-tap-highlight-color"]="rgba(255, 255, 255, 0)";x.Ld=document.createElement("div");x.Ld.style.position=
"absolute";x.Ld.style.left="0";x.Ld.style.top="0";x.Ld.style.right="0";x.Ld.style.bottom="0";x.Ld.style.width="auto";x.Ld.style.height="auto";x.Ld.style.margin="0";x.Mc.appendChild(x.Ld);x.Ld.appendChild(x.wa().ac());x.Gg=void 0;x.Fg=void 0;x.K_a=10;x.vVa=500;x.BT=null;x.fc=new b(x);x.wa().ac().appendChild(x.fc.ac());x.OZ=new g(x,x.Zva.bind(x));x.OZ.bind(p.Ar,n.Dm(x.b1),x,!0);x.kya=!0;x.set("contentOpaque",!0);x.Ex=null;x.yQ=[];document.addEventListener("mousemove",x.L_);window.addEventListener("mouseout",
x.L_);x.CUa();x.u4=0;x.t4=0;x.AC=1;try{x.u4=window.top.innerWidth,x.t4=window.top.innerHeight,x.Zda=!0}catch(z){x.Zda=!1}x.LEa();x.ck=new d(w);x.ck.bind(p.V,function(){this.oda(this.ck.enabled())},x);l.Ya();return x}P(v,u);v.prototype.start=function(){this.Ks||(this.Ks=!0,this.o(p.Gp))};v.prototype.Vma=function(){return this.Ks};v.prototype.wa=function(){return u.prototype.wa.call(this)};v.prototype.LEa=function(){this.Zda&&!d.enabled()&&(this.u4=window.top.innerWidth,this.t4=window.top.innerHeight)};
v.prototype.clear=function(){var w,y;this.lE(null);this.kDa();this.DXa();this.LL.clear();var x=this.wa().ac();(w=x.parentElement)===null||w===void 0||w.removeChild(x);(y=this.Ld.parentElement)===null||y===void 0||y.removeChild(this.Ld);this.kca=null;this.ck.cqa();this.ck=null;this.OZ&&(this.OZ.clear(),this.OZ=null)};v.prototype.Vgb=function(w){this.kya=w};v.prototype.oda=function(w){w?this.hCa():this.GVa()};v.prototype.xy=function(){this.VR=this.$m=this.Ld.clientWidth||0;this.UR=this.Zm=this.Ld.clientHeight||
0};v.prototype.lE=function(w){if(this.Ex!=w){this.Ex&&this.Ex.get("id");this.Ex!=null&&this.Ex.o(new q(p.sr));this.Ex=w;for(var y=[];w!=null;)y=[w].concat(y),w=w.getParent();w=this.yQ.length-1;for(var x=!0;w>=0&&x;w--)y.includes(this.yQ[w])?x=!1:this.yQ[w].o(new q(p.Db));for(w=0;w<y.length;w++)this.yQ.includes(y[w])||y[w].o(new q(p.rc));this.yQ=y;this.Ex!=null&&this.Ex.o(new q(p.lF));this.fc.lE(this.Ex)}};v.prototype.L_=function(w){var y=k.offset(this.wa().ac());this.b0a(w,w.pageX-y.left,w.pageY-
y.top)?w.preventDefault():this.lE(null)};v.prototype.Zva=function(){return[]};v.prototype.b1=function(){};v.prototype.b0a=function(w,y,x){return this.W_a(w.target)&&y>=0&&x>=0&&y<this.cb()&&x<this.Kb()};v.prototype.W_a=function(w){if(!this.Mc)return!1;for(;w;){if(w===this.Mc)return!0;w=w.parentElement}return!1};v.prototype.CUa=function(){window.addEventListener("resize",this.M_);this.uba=setInterval(function(){this.gua()}.bind(this),this.vVa)};v.prototype.DXa=function(){window.removeEventListener("resize",
this.M_);this.uba&&(clearInterval(this.uba),this.uba=null)};v.prototype.gua=function(){this.ck.enabled()?this.hCa():this.LEa();var w=this.Ld.clientWidth,y=this.Ld.clientHeight;if(this.Gg!=w||this.Fg!=y)this.Gg=w,this.Fg=y,this.W5a()};v.prototype.hCa=function(){if(this.Zda&&(f.Od()==f.OA&&f.Rb()==f.Ap||f.Od()==f.fj)){var w=d.fullscreenElement(),y=w.clientWidth;w=w.clientHeight;var x=(y>w?y:w)/(this.u4>this.t4?this.u4:this.t4),z=Math.round(y/x),A=Math.round(w/x);this.AC=x;this.Ld.style.left=Math.round((y-
z)*.5)+"px";this.Ld.style.top=Math.round((w-A)*.5)+"px";this.Ld.style.right="auto";this.Ld.style.bottom="auto";this.Ld.style.width=z+"px";this.Ld.style.height=A+"px";this.Ld.style.transform="scale("+[x,x].join(", ")+")";this.Ld.style.position="absolute"}else y=document.body.clientWidth,w=document.body.clientHeight,this.Ld.style.left="0",this.Ld.style.top="0",this.Ld.style.right="auto",this.Ld.style.bottom="auto",this.Ld.style.width=y+"px",this.Ld.style.height=w+"px",this.AC=1};v.prototype.GVa=function(){this.Ld.style.position=
"absolute";this.Ld.style.left="0";this.Ld.style.top="0";this.Ld.style.right="0";this.Ld.style.bottom="0";this.Ld.style.width="auto";this.Ld.style.height="auto";this.Ld.style.transform="";this.AC=1};v.prototype.W5a=function(){this.kDa();var w=this;this.BT=setTimeout(function(){w.BT=null;w.jc()},this.K_a)};v.prototype.kDa=function(){this.BT&&(clearTimeout(this.BT),this.BT=null)};v.prototype.M_=function(){this.gua()};return v}(h)});
define("tdv/view/containers/XRPanels",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR"],function(a,m,k,p){return function(){function h(g){this.Wf=g;this.yP=[];this.uka=[];p.O.bind(k.V,this.kb,this,!0);this.gY()}h.prototype.dispose=function(){p.O.h(k.V,this.kb,this);this.set([])};h.prototype.set=function(g){var e=this,b=g.filter(function(d){return!e.yP.includes(d)}),c=this.yP.filter(function(d){return!g.includes(d)});b.forEach(function(d){d.Moa(e.Wf);e.n9a(d)});c.forEach(function(d){d.Moa(null);
e.Gfb(d);d.lla()});this.yP=g;this.gY()};h.prototype.get=function(){return this.yP};h.prototype.n9a=function(g){g.bind(k.K("modal"),this.gY,this,!0)};h.prototype.Gfb=function(g){g.h(k.K("modal"),this.gY,this)};h.prototype.kb=function(){this.gY()};h.prototype.gY=function(){var g=this,e=[];if(p.isPresenting){var b=this.yP.filter(function(d){return d.get("modal")}),c=this.yP.filter(function(d){return!d.get("modal")});e=b.length>0?[b[b.length-1]]:c}e.filter(function(d){return!g.uka.includes(d)}).forEach(function(d){return d.NGa()});
this.uka.filter(function(d){return!e.includes(d)}).forEach(function(d){return d.lla()});this.uka=e};return h}()});
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,k,p,h,g,e,b,c){function d(){q=TDV.ob.ot();var v=l||q;n!=v&&(n=v,f.o(g.V));v=!!l&&q!=l&&c.yb();r!=v&&(t||(t=document.createElement("div"),t.style.position="fixed",t.style.zIndex=k.jRa.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="'+p.YY+'"/>','<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)&&(h.enabled()?h.fullscreenElement():document.body).appendChild(t));r&&(u.style.transform=n==f.fSa?"translate(-11%, 0) rotate(-90deg)":"none")}var f=new e;f.tkb=TDV.ob.J$;f.fSa=TDV.ob.K$;f.xw=function(v){l!=v&&(l=v,d())};f.lIa=function(){return l};f.get=function(){return n};var n=void 0,l=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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/player/constants/RotationMode"),g=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"),n=a("tdv/player/view/DownloadBar"),l=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"),y=a("tdv/player/view/util/LibsLoader"),x=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"),E=a("tdv/view/containers/Application"),B=a("tdv/view/containers/Container"),C=a("tdv/view/containers/XRPanels"),I=a("tdv/view/containers/layout/VerticalLayout"),F=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"),S=g.define("Player",E,function(){E.apply(this,arguments);this.Wg=new w(this);this.jva=new n(this,this.Wg);this.Au=new B;this.Au.xa({backgroundOpacity:0,visible:!0,width:"100%",height:"100%"});this.RL=new l;this.mN=new q;this.RZ=new f(this);new d(this);this.J8a=new C(this);this.pka=[];var T=new I;T.A8(0);this.yX(T);this.cg(!0);this.bind(k.K("settings"),this.V1a,this,
!0);this.o4=TDV.ob.OIa();N.bind(k.V,this.E1a,this,!0);G.Hib();this.dVa=new c(this,"buttonMute",D.jf);this.dVa.bind(k.oa,this.Iza,this,!0);this.lVa=new c(this,"buttonUnmute",D.jf);this.lVa.bind(k.oa,this.xAa,this,!0);this.xZ=new c(this,"buttonToggleMute",D.Mk);this.xZ.bind(k.Jk,this.Iza,this,!0);this.xZ.bind(k.Im,this.xAa,this,!0);this.bind(k.K("mute"),this.B1a,this);this.xZ.set("pressed",this.get("mute"));this.bVa=new c(this,"buttonEnterFullscreen",D.jf);this.bVa.bind(k.oa,this.Yya,this,!0);this.cVa=
new c(this,"buttonExitFullscreen",D.jf);this.cVa.bind(k.oa,this.Zya,this,!0);this.tZ=new c(this,"buttonToggleFullscreen",D.Mk);this.tZ.bind(k.Jk,this.Yya,this,!0);this.tZ.bind(k.Im,this.Zya,this,!0);this.tZ.set("pressed",this.get("fullscreenEnabled"));this.bind(k.K("fullscreenEnabled"),this.j1a,this,!0);this.set("fullscreenEnabled",this.ck.enabled());this.set("defaultMenu",["fullscreen","mute","rotation"]);this.bind(k.Gp,this.Y1a,this,!0);[k.Ra,k.bb,k.tr,k.$A,k.hK].forEach(function(W){this.bind(W,
function(X){this.o(new p(k.wF,{kP:X}))},this,!0)}.bind(this));["keydown","keyup"].forEach(function(W){document.addEventListener(W,function(X){this.o(new p(k.wF,{kP:X}))}.bind(this))}.bind(this));A.O.bind(k.V,function(){A.isPresenting?N.xw():N.xw(E.prototype.get.call(this,"lockedOrientation"))},this);this.ck.bind(k.V,function(){var W=N.lIa();N.xw();N.xw(W)},this)});S.$Qa="orientationChange";S.prototype.logCapabilities=function(){this.y0a()};S.prototype.activateAudio=function(T){this.rTa(T)};S.prototype.oda=
function(T){E.prototype.oda.apply(this,arguments);this.set("fullscreenEnabled",T)};S.prototype.Nb=function(){E.prototype.Nb.call(this);this.j("mute",!1);this.j("fullscreenEnabled",!1)};S.prototype.Ib=function(){E.prototype.Ib.call(this);this.jva.getParent()!=this&&this.hb(this.jva);this.Au.getParent()!=this&&(this.hb(this.Au),this.Au.hb(this.RZ),this.Au.hb(this.RL),this.Au.hb(this.mN))};S.prototype.G3a=function(T){var W=[];this.RL&&W.push(this.RL);this.mN&&W.push(this.mN);this.RZ&&W.push(this.RZ);
for(var X=!0,Y=0;Y<=W.length&&X;Y++)X=T.length-(W.length-Y)==T.indexOf(W[Y]);return X?T:T.filter(function(ca){return W.indexOf(ca)<0}).concat(W)};S.prototype.eb=function(){this.rBa||(this.rBa=m.difference(this.GZa(),"backgroundOpacity visible includeInLayout state left right top bottom centerX centerY width height minWidth minHeight maxWidth maxHeight actualWidth actualHeight paddingLeft paddingTop paddingRight paddingBottom".split(" ")));this.Oc(this.rBa,{},[this.Au],!0,!0);E.prototype.eb.call(this);
this.llb===!0&&this.jlb()};S.prototype.set=function(T,W){switch(T){case "children":this.Au.set(T,this.G3a(W));return;case "creationPolicy":this.Au.set(T,W);return;case "fullscreenAvailable":case "gyroscopeAvailable":case "cardboardAvailable":case "isMobile":case "orientation":case "surfaceSelectionAvailable":case "touchEnabled":case "touchDevice":case "vrControllerAvailable":case "vrAvailable":W=this.get(T);break;case "fullscreenEnabled":W=this.ck.dl()&&W;break;case "fullscreenFallback":F.Roa(W);
break;case "lockedOrientation":u.$f()&&(W=void 0);N.xw(W);break;case "installAvailable":W=this.Wg.ready();break;case "mouseWheelEnabled":this.Vgb(z.Kg("mousewheelenabled",W));break;case "backgroundPreloadEnabled":this.Y3a(W);break;case "vrPolyfillScale":A.Q7=W;break;case "desktopMipmappingEnabled":r.igb(W);break;case "mobileMipmappingEnabled":r.Tgb(W);break;case "defaultVRPointer":W=="gaze"?A.nOa(A.$ra.gK):A.nOa(A.$ra.OP);break;case "xrPanels":this.pka=W;this.OEa();break;case "xrPanelsEnabled":this.gFa=
this.m4&&W,this.OEa()}E.prototype.set.call(this,T,W)};S.prototype.get=function(T,W){switch(T){case "children":case "creationPolicy":return this.Au.get(T,W);case "touchEnabled":return u.br();case "touchDevice":return u.b9();case "isMobile":return u.yb();case "orientation":return N.get();case "lockedOrientation":return N.lIa();case "gyroscopeAvailable":return v.dl;case "cardboardAvailable":case "vrAvailable":return A.wP;case "vrControllerAvailable":return A.akb;case "fullscreenAvailable":return this.ck.dl();
case "vrPolyfillScale":return A.Q7;case "installAvailable":return this.Wg.ready();case "surfaceSelectionAvailable":return!0;case "pageScale":return this.AC;case "xrPanels":return this.pka;case "xrPanelsEnabled":return this.gFa;case L:case Q:return this.m4?E.prototype.get.apply(this,arguments):!0;default:return E.prototype.get.apply(this,arguments)}};S.prototype.OEa=function(){this.J8a.set(this.gFa?this.pka:[])};S.prototype.Iza=function(){this.set("mute",!0)};S.prototype.xAa=function(){this.set("mute",
!1)};S.prototype.B1a=function(){this.xZ.set("pressed",this.get("mute"))};S.prototype.Yya=function(){this.set("fullscreenEnabled",!0)};S.prototype.Zya=function(){this.set("fullscreenEnabled",!1)};S.prototype.j1a=function(){this.get("fullscreenEnabled")?this.ck.o5():this.ck.gt();this.tZ.set("pressed",this.get("fullscreenEnabled"));this.set("fullscreenEnabled",this.ck.enabled())};S.prototype.V1a=function(){var T=this.get("settings");T&&(y.initialize(T),x.npa(T),THREE.Gqa=T.get(TDV.PlayerSettings.w9),
THREE.Pqa=T.get(TDV.PlayerSettings.N9),THREE.qB=T.get(TDV.PlayerSettings.qB),this.Wg.npa(T))};S.prototype.Y3a=function(T){x.enabled(T)};S.prototype.Zva=function(){var T=[];this.YK=[];(this.get("menu")||[]).forEach(function(Y){var ca=Y.get("label");T.push(Y.get("label"));ca&&this.YK.push(function(){Y.o("click")})}.bind(this));var W=this.get("defaultMenu",[]);if(W.indexOf("rotation")>=0){var X=this.ri("PanoramaPlayer");X.length&&(T.push(X[0].get("mouseControlMode")==h.QE?b("change-to-drag-and-release"):
b("change-to-click-and-move")),this.YK.push(this.F6a.bind(this)))}W.indexOf("fullscreen")>=0&&this.ck.dl()&&(T.push(this.ck.enabled()?b("exit-fullscreen"):b("enter-fullscreen")),this.YK.push(this.D6a.bind(this)));W.indexOf("mute")>=0&&(T.push(this.get("mute")?b("unmute"):b("mute")),this.YK.push(this.E6a.bind(this)));W=[].concat(e.name?[e.name]:[],e.lab!="false"?e.uW?["v:"+e.uW+"."+e.AW]:["v:"+e.AW]:[]).join(" ");W!=""&&(T.length>0&&T.push(""),T.push(W),this.YK.push(this.j2a.bind(this)));return T};
S.prototype.b1=function(T){this.YK[T.data.index]()};S.prototype.F6a=function(){var T=this.ri("PanoramaPlayer"),W=T[0].get("mouseControlMode")==h.QE?h.Ow:h.QE;T.forEach(function(X){R.setItem(K,W);X.set("mouseControlMode",W)})};S.prototype.Y1a=function(){R.getItem(K)==h.Ow&&this.ri("PanoramaPlayer").forEach(function(T){T.set("mouseControlMode",h.Ow)});z.tk("mute")&&this.set("mute",z.Kg("mute",this.get("mute")))};S.prototype.D6a=function(){this.ck.toggle()};S.prototype.E6a=function(){this.set("mute",
!this.get("mute"))};S.prototype.j2a=function(){e.kQa&&window.open(e.kQa,"_blank")};S.prototype.E1a=function(){this.o(S.$Qa)};S.prototype.y0a=function(){m.yab(!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()};S.prototype.rTa=function(T){G.active()?O.wait(T):(G.Bqa(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(""),Q=[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 S});
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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=h.define("PopupPanoramaOverlay",m,function(){m.call(this);
this.set("state",p.aa);this.bind(k.K("state"),function(){this.o(k.Ye)},this,!0);this.Fd=void 0});a.prototype.show=function(){this.set("visible",!0)};a.prototype.Pe=function(){this.set("visible",!1)};a.prototype.play=function(){this.set("state",p.PLAYING)};a.prototype.pause=function(){this.set("state",p.sK)};a.prototype.stop=function(){this.set("state",p.aa)};a.prototype.hide=a.prototype.Pe;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.Fd===void 0&&(this.Fd=g.Pbb(this)),this.Fd}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.Fd=void 0,c=!0}m.prototype.set.call(this,e,b);c&&e!="playbackPositions"&&this.o(k.K("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"),k=a("tdv/constants/EventName"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/PlaybackPositionHelper");a=p.define("QuadFramePanoramaOverlay",m,function(){m.call(this);this.Fd=void 0});a.prototype.set=function(g,e){var b=!1;switch(g){case "vertices":case "playbackPositions":this.Fd=
void 0,b=!0}m.prototype.set.call(this,g,e);b&&g!="playbackPositions"&&this.o(k.K("playbackPositions"))};a.prototype.get=function(g,e){switch(g){case "playbackPositions":return this.Fd===void 0&&(this.Fd=h.lma(this)),this.Fd}return m.prototype.get.call(this,g,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"),k=a("tdv/player/script/HotspotPanoramaOverlay");return m.define("QuadHotspotPanoramaOverlay",k,function(){k.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"),k=a("tdv/player/script/HotspotPanoramaOverlayArea");return m.define("QuadHotspotPanoramaOverlayArea",k,function(){k.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"),k=a("tdv/constants/EventName"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/PlaybackPositionHelper");a=p.define("QuadHotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Fd=void 0});a.prototype.get=function(g,e){switch(g){case "playbackPositions":return this.Fd===
void 0&&(this.Fd=h.lma(this)),this.Fd}return m.prototype.get.call(this,g,e)};a.prototype.set=function(g,e){var b=!1;switch(g){case "opacity":case "distance":case "vertices":case "playbackPositions":this.Fd=void 0,b=!0}m.prototype.set.call(this,g,e);b&&g!="playbackPositions"&&this.o(k.K("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"),k=a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");return m.define("QuadHotspotPanoramaOverlayImage",k,function(){k.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"),k=a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");return m.define("QuadHotspotPanoramaOverlayMap",k,function(){k.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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/script/helper/PlaybackPositionHelper");a=g.define("QuadVideoPanoramaOverlay",
m,function(){m.call(this);this.Fd=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",p.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",p.Xb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",p.aa)};a.prototype.set=function(b,c){var d=!1;switch(b){case "state":var f=this.get("state")||p.aa;f==p.aa&&c==p.PLAYING&&this.o(k.Gp);f!=c&&this.o(new h(k.Ye,{oldState:f,state:c}));break;case "enabledInCardboard":this.set("enabledInVR",c);break;case "distance":case "opacity":case "playbackPositions":case "vertices":this.Fd=
void 0,d=!0}m.prototype.set.call(this,b,c);d&&b!="playbackPositions"&&this.o(k.K("playbackPositions"))};a.prototype.get=function(b,c){switch(b){case "playbackPositions":return this.Fd===void 0&&(this.Fd=e.lma(this)),this.Fd}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(k,p){k=="startState"&&p===void 0&&(p=this.get("initialState"));return m.prototype.get.call(this,k,p)};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(k,p){k=="startState"&&p===void 0&&(p=this.get("initialState"));return m.prototype.get.call(this,k,p)};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"),k=a("tdv/player/script/PanoramaFrame");a=m.define("SphericPanoramaFrame",k,function(){k.call(this)});a.prototype.Fn=function(){var p=this.get("sphere");return p&&m.Qa("Video360Resource",p)?!0:(p=this.get("stereoSphere"))&&m.Qa("Video360Resource",p)?!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"),k=a("tdv/player/script/Model3DObject");return m.define("SphereModel3DObject",k,function(){k.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"),k=a("tdv/player/script/Model3DObject");a=m.define("SpriteModel3DObject",k,function(){k.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"),k=a("tdv/player/script/Model3DObject");return m.define("SurfaceReticleModel3DObject",k,function(){k.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/constants/Direction tdv/view/text/Label".split(" "),function(a,m,k,p,h,g,e){return function(b){function c(d){var f=b.call(this)||this;f.cf("Tab");f.zga=d;f.tn="";f.Lia=!1;f.Wa=null;f.Cxa=null;f.dka=!1;f.eka=!1;f.set("childrenInteractionEnabled",!1);f.set("contentOpaque",!0);return f}P(c,b);c.prototype.Nb=function(){b.prototype.Nb.call(this);this.j("horizontalAlign",
h.Xe);this.j("verticalAlign",h.Pd);this.j("fontFamily");this.j("fontSize");this.j("fontColor");this.j("fontWeight");this.j("fontStyle");this.j("textDecoration");this.j("textShadowBlurRadius");this.j("textShadowColor");this.j("textShadowHorizontalLength");this.j("textShadowOpacity");this.j("textShadowVerticalLength")};c.prototype.oOa=function(d){this.dka!=d&&(this.dka=d,this.eka=!0,this.Ff())};c.prototype.Ib=function(){b.prototype.Ib.call(this);this.Wa==null&&(this.Wa=new e,this.Wa.set("horizontalAlign",
"center"),this.hb(this.Wa))};c.prototype.Ir=function(){b.prototype.Ir.call(this);this.Cxa=k.Fw(this.zga,"label",this.cM,this);this.l3(this.zga.get("label"))};c.prototype.Cha=function(){b.prototype.Cha.call(this);this.Cxa.EE()};c.prototype.cM=function(){var d=this.zga.get("label");this.l3(d?d:"")};c.prototype.l3=function(d){this.tn!=d&&(this.tn=d,this.Lia=!0,this.Ff())};c.prototype.eb=function(){this.Lia&&(this.Lia=!1,this.Wa.set("text",this.tn));this.eka&&(this.eka=!1,this.Wa.set("direction",this.dka?
g.Tj:g.Wh));this.Oc(c.Tsa,c.fQ,[this.Wa],!0,!0);b.prototype.eb.call(this)};c.Tsa="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");c.fQ=Object.fromEntries(c.Tsa.map(function(d){return[d,d]}));return c}(p)});define("tdv/view/containers/tabpanel/TabsAlignment",["require","exports"],function(){return{RP:"normal",lK:"inverse",Iqa:"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,k,p,h,g,e,b,c,d,f,n,l,q){return function(r){function t(){var u=
r.call(this)||this;u.cf("TabPanel");u.xg=-1;u.JH=!1;u.hU=[];u.I3=!1;u.Zk=[];u.Aga=!1;u.gU=[];u.ki=null;u.Jh=null;u.yJ(!1);return u}P(t,r);t.prototype.Nb=function(){r.prototype.Nb.call(this);this.j("pages",[]);this.j("selectedIndex",-1);this.j("tabsSize",25);this.j("tabsPosition",l.Tc);this.j("tabsGap",0);this.j("tabsPadding",10);this.j("tabsAlign",n.RP);this.j("tabsBackgroundOpacity",.6);this.j("tabsBackgroundColor",["#FFFFFF","#CCCCCC"]);this.j("tabsBackgroundColorRatios",[0,.5]);this.j("tabsRollOverBackgroundOpacity",
1);this.j("tabsRollOverBackgroundColor",["#FFFFFF","#CCCCCC"]);this.j("tabsRollOverBackgroundColorRatios",[0,.5]);this.j("backgroundColor","#FFFFFF");this.j("selectedTabBackgroundOpacity",1);this.j("selectedTabBackgroundColor");this.j("selectedTabBackgroundColorRatios");this.j("borderRadius",6);this.j("pagePaddingLeft",4);this.j("pagePaddingTop",4);this.j("pagePaddingRight",4);this.j("pagePaddingBottom",4);this.j("borderColor","#AAAAAA");this.j("borderSize",1);this.j("selectedTabFontSize");this.j("selectedTabFontColor");
this.j("selectedTabFontWeight");this.j("selectedTabFontStyle");this.j("selectedTabTextDecoration");this.j("selectedTabTextShadowBlurRadius");this.j("selectedTabTextShadowColor");this.j("selectedTabTextShadowHorizontalLength");this.j("selectedTabTextShadowOpacity");this.j("selectedTabTextShadowVerticalLength");this.j("tabsFontFamily");this.j("tabsFontSize");this.j("tabsFontColor");this.j("tabsFontWeight");this.j("tabsFontStyle");this.j("tabsTextDecoration");this.j("tabsTextShadowBlurRadius");this.j("tabsTextShadowColor");
this.j("tabsTextShadowHorizontalLength");this.j("tabsTextShadowOpacity");this.j("tabsTextShadowVerticalLength");this.j("tabsRollOverFontSize");this.j("tabsRollOverFontColor");this.j("tabsRollOverFontWeight");this.j("tabsRollOverFontStyle");this.j("tabsRollOverTextDecoration");this.j("tabsRollOverTextShadowBlurRadius");this.j("tabsRollOverTextShadowColor");this.j("tabsRollOverTextShadowHorizontalLength");this.j("tabsRollOverTextShadowOpacity");this.j("tabsRollOverTextShadowVerticalLength")};t.prototype.Wn=
function(u,v,w,y){r.prototype.Wn.call(this,u,v,w,y);this.TC("shadow")};t.prototype.Ib=function(){e.prototype.Ib.call(this);this.Jh==null&&(this.Jh=new e,this.Jh.yJ(!1),this.hb(this.Jh));this.ki==null&&(this.ki=new e,this.ki.yJ(!1),this.hb(this.ki))};t.prototype.set=function(u,v){u=="pages"?this.Ygb(v||[]):u=="selectedIndex"?this.Bw(v):u=="layout"&&(v=c.ikb);e.prototype.set.call(this,u,v)};t.prototype.get=function(u,v){return u=="pages"?this.Zk:u=="selectedIndex"?this.FIa():e.prototype.get.call(this,
u,v)};t.prototype.Bw=function(u){this.xg!=u&&(this.xg=u,this.xg=Math.min(Math.max(this.xg,-1),this.Zk.length),this.JH=!0,this.Ff(),this.o(g.V),this.o(g.K("selectedIndex")))};t.prototype.FIa=function(){return this.xg};t.prototype.Ygb=function(u){var v=this;k.Kma(this.Zk,u)||(this.Zk.forEach(function(w){w.h(g.Cd,v.NAa,v);w.h(g.sd,v.MAa,v)}),this.Zk=u,this.Zk.forEach(function(w){w.bind(g.Cd,v.NAa,v);w.bind(g.sd,v.MAa,v)}),this.Aga=!0,this.Ff())};t.prototype.s6a=function(u){this.hU=k.union(this.hU,[u.source]);
this.I3=!0;this.Ff()};t.prototype.r6a=function(u){this.hU=k.difference(this.hU,[u.source]);this.I3=!0;this.Ff()};t.prototype.q6a=function(u){this.Bw(this.gU.indexOf(u.source))};t.prototype.NAa=function(u){this.Bw(this.Zk.indexOf(u.source))};t.prototype.MAa=function(u){if(this.Zk.indexOf(u.source)==this.xg){for(u=this.Zk.length-1;u>=0;u--)if(this.Zk[u].get("visible")){this.Bw(u);return}this.xg=-1;this.Bw(0)}};t.prototype.eb=function(){var u=this,v=!1,w=!1,y=!1,x=!1,z=!1,A=this.G("tabsPosition"),D=
this.G("tabsAlign");this.Aga&&(this.gU=[],this.ki.LMa(),this.Jh.LMa(),this.Zk.forEach(function(I){var F=new f(I);F.yJ(!0);F.bind(g.rc,u.s6a,u,!1);F.bind(g.Db,u.r6a,u,!1);F.bind(g.Ra,u.q6a,u,!1);u.gU.push(F);u.ki.hb(F);I.xa({top:void 0,left:void 0,right:void 0,bottom:void 0,width:"100%",height:"100%"});u.Jh.hb(I)}),this.xg=Math.min(Math.max(this.xg,0),this.Zk.length-1),this.Aga=!1,w=v=z=!0);this.S("tabsPosition")&&(this.$("tabsPosition"),x=w=v=!0);this.JH&&(this.JH=!1,y=w=z=!0);this.I3&&(this.I3=!1,
y=!0);this.S("overflow")&&this.ki.xa({contentOpaque:this.G("overflow")==d.zr,overflow:this.G("overflow")});["tabsAlign","tabsGap","tabsSize"].forEach(function(I){u.S(I)&&(u.$(I),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(I){u.S(I)&&
(u.$(I),x=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(I){u.S(I)&&
(u.$(I),w=!0)});["pagePaddingLeft","pagePaddingTop","pagePaddingRight","pagePaddingBottom"].forEach(function(I){u.S(I)&&(u.$(I),x=!0)});this.S("backgroundColorDirection")&&this.$("backgroundColorDirection");if(v){switch(A){case l.$a:this.ki.xa({left:0,right:void 0});break;case l.Cb:this.ki.xa({left:void 0,right:0});break;case l.Tc:this.ki.xa({bottom:void 0,top:0});break;case l.Fc:this.ki.xa({bottom:0,top:void 0})}switch(A){case l.$a:case l.Cb:this.ki.xa({layout:c.Tj,top:0,bottom:0,height:void 0,width:this.G("tabsSize")});
switch(D){case n.lK:this.ki.set("verticalAlign",b.Fc);break;case n.Iqa:this.ki.set("verticalAlign",b.Pd);break;default:this.ki.set("verticalAlign",b.Tc)}break;case l.Tc:case l.Fc:switch(this.ki.xa({layout:c.Wh,left:0,right:0,height:this.G("tabsSize"),width:void 0}),D){case n.lK:this.ki.set("horizontalAlign",b.Cb);break;case n.Iqa:this.ki.set("horizontalAlign",b.Xe);break;default:this.ki.set("horizontalAlign",b.$a)}}this.ki.set("gap",this.G("tabsGap"))}if(w)for(var E=0;E<this.Zk.length;E++){var B=
this.gU[E];A==l.Fc||A==l.Tc?(B.xa({layout:c.Wh,width:void 0,paddingLeft:this.G("tabsPadding"),paddingTop:0,paddingRight:this.G("tabsPadding"),paddingBottom:0,height:"100%",backgroundColorDirection:p.caa}),B.oOa(!1)):(B.xa({layout:c.Tj,width:"100%",paddingLeft:0,paddingTop:this.G("tabsPadding"),paddingRight:0,paddingBottom:this.G("tabsPadding"),height:void 0,backgroundColorDirection:p.MY}),B.oOa(!0));A==l.Fc||A==l.Cb?B.set("borderTopLeftRadius",0):B.set("borderTopLeftRadius",this.G("borderTopLeftRadius",
"borderTopRadius","borderLeftRadius","borderRadius"));A==l.Fc||A==l.$a?B.set("borderTopRightRadius",0):B.set("borderTopRightRadius",this.G("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));A==l.Tc||A==l.Cb?B.set("borderBottomLeftRadius",0):B.set("borderBottomLeftRadius",this.G("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));A==l.Tc||A==l.$a?B.set("borderBottomRightRadius",0):B.set("borderBottomRightRadius",this.G("borderBottomRightRadius",
"borderBottomRadius","borderRightRadius","borderRadius"));A==l.Cb&&B.set("borderSize",this.G("borderRightSize","borderSize"));A==l.$a&&B.set("borderSize",this.G("borderLeftSize","borderSize"));A==l.Tc&&B.set("borderSize",this.G("borderTopSize","borderSize"));A==l.Fc&&B.set("borderSize",this.G("borderBottomSize","borderSize"));switch(A){case l.$a:var C=this.G("borderLeftColor","borderColor");break;case l.Cb:C=this.G("borderRightColor","borderColor");break;case l.Fc:C=this.G("borderBottomColor","borderColor");
break;default:case l.Tc:C=this.G("borderTopColor","borderColor")}B.set("borderColor",C);B.xa({fontFamily:this.G("tabsFontFamily"),shadow:this.G("shadow")&&this.TJa(),shadowHorizontalLength:this.G("shadowHorizontalLength"),shadowVerticalLength:this.G("shadowVerticalLength"),shadowBlurRadius:this.G("shadowBlurRadius"),shadowSpread:this.G("shadowSpread"),shadowColor:this.G("shadowColor")})}if(w||y)for(E=0;E<this.Zk.length;E++)B=this.gU[E],y=E==this.xg,C=this.hU.includes(B),y?(C=this.G("selectedTabBackgroundColor",
"tabsBackgroundColor"),C===void 0&&(C=this.G("backgroundColor"),C=Array.isArray(C)&&C.length>0?A==l.$a||A==l.Tc?C[0]:C[C.length-1]:C),B.xa({backgroundOpacity:this.G("selectedTabBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:C,backgroundColorRatios:this.G("selectedTabBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:h.gf,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")})):C?B.xa({backgroundOpacity:this.G("tabsRollOverBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.G("tabsRollOverBackgroundColor","tabsBackgroundColor"),backgroundColorRatios:this.G("tabsRollOverBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:h.hf,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")}):B.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")}),B.xa({borderLeftSize:A==l.Cb&&y?0:void 0,borderRightSize:A==l.$a&&y?0:void 0,borderBottomSize:A==l.Tc&&y?0:void 0,borderTopSize:A==l.Fc&&y?0:void 0});if(x){E=this.G("tabsSize");switch(A){case l.$a:this.Jh.xa({left:E-(this.G("borderLeftSize","borderSize")||0),right:0,top:0,bottom:0});break;case l.Cb:this.Jh.xa({left:0,right:E-(this.G("borderRightSize",
"borderSize")||0),top:0,bottom:0});break;case l.Tc:this.Jh.xa({left:0,right:0,top:E-(this.G("borderTopSize","borderSize")||0),bottom:0});break;case l.Fc:this.Jh.xa({left:0,right:0,top:0,bottom:E-(this.G("borderBottomSize","borderSize")||0)})}A==l.Tc&&D==n.RP||A==l.$a&&D==n.RP?this.Jh.set("borderTopLeftRadius",0):this.Jh.set("borderTopLeftRadius",this.G("borderTopLeftRadius","borderTopRadius","borderLeftRadius","borderRadius"));A==l.Tc&&D==n.lK||A==l.Cb&&D==n.RP?this.Jh.set("borderTopRightRadius",
0):this.Jh.set("borderTopRightRadius",this.G("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));A==l.Fc&&D==n.RP||A==l.$a&&D==n.lK?this.Jh.set("borderBottomLeftRadius",0):this.Jh.set("borderBottomLeftRadius",this.G("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));A==l.Fc&&D==n.lK||A==l.Cb&&D==n.lK?this.Jh.set("borderBottomRightRadius",0):this.Jh.set("borderBottomRightRadius",this.G("borderBottomRightRadius","borderBottomRadius","borderRightRadius",
"borderRadius"));this.Jh.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.TJa(),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==l.Tc||A==l.Fc?this.Jh.set("backgroundColorDirection",p.caa):this.Jh.set("backgroundColorDirection",p.MY)}if(z)for(E=0;E<this.Zk.length;E++)this.Zk[E].set("visible",E==this.xg);e.prototype.eb.call(this)};t.prototype.TJa=function(){var u;return((u=this.jI)===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,k){return function(p){function h(){var g=p.call(this)||this;g.cf("Page");g.set("label","");return g}P(h,p);h.prototype.Nb=function(){p.prototype.Nb.call(this);this.j("visible")};return h}(k)});
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"),k=a("tdv/player/script/CapPanoramaOverlay");return m.define("TripodCapPanoramaOverlay",k,function(){k.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"),k=a("tdv/view/list/thumbgrid/ThumbnailGrid"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/ButtonProperty"),g=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/images/fliputil");a=p.define("ThumbnailGrid",
k,function(){k.call(this);this.Td=null;this.set("itemMode","normal");this.Wr=!1;this.qQ=new h(this,"buttonScrollDown",g.jf);this.qQ.bind(m.oa,this.hNa,this);this.rQ=new h(this,"buttonScrollLeft",g.jf);this.rQ.bind(m.oa,this.scrollLeft,this);this.sQ=new h(this,"buttonScrollRight",g.jf);this.sQ.bind(m.oa,this.kNa,this);this.tQ=new h(this,"buttonScrollUp",g.jf);this.tQ.bind(m.oa,this.lNa,this);this.bind(m.V,this.$1a,this)});a.prototype.Ck=function(){k.prototype.Ck.call(this);this.$H()};a.prototype.aI=
function(){k.prototype.aI.call(this);this.$H()};a.prototype.$H=function(){this.qQ.set("visible",!this.Wr||this.KN());this.tQ.set("visible",!this.Wr||this.MN());this.rQ.set("visible",!this.Wr||this.V4());this.sQ.set("visible",!this.Wr||this.W4())};a.prototype.set=function(b,c){if(b=="itemMode")switch(c){case "thumbnail-only":this.set("itemLabelFunction",this.TG);this.set("itemThumbnailUrlFunction",this.GR);this.set("itemTooltipFunction",this.qy);this.set("itemSourceProperties",["label","media.label",
"media.thumbnailUrl","media.flipImageHorizontally"]);break;case "label-only":this.set("itemLabelFunction",this.qy);this.set("itemThumbnailUrlFunction",this.TG);this.set("itemTooltipFunction",this.TG);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.qy),this.set("itemThumbnailUrlFunction",this.GR),this.set("itemTooltipFunction",this.qy),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}else b==
"playList"?(this.Td&&this.Td.h("change",this.Jy,this),(this.Td=c)?(this.set("items",this.Td.get("items")),this.set("selectedIndex",this.Td.get("selectedIndex")),this.Td.bind("change",this.Jy,this,!0)):this.set("items",[])):b=="hideScrollButtons"?(this.Wr=c,this.$H()):k.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){switch(b){case "playList":return this.Td;default:return k.prototype.get.call(this,b,c)}};a.prototype.Jy=function(){this.set("items",this.Td.get("items"));this.set("selectedIndex",
this.Td.get("selectedIndex"))};a.prototype.$1a=function(){this.Td&&this.Td.set("selectedIndex",this.get("selectedIndex"))};a.prototype.TG=function(){};a.prototype.qy=function(b){return b.get("label")||b.get("media").get("label")};a.prototype.GR=function(b){b=b.get("media");var c=b.get("thumbnailUrl");b.get("flipImageHorizontally")&&(c=e.mFa(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"),k=a("tdv/view/list/thumblist/ThumbnailList"),p=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/helper/ButtonProperty"),g=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/images/fliputil");a=p.define("ThumbnailList",
k,function(){k.call(this);this.Td=null;this.Wr=!1;this.qQ=new h(this,"buttonScrollDown",g.jf);this.qQ.bind(m.oa,this.hNa,this);this.rQ=new h(this,"buttonScrollLeft",g.jf);this.rQ.bind(m.oa,this.scrollLeft,this);this.sQ=new h(this,"buttonScrollRight",g.jf);this.sQ.bind(m.oa,this.kNa,this);this.tQ=new h(this,"buttonScrollUp",g.jf);this.tQ.bind(m.oa,this.lNa,this);this.bind(m.V,this.a2a,this)});a.prototype.Ck=function(){k.prototype.Ck.call(this);this.$H()};a.prototype.aI=function(){k.prototype.aI.call(this);
this.$H()};a.prototype.$H=function(){this.qQ.set("visible",!this.Wr||this.KN());this.tQ.set("visible",!this.Wr||this.MN());this.rQ.set("visible",!this.Wr||this.V4());this.sQ.set("visible",!this.Wr||this.W4())};a.prototype.set=function(b,c){if(b=="itemMode")switch(c){case "thumbnail-only":this.set("itemLabelFunction",this.TG);this.set("itemThumbnailUrlFunction",this.GR);this.set("itemTooltipFunction",this.qy);this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"]);
break;case "label-only":this.set("itemLabelFunction",this.qy);this.set("itemThumbnailUrlFunction",this.TG);this.set("itemTooltipFunction",this.TG);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.qy),this.set("itemThumbnailUrlFunction",this.GR),this.set("itemTooltipFunction",this.qy),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}else b=="playList"?(this.Td&&this.Td.h("change",this.Jy,
this),(this.Td=c)?(this.set("items",this.Td.get("items")),this.Td.bind("change",this.Jy,this)):this.set("items",[])):b=="hideScrollButtons"?(this.Wr=c,this.$H()):k.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){switch(b){case "playList":return this.Td;default:return k.prototype.get.call(this,b,c)}};a.prototype.Jy=function(){this.set("items",this.Td.get("items"));this.set("selectedIndex",this.Td.get("selectedIndex"))};a.prototype.a2a=function(){this.Td&&this.Td.set("selectedIndex",this.get("selectedIndex"))};
a.prototype.TG=function(){};a.prototype.qy=function(b){return b.get("label")||b.get("media").get("label")};a.prototype.GR=function(b){b=b.get("media");var c=b.get("thumbnailUrl");b.get("flipImageHorizontally")&&(c=e.mFa(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"),k=a("tdv/player/script/Media");a=m.define("Video",k,function(){k.call(this);this.Ia=void 0});a.prototype.Yv=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"),k=a("tdv/player/script/Panorama");return m.define("VideoPanorama",k,function(){k.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(k,p){if(p===void 0)switch(k){case "gain":p=1}switch(k){case "levels":p=[this];break;case "subtitlesURL":case "gain":for(var h=m.prototype.get.call(this,k),g=this.get("levels"),e=0;g&&e<g.length&&h===void 0;e++){var b=g[e];b!=this&&(h=
b.get(k))}return h!==void 0?h:p}return m.prototype.get.call(this,k,p)};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"),k=a("tdv/player/script/SphericPanoramaFrame"),p=a("tdv/player/script/VideoPanorama"),h=a("tdv/player/script/Video360Resource");a=m.define("Video360",p,function(){p.call(this);this.cq=this.qN=this.Jb=void 0});a.prototype.set=function(g,e){g=="video"?this.zUa(e):
g=="videoStereo"?this.AUa(e):p.prototype.set.call(this,g,e)};a.prototype.get=function(g,e){return g=="video"?this.Jb!==void 0?this.Jb:e:g=="videoStereo"?this.qN!==void 0?this.qN:e:p.prototype.get.call(this,g,e)};a.prototype.zUa=function(g){this.Jb!=g&&(this.Jb=g,g=p.prototype.get.call(this,"frames")||[],this.Jb&&(g.length==0&&g.push(new k),g[0].set("sphere",this.sya(this.Jb))),p.prototype.set.call(this,"frames",g.slice()))};a.prototype.AUa=function(g){this.qN!=g&&(this.qN=g,g=p.prototype.get.call(this,
"frames")||[],this.qN&&(g.length==0&&g.push(new k),g[0].set("stereoSphere",this.sya(this.qN))),p.prototype.set.call(this,"frames",g.slice()))};a.prototype.sya=function(g){if(Array.isArray(g)){if(g.length==0)return;if(g.length==1&&m.Qa("Video360Resource",g[0]))return g[0];var e=[];g.forEach(function(b){e=e.concat(b.get("levels")||[b])});g=new h;g.set("levels",e)}return g};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"),k=a("tdv/player/script/PanoramaPlayer");return m.define("Video360Player",k,function(){k.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"),k=a("tdv/player/script/MediaPlayer"),p=a("tdv/player/script/PlayListItem");a=m.define("Video360PlayListItem",p,function(){p.call(this)});a.prototype.start=function(){p.prototype.start.call(this);var h=this.get("player");h&&(h.bind(k.Vh,this.Uo,this),h.set("video",this.get("media")),h.set("camera",
this.get("camera")),h.set("startTime",this.get("startTime")))};a.prototype.stop=function(){var h=this.get("player");h&&(h.h(k.Vh,this.Uo,this),h.get("video")==this.get("media")&&h.set("video",null));p.prototype.stop.call(this)};a.prototype.Uo=function(h){h.data.media==this.get("media")&&(this.get("player").h(k.Vh,this.Uo,this),this.get("player").bind(k.fo,this.ts,this),this.kD())};a.prototype.ts=function(h){h.data.media==this.get("media")&&(this.get("player").h(k.fo,this.ts,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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/PlaybackState"),h=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/script/helper/PlaybackPositionHelper");a=g.define("VideoPanoramaOverlay",m,function(){m.call(this);
this.Fd=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",p.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",p.Xb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",p.aa)};a.prototype.set=function(b,c){var d=!1;switch(b){case "state":var f=this.get("state")||p.aa;f==p.aa&&c==p.PLAYING&&this.o(k.Gp);f!=c&&this.o(new h(k.Ye,{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.Fd=
void 0,d=!0}m.prototype.set.call(this,b,c);d&&b!="playbackPositions"&&this.o(k.K("playbackPositions"))};a.prototype.get=function(b,c){switch(b){case "playbackPositions":return this.Fd===void 0&&(this.Fd=e.kma(this)),this.Fd}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"),k=a("tdv/player/script/PlaneModel3DObject");return m.define("VideoPlaneModel3DObject",k,function(){k.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 k=a("tdv/utils"),p=a("tdv/constants/EventName"),h=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),e=a("tdv/constants/PlaybackState");a=k.extend(g,function(b){g.call(this);this.m=b;this.ed=null;this.Sl=!1;this.Yj=[];this.wo=void 0;this.kf=[]});
a.prototype.clear=function(){this.m=null;this.$F();this.Yj=[];this.kf=[]};a.prototype.start=function(b){this.end();this.Yha(b);this.Tba();this.Aia();this.gI()};a.prototype.Yha=function(b){this.$F();this.ed=b;this.ed.bind(p.K("currentTime"),this.gI,this,!0);this.ed.bind(p.K("state"),this.Aia,this,!0);this.ed.bind(p.Qb,this.OU,this,!0)};a.prototype.$F=function(){this.ed&&(this.ed.h(p.K("currentTime"),this.gI,this),this.ed.h(p.K("state"),this.Aia,this),this.ed.h(p.Qb,this.OU,this),this.ed=null)};a.prototype.end=
function(){this.vQ();this.$F();this.Sl=!1};a.prototype.Aia=function(b){b=b!=e.aa;this.Sl!=b&&((this.Sl=b)?this.A3():this.vQ())};a.prototype.OU=function(){this.gI()};a.prototype.A3=function(){this.wo=this.cL=0};a.prototype.gI=function(){if(this.ed&&this.Sl){var b=this.kf.slice(),c=this.ed.get("currentTime",0),d=c-this.cL;d<0&&(this.kf=[],this.wo=0);d=d>=0&&d<2;this.cL=c;var f;for(f=this.wo;f<this.Yj.length&&!(this.Yj[f].time>c);f++);for(;this.wo<f;this.wo++)c=this.Yj[this.wo],c.action=="start"?(this.kf=
k.union(this.kf,[c.cue]),d&&c.cue.o(new h(p.gr))):(this.kf=k.union(this.kf,[c.cue]),d&&c.cue.o(new h(p.Qb)));b.length==this.kf.length&&k.intersection(b,this.kf).length==this.kf.length||this.wU()}};a.prototype.vQ=function(){this.kf.length>0&&(this.kf=[],this.wU())};a.prototype.wU=function(){this.ed.o(new h(p.sl,{activeCues:this.kf.slice()}))};a.prototype.Tba=function(){this.Yj=[];this.ed.get("cues",[]).forEach(b=>{this.Yj.push(new m(b.get("startTime",0),b,"start"));this.Yj.push(new m(b.get("endTime",
Number.POSITIVE_INFINITY),b,"end"))});this.Yj.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/events/EventDispatcher tdv/constants/EventName tdv/view/constants/ScaleMode".split(" "),function(a){var m=a("tdv/utils"),k=a("tdv/view/util/Animation"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher");a("tdv/constants/EventName");a("tdv/view/constants/ScaleMode");var g=m.extend(h,function(e,b){h.call(this);this.R=e;this.m=b;this.rH=[];this.Na=g.Di;this.oj=null;this.tca=
void 0;this.Zj=null;this.un=this.Uf=void 0});g.prototype.display=function(e,b){this.Bba();if(this.Zj!=e||this.Na!=g.Di)this.rH.push({video:e,startTime:b}),this.Pza()};g.prototype.Pe=function(){this.Bba();this.rH.push({video:null,startTime:void 0});this.Pza()};g.prototype.clear=function(){this.Na=g.Di;this.Bba();this.d3a();this.wBa();this.m=null};g.prototype.yh=function(e){this.Na==g.Di||this.Na!=g.ij&&this.Na!=g.vu&&this.Na!=g.qx||(this.un+=e,e=Math.min(1,this.un/this.Uf),this.Na==g.ij?(this.oj.set("opacity",
e),this.R.Sc().wJ(e)):this.Na==g.qx?(this.oj.set("opacity",Math.min(1,e*2)),this.Zj.set("opacity",Math.min(1,(1-e)*2))):this.R.Sc().mE(e),this.un<this.Uf?this.Sa():this.VB())};g.prototype.Pza=function(){this.rH.length>0&&this.Na==g.Di&&this.Kr()};g.prototype.Kr=function(){this.Zj&&this.o(new p(g.fF,{video:this.Zj}));if(this.R.get("transitionMode","blending")=="fade_out_fade_in"&&this.Zj)this.yB();else{var e=this.rH.shift();this.oj=e.video;this.tca=e.startTime;this.oj?this.oj.get("chromaColor")&&this.Zj?
this.dba():this.LF():this.Zj&&this.yB()}};g.prototype.LF=function(){this.hta();this.un=0;this.Uf=this.R.get("transitionDuration");this.Na=g.ij;this.R.Sc().JJ();this.m.Ua(!0);this.Sa()};g.prototype.dba=function(){this.hta();this.un=0;this.Uf=this.R.get("transitionDuration")*2;this.Na=g.qx;this.Sa()};g.prototype.yB=function(){this.oj=null;this.un=0;this.Uf=this.R.get("transitionDuration");this.Na=g.vu;this.R.Sc().zE();this.Zj.set("opacity",0);this.m.Ua(!1);this.Sa()};g.prototype.VB=function(){this.wBa();
this.Zj=this.oj;this.oj=null;this.Na==g.vu?this.R.Sc().sD():this.Na==g.ij&&this.R.Sc().BI();this.Na=g.Di;this.Zj?this.o(new p(g.gF,{video:this.Zj})):this.rH.length==0&&this.o(new p(g.Tqa));this.rH.length!=0&&this.Kr()};g.prototype.Sa=function(){k.requestFrame(this.yh,this)};g.prototype.Bba=function(){this.rH=[]};g.prototype.hta=function(){this.oj&&(this.oj.set("opacity",0),this.oj.set("zIndex",1),this.Zj&&this.Zj.set("zIndex",0),this.oj.set("currentTime",this.tca||0),this.m.l9a(this.oj),this.o(new p(g.x$,
{video:this.oj,startTime:this.tca})))};g.prototype.wBa=function(){this.Zj&&(this.m.UMa(this.Zj),this.o(new p(g.IY,{video:this.Zj})),this.Zj=null)};g.prototype.d3a=function(){this.oj&&(this.m.UMa(this.oj),this.o(new p(g.IY,{video:this.oj})),this.oj=null)};g.Di="stopped";g.ij="blending";g.qx="double blending";g.vu="disolving";g.nc="request frame";g.x$="video added";g.IY="video removed";g.gF="video show";g.fF="video hide";g.Tqa="all pending videos hidden";return g});
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"),k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=a("tdv/constants/PlaybackState"),e=m.extend(h,function(){h.call(this);this.ed=null;this.Cf=!1;this.eca=g.aa});e.prototype.start=function(b){this.end();this.Yha(b)};e.prototype.end=function(){this.stop();
this.$F()};e.prototype.clear=function(){this.$F()};e.prototype.play=function(){this.ed&&this.ed.set("state",g.PLAYING)};e.prototype.pause=function(){this.ed&&this.ed.set("state",g.Xb)};e.prototype.Xpa=function(){this.ed&&(this.ed.get("state")==g.PLAYING?this.pause():this.play())};e.prototype.stop=function(){this.ed&&this.ed.set("state",g.aa)};e.prototype.rg=function(b){this.Cf=b;this.ed&&this.ed.set("mute",this.Cf)};e.prototype.setTime=function(b){this.ed&&this.ed.set("currentTime",b)};e.prototype.getTime=
function(){if(this.ed)return this.ed.get("currentTime")};e.prototype.Yha=function(b){this.$F();this.ed=b;this.ed.set("mute",this.Cf);this.ed.bind(k.K("state"),this.XM,this,!0);this.ed.bind(k.K("currentTime"),this.hI,this,!0);this.ed.bind(k.Qb,this.OU,this,!0)};e.prototype.$F=function(){this.ed&&(this.ed.h(k.K("state"),this.XM,this),this.ed.h(k.K("currentTime"),this.hI,this),this.ed.h(k.Qb,this.OU,this),this.ed=null)};e.prototype.hI=function(){this.o(new p(e.hF,{video:this.ed,time:this.ed.get("currentTime"),
duration:this.ed.get("duration")}))};e.prototype.OU=function(){this.o(new p(e.NP,{video:this.ed}))};e.prototype.XM=function(){var b=this.ed.get("state");this.eca!=b&&(this.eca=b,this.o(new p(e.dd,{state:this.eca})))};e.dd="playback state change";e.NP="video end";e.hF="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"),k=a("tdv/constants/PlaybackState"),p=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),g=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(h,function(d,f){h.call(this);this.R=d;this.m=f;this.m.set("visible",!1);this.Va=new e(this.R,this.m);this.Ta=new b(this.m);this.Pr=new g(this.m);this.Va.bind(e.fF,this.ts,this,!0);this.Va.bind(e.gF,this.Uo,this,!0);this.Va.bind(e.x$,this.yAa,this,!0);this.Va.bind(e.IY,this.AAa,this,!0);this.Va.bind(e.Tqa,this.W0a,this,!0);this.Ta.bind(b.dd,this.If,this,!0);this.Ta.bind(b.NP,this.zC,this,!0);this.Ta.bind(b.hF,this.$S,this,!0)});c.prototype.clear=
function(){this.Va.clear();this.Ta.clear();this.Pr.clear();this.Va.h(e.fF,this.ts,this);this.Va.h(e.gF,this.Uo,this);this.Va.h(e.x$,this.yAa,this);this.Va.h(e.IY,this.AAa,this);this.Ta.h(b.dd,this.If,this);this.Ta.h(b.NP,this.zC,this);this.Ta.h(b.hF,this.$S,this);this.R=this.m=this.Pr=this.Ta=this.Va=null};c.prototype.B8=function(d,f){this.m.set("visible",!0);this.Va.display(d,f)};c.prototype.uA=function(){this.Va.Pe();this.Ta.end();this.Pr.end()};c.prototype.play=function(){this.Ta.play()};c.prototype.stop=
function(){this.Ta.stop()};c.prototype.pause=function(){this.Ta.pause()};c.prototype.rg=function(d){this.Ta.rg(d)};c.prototype.setTime=function(d){this.Ta.setTime(d)};c.prototype.getTime=function(){return this.Ta.getTime()};c.prototype.Xpa=function(){this.Ta.Xpa()};c.prototype.yAa=function(d){var f=d.data.video;this.Ta.start(f,d.data.startTime);this.Pr.start(f)};c.prototype.AAa=function(){};c.prototype.Uo=function(d){d=d.data.video;d.get("autoplay")&&d.get("state")!=k.PLAYING&&d.get("state")!=k.Xb&&
d.set("state",k.PLAYING);this.o(new p(c.gF,{video:d}))};c.prototype.ts=function(d){this.o(new p(c.fF,{video:d.data.video}))};c.prototype.W0a=function(){this.m.set("visible",!1)};c.prototype.zC=function(d){this.o(new p(c.NP,{video:d.data.video}))};c.prototype.$S=function(d){this.o(new p(c.hF,{video:d.data.video,time:d.data.time,duration:d.data.duration}))};c.prototype.If=function(d){this.o(new p(c.dd,{state:d.data.state}))};c.gF="videoShow";c.fF="videoHide";c.NP="videoEnd";c.hF="videoTimeChange";c.dd=
"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,k,p,h,g){return function(e){function b(){var c=e.call(this)||this;c.set("toolTipDisabled",!0);c.set("cursor",p.dB);c.bind(k.Yb,c.jd,c,!0);c.sH=new g.Sra;c.sH.Woa(g.Sra.C$);c.sH.cg(c.h2=!1);[c.sH.ac()].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.Ib=function(){e.prototype.Ib.call(this);[this.sH.ac()].forEach(function(c){c.parentElement||this.wa().kk(c)}.bind(this))};b.prototype.dpa=function(c,d){this.h2!=c&&(this.h2=c,this.sH.vNa(d),this.sH.cg(c))};b.prototype.jd=function(){this.sH.setSize(this.cb(),this.Kb())};return b}(h)});
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,k,p,h,g,e,b,c){return function(){function d(f,n,l,q){this.video=f;this.Nj=n;this.renderer=l;this.lb=q;this.p7=this.p7.bind(this);this.lA=this.lA.bind(this);this.Mn=this.Mn.bind(this);this.B7=
this.B7.bind(this);h.ba(this.video,["video.levels.url","video.levels.srcObject","video.levels.width","video.levels.height"],this.p7,!0);h.ba(this.video,["zIndex"],this.lA,!0);h.ba(this.lb,["distance"],this.Mn,!0);h.ba(this.video,["scaleMode"],this.B7,!0);this.renderer.bind(k.Yb,this.wt,this,!0);c.O.bind(k.V,this.kb,this,!0);this.wt();this.Qt()}d.prototype.dispose=function(){h.ca(this.video,["video.levels.url","video.levels.srcObject","video.levels.width","video.levels.height"],this.p7);h.ca(this.video,
["zIndex"],this.lA);h.ca(this.lb,["distance"],this.Mn);h.ca(this.video,["scaleMode"],this.B7);this.renderer.h(k.Yb,this.wt,this);c.O.h(k.V,this.kb,this);this.Ea()};d.prototype.p7=function(){var f,n,l=e.rk(this.video.get("video"));this.level!==l&&(this.level=l,this.videoWidth=((f=this.level)===null||f===void 0?void 0:f.get("width"))||100,this.videoHeight=((n=this.level)===null||n===void 0?void 0:n.get("height"))||100,this.$n(),this.dg())};d.prototype.lA=function(){var f=this.video.get("zIndex");this.zIndex!==
f&&(this.zIndex=f,this.dg())};d.prototype.Mn=function(){var f=this.lb.get("distance");this.distance!==f&&(this.distance=f,this.dg())};d.prototype.B7=function(){var f=this.video.get("scaleMode");this.jE!==f&&(this.jE=f,this.dg())};d.prototype.wt=function(){var f=this.renderer.Ph()||1,n=this.renderer.Oh()||1;if(this.rw!==f||this.qw!==n)this.rw=f,this.qw=n,this.dg()};d.prototype.kb=function(){this.dg()};d.prototype.dg=function(){if(this.F){var f=this.distance-.001*this.zIndex,n=c.isPresenting?2048:this.rw,
l=c.isPresenting?1024:this.qw,q=2*Math.tan(Math.PI/180*b.hu*.5)*f,r=q*l/n;switch(this.jE){case p.NONE:n=this.videoWidth*q/n;l=this.videoHeight*r/l;break;case p.Ep:n=q;l=this.videoHeight*q/this.videoWidth;break;case p.Hk:n=this.videoWidth*r/this.videoHeight;l=r;break;case p.nr:this.videoWidth*r>this.videoHeight*q?(n=this.videoWidth*r/this.videoHeight,l=r):(n=q,l=this.videoHeight*q/this.videoWidth);break;default:this.videoWidth*r>this.videoHeight*q?(n=q,l=this.videoHeight*q/this.videoWidth):(l=r,n=
this.videoWidth*r/this.videoHeight)}r=this.F.N(g.sa);r.Ge=n;r.Ve=l;r.positionZ=-f}};d.prototype.$n=function(){if(this.F){var f=this.F.N(g.jo);f.properties=this.video;f.O=this.video;f.yqa=this.video.get("video")}};d.prototype.sqa=function(){if(this.F){var f=this.F.N(g.ud,!0);f.JA=!0;f.CE=!0;f.O=this.video;f.$s=!0;f.It=!0}};d.prototype.Qt=function(){var f=this.Nj.T.tc("Video");f.L(g.nb).F=this.Nj;f.L(g.Plane);f.L(g.sa);f.L(g.jo);f.L(g.ud);this.F=f;this.dg();this.$n();this.sqa()};d.prototype.Ea=function(){this.F&&
(this.F.T.fd(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,k,p,h,g,e,b,c,d){return function(){function f(n,l){this.Nj=n;this.lb=l;this.visible=!1;this.Mn=this.Mn.bind(this);g.ba(this.lb,["distance"],this.Mn,!0);d.O.bind(p.V,this.kb,this,
!0)}f.prototype.dispose=function(){g.ca(this.lb,["distance"],this.Mn);d.O.h(p.V,this.kb,this);this.Ea()};f.prototype.cg=function(n){this.visible!=n&&(this.visible=n,this.$n())};f.prototype.Mn=function(){var n=this.lb.get("distance");this.distance!==n&&(this.distance=n,this.dg())};f.prototype.kb=function(){this.SJ()};f.prototype.SJ=function(){d.isPresenting!=!!this.F&&(d.isPresenting?this.Qt():this.Ea())};f.prototype.dg=function(){if(this.F){var n=this.distance-.005,l=2*Math.tan(Math.PI/180*f.hu*.5)*
n,q=l*h.SY/h.tK,r=this.F.N(e.sa);r.Ge=l;r.Ve=q;r.positionZ=-n}};f.prototype.$n=function(){if(this.F){if(!this.aw){var n=new c,l=new b;l.set("url",h.ax);l.set("width",h.tK);l.set("height",h.SY);n.set("levels",[l]);this.aw=n}this.properties||(n=new k,n.set("width",h.tK),n.set("height",h.SY),n.set("opacity",1),this.properties=n);n=this.F.N(e.Bi);n.properties=this.properties;n.O=this.aw;n.aw=this.aw;this.properties.set("enabled",this.visible)}};f.prototype.Qt=function(){if(!this.F){var n=this.Nj.T.tc("VideoPlay");
n.L(e.nb).F=this.Nj;n.L(e.Plane);n.L(e.sa);n.L(e.Bi);this.F=n;this.dg();this.$n()}};f.prototype.Ea=function(){this.F&&(this.F.T.fd(this.F),this.F=null)};f.hu=10;return f}()});
define("tdv/player/view/video/renderer/adapters/PlaybackBarAdapter",["require","exports","tdv/constants/EventName"],function(a,m,k){return function(){function p(h){this.lb=h;this.Wf=this.lb.get("application");this.enabled=!1;this.container=this.eE=this.eg=null}p.prototype.dispose=function(){this.Ua(!1)};p.prototype.Ua=function(h){this.enabled!==h&&((this.enabled=h)?this.cab():this.tab())};p.prototype.cab=function(){if(!this.eg){this.w$a();this.eg=this.Wf.ni("XRPanel");this.eg.set("content",this.container);
this.eg.set("autoCenter",!1);this.eg.set("modal",!1);this.eg.set("yaw",0);this.eg.set("pitch",-45);this.eg.set("distance",1);this.eg.set("draggable",!1);var h=Math.PI/180;h=2*this.eg.get("distance")*Math.tan(p.hu/2*h)/p.Asa;this.eg.set("pixelScale",h);this.eg.Moa(this.lb.get("application"));this.eg.NGa()}};p.prototype.tab=function(){this.eg&&(this.eg.lla(),this.mab(),this.Wf.Nv(this.eg),this.eg=null)};p.prototype.w$a=function(){if(!this.eE){var h=this.Wf.ni("PlaybackBar");h.set("left",25);h.set("top",
22);h.set("right",25);h.set("height",4);h.set("backgroundColor",["#FFFFFF"]);h.set("backgroundOpacity",1);h.set("borderColor","#FFFFFF");h.set("borderRadius",0);h.set("borderSize",0);h.set("liveDragging",!0);h.set("playheadBackgroundColor",["#3399FF"]);h.set("playheadBorderRadius",0);h.set("playheadBorderColor","#ffffff");h.set("playheadBorderSize",2);h.set("playheadBorderRadius",10);h.set("playheadHeight",20);h.set("playheadWidth",20);h.set("playheadShadow",!1);h.set("barBackgroundColor",["#3399FF"]);
h.set("barBackgroundColorRatios",[0]);h.set("barBorderColor","#000000");h.set("barBorderSize",0);h.set("barBorderRadius",0);this.eE=h}if(!this.container){h=this.Wf.ni("Container");h.set("width",p.Asa);h.set("height",50);h.set("backgroundColor","#ffffff");h.set("backgroundOpacity",.2);h.set("borderRadius",25);h.set("children",[this.eE]);h.set("opacity",.3);var g=this.Wf.ni("FadeInEffect");g.set("duration",500);g.set("easing","cubic_in");h.set("showEffect",g);g=this.Wf.ni("FadeOutEffect");g.set("duration",
500);g.set("easing","cubic_out");h.set("hideEffect",g);h.bind(k.rc,this.DGa,this,!0);h.bind(k.Db,this.CGa,this,!1);this.container=h}this.xt||(this.xt=this.Wf.ni("Effect"),this.xt.set("duration",300),this.xt.set("easing","cubic_in"),this.xt.bind(k.me,this.JLa,this,!0));this.v9a()};p.prototype.JLa=function(){this.container.set("opacity",.2+.8*this.xt.pm())};p.prototype.mab=function(){this.Nfb();this.eE&&(this.Wf.Nv(this.eE),this.eE=null);this.xt&&(this.xt.h(k.me,this.JLa,this),this.Wf.Nv(this.xt),this.xt=
null);this.container&&(this.container.h(k.rc,this.DGa,this),this.container.h(k.Db,this.CGa,this),this.Wf.Nv(this.container),this.container=null)};p.prototype.v9a=function(){this.OLa=this.lb.get("externalPlaybackBar");this.lb.set("externalPlaybackBar",this.eE)};p.prototype.Nfb=function(){this.lb.get("externalPlaybackBar")===this.eE&&(this.lb.set("externalPlaybackBar",this.OLa),this.OLa=null)};p.prototype.DGa=function(){this.xt.play()};p.prototype.CGa=function(){this.xt.reverse()};p.Asa=500;p.hu=40;
return p}()});
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 tdv/player/view/util/XR".split(" "),function(a,m,k,p,h,g,e,b,c){return function(d){function f(n,l,q){n=d.call(this,n,l,q)||this;n.Hna=n.Hna.bind(n);n.Bc=null;n.s4=
[];n.fI=[];n.j9();k.ba(n.oC,["displayPlaybackBarInXR","displayPlaybackBar"],n.Hna,!0);return n}P(f,d);f.prototype.Ib=function(){d.prototype.Ib.call(this);this.Bc==null&&(this.Bc=new h,this.Bc.xa({left:0,top:0,right:0,bottom:0}),this.hb(this.Bc),this.j9())};f.prototype.OW=function(){var n=this;d.prototype.OW.call(this);this.Gd.j8(this.oC.get("useVideoFrameRate")?2:void 0);this.K$a();this.J$a();this.s4.forEach(function(l){n.OGa(l)})};f.prototype.Jna=function(){d.prototype.Jna.call(this);this.j9();this.mqa()};
f.prototype.l9a=function(n){this.s4.push(n);this.Gd&&this.OGa(n)};f.prototype.K$a=function(){this.z2a=new b(this.R)};f.prototype.OGa=function(n){var l=new g(n,this.N_.$i(),this,this.R);this.fI.push(l);this.Gd.j8(this.oC.get("useVideoFrameRate")&&this.dcb(n)<45?2:void 0);this.k8(this.fI.length>0)};f.prototype.J$a=function(){this.UAa=new e(this.N_.$i(),this.R)};f.prototype.UMa=function(n){n=this.s4.indexOf(n);n<0||(this.s4.splice(n,1),this.Gd&&this.sab(this.fI[n]))};f.prototype.sab=function(n){var l=
this.fI.indexOf(n);l<0||(this.fI.splice(l,1),n.dispose(),this.k8(this.fI.length>0))};f.prototype.dpa=function(n){this.h2=n;this.j9()};f.prototype.j9=function(){var n=this.h2&&this.fI.length>0;this.Bc&&this.Bc.dpa(n);this.UAa&&this.UAa.cg(n)};f.prototype.dcb=function(n){n=n.get("video");return(n&&n.get("levels")||[]).reduce(function(l,q){return Math.max(l,q.get("framerate"))},0)||30};f.prototype.kb=function(){d.prototype.kb.call(this);this.mqa()};f.prototype.Hna=function(){this.mqa()};f.prototype.mqa=
function(){var n,l=c.isPresenting&&this.lR&&this.oC.get("displayPlaybackBarInXR",this.oC.get("displayPlaybackBar"));(n=this.z2a)===null||n===void 0||n.Ua(l)};return f}(p)});
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"),k=a("tdv/constants/EventName"),p=a("tdv/constants/Key"),h=a("tdv/player/parser/ClassInfo"),g=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=h.define("VideoPlayer",g,function(){g.call(this,"video");this.iH=this.iH.bind(this);this.Rr=this.z3=this.hI=this.Ui=!1;this.U=this.m=null;this.Zb=this.qf=0;this.Ho=!1;this.$d=m.Qq(this.Mh,this)});a.prototype.seek=function(f){this.IH(f)};a.prototype.play=function(){this.nH()};a.prototype.pause=function(){this.mH()};a.prototype.stop=function(){this.xC()};a.prototype.restart=
function(){this.wC()};a.prototype.set=function(f,n){if(this.get(f)!=n){switch(f){case "startTime":this.z3=!0;this.$d();break;case "video":this.hI=!0;this.$d();break;case "viewerArea":this.Ui=!0;this.$d();break;case "displayPlaybackBar":this.Rr=!0,this.$d()}g.prototype.set.call(this,f,n)}};a.prototype.get=function(f,n){switch(f){case "currentTime":return this.U&&this.U.getTime()||0}return g.prototype.get.call(this,f,n)};a.prototype.Xq=function(f){this.Ho!==f&&((this.Ho=f)?document.addEventListener("keydown",
this.iH,!0):document.removeEventListener("keydown",this.iH,!0))};a.prototype.iH=function(f){d.lp()||(f.code==p.ua.uK||f.code==p.ua.BY)&&this.U&&this.U.Xpa()};a.prototype.Mh=function(){this.Ui&&(this.Ui=!1,this.Lx(),this.get("viewerArea")&&this.Kx(),this.TT(this.get("viewerArea")),this.hI=!0);var f=!1;if(this.m&&(this.hI||this.z3)){var n=this.get("video"),l=this.get("startTime")||0;if(n&&!this.m.Wb()){this.$d();return}this.z3=this.hI=!1;this.Zb=this.qf=0;f=!0;n?(this.get("viewerArea").Sc().hib(),this.rJ(),
this.U.B8(n,l)):this.U.uA()}this.Rr&&(this.Rr=!1,f=!0);f&&this.uz()};a.prototype.ZM=function(){this.set("video",null)};a.prototype.Kx=function(){var f=this.get("application"),n=this.get("viewerArea");this.m=new c(f,n,this);this.m.xa({left:0,top:0,bottom:0,right:0});n.hb(this.m);n.bind(k.oa,this.EAa,this,!0);this.U=new b(n,this.m);this.U.bind(b.gF,this.Uo,this);this.U.bind(b.fF,this.ts,this);this.U.bind(b.hF,this.$S,this,!0);this.U.bind(b.dd,this.If,this);f.bind(k.K("mute"),this.FS,this);this.U.rg(f.get("mute",
!1));this.SC(!0)};a.prototype.Lx=function(){if(this.m){this.U.h(b.gF,this.Uo,this);this.U.h(b.fF,this.ts,this);this.U.h(b.hF,this.$S,this);this.U.h(b.dd,this.If,this);this.U.clear();this.get("application").h(k.K("mute"),this.FS,this);var f=this.m.getParent();f.removeChild(this.m);f.h(k.oa,this.EAa,this,!0);this.m=null;this.SC(!1)}};a.prototype.FS=function(){this.m&&this.U.rg(this.get("application").get("mute",!1))};a.prototype.If=function(f){f=f.data.state;this.m&&this.m.dpa(this.get("displayPlayOverlay")&&
f!=e.PLAYING,this.qf<.5);this.Kd(f)};a.prototype.Uo=function(f){var n=this.get("viewerArea");(this.te=n&&n.te)&&this.te.bind(k.oa,this.FAa,this,!0);this.Nga=!1;f=f.data.video;f.bind(k.oa,this.zAa,this,!0);this.YR(f)};a.prototype.ts=function(f){this.te&&this.te.h(k.oa,this.FAa,this,!0);this.te=null;f=f.data.video;f.h(k.oa,this.zAa,this);this.WR(f)};a.prototype.$S=function(f){this.qf=f.data.time;this.Zb=f.data.duration;this.uz()};a.prototype.EAa=function(){this.Nga?this.Nga=!1:this.Sya()};a.prototype.zAa=
function(){this.Sya()};a.prototype.Sya=function(){switch(this.get("clickAction")){case "play_pause":this.get("state")!=e.PLAYING?this.U.play():this.U.pause()}};a.prototype.FAa=function(){this.Nga=!0};a.prototype.iT=function(f){this.IH(f.data.position)};a.prototype.Ql=function(){this.U.play()};a.prototype.sq=function(){this.U.stop()};a.prototype.ws=function(){this.U.pause()};a.prototype.IH=function(f){this.U&&this.U.setTime(f)};a.prototype.uz=function(){if(this.m){var f=this.m.getParent();this.Zb>
0&&this.get("displayPlaybackBar")?f.xa({playbackBarPosition:this.qf,playbackBarDuration:this.Zb,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"),k=a("tdv/player/script/MediaPlayer"),p=a("tdv/player/script/PlayListItem");a=m.define("VideoPlayListItem",p,function(){p.call(this)});a.prototype.start=function(){p.prototype.start.call(this);var h=this.get("player");h&&(h.bind(k.Vh,this.Uo,this),h.set("video",this.get("media")),h.set("startTime",
this.get("startTime")))};a.prototype.stop=function(){var h=this.get("player");h&&(h.h(k.Vh,this.Uo,this),h.get("video")==this.get("media")&&h.set("video",null));p.prototype.stop.call(this)};a.prototype.Uo=function(h){h.data.media==this.get("media")&&(this.get("player").h(k.Vh,this.Uo,this),this.get("player").bind(k.fo,this.ts,this),this.kD())};a.prototype.ts=function(h){h.data.media==this.get("media")&&(this.get("player").h(k.fo,this.ts,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"),k=a("tdv/player/parser/ClassInfo"),p=a("tdv/player/view/util/Capabilities"),h=a("tdv/player/script/VideoResourceLevel");a=k.define("VideoResource",m,function(){m.call(this);this.Hfa=new h;this.Hfa.set("type","video/mp4");this.Lfa=new h;this.Lfa.set("type","video/ogg");this.lka=
new h;this.lka.set("type","video/webm")});a.prototype.get=function(g,e){switch(g){case "levels":e=[];var b=this.get("mp4Url");b&&(this.Hfa.set("url",b),e.push(this.Hfa));if(b=this.get("oggUrl"))this.Lfa.set("url",b),e.push(this.Lfa);if(b=this.get("webmUrl"))this.lka.set("url",b),e.push(this.lka);e.forEach(function(c){c.set("width",this.get("width"));c.set("height",this.get("height"))}.bind(this))}return m.prototype.get.call(this,g,e)};a.prototype.hl=function(){var g=this.get("webmUrl"),e=this.get("oggUrl"),
b=this.get("mp4Url");return b&&p.m6?b:g&&p.uma?g:e&&p.tma?e:b||g||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"),k=a("tdv/player/script/Model3DPostprocessing");return m.define("VignetteModel3DPostprocessing",k,function(){k.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,k,p,h,g,e,b){return function(c){function d(){var f=c.call(this)||this;f.cf("WebFrame");f.Nd=null;f.Nc=null;f.qj=null;f.PR=null;f.dga=f.dga.bind(f);f.l1=f.l1.bind(f);f.bind(k.Cd,f.i2a,f,!0);f.bind(k.sd,f.h2a,f,!0);return f}P(d,c);d.prototype.Nb=function(){c.prototype.Nb.call(this);
this.j("url");this.j("allowTopNavigation",!0);this.j("backgroundColor","#ffffff");this.j("insetBorder",!1);this.j("scrollEnabled",!0);this.j("unloadWhenHidden",!0)};d.prototype.z6=function(f,n){return f.getType()!==b.DOM?!1:c.prototype.z6.call(this,f,n)};d.prototype.i2a=function(){this.TC("url")};d.prototype.h2a=function(){this.TC("url")};d.prototype.Ib=function(){c.prototype.Ib.call(this);this.Nd||(this.Nd=document.createElement("div"),this.Nd.style.position="absolute",this.Nd.style.left="0",this.Nd.style.top=
"0",this.Nd.style.width="100%",this.Nd.style.height="100%",this.wa().kk(this.Nd));this.Nc||(this.Nc=document.createElement("iframe"),this.Nc.style.position="absolute",this.Nc.style.left="0",this.Nc.style.top="0",this.Nc.setAttribute("allowfullscreen","true"),this.Nc.setAttribute("allow","accelerometer; autoplay; camera; display-capture; fullscreen; geolocation; gyroscope; magnetometer; microphone; vr; xr-spatial-tracking"),this.Nd.appendChild(this.Nc));this.qj||(this.qj=document.createElement("div"),
this.qj.style.textShadow="0 0 5px rgba(255,255,255,0.5)",this.qj.style.display="none",this.qj.style.color="#000000",this.qj.style.fontWeight="300",this.qj.style.fontFamily="Tahoma, Geneva, sans-serif",this.qj.style.fontSize=p.yb()?"5vmin":"20px",this.qj.style.position="absolute",this.qj.style.top="50%",this.qj.style.left="50%",this.qj.style.textAlign="center",this.qj.style.transform="translate(-50%, -50%)",this.qj.style.width="90%",this.Nd.appendChild(this.qj))};d.prototype.eb=function(){if(this.S("url")){var f=
this.G("url");f&&this.my?this.oCa(f):(!f||this.get("unloadWhenHidden"))&&this.oCa("");this.$("url")}this.S("insetBorder")&&(f=this.G("insetBorder"),this.Nc.setAttribute("frameborder",f?"1":"0"),this.$("insetBorder"));this.S("allowTopNavigation")&&(this.G("allowTopNavigation")?this.Nc.removeAttribute("sandbox"):this.Nc.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.Nc.setAttribute("scrolling",f?"auto":"no"),this.Nd.style.overflow=f?"auto":"hidden",this.Nd.style["-webkit-overflow-scrolling"]=f?"touch":"auto",this.$("scrollEnabled"));c.prototype.eb.call(this)};d.prototype.Zt=function(){this.Nc&&e.eab(this.Nc,{width:this.cb()+"px",height:this.Kb()+"px"});c.prototype.Zt.call(this)};d.prototype.refresh=function(){this.G("url")&&this.my&&(this.iea(),this.HB(),this.ija(),this.Nc.setAttribute("src",
""),setTimeout(function(){this.YCa();this.Kta();this.Nc.setAttribute("src",this.G("url"))}.bind(this),30))};d.prototype.oCa=function(f){this.Nc.getAttribute("src")!=f&&(this.iea(),f?(this.YCa(),this.Kta()):(this.HB(),this.ija()),this.Nc.setAttribute("src",f))};d.prototype.dga=function(){this.PR=null;this.Z_a()&&this.G5a()};d.prototype.l1=function(){this.iea();this.HB();this.ija()};d.prototype.Kta=function(){this.Nc.addEventListener("load",this.l1)};d.prototype.ija=function(){this.Nc.removeEventListener("load",
this.l1)};d.prototype.HB=function(){this.PR&&(clearTimeout(this.PR),this.PR=null)};d.prototype.YCa=function(){this.HB();this.PR=setTimeout(this.dga,d.ARa)};d.prototype.Z_a=function(){if(window.location.protocol=="https:"){var f=this.Nc.getAttribute("src");if(h.parse(f).protocol!="https:")return!0}return!1};d.prototype.G5a=function(){this.qj.textContent="A secure web page served over HTTPS can not display insecure content served over HTTP.";this.qj.style.display="block"};d.prototype.iea=function(){this.qj.style.display=
"none"};d.ARa=3E3;return d}(g)});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,k,p,h,g,e){return function(b){function c(){var d=b.call(this)||this;d.cf("Window");d.aea=0;d.bea=0;d.NCa=!1;d.oia=!1;d.bind(p.Yb,d.G8a,d,!1);d.bind(p.oa,d.D8a,d,!1);d.bind(p.kK,d.E8a,d,!1);d.bind(p.VP,d.H8a,d,!1);d.n4=0;d.ng=new g;d.ng.xa({visible:!1,includeInLayout:!1,layout:"absolute",height:"100%",
width:"100%",backgroundOpacity:0,contentOpaque:!1});d.ng.bind(p.Yb,d.SEa,d,!1);d.ng.bind(p.VP,d.x8a,d,!1);d.ng.bind(p.kK,d.w8a,d,!1);d.ng.bind(p.oa,d.v8a,d,!1);d.ng.hb(d);return d}P(c,b);c.prototype.set=function(d,f){switch(d){case "maxWidth":this.nka=f;this.e4();break;case "maxHeight":this.mka=f;this.e4();break;case "shadow":this.NCa=f;this.NEa();break;default:b.prototype.set.call(this,d,f)}};c.prototype.show=function(d,f){this.R4(d);f&&this.X9a();f=d.get("children");d.set("children",f.concat([this.ng]));
k.defer(function(){this.ng.set("visible",!0)}.bind(this))};c.prototype.Pe=function(){this.Q4();this.set("visible",!1)};c.prototype.R4=function(d){b.prototype.R4.call(this);this.e4(d);this.ng.set("visible",!1);this.yUa()};c.prototype.Q4=function(){b.prototype.Q4.call(this);this.n4=0;this.j3(!1)};c.prototype.yUa=function(){var d=this.G("modal"),f=this.G("veilShowEffect"),n=this.G("veilHideEffect");d&&f?this.ng.set("showEffect",f):this.ng.set("showEffect",null);d&&n?this.ng.set("hideEffect",n):this.ng.set("hideEffect",
null)};c.prototype.X9a=function(){this.set("centerX",0);this.set("centerY",0)};c.prototype.Nb=function(){this.zl(c.ad)};c.prototype.v8a=function(){this.n4++;setTimeout(function(){this.n4>0&&this.Pe()}.bind(this),100)};c.prototype.D8a=function(){this.n4--};c.prototype.Uwa=function(d){this.aea=d.pageX;this.bea=d.pageY;this.Wb().bind(p.mb,this.dFa,this,!0);this.Wb().bind(p.bb,this.eFa,this,!0)};c.prototype.dFa=function(d){this.set("centerX",this.get("centerX")+(d.pageX-this.aea));this.set("centerY",
this.get("centerY")+(d.pageY-this.bea));this.aea=d.pageX;this.bea=d.pageY;this.MEa()};c.prototype.eFa=function(){this.Wb().h(p.mb,this.dFa,this);this.Wb().h(p.bb,this.eFa,this)};c.prototype.SEa=function(){this.e4()};c.prototype.x8a=function(){this.set("visible",!0)};c.prototype.w8a=function(){this.ng.h(p.Yb,this.SEa,this);var d=this.ng.getParent();d&&d.removeChild(this.ng);this.o(new h(p.VA))};c.prototype.G8a=function(){this.MEa()};c.prototype.H8a=function(){this.j3(!0)};c.prototype.E8a=function(){this.ng.set("visible",
!1)};c.prototype.j3=function(d){this.oia=d;this.NEa()};c.prototype.NEa=function(){b.prototype.set.call(this,"shadow",this.oia&&this.NCa)};c.prototype.icb=function(d){if(this.nka!==void 0)return this.nka;if(d)return d.cb()};c.prototype.hcb=function(d){if(this.mka!==void 0)return this.mka;if(d)return d.Kb()};c.prototype.e4=function(d){d||(d=this.getParent());b.prototype.set.call(this,"maxWidth",this.icb(d));b.prototype.set.call(this,"maxHeight",this.hcb(d))};c.prototype.MEa=function(){var d=this.ng.cb(),
f=this.cb(),n=this.get("centerX");f=d*.5+n-f*.5;var l=this.Tm.u.Bd,q=this.Tm.cb(),r=Math.min(q,30);d=d-l-r;l=-(l+q-r);f<l?this.set("centerX",n+(l-f)):f>d&&this.set("centerX",n-(f-d));d=this.ng.Kb();f=this.Kb();n=this.get("centerY");f=d*.5+n-f*.5;l=this.Tm.u.ge;q=this.Tm.Kb();r=Math.min(q,5);d=d-l-r;l=-(l+q-r);f<l?this.set("centerY",n+(l-f)):f>d&&this.set("centerY",n-(f-d))};c.prototype.eb=function(){this.G("modal")?(this.Oc(c.xaa,c.iZ,[this.ng],!0,!0),this.ng.set("contentOpaque",!0)):(this.ng.set("backgroundOpacity",
0),this.ng.set("contentOpaque",!1));b.prototype.eb.call(this)};c.iZ={veilOpacity:"backgroundOpacity",veilColor:"backgroundColor",veilColorRatios:"backgroundColorRatios",veilColorDirection:"backgroundColorDirection"};c.xaa=Object.keys(c.iZ);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.xaa),n=0;n<f.length;n++)d[f[n]]=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.Pe;return a});
define("tdv/view/core/visuals/canvas/Layer",["require","exports","tdv/events/EventDispatcher"],function(a,m,k){return function(){function p(h){this.canvas=h.canvas||null;this.rect=h.rect;this.visibleRect=h.visibleRect||h.rect;this.opacity=h.opacity===void 0?1:h.opacity;this.layers=h.layers||[];this.tag=h.tag||"";this.pA=h.pA||p.kB;this.nD=h.nD||!1;this.O=h.O||new k;this.G7=h.G7||this;this.cursor=h.cursor||void 0}p.prototype.gNa=function(h,g,e){e===void 0&&(e=null);var b=this.rect.uPa(h,g),c=this.visibleRect.uPa(h,
g);if(e!==null&&!e.contains(c))if(e.Hma(c))c=c.intersection(e);else return null;return new p({canvas:this.canvas||void 0,rect:b,visibleRect:c,opacity:this.opacity,tag:this.tag,layers:this.layers.map(function(d){return d.gNa(h,g,e)}).filter(function(d){return d!==null}),O:this.O,pA:this.pA,nD:this.nD,cursor:this.cursor,G7:this.G7})};p.kB=0;p.Xra=1;p.TP=2;return p}()});
define("tdv/view/core/visuals/canvas/Rect",["require","exports"],function(){return function(){function a(m,k,p,h){this.left=m;this.top=k;this.width=p;this.height=h;this.right=m+p;this.bottom=k+h}a.prototype.equals=function(m){return this.left===m.left&&this.top===m.top&&this.width===m.width&&this.height===m.height};a.prototype.Hma=function(m){return this.left<m.right&&this.top<m.bottom&&this.right>m.left&&this.bottom>m.top};a.prototype.containsPoint=function(m,k){return this.left<=m&&m<=this.right&&
this.top<=k&&k<=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 k=this.left>m.left?this.left:m.left,p=this.top>m.top?this.top:m.top;return new a(k,p,(this.right<m.right?this.right:m.right)-k,(this.bottom<m.bottom?this.bottom:m.bottom)-p)};a.prototype.union=function(m){var k=this.left<m.left?this.left:m.left,p=this.top<m.top?this.top:m.top;return new a(k,p,(this.right>m.right?
this.right:m.right)-k,(this.bottom>m.bottom?this.bottom:m.bottom)-p)};a.prototype.uPa=function(m,k){return new a(this.left+m,this.top+k,this.width,this.height)};a.union=function(m){if(m.length===0)return new a(0,0,0,0);for(var k=m[0].left,p=m[0].top,h=m[0].right,g=m[0].bottom,e=1;e<m.length;e++)k=Math.min(k,m[e].left),p=Math.min(p,m[e].top),h=Math.max(h,m[e].right),g=Math.max(g,m[e].bottom);return new a(k,p,h-k,g-p)};a.merge=function(m){for(var k=0;k<m.length;){for(var p=k+1;p<m.length;){if(m[k].Hma(m[p])){m=
[m[k].union(m[p])].concat(m.slice(0,k)).concat(m.slice(k+1,p)).concat(m.slice(p+1));k=-1;break}p++}k++}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,k,p){return function(){function h(){this.vO=!1;this.kV=this.canvas=this.sI=null;this.layers=[]}h.prototype.clear=function(){this.canvas&&(this.canvas.width=0,this.canvas.height=0);this.kV=null;this.layers=[]};h.prototype.compose=function(g,e,b){var c=this;this.canvas||(this.canvas=document.createElement("canvas"));var d=p.union(g.map(function(l){return l.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 p(Math.floor(d.left-(b-d.width)/2),Math.floor(d.top-(f-d.height)/2),b,f)}b=[];if(this.kV&&this.kV.equals(d)){b=g.filter(function(l){return!c.layers.includes(l)});f=this.layers.filter(function(l){return!g.includes(l)});if(b.length==0&&f.length==0)return new k({canvas:this.canvas,rect:d,opacity:e,tag:"composed",layers:g});b=p.merge(b.map(function(l){return l.visibleRect}).concat(f.map(function(l){return l.visibleRect})))}else this.kV=
d,this.canvas.width=d.width,this.canvas.height=d.height,b.push(d);this.layers=g;if(b){var n=this.canvas.getContext("2d");b.forEach(function(l){n.clearRect(l.left-d.left,l.top-d.top,l.width,l.height);g.forEach(function(q){if(q.canvas&&l.Hma(q.visibleRect)&&q.visibleRect.width!=0&&q.visibleRect.height!=0){var r=q.visibleRect.intersection(l);n.globalAlpha=q.opacity;n.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 k({canvas:this.canvas,
rect:this.kV,opacity:e,tag:"composed",layers:g})};return h}()});
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,k,p,h,g,e,b,c,d,f,n){return function(l){function q(){var r=l.call(this)||
this;r.vO=!1;r.opacity=1;r.visible=!1;r.iNa=0;r.jNa=0;r.jQa=null;r.bKa=new d;r.sI=null;r.layers=null;r.fV=null;r.Eq=null;r.AI=null;r.n5=null;r.WN=new f;r.children=[];r.ON=new Map;r.XX=new Map;r.wla=b.TP;r.vla=!0;r.cursor=void 0;return r}P(q,l);q.prototype.hp=function(){return new h};q.prototype.Fgb=function(){this.vO!=1&&(this.vO=!0,this.vO||(this.bKa.clear(),this.sI=null))};q.prototype.kk=function(){throw Error("Invalid call to CanvasUIBaseVisuals.appendContent");};q.prototype.X7=function(){throw Error("Invalid call to CanvasUIBaseVisuals.removeContent");
};q.prototype.ac=function(){throw Error("Invalid call to CanvasUIBaseVisuals.getElement");};q.prototype.fbb=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.sI)return[this.sI];if(this.layers)return this.layers;this.layers=this.dt();return this.vO||this.opacity<1?(this.sI=this.bKa.compose(this.layers,this.opacity,this.vO),[this.sI]):this.layers};q.prototype.xIa=function(r){return this.vHa(r,this.getLayers())};
q.prototype.AIa=function(r){var t=this.AI&&r.xIa(this.AI);r=r.AI;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.g7,this,!0);this.pE()};q.prototype.zJa=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.g7,this,!0);this.pE()};q.prototype.AJa=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.g7,this,!0);this.pE()};q.prototype.removeChild=function(r){var t=this.children.indexOf(r);t!==-1&&(r.h(e.V,this.g7,this),this.children.splice(t,1),this.iGa(r),this.pE())};q.prototype.i8=function(r,t){if(this.wla!==r||this.vla!==t)this.wla=r,this.vla=t,this.f9(),this.pE()};q.prototype.g7=function(r){this.iGa(r.source);this.pE()};q.prototype.iGa=function(r){var t=this;if(this.ON.has(r)){var u=this.ON.get(r);this.ON.delete(r);u.forEach(function(v){t.XX.delete(v)})}};q.prototype.update=
function(r){var t=this.hh(r);this.TOa(r);t&&this.pE()};q.prototype.dt=function(){var r=this,t=[];this.AI&&t.push(this.AI);this.fV&&t.push(this.fV);this.children.forEach(function(u){if(r.ON.has(u))var v=r.ON.get(u);else v=u.getLayers(),r.ON.set(u,v);v.forEach(function(w){if(r.XX.has(w))var y=r.XX.get(w);else y=r.mX(w),r.XX.set(w,y);y!==null&&t.push(y)})});return t};q.prototype.mX=function(r){return r.gNa(Math.round(this.iNa),Math.round(this.jNa),this.jQa)};q.prototype.pE=function(){this.sI=this.layers=
null;this.o(e.V)};q.prototype.vHa=function(r,t){for(var u=null,v=0;v<t.length&&!u;v++)t[v].G7===r&&(u=t[v]);for(v=0;v<t.length&&!u;v++)u=this.vHa(r,t[v].layers);return u};q.prototype.hh=function(r){var t=!1;t=this.$ib(r)||t;(t=this.Yib(r)||t)&&this.Zib();var u=this.vqa(r);u&&this.XX.clear();var v=this.Qjb(r);(r=this.jjb(r))&&this.f9();return t||u||v||r};q.prototype.vqa=function(r){if(this.J.x!==r.x||this.J.y!==r.y||this.J.width!==r.width||this.J.height!==r.height||this.J.offsetX!==r.offsetX||this.J.offsetY!==
r.offsetY||this.J.lw!==r.lw||this.J.Bd!==r.Bd||this.J.ge!==r.ge||this.J.ze!==r.ze||this.J.Af!==r.Af||this.J.Kc!==r.Kc||this.J.Lc!==r.Lc){var t=(r.x||0)+r.offsetX,u=(r.y||0)+r.offsetY,v=r.width,w=r.height;this.jQa=r.lw?null:new c(t+r.Bd,u+r.ge,v-r.ze-r.Bd,w-r.Af-r.ge);this.iNa=t+r.Bd-r.Kc;this.jNa=u+r.ge-r.Lc;return!0}return!1};q.prototype.$ib=function(r){if(this.J.x!==r.x||this.J.y!==r.y||this.J.offsetX!==r.offsetX||this.J.offsetY!==r.offsetY){var t=r.CA&&r.Cw>0,u=t?Math.max(0,-r.St+r.Xn):0;this.A9a=
(r.x||0)+r.offsetX-(t?Math.max(0,-r.Rt+r.Xn):0);this.B9a=(r.y||0)+r.offsetY-u;return!0}return!1};q.prototype.Yib=function(r){var t=r.lk&&r.lk.length>0,u=!!r.Ev,v=r.hm>0&&(r.Ne>0&&r.borderLeftColor||r.Oe>0&&r.borderTopColor||r.tf>0&&r.borderRightColor||r.sf>0&&r.borderBottomColor),w=t||u||v;if(!r.visible||!w){if(this.J.visible&&w)return this.Eq&&(this.Eq.width=0,this.Eq.height=0,this.fV=null),!0}else if(this.J.visible!==r.visible||this.J.width!==r.width||this.J.height!==r.height||this.J.lk!==r.lk||
this.J.jD!==r.jD||this.J.hm!==r.hm||this.J.Ne!==r.Ne||this.J.borderLeftColor!==r.borderLeftColor||this.J.Oe!==r.Oe||this.J.borderTopColor!==r.borderTopColor||this.J.tf!==r.tf||this.J.borderRightColor!==r.borderRightColor||this.J.sf!==r.sf||this.J.borderBottomColor!==r.borderBottomColor||this.J.Ev!==r.Ev||this.J.CA!==r.CA||this.J.Rt!==r.Rt||this.J.St!==r.St||this.J.Xn!==r.Xn||this.J.GJ!==r.GJ||this.J.shadowColor!==r.shadowColor||this.J.Cw!==r.Cw||this.J.visible!==r.visible){this.Eq||(this.Eq=document.createElement("canvas"));
var y=this.Eq,x=r.CA&&r.Cw>0;w=x?Math.max(0,-r.Rt+r.Xn):0;var z=x?Math.max(0,-r.St+r.Xn):0,A=x?Math.max(0,r.St+r.Xn):0;y.width=r.width+w+(x?Math.max(0,r.Rt+r.Xn):0);y.height=r.height+z+A;A=y.getContext("2d");A.clearRect(0,0,y.width,y.height);var D=Math.min(Math.floor(r.width/2),Math.floor(r.height/2));y=Math.min(D,r.borderTopLeftRadius);var E=Math.min(D,r.borderTopRightRadius),B=Math.min(D,r.borderBottomRightRadius);D=Math.min(D,r.borderBottomLeftRadius);var C=[Math.max(0,y-Math.max(r.Oe,r.Ne)),Math.max(0,
E-Math.max(r.Oe,r.tf)),Math.max(0,B-Math.max(r.sf,r.tf)),Math.max(0,D-Math.max(r.sf,r.Ne))],I=[y,E,B,D];if(x){x=A.globalAlpha;A.globalAlpha=r.Cw;A.fillStyle=r.shadowColor;A.shadowColor=r.shadowColor;A.shadowBlur=r.Xn;A.shadowOffsetX=r.Rt;A.shadowOffsetY=r.St;A.beginPath();A.roundRect(w,z,r.width,r.height,I);A.fill();A.shadowColor="rgba(0, 0, 0, 0)";var F=A.globalCompositeOperation;A.globalCompositeOperation="destination-out";A.globalAlpha=1;A.fillStyle="#ffffff";A.beginPath();A.roundRect(w,z,r.width,
r.height,I);A.fill();A.globalCompositeOperation=F;A.globalAlpha=x}A.translate(w,z);F=C.some(function(R){return R>0});if(t||u){x=A.globalAlpha;A.globalAlpha=r.hm;A.translate(r.Ne,r.Oe);var G=Math.max(0,r.width-(r.Ne+r.tf)),N=Math.max(0,r.height-(r.Oe+r.sf));if(t){var O=r.jD==k.MY?A.createLinearGradient(0,0,G,0):A.createLinearGradient(0,0,0,N);g.UFa(r).forEach(function(R){O.addColorStop(R.ratio,R.color)});A.fillStyle=O;A.roundRect(0,0,G,N,C);A.fill()}u&&(F&&(A.save(),A.roundRect(0,0,G,N,C),A.clip()),
A.drawImage(r.Ev,0,0,G,N),F&&A.restore());A.translate(-r.Ne,-r.Oe);A.globalAlpha=x}v&&(t=[[0,y],[y,0],[r.width-E,0],[r.width,E],[r.width,r.height-B],[r.width-B,r.height],[D,r.height],[0,r.height-D]],u=[[r.Ne,r.Oe+C[0]],[r.Ne+C[0],r.Oe],[r.width-r.tf-C[1],r.Oe],[r.width-r.tf,r.Oe+C[1]],[r.width-r.tf,r.height-r.sf-C[2]],[r.width-r.tf-C[2],r.height-r.sf],[r.Ne+C[3],r.height-r.sf],[r.Ne,r.height-r.sf-C[3]]],v=[[0,0],[r.width,0],[r.width,r.height],[0,r.height]],x=[[r.Ne,r.Oe],[r.width-r.tf,r.Oe],[r.width-
r.tf,r.height-r.sf],[r.Ne,r.height-r.sf]],r.Oe>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=n.Z8(r.borderTopColor,r.hm),A.fill()),E>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],I[1]),A.lineTo(u[3][0],u[3][1]),C[1]>0?A.arcTo(x[1][0],x[1][1],u[2][0],u[2][1],C[1]):A.lineTo(u[2][0],u[2][1]),A.fillStyle=r.borderTopColor||r.borderRightColor,A.fill()),r.tf>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=n.Z8(r.borderRightColor,r.hm),A.fill()),B>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],I[2]),A.lineTo(u[5][0],u[5][1]),C[2]>0?A.arcTo(x[2][0],x[2][1],u[4][0],u[4][1],C[2]):A.lineTo(u[4][0],u[4][1]),A.fillStyle=r.borderBottomColor||r.borderRightColor,A.fill()),r.sf>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=n.Z8(r.borderBottomColor,r.hm),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],I[3]),A.lineTo(u[7][0],u[7][1]),C[3]>0?A.arcTo(x[3][0],x[3][1],u[6][0],u[6][1],C[3]):A.lineTo(u[6][0],u[6][1]),A.fillStyle=r.borderBottomColor||r.borderLeftColor,A.fill()),r.Ne>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=n.Z8(r.borderLeftColor,r.hm),A.fill()),y>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],I[0]),A.lineTo(u[1][0],u[1][1]),C[0]>0?A.arcTo(x[0][0],x[0][1],u[0][0],u[0][1],C[0]):A.lineTo(u[0][0],u[0][1]),A.fillStyle=r.borderTopColor||r.borderLeftColor,A.fill()));A.translate(-w,-z);return!0}return!1};q.prototype.jjb=function(r){return this.J.visible!==r.visible||this.J.x!==r.x||this.J.y!==r.y||this.J.width!==r.width||this.J.height!==r.height||this.J.offsetX!==r.offsetX||this.J.offsetY!==r.offsetY||this.J.cursor!==
r.cursor?(r.visible?(this.n5=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.n5=null,this.cursor="inherit"),!0):!1};q.prototype.Qjb=function(r){return this.J.opacity!==r.opacity||this.J.visible!==r.visible?(this.opacity=r.opacity,this.visible=r.visible,!0):!1};q.prototype.Zib=function(){if(this.Eq&&this.Eq.width>0&&this.Eq.height>0){var r=new c(this.A9a,this.B9a,this.Eq.width,this.Eq.height);this.fV=new b({canvas:this.Eq,rect:r,tag:"background"})}else this.fV=
null};q.prototype.f9=function(){this.AI=this.n5?new b({rect:this.n5,tag:"element",pA:this.wla,nD:this.vla,O:this.WN,cursor:this.cursor}):null};return q}(p)});
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,k,p,h,g){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.hp=function(){return new p};b.prototype.dt=function(){var c=e.prototype.dt.call(this);if(this.Oka){var d=this.mX(this.Oka);d&&c.push(d)}return c};b.prototype.hh=
function(c){var d=e.prototype.hh.call(this,c);this.xp(c)&&(d=!0,this.canvas&&this.canvas.width>0&&this.canvas.height>0?(c=new g(this.T9a,this.U9a,this.canvas.width,this.canvas.height),this.Oka=new h({canvas:this.canvas,rect:c,tag:"canvas"})):this.Oka=null);return d};b.prototype.xp=function(c){if(!c.visible||!c.canvas){if(this.J.visible&&this.J.canvas&&this.J.canvas.width>0&&this.J.canvas.height>0)return this.canvas=null,!0}else if(c.visible!==this.J.visible||c.canvas!==this.J.canvas||c.jV!==this.J.jV)return this.U9a=
this.T9a=0,this.canvas=c.canvas,!0;return!1};return b}(k)});
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,k,p,h,g,e){return function(b){function c(){var d=b.call(this)||this;d.i6=null;d.l9=null;d.Kq=null;d.dr=null;d.aJa=new e;d.gQa=new e;d.ocb=h.TP;d.ncb=!1;d.Ujb=h.TP;d.Tjb=!1;d.$Ia=100;d.fQa=100;return d}
P(c,b);c.prototype.hp=function(){return new p};c.prototype.R5=function(){throw Error("Invalid call to CanvasContainerVisuals.getHScrollBarElement");};c.prototype.f6=function(){throw Error("Invalid call to CanvasContainerVisuals.getVScrollBarElement");};c.prototype.dt=function(){var d=b.prototype.dt.call(this);this.i6&&d.push(this.i6);this.l9&&d.push(this.l9);return d};c.prototype.hh=function(d){var f=b.prototype.hh.call(this,d);this.ojb(d)&&(f=!0,this.pjb());this.Ojb(d)&&(f=!0,this.Pjb());return f};
c.prototype.ojb=function(d){if(!d.uk){if(this.J.uk)return this.Kq&&(this.Kq.width=0,this.Kq.height=0),!0}else if(d.uk!==this.J.uk||d.x!==this.J.x||d.y!==this.J.y||d.offsetX!==this.J.offsetX||d.offsetY!==this.J.offsetY||d.width!==this.J.width||d.height!==this.J.height||d.contentWidth!==this.J.contentWidth||d.contentHeight!==this.J.contentHeight||d.uk!==this.J.uk||d.Kc!==this.J.Kc||d.xf!==this.J.xf||d.Lt!==this.J.Lt||d.Kt!==this.J.Kt||d.gh!==this.J.gh||d.Qn!==this.J.Qn||d.Rn!==this.J.Rn||d.Dk!==this.J.Dk||
d.Lc!==this.J.Lc){var f=d.uk&&d.Dk;this.Kq||(this.Kq=document.createElement("canvas"));var n=this.Kq;f=d.width-d.Qn-((f?d.gh:0)+d.Qn);this.pcb=(d.x||0)+d.offsetX+d.Qn+Math.round(d.Kc*f/d.contentWidth);this.qcb=(d.y||0)+d.offsetY+d.height-d.Rn-d.gh;this.$Ia=f;var l=Math.round(d.xf*f/d.contentWidth),q=d.gh;f=n.getContext("2d");n.width=l;n.height=q;f&&(f.clearRect(0,0,n.width,n.height),f.fillStyle=d.Kt,l=f.globalAlpha,f.beginPath(),f.globalAlpha=d.Lt,f.roundRect(0,0,n.width,n.height,d.gh/2),f.fill(),
f.globalAlpha=l);return!0}return!1};c.prototype.Ojb=function(d){if(!d.Dk){if(this.J.Dk)return this.dr&&(this.dr.width=0,this.dr.height=0),!0}else if(d.Dk!==this.J.Dk||d.x!==this.J.x||d.y!==this.J.y||d.offsetX!==this.J.offsetX||d.offsetY!==this.J.offsetY||d.width!==this.J.width||d.height!==this.J.height||d.contentWidth!==this.J.contentWidth||d.contentHeight!==this.J.contentHeight||d.uk!==this.J.uk||d.Kc!==this.J.Kc||d.xf!==this.J.xf||d.Lt!==this.J.Lt||d.Kt!==this.J.Kt||d.gh!==this.J.gh||d.Qn!==this.J.Qn||
d.Rn!==this.J.Rn||d.Dk!==this.J.Dk||d.Lc!==this.J.Lc){var f=d.uk&&d.Dk;this.dr||(this.dr=document.createElement("canvas"));var n=this.dr,l=d.height-d.Rn-((f?d.gh:0)+d.Rn);this.Wjb=(d.y||0)+d.offsetY+d.Rn+Math.round(d.Lc*l/d.contentHeight);this.Vjb=(d.x||0)+d.offsetX+d.width-d.Qn-d.gh;this.fQa=l;f=d.gh;var q=Math.round(d.Ng*l/d.contentHeight);l=n.getContext("2d");n.width=f;n.height=q;l&&(l.clearRect(0,0,n.width,n.height),l.fillStyle=d.Kt,f=l.globalAlpha,l.beginPath(),l.globalAlpha=d.Lt,l.roundRect(0,
0,n.width,n.height,d.gh/2),l.fill(),l.globalAlpha=f);return!0}return!1};c.prototype.pjb=function(){if(this.Kq&&this.Kq.width>0&&this.Kq.height>0){var d=new g(this.pcb,this.qcb,this.Kq.width,this.Kq.height);this.i6=new h({canvas:this.Kq,rect:d,pA:this.ocb,nD:this.ncb,tag:"hscroll",O:this.aJa})}else this.i6=null};c.prototype.Pjb=function(){if(this.dr&&this.dr.width>0&&this.dr.height>0){var d=new g(this.Vjb,this.Wjb,this.dr.width,this.dr.height);this.l9=new h({canvas:this.dr,rect:d,pA:this.Ujb,nD:this.Tjb,
tag:"vscroll",O:this.gQa})}else this.l9=null};return c}(k)});
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,k,p,h,g,e,b){return function(c){function d(){var f=c.call(this)||this;f.Bma=h.kB;f.zma=!1;f.n6=new b;return f}P(d,c);d.prototype.Xoa=function(f,n){if(this.Bma!==f||this.zma!==n)this.Bma=
f,this.zma=n,this.hqa()};d.prototype.hp=function(){return new p};d.prototype.dt=function(){var f=c.prototype.dt.call(this);if(this.Ama){var n=this.mX(this.Ama);n&&f.push(n)}return f};d.prototype.hh=function(f){var n=c.prototype.hh.call(this,f);this.gqa(f)&&(n=!0,this.hqa());return n};d.prototype.f9=function(){c.prototype.f9.call(this);this.hqa()};d.prototype.hqa=function(){if(this.rt&&this.rt.width>0&&this.rt.height>0){var f=new g(this.Vcb,this.Wcb,this.rt.width,this.rt.height);this.Ama=new h({canvas:this.rt,
rect:f,opacity:1,pA:this.Bma,nD:this.zma,O:this.n6,tag:"image",cursor:this.Xcb})}else this.Ama=null};d.prototype.gqa=function(f){if(!f.visible||!f.image){if(this.J.visible&&this.J.image)return this.rt&&(this.rt.width=0,this.rt.height=0),!0}else if(f.visible!==this.J.visible||f.image!==this.J.image||f.cursor!==this.J.cursor||f.contentWidth!==this.J.contentWidth||f.contentHeight!==this.J.contentHeight||f.width!==this.J.width||f.height!==this.J.height||f.Bd!==this.J.Bd||f.ze!==this.J.ze||f.ge!==this.J.ge||
f.Af!==this.J.Af||f.borderTopLeftRadius!==this.J.borderTopLeftRadius||f.borderTopRightRadius!==this.J.borderTopRightRadius||f.borderBottomRightRadius!==this.J.borderBottomRightRadius||f.borderBottomLeftRadius!==this.J.borderBottomLeftRadius||f.Oe!==this.J.Oe||f.tf!==this.J.tf||f.sf!==this.J.sf||f.Ne!==this.J.Ne||f.sh!==this.J.sh||f.verticalAlign!==this.J.verticalAlign){this.Wcb=this.Vcb=0;this.rt||(this.rt=document.createElement("canvas"));var n=Math.min(Math.floor(f.width/2),Math.floor(f.height/
2));n=[Math.max(0,Math.min(n,f.borderTopLeftRadius)-Math.max(f.Oe,f.Ne)),Math.max(0,Math.min(n,f.borderTopRightRadius)-Math.max(f.Oe,f.tf)),Math.max(0,Math.min(n,f.borderBottomRightRadius)-Math.max(f.sf,f.tf)),Math.max(0,Math.min(n,f.borderBottomLeftRadius)-Math.max(f.sf,f.Ne))];var l=f.width-f.Bd-f.ze,q=f.height-f.ge-f.Af,r=this.rt;r.width=l;r.height=q;var t=r.getContext("2d");t.clearRect(0,0,r.width,r.height);switch(f.sh){default:l=0;break;case e.Cb:l-=f.contentWidth;break;case e.Xe:l=Math.floor((l-
f.contentWidth)*.5)}switch(f.verticalAlign){default:q=0;break;case e.Fc:q-=f.contentHeight;break;case e.Pd:q=Math.floor((q-f.contentHeight)*.5)}t.drawImage(f.image,l,q,f.contentWidth,f.contentHeight);t.fillStyle="#ffffff";t.globalCompositeOperation="destination-in";t.roundRect(0,0,r.width,r.height,n);t.fill();t.globalCompositeOperation="source-over";this.Xcb=f.cursor;return!0}return!1};return d}(k)});
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,k,p,h,g,e,b,c,d){return function(f){function n(){var l=f.call(this)||this;l.AE=document.createElement("canvas");l.Xt=0;l.Ut=0;return l}
P(n,f);n.prototype.hp=function(){return new p};n.prototype.LI=function(){return this.Xt};n.prototype.KI=function(){return this.Ut};n.prototype.dt=function(){var l=f.prototype.dt.call(this);if(this.Upa){var q=this.mX(this.Upa);q&&l.push(q)}return l};n.prototype.hh=function(l){var q=f.prototype.hh.call(this,l);this.tqa(l)&&(q=!0,this.AE&&this.AE.width>0&&this.AE.height>0?(l=new g(this.nP,this.oP,this.fPa,this.ePa),this.Upa=new h({canvas:this.AE,rect:l,opacity:1,tag:"text"})):this.Upa=null);return q};
n.prototype.tqa=function(l){if(l.visible&&l.text){var q=!1;if(l.visible!==this.J.visible||l.text!==this.J.text||l.direction!==this.J.direction||l.A5!==this.J.A5||l.it!==this.J.it||l.fontSize!==this.J.fontSize||l.fontFamily!==this.J.fontFamily||l.fontWeight!==this.J.fontWeight||l.fontStyle!==this.J.fontStyle||l.Vt!==this.J.Vt||l.Wt!==this.J.Wt||l.Yn!==this.J.Yn||l.Ew!==this.J.Ew||l.Dw!==this.J.Dw){var r=this.AE,t=l.Ew>0;q=t?Math.max(0,-l.Vt+l.Yn):0;var u=t?Math.max(0,-l.Wt+l.Yn):0,v=t?Math.max(0,l.Vt+
l.Yn):0,w=t?Math.max(0,l.Wt+l.Yn):0,y=r.getContext("2d"),x=b(l.text,{fontSize:l.fontSize,fontFamily:l.fontFamily,fontWeight:l.fontWeight,fontStyle:l.fontStyle},y);this.Xt=Math.round(x.width);this.Ut=Math.round(x.height);this.fPa=this.Xt+q+v;this.ePa=this.Ut+u+w;r.width=this.fPa;r.height=this.ePa;y.clearRect(0,0,r.width,r.height);y.fillStyle=l.it||"#000000";y.font=e.d6({fontSize:l.fontSize,fontFamily:l.fontFamily,fontWeight:l.fontWeight,fontStyle:l.fontStyle});y.textAlign="center";y.textBaseline="middle";
t?(y.shadowColor="rgba("+c.qp(l.Dw).concat([l.Ew]).join(",")+")",y.shadowBlur=l.Yn,y.shadowOffsetX=l.Vt,y.shadowOffsetY=l.Wt):y.shadowColor="rgba(0, 0, 0, 0)";y.fillText(l.text,q+Math.round(this.Xt*.5),u+Math.round(this.Ut*.5));q=!0}if(q||l.width!==this.J.width||l.height!==this.J.height||l.Bd!==this.J.Bd||l.ge!==this.J.ge||l.ze!==this.J.ze||l.Af!==this.J.Af||l.sh!==this.J.sh||l.verticalAlign!==this.J.verticalAlign){q=(t=l.Ew>0)?Math.max(0,-l.Vt+l.Yn):0;u=t?Math.max(0,-l.Wt+l.Yn):0;r=l.width-l.Bd-
l.ze;t=l.height-l.ge-l.Af;if(r<this.Xt)this.nP=0;else switch(l.sh){case d.$a:this.nP=0;break;case d.Cb:this.nP=r-this.Xt;break;case d.Xe:this.nP=Math.round(r-this.Xt)*.5}this.nP=Math.round(this.nP-q);if(t<this.Ut)this.oP=0;else switch(l.verticalAlign){case d.Tc:this.oP=0;break;case d.Fc:this.oP=t-this.Ut;break;case d.Pd:this.oP=Math.round(t-this.Ut)*.5}this.oP=Math.round(this.oP-u);q=!0}return q}return this.J.visible&&this.J.text?(this.AE&&(this.AE.width=0,this.Ut=this.Xt=this.AE.height=0),!0):!1};
return n}(k)});
define("tdv/view/core/visuals/canvas/Rasterizer",["require","exports","tdv/utils","tdv/events/EventDispatcher","tdv/constants/EventName"],function(a,m,k,p,h){a=function(b){function c(d,f){var n=b.call(this)||this;n.element=d;n.canvas=f;n.Cna=new e(n.onChange.bind(n));n.Cna.observe(d);n.vab=new g(d);n.Zna=!1;n.koa=!1;n.onChange();return n}P(c,b);c.prototype.dispose=function(){var d;(d=this.Cna)===null||d===void 0||d.disconnect();this.Cna=null};c.prototype.onChange=function(){var d=this;this.koa?this.Zna=
!0:(this.Zna=!1,this.koa=!0,this.vab.kfb(this.canvas).then(function(){d.koa=!1;if(d.Zna)d.onChange();else d.o(h.V)}))};return c}(p);var g=function(){function b(c){this.element=c}b.prototype.kfb=function(c){function d(){return Promise.all(Array.from(q).map(function(v){return document.fonts.load(v)}))}var f=this,n=this.D$a(),l=this.L$a(this.element);n.appendChild(l);l.querySelectorAll("img, canvas, video").forEach(function(v){v.remove()});var q=new Set;l.querySelectorAll("*").forEach(function(v){v.style&&
v.style.font&&q.add(v.style.font)});var r=l.getBoundingClientRect(),t=this.N$a(l,r.width,r.height);this.ila(l);var u=document.createElement("img");n.appendChild(u);return this.Rdb(u,t).then(function(){return d()}).then(function(){c.width=r.width;c.height=r.height;var v=c.getContext("2d");v.clearRect(0,0,c.width,c.height);v.drawImage(u,0,0);u.src="";f.ila(u);f.ila(n);return c})};b.prototype.Rdb=function(c,d){return new Promise(function(f){c.onload=function(){f()};c.src=d})};b.prototype.D$a=function(){var c=
document.createElement("div");c.style.position="absolute";c.style.top="-9999px";c.style.left="-9999px";document.body.appendChild(c);return c};b.prototype.L$a=function(c){c=c.cloneNode(!0);c.style.position="absolute";c.style.top="0px";c.style.left="0px";return c};b.prototype.ila=function(c){var d;(d=c.parentElement)===null||d===void 0||d.removeChild(c);c.innerHTML=""};b.prototype.N$a=function(c,d,f){c=(new XMLSerializer).serializeToString(c);c=this.zab(c);return'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="'+
d+'" height="'+f+'"><foreignObject x="0" y="0" width="100%" height="100%">'+c+"</foreignObject></svg>"};b.prototype.zab=function(c){return c.replace(/#/g,"%23").replace(/\n/g,"%0A")};return b}(),e=function(){function b(c){var d=this;this.element=null;this.onChange=k.Vpa(c,1);this.n7=this.n7.bind(this);this.Dma=[];this.zKa=new MutationObserver(function(){d.teb()});this.IMa=new ResizeObserver(function(){d.kl()})}b.prototype.observe=function(c){this.element=c;this.iqa();this.zKa.observe(c,{subtree:!0,
childList:!0,attributes:!0});this.IMa.observe(c)};b.prototype.disconnect=function(){this.zKa.disconnect();this.IMa.disconnect();this.element=null;this.iqa()};b.prototype.teb=function(){this.iqa();this.onChange()};b.prototype.kl=function(){this.onChange()};b.prototype.n7=function(){this.onChange()};b.prototype.iqa=function(){var c=this,d=this.element?Array.from(this.element.querySelectorAll("img")):[],f=d.filter(function(l){return!c.Dma.includes(l)}),n=this.Dma.filter(function(l){return!d.includes(l)});
f.forEach(function(l){l.addEventListener("load",c.n7)});n.forEach(function(l){l.removeEventListener("load",c.n7)});this.Dma=d};return b}();return a});
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".split(" "),function(a,m,k,p,h,g,e,b){return function(c){function d(){return c.call(this)||this}P(d,c);d.prototype.Xla=function(){return this.jp?this.jp.width:0};d.prototype.Wla=function(){return this.jp?
this.jp.height:0};d.prototype.hp=function(){return new h};d.prototype.dt=function(){var f=c.prototype.dt.call(this);if(this.xma){var n=this.mX(this.xma);n&&f.push(n)}return f};d.prototype.hh=function(f){var n=c.prototype.hh.call(this,f);this.fqa(f)&&(n=!0,this.IGa());return n};d.prototype.fqa=function(f){if(!f.visible||!f.nd){if(this.J.visible&&this.J.nd)return this.jp=null,!0}else if(f.visible!==this.J.visible||f.nd!==this.J.nd){this.jp||(this.jp=document.createElement("canvas"));var n=this.jp;this.aX&&
(this.aX.h(k.V,this.BLa,this),this.aX.dispose(),n.width=0,n.height=0,this.aX=null);this.aX=new b(f.nd,n);this.aX.bind(k.V,this.BLa,this,!0);return!0}return!1};d.prototype.IGa=function(){if(this.jp&&this.jp.width>0&&this.jp.height>0){var f=new e(0,0,this.jp.width,this.jp.height);this.xma=new g({canvas:this.jp,rect:f,tag:"html"})}else this.xma=null};d.prototype.BLa=function(){this.IGa();this.pE()};return d}(p)});
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,k,p,h,g,e,b,c,d,f,n,l,q,r){return function(){function t(){}t.prototype.create=function(u){if(u instanceof n)return new b;if(u instanceof d)return new p;if(u instanceof l)return new g;if(u instanceof q)return new e;if(u instanceof f)return new h;if(u instanceof c)return new k;throw Error("Invalid UI instance");};t.prototype.getType=function(){return r.KQa};t.HI=function(){t.El||(t.El=new t);return t.El};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,k,p,h,g){return function(){function e(b,c){this.IKa=0;this.component=b;this.UI=void 0;this.IA=c;this.PD=g.Dm(this.PD.bind(this));this.HO=g.Dm(this.HO.bind(this));this.RD=g.Dm(this.RD.bind(this),!0)}e.prototype.MNa=function(b){this.UI!==b&&((this.UI=b)?this.yla():this.VGa(),this.oqa())};
e.prototype.oqa=function(){this.wa().i8(this.UI?p.TP:p.kB,this.UI?!0:!1)};e.prototype.iIa=function(){return this.UI||!1};e.prototype.Nib=function(b){this.component.o(new h(k.Ra,b.x,b.y,b.pageX,b.pageY))};e.prototype.Oib=function(b){this.component.o(new h(k.mb,b.x,b.y,b.pageX,b.pageY))};e.prototype.Pib=function(b){this.component.o(new h(k.bb,b.x,b.y,b.pageX,b.pageY))};e.prototype.Kib=function(b){this.component.o(new h(k.oa,b.x,b.y,b.pageX,b.pageY))};e.prototype.Lib=function(b){this.component.o(new h(k.Ik,
b.x,b.y,b.pageX,b.pageY))};e.prototype.PD=function(b){this.wa().WN.bind(k.bb,this.RD,this,!0);this.EMa(b)};e.prototype.EMa=function(b,c){var d;c===void 0&&(c=!0);var f=this.L5(b);f!==null&&(c&&this.i$a(f),this.Nib(f),(d=this.Cn())===null||d===void 0||d.EMa(b,c&&this.component.get("propagateClick")))};e.prototype.HO=function(b){this.component.Wb().lE(this.component);this.FMa(b)};e.prototype.FMa=function(b){var c,d=this.L5(b);d!==null&&(this.h$a(d),this.Oib(d),(c=this.Cn())===null||c===void 0||c.FMa(b))};
e.prototype.RD=function(b){this.wa().WN.h(k.bb,this.RD,this);var c=this.L5(b);c!==null&&(this.GMa(b,this.sdb(c)),this.gdb(c))};e.prototype.GMa=function(b,c){var d,f=this.L5(b);f!==null&&(this.Pib(f),this.g$a(c),(d=this.Cn())===null||d===void 0||d.GMa(b,c))};e.prototype.i$a=function(b){this.component.bind(k.Db,this.oGa,this,!0);this.qI=b};e.prototype.h$a=function(b){this.qI&&this.RHa(this.qI,b)>20&&this.Uka()};e.prototype.g$a=function(b){this.qI&&(this.Kib(this.qI),b&&this.Lib(this.qI),this.Uka())};
e.prototype.Uka=function(){this.qI&&(this.component.h(k.Db,this.oGa,this),this.qI=void 0)};e.prototype.oGa=function(){this.Uka()};e.prototype.L5=function(b){var c=this.IA.Cbb(b.pageX,b.pageY,this.wa().AI);return c?{x:c.x,y:c.y,pageX:b.pageX,pageY:b.pageY}:null};e.prototype.wa=function(){return this.component.wa()};e.prototype.Cn=function(){var b=this.component.getParent();if(b)return b.gIa()};e.prototype.yla=function(){var b=this.wa().WN;b.bind(k.Ra,this.PD,this,!0);b.bind(k.mb,this.HO,this,!0)};
e.prototype.VGa=function(){var b=this.wa().WN;b.h(k.Ra,this.PD,this);b.h(k.mb,this.HO,this)};e.prototype.gdb=function(b){this.IKa=Date.now();this.HKa=b};e.prototype.sdb=function(b){return Date.now()-this.IKa>500||!this.HKa?!1:this.RHa(this.HKa,b)<=20};e.prototype.RHa=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,k,p,h){return function(g){function e(b,c){b=g.call(this,b,c)||this;b.CJa=!1;return b}P(e,g);e.prototype.wa=function(){return g.prototype.wa.call(this)};e.prototype.NNa=function(b){this.CJa=b;this.oqa()};e.prototype.PD=function(b){this.wa().n6.bind(h.bb,this.RD,this,!0);g.prototype.PD.call(this,
b)};e.prototype.RD=function(b){this.wa().n6.h(h.bb,this.RD,this);g.prototype.RD.call(this,b)};e.prototype.oqa=function(){this.UI?this.CJa?(this.wa().i8(p.TP,!0),this.wa().Xoa(p.kB,!1)):(this.wa().i8(p.kB,!1),this.wa().Xoa(p.Xra,!0)):(this.wa().i8(p.kB,!1),this.wa().Xoa(p.kB,!1))};e.prototype.yla=function(){g.prototype.yla.call(this);var b=this.wa().n6;b.bind(h.Ra,this.PD,this,!0);b.bind(h.mb,this.HO,this,!0)};e.prototype.VGa=function(){var b=this.wa().WN;b.h(h.Ra,this.PD,this);b.h(h.mb,this.HO,this)};
return e}(k)});
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,k,p,h){return function(g){function e(b,c){b=g.call(this,b,c)||this;b.Az=0;b.Bz=0;b.tlb=void 0;b.ulb=void 0;b.TD=!1;b.UD=!1;b.tGa=0;b.$B=b.$B.bind(b);b.dD=b.dD.bind(b);b.xla();return b}P(e,g);e.prototype.xla=function(){this.wa().aJa.bind(k.Ra,this.$B,this,!1);this.wa().gQa.bind(k.Ra,
this.dD,this,!1);this.component.bind(k.Ra,this.r$a,this,!1);this.component.bind(k.rc,this.Iba,this,!1);this.component.bind(k.Db,this.Hba,this,!1);this.component.bind(k.tr,this.s$a,this,!1)};e.prototype.wa=function(){return this.component.wa()};e.prototype.$B=function(){this.component.yw(!0);this.TD=!0};e.prototype.dD=function(){this.component.zw(!0);this.UD=!0};e.prototype.Iba=function(){this.component.wE(!0)};e.prototype.Hba=function(){this.component.wE(!1)};e.prototype.r$a=function(b){this.component.bn||
this.component.cn?(this.IA.bind(k.mb,this.AGa,this,!1),this.IA.bind(k.bb,this.BGa,this,!1),this.Az=b.pageX,this.Bz=b.pageY):this.q$a(b)};e.prototype.AGa=function(b){var c=0,d=0;this.TD&&(c=(b.pageX-this.Az)/this.wa().$Ia);this.UD&&(d=(b.pageY-this.Bz)/this.wa().fQa);this.Az=b.pageX;this.Bz=b.pageY;c==0&&d==0||this.component.GO(c,d,"content")};e.prototype.BGa=function(){this.IA.h(k.mb,this.AGa,this);this.IA.h(k.bb,this.BGa,this);this.component.yw(!1);this.component.zw(!1);this.UD=this.TD=!1};e.prototype.tba=
function(b){return b.delta>0&&this.component.MN()||b.delta<0&&this.component.KN()?!0:!1};e.prototype.s$a=function(b){b=(h.Od()==h.NY?b.SN*.1:b.delta)*.3;this.component.GO(0,-b,"page")};e.prototype.q$a=function(b){if(this.component.LN()||this.component.NN())this.IA.bind(k.mb,this.yGa,this,!1),this.IA.bind(k.bb,this.zGa,this,!1),this.component.wE(!0),this.Az=b.pageX,this.Bz=b.pageY,this.ddb()};e.prototype.yGa=function(b){var c=b.pageX-this.Az,d=b.pageY-this.Bz;!this.TD&&!this.UD&&c*c+d*d>25&&(this.TD=
this.component.LN(),this.UD=this.component.NN(),this.component.yw(this.TD),this.component.zw(this.UD));if(this.TD||this.UD)this.component.GO(this.TD?-c:0,this.UD?-d:0),this.Az=b.pageX,this.Bz=b.pageY,this.bjb()};e.prototype.zGa=function(){this.IA.h(k.mb,this.yGa,this);this.IA.h(k.bb,this.zGa,this);this.component.wE(!1);var b=Math.max(Math.abs(this.wGa/.001),Math.abs(this.xGa/.001));this.component.wFa(-.5*this.wGa*b,-.5*this.xGa*b,b)};e.prototype.ddb=function(){this.uGa=this.Az;this.vGa=this.Bz};e.prototype.bjb=
function(){var b=(new Date).getTime(),c=b-this.tGa;c>10&&(this.tGa=b,this.wGa=(this.Az-this.uGa)/c,this.xGa=(this.Bz-this.vGa)/c,this.uGa=this.Az,this.vGa=this.Bz)};return e}(p)});
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,k,p,h,g,e,b){return function(){function c(){}c.prototype.create=function(d,f){if(d instanceof e)return new h(d,
f[0]);if(d instanceof b)return new g(d,f[0]);if(d instanceof k)return new p(d,f[0]);throw Error("Invalid UI instance");};c.HI=function(){c.El||(c.El=new c);return c.El};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".split(" "),function(a,m,k,p,h,g,e,b){a=function(c){function d(){var f=c.call(this)||this;f.QJ=null;f.content=null;f.wma=null;f.F6=!1;f.$ma=0;f.ana=0;f.X6=[];f.Nq=!1;f.A6=!1;return f}P(d,c);d.prototype.Ooa=function(f){this.content=f};d.prototype.z8=
function(f){this.QJ!==f&&(this.QJ&&(g.O.h(b.V,this.kb,this),g.O.h(b.me,this.Bg,this)),(this.QJ=f)?(g.O.bind(b.V,this.kb,this,!0),this.kb()):this.JX(null))};d.prototype.kb=function(){g.isPresenting?(g.O.bind(b.me,this.Bg,this,!0),this.Bg()):g.O.h(b.me,this.Bg,this)};d.prototype.Bg=function(){this.onChange()};d.prototype.onChange=function(){var f,n;this.QJ?(this.JX(this.QJ.Pg),(f=this.QJ)===null||f===void 0||f.uE(this.Nq,this.A6)):this.wma&&(this.JX(this.wma.Pg),(n=this.wma)===null||n===void 0||n.JX(this.Nq,
this.A6))};d.prototype.JX=function(f){var n;(n=this.content)!==null&&n!==void 0&&n.wa()&&(f?this.HFa(f.YLa,f.ZLa,f.pressed):this.HFa(void 0,void 0,!1))};d.prototype.HFa=function(f,n,l){if(f!==this.$ma||n!==this.ana||this.F6!==l){var q=f===void 0?this.$ma:f,r=n===void 0?this.ana:n;this.Mj(f,n);this.F6!==l&&((this.F6=l)?this.Rh(q,r):this.ef(q,r));this.$ma=q;this.ana=r}};d.prototype.Mj=function(f,n){var l,q,r=f!==void 0&&n!==void 0;r&&this.o(new p(b.mb,f,n,f,n));r=r?this.kIa(f,n):[];r.length>0?(this.A6=
r[0].cursor=="pointer",r.forEach(function(t){t.O.o(new p(b.mb,f-t.left,n-t.top,f,n))}),this.Nq=!0):(this.Nq&&((q=(l=this.content)===null||l===void 0?void 0:l.Wb())===null||q===void 0||q.lE(null)),this.Nq=this.A6=!1)};d.prototype.Rh=function(f,n){this.o(new p(b.Ra,f,n,f,n));this.X6=this.kIa(f,n);this.X6.forEach(function(l){l.O.o(new p(b.Ra,f-l.left,n-l.top,f,n))})};d.prototype.ef=function(f,n){this.o(new p(b.bb,f,n,f,n));this.X6.forEach(function(l){l.O.o(new p(b.bb,f-l.left,n-l.top,f,n))});this.X6=
[]};d.prototype.kIa=function(f,n){var l,q=(l=this.content)===null||l===void 0?void 0:l.wa();if(!q)return[];l=q.fbb();if(!l)return[];var r=l.rect;return this.uHa(f+r.left,n+r.top,l.layers).reduce(function(t,u){t.length!=0&&t[t.length-1].nD||t.push(u);return t},[]).reduce(function(t,u){t.find(function(v){return v.O===u.O})||t.push(u);return t},[]).map(function(t){return{O:t.O,cursor:t.cursor,left:t.rect.left-r.left,top:t.rect.top-r.top}})};d.prototype.uHa=function(f,n,l){for(var q=[],r=l.length-1;r>=
0;r--){var t=l[r];q=q.concat(this.uHa(f,n,t.layers));t.opacity>0&&t.pA!==k.kB&&t.visibleRect.containsPoint(f,n)&&(t.pA===k.Xra&&t.canvas?t.canvas.getContext("2d").getImageData(f-t.rect.left,n-t.rect.top,1,1).data[3]>0&&q.push(t):q.push(t))}return q};d.prototype.Cbb=function(f,n,l){var q,r=(q=this.content)===null||q===void 0?void 0:q.wa();return r?(l=r.xIa(l))?{x:f-l.rect.left,y:n-l.rect.top}:null:null};return d}(e);(function(c){function d(f){var n=c.call(this)||this;n.vma=f;n.Pg=null;n.Mj=n.Mj.bind(n);
n.Rh=n.Rh.bind(n);n.ef=n.ef.bind(n);document.addEventListener("mousemove",n.Mj,!0);document.addEventListener("mousedown",n.Rh,!0);document.addEventListener("mouseup",n.ef,!0);return n}P(d,c);d.prototype.ac=function(){return this.vma};d.prototype.dispose=function(){document.removeEventListener("mousemove",this.Mj,!0);document.removeEventListener("mousedown",this.Rh,!0);document.removeEventListener("mouseup",this.ef,!0)};d.prototype.JX=function(f,n){this.vma.style.cursor=n?"pointer":"default"};d.prototype.Mj=
function(f){this.uqa(f);f.preventDefault();f.stopPropagation()};d.prototype.Rh=function(f){this.pressed=!0;this.uqa(f);f.preventDefault();f.stopPropagation()};d.prototype.ef=function(f){this.pressed=!1;this.uqa(f);f.preventDefault();f.stopPropagation()};d.prototype.uqa=function(f){var n=this.vma.getBoundingClientRect(),l=f.clientX-n.left;f=f.clientY-n.top;var q=n.width;n=n.height;l>=0&&l<=q&&f>=0&&f<=n?(this.Pg||(this.Pg=new h),this.Pg.YLa=l,this.Pg.ZLa=f,this.Pg.distance=1,this.Pg.pressed=this.pressed):
this.Pg=null;this.o(b.V)};return d})(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,k,p,h,g,e,b,c){a=function(f){function n(){var l=f.call(this)||this;d.Aka(l);l.gja=new b;l.rf=null;l.CL=!1;return l}P(n,f);n.prototype.set=function(l,q){f.prototype.set.call(this,
l,q);switch(l){case "content":this.Ooa(q);break;case "autoCenter":this.e8(q);break;case "draggable":this.rX(q);break;case "modal":this.p8(q);break;case "yaw":this.cj(q);break;case "pitch":this.Tn(q);break;case "distance":this.sp(q);break;case "pixelScale":this.HX(q)}return this};n.prototype.get=function(l,q){switch(l){case "yaw":return this.Fa=this.rf?this.rf.Jc():this.Fa;case "pitch":return this.qb=this.rf?this.rf.Ic():this.qb;default:return f.prototype.get.call(this,l,q)}};n.prototype.Moa=function(l){this.Fb!==
l&&(this.Fb=l,this.Wn())};n.prototype.NGa=function(){if(!this.rf){var l=c.I$a();this.z8(l)}};n.prototype.lla=function(){if(this.rf){var l=this.rf;this.z8(null);c.hab(l)}};n.prototype.z8=function(l){if(this.rf!==l&&(this.rf&&(this.Fa=this.rf.Jc(),this.qb=this.rf.Ic()),this.rf=l,this.gja.z8(l),this.rf&&(this.rf.sp(this.iG),this.rf.HX(this.Jga),this.rf.e8(this.LK),this.rf.rX(this.Gca),this.rf.p8(this.wfa),this.LK||(this.rf.cj(this.Fa),this.rf.Tn(this.qb)),this.CL)))this.onChange()};n.prototype.Ooa=function(l){this.kj!==
l&&(this.kj&&(this.kj.h(p.Yb,this.kl,this),this.kj.h(p.INIT,this.gLa,this),this.kj.wa().h(p.V,this.onChange,this)),this.oD(),this.kj=l)&&(this.kj.getParent()&&this.kj.getParent().removeChild(this.kj),this.kj.bind(p.Yb,this.kl,this,!0),this.kj.bind(p.INIT,this.gLa,this,!0),this.gja.Ooa(l),this.Wn())};n.prototype.e8=function(l){var q;this.LK!==l&&(this.LK=l,(q=this.rf)===null||q===void 0||q.e8(this.LK))};n.prototype.rX=function(l){var q;this.Gca!==l&&(this.Gca=l,(q=this.rf)===null||q===void 0||q.rX(this.Gca))};
n.prototype.p8=function(l){var q;this.wfa!==l&&(this.wfa=l,(q=this.rf)===null||q===void 0||q.p8(this.wfa))};n.prototype.cj=function(l){var q;this.LK||(this.Fa=l,(q=this.rf)===null||q===void 0||q.cj(this.Fa))};n.prototype.Tn=function(l){var q;this.LK||(this.qb=l,(q=this.rf)===null||q===void 0||q.Tn(this.qb))};n.prototype.sp=function(l){var q;this.iG!==l&&(this.iG=l,(q=this.rf)===null||q===void 0||q.sp(this.iG))};n.prototype.HX=function(l){var q;this.Jga!==l&&(this.Jga=l,(q=this.rf)===null||q===void 0||
q.HX(this.Jga))};n.prototype.kl=function(){};n.prototype.gLa=function(){this.CL=!0;var l=this.kj.wa();l.bind(p.V,this.onChange,this,!0);l.Fgb();this.onChange()};n.prototype.onChange=function(){var l,q,r;if(this.kj){var t=this.kj.wa();t=(t===null||t===void 0?void 0:t.getLayers())||[];t.length!=0&&(t=t[0],t.canvas.width>0&&t.canvas.height>0&&((l=this.rf)===null||l===void 0||l.Kjb(t.canvas),(q=this.rf)===null||q===void 0||q.Sn(t.opacity),l=this.kj.get("actualHeight"),q=this.kj.get("actualWidth"),(r=
this.rf)===null||r===void 0||r.mgb(q*.5-t.rect.left,l-t.rect.top+20)))}};n.prototype.Wn=function(){var l;(l=this.kj)===null||l===void 0||l.Wn(this.Fb,g.HI(),e.HI(),[this.gja])};n.prototype.oD=function(){var l;(l=this.kj)===null||l===void 0||l.oD()};return n}(k);var d=h.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,k,p,h,g,e){a=function(d){function f(){var n=d.call(this)||this;n.vFa=!1;n.cf("XRWindow");n.eg=new p;n.eg.set("content",n);n.bind(e.kK,n.meb,n,!1);return n}P(f,d);f.prototype.set=function(n,l){switch(n){case "modal":this.eg.set("modal",l);break;case "autoCenter":this.eg.set("autoCenter",l);
break;case "draggable":this.eg.set("draggable",l);break;default:d.prototype.set.call(this,n,l)}};f.prototype.show=function(n){var l=this;this.R4();!n&&this.vFa||this.get("autoCenter")||(this.eg.set("yaw",h.isPresenting?-b.setFromQuaternion(h.Bm,"YXZ").y*c:0),this.eg.set("pitch",h.isPresenting?b.setFromQuaternion(h.Bm,"YXZ").x*c:0));n=this.get("application");var q=n.get("xrPanels")||[];n.set("xrPanels",q.filter(function(r){return r!==l.eg}).concat([this.eg]));this.vFa=!0;setTimeout(function(){l.set("visible",
!0)},0)};f.prototype.Pe=function(){this.Q4();this.set("visible",!1)};f.prototype.meb=function(){var n=this,l=this.get("application"),q=l.get("xrPanels")||[];l.set("xrPanels",q.filter(function(r){return r!==n.eg}))};return f}(k);var b=new g.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,k,p){a=function(g){function e(){var b=g.call(this)||this;h.Aka(b);b.show=b.show;b.hide=b.Pe;return b}P(e,g);return e}(p);var h=k.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.lO=
this.source.get("grayscale");this.$z=new f(h.Fp)}var k=a("tdv/binding/BindingsHandler"),p=a("tdv/constants/EventName"),h=a("tdv/constants/Priority"),g=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"),n=a("tdv/view/constants/ScaleMode"),l=a("tdv/player/view/util/Device"),q=a("tdv/utils"),r=q.extend(e,function(){e.call(this);this.j1=this.j1.bind(this);this.Eh=null;this.qe=
[];this.No=[];this.Xj=this.bi=this.Fg=this.Gg=100;this.Dj=1;this.GB=this.FB=.5;this.Vc=1;this.Ok=this.dk=null;this.a2=!1;this.Wba={};this.bL={};this.bL.low={};this.bL.hight={};l.EN()==l.CP&&(this.bL.low.transform="translateZ(0)",this.bL.hight.transform="");this.ga=!1;this.Hi="inherit";this.pa=document.createElement("div");this.pa.style.position="absolute";this.pa.style.left="0";this.pa.style.top="0";this.pa.style.right="0";this.pa.style.bottom="0";this.pa.style.overflow="hidden";this.pR=null;this.mh=
q.Qq(this.ya,this)});r.prototype.ac=function(){return this.pa};r.prototype.eP=function(t){this.ji!=t&&(this.ji=t,this.Zaa(1),this.mh())};r.prototype.g8=function(t){this.Hi!=t&&(this.Hi=t,this.Ok&&(this.Ok.style.cursor=this.Hi),this.dk&&(this.dk.style.cursor=this.Hi))};r.prototype.Agb=function(t){this.qe!=t&&(this.qe&&k.ca(this.qe,["levels.url"],this.j1),(this.qe=t)&&k.ba(this.qe,["levels.url"],this.j1,!0))};r.prototype.j1=function(){this.zba();this.Eh=null;this.dk&&(this.pa.removeChild(this.dk),this.dk=
null);this.Ok&&(this.pa.removeChild(this.Ok),this.Ok=null);this.Tg&&(this.Tg=null);this.zba();this.a2=!1;this.No.forEach(u=>{u.$z.cancel();u.$z.h(p.ha,this.Hxa,this)});this.No=(this.qe&&this.qe.get("levels")||[]).filter(function(u){return u.get("url")}).map(u=>{u=new m(u);u.$z.bind(p.ha,this.Hxa,this);return u});var t=this.jZa();t?(this.bi=t.width,this.Xj=t.height):this.Xj=this.bi=100;this.GB=this.FB=.5;this.Zaa(1);this.mh()};r.prototype.f8=function(t,u){if(this.Gg!=t||this.Fg!=u)this.Gg=t,this.Fg=
u,this.mh()};r.prototype.hgb=function(t,u){if(this.Uua!=t||this.Tua!=u)this.Uua=t,this.Tua=u,this.mh()};r.prototype.Ua=function(t){this.ga!=t&&(this.ga=t,this.mh())};r.prototype.move=function(t,u){var v=this.Dj*this.Vc;this.FB+=t/(this.bi*v);this.GB+=u/(this.Xj*v);this.I2()};r.prototype.Tz=function(){return this.Vc};r.prototype.setScale=function(t){this.Zaa(Math.max(1,Math.min(1/this.Dj,t)));this.Eh&&this.Eh.width<this.Vc*this.Dj*this.bi&&this.Eh.width<this.bi?this.ya():this.I2()};r.prototype.NJa=
function(t){if(!this.dk)return!1;var u=q.offset(this.dk),v=t.pageX-u.left;t=t.pageY-u.top;return v>=0&&t>=0&&v<this.dk.clientWidth&&t<this.dk.clientHeight};r.prototype.ya=function(){if(this.ga){this.i8a();var t=this.sZa();t&&t.$z.aj()?(t!=this.Eh&&(this.Eh||(this.mh(),this.a2=!0),this.hXa(t),this.Eh=t),this.tCa(null)):this.tCa(t);this.I2()}};r.prototype.i8a=function(){switch(this.ji){case n.Ep:var t=this.Gg/this.bi;break;case n.Hk:t=this.Fg/this.Xj;break;case n.nr:t=this.bi*this.Fg>this.Xj*this.Gg?
this.Fg/this.Xj:this.Gg/this.bi;break;case n.HQa:t=Math.min(this.Uua/this.bi,this.Tua/this.Xj);break;default:t=this.bi*this.Fg>this.Xj*this.Gg?this.Gg/this.bi:this.Fg/this.Xj}this.tUa(t)};r.prototype.Hxa=function(){this.mh()};r.prototype.hXa=function(t){this.Ok&&(this.aia(this.Ok,1),this.dk&&this.pa.removeChild(this.dk),this.dk=this.Ok);this.Ok=this.BWa(t);this.aia(this.Ok,0);this.pa.appendChild(this.Ok);this.Tg=this.sWa();this.Wba={}};r.prototype.sZa=function(){return this.Eh?this.zYa(this.Vc*this.Dj*
this.bi):this.QZa()};r.prototype.tCa=function(t){this.No.forEach(u=>{u==t?u.$z.hl()!=u.url&&u.$z.load(u.url):u.$z.aj()||u.$z.cancel()})};r.prototype.jZa=function(){return this.No.reduce((t,u)=>{t||(t=u);if(u.width>t.width||u.width==t.width&&!u.lO&&t.lO)t=u;return t},null)};r.prototype.QZa=function(){return this.No.reduce((t,u)=>{t||(t=u);if(u.width<t.width||u.width==t.width&&u.lO&&!t.lO)t=u;return t},null)};r.prototype.zYa=function(t){return this.No.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.lO&&u.lO)u=v;return u},null)};r.prototype.BWa=function(t){t=t.$z.qg(!0);t.style.position="absolute";t.style.cursor=this.Hi;t.style.pointerEvents="none";return t};r.prototype.sWa=function(){return new c("linear",[new d("alpha",0,1)],200)};r.prototype.I2=function(){b.requestFrame(function(t){this.D2(t,"low")},this)};r.prototype.Zla=function(){return this.Vc*this.Dj*this.bi};r.prototype.Yla=function(){return this.Vc*this.Dj*this.Xj};r.prototype.dIa=
function(){var t=this.Zla();return t>this.Gg?Math.max(this.Gg-t,Math.min(0,this.Gg*.5-t*this.FB)):(this.Gg-t)*.5};r.prototype.eIa=function(){var t=this.Yla();return t>this.Fg?Math.max(this.Fg-t,Math.min(0,this.Fg*.5-t*this.GB)):(this.Fg-t)*.5};r.prototype.D2=function(t,u){u=u||"low";var v=this.Zla(),w=this.dIa(),y=this.Yla(),x=this.eIa();this.FB=(this.Gg*.5-w)/v;this.GB=(this.Fg*.5-x)/y;v={left:Math.round(w)+"px",top:Math.round(x)+"px",width:Math.round(v)+"px",height:Math.round(y)+"px",display:"block"};
for(var z in this.bL[u])v[z]=this.bL[u][z];if(this.Wba!=v){if(this.dk)for(z in v)this.dk.style[z]=v[z];if(this.Ok)for(z in v)this.Ok.style[z]=v[z];this.Wba=v}this.zba();this.Tg?(this.Tg.Lb(t),this.aia(this.Ok,this.Tg.ib("alpha")),this.Tg.Qe()&&(this.Tg=null,this.dk&&this.pa.removeChild(this.dk),this.dk=this.Ok,this.Ok=null),this.I2()):u=="low"&&this.Q5a();!this.Tg&&this.a2&&(this.a2=!1,this.o(new g(p.ha)))};r.prototype.aia=function(t,u){t.style.opacity=u};r.prototype.zba=function(){this.pR!=null&&
(clearTimeout(this.pR),this.pR=null)};r.prototype.Q5a=function(){var t=this;this.pR=setTimeout(function(){t.pR=null;t.D2(50,"hight")},50)};r.prototype.Zaa=function(t){this.Vc!=t&&(this.Vc=t,this.$6a())};r.prototype.tUa=function(t){this.Dj!=t&&(this.Dj=t)};r.prototype.$6a=function(){this.o(new g(r.HY,{scale:this.Vc}))};r.HY="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"),k=a("tdv/events/Event"),p=a("tdv/player/view/zoomimage/Renderer"),h=a("tdv/utils"),g=a("tdv/view/core/UIComponent");g=a("tdv/view/core/UIComponent");var e=h.extend(g,function(){g.call(this);this.cf("ZoomImage");this.Ry=this.$o=void 0;this.Tl=!1;this.aBa=
void 0;this.hxa=this.Vc=1;this.MU=null;this.m=new p;this.m.bind(m.ha,this.P1a,this);this.m.bind(p.HY,this.Q1a,this);this.bind(m.Yb,this.jd,this,!0);this.bind(m.Cd,this.To,this,!0);this.bind(m.sd,this.Ro,this,!0);this.bind(m.Ra,this.re,this,!0);this.bind(m.mb,this.Uk,this,!0);this.bind(m.bb,this.Vk,this,!0);this.bind(m.tr,this.bH,this,!0);this.bind(m.iK,this.uG,this,!0)});e.prototype.Ib=function(){g.prototype.Ib.call(this);this.m.ac().parentElement||this.wa().kk(this.m.ac())};e.prototype.set=function(b,
c){switch(b){case "scale":this.m.setScale(c);c=this.m.Tz();break;case "imageLeft":case "imageTop":case "imageWidth":case "imageHeight":return}g.prototype.set.call(this,b,c)};e.prototype.get=function(b,c){switch(b){case "scale":return this.m.Tz();case "imageLeft":return this.m.dIa();case "imageTop":return this.m.eIa();case "imageWidth":return this.m.Zla();case "imageHeight":return this.m.Yla()}return g.prototype.get.call(this,b,c)};e.prototype.Nb=function(){g.prototype.Nb.call(this);this.j("image");
this.j("scaleMode");this.j("customHeight");this.j("customWidth");this.j("imageCursor");this.j("imageLeft");this.j("imageTop");this.j("imageWidth");this.j("imageHeight")};e.prototype.eb=function(){this.S("scaleMode")&&(this.m.eP(this.G("scaleMode")),this.$("scaleMode"));this.S("image")&&(this.m.Agb(this.G("image")),this.$("image"),this.hxa=this.Vc);if(this.S("customHeight")||this.S("customWidth"))this.$("customHeight"),this.$("customWidth"),this.jd();this.S("imageCursor")&&(this.$("imageCursor"),this.m.g8(this.Fb.kca.QHa(this.get("imageCursor"))));
g.prototype.eb.call(this)};e.prototype.jd=function(){var b=this.cb(),c=this.Kb(),d=this.get("customWidth","100%"),f=g.pp(d);d=f!==void 0?b*f/100:d;f=this.get("customHeight","100%");var n=g.pp(f);this.m.hgb(d,n!==void 0?c*n/100:f);this.m.f8(b,c)};e.prototype.To=function(){this.m.Ua(!0)};e.prototype.Ro=function(){this.m.Ua(!1)};e.prototype.re=function(b){this.$o=b.x;this.Ry=b.y;this.Tl=!0;this.aBa=this.m.NJa(b)};e.prototype.Uk=function(b){this.Tl&&(this.Zja(),this.m.move(-(b.x-this.$o),-(b.y-this.Ry)),
this.$o=b.x,this.Ry=b.y)};e.prototype.Vk=function(b){this.Tl=!1;this.aBa||this.m.NJa(b)||this.o(new k(e.TQa))};e.prototype.bH=function(b){this.Zja();this.m.setScale((1+b.delta/20)*this.m.Tz())};e.prototype.uG=function(b){this.Zja();this.m.setScale(b.scale/this.hxa)};e.prototype.P1a=function(){this.o(new k(m.ha))};e.prototype.Q1a=function(){g.prototype.set.call(this,"scale",this.m.Tz());this.o(new k(e.HY))};e.prototype.Zja=function(){this.MU?(clearTimeout(this.MU),this.MU=null):this.o(new k(e.Rj));
this.MU=setTimeout(function(){this.MU=null;this.o(new k(e.Qj))}.bind(this),300)};e.TQa="backgroundClick";e.HY="scaleChange";e.Rj="userInteractionStart";e.Qj="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(n,l){this.type=n;this.stack=l}function k(){}var p=a("tdv/utils"),h=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/parser/Sign");a("tdv/player/script/classes");a("tdv/player/view/util/URL");k.prototype.Seb=function(n,l,q,r){this.Xca=[];this.NC=this.DM(n);this.LG=void 0;this.NC.Iv.jIa()?(this.m4=g.validate(n),
this.LG=this.Sva(this.NC,e.TYPE),this.EWa(this.LG,this.NC,l,q,r),this.oUa(this.NC),this.mUa(this.NC,this.LG),this.pUa(this.LG,this.NC),this.NUa(this.LG,this.NC)):this.Kp("Invalid root class",[]);return this.Xca.length==0};k.prototype.Wb=function(){return this.NC.instance};k.prototype.DM=function(n,l){l=l||[];return Array.isArray(n)?this.U2a(n,l):p.Sma(n)&&n["class"]?this.X2a(n,l):p.Sma(n)?this.V2a(n,l):p.IJa(n)?this.W2a(n,l):this.Y2a(n,l)};k.prototype.U2a=function(n,l){for(var q=[],r=0;r<n.length;r++)l.push("Item["+
r+"]"),q.push(this.DM(n[r],l)),l.pop();return new b(l.slice(),q)};k.prototype.X2a=function(n,l){var q=n["class"],r=h.ri(n["class"]);if(r){q={};var t={},u;for(u in n){l.push(u);var v=n[u];switch(u){case "class":break;case "scripts":var w=this.DM(v,l);break;default:r.hasAttribute(u)?q[u]=this.DM(v,l):r.cJa(u)||r.dJa(u)?t[u]=this.DM(v,l):this.Kp(r.Pz()+" object doesn't have any attribute named "+u,l)}l.pop()}return new e(l.slice(),r,n.id,q,t,w)}this.Kp("Undefined class name: "+q,l.slice());return new f(l.slice(),
null)};k.prototype.V2a=function(n,l){var q={},r;for(r in n)l.push(r),q[r]=this.DM(n[r],l),l.pop();return new c(l.slice(),q)};k.prototype.W2a=function(n,l){return new d(l.slice(),n)};k.prototype.Y2a=function(n,l){return new f(l.slice(),n)};k.prototype.Sva=function(n,l){var q=l&&n.type!=l?[]:[n],r=0;for(n=n.Ab();r<n.length;r++)q=q.concat(this.Sva(n[r],l));return q};k.prototype.EWa=function(n,l,q,r,t){l.instance=l.Iv.ni(null,r,t,[q,this.m4]);l.instance.set("application",l.instance);for(q=0;q<n.length;q++){var u=
n[q];u!=l&&(u.instance=u.Iv.ni(l.instance,r,t))}};k.prototype.oUa=function(n){if(n.scripts)if(n.scripts.type==c.TYPE)for(var l in n.scripts.value)this.nUa(n,l);else this.Kp("Invalid content.",n.scripts.stack)};k.prototype.nUa=function(n,l){var q=n.instance,r=n.scripts.value[l];q[l]!==void 0?this.Kp("Identifier: "+l+" is already in use",r.stack):r&&r.type==d.TYPE?q[l]=function(){return r.$v().apply(q,arguments)}:this.Kp("Invalid content.",r.stack)};k.prototype.mUa=function(n,l){n=n.instance;for(var q=
0;q<l.length;q++){var r=l[q],t=r.id;t&&(n[t]===void 0?n[t]=r.instance:this.Kp("Identifier: "+t+" is arleady in use",r.stack))}};k.prototype.pUa=function(n,l){for(var q=0;q<n.length;q++){var r=n[q],t=r.attributes,u;for(u in t)this.lUa(r,u,l)}};k.prototype.lUa=function(n,l,q){var r=n.Iv;if(r.hasAttribute(l)){try{var t=n.attributes[l].$v()}catch(u){this.Kp("Invalid value for property "+l+" of "+r.Pz()+" instance",n.stack)}try{t=r.Nla(l)(t,q.instance),n.instance.set(l,t)}catch(u){this.Kp("Invalid value for property "+
l+" of "+r.Pz()+" instance",n.stack)}}else this.Kp(r.Pz()+" object doesn't have any property named "+l,n.stack)};k.prototype.NUa=function(n,l){for(var q=0;q<n.length;q++){var r=n[q],t;for(t in r.CI)this.MUa(r,t,l)}};k.prototype.MUa=function(n,l,q){var r=n.Iv,t=n.instance,u=r.cJa(l),v=r.dJa(l);if(u||v){n=n.CI[l];var w=n.$v();p.IJa(w)?t.bind(l,w,q.instance,v,w,!0):typeof w=="string"?t.bind(l,function(){try{eval("var event = arguments[0];"+w)}catch(y){throw y;}},q.instance,v,w,!0):this.Kp("Invalid value.",
n.stack)}else this.Kp(r.Pz()+" object doesn't have any event named "+l,n.stack)};k.prototype.Kp=function(n,l){this.Xca.push("In "+l.join(" >> ")+": "+n)};m.prototype.Ab=function(){return[]};m.prototype.$v=function(){};var e=p.extend(m,function(n,l,q,r,t,u){m.call(this,e.TYPE,n);this.Iv=l;this.id=q;this.attributes=r;this.CI=t;this.scripts=u;this.instance=null});e.prototype.Ab=function(){var n=this.Iv.wIa(),l=[],q=Object.assign({},this.attributes);if(n)for(var r=0;r<n.length;r++){var t=n[r];q[t]!=void 0&&
(l.push(q[t]),delete q[t])}return l=l.concat(Object.values(q))};e.prototype.$v=function(){return this.instance};e.TYPE="instance";var b=p.extend(m,function(n,l){m.call(this,b.TYPE,n);this.items=l});b.prototype.Ab=function(){return this.items.slice()};b.prototype.$v=function(){for(var n=[],l=0;l<this.items.length;l++)n.push(this.items[l].$v());return n};b.TYPE="array";var c=p.extend(m,function(n,l){m.call(this,c.TYPE,n);this.value=l});c.prototype.Ab=function(){return Object.values(this.value)};c.prototype.$v=
function(){var n={},l;for(l in this.value)n[l]=this.value[l].$v();return n};c.TYPE="dict";var d=p.extend(m,function(n,l){m.call(this,d.TYPE,n);this.value=l});d.prototype.$v=function(){return this.value};d.TYPE="function";var f=p.extend(m,function(n,l){m.call(this,f.TYPE,n);this.value=l});f.prototype.$v=function(){return this.value};f.TYPE="simple";return k});
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.jU=u;this.ri=this.ri.bind(this);this.ni=this.ni.bind(this);this.Nv=this.Nv.bind(this);this.Qa=this.Qa.bind(this);
this.H5=this.H5.bind(this);e.yb()&&!e.$f()&&q.gt();this.VZ=[];u=n.name;var w=[];u&&w.push(u);n.uW>0?w.push("v:"+n.uW+"."+n.AW):w.push("v:"+n.AW);r.log(w.join(" "));this.Zq=v;c.pdb()||[e.ZJ,e.NE].indexOf(e.Rb())>=0?(this.Ol=new g,(v=this.Zq.get(TDV.PlayerSettings.BASE_DIR_URL))?(v=c.FA(v),v[v.length-1]!="/"&&(v+="/")):v=c.getDirectory(this.Zq.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)),this.loa=this.Zq.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS),b.hfb(v,function(y){this.Fka=y;this.r2a()}.bind(this))):
window.alert(l("web-server-required"))}var k=a("tdv/constants/EventName"),p=a("tdv/events/Event"),h=a("tdv/player/parser/ClassInfo"),g=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"),n=a("tdv/player/AppInfo"),l=a("tdv/player/l10n"),q=a("tdv/view/util/Fullscreen"),r=a("tdv/utils");m.prototype.r2a=function(){this.jU.o(new TDV.VY(k.hSa,
{},[],void 0));r.defer(function(){if(!this.Ol.Seb(this.Zq.get(TDV.PlayerSettings.SCRIPT_DATA),this.Zq.get(TDV.PlayerSettings.CONTAINER),this.Fka,this.loa)){if(n.kib!="false"){window.alert(this.Ewa());return}r.log(this.Ewa())}this.LUa();this.dUa(this.Zq);this.rUa();d.kJ=this.Ol.Wb();d.initialize(function(){this.b7a()}.bind(this))}.bind(this))};m.prototype.clear=function(){this.Ol&&(this.qwa().forEach(function(u){u.instance.cqa();u.Iv.OV().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.Afb()}})}),f.Zeb(),this.Ol.Wb().clear(),t={},this.Zq=this.Ol=null)};m.prototype.Ubb=function(u){return this.Ol.Wb()[u]};m.prototype.ri=function(u){if(u in t)return t[u].slice();var v=[];this.qwa().forEach(function(w){w.Iv.OV().includes(u)&&
v.push(w.instance)});t[u]=v;return v.slice()};m.prototype.qwa=function(){return this.Ol?this.Ol.LG.concat(this.VZ):[]};var t={};m.prototype.ni=function(u){var v=h.ri(u);if(!v)throw"Invalid className: "+u;t={};u=this.Ol.Wb();var w={};w.Iv=v;w.instance=v.ni(u,this.Fka,this.loa);this.VZ.push(w);this.Jta(v,w.instance);this.Q6a(u,w.instance);return w.instance};m.prototype.Nv=function(u){var v=this.VZ.findIndex(function(w){return w.instance==u});v<0||(t={},this.VZ.splice(v,1),u.cqa(),u.dispose&&u.dispose())};
m.prototype.Ewa=function(){for(var u=this.Ol.Xca,v=["Errors parsing script file:"],w=0;w<u.length;w++)v.push(u[w]);return v.join("\n")};m.prototype.LUa=function(){this.Ol.LG.forEach(function(v){this.Jta(v.Iv,v.instance,v.id)}.bind(this));var u=this.Ol.Wb().RZ;u.bind(k.fK,function(){u.Sib(k.fK);this.jU.cookiesEnabled=this.jU.u$a=!0;this.jU.o(new TDV.VY(k.fK,{},[],void 0))},this,!0)};m.prototype.Jta=function(u,v,w){var y=u.OV();r.union(u.Sla(),u.$la()).forEach(function(x){v.bind(x,function(z){this.jU.o(new TDV.VY(x,
z,y,w))}.bind(this),this,!0)}.bind(this))};m.prototype.Q6a=function(u,v){u.o(new p(k.yRa,{instance:v}))};m.prototype.dUa=function(u){this.Ol.Wb().set("settings",u)};m.prototype.Qa=function(){return h.Qa.apply(h,arguments)};m.prototype.H5=function(u){!u||c.GD(u)||c.w6(u)||(u=c.hD(c.FA(u,this.Fka),this.loa));return u};m.prototype.rUa=function(){var u=this.Ol.Wb();u.getByClassName=u.ri=this.ri;u.createInstance=u.ni=this.ni;u.disposeInstance=u.Nv=this.Nv;u.isInstanceOfClass=u.Qa=this.Qa;u.getAbsoluteURL=
u.H5=this.H5};m.prototype.b7a=function(){this.Ol.Wb().start()};m.Mib=function(u){u.o(new TDV.VY(k.zRa,{},[],void 0))};return m});define("main",["require","tdv/utils","tdv/player/Main"],function(a){var m=a("tdv/utils"),k=a("tdv/player/Main");m.uab(function(){TDV.ob.bhb(k)})});
(function(global,factory){factory(global.THREE={})})(this,function(exports){"use strict";const REVISION="168";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 AlphaFormat=1021;const RGBFormat=1022;const RGBAFormat=1023;const LuminanceFormat=1024;const LuminanceAlphaFormat=1025;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 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 DisplayP3ColorSpace="display-p3";const LinearDisplayP3ColorSpace="display-p3-linear";const LinearTransfer="linear";const SRGBTransfer="srgb";const Rec709Primaries="rec709";const P3Primaries="p3";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;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){if(this._listeners===undefined)return false;const listeners=this._listeners;return listeners[type]!==undefined&&listeners[type].indexOf(listener)!==-1}removeEventListener(type,listener){if(this._listeners===undefined)return;const listeners=this._listeners;const listenerArray=listeners[type];if(listenerArray!==undefined){const index=listenerArray.indexOf(listener);if(index!==-1){listenerArray.splice(index,1)}}}dispatchEvent(event){if(this._listeners===undefined)return;const listeners=this._listeners;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:console.warn("THREE.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=Math.max(min.x,Math.min(max.x,this.x));this.y=Math.max(min.y,Math.min(max.y,this.y));return this}clampScalar(minVal,maxVal){this.x=Math.max(minVal,Math.min(maxVal,this.x));this.y=Math.max(minVal,Math.min(maxVal,this.y));return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(Math.max(min,Math.min(max,length)))}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 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;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 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={};function warnOnce(message){if(message in _cache)return;_cache[message]=true;console.warn(message)}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)})}const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3=new Matrix3().set(0.8224621,0.177538,0,0.0331941,0.9668058,0,0.0170827,0.0723974,0.9105199);const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB=new Matrix3().set(1.2249401,-0.2249404,0,-0.0420569,1.0420571,0,-0.0196376,-0.0786361,1.0982735);const COLOR_SPACES={[LinearSRGBColorSpace]:{transfer:LinearTransfer,primaries:Rec709Primaries,luminanceCoefficients:[0.2126,0.7152,0.0722],toReference:color=>color,fromReference:color=>color},[SRGBColorSpace]:{transfer:SRGBTransfer,primaries:Rec709Primaries,luminanceCoefficients:[0.2126,0.7152,0.0722],toReference:color=>color.convertSRGBToLinear(),fromReference:color=>color.convertLinearToSRGB()},[LinearDisplayP3ColorSpace]:{transfer:LinearTransfer,primaries:P3Primaries,luminanceCoefficients:[0.2289,0.6917,0.0793],toReference:color=>color.applyMatrix3(LINEAR_DISPLAY_P3_TO_LINEAR_SRGB),fromReference:color=>color.applyMatrix3(LINEAR_SRGB_TO_LINEAR_DISPLAY_P3)},[DisplayP3ColorSpace]:{transfer:SRGBTransfer,primaries:P3Primaries,luminanceCoefficients:[0.2289,0.6917,0.0793],toReference:color=>color.convertSRGBToLinear().applyMatrix3(LINEAR_DISPLAY_P3_TO_LINEAR_SRGB),fromReference:color=>color.applyMatrix3(LINEAR_SRGB_TO_LINEAR_DISPLAY_P3).convertLinearToSRGB()}};const SUPPORTED_WORKING_COLOR_SPACES=new Set([LinearSRGBColorSpace,LinearDisplayP3ColorSpace]);const ColorManagement={enabled:true,_workingColorSpace:LinearSRGBColorSpace,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(colorSpace){if(!SUPPORTED_WORKING_COLOR_SPACES.has(colorSpace)){throw new Error(`Unsupported working color space, "${colorSpace}".`)}this._workingColorSpace=colorSpace},convert:function(color,sourceColorSpace,targetColorSpace){if(this.enabled===false||sourceColorSpace===targetColorSpace||!sourceColorSpace||!targetColorSpace){return color}const sourceToReference=COLOR_SPACES[sourceColorSpace].toReference;const targetFromReference=COLOR_SPACES[targetColorSpace].fromReference;return targetFromReference(sourceToReference(color))},fromWorkingColorSpace:function(color,targetColorSpace){return this.convert(color,this._workingColorSpace,targetColorSpace)},toWorkingColorSpace:function(color,sourceColorSpace){return this.convert(color,sourceColorSpace,this._workingColorSpace)},getPrimaries:function(colorSpace){return COLOR_SPACES[colorSpace].primaries},getTransfer:function(colorSpace){if(colorSpace===NoColorSpace)return LinearTransfer;return COLOR_SPACES[colorSpace].transfer},getLuminanceCoefficients:function(target,colorSpace=this._workingColorSpace){return target.fromArray(COLOR_SPACES[colorSpace].luminanceCoefficients)}};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){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}if(canvas.width>2048||canvas.height>2048){console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",image);return canvas.toDataURL("image/jpeg",0.6)}else{return canvas.toDataURL("image/png")}}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{console.warn("THREE.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}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{console.warn("THREE.Texture: Unable to serialize Texture.");return{}}}}let _textureId=0;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.version=0;this.onUpdate=null;this.isRenderTargetTexture=false;this.pmremVersion=0}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)}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.userData=JSON.parse(JSON.stringify(source.userData));this.needsUpdate=true;return this}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.6,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}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=Math.max(min.x,Math.min(max.x,this.x));this.y=Math.max(min.y,Math.min(max.y,this.y));this.z=Math.max(min.z,Math.min(max.z,this.z));this.w=Math.max(min.w,Math.min(max.w,this.w));return this}clampScalar(minVal,maxVal){this.x=Math.max(minVal,Math.min(maxVal,this.x));this.y=Math.max(minVal,Math.min(maxVal,this.y));this.z=Math.max(minVal,Math.min(maxVal,this.z));this.w=Math.max(minVal,Math.min(maxVal,this.w));return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(Math.max(min,Math.min(max,length)))}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();this.isRenderTarget=true;this.width=width;this.height=height;this.depth=1;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:1};options=Object.assign({generateMipmaps:false,internalFormat:null,minFilter:LinearFilter,depthBuffer:true,stencilBuffer:false,resolveDepthBuffer:true,resolveStencilBuffer:true,depthTexture:null,samples:0,count:1},options);const texture=new Texture(image,options.mapping,options.wrapS,options.wrapT,options.magFilter,options.minFilter,options.format,options.type,options.anisotropy,options.colorSpace);texture.flipY=false;texture.generateMipmaps=options.generateMipmaps;texture.internalFormat=options.internalFormat;this.textures=[];const count=options.count;for(let i=0;i<count;i++){this.textures[i]=texture.clone();this.textures[i].isRenderTargetTexture=true}this.depthBuffer=options.depthBuffer;this.stencilBuffer=options.stencilBuffer;this.resolveDepthBuffer=options.resolveDepthBuffer;this.resolveStencilBuffer=options.resolveStencilBuffer;this.depthTexture=options.depthTexture;this.samples=options.samples}get texture(){return this.textures[0]}set texture(value){this.textures[0]=value}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}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}const image=Object.assign({},source.texture.image);this.texture.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.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.texture.isRenderTargetTexture=true}}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];const 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 s=1-t;const cos=x0*x1+y0*y1+z0*z1+w0*w1,dir=cos>=0?1:-1,sqrSin=1-cos*cos;if(sqrSin>Number.EPSILON){const sin=Math.sqrt(sqrSin),len=Math.atan2(sin,cos*dir);s=Math.sin(s*len)/sin;t=Math.sin(t*len)/sin}const tDir=t*dir;x0=x0*s+x1*tDir;y0=y0*s+y1*tDir;z0=z0*s+z1*tDir;w0=w0*s+w1*tDir;if(s===1-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:console.warn("THREE.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<Number.EPSILON){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);const x=this._x,y=this._y,z=this._z,w=this._w;let cosHalfTheta=w*qb._w+x*qb._x+y*qb._y+z*qb._z;if(cosHalfTheta<0){this._w=-qb._w;this._x=-qb._x;this._y=-qb._y;this._z=-qb._z;cosHalfTheta=-cosHalfTheta}else{this.copy(qb)}if(cosHalfTheta>=1){this._w=w;this._x=x;this._y=y;this._z=z;return this}const sqrSinHalfTheta=1-cosHalfTheta*cosHalfTheta;if(sqrSinHalfTheta<=Number.EPSILON){const s=1-t;this._w=s*w+t*this._w;this._x=s*x+t*this._x;this._y=s*y+t*this._y;this._z=s*z+t*this._z;this.normalize();return this}const sinHalfTheta=Math.sqrt(sqrSinHalfTheta);const halfTheta=Math.atan2(sinHalfTheta,cosHalfTheta);const ratioA=Math.sin((1-t)*halfTheta)/sinHalfTheta,ratioB=Math.sin(t*halfTheta)/sinHalfTheta;this._w=w*ratioA+this._w*ratioB;this._x=x*ratioA+this._x*ratioB;this._y=y*ratioA+this._y*ratioB;this._z=z*ratioA+this._z*ratioB;this._onChangeCallback();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=Math.max(min.x,Math.min(max.x,this.x));this.y=Math.max(min.y,Math.min(max.y,this.y));this.z=Math.max(min.z,Math.min(max.z,this.z));return this}clampScalar(minVal,maxVal){this.x=Math.max(minVal,Math.min(maxVal,this.x));this.y=Math.max(minVal,Math.min(maxVal,this.y));this.z=Math.max(minVal,Math.min(maxVal,this.z));return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(Math.max(min,Math.min(max,length)))}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 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)}}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)}}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){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){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){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];return n41*(+n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34)+n42*(+n11*n23*n34-n11*n24*n33+n14*n21*n33-n13*n21*n34+n13*n24*n31-n14*n23*n31)+n43*(+n11*n24*n32-n11*n22*n34-n14*n21*n32+n12*n21*n34+n14*n22*n31-n12*n24*n31)+n44*(-n13*n22*n31-n11*n23*n32+n11*n22*n33+n13*n21*n32-n12*n21*n33+n12*n23*n31)}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;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;position.x=te[12];position.y=te[13];position.z=te[14];_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){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(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){const te=this.elements;const w=1/(right-left);const h=1/(top-bottom);const p=1/(far-near);const x=(right+left)*w;const y=(top+bottom)*h;let z,zInv;if(coordinateSystem===WebGLCoordinateSystem){z=(far+near)*p;zInv=-2*p}else if(coordinateSystem===WebGPUCoordinateSystem){z=near*p;zInv=-1*p}else{throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+coordinateSystem)}te[0]=2*w;te[4]=0;te[8]=0;te[12]=-x;te[1]=0;te[5]=2*h;te[9]=0;te[13]=-y;te[2]=0;te[6]=0;te[10]=zInv;te[14]=-z;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:console.warn("THREE.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(channel){this.mask=(1<<channel|0)>>>0}enable(channel){this.mask|=1<<channel|0}enableAll(){this.mask=4294967295|0}toggle(channel){this.mask^=1<<channel|0}disable(channel){this.mask&=~(1<<channel|0)}disableAll(){this.mask=0}test(layers){return(this.mask&layers.mask)!==0}isEnabled(channel){return(this.mask&(1<<channel|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.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){console.error("THREE.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{console.error("THREE.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.6,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.visibility=this._visibility;object.active=this._active;object.bounds=this._bounds.map(bound=>({boxInitialized:bound.boxInitialized,boxMin:bound.box.min.toArray(),boxMax:bound.box.max.toArray(),sphereInitialized:bound.sphereInitialized,sphereRadius:bound.sphere.radius,sphereCenter:bound.sphere.center.toArray()}));object.maxInstanceCount=this._maxInstanceCount;object.maxVertexCount=this._maxVertexCount;object.maxIndexCount=this._maxIndexCount;object.geometryInitialized=this._geometryInitialized;object.geometryCount=this._geometryCount;object.matricesTexture=this._matricesTexture.toJSON(meta);if(this._colorsTexture!==null)object.colorsTexture=this._colorsTexture.toJSON(meta);if(this.boundingSphere!==null){object.boundingSphere={center:object.boundingSphere.center.toArray(),radius:object.boundingSphere.radius}}if(this.boundingBox!==null){object.boundingBox={min:object.boundingBox.min.toArray(),max:object.boundingBox.max.toArray()}}}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;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 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.toWorkingColorSpace(this,colorSpace);return this}setRGB(r,g,b,colorSpace=ColorManagement.workingColorSpace){this.r=r;this.g=g;this.b=b;ColorManagement.toWorkingColorSpace(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.toWorkingColorSpace(this,colorSpace);return this}setStyle(style,colorSpace=SRGBColorSpace){function handleAlpha(string){if(string===undefined)return;if(parseFloat(string)<1){console.warn("THREE.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:console.warn("THREE.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{console.warn("THREE.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{console.warn("THREE.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.fromWorkingColorSpace(_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.fromWorkingColorSpace(_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.fromWorkingColorSpace(_color.copy(this),colorSpace);target.r=_color.r;target.g=_color.g;target.b=_color.b;return target}getStyle(colorSpace=SRGBColorSpace){ColorManagement.fromWorkingColorSpace(_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.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){console.warn(`THREE.Material: parameter '${key}' has value of undefined.`);continue}const currentValue=this[key];if(currentValue===undefined){console.warn(`THREE.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.6,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.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.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.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++}onBuild(){console.warn("Material: onBuild() has been removed.")}}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&=~8388608;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)console.warn("THREE.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]}const DataUtils={toHalfFloat:toHalfFloat,fromHalfFloat:fromHalfFloat};const _vector$9=new Vector3;const _vector2$1=new Vector2;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;this.name="";this.array=array;this.itemSize=itemSize;this.count=array!==undefined?array.length/itemSize:0;this.normalized=normalized;this.usage=StaticDrawUsage;this._updateRange={offset:0,count:-1};this.updateRanges=[];this.gpuType=FloatType;this.version=0}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}get updateRange(){warnOnce("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.");return this._updateRange}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.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}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 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));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){console.error("THREE.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)){console.error("THREE.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){console.error("THREE.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)){console.error("THREE.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){console.error("THREE.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){console.warn("THREE.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.6,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={center:boundingSphere.center.toArray(),radius:boundingSphere.radius}}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(data))}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 _uvA$1=new Vector2;const _uvB$1=new Vector2;const _uvC$1=new Vector2;const _normalA=new Vector3;const _normalB=new Vector3;const _normalC=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.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){if(uv){_uvA$1.fromBufferAttribute(uv,a);_uvB$1.fromBufferAttribute(uv,b);_uvC$1.fromBufferAttribute(uv,c);intersection.uv=Triangle.getInterpolation(_intersectionPoint,_vA$1,_vB$1,_vC$1,_uvA$1,_uvB$1,_uvC$1,new Vector2)}if(uv1){_uvA$1.fromBufferAttribute(uv1,a);_uvB$1.fromBufferAttribute(uv1,b);_uvC$1.fromBufferAttribute(uv1,c);intersection.uv1=Triangle.getInterpolation(_intersectionPoint,_vA$1,_vB$1,_vC$1,_uvA$1,_uvB$1,_uvC$1,new Vector2)}if(normal){_normalA.fromBufferAttribute(normal,a);_normalB.fromBufferAttribute(normal,b);_normalC.fromBufferAttribute(normal,c);intersection.normal=Triangle.getInterpolation(_intersectionPoint,_vA$1,_vB$1,_vC$1,_normalA,_normalB,_normalC,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}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){console.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;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}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.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,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace){images=images!==undefined?images:[];mapping=mapping!==undefined?mapping:CubeReflectionMapping;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,options.mapping,options.wrapS,options.wrapT,options.magFilter,options.minFilter,options.format,options.type,options.anisotropy,options.colorSpace);this.texture.isRenderTargetTexture=true;this.texture.generateMipmaps=options.generateMipmaps!==undefined?options.generateMipmaps:false;this.texture.minFilter=options.minFilter!==undefined?options.minFilter:LinearFilter}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,depth,stencil){const currentRenderTarget=renderer.getRenderTarget();for(let i=0;i<6;i++){renderer.setRenderTarget(this,i);renderer.clear(color,depth,stencil)}renderer.setRenderTarget(currentRenderTarget)}}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$5=new Sphere;const _vector$7=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){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();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$5.copy(object.boundingSphere).applyMatrix4(object.matrixWorld)}else{const geometry=object.geometry;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$5.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld)}return this.intersectsSphere(_sphere$5)}intersectsSprite(sprite){_sphere$5.center.set(0,0,0);_sphere$5.radius=0.7071067811865476;_sphere$5.applyMatrix4(sprite.matrixWorld);return this.intersectsSphere(_sphere$5)}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$7.x=plane.normal.x>0?box.max.x:box.min.x;_vector$7.y=plane.normal.y>0?box.max.y:box.min.y;_vector$7.z=plane.normal.z>0?box.max.z:box.min.z;if(plane.distanceToPoint(_vector$7)<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)}}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(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 updateRange=attribute._updateRange;const updateRanges=attribute.updateRanges;gl.bindBuffer(bufferType,buffer);if(updateRange.count===-1&&updateRanges.length===0){gl.bufferSubData(bufferType,0,array)}if(updateRanges.length!==0){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()}if(updateRange.count!==-1){gl.bufferSubData(bufferType,updateRange.offset*array.BYTES_PER_ELEMENT,array,updateRange.offset,updateRange.count);updateRange.count=-1}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}}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)}}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}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\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\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="\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\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\t\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, roughness * 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 * ( 1.0 - 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 = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), 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.07, 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="struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\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#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 saturate(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.specularColor;\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 * transposeMat3( 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 a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\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\tvec2 fab = DFGApprox( normal, viewDir, roughness );\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}\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.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * 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\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\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\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\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 );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\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.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\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 )\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_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";var logdepthbuf_pars_fragment="#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_pars_vertex="#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_vertex="#ifdef USE_LOGDEPTHBUF\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 = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\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\tuniform sampler2D directionalShadowMap[ 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\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\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 sampler2D pointShadowMap[ 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\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D 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\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\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\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.diffuseColor, material.specularColor, 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\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\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\n\t\t#else\n\t\t\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\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\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\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 <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 <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 = packDepthToRGBA( dist );\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 <packing>\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 <packing>\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( packNormalToRGB( normal ), 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 <packing>\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 <packing>\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\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\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 <packing>\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 <packing>\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 * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\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,distanceRGBA_vert:vertex$d,distanceRGBA_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}},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},distanceRGBA:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1000}}]),vertexShader:ShaderChunk.distanceRGBA_vert,fragmentShader:ShaderChunk.distanceRGBA_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}));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}));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)}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}}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]}for(let i=0;i<primcount.length;i++){info.update(elementCount,mode,primcount[i])}}}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){console.warn("THREE.WebGLRenderer:",precision,"not supported, using",maxPrecision,"instead.");precision=maxPrecision}const logarithmicDepthBuffer=parameters.logarithmicDepthBuffer===true;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 vertexTextures=maxVertexTextures>0;const maxSamples=gl.getParameter(gl.MAX_SAMPLES);return{isWebGL2:true,getMaxAnisotropy:getMaxAnisotropy,getMaxPrecision:getMaxPrecision,textureFormatReadable:textureFormatReadable,textureTypeReadable:textureTypeReadable,precision:precision,logarithmicDepthBuffer:logarithmicDepthBuffer,maxTextures:maxTextures,maxVertexTextures:maxVertexTextures,maxTextureSize:maxTextureSize,maxCubemapSize:maxCubemapSize,maxAttributes:maxAttributes,maxVertexUniforms:maxVertexUniforms,maxVaryings:maxVaryings,maxFragmentUniforms:maxFragmentUniforms,vertexTextures:vertexTextures,maxSamples:maxSamples}}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}}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.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}}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;let _oldActiveCubeFace=0;let _oldActiveMipmapLevel=0;let _oldXrEnabled=false;const PHI=(1+Math.sqrt(5))/2;const INV_PHI=1/PHI;const _axisDirections=[new Vector3(-PHI,INV_PHI,0),new Vector3(PHI,INV_PHI,0),new Vector3(-INV_PHI,0,PHI),new Vector3(INV_PHI,0,PHI),new Vector3(0,PHI,-INV_PHI),new Vector3(0,PHI,INV_PHI),new Vector3(-1,1,-1),new Vector3(1,1,-1),new Vector3(-1,1,1),new Vector3(1,1,1)];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();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;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,_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;({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;const n=this._lodPlanes.length;for(let i=1;i<n;i++){const sigma=Math.sqrt(this._sigmas[i]*this._sigmas[i]-this._sigmas[i-1]*this._sigmas[i-1]);const poleAxis=_axisDirections[(n-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 );

		}
	`}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]}let extension;switch(name){case"WEBGL_depth_texture":extension=gl.getExtension("WEBGL_depth_texture")||gl.getExtension("MOZ_WEBGL_depth_texture")||gl.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":extension=gl.getExtension("EXT_texture_filter_anisotropic")||gl.getExtension("MOZ_EXT_texture_filter_anisotropic")||gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":extension=gl.getExtension("WEBGL_compressed_texture_s3tc")||gl.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":extension=gl.getExtension("WEBGL_compressed_texture_pvrtc")||gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default: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("THREE.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])}for(const name in geometry.morphAttributes){const array=geometry.morphAttributes[name];for(let i=0,l=array.length;i<l;i++){attributes.remove(array[i])}}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)}const morphAttributes=geometry.morphAttributes;for(const name in morphAttributes){const array=morphAttributes[name];for(let i=0,l=array.length;i<l;i++){attributes.update(array[i],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]}for(let i=0;i<primcount.length;i++){info.update(elementCount,mode,primcount[i])}}}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:console.error("THREE.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}}class DepthTexture extends Texture{constructor(width,height,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,format=DepthFormat){if(format!==DepthFormat&&format!==DepthStencilFormat){throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat")}if(type===undefined&&format===DepthFormat)type=UnsignedIntType;if(type===undefined&&format===DepthStencilFormat)type=UnsignedInt248Type;super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isDepthTexture=true;this.image={width:width,height:height};this.magFilter=magFilter!==undefined?magFilter:NearestFilter;this.minFilter=minFilter!==undefined?minFilter:NearestFilter;this.flipY=false;this.generateMipmaps=false;this.compareFunction=null}copy(source){super.copy(source);this.compareFunction=source.compareFunction;return this}toJSON(meta){const data=super.toJSON(meta);if(this.compareFunction!==null)data.compareFunction=this.compareFunction;return data}}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=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)}for(let i=0;i!==n;++i){textures.setTexture2D(v[i]||emptyTexture,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)}}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")}function getEncodingComponents(colorSpace){const workingPrimaries=ColorManagement.getPrimaries(ColorManagement.workingColorSpace);const encodingPrimaries=ColorManagement.getPrimaries(colorSpace);let gamutMapping;if(workingPrimaries===encodingPrimaries){gamutMapping=""}else if(workingPrimaries===P3Primaries&&encodingPrimaries===Rec709Primaries){gamutMapping="LinearDisplayP3ToLinearSRGB"}else if(workingPrimaries===Rec709Primaries&&encodingPrimaries===P3Primaries){gamutMapping="LinearSRGBToLinearDisplayP3"}switch(colorSpace){case LinearSRGBColorSpace:case LinearDisplayP3ColorSpace:return[gamutMapping,"LinearTransferOETF"];case SRGBColorSpace:case DisplayP3ColorSpace:return[gamutMapping,"sRGBTransferOETF"];default:console.warn("THREE.WebGLProgram: Unsupported color space:",colorSpace);return[gamutMapping,"LinearTransferOETF"];}}function getShaderErrors(gl,shader,type){const status=gl.getShaderParameter(shader,gl.COMPILE_STATUS);const errors=gl.getShaderInfoLog(shader).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[0]}( ${components[1]}( value ) ); }`}function getToneMappingFunction(functionName,toneMapping){let toneMappingName;switch(toneMapping){case LinearToneMapping:toneMappingName="Linear";break;case ReinhardToneMapping:toneMappingName="Reinhard";break;case CineonToneMapping:toneMappingName="Cineon";break;case ACESFilmicToneMapping:toneMappingName="ACESFilmic";break;case AgXToneMapping:toneMappingName="AgX";break;case NeutralToneMapping:toneMappingName="Neutral";break;case CustomToneMapping:toneMappingName="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",toneMapping);toneMappingName="Linear";}return"vec3 "+functionName+"( vec3 color ) { return "+toneMappingName+"ToneMapping( color ); }"}const _v0$1=new Vector3;function getLuminanceFunction(){ColorManagement.getLuminanceCoefficients(_v0$1);const r=_v0$1.x.toFixed(4);const g=_v0$1.y.toFixed(4);const b=_v0$1.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];console.warn("THREE.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}function generateShadowMapTypeDefine(parameters){let shadowMapTypeDefine="SHADOWMAP_TYPE_BASIC";if(parameters.shadowMapType===PCFShadowMap){shadowMapTypeDefine="SHADOWMAP_TYPE_PCF"}else if(parameters.shadowMapType===PCFSoftShadowMap){shadowMapTypeDefine="SHADOWMAP_TYPE_PCF_SOFT"}else if(parameters.shadowMapType===VSMShadowMap){shadowMapTypeDefine="SHADOWMAP_TYPE_VSM"}return shadowMapTypeDefine}function generateEnvMapTypeDefine(parameters){let envMapTypeDefine="ENVMAP_TYPE_CUBE";if(parameters.envMap){switch(parameters.envMapMode){case CubeReflectionMapping:case CubeRefractionMapping:envMapTypeDefine="ENVMAP_TYPE_CUBE";break;case CubeUVReflectionMapping:envMapTypeDefine="ENVMAP_TYPE_CUBE_UV";break;}}return envMapTypeDefine}function generateEnvMapModeDefine(parameters){let envMapModeDefine="ENVMAP_MODE_REFLECTION";if(parameters.envMap){switch(parameters.envMapMode){case CubeRefractionMapping:envMapModeDefine="ENVMAP_MODE_REFRACTION";break;}}return envMapModeDefine}function generateEnvMapBlendingDefine(parameters){let envMapBlendingDefine="ENVMAP_BLENDING_NONE";if(parameters.envMap){switch(parameters.combine){case MultiplyOperation:envMapBlendingDefine="ENVMAP_BLENDING_MULTIPLY";break;case MixOperation:envMapBlendingDefine="ENVMAP_BLENDING_MIX";break;case AddOperation:envMapBlendingDefine="ENVMAP_BLENDING_ADD";break;}}return envMapBlendingDefine}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_LOGDEPTHBUF":"","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.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","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 programLog=gl.getProgramInfoLog(program).trim();const vertexLog=gl.getShaderInfoLog(glVertexShader).trim();const fragmentLog=gl.getShaderInfoLog(glFragmentShader).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");console.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!==""){console.warn("THREE.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$1=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$1++;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 logarithmicDepthBuffer=capabilities.logarithmicDepthBuffer;const SUPPORTS_VERTEX_TEXTURES=capabilities.vertexTextures;let precision=capabilities.precision;const shaderIDs={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",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){console.warn("THREE.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 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,supportsVertexTextures:SUPPORTS_VERTEX_TEXTURES,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:SUPPORTS_VERTEX_TEXTURES&&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,sizeAttenuation:material.sizeAttenuation===true,logarithmicDepthBuffer:logarithmicDepthBuffer,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,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.supportsVertexTextures)_programLayers.enable(0);if(parameters.instancing)_programLayers.enable(1);if(parameters.instancingColor)_programLayers.enable(2);if(parameters.instancingMorph)_programLayers.enable(3);if(parameters.matcap)_programLayers.enable(4);if(parameters.envMap)_programLayers.enable(5);if(parameters.normalMapObjectSpace)_programLayers.enable(6);if(parameters.normalMapTangentSpace)_programLayers.enable(7);if(parameters.clearcoat)_programLayers.enable(8);if(parameters.iridescence)_programLayers.enable(9);if(parameters.alphaTest)_programLayers.enable(10);if(parameters.vertexColors)_programLayers.enable(11);if(parameters.vertexAlphas)_programLayers.enable(12);if(parameters.vertexUv1s)_programLayers.enable(13);if(parameters.vertexUv2s)_programLayers.enable(14);if(parameters.vertexUv3s)_programLayers.enable(15);if(parameters.vertexTangents)_programLayers.enable(16);if(parameters.anisotropy)_programLayers.enable(17);if(parameters.alphaHash)_programLayers.enable(18);if(parameters.batching)_programLayers.enable(19);if(parameters.dispersion)_programLayers.enable(20);if(parameters.batchingColor)_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.skinning)_programLayers.enable(4);if(parameters.morphTargets)_programLayers.enable(5);if(parameters.morphNormals)_programLayers.enable(6);if(parameters.morphColors)_programLayers.enable(7);if(parameters.premultipliedAlpha)_programLayers.enable(8);if(parameters.shadowMapEnabled)_programLayers.enable(9);if(parameters.doubleSided)_programLayers.enable(10);if(parameters.flipSided)_programLayers.enable(11);if(parameters.useDepthPacking)_programLayers.enable(12);if(parameters.dithering)_programLayers.enable(13);if(parameters.transmission)_programLayers.enable(14);if(parameters.sheen)_programLayers.enable(15);if(parameters.opaque)_programLayers.enable(16);if(parameters.pointsUvs)_programLayers.enable(17);if(parameters.decodeVideoTexture)_programLayers.enable(18);if(parameters.alphaToCoverage)_programLayers.enable(19);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;for(let p=0,pl=programs.length;p<pl;p++){const preexistingProgram=programs[p];if(preexistingProgram.cacheKey===cacheKey){program=preexistingProgram;++program.usedTimes;break}}if(program===undefined){program=new WebGLProgram(renderer,cacheKey,parameters,bindingStates);programs.push(program)}return program}function releaseProgram(program){if(--program.usedTimes===0){const i=programs.indexOf(program);programs[i]=programs[programs.length-1];programs.pop();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;const shadowMap=light.shadow&&light.shadow.map?light.shadow.map.texture:null;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}}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}}const vertex="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}";const fragment="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\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 = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\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 = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\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( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function WebGLShadowMap(renderer,objects,capabilities){let _frustum=new Frustum;const _shadowMapSize=new Vector2,_viewportSize=new Vector2,_viewport=new Vector4,_depthMaterial=new MeshDepthMaterial({depthPacking:RGBADepthPacking}),_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;const currentRenderTarget=renderer.getRenderTarget();const activeCubeFace=renderer.getActiveCubeFace();const activeMipmapLevel=renderer.getActiveMipmapLevel();const _state=renderer.state;_state.setBlending(NoBlending);_state.buffers.color.setClear(1,1,1,1);_state.buffers.depth.setTest(true);_state.setScissorTest(false);const toVSM=_previousType!==VSMShadowMap&&this.type===VSMShadowMap;const fromVSM=_previousType===VSMShadowMap&&this.type!==VSMShadowMap;for(let i=0,il=lights.length;i<il;i++){const light=lights[i];const shadow=light.shadow;if(shadow===undefined){console.warn("THREE.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||toVSM===true||fromVSM===true){const pars=this.type!==VSMShadowMap?{minFilter:NearestFilter,magFilter:NearestFilter}:{};if(shadow.map!==null){shadow.map.dispose()}shadow.map=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y,pars);shadow.map.texture.name=light.name+".shadowMap";shadow.camera.updateProjectionMatrix()}renderer.setRenderTarget(shadow.map);renderer.clear();const viewportCount=shadow.getViewportCount();for(let vp=0;vp<viewportCount;vp++){const viewport=shadow.getViewport(vp);_viewport.set(_viewportSize.x*viewport.x,_viewportSize.y*viewport.y,_viewportSize.x*viewport.z,_viewportSize.y*viewport.w);_state.viewport(_viewport);shadow.updateMatrices(light,vp);_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)}shadowMaterialVertical.uniforms.shadow_pass.value=shadow.map.texture;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){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.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]}}}}function WebGLState(gl){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 currentDepthMask=null;let currentDepthFunc=null;let currentDepthClear=null;return{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(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){gl.clearDepth(depth);currentDepthClear=depth}},reset:function(){locked=false;currentDepthMask=null;currentDepthFunc=null;currentDepthClear=null}}}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.ZERO,gl.SRC_COLOR,gl.ZERO,gl.SRC_ALPHA);break;default:console.error("THREE.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.blendFunc(gl.SRC_ALPHA,gl.ONE);break;case SubtractiveBlending:gl.blendFuncSeparate(gl.ZERO,gl.ONE_MINUS_SRC_COLOR,gl.ZERO,gl.ONE);break;case MultiplyBlending:gl.blendFunc(gl.ZERO,gl.SRC_COLOR);break;default:console.error("THREE.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.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function compressedTexImage3D(){try{gl.compressedTexImage3D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function texSubImage2D(){try{gl.texSubImage2D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function texSubImage3D(){try{gl.texSubImage3D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function compressedTexSubImage2D(){try{gl.compressedTexSubImage2D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function compressedTexSubImage3D(){try{gl.compressedTexSubImage3D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function texStorage2D(){try{gl.texStorage2D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function texStorage3D(){try{gl.texStorage3D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function texImage2D(){try{gl.texImage2D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}function texImage3D(){try{gl.texImage3D.apply(gl,arguments)}catch(error){console.error("THREE.WebGLState:",error)}}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);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 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 LuminanceFormat:return width*height;case LuminanceAlphaFormat:return width*height*2;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:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_ETC2_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:return{byteLength:4,components:3};}throw new Error(`Unknown texture type ${type}.`)}const TextureUtils={contain,cover,fill,getByteLength};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);console.warn("THREE.WebGLRenderer: Texture has been resized from ("+dimensions.width+"x"+dimensions.height+") to ("+width+"x"+height+").");return canvas}else{if("data"in image){console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+dimensions.width+"x"+dimensions.height+").")}return image}}return image}function textureNeedsGenerateMipmaps(texture){return texture.generateMipmaps&&texture.minFilter!==NearestFilter&&texture.minFilter!==LinearFilter}function generateMipmap(target){_gl.generateMipmap(target)}function getInternalFormat(internalFormatName,glFormat,glType,colorSpace,forceLinearTransfer=false){if(internalFormatName!==null){if(_gl[internalFormatName]!==undefined)return _gl[internalFormatName];console.warn("THREE.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){if(glType===_gl.UNSIGNED_INT_5_9_9_9_REV)internalFormat=_gl.RGB9_E5}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;console.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()}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){console.warn("THREE.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.version>0&&textureProperties.__version!==texture.version){const image=texture.image;if(image===null){console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.")}else if(image.complete===false){console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}else{uploadTexture(textureProperties,texture,slot);return}}state.bindTexture(_gl.TEXTURE_2D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture2DArray(texture,slot){const textureProperties=properties.get(texture);if(texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_2D_ARRAY,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture3D(texture,slot){const textureProperties=properties.get(texture);if(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.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)){console.warn("THREE.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 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){state.texSubImage2D(_gl.TEXTURE_2D,0,0,0,image.width,image.height,glFormat,glType,image.data)}}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,0,0)}texture.clearLayerUpdates()}else{state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image.depth,glFormat,mipmap.data,0,0)}}}else{state.compressedTexImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image.depth,0,mipmap.data,0,0)}}else{console.warn("THREE.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{console.warn("THREE.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{console.warn("THREE.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);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,properties.get(texture).__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,properties.get(texture).__webglTexture,level)}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function setupRenderBufferStorage(renderbuffer,renderTarget,isMultisample){_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;const samples=getRenderTargetSamples(renderTarget);const isUseMultisampledRTT=useMultisampledRTT(renderTarget);if(isUseMultisampledRTT){multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height)}else if(isMultisample){_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,samples,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);const samples=getRenderTargetSamples(renderTarget);if(isMultisample&&useMultisampledRTT(renderTarget)===false){_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height)}else if(useMultisampledRTT(renderTarget)){multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height)}else{_gl.renderbufferStorage(_gl.RENDERBUFFER,glInternalFormat,renderTarget.width,renderTarget.height)}}}_gl.bindRenderbuffer(_gl.RENDERBUFFER,null)}function setupDepthTexture(framebuffer,renderTarget){const isCube=renderTarget&&renderTarget.isWebGLCubeRenderTarget;if(isCube)throw new Error("Depth Texture with cube render targets is not supported");state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(!(renderTarget.depthTexture&&renderTarget.depthTexture.isDepthTexture)){throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture")}if(!properties.get(renderTarget.depthTexture).__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}setTexture2D(renderTarget.depthTexture,0);const webglDepthTexture=properties.get(renderTarget.depthTexture).__webglTexture;const samples=getRenderTargetSamples(renderTarget);if(renderTarget.depthTexture.format===DepthFormat){if(useMultisampledRTT(renderTarget)){multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,_gl.DEPTH_ATTACHMENT,_gl.TEXTURE_2D,webglDepthTexture,0,samples)}else{_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.DEPTH_ATTACHMENT,_gl.TEXTURE_2D,webglDepthTexture,0)}}else if(renderTarget.depthTexture.format===DepthStencilFormat){if(useMultisampledRTT(renderTarget)){multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,_gl.DEPTH_STENCIL_ATTACHMENT,_gl.TEXTURE_2D,webglDepthTexture,0,samples)}else{_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.DEPTH_STENCIL_ATTACHMENT,_gl.TEXTURE_2D,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)throw new Error("target.depthTexture not supported in Cube render targets");setupDepthTexture(renderTargetProperties.__webglFramebuffer,renderTarget)}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{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);state.bindTexture(_gl.TEXTURE_2D,attachmentProperties.__webglTexture);setTextureParameters(_gl.TEXTURE_2D,attachment);setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,attachment,_gl.COLOR_ATTACHMENT0+i,_gl.TEXTURE_2D,0);if(textureNeedsGenerateMipmaps(attachment)){generateMipmap(_gl.TEXTURE_2D)}}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 target=renderTarget.isWebGLCubeRenderTarget?_gl.TEXTURE_CUBE_MAP:_gl.TEXTURE_2D;const webglTexture=properties.get(texture).__webglTexture;state.bindTexture(target,webglTexture);generateMipmap(target);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);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){console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.")}}else{console.error("THREE.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}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===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===LuminanceFormat)return gl.LUMINANCE;if(p===LuminanceAlphaFormat)return gl.LUMINANCE_ALPHA;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){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}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===RGBA_BPTC_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}}class ArrayCamera extends PerspectiveCamera{constructor(array=[]){super();this.isArrayCamera=true;this.cameras=array}}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]}}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(renderer,depthData,renderState){if(this.texture===null){const texture=new Texture;const texProps=renderer.properties.get(texture);texProps.__webglTexture=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 depthSensing=new WebXRDepthSensing;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.layers.enable(1);cameraL.viewport=new Vector4;const cameraR=new PerspectiveCamera;cameraR.layers.enable(2);cameraR.viewport=new Vector4;const cameras=[cameraL,cameraR];const cameraXR=new ArrayCamera;cameraXR.layers.enable(1);cameraXR.layers.enable(2);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();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){console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")}};this.setReferenceSpaceType=function(value){referenceSpaceType=value;if(scope.isPresenting===true){console.warn("THREE.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(){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);if(session.renderState.layers===undefined){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})}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=new XRWebGLBinding(session,gl);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})}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}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)};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,glProjLayer.ignoreDepthValues?undefined: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;if(enabledFeatures&&enabledFeatures.includes("depth-sensing")){const depthData=glBinding.getDepthInformation(views[0]);if(depthData&&depthData.isValid&&depthData.texture){depthSensing.init(renderer,depthData,session.renderState)}}}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}}console.error("THREE.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){console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.")}else{console.warn("THREE.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}}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}=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 uintClearColor=new Uint32Array(4);const intClearColor=new Int32Array(4);let currentRenderList=null;let currentRenderState=null;const renderListStack=[];const renderStateStack=[];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._outputColorSpace=SRGBColorSpace;this.toneMapping=NoToneMapping;this.toneMappingExposure=1;const _this=this;let _isContextLost=false;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(error){console.error("THREE.WebGLRenderer: "+error.message);throw error}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);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();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){console.warn("THREE.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"}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.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.apply(background,arguments)};this.getClearAlpha=function(){return background.getClearAlpha()};this.setClearAlpha=function(){background.setClearAlpha.apply(background,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=targetFormat===RGBAIntegerFormat||targetFormat===RGIntegerFormat||targetFormat===RedIntegerFormat}if(isIntegerFormat){const targetType=_currentRenderTarget.texture.type;const isUnsignedType=targetType===UnsignedByteType||targetType===UnsignedIntType||targetType===UnsignedShortType||targetType===UnsignedInt248Type||targetType===UnsignedShort4444Type||targetType===UnsignedShort5551Type;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);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();console.log("THREE.WebGLRenderer: Context Lost.");_isContextLost=true}function onContextRestore(){console.log("THREE.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){console.error("THREE.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){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){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)}}});renderStateStack.pop();currentRenderState=null;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){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(_isContextLost===true)return;if(scene.matrixWorldAutoUpdate===true)scene.updateMatrixWorld();if(camera.parent===null&&camera.matrixWorldAutoUpdate===true)camera.updateMatrixWorld();if(xr.enabled===true&&xr.isPresenting===true){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);_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 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){textures.updateMultisampleRenderTarget(_currentRenderTarget);textures.updateRenderTargetMipmap(_currentRenderTarget)}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 opaqueObjects=currentRenderList.opaque;const transmissiveObjects=currentRenderList.transmissive;const transparentObjects=currentRenderList.transparent;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){currentRenderState.state.transmissionRenderTarget[camera.id]=new WebGLRenderTarget(1,1,{generateMipmaps:true,type:extensions.has("EXT_color_buffer_half_float")||extensions.has("EXT_color_buffer_float")?HalfFloatType:UnsignedByteType,minFilter:LinearMipmapLinearFilter,samples:4,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,activeViewport.w);const currentRenderTarget=_this.getRenderTarget();_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=renderItem.object;const geometry=renderItem.geometry;const material=renderItem.material;const group=renderItem.group;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);_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=renderItem.object;const geometry=renderItem.geometry;const material=overrideMaterial===null?renderItem.material:overrideMaterial;const group=renderItem.group;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){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(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(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){properties.get(renderTarget.texture).__webglTexture=colorTexture;properties.get(renderTarget.depthTexture).__webglTexture=depthTexture;const renderTargetProperties=properties.get(renderTarget);renderTargetProperties.__hasExternalTextures=true;renderTargetProperties.__autoAllocateDepthBuffer=depthTexture===undefined;if(!renderTargetProperties.__autoAllocateDepthBuffer){if(extensions.has("WEBGL_multisampled_render_to_texture")===true){console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided");renderTargetProperties.__useRenderToTexture=false}}};this.setRenderTargetFramebuffer=function(renderTarget,defaultFramebuffer){const renderTargetProperties=properties.get(renderTarget);renderTargetProperties.__webglFramebuffer=defaultFramebuffer;renderTargetProperties.__useDefaultFramebuffer=defaultFramebuffer===undefined};this.setRenderTarget=function(renderTarget,activeCubeFace=0,activeMipmapLevel=0){_currentRenderTarget=renderTarget;_currentActiveCubeFace=activeCubeFace;_currentActiveMipmapLevel=activeMipmapLevel;let useDefaultFramebuffer=true;let framebuffer=null;let isCube=false;let isRenderTarget3D=false;if(renderTarget){const renderTargetProperties=properties.get(renderTarget);if(renderTargetProperties.__useDefaultFramebuffer!==undefined){state.bindFramebuffer(_gl.FRAMEBUFFER,null);useDefaultFramebuffer=false}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}const framebufferBound=state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(framebufferBound&&useDefaultFramebuffer){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 textureProperties=properties.get(renderTarget.texture);const layer=activeCubeFace||0;_gl.framebufferTextureLayer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,textureProperties.__webglTexture,activeMipmapLevel||0,layer)}_currentMaterialId=-1};this.readRenderTargetPixels=function(renderTarget,x,y,width,height,buffer,activeCubeFaceIndex){if(!(renderTarget&&renderTarget.isWebGLRenderTarget)){console.error("THREE.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.texture;const textureFormat=texture.format;const textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!capabilities.textureTypeReadable(textureType)){console.error("THREE.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){_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){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){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);try{const texture=renderTarget.texture;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.")}if(x>=0&&x<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height){const glBuffer=_gl.createBuffer();_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer);_gl.bufferData(_gl.PIXEL_PACK_BUFFER,buffer.byteLength,_gl.STREAM_READ);_gl.readPixels(x,y,width,height,utils.convert(textureFormat),utils.convert(textureType),0);_gl.flush();const sync=_gl.fenceSync(_gl.SYNC_GPU_COMMANDS_COMPLETE,0);await probeAsync(_gl,sync,4);try{_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer);_gl.getBufferSubData(_gl.PIXEL_PACK_BUFFER,0,buffer)}finally{_gl.deleteBuffer(glBuffer);_gl.deleteSync(sync)}return buffer}}finally{const framebuffer=_currentRenderTarget!==null?properties.get(_currentRenderTarget).__webglFramebuffer:null;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer)}}};this.copyFramebufferToTexture=function(texture,position=null,level=0){if(texture.isTexture!==true){warnOnce("WebGLRenderer: copyFramebufferToTexture function signature has changed.");position=arguments[0]||null;texture=arguments[1]}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()};this.copyTextureToTexture=function(srcTexture,dstTexture,srcRegion=null,dstPosition=null,level=0){if(srcTexture.isTexture!==true){warnOnce("WebGLRenderer: copyTextureToTexture function signature has changed.");dstPosition=arguments[0]||null;srcTexture=arguments[1];dstTexture=arguments[2];level=arguments[3]||0;srcRegion=null}let width,height,minX,minY;let dstX,dstY;if(srcRegion!==null){width=srcRegion.max.x-srcRegion.min.x;height=srcRegion.max.y-srcRegion.min.y;minX=srcRegion.min.x;minY=srcRegion.min.y}else{width=srcTexture.image.width;height=srcTexture.image.height;minX=0;minY=0}if(dstPosition!==null){dstX=dstPosition.x;dstY=dstPosition.y}else{dstX=0;dstY=0}const glFormat=utils.convert(dstTexture.format);const glType=utils.convert(dstTexture.type);textures.setTexture2D(dstTexture,0);_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);const image=srcTexture.isCompressedTexture?srcTexture.mipmaps[level]:srcTexture.image;_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);if(srcTexture.isDataTexture){_gl.texSubImage2D(_gl.TEXTURE_2D,level,dstX,dstY,width,height,glFormat,glType,image.data)}else{if(srcTexture.isCompressedTexture){_gl.compressedTexSubImage2D(_gl.TEXTURE_2D,level,dstX,dstY,image.width,image.height,glFormat,image.data)}else{_gl.texSubImage2D(_gl.TEXTURE_2D,level,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(level===0&&dstTexture.generateMipmaps)_gl.generateMipmap(_gl.TEXTURE_2D);state.unbindTexture()};this.copyTextureToTexture3D=function(srcTexture,dstTexture,srcRegion=null,dstPosition=null,level=0){if(srcTexture.isTexture!==true){warnOnce("WebGLRenderer: copyTextureToTexture3D function signature has changed.");srcRegion=arguments[0]||null;dstPosition=arguments[1]||null;srcTexture=arguments[2];dstTexture=arguments[3];level=arguments[4]||0}let width,height,depth,minX,minY,minZ;let dstX,dstY,dstZ;const image=srcTexture.isCompressedTexture?srcTexture.mipmaps[level]:srcTexture.image;if(srcRegion!==null){width=srcRegion.max.x-srcRegion.min.x;height=srcRegion.max.y-srcRegion.min.y;depth=srcRegion.max.z-srcRegion.min.z;minX=srcRegion.min.x;minY=srcRegion.min.y;minZ=srcRegion.min.z}else{width=image.width;height=image.height;depth=image.depth;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{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}_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);if(srcTexture.isDataTexture||srcTexture.isData3DTexture){_gl.texSubImage3D(glTarget,level,dstX,dstY,dstZ,width,height,depth,glFormat,glType,image.data)}else{if(dstTexture.isCompressedArrayTexture){_gl.compressedTexSubImage3D(glTarget,level,dstX,dstY,dstZ,width,height,depth,glFormat,image.data)}else{_gl.texSubImage3D(glTarget,level,dstX,dstY,dstZ,width,height,depth,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(level===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=colorSpace===DisplayP3ColorSpace?"display-p3":"srgb";gl.unpackColorSpace=ColorManagement.workingColorSpace===LinearDisplayP3ColorSpace?"display-p3":"srgb"}}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._updateRange={offset:0,count:-1};this.updateRanges=[];this.version=0;this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}get updateRange(){warnOnce("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.");return this._updateRange}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,attribute,index2){index1*=this.stride;index2*=attribute.stride;for(let i=0,l=this.stride;i<l;i++){this.array[index1+i]=attribute.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$6=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$6.fromBufferAttribute(this,i);_vector$6.applyMatrix4(m);this.setXYZ(i,_vector$6.x,_vector$6.y,_vector$6.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$6.fromBufferAttribute(this,i);_vector$6.applyNormalMatrix(m);this.setXYZ(i,_vector$6.x,_vector$6.y,_vector$6.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$6.fromBufferAttribute(this,i);_vector$6.transformDirection(m);this.setXYZ(i,_vector$6.x,_vector$6.y,_vector$6.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){console.log("THREE.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){console.log("THREE.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)}raycast(raycaster,intersects){if(raycaster.camera===null){console.error("THREE.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._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:true,value:[]},isLOD:{value:true}});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}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$4=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$4.copy(this.boundingSphere);_sphere$4.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$4)===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{console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}}applyBoneTransform(index,vector){const skeleton=this.skeleton;const geometry=this.geometry;_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex,index);_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight,index);_basePosition.copy(vector).applyMatrix4(this.bindMatrix);vector.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]);vector.addScaledVector(_vector3.copy(_basePosition).applyMatrix4(_matrix4),weight)}}return vector.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$1=new Matrix4;class Skeleton{constructor(bones=[],boneInverses=[]){this.uuid=generateUUID();this.bones=bones.slice(0);this.boneInverses=boneInverses;this.boneMatrices=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){console.warn("THREE.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$1;_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){console.warn("THREE.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.6,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$3=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$3.copy(geometry.boundingSphere).applyMatrix4(_instanceLocalMatrix);this.boundingSphere.union(_sphere$3)}}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$3.copy(this.boundingSphere);_sphere$3.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$3)===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}return this}}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(drawRange,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=drawRange.start;item.count=drawRange.count;item.z=z;item.index=index}reset(){this.list.length=0;this.index=0}}const _matrix$1=new Matrix4;const _invMatrixWorld=new Matrix4;const _identityMatrix=new Matrix4;const _whiteColor=new Color(1,1,1);const _projScreenMatrix$2=new Matrix4;const _frustum=new Frustum;const _box$1=new Box3;const _sphere$2=new Sphere;const _vector$5=new Vector3;const _forward=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}class BatchedMesh extends Mesh{get maxInstanceCount(){return this._maxInstanceCount}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._drawInfo=[];this._drawRanges=[];this._reservedRanges=[];this._bounds=[];this._maxInstanceCount=maxInstanceCount;this._maxVertexCount=maxVertexCount;this._maxIndexCount=maxIndexCount;this._geometryInitialized=false;this._geometryCount=0;this._multiDrawCounts=new Int32Array(maxInstanceCount);this._multiDrawStarts=new Int32Array(maxInstanceCount);this._multiDrawCount=0;this._multiDrawInstances=null;this._visibilityChanged=true;this._matricesTexture=null;this._indirectTexture=null;this._colorsTexture=null;this._initMatricesTexture();this._initIndirectTexture()}_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("BatchedMesh: All geometries must consistently have \"index\".")}for(const attributeName in batchGeometry.attributes){if(!geometry.hasAttribute(attributeName)){throw new Error(`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("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}}setCustomSort(func){this.customSort=func;return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const boundingBox=this.boundingBox;const drawInfo=this._drawInfo;boundingBox.makeEmpty();for(let i=0,l=drawInfo.length;i<l;i++){if(drawInfo[i].active===false)continue;const geometryId=drawInfo[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 drawInfo=this._drawInfo;boundingSphere.makeEmpty();for(let i=0,l=drawInfo.length;i<l;i++){if(drawInfo[i].active===false)continue;const geometryId=drawInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);boundingSphere.union(_sphere$2)}}addInstance(geometryId){if(this._drawInfo.length>=this._maxInstanceCount){throw new Error("BatchedMesh: Maximum item count reached.")}this._drawInfo.push({visible:true,active:true,geometryIndex:geometryId});const drawId=this._drawInfo.length-1;const matricesTexture=this._matricesTexture;const matricesArray=matricesTexture.image.data;_identityMatrix.toArray(matricesArray,drawId*16);matricesTexture.needsUpdate=true;const colorsTexture=this._colorsTexture;if(colorsTexture){_whiteColor.toArray(colorsTexture.image.data,drawId*4);colorsTexture.needsUpdate=true}return drawId}addGeometry(geometry,vertexCount=-1,indexCount=-1){this._initializeGeometry(geometry);this._validateGeometry(geometry);if(this._drawInfo.length>=this._maxInstanceCount){throw new Error("BatchedMesh: Maximum item count reached.")}const reservedRange={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let lastRange=null;const reservedRanges=this._reservedRanges;const drawRanges=this._drawRanges;const bounds=this._bounds;if(this._geometryCount!==0){lastRange=reservedRanges[reservedRanges.length-1]}if(vertexCount===-1){reservedRange.vertexCount=geometry.getAttribute("position").count}else{reservedRange.vertexCount=vertexCount}if(lastRange===null){reservedRange.vertexStart=0}else{reservedRange.vertexStart=lastRange.vertexStart+lastRange.vertexCount}const index=geometry.getIndex();const hasIndex=index!==null;if(hasIndex){if(indexCount===-1){reservedRange.indexCount=index.count}else{reservedRange.indexCount=indexCount}if(lastRange===null){reservedRange.indexStart=0}else{reservedRange.indexStart=lastRange.indexStart+lastRange.indexCount}}if(reservedRange.indexStart!==-1&&reservedRange.indexStart+reservedRange.indexCount>this._maxIndexCount||reservedRange.vertexStart+reservedRange.vertexCount>this._maxVertexCount){throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.")}const geometryId=this._geometryCount;this._geometryCount++;reservedRanges.push(reservedRange);drawRanges.push({start:hasIndex?reservedRange.indexStart:reservedRange.vertexStart,count:-1});bounds.push({boxInitialized:false,box:new Box3,sphereInitialized:false,sphere:new Sphere});this.setGeometryAt(geometryId,geometry);return geometryId}setGeometryAt(geometryId,geometry){if(geometryId>=this._geometryCount){throw new Error("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 reservedRange=this._reservedRanges[geometryId];if(hasIndex&&srcIndex.count>reservedRange.indexCount||geometry.attributes.position.count>reservedRange.vertexCount){throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.")}const vertexStart=reservedRange.vertexStart;const vertexCount=reservedRange.vertexCount;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=vertexCount;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,vertexCount*itemSize)}if(hasIndex){const indexStart=reservedRange.indexStart;for(let i=0;i<srcIndex.count;i++){dstIndex.setX(indexStart+i,vertexStart+srcIndex.getX(i))}for(let i=srcIndex.count,l=reservedRange.indexCount;i<l;i++){dstIndex.setX(indexStart+i,vertexStart)}dstIndex.needsUpdate=true;dstIndex.addUpdateRange(indexStart,reservedRange.indexCount)}const bound=this._bounds[geometryId];if(geometry.boundingBox!==null){bound.box.copy(geometry.boundingBox);bound.boxInitialized=true}else{bound.boxInitialized=false}if(geometry.boundingSphere!==null){bound.sphere.copy(geometry.boundingSphere);bound.sphereInitialized=true}else{bound.sphereInitialized=false}const drawRange=this._drawRanges[geometryId];const posAttr=geometry.getAttribute("position");drawRange.count=hasIndex?srcIndex.count:posAttr.count;this._visibilityChanged=true;return geometryId}getBoundingBoxAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const bound=this._bounds[geometryId];const box=bound.box;const geometry=this.geometry;if(bound.boxInitialized===false){box.makeEmpty();const index=geometry.index;const position=geometry.attributes.position;const drawRange=this._drawRanges[geometryId];for(let i=drawRange.start,l=drawRange.start+drawRange.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}box.expandByPoint(_vector$5.fromBufferAttribute(position,iv))}bound.boxInitialized=true}target.copy(box);return target}getBoundingSphereAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const bound=this._bounds[geometryId];const sphere=bound.sphere;const geometry=this.geometry;if(bound.sphereInitialized===false){sphere.makeEmpty();this.getBoundingBoxAt(geometryId,_box$1);_box$1.getCenter(sphere.center);const index=geometry.index;const position=geometry.attributes.position;const drawRange=this._drawRanges[geometryId];let maxRadiusSq=0;for(let i=drawRange.start,l=drawRange.start+drawRange.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);bound.sphereInitialized=true}target.copy(sphere);return target}setMatrixAt(instanceId,matrix){const drawInfo=this._drawInfo;const matricesTexture=this._matricesTexture;const matricesArray=this._matricesTexture.image.data;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return this}matrix.toArray(matricesArray,instanceId*16);matricesTexture.needsUpdate=true;return this}getMatrixAt(instanceId,matrix){const drawInfo=this._drawInfo;const matricesArray=this._matricesTexture.image.data;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return null}return matrix.fromArray(matricesArray,instanceId*16)}setColorAt(instanceId,color){if(this._colorsTexture===null){this._initColorsTexture()}const colorsTexture=this._colorsTexture;const colorsArray=this._colorsTexture.image.data;const drawInfo=this._drawInfo;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return this}color.toArray(colorsArray,instanceId*4);colorsTexture.needsUpdate=true;return this}getColorAt(instanceId,color){const colorsArray=this._colorsTexture.image.data;const drawInfo=this._drawInfo;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return null}return color.fromArray(colorsArray,instanceId*4)}setVisibleAt(instanceId,value){const drawInfo=this._drawInfo;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false||drawInfo[instanceId].visible===value){return this}drawInfo[instanceId].visible=value;this._visibilityChanged=true;return this}getVisibleAt(instanceId){const drawInfo=this._drawInfo;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return false}return drawInfo[instanceId].visible}raycast(raycaster,intersects){const drawInfo=this._drawInfo;const drawRanges=this._drawRanges;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=drawInfo.length;i<l;i++){if(!drawInfo[i].visible||!drawInfo[i].active){continue}const geometryId=drawInfo[i].geometryIndex;const drawRange=drawRanges[geometryId];_mesh.geometry.setDrawRange(drawRange.start,drawRange.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._drawRanges=source._drawRanges.map(range=>({...range}));this._reservedRanges=source._reservedRanges.map(range=>({...range}));this._drawInfo=source._drawInfo.map(inf=>({...inf}));this._bounds=source._bounds.map(bound=>({boxInitialized:bound.boxInitialized,box:bound.box.clone(),sphereInitialized:bound.sphereInitialized,sphere:bound.sphere.clone()}));this._maxInstanceCount=source._maxInstanceCount;this._maxVertexCount=source._maxVertexCount;this._maxIndexCount=source._maxIndexCount;this._geometryInitialized=source._geometryInitialized;this._geometryCount=source._geometryCount;this._multiDrawCounts=source._multiDrawCounts.slice();this._multiDrawStarts=source._multiDrawStarts.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}return this}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 drawInfo=this._drawInfo;const multiDrawStarts=this._multiDrawStarts;const multiDrawCounts=this._multiDrawCounts;const drawRanges=this._drawRanges;const perObjectFrustumCulled=this.perObjectFrustumCulled;const indirectTexture=this._indirectTexture;const indirectArray=indirectTexture.image.data;if(perObjectFrustumCulled){_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse).multiply(this.matrixWorld);_frustum.setFromProjectionMatrix(_projScreenMatrix$2,renderer.coordinateSystem)}let count=0;if(this.sortObjects){_invMatrixWorld.copy(this.matrixWorld).invert();_vector$5.setFromMatrixPosition(camera.matrixWorld).applyMatrix4(_invMatrixWorld);_forward.set(0,0,-1).transformDirection(camera.matrixWorld).transformDirection(_invMatrixWorld);for(let i=0,l=drawInfo.length;i<l;i++){if(drawInfo[i].visible&&drawInfo[i].active){const geometryId=drawInfo[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)}if(!culled){const z=_temp.subVectors(_sphere$2.center,_vector$5).dot(_forward);_renderList.push(drawRanges[geometryId],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[count]=item.start*bytesPerElement;multiDrawCounts[count]=item.count;indirectArray[count]=item.index;count++}_renderList.reset()}else{for(let i=0,l=drawInfo.length;i<l;i++){if(drawInfo[i].visible&&drawInfo[i].active){const geometryId=drawInfo[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)}if(!culled){const range=drawRanges[geometryId];multiDrawStarts[count]=range.start*bytesPerElement;multiDrawCounts[count]=range.count;indirectArray[count]=i;count++}}}}indirectTexture.needsUpdate=true;this._multiDrawCount=count;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.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{console.warn("THREE.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);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);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);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,end-1,start);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){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:a,face:null,faceIndex: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{console.warn("THREE.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.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,object:object})}}class VideoTexture extends Texture{constructor(video,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super(video,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isVideoTexture=true;this.minFilter=minFilter!==undefined?minFilter:LinearFilter;this.magFilter=magFilter!==undefined?magFilter:LinearFilter;this.generateMipmaps=false;const scope=this;function updateVideo(){scope.needsUpdate=true;video.requestVideoFrameCallback(updateVideo)}if("requestVideoFrameCallback"in video){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}}}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 Curve{constructor(){this.type="Curve";this.arcLengthDivisions=200}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.");return null}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){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){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.6,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 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 CapsuleGeometry extends LatheGeometry{constructor(radius=1,length=1,capSegments=4,radialSegments=8){const path=new Path;path.absarc(0,-length/2,radius,Math.PI*1.5,0);path.absarc(0,length/2,radius,0,Math.PI*0.5);super(path.getPoints(capSegments),radialSegments);this.type="CapsuleGeometry";this.parameters={radius:radius,length:length,capSegments:capSegments,radialSegments:radialSegments}}static fromJSON(data){return new CapsuleGeometry(data.radius,data.length,data.capSegments,data.radialSegments)}}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];indices.push(a,b,d);indices.push(b,c,d);groupCount+=6}}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.details)}}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=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.fromBufferAttribute(positionAttr,index0);_v1$1.fromBufferAttribute(positionAttr,index1);vertices.push(_v0.x,_v0.y,_v0.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 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}}const Earcut={triangulate:function(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,maxX,maxY,x,y,invSize;if(hasHoles)outerNode=eliminateHoles(data,holeIndices,outerNode,dim);if(data.length>80*dim){minX=maxX=data[0];minY=maxY=data[1];for(let i=dim;i<outerLen;i+=dim){x=data[i];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 i,last;if(clockwise===signedArea(data,start,end,dim)>0){for(i=start;i<end;i+=dim)last=insertNode(i,data[i],data[i+1],last)}else{for(i=end-dim;i>=start;i-=dim)last=insertNode(i,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,prev,next;while(ear.prev!==ear.next){prev=ear.prev;next=ear.next;if(invSize?isEarHashed(ear,minX,minY,invSize):isEar(ear)){triangles.push(prev.i/dim|0);triangles.push(ear.i/dim|0);triangles.push(next.i/dim|0);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,dim);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=ax<bx?ax<cx?ax:cx:bx<cx?bx:cx,y0=ay<by?ay<cy?ay:cy:by<cy?by:cy,x1=ax>bx?ax>cx?ax:cx:bx>cx?bx:cx,y1=ay>by?ay>cy?ay:cy:by>cy?by:cy;let p=c.next;while(p!==a){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&pointInTriangle(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=ax<bx?ax<cx?ax:cx:bx<cx?bx:cx,y0=ay<by?ay<cy?ay:cy:by<cy?by:cy,x1=ax>bx?ax>cx?ax:cx:bx>cx?bx:cx,y1=ay>by?ay>cy?ay:cy:by>cy?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&&pointInTriangle(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&&pointInTriangle(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&&pointInTriangle(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&&pointInTriangle(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,dim){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/dim|0);triangles.push(p.i/dim|0);triangles.push(b.i/dim|0);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=[];let i,len,start,end,list;for(i=0,len=holeIndices.length;i<len;i++){start=holeIndices[i]*dim;end=i<len-1?holeIndices[i+1]*dim:data.length;list=linkedList(data,start,end,dim,false);if(list===list.next)list.steiner=true;queue.push(getLeftmost(list))}queue.sort(compareX);for(i=0;i<queue.length;i++){outerNode=eliminateHole(queue[i],outerNode)}return outerNode}function compareX(a,b){return a.x-b.x}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,qx=-Infinity,m;const hx=hole.x,hy=hole.y;do{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,mx=m.x,my=m.y;let tanMin=Infinity,tan;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)){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 i,p,q,e,tail,numMerges,pSize,qSize,inSize=1;do{p=list;list=null;tail=null;numMerges=0;while(p){numMerges++;q=p;pSize=0;for(i=0;i<inSize;i++){pSize++;q=q.nextZ;if(!q)break}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 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,inside=false;const px=(a.x+b.x)/2,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=new Node(a.i,a.x,a.y),b2=new Node(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=new Node(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 Node(i,x,y){this.i=i;this.x=x;this.y=y;this.prev=null;this.next=null;this.z=0;this.prevZ=null;this.nextZ=null;this.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 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;splineTube=extrudePath.computeFrenetFrames(steps,false);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()}}}const faces=ShapeUtils.triangulateShape(vertices,holes);const contour=vertices;for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];vertices=vertices.concat(ahole)}function scalePt2(pt,vec,size){if(!vec)console.error("THREE.ExtrudeGeometry: vec does not exist");return pt.clone().addScaledVector(vec,size)}const vlen=vertices.length,flen=faces.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=holes.length;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)}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)}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);v(vert.x,vert.y,-z)}}}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 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 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.defines={"STANDARD":""};this.type="MeshStandardMaterial";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 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.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.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,forceClone){if(!array||!forceClone&&array.constructor===type)return array;if(typeof type.BYTES_PER_ELEMENT==="number"){return new type(array)}return Array.prototype.slice.call(array)}function isTypedArray(object){return ArrayBuffer.isView(object)&&!(object instanceof DataView)}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.apply(values,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}const AnimationUtils={convertArray:convertArray,isTypedArray:isTypedArray,getKeyframeOrder:getKeyframeOrder,sortedArray:sortedArray,flattenJSON:flattenJSON,subclip:subclip,makeClipAdditive:makeClipAdditive};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)}}console.warn("THREE.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){console.error("THREE.KeyframeTrack: Invalid value size in track.",this);valid=false}const times=this.times,values=this.values,nKeys=times.length;if(nKeys===0){console.error("THREE.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)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,i,currTime);valid=false;break}if(prevTime!==null&&prevTime>currTime){console.error("THREE.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)){console.error("THREE.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.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{}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{}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{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{}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();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;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};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){if(!animation){console.error("THREE.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())}return new this.constructor(this.name,this.duration,tracks,this.blendMode)}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.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}}}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}}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)}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(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"});const mimeType=this.mimeType;const responseType=this.responseType;fetch(req).then(response=>{if(response.status===200||response.status===0){if(response.status===0){console.warn("THREE.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===undefined){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(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}}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{console.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}}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(url);if(cached!==undefined){scope.manager.itemStart(url);setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0);return cached}const image=createElementNS("img");function onImageLoad(){removeEventListeners();Cache.add(url,this);if(onLoad)onLoad(this);scope.manager.itemEnd(url)}function onImageError(event){removeEventListeners();if(onError)onError(event);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}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{console.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(){}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;if(this.groundColor!==undefined)data.object.groundColor=this.groundColor.getHex();if(this.distance!==undefined)data.object.distance=this.distance;if(this.angle!==undefined)data.object.angle=this.angle;if(this.decay!==undefined)data.object.decay=this.decay;if(this.penumbra!==undefined)data.object.penumbra=this.penumbra;if(this.shadow!==undefined)data.object.shadow=this.shadow.toJSON();if(this.target!==undefined)data.object.target=this.target.uuid;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}}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.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);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.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}updateMatrices(light){const camera=this.camera;const fov=RAD2DEG*2*light.angle*this.focus;const aspect=this.mapSize.width/this.mapSize.height;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(){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.shadow=source.shadow.clone();return this}}const _projScreenMatrix=new Matrix4;const _lightPositionWorld=new Vector3;const _lookTarget=new Vector3;class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,0.5,500));this.isPointLightShadow=true;this._frameExtents=new Vector2(4,2);this._viewportCount=6;this._viewports=[new Vector4(2,1,1,1),new Vector4(0,1,1,1),new Vector4(3,1,1,1),new Vector4(1,1,1,1),new Vector4(3,0,1,1),new Vector4(1,0,1,1)];this._cubeDirections=[new Vector3(1,0,0),new Vector3(-1,0,0),new Vector3(0,0,1),new Vector3(0,0,-1),new Vector3(0,1,0),new Vector3(0,-1,0)];this._cubeUps=[new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,0,1),new Vector3(0,0,-1)]}updateMatrices(light,viewportIndex=0){const camera=this.camera;const shadowMatrix=this.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(this._cubeDirections[viewportIndex]);camera.up.copy(this._cubeUps[viewportIndex]);camera.lookAt(_lookTarget);camera.updateMatrixWorld();shadowMatrix.makeTranslation(-_lightPositionWorld.x,-_lightPositionWorld.y,-_lightPositionWorld.z);_projScreenMatrix.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(_projScreenMatrix)}}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(){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}}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(){this.shadow.dispose()}copy(source){super.copy(source);this.target=source.target.clone();this.shadow=source.shadow.clone();return this}}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}fromJSON(json){this.intensity=json.intensity;this.sh.fromArray(json.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{console.error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const textures=this.textures;function getTexture(name){if(textures[name]===undefined){console.warn("THREE.MaterialLoader: Undefined texture",name)}return textures[name]}const material=MaterialLoader.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.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}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 decodeText(array){console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead.");if(typeof TextDecoder!=="undefined"){return new TextDecoder().decode(array)}let s="";for(let i=0,il=array.length;i<il;i++){s+=String.fromCharCode(array[i])}try{return decodeURIComponent(escape(s))}catch(e){return s}}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{console.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){const center=new Vector3;if(boundingSphere.center!==undefined){center.fromArray(boundingSphere.center)}geometry.boundingSphere=new Sphere(center,boundingSphere.radius)}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);console.error("THREE: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));console.error("THREE.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{console.warn(`THREE.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;console.warn("THREE.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){console.warn("THREE.ObjectLoader: No \"image\" specified for",data.uuid)}if(images[data.image]===undefined){console.warn("THREE.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){console.warn("THREE.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){console.warn("THREE.ObjectLoader: Undefined material",uuid)}array.push(materials[uuid])}return array}if(materials[name]===undefined){console.warn("THREE.ObjectLoader: Undefined material",name)}return materials[name]}function getTexture(uuid){if(textures[uuid]===undefined){console.warn("THREE.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":object=new LightProbe().fromJSON(data);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._visibility=data.visibility;object._active=data.active;object._bounds=data.bounds.map(bound=>{const box=new Box3;box.min.fromArray(bound.boxMin);box.max.fromArray(bound.boxMax);const sphere=new Sphere;sphere.radius=bound.sphereRadius;sphere.center.fromArray(bound.sphereCenter);return{boxInitialized:bound.boxInitialized,box:box,sphereInitialized:bound.sphereInitialized,sphere:sphere}});object._maxInstanceCount=data.maxInstanceCount;object._maxVertexCount=data.maxVertexCount;object._maxIndexCount=data.maxIndexCount;object._geometryInitialized=data.geometryInitialized;object._geometryCount=data.geometryCount;object._matricesTexture=getTexture(data.matricesTexture.uuid);if(data.colorsTexture!==undefined)object._colorsTexture=getTexture(data.colorsTexture.uuid);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){console.warn("THREE.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};class ImageBitmapLoader extends Loader{constructor(manager){super(manager);this.isImageBitmapLoader=true;if(typeof createImageBitmap==="undefined"){console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.")}if(typeof fetch==="undefined"){console.warn("THREE.ImageBitmapLoader: fetch() not supported.")}this.options={premultiplyAlpha:"none"}}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(url);if(cached!==undefined){scope.manager.itemStart(url);if(cached.then){cached.then(imageBitmap=>{if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url)}).catch(e=>{if(onError)onError(e)});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;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(url,imageBitmap);if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url);return imageBitmap}).catch(function(e){if(onError)onError(e);Cache.remove(url);scope.manager.itemError(url);scope.manager.itemEnd(url)});Cache.add(url,promise);scope.manager.itemStart(url)}}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{console.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 Clock{constructor(autoStart=true){this.autoStart=autoStart;this.startTime=0;this.oldTime=0;this.elapsedTime=0;this.running=false}start(){this.startTime=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=now();diff=(newTime-this.oldTime)/1000;this.oldTime=newTime;this.elapsedTime+=diff}return diff}}function now(){return(typeof performance==="undefined"?Date:performance).now()}const _position$1=new Vector3;const _quaternion$1=new Quaternion;const _scale$1=new Vector3;const _orientation$1=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;const up=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(_position$1,_quaternion$1,_scale$1);_orientation$1.set(0,0,-1).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(_orientation$1.x,endTime);listener.forwardY.linearRampToValueAtTime(_orientation$1.y,endTime);listener.forwardZ.linearRampToValueAtTime(_orientation$1.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(_orientation$1.x,_orientation$1.y,_orientation$1.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){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===false){console.warn("THREE.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){console.warn("THREE.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(){if(this.hasPlaybackControl===false){console.warn("THREE.Audio: this Audio has no playback control.");return}this._progress=0;if(this.source!==null){this.source.stop();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){console.warn("THREE.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}getLoop(){if(this.hasPlaybackControl===false){console.warn("THREE.Audio: this Audio has no playback control.");return false}return this.loop}setLoop(value){if(this.hasPlaybackControl===false){console.warn("THREE.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}}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)}disconnect(){super.disconnect();this.panner.disconnect(this.gain)}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){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(objectName){let objectIndex=parsedPath.objectIndex;switch(objectName){case"materials":if(!targetObject.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.materials){console.error("THREE.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){console.error("THREE.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){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.map){console.error("THREE.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){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}targetObject=targetObject[objectName];}if(objectIndex!==undefined){if(targetObject[objectIndex]===undefined){console.error("THREE.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;console.error("THREE.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.needsUpdate!==undefined){versioning=this.Versioning.NeedsUpdate}else if(targetObject.matrixWorldNeedsUpdate!==undefined){versioning=this.Versioning.MatrixWorldNeedsUpdate}let bindingType=this.BindingType.Direct;if(propertyIndex!==undefined){if(propertyName==="morphTargetInfluences"){if(!targetObject.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!targetObject.geometry.morphAttributes){console.error("THREE.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){console.error("THREE.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){fadeOutAction.fadeOut(duration);this.fadeIn(duration);if(warp){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){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(timeInSeconds){this.time=0;for(let i=0;i<this._actions.length;i++){this._actions[i].time=0}return this.update(timeInSeconds)}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 Uniform{constructor(value){this.value=value}clone(){return new Uniform(this.value.clone===undefined?this.value:this.value.clone())}}let _id=0;class UniformsGroup extends EventDispatcher{constructor(){super();this.isUniformsGroup=true;Object.defineProperty(this,"id",{value:_id++});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"});return this}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){this.isGLBufferAttribute=true;this.name="";this.buffer=buffer;this.type=type;this.itemSize=itemSize;this.elementSize=elementSize;this.count=count;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{console.error("THREE.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 Spherical{constructor(radius=1,phi=0,theta=0){this.radius=radius;this.phi=phi;this.theta=theta;return this}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=Math.max(EPS,Math.min(Math.PI-EPS,this.phi));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;return this}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;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)}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=[];const color1=new Color(0,0,1);const color2=new Color(0,1,0);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(color1.r,color1.g,color1.b);colors.push(color2.r,color2.g,color2.b)}}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}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)}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.apply(boneList,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}update(){const geometry=this.geometry;const pointMap=this.pointMap;const w=1,h=1;_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);setPoint("c",pointMap,geometry,_camera,0,0,-1);setPoint("t",pointMap,geometry,_camera,0,0,1);setPoint("n1",pointMap,geometry,_camera,-w,-h,-1);setPoint("n2",pointMap,geometry,_camera,w,-h,-1);setPoint("n3",pointMap,geometry,_camera,-w,h,-1);setPoint("n4",pointMap,geometry,_camera,w,h,-1);setPoint("f1",pointMap,geometry,_camera,-w,-h,1);setPoint("f2",pointMap,geometry,_camera,w,-h,1);setPoint("f3",pointMap,geometry,_camera,-w,h,1);setPoint("f4",pointMap,geometry,_camera,w,h,1);setPoint("u1",pointMap,geometry,_camera,w*0.7,h*1.1,-1);setPoint("u2",pointMap,geometry,_camera,-w*0.7,h*1.1,-1);setPoint("u3",pointMap,geometry,_camera,0,h*2,-1);setPoint("cf1",pointMap,geometry,_camera,-w,0,1);setPoint("cf2",pointMap,geometry,_camera,w,0,1);setPoint("cf3",pointMap,geometry,_camera,0,-h,1);setPoint("cf4",pointMap,geometry,_camera,0,h,1);setPoint("cn1",pointMap,geometry,_camera,-w,0,-1);setPoint("cn2",pointMap,geometry,_camera,w,0,-1);setPoint("cn3",pointMap,geometry,_camera,0,-h,-1);setPoint("cn4",pointMap,geometry,_camera,0,h,-1);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(object){if(object!==undefined){console.warn("THREE.BoxHelper: .update() has no longer arguments.")}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 CylinderGeometry(0,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){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(){}disconnect(){}dispose(){}update(){}}class WebGLMultipleRenderTargets extends WebGLRenderTarget{constructor(width=1,height=1,count=1,options={}){console.warn("THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the \"count\" parameter to enable MRT.");super(width,height,{...options,count});this.isWebGLMultipleRenderTargets=true}get texture(){return this.textures}}if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:REVISION}}))}if(typeof window!=="undefined"){if(window.__THREE__){console.warn("WARNING: Multiple instances of Three.js being imported.")}else{window.__THREE__=REVISION}}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.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.DisplayP3ColorSpace=DisplayP3ColorSpace;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.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.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.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.LinearDisplayP3ColorSpace=LinearDisplayP3ColorSpace;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.LuminanceAlphaFormat=LuminanceAlphaFormat;exports.LuminanceFormat=LuminanceFormat;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.NoToneMapping=NoToneMapping;exports.NormalAnimationBlendMode=NormalAnimationBlendMode;exports.NormalBlending=NormalBlending;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.P3Primaries=P3Primaries;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.RED_GREEN_RGTC2_Format=RED_GREEN_RGTC2_Format;exports.RED_RGTC1_Format=RED_RGTC1_Format;exports.REVISION=REVISION;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.Rec709Primaries=Rec709Primaries;exports.RectAreaLight=RectAreaLight;exports.RedFormat=RedFormat;exports.RedIntegerFormat=RedIntegerFormat;exports.ReinhardToneMapping=ReinhardToneMapping;exports.RenderTarget=RenderTarget;exports.RepeatWrapping=RepeatWrapping;exports.ReplaceStencilOp=ReplaceStencilOp;exports.ReverseSubtractEquation=ReverseSubtractEquation;exports.RingGeometry=RingGeometry;exports.SIGNED_RED_GREEN_RGTC2_Format=SIGNED_RED_GREEN_RGTC2_Format;exports.SIGNED_RED_RGTC1_Format=SIGNED_RED_RGTC1_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.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.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.VideoTexture=VideoTexture;exports.WebGL3DRenderTarget=WebGL3DRenderTarget;exports.WebGLArrayRenderTarget=WebGLArrayRenderTarget;exports.WebGLCoordinateSystem=WebGLCoordinateSystem;exports.WebGLCubeRenderTarget=WebGLCubeRenderTarget;exports.WebGLMultipleRenderTargets=WebGLMultipleRenderTargets;exports.WebGLRenderTarget=WebGLRenderTarget;exports.WebGLRenderer=WebGLRenderer;exports.WebGLUtils=WebGLUtils;exports.WebGPUCoordinateSystem=WebGPUCoordinateSystem;exports.WireframeGeometry=WireframeGeometry;exports.WrapAroundEnding=WrapAroundEnding;exports.ZeroCurvatureEnding=ZeroCurvatureEnding;exports.ZeroFactor=ZeroFactor;exports.ZeroSlopeEnding=ZeroSlopeEnding;exports.ZeroStencilOp=ZeroStencilOp;exports.createCanvasElement=createCanvasElement});(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; };