try { (function() { 
/*
 RequireJS 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
(function(){var version="0.25.0",commentRegExp=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,cjsRequireRegExp=/require\(["']([^'"\s]+)["']\)/g,currDirRegExp=/^\.\//,jsSuffixRegExp=/\.js$/,ostring=Object.prototype.toString,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=!!(typeof window!=="undefined"&&navigator&&document),isWebWorker=!isBrowser&&typeof importScripts!=="undefined",readyRegExp=/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!=="undefined"&&opera.toString()==="[object Opera]",
reqWaitIdPrefix="_r@@",empty={},contexts={},globalDefQueue=[],interactiveScript=null,isDone=false,checkLoadedDepth=0,useInteractive=false,req,cfg={},currentlyAddingScript,s,head,scripts,script,src,subPath,mainScript,dataMain,i,scrollIntervalId,ctx,checkLoadedTimeoutId;function isFunction(it){return ostring.call(it)==="[object Function]"}function isArray(it){return ostring.call(it)==="[object Array]"}function mixin(target,source,force){for(var prop in source)if(!(prop in empty)&&(!(prop in target)||
force))target[prop]=source[prop];return req}function makeError(id,msg,err){var e=new Error(msg+"\nhttp://requirejs.org/docs/errors.html#"+id);if(err)e.originalError=err;return e}function configurePackageDir(pkgs,currentPackages,dir){var i,location,pkgObj;for(i=0;pkgObj=currentPackages[i];i++){pkgObj=typeof pkgObj==="string"?{name:pkgObj}:pkgObj;location=pkgObj.location;if(dir&&(!location||location.indexOf("/")!==0&&location.indexOf(":")===-1))location=dir+"/"+(location||pkgObj.name);pkgs[pkgObj.name]=
{name:pkgObj.name,location:location||pkgObj.name,main:(pkgObj.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}}if(typeof define!=="undefined")return;if(typeof requirejs!=="undefined")if(isFunction(requirejs))return;else{cfg=requirejs;requirejs=undefined}if(typeof require!=="undefined"&&!isFunction(require)){cfg=require;require=undefined}function newContext(contextName){var context,resume,config={waitSeconds:7,baseUrl:s.baseUrl||"./",paths:{},pkgs:{}},defQueue=[],specified={"require":true,
"exports":true,"module":true},urlMap={},defined={},loaded={},waiting={},waitAry=[],waitIdCounter=0,managerCallbacks={},plugins={},pluginsQueue={},resumeDepth=0,normalizedWaiting={};function trimDots(ary){var i,part;for(i=0;part=ary[i];i++)if(part==="."){ary.splice(i,1);i-=1}else if(part==="..")if(i===1&&(ary[2]===".."||ary[0]===".."))break;else if(i>0){ary.splice(i-1,2);i-=2}}function normalize(name,baseName){var pkgName,pkgConfig;if(name.charAt(0)===".")if(baseName){if(config.pkgs[baseName])baseName=
[baseName];else{baseName=baseName.split("/");baseName=baseName.slice(0,baseName.length-1)}name=baseName.concat(name.split("/"));trimDots(name);pkgConfig=config.pkgs[pkgName=name[0]];name=name.join("/");if(pkgConfig&&name===pkgName+"/"+pkgConfig.main)name=pkgName}return name}function makeModuleMap(name,parentModuleMap){var index=name?name.indexOf("!"):-1,prefix=null,parentName=parentModuleMap?parentModuleMap.name:null,originalName=name,normalizedName,url,pluginModule;if(index!==-1){prefix=name.substring(0,
index);name=name.substring(index+1,name.length)}if(prefix)prefix=normalize(prefix,parentName);if(name){if(prefix){pluginModule=defined[prefix];if(pluginModule)if(pluginModule.normalize)normalizedName=pluginModule.normalize(name,function(name){return normalize(name,parentName)});else normalizedName=normalize(name,parentName);else normalizedName="__$p"+parentName+"@"+name}else normalizedName=normalize(name,parentName);url=urlMap[normalizedName];if(!url){if(req.toModuleUrl)url=req.toModuleUrl(context,
normalizedName,parentModuleMap);else url=context.nameToUrl(normalizedName,null,parentModuleMap);urlMap[normalizedName]=url}}return{prefix:prefix,name:normalizedName,parentMap:parentModuleMap,url:url,originalName:originalName,fullName:prefix?prefix+"!"+normalizedName:normalizedName}}function isPriorityDone(){var priorityDone=true,priorityWait=config.priorityWait,priorityName,i;if(priorityWait){for(i=0;priorityName=priorityWait[i];i++)if(!loaded[priorityName]){priorityDone=false;break}if(priorityDone)delete config.priorityWait}return priorityDone}
function makeSetExports(moduleObj){return function(exports){moduleObj.exports=exports}}function makeContextModuleFunc(func,relModuleMap,enableBuildCallback){return function(){var args=[].concat(aps.call(arguments,0)),lastArg;if(enableBuildCallback&&isFunction(lastArg=args[args.length-1]))lastArg.__requireJsBuild=true;args.push(relModuleMap);return func.apply(null,args)}}function makeRequire(relModuleMap,enableBuildCallback){var modRequire=makeContextModuleFunc(context.require,relModuleMap,enableBuildCallback);
mixin(modRequire,{nameToUrl:makeContextModuleFunc(context.nameToUrl,relModuleMap),toUrl:makeContextModuleFunc(context.toUrl,relModuleMap),defined:makeContextModuleFunc(context.requireDefined,relModuleMap),specified:makeContextModuleFunc(context.requireSpecified,relModuleMap),ready:req.ready,isBrowser:req.isBrowser});if(req.paths)modRequire.paths=req.paths;return modRequire}function updateNormalizedNames(pluginName){var oldFullName,oldModuleMap,moduleMap,fullName,callbacks,i,j,k,depArray,existingCallbacks,
maps=normalizedWaiting[pluginName];if(maps)for(i=0;oldModuleMap=maps[i];i++){oldFullName=oldModuleMap.fullName;moduleMap=makeModuleMap(oldModuleMap.originalName,oldModuleMap.parentMap);fullName=moduleMap.fullName;callbacks=managerCallbacks[oldFullName]||[];existingCallbacks=managerCallbacks[fullName];if(fullName!==oldFullName){if(oldFullName in specified){delete specified[oldFullName];specified[fullName]=true}if(existingCallbacks)managerCallbacks[fullName]=existingCallbacks.concat(callbacks);else managerCallbacks[fullName]=
callbacks;delete managerCallbacks[oldFullName];for(j=0;j<callbacks.length;j++){depArray=callbacks[j].depArray;for(k=0;k<depArray.length;k++)if(depArray[k]===oldFullName)depArray[k]=fullName}}}delete normalizedWaiting[pluginName]}function queueDependency(dep){var prefix=dep.prefix,fullName=dep.fullName;if(specified[fullName]||fullName in defined)return;if(prefix&&!plugins[prefix]){plugins[prefix]=undefined;(normalizedWaiting[prefix]||(normalizedWaiting[prefix]=[])).push(dep);(managerCallbacks[prefix]||
(managerCallbacks[prefix]=[])).push({onDep:function(name,value){if(name===prefix)updateNormalizedNames(prefix)}});queueDependency(makeModuleMap(prefix))}context.paused.push(dep)}function execManager(manager){var i,ret,waitingCallbacks,err,cb=manager.callback,fullName=manager.fullName,args=[],ary=manager.depArray;if(cb&&isFunction(cb)){if(ary)for(i=0;i<ary.length;i++)args.push(manager.deps[ary[i]]);try{ret=req.execCb(fullName,manager.callback,args,defined[fullName])}catch(e){err=e}if(fullName)if(manager.cjsModule&&
manager.cjsModule.exports!==undefined)ret=defined[fullName]=manager.cjsModule.exports;else if(ret===undefined&&manager.usingExports)ret=defined[fullName];else defined[fullName]=ret}else if(fullName)ret=defined[fullName]=cb;if(waiting[manager.waitId]){delete waiting[manager.waitId];manager.isDone=true;context.waitCount-=1;if(context.waitCount===0)waitAry=[]}if(err){err=makeError("defineerror","Error evaluating "+'module "'+fullName+'" at location "'+(fullName?makeModuleMap(fullName).url:"")+'":\n'+
err+"\nfileName:"+(err.fileName||err.sourceURL)+"\nlineNumber: "+(err.lineNumber||err.line),err);err.moduleName=fullName;return req.onError(err)}if(fullName){waitingCallbacks=managerCallbacks[fullName];if(waitingCallbacks){for(i=0;i<waitingCallbacks.length;i++)waitingCallbacks[i].onDep(fullName,ret);delete managerCallbacks[fullName]}}return undefined}function main(inName,depArray,callback,relModuleMap){var moduleMap=makeModuleMap(inName,relModuleMap),name=moduleMap.name,fullName=moduleMap.fullName,
uniques={},manager={waitId:name||reqWaitIdPrefix+waitIdCounter++,depCount:0,depMax:0,prefix:moduleMap.prefix,name:name,fullName:fullName,deps:{},depArray:depArray,callback:callback,onDep:function(depName,value){if(!(depName in manager.deps)){manager.deps[depName]=value;manager.depCount+=1;if(manager.depCount===manager.depMax)execManager(manager)}}},i,depArg,depName,cjsMod;if(fullName){if(fullName in defined||loaded[fullName]===true)return;specified[fullName]=true;loaded[fullName]=true}for(i=0;i<depArray.length;i++){depArg=
depArray[i];if(depArg){depArg=makeModuleMap(depArg,name?moduleMap:relModuleMap);depName=depArg.fullName;depArray[i]=depName;if(depName==="require")manager.deps[depName]=makeRequire(moduleMap);else if(depName==="exports"){manager.deps[depName]=defined[fullName]={};manager.usingExports=true}else if(depName==="module"){manager.cjsModule=cjsMod=manager.deps[depName]={id:name,uri:name?context.nameToUrl(name,null,relModuleMap):undefined,exports:defined[fullName]};cjsMod.setExports=makeSetExports(cjsMod)}else if(depName in
defined&&!(depName in waiting))manager.deps[depName]=defined[depName];else if(!uniques[depName]){manager.depMax+=1;queueDependency(depArg);(managerCallbacks[depName]||(managerCallbacks[depName]=[])).push(manager);uniques[depName]=true}}}if(manager.depCount===manager.depMax)execManager(manager);else{waiting[manager.waitId]=manager;waitAry.push(manager);context.waitCount+=1}}function callDefMain(args){main.apply(null,args);loaded[args[0]]=true}function forceExec(manager,traced){if(manager.isDone)return undefined;
var fullName=manager.fullName,depArray=manager.depArray,depName,i;if(fullName){if(traced[fullName])return defined[fullName];traced[fullName]=true}for(i=0;i<depArray.length;i++){depName=depArray[i];if(depName)if(!manager.deps[depName]&&waiting[depName])manager.onDep(depName,forceExec(waiting[depName],traced))}return fullName?defined[fullName]:undefined}function checkLoaded(){var waitInterval=config.waitSeconds*1E3,expired=waitInterval&&context.startTime+waitInterval<(new Date).getTime(),noLoads="",
hasLoadedProp=false,stillLoading=false,prop,err,manager;if(context.pausedCount>0)return undefined;if(config.priorityWait)if(isPriorityDone())resume();else return undefined;for(prop in loaded)if(!(prop in empty)){hasLoadedProp=true;if(!loaded[prop])if(expired)noLoads+=prop+" ";else{stillLoading=true;break}}if(!hasLoadedProp&&!context.waitCount)return undefined;if(expired&&noLoads){err=makeError("timeout","Load timeout for modules: "+noLoads);err.requireType="timeout";err.requireModules=noLoads;return req.onError(err)}if(stillLoading||
context.scriptCount){if((isBrowser||isWebWorker)&&!checkLoadedTimeoutId)checkLoadedTimeoutId=setTimeout(function(){checkLoadedTimeoutId=0;checkLoaded()},50);return undefined}if(context.waitCount){for(i=0;manager=waitAry[i];i++)forceExec(manager,{});if(checkLoadedDepth<5){checkLoadedDepth+=1;checkLoaded()}}checkLoadedDepth=0;req.checkReadyState();return undefined}function callPlugin(pluginName,dep){var name=dep.name,fullName=dep.fullName,load;if(fullName in defined||fullName in loaded)return;if(!plugins[pluginName])plugins[pluginName]=
defined[pluginName];if(!loaded[fullName])loaded[fullName]=false;load=function(ret){if(req.onPluginLoad)req.onPluginLoad(context,pluginName,name,ret);execManager({prefix:dep.prefix,name:dep.name,fullName:dep.fullName,callback:function(){return ret}});loaded[fullName]=true};load.fromText=function(moduleName,text){var hasInteractive=useInteractive;context.loaded[moduleName]=false;context.scriptCount+=1;if(hasInteractive)useInteractive=false;req.exec(text);if(hasInteractive)useInteractive=true;context.completeLoad(moduleName)};
plugins[pluginName].load(name,makeRequire(dep.parentMap,true),load,config)}function loadPaused(dep){if(dep.prefix&&dep.name.indexOf("__$p")===0&&defined[dep.prefix])dep=makeModuleMap(dep.originalName,dep.parentMap);var pluginName=dep.prefix,fullName=dep.fullName,urlFetched=context.urlFetched;if(specified[fullName]||loaded[fullName])return;else specified[fullName]=true;if(pluginName)if(defined[pluginName])callPlugin(pluginName,dep);else{if(!pluginsQueue[pluginName]){pluginsQueue[pluginName]=[];(managerCallbacks[pluginName]||
(managerCallbacks[pluginName]=[])).push({onDep:function(name,value){if(name===pluginName){var i,oldModuleMap,ary=pluginsQueue[pluginName];for(i=0;i<ary.length;i++){oldModuleMap=ary[i];callPlugin(pluginName,makeModuleMap(oldModuleMap.originalName,oldModuleMap.parentMap))}delete pluginsQueue[pluginName]}}})}pluginsQueue[pluginName].push(dep)}else if(!urlFetched[dep.url]){req.load(context,fullName,dep.url);urlFetched[dep.url]=true}}resume=function(){var args,i,p;resumeDepth+=1;if(context.scriptCount<=
0)context.scriptCount=0;while(defQueue.length){args=defQueue.shift();if(args[0]===null)return req.onError(makeError("mismatch","Mismatched anonymous define() module: "+args[args.length-1]));else callDefMain(args)}if(!config.priorityWait||isPriorityDone())while(context.paused.length){p=context.paused;context.pausedCount+=p.length;context.paused=[];for(i=0;args=p[i];i++)loadPaused(args);context.startTime=(new Date).getTime();context.pausedCount-=p.length}if(resumeDepth===1)checkLoaded();resumeDepth-=
1;return undefined};context={contextName:contextName,config:config,defQueue:defQueue,waiting:waiting,waitCount:0,specified:specified,loaded:loaded,urlMap:urlMap,scriptCount:0,urlFetched:{},defined:defined,paused:[],pausedCount:0,plugins:plugins,managerCallbacks:managerCallbacks,makeModuleMap:makeModuleMap,normalize:normalize,configure:function(cfg){var paths,prop,packages,pkgs,packagePaths,requireWait;if(cfg.baseUrl)if(cfg.baseUrl.charAt(cfg.baseUrl.length-1)!=="/")cfg.baseUrl+="/";paths=config.paths;
packages=config.packages;pkgs=config.pkgs;mixin(config,cfg,true);if(cfg.paths){for(prop in cfg.paths)if(!(prop in empty))paths[prop]=cfg.paths[prop];config.paths=paths}packagePaths=cfg.packagePaths;if(packagePaths||cfg.packages){if(packagePaths)for(prop in packagePaths)if(!(prop in empty))configurePackageDir(pkgs,packagePaths[prop],prop);if(cfg.packages)configurePackageDir(pkgs,cfg.packages);config.pkgs=pkgs}if(cfg.priority){requireWait=context.requireWait;context.requireWait=false;context.takeGlobalQueue();
resume();context.require(cfg.priority);resume();context.requireWait=requireWait;config.priorityWait=cfg.priority}if(cfg.deps||cfg.callback)context.require(cfg.deps||[],cfg.callback);if(cfg.ready)req.ready(cfg.ready)},requireDefined:function(moduleName,relModuleMap){return makeModuleMap(moduleName,relModuleMap).fullName in defined},requireSpecified:function(moduleName,relModuleMap){return makeModuleMap(moduleName,relModuleMap).fullName in specified},require:function(deps,callback,relModuleMap){var moduleName,
fullName,moduleMap;if(typeof deps==="string"){if(req.get)return req.get(context,deps,callback);moduleName=deps;relModuleMap=callback;moduleMap=makeModuleMap(moduleName,relModuleMap);fullName=moduleMap.fullName;if(!(fullName in defined))return req.onError(makeError("notloaded","Module name '"+moduleMap.fullName+"' has not been loaded yet for context: "+contextName));return defined[fullName]}main(null,deps,callback,relModuleMap);if(!context.requireWait)while(!context.scriptCount&&context.paused.length){context.takeGlobalQueue();
resume()}return undefined},takeGlobalQueue:function(){if(globalDefQueue.length){apsp.apply(context.defQueue,[context.defQueue.length-1,0].concat(globalDefQueue));globalDefQueue=[]}},completeLoad:function(moduleName){var args;context.takeGlobalQueue();while(defQueue.length){args=defQueue.shift();if(args[0]===null){args[0]=moduleName;break}else if(args[0]===moduleName)break;else{callDefMain(args);args=null}}if(args)callDefMain(args);else callDefMain([moduleName,[],null]);loaded[moduleName]=true;if(req.isAsync)context.scriptCount-=
1;resume();if(!req.isAsync)context.scriptCount-=1},toUrl:function(moduleNamePlusExt,relModuleMap){var index=moduleNamePlusExt.lastIndexOf("."),ext=null;if(index!==-1){ext=moduleNamePlusExt.substring(index,moduleNamePlusExt.length);moduleNamePlusExt=moduleNamePlusExt.substring(0,index)}return context.nameToUrl(moduleNamePlusExt,ext,relModuleMap)},nameToUrl:function(moduleName,ext,relModuleMap){var paths,pkgs,pkg,pkgPath,syms,i,parentModule,url,config=context.config;moduleName=normalize(moduleName,
relModuleMap&&relModuleMap.fullName);if(req.jsExtRegExp.test(moduleName))url=moduleName+(ext?ext:"");else{paths=config.paths;pkgs=config.pkgs;syms=moduleName.split("/");for(i=syms.length;i>0;i--){parentModule=syms.slice(0,i).join("/");if(paths[parentModule]){syms.splice(0,i,paths[parentModule]);break}else if(pkg=pkgs[parentModule]){if(moduleName===pkg.name)pkgPath=pkg.location+"/"+pkg.main;else pkgPath=pkg.location;syms.splice(0,i,pkgPath);break}}url=syms.join("/")+(ext||".js");url=(url.charAt(0)===
"/"||url.match(/^\w+:/)?"":config.baseUrl)+url}return config.urlArgs?url+((url.indexOf("?")===-1?"?":"&")+config.urlArgs):url}};context.resume=resume;return context}req=requirejs=function(deps,callback){var contextName=defContextName,context,config;if(!isArray(deps)&&typeof deps!=="string"){config=deps;if(isArray(callback)){deps=callback;callback=arguments[2]}else deps=[]}if(config&&config.context)contextName=config.context;context=contexts[contextName]||(contexts[contextName]=newContext(contextName));
if(config)context.configure(config);return context.require(deps,callback)};if(typeof require==="undefined")require=req;req.toUrl=function(moduleNamePlusExt){return contexts[defContextName].toUrl(moduleNamePlusExt)};req.version=version;req.isArray=isArray;req.isFunction=isFunction;req.mixin=mixin;req.jsExtRegExp=/^\/|:|\?|\.js$/;s=req.s={contexts:contexts,skipAsync:{},isPageLoaded:!isBrowser,readyCalls:[]};req.isAsync=req.isBrowser=isBrowser;if(isBrowser)head=s.head=document.getElementsByTagName("head")[0];
req.onError=function(err){throw err;};req.load=function(context,moduleName,url){var loaded=context.loaded;isDone=false;if(!loaded[moduleName])loaded[moduleName]=false;context.scriptCount+=1;req.attach(url,context,moduleName)};function getInteractiveScript(){var scripts,i,script;if(interactiveScript&&interactiveScript.readyState==="interactive")return interactiveScript;scripts=document.getElementsByTagName("script");for(i=scripts.length-1;i>-1&&(script=scripts[i]);i--)if(script.readyState==="interactive")return interactiveScript=
script;return null}define=req.def=function(name,deps,callback){var node,context;if(typeof name!=="string"){callback=deps;deps=name;name=null}if(!req.isArray(deps)){callback=deps;deps=[]}if(!name&&!deps.length&&req.isFunction(callback))if(callback.length){callback.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(match,dep){deps.push(dep)});deps=(callback.length===1?["require"]:["require","exports","module"]).concat(deps)}if(useInteractive){node=currentlyAddingScript||getInteractiveScript();
if(!node)return req.onError(makeError("interactive","No matching script interactive for "+callback));if(!name)name=node.getAttribute("data-requiremodule");context=contexts[node.getAttribute("data-requirecontext")]}(context?context.defQueue:globalDefQueue).push([name,deps,callback]);return undefined};define.amd={multiversion:true,plugins:true};req.exec=function(text){return eval(text)};req.execCb=function(name,callback,args,exports){return callback.apply(exports,args)};req.onScriptLoad=function(evt){var node=
evt.currentTarget||evt.srcElement,contextName,moduleName,context;if(evt.type==="load"||readyRegExp.test(node.readyState)){interactiveScript=null;contextName=node.getAttribute("data-requirecontext");moduleName=node.getAttribute("data-requiremodule");context=contexts[contextName];contexts[contextName].completeLoad(moduleName);node.removeEventListener("load",req.onScriptLoad,false)}};req.attach=function(url,context,moduleName,callback,type){var node,loaded;if(isBrowser){callback=callback||req.onScriptLoad;
node=context&&context.config&&context.config.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");node.type=type||"text/javascript";node.charset="utf-8";node.async=!s.skipAsync[url];if(context)node.setAttribute("data-requirecontext",context.contextName);node.setAttribute("data-requiremodule",moduleName);node.addEventListener("load",callback,false);node.src=url;currentlyAddingScript=node;head.appendChild(node);currentlyAddingScript=null;return node}else if(isWebWorker){loaded=
context.loaded;loaded[moduleName]=false;importScripts(url);context.completeLoad(moduleName)}return null};if(isBrowser){scripts=document.getElementsByTagName("script");for(i=scripts.length-1;i>-1&&(script=scripts[i]);i--){if(!head)head=script.parentNode;if(dataMain=script.getAttribute("data-main")){if(!cfg.baseUrl){src=dataMain.split("/");mainScript=src.pop();subPath=src.length?src.join("/")+"/":"./";cfg.baseUrl=subPath;dataMain=mainScript.replace(jsSuffixRegExp,"")}cfg.deps=cfg.deps?cfg.deps.concat(dataMain):
[dataMain];break}}}s.baseUrl=cfg.baseUrl;req.pageLoaded=function(){if(!s.isPageLoaded){s.isPageLoaded=true;if(scrollIntervalId)clearInterval(scrollIntervalId);req.callReady()}};req.checkReadyState=function(){var contexts=s.contexts,prop;for(prop in contexts)if(!(prop in empty))if(contexts[prop].waitCount)return;s.isDone=true;req.callReady()};req.callReady=function(){var callbacks=s.readyCalls,i,callback,contexts,context,prop;if(s.isPageLoaded&&s.isDone)if(callbacks.length){s.readyCalls=[];for(i=0;callback=
callbacks[i];i++)callback()}};req.ready=function(callback){if(s.isPageLoaded&&s.isDone)callback();else s.readyCalls.push(callback);return req};if(isBrowser){if(document.addEventListener){document.addEventListener("DOMContentLoaded",req.pageLoaded,false);window.addEventListener("load",req.pageLoaded,false)}else if(window.attachEvent){window.attachEvent("onload",req.pageLoaded);if(self===self.top)scrollIntervalId=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");
req.pageLoaded()}}catch(e){}},30)}if(document.readyState==="complete")req.pageLoaded()}req(cfg);if(req.isAsync&&typeof setTimeout!=="undefined"){ctx=s.contexts[cfg.context||defContextName];ctx.requireWait=true;setTimeout(function(){ctx.requireWait=false;ctx.takeGlobalQueue();if(!ctx.scriptCount)ctx.resume();req.checkReadyState()},0)}})();var qa=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,m,h){if(a==Array.prototype||a==Object.prototype)return a;a[m]=h.value;return a};function ra(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var m=0;m<a.length;++m){var h=a[m];if(h&&h.Math==Math)return h}throw Error("Cannot find global object");}var sa=ra(this);
function ta(a,m){if(m)a:{var h=sa;a=a.split(".");for(var n=0;n<a.length-1;n++){var g=a[n];if(!(g in h))break a;h=h[g]}a=a[a.length-1];n=h[a];m=m(n);m!=n&&m!=null&&qa(h,a,{configurable:!0,writable:!0,value:m})}}ta("Set.prototype.union",function(a){return a?a:function(m){ua(this);Pb(m);var h=new Set(this);m=Qb(m.keys());for(var n=m.next();!n.done;)h.add(n.value),n=m.next();return h}});
ta("Set.prototype.difference",function(a){return a?a:function(m){ua(this);Pb(m);var h=Rb(this,m);m=new Set(this);var n=h.Pra;h=h.npa;for(var g=n.next();!g.done;)h.has(g.value)&&m.delete(g.value),g=n.next();return m}});ta("Set.prototype.intersection",function(a){return a?a:function(m){ua(this);Pb(m);var h=new Set,n=Rb(this,m);m=n.Pra;n=n.npa;for(var g=m.next();!g.done;)n.has(g.value)&&h.add(g.value),g=m.next();return h}});
function Pb(a){if(typeof a!=="object"||a===null||typeof a.size!=="number"||a.size<0||typeof a.keys!=="function"||typeof a.has!=="function")throw new TypeError("Argument must be set-like");}function Qb(a){if(typeof a!=="object"||a===null||typeof a.next!=="function")throw new TypeError("Invalid iterator.");return a}function Rb(a,m){return a.size<=m.size?{Pra:a.keys(),npa:m}:{Pra:Qb(m.keys()),npa:a}}
function ua(a){if(!(a instanceof Set))throw new TypeError("Method must be called on an instance of Set.");}
ta("String.prototype.matchAll",function(a){return a?a:function(m){if(m instanceof RegExp&&!m.global)throw new TypeError("RegExp passed into String.prototype.matchAll() must have global tag.");var h=new RegExp(m,m instanceof RegExp?void 0:"g"),n=this,g=!1,k={next:function(){if(g)return{value:void 0,done:!0};var e=h.exec(n);if(!e)return g=!0,{value:void 0,done:!0};e[0]===""&&(h.lastIndex+=1);return{value:e,done:!1}}};k[Symbol.iterator]=function(){return k};return k}});
ta("Object.fromEntries",function(a){return a?a:function(m){var h={};if(!(Symbol.iterator in m))throw new TypeError(""+m+" is not iterable");m=m[Symbol.iterator].call(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;if(Object(n)!==n)throw new TypeError("iterable for fromEntries should yield objects");h[n[0]]=n[1]}return h}});
(function(){function a(d){this.ur=d;this.wv=null;this.bd={}}function m(){this.yj={};this.yj[m.SCRIPT_URL]=[];this.yj[m.THREE_JS_WEBGL_URL]="lib/ThreeWebGL.js";this.yj[m.WEBVR_POLYFILL_URL]="lib/WebVRPolyfill.js";this.yj[m.WEBXR_POLYFILL_URL]="lib/webxr-polyfill.js";this.yj[m.HLS_URL]="lib/Hls.js";this.yj[m.GS_URL]="lib/tdvgs.js";this.yj[m.Gaa]="lib/basis/";this.yj[m.Xaa]="lib/draco/";this.yj[m.CURSORS_DIR_URL]="lib/cursors";this.yj[m.SERVICE_WORKER_URL]="tdvplayersw.js";this.yj[m.YB]="lib/webxr-input-profiles/";
this.yj[m.BACKGROUND_PRELOAD_ENABLED]=void 0;this.yj[m.e_]=void 0}function h(){this.vU=[];this.S4=[];this.B6a=[];this.K_=null}function n(d){return Object.prototype.toString.call(d)=="[object Array]"}function g(d){return!!(window.location.hash&&window.location.hash.indexOf("device="+d)>=0)}function k(d){return b.search(d.toLowerCase())>=0}var e=window.TDV=window.TDV||{},b=navigator.userAgent.toLowerCase();h.prototype.getVersion=h.prototype.WLa=function(){return{MAJOR:"0",MINOR:"2313"}};
h.prototype.getClassByName=function(){};h.prototype.EDa=function(){if(this.K_)for(;this.vU.length>0;){var d=this.vU[0];this.vU=this.vU.slice(1);this.S4.push(d);this.$_a(d)}};h.prototype.PAa=function(d){var f=document.createElement("a");f.href=d;return f.href};h.prototype.x2a=function(){var d=document.currentScript;d||(d=document.getElementsByTagName("head")[0].getElementsByTagName("script"),d=d[d.length-1]);return this.PAa(d.src)};h.prototype.$_a=function(d){var f=this,l=d.ur.get(m.SELECTED_SCRIPT_URL);
setTimeout(function(){var p=document.createElement("script");p.type="text/javascript";p.src=l;document.getElementsByTagName("head")[0].appendChild(p);f.K_.Xmb(d)},1)};h.prototype.defineScript=function(d){for(var f=[],l=this.x2a(),p=0;p<this.S4.length;p++){var q=this.S4[p],r=this.PAa(q.ur.get(m.SELECTED_SCRIPT_URL));r==l?(q.ur.set(m.SCRIPT_DATA,d),q.ilb(new this.K_(q,q.ur)),this.B6a.push(q)):f.push(r)}this.S4=f};h.prototype.create=h.prototype.create=function(d){var f=d.get(m.SCRIPT_URL);f=n(f)?this.v7a(f):
typeof f==="string"?f:"script.js";d.set(m.SELECTED_SCRIPT_URL,f);d=new e.pua(d);this.vU.push(d);this.EDa();return d};h.prototype.setPlayerClass=h.prototype.hlb=function(d){this.K_=d;this.EDa();this.o({name:"classesReady",source:this})};h.prototype.bind=h.prototype.bind=function(d,f,l,p){this.bd=this.bd||{};this.bd[d]=this.bd[d]||[];this.bd[d].push({handler:f,context:l,immediate:p||!1})};h.prototype.unbind=h.prototype.h=function(d,f,l,p){this.bd&&d in this.bd&&(this.bd[d]=this.bd[d].filter(function(q){return q.handler!=
f||q.context!=l||q.immediate!=p}))};h.prototype.o=function(d){this.bd&&d.name in this.bd&&(this.jC(d,!0),setTimeout(function(){this.jC(d,!1)}.bind(this),0))};h.prototype.jC=function(d,f){d.unbindCurrentHandler=function(){}.bind(this);for(var l=this.bd[d.name],p=0;p<l.length;p++)if(l[p].immediate==f)try{l[p].handler.call(l[p].context||window,d)}catch(q){setTimeout(function(){throw q;},0)}};h.prototype.getOrientation=h.prototype.Ft=function(){var d=screen.orientation&&screen.orientation.type||window.orientation;
return d=="portrait-primary"||d=="portrait-secondary"||d===0||d==180?e.qb.Wba:d=="landscape-primary"||d=="landscape-secondary"||d==90||d==-90?e.qb.Vba:window.innerWidth<window.innerHeight?e.qb.Wba:e.qb.Vba};h.prototype.v7a=function(d){if(d.length>0){for(var f=0;f<d.length;f++){var l=d[f];if(n(l)){if(this.WFa(l[0]))return l[1]}else if(typeof l==="string")return l}return d[0][1]}return"script.js"};h.prototype.WFa=function(d){if(typeof d==="string"){var f=d.match(/^\s*default\s*$/);if(f)return!0;if(f=
d.match(/^\s*os\s*=\s*(\w+)\s*$/))return this.Nd==f[1].toLowerCase();if(f=d.match(/^\s*browser\s*=\s*(\w+)\s*$/))return this.Yb==f[1].toLowerCase();if(f=d.match(/^\s*device\s*=\s*(\w+)\s*$/))return this.wk==f[1].toLowerCase();if(f=d.match(/^\s*screen_size\s*(<|>|=|<=|>=)\s*(\d+)\s*x\s*(\d+)\s*$/)){d=parseInt(f[2]);var l=parseInt(f[3]);switch(f[1]){case "<":var p=function(q,r){return q<r};break;case ">":p=function(q,r){return q>r};break;case "=":p=function(q,r){return q==r};break;case "<=":p=function(q,
r){return q<=r};break;case ">=":p=function(q,r){return q>=r}}return p(screen.width,d)&&p(screen.height,l)||this.mobile&&p(screen.width,l)&&p(screen.height,d)}return!1}if(n(d)){for(f=0;f<d.length;f++)if(!this.WFa(d[f]))return!1;return!0}return!1};h.prototype.ORIENTATION_LANDSCAPE=h.prototype.Vba="landscape";h.prototype.ORIENTATION_PORTRAIT=h.prototype.Wba="portrait";h.prototype.OS_IOS=h.prototype.t_="ios";h.prototype.OS_ANDROID=h.prototype.Xba="android";h.prototype.OS_WINDOWS=h.prototype.gua="windows";
h.prototype.OS_WINDOWS_PHONE=h.prototype.aca="windows_phone";h.prototype.OS_MACOSX=h.prototype.Yba="osx";h.prototype.OS_LINUX=h.prototype.fua="linux";h.prototype.OS_QNX=h.prototype.$ba="qnx";h.prototype.OS_OTHER=h.prototype.Zba="other";h.prototype.BROWSER_TYPE_WEBKIT=h.prototype.DQ="webkit";h.prototype.BROWSER_TYPE_OPERA=h.prototype.Maa="opera";h.prototype.BROWSER_TYPE_MSIE=h.prototype.Laa="msie";h.prototype.BROWSER_TYPE_MOZILLA=h.prototype.Kaa="mozilla";h.prototype.BROWSER_TYPE_OTHER=h.prototype.Naa=
"other";h.prototype.BROWSER_SAFARI_IOS=h.prototype.sj="safari_ios";h.prototype.BROWSER_OPERA=h.prototype.UZ="opera";h.prototype.BROWSER_SAFARI=h.prototype.Nk="safari";h.prototype.BROWSER_CHROME=h.prototype.Pp="chrome";h.prototype.BROWSER_EDGE=h.prototype.OK="edge";h.prototype.BROWSER_MSIE=h.prototype.rF="msie";h.prototype.BROWSER_ANDROID=h.prototype.TZ="android";h.prototype.BROWSER_MOZILLA=h.prototype.nx="mozilla";h.prototype.BROWSER_OTHER=h.prototype.Haa="other";h.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET=
h.prototype.WZ="samsunginternet";h.prototype.BROWSER_SUBTYPE_OCULUS_BROWSER=h.prototype.ox="oculusbrowser";h.prototype.BROWSER_SUBTYPE_PICO_BROWSER=h.prototype.ru="picobrowser";h.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET_FOR_GEAR_VR=h.prototype.ZZ="samsunginternetgearvr";h.prototype.BROWSER_SUBTYPE_MI_BROWSER=h.prototype.Iaa="mibrowser";h.prototype.BROWSER_SUBTYPE_CHROME_IOS=h.prototype.PK="chromeios";h.prototype.BROWSER_SUBTYPE_SAFARI_IOS=h.prototype.BQ="safari_ios";h.prototype.BROWSER_SUBTYPE_CHROME_WEBVIEW=
h.prototype.QK="chrome_webview";h.prototype.BROWSER_SUBTYPE_SAFARI_WEBVIEW=h.prototype.CQ="safari_webview";h.prototype.BROWSER_SUBTYPE_TOUR_LAUNCHER=h.prototype.zB="tour_launcher";h.prototype.BROWSER_SUBTYPE_CHROMIUM_EDGE=h.prototype.QK="chromium_edge";h.prototype.BROWSER_SUBTYPE_FIREFOX_REALITY=h.prototype.yB="firefox_reality";h.prototype.BROWSER_SUBTYPE_VR_APP=h.prototype.su="vrapp";h.prototype.BROWSER_SUBTYPE_XR_APP=h.prototype.tu="xrapp";h.prototype.BROWSER_SUBTYPE_FACEBOOK_IOS_WEBVIEW=h.prototype.VZ=
"facebook_ios_webview";h.prototype.BROWSER_SUBTYPE_OTHER=h.prototype.Jaa="other";h.prototype.BROWSER_VERSION_UNKNOWN=h.prototype.Oaa=-1;h.prototype.DEVICE_IPHONE=h.prototype.a_="iphone";h.prototype.DEVICE_IPAD=h.prototype.GQ="ipad";h.prototype.DEVICE_IPOD=h.prototype.Saa="ipod";h.prototype.DEVICE_OCULUS_QUEST_2=h.prototype.UK="oculusquest2";h.prototype.DEVICE_OCULUS_QUEST_3=h.prototype.HQ="oculusquest3";h.prototype.DEVICE_PICO_G2=h.prototype.b_="picog2";h.prototype.DEVICE_PICO_G3=h.prototype.KQ="picog3";
h.prototype.DEVICE_PICO_NEO2=h.prototype.c_="piconeo2";h.prototype.DEVICE_PICO_NEO3=h.prototype.VK="piconeo3";h.prototype.DEVICE_PICO_4=h.prototype.IQ="pico4";h.prototype.DEVICE_PICO_4_ULTRA=h.prototype.JQ="pico4ultra";h.prototype.DEVICE_VIVE_FOCUS=h.prototype.d_="vivefocus";h.prototype.DEVICE_OTHER=h.prototype.Taa="other";h.prototype.os=h.prototype.Nd=k("iphone")||k("ipad")||k("ipod")?h.prototype.t_:k("qnx")?h.prototype.$ba:k("android")||k("oculusbrowser")&&k("linux")?h.prototype.Xba:k("windows phone")?
h.prototype.aca:k("windows")?h.prototype.gua:k("mac_powerpc")?h.prototype.Yba:k("macintosh")?navigator.maxTouchPoints>1?h.prototype.t_:h.prototype.Yba:k("linux")||k("x11")?h.prototype.fua:h.prototype.Zba;h.prototype.browser=h.prototype.Yb=k("ipad")||k("iphone")||k("ipod")||k("macintosh")&&navigator.maxTouchPoints>1?h.prototype.sj:k("opera")?h.prototype.UZ:k("edge")?h.prototype.OK:k("chrome")||k("crmo")?h.prototype.Pp:k("safari")?h.prototype.Nk:k("trident")||k("msie")?h.prototype.rF:!k("compatible")&&
k("mozilla")?h.prototype.nx:k("android")?h.prototype.TZ:h.prototype.Haa;h.prototype.browserType=h.prototype.BO=h.prototype.Yb==h.prototype.sj||h.prototype.Yb==h.prototype.Pp||h.prototype.Yb==h.prototype.TZ||h.prototype.Yb==h.prototype.Nk||k("webkit")?h.prototype.DQ:h.prototype.Yb==h.prototype.UZ||k("opera")?h.prototype.Maa:k("trident")||k("msie")?h.prototype.Laa:!k("compatible")&&k("mozilla")?h.prototype.Kaa:h.prototype.Naa;h.prototype.browserSubtype=h.prototype.xc=window.location.hash&&window.location.hash.indexOf("xrapp")>=
0?h.prototype.tu:window.location.hash&&window.location.hash.indexOf("vrapp")>=0?h.prototype.su:k("picobrowser")?h.prototype.ru:k("oculusbrowser")?h.prototype.ox:k("xiaomi")||k("miui")?h.prototype.Iaa:k("samsungbrowser")&&k("android")?k("mobile vr")?h.prototype.ZZ:h.prototype.WZ:k("ipad")||k("iphone")||k("ipod")?k("crios")?h.prototype.PK:k("fban")||k("fbav")?h.prototype.VZ:k("safari")&&k("version")&&!navigator.standalone?h.prototype.BQ:h.prototype.CQ:k("electron")?h.prototype.zB:k("chrome")&&k("wv")?
h.prototype.QK:k("edg/")?h.prototype.Zsa:!k("compatible")&&k("mozilla")&&k("mobile vr")?h.prototype.yB:h.prototype.Jaa;h.prototype.browserVersion=h.prototype.NIa=function(){if(h.prototype.Yb==h.prototype.rF){var d=b.match(RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"));if(d!=null)return parseFloat(d[1]);d=b.match(RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"));if(d!=null)return parseFloat(d[1])}return h.prototype.Oaa}();h.prototype.device=h.prototype.wk=k("ipad")||k("macintosh")&&navigator.maxTouchPoints>1?h.prototype.GQ:
k("iphone")?h.prototype.a_:k("ipod")?h.prototype.Saa:g("picog2")?h.prototype.b_:g("piconeo2")?h.prototype.c_:g("piconeo3")?h.prototype.VK:g("vivefocus")?h.prototype.d_:g("oculusquest3")?h.prototype.HQ:g("oculusquest2")?h.prototype.UK:g("oculusquest")?h.prototype.UK:h.prototype.xc==h.prototype.ru&&k("pico 4 ultra")?h.prototype.JQ:h.prototype.xc==h.prototype.tu&&k("picoa9210")?h.prototype.JQ:h.prototype.xc==h.prototype.ru&&k("pico 4")?h.prototype.IQ:h.prototype.xc==h.prototype.tu&&k("picoa8110")?h.prototype.IQ:
h.prototype.xc==h.prototype.ru&&k("pico g3")?h.prototype.KQ:h.prototype.xc==h.prototype.tu&&k("picoa7q10")?h.prototype.KQ:h.prototype.xc==h.prototype.tu&&k("pico neo 3")?h.prototype.VK:h.prototype.xc==h.prototype.ru&&k("pico neo 3")?h.prototype.VK:h.prototype.xc==h.prototype.ox&&(k("quest 3")||k("quest pro"))?h.prototype.HQ:h.prototype.xc==h.prototype.ox&&k("quest 2")?h.prototype.UK:h.prototype.Taa;a:{switch(h.prototype.Nd){case h.prototype.Xba:case h.prototype.t_:case h.prototype.aca:case h.prototype.$ba:var c=
!0;break a}c=!1}h.prototype.mobile=h.prototype.mobile=c;e.PlayerAPI=e.qb=new h;m.prototype.append=m.prototype.append=function(d,f,l){d==m.SCRIPT_URL&&(typeof l=="undefined"&&(l=f,f="default"),f=[f,l]);n(this.yj[d])||(this.yj[d]=[]);this.yj[d].push(f)};m.prototype.set=m.prototype.set=function(d,f){this.yj[d]=f};m.prototype.get=m.prototype.get=function(d){return this.yj[d]};m.SCRIPT_URL=m.SCRIPT_URL="ScriptURL";m.SCRIPT_DATA=m.SCRIPT_DATA="ScriptData";m.FLASH_EXPRESS_INSTALLER_URL=m.FLASH_EXPRESS_INSTALLER_URL=
"FlashExpressInstallerURL";m.FLASH_AUDIO_PLAYER_URL=m.FLASH_AUDIO_PLAYER_URL="FlashAudioPlayerURL";m.FLASH_VIDEO_PLAYER_URL=m.FLASH_VIDEO_PLAYER_URL="FlashVideoPlayerURL";m.FLASH_PANORAMA_PLAYER_URL=m.FLASH_PANORAMA_PLAYER_URL="FlashPanoramaPlayerURL";m.GS_URL=m.GS_URL="GSURL";m.THREE_JS_WEBGL_URL=m.THREE_JS_WEBGL_URL="ThreeJSWebGLURL";m.WEBVR_POLYFILL_URL=m.WEBVR_POLYFILL_URL="WebVRPolyfillURL";m.WEBXR_POLYFILL_URL=m.WEBXR_POLYFILL_URL="WebXRPolyfillURL";m.WEBXR_INPUT_PROFILES_DIR_URL=m.YB="WebXRInputProfilesDirURL";
m.CAPTURA_VIEWER_URL=m.CAPTURA_VIEWER_URL="CapturaViewerURL";m.DASH_URL=m.DASH_URL="DashURL";m.HLS_URL=m.HLS_URL="HlsURL";m.BASIS_URL=m.Gaa="BasisURL";m.DRACO_URL=m.Xaa="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.IVa="PinchToZoomEnabled";m.DOWNLOAD_DISABLED=m.e_="DownloadDisabled";e.PlayerSettings=e.PlayerSettings=m;e.PlayerEvent=e.x_=function(d,f,l,p){this.name=d;this.data=this.originalEvent=f;this.sourceClassName=l[l.length-1];this.sourceClassPath=l;this.sourceId=p};a.prototype.ilb=function(d){this.wv=d};a.prototype["delete"]=
function(){this.wv&&(this.wv.clear(),this.wv=null)};a.prototype.getById=a.prototype.ZD=function(d){return this.wv?this.wv.Qfb(d):null};a.prototype.getByClassName=a.prototype.Ci=function(d){return this.wv?this.wv.Ci(d):[]};a.prototype.createInstance=a.prototype.Ai=function(d){return this.wv.Ai(d)};a.prototype.disposeInstance=a.prototype.hw=function(d){return this.wv.hw(d)};a.prototype.bind=a.prototype.bind=function(d,f,l,p){var q=d.split(":");d=q[0];q=q.length>1?q[1]:"*";this.bd[d]=this.bd[d]||{};
this.bd[d][q]=this.bd[d][q]||[];this.bd[d][q].push({handler:f,context:l,immediate:p});return this};a.prototype.unbind=a.prototype.h=function(d,f,l,p){var q=d.split(":");d=q[0];q=q.length>1?q[1]:"*";if(d in this.bd&&q in this.bd[d]){for(var r=[],t=this.bd[d][q],u=0;u<t.length;u++){var v=t[u];v.handler==f&&v.context==l&&v.immediate==p||r.push(v)}this.bd[d][q]=r}};a.prototype.bindOnObject=function(d,f,l,p,q){return this.bind(f+":"+this.Pfa(d),l,p,q)};a.prototype.unbindOnObject=function(d,f,l,p,q){return this.h(f+
":"+this.Pfa(d),l,p,q)};a.prototype.bindOnObjectsOf=function(d,f,l,p,q){return this.bind(f+":"+this.Efa(d),l,p,q)};a.prototype.unbindOnObjectsOf=function(d,f,l,p,q){return this.h(f+":"+this.Efa(d),l,p,q)};a.prototype.cookiesEnabled=a.prototype.ldb=!1;a.DEFAULT_PANORAMA_HFOV=a.oUa=h.prototype.mobile?90:110;a.prototype.o=function(d){if(d.name in this.bd){this.jC(d,!0);var f=this;setTimeout(function(){f.jC(d,!1)},0)}};a.prototype.jC=function(d,f){f=this.J1a(d,f);for(var l=0;l<f.length;l++)try{f[l].handler.call(f[l].context||
window,d)}catch(p){console.log("Exception handling event "+(d&&d.name),p.message,p.stack)}};a.prototype.J1a=function(d,f){var l=[];if(d.name in this.bd){for(var p=[],q=0;q<d.sourceClassPath.length;q++)p.push(this.Efa(d.sourceClassPath[q]));d.sourceId&&p.push(this.Pfa(d.sourceId));p.push("*");d=this.bd[d.name];for(q=0;q<p.length;q++)for(var r=d[p[q]]||[],t=0;t<r.length;t++)!!r[t].immediate==!!f&&l.push(r[t])}return l};a.prototype.Pfa=function(d){return"instance("+d+")"};a.prototype.Efa=function(d){return"className("+
d+")"};e.Player=e.pua=a})();
var P=this&&this.ipb||function(){function a(m,h){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,g){n.__proto__=g}||function(n,g){for(var k in g)Object.prototype.hasOwnProperty.call(g,k)&&(n[k]=g[k])};return a(m,h)}return function(m,h){function n(){this.constructor=m}if(typeof h!=="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");a(m,h);m.prototype=h===null?Object.create(h):(n.prototype=h.prototype,new n)}}();
define("tdv/utils",["require","exports"],function(){function a(p,q){function r(){}r.prototype=q.prototype;p.prototype=new r;p.prototype.constructor=p}function m(p,q){q.forEach(function(r){Object.getOwnPropertyNames(r).forEach(function(t){p.prototype[t]=r[t]})})}function h(p){setTimeout(function(){try{p()}catch(q){g("Deferred callback failed",q)}},1)}function n(p){if(p!=c){c=p;try{if(b){var q=document.createElement("div");q.innerText=p;b.insertBefore(q,b.childNodes[0]||null)}else console.log(p)}catch(r){}}}
function g(p,q){var r=[];r.push("Exception: "+p);q.message?(r.push(q.message),r.push(q.stack)):r.push(q);n(r.join("\n"))}function k(p){var q="[object "+p+"]";return function(r){return Object.prototype.toString.call(r)===q}}function e(p){var q=[];p.forEach(function(r){q.includes(r)||q.push(r)});return q}var b,c,d=k("String"),f=k("Function"),l=k("Number");return{B6:m,Wdb:function(p){for(;;){var q=p.pop();if(!q)break;if(q==p.length)break;p.splice(q,1)}q=[];for(var r=0;r<256;r+=1)q[r]=String.fromCharCode(r);
var t=256,u=String.fromCharCode(p[0]),v=u;for(r=1;r<p.length;r+=1){var w=p[r];w=q[w]?q[w]:u+u.charAt(0);v+=w;q[t++]=u+w.charAt(0);u=w}return JSON.parse(v)},defer:h,Ppb:function(p,q){return function(){var r=arguments;h(function(){p.apply(q||window,r)})}},extend:function(p){for(var q=[],r=1;r<arguments.length;r++)q[r-1]=arguments[r];r=q[q.length-1];q=q.slice(0,-1);a(r,p);m(r,q);return r},seb:function(p){b=document.createElement("div");b.style.overflow="auto";b.style.position="absolute";b.style.bottom=
"0";b.style.left="0";b.style.right="0";b.style.padding="20px";b.style.fontFamily="Verdana";b.style.backgroundColor="#FFFFFF";b.style.color="#000000";b.style.zIndex="100";p?b.style.top="0":(b.style.width="40%",b.style.right="0",b.style.left="auto",b.style.height="50%",b.style.filter="alpha(opacity=60)",b.style.opacity="0.6");document.body.appendChild(b);console.log=function(q){n(q)}},log:n,TX:g,mr:function(p,q){var r=!1;return function(){r||(r=!0,h(function(){r=!1;p.apply(q||window)}))}},ojb:function(p){for(var q=
[],r=0;r<p;r++)q.push(Math.floor(Math.random()*16).toString(16));return q.join("")},toArray:function(p){return p===void 0||p===null?[]:Array.isArray(p)?p:[p]},Kgb:function(p,q){if(p.length!=q.length)return!1;for(var r=0;r<p.length;r++)if(p[r]!=q[r])return!1;return!0},TMa:f,EA:d,WMa:l,hpa:function(p){return(p===null||p===void 0?void 0:p.constructor)===Object},v8:function(p,q){if(p.length!==q.length)return!1;for(var r=0;r<p.length;r++)if(p[r]!==q[r])return!1;return!0},difference:function(p,q){return p.filter(function(r){return!q.includes(r)})},
intersection:function(p,q){return p.filter(function(r){return q.includes(r)})},union:function(p,q){return p.concat(q.filter(function(r){return!p.includes(r)}))},unique:e,oqb:e,jsa:function(p,q,r){function t(){var A=Date.now();z||r.Nhb!==!1||(z=A);var D=q-(A-z);w=this;x=arguments;D<=0||D>q?(v&&(clearTimeout(v),v=null),z=A,y=p.apply(w,x),v||(w=x=null)):v||r.nqb===!1||(v=setTimeout(u,D));return y}function u(){z=r.Nhb===!1?0:Date.now();v=null;y=p.apply(w,x);v||(w=x=null)}var v,w,x,y,z=0;r||(r={});t.cancel=
function(){v&&clearTimeout(v);z=0;v=w=x=null};return t},voa:function(p,q,r){var t=new XMLHttpRequest;t.responseType="json";t.open("GET",p,!0);t.onload=function(){q(t.response)};t.onerror=function(){r(t.statusText)};t.send(null)},ueb:function(p,q,r){var t=new XMLHttpRequest;t.open("GET",p,!1);t.onreadystatechange=function(){if(t.readyState===4)if(t.status===200){var u=t.responseText,v=document.createElement("script");v.textContent=u;document.head.appendChild(v);document.head.removeChild(v);q(u)}else r(t.statusText)};
t.onerror=function(){r("Network Error")};t.send()},ggb:function(p){var q=document.createElement("script");q.textContent=p;document.head.appendChild(q);document.head.removeChild(q)},offset:function(p){p=p.getBoundingClientRect();return{left:p.left+window.scrollX,top:p.top+window.scrollY}},peb:function(p){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(p,1):document.addEventListener("DOMContentLoaded",p)}}});
define("tdv/constants/EventName",["require","exports"],function(){return{L:function(a){return a+"_change"},De:"default",Sa:"mouseDown",gb:"mouseMove",$a:"mouseUp",Qk:"mouseWheel",ma:"click",fi:"doubleClick",uc:"rollOver",Eb:"rollOut",SF:"mouseEnter",Pr:"mouseLeave",Jm:"pointerOver",Mob:"pointerOut",Cu:"pointerDown",TB:"pointerUp",Xf:"pointerClick",JUa:"focusIn",KUa:"focusOut",HB:"gestureStart",Mba:"gestureChange",XK:"gestureEnd",UUa:"gestureRotate",YK:"gestureScale",yc:"progress",CB:"close",OPEN:"open",
Wr:"select",$b:"resize",$Z:"changing",V:"change",Pd:"stateChange",Al:"cueChange",WF:"preloaded",ia:"loaded",$c:"loadingError",Up:"start",Fg:"stop",Ex:"play",hL:"pause",SZ:"beforeFrame",Zd:"frame",vd:"ready",aVa:"instanceCreation",Cr:"begin",Tb:"end",yob:"cancel",Rk:"press",Lm:"release",Ur:"repeatEnd",Vr:"scroll",Mta:"movementChange",xob:"beforeShow",cUa:"beforeHide",INIT:"init",od:"show",jd:"hide",UQ:"showEnd",$K:"hideEnd",bVa:"loadingScript",LVa:"processingScript",WK:"enableCookies",$Ta:"applicationSet",
cG:"userInteraction",Pua:"userInteractionStart",Oua:"userInteractionEnd",pca:"transitionEnd",cWa:"toolTipShow",Dua:"toolTipHide",Km:"positionSet",xua:"sizeSet",cta:"controllerConnected",dta:"controllerDisconnected"}});define("tdv/events/Event",["require","exports"],function(){return function(){return function(a,m){m===void 0&&(m=void 0);this.name=a;this.data=m;this.source=void 0}}()});
define("tdv/player/script/definitions",["require"],function(){return[123,34,70,97,100,101,73,110,69,102,102,101,99,116,34,58,32,256,112,114,111,112,101,114,116,105,101,115,270,272,125,44,32,34,112,97,114,101,110,269,271,34,264,266,268,34,286,288,77,111,260,108,51,68,68,105,115,112,108,97,121,298,267,295,272,289,291,293,319,34,66,97,115,101,79,98,106,318,301,287,34,80,104,111,116,111,65,108,98,117,109,80,314,121,76,311,116,73,116,101,109,284,273,275,277,279,281,283,271,256,109,101,100,105,97,357,34,
116,121,277,284,336,338,340,342,344,356,302,289,348,278,371,373,375,296,337,339,341,343,345,347,315,386,125,383,290,292,294,376,396,349,351,353,355,334,288,396,110,101,304,306,308,330,332,300,364,289,359,278,280,282,371,293,99,305,105,110,103,371,260,102,97,117,108,324,115,114,103,98,34,335,388,101,376,293,345,91,108,431,101,291,287,441,443,93,410,34,117,112,89,387,374,448,296,110,345,98,398,335,260,112,116,104,84,282,319,256,435,437,439,284,116,114,117,101,446,467,376,98,111,111,108,461,104,101,
105,103,104,481,372,492,469,471,473,288,119,105,100,477,466,389,288,470,109,472,114,461,463,90,515,468,517,508,521,383,463,88,525,376,518,520,461,99,327,116,83,104,259,111,119,533,296,494,496,461,97,116,116,97,99,478,111,80,322,403,421,483,438,319,436,108,328,491,516,34,548,497,383,110,111,114,109,97,108,532,421,447,534,528,461,574,576,578,465,581,506,527,519,509,34,586,577,108,524,590,569,535,594,115,512,526,482,101,436,563,376,102,275,403,568,526,34,450,109,91,100,111,117,98,108,490,32,612,111,
294,287,98,554,107,460,399,335,401,323,376,69,120,354,114,110,578,415,101,307,68,418,333,383,81,117,259,72,339,312,339,558,586,97,577,79,118,278,348,77,97,112,371,274,276,424,362,357,400,559,324,654,656,658,112,660,97,662,664,666,114,348,73,577,103,101,326,328,461,86,605,111,51,54,48,82,282,622,114,99,606,422,674,361,426,421,115,623,280,116,625,115,85,82,76,546,288,115,487,431,433,335,311,85,690,486,488,101,383,663,98,311,629,105,99,434,608,484,324,574,413,445,288,582,296,618,91,749,626,102,111,97,
635,335,625,666,566,725,34,291,114,315,91,699,260,701,703,705,115,707,709,76,101,765,762,288,103,97,431,745,609,485,271,49,615,583,593,529,335,542,115,65,117,368,111,789,747,735,489,794,547,495,572,678,402,324,773,101,775,704,706,117,708,101,781,765,461,405,632,99,107,326,521,421,673,360,425,363,320,632,114,326,829,103,275,117,110,100,67,496,575,310,292,268,105,629,767,755,338,114,105,122,629,553,108,287,689,280,538,108,784,34,727,101,112,541,543,545,600,616,571,461,328,625,268,367,83,354,874,542,
621,877,320,753,288,880,400,348,499,259,841,107,843,622,846,848,108,575,82,551,854,837,256,893,768,114,770,121,756,528,870,882,318,885,887,87,512,514,878,376,575,918,796,287,360,709,294,870,839,66,575,260,114,908,368,117,911,505,601,584,896,315,898,100,875,890,83,274,455,100,767,602,797,726,887,939,114,941,943,105,945,960,949,335,872,112,900,902,845,847,849,114,851,318,854,110,856,518,91,858,860,862,578,865,675,868,920,648,922,953,887,954,544,79,290,99,105,373,971,796,881,997,884,999,873,965,941,
83,860,710,913,961,1010,883,354,1013,888,876,657,859,861,294,578,781,432,927,892,591,595,972,726,1011,1024,886,1014,633,977,904,980,908,280,111,946,913,769,771,961,870,100,821,909,855,928,507,1009,950,121,952,1001,119,1003,554,1006,121,1008,536,383,974,1068,956,292,259,1074,603,1E3,889,544,86,994,1032,293,103,1035,912,1037,1021,1076,887,1070,1005,1007,1062,592,1075,637,897,958,1015,278,968,970,1101,1038,1064,1104,951,958,1068,905,575,767,429,906,962,871,1041,923,873,1068,66,108,821,1109,1052,1094,
1039,570,291,1107,114,1118,832,1036,569,1121,1119,1065,1067,1085,119,1087,361,868,1033,1091,104,1082,1123,921,1012,1043,975,940,278,1140,1120,980,881,1084,1027,575,990,1031,108,1153,1092,947,616,1095,335,839,1098,1072,1156,461,313,1115,259,1068,1028,1171,863,1174,1155,1111,1178,963,873,925,513,1193,1142,616,930,961,933,278,935,116,870,1185,1066,1106,1162,1139,1166,1111,1144,1123,1210,952,1198,1175,913,1203,528,1205,822,936,461,938,1213,1017,122,1019,1134,1113,894,1137,1045,844,1047,1122,1049,910,
767,1054,917,1056,1184,1105,899,1231,1018,1183,1076,1125,1025,1254,973,1168,890,1164,1216,1166,1255,1023,1126,975,1239,903,979,1122,767,930,1246,91,1217,93,287,1277,1229,1238,842,1240,1271,1119,1111,1274,915,771,1277,1279,980,920,964,1269,978,1262,1201,929,114,91,1275,1291,32,1280,1146,1116,1148,767,895,1114,1211,656,500,502,504,1223,1301,1204,32,934,323,1294,1044,1283,1270,1140,1243,1051,1245,1289,1247,919,1167,873,72,1315,503,1273,1319,1225,1321,1206,1323,1022,998,1160,1138,1132,1258,1040,1266,
1025,976,1284,1140,982,853,1061,1299,754,987,989,1030,863,993,1151,578,1324,1026,890,1129,1131,259,969,1133,948,1236,871,1260,1002,1004,1182,1194,1135,1158,1042,1381,119,1079,958,1351,384,1186,100,1181,1100,1361,1102,594,1219,1308,876,1373,942,1375,1110,1399,1112,1103,1352,1347,887,1337,501,1339,1287,1341,932,1343,1227,1208,1249,1395,1355,1327,980,1358,1050,985,1111,857,1170,1365,992,32,866,743,1369,1335,1161,966,1163,1215,1409,1217,1441,1138,1232,1234,1378,1411,1124,1353,1160,1117,1445,1093,1143,
1264,1312,952,1426,1297,1458,1176,1300,1302,1332,1276,1293,1292,1122,1370,1377,1177,1386,1256,1456,1148,1150,867,1089,1034,1200,1459,1477,1379,684,604,1430,1393,1387,1267,1397,1073,1385,1064,813,639,296,85,73,848,109,684,413,403,383,816,818,777,779,823,782,648,672,423,713,911,1500,560,288,1511,1513,821,780,1516,572,335,405,350,727,408,356,421,1516,294,946,727,276,371,311,68,608,278,292,959,271,487,489,1096,291,504,1544,1546,915,367,807,737,1179,101,103,788,421,1556,266,1558,1549,32,1551,1561,288,
293,1570,256,1567,1547,1559,1550,736,636,288,638,1523,325,327,329,331,333,637,1519,836,371,366,368,370,1111,77,367,369,1167,551,1451,616,755,1541,112,277,100,457,553,361,432,933,348,729,1612,276,112,729,870,314,472,497,1111,727,859,432,301,1583,34,956,499,292,647,649,651,420,320,834,675,714,320,1447,561,746,610,296,35,265,1652,102,751,1467,296,1447,383,770,944,946,562,791,32,53,809,1400,1123,577,120,1350,1498,1453,475,477,479,727,805,1649,1571,736,1667,570,811,461,109,431,1672,1409,1095,1522,324,
641,643,645,108,1637,417,1590,300,383,692,97,694,412,414,305,648,1699,419,504,1642,1520,1543,693,1605,376,1703,694,1526,822,461,428,430,1630,1647,790,440,442,444,1683,755,453,413,456,32,458,98,635,1692,404,314,413,1698,650,1700,269,653,655,100,657,116,659,116,661,575,663,97,665,667,315,1518,712,1594,364,1741,296,1752,1754,1756,770,688,1761,1073,1749,682,1753,684,1755,686,1757,1773,690,315,1719,695,1588,427,666,1539,371,104,605,1543,115,1545,1568,1548,1560,1076,338,891,1577,1796,1557,1799,1581,1552,
1767,288,696,1589,1711,1655,1713,1765,320,276,1071,1398,607,1728,284,793,752,1235,1674,351,686,709,1393,105,1716,767,1786,1721,1831,1065,828,107,80,1051,1006,984,1476,376,1275,681,100,1771,1758,1760,176,1784,121,827,633,1842,1491,984,870,1438,709,1846,296,1275,1851,577,1842,431,1423,399,383,84,104,471,645,105,1173,351,1789,323,946,555,686,694,1795,1797,1579,1570,1572,1632,1585,324,1503,1505,1507,639,1592,1764,676,421,275,108,108,1853,1535,558,100,368,432,84,1542,1673,594,1006,355,76,97,1625,70,862,
87,1338,1317,1037,755,494,108,1611,32,1928,941,287,453,1316,278,287,49,48,48,287,50,1940,287,51,1944,32,52,1947,53,1947,703,1941,32,55,1947,56,1947,57,1947,596,1440,383,1916,346,259,1910,103,1912,671,1914,1157,1256,1535,1464,1241,907,1060,1864,288,1275,1248,1659,496,1905,689,1535,1918,1625,479,642,1068,1496,1832,354,109,1989,648,1991,540,1481,1088,1173,1090,1222,1827,594,1903,1986,278,1975,1213,781,102,116,1689,1487,795,1453,2009,1906,1996,1138,939,552,111,109,82,1416,2016,1407,1980,1410,594,348,
622,1925,569,755,1862,1436,1364,991,869,461,1965,1349,2030,1298,2018,1657,1461,1412,1012,2012,1443,840,339,340,2028,2030,2017,1656,1668,461,2021,1987,1996,1998,108,2E3,1457,1272,1263,1272,1265,998,1535,1874,1876,787,108,1993,1383,1821,2064,2034,1973,1353,2056,941,1970,2063,1020,1478,2090,2023,1213,2029,1316,2050,2087,1658,335,2067,2011,2098,2057,2100,503,1450,1995,355,1068,1310,1685,1984,1904,2022,355,1976,1285,1141,2051,288,1288,916,1471,1474,1473,575,870,2106,114,2091,278,1970,2112,1972,2046,2069,
1919,1999,101,1992,1148,1994,2140,1964,1996,1908,1968,2110,2038,1488,1453,1494,100,2079,1875,519,1877,2083,2002,1368,2004,1485,1393,2134,2136,114,1970,2014,2031,1661,2169,1985,2120,109,2122,1405,1679,1664,1954,2087,1195,1454,2078,2142,1990,2145,2001,876,2148,1690,1135,2170,2108,941,2174,2102,913,2104,2054,1024,1907,1967,729,2174,2113,2180,1213,2138,1253,2149,731,2023,1296,1977,2124,2087,2127,1290,1472,1305,1293,2141,2121,1213,2025,2060,2202,1037,2204,2188,2055,2199,2137,276,2154,2094,2007,1123,2047,
2219,100,2182,1727,806,271,2185,2095,1379,2047,2013,608,116,2233,1460,2076,2217,355,2080,2162,2082,669,120,1415,1316,1493,99,2009,831,2195,2125,2088,881,2272,1985,831,1221,1486,2186,2096,2189,355,2152,729,2231,2027,2211,2024,2059,2027,2139,2196,1379,2158,1975,2246,1357,105,852,1492,1432,1363,1434,2044,1367,1483,2045,1065,1533,2155,1742,315,2314,2228,109,2264,98,2163,2269,1417,2297,1453,1965,2321,2163,1188,2308,1172,1192,2177,2119,2068,2229,2057,2174,2296,2276,2187,2255,2109,2030,2341,2284,2298,1974,
2238,942,2346,2215,2326,1915,2151,2208,432,2290,1536,2355,2089,2286,2320,2161,2322,2082,1138,2259,616,2235,2344,967,2062,2032,1493,2350,2338,941,2370,376,2372,2190,2144,2146,1169,1029,2044,2334,2216,2205,367,2160,2081,1878,1078,957,1081,2391,34,2198,2379,278,2347,2253,2157,2378,2180,2246,2275,2348,2327,2351,2360,2242,1452,2356,1917,2143,108,1858,1844,1360,2276,1733,2257,287,340,112,287,859,1316,631,2294,109,996,2097,2263,2366,2330,1148,1189,1435,2167,1154,2377,2438,109,2411,2406,603,2408,2293,2026,
109,2381,2052,2261,288,2373,2239,112,2457,288,2235,2402,2365,2395,2164,876,2116,549,2150,355,1482,1439,108,342,501,1431,1409,1927,2435,287,1687,1909,625,2428,276,2133,2178,2337,2212,2057,2360,2405,2243,2278,2273,291,2443,2044,669,442,1565,2362,2319,2329,2082,2115,1111,1311,2392,2159,2218,1326,978,2248,320,1663,319,2252,2498,2474,2409,2517,846,2450,2524,973,2408,2070,1921,294,2497,569,1224,1420,604,1233,460,731,115,2296,1891,2105,2492,2107,2439,2469,2529,2417,1123,2467,2070,2072,2442,2332,1191,2005,
2283,2451,1123,1793,260,83,2279,1904,66,117,2026,110,2033,2513,34,2461,2172,276,2174,2416,2156,2418,1997,2420,70,845,1359,2481,2276,42,2508,2440,2368,1252,1233,2447,2364,2509,1878,2552,2582,2244,2384,2071,2192,2073,1286,1446,2053,2401,2548,2135,2604,2534,2258,1466,2203,2610,2041,2478,1935,2589,2087,2483,2455,2485,512,100,2488,1571,2490,1346,2237,2403,2578,112,2580,2376,2400,2577,2464,34,2383,2419,1625,2502,1172,2479,103,2623,913,755,1207,1937,32,625,2015,2431,2030,870,2328,2593,1878,1349,2639,2507,
2525,2070,71,670,2271,2500,114,699,604,624,1717,1362,451,2134,287,578,119,315,115,2491,2336,2549,2494,2380,2617,2234,2610,2467,2122,1328,1979,1331,2128,1983,2547,2688,2613,2645,648,2615,1923,2030,986,451,1932,2434,1929,2655,1935,503,2655,1939,1954,1943,1954,1946,1954,1949,1954,1951,1954,1953,287,1956,1954,1958,1954,1960,1954,1962,2312,2702,2010,2704,2526,901,1356,1428,2303,983,2424,2624,2307,2388,1172,2310,2477,2661,2414,2435,2241,2666,2342,2197,2612,1535,2601,2019,2583,2533,862,886,121,625,2710,
619,1006,578,743,287,2737,2755,2550,2265,2396,2147,2085,1497,2667,2739,2179,2288,2359,2435,2211,2599,1905,2784,2792,2663,108,2282,2597,2634,2468,2781,2470,1261,2692,2260,1145,2787,2493,2665,2176,2400,2299,2357,1909,729,1970,2800,2206,2614,862,2642,2235,344,2572,2567,2009,85,1971,1409,2223,917,930,1812,2570,2572,287,73,429,110,2836,340,110,93,1278,32,2834,1588,2842,629,2838,2840,2850,2844,2437,2364,2511,1409,2575,2245,2527,2123,1329,2033,1982,1334,2525,1138,2340,2354,2760,1379,553,98,262,260,120,1393,
2043,2648,2622,2772,1276,323,2715,2427,32,2432,503,920,2568,108,831,2823,2610,2662,2469,2567,578,1707,260,2883,757,287,102,1878,864,627,1006,95,431,604,260,2905,2910,2037,2913,758,2910,340,95,511,1199,2915,116,95,2921,499,2660,2633,2820,2635,2496,2871,2412,2452,2448,2869,2257,2895,2459,2576,2351,2093,2375,2812,2786,288,2467,2858,2276,2860,2351,2581,2765,2554,2762,1996,2793,1128,1130,1406,2947,2872,2407,2938,2230,2435,2638,2964,2936,2957,2703,2171,2360,2941,2808,2460,2944,2240,2759,2972,2319,2556,
2192,1545,429,770,2305,2482,987,978,667,454,287,111,689,1734,626,2999,45,477,844,502,2777,629,101,937,2571,2843,2827,1985,2154,1340,1469,2128,2848,328,2854,2852,629,2854,2845,2996,1301,2835,3010,2851,32,2839,3022,3028,2855,461,786,2830,2965,2008,2958,2287,2358,103,2210,2400,2555,2420,2557,876,2476,1152,2561,2819,2393,2959,2797,1449,2935,2563,2499,2280,291,2504,1564,2651,2530,2949,3040,2584,1920,2768,373,2771,2306,451,2774,453,99,3006,587,2738,2979,2780,2367,2782,3049,2003,2390,2948,2236,2932,3069,
2385,2193,1372,2962,2955,1063,2413,355,647,2183,748,575,597,1655,2652,987,2737,2428,2797,45,629,108,121,1934,2420,3112,110,3114,2779,2742,1046,2123,1429,984,2883,2880,1366,1437,2003,3121,2960,1148,2977,2363,2801,2985,2386,890,2647,2560,2168,2813,2453,2301,2806,1202,1301,1303,2225,1306,2262,2802,3084,2893,1213,3135,2066,3068,1138,1970,3158,2118,2740,2171,2093,2982,3059,3164,2179,2048,1316,3097,2065,1076,2892,831,3050,646,291,3064,2335,3165,2815,2153,2709,3144,2967,2339,2257,3174,2277,3170,2493,3133,
876,1391,2399,3089,2467,2793,3057,2596,3045,3068,3138,3094,544,1405,3192,2187,2814,2635,3211,2761,2974,3055,2898,2783,1820,2785,3038,2603,2705,108,2615,2536,3148,931,520,457,1018,2542,2460,2544,2354,2546,3067,3217,2933,2757,3168,3066,2943,355,2764,3098,3039,3240,3154,2163,2369,3147,2382,2610,3213,2690,278,2870,3204,3089,2897,2803,2267,2799,3188,2364,3172,503,3215,2254,2351,3228,2956,537,862,323,1070,113,489,2472,1530,2514,1988,2585,1922,1924,2883,2712,1931,496,1933,2656,2030,2718,1947,2721,1945,1947,
2725,287,2727,287,2729,1955,1957,1959,1961,3104,1963,3153,2767,294,258,1687,3114,767,1628,729,3159,3250,3269,2616,2074,2609,2942,1965,3207,2961,1374,2971,3169,1179,3033,3012,1904,3044,2831,3149,1470,3018,695,3033,3021,2841,3033,3024,2847,3026,2849,3344,3030,2853,3347,2856,2801,3161,276,3274,3248,3136,3091,3358,2463,3254,2458,2978,3090,3054,3225,3048,2805,3325,2276,2466,3068,3196,3140,2559,1484,2446,3267,3137,3286,2535,3072,2678,1574,987,3076,2776,32,2778,2931,3370,3092,2605,642,2987,1757,2990,2425,
2992,846,2994,413,2996,2998,2995,3294,413,3002,104,3004,104,3006,413,3356,3091,2789,103,3014,3383,3091,3378,544,3282,3395,2515,3083,2441,1404,3096,3243,2553,2984,3385,3324,2608,3375,2896,1996,3141,578,2649,3065,2039,987,2654,114,1934,2887,2889,1871,2809,2689,3207,3400,2989,3126,3074,619,2993,690,3410,2997,3406,3E3,454,3413,3415,3417,3008,3321,3184,3225,3227,3058,1037,2538,3231,1737,3233,1655,311,2545,1582,3334,2826,2892,68,544,3447,3229,1275,3342,3020,3353,3032,2572,3348,3497,3352,3031,3346,3501,
3121,3421,3338,3223,2319,2454,2060,2970,1376,3053,3430,3397,3372,1086,3087,3052,3205,3250,3426,1149,3522,3143,3262,3218,2803,2397,1080,1576,2983,2868,2256,2015,3271,2020,3377,2797,2607,2221,2618,2942,2695,2410,2795,3424,3396,3513,2027,3540,3249,3476,3258,2058,2455,3515,1408,3511,2525,3526,3210,3435,2602,3475,3171,2213,2240,2946,3516,3551,3518,3203,3388,3193,1632,1867,97,67,663,278,1598,1641,1593,1901,285,637,679,376,82,339,1060,1696,3583,366,770,826,378,557,348,2318,833,3588,1644,1577,1996,2865,1470,
391,340,1532,407,1996,1740,3591,814,2316,406,1678,383,848,111,107,362,1842,3077,3222,711,835,3589,256,821,1626,1409,3319,1630,2543,733,3637,3238,34,694,111,843,670,1793,99,65,1080,3015,1275,3639,103,2846,3656,3618,1584,3592,296,1812,1639,1748,335,1769,1779,3581,1853,691,1834,3606,1900,3608,1810,34,3668,685,687,1759,2998,1785,1716,1812,826,1781,1772,97,1869,1523,358,3675,946,121,97,1803,3536,637,1006,555,1254,3677,3664,1747,461,669,112,3615,1534,1996,1763,3633,3608,34,1596,1602,1599,2671,1065,386,
3719,3709,385,529,3677,3710,352,3712,1510,700,67,3281,1537,1790,1753,371,472,3182,1566,1805,1798,1580,1681,1552,335,1575,1887,1806,3744,1891,3704,1588,3665,1815,3607,946,1575,84,1833,3578,3212,1613,116,3760,366,3703,3731,101,119,278,3652,455,3713,1643,1540,717,1006,720,3520,119,3163,1312,1840,831,2181,2962,3102,284,2523,3436,383,109,1708,2071,557,3688,1758,84,770,115,314,1430,68,1059,3402,34,2521,1824,3303,1826,3792,3784,633,831,2324,2315,296,3481,2655,1322,1228,1076,3778,719,282,3544,1165,2942,487,
686,1859,629,3101,3462,91,2677,846,1618,627,259,101,95,2037,95,436,260,2911,2844,461,118,114,2670,1233,3691,643,72,605,3766,3762,1135,673,843,282,115,2122,3247,3175,474,741,108,666,3800,3832,2423,110,3805,3460,2748,3333,1584,275,3864,115,3866,2595,3861,1379,2825,2843,777,3764,3654,3341,3350,3019,3504,3354,3507,3025,91,3027,2837,3499,3506,2843,2845,1424,121,3785,291,80,3883,292,3885,3868,3193,1899,3884,3866,1282,2743,1427,3374,2222,3340,2128,1304,3152,726,3825,720,2360,3015,1320,3822,3455,1584,348,
3911,114,350,666,68,770,103,3064,433,2512,2117,3814,829,831,3594,2703,310,312,348,3428,383,3852,2321,727,743,107,3594,553,1430,1160,3789,2251,1683,2187,2906,114,727,3874,2573,3876,3878,3596,1393,1210,3941,2696,3366,2126,3927,2224,2130,2226,1474,537,291,100,494,3995,3856,1444,3925,3546,3368,3890,629,405,558,945,3578,2832,91,3503,3904,3505,3023,2846,4012,2843,3345,4015,3909,3941,1337,1187,1148,3566,3332,3244,3984,3815,2501,1106,3146,4001,3480,3989,917,3929,2227,3961,114,3999,114,83,1041,984,2102,3809,
1650,265,54,1953,3106,2693,2942,4029,3953,291,3510,3926,3230,3821,1344,3823,3952,830,3912,3914,3865,3986,1122,3125,3880,1926,2750,1190,1436,2620,3009,2572,1912,3947,625,83,3932,3715,1318,3016,771,4017,3029,4014,3355,3901,3903,4018,3905,4020,383,759,99,945,3773,97,2899,3073,2520,1648,2184,46,1666,3812,3568,3824,114,436,709,705,867,4083,4045,629,4047,4108,324,1651,1653,1654,1683,2235,4056,4066,4041,4068,3885,3577,1493,4085,3886,2057,3360,3869,288,120,942,1985,1393,4004,110,405,3894,3017,3896,3343,4013,
3899,3907,4016,4153,3498,4092,3507,881,821,4116,101,4118,743,625,2411,4048,32,48,46,54,3973,1386,4138,3253,4034,2807,1157,4138,2E3,3459,3982,3836,3464,2999,3408,3468,1934,3470,3003,622,3005,3393,3007,1209,3940,4030,840,4033,850,2746,2588,3127,3380,2908,4078,1229,3335,2429,4151,4089,4159,3898,3500,4157,4094,3351,4155,4218,629,3908,1839,4201,4023,953,1309,3950,2473,4065,3816,1403,3373,3440,2103,2610,368,3958,315,1912,496,280,112,262,4084,4115,554,101,4044,1023,3461,4107,1823,1808,626,2087,2575,4131,
3786,2099,3567,3275,3824,98,718,720,3509,2257,4147,3033,65,82,699,3770,4214,2833,4216,4222,3906,4224,4158,3902,4221,4096,4161,4157,4021,4201,3423,3339,4061,3451,1421,1207,920,4138,2951,4259,3951,1981,97,69,645,2677,3535,4171,1572,1683,4260,4134,115,3817,3935,1342,3937,4199,315,3941,3913,3647,3915,3921,2862,2697,1050,3611,2700,2867,973,4138,4305,1919,625,4308,4124,1560,4311,4302,34,3852,4042,4123,4256,288,4126,1653,4053,4181,4163,4249,4117,101,4119,4251,4121,110,4170,4338,792,4176,1489,4313,4059,4087,
3936,4063,3938,1394,3910,4201,3934,1418,4294,1226,4297,1184,4313,3786,4203,1406,4328,2699,1055,4331,288,4343,111,1870,278,3957,553,110,1831,2249,1680,50,4363,2157,4138,3421,4374,3089,2192,278,1696,1856,4057,3545,1037,4409,4132,4290,4410,4228,2811,3574,3089,4261,4031,259,3266,4293,4368,1422,4319,4372,4416,958,3917,3212,4183,2606,4025,3434,4027,3813,3882,4323,4069,3157,3987,2643,2619,4041,4390,294,278,1853,4345,2250,4347,1940,55,554,744,4129,2610,3863,4324,4418,3562,3699,3939,4320,4373,3549,3221,1393,
4406,644,578,4322,3920,831,767,4475,4462,291,4415,4132,4228,2331,2751,3142,3382,3089,4144,80,3701,2562,3244,3852,1921,666,4186,4255,4453,3791,4113,335,538,966,3997,966,4042,4393,1830,3888,1453,4461,4069,291,4432,3862,4200,4410,4136,2400,4389,4391,4043,4358,3860,3971,32,49,3298,4112,4265,4332,4267,3779,282,3421,2818,2400,4513,4135,4382,2864,4385,1333,796,4428,4321,4380,4263,4438,4502,4466,4429,4132,4424,2276,3820,4295,4318,4482,2274,3550,3089,716,4534,3826,2544,2558,4486,3381,2006,4439,871,4138,2670,
3037,4465,372,622,555,1853,4103,4105,710,4171,1825,4578,3831,2573,3803,984,3978,3833,110,956,101,3744,3563,4503,3995,4506,1850,4448,643,4252,2747,110,3783,3931,4566,3780,4435,2387,4076,2445,4572,4552,711,4476,1137,4550,4419,4599,4610,4268,282,3867,4563,4624,4619,4480,4326,2745,2304,4254,3403,451,3128,4077,3131,4163,4611,282,2615,3315,1878,3631,913,3656,4642,4626,4568,3433,3331,4623,4578,4565,4652,4070,4237,4002,1218,4518,4483,1212,2057,4609,372,770,4590,3596,4593,3980,3806,4636,4578,290,3681,1912,
1637,3874,3802,3596,3981,3807,4586,1940,4501,4532,4625,4535,115,4516,1489,4664,4234,899,4382,4072,3494,449,4075,2444,2753,995,4561,4422,4229,3086,2166,3088,4630,4540,4693,4629,4677,4380,2246,2519,1822,4500,4400,594,4148,86,4275,281,3698,4087,3496,4280,4287,4156,4283,4220,3897,4281,4098,4233,4067,4441,4541,4633,4180,3495,1470,4038,3993,383,4240,4394,4396,4499,1680,4587,3881,4574,4643,4653,890,3179,4616,4493,4573,4658,4692,4762,3446,2883,2429,2627,2487,626,494,2455,4298,4353,4166,4355,4168,101,4452,
1680,34,4348,1652,4350,2371,4239,311,1210,4243,439,105,4246,110,1912,117,555,2827,4597,2573,3960,3919,4480,4202,4744,4204,4635,4073,3448,4638,4208,4705,3311,4440,3920,4292,4557,1419,3482,4560,383,4148,4007,697,4375,4731,4285,4737,4733,4223,2855,4736,4154,4832,4282,3034,4226,4430,1314,3187,4425,4317,4369,937,625,3839,1911,4670,4594,4685,4676,4757,4589,4852,4675,4811,4618,4766,4567,2084,4470,2813,4138,3444,2621,2480,2883,2657,116,1279,2885,4295,3454,870,4856,4591,629,4673,1430,4334,4307,4804,4691,4567,
3781,4694,4512,4664,886,1604,2883,1608,1610,1616,315,3840,290,4008,100,1057,622,2677,67,3077,107,65,4206,4397,1664,4579,4082,3843,102,438,566,2272,4802,4788,4702,451,340,4914,3846,4917,115,4919,293,3473,4298,4759,3421,4819,4677,3798,577,1912,3581,4681,4851,3876,4883,4336,4527,4310,4531,810,4232,4886,720,3478,3261,4820,4376,3483,2541,4379,4742,4325,3923,1465,4745,1468,3150,3991,3930,4631,4514,2058,4667,4444,4130,4696,4708,3533,1392,4865,4759,3781,4762,4712,4717,4960,4404,4955,4426,4378,383,4504,3996,
760,4507,4604,2404,4525,3761,3983,4718,4971,1016,3479,4573,4144,89,3697,4137,4759,2615,4668,4421,114,4417,4542,2698,1111,2866,4546,4707,5013,4666,5002,4954,4677,4975,5021,4024,2194,4716,4757,5012,4479,4442,4972,4964,3367,4182,4980,1913,4844,1420,4823,335,118,4728,3835,2991,451,1736,727,686,100,3995,865,114,4932,4652,2707,3288,3836,3290,1932,2715,3295,4295,2719,1942,1947,2723,287,3301,1665,1952,1947,2731,287,2733,287,2735,3079,597,5057,4692,3227,3387,2883,3391,3078,4197,3080,4547,4373,4443,5036,2465,
1264,383,1538,3737,421,5045,3770,647,67,542,432,710,1578,1569,1800,3677,1895,2027,1897,614,288,366,477,305,946,1210,677,3591,4008,5123,963,5040,123,1659,480,1554,677,1632,3760,4336,1836,820,822,824,1517,3674,3714,946,275,3782,903,3818,4142,4445,108,848,845,5148,3579,3619,1501,288,5137,778,1527,1515,825,383,83,453,260,79,2571,317,1640,3693,5143,387,804,3836,4871,2489,2430,2888,2030,2434,4776,1631,5156,1586,5170,3666,1811,111,120,1745,3755,3735,1882,672,1843,3969,4355,3749,3743,1890,3488,726,1018,4044,
1555,3742,1889,5111,5185,1693,642,4407,646,3795,1710,1591,4440,5173,561,3946,786,2677,88,848,294,1903,115,4783,4912,4126,4688,48,4921,5037,461,2999,4556,3808,4361,4528,4723,1123,4165,5230,4125,4127,4128,4948,5096,2942,1687,110,5239,4757,2999,4360,4346,4756,3244,5253,4315,2400,100,5222,4335,101,89,5226,487,496,5229,1466,4171,4785,1940,265,1940,5235,5251,3368,1675,478,480,4946,1682,5250,1684,4950,3808,5266,2677,90,5270,5228,5246,376,35,5233,265,5280,5150,5282,5292,625,3652,5145,4983,4171,1951,5243,
461,2923,1175,4586,5312,4750,873,5315,5241,5260,4573,5253,1545,476,4764,4618,2999,5297,4049,4127,5302,2235,5265,1704,5223,4083,112,1635,4166,2982,5310,5317,798,5060,4754,1664,5322,4618,1490,3980,5305,4585,5241,565,567,5288,2575,2540,101,3945,5336,5267,4527,5356,4258,913,2575,4165,5258,4722,5288,1691,383,3679,116,3708,3671,315,3708,3775,1714,1766,5211,376,5376,5378,3683,121,1786,3686,383,1745,1837,710,1816,3634,289,5197,984,599,5347,2522,5344,1584,5400,629,580,5403,3790,5405,5399,4594,589,5410,3972,
5373,2761,3968,5401,4527,4689,3361,3159,5420,629,5415,4721,1680,5423,5149,275,5426,4359,2057,4527,34,88,89,524,1732,987,5439,90,287,88,90,89,287,89,5447,5450,90,88,287,5454,5449,32,5448,88,870,3636,3318,728,3640,3235,3642,1800,2547,5434,5409,5429,2184,5412,764,648,1662,5241,91,2846,2087,1275,5394,5138,1528,783,2278,2900,4527,5349,4690,2576,110,866,5402,5473,564,578,5357,4301,5290,431,866,5428,5240,4346,5366,4340,5502,5494,424,5472,5506,4453,5508,5358,4341,4878,3596,5513,4171,5431,3918,752,4851,4879,
110,5505,5522,5412,5519,1430,5496,5514,5430,5317,3677,5484,5160,5139,1529,461,5165,605,262,5187,5382,1817,256,628,2361,4637,619,5177,2631,5179,3454,5182,2060,3660,321,3620,296,5547,383,70,3803,3670,5389,4413,2422,3807,5397,3715,1819,1099,4648,3244,280,366,5051,1506,1393,3696,4729,3244,2009,3983,4492,3703,5385,3663,3754,3706,5566,3803,5376,5569,1774,5391,1788,5194,1791,421,2565,5108,5208,5110,4257,1801,3427,3741,1888,5609,3745,737,3753,328,3755,1899,5220,1818,4716,5316,5418,1379,4751,4510,2271,5489,
4911,319,5491,5424,4840,1841,5407,4803,5017,1470,5567,551,5599,1854,5571,5638,2661,3673,1409,5159,1514,461,111,265,328,116,5513,4757,5654,102,5656,5505,4757,2929,2270,2400,4639,4868,2650,2883,3450,3452,2658,5180,1316,870,5314,5327,5492,1621,116,3702,4521,2003,4769,5061,2484,32,2486,2629,626,2429,2891,2900,5047,5553,91,2906,1904,2925,3849,2918,5701,2917,605,5701,2921,5678,5707,111,95,5665,503,4931,461,5585,3183,3768,335,1812,925,846,5612,320,5099,1883,906,4827,320,5109,1807,5616,4824,608,575,101,3858,
2902,5613,3750,5202,1809,5592,288,5270,787,413,521,5621,3776,371,99,5728,4836,4005,4324,367,4889,594,5753,1051,5755,2841,5015,4384,5640,4330,5019,4990,5754,2854,3913,3865,367,4179,4661,4054,3368,952,278,4660,4411,2537,4036,2129,2132,2131,5056,537,5771,3033,4403,2791,5667,958,5781,4469,5577,2879,5796,5001,5781,2435,4668,5761,4831,629,3955,2740,5782,4700,4207,4570,4209,4641,383,4626,5464,1629,433,5770,5762,2854,5809,1853,5776,5783,4789,3830,4535,5010,4973,2610,5780,4807,4962,2220,5812,3836,5668,4815,
3081,2643,5791,2572,5263,3089,5835,4520,5848,5801,5827,3829,3368,5806,5763,5825,689,5782,4278,5786,5056,5788,937,305,121,3323,4141,5524,1684,100,5867,5798,1384,5851,3842,5802,2636,4668,759,339,5803,2345,2101,5833,2942,5856,5772,5757,2247,4382,5861,4748,2132,1229,5866,5793,2455,1393,5888,3033,3787,821,5422,5412,5881,643,3553,2456,5886,4003,5866,5909,4668,494,5872,5860,4828,4747,3151,4039,5345,5877,4934,4843,4630,5901,2572,5773,3885,5775,4699,4205,3807,3107,4813,5814,5842,870,5907,5797,4808,5828,4965,
5920,4967,5922,2465,5845,2843,3505,5847,4630,5835,5898,2060,1393,5941,5878,3260,4511,4724,5913,5094,5777,4351,4824,5964,2057,2214,5024,4757,5916,1855,3042,4538,3089,4626,4953,4009,4821,2655,5360,3234,2576,3236,3261,3644,5928,5951,2840,5255,3244,5849,3538,540,5003,4618,5959,3364,5869,2187,5990,629,3505,5915,5913,4719,3788,5632,5411,5626,1453,5974,5925,5666,3089,6004,4149,3042,4366,3244,5974,5782,4543,5767,4386,5769,1179,5969,941,2934,5972,5579,4535,4888,5030,5994,5801,4537,5128,4578,5995,5970,3359,
5998,5492,3794,5053,3637,2952,4341,6024,5996,5805,5950,5808,2612,6025,5016,1409,5018,520,4877,5831,3287,5926,2749,2711,3292,2713,3293,2716,643,1938,3297,5069,3300,1950,5074,1954,5076,32,5078,32,5080,5090,5082,461,6E3,2099,2353,6034,4573,6019,5930,328,2247,3887,4147,6031,2404,6047,5635,4503,6057,110,5858,5883,5023,5962,1123,6096,5976,6042,5664,5852,6092,1316,6002,1135,6091,6045,3365,5095,5303,6113,6107,6097,5932,5943,6026,6062,1470,2701,5949,5823,5902,5965,5944,5236,383,5849,5765,1244,6027,4545,6064,
461,4626,4184,267,3401,4854,4074,451,4188,3466,3409,3407,3411,101,3471,4195,3416,4197,3418,5790,6138,2572,6109,5836,3123,4720,5535,5474,6013,594,5835,5953,4578,6019,5759,1123,4626,4867,5686,5048,5554,2887,5672,5675,2890,6169,5807,6020,2816,432,4935,4757,6019,5993,4573,6151,4613,4236,6141,5281,1123,6054,6124,6007,5917,5996,6121,1379,6123,2200,2940,5911,6210,5897,6021,4271,2400,6211,2374,5885,6126,2235,4626,4270,2015,5800,5924,6224,6234,5795,5877,5903,2221,5530,6178,6128,6170,2843,6130,2159,2840,350,
413,6203,4618,6232,6115,4577,4855,6036,6206,544,4867,4983,6201,6107,4463,2033,2187,6205,3139,3521,4711,3523,6018,6265,5892,5919,3928,5921,4749,335,6E3,5874,2086,6258,3826,5085,2770,3578,755,5088,5081,4816,372,6259,6270,119,4026,4656,6285,625,5956,2291,6239,6032,6119,503,4668,5835,4768,2882,5687,2626,5689,2628,2630,5693,6195,5763,6248,6006,6221,6318,5824,2762,6250,454,6253,5492,6019,6172,4628,4864,3089,6024,5933,4810,4701,2679,619,5841,3130,2166,870,6330,6325,4122,6322,5822,6196,3505,6251,101,6328,
6105,288,6218,4E3,5966,5829,3368,6282,2862,6175,6243,4657,1802,3320,6011,271,5516,5501,3283,5844,6246,5756,5774,5891,2862,6184,6323,5902,6336,4607,5813,4615,5939,6090,495,5908,2968,2455,6216,1453,5959,6181,6264,6375,6108,2612,6380,6143,6118,3190,2015,6056,6398,5850,5954,6403,6305,6392,6104,5149,5979,862,4646,3317,1627,5465,5821,6281,6389,5942,5837,2863,6061,2276,6063,278,5940,6423,6173,2744,4071,5934,6155,4812,6340,4814,6342,2311,6431,5882,5878,6393,594,6255,6198,3422,6068,6397,6196,6248,6241,5905,
6244,6381,2572,6332,5799,2149,1632,1849,5644,348,5646,4594,5548,5398,5576,5875,4630,5580,5131,5583,5684,1151,4086,1037,1866,4937,3690,4604,5561,1893,376,3705,1814,383,3581,3598,3585,3957,1210,5572,4676,5574,1521,5744,34,3967,3596,578,6492,770,6494,6466,5638,461,79,114,740,116,350,6017,256,5726,5196,4594,5206,5200,5209,5610,3677,6515,1339,5750,5383,320,115,1148,1912,625,4670,4753,5497,3790,4110,5412,1646,5416,4347,5248,5333,2610,5717,6369,4172,6540,539,4300,4171,6371,5368,4341,6531,876,2063,4171,56,
5412,4391,3979,2086,5625,4578,4240,1210,1337,108,360,5365,5499,5367,1037,2575,6049,5354,4346,34,2906,120,367,2927,5711,1613,694,269,5442,451,6582,6584,2921,538,3599,97,2915,6583,100,6585,2927,3181,4355,2491,5434,5362,3947,5364,6548,6554,6576,4341,5681,5683,6542,5523,3212,4025,369,5478,4346,6617,1386,1148,3708,2347,4171,1949,57,4175,6457,1872,335,4509,4395,101,6491,3584,770,304,666,366,3692,3632,5751,5384,3661,5563,288,6635,4117,3595,1430,6504,6639,97,6641,355,639,383,1033,115,5642,292,6465,1762,5142,
6646,320,6547,4420,5590,6226,625,554,1793,1726,6616,5412,2677,6676,729,6651,6579,4500,46,52,5537,6500,6666,1775,335,1511,3581,1881,5604,5725,846,6522,5615,5989,489,5105,1885,5607,5614,5732,3752,6690,6482,3756,3694,5752,489,4329,771,1511,3733,3474,383,906,6042,6553,6574,5509,6373,437,2429,3959,6548,4947,6372,1631,5375,683,339,5388,5600,3685,5602,3587,6713,5101,5685,6311,6542,3716,6315,448,6590,619,4775,2060,4772,5691,5178,5648,1704,3578,5651,5161,5653,5655,4355,5521,5241,6623,1379,5660,5662,6456,6043,
5346,6537,5417,6043,4208,6188,6775,2465,4874,5302,2653,4874,5673,4872,6193,4370,5678,6772,4757,3631,6365,4757,2878,6548,6768,2157,868,2901,6685,4784,5699,497,6751,756,3007,2915,5700,2909,2926,2912,5706,6811,3844,2571,5703,6815,5708,926,6166,2906,2926,2928,1924,6485,3662,1811,5594,6489,1531,276,463,6691,6469,3715,5053,114,107,293,2122,5286,808,5517,5290,4131,6496,629,6716,917,1842,112,6834,6482,5379,1855,4664,6848,3850,1964,5649,2276,6761,1722,3961,311,105,2677,6573,566,6575,569,2575,5045,774,767,
1525,5485,448,400,6673,4420,6833,112,6684,2177,5434,5534,4757,5433,3596,5663,5587,6653,984,5658,3244,6671,4630,6722,4908,2684,121,1912,5738,101,4526,6548,2721,6798,1083,4893,6548,1380,1620,1559,6806,4895,367,4897,121,4899,437,6098,1209,6884,2267,6396,4035,4376,5043,288,5606,69,327,6368,6747,2999,4481,6806,6939,4295,3280,259,3849,287,6944,6600,2037,6947,1750,3849,6816,6787,4101,740,99,6946,1305,623,743,6954,1279,6961,6958,431,6963,32,6944,279,6959,6970,2926,6950,6969,655,6971,6967,6975,3280,1870,6972,
117,6982,6980,6984,294,6953,2037,125,1623,495,6902,4242,111,6906,6843,6872,879,6556,1802,6935,604,6678,6780,34,6942,6783,987,6942,6951,6945,431,7011,6949,2571,7014,6989,7016,6960,6957,6959,6956,6962,6975,7023,6966,110,6968,6973,6983,1554,7029,6977,6812,7028,6986,6982,7013,6976,6985,7019,6981,6988,6979,2571,870,5606,4853,2748,4687,1947,4677,6927,97,120,6354,3988,6931,4846,881,1802,7049,2623,7051,6911,2564,759,118,1393,6722,6257,6612,5290,6728,276,6730,2859,2117,5098,3736,946,6934,6699,5740,5201,5469,
963,1604,6704,5107,6700,6708,5203,617,7084,5730,5608,7093,3746,5949,3965,7092,3744,5366,5611,119,4305,3535,5731,3751,1582,3727,6855,5389,1655,5118,338,100,1540,4213,6647,4371,5126,321,5125,7122,5606,7124,6531,5724,5129,1632,1634,278,743,3581,70,1772,5396,3757,371,312,5340,3015,6864,709,287,1511,702,819,5540,709,1324,292,111,7134,292,7145,1716,5395,7148,700,7150,5395,6827,6649,336,6482,7138,3584,3707,450,1535,6696,5100,320,2021,2571,7103,5742,1573,2611,2703,7180,7087,5844,7102,7085,6523,3841,6871,
1892,6828,1587,5619,3706,6528,5549,2643,1793,1929,402,4544,91,1600,470,1535,1623,2420,5819,3320,6633,288,4248,4165,4167,5753,6801,1638,3706,6668,6529,482,1829,6636,6791,5994,4208,6870,5500,6555,5290,5283,1677,504,4309,5287,6733,7193,7167,1694,5214,1697,5216,1746,6831,7214,1779,6526,504,6518,833,5638,6521,7189,6701,7112,6500,7250,6712,5622,7224,5051,7226,6797,5412,5351,3804,5353,7230,6998,493,4341,1885,4106,6780,703,5412,260,538,6793,5241,4399,6632,4503,5274,5241,4785,6544,4459,2942,6899,6176,5404,
7285,1584,6882,6780,7066,7061,6558,5342,5321,5412,6557,1372,6620,7227,4573,6563,1491,7282,5259,7279,4791,348,6570,6572,6610,6725,6845,6373,6796,6679,7296,2611,6606,7270,7320,6871,6726,3994,727,6552,5355,7321,7239,335,7313,5372,4677,618,98,3600,7266,7326,122,7309,4860,6625,670,6627,5241,6629,6631,3536,3580,3602,801,803,6836,6499,6648,5157,34,1600,1597,7360,854,3601,392,6505,6483,6468,7222,7199,5578,5004,1393,861,2027,258,268,6359,4265,5618,1813,652,3667,6736,1780,3681,6856,4103,7175,946,3794,4008,
781,97,666,7185,5610,335,7398,328,2829,7403,7191,328,3793,622,328,3492,119,2623,7110,1570,7105,2787,7179,7256,7099,7182,2134,7409,5989,4907,7409,7420,5117,7413,101,4305,643,7427,7258,7364,1586,6488,5218,6645,7223,2643,821,778,6208,7095,451,2521,287,3648,98,287,5106,1930,3794,666,1057,7316,6994,4244,4795,262,4798,4800,4929,5639,6542,6732,7232,6373,577,6125,7385,3819,1301,1217,44,6290,1716,44,4856,1893,44,686,121,4225,335,4008,72,5052,3733,3976,7476,894,5518,811,3760,7072,569,4650,7213,34,1849,5598,
7114,6739,6759,7362,7124,6486,296,7506,7391,6691,5601,697,383,6511,6513,1745,7373,7511,1566,110,1844,578,6886,6548,5634,5149,1670,7530,3089,5324,7225,6536,6567,4904,625,4906,3965,4909,4686,7288,3450,7008,451,6192,757,7166,7365,7523,6656,461,2070,7525,320,759,3386,6288,5087,863,3392,3394,3961,6745,4869,3836,4771,6314,4773,5559,2027,4877,2986,6153,3879,6338,3389,6157,3405,3465,6161,3467,7585,3469,3412,4194,117,4196,7552,6388,3314,663,4647,7211,1630,5817,2192,7599,6421,752,6260,3527,6272,3529,6473,7606,
6298,4464,5664,6778,6746,5697,5555,6192,4876,7595,116,2708,6516,6069,6752,6071,3291,2714,4295,6074,3296,2720,6078,2724,6080,2728,5075,3307,2734,3309,5091,7621,5869,4558,3232,4958,2543,3487,7100,372,7606,4668,354,6296,6401,6422,294,7653,7606,6262,6273,3563,5112,1504,5114,3007,1509,335,3665,308,7396,371,906,3842,7109,7098,7111,5743,7439,1894,7665,1506,7667,6589,5219,6669,5550,7139,6850,91,7146,6720,7339,5007,6462,5596,551,7507,7393,7115,7376,3634,3677,7699,1782,3682,1774,461,262,5748,5192,7221,6742,
7262,2401,267,500,666,4300,7472,5653,1747,73,3535,4649,6420,7333,3208,5586,6873,7079,6500,7712,7247,7366,670,6856,7559,5129,6500,7441,1701,5720,4286,2748,7252,3587,3865,7437,7650,292,6675,5729,1804,6707,7678,7182,5753,7188,7097,7756,7419,6574,7240,7365,5113,7683,1508,7685,7443,7199,957,5931,100,6331,6383,4910,6189,988,6440,4210,400,5890,4981,3528,4488,4713,5890,6172,6152,2988,4498,5697,6158,7586,6160,7589,6163,7591,7593,4198,6150,7652,6348,1592,6377,7558,6419,5820,5237,7210,7809,7212,7806,7774,6172,
5980,4316,2539,3484,7648,3237,7094,2134,4863,6461,3089,2036,7422,7779,6341,7782,446,7578,7792,5935,6156,3463,7584,4189,2847,7797,4192,7590,3414,6165,5715,7783,6377,7817,6067,7624,5936,7626,1929,6072,5064,1936,5066,6077,2722,6079,2726,6081,2730,7639,5079,7641,6089,3194,278,5832,6230,4460,7789,2612,3781,7612,6267,3862,7876,2703,5914,7805,3882,6377,4645,7597,6418,3638,7727,1964,5992,6821,7819,4822,7060,7849,7816,6059,6306,5997,6094,5350,5890,5952,6774,4060,4988,1345,7899,6098,7720,7073,6373,7773,6098,
6331,3571,874,6413,5870,2134,6037,6333,7788,6377,6001,7922,6268,7660,4208,6263,4028,7882,3165,7894,1199,7896,4062,4427,4379,7850,2612,7888,3316,7378,616,7503,7834,6296,7879,3183,1853,6287,7276,7625,91,6291,6088,6293,7917,5775,6100,3524,2740,3828,2075,3368,6578,2883,6853,6531,2489,4914,1209,7936,1853,1068,4982,7662,4578,2134,3323,4668,7825,4230,7078,6846,7978,5859,6009,5904,7346,4717,7944,2703,7785,7608,7787,7996,7774,2939,6405,7885,7651,7655,6038,4573,7561,3439,7448,3376,2703,3330,2963,6299,7935,
7997,2740,7925,7827,7927,8003,7993,6242,6767,5412,7984,8026,7349,5680,7991,6110,2462,5011,7906,7938,4617,1468,7910,4064,3239,5810,6145,1330,6147,4294,7977,8020,1906,2840,6929,5784,4956,6932,422,8051,5859,7902,8037,7887,7852,2325,5697,5062,3292,7858,2717,7860,7633,7862,7635,7864,7637,6082,7867,6086,7869,7962,5890,7884,7874,2942,8011,7644,5982,4295,5984,3485,5987,526,3644,2874,2876,2145,4999,6377,3781,7661,7609,8002,7918,7945,3071,7563,3836,7960,7567,7815,7913,3134,8006,7963,7775,7901,2495,2435,6446,
2973,5810,6215,7930,3216,8021,7606,7981,8102,5031,8034,5960,2257,8120,3569,689,7818,4375,1320,8090,7822,5988,7094,8086,5086,8108,7565,5089,8110,7886,7900,8015,8113,8084,3368,8115,6460,6472,4578,8011,7623,8065,7958,8067,7629,4192,7859,6076,8072,3299,8074,3302,7865,3306,2732,3308,2736,3310,5843,8156,8123,7904,8033,8059,2137,7932,5814,7934,4573,8115,8022,8158,8130,8184,6433,3924,1978,5766,6134,5768,6149,7912,7964,5035,7496,6127,7943,8003,8061,8006,7987,4614,2444,8188,7905,8063,7658,8006,7654,7729,8128,
8001,8193,8151,7967,4436,4655,7613,8019,8208,8118,6412,8182,6355,7183,8225,4710,2311,8214,5492,7984,6391,2232,8114,8131,7873,8205,4130,8131,8004,8012,5854,8121,1853,8100,7933,7982,6890,8117,6411,2060,8134,6143,7615,7570,7779,6192,5555,7620,8202,6099,5884,2111,8124,3889,3033,71,844,7501,7949,7892,8111,367,7776,5943,5893,6279,5895,8270,7791,6154,4859,4922,7839,941,7841,7587,7841,3001,7800,199,6166,7594,7871,8195,978,7656,8150,6098,6060,8198,6428,6135,4387,3645,2671,4539,8249,7965,3200,8259,8036,8244,
8216,540,8145,7779,8109,8178,1861,7569,5670,6312,6754,7573,6756,5556,2687,7937,629,8054,3229,8042,4370,8115,7980,7786,8040,8234,8156,7777,7837,6438,7780,5938,6441,2754,2046,2853,5735,292,7808,7989,7916,5890,8016,3555,1218,8131,7914,7731,5290,7924,7804,8154,8253,689,8290,7580,2883,7795,626,8297,3410,8299,7846,7592,8301,7802,8270,4885,8235,7979,1148,3198,7725,6894,7883,6055,8322,8224,5826,6140,8252,8207,8104,7998,8373,8247,2694,8320,2636,8262,8282,4709,3379,8187,8257,3244,8011,6417,7948,376,7950,8044,
8401,8204,8013,7875,8099,8407,8427,4055,8249,6283,8421,8348,7784,7611,4437,8018,4573,8030,8285,6277,3990,5787,3992,8288,3456,6445,8274,3541,8406,7952,8439,8228,8189,8364,8393,2398,8395,8457,8194,4977,3199,8024,8405,2740,8306,8058,7774,8469,8115,6172,4485,4615,8239,8436,7928,6276,4293,4966,8446,4968,8344,3220,8023,7983,6059,8350,6437,1606,4703,2309,8355,4706,8270,8474,8486,8192,8396,8122,8272,7903,6112,8135,2011,8039,5679,7477,8056,7898,8413,8137,5041,3482,8140,3235,7649,7182,8180,6212,8210,8105,7596,
7947,7603,8357,8339,7908,4367,4845,7942,8303,5059,6451,7838,3837,7627,5063,7630,5065,8168,5068,8073,5071,7636,3304,7638,8175,7640,8177,7642,7504,699,2650,4355,354,1745,1858,116,673,1863,7003,3949,7714,7687,8206,6914,5299,5233,5234,7291,3368,431,5748,6559,6767,46,55,5412,6471,6565,8578,51,8581,2571,1108,7303,7314,6632,5538,7245,8560,8562,3865,7814,6650,359,7415,2623,7747,256,1884,7091,7423,7757,7765,1586,7767,5115,7770,6498,371,8211,890,8390,1210,3605,1409,3728,4959,1506,5154,8423,3369,4603,112,2829,
5918,3326,8155,276,2829,6041,8279,5680,8633,1371,1382,7926,7053,8628,112,4576,8098,7774,5307,544,5880,6416,7889,8435,963,7810,7601,6296,5011,8638,8157,6284,3244,769,3209,8359,823,7812,8362,7621,8658,8643,6266,3983,8638,8475,8213,8417,6204,1919,8096,7324,4630,8442,6425,2642,4010,5894,5789,8656,116,4185,8351,8492,7583,8295,6159,4191,6162,6164,8386,7848,637,8674,8226,8017,8456,4618,8683,3123,4327,6146,8199,6028,8201,7951,8220,8346,8509,5149,1624,5141,7891,8655,798,8264,8331,7779,7618,6785,6788,6926,
8671,8480,3441,8085,2768,7922,7645,4957,3474,8141,8093,7094,8473,2612,8648,5146,8374,550,915,544,7057,5870,8744,7883,8733,4060,8482,5863,8447,8688,8413,8630,4955,8758,2846,8484,8703,2471,4231,7916,8659,8031,7995,5031,8638,6016,8162,4855,7606,8472,8082,8046,7690,6136,914,5145,8645,8316,6377,8369,6999,6846,8768,4761,8717,1393,3036,5958,8064,5154,2483,7856,7628,6073,8542,4528,7861,8170,8546,8075,8548,8077,8550,7868,8552,7870,2531,1353,6852,2829,8246,8431,3368,2134,8820,1268,8443,8631,1218,8794,8649,
8218,8186,8476,8677,5999,8106,7957,7854,7959,8147,6292,8179,8776,6237,5154,2187,684,8643,8822,8403,8497,2612,8791,7273,8793,8643,8464,8461,8707,8745,8750,8747,8408,3830,8438,8227,7880,1379,8663,119,8340,5492,8871,8062,8400,7992,6132,6427,5482,8312,6029,5406,8643,6302,5552,8488,2703,8826,8851,7969,3726,6735,1778,6737,7737,5389,1786,7739,7704,7391,6738,1854,7518,6880,3667,84,77,724,7702,3715,8144,8107,8326,8842,7961,5843,8219,8691,8491,8293,91,8380,4190,7588,7844,7799,8385,7801,6168,4099,8651,8526,
7813,7600,8715,8345,8E3,8347,6414,8867,8705,8869,1453,2840,354,6644,7726,8723,6356,8800,3289,8539,8068,8541,8167,8807,8169,32,5070,1948,8547,32,3305,6083,6085,6087,8149,6581,8736,8233,7058,8139,7821,8518,7823,7650,8219,7968,8829,7803,8008,8641,4757,8011,7659,642,6779,7958,6192,106,945,280,102,3115,2656,3453,2930,8689,8675,2389,8836,7386,6500,8610,7684,461,968,5215,416,309,7461,316,265,333,8911,5478,2573,6907,3761,1545,7077,6780,51,46,7300,1076,401,328,258,260,7383,340,8027,6622,46,7532,5870,260,9019,
9031,101,9033,4237,5522,9037,5412,5253,1833,395,4604,7353,4346,50,9026,7305,277,367,9044,9035,6686,50,4111,7357,7733,7245,6507,315,5565,335,1923,98,7170,3767,421,7117,5120,8614,608,3915,1486,8608,7681,1896,9007,7198,5398,5463,8935,730,5467,734,7404,726,2892,4944,4598,7338,1981,1904,544,1970,78,7401,501,7793,7294,4339,7322,522,3119,760,100,87,499,110,5738,9040,8390,2912,4355,1138,3960,1632,1511,7672,1537,7096,7755,5741,7186,4101,4782,5106,1886,8606,7181,9083,376,7367,1602,9087,3715,5668,8989,5275,
7548,6806,8267,8998,5676,537,6715,7204,6718,489,6344,821,814,6908,7536,8587,7271,7332,4990,7846,4938,3414,282,338,1929,5800,8536,6095,9167,3582,8006,6790,2813,3968,6289,987,1210,6923,4901,1619,1609,367,1861,700,6877,700,5395,1229,4848,1968,8032,8234,1058,8378,6477,2311,9146,7288,5690,2771,6806,6753,2027,6755,6316,2632,3176,5695,1708,5437,6823,5702,1794,6806,2904,6815,6813,2914,6815,5705,9225,9218,6820,2924,6819,5711,5713,4370,7075,5122,6731,7238,7721,6721,495,4577,6724,7331,9110,9166,275,577,83,3794,
339,6677,8565,7663,383,65,519,281,294,79,99,5753,945,984,8559,1051,8561,275,8563,6937,5172,8567,4928,5631,6542,5067,7326,2037,6853,7236,7288,3809,6806,7451,32,97,111,2661,4449,6564,7340,4755,6680,7308,8774,6023,8455,6621,4453,6688,7326,455,8564,7063,4527,3811,4578,6840,644,648,8577,9054,9064,4757,5253,1513,1130,7546,6622,6689,7680,9140,8593,9267,8595,3885,8597,7168,3681,7373,4044,3280,428,7140,6743,3590,9322,296,6502,6654,5151,6656,9332,489,7226,6490,6482,3728,7174,9017,1595,1601,3586,2276,6695,4990,
7556,1111,6638,6596,3909,3722,8620,9348,3725,5184,9338,411,3604,3616,409,5164,574,119,6835,9351,715,3764,9305,6909,5233,7305,2429,9380,6542,6910,9027,1259,6913,6747,9184,5466,7958,9392,103,9187,1610,9289,7528,2083,9181,5437,9395,7549,619,9395,9397,9189,1603,279,4892,354,7972,1617,1615,1737,2429,9398,2046,9290,7312,5422,6539,7326,312,4597,4337,9036,9063,9321,5562,7365,6835,6661,6068,8613,7122,7513,6829,7196,7735,5642,116,7705,3689,7394,3653,9377,9337,9432,1586,9445,1852,5389,7395,383,6684,9340,984,
6655,6596,6658,6643,1712,7141,5605,7068,9022,553,5584,3697,9469,9354,4677,4492,9473,5591,9368,6501,6895,629,9461,3585,9463,6660,5720,3033,7739,8391,1987,2840,722,8910,8722,3320,3641,9093,5733,731,9492,723,8527,9497,3643,8743,8038,629,9493,9503,9092,9505,7650,8754,8338,110,9509,9090,8091,5468,6524,7741,7745,985,9347,3681,7369,5175,8566,7223,5538,9353,9527,461,4103,5387,8897,7708,9449,7740,9479,9536,112,7738,3624,6965,7137,7139,9489,6956,6760,7160,6879,5896,5899,1111,7692,6150,6116,1037,9557,4824,633,
1835,9552,7152,8906,1196,7155,3733,472,9564,6759,9194,1659,9174,616,9561,6281,613,5154,9578,288,4871,9572,1720,9553,9139,390,7169,9548,6490,3725,7206,117,9350,5725,7081,5752,7429,9137,284,7105,7387,5620,7686,7444,8720,6051,2087,7503,6463,1750,9074,6637,7508,1854,9127,320,7406,1515,7401,6706,9131,9094,34,7128,9601,9625,7130,3698,7418,7186,4100,945,5168,5207,7762,7186,7178,9637,9624,9499,8951,4101,115,262,7750,7425,2612,9648,5770,7760,9130,7086,6370,7764,7405,7433,7435,9363,9654,7190,6709,9479,6835,
9143,5121,6858,5638,7690,6464,9616,6466,9669,4594,5462,328,7492,904,7446,8205,2575,9179,3089,9089,9495,9393,732,9498,3644,6568,348,4793,4245,7465,4580,104,4801,293,2574,4341,293,5267,9428,4453,7471,7915,3851,994,6479,569,6481,3681,3856,4877,7499,4795,8527,6402,9576,5492,4523,554,4882,4306,4945,9238,6844,9099,4445,9290,352,4449,770,853,7402,7330,7231,9708,6861,7510,9556,9565,5652,5817,4851,9439,6780,6611,8370,812,6490,3602,9489,9684,4630,1833,9742,5650,9744,6762,9720,7853,8418,453,4246,1716,4867,7890,
6052,7233,4858,7581,5870,437,803,7690,3613,341,802,854,7553,1586,9141,370,1702,6862,617,9598,421,7759,829,7430,7764,7664,9085,7769,7261,8567,9145,7616,8990,8729,8268,8999,7490,9498,2276,4650,9504,7186,9274,625,5696,7958,9222,6804,5701,9224,2919,6974,6817,6814,9229,5711,5709,9232,5712,6826,9709,2166,8989,8840,9209,109,9211,5692,9213,1632,65,7527,577,2206,9761,1722,9539,7716,277,551,9198,5149,612,3584,9385,4630,2906,1696,9614,5437,314,1678,6806,3975,727,3116,727,2491,5146,5153,1493,9402,6914,6919,959,
6918,9418,6920,1321,9415,9396,1321,6924,9409,4990,496,5152,8948,4494,6867,2677,79,4595,7121,7470,9239,9740,9579,3584,9887,8847,1135,9236,9023,9108,4257,9165,7080,5195,9378,5132,9628,9643,7095,7676,9638,9625,292,9849,116,7108,9651,3677,9557,7405,4355,7118,9668,6667,9450,4900,7754,1096,5128,7504,84,6603,2016,9481,3597,6656,9068,121,9485,6644,9437,892,9937,1043,7155,3648,5339,743,9060,1393,6587,4355,72,7068,9955,9937,5006,7730,5350,551,8718,7449,6190,5674,5558,1737,858,354,9865,2656,629,694,9867,1335,
9950,770,9952,99,9060,4596,9098,4855,9937,4491,5682,9966,1691,6500,9459,9482,9342,9462,3467,9464,826,5E3,9489,938,8490,8292,6339,8353,6386,8495,6293,10003,8828,8764,5946,8483,5948,1136,5878,8366,1184,4369,4147,4621,8426,8852,1179,4515,8009,4618,1230,4140,8451,4724,3922,8709,1048,8880,1053,8882,8201,9796,7666,9798,5375,8908,76,2E3,9489,4928,2673,8752,3212,3177,291,4668,10049,3061,114,3063,2506,4630,10056,2569,10027,8984,3244,10062,2893,291,2675,6868,8839,8537,2681,9286,108,6903,2686,498,116,109,9609,
8949,9328,10067,3178,2003,10059,9774,2187,7587,102,906,9963,8922,10067,7455,2628,4930,1437,9890,625,2891,2673,4867,10088,9478,9451,9084,10042,9486,288,1849,6694,9673,9929,9272,7444,6847,9670,7204,9672,7700,1774,6467,3876,870,9703,4307,262,4726,6997,9165,4503,9176,1874,9081,3292,1393,9692,7462,4794,4796,7466,9698,7468,9701,5290,3847,329,2571,9855,9905,32,4530,4578,1862,9711,616,9713,7706,9715,1723,9726,2393,9893,5052,3995,10132,9246,5044,9191,1111,6878,9566,9195,1575,9271,10153,9388,3389,9704,262,
3583,4505,4993,9705,1680,9707,9751,9153,10158,1847,1470,9156,7693,4388,700,10070,9891,9893,9559,10190,9247,2027,9177,8748,1553,9413,9873,9877,9875,5288,1607,10211,6921,9185,6925,2046,9788,913,9582,34,8582,9292,5348,5531,9717,8636,296,8625,9723,2588,9097,10187,1664,10189,8792,6373,368,6337,3445,9781,9528,9749,7337,9240,10134,9248,4104,9251,477,10178,4757,5628,7265,9685,9678,7493,9681,7448,2575,10128,9727,9895,9729,10247,6356,3842,262,10152,4171,10155,5256,9242,8390,9903,10116,7239,9908,6697,365,7433,
7400,9737,7761,9642,3644,5051,354,7090,9136,10286,9655,9913,9627,10293,9663,7094,9630,9651,6422,9645,9636,10301,7088,279,10305,7445,9134,6705,10308,9640,10308,3748,9912,3644,9634,9646,7417,7677,9138,8449,10308,9792,107,9794,7192,9658,4008,9660,2221,9632,9521,9665,10115,1073,9925,5119,7119,672,9023,678,7126,9450,1608,5133,9435,1744,7245,5193,9529,7199,10224,5490,6540,7287,6580,4786,5301,8573,1123,7234,5285,9728,7272,4949,6373,9756,10153,9038,6268,9937,5534,6794,5579,9937,6766,9320,7326,9956,116,5529,
8028,8591,6500,7242,4473,7244,9011,3755,1873,9937,7555,9997,6642,5157,10117,7199,10381,7535,6473,9961,7695,3089,5585,558,5320,6580,7130,279,5285,6941,9151,5714,9971,575,9973,6787,906,5107,9978,5817,10373,9960,442,6765,10425,6588,6893,8678,10426,116,4496,10428,4355,9989,6615,7663,9066,9011,7373,9944,5188,7366,339,984,1405,9266,727,9326,8564,9489,7311,8158,6566,4757,115,663,313,6837,7283,9027,8592,9011,8594,9269,8596,8936,288,9542,9447,3774,5603,7176,256,10313,10316,7824,9650,10478,7650,10325,10327,
7411,9604,7197,9606,7199,7474,8685,7478,980,7480,3390,7482,7484,679,7486,110,7488,9677,5737,10259,7495,10261,7498,496,7500,9719,9125,9193,6879,5140,9609,9946,3635,9808,9610,7727,9811,9625,893,9809,8281,9100,5339,6657,670,9517,9687,9091,5986,9520,9913,1490,643,10530,10524,7810,10521,9913,9853,6596,10209,4564,708,10351,2590,498,8530,3244,10369,6201,1708,744,5840,50,54,4111,104,10558,52,937,1006,2989,8505,9588,9440,7388,7743,303,7245,9331,101,9333,10256,10398,5398,9918,455,9281,8590,4578,577,846,551,
575,10225,5498,9245,9730,3915,3764,10443,9892,85,328,2135,9734,9724,4676,9244,9739,10203,2105,5131,279,10443,9022,10278,9315,9998,323,8680,1393,7458,6659,10281,8881,2128,10394,9484,10613,3823,10280,10475,1380,7089,9135,9623,10294,3644,3739,10060,5986,9916,9913,10315,10297,7257,7751,873,10581,9921,10481,5617,9522,9441,7442,9077,10340,833,10342,5124,9932,1259,9934,5134,9988,6482,10442,10624,9465,9336,9540,10108,376,9936,10432,9994,9940,10395,10618,10444,4288,7746,9790,7748,3885,10312,997,6741,9662,
10641,7758,9600,10640,5732,9603,9005,7682,8611,9799,7444,2170,9501,9494,10539,9496,9511,7186,8115,3505,10538,10519,10540,10701,9625,2620,9833,8537,9835,9837,6757,8404,8283,6400,10028,8183,8877,8507,9508,9502,9518,8263,5814,10711,8352,8728,9734,2659,9152,7893,10723,10698,10706,10700,10533,9690,7094,7971,3836,7973,6166,4924,103,10102,4211,2572,8277,622,10229,8654,9328,8095,3405,8681,8888,8468,10719,8234,10497,402,99,121,7545,105,10285,9771,8363,6377,8781,6377,9124,5393,9532,10243,9489,10277,8653,5289,
812,6500,9533,383,10671,9483,6640,10663,9618,6517,9129,10636,10287,7438,10667,5593,10649,300,9667,434,9773,4471,6936,7004,7958,7010,6976,7012,110,7017,6986,10810,6968,7026,7022,6965,10815,10818,7045,6787,7030,7039,7030,10813,6978,7036,7042,6987,7035,6951,7041,10822,10830,7018,4370,5585,9985,8860,5492,104,7068,10839,5589,9990,10844,7696,1531,9365,397,2221,10516,570,5792,9904,4730,3895,4830,5763,4019,4093,3349,10859,4160,4734,4839,3489,2843,10184,4992,3995,4276,10094,8510,4829,4095,4091,10866,3502,
4732,10878,4833,7489,1981,8863,75,101,121,800,7778,7005,6891,9413,6806,10893,5692,5526,1604,8701,10197,3770,3772,9448,1409,10873,10903,3774,4114,4165,4606,2588,4768,432,10072,4573,4148,90,495,109,9647,8444,4279,10864,4217,4838,10880,10924,4738,3355,10749,2843,6658,6200,6930,10876,9523,10861,3900,10863,10877,10811,4097,10930,4750,9013,405,7738,9738,10366,7497,5290,4148,886,10202,4746,4152,10928,4837,4015,4835,10865,10883,7047,9959,6226,5792,9883,5861,4090,10942,10676,4834,10940,10937,10943,4162,6866,
6876,10173,7163,703,5425,3596,10234,8617,7298,4578,4148,3892,9911,8481,10858,10941,10938,4219,10974,6196,10995,4283,461,6840,3910,10186,4593,3803,4357,4253,629,9841,10747,6802,1664,1960,9048,670,405,9661,8757,1470,3708,11017,8759,11021,3725,9190,5103,9216,3836,7264,6838,1930,4991,4602,5055,1623,10768,9615,3681,9942,4413,831,1160,10147,6373,7381,109,10985,8770,7943,7674,100,11048,10265,10950,10782,1686,8593,9366,1599,11058,10851,5716,10404,4630,6875,817,3581,11040,5026,8390,716,4778,10911,1430,6187,
10914,10567,335,9724,655,108,72,70,79,86,9871,9390,5697,9874,10216,9416,9931,9884,4600,9361,9359,10661,7556,5817,9697,5295,496,9815,8840,5335,103,95,4457,997,7580,287,11106,95,10893,1860,550,4304,10164,10840,10367,5237,11037,11068,10946,11070,11049,383,786,1233,647,11053,10245,10591,10267,768,268,11081,86,11084,11086,5667,5265,11124,4241,6857,4467,4410,8390,621,623,7542,4907,10767,7050,7288,431,1635,1006,9405,91,10746,625,4926,1904,10049,4802,2428,10898,354,287,11157,7135,4370,11129,6801,10887,121,
848,5739,10531,3035,121,275,4928,674,4762,6607,3948,11132,9730,4148,4081,11011,71,11183,1051,429,516,10013,10957,10994,10976,10996,10970,10999,10867,894,10855,315,10934,8055,10936,10998,11203,4735,10997,10860,11215,11207,10854,5929,6466,10968,10922,4011,10881,10971,10879,4284,11202,10972,10884,6581,120,97,11118,9704,11149,11125,11147,4414,11127,9389,279,9161,5927,9159,323,11246,10988,11209,121,8600,10969,11227,11206,10927,11231,11229,10931,4005,348,7408,11225,11205,11219,11258,10975,11232,4079,3011,
10146,378,11255,10958,10882,10926,11230,11269,11260,10909,4250,11074,984,11190,11135,9620,11102,10389,9182,7450,3946,11108,9262,11110,3596,11112,11293,11115,4224,11261,4149,3604,6225,10992,11201,11280,10963,10961,10925,4739,11208,4080,3647,11011,5376,2033,4010,11266,11270,11310,10929,10977,10868,3834,3467,6022,11212,10993,11308,11278,11322,10959,10944,11325,110,4726,10873,11275,11259,11309,11217,10962,11278,498,7391,115,11190,7237,10266,9897,7101,829,11154,7064,7288,757,11160,1210,95,11093,10900,
11221,2843,10918,2027,10304,11265,11256,11267,11279,11214,11270,3475,4272,2572,6658,11264,11306,4215,11276,11228,11342,11320,11281,11336,11193,625,3854,6801,11340,11331,10960,11343,11311,11335,11313,10932,3467,11254,11369,11382,11257,11372,11218,11374,678,3681,4478,6711,4824,3033,11388,4251,4164,11283,4358,11392,11373,11229,11333,11277,11312,3716,11028,7779,436,9974,6944,453,373,870,6840,873,1745,76,9113,367,925,5119,2571,11437,538,9319,5515,10246,11352,768,100,106,4250,294,3581,6859,11348,11119,
8390,103,11196,11185,277,11286,11448,104,11143,6482,11069,11241,11042,887,11044,9367,9789,9909,320,5102,119,5104,10630,10308,10617,9464,10291,10631,10298,7650,10289,10310,8605,10688,8607,9925,1597,6996,10646,3793,9353,541,7131,10794,10632,7094,4008,10599,643,10601,629,10645,11491,10322,7886,11051,9785,11499,9631,10321,9132,6656,6859,11484,10308,11051,729,5033,10680,11496,7490,10598,262,11506,2588,4892,10307,11496,10486,1814,10338,9927,1595,3467,1912,672,291,3584,643,837,91,3511,335,645,9075,288,5717,
302,11549,517,7171,296,6614,1155,11555,2983,11550,11558,8044,410,11556,595,11565,9626,9959,125,93,7412,3944,3493,7124,11046,11368,9450,10617,4819,1255,101,10326,833,11544,5118,278,11547,11568,11551,616,7268,3126,11573,10343,10656,7432,666,11379,10666,10458,7719,11273,339,7512,9883,7524,9438,10654,1040,10433,7139,10125,5573,11588,4355,11590,284,11548,11563,11557,11552,5413,3876,301,11574,1312,11583,10657,3037,1065,11602,1255,1755,6509,11587,7139,11546,11621,11592,11570,11554,287,11643,11625,11560,
11567,11623,11569,11625,5588,11562,3059,11564,11625,10842,2997,11628,11636,9614,4881,984,6859,11543,11640,11620,271,11622,11656,11624,11594,6509,11597,10606,5051,11534,11581,11327,11305,10666,6588,9699,4149,11638,7177,4355,821,7469,372,115,58,123,120,271,1320,121,11697,528,125,47,11695,58,1954,11699,48,125,1815,11618,11641,11670,11647,616,11645,2507,11657,11594,5590,11676,4553,3510,11128,10436,9348,11687,10476,11689,644,837,11692,11694,5585,11700,5042,4492,11735,520,11702,123,11734,1954,11560,11705,
11709,3619,11545,11669,32,11671,2498,11718,376,2878,11655,11752,11673,376,1775,11629,2949,282,345,4782,9358,9930,348,11401,9450,11046,10921,285,9840,10243,9194,9847,4861,720,10705,10083,9688,721,10740,7650,9686,10699,11782,10534,3644,739,741,7527,10556,6747,11358,9221,6808,627,760,870,11315,10534,11787,10532,9689,9512,7182,1506,51,11803,10737,11788,11784,7182,10149,9636,11250,10375,4573,786,10635,10456,2524,11536,7389,411,10336,11616,6497,9466,5623,10065,8441,9939,10430,8861,5471,9955,3761,5582,10753,
5870,7293,5664,10965,6672,9990,1393,118,11846,8682,4146,6462,10648,10570,10444,8621,10474,1883,9135,10178,10333,7410,7758,11480,11535,11855,9605,7771,5398,2299,10757,2211,9778,9370,3711,355,1740,9525,7706,10662,10396,9945,11831,10666,9439,9480,5434,10788,6657,10790,3624,11016,10336,10791,11425,7399,455,10769,11501,11486,9649,2119,7830,10684,7424,8303,10324,10687,11906,7104,9657,7432,10330,9734,9922,6710,10123,9617,10801,561,7538,11078,3067,9872,6542,9750,10238,550,11077,9851,5870,7491,10504,7447,
9120,10220,9560,9845,1838,798,11851,4578,454,361,9474,10603,11055,895,1632,1745,9841,9758,5573,11885,5493,2877,1393,686,11954,984,5839,11795,8178,11160,3109,10075,1695,1604,870,11593,9719,4503,11248,294,11250,8985,431,578,9859,6914,9861,7770,8840,9864,10419,539,9158,1558,294,11963,5697,759,114,2684,966,631,633,11996,4902,1603,10545,7005,9874,11160,11090,9879,4898,11092,9883,12001,4750,10803,2400,7071,9164,10170,1981,2571,7076,10278,11948,9907,3747,10678,256,11488,11521,9912,7431,9914,10484,7425,10643,
551,11509,11911,7763,7192,11825,10800,5117,9926,9078,10653,10116,11598,606,9933,11633,10606,689,9932,3580,11098,6596,11666,9539,3677,10787,9996,3585,11666,383,5547,9847,9200,9107,4757,9303,10253,8537,10808,6948,7031,7015,10834,10814,7025,10820,10942,10816,12080,7021,10821,7011,10827,12087,9822,12078,10827,7033,7038,10942,7043,12090,10832,7044,10828,9235,9842,4684,6436,10005,7582,619,11967,578,11969,354,6991,10955,8856,10783,1574,12026,10628,11679,12038,9602,11913,6581,9548,12030,12122,292,12053,7434,
10793,11863,12031,10639,12120,9656,10328,11762,12128,11533,9641,10294,10690,9479,7742,7770,10651,1883,4510,6051,1065,7129,9894,10666,12127,11590,12049,335,6588,12058,11688,116,11690,11731,5374,6693,10981,48,9349,3712,9847,3717,9474,913,7149,10982,9357,11096,1409,12061,7524,1553,11245,4998,4539,11059,9364,9714,9366,10568,336,11876,3729,9372,7390,8895,5377,9537,9617,12170,8315,1409,10471,5389,5381,8303,9942,8390,11934,9680,10505,12017,10592,2762,11938,569,12202,7509,1886,8303,5381,1111,12216,1854,12204,
731,12214,616,12222,3672,7510,2077,1012,12211,11135,10263,9098,11350,11949,6556,1974,12226,5386,8902,12197,12229,12218,8818,998,12220,12201,12243,9543,12203,3720,11079,1080,7690,12228,315,4103,9783,324,8903,3959,1873,859,684,847,11894,11919,9904,10516,3677,3583,3709,11895,10392,10670,9939,11890,10443,9489,290,8940,9967,452,10414,6787,10410,10418,1934,9976,480,4877,9988,10987,9987,10432,9958,11660,2400,10381,9962,10107,11887,12179,6656,12281,11880,3689,9489,7474,11443,3596,9299,1680,5480,1683,10160,
3689,3708,12313,1430,870,6578,1173,111,11444,1845,4527,12317,5288,12319,1758,11436,12327,3596,1209,1554,369,10082,11464,7068,77,10635,8531,932,8057,11649,9296,4573,11659,7069,2400,11033,10186,9594,767,12357,738,10243,9778,6482,9527,1861,11943,8985,7689,7204,9547,3584,870,259,11451,1207,3581,7690,65,11450,11452,7392,7706,10964,2997,2267,10139,11923,1912,5567,495,9061,4755,8579,5906,9766,1786,9769,10781,6874,10058,450,12358,12401,383,8297,2685,12369,10336,12261,9140,9353,698,700,9376,10352,5398,10119,
4594,12362,12270,315,11829,11301,5098,11119,10130,82,10169,9730,555,10249,10136,9170,10138,5264,9013,9694,7464,4797,9697,11685,11472,4824,9196,10178,11819,5999,3842,9636,10271,10462,10180,6581,10269,3877,12014,9386,7052,12070,12425,10166,10586,966,12428,11135,11066,10244,2087,10174,9745,3700,11848,2813,6800,11104,8537,9818,9223,3979,9228,2916,9823,12480,6824,9826,6821,5710,9829,5181,6167,10196,4342,12366,3244,12235,2159,4608,4601,10186,12464,11448,9133,7690,10195,6605,6892,6887,5520,9471,10874,5149,
12466,10199,4169,10201,11842,2575,12430,10205,10055,11926,12004,10211,12006,10215,12008,6922,12010,4901,6758,10292,6863,11940,9567,10223,5624,7304,10380,10228,11973,2460,10600,10233,11457,10365,10133,288,10240,4607,10242,7361,10949,12546,7200,10249,9250,6389,9253,12386,7264,7539,4757,12208,847,10260,51,8390,12495,12500,10605,6933,12493,11834,1904,7070,10275,11243,12019,6729,10611,9740,10626,7397,10283,11899,11485,10685,10208,11489,12531,11901,12586,798,1794,11527,726,1802,10308,10318,11580,12134,
9913,11678,12140,11902,4990,6703,11866,11510,9639,2178,11905,12590,11907,3747,12130,11517,9625,10318,11772,12600,3644,7426,12594,7187,9793,12125,12136,11897,328,10331,11917,10335,12420,10337,12043,10339,9928,3222,12048,12151,10658,3731,774,7150,9489,12466,3015,12174,7151,1514,2682,10194,12166,7165,9190,774,9949,817,12647,12653,6879,12651,2128,12648,12654,11473,11887,10114,11409,5393,11016,12185,10578,3715,7474,12358,12254,11398,6058,9181,4906,12327,107,511,7754,11019,11307,11420,11384,11370,11407,
9658,11883,5377,11426,5697,2840,1628,5747,9878,612,4597,95,11106,2905,292,3843,11113,5052,11114,9939,457,121,4395,2922,1006,104,3846,281,1929,3844,102,95,11477,11271,12679,7089,5147,1163,906,829,12684,5981,4088,10923,11341,11332,11395,11323,4289,11412,2572,11366,2449,12611,10857,12687,11406,11421,12738,11334,11324,12678,110,12743,12619,12686,11381,12736,11394,11385,10963,3851,4728,10907,12172,1037,10906,114,9456,12581,11540,12693,12029,12608,10334,10797,10569,11869,12146,371,11579,11905,383,11771,
2589,12050,7124,10896,9900,12729,12682,12732,12788,6653,4782,12730,12683,311,12049,11951,12401,11859,8614,12610,12603,12591,8424,689,11909,9653,12612,11912,12040,7733,7173,3712,11921,11832,8487,10254,11923,4527,7284,10759,5826,8756,4662,8506,114,8891,8981,8932,8525,7598,10725,12247,1012,8763,4238,2942,1840,10035,10207,8449,8469,2158,12831,8734,6361,2822,6348,5134,68,5135,282,5539,5652,9847,11051,1017,624,729,12315,10236,9896,9751,455,9524,3747,8750,2172,9937,4527,7356,5031,291,328,2267,74,111,98,
12864,319,8585,7326,108,488,3583,555,414,431,9053,4453,3305,4578,1547,575,12432,7130,9172,12015,12888,6676,414,7055,12893,1680,6085,7540,7416,11513,7055,12880,12882,12874,11015,120,5325,12284,9992,9479,12857,9762,12194,1770,11895,12803,421,12618,10320,10637,10317,12327,9635,12611,11863,9664,12777,9329,7706,7738,12818,3693,1711,12236,7336,11134,11448,2134,12206,12576,7095,10182,11337,12427,12552,12018,3716,670,12883,11621,5481,10038,10957,9443,9453,1783,668,670,287,12967,7707,12223,12970,32,7515,12195,
6691,3708,11233,1965,12961,11670,12963,6480,10858,12966,7516,10336,1786,12971,12989,12633,12991,12976,1750,12972,6856,1786,11233,12495,4247,11416,709,11284,11155,4346,10237,12114,2066,10575,6984,5732,11133,10604,11929,12424,11238,12545,12958,608,299,5154,9070,12808,278,12066,1409,13025,12453,260,10270,12456,6780,10273,12494,12460,4892,12462,10235,319,13009,11121,1964,12542,9725,13019,11054,12553,13002,12955,11440,104,11390,4042,8390,2467,12983,11750,12985,9712,12987,5597,12993,12941,8898,7482,32,
12998,13067,6759,287,12977,12926,12994,1716,11233,12563,7494,11936,12952,3450,1853,12951,8668,13018,10129,12497,10185,10168,12957,9730,11816,10151,13034,10153,13036,12572,2740,3708,13059,12331,10620,11381,12988,12978,10336,3708,12992,13107,12633,13109,12996,1777,13075,13066,1774,12980,12372,12256,12330,13061,10159,13063,7698,13065,9446,9455,1080,13110,13116,13128,1774,4103,13073,12997,13127,9454,13134,1080,4225,1632,12306,6596,9344,9334,9489,10580,9850,2400,10585,5053,9034,12398,4341,10593,1554,10595,
9516,11529,13046,8921,13044,11677,10594,10663,10610,10781,2187,11482,10614,11873,13151,10663,7690,13144,10623,12693,5561,8602,12032,12623,13149,9920,12615,12932,10796,11887,12144,7116,12044,10652,1641,11612,7125,12054,7697,9444,13138,12968,5380,12200,12673,7363,12939,13106,13132,13139,8904,6740,7519,335,9266,4523,11896,9620,6658,11481,7433,11769,12620,7094,10483,12623,11150,4905,11910,12812,11511,12628,101,11602,13229,5210,12143,6830,7442,10853,1170,3064,11836,5492,13240,431,6897,4573,13244,12754,
12386,6337,6889,3244,12548,2588,13242,9199,12104,110,13246,4113,5134,2797,8277,512,11896,8604,12589,12937,13188,7194,9006,9798,12943,9490,2689,8635,2211,3313,7622,10551,8352,8164,8805,8957,9277,4530,8961,5072,3811,8965,8078,8968,8328,2319,13277,3575,2300,8879,8310,13104,6148,6430,12829,3285,2191,8983,12820,3244,3328,3047,8127,8796,7966,3570,6404,2175,8440,8861,3322,8242,3554,3573,8706,9722,2954,2049,8006,3257,5909,2758,4551,8240,3206,13311,8657,13328,2408,3526,12846,2453,7920,10019,12231,3363,8209,
12844,13026,2741,5868,10032,3224,109,8855,13164,13348,13298,8684,4444,8686,8287,8761,13356,2980,7921,8972,5870,13310,13306,7729,8469,1965,8777,9901,2349,2448,3526,8221,12920,8125,13315,2092,2579,3191,4264,8234,3548,6363,6010,7325,4657,2532,13335,13370,10761,5432,3160,8398,13347,8626,2207,6449,11328,4618,2577,5971,11924,3245,3122,6434,8205,13360,5947,6280,3082,3558,2976,13337,3189,13382,112,13331,13318,13325,2121,8773,13390,4757,2577,2201,8006,3263,3155,6928,13281,4860,10053,114,8469,3201,3543,7988,
10770,3060,10063,114,10051,2285,2801,8886,2292,13321,13353,13351,3429,13357,12843,4809,6384,5840,7781,5816,1312,8619,9355,12191,2592,2469,8873,8234,13432,3432,8415,8835,8129,13309,1996,8752,8738,8057,2577,2154,8412,3284,13326,6120,13454,2525,13450,13297,3531,3155,5853,8892,3512,7902,13343,12837,13345,10024,13494,2668,13393,9001,2333,9003,8234,3257,3526,8394,7954,2810,8318,10061,3145,6379,13395,13367,2756,2455,13497,13415,2070,12159,7617,2887,7572,9970,9835,3419,3396,3526,8101,8222,10066,2408,13340,
13419,5803,2455,4668,13405,276,13541,1996,12344,5254,7895,2640,1996,6310,8265,8066,5688,9206,9838,112,8337,13381,13539,8261,13487,973,13437,10105,3181,12345,13476,3431,2510,13442,9730,13329,13426,7299,6562,2516,6425,13537,2364,13279,8087,4956,8517,5986,8519,8303,2394,2803,13439,13334,13369,13504,4487,13379,1379,5606,3336,2893,3033,12442,3153,3364,3561,8944,2583,3202,13513,13391,13376,2797,13371,2604,3781,7986,13591,2706,12851,13399,10710,9802,9834,13554,6749,10715,13344,3552,7920,13604,2211,13469,
8973,8532,4989,13602,8402,13501,3312,2420,6187,13621,8537,9150,9969,9806,13415,13607,2109,13385,5149,13368,648,8788,4564,13437,12513,11291,619,10074,2683,2685,13558,13512,13500,12832,8449,13456,13410,4383,8711,8311,8200,13303,13587,2821,294,8161,8801,987,13283,8069,6075,8958,8544,8809,8962,8811,8964,8549,5077,8176,8843,13662,2689,5811,13258,6385,4704,10009,5843,2577,2415,13323,13605,8375,2689,13612,3477,8838,13657,8841,2775,8148,13294,3564,13441,5029,11833,13319,3557,13489,3530,13569,2600,13517,2343,
13491,2163,13447,13375,2598,13716,6207,10025,13363,3214,13649,5870,3257,13296,4564,13392,3070,8217,13399,10953,2892,13233,12746,12758,11393,10862,12761,11345,13626,3518,13354,10951,6373,2861,13358,1242,10037,12986,13672,13362,13408,8250,13483,372,8679,13173,5848,8725,9774,6784,10731,8997,13644,10733,13563,2673,13544,3225,3265,13548,13722,3251,2510,12474,12695,9816,11798,12477,9218,9820,5704,12482,9821,6601,9827,9825,12488,13780,13484,3241,8232,13407,13329,13398,8865,8574,13364,13422,13324,13386,3068,
13757,11056,3537,13648,13332,13816,3525,13732,3209,9298,3517,2975,2969,13384,13822,13396,13320,8231,8243,13399,13542,13421,13737,13726,3371,7835,8291,13775,3404,8695,7796,8697,8384,3472,12490,13530,3518,3565,13827,2400,8798,13314,2493,6233,13374,8452,3557,3329,2165,8238,13506,5149,13508,3056,13608,13428,13545,7055,13631,7923,13616,3226,13709,7564,13712,13692,5653,689,10092,11500,8840,10096,32,2565,9040,865,10101,12491,13471,13570,8237,2477,8477,13869,13742,3093,8365,13840,1135,1965,12475,8352,11967,
477,2469,3118,3114,3116,1625,13913,7488,3512,10004,13845,5937,10008,7833,13646,13825,8864,8823,3362,3396,13865,8212,9002,13475,4765,13515,13761,13411,5785,8687,3132,13871,13664,12849,13705,13349,7920,13615,13834,6219,2015,13769,2695,13342,13905,1379,13953,8503,13521,13408,13546,13876,10052,2673,4762,10106,13859,13276,3042,11211,13404,13874,7056,13786,13514,13538,3942,13831,13423,13823,3557,13509,8460,13511,2689,13647,6111,13984,2741,13931,3095,8868,13828,2954,13955,13863,2179,13339,13725,13906,13675,
8504,7940,8089,8975,13585,8977,11903,3557,13330,13995,2583,13590,13824,2469,13493,13665,13805,3558,5961,2796,2469,13785,7939,13490,3214,13703,13451,10031,13366,6003,3277,9260,290,9333,11071,13902,13879,13676,13435,8922,13680,8956,8070,8543,10154,7634,8810,8172,8076,7866,8814,8079,8816,6293,10085,3062,13566,10089,14E3,13708,12834,9770,11812,7604,13275,13946,8503,13783,3519,8942,13959,13809,6124,13769,14073,13420,10055,14037,13614,8523,14014,3532,4569,13474,13534,13935,2448,13581,8325,5697,8327,8553,
13498,13930,13393,8920,12105,12285,8924,7842,13849,4193,8929,8387,8931,14094,3518,13373,13993,13723,2804,13887,11448,13651,14038,8251,13637,13415,13640,13552,9803,13777,9805,13804,14066,13305,3093,14097,13921,8294,8697,8382,6161,13850,7847,13852,13304,14001,13582,8974,7647,8976,8142,7650,13746,2009,13221,12757,12735,13751,10939,13753,11424,13372,8846,14028,8260,2027,13629,14025,14070,6296,13378,9991,13380,3195,13926,14164,14021,14083,3197,13983,13549,2635,14160,8319,14082,3155,8980,13944,14138,13425,
13516,13718,5492,14076,13560,3554,14011,13945,13829,3560,13978,13815,13650,13727,13897,13991,8943,13988,3166,3572,3173,14190,13455,3273,13487,1632,3943,11038,7706,11896,13184,12037,13234,192,12776,11887,6695,13274,431,9400,9614,10615,2400,10543,6907,4942,1430,11977,8418,7139,9942,14230,3792,1632,9557,12859,1529,7690,7692,10514,12409,10798,11856,461,9936,98,661,8721,6517,12117,13267,12585,11907,12273,991,11945,10694,7199,2158,14247,14080,13399,2874,6663,13618,13811,13929,100,14247,12848,12840,8155,
6759,13740,10402,12882,7790,8430,13734,13770,14278,8524,8324,8914,14091,8916,8969,14265,14279,8454,13992,12301,1919,115,8377,12069,8537,14100,14133,7798,8699,8930,12491,290,1705,3042,4986,13609,998,14247,8660,13169,1135,14290,7877,8780,13999,2873,14295,8255,8416,13934,6254,14295,8514,4987,1342,13584,3486,14007,10423,14283,2703,14272,12828,14333,115,143,13524,10807,13526,276,10732,10415,13529,6150,14295,14313,3517,14312,12827,6930,7479,9286,10014,5056,12294,14334,8126,14163,13313,5978,14326,8933,12835,
11181,14338,8535,9764,13282,8954,8165,3294,13285,8808,8960,7863,14049,8812,14051,13690,8551,13883,13755,14351,13299,13670,13301,8049,14347,12882,12839,4087,14354,8765,13853,14271,8971,12733,14141,8740,14143,8742,8978,14348,8783,7204,8785,14261,1919,14297,8692,8922,14300,7843,8698,8300,11363,14265,13769,14265,7999,13867,14324,5492,14422,14071,14205,14338,8284,13937,7448,930,14395,14356,11233,14410,98,8191,8661,8678,12882,14440,14314,13730,1012,14398,14039,9721,10006,14042,8166,14044,13683,14046,8545,
13686,14379,13688,8813,14382,8815,14384,446,14295,3421,9960,14359,8254,13843,9201,7779,14415,14102,7845,13851,8302,3591,14307,13402,11682,4588,14295,7851,2535,8737,8088,7646,14402,14006,14144,7182,11872,11958,14294,12882,7956,13710,14092,8817,3661,9977,7204,14247,14249,2421,6759,14358,115,14431,3123,13579,14447,14411,8834,8676,14425,13507,1256,14262,13312,8939,14165,14320,14443,14280,14118,8626,14521,14292,14200,14496,14510,8489,14387,8047,8712,13302,13766,14265,13653,14277,14534,14335,8952,5687,
8803,8540,14453,13682,13286,14047,14458,5073,14050,8174,14462,14053,14464,14502,9615,6449,13970,14426,14484,14317,6296,13533,13595,2966,14311,1919,14498,13881,3077,14560,14282,800,13641,13909,8178,11171,5511,3976,626,3450,11879,335,14505,686,648,558,12589,10853,9608,10510,6500,5746,14258,11893,5494,327,1706,7734,9016,12415,3715,538,14602,2033,2591,9357,14610,3860,11841,4471,4395,1725,9254,10153,871,1730,11160,10808,1738,14243,9369,14591,14605,10571,377,392,12168,409,12170,12411,9359,9754,12176,3585,
4478,3602,12180,3727,12191,7174,9457,11923,10622,10789,12693,9489,5585,9477,12435,12560,5361,648,9470,14225,2997,14655,11847,555,14663,4630,12918,14659,12766,4573,122,14666,4578,11253,14669,12304,7194,14650,11891,14652,13198,13070,12217,9335,7262,3677,13207,3669,12990,13211,12534,9785,9489,13911,2803,11811,11781,11805,11783,11807,6721,8667,11804,12666,7194,13190,5164,274,1916,14630,10664,7715,5532,984,6352,5330,6543,5332,10361,6150,11169,14715,454,5371,9293,7326,11595,629,11188,6609,11927,11447,12569,
871,1018,65,552,450,9107,12023,13021,14618,9197,9873,14623,6941,454,5050,1730,12530,9551,9573,9587,474,5353,6352,5239,11823,4573,10363,1678,13020,9730,9234,10139,14756,14724,12536,10583,10254,5353,5225,862,5296,10357,4453,7289,102,5233,6545,2942,9813,11012,5633,5531,14722,14729,7329,14732,12948,14734,10553,13253,5353,5294,14774,5272,14717,5276,4688,10360,5288,6231,14787,110,6352,13656,12233,11448,11106,5337,4251,5339,278,4782,14776,4784,10359,5249,14273,10362,14767,413,14799,14819,14781,3368,14714,
629,14757,13974,10370,7279,5353,5269,14797,566,14825,5277,14779,8572,14803,2610,14829,14806,13868,9039,5353,7157,5341,2971,5343,10380,14805,10374,10384,4588,14805,10383,10379,14858,3832,5527,10378,7341,4757,1830,858,14865,5430,9424,4578,14868,575,14860,6686,9314,14794,5363,2677,8746,5309,5241,5311,9425,1018,14730,6869,13092,9240,12771,7253,6520,5199,12623,5360,7255,12775,5733,3677,10387,1696,14711,13191,12636,371,12158,105,6583,2083,6800,9079,12161,11730,8041,1342,2993,9857,9884,3580,6884,6691,12422,
2623,10853,11300,13249,3205,5434,13256,13396,11838,12301,11840,553,6476,10405,11064,6043,12571,5350,12296,11824,11868,5595,10849,12633,8900,14945,9442,11615,12927,9597,11475,10282,11898,9622,10308,10296,13222,11487,12596,12623,12598,12936,12616,9913,10477,14899,12933,9645,12756,13269,7751,10480,14970,13223,13228,12131,12122,9620,12630,11867,12632,13117,11920,10488,5398,11850,12300,4420,9675,3876,12419,14986,9674,11241,6859,10502,9679,12564,12210,12952,14927,14931,13877,14933,9685,10518,14698,9519,
11814,3164,12559,4792,811,9695,12439,4799,10145,12706,7469,13443,13087,10264,6780,13043,13758,498,14941,14426,12539,12836,6933,14040,13470,13162,11508,12544,13049,12958,14793,4573,11844,4028,14943,6095,14032,9733,11531,280,11900,14741,9730,9758,12589,10221,12533,14721,3832,9748,10153,11928,13010,8554,12166,11022,14949,14985,3689,15068,12642,11067,12672,11870,3715,4825,10856,10935,11330,12688,12737,14153,11397,3808,11240,121,14,10948,14790,13016,15065,11336,4006,11224,11380,14150,15082,12760,12690,
11386,2465,11975,3765,12183,6274,7544,10891,14621,11796,10213,9183,348,11361,9883,11363,10953,12152,14149,11226,11403,11371,11422,11383,13754,335,4144,11463,14734,4825,15095,11200,13750,15098,13752,15100,12762,12587,4894,12525,9407,9882,12529,12763,10979,10905,9191,10945,11145,11041,4481,12952,4008,1511,9614,1049,14784,9109,11191,3033,10990,12119,15119,15084,14152,15136,15125,12547,15087,3941,262,88,12956,13086,10171,10902,12769,10904,2276,12768,12770,12025,14955,10628,10290,12607,14961,11808,9353,
11495,14977,7650,12171,11515,12631,12939,13190,11538,12045,6530,12152,12150,9438,15131,11584,11586,1641,11711,11749,11751,3436,11753,11559,11675,11761,7716,12602,10347,335,15172,5722,8616,9076,13192,7082,12593,10345,14963,15207,11668,3976,11642,6733,15212,6781,9734,1559,11597,7387,15221,3427,13274,14811,14731,13015,12238,7074,12020,67,6782,14890,12580,12309,12334,670,12322,11830,10665,34,14445,1453,12675,3723,11930,11011,1393,10758,4757,5045,2676,10915,13017,12041,11857,6482,83,645,112,7130,14712,
8567,14728,9774,9360,12063,11675,12225,9759,12532,14753,10175,12189,14707,13213,7245,5395,10514,9489,11786,14064,15012,14701,14465,103,13102,13123,5945,2128,755,3794,740,10102,2846,15309,12881,1878,3008,14627,7195,14245,9787,15290,1514,15297,9847,553,15304,5861,755,957,11051,44,15310,15316,44,4795,259,673,44,12934,1130,115,103,111,15332,15315,764,3451,15333,15347,50,694,10811,629,260,13152,3348,15329,7752,9113,15345,15311,490,15336,100,15338,15340,945,15343,15361,15316,3852,15370,15350,15352,15339,
3405,15356,5462,15010,1037,9810,10708,9913,3648,10889,14912,12952,14765,2400,15043,8215,109,563,4795,453,367,342,10527,9124,14950,11826,34,15249,1878,729,12274,12414,13204,11608,7167,15407,12276,3667,68,82,6695,12859,345,11979,6636,11484,14234,4618,1670,9050,1997,15419,645,10577,10584,7055,76,15428,4510,11484,10847,7536,14221,15393,15427,5253,5629,11854,15070,1758,461,14683,12974,4577,12272,6500,15448,12245,1787,13212,10572,10465,9325,10467,9327,10806,10853,4240,13048,15245,12553,15464,2677,9115,
15316,6641,12445,12947,15091,13355,12953,4884,14763,11135,15468,625,15470,625,10597,2011,13162,10806,15054,14891,15401,14631,12681,6196,10453,6326,6252,14832,8223,6098,6351,6327,15498,8229,8467,8052,6347,13399,9514,15506,14806,15502,14024,14177,9515,14831,15513,9757,2840,8876,15500,15519,14081,9515,3163,7387,2854,461,14599,5748,9352,14906,715,2892,11530,111,11339,11639,11748,15231,11713,2087,13272,1898,11758,1657,7201,959,11721,871,2892,11542,15538,11589,15540,11750,11714,11754,11650,11672,11652,
11715,11661,10041,7768,15544,15076,1540,13655,13894,2883,13659,10076,13661,13444,10068,5013,4208,13966,7828,315,2037,2883,14295,496,8587,5842,7455,4208,10103,10057,5805,15049,3279,3734,15174,2465,15547,402,11530,3585,12543,15465,13572,13437,13729,6799,2673,15579,10061,13437,8469,13858,13773,10727,14580,8693,619,13643,6787,8269,5044,8330,14130,8538,6313,13555,13625,13781,10057,13965,14058,1393,10091,10093,4894,2892,10097,1909,10099,15269,10071,12491,555,1878,5265,293,7204,15543,8043,2643,1080,1430,
3629,743,10781,6290,110,12378,118,4510,11112,648,397,12012,1632,15649,7251,12117,9620,10284,14254,7757,1683,304,10330,3736,9558,10508,4795,15194,12623,14960,14216,11864,7106,12033,7412,4008,13233,14974,11055,15675,12629,15677,11100,15679,112,15190,15187,13045,11159,12623,9620,14148,15691,15674,9659,15695,474,7541,12796,12811,15706,5288,15693,7434,15709,8424,14966,13187,11351,569,15716,69,15718,14066,9648,15707,15676,10111,12624,15206,15187,15729,15694,15731,3915,2935,15691,15688,12629,11916,10646,
15735,15717,6660,15273,14259,5398,12842,1284,6364,14857,4855,10228,14109,6226,13452,13814,13704,15678,2071,4795,7878,13856,6334,13496,14429,446,15756,14308,5794,3089,11080,578,13962,1135,15751,1270,1786,14697,15381,10520,15383,8094,10228,14327,7909,14329,14005,14331,14492,15696,15763,112,14369,8778,10712,14372,13284,14454,14552,14457,13289,8173,8966,13691,8917,12324,431,15606,6447,10228,14233,15105,5927,4874,13260,6329,4874,15006,6618,8769,15596,11136,12161,578,15812,6222,13316,7653,15787,14365,14063,
15011,9562,5943,11992,7958,7832,13462,7497,14029,13407,494,6124,14072,7001,9015,5171,2087,13030,340,15697,14574,8146,13882,15809,2066,14450,13632,5042,8512,12541,15537,15825,7306,544,13510,15758,13835,14159,14194,15761,5968,14074,13562,15843,13950,13317,14195,5870,9835,14003,4377,7911,15770,15697,14276,4936,6449,5977,4630,15846,13420,15760,1493,8153,14268,1281,10012,15119,13940,15762,7500,14423,13899,14847,6268,10228,14120,8726,13525,5674,7619,13645,1684,8503,13769,15895,14188,2028,15769,752,15033,
14367,6030,15872,13453,14030,14315,10228,8672,8316,1819,786,10290,13228,11135,431,9263,13032,14806,15581,12745,11448,290,14481,6238,5978,10228,14180,14821,7301,8795,14523,9955,10228,14322,14085,14570,15813,15697,8938,14424,14086,7350,13717,13308,10916,4622,15882,2187,15921,2352,6229,15900,9763,15798,8055,8342,9190,15270,3578,2575,15854,15795,14336,5778,6210,8434,15958,15964,8704,13959,15975,5011,15772,9555,15951,11842,13479,15864,34,15391,14916,15863,8533,15888,15795,14393,14353,10493,32,755,10763,
1323,13693,13438,14319,15261,431,15777,2254,15038,263,15040,15024,973,14084,14517,15967,15032,15697,6408,6182,12565,3836,9285,7456,9716,16035,13636,14017,4579,15697,14263,15978,16030,4654,14532,15767,6124,14176,5954,605,13028,2276,15853,15952,16031,13933,16033,10762,15833,9101,11478,7433,8390,1670,15829,15901,14432,6133,13671,8713,13673,15928,14077,8218,15933,15992,12301,16061,14172,3534,15993,15795,8469,10354,16084,15994,15969,8500,6204,15771,15949,13862,5963,13316,15920,13452,15832,16047,14318,
14185,8234,1670,16024,4512,13969,15861,5870,9584,8138,13633,7911,1632,4700,4474,12363,10778,9847,15045,5323,7055,15426,11010,15271,5680,15047,13261,11918,7706,10785,15294,9011,12282,5638,14888,7957,15489,11448,1724,14744,6747,1738,14624,14748,8089,14750,4352,7216,4780,7218,13546,15996,2246,3581,11780,15783,10707,10739,15302,3235,11437,7675,14809,15129,97,6840,14270,2192,821,10461,5507,14733,13017,11079,294,12340,6620,2209,5542,12350,4618,12068,14413,8348,4995,7448,13214,11916,9214,625,16141,15157,
12135,15475,15029,9028,11158,868,7492,576,742,99,115,2267,1545,3864,16198,6549,12538,15697,12540,7006,2030,7690,7250,1294,11088,14621,12005,6806,15141,11093,1930,9874,6344,11766,2276,14679,10163,5045,613,9464,15600,9291,10355,7326,538,7334,13571,11135,759,103,1545,16240,16186,14186,13004,11007,4607,11349,15474,15246,6373,11072,10910,4358,848,608,4527,12885,4657,16253,7217,9814,7055,16158,15902,14394,16014,16016,9747,679,11233,13886,1978,14852,5321,12452,15660,859,686,8624,10525,7716,709,11037,13818,
2575,11960,778,5271,1621,9983,1878,643,16184,825,16251,8234,9857,11980,12124,6938,539,11160,11986,9866,4370,12881,1711,15305,12318,11020,10350,1747,6431,103,14825,7290,14843,3547,9939,16197,16169,16179,1981,12102,1430,7690,11952,16333,11116,4099,6722,5021,6068,12446,5492,10140,9014,13023,12358,9067,9013,13030,1621,14910,1329,13546,4584,16241,10988,2246,15781,10724,11181,10541,3644,4144,12357,1599,12403,11974,11990,15104,11552,9856,16340,14725,10226,7326,1670,78,455,10593,3665,115,14808,16304,5149,
119,575,1929,85,7527,3765,111,1600,11712,6883,10450,15460,10452,6548,13103,12964,771,10449,9268,12327,10468,3657,16153,4250,16269,14851,4656,14759,4618,293,16236,629,9464,16161,7502,15784,16164,9633,16340,10491,5862,287,16276,15061,16278,12324,3795,16348,9011,9574,8702,4523,16317,12332,16319,15458,4523,12112,12516,7274,12020,9237,15090,16258,11473,13181,13224,15191,15692,7433,1745,15725,15731,13226,11152,15713,14967,15028,10445,4008,16457,15695,9531,1597,14905,11539,421,16387,690,100,4700,1912,12313,
9609,292,14914,11691,1087,7384,114,51,11710,15230,11591,12468,318,575,16487,15234,15086,6337,15559,1037,669,728,120,52,1655,11972,296,9843,859,7056,16388,15548,15215,16448,11886,15204,335,16474,1929,6859,16478,12336,16480,11729,16483,16492,16486,16488,15539,16490,12173,16525,16494,15545,5406,6468,11756,15723,551,16508,16503,16495,16507,14909,87,16510,11661,12157,4355,16394,259,551,9474,16481,12162,4965,10500,287,14918,454,12012,11632,7124,11684,7468,14340,16553,14915,296,1753,11694,11696,3393,1342,
11699,16572,1420,15641,2677,271,571,12868,125,124,470,12573,11747,15554,16529,12767,16531,16504,11570,15282,16498,8055,3656,16557,3405,14919,12001,16495,16315,652,15215,6588,6684,12388,16340,14913,16554,8510,1320,16558,413,16600,6648,16528,15232,16530,16485,16532,15561,376,16593,15549,16298,15733,7716,16482,11731,930,1745,15716,15600,14585,2588,16597,435,16559,5985,401,16617,15541,15560,16505,4143,16594,3568,16495,11760,7601,1534,9734,328,15108,16566,11691,930,571,16637,608,16639,16527,16587,16618,
16589,16620,16591,11648,5638,49,16647,376,16484,9034,16621,16645,11626,1430,50,16546,785,16548,16538,16543,16545,1902,16523,16630,1301,16500,16539,16660,16599,16640,15208,15555,15210,3229,16596,32,16613,9409,16495,13265,15238,3624,15547,14904,12928,1641,7254,14895,16454,12189,14902,9010,1709,7246,13238,11956,15282,16329,15251,14734,5253,16544,16475,4939,14909,648,16356,14225,11979,3226,16308,7005,11983,16311,2303,9974,11983,2661,115,16167,260,13041,12121,14791,16331,1136,16172,2E3,16175,13059,15064,
15476,16188,13163,13869,15387,9276,8029,9939,14856,14861,8258,14930,11932,2187,14927,14870,6177,4657,12521,16224,12523,16226,9880,933,12011,9408,16560,6356,16340,9312,4453,1939,7267,5638,16765,14866,4028,5638,16772,7295,7053,5414,16769,1386,6800,16723,16449,12553,14927,6511,941,5437,5451,5441,15111,451,5444,5446,5448,5450,5452,32,5440,5455,5459,5439,5456,5451,16231,16244,15824,16029,4388,291,369,9888,16421,8950,10223,1747,16439,14389,14711,12505,7269,14880,16142,16257,12553,11960,9843,12329,8048,
16336,11961,12423,11079,552,6676,4939,6828,15466,12958,16280,16341,7624,16343,10762,14855,16799,2873,14859,16866,8945,15103,15423,5492,16860,16375,16796,4855,14805,16795,6012,4578,12016,12952,16071,16510,16729,14910,16732,7536,16433,11060,16435,14754,11762,16291,7719,16245,11448,10780,16330,15065,1632,71,495,11011,13101,308,12855,16209,15295,9553,9847,9029,12905,120,12914,13059,16788,7326,670,105,11177,16217,12897,12872,10432,12823,12452,10420,1564,12161,11180,4630,16924,12899,9171,16747,792,16928,
12903,12890,2267,12907,1664,2727,16928,909,16931,13407,890,9112,259,12879,12881,13059,1946,5475,16940,499,16355,2935,4171,2723,10463,6500,84,12854,15316,16909,16892,15291,335,13264,979,1031,14258,9847,13907,15811,15503,4765,13564,15578,15632,9202,2477,10728,15617,15625,8333,15627,8336,15575,2894,8006,8946,3278,14034,15595,16828,7200,15645,15599,16026,15128,16750,14056,13446,16980,13971,355,13876,16003,16009,9095,15608,16984,13654,2673,15612,13203,6777,15615,14121,8840,15619,14344,4370,1965,13478,
14488,4296,15887,13415,13434,16113,13841,109,13961,15036,16760,13964,15570,3836,15572,10077,15590,13445,15631,2505,14059,6769,13885,15635,11029,15637,13890,10098,10942,16577,10748,2525,14023,15962,6113,15598,15647,8048,15667,6344,15652,11665,496,15655,5087,15658,100,15660,6636,15662,385,15665,10691,9797,15731,15240,3698,12780,5605,15226,11603,15228,273,16696,16588,569,15529,386,16495,6486,16536,11929,16495,3450,15237,11574,15239,431,8616,13274,666,2782,544,16058,15852,15850,10444,17111,5151,13359,
13939,13361,8329,1878,6906,17114,913,13030,17118,15753,16766,4494,500,2794,16107,12511,17133,8710,14537,16076,14539,17123,17119,6435,16497,13460,8354,7782,1632,15172,14506,9489,1875,16937,11864,15467,12822,7531,5412,7293,16863,17136,1878,14839,8571,14827,6113,15049,767,15667,550,15248,15250,16803,12958,15243,14889,17174,9730,6049,578,16900,15476,12349,13427,15046,16887,16761,7299,9026,48,10371,1135,17118,16875,16880,14771,16842,5361,17157,17178,15490,13236,10799,10444,16709,14954,10619,15683,15740,
16030,11500,17210,11914,7407,4577,17213,13231,15705,16463,10479,11904,12806,12613,13348,12810,12625,16714,15748,13274,16091,16762,9302,12460,4274,12568,16750,5606,1812,1396,3877,17200,16858,9730,13051,10131,15479,11448,16017,294,4103,10767,15053,16844,12958,13079,16038,15041,17244,16028,10153,16464,10262,17116,767,13030,2134,17126,1037,13030,13051,13039,11031,17236,15092,10181,13088,4726,13053,13055,16191,8390,1121,5166,15244,17261,12866,17237,605,149,15483,13232,13161,15051,15473,16177,16749,17275,
16046,15795,16217,5606,17290,15472,15488,17254,12212,2703,16256,13008,17287,17297,15330,9113,17182,16201,6106,3965,17308,9706,17310,13044,1632,13190,12067,16551,767,14612,731,11120,2460,9040,8994,281,8893,1531,7359,394,8887,13181,12133,15684,12938,11887,14693,13274,8618,1880,14638,14633,13466,9241,12113,15476,9776,14388,16402,6851,17336,381,12364,6734,335,16716,11290,7220,1814,16124,16869,594,10758,17161,5870,7348,16385,8753,679,7724,14597,12922,16320,7735,10443,9779,11610,14607,1662,13096,12070,
10805,14620,8840,12074,6952,10824,6952,10813,6600,12086,7020,6962,7039,12083,7019,10816,17398,10823,12095,7034,7033,7032,17405,10835,17394,10833,12098,7035,6954,9399,280,4474,11727,2087,17383,11519,15286,752,9988,17421,913,17423,12057,11675,3727,14643,11099,7390,2751,16973,17206,15409,421,17231,6780,17192,5627,10768,6867,6849,5490,12452,14761,10582,17319,15722,16750,843,512,16324,14719,16326,5855,4874,6352,5273,3925,5275,14826,14720,1076,16961,16283,9431,11887,17363,14904,9256,9258,323,7260,9847,
6541,7005,17467,17460,2244,9421,10455,12537,9065,9479,7260,5596,15088,689,16234,9847,11434,15698,7908,12237,17156,14657,17368,1669,16023,17040,9039,15711,7543,11354,15108,5275,11046,11160,11046,7848,10464,16718,12180,14947,7706,11981,17385,387,2797,15782,16833,10738,11806,7186,12405,10889,12407,12633,920,15277,15279,14995,3689,15276,12960,378,15318,15293,288,12755,9788,13181,11504,16634,11507,16027,9915,10795,7650,11051,9098,17217,15779,1297,14979,17220,11785,17292,15601,3969,3893,14896,6800,12774,
15700,15564,10693,14220,1716,13403,14186,17188,11944,1716,13080,8205,755,16040,5052,14751,9585,4779,16971,15102,1541,109,17012,14488,8057,9645,2060,17030,7059,17014,2576,9768,17506,2343,1716,16072,9741,694,15893,4657,13790,16932,7958,13795,12479,13799,9227,13799,9230,477,12487,9234,6964,17591,14588,1524,10512,10175,9847,3771,98,109,17526,8280,16163,17529,9629,4138,16420,17634,17528,14700,7186,1506,52,17633,8422,16422,17636,10295,327,9533,17247,14734,15389,3089,16006,8234,11802,15380,17527,11813,16165,
7006,14239,9155,17627,15323,1529,870,11821,11356,14770,8662,9258,778,11793,5437,15110,13792,6161,759,761,14705,7167,17544,6501,5747,15408,15567,371,17442,10179,46,9430,9425,9379,13096,10272,9382,17696,276,12450,9054,17700,6182,14817,5231,16325,15954,15138,6914,9404,16778,12009,9881,16230,9420,9400,9412,16213,4371,10738,8840,15141,17717,12181,8324,16223,17724,16779,9417,6916,16783,5493,8947,9422,6797,14872,10457,9058,17154,4173,14878,14235,16134,13133,9617,5393,10573,16232,17690,9076,7055,13252,16126,
120,15819,16108,7055,15822,13906,5691,13146,15430,913,14679,17764,11941,1040,10576,1863,13122,16318,10621,17750,13145,13012,9334,15810,110,10434,14934,366,1912,7724,16130,8348,16132,6048,7055,10437,14524,1453,15127,17260,16143,14734,15031,8234,16125,13404,16391,12340,17768,3578,17767,17778,9346,9389,12003,16776,17733,11359,17731,16228,16782,12372,12020,16379,291,258,12391,1664,16756,17315,5117,13245,10616,431,17761,1379,5253,17755,4618,77,3852,17318,1680,17825,13819,446,14805,15437,17443,9048,431,
17792,17829,5528,14939,9315,7055,17782,3262,17803,11980,14991,6780,55,17744,12447,17823,5633,12458,8662,17819,16380,17822,6533,3585,15430,17371,16770,9939,17843,14833,7326,14221,17419,579,17503,17718,17879,14876,5536,17877,17855,598,17881,383,11002,4602,17837,12865,17454,17297,17878,12340,12303,17374,2187,10255,12561,13309,17887,17847,17900,1135,14982,17796,5241,17262,4341,1670,17899,3089,1735,17862,6538,17191,17159,15266,7380,10107,13181,15282,14898,15700,11528,15486,17293,15039,17553,11502,17563,
17930,17565,984,12139,15195,13189,13237,12042,3716,15224,7142,10436,17421,16641,16664,16643,1037,2591,17099,15214,15202,9930,16515,5127,12051,11613,10954,1548,14340,17949,11619,16697,10549,17954,16535,17106,1702,8053,12251,15089,17440,17957,7167,12258,6692,15457,17518,12307,10790,16710,7688,11565,17928,3389,17933,12604,17229,14988,3715,121,17875,6795,17996,15046,10846,17741,5958,3842,7138,2027,10152,8985,3842,1912,18006,3244,122,17998,8010,2997,18013,12447,260,1912,8658,7375,17185,14760,17387,12494,
17389,4870,16150,7017,17394,6945,17396,10836,6964,12085,12082,10818,12084,17400,12100,12089,7031,6971,10826,17416,7037,12099,17415,12093,12099,17417,6090,18003,9248,4668,10838,18001,14656,4752,14813,9427,5719,17981,649,14634,8887,10853,12171,16434,16718,9362,16192,11061,121,398,14645,2317,9371,382,12165,774,18065,12311,14637,15146,6876,17727,16872,8348,15075,12173,12413,12188,18076,3622,12192,18079,10112,13137,13111,14996,12259,15178,17752,17977,7365,15453,18102,10908,335,13177,770,17964,11956,872,
9980,3649,9953,9724,8205,2187,17801,10841,17799,5149,17184,10439,17203,15320,13213,9303,16175,17439,11474,10619,17902,12588,15672,13230,6578,17570,17341,13270,7241,5213,10388,14904,13274,322,97,13581,14487,13583,3484,14702,1625,17195,4362,7326,18136,13279,4668,18160,2420,8469,17451,17314,17840,10885,455,18157,16214,7053,1870,2267,13959,18149,2070,16012,5967,16437,13744,9045,7288,17483,17710,12255,455,13279,8420,16217,401,17879,6684,18178,14352,18180,18169,11947,15754,4028,12339,7529,11923,2070,8469,
5257,14769,16787,16789,1870,6607,15998,11946,108,18194,3438,18190,15034,462,16391,13059,17944,728,4458,16811,619,5118,859,5089,1833,360,12340,6926,1870,4451,8218,591,12004,729,9207,18226,91,8564,2630,15393,10142,17061,3870,14657,18189,8652,16217,16345,558,18214,18216,1625,17274,17353,1080,18205,16021,2035,3438,16943,5633,12824,12346,8516,15791,8092,7186,9608,7946,14366,14704,738,18261,3438,8658,18174,1688,15924,15086,18250,2420,18179,6360,8830,1870,13959,18192,12340,18257,13617,18182,13928,461,18136,
17889,763,18280,17707,5247,17459,18186,9583,18287,8756,17466,8571,14842,18307,18285,1210,18295,9609,17500,12958,18149,17458,4349,17468,18249,1210,4103,8361,17243,11135,18293,18203,18286,13743,14002,16116,7820,4958,400,4604,16837,17356,7205,18131,1636,17380,318,10162,7412,17612,17025,15652,626,1601,6787,12724,11122,14824,18304,5298,17709,14337,18249,18059,18151,13366,8738,8090,6721,15512,10408,18209,8591,8894,13208,13201,5390,14691,11896,17209,17562,14493,17092,18142,7679,15196,17942,8612,11956,17692,
16414,16344,17242,17610,9275,17844,14727,14993,16334,17533,18101,11146,4554,14999,10983,1430,17831,3541,15008,9757,12241,296,10222,12352,12509,2879,13774,5671,9804,12287,1209,17789,8234,13620,17024,15799,15626,13624,16992,16195,11391,3836,13794,2910,13796,9226,13798,12487,13801,2920,9233,1924,11363,14990,12353,15514,18062,7736,15450,11956,9049,15440,12743,9954,2400,17531,16335,12244,315,5940,12719,1396,102,10873,12999,17615,8469,17657,13650,17887,18453,18119,7448,17604,15288,2087,18413,17603,6122,
18461,79,18463,4728,6856,1132,16888,9856,18480,18482,3770,18465,2918,5880,12395,9768,4208,15835,11448,2906,648,18462,18464,5389,9636,18492,13328,17611,13710,9817,18434,17615,13797,1753,9824,18440,12715,9231,13802,9234,12324,16127,18452,10919,18454,3089,18499,1929,18481,18502,1774,18504,605,6401,16469,1602,9753,392,380,345,17652,17523,15203,7167,9785,16136,288,12378,12374,323,15417,17207,10627,1387,15687,17992,18104,7263,18059,3983,6711,11097,12669,12614,12954,7215,11417,11008,17672,17453,16450,15025,
12946,17309,17895,15476,18122,8234,1840,12E3,17915,9255,18110,12279,12062,6506,10946,17948,18114,643,817,9951,3650,18524,18127,12939,18111,7374,11627,18536,379,17337,15068,9847,15078,12579,11329,12747,11344,15099,15121,12691,17214,14227,3875,16189,12106,3837,12444,9416,10067,12725,110,16379,642,11419,12748,12689,18610,15101,11364,11262,12421,15131,15163,15166,18609,12759,15085,11477,12765,9192,15176,9456,15770,15020,11664,14098,1927,18618,17716,2892,18621,10954,16002,5785,15164,11204,18635,15085,
17795,15603,11135,15130,10344,15132,15097,18626,15083,18658,12752,15184,13710,12007,16227,12011,16432,4008,18646,12455,14472,15894,15160,10607,5154,11319,18669,18657,18628,15137,637,17358,345,14642,18537,17337,11302,5773,5045,7413,18625,18608,15135,18688,15167,4579,18645,14228,11962,18024,17745,12116,15183,12028,15186,18384,15188,11494,17090,18715,11497,1597,15681,17228,15491,12145,17945,12046,12638,10655,12156,17959,7124,413,18624,7122,13157,12119,7849,18698,3562,7504,17430,14641,11777,18507,2903,
13793,18510,6818,9218,17617,18438,12486,9828,18519,17684,7365,17686,18540,17976,12027,16775,5275,16225,18242,18673,17815,18675,17171,12551,1409,9527,16436,4951,282,15180,18103,18091,18642,3653,17351,9243,17305,17202,18134,18552,17567,16714,17810,18137,10314,13186,17554,10647,18128,12779,18726,13194,12047,18729,12640,11633,1632,9042,9636,17114,15451,9479,13030,6694,1743,7219,5217,15851,17339,18792,17934,7758,12606,10311,14984,12939,14604,18346,17943,10853,12502,17666,774,6719,11989,9160,15816,10584,
9163,16724,16750,15056,14752,9586,17589,7095,429,16146,12004,14746,18242,14625,16152,10204,9168,10137,12901,6018,9176,12520,17729,8537,18674,9186,17732,9188,17734,12646,10980,774,18773,570,18649,18301,12547,18709,4618,16899,18836,17297,16882,17201,12501,9176,12556,9252,12072,14235,10786,18583,17384,18760,768,12020,16847,99,10671,17875,4687,6562,17763,17808,17903,569,18596,17805,17882,12340,14340,251,913,18596,12064,731,17887,18902,1111,18901,18898,12534,14811,729,18593,17876,6567,9013,10443,7690,
10669,6588,18596,9942,10443,17818,2060,909,99,12743,18894,17471,18159,9013,6511,501,17846,17428,1037,18926,18586,16535,12614,643,3856,2817,6995,2332,18167,6577,686,11081,18893,18057,9276,12909,4757,17497,262,9400,6859,9892,11005,14740,18783,11448,328,17771,10192,1865,1470,18913,18971,18520,470,578,18933,18957,18396,6777,8136,18472,18870,6294,17784,111,17786,10567,15748,10776,327,18132,18824,11637,1870,14653,17922,2400,17373,2667,18992,17520,12320,7245,15256,2748,10853,18576,9852,575,709,1637,16745,
17294,11446,17296,17183,18422,5149,15260,17369,10616,16890,1409,1745,461,19002,18594,17941,17204,461,70,16740,1755,11590,11326,10441,17751,10853,17497,6181,18319,17179,12906,1414,18478,1379,17283,17447,3877,11619,17511,17911,17320,17826,3808,17508,11153,19055,6580,5532,6750,18242,19064,11363,12797,15716,18952,7732,17379,19040,9361,9592,11062,3741,86,2775,8116,11607,9906,17993,946,4389,3114,6804,18486,14873,538,15355,743,87,1604,587,6839,14309,18269,7941,13634,15925,15020,1545,5045,18899,16750,1170,
323,14298,8352,684,279,770,1006,3116,846,9274,277,18621,16390,15393,17811,13749,18666,18701,15165,18703,11424,19122,15985,7274,19091,355,19093,19095,577,6839,17609,19099,4559,16004,554,3842,1687,99,19094,643,19137,107,17576,16611,16117,15650,12355,3995,65,15660,1878,17285,16246,4927,7468,17005,17297,16260,18566,4607,19157,2082,19160,11448,4148,77,18835,15096,15120,18637,19127,19178,12740,7286,3626,3628,17073,10765,5861,3625,3627,4536,19185,7488,287,19188,19184,3630,9716,15020,19164,15476,3852,11289,
6534,19169,19159,17177,17E3,6643,117,12369,9593,12816,11878,11302,11414,19174,19123,15080,18607,11396,19179,14151,19181,12547,3493,11051,17893,10590,16200,18168,1136,2862,5773,19226,17910,18573,18570,11336,10331,2586,11165,7468,18700,19220,18687,19180,11E3,11128,11460,11198,101,19204,1624,17787,19058,311,304,15362,11149,4124,4726,13056,11982,1588,5749,18242,11175,9866,16078,4143,4041,14591,766,8048,17150,19272,7047,327,9966,8625,2684,19148,291,16627,19045,11287,15346,12891,112,7474,1621,432,19199,
19058,19143,19092,19146,19136,19283,14564,19152,16008,19101,7006,12682,5758,859,19109,18615,12285,19112,3831,19115,2656,5052,19118,12491,4148,641,1006,19240,4918,15022,19243,12739,11216,18656,19247,11387,11315,625,19321,11166,17067,19176,19327,10973,19336,11233,19295,19134,19297,19282,6839,19071,7074,12769,19158,19253,19131,10148,19162,15022,258,1904,1840,5437,3845,5654,3846,9548,6806,19358,12722,14226,11363,4490,19272,11456,15603,17797,16750,3852,19252,19171,16725,9532,9736,3596,9815,5275,511,5723,
545,6806,19382,890,631,3347,6090,19352,4802,19374,19206,9730,16638,17803,17448,8048,12144,5985,1213,3790,5318,115,107,2429,12344,19289,670,19291,103,19293,19230,9620,9115,4597,108,19227,15158,15480,4124,16366,14538,91,755,4916,19241,15022,2485,15586,2888,9939,13142,15182,10619,15217,12626,7411,335,19108,1031,1430,18141,14980,12627,17549,16026,15687,18909,14657,67,17071,2748,15740,14256,16975,15530,15198,13193,256,6588,65,12882,15585,354,11811,16656,11731,15382,5562,16642,15556,15300,16495,5463,15549,
10601,15660,354,18759,19471,17950,19473,913,16569,40,41,32,61,62,1437,4390,10212,16622,1657,578,343,9563,15549,4919,1604,262,17502,16687,16629,6487,18387,16663,17966,17095,17640,9393,16677,5753,327,115,9104,3767,15549,311,19503,18059,18481,4906,19516,16609,16567,15029,16586,19510,16665,17661,10532,19514,9861,19517,7171,17101,19507,19033,16704,2573,18558,15549,6568,5762,19522,15443,15229,19472,16698,19540,14245,19542,17502,15549,6588,66,11178,19536,19518,710,19468,10193,2128,19400,19509,16395,19552,
10230,16422,19535,19516,19562,15563,9457,8993,17689,13239,18208,14871,17444,1828,19504,6616,17739,10066,9384,17698,12451,17864,4765,17697,18680,13097,17705,10554,17465,18184,18361,15990,12002,17721,17713,18242,17725,10211,17418,17804,18762,7288,19605,9394,17731,17726,11244,17728,19217,19111,19615,19608,9420,17736,17487,9036,19583,603,18981,17693,18268,14944,15445,18376,1E4,111,12945,100,16500,7135,16717,17365,14606,18888,9566,18580,4657,1514,15398,542,18986,10381,9570,6907,16174,7158,1111,17327,517,
16380,1706,19345,6675,12869,726,1514,17834,14565,10432,19646,12297,19462,6571,19650,17907,2298,1514,19653,16753,19656,1409,19658,13770,10432,19667,10762,10377,10435,10382,1493,107,5867,5190,19662,12868,881,1514,17758,13869,1514,18407,18075,10386,18145,14903,18996,3707,18073,11018,10853,18604,10781,18685,19128,18702,19246,11220,19711,4826,12733,11213,18667,18636,19222,19328,12753,11414,1079,1916,11318,18655,18686,19326,19732,11220,4101,16370,18088,5149,15117,17352,7058,19721,19126,19245,19724,19717,
10967,18664,18634,19714,19221,15134,18670,11488,15139,17733,11091,9881,16228,7460,15149,11126,15867,14709,9973,19419,19083,15159,6171,18683,19324,12751,19745,19753,19223,11425,306,18069,649,12763,18779,10473,15146,19782,9786,14892,7560,16736,15684,12031,17312,16952,11498,18383,17217,18713,18820,18788,12043,18717,17612,17217,15193,19795,18381,15292,19508,19459,12637,11608,18664,11724,12694,306,4491,17187,18395,16628,16610,13869,15201,4600,476,16175,18009,16551,10705,19564,19571,16834,11604,4251,11606,
481,5130,19437,11773,9256,16181,2775,327,16404,10451,10178,10853,3885,11236,83,10459,625,15324,9386,9048,13791,18763,10458,370,6918,19857,44,102,11235,17683,12189,19843,16398,7212,125,19614,17034,1598,14085,17583,6736,18655,8047,13964,12313,14839]});
define("tdv/events/async",["require","exports","tdv/utils"],function(a,m,h){function n(){var d=e.length,f=e.splice(0,d);k+=d;for(var l=0;l<d;l++){var p=f[l];if(p)try{p()}catch(q){h.TX("Error in async task",q)}}}var g=0,k=0,e=[],b,c=new Promise(function(d){d()});setInterval(function(){e.length>0&&(new Date).getTime()-b>100&&n()},100);return{ME:function(d,f){f===void 0&&(f=void 0);if(f!==void 0&&f>0)return-1-setTimeout(d,f||1);e.length==0&&(c.then(n),b=(new Date).getTime());g++;e.push(d);return g-1},
cancel:function(d){if(d<0)clearTimeout(-1-d);else{var f=d-k;if(f>=0){if(!e[f])throw"invalid async handle: "+d;e[f]=null}}}}});
define("tdv/events/EventDispatcher",["require","exports","tdv/events/Event","tdv/events/async","tdv/utils"],function(a,m,h,n,g){var k=function(){return function(){}}();return function(){function e(){this.bd={}}e.prototype.rcb=function(b,c,d){this.bwa(b,c,d,!0,c,!0,!1)};e.prototype.bind=function(b,c,d,f,l,p){p===void 0&&(p=!1);return this.bwa(b,c,d,f,l||c,!1,p)};e.prototype.bwa=function(b,c,d,f,l,p,q){if(b===void 0)throw"Event name undefined";if(c===void 0)throw"Event handler undefined";d=d||this;
f=f?!0:!1;b in this.bd||(this.bd[b]=[]);var r=new k;r.CX=c;r.ogb=l||c;r.context=d;r.DMa=f;r.SMa=q;b=this.bd[b];p?b.unshift(r):b.push(r);return this};e.prototype.h=function(b,c,d){b in this.bd&&(d=d||this,this.bd[b]=this.bd[b].filter(function(f){return f.CX!=c||f.context!=d}),this.bd[b].length==0&&delete this.bd[b]);return this};e.prototype.dnb=function(b){b in this.bd&&delete this.bd[b]};e.prototype.rsa=function(){this.bd={}};e.prototype.o=function(b,c){c===void 0&&(c=void 0);typeof b=="string"&&
(b=new h(b,c));b.name in this.bd&&(b.source=this,this.jC(b,!0),b.name in this.bd&&this.I_a(b));return this};e.prototype.I_a=function(b){e.J0.push({caller:this,event:b});e.yea||(e.yea=!0,n.ME(e.sxa))};e.sxa=function(){for(var b=(new Date).getTime()+1E3;e.J0.length;){var c=e.J0.shift();e.prototype.jC.call(c.caller,c.event,!1);if((new Date).getTime()>b)break}e.J0.length>0?n.ME(e.sxa,1):e.yea=!1};e.prototype.d8=function(b){return b in this.bd};e.prototype.DX=function(b){if(b in this.bd){b=this.bd[b];
for(var c=0;c<b.length;c++)if(b[c].SMa)return!0}return!1};e.prototype.gP=function(b,c,d){var f=[];b=this.bd[b]||[];for(var l=0;l<b.length;l++){var p=b[l];c!==void 0&&p.DMa!=c||d!==void 0&&p.SMa!=d||f.push(p.ogb)}return f};e.prototype.jC=function(b,c){var d=this;b.unbindCurrentHandler=function(){p&&d.h(b.name,p.CX,p.context)};if(b.name in this.bd)for(var f=this.bd[b.name],l=0;l<f.length;l++){var p=f[l];if(p.DMa==c)try{p.CX.call(p.context,b)}catch(q){g.TX("Exception handling event "+b.name,q)}}};e.J0=
[];e.yea=!1;return e}()});
define("tdv/player/view/util/URL",["require","exports"],function(){return function(){function a(){}a.apa=function(m){if(this.Tg("crossorigin",!1))return!0;if(this.t8(m)){var h=window.location.protocol+"//"+window.location.hostname;window.location.port&&(h+=":"+window.location.port);return m.substring(0,h.length)!=h}return!1};a.lB=function(m,h){if(this.Ehb(m))m=window.location.protocol+m;else if(!this.t8(m)&&!this.iE(m)){if(h)if(m.indexOf("/")==0){var n=h.indexOf("//"),g="";n>=0&&(g=h.substr(0,n+2),
h=h.substr(n+2));n=h.indexOf("/");n>0&&(h=h.substr(0,n));m=g+h+m}else m=h+m;this.Yo.href=m;m=this.Yo.href}return m};a.ohb=function(){switch(window.location.protocol){case "http:":case "https:":return!0;default:return!1}};a.Ehb=function(m){return m.indexOf("//")===0};a.t8=function(m){if(!m)return!1;var h=m.indexOf("://");return h>=3&&h<=5?!0:m.indexOf("filesystem:")==0};a.yhb=function(m){return m&&m.indexOf("/pdfjs/")>=0};a.getDirectory=function(m){m=this.lB(m);m=m.split("?")[0];m=m.split("/");m.length>
1&&m.splice(m.length-1,1);return m.join("/")+"/"};a.Ak=function(m){this.hN||(this.hN=this.bza());return this.hN[m]!==void 0};a.getQueryParameter=function(m){this.hN||(this.hN=this.bza());return this.hN[m]};a.bSa=function(m,h){var n=m.split(h);m=n[0];(n=n.slice(1).join(h))&&(n=h+n);return[m,n]};a.MD=function(m,h){if(!h)return m;var n=this.bSa(m,"#"),g=n[1];n=this.bSa(n[0],"?");var k=n[1];return k.indexOf(h)>=0?m:n[0]+(k+(k?"&":"?")+h)+g};a.parse=function(m){this.Yo.href=m;m={};m.protocol=this.Yo.protocol;
m.hostname=this.Yo.hostname;m.port=this.Yo.port;m.pathname=this.Yo.pathname;m.search=this.Yo.search;m.hash=this.Yo.hash;m.host=this.Yo.host;var h=m.pathname?m.pathname.lastIndexOf("."):-1;m.veb=h>=0?m.pathname.substr(h).toLowerCase():"";return m};a.getExtension=function(m){m=this.parse(m).pathname;var h=m.lastIndexOf(".");return h>=0?m.substr(h,m.length):""};a.Tg=function(m,h){m=(this.getQueryParameter(m)||"").toLowerCase();return this.Xib(m,h)};a.Xib=function(m,h){switch(m){case "false":case "0":case "no":case "n":return!1;
case "true":case "1":case "yes":case "y":return!0;default:return h}};a.nLa=function(m,h){m=parseInt(this.getQueryParameter(m));return isNaN(m)?h:m};a.I7=function(m){m=parseFloat(this.getQueryParameter(m));return isNaN(m)?void 0:m};a.bza=function(){for(var m={},h=window.location.hash.substring(1).split("&").concat(window.location.search.substring(1).split("&")),n=0;n<h.length;n++){var g=h[n].split("="),k=decodeURIComponent(g[0]);g=g.length>1?decodeURIComponent(g[1]):null;m[k]=g}return m};a.Yo=document.createElement("a");
a.hN=null;a.iE=function(m){return m&&m.indexOf("data:")==0};return a}()});
define("tdv/player/view/util/Device",["require","exports","tdv/utils","tdv/player/view/util/URL"],function(a,m,h,n){var g={};g.vj=TDV.qb.t_;g.uB=TDV.qb.Xba;g.Tua=TDV.qb.gua;g.fpb=TDV.qb.aca;g.p_=TDV.qb.Yba;g.Bta=TDV.qb.fua;g.Pob=TDV.qb.$ba;g.Zba=TDV.qb.Zba;g.DQ=TDV.qb.DQ;g.Maa=TDV.qb.Maa;g.Laa=TDV.qb.Laa;g.Kaa=TDV.qb.Kaa;g.Naa=TDV.qb.Naa;g.sj=TDV.qb.sj;g.UZ=TDV.qb.UZ;g.Nk=TDV.qb.Nk;g.Pp=TDV.qb.Pp;g.OK=TDV.qb.OK;g.rF=TDV.qb.rF;g.TZ=TDV.qb.TZ;g.nx=TDV.qb.nx;g.Haa=TDV.qb.Haa;g.WZ=TDV.qb.WZ;g.ox=TDV.qb.ox;
g.ru=TDV.qb.ru;g.ZZ=TDV.qb.ZZ;g.Iaa=TDV.qb.Iaa;g.BQ=TDV.qb.BQ;g.PK=TDV.qb.PK;g.QK=TDV.qb.QK;g.CQ=TDV.qb.CQ;g.zB=TDV.qb.zB;g.Zsa=TDV.qb.Zsa;g.yB=TDV.qb.yB;g.su=TDV.qb.su;g.tu=TDV.qb.tu;g.VZ=TDV.qb.VZ;g.Jaa=TDV.qb.Jaa;g.Oaa=TDV.qb.Oaa;g.a_=TDV.qb.a_;g.GQ=TDV.qb.GQ;g.Saa=TDV.qb.Saa;g.UK=TDV.qb.UK;g.HQ=TDV.qb.HQ;g.b_=TDV.qb.b_;g.KQ=TDV.qb.KQ;g.c_=TDV.qb.c_;g.VK=TDV.qb.VK;g.IQ=TDV.qb.IQ;g.JQ=TDV.qb.JQ;g.d_=TDV.qb.d_;g.Taa=TDV.qb.Taa;g.aH=function(e){e="force_"+e;if(n.Ak("debug")&&n.Ak(e))return n.getQueryParameter(e)};
g.V0a=g.aH("os");g.Nd=function(){return g.V0a||TDV.qb.Nd};g.Q0a=g.aH("browser");g.Yb=function(){return g.Q0a||TDV.qb.Yb};g.R0a=g.aH("browser_type");g.BO=function(){return g.R0a||TDV.qb.BO};g.gya=g.aH("browser_subtype");g.xc=function(){return g.gya?g.gya:TDV.qb.xc};g.S0a=g.aH("browser_version");g.NIa=function(){return g.S0a||TDV.qb.NIa};g.U0a=g.aH("device");g.wk=function(){return g.U0a||TDV.qb.wk};g.ub=function(){return TDV.qb.mobile};g.z0a=function(){for(var e=navigator.userAgent.toLowerCase(),b=
["SM-G960","SM-G965"],c=0;c<b.length;c++)if(e.indexOf(b[c].toLowerCase())>=0)return!0;return!1}();g.dZa=g.Yb()!=g.Pp||navigator.userAgent.indexOf("; wv")<0?!1:!0;g.T0a=!!g.aH("chromewebview");g.eJa=function(){return g.T0a||g.dZa};g.kf=function(){return g.xc()==g.ox||g.xc()==g.ru||g.xc()==g.ZZ||g.xc()==g.su||g.xc()==g.tu||g.xc()==g.yB};g.C8=function(){return g.IJ()};g.B8=function(){return g.uP()||g.VMa()||g.fNa()||g.$Ma()};g.bpa=function(){return g.xc()==g.su};g.Ama=void 0;g.nob=function(){if(g.Ama===
void 0){var e=void 0;g.jE()&&(window.location.hash.split("&").forEach(function(b){b.split("=")[0]=="app-version"&&(e=b.split("=")[1])}),e&&(e=parseInt(e)));e=e||0;g.Ama=e}return g.Ama};g.jE=function(){return g.RX()||g.bpa()};g.RX=function(){return g.xc()==g.tu};g.Bhb=function(){return g.wk()==g.b_};g.shb=function(){return g.wk()==g.c_};g.VMa=function(){return g.wk()==g.VK};g.zhb=function(){return g.wk()==g.IQ};g.Ahb=function(){return g.wk()==g.JQ};g.ZMa=function(){return g.wk()==g.KQ};g.$Ma=function(){return!!(window.location.hash&&
window.location.hash.indexOf("device=picoxr")>=0)};g.fNa=function(){return g.wk()==g.d_};g.IJ=function(){return g.wk()==g.HQ};g.uP=function(){return g.wk()==g.UK};g.dI=void 0;g.kjb=function(){g.dI===void 0&&(g.dI=parseInt(n.getQueryParameter("sts")),isNaN(g.dI)&&(g.kf()&&!g.z0a?g.dI=512:g.ub()&&g.Nd()==g.vj?g.dI=512:g.dI=g.ub()?256:1024));return g.dI};g.q7a=function(){if(g.Yb()==g.Nk||g.Yb()==g.sj)try{var e=/Version\/([0-9]+\.[0-9]+)/i.exec(navigator.userAgent);if(e)return parseFloat(e[1])}catch(b){}}();
g.uQa=function(){return g.q7a};g.$2a=function(){try{var e=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||!1}catch(b){}e||(e=g.uQa());return e}();g.Qoa=function(){return g.$2a};g.yXa=function(){if(g.Nd()==g.uB)try{var e=/Android ([0-9]+\.?[0-9]*)/i.exec(navigator.userAgent);if(e)return parseFloat(e[1])}catch(b){}}();g.ccb=function(){return g.yXa};g.rza=function(){var e={ZLa:"unknown",
Rhb: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.ZLa=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.Rhb=b.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}return e}();g.hgb=
function(){return g.rza};g.AXa=function(){var e=g.rza.ZLa.match(/Apple\s+(.+)\s+GPU/);return e?e[1].toUpperCase():"unknown"}();g.Epb=function(){return g.AXa};g.O3a=g.wk()==g.GQ?!0:!1;g.DA=function(){return g.O3a};g.VIa=function(){return g.Yb()==g.Nk&&g.uQa()>=14};var k=!1;try{k=window.localStorage.getItem("tdvp_video_drift_2")=="true"}catch(e){}g.Egb=function(){return k};g.ylb=function(){k=!0;try{window.localStorage.setItem("tdvp_video_drift_2","true")}catch(e){}};g.OS="ontouchstart"in window||typeof window.PointerEvent!==
"undefined"&&typeof navigator.maxTouchPoints!=="undefined"&&navigator.maxTouchPoints>0?!0:!1;g.msa=function(){return g.OS};g.V3a=n.Ak("touchenabled")?n.Tg("touchenabled"):"ontouchstart"in window?g.Nd()==g.Tua?!1:!0:!1;g.Jp=function(){return g.V3a};g.summary=function(){return["browser: "+g.Yb(),"browserType: "+g.BO(),"browserSubtype: "+g.xc(),"device: "+g.wk(),"isMobile: "+g.ub(),"chromeWebView: "+g.eJa(),"touchDevice"+g.msa(),"touchEnabled"+g.Jp()].join(", ")};g.log=function(){h.log("browser: "+g.Yb());
h.log("browserType: "+g.BO());h.log("browserSubtype: "+g.xc());h.log("device: "+g.wk());h.log("isMobile: "+g.ub());h.log("chromeWebView: "+g.eJa());h.log("touchDevice: "+g.msa());h.log("touchEnabled: "+g.Jp())};return g});
define("tdv/player/view/util/Flags",["require","exports","tdv/player/view/util/URL"],function(a,m,h){a={};a.uu=h.Tg("debug",!1);a.XUa=h.Ak("hqhls");a.Xsa=h.Tg("audiocontext",!0);a.Zob=h.Tg("testhash",!1);a.IUa=h.Tg("exitvronblur",!1);a.rUa=h.Tg("download",!0);a.hWa=h.Tg("updatewhilehidden",!1);a.OUa=h.Tg("webgl2",!1);a.NUa=h.Tg("webgl1",!1);a.LUa=h.Tg("lowp",!1);a.tta=h.Tg("antialias");a.lWa=h.Tg("unlimited-video-resolution",!1);return a});
define("tdv/player/texts",["require"],function(){return{"bg-bg":{mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0430\u0432\u0430\u043d\u0435","cardboard-v1":"\u0410\u043a\u043e \u043d\u0435 \u0441\u0442\u0435 \u0441\u0438\u0433\u0443\u0440\u043d\u0438 \u043a\u043e\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Cardboard \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435. \u0421\u043b\u0435\u0434 \u0442\u043e\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0449\u0435 \u043f\u043e\u0433\u043b\u0435\u0434\u043d\u0435\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442\u0430 \u0438 \u0449\u0435 \u0438\u0437\u0447\u0430\u043a\u0430\u0442\u0435, \u0434\u043e\u043a\u0430\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0442\u043e \u0441\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0430.",
"download-tour":"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435 \u043d\u0430 \u0442\u0443\u0440\u0430 \u0437\u0430 \u0432\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043e\u0444\u043b\u0430\u0439\u043d","change-to-drag-and-release":"\u041f\u0440\u043e\u043c\u0435\u043d\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u041f\u043b\u044a\u0437\u0433\u0430\u043d\u0435 \u0438 \u041f\u0443\u0441\u043a\u0430\u043d\u0435",
accept:"\u041f\u0440\u0438\u0435\u043c\u0435\u0442\u0435",cancel:"\u041e\u0442\u043a\u0430\u0437","storage-not-provided-bookmark":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0442\u043e \u0441\u044a\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e. \u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u0438 \u0434\u0430 \u044f \u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0438\u0442\u0435.",
"dont-display-again":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u0432\u0430\u0439 \u0442\u0430\u0437\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0442\u043d\u043e\u0432\u043e","web-server-required":"\u0422\u043e\u0437\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u0435\u043b\u0435\u043d \u0442\u0443\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u043f\u0443\u0441\u043d\u0430\u0442 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \u041c\u043e\u043b\u044f, \u043a\u0430\u0447\u0435\u0442\u0435 \u0433\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e.\n\u0410\u043a\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u0435, \u0438\u0437\u0442\u0435\u0433\u043b\u0435\u0442\u0435 htm \u0444\u0430\u0439\u043b\u0430 (\u0438\u043b\u0438 \u0446\u044f\u043b\u0430\u0442\u0430 \u043f\u0430\u043f\u043a\u0430 \u043d\u0430 \u0442\u0443\u0440\u0430) \u0432\u044a\u0440\u0445\u0443 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e TourViewer.",
download:"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435","change-to-click-and-move":"\u041f\u0440\u043e\u043c\u0435\u043d\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u041a\u043b\u0438\u043a\u0432\u0430\u043d\u0435 \u0438 \u041f\u0440\u0435\u043c\u0435\u0441\u0442\u0432\u0430\u043d\u0435",yes:"\u0434\u0430","delete-downloaded":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043d\u0435","use-safari-for-vr":"\u041f\u0440\u0435\u043f\u043e\u0440\u044a\u0447\u0432\u0430\u043c\u0435 Safari, \u0437\u0430 \u0434\u0430 \u0440\u0430\u0437\u0433\u043b\u0435\u0434\u0430\u0442\u0435 \u0442\u043e\u0437\u0438 \u0442\u0443\u0440 \u0432 \u0440\u0435\u0436\u0438\u043c VR",
"exit-fullscreen":"\u0418\u0437\u043b\u0435\u0437\u0442\u0435 \u043e\u0442 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d",no:"\u043d\u0435","download-failed":"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435\u0442\u043e \u0441\u0435 \u043f\u0440\u043e\u0432\u0430\u043b\u0438","giroscope-disabled-http":"\u0418\u043c\u0430\u0442\u0435 \u0434\u043e\u0441\u0442\u044a\u043f \u0434\u043e \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0447\u0440\u0435\u0437 http, \u0442\u0430\u043a\u0430 \u0447\u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0434\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u0442\u043e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0440\u0435\u0436\u0438\u043c\u044a\u0442 VR \u0441\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0438, \u043c\u043e\u043b\u044f, \u043e\u0442\u0432\u043e\u0440\u0435\u0442\u0435 \u0433\u043e \u0447\u0440\u0435\u0437 https, \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0442\u0435.",
"cookies-notice":"\u0422\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0438 \u0437\u0430 \u0441\u044a\u0431\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0430\u043d\u043d\u0438 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435\u0442\u043e. \u0417\u0430 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043c\u043e\u043b\u044f, \u043f\u043e\u0441\u0435\u0442\u0435\u0442\u0435 <a> \u041f\u0440\u0430\u0432\u0438\u043b\u0430\u0442\u0430 \u0437\u0430 \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0438\u0442\u0435 </a>.",
"use-cardboard":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 Cardboard","launch-default-browser":"\u0421\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u044a\u0440\u0430 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435","refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435","rotate-device":"\u041c\u043e\u043b\u044f \u0437\u0430\u0432\u044a\u0440\u0442\u0435\u0442\u0435 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"exit-vr":"\u0418\u0437\u043b\u0438\u0437\u0430\u043d\u0435 \u043e\u0442 \u0440\u0435\u0436\u0438\u043c VR",reject:"\u041e\u0442\u0445\u0432\u044a\u0440\u043b\u0435\u0442\u0435","disable-measure":"Stop measuring",downloading:"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435","cardboard-v2":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Cardboard v2, \u043a\u043e\u0438\u0442\u043e \u0440\u0430\u0437\u043f\u043e\u043b\u0430\u0433\u0430\u0442 \u0441 \u0431\u0443\u0442\u043e\u043d, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u043e\u0433\u043b\u0435\u0434\u043d\u0435\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442\u0430 \u0438 \u0434\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0431\u0443\u0442\u043e\u043d\u0430, \u0437\u0430 \u0434\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0442\u043e \u043c\u0443.",
"enable-video-audio-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e?","storage-not-provided-launch-from-desktop":"\u041c\u043e\u043b\u044f, \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u0431\u0438\u043a\u043e\u043b\u043a\u0430\u0442\u0430 \u043e\u0442 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430, \u0437\u0430 \u0434\u0430 \u044f \u0438\u0437\u0442\u0435\u0433\u043b\u0438\u0442\u0435.",
downloaded:"\u0422\u043e\u0437\u0438 \u0442\u0443\u0440 \u0435 \u0438\u0437\u0442\u0435\u0433\u043b\u0435\u043d \u0437\u0430 \u0432\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043e\u0444\u043b\u0430\u0439\u043d.","samsung-internet-vr-app-info":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Gear VR, \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 \u0441 \u0442\u043e\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0441\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043b\u0438 Samsung Internet for VR, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0438 \u0437\u0430 \u043f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR. \u0422\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 Samsung Internet \u0431\u0440\u0430\u0443\u0437\u044a\u0440 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435.",
"samsung-internet-vr-info":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Gear VR, \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 \u0441 \u0442\u043e\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0441\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043b\u0438 Samsung Internet for VR, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0438 \u0437\u0430 \u043f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR. \u0421\u0435\u0433\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u043b\u043e\u0436\u0438\u0442\u0435 \u043c\u043e\u0431\u0438\u043b\u043d\u0438\u044f \u0441\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0432 \u043e\u0447\u0438\u043b\u0430\u0442\u0430 \u0437\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043d\u0430 \u0440\u0435\u0430\u043b\u043d\u043e\u0441\u0442.",
"enable-video-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0430 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0440\u0435\u0436\u0438\u043c\u044a\u0442 VR \u0441\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0438 \u0437\u0430 \u0442\u043e\u0437\u0438 \u0441\u0430\u0439\u0442.",
"\u0417\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043d\u043e \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043c\u043e\u043b\u044f, \u043a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438 \u0438 \u043f\u0440\u0438\u0435\u043c\u0435\u0442\u0435 \u0438\u0441\u043a\u0430\u043d\u0435\u0442\u043e \u0437\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435."],
"storage-not-provided-launch-from-homescreen":"\u041c\u043e\u043b\u044f, \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u0431\u0438\u043a\u043e\u043b\u043a\u0430\u0442\u0430 \u043e\u0442 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u043d\u0438\u044f \u0435\u043a\u0440\u0430\u043d, \u0437\u0430 \u0434\u0430 \u044f \u0438\u0437\u0442\u0435\u0433\u043b\u0438\u0442\u0435.","enter-fullscreen":"\u0412\u043b\u0435\u0437\u0442\u0435 \u0432 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d",
"use-cardboard-v2":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 Cardboard v2",unmute:"\u041f\u0443\u0441\u043a\u0430\u043d\u0435 \u0437\u0432\u0443\u043a","enter-vr":"\u0412\u043b\u0435\u0437 \u0432\u044a\u0432 VR \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435","enable-measure":"Start measuring","use-cardboard-info":"\u041c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u0430\u043a\u0432\u0438 \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 Google Cardboard \u043e\u0447\u0438\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR.",
"ar-mobile-info":"\u041c\u0435\u0434\u043b\u0435\u043d\u043e \u043f\u0440\u0435\u043c\u0435\u0441\u0442\u0432\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u0441\u0438, \u0437\u0430 \u0434\u0430 \u0441\u043a\u0430\u043d\u0438\u0440\u0430\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u0442\u043e \u0441\u0438.\n\u0429\u0435 \u0441\u0435 \u043f\u043e\u044f\u0432\u0438 \u043a\u0440\u044a\u0433, \u043a\u043e\u0433\u0430\u0442\u043e \u0431\u044a\u0434\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d \u043f\u043e\u0432\u044a\u0440\u0445\u043d\u043e\u0441\u0442\u0442\u0430.\n\u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u043d\u0430 \u0435\u043a\u0440\u0430\u043d\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u043e\u0431\u0435\u043a\u0442\u0430 \u0442\u0430\u043c.",
"use-default-cardboard":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435","enable-audio-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0430\u0443\u0434\u0438\u043e?"},"fi-fi":{mute:"Poista \u00e4\u00e4ni k\u00e4yt\u00f6st\u00e4","cardboard-v1":"Mik\u00e4li et ole varma, mit\u00e4 Cardboard-versiota k\u00e4yt\u00e4t, valitse oletusarvoinen hotspot-hallinta. T\u00e4m\u00e4n j\u00e4lkeen katsomalla hotspotia, toiminto k\u00e4ynnistyy.",
"download-tour":"Lataa t\u00e4m\u00e4 sis\u00e4lt\u00f6 offline-toistoa varten","change-to-drag-and-release":"Muuta ohjaustilaa vet\u00e4m\u00e4ll\u00e4 ja vapauttamalla",accept:"Hyv\u00e4ksy",download:"Lataa","storage-not-provided-bookmark":"Tallennus ep\u00e4onnistui. Kokeile lis\u00e4t\u00e4 t\u00e4m\u00e4 verkkosivu kirjanmerkkeihin ja suorita lataus uudelleen.","dont-display-again":"\u00c4l\u00e4 n\u00e4yt\u00e4 t\u00e4t\u00e4 ilmoitusta uudelleen","web-server-required":"T\u00e4t\u00e4 sis\u00e4lt\u00f6\u00e4 ei voi toistaa paikalliselta asemalta. Lataa sis\u00e4lt\u00f6 internet-palvelimelle ja yrit\u00e4 uudelleen.\nVoit my\u00f6s vet\u00e4\u00e4 htm-tiedoston (tai koko kansion) TourViewer-sovelluskuvakkeen p\u00e4\u00e4lle.",
cancel:"Sulje","change-to-click-and-move":"Muuta ohjaustilaa klikkaamalla ja siirt\u00e4m\u00e4ll\u00e4",yes:"Kyll\u00e4","delete-downloaded":"Poista","use-safari-for-vr":"Suosittelemme Safari-selainta t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa.","exit-fullscreen":"Sulje koko n\u00e4yt\u00f6n n\u00e4kym\u00e4",no:"Ei","download-failed":"Lataus ep\u00e4onnistui","giroscope-disabled-http":"K\u00e4yt\u00e4t t\u00e4t\u00e4 verkkosivua http:n kautta, joten laitteesi liiketunnistimet sek\u00e4 VR-tila on poistettu k\u00e4yt\u00f6st\u00e4. Ota ne k\u00e4ytt\u00f6\u00f6n siirtym\u00e4ll\u00e4 sivulle https:n kautta.",
"cookies-notice":"T\u00e4m\u00e4 verkkosivu k\u00e4ytt\u00e4\u00e4 ev\u00e4steit\u00e4 k\u00e4ytt\u00f6tilastojen ker\u00e4\u00e4miseen. Lis\u00e4tietoja <a>ev\u00e4stek\u00e4yt\u00e4nn\u00f6st\u00e4</a>.","use-cardboard":"K\u00e4yt\u00e4 Cardboardia","launch-default-browser":"K\u00e4ynnist\u00e4 oletusselaimessa","refresh-downloaded":"P\u00e4ivit\u00e4","rotate-device":"K\u00e4\u00e4nn\u00e4 laitettasi","exit-vr":"Poistu VR-tilasta",reject:"Hylk\u00e4\u00e4","disable-measure":"Lopeta mittaaminen",
downloading:"Ladataan","cardboard-v2":"Mik\u00e4li sinulla on Cardboard v2 -virtuaalilasit, joissa on painike, voit katsoa hotspotia ja aktivoida sen painamalla painiketta.","enable-video-audio-prompt":"Otetaanko \u00e4\u00e4ni ja video k\u00e4ytt\u00f6\u00f6n?","storage-not-provided-launch-from-desktop":"Uudelleenk\u00e4ynnist\u00e4 t\u00e4m\u00e4 sis\u00e4lt\u00f6 ty\u00f6p\u00f6yd\u00e4n kuvakkeesta aloittaaksesi lataamisen.",downloaded:"T\u00e4m\u00e4 sis\u00e4lt\u00f6 on ladattu offline-toistoa varten",
"samsung-internet-vr-app-info":"Mik\u00e4li sinulla on t\u00e4m\u00e4n laitteen kanssa yhteensopivat Gear VR -virtuaalilasit ja olet asentanut Samsung Internet for VR:n, voit k\u00e4ytt\u00e4\u00e4 virtuaalilaseja t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa. Sinun on lis\u00e4ksi m\u00e4\u00e4ritett\u00e4v\u00e4 Samsung Internet oletusselaimeksi.","samsung-internet-vr-info":"Mik\u00e4li sinulla on t\u00e4m\u00e4n laitteen kanssa yhteensopivat Gear VR -virtuaalilasit ja olet asentanut Samsung Internet for VR:n, voit k\u00e4ytt\u00e4\u00e4 virtuaalilaseja t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa. Aseta \u00e4lypuhelin virtuaalilaseihin aloittaaksesi.",
"enable-video-prompt":"Otetaanko video k\u00e4ytt\u00f6\u00f6n?","giroscope-disabled-safari-request-permission":["Laitteesi liiketunnistimen k\u00e4ytt\u00f6oikeus ja VR-tila on poistettu k\u00e4yt\u00f6st\u00e4 t\u00e4ll\u00e4 sivustolla.","N\u00e4hd\u00e4ksesi t\u00e4m\u00e4n verkkosivun oikein, valitse jatka ja hyv\u00e4ksy lupapyynt\u00f6 pyydett\u00e4ess\u00e4."],"storage-not-provided-launch-from-homescreen":"Uudelleenk\u00e4ynnist\u00e4 t\u00e4m\u00e4 sis\u00e4lt\u00f6 kotin\u00e4yt\u00f6n kuvakkeesta aloittaaksesi lataamisen",
"enter-fullscreen":"Avaa koko n\u00e4yt\u00f6n n\u00e4kym\u00e4","use-cardboard-v2":"K\u00e4yt\u00e4 Cardboard v2:sta",unmute:"Ota \u00e4\u00e4ni k\u00e4ytt\u00f6\u00f6n","enter-vr":"Siirry VR-tilaan","enable-measure":"Aloita mittaaminen","use-cardboard-info":"Voit k\u00e4ytt\u00e4\u00e4 mit\u00e4 tahansa yhteensopivia Google Cardboard -virtuaalilaseja katsellaksesi t\u00e4t\u00e4 sis\u00e4lt\u00f6\u00e4 VR-tilassa.","ar-mobile-info":"Liikuta laitteesi hitaasti avaruuteesi skannataksesi.\nYmpyr\u00e4 ilmestyy, kun pinta l\u00f6ytyy.\nPit\u00e4k\u00f6nt\u00e4n\u00e4 n\u00e4pp\u00e4in paikkaa objektia siell\u00e4.",
"use-default-cardboard":"K\u00e4yt\u00e4 oletuksena","enable-audio-prompt":"Otetaanko \u00e4\u00e4ni k\u00e4ytt\u00f6\u00f6n?"},"sk-sk":{mute:"St\u00ed\u0161i\u0165","cardboard-v1":"Ak ste si nie ist\u00ed, ktor\u00fa verziu Cardboardu pou\u017e\u00edvate, vyberte si predvolen\u00e9 ovl\u00e1danie hotspotu. Potom sa jednoducho pozriete na hotspot a po\u010dkajte, k\u00fdm sa akcia nespust\u00ed.","download-tour":"Stiahnu\u0165 prehliadku na hranie v offline re\u017eime","change-to-drag-and-release":"Zmeni\u0165 re\u017eim ovl\u00e1dania na Presun\u00fa\u0165 a Uvo\u013eni\u0165",
accept:"s\u00fahlasi\u0165",cancel:"Zru\u0161i\u0165","storage-not-provided-bookmark":"Trval\u00e9 \u00falo\u017eisko odmietnut\u00e9. Sk\u00faste si t\u00fato webov\u00fa str\u00e1nku ulo\u017ei\u0165 a na\u010d\u00edta\u0165 ju znova.","dont-display-again":"Tieto inform\u00e1cie u\u017e nezobrazova\u0165","web-server-required":"T\u00e1to virtu\u00e1lna prehliadka sa ned\u00e1 prehra\u0165 z lok\u00e1lneho disku. Nahrajte ju na internet a sk\u00faste to znova.\nAk chcete, potiahnite s\u00fabor htm (alebo cel\u00fd prie\u010dinok prehliadky) na ikonu aplik\u00e1cie TourViewer.",
download:"Stiahnu\u0165","change-to-click-and-move":"Zmeni\u0165 re\u017eim ovl\u00e1dania na Klikn\u00fa\u0165 a Presun\u00fa\u0165",yes:"\u00e1no","delete-downloaded":"Zmaza\u0165","use-safari-for-vr":"Odpor\u00fa\u010dame pou\u017e\u00edva\u0165 Safari prehliada\u010d pre t\u00fato prehliadku v re\u017eime VR","exit-fullscreen":"Ukon\u010di\u0165 cel\u00fa obrazovku",no:"nie","download-failed":"S\u0165ahovanie zlyhalo","giroscope-disabled-http":"Na t\u00fato webov\u00fa str\u00e1nku pristupujete cez http protokol, preto pr\u00edstup k pohybu a orient\u00e1cii v\u00e1\u0161ho zariadenia a re\u017eim VR s\u00fa deaktivovan\u00e9. Ak ich chcete povoli\u0165, nav\u0161t\u00edvte str\u00e1nku cez https.",
"cookies-notice":"T\u00e1to webov\u00e1 str\u00e1nka pou\u017e\u00edva s\u00fabory cookie na zhroma\u017e\u010fovanie \u0161tatist\u00edk pou\u017e\u00edvania. \u010eal\u0161ie inform\u00e1cie n\u00e1jdete v <a> pravidl\u00e1ch pou\u017e\u00edvania s\u00faborov cookie </a>.","use-cardboard":"Pou\u017eite Cardboard okuliare.","launch-default-browser":"Spusti\u0165 v predvolenom prehliada\u010di","refresh-downloaded":"Obnovi\u0165","rotate-device":"Oto\u010dte svoje zariadenie","exit-vr":"Ukon\u010denie VR",
reject:"Odmietnu\u0165","disable-measure":"Ukon\u010di\u0165 meranie",downloading:"S\u0165ahovanie","cardboard-v2":"Ak m\u00e1te n\u00e1hlavn\u00fa s\u00fapravu Cardboard v2, ktor\u00e1 je dod\u00e1van\u00e1 s tla\u010didlom, m\u00f4\u017eete sa pozrie\u0165 na hotspot a stla\u010den\u00edm tla\u010didla spusti\u0165 akciu.","enable-video-audio-prompt":"Povoli\u0165 video a zvuk?","storage-not-provided-launch-from-desktop":"Znovu na\u010d\u00edtajte prehliadku pomocou desktop ikony pre jej stiahnite.",
downloaded:"T\u00e1to prehliadka je stiahnut\u00e1 na hranie v offline re\u017eime.","samsung-internet-vr-app-info":"Ak m\u00e1te Gear VR sl\u00fachadl\u00e1\u00e1 kompatibiln\u00e9 s t\u00fdmto zariaden\u00edm a m\u00e1te nain\u0161talovan\u00fd program Samsung Internet pre VR, m\u00f4\u017eete ho tie\u017e pou\u017ei\u0165 na prezeranie tohto obsahu vo VR. Mus\u00edte si nastavi\u0165 Samsung Internet ako predvolen\u00fd prehliada\u010d.","samsung-internet-vr-info":"Ak m\u00e1te Gear VR sl\u00fachadl\u00e1 kompatibiln\u00e9 s t\u00fdmto zariaden\u00edm a m\u00e1te nain\u0161talovan\u00fd program Samsung Internet pre VR, m\u00f4\u017eete ho tie\u017e pou\u017ei\u0165 na prezeranie tohto obsahu vo VR. Sta\u010d\u00ed teraz vlo\u017ei\u0165 mobiln\u00fd telef\u00f3n do n\u00e1hlavnej s\u00fapravy.",
"enable-video-prompt":"Povoli\u0165 video?","giroscope-disabled-safari-request-permission":["Pre t\u00fato str\u00e1nku s\u00fa pr\u00edstup k pohybu a orient\u00e1cii v\u00e1\u0161ho zariadenia a re\u017eim VR deaktivovan\u00e9.","Aby ste korektne videli t\u00fato webov\u00fa str\u00e1nku, pros\u00edm kliknite pokra\u010dova\u0165 a akceptujte po\u017eadovan\u00e9 povolenie."],"storage-not-provided-launch-from-homescreen":"Znovu na\u010d\u00edtajte prehliadku pomocou ikony na ploche pre jej stiahnite.",
"enter-fullscreen":"Prejs\u0165 na cel\u00fa obrazovku","use-cardboard-v2":"Pou\u017eite Cardboard v2",unmute:"Zapn\u00fa\u0165 zvuk","enter-vr":"Vlo\u017ei\u0165 VR obsah","enable-measure":"Za\u010da\u0165 meranie","use-cardboard-info":"Na zobrazenie tohto obsahu vo VR m\u00f4\u017eete pou\u017ei\u0165 \u013eubovo\u013en\u00fa kompatibiln\u00fa n\u00e1hlavn\u00fa s\u00fapravu Google Cardboard.","ar-mobile-info":"Pomaly pohybujte svojim zariaden\u00edm, aby ste skanovali svoj priestor.\nKruh sa zobraz\u00ed, ke\u010f sa n\u00e1jde povrch.\nDotknite sa obrazovky, aby ste umiestnili objekt tam.",
"use-default-cardboard":"Pou\u017ei\u0165 predvolen\u00e9","enable-audio-prompt":"Povoli\u0165 zvuk?"},"uk-ua":{mute:"\u0412\u0438\u043c\u043a\u043d\u0443\u0442\u0438 \u0437\u0432\u0443\u043a","cardboard-v1":"\u042f\u043a\u0449\u043e \u0432\u0438 \u043d\u0435 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u044f\u043a\u0443 \u0432\u0435\u0440\u0441\u0456\u044e Cardboard \u0432\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u0435, \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c. \u041f\u043e\u0442\u0456\u043c \u0432\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0435\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0442\u0430 \u043f\u043e\u0447\u0435\u043a\u0430\u0439\u0442\u0435, \u0434\u043e\u043a\u0438 \u0434\u0456\u044f \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f.",
"download-tour":"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0442\u0435 \u0442\u0443\u0440 \u0434\u043b\u044f \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456","change-to-drag-and-release":"\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430 \u041f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0456 \u0432\u0456\u0434\u043f\u0443\u0441\u0442\u0456\u0442\u044c",
accept:"\u041f\u0440\u0438\u0439\u043c\u0456\u0442\u044c",cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438","storage-not-provided-bookmark":"\u041f\u043e\u0441\u0442\u0456\u0439\u043d\u0435 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u043d\u043d\u044f \u0437\u0430\u0431\u043e\u0440\u043e\u043d\u0435\u043d\u043e. \u0421\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u0446\u044e \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0442\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u0457\u0457.",
"dont-display-again":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u0443\u0439\u0442\u0435 \u0446\u044e \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e \u0437\u043d\u043e\u0432\u0443","web-server-required":"\u0426\u0435\u0439 \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u0442\u0443\u0440 \u043d\u0435 \u043c\u043e\u0436\u043d\u0430 \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0442\u0435 \u0439\u043e\u0433\u043e \u0432 \u0406\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0456 \u043f\u043e\u0432\u0442\u043e\u0440\u0456\u0442\u044c \u0441\u043f\u0440\u043e\u0431\u0443.\n\u042f\u043a\u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435, \u043f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0444\u0430\u0439\u043b htm (\u0430\u0431\u043e \u0432\u0441\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0443\u0440\u0443) \u043d\u0430 \u043f\u0456\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438 TourViewer.",
download:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438","change-to-click-and-move":"\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430 \u041a\u043b\u0430\u0446\u043d\u0456\u0442\u044c \u0456 \u043f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0456\u0442\u044c",yes:"\u0442\u0430\u043a","delete-downloaded":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438","use-safari-for-vr":"\u041c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0454\u043c\u043e Safari \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0442\u0443\u0440\u0443 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 VR",
"exit-fullscreen":"\u0412\u0438\u0439\u0442\u0438 \u0437 \u043f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0443",no:"\u043d\u0456","download-failed":"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438","giroscope-disabled-http":"\u0412\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0446\u0456\u0454\u0457 \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 http, \u0442\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0440\u0443\u0445\u0443 \u0442\u0430 \u043e\u0440\u0456\u0454\u043d\u0442\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u044e \u0442\u0430 \u0440\u0435\u0436\u0438\u043c VR \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e. \u0429\u043e\u0431 \u0443\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0457\u0445, \u043f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0434\u043e \u043d\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 https.",
"cookies-notice":"\u0426\u044f \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 \u0444\u0430\u0439\u043b\u0438 cookie \u0434\u043b\u044f \u0437\u0431\u043e\u0440\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f. \u0414\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e\u0457 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u0457 \u0432\u0456\u0434\u0432\u0456\u0434\u0430\u0439\u0442\u0435 <a> \u041f\u043e\u043b\u0456\u0442\u0438\u043a\u0443 \u0449\u043e\u0434\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0444\u0430\u0439\u043b\u0456\u0432 cookie</a>.",
"use-cardboard":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 Cardboard","launch-default-browser":"\u0417\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","refresh-downloaded":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438","rotate-device":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0456\u0442\u044c \u0441\u0432\u0456\u0439 \u043f\u0440\u0438\u0441\u0442\u0440\u0456\u0439",
"exit-vr":"\u0412\u0438\u0439\u0434\u0456\u0442\u044c \u0456\u0437 VR",reject:"\u0412\u0456\u0434\u0445\u0438\u043b\u0438\u0442\u0438","disable-measure":"\u041f\u0440\u0438\u043f\u0438\u043d\u0456\u0442\u044c \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f",downloading:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f","cardboard-v2":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Cardboard v2, \u044f\u043a\u0430 \u043f\u043e\u0441\u0442\u0430\u0447\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u043a\u043d\u043e\u043f\u043a\u043e\u044e, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0442\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0443\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0443, \u0449\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0457\u0457.",
"enable-video-audio-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0432\u0456\u0434\u0435\u043e \u0442\u0430 \u0430\u0443\u0434\u0456\u043e?","storage-not-provided-launch-from-desktop":"\u0429\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u043e\u0433\u043b\u044f\u0434 \u0456\u0437 \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0440\u043e\u0431\u043e\u0447\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0456.",
downloaded:"\u0426\u0435\u0439 \u0442\u0443\u0440 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043e \u0434\u043b\u044f \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456.","samsung-internet-vr-app-info":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Gear VR, \u0441\u0443\u043c\u0456\u0441\u043d\u0430 \u0437 \u0446\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u0454\u043c, \u0456 \u0432\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0457 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u0440\u043e\u0431\u0438\u0442\u0438 Samsung Internet \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c.",
"samsung-internet-vr-info":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Gear VR, \u0441\u0443\u043c\u0456\u0441\u043d\u0430 \u0437 \u0446\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u0454\u043c, \u0456 \u0432\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0457 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0456, \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0457 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR, \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0440\u0430\u0437 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043f\u0456\u0434\u2019\u0454\u0434\u043d\u0430\u0442\u0438 \u043c\u043e\u0431\u0456\u043b\u044c\u043d\u0438\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0434\u043e \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0438.",
"enable-video-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0432\u0456\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0440\u0443\u0445\u0443 \u0442\u0430 \u043e\u0440\u0456\u0454\u043d\u0442\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u044e, \u0430 \u0442\u0430\u043a\u043e\u0436 \u0440\u0435\u0436\u0438\u043c VR \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0443.",
"\u0429\u043e\u0431 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u043d\u0443\u0442\u0438 \u0446\u044e \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443, \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u00ab\u041f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438\u00bb \u0442\u0430 \u043f\u0440\u0438\u0439\u043c\u0456\u0442\u044c \u0437\u0430\u043f\u0438\u0442 \u043d\u0430 \u0434\u043e\u0437\u0432\u0456\u043b, \u044f\u043a\u0449\u043e \u0437\u2019\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0438\u0442."],
"storage-not-provided-launch-from-homescreen":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0442\u0443\u0440 \u0437\u0456 \u0437\u043d\u0430\u0447\u043a\u0430 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0435\u043a\u0440\u0430\u043d\u0430, \u0449\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438.","enter-fullscreen":"\u041f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0443 \u043f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c",
"use-cardboard-v2":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 Cardboard v2",unmute:"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0437\u0432\u0443\u043a","enter-vr":"\u041e\u0431\u0435\u0440\u0456\u0442\u044c \u0432\u043c\u0456\u0441\u0442 VR","enable-measure":"\u041f\u043e\u0447\u043d\u0456\u0442\u044c \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u0442\u0438","use-cardboard-info":"\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0431\u0443\u0434\u044c-\u044f\u043a\u0443 \u0441\u0443\u043c\u0456\u0441\u043d\u0443 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0443 Google Cardboard \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR.",
"ar-mobile-info":"\u041f\u043e\u0432\u0456\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0456\u0449\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0440\u0456\u0439, \u0449\u043e\u0431 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0443\u0432\u0430\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u0456\u0440.\n\u041a\u043e\u043b\u0438 \u0431\u0443\u0434\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u044e, \u0437\u2019\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043a\u0456\u043b\u044c\u0446\u0435.\n\u0422\u043e\u0440\u043a\u043d\u0456\u0442\u044c\u0441\u044f \u0435\u043a\u0440\u0430\u043d\u0430, \u0449\u043e\u0431 \u0440\u043e\u0437\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0442\u0430\u043c \u043e\u0431\u2019\u0454\u043a\u0442.",
"use-default-cardboard":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","enable-audio-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0430\u0443\u0434\u0456\u043e?"},"en-us":{mute:"Mute","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Change control mode to Drag and Release",accept:"Accept",cancel:"Cancel","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
download:"Download","change-to-click-and-move":"Change control mode to Click and Move",yes:"yes","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Exit fullscreen",no:"no","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"This web page uses cookies to collect usage statistics. For more information, please visit the <a>Cookie Policy</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Reject","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Enable video and audio?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Enable video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Enter fullscreen","use-cardboard-v2":"Use Cardboard v2",unmute:"Unmute","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Slowly move your device to scan your space.\nA ring will appear when a surface is found.\nTap the screen to place the object there.","use-default-cardboard":"Use Default","enable-audio-prompt":"Enable audio?"},"sv-se":{mute:"Inaktivera ljud","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u00c4ndra kontrolll\u00e4ge f\u00f6r att dra och sl\u00e4ppa",accept:"Acceptera",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"\u00c4ndra kontrolll\u00e4ge f\u00f6r att klicka och flytta",yes:"ja","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Avsluta fullsk\u00e4rmen",no:"Nej","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Denna webbsida anv\u00e4nder cookies f\u00f6r att samla in anv\u00e4ndningsstatistik. F\u00f6r mer information, bes\u00f6k <a>Cookie Policy</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Avvisa","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Aktivera ljud och video?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Aktivera video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Ange fullsk\u00e4rm","use-cardboard-v2":"Use Cardboard v2",unmute:"Aktivera ljud","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Flytta enheten sakta f\u00f6r att skanna rummet.\nEn ring kommer att visas n\u00e4r en yta hittas.\nTryck p\u00e5 sk\u00e4rmen f\u00f6r att placera objektet d\u00e4r.","use-default-cardboard":"Use Default","enable-audio-prompt":"Aktivera ljud?"},"id-id":{mute:"Mute","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Change control mode to Drag and Release",accept:"Menerima",cancel:"Cancel","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
download:"Download","change-to-click-and-move":"Change control mode to Click and Move",yes:"yes","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Exit fullscreen",no:"no","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Halaman web ini menggunakan cookie untuk mengumpulkan statistik penggunaan. Untuk informasi lebih lanjut, silakan kunjungi <a>Kebijakan Cookie</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Menolak","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Enable video and audio?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Enable video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Enter fullscreen","use-cardboard-v2":"Use Cardboard v2",unmute:"Unmute","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Gerakkan perangkat Anda perlahan untuk memindai ruang Anda.\nLingkaran akan muncul ketika permukaan ditemukan.\nSentuh layar untuk meletakkan objek di sana.","use-default-cardboard":"Use Default","enable-audio-prompt":"Enable audio?"},"pt-br":{mute:"Desativar som","cardboard-v1":"Se voc\u00ea n\u00e3o tiver certeza de qual vers\u00e3o do Cardboard est\u00e1 usando, selecione o controle de ponto de acesso padr\u00e3o. Voc\u00ea simplesmente olha para um ponto de acesso e espera at\u00e9 que a a\u00e7\u00e3o seja acionada.",
"download-tour":"Download do Tour para reprodu\u00e7\u00e3o offline","change-to-drag-and-release":"Alterar controle para arrastar e soltar",accept:"Aceitar",cancel:"Cancelar","storage-not-provided-bookmark":"Armazenamento persistente negado. Tente marcar esta p\u00e1gina da Web e recarreg\u00e1-la.","dont-display-again":"N\u00e3o exibir essas informa\u00e7\u00f5es novamente","web-server-required":"Este passeio virtual n\u00e3o pode ser reproduzido a partir de uma unidade local. Envie-o para a Internet e tente novamente.\nSe preferir, arraste o arquivo htm (ou toda a pasta do tour) para o \u00edcone do aplicativo TourViewer.",
download:"Download","change-to-click-and-move":"Alterar controle para clicar e mover",yes:"sim","delete-downloaded":"Apagar","use-safari-for-vr":"Recomendamos o Safari para ver este passeio no modo VR","exit-fullscreen":"Sair da tela cheia",no:"n\u00e3o","download-failed":"Falha no Download","giroscope-disabled-http":"Voc\u00ea est\u00e1 acessando esta p\u00e1gina da Web por meio do http, para que o acesso \u00e0 orienta\u00e7\u00e3o e movimento do dispositivo e o modo VR sejam desativados, acesse-o atrav\u00e9s de https para ativ\u00e1-los.",
"cookies-notice":"Esta p\u00e1gina da web usa cookies para coletar estat\u00edsticas de uso. Para obter mais informa\u00e7\u00f5es, visite a <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Iniciar no navegador padr\u00e3o","refresh-downloaded":"Atualizar","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR",reject:"Rejeitar","disable-measure":"Stop measuring",downloading:"Baixando","cardboard-v2":"Se voc\u00ea tiver um fone de ouvido Cardboard v2, que vem com um bot\u00e3o, poder\u00e1 observar um ponto de acesso e pressionar o bot\u00e3o para acionar sua a\u00e7\u00e3o.",
"enable-video-audio-prompt":"Ativar \u00e1udio e v\u00eddeo?","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Voc\u00ea precisa tornar o Samsung Internet o seu padr\u00e3o. browser.",
"samsung-internet-vr-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Basta colocar o celular no fone de ouvido agora.","enable-video-prompt":"Ativar v\u00eddeo?","giroscope-disabled-safari-request-permission":["O acesso a movimento e orienta\u00e7\u00e3o do dispositivo e o modo VR est\u00e3o desativados para este site.","Para ver corretamente esta p\u00e1gina da web, clique em continuar e aceite a solicita\u00e7\u00e3o de permiss\u00e3o, se solicitado."],
"storage-not-provided-launch-from-homescreen":"Reinicie o tour no \u00edcone da tela inicial para fazer o download.","enter-fullscreen":"Entrar em tela cheia","use-cardboard-v2":"Use Cardboard v2",unmute:"Ativar som","enter-vr":"Inserir conte\u00fado VR","enable-measure":"Start measuring","use-cardboard-info":"Voc\u00ea pode usar qualquer fone de ouvido compat\u00edvel do Google Cardboard para visualizar este conte\u00fado em VR","ar-mobile-info":"Mova lentamente o dispositivo para escanear o espa\u00e7o.\nUm anel aparecer\u00e1 quando uma superf\u00edcie for encontrada.\nToque na tela para colocar o objeto ali.",
"use-default-cardboard":"Use o padr\u00e3o","enable-audio-prompt":"Ativar \u00e1udio?"},"it-it":{mute:"Disattiva audio","cardboard-v1":"Se non sei sicuro della versione di Cardboard, seleziona il controllo hotspot predefinito. Baster\u00e0 guardare un hotspot e attendere che l'azione venga attivata.","download-tour":"Scarica il tour per la riproduzione offline","change-to-drag-and-release":"Cambia modalit\u00e0 di controllo in Trascina e Rilascia",accept:"Accetta",cancel:"Annulla","storage-not-provided-bookmark":"Archiviazione persistente negata. Prova ad aggiungere questa pagina ai segnalibri e ricaricala.",
"dont-display-again":"Non mostrare pi\u00f9 queste informazioni","web-server-required":"Questo tour virtuale non pu\u00f2 essere riprodotto da un'unit\u00e0 locale. Caricalo su internet e riprova.\nIn alternativa, trascina il file html (o l'intera cartella del tour) sull'icona dell'app TourViewer.",download:"Scarica","change-to-click-and-move":"Cambia modalit\u00e0 di controllo in Clicca e Sposta",yes:"s\u00ec","delete-downloaded":"Elimina","use-safari-for-vr":"Consigliamo l'uso di Safari per visualizzare questo tour in modalit\u00e0 VR",
"exit-fullscreen":"Esci da schermo intero",no:"no","download-failed":"Download fallito","giroscope-disabled-http":"Stai accedendo a questa pagina tramite http, quindi l'accesso al movimento, all'orientamento e alla modalit\u00e0 VR del dispositivo \u00e8 disabilitato. Accedi tramite https per abilitarli.","cookies-notice":"Questo sito web utilizza i cookie per raccogliere statistiche di utilizzo. Per ulteriori informazioni, visita la <a>Politica sui Cookie</a>.","use-cardboard":"Usa Cardboard","launch-default-browser":"Apri nel browser predefinito",
"refresh-downloaded":"Aggiorna","rotate-device":"Ruota il dispositivo","exit-vr":"Esci dalla VR",reject:"Rifiuta","disable-measure":"Interrompi misurazione",downloading:"Download in corso","cardboard-v2":"Se hai un visore Cardboard v2, con un pulsante, guarda l'hotspot e premi il pulsante per attivare l'azione.","enable-video-audio-prompt":"Abilitare video e audio?","storage-not-provided-launch-from-desktop":"Avvia il tour dall'icona sul desktop per scaricarlo.",downloaded:"Questo tour \u00e8 stato scaricato per la riproduzione offline.",
"samsung-internet-vr-app-info":"Se hai un visore Gear VR compatibile con questo dispositivo e hai installato Samsung Internet for VR, puoi usarlo per visualizzare questo contenuto in VR. \u00c8 necessario impostare Samsung Internet come browser predefinito.","samsung-internet-vr-info":"Se hai un visore Gear VR compatibile con questo dispositivo e hai installato Samsung Internet for VR, puoi usarlo per visualizzare questo contenuto in VR. Basta inserire il telefono nel visore ora.","enable-video-prompt":"Abilitare il video?",
"giroscope-disabled-safari-request-permission":["L'accesso al movimento e all'orientamento del dispositivo e la modalit\u00e0 VR sono disabilitati per questo sito.","Per visualizzare correttamente questa pagina, fai clic su continua e accetta la richiesta di autorizzazione se viene mostrata."],"storage-not-provided-launch-from-homescreen":"Avvia il tour dall'icona nella schermata iniziale per scaricarlo.","enter-fullscreen":"Vai a schermo intero","use-cardboard-v2":"Usa Cardboard v2",unmute:"Attiva audio",
"enter-vr":"Accedi ai contenuti VR","enable-measure":"Inizia misurazione","use-cardboard-info":"Puoi usare un visore compatibile con Google Cardboard per visualizzare questo contenuto in VR.","ar-mobile-info":"Muovi lentamente il dispositivo per scansionare lo spazio.\nUn anello apparir\u00e0 quando viene trovata una superficie.\nTocca lo schermo per posizionare l'oggetto l\u00ec.","use-default-cardboard":"Usa Predefinito","enable-audio-prompt":"Abilitare l'audio?"},"zh-tw":{mute:"\u975c\u97f3","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"\u4e0b\u8f09\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u96e2\u7dda\u64ad\u653e","change-to-drag-and-release":"\u5c07\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u70ba\u201c\u62d6\u653e\u6a21\u5f0f\u201c",accept:"\u63a5\u53d7",cancel:"\u53d6\u6d88","storage-not-provided-bookmark":"\u88dd\u7f6e\u5167\u6c38\u4e45\u5b58\u5132\u88ab\u62d2\u7d55\u3002\u8acb\u5617\u8a66\u5c07\u6b64\u7db2\u9801\u65b0\u589e\u70ba\u66f8\u7c64\uff0c\u4e26\u91cd\u65b0\u8f09\u5165\u3002","dont-display-again":"\u4e0d\u518d\u986f\u793a\u672c\u8a0a\u606f",
"web-server-required":"\u672c\u865b\u64ec\u5c0e\u89bd\u7121\u6cd5\u5728\u672c\u5730\u96fb\u8166\u4e0a\u64ad\u653e\u3002 \u8acb\u5c07\u5176\u4e0a\u50b3\u5230\u7db2\u969b\u7db2\u8def\u4f3a\u670d\u5668\uff0c\u7136\u5f8c\u91cd\u8a66\u3002\n\u5982\u679c\u9700\u8981\u672c\u5730\u9810\u89bd\uff0c\u8acb\u5c07htm\u6a94\u6848\uff08\u6216\u865b\u64ec\u5c0e\u89bd\u7684\u6574\u500b\u8cc7\u6599\u593e\uff09\u62d6\u653e\u5230TourViewer\u61c9\u7528\u7a0b\u793a\u7684\u5716\u793a\u4e0a\u3002",download:"\u4e0b\u8f09",
"change-to-click-and-move":"\u5c07\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u70ba\u201c\u9ede\u64ca\u4e26\u79fb\u52d5\u201d",yes:"\u662f","delete-downloaded":"\u522a\u9664","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u9000\u51fa\u5168\u87a2\u5e55",no:"\u5426","download-failed":"\u4e0b\u8f09\u5931\u6557","giroscope-disabled-http":"\u60a8\u6b63\u5728\u901a\u904ehttp(\u672a\u52a0\u5bc6)\u700f\u89bd\u672c\u7db2\u9801\uff0c\u56e0\u6b64\u8a2d\u5099\u7684\u904b\u52d5\u548c\u65b9\u5411\u53d6\u7528\u6b0a\u9650\uff0c\u4ee5\u53caVR\u6a21\u5f0f\u5747\u5df2\u7981\u7528\uff0c\u8acb\u53e6\u901a\u904ehttps(\u52a0\u5bc6)\u7db2\u5740\u5c0d\u5176\u9032\u884c\u555f\u7528\u3002",
"cookies-notice":"\u8a72\u7db2\u9801\u4f7f\u7528cookie\u4f86\u6536\u96c6\u4f7f\u7528\u60c5\u6cc1\u7d71\u8a08\u4fe1\u606f\u3002 \u6709\u95dc\u66f4\u591a\u4fe1\u606f\uff0c\u8acb\u8a2a\u554f<a> Cookie\u653f\u7b56</a>\u3002","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"\u91cd\u65b0\u6574\u7406","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u62d2\u7d55","disable-measure":"Stop measuring",downloading:"\u6b63\u5728\u4e0b\u8f09",
"cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u5141\u8a31\u5f71\u7247\u53ca\u8072\u97f3\u64ad\u653e?","storage-not-provided-launch-from-desktop":"\u8acb\u5f9e\u684c\u9762\u9ede\u64ca\u5716\u793a\uff0c\u91cd\u65b0\u555f\u52d5\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u4e0b\u8f09\u3002",downloaded:"\u865b\u64ec\u5c0e\u89bd\u5df2\u4e0b\u8f09\uff0c\u53ef\u9032\u884c\u96e2\u7dda\u64ad\u653e\u3002",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"\u5141\u8a31\u5f71\u7247\u64ad\u653e?",
"giroscope-disabled-safari-request-permission":["\u8a72\u7db2\u7ad9\u5df2\u7981\u7528\u60a8\u8a2d\u5099\u7684\u904b\u52d5\u548c\u65b9\u5411\u53d6\u7528\u6b0a\u9650\uff0cVR\u6a21\u5f0f\u4e5f\u88ab\u7981\u7528\u3002","\u8981\u6b63\u78ba\u67e5\u770b\u672c\u7db2\u9801\uff0c\u8acb\u55ae\u64ca\u7e7c\u7e8c\uff0c\u4e26\u5728\u51fa\u73fe\u63d0\u793a\u6642\u63a5\u53d7\u8a31\u53ef\u8acb\u6c42\u3002"],"storage-not-provided-launch-from-homescreen":"\u8acb\u4e3b\u9801\u9762\u87a2\u5e55\u9ede\u64ca\u5716\u793a\uff0c\u91cd\u65b0\u555f\u52d5\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u4e0b\u8f09\u3002",
"enter-fullscreen":"\u9032\u5165\u5168\u87a2\u5e55","use-cardboard-v2":"Use Cardboard v2",unmute:"\u53d6\u6d88\u975c\u97f3","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u7de9\u6162\u79fb\u52d5\u8a2d\u5099\uff0c\u4ee5\u6383\u63cf\u7a7a\u9593\u3002\n\u7576\u627e\u5230\u8868\u9762\u6642\uff0c\u6703\u51fa\u73fe\u4e00\u500b\u5713\u5708\u3002\n\u9ede\u64ca\u5c4f\u5e55\uff0c\u5c07\u7269\u9ad4\u653e\u5728\u90a3\u88e1\u3002",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u5141\u8a31\u8072\u97f3\u64ad\u653e?"},"nb-no":{mute:"Skru av lyd","cardboard-v1":"Hvis du ikke er sikker, hvilken Cardboard versjon du bruker, velger du standard hotspot-kontrollen. Du vil da bare se p\u00e5 et hotspot og vente til handlingen utl\u00f8ses.","download-tour":"Last ned visningen, s\u00e5 den kan bli sett uten internett","change-to-drag-and-release":"Endre kontrollmodus til Trekk og Slipp",accept:"Aksepterer",cancel:"Avbryt",
"storage-not-provided-bookmark":"Vedvarende lagring nektet. Pr\u00f8v \u00e5 bokmerke denne nettsiden og laste den inn p\u00e5 nytt.","dont-display-again":"Ikke vis denne informasjonen igjen","web-server-required":"Denne virtuelle visningen kan ikke spilles av lokalt. Vennligst last den opp til internett, og fors\u00f8k igjen.\ndersom du prefererer det, kan du dra htm filen (eller hele mappen som inneholder visningen) over 'TourViewer' appen.",download:"Last ned","change-to-click-and-move":"Endre kontrollmodus til Klikk og Flytt",
yes:"Ja","delete-downloaded":"Slett","use-safari-for-vr":"Vi anbefaler Safari for \u00e5 se p\u00e5 venne visningen i VR modus","exit-fullscreen":"G\u00e5 ut av full skjerm",no:"Nei","download-failed":"Nedlastning feilet","giroscope-disabled-http":"Du er koblet til denne nettsiden via http. Dermed er enhetens bevegelses- og orienteringstilgang og VR-modus deaktivert. Koble til via https for \u00e5 aktivere denne.","cookies-notice":"Denne websiden bruker informasjonskapsler for \u00e5 samle inn bruksstatistikk. For mer informasjon, bes\u00f8k <a>retningslinjer for informasjonskapsler</a>.",
"use-cardboard":"Bruk Cardboard","launch-default-browser":"\u00c5pne i standard nettleser","refresh-downloaded":"Last inn p\u00e5 nytt","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR",reject:"Avvis","disable-measure":"Stop measuring",downloading:"Laster ned","cardboard-v2":"Dersom du har Cardboard versjon 2, hvilket kommer med en knapp, kan du kikke p\u00e5 en klikkbar ting i visningen, og bruke knappen for \u00e5 bruke disse tingene, p\u00e5 samme m\u00e5te som p\u00e5 en laptop eller telefon.",
"enable-video-audio-prompt":"Aktivere video og lyd?","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.",downloaded:"Denne visningen er lastet ned, s\u00e5 den kan bli sett uten internett.","samsung-internet-vr-app-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten og har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du m\u00e5 ogs\u00e5 gj\u00f8re Samsung Internet til standard nettleser.",
"samsung-internet-vr-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten, og du har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du trenger bare \u00e5 sette mobiltelefonen p\u00e5 headsettet n\u00e5.","enable-video-prompt":"Aktivere video?","giroscope-disabled-safari-request-permission":["Din enhet sin bevegelses- og orienterings tilgang, samt VR modus er deaktivert for denne nettsiden.","For \u00e5 se denne siden korrekt, vennligst klikk p\u00e5 fortsett og godta tillatelsesforesp\u00f8rselen hvis du blir bedt om dette."],
"storage-not-provided-launch-from-homescreen":"Start turen p\u00e5 nytt fra startskjermikonet for \u00e5 laste ned.","enter-fullscreen":"G\u00e5 til full skjerm","use-cardboard-v2":"Bruk Cardboard Versjon 2",unmute:"Skru p\u00e5 lyd","enter-vr":"\u00c5pne VR Modus","enable-measure":"Start measuring","use-cardboard-info":"Du kan bruke hvilke some helst Google Cardboard kompatible headsett for \u00e5 se denne visningen i VR.","ar-mobile-info":"Flytt enheten din sakte for \u00e5 skanne rommet ditt.\nEn ring vil vises n\u00e5r en overflate blir funnet.\nTrykk p\u00e5 skjermen for \u00e5 plassere objektet der.",
"use-default-cardboard":"Bruk Standard","enable-audio-prompt":"Aktivere audio?"},"pt-pt":{mute:"Desativar som","cardboard-v1":"Se voc\u00ea n\u00e3o tiver certeza de qual vers\u00e3o do Cardboard est\u00e1 usando, selecione o controle de ponto de acesso padr\u00e3o. Voc\u00ea simplesmente olha para um ponto de acesso e espera at\u00e9 que a a\u00e7\u00e3o seja acionada.","download-tour":"Download do Tour para reprodu\u00e7\u00e3o offline","change-to-drag-and-release":"Alterar controle para arrastar e soltar",
accept:"Aceitar",cancel:"Cancelar","storage-not-provided-bookmark":"Armazenamento persistente negado. Tente marcar esta p\u00e1gina da Web e recarreg\u00e1-la.","dont-display-again":"N\u00e3o exibir essas informa\u00e7\u00f5es novamente","web-server-required":"Este passeio virtual n\u00e3o pode ser reproduzido a partir de uma unidade local. Envie-o para a Internet e tente novamente.\nSe preferir, arraste o arquivo htm (ou toda a pasta do tour) para o \u00edcone do aplicativo TourViewer.",download:"Download",
"change-to-click-and-move":"Alterar controle para clicar e mover",yes:"sim","delete-downloaded":"Apagar","use-safari-for-vr":"Recomendamos o Safari para ver este passeio no modo VR","exit-fullscreen":"Sair da tela cheia",no:"n\u00e3o","download-failed":"Falha no Download","giroscope-disabled-http":"Voc\u00ea est\u00e1 acessando esta p\u00e1gina da Web por meio do http, para que o acesso \u00e0 orienta\u00e7\u00e3o e movimento do dispositivo e o modo VR sejam desativados, acesse-o atrav\u00e9s de https para ativ\u00e1-los.",
"cookies-notice":"Esta p\u00e1gina da web usa cookies para coletar estat\u00edsticas de uso. Para obter mais informa\u00e7\u00f5es, visite a <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Iniciar no navegador padr\u00e3o","refresh-downloaded":"Atualizar","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR",reject:"Rejeitar","disable-measure":"Stop measuring",downloading:"Baixando","cardboard-v2":"Se voc\u00ea tiver um fone de ouvido Cardboard v2, que vem com um bot\u00e3o, poder\u00e1 observar um ponto de acesso e pressionar o bot\u00e3o para acionar sua a\u00e7\u00e3o.",
"enable-video-audio-prompt":"Ativar \u00e1udio e v\u00eddeo?","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Voc\u00ea precisa tornar o Samsung Internet o seu padr\u00e3o. browser.",
"samsung-internet-vr-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Basta colocar o celular no fone de ouvido agora.","enable-video-prompt":"Ativar v\u00eddeo?","giroscope-disabled-safari-request-permission":["O acesso a movimento e orienta\u00e7\u00e3o do dispositivo e o modo VR est\u00e3o desativados para este site.","Para ver corretamente esta p\u00e1gina da web, clique em continuar e aceite a solicita\u00e7\u00e3o de permiss\u00e3o, se solicitado."],
"storage-not-provided-launch-from-homescreen":"Reinicie o tour no \u00edcone da tela inicial para fazer o download.","enter-fullscreen":"Entrar em tela cheia","use-cardboard-v2":"Use Cardboard v2",unmute:"Ativar som","enter-vr":"Inserir conte\u00fado VR","enable-measure":"Start measuring","use-cardboard-info":"Voc\u00ea pode usar qualquer fone de ouvido compat\u00edvel do Google Cardboard para visualizar este conte\u00fado em VR","ar-mobile-info":"Mova lentamente o dispositivo para escanear o espa\u00e7o.\nUm anel aparecer\u00e1 quando uma superf\u00edcie for encontrada.\nToque na tela para colocar o objeto ali.",
"use-default-cardboard":"Use o padr\u00e3o","enable-audio-prompt":"Ativar \u00e1udio?"},"hr-hr":{mute:"nijem","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Promijenite na\u010din upravljanja u povla\u010denje i otpu\u0161tanje",accept:"Prihvatiti",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.",
"dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"Promijenite na\u010din upravljanja na Klik i Premjesti",yes:"Da","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Iza\u0111ite s punog zaslona",
no:"Ne","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Ova web stranica koristi kola\u010di\u0107e za prikupljanje statistike upotrebe. Za vi\u0161e informacija posjetite <a>Pravila o kola\u010di\u0107ima</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh",
"rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Odbiti","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Omogu\u0107iti videozapis i zvuk?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"Omogu\u0107ite videozapis?",
"giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Unesite cijeli zaslon","use-cardboard-v2":"Use Cardboard v2",unmute:"Uklju\u010di mikrofon","enter-vr":"Enter VR content","enable-measure":"Start measuring",
"use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Pomaknite ure\u0111aj sporo kako biste skenirali svoj prostor.\nKrug \u0107e se pojaviti kada se prona\u0111e povr\u0161ina.\nTapnite ekran kako biste postavili objekt tamo.","use-default-cardboard":"Use Default","enable-audio-prompt":"\u017delite li omogu\u0107iti zvuk?"},"ja-jp":{mute:"\u30df\u30e5\u30fc\u30c8","cardboard-v1":"\u4f7f\u7528\u3057\u3066\u3044\u308bCardboard\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u6b21\u306b\u3001\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u3092\u6ce8\u8996\u3057\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u3059\u308b\u307e\u3067\u5f85\u6a5f\u3057\u307e\u3059\u3002\uff08\u4e00\u90e8\u52d5\u4f5c\u3057\u306a\u3044\u30a2\u30af\u30b7\u30e7\u30f3\u6709\u308a\uff09",
"download-tour":"\u30aa\u30d5\u30e9\u30a4\u30f3\u518d\u751f\u7528\u30c4\u30a2\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b","change-to-drag-and-release":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30e2\u30fc\u30c9\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30ea\u30ea\u30fc\u30b9\u306b\u5909\u66f4",accept:"\u53d7\u3051\u5165\u308c\u308b",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb","storage-not-provided-bookmark":"\u6c38\u7d9a\u7684\u306a\u4fdd\u5b58\u304c\u62d2\u5426\u3055\u308c\u305f\u3002\u3053\u306eWeb\u30da\u30fc\u30b8\u3092\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3057\u3001\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044",
"dont-display-again":"\u4eca\u5f8c\u3053\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u306a\u3044","web-server-required":"\u3053\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30c4\u30a2\u30fc\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u30c9\u30e9\u30a4\u30d6\u304b\u3089\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3002\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u63a5\u7d9a\u3057\u3001\u3082\u3046\u4e00\u5ea6\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\n\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001htm\u30d5\u30a1\u30a4\u30eb\uff08\u307e\u305f\u306f\u30c4\u30a2\u30fc\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u5168\u4f53\uff09\u3092\u300eTourViewer\u300f\u30a2\u30d7\u30ea\u306e\u30a2\u30a4\u30b3\u30f3\u306b\u30c9\u30e9\u30c3\u30b0\u3057\u307e\u3059",
download:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","change-to-click-and-move":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30e2\u30fc\u30c9\u3092\u30af\u30ea\u30c3\u30af\uff06\u30e0\u30fc\u30d6\u306b\u5909\u66f4",yes:"\u306f\u3044","delete-downloaded":"\u524a\u9664","use-safari-for-vr":"\u3053\u306e\u30c4\u30a2\u30fc\u3092VR\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3059\u308b\u306b\u306f\u3001Safari\u30d6\u30e9\u30a6\u30b6\u306e\u5229\u7528\u3092\u304a\u52e7\u3081\u3057\u307e\u3059","exit-fullscreen":"\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u3092\u7d42\u4e86\u3059\u308b",
no:"\u3044\u3044\u3048","download-failed":"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5931\u6557\u3057\u307e\u3057\u305f","giroscope-disabled-http":"\u3053\u306eWeb\u30da\u30fc\u30b8\u306b\u300ehttp\u300f\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u3054\u5229\u7528\u7aef\u672b\u306e\u30e2\u30fc\u30b7\u30e7\u30f3\u3068\u753b\u9762\u306e\u5411\u304d\u3078\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305a\u3001VR\u30e2\u30fc\u30c9\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u300ehttps\u300f\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044",
"cookies-notice":"\u3053\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306fCookie\u3092\u4f7f\u7528\u3057\u3066\u4f7f\u7528\u7d71\u8a08\u3092\u53ce\u96c6\u3057\u307e\u3059\u3002 \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a>Cookie\u30dd\u30ea\u30b7\u30fc</a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002","use-cardboard":"Cardboard\u5229\u7528","launch-default-browser":"\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u8d77\u52d5","refresh-downloaded":"\u66f4\u65b0","rotate-device":"\u7aef\u672b\u3092\u56de\u8ee2\u3055\u305b\u3066\u304f\u3060\u3055\u3044",
"exit-vr":"VR\u30d3\u30e5\u30fc \u7d42\u4e86",reject:"\u62d2\u5426\u3059\u308b","disable-measure":"Stop measuring",downloading:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u4e2d","cardboard-v2":"\u30dc\u30bf\u30f3\u304c\u4ed8\u5c5e\u3057\u3066\u3044\u308bCardboard v2\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u3092\u304a\u6301\u3061\u306e\u5834\u5408\u306f\u3053\u3061\u3089\u3002","enable-video-audio-prompt":"\u30d3\u30c7\u30aa\u3068\u97f3\u58f0\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f","storage-not-provided-launch-from-desktop":"\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u30c4\u30a2\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044",
downloaded:"\u3053\u306e\u30c4\u30a2\u30fc\u306f\u3001\u30aa\u30d5\u30e9\u30a4\u30f3\u3067\u518d\u751f\u3059\u308b\u305f\u3081\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u3059\u308b","samsung-internet-vr-app-info":"\u3053\u306e\u7aef\u672b\u3068\u4e92\u63db\u6027\u306e\u3042\u308bVR\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u6a5f\u5668\u3092\u304a\u6301\u3061\u3067\u3001VR\u7528\u306e\u300eSamsung Internet\u300f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u3002VR\u30d3\u30e5\u30fc\u3067\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u300eSamsung Internet\u300f\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059",
"samsung-internet-vr-info":"\u3053\u306e\u7aef\u672b\u3068\u4e92\u63db\u6027\u306e\u3042\u308bVR\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u6a5f\u5668\u3092\u304a\u6301\u3061\u3067\u3001VR\u7528\u306e\u300eSamsung Internet\u300f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u3002VR\u30d3\u30e5\u30fc\u3067\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u3092\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u306b\u88c5\u7740\u3059\u308b\u3060\u3051\u3067\u3059",
"enable-video-prompt":"\u30d3\u30c7\u30aa\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f","giroscope-disabled-safari-request-permission":["\u3054\u5229\u7528\u7aef\u672b\u306e\u30e2\u30fc\u30b7\u30e7\u30f3\u3068\u753b\u9762\u306e\u5411\u304d\u3078\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305a\u3001VR\u30e2\u30fc\u30c9\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002","\u3053\u306eWeb\u30da\u30fc\u30b8\u3092\u6b63\u3057\u304f\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u300eOK\u300f\u3092\u30af\u30ea\u30c3\u30af\u3057\u300e\u8a31\u53ef\u300f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u5165\u308c\u3066\u304f\u3060\u3055\u3044"],
"storage-not-provided-launch-from-homescreen":"\u30db\u30fc\u30e0\u753b\u9762\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u30c4\u30a2\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044","enter-fullscreen":"\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u3067\u5165\u529b\u3059\u308b","use-cardboard-v2":"Cardboard v2\u5229\u7528",unmute:"\u30df\u30e5\u30fc\u30c8\u89e3\u9664","enter-vr":"VR\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5165\u529b","enable-measure":"Start measuring",
"use-cardboard-info":"\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092VR\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u4e92\u63db\u6027\u306e\u3042\u308b\u4efb\u610f\u306eGoogle Cardboard\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u3092\u5229\u7528\u3067\u304d\u307e\u3059","ar-mobile-info":"\u30b9\u30da\u30fc\u30b9\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u305f\u3081\u306b\u3001\u30c7\u30d0\u30a4\u30b9\u3092\u3086\u3063\u304f\u308a\u3068\u52d5\u304b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u8868\u9762\u304c\u898b\u3064\u304b\u308b\u3068\u3001\u5186\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\n\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u305d\u3053\u306b\u914d\u7f6e\u3059\u308b\u306b\u306f\u3001\u753b\u9762\u3092\u30bf\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002",
"use-default-cardboard":"\u30c7\u30d5\u30a9\u30eb\u30c8\u5229\u7528","enable-audio-prompt":"\u97f3\u58f0\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f"},"zh-cn":{mute:"\u9759\u97f3","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"\u4e0b\u8f7d\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u79bb\u7ebf\u64ad\u653e","change-to-drag-and-release":"\u5c06\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u4e3a\u201c\u62d6\u653e\u201d",
accept:"\u63a5\u53d7",cancel:"\u53d6\u6d88","storage-not-provided-bookmark":"\u88c5\u7f6e\u5185\u6c38\u4e45\u5b58\u50a8\u88ab\u62d2\u7edd\u3002\u5c1d\u8bd5\u5c06\u6b64\u7f51\u9875\u6dfb\u52a0\u4e3a\u4e66\u7b7e\uff0c \u5e76\u91cd\u65b0\u52a0\u8f7d\u3002","dont-display-again":"\u4e0d\u518d\u663e\u793a\u6b64\u4fe1\u606f","web-server-required":"\u6b64\u5168\u666f\u6f2b\u6e38\u65e0\u6cd5\u4ece\u672c\u5730\u9a71\u52a8\u5668\u4e0a\u64ad\u653e\u3002 \u8bf7\u5c06\u5176\u4e0a\u4f20\u5230\u4e92\u8054\u7f51\u670d\u52a1\u5668\uff0c\u7136\u540e\u91cd\u8bd5\u3002\n\u5982\u679c\u9700\u8981\u672c\u5730\u9884\u89c8\uff0c\u53ef\u4ee5\u5c06htm\u6587\u4ef6\uff08\u6216\u5168\u666f\u6f2b\u6e38\u7684\u6574\u4e2a\u6587\u4ef6\u5939\uff09\u62d6\u5230TourViewer\u5e94\u7528\u7a0b\u5e8f\u7684\u56fe\u6807\u4e0a\u3002",
download:"\u4e0b\u8f7d","change-to-click-and-move":"\u5c06\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u4e3a\u201c\u5355\u51fb\u5e76\u79fb\u52a8\u201d",yes:"\u662f","delete-downloaded":"\u5220\u9664","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u9000\u51fa\u5168\u5c4f",no:"\u5426","download-failed":"\u4e0b\u8f7d\u5931\u8d25","giroscope-disabled-http":"\u60a8\u6b63\u5728\u901a\u8fc7http(\u672a\u52a0\u5bc6)\u8bbf\u95ee\u6b64\u7f51\u9875\uff0c\u56e0\u6b64\u8bbe\u5907\u7684\u8fd0\u52a8\u548c\u65b9\u5411\u8bbf\u95ee\u6743\u9650\u4ee5\u53caVR\u6a21\u5f0f\u5747\u5df2\u7981\u7528\uff0c\u8bf7\u901a\u8fc7https(\u52a0\u5bc6)\u5bf9\u5176\u8fdb\u884c\u542f\u7528\u3002",
"cookies-notice":"\u8be5\u7f51\u9875\u4f7f\u7528cookie\u6765\u6536\u96c6\u4f7f\u7528\u60c5\u51b5\u7edf\u8ba1\u4fe1\u606f\u3002 \u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee<a>Cookie\u653f\u7b56</a>\u3002","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"\u5237\u65b0","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u62d2\u7edd","disable-measure":"Stop measuring",downloading:"\u6b63\u5728\u4e0b\u8f7d",
"cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u542f\u7528\u89c6\u9891\u548c\u97f3\u9891\uff1f","storage-not-provided-launch-from-desktop":"\u8bf7\u4ece\u684c\u9762\u70b9\u51fb\u56fe\u6807\uff0c\u91cd\u65b0\u542f\u52a8\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u4e0b\u8f7d\u3002",downloaded:"\u6b64\u5168\u666f\u6f2b\u6e38\u5df2\u4e0b\u8f7d\uff0c\u53ef\u8fdb\u884c\u79bb\u7ebf\u64ad\u653e\u3002",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"\u542f\u7528\u89c6\u9891\uff1f",
"giroscope-disabled-safari-request-permission":["\u8be5\u7ad9\u70b9\u5df2\u7981\u7528\u8bbe\u5907\u7684\u8fd0\u52a8\u548c\u65b9\u5411\u8bbf\u95ee\u6743\u9650\uff0cVR\u6a21\u5f0f\u4e5f\u88ab\u7981\u7528\u3002","\u8981\u6b63\u786e\u67e5\u770b\u6b64\u7f51\u9875\uff0c\u8bf7\u5355\u51fb\u7ee7\u7eed\uff0c\u5e76\u5728\u51fa\u73b0\u63d0\u793a\u65f6\u63a5\u53d7\u8bb8\u53ef\u8bf7\u6c42"],"storage-not-provided-launch-from-homescreen":"\u8bf7\u4ece\u4e3b\u5c4f\u5e55\u70b9\u51fb\u56fe\u6807\uff0c\u91cd\u65b0\u542f\u52a8\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u4e0b\u8f7d\u3002",
"enter-fullscreen":"\u8fdb\u5165\u5168\u5c4f","use-cardboard-v2":"Use Cardboard v2",unmute:"\u53d6\u6d88\u9759\u97f3","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u7f13\u6162\u79fb\u52a8\u8bbe\u5907\uff0c\u4ee5\u626b\u63cf\u7a7a\u95f4\u3002\n\u5f53\u627e\u5230\u8868\u9762\u65f6\uff0c\u4f1a\u51fa\u73b0\u4e00\u4e2a\u5706\u5708\u3002\n\u70b9\u51fb\u5c4f\u5e55\uff0c\u5c06\u5bf9\u8c61\u653e\u5728\u90a3\u91cc\u3002",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u542f\u7528\u97f3\u9891\uff1f"},"nl-nl":{mute:"Schakel audio uit","cardboard-v1":"Als u niet weet wat voor versie van Cardboard u gebruikt, selecteer dan de default hotspot control. Dan zult u moeten wachten op een hotspot tot er een bepaald actie is gestart.","download-tour":"Download Tour voor offline afspelen","change-to-drag-and-release":"Verander de besturingsmodus om te slepen en los te laten",accept:"Aanvaarden",download:"Download",
"storage-not-provided-bookmark":"Aanhoudende inhoud geweigerd. Probeer deze pagina als bookmark op te slaan en te verversen.","dont-display-again":"Niet meer laten zien","web-server-required":"Deze virtuele tour kan niet worden afgespeeld vanaf een lokale schijf. Upload dit alstublieft op het internet. Je kan ook de htm bestand slepen naar het icoon van de TourViewer app.",cancel:"Annuleren","change-to-click-and-move":"Verander de bedieningsmodus om te klikken en te verplaatsen",yes:"Ja","delete-downloaded":"Verwijderen",
"use-safari-for-vr":"We raden aan om in Safari deze tour te bekijken in VR mode","exit-fullscreen":"Volledig scherm verlaten",no:"Nee","download-failed":"Download mislukt","giroscope-disabled-http":"Jij betreedt deze pagina door http, dus uw toestel's motion en orientation access en VR modus zijn uitgeschakeld. Betreed deze pagina door https om ze weer aan te schakelen.","cookies-notice":"Deze webpagina maakt gebruik van cookies om gebruiksstatistieken te verzamelen. Raadpleeg het <a>Cookiebeleid</a> voor meer informatie.",
"use-cardboard":"Gebruik Cardboard","launch-default-browser":"Start op in standaard browser","refresh-downloaded":"Verversen","rotate-device":"Draai uw toestel om, alstublieft","exit-vr":"VR verlaten",reject:"Weigeren","disable-measure":"Stop meten",downloading:"Downloaden","cardboard-v2":"Als u een Cardboard v2 headset heeft, wat met een knop komt, kunt u wachten op een hotspot en een op een knop drukken om een actie te starten.","enable-video-audio-prompt":"Audio en video inschakelen?","storage-not-provided-launch-from-desktop":"Start de tour alstublieft opnieuw up vanaf het bureaublad om te kunnen downloaden.",
downloaded:"Deze tour is gedownload voor offline afspelen.","samsung-internet-vr-app-info":"Als u een Gear VR headset heeft dat werkt met dit toestel en u Samsung Internet voor VR heeft ge\u00efnstalleerd, kunt u dit ook bekijken in VR. U moet alleen Samsung Internet instellen als uw standaard browser.","samsung-internet-vr-info":"Als u een Gear VR headset heeft dat werkt met dit toestel en u Samsung Internet voor VR heeft ge\u00efnstalleerd, kunt u dit ook bekijken in VR, u moet alleen uw mobiele toestel op uw headset zetten.",
"enable-video-prompt":"Video inschakelen?","giroscope-disabled-safari-request-permission":["Uw toestel's motion en orientation access en VR modus zijn uitgeschakeld voor deze site..","Om deze pagina goed te kunnen zien, druk op doorgaan en geef toestemming als dat gevraagd wordt."],"storage-not-provided-launch-from-homescreen":"Start de tour alstublieft opnieuw up vanaf het homescherm om te kunnen downloaden.","enter-fullscreen":"Volledig scherm inschakelen","use-cardboard-v2":"Gebruik Cardboard v2",
unmute:"Schakel audio in","enter-vr":"Voer VR inhoud in","enable-measure":"Begin meten","use-cardboard-info":"U kunt elk werkend Google Cardboard headset gebruiken om dit te bekijken.","ar-mobile-info":"Verplaats uw apparaat langzaam om uw ruimte te scannen.\nEen ring verschijnt wanneer een oppervlak wordt gevonden.\nTik op het scherm om het object daar te plaatsen.","use-default-cardboard":"Standaard gebruiken","enable-audio-prompt":"Audio inschakelen?"},"hu-hu":{mute:"N\u00e9m\u00edt\u00e1s","cardboard-v1":"Ha nem vagy biztos benne, hogy milyen VR eszk\u00f6zt haszn\u00e1lsz, akkor v\u00e1laszd az alap\u00e9rtelmezettet \u00e9s az egyes hotspot-ok megtekint\u00e9s\u00e9hez csak tartsd ott a jel\u00f6l\u0151t.",
"download-tour":"T\u00fara let\u00f6lt\u00e9se offline megtekint\u00e9shez","change-to-drag-and-release":"Ir\u00e1ny\u00edt\u00e1s \u00e1t\u00e1ll\u00edt\u00e1sa: megfog \u00e9s mozgat m\u00f3dra",accept:"Elfogad",cancel:"M\u00e9gsem","storage-not-provided-bookmark":"Pr\u00f3b\u00e1lja meg az oldalt megjel\u00f6lni \u00e9s \u00fajrat\u00f6lteni!","dont-display-again":"Ne mutasd \u00fajra","web-server-required":"Ez a t\u00fara nem j\u00e1tszat\u00f3 le helyi futtat\u00e1ssal, k\u00e9rlek t\u00f6lsd fel az internetre \u00e9s pr\u00f3b\u00e1ld meg \u00fajra\nM\u00e1sik megold\u00e1s, ha a Tourviewer applik\u00e1ci\u00f3ra h\u00fazod a t\u00fara f\u00e1jlt, vagy az azt tartalmaz\u00f3 t\u00fara mapp\u00e1t.",
download:"Let\u00f6lt\u00e9s","change-to-click-and-move":"Ir\u00e1ny\u00edt\u00e1s \u00e1t\u00e1ll\u00edt\u00e1sa kattint \u00e9s k\u00f6rben\u00e9z m\u00f3dra",yes:"igen","delete-downloaded":"T\u00f6rl\u00e9s","use-safari-for-vr":"Azt javasoljuk, hogy haszn\u00e1lj Safari b\u00f6ng\u00e9sz\u0151t a VR n\u00e9zet megtekint\u00e9s\u00e9hez","exit-fullscreen":"Kil\u00e9p\u00e9s a teljesk\u00e9perny\u0151 m\u00f3db\u00f3l",no:"nem","download-failed":"Let\u00f6lt\u00e9s sikertelen","giroscope-disabled-http":"Az oldalt https el\u0151taggal sz\u00fcks\u00e9ges megnyitnod ahhoz, hogy a k\u00e9sz\u00fcl\u00e9ked mozg\u00e1s\u00e1t \u00e9rz\u00e9kelni tudja.",
"cookies-notice":"Ez a weboldal s\u00fctiket haszn\u00e1l a haszn\u00e1lati statisztik\u00e1k gy\u0171jt\u00e9s\u00e9hez. Tov\u00e1bbi inform\u00e1ci\u00f3\u00e9rt l\u00e1togasson el a <a>s\u00fctikre vonatkoz\u00f3 ir\u00e1nyelvekbe</a>.","use-cardboard":"Cardboard haszn\u00e1lata","launch-default-browser":"Futtat\u00e1s az alap\u00e9rtelmezett b\u00f6ng\u00e9sz\u0151ben","refresh-downloaded":"Friss\u00edt\u00e9s","rotate-device":"Forgasd el a telefont!","exit-vr":"Kil\u00e9p\u00e9s a VR m\u00f3db\u00f3l",
reject:"Elutas\u00edt","disable-measure":"Stop measuring",downloading:"Let\u00f6lt\u00e9s","cardboard-v2":"Ha Cardboard 2.0 t\u00edpus\u00fa eszk\u00f6zt haszn\u00e1lsz, akkor a kapcsol\u00f3kkal ir\u00e1ny\u00edthatod a t\u00far\u00e1t, kattinthatsz az egyes hotspotokra","enable-video-audio-prompt":"Hang \u00e9s vide\u00f3 enged\u00e9lyez\u00e9se","storage-not-provided-launch-from-desktop":"K\u00e9rlek ind\u00edtsd \u00fajra az oldalt az asztalon tal\u00e1lhat\u00f3 iconra kattintva.",downloaded:"Let\u00f6ltve offline megtekint\u00e9shez",
"samsung-internet-vr-app-info":"Ha Samsung Gear VR szem\u00fcveget szeretn\u00e9l haszn\u00e1lni, akkor nyisd meg a Samsung internetb\u00f6ng\u00e9sz\u0151ben a t\u00far\u00e1t.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"Vide\u00f3 enged\u00e9lyez\u00e9se","giroscope-disabled-safari-request-permission":["A megjelen\u00edt\u0151 eszk\u00f6z\u00f6d nem adott hozz\u00e1f\u00e9r\u00e9st a mozg\u00e1s \u00e9rz\u00e9kel\u00e9s\u00e9hez ezen az oldalon.",
"Ahhoz hogy megfelel\u0151en l\u00e1sd az oldalt k\u00e9rlek enged\u00e9lyezd a hozz\u00e1f\u00e9r\u00e9st."],"storage-not-provided-launch-from-homescreen":"Ind\u00edtsd \u00fajra a t\u00far\u00e1t a home ikonra kattintva.","enter-fullscreen":"Teljesk\u00e9perny\u0151","use-cardboard-v2":"Cardboard 2.0 haszn\u00e1lata",unmute:"N\u00e9m\u00edt\u00e1s kikapcsol\u00e1sa","enter-vr":"VR tartalom megtekint\u00e9se","enable-measure":"Start measuring","use-cardboard-info":"Haszn\u00e1lhatsz b\u00e1rmilyen google cardboard-ot ahhoz, hogy VR m\u00f3dban l\u00e1sd a t\u00far\u00e1t.",
"ar-mobile-info":"Mozgasson lassan a k\u00e9sz\u00fcl\u00e9k\u00e9t, hogy a teret skann\u00e1lja.\nEgy k\u00f6r jelenik meg, amikor egy fel\u00fcletet tal\u00e1l.\n\u00c9rintse meg a k\u00e9perny\u0151t, hogy oda helyezzen el egy objektumot.","use-default-cardboard":"Alap\u00e9rtelmezett haszn\u00e1lata","enable-audio-prompt":"Hang enged\u00e9lyez\u00e9se"},"ar-ar":{mute:"\u062a\u0639\u0637\u064a\u0644 \u0627\u0644\u0635\u0648\u062a","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639 \u0627\u0644\u062a\u062d\u0643\u0645 \u0644\u0644\u0633\u062d\u0628 \u0648\u0627\u0644\u0625\u0641\u0631\u0627\u062c",accept:"\u0642\u0628\u0648\u0644",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"\u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639 \u0627\u0644\u062a\u062d\u0643\u0645 \u0644\u0644\u0646\u0642\u0631 \u0648\u0627\u0644\u062a\u062d\u0631\u0643",yes:"\u0646\u0639\u0645 \u0641\u0639\u0644\u0627","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 \u0645\u0644\u0626 \u0644\u0644\u0634\u0627\u0634\u0629",
no:"\u0644\u0627","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"\u062a\u0633\u062a\u062e\u062f\u0645 \u0635\u0641\u062d\u0629 \u0627\u0644\u0648\u064a\u0628 \u0647\u0630\u0647 \u0645\u0644\u0641\u0627\u062a \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0627\u0631\u062a\u0628\u0627\u0637 \u0644\u062c\u0645\u0639 \u0625\u062d\u0635\u0627\u0626\u064a\u0627\u062a \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645. \u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u060c \u064a\u0631\u062c\u0649 \u0632\u064a\u0627\u0631\u0629 <a> \u0633\u064a\u0627\u0633\u0629 \u0645\u0644\u0641\u0627\u062a \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0627\u0631\u062a\u0628\u0627\u0637 </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u064a\u0631\u0641\u0636","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a \u0648\u0627\u0644\u0641\u064a\u062f\u064a\u0648\u061f",
"storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0641\u064a\u062f\u064a\u0648\u061f","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"\u0623\u062f\u062e\u0644 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
"use-cardboard-v2":"Use Cardboard v2",unmute:"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u062a\u0642\u0631\u064a\u0628\u0627\u064b \u062d\u0631\u0643 \u062c\u0647\u0627\u0632\u0643 \u0628\u0628\u0637\u0621 \u0644\u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0645\u0633\u0627\u062d\u0629.\n\u0633\u064a\u0638\u0647\u0631 \u062d\u0644\u0642\u0629 \u0639\u0646\u062f \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0633\u0637\u062d.\n\u0627\u0636\u063a\u0637 \u0639\u0644\u0649 \u0627\u0644\u0634\u0627\u0634\u0629 \u0644\u0648\u0636\u0639 \u0627\u0644\u0643\u0627\u0626\u0646 \u0647\u0646\u0627\u0643.",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a\u061f"},"ca-es":{mute:"Silenciar","cardboard-v1":"Si no esteu segurs de quina versi\u00f3 de cartr\u00f3 utilitzeu, seleccioneu el control de punt d'acc\u00e9s per defecte. Despr\u00e9s, simplement veureu un punt d'acc\u00e9s i espereu fins que s'activi l'acci\u00f3.","download-tour":"Descarregueu la visita virtual per a jugar fora de l\u00ednia","change-to-drag-and-release":"Canvieu el mode de control a Arrossegar i deixeu anar",
accept:"Accepta",cancel:"Cancel\u00b7lar","storage-not-provided-bookmark":"S'ha denegat l'emmagatzematge persistent. Proveu de marcar aquesta p\u00e0gina web i torneu-la a carregar.","dont-display-again":"No tornis a mostrar aquesta informaci\u00f3","web-server-required":"Aquesta visita virtual no es pot reproduir des d'una unitat local. Carregueu-lo a Internet i torneu-ho a provar.\nSi ho preferiu, arrossegueu el fitxer htm (o tota la carpeta de la visita virtual) a la icona de l'aplicaci\u00f3 TourViewer.",
download:"Descarregar","change-to-click-and-move":"Canvieu el mode de control a Fer clic i desplaceu",yes:"s\u00ed","delete-downloaded":"Suprimeix","use-safari-for-vr":"Recomanem Safari per a visualitzar aquesta visita virtual en mode VR","exit-fullscreen":"Surt de pantalla completa",no:"no","download-failed":"Error de desc\u00e0rrega","giroscope-disabled-http":"Accediu a aquesta p\u00e0gina web a trav\u00e9s de http de manera que el moviment i l\u2019orientaci\u00f3 del dispositiu i el mode VR estan desactivats, accediu-hi mitjan\u00e7ant https per habilitar-les.",
"cookies-notice":"Aquesta p\u00e0gina web utilitza cookies per recopilar estad\u00edstiques d\u2019\u00fas. Per obtenir m\u00e9s informaci\u00f3, visiteu la <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Utilitzeu Cardboard","launch-default-browser":"Inicieu el navegador per defecte","refresh-downloaded":"Actualitzaci\u00f3","rotate-device":"Gireu el dispositiu","exit-vr":"Surt de VR",reject:"Rebutjar","disable-measure":"Stop measuring",downloading:"Baixant","cardboard-v2":"Si teniu unes Cardboard v2, que venen amb un bot\u00f3, podeu mirar cap a un punt de vista i pr\u00e9mer el bot\u00f3 per activar-lo.",
"enable-video-audio-prompt":"Habilitar v\u00eddeo i \u00e0udio?","storage-not-provided-launch-from-desktop":"Torneu a iniciar la visita virtual des de la icona de l'escriptori per a descarregar-la.",downloaded:"Aquesta visita virtual es descarrega per a reproduir-la fora de l\u00ednia.","samsung-internet-vr-app-info":"Si teniu un auricular Gear VR compatible amb aquest dispositiu i heu instal\u00b7lat Samsung Internet per a VR, tamb\u00e9 podeu utilitzar-lo per visualitzar aquest contingut en VR, heu de fer que Samsung Internet sigui el vostre navegador predeterminat.",
"samsung-internet-vr-info":"Si teniu un auricular Gear VR compatible amb aquest dispositiu i heu instal\u00b7lat Samsung Internet per a VR, tamb\u00e9 podeu utilitzar-lo per visualitzar aquest contingut en VR, nom\u00e9s heu de posar el tel\u00e8fon m\u00f2bil als auriculars.","enable-video-prompt":"Activar v\u00eddeo?","giroscope-disabled-safari-request-permission":["Aquest lloc web est\u00e0 desactivat en el moviment i en la direcci\u00f3 o en mode VR del dispositiu.","Per veure correctament aquesta p\u00e0gina web, feu clic a Continuar i accepteu la sol\u00b7licitud de perm\u00eds si se us demana."],
"storage-not-provided-launch-from-homescreen":"Torneu a iniciar la visita virtual des de la icona de la pantalla inicial.","enter-fullscreen":"Entra a pantalla completa","use-cardboard-v2":"Utilitzeu Cardboard v2",unmute:"No activa","enter-vr":"Introdu\u00efu contingut de VR","enable-measure":"Start measuring","use-cardboard-info":"Podeu utilitzar qualsevol auricular de Google Cardboard compatible per a visualitzar aquest contingut en VR.","ar-mobile-info":"Mou lentament el dispositiu per a escanejar l'espai.\nUn anell apareixer\u00e0 quan es trobi una superf\u00edcie.\nToca la pantalla per a situar l'objecte all\u00e0.",
"use-default-cardboard":"\u00das per defecte","enable-audio-prompt":"Activar \u00e0udio?"},"ru-ru":{mute:"\u0411\u0435\u0437 \u0437\u0432\u0443\u043a\u0430","cardboard-v1":"\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u043a\u0430\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Cardboard \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u0438 \u0434\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.",
"download-tour":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0442\u0443\u0440  \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f","change-to-drag-and-release":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435",
accept:"\u041f\u0440\u0438\u043d\u044f\u0442\u044c",download:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c","storage-not-provided-bookmark":"\u0412 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0435.",
"dont-display-again":"\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e","web-server-required":"\u042d\u0442\u043e\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u0440 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437.\n\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 htm-\u0444\u0430\u0439\u043b (\u0438\u043b\u0438 \u0432\u0441\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0443\u0440\u0430) \u043d\u0430 \u0437\u043d\u0430\u0447\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f TourViewer.",
cancel:"\u041e\u0442\u043c\u0435\u043d\u0430","change-to-click-and-move":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u0436\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435",yes:"\u0434\u0430","delete-downloaded":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","use-safari-for-vr":"\u041c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c Safari \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 VR.",
"exit-fullscreen":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430",no:"\u043d\u0435\u0442","download-failed":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","giroscope-disabled-http":"\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u043e\u0439 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0447\u0435\u0440\u0435\u0437 http, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0440\u0435\u0436\u0438\u043c VR \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 https, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445.",
"cookies-notice":"\u042d\u0442\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b cookie \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441\u043c. <a>\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 cookie</a>.",
"use-cardboard":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cardboard","launch-default-browser":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c","rotate-device":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"exit-vr":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 VR",reject:"\u041e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u044c","disable-measure":"\u041f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f",downloading:"\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435","cardboard-v2":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Cardboard v2 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.",
"enable-video-audio-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e?","storage-not-provided-launch-from-desktop":"\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0443\u0440 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435..",
downloaded:"\u042d\u0442\u043e\u0442 \u0442\u0443\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f.","samsung-internet-vr-app-info":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Gear VR, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c Samsung Internet \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.",
"samsung-internet-vr-info":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Gear VR, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR, \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0434\u0435\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 \u0441\u0435\u0439\u0447\u0430\u0441.",
"enable-video-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0436\u0438\u043c VR \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430.",
"\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c\u00bb \u0438 \u043f\u0440\u0438\u043c\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e."],
"storage-not-provided-launch-from-homescreen":"\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0443\u0440 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435.","enter-fullscreen":"\u0412\u043e\u0439\u0442\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c",
"use-cardboard-v2":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cardboard v2",unmute:"\u0421\u043e \u0437\u0432\u0443\u043a\u043e\u043c","enter-vr":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c VR \u043a\u043e\u043d\u0442\u0435\u043d\u0442","enable-measure":"\u041d\u0430\u0447\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f","use-cardboard-info":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 Google Cardboard \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR.",
"ar-mobile-info":"\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.\n\u0411\u0443\u0434\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u043e\u043b\u044c\u0446\u043e, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c.\n\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043c.",
"use-default-cardboard":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","enable-audio-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0443\u0434\u0438\u043e?"},"nn-no":{mute:"Skru av lyd","cardboard-v1":"Hvis du ikke er sikker, hvilken Cardboard versjon du bruker, velger du standard hotspot-kontrollen. Du vil da bare se p\u00e5 et hotspot og vente til handlingen utl\u00f8ses.","download-tour":"Last ned visningen, s\u00e5 den kan bli sett uten internett",
"change-to-drag-and-release":"Endre kontrollmodus til Trekk og Slipp",accept:"Aksepterer",cancel:"Avbryt","storage-not-provided-bookmark":"Vedvarende lagring nektet. Pr\u00f8v \u00e5 bokmerke denne nettsiden og laste den inn p\u00e5 nytt.","dont-display-again":"Ikke vis denne informasjonen igjen","web-server-required":"Denne virtuelle visningen kan ikke spilles av lokalt. Vennligst last den opp til internett, og fors\u00f8k igjen.\ndersom du prefererer det, kan du dra htm filen (eller hele mappen som inneholder visningen) over 'TourViewer' appen.",
download:"Last ned","change-to-click-and-move":"Endre kontrollmodus til Klikk og Flytt",yes:"Ja","delete-downloaded":"Slett","use-safari-for-vr":"Vi anbefaler Safari for \u00e5 se p\u00e5 venne visningen i VR modus","exit-fullscreen":"G\u00e5 ut av full skjerm",no:"Nei","download-failed":"Nedlastning feilet","giroscope-disabled-http":"Du er koblet til denne nettsiden via http. Dermed er enhetens bevegelses- og orienteringstilgang og VR-modus deaktivert. Koble til via https for \u00e5 aktivere denne.",
"cookies-notice":"Denne websiden bruker informasjonskapsler for \u00e5 samle inn bruksstatistikk. For mer informasjon, bes\u00f8k <a>retningslinjer for informasjonskapsler</a>.","use-cardboard":"Bruk Cardboard","launch-default-browser":"\u00c5pne i standard nettleser","refresh-downloaded":"Last inn p\u00e5 nytt","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR",reject:"Avvis","disable-measure":"Stop measuring",downloading:"Laster ned","cardboard-v2":"Dersom du har Cardboard versjon 2, hvilket kommer med en knapp, kan du kikke p\u00e5 en klikkbar ting i visningen, og bruke knappen for \u00e5 bruke disse tingene, p\u00e5 samme m\u00e5te som p\u00e5 en laptop eller telefon.",
"enable-video-audio-prompt":"Aktivere video og lyd?","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.",downloaded:"Denne visningen er lastet ned, s\u00e5 den kan bli sett uten internett.","samsung-internet-vr-app-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten og har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du m\u00e5 ogs\u00e5 gj\u00f8re Samsung Internet til standard nettleser.",
"samsung-internet-vr-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten, og du har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du trenger bare \u00e5 sette mobiltelefonen p\u00e5 headsettet n\u00e5.","enable-video-prompt":"Aktivere video?","giroscope-disabled-safari-request-permission":["Din enhet sin bevegelses- og orienterings tilgang, samt VR modus er deaktivert for denne nettsiden.","For \u00e5 se denne siden korrekt, vennligst klikk p\u00e5 fortsett og godta tillatelsesforesp\u00f8rselen hvis du blir bedt om dette."],
"storage-not-provided-launch-from-homescreen":"Start turen p\u00e5 nytt fra startskjermikonet for \u00e5 laste ned.","enter-fullscreen":"G\u00e5 til full skjerm","use-cardboard-v2":"Bruk Cardboard Versjon 2",unmute:"Skru p\u00e5 lyd","enter-vr":"\u00c5pne VR Modus","enable-measure":"Start measuring","use-cardboard-info":"Du kan bruke hvilke some helst Google Cardboard kompatible headsett for \u00e5 se denne visningen i VR.","ar-mobile-info":"Flytt enheten din sakte for \u00e5 skanne rommet ditt.\nEn ring vil vises n\u00e5r en overflate blir funnet.\nTrykk p\u00e5 skjermen for \u00e5 plassere objektet der.",
"use-default-cardboard":"Bruk Standard","enable-audio-prompt":"Aktivere audio?"},"es-es":{mute:"Silenciar","cardboard-v1":"Si no esta seguro de que versi\u00f3n de Cardboard debe usar escoja la selecci\u00f3n de hotspot por defecto. Solo tendr\u00e1 que apuntar al hotspot y esperar para que se ejecute la acci\u00f3n.","download-tour":"Descargar el tour para reproducirlo sin conexi\u00f3n","change-to-drag-and-release":"Cambiar el modo de control a arrastrar y soltar",accept:"Aceptar","use-cardboard-v2":"Usar Cardboard v2",
"storage-not-provided-bookmark":"Almacenamiento persistente denagado. Intente a\u00f1adir la p\u00e1gina a los marcadores y recargarla.","dont-display-again":"No volver a mostrar esta informaci\u00f3n","web-server-required":"Este tour virtual no puede reproducirse desde una unidad local. Por favor s\u00fabalo a internet y pruebe de nuevo.\nSi lo prefiere puede arrastrar el archivo html o la carpeta con el tour sobre el icono de la aplicaci\u00f3n Tour Viewer de su escritorio.",download:"Descargar",
"change-to-click-and-move":"Cambiar el modo de control a pulsar y mover",yes:"s\u00ed","delete-downloaded":"Borrar","use-safari-for-vr":"Recomendamos Safari para ver este tour en modo VR","exit-fullscreen":"Salir de pantalla completa",no:"no","download-failed":"La descarga ha fallado","giroscope-disabled-http":"Est\u00e1 accediendo a esta p\u00e1gina web por http por lo que el acceso al movimiento y la orientaci\u00f3n del dispositivo est\u00e1 deshabilitado, por favor acceda por https.","cookies-notice":"Esta p\u00e1gina usa cookies para recolectar estad\u00edsticas de uso. Para m\u00e1s informaci\u00f3n, visite la <a>Pol\u00edtica de Cookies</a>.",
"use-cardboard":"Usar Cardboard","launch-default-browser":"Lanzar en el navegador por defecto","refresh-downloaded":"Actualizar","rotate-device":"Por favor, gire el dispositivo","exit-vr":"Salir de VR","storage-not-provided-launch-from-desktop":"Por favor lance el tour desde el escritorio para descargarlo.","disable-measure":"Stop measuring",cancel:"Cancel",downloading:"Descargando","cardboard-v2":"Si tiene unas gafas Cardboard v2, que vienen con un bot\u00f3n, puede apuntar al hotspot y pulsar el bot\u00f3n para que se ejecute su acci\u00f3n.",
"enable-video-audio-prompt":"\u00bfActivar v\u00eddeo y audio?",reject:"Rechazar",downloaded:"Este tour esta descargado para reproducirlo sin conexi\u00f3n.","samsung-internet-vr-app-info":"Si tiene unas gafas Gear VR compatibles con este dispositivo y tiene instalado Samsung Internet for VR puede usarlo para ver este contenido en VR, necesita hacer Samsung Internet su navegador por defecto.","samsung-internet-vr-info":"Si tiene unas gafas Gear VR compatibles con este dispositivo y tiene instalado Samsung Internet for VR puede usarlo para ver este contenido en VR, solo tiene que poner ahora el dispositivo en las gafas.",
"enable-video-prompt":"\u00bfActivar v\u00eddeo?","giroscope-disabled-safari-request-permission":["El acceso al movimiento y la orientaci\u00f3n del dispositivo est\u00e1 deshabiltado para este sitio.","Para ver correctamente la p\u00e1gina por favor pulse Continuar y acepte la petici\u00f3n de permiso si se muestra."],"storage-not-provided-launch-from-homescreen":"Por favor lance el tour desde el icono de la pantalla de inicio para descargarlo.","enter-fullscreen":"Mostrar en pantalla completa",
unmute:"Habilitar sonido","enter-vr":"Entrar al contenido VR","enable-measure":"Start measuring","use-cardboard-info":"Puede usar unas gafas compatibles con Google Cardboard para ver este contenido en VR.","ar-mobile-info":"Mueve lentamente el dispositivo para escanear el espacio.\nAparecer\u00e1 un anillo cuando se encuentre una superficie.\nToca la pantalla para colocar el objeto all\u00ed.","use-default-cardboard":"Usar versi\u00f3n por defecto","enable-audio-prompt":"\u00bfActivar audio?"},"el-gr":{mute:"\u0391\u03c0\u03b5\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03bf\u03bd \u03ae\u03c7\u03bf",
"cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c3\u03cd\u03c1\u03b5\u03c4\u03b5 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b1\u03c0\u03b5\u03bb\u03b5\u03c5\u03b8\u03b5\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5",
accept:"\u0391\u03c0\u03bf\u03b4\u03ad\u03c7\u03bf\u03bc\u03b1\u03b9",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03ba\u03bb\u03b9\u03ba \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03bc\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03b7\u03b8\u03b5\u03af\u03c4\u03b5",
yes:"\u039d\u03b1\u03af","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u0388\u03be\u03bf\u03b4\u03bf\u03c2 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03c0\u03bb\u03ae\u03c1\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7",no:"\u03cc\u03c7\u03b9","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.",
"cookies-notice":"\u0391\u03c5\u03c4\u03ae \u03b7 \u03b9\u03c3\u03c4\u03bf\u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af cookie \u03b3\u03b9\u03b1 \u03c4\u03b7 \u03c3\u03c5\u03bb\u03bb\u03bf\u03b3\u03ae \u03c3\u03c4\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ce\u03bd \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03c9\u03bd \u03c7\u03c1\u03ae\u03c3\u03b7\u03c2. \u0393\u03b9\u03b1 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2, \u03b5\u03c0\u03b9\u03c3\u03ba\u03b5\u03c6\u03b8\u03b5\u03af\u03c4\u03b5 \u03c4\u03b7\u03bd <a> \u03a0\u03bf\u03bb\u03b9\u03c4\u03b9\u03ba\u03ae cookie </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u0391\u03c0\u03bf\u03c1\u03c1\u03af\u03c0\u03c4\u03c9","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5 \u03ba\u03b1\u03b9 \u03b2\u03af\u03bd\u03c4\u03b5\u03bf;",
"storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03b2\u03af\u03bd\u03c4\u03b5\u03bf;","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"\u0395\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03ae\u03c1\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7",
"use-cardboard-v2":"Use Cardboard v2",unmute:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"\u039c\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b7 \u03c3\u03c5\u03c3\u03ba\u03b5\u03c5\u03ae \u03c3\u03b1\u03c2 \u03b1\u03c1\u03b3\u03ac \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c3\u03b1\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf \u03c7\u03ce\u03c1\u03bf \u03c3\u03b1\u03c2.\n\u0398\u03b1 \u03b5\u03bc\u03c6\u03b1\u03bd\u03b9\u03c3\u03c4\u03b5\u03af \u03ad\u03bd\u03b1\u03c2 \u03b4\u03b1\u03ba\u03c4\u03cd\u03bb\u03b9\u03bf\u03c2 \u03cc\u03c4\u03b1\u03bd \u03b5\u03bd\u03c4\u03bf\u03c0\u03b9\u03c3\u03c4\u03b5\u03af \u03bc\u03b9\u03b1 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1.\n\u039a\u03ac\u03bd\u03c4\u03b5 \u03ba\u03bb\u03b9\u03ba \u03c3\u03c4\u03b7\u03bd \u03bf\u03b8\u03cc\u03bd\u03b7 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c4\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf \u03b1\u03bd\u03c4\u03b9\u03ba\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03b5\u03ba\u03b5\u03af.",
"use-default-cardboard":"Use Default","enable-audio-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5;"},"da-dk":{mute:"Deaktiver lyd","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Skift kontroltilstand for at tr\u00e6kke og slippe",
accept:"Acceptere",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"Skift kontroltilstand for at klikke og flytte",
yes:"Ja","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Afslut fuldsk\u00e6rm",no:"ingen","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Denne webside bruger cookies til at indsamle brugsstatistikker. For mere information, se venligst <a> Cookiepolitik </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Afvise","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Aktiv\u00e9r lyd og video?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Aktiv\u00e9r video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Indtast fuldsk\u00e6rm","use-cardboard-v2":"Use Cardboard v2",unmute:"Aktiv\u00e9r lyd","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Flyt dit enhed langsomt for at skanne dit rum.\nEn ring vil vises, n\u00e5r en overflade findes.\nTryk p\u00e5 sk\u00e6rmen for at placere objektet der.","use-default-cardboard":"Use Default","enable-audio-prompt":"Aktiv\u00e9r lyd?"},"pl-pl":{mute:"Wycisz","cardboard-v1":"Je\u015bli nie masz pewno\u015bci, kt\u00f3rej wersji Cardboard u\u017cywasz, wybierz domy\u015blne sterowanie hotspotem. Nast\u0119pnie skieruj wzrok na hotspot i poczekaj na uruchomienie ich dzia\u0142ania.",
"download-tour":"Pobierz spacer do odtwarzania w trybie offline","change-to-drag-and-release":"Zmie\u0144 tryb na Przeci\u0105gnij i Upu\u015b\u0107",accept:"Zaakceptowa\u0107",cancel:"Anuluj","storage-not-provided-bookmark":"Odmowa zapisu w pami\u0119ci sta\u0142ej. Spr\u00f3buj doda\u0107 stron\u0119 do zak\u0142adek i za\u0142aduj j\u0105 ponownie.","dont-display-again":"Nie wy\u015bwietlaj tego ponownie","web-server-required":"Nie mo\u017cna odtworzy\u0107 tego spaceru z dysku lokalnego. Prze\u015blij go do internetu i spr\u00f3buj ponownie.\nMo\u017cesz te\u017c przeci\u0105gn\u0105\u0107 plik htm (lub ca\u0142y folder spaceru) na ikon\u0119 aplikacji TourViewer.",
download:"Pobierz","change-to-click-and-move":"Zmie\u0144 tryb na to Kliknij i Przenie\u015b",yes:"tak","delete-downloaded":"Usu\u0144","use-safari-for-vr":"Zalecamy Safari, jako przegl\u0105dark\u0119 spacer\u00f3w w trybie VR","exit-fullscreen":"Wyjd\u017a z trybu pe\u0142nego ekranu",no:"nie","download-failed":"Pobieranie nie powiod\u0142o si\u0119","giroscope-disabled-http":"To jest dost\u0119p za po\u015brednictwem protoko\u0142u http, wi\u0119c dost\u0119p do ruchu i orientacji oraz tryb VR s\u0105 wy\u0142\u0105czone. Prze\u0142\u0105cz si\u0119\u00a0na protok\u00f3\u0142 https, aby je w\u0142\u0105czy\u0107.",
"cookies-notice":"Ta strona u\u017cywa plik\u00f3w cookie do zbierania statystyk u\u017cytkowania. Aby uzyska\u0107 wi\u0119cej informacji, odwied\u017a <a>Zasady dotycz\u0105ce plik\u00f3w cookie</a>.","use-cardboard":"U\u017cyj Cardboard","launch-default-browser":"Uruchom w domy\u015blnej przegl\u0105darce","refresh-downloaded":"Od\u015bwie\u017c","rotate-device":"Obr\u00f3\u0107 urz\u0105dzenie","exit-vr":"Wyjd\u017a z VR",reject:"Odrzuca\u0107","disable-measure":"Stop measuring",downloading:"Pobieranie",
"cardboard-v2":"Je\u015bli masz okulary Cardboard v2, kt\u00f3re maj\u0105 przycisk, mo\u017cesz spojrze\u0107 na hotspot i nacisn\u0105\u0107 przycisk, aby uruchomi\u0107 ich dzia\u0142anie.","enable-video-audio-prompt":"W\u0142\u0105czy\u0107 video i d\u017awi\u0119k?","storage-not-provided-launch-from-desktop":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 pulpitu.",downloaded:"Spacer jest pobierany do odtwarzania w trybie offline.","samsung-internet-vr-app-info":"Je\u015bli masz okulary zgodne z Gear VR i zainstalowa\u0142e\u015b Samsung Internet for VR, mo\u017cesz je u\u017cy\u0107 do przegl\u0105dania zawarto\u015bci w VR. Musisz w tym przypadku ustawi\u0107 Samsung Internet jako domy\u015bln\u0105 przegl\u0105dark\u0119.",
"samsung-internet-vr-info":"Je\u015bli masz okulary Gear VR i zainstalowa\u0142e\u015b Samsung Internet for VR, to mo\u017cesz u\u017cy\u0107 ich do przegl\u0105dania zawarto\u015bci w VR. Umie\u015b\u0107 teraz telefon w okularach Gear VR.","enable-video-prompt":"W\u0142\u0105czy\u0107 video?","giroscope-disabled-safari-request-permission":["Dost\u0119p do funkcji ruchu i orientacji oraz tryb VR s\u0105 wy\u0142\u0105czone dla tej strony.","Aby poprawnie wy\u015bwietli\u0107 stron\u0119, kliknij kontynuuj i zaakceptuj wszystkie zgody."],
"storage-not-provided-launch-from-homescreen":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 strony g\u0142\u00f3wnej.","enter-fullscreen":"Uruchom pe\u0142ny ekran","use-cardboard-v2":"U\u017cyj Cardboard v2",unmute:"Wy\u0142\u0105cz Wycisz","enter-vr":"Wejd\u017a do VR","enable-measure":"Start measuring","use-cardboard-info":"Do wy\u015bwietlania w VR mo\u017cesz u\u017cy\u0107 oklular\u00f3w zgodnych z Google Cardboard.","ar-mobile-info":"Poruszaj urz\u0105dzeniem powoli, aby zeskanowa\u0107 sw\u00f3j obszar.\nPojawi si\u0119 okr\u0105g, gdy zostanie znaleziona powierzchnia.\nDotknij ekranu, aby umie\u015bci\u0107 obiekt tam.",
"use-default-cardboard":"U\u017cyj Domy\u015blnych","enable-audio-prompt":"W\u0142\u0105czy\u0107 d\u017awi\u0119k?"},"fr-fr":{mute:"Couper le son","cardboard-v1":"Si vous n'\u00eates pas s\u00fbr de la version de votre Cardboard, s\u00e9lectionnez le contr\u00f4le de hotspot par d\u00e9faut. Ensuite, vous n'aurez qu'\u00e0 fixer un hotspot du regard et attendre que l'action se d\u00e9clenche.","download-tour":"T\u00e9l\u00e9charger la visite pour jouer hors ligne","change-to-drag-and-release":"Changer le mode de contr\u00f4le en glisser-d\u00e9poser",
accept:"Accepter",cancel:"Annuler","storage-not-provided-bookmark":"Stockage persistant refus\u00e9. Essayez de mettre cette page Web en signet et de la recharger.","dont-display-again":"Ne plus afficher ces informations","web-server-required":"Cette visite virtuelle ne peut pas \u00eatre lue \u00e0 partir d'un lecteur local. Veuillez la t\u00e9l\u00e9charger sur Internet et r\u00e9essayer.\nSi vous pr\u00e9f\u00e9rez, faites glisser le fichier htm (ou l'int\u00e9gralit\u00e9 du dossier de la visite) sur l'ic\u00f4ne de l'application TourViewer.",
download:"T\u00e9l\u00e9charger","change-to-click-and-move":"Changer le mode de contr\u00f4le pour cliquer et d\u00e9placer",yes:"Oui","delete-downloaded":"Supprimer","use-safari-for-vr":"Nous recommandons Safari pour visionner cette visite en mode VR","exit-fullscreen":"Quitter le mode plein \u00e9cran",no:"Non","download-failed":"\u00c9chec du t\u00e9l\u00e9chargement","giroscope-disabled-http":"Vous acc\u00e9dez \u00e0 cette page Web via http, donc l'acc\u00e8s au mouvement et \u00e0 l'orientation de votre appareil et le mode VR sont d\u00e9sactiv\u00e9s, veuillez y acc\u00e9der via https pour les activer.",
"cookies-notice":"Cette page Web utilise des cookies pour collecter des statistiques d'utilisation. Pour plus d'informations, veuillez consulter la <a>Politique en mati\u00e8re de cookies</a>.","use-cardboard":"Utiliser le Cardboard","launch-default-browser":"Lancer dans le navigateur par d\u00e9faut","refresh-downloaded":"Rafra\u00eechir","rotate-device":"Veuillez faire pivoter votre appareil","exit-vr":"Quitter la r\u00e9alit\u00e9 virtuelle",reject:"Rejeter","disable-measure":"Arr\u00eatez de mesurer",
downloading:"T\u00e9l\u00e9chargement","cardboard-v2":"Si vous disposez d'un casque Cardboard v2, qui est \u00e9quip\u00e9 d'un bouton, vous pouvez fixer un hotspot du regard et appuyer sur le bouton pour d\u00e9clencher son action.","enable-video-audio-prompt":"Activer la vid\u00e9o et l'audio?","storage-not-provided-launch-from-desktop":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne du bureau pour t\u00e9l\u00e9charger.",downloaded:"Cette visite est t\u00e9l\u00e9charg\u00e9e pour jouer hors ligne.",
"samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"Si vous disposez d'un casque Gear VR compatible avec cet appareil et que vous avez install\u00e9 Samsung Internet pour VR, vous pouvez \u00e9galement l'utiliser pour visualiser ce contenu en r\u00e9alit\u00e9 virtuelle. Il vous suffit de placer maintenant le t\u00e9l\u00e9phone mobile sur le casque.",
"enable-video-prompt":"Activer la vid\u00e9o?","giroscope-disabled-safari-request-permission":["L'acc\u00e8s au mouvement et \u00e0 l'orientation de votre appareil et le mode VR sont d\u00e9sactiv\u00e9s pour ce site.","Pour voir correctement cette page Web, veuillez cliquer sur Continuer et accepter la demande d'autorisation si vous y \u00eates invit\u00e9."],"storage-not-provided-launch-from-homescreen":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne de l'\u00e9cran d'accueil pour t\u00e9l\u00e9charger.",
"enter-fullscreen":"Passer en mode plein \u00e9cran","use-cardboard-v2":"Utiliser le Cardboard v2",unmute:"R\u00e9tablir le son","enter-vr":"Entrez le contenu VR","enable-measure":"Commencer \u00e0 mesurer","use-cardboard-info":"Vous pouvez utiliser n'importe quel casque Google Cardboard compatible pour visualiser ce contenu en r\u00e9alit\u00e9 virtuelle.","ar-mobile-info":"D\u00e9placez lentement votre appareil pour scanner votre espace.\nUn anneau appara\u00eetra lorsqu'une surface sera trouv\u00e9e.\nAppuyez sur l'\u00e9cran pour placer l'objet l\u00e0.",
"use-default-cardboard":"Utiliser par d\u00e9faut","enable-audio-prompt":"Activer le son?"},"de-de":{mute:"Deaktiviere Audio","cardboard-v1":"Wenn Sie sich nicht sicher sind, welche Cardboard-Version Sie verwenden, w\u00e4hlen Sie die Standard-Hotspot-Steuerung. Sie schauen dann einfach auf einen Hotspot und warten, bis die jeweilige Aktion ausgel\u00f6st wird.","download-tour":"Tour zum Offline-Abspielen herunterladen","giroscope-disabled-safari-request-permission":["Der Bewegungs- und Orientierungszugriff, sowie VR Modus Ihres Ger\u00e4ts ist f\u00fcr diese Seite deaktiviert.",
"Um diese Webseite korrekt anzuzeigen, klicken Sie auf Weiter und akzeptieren Sie die Erlaubnisanfrage, wenn Sie dazu aufgefordert werden."],accept:"Akzeptieren",download:"Download",downloading:"Downloading","dont-display-again":"Diese Info nicht mehr anzeigen","web-server-required":"Diese Virtual Tour kann nicht von einem lokalen Laufwerk abgespielt werden. Laden Sie Ihre Tour ins Internet und versuchen Sie es erneut.\nAlternativ, ziehen Sie die htm Datei (oder den ganzen Tour Ordner) auf das Icon der Tour Viewer App, um die Tour direkt lokal abzuspielen.",
cancel:"Abbrechen","change-to-click-and-move":"\u00c4ndern Sie den Steuerungsmodus, um zu klicken und zu drehen",yes:"ja","delete-downloaded":"L\u00f6schen","use-safari-for-vr":"Wir empfehlen Safari, um diese Tour im VR-Modus zu sehen","exit-fullscreen":"Vollbild verlassen",no:"nein","storage-not-provided-bookmark":"Dauerhafte Speicherung verweigert. Versuchen Sie, diese Seite als Lesezeichen zu speichern und erneut zu laden.","download-failed":"Download fehlgeschlagen","giroscope-disabled-http":"Der Bewegungs- und Ausrichtungsszugriff Ihres Ger\u00e4ts ist f\u00fcr diese Webseite deaktiviert. Greifen Sie bitte \u00fcber https darauf zu.",
"cookies-notice":"Diese Webseite verwendet Cookies, um Nutzungsstatistiken zu sammeln. Weitere Informationen finden Sie in der <a>Cookie-Richtlinie</a>.","use-cardboard":"Cardboard verwenden","launch-default-browser":"Im Standardbrowser starten","refresh-downloaded":"Aktualisieren","rotate-device":"Bitte drehen Sie Ihr Ger\u00e4t","exit-vr":"VR verlassen",reject:"Ablehnen","disable-measure":"Messung beenden","change-to-drag-and-release":"\u00c4ndern Sie den Steuerungsmodus zu Ziehen und Loslassen",
"cardboard-v2":"Wenn Sie ein Cardboard v2-Headset haben, das mit einer Taste ausgestattet ist, k\u00f6nnen Sie auf einen Hotspot blicken und die Taste dr\u00fccken, um dessen Aktion auszul\u00f6sen.","enable-video-audio-prompt":"Video und Audio aktivieren?","storage-not-provided-launch-from-desktop":"Bitte starten Sie die Tour erneut \u00fcber das Desktop-Symbol, um sie herunterzuladen.",downloaded:"Diese Tour ist zum Offline-Abspielen heruntergeladen.","samsung-internet-vr-app-info":"Wenn Sie ein Gear VR-Headset haben, das mit diesem Ger\u00e4t kompatibel ist, und Sie Samsung Internet f\u00fcr VR installiert haben, k\u00f6nnen Sie es auch verwenden, um diese Inhalte in VR anzusehen. Machen Sie dazu Samsung Internet zu Ihrem Standardbrowser.",
"samsung-internet-vr-info":"Wenn Sie ein Gear VR-Headset haben, das mit diesem Ger\u00e4t kompatibel ist, und Sie Samsung Internet f\u00fcr VR installiert haben, k\u00f6nnen Sie es auch verwenden, um diese Inhalte in VR zu sehen. Setzen Sie dazu nun das Mobiltelefon auf das Headset.","enable-video-prompt":"Video aktivieren?","storage-not-provided-launch-from-homescreen":"Bitte starten Sie die Tour erneut \u00fcber das Symbol auf dem Startbildschirm, um sie herunterzuladen.","enter-fullscreen":"Vollbildmodus aktivieren",
"use-cardboard-v2":"Cardboard v2 verwenden",unmute:"Audio aktivieren","enter-vr":"VR Inhalt eingeben","enable-measure":"Messung beginnen","use-cardboard-info":"Sie k\u00f6nnen jedes kompatible Google Cardboard-Headset verwenden, um diese Inhalte in VR zu sehen.","ar-mobile-info":"Bewegen Sie Ihr Ger\u00e4t langsam, um Ihr Raum zu scannen.\nEin Ring wird angezeigt, wenn eine Oberfl\u00e4che gefunden wird.\nTippen Sie auf den Bildschirm, um das Objekt dort zu platzieren.","use-default-cardboard":"Standard verwenden",
"enable-audio-prompt":"Audio aktivieren?"},"tr-tr":{mute:"Sesi devre d\u0131s\u0131 b\u0131rakmak","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"S\u00fcr\u00fckleyip b\u0131rakmak i\u00e7in kontrol modunu de\u011fi\u015ftirin",accept:"Kabul etmek",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.",
"dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"T\u0131klamak ve ta\u015f\u0131mak i\u00e7in kontrol modunu de\u011fi\u015ftirin",yes:"evet","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode",
"exit-fullscreen":"Tam ekrandan \u00e7\u0131k",no:"hay\u0131r","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Bu web sayfas\u0131, kullan\u0131m istatistiklerini toplamak i\u00e7in tan\u0131mlama bilgileri kullan\u0131r. Daha fazla bilgi i\u00e7in l\u00fctfen <a>\u00c7erez Politikas\u0131n\u0131</a> ziyaret edin.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","refresh-downloaded":"Refresh","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Reddet","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Ses ve video etkinle\u015ftirilsin mi?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Video aktif edilsin mi?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Tam ekran yap","use-cardboard-v2":"Use Cardboard v2",unmute:"Sesi etkinle\u015ftir","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","ar-mobile-info":"Cihaz\u0131n\u0131z\u0131 yava\u015f\u00e7a hareket ettirerek alan\u0131n\u0131z\u0131 taray\u0131n.\nBir daire g\u00f6r\u00fcnecektir kullan\u0131c\u0131 aray\u00fcz\u00fcnde bir y\u00fczey bulundu\u011funda.\nEkran\u0131na dokunun ve objeyi oraya yerle\u015ftirin.","use-default-cardboard":"Use Default","enable-audio-prompt":"Ses aktif edilsin mi?"}}});
define("tdv/player/l10n",["require","exports","tdv/player/texts","tdv/utils","tdv/player/view/util/URL"],function(a,m,h,n,g){function k(f){return h[d][f]||h.en[f]||f}for(var e in h)h[e.substring(0,2)]=h[e];h["zh-hk"]=h["zh-mo"]=h["zh-tw"];h.no=h.nn;var b=function(){var f=window.navigator,l=["language","browserLanguage","systemLanguage","userLanguage"],p,q,r=[];(p=g.getQueryParameter("language"))&&r.push(p.toLowerCase());var t=f.languages;if(Array.isArray(t))for(p=0;p<t.length;p++)(q=t[p])&&q.length&&
(q=q.toLowerCase(),r.indexOf(q)==-1&&r.push(q));for(p=0;p<l.length;p++)(q=f[l[p]])&&q.length&&(q=q.toLowerCase(),r.indexOf(q)==-1&&r.push(q));return r}(),c=Object.keys(h),d=function(){for(var f=0;f<b.length;f++){var l=b[f];if(c.indexOf(l)>=0)return l;l=l.substr(0,2);if(c.indexOf(l)>=0)return l}return"en"}();k.log=function(){n.log("translation lang: "+d);n.log("browser lang: "+b.join(", "))};return k});
define("tdv/view/util/UserInitiatedAction",["require","exports","tdv/player/view/util/Device"],function(a,m,h){function n(){for(;l.length;)l.shift()();document.body.removeEventListener("click",n,!0);document.body.removeEventListener("touchstart",e,!0);document.body.removeEventListener("touchmove",k,!0);document.body.removeEventListener("touchend",g,!0);d=!1}function g(){f&&n()}function k(){f=!1}function e(){f=!0;h.Nd()==h.vj&&n()}function b(){document.body.addEventListener("click",n,!0);document.body.addEventListener("touchstart",
e,!0);document.body.addEventListener("touchmove",k,!0);document.body.addEventListener("touchend",g,!0)}function c(q,r){var t=this;return function(){r&&n();p+=1;var u=q.apply(t,arguments);--p;return u}}var d=!1,f=!1,l=[];a={wait:function(q){l.push(q);d||(d=!0,document.body?b():document.addEventListener("DOMContentLoaded",b))},lqb:function(q){q=l.indexOf(q);q>=0&&l.splice(q,1)}};var p=0;a.Ar=c;a.Tsa=c;a.z8=function(){return p>0};return a});
define("tdv/view/av/DummyVideoData",["require","exports"],function(){var a={};a.src=a.hqb="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";
return a});
define("tdv/view/av/PlaybackRequiresUserAction",["require","exports","tdv/view/av/DummyVideoData","tdv/player/view/util/Device"],function(a,m,h,n){function g(p){l=p;for(d=!0;f.length;)f.shift()(l)}function k(p){var q=!1,r=document.createElement("video");r.setAttribute("webkit-playsinline","true");r.setAttribute("playsinline","true");r.src="";r.play()["catch"](function(t){q=t.name!=="NotAllowedError"}).finally(function(){p(!q)})}function e(p){var q=document.createElement("video");q.setAttribute("webkit-playsinline","true");
q.setAttribute("playsinline","true");q.src=h.src;var r=!1;q.play().then(function(){r=!0;q.pause();p(!1)})["catch"](function(){r||p(!0)})}function b(){c||(c=!0,n.Yb()==n.Nk?g(!0):n.Yb()==n.sj?e(g):k(function(p){p?e(g):g(!1)}))}var c=!1,d=!1,f=[],l;return{test:function(p){d||c||b();f.push(p);if(d)for(;f.length;)f.shift()(l)}}});
define("tdv/view/util/AudioActivation",["require","tdv/player/l10n","tdv/view/util/UserInitiatedAction","tdv/view/av/PlaybackRequiresUserAction"],function(a){function m(e,b){this.dg=e;this.Gn=b;this.Rs=this.Rs.bind(this);this.Ss=!1}function h(){this.Rs=this.Rs.bind(this);this.qma=this.qma.bind(this);this.I="not tested";this.yva=[];this.Sx=[];this.Y3=!1;g.wait(this.qma)}var n=a("tdv/player/l10n"),g=a("tdv/view/util/UserInitiatedAction"),k=a("tdv/view/av/PlaybackRequiresUserAction");h.prototype.Omb=
function(){this.I=="not tested"&&(this.I="testing",k.test(function(e){this.I=e?"requires action":"allowed";this.L4a()}.bind(this)))};h.prototype.L4a=function(){this.I=="allowed"?this.Rs(!0):this.Y3&&(this.Y3=!1,this.Sx.forEach(function(e){e.request()}))};h.prototype.Qsa=function(e){this.I=="allowed"?e.call(this,!0):this.yva.push(e)};h.prototype.request=function(e){this.rD(e)};h.prototype.cancel=function(e){this.wR(e)};h.prototype.active=function(){return this.I=="allowed"};h.prototype.rlb=function(){this.I==
"allowed"&&(this.I="requires action")};h.prototype.qma=function(){setTimeout(this.ZYa.bind(this),300);this.Mu(!0)};h.prototype.ZYa=function(){for(;this.Sx.length;)this.Sx.pop().cancel()};h.prototype.rD=function(e){this.I=="testing"||this.I=="not tested"?(this.Oca(e),this.Y3=!0):this.I=="requires action"&&this.Oca(e).request()};h.prototype.wR=function(e){this.I=="testing"||this.I=="not tested"?this.Y3=!1:this.I=="requires action"&&this.Oca(e).cancel()};h.prototype.Rs=function(e){var b=this.Sx;this.Sx=
[];b.forEach(function(c){e||c.dg.set("mute",!0);c.cancel()});this.Mu(e)};h.prototype.Mu=function(e){this.I="allowed";this.yva.forEach(function(b){b.call(window,e)})};h.prototype.Oca=function(e){for(var b=null,c=0;c<this.Sx.length&&!b;c++)this.Sx[c].dg==e&&(b=this.Sx[c]);b||(b=new m(e,this.Rs),this.Sx.push(b));return b};m.prototype.request=function(){this.Ss||(this.Ss=!0,this.dg.get("mediaActivationMode")=="button"?this.dg.fO.Mjb(this.Rs):this.dg.MM.show(n("enable-audio-prompt"),this.Rs))};m.prototype.cancel=
function(){this.dg.fO.Gcb(this.Rs);this.dg.MM.oe(this.Rs)};m.prototype.Rs=function(e){this.Gn(e!==!1);this.Ss=!1};return new h});
define("tdv/view/util/Visibility","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k){return new (function(e){function b(){var c=e.call(this)||this;c.visible=!0;c.Va=!1;c.yaa=!1;c.visible=!0;c.Va=!1;c.yaa=!1;c.cQa=k.getQueryParameter("redirect-when-hidden")||"";c.pjb=k.Tg("reload-when-hidden",!1);document.addEventListener("visibilitychange",c.onChange.bind(c),!1);c.onChange();return c}P(b,e);b.prototype.dB=
function(c){if(this.Va=c)this.yaa=!1;this.onChange()};b.prototype.Ira=function(c){this.yaa=c;this.onChange()};b.prototype.onChange=function(){var c=this.Va?!this.yaa:!document.hidden;this.visible!=c&&((this.visible=c)?this.Pib():this.n9(),this.o(new n(h.V)))};b.prototype.Pib=function(){this.cQa?window.location.href=this.cQa:this.pjb&&window.location.reload()};b.prototype.n9=function(){};return b}(g))});
define("tdv/view/av/SharedAudioContext","require exports tdv/constants/EventName tdv/player/view/util/Flags tdv/view/util/AudioActivation tdv/view/util/Visibility".split(" "),function(a,m,h,n,g,k){var e=null;n.Xsa?"AudioContext"in window===!1?e=null:(e=new AudioContext,g.Qsa(function(){e.state!=="running"&&e.resume()}),k.bind(h.V,function(){k.visible&&e.state=="interrupted"&&e.resume()},window,!0)):e=null;return e});
define("tdv/player/view/util/Capabilities","require exports tdv/utils tdv/view/av/SharedAudioContext tdv/player/view/util/Device tdv/player/view/util/Flags tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k,e){a=function(){function b(){}b.Tlb=function(){this.Bma=!0};b.R2a=function(){window.MediaSource=window.MediaSource||window.gpb;return window.MediaSource&&typeof window.MediaSource.isTypeSupported==="function"&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')};
b.a3a=function(){if(g.Yb()==g.sj){var c=g.Qoa();if(c>=10&&c<11||c>=11.3)return!0}return!1};b.S2a=function(){return g.Yb()==g.Nk||g.Yb()==g.sj?!0:!1};b.YIa=function(c){try{return this.EIa||(this.EIa=document.createElement("audio")),!!this.EIa.canPlayType(c).replace(/^no$/,"")}catch(d){}return!1};b.GO=function(c){try{return this.I6||(this.I6=document.createElement("video"),this.I6.setAttribute("webkit-playsinline","true"),this.I6.setAttribute("playsinline","true")),!!this.I6.canPlayType(c).replace(/^no$/,
"")}catch(d){}return!1};b.xcb=function(){return g.Yb()==g.sj?g.Qoa()>=15||n?!0:!1:!0};b.U2a=function(){try{if(document.createElement("canvas").getContext("webgl"))return!0}catch(c){}try{if(document.createElement("canvas").getContext("experimental-webgl"))return!0}catch(c){}return!1};b.zSa=function(c,d,f,l){if(k.lWa)return!0;if(g.Nd()==g.vj){if(c<=4096&&d<=2048)return!0}else if((g.uP()||g.IJ())&&!g.jE()){if(c<=4320&&d<=4320||c<=8192&&d<=4096)return!0}else if((g.uP()||g.IJ())&&g.bpa()){if(l=="h264"&&
(c<=5760&&d<=5760||c<=7680&&d<=3840)||c<=3840&&d<=2160)return!0}else if(g.RX())if(l=="h264"){if(c<=5760&&d<=5760||c<=7680&&d<=3840)return!0}else{if(c<=4400&&d<=2200)return!0}else if(g.ub()){if(c<=3840&&d<=2160)return!0}else if(c<=4096&&d<=2048)return!0;return!1};b.zcb=function(){return g.RX()||(g.uP()||g.IJ())&&g.xc()==g.ox||!g.ub()&&b.Bma&&g.Yb()==g.Pp?!0:!1};b.ySa=function(c){return b.zSa(c.get("width"),c.get("height"),c.get("framerate"),c.get("codec"))};b.ycb=function(){return b.Bma?!0:!1};b.Acb=
function(){return k.tta!==void 0?k.tta:g.IJ()||g.RX()||g.zhb()||g.Ahb()||g.ZMa()||g.uP()&&!g.jE()||!g.kf()&&g.Nd()!=g.uB&&g.Nd()!=g.vj?!0:!1};b.Jmb=function(c,d){return b.zSa(c,d,0)};b.log=function(){h.log("webgl: "+b.ci);h.log("html5 audio: "+b.yMa);h.log("html5 video: "+b.BMa)};b.Bma=!1;b.LPa=!k.OUa&&k.NUa?1:2;b.AMa=b.YIa('audio/ogg; codecs="vorbis"');b.zMa=b.YIa("audio/mpeg");b.yMa=b.AMa||b.zMa;b.Moa=b.GO('video/ogg; codecs="theora"');b.GO('video/mp4; codecs="avc1.42E01E"');b.Noa=b.GO('video/webm; codecs="vp8, vorbis"');
b.Pgb=b.GO('video/mp4; codecs="hev1"');b.i8=b.GO("video/mp4");b.Qgb=b.GO("video/quicktime");b.Rgb=b.a3a();b.mMa=b.S2a();b.wgb=b.mMa||b.i8&&b.R2a();b.BMa=b.Moa||b.i8||b.Noa;b.ci=b.U2a();b.summary=["webgl:"+b.ci,"html5audio:"+b.yMa,"html5video:"+b.BMa].join(" ");return b}();e.Ak("debug")&&e.Ak("capabilities")&&a.log();return a});
define("tdv/player/view/util/geo/Quaternion",["require"],function(){var a=Math.PI/180,m=180/Math.PI,h=new THREE.Euler(0,0,0,"YXZ"),n=new THREE.Quaternion;return{create:function(){return{x:0,y:0,z:0,w:0}},hX:function(g,k,e,b){n.setFromEuler(h.set(k*a,-g*a,e*a,"YXZ"));g=b||{};g.x=n.x;g.y=n.y;g.z=n.z;g.w=n.w;return g},iaa:function(g,k){h.setFromQuaternion(n.set(g.x,g.y,g.z,g.w),"YXZ");g={};g.Xa=-h.y*m;g.pitch=h.x*m;g.Mg=h.z*m;k||(g.pitch=Math.min(90,Math.max(-90,g.pitch)));return g},Xa:function(g){h.setFromQuaternion(n.set(g.x,
g.y,g.z,g.w),"YXZ");return-h.y*m}}});
define("tdv/player/view/util/MathUtil",["require"],function(){var a={};a.degToRad=Math.PI/180;a.radToDeg=180/Math.PI;a.Vector2=function(m,h){this.x=m||0;this.y=h||0};a.Vector2.prototype={constructor:a.Vector2,set:function(m,h){this.x=m;this.y=h;return this},copy:function(m){this.x=m.x;this.y=m.y;return this},subVectors:function(m,h){this.x=m.x-h.x;this.y=m.y-h.y;return this}};a.Vector3=function(m,h,n){this.x=m||0;this.y=h||0;this.z=n||0};a.Vector3.prototype={constructor:a.Vector3,set:function(m,h,
n){this.x=m;this.y=h;this.z=n;return this},copy:function(m){this.x=m.x;this.y=m.y;this.z=m.z;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var m=this.length();m!==0?this.multiplyScalar(1/m):this.z=this.y=this.x=0;return this},multiplyScalar:function(m){this.x*=m;this.y*=m;this.z*=m},applyQuaternion:function(m){var h=this.x,n=this.y,g=this.z,k=m.x,e=m.y,b=m.z;m=m.w;var c=m*h+e*g-b*n,d=m*n+b*h-k*g,f=m*g+k*n-e*h;h=-k*h-e*n-b*g;this.x=
c*m+h*-k+d*-b-f*-e;this.y=d*m+h*-e+f*-k-c*-b;this.z=f*m+h*-b+c*-e-d*-k;return this},dot:function(m){return this.x*m.x+this.y*m.y+this.z*m.z},crossVectors:function(m,h){var n=m.x,g=m.y;m=m.z;var k=h.x,e=h.y;h=h.z;this.x=g*h-m*e;this.y=m*k-n*h;this.z=n*e-g*k;return this}};a.Quaternion=function(m,h,n,g){this.x=m||0;this.y=h||0;this.z=n||0;this.w=g!==void 0?g:1};a.Quaternion.prototype={constructor:a.Quaternion,set:function(m,h,n,g){this.x=m;this.y=h;this.z=n;this.w=g;return this},copy:function(m){this.x=
m.x;this.y=m.y;this.z=m.z;this.w=m.w;return this},cRa:function(m,h,n){var g=Math.cos(m/2),k=Math.cos(h/2),e=Math.cos(n/2);m=Math.sin(m/2);h=Math.sin(h/2);n=Math.sin(n/2);this.x=m*k*e+g*h*n;this.y=g*h*e-m*k*n;this.z=g*k*n-m*h*e;this.w=g*k*e+m*h*n;return this},setFromAxisAngle:function(m,h){h/=2;var n=Math.sin(h);this.x=m.x*n;this.y=m.y*n;this.z=m.z*n;this.w=Math.cos(h);return this},multiply:function(m){return this.multiplyQuaternions(this,m)},multiplyQuaternions:function(m,h){var n=m.x,g=m.y,k=m.z;
m=m.w;var e=h.x,b=h.y,c=h.z;h=h.w;this.x=n*h+m*e+g*c-k*b;this.y=g*h+m*b+k*e-n*c;this.z=k*h+m*c+n*b-g*e;this.w=m*h-n*e-g*b-k*c;return this},inverse:function(){this.x*=-1;this.y*=-1;this.z*=-1;this.normalize();return this},normalize:function(){var m=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);m===0?(this.z=this.y=this.x=0,this.w=1):(m=1/m,this.x*=m,this.y*=m,this.z*=m,this.w*=m);return this},slerp:function(m,h){if(h===0)return this;if(h===1)return this.copy(m);var n=this.x,g=
this.y,k=this.z,e=this.w,b=e*m.w+n*m.x+g*m.y+k*m.z;b<0?(this.w=-m.w,this.x=-m.x,this.y=-m.y,this.z=-m.z,b=-b):this.copy(m);if(b>=1)return this.w=e,this.x=n,this.y=g,this.z=k,this;m=Math.acos(b);var c=Math.sqrt(1-b*b);if(Math.abs(c)<.001)return this.w=.5*(e+this.w),this.x=.5*(n+this.x),this.y=.5*(g+this.y),this.z=.5*(k+this.z),this;b=Math.sin((1-h)*m)/c;h=Math.sin(h*m)/c;this.w=e*b+this.w*h;this.x=n*b+this.x*h;this.y=g*b+this.y*h;this.z=k*b+this.z*h;return this},setFromUnitVectors:function(){var m,
h;return function(n,g){m===void 0&&(m=new a.Vector3);h=n.dot(g)+1;h<1E-6?(h=0,Math.abs(n.x)>Math.abs(n.z)?m.set(-n.y,n.x,0):m.set(0,-n.z,n.y)):m.crossVectors(n,g);this.x=m.x;this.y=m.y;this.z=m.z;this.w=h;this.normalize();return this}}()};return a});
define("tdv/player/view/util/DeviceOrientationSensor",["require","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/util/MathUtil"],function(a){function m(){d||(d=!0,q=new c.Vector3(0,0,1),r=new c.Quaternion,t=new c.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),u=new c.Quaternion,n(),window.addEventListener("orientationchange",n,!1),window.addEventListener("deviceorientation",g,!1),h())}function h(){if(v&&l!==void 0&&p!==void 0){v=!1;var y=c.degToRad*p;u.cRa(c.degToRad*
l.beta,c.degToRad*l.alpha,-(c.degToRad*l.gamma));u.multiply(t);u.multiply(r.setFromAxisAngle(q,-y));w||(x++,x>=5&&(w=!0,f.o(new e(k.vd))));f.o(new e(k.V))}}function n(){p=window.orientation||0;v=!0;h()}function g(y){l=y;v=!0;h()}var k=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/util/MathUtil"),d=!1,f=new b,l,p,q,r,t,u,v,w=!1,x=0;m.prototype.Ft=function(){h();return u};m.prototype.bind=function(){f.bind.apply(f,arguments)};m.prototype.h=
function(){f.h.apply(f,arguments)};m.prototype.stop=function(){window.removeEventListener("orientationchange",n,!1);window.removeEventListener("deviceorientation",g,!1)};return m});
define("tdv/player/view/util/FusionPoseSensor","require tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/MathUtil".split(" "),function(a){function m(l){this.Lhb=l;this.wna=new g;this.c7=new g;this.xqa=new g;this.pJ=new c.Quaternion;this.wqa=new c.Quaternion;this.PHa=new c.Quaternion;this.XMa=!1;this.k7=new c.Vector3;this.Bpa=new c.Vector3;this.igb=new c.Quaternion}function h(){this.deviceId="webvr-polyfill:fused";this.QNa=!1;this.PNa=
0;this.vW=new c.Vector3;this.b8=new c.Vector3;this.filter=new m(.98);this.hjb=new n(.04);this.qP=f.qP();this.gr=f.gr();f.joa();this.lpa=f.khb();this.p7=new c.Quaternion;f.gr()?this.p7.setFromAxisAngle(new c.Vector3(1,0,0),Math.PI/2):this.p7.setFromAxisAngle(new c.Vector3(1,0,0),-Math.PI/2);this.s8=new c.Quaternion;this.xQ=new c.Quaternion;this.ePa=new c.Quaternion;this.ePa.setFromAxisAngle(new c.Vector3(0,0,1),-window.orientation*Math.PI/180);this.BRa();f.UMa()&&this.p7.multiply(this.s8);this.Qw=
new c.Quaternion;this.qP=f.qP();this.gr=f.gr();this.jhb=f.joa()>=66;this.SJ=this.SJ.bind(this);this.iY=this.iY.bind(this);this.hY=this.hY.bind(this);screen&&screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",this.SJ):window.addEventListener("orientationchange",this.SJ);this.lpa?window.addEventListener("deviceorientation",this.iY):window.addEventListener("devicemotion",this.hY)}function n(l){this.jjb=l;this.S9=new c.Quaternion;this.WP=null;this.UJa=
new c.Quaternion;this.qY=new c.Quaternion}function g(l,p){this.set(l,p)}var k=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher");a("tdv/player/view/util/Device");var c=a("tdv/player/view/util/MathUtil"),d=new b;m.prototype.Ebb=function(l,p){this.wna.set(l,p)};m.prototype.Mbb=function(l,p){this.c7.set(l,p);f.Ghb(p-this.xqa.gaa)&&this.Xjb();this.xqa.copy(this.c7)};m.prototype.Xjb=function(){if(this.XMa){var l=this.jgb(this.c7.sample,this.c7.gaa-this.xqa.gaa);this.igb.multiply(l);
this.pJ.copy(this.wqa);this.pJ.multiply(l);l=new c.Quaternion;l.copy(this.pJ);l.inverse();this.k7.set(0,0,-1);this.k7.applyQuaternion(l);this.k7.normalize();this.Bpa.copy(this.wna.sample);this.Bpa.normalize();l=new c.Quaternion;l.setFromUnitVectors(this.k7,this.Bpa);l.inverse();var p=new c.Quaternion;p.copy(this.pJ);p.multiply(l);this.pJ.slerp(p,1-this.Lhb);this.wqa.copy(this.pJ)}else this.PHa=this.Dbb(this.wna.sample),this.wqa.copy(this.PHa),this.XMa=!0};m.prototype.Ft=function(){return this.pJ};
m.prototype.Dbb=function(l){var p=new c.Vector3;p.copy(l);p.normalize();l=new c.Quaternion;l.setFromUnitVectors(new c.Vector3(0,0,-1),p);l.inverse();return l};m.prototype.jgb=function(l,p){var q=new c.Quaternion,r=new c.Vector3;r.copy(l);r.normalize();q.setFromAxisAngle(r,l.length()*p);return q};h.prototype.stop=function(){screen&&screen.orientation&&screen.orientation.addEventListener&&screen.orientation.removeEventListener("change",this.SJ);window.removeEventListener("orientationchange",this.SJ);
window.removeEventListener("deviceorientation",this.iY);window.removeEventListener("devicemotion",this.hY)};h.prototype.tm=function(){return null};h.prototype.Ft=function(){var l=void 0;if(this.lpa&&this.K0){this.WJa=this.WJa||function(){var q=(new c.Quaternion).setFromAxisAngle(new c.Vector3(0,0,-1),0),r=new c.Quaternion;this.R4=="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.VJa=this.VJa||
function(){var q=new c.Quaternion;q.setFromAxisAngle(new c.Vector3(1,0,0),-Math.PI/2);return q}();l=this.K0;var p=new c.Quaternion;p.copy(l);p.multiply(this.VJa);p.multiply(this.Qw);p.multiply(this.xQ);p.multiplyQuaternions(this.WJa,p);this.rqb&&(p.x=0,p.z=0,p.normalize());this.G9[0]=p.x;this.G9[1]=p.y;this.G9[2]=p.z;this.G9[3]=p.w;return this.G9}l=this.filter.Ft();l=this.hjb.Mfb(l,this.b8,this.WP);p=new c.Quaternion;p.copy(this.p7);p.multiply(this.Qw);p.multiply(l);p.multiply(this.xQ);return p};
h.prototype.resetPose=function(){this.Qw.copy(this.filter.Ft());this.Qw.x=0;this.Qw.y=0;this.Qw.z*=-1;this.Qw.normalize();f.UMa()&&this.Qw.multiply(this.s8);this.Qw.multiply(this.ePa)};h.prototype.iY=function(l){this.K0=this.K0||new c.Quaternion;var p=l.alpha,q=l.beta;l=l.gamma;p=(p||0)*Math.PI/180;q=(q||0)*Math.PI/180;l=(l||0)*Math.PI/180;this.K0.cRa(q,p,-l)};h.prototype.hY=function(l){var p=l.rotationRate;if(p){var q=l.accelerationIncludingGravity;l=l.timeStamp/1E3;this.qP&&(l/=1E3);var r=l-this.WP;
r<=f.Ita||r>f.Eta?this.WP=l:(this.vW.set(-q.x,-q.y,-q.z),this.b8.set(p.alpha,p.beta,p.gamma),(this.gr||this.qP||this.jhb)&&this.b8.multiplyScalar(Math.PI/180),this.filter.Ebb(this.vW,l),this.filter.Mbb(this.b8,l),this.WP=l,this.QNa||(this.PNa++,this.PNa>=5&&(this.QNa=!0,d.o(new e(k.vd)))),this.R4!=this.YKa()&&this.SJ(),d.o(new e(k.V)))}else this.lpa=!0,window.addEventListener("deviceorientation",this.iY),window.removeEventListener("devicemotion",this.hY)};h.prototype.bind=function(){d.bind.apply(d,
arguments)};h.prototype.h=function(){d.h.apply(d,arguments)};h.prototype.SJ=function(){this.BRa();d.o(new e(k.V))};h.prototype.BRa=function(){this.xQ.set(0,0,0,1);this.R4=this.YKa();switch(this.R4){case "landscape-primary":this.xQ.setFromAxisAngle(new c.Vector3(0,0,1),-Math.PI/2);break;case "landscape-secondary":this.xQ.setFromAxisAngle(new c.Vector3(0,0,1),Math.PI/2)}this.s8.copy(this.xQ);this.s8.inverse()};h.prototype.YKa=function(){var l=screen.orientation&&screen.orientation.type;if(!l)switch(window.orientation){case 0:l=
"portrait-primary";break;case 90:l="landscape-primary";break;case -90:l="landscape-secondary";break;case 180:l="portrait-secondary"}l=="landscape-primary"&&(this.vW.z>4.9||this.vW.z<-4.9?l=this.R4||l:this.vW.x>0&&(l="landscape-secondary"));return l};n.prototype.Mfb=function(l,p,q){if(!this.WP)return this.S9.copy(l),this.WP=q,l;q=new c.Vector3;q.copy(p);q.normalize();p=p.length();if(p<c.degToRad*20)return this.qY.copy(l),this.S9.copy(l),this.qY;this.UJa.setFromAxisAngle(q,p*this.jjb);this.qY.copy(this.S9);
this.qY.multiply(this.UJa);this.S9.copy(l);return this.qY};g.prototype.set=function(l,p){this.sample=l;this.gaa=p};g.prototype.copy=function(l){this.set(l.sample,l.gaa)};var f={Ita:.001,Eta:1,Ghb:function(l){return isNaN(l)||l<=f.Ita||l>f.Eta?!1:!0}};f.gr=function(){var l=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return l}}();f.$pb=function(){var l=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return l}}();f.qP=function(){var l=navigator.userAgent.indexOf("Firefox")!==
-1&&navigator.userAgent.indexOf("Android")!==-1;return function(){return l}}();f.joa=function(){var l=navigator.userAgent.match(/.*Chrome\/([0-9]+)/),p=l?parseInt(l[1],10):null;return function(){return p}}();f.khb=function(){var l=!1;if(f.joa()===65){var p=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(p){p=p[1].split(".");var q=p[3];l=parseInt(p[2],10)===3325&&parseInt(q,10)<148}}return function(){return l}}();f.UMa=function(){return window.orientation==90||window.orientation==-90};return h});
define("tdv/player/view/util/Gyroscope","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/geo/Quaternion tdv/player/view/util/Device tdv/player/view/util/DeviceOrientationSensor tdv/player/view/util/FusionPoseSensor tdv/player/view/util/URL".split(" "),function(a){function m(){function w(){p=!0;f.o(new n(h.V))}function x(){var C;!F||!y&&A?A&&(C=z):C=D;q!=C&&(q&&(q.h(h.V,w),q.stop()),q=C)&&(q.bind(h.V,w,this,!0),w())}var y=e.Nd()==e.vj||d.Ak("debug")&&
d.getQueryParameter("sensor")=="deviceorientation",z=new c,A=!1;z.bind(h.vd,function(){A=!0;x()},this,!0);var D=new b,F=!1;D.bind(h.vd,function(){F=!0;x()},this,!0)}a("tdv/utils");var h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/util/geo/Quaternion"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/util/DeviceOrientationSensor"),c=a("tdv/player/view/util/FusionPoseSensor"),d=a("tdv/player/view/util/URL"),f=new g,l={},p=!1,q,r=
[],t=!1,u=!1;l.Mqa=function(w){w&&r.push(w);if(!l.disabled)for(;r.length;)r.pop()();else if(e.Nd()==e.vj&&window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission){DeviceOrientationEvent.requestPermission().then(function(y){y==="granted"&&(u=!0,x())})["catch"](function(){});DeviceMotionEvent.requestPermission().then(function(y){y==="granted"&&(t=!0,x())})["catch"](function(){});var x=function(){if(l.disabled&&t&&u)for(l.disabled=!1,m();r.length;)r.pop()()};x()}};l.bind=function(w,x){f.bind(h.V,
w,x)};l.h=function(w,x){f.h(h.V,w,x)};l.Qib=function(){return p};l.Ft=function(){p=!1;if(q){var w=q.Ft();w=k.iaa(w);return{yaw:w.Xa,pitch:w.pitch,roll:w.Mg}}return{yaw:0,pitch:0,roll:0}};if(e.Nd()==e.Tua||e.Nd()==e.p_||e.Nd()==e.Bta||e.kf())l.ol=!1,l.disabled=!1;else if(e.Nd()==e.uB&&e.Yb()==e.Pp&&window.location.protocol!="https:"&&window.location.hostname!="localhost")l.ol=!0,l.disabled=!0;else if(e.Nd()==e.vj)if(l.ol=!0,l.disabled=!0,window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission)l.Mqa();
else{var v=function(){window.removeEventListener("deviceorientation",v,!1);l.disabled=!1;m()};window.addEventListener("deviceorientation",v,!1)}else l.ol=window.DeviceMotionEvent!=void 0,l.disabled=!1;l.ol&&!l.disabled&&m();return l});
define("tdv/player/view/util/LibsLoader",["require","exports","tdv/player/view/util/URL"],function(a,m,h){m=function(){function g(){this.M8=null;this.N6=[]}g.prototype.initialize=function(k){this.M8=h.lB(k);this.MZ=this.MZ.bind(this);this.update()};g.prototype.load=function(k,e){this.N6.push({call:k,context:e||window});this.BP||(this.BP=this.q7());this.update()};g.prototype.oj=function(){return this.BP!==void 0};g.prototype.update=function(){this.N6.length>0&&(this.BP!==void 0?this.Zdb():this.M8&&
this.upa())};g.prototype.MZ=function(){var k=this.q7();k===void 0?setTimeout(this.MZ,250):(this.BP=k,this.update())};g.prototype.upa=function(){throw Error("Method not implemented.");};g.prototype.q7=function(){throw Error("Method not implemented.");};g.prototype.Zdb=function(){for(;this.N6.length>0;){var k=this.N6.pop();k.call.call(k.context,this.BP)}};return g}();a=function(g){function k(e){var b=g.call(this)||this;b.oNa=e;return b}P(k,g);k.prototype.upa=function(){this.script||(this.script=document.createElement("script"),
this.script.type="text/javascript",this.script.src=this.M8,document.getElementsByTagName("head")[0].appendChild(this.script),this.MZ())};k.prototype.q7=function(){for(var e=window,b=0;b<this.oNa.length&&e!==void 0;b++)e=e[this.oNa[b]];return e};return k}(m);m=function(g){function k(e){var b=g.call(this)||this;b.Opa=e;return b}P(k,g);k.prototype.upa=function(){this.module||(k.chb(),this.module=document.createElement("script"),this.module.type="module",this.module.textContent=['import * as all from "'+
this.M8+'";',"window."+this.Opa.join(".")+" = all;"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.module),this.MZ())};k.prototype.q7=function(){for(var e=window,b=0;b<this.Opa.length&&e!==void 0;b++)e=e[this.Opa[b]];return e};k.chb=function(){this.l8||(this.l8=document.createElement("script"),this.l8.type="importmap",this.l8.textContent=['{\n"imports":\n{','"three": "'+this.Kdb()+'"',"}\n}"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.l8))};k.Kdb=function(){var e=
[];e.push("const three = window.THREE;");for(var b in window.THREE)e.push("export const "+b+" = three."+b+";");return window.URL.createObjectURL(new Blob([e.join("\n")],{type:"application/javascript"}))};return k}(m);var n={};n.GS=new m(["TDV","GS"]);n.qWa=new a(["WebVRConfig","FORCE_ENABLE_VR"]);n.Rua=new a(["WebXRPolyfill"]);n.HLS=new a(["Hls"]);n.initialize=function(g){this.HLS.initialize(g.get(TDV.PlayerSettings.HLS_URL));this.qWa.initialize(g.get(TDV.PlayerSettings.WEBVR_POLYFILL_URL));this.Rua.initialize(g.get(TDV.PlayerSettings.WEBXR_POLYFILL_URL));
this.GS.initialize(g.get(TDV.PlayerSettings.GS_URL))};return n});
define("tdv/player/view/util/xr/APIAvailabilityChecker","require exports tdv/player/view/util/Device tdv/player/view/util/Capabilities tdv/player/view/util/Gyroscope tdv/player/view/util/LibsLoader tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k,e){return function(){function b(){}b.initialize=function(c){this.XR.f$?(this.Jra(!0),this.IX||(this.IX=this.esa("immersive-ar").then(function(d){this.g$(d)}.bind(this)).catch(function(){this.g$(!1)}.bind(this))),c()):(this.IX||(this.IX=Promise.all([this.esa("immersive-vr").then(function(d){this.Jra(d)}.bind(this)).catch(function(){this.Jra(!1)}.bind(this)),
this.esa("immersive-ar").then(function(d){this.g$(d)}.bind(this)).catch(function(){this.g$(!1)}.bind(this))])),this.IX.then(function(){c()}))};b.Jra=function(c){this.XR.wQ=c;this.XR.tob=c&&(h.kf()||!h.ub());c&&n.Tlb()};b.g$=function(c){this.XR.mIa=c};b.esa=function(c){return this.Kmb(c).then(function(d){return d?Promise.resolve(!0):this.Lmb(c)}.bind(this))};b.Kmb=function(c){return!navigator.xr||c=="immersive-vr"&&e.getQueryParameter("vr_mode")=="cardboard"?Promise.resolve(!1):this.Mmb(c)};b.Lmb=
function(c){return this.vcb(c)?this.fcb():Promise.resolve(!1)};b.Mmb=function(c){return navigator.xr&&navigator.xr.isSessionSupported?navigator.xr.isSessionSupported(c):navigator.xr&&navigator.xr.supportsSession?navigator.xr.supportsSession(c):Promise.reject()};b.vcb=function(c){return c=="immersive-ar"?!1:g.ol&&h.ub()&&h.wk()!=h.GQ&&this.wcb()};b.wcb=function(){return h.wk()==h.a_?this.Hhb():!0};b.Hhb=function(){try{return window.self===window.top}catch(c){return!1}};b.fcb=function(){var c=this;
return new Promise(function(d){k.Rua.load(function(){var f;c.fjb=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.R9,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!1}});c.XR.tP=!0;d(!0)})})};b.IX=null;b.fjb=null;return b}()});
define("three.mod",["require","exports"],function(){var a=window.THREE,m=new TDV.PlayerSettings;a.Ysa=m.get(TDV.PlayerSettings.Gaa);a.gta=m.get(TDV.PlayerSettings.Xaa);a.YB=m.get(TDV.PlayerSettings.YB);return a});
define("tdv/player/view/util/xr/CameraPosition",["require","exports","tdv/constants/EventName","three.mod"],function(a,m,h,n){var g=function(){function r(){}r.initialize=function(){this.XR.Vh=new n.Group;this.XR.Vh.matrixAutoUpdate=!1;this.XR.Zq=new n.Group;this.XR.Zq.matrixAutoUpdate=!1;this.XR.Vh.add(this.XR.Zq);this.XR.M.bind(h.SZ,this.xE,this,!0);this.XR.M.bind(h.V,this.Ta,this,!0);this.XR.M.bind(h.Pd,this.Ta,this,!0)};r.setScale=function(t){this.pf!==t&&(this.pf=t,this.XR.zi=1/t,this.setPosition({x:this.XR.Ec.x,
y:this.XR.Ec.y,z:this.XR.Ec.z,yaw:-c.setFromQuaternion(this.XR.ug,"YXZ").y*q}))};r.kK=function(t){var u,v;this.Q8(this.kF,e);this.Q8(l.copy(this.kF).premultiply(this.XR.Vh.matrixWorld),k);var w=this.XR.Vh.matrix;w.identity();w.multiply(l.makeRotationY(t===void 0?k.yaw:-t*p));w.multiply(l.makeRotationY(-e.yaw));w.multiply(l.makeScale(this.XR.zi,this.XR.zi,this.XR.zi));w.multiply(l.makeTranslation(-e.x,-e.y,-e.z));t!==void 0&&(w=this.XR.Zq.matrix,w.identity(),w.multiply(l.makeTranslation(e.x,e.y,e.z)),
w.multiply(l.makeRotationY(-e.yaw*p)));this.XR.Vh.updateMatrixWorld(!0);(u=this.camera)===null||u===void 0||u.updateMatrixWorld(!0);(v=this.yl)===null||v===void 0||v.updateMatrixWorld(!0);this.Lsa()};r.b$=function(){this.pf=1;this.XR.zi=1;c.setFromQuaternion(this.XR.xl,"YXZ");this.setPosition({x:this.XR.xaa.x,y:this.XR.xaa.y,z:this.XR.xaa.z,yaw:-c.y*q,pitch:c.x*q,roll:c.z*q})};r.setPosition=function(t){var u,v;this.Q8(this.kF,e);this.Q8(l.copy(this.kF).premultiply(this.XR.Vh.matrixWorld),k);var w=
this.XR.Vh.matrix;w.identity();w.multiply(l.makeTranslation(t.x===void 0?k.x:t.x,t.y===void 0?k.y:t.y,t.z===void 0?k.z:t.z));w.multiply(l.makeRotationY(t.yaw===void 0?k.yaw:-t.yaw*p));w.multiply(l.makeRotationX(t.pitch===void 0?k.pitch:t.pitch*p));w.multiply(l.makeRotationZ(t.roll===void 0?k.roll:t.roll*p));w.multiply(l.makeRotationZ(-e.roll));w.multiply(l.makeRotationX(-e.pitch));w.multiply(l.makeRotationY(-e.yaw));w.multiply(l.makeScale(this.XR.zi,this.XR.zi,this.XR.zi));w.multiply(l.makeTranslation(-e.x,
-e.y,-e.z));if(t.yaw!==void 0||t.pitch!==void 0||t.roll!==void 0)w=this.XR.Zq.matrix,w.identity(),w.multiply(l.makeTranslation(e.x,e.y,e.z)),w.multiply(l.makeRotationY(-e.yaw*p)),w.multiply(l.makeRotationX(e.pitch*p)),w.multiply(l.makeRotationX(e.roll*p));this.XR.Vh.updateMatrixWorld(!0);(u=this.camera)===null||u===void 0||u.updateMatrixWorld(!0);(v=this.yl)===null||v===void 0||v.updateMatrixWorld(!0);this.Lsa()};r.xE=function(){var t,u,v,w;this.Xw(this.XR.XA);this.LRa(((t=this.XR.Ag)===null||t===
void 0?void 0:t.xr.getCamera())||null);this.setCamera(this.XR.Mw);if(u=(u=(t=(u=this.XR.Ag)===null||u===void 0?void 0:u.xr.getFrame())&&this.XR.referenceSpace&&t.getViewerPose(this.XR.referenceSpace))&&u.transform)this.XR.FO=u.position.y,this.kF.fromArray(u.matrix),this.kF.decompose(this.XR.xaa,this.XR.xl,f),(v=this.camera)===null||v===void 0||v.updateMatrixWorld(!0),(w=this.yl)===null||w===void 0||w.updateMatrixWorld(!0),this.Lsa()};r.Ta=function(){this.XR.isPresenting?this.scene&&this.camera&&(this.XR.XA!=
this.scene||this.XR.Mw!=this.camera)&&(this.Xw(this.XR.XA),this.setCamera(this.XR.Mw),this.XR.Ag.xr.updateCamera(this.XR.Mw),this.setPosition({x:this.XR.Ec.x,y:this.XR.Ec.y,z:this.XR.Ec.z,Xa:-c.setFromQuaternion(this.XR.ug,"YXZ").y*q})):(this.Xw(null),this.LRa(null),this.setCamera(null))};r.Lsa=function(){l.copy(this.kF).premultiply(this.XR.Vh.matrixWorld).decompose(this.XR.Ec,this.XR.ug,f);c.setFromRotationMatrix(this.XR.Zq.matrix,"YXZ");d.setFromMatrixPosition(this.kF);this.XR.Zq.matrix.identity();
this.XR.Zq.matrix.multiply(l.makeTranslation(d.x,d.y,d.z));this.XR.Zq.matrix.multiply(l.makeRotationFromEuler(c));this.XR.Zq.updateMatrixWorld(!0)};r.Xw=function(t){this.scene!==t&&(this.scene&&this.scene.remove(this.XR.Vh),t==null&&(this.oQa(),this.qQa()),(this.scene=t)&&this.scene.add(this.XR.Vh))};r.setCamera=function(t){this.camera!==t&&(this.oQa(),(this.camera=t)&&this.XR.Vh.add(this.camera))};r.LRa=function(t){this.yl!==t&&(this.qQa(),(this.yl=t)&&this.XR.Vh.add(this.yl))};r.oQa=function(){this.scene&&
this.camera&&this.camera.parent===this.XR.Vh&&(this.scene.add(this.camera),this.camera=null)};r.qQa=function(){this.yl&&this.yl.parent===this.XR.Vh&&(this.yl.parent.remove(this.yl),this.yl=null)};r.Q8=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.kF=new n.Matrix4;r.pf=1;r.scene=null;r.camera=null;r.yl=null;return r}(),k={x:void 0,y:void 0,z:void 0,Xa:void 0},e={x:void 0,y:void 0,z:void 0,Xa:void 0},b=new n.Quaternion,c=new n.Euler,
d=new n.Vector3,f=new n.Vector3,l=new n.Matrix4,p=Math.PI/180,q=180/Math.PI;window.rj=function(r){g.setPosition({x:void 0,y:void 0,z:void 0,Xa:r})};return g});define("tdv/player/view/util/xr/pointer/PointerType",["require","exports"],function(){return{PF:"gaze",QF:"laser"}});
define("tdv/player/view/util/xr/RendererList",["require","exports","tdv/constants/EventName"],function(a,m,h){return function(){function n(){}n.Ikb=function(g,k,e){var b=this.XR.Vn.indexOf(g);b>-1&&b!==this.XR.Vn.length-1&&(this.XR.Vn.splice(b,1),this.XR.Vn.splice(this.XR.Vn.length,0,g));this.XR.Kqa.set(g,k);this.XR.Jqa.set(g,e);g!==this.XR.Ag||this.XR.XA===k&&this.XR.Mw===e||(this.XR.XA=k,this.XR.Mw=e,this.XR.M.o(h.Pd))};n.add=function(g){this.remove(g);this.XR.Vn.push(g)};n.remove=function(g){var k=
this.XR.Vn.indexOf(g);k!=-1&&(this.XR.Vn.splice(k,1),this.XR.Kqa.delete(g),this.XR.Jqa.delete(g))};return n}()});define("tdv/player/view/util/xr/RendererType",["require","exports"],function(){return{bca:"Panorama",Tba:"Model3D"}});define("tdv/player/view/util/xr/pointer/SelectionMode",["require","exports"],function(){return{PF:"gaze",RUa:"gaze_click"}});define("tdv/player/view/util/xr/SessionMode",["require","exports"],function(){return{Xp:"immersive-vr",Np:"immersive-ar"}});
define("tdv/player/view/util/xr/Type",["require","exports"],function(){return{mo:"Cardboard",epb:"WebVR",rWa:"WebXR"}});define("tdv/constants/RenderOrder",["require","exports"],function(){return{mVa:-1,wVa:0,nVa:0,VUa:0,Cob:1,sUa:2,tUa:101,UVa:0,VVa:2,aWa:2,iVa:2,$Va:2,SUa:2,gWa:100,H_:900,MVa:10,bUa:-1E3,qta:1E3,vWa:999,uWa:998,tWa:999,sWa:1E3,RVa:1E3,hpb:1001,wWa:1E3,DVa:1E3,Vua:1E4}});
define("tdv/player/view/util/xr/ui/DraggingPointerState",["require","exports"],function(){var a=function(){return function(){}}();a;return a});define("tdv/player/view/util/xr/ui/UIPointerState",["require","exports"],function(){return function(){return function(){}}()});define("tdv/view/util/EaseDimension",["require","exports"],function(){return function(){return function(a,m,h,n){n===void 0&&(n=void 0);this.name=a;this.from=m;this.to=h;this.Shb=n}}()});
define("tdv/view/util/Ease",["require","exports","tdv/view/util/EaseDimension"],function(a,m,h){function n(c){return function(d,f,l){d=Math.abs(f-d);return d/l<1?0:1/(1-Math.pow((d-l)/d,1/c))}}function g(c){var d=new b;d.doa=function(f,l,p,q){return f+(l-f)*Math.pow(p<=0?0:p>=q?1:p/q,c)};d.Epa=n(c);return d}function k(c){var d=new b;d.doa=function(f,l,p,q){return f+(l-f)*(1-Math.pow(1-(p<=0?0:p>=q?1:p/q),c))};d.Epa=n(c);return d}function e(c){var d=new b;d.doa=function(f,l,p,q){p=p<=0?0:p>=q?1:p/
q;p<.5?p=Math.pow(p*2,c):(p=1-Math.pow(1-(p*2-1),c),p+=1);return f+p*.5*(l-f)};d.Epa=n(c);return d}a=function(){function c(d,f,l){l===void 0&&(l=void 0);switch(d){case "quad_in":this.curve=g(2);break;case "quad_out":this.curve=k(2);break;case "quad_in_out":this.curve=e(2);break;case "cubic_in":this.curve=g(3);break;case "cubic_out":this.curve=k(3);break;case "cubic_in_out":this.curve=e(3);break;case "quart_in":this.curve=g(4);break;case "quart_out":this.curve=k(4);break;case "quart_in_out":this.curve=
e(4);break;case "quint_in":this.curve=g(5);break;case "quint_out":this.curve=k(5);break;case "quint_in_out":this.curve=e(5);break;default:this.curve=g(1)}this.mA=f.slice();this.time=0;this.duration=this.RIa(f,l);this.Bna={};for(d=0;d<this.mA.length;d++)this.Bna[this.mA[d].name]=f[d].from}c.prototype.nX=function(d){for(var f=0;f<this.mA.length;f++)if(this.mA[f].name==d)return this.mA[f];return null};c.prototype.ob=function(d){return this.Bna[d]};c.prototype.kpa=function(){return this.time>0};c.prototype.Ve=
function(){return this.time>=this.duration};c.prototype.lj=function(){return this.duration};c.prototype.tm=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.mA.length;d++){var f=this.mA[d];this.Bna[f.name]=this.curve.doa(f.from,f.to,this.time,this.duration)}};c.prototype.Nb=function(d){this.setTime(this.time+d)};c.prototype.RIa=function(d,f,l){l===void 0&&(l=void 0);
for(var p=[],q=0;q<this.mA.length;q++){var r=this.mA[q],t=l?l:r.Shb;t!==void 0&&t>0&&p.push(this.curve.Epa(r.from,r.to,t/1E3))}if(p.length>0){d=p[0];for(q=1;q<p.length;q++)d=Math.max(d,p[q]);return f!==void 0&&f>0?Math.max(f,d):d}return f!==void 0?Math.max(f,.001):this.RIa(d,f,1E3)};c.lj=function(){return(new c(void 0,[new h("",void 0,void 0,void 0)])).lj()};return c}();var b=function(){return function(){}}();return a});
define("tdv/view/util/Animation",["require","exports","tdv/utils","tdv/view/util/Visibility","tdv/player/view/util/Flags"],function(a,m,h,n,g){var k=window.requestAnimationFrame.bind(window),e=window.cancelAnimationFrame.bind(window),b=function(){function d(){}d.requestFrame=function(f,l,p){for(var q=0;q<d.Pt.length;q++)if(d.Pt[q].is(f,l))return;q=d.J8;p!==void 0&&(q+=p);d.Pt.push(new c(f,l,q));d.paused||d.Pw!==void 0||(d.Pw=d.EY(d.x7))};d.$Ia=function(f,l){for(var p=0;p<d.Pt.length;p++)if(d.Pt[p].is(f,
l)){d.Pt.splice(p,1);break}};d.iZ=function(f){d.paused!=f&&(d.paused=f,d.paused?d.Pw!==void 0&&(d.fna(d.Pw),d.Pw=void 0):d.Pt.length>0&&(d.Pw=d.EY(d.x7)))};d.ARa=function(f,l){d.EY!=f&&(d.Pw!==void 0&&(d.fna(d.Pw),d.Pw=f(d.x7)),d.EY=f,d.fna=l)};d.Qjb=function(){d.ARa(k,e)};d.x7=function(f){d.vKa(f);d.Pw=d.Pt.length>0?d.EY(d.x7):void 0};d.vKa=function(f){f<d.zf&&(d.startTime=f-d.J8*d.Kba,d.zf=f);var l=0;d.startTime===void 0?d.startTime=f:l=Math.round((f-d.startTime)/d.Kba);var p=(l-d.J8)*d.Kba,q=d.Pt;
d.Pt=[];d.m8=!0;d.J8=l;p=p>1?p<100?p:100:1;d.zf=f;d.fX=p;for(f=0;f<q.length;f++){var r=q[f];l<r.JNa?d.Pt.push(r):r.call(p)}d.m8=!1};d.zf=(new Date).getTime();d.fX=0;d.m8=!1;d.EY=k;d.fna=e;d.Pt=[];d.Pw=void 0;d.paused=!1;d.Kba=1E3/60;d.J8=0;d.startTime=void 0;return d}();g.hWa&&setInterval(function(){n.visible||b.vKa(b.zf+100)},100);var c=function(){function d(f,l,p){this.JNa=0;this.Gn=f;this.context=l;this.JNa=p}d.prototype.is=function(f,l){return this.Gn==f&&this.context==l};d.prototype.call=function(f){try{this.Gn.call(this.context,
f)}catch(l){h.TX("Error in animation frame",l)}};return d}();return b});
define("tdv/player/view/util/Color",["require","exports","three.mod"],function(a,m,h){return function(){function n(){}n.$jb=function(g,k){if(n.aNa(g)){var e=n.Dp(g),b,c=256;k.forEach(function(d){if(n.aNa(d)){var f=n.rQa(e,n.Dp(d));f<c&&(b=d,c=f)}});if(b&&c<=5)return b}return g};n.F7=function(g,k){return n.rQa(n.Dp(g),n.Dp(k))};n.aNa=function(g){return!!g&&g.indexOf("#")===0};n.Dp=function(g){return[parseInt(g.substr(1,2),16),parseInt(g.substr(3,2),16),parseInt(g.substr(5,2),16)]};n.rQa=function(g,
k){return Math.max(Math.abs(g[0]-k[0]),Math.abs(g[1]-k[1]),Math.abs(g[2]-k[2]))};n.haa=function(g,k){g=n.Dp(g);return"rgba(".concat(g[0],", ").concat(g[1],", ").concat(g[2],", ").concat(k,")")};n.Smb=function(g){g=n.Dp(g);return g[0]<<16|g[1]<<8|g[2]<<0};n.Ip=function(g){return new h.Color(n.Smb(g))};return n}()});
define("tdv/player/view/util/xr/ui/UIPanel","require exports three.mod tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/util/xr/ui/DraggingPointerState tdv/player/view/util/xr/ui/UIPointerState tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation tdv/player/view/util/Color".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){var l=document.createElement("canvas");l.width=l.height=64;a=function(){function C(){this.Bi=this.Cg=null;this.N9=this.Rj=this.Sj=this.kKa=0;this.Kna=
this.draggable=this.H6=this.j8=this.bY=!1;this.iKa=this.hKa=0;this.Lna=1;this.canvas=l;this.Sj=this.canvas.width;this.Rj=this.canvas.height;this.Ke=this.zdb();this.oJ=this.qdb();this.oJ.scale.set(100,100,1);this.Ke.add(this.oJ);this.group=new h.Group;this.ix=this.vna();this.group.add(this.ix);this.ul=new h.Group;this.ul.rotation.order="YXZ";this.group.add(this.ul);this.ul.add(this.Ke);this.tt=this.odb();this.draggable=!1;this.zO=null;this.ncb=new h.Quaternion;this.j8=this.H6=!1;this.Yn(1);this.jZ(.001);
this.TY(!0);C.XR.M.bind(n.Zd,this.Kg,this,!0);this.h7=new h.Sphere;this.ut=new h.Group;this.f7=new h.Object3D;this.ut.add(this.f7)}C.prototype.dispose=function(){C.XR.M.h(n.Zd,this.Kg,this);this.ieb();this.geb();this.deb();this.meb()};C.prototype.clb=function(B){this.tt.renderOrder=this.Ke.renderOrder=g.H_+B/100;this.ix.renderOrder=g.H_+(B-.5)/100};C.prototype.zdb=function(){var B=this.OO(),H=this.tna(this.canvas);B=new h.Mesh(B,H);B.rotation.order="YXZ";B.userData.NJ=!0;return B};C.prototype.ieb=
function(){this.Ke.geometry.dispose();this.Cna(this.Ke.material)};C.prototype.qdb=function(){var B=this.OO(),H=this.GJa(65280);B=new h.Mesh(B,H);B.visible=!1;B.userData.NJ=!0;return B};C.prototype.geb=function(){this.oJ.geometry.dispose();this.$Ja(this.oJ.material)};C.prototype.odb=function(){var B=this.OO(),H=document.createElement("canvas");H.width=256;H.height=64;var E=H.getContext("2d");E.shadowColor="rgba(0, 0, 0, 0.5)";E.shadowBlur=16;E.shadowOffsetX=0;E.shadowOffsetY=0;E.fillStyle="#ffffff";
E.beginPath();E.roundRect(16,16,224,32,16);E.closePath();E.fill();H=this.tna(H);H.depthTest=!1;H.transparent=!0;H.opacity=0;B=new h.Mesh(B,H);B.renderOrder=g.H_;B.userData.NJ=!0;return B};C.prototype.deb=function(){this.tt.geometry.dispose();this.Cna(this.tt.material)};C.prototype.vna=function(){var B=new h.SphereGeometry(1,32,16,0,Math.PI*2,0,Math.PI),H=this.GJa(0);H.opacity=0;B=new h.Mesh(B,H);B.renderOrder=g.H_-.005;B.userData.NJ=!0;B.visible=!1;return B};C.prototype.meb=function(){this.ix.geometry.dispose();
this.$Ja(this.ix.material)};C.prototype.OO=function(){return new h.PlaneGeometry(1,1)};C.prototype.tna=function(B){return new h.MeshBasicMaterial({map:this.EJa(B),side:h.DoubleSide,depthTest:!1,transparent:!0})};C.prototype.EJa=function(B){B=new h.CanvasTexture(B);B.colorSpace=h.SRGBColorSpace;return B};C.prototype.Cna=function(B){this.ZJa(B);B.dispose()};C.prototype.ZJa=function(B){B.map.dispose()};C.prototype.GJa=function(B){return new h.MeshBasicMaterial({color:B,side:h.DoubleSide,depthTest:!1,
transparent:!0})};C.prototype.$Ja=function(B){B.dispose()};C.prototype.pra=function(B){this.bY=B};C.prototype.pP=function(){var B;return((B=this.Bi)===null||B===void 0?void 0:B.pressed)||!1};C.prototype.YE=function(B,H){this.Cg&&(this.Cg.We=B,this.Cg.nr=H)};C.prototype.uQ=function(B){this.vnb(B);this.unb();this.aob(B)};C.prototype.aob=function(B){var H;if(B&&this.Hgb()){y.ray.copy(B.ray).applyMatrix4(B.matrixWorld);var E=this.Bi?[]:y.intersectObjects([this.Ke],!1);if((E=E.length>0?E[0]:null)&&E.uv.x>=
0&&E.uv.x<=1&&E.uv.y>=0&&E.uv.y<=1){var G=E.uv.x;var N=E.uv.y;var O=E.distance}else if((H=this.Cg)===null||H===void 0?0:H.pressed)E=y.intersectObjects([this.oJ],!1),(E=E.length>0?E[0]:null)&&E.uv.x>=0&&E.uv.x<=1&&E.uv.y>=0&&E.uv.y<=1&&(G=(E.uv.x-.5)*this.oJ.scale.x+.5,N=(E.uv.y-.5)*this.oJ.scale.y+.5,O=E.distance);E?(H=G*this.canvas.width,N=(1-N)*this.canvas.height,this.Cg||(this.Cg=new e),this.Cg.nPa=H,this.Cg.oPa=N,this.Cg.distance=O,this.Cg.pressed=B.pressed,this.Cg.Qmb=B.Qb.x,this.Cg.Rmb=B.Qb.y):
this.Cg=null}else this.Cg=null};C.prototype.vnb=function(B){var H;if(B&&this.draggable){y.ray.copy(B.ray).applyMatrix4(B.matrixWorld);if(B.pressed){if(!this.Bi)return;this.Bi.pressed||(this.Bi.pressed=!0,this.imb(y))}else this.Vra(),B=y.intersectObjects([this.tt],!1),B.length>0?(this.Bi||(this.Bi=new k),this.Bi.We=!0,this.Bi.nr=!0,this.Bi.pressed=!1,this.Bi.distance=B[0].distance):this.Bi=null;if((H=this.Bi)===null||H===void 0?0:H.pressed)this.tnb(y),y.ray.intersectSphere(this.h7,t)&&(this.Bi.distance=
t.distanceTo(y.ray.origin))}else this.Bi=null};C.prototype.unb=function(){var B,H,E;(B=this.Bi)===null||B===void 0||!B.We||(H=this.Bi)!==null&&H!==void 0&&H.pressed?this.YQa(.75):this.YQa(1);this.tkb(((E=this.Bi)===null||E===void 0?0:E.pressed)?1:.75)};C.prototype.imb=function(B){B=B.intersectObjects([this.tt],!1);B.length===0?this.Vra():(this.kKa=B[0].distance,t.copy(B[0].point).applyMatrix4(r.copy(this.group.matrixWorld).invert()),this.h7.radius=t.length(),t.normalize(),this.group.add(this.ut),
this.ut.rotation.set(t.y==0&&t.z==0?0:-Math.atan2(t.y,Math.sqrt(t.z*t.z+t.x*t.x)),t.x==0&&t.z==0?0:Math.atan2(t.x,t.z),0,"YXZ"),this.ut.updateMatrixWorld(!0),this.Ke.updateMatrixWorld(!0),t.setFromMatrixPosition(this.Ke.matrixWorld).applyMatrix4(r.copy(this.ut.matrixWorld).invert()),this.f7.position.set(t.x,t.y,t.z))};C.prototype.Vra=function(){var B;(B=this.ut.parent)===null||B===void 0||B.remove(this.ut)};C.prototype.tnb=function(B){this.ut.updateMatrixWorld(!0);if(this.Kna)t.copy(B.ray.origin).addScaledVector(B.ray.direction,
this.kKa);else if(this.h7.center.setFromMatrixPosition(this.ut.matrixWorld),!B.ray.intersectSphere(this.h7,t)){this.Vra();return}this.group.updateMatrixWorld(!0);t.applyMatrix4(r.copy(this.group.matrixWorld).invert());this.ut.rotation.set(t.y==0&&t.z==0?0:-Math.atan2(t.y,Math.sqrt(t.z*t.z+t.x*t.x)),t.x==0&&t.z==0?0:Math.atan2(t.x,t.z),0,"YXZ");B=t.length();this.ut.scale.set(B,B,B);this.group.updateMatrixWorld(!0);this.f7.updateMatrixWorld(!0);B=w;var H=x;t.setFromMatrixPosition(this.f7.matrixWorld).applyMatrix4(r.copy(this.group.matrixWorld).invert());
this.Kna&&this.Yn(t.length());H.setFromUnitVectors(u,t.normalize());B.setFromEuler(v.set(this.ul.rotation.x,this.ul.rotation.y,0,"YXZ"));B.slerp(H,.2);B.angleTo(H)<.001&&B.copy(H);v.setFromQuaternion(B,"YXZ");this.ul.rotation.x=v.x;this.ul.rotation.y=v.y};C.prototype.Qc=function(){return this.group};C.prototype.Zn=function(B){this.Ke.material.opacity=B;this.Ke.material.needsUpdate=!0};C.prototype.Yn=function(B){this.Ke.position.set(0,0,-B)};C.prototype.rj=function(B){this.ul.rotation.y=-B*p};C.prototype.Jc=
function(){return-this.ul.rotation.y*q};C.prototype.$n=function(B){this.ul.rotation.x=B*p};C.prototype.Ic=function(){return this.ul.rotation.x*q};C.prototype.Tcb=function(){this.vTa(l)};C.prototype.vTa=function(B){B.width!==this.Sj||B.height!==this.Rj?(this.Cna(this.Ke.material),this.Ke.material=this.tna(B)):this.canvas!==B&&(this.ZJa(this.Ke.material),this.Ke.material.map=this.EJa(B));this.Ke.material.map.needsUpdate=!0;this.Ke.material.needsUpdate=!0;this.canvas=B;this.Sj=this.canvas.width;this.Rj=
this.canvas.height;this.rTa();this.hTa();this.ssa()};C.prototype.Hgb=function(){return this.canvas!==l};C.prototype.jZ=function(B){this.N9!==B&&(this.N9=B,this.rTa())};C.prototype.rTa=function(){this.Ke.scale.set(this.Sj*this.N9,this.Rj*this.N9,1);this.ssa()};C.prototype.Kra=function(B){this.ix.material.opacity=B;this.ix.material.needsUpdate=!0;this.ix.visible=B>0};C.prototype.J$=function(B){this.ix.material.color=f.Ip(B||"#000000");this.ix.material.needsUpdate=!0};C.prototype.Kg=function(){this.j8?
this.jTa():this.H6&&this.inb()};C.prototype.q$=function(B){this.j8!=B&&((this.j8=B)?this.jTa():this.group.rotation.set(0,0,0,"YXZ"))};C.prototype.jTa=function(){this.group.rotation.setFromQuaternion(C.XR.xl)};C.prototype.i$=function(B){this.H6!=B&&(this.H6=B)&&(v.setFromQuaternion(C.XR.xl,"YXZ"),this.ul.rotation.x=v.x,this.ul.rotation.y=v.y)};C.prototype.inb=function(){v.setFromQuaternion(C.XR.xl,"YXZ");v.z=0;z.setFromEuler(v);A.setFromEuler(this.ul.rotation);if(this.zO){if(this.zO.Nb(d.fX),A.slerp(z,
this.zO.ob("centering")),v.setFromQuaternion(A,"YXZ"),this.ul.rotation.x=v.x,this.ul.rotation.y=v.y,z.angleTo(A)<F||this.zO.Ve())this.zO=null}else z.angleTo(A)>D&&(this.ncb.copy(z),this.zO=new b("linear",[new c("centering",0,1)],2E3))};C.prototype.TY=function(B){this.draggable!=B&&((this.draggable=B)?this.Ke.add(this.tt):this.Ke.remove(this.tt))};C.prototype.l$=function(B){this.Kna=B};C.prototype.skb=function(B,H){this.hKa=B;this.iKa=H;this.ssa()};C.prototype.YQa=function(B){this.Lna=B;this.hTa()};
C.prototype.hTa=function(){this.tt.scale.set(128/this.Sj*this.Lna,32/this.Rj*this.Lna,1)};C.prototype.tkb=function(B){this.tt.material.opacity=B;this.tt.material.needsUpdate=!0};C.prototype.ssa=function(){this.tt.position.set(-.5+this.hKa/this.Sj,.5-this.iKa/this.Rj,0)};return C}();var p=Math.PI/180,q=180/Math.PI,r=new h.Matrix4,t=new h.Vector3,u=new h.Vector3(0,0,-1),v=new h.Euler,w=new h.Quaternion,x=new h.Quaternion,y=new h.Raycaster,z=new h.Quaternion,A=new h.Quaternion,D=35*p,F=2*p;return a});
define("tdv/player/view/util/xr/ui/UI",["require","exports","tdv/player/view/util/xr/ui/UIPanel","tdv/constants/EventName"],function(a,m,h,n){return function(){function g(){}g.Adb=function(){var k=new h;this.Ek.push(k);this.XR.Zq.add(k.Qc());return k};g.Xdb=function(k){var e=this.Ek.indexOf(k);e!==-1&&(this.XR.Zq.remove(k.Qc()),this.Ek.splice(e,1),k.dispose())};g.initialize=function(){this.XR.M.bind(n.V,this.Ta,this,!0);this.Ta()};g.Ta=function(){this.XR.isPresenting?this.XR.M.bind(n.Zd,this.Kg,this,
!0):this.XR.M.h(n.Zd,this.Kg,this)};g.Hnb=function(){this.Ek=[].concat(this.Ek.filter(function(k){return!k.bY&&!k.pP()}),this.Ek.filter(function(k){return!k.bY&&k.pP()}),this.Ek.filter(function(k){return k.bY}));this.Ek.forEach(function(k,e){return k.clb(e)})};g.Kg=function(){this.Hnb();this.EZ()};g.EZ=function(){for(var k,e,b=this.XR.ud.reduce(function(t,u){return t===null||t.VP<u.VP||t.VP===u.VP&&u.handedness==="right"?u:t},null),c=!1,d=!1,f=Number.POSITIVE_INFINITY,l=!1,p=!1,q=this.Ek.length-1;q>=
0;q--)if(c||p)this.Ek[q].uQ(null);else{l=l||((k=this.Ek[q].Bi)===null||k===void 0?void 0:k.pressed)||((e=this.Ek[q].Cg)===null||e===void 0?void 0:e.pressed)||!1;this.Ek[q].uQ(b);var r=this.Ek[q].Bi;r&&r.We&&r.distance<f&&(c=!0,d=r.nr,f=r.distance);(r=this.Ek[q].Cg)?r.We&&r.distance<f&&(c=!0,d=r.nr,f=r.distance):this.Ek[q].ix.material.opacity>0&&(p=!0)}l&&b&&!b.pressed&&this.XR.PY(b,50);k=this.Ek.some(function(t){return t.bY});if(c||this.We||k||p)for(q=0;q<this.XR.ud.length;q++)this.XR.ud[q]===b?this.AIa(this.XR.ud[q],
k,p,c,d,f):this.AIa(this.XR.ud[q],k,!1,!1,!1);this.We=c};g.AIa=function(k,e,b,c,d,f){c||b||e?(k.pressed||k.nr===d||this.XR.PY(k,5),k.eA||(this.XR.xRa(k,!0),this.XR.A$(k,!1)),this.XR.YE(k,c,d,f)):k.eA&&(!k.pressed&&k.nr&&this.XR.PY(k,5),this.XR.xRa(k,!1),k.We&&this.XR.YE(k,!1,!1))};g.Ek=[];g.We=!1;return g}()});
define("tdv/player/view/util/xr/VisibilityListener",["require","exports","tdv/constants/EventName","tdv/player/view/util/Flags","tdv/view/util/Visibility"],function(a,m,h,n,g){return function(){function k(){}k.initialize=function(){this.Ta=this.Ta.bind(this);this.E9=this.E9.bind(this);this.XR.M.bind(h.V,this.Ta,this,!0);window.addEventListener("vrdisplayblur",function(){g.Ira(!0)},!0);window.addEventListener("vrdisplayfocus",function(){g.Ira(!1)},!0)};k.Ta=function(){this.XR.session?(this.mF=this.XR.session,
this.mF.addEventListener("visibilitychange",this.E9)):(this.mF&&this.mF.removeEventListener("visibilitychange",this.E9),this.mF=null);g.dB(this.XR.isPresenting)};k.E9=function(){g.Ira(!this.mF||this.mF.visibilityState!="visible");n.IUa&&this.mF.visibilityState!="visible"&&this.XR.qm()};k.mF=null;return k}()});
define("tdv/player/view/util/xr/VRAutoStart",["require","exports","tdv/player/view/util/Device","tdv/player/view/util/URL","tdv/player/view/util/xr/SessionMode"],function(a,m,h,n,g){return function(){function k(){}k.initialize=function(){this.jE=[h.su,h.tu].indexOf(h.xc())>-1;this.yTa=n.Ak("vr");if(this.jE||this.yTa)this.ZSa(),document.addEventListener("visibilitychange",function(){document.hidden||this.ZSa()}.bind(this),!1)};k.ZSa=function(){this.Ucb();this.Uma=0;this.kSa()};k.kSa=function(){this.Uma++;
this.faa=setTimeout(this.Nib.bind(this),this.yTa?500:this.Uma*1E3)};k.Ucb=function(){this.faa&&(clearTimeout(this.faa),this.faa=null)};k.Nib=function(){this.faa=null;this.jE&&this.Uma>5?window.location.reload():document.hidden||k.XR.isPresenting||(!this.wt(g.Xp)||this.jE)&&this.kSa()};k.wt=function(e){if(!this.XR.YJ)return!1;for(var b=this.XR.YJ.Ci("Model3DPlayer"),c=0;c<b.length;c++){var d=b[c];if(d.get("model")&&d.get("model").get("isLoaded"))return d.get("viewerArea").set("viewMode","vr"),!0}if(e==
g.Xp){e=this.XR.YJ.Ci("PanoramaPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("panorama"))return b.get("viewerArea").set("viewMode","vr"),!0;e=this.XR.YJ.Ci("VideoPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("video"))return b.get("viewerArea").set("viewMode","vr"),!0;e=this.XR.YJ.Ci("PhotoAlbumPlayer");for(c=0;c<e.length;c++)if(b=e[c],b.get("photoAlbum"))return b.get("viewerArea").set("viewMode","vr"),!0}return!1};return k}()});
define("tdv/player/view/util/xr/pointer/VRControllerLaser",["require","exports","tdv/constants/RenderOrder","tdv/player/view/util/Color","three.mod"],function(a,m,h,n,g){a=function(){function c(d,f){this.dot=this.ray=this.sa=null;this.sa=new g.Group;this.ray=new k(d,f);this.sa.add(this.ray.sa);this.dot=new e(d,f);this.sa.add(this.dot.sa)}c.prototype.update=function(){this.ray.update();this.dot.update()};c.prototype.dispose=function(){var d;this.sa&&(this.ray.dispose(),this.ray=null,this.dot.dispose(),
this.dot=null,(d=this.sa.parent)===null||d===void 0||d.remove(this.sa),this.sa=null)};return c}();var k=function(){function c(d,f){this.jr=this.material=this.sa=null;this.color="#ffffff";this.cb=d;this.zl=f;this.Dra();this.sa=new g.Mesh(new g.CylinderGeometry(5E-4,5E-4,.35,8),this.material);this.sa.renderOrder=h.vWa;this.sa.position.z=-.175;this.sa.position.y=-.001;this.sa.rotation.copy(new g.Euler(-Math.PI/2,0,0,"YXZ"));this.sa.updateMatrix()}c.prototype.update=function(){this.DZ();this.Ksa()};c.prototype.dispose=
function(){var d;this.sa&&(this.sa.geometry.dispose(),this.$ra(),(d=this.sa.parent)===null||d===void 0||d.remove(this.sa),this.sa=null)};c.prototype.Dra=function(){if(!this.material){var d=document.createElement("canvas");d.width=d.height=256;this.jr=d.getContext("2d");this.material=new g.MeshBasicMaterial;this.material.map=new g.Texture(d);this.material.map.colorSpace=g.SRGBColorSpace;this.material.transparent=!0;this.DZ()}};c.prototype.$ra=function(){var d,f;if(this.material){var l=(d=this.material.map)===
null||d===void 0?void 0:d.image;l.width=l.height=1;(f=this.material.map)===null||f===void 0||f.dispose();this.material.map=null;this.material.dispose();this.jr=this.material=null}};c.prototype.DZ=function(){var d=this.koa();if(this.color!==d){this.color=d;d=n.Dp(this.color).join(", ");var f=this.material.map.image,l=this.jr.createLinearGradient(0,0,0,f.height);l.addColorStop(0,"rgba("+d+", 0)");l.addColorStop(.5,"rgba("+d+", 1)");l.addColorStop(1,"rgba("+d+", 1)");this.jr.fillStyle=l;this.jr.clearRect(0,
0,f.width,f.height);this.jr.fillRect(0,0,f.width,f.height);this.material.map.needsUpdate=!0;this.material.needsUpdate=!0}};c.prototype.Ksa=function(){this.sa.visible=!this.cb.disabled&&!this.cb.hidden};c.prototype.koa=function(){return this.cb.pressed?this.zl.Q9:this.cb.nr?this.zl.pqa:this.zl.O9};return c}(),e=function(){function c(d,f){this.jr=this.$v=this.material=this.border=this.dot=this.sa=null;this.color="#ffffff";this.cb=d;this.zl=f;this.Glb();this.Dra();this.sa=new g.Group;this.border=new g.Mesh(new g.SphereGeometry(.0046,
32,32),this.$v);this.border.renderOrder=h.uWa;this.dot=new g.Mesh(new g.SphereGeometry(.004,32,32),this.material);this.dot.renderOrder=h.tWa;this.sa.add(this.dot);this.sa.add(this.border);this.gTa()}c.prototype.update=function(){this.DZ();this.gTa();this.Ksa()};c.prototype.dispose=function(){var d;this.sa&&(this.sa.remove(this.dot),this.dot.geometry.dispose(),this.$ra(),this.sa.remove(this.border),this.border.geometry.dispose(),this.Emb(),(d=this.sa.parent)===null||d===void 0||d.remove(this.sa),this.sa=
null)};c.prototype.Glb=function(){if(!this.$v){var d=document.createElement("canvas");d.width=d.height=256;var f=d.getContext("2d");f.fillStyle="rgba(0, 0, 0, 0.75)";f.clearRect(0,0,d.width,d.height);f.fillRect(0,0,d.width,d.height);f=new g.MeshBasicMaterial;f.map=new g.Texture(d);f.map.colorSpace=g.SRGBColorSpace;f.map.needsUpdate=!0;f.transparent=!0;f.depthTest=!1;f.side=g.BackSide;this.$v=f;this.$v.needsUpdate=!0}};c.prototype.Emb=function(){var d,f;if(this.$v){var l=(d=this.$v.map)===null||d===
void 0?void 0:d.image;l.width=l.height=1;(f=this.$v.map)===null||f===void 0||f.dispose();this.$v.map=null;this.$v.dispose();this.$v=null}};c.prototype.Dra=function(){if(!this.material){var d=document.createElement("canvas");d.width=d.height=256;this.jr=d.getContext("2d");var f=new g.MeshBasicMaterial;f.map=new g.Texture(d);f.map.colorSpace=g.SRGBColorSpace;f.transparent=!0;f.depthTest=!1;this.material=f;this.DZ()}};c.prototype.$ra=function(){var d,f;if(this.material){var l=(d=this.material.map)===
null||d===void 0?void 0:d.image;l.width=l.height=1;(f=this.material.map)===null||f===void 0||f.dispose();this.material.map=null;this.material.dispose();this.jr=this.material=null}};c.prototype.Ksa=function(){this.sa.visible=!this.cb.hidden&&!this.cb.disabled&&this.cb.xw!==void 0};c.prototype.gTa=function(){var d,f=this.sa.parent?b.setFromMatrixScale((d=this.sa)===null||d===void 0?void 0:d.parent.matrixWorld).x:1;d=(this.cb.xw||500)/f;this.sa.position.z=-d;this.sa.scale.set(d,d,d);this.sa.updateMatrix()};
c.prototype.DZ=function(){var d=this.koa();this.color!==d&&(this.color=d,d=this.material.map.image,this.jr.fillStyle=this.color,this.jr.clearRect(0,0,d.width,d.height),this.jr.fillRect(0,0,d.width,d.height),this.material.map.needsUpdate=!0,this.material.needsUpdate=!0)};c.prototype.koa=function(){return this.cb.pressed?this.zl.Q9:this.cb.nr?this.zl.pqa:this.zl.O9};return c}();new g.Matrix4;var b=new g.Vector3;return a});
define("tdv/player/view/util/xr/pointer/PointerState",["require","exports","three.mod"],function(a,m,h){return function(){function n(){this.id=0;this.ray=new h.Ray;this.matrixWorld=new h.Matrix4;this.disabled=!1;this.handedness="";this.We=this.nr=!1;this.mPa=0;this.xw=void 0;this.pressed=!1;this.VP=0;this.hidden=this.Hn=!1;this.Qb=new h.Vector2;this.g8=this.eA=this.PIa=this.gx=!1;this.Ht=null;this.id=n.cY++}n.cY=0;n.WB="gaze";n.F_="laser";return n}()});
define("tdv/player/view/util/xr/pointer/XRControllers","require exports tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/util/Device tdv/player/view/util/xr/pointer/VRControllerLaser tdv/player/view/util/xr/pointer/PointerState tdv/player/view/util/URL three.mod".split(" "),function(a,m,h,n,g,k,e,b,c){var d=[0,1],f="trigger grip unknown0 thumbstick buttonA buttonB pico".split(" "),l=new c.Vector3,p=new c.Vector3,q=new c.Quaternion,r=new c.Vector3;return function(){function t(){}t.initialize=
function(){this.XR.M.bind(h.V,this.Ta.bind(this),this,!0);this.XR.M.bind(h.Zd,this.Kg.bind(this),this,!0);this.Fw=this.Fw.bind(this);this.PA=this.PA.bind(this);this.g9=this.g9.bind(this);this.j9=this.j9.bind(this);this.h9=this.h9.bind(this);this.Wma=b.getQueryParameter("backURL")};t.Ra=function(u){this.enabled=u};t.isConnected=function(){return this.NO.some(function(u){return u})};t.tRa=function(u){var v;if(this.Ei.length>0!==u)if(u){var w=new c.DirectionalLight(16777215,Math.PI);w.position.set(10,
20,0);(v=this.Un)===null||v===void 0||v.add(w);this.Ei.push(w)}else for(;this.Ei.length;)v=this.Ei.pop(),(w=this.Un)===null||w===void 0||w.remove(v)};t.FRa=function(u){this.kaa!==u&&((this.kaa=u)?this.fw.forEach(this.ONa.bind(this)):this.fw.forEach(this.pQa.bind(this)))};t.dkb=function(u,v){u=this.Jfb(u);u!=-1&&(u=this.Y6[u])&&u.hapticActuators&&u.hapticActuators.length&&(u=u.hapticActuators[0],u.pulse&&u.pulse(.6,v))};t.Ta=function(){this.XR.isPresenting?this.Wa():this.ya()};t.Wa=function(){d.forEach(function(u){this.Ilb(u);
this.Jlb(u)}.bind(this))};t.ya=function(){d.forEach(function(u){this.Imb(u);this.Hmb(u);this.Gmb(u)}.bind(this))};t.Kg=function(){this.flb(this.enabled&&this.XR.Vh||null);this.EZ();this.qnb()};t.EZ=function(){var u=this;if(this.enabled){for(;this.XR.ud.length;)this.XR.ud.pop();d.forEach(function(v){var w=u.controllers[v];if(w&&u.NO[v]){var x=u.jA[v];x&&(u.rnb(v),x.matrixWorld.copy(w.matrixWorld),x.ray.origin.set(0,0,0),x.ray.direction.set(0,0,-1),w=(w=(w=u.fw[v].motionController)&&w.components["xr-standard-thumbstick"])&&
w.values,x.gx=w&&w.state=="pressed"||!1,x.Qb.set(w&&w.xAxis||0,w&&w.yAxis||0),x.PIa=u.$oa(v,"buttonB"),u.Mnb(v),u.XR.ud.push(x))}})}};t.Mnb=function(u){var v=this,w,x=this.jA[u];if(x)if(x.g8){var y=!1;if(!this.iA[u])this.iA[u]=this.XR.session.requestHitTestSource({space:this.pna[u].targetRaySpace,offsetRay:new XRRay({x:0,y:0,z:0,w:1},{x:0,y:0,z:-1,w:0})}).then(function(A){v.iA[u]=A}).catch(function(A){console.error(A);v.iA[u]=null});else if(this.iA[u]instanceof XRHitTestSource){var z=(w=this.XR.Ag)===
null||w===void 0?void 0:w.xr.getFrame();(w=z&&z.getHitTestResults(this.iA[u]))&&w.length&&(w=w[0],z=w.getPose(this.XR.referenceSpace))&&(this.NW[u]=w,x.Ht||(x.Ht=new c.Matrix4),x.Ht.fromArray(z.transform.matrix).premultiply(this.XR.Vh.matrixWorld).decompose(l,q,r).compose(l,q,r.set(1,1,1)),y=l.setFromMatrixPosition(x.matrixWorld).distanceTo(p.setFromMatrixPosition(x.Ht))/this.XR.zi>.2)}y||(x.Ht=null,this.NW[u]=null)}else typeof XRHitTestSource!=="undefined"&&this.iA[u]instanceof XRHitTestSource&&
(this.iA[u].cancel(),this.iA[u]=null,this.NW[u]=null)};t.qnb=function(){this.enabled&&d.forEach(function(u){u=this.OW[u];u===null||u===void 0||u.update()}.bind(this))};t.Plb=function(){if(!this.Xna){var u=this.XR.Ag,v=u.xr.enabled;u.$q=!0;u.xr.enabled=!1;var w=new c.RoomEnvironment(u);this.Xna=(new c.PMREMGenerator(u)).fromScene(w).texture;u.$q=!1;u.xr.enabled=v}};t.Ilb=function(u){var v=this.XR.Ag.xr.getController(u);this.controllers[u]!=v&&(v.addEventListener("selectstart",this.Fw),v.addEventListener("selectend",
this.PA),v.addEventListener("connected",this.g9),v.addEventListener("disconnected",this.j9),v.userData.NJ=!0,this.controllers[u]=v,this.jA[u]=new e,this.qna[u]=0,this.jA[u].type=e.F_)};t.Gmb=function(u){var v=this.controllers[u];v&&(v.removeEventListener("selectstart",this.Fw),v.removeEventListener("selectend",this.PA),v.removeEventListener("connected",this.g9),v.removeEventListener("disconnected",this.j9),this.controllers[u]=null)};t.Jlb=function(u){if(!this.gJ[u]){var v=this.XR.Ag.xr.getControllerGrip(u);
v.userData.NJ=!0;this.Z6||(this.Z6=new c.XRControllerModelFactory);this.Z6.path=c.YB.endsWith("/")?c.YB.slice(0,-1):c.YB;var w=this.Z6.createControllerModel(v,this.uob);w.addEventListener("loaded",this.h9);this.fw[u]=w;v.add(w);this.gJ[u]=v}};t.uob=function(u){u=Array.from(u.profiles);if(g.IJ())u=["meta-quest-touch-plus"].concat(u);else if(g.uP())u=["oculus-touch-v3"].concat(u);else if(g.ZMa())u=["generic-trigger"].concat(u);else if(g.$Ma()||u.indexOf("pico-phoenix")>=0||u.indexOf("pico-4")>=0)u=
["pico-4"].concat(u);else if(g.fNa()||u.indexOf("htc-vive-focus-3")>=0||u.indexOf("htc-vive-focus-3-plus")>=0)u=["htc-vive-focus-3"].concat(u);else if(g.Bhb()||g.shb()||g.VMa()||u.indexOf("pico-g2")>=0||u.indexOf("pico-neo2")>=0||u.indexOf("pico-neo3")>=0)u=["generic-trigger"].concat(u);return u};t.Hmb=function(u){var v,w=this.gJ[u];if(w){var x=this.fw[u];this.fw[u]=null;x.removeEventListener("loaded",this.h9);w.remove(x);this.gJ[u]=null;(v=w.parent)===null||v===void 0||v.remove(w)}};t.Klb=function(u){if(!this.OW[u]){var v=
new k(this.jA[u],this.XR.zl);this.OW[u]=v;this.controllers[u].add(v.sa)}};t.Imb=function(u){var v=this.OW[u];v&&(v.dispose(),this.OW[u]=null)};t.flb=function(u){this.Un!==u&&(this.Un=u,this.Jnb())};t.Jnb=function(){this.controllers.forEach(function(u){var v,w;u&&u.parent!=this.Un&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Un)===null||w===void 0||w.add(u))}.bind(this));this.gJ.forEach(function(u){var v,w;u&&u.parent!=this.Un&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Un)===
null||w===void 0||w.add(u))}.bind(this));this.Ei.forEach(function(u){var v,w;u.parent!==this.Un&&((v=u.parent)===null||v===void 0||v.remove(u),(w=this.Un)===null||w===void 0||w.add(u))}.bind(this))};t.Fw=function(u){var v=this.D7(u.target);if(this.NO[v]){var w=Date.now()-this.CJa[v];if(w<60){var x={target:u.target};setTimeout(function(){t.Fw(x)},60-w)}else u=this.jA[v],u.pressed=!0,u.VP=Date.now(),this.XR.M.o(h.Cu,{pointerState:u}),this.qna[v]=Date.now()}};t.PA=function(u){var v=this;u=this.D7(u.target);
if(this.NO[u]){var w=this.jA[u];w.pressed=!1;this.Wma&&(this.$oa(u,"buttonB")||this.$oa(u,"pico"))?window.location.href=this.Wma:(this.XR.M.o(h.TB,{pointerState:w}),this.qna[u]+300>Date.now()&&(this.XR.Wq&&this.NW[u]&&this.NW[u].createAnchor().then(function(x){v.XR.Wq(x)}).catch(function(x){v.XR.tO(x)}),this.XR.M.o(h.Xf,{pointerState:w})))}};t.g9=function(u){var v,w;if(u.data.targetRayMode!="gaze"){var x=this.D7(u.target);this.Klb(x);(v=this.Un)===null||v===void 0||v.add(this.controllers[x]);(w=this.Un)===
null||w===void 0||w.add(this.gJ[x]);this.NO[x]=!0;this.CJa[x]=Date.now();this.Y6[x]=u.data.gamepad;this.pna[x]=u.data;this.jA[x].handedness=u.data.handedness;this.XR.M.o(h.cta)}};t.dpa=function(u){return u.profiles.some(function(v){return v.indexOf("hand")>=0})};t.j9=function(u){var v,w;u=this.D7(u.target);(v=this.Un)===null||v===void 0||v.remove(this.controllers[u]);(w=this.Un)===null||w===void 0||w.remove(this.gJ[u]);this.NO[u]=!1;this.Y6[u]=null;this.pna[u]=null;this.XR.M.o(h.dta)};t.h9=function(u){var v=
this.fw[this.bfb(u.target)];v.userData.dpa=this.dpa(u.target.motionController.xrInputSource);v.userData.oj=!0;v.userData.cNa=!1};t.Llb=function(u){u=this.fw[u];this.Plb();u.setEnvironmentMap(this.Xna);this.kaa?this.ONa(u):this.pQa(u);u.userData.cNa=!0};t.rnb=function(u){var v=this.fw[u];v.userData.oj&&(v.userData.cNa||this.Llb(u),u=this.jA[u],v.visible=v.userData.dpa||u.hidden?!1:!0)};t.$oa=function(u,v){v=f.indexOf(v);u=this.Y6[u];if(!u)return!1;u=u.buttons.length>v?u.buttons[v]:null;return!!u&&
u.pressed};t.ONa=function(u){u&&u.traverse(function(v){if("isMesh"in v&&v.material){var w=v.material;if(!w.userData.Ot){var x=w.userData.Xhb;x||(x=w.clone(),w.userData.Xhb=x,x.userData.Ot=w,x.transparent||(x.transparent=!0,x.opacity=1,"map"in x&&x.map&&(x.map=this.kdb(x.map)),x.needsUpdate=!0));v.material=x}v.userData.iqa===void 0&&(v.userData.iqa=v.renderOrder);v.renderOrder=n.sWa}}.bind(this))};t.pQa=function(u){u&&u.traverse(function(v){if("isMesh"in v&&v.material){var w=v.material;w.userData.Ot&&
(v.material=w.userData.Ot);v.userData.iqa==void 0&&(v.renderOrder=v.userData.iqa)}}.bind(this))};t.kdb=function(u){if(!u)return null;var v=document.createElement("canvas");v.width=u.image.width;v.height=u.image.height;var w=v.getContext("2d");w.drawImage(u.image,0,0);for(var x=w.getImageData(0,0,v.width,v.height),y=x.data,z=0;z<y.length;z+=4)y[z+3]=255;w.putImageData(x,0,0);u=(new c.Texture).copy(u);u.image=v;u.needsUpdate=!0;return u};t.D7=function(u){return this.controllers.indexOf(u)};t.bfb=function(u){return this.fw.indexOf(u)};
t.Jfb=function(u){return this.XR.ud.indexOf(u)};t.enabled=!0;t.controllers=[null,null];t.NO=[!1,!1];t.CJa=[0,0];t.gJ=[null,null];t.fw=[null,null];t.Z6=null;t.OW=[null,null];t.Y6=[null,null];t.pna=[null,null];t.iA=[null,null];t.NW=[null,null];t.Ei=[];t.kaa=!1;t.jA=[];t.qna=[];t.Un=null;t.Xna=null;t.Wma=null;return t}()});
define("tdv/player/canvas/ReticleCanvas",["require","exports"],function(){return function(){function a(m){this.Ne=this.ev(m.O9);this.Dz=this.ev(m.Q9);this.Qz=this.fm([0,0,0],0);this.h5=this.fm([0,0,0],.125);this.X_a=this.fm(this.Ne,1);this.Y_a=this.fm(this.Dz,1);this.hZa=this.fm(this.Dz,1);this.gZa=this.fm(this.Ne,.5);this.eZa=this.fm(this.Ne,1);this.fZa=this.fm(this.Dz,1);this.Pm=this.Ih=128;this.Yca=4E3;this.Exa=.1;this.Qm=.16;this.Jq=.04;this.Gwa=this.n0=.68-this.Jq;this.m0=1-this.Jq;this.ja=document.createElement("canvas");
this.ja.width=this.Ih;this.ja.height=this.Pm;this.ga=this.ja.getContext("2d");this.Cd=this.ey=!1;this.FM=this.P3=void 0;this.nG=0}a.prototype.ev=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.fm=function(m,h){return"rgba("+m.join(",")+", "+h+")"};a.prototype.pK=function(m,h){this.Cd=m;this.P3=h};a.prototype.cB=function(m){this.ey=m};a.prototype.fg=function(){return this.Ih};a.prototype.wg=function(){return this.Pm};
a.prototype.If=function(){return this.ja};a.prototype.update=function(m){return this.ey?this.a0a(m):this.Cd?this.f0a():this.e0a()};a.prototype.dispose=function(){this.ga=null;this.ja.width=this.ja.height=1};a.prototype.NL=function(){var m;(m=this.ga)===null||m===void 0||m.clearRect(0,0,this.Ih,this.Pm)};a.prototype.e0a=function(){if(this.FM==a.Ata)return!1;this.NL();this.Kxa(this.X_a,1);this.FM=a.Ata;return!0};a.prototype.f0a=function(){if(this.P3===void 0){if(this.FM==a.ea)return!1;this.NL();this.Kxa(this.Y_a,
2)}else this.b6a(this.P3);this.FM=a.ea;return!0};a.prototype.a0a=function(m){for(this.nG+=m;this.nG>this.Yca;)this.nG-=this.Yca;this.bZa(this.nG/this.Yca);this.FM=a.$Z;return!0};a.prototype.Kxa=function(m,h){this.Xk(this.Exa*h+this.Jq,0,this.Qz,this.h5,0,2*Math.PI);this.Xk(this.Exa*h,0,this.Qz,m,0,2*Math.PI)};a.prototype.g0a=function(m){this.Xk(this.n0-(this.Qm+this.Jq)*.5,this.Qm+this.Jq,this.h5,this.Qz,0,2*Math.PI);this.Xk(this.n0-this.Qm*.5,this.Qm,this.gZa,this.Qz,0,2*Math.PI);this.Xk(this.n0-
this.Qm*.5,this.Qm,this.hZa,this.Qz,.5*Math.PI,(.5+m*2)*Math.PI)};a.prototype.b0a=function(m,h){this.Xk(this.Gwa-(this.Qm+this.Jq)*.5,this.Qm+this.Jq,this.h5,this.Qz,0,2*Math.PI);this.Xk(this.Gwa-this.Qm*.5,this.Qm,this.eZa,this.Qz,0,2*Math.PI);m=(.5+m*2)*Math.PI;for(h=(.5+h*2)*Math.PI;h<m;)h+=2*Math.PI;var n=m-this.Jq/(this.m0*2*Math.PI),g=h+this.Jq/(this.m0*2*Math.PI);Math.abs(g-n+2*Math.PI)<this.Jq*2&&(n=0,g=h);this.Xk(this.m0-(this.Qm+this.Jq)*.5,this.Qm+this.Jq,this.h5,this.Qz,n,g);this.Xk(this.m0-
this.Qm*.5,this.Qm,this.fZa,this.Qz,m,h)};a.prototype.Xk=function(m,h,n,g,k,e){var b=Math.round(this.Ih*.5),c=Math.round(this.Pm*.5),d=Math.min(b,c);m=Math.round(m*d);var f=this.ga;f&&(f.imageSmoothingEnabled=!0,f.lineWidth=h*d,f.strokeStyle=n,f.fillStyle=g,f.beginPath(),f.arc(b,c,m,k,e,!1),f.stroke(),f.fill())};a.prototype.bZa=function(m){this.NL();if(m<.25){var h=m/.25;m=.5*h}else m<.5?(h=(m-.25)/.25,m=.5+h,h=1+h*.5):m<.75?(h=(m-.5)/.25,m=.5+.5*h,h=.5+h):(m=h=(m-.75)/.25,h=.5+h*.5);this.b0a(m,h)};
a.prototype.b6a=function(m){this.NL();this.g0a(m)};a.Ata="initial";a.$Z="changing";a.ea="over";return a}()});define("tdv/player/view/panorama/renderer/constants/Face",["require"],function(){return{Yob:"single",FRONT:"front",fb:"left",BACK:"back",Db:"right",Tc:"top",Gc:"bottom"}});
define("tdv/player/view/panorama/renderer/3d/util/GeometryUtil",["require","tdv/player/view/panorama/renderer/constants/Face"],function(a){a=a("tdv/player/view/panorama/renderer/constants/Face");var m={},h=Math.PI/180,n=new THREE.Matrix4;new THREE.Matrix4;var g=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];m.th=500;m.Qaa=m.th*.5;m.TVa=m.th;m.Cua=[a.FRONT,a.Db,a.BACK,a.fb,a.Tc,a.Gc];m.MJa=function(k,e){for(var b=m.th,c=m.Qaa,d=k*e,f=this.SL(),
l=[],p=0,q=6*d;p<q;p++)l.push(p);p=[];var r=d;p.push(this.wL(f,k,e,-c,+c,-c,+b,0,-b,0,l.slice(0,r)));q=r;r+=d;p.push(this.wL(f,k,e,+c,+c,-c,0,+b,-b,0,l.slice(q,r)));q=r;r+=d;p.push(this.wL(f,k,e,+c,+c,+c,-b,0,-b,0,l.slice(q,r)));q=r;r+=d;p.push(this.wL(f,k,e,-c,+c,+c,0,-b,-b,0,l.slice(q,r)));q=r;r+=d;p.push(this.wL(f,k,e,-c,+c,+c,+b,0,0,-b,l.slice(q,r)));p.push(this.wL(f,k,e,-c,-c,-c,+b,0,0,+b,l.slice(r,r+d)));f.mergeVertices();f.computeFaceNormals();f.userData.type="cube";f.userData.xMa=k;f.userData.DTa=
e;f.userData.ajb=p;return m.KV(f)};m.PO=function(){var k=this.SL();this.Eva(k,-.5,.5,0,1,0,0,0,-1,0,0);k.mergeVertices();k.computeFaceNormals();k.userData.type="plane";return m.KV(k)};m.LJa=function(k,e,b,c,d,f,l,p,q,r,t,u){var v=this.SL();v.vertices.push(new THREE.Vector3(k,e,b));v.vertices.push(new THREE.Vector3(c,d,f));v.vertices.push(new THREE.Vector3(l,p,q));v.vertices.push(new THREE.Vector3(r,t,u));v.faces.push(new THREE.Face3(0,2,1,null,null,0));v.faceVertexUvs[0].push([new THREE.Vector2(0,
1),new THREE.Vector2(1,0),new THREE.Vector2(1,1)]);v.faces.push(new THREE.Face3(0,3,2,null,null,0));v.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(0,0),new THREE.Vector2(1,0)]);v.mergeVertices();v.computeFaceNormals();v.userData.type="quad";return m.KV(v)};m.wRa=function(k,e,b,c,d){k=m.kla(k);var f=k.faceVertexUvs[0][0];f[0].x=e;f[0].y=b+d;f[1].x=e;f[1].y=b;f[2].x=e+c;f[2].y=b;f=k.faceVertexUvs[0][1];f[0].x=e;f[0].y=b+d;f[1].x=e+c;f[1].y=b;f[2].x=e+c;f[2].y=b+d;k.uvsNeedUpdate=
!0;return m.KV(k,!0)};m.Dt=function(){return m.Qaa};m.Coa=function(k,e){return 2*k*Math.tan(e*.5*h)};m.Doa=function(k,e){return 2*k*Math.tan(e*.5*h)};m.ow=function(k){return Math.max(Math.min(3.539647*k-6.669366*k*k+4.7454*k*k*k,m.Qaa),.1)};m.SL=function(){var k=new THREE.Geometry;k.userData={};return k};m.dispose=function(k){k&&(k.isBufferGeometry&&k.userData&&k.userData.geometry&&k.userData.geometry.dispose(),k.isGeometry&&k.userData&&k.userData.CO&&k.userData.CO.dispose(),k.dispose())};m.KV=function(k,
e){if(k.isBufferGeometry)return k;if(k.isGeometry){if(!k.userData.CO||e)k.userData.CO&&k.userData.CO.dispose(),e=k.toBufferGeometry(),(e.userData={}).geometry=k,k.userData.CO=e;return k.userData.CO}return null};m.kla=function(k){return k.isGeometry?k:k.isBufferGeometry&&k.userData&&k.userData.geometry?k.userData.geometry:null};m.wL=function(k,e,b,c,d,f,l,p,q,r,t){for(var u={},v=0,w=0;w<b;w++){u[w]={};for(var x=0;x<e;x++)this.Eva(k,c+l*x/e+0*w/b,d+0*x/e+q*w/b,f+p*x/e+r*w/b,l/e,0/e,p/e,0/b,q/b,r/b,
t[v]),u[w][x]=k.faces.slice(k.faces.length-2,k.faces.length),v+=1}return u};m.Rpb=function(k,e,b){e=e*.5/Math.tan(b*.5);n.copy(k);k=g[0];k.x=0;k.y=0;k.z=0;k.applyMatrix4(n);b=Math.sqrt(k.x*k.x+k.y*k.y+k.z*k.z);var c=e/k.z,d=g[1];d.x=k.x*c;d.y=k.y*c;d.z=e;return b/Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)};m.zfb=function(k,e,b){k=m.kla(k);n.copy(e.matrixWorldInverse).multiply(b);switch(k.userData.type){case "cube":return m.C2a(k,n,e.projectionMatrix);default:return m.D2a(k)}};m.sfb=function(k,e,b){k=m.kla(k);
switch(k.userData.type){case "plane":return m.g2a(k,e,b);case "quad":return m.Kya(k,1,e,b)||m.Kya(k,0,e,b);default:return null}};m.Eva=function(k,e,b,c,d,f,l,p,q,r,t){var u=k.vertices.length;k.vertices.push(new THREE.Vector3(e,b,c));k.vertices.push(new THREE.Vector3(e+p,b+q,c+r));k.vertices.push(new THREE.Vector3(e+d+p,b+f+q,c+l+r));k.vertices.push(new THREE.Vector3(e+d,b+f,c+l));k.faces.push(new THREE.Face3(u,u+1,u+2,null,null,t));k.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(0,
0),new THREE.Vector2(1,0)]);k.faces.push(new THREE.Face3(u,u+2,u+3,null,null,t));k.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(1,0),new THREE.Vector2(1,1)])};m.g2a=function(k,e,b){var c=k.faces[0],d=k.faces[1],f=g[0],l=g[1],p=g[2];f.copy(k.vertices[c.a]).applyMatrix4(e);l.copy(k.vertices[d.c]).applyMatrix4(e);p.copy(k.vertices[c.b]).applyMatrix4(e);e=l.x-f.x;d=l.y-f.y;var q=l.z-f.z;l=p.x-f.x;var r=p.y-f.y;p=p.z-f.z;var t=d*p-q*r,u=q*l-e*p,v=e*r-d*l,w=b.direction.x*t+b.direction.y*
u+b.direction.z*v;if(w!=0&&(v=-(t*(b.origin.x-f.x)+u*(b.origin.y-f.y)+v*(b.origin.z-f.z))/w,!(v<=0||(t=b.origin.x+b.direction.x*v-f.x,u=b.origin.y+b.direction.y*v-f.y,f=b.origin.z+b.direction.z*v-f.z,b=(e*t+d*u+q*f)/(e*e+d*d+q*q),f=(l*t+r*u+p*f)/(l*l+r*r+p*p),e=k.faceVertexUvs[0][0][0],d=k.faceVertexUvs[0][1][2],k=k.faceVertexUvs[0][0][1],b<0||b>1||f<0||f>1))))return{$Sa:e.x+(d.x-e.x)*b+(k.x-e.x)*f,ATa:e.y+(d.y-e.y)*b+(k.y-e.y)*f,materialIndex:c.materialIndex}};m.Kya=function(k,e,b,c){var d=k.faces[e],
f=g[0],l=g[1],p=g[2];f.copy(k.vertices[d.a]).applyMatrix4(b);l.copy(k.vertices[d.b]).applyMatrix4(b);p.copy(k.vertices[d.c]).applyMatrix4(b);b=l.x-f.x;var q=l.y-f.y,r=l.z-f.z;l=p.x-f.x;var t=p.y-f.y;p=p.z-f.z;var u=q*p-r*t,v=r*l-b*p,w=b*t-q*l,x=c.direction.x*u+c.direction.y*v+c.direction.z*w;if(x!=0&&(w=-(u*(c.origin.x-f.x)+v*(c.origin.y-f.y)+w*(c.origin.z-f.z))/x,!(w<=0))){u=c.origin.x+c.direction.x*w-f.x;v=c.origin.y+c.direction.y*w-f.y;c=c.origin.z+c.direction.z*w-f.z;if((f=t*b-l*q)!=0)b=(v*b-
u*q)/f,q=(v*l-u*t)/-f;else if((f=p*b-l*r)!=0)b=(v*b-u*q)/f,q=(v*l-u*t)/-f;else if((f=p*q-t*r)!=0)b=(c*q-v*r)/f,q=(c*t-v*p)/-f;else return;if(!(q<0||q>1||b<0||b>1||q+b>1))return l=k.faceVertexUvs[0][e][0],t=k.faceVertexUvs[0][e][1],k=k.faceVertexUvs[0][e][2],{$Sa:l.x+(t.x-l.x)*q+(k.x-l.x)*b,ATa:l.y+(t.y-l.y)*q+(k.y-l.y)*b,materialIndex:d.materialIndex}}};m.C2a=function(k,e,b){var c=Array.prototype.concat.apply([],k.userData.ajb.map(function(d){return m.dza(e,b,d,k.vertices,0,0,k.userData.xMa,k.userData.DTa).map(function(f){return f.materialIndex})}));
return m.pza(c)};m.D2a=function(k){k=k.faces.map(function(e){return e.materialIndex});return m.pza(k)};m.pza=function(k){var e={};k.forEach(function(c){e[c]=!0});k=[];for(var b in e)k.push(b);return k};m.dza=function(k,e,b,c,d,f,l,p){var q=[];if(m.m$a(k,e,c[b[f][d][0].a],c[b[f+p-1][d][0].b],c[b[f+p-1][d+l-1][0].c],c[b[f][d+l-1][1].c]))if(l==1&&p==1)q.push(b[f][d][0]);else for(f=p>1?[f,f+Math.ceil(p*.5),f+p]:[f,f+p],d=l>1?[d,d+Math.ceil(l*.5),d+l]:[d,d+l],l=1;l<f.length;l++){p=f[l-1];for(var r=f[l]-
p,t=1;t<d.length;t++){var u=d[t-1];q=q.concat(m.dza(k,e,b,c,u,p,d[t]-u,r))}}return q};m.m$a=function(k,e,b,c,d,f){var l=[null,null,null,null,null];g[0].copy(b).applyMatrix4(k);g[1].copy(c).applyMatrix4(k);g[2].copy(d).applyMatrix4(k);g[3].copy(f).applyMatrix4(k);b=0;c=4;for(k=0;k<4;k++){d=g[(k+3)%4];f=g[k];var p=g[(k+1)%4];if(f.z<=0)l[b++]=f;else{if(d.z<=0){var q=g[c++],r=d.z/(d.z-f.z);q.x=d.x+(f.x-d.x)*r;q.y=d.y+(f.y-d.y)*r;q.z=-1E-5;l[b++]=q}p.z<=0&&(q=g[c++],r=f.z/(f.z-p.z),q.x=f.x+(p.x-f.x)*r,
q.y=f.y+(p.y-f.y)*r,q.z=-1E-5,l[b++]=q)}}if(b>2){for(k=0;k<b;k++)l[k].applyMatrix4(e);k=0;for(e=b-2;k<e;k++)if(b=l[k],c=l[k+1],d=l[k+2],!(b.x>1&&c.x>1&&d.x>1||b.x<-1&&c.x<-1&&d.x<-1||b.y>1&&c.y>1&&d.y>1||b.y<-1&&c.y<-1&&d.y<-1))return!0}return!1};m.NJa=function(k,e,b,c,d,f,l,p,q){var r=k*h,t=-r*.5+Math.PI*.5,u=e*h,v=(Math.PI-u)*.5-b*h,w=m.TVa*.5,x=64/Math.PI,y=Math.max(2,Math.ceil(r/c*x));x=Math.max(2,Math.ceil(u/d*x));for(var z=c*y,A=d*x,D=this.SL(),F=0,C=[],B=0;B<=A;B++){for(var H=[],E=v+B*u/A,
G=0;G<=z;G++){var N=-(t+G*r/z);D.vertices.push(new THREE.Vector3(-w*Math.cos(N)*Math.sin(E),+w*Math.cos(E),+w*Math.sin(N)*Math.sin(E)));H.push(F++)}C.push(H)}for(t=r=0;t<d;t++)for(u=t*x,v=0;v<c;v++){w=v*y;for(B=0;B<x;B++)for(z=l+(1-B/x)*q,A=l+(1-(B+1)/x)*q,G=0;G<y;G++){F=f+G/y*p;H=f+(G+1)/y*p;E=C[u+B][w+G];N=C[u+B+1][w+G+1];var O=C[u+B][w+G+1];D.faces.push(new THREE.Face3(E,C[u+B+1][w+G],N,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(F,z),new THREE.Vector2(F,A),new THREE.Vector2(H,A)]);
D.faces.push(new THREE.Face3(E,N,O,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(F,z),new THREE.Vector2(H,A),new THREE.Vector2(H,z)])}r++}D.mergeVertices();D.computeFaceNormals();D.userData.type="sphere";D.userData.Wd=k;D.userData.Mk=e;D.userData.pitch=b;D.userData.xMa=c;D.userData.DTa=d;return m.KV(D)};return m});
define("tdv/player/view/util/xr/pointer/Reticle","require exports tdv/constants/RenderOrder tdv/player/canvas/ReticleCanvas tdv/view/util/Animation three.mod tdv/player/view/panorama/renderer/3d/util/GeometryUtil".split(" "),function(a,m,h,n,g,k,e){a=function(){function c(d,f){this.UO=this.KE=null;this.cb=d;this.zl=f;this.sa=new k.Group;this.canvas=new n(this.zl);this.sa.add(this.KE=this.Ddb());this.sa.add(this.UO=this.pdb())}c.prototype.update=function(){this.canvas.update(g.fX)&&(this.KE.material.map.needsUpdate=
!0);var d=e.ow(this.zl.CPa||2),f=2*d*Math.tan(c.xu/2);this.sa.matrixAutoUpdate=!1;this.sa.matrixWorldNeedsUpdate=!1;this.sa.matrix.identity();this.sa.matrix.multiply(b.makeTranslation(0,0,-d));this.sa.matrix.multiply(b.makeScale(f,f,f));this.sa.updateMatrixWorld(!0)};c.prototype.nf=function(d){this.KE.material.opacity=d};c.prototype.pK=function(d,f){f===void 0&&(f=void 0);this.canvas.pK(d,f)};c.prototype.cB=function(d){this.canvas.cB(d)};c.prototype.dispose=function(){var d,f,l;this.KE||(this.keb(this.KE),
(d=this.KE.parent)===null||d===void 0||d.remove(this.KE),this.KE=null);this.UO||(this.eeb(this.UO),(f=this.UO.parent)===null||f===void 0||f.remove(this.UO),this.UO=null);this.canvas.dispose();(l=this.sa.parent)===null||l===void 0||l.remove(this.sa);this.sa=null};c.prototype.eeb=function(d){d.geometry.dispose();var f=d.material.map.source;f.width=f.height=1;d.material.map.dispose()};c.prototype.pdb=function(){var d=document.createElement("canvas");d.width=d.height=256;d=new k.CanvasTexture(d);d=new k.MeshBasicMaterial({map:d,
transparent:!0,side:k.DoubleSide});d.depthWrite=!1;d.depthTest=!1;d=new k.Mesh(new k.PlaneGeometry,d);d.renderOrder=h.Vua;d.frustumCulled=!1;return d};c.prototype.keb=function(d){d.geometry.dispose();d.material.map.dispose();d.material.dispose()};c.prototype.Ddb=function(){this.canvas.update(10);var d=new k.CanvasTexture(this.canvas.If());d.colorSpace=k.SRGBColorSpace;d=new k.MeshBasicMaterial({map:d,transparent:!0,side:k.DoubleSide});d.depthWrite=!1;d.depthTest=!1;d=new k.Mesh(new k.PlaneGeometry,
d);d.renderOrder=h.Vua;d.frustumCulled=!1;return d};c.xu=6*Math.PI/180;return c}();var b=new k.Matrix4;return a});
define("tdv/player/view/util/xr/pointer/XRGazePointer","require exports tdv/constants/EventName tdv/player/view/util/xr/pointer/PointerState tdv/player/view/util/xr/pointer/Reticle tdv/player/view/util/xr/pointer/SelectionMode three.mod".split(" "),function(a,m,h,n,g,k,e){a=function(){function p(){}p.initialize=function(){this.Fw=this.Fw.bind(this);this.PA=this.PA.bind(this);this.XR.M.bind(h.V,this.Ta.bind(this),this,!0);this.XR.M.bind(h.Zd,this.Kg.bind(this),this,!0);this.XR.M.bind(h.Wr,this.Eib.bind(this),
this,!0);this.cb.type=n.WB};p.Ra=function(q){this.enabled=q;this.hx()};p.Ta=function(){this.hx()};p.Kg=function(){this.setCamera(this.enabled&&this.XR.Mw||null);this.EZ();this.Pnb()};p.Eib=function(){var q=this;this.enabled&&(this.XR.Wq&&this.GX&&this.GX.createAnchor().then(function(r){q.XR.Wq(r)}).catch(function(r){q.XR.tO(r)}),this.XR.Vqa==k.E_&&this.XR.M.o(h.Xf,{pointerState:this.cb}))};p.hx=function(){this.XR.isPresenting&&this.enabled?this.Hra():this.dsa()};p.setCamera=function(q){this.camera!==
q&&(this.camera=q,this.Rnb())};p.EZ=function(){var q=this,r;this.XR.bP.origin.copy(this.XR.Ec);this.XR.bP.direction.set(0,0,-1).applyQuaternion(this.XR.ug);if(this.enabled){if(this.XR.ud.length!=1&&this.XR.ud[0]!==this.cb){for(;this.XR.ud.length;)this.XR.ud.pop();this.XR.ud.push(this.cb)}this.cb.matrixWorld.copy(f.compose(this.XR.Ec,this.XR.ug,l));this.cb.ray.origin.set(0,0,0);this.cb.ray.direction.set(0,0,-1);if(this.cb.g8){var t=!1;if(!this.AA){var u=this.XR.session;this.AA=u.requestReferenceSpace("viewer").then(function(w){return u.requestHitTestSource({space:w}).then(function(x){q.AA=
x})}).catch(function(w){console.error(w);q.AA=null})}else if(typeof XRHitTestSource!=="undefined"&&this.AA instanceof XRHitTestSource){var v=(r=this.XR.Ag)===null||r===void 0?void 0:r.xr.getFrame();(r=v&&v.getHitTestResults(this.AA))&&r.length&&(r=r[0],v=r.getPose(this.XR.referenceSpace))&&(this.GX=r,this.cb.Ht||(this.cb.Ht=new e.Matrix4),this.XR.Vh.matrixWorld.decompose(b,c,d),this.cb.Ht.fromArray(v.transform.matrix).premultiply(this.XR.Vh.matrixWorld).decompose(b,c,d).compose(b,c,d.set(1,1,1)),
t=!0)}t||(this.GX=this.cb.Ht=null)}else typeof XRHitTestSource!=="undefined"&&this.AA instanceof XRHitTestSource&&(this.AA.cancel(),this.GX=this.AA=null)}};p.Rnb=function(){this.Cf&&this.Cf.sa.parent!==this.camera&&(this.Cf.sa.parent&&this.Cf.sa.parent.remove(this.Cf.sa),this.camera.add(this.Cf.sa))};p.Hra=function(){var q;this.Cf||(this.Cf=new g(this.cb,this.XR.zl),(q=this.camera)===null||q===void 0||q.add(this.Cf.sa),this.controller=this.XR.Ag.xr.getController(0),this.controller.addEventListener("selectstart",
this.Fw),this.controller.addEventListener("selectend",this.PA))};p.dsa=function(){this.Cf&&(this.Cf.dispose(),this.Cf=null,this.controller.removeEventListener("selectstart",this.Fw),this.controller.removeEventListener("selectend",this.PA),this.controller=null)};p.Pnb=function(){var q,r,t,u;if(this.enabled){if(this.We=this.cb.We)this.jSa=this.cb.mPa;var v=Date.now();if(this.XR.Vqa==k.PF){var w=this.We?v-this.jSa:0;var x=this.XR.zl.GPa;this.lPa<x&&w>=x&&this.XR.M.o(h.Xf,{pointerState:this.cb});this.lPa=
w;(q=this.Cf)===null||q===void 0||q.pK(this.We&&this.cb.nr,Math.min(1,w/x))}else(w=this.Cf)===null||w===void 0||w.pK(this.cb.nr);this.cb.We||this.cb.Hn?this.FX=void 0:this.FX==void 0&&(q=this.XR.zl.TKa,q!==void 0&&(this.FX=v+q));v=(this.FX!==void 0?this.FX:Infinity)-v;(r=this.Cf)===null||r===void 0||r.nf(this.cb.hidden?0:Math.max(.01,Math.min(1,v/500)));(t=this.Cf)===null||t===void 0||t.cB(this.cb.Hn);(u=this.Cf)===null||u===void 0||u.update()}};p.Fw=function(){this.cb.pressed=!0;this.cb.VP=Date.now();
this.XR.M.o(h.Cu,{pointerState:this.cb})};p.PA=function(){this.cb.pressed=!1;this.XR.M.o(h.Cu,{pointerState:this.cb});this.XR.M.o(h.Xf,{pointerState:this.cb})};p.cb=new n;p.enabled=!1;p.camera=null;p.Cf=null;p.We=!1;p.jSa=0;p.lPa=0;p.FX=void 0;p.controller=null;p.AA=null;p.GX=null;return p}();var b=new e.Vector3,c=new e.Quaternion,d=new e.Vector3,f=new e.Matrix4,l=new e.Vector3(1,1,1);return a});
define("tdv/player/view/util/xr/pointer/XRPointer","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/xr/pointer/PointerType tdv/player/view/util/xr/SessionMode tdv/player/view/util/xr/pointer/XRControllers tdv/player/view/util/xr/pointer/XRGazePointer".split(" "),function(a,m,h,n,g,k,e,b){return function(){function c(){}c.plb=function(d){this.tqa=d};c.initialize=function(){this.XR.M.bind(h.V,this.Ta.bind(this),this,!0);this.XR.M.bind(h.Zd,this.Kg.bind(this),
this,!0);this.XR.M.bind(h.cta,this.jib.bind(this),this,!0);this.XR.M.bind(h.dta,this.kib.bind(this),this,!0)};c.Ta=function(){this.taa()};c.Kg=function(){this.Wq!==this.XR.Wq&&(this.Wq=this.XR.Wq,this.taa())};c.jib=function(){this.taa()};c.kib=function(){this.taa()};c.taa=function(){var d=this.XR.isPresenting?this.XR.Wq&&n.ub()&&!n.kf()?g.PF:this.tqa===g.QF&&e.isConnected()?g.QF:this.tqa!==g.QF||this.XR.Cm!==k.Np||n.kf()?g.PF:g.QF:null;this.pointerType!==d&&(this.pointerType=d,e.Ra(d===g.QF),b.Ra(d===
g.PF))};c.tqa=g.QF;c.pointerType=null;c.Wq=null;return c}()});define("tdv/player/view/util/xr/XRSettings",["require","exports"],function(){return function(){return function(){this.TKa=1E3;this.O9="#ffffff";this.CPa=2;this.pqa="#007acc";this.Q9="#ff6600";this.GPa=1200;this.PKa=0}}()});define("tdv/view/core/ZIndex",["require","exports"],function(){return{dUa:"2",Mua:"1",kWa:"auto",SVa:"1",hua:"2",zVa:"auto",Faa:"2",bta:"3",gUa:"auto",wua:"5",dWa:"100",Aob:"101",MUa:999998,dpb:999999,$Ua:1E6}});
define("tdv/view/util/Assets",["require","exports"],function(){return{mo:"data:image/png;base64, ",
TUa:"data:image/png;base64, ",
Sba:"data:image/jpeg;base64, ",
vua:"data:image/png;base64, ",
z_:"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==",
bWa:"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",
Paa:"data:image/png;base64, ",
Ex:"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",
iL:115,u_:115,hL:"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=",
FVa:115,EVa:115,Xp:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAB1CAMAAABKxC7JAAAAh1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQkJBMTEwAAADz8/M8PDzLy8ugoKDu7u5wcHA6Ojr8/PxmZmYUFBTz8/Pi4uKvr6+AgIAnJyfo6Oi8vLzm5ua9vb1fX1/S0tL4+PjZ2dmPj4/JycmsrKyGhoafn58UFBTb29v///9i05URAAAALHRSTlO0AL0KwyYRGDMuHuPUyfxC8WbN29DzT8jaterfzMGC+e3XnOf15Y52W+fOqAzih28AAAcuSURBVGje1JWJcqpAEEUJkrxBZHHfUNEY1/n/73s9wzQ31ACiUq/qXVKpklKPp7uncT7+ff4TZs/6s9IJEzT9j5O/ArlrZk9ddQG1OybkvnT+mEsHzt0xWTCn2dFoYN9lAmhw/X7/sxy6Y7igvsYEEUDg7PQZi86+xASx4Pm+L4S4DDkzQfH9HEtcyD7JBJEV+zmPaKf7aCp/53t03yqy5oL6KlMhWZF4s9MGuHKmy21MWFCh+gyTq9rPDePTggFRkgWcJJGcDWF9H9QXmKaPueJwaXBZMJh75aT7IGFbKrKhQrUlE2XVxPNIquyuE0K4VhR4v4py2aGhKtXWnqirIQ41MVoBWIPNNHVErlBtwcS8fhnkTBN343kJ6HBK2DTQsvfYqPYorT11XbXkYaqJUDSo4lIBda6p07MQqG8rJuo6W6iqBgWxoHH4JbDzq26rVtX1bcEEUoitksx0VQGsir7L1EmiNsWlqG8DE71k5FJJ7kGs5sHX4QqvJWUrBKDNTIOkJaCGJzGSUGwIqJMjfXYJaDOzVyBVKwOWBK8Nlbq6UtC4BurUI6MxSyKtqQFBFwqKc1rDLCEnjHyOaqBjQGuY0KTxARLEZwLoRvhcXZuJkS0jQXyuvgxdAlrJZKTYAPlaXEAPQu2Gcksdu5kHeusAli8F0LPdUsdq5pDeOIblW6YrWr4zVNdicjNp4a3etIQpLYeROqVVTFSWmnmE5bumaWRaylAwoXlW8wPLt0331ClTXTBLmiL+lnJtbZ93WppRdSFqMfOZPaKZXYjOI5pdFgUTmjN9TGDZhelaym8WBROaS5rZjiwxuzsptyzKTAyt0kyh2ZHoAKLMxNB2qwnTBKIlptKMp9DsiMjnZcGizOx95Jqnek233VUjSh0dKtGCiQla8NBavLaxqa4Z3aUWNUyU9iLljjXtz7WIxlaJzmnVC78oroMJupsVZFuug7YZu5U/ODN7wTC5nb6gtZdWaLpuItsncCu3LooLz/xwHqu66U7kE4lct7a4YHI7t1IGlcyBfCae1RtT3IvPj1GnaOeGplYj3S6YCC/dk+CGOnw6VTsrJ8h7mQlRj/qzMQ2Fpx9LmVSclPeYEOWdCya1cyjl1SNk9568c2OfmTxCJzqd0Ozcc0Xrj7cCMfPn2IFHqEtPNDTIny1l5ggbodbzOE5v+0SWkw1uk3VUzYQofcmBN5HTA9N74JmFYeiF4aqEHIcqt2OjJ5hf7KmOysIw6z2jW+hRwnD32zLMb04eeKZSjgomH08pkwee19DTCztcS2SgbxI0afb0iCkKzx6YzZ57Zg4kEvLNn3pPMD9RWzCdBs8f/vq9RNK/tJnbTsMwDEDFijTESlXYG1TqyxBi4v+/D9eLdZTaklct9QtlgbnHcRxf7MPPlBOdNSeYnnOUnVvMWDnRV7HtddjA2eWcuKi6i/yODNPtw9+/LZxP+X4CJXJWosv01uvD3C9HRVRu5eSshJxQjeOsD/NVNJXzcRlH0Z5wTtF+fiTn0wQzq68ieRzSs0LsU51TwonMonJpd8GXcMY6LcbnnFa7aeS+i5MYfyTG212WcXJq5C9LcZnfn9xl3CvdkTs74QTTXj/nrO/sjjyB3MS9ZO8xy7sBmnL63ERT6tBx0ekwAU046xyMvI9ccy0upyZeybetQYcovyXXhNMqwdNzwOlqh76adaxAT+6tXU5NHv9C7VCL1Ujfi8hPM4YxnFkMayT1b6sd0EmNBGj9T8jqrXQRoQ6IayTqsrgWRHxhy5JfjMuVH9tOOMW4Yc3rxzcbFzFt2U5q+1dq+/greUgWHSa1faXT9TDaSelKvWNa+iZiXO3VANq0V4PXis69Wm9gak8Kr1WdeO6OvTc6GHCKF+3ZY3T9PryofS9VpoSKiQehU+MfPeMWoAd6xmC6PjW98Rag9MbZTXQSFxrNALCszgDCfjwB8NFZB8Ksg7DndDaZ6UDJTEdDkNdJd7PMrh4edxxEdHaFZcN5GTO6/1btXbVhIIqiKKhNm5RJ4f//yIixLgtxjY9Ho3GVNMtHeWCY/f1Et5WV23FH5xco3EWuociHC9DXd66ueQu9PnKrO1dPltmvs6HXpiJ/kWcTCf1xh35hpDt0pMOEjtJEKzA3tcgvpHypm/5KWxMxM1ITUWRoIqDaD1Mn2w9kaFwKbY1LUHvj4sEG0/+G1vLsryxqeazMXY2AqJolkVS57aNtb5asjCb03GZt2PPrXZuVezBqBWH71FODBg4NGhLazY5eb+20YMRger5HxfinKeTyFptCaGgnab2dHCOFuNHs6shgP2pEpanK1GB21NaPWtgsMnNlXEHs6+b38Wx+d5CIzGafSj3c1jaLm2fa5qxih+wM7gBLRE6aVGNbOn5ww8tgNqkS+R0esqPJJ66bxpZb9NDK20HiomlssWxf1hu70bS2Bjve0v2mn234zs0miTV//gHyyprZmiIc9wAAAABJRU5ErkJggg==",
mWa:115,cpb:117,uUa:"data:image/png;base64, ",
oWa:"data:image/png;base64, ",
aG:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}});
define("tdv/view/util/Fullscreen","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device".split(" "),function(a,m,h,n,g,k){if(k.xc()!=k.CQ){var e=document.createElement("div"),b=function(p){return!(!(p||e).requestFullscreen&&!document.exitFullscreen)&&k.xc()!=k.PK};if(!(a=b()))try{a=window.self===window.top}catch(p){a=!1}if(a)a=function(p){function q(r){var t=p.call(this)||this;t.qa=r;t.ha=t.Ifa();document.addEventListener("fullscreenchange",
function(){t.bla()});window.addEventListener("resize",function(){t.bla()});return t}P(q,p);q.dra=function(){};q.prototype.ol=function(){return b(this.qa)};q.prototype.wt=function(){this.enabled()||this.toggle()};q.prototype.qm=function(){this.enabled()&&this.toggle()};q.prototype.toggle=function(){this.enabled()?document.exitFullscreen():this.qa.requestFullscreen();this.bla()};q.prototype.enabled=function(){return this.ha&&this.Ifa()};q.prototype.Ifa=function(){return this.qa===document.fullscreenElement};
q.prototype.bla=function(){var r=this.Ifa();this.ha!=r&&(this.ha=r,this.o(new n(h.V)),q.M.o(h.V))};q.enabled=function(){return!!document.fullscreenElement};q.fullscreenElement=function(){return document.fullscreenElement};q.qm=function(){q.enabled()&&document.exitFullscreen()};q.M=new g;return q}(g);else{var c=!0;a=function(p){function q(r){var t=p.call(this)||this;t.qa=r;return t}P(q,p);q.dra=function(r){c=r=="out_of_frame"};q.prototype.ol=function(){return c};q.prototype.wt=function(){this.toggle()};
q.prototype.qm=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.qm=function(){};q.M=new g;return q}(g)}}else{a=function(p){function q(r){var t=p.call(this)||this;t.qa=r;return t}P(q,p);q.prototype.ol=function(){return!0};q.prototype.wt=function(){this.enabled()||this.toggle()};q.prototype.qm=function(){this.enabled()&&this.toggle()};
q.prototype.toggle=function(){if(this.enabled())d("fullscreen"),q.By=null;else{q.By&&q.By.qm();d("fullscreen");var r=f();r.push("fullscreen");l(r);q.By=this}this.o(new n(h.V));q.M.o(h.V)};q.prototype.enabled=function(){return this==q.By};q.enabled=function(){return!!q.fullscreenElement()};q.fullscreenElement=function(){return q.By&&q.By.qa};q.qm=function(){q.enabled()&&q.By&&q.By.qm()};q.dra=function(){};q.M=new g;q.By=null;return q}(g);var d=function(p){for(var q=f(),r=[],t=0;t<q.length;t++)q[t]!=
p&&r.push(q[t]);l(r)},f=function(){var p=window.location.hash.substring(1);return p.length?p.split("&"):[]},l=function(p){window.location.hash="#"+(p.length?p.join("&"):"")}}return a});
define("tdv/util/Storage",["require"],function(){var a={};a:{try{if("localStorage"in window&&(window.localStorage.setItem("test","test"),window.localStorage.getItem("test")=="test")){window.localStorage.removeItem("test");var m=!0;break a}}catch(n){}m=!1}if(m)a.setItem=function(n,g){window.localStorage.setItem(n,g)},a.getItem=function(n){return window.localStorage.getItem(n)},a.removeItem=function(n){return window.localStorage.removeItem(n)},a.clear=function(){try{window.localStorage.clear()}catch(n){}};
else{var h={};a.setItem=function(n,g){h[n]=g};a.getItem=function(n){return h[n]};a.removeItem=function(n){delete h[n]};a.clear=function(){h={}}}return a});
define("tdv/player/view/util/InfoWindow","require tdv/utils tdv/player/l10n tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/core/ZIndex tdv/view/util/Assets tdv/view/util/Fullscreen tdv/util/Storage".split(" "),function(a){function m(R,Q){this.sbb=R;this.IZa=Q;this.Yka=[];this.Mc=null;this.Jz=!1}var h=a("tdv/utils"),n=a("tdv/player/l10n"),g=a("tdv/player/view/util/Device"),k=a("tdv/player/view/util/URL"),e=a("tdv/view/core/ZIndex"),b=a("tdv/view/util/Assets"),c=a("tdv/view/util/Fullscreen"),
d=a("tdv/util/Storage"),f="color:#000; font-family:Arial, Helvetica, sans-serif;",l="",p="border-color:#b2b2b2;",q=p,r="background-color:#009adb; border:none; box-sizing:border-box; color:#fff; cursor:pointer; font-family:Arial, Helvetica, sans-serif; text-align:center;",t="vertical-align:middle; padding:0;",u='<img style="width:33vmin;" src="'+b.mo+'"/>',v='<img style="width:24vmin;" src="'+b.mo+'"/>',w='<img style="width:34vmin;" src="'+b.Paa+'"/>',x='<img style="width:34vmin;" src="'+b.TUa+'"/>',
y='<img style="width:24vmin;" src="'+b.vua+'"/>';g.ub()?(r+=" margin:0 1vmin; min-width:20vmin; padding:2.2vmin 4vmin; font-size:3.6vmin; font-weight:bold; min-width:30vmin;",f+=" font-size:3.6vmin; line-height:4.3vmin;",l+=" margin:5vmin 0;",p+="  margin:5vmin 0;",q+="  margin:3vmin 0;",t+=" height:4vmin; margin:0 1vmin 0 0; width:4vmin;"):r+=" font-size:19px; padding:17px 34px;";l+=f;m.prototype.dea=function(){this.Mc||(this.Mc=document.createElement("div"),this.Mc.style.position="fixed",this.Mc.style.zIndex=
e.$Ua,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.IZa,this.Mc.querySelectorAll("button").forEach(R=>R.addEventListener("click",Q=>this.N4a(Q.currentTarget.id))))};m.prototype.mka=function(R,Q){var K={},L;for(L in Q)K[L]=R.style[L];this.Yka.push({el:R,css:K});for(L in Q)R.style[L]=Q[L]};m.prototype.n7a=function(){for(;this.Yka.length;){var R=
this.Yka.pop(),Q;for(Q in R.css)R.el.style[Q]=R.css[Q]}};m.prototype.show=function(R,Q,K){R||(R=function(){});Q||(Q=function(){});if(this.Jz){var L=this.u0;this.u0=function(){L();R()};var U=this.j0;this.j0=function(){U();Q()}}else{this.dea();this.u0=R;this.j0=Q;var T=this.z1a();if(T===void 0){this.Jz=!0;T=c.fullscreenElement()||document.body;if(K!==!0)for(K=0;K<T.children.length;K++)this.mka(T.children[K],{visibility:"hidden"});else for(this.mka(T,{overflow:"hidden"}),K=0;K<T.children.length;K++)this.mka(T.children[K],
{position:"absolute","z-index":0});T.appendChild(this.Mc)}else this.Jz=!1,T?this.u0():this.j0()}};m.prototype.oe=function(){this.Jz&&(this.Jz=!1,this.Mc.parentElement.removeChild(this.Mc),this.n7a())};m.prototype.z1a=function(){var R=d.getItem(this.Eya());if(R=="true")return!0;if(R=="false")return!1};m.prototype.LEa=function(R){d.setItem(this.Eya(),R?"true":"false")};m.prototype.Eya=function(){return this.sbb+"DontDisplay:"+window.location.pathname};m.prototype.N4a=function(R){var Q=this.Mc.querySelector("#tdvvriw_dontdisplay");
Q=Q&&Q.checked;this.oe();R=="tdvvriw_continue"?(this.u0(),Q&&this.LEa(!0)):R=="tdvvriw_cancel"&&(this.j0(),Q&&this.LEa(!1))};a=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+l+'">'+n("use-cardboard-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">'+n("use-cardboard")+"</button></div>","</div>",'<hr style="'+
p+'">',"<div>",'<div style="'+l+'">','<div style="margin-bottom:2vmin;">'+n("samsung-internet-vr-app-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_cancel">'+n("launch-default-browser")+"</button></div>","</div>",x,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>",
"</div>"].join("\n");m.call(this,"ChromeAppInfoWindow",R)});var z=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+l+'">'+n("use-cardboard-info")+"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div>",'<hr style="'+p+'">',"<div>",'<div style="'+l+'">','<div style="margin-bottom:2vmin;">'+
n("samsung-internet-vr-info")+"</div>","</div>",x,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"SamsungInternetInfoWindow",R)}),A=h.extend(m,function(){m.call(this,"SamsungInternetForGearVRInfoWindow",['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',
x,'<div style="'+l+'">This content requires access to the WebVR API.<br>To enable WebVR open the "More" menu you\'ll find above this window and then click on the "Labs" item.</div>','<div><button style="'+r+'" id="tdvvriw_cancel">OK</button></div>',"</div>\n</div></div>"].join("\n"))}),D=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+
l+'"></div>','<div style="text-align:center;"><button style="'+r+' box-shadow:0 0 4px rgba(0, 0, 0, 0.5);" id="tdvvriw_continue">'+n("exit-vr")+"</button></div>","</div></div>"].join("\n");m.call(this,"ExternalVRDisplayVRInfoWindow",R)});D.prototype.dea=function(){m.prototype.dea.call(this);k.Tg("vrv")===!0&&(this.Mc.style.backgroundColor="")};var F=h.extend(m,function(){var R=g.Yb()==g.sj?window.location.protocol!="https:"&&window.location.hostname!="localhost"?"<div>"+n("giroscope-disabled-http")+
"</div>":n("giroscope-disabled-safari-request-permission").map(function(Q){return"<div>"+Q+"</div>"}).join("\n"):"<div>"+n("giroscope-disabled-http")+"</div>";R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>','<div style="'+l+'">',R,"</div>",'<div><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+
l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"GiroscopeDisabledInfoWindow",R)}),C=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+l+'">'+n("use-cardboard-info")+
'</div><div><button style="'+r+'" id="tdvvriw_continue">'+n("use-cardboard")+"</button></div>","</div>",'<hr style="'+p+'">',"<div>",x,'<div style="'+l+'">It looks like this device is compatible with Gear VR. If you have a Gear VR headset you can view this content using the Carmel Web Browser (by Oculus).</div>','<div><button style="'+r+'" id="tdvvriw_cancel">Use Carmel web browser</button></div>',"</div>\n</div></div>"].join("\n");m.call(this,"CarmelInstallationPromptVRInfoWindow",R)}),B=h.extend(m,
function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',u,'<div style="'+f+' margin:2vmin 0;">'+n("cardboard-v1")+"</div>",'<div><button style="'+r+'" id="tdvvriw_cancel">'+n("use-default-cardboard")+"</button></div>","</div>",'<hr style="'+q+'">',"<div>",'<div style="'+f+' margin-bottom:2vmin;">'+n("cardboard-v2")+"</div>",'<div><button style="'+r+
'" id="tdvvriw_continue">'+n("use-cardboard-v2")+"</button></div>",w,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"CardboardV2InfoWindow",R)}),H=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">',
'<div style="'+l+'"></div>','<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">'+n("enter-vr")+"</button></div>","</div></div>"].join("\n");m.call(this,"EnterVRInfoWindow",R)}),E=h.extend(m,function(){m.call(this,"PreparingVRInfoWindow",['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+l+'">Preparing VR...</div>',"</div></div>"].join("\n"))}),
G=h.extend(m,function(){var R=['<div style="position: absolute; top: 7vmin; right:5vmin; ">',v,'</div>\n<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">',y,'<div style="'+l+'">'+n("use-safari-for-vr")+"</div>",'<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+
l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"UseSafariVRInfoWindow",R)}),N=h.extend(m,function(){var R=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+b.mo+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">',
'<img style="width:22vmin" src="'+b.z_+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+n("rotate-device")+"</div>","</div>\n</div>"].join("\n");m.call(this,"RotateVRInfoWindow",R)});h=h.extend(m,function(){var R=['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">','<div style="'+
l+'; text-wrap:balance;">'+n("ar-mobile-info").split("\n").map(Q=>'<div style="margin-bottom:3vmin;">'+Q+"</div>").join("")+"</div>",'<img style="width:24vmin; margin-bottom:4vmin;" src="'+b.Sba+'"/>','<div style="text-align:center;"><button style="'+r+'" id="tdvvriw_continue">OK</button></div>',"</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+l+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+t+'"><label for="tdvvriw_dontdisplay">'+
n("dont-display-again")+"</label>","</div>"].join("\n");m.call(this,"MobileARInfoWindow",R)});var O={};O.Uob=new z;O.Vob=new A;O.pta=new D;O.zob=new C;O.Dob=new H;O.Oob=new E;O.Qua=new G;O.z_=new N;O.vta=new F;O.fUa=new a;O.Paa=new B;O.Sba=new h;return O});define("tdv/view/constants/State",["require","exports"],function(){return{De:void 0,ea:"over",Fb:"pressed",qc:"pressedOver",oa:"selected"}});
define("tdv/binding/Bindable",["require","exports","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.bs={};return b}P(e,k);e.prototype.set=function(b,c){var d=this;if(typeof b==="object"){c=[];var f=0;for(b=Object.entries(b);f<b.length;f++){var l=b[f],p=l[0];l=l[1];this.bs[p]!==l&&(this.bs[p]=l,c.push(p))}c.forEach(function(q){return d.vla(q)})}else this.bs[b]!==c&&(this.bs[b]=c,this.vla(b))};e.prototype.vla=
function(b){b=new n(h.L(b));this.o(b)};e.prototype.copy=function(b){this.bs={};for(var c in b.bs)this.bs[c]=b.bs[c];return this};e.prototype.get=function(b,c){c===void 0&&(c=void 0);b=this.bs[b];return b!==void 0?b:c};return e}(g)});define("tdv/constants/Priority",["require","exports"],function(){return{jVa:7,Faa:6,Fta:5,Hm:4,yua:3,RQ:2,cca:1,Job:0,Jta:3,RF:2,HVa:1,GVa:2,CVa:2,Wp:2,eWa:3,bpb:4}});
define("tdv/view/constants/Cursor",["require","exports"],function(){return function(){function a(){}a.IB="grab";a.Li="grabbing";a.Nta="move";a.Xta="move-n";a.Yta="move-ne";a.Ota="move-e";a.aua="move-se";a.$ta="move-s";a.bua="move-sw";a.cua="move-w";a.Zta="move-nw";a.pVa="move-ew";a.rVa="move-ns";a.qVa="move-nesw";a.sVa="move-nwse";a.Qta="move-fast-n";a.Rta="move-fast-ne";a.Pta="move-fast-e";a.Uta="move-fast-se";a.Tta="move-fast-s";a.Vta="move-fast-sw";a.Wta="move-fast-w";a.Sta="move-fast-nw";a.qf=
"hand";a.aG="transparent";a.De="default";a.LB="inherit";return a}()});define("tdv/view/constants/GradientDirection",["require","exports"],function(){return{o_:"horizontal",oca:"vertical"}});
define("tdv/view/core/visualprops/UIBaseVisualProperties",["require","exports","tdv/view/constants/GradientDirection"],function(a,m,h){return function(){return function(){this.backgroundColor=this.xO=this.ariaLabel=void 0;this.uk=[];this.J6=void 0;this.OD=h.oca;this.Zv=null;this.bJ=0;this.nm=1;this.wf=this.xf=this.Ue=this.Te=this.borderBottomRightRadius=this.borderBottomLeftRadius=this.borderTopRightRadius=this.borderTopLeftRadius=0;this.borderBottomColor=this.borderRightColor=this.borderTopColor=
this.borderLeftColor="";this.className=void 0;this.cursor="inherit";this.id=this.Kc=this.height=0;this.JJ=!0;this.offsetY=this.offsetX=0;this.opacity=1;this.rY=this.Iw=!0;this.paddingTop=this.paddingRight=this.paddingLeft=this.paddingBottom=0;this.kB=!1;this.gu=0;this.hu=4;this.eo=6;this.uK=0;this.shadowColor="#000000";this.Zw=1;this.tabIndex=void 0;this.ie=this.Ce=this.Dd=this.Df=this.Lc=0;this.visible=!1;this.width=0;this.y=this.x=void 0}}()});
define("tdv/view/images/fliputil",["require","exports"],function(){return{vgb:function(a){return!!a&&a.indexOf("&tdvflipx")>=0},YHa:function(a){a&&(a.indexOf("#")<0&&(a+="#"),a+="&tdvflipx");return a},Eeb:function(a,m,h){var n=document.createElement("canvas");n.width=m;n.height=h;h=n.getContext("2d");h.translate(m,0);h.scale(-1,1);h.drawImage(a,0,0);a.src=n.toDataURL()}}});
define("tdv/util/LoadRequest",["require","exports"],function(){return function(){function a(m,h,n,g,k,e){this.Aqa=m;this.url=h;this.priority=n;this.time=g;this.hmb=k;this.Dcb=e}a.prototype.loaded=function(){this.Aqa.cZ(this.url);this.Aqa.remove(this)};a.prototype.cancel=function(){this.Aqa.remove(this)};return a}()});
define("tdv/util/LoadQueue","require exports tdv/player/view/util/Device tdv/player/view/util/URL tdv/events/async tdv/util/LoadRequest".split(" "),function(a,m,h,n,g,k){var e=h.xc()===h.zB,b=!(n.Ak("debug")&&n.Tg("disable-cache"));return function(){function c(){}c.add=function(d,f,l,p){d=new k(this,d,f,(new Date).getTime(),l,p);this.xz.push(d);this.za();return d};c.wmb=function(d){this.UN.push(d);this.za()};c.vmb=function(d){d=this.UN.indexOf(d);d>=0&&this.UN.splice(d,1);this.za()};c.pob=function(d){var f;
return e?!0:b?(f=this.lAa[d])!==null&&f!==void 0?f:!1:!1};c.cZ=function(d){e||b&&(this.lAa[d]=!0)};c.za=function(){this.kma||(this.kma=g.ME(c.kab.bind(this)))};c.kab=function(){this.kma=null;for(var d=this.x7a(),f=0,l=this.JM;f<l.length;f++){var p=l[f];d.includes(p)||p.Dcb()}f=this.JM;this.JM=d;d=0;for(l=this.JM;d<l.length;d++)p=l[d],f.includes(p)||p.hmb()};c.x9a=function(){this.xz.sort(function(d,f){return d.priority-f.priority||f.time-d.time});this.UN.sort(function(d,f){return d-f})};c.x7a=function(){this.x9a();
var d=[];if(this.xz.length)for(var f=this.UN.length?this.UN[0]:this.xz[0].priority,l=0;l<10&&l<this.xz.length&&this.xz[l].priority<=f;l++)d.push(this.xz[l]);return d};c.remove=function(d){var f=this.xz.indexOf(d);f>=0&&this.xz.splice(f,1);f=this.JM.indexOf(d);f>=0&&this.JM.splice(f,1);this.za()};c.xz=[];c.JM=[];c.UN=[];c.kma=null;c.lAa={};return c}()});
define("tdv/view/images/ImageLoader","require exports tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/URL tdv/view/images/fliputil tdv/util/LoadQueue".split(" "),function(a,m,h,n,g,k,e,b,c){var d=0;return function(f){function l(p){var q=f.call(this)||this;q.Se=null;q.Id=null;q.Pa=null;q.Ha=null;q.QC=!1;q.pq=null;q.AN=null;q.F4=0;q.Aga=[];q.kH=d++;q.H1=q.H1.bind(q);q.I1=q.I1.bind(q);q.yv=p||k.jVa;return q}P(l,f);l.prototype.load=function(p){this.cancel();
this.Se=p;this.F4=0;this.dEa()};l.prototype.dEa=function(){this.pq=c.add(this.Se,this.yv,this.G9a.bind(this),this.YYa.bind(this))};l.prototype.cancel=function(){this.pq&&(this.pq.cancel(),this.pq=null);this.Hwa();this.Se=null};l.prototype.qhb=function(){return!!this.Id&&!this.QC||!!this.AN};l.prototype.oj=function(){return this.QC};l.prototype.xg=function(p){return p?(p=this.Id.cloneNode(!0),this.Aga.push(p),p):this.Id};l.prototype.fg=function(){return this.Pa};l.prototype.wg=function(){return this.Ha};
l.prototype.rl=function(){return this.Se};l.prototype.G9a=function(){this.Id=this.k_a(this.Se)};l.prototype.YYa=function(){this.qhb()&&this.Hwa()};l.prototype.Hwa=function(){if(this.Id){this.AN&&(clearTimeout(this.AN),this.AN=null);for(this.QC=!1;this.Aga.length;)this.Bxa(this.Aga.shift());this.Bxa(this.Id);this.Id=null}};l.prototype.bXa=function(p){p.addEventListener("load",this.H1);p.addEventListener("error",this.I1)};l.prototype.XDa=function(p){p.removeEventListener("load",this.H1);p.removeEventListener("error",
this.I1)};l.prototype.H1=function(){this.Id.width&&this.Id.height||!(this.Se.indexOf(".svg")>-1)||this.D0a();this.pq.loaded();this.pq=null;this.XDa(this.Id);this.QC=!0;this.Pa=this.Id.width;this.Ha=this.Id.height;b.vgb(this.Se)&&b.Eeb(this.Id,this.Pa,this.Ha);this.o(new h(g.ia))};l.prototype.I1=function(){var p=this;if(this.Se){var q=this.Se;this.cancel();this.Se=q;this.F4<5?(this.F4++,this.AN=setTimeout(function(){p.AN=null;p.dEa()},Math.pow(2,this.F4)*1E3)):this.o(new h(g.$c))}};l.prototype.D0a=
function(){var p=new XMLHttpRequest;p.open("GET",this.Se,!1);p.send();var q=document.createElement("div");q.innerHTML=p.responseText;p=q.children[0];this.Id.width=p.width.baseVal.value;this.Id.height=p.height.baseVal.value};l.prototype.k_a=function(p){var q=document.createElement("img");e.apa(p)?q.setAttribute("crossOrigin","Anonymous"):q.removeAttribute("crossOrigin");q.setAttribute("draggable","false");q.style.position="static";q.style.border="none";q.style.display="none";this.bXa(q);q.src=p;return q};
l.prototype.Bxa=function(p){this.XDa(p);p.parentNode&&p.parentNode.removeChild(p);p.src=""};l.eaa=function(p){return c.pob(p)};return l}(n)});
define("tdv/view/core/UIBase","require exports tdv/binding/Bindable tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/view/constants/Cursor tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/images/ImageLoader".split(" "),function(a,m,h,n,g,k,e,b,c){function d(p){if(p!==void 0)return typeof p==="string"&&(p=parseInt(p)),p%1!==0&&(p=Math.round(p)),p}function f(p){typeof p==="string"&&(p=parseInt(p));p%1!==0&&(p=Math.round(p));return p}function l(p){if(p!==void 0)return typeof p===
"string"?parseFloat(p):p}return function(p){function q(){var r=p.call(this)||this;r.kH=q.kH++;r.u=r.UL();r.u.id=r.kH;r.Rga=!1;r.Gb=null;r.Ia=null;r.eC=null;r.W_=void 0;r.Ui=e.De;r.Py=!1;r.nq=!0;r.cn=0;r.bn=0;r.iT=0;r.hT=0;r.nK(!0);r.uka(!0);return r}P(q,p);q.prototype.UL=function(){return new b};q.prototype.gf=function(r){this.ML=r};q.prototype.tA=function(){return this.ML};q.prototype.Vb=function(){return this.Gb};q.prototype.wa=function(){if(!this.o6)throw Error("Visuals not initialized");return this.o6};
q.prototype.mLa=function(){if(!this.yM)throw Error("Input event manager not initialized");return this.yM};q.prototype.x8=function(r,t){return this.TI||this.HS?this.TI===r&&this.HS===t:!0};q.prototype.co=function(r,t,u,v){this.Gb&&this.SD();this.Gb=r;if(!this.x8(t,u))throw Error("Component visuals already created for a different rendering type");this.o6||(this.TI=t,this.o6=t.create(this));this.yM||(this.HS=u,this.yM=u.create(this,v));this.FS();this.Yz();this.ZV();this.o(n.$Ta)};q.prototype.SD=function(){this.Rga=
!1;this.Gb=null;this.Yz()};q.prototype.Ara=function(r){r=r||this.ML;this.u.className!==r&&(this.u.className=r,this.tb())};q.prototype.Rjb=function(){this.Ara()};q.prototype.getParent=function(){return this.Ia};q.prototype.lw=function(){return this.u.x||0};q.prototype.sA=function(){return this.u.y||0};q.prototype.nb=function(){return this.u.width};q.prototype.Mb=function(){return this.u.height};q.prototype.rgb=function(){return this.u.width!==void 0&&this.u.height!==void 0};q.prototype.Xh=function(){return this.u.width-
this.u.Dd-this.u.Ce};q.prototype.Wh=function(){return this.u.height-this.u.ie-this.u.Df};q.prototype.ig=function(r){this.u.visible!=r&&(this.u.visible=r,this.Tf(),this.Ia&&(this.Ia.lc(),this.Ia.Af()),this.Yz())};q.prototype.Yz=function(){var r=!1;this.Gb&&this.u.visible&&this.nw()>0&&(r=!this.Ia||this.Ia.Py);this.Py!=r&&this.gda(r)};q.prototype.gda=function(r){this.Py=r;this.set("inView",r);this.Py?this.o(new k(n.od)):this.o(new k(n.jd))};q.prototype.C8a=function(r){this.nq!=r&&(this.nq=r,this.Ia&&
this.Ia.Af())};q.prototype.m8a=function(r){r=d(r);this.iM!=r&&(this.iM=r,this.lc())};q.prototype.l8a=function(r){r=d(r);this.hM!=r&&(this.hM=r,this.lc())};q.prototype.k8a=function(r){r=d(r);this.gM!=r&&(this.gM=r,this.lc())};q.prototype.j8a=function(r){r=d(r);this.fM!=r&&(this.fM=r,this.lc())};q.prototype.n8a=function(r){r=d(r);this.Mo!=r&&(this.Mo=r,this.Mo!==void 0&&(this.lp=void 0),this.lc())};q.prototype.i8a=function(r){r=d(r);this.UG!=r&&(this.UG=r,this.UG!==void 0&&(this.kp=void 0),this.lc())};
q.prototype.P8a=function(r){r=l(r);this.lp!=r&&(this.lp=r,this.lp!==void 0&&(this.Mo=void 0),this.lc())};q.prototype.L8a=function(r){r=l(r);this.kp!=r&&(this.kp=r,this.kp!==void 0&&(this.UG=void 0),this.lc())};q.prototype.F8a=function(r){r=d(r);this.Uy!=r&&(r!==void 0&&(this.c4=void 0),this.Uy=r,this.Ia&&this.Ia.Af(),this.lc())};q.prototype.f9a=function(r){r=d(r);this.bt!=r&&(r!==void 0&&(this.e4=void 0),this.bt=r,this.Ia&&this.Ia.Af(),this.lc())};q.prototype.R8a=function(r){r=d(r);this.WU!=r&&(r!==
void 0&&(this.d4=void 0),this.WU=r,this.Ia&&this.Ia.Af(),this.lc())};q.prototype.Y7a=function(r){r=d(r);this.nR!=r&&(r!==void 0&&(this.b4=void 0),this.nR=r,this.Ia&&this.Ia.Af(),this.lc())};q.prototype.M8a=function(r){r=l(r);this.c4!=r&&(r!==void 0&&(this.Uy=void 0),this.c4=r,this.Ia&&this.Ia.Af(),this.lc())};q.prototype.O8a=function(r){r=l(r);this.e4!=r&&(r!==void 0&&(this.bt=void 0),this.e4=r,this.Ia&&this.Ia.Af(),this.lc())};q.prototype.N8a=function(r){r=l(r);this.d4!=r&&(r!==void 0&&(this.WU=
void 0),this.d4=r,this.Ia&&this.Ia.Af(),this.lc())};q.prototype.K8a=function(r){r=l(r);this.b4!=r&&(r!==void 0&&(this.nR=void 0),this.b4=r,this.Ia&&this.Ia.Af(),this.lc())};q.prototype.b8a=function(r){r=d(r);this.lC!=r&&(this.lC=r,this.Ia&&this.Ia.Af())};q.prototype.c8a=function(r){r=d(r);this.mC!=r&&(this.mC=r,this.Ia&&this.Ia.Af())};q.prototype.qw=function(){return isNaN(this.Mo)?this.cn:this.Mo};q.prototype.pw=function(){return isNaN(this.UG)?this.bn:this.UG};q.prototype.k2a=function(){return isNaN(this.w0a)?
this.uAa:this.w0a};q.prototype.mw=function(){return isNaN(this.iM)?this.iT:this.iM};q.prototype.vA=function(){return isNaN(this.hM)?this.hT:this.hM};q.prototype.R7=function(){return isNaN(this.gM)?1E4:this.gM};q.prototype.Q7=function(){return isNaN(this.fM)?1E4:this.fM};q.prototype.$Ea=function(r){r=f(r);this.u.paddingLeft!=r&&(this.u.paddingLeft=r,this.u.Dd=this.u.paddingLeft+this.u.Te,this.lc(),this.tb())};q.prototype.Yya=function(){return this.u.paddingLeft};q.prototype.bFa=function(r){r=f(r);
this.u.paddingTop!=r&&(this.u.paddingTop=r,this.u.ie=this.u.paddingTop+this.u.Ue,this.lc(),this.tb())};q.prototype.$ya=function(){return this.u.paddingTop};q.prototype.aFa=function(r){r=f(r);this.u.paddingRight!=r&&(this.u.paddingRight=r,this.u.Ce=this.u.paddingRight+this.u.xf,this.lc(),this.tb())};q.prototype.Zya=function(){return this.u.paddingRight};q.prototype.ZEa=function(r){r=f(r);this.u.paddingBottom!=r&&(this.u.paddingBottom=r,this.u.Df=this.u.paddingBottom+this.u.wf,this.lc(),this.tb())};
q.prototype.Xya=function(){return this.u.paddingBottom};q.prototype.IN=function(r){this.u.Iw!=r&&(this.u.Iw=r,this.tb())};q.prototype.A8a=function(r){this.u.Kc!=r&&(this.u.Kc=r,this.tb())};q.prototype.l9a=function(r){this.u.Lc!=r&&(this.u.Lc=r,this.tb())};q.prototype.gZ=function(r){if(this.u.offsetX!=r){var t=this.u.offsetX==0!=(r==0);this.u.offsetX=r;this.tb();t&&this.Ia&&this.Ia.Af()}};q.prototype.zLa=function(){return this.u.offsetX};q.prototype.hZ=function(r){if(this.u.offsetY!=r){var t=this.u.offsetY==
0!=(r==0);this.u.offsetY=r;this.tb();t&&this.Ia&&this.Ia.Af()}};q.prototype.ALa=function(){return this.u.offsetY};q.prototype.Agb=function(){return this.u.offsetX!=0||this.u.offsetY!=0};q.prototype.Zn=function(r){this.u.opacity!=r&&(this.u.opacity=r,this.Yz(),this.tb())};q.prototype.nw=function(){return this.u.opacity};q.prototype.V7a=function(r){this.u.borderTopLeftRadius!=r&&(this.u.borderTopLeftRadius=r,this.tb())};q.prototype.W7a=function(r){this.u.borderTopRightRadius!=r&&(this.u.borderTopRightRadius=
r,this.tb())};q.prototype.N7a=function(r){this.u.borderBottomLeftRadius!=r&&(this.u.borderBottomLeftRadius=r,this.tb())};q.prototype.O7a=function(r){this.u.borderBottomRightRadius!=r&&(this.u.borderBottomRightRadius=r,this.tb())};q.prototype.R7a=function(r){this.u.Te!=r&&(this.u.Te=r,this.u.Dd=this.u.paddingLeft+this.u.Te,this.lc(),this.tb())};q.prototype.X7a=function(r){this.u.Ue!=r&&(this.u.Ue=r,this.u.ie=this.u.paddingTop+this.u.Ue,this.lc(),this.tb())};q.prototype.T7a=function(r){this.u.xf!=r&&
(this.u.xf=r,this.u.Ce=this.u.paddingRight+this.u.xf,this.lc(),this.tb())};q.prototype.P7a=function(r){this.u.wf!=r&&(this.u.wf=r,this.u.Df=this.u.paddingBottom+this.u.wf,this.lc(),this.tb())};q.prototype.Q7a=function(r){this.u.borderLeftColor!=r&&(this.u.borderLeftColor=r,this.tb())};q.prototype.U7a=function(r){this.u.borderTopColor!=r&&(this.u.borderTopColor=r,this.tb())};q.prototype.S7a=function(r){this.u.borderRightColor!=r&&(this.u.borderRightColor=r,this.tb())};q.prototype.M7a=function(r){this.u.borderBottomColor!=
r&&(this.u.borderBottomColor=r,this.tb())};q.prototype.e5=function(r){this.u.kB!=r&&(this.u.kB=r,this.tb())};q.prototype.X8a=function(r){this.u.gu!=r&&(this.u.gu=r,this.tb())};q.prototype.$8a=function(r){this.u.hu!=r&&(this.u.hu=r,this.tb())};q.prototype.V8a=function(r){this.u.eo!=r&&(this.u.eo=r,this.tb())};q.prototype.Z8a=function(r){this.u.uK!=r&&(this.u.uK=r,this.tb())};q.prototype.Y8a=function(r){this.u.Zw!=r&&(this.u.Zw=r,this.tb())};q.prototype.W8a=function(r){this.u.shadowColor!=r&&(this.u.shadowColor=
r,this.tb())};q.prototype.E7a=function(r){this.u.bJ!=r&&(this.u.bJ=r,this.tb())};q.prototype.GEa=function(r){this.u.nm!=r&&(this.u.nm=r,this.tb())};q.prototype.FEa=function(r){this.u.backgroundColor!==r&&(this.u.backgroundColor=r,r===void 0?r=[]:Array.isArray(r)||(r=[r]),this.H7a(r))};q.prototype.H7a=function(r){this.u.uk!==r&&(this.u.uk=r,this.tb())};q.prototype.G7a=function(r){this.u.J6!==r&&(this.u.J6=r,this.tb())};q.prototype.F7a=function(r){this.u.OD!=r&&(this.u.OD=r,this.tb())};q.prototype.I7a=
function(r){if(this.W_!=r){this.eC&&(this.eC.h(n.ia,this.$va,this),this.eC.cancel(),this.eC=null,this.u.Zv=null);if(this.W_=r)this.eC=new c(g.yua),this.eC.bind(n.ia,this.$va,this,!1),this.eC.load(this.W_);this.tb()}};q.prototype.$va=function(){this.u.Zv=this.eC.xg();this.tb()};q.prototype.wD=function(r){this.Ui!=r&&(this.Ui=r,this.ZV())};q.prototype.ZV=function(){var r=this.Gb&&this.Gb.uea.WKa(this.Ui)||"inherit";this.u.cursor!=r&&(this.u.cursor=r,this.tb())};q.prototype.c9a=function(r){this.u.tabIndex!==
r&&(this.u.tabIndex=r,this.tb())};q.prototype.C7a=function(r){this.u.ariaLabel!=r&&(this.u.ariaLabel=r,this.tb())};q.prototype.D7a=function(r){this.u.xO!=r&&(this.u.xO=r,this.tb())};q.prototype.nK=function(r){this.u.JJ!=r&&(this.u.JJ=r,this.tb())};q.prototype.uka=function(r){this.u.rY!=r&&(this.u.rY=r,this.tb())};q.prototype.$r=function(){this.Yz();this.KX()};q.prototype.np=function(){this.Yz()};q.prototype.Rja=function(){};q.prototype.FS=function(){this.KX();this.Tf();this.lc();this.Af();this.tb()};
q.prototype.Zy=function(){this.hT=this.iT=this.bn=this.cn=0;this.uAa=void 0};q.prototype.KX=function(){var r=this.Vb();r&&r.GM.KX(this)};q.prototype.Tf=function(){var r=this.Vb();r&&r.GM.Tf(this)};q.prototype.lc=function(){var r=this.Vb();r&&r.GM.lc(this)};q.prototype.Af=function(){var r=this.Vb();r&&r.GM.Af(this)};q.prototype.tb=function(){var r=this.Vb();r&&r.GM.tb(this)};q.prototype.fga=function(){var r=isNaN(this.c4)&&isNaN(this.Uy),t=isNaN(this.d4)&&isNaN(this.WU);return isNaN(this.Mo)&&isNaN(this.lp)&&
(r||t)?!0:!1};q.prototype.sza=function(){var r=isNaN(this.e4)&&isNaN(this.bt),t=isNaN(this.b4)&&isNaN(this.nR);return isNaN(this.UG)&&isNaN(this.kp)&&(r||t)?!0:!1};q.prototype.Mab=function(){this.Zy();var r=this.k2a();if(r){var t=this.fga(),u=this.sza();t&&!u?(t=this.Wh(),t!=0&&(this.cn=t*r+this.u.Dd+this.u.Ce,this.bn=t+this.u.ie+this.u.Df)):!t&&u&&(t=this.Xh(),t!=0&&(this.bn=t/r+this.u.Dd+this.u.Ce,this.cn=t+this.u.Dd+this.u.Ce))}!isNaN(this.iM)&&this.cn<this.iM&&(this.cn=this.iM);!isNaN(this.gM)&&
this.cn>this.gM&&(this.cn=this.gM);!isNaN(this.hM)&&this.bn<this.hM&&(this.bn=this.hM);!isNaN(this.fM)&&this.bn>this.fM&&(this.bn=this.fM)};q.prototype.Kb=function(){};q.prototype.Fnb=function(){this.Mab();var r=this.qw(),t=this.pw(),u=this.mw(),v=this.vA();return r!=this.G4a||t!=this.F4a||u!=this.C4a||v!=this.B4a||this.lp!=this.E4a||this.kp!=this.D4a?(this.G4a=r,this.F4a=t,this.C4a=u,this.B4a=v,this.E4a=this.lp,this.D4a=this.kp,!0):!1};q.prototype.jb=function(){this.tb()};q.prototype.Kk=function(){};
q.prototype.QQa=function(r,t,u,v){if(this.u.x!=r||this.u.y!=t||this.u.width!=u||this.u.height!=v)this.u.x=r,this.u.y=t,this.u.width=u,this.u.height=v,this.Af(),this.tb(),this.o(new k(n.$b))};q.prototype.ou=function(){!this.Rga&&this.Gb&&(this.Rga=!0,this.Gb.kpa()?this.xM():this.Gb.bind(n.Up,this.xM,this,!0))};q.prototype.xM=function(){this.o(n.INIT)};q.kH=0;return q}(h)});
define("tdv/view/core/UICustomizable","require exports tdv/constants/EventName tdv/events/Event tdv/view/constants/State tdv/view/core/UIBase".split(" "),function(a,m,h,n,g,k){return function(e){function b(){var c=e.call(this)||this;c.X1=!1;c.Qy=!1;c.W1=!1;c.A={};c.hya=void 0;c.wz=void 0;c.nD={};c.eya=!0;c.BFa={};c.J_a();c.Pb();c.gf("UICustomizable");c.Tf();c.set("inView",!1);c.set("toolTip",void 0);return c}P(b,e);b.prototype.J_a=function(){this.BFa[g.qc]=g.Fb};b.prototype.Pb=function(){this.Il(b.ad)};
b.prototype.Il=function(c){for(var d in c){var f=c[d],l=f&&f.length;l&&typeof f!="string"?l==1?this.m(d,f[0]):l==2?this.D(d,f[0],f[1]):l==3&&this.D(d,f[0],f[1],f[2]):this.m(d,f)}};b.prototype.m=function(c,d){this.A[c]={i:!0,d}};b.prototype.p2a=function(){var c=[],d;for(d in this.A)c.push(d);return c};b.prototype.hV=function(c){this.Qy!=c&&(this.Qy=c,this.jh())};b.prototype.JN=function(c){this.W1!=c&&(this.W1=c,this.jh())};b.prototype.fFa=function(c){this.X1!=c&&(this.X1=c,this.jh())};b.prototype.jh=
function(){this.Qy?this.KN(g.oa):this.W1&&this.X1?this.KN(g.qc):this.W1?this.KN(g.Fb):this.X1?this.KN(g.ea):this.KN(g.De)};b.prototype.D=function(c,d,f,l){this.nD[d]||(this.nD[d]={});this.m(c,l);this.nD[d][f]=c};b.prototype.KN=function(c,d){d===void 0&&(d=!1);if(d)this.hya=c;else if(this.hya!=void 0)return;if(this.wz!=c){if(d=this.nD[this.wz])for(var f in d)(this.A[f]||(this.A[f]={})).i=!0;this.wz=c;if(d=this.nD[this.wz])for(f in d)(this.A[f]||(this.A[f]={})).i=!0;this.Tf()}};b.prototype.xa=function(c){if(typeof c===
"string")this.set(c,void 0);else{var d=c;for(c in d)this.set(c,d[c])}};b.prototype.set=function(c,d){var f=this.A[c];f?(d==void 0&&(d=f.d),this.get(c)!==d&&(c=="state"&&this.KN(d,!0),e.prototype.set.call(this,c,d),f.i=!0,this.Tf())):e.prototype.set.call(this,c,d)};b.prototype.get=function(c,d){switch(c){case "actualWidth":return this.nb();case "actualHeight":return this.Mb();default:var f=e.prototype.get.call(this,c);f===void 0&&((c=this.A[c])&&(f=c.d),f===void 0&&(f=d));return f}};b.prototype.ada=
function(c){for(var d=0;d<c.length;d++)if(this.S(c[d]))return!0;return!1};b.prototype.S=function(c){return(this.A[c]||{}).i?!0:this.wz!==void 0?(c=this.nD[this.wz][c],!!(this.A[c]||{}).i):!1};b.prototype.yD=function(c){(this.A[c]||(this.A[c]={})).i=!0;this.Tf()};b.prototype.$=function(c){(this.A[c]||(this.A[c]={})).i=!1;this.wz!=void 0&&(c=this.nD[this.wz][c])&&((this.A[c]||(this.A[c]={})).i=!1)};b.prototype.G=function(){for(var c=0;c<arguments.length;c++);var d;for(c=0;c<arguments.length;c++){for(var f=
arguments[c],l=this.wz;l;){if(d=this.nD[l][f])if(d=this.get(d),d!=void 0&&d!=null)return d;l=this.BFa[l]}d=this.get(f);if(d!=void 0&&d!=null)return d}};b.prototype.Fka=function(c){c.source.h(h.Tb,this.Fka,this);this.o(new n(h.UQ))};b.prototype.rga=function(c){c.source.h(h.Tb,this.rga,this);this.o(new n(h.$K))};b.prototype.Ux=function(){return this.get("ariaLabel")||this.get("toolTip")};b.prototype.jb=function(){if(this.eya)this.eya=!1;else if(this.S("visible")){var c=this.G("visible"),d=this.get(c?
"hideEffect":"showEffect");d&&d.sP(this)&&(d.h(h.Tb,c?this.rga:this.Fka,this),d.end());(d=this.get(c?"showEffect":"hideEffect"))?d.sP(this)||(this.$("visible"),d.bind(h.Tb,c?this.Fka:this.rga,this),d.play(this)):this.o(new n(c?h.UQ:h.$K))}this.S("visible")&&(this.ig(this.G("visible")),this.$("visible"));this.S("includeInLayout")&&(this.C8a(this.G("includeInLayout")),this.$("includeInLayout"));this.S("left")&&(d=this.G("left"),c=b.Cp(d),d=c===void 0?d:void 0,this.M8a(c),this.F8a(d),this.$("left"));
this.S("top")&&(d=this.G("top"),c=b.Cp(d),d=c===void 0?d:void 0,this.O8a(c),this.f9a(d),this.$("top"));this.S("right")&&(d=this.G("right"),c=b.Cp(d),d=c===void 0?d:void 0,this.N8a(c),this.R8a(d),this.$("right"));this.S("bottom")&&(d=this.G("bottom"),c=b.Cp(d),d=c===void 0?d:void 0,this.K8a(c),this.Y7a(d),this.$("bottom"));this.S("centerX")&&(this.b8a(this.G("centerX")),this.$("centerX"));this.S("centerY")&&(this.c8a(this.G("centerY")),this.$("centerY"));this.S("width")&&(d=this.G("width"),c=b.Cp(d),
d=c===void 0?d:void 0,this.P8a(c),this.n8a(d),this.$("width"));this.S("height")&&(d=this.G("height"),c=b.Cp(d),d=c===void 0?d:void 0,this.L8a(c),this.i8a(d),this.$("height"));this.S("minWidth")&&(d=this.G("minWidth"),this.m8a(d),this.$("minWidth"));this.S("minHeight")&&(d=this.G("minHeight"),this.l8a(d),this.$("minHeight"));this.S("maxWidth")&&(d=this.G("maxWidth"),this.k8a(d),this.$("maxWidth"));this.S("maxHeight")&&(d=this.G("maxHeight"),this.j8a(d),this.$("maxHeight"));this.S("paddingLeft")&&(this.$Ea(this.G("paddingLeft")),
this.$("paddingLeft"));this.S("paddingTop")&&(this.bFa(this.G("paddingTop")),this.$("paddingTop"));this.S("paddingRight")&&(this.aFa(this.G("paddingRight")),this.$("paddingRight"));this.S("paddingBottom")&&(this.ZEa(this.G("paddingBottom")),this.$("paddingBottom"));c=!1;this.S("borderRadius")&&(this.$("borderRadius"),c=!0);d=!1;this.S("borderLeftRadius")&&(this.$("borderLeftRadius"),d=!0);var f=!1;this.S("borderTopRadius")&&(this.$("borderTopRadius"),f=!0);var l=!1;this.S("borderRightRadius")&&(this.$("borderRightRadius"),
l=!0);var p=!1;this.S("borderBottomRadius")&&(this.$("borderBottomRadius"),p=!0);if(this.S("borderTopLeftRadius")||f||d||c)this.V7a(this.G("borderTopLeftRadius","borderLeftRadius","borderTopRadius","borderRadius")),this.$("borderTopLeftRadius");if(this.S("borderTopRightRadius")||f||l||c)this.W7a(this.G("borderTopRightRadius","borderRightRadius","borderTopRadius","borderRadius")),this.$("borderTopRightRadius");if(this.S("borderBottomLeftRadius")||p||d||c)this.N7a(this.G("borderBottomLeftRadius","borderLeftRadius",
"borderBottomRadius","borderRadius")),this.$("borderBottomLeftRadius");if(this.S("borderBottomRightRadius")||p||l||c)this.O7a(this.G("borderBottomRightRadius","borderRightRadius","borderBottomRadius","borderRadius")),this.$("borderBottomRightRadius");c=!1;this.S("borderSize")&&(this.$("borderSize"),c=!0);if(this.S("borderLeftSize")||c)this.R7a(this.G("borderLeftSize","borderSize")),this.$("borderLeftSize");if(this.S("borderTopSize")||c)this.X7a(this.G("borderTopSize","borderSize")),this.$("borderTopSize");
if(this.S("borderRightSize")||c)this.T7a(this.G("borderRightSize","borderSize")),this.$("borderRightSize");if(this.S("borderBottomSize")||c)this.P7a(this.G("borderBottomSize","borderSize")),this.$("borderBottomSize");c=!1;this.S("borderColor")&&(this.$("borderColor"),c=!0);if(this.S("borderLeftColor")||c)this.Q7a(this.G("borderLeftColor","borderColor")),this.$("borderLeftColor");if(this.S("borderTopColor")||c)this.U7a(this.G("borderTopColor","borderColor")),this.$("borderTopColor");if(this.S("borderRightColor")||
c)this.S7a(this.G("borderRightColor","borderColor")),this.$("borderRightColor");if(this.S("borderBottomColor")||c)this.M7a(this.G("borderBottomColor","borderColor")),this.$("borderBottomColor");this.S("shadow")&&(this.e5(this.G("shadow")),this.$("shadow"));this.S("shadowHorizontalLength")&&(this.X8a(this.G("shadowHorizontalLength")),this.$("shadowHorizontalLength"));this.S("shadowVerticalLength")&&(this.$8a(this.G("shadowVerticalLength")),this.$("shadowVerticalLength"));this.S("shadowBlurRadius")&&
(this.V8a(this.G("shadowBlurRadius")),this.$("shadowBlurRadius"));this.S("shadowSpread")&&(this.Z8a(this.G("shadowSpread")),this.$("shadowSpread"));this.S("shadowColor")&&(this.W8a(this.G("shadowColor")),this.$("shadowColor"));this.S("tabIndex")&&(this.c9a(this.G("tabIndex")),this.$("tabIndex"));c=!1;this.S("opacity")&&(this.Zn(this.G("opacity")),this.$("opacity"),c=!0);if(this.S("shadowOpacity")||c)this.Y8a(this.G("shadowOpacity","opacity")),this.$("shadowOpacity");this.S("backgroundBlur")&&(this.E7a(this.G("backgroundBlur")),
this.$("backgroundBlur"));this.S("backgroundOpacity")&&(this.GEa(this.G("backgroundOpacity")),this.$("backgroundOpacity"));this.S("backgroundColor")&&(this.FEa(this.G("backgroundColor")),this.$("backgroundColor"));this.S("backgroundColorRatios")&&(this.G7a(this.G("backgroundColorRatios")),this.$("backgroundColorRatios"));this.S("backgroundColorDirection")&&(this.F7a(this.G("backgroundColorDirection")),this.$("backgroundColorDirection"));this.S("backgroundImageUrl")&&(this.I7a(this.G("backgroundImageUrl")),
this.$("backgroundImageUrl"));this.S("ariaRole")&&(this.D7a(this.G("ariaRole")),this.$("ariaRole"));this.C7a(this.Ux());e.prototype.jb.call(this)};b.Cp=function(c){if(typeof c==="string"&&(c=c.match(/^\s*([+-]?\d+\.?\d*)\s*%\s*$/))&&c.length>=2)return parseFloat(c[1])};b.ad={ariaLabel:void 0,ariaRole:void 0,visible:!0,includeInLayout:!0,state:void 0,left:void 0,right:void 0,top:void 0,bottom:void 0,centerX:void 0,centerY:void 0,width:void 0,height:void 0,minWidth:void 0,minHeight:void 0,maxWidth:void 0,
maxHeight:void 0,actualWidth:void 0,actualHeight:void 0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,opacity:1,borderRadius:0,borderTopRadius:void 0,borderBottomRadius:void 0,borderLeftRadius:void 0,borderRightRadius:void 0,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderBottomLeftRadius:void 0,borderBottomRightRadius:void 0,borderSize:0,borderLeftSize:void 0,borderTopSize:void 0,borderRightSize:void 0,borderBottomSize:void 0,borderColor:void 0,borderLeftColor:void 0,borderTopColor:void 0,
borderRightColor:void 0,borderBottomColor:void 0,shadow:!1,shadowHorizontalLength:0,shadowVerticalLength:3,shadowBlurRadius:6,shadowSpread:0,shadowColor:"#000000",shadowOpacity:void 0,tabIndex:void 0,backgroundBlur:0,backgroundOpacity:1,backgroundColor:void 0,backgroundColorRatios:void 0,backgroundColorDirection:void 0,backgroundImageUrl:void 0,hideEffect:void 0,showEffect:void 0};return b}(k)});
define("tdv/view/core/UIComponent",["require","exports","tdv/constants/EventName","tdv/view/constants/State","tdv/view/core/UICustomizable"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.gf("UIComponent");b.set("propagateClick",!0);return b}P(e,k);e.prototype.Pb=function(){this.Il(e.ad)};e.prototype.Zva=function(){this.fFa(!0)};e.prototype.Yva=function(){this.fFa(!1)};e.prototype.Wva=function(){this.JN(!0)};e.prototype.Xva=function(){this.JN(!1)};e.prototype.FS=function(){this.yD("interactionEnabled");
k.prototype.FS.call(this)};e.prototype.jb=function(){this.S("autoRolledOver")&&(this.h(h.uc,this.Zva,this),this.h(h.Eb,this.Yva,this),this.G("autoRolledOver")&&(this.bind(h.uc,this.Zva,this,!1),this.bind(h.Eb,this.Yva,this,!1)),this.$("autoRolledOver"));this.S("autoPressed")&&(this.h(h.Sa,this.Wva,this),this.h(h.$a,this.Xva,this),this.G("autoPressed")&&(this.bind(h.Sa,this.Wva,this,!1),this.bind(h.$a,this.Xva,this,!1)),this.$("autoPressed"));var b=!1;this.S("contentOpaque")&&(b=!0,this.$("contentOpaque"));
this.S("inheritedInteractionEnabled")&&(b=!0,this.$("inheritedInteractionEnabled"));this.S("interactionEnabled")&&(b=!0,this.$("interactionEnabled"));if(this.S("backgroundOpacity")||this.S("backgroundColor")||this.S("inView"))b=!0;this.S("inView")&&(b=!0);g.prototype.jb.call(this);if(b){var c=!!(this.u.nm>0&&(this.u.uk.length>0||this.u.bJ>0)),d=this.G("contentOpaque"),f=this.G("inheritedInteractionEnabled"),l=this.G("interactionEnabled"),p=this.G("inView");this.sI(f&&l&&(d||c)&&p)}if(b||this.S("cursor")||
this.S("inheritedCursor"))this.$("cursor"),this.$("inheritedCursor"),this.yM.oLa()?this.wD(this.G("cursor")):this.wD(this.G("inheritedCursor"))};e.prototype.ou=function(){this.o6.update(this.u);k.prototype.ou.call(this)};e.prototype.sI=function(b){this.yM.hRa(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.bs}))}else console.log(this.bs)};e.ad=Object.assign({},g.ad,{autoRolledOver:!1,autoPressed:!1,contentOpaque:!0,cursor:void 0,
inView:void 0,inheritedCursor:void 0,inheritedInteractionEnabled:!0,interactionEnabled:!0,rollOverOpacity:[n.ea,"opacity"],rollOverShadow:[n.ea,"shadow"],toolTipFollowMouse:!1});return e}(g)});
define("tdv/view/effects/Effect","require tdv/utils tdv/binding/Bindable tdv/constants/EventName tdv/events/Event tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable");a("tdv/constants/EventName");var n=a("tdv/events/Event"),g=a("tdv/view/util/Animation"),k=a("tdv/view/util/Ease"),e=a("tdv/view/util/EaseDimension"),b={},c=m.extend(h,function(){h.call(this);this.I="stopped";this.ac=void 0;this.Oq=[];this.set("easing",
"linear");this.set("duration",1E3);this.set("loop",!1);this.set("animationDirection","normal")});c.prototype.play=function(d){d||(d=b);this.sP(d)||(this.I=="stopped"||this.Oq.indexOf(d)<0?(this.I="playing",this.Oq.push(d),this.dh=0,this.ac=Math.max(this.get("duration",1E3),1),this.bh=new k(this.get("easing","linear"),[new e("pos",0,1)],this.ac),this.bh.setTime(this.dh),this.NN(),this.Iz(),this.FU()):this.I="playing")};c.prototype.reverse=function(d){d||(d=b);this.Chb(d)||(this.I=="stopped"||this.Oq.indexOf(d)<
0?(this.I="playingReverse",this.Oq.push(d),this.dh=this.ac=Math.max(this.get("duration",1E3),0),this.bh=new k(this.get("easing","linear"),[new e("pos",0,1)],this.ac),this.bh.setTime(this.dh),this.NN(),this.Iz(),this.FU()):this.I="playingReverse")};c.prototype.stop=function(){this.I!="stopped"&&(this.I="stopped",this.dh!==0&&(this.dh=0,this.bh.setTime(this.dh),this.Iz(),this.FU()))};c.prototype.end=function(){this.I!="stopped"&&(this.dh=this.ac,this.bh.setTime(this.dh),this.Iz(),this.FU())};c.prototype.cancel=
function(){this.I="stopped";this.dh=0;this.Oq=[]};c.prototype.sP=function(d){return this.I=="playing"&&this.Oq.indexOf(d)>=0};c.prototype.Chb=function(d){return this.I=="playingReverse"&&this.Oq.indexOf(d)>=0};c.prototype.sq=function(d){this.I!="stopped"&&(this.dh=this.I=="playing"?Math.min(this.ac,this.dh+d):Math.max(0,this.dh-d),this.bh.setTime(this.dh),this.Iz(),this.FU())};c.prototype.tm=function(){return this.bh&&this.bh.ob("pos")||0};c.prototype.BC=function(d){if(this.Oq)for(var f=0;f<this.Oq.length;f++)d.call(this,
this.Oq[f],f)};c.prototype.NN=function(){this.o(new n(this.I=="playingReverse"?c.EUa:c.GUa))};c.prototype.Iz=function(){this.o(new n(c.eba))};c.prototype.LN=function(){this.o(new n(c.Bl))};c.prototype.MN=function(){this.o(new n(c.wx))};c.prototype.FU=function(){this.I=="playingReverse"&&this.dh<=0?(this.dh=0,this.MN(),this.Oq=[],this.I!="stopped"&&(this.I="stopped",this.get("loop")&&this.play())):this.I=="playing"&&this.dh>=this.ac?(this.dh=this.ac,this.LN(),this.Oq=[],this.I!="stopped"&&(this.I=
"stopped",this.get("animationDirection")=="alternate"?this.reverse():this.get("loop")&&this.play())):this.I!="stopped"&&g.requestFrame(this.sq,this)};c.GUa="start";c.eba="frame";c.Bl="end";c.EUa="reverseStart";c.wx="reverseEnd";return c});
define("tdv/view/effects/FadeEffect",["require","tdv/utils","tdv/view/effects/Effect"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/Effect");a=m.extend(h,function(){h.call(this);this.Tca=this.Rca=null});a.prototype.NN=function(){h.prototype.NN.call(this);this.Rca=[];this.Tca=[];this.BC(function(n){this.Rca.push(this.get("alphaFrom",n.nw()));this.Tca.push(this.get("alphaTo",n.nw()))});this.A4()};a.prototype.Iz=function(){h.prototype.Iz.call(this);this.A4()};a.prototype.A4=function(){this.BC(function(n,
g){var k=this.Rca[g];g=k+(this.Tca[g]-k)*this.tm();!(n.nw()>0&&n.u.visible)&&g>0?(n.Zn(0),n.ig(!0),n.Zn(g)):g==0?(n.ig(!1),n.Zn(1)):n.Zn(g)})};a.prototype.LN=function(){this.A4();h.prototype.LN.call(this)};a.prototype.MN=function(){this.A4();h.prototype.MN.call(this)};return a});
define("tdv/view/effects/FadeInEffect",["require","tdv/utils","tdv/view/effects/FadeEffect"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/FadeEffect");return m.extend(h,function(){h.call(this);this.set("alphaFrom",0);this.set("alphaTo",1)})});define("tdv/view/effects/FadeOutEffect",["require","tdv/utils","tdv/view/effects/FadeEffect"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/FadeEffect");return m.extend(h,function(){h.call(this);this.set("alphaFrom",1);this.set("alphaTo",0)})});
define("tdv/player/view/UserInteractionWindow","require exports tdv/view/util/Assets tdv/constants/EventName tdv/player/view/util/Device tdv/view/core/UIComponent tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect".split(" "),function(a,m,h,n,g,k,e,b){a=function(q){function r(){var t=q.call(this)||this;t.gf("UserInteractionWindow");t.Dc=null;t.Bv=[];var u=new e;u.set("duration",500);u.set("easing","cubic_in");var v=new b;v.set("duration",500);v.set("easing","cubic_out");t.xa({contentOpaque:!0,
left:0,top:0,right:0,bottom:0,hideEffect:v,showEffect:u,visible:!1});t.bind(n.$b,t.sma,t,!0);t.bind(n.ma,t.hbb,t,!0);return t}P(r,q);r.prototype.sma=function(){this.Dc&&this.Dc.setSize(this.Xh(),this.Wh())};r.prototype.hbb=function(){var t=this.Bv.slice();this.Bv=[];this.e6();t.forEach(function(u){u.Gn.call(u.context)})};r.prototype.Kb=function(){q.prototype.Kb.call(this);if(!this.Dc){this.Dc=new p;this.Dc.setSize(this.Xh(),this.Wh());this.Dc.ig(!0);var t=this.Dc.cc();t.style.position="absolute";
t.style.left="0";t.style.top="0";t.style.right="0";t.style.bottom="0";t.style.overflow="hidden";this.wa().tk(t);this.e6()}};r.prototype.$r=function(){q.prototype.$r.call(this);this.getParent().bind(n.$b,this.sma,this,!0);r.fXa(this)};r.prototype.np=function(){this.getParent().h(n.$b,this.sma,this,!0);q.prototype.np.call(this);r.T6a(this)};r.prototype.Mjb=function(t){this.rD(f,t)};r.prototype.DY=function(t){this.rD(d,t)};r.prototype.rD=function(t,u){this.Bv.push(new c(t,u));this.Bv.sort(function(v,
w){return l[v.reason]-l[w.reason]});this.e6()};r.prototype.Gcb=function(t){this.cancel(f,t)};r.prototype.Ecb=function(){var t;t===void 0&&(t=void 0);this.cancel(d,t)};r.prototype.cancel=function(t,u){t=this.s2a(t,u);t>=0&&this.d7a(t)};r.prototype.s2a=function(t,u){for(var v=0;v<this.Bv.length;v++){var w=this.Bv[v];if(w.reason==t&&w.Gn==u)return v}return-1};r.prototype.e6=function(){if(this.Dc){var t=this.E2a();if(t){switch(t.reason){case d:this.Dc.jra(p.xta);break;case f:this.Dc.jra(p.Nba)}this.set("visible",
!0)}else this.set("visible",!1)}};r.prototype.d7a=function(t){this.Bv.splice(t,1);t==this.Bv.length&&this.e6()};r.prototype.E2a=function(){return this.Bv.length>0?this.Bv[0]:null};r.fXa=function(t){r.zd.push(t);r.Uia.forEach(function(u){r.Jza(t,u)});r.Uia=[]};r.T6a=function(t){r.zd.splice(r.zd.indexOf(t),1)};r.ready=function(){return r.zd.length>0};r.DY=function(t){r.zd.length?r.zd.forEach(function(u){r.Jza(u,t)}):r.Uia.push(t)};r.Jza=function(t,u){t.DY(function(){r.zd.forEach(function(v){v!=t&&v.Ecb()});
u()})};r.zd=[];r.Uia=[];return r}(k);var c=function(){return function(q,r){this.reason=q;this.Gn=r;this.context=this}}(),d="vr",f="play",l={};l[d]=0;l[f]=1;var p=function(){function q(){this.Ld=!1;this.HV=null;this.Ha=this.Pa=100;this.wga=this.Cj=void 0;this.xga=100;this.qa=document.createElement("div");this.qa.style.opacity="0";this.qa.style.display="none";this.qa.style.transition="opacity 0.3s";this.qa.addEventListener("transitionend",this.ola.bind(this,!1));this.ae=document.createElement("div");
this.OQa(!0);this.ae.style.position="absolute";this.ae.style.left="0";this.ae.style.top="0";this.ae.style.right="0";this.ae.style.bottom="0";this.qa.appendChild(this.ae);this.Id=document.createElement("img");this.Id.style.cursor="pointer";this.Id.style.position="absolute";this.Id.style.left="50%";this.Id.style.top="50%";this.Id.style.transform="translate(-50%, -50%)";this.qa.appendChild(this.Id)}q.prototype.cc=function(){return this.qa};q.prototype.setSize=function(r,t){if(this.Pa!==r||this.Ha!==
t)this.Pa=r,this.Ha=t,this.jHa()};q.prototype.OQa=function(r){this.ae.style.backdropFilter=r?"blur(8px)":"none"};q.prototype.ig=function(r){this.Ld!=r&&(this.Ld=r,this.HV&&(clearTimeout(this.HV),this.HV=null),this.Ld?(this.qa.style.display="block",this.qa.style.opacity="0",this.HV=setTimeout(function(){this.HV=null;this.qa.style.opacity="1"}.bind(this),30)):this.qa.style.opacity="0")};q.prototype.jra=function(r){this.Cj!=r&&(this.Cj=r,this.sab())};q.prototype.ola=function(){this.Ld||(this.qa.style.display=
"none")};q.prototype.sab=function(){switch(this.Cj){case q.Nba:this.wga=h.Ex;this.xga=h.iL;break;case q.xta:this.wga=h.Xp,this.xga=h.mWa}this.Id.src=this.wga||"";this.jHa()};q.prototype.jHa=function(){g.ub()?(this.Id.style.maxWidth=Math.round(this.Pa*.5)+"px",this.Id.style.width="20vmin"):(this.Id.style.maxWidth=Math.round(this.Pa*.33)+"px",this.Id.style.width=this.xga+"px")};q.Nba="play";q.xta="vr";return q}();a.iua=p;return a});
define("tdv/player/view/util/xr/Hash",["require","exports"],function(){return function(){function a(){}a.addParameter=function(m){this.removeParameter(m);var h=this.toArray();h.push(m);this.ISa(h)};a.removeParameter=function(m){var h=this.toArray().filter(function(n){return n!=m});this.ISa(h)};a.toArray=function(){var m=window.location.hash.substring(1);return m.length?m.split("&"):[]};a.ISa=function(m){window.location.hash="#"+(m.length?m.join("&"):"")};return a}()});
define("tdv/player/view/util/xr/VRPreconditionsChecker","require exports tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/InfoWindow tdv/view/util/Fullscreen tdv/view/util/UserInitiatedAction tdv/player/view/UserInteractionWindow tdv/player/view/util/xr/Hash tdv/player/view/util/xr/pointer/SelectionMode tdv/player/view/util/xr/SessionMode tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){var p=!1;e.wait(function(){setTimeout(function(){p=!0},10)});
return function(){function q(){}q.jB=function(r,t){this.pKa(r,t)};q.pKa=function(r,t){function u(){w.pKa(r,t)}function v(){w.$lb(r,t)}var w=this;this.XR.tP?n.disabled?g.vta.show(function(){n.Mqa(u)}):k.enabled()||!e.z8()?(k.qm(),b.DY(u)):v():this.XR.f$?v():h.jE()?v():h.xc()==h.ox||h.xc()==h.ru?p?v():e.z8()?setTimeout(v,10):b.DY(function(){setTimeout(v,10)}):e.z8()?v():b.DY(v)};q.$lb=function(r,t){function u(){v.akb(r,t)}var v=this;h.xc()==h.QK?(c.removeParameter("vr"),g.fUa.show(u,function(){c.addParameter("vr")}.bind(this))):
h.xc()==h.PK?g.Qua.show(u):h.xc()==h.VZ?g.Qua.show():r==f.Np&&h.ub()&&!h.kf()?g.Sba.show(u):u()};q.akb=function(r,t){function u(){w.XR.Vqa=d.RUa;t()}function v(){w.XR.Vqa=d.PF;t()}var w=this;r==f.Np?u():!h.ub()||h.kf()?v():l.getQueryParameter("cardboard_version")=="1"?v():l.getQueryParameter("cardboard_version")=="2"?u():g.Paa.show(u,v)};return q}()});
define("tdv/view/util/FullWindow",["require","exports","tdv/view/util/Fullscreen"],function(a,m,h){function n(){d==document.body&&(k.style.height=window.innerHeight+"px")}function g(p,q){var r={},t=p.style,u;for(u in q)r[u]=t[u];f.push({el:p,css:r});for(u in q)t[u]=q[u]}var k=document.createElement("div");k.style.position="fixed";k.style.bottom="0";k.style.left="0";k.style.height="100vh";k.style.width="100vw";var e=document.createElement("div"),b=null,c=null,d=null,f=[],l=null;return function(){function p(q){this.qa=
q}p.prototype.wt=function(){this.enabled()||this.toggle()};p.prototype.qm=function(){this.enabled()&&this.toggle()};p.prototype.toggle=function(){this.enabled()?p.cancel():p.request(this.qa)};p.prototype.enabled=function(){return p.enabled(this.qa)};p.request=function(q){if(q!==b){p.cancel();b=q;d=h.fullscreenElement()||document.body;c=q;c.parentElement.insertBefore(e,c);k.appendChild(c);for(q=0;q<d.children.length;q++)g(d.children[q],{visibility:"hidden"});g(c,{position:"absolute",left:0,top:0,width:"100%",
height:"100%"});d==document.body?g(k,{position:"fixed",left:0,top:"",right:"",bottom:0,height:"100vh",width:"100vw",margin:0,padding:0}):g(k,{position:"absolute",left:0,top:0,right:"",bottom:"",width:"100%",height:"100%",margin:0,padding:0});d.appendChild(k);n();l=setInterval(n,300)}};p.cancel=function(){if(b){k.parentElement.removeChild(k);e.parentElement.insertBefore(c,e);for(e.parentElement.removeChild(e);f.length;){var q=f.pop(),r=q.el.style;q=q.css;for(var t in q)r[t]=q[t]}d=c=b=null;f=[];clearInterval(l)}};
p.enabled=function(q){return b==q};return p}()});
define("tdv/view/util/IOSFullscreen","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/l10n tdv/view/util/Assets".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/l10n");a=a("tdv/view/util/Assets");var e=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+a.mo+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">'].join("\n"),
b=e+['<img style="width:22vmin" src="'+a.z_+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+k("rotate-device")+"</div>"].join("\n")+"</div>\n</div>",c=e+['<img style="width:13vmin; vertical-align:middle;" src="'+a.bWa+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; text-align:left; display:inline-block; vertical-align:middle; margin:5vmin 0 0 2vmin;">Please, swipe up to<br>enter Fullscreen Mode</div>'].join("\n")+
"</div>\n</div>";m=m.extend(g,function(){g.call(this);this.Js=this.sC=this.vC=this.ZS=this.$S=this.lha=this.mha=void 0;this.K1=!1;this.tD=this.ija=this.kha=this.Mc=null;this.kya=[];this.xM=this.Ss=!1;this.kd=this.kd.bind(this)});m.prototype.request=function(){this.Ss||(this.Ss=!0,this.a_a(),window.addEventListener("resize",this.kd),document.body.appendChild(this.Mc),document.body.appendChild(this.tD),this.a$a=document.documentElement.style.overflow,this.$9a=document.body.style.overflow,document.documentElement.style.overflow=
"auto",document.body.style.overflow="auto",this.jU())};m.prototype.cancel=function(){this.Ss&&(this.Ss=!1,window.removeEventListener("resize",this.kd),document.body.style.overflow=this.$9a,document.documentElement.style.overflow=this.a$a,document.body.removeChild(this.Mc),document.body.removeChild(this.tD),this.QEa(!1))};m.prototype.enabled=function(){return this.K1};m.prototype.a_a=function(){this.Mc||(this.Mc=this.A0({position:"fixed",top:0,left:0,zIndex:9999998},!0),this.Mc.id="tdvminuictr",this.ija=
this.A0({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,b),this.Mc.appendChild(this.ija),this.kha=this.A0({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,c),this.Mc.appendChild(this.kha),this.tD=this.A0({position:"absolute",top:0,left:0,right:0,height:"999999999vmax",zIndex:9999999},!1),this.tD.id="tdvminuiscrl",this.tD.addEventListener("touchend",this.kd))};m.prototype.A0=function(d,f,l){var p=document.createElement("div");this.bV(p,d);l!==
void 0&&this.y8a(p,l);f&&this.kya.push(p);return p};m.prototype.kd=function(){[0,250,1E3,2E3].forEach(function(d){setTimeout(this.iU.bind(this),d)}.bind(this))};m.prototype.iU=function(){this.vC==window.innerWidth&&this.sC==window.innerHeight||this.jU()};m.prototype.jU=function(){this.vC=window.innerWidth;this.sC=window.innerHeight;this.Js=this.vC>this.sC?"landscape":"portrait";if(this.Js=="landscape"){this.mha&&this.lha&&this.S3a(this.mha,this.lha)&&(!this.$S&&!this.ZS||this.T3a(this.$S,this.ZS))&&
(this.$S=this.vC,this.ZS=this.sC);this.M3a()&&(this.$S=this.vC,this.ZS=this.sC);this.mha=this.vC;this.lha=this.sC;var d=this.$S==this.vC&&this.ZS==this.sC}else d=!1;this.kya.forEach(function(q){q.style.height=this.sC+"px";q.style.width=this.vC+"px"}.bind(this));var f=this.Ss&&this.Js=="portrait",l=this.Ss&&this.Js=="landscape"&&!d,p=this.Ss&&this.Js=="landscape";this.bV(this.Mc,{display:f||l?"block":"none"});this.bV(this.ija,{display:f?"block":"none"});this.bV(this.kha,{display:l?"block":"none"});
this.bV(this.tD,{display:p?"block":"none",right:l?0:"99.9%"});this.QEa(d)};m.prototype.QEa=function(d){this.X4!=null&&(clearTimeout(this.X4),this.X4=null);this.K1!=d&&(this.X4=setTimeout(function(){this.X4=null;(this.K1=d)?this.o(new n(h.Cr)):this.o(new n(h.Tb));this.o(new n(h.V))}.bind(this),d?1E3:0))};m.prototype.M3a=function(){var d=window.innerWidth,f=window.innerHeight,l=Infinity;[[480,320],[960,640],[1136,640],[1334,750],[1920,1080],[2001,1125],[2048,1536],[2172,1125],[2208,1242],[2732,2048],
[2436,1125]].forEach(function(p){l=Math.min(l,Math.abs(100-d*p[1]*100/(f*p[0])))});return l<=1?!0:!1};m.prototype.S3a=function(d,f){return d*window.innerHeight>f*window.innerWidth};m.prototype.T3a=function(d,f){return d*window.innerHeight>=f*window.innerWidth};m.prototype.bV=function(d,f){for(var l in f)d.style[l]=f[l]};m.prototype.y8a=function(d,f){d.innerHTML=f};return new m});
define("tdv/view/util/KeepAwake",["require","exports"],function(){return function(){function a(){}a.enable=function(){this.wakeLock===null&&navigator.wakeLock&&navigator.wakeLock.request("screen").then(function(m){this.wakeLock=m}.bind(this))};a.disable=function(){this.wakeLock!==null&&(this.wakeLock.release(),this.wakeLock=null)};a.wakeLock=null;return a}()});
define("tdv/view/util/LandscapeAnimation",["require","exports","tdv/player/l10n","tdv/view/util/Assets"],function(a,m,h,n){return new (function(){function g(){this.container=null;this.enabled=!1;this.kd=this.kd.bind(this);this.iU=this.iU.bind(this)}g.prototype.SL=function(){this.container||(this.container=document.createElement("div"),this.container.style.position="fixed",this.container.style.zIndex="1000000",this.container.style.left="0",this.container.style.top="0",this.container.style.margin="0",
this.container.style.padding="0",this.container.style.height="100%",this.container.style.width="100%",this.container.style.backgroundColor="rgba(255, 255, 255, 0.99)",this.container.innerHTML=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+n.CARDBOARD+'"/>','</div>\n<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">','<img style="width:22vmin" src="'+
n.ROTATE+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+h("rotate-device")+"</div>","</div>\n</div>"].join("\n"))};g.prototype.show=function(k){this.enabled||(this.enabled=!0,this.SL(),k.appendChild(this.container),window.addEventListener("resize",this.kd),this.jU())};g.prototype.oe=function(){this.enabled&&(this.enabled=!1,window.removeEventListener("resize",this.kd),this.container.parentElement.removeChild(this.container))};
g.prototype.kd=function(){[0,250,1E3,2E3].forEach(function(k){setTimeout(this.iU,k)}.bind(this))};g.prototype.iU=function(){this.SJa==window.innerWidth&&this.RJa==window.innerHeight||this.jU()};g.prototype.jU=function(){this.SJa=window.innerWidth;this.RJa=window.innerHeight;this.orientation=this.SJa>this.RJa?"landscape":"portrait";this.container.style.display=this.orientation!="landscape"?"block":"none"};return g}())});
define("tdv/player/view/util/xr/XRSessionManager","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/InfoWindow tdv/player/view/util/xr/Hash tdv/player/view/util/xr/SessionMode tdv/view/util/Fullscreen tdv/view/util/FullWindow tdv/view/util/IOSFullscreen tdv/view/util/KeepAwake tdv/view/util/LandscapeAnimation tdv/view/util/Animation three.mod".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q){function r(w,x){w?setTimeout(x,200):x()}var t=new q.Vector3,u=new q.Quaternion,
v=new q.Vector3;return function(){function w(){}w.request=function(x,y,z){this.XR.isPresenting||this.XR.QX||(this.Bm=x,this.GY=y,this.a$=z,this.Bm&&(this.XR.QX=!0,this.dib(),this.requestSession().then(function(A){this.Iib(A);this.Bm.xr.setReferenceSpaceType("local-floor");this.Bm.xr.setFoveation(this.a$.PKa);return this.Bm.xr.setSession(A)}.bind(this)).then(function(){this.XR.referenceSpace=this.Bm.xr.getReferenceSpace();this.XR.QX=!1;this.Jib()}.bind(this)).catch(function(A){console.error(A);this.XR.QX=
!1;this.Hib()}.bind(this))))};w.end=function(){this.XR.session&&this.XR.session.end()};w.requestSession=function(){return navigator.xr.requestSession(this.GY,this.Sfb())};w.Sfb=function(){var x,y=["local-floor","bounded-floor"];((x=this.Bm)===null||x===void 0?0:x.capabilities.isWebGL2)&&y.push("layers");this.GY==e.Np&&(y=y.concat(["anchors","hit-test"]));return{optionalFeatures:y}};w.dib=function(){p.iZ(!0);this.Bkb(this.Bm);this.Ylb()};w.Iib=function(x){this.fqa||(this.fqa=this.Gib.bind(this));this.gqa||
(this.gqa=this.Kib.bind(this));x.addEventListener("end",w.fqa);x.addEventListener("select",w.gqa)};w.Hib=function(){p.iZ(!1);this.vSa()};w.Jib=function(){var x;(x=this.Bm)===null||x===void 0||x.xr.setAnimationLoop(this.Bp.bind(this));p.ARa(this.requestFrame.bind(this),this.Hcb.bind(this));p.iZ(!1);this.zRa(this.Bm,this.GY,this.a$);this.a$=this.GY=this.Bm=null;this.XR.Cm==e.Xp&&(n.ub()?b.enabled()&&n.xc()!=n.BQ&&l.show(b.fullscreenElement()):g.pta.show(this.XR.qm.bind(this.XR)))};w.Gib=function(){var x;
this.XR.session&&(this.XR.session.removeEventListener("end",w.fqa),this.XR.session.removeEventListener("select",w.gqa),this.XR.anchors=[],this.XR.WI.clear(),(x=this.Bm)===null||x===void 0||x.xr.setAnimationLoop(null),p.Qjb(),this.vSa(),this.zRa(null,null,null))};w.Kib=function(){this.XR.M.o(h.Wr)};w.zRa=function(x,y,z){this.XR.Ag!==x&&(window.XR=this.XR,this.XR.Ag=x,this.XR.Cm=y,this.XR.zl=z,this.XR.session=x?x.xr.getSession():null,this.XR.isPresenting=!!x,this.XR.XA=x?this.XR.Kqa.get(x)||null:null,
this.XR.Mw=x?this.XR.Jqa.get(x)||null:null,this.iTa(),r(!this.XR.isPresenting,function(){this.XR.M.o(h.V)}.bind(this)))};w.Bkb=function(x){var y=void 0;n.IJ()?y=1.2545454545454546:n.kf()?y=1.4222222222:n.ub()&&this.XR.tP&&(y=this.XR.R9);y&&x.xr.setFramebufferScaleFactor(y)};w.Ylb=function(){var x;c.request((x=this.Bm)===null||x===void 0?void 0:x.domElement);this.XR.tP&&(this.Bm.domElement.width=this.Bm.domElement.height=100,n.xc()==n.CQ?k.addParameter("vr"):f.enable(),n.xc()==n.BQ&&d.request())};
w.vSa=function(){c.cancel();l.oe();n.ub()||g.pta.oe();this.XR.tP&&(k.removeParameter("vr"),d.cancel(),f.disable())};w.Bp=function(x){var y,z=(y=this.XR.Ag)===null||y===void 0?void 0:y.xr.getFrame();z&&(this.iTa(),y=this.y7,this.y7=null,this.gnb(z),this.XR.M.o(h.SZ),y&&y(x),this.XR.M.o(h.Zd))};w.gnb=function(x){var y=this;this.XR.anchors.forEach(function(z){if(x.trackedAnchors&&x.trackedAnchors.has(z)&&y.XR.referenceSpace){var A=x.getPose(z.anchorSpace,y.XR.referenceSpace);A&&(y.XR.WI.has(z)||y.XR.WI.set(z,
new q.Matrix4),y.XR.WI.get(z).fromArray(A.transform.matrix).premultiply(y.XR.Vh.matrixWorld).decompose(t,u,v).compose(t,u,v.set(1,1,1)))}})};w.iTa=function(){if(this.XR.session&&this.XR.session.renderState)if(this.XR.session.renderState.baseLayer)this.XR.framebufferWidth=this.XR.session.renderState.baseLayer.framebufferWidth,this.XR.framebufferHeight=this.XR.session.renderState.baseLayer.framebufferHeight;else{var x=this.XR.session.renderState.layers;x&&x.length>0&&x[0].textureWidth&&(this.XR.framebufferWidth=
x[0].textureWidth,this.XR.framebufferHeight=x[0].textureHeight)}};w.requestFrame=function(x){this.y7=x;return 0};w.Hcb=function(){this.y7=null};w.Bm=null;w.a$=null;w.GY=null;w.y7=null;return w}()});
define("tdv/player/view/util/XR","require exports tdv/utils tdv/events/EventDispatcher tdv/player/view/util/xr/APIAvailabilityChecker tdv/player/view/util/xr/CameraPosition tdv/player/view/util/xr/pointer/PointerType tdv/player/view/util/xr/RendererList tdv/player/view/util/xr/RendererType tdv/player/view/util/xr/pointer/SelectionMode ./xr/SessionMode tdv/player/view/util/xr/Type tdv/player/view/util/xr/ui/UI tdv/player/view/util/xr/ui/UIPanel tdv/player/view/util/xr/VisibilityListener tdv/player/view/util/xr/VRAutoStart tdv/player/view/util/xr/pointer/XRControllers tdv/player/view/util/xr/pointer/XRGazePointer tdv/player/view/util/xr/pointer/XRPointer tdv/player/view/util/xr/XRSettings tdv/player/view/util/xr/VRPreconditionsChecker tdv/player/view/util/xr/XRSessionManager three.mod".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u,v,w,x,y,z,A){a=function(){function D(){}D.initialize=function(F){g.initialize(function(){this.Vn.forEach(function(C){C.xr.enabled=this.wQ}.bind(this));r.initialize();t.initialize();u.initialize();v.initialize();w.initialize();k.initialize();p.initialize();this.GMa=!0;F()}.bind(this))};D.getType=function(){return this.tP?this.Kx.mo:this.Kx.rWa};D.wt=function(F,C,B){this.GMa?!this.wQ||this.isPresenting||this.QX||this.jB(C,function(){z.request(F,C,B)}.bind(z)):this.initialize(function(){D.wt(F,
C,B)}.bind(D))};D.qm=function(){z.end()};D.JRa=function(F){w.plb(F)};D.setScale=function(F){k.setScale(F)};D.setPosition=function(F){k.setPosition(F)};D.kK=function(F){k.kK(F)};D.b$=function(){k.b$()};D.tra=function(F,C,B,H){b.Ikb(F,C,B);switch(H){case c.bca:u.FRa(!0);u.tRa(!0);break;default:u.FRa(!1),u.tRa(!1)}};D.Xbb=function(F){F.xr.enabled=this.wQ;b.add(F)};D.Ejb=function(F){b.remove(F)};D.YE=function(F,C,B,H){H===void 0&&(H=void 0);F.We=C;F.nr=B;F.xw=H;C&&(F.mPa=Date.now())};D.xRa=function(F,
C){F.eA=C};D.A$=function(F,C){C!=F.disabled&&(F.disabled=C)};D.PY=function(F,C){u.dkb(F,C)};D.klb=function(F,C){F.Hn=C};D.mlb=function(F,C){F.hidden=C};D.yRa=function(F,C){F.g8=C};D.Ljb=function(){var F=this;return(new Promise(function(C,B){F.Wq=C;F.tO=B})).then(function(C){F.anchors.push(C);return C}).finally(function(){F.Wq=F.tO=null})};D.Ccb=function(){this.tO&&this.tO("cancelled")};D.beb=function(F){var C=this.anchors.indexOf(F);C!=-1&&(this.anchors.splice(C,1),this.WI.delete(F),F.delete&&F.delete())};
D.log=function(){h.log("VR: "+(this.wQ?"available":"not available"))};D.jB=function(F,C){y.jB(F,C)};D.qua=e;D.Kx=l;D.TQ=c;D.El=f;D.Uua=x;D.wQ=!0;D.mIa=!0;D.tP=!1;D.Ag=null;D.XA=null;D.Mw=null;D.isPresenting=!1;D.QX=!1;D.session=null;D.Cm=null;D.framebufferWidth=void 0;D.framebufferHeight=void 0;D.ug=new A.Quaternion;D.FO=1.7;D.Ec=new A.Vector3;D.zi=1;D.xl=new A.Quaternion;D.xaa=new A.Vector3;D.R9=Math.min(1,1280/(Math.max(screen.width,screen.height)*window.devicePixelRatio));D.Vn=[];D.zl=null;D.Kqa=
new Map;D.Jqa=new Map;D.M=new n;D.referenceSpace=null;D.GMa=!1;D.ud=[];D.bP=new A.Ray;D.f$=null;D.anchors=[];D.WI=new Map;D.Wq=null;D.tO=null;return D}();g.XR=a;k.XR=a;b.XR=a;p.XR=a;q.XR=a;r.XR=a;t.XR=a;u.XR=a;v.XR=a;w.XR=a;y.XR=a;return z.XR=a});
define("tdv/player/parser/helper/AppResizeUpdater",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR"],function(a,m,h,n){var g=/^\s*((\+|\-)?(\d*\.)?\d+)\s*(vmin|vmax|vw|vh|px|%)?\s*$/i;return function(){function k(e){this.Gb=e;this.EO=this.EO.bind(this);this.Gb.bind(h.$b,this.kd,this,!0);n.M.bind(h.V,this.kd,this,!0);this.Cka=new Map;this.g0=[];this.kd()}k.prototype.kd=function(){var e=this;this.cbb();this.Cka.forEach(function(b){for(var c in b)e.EO(b[c])});this.g0.forEach(this.EO)};
k.prototype.cbb=function(){var e;if(n.isPresenting)var b=e=1024;else e=this.Gb.nb(),b=this.Gb.Mb();this.p6=e*.01;this.j6=b*.01;this.HHa=Math.min(this.p6,this.j6);this.GHa=Math.max(this.p6,this.j6)};k.prototype.EO=function(e){e(this.p6,this.j6,this.HHa,this.GHa)};k.prototype.Fbb=function(e){this.g0.push(e)};k.prototype.tjb=function(e){e=this.g0.indexOf(e);e>=0&&this.g0.splice(e,1)};k.prototype.x6=function(e,b,c,d){function f(p,q,r,t){b.call(e,c,l(p,q,r,t))}var l=k.j1a(d);(d=this.Cka.get(e))||this.Cka.set(e,
d={});d[c]=f;f(this.p6,this.j6,this.HHa,this.GHa)};k.get=function(e){var b=k.zd.get(e);b||(b=new k(e),k.zd.set(e,b));return b};k.x6=function(e,b,c,d){var f=e.get&&e.get("application")||e.Vb&&e.Vb();f?(k.FDa(),k.get(f).x6(e,b,c,d)):k.oXa(e,b,c,d)};k.oXa=function(e,b,c,d){k.Via.push({instance:e,Xlb:b,name:c,value:d});k.kN||(k.kN=setTimeout(function(){k.kN=null;k.FDa()},100))};k.FDa=function(){k.kN&&(clearTimeout(k.kN),k.kN=null);var e=k.Via;k.Via=[];e.forEach(function(b){k.x6(b.instance,b.Xlb,b.name,
b.value)})};k.j1a=function(e){var b=k.AG[e];if(b)return b;if(typeof e!="string")return k.AG[e]=function(){return e};var c=(b=g.exec(e))&&parseFloat(b[1]);switch(b&&b[4]&&b[4].toLowerCase()){case "vw":return k.AG[e]=function(d){return d*c};case "vh":return k.AG[e]=function(d,f){return f*c};case "vmin":return k.AG[e]=function(d,f,l){return l*c};case "vmax":return k.AG[e]=function(d,f,l,p){return p*c};default:return k.AG[e]=function(){return e}}};k.zd=new Map;k.Via=[];k.kN=null;k.AG={};return k}()});
define("tdv/player/parser/ClassInfo","require exports tdv/player/script/definitions tdv/player/parser/helper/AppResizeUpdater tdv/player/view/util/URL tdv/utils".split(" "),function(a,m,h,n,g,k){h=k.Wdb(h);var e=function(){function b(c,d,f){this.ML=c;this.zR=f;this.U3=d.parent;this.W3a=d.isValidRoot||!1;this.Nia={};this.Jia=[];this.lDa=[];this.kDa=[];this.I0={};c=d.properties||{};for(var l in c)f=c[l],this.Nia[l]=f.type,f.isUrl&&this.lDa.push(l),f.isSize&&this.kDa.push(l),f.order!==void 0&&(this.Jia[f.order]=
l),f["default"]!==void 0&&(this.I0[l]=f["default"]);this.iDa=[];this.jDa=[];d=d.events||{};for(var p in d)d[p].isDeferred?this.iDa.push(p):this.jDa.push(p);this.KC=this.yC=this.aS=this.i5=this.uI=this.f6=this.MI=this.bM=this.AL=this.iR=void 0;this.Yza=!1}b.prototype.Gfb=function(){if(this.U3)return b.Ci(this.U3)};b.prototype.tA=function(){return this.ML};b.prototype.lX=function(){return this.FC()?this.Hy().lX().concat(this.ML):[this.ML]};b.prototype.hasAttributes=function(){return this.getAttributeNames().length>
0};b.prototype.hasAttribute=function(c){return this.goa(c)?!0:!1};b.prototype.getAttributeNames=function(){this.iR==void 0&&this.exa();return this.iR};b.prototype.BLa=function(){return this.Jia?this.Jia:this.FC()?this.Hy().BLa():[]};b.prototype.$Ka=function(){if(this.bM)return this.bM;this.bM={};if(this.FC()){var c=this.Hy().$Ka(),d;for(d in c)this.bM[d]=c[d]}if(this.I0)for(d in this.I0)this.bM[d]=this.I0[d];return this.bM};b.prototype.goa=function(c){this.AL==void 0&&this.exa();return this.AL[c]};
b.prototype.Igb=function(){return this.ULa().length>0};b.prototype.ULa=function(){this.MI==void 0&&this.lxa();return this.MI};b.prototype.Xfb=function(){this.f6==void 0&&this.lxa();return this.f6};b.prototype.Fgb=function(){return this.OLa().length>0};b.prototype.OLa=function(){this.uI==void 0&&this.kxa();return this.uI};b.prototype.Ufb=function(){this.i5==void 0&&this.kxa();return this.i5};b.prototype.sgb=function(){return this.loa().length>0};b.prototype.kMa=function(c){this.yC==void 0&&this.TL();
return this.yC.indexOf(c)!=-1};b.prototype.loa=function(){this.yC==void 0&&this.TL();return this.yC};b.prototype.xgb=function(){return this.toa().length>0};b.prototype.lMa=function(c){this.KC==void 0&&this.TL();return this.KC.indexOf(c)!=-1};b.prototype.toa=function(){this.KC==void 0&&this.TL();return this.KC};b.prototype.ugb=function(c){this.aS==void 0&&this.TL();return this.aS.indexOf(c)!=-1};b.prototype.hfb=function(){this.aS==void 0&&this.TL();return this.aS};b.prototype.pLa=function(){return this.W3a||
this.FC()&&this.Hy().pLa()};b.prototype.Ai=function(c,d,f,l){this.x6a(d,f);var p=this.zR;var q=l&&l.length>0?new (k.extend(p,function(){p.apply(this,l)})):new p;q.set("application",c);q.set("baseDirectoy",d);q.set("queryStringParameters",f);q.set("class",this.tA());return q};b.prototype.Tma=function(c){var d=this.$Ka(),f;for(f in d)c.set(f,d[f])};b.prototype.x6a=function(c,d){this.Yza||(this.Yza=!0,this.G_a(c,d),this.x0a(),this.XWa())};b.prototype.G_a=function(c,d){if(this.Igb()||this.Fgb()){var f=
this.zR.prototype,l=this.Xfb(),p=this.Ufb(),q=f.set;f.set=function(r,t){l[r]?(!t||g.iE(t)||g.t8(t)||g.yhb(t)||(t=g.MD(g.lB(t,c),d)),q.call(this,r,t)):p[r]?n.x6(this,q,r,t):q.call(this,r,t)}}};b.prototype.XWa=function(){var c=this.zR.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.x0a=function(){var c=this.zR.prototype,d=this;this.hasAttributes()&&(c.set=
c.set,c.get=c.get);if(this.sgb()||this.xgb())c.bind=c.bind,c.getBindings=c.gP,c.hasBindings=c.d8,c.trigger=c.o,c.unbind=c.h;c.getClassName=function(){return d.tA()};c.getClassPath=function(){return d.lX()};c.getAttributeNames=function(){return d.getAttributeNames()};c.getEventNames=function(){return d.hfb()};c.hasEvent=function(f){return d.ugb(f)}};b.prototype.exa=function(){this.iR=[];this.AL={};for(var c in this.Nia)this.iR.push(c),this.AL[c]=b.Kfa(this.Nia[c]);if(this.FC())for(var d=this.Hy(),
f=d.getAttributeNames(),l=0;l<f.length;l++)c=f[l],this.AL[c]||(this.iR.push(c),this.AL[c]=d.goa(c))};b.prototype.lxa=function(){this.MI=this.lDa.slice();this.FC()&&(this.MI=k.union(this.MI,this.Hy().ULa()));this.f6={};for(var c=0;c<this.MI.length;c++)this.f6[this.MI[c]]=!0};b.prototype.kxa=function(){this.uI=this.kDa.slice();this.FC()&&(this.uI=k.union(this.uI,this.Hy().OLa()));this.i5={};for(var c=0;c<this.uI.length;c++)this.i5[this.uI[c]]=!0};b.prototype.TL=function(){this.yC=this.iDa.slice();this.KC=
this.jDa.slice();this.FC()&&(this.yC=k.union(this.yC,this.Hy().loa()),this.KC=k.union(this.KC,this.Hy().toa()));this.aS=k.union(this.yC,this.KC)};b.prototype.FC=function(){return this.U3?!0:!1};b.prototype.Hy=function(){return b.Ci(this.U3)};b.define=function(c,d,f){d=k.extend(d,function(){f.apply(this,arguments);l.Tma(this)});var l=new b(c,h[c],d);b.o0.set(c,l);b.Hda.set(d,l);return d};b.create=function(c,d){var f=new b(c,h[c],d);b.o0.set(c,f);b.Hda.set(d,f);return f};b.getAll=function(){var c=[];
b.o0.forEach(function(d){c.push(d)});return c};b.Ci=function(c){return b.o0.get(c)};b.Teb=function(c){return b.Hda.get(c)};b.Oa=function(c,d){c=b.Ci(c);if(d===null)return!0;if(d&&d.constructor)for(d=b.Teb(d.constructor);d;){if(d==c)return!0;d=d.Gfb()}return!1};b.Kfa=function(c){switch(c){case "string":case "code":return b.b$a;case "number":return b.y4a;case "bool":return b.CYa;case "color":return b.CZa;case "percent":return b.h6a;case "size":return b.w9a;case "identifier":return b.c3a;case "array":return b.Iva;
case "canvas":return b.$Ya;case "img":return b.f3a;case "dict":return b.i6a;case "*":return b.h0a;default:if(b.C3a(c))switch(b.o1a(c)){case "array":var d=b.Kfa(b.qya(c));return function(p,q){p=b.Iva(p,q);for(var r=0;r<p.length;r++)p[r]=d(p[r],q);return p};case "enum":var f=b.rya(c);return b.q1a(f);case "or":f=b.rya(c);var l=f.map(function(p){return b.Kfa(p)});return function(p,q){for(var r=0;r<l.length;r++)try{return l[r](p,q)}catch(t){}throw"Invalid value";};default:throw"Invalid type validator definition: "+
c;}else return b.Ko(function(p){return b.Oa(c,p)})}};b.C3a=function(c){return c.indexOf("[")>=0&&c.lastIndexOf("]")==c.length-1};b.o1a=function(c){return c.substring(0,c.indexOf("["))};b.qya=function(c){return c.substring(c.indexOf("[")+1,c.lastIndexOf("]"))};b.rya=function(c){c=b.qya(c);for(var d=[],f="",l=0,p=0;p<c.length;p++){var q=c.charAt(p);f+=q;switch(q){case "[":l++;break;case "]":l--;break;case ",":l==0&&(d.push(f.substr(0,f.length-1)),f="")}}f!=""&&d.push(f);return d.map(function(r){return b.Q$a(r)})};
b.Q$a=function(c){return c.replace(/^\s+|\s+$/g,"")};b.Ko=function(c){return function(d,f){if(!c(d)){if(typeof d!="string")throw"Invalid value";d=b.v0a(d,f);if(!c(d))throw"Invalid value";}return d}};b.v0a=function(c,d){return function(){return eval(c)}.call(d)};b.h0a=function(c){return c};b.q1a=function(c){return b.Ko(function(d){return c.indexOf(d)!=-1})};b.b1=function(c,d){return k.EA(c)&&d.test(c)};b.o0=new Map;b.Hda=new Map;b.y4a=b.Ko(function(c){return Object.prototype.toString.call(c)=="[object Number]"});
b.b$a=b.Ko(function(c){return typeof c=="string"||c===null});b.CYa=b.Ko(function(c){return c===!0||c===!1});b.Iva=b.Ko(function(c){return Object.prototype.toString.call(c)=="[object Array]"});b.$Ya=b.Ko(function(c){return c&&c.tagName=="CANVAS"});b.f3a=b.Ko(function(c){return c&&c.tagName=="IMG"});b.c3a=b.Ko(function(c){return b.b1(c,RegExp("^[a-z][a-z0-9_]*$","i"))});b.h6a=b.Ko(function(c){return b.b1(c,RegExp("^\\s*([+-]?\\d+\\.?\\d*)%\\s*$","i"))});b.w9a=b.Ko(function(c){return b.b1(c,RegExp("^\\s*([+-]?\\d+\\.?\\d*)\\s*((vw)|(vh)|(vmin)|(vmax)|(px))\\s*$",
"i"))});b.CZa=b.Ko(function(c){return b.b1(c,RegExp("^#[0-9a-f]{6}$","i"))});b.i6a=b.Ko(function(c){try{return k.hpa(c)}catch(d){return!1}});return b}();window.TDV.PlayerAPI.getClassByName=function(b){return e.Ci(b).zR};return e});
define("tdv/util/Sha256",["require"],function(){function a(){k[0]=k[1]=k[2]=k[3]=k[4]=k[5]=k[6]=k[7]=k[8]=k[9]=k[10]=k[11]=k[12]=k[13]=k[14]=k[15]=k[16]=0;this.bna=k;this.uX=1779033703;this.vX=3144134277;this.wX=1013904242;this.xX=2773480762;this.yX=1359893119;this.zX=2600822924;this.AX=528734635;this.BX=1541459225;this.block=this.start=this.bytes=this.Joa=0;this.boa=this.f8=!1;this.first=!0}var m="0123456789abcdef".split(""),h=[-2147483648,8388608,32768,128],n=[24,16,8,0],g=[1116352408,1899447441,
3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,
506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],k=[];a.prototype.update=function(e){if(!this.boa){for(var b,c=0,d,f=e.length,l=this.bna;c<f;){this.f8&&(this.f8=!1,l[0]=this.block,l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0);for(d=this.start;c<f&&d<64;++c)b=e.charCodeAt(c),b<128?l[d>>2]|=b<<n[d++&3]:(b<2048?l[d>>2]|=(192|b>>6)<<n[d++&3]:(b<55296||
b>=57344?l[d>>2]|=(224|b>>12)<<n[d++&3]:(b=65536+((b&1023)<<10|e.charCodeAt(++c)&1023),l[d>>2]|=(240|b>>18)<<n[d++&3],l[d>>2]|=(128|b>>12&63)<<n[d++&3]),l[d>>2]|=(128|b>>6&63)<<n[d++&3]),l[d>>2]|=(128|b&63)<<n[d++&3]);this.Mhb=d;this.bytes+=d-this.start;d>=64?(this.block=l[16],this.start=d-64,this.hash(),this.f8=!0):this.start=d}this.bytes>4294967295&&(this.Joa+=this.bytes/4294967296<<0,this.bytes%=4294967296);return this}};a.prototype.xKa=function(){if(!this.boa){this.boa=!0;var e=this.bna,b=this.Mhb;
e[16]=this.block;e[b>>2]|=h[b&3];this.block=e[16];b>=56&&(this.f8||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.Joa<<3|this.bytes>>>29;e[15]=this.bytes<<3;this.hash()}};a.prototype.hash=function(){var e=this.uX,b=this.vX,c=this.wX,d=this.xX,f=this.yX,l=this.zX,p=this.AX,q=this.BX,r=this.bna,t;for(t=16;t<64;++t){var u=r[t-15];var v=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3;u=r[t-2];u=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10;r[t]=
r[t-16]+v+r[t-7]+u<<0}var w=b&c;for(t=0;t<64;t+=4){if(this.first){var x=704751109;u=r[0]-210244248;q=u-1521486534<<0;d=u+143694565<<0;this.first=!1}else{v=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);u=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7);x=e&b;var y=x^e&c^w;var z=f&l^~f&p;u=q+u+z+g[t]+r[t];v+=y;q=d+u<<0;d=u+v<<0}v=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10);u=(q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7);w=d&e;y=w^d&b^x;z=q&f^~q&l;u=p+u+z+g[t+1]+r[t+1];v+=y;p=c+u<<0;c=u+v<<0;v=(c>>>2|c<<30)^(c>>>
13|c<<19)^(c>>>22|c<<10);u=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7);x=c&d;y=x^c&e^w;z=p&q^~p&f;u=l+u+z+g[t+2]+r[t+2];v+=y;l=b+u<<0;b=u+v<<0;v=(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10);u=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7);w=b&c;y=w^b&d^x;z=l&p^~l&q;u=f+u+z+g[t+3]+r[t+3];v+=y;f=e+u<<0;e=u+v<<0}this.uX=this.uX+e<<0;this.vX=this.vX+b<<0;this.wX=this.wX+c<<0;this.xX=this.xX+d<<0;this.yX=this.yX+f<<0;this.zX=this.zX+l<<0;this.AX=this.AX+p<<0;this.BX=this.BX+q<<0};a.prototype.Lgb=function(){this.xKa();
var e=this.uX,b=this.vX,c=this.wX,d=this.xX,f=this.yX,l=this.zX,p=this.AX,q=this.BX;return m[e>>28&15]+m[e>>24&15]+m[e>>20&15]+m[e>>16&15]+m[e>>12&15]+m[e>>8&15]+m[e>>4&15]+m[e&15]+m[b>>28&15]+m[b>>24&15]+m[b>>20&15]+m[b>>16&15]+m[b>>12&15]+m[b>>8&15]+m[b>>4&15]+m[b&15]+m[c>>28&15]+m[c>>24&15]+m[c>>20&15]+m[c>>16&15]+m[c>>12&15]+m[c>>8&15]+m[c>>4&15]+m[c&15]+m[d>>28&15]+m[d>>24&15]+m[d>>20&15]+m[d>>16&15]+m[d>>12&15]+m[d>>8&15]+m[d>>4&15]+m[d&15]+m[f>>28&15]+m[f>>24&15]+m[f>>20&15]+m[f>>16&15]+m[f>>
12&15]+m[f>>8&15]+m[f>>4&15]+m[f&15]+m[l>>28&15]+m[l>>24&15]+m[l>>20&15]+m[l>>16&15]+m[l>>12&15]+m[l>>8&15]+m[l>>4&15]+m[l&15]+m[p>>28&15]+m[p>>24&15]+m[p>>20&15]+m[p>>16&15]+m[p>>12&15]+m[p>>8&15]+m[p>>4&15]+m[p&15]+m[q>>28&15]+m[q>>24&15]+m[q>>20&15]+m[q>>16&15]+m[q>>12&15]+m[q>>8&15]+m[q>>4&15]+m[q&15]};a.prototype.digest=function(){this.xKa();var e=this.uX,b=this.vX,c=this.wX,d=this.xX,f=this.yX,l=this.zX,p=this.AX,q=this.BX;return[e>>24&255,e>>16&255,e>>8&255,e&255,b>>24&255,b>>16&255,b>>8&255,
b&255,c>>24&255,c>>16&255,c>>8&255,c&255,d>>24&255,d>>16&255,d>>8&255,d&255,f>>24&255,f>>16&255,f>>8&255,f&255,l>>24&255,l>>16&255,l>>8&255,l&255,p>>24&255,p>>16&255,p>>8&255,p&255,q>>24&255,q>>16&255,q>>8&255,q&255]};return function(e){return(new a(!0)).update(e).Lgb()}});
define("tdv/player/parser/Sign",["require","tdv/util/Sha256"],function(a){function m(){for(var k=[[256,"9799e3eb6096a48f515a94324200b7af24251a4131eccf9a2cd65d012a1f5c71"],[1024,"cbab1f6d618e723188cfdb1c7c3f47146e46da4da56030386d85055016afd5d9"],[1E4,"d9c4539649520e3f4a35e5a3331b0fbdc67958dd64ef65a83a75d545413643dd"]],e=0;e<k.length;e++){var b=Array.apply(null,Array(k[e][0])).map((c,d)=>String.fromCharCode(d%256)).join("");if(g(b)!=k[e][1])return!1}return!0}function h(k){var e=Array.isArray(k)?"array":
k===null?"null":typeof k;switch(e){case "array":return"["+k.map(h).join(",")+"]";case "object":return"{"+Object.keys(k).sort().map(function(b){return h(b)+":"+h(k[b])}).join(",")+"}";case "boolean":return k?"true":"false";case "number":return k.toFixed(3);case "string":return'"'+k.split('"').join('\\"')+'"';case "null":case "undefined":return e;case "function":return"<"+e+">"}return""}function n(k){return k.map(function(e){return String.fromCharCode(e)}).join("")}var g=a("tdv/util/Sha256");return{validate:function(k){var e=
[104,97,115,104],b=[116,100,118],c=window.location[n([111,114,105,103,105,110])],d=k[n(e)];delete k[n(e)];k=n(b)+h(k);k=g(k);b=n(b)+c;b=g(b);return k==d||b==d||!m()}}});
define("tdv/player/view/util/geo/Point",["require"],function(){function a(m,h,n){this.set(typeof m!="undefined"?m:0,typeof h!="undefined"?h:0,typeof n!="undefined"?n:0)}a.prototype.set=function(m,h,n){this.x=m;this.y=h;this.z=n;return this};a.prototype.clone=function(){return new a(this.x,this.y,this.z)};a.prototype.apply=function(m){m.wO(this)};a.prototype.project=function(m){m.project(this)};return a});
define("tdv/player/view/util/geo/Vector",["require","tdv/utils","tdv/player/view/util/geo/Point"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/util/geo/Point"),n=m.extend(h,function(g,k,e){h.call(this,g,k,e)});n.prototype.clone=function(){return new n(this.x,this.y,this.z)};n.prototype.Jc=function(){return this.x==0&&this.z==0?0:-Math.atan2(this.x,this.z)};n.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))};n.prototype.yoa=function(){return Math.sqrt(this.x*
this.x+this.y*this.y+this.z*this.z)};n.prototype.dZ=function(g){g/=this.yoa();this.x*=g;this.y*=g;this.z*=g;return this};n.prototype.normalize=function(){return this.dZ(1)};n.prototype.SO=function(g){return this.x*g.x+this.y*g.y+this.z*g.z};n.prototype.b7=function(g){var k=this.z*g.x-this.x*g.z,e=this.x*g.y-this.y*g.x;this.x=this.y*g.z-this.z*g.y;this.y=k;this.z=e;return this};n.YD=function(g,k){return new n(k.x-g.x,k.y-g.y,k.z-g.z)};n.F7=function(g,k){g=NaN-g;k=NaN-k;return Math.sqrt(g*g+k*k+NaN)};
n.zt=function(g,k,e){var b=Math.cos(k)*Math.sin(g),c=Math.sin(k);g=Math.cos(k)*Math.cos(g);return e?e.set(b,c,g):new n(b,c,g)};return n});
define("tdv/player/script/AdjacentPanorama",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/view/util/geo/Vector"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/util/geo/Vector");a=h.define("AdjacentPanorama",m,function(){m.call(this);this.vma=this.oy=void 0});a.prototype.bLa=function(){if(this.oy===void 0){for(this.oy=this.Hya()-this.get("yaw");this.oy>180;)this.oy-=360;for(;this.oy<-180;)this.oy+=360}return this.oy};
a.prototype.gfb=function(){this.vma===void 0&&(this.vma=n.zt(this.Hya()*Math.PI/180,0));return this.vma};a.prototype.Bcb=function(){return this.get("yaw")!==void 0&&this.get("backwardYaw")!==void 0};a.prototype.Hya=function(){return this.get("backwardYaw")-180};return a});define("tdv/player/script/AmbientLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("AmbientLight",m,function(){m.call(this)})});
define("tdv/player/script/Model3DPostprocessing",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DPostprocessing",m,function(){m.call(this)});a.prototype.aF=function(h){this.Tq!==h&&(this.Tq=h,this.HGa())};a.prototype.Gp=function(h){this.RM!==h&&(this.RM=h,this.HGa())};a.prototype.HGa=function(){this.set("disabled",this.RM&&this.get("disableWhileMoving")||this.Tq&&this.get("disableWhileUserInteracting"))};
return a});define("tdv/player/script/AmbientOcclusionModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DPostprocessing");return m.define("AmbientOcclusionModel3DPostprocessing",h,function(){h.call(this)})});define("tdv/constants/PlaybackState",["require","exports"],function(){return{ca:"stopped",PLAYING:"playing",Zb:"paused"}});
define("tdv/player/script/ImageResource",["require","exports","tdv/player/parser/ClassInfo","tdv/binding/Bindable"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(n);h.create("ImageResource",a);return a});
define("tdv/player/script/AnimatedImageResource","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/ImageResource".split(" "),function(a){a("tdv/utils");var m=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/ImageResource");a=n.define("AnimatedImageResource",g,function(){g.call(this)});a.prototype.play=a.prototype.play=function(){this.set("state",h.PLAYING)};a.prototype.pause=
a.prototype.pause=function(){this.set("state",h.Zb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",h.ca)};a.prototype.set=function(k,e){switch(k){case "state":(this.get("state")||h.ca)==h.ca&&e==h.PLAYING&&this.o(m.Up)}g.prototype.set.call(this,k,e)};a.prototype.yk=function(k,e,b){e||(e=1);b||(b=1);return g.prototype.yk.call(this,k,e*this.get("colCount",1),b*this.get("rowCount",1))};return a});
define("tdv/player/script/AntialiasModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DPostprocessing");return m.define("AntialiasModel3DPostprocessing",h,function(){h.call(this)})});
define("tdv/player/script/HotspotMapOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("HotspotMapOverlay",m,function(h){m.call(this);this.BN=h===void 0?!0:h;this.HM=this.Vs=this.Ts=this.Ja=void 0});a.prototype.getItem=function(){if(this.Ja===void 0){var h=this.get("image");this.Ja=h?h.a7(this.BN):null}return this.Ja};a.prototype.ILa=function(){if(this.Ts===void 0){var h=this.get("rollOverImage");
this.Ts=h?h.a7(this.BN):null}return this.Ts};a.prototype.NLa=function(){if(this.Vs===void 0){var h=this.get("selectedImage");this.Vs=h?h.a7(this.BN):null}return this.Vs};a.prototype.wfb=function(){if(this.HM===void 0){this.HM=[];var h=this.getItem();h&&this.HM.push(h);(h=this.ILa())&&this.HM.push(h);(h=this.NLa())&&this.HM.push(h)}return this.HM};return a});
define("tdv/player/script/AreaHotspotMapOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotMapOverlay");return m.define("AreaHotspotMapOverlay",h,function(){h.call(this,!0)})});
define("tdv/player/script/AudioResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("AudioResource",m,function(){m.call(this)})});define("tdv/view/constants/CreationPolicy",["require","exports"],function(){return{bL:"inAdvance",eta:"delayed"}});
define("tdv/view/buttons/ButtonGroup",["require","exports","tdv/constants/EventName"],function(a,m,h){return function(){function n(){var g=this;this.ek=[];this.nBa=function(k){g.HEa(k.source)}}n.prototype.register=function(g){this.YWa(g);this.ek.push(g);g.get("pressed")&&this.HEa(g)};n.prototype.unregister=function(g){this.O6a(g)};n.prototype.YWa=function(g){g.bind(h.Rk,this.nBa,this,!0)};n.prototype.O6a=function(g){g.unbind(h.Rk,this.nBa,this)};n.prototype.HEa=function(g){this.ek.forEach(function(k){k.set("pressed",
k==g)})};n.register=function(g,k){this.unregister(g);k=this.Bj(k);g.set("__button_group",k);k.register(g)};n.unregister=function(g){var k=g.get("__button_group");k&&(k.unregister(g),g.set("__button_group",void 0))};n.Bj=function(g){return this.Kza[g]||(this.Kza[g]=new n)};n.Kza={};return n}()});define("tdv/view/constants/ButtonMode",["require","exports"],function(){return{af:"push",ak:"toggle"}});
define("tdv/view/constants/OverflowPolicy",["require","exports"],function(){return{lL:"visible",wta:"hidden",Vr:"scroll"}});define("tdv/view/constants/Alignment",["require","exports"],function(){return{fb:"left",Db:"right",$e:"center",Tc:"top",Gc:"bottom",$d:"middle"}});define("tdv/view/constants/ScrollBarVisiblePolicy",["require","exports"],function(){return{uc:"rollOver",ALWAYS:"always"}});
define("tdv/view/constants/LayoutMode",["require","exports"],function(){return{RZ:"absolute",Mi:"horizontal",JB:"grid",Uk:"vertical"}});define("tdv/view/containers/layout/ChildBounds",["require","exports"],function(){return function(){return function(a){this.ge=a;this.height=this.width=this.y=this.x=0}}()});define("tdv/view/containers/layout/MeasureResult",["require","exports"],function(){return function(){return function(){this.minHeight=this.minWidth=this.height=this.width=0}}()});
define("tdv/view/containers/layout/Layout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/ChildBounds","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n,g){return function(){function k(){this.dc=null;this.JD=h.Tc;this.GC=h.fb;this.NI=this.Ky=0}k.prototype.fRa=function(e){this.Ky!=e&&(this.Ky=e,this.wh())};k.prototype.K$=function(e){this.NI!=e&&(this.NI=e,this.wh())};k.prototype.CRa=function(e){this.dc=e;this.wh()};k.prototype.bQ=function(e){this.GC!=e&&
(this.GC=e,this.wh())};k.prototype.hP=function(){return this.GC};k.prototype.hQ=function(e){this.JD!=e&&(this.JD=e,this.wh())};k.prototype.jP=function(){return this.JD};k.prototype.measure=function(){return new g};k.prototype.update=function(){var e=this.VZa();this.YV(e);this.e8a(e)};k.prototype.YV=function(){};k.prototype.p1=function(){for(var e=this.qza(),b=[],c=0;c<e.length;c++){var d=e[c];d.get("includeInLayout")&&b.push(d)}return b};k.prototype.qza=function(){if(!this.dc)return[];for(var e=this.dc.Cb(),
b=[],c=0;c<e.length;c++){var d=e[c];d.get("visible")&&b.push(d)}return b};k.prototype.VZa=function(){for(var e=this.qza(),b=[],c=0;c<e.length;c++)b.push(new n(e[c]));return b};k.prototype.e8a=function(e){for(var b=0;b<e.length;b++){var c=e[b];c.ge.QQa(c.x,c.y,c.width,c.height)}};k.prototype.wh=function(){this.dc&&(this.dc.lc(),this.dc.Af())};return k}()});
define("tdv/view/containers/layout/AbsoluteLayout",["require","exports","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.measure=function(){for(var e=new n,b=this.p1(),c=0;c<b.length;c++){var d=b[c],f=d.Uy,l=d.WU,p=0;f!==void 0&&(p+=f);l!==void 0&&(p+=l);e.width=Math.max(p+d.qw(),e.width);e.minWidth=Math.max(p+d.mw(),e.minWidth);f=d.bt;l=d.nR;p=0;f!==void 0&&(p+=f);l!==void 0&&
(p+=l);e.height=Math.max(p+d.pw(),e.height);e.minHeight=Math.max(p+d.vA(),e.minHeight)}this.dc&&(b=this.dc.u.Dd+this.dc.u.Ce,e.width+=b,e.minWidth+=b,b=this.dc.u.ie+this.dc.u.Df,e.height+=b,e.minHeight+=b);return e};k.prototype.YV=function(e){if(this.dc)for(var b=this.dc.Xh(),c=this.dc.Wh(),d=0;d<e.length;d++){var f=e[d],l=f.ge,p=l.Uy;if(p===void 0){var q=l.c4;q!==void 0&&(p=Math.round(q*b*.01))}q=l.WU;if(q===void 0){var r=l.d4;r!==void 0&&(q=Math.round(r*b*.01))}r=l.lC;var t=l.Mo;if(t===void 0){var u=
l.lp;u!==void 0?t=Math.round(u*b*.01):p!==void 0&&q!==void 0&&(t=b-p-q)}u=l.bt;if(u===void 0){var v=l.e4;v!==void 0&&(u=Math.round(v*c*.01))}v=l.nR;if(v===void 0){var w=l.b4;w!==void 0&&(v=Math.round(w*c*.01))}w=l.mC;var x=l.UG;if(x===void 0){var y=l.kp;y!==void 0?x=Math.round(y*c*.01):u!==void 0&&v!==void 0&&(x=c-u-v)}f.width=t===void 0?l.qw():Math.max(l.mw(),Math.min(l.R7(),t));f.height=x===void 0?l.pw():Math.max(l.vA(),Math.min(l.Q7(),x));f.x=p!==void 0&&q!==void 0?Math.round(p+(b-q-p-f.width)*
.5):p!==void 0?p:q!==void 0?b-q-f.width:r!==void 0?Math.round(b*.5+r-f.width*.5):0;f.y=u!==void 0&&v!==void 0?Math.round(u+(c-v-u-f.height)*.5):u!==void 0?u:v!==void 0?c-v-f.height:w!==void 0?Math.round(c*.5+w-f.height*.5):0}};return k}(h)});
define("tdv/view/containers/layout/GridLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.Mo=void 0;b.MC=void 0;b.TS=void 0;b.Sy=void 0;b.Ry=void 0;b.xH=void 0;b.RS=void 0;b.QS=void 0;b.PS=void 0;b.Rwa=void 0;b.oEa=void 0;return b}P(e,k);e.prototype.wkb=function(b){this.Mo!=b&&(this.Mo=b,this.wh())};e.prototype.Nkb=function(b){this.Sy!=
b&&(this.Sy=b,this.Sy!=void 0&&(this.MC=void 0),this.wh())};e.prototype.Mkb=function(b){this.Ry!=b&&(this.Ry=b,this.Ry!=void 0&&(this.TS=void 0),this.wh())};e.prototype.Ukb=function(b){this.MC!=b&&(this.MC=b,this.Sy!=void 0&&(this.Sy=void 0),this.wh())};e.prototype.Tkb=function(b){this.TS!=b&&(this.TS=b,this.Ry!=void 0&&(this.Ry=void 0),this.wh())};e.prototype.Skb=function(b){this.xH!=b&&(this.xH=b,this.wh())};e.prototype.Rkb=function(b){this.RS!=b&&(this.RS=b,this.wh())};e.prototype.Qkb=function(b){this.QS!=
b&&(this.QS=b,this.wh())};e.prototype.Pkb=function(b){this.PS!=b&&(this.PS=b,this.wh())};e.prototype.measure=function(){for(var b=new g,c=this.p1(),d=0,f=0;f<c.length;f++)c[f].nq&&d++;if(!isNaN(this.MC))for(isNaN(this.xH)||(b.minWidth=this.xH),f=0;f<c.length;f++){var l=c[f].mw();isNaN(l)||(b.minWidth=Math.max(l,b.minWidth))}if(isNaN(this.Sy))for(f=0;f<c.length;f++)l=c[f].qw(),isNaN(l)||(b.width=Math.max(l,b.width));else b.width=this.Sy;if(isNaN(this.Ry))for(f=0;f<c.length;f++)l=c[f].pw(),isNaN(l)||
(b.height=Math.max(l,b.height));else b.height=this.Ry;c=isNaN(this.MC)?!isNaN(this.Mo)&&this.dc?Math.max(1,Math.floor((this.Mo-this.dc.u.Dd-this.dc.u.Ce+this.Ky)/(b.width+this.Ky))):Math.ceil(Math.sqrt(d)):Math.max(1,Math.floor(100/this.MC));d=Math.ceil(d/c);this.dc&&(b.width=b.width*c+Math.max(0,c-1)*this.Ky+this.dc.u.Dd+this.dc.u.Ce,b.minWidth=b.minWidth+this.dc.u.Dd+this.dc.u.Ce,b.height=b.height*d+Math.max(0,d-1)*this.NI+this.dc.u.ie+this.dc.u.Df);b.minHeight=0;return b};e.prototype.YV=function(b){if(this.dc){for(var c,
d,f=[],l=[],p=0;p<b.length;p++)d=b[p].ge,d.nq?f.push(b[p]):l.push(b[p]);var q=f.length,r=this.dc.Xh();c=this.Ky;if(isNaN(this.Sy))if(isNaN(this.MC)){for(p=b=0;p<f.length;p++)d=f[p].ge,b=Math.max(d.mw(),d.qw(),b);b=Math.min(r,b)}else b=Math.max(1,Math.floor(100/this.MC)),b=(r-(b-1)*c)/b,p=!1,!isNaN(this.QS)&&this.QS<b&&(b=this.QS,p=!0),!isNaN(this.xH)&&this.xH>b&&(b=this.xH,p=!0),p&&(b=Math.max(1,Math.floor((r+c)/(b+c))),b=(r-(b-1)*c)/b);else b=this.Sy;b=Math.max(1,b);var t=Math.max(1,Math.floor(.001+
(r+c)/(b+c)));var u=t*b,v=t*(b+c)-c;p=0;if(r>=v)switch(this.hP()){case h.Db:p=r-v;break;case h.$e:p=Math.round((r-v)*.5);break;default:p=0}r=[];v=[];for(var w=0;w<t;w++)d=Math.round(u/(t-w)),u-=d,v.push(p),p+=d+c,r.push(d);w=this.dc.Wh();c=this.NI;if(isNaN(this.Ry))if(isNaN(this.TS))for(u=1,p=0;p<f.length;p++)d=f[p].ge,u=Math.max(d.vA(),d.pw(),u);else u=Math.max(1,100/this.TS),u=(w-(u-1)*c)/u,p=!1,!isNaN(this.PS)&&this.PS<u&&(u=this.PS,p=!0),!isNaN(this.RS)&&this.RS>u&&(u=this.RS,p=!0),p&&(u=Math.max(1,
Math.floor((w+c)/(u+c))),u=(w-(u-1)*c)/u);else u=this.Ry;q=Math.max(1,Math.ceil(q/t));p=q*u;d=q*(u+c)-c;var x=0;if(w>=d)switch(this.jP()){case h.Gc:x=w-d;break;case h.$d:x=Math.round((w-d)*.5);break;default:x=0}d=[];for(var y=[],z=0;z<q;z++)w=Math.round(p/(q-z)),p-=w,y.push(x),x+=w+c,d.push(w);for(p=0;p<f.length;p++)c=f[p],w=p%t,z=Math.floor(p/t),c.x=v[w],c.width=r[w],c.y=y[z],c.height=d[z];for(p=0;p<l.length;p++)c=l[p],c.x=0,c.width=Math.round(b),c.y=0,c.height=Math.round(u);this.Rwa=t;this.oEa=
q}};return e}(n)});
define("tdv/view/containers/layout/HorizontalLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n,g){return function(k){function e(){return k.call(this)||this}P(e,k);e.prototype.measure=function(){for(var b=new g,c=this.p1(),d=0;d<c.length;d++){var f=c[d];b.height=Math.max(f.pw(),b.height);b.minHeight=Math.max(f.vA(),b.minHeight);b.width+=f.qw();b.minWidth+=f.mw()}this.dc&&(c=Math.max(0,c.length-
1)*this.Ky+this.dc.u.Dd+this.dc.u.Ce,b.width+=c,b.minWidth+=c,c=this.dc.u.ie+this.dc.u.Df,b.height+=c,b.minHeight+=c);return b};e.prototype.YV=function(b){this.Gla(b);this.Fla(b)};e.prototype.Gla=function(b){if(this.dc){for(var c=0,d=0;d<b.length;d++)b[d].ge.nq&&c++;var f=this.dc.Xh()-Math.max(0,c-1)*this.Ky,l=this.dc.Wh();c=f;var p=0,q=[];for(d=0;d<b.length;d++){var r=b[d],t=r.ge,u=t.kp;r.height=u!==void 0?Math.max(t.vA(),Math.min(t.Q7(),Math.round(l*u*.01))):t.pw();u=t.lp;u!==void 0?t.nq?(p+=u,
q.push(r)):r.width=Math.max(t.mw(),Math.min(t.R7(),Math.round(f*u*.01))):(r.width=t.qw(),c-=r.width)}c-=Math.max(0,c-Math.round(f*p*.01));do{b=!1;f=Math.max(0,p>0?c/p:0);l=[];for(d=p=0;d<q.length;d++){r=q[d];t=r.ge;u=Math.round(t.lp*f);var v=t.mw(),w=t.R7();u<v?(r.width=v,c-=r.width,b=!0):u>w?(r.width=w,c-=r.width,b=!0):(p+=t.lp,l.push(r))}q.length=0;q.push.apply(q,l)}while(b);for(d=0;d<q.length;d++)r=q[d],t=r.ge,f=Math.max(0,p>0?c/p:0),r.width=Math.round(t.lp*f),c-=r.width,p-=t.lp}};e.prototype.Fla=
function(b){if(this.dc){for(var c=this.Ky,d=this.dc.Xh(),f=this.dc.Wh(),l=0,p=0,q=0;q<b.length;q++){var r=b[q];r.ge.nq&&(l+=b[q].width,p++)}l+=c*(p-1);if(d>=l)switch(this.hP()){case h.Db:d-=l;break;case h.$e:d=Math.round((d-l)*.5);break;default:d=0}else d=0;for(q=0;q<b.length;q++)if(r=b[q],r.ge.nq){if(f>=r.height)switch(this.jP()){case h.Gc:r.y=f-r.height;break;case h.$d:r.y=Math.round((f-r.height)*.5);break;default:r.y=0}else r.y=0;r.x=d;d+=r.width+c}else r.x=0,r.y=0}};return e}(n)});
define("tdv/view/containers/layout/VerticalLayout",["require","exports","tdv/view/constants/Alignment","tdv/view/containers/layout/Layout","tdv/view/containers/layout/MeasureResult"],function(a,m,h,n,g){return function(k){function e(){return k.call(this)||this}P(e,k);e.prototype.measure=function(){for(var b=new g,c=this.p1(),d=0;d<c.length;d++){var f=c[d];b.width=Math.max(f.qw(),b.width);b.minWidth=Math.max(f.mw(),b.minWidth);b.height+=f.pw();b.minHeight+=f.vA()}this.dc&&(c=Math.max(0,c.length-1)*
this.NI+this.dc.u.ie+this.dc.u.Df,b.height+=c,b.minHeight+=c,c=this.dc.u.Dd+this.dc.u.Ce,b.width+=c,b.minWidth+=c);return b};e.prototype.YV=function(b){this.Gla(b);this.Fla(b)};e.prototype.Gla=function(b){if(this.dc){for(var c=0,d=0;d<b.length;d++)b[d].ge.nq&&c++;var f=this.dc.Xh(),l=this.dc.Wh()-Math.max(0,c-1)*this.NI;c=l;var p=0,q=[];for(d=0;d<b.length;d++){var r=b[d],t=r.ge,u=t.lp;r.width=u!==void 0?Math.max(t.mw(),Math.min(t.R7(),Math.round(f*u*.01))):t.qw();u=t.kp;u!==void 0?t.nq?(p+=u,q.push(r)):
r.height=Math.max(t.vA(),Math.min(t.Q7(),Math.round(l*u*.01))):(r.height=t.pw(),c-=r.height)}c-=Math.max(0,c-Math.round(l*p*.01));do{b=!1;f=Math.max(0,p>0?c/p:0);l=[];for(d=p=0;d<q.length;d++){r=q[d];t=r.ge;u=Math.round(t.kp*f);var v=t.vA(),w=t.Q7();u<v?(r.height=v,c-=r.height,b=!0):u>w?(r.height=w,c-=r.height,b=!0):(p+=t.kp,l.push(r))}q.length=0;q.push.apply(q,l)}while(b);for(d=0;d<q.length;d++)r=q[d],t=r.ge,f=Math.max(0,p>0?c/p:0),r.height=Math.round(t.kp*f),c-=r.height,p-=t.kp}};e.prototype.Fla=
function(b){if(this.dc){for(var c=this.NI,d=this.dc.Wh(),f=this.dc.Xh(),l=0,p=0,q=0;q<b.length;q++){var r=b[q];r.ge.nq&&(l+=r.height,r.width>f&&(f=r.width),p++)}l+=c*(p-1);if(d>=l)switch(this.jP()){case h.Gc:d-=l;break;case h.$d:d=Math.round((d-l)*.5);break;default:d=0}else d=0;for(q=0;q<b.length;q++)if(r=b[q],r.ge.nq){switch(this.hP()){case h.Db:r.x=f-r.width;break;case h.$e:r.x=Math.round((f-r.width)*.5);break;default:r.x=0}r.y=d;d+=r.height+c}else r.x=0,r.y=0}};return e}(n)});
define("tdv/view/containers/BaseContainer","require exports tdv/utils tdv/view/core/UIComponent tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/LayoutMode tdv/view/containers/layout/AbsoluteLayout tdv/view/containers/layout/GridLayout tdv/view/containers/layout/HorizontalLayout tdv/view/containers/layout/VerticalLayout".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(){var q=l.call(this)||this;q.gf("BaseContainer");q.Zm=null;q.qe=[];q.jq=
[];q.D0=k.eta;q.Yxa=[];q.set("contentOpaque",!1);return q}P(p,l);p.prototype.Pb=function(){this.Il(p.ad)};p.prototype.set=function(q,r){q=="children"?this.bi(r):q=="creationPolicy"?this.lkb(r):n.prototype.set.call(this,q,r)};p.prototype.get=function(q,r){return q=="children"?this.Cb():q=="creationPolicy"?this.D0:n.prototype.get.call(this,q,r)};p.prototype.lkb=function(q){this.D0!=q&&(this.D0=q,this.S5())};p.prototype.bi=function(q){var r=this.Cb(),t=q||[],u=r.filter(function(v){return!t.includes(v)});
for(q=0;q<u.length;q++)this.removeChild(u[q]);u=t.filter(function(v){return!r.includes(v)});for(q=0;q<u.length;q++)this.mb(u[q]);for(q=0;q<t.length;q++)this.qr(t[q],q)};p.prototype.Cb=function(){return this.qe};p.prototype.mb=function(q){q.getParent()&&q.getParent().removeChild(q);this.qe.push(q);q.Ia=this;this.Nva(q);q.uka(this.u.JJ);this.jq.push(q);this.S5();q.$r()};p.prototype.removeChild=function(q){q.getParent()==this&&(q.np(),q.Ia=null,this.jq.includes(q)?this.jq=this.jq.filter(function(r){return r!==
q}):(this.wa().removeChild(q.wa()),q.SD(),this.lc(),this.Af()),this.qe=this.qe.filter(function(r){return r!==q}),q.Rja())};p.prototype.dQa=function(){var q=this;this.Cb().forEach(function(r){q.removeChild(r)})};p.prototype.ioa=function(q){return this.qe.indexOf(q)};p.prototype.qr=function(q,r){var t=this.ioa(q);if(t<0)throw"Can't set index. This is not a child of this container";var u=this.qe.slice();u.splice(t,1);u.splice(r,0,q);if(!h.v8(this.qe,u)&&(this.qe=u,!this.jq.includes(q))){r=this.ioa(q);
this.wa().removeChild(q.wa());u=t=null;for(var v=r-1;v>=0&&!t;v--)this.jq.includes(this.qe[v])||(t=this.qe[v]);for(v=r+1;v<this.qe.length&&!u&&!t;v++)this.jq.includes(this.qe[v])||(u=this.qe[v]);t?this.wa().JMa(q.wa(),t.wa()):u?this.wa().KMa(q.wa(),u.wa()):this.wa().appendChild(q.wa());this.Af()}};p.prototype.sI=function(q){l.prototype.sI.call(this,q);this.CGa()};p.prototype.CGa=function(){this.qe.forEach(function(q){this.Nva(q)}.bind(this))};p.prototype.Nva=function(q){q.set("inheritedInteractionEnabled",
this.G("interactionEnabled")&&this.G("inheritedInteractionEnabled")&&this.G("childrenInteractionEnabled"))};p.prototype.nK=function(q){var r=this;l.prototype.nK.call(this,q);this.qe&&this.qe.forEach(function(t){t.uka(r.u.JJ)})};p.prototype.gda=function(q){l.prototype.gda.call(this,q);this.Cb().forEach(function(r){r.Yz()});this.S5()};p.prototype.T2a=function(){return!!(this.TI&&this.HS&&this.Vb())};p.prototype.co=function(q,r,t,u){l.prototype.co.call(this,q,r,t,u);this.Yxa=u;this.S5()};p.prototype.SD=
function(){var q=this;l.prototype.SD.call(this);this.Cb().forEach(function(r){q.jq.includes(r)||(q.wa().removeChild(r.wa()),r.SD())});this.jq=this.Cb()};p.prototype.S5=function(){var q=this;this.T2a()&&(this.D0!=k.eta||this.Py)&&this.jq.length!=0&&(this.jq.forEach(function(r){var t;r.x8(q.TI,q.HS)?(r.co(q.Vb(),q.TI,q.HS,q.Yxa),q.wa().appendChild(r.wa())):console.error("Child of class "+r.tA()+" is not compatible with visuals type: "+((t=q.TI)===null||t===void 0?void 0:t.getType()))}),this.jq=[],this.lc(),
this.Af())};p.prototype.aZ=function(q){this.Zm!=q&&(this.Zm&&this.Zm.CRa(null),(this.Zm=q)&&this.Zm.CRa(this))};p.prototype.jb=function(){var q=!1,r=this.G("layout");if(this.S("layout")){switch(r){case e.JB:this.aZ(new c);break;case e.Mi:this.aZ(new d);break;case e.Uk:this.aZ(new f);break;default:this.aZ(new b)}this.$("layout");q=!0}var t=this.Zm;if(this.S("horizontalAlign")||q)t.bQ(this.G("horizontalAlign")),this.$("horizontalAlign");if(this.S("verticalAlign")||q)t.hQ(this.G("verticalAlign")),this.$("verticalAlign");
if(this.S("gap")||q)r==e.JB?(t.fRa(this.G("gap")),t.K$(this.G("gap"))):r==e.Mi?t.fRa(this.G("gap")):r==e.Uk&&t.K$(this.G("gap")),this.$("gap");if(r==e.JB){if(this.S("itemWidth")||q){var u=this.G("itemWidth"),v=n.Cp(u);v!==void 0?t.Ukb(v):t.Nkb(u);this.$("itemWidth")}if(this.S("itemHeight")||q)u=this.G("itemHeight"),v=n.Cp(u),v!==void 0?t.Tkb(v):t.Mkb(u),this.$("itemHeight");this.S("itemMinWidth")&&(t.Skb(this.G("itemMinWidth")),this.$("itemMinWidth"));this.S("itemMinHeight")&&(t.Rkb(this.G("itemMinHeight")),
this.$("itemMinHeight"));this.S("itemMaxWidth")&&(t.Qkb(this.G("itemMaxWidth")),this.$("itemMaxWidth"));this.S("itemMaxHeight")&&(t.Pkb(this.G("itemMaxHeight")),this.$("itemMaxHeight"))}this.S("childrenInteractionEnabled")&&(this.$("childrenInteractionEnabled"),this.CGa());this.Oc(["cursor"],{cursor:"inheritedCursor"},this.qe,!0,!1);n.prototype.jb.call(this);r==e.JB&&t.wkb(this.Mo)};p.prototype.Oc=function(q,r,t,u,v){for(var w=0;w<q.length;w++){var x=q[w];if(!u||this.S(x)){for(var y=0;y<t.length;y++)t[y].set(r[x]?
r[x]:x,this.G(x));v&&this.$(x)}}};p.prototype.Zy=function(){if(this.Zm){var q=this.Zm.measure();this.cn=q.width;this.bn=q.height;this.iT=q.minWidth;this.hT=q.minHeight}else l.prototype.Zy.call(this)};p.prototype.Kk=function(){this.Zm&&this.Zm.update();n.prototype.Kk.call(this)};p.ad=Object.assign({},n.ad,{children:[[]],childrenInteractionEnabled:!0,gap:0,horizontalAlign:g.fb,itemHeight:void 0,itemMaxHeight:void 0,itemMaxWidth:void 0,itemMinHeight:void 0,itemMinWidth:void 0,itemWidth:void 0,layout:e.RZ,
verticalAlign:g.Tc});return p}(n)});define("tdv/view/core/visuals/Visuals",["require","exports","tdv/events/EventDispatcher"],function(a,m,h){return function(n){function g(){var k=n.call(this)||this;k.K=k.tp();return k}P(g,n);g.prototype.tp=function(){throw Error("Not implemented");};g.prototype.oSa=function(k){var e=this;Object.keys(k).forEach(function(b){e.K[b]=k[b]})};return g}(h)});
define("tdv/view/core/visuals/util",["require","exports"],function(){var a={QIa:function(m){var h=[];if(m.uk&&m.uk.length>0){var n=m.uk.slice();n=[].concat([n[0]],n,[n[n.length-1]]);m=a.tcb(m);m=[].concat([0],m,[1]);for(var g=0;g<n.length;g++){var k=m[g];k>=0&&h.push({color:n[g],ratio:k})}for(g=0;g<h.length-1;)h[g].ratio==h[g+1].ratio&&h[g].color==h[g+1].color?h.splice(g,1):g++;for(g=1;g<h.length-1;)h[g-1].ratio==h[g+1].ratio?h.splice(g,1):g++}return h},tcb:function(m){var h=m.uk.length;for(m=m.J6&&
m.uk.length>0?m.J6.map(function(n){return Math.min(1,Math.max(0,n))}):h==1?[.5]:Array.from({length:h}).map(function(n,g){return 1*g/(h-1)});m.length<h;)m.push(1);m.length>h&&m.splice(h,m.length-h);return m}};return a});
define("tdv/view/core/visuals/dom/DOMUIBaseVisuals","require exports tdv/view/constants/GradientDirection tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/core/ZIndex tdv/view/core/visuals/Visuals tdv/view/core/visuals/util tdv/utils".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){var f=c.call(this)||this;f.element=null;f.Hk=null;f.Uh=null;f.Je=null;f.Fh=null;f.vl=null;f.ew=null;f.nKa=!1;return f}P(d,c);d.prototype.tp=function(){return new n};d.prototype.tk=function(f){this.$D().appendChild(f)};
d.prototype.Y9=function(f){this.$D().removeChild(f)};d.prototype.appendChild=function(f){this.$D().appendChild(f.cc())};d.prototype.JMa=function(f,l){this.$D().insertBefore(f.cc(),l.cc().nextSibling)};d.prototype.KMa=function(f,l){this.$D().insertBefore(f.cc(),l.cc())};d.prototype.removeChild=function(f){f=f.cc();f.parentElement==this.$D()&&this.$D().removeChild(f)};d.prototype.cc=function(){this.element||(this.element=document.createElement("div"),this.element.style.height="0",this.element.style.margin=
"0",this.element.style.padding="0",this.element.style.position="absolute",this.element.style.overflow="hidden",this.element.style.display="block",this.element.style.visibility="hidden",this.element.style.width="0",this.element.style.zIndex=g.Mua);return this.element};d.prototype.GLa=function(f){var l=b.offset(this.element);f=b.offset(f.cc());return{left:l.left-f.left,top:l.top-f.top}};d.prototype.Tfb=function(){this.Hk||(this.Hk=document.createElement("div"),this.Hk.setAttribute("tdvlayer","shadow"),
this.Hk.style.position="absolute",this.Hk.style.left="0",this.Hk.style.top="0",this.Hk.style.right="0",this.Hk.style.bottom="0",this.Hk.style.zIndex=g.SVa);return this.Hk};d.prototype.S7=function(){this.Fh||(this.Fh=document.createElement("div"),this.Fh.setAttribute("tdvlayer","overShadow"),this.Fh.style.cursor="inherit",this.Fh.style.height="0",this.Fh.style.left="0",this.Fh.style.position="absolute",this.Fh.style.top="0",this.Fh.style.width="0",this.Fh.style.zIndex=g.hua);return this.Fh};d.prototype.Seb=
function(){this.Uh||(this.Uh=document.createElement("div"),this.Uh.setAttribute("tdvlayer","filter"),this.Uh.style.cursor="inherit",this.Uh.style.display="none",this.Uh.style.left="0",this.Uh.style.position="absolute",this.Uh.style.top="0",this.Uh.style.userSelect="none",this.Uh.style["-webkit-user-select"]="none",this.Uh.style.zIndex=g.dUa);return this.Uh};d.prototype.Qeb=function(){this.Je||(this.Je=document.createElement("canvas"),this.Je.setAttribute("tdvlayer","background"),this.Je.style.cursor=
"inherit",this.Je.style.display="none",this.Je.style.left="0",this.Je.style.position="absolute",this.Je.style.top="0",this.Je.style.userSelect="none",this.Je.style["-webkit-user-select"]="none",this.Je.style.zIndex=g.Faa);return this.Je};d.prototype.KLa=function(){this.vl||(this.vl=document.createElement("div"),this.vl.setAttribute("tdvlayer","content"),this.vl.style.position="absolute",this.vl.style.cursor="inherit",this.vl.style.inset="0",this.vl.style.overflow="visible",this.vl.style.zIndex=g.bta);
return this.vl};d.prototype.$D=function(){this.ew||(this.ew=document.createElement("div"),this.ew.style.cursor="inherit",this.ew.style.inset="0",this.ew.style.position="absolute");return this.ew};d.prototype.xnb=function(){this.nKa||(this.nKa=!0,this.kA())};d.prototype.kA=function(){this.cc().appendChild(this.Tfb());this.cc().appendChild(this.S7());this.S7().appendChild(this.Seb());this.S7().appendChild(this.Qeb());this.S7().appendChild(this.KLa());this.KLa().appendChild(this.$D())};d.prototype.update=
function(f){this.xnb();this.rh(f);this.oSa(f)};d.prototype.rh=function(f){this.Gnb(f);this.HK(f);this.Tnb(f);this.jnb(f);this.Jsa(f)};d.prototype.Gnb=function(f){this.K.id!==f.id&&(f.id?this.element.setAttribute("id",f.id.toString()):this.element.removeAttribute("id"));this.K.className!==f.className&&(f.className?this.element.setAttribute("tdvclass",f.className):this.element.removeAttribute("tdvclass"));this.K.tabIndex!==f.tabIndex&&(f.tabIndex!==void 0?this.element.setAttribute("tabIndex",f.tabIndex.toString()):
this.element.removeAttribute("tabIndex"));this.K.ariaLabel!==f.ariaLabel&&(f.ariaLabel?this.element.setAttribute("aria-label",f.ariaLabel):this.element.removeAttribute("aria-label"));this.K.xO!==f.xO&&(f.xO?this.element.setAttribute("aria-role",f.xO):this.element.removeAttribute("aria-role"));this.K.JJ!==f.JJ&&(f.JJ?(this.Fh.style.zIndex=g.hua,this.vl.style.zIndex=g.bta):(this.Fh.style.zIndex=g.zVa,this.vl.style.zIndex=g.gUa));this.K.rY!==f.rY&&(this.element.style.zIndex=f.rY?g.Mua:g.kWa);this.K.cursor!==
f.cursor&&(this.element.style.cursor=f.cursor)};d.prototype.HK=function(f){this.K.opacity!==f.opacity&&(this.element.style.opacity=f.opacity.toString());if(this.K.x!==f.x||this.K.y!==f.y||this.K.width!==f.width||this.K.height!==f.height||this.K.offsetX!==f.offsetX||this.K.offsetY!==f.offsetY||this.K.visible!==f.visible)f.visible?(this.Fh.style.width=f.width+"px",this.Fh.style.height=f.height+"px",this.element.style.left=(f.x||0)+f.offsetX+"px",this.element.style.top=(f.y||0)+f.offsetY+"px",this.element.style.width=
f.width+"px",this.element.style.height=f.height+"px",this.element.style.visibility="inherit",this.element.style.overflow="visible",f.visible&&this.Fh.clientWidth===0&&f.width!=0&&(this.element.style.width="0",this.element.style.width=f.width+"px")):(this.element.style.visibility="hidden",this.element.style.width="0",this.element.style.height="0",this.element.style.overflow="hidden",this.Fh.style.width="0",this.Fh.style.height="0")};d.prototype.Jsa=function(f){this.K.Iw!==f.Iw&&(this.vl.style.overflow=
f.Iw?"visible":"hidden",this.ew.style.right=f.Iw?"0":"initial",this.ew.style.bottom=f.Iw?"0":"initial");this.K.Dd!==f.Dd&&(this.vl.style.left=f.Dd+"px");this.K.ie!==f.ie&&(this.vl.style.top=f.ie+"px");this.K.Ce!==f.Ce&&(this.vl.style.right=f.Ce+"px");this.K.Df!==f.Df&&(this.vl.style.bottom=f.Df+"px");this.K.Kc!==f.Kc&&(this.ew.style.left=-f.Kc+"px");this.K.Lc!==f.Lc&&(this.ew.style.top=-f.Lc+"px")};d.prototype.Tnb=function(f){if(this.K.borderTopLeftRadius!==f.borderTopLeftRadius||this.K.borderTopRightRadius!==
f.borderTopRightRadius||this.K.borderBottomLeftRadius!==f.borderBottomLeftRadius||this.K.borderBottomRightRadius!==f.borderBottomRightRadius||this.K.kB!==f.kB||this.K.gu!==f.gu||this.K.hu!==f.hu||this.K.eo!==f.eo||this.K.uK!==f.uK||this.K.shadowColor!==f.shadowColor||this.K.Zw!==f.Zw){var l=f.gu+"px "+f.hu+"px "+f.eo+"px "+f.uK+"px "+f.shadowColor;this.Hk.style.display=f.kB?"block":"none";this.Hk.style.boxShadow=l;this.Hk.style.borderTopLeftRadius=f.borderTopLeftRadius+"px";this.Hk.style.borderTopRightRadius=
f.borderTopRightRadius+"px";this.Hk.style.borderBottomLeftRadius=f.borderBottomLeftRadius+"px";this.Hk.style.borderBottomRightRadius=f.borderBottomRightRadius+"px";this.Hk.style.opacity=f.Zw.toString()}};d.prototype.jnb=function(f){if(this.K.bJ!==f.bJ||this.K.borderTopLeftRadius!==f.borderTopLeftRadius||this.K.borderTopRightRadius!==f.borderTopRightRadius||this.K.borderBottomLeftRadius!==f.borderBottomLeftRadius||this.K.borderBottomRightRadius!==f.borderBottomRightRadius||this.K.width!==f.width||
this.K.height!==f.height||this.K.visible!==f.visible){var l=Math.round(f.bJ*25),p=f.visible&&l>0;p?(this.Uh.style.display="block",this.Uh.style.backdropFilter="blur("+l+"px)",this.Uh.style.borderTopLeftRadius=f.borderTopLeftRadius+"px",this.Uh.style.borderTopRightRadius=f.borderTopRightRadius+"px",this.Uh.style.borderBottomLeftRadius=f.borderBottomLeftRadius+"px",this.Uh.style.borderBottomRightRadius=f.borderBottomRightRadius+"px",this.Uh.style.width=f.width+"px",this.Uh.style.height=f.height+"px"):
this.Uh.style.display="none"}if(this.K.width!==f.width||this.K.height!==f.height||this.K.uk!==f.uk||this.K.OD!==f.OD||this.K.nm!==f.nm||this.K.Te!==f.Te||this.K.borderLeftColor!==f.borderLeftColor||this.K.Ue!==f.Ue||this.K.borderTopColor!==f.borderTopColor||this.K.xf!==f.xf||this.K.borderRightColor!==f.borderRightColor||this.K.wf!==f.wf||this.K.borderBottomColor!==f.borderBottomColor||this.K.Zv!==f.Zv||this.K.visible!==f.visible){var q=f.uk&&f.uk.length>0;l=!!f.Zv;p=f.Te>0&&f.borderLeftColor||f.Ue>
0&&f.borderTopColor||f.xf>0&&f.borderRightColor||f.wf>0&&f.borderBottomColor;if(p=f.visible&&(q||l||p)){p=Math.max(0,f.width-(f.Te+f.xf));var r=Math.max(0,f.height-(f.Ue+f.wf));this.Je.width=p;this.Je.height=r;var t=this.Je.getContext("2d");if(q){q=e.QIa(f);var u=f.OD==h.o_?t.createLinearGradient(0,0,p,0):t.createLinearGradient(0,0,0,r);q.forEach(function(v){u.addColorStop(v.ratio,v.color)});t.fillStyle=u;t.fillRect(0,0,p,r)}else t.clearRect(0,0,p,r);l&&t.drawImage(f.Zv,0,0,p,r);this.Je.style.opacity=
f.nm.toString();this.Je.style.borderTopLeftRadius=f.borderTopLeftRadius+"px";this.Je.style.borderTopRightRadius=f.borderTopRightRadius+"px";this.Je.style.borderBottomLeftRadius=f.borderBottomLeftRadius+"px";this.Je.style.borderBottomRightRadius=f.borderBottomRightRadius+"px";this.Je.style.borderLeft=this.C7(f.Te,f.borderLeftColor);this.Je.style.borderTop=this.C7(f.Ue,f.borderTopColor);this.Je.style.borderRight=this.C7(f.xf,f.borderRightColor);this.Je.style.borderBottom=this.C7(f.wf,f.borderBottomColor);
this.Je.style.width=p+"px";this.Je.style.height=r+"px";this.Je.style.display="block";this.Je.clientWidth===0&&this.Je.width!==0&&(this.Je.style.width="0",this.Je.style.width=this.Je.width+"px")}else this.Je.style.display="none"}};d.prototype.C7=function(f,l){return f>0?l?f+"px solid "+l:f+"px solid transparent":"none"};return d}(k)});
define("tdv/view/core/visualprops/ContainerVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,h){return function(n){function g(){var k=n!==null&&n.apply(this,arguments)||this;k.contentHeight=0;k.contentWidth=0;k.Bk=!1;k.Wg=0;k.Bf=0;k.Zt="#000000";k.$t=.5;k.ph=10;k.Wn=5;k.Xn=5;k.Lk=!1;return k}P(g,n);return g}(h)});
define("tdv/constants/Key",["require","exports"],function(){var a={bk:38,Ji:40,Db:39,fb:37,jL:32,Mp:65,xWa:90,uo:87,qo:83,Sp:68,Q:81,E:69,v_:187,r_:189,g_:27,ua:{}};a.ua.bk="ArrowUp";a.ua.Ji="ArrowDown";a.ua.Db="ArrowRight";a.ua.fb="ArrowLeft";a.ua.Mp="KeyA";a.ua.xWa="KeyZ";a.ua.uo="KeyW";a.ua.qo="KeyS";a.ua.Sp="KeyD";a.ua.Q="KeyQ";a.ua.E="KeyE";a.ua.v_="BracketRight";a.ua.r_="Slash";a.ua.g_="Escape";a.ua.jL="Space";a.ua.f_="Enter";return a});
define("tdv/view/util/KeyboardControl",["require","exports","tdv/constants/EventName","tdv/constants/Key","tdv/events/EventDispatcher"],function(a,m,h,n,g){a=function(){function e(){}e.yp=function(){return document.activeElement&&document.activeElement!==document.body};e.kfb=function(){return document.activeElement};e.mhb=function(b){return Array.isArray(b)?b.includes(document.activeElement):b==document.activeElement};e.Oqa=function(b,c){b===void 0&&(b=void 0);c===void 0&&(c=void 0);this.Uj||(this.Uj=
document.createElement("div"));document.querySelectorAll("*[tabindex]").forEach(function(d){d.tabIndex>this.Uj.tabIndex&&(this.Uj.tabIndex=d.tabIndex+1)}.bind(this));document.body.appendChild(this.Uj);b!=void 0&&c!=void 0?(this.Uj.style.position="absolute",this.Uj.style.top=c+"px",this.Uj.style.left=b+"px",this.Uj.style.width="1px",this.Uj.style.height="1px"):(this.Uj.style.position="fixed",this.Uj.style.top="0",this.Uj.style.left="0",this.Uj.style.width="100%",this.Uj.style.height="100%");this.Uj.focus();
this.Uj.blur();document.body.removeChild(this.Uj);this.eX.o(h.V)};e.blur=function(){document.activeElement.blur()};e.Oma=function(b){this.UW.push(b)};e.Fqa=function(b){b=this.UW.indexOf(b);b!=-1&&this.UW.splice(b,1)};e.Ybb=function(b){this.OY.push(b)};e.Gjb=function(b){b=this.OY.indexOf(b);b!=-1&&this.OY.splice(b,1)};e.eIa=function(b,c){this.bra(b,c.map(function(d){return[d]}))};e.Obb=function(b,c){this.bra(b,[c])};e.Lbb=function(b,c,d,f){for(var l=[],p=0;p<d;p++)l.push(c.slice(p*f,(p+1)*f));this.bra(b,
l)};e.bra=function(b,c){this.xna.set(b,new k(c))};e.Eqa=function(b){this.xna.delete(b)};e.$pa=function(b){if(b.code==n.ua.jL||b.code==n.ua.f_){var c=this.LLa();c&&this.$db(c)}else b.code!=n.ua.g_&&[n.ua.bk,n.ua.Ji,n.ua.Db,n.ua.fb].includes(b.code)&&this.xna.forEach(function(d){d.tgb()&&d.Geb(b.code)})};e.aqa=function(b){b.code==n.ua.jL||b.code==n.ua.f_?(b=this.LLa())?b.dispatchEvent(this.FJa("mouseup",b)):this.OY.length&&this.OY.pop()():b.code==n.ua.g_&&(this.UW.length?this.UW.pop()():this.yp()&&
this.Oqa())};e.lf=function(b){!b.isTrusted||b.target&&["BUTTON","INPUT","SELECT","TEXTAREA"].includes(b.target.tagName)||setTimeout(function(){this.Oqa(b.pageX,b.pageY)}.bind(this),0)};e.nib=function(){this.eX.o(h.V)};e.$db=function(b){b.dispatchEvent(this.FJa("mousedown",b))};e.LLa=function(){return this.yp()?document.activeElement:null};e.FJa=function(b,c){c=c.getBoundingClientRect();return new window.MouseEvent(b,{clientX:c.left+c.width/2,clientY:c.top+c.height/2})};e.Wa=function(){document.addEventListener("mouseup",
this.lf.bind(this),!0);document.addEventListener("keydown",this.$pa.bind(this),!0);document.addEventListener("keyup",this.aqa.bind(this),!0);document.addEventListener("focusin",this.nib.bind(this),!0)};e.eX=new g;e.Uj=null;e.UW=[];e.OY=[];e.xna=new Map;return e}();var k=function(){function e(b){b===void 0&&(b=[]);this.WO=b}e.prototype.tgb=function(){return this.eLa()!=null};e.prototype.eLa=function(){for(var b=document.activeElement,c=0;c<this.WO.length;c++)for(var d=0;d<this.WO[c].length;d++)if(this.WO[c][d]==
b)return{Wjb:c,ddb:d};return null};e.prototype.Geb=function(b){var c=this.eLa();if(c!=null){var d=0,f=0;switch(b){case n.ua.Db:d=1;break;case n.ua.fb:d=-1;break;case n.ua.bk:f=-1;break;case n.ua.Ji:f=1}b=c.Wjb+f;b<0||b>=this.WO.length||(c=c.ddb+d,c<0||c>=this.WO[b].length||this.WO[b][c].focus())}};return e}();return a});
define("tdv/view/containers/ScrollableContainer","require exports tdv/constants/EventName tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/OverflowPolicy tdv/view/constants/ScrollBarVisiblePolicy tdv/view/containers/BaseContainer tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/ContainerVisualProperties tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/KeyboardControl".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q){return function(r){function t(){var u=
r.call(this)||this;u.gf("ScrollableContainer");u.axa=0;u.bxa=0;u.fn=!1;u.gn=!1;u.upb=!1;u.ppb=!1;u.gka=!1;u.Us=null;u.Mia=k.wta;u.sS=!1;u.kW=!1;u.qja=void 0;u.rja=void 0;return u}P(t,r);t.prototype.UL=function(){return new d};t.prototype.Yz=function(){r.prototype.Yz.call(this);this.Py?(q.eX.bind(h.V,this.ria,this,!1),this.ria()):q.eX.h(h.V,this.ria,this)};t.prototype.ria=function(){if(q.yp()){var u=this.wa();u&&u instanceof c&&(u=this.Cb().map(function(v){return v.wa().cc()}).indexOf(q.kfb()),u!==
-1&&this.scrollIntoView(this.Cb()[u]))}};t.prototype.scrollIntoView=function(u){var v=u.lw(),w=u.sA();this.scrollTo(Math.min(v,Math.max(v+u.nb()-this.u.Bf,this.u.Kc)),Math.min(w,Math.max(w+u.Mb()-this.u.Wg,this.u.Lc)))};t.prototype.scrollTo=function(u,v){var w=this.u.Kc;u>this.u.Kc?this.S6()&&(w=Math.min(u,this.u.contentWidth-this.u.Bf)):u<this.u.Kc&&this.R6()&&(w=Math.max(u,0));u=this.u.Lc;v>this.u.Lc?this.HO()&&(u=Math.min(v,this.u.contentHeight-this.u.Wg)):v<this.u.Lc&&this.JO()&&(u=Math.max(v,
0));this.zV(w,u)};t.prototype.AQa=function(){if(this.HO()){for(var u=Math.max(0,this.u.contentHeight-this.u.Wg),v=Math.min(u,this.u.Lc+this.u.Wg*.5),w=u=Math.min(u,this.u.Lc+this.u.Wg),x=this.Cb().slice(),y=x.shift();x.length;y=x.shift())if(y.get("visible")){var z=y.sA();z+y.Mb()>this.u.Lc+this.u.Wg&&z>=v&&z<u&&z<w&&(w=z)}this.zV(this.u.Kc,w)}};t.prototype.HO=function(){return this.KO()&&this.u.Lc+this.u.Wg<this.u.contentHeight};t.prototype.EQa=function(){if(this.JO()){for(var u=Math.max(0,this.u.Lc-
this.u.Wg),v=Math.max(0,this.u.Lc-this.u.Wg*.5),w=u,x=this.Cb().slice(),y=x.shift();x.length;y=x.shift())if(y.get("visible")){var z=y.sA();y=z+y.Mb();z<this.u.Lc&&y>=u+this.u.Wg&&y<v+this.u.Wg&&y>w+this.u.Wg&&(w=y-this.u.Wg)}this.zV(this.u.Kc,w)}};t.prototype.JO=function(){return this.KO()&&this.u.Lc>0};t.prototype.DQa=function(){if(this.S6()){for(var u=Math.max(0,this.u.contentWidth-this.u.Bf),v=Math.min(u,this.u.Kc+this.u.Bf*.5),w=u=Math.min(u,this.u.Kc+this.u.Bf),x=this.Cb().slice(),y=x.shift();x.length;y=
x.shift())if(y.get("visible")){var z=y.lw();z+y.nb()>this.u.Kc+this.u.Bf&&z>=v&&z<u&&z<w&&(w=z)}this.zV(w,this.u.Lc)}};t.prototype.S6=function(){return this.IO()&&this.u.Kc+this.u.Bf<this.u.contentWidth};t.prototype.scrollLeft=function(){if(this.R6()){for(var u=Math.max(0,this.u.Kc-this.u.Bf),v=Math.max(0,this.u.Kc-this.u.Bf*.5),w=u,x=this.Cb().slice(),y=x.shift();x.length;y=x.shift())if(y.get("visible")){var z=y.lw();y=z+y.nb();z<this.u.Kc&&y>=u+this.u.Bf&&y<v+this.u.Bf&&y>w+this.u.Bf&&(w=y-this.u.Bf)}this.zV(w,
this.u.Lc)}};t.prototype.R6=function(){return this.IO()&&this.u.Kc>0};t.prototype.zV=function(u,v){this.Vw(this.u.Kc!=u);this.Ww(this.u.Lc!=v);this.eW();this.dcb(u,v)};t.prototype.KO=function(){return this.kW&&this.u.Wg<this.u.contentHeight};t.prototype.IO=function(){return this.sS&&this.u.Bf<this.u.contentWidth};t.prototype.Pb=function(){this.Il(t.ad)};t.prototype.GP=function(u,v,w){var x=1,y=1;w=="content"?(x=this.u.contentWidth,y=this.u.contentHeight):w=="page"&&(x=this.u.Bf,y=this.u.Wg);this.u.Kc+=
u*x;this.u.Lc+=v*y;this.KI()};t.prototype.dcb=function(u,v){var w=[];this.u.Kc!=u&&w.push(new p("hScrollPosition",this.u.Kc,u));this.u.Lc!=v&&w.push(new p("vScrollPosition",this.u.Lc,v));w.length!=0&&(this.Us=new l("cubic_in_out",w,500),f.requestFrame(this.zia,this))};t.prototype.hIa=function(u,v,w){var x=[];u&&x.push(new p("hScrollPosition",this.u.Kc,this.u.Kc+u));v&&x.push(new p("vScrollPosition",this.u.Lc,this.u.Lc+v));x.length==0?this.Us||(this.Vw(!1),this.Ww(!1)):(this.Us=new l("linear",x,w),
f.requestFrame(this.zia,this))};t.prototype.zia=function(u){if(this.Us&&!this.Us.Ve()){this.Us.Nb(u);var v=u=!1;this.Us.nX("hScrollPosition")&&(this.u.Kc=this.Us.ob("hScrollPosition"),u=this.u.Kc<0||this.u.Kc>this.u.contentWidth-this.u.Bf?!1:!0);this.Us.nX("vScrollPosition")&&(this.u.Lc=this.Us.ob("vScrollPosition"),v=this.u.Lc<0||this.u.Lc>this.u.contentHeight-this.u.Wg?!1:!0);this.Vw(u);this.Ww(v);this.KI();f.requestFrame(this.zia,this)}else this.Vw(!1),this.Ww(!1),this.Us=null};t.prototype.KI=
function(u){if(u){if(!this.sS)switch(this.G("horizontalAlign")){case g.Db:this.u.Kc=this.u.contentWidth-this.u.Bf;break;case g.$e:this.u.Kc=(this.u.contentWidth-this.u.Bf)/2;break;default:this.u.Kc=0}if(!this.kW)switch(this.G("verticalAlign")){case g.Gc:this.u.Lc=this.u.contentHeight-this.u.Wg;break;case g.$d:this.u.Lc=(this.u.contentHeight-this.u.Wg)/2;break;default:this.u.Lc=0}}this.u.Kc=Math.max(0,Math.min(this.u.contentWidth-this.u.Bf,this.u.Kc));this.u.Lc=Math.max(0,Math.min(this.u.contentHeight-
this.u.Wg,this.u.Lc));this.A8a(this.u.Kc);this.l9a(this.u.Lc);this.tb();if(this.qja!=this.u.Kc||this.rja!=this.u.Lc)this.qja!==void 0&&this.rja!==void 0&&this.o(new n(h.Vr)),this.qja=this.u.Kc,this.rja=this.u.Lc};t.prototype.$E=function(u){this.gka!==u&&(this.gka=u,this.eW())};t.prototype.Vw=function(u){this.fn!==u&&(this.fn=u,this.eW())};t.prototype.Ww=function(u){this.gn!==u&&(this.gn=u,this.eW())};t.prototype.eW=function(){var u=this.get("scrollBarVisible")==e.ALWAYS||this.fn||this.gn||this.gka;
this.u.Bk=this.sS&&u;this.u.Lk=this.kW&&u;this.tb()};t.prototype.jb=function(){this.S("overflow")&&(this.Mia=this.G("overflow"),this.$("overflow"),this.Af());this.S("scrollBarColor")&&(this.u.Zt=this.G("scrollBarColor"),this.$("scrollBarColor"));this.S("scrollBarWidth")&&(this.u.ph=this.G("scrollBarWidth"),this.$("scrollBarWidth"));if(this.S("scrollBarMargin")||this.S("scrollBarVerticalMargin")||this.S("scrollBarHorizontalMargin"))this.u.Wn=this.G("scrollBarHorizontalMargin","scrollBarMargin"),this.u.Xn=
this.G("scrollBarVerticalMargin","scrollBarMargin"),this.$("scrollBarMargin"),this.$("scrollBarVerticalMargin"),this.$("scrollBarHorizontalMargin");this.S("scrollBarOpacity")&&(this.u.$t=this.G("scrollBarOpacity"),this.$("scrollBarOpacity"));r.prototype.jb.call(this)};t.prototype.Kk=function(){r.prototype.Kk.call(this);this.jab();this.Gab();this.Eab();this.eW();this.tb()};t.prototype.jab=function(){for(var u=0,v=0,w=0,x=0,y=this.Cb(),z=0;z<y.length;z++){var A=y[z];A.get("visible")&&(x=Math.min(x,
A.lw()),w=Math.min(w,A.sA()),u=Math.max(u,A.lw()+A.nb()),v=Math.max(v,A.sA()+A.Mb()))}this.axa=x;this.bxa=w;this.u.contentWidth=u;this.u.contentHeight=v};t.prototype.Gab=function(){this.u.Bf=Math.min(this.Xh(),this.u.contentWidth);this.u.Wg=Math.min(this.Wh(),this.u.contentHeight)};t.prototype.Eab=function(){var u=this.qe.some(function(w){return w.Agb()}),v=this.axa<0||this.bxa<0||this.u.contentWidth>this.u.Bf||this.u.contentHeight>this.u.Wg;this.Mia==k.Vr?(this.sS=this.u.Bf<this.u.contentWidth,this.kW=
this.u.Wg<this.u.contentHeight,this.IN(!v&&!u)):(this.kW=this.sS=!1,this.Mia==k.lL?this.IN(!0):this.IN(!v&&!u));this.KI(!0)};t.ad=Object.assign({},b.ad,{overflow:k.lL,scrollBarColor:"#000000",scrollBarWidth:10,scrollBarMargin:5,scrollBarHorizontalMargin:void 0,scrollBarVerticalMargin:void 0,scrollBarOpacity:.5,scrollBarVisible:e.uc});return t}(b)});
define("tdv/view/containers/Container",["require","exports","tdv/view/containers/ScrollableContainer"],function(a,m,h){return function(n){function g(){var k=n.call(this)||this;k.gf("Container");return k}P(g,n);return g}(h)});define("tdv/view/constants/Direction",["require","exports"],function(){return{Uk:"vertical",Mi:"horizontal"}});
define("tdv/view/core/visualprops/LabelVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties","tdv/view/constants/Alignment","tdv/view/constants/Direction"],function(a,m,h,n,g){return function(k){function e(){var b=k!==null&&k.apply(this,arguments)||this;b.direction=g.Mi;b.yt=void 0;b.fontFamily=void 0;b.u7=!1;b.fontSize=void 0;b.fontStyle="normal";b.fontWeight="normal";b.Yh=n.fb;b.verticalAlign=n.$d;b.textDecoration="none";b.ku=0;b.lu=0;b.fo=3;b.bx=0;b.ax="#000000";
b.text="";return b}P(e,k);return e}(h)});
define("tdv/view/util/Font",["require","exports"],function(){return function(){function a(){}a.qA=function(m){return m?m.split(",").map(function(h){return h.trim()}).filter(function(h){return h!=""}).map(function(h){h[0]!="'"&&h[0]!='"'&&(h="'"+h+"'");return h}).join(", "):""};a.W7=function(m){var h=[];m.fontStyle?h.push(m.fontStyle):h.push("normal");m.fontWeight?h.push(m.fontWeight):h.push("normal");m.fontSize?typeof m.fontSize==="number"?h.push(m.fontSize+"px"):h.push(m.fontSize):h.push("12px");
m.fontFamily?h.push(a.qA(m.fontFamily)):h.push("Arial");return h.join(" ")};return a}()});
define("tdv/view/text/Label","require exports tdv/utils tdv/view/constants/Alignment tdv/view/constants/Direction tdv/view/core/UIComponent tdv/view/core/visualprops/LabelVisualProperties tdv/view/util/Font".split(" "),function(a,m,h,n,g,k,e,b){a=function(d){function f(){var l=d.call(this)||this;l.xha=null;l.gf("Label");l.IN(!1);return l}P(f,d);f.prototype.wa=function(){return d.prototype.wa.call(this)};f.prototype.UL=function(){return new e};f.prototype.Pb=function(){this.Il(f.ad)};f.prototype.Zy=
function(){this.ou();d.prototype.Zy.call(this);this.cn=this.xJ()+this.u.Dd+this.u.Ce;this.bn=this.wJ()+this.u.ie+this.u.Df;c(this)};f.prototype.f5=function(l){this.u.text!==l&&(this.u.text=l,setTimeout(function(){this.lc();this.tb()}.bind(this),0))};f.prototype.h8a=function(l){this.u.direction!==l&&(this.u.direction=l,setTimeout(function(){this.lc();this.tb()}.bind(this),0))};f.prototype.p8a=function(l){this.u.fontFamily!==l&&(this.u.fontFamily=l,this.p8(),this.lc(),this.tb())};f.prototype.q8a=function(l){this.u.fontSize!==
l&&(h.WMa(l)?this.u.fontSize=l:h.EA(l)&&l.match(/^\d+(\.\d+)?px$/)?this.u.fontSize=parseFloat(l):this.u.fontSize=void 0,this.p8(),this.lc(),this.Af(),this.tb())};f.prototype.o8a=function(l){this.u.yt!==l&&(this.u.yt=l,this.tb())};f.prototype.s8a=function(l){if(this.u.fontWeight!==l){switch(l){case "bold":case "bolder":case "lighter":case "100":case "200":case "300":case "400":case "500":case "600":case "700":case "800":case "900":case "normal":break;default:l="normal"}this.u.fontWeight=l;this.p8();
this.lc();this.tb()}};f.prototype.r8a=function(l){if(this.u.fontStyle!==l){switch(l){case "italic":case "normal":break;default:l="normal"}this.u.fontStyle=l;this.p8();this.lc();this.tb()}};f.prototype.d9a=function(l){if(this.u.textDecoration!==l){switch(l){case "underline":case "overline":case "line-through":case "none":break;default:l="none"}this.u.textDecoration=l;this.lc();this.tb()}};f.prototype.z8a=function(l){this.u.Yh!==l&&(this.u.Yh=l,this.tb())};f.prototype.k9a=function(l){this.u.verticalAlign!==
l&&(this.u.verticalAlign=l,this.tb())};f.prototype.OEa=function(l){this.u.u7!==l&&(this.u.u7=l,this.lc(),this.tb())};f.prototype.e9a=function(l,p,q,r,t){if(this.u.ku!==l||this.u.lu!==p||this.u.fo!==q||this.u.bx!==r||this.u.ax!==t)this.u.ku=l,this.u.lu=p,this.u.fo=q,this.u.bx=r,this.u.ax=t,this.tb()};f.prototype.jb=function(){var l=this;this.S("direction")&&(this.h8a(this.G("direction")),this.$("direction"));if(this.S("text")){var p=this.G("text");this.f5(p===void 0?"":p.toString());this.$("text")}this.S("fontFamily")&&
(this.p8a(this.G("fontFamily")),this.$("fontFamily"));this.S("fontSize")&&(this.q8a(this.G("fontSize")),this.$("fontSize"));this.S("fontColor")&&(this.o8a(this.G("fontColor")),this.$("fontColor"));this.S("fontWeight")&&(this.s8a(this.G("fontWeight")),this.$("fontWeight"));this.S("fontStyle")&&(this.r8a(this.G("fontStyle")),this.$("fontStyle"));this.S("textDecoration")&&(this.d9a(this.G("textDecoration")),this.$("textDecoration"));this.S("horizontalAlign")&&(this.z8a(this.G("horizontalAlign")),this.Af(),
this.$("horizontalAlign"));this.S("verticalAlign")&&(this.k9a(this.G("verticalAlign")),this.Af(),this.$("verticalAlign"));p=["textShadowColor","textShadowHorizontalLength","textShadowVerticalLength","textShadowBlurRadius","textShadowOpacity"];if(p.some(function(r){return l.S(r)})){var q={};p.forEach(function(r){q[r]=l.G(r);l.$(r)});this.e9a(q.textShadowHorizontalLength,q.textShadowVerticalLength,q.textShadowBlurRadius,q.textShadowOpacity,q.textShadowColor);this.IN((q.textShadowHorizontalLength>0||
q.textShadowVerticalLength>0||q.textShadowBlurRadius>0)&&q.textShadowOpacity>0)}d.prototype.jb.call(this)};f.prototype.p8=function(){var l=this,p=b.W7({fontSize:this.u.fontSize,fontFamily:this.u.fontFamily,fontWeight:this.u.fontWeight,fontStyle:this.u.fontStyle});this.xha!==p&&(this.OEa(!1),this.xha=p,document.fonts.load(p).then(function(){l.xha===p&&l.OEa(!0)}))};f.prototype.xJ=function(){return this.wa().xJ()};f.prototype.wJ=function(){return this.wa().wJ()};f.ad=Object.assign({},k.ad,{fontFamily:void 0,
fontSize:void 0,fontColor:void 0,fontWeight:void 0,fontStyle:void 0,horizontalAlign:n.fb,verticalAlign:n.$d,direction:g.Mi,text:"",textDecoration:void 0,textShadowBlurRadius:3,textShadowColor:"#000000",textShadowHorizontalLength:0,textShadowOpacity:0,textShadowVerticalLength:0});return f}(k);var c=function(){function d(){p||f()&&(p=setTimeout(function(){p=null;var q=(new Date).getTime()-5E3,r;for(r in l){var t=l[r];t.timestamp<q&&delete l[r];var u=t.label;if(t.width!=u.xJ()||t.height!=u.wJ())u.lc(),
u.Af()}d()},500))}function f(){for(var q in l)return!0;return!1}var l={},p=null;return function(q){l[q.kH]={label:q,timestamp:(new Date).getTime(),width:q.xJ(),height:q.wJ()};d()}}();return a});
define("tdv/view/buttons/BaseButton","require exports tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/constants/EventName tdv/events/Event tdv/view/buttons/ButtonGroup tdv/view/constants/ButtonMode tdv/view/constants/OverflowPolicy tdv/view/constants/State tdv/view/containers/Container tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){var p="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),
q={};p.forEach(function(r){q[r]=r});return function(r){function t(){var u=r.call(this)||this;u.gf("Button");u.Ara("Button");u.Za=null;u.Cj=null;u.set("childrenInteractionEnabled",!1);u.set("contentOpaque",!0);u.set("creationPolicy",h.bL);u.set("overflow",c.wta);u.set("autoRolledOver",!0);u.set("autoPressed",!0);u.set("cursor",n.qf);u.set("ariaRole","button");return u}P(t,r);t.prototype.Pb=function(){r.prototype.Pb.call(this);this.m("label");this.m("fontFamily");this.m("fontSize");this.m("fontColor");
this.m("fontWeight");this.m("fontStyle");this.m("textDecoration");this.m("textShadowBlurRadius");this.m("textShadowColor");this.m("textShadowHorizontalLength");this.m("textShadowOpacity");this.m("textShadowVerticalLength");this.m("layout","horizontal");this.m("iconWidth");this.m("iconHeight");this.m("iconBeforeLabel");this.m("gap",5);this.m("mode",b.af);this.m("buttonGroup");this.m("paddingLeft",5);this.m("paddingTop",5);this.m("paddingRight",5);this.m("paddingBottom",5);this.m("pressed");this.D("rollOverOpacity",
d.ea,"opacity");this.D("rollOverIconWidth",d.ea,"iconWidth");this.D("rollOverIconHeight",d.ea,"iconHeight");this.D("rollOverFontSize",d.ea,"fontSize");this.D("rollOverFontColor",d.ea,"fontColor");this.D("rollOverFontFamily",d.ea,"fontFamily");this.D("rollOverFontWeight",d.ea,"fontWeight");this.D("rollOverFontStyle",d.ea,"fontStyle");this.D("rollOverTextDecoration",d.ea,"textDecoration");this.D("rollOverTextShadowBlurRadius",d.ea,"textShadowBlurRadius");this.D("rollOverTextShadowColor",d.ea,"textShadowColor");
this.D("rollOverTextShadowHorizontalLength",d.ea,"textShadowHorizontalLength");this.D("rollOverTextShadowOpacity",d.ea,"textShadowOpacity");this.D("rollOverTextShadowVerticalLength",d.ea,"textShadowVerticalLength");this.D("rollOverBorderSize",d.ea,"borderSize");this.D("rollOverBorderLeftSize",d.ea,"borderLeftSize");this.D("rollOverBorderTopSize",d.ea,"borderTopSize");this.D("rollOverBorderRightSize",d.ea,"borderRightSize");this.D("rollOverBorderBottomSize",d.ea,"borderBottomSize");this.D("rollOverBorderColor",
d.ea,"borderColor");this.D("rollOverBorderLeftColor",d.ea,"borderLeftColor");this.D("rollOverBorderTopColor",d.ea,"borderTopColor");this.D("rollOverBorderRightColor",d.ea,"borderRightColor");this.D("rollOverBorderBottomColor",d.ea,"borderBottomColor");this.D("rollOverShadow",d.ea,"shadow");this.D("rollOverShadowHorizontalLength",d.ea,"shadowHorizontalLength");this.D("rollOverShadowVerticalLength",d.ea,"shadowVerticalLength");this.D("rollOverShadowBlurRadius",d.ea,"shadowBlurRadius");this.D("rollOverShadowSpread",
d.ea,"shadowSpread");this.D("rollOverShadowOpacity",d.ea,"shadowOpacity");this.D("rollOverShadowColor",d.ea,"shadowColor");this.D("rollOverBackgroundBlur",d.ea,"backgroundBlur");this.D("rollOverBackgroundOpacity",d.ea,"backgroundOpacity");this.D("rollOverBackgroundColor",d.ea,"backgroundColor");this.D("rollOverBackgroundColorRatios",d.ea,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",d.ea,"backgroundColorDirection");this.D("pressedLabel",d.Fb,"label");this.D("pressedOpacity",d.Fb,
"opacity");this.D("pressedIconWidth",d.Fb,"iconWidth");this.D("pressedIconHeight",d.Fb,"iconHeight");this.D("pressedFontSize",d.Fb,"fontSize");this.D("pressedFontColor",d.Fb,"fontColor");this.D("pressedFontFamily",d.Fb,"fontFamily");this.D("pressedFontWeight",d.Fb,"fontWeight");this.D("pressedFontStyle",d.Fb,"fontStyle");this.D("pressedTextDecoration",d.Fb,"textDecoration");this.D("pressedTextShadowBlurRadius",d.Fb,"textShadowBlurRadius");this.D("pressedTextShadowColor",d.Fb,"textShadowColor");this.D("pressedTextShadowHorizontalLength",
d.Fb,"textShadowHorizontalLength");this.D("pressedTextShadowOpacity",d.Fb,"textShadowOpacity");this.D("pressedTextShadowVerticalLength",d.Fb,"textShadowVerticalLength");this.D("pressedBorderSize",d.Fb,"borderSize");this.D("pressedBorderLeftSize",d.Fb,"borderLeftSize");this.D("pressedBorderTopSize",d.Fb,"borderTopSize");this.D("pressedBorderRightSize",d.Fb,"borderRightSize");this.D("pressedBorderBottomSize",d.Fb,"borderBottomSize");this.D("pressedBorderColor",d.Fb,"borderColor");this.D("pressedBorderLeftColor",
d.Fb,"borderLeftColor");this.D("pressedBorderTopColor",d.Fb,"borderTopColor");this.D("pressedBorderRightColor",d.Fb,"borderRightColor");this.D("pressedBorderBottomColor",d.Fb,"borderBottomColor");this.D("pressedShadow",d.Fb,"shadow");this.D("pressedShadowHorizontalLength",d.Fb,"shadowHorizontalLength");this.D("pressedShadowVerticalLength",d.Fb,"shadowVerticalLength");this.D("pressedShadowBlurRadius",d.Fb,"shadowBlurRadius");this.D("pressedShadowSpread",d.Fb,"shadowSpread");this.D("pressedShadowOpacity",
d.Fb,"shadowOpacity");this.D("pressedShadowColor",d.Fb,"shadowColor");this.D("pressedBackgroundBlur",d.Fb,"backgroundBlur");this.D("pressedBackgroundOpacity",d.Fb,"backgroundOpacity");this.D("pressedBackgroundColor",d.Fb,"backgroundColor");this.D("pressedBackgroundColorRatios",d.Fb,"backgroundColorRatios");this.D("pressedBackgroundColorDirection",d.Fb,"backgroundColorDirection");this.D("pressedLabel",d.qc,"label");this.D("pressedRollOverOpacity",d.qc,"opacity");this.D("pressedRollOverIconWidth",d.qc,
"iconWidth");this.D("pressedRollOverIconHeight",d.qc,"iconHeight");this.D("pressedRollOverFontSize",d.qc,"fontSize");this.D("pressedRollOverFontColor",d.qc,"fontColor");this.D("pressedRollOverFontFamily",d.qc,"fontFamily");this.D("pressedRollOverFontWeight",d.qc,"fontWeight");this.D("pressedRollOverFontStyle",d.qc,"fontStyle");this.D("pressedRollOverTextDecoration",d.qc,"textDecoration");this.D("pressedRollOverTextShadowBlurRadius",d.qc,"textShadowBlurRadius");this.D("pressedRollOverTextShadowColor",
d.qc,"textShadowColor");this.D("pressedRollOverTextShadowHorizontalLength",d.qc,"textShadowHorizontalLength");this.D("pressedRollOverTextShadowOpacity",d.qc,"textShadowOpacity");this.D("pressedRollOverTextShadowVerticalLength",d.qc,"textShadowVerticalLength");this.D("pressedRollOverBorderSize",d.qc,"borderSize");this.D("pressedRollOverBorderLeftSize",d.qc,"borderLeftSize");this.D("pressedRollOverBorderTopSize",d.qc,"borderTopSize");this.D("pressedRollOverBorderRightSize",d.qc,"borderRightSize");this.D("pressedRollOverBorderBottomSize",
d.qc,"borderBottomSize");this.D("pressedRollOverBorderColor",d.qc,"borderColor");this.D("pressedRollOverBorderLeftColor",d.qc,"borderLeftColor");this.D("pressedRollOverBorderTopColor",d.qc,"borderTopColor");this.D("pressedRollOverBorderRightColor",d.qc,"borderRightColor");this.D("pressedRollOverBorderBottomColor",d.qc,"borderBottomColor");this.D("pressedRollOverShadow",d.qc,"shadow");this.D("pressedRollOverShadowHorizontalLength",d.qc,"shadowHorizontalLength");this.D("pressedRollOverShadowVerticalLength",
d.qc,"shadowVerticalLength");this.D("pressedRollOverShadowBlurRadius",d.qc,"shadowBlurRadius");this.D("pressedRollOverShadowSpread",d.qc,"shadowSpread");this.D("pressedRollOverShadowOpacity",d.qc,"shadowOpacity");this.D("pressedRollOverShadowColor",d.qc,"shadowColor");this.D("pressedRollOverBackgroundBlur",d.qc,"backgroundBlur");this.D("pressedRollOverBackgroundOpacity",d.qc,"backgroundOpacity");this.D("pressedRollOverBackgroundColor",d.qc,"backgroundColor");this.D("pressedRollOverBackgroundColorRatios",
d.qc,"backgroundColorRatios");this.D("pressedRollOverBackgroundColorDirection",d.qc,"backgroundColorDirection")};t.prototype.eea=function(){};t.prototype.Kb=function(){r.prototype.Kb.call(this);this.Cj||(this.Cj=this.eea(),this.mb(this.Cj));this.Za||(this.Za=new l,this.mb(this.Za))};t.prototype.qR=function(){this.get("pressed")?(this.set("pressed",!1),this.o(new k(g.Lm))):(this.set("pressed",!0),this.o(new k(g.Rk)))};t.prototype.Ux=function(){return this.get("label")||r.prototype.Ux.call(this)};t.prototype.set=
function(u,v){u=="mode"&&(this.h(g.ma,this.qR,this),v==b.ak&&this.bind(g.ma,this.qR,this,!0),this.set("autoPressed",v==b.af));r.prototype.set.call(this,u,v)};t.prototype.jb=function(){if(this.S("mode")||this.S("pressed"))this.G("mode")==b.ak?this.JN(this.G("pressed")==1):this.S("mode")&&this.JN(!1),this.$("mode");if(this.S("label")){var u=this.G("label");this.Za.set("text",u);this.Za.set("visible",u?!0:!1);this.$("label")}this.Oc(t.GWa,t.HWa,[this.Za],!0,!0);this.S("iconBeforeLabel")&&(this.G("iconBeforeLabel")==
0?this.qr(this.Za,0):this.qr(this.Cj,0),this.$("iconBeforeLabel"));this.S("iconWidth")&&(this.Cj.set("width",this.G("iconWidth")),this.$("iconWidth"));this.S("iconHeight")&&(this.Cj.set("height",this.G("iconHeight")),this.$("iconHeight"));this.S("buttonGroup")&&((u=this.G("buttonGroup"))?e.register(this,u):e.unregister(this),this.$("buttonGroup"));this.Oc(["horizontalAlign","verticalAlign"],{},[this.Cj],!0,!1);r.prototype.jb.call(this)};t.GWa=p;t.HWa=q;return t}(f)});
define("tdv/player/script/BaseButton",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/BaseButton"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/buttons/BaseButton");return m.define("BaseButton",h,function(){h.call(this)})});define("tdv/player/script/BaseObject",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("BaseObject",m,function(){m.call(this)})});
define("tdv/view/containers/HorizontalContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.Pb=function(){this.Il(k.ad)};k.ad=Object.assign({},h.ad,{layout:n.Mi});return k}(h)});
define("tdv/view/containers/VerticalContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.Pb=function(){this.Il(k.ad)};k.ad=Object.assign({},h.ad,{layout:n.Uk});return k}(h)});
define("tdv/view/core/visualprops/CanvasVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,h){return function(n){function g(){var k=n!==null&&n.apply(this,arguments)||this;k.canvas=null;k.T6=0;return k}P(g,n);return g}(h)});
define("tdv/view/canvas/Canvas","require exports tdv/constants/EventName tdv/events/Event tdv/view/core/UIComponent tdv/view/core/visualprops/CanvasVisualProperties".split(" "),function(a,m,h,n,g,k){return function(e){function b(){var c=e.call(this)||this;c.aZa=function(){c.LX()};c.gf("Canvas");c.Tea=!0;c.u.canvas=null;c.bind(h.$b,c.aZa,c,!1);return c}P(b,e);b.prototype.UL=function(){return new k};b.prototype.LX=function(){this.Tea=!0;this.tb()};b.prototype.Kb=function(){e.prototype.Kb.call(this);
this.u.canvas||(this.u.canvas=document.createElement("canvas"))};b.prototype.jb=function(){this.ada("paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "))&&this.LX();e.prototype.jb.call(this)};b.prototype.ou=function(){this.Tea&&(this.Tea=!1,this.u.canvas.width=
this.Xh(),this.u.canvas.height=this.Wh(),this.u.T6+=1,this.tsa());e.prototype.ou.call(this)};b.prototype.cLa=function(){return this.u.canvas.getContext("2d")};b.prototype.tsa=function(){this.o(new n(h.V))};return b}(g)});
define("tdv/view/buttons/CanvasButton","require exports tdv/constants/EventName tdv/view/constants/State tdv/view/buttons/BaseButton tdv/view/canvas/Canvas".split(" "),function(a,m,h,n,g,k){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.Kk=function(){e.prototype.Kk.call(this)};b.prototype.Pb=function(){e.prototype.Pb.call(this);this.m("iconColor");this.D("rollOverIconColor",n.ea,"iconColor");this.D("pressedIconColor",n.Fb,"iconColor");this.D("pressedRollOverIconColor",
n.qc,"iconColor")};b.prototype.eea=function(){var c=new k;c.bind(h.V,this.kTa,this,!0);return c};b.prototype.jb=function(){this.S("iconColor")&&(this.Cj.LX(),this.$("iconColor"));e.prototype.jb.call(this)};b.prototype.L1a=function(){return this.G("iconColor")};b.prototype.M1a=function(){return this.Cj.cLa()};b.prototype.kTa=function(){};return b}(g)});
define("tdv/view/buttons/CloseButton",["require","exports","tdv/view/buttons/CanvasButton","tdv/view/constants/Alignment","tdv/view/constants/State"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.xa({horizontalAlign:n.$e,verticalAlign:n.$d});return b}P(e,k);e.prototype.Pb=function(){k.prototype.Pb.call(this);this.m("iconLineWidth");this.D("rollOverIconLineWidth",g.ea,"iconLineWidth");this.D("pressedIconLineWidth",g.Fb,"iconLineWidth");this.D("pressedRollOverIconLineWidth",
g.qc,"iconLineWidth")};e.prototype.V1a=function(){return this.G("iconLineWidth")};e.prototype.jb=function(){this.S("iconLineWidth")&&(this.Cj.LX(),this.$("iconLineWidth"));k.prototype.jb.call(this)};e.prototype.kTa=function(){var b=this.M1a(),c=this.L1a(),d=this.Cj.u.canvas.width,f=this.Cj.u.canvas.height,l=this.V1a();b.clearRect(0,0,d,f);b.lineWidth=l||1;b.strokeStyle=c||"#000000";b.beginPath();b.moveTo(0,0);b.lineTo(d,f);b.moveTo(0,f);b.lineTo(d,0);b.closePath();b.stroke()};return e}(h)});
define("tdv/view/containers/windows/BaseWindow","require exports tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/containers/HorizontalContainer tdv/view/containers/VerticalContainer tdv/view/buttons/CloseButton tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(f){function l(){var p=f.call(this)||this;p.Wm=null;p.JV=null;p.PL=null;p.fC=null;p.sda=new k;p.mM=null;p.Fma=void 0;p.Ema=void 0;p.Jz=!1;return p}
P(l,f);l.prototype.set=function(p,q){switch(p){case "children":this.sda.set(p,q);break;default:f.prototype.set.call(this,p,q)}};l.prototype.M6=function(){this.Jz=!0;this.set("visible",!1)};l.prototype.L6=function(){this.get("visible")&&this.get("visible")&&this.o(h.cUa);this.Jz=!1};l.prototype.get=function(p,q){return p=="children"?this.sda.get(p,q):p=="showing"?this.Jz:f.prototype.get.call(this,p,q)};l.prototype.Pb=function(){this.Il(l.ad)};l.prototype.Kb=function(){f.prototype.Kb.call(this);this.Wm==
null&&(this.Wm=new e,this.Wm.set("width","100%"),this.Wm.bind(h.Sa,this.tza,this,!1),this.mb(this.Wm));this.JV==null&&(this.JV=new d,this.JV.set("width","100%"),this.Wm.mb(this.JV));this.PL==null&&(this.PL=new c,this.PL.xa({horizontalAlign:n.$e,verticalAlign:n.$d}),this.PL.bind(h.ma,this.BZa,this,!1),this.Wm.mb(this.PL));this.fC==null&&(this.fC=this.sda,this.fC.xa({width:"100%",height:"100%"}),this.mb(this.fC));this.mM==null&&(this.mM=new k,this.mM.set("width","100%"),this.mb(this.mM))};l.prototype.oe=
function(){throw Error("Not implemented");};l.prototype.BZa=function(){this.oe()};l.prototype.tza=function(){};l.prototype.jb=function(){this.Oc(l.fva,l.gva,[this.Wm],!0,!0);this.Oc(l.vca,l.wca,[this.Wm],!0,!1);this.get("headerHeight")===0?this.Oc(l.vca,l.wca,[this.fC],!0,!1):this.Oc(l.vca,l.wca,[this.Wm],!0,!1);this.Oc(l.tva,l.uva,[this.JV],!0,!0);this.Oc(l.$ua,l.ava,[this.PL],!0,!0);this.Oc(l.Xua,l.Yua,[this.fC],!0,!0);this.Oc(l.zWa,l.Zua,[this.fC],!0,!1);this.Oc(l.bva,l.cva,[this.mM],!0,!0);this.get("footerHeight")===
0?this.Oc(l.dva,l.eva,[this.fC],!0,!1):this.Oc(l.dva,l.eva,[this.mM],!0,!1);this.xa({layout:g.Uk,horizontalAlign:n.$e,verticalAlign:n.$d});f.prototype.jb.call(this);this.Zm.K$(0)};l.gva={headerBackgroundBlur:"backgroundBlur",headerBackgroundOpacity:"backgroundOpacity",headerBackgroundColor:"backgroundColor",headerBackgroundColorRatios:"backgroundColorRatios",headerBackgroundColorDirection:"backgroundColorDirection",headerBorderSize:"borderSize",headerBorderLeftSize:"borderLeftSize",headerBorderTopSize:"borderTopSize",
headerBorderRightSize:"borderRightSize",headerBorderBottomSize:"borderBottomSize",headerBorderColor:"borderColor",headerBorderLeftColor:"borderLeftColor",headerBorderTopColor:"borderTopColor",headerBorderRightColor:"borderRightColor",headerBorderBottomColor:"borderBottomColor",headerHeight:"height",headerPaddingLeft:"paddingLeft",headerPaddingTop:"paddingTop",headerPaddingRight:"paddingRight",headerPaddingBottom:"paddingBottom",headerVerticalAlign:"verticalAlign"};l.fva=Object.keys(l.gva);l.wca={borderRadius:"borderTopRadius",
borderTopRadius:"borderTopRadius",borderLeftRadius:"borderTopLeftRadius",borderRightRadius:"borderTopRightRadius",borderTopLeftRadius:"borderTopLeftRadius",borderTopRightRadius:"borderTopRightRadius"};l.vca="borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderTopRadius borderRadius".split(" ");l.uva={title:"text",titleFontFamily:"fontFamily",titleFontSize:"fontSize",titleFontColor:"fontColor",titleFontWeight:"fontWeight",titleFontStyle:"fontStyle",titleHorizontalAlign:"horizontalAlign",
titlePaddingLeft:"paddingLeft",titlePaddingTop:"paddingTop",titlePaddingRight:"paddingRight",titlePaddingBottom:"paddingBottom",titleTextDecoration:"textDecoration",titleTextShadowColor:"textShadowColor",titleTextShadowHorizontalLength:"textShadowHorizontalLength",titleTextShadowVerticalLength:"textShadowVerticalLength",titleTextShadowBlurRadius:"textShadowBlurRadius",titleTextShadowOpacity:"textShadowOpacity"};l.tva=Object.keys(l.uva);l.ava={closeButtonBackgroundBlur:"backgroundBlur",closeButtonBackgroundColor:"backgroundColor",
closeButtonBackgroundColorDirection:"backgroundColorDirection",closeButtonBackgroundColorRatios:"backgroundColorRatios",closeButtonBackgroundOpacity:"backgroundOpacity",closeButtonBorderColor:"borderColor",closeButtonBorderRadius:"borderRadius",closeButtonBorderSize:"borderSize",closeButtonHeight:"height",closeButtonIconColor:"iconColor",closeButtonIconHeight:"iconHeight",closeButtonIconLineWidth:"iconLineWidth",closeButtonIconWidth:"iconWidth",closeButtonOpacity:"opacity",closeButtonWidth:"width",
closeButtonPaddingBottom:"paddingBottom",closeButtonPaddingLeft:"paddingLeft",closeButtonPaddingRight:"paddingRight",closeButtonPaddingTop:"paddingTop",closeButtonRollOverBackgroundBlur:"rollOverBackgroundBlur",closeButtonRollOverBackgroundColor:"rollOverBackgroundColor",closeButtonRollOverBackgroundColorDirection:"rollOverBackgroundColorDirection",closeButtonRollOverBackgroundColorRatios:"rollOverBackgroundColorRatios",closeButtonRollOverBackgroundOpacity:"rollOverBackgroundOpacity",closeButtonRollOverBorderColor:"rollOverBorderColor",
closeButtonRollOverBorderSize:"rollOverBorderSize",closeButtonRollOverIconColor:"rollOverIconColor",closeButtonRollOverIconLineWidth:"rollOverIconLineWidth",closeButtonRollOverOpacity:"rollOverOpacity",closeButtonPressedBackgroundBlur:"pressedBackgroundBlur",closeButtonPressedBackgroundColor:"pressedBackgroundColor",closeButtonPressedBackgroundColorDirection:"pressedBackgroundColorDirection",closeButtonPressedBackgroundColorRatios:"pressedBackgroundColorRatios",closeButtonPressedBackgroundOpacity:"pressedBackgroundOpacity",
closeButtonPressedBorderColor:"pressedBorderColor",closeButtonPressedBorderSize:"pressedBorderSize",closeButtonPressedIconColor:"pressedIconColor",closeButtonPressedIconLineWidth:"pressedIconLineWidth",closeButtonPressedOpacity:"pressedOpacity"};l.$ua=Object.keys(l.ava);l.cva={footerBackgroundBlur:"backgroundBlur",footerBackgroundOpacity:"backgroundOpacity",footerBackgroundColor:"backgroundColor",footerBackgroundColorRatios:"backgroundColorRatios",footerBackgroundColorDirection:"backgroundColorDirection",
footerBorderSize:"borderSize",footerBorderLeftSize:"borderLeftSize",footerBorderTopSize:"borderTopSize",footerBorderRightSize:"borderRightSize",footerBorderBottomSize:"borderBottomSize",footerBorderColor:"borderColor",footerBorderLeftColor:"borderLeftColor",footerBorderTopColor:"borderTopColor",footerBorderRightColor:"borderRightColor",footerBorderBottomColor:"borderBottomColor",footerHeight:"height"};l.bva=Object.keys(l.cva);l.eva={borderRadius:"borderBottomRadius",borderBottomRadius:"borderBottomRadius",
borderLeftRadius:"borderBottomLeftRadius",borderRightRadius:"borderBottomRightRadius",borderBottomLeftRadius:"borderBottomLeftRadius",borderBottomRightRadius:"borderBottomRightRadius"};l.dva="borderLeftRadius borderRightRadius borderBottomLeftRadius borderBottomRightRadius borderBottomRadius borderRadius".split(" ");l.Yua={bodyBackgroundBlur:"backgroundBlur",bodyBackgroundOpacity:"backgroundOpacity",bodyBackgroundColor:"backgroundColor",bodyBackgroundColorRatios:"backgroundColorRatios",bodyBackgroundColorDirection:"backgroundColorDirection",
bodyBorderSize:"borderSize",bodyBorderLeftSize:"borderLeftSize",bodyBorderTopSize:"borderTopSize",bodyBorderRightSize:"borderRightSize",bodyBorderBottomSize:"borderBottomSize",bodyBorderColor:"borderColor",bodyBorderLeftColor:"borderLeftColor",bodyBorderTopColor:"borderTopColor",bodyBorderRightColor:"borderRightColor",bodyBorderBottomColor:"borderBottomColor",bodyPaddingLeft:"paddingLeft",bodyPaddingTop:"paddingTop",bodyPaddingRight:"paddingRight",bodyPaddingBottom:"paddingBottom",overflow:"overflow",
scrollBarColor:"scrollBarColor",scrollBarWidth:"scrollBarWidth",scrollBarMargin:"scrollBarMargin",scrollBarHorizontalMargin:"scrollBarHorizontalMargin",scrollBarVerticalMargin:"scrollBarVerticalMargin",scrollBarOpacity:"scrollBarOpacity",gap:"gap"};l.Xua=Object.keys(l.Yua);l.Zua={layout:"layout",horizontalAlign:"horizontalAlign",verticalAlign:"verticalAlign"};l.zWa=Object.keys(l.Zua);l.ad=Object.assign({},b.ad,function(){for(var p={modal:!1,visible:!1},q=[].concat(l.fva,l.tva,l.$ua,l.Xua,l.bva),r=
0;r<q.length;r++)p[q[r]]=void 0;return p}());return l}(b)});define("tdv/player/script/BaseWindow",["require","tdv/view/containers/windows/BaseWindow","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/containers/windows/BaseWindow");return a("tdv/player/parser/ClassInfo").define("BaseWindow",m,function(){m.call(this)})});
define("tdv/player/script/mixin/EffectsMixin",["require","tdv/constants/EventName","tdv/view/effects/Effect"],function(a){var m=a("tdv/constants/EventName"),h=a("tdv/view/effects/Effect");return{k0a:function(){this.Jl=this.Ef=null;this.bind(m.od,this.Txa,this,!0);this.bind(m.jd,this.Oxa,this,!0);this.bind(m.uc,this.Qxa,this,!0);this.bind(m.Eb,this.Pxa,this,!0);this.bind(m.L("effect"),this.Mxa,this,!0);this.bind(m.L("rollOverEffect"),this.Rxa,this,!0);this.PG=!1},opb:function(){this.h(m.od,this.Txa,
this,!0);this.h(m.jd,this.Oxa,this,!0);this.h(m.uc,this.Qxa,this,!0);this.h(m.Eb,this.Pxa,this,!0);this.h(m.L("effect"),this.Mxa,this,!0);this.h(m.L("rollOverEffect"),this.Rxa,this,!0)},Txa:function(){this.Ef&&this.Ef.play()},Oxa:function(){this.Ef&&this.Ef.stop();this.Jl&&this.Jl.stop();this.PG=!1},Qxa:function(){this.PG||(this.PG=!0,this.Jl&&(this.Ef&&this.Ef.get("loop")&&this.Ef.tm()>0?this.Ef.reverse():this.Ef&&this.Ef.tm()!=0&&this.Ef.tm()!=1||(this.Ef&&this.Ef.stop(),this.Jl.play())))},Pxa:function(){this.PG&&
(this.PG=!1,this.Jl&&(this.Jl.tm()>0?this.Jl.reverse():this.Ef&&this.Ef.get("loop")&&this.Ef.play()))},Nxa:function(){this.Xea()},Xea:function(){this.PG&&this.Jl&&(this.Ef.stop(),this.Jl.play())},Sxa:function(){this.PG||(this.Jl.stop(),this.Ef&&this.Ef.get("loop")&&this.Ef.play())},Mxa:function(){this.Ef&&this.Ef.h(h.Bl,this.Nxa,this,!0);this.Ef&&this.Ef.h(h.wx,this.Xea,this,!0);(this.Ef=this.get("effect"))&&this.Ef.bind(h.Bl,this.Nxa,this,!0);this.Ef&&this.Ef.bind(h.wx,this.Xea,this,!0)},Rxa:function(){this.Jl&&
this.Jl.h(h.wx,this.Sxa,this,!0);(this.Jl=this.get("rollOverEffect"))&&this.Jl.bind(h.wx,this.Sxa,this,!0)}}});
define("tdv/player/script/Model3DObject",["require","tdv/utils","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/mixin/EffectsMixin"],function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable"),n=a("tdv/player/parser/ClassInfo");a=a("tdv/player/script/mixin/EffectsMixin");n=n.define("Model3DObject",h,function(){h.call(this);this.set("hidden",!1);this.k0a();this.Tq=this.RM=this.oga=this.nga=!1;this.Ega=!0;this.Fga=this.Cga=this.nH=!1});m.B6(n,[a]);var g="enabledInStandard enabledInVR enabledInVRWithGazePointer enabledInAR hideBasedOnDistance hideWhileUserInteracting hideWhileMoving".split(" ");
n.prototype.set=function(k,e){h.prototype.set.call(this,k,e);g.indexOf(k)!=-1&&this.Xz()};n.prototype.ira=function(k){this.oga!==k&&(this.oga=k,this.Xz())};n.prototype.aF=function(k){this.Tq!==k&&(this.Tq=k,this.Xz())};n.prototype.Gp=function(k){this.RM!==k&&(this.RM=k,this.Xz())};n.prototype.s$=function(k){this.Ega!==k&&(this.Ega=k,this.Xz())};n.prototype.dB=function(k){this.nH!==k&&(this.nH=k,this.Xz())};n.prototype.t$=function(k){this.Fga!==k&&(this.Fga=k,this.Xz())};n.prototype.gRa=function(k){this.Cga!==
k&&(this.Cga=k,this.Xz())};n.prototype.hra=function(k){this.nga!==k&&(this.nga=k,this.Xz())};n.prototype.Xz=function(){this.set("hidden",this.oga||this.nga||this.nH&&this.get("enabledInVR")===!1||this.Cga&&this.get("enabledInAR")===!1||this.Fga&&this.get("enabledInVRWithGazePointer",this.get("enabledInVR"))===!1||this.Ega&&this.get("enabledInStandard")===!1||this.RM&&this.get("hideWhileMoving")||this.Tq&&this.get("hideWhileUserInteracting"))};return n});
define("tdv/player/script/BoxModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("BoxModel3DObject",h,function(){h.call(this)})});define("tdv/view/constants/ScaleMode",["require","exports"],function(){return{NONE:"none",GB:"fill",uj:"fit_inside",Jr:"fit_outside",Tp:"fit_to_width",Pk:"fit_to_height",iUa:"custom"}});
define("tdv/view/core/visualprops/ImageVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties","tdv/view/constants/Alignment"],function(a,m,h,n){return function(g){function k(){var e=g!==null&&g.apply(this,arguments)||this;e.image=null;e.Yh=n.fb;e.verticalAlign=n.$d;e.contentWidth=0;e.contentHeight=0;return e}P(k,g);return k}(h)});
define("tdv/view/images/Image","require exports tdv/constants/EventName tdv/constants/Priority tdv/view/constants/Alignment tdv/view/constants/ScaleMode tdv/view/core/UIComponent tdv/view/images/ImageLoader tdv/view/core/visualprops/ImageVisualProperties".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(f){function l(p){var q=f.call(this)||this;q.d3a=function(){q.s0=!0;q.Tf()};q.e3a=function(){q.oHa()};q.gf("Image");q.yda=p||1;q.oma=!1;q.dka=!1;q.dN=0;q.cN=0;q.Kia=!1;q.s0=!1;q.pd=null;q.bind(h.$b,
q.d3a,q,!1);q.bind(h.od,q.e3a,q,!1);return q}P(l,f);l.prototype.UL=function(){return new c};l.prototype.Vfa=function(){var p=this;this.pd=new d(this.yda);this.Vfa=function(){return p.pd};return this.pd};l.prototype.Pb=function(){f.prototype.Pb.call(this);this.m("horizontalAlign",g.fb);this.m("verticalAlign",g.Tc);this.m("scaleMode",k.NONE)};l.prototype.set=function(p,q){p=="url"&&this.get("url")!=q&&(this.oma=!0,this.Tf());f.prototype.set.call(this,p,q)};l.prototype.bQ=function(p){this.u.Yh!=p&&(this.u.Yh=
p,this.tb())};l.prototype.hP=function(){return this.u.Yh};l.prototype.hQ=function(p){this.u.verticalAlign!=p&&(this.u.verticalAlign=p,this.tb())};l.prototype.jP=function(){return this.u.verticalAlign};l.prototype.dQ=function(p){this.ti!=p&&(this.ti=p,this.dka=!0,this.Tf(),this.lc())};l.prototype.f8a=function(p,q){if(this.u.contentWidth!=p||this.u.contentHeight!=q)this.u.contentWidth=p,this.u.contentHeight=q,this.tb()};l.prototype.Ova=function(p,q,r){this.dN=q?q:0;this.cN=r?r:0;this.u.image=p;this.Kia=
!0;this.Tf();this.lc();this.tb();this.u.image&&this.o(h.ia)};l.prototype.Zy=function(){this.cn=this.dN+this.u.Dd+this.u.Ce;this.bn=this.cN+this.u.ie+this.u.Df;this.uAa=this.dN==0&&this.cN==0?0:this.dN/this.cN;this.hT=this.iT=0};l.prototype.jb=function(){this.S("scaleMode")&&(this.dQ(this.G("scaleMode")),this.$("scaleMode"));this.S("horizontalAlign")&&(this.bQ(this.G("horizontalAlign")),this.$("horizontalAlign"));this.S("verticalAlign")&&(this.hQ(this.G("verticalAlign")),this.$("verticalAlign"));this.ada("paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "))&&
(this.s0=!0);f.prototype.jb.call(this);this.oHa();if(this.rgb()||this.dka||this.Kia||this.s0){var p=this.Xh(),q=this.Wh(),r=this.dN,t=this.cN,u=0,v=0;if(r==0||t==0)v=u=0;else switch(this.ti){case k.NONE:u=r;v=t;break;case k.GB:u=p;v=q;break;case k.uj:r*q>t*p?(u=p,v=t*p/r):(u=r*q/t,v=q);break;case k.Jr:r*q>t*p?(u=r*q/t,v=q):(u=p,v=t*p/r);break;case k.Tp:u=p;v=t*p/r;break;case k.Pk:u=r*q/t,v=q}this.f8a(u,v);this.s0=this.Kia=this.dka=!1;this.lc();this.tb()}};l.prototype.oHa=function(){if(this.oma){var p=
this.get("url");p?this.Vfa().load(p,this.Ova,this):(this.Vfa().clear(),this.Ova(null,0,0));this.oma=!1}};return l}(e);var d=function(){function f(l){this.yda=l;this.Sd=[];this.Rm=null}f.prototype.EZa=function(l){f.Yo.href=l;return f.Yo.href};f.prototype.load=function(l,p,q){var r=this;l=this.EZa(l);this.Rm&&!this.Rm.oj()&&(this.Rm.cancel(),this.Sd=this.Sd.filter(function(v){return v!==r.Rm}));(this.Rm=this.Sd.find(function(v){return v.rl()==l})||null)?this.Sd=this.Sd.filter(function(v){return v!==
r.Rm}):(this.Rm=new b(n.yua),this.Rm.load(l));for(this.Sd.splice(0,0,this.Rm);this.Sd.length>this.yda;)this.Sd.pop().cancel();if(p){var t=this.Rm,u=function(){p.call(q||window,t.xg(),t.fg(),t.wg())};this.Rm.oj()?u():this.Rm.bind(h.ia,u,void 0,!1)}};f.prototype.clear=function(){this.Sd.forEach(function(l){l.cancel()});this.Rm=null};f.Yo=document.createElement("a");return f}();return a});
define("tdv/view/buttons/Button","require exports tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/buttons/BaseButton tdv/view/images/Image".split(" "),function(a,m,h,n,g,k){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.Pb=function(){e.prototype.Pb.call(this);this.m("iconURL");this.D("rollOverIconURL",n.ea,"iconURL");this.D("pressedIconURL",n.Fb,"iconURL");this.D("pressedRollOverIconURL",n.qc,"iconURL")};b.prototype.eea=function(){var c=new k(3);c.set("scaleMode",
h.uj);return c};b.prototype.jb=function(){if(this.S("iconURL")){var c=this.G("iconURL");this.Cj.set("url",c);this.Cj.set("visible",c?!0:!1);this.$("iconURL")}e.prototype.jb.call(this)};return b}(g)});define("tdv/player/script/Button",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/Button"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/buttons/Button");return m.define("Button",h,function(){h.call(this)})});
define("tdv/player/script/ExternalModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("ExternalModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/PlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/ExternalModel3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/ExternalModel3DObject");return m.define("PlaneModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/CanvasPlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlaneModel3DObject");return m.define("CanvasPlaneModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/CapPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("CapPanoramaOverlay",m,function(){m.call(this)})});
define("tdv/player/script/CeilingCapPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/CapPanoramaOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/CapPanoramaOverlay");return m.define("CeilingCapPanoramaOverlay",h,function(){h.call(this)})});
define("tdv/player/script/ChildModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("ChildModel3DObject",h,function(){h.call(this);this.set("floorColor","transparent")})});
define("tdv/player/script/CloseButton",["require","tdv/player/parser/ClassInfo","tdv/view/buttons/CloseButton"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/buttons/CloseButton");return m.define("CloseButton",h,function(){h.call(this)})});define("tdv/player/script/CookiesPolicy",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("CookiesPolicy",m,function(){m.call(this)})});
define("tdv/player/script/Container",["require","tdv/events/async","tdv/player/parser/ClassInfo","tdv/view/containers/Container"],function(a){var m=a("tdv/events/async"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/view/containers/Container");a=h.define("Container",n,function(){n.call(this)});a.prototype.scrollTo=function(g,k){n.prototype.scrollTo.call(this,g,k)};a.prototype.scrollIntoView=function(g){m.ME(function(){n.prototype.scrollIntoView.call(this,g)}.bind(this))};return a});
define("tdv/player/script/PanoramaFrame",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo");a=h.define("PanoramaFrame",m,function(){m.call(this);this.Ba=null});a.prototype.get=function(n,g){switch(n){case "overlays":return this.Xfa();case "hfov":case "vfov":case "pitch":case "flipImageHorizontally":case "minFaceSize":if(this.Ba)return this.Ba.get(n,g)}return m.prototype.get.call(this,n,g)};a.prototype.Xfa=
function(){var n=m.prototype.get.call(this,"overlays");n||(n=[]);return this.Jka(n)};a.prototype.Jka=function(n){if(this.ON===void 0||this.j2!=n){var g=function(e){return h.Oa("PopupPanoramaOverlay",e)},k=function(e){return h.Oa("LensFlarePanoramaOverlay",e)};this.j2=n;this.ON=[].concat(n.filter(function(e){return!(g(e)||k(e))}),n.filter(k),n.filter(g))}return this.ON};a.prototype.icb=function(n){this.Ba=n};a.prototype.cE=function(){return this.Ba};a.prototype.Mn=function(){return!1};return a});
define("tdv/player/script/CubicPanoramaFrame",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaFrame"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PanoramaFrame");return m.define("CubicPanoramaFrame",h,function(){h.call(this)})});
define("tdv/view/av/omnitone",["require","tdv/player/view/util/Flags"],function(a){function m(S,W,Z){this.ga=p.PMa(S)?S:p.throw("BufferList: Invalid BaseAudioContext.");this.WH={dataType:ia.AQ,waa:!1};Z&&(Z.dataType&&p.lhb(ia,Z.dataType)&&(this.WH.dataType=Z.dataType),Z.waa&&(this.WH.waa=!!Z.waa));this.gwa=[];this.Su=this.WH.dataType===ia.AQ?W:W.slice(0);this.z4a=this.Su.length;this.iEa=null;this.OU=new Function}function h(S,W){this.ga=S;this.kl=this.ga.createChannelSplitter(4);this.Ql=this.ga.createChannelMerger(4);
this.input=this.kl;this.output=this.Ql;this.$qa(W||da.De)}function n(S){this.ga=S;this.kl=this.ga.createChannelSplitter(4);this.CS=this.ga.createGain();this.L1=this.ga.createGain();this.BS=this.ga.createGain();this.s2=this.ga.createGain();this.u2=this.ga.createGain();this.v2=this.ga.createGain();this.w2=this.ga.createGain();this.z2=this.ga.createGain();this.A2=this.ga.createGain();this.B2=this.ga.createGain();this.C2=this.ga.createGain();this.D2=this.ga.createGain();this.rU=this.ga.createGain();this.N3=
this.ga.createGain();this.qU=this.ga.createGain();this.Ql=this.ga.createChannelMerger(4);this.kl.connect(this.CS,1);this.kl.connect(this.L1,2);this.kl.connect(this.BS,3);this.CS.gain.value=-1;this.BS.gain.value=-1;this.CS.connect(this.s2);this.CS.connect(this.u2);this.CS.connect(this.v2);this.L1.connect(this.w2);this.L1.connect(this.z2);this.L1.connect(this.A2);this.BS.connect(this.B2);this.BS.connect(this.C2);this.BS.connect(this.D2);this.s2.connect(this.rU);this.u2.connect(this.N3);this.v2.connect(this.qU);
this.w2.connect(this.rU);this.z2.connect(this.N3);this.A2.connect(this.qU);this.B2.connect(this.rU);this.C2.connect(this.N3);this.D2.connect(this.qU);this.kl.connect(this.Ql,0,0);this.rU.connect(this.Ql,0,1);this.N3.connect(this.Ql,0,2);this.qU.connect(this.Ql,0,3);this.rU.gain.value=-1;this.qU.gain.value=-1;this.oZ(new Float32Array([1,0,0,0,1,0,0,0,1]));this.input=this.kl;this.output=this.Ql}function g(S,W){this.ga=S;this.KS=this.yo=!1;this.pR();W&&this.p$(W);this.enable()}function k(S,W){this.ga=
p.PMa(S)?S:p.throw("FOARenderer: Invalid BaseAudioContext.");this.Ri={ar:h.mUa.De,$A:X.Wsa};W&&(W.ar&&(Array.isArray(W.ar)&&W.ar.length===4?this.Ri.ar=W.ar:p.throw("FOARenderer: Invalid channel map. (got "+W.ar+")")),W.h8&&(Array.isArray(W.h8)&&W.h8.length===2?this.Ri.rPa=W.h8:p.throw("FOARenderer: Invalid HRIR URLs. It must be an array with 2 URLs to HRIR files. (got "+W.h8+")")),W.$A&&(Object.values(X).includes(W.$A)?this.Ri.$A=W.$A:p.log("FOARenderer: Invalid rendering mode order. (got"+W.$A+') Fallbacks to the mode "ambisonic".')));
this.pR();this.VFa=new Float32Array(16);this.MS=!1}function e(S,W,Z){this.ga=S;this.KS=this.yo=!1;this.Q_=W;this.SAa=(this.Q_+1)*(this.Q_+1);this.pR();Z&&this.p$(Z);this.enable()}function b(S,W,Z,ca){return S[W-1][(ca+W)*(2*W+1)+(Z+W)].gain.value}function c(S,W,Z,ca,fa){return ca===fa?b(S,1,W,1)*b(S,fa-1,Z,fa-1)-b(S,1,W,-1)*b(S,fa-1,Z,-fa+1):ca===-fa?b(S,1,W,1)*b(S,fa-1,Z,-fa+1)+b(S,1,W,-1)*b(S,fa-1,Z,fa-1):b(S,1,W,0)*b(S,fa-1,Z,ca)}function d(S){for(let pa=2;pa<=S.length;pa++){var W=S,Z=pa;for(let ma=
-Z;ma<=Z;ma++)for(let na=-Z;na<=Z;na++){var ca=ma,fa=na,ja=Z,ha=ca===0?1:0;fa=Math.abs(fa)===ja?1/(2*ja*(2*ja-1)):1/((ja+fa)*(ja-fa));ca=[Math.sqrt((ja+ca)*(ja-ca)*fa),.5*(1-2*ha)*Math.sqrt((1+ha)*(ja+Math.abs(ca)-1)*(ja+Math.abs(ca))*fa),-.5*(1-ha)*Math.sqrt((ja-Math.abs(ca)-1)*(ja-Math.abs(ca)))*fa];Math.abs(ca[0])>0&&(ca[0]*=c(W,0,ma,na,Z));if(Math.abs(ca[1])>0){ja=ca[1];ha=W;fa=ma;var ka=na,la=Z;if(fa===0)ha=c(ha,1,1,ka,la)+c(ha,-1,-1,ka,la);else if(fa>0){var oa=fa===1?1:0;ha=c(ha,1,fa-1,ka,la)*
Math.sqrt(1+oa)-c(ha,-1,-fa+1,ka,la)*(1-oa)}else oa=fa===-1?1:0,ha=c(ha,1,fa+1,ka,la)*(1-oa)+c(ha,-1,-fa-1,ka,la)*Math.sqrt(1+oa);ca[1]=ja*ha}Math.abs(ca[2])>0&&(ja=ca[2],ha=W,fa=ma,ka=na,la=Z,ha=fa===0?0:fa>0?c(ha,1,fa+1,ka,la)+c(ha,-1,-fa-1,ka,la):c(ha,1,fa-1,ka,la)-c(ha,-1,-fa+1,ka,la),ca[2]=ja*ha);W[Z-1][(na+Z)*(2*Z+1)+(ma+Z)].gain.value=ca[0]+ca[1]+ca[2]}}}function f(S,W){this.ga=S;this.Q_=W;S=(W+1)*(W+1);this.kl=this.ga.createChannelSplitter(S);this.Ql=this.ga.createChannelMerger(S);this.Pg=
[];let Z,ca,fa,ja;for(let ha=1;ha<=W;ha++){S=ha*ha;Z=2*ha+1;this.Pg[ha-1]=[];for(let ka=0;ka<Z;ka++){ca=S+ka;for(let la=0;la<Z;la++)fa=S+la,ja=ka*Z+la,this.Pg[ha-1][ja]=this.ga.createGain(),this.kl.connect(this.Pg[ha-1][ja],ca),this.Pg[ha-1][ja].connect(this.Ql,0,fa)}}this.kl.connect(this.Ql,0,0);this.oZ(new Float32Array([1,0,0,0,1,0,0,0,1]));this.input=this.kl;this.output=this.Ql}var l=a("tdv/player/view/util/Flags");const p={log:function(){l.uu&&console.log(Array.from(arguments).join(" "))},throw:function(){throw Error(Array.from(arguments).join(" "));
}};let q,r,t,u,v,w,x,y,z,A,D,F,C,B,H,E,G,N,O,R,Q,K,L,U,T,Y,aa,ba,ea;p.ghb=function(S,W){q=W[0];r=W[1];t=W[2];u=W[3];v=W[4];w=W[5];x=W[6];y=W[7];z=W[8];A=W[9];D=W[10];F=W[11];C=W[12];B=W[13];H=W[14];E=W[15];G=q*w-r*v;N=q*x-t*v;O=q*y-u*v;R=r*x-t*w;Q=r*y-u*w;K=t*y-u*x;L=z*B-A*C;U=z*H-D*C;T=z*E-F*C;Y=A*H-D*B;aa=A*E-F*B;ba=D*E-F*H;if(ea=G*ba-N*aa+O*Y+R*T-Q*U+K*L)ea=1/ea,S[0]=(w*ba-x*aa+y*Y)*ea,S[1]=(t*aa-r*ba-u*Y)*ea,S[2]=(B*K-H*Q+E*R)*ea,S[3]=(D*Q-A*K-F*R)*ea,S[4]=(x*T-v*ba-y*U)*ea,S[5]=(q*ba-t*T+u*U)*
ea,S[6]=(H*O-C*K-E*N)*ea,S[7]=(z*K-D*O+F*N)*ea,S[8]=(v*aa-w*T+y*L)*ea,S[9]=(r*T-q*aa-u*L)*ea,S[10]=(C*Q-B*O+E*G)*ea,S[11]=(A*O-z*Q-F*G)*ea,S[12]=(w*U-v*Y-x*L)*ea,S[13]=(q*Y-r*U+t*L)*ea,S[14]=(B*N-C*R-H*G)*ea,S[15]=(z*R-A*N+D*G)*ea};p.lhb=function(S,W){for(const Z in S)if(W===S[Z])return!0;return!1};p.PMa=function(S){return S instanceof AudioContext||S instanceof OfflineAudioContext};p.Vpb=function(S){return S instanceof AudioBuffer};p.Peb=function(S){const W=window.atob(S),Z=new Uint8Array(W.length);
Z.forEach((ca,fa)=>Z[fa]=W.charCodeAt(fa));return Z.buffer};const ia={AQ:"base64",URL:"url"};m.prototype.load=function(){return new Promise(this.C6a.bind(this))};m.prototype.C6a=function(S,W){typeof S!=="function"?p.throw("BufferList: Invalid Promise resolver."):this.iEa=S;typeof W==="function"&&(this.OU=W);for(S=0;S<this.Su.length;++S)this.WH.dataType===ia.AQ?this.$3a(S):this.a4a(S)};m.prototype.$3a=function(S){const W=this;this.ga.decodeAudioData(p.Peb(this.Su[S]),function(Z){W.hh(S,Z)},function(Z){W.hh(S,
null);Z='BufferList: decoding ArrayByffer("'+S+'" from Base64-encoded data failed. ('+Z+")";W.OU(Z);p.throw(Z)})};m.prototype.a4a=function(S){const W=new XMLHttpRequest;W.open("GET",this.Su[S]);W.responseType="arraybuffer";const Z=this;W.onload=function(){if(W.status===200)Z.ga.decodeAudioData(W.response,function(ca){Z.hh(S,ca)},function(ca){Z.hh(S,null);ca='BufferList: decoding "'+Z.Su[S]+'" failed. ('+ca+")";Z.OU(ca);p.log(ca)});else{const ca='BufferList: XHR error while loading "'+Z.Su[S]+'". ('+
W.status+" "+W.statusText+")";Z.OU(ca);p.log(ca)}};W.onerror=function(){Z.hh(S,null);Z.OU();p.log('BufferList: XHR network failed on loading "'+Z.Su[S]+'".')};W.send()};m.prototype.hh=function(S,W){this.gwa[S]=W;this.WH.waa&&p.log("BufferList: "+(this.WH.dataType===ia.AQ?"ArrayBuffer("+S+") from Base64-encoded HRIR":'"'+this.Su[S]+'"')+" successfully loaded.");--this.z4a===0&&(p.log("BufferList: "+(this.WH.dataType===ia.AQ?this.Su.length+" AudioBuffers from Base64-encoded HRIRs":this.Su.length+" files via XHR")+
" loaded successfully."),this.iEa(this.gwa))};const da={De:[0,1,2,3],vua:[2,0,1,3],Hob:[0,3,1,2]};h.prototype.$qa=function(S){Array.isArray(S)&&(this.l0=S,this.kl.disconnect(),this.kl.connect(this.Ql,0,this.l0[0]),this.kl.connect(this.Ql,1,this.l0[1]),this.kl.connect(this.Ql,2,this.l0[2]),this.kl.connect(this.Ql,3,this.l0[3]))};h.mUa=da;n.prototype.oZ=function(S){this.s2.gain.value=S[0];this.u2.gain.value=S[1];this.v2.gain.value=S[2];this.w2.gain.value=S[3];this.z2.gain.value=S[4];this.A2.gain.value=
S[5];this.B2.gain.value=S[6];this.C2.gain.value=S[7];this.D2.gain.value=S[8]};n.prototype.E$=function(S){this.s2.gain.value=S[0];this.u2.gain.value=S[1];this.v2.gain.value=S[2];this.w2.gain.value=S[4];this.z2.gain.value=S[5];this.A2.gain.value=S[6];this.B2.gain.value=S[8];this.C2.gain.value=S[9];this.D2.gain.value=S[10]};g.prototype.pR=function(){this.vV=this.ga.createChannelSplitter(4);this.Fha=this.ga.createChannelMerger(2);this.Gha=this.ga.createChannelMerger(2);this.w0=this.ga.createConvolver();
this.x0=this.ga.createConvolver();this.uV=this.ga.createChannelSplitter(2);this.wV=this.ga.createChannelSplitter(2);this.uH=this.ga.createGain();this.jv=this.ga.createChannelMerger(2);this.QFa=this.ga.createGain();this.vV.connect(this.Fha,0,0);this.vV.connect(this.Fha,1,1);this.vV.connect(this.Gha,2,0);this.vV.connect(this.Gha,3,1);this.Fha.connect(this.w0);this.Gha.connect(this.x0);this.w0.connect(this.uV);this.x0.connect(this.wV);this.uV.connect(this.jv,0,0);this.uV.connect(this.jv,0,1);this.uV.connect(this.jv,
1,0);this.uV.connect(this.uH,1,0);this.uH.connect(this.jv,0,1);this.wV.connect(this.jv,0,0);this.wV.connect(this.jv,0,1);this.wV.connect(this.jv,1,0);this.wV.connect(this.jv,1,1);this.w0.normalize=!1;this.x0.normalize=!1;this.uH.gain.value=-1;this.input=this.vV;this.output=this.QFa};g.prototype.p$=function(S){this.KS||(this.w0.buffer=S[0],this.x0.buffer=S[1],this.KS=!0)};g.prototype.enable=function(){this.jv.connect(this.QFa);this.yo=!0};g.prototype.disable=function(){this.jv.disconnect();this.yo=
!1};const V=["UklGRiQEAABXQVZFZm10IBAAAAABAAIAgLsAAADuAgAEABAAZGF0YQAEAAD+/wIA9v8QAPv/CwD+/wcA/v8MAP//AQD7/wEACAAEAPj/+v8YABAA7v/n//v/9P/M/8D//f34/R38EvzxAfEBtA2lDTcBJQFJ9T71FP0D/cD1tfVo/Wv9uPTO9PPmOufc/U/+agL3Aisc/RxuGKEZBv3j/iYMzQ2gAzsEQQUABiQFrASzA5cB2QmyCy0AtgR4AeYGtfgAA2j5OQHP+scArPsMBJgEggIEBtz6+QVq/pj/aPg8BPP3gQEi+jEAof0fA1v9+/7S+8IBjvwd/xD4IADL/Pf9zvs+/l3+wgB7/+L+7fzFADH9kf6A+n3+DP6+/TP9xP68/pn+w/26/i39YgA0/u790Pt9/kD+7v1s/Wb+8f4C/1P+pf/x/cT+6/3p/Xz9ff5F/0f9G/4r/6v/4P5L/sL+ff7c/pj+Ov7X/UT+9P5G/oz+6v6A/2D+9/6P/8r/bP7m/ij+C//e/tj/Gf4e/9v+FwDP/lz/sP7F/2H+rv/G/s7/Hf7y/4P+NAD9/k0AK/6w/zP/hACh/sX/gf44AOP+dgCm/iUAk/5qAOD+PwC+/jEAWP4CAAr/bQBw/vv/zf5iACD/OgCS/uD/Cv9oAAb/CgDK/kwA//5tACH/TgCg/h4AHP9aABP/JADP/hEAYv9gAAj/3f8m/ysAYv8gACX/8/8k/ysAXv8bABH//v8j/ygAa/8qAAD/9f9g/1YAWf8JACH/AgB2/z4AXP/w/z3/FgB2/ykAX//9/z//EwCV/zUAS//n/1T/GACK/x4ATv/0/4P/QQB4//v/WP/2/3X/HAB8//P/V//3/2f/AQBh/9v/Tf/x/5P/IwCI/wMAf/8hAKP/JACZ/xUAiv8nAK//HgCr/yMAm/8uAMz/OACi/yQAqf87AMT/MwCY/yUAtP9FAMH/KgCu/ycAyP85AMv/IwCz/xoA1f8qAMn/FgC8/xQA4/8nAMX/CwDJ/xQA4f8ZAMH/BgDO/xQA4f8WAMP/BwDU/xQA4P8QAMH/AQDb/xQA3P8JAMP/AgDh/xIA2v8EAMj/AgDk/w0A1f/+/8v/AwDm/wwA0v/+/9H/BgDl/wkAzv/8/9T/BwDk/wcAzv/8/9r/CQDi/wQAzf/8/9//CADf////0P/9/+L/BwDd//7/0////+T/BgDb//z/1f8AAOf/BQDZ//v/2v8CAOb/AwDY//v/3v8EAOb/AgDY//3/4f8FAOX/AQDZ//7/5P8GAOP/AADb/wAA5/8GAOH////d/wIA5/8FAOD////f/wMA6P8FAOD////h/wQA6P8EAN7////h/wUA4v8DANv/AQDd/wQA3P8CANn/AgDb/wMA2/8CANv/AgDd/wIA3v8CAOH/AQDj/wEA",
"UklGRiQEAABXQVZFZm10IBAAAAABAAIAgLsAAADuAgAEABAAZGF0YQAEAAAAAAAA/f8CAP//AQD//wEA//8BAP3/AAACAP7/+f8AAAIA/P8FAAQA8/8AABoA+f/V/wQAHQDO/xoAQQBO/ocA0Px1/ucHW/4UCm8HLO6kAjv8/fCRDdAAYfPiBIgFXveUCM0GBvh6/nz7rf0J/QcQSRVdBgoBSgFR62r9NP8m+LoEAvriBVAAiAPmABEGMf2l+SwBjva6/G4A//8P/CYDMgXm/R0CKAE6/fcBBwAtAND+kQA0A5UDhwFs/8IB8fydAEP/A/8v/e7/mP8j/2YBIwE3Av0AYv+uAOD8lgAg/wwAIf/L/n0Ae//OAJMB3P/XAF//XwCM/08AB/8NAEf/rf4jAT3/lgAJAP4AHgDpAO8AUf9L/07/Qf8KAOD/x/+D/3sATQCDAMoA0f79/+L/EQDt/7EAqv+S/7IAuv/o/wgAc//X//H/SwCm/+3/Yf/B/yoAAADI/7X/AwBg/5EATgCX/xYA/P+q/00AVACY/6v/BADD/zwALQCN/8z/KQDu/ygAEgCZ/6f/VQDC//T/KQCs/7P/UgAfAO7/NgC8/57/awAZAPP/+P/V/8z/bQBBAL//DgD0/+T/TABBAMz/CwAxAPz/SQBqALn/BgALAPz/EAA7AIz/3/8iAAUA//8kALf/y/9VABQA+v81AOj/0P9cAB4A+f8WAOr/vv83ABgAw/8JAOj/4f8nACIAsf/y/w4A3v8gACQAxP/n/ycA7P8WAC0Ayf/U/ycA9v/7/yUA0P/P/zUABADc/xUA5P/J/zcACwDS/xUA9P/m/zAACQDX/+3/9v/2/yQACgDZ/+P/AwAKABYA///b/9j/EQALABkADgD6/+7/GwD4/w4A8P/w//j/EgAEAAUA9f/1/wQAGgD4/wAA5////wAAGQD1////7f8FAAUAFQDv/wAA6v8LAAcAFQDs/wEA9P8SAAYACwDr//7/AQASAAYABQDv/wIAAwAWAAIAAgDv/wAABgATAAEA/f/u/wQABgAQAPr/+P/z/wUACQALAPj/9//4/wgABwAKAPT/+f/5/w4ABwAIAPT/+//9/w4AAwADAPH//f///w8A//8BAPP///8BAA0A/f/+//X/AgACAA0A+//8//b/BAADAAoA+f/7//n/BgADAAcA+P/7//v/BwABAAQA+P/8//3/CQABAAIA9//9////CQD/////+P///wAACAD9//7/+f8AAAAABwD8//3/+v8CAAAABgD7//z//P8EAAAABAD6//3//P8FAP//AgD6//7//v8FAP7/AQD7//////8GAP7/AAD7/wEA//8EAP3/AAD9/wEA/v8DAP3/AAD9/wIA/v8CAP3/AQD9/wIA/v8CAP7/AQD+/wEA"],
X={Wsa:"ambisonic",eUa:"bypass",xVa:"off"};k.prototype.pR=function(){this.input=this.ga.createGain();this.output=this.ga.createGain();this.d0=this.ga.createGain();this.nfa=new h(this.ga,this.Ri.ar);this.gS=new n(this.ga);this.kM=new g(this.ga);this.input.connect(this.nfa.input);this.input.connect(this.d0);this.nfa.output.connect(this.gS.input);this.gS.output.connect(this.kM.input);this.kM.output.connect(this.output);this.input.channelCount=4;this.input.channelCountMode="explicit";this.input.channelInterpretation=
"discrete"};k.prototype.h3a=function(S,W){(this.Ri.rPa?new m(this.ga,this.Ri.rPa,{dataType:"url"}):new m(this.ga,V)).load().then(function(Z){this.kM.p$(Z);this.qlb(this.Ri.$A);this.MS=!0;p.log("FOARenderer: HRIRs loaded successfully. Ready.");S()}.bind(this),function(){W("FOARenderer: HRIR loading/decoding failed.");p.throw("FOARenderer: HRIR loading/decoding failed.")})};k.prototype.initialize=function(){p.log("FOARenderer: Initializing... (mode: "+this.Ri.$A+")");return new Promise(this.h3a.bind(this))};
k.prototype.$qa=function(S){this.MS&&S.toString()!==this.Ri.ar.toString()&&(p.log("Remapping channels (["+this.Ri.ar.toString()+"] -> ["+S.toString()+"])."),this.Ri.ar=S.slice(),this.nfa.$qa(this.Ri.ar))};k.prototype.oZ=function(S){this.MS&&this.gS.oZ(S)};k.prototype.E$=function(S){this.MS&&this.gS.E$(S)};k.prototype.tlb=function(S){this.MS&&(p.ghb(this.VFa,S.elements),this.gS.E$(this.VFa))};k.prototype.qlb=function(S){if(S!==this.Ri.$A){switch(S){case X.Wsa:this.kM.enable();this.d0.disconnect();
break;case X.eUa:this.kM.disable();this.d0.connect(this.output);break;case X.xVa:this.kM.disable();this.d0.disconnect();break;default:p.log('FOARenderer: Rendering mode "'+S+'" is not supported.');return}this.Ri.$A=S;p.log("FOARenderer: Rendering mode changed. ("+S+")")}};e.prototype.pR=function(){var S=Math.ceil(this.SAa/2);this.Hza=this.ga.createChannelSplitter(this.SAa);this.Tka=[];this.ER=[];this.v5=[];this.oja=this.ga.createGain();this.Yha=this.ga.createGain();this.uH=this.ga.createGain();this.EL=
this.ga.createChannelMerger(2);this.gDa=this.ga.createGain();for(var W=0;W<S;++W)this.Tka[W]=this.ga.createChannelMerger(2),this.ER[W]=this.ga.createConvolver(),this.v5[W]=this.ga.createChannelSplitter(2),this.ER[W].normalize=!1;for(S=0;S<=this.Q_;++S)for(W=-S;W<=S;W++){const Z=S*S+S+W,ca=Math.floor(Z/2);this.Hza.connect(this.Tka[ca],Z,Z%2);this.Tka[ca].connect(this.ER[ca]);this.ER[ca].connect(this.v5[ca]);W>=0?this.v5[ca].connect(this.oja,Z%2):this.v5[ca].connect(this.Yha,Z%2)}this.oja.connect(this.EL,
0,0);this.oja.connect(this.EL,0,1);this.Yha.connect(this.EL,0,0);this.Yha.connect(this.uH);this.uH.connect(this.EL,0,1);this.uH.gain.value=-1;this.input=this.Hza;this.output=this.gDa};e.prototype.p$=function(S){if(!this.KS){for(let W=0;W<S.length;++W)this.ER[W].buffer=S[W];this.KS=!0}};e.prototype.enable=function(){this.EL.connect(this.gDa);this.yo=!0};e.prototype.disable=function(){this.EL.disconnect();this.yo=!1};f.prototype.oZ=function(S){this.Pg[0][0].gain.value=-S[0];this.Pg[0][1].gain.value=
S[1];this.Pg[0][2].gain.value=-S[2];this.Pg[0][3].gain.value=-S[3];this.Pg[0][4].gain.value=S[4];this.Pg[0][5].gain.value=-S[5];this.Pg[0][6].gain.value=-S[6];this.Pg[0][7].gain.value=S[7];this.Pg[0][8].gain.value=-S[8];d(this.Pg)};f.prototype.E$=function(S){this.Pg[0][0].gain.value=-S[0];this.Pg[0][1].gain.value=S[1];this.Pg[0][2].gain.value=-S[2];this.Pg[0][3].gain.value=-S[4];this.Pg[0][4].gain.value=S[5];this.Pg[0][5].gain.value=-S[6];this.Pg[0][6].gain.value=-S[8];this.Pg[0][7].gain.value=S[9];
this.Pg[0][8].gain.value=-S[10];d(this.Pg)};return{Kpb:function(S,W){return new g(S,W)},Mpb:function(S,W){return new h(S,W)},Lpb:function(S){return new n(S)},Opb:function(S,W){return new f(S,W)},Npb:function(S,W,Z){return new e(S,W,Z)},rdb:function(S,W){return new k(S,W)}}});
define("tdv/view/av/AudioController","require exports three.mod tdv/utils tdv/view/av/SharedAudioContext tdv/player/view/util/Device tdv/player/view/util/URL tdv/player/view/util/Flags tdv/view/av/omnitone".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(){function t(u){this.wq=this.wq.bind(this);this.aD=this.aD.bind(this);this.Ff=!1;this.jt=this.i1=1;this.z1=!0;this.eD=1;this.Vx=this.gq=this.kO=this.fS=this.mfa=this.Ay=this.Cy=this.pG=null;this.gI=[];this.NR=this.Uca=!1;this.fa=u;this.fa.addEventListener("play",
this.wq,!0);this.fa.addEventListener("playing",this.aD,!0);this.HI()}t.prototype.clear=function(){this.UFa();this.SFa();this.i$a();this.g$a();this.fa.removeEventListener("play",this.wq,!0);this.fa.removeEventListener("playing",this.aD,!0)};t.prototype.Dkb=function(u){this.z1!=u&&(this.fa.log("AudioController","set hasAudio: "+u),this.z1=u,this.HI())};t.prototype.Bg=function(u){this.Ff!=u&&(this.fa.log("AudioController","set muted: "+u),this.Ff=u,this.HI())};t.prototype.iB=function(u){this.jt!=u&&
(this.fa.log("AudioController","set volume: "+u),this.jt=u,this.HI())};t.prototype.VY=function(u){this.i1!=u&&(this.fa.log("AudioController","set gain: "+u),this.i1=Math.max(0,Math.min(1,u)),this.HI())};t.prototype.RY=function(u){this.Uca!=u&&(this.Uca=u,this.a6())};t.prototype.pkb=function(u){this.NR!=u&&(this.NR=u,this.a6())};t.prototype.bu=function(u){this.gq=u?(this.gq||new h.Matrix4).copy(u):null;this.Wla()};t.prototype.Tw=function(u){this.Vx=u?(this.Vx||new h.Matrix4).copy(u):null;this.Wla()};
t.prototype.wq=function(){this.HI()};t.prototype.aD=function(){this.HI()};t.prototype.HI=function(){this.fa.log("AudioController","updateVolume paused: "+this.fa.paused+" outputVolume: "+(!this.z1||this.Ff?0:this.jt*this.i1));var u=this.Q2a()?!this.z1||this.Ff?0:this.jt*this.i1:1;this.eD!=u&&(this.eD=u,t.IHa()?(this.fa.volume=1,this.a6()):this.fa.volume=this.eD);u=this.eD==0;this.fa.muted!=u&&(this.fa.muted=u)};t.prototype.a6=function(){var u=[];t.IHa()&&(this.eD==0&&this.kO||this.eD>0)&&this.eD<
1?(this.u9a(),this.kO&&u.push(this.kO)):this.UFa();this.NR?(this.r9a(),this.rDa&&u.push(this.rDa)):this.SFa();this.Uca&&(this.m9a(),this.fS&&u.push(this.fS));u.length>0&&this.o9a();this.pG&&(u=[new d(null,this.pG)].concat(u));(g===null||g===void 0?0:g.destination)&&u.push(new d(g.destination,null));this.hYa(u);this.Wla()};t.prototype.hYa=function(u){if(!n.v8(this.gI,u)){for(var v=0;v<this.gI.length-1;v++)this.gI[v].output.disconnect();this.gI=u;for(v=0;v<this.gI.length-1;v++)this.gI[v].output.connect(this.gI[v+
1].input)}};t.prototype.Wla=function(){this.Cy&&(this.Cy.gain.value=this.eD);this.gp&&this.Vx&&this.gq&&(f.copy(this.Vx).premultiply(l.copy(this.gq).invert()),f.decompose(p,q,r),this.gp.positionX.value=p.x,this.gp.positionY.value=p.y,this.gp.positionZ.value=p.z,p.set(0,0,1).applyQuaternion(q).normalize(),this.gp.orientationX.value=p.x,this.gp.orientationY.value=p.y,this.gp.orientationZ.value=p.z);this.Ay&&this.gq&&this.Ay.tlb(this.gq)};t.prototype.u9a=function(){!this.Cy&&t.i0()&&(this.Cy=g.createGain(),
this.kO=new d(this.Cy,this.Cy))};t.prototype.UFa=function(){this.Cy&&(this.Cy.disconnect(),this.Cy=null);this.kO&&(this.kO=null)};t.prototype.r9a=function(){!this.gp&&t.i0()&&(this.gp=g.createPanner(),this.rDa=new d(this.gp,this.gp))};t.prototype.SFa=function(){this.gp&&(this.gp.disconnect(),this.gp=null)};t.prototype.o9a=function(){!this.pG&&t.i0()&&(this.pG=g.createMediaElementSource(this.fa))};t.prototype.i$a=function(){this.pG&&(this.pG.disconnect(),this.pG=null)};t.prototype.m9a=function(){var u=
this;!this.mfa&&t.i0()&&(this.Ay=c.rdb(g,{ar:t.i1a()}),this.mfa=this.Ay.initialize(),this.mfa.then(function(){u.fS=new d(u.Ay.input,u.Ay.output);u.a6()}))};t.prototype.g$a=function(){this.Ay&&(this.Ay.output.disconnect(),this.Ay=null);this.fS&&(this.fS=null)};t.prototype.Q2a=function(){var u=this.fa.currentSrc||this.fa.children.length&&this.fa.children[0].src||"";e.iE(u)&&(u=void 0);return!!u};t.i0=function(){return b.Xsa&&k.xc()!=k.PK&&g?!0:!1};t.IHa=function(){return k.Yb()==k.sj};t.i1a=function(){return navigator.userAgent.includes("Safari")&&
!navigator.userAgent.includes("Chrome")?[2,0,1,3]:[0,1,2,3]};return t}();var d=function(){return function(t,u){this.input=t;this.output=u}}(),f=new h.Matrix4,l=new h.Matrix4,p=new h.Vector3,q=new h.Quaternion,r=new h.Vector3;return a});define("tdv/view/av/MediaType",["require","exports"],function(){return{Wp:"video",aUa:"audio"}});
define("tdv/view/av/PlaybackController","require exports tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/URL tdv/util/LoadQueue tdv/view/util/Visibility".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(q){var r=l.call(this)||this;r.fa=q;r.KH=r.KH.bind(r);r.$y=r.$y.bind(r);r.hn=r.hn.bind(r);r.IT=r.IT.bind(r);r.gl=r.gl.bind(r);r.kn=r.kn.bind(r);r.aD=r.aD.bind(r);
r.cW=r.cW.bind(r);r.fa.addEventListener("ended",r.hn,!0);r.fa.addEventListener("pause",r.kn,!1);r.fa.addEventListener("stalled",r.kn,!1);r.fa.addEventListener("waiting",r.kn,!1);r.fa.addEventListener("canplay",r.KH,!0);r.fa.addEventListener("canplaythrough",r.$y,!1);r.fa.addEventListener("loadedmetadata",r.gl,!0);r.fa.addEventListener("playing",r.aD,!1);r.fa.addEventListener("error",r.IT,!1);r.Nea=!1;r.I=n.ca;r.jj=null;r.jN=null;f.bind(h.V,r.mbb,r,!0);return r}P(p,l);p.prototype.clear=function(){this.fa.removeEventListener("ended",
this.hn,!0);this.fa.removeEventListener("pause",this.kn,!1);this.fa.removeEventListener("stalled",this.kn,!1);this.fa.removeEventListener("waiting",this.kn,!1);this.fa.removeEventListener("canplay",this.KH,!0);this.fa.removeEventListener("canplaythrough",this.$y,!1);this.fa.removeEventListener("loadedmetadata",this.gl,!0);this.fa.removeEventListener("error",this.IT,!1)};p.prototype.play=function(){this.fa.log("PlaybackController","play");this.jN=n.PLAYING;this.KU()};p.prototype.stop=function(){this.fa.log("PlaybackController",
"stop");this.jN=n.ca;this.KU()};p.prototype.getState=function(){return this.jj||this.I};p.prototype.AJ=function(){return this.fa.readyState==this.fa.HAVE_NOTHING||this.fa.readyState==this.fa.HAVE_METADATA||this.fa.currentTime===0?!1:!0};p.prototype.KU=function(){!this.jj&&this.jN&&(this.jj=this.jN,this.jN=null,this.jj==n.PLAYING?this.Pka():this.Oka())};p.prototype.mbb=function(){f.visible?(this.fa.log("PlaybackController","visibile changed to true, setting state to "+this.I),this.jj=this.I,this.jj==
n.PLAYING?this.Pka():this.Oka()):this.fa.paused||(this.fa.log("PlaybackController","paused by visibile changed to false"),this.fa.pause())};p.prototype.qM=function(){return this.fa.currentSrc||this.fa.children.length&&this.fa.children[0].src||""};p.prototype.Pka=function(){var q=this,r=this.qM();this.W4(!!r&&!c.iE(r));this.T_=b.Yb()==b.sj;this.fa.paused?(this.fa.log("PlaybackController","startPlaying calling play"),this.fa.muted=!0,this.fa.log("PlaybackController","this._media.play()"),this.fa.play()["catch"](function(t){q.IT(t)}).then(function(){q.qCa()}).finally(function(){})):
(this.fa.log("PlaybackController","startPlaying already playing"),this.qCa())};p.prototype.aD=function(){this.fa.log("PlaybackController","onPlaying event received. Visible: "+f.visible)};p.prototype.qCa=function(){this.jj==n.PLAYING?(this.fa.log("PlaybackController","onPlay promise fullfilled received when waiting to play"),this.jj=null,this.I=n.PLAYING,this.o(new k(p.Aba)),this.KU()):this.fa.log("PlaybackController","onPlay promise fullfilled received. Visible: "+f.visible)};p.prototype.Oka=function(){this.W4(!1);
this.T_=!1;this.fa.paused?(this.fa.log("PlaybackController","startPausing already paused"),this.kn()):(this.fa.log("PlaybackController","startPausing calling pause"),this.fa.pause())};p.prototype.kn=function(){this.jj==n.ca?(this.fa.log("PlaybackController","onPause event received when waiting to stop"),this.jj=null,this.I=n.ca,this.KU()):f.visible?(this.fa.log("PlaybackController","onPause event received without calling to pause"),(this.I==n.PLAYING&&!this.jj||this.jj==n.PLAYING)&&!this.fa.hasAttribute("loop")&&
!isNaN(this.fa.duration)&&this.fa.currentTime==this.fa.duration&&this.fa.duration>0&&this.hn(),this.cW()):this.fa.log("PlaybackController","onPause event received when not visible")};p.prototype.KH=function(){this.fa.log("PlaybackController","on can play");this.cW()};p.prototype.$y=function(){this.fa.log("PlaybackController","can play through");this.cW();this.W4(!1)};p.prototype.cW=function(){if(this.nFa()){if(this.T_&&this.fa.currentTime==0){this.fa.log("PlaybackController","updatePlaying applying ios hack");
this.T_=!1;try{this.fa.currentTime=.3}catch(q){}}b.Yb()!=b.OK&&this.kEa()}};p.prototype.nFa=function(){return this.I==n.PLAYING&&f.visible&&this.fa.paused&&this.fa.readyState>=3};p.prototype.kEa=function(q){q===void 0&&(q=!1);this.lEa||(q?this.nFa()&&(this.fa.log("PlaybackController","updatePlaying retrying play"),this.jj=n.PLAYING,this.Pka()):this.lEa=setTimeout(function(){this.lEa=null;this.kEa(!0)}.bind(this),500))};p.prototype.IT=function(){this.jj==n.PLAYING&&(this.fa.log("PlaybackController",
"onError waiting to play"),this.jj=null,this.jN?this.KU():b.Yb()==b.sj?this.o(new k(p.dba)):this.jj=n.PLAYING)};p.prototype.gl=function(){this.fa.log("PlaybackController","on loaded metadata");!isNaN(this.fa.duration)&&this.fa.currentTime==this.fa.duration&&this.fa.duration>0&&this.hn()};p.prototype.hn=function(){this.fa.log("PlaybackController","onEnded");this.T_=!1;if(this.I==n.PLAYING&&!this.jj||this.jj==n.ca)this.fa.log("PlaybackController","onEnded finalizing video"),this.W4(!1),this.jj=n.ca,
this.Oka(),this.o(new k(p.Bl))};p.prototype.W4=function(q){this.Nea!=q&&(this.fa.log("PlaybackController","downloading changed to: "+q),(this.Nea=q)?d.wmb(g.Fta):d.vmb(g.Fta))};p.dba="deactivated";p.Bl="end";p.Aba="play";return p}(e)});
define("tdv/view/av/TextTracksController",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,m,h,n){return function(g){function k(e){var b=g.call(this)||this;b.ll=null;b.bf=[];b.gl=b.gl.bind(b);b.bia=b.bia.bind(b);b.Fj=b.Fj.bind(b);b.fa=e;b.ll=null;b.bf=[];b.fa.addEventListener("loadedmetadata",b.gl,!0);b.fa.textTracks.addEventListener("addtrack",b.bia,!1);return b}P(k,g);k.prototype.set=function(e){e&&this.sXa(e)};k.prototype.clear=function(){this.f7a()};k.prototype.cP=
function(){return this.ll&&this.ll.track.activeCues?Array.from(this.ll.track.activeCues):[]};k.prototype.gl=function(){this.mHa()};k.prototype.bia=function(){this.mHa()};k.prototype.Fj=function(){this.BEa(this.cP())};k.prototype.BEa=function(e){e||(e=[]);if(this.bf.length!=0||e.length!=0)this.bf=Array.from(e),this.o(h.Al,this.bf)};k.prototype.sXa=function(e){this.fa.log("TextTracksController","add text track src: "+e);this.ll=document.createElement("track");this.ll.kind="subtitles";this.ll.src=e;
this.fa.appendChild(this.ll)};k.prototype.f7a=function(){this.ll&&(this.fa.log("TextTracksController","remove text track"),this.ll.track.removeEventListener("cuechange",this.Fj),this.ll.track.mode="disabled",this.ll.src="",this.fa.removeChild(this.ll),this.ll=null,this.BEa([]))};k.prototype.mHa=function(){for(var e=0;e<this.fa.textTracks.length;e++){var b=this.fa.textTracks[e];b.removeEventListener("cuechange",this.Fj);b.mode=this.ll&&b==this.ll.track?"hidden":"disabled";b.mode=="hidden"&&b.addEventListener("cuechange",
this.Fj)}};return k}(n)});
define("tdv/player/view/util/FileType",["require","exports","tdv/player/view/util/URL"],function(a,m,h){return function(){function n(){}n.is=function(g,k){g=h.parse(g).veb;return k.indexOf(g)!=-1};n.iE=function(g,k){return!!g&&k.some(function(e){return g.indexOf(e)===0})};n.eua=[".mp4",".m4v",".m4p"];n.WUa=[".hevc"];n.Lta=[".mov"];n.pWa=[".webm"];n.yVa=[".ogv",".ogg"];n.HLS=[".m3u8"];n.uta=".ply .bin .splat .spz .sog .zip".split(" ");n.yWa=[".json"];n.YUa=".jpg .jpeg .png .webp .gif .avif .apng .bmp".split(" ");n.Wp=
".m3u8 .mpd .mp4 .m4v .m4p .webm .ogv .ogg .mpg .mpeg .m3u8 .mpd".split(" ");n.ZUa=["data:image/"];return n}()});
define("tdv/view/av/TimeController","require exports tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/FileType".split(" "),function(a,m,h,n,g,k){return function(e){function b(c){var d=e.call(this)||this;d.fa=c;d.$y=d.$y.bind(d);d.kn=d.kn.bind(d);d.wq=d.wq.bind(d);d.gl=d.gl.bind(d);d.hn=d.hn.bind(d);d.K3=d.K3.bind(d);d.Nf=d.Nf.bind(d);d.AI=void 0;d.SM=void 0;d.oha=void 0;d.hla=0;d.fa.addEventListener("ended",d.hn,!0);d.fa.addEventListener("pause",d.kn,!1);
d.fa.addEventListener("canplaythrough",d.$y,!1);d.fa.addEventListener("timeupdate",d.K3,!1);d.fa.addEventListener("play",d.wq,!1);return d}P(b,e);b.prototype.clear=function(){this.fa&&(this.fa.removeEventListener("ended",this.hn,!0),this.fa.removeEventListener("pause",this.kn,!1),this.fa.removeEventListener("canplaythrough",this.$y,!1),this.fa.removeEventListener("timeupdate",this.K3,!1),this.fa.removeEventListener("play",this.wq,!1),this.AI&&clearInterval(this.AI))};b.prototype.setTime=function(c){if(!this.fa.srcObject){this.hla=
0;this.l2=void 0;this.fa.log("TimeController","setTime: "+c);g.VIa()&&!k.is(this.qM(),k.HLS)?this.hR=c||0:this.hR=void 0;try{this.fa.currentTime=c}catch(d){}g.Yb()==g.rF||g.Yb()==g.OK||g.xc()==g.WZ&&c==0||(this.SM=c,this.GGa())}};b.prototype.getTime=function(){return this.SM||this.fa.currentTime||0};b.prototype.lj=function(){return this.fa.duration||0};b.prototype.wq=function(){this.yka(!0)};b.prototype.kn=function(){this.yka(!1);this.l2=void 0};b.prototype.$y=function(){this.fa.log("TimeController",
"on can play through");this.GGa()};b.prototype.hn=function(){this.hR=void 0;this.yka(!1)};b.prototype.gl=function(){this.o(new h(b.Yj))};b.prototype.GGa=function(){if(this.fa.readyState>=this.fa.HAVE_ENOUGH_DATA&&this.SM!==void 0){this.fa.log("TimeController","updateCurrentTime when can play through set time to: "+this.SM);try{this.fa.currentTime=this.SM}catch(c){}this.SM=void 0}};b.prototype.Nf=function(){this.o(new h(b.Dg))};b.prototype.K3=function(){if(g.VIa()&&!g.Egb()&&!this.fa.paused&&this.fa.readyState>=
this.fa.HAVE_ENOUGH_DATA){var c=(new Date).getTime();this.l2||(this.l2=c);this.oha&&c-this.oha>500&&(this.hla++,this.hla/((c-this.l2)*.001)>.4&&g.ylb());this.oha=c}if(this.hR!==void 0&&this.fa.currentTime>this.hR){this.hR=void 0;try{this.fa.currentTime-=.01}catch(d){}}this.Nf()};b.prototype.yka=function(c){!!this.AI!=c&&(this.AI?(clearInterval(this.AI),this.AI=null):this.AI=setInterval(this.Nf,16))};b.prototype.qM=function(){return this.fa.currentSrc||this.fa.children.length&&this.fa.children[0].src||
""};b.Dg="time update";b.Yj="duration update";return b}(n)});
define("tdv/view/av/DummyAudioData",["require","exports"],function(){var a={};a.src=a.$hb="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjM2LjEwMAAAAAAAAAAAAAAA//OEAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAEAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV6urq6urq6urq6urq6urq6urq6urq6urq6v////////////////////////////////8AAAAATGF2YzU2LjQxAAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs90hvAAAAAAAAAAAAAAAAAAAA//MUZAAAAAGkAAAAAAAAA0gAAAAATEFN//MUZAMAAAGkAAAAAAAAA0gAAAAARTMu//MUZAYAAAGkAAAAAAAAA0gAAAAAOTku//MUZAkAAAGkAAAAAAAAA0gAAAAANVVV";return a});
define("tdv/view/av/SrcSetter","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Capabilities tdv/player/view/util/URL tdv/player/view/util/Flags tdv/player/view/util/FileType tdv/player/view/util/LibsLoader tdv/view/av/DummyAudioData".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){a=function(p){function q(r,t){var u=p.call(this)||this;u.fa=r;u.rp=t;u.yha=!1;u.l5=[];u.aM=null;u.ef=null;u.ag=null;return u}P(q,p);q.prototype.set=function(r,t,u){this.fa.log("SrcSetter",
"set: "+r+" subtitles: "+t+" startTime: "+u);r=new l(r,t,u);this.ef&&this.ef.isEqual(r)||(!this.ef&&this.aM&&this.aM.isEqual(r)?this.Q5():(this.ef=r,this.f4a()))};q.prototype.clear=function(){this.ag&&(this.ag.destroy(),this.ag=null);this.aM=null;this.e7a();this.rp.clear()};q.prototype.Bgb=function(){return!!this.ef};q.prototype.f4a=function(){this.yha=!0;this.fEa(this.ef.src)&&!d.HLS.oj()?(this.fa.log("SrcSetter","hls lib required"),d.HLS.load(this.hAa,this)):this.hAa()};q.prototype.hAa=function(){this.yha&&
(this.yha=!1,this.aYa())};q.prototype.aYa=function(){this.clear();this.g8a(this.i7a(this.ef.src));this.fEa(this.ef.src)?this.PXa():this.Tga(this.ef.src)?this.bYa():this.cYa()};q.prototype.PXa=function(){var r=d.HLS.BP,t=navigator.connection,u=(t?Math.max(t.downlink,2):2)*1024*1024,v=u*.66;this.ag=new r({debug:b.uu,startPosition:this.ef.startTime===0?-1:this.ef.startTime,playlistLoadPolicy:{"default":{maxTimeToFirstByteMs:6E4,maxLoadTimeMs:6E4}},startLevel:-1,maxMaxBufferLength:12,autoStartLoad:!1,
abrEwmaDefaultEstimate:u});this.ag.loadSource(this.ef.src);this.ag.attachMedia(this.fa);var w=function(){this.ag.off(r.Events.MANIFEST_PARSED,w);var x=this.ag.levels.filter(function(z){return z.bitrate<=u});if(x.length){x.sort(function(z,A){return A.width-z.width});var y=this.ag.levels.indexOf(x[0]);this.ag.startLevel=y}x=this.ag.levels.filter(function(z){return z.bitrate<=v});x.length&&(x.sort(function(z,A){return A.width-z.width}),this.ag.config.minAutoBitrate=x[0].bitrate-1);x=this.ag.levels.filter(function(z){return k.Jmb(z.width,
z.height)});b.XUa&&(x.sort(function(z,A){return A.width-z.width}),y=this.ag.levels.indexOf(x[0]),this.ag.startLevel=y);x.length&&x.length<this.ag.levels.length&&(x.sort(function(z,A){return A.width-z.width}),this.ag.autoLevelCapping=this.ag.levels.indexOf(x[0]));this.fa.log("SrcSetter","bandwidth: "+u+" lowBandwidth: "+v);this.fa.log("SrcSetter","levels: "+this.ag.levels);this.fa.log("SrcSetter","startLevel: "+this.ag.levels[this.ag.startLevel]);this.fa.log("SrcSetter","minLevel: "+this.ag.levels[this.ag.minAutoLevel]);
this.ag.startLoad(this.ef.startTime===0?-1:this.ef.startTime);this.ef.startTime!=0&&this.Fv(this.ef.startTime);this.ef.Em&&this.rp.set(this.ef.Em);this.aM=this.ef;this.ef=null;this.Q5()}.bind(this);this.ag.on(r.Events.MANIFEST_PARSED,w);this.ag.on(r.Events.Eob,function(x,y){y.fatal&&y.type==r.ErrorTypes.Kob&&this.ag.recoverMediaError()}.bind(this))};q.prototype.cYa=function(){this.ef.src?this.Fva(this.ef.src):this.Fva(f.$hb,"audio/mpeg");this.ef.Em&&this.rp.set(this.ef.Em);this.fa.load();this.ef.startTime!=
0&&this.Fv(this.ef.startTime);this.aM=this.ef;this.ef=null;this.Q5()};q.prototype.bYa=function(){this.fa.srcObject=this.ef.src;this.aM=this.ef;this.ef=null;this.Q5()};q.prototype.Q5=function(){this.fa.log("SrcSetter","src ready");this.o(new n(h.vd))};q.prototype.fEa=function(r){return!!r&&!this.Tga(r)&&c.is(r,c.HLS)&&!k.mMa};q.prototype.i7a=function(r){return!!r&&!this.Tga(r)&&e.apa(r)};q.prototype.g8a=function(r){r&&!this.fa.hasAttribute("crossorigin")?this.fa.setAttribute("crossorigin","anonymous"):
!r&&this.fa.hasAttribute("crossorigin")&&this.fa.removeAttribute("crossorigin")};q.prototype.Tga=function(r){return r instanceof MediaStream};q.prototype.Fv=function(r){try{this.fa.currentTime=r}catch(t){}};q.prototype.Fva=function(r,t){t===void 0&&(t=void 0);var u=document.createElement("source");t||(t=this.L2a(r));t&&(u.type=t);e.iE(r)||(r=e.MD(r,"swbypass=true"));u.src=r;this.fa.appendChild(u);this.l5.push(u)};q.prototype.e7a=function(){for(;this.l5&&this.l5.length;){var r=this.l5.shift();r.src=
"";this.fa.removeChild(r)}this.fa.srcObject=null};q.prototype.L2a=function(r){switch(e.getExtension(r).toLowerCase()){case ".mp3":return"audio/mpeg";case ".ogg":return"audio/ogg";case ".m4v":case ".mp4":return"video/mp4";case ".webm":return"video/webm";case ".ogv":return"video/ogg";case ".m3u8":return"application/x-mpegURL";case ".mov":return"video/quicktime"}};return q}(g);var l=function(){function p(q,r,t){this.src=q||"";this.Em=r||"";this.startTime=t||0}p.prototype.isEqual=function(q){return this.src==
q.src&&this.Em==q.Em};return p}();return a});
define("tdv/view/av/HTMLMediaPlayer","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Flags tdv/view/util/AudioActivation tdv/view/util/UserInitiatedAction tdv/view/av/AudioController tdv/view/av/MediaType tdv/view/av/PlaybackController tdv/view/av/TextTracksController tdv/view/av/TimeController tdv/view/av/SrcSetter".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){function t(v){setTimeout(v,0)}var u=0;return function(v){function w(x,
y){var z=v.call(this)||this;z.Qf=x;z.pbb=y;z.gl=z.gl.bind(z);z.Mu=z.Mu.bind(z);z.yia=z.yia.bind(z);z.uC=null;z.yq=null;z.Z3=void 0;z.Gb=null;z.xo="inactive";z.rp=null;z.Lz=null;z.Fd=null;z.Ua=null;z.Qq=null;z.Ff=!1;z.lFa(document.createElement(z.Qf));y&&c.wait(z.Mu);return z}P(w,v);w.prototype.lFa=function(x){this.RFa();this.cd=x;for(this.cd.parentNode&&this.cd.parentNode.removeChild(this.cd);this.cd.children.length;)this.cd.removeChild(this.cd.children[0]);this.q9a();this.cd.setAttribute("autoplay",
"false");this.cd.setAttribute("preload",k.Yb()==k.sj?"metadata":"none");this.cd.setAttribute("webkit-playsinline","true");this.cd.setAttribute("playsinline","true");this.cd.addEventListener("loadedmetadata",this.gl,!0);this.rp=new p(this.cd);this.rp.bind(h.Al,this.Fj,this,!0);this.Lz=new r(this.cd,this.rp);this.Lz.bind(h.vd,this.UCa,this,!0);this.Fd=new d(this.cd);this.Ua=new l(this.cd);this.Ua.bind(l.dba,this.uBa,this,!0);this.Ua.bind(l.Bl,this.hn,this,!0);this.Ua.bind(l.Aba,this.wq,this,!0);this.Qq=
new q(this.cd);this.Qq.bind(q.Dg,this.Nf,this,!0);this.Qq.bind(q.Yj,this.$o,this,!0)};w.prototype.q9a=function(){if(e.uu){var x="["+this.Qf+" "+u++ +"]";this.cd.log=function(y,z){console.log(x+"["+(new Date).toISOString().split("T")[1]+"] "+y+" "+z)}}else this.cd.log=function(){}};w.prototype.RFa=function(){this.cd&&(this.cd.removeEventListener("loadedmetadata",this.gl,!0),this.Lz&&(this.Lz.h(h.vd,this.UCa,this),this.Lz.clear(),this.Lz=null),this.rp&&(this.rp.h(h.Al,this.Fj,this),this.rp.clear(),
this.rp=null),this.Fd&&(this.Fd.clear(),this.Fd=null),this.Ua&&(this.Ua.h(l.dba,this.uBa,this),this.Ua.h(l.Bl,this.hn,this),this.Ua.h(l.Aba,this.wq,this),this.Ua.clear(),this.Ua=null),this.Qq&&(this.Qq.h(q.Dg,this.Nf,this),this.Qq.h(q.Yj,this.$o,this),this.Qq.clear(),this.Qq=null))};w.prototype.clear=function(){this.RFa()};w.prototype.TO=function(x,y,z){if(this.Mn()&&this.AJ())try{return x.drawImage(this.cd,0,0,y,z),!0}catch(A){}x.fillRect(0,0,y,z);return!1};w.prototype.play=function(x,y,z){this.cd.log("HTMLMediaPlayer",
"play src: "+y.src+" subtitlesSrc: "+y.Em+" hasAudio: "+y.gE+" gain: "+y.gain+" ambisonic: "+y.lt);this.Gb=x;this.uC=null;this.yq=y.clone();this.Z3=z||0;this.FXa()};w.prototype.u8=function(){return this.xo=="activated"};w.prototype.zaa=function(){return this.pbb};w.prototype.stop=function(){this.cd.log("HTMLMediaPlayer","stop");this.Ua.stop();this.yq=null};w.prototype.getState=function(){return this.Ua.getState()};w.prototype.AJ=function(){return this.Lz.Bgb()?!1:this.Ua.AJ()};w.prototype.Bg=function(x){this.Fd.Bg(x);
this.Ff=x;this.Gb&&this.xo=="requested"&&(this.Ff?b.cancel(this.Gb):b.request(this.Gb))};w.prototype.iB=function(x){this.Fd.iB(x)};w.prototype.RY=function(x){this.Fd.RY(x)};w.prototype.bu=function(x){this.Fd.bu(x)};w.prototype.Tw=function(x){this.Fd.Tw(x)};w.prototype.VY=function(x){this.Fd.VY(x)};w.prototype.setLoop=function(x){this.XXa(x)};w.prototype.getCurrentTime=function(){return this.Qq.getTime()};w.prototype.setCurrentTime=function(x){return this.Qq.setTime(x)};w.prototype.lj=function(){return this.Qq.lj()};
w.prototype.Mn=function(){return this.Qf==f.Wp};w.prototype.getType=function(){return this.Qf};w.prototype.fg=function(){return this.cd&&this.Mn()&&this.cd.videoWidth||0};w.prototype.wg=function(){return this.cd&&this.Mn()&&this.cd.videoHeight||0};w.prototype.cP=function(){return this.rp.cP()};w.prototype.FXa=function(){this.cd.log("HTMLMediaPlayer","assert can play");this.xo=="activated"||!this.yq.gE||this.yq.gain==0||this.Ff?(this.cd.log("HTMLMediaPlayer","can play activationState: "+this.xo+" pending media has audio: "+
this.yq.gE+" muted: "+this.Ff),this.KH()):this.xo=="inactive"&&(this.cd.log("HTMLMediaPlayer","needs activation"),this.Gb&&this.Qf==f.Wp&&this.P2a()?this.WWa():this.Gb&&c.z8()?this.Mu():this.Gb&&this.EXa())};w.prototype.P2a=function(){var x=this.oya();return!x||x.currentSrc&&!x.paused||x.muted?!1:!0};w.prototype.oya=function(){return this.Gb.get("settings").get(TDV.PlayerSettings.ACTIVE_VIDEO_ELEMENT)};w.prototype.WWa=function(){this.cd.log("HTMLMediaPlayer","activate with application parameter");
this.lFa(this.oya());this.Mu()};w.prototype.EXa=function(){this.cd.log("HTMLMediaPlayer","ask for activation");this.xo="requested";b.Qsa(this.Mu);this.Gb&&!this.Ff&&b.request(this.Gb)};w.prototype.Mu=function(){if(this.xo=="inactive"||this.xo=="requested")this.cd.log("HTMLMediaPlayer","activate received when state: "+this.xo+" and has media: "+!!this.uC),this.uC?t(function(){c.wait(this.Mu)}.bind(this)):(this.xo="activating",this.Lz.set("","",0))};w.prototype.KH=function(){this.cd.log("HTMLMediaPlayer",
"media can play. Has pending properties: "+!!this.yq);this.yq&&this.Lz.set(this.yq.src,this.yq.Em,this.Z3)};w.prototype.UCa=function(){this.xo=="activating"?this.I5a():this.yq&&this.q5a()};w.prototype.I5a=function(){this.cd.log("HTMLMediaPlayer","on src ready activating");this.Ua.play()};w.prototype.wq=function(){this.xo=="activating"&&(this.cd.log("HTMLMediaPlayer","on play activating"),this.Ua.stop(),this.xo="activated",this.KH())};w.prototype.q5a=function(){this.cd.log("HTMLMediaPlayer","on pending src ready");
this.uC=this.yq;this.yq=null;this.QXa(this.uC.gE);this.OXa(this.uC.gain);this.HXa(this.uC.lt);this.KXa(this.uC.TW);this.Qq.setTime(this.Z3);this.Z3=void 0;this.Ua.play()};w.prototype.QXa=function(x){this.Fd.Dkb(x)};w.prototype.OXa=function(x){this.Fd.VY(x)};w.prototype.HXa=function(x){this.Fd.RY(x)};w.prototype.KXa=function(x){this.Fd.pkb(x)};w.prototype.XXa=function(x){x&&!this.cd.hasAttribute("loop")?this.cd.setAttribute("loop",""):!x&&this.cd.hasAttribute("loop")&&this.cd.removeAttribute("loop")};
w.prototype.uBa=function(){this.cd.log("HTMLMediaPlayer","on deactivated");b.rlb();c.wait(this.yia);this.Gb&&t(function(){b.request(this.Gb)}.bind(this))};w.prototype.yia=function(){this.cd.log("HTMLMediaPlayer","on reactivated");this.Ua.play()};w.prototype.Fj=function(){this.o(h.Al,this.rp.cP())};w.prototype.gl=function(){this.o(new n(w.FUa))};w.prototype.Nf=function(){this.o(new n(w.Dg))};w.prototype.$o=function(){this.o(new n(w.Yj))};w.prototype.hn=function(){this.o(new n(w.Bl))};w.Dg="time update";
w.Yj="duration update";w.FUa="size update";w.Bl="end";return w}(g)});define("tdv/view/av/Subtitle",["require","exports"],function(){return function(){return function(a){this.cue=a;this.text=a.text}}()});
define("tdv/view/av/AVProperties",["require","exports"],function(){return function(){function a(){this.Em=this.src=void 0;this.gE=!1;this.gain=1;this.TW=this.lt=!1}a.prototype.clone=function(){var m=new a;m.src=this.src;m.Em=this.Em;m.gE=this.gE;m.gain=this.gain;m.lt=this.lt;m.TW=this.TW;return m};return a}()});
define("tdv/view/av/SharedPlayerOrchestrator","require exports tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/av/HTMLMediaPlayer tdv/view/av/MediaType".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){var l=function(){function q(r){this.Wx=r;this.Ja=null;this.pha=Date.now()}q.prototype.cpa=function(){return this.Ja==null};q.prototype.u8=function(){return this.Wx.u8()};
q.prototype.zaa=function(){return this.Wx.zaa()};q.prototype.item=function(){return this.Ja};q.prototype.Jeb=function(){this.Ja.nNa();this.Ja=null};q.prototype.use=function(r){this.Ja=r;this.Ja.rKa(this.Wx);this.pha=Date.now()};return q}();a=function(q){function r(){var t=q.call(this)||this;t.Iv=[];var u=c.nLa("avs",10);var v=b.xc()==b.zB?10:e.xcb()?4:1;v=c.nLa("avpas",v);for(var w=0;w<u;w++)t.Iv.push(new l(new d(f.Wp,w<v)));t.Gf=[];t.I=n.ca;return t}P(r,q);r.prototype.sP=function(){return this.kza().length>
0};r.prototype.X9=function(t){this.Gf=[t].concat(this.Gf.filter(function(u){return u!==t}));this.Zia();p()};r.prototype.appendItem=function(t){this.Gf.push(t);this.Zia();p()};r.prototype.vY=function(t){this.Gf=this.Gf.filter(function(u){return u!==t});this.Zia()};r.prototype.Zia=function(){var t=this.o2a();if(r.Nua)for(;this.Iv.length<t.length;)this.Iv.push(new l(new d(f.Wp,!1)));this.kza().forEach(function(u){t.indexOf(u.item())<0&&u.Jeb()});this.Jd(t.length>0?n.PLAYING:n.ca);t.forEach(function(u){if(!this.N1a(u)){var v=
this.E1a(u.getType(),u.Nqa());v||u.Nqa()||this.Iv.push(v=new l(new d(f.Wp,!1)));v&&v.use(u)}}.bind(this));this.F1a().forEach(function(u){u.Wx.stop()})};r.prototype.o2a=function(){return this.Gf.map(function(t,u){var v={};v.index=u;v.priority=t.FLa();v.item=t;return v}).sort(function(t,u){return t.priority-u.priority||t.index-u.index}).map(function(t){return t.item})};r.prototype.Jd=function(t){this.I!=t&&(this.I=t,this.o(new g(this.I==n.ca?h.Fg:h.Up)))};r.prototype.E1a=function(t,u){t=this.Iv.filter(function(v){return v.cpa()});
return t.length?(u?(u=t.filter(function(v){return v.u8()}),u.length||(u=t.filter(function(v){return v.zaa()}))):(u=t.filter(function(v){return!v.zaa()}),u.length||(u=t.filter(function(v){return!v.u8()}))),u.length&&(t=u),b.Yb()==b.Nk?(t.sort(function(v,w){return w.pha-v.pha}),t[Math.min(2,t.length-1)]):t[0]):null};r.prototype.F1a=function(){return this.Iv.filter(function(t){return t.cpa()})};r.prototype.kza=function(){return this.Iv.filter(function(t){return!t.cpa()})};r.prototype.N1a=function(t){for(var u=
0;u<this.Iv.length;u++)if(this.Iv[u].item()==t)return this.Iv[u];return null};r.bind=function(){var t=r.Bj();t.bind.apply(t,arguments)};r.h=function(){var t=r.Bj();t.h.apply(t,arguments)};r.sP=function(){return r.Bj().sP()};r.appendItem=function(t){r.Bj().appendItem(t)};r.X9=function(t){r.Bj().X9(t)};r.vY=function(t){r.Bj().vY(t)};r.Bj=function(){return this.Qo};r.Qo=new r;r.Nua=[b.yB,b.su].indexOf(b.xc())>=0;return r}(k);var p=function(){if([b.yB,b.su].indexOf(b.xc())>=0){var q=document.createElement("video");
q.muted=!1;q.setAttribute("loop","");q.src="data:video/mp4;base64, ";
return function(){try{q.pause(),setTimeout(function(){q.play()["catch"](function(){})},0)}catch(r){}}}return function(){}}();return a});
define("tdv/view/av/AudioPlayer","require exports tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/view/av/HTMLMediaPlayer tdv/view/av/Subtitle tdv/view/av/AVProperties tdv/view/av/MediaType tdv/view/av/SharedPlayerOrchestrator tdv/view/util/Animation tdv/player/view/util/Capabilities".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p){return function(q){function r(t,u,v,w){var x=q.call(this)||this;x.Gb=t;x.C=u;x.NR=v;x.yv=w;x.mV();x.h3=x.h3.bind(x);
x.C.bind(g.L("gain"),x.OH,x,!0);x.C.bind(g.L("ambisonic"),x.JH,x,!0);x.C.bind(g.L("mp3Url"),x.mk,x,!0);x.C.bind(g.L("oggUrl"),x.mk,x,!0);x.C.bind(g.L("subtitlesURL"),x.mk,x,!0);x.C.bind(g.L("url"),x.mk,x,!0);x.I=k.ca;x.Pl=!1;x.ac=0;x.qC=0;x.Ff=!1;x.jt=1;x.gq=null;x.Vx=null;x.cS=!1;x.jM=1;x.Vc=null;x.bq=[];return x}P(r,q);r.prototype.Vb=function(){return this.Gb};r.prototype.Zc=function(t){this.I==t||t==k.Zb&&this.I!=k.PLAYING||(this.I=t,this.I==k.PLAYING?(this.XYa(),f.X9(this)):this.D9a(),this.wla())};
r.prototype.D9a=function(){this.cS||(this.cS=!0,this.bya=this.C.get("fadeOutTime"),this.bya==0?this.JFa():this.h3(0))};r.prototype.h3=function(t){this.Vc&&this.jM!=0&&this.cS&&!this.A3a()?(this.jM=Math.max(0,this.jM-t/this.bya),this.U_(),l.requestFrame(this.h3)):this.JFa()};r.prototype.XYa=function(){this.cS=!1;this.jM=1;this.U_()};r.prototype.JFa=function(){this.cS=!1;this.jM=1;this.Vc&&(f.vY(this),this.I==k.ca&&this.xka())};r.prototype.getState=function(){return this.I};r.prototype.lj=function(){return this.ac};
r.prototype.setCurrentTime=function(t){this.qC=t;this.Vc&&this.Vc.play(this.Gb,this.A,this.qC)};r.prototype.getCurrentTime=function(){return this.qC};r.prototype.iB=function(t){this.jt=t;this.U_()};r.prototype.U_=function(){this.Vc&&this.Vc.iB(this.jt*this.jM)};r.prototype.bu=function(t){this.Vc?this.Vc.bu(t):this.gq=(t===null||t===void 0?void 0:t.clone())||null};r.prototype.Tw=function(t){this.Vc?this.Vc.Tw(t):this.Vx=(t===null||t===void 0?void 0:t.clone())||null};r.prototype.Bg=function(t){this.Ff=
t;this.Vc&&this.Vc.Bg(t)};r.prototype.setLoop=function(t){this.Pl=t;this.Vc&&this.Vc.setLoop(t)};r.prototype.Nqa=function(){return!this.Ff};r.prototype.getType=function(){return d.aUa};r.prototype.FLa=function(){return this.yv};r.prototype.rKa=function(t){this.Vc=t;setTimeout(function(){this.Vc&&this.Vc.bind(e.Bl,this.HT,this,!0)}.bind(this),0);this.mV();this.Vc.bind(e.Dg,this.Nf,this,!0);this.Vc.bind(e.Yj,this.$o,this,!0);this.Vc.bind(g.Al,this.Fj,this,!0);this.Vc.Bg(this.Ff);this.U_();this.Vc.setLoop(this.Pl);
this.Vc.Tw(this.Vx);this.Vc.bu(this.gq);this.Vc.play(this.Gb,this.A,this.qC)};r.prototype.nNa=function(){this.qC=this.Vc.getCurrentTime();this.Vc.h(e.Bl,this.HT,this);this.Vc.h(e.Dg,this.Nf,this);this.Vc.h(e.Yj,this.$o,this);this.Vc.h(g.Al,this.Fj,this);this.Vc=null};r.prototype.clear=function(){this.Zc(k.ca);this.C&&(this.C.h(g.L("gain"),this.OH,this),this.C.h(g.L("ambisonic"),this.JH,this),this.C.h(g.L("mp3Url"),this.mk,this),this.C.h(g.L("oggUrl"),this.mk,this),this.C.h(g.L("subtitlesURL"),this.mk,
this),this.C.h(g.L("url"),this.mk,this),this.C=null)};r.prototype.mk=function(){var t=this;this.hI&&clearTimeout(this.hI);this.hI=setTimeout(function(){t.hI=null;t.Vc&&(t.A.src=t.qM(t.C),t.A.Em=t.C.get("subtitlesURL"),t.Vc.play(t.Gb,t.A,t.qC))},10)};r.prototype.OH=function(){if(this.Vc){var t=this.C.get("gain");this.A.gain!=t&&(this.A.gain=t,this.Vc.VY(this.A.gain))}};r.prototype.JH=function(){if(this.Vc){var t=this.C.get("ambisonic")=="foa";this.A.lt!=t&&(this.A.lt=t,this.Vc.RY(this.A.lt))}};r.prototype.mV=
function(){this.A=new c;this.A.src=this.qM(this.C);this.A.Em=this.C.get("subtitlesURL");this.A.gE=!0;this.A.gain=this.C.get("gain");this.A.lt=this.C.get("ambisonic")=="foa";this.A.TW=this.NR};r.prototype.qM=function(t){var u=t.get("url");if(u)return u;var v=t.get("mp3Url");return v&&p.zMa?v:(t=t.get("oggUrl"))&&p.AMa?t:u||v||t};r.prototype.$o=function(){this.ac=this.Vc.lj();this.rla()};r.prototype.Nf=function(){this.ac!=this.Vc.lj()&&this.$o();this.qC=this.Vc.getCurrentTime();this.WV()};r.prototype.Fj=
function(){var t=this;this.bq=this.Vc.cP().map(function(u){for(var v=null,w=0;w<t.bq.length&&!v;w++)t.bq[w].cue==u&&(v=t.bq[w]);v||(v=new b(u));return v});this.o(new h(g.Al))};r.prototype.HT=function(){this.Zc(k.ca);this.sla()};r.prototype.A3a=function(){return this.Vc&&this.Vc.getCurrentTime()&&this.Vc.getCurrentTime()==this.Vc.lj()};r.prototype.xka=function(){this.qC=0;this.WV()};r.prototype.WV=function(){this.o(new h(r.Dg))};r.prototype.rla=function(){this.o(new h(r.Yj))};r.prototype.sla=function(){this.o(new h(g.Tb))};
r.prototype.wla=function(){this.o(new h(g.Pd))};r.Dg="time update";r.Yj="duration update";return r}(n)});
define("tdv/view/av/SubtitleController",["require","exports","tdv/constants/EventName"],function(a,m,h){return function(){function n(g,k){this.V_=g;this.Wx=k;this.Mca=[];this.pYa();this.Fj()}n.prototype.clear=function(){this.lZa();this.R$a();this.Wx=this.V_=null};n.prototype.pYa=function(){var g;(g=this.Wx)===null||g===void 0||g.bind(h.Al,this.Fj,this,!0)};n.prototype.R$a=function(){var g;(g=this.Wx)===null||g===void 0||g.h(h.Al,this.Fj,this)};n.prototype.Fj=function(){var g,k;(g=this.V_)===null||
g===void 0||g.set("activeSubtitles",this.Mca=((k=this.Wx)===null||k===void 0?void 0:k.bq)||[])};n.prototype.lZa=function(){var g,k;((g=this.V_)===null||g===void 0?void 0:g.get("activeSubtitles"))!=this.Mca||(k=this.V_)!==null&&k!==void 0&&k.set("activeSubtitles",this.Mca=[])};return n}()});
define("tdv/player/script/Audio","require exports tdv/constants/EventName tdv/constants/Priority tdv/constants/PlaybackState tdv/binding/Bindable tdv/events/Event tdv/player/parser/ClassInfo tdv/view/av/AudioPlayer tdv/view/av/SubtitleController".split(" "),function(a,m,h,n,g,k,e,b,c,d){a=function(f){function l(p){var q=f.call(this)||this;q.yv=p||n.eWa;q.fq=void 0;q.xn=null;q.play=q.play;q.stop=q.stop;q.pause=q.pause;return q}P(l,f);l.prototype.qJ=function(){if(this.fq==void 0){this.xn&&(this.xn.clear(),
this.xn=null);var p=this.get("audio");p?(this.fq=new c(this.get("application"),p,b.Oa("DirectionalPanoramaAudio",this),this.yv),p=function(){this.fq.setLoop(this.get("loop",!1))},p.call(this),this.bind(h.L("loop"),p,this,!1),p=function(){this.fq.Bg(this.get("application").get("mute",!1))},p.call(this),this.get("application").bind(h.L("mute"),p,this,!0),p=function(){this.set("state",this.fq.getState())},p.call(this),this.fq.bind(h.Pd,p,this,!0),this.fq.bind(h.Tb,this.K4a,this,!0),this.xn=new d(this,
this.fq)):this.fq=null}return this.fq};l.prototype.set=function(p,q){switch(p){case "state":var r=this.get("state")||g.ca,t=this.fq&&this.fq.getState()||g.ca;t!=r&&(r==g.ca&&t==g.PLAYING&&this.o(h.Up),this.o(new e(h.Pd,{oldState:r,state:t})));break;case "subtitlesViewerArea":(r=k.prototype.get.call(this,p))&&r.B5.remove(this),q&&q.B5.add(this)}f.prototype.set.call(this,p,q)};l.prototype.rw=function(){return[]};l.prototype.K4a=function(){this.o(new e(h.Tb))};l.prototype.play=function(){var p=this.qJ();
p&&p.Zc(g.PLAYING)};l.prototype.stop=function(){var p=this.qJ();p&&p.Zc(g.ca)};l.prototype.pause=function(){var p=this.qJ();p&&p.Zc(g.Zb)};return l}(k);b.create("Audio",a);return a});define("tdv/player/script/MediaAudio",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/Audio"],function(a,m,h,n){a=function(g){function k(e){return g.call(this,e)||this}P(k,g);return k}(n);h.create("MediaAudio",a);return a});
define("tdv/player/script/PanoramaAudio",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio","tdv/constants/Priority"],function(a,m,h,n,g){a=function(k){function e(){return k.call(this,g.CVa)||this}P(e,k);return e}(n);h.create("PanoramaAudio",a);return a});
define("tdv/player/script/DirectionalPanoramaAudio",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaAudio"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(n);h.create("DirectionalPanoramaAudio",a);return a});
define("tdv/player/script/Model3DCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DCameraMovement",m,function(){m.call(this)})});
define("tdv/player/script/DistanceModel3DCameraMovement",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCameraMovement"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCameraMovement");return m.define("DistanceModel3DCameraMovement",h,function(){h.call(this)})});
define("tdv/player/script/DistancePanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("DistancePanoramaCameraMovement",m,function(){m.call(this)})});
define("tdv/player/script/DistanceRotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("DistanceRotationalCameraMovement",m,function(){m.call(this)})});
define("tdv/binding/ChangeWatcher",["require","exports","tdv/constants/EventName","tdv/utils"],function(a,m,h,n){return function(){function g(k,e,b,c,d){this.ps=null;this.Xha=k;this.$f=h.L(this.Xha);this.bga=e;this.ga=b||window;this.Bga=c;this.OAa=d;this.Oga=!1}g.prototype.hF=function(){this.Xja(null)};g.prototype.Xja=function(k){var e=this;n.toArray(this.ps).forEach(function(b){b&&b.h(this.$f,e.Cwa,e)}.bind(this));this.ps=k;n.toArray(this.ps).forEach(function(b){b&&b.bind(this.$f,this.Cwa,e,e.Bga)}.bind(this));
this.gEa()};g.prototype.gEa=function(){this.OAa&&this.OAa.Xja(this.K1a())};g.prototype.K1a=function(){return this.ps==null?null:Array.isArray(this.ps)?this.ps.map(function(k){return k?k.get(this.Xha):null}.bind(this)):this.ps.get(this.Xha)};g.prototype.Cwa=function(k){if(!this.Oga){try{this.Oga=!0,this.gEa(),this.bga.call(this.ga,k)}catch(e){n.TX("ChangeWatcher._changeHandler",e)}this.Oga=!1}};g.jx=function(k,e,b,c,d){d===void 0&&(d=!1);n.EA(e)&&(e=e.split("."));return e.length>0?(e=new g(e[0],b,
c,d,g.jx(null,e.slice(1),b,c,d)),e.Xja(k),e):null};return g}()});
define("tdv/view/list/dropdown/DropDownArrow",["require","exports","tdv/view/canvas/Canvas"],function(a,m,h){return function(n){function g(){var k=n.call(this)||this;k.gf("DropDownArrow");return k}P(g,n);g.prototype.Pb=function(){n.prototype.Pb.call(this);this.m("color","#000000");this.m("direction",g.Uaa)};g.prototype.jb=function(){this.ada(["color","direction"])&&(this.$("color"),this.$("direction"),this.LX());n.prototype.jb.call(this)};g.prototype.tsa=function(){var k=this.u.canvas.width,e=this.u.canvas.height,
b=this.G("color"),c=this.G("direction"),d=[k*.5,0,k];c=c==g.Uaa?[e,0,0]:[0,e,e];var f=this.cLa();f.clearRect(0,0,k,e);f.beginPath();f.moveTo(d[0],c[0]);f.lineTo(d[1],c[1]);f.lineTo(d[2],c[2]);f.fillStyle=b;f.fill();n.prototype.tsa.call(this)};g.Uaa="down";return g}(h)});
define("tdv/view/list/dropdown/DropDownButton","require exports tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/Cursor tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/State tdv/view/containers/Container tdv/view/list/dropdown/DropDownArrow tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(){var q=l.call(this)||this;q.gf("DropDownButton");q.Za=null;q.$B=null;q.jha=!0;q.set("ariaRole","dropdown");q.set("autoRolledOver",
!0);q.set("autoPressed",!0);q.set("childrenInteractionEnabled",!1);q.set("contentOpaque",!0);q.set("cursor",g.qf);q.bind(k.ma,q.Uea,q,!1);return q}P(p,l);p.prototype.Pb=function(){l.prototype.Pb.call(this);this.m("arrowColor","#000000");this.m("arrowBeforeLabel");this.m("arrowWidth",9);this.m("arrowHeight",5);this.m("arrowGap",5);this.m("shadow",!1);this.m("layout",e.Mi);this.m("verticalAlign",n.$d);this.m("borderRadius",5);this.m("borderColor","#AAAAAA");this.m("borderSize",1);this.m("backgroundColor",
["#FAFAFA","#E5E5E5"]);this.m("backgroundColorRatios",[0,1]);this.m("backgroundColorDirection","vertical");this.m("paddingLeft",5);this.m("paddingTop",5);this.m("paddingRight",5);this.m("paddingBottom",5);this.m("fontFamily");this.m("fontSize");this.m("fontColor","#555555");this.m("fontWeight");this.m("fontStyle");this.m("textDecoration");this.m("textShadowColor");this.m("textShadowHorizontalLength");this.m("textShadowVerticalLength");this.m("textShadowBlurRadius");this.m("textShadowOpacity");this.D("rollOverBorderColor",
b.ea,"borderColor");this.D("rollOverArrowColor",b.ea,"arrowColor");this.D("rollOverBackgroundColor",b.ea,"backgroundColor");this.D("rollOverBackgroundColorRatios",b.ea,"backgroundColorRatios");this.D("rollOverShadow",b.ea,"shadow");this.D("pressedBorderColor",b.Fb,"borderColor");this.D("pressedArrowColor",b.Fb,"arrowColor");this.D("pressedBackgroundColor",b.Fb,"backgroundColor");this.D("pressedBackgroundColorRatios",b.Fb,"backgroundColorRatios");this.D("pressedShadow",b.Fb,"shadow");this.D("pressedRollOverBorderColor",
b.qc,"borderColor");this.D("pressedRollOverArrowColor",b.qc,"arrowColor");this.D("pressedRollOverBackgroundColor",b.qc,"backgroundColor");this.D("pressedRollOverBackgroundColorRatios",b.qc,"backgroundColorRatios");this.D("pressedRollOverShadow",b.qc,"shadow");this.D("pressedBorderColor",b.oa,"borderColor");this.D("pressedArrowColor",b.oa,"arrowColor");this.D("pressedBackgroundColor",b.oa,"backgroundColor");this.D("pressedBackgroundColorRatios",b.oa,"backgroundColorRatios");this.D("pressedShadow",
b.oa,"shadow")};p.prototype.set=function(q,r){q=="label"&&this.get("label")!=r&&(this.jha=!0,this.Tf());l.prototype.set.call(this,q,r)};p.prototype.Kb=function(){l.prototype.Kb.call(this);this.Za||(this.Za=new f,this.Za.set("width","100%"),this.mb(this.Za));this.$B||(this.$B=new d,this.$B.set("direction",d.Uaa),this.mb(this.$B))};p.prototype.Uea=function(){this.open();this.o(new h(k.OPEN))};p.prototype.open=function(){this.h(k.ma,this.Uea,this);this.hV(!0)};p.prototype.close=function(){this.bind(k.ma,
this.Uea,this,!1);this.hV(!1)};p.prototype.Ux=function(){return this.Za&&this.Za.get("text")||l.prototype.Ux.call(this)};p.prototype.jb=function(){if(this.jha){var q=this.get("label");this.Za.set("text",q);this.jha=!1}this.Oc("horizontalAlign fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),{},[this.Za],!0,!0);this.S("arrowGap")&&(this.set("gap",this.G("arrowGap")),
this.$("arrowGap"));this.S("arrowColor")&&(this.$B.set("color",this.G("arrowColor")),this.$("arrowColor"));this.S("arrowBeforeLabel")&&(this.G("arrowBeforeLabel")==1?this.qr(this.$B,0):this.qr(this.Za,0),this.$("arrowBeforeLabel"));this.S("arrowWidth")&&(this.$B.set("width",this.G("arrowWidth")),this.$("arrowWidth"));this.S("arrowHeight")&&(this.$B.set("height",this.G("arrowHeight")),this.$("arrowHeight"));l.prototype.jb.call(this)};return p}(c)});
define("tdv/view/list/dropdown/DropDownPopup","require exports tdv/player/view/util/Device tdv/events/Event tdv/view/constants/Alignment tdv/view/constants/Cursor tdv/view/constants/OverflowPolicy tdv/constants/EventName tdv/view/containers/Container tdv/view/containers/VerticalContainer tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(q){var r=l.call(this)||this;r.tda=!1;r.Wb=null;r.YS=[];r.CD=!0;r.T4=!1;r.je=q;r.gf("DropDownPopup");r.set("ariaRole","listbox");
return r}P(p,l);p.prototype.vLa=function(){return this.Wb.Cb()};p.prototype.open=function(){this.yG=this.VKa();this.tda=!0;this.yG.mb(this);this.set("overIndex",-1);this.set("visible",!0);this.bind(b.Sa,this.te,this,!1);this.yG.bind(b.$a,this.mv,this,!1);this.yG.bind(b.$b,this.kd,this,!1)};p.prototype.close=function(){this.set("visible",!1);this.Wb.set("overflow",e.lL);this.Wb.set("contentOpaque",!0);this.h(b.Sa,this.te,this);this.yG.h(b.$a,this.mv,this);this.yG.bind(b.$b,this.kd,this,!1);this.yG.removeChild(this);
this.yG=null};p.prototype.Kb=function(){c.prototype.Kb.call(this);this.Wb||(this.Wb=new d,this.Wb.set("overflow",e.lL),this.Wb.bind(b.$b,this.kd,this,!1),this.Wb.bind(b.Vr,this.tD,this,!1),this.mb(this.Wb))};p.prototype.VKa=function(){for(var q=this.je.getParent();q.getParent();)q=q.getParent();return q};p.prototype.kd=function(){this.aHa()};p.prototype.te=function(){this.T4=!1};p.prototype.tD=function(){this.T4=!0};p.prototype.mv=function(){this.get("overIndex")!=-1||this.T4&&h.Jp()||this.o(new n(b.CB));
this.T4=!1};p.prototype.$4a=function(q){this.set("overIndex",this.Ufa(q.source))};p.prototype.a5a=function(q){q=this.Ufa(q.source);this.get("overIndex")==q&&this.set("overIndex",-1)};p.prototype.Z4a=function(q){q=this.Ufa(q.source);this.set("overIndex",q);this.set("selectedIndex",q);this.o(new n(b.Wr))};p.prototype.Ufa=function(q){for(var r=0;r<this.YS.length;r++)if(this.YS[r]==q)return r;return-1};p.prototype.Pb=function(){this.Il(p.ad)};p.prototype.r2a=function(q){var r;for(r=q;r.getParent();r=
r.getParent());q=q.wa().GLa(r.wa());if(r=this.je.Vb())q.left/=r.fD,q.top/=r.fD;return q};p.prototype.jb=function(){var q=!1,r=!1;if(this.S("items")){q=this.G("items")||[];for(var t=this.YS.length;t<q.length;t++){var u=new f;u.xa({width:"100%",paddingLeft:5,paddingRight:5,paddingBottom:2,paddingTop:2,cursor:k.qf});u.bind(b.SF,this.$4a,this,!1);u.bind(b.Pr,this.a5a,this,!1);u.bind(b.ma,this.Z4a,this,!1);this.YS.push(u)}u=this.Wb.Cb();for(t=q.length;t<u.length;t++)this.Wb.removeChild(u[t]);for(t=u.length;t<
q.length;t++)this.Wb.mb(this.YS[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.Wb.Cb(),t=0;t<u.length;t++)u[t].xa(r);r="selectedIndex overIndex popUpBackgroundColor rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor".split(" ");for(t=0;t<r.length;t++)u=
r[t],this.S(u)&&(this.$(u),q=!0);if(q){q=this.G("popUpBackgroundColor");r=this.G("rollOverPopUpBackgroundColor")||q;v=this.G("selectedPopUpBackgroundColor")||q;var w=this.G("popUpFontColor"),x=this.G("rollOverPopUpFontColor")||w,y=this.G("selectedPopUpFontColor")||w,z=this.G("selectedIndex"),A=this.G("overIndex");u=this.Wb.Cb();for(t=0;t<u.length;t++)t==z?u[t].xa({fontColor:y,backgroundColor:v}):t==A?u[t].xa({fontColor:x,backgroundColor:r}):u[t].xa({fontColor:w,backgroundColor:q})}if(this.tda||this.S("popUpGap")||
this.S("buttonWidth"))this.je&&this.Wb.set("minWidth",this.je.nb()),this.$("popUpGap"),this.aHa(),this.tda=!1;this.Oc("popUpBackgroundBlur popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{popUpBackgroundBlur:"backgroundBlur",popUpShadow:"shadow",popUpShadowBlurRadius:"shadowBlurRadius",popUpShadowColor:"shadowColor",popUpShadowHorizontalLength:"shadowHorizontalLength",popUpShadowOpacity:"shadowOpacity",
popUpShadowSpread:"shadowSpread",popUpShadowVerticalLength:"shadowVerticalLength"},[this.Wb],!0,!0);this.BGa();c.prototype.jb.call(this)};p.prototype.aHa=function(){var q=this.VKa(),r=this.r2a(this.je),t=this.je.nb(),u=this.je.Mb(),v=this.G("popUpGap"),w=this.Wb.u.contentWidth,x=this.Wb.u.contentHeight,y=q.Mb()-(r.top+u+v)-5,z=r.top-5-v,A=this.G("horizontalAlign");x<=y?(this.CD=!0,this.Wb.set("top",r.top+u+v),this.Wb.set("maxHeight",void 0),this.Wb.set("overflow",e.lL)):x<=z?(this.CD=!1,this.Wb.set("top",
r.top-x-v),this.Wb.set("maxHeight",void 0),this.Wb.set("overflow",e.lL)):(y>=z?(this.CD=!0,this.Wb.set("top",r.top+u+v),this.Wb.set("maxHeight",y)):(this.CD=!1,this.Wb.set("top",r.top-z+v),this.Wb.set("maxHeight",z)),this.Wb.set("overflow",e.Vr));u=A==g.$e?r.left+Math.round((t-w)*.5):A==g.Db?r.left+t-w:r.left;u<0?u=r.left:r.left+w>q.nb()&&(u=r.left+t-w);this.Wb.set("left",u);this.BGa()};p.prototype.BGa=function(){var q=this.G("popUpBorderRadius");this.Wb.xa({borderTopRadius:this.CD?0:q,borderBottomRadius:this.CD?
q:0});for(var r=this.Wb.Cb(),t=0;t<r.length;t++){var u=t==0,v=t==r.length-1;r[t].xa({borderTopRadius:!this.CD&&u?q:0,borderBottomRadius:this.CD&&v?q:0})}};p.ad=Object.assign({},c.ad,{visible:!1,width:"100%",height:"100%",includeInLayout:!1,items:[],selectedIndex:-1,overIndex:-1,popUpGap:0,popUpBackgroundColor:void 0,popUpBackgroundOpacity:void 0,popUpBackgroundBlur:0,rollOverPopUpBackgroundColor:void 0,selectedPopUpBackgroundColor:void 0,popUpFontColor:void 0,rollOverPopUpFontColor:void 0,selectedPopUpFontColor:void 0,
popUpShadow:!0,popUpShadowBlurRadius:void 0,popUpShadowColor:void 0,popUpShadowHorizontalLength:void 0,popUpShadowOpacity:void 0,popUpShadowSpread:void 0,popUpShadowVerticalLength:void 0,fontFamily:void 0,fontSize:void 0,fontWeight:void 0,fontStyle:void 0,textDecoration:void 0,textShadowColor:void 0,textShadowHorizontalLength:void 0,textShadowVerticalLength:void 0,textShadowBlurRadius:void 0,textShadowOpacity:void 0,buttonWidth:void 0});return p}(c)});
define("tdv/view/list/dropdown/DropDown","require exports tdv/events/Event tdv/constants/EventName tdv/view/containers/Container tdv/view/list/dropdown/DropDownButton tdv/view/list/dropdown/DropDownPopup".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.gf("DropDown");d.je=new k;d.je.bind(n.$b,d.P4a,d,!1);d.je.bind(n.OPEN,d.o5a,d,!1);d.je.bind(n.CB,d.TM,d,!1);d.je.bind(n.jd,d.O4a,d,!1);d.je.set("width","100%");d.je.set("height","100%");d.je.set("toolTipDisabled",
!0);d.nk=new e(d.je);d.nk.bind(n.CB,d.TM,d,!1);d.nk.bind(n.Wr,d.E5a,d,!1);d.rFa=!0;d.Bn=!1;return d}P(c,b);c.prototype.Pb=function(){b.prototype.Pb.call(this);this.m("prompt","");this.m("label","");this.m("items",[]);this.m("selectedIndex",-1);this.m("arrowBeforeLabel");this.m("arrowWidth",9);this.m("arrowHeight",5);this.m("arrowGap",5);this.m("borderRadius",5);this.m("borderSize",1);this.m("backgroundColorDirection","vertical");this.m("horizontalAlign","left");this.m("paddingLeft",5);this.m("paddingTop",
5);this.m("paddingRight",5);this.m("paddingBottom",5);this.m("fontFamily");this.m("fontSize");this.m("fontColor","#555555");this.m("fontWeight");this.m("fontStyle");this.m("textDecoration");this.m("textShadowColor");this.m("textShadowHorizontalLength");this.m("textShadowVerticalLength");this.m("textShadowBlurRadius");this.m("textShadowOpacity");this.m("popUpGap",0);this.m("popUpBorderRadius");this.m("popUpPaddingBottom",2);this.m("popUpPaddingLeft",5);this.m("popUpPaddingRight",5);this.m("popUpPaddingTop",
2);this.m("popUpShadow",!0);this.m("popUpShadowBlurRadius");this.m("popUpShadowColor");this.m("popUpShadowHorizontalLength");this.m("popUpShadowOpacity");this.m("popUpShadowSpread");this.m("popUpShadowVerticalLength");this.m("popUpBackgroundColor","#FFFFFF");this.m("popUpBackgroundOpacity");this.m("popUpBackgroundBlur",0);this.m("rollOverPopUpBackgroundColor");this.m("selectedPopUpBackgroundColor");this.m("popUpFontColor","#555555");this.m("rollOverPopUpFontColor");this.m("selectedPopUpFontColor");
this.m("borderColor","#AAAAAA");this.m("arrowColor","#000000");this.m("backgroundColor",["#FAFAFA","#E5E5E5"]);this.m("backgroundColorRatios",[0,1]);this.m("shadow",!1);this.m("rollOverBorderColor");this.m("rollOverArrowColor");this.m("rollOverBackgroundColor");this.m("rollOverBackgroundColorRatios");this.m("rollOverShadow");this.m("pressedBorderColor");this.m("pressedArrowColor");this.m("pressedBackgroundColor");this.m("pressedBackgroundColorRatios");this.m("pressedShadow");this.m("pressedRollOverBorderColor");
this.m("pressedRollOverArrowColor");this.m("pressedRollOverBackgroundColor");this.m("pressedRollOverBackgroundColorRatios");this.m("pressedRollOverShadow")};c.prototype.Kb=function(){b.prototype.Kb.call(this);this.je.getParent()||this.mb(this.je)};c.prototype.close=function(){this.TM()};c.prototype.P4a=function(){this.rFa=!0;this.Tf()};c.prototype.o5a=function(){this.je.open();this.nk.set("selectedIndex",this.get("selectedIndex"));this.nk.open()};c.prototype.TM=function(){this.o(new h(n.CB));this.je.close();
this.nk.close()};c.prototype.O4a=function(){this.je.close();this.nk.close()};c.prototype.E5a=function(){this.set("selectedIndex",this.nk.get("selectedIndex"));this.TM();this.Bn=!0};c.prototype.jb=function(){var d=!1;if(this.S("prompt")||this.S("label"))d=!0,this.$("label"),this.$("prompt");if(this.S("selectedIndex")||this.S("items")){d=!0;var f=this.G("selectedIndex"),l=this.G("items");f>=0&&f>=l.length&&(f=-1);this.set("selectedIndex",f);this.nk.set("items",this.G("items"));this.nk.set("selectedIndex",
this.G("selectedIndex"));this.$("items");this.$("selectedIndex");this.Bn&&(this.Bn=!1,this.o(new h(n.V)))}d&&(d=this.G("label"),d||(f=this.G("selectedIndex"),d=f<0?this.G("prompt"):this.G("items")[f]),this.je.set("label",d));this.rFa&&(this.nk.set("minWidth",this.je.nb()),this.nk.set("buttonWidth",this.je.nb()));this.Oc("fontFamily fontSize fontColor fontWeight fontStyle tabIndex textDecoration horizontalAlign textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),
{},[this.je,this.nk],!0,!0);this.Oc("popUpBorderRadius popUpGap popUpPaddingBottom popUpPaddingLeft popUpPaddingRight popUpPaddingTop popUpBackgroundColor popUpBackgroundOpacity popUpBackgroundBlur rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{},[this.nk],!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.je],!0,!0);b.prototype.jb.call(this)};return c}(g)});
define("tdv/player/script/DropDown",["require","tdv/binding/ChangeWatcher","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/list/dropdown/DropDown"],function(a){var m=a("tdv/binding/ChangeWatcher"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/list/dropdown/DropDown");a=n.define("DropDown",g,function(){g.call(this);this.Td=null;this.$za=[];this.bind(h.V,this.S4a,this)});a.prototype.set=function(k,e){if(k=="playList"){if(this.Td)for(this.Td.h("change",
this.kz,this);this.$za.length;)this.$za.shift().hF();(this.Td=e)?(m.jx(this.Td,"items.label",this.V5,this),m.jx(this.Td,"items.media.label",this.V5,this),this.V5(),this.Td.bind("change",this.kz,this),this.kz()):this.V5()}g.prototype.set.call(this,k,e)};a.prototype.V5=function(){this.Td?this.set("items",this.Td.get("items").map(function(k){return k.get("label")||k.get("media")&&k.get("media").get("label")})):this.set("items",[])};a.prototype.kz=function(){this.set("selectedIndex",this.Td.get("selectedIndex"))};
a.prototype.S4a=function(){this.Td&&this.Td.set("selectedIndex",this.get("selectedIndex"))};return a});define("tdv/player/script/DustPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("DustPanoramaOverlay",m,function(){m.call(this)});a.prototype.get=function(h,n){h=="startState"&&n===void 0&&(n=this.get("initialState"));return m.prototype.get.call(this,h,n)};return a});
define("tdv/player/script/Effect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/Effect"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/effects/Effect");a=m.define("Effect",h,function(){h.call(this)});a.prototype.cancel=function(){return h.prototype.cancel.apply(this,arguments)};a.prototype.getPosition=function(){return h.prototype.tm.apply(this,arguments)};a.prototype.play=function(){return h.prototype.play.apply(this,arguments)};a.prototype.reverse=function(){return h.prototype.reverse.apply(this,
arguments)};a.prototype.stop=function(){return h.prototype.stop.apply(this,arguments)};return a});define("tdv/player/script/FadeInEffect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/FadeInEffect"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/effects/FadeInEffect");return m.define("FadeInEffect",h,function(){h.call(this)})});
define("tdv/player/script/FadeOutEffect",["require","tdv/player/parser/ClassInfo","tdv/view/effects/FadeOutEffect"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/effects/FadeOutEffect");return m.define("FadeOutEffect",h,function(){h.call(this)})});
define("tdv/player/script/Model3DCamera","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/events/async".split(" "),function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/events/async");a=g.define("Model3DCamera",m,function(){m.call(this);this.set("userInteracting",!1);this.set("moving",!1);this.set("mouseDisabled",!1);this.set("clickTranslationDisabled",
!1);this.set("doubleClickDisabled",!1);this.Kea=this.s4a=this.Oda=this.Nda=!1;"distance fov yaw pitch x y z".split(" ").forEach(function(e){this.bind(h.L(e),this.y5a,this,!0)}.bind(this))});a.prototype.umb=function(){this.TN={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.a9a=function(e){this.TN||(this.TN={});for(var b in e)this.TN[b]=e[b]};a.prototype.Tjb=function(){this.TN&&this.setPosition(this.TN)};a.prototype.qRa=function(e){this.wAa!==e&&(this.wAa=e,this.Bab())};a.prototype.Bab=function(){this.set("mouseDisabled",
this.s4a||this.wAa)};a.prototype.RQa=function(e){this.Nda!==e&&(this.Nda=e,this.DGa())};a.prototype.SQa=function(e){this.Oda!==e&&(this.Oda=e,this.DGa())};a.prototype.DGa=function(){this.set("clickTranslationDisabled",this.Nda||this.Oda)};a.prototype.rkb=function(e){this.Kea!==e&&(this.Kea=e,this.lab())};a.prototype.lab=function(){this.set("doubleClickDisabled",this.Kea)};a.prototype.y5a=function(){this.tDa||(this.tDa=!0,k.ME(function(){this.tDa=!1;this.M$a()}.bind(this)))};a.prototype.M$a=function(){this.o(h.Km)};
a.Nob=100;a.prototype.setStoredPosition=function(e){this.a9a(e)};a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=function(){this.set("state",n.Zb)};a.prototype.stop=function(){this.set("state",n.ca)};return a});
define("tdv/player/script/FirstPersonModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCamera");return m.define("FirstPersonModel3DCamera",h,function(){h.call(this);this.set("distance",0)})});
define("tdv/player/script/HotspotPanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/effects/Effect"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/effects/Effect");a=n.define("HotspotPanoramaOverlay",m,function(){m.call(this);this.bind(h.od,this.cp,this,!0);this.bind(h.jd,this.ap,this,!0);this.xj=[];this.Ld=!1});a.prototype.set=function(k,e){switch(k){case "enabledInCardboard":this.set("enabledInVR",
e);break;case "effect":case "rollOverEffect":case "areas":this.Q6a(),this.xj=[]}m.prototype.set.call(this,k,e);switch(k){case "enabledInCardboard":this.set("enabledInVR",e);break;case "effect":case "rollOverEffect":case "areas":this.aXa()}};a.prototype.aXa=function(){this.get("effect")&&this.get("effect").bind(g.wx,this.wBa,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").bind(g.wx,this.ICa,this,!0);this.get("areas",[]).forEach(function(k){k.bind(h.uc,this.kBa,this,!0);k.bind(h.Eb,
this.jBa,this,!0)}.bind(this))};a.prototype.Q6a=function(){this.get("effect")&&this.get("effect").h(g.wx,this.wBa,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").h(g.wx,this.ICa,this,!0);this.get("areas",[]).forEach(function(k){k.h(h.uc,this.kBa,this,!0);k.h(h.Eb,this.jBa,this,!0)}.bind(this))};a.prototype.kBa=function(k){this.xj.indexOf(k.source)<0&&(this.xj.push(k.source),this.xj.length==1&&this.E3())};a.prototype.jBa=function(k){k=this.xj.indexOf(k.source);k>=0&&(this.xj.splice(k,
1),this.xj.length==0&&this.Es())};a.prototype.E3=function(){var k=this.get("effect"),e=this.get("rollOverEffect");e&&(k&&k.tm()>0?k.reverse():e.play())};a.prototype.Es=function(){var k=this.get("rollOverEffect");if(k){var e=this.get("effect");k.tm()>0?k.reverse():e&&e.get("loop")&&e.play()}};a.prototype.wBa=function(){if(this.xj.length>0){var k=this.get("rollOverEffect");k&&(this.get("effect").stop(),k.play())}};a.prototype.ICa=function(){if(this.xj.length==0){this.get("rollOverEffect").stop();var k=
this.get("effect");k&&k.get("loop")&&k.play()}};a.prototype.cp=function(){var k=this.get("effect");k&&k.play()};a.prototype.ap=function(){var k=this.get("effect");k&&k.stop();(k=this.get("rollOverEffect"))&&k.stop()};return a});
define("tdv/player/script/FlatHotspotPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlay");return m.define("FlatHotspotPanoramaOverlay",h,function(){h.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayArea",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("HotspotPanoramaOverlayArea",m,function(){m.call(this);this.set("displayTooltipInTouchScreens",!0)})});
define("tdv/player/script/FlatHotspotPanoramaOverlayArea",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayArea"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlayArea");return m.define("FlatHotspotPanoramaOverlayArea",h,function(){h.call(this)})});
define("tdv/player/script/QuadPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("QuadPanoramaOverlayPlaybackPosition",m,function(h,n,g){m.call(this);h!==void 0&&this.set("vertices",h);this.set("opacity",n!==void 0?n:1);g!==void 0&&this.set("timestamp",g)})});
define("tdv/player/script/FlatPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("FlatPanoramaOverlayPlaybackPosition",m,function(h,n,g,k,e){m.call(this);h!==void 0&&this.set("yaw",h);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("roll",g);this.set("opacity",k!==void 0?k:1);e!==void 0&&this.set("timestamp",e)})});
define("tdv/player/script/PanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaOverlayPlaybackPosition",m,function(h,n,g,k,e,b,c,d,f){m.call(this);h!==void 0&&this.set("yaw",h);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("rotationX",g);k!==void 0&&this.set("rotationY",k);e!==void 0&&this.set("roll",e);b!==void 0&&this.set("hfov",b);c!==void 0&&this.set("vfov",
c);this.set("opacity",d!==void 0?d:1);f!==void 0&&this.set("timestamp",f)})});define("tdv/player/script/PanoramaPoint",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaPoint",m,function(h,n){m.call(this);this.set("yaw",h);this.set("pitch",n)})});
define("tdv/player/script/PopupPanoramaOverlayPlaybackPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PopupPanoramaOverlayPlaybackPosition",m,function(h,n,g,k,e,b,c){m.call(this);h!==void 0&&this.set("yaw",h);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("rotationX",g);k!==void 0&&this.set("rotationY",k);e!==void 0&&this.set("rotationZ",e);b!==void 0&&this.set("hfov",b);c!==
void 0&&this.set("timestamp",c)})});
define("tdv/player/script/helper/PlaybackPositionHelper","require tdv/binding/Bindable tdv/player/script/QuadPanoramaOverlayPlaybackPosition tdv/player/script/FlatPanoramaOverlayPlaybackPosition tdv/player/script/PanoramaOverlayPlaybackPosition tdv/player/script/PanoramaPoint tdv/player/script/PopupPanoramaOverlayPlaybackPosition".split(" "),function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/script/QuadPanoramaOverlayPlaybackPosition"),n=a("tdv/player/script/FlatPanoramaOverlayPlaybackPosition"),g=
a("tdv/player/script/PanoramaOverlayPlaybackPosition"),k=a("tdv/player/script/PanoramaPoint"),e=a("tdv/player/script/PopupPanoramaOverlayPlaybackPosition");return{jfb:function(b){return this.q1(b,this.L0a)},Eoa:function(b){return this.q1(b,this.o6a)},Lfb:function(b){return this.q1(b,this.v6a)},Foa:function(b){return this.q1(b,this.F6a)},L0a:function(b){return new n(m.prototype.get.call(b,"yaw",0),m.prototype.get.call(b,"pitch",0),m.prototype.get.call(b,"roll",0),m.prototype.get.call(b,"opacity",1),
0)},F6a:function(b){var c=m.prototype.get.call(b,"vertices",[null,null,null,null]);return new h([c[0]||new k(0,0),c[1]||new k(0,0),c[2]||new k(0,0),c[3]||new k(0,0)],m.prototype.get.call(b,"opacity",1),0)},o6a:function(b){function c(d,f){return m.prototype.get.call(b,d,f)}return new g(c("yaw",0),c("pitch",0),c("rotationX",0),c("rotationY",0),c("roll",0),c("hfov",c("vfov")===void 0?45:void 0),c("vfov"),c("opacity",1),0)},v6a: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)},q1:function(b,c){var d=m.prototype.get.call(b,"playbackPositions")||[];return d.length>0?d.slice().sort(function(f,l){return f.get("timestamp")-l.get("timestamp")||d.indexOf(f)-d.indexOf(l)}):[c(b)]}}});
define("tdv/player/script/FlatHotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("FlatHotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Gd=void 0});a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===
void 0&&(this.Gd=g.jfb(this)),this.Gd}return m.prototype.get.call(this,k,e)};a.prototype.set=function(k,e){var b=!1;switch(k){case "opacity":case "distance":case "pitch":case "roll":case "yaw":case "playbackPositions":this.Gd=void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};return a});
define("tdv/player/script/FlatHotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/FlatHotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");return m.define("FlatHotspotPanoramaOverlayImage",h,function(){h.call(this)})});
define("tdv/player/script/FlatHotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/FlatHotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");return m.define("FlatHotspotPanoramaOverlayMap",h,function(){h.call(this)})});
define("tdv/player/script/FlyOverModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCamera");return m.define("FlyOverModel3DCamera",h,function(){h.call(this)})});
define("tdv/player/script/FramePanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("FramePanoramaOverlay",m,function(){m.call(this);this.Gd=void 0});a.prototype.set=function(k,e){var b=!1;switch(k){case "hfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.Gd=
void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===void 0&&(this.Gd=g.Eoa(this)),this.Gd}return m.prototype.get.call(this,k,e)};return a});
define("tdv/player/script/Model3DResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DResource",m,function(){m.call(this)});a.prototype.get=function(h,n){switch(h){case "levels":n=[this];break;case "url":for(var g=m.prototype.get.call(this,h),k=this.get("levels"),e=0;k&&e<k.length&&g===void 0;e++){var b=k[e];b!=this&&(g=b.get(h))}return g!==void 0?g:n}return m.prototype.get.call(this,
h,n)};return a});define("tdv/player/script/TDTilesModel3DResource",["require","tdv/player/script/Model3DResource","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/Model3DResource");return a("tdv/player/parser/ClassInfo").define("TDTilesModel3DResource",m,function(){m.call(this)})});
define("tdv/player/script/Model3DResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Model3DResourceLevel",m,function(){m.call(this)});a.C_="mobile";a.prototype.get=function(h,n){switch(h){case "levels":n=[this];break;case "url":for(var g=m.prototype.get.call(this,h),k=this.get("levels"),e=0;k&&e<k.length&&g===void 0;e++){var b=k[e];b!=this&&(g=b.get(h))}return g!==void 0?g:n}return m.prototype.get.call(this,
h,n)};return a});
define("tdv/player/script/GoogleMaps3DTilesModel3DResource",["require","tdv/player/script/TDTilesModel3DResource","tdv/player/script/Model3DResourceLevel","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/TDTilesModel3DResource"),h=a("tdv/player/script/Model3DResourceLevel");a=a("tdv/player/parser/ClassInfo").define("GoogleMaps3DTilesModel3DResource",m,function(){m.call(this)});a.prototype.set=function(k,e){m.prototype.set.call(this,k,e);switch(k){case "latitude":case "longitude":this.cg();break;
case "apiKey":this.wab()}};a.prototype.cg=function(){var k=this.get("latitude"),e=this.get("longitude");if(k!==void 0&&e!==void 0){k=this.zya(k,e);e=(new THREE.Vector3).crossVectors(k,(new THREE.Vector3).crossVectors(this.zya(90,0),k));var b=new THREE.Vector3(0,0,0);e=(new THREE.Matrix4).lookAt(k,b,e).invert();e=(new THREE.Matrix4).makeRotationX(-Math.PI/2).multiply(e);e=(new THREE.Euler).setFromRotationMatrix(e,"XYZ");this.set("rotationOrder",e.order);this.set("rotationX",e.x*g);this.set("rotationY",
e.y*g);this.set("rotationZ",e.z*g);this.set("positionX",-k.x);this.set("positionY",-k.y);this.set("positionZ",-k.z)}};a.prototype.zya=function(k,e){k*=n;e*=n;var b=1/298.257223563;const c=Math.sin(k);k=Math.cos(k);b=2*b-b*b;const d=6378137/Math.sqrt(1-b*c*c);return new THREE.Vector3((d+0)*k*Math.cos(e),(d+0)*k*Math.sin(e),d*(1-b)*c)};a.prototype.wab=function(){var k=this.get("apiKey");if(k!==void 0){var e=new h;e.set("url","https://tile.googleapis.com/v1/3dtiles/root.json?key="+k);this.set("levels",
[e])}};var n=Math.PI/180,g=180/Math.PI;return a});define("tdv/view/containers/GridContainer",["require","exports","tdv/view/containers/Container","tdv/view/constants/LayoutMode"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.Pb=function(){this.Il(k.ad)};k.ad=Object.assign({},h.ad,{layout:n.JB});return k}(h)});
define("tdv/player/script/GridContainer",["require","tdv/player/parser/ClassInfo","tdv/view/containers/GridContainer"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/containers/GridContainer");return m.define("GridContainer",h,function(){h.call(this)})});
define("tdv/player/view/util/Preloader","require tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/URL tdv/view/images/ImageLoader tdv/util/LoadQueue tdv/utils".split(" "),function(a){function m(){}function h(p){this.Bqa=p;this.items=[];this.priority=0}var n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/EventName"),e=a("tdv/constants/Priority"),b=a("tdv/player/view/util/URL"),c=a("tdv/view/images/ImageLoader"),
d=a("tdv/util/LoadQueue"),f=a("tdv/utils"),l=f.extend(g,function(p){g.call(this);this.url=p;this.Cqa=this.priority=0;this.status=l.hca;this.sB=null});l.prototype.Hpa=function(p){this.Cqa+=p};l.prototype.FP=function(p){this.priority+=p};l.prototype.start=function(){this.status=l.B_;c.eaa(this.url)?this.QC():this.pq=d.add(this.url,e.Faa,this.A7a.bind(this),this.uwa.bind(this))};l.prototype.A7a=function(){this.sB=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.sB.open("GET",
this.url);this.sB.onreadystatechange=function(){this.sB.readyState>3&&this.QC()}.bind(this);this.sB.send()};l.prototype.uwa=function(){this.sB&&(this.sB.abort(),this.sB=null)};l.prototype.stop=function(){this.status==l.B_&&(this.status=l.hca,this.uwa(),this.pq&&this.pq.cancel())};l.prototype.QC=function(){this.sB=null;this.pq&&(this.pq.loaded(),this.pq=null);this.status=l.WVa;this.o(new n(k.ia))};l.hca="not loaded";l.B_="loading";l.WVa="loaded";h.prototype.Rbb=function(p){p.forEach(function(q){this.items.indexOf(q)<
0&&(this.items.push(q),q.FP(this.priority),q.Hpa(1))}.bind(this))};h.prototype.yjb=function(p){var q=this.items;this.items=[];q.forEach(function(r){p.indexOf(r)<0?this.items.push(r):(r.FP(-this.priority),r.Hpa(-1))}.bind(this))};h.prototype.qjb=function(){this.items.forEach(function(p){p.FP(-this.priority);p.Hpa(-1)}.bind(this));this.items=[];this.priority=0};h.prototype.FP=function(p){this.priority+=p;this.items.forEach(function(q){q.FP(p)})};m.ni=[];m.WDa=[];m.W0a=0;m.dIa=function(p,q){this.v4(p).Rbb(q.map(function(r){return this.Ja(r)}.bind(this)));
this.k5();this.za()};m.Hjb=function(p,q){this.v4(p).yjb(q.map(function(r){return this.Ja(r)}.bind(this)));this.k5();this.za()};m.rjb=function(p){this.v4(p).qjb();this.k5();this.za()};m.V8=function(p,q){this.v4(p).FP(q);this.k5();this.za()};m.k5=function(){this.ni.sort(function(p,q){return q.priority-p.priority})};m.za=function(p){if(this.enabled()&&(p||!this.Tv))if(p){this.Tv&&clearTimeout(this.Tv);this.Tv=null;p=this.P1a();var q=this.Q1a();f.difference(p,q).forEach(function(r){r.stop()});f.difference(q,
p).forEach(function(r){r.start()})}else this.Tv=setTimeout(function(){this.Tv=null;this.za(!0)}.bind(this),1E3)};m.Tv=null;m.P1a=function(){return this.ni.filter(function(p){return p.status==l.B_})};m.Q1a=function(){for(var p=this.R1a(),q=[],r=0;r<this.ni.length&&q.length<p;r++){var t=this.ni[r];t.Cqa>0&&(t.status==l.hca||t.status==l.B_)&&q.push(t)}return q};m.R1a=function(){return this.W0a>0?0:5};m.v4=function(p){var q=this.WDa.find(function(r){return r.Bqa==p});q||(q=new h(p),this.WDa.push(q));
return q};m.Ja=function(p){var q=this.ni.find(function(r){return r.url==p});q||(q=new l(p),q.bind(k.ia,this.za,this),this.ni.push(q));return q};m.enabled=function(p){if(p===void 0)return m.O_a||m.P_a?!1:m.$ea!==void 0?m.$ea:m.ha;m.ha=p};m.ha=!0;m.zra=function(p){m.$ea=p.get(TDV.PlayerSettings.BACKGROUND_PRELOAD_ENABLED)};m.$ea=void 0;m.P_a=b.Tg("disable-background-preload",!1);m.O_a=!1;return m});
define("tdv/player/script/Media","require exports tdv/utils tdv/binding/Bindable tdv/player/parser/ClassInfo tdv/player/view/util/Preloader".split(" "),function(a,m,h,n,g,k){a=function(e){function b(){var c=e.call(this)||this;c.$la=h.mr(c.$la,c);return c}P(b,e);b.prototype.$la=function(){k.dIa(this,this.rw())};b.prototype.rw=function(){return[]};b.prototype.Djb=function(){k.rjb(this)};b.prototype.set=function(c,d){e.prototype.set.call(this,c,d);this.$la()};return b}(n);g.create("Media",a);return a});
define("tdv/player/script/Panorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Media"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Media");a=m.define("Panorama",h,function(){h.call(this);this.j2=this.ON=void 0;this.set("minFaceSize",void 0)});a.prototype.get=function(n,g){switch(n){case "overlays":return this.Xfa();case "frames":return this.Nya();case "partial":if(this.get("hfov")<359.9)return!0}return h.prototype.get.call(this,n,g)};a.prototype.set=
function(n,g){switch(n){case "cardboardMenu":this.set("vrMenu",g)}h.prototype.set.call(this,n,g)};a.prototype.Xfa=function(){var n=h.prototype.get.call(this,"overlays");n||(n=[]);return this.Jka(n)};a.prototype.Jka=function(n){if(this.ON===void 0||this.j2!=n){var g=function(e){return m.Oa("PopupPanoramaOverlay",e)},k=function(e){return m.Oa("LensFlarePanoramaOverlay",e)};this.j2=n;this.ON=[].concat(n.filter(function(e){return!(g(e)||k(e))}),n.filter(k),n.filter(g))}return this.ON};a.prototype.tMa=
function(){return this.get("overlays").filter(function(n){return m.Oa("TripodCapPanoramaOverlay",n)}).length>0};a.prototype.jMa=function(){return this.get("overlays").filter(function(n){return m.Oa("CeilingCapPanoramaOverlay",n)}).length>0};a.prototype.OMa=function(){if(!this.Zoa())return!1;var n=this.get("pitch",0),g=this.get("vfov",180);if(g>=179.9)return!0;var k=this.jMa()?90:n+g*.5;n=this.tMa()?-90:n-g*.5;return k-n>=179.9?!0:!1};a.prototype.Zoa=function(){return this.get("hfov")>=359.9&&!this.get("partial")};
a.prototype.Mn=function(){var n=this.Nya();return n.length>0&&n[0].Mn()};a.prototype.oX=function(){return 0};a.prototype.Nya=function(){var n=h.prototype.get.call(this,"frames",[]);n.forEach(function(g){g.icb(this)}.bind(this));return n};return a});
define("tdv/player/script/HDRPanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Panorama");a=m.define("HDRPanorama",h,function(){h.call(this)});a.prototype.oX=function(){var n=this.get("frames")||[];return Math.floor((n.length-1)/2)};return a});
define("tdv/player/script/HorizonGridModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("HorizonGridModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/HotspotMapOverlayArea",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("HotspotMapOverlayArea",m,function(){m.call(this)})});
define("tdv/player/script/ImageResourceLevel",["require","exports","tdv/player/parser/ClassInfo","tdv/binding/Bindable"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.get=function(e,b){switch(e){case "tags":return(e=n.prototype.get.call(this,e))||(e=[]),Array.isArray(e)||(e=[e]),e.indexOf(k.Ju)<0&&n.prototype.get.call(this,"grayscale")&&(e=e.concat([k.Ju])),e}return n.prototype.get.call(this,e,b)};k.prototype.sMa=function(e){return this.get("tags").indexOf(e)>=
0};k.Ju="preload";k.C_="mobile";k.Bua="ipadpro";k.D_="mobilevr";k.mca="mobilevr2gen";k.nca="ondemand";return k}(n);h.create("ImageResourceLevel",a);return a});
define("tdv/player/script/helper/LevelUtil",["require","tdv/player/script/ImageResourceLevel","tdv/player/view/util/Device","tdv/player/view/util/URL"],function(a){var m=a("tdv/player/script/ImageResourceLevel"),h=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/URL");return{Et:function(g){return this.yk(g,"load")},vJ:function(g){return this.yk(g,"preload")},mP:function(g){return this.Et(g)!=this.vJ(g)},yk:function(g,k){g=g.get("levels")||[];var e=this.e1a(g);e=this.m2a(k,e);g=this.F0a(g,
k);(k=this.Wya(g,e[0],e[1],this.l2a(k)))||(k=this.Wya(g,e[0],e[1],void 0));return k},F0a:function(g,k){k=="preload"?g=this.dS(g,m.Ju):k=="load"&&(g=this.E0a(g,m.Ju));h.DA()&&(g=this.dS(g,m.Bua));if(h.B8()||h.C8())g=this.dS(g,m.mca);h.kf()&&(g=this.dS(g,m.D_));h.ub()&&(g=this.dS(g,m.C_));return g},e1a:function(g){if(g.length==0)return 1;g.sort(function(k,e){return e.get("width")-k.get("width")});return g[0].get("width")/g[0].get("height")},m2a:function(g,k){if(g=="preload")return[0,0];g=1E4;this.P0a()||
(h.kf()?g=2048:h.DA()?g=2048:h.ub()&&(g=2048));return k<1?[g*k,g]:[g,g/k]},l2a:function(g){if(g=="load")return!1},P0a:function(){return h.DA()&&n.Tg("recent_ipad_use_max_res",!1)},dS:function(g,k){var e=g.filter(function(b){return b.sMa(k)});e.length==0&&(e=g);return e},E0a:function(g,k){var e=g.filter(function(b){return!b.sMa(k)});e.length==0&&(e=g);return e},Wya:function(g,k,e,b){function c(d){return Math.abs(d.get("width")*d.get("height")-k*e)}g=g.filter(function(d){return b!==void 0&&b!=d.get("grayscale",
!1)?!1:!0});if(g.length==0)return null;g.sort(function(d,f){return c(d)-c(f)});return g[0]}}});
define("tdv/player/script/HotspotMapOverlayImageBase",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/helper/LevelUtil"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/helper/LevelUtil");a=h.define("HotspotMapOverlayImageBase",m,function(){m.call(this)});a.prototype.Et=function(){return this.get("image")?n.Et(this.get("image")):null};a.prototype.vJ=function(){return this.get("image")?n.vJ(this.get("image")):
null};return a});define("tdv/view/events/ProgressEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event");return m.extend(h,function(n,g){h.call(this,n);this.percent=g})});
define("tdv/player/view/image/Item",["require","tdv/utils","tdv/binding/Bindable","tdv/constants/EventName","tdv/view/events/ProgressEvent"],function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable"),n=a("tdv/constants/EventName"),g=a("tdv/view/events/ProgressEvent");a=m.extend(h,function(){h.call(this);this.hW=[];this.Sg=void 0;this.I="initial"});a.prototype.eE=function(){return this.hW};a.prototype.fQ=function(k){this.hW!=k&&(this.hW=k,this.QC=this.Sg=void 0)};a.prototype.Wkb=function(k){this.Sg!==
k&&(this.I="loading",this.Sg=k,this.o(new g(n.yc,this.Sg)))};a.prototype.cZ=function(){this.I!=="loaded"&&(this.I="loaded",this.o(n.ia))};a.prototype.ukb=function(){this.I!=="loaded"&&(this.I="error",this.o(n.$c))};return a});
define("tdv/player/view/map/renderer/item/Item",["require","tdv/utils","tdv/player/view/image/Item"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/image/Item");a=m.extend(h,function(n){h.call(this);this.Qf=n;this.C=void 0});a.prototype.getType=function(){return this.Qf};a.prototype.Dgb=function(n){return this.C!==void 0&&this.C===n.C};a.Kua="map";a.Lua="overlay";return a});
define("tdv/player/view/map/renderer/item/Overlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Item"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Item");a=m.extend(h,function(n,g,k){h.call(this,h.Lua);this.c6a=n;this.ec=g;this.fc=k});a.prototype.getX=function(){return this.ec};a.prototype.getY=function(){return this.fc};a.Jua="image";a.Iua="fov";return a});
define("tdv/player/view/map/renderer/item/ImageOverlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Overlay"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Overlay");a=m.extend(h,function(n,g,k,e,b,c,d,f,l,p,q,r){h.call(this,h.Jua,k,e);this.C=n;this.Se=g;this.rEa=b;this.Zha=c;this.$ha=d;this.Pa=f;this.Ha=l;this.ti=p;this.GC=q;this.JD=r;this.hW=[g]});a.prototype.rl=function(){return this.Se};a.prototype.zLa=function(){return this.Zha};a.prototype.ALa=function(){return this.$ha};
a.prototype.fg=function(){return this.Pa};a.prototype.wg=function(){return this.Ha};a.prototype.hP=function(){return this.GC};a.prototype.jP=function(){return this.JD};return a});
define("tdv/player/script/HotspotMapOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlayImageBase","tdv/player/script/helper/LevelUtil","tdv/player/view/map/renderer/item/ImageOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotMapOverlayImageBase"),n=a("tdv/player/script/helper/LevelUtil"),g=a("tdv/player/view/map/renderer/item/ImageOverlay");a=m.define("HotspotMapOverlayImage",h,function(){h.call(this);this.Wy=void 0});
a.prototype.getItem=function(){return this.cr()};a.prototype.cr=function(){this.Wy===void 0&&(this.Wy=this.a7());return this.Wy};a.prototype.a7=function(k){var e=this.get("image");return e?(e=n.Et(e),new g(this,e.get("url"),this.get("x"),this.get("y"),k,this.get("offsetX"),this.get("offsetY"),this.get("width"),this.get("height"),this.get("scaleMode"),this.get("horizontalAlign"),this.get("verticalAlign"))):null};return a});
define("tdv/player/script/HotspotMapOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotMapOverlayImageBase");return m.define("HotspotMapOverlayMap",h,function(){h.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("HotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Gd=void 0});a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===
void 0&&(this.Gd=g.Eoa(this)),this.Gd}return m.prototype.get.call(this,k,e)};a.prototype.set=function(k,e){var b=!1;switch(k){case "distance":case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "yaw":case "opacity":case "playbackPositions":this.Gd=void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};return a});
define("tdv/player/script/HotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlayImageBase");return m.define("HotspotPanoramaOverlayImage",h,function(){h.call(this)})});
define("tdv/player/script/HotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlayImageBase");return m.define("HotspotPanoramaOverlayMap",h,function(){h.call(this)})});
define("tdv/view/html/HTMLParser",["require"],function(){function a(f){var l={};f=f.split(",");for(var p=0;p<f.length;p++)l[f[p]]=!0;return l}var m=/^<([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,h=/^<\/([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)[^>]*>/,n=/([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,g=a("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),k=a("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),
e=a("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),b=a("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),c=a("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),d=a("script,style");return function(f,l){function p(w,x,y,z){x=x.toLowerCase();if(k[x])for(;r.lE()&&e[r.lE()];)q("",r.lE());b[x]&&r.lE()==
x&&q("",x);(z=g[x]||!!z)||r.push(x);if(l.start){var A=[];y.replace(n,function(D,F){var C=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:c[F]?F:"";A.push({name:F,value:C,Yna:C.replace(/(^|[^\\])"/g,'$1\\"')})});l.start&&l.start(x,A,z)}}function q(w,x){if(x)for(x=x.toLowerCase(),w=r.length-1;w>=0&&r[w]!=x;w--);else w=0;if(w>=0){for(x=r.length-1;x>=w;x--)l.end&&l.end(r[x]);r.length=w}}var r=[],t=f;for(r.lE=function(){return this[this.length-1]};f;){var u=!0;if(r.lE()&&
d[r.lE()])f=f.replace(new RegExp("(.*?)</"+r.lE()+"[^>]*>"),function(w,x){x=x.replace(/\x3c!--(.*?)--\x3e/g,"$1").replace(/<!\[CDATA\[(.*?)]]\x3e/g,"$1");l.IW&&l.IW(x);return""}),q("",r.lE());else{if(f.indexOf("\x3c!--")==0){var v=f.indexOf("--\x3e");v>=0&&(l.edb&&l.edb(f.substring(4,v)),f=f.substring(v+3),u=!1)}else if(f.indexOf("</")==0){if(v=f.match(h))f=f.substring(v[0].length),v[0].replace(h,q),u=!1}else f.indexOf("<")==0&&(v=f.match(m))&&(f=f.substring(v[0].length),v[0].replace(m,p),u=!1);u&&
(v=f.indexOf("<"),u=v<0?f:f.substring(0,v),f=v<0?"":f.substring(v),l.IW&&l.IW(u))}if(f==t)throw"Parse Error: "+f;t=f}q()}});
define("tdv/view/html/HTMLFragment","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/view/html/HTMLParser".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/util/Device"),e=a("tdv/view/html/HTMLParser"),b=m.extend(g,function(c){g.call(this);this.Mc=c;this.YU=[];this.tC=null});b.prototype.dhb=function(c){c&&c.toLowerCase().indexOf("<script")>=
0?k.BO()==k.DQ?this.l3a(c):this.k3a(c):this.j3a(c)};b.prototype.j3a=function(c){this.Mc.innerHTML=c;this.mGa()};b.prototype.l3a=function(c){this.Mc.empty();var d=this.Mc,f=null,l=[],p=null;new e(c,{start:function(q,r,t){if(q=="script"){t=void 0;for(var u=0;u<r.length&&t===void 0;u++){var v=r[u];v.name=="src"&&(t=v.value)}p={parent:d,previousSibling:f,src:t,content:""}}else{var w={};for(u=0;u<r.length;u++)v=r[u],w[v.name]=v.value;r=document.createElement(q);for(var x in w)r.setAttribute(x,w[x]);d.appendChild(r);
t?f=r:(d=r,f=null)}},IW:function(q){p?p.content+=q:d.append(q)},end:function(q){q=="script"?(l.push(p),p=null):(f=d,d=d.parent())}});this.YU=l;this.p2()};b.prototype.k3a=function(c){function d(){l++;return f+l}this.Mc.textContent="";var f="fragment_"+m.ojb(6)+"_",l=0,p=d(),q=[p],r=void 0,t=[],u=null,v="";new e(c,{start:function(y,z,A){if(y=="script"){A=void 0;for(y=0;y<z.length&&A===void 0;y++){var D=z[y];D.name=="src"&&(A=D.value)}u={parentClsName:q[q.length-1],previousSiblingClsName:r,src:A,content:""}}else{v+=
"<"+y;var F=d(),C=!1;for(y=0;y<z.length;y++)D=z[y],D.name=="class"&&(D.Yna+=" "+F,C=!0),v+=" "+D.name+'="'+D.Yna+'"';C||(v+=' class="'+F+'"');A?(v+="/>",r=F):(v+=">",q.push(F),r=void 0)}},IW:function(y){u?u.content+=y:v+=y},end:function(y){y=="script"?(t.push(u),u=null):(r=q[q.length-1],q.pop())}});this.Mc.innerHTML=v;this.Mc.classList.add(p);for(c=0;c<t.length;c++){var w=t[c],x=w.parentClsName;delete w.parentClsName;r=w.previousSiblingClsName;delete w.previousSiblingClsName;w.parent=this.Mc.querySelector("."+
x);w.previousSibling=r?this.Mc.querySelector("."+r):null}this.Mc.classList.remove(p);this.YU=t;this.p2()};b.prototype.p2=function(){if(!this.tC)if(this.YU.length>0){this.tC=this.YU[0];this.YU.splice(0,1);var c=this.tC.src;if(c){var d=this;b.c4a(c,function(){d.mAa()},function(){d.j4a()})}else{var f=this.tC.parent;c=this.tC.previousSibling;var l=c?c.nextSibling:f.firstChild;c=document.write;document.write=l?function(p){f.insertBefore(document.createTextNode(p),l)}:function(p){f.append(p)};m.ggb(this.tC.content);
document.write=c;this.mAa()}}else this.mGa()};b.prototype.j4a=function(){this.tC=null;this.p2()};b.prototype.mAa=function(){this.tC=null;this.p2()};b.prototype.mGa=function(){this.o(new n(h.Tb))};b.kAa={};b.c4a=function(c,d,f){b.kAa[c]?d.call(window):m.ueb(c,()=>{b.kAa[c]=!0;d.call(window)},f)};return b});
define("tdv/view/timer/Timer",["require","exports","tdv/constants/EventName","tdv/events/Event","tdv/events/EventDispatcher"],function(a,m,h,n,g){return function(k){function e(b,c){var d=k.call(this)||this;d.u3a=b;d.ha=c;d.sk=null;return d}P(e,k);e.prototype.bind=function(b,c,d,f){b=k.prototype.bind.call(this,b,c,d,f);this.dW();return b};e.prototype.h=function(b,c,d){b=k.prototype.h.call(this,b,c,d);this.dW();return b};e.prototype.start=function(){this.ha=!0;this.dW()};e.prototype.stop=function(){this.ha=
!1;this.dW()};e.prototype.kU=function(){this.o(new n(h.De))};e.prototype.dW=function(){if(this.ha&&this.d8(h.De)){if(this.sk==null){var b=this;this.sk=window.setTimeout(function(){b.sk=null;b.kU();b.dW()},this.u3a)}}else this.sk!=null&&(clearTimeout(this.sk),this.sk=null)};return e}(g)});
define("tdv/view/core/visualprops/HTMLVisualProperties",["require","exports","tdv/view/core/visualprops/UIBaseVisualProperties"],function(a,m,h){return function(n){function g(){var k=n!==null&&n.apply(this,arguments)||this;k.td=null;return k}P(g,n);return g}(h)});
define("tdv/view/html/HTML","require exports tdv/utils tdv/constants/EventName tdv/player/parser/helper/AppResizeUpdater tdv/view/constants/Alignment tdv/view/core/UIComponent tdv/view/html/HTMLFragment tdv/view/util/Font tdv/view/timer/Timer tdv/view/core/visualprops/HTMLVisualProperties".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){var l=/[^\d]((\d*\.)?\d+)\s*(vmin|vmax|vw|vh)/i;return function(p){function q(){var r=p.call(this)||this;r.gf("HTML");r.DG=q.J_;r.L2=0;r.K2=0;r.sFa=(new Date).getTime();
r.u.td=null;r.xL=r.xL.bind(r);r.Zca=[];return r}P(q,p);q.prototype.wa=function(){return p.prototype.wa.call(this)};q.prototype.Pb=function(){p.prototype.Pb.call(this);this.m("content");this.m("horizontalAlign",k.fb);this.m("verticalAlign",k.$d);this.m("fontFamily");this.m("fontSize");this.m("fontColor");this.m("fontWeight");this.m("fontStyle");this.m("textAlign");this.m("textDecoration");this.m("textShadowBlurRadius",3);this.m("textShadowColor","#000000");this.m("textShadowHorizontalLength",0);this.m("textShadowOpacity",
0);this.m("textShadowVerticalLength",0)};q.prototype.UL=function(){return new f};q.prototype.co=function(r,t,u,v){this.Gb&&g.get(this.Gb).tjb(this.xL);p.prototype.co.call(this,r,t,u,v);this.Gb&&(g.get(this.Gb).Fbb(this.xL),g.get(this.Gb).EO(this.xL))};q.prototype.Kb=function(){p.prototype.Kb.call(this);this.u.td||(this.u.td=document.createElement("div"),this.u.td.style.display="inline",this.u.td.style.boxSizing="border-box",this.IN(!1),this.yza=new b(this.u.td),this.ou(),this.yza.bind(n.Tb,this.Y2a,
this,!0),this.bind(n.$b,this.zza,this,!0))};q.prototype.jb=function(){var r=this,t=!1;this.S("visible")&&(t=!0);this.S("content")&&(t=this.G("content"),this.yza.dhb(t),this.$("content"),t=!0);if(this.S("width")||this.S("height"))t=!0;this.S("fontFamily")&&(t=this.G("fontFamily"),h.EA(t)||(t=""),this.u.td.style.fontFamily=c.qA(t),this.$("fontFamily"),t=!0);this.S("fontSize")&&(t=this.G("fontSize"),h.WMa(t)?t+="px":h.EA(t)||(t=""),this.u.td.style.fontSize=t,this.$("fontSize"),t=!0);this.S("fontColor")&&
(t=this.G("fontColor"),h.EA(t)||(t=""),this.u.td.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.td.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.td.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.td.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.td.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.td.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);p.prototype.jb.call(this);t&&this.NAa()};q.prototype.NAa=function(){this.zza();this.lc();this.G("visible")&&this.G("content")?this.aV(q.uca):this.aV(q.J_)};q.prototype.Zy=function(){p.prototype.Zy.call(this);this.L2=this.wa().qoa();this.K2=this.wa().poa();this.cn=this.L2+this.u.Dd+this.u.Ce;this.bn=this.K2+this.u.ie+this.u.Df};q.prototype.$Ea=function(r){this.Yya()!=r&&(this.u.td.style.paddingLeft=r+"px",this.lc())};q.prototype.Yya=function(){return parseInt(this.u.td.style.paddingLeft)||0};
q.prototype.bFa=function(r){this.$ya()!=r&&(this.u.td.style.paddingTop=r+"px",this.lc())};q.prototype.$ya=function(){return parseInt(this.u.td.style.paddingTop)||0};q.prototype.aFa=function(r){this.Zya()!=r&&(this.u.td.style.paddingRight=r+"px",this.lc())};q.prototype.Zya=function(){return parseInt(this.u.td.style.paddingRight)||0};q.prototype.ZEa=function(r){this.Xya()!=r&&(this.u.td.style.paddingBottom=r+"px",this.lc())};q.prototype.Xya=function(){return parseInt(this.u.td.style.paddingBottom)||
0};q.prototype.Y2a=function(){this.Zca=Array.prototype.slice.call(this.u.td.querySelectorAll("*[style]")).map(function(r){var t={};t.vt=r;t.style=r.getAttribute("style");return t}).filter(function(r){return l.test(r.style)}).map(function(r){for(var t=r.style,u=[];;){var v=l.exec(t);if(v)u.push(function(w){return function(){return w}}(t.substr(0,v.index+1))),u.push(function(w,x){switch(x){case "vw":return function(y){return Math.round(y*w)+"px"};case "vh":return function(y,z){return Math.round(z*w)+
"px"};case "vmin":return function(y,z,A){return Math.round(A*w)+"px"};case "vmax":return function(y,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.Leb=u,r}});this.Gb&&g.get(this.Gb).EO(this.xL)};q.prototype.xL=function(r,t,u,v){this.Zca.length!=0&&(this.Zca.forEach(function(w){var x=w.Leb.map(function(y){return y(r,t,u,v)}).join("");w.vt.setAttribute("style",x)}),this.NAa())};
q.prototype.zza=function(){var r="auto",t="auto";if(!this.fga()){this.cn!=this.nb()&&this.lc();var u=this.nb()-(this.u.Dd+this.u.Ce);u>0&&(r=u+"px")}this.sza()||(this.bn!=this.Mb()&&this.lc(),u=this.Mb()-(this.u.ie+this.u.Df),u>0&&(t=u+"px"));this.u.td.style.width=r;this.u.td.style.height=t};q.prototype.qBa=function(){var r=this.wa().qoa(),t=this.wa().poa();this.L2!=r||this.K2!=t?(this.L2=r,this.K2=t,this.lc(),this.aV(q.uca)):(r=(new Date).getTime()-this.sFa,r>q.SWa?this.aV(q.BWa):r>q.RWa&&this.aV(q.AWa))};
q.prototype.m7a=function(){this.sFa=(new Date).getTime()};q.prototype.aV=function(r){this.DG==q.uca&&this.m7a();this.DG!=r&&(this.DG!=q.J_&&q.Fwa[this.DG].h(n.De,this.qBa,this),this.DG=r,this.DG!=q.J_&&q.Fwa[this.DG].bind(n.De,this.qBa,this,!0))};q.J_="stopped";q.BWa="slow";q.AWa="normal";q.uca="fast";q.SWa=3E4;q.RWa=5E3;q.Fwa={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,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.Pb=function(){this.Il(k.ad)};k.ad=Object.assign({},h.ad,{layout:n.RZ});return k}(h)});
define("tdv/view/text/HTMLText",["require","exports","tdv/view/constants/OverflowPolicy","tdv/view/containers/AbsoluteContainer","tdv/view/html/HTML"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.HC=null;b.npb=!0;return b}P(e,k);e.prototype.Pb=function(){k.prototype.Pb.call(this);this.m("overflow",h.Vr);this.m("html")};e.prototype.Kb=function(){k.prototype.Kb.call(this);this.HC==null&&(this.HC=new g,this.HC.xa({left:0,toolTipDisabled:!0}),this.mb(this.HC))};e.prototype.jb=
function(){this.S("html")&&(this.HC.set("content",this.G("html")),this.$("html"));this.Oc(["paddingLeft","paddingTop","paddingRight","paddingBottom"],{},[this.HC],!0,!0);this.Oc(["cursor"],{},[this.HC],!0,!1);k.prototype.jb.call(this);this.HC.set("width",this.fga()?void 0:"100%")};return e}(n)});
define("tdv/player/script/HTMLText",["require","tdv/view/text/HTMLText","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/text/HTMLText");return a("tdv/player/parser/ClassInfo").define("HTMLText",m,function(){m.call(this)})});
define("tdv/view/buttons/IconButton","require exports tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/view/util/URL tdv/view/buttons/ButtonGroup tdv/view/constants/Cursor tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/constants/ButtonMode tdv/view/images/Image".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){var p=k.Ak("debug");return function(q){function r(){var t=q.call(this,3)||this;t.b3a=function(){t.I9()};t.qR=function(){t.get("pressed")?(t.set("pressed",!1),t.o(new g(n.Lm))):
(t.set("pressed",!0),t.o(new g(n.Rk)))};t.gf("Button");t.set("ariaRole","button");t.set("autoRolledOver",!0);t.set("autoPressed",!0);t.set("cursor",b.qf);t.set("scaleMode",c.uj);t.Pda=document.createElement("canvas");t.Pda.width=1;t.Pda.height=1;t.Qda=t.Pda.getContext("2d");t.Qda.globalCompositeOperation="copy";t.bind(n.Eb,t.b3a,t,!1);return t}P(r,q);r.prototype.Pb=function(){q.prototype.Pb.call(this);this.m("buttonGroup");this.m("mode",f.af);this.m("pressed");this.m("iconURL");this.m("transparencyActive");
this.D("rollOverOpacity",d.ea,"opacity");this.D("rollOverIconURL",d.ea,"iconURL");this.D("pressedOpacity",d.Fb,"opacity");this.D("pressedIconURL",d.Fb,"iconURL");this.D("pressedRollOverOpacity",d.qc,"opacity");this.D("pressedRollOverIconURL",d.qc,"iconURL")};r.prototype.I9=function(t){t?q.prototype.set.call(this,"cursor",t):q.prototype.set.call(this,"cursor",this.H_a)};r.prototype.thb=function(t){if(!this.u.image)return!1;var u=this.Gb?this.Gb.fD:1,v=h.offset(this.u.image),w=(t.AE-v.left)/u,x=this.u.image.clientWidth;
t=(t.BE-v.top)/u;u=this.u.image.clientHeight;if(w>=0&&t>=0&&w<x&&t<u){if(p)return!0;this.Qda.drawImage(this.u.image,w*this.dN/x,t*this.cN/u,1,1,0,0,1,1);if(this.Qda.getImageData(0,0,1,1).data[3]>0)return!0}return!1};r.prototype.set=function(t,u){t==="cursor"&&(this.H_a=u);return q.prototype.set.call(this,t,u)};r.prototype.jb=function(){this.S("transparencyActive")&&(this.D8a(this.G("transparencyActive")),this.$("transparencyActive"));var t=!1;if(this.S("backgroundOpacity")||this.S("backgroundColor")||
this.S("backgroundBlur"))t=!0;if(this.S("iconURL")){var u=this.G("iconURL");this.set("url",u);this.$("iconURL")}u=!1;this.S("mode")&&(this.G("mode")==f.af?(this.h(n.ma,this.qR,this),this.set("autoPressed",!0)):(this.bind(n.ma,this.qR,this,!0),this.set("autoPressed",!1)),this.$("mode"),u=!0);if(u||this.S("pressed"))this.G("mode")==f.ak?this.JN(this.G("pressed")==1):u&&this.JN(!1);this.S("buttonGroup")&&((u=this.G("buttonGroup"))?e.register(this,u):e.unregister(this),this.$("buttonGroup"));q.prototype.jb.call(this);
!t||this.u.nm!=0&&this.u.uk.length!=0&&this.u.bJ!=0||(this.GEa(.001),this.FEa(["#000000"]))};r.prototype.D8a=function(t){this.yM.iRa(t)};return r}(l)});define("tdv/player/script/IconButton",["require","tdv/view/buttons/IconButton","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/buttons/IconButton");return a("tdv/player/parser/ClassInfo").define("IconButton",m,function(){m.call(this)})});
define("tdv/player/script/IconHotspotMapOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotMapOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotMapOverlay");return m.define("IconHotspotMapOverlay",h,function(){h.call(this,!1)})});
define("tdv/player/script/Image",["require","tdv/view/images/Image","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/images/Image");a=a("tdv/player/parser/ClassInfo").define("Image",m,function(){m.call(this)});a.prototype.set=function(h,n){m.prototype.set.call(this,h,n)};return a});
define("tdv/player/script/ImagePlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlaneModel3DObject");return m.define("ImagePlaneModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/InnerModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("InnerModel3DObject",h,function(){h.call(this)})});define("tdv/player/script/Label",["require","tdv/view/text/Label","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/text/Label");return a("tdv/player/parser/ClassInfo").define("Label",m,function(){m.call(this)})});
define("tdv/player/script/LensFlarePanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("LensFlarePanoramaOverlay",m,function(){m.call(this)})});
define("tdv/player/script/LineModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("LineModel3DObject",h,function(){h.call(this)})});
define("tdv/player/script/LivePanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Panorama");a=m.define("LivePanorama",h,function(){h.call(this)});a.prototype.oX=function(){return this.get("initialFrameIndex",0)};return a});
define("tdv/player/script/Light",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Light",m,function(){m.call(this)})});
define("tdv/player/view/map/renderer/item/Map",["require","tdv/utils","tdv/player/view/map/renderer/item/Item"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Item");a=m.extend(h,function(n,g,k,e,b,c,d){h.call(this,h.Kua);this.C=n;this.Se=g;this.Pa=k;this.Ha=e;this.ti=b;this.M0a=c;this.xq=d.slice()});a.prototype.eE=function(){for(var n=[this.Se],g=0;g<this.xq.length;g++)n=n.concat(this.xq[g].eE());return n};a.prototype.rl=function(){return this.Se};a.prototype.fg=function(){return this.Pa};
a.prototype.wg=function(){return this.Ha};return a});
define("tdv/player/script/Map","require tdv/player/parser/ClassInfo tdv/view/constants/ScaleMode tdv/player/script/Media tdv/player/script/helper/LevelUtil tdv/player/view/map/renderer/item/Map".split(" "),function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/view/constants/ScaleMode"),n=a("tdv/player/script/Media"),g=a("tdv/player/script/helper/LevelUtil"),k=a("tdv/player/view/map/renderer/item/Map");a=m.define("Map",n,function(){n.call(this);this.Wy=this.GU=void 0});a.prototype.Pjb=function(){this.Wy=
this.GU=void 0};a.prototype.mP=function(){return!(!this.get("image")||!g.mP(this.get("image")))};a.prototype.vJ=function(){return this.get("image")&&g.vJ(this.get("image"))};a.prototype.Et=function(){return this.get("image")&&g.Et(this.get("image"))};a.prototype.ELa=function(){this.GU==void 0&&(this.mP()?this.GU=new k(this,this.vJ().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",h.sF),this.get("flipImageHorizontally",!1),[]):this.GU=null);return this.GU};a.prototype.cr=function(){if(this.Wy==
void 0)if(this.get("image")){var e=Array.prototype.concat.apply([],this.get("overlays",[]).map(function(b){return b.wfb()}));this.Wy=new k(this,this.Et().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",h.sF),this.get("flipImageHorizontally",!1),e)}else this.Wy=null;return this.Wy};a.prototype.rw=function(){return[].concat(this.Qya(this.ELa()),this.Qya(this.cr()))};a.prototype.Qya=function(e){return e?e.eE():[]};return a});
define("tdv/player/script/MapOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MapOverlay",m,function(){m.call(this)})});
define("tdv/player/script/helper/ButtonProperty","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/constants/State");a=m.extend(g,function(b,c,d){g.call(this);this.Twa=b;this.D6a=c;this.jwa=d||k.af;this.ek=[];this.zG=[];this.hC=
{};this.hC.mode=this.jwa;this.jwa==k.ak&&(this.hC.pressed=!1);this.Twa.bind(h.L(c),this.RDa,this);this.RDa()});a.prototype.RDa=function(){var b=this.Twa.get(this.D6a);b||(b=[]);Array.isArray(b)||(b=[b]);this.Z7a(b)};a.prototype.Z7a=function(b){m.difference(this.ek,b).forEach(c=>{c.h(h.Rk,this.mwa,this,!0);c.h(h.Lm,this.nwa,this,!0);c.h(h.ma,this.iwa,this,!0);c.h(h.Sa,this.kwa,this,!0);c.h(h.$a,this.lwa,this,!0);c.h(h.uc,this.pwa,this,!0);c.h(h.Eb,this.owa,this,!0)});m.difference(b,this.ek).forEach(c=>
{c.xa(this.hC);c.bind(h.Rk,this.mwa,this,!0);c.bind(h.Lm,this.nwa,this,!0);c.bind(h.ma,this.iwa,this,!0);c.bind(h.Sa,this.kwa,this,!0);c.bind(h.$a,this.lwa,this,!0);c.bind(h.uc,this.pwa,this,!0);c.bind(h.Eb,this.owa,this,!0)},this);this.ek=b;this.zG=this.zG.filter(function(c){return this.ek.indexOf(c)>=0}.bind(this))};a.prototype.mwa=function(){this.o(new n(h.Rk))};a.prototype.nwa=function(){this.o(new n(h.Lm))};a.prototype.iwa=function(){this.o(new n(h.ma))};a.prototype.kwa=function(){this.o(new n(h.Sa))};
a.prototype.lwa=function(){this.o(new n(h.$a))};a.prototype.pwa=function(b){this.zG.push(b.source);this.jm()};a.prototype.owa=function(b){this.zG=this.zG.filter(function(c){return c!=b.source});this.jm()};a.prototype.set=function(b,c){this.hC[b]=c;this.ek.forEach(function(d){d.xa(this.hC)}.bind(this));this.jm()};a.prototype.jm=function(){this.ek.forEach(function(b){b.get("state")==e.Fb&&this.zG.indexOf(b)>=0?b.set("state",e.qc):b.get("state")==e.qc&&this.zG.indexOf(b)<0&&b.set("state",e.Fb)}.bind(this))};
return a});
define("tdv/binding/BindingsHandler",["require","exports","tdv/utils","tdv/binding/ChangeWatcher"],function(a,m,h,n){var g=function(){return function(){}}();return function(){function k(){}k.ba=function(e,b,c,d){this.Ava(e,b,c,d,!1)};k.KD=function(e,b,c,d){this.Ava(e,b,c,d,!0)};k.Ava=function(e,b,c,d,f){function l(){for(var r=[],t=0;t<b.length;t++)try{r.push(e.get(b[t]))}catch(u){r.push(void 0),h.TX("BindingsHandler._addBinding",u)}c.apply(this,r)}b=h.toArray(b);f&&(l=h.mr(l));var p=[];b.forEach(function(r){(r=
n.jx(e,r,l,this,!f))&&p.push(r)},this);var q=new g;q.qob=p;q.host=e;q.properties=b;q.CX=c;this.$ma.push(q);d&&l()};k.da=function(e,b,c){var d=[];this.$ma.forEach(function(f){f.CX==c&&f.host==e&&h.Kgb(f.properties,h.toArray(b))?f.qob.forEach(function(l){l.hF()}):d.push(f)});this.$ma=d};k.$ma=[];return k}()});
define("tdv/player/view/PlaybackBar","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/view/constants/State tdv/view/constants/Cursor tdv/view/containers/AbsoluteContainer tdv/view/core/UIComponent tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/view/constants/State"),k=a("tdv/view/constants/Cursor"),e=a("tdv/view/containers/AbsoluteContainer"),b=a("tdv/view/core/UIComponent");
a("tdv/view/effects/FadeInEffect");a("tdv/view/effects/FadeOutEffect");var c=m.extend(e,function(){e.call(this);this.gf("PlaybackBar");this.tn=this.Sg=null;this.Qh=[];this.j4=!1;this.hja=this.bI=void 0;this.Ska=!1});c.ad=Object.assign({},e.ad,{cursor:k.qf,overflow:"visible",height:20,position:0,duration:100,steps:void 0,selectedStep:void 0,backgroundColor:"#000000",barBackgroundColor:"#FFFFFF",barBackgroundColorDirection:void 0,barBackgroundColorRatios:void 0,barBorderColor:void 0,barBorderRadius:void 0,
barBorderSize:void 0,barOpacity:void 0,liveDragging:void 0,playheadBackgroundColor:"#FFFFFF",playheadBackgroundColorDirection:void 0,playheadBackgroundColorRatios:void 0,playheadBorderColor:void 0,playheadBorderRadius:void 0,playheadBorderSize:void 0,playheadOpacity:void 0,playheadWidth:5,playheadHeight:30,playheadShadow:!0,playheadShadowBlurRadius:3,playheadShadowColor:"#000000",playheadShadowHorizontalLength:0,playheadShadowOpacity:void 0,playheadShadowSpread:0,playheadShadowVerticalLength:3,stepBackgroundColor:"#FFFFFF",
stepBackgroundColorDirection:void 0,stepBackgroundColorRatios:void 0,stepBorderColor:void 0,stepBorderRadius:6,stepBorderSize:0,stepOpacity:1,stepWidth:12,stepHeight:12,stepShadow:!0,stepShadowBlurRadius:6,stepShadowColor:"#000000",stepShadowHorizontalLength:0,stepShadowOpacity:void 0,stepShadowSpread:0,stepShadowVerticalLength:0,selectedStepBackgroundColor:"#3399FF",selectedStepBackgroundColorDirection:void 0,selectedStepBackgroundColorRatios:void 0,selectedStepBorderColor:"#ffffff",selectedStepBorderRadius:10,
selectedStepBorderSize:2,selectedStepOpacity:1,selectedStepWidth:20,selectedStepHeight:20,selectedStepShadow:!0,selectedStepShadowBlurRadius:3,selectedStepShadowColor:"#000000",selectedStepShadowHorizontalLength:0,selectedStepShadowOpacity:void 0,selectedStepShadowSpread:0,selectedStepShadowVerticalLength:0});c.prototype.Pb=function(){this.Il(c.ad)};c.prototype.Kb=function(){e.prototype.Kb.call(this);this.Sg&&this.tn||this.bind(h.$b,this.p6a,this,!0);this.Sg==null&&(this.Sg=new b,this.Sg.xa({left:"0",
height:"100%",cursor:k.qf}),this.mb(this.Sg));this.tn==null&&(this.tn=new b,this.tn.xa({left:"0",cursor:k.qf}),this.tn.bind(h.$b,this.s6a,this,!0),this.tn.bind(h.Sa,this.q6a,this,!0),this.bind(h.ma,this.n6a,this,!0),this.tn.bind(h.$a,this.r6a,this,!0),this.mb(this.tn));var f=this.get("steps")||0;if(this.Qh.length!=f){for(;this.Qh.length>f;)this.L_a(this.Qh.pop());for(;this.Qh.length<f;)this.Qh.push(this.B_a());this.Oc(c.sva,c.Gca,this.Qh,!1,!0);this.iHa();this.ema();this.qr(this.tn,this.Cb().length-
1)}};c.prototype.B_a=function(){var f=new d;f.xa({cursor:k.qf});f.bind(h.ma,this.CFa,this,!0);f.bind(h.$b,this.DFa,this,!0);this.mb(f);return f};c.prototype.L_a=function(f){f.h(h.ma,this.CFa,this,!0);f.h(h.$b,this.DFa,this,!0);this.removeChild(f)};c.prototype.jb=function(){var f=!1;if(this.S("position")||this.S("duration"))this.$("position"),this.$("duration"),f=!0;this.S("selectedStep")&&(this.$("selectedStep"),this.iHa());this.S("steps")&&(this.$("steps"),this.KX());this.Oc(c.tca,c.$Q,[this.Sg],
!0,!0);this.Oc(c.MWa,c.pva,[this.tn],!0,!0);this.Oc(c.sva,c.Gca,this.Qh,!0,!0);e.prototype.jb.call(this);f&&this.d6()};c.prototype.iHa=function(){var f=this.get("selectedStep");this.Qh.forEach(function(l,p){l.pZ(p===f)});this.tn.set("visible",f===void 0)};c.prototype.d6=function(){var f=this.Xh(),l=this.Wh(),p=this.tn.nb(),q=this.tn.Mb(),r=this.hS(),t=this.ls(),u=t*f/r;r=Math.round((this.j4?this.bI:t)*f/r-p*.5);r=Math.max(0,Math.min(r,f-p));this.tn.xa({left:r,top:Math.round(l*.5-q*.5)});this.Sg.set("width",
Math.round(u))};c.prototype.s6a=function(){this.d6()};c.prototype.q6a=function(f){this.j4=!0;this.hja=f.pageX;this.bI=this.G("position");this.aka=this.v2a();this.aka.bind(h.gb,this.gja,this,!0)};c.prototype.v2a=function(){for(var f=this.getParent();f.getParent();)f=f.getParent();return f};c.prototype.gja=function(f){if(this.j4){var l=f.pageX-this.hja;this.hja=f.pageX;f=this.nb();var p=this.hS();this.bI=Math.max(0,Math.min(p,this.bI+p*l/f));this.get("liveDragging")&&(this.set("position",this.bI),this.o(new n(h.V)));
this.d6()}};c.prototype.r6a=function(f){this.aka.h(h.gb,this.gja,this);this.aka=null;this.gja(f);this.j4=!1;this.get("liveDragging")||(this.set("position",this.bI),this.o(new n(h.V)));this.bI=void 0};c.prototype.n6a=function(f){if(!this.Ska){var l=this.nb(),p=this.hS();this.set("position",p*f.x/l);this.o(new n(h.V))}};c.prototype.DFa=function(){this.ema()};c.prototype.p6a=function(){this.ema();this.d6()};c.prototype.ema=function(){for(var f=this.nb(),l=this.Mb(),p=this.lw(),q=this.getParent().nb()-
(p+f),r=0,t=this.Qh.length;r<t;r++){var u=this.Qh[r],v=u.nb();u.xa({left:r==0&&p==0?0:r==t-1&&q==0?f-v:Math.round(f*r/(t-1)-v*.5),top:Math.round(l*.5-u.Mb()*.5)})}};c.prototype.CFa=function(f){f=this.Qh.indexOf(f.source);var l=this.hS();this.set("position",l*f/(this.Qh.length-1));this.Ska=!0;this.o(new n(h.V));setTimeout(function(){this.Ska=!1}.bind(this),0)};c.prototype.hS=function(){var f=this.G("duration");return f?f:1};c.prototype.ls=function(){return Math.max(0,Math.min(this.hS(),this.G("position")))};
c.$Q={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};c.tca=Object.keys(c.$Q);c.pva={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.MWa=Object.keys(c.pva);c.Gca={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.sva=Object.keys(c.Gca);var d=m.extend(b,function(){b.call(this)});d.prototype.pZ=function(f){this.hV(f)};d.prototype.Pb=function(){b.prototype.Pb.call(this);this.m("backgroundColor");this.m("backgroundColorDirection");this.m("backgroundColorRatios");this.m("borderColor");
this.m("borderRadius");this.m("borderSize");this.m("opacity");this.m("width");this.m("height");this.m("shadow");this.m("shadowBlurRadius");this.m("shadowColor");this.m("shadowHorizontalLength");this.m("shadowOpacity");this.m("shadowSpread");this.m("shadowVerticalLength");this.D("selectedBackgroundColor",g.oa,"backgroundColor");this.D("selectedBackgroundColorDirection",g.oa,"backgroundColorDirection");this.D("selectedBackgroundColorRatios",g.oa,"backgroundColorRatios");this.D("selectedBorderColor",
g.oa,"borderColor");this.D("selectedBorderRadius",g.oa,"borderRadius");this.D("selectedBorderSize",g.oa,"borderSize");this.D("selectedOpacity",g.oa,"opacity");this.D("selectedWidth",g.oa,"width");this.D("selectedHeight",g.oa,"height");this.D("selectedShadow",g.oa,"shadow");this.D("selectedShadowBlurRadius",g.oa,"shadowBlurRadius");this.D("selectedShadowColor",g.oa,"shadowColor");this.D("selectedShadowHorizontalLength",g.oa,"shadowHorizontalLength");this.D("selectedShadowOpacity",g.oa,"shadowOpacity");
this.D("selectedShadowSpread",g.oa,"shadowSpread");this.D("selectedShadowVerticalLength",g.oa,"shadowVerticalLength")};d.prototype.jb=function(){b.prototype.jb.call(this)};return c});
define("tdv/player/view/ProgressBar",["require","tdv/utils","tdv/view/containers/AbsoluteContainer","tdv/view/core/UIComponent"],function(a){var m=a("tdv/utils"),h=a("tdv/view/containers/AbsoluteContainer"),n=a("tdv/view/core/UIComponent"),g=m.extend(h,function(){h.call(this);this.gf("ProgressBar")});g.ad=Object.assign({},h.ad,{percent:0,backgroundColor:"#000000",barBackgroundColor:"#FFFFFF",barBackgroundColorDirection:void 0,barBackgroundColorRatios:void 0,barBorderColor:void 0,barBorderRadius:void 0,
barBorderSize:void 0,barOpacity:void 0});g.prototype.Pb=function(){this.Il(g.ad)};g.prototype.Kb=function(){h.prototype.Kb.call(this);this.Sg==null&&(this.Sg=new n,this.Sg.xa({left:"0",width:"0%",height:"100%"}),this.mb(this.Sg))};g.prototype.jb=function(){this.S("percent")&&(this.Sg.set("width",Math.round(this.G("percent"))+"%"),this.$("percent"));this.Oc(g.tca,g.$Q,[this.Sg],!0,!0);h.prototype.jb.call(this)};g.$Q={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",
barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};g.tca=Object.keys(g.$Q);return g});
define("tdv/player/view/webgl/system/util/Util","require tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL tdv/view/util/Fullscreen".split(" "),function(a){var m=a("tdv/player/view/util/Capabilities"),h=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/FileType"),g=a("tdv/player/view/util/URL"),k=a("tdv/view/util/Fullscreen"),e={aqb:function(q){return this.wP(q)||this.eNa(q)?!0:!1},Ix:function(){var q=h.kjb();e.Ix=function(){return q};
return q},eNa:function(q){return typeof q=="string"&&n.is(q,n.Wp)?!0:!1},Wpb:function(q){return this.epa(q)||this.fpa(q)?!0:!1},fpa:function(q){return typeof q=="string"&&(n.is(q,n.YUa)||n.iE(q,n.ZUa))?!0:!1},wP:function(q){return!!q&&!!q.tagName&&q.tagName=="VIDEO"},rP:function(q){return typeof q=="string"&&n.is(q,n.HLS)||this.wP(q)&&n.is(q.currentSrc,n.HLS)?!0:!1},Mn:function(q){return typeof q=="string"&&n.is(q,n.Wp)||this.wP(q)&&n.is(q.currentSrc,n.Wp)?!0:!1},epa:function(q){return!!q&&!!q.tagName&&
q.tagName=="IMG"},hhb:function(q){return!!q&&!!q.tagName&&q.tagName=="CANVAS"},Qpb:function(q){return Math.pow(2,Math.round(Math.log(q)/Math.LN2))},Ypb:function(q){return q!==0&&(q&q-1)===0},RMa:function(){return h.Yb()==h.Nk},Xpb:function(){return h.Yb()==h.rF},gr:function(){return h.Nd()==h.vj}},b=h.Nd()==h.uB&&!h.kf()&&h.ccb()<11;e.ETa=function(q){return d||b&&q&&q.currentTime<.2?!0:!1};e.wMa=function(){return e.RMa()||e.gr()};e.vMa=function(){return e.gr()&&m.Rgb&&h.Qoa()<11};var c=!1;e.NMa=function(){c=
!1};e.ihb=function(){return c};e.ikb=function(){c=!0};var d=g.Ak("vic");e.cjb=function(){e.gr()&&(d=!0)};e.HLa=function(){return{alpha:!0,depth:!0,stencil:!1,antialias:m.Acb()?!0:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"high-performance",xrCompatible:!e.RMa()}};e.Rdb=function(q){if(m.LPa==2){var r=e.HLa();r=q.getContext("webgl2",r)}r||(r=e.HLa(),r=q.getContext("webgl",r)||q.getContext("experimental-webgl",r));return r};e.QJa=function(q){var r;r||(r=q.getSize(new THREE.Vector2));
q=new THREE.WebGLRenderTarget(r.width,r.height,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType,samples:q.capabilities.isWebGL2?h.ub()?2:8:0});q.depthTexture=new THREE.DepthTexture;return q};e.Qdb=function(q){return new THREE.WebGLCubeRenderTarget(q,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType})};e.getPixelRatio=function(){if(h.ub()){var q=0,r=0;try{q=window.top.innerWidth,r=window.top.innerHeight}catch(t){if(h.Nd()==
h.uB&&window.devicePixelRatio>1)return window.devicePixelRatio}q=[Math.max(document.documentElement.clientWidth,q),Math.max(document.documentElement.clientHeight,r)].sort(function(t,u){return u-t});q=[p[0]/q[0],p[1]/q[1]].sort()[0];if(q!==Infinity)return q}else if(h.Nd()==h.Bta&&h.Yb()==h.Pp)return 1;return window.devicePixelRatio};e.UKa=function(q){if(!h.ub()||h.Nd()!=h.uB||!k.enabled()||!q)return e.getPixelRatio();q=[q.clientWidth,q.clientHeight].sort(function(r,t){return t-r});return[p[0]/q[0],
p[1]/q[1]].sort()[0]};var f=!1,l=[];e.G$=function(q){f=q;l.forEach(function(r){r(q)})};e.Zbb=function(q){l.push(q)};e.Fhb=function(){return f};var p=[screen.width*window.devicePixelRatio,screen.height*window.devicePixelRatio].sort(function(q,r){return r-q});return e});define("tdv/player/view/panorama/renderer/3d/util/Util",["require","tdv/player/view/webgl/system/util/Util"],function(a){return a("tdv/player/view/webgl/system/util/Util")});
define("tdv/player/view/common/SceneFaderState",["require","exports"],function(){return function(){return function(){this.XD=this.ZO=void 0}}()});
define("tdv/player/view/common/SceneFader",["require","exports","tdv/player/view/panorama/renderer/3d/util/Util","three.mod","tdv/constants/RenderOrder"],function(a,m,h,n,g){a=function(){function e(b,c,d,f){this.state=b;this.renderer=c;this.scene=d;this.camera=f;this.sdb()}e.prototype.dispose=function(){this.Ocb()};e.prototype.update=function(b,c){if(this.state.XD!==void 0)if(this.vp.material.opacity=1-this.state.XD,b=c.parent!=null?c:b,this.vp.parent!==b&&b.add(this.vp),c.isPerspectiveCamera){this.vp.position.z=
-c.near*1.01;var d=this.renderer.getSize(new n.Vector2),f=d.height;b=this.m7.width;var l=this.m7.height;c=f/(2*Math.tan(c.fov*k/2));c=Math.max(f/c,d.width/(c*b/l));this.vp.scale.y=c;this.vp.scale.x=c*b/l}else c.isOrthographicCamera&&(this.vp.position.z=-(c.near+.1),this.renderer.getSize(new n.Vector2),this.vp.scale.y=c.top-c.bottom,this.vp.scale.x=c.right-c.left)};e.prototype.Sf=function(){return this.scene};e.prototype.sdb=function(){this.m7=this.Kcb();this.vp=this.Idb(this.m7)};e.prototype.Kcb=
function(){this.renderer.$q=!0;var b=h.QJa(this.renderer),c=this.renderer.getRenderTarget();this.renderer.setRenderTarget(b);this.renderer.render(this.scene,this.camera);this.renderer.setRenderTarget(c);this.renderer.$q=!1;return b};e.prototype.Idb=function(b){b=new n.SpriteMaterial({map:b.texture});b.sizeAttenuation=!1;b.transparent=!0;b.visible=!0;b.opacity=1;b.depthTest=!1;b.needsUpdate=!0;b=new n.Sprite(b);b.renderOrder=g.RVa;return b};e.prototype.Ocb=function(){var b,c,d,f=this.vp.material;(b=
f.map)===null||b===void 0||b.dispose();(c=f.envMap)===null||c===void 0||c.dispose();f.dispose();this.vp.geometry.dispose();this.m7.dispose();(d=this.vp.parent)===null||d===void 0||d.remove(this.vp)};return e}();var k=Math.PI/180;return a});
define("tdv/player/view/common/XRSceneFader",["require","exports","tdv/player/view/util/XR","three.mod","tdv/constants/RenderOrder"],function(a,m,h,n,g){return function(){function k(e,b,c){this.state=e;this.scene=c;this.vna()}k.prototype.dispose=function(){this.Wcb()};k.prototype.update=function(){this.$O.material.opacity=Math.max(this.state.ZO===void 0?0:1-this.state.ZO,this.state.XD===void 0?0:this.state.XD)};k.prototype.Sf=function(){return this.scene};k.prototype.vna=function(){var e=new n.SphereGeometry(1,
32,16,0,Math.PI*2,0,Math.PI),b=new n.MeshBasicMaterial({color:0,side:n.DoubleSide,depthTest:!1,depthWrite:!1,transparent:!0});e=new n.Mesh(e,b);e.renderOrder=g.wWa;e.frustumCulled=!1;e.userData.NJ=!0;this.$O=e;h.Zq.add(this.$O)};k.prototype.Wcb=function(){var e;this.$O.material.dispose();this.$O.geometry.dispose();(e=this.$O.parent)===null||e===void 0||e.remove(this.$O)};return k}()});
define("tdv/player/view/common/WebGLRendererAugmenter","require exports tdv/constants/EventName tdv/player/view/common/SceneFaderState tdv/player/view/common/SceneFader tdv/player/view/common/XRSceneFader tdv/player/view/util/XR tdv/player/view/util/Device tdv/player/view/util/Flags".split(" "),function(a,m,h,n,g,k,e,b,c){return function(){function d(f){this.W$=this.V$=this.Y$=this.Z$=this.X$=this.$$=void 0;this.Yt=null;this.jpa=!1;this.$W=void 0;this.renderer=f;this.Sw=new n;this.fPa=this.renderer.render.bind(f);
this.renderer.render=this.render.bind(this);this.hPa=this.renderer.setSize.bind(f);this.renderer.setSize=this.setSize.bind(this);this.Rib=this.renderer.clear.bind(f);this.renderer.clear=this.clear.bind(this);this.gPa=this.renderer.setRenderTarget.bind(f);this.renderer.setRenderTarget=this.setRenderTarget.bind(this);e.M.bind(h.V,this.Ta,this,!0);window.startFadeOut=this.cF.bind(this);window.setFadeOutPosition=this.QE.bind(this);window.endFadeOut=this.VD.bind(this)}d.prototype.dispose=function(){var f;
e.M.h(h.V,this.Ta,this);(f=this.Yt)===null||f===void 0||f.dispose()};d.prototype.setSize=function(f,l,p){p===void 0&&(p=!0);!this.renderer.$q&&this.nj()?(this.$$=f,this.X$=l,this.Z$=p):this.hPa(f,l,p)};d.prototype.setRenderTarget=function(f,l,p){l===void 0&&(l=0);p===void 0&&(p=0);this.nj()&&!this.Jhb(f)?(this.Y$=f,this.V$=l,this.W$=p):this.gPa(f,l,p)};d.prototype.Jhb=function(f){return this.jpa||this.renderer.$q||f.isXRRenderTarget||f.textures&&f.textures.length>0&&f.textures[0].name&&f.textures[0].name.includes("PMREM")?
!0:!1};d.prototype.render=function(f,l){var p;if(f.isScene){if(!this.renderer.$q){if(this.Yt&&this.Yt.Sf()===f&&f!==this.K8)return;e.tra(this.renderer,f,l,this.Usa);if(this.nj()||this.renderer.getRenderTarget()===null||(l===null||l===void 0?0:l.isPerspectiveCamera)&&((p=this.renderer.getRenderTarget())===null||p===void 0?0:p.bNa))this.K8=f,this.hNa=l,this.Yt&&this.Yt.update(f,l)}if(this.Beb(f,l))return}this.jpa=!0;try{this.fPa(f,l)}catch(q){c.uu&&console.error("render error:",q)}this.jpa=!1};d.prototype.clear=
function(f,l,p){this.Rib(f,l,p)};d.prototype.Ta=function(){this.nj()||(this.$$!==void 0&&this.X$!==void 0&&this.Z$!==void 0&&(this.hPa(this.$$,this.X$,this.Z$),this.Z$=this.X$=this.$$=void 0),this.Y$!==void 0&&this.V$!==void 0&&this.W$!==void 0&&(this.gPa(this.Y$,this.V$,this.W$),this.W$=this.V$=this.Y$=void 0))};d.prototype.nj=function(){return e.isPresenting&&e.Ag===this.renderer};d.prototype.cF=function(){this.Sw.XD=0;this.GZ()};d.prototype.QE=function(f){this.Sw.XD=f};d.prototype.VD=function(){this.Sw.XD=
void 0;this.GZ()};d.prototype.xK=function(){this.Sw.ZO=0;this.GZ()};d.prototype.lK=function(f){this.Sw.ZO=f;this.GZ()};d.prototype.mJ=function(){this.Sw.ZO=void 0;this.GZ()};d.prototype.Beb=function(f,l){if(!e.isPresenting||this.$W===0)return!1;if(this.$W===void 0){if(b.xc()!=b.su&&b.xc()!=b.yB)return this.$W=0,!1;this.$W=20}this.$W--;var p=l.near,q=l.far;l.near=Math.min(p,.1);l.far=Math.max(q,1E3);this.fPa(f,l);l.near=p;l.far=q;return!0};d.prototype.GZ=function(){var f=this.K8&&(e.isPresenting&&
this.Sw.ZO!==void 0||this.Sw.XD!==void 0);f!==!!this.Yt&&(f?this.nj()?this.Yt=new k(this.Sw,this.renderer,this.K8,this.hNa):this.Yt=new g(this.Sw,this.renderer,this.K8,this.hNa):this.Yt&&(this.Yt.dispose(),this.Yt=null))};return d}()});
define("tdv/player/view/common/RenderersContainer","require exports tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/util/Flags tdv/player/view/util/XR tdv/player/view/common/WebGLRendererAugmenter three.mod tdv/view/util/Fullscreen".split(" "),function(a,m,h,n,g,k,e,b,c){function d(f,l){return f.Ioa!==l.Ioa?f.Ioa-l.Ioa:f.renderOrder!==l.renderOrder?f.renderOrder-l.renderOrder:f.object.yw||l.object.yw?(f.object.yw?-1:1)-(l.object.yw?-1:1):f.z!==l.z?l.z-f.z:f.id-
l.id}return function(){function f(l){this.uW=!0;this.pr=this.renderer=null;this.Iqa=void 0;this.Gk=0;this.uW=l;this.container=document.createElement("div")}f.prototype.dispose=function(){this.ya()};f.prototype.w6=function(){this.Gk++};f.prototype.Cgb=function(){return this.Gk>0};f.prototype.Z9=function(){this.Gk--;this.Gk===0&&this.ya()};f.prototype.cc=function(){return this.container};f.prototype.uMa=function(){return!!this.renderer};f.prototype.Kn=function(){this.IRa();return this.renderer};f.prototype.Ueb=
function(){this.Mlb();return this.TD};f.prototype.Veb=function(){this.Nlb();return this.st};f.prototype.kmb=function(){this.C$(f.sua)};f.prototype.jmb=function(){this.C$(f.OVa)};f.prototype.pmb=function(){this.C$(f.PVa)};f.prototype.mmb=function(){this.C$(f.tua)};f.prototype.cF=function(){var l;(l=this.pr)===null||l===void 0||l.cF()};f.prototype.QE=function(l){var p;(p=this.pr)===null||p===void 0||p.QE(l)};f.prototype.VD=function(){var l;(l=this.pr)===null||l===void 0||l.VD()};f.prototype.xK=function(){var l;
this.IRa();(l=this.pr)===null||l===void 0||l.xK()};f.prototype.lK=function(l){var p;(p=this.pr)===null||p===void 0||p.lK(l)};f.prototype.mJ=function(){var l;(l=this.pr)===null||l===void 0||l.mJ()};f.prototype.Mlb=function(){this.TD||(this.TD=new b.CSS3DRenderer,this.TD.domElement.style.position="absolute",this.TD.domElement.style.zIndex="0",this.container.prepend(this.TD.domElement))};f.prototype.IRa=function(){if(!this.renderer){var l={alpha:!0};g.LUa&&(l.precision="lowp");f.nna.length>0?(l.context=
f.nna.pop(),l.canvas=l.context.canvas):(l.canvas=document.createElement("canvas"),l.context=n.Rdb(l.canvas));this.renderer=new b.WebGLRenderer(l);this.pr=new e(this.renderer);this.renderer.setAnimationLoop(null);this.renderer.setPixelRatio(n.getPixelRatio());this.renderer.debug.checkShaderErrors=g.uu;this.renderer.domElement.style.position="absolute";this.renderer.domElement.style.zIndex="1";this.renderer.domElement.style.pointerEvents="none";this.renderer.outputColorSpace=b.SRGBColorSpace;this.renderer.shadowMap.type=
b.PCFShadowMap;this.renderer.setTransparentSort(d);this.st?this.container.insertBefore(this.renderer.domElement,this.st.domElement):this.container.appendChild(this.renderer.domElement);this.sTa();k.Xbb(this.renderer);c.M.bind(h.V,this.rOa,this,!0)}};f.prototype.rOa=function(){setTimeout(function(){this.renderer&&this.renderer.setPixelRatio(n.UKa(this.renderer.domElement))}.bind(this),100)};f.prototype.C$=function(l){this.Iqa!==l&&(this.Iqa=l,this.sTa())};f.prototype.sTa=function(){if(this.renderer)switch(this.Iqa){case f.sua:this.renderer.setClearColor(0,
1);this.renderer.autoClear=!1;this.renderer.shadowMap.enabled=!1;this.renderer.localClippingEnabled=!1;this.pr.Usa=k.TQ.bca;break;case f.tua:this.renderer.setClearColor(0,0);this.renderer.autoClear=!1;this.renderer.shadowMap.enabled=!0;this.renderer.localClippingEnabled=!0;this.pr.Usa=k.TQ.Tba;break;default:this.renderer.setClearColor(0,0),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!0,this.renderer.localClippingEnabled=!1,this.pr.Usa=k.TQ.Tba}};f.prototype.Nlb=function(){this.st||
(this.st=new b.CSS3DRenderer,this.st.domElement.style.position="absolute",this.st.domElement.style.zIndex="2",this.st.domElement.style.pointerEvents="none",this.container.appendChild(this.st.domElement))};f.prototype.ya=function(){var l;this.st&&(this.container.removeChild(this.st.domElement),this.st=null);this.renderer&&(c.M.h(h.V,this.rOa,this),k.Ejb(this.renderer),this.container.removeChild(this.renderer.domElement),f.nna.push(this.renderer.getContext()),this.renderer.clear(),this.renderer.dispose(),
this.renderer=null,(l=this.pr)===null||l===void 0||l.dispose(),this.pr=null);this.TD&&(this.container.removeChild(this.TD.domElement),this.TD=null)};f.sua=0;f.OVa=1;f.PVa=2;f.tua=3;f.nna=[];return f}()});
define("tdv/player/view/ScreenJoystick",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/player/view/util/Device"],function(a,m,h,n,g){return function(k){function e(b,c){var d=k.call(this)||this;d.enabled=!1;d.Y8=0;d.Z8=0;d.jqa=null;d.Tj=null;d.Am=null;d.lQ=null;d.Gk=0;d.eb=b;d.jqa=c;return d}P(e,k);e.prototype.dispose=function(){this.Ra(!1);this.jqa=this.eb=null};e.prototype.w6=function(){this.Gk++;this.Gk>=1&&this.Ra(!0)};e.prototype.Z9=function(){this.Gk--;this.Gk<=
0&&this.Ra(!1)};e.prototype.Ra=function(b){this.enabled!=b&&((this.enabled=b)?(this.eb.Ara("Button"),this.acb()):(this.eb.Rjb(),this.lna(),this.stop(),this.Jjb()))};e.prototype.getX=function(){return this.Y8};e.prototype.getY=function(){return this.Z8};e.prototype.$h=function(b){this.lf(b);this.enabled&&(this.Mpa=this.Kpa=b.x,this.Npa=this.Lpa=b.y,this.zlb())};e.prototype.Vj=function(b){this.Mpa=b.x;this.Npa=b.y;this.lQ?this.Nmb():this.Tj&&this.HK()};e.prototype.lf=function(){this.lna();this.stop()};
e.prototype.sOa=function(){this.lf()};e.prototype.sl=function(){this.vmin=Math.min(this.eb.nb(),this.eb.Mb())/100};e.prototype.start=function(){this.kA();this.o(h.Up);this.HK()};e.prototype.stop=function(){this.Tj&&(this.feb(),this.o(h.Fg))};e.prototype.Nmb=function(){var b=this.Mpa-this.Kpa,c=this.Npa-this.Lpa;Math.sqrt(b*b+c*c)>this.vmin*e.pUa&&this.lna()};e.prototype.zlb=function(){this.lQ=window.setTimeout(this.omb.bind(this),e.qUa)};e.prototype.lna=function(){this.lQ&&(clearTimeout(this.lQ),
this.lQ=null)};e.prototype.kA=function(){this.Tj=document.createElement("div");this.Tj.setAttribute("tdvclass","Button");this.Tj.style.position="absolute";this.Tj.style.width=this.Tj.style.height=Math.round(e.ata*2*this.vmin)+"px";this.Tj.style.borderRadius="50%";this.Tj.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.Tj.style.transform="translate(-50%, -50%)";this.Tj.style.zIndex="1000";this.Tj.style.left=this.Kpa+"px";this.Tj.style.top=this.Lpa+"px";this.jqa.wa().tk(this.Tj);this.Am=document.createElement("div");
this.Am.setAttribute("tdvclass","Button");this.Am.style.position="absolute";this.Am.style.width=this.Am.style.height=Math.round(e.KVa*2*this.vmin)+"px";this.Am.style.borderRadius="50%";this.Am.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.Am.style.transform="translate(-50%, -50%)";this.Am.style.zIndex="1000";this.Tj.appendChild(this.Am)};e.prototype.HK=function(){var b=this.Mpa-this.Kpa,c=this.Npa-this.Lpa;if(b==0&&c==0)this.Z8=this.Y8=0;else{var d=Math.atan2(-c,b);b=Math.min(Math.sqrt(b*
b+c*c)/(this.vmin*e.ata),e.fVa);this.Y8=Math.cos(d)*b;this.Z8=Math.sin(d)*b}this.Am.style.left=(50+this.Y8*50).toFixed(2)+"%";this.Am.style.top=(50-this.Z8*50).toFixed(2)+"%";this.o(h.V)};e.prototype.feb=function(){var b,c;(b=this.Am.parentNode)===null||b===void 0||b.removeChild(this.Am);this.Am=null;(c=this.Tj.parentNode)===null||c===void 0||c.removeChild(this.Tj);this.Tj=null};e.prototype.omb=function(){this.lQ=null;this.start()};e.prototype.acb=function(){this.eb.bind(h.Sa,this.$h,this,!0);this.eb.bind(h.gb,
this.Vj,this,!0);this.eb.bind(h.$a,this.lf,this,!0);this.eb.bind(h.$b,this.sl,this,!0);this.eb.bind(h.HB,this.sOa,this,!0);this.sl()};e.prototype.Jjb=function(){this.eb.h(h.Sa,this.$h,this);this.eb.h(h.gb,this.Vj,this);this.eb.h(h.$a,this.lf,this);this.eb.h(h.$b,this.sl,this);this.eb.h(h.HB,this.sOa,this)};e.pUa=g.ub()?5:.5;e.qUa=g.ub()?300:600;e.ata=g.ub()?10:6.6;e.KVa=g.ub()?5:3.3;e.fVa=6;return e}(n)});
define("tdv/player/view/Subtitles","require tdv/utils tdv/constants/EventName tdv/view/constants/Alignment tdv/view/util/Animation tdv/view/util/Font".split(" "),function(a){function m(f){this.Wra=f;this.element=document.createElement("div");this.hsa=document.createElement("span");this.element.appendChild(this.hsa);this.hsa.innerHTML=f.text.split("<br>").join("\n").split("\n").map(n).join("<br>");this.X6=!1}function h(f){this.P=f;this.$V=g.jsa(this.$V.bind(this),100);this.aW=g.jsa(this.aW.bind(this),
100);this.qa=document.createElement("div");this.qa.style.position="absolute";this.qa.style.left=0;this.qa.style.top=0;this.qa.style.right=0;this.qa.style.bottom=0;this.qa.style.zIndex=1;this.qa.style.cursor="inherit";this.qa.style.display="none";this.pn=document.createElement("div");this.pn.style.position="absolute";this.pn.style.left=0;this.pn.style.right=0;this.pn.style.zIndex=1;this.pn.style.cursor="inherit";this.qa.appendChild(this.pn);this.qV=[];this.CV=[];this.aj=[];this.Qia={};this.hO=e.Gc;
this.P.bind(k.L("subtitlesEnabled"),this.Vz,this);h.jua.forEach(function(l){this.P.bind(k.L(l),this.$V,this)}.bind(this));h.kua.forEach(function(l){this.P.bind(k.L(l),this.aW,this)}.bind(this));this.Vz();this.$V();this.aW()}function n(f){d.innerHTML=f;return d.innerText}var g=a("tdv/utils"),k=a("tdv/constants/EventName"),e=a("tdv/view/constants/Alignment"),b=a("tdv/view/util/Animation"),c=a("tdv/view/util/Font");h.prototype.clear=function(){this.kqb(null);this.P&&(this.P.h(k.L("subtitlesEnabled"),
this.Vz,this),h.jua.forEach(function(f){this.P.h(k.L(f),this.$V,this)}.bind(this)),h.kua.forEach(function(f){this.P.h(k.L(f),this.aW,this)}.bind(this)),this.P=null)};h.prototype.cc=function(){return this.qa};h.prototype.Qma=function(f){this.qV.indexOf(f)<0&&(this.qV.push(f),f.bind(k.L("activeSubtitles"),this.c3,this,!0),this.c3())};h.prototype.Hqa=function(f){var l=this.qV.indexOf(f);l>=0&&(this.qV.splice(l,1),f.h(k.L("activeSubtitles"),this.c3,this,!0),this.c3())};h.prototype.c3=function(){var f=
[];this.qV.forEach(function(l){f=f.concat(l.get("activeSubtitles")||[])});this.b9a(f)};h.prototype.Vz=function(){this.ha=this.P.get("subtitlesEnabled");this.fma()};h.prototype.$V=function(){this.hO=this.jS("subtitlesVerticalAlign",[e.Tc,e.$d,e.Gc],e.Gc);this.pn.style["text-align"]=this.jS("subtitlesHorizontalAlign",[e.fb,e.Db,e.$e],e.$e);this.pn.style.bottom=this.hO==e.Gc?this.Ml("subtitlesBottom",0):"";this.pn.style.top=this.hO==e.Tc?this.Ml("subtitlesTop",0):this.hO==e.$d?"50%":"";this.pn.style.transform=
this.hO==e.$d?"translate(0, -50%)":"";this.fma()};h.prototype.aW=function(){var f={};f["background-color"]=this.$fa("subtitlesBackgroundColor","subtitlesBackgroundOpacity");f.border=[this.Ml("subtitlesBorderSize"),"solid",this.Bj("subtitlesBorderColor")].join(" ");f["box-shadow"]=this.Bj("subtitlesShadow",!1)?[this.Ml("subtitlesShadowHorizontalLength"),this.Ml("subtitlesShadowVerticalLength"),this.Ml("subtitlesShadowBlurRadius"),this.$fa("subtitlesShadowColor","subtitlesShadowOpacity","#000000",0)].join(" "):
"";f.display="inline-block";f["font-family"]=c.qA(this.Bj("subtitlesFontFamily"));f["font-size"]=this.Ml("subtitlesFontSize");f.color=this.Bj("subtitlesFontColor");f["font-weight"]=this.jS("subtitlesFontWeight","bold bolder lighter 100 200 300 400 500 600 700 800 900 normal".split(" "),"normal");f["font-style"]=this.jS("subtitlesFontStyle",["italic","normal"],"normal");f["margin-bottom"]=this.Ml("subtitlesGap");f.opacity=this.Bj("subtitlesOpacity");f["padding-top"]=this.Ml("subtitlesPaddingTop");
f["padding-bottom"]=this.Ml("subtitlesPaddingBottom");f["padding-left"]=this.Ml("subtitlesPaddingLeft");f["padding-right"]=this.Ml("subtitlesPaddingRight");f.position="relative";f["text-align"]=this.jS("subtitlesHorizontalAlign",["left","right","center"],"center");f["text-decoration"]=this.Bj("subtitlesTextDecoration",["underline","overline","line-through","none"],"none");f["text-shadow"]=[this.Ml("subtitlesTextShadowHorizontalLength"),this.Ml("subtitlesTextShadowVerticalLength"),this.Ml("subtitlesTextShadowBlurRadius"),
this.$fa("subtitlesTextShadowColor","subtitlesTextShadowOpacity","#000000",0)].join(" ");this.Qia=f;this.ZXa()};h.prototype.b9a=function(f){this.CV=f;this.fma()};h.prototype.fma=function(){for(var f=this.ha?this.CV:[],l=this.aj.length-1;l>=0;l--){var p=this.aj[l];if(f.indexOf(p.Wra)>=0)break;this.pn.removeChild(p.element)}for(var q=[],r=!1;l>=0;l--)p=this.aj[l],!p.X6&&f.indexOf(p.Wra)<0&&(p.X6=!0,p.element.style.visibility="hidden",r=!0),q.splice(0,0,p);r&&b.requestFrame(this.Swa,this);this.aj=q;
var t=this.aj.filter(function(u){return!u.X6}).map(function(u){return u.Wra});f.filter(function(u){return t.indexOf(u)<0}).forEach(function(u){u=new m(u);this.Qva(u);this.hO==e.Gc&&this.aj.length>0?this.pn.insertBefore(u.element,this.aj[this.aj.length-1].element):this.pn.appendChild(u.element);this.aj.push(u)}.bind(this));this.qa.style.display=this.aj.length>0?"block":"none"};h.prototype.Swa=function(f){var l=!1;f=Math.round(200*f/1E3);for(var p=0;p<this.aj.length;p++){var q=this.aj[p];if(q.X6)if(l=
!0,f>=q.element.clientHeight)f-=q.element.clientHeight,this.pn.removeChild(q.element),this.aj.splice(p,1),p--;else{q.element.style.height=q.element.clientHeight-f+"px";break}}l&&b.requestFrame(this.Swa,this)};h.prototype.ZXa=function(){this.aj.forEach(this.Qva.bind(this))};h.prototype.Qva=function(f){for(var l in this.Qia)f.hsa.style[l]=this.Qia[l]};h.prototype.Bj=function(f,l){return this.P.get(f,l)};h.prototype.Ml=function(f,l){f=this.P.get(f,l);isNaN(f)||(f=Math.round(f)+"px");return f};h.prototype.jS=
function(f,l,p){f=this.P.get(f);return l.indexOf(f)<0?p:f};h.prototype.$fa=function(f,l,p,q){f=this.P.get(f,p);l=this.P.get(l,q);return"rgba("+parseInt("0x"+f.substr(1,2))+", "+parseInt("0x"+f.substr(3,2))+", "+parseInt("0x"+f.substr(5,2))+", "+l+")"};h.jua=["subtitlesHorizontalAlign","subtitlesVerticalAlign","subtitlesTop","subtitlesBottom"];h.kua="subtitlesBackgroundColor subtitlesBackgroundOpacity subtitlesBorderColor subtitlesBorderSize subtitlesFontFamily subtitlesFontColor subtitlesFontSize subtitlesFontStyle subtitlesFontWeight subtitlesGap subtitlesOpacity subtitlesPaddingTop subtitlesPaddingBottom subtitlesPaddingLeft subtitlesPaddingRight subtitlesShadow subtitlesShadowBlurRadius subtitlesShadowHorizontalLength subtitlesShadowVerticalLength subtitlesShadowColor subtitlesTextDecoration subtitlesTextShadowBlurRadius subtitlesTextShadowColor subtitlesTextShadowHorizontalLength subtitlesTextShadowOpacity subtitlesTextShadowVerticalLength".split(" ");
var d=document.createElement("div");return h});
define("tdv/player/view/SubtitlesListener","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo".split(" "),function(a,m,h,n,g,k){a=function(){function l(p){this.kQ=new Map;this.Dm=p}l.prototype.add=function(p){k.Oa("PanoramaPlayer",p)?this.kQ.set(p,new e(this.Dm,p)):k.Oa("VideoPlayer",p)?this.kQ.set(p,new b(this.Dm,p)):k.Oa("PhotoAlbumPlayer",p)?this.kQ.set(p,new c(this.Dm,p)):k.Oa("Audio",p)&&this.kQ.set(p,new f(this.Dm,p))};
l.prototype.remove=function(p){var q=this.kQ.get(p);q&&(q.clear(),this.kQ.delete(p))};return l}();m=function(){function l(p,q){this.Dm=p;this.source=q}l.prototype.clear=function(){};return l}();var e=function(l){function p(q,r){q=l.call(this,q,r)||this;q.$I=new d(q.Dm);q.gg=null;q.source.bind(n.L("panorama"),q.cqa,q,!0);q.cqa();return q}P(p,l);p.prototype.clear=function(){this.source&&(this.source.h(n.L("panorama"),this.cqa,this),this.source=null,this.Vf(null),this.$I.clear(),this.$I=null)};p.prototype.cqa=
function(){this.Vf(this.source.get("panorama"))};p.prototype.Vf=function(q){if(this.gg!=q){this.gg&&(this.gg.h(n.L("audios"),this.PJ,this),this.Dm.Hqa(this.gg));if(this.gg=q)this.Dm.Qma(this.gg),this.gg.bind(n.L("audios"),this.PJ,this,!0);this.PJ()}};p.prototype.PJ=function(){this.$I.Zqa(this.gg&&this.gg.get("audios")||[])};return p}(m),b=function(l){function p(q,r){q=l.call(this,q,r)||this;q.video=null;q.source.bind(n.L("video"),q.UJ,q,!0);q.source.bind(n.Pd,q.UJ,q,!0);q.UJ();return q}P(p,l);p.prototype.clear=
function(){this.source&&(this.source.h(n.L("video"),this.UJ,this),this.source.h(n.Pd,this.UJ,this),this.source=null,this.L$(null))};p.prototype.UJ=function(){var q;this.L$(((q=this.source)===null||q===void 0?void 0:q.get("state"))!=g.ca?this.source.get("video"):null)};p.prototype.L$=function(q){this.video!=q&&(this.video&&this.Dm.Hqa(this.video),(this.video=q)&&this.Dm.Qma(this.video))};return p}(m),c=function(l){function p(q,r){q=l.call(this,q,r)||this;q.RJ=q.RJ.bind(q);q.$I=new d(q.Dm);q.tc=null;
h.ba(q.source,"photoAlbum.playList.items",q.RJ,!1);h.ba(q.source,"photoAlbum.playList.selectedIndex",q.RJ,!1);q.RJ();return q}P(p,l);p.prototype.clear=function(){this.source&&(h.da(this.source,"photoAlbum.playList.items",this.RJ),h.da(this.source,"photoAlbum.playList.selectedIndex",this.RJ),this.source=null,this.vRa(null),this.$I.clear(),this.$I=null)};p.prototype.RJ=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.vRa(q?q.get("media"):null)};p.prototype.vRa=function(q){this.tc!=q&&(this.tc&&this.tc.h(n.L("audios"),this.PJ,this),(this.tc=q)&&this.tc.bind(n.L("audios"),this.PJ,this,!0),this.PJ())};p.prototype.PJ=function(){this.$I.Zqa(this.tc&&this.tc.get("audios")||[])};return p}(m),d=function(){function l(p){this.G6=[];this.F6=new Map;this.Dm=p}l.prototype.clear=function(){this.Zqa([])};l.prototype.Zqa=function(p){this.G6!=p&&(this.G6.forEach(function(q){p.indexOf(q)>=0||(this.F6.get(q).clear(),this.F6.delete(q))}.bind(this)),
this.G6=p,this.G6.forEach(function(q){this.F6.has(q)||this.F6.set(q,new f(this.Dm,q))}.bind(this)))};return l}(),f=function(l){function p(q,r){q=l.call(this,q,r)||this;q.IE=!1;q.source.bind(n.L("state"),q.Upa,q,!0);q.Upa();return q}P(p,l);p.prototype.clear=function(){this.source&&(this.NQa(!1),this.source.h(n.L("state"),this.Upa,this),this.source=null)};p.prototype.Upa=function(){this.NQa(this.source.get("state")!=g.ca)};p.prototype.NQa=function(q){this.IE!=q&&(this.IE&&this.Dm.Hqa(this.source),(this.IE=
q)&&this.Dm.Qma(this.source))};return p}(m);return a});
define("tdv/player/script/ViewerArea","require three.mod tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/view/PlaybackBar tdv/player/view/ProgressBar tdv/player/view/common/RenderersContainer tdv/player/view/ScreenJoystick tdv/player/view/Subtitles tdv/player/view/SubtitlesListener tdv/player/view/util/Device tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/constants/Cursor tdv/view/constants/CreationPolicy tdv/view/constants/State tdv/view/containers/Container tdv/view/core/UIComponent".split(" "),function(a){function m(){function G(){v.XA==
R&&v.Mw==Q?O.Kn().render(R,Q):v.M.h(k.Zd,G,this)}v.f$=new b(k.Xob);var N=H=new v.Uua,O=E=new p,R=new h.Scene,Q=new h.PerspectiveCamera;v.tra(O.Kn(),R,Q,v.TQ.bca);v.wt(O.Kn(),v.El.Xp,N);v.M.bind(k.Zd,G,this,!0);v.f$=null}var h=a("three.mod"),n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),k=a("tdv/constants/EventName"),e=a("tdv/constants/PlaybackState"),b=a("tdv/events/Event"),c=a("tdv/player/parser/ClassInfo"),d=a("tdv/player/script/helper/ButtonProperty"),f=a("tdv/player/view/PlaybackBar"),l=
a("tdv/player/view/ProgressBar"),p=a("tdv/player/view/common/RenderersContainer"),q=a("tdv/player/view/ScreenJoystick"),r=a("tdv/player/view/Subtitles"),t=a("tdv/player/view/SubtitlesListener"),u=a("tdv/player/view/util/Device"),v=a("tdv/player/view/util/XR"),w=a("tdv/view/constants/ButtonMode"),x=a("tdv/view/constants/Cursor"),y=a("tdv/view/constants/CreationPolicy"),z=a("tdv/view/constants/State"),A=a("tdv/view/containers/Container"),D=a("tdv/view/core/UIComponent"),F=180/Math.PI,C=new h.Euler,
B=c.define("ViewerArea",A,function(){A.call(this);this.set("childrenInteractionEnabled",!0);this.set("contentOpaque",!0);this.set("creationPolicy",y.bL);this.set("subtitlesEnabled",!0);this.set("checkToolTipOcclusion",!0);this.set("isKeyboardTarget",!1);this.Nv=this.VS=this.rs=this.ej=this.qD=this.av=this.ve=this.Z0=this.dj=null;this.CV=new r(this);this.B5=new t(this.CV);this.dja=this.vv=!1;this.Jj=e.ca;this.zo=this.Fl=null;this.So=!1;this.SU=[];this.uL=[];this.tL=new Set;this.bind(B.mua,this.v5a,
this,!0);this.bind(B.lua,this.u5a,this,!0);this.bind(k.Sa,this.sCa,this);this.bind(k.Sa,this.sCa,this);this.bind(k.uc,this.S5a,this);this.bind(k.Eb,this.R5a,this);this.bind(k.od,this.M3,this,!0);this.bind(k.jd,this.P5a,this,!0);this.FL=new d(this,"buttonPause",w.ak);this.FL.bind(k.ma,this.UH,this);this.FL.set("state",z.De);this.GL=new d(this,"buttonPlay",w.ak);this.GL.bind(k.ma,this.VH,this);this.GL.set("state",z.De);this.wG=new d(this,"buttonPlayPause",w.ak);this.wG.bind(k.ma,this.r5a,this);this.wG.set("state",
z.De);this.IL=new d(this,"buttonStop",w.ak);this.IL.bind(k.ma,this.cD,this);this.IL.set("state",z.Fb);this.QYa=new d(this,"buttonRestart",w.af);this.QYa.bind(k.ma,this.bD,this);this.b0=new d(this,"buttonToggleSubtitles",w.ak);this.b0.bind(k.Rk,function(){this.set("subtitlesEnabled",!0)},this,!0);this.b0.bind(k.Lm,function(){this.set("subtitlesEnabled",!1)},this,!0);this.bind(k.L("subtitlesEnabled"),function(){this.b0.set("pressed",this.get("subtitlesEnabled"))},this);this.b0.set("pressed",this.get("subtitlesEnabled"));
(new d(this,"buttonVRView",w.af)).bind(k.ma,function(){this.set("viewMode","vr")},this,!0);(new d(this,"buttonARView",w.af)).bind(k.ma,function(){this.set("viewMode","ar")},this,!0);this.x3a=n.mr(this.fbb,this);this.bind(k.fi,this.O5a,this,!0);this.bind(B.y_,this.Q5a,this,!0);v.M.bind(k.V,function(){this.set("viewMode",this.Aya())},this,!0)});B.prototype.play=function(){this.VH()};B.prototype.pause=function(){this.UH()};B.prototype.stop=function(){this.cD()};B.prototype.restart=function(){this.bD()};
B.ad=Object.assign({},A.ad,{progressBackgroundColor:void 0,progressBackgroundColorDirection:void 0,progressBackgroundColorRatios:void 0,progressBackgroundOpacity:void 0,progressBackgroundBlur:0,progressBarBackgroundColor:void 0,progressBarBackgroundColorDirection:void 0,progressBarBackgroundColorRatios:void 0,progressBarBorderColor:void 0,progressBarBorderRadius:void 0,progressBarBorderSize:void 0,progressBarOpacity:void 0,progressBorderColor:void 0,progressBorderRadius:void 0,progressBorderSize:void 0,
progressBottom:0,progressHeight:20,progressLeft:0,progressOpacity:void 0,progressPercent:0,progressRight:0,progressVisible:!1,externalPlaybackBar:void 0,externalProgressBar:void 0,playbackBarBackgroundColor:void 0,playbackBarBackgroundColorDirection:void 0,playbackBarBackgroundOpacity:void 0,playbackBarBackgroundBlur:0,playbackBarBorderColor:void 0,playbackBarBorderRadius:void 0,playbackBarBorderSize:void 0,playbackBarBottom:10,playbackBarHeight:void 0,playbackBarWidth:void 0,playbackBarLeft:void 0,
playbackBarOpacity:void 0,playbackBarRight:void 0,playbackBarLiveDragging:void 0,playbackBarDuration:100,playbackBarPosition:0,playbackBarRollOverDisplay:!1,plabackBarSteps:void 0,plabackBarSelectedStep:void 0,playbackBarVisible:!1,playbackBarProgressBackgroundColor:void 0,playbackBarProgressBackgroundColorDirection:void 0,playbackBarProgressBackgroundColorRatios:void 0,playbackBarProgressBorderColor:void 0,playbackBarProgressBorderRadius:void 0,playbackBarProgressBorderSize:void 0,playbackBarProgressOpacity:void 0,
playbackBarHeadBackgroundColor:void 0,playbackBarHeadBackgroundColorDirection:void 0,playbackBarHeadBackgroundColorRatios:void 0,playbackBarHeadBorderColor:void 0,playbackBarHeadBorderRadius:void 0,playbackBarHeadBorderSize:void 0,playbackBarHeadOpacity:void 0,playbackBarHeadWidth:void 0,playbackBarHeadHeight:void 0,playbackBarHeadShadow:void 0,playbackBarHeadShadowBlurRadius:void 0,playbackBarHeadShadowColor:void 0,playbackBarHeadShadowHorizontalLength:void 0,playbackBarHeadShadowOpacity:void 0,
playbackBarHeadShadowSpread:void 0,playbackBarHeadShadowVerticalLength:void 0,playbackBarStepBackgroundColor:void 0,playbackBarStepBackgroundColorDirection:void 0,playbackBarStepBackgroundColorRatios:void 0,playbackBarStepBorderColor:void 0,playbackBarStepBorderRadius:void 0,playbackBarStepBorderSize:void 0,playbackBarStepOpacity:void 0,playbackBarStepWidth:void 0,playbackBarStepHeight:void 0,playbackBarStepShadow:void 0,playbackBarStepShadowBlurRadius:void 0,playbackBarStepShadowColor:void 0,playbackBarStepShadowHorizontalLength:void 0,
playbackBarStepShadowOpacity:void 0,playbackBarStepShadowSpread:void 0,playbackBarStepShadowVerticalLength:void 0,playbackBarStepSelectedBackgroundColor:void 0,playbackBarStepSelectedBackgroundColorDirection:void 0,playbackBarStepSelectedBackgroundColorRatios:void 0,playbackBarStepSelectedBorderColor:void 0,playbackBarStepSelectedBorderRadius:void 0,playbackBarStepSelectedBorderSize:void 0,playbackBarStepSelectedOpacity:void 0,playbackBarStepSelectedWidth:void 0,playbackBarStepSelectedHeight:void 0,
playbackBarStepSelectedShadow:void 0,playbackBarStepSelectedShadowBlurRadius:void 0,playbackBarStepSelectedShadowColor:void 0,playbackBarStepSelectedShadowHorizontalLength:void 0,playbackBarStepSelectedShadowOpacity:void 0,playbackBarStepSelectedShadowSpread:void 0,playbackBarStepSelectedShadowVerticalLength:void 0,subtitlesBackgroundColor:"#000000",subtitlesBackgroundOpacity:1,subtitlesBorderColor:void 0,subtitlesBorderSize:0,subtitlesBottom:"10%",subtitlesFontFamily:void 0,subtitlesFontColor:"#ffffff",
subtitlesFontSize:"12px",subtitlesFontStyle:void 0,subtitlesFontWeight:void 0,subtitlesGap:10,subtitlesHorizontalAlign:"center",subtitlesOpacity:1,subtitlesPaddingTop:5,subtitlesPaddingBottom:5,subtitlesPaddingLeft:5,subtitlesPaddingRight:5,subtitlesShadow:!1,subtitlesShadowBlurRadius:void 0,subtitlesShadowHorizontalLength:0,subtitlesShadowVerticalLength:0,subtitlesShadowColor:"#000000",subtitlesShadowOpacity:0,subtitlesTextDecoration:void 0,subtitlesTextShadowBlurRadius:void 0,subtitlesTextShadowColor:"#000000",
subtitlesTextShadowHorizontalLength:0,subtitlesTextShadowOpacity:0,subtitlesTextShadowVerticalLength:0,subtitlesTop:void 0,subtitlesVerticalAlign:"bottom",transitionDuration:500,blendingTransitionDuration:void 0,disolveTransitionDuration:void 0,translationTransitionDuration:void 0,translationTransitionEnabled:!0,toolTipEnabled:!0});B.prototype.get=function(G,N){switch(G){case "viewMode":if(v.isPresenting&&this.Rc().uMa()&&v.Ag==this.Rc().Kn()){if(v.Cm==v.El.Xp)return"vr";if(v.Cm==v.El.Np)return"ar"}return"standard";
case "xrYaw":return v.isPresenting?-C.setFromQuaternion(v.xl,"YXZ").y*F:0;case "xrPitch":return v.isPresenting?C.setFromQuaternion(v.xl,"YXZ").x*F:0;case "xrRoll":return v.isPresenting?-C.setFromQuaternion(v.xl,"YXZ").z*F:0}return A.prototype.get.call(this,G,N)};B.prototype.set=function(G,N){G=="playbackState"&&(N=this.Jj,this.get(G)!=N&&(this.dja=!0,this.x3a()));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.bW();break;case "viewMode":var O=A.prototype.get.call(this,G);this.Rc().Cgb()&&(N!="vr"||v.isPresenting?N!="ar"||v.isPresenting?N!="vr"&&N!="ar"&&v.isPresenting&&v.qm():v.wt(this.Rc().Kn(),v.El.Np,this.Z7()):
v.wt(this.Rc().Kn(),v.El.Xp,this.Z7()));N=this.Aya();O!=N&&this.o(B.Jba)}A.prototype.set.call(this,G,N)};B.prototype.Aya=function(){if(v.isPresenting&&this.Rc().uMa()&&v.Ag==this.Rc().Kn()){if(v.Cm==v.El.Xp)return"vr";if(v.Cm==v.El.Np)return"ar"}return"standard"};B.prototype.Pb=function(){this.Il(B.ad)};B.prototype.Kb=function(){A.prototype.Kb.call(this);this.qD==null&&(this.qD=new D,this.qD.set("width","100%"),this.qD.set("height","100%"),this.qD.set("interactionEnabled",!1),this.qD.set("toolTipDisabled",
!0),this.mb(this.qD),this.qD.wa().tk(this.Rc().cc()));this.rs==null&&(this.rs=new D,this.rs.set("width","100%"),this.rs.set("height","100%"),this.rs.set("toolTipDisabled",!0),this.rs.set("interactionEnabled",!1),this.mb(this.rs),n.defer(function(){this.rs.set("cursor",x.LB)}.bind(this)),this.VS=new q(this,this.rs),this.VS.Ra(!1));this.Nv==null&&(this.Nv=new D,this.Nv.set("width","100%"),this.Nv.set("height","100%"),this.Nv.set("toolTipDisabled",!0),this.Nv.set("interactionEnabled",!1),this.mb(this.Nv),
this.Nv.wa().tk(this.CV.cc()));this.dj==null&&(this.dj=new l,this.mb(this.dj));this.ve==null&&(this.ve=new f,this.ve.bind(k.V,this.aja,this,!0),this.mb(this.ve),this.bW())};B.prototype.Z7=function(){if(this.OHa)return this.OHa;if(H){var G=H;H=null}else G=new v.Uua;g.ba(this,"vrGazePointerHideTime vrFoveation vrPointerColor vrPointerDistance vrPointerOverColor vrPointerSelectionColor vrPointerSelectionTime".split(" "),function(){G.TKa=this.get("vrGazePointerHideTime");G.PKa=this.get("vrFoveation");
G.O9=this.get("vrPointerColor");G.CPa=this.get("vrPointerDistance");G.pqa=this.get("vrPointerOverColor");G.Q9=this.get("vrPointerSelectionColor");G.GPa=this.get("vrPointerSelectionTime")}.bind(this),!0);return this.OHa=G};B.prototype.rfb=function(){return this.ve};B.prototype.Rc=function(){this.ej||(E?(this.ej=E,E=null):this.ej=new p(this.get("aaEnabled")));return this.ej};B.prototype.Kk=function(){A.prototype.Kk.call(this);for(var G=[],N=this.SU.length-1;N>=0;N--)G.push(this.SU[N].j);this.Nv&&G.push(this.Nv);
this.rs&&G.push(this.rs);this.ve&&G.push(this.ve);this.dj&&G.push(this.dj);var O=this.Cb();G=G.filter(function(R){return O.indexOf(R)>=0});O=O.filter(function(R){return G.indexOf(R)==-1}).concat(G);O.forEach(function(R,Q){R&&this.ioa(R)!=Q&&this.qr(R,Q)}.bind(this))};B.prototype.jb=function(){this.S("externalProgressBar")&&((this.Z0=this.G("externalProgressBar"))?this.removeChild(this.dj):this.mb(this.dj),this.$("externalProgressBar"),B.qva.forEach(N=>{this.yD(N)}));this.Oc(B.FWa,B.iva,[this.dj],
!0,!0);var G=[this.dj];this.Z0&&G.push(this.Z0);this.Oc(B.qva,B.rva,G,!0,!0);this.S("externalPlaybackBar")&&(this.av&&this.av.h(k.V,this.aja,this,!0),(this.av=this.G("externalPlaybackBar"))?this.removeChild(this.ve):this.mb(this.ve),this.bW(),this.av&&this.av.bind(k.V,this.aja,this,!0),this.$("externalPlaybackBar"),B.nva.forEach(N=>{this.yD(N)}));this.Oc(B.EWa,B.hva,[this.ve],!0,!0);G=[this.ve];this.av&&G.push(this.av);this.Oc(B.nva,B.ova,G,!0,!0);A.prototype.jb.call(this)};B.prototype.fbb=function(){this.dja&&
(this.dja=!1,this.FL.set("state",this.Jj==e.Zb?z.Fb:z.De),this.GL.set("state",this.Jj==e.PLAYING||this.Jj==e.Zb?z.Fb:z.De),this.wG.set("state",this.Jj==e.PLAYING?z.Fb:z.De),this.IL.set("state",this.Jj==e.ca?z.Fb:z.De))};B.prototype.Jd=function(G){this.Jj=G;this.set("playbackState",G)};B.prototype.M3=function(){B.cp(this)};B.prototype.P5a=function(){B.ap(this)};B.prototype.UH=function(){this.Jj==e.Zb?this.sn():this.sv()};B.prototype.VH=function(){this.sn()};B.prototype.r5a=function(){this.Jj==e.PLAYING?
this.sv():this.sn()};B.prototype.cD=function(){this.Ys()};B.prototype.bD=function(){this.Ys();this.sn()};B.prototype.O5a=function(){if(!this.Fl||!this.Fl.jna())switch(this.get("doubleClickAction")){case "toggle_fullscreen":var G=this.Vb().kk;G&&G.ol()&&G.toggle()}};B.prototype.Q5a=function(G){this.SU.forEach(function(N){this.B5.remove(N)}.bind(this));this.SU=G.data.players;this.SU.forEach(function(N){this.B5.add(N)}.bind(this));this.Af()};B.prototype.sn=function(){this.zo&&this.zo.play()};B.prototype.sv=
function(){this.zo&&this.zo.pause()};B.prototype.Ys=function(){this.zo&&this.zo.stop()};B.prototype.v5a=function(G){this.CEa(G.data.player)};B.prototype.u5a=function(G){this.Fl==G.data.player&&this.CEa(null)};B.prototype.sCa=function(){B.sr(this)};B.prototype.S5a=function(){this.So=!0;this.bW()};B.prototype.R5a=function(){this.So=!1;this.bW()};B.prototype.bW=function(){this.ve&&this.ve.set("visible",this.get("playbackBarVisible")&&(this.So||!this.get("playbackBarRollOverDisplay")||u.Jp()))};B.prototype.CEa=
function(G){this.Fl!=G&&(this.set("playbackBarVisible",!1),this.Fl&&this.Fl.sr(!1),this.zo&&this.zo.h(k.L("state"),this.Lca,this),this.y6a=this.Fl,(this.Fl=G)&&this.Fl.sr(!!this.Ro),(this.zo=this.Fl&&this.Fl.WYa?this.Fl:null)&&this.zo.bind(k.L("state"),this.Lca,this,!0),this.Lca())};B.prototype.sr=function(G){this.Ro=G;this.set("isKeyboardTarget",G);this.Fl&&this.Fl.sr(!!this.Ro)};B.prototype.oob=function(){return!this.y6a};B.prototype.Lca=function(){this.zo?this.Jd(this.zo.get("state")):this.Jd(e.ca)};
B.prototype.aja=function(){var G=(this.av?this.av:this.ve).get("position");this.o(new b(B.Bba,{position:G}))};B.prototype.NX=function(G){return this.tL.size==1&&this.tL.has(G)};B.prototype.Mma=function(G){this.tL.add(G)};B.prototype.release=function(G){this.tL["delete"](G);this.QGa()};B.prototype.Psa=function(G,N){this.uL.push({Bqa:G,Gn:N});this.QGa()};B.prototype.QGa=function(){if(this.tL.size==1&&this.uL.length>0)for(var G=this.tL.values().next().value,N=0;N<this.uL.length;N++)if(this.uL[N].Bqa==
G){var O=this.uL[N].Gn;this.uL.splice(N,1);O();N--}};B.iva={progressBackgroundColor:"backgroundColor",progressBackgroundColorDirection:"backgroundColorDirection",progressBackgroundColorRatios:"backgroundColorRatios",progressBackgroundOpacity:"backgroundOpacity",progressBackgroundBlur:"backgroundBlur",progressBarBackgroundColor:"barBackgroundColor",progressBarBackgroundColorDirection:"barBackgroundColorDirection",progressBarBackgroundColorRatios:"barBackgroundColorRatios",progressBarBorderColor:"barBorderColor",
progressBarBorderRadius:"barBorderRadius",progressBarBorderSize:"barBorderSize",progressBarOpacity:"barOpacity",progressBorderColor:"borderColor",progressBorderRadius:"borderRadius",progressBorderSize:"borderSize",progressHeight:"height",progressOpacity:"opacity",progressBottom:"bottom",progressLeft:"left",progressRight:"right"};B.FWa=Object.keys(B.iva);B.rva={progressPercent:"percent",progressVisible:"visible"};B.qva=Object.keys(B.rva);B.hva={playbackBarBackgroundColor:"backgroundColor",playbackBarBackgroundColorDirection:"backgroundColorDirection",
playbackBarBackgroundOpacity:"backgroundOpacity",playbackBarBackgroundBlur:"backgroundBlur",playbackBarBorderColor:"borderColor",playbackBarBorderRadius:"borderRadius",playbackBarBorderSize:"borderSize",playbackBarBottom:"bottom",playbackBarHeight:"height",playbackBarWidth:"width",playbackBarLeft:"left",playbackBarOpacity:"opacity",playbackBarRight:"right",playbackBarLiveDragging:"liveDragging",playbackBarProgressBackgroundColor:"barBackgroundColor",playbackBarProgressBackgroundColorDirection:"barBackgroundColorDirection",
playbackBarProgressBackgroundColorRatios:"barBackgroundColorRatios",playbackBarProgressBorderColor:"barBorderColor",playbackBarProgressBorderRadius:"barBorderRadius",playbackBarProgressBorderSize:"barBorderSize",playbackBarProgressOpacity:"barOpacity",playbackBarHeadBackgroundColor:"playheadBackgroundColor",playbackBarHeadBackgroundColorDirection:"playheadBackgroundColorDirection",playbackBarHeadBackgroundColorRatios:"playheadBackgroundColorRatios",playbackBarHeadBorderColor:"playheadBorderColor",
playbackBarHeadBorderRadius:"playheadBorderRadius",playbackBarHeadBorderSize:"playheadBorderSize",playbackBarHeadOpacity:"playheadOpacity",playbackBarHeadWidth:"playheadWidth",playbackBarHeadHeight:"playheadHeight",playbackBarHeadShadow:"playheadShadow",playbackBarHeadShadowBlurRadius:"playheadShadowBlurRadius",playbackBarHeadShadowColor:"playheadShadowColor",playbackBarHeadShadowHorizontalLength:"playheadShadowHorizontalLength",playbackBarHeadShadowOpacity:"playheadShadowOpacity",playbackBarHeadShadowSpread:"playheadShadowSpread",
playbackBarHeadShadowVerticalLength:"playheadShadowVerticalLength",playbackBarStepBackgroundColor:"stepBackgroundColor",playbackBarStepBackgroundColorDirection:"stepBackgroundColorDirection",playbackBarStepBackgroundColorRatios:"stepBackgroundColorRatios",playbackBarStepBorderColor:"stepBorderColor",playbackBarStepBorderRadius:"stepBorderRadius",playbackBarStepBorderSize:"stepBorderSize",playbackBarStepOpacity:"stepOpacity",playbackBarStepWidth:"stepWidth",playbackBarStepHeight:"stepHeight",playbackBarStepShadow:"stepShadow",
playbackBarStepShadowBlurRadius:"stepShadowBlurRadius",playbackBarStepShadowColor:"stepShadowColor",playbackBarStepShadowHorizontalLength:"stepShadowHorizontalLength",playbackBarStepShadowOpacity:"stepShadowOpacity",playbackBarStepShadowSpread:"stepShadowSpread",playbackBarStepShadowVerticalLength:"stepShadowVerticalLength",playbackBarSelectedStepBackgroundColor:"selectedStepBackgroundColor",playbackBarSelectedStepBackgroundColorDirection:"selectedStepBackgroundColorDirection",playbackBarSelectedStepBackgroundColorRatios:"selectedStepBackgroundColorRatios",
playbackBarSelectedStepBorderColor:"selectedStepBorderColor",playbackBarSelectedStepBorderRadius:"selectedStepBorderRadius",playbackBarSelectedStepBorderSize:"selectedStepBorderSize",playbackBarSelectedStepOpacity:"selectedStepOpacity",playbackBarSelectedStepWidth:"selectedStepWidth",playbackBarSelectedStepHeight:"selectedStepHeight",playbackBarSelectedStepShadow:"selectedStepShadow",playbackBarSelectedStepShadowBlurRadius:"selectedStepShadowBlurRadius",playbackBarSelectedStepShadowColor:"selectedStepShadowColor",
playbackBarSelectedStepShadowHorizontalLength:"selectedStepShadowHorizontalLength",playbackBarSelectedStepShadowOpacity:"selectedStepShadowOpacity",playbackBarSelectedStepShadowSpread:"selectedStepShadowSpread",playbackBarSelectedStepShadowVerticalLength:"selectedStepShadowVerticalLength"};B.EWa=Object.keys(B.hva);B.ova={playbackBarDuration:"duration",playbackBarPosition:"position",playbackBarSteps:"steps",playbackBarSelectedStep:"selectedStep",playbackBarVisible:"visible"};B.nva=Object.keys(B.ova);
B.y_="requestByPlayer";B.mua="playerShow";B.lua="playerHide";B.Bba="playbackBarPositionChange";B.Jba="viewModeChange";B.AH=null;B.sr=function(G){B.AH!=G&&(B.AH&&B.AH.sr(!1),B.AH=G,B.AH&&B.AH.sr(!0))};B.SI=[];B.cp=function(G){var N=B.SI.indexOf(G);N>-1&&B.SI.splice(N,1);B.SI.push(G);this.sr(this.gza())};B.ap=function(G){var N=B.SI.indexOf(G);N>-1&&B.SI.splice(N,1);B.AH==G&&B.sr(B.SI.length?this.gza():null)};B.gza=function(){var G=B.SI.slice();G.sort(function(N,O){var R=N.get("actualWidth")*N.get("actualHeight"),
Q=O.get("actualWidth")*O.get("actualHeight");N=G.indexOf(N)-G.indexOf(O);return R-Q||N});return G[G.length-1]};var H=null,E=null;navigator.xr&&navigator.xr.addEventListener("sessiongranted",function(){m()});return B});
define("tdv/player/script/MediaPlayer",["require","tdv/utils","tdv/binding/Bindable","tdv/events/Event","tdv/player/script/ViewerArea"],function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable"),n=a("tdv/events/Event"),g=a("tdv/player/script/ViewerArea"),k=m.extend(h,function(e){h.call(this);this.WYa=e;this.oV=this.UC=null});k.di="mediaShow";k.oo="mediaHide";k.prototype.sr=function(){};k.prototype.jna=function(){return!1};k.prototype.lV=function(e){this.UC!=e&&(this.UC&&this.Cla(this.UC),(this.UC=
e)&&this.qda(this.UC))};k.prototype.qda=function(e){e.bind(g.y_,this.EHa,this,!0);e.bind(g.Bba,this.AU,this)};k.prototype.Cla=function(e){e.h(g.y_,this.EHa,this);e.h(g.Bba,this.AU,this)};k.prototype.fK=function(e){this.UC.o(new n(g.y_,{players:e||[this]}))};k.prototype.EHa=function(e){e.data.players.indexOf(this)<0&&this.SN()};k.prototype.AU=function(){};k.prototype.SN=function(){};k.prototype.kT=function(e){this.o(new n(k.di,{media:e}));this.oV=this.UC;this.oV.o(new n(g.mua,{player:this}))};k.prototype.jT=
function(e){this.o(new n(k.oo,{media:e}));this.oV&&(this.oV.o(new n(g.lua,{player:this})),this.oV=null)};return k});define("tdv/player/view/map/constants/MovementMode",["require"],function(){return{sF:"constrained",QUa:"free_drag",Gob:"free_drag_and_rotation",jca:"sync_with_field_of_view"}});
define("tdv/player/view/map/control/camera/LimitsManager",["require","tdv/utils","tdv/player/view/map/constants/MovementMode","tdv/view/constants/ScaleMode"],function(a){function m(){this.Rd=!0;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.ti=n.uj;this.Zo=h.sF;this.Eha=this.Jha=1;this.tf=this.uf=this.Ao=this.Bo=100;this.op=m.gG}a("tdv/utils");var h=a("tdv/player/view/map/constants/MovementMode"),n=a("tdv/view/constants/ScaleMode");m.prototype.pMa=function(){return this.op!==m.gG};m.prototype.oMa=function(){return this.op&
m.qL?!0:!1};m.prototype.qMa=function(){return this.op&m.rL?!0:!1};m.prototype.rMa=function(){return this.op&m.jG?!0:!1};m.prototype.nMa=function(){return this.op&m.fG?!0:!1};m.prototype.getX=function(){this.sp();return this.ec};m.prototype.getY=function(){this.sp();return this.fc};m.prototype.yA=function(){this.sp();return this.kc};m.prototype.fP=function(){this.sp();return this.Ed};m.prototype.setConfiguration=function(g,k,e,b,c){this.uf=g;this.tf=k;this.ti=e;this.Jha=b;this.Eha=c;this.fc=this.ec=
.5;this.Ed=0;this.kc=b;this.Rd=!0};m.prototype.setPosition=function(g,k,e,b){this.ec=g;this.fc=k;this.Ed=e;this.kc=b;this.Rd=!0};m.prototype.du=function(g){this.Zo=g;this.Rd=!0};m.prototype.setSize=function(g,k){this.Bo=g;this.Ao=k;this.Rd=!0};m.prototype.sp=function(){if(this.Rd){this.Rd=!1;var g=m.gG;this.kc>this.Eha?(this.kc=this.Eha,g|=m.IWa):this.kc<this.Jha&&(this.kc=this.Jha,g|=m.JWa);if(this.Zo==h.sF){switch(this.ti){case n.NONE:var k=this.uf;var e=this.tf;break;case n.Tp:k=this.Bo;e=this.tf*
this.Bo/this.uf;break;case n.Pk:k=this.uf*this.Ao/this.tf;e=this.Ao;break;case n.Jr:this.uf*this.Ao>this.tf*this.Bo?(k=this.uf*this.Ao/this.tf,e=this.Ao):(k=this.Bo,e=this.tf*this.Bo/this.uf);break;default:case n.uj:this.uf*this.Ao>this.tf*this.Bo?(k=this.Bo,e=this.tf*this.Bo/this.uf):(k=this.uf*this.Ao/this.tf,e=this.Ao)}k*=this.kc;e*=this.kc;var b=Math.min(.5*this.Bo/k,.5);k=Math.max(1-.5*this.Bo/k,.5);var c=Math.min(.5*this.Ao/e,.5);e=Math.max(1-.5*this.Ao/e,.5)}else b=0,k=1,c=0,e=1;this.ec<b?
(this.ec=b,g|=m.qL):this.ec>k&&(this.ec=k,g|=m.rL);this.fc<c?(this.fc=c,g|=m.jG):this.fc>e&&(this.fc=e,g|=m.fG);this.Zo!=h.sF&&this.Zo!=h.QUa||this.Ed==0||(this.Ed=0,g|=m.OWa);this.op=g}};m.gG=0;m.qL=1;m.rL=2;m.jG=4;m.fG=8;m.JWa=16;m.IWa=32;m.OWa=64;return m});
define("tdv/player/view/map/control/camera/MovementManager",["require"],function(){function a(){this.VR=.1;this.H0=this.iea=this.lea=this.kea=this.sea=this.hea=this.qea=this.pea=this.tW=this.Lma=this.lG=this.Xca=this.rW=this.Ima=this.qW=this.Gma=0}a.prototype.m$=function(m){this.VR=m};a.prototype.rRa=function(m,h,n,g,k,e,b,c){this.Gma=m;this.Ima=h;this.Xca=n;this.Lma=g;this.qW+=k;this.rW+=e;this.lG+=b;this.tW+=c};a.prototype.Uf=function(){return this.pea!=0||this.qea!=0||this.hea!=0||this.sea!=0||
this.Gma!=0||this.Ima!=0||this.Xca!=0||this.Lma!=0||this.qW!=0||this.rW!=0||this.lG!=0||this.tW!=0};a.prototype.Nb=function(m){m=1E3/m;this.kea=this.U0(this.pea/m,this.Gma/m+this.qW,this.VR);this.lea=this.U0(this.qea/m,this.Ima/m+this.rW,this.VR);this.iea=this.U0(this.hea/m,this.Xca/m+this.lG,this.VR);this.H0=this.U0(this.sea/m,this.Lma/m+this.tW,this.VR);this.pea=this.kea*m;this.qea=this.lea*m;this.hea=this.iea*m;this.sea=this.H0*m;this.tW=this.lG=this.rW=this.qW=0};a.prototype.U0=function(m,h,n){return h==
0?this.bh(m,h,n):h};a.prototype.bh=function(m,h,n){m=(h-m)*(1-n);Math.abs(m)<.01&&(m=0);return h-m};return a});
define("tdv/player/view/map/control/camera/MouseManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher");a("tdv/view/constants/ScaleMode");var k=m.extend(g,function(){g.call(this);this.TR=7;this.W2=this.Vga=!1;this.Y2=void 0;this.Ed=0;this.kc=1;this.tf=this.uf=100;this.h2=1;this.jja=!0;this.kja=!1;
this.Bbb=!0;this.Kma=!1;this.Ab=null});k.prototype.UY=function(e){this.TR=e};k.prototype.Zc=function(e,b,c,d){this.Ed=e;this.kc=b;this.uf=c;this.tf=d};k.prototype.olb=function(e){this.jja=e;this.b5(this.jja&&!!this.Ab)};k.prototype.au=function(e){this.Ab!=e&&(this.b5(!1),this.Bka(!1),this.In(),this.Ab=e,this.b5(this.jja&&!!this.Ab),this.Bka(this.Bbb&&!!this.Ab))};k.prototype.In=function(){this.b5(!1);this.Bka(!1);this.Ab=null};k.prototype.b5=function(e){this.kja!=e&&((this.kja=e)?this.xYa():this.U$a())};
k.prototype.Bka=function(e){this.Kma!=e&&((this.Kma=e)?this.AYa():this.W$a())};k.prototype.xYa=function(){this.Ab.bind(h.Sa,this.te,this,!0);this.Ab.bind(h.gb,this.bl,this,!0);this.Ab.bind(h.$a,this.cl,this,!0)};k.prototype.U$a=function(){this.Ab.h(h.Sa,this.te,this);this.Ab.h(h.gb,this.bl,this);this.Ab.h(h.$a,this.cl,this)};k.prototype.AYa=function(){this.Ab.bind(h.Qk,this.HH,this,!0);this.Ab.bind(h.YK,this.$G,this,!0)};k.prototype.W$a=function(){this.Ab.h(h.Qk,this.HH,this);this.Ab.h(h.YK,this.$G,
this)};k.prototype.te=function(e){this.I9a(e)};k.prototype.bl=function(e){this.$Ga(e)};k.prototype.cl=function(){this.bfa()};k.prototype.HH=function(e){this.mma(e)};k.prototype.$G=function(e){this.nma(e)};k.prototype.I9a=function(e){this.Vga=!0;this.W2=!1;this.Y2=e;this.$Ga(e)};k.prototype.$Ga=function(e){if(this.Vga){var b=e.pageX-this.Y2.pageX,c=e.pageY-this.Y2.pageY;this.W2||(Math.sqrt(b*b+c*c)>this.TR?this.W2=!0:b=c=0);this.W2&&(this.Y2=e);e=this.Ed*Math.PI/180;this.o(new n(k.Gr,{xDelta:-((b*
Math.cos(e)+c*Math.sin(e))/this.uf),yDelta:-((c*Math.cos(e)-b*Math.sin(e))/this.tf)}))}};k.prototype.bfa=function(){this.Vga=!1};k.prototype.nma=function(e){if(this.h2!=e.scale){this.bfa();var b=this.h2;this.h2=e.scale;this.o(new n(k.Ir,{zoomDelta:this.kc*this.h2/b-this.kc}))}};k.prototype.mma=function(e){e.delta!=0&&(this.bfa(),this.o(new n(k.Ir,{zoomDelta:this.kc*e.lA*.1})))};k.Gr="position change";k.Ir="zoom change";k.Tob="vieport navigation";k.Sob="relative navigation";k.Rob="relative exponential navigation";
k.Qob="dragging";return k});define("tdv/player/view/map/control/constants/Movement",["require"],function(){return{dca:"rotateClockwise",eca:"rotateCounterClockwise",Mx:"zoomIn",Nx:"zoomOut",Fg:"stop"}});
define("tdv/player/view/map/control/camera/ManualCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode tdv/player/view/util/Device tdv/player/view/map/control/camera/MovementManager tdv/player/view/map/control/camera/MouseManager tdv/player/view/map/control/constants/Movement tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/constants/ScaleMode"),k=a("tdv/player/view/util/Device"),
e=a("tdv/player/view/map/control/camera/MovementManager"),b=a("tdv/player/view/map/control/camera/MouseManager"),c=a("tdv/player/view/map/control/constants/Movement");a("tdv/constants/EventName");var d=m.extend(n,function(f,l){n.call(this);this.j=f;this.va=l;this.gv=this.u4=this.ha=!1;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.tf=this.uf=100;this.ti=g.sF;this.Bc=new e;this.Hb=new b;k.Jp()?(this.Hb.UY(d.Hca),this.Bc.m$(d.Ica)):(this.Hb.UY(0),this.Bc.m$(1));this.Hb.bind(b.Gr,this.h5a,this,!0);this.Hb.bind(b.Ir,
this.ZC,this,!0)});d.prototype.clear=function(){this.Hb.h(b.Gr,this.iqb,this,!0);this.Hb.h(b.Ir,this.ZC,this,!0);this.Hb.In();this.j=this.va=this.Bc=this.Hb=null};d.prototype.wl=function(f){switch(f){case c.dca:this.md(0,0,+d.xca,0,0,0,0,0);break;case c.eca:this.md(0,0,-d.xca,0,0,0,0,0);break;case c.Mx:this.md(0,0,0,+d.aR,0,0,0,0);break;case c.Nx:this.md(0,0,0,-d.aR,0,0,0,0);break;case c.Fg:this.md(0,0,0,0,0,0,0,0)}};d.prototype.setPosition=function(f,l,p,q,r,t){this.ec=f;this.fc=l;this.Ed=p;this.kc=
q;this.uf=r;this.tf=t;this.Hb.Zc(this.Ed,this.kc,this.uf,this.tf)};d.prototype.Uf=function(){return this.ha&&this.Bc.Uf()};d.prototype.Nb=function(f){this.Bc.Nb(f);this.va.setPosition(this.ec+this.Bc.kea,this.fc+this.Bc.lea,this.Ed+this.Bc.iea,this.kc+this.Bc.H0);this.ec=this.va.getX();this.fc=this.va.getY();this.Ed=this.va.fP();this.kc=this.va.yA()};d.prototype.ZY=function(f){this.gv=f;this.Hb.olb(!this.gv)};d.prototype.Ra=function(f){(this.ha=f)?this.Hb.au(this.j.getParent()):this.Hb.In()};d.prototype.h5a=
function(f){this.md(0,0,0,0,f.data.xDelta,f.data.yDelta,0,0)};d.prototype.ZC=function(f){this.md(0,0,0,0,0,0,0,f.data.zoomDelta)};d.prototype.md=function(f,l,p,q,r,t,u,v){this.Bc.rRa(f,l,p,q,r,t,u,v);this.hj()};d.prototype.hj=function(){this.o(new h(d.Ki))};d.Ki="position change request";d.Hca=7;d.Ica=.2;d.aR=.5;d.xca=30;return d});
define("tdv/player/view/map/control/camera/SyncFovCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/Device tdv/player/view/map/control/camera/MovementManager tdv/player/view/map/control/camera/MouseManager tdv/player/view/map/control/constants/Movement tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/util/Ease"),
k=a("tdv/view/util/EaseDimension"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/map/control/camera/MovementManager"),c=a("tdv/player/view/map/control/camera/MouseManager"),d=a("tdv/player/view/map/control/constants/Movement");a("tdv/constants/EventName");var f=m.extend(n,function(l,p){n.call(this);this.j=l;this.va=p;this.ha=!1;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.tf=this.uf=100;this.la=null;this.Wea=!0;this.rd=null;this.S3=0;this.Pv=this.im=this.Nz=void 0;this.Bc=new b;this.Hb=new c;
e.Jp()?(this.Hb.UY(f.Hca),this.Bc.m$(f.Ica)):(this.Hb.UY(0),this.Bc.m$(1));this.Hb.bind(c.Ir,this.ZC,this,!0)});f.prototype.Xkb=function(l,p){this.uf=l;this.tf=p;this.dO()};f.prototype.hB=function(l){this.rd!=l&&(this.rd=l,this.S3=void 0,this.dO())};f.prototype.tr=function(l,p){this.rd==l&&(this.S3=p,this.dO())};f.prototype.dO=function(){if(this.rd&&this.S3!=void 0){var l=this.rd.get("x",0)/this.uf;var p=this.rd.get("y",0)/this.tf;var q=-(this.S3+this.rd.get("angle",0))}else q=p=l=void 0;this.Pv!=
q&&(this.Pv=q,this.hj());if(this.Nz!=l||this.im!=p)this.Nz=l,this.im=p,this.w3a(),this.hj()};f.prototype.w3a=function(){this.Wea=!0;this.hj()};f.prototype.FI=function(){if(this.Wea||this.la&&this.la.Ve())if(this.Wea=!1,this.la=null,this.Nz!=void 0&&this.im!=void 0&&this.Pv!=void 0){for(var l=this.Pv-this.Ed;l>180;)l-=360;for(;l<-180;)l+=360;this.ec!=this.Nz||this.fc!=this.im?this.la=new g("quad_in_out",[new k("x",this.ec,this.Nz,1),new k("y",this.fc,this.im,1),new k("angleDif",l,l,360)],500):this.Pv!=
this.Ed&&(this.la=new g("quad_in_out",[new k("x",this.ec,this.ec,1),new k("y",this.fc,this.fc,1),new k("angleDif",l,0,360)],500))}};f.prototype.clear=function(){this.Hb.h(c.Ir,this.ZC,this,!0);this.Hb.In();this.j=this.va=this.la=this.Bc=this.Hb=null};f.prototype.wl=function(l){switch(l){case d.Mx:this.md(+f.aR,0);break;case d.Nx:this.md(-f.aR,0);break;case d.Fg:this.md(0,0)}};f.prototype.setPosition=function(l,p,q,r,t,u){this.ec=l;this.fc=p;this.Ed=q;this.kc=r;this.Hb.Zc(this.Ed,this.kc,t,u)};f.prototype.Uf=
function(){return this.ha&&(this.la||this.Bc.Uf()||this.Nz!=void 0&&this.ec!=this.Nz||this.im!=void 0&&this.fc!=this.im||this.Pv!=void 0&&this.Ed!=this.Pv)?!0:!1};f.prototype.Nb=function(l){this.FI();this.la?(this.la.Nb(l),this.ec=this.la.ob("x"),this.fc=this.la.ob("y"),this.Ed=this.Pv-this.la.ob("angleDif")):(this.Nz!=void 0&&(this.ec=this.Nz),this.im!=void 0&&(this.fc=this.im),this.Pv!=void 0&&(this.Ed=this.Pv));this.Bc.Nb(l);this.va.setPosition(this.ec,this.fc,this.Ed,this.kc+this.Bc.H0);this.ec=
this.va.getX();this.fc=this.va.getY();this.Ed=this.va.fP();this.kc=this.va.yA()};f.prototype.Ra=function(l){(this.ha=l)?(this.Hb.au(this.j.getParent()),this.dO()):this.Hb.In()};f.prototype.ZC=function(l){this.md(0,l.data.zoomDelta)};f.prototype.md=function(l,p){this.Bc.rRa(0,0,0,l,0,0,0,p);this.hj()};f.prototype.hj=function(){this.o(new h(f.Ki))};f.Ki="position change request";f.Hca=7;f.Ica=.2;f.aR=.5;f.xca=30;return f});
define("tdv/player/view/map/control/CameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/constants/MovementMode tdv/view/constants/ScaleMode tdv/player/view/map/control/camera/LimitsManager tdv/player/view/map/control/camera/ManualCameraController tdv/player/view/map/control/camera/SyncFovCameraController tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/map/constants/MovementMode"),
k=a("tdv/view/constants/ScaleMode"),e=a("tdv/player/view/map/control/camera/LimitsManager"),b=a("tdv/player/view/map/control/camera/ManualCameraController"),c=a("tdv/player/view/map/control/camera/SyncFovCameraController"),d=a("tdv/constants/EventName"),f=m.extend(n,function(l){n.call(this);this.j=l;this.j.bind(d.$b,this.kd,this);this.Zo=g.sF;this.rd=null;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.ab=null;this.K4=this.J4=this.Xv=this.Wv=!1;this.pp=!0;this.ha=!1;this.va=new e;this.va.du(this.Zo);
this.rc=new b(this.j,this.va);this.rc.bind(b.Ki,this.Ds,this,!0);this.Pj=new c(this.j,this.va);this.Pj.bind(c.Ki,this.Ds,this,!0);this.w4()});f.prototype.clear=function(){this.rc.h(b.Ki,this.Ds,this);this.rc.clear();this.rc=null;this.Pj.h(c.Ki,this.Ds,this);this.Pj.clear();this.ab=this.va=this.Pj=null;this.j.h(d.$b,this.kd,this);this.j=null};f.prototype.stop=function(){this.Ge=this.ab=null;this.ha=!1;this.rc.Ra(!1);this.Pj.Ra(!1);this.Ez(0,0,0)};f.prototype.start=function(l){var p=l.ab,q=p.get("width",
100),r=p.get("height",100),t=p.get("scaleMode",k.uj),u=p.get("minimumZoomFactor",1),v=p.get("maximumZoomFactor",1),w=p.get("initialZoomFactor",1);this.ab=p;this.ha=!0;this.Ge=l.getItem();this.Ez(0,0,0);this.Pj.Xkb(q,r);this.va.setConfiguration(q,r,t,u,v);this.va.setPosition(.5,.5,0,w);this.j.mra(this.Ge,this.va.getX(),this.va.getY(),this.va.fP(),this.va.yA());this.w4()};f.prototype.wl=function(l){this.rc.wl(l);this.Pj.wl(l)};f.prototype.du=function(l){this.Zo!=l&&(this.Zo=l,this.va.du(l),this.w4())};
f.prototype.hB=function(l){this.rd!=l&&(this.rd=l,this.Pj.hB(l),this.w4())};f.prototype.ZY=function(l){this.rc&&this.rc.ZY(l)};f.prototype.tr=function(l,p,q,r){this.Pj.tr(l,p,q,r)};f.prototype.YA=function(l){this.ha&&(this.Pj.Uf()?(this.Pj.Nb(l),this.vn(this.Pj.ec,this.Pj.fc,this.Pj.Ed,this.Pj.kc),this.bb()):this.rc.Uf()?(this.rc.Nb(l),this.vn(this.rc.ec,this.rc.fc,this.rc.Ed,this.rc.kc),this.bb()):this.Ez(0,0,0))};f.prototype.ze=function(){if(this.Ge){var l=this.j.N7(this.Ge),p=this.j.O7(this.Ge),
q=this.j.M7(this.Ge),r=this.j.ufb(this.Ge),t=this.j.L7(this.Ge),u=this.j.K7(this.Ge),v=l-this.ec,w=p-this.fc,x=r-this.kc;this.ec=l;this.fc=p;this.Ed=q;this.kc=r;this.Ez(v,w,x);this.Pj.setPosition(l,p,q,r,t,u);this.rc.setPosition(l,p,q,r,t,u)}};f.prototype.w4=function(){this.Zo==g.jca&&this.rd!=null&&this.rd.get("map")==this.ab?(this.rc.Ra(!1),this.Pj.Ra(!0)):(this.rc.Ra(!0),this.Pj.Ra(!1))};f.prototype.Ds=function(){this.bb()};f.prototype.kd=function(){this.va.setSize(this.j.nb(),this.j.Mb());this.bb()};
f.prototype.bb=function(){this.o(new h(f.oc))};f.prototype.vn=function(l,p,q,r){this.j.mra(this.Ge,l,p,q,r)};f.prototype.Ez=function(l,p,q){l=!1;this.Xv!=q<0&&(this.Xv=!this.Xv,l=!0);this.Wv!=q>0&&(this.Wv=!this.Wv,l=!0);this.J4!=this.lG>0&&(this.J4=!this.J4,l=!0);this.K4!=this.lG<0&&(this.K4=!this.K4,l=!0);this.pp!=(q==0)&&(this.pp=!this.pp,l=!0);l&&this.o(new h(f.Cl,{rotatingClockwise:this.J4,rotatingCounterClockwise:this.K4,zoomingIn:this.Wv,zoomingOut:this.Xv,stopped:this.pp}))};f.oc="request frame";
f.Cl="movement change";return f});
define("tdv/player/view/map/control/DisplayController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/view/constants/ScaleMode tdv/player/view/map/control/camera/LimitsManager".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/constants/ScaleMode"),k=a("tdv/player/view/map/control/camera/LimitsManager"),e=m.extend(n,function(b,c){n.call(this);this.P=b;this.j=c;this.va=new k;this.Ah=[];this.sb=e.wo;this.hs=this.Vk=
this.Sm=null;this.Rh=this.P.get("transitionDuration");this.An=void 0});e.prototype.du=function(b){this.va.du(b)};e.prototype.WW=function(b){b.OX()&&this.Lda();this.Ah.push(b);this.A3()};e.prototype.oe=function(){this.Lda();this.Ah.push(null);this.A3()};e.prototype.clear=function(){this.sb=e.wo;this.Lda();this.P6a();this.Kja();this.j=null};e.prototype.ze=function(b){this.sb==e.wo||this.sb!=e.vo&&this.sb!=e.sL||(this.An+=b,b=Math.min(1,this.An/this.Rh),this.sb==e.vo?this.j.eB(this.hs,b):this.j.eB(this.M0,
1-b),this.An<this.Rh?this.bb():this.sb==e.vo?this.xy():this.m0a())};e.prototype.A3=function(){if(this.sb==e.wo){for(;this.Ah.length>0&&this.DXa(this.Ah[0],this.Vk);)this.Ah.shift();this.Ah.length>0&&this.$x()}};e.prototype.DXa=function(b,c){return b==c||!!b&&!!c&&b.isEqual(c)};e.prototype.$x=function(){!this.Vk||this.Ah[0]&&!this.Ah[0].OX()||this.Vk.ab==(this.Ah[0]&&this.Ah[0].ab)||this.o(new h(e.wF,{map:this.Vk.ab}));this.P.get("transitionMode","blending")!="fade_out_fade_in"||!this.Vk||this.Ah[0]&&
!this.Ah[0].OX()?(this.hs=(this.Sm=this.Ah.shift())&&this.Sm.getItem(),this.Sm?this.Zx():this.Vk&&this.ay()):this.ay()};e.prototype.Zx=function(){this.$Wa();this.Sm.OX()&&this.L7a();this.An=0;this.sb=e.vo;this.bb()};e.prototype.xy=function(){this.Kja();this.Vk=this.Sm;this.M0=this.hs;this.hs=this.Sm=null;this.cM()};e.prototype.ay=function(){this.An=0;this.sb=e.sL;this.bb()};e.prototype.m0a=function(){this.Kja();this.Vk=null;this.cM()};e.prototype.cM=function(){this.sb=e.wo;this.Vk&&this.Vk.OX()&&
this.o(new h(e.xF,{map:this.Vk.ab}));this.Ah.length==0?this.Vk?this.o(new h(e.nba,{level:this.Vk})):this.o(new h(e.Zaa)):this.$x()};e.prototype.L7a=function(){var b=this.Sm.ab;this.Sm.yk();this.va.setConfiguration(b.get("width",100),b.get("height",100),b.get("scaleMode",g.uj),b.get("minimumZoomFactor",1),b.get("maximumZoomFactor",1));this.va.setPosition(.5,.5,0,b.get("initialZoomFactor",1));this.j.mra(this.hs,this.va.getX(),this.va.getY(),this.va.fP(),this.va.yA())};e.prototype.bb=function(){this.o(new h(e.oc))};
e.prototype.Lda=function(){for(;this.Ah.length>0;){var b=this.Ah.shift();b&&this.j.ho(b.getItem())}};e.prototype.$Wa=function(){this.Sm&&(this.j.Qbb(this.hs),this.j.scb(this.hs),this.j.eB(this.hs,0),this.o(new h(e.mba,{level:this.Sm})))};e.prototype.Kja=function(){this.Vk&&(this.j.removeItem(this.M0),this.o(new h(e.i_,{level:this.Vk})),this.j.ho(this.M0),this.M0=this.Vk=null)};e.prototype.P6a=function(){this.Sm&&(this.j.removeItem(this.hs),this.o(new h(e.i_,{level:this.Sm})),this.j.ho(this.hs),this.hs=
this.Sm=null)};e.wo="stopped";e.vo="blending";e.sL="disolving";e.oc="request frame";e.mba="level added";e.i_="level removed";e.nba="level fully displayed";e.Zaa="all pending maps hidden";e.xF="map show";e.wF="map hide";return e});
define("tdv/player/view/map/control/Level",["require"],function(){function a(m,h){this.ab=m;this.lb=m.get("image");this.Qf=h;this.Pga=void 0}a.prototype.getItem=function(){switch(this.Qf){case a.w_:return this.ab.ELa();default:return this.ab.cr()}};a.prototype.yk=function(){switch(this.Qf){case a.w_:return this.ab.vJ();default:return this.ab.Et()}};a.prototype.OX=function(){return this.Pga===void 0?this.getIndex()==0:this.Pga};a.prototype.Kkb=function(m){this.Pga=m};a.prototype.PX=function(){return this.Qf==
a.Cta};a.prototype.isEqual=function(m){return m&&this.ab==m.map&&this.Qf==m.type};a.prototype.getIndex=function(){return this.Qf==a.w_||this.ab.mP()?0:1};a.prototype.ZKa=function(){return this.ab.mP()?2:1};a.w_="preload";a.Cta="load";return a});
define("tdv/player/view/map/control/LoadController","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/Level tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),k=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/map/control/Level"),b=a("tdv/player/view/util/Device"),c=m.extend(k,function(d){k.call(this);
this.j=d;this.Ah=[];this.MR=this.CH=this.Kh=null;this.vH=!1;this.i2=null;this.q3=m.mr(this.q3,this)});c.prototype.clear=function(){this.stop();this.j=null};c.prototype.yNa=function(d,f){if(this.i2!=d||f)this.stop(),this.ab=d,this.ab.Pjb(),h.KD(this.ab,"image.levels.url",this.q3),f=[],d.mP()&&b.ub()&&f.push(new e(d,e.w_)),f.push(new e(d,e.Cta)),f=f.filter(function(l){return l.getItem().rl()}),f.length&&(this.Ah=this.Ah.concat(f),this.A3())};c.prototype.q3=function(){this.reload()};c.prototype.reload=
function(){this.yNa(this.ab,!0)};c.prototype.stop=function(){h.da(this.ab,"image.levels.url",this.q3);this.i2=this.ab=null;this.Ah=[];this.HFa();this.vH&&(this.vH=!1,this.zla(),this.j.ho(this.Kh.getItem()),this.Kh=null,this.o(new g(c.j_)))};c.prototype.A3=function(){this.vH||this.wha()};c.prototype.wha=function(){this.Ah.length>0?(this.Kh=this.Ah.shift(),this.vH||(this.vH=!0,this.o(new g(c.h_,{level:this.Kh,percent:0}))),this.rYa(),this.j.FA(this.Kh.getItem()),this.j.fsa(this.Kh.getItem())&&this.fia()):
this.vH&&(this.vH=!1,this.o(new g(c.j_)))};c.prototype.fia=function(){this.zla();this.z9a();this.Kh=null;this.wha()};c.prototype.z9a=function(){this.HFa();this.CH=this.Kh;var d=this;this.MR=setTimeout(function(){d.MR=null;d.R4a()},500)};c.prototype.R4a=function(){var d=this.CH.ab;this.CH.Kkb(d!=this.i2);this.i2=d;this.o(new g(c.oba,{level:this.CH}));this.CH=null};c.prototype.HFa=function(){this.MR!=null&&(clearTimeout(this.MR),this.MR=null,this.j.ho(this.CH.getItem()),this.CH=null)};c.prototype.sBa=
function(){this.zla();this.Kh=null;this.wha()};c.prototype.tBa=function(d){this.o(new g(c.h_,{level:this.Kh,percent:d.percent}))};c.prototype.rYa=function(){var d=this.Kh.getItem();d.bind(n.ia,this.fia,this);d.bind(n.$c,this.sBa,this);d.bind(n.yc,this.tBa,this)};c.prototype.zla=function(){var d=this.Kh.getItem();d.h(n.ia,this.fia,this);d.h(n.$c,this.sBa,this);d.h(n.yc,this.tBa,this)};c.h_="level loading progress";c.oba="level loaded";c.j_="load stopped";return c});
define("tdv/player/view/map/control/overlays/Point",["require"],function(){function a(m,h){this.x=m;this.y=h}a.prototype.rotate=function(m){var h=Math.cos(m);m=Math.sin(m);var n=this.x*m+this.y*h;this.x=this.x*h-this.y*m;this.y=n;return this};a.prototype.translate=function(m,h){this.x+=m;this.y+=h;return this};a.prototype.scale=function(m,h){this.x*=m;this.y*=h;return this};return a});
define("tdv/view/images/ScalableImage",["require","tdv/view/constants/ScaleMode","tdv/view/constants/Alignment"],function(a){function m(g,k,e){this.fj=g;this.vFa=k;this.tFa=e;this.ti=h.GB;this.GC=n.$e;this.JD=n.$d}var h=a("tdv/view/constants/ScaleMode"),n=a("tdv/view/constants/Alignment");m.prototype.dQ=function(g){this.ti=g};m.prototype.bQ=function(g){this.GC=g};m.prototype.hQ=function(g){this.JD=g};m.prototype.TO=function(g,k,e){var b=this.vFa,c=this.tFa,d;switch(this.ti){case h.NONE:var f=d=1;
break;case h.uj:d=f=Math.min(k/b,e/c);break;case h.Jr:d=f=Math.max(k/b,e/c);break;case h.Tp:d=f=k/b;break;case h.Pk:d=f=e/c;break;default:d=k/b,f=e/c}var l=Math.min(this.vFa*d,k);d=Math.min(k/d,b);switch(this.GC){case n.fb:b=k=0;break;case n.Db:k-=l;b-=d;break;default:k=(k-l)*.5,b=(b-d)*.5}var p=Math.min(this.tFa*f,e);f=Math.min(e/f,c);switch(this.JD){case n.Tc:c=e=0;break;case n.Gc:e-=p;c-=f;break;default:e=(e-p)*.5,c=(c-f)*.5}g.drawImage(this.fj,Math.round(b),Math.round(c),Math.round(d+b-Math.round(b)),
Math.round(f+c-Math.round(c)),Math.round(k),Math.round(e),Math.round(l+k-Math.round(k)),Math.round(p+e-Math.round(e)))};return m});
define("tdv/player/view/map/control/overlays/HotspotMapOverlayMapController","require tdv/constants/EventName tdv/constants/Priority tdv/player/view/map/control/overlays/Point tdv/view/images/ImageLoader tdv/view/images/ScalableImage".split(" "),function(a){function m(b,c,d,f){this.j=b;this.ab=c;this.uf=this.ab.get("width");this.tf=this.ab.get("height");this.Ge=this.ab.cr();this.wza=d;this.mq=f;this.iH=null;if(this.mq){if(this.BN=this.wza.BN,this.Pa=this.mq.get("width"),this.Ha=this.mq.get("height"),
this.ec=this.mq.get("x",0),this.fc=this.mq.get("y",0),this.Zha=this.mq.get("offsetX",0),this.$ha=this.mq.get("offsetY",0),this.hb=this.mq.Et())this.IC=new k(n.Hm),this.IC.load(this.hb.get("url")),this.IC.bind(h.ia,this.ZBa,this)}else this.IC=null}var h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/map/control/overlays/Point"),k=a("tdv/view/images/ImageLoader"),e=a("tdv/view/images/ScalableImage");m.prototype.clear=function(){this.mq=this.wza=this.Ge=this.ab=this.j=
null;this.IC&&(this.IC.h(h.ia,this.ZBa,this),this.IC.cancel(),this.IC=null);this.iH=null};m.prototype.rLa=function(b,c){this.xza=void 0;if(this.iH&&b!=void 0&&c!=void 0){var d=this.j.nb()*.5,f=this.j.Mb()*.5,l=this.j.M7(this.Ge)*Math.PI/180,p=this.j.L7(this.Ge),q=this.j.K7(this.Ge),r=this.j.N7(this.Ge),t=this.j.O7(this.Ge);b=new g(b,c);b.translate(-d,-f);b.rotate(-l);b.scale(1/p,1/q);b.translate(r,t);b.scale(this.uf,this.tf);b.translate(-this.ec,-this.fc);this.BN||(b.rotate(l),b.scale(p/this.uf,q/
this.tf));b.translate(this.Zha,this.$ha);d=Math.round(b.x);f=Math.round(b.y);d>=0&&d<this.iH.width&&f>=0&&f<this.iH.height&&(d=(this.iH.width*f+d)*4,f=this.iH.data,this.xza=f[d+3]>0?"#"+this.xda(f[d+0])+this.xda(f[d+1])+this.xda(f[d+2]):"transparent")}return this.xza};m.prototype.ZBa=function(){var b=new e(this.IC.xg(),this.hb.get("width"),this.hb.get("height"));b.dQ(this.mq.get("scaleMode"));b.bQ(this.mq.get("horizontalAlign"));b.hQ(this.mq.get("verticalAlign"));var c=document.createElement("canvas");
c.width=Math.round(this.Pa);c.height=Math.round(this.Ha);var d=c.getContext("2d");b.TO(d,c.width,c.height);this.iH=d.getImageData(0,0,c.width,c.height);c.width=c.height=0};m.prototype.xda=function(b){for(b=b.toString(16);b.length<2;)b="0"+b;return b};return m});
define("tdv/player/view/map/control/overlays/HotspotMapOverlayController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Color tdv/player/view/util/Device tdv/player/view/map/control/overlays/HotspotMapOverlayMapController tdv/view/constants/Cursor tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/util/Color"),
e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/map/control/overlays/HotspotMapOverlayMapController"),c=a("tdv/view/constants/Cursor"),d=a("tdv/view/util/Ease"),f=a("tdv/view/util/EaseDimension"),l=m.extend(g,function(p,q,r){g.call(this);this.j=p;this.ab=q;this.Dc=r;this.Ja=this.Dc.getItem();this.Ts=this.Dc.ILa();this.Vs=this.Dc.NLa();this.Qy=this.So=void 0;this.P=this.j.getParent();this.P.bind(h.gb,this.rg,this);this.P.bind(h.Eb,this.UT,this);this.P.bind(h.Sa,this.uq,this);this.P.bind(h.$a,
this.fz,this);this.P.bind(h.ma,this.ez,this);r.bind(h.L("selected"),this.NCa,this);r.bind(h.L("enabled"),this.As,this);this.E2=new b(this.j,this.ab,this.Dc,this.Dc.get("map",null));this.G2=new b(this.j,this.ab,this.Dc,this.Dc.get("rollOverMap",this.Dc.get("map",null)));this.H2=new b(this.j,this.ab,this.Dc,this.Dc.get("selectedMap",this.Dc.get("rollOverMap",this.Dc.get("map",null))));this.E1=new b(this.j,this.ab,this.Dc,this.Dc.get("image",null));this.F1=new b(this.j,this.ab,this.Dc,this.Dc.get("rollOverImage",
this.Dc.get("image",null)));this.G1=new b(this.j,this.ab,this.Dc,this.Dc.get("selectedImage",this.Dc.get("rollOverImage",this.Dc.get("image",null))));this.Bd=this.Ad=void 0;this.aO=null;this.Tx=[];this.Nu=[];this.yR=[];this.Qi={};this.qAa=[];this.Jy=!1;this.pma=this.Dc.get("useHandCursor");this.la=null;this.RN=void 0;this.U4=this.H4=this.Z1=0;p=this.Dc.get("areas",[]);for(q=0;q<p.length;q++){r=p[q];var t=r.get("mapColor");t&&(t=t.toLowerCase(),this.Qi[t]===void 0&&(this.Qi[t]=[],this.qAa.push(t)),
this.Qi[t].push(r))}this.Ja&&(this.j.v6(this.ab.cr(),this.Ja),this.j.eB(this.Ja,this.Z1));this.Ts&&(this.j.v6(this.ab.cr(),this.Ts),this.j.eB(this.Ts,this.H4));this.Vs&&(this.j.v6(this.ab.cr(),this.Vs),this.j.eB(this.Vs,this.U4));this.kV("none");this.Mla();this.REa(!1);this.SEa(this.Dc.get("selected"))});l.prototype.clear=function(){this.P.h(h.gb,this.rg,this);this.P.h(h.Eb,this.UT,this);this.P.h(h.Sa,this.uq,this);this.P.h(h.$a,this.fz,this);this.P.h(h.ma,this.ez,this);this.P=null;this.E2&&this.E2.clear();
this.E2=null;this.G2&&this.G2.clear();this.G2=null;this.H2&&this.H2.clear();this.H2=null;this.E1&&this.E1.clear();this.E1=null;this.F1&&this.F1.clear();this.F1=null;this.G1&&this.G1.clear();this.G1=null;this.Tx=[];this.So=!1;this.Mla();this.Nu=[];this.yR=[];this.Qi={};this.MFa();this.fW();this.ab=this.j=null;this.Dc.h(h.L("selected"),this.NCa,this);this.Vs=this.Ts=this.Ja=this.Dc=null};l.prototype.match=function(p){return this.Dc==p};l.prototype.ze=function(p){this.zM(!1);this.la&&(this.la.Nb(p),
this.Z1=this.la.ob("itemAlpha"),this.H4=this.la.ob("rollOverItemAlpha"),this.U4=this.la.ob("selectedItemAlpha"),this.Ja&&this.j.eB(this.Ja,this.Z1),this.Ts&&this.j.eB(this.Ts,this.H4),this.Vs&&this.j.eB(this.Vs,this.U4),this.la.Ve()?this.la=null:this.bb())};l.prototype.uq=function(p){this.Ad=p.x-this.P.u.Dd;this.Bd=p.y-this.P.u.ie;this.zM(!0);this.Nu=this.Tx.slice()};l.prototype.rg=function(p){this.Ad=p.x-this.P.u.Dd;this.Bd=p.y-this.P.u.ie;this.zM(!0)};l.prototype.fz=function(p){this.Ad=p.x-this.P.u.Dd;
this.Bd=p.y-this.P.u.ie;this.zM(!0);this.yR=m.intersection(this.Nu,this.Tx);this.Nu=[]};l.prototype.ez=function(){this.yR&&(this.qla(this.yR,"click"),this.yR=[])};l.prototype.UT=function(){this.Bd=this.Ad=void 0;this.zM(!0);this.Nu=this.Tx.slice()};l.prototype.NCa=function(){this.SEa(this.Dc.get("selected"))};l.prototype.As=function(){this.zM(!0);this.jh();this.bb()};l.prototype.zM=function(p){this.Mza=!0;p?this.$N():this.P3a()||this.U9a()};l.prototype.U9a=function(){this.MFa();var p=this;this.aO=
setTimeout(function(){p.aO=null;p.$N()},200)};l.prototype.P3a=function(){return this.aO?!0:!1};l.prototype.MFa=function(){this.aO&&(clearTimeout(this.aO),this.aO=null)};l.prototype.$N=function(){if(this.Mza){this.Mza=!1;var p=this.Tx,q=this.d1a();this.Tx=q;e.Jp()||(this.qla(m.difference(q,p),"rollOver"),this.REa(q.length>0),this.qla(m.difference(p,q),"rollOut"),this.fW())}};l.prototype.fW=function(){for(var p="",q=0;q<this.Tx.length&&!p;q++){var r=this.Tx[q];r.get("toolTip")&&(p=r.get("toolTip"))}this.jc!=
p&&(this.jc&&this.j.gjb(this.jc),(this.jc=p)&&this.j.njb(this.jc))};l.prototype.Mla=function(){var p=this.So&&(this.pma!==!1||this.Tx.some(q=>q.get("useHandCursor")===!0));this.Jy!=p&&((this.Jy=p)?this.j.W9(c.qf):this.j.TP(c.qf))};l.prototype.d1a=function(){if(this.Dc.get("enabled")===!1)return[];var p=[],q=this.Qy?this.H2:this.So?this.G2:this.E2;q&&(q=q.rLa(this.Ad,this.Bd))&&(this.Qi.any&&(p=p.concat(this.Qi.any)),q=="transparent"&&this.Qi.transparent&&(p=p.concat(this.Qi.transparent)),q!="transparent"&&
(p=this.Qi[q]?p.concat(this.Qi[q]):p.concat(this.Qi[k.$jb(q,this.qAa)]||[]),this.Qi.image&&(p=p.concat(this.Qi.image))));if(q=this.Qy?this.G1:this.So?this.F1:this.E1)if(q=q.rLa(this.Ad,this.Bd))this.Qi.any&&(p=p.concat(this.Qi.any)),q=="transparent"&&this.Qi.transparent&&(p=p.concat(this.Qi.transparent)),q!="transparent"&&this.Qi.image&&(p=p.concat(this.Qi.image));q=[];for(var r=0;r<p.length;r++){var t=p[r];q.indexOf(t)<0&&q.push(t)}return q};l.prototype.qla=function(p,q){if(p)for(var r=0;r<p.length;r++)p[r].o(new n(q))};
l.prototype.ir=function(){return this.So};l.prototype.REa=function(p){this.So!=p&&(this.So=p,this.o(new n(l.iba)),this.jh(),this.Mla(),this.bb())};l.prototype.SEa=function(p){this.Qy!=p&&(this.Qy=p,this.jh(),this.bb())};l.prototype.jh=function(){!this.So&&this.Dc.get("rollOverDisplay")==1||this.Dc.get("enabled")===!1?this.kV("none"):this.Qy?this.kV("selected"):this.So?this.kV("roll over"):this.kV("visible")};l.prototype.kV=function(p){if(this.RN!=p){this.RN=p;var q;if(["selected"].includes(this.RN)&&
this.Vs){var r=1;p=q=0}else["selected","roll over"].includes(this.RN)&&this.Ts?(q=1,p=r=0):["selected","roll over","visible"].includes(this.RN)?(p=1,r=q=0):p=r=q=0;var t=this.Z1,u=this.H4,v=this.U4,w=Math.max(200*Math.abs(p-t),200*Math.abs(q-u),200*Math.abs(r-v));this.la=new d(this.RN=="none"?"quad_out":"quad_in",[new f("itemAlpha",t,p),new f("rollOverItemAlpha",u,q),new f("selectedItemAlpha",v,r)],w)}};l.prototype.bb=function(){this.o(new n(l.oc))};l.oc="request frame";l.iba="is over update";return l});
define("tdv/player/view/map/renderer/item/FovOverlay",["require","tdv/utils","tdv/player/view/map/renderer/item/Overlay"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Overlay");a=m.extend(h,function(n,g,k,e,b,c,d){h.call(this,h.Iua,n,g);this.m3a=k;this.n3a=e;this.$5a=b;this.a6a=c;this.ne=d;this.hW=[]});a.prototype.xA=function(){return this.ne};return a});
define("tdv/player/view/map/control/overlays/FovOverlayController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/overlays/Point tdv/player/view/map/renderer/item/FovOverlay".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/map/control/overlays/Point"),e=a("tdv/player/view/map/renderer/item/FovOverlay"),b=m.extend(g,function(c,
d,f){g.call(this);this.j=c;this.P=this.j.getParent();this.P.bind(h.Sa,this.uq,this,!0);this.P.bind(h.gb,this.rg,this,!0);this.P.bind(h.Pr,this.UT,this,!0);this.ab=d;this.uf=this.ab.get("width");this.tf=this.ab.get("height");this.G6a=Math.sqrt(this.uf*this.uf+this.tf*this.tf)*this.ab.get("fieldOfViewOverlayRadiusScale",1);this.Ge=this.ab.cr();this.rd=f;this.fN=this.rd.get("x",0);this.gN=this.rd.get("y",0);this.R3=this.rd.get("angle",0);this.Ja=this.m_a();this.gv=!1;this.Ga=0;this.kb=Math.PI*.5;this.te=
!1;this.Bd=this.Ad=void 0;this.j.v6(this.ab.cr(),this.Ja)});b.prototype.uRa=function(c,d){this.Ga=c+this.R3-90;this.kb=d;this.bb()};b.prototype.clear=function(){this.P.h(h.Sa,this.uq,this);this.P.h(h.gb,this.rg,this);this.P.h(h.Pr,this.UT,this);this.P=null;this.j.ujb(this.ab.cr(),this.Ja);this.Ja=this.rd=this.Ge=this.ab=this.j=null};b.prototype.ze=function(){this.j.Okb(this.Ja,this.Ga,this.kb)};b.prototype.m_a=function(){return new e(this.fN,this.gN,this.ab.get("fieldOfViewOverlayInsideColor","#FFFFFF"),
this.ab.get("fieldOfViewOverlayInsideOpacity",0),this.ab.get("fieldOfViewOverlayOutsideColor","#000000"),this.ab.get("fieldOfViewOverlayOutsideOpacity",0),this.ab.get("fieldOfViewOverlayRadiusScale",1))};b.prototype.bb=function(){this.o(new n(b.oc))};b.prototype.Qla=function(){var c=!1;if(this.Ad!=void 0&&this.Bd!=void 0){var d=this.j.nb()*.5,f=this.j.Mb()*.5,l=this.j.M7(this.Ge)*Math.PI/180,p=this.j.L7(this.Ge),q=this.j.K7(this.Ge),r=this.j.N7(this.Ge),t=this.j.O7(this.Ge);c=new k(this.Ad,this.Bd);
c.translate(-d,-f);c.rotate(-l);c.scale(1/p,1/q);c.translate(r,t);c.scale(this.uf,this.tf);c.translate(-this.fN,-this.gN);c.rotate(-this.Ga*Math.PI/180);d=Math.round(Math.atan2(c.y,c.x)*180/Math.PI);c=Math.round(Math.sqrt(c.x*c.x+c.y*c.y))<=this.G6a&&Math.abs(d)<this.kb*.5}this.gv!=c&&(this.gv=c,this.o(new n(b.Uba,{inFOV:this.gv})))};b.prototype.Wgb=function(){return this.gv};b.prototype.uq=function(c){this.Ad=c.x;this.Bd=c.y;this.te=!0;this.Qla()};b.prototype.rg=function(c){this.te||(this.Ad=c.x,
this.Bd=c.y,this.Qla())};b.prototype.UT=function(){this.Bd=this.Ad=void 0;this.te=!1;this.Qla()};b.oc="request frame";b.Uba="mouse in fov change";return b});
define("tdv/player/view/map/control/OverlaysController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/script/HotspotMapOverlay tdv/player/view/map/control/overlays/HotspotMapOverlayController tdv/player/view/map/control/overlays/FovOverlayController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/script/HotspotMapOverlay"),k=a("tdv/player/view/map/control/overlays/HotspotMapOverlayController"),e=a("tdv/player/view/map/control/overlays/FovOverlayController"),
b=m.extend(n,function(c){n.call(this);this.j=c;this.fT=[];this.My=[];this.No=[];this.hp=this.rd=null});b.prototype.clear=function(){for(var c=0;c<this.My.length;c++)this.My[c].clear();for(c=0;c<this.No.length;c++)this.No[c].clear();this.j=this.fT=this.rd=this.No=this.My=null};b.prototype.WW=function(c){c.PX()&&this.lXa(c.ab)};b.prototype.Loa=function(c){c.PX()&&this.X6a(c.ab)};b.prototype.hB=function(c){this.rd!=c&&(this.rd&&this.Mja(this.rd.get("map")),this.rd=c,this.hp=null,this.rd&&(c=this.rd.get("map"),
this.Sga(c)&&this.Bva(c)))};b.prototype.tr=function(c,d,f,l){this.hp={yaw:d,pitch:f,hfov:l};for(f=0;f<this.No.length;f++){var p=this.No[f];if(p.rd==c){p.uRa(d,l);break}}};b.prototype.lXa=function(c){this.Sga(c)&&(this.YDa(c),this.Mja(c));this.fT.push(c);this.dXa(c);this.Bva(c)};b.prototype.X6a=function(c){var d=this.fT.indexOf(c);d>=0&&this.fT.splice(d,1);this.Sga(c)||(this.YDa(c),this.Mja(c))};b.prototype.Sga=function(c){return this.fT.includes(c)};b.prototype.ze=function(c){for(var d=0;d<this.My.length;d++)this.My[d].ze(c);
for(d=0;d<this.No.length;d++)this.No[d].ze(c)};b.prototype.dXa=function(c){for(var d=c.get("overlays",[]),f=0;f<d.length;f++){var l=d[f];l instanceof g&&(l=new k(this.j,c,l),l.bind(k.oc,this.bb,this,!0),l.bind(k.iba,this.Vza,this,!0),this.My.push(l))}};b.prototype.Bva=function(c){this.rd&&this.rd.get("map")==c&&this.rd.get("visible")!==!1&&(c=new e(this.j,c,this.rd),c.bind(e.oc,this.bb,this,!0),c.bind(e.Uba,this.l3,this,!0),this.No.push(c),this.hp&&c.uRa(this.hp.yaw,this.hp.hfov));this.l3()};b.prototype.YDa=
function(c){c=c.get("overlays",[]);for(var d=0;d<c.length;d++)for(var f=c[d],l=0;l<this.My.length;l++){var p=this.My[l];if(p.match(f)){p.h(k.oc,this.bb,this);p.h(k.iba,this.Vza,this);p.clear();this.My.splice(l,1);break}}};b.prototype.Mja=function(c){for(var d=0;d<this.No.length;d++){var f=this.No[d];if(f.ab==c){f.h(e.oc,this.bb,this);f.h(e.Uba,this.l3,this);f.clear();this.No.splice(d,1);break}}this.l3()};b.prototype.Vza=function(){};b.prototype.bb=function(){this.o(new h(b.oc))};b.prototype.l3=function(){for(var c=
!1,d=0;d<this.No.length;d++)this.No[d].Wgb()&&(c=!0);this.o(new h(b.hba,{inFOV:c}))};b.oc="request frame";b.hba="in fov change";return b});
define("tdv/player/view/map/control/PanoramaRotationController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/constants/MovementMode tdv/player/view/map/control/overlays/Point".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/map/constants/MovementMode"),e=a("tdv/player/view/map/control/overlays/Point"),b=m.extend(g,function(c){g.call(this);
this.j=c;this.P=this.j.getParent();this.P.bind(h.gb,this.rg,this,!0);this.P.bind(h.Sa,this.uq,this,!0);this.P.bind(h.$a,this.fz,this,!0);this.ab=null;this.Ge=this.tf=this.uf=void 0;this.rd=null;this.R3=this.gN=this.fN=void 0;this.gv=!1;this.Bd=this.Ad=this.Zo=void 0;this.te=!1;this.Ga=0});b.prototype.clear=function(){this.P.h(h.gb,this.rg,this);this.P.h(h.Sa,this.uq,this);this.P.h(h.$a,this.fz,this);this.j=this.rd=this.Ge=this.ab=this.P=null};b.prototype.ZY=function(c){this.gv=c;this.Ila()};b.prototype.WW=
function(c){c.PX()&&this.VEa(c.ab)};b.prototype.Loa=function(c){c.PX()&&this.ab==c.ab&&this.VEa(null)};b.prototype.VEa=function(c){this.ab!=c&&((this.ab=c)?(this.uf=this.ab.get("width"),this.tf=this.ab.get("height"),this.Ge=this.ab.cr()):(this.tf=this.uf=void 0,this.Ge=null))};b.prototype.hB=function(c){this.rd!=c&&((this.rd=c)?(this.fN=this.rd.get("x",0),this.gN=this.rd.get("y",0),this.R3=this.rd.get("angle",0)):this.R3=this.gN=this.fN=void 0)};b.prototype.tr=function(c,d){this.rd==c&&(this.Ga=d)};
b.prototype.du=function(c){this.Zo=c};b.prototype.uq=function(c){this.Ad=c.x;this.Bd=c.y;this.te=!0;this.Ila()};b.prototype.rg=function(c){this.Ad=c.x;this.Bd=c.y;this.zj&&(c=this.Vya(),this.o(new n(b.tj,{yawDelta:c-this.Ed})),this.Ed=c)};b.prototype.fz=function(c){this.Ad=c.x;this.Bd=c.y;this.te=!1;this.Ila()};b.prototype.Ila=function(){var c=this.te&&this.rd&&this.ab&&(this.Zo==k.jca||this.gv);this.zj!=c&&(this.zj=c)&&(this.Ed=this.Vya())};b.prototype.Vya=function(){var c=this.j.nb()*.5,d=this.j.Mb()*
.5,f=new e(this.Ad,this.Bd);f.translate(-c,-d);if(this.Zo==k.jca)return-Math.atan2(f.y,f.x)*180/Math.PI;c=this.j.M7(this.Ge)*Math.PI/180;d=this.j.L7(this.Ge);var l=this.j.K7(this.Ge),p=this.j.N7(this.Ge),q=this.j.O7(this.Ge);f.rotate(-c);f.scale(1/d,1/l);f.translate(p,q);f.scale(this.uf,this.tf);f.translate(-this.fN,-this.gN);return Math.atan2(f.y,f.x)*180/Math.PI};b.tj="request yaw change";return b});
define("tdv/player/view/map/control/RenderingController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher","tdv/view/util/Animation"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/util/Animation"),k=m.extend(n,function(e){n.call(this);this.ha=!0;this.vfa=!1;this.j=e});k.prototype.clear=function(){this.ha=!1;this.j=null};k.prototype.requestFrame=function(){this.vfa||(this.vfa=!0,g.requestFrame(this.sq,this))};k.prototype.sq=
function(e){this.ha&&(this.vfa=!1,this.o(new h(k.IF,{frameTime:e})),this.o(new h(k.JF,{frameTime:e})),this.j.render())};k.IF="frameStart";k.JF="positionSet";return k});
define("tdv/player/view/map/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/map/control/CameraController tdv/player/view/map/control/DisplayController tdv/player/view/map/control/LoadController tdv/player/view/map/control/OverlaysController tdv/player/view/map/control/PanoramaRotationController tdv/player/view/map/control/RenderingController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),
g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/map/control/CameraController"),e=a("tdv/player/view/map/control/DisplayController"),b=a("tdv/player/view/map/control/LoadController"),c=a("tdv/player/view/map/control/OverlaysController"),d=a("tdv/player/view/map/control/PanoramaRotationController"),f=a("tdv/player/view/map/control/RenderingController"),l=m.extend(g,function(p,q){g.call(this);this.P=p;this.j=q;this.j.set("visible",!1);this.X3=null;this.dm=new f(this.j);this.Fe=new b(this.j);this.Ya=
new e(this.P,this.j);this.yb=new k(this.j);this.Ks=new c(this.j);this.rv=new d(this.j);this.P.bind(h.od,this.M3,this,!0);this.dm.bind(f.IF,this.fU,this,!0);this.dm.bind(f.JF,this.gU,this,!0);this.Fe.bind(b.j_,this.QT,this);this.Fe.bind(b.oba,this.OBa,this);this.Fe.bind(b.h_,this.PBa,this);this.Ya.bind(e.oc,this.bg,this,!0);this.Ya.bind(e.mba,this.MBa,this,!0);this.Ya.bind(e.i_,this.QBa,this,!0);this.Ya.bind(e.nba,this.NBa,this,!0);this.Ya.bind(e.wF,this.bz,this,!0);this.Ya.bind(e.xF,this.XC,this,
!0);this.Ya.bind(e.Zaa,this.ZAa,this,!0);this.yb.bind(k.oc,this.bg,this,!0);this.yb.bind(k.Cl,this.Bs,this);this.Ks.bind(c.oc,this.bg,this,!0);this.Ks.bind(c.hba,this.CBa,this,!0);this.rv.bind(d.tj,this.hU,this,!0);this.Uxa=!1});l.prototype.du=function(p){this.yb.du(p);this.Ya.du(p);this.rv.du(p)};l.prototype.clear=function(){this.Uxa=!0;this.Fe.clear();this.dm.clear();this.yb.clear();this.Ya.clear();this.Ks.clear();this.rv.clear();this.P.h(h.od,this.M3,this);this.Fe.h(b.j_,this.QT,this);this.Fe.h(b.oba,
this.OBa,this);this.Fe.h(b.h_,this.PBa,this);this.dm.h(f.IF,this.fU,this);this.dm.h(f.JF,this.gU,this);this.Ya.h(e.oc,this.bg,this);this.Ya.h(e.mba,this.MBa,this);this.Ya.h(e.i_,this.QBa,this);this.Ya.h(e.nba,this.NBa,this);this.Ya.h(e.wF,this.bz,this);this.Ya.h(e.xF,this.XC,this);this.Ya.h(e.Zaa,this.ZAa,this);this.yb.h(k.HUa,this.bg,this);this.yb.h(k.Cl,this.Bs,this);this.Ks.h(c.oc,this.bg,this);this.Ks.h(c.hba,this.CBa,this);this.rv.h(d.tj,this.hU,this);this.P=this.j=this.rv=this.Ks=this.Ya=this.yb=
this.dm=this.Fe=null};l.prototype.M3=function(){this.X3&&(this.nRa(this.X3),this.X3=null)};l.prototype.nRa=function(p){this.j.set("visible",!0);this.P.Py?this.Fe.yNa(p):(this.Fe.stop(),this.yb.stop(),this.Ya.oe(),this.X3=p)};l.prototype.bB=function(){this.Fe.stop();this.yb.stop();this.Ya.oe()};l.prototype.wl=function(p){this.yb.wl(p)};l.prototype.hB=function(p){this.Uxa||(this.yb.hB(p),this.Ks.hB(p),this.rv.hB(p))};l.prototype.tr=function(p,q,r,t){this.yb.tr(p,q,r,t);this.Ks.tr(p,q,r,t);this.rv.tr(p,
q,r,t)};l.prototype.PBa=function(p){var q=p.data.level;p=(p.data.percent+100*q.getIndex())/q.ZKa();this.o(new n(l.vx,{percent:p}))};l.prototype.OBa=function(p){this.j.set("visible",!0);p=p.data.level;this.yb.stop();this.Ya.WW(p)};l.prototype.QT=function(){this.o(new n(l.vF))};l.prototype.bg=function(){this.dm.requestFrame()};l.prototype.fU=function(p){this.yb.YA(p.data.frameTime)};l.prototype.gU=function(p){p=p.data.frameTime;this.Ya.ze(p);this.yb.ze(p);this.Ks.ze(p)};l.prototype.MBa=function(p){p=
p.data.level;this.Ks.WW(p);this.rv.WW(p)};l.prototype.QBa=function(p){p=p.data.level;this.Ks.Loa(p);this.rv.Loa(p)};l.prototype.NBa=function(p){p=p.data.level;p.PX()&&this.yb.start(p)};l.prototype.ZAa=function(){this.j.set("visible",!1)};l.prototype.CBa=function(p){p=p.data.inFOV;this.yb.ZY(p);this.rv.ZY(p)};l.prototype.XC=function(p){this.o(new n(l.xF,{map:p.data.map}))};l.prototype.bz=function(p){this.o(new n(l.wF,{map:p.data.map}))};l.prototype.Bs=function(p){this.o(new n(l.Cl,p.data))};l.prototype.hU=
function(p){this.o(new n(l.tj,{yawDelta:p.data.yawDelta}))};l.Cl="movementChange";l.vF="loadingEnd";l.vx="loadingProgress";l.xF="mapShow";l.wF="mapHide";l.tj="requestYawChange";return l});define("tdv/player/view/image/RepositoryEntry",["require","tdv/constants/Priority"],function(a){function m(){this.status=m.s_;this.progress=this.Gk=0;this.yqa=[]}a("tdv/constants/Priority");m.LOADING="loading";m.ia="loaded";m.s_="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.Wxa={};this.ni=[];this.SC=[];this.Sd={}}function h(b,c){c=b.indexOf(c);c>=0&&b.splice(c,1)}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/view/images/ImageLoader"),e=a("tdv/player/view/image/RepositoryEntry");m.prototype.fsa=function(b){b=b.eE();for(var c=0,d=b.length;c<d;c++)if(this.iS(b[c]).status!=
e.ia)return!1;return!0};m.prototype.FA=function(b,c){this.ni.push(b);this.gXa(b,c)};m.prototype.ho=function(b,c){var d=this.ni.indexOf(b);d<0&&n.log("Unloading item not loaded");this.ni.splice(d,1);this.U6a(b,c)};m.prototype.xg=function(b,c){return this.Sd[b].xg(c)};m.prototype.gXa=function(b,c){this.SC.push(b);b=b.eE();for(var d=0,f=b.length;d<f;d++){var l=b[d],p=this.iS(l);p.Gk++;p.yqa.push(c);p.status==e.s_&&(p.status=e.LOADING,this.h4a(l,Math.min.apply(Math,p.yqa)))}this.VGa()};m.prototype.U6a=
function(b,c){this.SC=this.SC.filter(r=>r!==b);for(var d=b.eE(),f=0,l=d.length;f<l;f++){var p=d[f],q=this.iS(p);q.Gk--;h(q.yqa,c);q.Gk==0&&q.status!=e.s_&&(q.status=e.s_,q.progress=0,this.$$a(p))}};m.prototype.VGa=function(b){b=(b==void 0?this.SC:this.Tya(b)).slice();for(var c=0;c<b.length;c++){for(var d=b[c],f=d.eE(),l=0,p=0,q=f.length,r=0;r<f.length;r++){var t=this.iS(f[r]);l+=t.progress;t.status==e.ia&&p++}d.Wkb(l/q);p==q&&(d.cZ(),this.SC=this.SC.filter(u=>u!==d))}};m.prototype.iS=function(b){var c=
this.Wxa[b];c||(this.Wxa[b]=c=new e);return c};m.prototype.Tya=function(b){for(var c=[],d=0;d<this.SC.length;d++){var f=this.SC[d];f.eE().includes(b)&&c.push(f)}return c};m.prototype.h4a=function(b,c){c=new k(c);this.Sd[b]=c;c.bind(g.ia,this.RT,this,!0);c.bind(g.$c,this.ST,this,!0);c.load(b)};m.prototype.$$a=function(b){var c=this.Sd[b];delete this.Sd[b];c.h(g.ia,this.RT,this);c.h(g.$c,this.ST,this);c.cancel()};m.prototype.RT=function(b){b=b.source.rl();var c=this.iS(b);c.progress=100;c.status=e.ia;
this.VGa(b)};m.prototype.ST=function(b){b=b.source.rl();for(var c=this.Tya(b),d=0;d<c.length;d++){var f=c[d];this.ho(f);f.ukb()}n.log("Error loading: "+b)};return m.instance=new m});
define("tdv/player/view/map/renderer/renderers/ItemRenderer",["require","tdv/player/view/util/Device"],function(a){function m(h,n){this.Ja=h;this.Ia=n;this.rha=0;this.Ev=this.Dv=.5;this.jl=0;this.Of=1;this.bt=this.Uy=this.Ha=this.Pa=0;this.ne=1;this.P1=this.R1=!0;this.ja=document.createElement("canvas");this.ga=this.ja.getContext("2d")}a=a("tdv/player/view/util/Device");m.prototype.getItem=function(){return this.Ja};m.prototype.aX=function(h){return this.Ja==h?this:null};m.prototype.r7=function(h){return this.Ja==
h?[this]:[]};m.prototype.yi=function(){this.Ia&&this.Ia.ena(this)};m.prototype.nf=function(h){this.H8a(h)};m.prototype.TEa=function(h){this.rha!=h&&(this.rha=h,this.Ia&&this.Ia.r8())};m.prototype.H8a=function(h){this.Of!=h&&(this.Of=h,this.q8())};m.prototype.c5=function(h){this.jl!=h&&(this.jl=h,this.q8())};m.prototype.jV=function(h,n){if(this.Pa!=h||this.Ha!=n)this.Pa=h,this.Ha=n,this.n8()};m.prototype.vn=function(h,n){if(this.Uy!=h||this.bt!=n)this.Uy=h,this.bt=n,this.q8()};m.prototype.q8=function(){this.Ia&&
this.Ia.o8()};m.prototype.Tf=function(){this.R1=!0};m.prototype.jb=function(){this.R1&&(this.R1=!1,this.Sh())};m.prototype.Sh=function(){};m.prototype.n8=function(){this.P1=!0;this.q8()};m.prototype.Lp=function(){if(this.P1){this.P1=!1;if(this.ja.width!=this.Pa||this.ja.height!=this.Ha)this.ja.width=Math.round(this.Pa),this.ja.height=Math.round(this.Ha);this.ga.clearRect(0,0,this.ja.width,this.ja.height);this.gh()}};m.prototype.gh=function(){};m.prototype.reb=function(h){if(this.Of>0&&this.Pa>=1&&
this.Ha>=1){h.save();var n=Math.round(this.Uy),g=Math.round(this.bt),k=Math.round(this.Pa*this.Dv),e=Math.round(this.Ha*this.Ev);h.scale(this.ne,this.ne);h.translate(n+k,g+e);h.rotate(this.jl*Math.PI/180);h.globalAlpha=this.Of;h.drawImage(this.ja,-k,-e);h.restore()}};m.prototype.z7=function(){this.ja.width=this.ja.height=1;this.R1=this.P1=!0};m.Dta=Math.min(window.devicePixelRatio||1,a.Nd()==a.uB?2:Infinity);m.tl=m.Dta;m.dVa=a.Nd()==a.vj?16E6:256E6;return m});
define("tdv/player/view/map/renderer/renderers/ItemContainerRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/ItemRenderer"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/renderers/ItemRenderer");a=m.extend(h,function(n,g){h.call(this,n,g);this.rf=[];this.t6=null;this.Jma=!0});a.prototype.XHa=function(n){n=this.aea(n);if(!n)throw"Container renderer can't create child renderer for an item";this.rf.push(n);this.r8();this.o8()};a.prototype.aea=function(){};
a.prototype.gQa=function(n){var g=this.iw(n);g&&(this.rf=this.rf.filter(k=>k!==g),this.r8(),this.o8())};a.prototype.aX=function(n){for(var g=h.prototype.aX.call(this,n),k=0;k<this.rf.length&&!g;k++)g=this.rf[k].aX(n);return g};a.prototype.r7=function(n){for(var g=h.prototype.r7.call(this,n),k=0;k<this.rf.length;k++)g=g.concat(this.rf[k].r7(n));return g};a.prototype.iw=function(n){for(var g=null,k=0;k<this.rf.length&&!g;k++)this.rf[k].getItem()==n&&(g=this.rf[k]);for(k=0;k<this.rf.length&&!g;k++)this.rf[k].getItem().Dgb(n)&&
(g=this.rf[k]);return g};a.prototype.ena=function(n){this.rf=this.rf.filter(g=>g!==n);this.rf.push(n);this.r8();this.o8()};a.prototype.r8=function(){this.Jma=!0;this.Tf()};a.prototype.o8=function(){this.n8()};a.prototype.jb=function(){h.prototype.jb.call(this);for(var n=0;n<this.rf.length;n++)this.rf[n].jb()};a.prototype.Sh=function(){if(this.Jma){this.Jma=!1;for(var n=[],g=0;g<this.rf.length;g++){var k=this.rf[g];n.push({l:k.rha,z:g,r:k})}n.sort(function(e,b){return e.l==b.l?e.z-b.z:e.l-b.l});this.t6=
[];for(g=0;g<n.length;g++)this.t6.push(n[g].r);this.n8()}h.prototype.Sh.call(this)};a.prototype.Lp=function(){for(var n=0;n<this.rf.length;n++)this.rf[n].Lp();h.prototype.Lp.call(this)};a.prototype.gh=function(){for(var n=0;n<this.t6.length;n++)this.t6[n].reb(this.ga);h.prototype.gh.call(this)};a.prototype.z7=function(){for(var n=0;n<this.rf.length;n++)this.rf[n].z7();h.prototype.z7.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/OverlayRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/ItemRenderer"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/renderers/ItemRenderer");a=m.extend(h,function(n,g){h.call(this,n,g)});a.prototype.u$=function(){};return a});
define("tdv/player/view/map/renderer/renderers/FovOverlayRenderer",["require","tdv/utils","tdv/player/view/map/renderer/renderers/OverlayRenderer","tdv/player/view/util/Device"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/renderers/OverlayRenderer"),n=a("tdv/player/view/util/Device");a=m.extend(h,function(g,k){h.call(this,g,k);this.W3=this.Ia.getItem().fg();this.V3=this.Ia.getItem().wg();this.ne=2;this.L0=0;this.kb=Math.PI*.5;this.Mga=this.Nga=!0;this.an=1;this.Q1=!0;this.TEa(1)});
a.prototype.u$=function(g,k){this.an!=k&&(this.an=k,this.Q1=!0,this.Tf())};a.prototype.aRa=function(g,k){this.kb!=k&&(this.kb=k,this.Nga=!0,this.Tf());this.L0!=g&&(this.L0=g,this.Mga=!0,this.Tf())};a.prototype.Sh=function(){this.Nga&&(this.Nga=!1,this.n8());if(this.Q1||this.Mga){this.Mga=this.Q1=!1;this.ne=Math.max(1,Math.ceil(Math.sqrt(this.W3*this.W3+this.V3*this.V3))/(n.Nd()==n.vj?1024:4096));var g=this.an/this.ne,k=this.Ja.getX()*g,e=this.Ja.getY()*g,b=Math.max(k,g*this.W3-k);g=Math.max(e,g*this.V3-
e);b=Math.ceil(Math.sqrt(b*b+g*g))*2;var c=this.L0*Math.PI/180;g=Math.cos(c);c=Math.sin(c);k=k-this.Dv*b-(.5-this.Dv)*b*g+(.5-this.Ev)*b*c;e=e-this.Ev*b-(.5-this.Ev)*b*g-(.5-this.Dv)*b*c;this.Q1=!1;this.vn(k,e);this.jV(b,b);this.c5(this.L0)}h.prototype.Sh.call(this)};a.prototype.gh=function(){var g=this.Ja.n3a,k=this.Ja.a6a;if(k>0||g>0){var e=this.an*this.W3,b=this.an*this.V3;e=Math.ceil(Math.sqrt(e*e+b*b))*this.Ja.xA()/this.ne;b=Math.round(this.Pa*.5);var c=Math.round(this.Ha*.5),d=this.kb*Math.PI/
180,f=-d*.5;d=f+d;k>0&&(this.ga.fillStyle=this.Ja.$5a,this.ga.globalAlpha=k,this.ga.rect(0,0,this.Pa,this.Ha),this.ga.fill(),this.ga.globalCompositeOperation="destination-out",this.ga.fillStyle="#FFFFFF",this.ga.globalAlpha=1,this.ga.beginPath(),this.ga.moveTo(b,c),this.ga.arc(b,c,e,f,d,!1),this.ga.lineTo(b,c),this.ga.closePath(),this.ga.fill(),this.ga.globalCompositeOperation="source-over");g>0&&(this.ga.fillStyle=this.Ja.m3a,this.ga.globalAlpha=g,this.ga.beginPath(),this.ga.moveTo(b,c),this.ga.arc(b,
c,e,f,d,!1),this.ga.lineTo(b,c),this.ga.closePath(),this.ga.fill())}h.prototype.gh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/ImageOverlayRenderer","require tdv/utils tdv/player/view/map/renderer/renderers/ItemRenderer tdv/player/view/map/renderer/renderers/OverlayRenderer tdv/player/view/image/Repository tdv/view/images/ScalableImage".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/renderers/ItemRenderer"),n=a("tdv/player/view/map/renderer/renderers/OverlayRenderer"),g=a("tdv/player/view/image/Repository"),k=a("tdv/view/images/ScalableImage");
a=m.extend(n,function(e,b){n.call(this,e,b);this.TEa(this.Ja.rEa?0:2);this.Id=g.xg(this.Ja.rl());this.N4=new k(this.Id,this.Id.width,this.Id.height);this.N4.dQ(this.Ja.ti);this.N4.hQ(this.Ja.jP());this.N4.bQ(this.Ja.hP());this.dT=0;this.an=1;this.Bha=!0});a.prototype.u$=function(e,b){if(this.dT!=e||this.an!=b)this.dT=e,this.an=b,this.Bha=!0,this.Tf()};a.prototype.Sh=function(){if(this.Bha){this.Bha=!1;var e=this.Ja.getX(),b=this.Ja.getY(),c=this.Ja.fg(),d=this.Ja.wg(),f=this.Ja.zLa(),l=this.Ja.ALa();
if(this.Ja.rEa)this.c5(0),this.vn((e-f)*this.an,(b-l)*this.an),this.jV(c*this.an,d*this.an);else{c*=h.tl;d*=h.tl;f*=h.tl;l*=h.tl;var p=Math.cos(-this.dT*Math.PI/180),q=Math.sin(-this.dT*Math.PI/180);e=e*this.an-this.Dv*c-(f-this.Dv*c)*p+(l-this.Ev*d)*q;b=b*this.an-this.Ev*d-(l-this.Ev*d)*p-(f-this.Dv*c)*q;this.c5(-this.dT);this.vn(e,b);this.jV(c,d)}}n.prototype.Sh.call(this)};a.prototype.gh=function(){this.N4.TO(this.ga,this.ja.width,this.ja.height);n.prototype.gh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/MapRenderer","require tdv/utils tdv/view/constants/ScaleMode tdv/player/view/image/Repository tdv/player/view/map/renderer/item/Item tdv/player/view/map/renderer/item/Overlay tdv/player/view/map/renderer/renderers/FovOverlayRenderer tdv/player/view/map/renderer/renderers/ImageOverlayRenderer tdv/player/view/map/renderer/renderers/ItemContainerRenderer".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/view/constants/ScaleMode"),n=a("tdv/player/view/image/Repository"),
g=a("tdv/player/view/map/renderer/item/Item"),k=a("tdv/player/view/map/renderer/item/Overlay"),e=a("tdv/player/view/map/renderer/renderers/FovOverlayRenderer"),b=a("tdv/player/view/map/renderer/renderers/ImageOverlayRenderer"),c=a("tdv/player/view/map/renderer/renderers/ItemContainerRenderer");a=m.extend(c,function(d,f){c.call(this,d,f,d.xq);this.ji=this.Ja.fg();this.fk=this.Ja.wg();this.ti=this.Ja.ti;this.N0a=this.Ja.M0a;this.Ng=this.Og=100;this.Tda=!0;this.fc=this.ec=.5;this.Ed=0;this.kc=1;this.n4=
!0;this.Mj=1;this.Id=n.xg(this.Ja.rl())});a.prototype.aea=function(d){if(d.getType()!=g.Lua)throw"Invalid item type";switch(d.c6a){case k.Iua:d=new e(d,this);break;case k.Jua:d=new b(d,this);break;default:d=null}d&&d.u$(this.Ed,this.Mj*this.kc);return d};a.prototype.getX=function(){return this.ec};a.prototype.getY=function(){return this.fc};a.prototype.fP=function(){return this.Ed};a.prototype.yA=function(){return this.kc};a.prototype.nb=function(){return Math.round(this.ji*this.kc*this.Mj)};a.prototype.Mb=
function(){return Math.round(this.fk*this.kc*this.Mj)};a.prototype.j$=function(d,f){if(this.Og!=d||this.Ng!=f)this.Og=d,this.Ng=f,this.Tda=!0,this.Tf()};a.prototype.setPosition=function(d,f,l,p){if(this.ec!=d||this.fc!=f||this.Ed!=l||this.kc!=p)this.ec=d,this.fc=f,this.Ed=l,this.kc=p,this.n4=!0,this.Tf()};a.prototype.Sh=function(){if(this.Tda){this.Tda=!1;switch(this.ti){case h.NONE:this.Mj=1;break;case h.Tp:this.Mj=this.Og/this.ji;break;case h.Pk:this.Mj=this.Ng/this.fk;break;case h.Jr:this.Mj=this.ji*
this.Ng>this.fk*this.Og?this.Ng/this.fk:this.Og/this.ji;break;default:this.Mj=this.ji*this.Ng>this.fk*this.Og?this.Og/this.ji:this.Ng/this.fk}this.n4=!0}if(this.n4){this.n4=!1;var d=this.nb(),f=this.Mb(),l=Math.cos(this.Ed*Math.PI/180),p=Math.sin(this.Ed*Math.PI/180);this.vn(this.Og*.5-this.Dv*d+(this.Dv-this.ec)*l*d-(this.Ev-this.fc)*p*f,this.Ng*.5-this.Ev*f+(this.Ev-this.fc)*l*f+(this.Dv-this.ec)*p*d);this.c5(this.Ed);this.jV(d,f);for(d=0;d<this.rf.length;d++)this.rf[d].u$(this.Ed,this.Mj*this.kc)}c.prototype.Sh.call(this)};
a.prototype.gh=function(){var d=Math.round(this.Pa),f=Math.round(this.Ha);this.N0a?(this.ga.save(),this.ga.translate(d,0),this.ga.scale(-1,1),this.ga.drawImage(this.Id,0,0,d,f),this.ga.restore()):this.ga.drawImage(this.Id,0,0,d,f);c.prototype.gh.call(this)};return a});
define("tdv/player/view/map/renderer/renderers/MapsRenderer",["require","tdv/utils","tdv/player/view/map/renderer/item/Item","tdv/player/view/map/renderer/renderers/ItemContainerRenderer","tdv/player/view/map/renderer/renderers/MapRenderer"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/map/renderer/item/Item"),n=a("tdv/player/view/map/renderer/renderers/ItemContainerRenderer"),g=a("tdv/player/view/map/renderer/renderers/MapRenderer");a=m.extend(n,function(){n.call(this,null,null);this.Gda=
!0});a.prototype.cc=function(){return this.ja};a.prototype.render=function(){this.jb();this.Lp()};a.prototype.Cfb=function(){for(var k=1,e=0;e<this.rf.length;e++){var b=this.rf[e];b=b.nb()*b.Mb();k<b&&(k=b)}return k};a.prototype.aea=function(k){if(k.getType()!=h.Kua)throw"Invalid item type";k=new g(k,this);k.j$(this.Pa,this.Ha);k.setPosition(.5,.5,0,1);return k};a.prototype.setSize=function(k,e){this.jV(k,e);this.Gda=!0;this.Tf()};a.prototype.Sh=function(){if(this.Gda){this.Gda=!1;for(var k=0;k<this.rf.length;k++)this.rf[k].j$(this.Pa,
this.Ha)}n.prototype.Sh.call(this)};return a});
define("tdv/player/view/map/renderer/Renderer","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/player/view/image/Repository tdv/player/view/map/renderer/renderers/ItemRenderer tdv/player/view/map/renderer/renderers/MapsRenderer tdv/player/view/util/XR tdv/view/constants/Cursor tdv/view/core/UIComponent".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/image/Repository"),k=a("tdv/player/view/map/renderer/renderers/ItemRenderer"),
e=a("tdv/player/view/map/renderer/renderers/MapsRenderer"),b=a("tdv/player/view/util/XR"),c=a("tdv/view/constants/Cursor"),d=a("tdv/view/core/UIComponent");a=m.extend(d,function(){d.call(this);this.gf("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",c.LB);this.xC=[];this.BI=[];this.jc="";this.oi=new e;this.bind(h.$b,this.kd,this,!0);this.bind(h.od,this.cp,this,!0);this.bind(h.jd,this.ap,this,!0);b.M.bind(h.V,this.ama,this,!0);this.Tja=this.Sja=!1});a.prototype.Kb=function(){d.prototype.Kb.call(this);
var f=this.oi.cc();f.parentElement||this.wa().tk(f)};a.prototype.FA=function(f){g.FA(f,n.Hm)};a.prototype.fsa=function(f){return g.fsa(f)};a.prototype.ho=function(f){g.ho(f,n.Hm)};a.prototype.Qbb=function(f){this.oi.XHa(f)};a.prototype.removeItem=function(f){this.oi.gQa(f)};a.prototype.v6=function(f,l){this.oi.iw(f).XHa(l);this.Yla()};a.prototype.ujb=function(f,l){(f=this.oi.iw(f))&&f.gQa(l)};a.prototype.scb=function(f){this.oi.aX(f).yi()};a.prototype.eB=function(f,l){this.oi.r7(f).forEach(function(p){p.nf(l)})};
a.prototype.mra=function(f,l,p,q,r){this.oi.iw(f).setPosition(l,p,q,r);this.Yla()};a.prototype.Yla=function(){var f=this.oi.Cfb();f&&(k.tl=Math.min(k.Dta,k.tl*Math.sqrt(k.dVa/f)),this.WGa())};a.prototype.Okb=function(f,l,p){this.oi.aX(f).aRa(l,p)};a.prototype.N7=function(f){return this.oi.iw(f).getX()};a.prototype.O7=function(f){return this.oi.iw(f).getY()};a.prototype.M7=function(f){return this.oi.iw(f).fP()};a.prototype.ufb=function(f){return this.oi.iw(f).yA()};a.prototype.L7=function(f){return this.oi.iw(f).nb()/
k.tl};a.prototype.K7=function(f){return this.oi.iw(f).Mb()/k.tl};a.prototype.render=function(){this.Tja&&this.oi.render()};a.prototype.W9=function(f){this.xC.push(f);this.ZV()};a.prototype.TP=function(f){f=this.xC.lastIndexOf(f);f>=0&&this.xC.splice(f,1);this.ZV()};a.prototype.ZV=function(){var f=this.xC.length>0?this.xC[this.xC.length-1]:c.De;this.getParent().set("cursor",f)};a.prototype.q0=function(){this.xC.length>0&&(this.getParent().set("cursor",c.De),this.xC=[])};a.prototype.njb=function(f){this.BI.push(f);
this.fW()};a.prototype.gjb=function(f){f=this.BI.lastIndexOf(f);f>=0&&this.BI.splice(f,1);this.fW()};a.prototype.fW=function(){var f=this.BI.length==0?"":this.BI[this.BI.length-1]||"";this.jc!=f&&(this.jc=f,this.getParent().set("toolTip",this.jc))};a.prototype.tZa=function(){this.jc&&this.getParent().set("toolTip","");this.jc="";this.BI=[]};a.prototype.np=function(){this.tZa();this.q0();d.prototype.np.call(this)};a.prototype.kd=function(){this.WGa();this.Yla()};a.prototype.WGa=function(){var f=this.oi.cc();
f.style.transform=k.tl!=1?"scale("+(1/k.tl).toFixed(3)+")":"none";f.style.transformOrigin="0% 0%";this.oi.setSize(this.nb()*k.tl,this.Mb()*k.tl);this.render()};a.prototype.cp=function(){this.Sja=!0;this.ama()};a.prototype.ap=function(){this.Sja=!1;this.ama()};a.prototype.ama=function(){var f=this.Sja&&!b.isPresenting;this.Tja!=f&&((this.Tja=f)?(this.kd(),this.render()):this.oi.z7())};return a});
define("tdv/player/script/MapPlayer","require tdv/utils tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/MediaPlayer tdv/player/view/map/control/Controller tdv/player/view/map/control/constants/Movement tdv/player/view/map/renderer/Renderer tdv/constants/EventName tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),
k=a("tdv/player/script/MediaPlayer"),e=a("tdv/player/view/map/control/Controller"),b=a("tdv/player/view/map/control/constants/Movement"),c=a("tdv/player/view/map/renderer/Renderer"),d=a("tdv/constants/EventName"),f=a("tdv/view/constants/ButtonMode"),l=a("tdv/view/constants/State"),p=n.define("MapPlayer",k,function(){k.call(this,"map");this.X2=this.Aha=this.ij=!1;this.hp=this.rd=this.U=this.j=null;this.hC={};for(var q in p.Ox)this.hC[q]=this.SZa(q);this.be=m.mr(this.Sh,this)});p.prototype.stop=function(){this.md(b.Fg)};
p.prototype.rotateClockwise=function(){this.md(b.dca)};p.prototype.rotateCounterClockwise=function(){this.md(b.eca)};p.prototype.zoomIn=function(){this.md(b.Mx)};p.prototype.zoomOut=function(){this.md(b.Nx)};p.prototype.set=function(q,r){if(this.get(q)!=r){switch(q){case "map":this.Aha=!0;this.be();break;case "viewerArea":this.ij=!0;this.be();break;case "panoramaMapLocation":this.Tia=!0;this.be();break;case "movementMode":this.X2=!0,this.be()}k.prototype.set.call(this,q,r)}};p.prototype.SZa=function(q){var r=
p.Ox[q];q=new g(this,q,f.af);q.bind(d.Sa,function(){this.md(r.movement)},this);r.stopOnRelease&&q.bind(d.$a,function(){this.md(b.Fg)},this);return q};p.prototype.Wbb=function(q){this.hp=null;this.set("map",q.get("map"));this.set("panoramaMapLocation",q)};p.prototype.Bjb=function(q){this.get("panoramaMapLocation")==q&&(this.set("panoramaMapLocation",null),this.hp=null)};p.prototype.tr=function(q,r,t,u){this.U&&this.U.tr(q,r,t,u);this.hp={yaw:r,pitch:t,hfov:u}};p.prototype.Sh=function(){this.ij&&(this.ij=
!1,this.ny(),this.get("viewerArea")&&this.my(),this.lV(this.get("viewerArea")));if(this.U){if(this.Aha){this.Aha=!1;var q=this.get("map");q?(this.fK(),this.U.nRa(q)):this.U.bB();this.Tia=this.X2=!0}this.Tia&&(this.Tia=!1,q=this.get("panoramaMapLocation"),this.U.hB(q),q&&this.hp&&this.U.tr(q,this.hp.yaw,this.hp.pitch,this.hp.hfov));this.X2&&(this.X2=!1,this.U.du(this.get("movementMode")))}};p.prototype.SN=function(){this.set("map",null)};p.prototype.my=function(){var q=this.get("viewerArea");this.j=
new c;this.j.xa({left:0,top:0,bottom:0,right:0});q.mb(this.j);this.U=new e(q,this.j);this.U.bind(e.Cl,this.Bs,this);this.U.bind(e.vx,this.Gj,this);this.U.bind(e.vF,this.YM,this);this.U.bind(e.xF,this.XC,this);this.U.bind(e.wF,this.bz,this);this.U.bind(e.tj,this.hU,this,!0)};p.prototype.ny=function(){this.j&&(this.U.h(e.Cl,this.Bs,this),this.U.h(e.vx,this.Gj,this),this.U.h(e.vF,this.YM,this),this.U.h(e.xF,this.XC,this),this.U.h(e.wF,this.bz,this),this.U.h(e.tj,this.hU,this),this.U.clear(),this.j.getParent().removeChild(this.j),
this.j=null)};p.prototype.XC=function(q){this.kT(q.data.map)};p.prototype.bz=function(q){this.jT(q.data.map)};p.prototype.Bs=function(q){for(var r in p.Ox)this.hC[r].set("state",q.data[p.Ox[r].pressedOn]?l.Fb:l.De);this.o(new h(d.Mta,q.data))};p.prototype.hU=function(q){this.o(new h(p.tj,{yawDelta:q.data.yawDelta}))};p.prototype.Gj=function(q){this.j.getParent().xa({progressPercent:q.data.percent,progressVisible:!0})};p.prototype.YM=function(){this.j.getParent().set("progressVisible",!1)};p.prototype.md=
function(q){this.U&&this.U.wl(q)};p.Ox={buttonRotateClockwise:{movement:b.dca,pressedOn:"rotatingClockwise",stopOnRelease:!0},buttonRotateCounterClockwise:{movement:b.eca,pressedOn:"rotatingCounterClockwise",stopOnRelease:!0},buttonZoomIn:{movement:b.Mx,pressedOn:"zoomingIn",stopOnRelease:!0},buttonZoomOut:{movement:b.Nx,pressedOn:"zoomingOut",stopOnRelease:!0}};p.tj="requestYawChange";return p});
define("tdv/player/script/PlayListItem","require exports tdv/player/parser/ClassInfo tdv/constants/EventName tdv/events/Event tdv/binding/Bindable".split(" "),function(a,m,h,n,g,k){a=function(e){function b(){var c=e.call(this)||this;c.I="stopped";return c}P(b,e);b.prototype.get=function(c,d){d===void 0&&(d=void 0);return c=="state"?this.I:k.prototype.get.call(this,c,d)};b.prototype.start=function(){this.cnb()};b.prototype.cnb=function(){if(this.I=="stopped"||this.I=="stopping")this.I="startin",this.o(new g(n.Up))};
b.prototype.PD=function(){this.USa()};b.prototype.USa=function(){if(this.I=="startin"||this.I=="stopping")this.I="playing",this.o(new g(n.Cr))};b.prototype.stop=function(){this.rQ()};b.prototype.rQ=function(){if(this.I=="playing"||this.I=="startin")this.I="stopping",this.o(new g(n.Fg))};b.prototype.end=function(){this.VSa()};b.prototype.VSa=function(){if(this.I=="stopping"||this.I=="startin")this.I="stopped",this.o(new g(n.Tb))};return b}(k);h.create("PlayListItem",a);return a});
define("tdv/player/script/MapPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("MapPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.XC,this),g.set("map",this.get("media")))};a.prototype.stop=function(){var g=
this.get("player");g&&g.get("map")==this.get("media")&&g.set("map",null);n.prototype.stop.call(this)};a.prototype.XC=function(){this.get("player").h(h.di,this.XC,this);this.get("player").bind(h.oo,this.bz,this);this.PD();this.get("player").get("map")!=this.get("media")&&this.bz()};a.prototype.bz=function(){this.get("player").h(h.oo,this.bz,this);this.stop();this.end()};return a});
define("tdv/player/script/MeasureModel3DObject",["require","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/ExternalModel3DObject"],function(a){var m=a("tdv/constants/EventName"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/ExternalModel3DObject"),g=h.define("MeasureModel3DObject",n,function(){n.call(this);this.bind(m.L("mode"),function(){this.o(g.BUa)},this,!0);this.bind(m.L("distance"),function(){this.o(g.xUa)},this,!0)});g.BUa="modeChange";g.xUa="distanceChange";
return g});define("tdv/player/script/MeasureModel3DObjectPoint",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MeasureModel3DObjectPoint",m,function(){m.call(this)})});
define("tdv/player/script/OrbitModel3DCamera",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCamera"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCamera");return m.define("OrbitModel3DCamera",h,function(){h.call(this)})});
define("tdv/player/view/util/LoadingGroup",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,m,h,n){var g=function(){return function(k){this.qJa=k;this.percent=0;this.finished=!1}}();return function(k){function e(b){var c=k.call(this)||this;c.To=new Map;c.eM=b||c;return c}P(e,k);e.prototype.vkb=function(b){if(this.eM=b)this.hh(),this.X5()};e.prototype.update=function(){this.hh();this.X5()};e.prototype.hJa=function(){this.To.forEach(function(b,c){this.x4(c)}.bind(this));
this.To=new Map};e.prototype.oj=function(){var b=0;this.To.forEach(function(c){c.finished&&b++});return b==this.To.size};e.prototype.dispose=function(){this.hJa();this.To.clear();this.eM=void 0};e.prototype.sO=function(b,c){c===void 0&&(c=1);if(this.To.has(b))return b;this.To.set(b,new g(c));this.iXa(b);return b};e.prototype.XP=function(b){this.To.has(b)&&(this.To["delete"](b),this.x4(b))};e.prototype.gw=function(b){b===void 0&&(b=1);var c=new n;return this.sO(c,b)};e.prototype.Pe=function(b){b=b.source;
var c=this.To.get(b);c&&(this.x4(b),c.percent=100,c.finished=!0,this.hh(),this.X5())};e.prototype.Gj=function(b){this.To.get(b.source).percent=b.data.percent;this.hh()};e.prototype.yh=function(b){b=b.source;this.x4(b);b=this.To.get(b);b.finished=!0;b.percent=100;this.eM.o(h.$c);this.hh();this.X5()};e.prototype.hh=function(){var b=0,c=0;this.To.forEach(function(d){c+=d.qJa;b+=d.percent*d.qJa});this.eM.o(h.yc,{percent:c?b/c:100})};e.prototype.X5=function(){this.oj()&&this.eM.o(h.ia)};e.prototype.iXa=
function(b){b.bind(h.ia,this.Pe,this,!0);b.bind(h.yc,this.Gj,this,!0);b.bind(h.$c,this.yh,this,!0)};e.prototype.x4=function(b){b.h(h.ia,this.Pe,this);b.h(h.yc,this.Gj,this);b.h(h.$c,this.yh,this)};return e}(n)});
define("tdv/player/script/Model3D","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/Media tdv/player/script/OrbitModel3DCamera tdv/player/view/util/LoadingGroup".split(" "),function(a){function m(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function h(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function n(r,t){if(Array.isArray(t))return r.toArray(t);t.x=r.x;t.y=r.y;t.z=r.z;return t}var g=a("tdv/constants/EventName"),
k=a("tdv/constants/PlaybackState"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/script/Media"),c=a("tdv/player/script/OrbitModel3DCamera"),d=a("tdv/player/view/util/LoadingGroup");a=e.define("Model3D",b,function(){b.call(this);this.set("camera",new c);this.set("geometryQuery",void 0);this.set("objectQuery",void 0);this.set("metadataQuery",void 0);this.set("preload",!0)});a.prototype.Pqa=function(){this.Lj&&(this.Lj.h(g.ia,this.bN,this),this.Lj.dispose());this.Lj=new d;this.Lj.bind(g.ia,this.bN,
this,!0);this.sf&&this.sf.dispose();this.sf=new d(this)};a.prototype.bN=function(){this.o(g.WF)};a.prototype.P7=function(){this.sf||this.Pqa();return this.sf};a.prototype.T7=function(){this.Lj||this.Pqa();return this.Lj};a.prototype.pause=function(){this.get("state")==k.PLAYING&&this.set("state",k.Zb)};a.prototype.play=function(){this.set("state",k.PLAYING)};a.prototype.stop=function(){this.set("state",k.ca)};a.prototype.worldPositionToLocal=function(r,t){h(f,r);m(p,t);p.invert();f.applyMatrix4(p);
return n(f,r)};a.prototype.getMatrixWorld=function(r){var t=this.get("objectQuery");return t&&t.tLa(r)};a.prototype.worldDirectionToLocal=function(r,t){h(f,r);m(q,t);p.extractRotation(q);p.invert();f.applyMatrix4(p);return n(f,r)};a.prototype.testIntersection=function(r,t){var u=this.get("geometryQuery");if(u)return h(f,r),h(l,t),u.AK(f,l)};a.prototype.getDistanceToFloor=function(r){var t=this.get("geometryQuery");if(t)return h(f,r),t.ffb(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.oqa(r,t)};a.prototype.getScreenPosition=function(r,t){var u=this.get("projectionQuery");if(u)return u.Goa(h(f,r),t)};var f=new THREE.Vector3,l=new THREE.Vector3,p=new THREE.Matrix4,q=new THREE.Matrix4;a.prototype.rw=function(){return[]};return a});
define("tdv/player/script/Model3DAnimation",["require","tdv/binding/Bindable","tdv/constants/PlaybackState","tdv/constants/EventName","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/PlaybackState"),n=a("tdv/constants/EventName");a=a("tdv/player/parser/ClassInfo").define("Model3DAnimation",m,function(){m.call(this);this.bind(n.L("state"),function(){this.o(n.Pd)},this,!0)});a.prototype.pause=function(){this.get("state")==h.PLAYING&&this.set("state",h.Zb)};
a.prototype.play=function(){this.set("currentDirection","forward");this.set("state",h.PLAYING)};a.prototype.reverse=function(){this.set("currentDirection","backward");this.set("state",h.PLAYING)};a.prototype.stop=function(){this.set("currentTime",0);this.set("state",h.ca)};return a});
define("tdv/player/script/Model3DCameraSequence",["require","tdv/binding/Bindable","tdv/constants/PlaybackState","tdv/player/parser/ClassInfo","tdv/constants/EventName"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/constants/EventName");a=n.define("Model3DCameraSequence",m,function(){m.call(this);this.set("state",h.ca);this.bind(g.L("state"),function(){this.o(g.Pd)},this,!0)});a.prototype.play=a.prototype.play=function(){this.set("state",
h.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.get("state")==h.PLAYING&&this.set("state",h.Zb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",h.ca)};return a});define("tdv/player/script/Model3DDisplayEffect",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DDisplayEffect",m,function(){m.call(this)})});
define("tdv/player/script/PlaybackMediaPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/script/helper/ButtonProperty tdv/player/script/MediaPlayer tdv/constants/PlaybackState tdv/view/constants/ButtonMode tdv/view/constants/State".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/script/helper/ButtonProperty"),k=a("tdv/player/script/MediaPlayer"),e=a("tdv/constants/PlaybackState"),b=a("tdv/view/constants/ButtonMode"),
c=a("tdv/view/constants/State");a=m.extend(k,function(){k.call(this,!0);this.vv=!1;this.QN=!0;this.I=e.ca;this.wG=new g(this,"buttonPlayPause",b.ak);this.wG.bind(h.Rk,this.s5a,this,!0);this.wG.bind(h.Lm,this.t5a,this,!0);this.FL=new g(this,"buttonPause",b.af);this.FL.bind(h.ma,this.UH,this,!0);this.GL=new g(this,"buttonPlay",b.af);this.GL.bind(h.ma,this.VH,this,!0);this.IL=new g(this,"buttonStop",b.af);this.IL.bind(h.ma,this.cD,this,!0);this.RYa=new g(this,"buttonRestart",b.af);this.RYa.bind(h.ma,
this.bD,this,!0);this.Nza=m.mr(this.Kab,this);this.Nza()});a.prototype.set=function(d,f){d!="state"&&k.prototype.set.call(this,d,f)};a.prototype.get=function(d,f){switch(d){case "state":return this.I}return k.prototype.get.call(this,d,f)};a.prototype.Kab=function(){this.QN&&(this.QN=!1,this.FL.set("state",this.I==e.Zb?c.Fb:c.De),this.GL.set("state",this.I==e.PLAYING||this.I==e.Zb?c.Fb:c.De),this.wG.set("pressed",this.I==e.PLAYING),this.IL.set("state",this.I==e.ca?c.Fb:c.De))};a.prototype.xD=function(d){this.vv!=
d&&((this.vv=d)||this.Jd(e.ca))};a.prototype.Jd=function(d){var f=this.I;this.I=d;k.prototype.set.call(this,"state",d);f!=this.I&&(this.QN=!0,this.Nza(),this.o(new n(h.Pd,{oldState:f,state:this.I})))};a.prototype.UH=function(){this.vv&&(this.I==e.Zb?this.sn():this.sv())};a.prototype.VH=function(){this.vv&&this.sn()};a.prototype.s5a=function(){this.vv&&this.sn()};a.prototype.t5a=function(){this.vv&&this.sv()};a.prototype.cD=function(){this.vv&&this.Ys()};a.prototype.bD=function(){this.vv&&(this.Ys(),
this.sn())};a.prototype.sn=function(){};a.prototype.sv=function(){};a.prototype.Ys=function(){};return a});
define("tdv/player/view/common/MediaDisplayController",["require","exports","tdv/view/util/Animation","tdv/events/EventDispatcher","tdv/player/view/util/XR"],function(a,m,h,n,g){var k={isEqual:function(e){return e==this}};return function(e){function b(c){var d=e.call(this)||this;d.P=c;d.jp=null;d.li=null;d.cf=null;d.Rh=0;d.An=0;d.sb=b.wo;return d}P(b,e);b.prototype.display=function(c){this.jp=null;c.isEqual(this.cf)&&this.sb==b.wo||(this.P.Mma(this),this.jp=c,this.mCa())};b.prototype.oe=function(){if(this.cf||
this.li)this.jp=k,this.mCa()};b.prototype.clear=function(){this.sb=b.wo;this.jp=null;if(this.cf||this.li)this.li&&(this.wN(this.li),this.li=null),this.cf&&(this.wN(this.cf),this.cf=null),this.P.release(this)};b.prototype.Yg=function(c){this.sb==b.wo||this.sb!=b.vo&&this.sb!=b.sL&&this.sb!=b.eR||(this.An+=c,c=Math.min(1,this.An/this.Rh),this.sb==b.vo?this.CT(c):this.sb==b.eR?this.GT(c):this.FT(c),this.An<this.Rh?this.bb():this.cM())};b.prototype.bb=function(){h.requestFrame(this.Yg,this)};b.prototype.mCa=
function(){this.jp&&this.sb==b.wo&&(this.T1()&&!this.cf?this.oYa():this.$x())};b.prototype.$x=function(){this.cf&&this.Nka(this.cf);this.T1()&&this.cf?this.ay():(this.li=this.jp.isEqual(k)?null:this.jp,this.jp=null,this.li?this.Wja(this.li,this.cf)?this.kR():this.Zx():this.cf?this.ay():this.P.release(this))};b.prototype.cM=function(){this.jp&&this.jp.isEqual(this.cf)||!this.cf||this.wN(this.cf);this.cf=this.li;this.li=null;this.sb==b.sL?this.YR():this.sb==b.vo?this.xy():this.sb==b.eR&&this.ZR();this.sb=
b.wo;this.ln();this.jp?this.$x():this.cf||this.P.release(this)};b.prototype.oYa=function(){this.sb=b.PWa;this.P.Psa(this,this.$x.bind(this))};b.prototype.Zx=function(){this.sb=b.vo;this.N_(this.li);this.An=0;this.Rh=this.P.get("transitionDuration");this.bb()};b.prototype.CT=function(){};b.prototype.xy=function(){};b.prototype.kR=function(){this.sb=b.eR;this.N_(this.li);this.An=0;this.Rh=this.P.get("transitionDuration")*2;this.bb()};b.prototype.GT=function(){};b.prototype.ZR=function(){};b.prototype.ay=
function(){this.li=null;this.An=0;this.Rh=this.P.get("transitionDuration");this.sb=b.sL;this.bb()};b.prototype.FT=function(){};b.prototype.YR=function(){};b.prototype.ln=function(){};b.prototype.T1=function(){return this.P.get("transitionMode","blending")=="fade_out_fade_in"||g.isPresenting};b.prototype.Wja=function(c,d){return!!d};b.prototype.Nka=function(){};b.prototype.N_=function(){};b.prototype.wN=function(){};b.wo="stopped";b.vo="blending";b.eR="double blending";b.sL="disolving";b.PWa="waiting";
return b}(n)});
define("tdv/player/view/model3d/controller/DisplayController","require tdv/utils tdv/view/util/Animation tdv/events/Event tdv/player/view/common/MediaDisplayController tdv/player/view/util/XR".split(" "),function(a){function m(b){this.model=b}var h=a("tdv/utils");a("tdv/view/util/Animation");var n=a("tdv/events/Event"),g=a("tdv/player/view/common/MediaDisplayController"),k=a("tdv/player/view/util/XR");m.prototype.isEqual=function(b){return b&&this.model==b.model};var e=h.extend(g,function(b,c){g.call(this,
b);this.j=c;this.mia=[]});e.prototype.display=function(b){g.prototype.display.call(this,new m(b))};e.prototype.oe=function(){g.prototype.oe.call(this)};e.prototype.clear=function(){g.prototype.clear.call(this);this.j=null};e.prototype.Yg=function(b){for(;this.mia.length;)this.mia.shift()();this.sb!=e.wo&&this.j.Qa();g.prototype.Yg.call(this,b)};e.prototype.pX=function(){return this.cf&&this.cf.model&&this.j.pX(this.cf.model)||void 0};e.prototype.Zx=function(){g.prototype.Zx.call(this);this.P.Rc().jmb();
this.j.rra(this.li.model,!1);this.P.Rc().xK();this.li.model.set("opacity",k.isPresenting?1:0)};e.prototype.CT=function(b){g.prototype.CT.call(this,b);k.isPresenting||this.li.model.set("opacity",b);this.P.Rc().lK(b)};e.prototype.xy=function(){g.prototype.xy.call(this);this.P.Rc().mJ()};e.prototype.kR=function(){this.P.Rc().cF();this.wN(this.cf);g.prototype.kR.call(this);this.j.rra(this.li.model,!1);this.P.Rc().xK()};e.prototype.GT=function(b){g.prototype.GT.call(this,b);this.P.Rc().lK(b);this.P.Rc().QE(b)};
e.prototype.ZR=function(){g.prototype.ZR.call(this);this.P.Rc().mJ();this.P.Rc().VD()};e.prototype.ay=function(){g.prototype.ay.call(this);this.P.Rc().cF();this.j.rra(this.cf.model,k.isPresenting?!1:!0)};e.prototype.FT=function(b){g.prototype.FT.call(this,b);this.P.Rc().QE(b);k.isPresenting||this.cf.model.set("opacity",1-b)};e.prototype.YR=function(){this.P.Rc().VD();g.prototype.YR.call(this)};e.prototype.ln=function(){g.prototype.ln.call(this);this.cf?this.o(new n(e.zF,{model:this.cf.model})):this.jp||
this.o(new n(e.$aa))};e.prototype.Nka=function(b){b.model&&this.o(new n(e.yF,{model:b.model}))};e.prototype.Wja=function(b,c){return!!c};e.prototype.N_=function(b){b.model&&(b.model.set("opacity",this.sb==g.eR?1:.01),b.model.set("currentTime",0),this.j.$Ha(b.model),this.o(new n(e.pba,{model:b.model})),this.mia.push(()=>{this.o(new n(e.AF,{model:b.model}))}))};e.prototype.wN=function(b){b.model&&(this.j.kQa(b.model),this.o(new n(e.qba,{model:b.model})))};e.oc="request frame";e.pba="model added";e.qba=
"model removed";e.AF="model start";e.zF="model show";e.yF="model hide";e.$aa="all pending models hidden";return e});
define("tdv/player/view/model3d/controller/LoadController",["require","tdv/utils","tdv/events/EventDispatcher","tdv/constants/EventName"],function(a){var m=a("tdv/utils"),h=a("tdv/events/EventDispatcher"),n=a("tdv/constants/EventName");a=m.extend(h,function(g,k){h.call(this);this.P=g;this.j=k;this.xh=null});a.prototype.clear=function(){this.stop();this.j=null};a.prototype.load=function(g){g!=this.xh&&(this.stop(),this.j.zgb(g)?(this.rGa(g),this.N5(g)):(this.xh=g,this.xh.set("opacity",0),this.vYa(),
this.j.$Ha(this.xh)))};a.prototype.stop=function(){this.xh&&(this.Bla(),this.j.kQa(this.xh),this.xh=null)};a.prototype.bN=function(){this.uGa();this.rGa(this.xh)};a.prototype.Pe=function(){this.xh.d8(n.WF)&&this.bN();this.Bla();var g=this.xh;this.xh=null;this.P.set("progressVisible",!1);this.N5(g)};a.prototype.yh=function(){this.Bla();this.xh=null;this.P.set("progressVisible",!1)};a.prototype.Gj=function(g){this.P.xa({progressPercent:g.data.percent,progressVisible:!0})};a.prototype.yYa=function(){this.xh.bind(n.WF,
this.bN,this,!0)};a.prototype.uGa=function(){this.xh.h(n.WF,this.bN,this,!0)};a.prototype.vYa=function(){this.yYa();this.xh.bind(n.ia,this.Pe,this,!0);this.xh.bind(n.yc,this.Gj,this,!0);this.xh.bind(n.$c,this.yh,this,!0)};a.prototype.Bla=function(){this.uGa();this.xh.h(n.ia,this.Pe,this,!0);this.xh.h(n.yc,this.Gj,this,!0);this.xh.h(n.$c,this.yh,this,!0)};a.prototype.rGa=function(g){this.o(n.WF,{model:g})};a.prototype.N5=function(g){this.o(n.ia,{model:g})};a.prototype.Dhb=function(){return this.xh&&
this.xh.d8(n.WF)};a.ota=n.WF;a.lta=n.ia;return a});
define("tdv/player/view/model3d/controller/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/PlaybackState"),e=m.extend(g,function(){g.call(this);this.Fa=null;this.I=k.ca});e.prototype.start=function(b){this.Fa=b;this.Fa.bind(h.L("camera"),this.dia,this,!0);this.Fa.bind(h.L("state"),
this.Eia,this,!0);this.Fa.bind(h.L("currentTime"),this.J3,this,!0);this.Fa.bind(h.L("duration"),this.J3,this,!0);this.Eia();this.dia()};e.prototype.end=function(){this.stop();this.Ac&&(this.Ac.h(h.L("state"),this.DT,this,!0),this.Ac=null);this.Fa&&(this.Fa.h(h.L("camera"),this.dia,this,!0),this.Fa.h(h.L("state"),this.Eia,this,!0),this.Fa.h(h.L("currentTime"),this.J3,this,!0),this.Fa.h(h.L("duration"),this.J3,this,!0),this.Fa=null)};e.prototype.clear=function(){this.end()};e.prototype.play=function(){this.Fa&&
this.Fa.set("state",k.PLAYING)};e.prototype.pause=function(){this.Fa&&this.Fa.set("state",k.Zb)};e.prototype.stop=function(){this.Fa&&this.Fa.set("state",k.ca)};e.prototype.setTime=function(b){this.Fa&&this.Fa.set("currentTime",b)};e.prototype.getTime=function(){return this.Fa&&this.Fa.get("currentTime")||void 0};e.prototype.Eia=function(){var b=this.Fa.get("state");this.I!=b&&(this.I=b,this.Ac&&this.Ac.set("state",b),this.o(new n(e.gd,{state:this.I})))};e.prototype.J3=function(){this.o(new n(e.Ok,
{model:this.Fa,time:this.Fa.get("currentTime"),duration:this.Fa.get("duration")}));this.DT()};e.prototype.dia=function(){this.Ac&&this.Ac.h(h.L("state"),this.DT,this,!0);(this.Ac=this.Fa.get("camera"))&&this.Ac.bind(h.L("state"),this.DT,this,!0);this.DT()};e.prototype.DT=function(){this.Fa.get("duration")===0&&this.Fa.set("state",this.Ac?this.Ac.get("state"):k.ca)};e.gd="playback state change";e.Ok="time change";return e});
define("tdv/player/view/model3d/controller/Controller","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/model3d/controller/DisplayController tdv/player/view/model3d/controller/LoadController tdv/player/view/model3d/controller/PlaybackController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/PlaybackState"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/model3d/controller/DisplayController"),
e=a("tdv/player/view/model3d/controller/LoadController"),b=a("tdv/player/view/model3d/controller/PlaybackController"),c=m.extend(g,function(d,f){g.call(this);this.P=d;this.j=f;this.j.set("visible",!1);this.Fe=new e(this.P,this.j);this.Ya=new k(this.P,this.j);this.Ua=new b(this.j);this.Fe.bind(e.ota,this.dCa,this,!0);this.Fe.bind(e.lta,this.dz,this,!0);this.Ya.bind(k.yF,this.YC,this,!0);this.Ya.bind(k.zF,this.jn,this,!0);this.Ya.bind(k.AF,this.TT,this,!0);this.Ya.bind(k.pba,this.aCa,this,!0);this.Ya.bind(k.qba,
this.eCa,this,!0);this.Ya.bind(k.$aa,this.$Aa,this,!0);this.Ua.bind(b.gd,this.Mf,this,!0);this.Ua.bind(b.Ok,this.Fs,this,!0)});c.prototype.clear=function(){this.Fe.clear();this.Ya.clear();this.Ua.clear();this.Fe.h(e.ota,this.dCa,this);this.Fe.h(e.lta,this.dz,this);this.Ya.h(k.yF,this.YC,this);this.Ya.h(k.zF,this.jn,this);this.Ya.h(k.AF,this.TT,this);this.Ya.h(k.pba,this.aCa,this);this.Ya.h(k.qba,this.eCa,this);this.Ya.h(k.$aa,this.$Aa,this);this.Ua.h(b.gd,this.Mf,this);this.Ua.h(b.Ok,this.Fs,this);
this.P=this.j=this.Ua=this.Ya=this.Fe=null};c.prototype.$kb=function(d){this.j.set("visible",!0);this.Fe.load(d)};c.prototype.bB=function(){this.Fe.Dhb()&&this.Fe.stop();this.Ya.oe();this.Ua.end()};c.prototype.play=function(){this.Ua.play()};c.prototype.stop=function(){this.Ua.stop()};c.prototype.pause=function(){this.Ua.pause()};c.prototype.setTime=function(d){this.Ua.setTime(d)};c.prototype.getTime=function(){return this.Ua.getTime()};c.prototype.pX=function(){return this.Ya.pX()};c.prototype.dCa=
function(d){this.Ya.display(d.data.model)};c.prototype.dz=function(){};c.prototype.aCa=function(d){this.Ua.start(d.data.model)};c.prototype.TT=function(d){d=d.data.model;this.j.set("visible",!0);this.o(new n(c.AF,{model:d}))};c.prototype.eCa=function(){};c.prototype.jn=function(d){d=d.data.model;d.get("autoplay")&&d.get("state")!=h.PLAYING&&d.set("state",h.PLAYING);this.o(new n(c.zF,{model:d}))};c.prototype.YC=function(d){this.o(new n(c.yF,{model:d.data.model}))};c.prototype.$Aa=function(){this.j.set("visible",
!1)};c.prototype.Fs=function(d){this.o(new n(c.rba,d.data))};c.prototype.Mf=function(d){this.o(new n(c.gd,{state:d.data.state}))};c.zF="modelShow";c.yF="modelHide";c.Fob="modelEnd";c.AF="modelStart";c.rba="videoTimeChange";c.gd="playbackStateChange";return c});
define("tdv/player/view/webgl/ecs/Component",["require","exports"],function(){return function(){function a(){}a.prototype.clear=function(){};a.zb=function(m){this.id=m+"Component";this.aa="!"+this.id};a.Ob=function(m){this.zb(m+"SystemState");this.E8=!0};a.E8=!1;return a}()});
define("tdv/player/view/webgl/components",["require","exports","tdv/player/view/webgl/ecs/Component","three.mod"],function(a,m,h,n){var g;(function(k){var e=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Rf=null;I.yQa=null;I.kE=!0;I.enabled=!0;I.locked=!1;I.QO=!0;I.pf=void 0;I.Jk=0;return I}P(M,J);return M}(h);k.Bob=e;var b=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bias=0;I.lKa=500;I.intensity=1;I.scale=100;I.gNa=25;I.INa=0;I.cna=4;I.output=
null;return I}P(M,J);return M}(h);k.MK=b;b.zb("AmbientOcclusionEffect");var c=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.color="#ffffff";I.intensity=1;return I}P(M,J);return M}(h);k.AmbientLight=c;c.zb("AmbientLight");var d=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.light=null;return I}P(M,J);return M}(h);k.wB=d;d.Ob("AmbientLight");var f=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;return I}P(M,
J);return M}(h);k.Animation=f;f.zb("Animation");var l=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.lx=l;l.Ob("Animation");var p=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.RKa=!1;I.fSa=!1;I.tZ=2;return I}P(M,J);return M}(h);k.pF=p;p.zb("AntialiasEffect");var q=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.nF=q;q.zb("ARAnchor");var r=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.anchor=null;I.fd=null;I.CJ=[];return I}P(M,J);return M}(h);k.kx=r;r.Ob("ARAnchorSystemState");var t=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.locked=!0;I.wb=null;return I}P(M,J);return M}(e);k.vB=t;t.zb("ARControls");var u=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Br=u;u.Ob("ARControlsSystemState");var v=function(J){function M(){return J!==null&&J.apply(this,
arguments)||this}P(M,J);return M}(h);k.Wf=v;v.Ob("ARPerspectiveCamera");var w=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.v=[];I.renderOrder=null;I.M=null;return I}P(M,J);return M}(h);k.lo=w;w.zb("Area");var x=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.v=[];return I}P(M,J);return M}(h);k.xB=x;x.Ob("Area");var y=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.D6=[];return I}P(M,J);return M}(h);k.qF=y;y.Ob("AreaPoint");
var z=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.AB=z;z.zb("Beacon");var A=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.position=null;return I}P(M,J);return M}(h);k.BB=A;A.Ob("Beacon");var D=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.M=null;return I}P(M,J);return M}(h);k.Qp=D;D.zb("BeaconTracker");var F=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.position=null;
return I}P(M,J);return M}(h);k.qx=F;F.Ob("BeaconTracker");var C=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;I.rotate=!1;return I}P(M,J);return M}(h);k.RK=C;C.zb("CameraOffsetTransform");var B=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;return I}P(M,J);return M}(h);k.kUa=B;B.Ob("CameraOffsetTransform");var H=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;return I}P(M,J);return M}(h);
k.SK=H;H.zb("CameraSequence");var E=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.sx=E;E.Ob("CameraSequence");var G=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.source=null;I.vK=null;I.opacity=1;I.isSprite=!1;I.hidden=!1;I.depthTest=!0;return I}P(M,J);return M}(h);k.Kf=G;G.zb("CanvasMaterial");var N=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);
return M}(h);k.DB=N;N.Ob("CanvasMaterial");var O=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.tF=O;O.zb("ClippingRect");var R=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.EB=R;R.Ob("ClippingRect");var Q=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.MQ=Q;Q.zb("Data");var K=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.target=null;
return I}P(M,J);return M}(h);k.DirectionalLight=K;K.zb("DirectionalLight");var L=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.zp=null;return I}P(M,J);return M}(h);k.Dr=L;L.Ob("DirectionalLight");var U=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.M=null;I.direction=null;I.min=null;return I}P(M,J);return M}(h);k.ux=U;U.zb("Draggable");var T=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Mna=null;return I}P(M,J);return M}(h);
k.FB=T;T.Ob("Draggable");var Y=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.Gm=Y;Y.zb("Dragging");var aa=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.NF=aa;aa.zb("FirstPersonControls");var ba=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Kr=ba;ba.Ob("FirstPersonControls");var ea=function(J){function M(){var I=J!==null&&J.apply(this,
arguments)||this;I.color="#ffffff";I.opacity=1;I.height=0;I.radius=1;I.renderOrder=0;return I}P(M,J);return M}(h);k.Lr=ea;ea.zb("Floor");var ia=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.floor=null;return I}P(M,J);return M}(h);k.yx=ia;ia.Ob("Floor");var da=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.distance=0;I.HX=!1;I.x=0;I.y=0;I.z=0;return I}P(M,J);return M}(h);k.zx=da;da.zb("FloorTransform");var V=function(J){function M(){var I=J!==null&&
J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.vu=V;V.Ob("FloorTransform");var X=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.OF=X;X.zb("FlyOverControls");var S=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Mr=S;S.Ob("FlyOverControls");var W=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.geometry=null;return I}P(M,J);return M}(h);
k.Geometry=W;W.zb("Geometry");var Z=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bJa="#ffffff";I.depthTest=!0;I.Hna=10;I.$La="#ffffff";I.size=10;return I}P(M,J);return M}(h);k.wu=Z;Z.zb("Grid");var ca=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.grid=null;return I}P(M,J);return M}(h);k.KB=ca;ca.Ob("Grid");var fa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.group=null;return I}P(M,J);return M}(h);k.Group=fa;fa.zb("Group");
var ja=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.group=null;return I}P(M,J);return M}(h);k.ZK=ja;ja.Ob("Group");var ha=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;I.uw=null;I.M=null;I.Ap=null;I.priority=void 0;I.isSprite=!1;I.nJa=null;return I}P(M,J);return M}(h);k.Ni=ha;ha.zb("ImageMaterial");var ka=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.MB=ka;
ka.Ob("ImageMaterial");var la=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.vQa=7;I.intensity=1;return I}P(M,J);return M}(h);k.PQ=la;la.zb("MotionBlurEffect");var oa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.line=null;I.renderOrder=0;return I}P(M,J);return M}(h);k.Line=oa;oa.zb("Line");var pa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.line=null;return I}P(M,J);return M}(h);k.PB=pa;pa.Ob("Line");var ma=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.color="#ffffff";I.opacity=1;I.width=1;I.transparent=!0;I.depthTest=!0;return I}P(M,J);return M}(h);k.ei=ma;ma.zb("LineMaterial");var na=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.OB=na;na.Ob("LineMaterial");var va=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.F=null;I.position=null;return I}P(M,J);return M}(h);k.yu=va;va.zb("LineToTransform");var wa=function(J){function M(){return J!==
null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.QB=wa;wa.Ob("LineToTransform");var xa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.material=null;return I}P(M,J);return M}(h);k.Material=xa;xa.zb("Material");var ya=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.name=null;return I}P(M,J);return M}(h);k.Bx=ya;ya.zb("MaterialVariant");var za=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,
J);return M}(h);k.Qr=za;za.Ob("MaterialVariant");var Aa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ke=null;I.renderOrder=0;return I}P(M,J);return M}(h);k.Mesh=Aa;Aa.zb("Mesh");var Ba=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ke=null;return I}P(M,J);return M}(h);k.Au=Ba;Ba.Ob("Mesh");var Ca=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;I.Gpa=null;I.MPa=null;I.Ap=null;I.M=null;I.Hoa=null;I.eb=null;
return I}P(M,J);return M}(h);k.Oi=Ca;Ca.zb("Model");var Da=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Cx=Da;Da.Ob("Model");var Ea=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.TF=Ea;Ea.zb("NotCollidable");var Fa=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.vVa=Fa;Fa.Ob("NotCollidable");var Ga=function(J){function M(){var I=J!==null&&
J.apply(this,arguments)||this;I.psa=!0;I.qsa=!0;return I}P(M,J);return M}(h);k.Rr=Ga;Ga.zb("NotSelectable");var Ha=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.UF=Ha;Ha.Ob("NotSelectable");var Ia=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.sa=null;return I}P(M,J);return M}(h);k.Object3D=Ia;Ia.zb("Object3D");var Ja=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.id=null;I.container=null;return I}
P(M,J);return M}(h);k.gL=Ja;Ja.zb("Object3DId");var Ka=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Dx=Ka;Ka.Ob("Object3DId");var La=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.xW=void 0;I.castShadow=void 0;I.receiveShadow=void 0;I.opacity=1;I.EW=void 0;I.M=null;return I}P(M,J);return M}(h);k.gi=La;La.zb("ObjectTransform");var Ma=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}
P(M,J);return M}(h);k.RB=Ma;Ma.Ob("ObjectTransform");var Na=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.VF=Na;Na.zb("OrbitControls");var Oa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Sr=Oa;Oa.Ob("OrbitControls");var Pa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.width=100;I.height=100;return I}P(M,J);return M}(h);k.OrthographicCamera=Pa;Pa.zb("OrthographicCamera");
var Qa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.camera=null;I.width=void 0;I.height=void 0;return I}P(M,J);return M}(h);k.Bu=Qa;Qa.Ob("OrthographicCamera");var Ra=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.F=null;I.attach=!1;I.id=null;return I}P(M,J);return M}(h);k.pb=Ra;Ra.zb("Parent");var Sa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.parent=null;I.ge=null;I.id=void 0;I.attach=!1;return I}P(M,J);return M}(h);
k.Du=Sa;Sa.Ob("Parent");var Ta=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.width=100;I.height=100;I.Mk=void 0;I.Wd=void 0;I.fov=75;I.near=.01;I.far=100;I.Vma=!1;I.DIa=0;I.nj=!1;return I}P(M,J);return M}(h);k.PerspectiveCamera=Ta;Ta.zb("PerspectiveCamera");var Ua=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.camera=null;I.yl=null;I.scene=null;I.boundingBox=null;I.dna=null;I.K9=!1;I.width=void 0;I.height=void 0;I.fov=void 0;I.Wd=void 0;I.Mk=void 0;
I.near=void 0;I.far=void 0;return I}P(M,J);return M}(h);k.Sk=Ua;Ua.Ob("PerspectiveCamera");var Va=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Le=1;I.Ye=1;I.Gh=1;I.scale=1;I.oE=void 0;I.pE=void 0;return I}P(M,J);return M}(h);k.Tk=Va;Va.zb("PixelScaleTransform");var Wa=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.XF=Wa;Wa.Ob("PixelScaleTransform");var Xa=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;
I.renderOrder=null;return I}P(M,J);return M}(h);k.Plane=Xa;Xa.zb("Plane");var Ya=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.geometry=null;return I}P(M,J);return M}(h);k.UB=Ya;Ya.Ob("Plane");var Za=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;I.M=null;I.matrixWorld=null;I.origin=new n.Vector3;I.direction=new n.Vector3;I.Qb=new n.Vector2;I.pressed=!1;I.gx=!1;I.ona=!1;I.Ug=!1;I.enabled=!0;return I}P(M,J);return M}(h);k.zc=Za;Za.zb("Pointer");
var $a=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.F=null;I.rotate=!0;I.M=null;return I}P(M,J);return M}(h);k.Dl=$a;$a.zb("PointerOverTransform");var ab=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Eu=ab;ab.Ob("PointerOverTransform");var bb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Fx=bb;bb.Ob("PointerDragging");var cb=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Gx=cb;cb.Ob("PointerSelection");var db=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bF=null;I.qZ=null;I.yZ=null;return I}P(M,J);return M}(h);k.po=db;db.zb("ProjectedMaterial");var eb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bF=null;I.sa=null;I.iQ=null;I.MA=null;I.material=null;I.DP=null;return I}P(M,J);return M}(h);k.Tr=eb;eb.Ob("ProjectedMaterial");var fb=
function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.eb=null;I.renderer=null;I.LY=[];return I}P(M,J);return M}(h);k.wj=fb;fb.zb("Renderer");var gb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Fu=gb;gb.Ob("Renderer");var hb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.opacity=1;I.locked=!1;I.enabled=!0;I.scene=null;I.Ea=null;I.backgroundColor=null;I.Xma=null;I.FIa=null;I.environmentIntensity=
1;I.uKa=null;I.Wna=null;I.NKa=null;I.OKa=0;I.ZW=0;I.outputColorSpace=null;I.M9=1;I.M=null;return I}P(M,J);return M}(h);k.Scene=hb;hb.zb("Scene");var ib=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.scene=null;I.manager=null;return I}P(M,J);return M}(h);k.Vp=ib;ib.Ob("Scene");var jb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.M=null;I.fF=!1;I.mt=!0;I.Xt=!1;I.pB=!1;return I}P(M,J);return M}(h);k.wd=jb;jb.zb("Selectable");var kb=function(J){function M(){return J!==
null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.YF=kb;kb.Ob("Selectable");var lb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.color="#ffffff";I.opacity=1;I.depthTest=!0;I.doubleSided=!1;return I}P(M,J);return M}(h);k.xd=lb;lb.zb("SolidMaterial");var mb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Hx=mb;mb.Ob("SolidMaterial");var nb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||
this;I.radius=1;I.widthSegments=32;I.heightSegments=16;I.renderOrder=0;return I}P(M,J);return M}(h);k.Sphere=nb;nb.zb("Sphere");var ob=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.ZF=ob;ob.Ob("Sphere");var pb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.SpotLight=pb;pb.zb("SpotLight");var qb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.light=null;I.zp=null;return I}P(M,J);
return M}(h);k.Hu=qb;qb.Ob("SpotLight");var rb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.uO=.5;I.vO=.5;I.height=100;I.width=100;I.scale=1;I.sizeAttenuation=!1;I.Gi=null;I.renderOrder=0;return I}P(M,J);return M}(h);k.Sprite=rb;rb.zb("Sprite");var sb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Iu=sb;sb.Ob("Sprite");var tb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bA=
!1;I.positionX=0;I.positionY=0;I.positionZ=0;I.Yd=0;I.fd=0;I.Xe=0;I.mf="XYZ";I.scale=1;I.Le=1;I.Ye=1;I.Gh=1;I.translationX=0;I.translationY=0;I.Ze=0;I.easing=0;I.M=null;return I}P(M,J);return M}(h);k.ta=tb;tb.zb("Transform");var ub=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.bA=!1;I.positionX=0;I.positionY=0;I.positionZ=0;I.Yd=0;I.fd=0;I.Xe=0;I.mf="XYZ";I.scale=1;I.Le=1;I.Ye=1;I.Gh=1;I.translationX=0;I.translationY=0;I.Ze=0;return I}P(M,J);return M}(h);k.Gg=ub;ub.Ob("Transform");
var vb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.bG=vb;vb.Ob("TransformEasing");var wb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.translate=!0;I.rotate=!0;I.scale=!0;I.M=null;return I}P(M,J);return M}(h);k.Hh=wb;wb.zb("TransformControls");var xb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.jaa=null;I.Fk=null;I.pe=null;return I}P(M,J);return M}(h);k.Mm=xb;xb.Ob("TransformControls");var yb=
function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.pf=void 0;return I}P(M,J);return M}(e);k.Jx=yb;yb.zb("TransitionControls");var zb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Ku=zb;zb.Ob("TransitionControlsSystemState");var Ab=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.properties=null;I.Msa=null;I.M=null;return I}P(M,J);return M}(h);k.ro=Ab;Ab.zb("VideoMaterial");var Bb=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.XB=Bb;Bb.Ob("VideoMaterial");var Cb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;I.width=null;I.height=null;return I}P(M,J);return M}(h);k.so=Cb;Cb.zb("Viewport");var Db=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.Ea=null;I.properties=null;return I}P(M,J);return M}(h);k.dG=Db;Db.zb("ViewportPlaneGeometry");var Eb=function(J){function M(){var I=J!==
null&&J.apply(this,arguments)||this;I.geometry=null;I.WRa=void 0;I.URa=void 0;I.Yh=void 0;I.verticalAlign=void 0;I.NE=void 0;I.zIndex=void 0;return I}P(M,J);return M}(h);k.Lx=Eb;Eb.Ob("ViewportPlaneGeometry");var Fb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.kPa=1;I.HMa=.5;I.color="#000000";I.opacity=.5;return I}P(M,J);return M}(h);k.mL=Fb;Fb.zb("VignetteEffect");var Gb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(h);k.lg=Gb;
Gb.Ob("XRPerspectiveCamera");var Hb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.locked=!0;return I}P(M,J);return M}(h);k.eG=Hb;Hb.zb("XRBasicControls");var Ib=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Yp=Ib;Ib.Ob("XRBasicControlsSystemState");var Jb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.nL=Jb;Jb.zb("XRDragControls");var Kb=function(J){function M(){var I=
J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.Zp=Kb;Kb.Ob("XRDragControlsSystemState");var Lb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,J);return M}(e);k.oL=Lb;Lb.zb("XRFlyControls");var Mb=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.$p=Mb;Mb.Ob("XRFlyControlsSystemState");var Nb=function(J){function M(){return J!==null&&J.apply(this,arguments)||this}P(M,
J);return M}(e);k.pL=Nb;Nb.zb("XRTeleportControls");var Ob=function(J){function M(){var I=J!==null&&J.apply(this,arguments)||this;I.manager=null;return I}P(M,J);return M}(h);k.aq=Ob;Ob.Ob("XRTeleportControlsSystemState")})(g||(g={}));return g});
define("tdv/player/view/Flash",["require","exports","tdv/player/view/util/Device"],function(a,m,h){return function(){function n(){this.qa=document.createElement("div");this.qa.style.position="absolute";this.qa.style.left="0";this.qa.style.top="0";this.qa.style.right="0";this.qa.style.bottom="0";this.qa.style.zIndex="0";this.qa.style.pointerEvents="none";this.qa.style.backgroundColor="#ffffff";this.qa.style.display="none";this.qa.style.opacity="0";this.qa.style.transition="opacity 100ms ease-in-out";
this.k9=this.k9.bind(this);this.l9=this.l9.bind(this)}n.prototype.cc=function(){return this.qa};n.prototype.k9=function(){this.qa.removeEventListener("transitionend",this.k9);this.qa.style.opacity="0";this.qa.addEventListener("transitionend",this.l9)};n.prototype.l9=function(){this.qa.removeEventListener("transitionend",this.l9);this.qa.style.display="none"};n.prototype.o=function(){h.Yb()!==h.sj&&(this.qa.style.display="block",this.qa.style.opacity="0",this.qa.offsetHeight,this.qa.style.opacity=
"1",this.qa.addEventListener("transitionend",this.k9))};return n}()});
define("tdv/player/view/webgl/ecs/Entity",["require","exports"],function(){return function(){function a(m,h){this.T=m;this.tag=h||"Entity";this.id=this.tag+"_"+a.cY++;this.components={};this.CY={};this.Xra=0}a.prototype.getComponent=function(m){return this.components[m.id]};a.prototype.O=function(m,h){h===void 0&&(h=!1);var n=this.components[m.id];n?this.T.Mcb(this,m):h&&(n=this.N(m));return n};a.prototype.N=function(m){if(m.id in this.components)return this.components[m.id];m.E8&&this.Xra++;var h=
this.components[m.id]=new m;this.T.Jbb(this,m);return h};a.prototype.ka=function(m){var h;h===void 0&&(h=!1);m.id in this.components&&(m.E8&&this.Xra--,h?this.components[m.id].clear():this.CY[m.id]=this.components[m.id],delete this.components[m.id],this.T.iQa(this,m,h))};a.prototype.Rcb=function(){for(var m in this.CY)this.CY[m].clear(),delete this.CY[m]};a.prototype.sjb=function(){for(var m in this.components){var h=this.components[m].constructor;h.E8||(this.CY[m]=this.components[m],delete this.components[m],
this.T.iQa(this,h,!1))}};a.cY=0;return a}()});define("tdv/player/view/webgl/ecs/Query",["require","exports"],function(){return function(){function a(){this.id=a.x4a++;this.v=[]}a.x4a=0;return a}()});
define("tdv/player/view/webgl/ecs/SystemQuery",["require","exports"],function(){return function(){function a(m,h){this.id=a.cY++;this.name=h;this.v=m.v;this.fe=m.v.slice();this.Da=[];this.Xg=[]}a.prototype.Ncb=function(){this.fe.length&&(this.fe=[]);this.Da.length&&(this.Da=[]);this.Xg.length&&(this.Xg=[])};a.cY=0;return a}()});
define("tdv/player/view/webgl/ecs/QueriesManager",["require","exports","tdv/player/view/webgl/ecs/Query","tdv/player/view/webgl/ecs/SystemQuery"],function(a,m,h,n){function g(b){return typeof b=="string"?b:b.id}function k(b,c){b.indexOf(c)<0&&b.push(c);return b}function e(b,c){c=b.indexOf(c);c>=0&&b.splice(c,1);return b}return function(){function b(){this.Jgb={};this.J={};this.dK={};this.XO={};this.rA={};this.bK={};this.MW={};this.aK={}}b.prototype.na=function(c){this.MW[c.id]={};this.MW[c.aa]={}};
b.prototype.Jdb=function(c,d){c=this.q2a(c);d=new n(c,d);this.dK[c.id].push(d);return d};b.prototype.q2a=function(c){var d=this.Ofb(c);if(d=this.Jgb[d])return d;d=new h;this.J[d.id]=d;c=c.map(g);this.aK[d.id]={};for(var f=0;f<c.length;f++){var l=c[f];this.aK[d.id][l]=!0;this.MW[l][d.id]=!0}this.bK[d.id]={};this.dK[d.id]=[];return d};b.prototype.Ofb=function(c){c=c.map(g);c.sort();return c.join("-")};b.prototype.lib=function(c){this.XO[c.id]={};this.rA[c.id]={}};b.prototype.mib=function(c){delete this.XO[c.id];
delete this.rA[c.id]};b.prototype.gib=function(c,d){var f=d.id,l=d.aa;d=c.id;this.XO[d][f]=!0;for(var p in this.rA[d])if(l in this.aK[p]){delete this.bK[p][d];delete this.rA[d][p];e(this.J[p].v,c);for(var q=this.dK[p],r=0,t=q.length;r<t;r++){var u=q[r];k(u.Xg,c);e(u.fe,c);e(u.Da,c)}}for(p in this.MW[f])if(!(d in this.bK[p])){f=!0;for(var v in this.aK[p])if(l=v[0]!="!",(l?v:v.slice(1))in this.XO[d]!=l){f=!1;break}if(f)for(this.bK[p][d]=!0,this.rA[d][p]=!0,k(this.J[p].v,c),q=this.dK[p],r=0,t=q.length;r<
t;r++)u=q[r],k(u.fe,c),e(u.Xg,c),e(u.Da,c)}};b.prototype.iib=function(c,d){var f=d.id,l="!"+f;d=c.id;delete this.XO[d][f];for(var p in this.rA[d])if(f in this.aK[p]){delete this.bK[p][d];delete this.rA[d][p];e(this.J[p].v,c);for(var q=this.dK[p],r=0,t=q.length;r<t;r++){var u=q[r];k(u.Xg,c);e(u.fe,c);e(u.Da,c)}}for(p in this.MW[l])if(!(d in this.bK[p])){f=!0;for(var v in this.aK[p])if(l=v[0]!="!",(l?v:v.slice(1))in this.XO[d]!=l){f=!1;break}if(f)for(this.bK[p][d]=!0,this.rA[d][p]=!0,this.J[p].v.push(c),
q=this.dK[p],r=0,t=q.length;r<t;r++)u=q[r],k(u.fe,c),e(u.Xg,c),e(u.Da,c)}};b.prototype.hib=function(c,d){d=d.id;var f=c.id,l;for(l in this.rA[f])if(d in this.aK[l]){f=this.dK[l];for(var p=0,q=f.length;p<q;p++)k(f[p].Da,c)}};return b}()});
define("tdv/player/view/webgl/ecs/World","require exports tdv/view/util/Animation tdv/player/view/webgl/ecs/Entity tdv/player/view/webgl/ecs/QueriesManager tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k){return function(){function e(b){this.enabled=!0;this.v={};this.SW=[];this.components={};this.xZ=[];this.cK=new g;this.j7=[];this.EE=!1;this.YJ=b}e.prototype.o$=function(b){this.Heb=b};e.prototype.dr=function(){return this.YJ};e.prototype.na=function(b){this.components[b.id]=b;this.cK.na(b);
return this};e.prototype.ed=function(b,c){var d=(new b).initialize(this,c,this.xZ.length);this.xZ.push(d);for(var f in b.J)d[f]=this.cK.Jdb(b.J[f],c+"."+f);this.xZ.sort(function(l,p){return l.order-p.order});return this};e.prototype.sc=function(b){b=new n(this,b);this.v[b.id]=b;this.cK.lib(b);this.Qa();return b};e.prototype.dd=function(b){b.id in this.v&&(delete this.v[b.id],this.SW.push(b),b.sjb(),this.Qa())};e.prototype.Jbb=function(b,c){this.cK.gib(b,c);this.Qa()};e.prototype.iQa=function(b,c,
d){this.cK.iib(b,c);d||this.j7.push(b);this.Qa()};e.prototype.Mcb=function(b,c){this.cK.hib(b,c);this.Qa()};e.prototype.Ra=function(b){this.enabled=b;this.Qa()};e.prototype.Qa=function(){this.enabled&&!this.EE&&(this.EE=!0,h.requestFrame(this.update,this,k.isPresenting?void 0:this.Heb))};e.prototype.update=function(b){b=b||0;this.EE=!1;if(this.enabled){for(var c=(new Date).getTime(),d=0;d<this.xZ.length;d++){var f=this.xZ[d];f.Yc(b,c);for(var l in f.constructor.J)f[l].Ncb()}for(d=0;d<this.j7.length;d++)this.j7[d].Rcb();
this.j7.length=0;for(d=this.SW.length-1;d>=0;d--)this.SW[d].Xra==0&&(this.cK.mib(this.SW[d]),this.SW.splice(d,1))}};return e}()});define("tdv/player/view/webgl/ecs/System",["require","exports"],function(){return function(){function a(){this.order=0;this.T=null;this.name=""}a.prototype.initialize=function(m,h,n){n===void 0&&(n=0);this.T=m;this.name=h;this.order=n;return this};a.prototype.Yc=function(){};return a}()});
define("tdv/player/view/webgl/system/light/AmbientLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System".split(" "),function(a,m,h,n,g,k){a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.eg=c.eg.bind(c);c.Ca=c.Ca.bind(c);return c}P(b,e);b.prototype.Yc=function(){this.mE.v.length&&this.mE.v.slice().forEach(this.xb);this.nE.v.length&&this.nE.v.slice().forEach(this.Ca);this.Ei.Da.length&&
this.Ei.Da.slice().forEach(this.ib);this.Ei.v.length&&this.Ei.v.slice().forEach(this.eg)};b.prototype.xb=function(c){var d=c.N(g.wB),f=c.N(g.Object3D);d.light=f.sa=new h.AmbientLight;this.ib(c)};b.prototype.ib=function(c){var d=c.getComponent(g.AmbientLight);c=c.getComponent(g.wB).light;c.color=n.Ip(d.color).convertLinearToSRGB();c.intensity=d.intensity*Math.PI;c.visible=c.intensity>0};b.prototype.eg=function(){};b.prototype.Ca=function(c){var d=c.getComponent(g.wB).light;d.parent&&d.parent.remove(d);
c.ka(g.wB);c.ka(g.Object3D)};b.J={};return b}(k);a.J={};a.J.mE=[g.AmbientLight,g.wB.aa];a.J.Ei=[g.AmbientLight,g.wB];a.J.nE=[g.AmbientLight.aa,g.wB];return a});
define("tdv/player/view/webgl/system/animation/AutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(g,k,e,b,c){this.A=g;this.He=k;this.Zg=e;this.Gl=b;this.Na=c;this.g5()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.getAnimations=function(){return this.Zg};m.prototype.iX=function(){return this.Gl};m.prototype.frame=function(g){this.I==n.PLAYING&&(this.Fv(this.hi.time+g/1E3),this.Na())};m.prototype.dispose=
function(){this.F5();this.ZB=this.mG=this.hi=this.Na=this.Gl=this.Zg=this.He=this.A=null};m.prototype.g5=function(){this.hi=new THREE.AnimationMixer(this.He);this.ac=0;this.Rb=!1;this.mG=[];this.ZB=[];for(var g=0;g<this.Zg.length;g++){var k=this.Zg[g],e=k.get("animationDirection")=="alternate",b=this.ac;this.ac+=this.Gl[g].duration*(e?2:1);this.ZB.push({start:b,end:this.ac});b=this.hi.clipAction(this.Gl[g]);e?b.setLoop(THREE.LoopPingPong,2):b.setLoop(THREE.LoopOnce,1);this.mG.push(b);k.set("state",
n.ca);k.set("currentTime",0);k.set("duration",this.Gl[g].duration)}this.I=n.ca;this.Nm=void 0;this.A.bind(h.L("state"),this.Hj,this,!0);this.A.bind(h.L("currentTime"),this.LH,this,!0);this.A.bind(h.L("animationDirection"),this.vBa,this,!0);this.A.set("duration",this.ac);this.Fv(0);this.A.get("autoplay")&&this.A.set("state",n.PLAYING)};m.prototype.F5=function(){this.A.h(h.L("state"),this.Hj,this,!0);this.A.h(h.L("currentTime"),this.LH,this,!0);this.A.h(h.L("animationDirection"),this.vBa,this,!0);this.A.set("state",
n.ca);for(var g=0;g<this.Zg.length;g++)this.mG[g].stop(),this.hi.uncacheClip(this.Gl[g]),this.Zg[g].set("state",n.ca),this.Zg[g].set("currentTime",0);this.A.set("duration",void 0);this.A.set("currentTime",void 0)};m.prototype.vBa=function(){this.F5();this.g5()};m.prototype.Hj=function(){var g=this.A.get("state");this.I!=g&&(this.I==n.ca?g==n.Zb?this.A.set("state",n.ca):g==n.PLAYING&&(this.I=n.PLAYING,this.Rb=!1,this.Fv(0),this.Na()):this.I==n.PLAYING?g==n.ca?(this.I=n.ca,this.Rb&&this.A.get("finalFrame")==
"last"?this.Fv(this.ac):this.Fv(0)):g==n.Zb&&(this.I=n.Zb):this.I==n.Zb&&(g==n.PLAYING?(this.I=n.PLAYING,this.Na()):g==n.ca&&(this.I=n.ca,this.Fv(0))),this.Nm!==void 0&&this.Zg[this.Nm].set("state",this.I),this.A.set("state",this.I))};m.prototype.LH=function(){var g=this.A.get("currentTime");this.hi.time!=g&&(this.I!=n.ca&&this.Fv(g),this.A.set("currentTime",this.hi.time))};m.prototype.Fv=function(g){if(this.hi.time!=g||this.Nm===void 0)if(g>this.ac)this.A.get("loop")?this.A.set("currentTime",g%this.ac):
(this.Rb=!0,this.A.o(h.Tb),this.A.set("state",n.ca));else{for(var k=this.Nm||0;g>this.ZB[k].end;)k++;for(;g<this.ZB[k].start;)k--;if(this.Nm!==k){for(var e=this.Nm||0;e<k;e++){var b=this.Zg[e],c=this.mG[e],d=this.ZB[e];b.get("finalFrame")=="last"&&b.get("animationDirection")=="normal"?(c.reset(),c.startAt(d.start),b.set("currentTime",b.get("duration")),c.clampWhenFinished=!0,c.play()):(b.set("currentTime",0),c.stop(),c.clampWhenFinished=!1);b.set("state",n.ca)}b=this.Zg[k];c=this.mG[k];d=this.ZB[k];
c.reset();c.startAt(d.start);c.clampWhenFinished=b.get("finalFrame")=="last"&&b.get("animationDirection")=="normal";c.play();for(e=this.Nm||0;e>k;e--)b=this.Zg[e],c=this.mG[e],b.set("currentTime",0),c.stop();this.Nm=k}else c=this.mG[this.Nm],g<this.hi.time&&(c.reset(),c.startAt(this.ZB[this.Nm].start)),c.paused=!1;this.hi.update(g-this.hi.time);b=this.Zg[this.Nm];b.set("state",this.I);g=this.hi.time-this.ZB[this.Nm].start;b=b.get("duration");k=g>b;this.Zg[this.Nm].set("currentTime",k?2*b-g:g);this.Zg[this.Nm].set("currentDirection",
k?"backward":"forward");this.A.set("currentTime",this.hi.time);this.Na()}};return m});
define("tdv/player/view/webgl/system/animation/NonAutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(g,k,e,b,c){this.A=g;this.He=k;this.Zg=e;this.Gl=b;this.Na=c;this.uia=this.uia.bind(this);this.lia=this.lia.bind(this);this.g5()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.dispose=function(){this.F5();this.Na=this.Gl=this.Zg=this.He=this.A=null};m.prototype.getAnimations=function(){return this.Zg};m.prototype.iX=
function(){return this.Gl};m.prototype.frame=function(g){this.Rx.length>0&&(this.hi.update(g/1E3),this.Rx.forEach(function(k){this.Lva(k)}.bind(this)),this.Na())};m.prototype.g5=function(){this.hi=new THREE.AnimationMixer(this.He);this.hi.addEventListener("loop",this.uia);this.hi.addEventListener("finished",this.lia);this.Qx=new Map;this.R_=new Map;this.Rx=[];for(var g=0;g<this.Zg.length;g++){var k=this.Zg[g],e=this.Gl[g];this.R_.set(k,e);var b=this.hi.clipAction(e);this.Qx.set(k,b);k.set("duration",
e.duration);k.set("currentTime",k.get("currentTime")||0);k.set("currentDirection","forward");k.bind(h.L("state"),this.iBa,this,!0);k.bind(h.L("animationDirection"),this.fBa,this,!0);k.bind(h.L("currentTime"),this.eBa,this,!0);k.bind(h.L("currentDirection"),this.dBa,this,!0);k.bind(h.L("loop"),this.hBa,this,!0);k.bind(h.L("finalFrame"),this.gBa,this,!0);this.ZN(k);this.xGa(k)}this.Na()};m.prototype.F5=function(){for(var g=0;g<this.Zg.length;g++){var k=this.Zg[g];k.h(h.L("state"),this.iBa,this,!0);
k.h(h.L("animationDirection"),this.fBa,this,!0);k.h(h.L("currentTime"),this.eBa,this,!0);k.h(h.L("currentDirection"),this.dBa,this,!0);k.h(h.L("loop"),this.hBa,this,!0);k.h(h.L("finalFrame"),this.gBa,this,!0);this.Qx.get(k).stop();this.Qx["delete"](k);this.hi.uncacheClip(this.R_.get(k));this.R_["delete"](k);this.Zg[g].set("state",n.ca);this.Zg[g].set("currentTime",0)}this.hi=this.R_=this.Qx=null};m.prototype.uia=function(g){this.Qx.forEach(function(k,e){g.action==k&&e.get("loop")&&e.o(h.Ur)})};m.prototype.lia=
function(g){this.Qx.forEach(function(k,e){g.action==k&&(this.Lva(e),e.set("state",n.ca),e.get("animationDirection")=="alternate"&&e.set("currentDirection",e.get("currentDirection")=="forward"?"backward":"forward"),e.o(h.Tb))}.bind(this))};m.prototype.fBa=function(g){this.ZN(g.source)};m.prototype.hBa=function(g){this.ZN(g.source)};m.prototype.gBa=function(g){this.ZN(g.source)};m.prototype.dBa=function(g){this.ZN(g.source)};m.prototype.eBa=function(g){this.ZN(g.source)};m.prototype.Lva=function(g){this.Jva=
!0;var k=this.Qx.get(g),e=g.get("animationDirection")=="alternate";e=k._loopCount>0&&k._loopCount%2==1&&e;g.set("currentDirection",e?"backward":"forward");k=k.time;var b=g.get("duration");e?g.set("currentTime",b-k):g.set("currentTime",k);this.Jva=!1};m.prototype.ZN=function(g){if(!this.Jva){var k=this.Qx.get(g),e=g.get("animationDirection")=="alternate",b=g.get("currentDirection")=="backward"&&e,c=g.get("loop"),d=g.get("finalFrame")=="last",f=g.get("currentTime");g=g.get("duration");c?(k.loop=e?THREE.LoopPingPong:
THREE.LoopRepeat,k.repetitions=Infinity,k.clampWhenFinished=!1):b?(k.loop=THREE.LoopPingPong,k.repetitions=2,k.clampWhenFinished=!1):(k.loop=THREE.LoopOnce,k.repetitions=1,k.clampWhenFinished=d||e);e=!e||k._loopCount!=-1&&k._loopCount%2!=0?e&&k._loopCount%2==1?g-f:f:b?g+g-f:f;k.time!=e&&(k.time=e,k.paused&&k.enabled&&e==0&&k.stop());this.Na()}};m.prototype.iBa=function(g){this.xGa(g.source)};m.prototype.xGa=function(g){var k=this.Qx.get(g),e=g.get("state");var b=this.Rx.indexOf(g)>=0?n.PLAYING:k.paused&&
k.enabled&&k.time<g.get("duration")?n.Zb:n.ca;b!=e&&(b==n.PLAYING?e==n.Zb?(this.Rx.splice(this.Rx.indexOf(g),1),k.paused=!0):e==n.ca&&(this.Rx.splice(this.Rx.indexOf(g),1),!k.paused&&k.enabled&&k.stop()):b==n.Zb?e==n.PLAYING?(this.Rx.push(g),k.paused=!1):e==n.ca&&k.stop():b==n.ca&&(e==n.PLAYING?(this.Rx.push(g),k.paused&&k.enabled&&g.get("animationDirection")=="alternate"&&g.get("currentDirection")=="backward"?k.paused=!1:(k.reset(),k.play(),k.fadeIn(.1))):e==n.Zb&&(k.play(),k.paused=!0,this.hi.update(0))),
g.set("state",e),this.Na())};return m});define("tdv/player/view/util/geo/Fov",["require","exports"],function(){return function(){function a(){}a.um=function(m,h,n){return this.hJ(m,h,n)};a.zr=function(m,h,n){return this.hJ(m,n,h)};a.hJ=function(m,h,n){return 2*Math.atan(n*Math.tan(m*this.$F*.5)/h)*this.fWa};a.fWa=180/Math.PI;a.$F=Math.PI/180;return a}()});
define("tdv/player/view/webgl/system/util/entity/Util",["require","exports","tdv/player/view/webgl/components","tdv/player/view/util/geo/Fov","three.mod"],function(a,m,h,n,g){return function(){function k(){}k.Qc=function(e){return e?e.isObject3D?e:(e=e.getComponent(h.Object3D))?e.sa:null:null};k.getWorldPosition=function(e,b){b=b||new g.Vector3;e=this.Qc(e);if(!e)return null;b.setFromMatrixPosition(e.matrixWorld);return b};k.eZ=function(e,b){(e=e.getComponent(h.Object3D))&&e.sa!==null&&(e=e.sa,e.matrixAutoUpdate=
!1,e.matrixWorldNeedsUpdate=!1,b.bA&&e.parent?(e.parent.updateWorldMatrix(!0,!1),e.matrix.copy(e.parent.matrixWorld).invert()):e.matrix.identity(),e.matrix.multiply(this.P8.makeTranslation(b.translationX,b.translationY,b.Ze)),e.matrix.multiply(this.P8.makeRotationFromEuler(this.teb.set(b.Yd*this.$F,b.fd*this.$F,b.Xe*this.$F,b.mf))),e.matrix.multiply(this.P8.makeTranslation(b.positionX,b.positionY,b.positionZ)),e.matrix.multiply(this.P8.makeScale(b.scale*b.Le,b.scale*b.Ye,b.scale*b.Gh)),e.updateMatrixWorld(!0),
e.matrix.decompose(e.position,e.quaternion,e.scale))};k.iX=function(e){if(!e)return[];e=e.getComponent(h.Oi);return(e=e===null||e===void 0?void 0:e.Hoa)?e.animations||[]:[]};k.kX=function(e){return e.getComponent(h.Bu)||e.getComponent(h.Sk)};k.At=function(e){var b=e.getComponent(h.Bu);return b?b.camera:(e=e.getComponent(h.Sk))?e.yl||e.camera:null};k.Sf=function(e){return this.qX(this.Qc(e))};k.qX=function(e){for(;e&&!e.isScene;)e=e.parent;return e};k.ulb=function(e,b){e.userData.camera=b};k.xlb=function(e,
b,c){e.userData.width=b;e.userData.height=c};k.vlb=function(e,b){e.userData.colorSpace!==b&&(e.userData.colorSpace=b,this.Esa(e))};k.wlb=function(e,b){e.userData.SKa!==b&&(e.userData.SKa=b,this.Esa(e))};k.sw=function(e){return e.userData.camera};k.tX=function(e){return e.userData.width};k.dE=function(e){return e.userData.height};k.sX=function(e){return e.userData.colorSpace};k.F$=function(e,b){e.userData.background!==b&&(e.userData.background=b,this.Esa(e))};k.Esa=function(e){if(e&&e.userData){var b=
e.userData.background,c=e.userData.colorSpace,d=e.userData.SKa;b&&b.isColor?e.background=c==g.SRGBColorSpace||d?b:b.clone().convertLinearToSRGB():(b&&b.isTexture&&(b.colorSpace=c==g.SRGBColorSpace?g.SRGBColorSpace:g.LinearSRGBColorSpace),e.background=b)}};k.Gbb=function(e,b){var c=e.userData.Tra||(e.userData.Tra=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.laa(e))};k.Dqa=function(e,b){var c=e.userData.Tra;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};k.laa=function(e){var b=e.userData.Tra;
if(b){var c=-e.far*.99;b.forEach(function(d){d.position.z=c})}};k.Ibb=function(e,b){var c=e.userData.Ora||(e.userData.Ora=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.fTa(e))};k.fQa=function(e,b){var c=e.userData.Ora;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};k.fTa=function(e){var b=e.userData.Ora;if(b){var c=e.far*.99;b.forEach(function(d){d.scale.x=d.scale.y=d.scale.z=c})}};k.Hbb=function(e,b){var c=e.userData.Ppa||(e.userData.Ppa=[]);c.indexOf(b)>=0||(c.push(b),e.add(b),this.eTa(e))};
k.eQa=function(e,b){var c=e.userData.Ppa;if(c){var d=c.indexOf(b);d<0||(c.splice(d,1),e.remove(b))}};k.eTa=function(e){var b=e.userData.Ppa;if(b){var c=e.near*1.001;b.forEach(function(d){d.position.z=-c;d.scale.x=d.scale.y=d.scale.z=2*Math.tan((e.aspect>1?n.zr(e.fov,e.aspect,1):e.fov)*this.$F*.5)*c*2}.bind(this))}};k.uJ=function(e){if((e=this.Qc(e))&&e.parent){var b=this.XLa(e);if(b)return this.eY.setFromMatrixScale(e.parent.matrixWorld),b/Math.max(this.eY.x,this.eY.y,this.eY.z)}};k.XLa=function(e){if((e=
this.Qc(e))&&e.parent){var b=this.qX(e);if(b){var c=this.sw(b);if(c)return e.matrixWorld.decompose(this.objectPosition,this.bib,this.eY),this.objectPosition.applyMatrix4(c.matrixWorldInverse),this.zi.setFromMatrixScale(c.matrixWorld),Math.abs(this.objectPosition.z)*2*Math.tan(c.fov*this.$F/2)*Math.max(this.zi.x,this.zi.y,this.zi.z)/this.dE(b)}}};k.ZD=function(e,b){if(e.userData.id===b)return e;var c=null;if(e.children)for(var d=0;d<e.children.length&&!c;d++)c=this.ZD(e.children[d],b);if(!c&&e.skeleton)for(d=
0;d<e.skeleton.bones.length&&!c;d++)c=this.ZD(e.skeleton.bones[d],b);return c};k.dLa=function(){this.Pna||(this.Pna=new g.WebGLRenderer);return this.Pna};k.HRa=function(e){this.Jna||(this.Jna=new g.DRACOLoader,this.Jna.setDecoderPath(g.gta));this.I8||(this.I8=new g.KTX2Loader,this.I8.setTranscoderPath(g.Ysa),this.I8.detectSupport(this.dLa()));e.setKTX2Loader(this.I8);e.setMeshoptDecoder(g.MeshoptDecoder);e.setDRACOLoader(this.Jna);return e};k.P8=new g.Matrix4;k.teb=new g.Euler;k.objectPosition=new g.Vector3;
k.bib=new g.Quaternion;k.eY=new g.Vector3;k.zi=new g.Vector3;k.$F=Math.PI/180;k.Pna=null;return k}()});
define("tdv/player/view/webgl/system/animation/Behaviour","require tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/webgl/components tdv/player/script/Model3DAnimation tdv/player/view/webgl/system/animation/AutoplayController tdv/player/view/webgl/system/animation/NonAutoplayController tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(f){this.B=f;this.Gl=this.He=null;this.S_={};this.T0=new Map;this.nv=this.Om=this.A=null;this.ih=!1;this.AT=this.AT.bind(this);
this.update()}function h(f,l){if(f==l||!(f!=null&&f.length!=0||l!=null&&l.length!=0))return!0;if(f==null||l==null||f.length!=l.length)return!1;for(var p=0;p<f.length;p++)if(f[p]!=l[p])return!1;return!0}var n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/script/Model3DAnimation"),b=a("tdv/player/view/webgl/system/animation/AutoplayController"),c=a("tdv/player/view/webgl/system/animation/NonAutoplayController"),d=a("tdv/player/view/webgl/system/util/entity/Util");
m.prototype.update=function(){var f=this.B.getComponent(k.Animation);this.Oj(f&&f.properties)};m.prototype.frame=function(f,l){this.dO();this.ih&&(this.ih=!1,this.Om&&this.Om.frame(f,l),this.nv&&this.nv.frame(f,l))};m.prototype.dispose=function(){this.Oj(null)};m.prototype.Oj=function(f){this.A!=f&&(this.A&&(n.da(this.A,["animations.autoplay"],this.AT),this.k7a()),(this.A=f)&&n.KD(this.A,["animations.autoplay"],this.AT),this.AT())};m.prototype.AT=function(){this.FGa()};m.prototype.dO=function(){if(!this.He){var f=
d.Qc(this.B),l=d.iX(this.B);if(this.He!=f||this.Gl!=l)this.He=f,this.Gl=l,this.S_={},this.Gl.forEach(function(p){p.name&&(this.S_[p.name]=p)}.bind(this)),this.FGa()}};m.prototype.FGa=function(){var f=this.A&&this.A.get("animations")||[],l=this.Gl||[],p=l.slice(),q=[],r=[],t=[],u=[];f.length&&l.length&&f.forEach(function(v){var w=v.get("index"),x=v.get("name"),y;w!==void 0&&w<l.length?y=l[w]:x!==void 0&&x in this.S_&&(y=this.S_[x]);p.indexOf(y)>=0&&(p.splice(p.indexOf(y),1),v.get("autoplay")?(q.push(y),
r.push(v)):(t.push(y),u.push(v)))}.bind(this));this.A&&r.length==0&&p.length>0&&(r=p.map(function(v){if(this.T0.has(v))return this.T0.get(v);var w=new e;this.T0.set(v,w);return w}.bind(this)),q=p);h(this.Om&&this.Om.getAnimations()||[],r)&&h(this.Om&&this.Om.iX()||[],q)||(this.Om&&(this.Om.dispose(),this.Om=null),r.length>0&&(this.Om=new b(this.A,this.He,r,q,this.Na.bind(this))));h(this.nv&&this.nv.getAnimations()||[],u)&&h(this.nv&&this.nv.iX()||[],t)||(this.nv&&(this.nv.dispose(),this.nv=null),
u.length>0&&(this.nv=new c(this.A,this.He,u,t,this.Na.bind(this))))};m.prototype.k7a=function(){(this.A&&this.A.get("animations")||[]).forEach(function(f){f.set("state",g.ca);f.set("currentTime",0)});this.T0.clear()};m.prototype.Na=function(){this.ih||(this.ih=!0,this.B.T.Qa())};m.Wa=function(f){f.N(k.lx).manager=new m(f)};m.ya=function(f){var l=f.getComponent(k.lx);l.manager.dispose();l.manager=null;f.ka(k.lx)};m.update=function(f){f.getComponent(k.lx).manager.update()};m.frame=function(f,l,p){f.getComponent(k.lx).manager.frame(l,
p)};return m});
define("tdv/player/view/webgl/system/animation/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/animation/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/animation/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(k,e){this.jIa.v.length&&this.jIa.v.slice().forEach(g.Wa);this.animations.Da.length&&
this.animations.Da.slice().forEach(function(b){g.update(b,k,e)});this.animations.v.length&&this.animations.v.slice().forEach(function(b){g.frame(b,k,e)});this.kIa.v.length&&this.kIa.v.slice().forEach(g.ya)};a.J={};a.J.jIa=[n.Animation,n.lx.aa];a.J.kIa=[n.Animation.aa,n.lx];a.J.animations=[n.Animation,n.lx];return a});
define("tdv/player/view/webgl/system/aranchor/System","require exports three.mod tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k){a=function(l){function p(){var q=l.call(this)||this;q.xb=q.xb.bind(q);q.ib=q.ib.bind(q);q.Ca=q.Ca.bind(q);return q}P(p,l);p.prototype.Yc=function(){this.sIa.v.length&&this.sIa.v.slice().forEach(this.xb);this.rIa.v.length&&this.rIa.v.slice().forEach(this.ib);this.tIa.v.length&&this.tIa.v.slice().forEach(this.Ca);
this.uIa.v.length&&this.uIa.v.slice().forEach(this.Ca)};p.prototype.xb=function(q){q.N(g.kx);this.ib(q)};p.prototype.ib=function(q){var r=q.N(g.Object3D).sa,t=q.getComponent(g.kx);k.isPresenting&&k.Cm==k.El.Np?t.anchor&&t.anchor instanceof XRAnchor&&k.WI.has(t.anchor)?(r.visible=!0,r.matrixAutoUpdate=!1,q=k.WI.get(t.anchor),t.fd||(e.copy(k.Ec).applyMatrix4(d.copy(q).invert()).normalize(),c.setFromQuaternion(b.setFromUnitVectors(f,e),"YXZ"),t.fd=(new h.Matrix4).makeRotationY(c.y)),r.matrix.identity().multiply(q).multiply(t.fd),
this.kna(t)):t.anchor&&t.anchor instanceof Promise?(r.visible=!1,this.Enb(t,r.parent)):(r.visible=!1,t.anchor=k.Ljb().then(function(u){t.anchor=u}).catch(function(u){console.error(u);t.anchor=null})):(r.visible=!0,r.matrixAutoUpdate=!0,r.matrix.identity(),this.fJa(t),this.kna(t))};p.prototype.Enb=function(q,r){if(r){for(;q.CJ.length>k.ud.length;)q.CJ.pop().removeFromParent();for(;q.CJ.length<k.ud.length;){var t=this.vdb();r.add(t);q.CJ.push(t)}for(r=0;r<k.ud.length;r++){var u=k.ud[r];u.g8||k.yRa(u,
!0);t=q.CJ[r];u.Ht?(t.visible=!0,t.children[0].scale.set(k.zi,k.zi,k.zi),t.matrix.copy(u.Ht)):t.visible=!1}}};p.prototype.vdb=function(){var q=new h.Mesh(new h.RingGeometry(.1,.125,60),new h.MeshBasicMaterial({color:16777215,depthWrite:!1,depthTest:!1,transparent:!0,side:h.DoubleSide}));q.rotation.x=-Math.PI/2;var r=new h.Group;r.matrixAutoUpdate=!1;r.add(q);return r};p.prototype.kna=function(q){for(;q.CJ.length;)q.CJ.pop().removeFromParent();k.ud.forEach(function(r){return k.yRa(r,!1)})};p.prototype.fJa=
function(q){q.anchor&&(q.anchor instanceof XRAnchor?k.beb(q.anchor):q.anchor instanceof Promise&&k.Ccb(),q.anchor=null)};p.prototype.Ca=function(q){var r=q.getComponent(g.kx);this.kna(r);this.fJa(r);q.ka(g.kx)};p.J={};return p}(n);var e=new h.Vector3,b=new h.Quaternion,c=new h.Euler,d=new h.Matrix4,f=new h.Vector3(0,0,1);a.J={};a.J.sIa=[g.nF,g.Object3D,g.kx.aa];a.J.rIa=[g.nF,g.Object3D,g.kx];a.J.tIa=[g.nF.aa,g.kx];a.J.uIa=[g.Object3D.aa,g.kx];return a});
define("tdv/player/view/util/geo/Tessellate",["require"],function(){function a(v,w,x,y,z){for(var A,D=0,F=w,C=x-y;F<x;F+=y)D+=(v[C]-v[F])*(v[F+1]+v[C+1]),C=F;if(z===D>0)for(z=w;z<x;z+=y)A=r(z,v[z],v[z+1],A);else for(z=x-y;z>=w;z-=y)A=r(z,v[z],v[z+1],A);A&&c(A,A.next)&&(t(A),A=A.next);return A}function m(v,w){if(!v)return v;w||(w=v);do{var x=!1;if(v.lSa||!c(v,v.next)&&b(v.Xd,v,v.next)!==0)v=v.next;else{t(v);v=w=v.Xd;if(v===v.next)break;x=!0}}while(x||v!==w);return w}function h(v,w,x,y,z,A,D){if(v){if(!D&&
A){var F=v,C=F;do C.z===0&&(C.z=k(C.x,C.y,y,z,A)),C.Ut=C.Xd,C=C.Rn=C.next;while(C!==F);C.Ut.Rn=null;C.Ut=null;F=C;var B,H,E,G,N=1;do{C=F;var O=F=null;for(H=0;C;){H++;var R=C;for(B=E=0;B<N&&(E++,R=R.Rn,R);B++);for(G=N;E>0||G>0&&R;)E!==0&&(G===0||!R||C.z<=R.z)?(B=C,C=C.Rn,E--):(B=R,R=R.Rn,G--),O?O.Rn=B:F=B,B.Ut=O,O=B;C=R}O.Rn=null;N*=2}while(H>1)}for(F=v;v.Xd!==v.next;){C=v.Xd;R=v.next;if(A)O=n(v,y,z,A);else a:{var Q=v;O=Q.Xd;G=Q.next;if(b(O,Q,G)>=0)O=!1;else{H=O.x;E=Q.x;N=G.x;B=O.y;Q=Q.y;var K=G.y,
L=H<E?H<N?H:N:E<N?E:N,U=B<Q?B<K?B:K:Q<K?Q:K,T=H>E?H>N?H:N:E>N?E:N,Y=B>Q?B>K?B:K:Q>K?Q:K;for(G=G.next;G!==O;){if(G.x>=L&&G.x<=T&&G.y>=U&&G.y<=Y&&e(H,B,E,Q,N,K,G.x,G.y)&&b(G.Xd,G,G.next)>=0){O=!1;break a}G=G.next}O=!0}}if(O)w.push(C.Dh/x|0),w.push(v.Dh/x|0),w.push(R.Dh/x|0),t(v),F=v=R.next;else if(v=R,v===F){if(D)if(D===1){v=m(v);D=w;F=x;C=v;do R=C.Xd,O=C.next.next,!c(R,O)&&d(R,C,C.next,O)&&p(R,O)&&p(O,R)&&(D.push(R.Dh/F|0),D.push(C.Dh/F|0),D.push(O.Dh/F|0),t(C),t(C.next),C=v=O),C=C.next;while(C!==
v);v=m(C);h(v,w,x,y,z,A,2)}else{if(D===2)a:{D=v;do{for(F=D.next.next;F!==D.Xd;){if(C=D.Dh!==F.Dh){C=D;R=F;if(O=C.next.Dh!==R.Dh&&C.Xd.Dh!==R.Dh){b:{O=C;do{if(O.Dh!==C.Dh&&O.next.Dh!==C.Dh&&O.Dh!==R.Dh&&O.next.Dh!==R.Dh&&d(O,O.next,C,R)){O=!0;break b}O=O.next}while(O!==C);O=!1}O=!O}if(O){if(O=p(C,R)&&p(R,C)){O=C;H=!1;E=(C.x+R.x)/2;N=(C.y+R.y)/2;do O.y>N!==O.next.y>N&&O.next.y!==O.y&&E<(O.next.x-O.x)*(N-O.y)/(O.next.y-O.y)+O.x&&(H=!H),O=O.next;while(O!==C);O=H}O=O&&(b(C.Xd,C,R.Xd)||b(C,R.Xd,R))||c(C,
R)&&b(C.Xd,C,C.next)>0&&b(R.Xd,R,R.next)>0}C=O}if(C){v=q(D,F);D=m(D,D.next);v=m(v,v.next);h(D,w,x,y,z,A,0);h(v,w,x,y,z,A,0);break a}F=F.next}D=D.next}while(D!==v)}}else h(m(v),w,x,y,z,A,1);break}}}}function n(v,w,x,y){var z=v.Xd,A=v.next;if(b(z,v,A)>=0)return!1;var D=z.x,F=v.x,C=A.x,B=z.y,H=v.y,E=A.y,G=D<F?D<C?D:C:F<C?F:C,N=B<H?B<E?B:E:H<E?H:E,O=D>F?D>C?D:C:F>C?F:C,R=B>H?B>E?B:E:H>E?H:E,Q=k(G,N,w,x,y);w=k(O,R,w,x,y);x=v.Ut;for(v=v.Rn;x&&x.z>=Q&&v&&v.z<=w;){if(x.x>=G&&x.x<=O&&x.y>=N&&x.y<=R&&x!==z&&
x!==A&&e(D,B,F,H,C,E,x.x,x.y)&&b(x.Xd,x,x.next)>=0)return!1;x=x.Ut;if(v.x>=G&&v.x<=O&&v.y>=N&&v.y<=R&&v!==z&&v!==A&&e(D,B,F,H,C,E,v.x,v.y)&&b(v.Xd,v,v.next)>=0)return!1;v=v.Rn}for(;x&&x.z>=Q;){if(x.x>=G&&x.x<=O&&x.y>=N&&x.y<=R&&x!==z&&x!==A&&e(D,B,F,H,C,E,x.x,x.y)&&b(x.Xd,x,x.next)>=0)return!1;x=x.Ut}for(;v&&v.z<=w;){if(v.x>=G&&v.x<=O&&v.y>=N&&v.y<=R&&v!==z&&v!==A&&e(D,B,F,H,C,E,v.x,v.y)&&b(v.Xd,v,v.next)>=0)return!1;v=v.Rn}return!0}function g(v,w){return v.x-w.x}function k(v,w,x,y,z){v=(v-x)*z|0;
w=(w-y)*z|0;v=(v|v<<8)&16711935;v=(v|v<<4)&252645135;v=(v|v<<2)&858993459;w=(w|w<<8)&16711935;w=(w|w<<4)&252645135;w=(w|w<<2)&858993459;return(v|v<<1)&1431655765|((w|w<<1)&1431655765)<<1}function e(v,w,x,y,z,A,D,F){return(z-D)*(w-F)>=(v-D)*(A-F)&&(v-D)*(y-F)>=(x-D)*(w-F)&&(x-D)*(A-F)>=(z-D)*(y-F)}function b(v,w,x){return(w.y-v.y)*(x.x-w.x)-(w.x-v.x)*(x.y-w.y)}function c(v,w){return v.x===w.x&&v.y===w.y}function d(v,w,x,y){var z=l(b(v,w,x)),A=l(b(v,w,y)),D=l(b(x,y,v)),F=l(b(x,y,w));return z!==A&&D!==
F||z===0&&f(v,x,w)||A===0&&f(v,y,w)||D===0&&f(x,v,y)||F===0&&f(x,w,y)?!0:!1}function f(v,w,x){return w.x<=Math.max(v.x,x.x)&&w.x>=Math.min(v.x,x.x)&&w.y<=Math.max(v.y,x.y)&&w.y>=Math.min(v.y,x.y)}function l(v){return v>0?1:v<0?-1:0}function p(v,w){return b(v.Xd,v,v.next)<0?b(v,w,v.next)>=0&&b(v,v.Xd,w)>=0:b(v,w,v.Xd)<0||b(v,v.next,w)<0}function q(v,w){var x=new u(v.Dh,v.x,v.y),y=new u(w.Dh,w.x,w.y),z=v.next,A=w.Xd;v.next=w;w.Xd=v;x.next=z;z.Xd=x;y.next=x;x.Xd=y;A.next=y;y.Xd=A;return y}function r(v,
w,x,y){v=new u(v,w,x);y?(v.next=y.next,v.Xd=y,y.next.Xd=v,y.next=v):(v.Xd=v,v.next=v);return v}function t(v){v.next.Xd=v.Xd;v.Xd.next=v.next;v.Ut&&(v.Ut.Rn=v.Rn);v.Rn&&(v.Rn.Ut=v.Ut)}function u(v,w,x){this.Dh=v;this.x=w;this.y=x;this.next=this.Xd=null;this.z=0;this.Rn=this.Ut=null;this.lSa=!1}return function(v,w,x){x=x||2;var y=w&&w.length,z=y?w[0]*x:v.length,A=a(v,0,z,x,!0),D=[];if(!A||A.next===A.Xd)return D;var F;if(y){var C=A;var B=x;A=[];var H;y=0;for(H=w.length;y<H;y++){var E=w[y]*B;var G=y<
H-1?w[y+1]*B:v.length;E=a(v,E,G,B,!1);E===E.next&&(E.lSa=!0);G=A;var N=G.push,O=E,R=E;do{if(O.x<R.x||O.x===R.x&&O.y<R.y)R=O;O=O.next}while(O!==E);N.call(G,R)}A.sort(g);for(y=0;y<A.length;y++){B=void 0;w=A[y];b:{H=C;E=w.x;G=w.y;N=-Infinity;do{if(G<=H.y&&G>=H.next.y&&H.next.y!==H.y&&(O=H.x+(G-H.y)*(H.next.x-H.x)/(H.next.y-H.y),O<=E&&O>N&&(N=O,B=H.x<H.next.x?H:H.next,O===E)))break b;H=H.next}while(H!==C);if(B){R=B;var Q=B.x,K=B.y,L=Infinity;H=B;do{if(E>=H.x&&H.x>=Q&&E!==H.x&&e(G<K?E:N,G,Q,K,G<K?N:E,
G,H.x,H.y)){O=Math.abs(G-H.y)/(E-H.x);var U;if((U=p(H,w))&&!(U=O<L)&&(U=O===L)&&!(U=H.x>B.x)&&(U=H.x===B.x)){U=B;var T=H;U=b(U.Xd,U,T.Xd)<0&&b(T.next,U,U.next)<0}U&&(B=H,L=O)}H=H.next}while(H!==R)}else B=null}B&&(w=q(B,w),m(w,w.next),C=m(B,B.next))}A=C}if(v.length>80*x){var Y=F=v[0];var aa=y=v[1];for(C=x;C<z;C+=x)w=v[C],B=v[C+1],w<Y&&(Y=w),B<aa&&(aa=B),w>F&&(F=w),B>y&&(y=B);F=Math.max(F-Y,y-aa);F=F!==0?32767/F:0}h(A,D,x,Y,aa,F,0);return D}});
define("tdv/player/view/webgl/system/util/material/Util",["require","exports","three.mod"],function(a,m,h){return function(){function n(){}n.Efb=function(g){return g.userData.Ot||g.material};n.ND=function(g,k){if(g.material!=k&&g.userData.Ot!=k){var e=g.userData.XX,b=g.userData.ypa;this.HY(g);g.material=k;b?this.DJa(g):e&&this.Vna(g);g.needsUpdate=!0}};n.Vna=function(g,k){k===void 0&&(k=null);g.userData.XX||(g.userData.XX=!0,g.userData.Ot=g.material,g.material=k||this.cdb(g.material))};n.HY=function(g){g.userData.XX&&
(this.heb(g.material),g.material=g.userData.Ot,delete g.userData.Ot,delete g.userData.XX,delete g.userData.ypa)};n.nnb=function(g){if(g.userData.XX){var k=g.userData.Ot;g=g.material;g.side=k.side;g.depthTest=k.depthTest;g.map&&k.map&&(g.map.colorSpace=k.map.colorSpace);g.emissiveMap&&k.emissiveMap&&(g.emissiveMap.colorSpace=k.emissiveMap.colorSpace)}};n.DJa=function(g){this.qgb(g)||(this.HY(g),this.Vna(g,this.adb(g.material)),g.userData.ypa=!0)};n.qgb=function(g){return!(!g.userData.ypa&&g.material&&
!this.w8(g.material))};n.w8=function(g){return Array.isArray(g)?!!g.every(function(k){return n.w8(k)}):g?!(g.isMeshPhysicalMaterial||g.isMeshStandardMaterial):!1};n.adb=function(g){return Array.isArray(g)?g.map(function(k){return n.oJa(k)}):g?this.oJa(g):g};n.oJa=function(g){return(new h.MeshBasicMaterial).copy(g)};n.cdb=function(g){return Array.isArray(g)?g.map(function(k){return k.clone()}):g?g.clone():g};n.heb=function(g){Array.isArray(g)?g.forEach(function(k){k.dispose()}):g&&g.dispose()};return n}()});
define("tdv/player/view/webgl/system/area/System","require tdv/utils tdv/constants/EventName tdv/player/view/util/geo/Tessellate tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/util/geo/Tessellate"),g=a("tdv/player/view/webgl/ecs/System"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(g,function(){g.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this);this.oaa=this.oaa.bind(this)});a.prototype.Yc=function(){this.wIa.v.length&&this.wIa.v.slice().forEach(this.xb);this.vIa.Da.length&&this.hnb(this.vIa.Da.slice());this.areas.Da.length&&this.areas.Da.slice().forEach(this.ib);this.xIa.v.length&&this.xIa.v.slice().forEach(this.Ca);this.yIa.v.length&&this.yIa.v.slice().forEach(this.Ca)};
a.prototype.xb=function(E){E.N(k.xB);this.ib(E)};a.prototype.ib=function(E){this.Anb(E);this.io(E)};a.prototype.hnb=function(E){var G=[];E.forEach(function(N){N.getComponent(k.qF).D6.forEach(function(O){G.indexOf(O)===-1&&G.push(O)})});G.forEach(this.oaa)};a.prototype.Anb=function(E){this.Lnb(E);this.oaa(E)};a.prototype.Lnb=function(E){var G=E.getComponent(k.lo),N=G&&G.v||[],O=(G=E.getComponent(k.xB))&&G.v||[];O.forEach(function(R){if(N.indexOf(R)===-1){var Q=R.getComponent(k.qF).D6.filter(function(K){return K!==
K});Q.length==0?R.ka(k.qF):R.O(k.qF).D6=Q}});N.forEach(function(R){O.indexOf(R)===-1&&R.O(k.qF,!0).D6.push(E)})};var c=new THREE.Matrix4,d=[];a.prototype.oaa=function(E){var G=E.getComponent(k.lo);for(G=G&&G.v||[];d.length<G.length;)d.push(new THREE.Vector3);var N=G.map(function(L,U){return L.getComponent(k.Object3D).sa.getWorldPosition(d[U])});N=N.filter(function(L,U){return L.distanceTo(N[(U+1)%N.length])>1E-4});G=this.Wfb(N);if(G.length===0)this.zxa(E),this.jGa(E);else{this.x8a(E,G.length*3);this.Nnb(E,
d,G);c.copy(E.getComponent(k.Object3D).sa.matrixWorld).invert();d.forEach(function(L){L.applyMatrix4(c)});E=E.getComponent(k.Geometry);for(var O=E.geometry.attributes.position.array,R=0,Q=0;R<G.length;){var K=d[G[R++]];O[Q++]=K.x;O[Q++]=K.y;O[Q++]=K.z;K=d[G[R++]];O[Q++]=K.x;O[Q++]=K.y;O[Q++]=K.z;K=d[G[R++]];O[Q++]=K.x;O[Q++]=K.y;O[Q++]=K.z}E.geometry.attributes.position.needsUpdate=!0}};var f=new THREE.Plane,l=new THREE.Vector3,p=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Line3,t=new THREE.Vector3,
u=new THREE.Vector3,v=new THREE.Vector3,w=new THREE.Vector3,x=new THREE.Vector3,y=5*Math.PI/180;a.prototype.Wfb=function(E){if(E.length<3)return[];var G=E[0];for(var N=Number.NEGATIVE_INFINITY,O=1;O<E.length;++O){var R=G.distanceToSquared(E[O]);if(!(R<=N)){N=R;var Q=E[O]}}if(N<=0)return[];r.set(G,Q);N=Number.NEGATIVE_INFINITY;for(O=0;O<E.length;++O)if(R=r.closestPointToPoint(E[O],!0,t).distanceToSquared(E[O]),!(R<=N)){N=R;var K=E[O]}if(N<=0)return[];f.setFromCoplanarPoints(G,Q,K);for(O=0;O<E.length;++O)if(N=
E[O],N!==G&&N!==Q&&N!==K){u.copy(G).sub(N).normalize();v.copy(Q).sub(N).normalize();w.copy(K).sub(N).normalize();N=u.dot(v);R=u.dot(w);var L=v.dot(w);N<R&&N<L?x.copy(u).cross(v):R<L?x.copy(u).cross(w):x.copy(v).cross(w);x.normalize();N=Math.abs(Math.acos(x.dot(f.normal)));N>Math.PI*.5&&(N=Math.PI-N);if(N>y)return[]}p.copy(E[1]).sub(E[0]).normalize();q.copy(f.normal).cross(p).normalize();G=[];for(O=0;O<E.length;++O)f.projectPoint(E[O],l),G.push(l.dot(p),l.dot(q));return n(G,null,2)};var z=new THREE.Vector3,
A=new THREE.Vector3,D=new THREE.Vector3,F=new THREE.Vector3,C=new THREE.Vector3,B=new THREE.Vector3,H=new THREE.Vector3;a.prototype.Nnb=function(E,G,N){var O=0;z.set(0,0,0);for(var R=0;R<N.length;){D.copy(G[N[R++]]);F.copy(G[N[R++]]);C.copy(G[N[R++]]);A.copy(D).add(F).add(C).divideScalar(3);var Q=H.subVectors(C,D).cross(B.subVectors(F,D)).length()*.5;A.multiplyScalar(Q);z.add(A);O+=Q}z.divideScalar(O);G=E.O(k.ta,!0);G.positionX=z.x;G.positionY=z.y;G.positionZ=z.z;e.eZ(E,G);this.jGa(E,O)};a.prototype.jGa=
function(E,G){(E=(E=E.O(k.lo))&&E.M)&&E.o(h.V,{area:G})};a.prototype.io=function(E){var G=E.getComponent(k.Object3D);if(G=G&&G.sa){var N=E.getComponent(k.Material).material;N&&b.ND(G,N);G.renderOrder=E.getComponent(k.lo).renderOrder}};a.prototype.zxa=function(E){var G=E.getComponent(k.Geometry);G&&(G.geometry&&G.geometry.dispose(),E.ka(k.Geometry),E.getComponent(k.Object3D).sa.geometry=null);if(G=E.getComponent(k.Object3D))G.sa&&G.sa.parent&&G.sa.parent.remove(G.sa),E.ka(k.Object3D)};a.prototype.x8a=
function(E,G){var N=E.getComponent(k.Geometry);N&&N.geometry&&N.geometry.attributes.position.array.length===G*3||(N=E.O(k.Geometry,!0),N.geometry&&N.geometry.dispose(),N.geometry=this.RZa(G),G=E.getComponent(k.Object3D),G||(G=E.N(k.Object3D),G.sa=new THREE.Mesh,this.io(E)),G.sa.geometry=N.geometry)};a.prototype.RZa=function(E){var G=new THREE.BufferGeometry,N=G.setAttribute,O=THREE.Float32BufferAttribute;E*=3;for(var R=[],Q=0;Q<E;Q++)R.push(0);N.call(G,"position",new O(R,3));return G};a.prototype.Ca=
function(E){this.zxa(E);E.ka(k.xB);E.ka(k.Object3D)};a.J={};a.J.wIa=[k.Material,k.lo,k.xB.aa];a.J.vIa=[k.Object3D,k.ta,k.qF];a.J.areas=[k.lo,k.Material,k.xB];a.J.xIa=[k.lo.aa,k.xB];a.J.yIa=[k.Material.aa,k.xB];return a});
define("tdv/player/view/webgl/system/beacon/System","require tdv/utils tdv/constants/EventName tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(n,function(){n.apply(this,arguments);this.Cra=this.Cra.bind(this);this.daa=
this.daa.bind(this);this.Bra=this.Bra.bind(this);this.caa=this.caa.bind(this);this.FW=new Map;this.cOa=new Map;this.K6=new Map;this.dOa=new Map});a.prototype.Yc=function(){this.GIa.v.length&&this.GIa.v.slice().forEach(this.Cra);this.HIa.v.length&&this.HIa.v.slice().forEach(this.daa);this.IIa.v.length&&this.IIa.v.slice().forEach(this.daa);this.JIa.v.length&&this.JIa.v.slice().forEach(this.Bra);this.KIa.v.length&&this.KIa.v.slice().forEach(this.caa);this.LIa.v.length&&this.LIa.v.slice().forEach(this.caa);
this.frame()};a.J={};a.J.GIa=[g.Object3D,g.Qp,g.qx.aa];a.J.qcb=[g.Object3D,g.Qp,g.qx];a.J.HIa=[g.Object3D.aa,g.qx];a.J.IIa=[g.Qp.aa,g.qx];a.J.JIa=[g.Object3D,g.AB,g.BB.aa];a.J.KIa=[g.Object3D.aa,g.BB];a.J.LIa=[g.AB.aa,g.BB];a.prototype.frame=function(){this.qcb.v.length!=0&&this.K6.forEach(function(e,b){var c=this.FW.get(b)||[];c.forEach(function(d){var f=d.getComponent(g.Object3D).sa;d.getComponent(g.BB).position.set(0,0,0).applyMatrix4(f.matrixWorld)});e.forEach(function(d){var f=d.getComponent(g.Object3D).sa;
d.getComponent(g.qx).position.set(0,0,0).applyMatrix4(f.matrixWorld)});e.forEach(function(d){var f=d.getComponent(g.Qp).M;d=this.jX(c,d.getComponent(g.qx).position);f.o(h.V,{beacons:d})}.bind(this))}.bind(this))};a.prototype.Reb=function(e){return function(b){var c=this.FW.get(e.T)||[];return this.jX(c,b)}.bind(this)};a.prototype.jX=function(e,b){e=e.map(function(c){return{entity:c,distance:b.distanceTo(c.getComponent(g.BB).position)}});e.sort(function(c,d){return c.distance-d.distance});return e};
a.prototype.Cra=function(e){e.N(g.qx).position=new THREE.Vector3;this.dOa.set(e,k.Qc(e));var b=this.K6.get(e.T);b||this.K6.set(e.T,b=[]);b.indexOf(e)<0&&b.push(e);e.getComponent(g.Qp).jX=this.Reb(e)};a.prototype.daa=function(e){var b=this.K6.get(e.T),c=b.indexOf(e);c>=0&&b.splice(c,1);this.dOa["delete"](e);e.ka(g.qx)};a.prototype.Bra=function(e){e.N(g.BB).position=new THREE.Vector3;this.cOa.set(e,k.Qc(e));var b=this.FW.get(e.T);b||this.FW.set(e.T,b=[]);b.indexOf(e)<0&&b.push(e)};a.prototype.caa=function(e){var b=
this.FW.get(e.T),c=b.indexOf(e);c>=0&&b.splice(c,1);this.cOa["delete"](e);e.ka(g.BB)};return a});
define("tdv/player/view/webgl/system/camera/System","require tdv/utils tdv/constants/EventName tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/util/geo/Fov tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/util/geo/Fov"),e=a("tdv/player/view/util/XR"),b=a("tdv/player/view/webgl/system/util/entity/Util");
a=m.extend(n,function(){n.apply(this,arguments);this.Era=this.Era.bind(this);this.Fra=this.Fra.bind(this);this.qaa=this.qaa.bind(this);this.raa=this.raa.bind(this);this.asa=this.asa.bind(this);this.bsa=this.bsa.bind(this);e.M.bind(h.V,this.Ta,this,!0)});a.prototype.Yc=function(){this.iPa.v.length&&this.iPa.v.slice().forEach(this.Era);this.tPa.v.length&&this.tPa.v.slice().forEach(this.Fra);this.VJ.Da.length&&this.VJ.Da.slice().forEach(this.qaa);this.Rt.Da.length&&this.Rt.Da.slice().forEach(this.raa);
this.jPa.v.length&&this.jPa.v.slice().forEach(this.asa);this.uPa.v.length&&this.uPa.v.slice().forEach(this.bsa)};a.prototype.Ta=function(){this.Rt.v.forEach(function(q){q.O(g.PerspectiveCamera)})};a.prototype.Era=function(q){var r=q.O(g.OrthographicCamera),t=q.N(g.Bu);q.N(g.Object3D).sa=t.camera=r.camera=new THREE.OrthographicCamera;this.qaa(q)};a.prototype.Fra=function(q){var r=q.O(g.PerspectiveCamera),t=q.N(g.Sk);t.boundingBox=new THREE.Box3;t.K9=!0;q.N(g.Object3D).sa=t.camera=r.camera=new THREE.PerspectiveCamera;
this.raa(q)};a.prototype.qaa=function(q){var r=q.getComponent(g.OrthographicCamera);q=q.getComponent(g.Bu);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.raa=function(q){var r=q.getComponent(g.PerspectiveCamera),t=q.getComponent(g.Sk);r.nj&&e.Ag?(q.N(e.Cm==e.El.Xp?g.lg:g.Wf),t.width=e.framebufferWidth?e.framebufferWidth*.5:r.width,t.height=e.framebufferHeight||r.height,q=t.yl=e.Ag.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.laa(q)):(q.ka(g.Wf),q.ka(g.lg),t.fov=r.fov,t.Wd=r.Wd,t.Mk=r.Mk,t.width=r.width,t.height=r.height,t.yl=null,q=t.camera,q.aspect=t.width/t.height,q.fov=r.Wd?k.um(r.Wd,t.width,t.height):r.Mk?r.Mk:t.width>t.height?k.um(t.fov,t.width,t.height):t.fov,q.near=t.near=r.near,q.far=t.far=r.far,b.laa(q),t.camera.updateProjectionMatrix())};a.prototype.asa=
function(q){var r=q.getComponent(g.Bu);r.camera.parent&&r.camera.parent.remove(r.camera);r.camera=null;q.ka(g.Bu);q.ka(g.Object3D)};a.prototype.bsa=function(q){var r=q.getComponent(g.Sk),t=r.camera;e.Zpb&&t.parent&&t.parent.remove(t);r.camera=null;q.ka(g.Sk);q.ka(g.Object3D)};a.J={};a.J.iPa=[g.OrthographicCamera,g.Bu.aa];a.J.jPa=[g.OrthographicCamera.aa,g.Bu];a.J.tPa=[g.PerspectiveCamera,g.Sk.aa];a.J.uPa=[g.PerspectiveCamera.aa,g.Sk];a.J.VJ=[g.OrthographicCamera,g.Bu];a.J.Rt=[g.PerspectiveCamera,
g.Sk];a.NK=m.extend(n,function(){n.apply(this,arguments);this.nqa=this.nqa.bind(this)});a.NK.prototype.Yc=function(){this.Rt.v.length&&this.Rt.v.slice().forEach(this.nqa)};a.NK.prototype.nqa=function(q){var r=q.getComponent(g.PerspectiveCamera);if(r.Vma){var t=q.getComponent(g.Sk),u=t.scene||b.Sf(q),v=t.camera;if(u&&v&&b.qX(v)===u){var w=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(r.nj)w=.1,x=1E3;else{var y=!1;t.K9&&(t.boundingBox=this.FZa(u,t.boundingBox),t.K9=!1,y=!0);u=t.boundingBox;
u=[[u.min.x,u.max.x],[u.min.y,u.max.y],[u.min.z,u.max.z]];for(var z=0;z<2;z++)for(var A=0;A<2;A++)for(var D=0;D<2;D++)p.set(u[0][z],u[1][A],u[2][D]).applyMatrix4(v.matrixWorldInverse),-p.z>x&&(x=-p.z),-p.z<w&&(w=-p.z);u=Math.max(r.DIa||0,0);z=(w+x)*.5;w+=(w-z)*u;x+=(x-z)*u;x=x==Infinity||isNaN(x)?2E3:x;w=w>0?w:x>20?.1:.01}if(Math.abs(r.near-w)>d||Math.abs(r.far-x)>d)v.far=t.far=r.far=x,v.near=t.near=r.near=w,b.laa(v),b.fTa(v),b.eTa(v),v.updateProjectionMatrix();y||t.dna||(t.dna=setTimeout(function(){t.dna=
null;t.K9=!0;q.T&&q.T.Qa()},c))}}};a.NK.prototype.FZa=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.yw||t.material&&!t.material.visible)return;t.updateWorldMatrix(!1,!1);u=t.geometry;u.boundingBox===null&&u.computeBoundingBox();u=u.boundingBox}l.copy(u);l.applyMatrix4(t.matrixWorld);r.union(l)});return r};var c=500,d=1E-4,f=180/Math.PI,l=new THREE.Box3,p=new THREE.Vector3;a.NK.J={};a.NK.J.Rt=[g.PerspectiveCamera,
g.Sk];return a});
define("tdv/player/view/webgl/system/cameraControls/ARBehaviour","require exports tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k){a=function(){function r(t){this.locked=!0;this.Di=!1;this.pf=1;this.F=t;this.update()}r.prototype.update=function(){var t=this.F.getComponent(g.vB),u=(t===null||t===void 0?void 0:t.locked)||!1;!u&&this.locked&&(this.Di=!0);this.locked=u;this.pf=(t===null||t===void 0?void 0:
t.pf)||1;this.properties=t.properties;this.Di&&h.b$();this.locked||h.setScale(this.pf)};r.prototype.frame=function(){this.locked||(this.Di=!1,this.YI())};r.prototype.YI=function(){if(h.isPresenting){var t=this.F.getComponent(g.vB);t=t.wb&&n.Qc(t.wb);p.compose(h.Ec,h.ug,f);t&&p.premultiply(l.copy(t.matrixWorld).decompose(c,b,d).compose(c,b,f).invert());p.decompose(c,b,d);this.properties.set("x",c.x);this.properties.set("y",c.y);this.properties.set("z",c.z);e.setFromQuaternion(b);this.properties.set("yaw",
-e.y*q);this.properties.set("pitch",e.x*q);this.properties.set("roll",e.z*q);this.properties.set("distance",0)}};r.prototype.dispose=function(){};r.Wa=function(t){t.N(g.Br).manager=new r(t)};r.update=function(t){t.getComponent(g.Br).manager.update()};r.frame=function(t,u,v){t.getComponent(g.Br).manager.frame(u,v)};r.ya=function(t){var u=t.getComponent(g.Br);u.manager.dispose();u.manager=null;t.ka(g.Br)};return r}();var e=new k.Euler(0,0,0,"YXZ"),b=new k.Quaternion,c=new k.Vector3,d=new k.Vector3,
f=new k.Vector3(1,1,1),l=new k.Matrix4,p=new k.Matrix4,q=180/Math.PI;return a});
define("tdv/player/view/webgl/system/util/RaycastUtil",["require","exports","three.mod","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a,m,h,n,g){a=function(){function d(){}d.E6=function(f,l,p){f.camera=l;l=p.getComponent(n.zc);p=(p=g.Qc(p))&&p.matrixWorld;p||(p=l.matrixWorld);p?(f.ray.origin.copy(l.origin).applyMatrix4(p),f.ray.direction.copy(l.origin).add(l.direction).applyMatrix4(p).sub(f.ray.origin).normalize()):(f.ray.origin.copy(l.origin),f.ray.direction.copy(l.direction).normalize());
return f};d.intersect=function(f,l){k.length=0;l.forEach(function(p){this.NPa(p);p.isSkinnedMesh&&!p.userData.Zma&&(p.userData.Zma=p.geometry.boundingBox,p.geometry.boundingBox=b,p.userData.OIa=p.geometry.boundingSphere,p.geometry.boundingSphere=c,k.push(p))}.bind(this));f.firstHitOnly=!0;l=l.filter(function(p){return(p.isScene||p.parent)&&(!p.isMesh||p.geometry)});e.length=0;e=f.intersectObjects(l,!1,e);k.forEach(function(p){p.geometry.boundingBox=p.userData.Zma;delete p.userData.Zma;p.geometry.boundingSphere=
p.userData.OIa;delete p.userData.OIa});e=e.filter(function(p){return p.object.isLine?!1:!0});e.length>1&&e.sort(function(p,q){var r=-p.object.renderOrder,t=-q.object.renderOrder;r==t&&(r=p.object.material&&!p.object.material.depthTest?0:1,t=q.object.material&&!q.object.material.depthTest?0:1);r==t&&(r=p.distance,t=q.distance);return r-t});return e};d.NPa=function(f){if(f.isMesh&&f.geometry&&f.geometry.attributes&&f.geometry.attributes.position&&!f.geometry.userData.MIa&&!f.isSkinnedMesh){try{f.geometry.computeBoundsTree()}catch(l){}f.geometry.userData.MIa=
!0}};return d}();var k=[],e=[],b=new h.Box3;b.min.x=b.min.y=b.min.z=-Infinity;b.max.x=b.max.y=b.max.z=Infinity;var c=new h.Sphere;c.center.x=c.center.y=c.center.z=0;c.radius=Infinity;return a});
define("tdv/player/view/webgl/system/cameraControls/CollidableObjects",["require","exports","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/system/util/RaycastUtil","three.mod"],function(a,m,h,n,g){a=function(){function c(d){this.jK=null;this.bKa=new g.Vector3;this.Gna=void 0;this.Ea=d}c.prototype.refresh=function(){this.jK=null};c.prototype.AK=function(d,f){return this.intersect(d,f).length>0};c.prototype.fhb=function(d){var f=h.At(this.Ea);if(!f)return[];k.far=f.far;k.setFromCamera(d,
f);return n.intersect(k,this.V7())};c.prototype.JX=function(d){var f=h.At(d.Ea||this.Ea);if(!f)return[];k.far=Infinity;k.camera=f;k.ray.origin.copy(d.origin);k.ray.direction.copy(d.direction);d.matrixWorld&&k.ray.applyMatrix4(d.matrixWorld);return n.intersect(k,this.V7())};c.prototype.intersect=function(d,f){k.far=d.distanceTo(f);k.ray.origin.copy(d);k.ray.direction.copy(f).sub(d).normalize();return n.intersect(k,this.V7())};c.prototype.XW=function(d){if(this.bKa.equals(d)&&this.Gna!==void 0)return this.Gna;
k.far=Infinity;k.ray.origin.copy(d);var f=[],l=[];this.V7().forEach(function(q){q.isGaussianCloud||q.yw?l.push(q):f.push(q)});var p=Infinity;[f,l].forEach(function(q){(q==l?b:[e]).forEach(function(r){k.ray.direction.copy(r);r=n.intersect(k,q);r.length!=0&&(r=d.y-r[0].point.y,r<p&&(p=r))})});if(p==Infinity)return Infinity;this.bKa.copy(d);return this.Gna=p};c.prototype.V7=function(){if(this.jK)return this.jK;var d=h.Sf(this.Ea);if(!d)return this.jK=[];var f=[];(c.dY.get(this.Ea.T)||[]).forEach(function(p){(p=
h.Qc(p))&&f.push(p)});this.jK=[];for(d=[d];d.length>0;){var l=d.pop();l.userData.NJ||l.isSprite||l.isLine||l.isSkinnedMesh||l.material&&!l.material.visible||f.indexOf(l)!==-1||(l.children&&d.push.apply(d,l.children),this.jK.push(l))}return this.jK};c.blb=function(d){this.dY.clear();d.forEach(function(f){this.dY.has(f.T)||this.dY.set(f.T,[]);this.dY.get(f.T).push(f)}.bind(this))};c.dY=new Map;return c}();var k=new g.Raycaster,e=new g.Vector3(0,-1,0),b=[(new g.Vector3(0,-1,.1)).normalize(),(new g.Vector3(0,
-1,.1)).normalize().applyMatrix4((new g.Matrix4).makeRotationY(Math.PI*2/3)),(new g.Vector3(0,-1,.1)).normalize().applyMatrix4((new g.Matrix4).makeRotationY(-Math.PI*2/3))];return a});
define("tdv/player/view/webgl/system/cameraControls/SequenceController","require exports tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a,m,h,n,g,k,e,b){return function(){function c(d,f,l){this.F=d;this.properties=f;this.ai=l;this.Lqa=0;this.WJ=this.LA=void 0;this.J9=!1;this.w$(0);this.aoa=this.n7=this.$na=this.l7=this.state=void 0;this.Zc(n.ca);this.ai.bind(h.L("state"),
this.TJ,this,!0);this.ai.bind(h.L("movementIndex"),this.FOa,this,!0)}c.prototype.vQ=function(){this.ai.get("mandatory")||(this.V6(),this.ai.get("restartMovementOnUserInteraction")?this.state==n.PLAYING&&(this.nSa(),this.Zc(n.Zb,!0)):this.state==n.PLAYING&&this.Zc(n.ca))};c.prototype.eob=function(){this.state==n.Zb&&this.J9&&this.ai.get("restartMovementOnUserInteraction")&&this.nmb()};c.prototype.frame=function(d){this.state==n.PLAYING&&this.yf!==null&&(this.yf.kpa()||this.LA!=0||this.ai.o(h.Cr),this.yf.Nb(d),
this.ynb(),this.properties.set("x",this.yf.ob("x")),this.properties.set("y",this.yf.ob("y")),this.properties.set("z",this.yf.ob("z")),this.properties.set("yaw",this.JE(this.yf.ob("yaw"),-180,180)),this.properties.set("pitch",this.yf.ob("pitch")),this.properties.set("distance",this.yf.ob("distance")),this.properties.set("fov",this.yf.ob("fov")),this.properties.set("easing",0),d=this.ai.get("movements")[this.LA],d.set("position",this.yf.tm()),d.o(h.Zd),this.yf.Ve()&&(d.o(h.Tb),this.w$((this.LA+1)%this.ai.get("movements").length,
!0),this.LA==0&&(this.Lqa++,this.ai.o(h.Ur),this.Lqa==this.ai.get("repeat")&&(this.jQa(),this.Zc(n.ca),this.ai.o(h.Tb)))))};c.prototype.ynb=function(){var d=this.l7!==void 0&&this.$na!==void 0,f=this.n7!==void 0&&this.aoa!==void 0;if(d||f){var l=this.JLa(this.F);if(l){var p=this.yf.getTime(),q=this.yf.lj();l=l.O(k.Scene);d=d&&p<this.l7?1-p/this.l7:0;f=f&&q-p<this.n7?1-(q-p)/this.n7:0;f>0||d>0?f>d?(l.YO=this.aoa,l.ZW=f):(l.YO=this.$na,l.ZW=d):(l.YO="#000000",l.ZW=0)}}};c.prototype.jQa=function(){var d=
this.JLa(this.F);d&&(d.O(k.Scene).ZW=0)};c.prototype.dispose=function(){this.V6();this.ai.h(h.L("state"),this.TJ,this);this.ai.h(h.L("movementIndex"),this.FOa,this);this.Zc(n.ca)};c.prototype.TJ=function(){var d=this.ai.get("state");this.state!=d&&(d==n.Zb&&this.state==n.ca?this.ai.set("state",n.ca):this.Zc(d))};c.prototype.Zc=function(d,f){f===void 0&&(f=void 0);this.state!=d&&(this.state=d,this.state==n.PLAYING?(this.V6(),this.J9=!1,this.HJa(),this.Pcb()):this.state==n.Zb?(this.J9=!!f,this.nSa()):
this.state==n.ca&&(this.J9=!1,this.V6(),this.Lqa=0,d=this.yf.getTime(),f=this.yf.lj(),d>0&&d<f&&this.jQa(),this.w$(0)));this.ai.set("state",this.state)};c.prototype.FOa=function(){this.w$(this.ai.get("movementIndex"))};c.prototype.w$=function(d,f){f===void 0&&(f=void 0);if(this.LA!==d||f)this.LA=d,this.HJa(),this.ai.set("movementIndex",this.LA),this.ai.get("movements")[this.LA].set("position",0)};c.prototype.JLa=function(d){for(;d&&!d.getComponent(k.Scene);)d=(d=d.getComponent(k.pb))&&d.F||null;return d};
c.prototype.nmb=function(){this.c$=setTimeout(function(){this.c$=null;this.Zc(n.PLAYING)}.bind(this),this.ai.get("restartMovementDelay"))};c.prototype.V6=function(){this.c$&&(clearTimeout(this.c$),this.c$=null)};c.prototype.HJa=function(){var d=this.ai.get("movements")[this.LA],f=this.properties.get("x",this.properties.get("initialX",0)),l=this.properties.get("y",this.properties.get("initialY",0)),p=this.properties.get("z",this.properties.get("initialZ",0)),q=this.JE(this.properties.get("yaw",this.properties.get("initialYaw",
0)),-180,180),r=this.properties.get("pitch",this.properties.get("initialPitch",0)),t=this.properties.get("distance",0),u=this.properties.get("fov",this.properties.get("initialFov"));if(g.Oa("TargetModel3DCameraMovement",d)){var v=d.get("targetX",f);var w=d.get("targetY",l);var x=d.get("targetZ",p);var y=d.get("targetYaw",q);var z=d.get("targetPitch",r);var A=d.get("targetFov",u);var D=d.get("targetDistance",t);switch(this.yeb(d)){case "left":y=this.JE(y,q-360,q);break;case "right":y=this.JE(y,q,q+
360);break;case "longest":y=this.JE(y,q-180,q+180);y=y==q?q+360:y>=q?this.JE(y,q-360,q):this.JE(y,q,q+360);break;default:y=this.JE(y,q-180,q+180)}}else g.Oa("DistanceModel3DCameraMovement",d)&&(v=f+d.get("xDelta",0),w=l+d.get("yDelta",0),x=p+d.get("zDelta",0),y=q+d.get("yawDelta",0),z=r+d.get("pitchDelta",0),A=u+d.get("fovDelta",0),D=t+d.get("distanceDelta",0));this.yf=new e(d.get("easing"),[new b("x",f,v,d.get("xSpeed")),new b("y",l,w,d.get("ySpeed")),new b("z",p,x,d.get("zSpeed")),new b("yaw",q,
y,d.get("yawSpeed")),new b("pitch",r,z,d.get("pitchSpeed")),new b("fov",u,A,d.get("fovSpeed")),new b("distance",t,D,d.get("distanceSpeed"))],d.get("duration"));this.l7=d.get("fadeFromDuration");this.$na=d.get("fadeFromColor");this.n7=d.get("fadeToDuration");this.aoa=d.get("fadeToColor")};c.prototype.Pcb=function(){this.WJ=void 0};c.prototype.nSa=function(){if(this.yf){this.WJ=void 0;var d=this.yf&&this.yf.nX("yaw");d&&(d.to>d.from?this.WJ="right":d.to<d.from&&(this.WJ="left"))}};c.prototype.yeb=function(d){d=
d.get("yawPath");d=="longest"&&this.WJ&&(d=this.WJ);this.WJ=void 0;return d};c.prototype.JE=function(d,f,l){for(;d<f;)d+=l-f;for(;d>l;)d-=l-f;return d};return c}()});
define("tdv/player/view/webgl/system/cameraControls/SequencesController","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/webgl/system/cameraControls/SequenceController tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a,m,h,n,g,k,e){return function(){function b(c,d){this.F=c;this.properties=d;this.A9=this.A9.bind(this);this.y9=this.y9.bind(this);this.TJ=this.TJ.bind(this);this.vm=this.ww=null;this.aQ=[];this.kh=null;
this.iF=!1;this.hA=new Map;h.ba(this.properties,["userInteracting"],this.A9,!0);h.ba(this.properties,["initialSequence","idleSequence","sequences.movements"],this.y9,!0);h.ba(this.properties,["state"],this.TJ,!0);this.ready=!1}b.prototype.frame=function(c){if(!this.ready){var d=e.Sf(this.F),f=0;d&&d.traverse(function(l){(l.isMesh||l.isSprite)&&f++});if(f>0)this.ready=!0,this.Dib();else return!1}this.kh&&this.hA.get(this.kh).frame(c);(c=this.kh&&this.kh.get("state")==g.PLAYING)&&this.F.T.Qa();this.properties.set("controllingPosition",
c)};b.prototype.dispose=function(){this.kh&&this.kh.get("mandatory")&&this.properties.set("inMandatorySequence",!1);this.kh&&this.properties.set("controllingPosition",!1);h.da(this.properties,["userInteracting"],this.A9);h.da(this.properties,["initialSequence","idleSequence","sequences.movements"],this.y9);h.da(this.properties,["state"],this.TJ);this.T$();this.vm&&this.RO(this.vm);this.ww&&this.RO(this.ww);this.aQ.forEach(this.RO.bind(this));this.aQ=[]};b.prototype.uZ=function(){this.iF||this.EJ||
!this.vm||this.kh||!this.properties.get("timeToIdle")||(this.EJ=setTimeout(function(){this.EJ=null;this.pib()}.bind(this),this.properties.get("timeToIdle")))};b.prototype.T$=function(){this.EJ&&(clearTimeout(this.EJ),this.EJ=null)};b.prototype.pib=function(){this.vm&&this.vm.set("state",g.PLAYING)};b.prototype.Dib=function(){this.ww?this.ww.set("state",g.PLAYING):this.uZ()};b.prototype.TJ=function(){this.kh?this.kh.set("state",this.properties.get("state")):this.properties.get("state")==g.PLAYING?
(this.uZ(),this.EJ||this.properties.set("state",g.ca)):this.T$()};b.prototype.A9=function(){var c=this.properties.get("userInteracting");this.iF!=c&&(this.iF&&(this.kh&&this.hA.get(this.kh).eob(),!this.vm||this.kh&&this.kh!=this.vm||this.uZ()),this.iF=c)&&(this.T$(),this.kh&&this.hA.get(this.kh).vQ())};b.prototype.y9=function(){var c=this.Sqa(this.properties.get("initialSequence"));this.ww!=c&&(this.ww&&this.RO(this.ww),(this.ww=c)&&this.una(this.ww));c=this.Sqa(this.properties.get("idleSequence"));
this.vm!=c&&(this.vm&&this.RO(this.vm),(this.vm=c)&&this.una(this.vm));var d=(this.properties.get("sequences")||[]).filter(this.Sqa.bind(this));this.aQ.forEach(function(l){d.indexOf(l)<0&&this.RO(l)}.bind(this));var f=this.aQ;this.aQ=d;this.aQ.forEach(function(l){f.indexOf(l)<0&&this.una(l)}.bind(this));this.kh||!this.vm||this.EJ||this.uZ()};b.prototype.Sqa=function(c){var d=c&&c.get("movements");return d&&d.length!=0?c:null};b.prototype.QOa=function(c){c=c.source;var d=c.get("state");d==g.PLAYING?
(this.T$(),d=this.kh,this.kh=c,d&&d!=this.kh&&d.set("state",g.ca),this.properties.set("state",g.PLAYING),this.properties.set("inMandatorySequence",c.get("mandatory")),this.F.T.Qa()):d==g.Zb?c==this.kh&&this.properties.set("state",g.Zb):d==g.ca&&c==this.kh&&(this.properties.set("state",g.ca),this.properties.set("inMandatorySequence",!1),this.kh=null,c!=this.vm&&this.uZ())};b.prototype.una=function(c){if(this.hA.has(c))this.hA.get(c);else{c.set("state",g.ca);c.bind(n.L("state"),this.QOa,this,!0);var d=
new k(this.F,this.properties,c);this.hA.set(c,d)}};b.prototype.RO=function(c){this.hA.has(c)&&(c.set("state",g.ca),c.h(n.L("state"),this.QOa,this),this.hA.get(c).dispose(),this.hA["delete"](c))};return b}()});
define("tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour",["require","exports","tdv/player/view/webgl/system/cameraControls/SequencesController","tdv/player/view/webgl/components"],function(a,m,h,n){return function(){function g(k){this.QY=this.properties=null;this.F=k;this.update()}g.prototype.update=function(){var k=this.F.getComponent(n.SK);this.cQ(k&&k.properties)};g.prototype.cQ=function(k){var e;this.properties&&((e=this.QY)===null||e===void 0||e.dispose(),this.QY=null);if(this.properties=
k)this.QY=new h(this.F,this.properties)};g.prototype.frame=function(k){this.QY&&this.QY.frame(k)};g.prototype.dispose=function(){this.cQ(null)};g.Wa=function(k){k.N(n.sx).manager=new g(k)};g.update=function(k){k.getComponent(n.sx).manager.update()};g.frame=function(k,e,b){k.getComponent(n.sx).manager.frame(e,b)};g.ya=function(k){k.getComponent(n.sx).manager.dispose();k.ka(n.sx)};return g}()});
define("tdv/player/view/webgl/system/cameraControls/DraggingObserver",["require","exports"],function(){return function(){function a(){}a.pP=function(m){return this.Baa.indexOf(m)>=0};a.cra=function(m){this.Baa=[];m.forEach(function(h){h=h.T;this.Baa.indexOf(h)<0&&this.Baa.push(h)}.bind(this))};a.Baa=[];return a}()});
define("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin",["require"],function(){return{jpb:function(){},kpb:function(){},U1:function(){return this.A&&this.A.get("inMandatorySequence")||this.A&&!this.A.get("keyboardEnabled")?!0:!1},Xm:function(){return this.A&&this.A.get("inMandatorySequence")||this.A&&(!this.A.get("mouseEnabled")||this.A.get("mouseDisabled"))?!0:!1},Pza:function(){return this.A&&this.A.get("doubleClickDisabled")?!0:!1},IBa:function(){this.CM()||this.Dy||this.wHa()},
HBa:function(){this.CM()||this.Dy||this.vHa()},aN:function(){this.Qza()||this.wHa()},$M:function(){this.Qza()||this.vHa()},wHa:function(){this.A&&this.A.set("userInteracting",!0)},vHa:function(){this.A&&this.A.set("userInteracting",!1)}}});
define("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter",["require","exports","tdv/player/view/webgl/system/util/entity/Util","three.mod"],function(a,m,h,n){return function(){function g(k){this.matrixWorld=new n.Matrix4;this.tE=!1;this.timeout=null;this.F=k}g.prototype.cQ=function(k,e){if(this.zK!=k||this.propertyName!=e)this.zK&&this.zK.set(this.propertyName,!1),this.zK=k,this.propertyName=e,this.zK&&this.zK.set(this.propertyName,this.tE)};g.prototype.Asa=function(){var k=h.Qc(this.F),
e=!!k&&!k.matrixWorld.equals(this.matrixWorld);e&&this.matrixWorld.copy(k.matrixWorld);this.Gp(e);this.timeout&&(clearTimeout(this.timeout),this.timeout=null);e&&(this.timeout=setTimeout(function(){this.timeout=null;this.Gp(!1)}.bind(this),g.tVa))};g.prototype.ya=function(){this.Gp(!1);this.timeout&&clearTimeout(this.timeout)};g.prototype.Gp=function(k){this.tE!=k&&(this.tE=k,this.zK&&this.zK.set(this.propertyName,k))};g.tVa=100;return g}()});
define("tdv/player/view/webgl/system/cameraControls/PropertiesSetter",["require","exports"],function(){return function(){function a(m){this.properties=m}a.prototype.aRa=function(m){this.properties.set("fov",this.CP(m,this.properties.get("minFov",.1),this.properties.get("maxFov",180)))};a.prototype.rj=function(m){this.properties.set("yaw",this.h$(this.Phb(m,this.properties.get("minYaw"),this.properties.get("maxYaw"),this.properties.get("yaw"))))};a.prototype.$n=function(m){this.properties.set("pitch",
this.CP(m,this.properties.get("minPitch",-90),this.properties.get("maxPitch",90)))};a.prototype.setX=function(m){this.properties.set("x",this.CP(m,this.properties.get("minX"),this.properties.get("maxX")))};a.prototype.setY=function(m){this.properties.set("y",this.CP(m,this.properties.get("minY"),this.properties.get("maxY")))};a.prototype.setZ=function(m){this.properties.set("z",this.CP(m,this.properties.get("minZ"),this.properties.get("maxZ")))};a.prototype.Yn=function(m){this.properties.set("distance",
this.CP(m,this.properties.get("minDistance"),this.properties.get("maxDistance")))};a.prototype.Xj=function(m){this.properties.set("easing",m)};a.prototype.Phb=function(m,h,n,g){if(h!==void 0||n!==void 0){var k=this.h$(m-g);if(h!==void 0&&k<0){if(this.h$(g)+k<h)return h}else if(n!==void 0&&k>0&&this.h$(g)+k>n)return n}return m};a.prototype.CP=function(m,h,n){if(isNaN(m))throw"invalid value";h!==void 0&&m<h&&(m=h);n!==void 0&&m>n&&(m=n);return m};a.prototype.h$=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{gha:function(h){this.d2=this.d2.bind(this);this.e2=this.e2.bind(this);this.CR=this.rk=!1;this.Ig={};for(var n=0;n<h.length;n++)this.Ig[h[n]]=!1;this.WS=0;this.f2=!1;this.XS(!0)},hha:function(){this.XS(!1)},XS:function(h){this.f2!=h&&(this.f2&&(document.removeEventListener("keyup",this.e2),document.removeEventListener("keydown",this.d2)),
this.f2=h)&&(document.addEventListener("keyup",this.e2),document.addEventListener("keydown",this.d2))},Qza:function(){return this.WS>0},e2:function(h){if(!(m.yp()||this.U1&&this.U1())){var n=!1;this.rk!=h.shiftKey&&(this.rk=h.shiftKey,n=!0);this.CR!=h.ctrlKey&&(this.CR=h.ctrlKey,n=!0);this.Ig[h.code]===!0&&(this.Ig[h.code]=!1,n=!0,this.tq&&this.tq(h.code),this.WS--,this.WS==0&&this.HBa&&this.HBa());n&&this.PT&&this.PT()}},d2:function(h){if(!(m.yp()||this.U1&&this.U1())){var n=!1;this.rk!=h.shiftKey&&
(this.rk=h.shiftKey,n=!0);this.CR!=h.ctrlKey&&(this.CR=h.ctrlKey,n=!0);this.Ig[h.code]===!1&&(n=this.Ig[h.code]=!0,this.QH&&this.QH(h.code),this.WS++,this.WS==1&&this.IBa&&this.IBa());n&&this.PT&&this.PT()}},wpb:function(){return this.rk},qpb:function(){return this.CR}}});
define("tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager",["require","exports","tdv/view/constants/Cursor"],function(a,m,h){a=function(){function g(){this.Gf=[]}g.prototype.au=function(k){this.UQa(k);this.Ab=k;this.tea=null};g.prototype.VQa=function(k){this.UQa(k?k.PLa():null);this.Ab=null;this.tea=k};g.prototype.Blb=function(k,e){this.Ab&&this.Ab.set("cursor",k);this.tea&&this.tea.k$(k,e)};g.prototype.UQa=function(k){this.Oe&&(this.Oe.xjb(this),this.Oe=void 0);k&&(this.Oe=n.get(k),
this.Oe.Pbb(this))};g.prototype.dispose=function(){this.au(null);this.Gf=[]};g.prototype.push=function(k){this.Gf.push(k);this.Oe&&this.Oe.update()};g.prototype.pop=function(k){for(var e=this.Gf.length-1;e>=0;e--)if(this.Gf[e]==k){this.Gf.splice(e,1);this.Oe&&this.Oe.update();break}};g.prototype.has=function(k){return this.Gf.indexOf(k)>=0};g.prototype.top=function(){if(this.Gf.length)return this.Gf[this.Gf.length-1]};g.prototype.all=function(){return this.Gf};return g}();var n=function(){function g(k){this.dc=
k;this.zd=[]}g.prototype.Pbb=function(k){this.zd.push(k);this.update()};g.prototype.xjb=function(k){this.zd.splice(this.zd.indexOf(k),1);this.update();this.zd.length==0&&g.clear(this.dc)};g.prototype.update=function(){var k=this.xXa();var e=this.cga(h.aG)?h.aG:this.cga(h.Li)?h.Li:this.cga(h.qf)?h.qf:this.bt()||h.De;this.zd.forEach(function(b){b.Blb(e,k)})};g.prototype.cga=function(k){for(var e=this.zd.length-1;e>=0;e--)if(this.zd[e].has(k))return!0;return!1};g.prototype.xXa=function(){var k=[];this.zd.forEach(function(e){e.all().forEach(function(b){k.indexOf(b)<
0&&k.push(b)})});return k};g.prototype.bt=function(){for(var k,e=this.zd.length-1;e>=0&&k===void 0;e--)k=this.zd[e].top();return k};g.get=function(k){var e=this.ab.get(k);e||this.ab.set(k,e=new g(k));return e};g.clear=function(k){this.ab["delete"](k)};g.ab=new Map;return g}();return a});
define("tdv/view/util/MouseLocker",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher"],function(a,m,h,n){return function(g){function k(e){var b=g.call(this)||this;if(e instanceof HTMLElement)b.RNa=e;else throw Error("invalid element");b.w9=b.w9.bind(b);document.addEventListener("pointerlockchange",b.w9.bind(b),!1);return b}P(k,g);k.prototype.dispose=function(){document.removeEventListener("pointerlockchange",this.w9)};k.prototype.lock=function(){if(!this.hr())return this.RNa.requestPointerLock()};
k.prototype.unlock=function(){this.hr()&&document.exitPointerLock()};k.prototype.hr=function(){return document.pointerLockElement===this.RNa};k.prototype.w9=function(){this.o(h.V)};k.hr=function(){return document.pointerLockElement!==null};return k}(n)});
define("tdv/player/view/webgl/system/util/mixin/MouseMixin",["require","tdv/constants/EventName","tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager","tdv/view/util/MouseLocker"],function(a){function m(e,b){var c=b.x-e.x;e=b.y-e.y;return Math.sqrt(c*c+e*e)}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager"),g=a("tdv/view/util/MouseLocker"),k=180/Math.PI;return{Pha:function(){this.U2=this.oT=this.Dy=this.mv=!1;this.p4=
this.df=null;this.N1=new n;this.sT=null;this.j5a=this.u4a.bind(this)},Qha:function(){this.Y4(null);this.N1.dispose()},CAa:function(e){this.Mq(e);if(!this.Xm||!this.Xm()){var b=this.BM();this.mv||(this.mv=!0,b||this.aN&&this.aN());this.oT=!e.zE||!e.zE.buttons||(e.zE.buttons&2)===0;this.p4=e;this.uq&&this.uq(e.x,e.y);this.u3&&this.u3(e.x,e.y)}},BM:function(){return this.mv||this.Dy||this.U2},CM:function(){return this.mv},rpb:function(){return this.Dy},spb:function(){return this.oT},tpb:function(){return this.U2},
EAa:function(e){this.Mq(e);if(this.Xm&&this.Xm())this.pT(e);else if(this.rg&&this.rg(e.x,e.y),this.mv||this.NM.hr()){var b=e.movementX!==void 0?e.movementX:e.x-this.p4.x,c=e.movementY!==void 0?e.movementY:e.y-this.p4.y;this.NM.hr()&&(b*=-1,c*=-1);this.p4=e;this.t3&&this.t3(b,c,e.x,e.y)}},pT:function(e){this.mv&&(e&&this.Mq(e),this.oT=this.mv=!1,this.fz&&this.fz(this.Ad,this.Bd),this.RH&&this.RH(),this.BM()||this.$M&&this.$M())},yAa:function(e){this.Xm&&this.Xm()||(this.Mq(e),this.ez&&this.ez(e.x,
e.y))},zAa:function(e){this.Xm&&this.Xm()||this.Pza&&this.Pza()||(this.Mq(e),this.ZM&&this.ZM(e.x,e.y))},FAa:function(e){this.Mq(e);if(!this.Xm||!this.Xm()){e=e.lA/10;var b=this.BM();this.sT||(this.U2=!0,this.k5a&&this.k5a(),b||this.aN&&this.aN());this.v3&&this.v3(e);this.sT&&clearTimeout(this.sT);this.sT=setTimeout(this.j5a,100)}},u4a:function(){this.sT=null;this.i5a&&this.i5a();this.U2=!1;this.BM()||this.$M&&this.$M()},BAa:function(e){if(!(this.Xm&&this.Xm()||e.touches.length<2)){var b=this.BM();
this.Dy||(this.Dy=!0,this.v4a(e.touches),b||this.aN&&this.aN());this.ABa&&this.ABa();this.pT()}},AAa:function(e){this.Xm&&this.Xm()||e.touches.length<2||!this.Dy||(this.GAa(e.touches),this.nia&&this.nia(this.y$a,this.z$a,this.mla,this.A$a),this.zBa&&this.zBa(this.Jga,this.Kga,this.QV,this.RV,1,this.mla,this.ES,this.lla,this.Iga,this.PV))},Oha:function(){this.Dy&&(this.Dy=!1,this.oia&&this.oia());this.BM()||this.$M&&this.$M()},v4a:function(e){this.Iga=this.Kga=this.Jga=this.ES=this.mla=this.RV=this.QV=
this.lla=this.PV=void 0;this.OV=e;this.GAa(e)},GAa:function(e){m(e[0],this.OV[0])+m(e[1],this.OV[1])>m(e[0],this.OV[1])+m(e[1],this.OV[0])&&(e=[e[1],e[0]]);var b=e[0];var c=e[1];b=Math.atan2(-(c.y-b.y),c.x-b.x)*k;c=m(e[0],e[1]);var d=(e[0].x+e[1].x)/2,f=(e[0].y+e[1].y)/2;this.mla=this.ES!==void 0?c/this.ES:1;this.A$a=this.PV!==void 0?b-this.PV:0;this.PV=b;this.lla=c;this.y$a=this.QV!==void 0?d-this.QV:0;this.z$a=this.RV!==void 0?f-this.RV:0;this.QV=d;this.RV=f;this.Jga!==void 0||(this.Jga=this.QV);
this.Kga!==void 0||(this.Kga=this.RV);this.Iga!==void 0||(this.Iga=this.PV);this.ES!==void 0||(this.ES=this.lla);this.OV=e},DAa:function(){},s0a:function(){this.pT();this.Oha()},mS:function(){return this.df?this.df.nb():100},dH:function(){return this.df?this.df.Mb():100},Gy:function(){return this.df?Math.max(this.df.nb(),this.df.Mb()):100},Y4:function(e){this.df!=e&&(this.df&&(this.df.h(h.Sa,this.CAa,this,!0),this.df.h(h.gb,this.EAa,this,!0),this.df.h(h.$a,this.pT,this,!0),this.df.h(h.ma,this.yAa,
this,!0),this.df.h(h.fi,this.zAa,this,!0),this.df.h(h.Qk,this.FAa,this,!0),this.df.h(h.Mba,this.AAa,this,!0),this.df.h(h.HB,this.BAa,this,!0),this.df.h(h.XK,this.Oha,this,!0),this.NM.h(h.V,this.DAa,this,!0),this.NM.dispose(),this.NM=null),this.df=e,this.N1.au(this.df),this.df&&(this.df.bind(h.Sa,this.CAa,this,!0),this.df.bind(h.gb,this.EAa,this,!0),this.df.bind(h.$a,this.pT,this,!0),this.df.bind(h.ma,this.yAa,this,!0),this.df.bind(h.fi,this.zAa,this,!0),this.df.bind(h.Qk,this.FAa,this,!0),this.df.bind(h.Mba,
this.AAa,this,!0),this.df.bind(h.HB,this.BAa,this,!0),this.df.bind(h.XK,this.Oha,this,!0),this.NM=new g(this.df.wa().cc()),this.NM.bind(h.V,this.DAa,this,!0)))},rT:function(e){e.x=-1+2*e.x/this.mS();e.y=1-2*e.y/this.dH();return e},Mq:function(e){this.Ad=e.x;this.Bd=e.y;this.OM=e.pageX;this.PM=e.pageY},iI:function(e){this.N1.push(e)},m4:function(e){this.N1.pop(e)}}});
define("tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{t7a:function(){this.Q4=!1;this.Hq=null;this.zH=this.DM=0;this.pI=!1;this.vEa(!0)},u7a:function(){this.vEa(!1);this.gFa(null)},vEa:function(h){this.Q4!=h&&((this.Q4=h)||this.P4())},gFa:function(h){this.Hq!=h&&(this.P4(),this.Hq&&(this.Hq.h(m.Up,this.wEa,this,!0),this.Hq.h(m.Fg,this.P4,this,!0),this.Hq.h(m.V,this.uEa,this,!0),this.zH=this.DM=
0),this.Hq=h)&&(this.Hq.bind(m.Up,this.wEa,this,!0),this.Hq.bind(m.Fg,this.P4,this,!0),this.Hq.bind(m.V,this.uEa,this,!0))},wEa:function(){!this.pI&&this.Q4&&(this.pI=!0,this.MCa&&this.MCa())},uEa:function(){this.pI&&(this.DM=this.Hq.getX(),this.zH=this.Hq.getY(),this.KCa&&this.KCa())},P4:function(){this.pI&&(this.pI=!1,this.zH=this.DM=0,this.LCa&&this.LCa())},vpb:function(){return this.pI}}});
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.QR=
!1;this.Lea=0;this.Fxa=!1;this.Gxa=L}function h(L){this.B=L;this.ws=new f(L);this.gha(y);this.Pha();this.t7a();this.wI=.025;this.dn=.25;this.Q2=this.R2=this.S2=this.m1=0;this.Ka=null;this.h0=this.K5=!1;this.Ha=void 0;this.cAa=new THREE.Vector3(void 0,void 0,void 0);this.cv=[];this.o4a=5;this.l4a=10;this.gy=new c(this.B);this.iI(t.IB);this.EM={};[k.ua.bk,k.ua.Ji,k.ua.fb,k.ua.Db].forEach(function(U){this.EM[U]=new m(300)}.bind(this));[k.ua.Mp,k.ua.qo,k.ua.Sp,k.ua.uo,k.ua.Q,k.ua.E].forEach(function(U){this.EM[U]=
new m(300)}.bind(this));this.update()}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/constants/Key"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),c=a("tdv/player/view/webgl/system/cameraControls/CollidableObjects"),d=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),f=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),l=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter"),
p=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),q=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),r=a("tdv/player/view/webgl/system/util/mixin/ScreenJoystickMixin"),t=a("tdv/view/constants/Cursor"),u=a("tdv/view/util/Ease"),v=a("tdv/view/util/EaseDimension");n.B6(h,[b,p,q,r]);h.prototype.update=function(){var L=this.B.getComponent(e.NF);this.Oj(L&&L.properties);this.ws.cQ(L&&L.properties,"moving");var U=(!L.QO||!d.pP(this.B.T))&&L.enabled;this.Y4(L&&(U?L.Rf:null));this.XS(!!L&&
U&&L.kE);this.gFa(!!L&&U&&L.yQa);U||this.RH();U&&L.kE||(this.Wo=this.Vo=this.Nl=this.Zk=this.Ol=0)};h.prototype.frame=function(L){this.B3a()?this.N2a(L):this.O2a(L);this.H0a()};h.prototype.B3a=function(){return this.properties&&this.properties.get("playingSequence")||this.Vi};h.prototype.N2a=function(L){this.properties&&this.properties.get("playingSequence")||this.BXa(L)};h.prototype.BXa=function(L){this.Vi&&(this.Vi.Nb(L),this.Ka.setX(this.Vi.ob("x")),this.Ka.setY(this.Vi.ob("y")),this.Ka.setZ(this.Vi.ob("z")),
this.Ka.Xj(0),this.Vi.Ve()&&(this.Vi=null),this.B.T.Qa())};var w=1E3/3600*8/1.7;h.prototype.O2a=function(L){H.set(this.A.get("x"),this.A.get("y"),this.A.get("z"));this.S1a(L,N,R);this.c2a(H,N,E);this.Ka.setX(E.x);this.Ka.setY(E.y);this.Ka.setZ(E.z);this.Ka.rj(this.A.get("yaw")+R.x);this.Ka.$n(this.A.get("pitch")+R.y);this.Ka.Xj(this.dn);N.x==0&&N.y==0&&N.z==0&&R.x==0&&R.y==0||this.B.T.Qa()};h.prototype.H0a=function(){this.bbb();this.fab();this.ws.Asa();this.pI&&this.B.T.Qa();this.gy.refresh()};h.prototype.S1a=
function(L,U,T){L/=1E3;var Y=this.rk?.2:1,aa=1.7*w;aa*=this.A.get("translationSpeed")*Y;var ba=this.A.get("rotationSpeed")*Y;Y=this.Q2;var ea=this.R2,ia=this.S2,da=this.m1;this.Q2=this.R2=this.S2=this.m1=0;var V=(Y*Y+ea*ea)/x;V=V>1?1/Math.sqrt(V):1;Y*=V;ea*=V;var X=F*Math.atan2(this.DM,Math.abs(this.zH));V=Math.sqrt(this.DM*this.DM+this.zH*this.zH);var S=Math.max(this.dH(),this.mS()),W=this.A.get("fov")/S*2;Y=-Y*W*ba;ea=ea*W*ba;ia=-ia*25*aa;W=this.lS(k.ua.Mp,k.ua.Sp)*aa;var Z=this.lS(k.ua.uo,k.ua.qo)*
aa,ca=this.lS(k.ua.Q,k.ua.E)*aa,fa=this.lS(k.ua.Ji,k.ua.bk)*ba*30,ja=this.lS(k.ua.fb,k.ua.Db)*ba*30;da=2*da*1.7/S;ba*=X*V*.125;aa*=-V*.5*this.zH;(V=this.B.getComponent(e.ta))&&(Y||ea||ia||W||ca||Z||fa||ja||ba||aa||da)?(C.makeRotationFromEuler(B.set(0,V.fd*D,0,V.mf)),U.set(W*L,ca*L+da,(Z+aa+ia)*L).applyMatrix4(C),T.set(Y+(ja+ba)*L,ea+fa*L)):(U.set(0,0,0),T.set(0,0))};h.prototype.lS=function(L,U){L=this.EM[L].getState();if(L===m.Waa)return-3;if(L===m.Ji)return-1.5;U=this.EM[U].getState();return U===
m.Waa?3:U===m.Ji?1.5:0};h.prototype.c2a=function(L,U,T){T.copy(L).add(U);if(!T.equals(L)){var Y=!this.cAa.equals(L);this.PGa(T,Y);this.Ha!==void 0&&U.y!==0&&(this.Ha=Math.max(.595,this.Ha+U.y));var aa=this.gy.XW(T);(Y||aa==Infinity)&&this.oZa();var ba=aa!==Infinity?T.y-aa:void 0;if(this.A.get("keepHeight")&&aa!==Infinity){aa=this.kS();if(ba>(Y?ba:this.U1a(L))+this.A.get("maxStepHeight",aa*.25)){T.copy(L);return}T.y=(Y?ba:this.a2a(ba))+aa}if(this.A.get("collisionDetection")&&(O.copy(U).normalize().multiplyScalar(.1).add(T),
this.gy.AK(L,O))){T.copy(L);return}ba!==void 0&&this.cXa(ba);this.cAa.copy(T)}};h.prototype.oZa=function(){this.cv=[]};h.prototype.U1a=function(L){return this.cv.length==0?L:this.cv[this.cv.length-1]};h.prototype.a2a=function(L){return this.cv.length<this.o4a?L:this.cv.reduce((U,T)=>U+T,0)/this.cv.length};h.prototype.cXa=function(L){this.cv.push(L);this.cv.length>this.l4a&&this.cv.shift()};h.prototype.PGa=function(L,U){if(this.Ha===void 0||U)L=this.gy.XW(L),L!==Infinity&&(this.Ha=L)};h.prototype.kS=
function(){return this.Ha===void 0?1.7:this.Ha};h.prototype.QH=function(L){this.B.T.Qa();this.EM[L].$pa()};h.prototype.tq=function(L){this.EM[L].aqa()};h.prototype.u3=function(){this.zj=!0;this.iI(t.Li)};h.prototype.ZM=function(L,U){if(this.A.get("doubleClickAction")=="translate"&&(this.rT(K.set(L,U)),L=this.gy.fhb(K),L.length!=0)){var T=L[0];L=H.set(this.A.get("x"),this.A.get("y"),this.A.get("z"));U=E.copy(T.point);this.PGa(L);var Y=this.kS();T.face&&T.face.normal?(T=G.copy(T.face.normal).transformDirection(T.object.matrixWorld),
T=Math.abs(Math.acos(T.dot(Q)))<Math.PI*.25):T=U.y<L.y-Y*.75;if(T)U.y+=Y;else{N.copy(U).sub(L);T=N.length();var aa=Y*2;if(T<aa)return;U.sub(N.multiplyScalar(aa/T));U.y+=Y-this.gy.XW(U)}this.gy.AK(L,U)||Math.abs(Y-this.gy.XW(U))>Y*.05||(this.Vi=new u("cubic_in_out",[new v("x",L.x,U.x),new v("y",L.y,U.y),new v("z",L.z,U.z)],1500),this.B.T.Qa())}};var x=2500;h.prototype.t3=function(L,U){this.zj&&(this.Q2+=L,this.R2+=U,this.B.T.Qa())};h.prototype.RH=function(){this.zj=!1;this.m4(t.Li);this.B.T.Qa()};
h.prototype.v3=function(L){this.S2+=L;this.B.T.Qa()};h.prototype.nia=function(L,U){this.m1+=U;this.B.T.Qa()};h.prototype.MCa=function(){this.s0a();this.iI(t.Li)};h.prototype.KCa=function(){this.B.T.Qa()};h.prototype.LCa=function(){this.m4(t.Li)};h.prototype.Oj=function(L){this.A!=L&&(this.A&&(this.Ka=null,z.forEach(function(U){this.A.h(g.L(U),this.Hia,this,!0)}.bind(this)),A.forEach(function(U){this.A.h(g.L(U),this.eia,this,!0)}.bind(this)),this.A.set("userInteracting",!1)),this.A=L)&&(this.Ka=new l(this.A),
z.forEach(function(U){this.A.bind(g.L(U),this.Hia,this,!0)}.bind(this)),this.Hia(),A.forEach(function(U){this.A.bind(g.L(U),this.eia,this,!0)}.bind(this)),this.eia(),this.A.set("userInteracting",!1))};h.prototype.Hia=function(){this.K5||(this.K5=!0,this.B.T.Qa())};h.prototype.bbb=function(){if(this.K5&&this.B&&this.A){this.K5=!1;var L=this.B.O(e.ta,!0);L.translationX=this.A.get("x");L.translationY=this.A.get("y");L.Ze=this.A.get("z");L.fd=-this.A.get("yaw");L.Yd=this.A.get("pitch");L.Xe=0;L.mf="YXZ";
L.positionX=0;L.positionY=0;L.positionZ=0;L.easing=this.A.get("easing")}};h.prototype.eia=function(){this.h0||(this.h0=!0,this.B.T.Qa())};h.prototype.fab=function(){this.h0&&this.B&&this.A&&(this.h0=!1,this.B.O(e.PerspectiveCamera,!0).fov=this.A.get("fov"))};var y=[k.ua.bk,k.ua.Ji,k.ua.fb,k.ua.Db,k.ua.Mp,k.ua.qo,k.ua.Sp,k.ua.uo,k.ua.Q,k.ua.E],z="minYaw maxYaw yaw minPitch maxPitch pitch minX maxX x minY maxY y minZ maxZ z distance easingSpeed".split(" "),A=["minFov","maxFov","fov"],D=Math.PI/180,
F=180/Math.PI,C=new THREE.Matrix4,B=new THREE.Euler,H=new THREE.Vector3,E=new THREE.Vector3,G=new THREE.Vector3,N=new THREE.Vector3,O=new THREE.Vector3,R=new THREE.Vector2,Q=new THREE.Vector3(0,1,0),K=new THREE.Vector2;h.prototype.dispose=function(){this.Oj(null);this.hha();this.Qha();this.u7a();this.ws.ya();this.gy=null};h.Wa=function(L){L.N(e.Kr).manager=new h(L)};h.ya=function(L){var U=L.getComponent(e.Kr);U.manager.dispose();U.manager=null;L.ka(e.Kr)};h.update=function(L){L.getComponent(e.Kr).manager.update()};
h.frame=function(L,U,T){L.getComponent(e.Kr).manager.frame(U,T)};m.prototype.$pa=function(){this.QR||(this.QR=!0,this.Fxa=Date.now()-this.Lea<this.Gxa,this.Lea=Date.now())};m.prototype.aqa=function(){this.QR&&(this.QR=!1)};m.prototype.getState=function(){return this.QR||Date.now()-this.Lea<this.Gxa?this.Fxa?m.Waa:m.Ji:m.bk};m.bk=0;m.Ji=1;m.Waa=2;return h});
define("tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/util/geo/Fov tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter tdv/player/view/webgl/system/cameraControls/PropertiesSetter tdv/player/view/webgl/system/cameraControls/SequencesController tdv/player/view/webgl/system/util/mixin/KeyboardMixin tdv/player/view/webgl/system/util/mixin/MouseMixin tdv/view/constants/Cursor tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){function m(V){this.B=
V;this.gha(O);this.Pha();this.ws=new l(V);this.qd=w;this.Ms=this.ik=null;this.wI=.025;this.dn=.25;this.gj=void 0;this.xI=1;this.Ol=this.Zk=this.Nl=this.Wo=this.Vo=0;this.$l=[];this.rH=this.sH=this.tH=this.pH=this.oH=this.AC=this.hk=this.sy=this.ty=this.vy=this.uy=this.qy=void 0;this.Gga=1E3;this.vS=void 0;this.sM=0;this.Ka=null;this.iI(t.IB);this.update()}function h(V,X){V=X-V;V>180?V-=360:V<-180&&(V+=360);return V}function n(){return(new Date).getTime()}var g=a("tdv/utils"),k=a("tdv/constants/EventName"),
e=a("tdv/constants/Key");a("tdv/player/view/util/geo/Fov");var b=a("tdv/player/view/webgl/system/util/entity/Util"),c=a("tdv/player/view/webgl/components"),d=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),f=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),l=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),p=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter");a("tdv/player/view/webgl/system/cameraControls/SequencesController");
var q=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),r=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),t=a("tdv/view/constants/Cursor"),u=a("tdv/view/util/Ease"),v=a("tdv/view/util/EaseDimension");g.B6(m,[d,q,r]);m.prototype.update=function(){var V=this.B.getComponent(c.OF);this.Oj(V&&V.properties);this.ws.cQ(V&&V.properties,"moving");var X=(!V.QO||!f.pP(this.B.T))&&V.enabled;this.Y4(V&&(X?V.Rf:null));this.XS(!!V&&X&&V.kE);X||this.RH();X&&V.kE||(this.Wo=this.Vo=this.Nl=this.Zk=
this.Ol=0)};m.prototype.frame=function(V){this.Vi&&(this.Vi.Nb(V),this.Ka.setX(this.Vi.ob("x")),this.Ka.setY(this.Vi.ob("y")),this.Ka.setZ(this.Vi.ob("z")),this.Ka.Yn(this.Vi.ob("distance")),this.Ka.Xj(0),this.Vi.Ve()&&(this.Vi=null));this.uh&&(this.uh=Math.max(0,this.uh-V/this.Gga),this.Ka.setX(this.A.get("x")+this.rH*this.uh),this.Ka.setY(this.A.get("y")+this.sH*this.uh),this.Ka.setZ(this.A.get("z")+this.tH*this.uh),this.Ka.rj(this.A.get("yaw")+this.pH*this.uh),this.Ka.$n(this.A.get("pitch")+this.oH*
this.uh),this.Ka.Xj(0),this.B.T.Qa(),this.uh==0&&this.MU());if(this.Wo||this.Vo||this.Nl||this.Zk||this.Ol){var X=V/1E3;this.Uha(this.Nl*X,this.Zk*X,this.Ol*X,this.Wo*X,this.Vo*X)}if(this.qd==w&&this.im!==void 0&&!this.Zk&&this.A.get("keepHeight")&&this.vS!==void 0&&Math.abs(this.im-this.A.get("y"))>T){this.sM=Math.max(this.sM-V,0);X=this.A.get("y");var S=this.im-X;this.Ka.setY(X+Math.min(V*this.vS,Math.abs(S))*(S>0?1:-1));this.B.T.Qa()}this.qd!=w||!this.Ms||this.uh||this.Vi||(this.FG(),this.B.T.Qa());
this.ws.Asa()};m.prototype.PT=function(){this.Rla()};m.prototype.Rla=function(){var V=this.Ol!=0||this.Zk!=0||this.Nl!=0;this.Wo=this.Vo=this.Ol=this.Zk=this.Nl=0;var X=this.Ig[e.ua.Mp]?1:this.Ig[e.ua.Sp]?-1:0,S=this.Ig[e.ua.uo]?1:this.Ig[e.ua.qo]?-1:0,W=this.Ig[e.ua.Q]?1:this.Ig[e.ua.E]?-1:0,Z=this.Ig[e.ua.bk]?1:this.Ig[e.ua.Ji]?-1:0,ca=this.Ig[e.ua.fb]?1:this.Ig[e.ua.Db]?-1:0;if(Z||ca||X||S||W){var fa=this.rk?.2:1;X&&(this.Nl=-X*fa*this.A.get("translationSpeed"));W&&(this.Zk=-W*fa*this.A.get("translationSpeed"));
S&&(this.Ol=-S*fa*this.A.get("translationSpeed"));ca&&(this.Wo=-ca*fa*100*this.A.get("rotationSpeed"));Z&&(this.Vo=Z*fa*100*this.A.get("rotationSpeed"));this.FG();this.B.T.Qa();this.Hja();this.r0a();X=this.Ol!=0||this.Zk!=0||this.Nl!=0;!V&&X&&this.MU()}};m.prototype.u3=function(){this.zj=!0;this.qd==F||this.qd==C||n()<this.mya+500||(this.iI(t.Li),this.qd=w)};m.prototype.t3=function(V,X,S,W){if(this.zj&&!(this.qd==F||this.qd==C||n()<this.mya+500)){var Z=(V*V+X*X)/2500;Z=Z>1?1/Math.sqrt(Z):1;V*=Z;X*=
Z;Z=this.Y1a();this.qd!=Z?(this.qd=Z,this.qd==x?this.B9a(S,W):this.qd==y?this.zFa():this.qd==z?this.P9a():this.qd==D&&this.N9a()):this.qd!=w&&(this.qd==x?this.mab(V,X,S,W):this.qd==y?this.Qab(V,X):this.qd==z?this.Sab(V,X):this.qd==D&&this.Pab(V,X))}};m.prototype.RH=function(){this.m4(t.Li);this.zj=!1;this.qd!=w&&(this.qd=w,this.ik=null,this.xFa(),this.Hja(),this.Eza(),this.B.T.Qa())};m.prototype.v3=function(V){this.qd!=A?(this.qd=A,this.J9a()):this.Cab(V);this.Tha&&clearTimeout(this.Tha);this.Tha=
setTimeout(function(){this.Tha=null;this.qd==A&&(this.qd=w,this.Cv())}.bind(this),1E3)};m.prototype.zBa=function(V,X,S,W,Z,ca,fa,ja,ha,ka){this.qd!=F&&this.qd!=C?(V=Math.abs(ca-Z)>.05,S=h(ha,ka)>5,X=Math.abs(W-X)>.02*this.dH(),ha=Math.min(Math.abs(ha),180-Math.abs(ha),Math.abs(ka),180-Math.abs(ka))<10,fa=fa/this.Gy()<.2,(V||X)&&(ha||fa)?(this.qd=C,this.O9a()):!S&&!V||ha&&fa||(this.qd=F,this.Q9a())):this.qd==F?this.Tab(Z,ca,ha,ka):this.qd==C&&this.Rab(X,W,Z,ca)};m.prototype.oia=function(){this.ik=
null;this.qd==F&&this.xFa();this.qd=w;this.mya=n();this.Hja();this.Eza();this.B.T.Qa()};m.prototype.ZM=function(V,X){if(this.A.get("doubleClickAction")=="zoom"){var S=b.Sf(this.B),W=b.At(this.B);W&&S&&(ea.set(V,X),this.rT(ea),V=this.JS(ea,W),V.length!=0&&(this.Cv(),this.FG(),V=V[0].point,B.setFromMatrixPosition(W.matrixWorld),this.Vi=new u("quad_in_out",[new v("x",B.x,(V.x+B.x)*.5),new v("y",B.y,(V.y+B.y)*.5),new v("z",B.z,(V.z+B.z)*.5),new v("distance",0,0)],500)))}};m.prototype.Y1a=function(){return this.oT?
this.rk?y:x:this.CM()?this.rk?D:z:w};m.prototype.B9a=function(V,X){this.xN();this.FG();this.LXa(V,X);this.A.get("keepHeight")&&this.z5();this.B.T.Qa()};m.prototype.mab=function(V,X,S,W){var Z=b.At(this.B);Z&&(B.setFromMatrixPosition(Z.matrixWorld),this.ik?(H.set(S,W,0),this.rT(H),H.unproject(Z),V=this.ik.x-B.x,X=this.ik.z-B.z,Math.atan2(this.ik.y-B.y,Math.sqrt(X*X+V*V))*U>-2?(G.copy(this.ik).applyMatrix4(Z.matrixWorldInverse),N.copy(H).applyMatrix4(Z.matrixWorldInverse),V=G.z/N.z,E.copy(N).multiplyScalar(V).applyMatrix4(Z.matrixWorld).sub(this.ik),
E.y!=0&&this.Cv()):(V=(this.ik.y-B.y)/(H.y-B.y),E.copy(H).sub(B).multiplyScalar(V).add(B).sub(this.ik)),E.multiplyScalar(-1)):(Y.makeRotationFromEuler(ia.set(0,-this.A.get("yaw")*L,0,"YXZ")),aa.set(-V*this.A.get("translationSpeed")/this.Gy(),0,-X*this.A.get("translationSpeed")/this.Gy()).applyMatrix4(Y),E.copy(aa).multiplyScalar(this.xI*10)),this.Ka.setX(B.x+E.x),this.Ka.setY(B.y+E.y),this.Ka.setZ(B.z+E.z),this.bO(E.x,E.y,E.z,0,0),this.Ka.Xj(this.dn))};m.prototype.zFa=function(){this.xN();this.ik=
null;this.jda();this.Cv();this.B.T.Qa()};m.prototype.Qab=function(V,X){var S;S||(S=1);V=V*360/this.mS()*this.A.get("rotationSpeed");X=-X*180/this.dH()*this.A.get("rotationSpeed");this.Ka.rj(this.A.get("yaw")+V);this.Ka.$n(this.A.get("pitch")+X);this.Ka.Yn(this.Xia/S);this.bO(0,0,0,V,X);this.Ka.Xj(this.dn);this.B.T.Qa()};m.prototype.P9a=function(){this.zFa()};m.prototype.Sab=function(V,X){var S=b.At(this.B),W=this.A.get("distance")||this.gj||1;X=X*W*2*Math.tan(S.fov*L/2)/this.dH();X!=0&&this.Cv();
this.Ka.setY(this.A.get("y")+X);V=V*360/this.mS()*this.A.get("rotationSpeed");this.Ka.rj(this.A.get("yaw")+V);this.bO(0,X,0,V,0);this.Ka.Xj(this.dn)};m.prototype.N9a=function(){this.xN();this.FG();this.Cv();this.B.T.Qa()};m.prototype.Pab=function(V,X){V=-V*360/this.mS()*this.A.get("rotationSpeed");X=X*180/this.dH()*this.A.get("rotationSpeed");this.Ka.rj(this.A.get("yaw")+V);this.Ka.$n(this.A.get("pitch")+X);this.bO(0,0,0,V,X);this.Ka.Xj(this.dn);this.B.T.Qa()};m.prototype.J9a=function(){this.Cv();
this.xN();this.ik=null;this.FG();this.A.get("keepHeight")&&this.z5();this.B.T.Qa()};m.prototype.Cab=function(V){this.w8a(aa);aa.multiplyScalar(-V*this.A.get("translationSpeed")*(this.xI||1));this.gj&&this.Sva(this.gj+aa.y);this.Ka.setX(this.A.get("x")+aa.x);this.Ka.setY(this.A.get("y")+aa.y);this.Ka.setZ(this.A.get("z")+aa.z);this.Ka.Xj(this.wI)};m.prototype.Q9a=function(){this.xN();this.ik=null;this.jda();this.Cv();this.B.T.Qa();this.xv=void 0};m.prototype.Tab=function(V,X,S,W){this.xv!==void 0||
(this.xv=S);S=h(this.xv,W);this.xv=W;this.Ka.rj(this.A.get("yaw")+S);this.Ka.Yn(this.Xia*V/X);this.bO(0,0,0,S,0);this.Ka.Xj(this.dn);this.B.T.Qa()};m.prototype.O9a=function(){this.xN();this.ik=null;this.jda();this.Cv();this.B.T.Qa();this.r4=void 0};m.prototype.Rab=function(V,X,S,W){this.r4!==void 0||(this.r4=V);V=-(X-this.r4)*180/this.dH();this.r4=X;this.Ka.$n(this.A.get("pitch")+V);this.Ka.Yn(this.Xia*S/W);this.bO(0,0,0,0,V);this.Ka.Xj(this.dn);this.B.T.Qa()};m.prototype.LXa=function(V,X){var S=
b.Sf(this.B),W=b.At(this.B);this.ik=null;W&&S&&(ea.set(V,X),this.rT(ea),V=this.JS(ea,W),V.length&&(this.ik=V[0].point))};m.prototype.jda=function(){this.Ms=null;var V=b.Sf(this.B),X=b.At(this.B);X&&V&&(ea.set(0,0),V=this.JS(ea,X),V.length&&(this.Ms=V[0].point),this.Ms||(this.Ms=(new THREE.Vector3).setFromMatrixPosition(X.matrixWorld)),this.A.set("distance",B.setFromMatrixPosition(X.matrixWorld).distanceTo(this.Ms)),this.Xia=this.A.get("distance"),this.A.set("x",this.Ms.x),this.A.set("y",this.Ms.y),
this.A.set("z",this.Ms.z),this.A.set("easing",0))};m.prototype.FG=function(){this.Ms&&(this.Ms=null,B.setFromMatrixPosition(b.At(this.B).matrixWorld),this.A.set("distance",0),this.A.set("x",B.x),this.A.set("y",B.y),this.A.set("z",B.z),this.A.set("easing",0))};var w="none",x="dragging",y="rotating",z="rotating yaw dragging y",A="moving front",D="rotating around camera",F="rotating yaw gesture",C="rotating pitch gesture",B=new THREE.Vector3,H=new THREE.Vector3,E=new THREE.Vector3,G=new THREE.Vector3,
N=new THREE.Vector3;m.prototype.Oj=function(V){this.A!=V&&(this.A&&(this.Ka=null,R.forEach(function(X){this.A.h(k.L(X),this.YGa,this,!1)}.bind(this)),Q.forEach(function(X){this.A.h(k.L(X),this.$z,this,!1)}.bind(this)),K.forEach(function(X){this.A.h(k.L(X),this.dt,this,!1)}.bind(this)),this.A.set("userInteracting",!1)),this.A=V)&&(this.Ka=new p(this.A),R.forEach(function(X){this.A.bind(k.L(X),this.YGa,this,!1)}.bind(this)),Q.forEach(function(X){this.A.bind(k.L(X),this.$z,this,!1)}.bind(this)),K.forEach(function(X){this.A.bind(k.L(X),
this.dt,this,!1)}.bind(this)),this.$z(),this.dt(),this.A.set("userInteracting",!1))};m.prototype.$z=function(){if(this.B&&this.A){var V=this.B.O(c.ta,!0);V.translationX=this.A.get("x");var X=this.A.get("y")-V.translationY;Math.abs(X)>T&&(V.translationY=this.A.get("y"),this.qd!=w||this.Nl||this.Zk||this.Ol||this.Wo||this.Vo||this.Vi||this.uh||this.Cv());V.Ze=this.A.get("z");V.fd=-this.A.get("yaw");V.Yd=this.A.get("pitch");V.Xe=0;V.mf="YXZ";V.positionX=0;V.positionY=0;V.positionZ=this.A.get("distance");
V.easing=this.A.get("easing");(this.A.get("minHeight")!==void 0||this.A.get("keepHeight"))&&this.kHa()}};m.prototype.dt=function(){this.B&&this.A&&(this.B.O(c.PerspectiveCamera,!0).fov=this.A.get("fov"))};m.prototype.Uha=function(V,X,S,W,Z){var ca=this.B.getComponent(c.ta);ca&&(Y.makeRotationFromEuler(ia.set(0,ca.fd*L,0,ca.mf)),aa.set(V,X,S).applyMatrix4(Y).multiplyScalar(this.xI),this.gj!==void 0&&(this.gj+=aa.y,this.MU()),this.Ka.setX(this.A.get("x")+aa.x),this.Ka.setY(this.A.get("y")+aa.y),this.Ka.setZ(this.A.get("z")+
aa.z),this.Ka.rj(this.A.get("yaw")+W),this.Ka.$n(this.A.get("pitch")+Z),this.Ka.Xj(this.dn))};m.prototype.w8a=function(V){var X=this.B.getComponent(c.ta);X&&(Y.makeRotationFromEuler(ia.set(X.Yd*L,X.fd*L,X.Xe*L,X.mf)),V.set(0,0,1).applyMatrix4(Y))};m.prototype.xN=function(){this.AC=n();this.hk=1;this.sy=this.ty=this.vy=this.uy=this.qy=0;this.uh=this.rH=this.sH=this.tH=this.pH=this.oH=void 0};m.prototype.bO=function(V,X,S,W,Z){var ca=n();this.hk=ca-this.AC;this.AC=ca;this.sy=V;this.ty=X;this.vy=S;this.uy=
W;this.qy=Z};m.prototype.xFa=function(){this.hk&&(this.rH=this.sy/this.hk,this.sH=this.ty/this.hk,this.tH=this.vy/this.hk,this.pH=this.uy/this.hk,this.oH=this.qy/this.hk,this.uh=1)};m.prototype.YGa=function(){this.A.get("minHeight")!==void 0&&(this.gj===void 0&&this.z5(),this.gj!==void 0&&this.gj<this.A.get("minHeight")&&(this.gj=this.A.get("minHeight")),this.kHa())};m.prototype.Cv=function(){this.gj=this.im=void 0;this.NU&&(clearTimeout(this.NU),this.NU=null)};m.prototype.Eza=function(){this.sM=
2E3;this.vS=void 0;this.B.T.Qa()};m.prototype.r0a=function(){this.sM=0;this.vS=Infinity;this.B.T.Qa()};m.prototype.Hja=function(){this.ik||this.gj!==void 0||this.NU||(this.NU=setTimeout(function(){this.NU=null;this.z5()}.bind(this),0))};m.prototype.z5=function(){var V=this.kS();V!==void 0?this.Sva(V):this.MU()};m.prototype.Sva=function(V){var X=this.A.get("minHeight")||V;this.gj=Math.max(V,X);this.MU();this.im=this.A.get("y")+this.gj-V};m.prototype.MU=function(){if(this.gj)this.xI=Math.min(10,Math.max(this.gj||
0,.1));else{this.ls(aa);this.G1a(ba);var V=this.Lga(aa,ba);this.xI=V.length?aa.distanceTo(V[0].point):aa.y-(this.A.get("minY")||0)}this.xI=Math.max(Math.abs(this.xI||0),.1)};m.prototype.kHa=function(){this.lHa||this.gj===void 0||(this.lHa=setTimeout(function(){this.lHa=null;var V=this.kS();V!==void 0&&this.gj!==void 0&&(V=this.gj-V,this.vS=this.sM==0?Infinity:Math.abs(V/this.sM),this.im=this.A.get("y")+V,V!==0&&this.B.T.Qa())}.bind(this),0))};m.prototype.kS=function(){if(this.A)return this.ls(aa),
this.i2a(aa.x,aa.y,aa.z)};m.prototype.i2a=function(V,X,S){var W=this.Lga(aa.set(V,X,S),ba.set(0,-1,0));if(W.length>0)return W[0].distance;W=this.Lga(aa.set(V,X+1E3,S),ba.set(0,-1,0));if(W.length>0)return W[W.length-1].distance-1E3};m.prototype.Lga=function(V,X){da.ray.origin.copy(V);da.ray.direction.copy(X);return da.intersectObjects(this.fH(),!1)};m.prototype.JS=function(V,X){da.setFromCamera(V,X);return da.intersectObjects(this.fH(),!1)};m.prototype.fH=function(){var V=this.B&&b.Sf(this.B);if(!V)return[];
var X=[];V.traverse(function(S){S.isSprite||S.isLine||X.push(S)});return X};m.prototype.ls=function(V){V.set(0,0,0);this.A&&(V.applyMatrix4(Y.makeTranslation(0,0,this.A.get("distance"))),V.applyMatrix4(Y.makeRotationFromEuler(ia.set(this.A.get("pitch")*L,-this.A.get("yaw")*L,0*L,"YXZ"))),V.applyMatrix4(Y.makeTranslation(this.A.get("x"),this.A.get("y"),this.A.get("z"))))};m.prototype.G1a=function(V){this.A?(Y.makeRotationFromEuler(ia.set(this.A.get("pitch")*L,-this.A.get("yaw")*L,0,"YXZ")),V.set(0,
0,-1).applyMatrix4(Y)):V.set(0,0,-1)};var O=[e.ua.bk,e.ua.Ji,e.ua.fb,e.ua.Db,e.ua.Mp,e.ua.qo,e.ua.Sp,e.ua.uo,e.ua.Q,e.ua.E],R=["minHeight"],Q="minYaw maxYaw yaw minPitch maxPitch pitch minX maxX x minY maxY y minZ maxZ z distance easingSpeed".split(" "),K=["minFov","maxFov","fov"],L=Math.PI/180,U=180/Math.PI,T=1E-6,Y=new THREE.Matrix4,aa=new THREE.Vector3(0,0,0),ba=new THREE.Vector3(0,0,0),ea=new THREE.Vector2(0,0),ia=new THREE.Euler,da=new THREE.Raycaster;m.prototype.dispose=function(){this.FG();
this.Oj(null);this.hha();this.Qha();this.ws.ya()};m.Wa=function(V){V.N(c.Mr).manager=new m(V)};m.ya=function(V){var X=V.getComponent(c.Mr);X.manager.dispose();X.manager=null;V.ka(c.Mr)};m.update=function(V){V.getComponent(c.Mr).manager.update()};m.frame=function(V,X,S){V.getComponent(c.Mr).manager.frame(X,S)};return m});
define("tdv/player/view/webgl/system/cameraControls/OrbitBehaviour","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter tdv/player/view/webgl/system/cameraControls/PropertiesSetter tdv/player/view/webgl/system/util/mixin/KeyboardMixin tdv/player/view/webgl/system/util/mixin/MouseMixin tdv/view/constants/Cursor".split(" "),function(a){function m(B){this.B=
B;this.gha(D);this.Pha();this.ws=new d(B);this.jl=new THREE.Matrix4;this.wI=.05;this.dn=.25;this.Nl=this.Zk=this.Ol=this.Wo=this.Vo=0;this.rH=this.sH=this.tH=this.pH=this.oH=this.AC=this.hk=this.sy=this.ty=this.vy=this.uy=this.qy=void 0;this.Gga=1E3;this.nEa=720;this.hGa=4;this.aAa=720;this.iha=2;this.Ka=null;this.iI(q.IB);this.update()}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Key"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/cameraControls/CameraControlBehaviourMixin"),c=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),d=a("tdv/player/view/webgl/system/cameraControls/Object3DMovingSetter"),f=a("tdv/player/view/webgl/system/cameraControls/PropertiesSetter"),l=a("tdv/player/view/webgl/system/util/mixin/KeyboardMixin"),p=a("tdv/player/view/webgl/system/util/mixin/MouseMixin"),q=a("tdv/view/constants/Cursor");h.B6(m,[b,l,p]);m.prototype.update=function(){var B=this.B.getComponent(k.VF);
this.Oj(B&&B.properties);this.ws.cQ(B&&B.properties,"moving");var H=(!B.QO||!c.pP(this.B.T))&&B.enabled;this.Y4(B&&(H?B.Rf:null));this.XS(!!B&&H&&B.kE);H||this.RH();H&&B.kE||(this.Wo=this.Vo=this.Nl=this.Zk=this.Ol=0)};m.prototype.frame=function(B){this.uh&&(this.uh=Math.max(0,this.uh-B/this.Gga),this.Ka.setX(this.A.get("x")+this.rH*this.uh),this.Ka.setY(this.A.get("y")+this.sH*this.uh),this.Ka.setZ(this.A.get("z")+this.tH*this.uh),this.Ka.rj(this.A.get("yaw")+this.pH*this.uh),this.Ka.$n(this.A.get("pitch")+
this.oH*this.uh),this.B.T.Qa());if(this.Wo||this.Vo||this.Nl||this.Zk||this.Ol)B/=1E3,this.Uha(this.Nl*B,this.Zk*B,this.Ol*B,this.Wo*B,this.Vo*B);this.ws.Asa()};m.prototype.PT=function(){this.Rla()};m.prototype.Rla=function(){this.Wo=this.Vo=this.Ol=this.Zk=this.Nl=0;var B=this.Ig[g.ua.Mp]?1:this.Ig[g.ua.Sp]?-1:0,H=this.Ig[g.ua.uo]?1:this.Ig[g.ua.qo]?-1:0,E=this.Ig[g.ua.Q]?1:this.Ig[g.ua.E]?-1:0,G=this.Ig[g.ua.bk]?1:this.Ig[g.ua.Ji]?-1:0,N=this.Ig[g.ua.fb]?1:this.Ig[g.ua.Db]?-1:0;if(B||H||E||G||N){var O=
this.rk?.2:1;B&&(this.Nl=-B*O*this.iha*this.A.get("translationSpeed"));E&&(this.Zk=-E*O*this.iha*this.A.get("translationSpeed"));H&&(this.Ol=-H*O*this.iha*this.A.get("translationSpeed"));N&&(this.Wo=N*O*this.aAa*this.A.get("rotationSpeed"));G&&(this.Vo=-G*O*this.aAa*this.A.get("rotationSpeed"));this.B.T.Qa()}};m.prototype.u3=function(){this.iI(q.Li);this.zj=!0;this.AC=(new Date).getTime();this.hk=1;this.sy=this.ty=this.vy=this.uy=this.qy=0;this.uh=this.rH=this.sH=this.tH=this.pH=this.oH=void 0;this.B.T.Qa()};
m.prototype.t3=function(B,H){if(this.zj){var E=(B*B+H*H)/2500;E=E>1?1/Math.sqrt(E):1;B*=E;H*=E;E=(new Date).getTime();this.hk=E-this.AC;this.AC=E;this.sy=this.ty=this.vy=this.uy=this.qy=0;E=this.oT;this.rk&&(E=!E);E?(this.uy=+B*this.A.get("rotationSpeed")*this.nEa/this.Gy(),this.qy=-H*this.A.get("rotationSpeed")*this.nEa/this.Gy(),this.mEa(this.uy,this.qy)):(this.Fya(B*this.hGa/this.Gy(),H*this.hGa/this.Gy(),u),this.sy=u.x,this.ty=u.y,this.vy=u.z,this.pla(this.sy,this.ty,this.vy));this.Ka.Xj(this.dn)}};
m.prototype.Fya=function(B,H,E){var G=this.B.getComponent(k.ta);E.set(-B*this.A.get("translationSpeed"),+H*this.A.get("translationSpeed"),0*this.A.get("translationSpeed"));E.applyMatrix4(z.makeRotationFromEuler(y.set(G.Yd*r,G.fd*r,G.Xe*r,G.mf)));E.multiplyScalar(this.A.get("distance"))};m.prototype.RH=function(){this.m4(q.Li);this.zj&&(this.zj=!1,this.hk&&(this.rH=this.sy/this.hk,this.sH=this.ty/this.hk,this.tH=this.vy/this.hk,this.pH=this.uy/this.hk,this.oH=this.qy/this.hk,this.uh=1,this.Ka.Xj(this.dn)),
this.AC=void 0)};m.prototype.v3=function(B){this.Ka.Yn(this.A.get("distance")-B*this.A.get("distance")*this.A.get("translationSpeed"));this.Ka.Xj(this.wI)};m.prototype.ZM=function(B,H){if(this.A.get("doubleClickAction")=="center"){var E=e.Sf(this.B),G=e.At(this.B);G&&E&&(w.set(B,H),this.rT(w),B=this.JS(w,G),B.length!=0&&(B=B[0].point,H=u.setFromMatrixPosition(G.matrixWorld).sub(B),G=H.length(),x.setFromUnitVectors(v.set(0,0,1),H.normalize()),y.setFromQuaternion(x,"YXZ"),H=y.x*t,this.Ka.rj(-y.y*t),
this.Ka.$n(H),this.Ka.Yn(G),this.Ka.setX(B.x),this.Ka.setY(B.y),this.Ka.setZ(B.z),this.Ka.Xj(this.wI)))}};m.prototype.ABa=function(){this.Fza=this.A.get("distance");this.zj=!1};m.prototype.nia=function(B,H,E){this.Fya(B/this.Gy(),H/this.Gy(),u);this.pla(u.x,u.y,u.z);this.Ka.Yn(this.Fza/E);this.Ka.Xj(this.dn)};m.prototype.oia=function(){this.Fza=this.A.get("distance")};m.prototype.Uha=function(B,H,E,G,N){var O=this.B.getComponent(k.ta);O&&(z.makeRotationFromEuler(y.set(0,O.fd*r,0,O.mf)),u.set(B,H,
E).applyMatrix4(z).multiplyScalar(this.A.get("distance")),this.pla(u.x,u.y,u.z),this.mEa(G,N),this.Ka.Xj(this.dn))};m.prototype.pla=function(B,H,E){this.Ka.setX(this.A.get("x")+B);this.Ka.setY(this.A.get("y")+H);this.Ka.setZ(this.A.get("z")+E)};m.prototype.mEa=function(B,H){this.Ka.rj(this.A.get("yaw")+B);this.Ka.$n(this.A.get("pitch")+H)};m.prototype.Oj=function(B){this.A!=B&&(this.A&&(this.Ka=null,F.forEach(H=>{this.A.h(n.L(H),this.$z,this)}),C.forEach(H=>{this.A.h(n.L(H),this.dt,this)}),this.A.set("userInteracting",
!1)),this.A=B)&&(this.A.set("userInteracting",!1),this.Ka=new f(this.A),F.forEach(H=>{this.A.bind(n.L(H),this.$z,this)}),C.forEach(H=>{this.A.bind(n.L(H),this.dt,this)}),this.$z(),this.dt())};m.prototype.JS=function(B,H){A.setFromCamera(B,H);return A.intersectObjects(this.fH(),!1)};m.prototype.fH=function(){var B=this.B&&e.Sf(this.B);if(!B)return[];var H=[];B.traverse(function(E){E.isSprite||E.isLine||H.push(E)});return H};m.prototype.$z=function(){if(this.B&&this.A){var B=this.B.O(k.ta,!0);B.translationX=
this.A.get("x");B.translationY=this.A.get("y");B.Ze=this.A.get("z");B.fd=-this.A.get("yaw");B.Yd=this.A.get("pitch");B.Xe=0;B.mf="YXZ";B.positionX=0;B.positionY=0;B.positionZ=this.A.get("distance");B.easing=this.A.get("easing")}};m.prototype.dt=function(){this.B&&this.A&&(this.B.O(k.PerspectiveCamera,!0).fov=this.A.get("fov"))};var r=Math.PI/180,t=180/Math.PI,u=new THREE.Vector3(0,1,0),v=new THREE.Vector3(0,1,0),w=new THREE.Vector2(0,0),x=new THREE.Quaternion,y=new THREE.Euler,z=new THREE.Matrix4,
A=new THREE.Raycaster,D=[g.ua.bk,g.ua.Ji,g.ua.fb,g.ua.Db,g.ua.Mp,g.ua.qo,g.ua.Sp,g.ua.uo,g.ua.Q,g.ua.E],F="easing minYaw maxYaw yaw minPitch maxPitch pitch minDistance maxDistance distance minX maxX x minY maxY y minZ maxZ z".split(" "),C=["minFov","maxFov","fov"];m.prototype.dispose=function(){this.Oj(null);this.hha();this.Qha();this.ws.ya()};m.Wa=function(B){B.N(k.Sr).manager=new m(B)};m.ya=function(B){var H=B.getComponent(k.Sr);H.manager.dispose();H.manager=null;B.ka(k.Sr)};m.update=function(B){B.getComponent(k.Sr).manager.update()};
m.frame=function(B,H,E){B.getComponent(k.Sr).manager.frame(H,E)};return m});
define("tdv/player/view/webgl/system/cameraControls/TransitionBehaviour","require exports tdv/player/view/util/XR tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k){a=function(){function r(t){this.F=t;this.properties=this.F.getComponent(g.Jx).properties;this.nj()&&this.mcb();this.update()}r.prototype.update=function(){this.properties=this.F.getComponent(g.Jx).properties;this.nj()||this.CIa()};r.prototype.frame=function(){this.nj()?
this.lcb():this.CIa()};r.prototype.mcb=function(){this.qKa();var t=this.DLa();h.setPosition({x:t.x,y:t.y,z:t.z,yaw:this.properties.get("yaw")});this.MRa()};r.prototype.lcb=function(){this.qKa();var t=this.DLa();h.setPosition({x:t.x,y:t.y,z:t.z,yaw:void 0});this.MRa();this.properties.set("yaw",-c.setFromQuaternion(h.ug).y*e)};r.prototype.MRa=function(){h.setScale(this.F.getComponent(g.Jx).pf||1)};r.prototype.CIa=function(){var t=this.F.O(g.ta,!0);t.translationX=this.properties.get("x");t.translationY=
this.properties.get("y");t.Ze=this.properties.get("z");t.fd=-this.properties.get("yaw");t.Yd=this.properties.get("pitch");t.Xe=0;t.mf="YXZ";t.positionX=0;t.positionY=0;t.positionZ=this.properties.get("distance",0);t.easing=0;this.F.O(g.PerspectiveCamera,!0).fov=this.properties.get("fov")};r.prototype.qKa=function(){var t=n.Sf(this.F),u=this.F.getComponent(g.Sk);u=u&&u.camera;h.Mw!==u&&h.tra(h.Ag,t,u,h.TQ.Tba)};r.prototype.nj=function(){return this.F.getComponent(g.PerspectiveCamera).nj};r.prototype.DLa=
function(){var t=this.properties.get("x"),u=this.properties.get("y"),v=this.properties.get("z"),w=this.properties.get("pitch"),x=this.properties.get("yaw"),y=this.properties.get("distance");d.identity();d.multiply(f.makeTranslation(t,u,v));d.multiply(f.makeRotationFromEuler(c.set(w*b,-x*b,0,"YXZ")));d.multiply(f.makeTranslation(0,0,y));d.decompose(l,q,p);return l};r.Wa=function(t){t.N(g.Ku).manager=new r(t)};r.update=function(t){t.getComponent(g.Ku).manager.update()};r.frame=function(t,u,v){t.getComponent(g.Ku).manager.frame(u,
v)};r.ya=function(t){t.getComponent(g.Ku).manager=null;t.ka(g.Ku)};return r}();var e=180/Math.PI,b=Math.PI/180,c=new k.Euler,d=new k.Matrix4,f=new k.Matrix4,l=new k.Vector3,p=new k.Vector3,q=new k.Quaternion;return a});
define("tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR","tdv/player/view/webgl/components"],function(a,m,h,n,g){return function(){function k(e){this.locked=!0;this.Di=!1;this.F=e;n.M.bind(h.V,this.Ta,this,!0);this.update()}k.prototype.update=function(){var e=this.F.getComponent(g.eG);e=(e===null||e===void 0?void 0:e.locked)||!1;!e&&this.locked&&(this.Di=!0);this.locked=e;this.Di&&n.b$()};k.prototype.frame=function(){this.locked||
(this.Di=!1)};k.prototype.dispose=function(){n.M.h(h.V,this.Ta,this)};k.prototype.Ta=function(){this.F.O(g.Yp)};k.Wa=function(e){e.N(g.Yp).manager=new k(e)};k.update=function(e){e.getComponent(g.Yp).manager.update()};k.frame=function(e,b,c){e.getComponent(g.Yp).manager.frame(b,c)};k.ya=function(e){var b=e.getComponent(g.Yp);b.manager.dispose();b.manager=null;e.ka(g.Yp)};return k}()});
define("tdv/player/view/webgl/system/cameraControls/XRDragBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k,e){a=function(){function y(z){this.locked=!0;this.Di=!1;this.Nna=this.pm=this.Ae=null;this.g7=new e.Matrix4;this.kJ=new e.Vector3;this.RP=new Map;this.pf=1;this.eF=0;this.qu=!1;this.Jk=0;this.vk=null;this.FE=new e.Vector3;this.Hd=
new e.Vector3;this.X8=new e.Quaternion;this.yY=this.zY=this.AY=0;this.cA=new e.Box3(new e.Vector3(-Infinity,-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=z;this.Ck=this.Ck.bind(this);this.nt=new g(this.F);n.M.bind(h.V,this.Ta,this,!0);this.update()}y.prototype.update=function(){var z=this.F.getComponent(k.nL),A=(z===null||z===void 0?void 0:z.locked)||!1;!A&&this.locked&&(this.Di=!0);this.locked=A;this.pf=(z===null||z===void 0?void 0:z.pf)||1;this.Jk=z===null||z===void 0?void 0:
z.Jk;this.gF();this.properties=z.properties;this.locked||(n.setScale(this.pf),this.GW(),this.Ck());this.Di&&(b.setFromQuaternion(n.xl),n.setPosition({pitch:b.x*w,roll:b.z*w}),this.ZI())};y.prototype.frame=function(z){if(!this.locked){this.nu();this.JZ();this.ZI();if(!this.properties.get("controllingPosition")){this.Hd.copy(n.Ec);this.X8.copy(n.ug);var A;(A=this.yW())||(A=this.Rma(z));A||(A=this.zW(z));A&&(z={},n.Ec.equals(this.Hd)||(z.x=this.Hd.x,z.y=this.Hd.y,z.z=this.Hd.z),n.ug.equals(this.X8)||
(b.setFromQuaternion(this.X8,"YXZ"),z.yaw=-b.y*w,z.pitch=b.x*w,z.roll=b.z*w),n.setPosition(z))}this.YI();this.yO();this.Di=!1}};y.prototype.dispose=function(){n.M.h(h.V,this.Ta,this);this.properties.set("userInteracting",!1);this.gF();this.lf();this.kZ([])};y.prototype.gF=function(){y.NB.forEach(function(z){var A;(A=this.properties)===null||A===void 0||A.h(h.L(z),this.Ck,this)}.bind(this))};y.prototype.GW=function(){y.NB.forEach(function(z){var A;(A=this.properties)===null||A===void 0||A.bind(h.L(z),
this.Ck,this,!0)}.bind(this))};y.prototype.Ck=function(){this.cA.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.cA.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};y.prototype.ZI=function(){var z=this.properties.get("x"),A=this.properties.get("y"),D=this.properties.get("z"),F=this.properties.get("yaw"),C=this.properties.get("pitch"),B=this.properties.get("distance");
if(z!==this.FE.x||A!==this.FE.y||D!==this.FE.z||F!==this.AY||C!==this.zY||B!==this.yY)this.FE.set(z,A,D),l.identity(),l.multiply(p.makeTranslation(z,A,D)),l.multiply(p.makeRotationFromEuler(b.set(C*x,-F*x,0,"YXZ"))),l.multiply(p.makeTranslation(0,0,B)),l.decompose(d,c,f),b.setFromQuaternion(c,"YXZ"),n.setPosition({x:d.x,y:d.y,z:d.z,yaw:-b.y*w})};y.prototype.YI=function(){d.copy(n.Ec).sub(this.FE);var z=d.length();b.setFromQuaternion(c.setFromUnitVectors(u,d.multiplyScalar(1/z)),"YXZ");this.properties.set("x",
this.FE.x);this.properties.set("y",this.FE.y);this.properties.set("z",this.FE.z);this.properties.set("yaw",-b.y*w);this.properties.set("pitch",b.x*w);this.properties.set("roll",b.z*w);this.properties.set("distance",z)};y.prototype.yO=function(){this.AY=this.properties.get("yaw");this.zY=this.properties.get("pitch");this.yY=this.properties.get("distance")};y.prototype.nu=function(){this.kZ((y.lF.get(this.F.T)||[]).map(function(z){return z.getComponent(k.zc)}))};y.prototype.kZ=function(z){var A=[],
D=[];this.RP.forEach(function(F){z.indexOf(F)===-1&&A.push(F)}.bind(this));z.forEach(function(F){this.RP.has(F.M)||D.push(F)}.bind(this));this.pm&&z.indexOf(this.pm)===-1&&this.lf();A.forEach(function(F){this.BY(F.M);this.RP.delete(F.M)}.bind(this));D.forEach(function(F){this.wW(F.M);this.RP.set(F.M,F)}.bind(this));this.Ae=z.find(function(F){return F.Ug})||null};y.prototype.wW=function(z){z.bind(h.ma,this.Lt,this,!0);z.bind(h.Sa,this.$h,this,!0)};y.prototype.BY=function(z){z.h(h.ma,this.Lt,this);
z.h(h.Sa,this.$h,this)};y.prototype.Ta=function(){this.F.O(k.Zp)};y.prototype.Lt=function(z){this.properties.get("inMandatorySequence")||z.data.DX||z.data.type=="other"||this.properties.get("clickTranslationDisabled")||(z=this.RP.get(z.source),z=this.nt.JX(z),z.length!=0&&(this.vk=z[0].point))};y.prototype.$h=function(z){if(!this.properties.get("inMandatorySequence")&&!this.properties.get("mouseDisabled")){this.lf();z=z.source;var A=this.RP.get(z),D=this.nt.JX(A);D.length!=0&&(this.pm=A,this.Nna=
z,this.Nna.bind(h.$a,this.lf,this,!0),this.kJ.copy(D[0].point),this.g7.copy(this.pm.matrixWorld))}};y.prototype.lf=function(){this.pm&&(this.pm.M.h(h.$a,this.lf,this),this.pm=this.Nna=null)};y.prototype.yW=function(){if(!this.vk)return!1;this.Hd.copy(this.vk).sub(n.Ec).multiplyScalar(.5).add(n.Ec);this.vk=null;return!0};y.prototype.zW=function(z){return this.AW()?!0:this.BW(z)?!0:!1};y.prototype.AW=function(){if(!this.Ae)return!1;if(this.Ae.Qb.y===0&&this.Ae.Qb.x===0)return this.eF=Date.now(),this.qu=
!1;if(this.qu)return!0;var z=Math.sqrt(this.Ae.Qb.y*this.Ae.Qb.y+this.Ae.Qb.x*this.Ae.Qb.x)*this.properties.get("rotationSpeed",1),A=Math.atan2(-this.Ae.Qb.y,this.Ae.Qb.x),D=Math.abs(A)<Math.PI*.25;A=Math.abs(A)>Math.PI*.75;return this.Jk!==0&&z>.95&&(D||A)&&Date.now()-this.eF<100?(this.qu=!0,z=this.Jk*(A?-1:1),z=-b.setFromQuaternion(n.ug,"YXZ").y*w+z,n.setPosition({yaw:z}),!0):!1};y.prototype.BW=function(z){if(!this.Ae||this.Ae.Qb.y===0&&this.Ae.Qb.x===0)return!1;z=4E3/3600/this.pf*this.properties.get("translationSpeed",
1)*(this.Ae.gx?3:1)*z/1E3;var A=d.set(0,0,-1).applyQuaternion(n.ug),D=f.set(1,0,0).applyQuaternion(n.ug);A.normalize().multiplyScalar(-this.Ae.Qb.y*z);D.normalize().multiplyScalar(this.Ae.Qb.x*z);this.Hd.set(n.Ec.x+A.x+D.x,n.Ec.y+A.y+D.y,n.Ec.z+A.z+D.z);return!0};y.prototype.Rma=function(z){if(!this.pm)return!1;this.Sma(z);z=l.copy(this.g7);var A=p.copy(this.pm.matrixWorld),D=q.compose(n.Ec,n.ug,v);A=r.copy(D).invert().multiply(A);t.copy(z).multiply(A.invert()).decompose(this.Hd,this.X8,d);return!0};
y.prototype.Sma=function(z){if(!this.pm||this.pm.Qb.y===0&&this.pm.Qb.x===0)return!1;z=90*z/1E3*this.properties.get("rotationSpeed",1);var A=q.makeRotationFromQuaternion(c.setFromRotationMatrix(this.g7)),D=r.copy(A).invert(),F=p.identity();F.multiply(l.makeTranslation(this.kJ.x,this.kJ.y,this.kJ.z));F.multiply(A);F.multiply(l.makeRotationFromEuler(b.set(this.pm.Qb.y*z*x,this.pm.Qb.x*z*x,0,"YXZ")));F.multiply(D);F.multiply(l.makeTranslation(-this.kJ.x,-this.kJ.y,-this.kJ.z));this.g7.premultiply(F);
return!0};y.prototype.JZ=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.pm?this.properties.set("userInteracting",!0):this.vk?this.properties.set("userInteracting",!0):this.Ae&&this.Ae.pressed&&(this.Ae.Qb.y!==0||this.Ae.Qb.x!==0)?this.properties.set("userInteracting",!0):this.properties.set("userInteracting",!1)};y.rK=function(z,A){this.lF.set(z,A)};y.Wa=function(z){z.N(k.Zp).manager=new y(z)};y.update=function(z){z.getComponent(k.Zp).manager.update()};
y.frame=function(z,A,D){z.getComponent(k.Zp).manager.frame(A,D)};y.ya=function(z){var A=z.getComponent(k.Zp);A.manager.dispose();A.manager=null;z.ka(k.Zp)};y.lF=new Map;y.NB="minX maxX minY maxY minZ maxZ".split(" ");return y}();var b=new e.Euler(0,0,0,"YXZ"),c=new e.Quaternion,d=new e.Vector3,f=new e.Vector3,l=new e.Matrix4,p=new e.Matrix4,q=new e.Matrix4,r=new e.Matrix4,t=new e.Matrix4,u=new e.Vector3(0,0,1),v=new e.Vector3(1,1,1),w=180/Math.PI,x=Math.PI/180;return a});
define("tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k,e){a=function(){function x(y){this.locked=!0;this.Di=!1;this.pj=this.JY=this.Ae=null;this.Jpa=new e.Matrix4;this.ZJ=[];this.pf=1;this.eF=0;this.qu=!1;this.Jk=0;this.vk=null;this.Rsa=!1;this.Hd=new e.Vector3;this.yY=this.zY=this.AY=
this.RPa=this.QPa=this.PPa=0;this.cA=new e.Box3(new e.Vector3(-Infinity,-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=y;this.Ck=this.Ck.bind(this);this.nt=new g(this.F);n.M.bind(h.V,this.Ta,this,!0);this.update()}x.prototype.update=function(){var y=this.F.getComponent(k.oL),z=(y===null||y===void 0?void 0:y.locked)||!1;!z&&this.locked&&(this.Di=!0);this.locked=z;this.pf=(y===null||y===void 0?void 0:y.pf)||1;this.Jk=y===null||y===void 0?void 0:y.Jk;this.gF();this.properties=
y.properties;this.locked||(n.setScale(this.pf),this.GW(),this.Ck());this.Di&&(b.setFromQuaternion(n.xl),n.setPosition({pitch:b.x*v,roll:b.z*v}),this.ZI(!0))};x.prototype.frame=function(y){if(!this.locked){this.nu();this.JZ();this.ZI(!1);if(!this.properties.get("controllingPosition")){this.Hd.copy(n.Ec);var z=this.wE=-b.setFromQuaternion(n.ug).y*v;var A=this.yW();this.Rsa&&this.pj&&this.Jpa.copy(this.pj.matrixWorld);this.Rsa=!1;A||(A=this.Rsa=this.Sma(y));A||(A=this.Rma(y));A||(A=this.zW(y));A&&(y=
{},n.Ec.equals(this.Hd)||(y.x=this.Hd.x,y.y=this.Hd.y,y.z=this.Hd.z),this.wE!=z&&(y.yaw=this.wE),n.setPosition(y))}this.YI();this.yO();this.Di=!1}};x.prototype.dispose=function(){n.M.h(h.V,this.Ta,this);this.properties.set("userInteracting",!1);this.gF();this.lf();this.kZ([])};x.prototype.gF=function(){x.NB.forEach(function(y){var z;(z=this.properties)===null||z===void 0||z.h(h.L(y),this.Ck,this)}.bind(this))};x.prototype.GW=function(){x.NB.forEach(function(y){var z;(z=this.properties)===null||z===
void 0||z.bind(h.L(y),this.Ck,this,!0)}.bind(this))};x.prototype.Ck=function(){this.cA.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.cA.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};x.prototype.ZI=function(y){var z=this.properties.get("x"),A=this.properties.get("y"),D=this.properties.get("z"),F=this.properties.get("controllingPosition"),C=this.properties.get("yaw"),
B=this.properties.get("pitch"),H=this.properties.get("distance");if(z!==this.PPa||A!==this.QPa||D!==this.RPa||C!==this.AY||B!==this.zY||H!==this.yY)l.identity(),l.multiply(p.makeTranslation(z,A,D)),l.multiply(p.makeRotationFromEuler(b.set(B*w,-C*w,0,"YXZ"))),l.multiply(p.makeTranslation(0,0,H)),l.decompose(d,c,f),b.setFromQuaternion(c,"YXZ"),n.setPosition({x:d.x,y:d.y,z:d.z,yaw:!y||F?void 0:-b.y*v})};x.prototype.YI=function(){this.properties.set("x",n.Ec.x);this.properties.set("y",n.Ec.y);this.properties.set("z",
n.Ec.z);b.setFromQuaternion(n.ug);this.properties.set("yaw",-b.y*v);this.properties.set("pitch",b.x*v);this.properties.set("roll",b.z*v);this.properties.set("distance",0)};x.prototype.yO=function(){this.PPa=this.properties.get("x");this.QPa=this.properties.get("y");this.RPa=this.properties.get("z");this.AY=this.properties.get("yaw");this.zY=this.properties.get("pitch");this.yY=this.properties.get("distance")};x.prototype.nu=function(){this.kZ((x.lF.get(this.F.T)||[]).map(function(y){return y.getComponent(k.zc)}))};
x.prototype.kZ=function(y){var z=[],A=[];this.ZJ.forEach(function(D){y.indexOf(D)===-1&&z.push(D)}.bind(this));y.forEach(function(D){this.ZJ.indexOf(D)===-1&&A.push(D)}.bind(this));this.pj&&y.indexOf(this.pj)===-1&&this.lf();z.forEach(function(D){this.BY(D);this.ZJ.splice(this.ZJ.indexOf(D),1)}.bind(this));A.forEach(function(D){this.wW(D);this.ZJ.push(D)}.bind(this));this.Ae=y.find(function(D){return D.Ug})||null;this.JY=y.find(function(D){return!D.Ug})||this.Ae};x.prototype.wW=function(y){y.M.bind(h.Sa,
this.$h,this,!0);y.M.bind(h.ma,this.Lt,this,!0)};x.prototype.BY=function(y){y.M.h(h.Sa,this.$h,this);y.M.h(h.ma,this.Lt,this)};x.prototype.Ta=function(){this.F.O(k.$p)};x.prototype.Lt=function(y){if(!(this.properties.get("inMandatorySequence")||y.data.DX||y.data.type=="other"||this.properties.get("clickTranslationDisabled"))){var z=this.ZJ.find(function(A){return y.source===A.M});z&&(z=this.nt.JX(z),z.length!=0&&(this.vk=z[0].point))}};x.prototype.$h=function(y){if(!this.properties.get("inMandatorySequence")&&
!this.properties.get("mouseDisabled")){this.lf();var z=this.ZJ.find(function(A){return y.source===A.M});z&&(this.pj=z,this.pj.M.bind(h.$a,this.lf,this,!0),this.Jpa.copy(this.pj.matrixWorld),z=this.nt.JX(z),z.length!=0&&(this.KA=(new e.Vector3).copy(z[0].point)))}};x.prototype.lf=function(){this.pj&&(this.pj.M.h(h.$a,this.lf,this),this.KA=this.pj=null)};x.prototype.yW=function(){if(!this.vk)return!1;this.Hd.copy(this.vk).sub(n.Ec).multiplyScalar(.5).add(n.Ec);this.vk=null;return!0};x.prototype.zW=
function(y){return this.AW()?!0:this.BW(y)?!0:!1};x.prototype.AW=function(){var y=this.JY;if(!y)return!1;if(y.Qb.y===0&&y.Qb.x===0)return this.eF=Date.now(),this.qu=!1;if(this.qu)return!0;var z=Math.sqrt(y.Qb.y*y.Qb.y+y.Qb.x*y.Qb.x),A=Math.atan2(-y.Qb.y,y.Qb.x);y=Math.abs(A)<Math.PI*.25;A=Math.abs(A)>Math.PI*.75;return this.Jk!==0&&z>.95&&(y||A)&&Date.now()-this.eF<100?(this.qu=!0,this.wE+=this.Jk*(A?-1:1),!0):!1};x.prototype.BW=function(y){if(!this.Ae||this.Ae.Qb.y===0&&this.Ae.Qb.x===0)return!1;
y=this.TLa(this.Ae.gx)*y/1E3;this.Ae.matrixWorld.decompose(d,c,f);var z=d.set(0,0,-1).applyQuaternion(c),A=f.set(1,0,0).applyQuaternion(c);z.normalize().multiplyScalar(-this.Ae.Qb.y*y);A.normalize().multiplyScalar(this.Ae.Qb.x*y);this.Hd.set(n.Ec.x+z.x+A.x,n.Ec.y+z.y+A.y,n.Ec.z+z.z+A.z);return!0};x.prototype.Rma=function(){if(!this.pj)return!1;var y=this.kJa(l.copy(this.Jpa)),z=this.kJa(p.copy(this.pj.matrixWorld)),A=q.compose(n.Ec,n.ug,u);z=r.copy(A).invert().multiply(z);t.copy(y).multiply(z.invert()).decompose(this.Hd,
c,d);this.wE=-b.setFromQuaternion(c).y*v;return!0};x.prototype.kJa=function(y){return y.decompose(d,c,f).compose(d,c.identity(),f)};x.prototype.Sma=function(y){if(!this.pj||!this.KA||this.pj.Qb.y===0&&this.pj.Qb.x===0)return!1;y=this.TLa(this.pj.gx)*y/1E3/this.KA.distanceTo(n.Ec);var z=l.compose(n.Ec,n.ug,u),A=p.identity();A.multiply(q.makeTranslation(this.KA.x,this.KA.y,this.KA.z));A.multiply(q.makeRotationY(-this.wE*w));A.multiply(q.makeRotationFromEuler(b.set(this.pj.Qb.y*y,this.pj.Qb.x*y,0,"YXZ")));
A.multiply(q.makeRotationY(this.wE*w));A.multiply(q.makeTranslation(-this.KA.x,-this.KA.y,-this.KA.z));z.premultiply(A);z.decompose(this.Hd,c,d);this.wE=-b.setFromQuaternion(c).y*v;return!0};x.prototype.TLa=function(y){return 3E4/3600/this.pf*this.properties.get("translationSpeed",1)*(y?3:1)};x.prototype.JZ=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.pj?this.properties.set("userInteracting",!0):this.vk?this.properties.set("userInteracting",
!0):this.Ae&&this.Ae.pressed&&(this.Ae.Qb.y!==0||this.Ae.Qb.x!==0)?this.properties.set("userInteracting",!0):this.properties.set("userInteracting",!1)};x.rK=function(y,z){this.lF.set(y,z)};x.Wa=function(y){y.N(k.$p).manager=new x(y)};x.update=function(y){y.getComponent(k.$p).manager.update()};x.frame=function(y,z,A){y.getComponent(k.$p).manager.frame(z,A)};x.ya=function(y){var z=y.getComponent(k.$p);z.manager.dispose();z.manager=null;y.ka(k.$p)};x.lF=new Map;x.NB="minX maxX minY maxY minZ maxZ".split(" ");
return x}();var b=new e.Euler(0,0,0,"YXZ");new e.Euler(0,0,0,"YXZ");var c=new e.Quaternion,d=new e.Vector3,f=new e.Vector3,l=new e.Matrix4,p=new e.Matrix4,q=new e.Matrix4,r=new e.Matrix4,t=new e.Matrix4,u=new e.Vector3(1,1,1),v=180/Math.PI,w=Math.PI/180;return a});
define("tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour","require exports tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k,e){a=function(){function r(t){this.locked=!0;this.Di=!1;this.JY=this.pe=this.Ep=null;this.pf=1;this.eF=0;this.qu=!1;this.Jk=0;this.vk=null;this.Hd=new e.Vector3;this.cX=[];this.Vt=new e.Vector3;this.cA=new e.Box3(new e.Vector3(-Infinity,
-Infinity,-Infinity),new e.Vector3(Infinity,Infinity,Infinity));this.F=t;this.Ck=this.Ck.bind(this);this.nt=new g(this.F);n.M.bind(h.V,this.Ta,this,!0);this.update()}r.prototype.update=function(){var t=this.F.getComponent(k.pL),u=(t===null||t===void 0?void 0:t.locked)||!1;!u&&this.locked&&(this.Di=!0);this.locked=u;this.pf=(t===null||t===void 0?void 0:t.pf)||1;this.Jk=t===null||t===void 0?void 0:t.Jk;this.gF();this.properties=t.properties;this.locked||(n.setScale(this.pf),this.GW(),this.Ck());this.Di&&
(b.setFromQuaternion(n.xl),n.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:this.properties.get("yaw"),pitch:b.x*q,roll:b.z*q}))};r.prototype.gF=function(){r.NB.forEach(function(t){var u;(u=this.properties)===null||u===void 0||u.h(h.L(t),this.Ck,this)}.bind(this))};r.prototype.GW=function(){r.NB.forEach(function(t){var u;(u=this.properties)===null||u===void 0||u.bind(h.L(t),this.Ck,this,!0)}.bind(this))};r.prototype.Ck=function(){this.cA.min.set(this.properties.get("minX",
-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.cA.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.nu(),this.JZ(),this.ZI(),this.properties.get("controllingPosition")||(this.Hd.copy(n.Ec),this.yW()||this.zW(t),this.Hd.y=this.lIa(this.Vt.y,this.U7(this.Hd.x,this.Hd.y,this.Hd.z),t),this.Ydb()&&(this.Hd.copy(this.Vt),this.Hd.y=this.lIa(this.Vt.y,
this.U7(this.Hd.x,this.Hd.y,this.Hd.z),t)),this.cA.clampPoint(this.Hd,this.Hd),n.Ec.equals(this.Hd)||n.setPosition({x:this.Hd.x,y:this.Hd.y,z:this.Hd.z,Xa:void 0})),this.YI(),this.yO(),this.Ojb(),this.Di=!1)};r.prototype.Ojb=function(){this.nt.refresh();this.cX.forEach(function(t){t.y=NaN})};r.prototype.dispose=function(){n.M.h(h.V,this.Ta,this);this.properties.set("userInteracting",!1);this.gF()};r.prototype.ZI=function(){var t=this.properties.get("x"),u=this.properties.get("y"),v=this.properties.get("z");
if(this.Vt.x!==t||this.Vt.y!==u||this.Vt.z!==v)this.properties.get("controllingPosition")||(u=this.U7(t,u,v)),n.setPosition({x:t,y:u,z:v,yaw:void 0}),this.yO()};r.prototype.YI=function(){this.properties.set("x",n.Ec.x);this.properties.set("y",n.Ec.y);this.properties.set("z",n.Ec.z);b.setFromQuaternion(n.ug);this.properties.set("yaw",-b.y*q);this.properties.set("pitch",b.x*q);this.properties.set("roll",b.z*q)};r.prototype.yO=function(){this.Vt.copy(n.Ec);this.OPa=this.noa(this.Vt)};r.prototype.nu=
function(){var t=null,u=null;(r.lF.get(this.F.T)||[]).forEach(function(v){v=v.getComponent(k.zc);v.Ug?t=v:u=v});this.llb(t,u)};r.prototype.llb=function(t,u){this.Ep=t;this.JY=u;t=t?t.M:null;this.pe!==t&&(this.pe&&this.BY(this.pe),(this.pe=t)&&this.wW(this.pe))};r.prototype.wW=function(t){t.bind(h.ma,this.Lt,this,!0)};r.prototype.BY=function(t){t.h(h.ma,this.Lt,this)};r.prototype.Ta=function(){this.F.O(k.aq)};r.prototype.Lt=function(t){if(this.Ep&&this.properties&&!this.properties.get("inMandatorySequence")&&
!t.data.DX&&t.data.type!="other"&&!this.properties.get("clickTranslationDisabled")&&this.properties.get("doubleClickAction")=="translate"&&(t=this.nt.JX(this.Ep),t.length!=0)){var u=t[0];if(u.face&&u.face.normal){t=c.copy(n.Ec);var v=d.copy(u.point);u=f.copy(u.face.normal).transformDirection(u.object.matrixWorld);if(Math.abs(Math.acos(u.dot(p)))<Math.PI*.25)v.y+=this.G7();else{u=l.copy(v).sub(t);var w=u.length(),x=this.G7()*.5;if(w<x)return;v.sub(u.multiplyScalar(x/w))}v.y=this.U7(v.x,v.y,v.z);this.nt.AK(t,
v)||(this.vk=new e.Vector3(v.x,v.y,v.z))}}};r.prototype.yW=function(){if(!this.vk)return!1;this.Hd.copy(this.vk);this.vk=null;return!0};r.prototype.zW=function(t){return this.AW()?!0:this.BW(t)?!0:!1};r.prototype.AW=function(){var t=this.JY;if(!t)return!1;if(t.Qb.y===0&&t.Qb.x===0)return this.eF=Date.now(),this.qu=!1;if(this.qu)return!0;var u=Math.sqrt(t.Qb.y*t.Qb.y+t.Qb.x*t.Qb.x),v=Math.atan2(-t.Qb.y,t.Qb.x);t=Math.abs(v)<Math.PI*.25;v=Math.abs(v)>Math.PI*.75;return this.Jk!==0&&u>.95&&(t||v)&&Date.now()-
this.eF<100?(this.qu=!0,u=this.Jk*(v?-1:1),u=-b.setFromQuaternion(n.ug,"YXZ").y*q+u,n.setPosition({x:void 0,y:void 0,z:void 0,yaw:u}),!0):!1};r.prototype.BW=function(t){if(!this.Ep||this.Ep.Qb.y===0&&this.Ep.Qb.x===0)return!1;t=4E3/3600/this.pf*this.properties.get("translationSpeed",1)*(this.Ep.gx?3:1)*t/1E3;var u=c.set(0,0,-1).applyQuaternion(n.ug),v=d.crossVectors(u,p);u.y=0;v.y=0;u.normalize().multiplyScalar(-this.Ep.Qb.y*t);v.normalize().multiplyScalar(this.Ep.Qb.x*t);this.Hd.set(n.Ec.x+u.x+v.x,
n.Ec.y,n.Ec.z+u.z+v.z);return!0};r.prototype.JZ=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.vk?this.properties.set("userInteracting",!0):this.Ep&&this.Ep.pressed&&(this.Ep.Qb.y!==0||this.Ep.Qb.x!==0)?this.properties.set("userInteracting",!0):this.properties.set("userInteracting",!1)};r.prototype.Ydb=function(){if(!this.properties.get("collisionDetection"))return!1;var t=c,u=d;t.copy(this.Hd).sub(this.Vt);u.copy(this.Vt).add(t.setLength(t.length()+
.2/this.pf));if(this.nt.AK(this.Vt,u))return!0;t=this.properties.get("maxStepHeight");t===void 0&&(t=this.G7()*.25);u=this.noa(this.Hd);return this.OPa>-Infinity&&u>-Infinity&&this.OPa+t<u?!0:!1};r.prototype.lIa=function(t,u,v){var w=u-t,x=Math.abs(w);v=2/this.pf*(v/1E3);return v>x?u:t+w*v/x};r.prototype.U7=function(t,u,v){t=this.Di?-Infinity:this.noa(c.set(t,u,v));return t===-Infinity?u:t+this.G7()};r.prototype.noa=function(t){var u=this.cX.findIndex(function(w){return w.x==t.x&&w.z==t.z&&!isNaN(w.y)});
if(u!==-1)return this.cX[u].y;u=this.nt.XW(t);var v=this.cX.find(function(w){return isNaN(w.y)});v||this.cX.push(v=new e.Vector3);v.set(t.x,t.y-u,t.z);return v.y};r.prototype.G7=function(){return n.FO/this.pf};r.rK=function(t,u){this.lF.set(t,u)};r.Wa=function(t){t.N(k.aq).manager=new r(t)};r.update=function(t){t.getComponent(k.aq).manager.update()};r.frame=function(t,u,v){t.getComponent(k.aq).manager.frame(u,v)};r.ya=function(t){var u=t.getComponent(k.aq);u.manager.dispose();u.manager=null;t.ka(k.aq)};
r.lF=new Map;r.NB="minX maxX minY maxY minZ maxZ".split(" ");return r}();var b=new e.Euler(0,0,0,"YXZ"),c=new e.Vector3,d=new e.Vector3,f=new e.Vector3,l=new e.Vector3,p=new e.Vector3(0,1,0),q=180/Math.PI;return a});
define("tdv/player/view/webgl/system/cameraControls/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/cameraControls/ARBehaviour tdv/player/view/webgl/system/cameraControls/CollidableObjects tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour tdv/player/view/webgl/system/cameraControls/DraggingObserver tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour tdv/player/view/webgl/system/cameraControls/OrbitBehaviour tdv/player/view/webgl/system/cameraControls/TransitionBehaviour tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour tdv/player/view/webgl/system/cameraControls/XRDragBehaviour tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/cameraControls/ARBehaviour"),k=a("tdv/player/view/webgl/system/cameraControls/CollidableObjects"),e=a("tdv/player/view/webgl/system/cameraControls/CameraSequenceBehaviour"),b=a("tdv/player/view/webgl/system/cameraControls/DraggingObserver"),c=a("tdv/player/view/webgl/system/cameraControls/FirstPersonBehaviour"),d=a("tdv/player/view/webgl/system/cameraControls/FlyOverBehaviour"),
f=a("tdv/player/view/webgl/system/cameraControls/OrbitBehaviour"),l=a("tdv/player/view/webgl/system/cameraControls/TransitionBehaviour"),p=a("tdv/player/view/webgl/system/cameraControls/XRBasicBehaviour"),q=a("tdv/player/view/webgl/system/cameraControls/XRDragBehaviour"),r=a("tdv/player/view/webgl/system/cameraControls/XRFlyBehaviour"),t=a("tdv/player/view/webgl/system/cameraControls/XRTeleportBehaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(u,v){(this.Rpa.fe.length||
this.Rpa.Xg.length)&&k.blb(this.Rpa.v);this.TIa.v.length&&this.TIa.v.slice().forEach(e.Wa);this.Q6.Da.length&&this.Q6.Da.slice().forEach(e.update);this.Q6.v.length&&this.Q6.v.slice().forEach(function(w){e.frame(w,u,v)});this.UIa.v.length&&this.UIa.v.slice().forEach(e.ya);this.KKa.v.length&&this.KKa.v.slice().forEach(d.ya);this.LKa.v.length&&this.LKa.v.slice().forEach(d.ya);this.MKa.v.length&&this.MKa.v.slice().forEach(d.ya);this.BKa.v.length&&this.BKa.v.slice().forEach(c.ya);this.CKa.v.length&&this.CKa.v.slice().forEach(c.ya);
this.DKa.v.length&&this.DKa.v.slice().forEach(c.ya);this.$Oa.v.length&&this.$Oa.v.slice().forEach(f.ya);this.aPa.v.length&&this.aPa.v.slice().forEach(f.ya);this.bPa.v.length&&this.bPa.v.slice().forEach(f.ya);this.JTa.v.length&&this.JTa.v.slice().forEach(p.ya);this.KTa.v.length&&this.KTa.v.slice().forEach(p.ya);this.LTa.v.length&&this.LTa.v.slice().forEach(p.ya);this.oIa.v.length&&this.oIa.v.slice().forEach(g.ya);this.pIa.v.length&&this.pIa.v.slice().forEach(g.ya);this.qIa.v.length&&this.qIa.v.slice().forEach(g.ya);
this.JKa.v.length&&this.JKa.v.slice().forEach(d.Wa);this.dX.Da.length&&this.dX.Da.slice().forEach(d.update);this.dX.v.length&&this.dX.v.slice().forEach(function(w){d.frame(w,u,v)});this.AKa.v.length&&this.AKa.v.slice().forEach(c.Wa);this.bX.Da.length&&this.bX.Da.slice().forEach(c.update);this.bX.v.length&&this.bX.v.slice().forEach(function(w){c.frame(w,u,v)});this.ZOa.v.length&&this.ZOa.v.slice().forEach(f.Wa);this.pY.Da.length&&this.pY.Da.slice().forEach(f.update);this.pY.v.length&&this.pY.v.slice().forEach(function(w){f.frame(w,
u,v)});this.ITa.v.length&&this.ITa.v.slice().forEach(p.Wa);this.NZ.Da.length&&this.NZ.Da.slice().forEach(p.update);this.NZ.v.length&&this.NZ.v.slice().forEach(function(w){p.frame(w,u,v)});this.WTa.v.length&&this.WTa.v.slice().forEach(t.ya);this.XTa.v.length&&this.XTa.v.slice().forEach(t.ya);this.YTa.v.length&&this.YTa.v.slice().forEach(t.ya);this.OTa.v.length&&this.OTa.v.slice().forEach(q.ya);this.PTa.v.length&&this.PTa.v.slice().forEach(q.ya);this.QTa.v.length&&this.QTa.v.slice().forEach(q.ya);this.STa.v.length&&
this.STa.v.slice().forEach(r.ya);this.TTa.v.length&&this.TTa.v.slice().forEach(r.ya);this.UTa.v.length&&this.UTa.v.slice().forEach(r.ya);this.OSa.v.length&&this.OSa.v.slice().forEach(l.ya);this.PSa.v.length&&this.PSa.v.slice().forEach(l.ya);this.nIa.v.length&&this.nIa.v.slice().forEach(g.Wa);this.C6.Da.length&&this.C6.Da.slice().forEach(g.update);this.C6.v.length&&this.C6.v.slice().forEach(function(w){g.frame(w,u,v)});t.rK(this.T,this.Wj.v.slice());this.VTa.v.length&&this.VTa.v.slice().forEach(t.Wa);
this.QZ.Da.length&&this.QZ.Da.slice().forEach(t.update);this.QZ.v.length&&this.QZ.v.slice().forEach(function(w){t.frame(w,u,v)});q.rK(this.T,this.Wj.v.slice());this.NTa.v.length&&this.NTa.v.slice().forEach(q.Wa);this.OZ.Da.length&&this.OZ.Da.slice().forEach(q.update);this.OZ.v.length&&this.OZ.v.slice().forEach(function(w){q.frame(w,u,v)});r.rK(this.T,this.Wj.v.slice());this.RTa.v.length&&this.RTa.v.slice().forEach(r.Wa);this.PZ.Da.length&&this.PZ.Da.slice().forEach(r.update);this.PZ.v.length&&this.PZ.v.slice().forEach(function(w){r.frame(w,
u,v)});this.NSa.v.length&&this.NSa.v.slice().forEach(l.Wa);this.oQ.Da.length&&this.oQ.Da.slice().forEach(l.update);this.oQ.fe.length&&this.oQ.fe.slice().forEach(l.update);this.oQ.v.length&&this.oQ.v.slice().forEach(function(w){l.frame(w,u,v)});if(this.oA.fe.length||this.oA.Xg.length)b.cra(this.oA.v),this.bX.v.slice().forEach(c.update),this.dX.v.slice().forEach(d.update),this.pY.v.slice().forEach(f.update),this.NZ.v.slice().forEach(p.update),this.OZ.v.slice().forEach(q.update),this.PZ.v.slice().forEach(r.update),
this.QZ.v.slice().forEach(t.update)};a.J={};a.J.Wj=[n.zc];a.J.oA=[n.Gm];a.J.Rpa=[n.TF];a.J.AKa=[n.NF,n.lg.aa,n.Wf.aa,n.Kr.aa];a.J.bX=[n.NF,n.lg.aa,n.Wf.aa,n.Kr];a.J.BKa=[n.NF.aa,n.Kr];a.J.CKa=[n.lg,n.Kr];a.J.DKa=[n.Wf,n.Kr];a.J.JKa=[n.OF,n.lg.aa,n.Wf.aa,n.Mr.aa];a.J.dX=[n.OF,n.lg.aa,n.Wf.aa,n.Mr];a.J.KKa=[n.OF.aa,n.Mr];a.J.LKa=[n.lg,n.Mr];a.J.MKa=[n.Wf,n.Mr];a.J.ZOa=[n.VF,n.lg.aa,n.Wf.aa,n.Sr.aa];a.J.pY=[n.VF,n.lg.aa,n.Wf.aa,n.Sr];a.J.$Oa=[n.VF.aa,n.Sr];a.J.aPa=[n.lg,n.Sr];a.J.bPa=[n.Wf,n.Sr];a.J.NSa=
[n.Jx,n.Sk,n.Ku.aa];a.J.oQ=[n.Jx,n.Sk,n.Ku];a.J.OSa=[n.Sk.aa,n.Ku];a.J.PSa=[n.Jx.aa,n.Ku];a.J.VTa=[n.lg,n.Wf.aa,n.pL,n.aq.aa];a.J.QZ=[n.lg,n.Wf.aa,n.pL,n.aq];a.J.WTa=[n.pL.aa,n.aq];a.J.XTa=[n.lg.aa,n.aq];a.J.YTa=[n.Wf,n.aq];a.J.ITa=[n.lg,n.Wf.aa,n.eG,n.Yp.aa];a.J.NZ=[n.lg,n.Wf.aa,n.eG,n.Yp];a.J.JTa=[n.eG.aa,n.Yp];a.J.KTa=[n.lg.aa,n.Yp];a.J.LTa=[n.Wf,n.Yp];a.J.NTa=[n.lg,n.Wf.aa,n.nL,n.Zp.aa];a.J.OZ=[n.lg,n.Wf.aa,n.nL,n.Zp];a.J.OTa=[n.nL.aa,n.Zp];a.J.PTa=[n.lg.aa,n.Zp];a.J.QTa=[n.Wf,n.Zp];a.J.RTa=[n.lg,
n.Wf.aa,n.oL,n.$p.aa];a.J.PZ=[n.lg,n.Wf.aa,n.oL,n.$p];a.J.STa=[n.oL.aa,n.$p];a.J.TTa=[n.lg.aa,n.$p];a.J.UTa=[n.Wf,n.$p];a.J.nIa=[n.Wf,n.lg.aa,n.vB,n.Br.aa];a.J.C6=[n.Wf,n.vB,n.Br];a.J.oIa=[n.vB.aa,n.Br];a.J.pIa=[n.Wf.aa,n.Br];a.J.qIa=[n.lg,n.Br];a.J.TIa=[n.SK,n.sx.aa];a.J.Q6=[n.SK,n.sx];a.J.UIa=[n.SK.aa,n.sx];return a});
define("tdv/player/view/webgl/system/cameraOffsetTransform/System","require exports three.mod tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k){a=function(q){function r(){var t=q.call(this)||this;t.eg=t.eg.bind(t);return t}P(r,q);r.prototype.Yc=function(){this.v.v.length&&this.v.v.slice().forEach(this.eg)};r.prototype.eg=function(t){var u=t.getComponent(n.Object3D);if(u&&u.sa&&u.sa.parent){u=u.sa;var v=t.getComponent(n.RK);
if(v.Ea){var w=v.Ea,x=w.getComponent(n.PerspectiveCamera);(w=w.getComponent(n.Object3D))&&w.sa&&(w=w.sa,w.updateMatrixWorld(!0),x.nj?(c.copy(k.Ec),l.copy(k.ug)):w.matrixWorld.decompose(c,l,f),v.rotate||l.identity(),e.copy(u.parent.matrixWorld).invert(),b.compose(c,l,f.set(1,1,1)).premultiply(e),b.decompose(c,l,f.set(1,1,1)),d.setFromQuaternion(l,"YXZ"),t=t.O(n.ta),t.translationX=c.x,t.translationY=c.y,t.Ze=c.z,t.Yd=0,t.fd=d.y*p,t.Xe=0)}}};r.J={};return r}(g);a.J={};a.J.v=[n.RK,n.Object3D,n.ta];var e=
new h.Matrix4,b=new h.Matrix4,c=new h.Vector3,d=new h.Euler,f=new h.Vector3,l=new h.Quaternion,p=180/Math.PI;return a});
define("tdv/player/view/webgl/system/canvasMaterial/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(g){this.B=g;this.uFa=this.Aa=null;this.Ha=this.Pa=void 0;this.update()}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){var g=this.B.getComponent(h.Kf),k=g.source&&g.source.width||0,e=g.source&&g.source.height||0;!this.Aa||!!this.Aa.isSpriteMaterial==
g.isSprite&&this.Pa==k&&this.Ha==e||(this.Aa.map.dispose(),this.Aa.dispose(),this.Aa=null);this.Pa=k;this.Ha=e;this.Aa||(g.isSprite?(this.Aa=new THREE.SpriteMaterial,this.Aa.sizeAttenuation=!1):this.Aa=new THREE.MeshBasicMaterial,this.Aa.map=new THREE.Texture,this.Aa.transparent=!0,this.B.N(h.Material).material=this.Aa);this.Aa.map.image!=g.source&&(this.Aa.map.image=g.source,this.Aa.map.needsUpdate=!0);this.uFa!=g.vK&&(this.uFa=g.vK,this.Aa.map.needsUpdate=!0);this.Aa.opacity=g.opacity||0;this.Aa.depthTest=
!!g.depthTest;this.Aa.visible=this.Aa.opacity>0&&!g.hidden;this.Aa.needsUpdate=!0;if(g.colorSpace)var b=g.colorSpace;else(g=n.Sf(this.B))&&(b=n.sX(g));this.Aa.map&&b&&(this.Aa.map.colorSpace=b);this.B.T.Qa()};m.prototype.dispose=function(){this.Aa&&(this.Aa.map.dispose(),this.Aa.map=null,this.Aa.dispose(),this.Aa=null,this.B.ka(h.Material));this.B=null};m.Wa=function(g){g.N(h.DB).manager=new m(g)};m.ya=function(g){var k=g.getComponent(h.DB);k.manager.dispose();k.manager=null;g.ka(h.DB)};m.update=
function(g){g.getComponent(h.DB).manager.update()};return m});
define("tdv/player/view/webgl/system/canvasMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/canvasMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/canvasMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.On.v.length&&this.On.v.slice().forEach(g.Wa);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya)};a.J={};a.J.On=[n.Kf,n.DB.aa];a.J.materials=[n.Kf,n.DB];a.J.Pn=[n.Kf.aa,n.DB];return a});
define("tdv/player/view/webgl/system/clippingRect/System",["require","exports","three.mod","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components"],function(a,m,h,n,g){var k=[new h.Vector3(1,0,0),new h.Vector3(-1,0,0),new h.Vector3(0,1,0),new h.Vector3(0,-1,0)];a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.Ca=c.Ca.bind(c);return c}P(b,e);b.prototype.Yc=function(){this.GE.v.length&&this.GE.v.slice().forEach(this.xb);this.planes.v.length&&this.planes.v.slice().forEach(this.ib);
this.sY.v.length&&this.sY.v.slice().forEach(this.Ca)};b.prototype.xb=function(c){c.N(g.EB).planes=[new h.Plane,new h.Plane,new h.Plane,new h.Plane];c.N(g.Object3D).sa=new h.Object3D;this.ib(c)};b.prototype.ib=function(c){var d=c.N(g.Object3D).sa;c=c.N(g.EB);c.planes[0].set(k[0],.5).applyMatrix4(d.matrixWorld);c.planes[1].set(k[1],.5).applyMatrix4(d.matrixWorld);c.planes[2].set(k[2],.5).applyMatrix4(d.matrixWorld);c.planes[3].set(k[3],.5).applyMatrix4(d.matrixWorld)};b.prototype.Ca=function(c){c.ka(g.EB);
c.ka(g.Object3D)};b.J={};return b}(n);a.J={};a.J.GE=[g.tF,g.EB.aa];a.J.planes=[g.tF,g.EB,g.ta,g.Object3D];a.J.sY=[g.tF.aa,g.EB];return a});
define("tdv/player/view/webgl/system/light/DirectionalLightHelper",["require","exports","three.mod","tdv/player/view/webgl/system/util/entity/Util"],function(a,m,h,n){a=function(){function d(f){this.light=f;f=new h.EdgesGeometry(new h.PlaneGeometry(2,2));var l=new h.LineBasicMaterial({color:16711680,linewidth:1,depthTest:!1,transparent:!0});this.oh=new h.LineSegments(f,l);f=(new h.BufferGeometry).setFromPoints([new h.Vector3,new h.Vector3]);l=new h.LineBasicMaterial({color:65280,depthTest:!1,transparent:!0});
this.line=new h.Line(f,l);this.light.add(this.oh);this.light.add(this.line)}d.prototype.update=function(){var f=this.Sf();this.oh.parent!=f&&(this.oh.parent&&(this.oh.parent.remove(this.oh),this.line.parent.remove(this.line)),f&&(f.add(this.oh),f.add(this.line)));if(f){this.oh.material.color!=this.light.color&&(this.oh.material.color=this.light.color,this.oh.material.needsUpdate=!0,this.line.material.color=this.light.color,this.line.material.needsUpdate=!0);this.light.updateMatrixWorld(!0);g.setFromMatrixPosition(this.light.matrixWorld);
this.light.target.updateMatrixWorld(!0);k.setFromMatrixPosition(this.light.target.matrixWorld);e.copy(k).sub(g).normalize();c.y=Math.atan2(e.x,e.z);c.x=-Math.atan2(e.y,Math.sqrt(e.x*e.x+e.z*e.z));c.z=0;c.order="YXZ";b.setFromEuler(c);f=n.dE(f);this.oh.quaternion.copy(b);var l=n.uJ(this.line)*f*2/7;e.setLength(l).multiplyScalar(-1);l=this.line.geometry.attributes.position;l.setXYZ(0,0,0,0);l.setXYZ(1,e.x,e.y,e.z);l.needsUpdate=!0;this.oh.position.copy(e);this.oh.updateMatrixWorld(!0);f=n.uJ(this.oh)*
f/7;this.oh.scale.set(f,f,f);this.oh.updateMatrixWorld(!0)}};d.prototype.dispose=function(){this.oh.geometry.dispose();this.oh.material.dispose();this.oh.parent&&this.oh.parent.remove(this.oh);this.line.geometry.dispose();this.line.material.dispose();this.line.parent&&this.line.parent.remove(this.line)};d.prototype.Sf=function(){for(var f=this.light.parent;f&&!f.isScene;)f=f.parent;return f};return d}();var g=new h.Vector3,k=new h.Vector3,e=new h.Vector3,b=new h.Quaternion,c=new h.Euler;return a});
define("tdv/player/view/webgl/system/light/DirectionalLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/light/DirectionalLightHelper".split(" "),function(a,m,h,n,g,k,e,b){function c(l,p){p.makeEmpty();var q=new h.Box3;l.traverse(function(r){if(r.geometry&&!r.isSprite&&!r.isLine){r.updateWorldMatrix(!1,!1);var t=r.geometry;t.boundingBox===null&&
t.computeBoundingBox();q.copy(t.boundingBox);q.applyMatrix4(r.matrixWorld);p.union(q)}});return p}a=function(l){function p(){var q=l.call(this)||this;q.xb=q.xb.bind(q);q.ib=q.ib.bind(q);q.eg=q.eg.bind(q);q.Ca=q.Ca.bind(q);return q}P(p,l);p.prototype.Yc=function(){this.mE.v.length&&this.mE.v.slice().forEach(this.xb);this.nE.v.length&&this.nE.v.slice().forEach(this.Ca);this.Ei.Da.length&&this.Ei.Da.slice().forEach(this.ib);this.Ei.v.length&&this.Ei.v.slice().forEach(this.eg)};p.prototype.xb=function(q){var r=
q.N(g.Dr),t=q.N(g.Object3D);r.light=t.sa=new h.DirectionalLight;this.ib(q)};p.prototype.ib=function(q){var r=q.getComponent(g.DirectionalLight),t=q.getComponent(g.Dr),u=t.light;u.color=n.Ip(r.color).convertLinearToSRGB();u.intensity=r.intensity*Math.PI;u.visible=u.intensity>0;u.castShadow=u.intensity>0&&r.castShadow;var v=u.castShadow?r.Mra: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.Nra;u.shadow.bias=
r.Lra;r.VW!=!!t.zp&&(t=q.O(g.Dr),r.VW?t.zp=new b(u):(t.zp.dispose(),t.zp=null))};p.prototype.eg=function(q){this.Unb(q);this.ysa(q)};p.prototype.Unb=function(q){var r=q.getComponent(g.DirectionalLight);if((q=q.getComponent(g.Dr).light)&&q.castShadow){var t=e.Qc(r.target);if(t){var u=q.shadow.camera,v=c(t,d);t=Number.POSITIVE_INFINITY;for(var w=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,z=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,D=0;D<2;D++)for(var F=
0;F<2;F++)for(var C=0;C<2;C++)f.set(D==0?v.min.x:v.max.x,F==0?v.min.y:v.max.y,C==0?v.min.z:v.max.z).applyMatrix4(u.matrixWorldInverse),f.x<t&&(t=f.x),f.x>w&&(w=f.x),f.y>x&&(x=f.y),f.y<y&&(y=f.y),-f.z>A&&(A=-f.z),-f.z<z&&(z=-f.z);r=r.Zlb||0;v=(z+A)*.5;z+=(z-v)*r;A+=(A-v)*r;v=(t+w)*.5;t+=(t-v)*r;w+=(w-v)*r;v=(x+y)*.5;x+=(x-v)*r;y+=(y-v)*r;if(u.left!=t||u.right!=w||u.top!=x||u.bottom!=y||u.near!=z||u.far!=A)q.shadow.camera.left=t,q.shadow.camera.top=x,q.shadow.camera.right=w,q.shadow.camera.bottom=y,
q.shadow.camera.near=z,q.shadow.camera.far=A,q.shadow.camera.updateProjectionMatrix(),q.shadow.needsUpdate=!0}}};p.prototype.ysa=function(q){(q=(q=q.getComponent(g.Dr))&&q.zp)&&q.update()};p.prototype.Ca=function(q){var r=q.getComponent(g.Dr),t=r&&r.zp;t&&t.dispose();(r=r.light)&&r.parent&&r.parent.remove(r);q.ka(g.Dr);q.ka(g.Object3D)};p.J={};return p}(k);a.J={};a.J.mE=[g.DirectionalLight,g.Dr.aa];a.J.Ei=[g.DirectionalLight,g.Dr];a.J.nE=[g.DirectionalLight.aa,g.Dr];var d=new h.Box3,f=new h.Vector3;
return a});
define("tdv/player/view/webgl/system/dragging/Behaviour",["require","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util","tdv/view/constants/Cursor"],function(a){function m(x){this.Bh=x;this.Oe=this.Lo=null;this.SR=!1;this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util"),k=a("tdv/view/constants/Cursor");m.prototype.update=function(){var x=this.Bh.getComponent(n.zc);this.dV(x&&
x.enabled?x.WD:null);this.cV(x&&x.enabled?x.d7:null)};m.prototype.frame=function(){this.cg()};m.prototype.dV=function(x){this.Lo!=x&&(this.Lo&&this.Lo.h(h.gb,this.rg,this,!0),(this.Lo=x)&&this.Lo.bind(h.gb,this.rg,this,!0))};m.prototype.cV=function(x){this.Oe!=x&&(this.Oe&&this.SR&&this.Oe.pop(k.Li),(this.Oe=x)&&this.SR&&this.Oe.push(k.Li))};m.prototype.rg=function(){var x=v.get(this.Bh.T);x&&x.length!=0&&this.Bh.T.Qa()};m.prototype.cg=function(){var x=v.get(this.Bh.T),y=x&&x.length||0;this.MEa(y>
0);if(y!=0&&(y=this.Bh.getComponent(n.zc))){var z=g.Qc(this.Bh);z?(e.copy(y.origin).applyMatrix4(z.matrixWorld),b.copy(y.origin).add(y.direction).applyMatrix4(z.matrixWorld).sub(e).normalize()):(e.copy(y.origin),b.copy(y.direction).normalize());for(y=0;y<x.length;y++){z=x[y];var A=z.getComponent(n.ux),D=z.getComponent(n.FB),F=w.get(z);F&&A&&D&&(D.eKa||(D.eKa=(new THREE.Vector3).setFromMatrixPosition(F.matrixWorld)),c.copy(D.eKa),d.copy(A.direction),this.$1a(c,d,e,b,f),D.Mna||(D.Mna=(new THREE.Vector3).copy(f).sub(c)),
f.sub(D.Mna),A.min&&l.copy(f).sub(A.min).dot(A.direction)<0&&f.copy(A.min),f.applyMatrix4(p.copy(F.parent.matrixWorld).invert()),z=z.O(n.ta),q.multiply(p.makeTranslation(z.translationX,z.translationY,z.Ze).invert()),q.multiply(p.makeRotationFromEuler(r.set(z.Yd*u,z.fd*u,z.Xe*u,z.mf)).invert()),f.applyMatrix4(p),z.positionX=f.x,z.positionY=f.y,z.positionZ=f.z)}}};m.prototype.MEa=function(x){this.SR!=x&&(this.SR=x,this.Oe&&(this.SR?this.Oe.push(k.Li):this.Oe.pop(k.Li)))};m.prototype.$1a=function(x,
y,z,A,D){t.copy(x).sub(z);z=y.dot(A);var F=A.dot(A),C=y.dot(y);A=t.dot(A);var B=t.dot(y);D.copy(x);x=z*z-F*C;x!=0&&D.addScaledVector(y,(F*B-A*z)/x)};var e=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Vector3,f=new THREE.Vector3,l=new THREE.Vector3,p=new THREE.Matrix4,q=new THREE.Matrix4,r=new THREE.Euler,t=new THREE.Vector3,u=Math.PI/180;m.prototype.dispose=function(){this.MEa(!1);this.dV(null);this.cV(null);this.B=null};m.Gra=function(x){x.N(n.Fx).manager=new m(x)};m.csa=
function(x){var y=x.getComponent(n.Fx);y.manager.dispose();y.manager=null;x.ka(n.Fx)};m.nu=function(x){x.getComponent(n.Fx).manager.update()};m.frame=function(x){x.getComponent(n.Fx).manager.frame()};var v=new Map,w=new Map;m.Olb=function(x){x.N(n.FB);x.N(n.Gm);m.GK(x)};m.GK=function(x){var y=g.Qc(x);w.set(x,y);var z=v.get(x.T);z||v.set(x.T,z=[]);y&&z.indexOf(x)<0&&z.push(x)};m.sSa=function(x){var y=v.get(x.T),z=y.indexOf(x);z>=0&&y.splice(z,1);w["delete"](x);x.ka(n.FB);x.ka(n.Gm)};return m});
define("tdv/player/view/webgl/system/dragging/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/dragging/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/dragging/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.tY.v.length&&this.tY.v.slice().forEach(g.Gra);this.Wj.Da.length&&
this.Wj.Da.slice().forEach(g.nu);this.Wj.v.length&&this.Wj.v.slice().forEach(g.frame);this.uY.v.length&&this.uY.v.slice().forEach(g.csa);this.dKa.v.length&&this.dKa.v.slice().forEach(g.Olb);this.cKa.v.length&&this.cKa.v.slice().forEach(g.GK);this.fKa.v.length&&this.fKa.v.slice().forEach(g.sSa);this.gKa.v.length&&this.gKa.v.slice().forEach(g.sSa)};a.J={};a.J.tY=[n.zc,n.Fx.aa];a.J.Wj=[n.zc,n.Fx];a.J.uY=[n.zc.aa,n.Fx];a.J.dKa=[n.Object3D,n.ux,n.FB.aa];a.J.cKa=[n.Object3D,n.ux,n.FB];a.J.fKa=[n.Object3D.aa,
n.FB];a.J.gKa=[n.ux.aa,n.FB];return a});
define("tdv/player/view/webgl/system/floor/System","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System".split(" "),function(a,m,h,n,g,k){a=function(c){function d(){var f=c.call(this)||this;f.xb=f.xb.bind(f);f.ib=f.ib.bind(f);f.Ca=f.Ca.bind(f);f.eg=f.eg.bind(f);return f}P(d,c);d.prototype.Yc=function(){this.HKa.v.length&&this.HKa.v.slice().forEach(this.xb);this.IKa.v.length&&this.IKa.v.slice().forEach(this.Ca);this.t7.Da.length&&this.t7.Da.slice().forEach(this.ib);
this.t7.v.length&&this.t7.v.slice().forEach(this.eg)};d.prototype.xb=function(f){var l=f.N(g.yx),p=f.N(g.Object3D);l.floor=p.sa=this.tdb();this.io(f,!0)};d.prototype.ib=function(f){this.io(f)};d.prototype.Ca=function(f){var l=f.getComponent(g.yx).floor;l.parent&&l.parent.remove(l);l.geometry.dispose();l.material.dispose();f.ka(g.yx);f.ka(g.Object3D)};d.prototype.eg=function(f){this.xkb(f)};d.prototype.xkb=function(f){var l=f.getComponent(g.Lr),p=(f=(f=f.getComponent(g.yx))&&f.floor)&&f.parent&&f.parent.matrixWorld;
if(p){b.setFromMatrixScale(p);var q=Math.max(Math.abs(b.x),Math.abs(b.y),Math.abs(b.z));f.matrix.identity();f.matrix.multiply(e.makeScale(l.radius/q,l.radius/q,l.radius/q));f.matrix.multiply(e.extractRotation(p).invert());f.matrix.multiply(e.makeTranslation(0,l.height/l.radius,0));f.matrix.multiply(e.makeRotationX(-Math.PI*.5));f.updateMatrixWorld(!0)}};d.prototype.tdb=function(){var f=new h.CircleGeometry(1,128);f=new h.Mesh(f);f.receiveShadow=!0;f.needsUpdate=!0;f.matrixAutoUpdate=!1;f.castShadow=
!1;return f};d.prototype.io=function(f,l){l===void 0&&(l=!1);var p=f.getComponent(g.Lr);f=f.getComponent(g.yx).floor;var q=p.color=="transparent",r=f.material&&f.material.isShadowMaterial||!1;f.material&&(l||r!=q)&&(f.material.dispose(),f.material=null);q?f.material||(f.material=new h.ShadowMaterial):(f.material||(f.material=new h.MeshStandardMaterial,f.material.defines.USE_UV="",f.material.onBeforeCompile=function(t){var u=t.fragmentShader.lastIndexOf("}");t.fragmentShader=t.fragmentShader.substring(0,
u)+"float uvCenterCoef = 2.0 * length(vUv - 0.5);\nfloat uvAlphaCoef = 1.0 - smoothstep(0.97, 1.0, uvCenterCoef);\ngl_FragColor.a = uvAlphaCoef * gl_FragColor.a;\n"+t.fragmentShader.substring(u,t.fragmentShader.length)},f.material.roughness=1,f.material.metalness=0,f.material.envMapIntensity=0,f.material.transparent=!0),f.material.color=n.Ip(p.color));f.material.needsUpdate=!0;f.material.opacity=p.opacity;f.renderOrder=p.renderOrder};d.J={};return d}(k);a.J={};a.J.HKa=[g.Lr,g.yx.aa];a.J.t7=[g.Lr,
g.yx];a.J.IKa=[g.Lr.aa,g.yx];var e=new h.Matrix4,b=new h.Vector3;return a});
define("tdv/player/view/webgl/system/floorTransform/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(w){this.B=w;this.nja=!1}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){this.nja=!1};m.prototype.frame=function(){this.cg()};m.prototype.cg=function(){if(!this.nja&&(this.Bb=this.Bb||n.Sf(this.B))){var w=n.Qc(this.B),x=w&&w.parent;if(x&&x.matrixWorld){var y=
[];this.Bb.traverse(function(F){F.isSprite||F.isLine||F==w||y.push(F)});var z=this.B.O(h.zx);f.set(z.x,z.y,z.z).applyMatrix4(x.matrixWorld);d.ray.origin.set(f.x,f.y,f.z);d.ray.direction.set(0,-1,0);var A=d.intersectObjects(y,!1);if(A.length!=0){var D=A[0];e.copy(x.matrixWorld).invert();A=this.B.O(h.ta,!0);b.setFromMatrixPosition(x.matrixWorld);g.copy(D.object.matrixWorld);c.setFromMatrixPosition(g);k.copy(g).invert();!z.HX&&D.face&&D.face.normal?q.copy(D.face.normal).applyMatrix4(g).sub(c).add(b):
q.copy(b).add(r);q.applyMatrix4(e).normalize();u.setFromUnitVectors(p,q);t.setFromQuaternion(u,A.mf);A.Yd=t.x*v;A.fd=t.y*v;A.Xe=t.z*v;f.copy(D.point).applyMatrix4(e);A.translationX=f.x;A.translationY=f.y;A.Ze=f.z;l.setFromMatrixScale(e);x=Math.max(l.x,l.y,l.z);A.positionX=0;A.positionY=0;A.positionZ=x*z.distance;this.nja=!0}}}};m.prototype.dispose=function(){};var g=new THREE.Matrix4,k=new THREE.Matrix4,e=new THREE.Matrix4,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Raycaster,f=new THREE.Vector3,
l=new THREE.Vector3;new THREE.Matrix4;new THREE.Matrix4;var p=new THREE.Vector3(0,0,1),q=new THREE.Vector3,r=new THREE.Vector3(0,1,0),t=new THREE.Euler,u=new THREE.Quaternion,v=180/Math.PI;m.Wa=function(w){w.N(h.vu).manager=new m(w)};m.ya=function(w){var x=w.getComponent(h.vu);x.manager.dispose();x.manager=null;w.ka(h.vu)};m.frame=function(w){w.getComponent(h.vu).manager.frame()};m.update=function(w){w.getComponent(h.vu).manager.update()};return m});
define("tdv/player/view/webgl/system/floorTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/floorTransform/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/floorTransform/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.EKa.v.length&&this.EKa.v.slice().forEach(g.Wa);
this.s7.Da.length&&this.s7.v.slice().forEach(g.update);this.s7.v.length&&this.s7.v.slice().forEach(g.frame);this.FKa.v.length&&this.FKa.v.slice().forEach(g.ya);this.GKa.v.length&&this.GKa.v.slice().forEach(g.ya)};a.J={};a.J.EKa=[n.Object3D,n.zx,n.vu.aa];a.J.s7=[n.Object3D,n.zx,n.vu];a.J.FKa=[n.Object3D.aa,n.vu];a.J.GKa=[n.zx.aa,n.vu];return a});
define("tdv/player/view/webgl/system/group/Behaviour",["require","tdv/player/view/webgl/components"],function(a){var m=a("tdv/player/view/webgl/components");return{Wa:function(h){var n=h.N(m.ZK),g=h.N(m.Object3D);h.N(m.ta);h=h.O(m.Group);g.sa=n.group=h.group=new THREE.Group},ya:function(h){h.getComponent(m.ZK).group=null;h.ka(m.ZK);h.ka(m.Object3D)}}});
define("tdv/player/view/webgl/system/group/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/group/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/group/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.eMa.v.length&&this.eMa.v.slice().forEach(g.Wa);this.fMa.v.length&&
this.fMa.v.slice().forEach(g.ya)};a.J={};a.J.eMa=[n.Group,n.ZK.aa];a.J.fMa=[n.Group.aa,n.ZK];return a});
define("tdv/player/view/webgl/system/grid/System","require tdv/utils tdv/player/view/util/Color tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components");a("tdv/player/view/webgl/system/util/entity/Util");a("tdv/player/view/webgl/system/util/material/Util");
a=m.extend(n,function(){n.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(){this.bMa.v.length&&this.bMa.v.slice().forEach(this.xb);this.aMa.Da.length&&this.aMa.Da.slice().forEach(this.ib);this.cMa.v.length&&this.cMa.v.slice().forEach(this.Ca)};a.prototype.xb=function(k){var e=k.getComponent(g.wu);e=new THREE.LineSegments(this.OO(e),this.rt(e));k.N(g.Object3D).sa=k.N(g.KB).grid=e};a.prototype.ib=function(k){var e=k.getComponent(g.wu);
k=k.getComponent(g.KB).grid;k.geometry=this.OO(e);k.material=this.rt(e)};a.prototype.Ca=function(k){var e=k.getComponent(g.KB).grid;e.material.dispose();e.geometry.dispose();k.ka(g.Object3D);k.ka(g.KB)};a.prototype.OO=function(k){h.Ip(k.bJa);h.Ip(k.$La);var e=k.size/k.Hna,b=k.size/2,c=[];for(let d=0,f=-b;d<=k.Hna;d++,f+=e)c.push(-b,0,f,b,0,f),c.push(f,0,-b,f,0,b);k=new THREE.BufferGeometry;k.setAttribute("position",new THREE.Float32BufferAttribute(c,3));k.setAttribute("color",new THREE.Float32BufferAttribute([],
3));return k};a.prototype.rt=function(k){var e=new THREE.LineBasicMaterial;e.depthTest=k.depthTest;e.toneMapped=!1;e.vertexColors=!0;return e};a.J={};a.J.bMa=[g.wu,g.KB.aa];a.J.aMa=[g.wu,g.KB];a.J.cMa=[g.wu.aa,g.KB];return a});
define("tdv/view/images/ImageAnimation","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Animation".split(" "),function(a){function m(f,l,p,q){this.FJ=f;this.src=f.src;this.d$=l;this.LW=p;this.frameCount=q;this.frameWidth=this.FJ.width/this.LW;this.frameHeight=this.FJ.height/this.d$}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState");a("tdv/events/Event");var k=a("tdv/events/EventDispatcher"),
e=a("tdv/view/util/Animation");a=h.extend(k,function(f,l,p,q,r,t,u){k.call(this);this.ks=r;this.mi=new m(f,l,p,r);this.cEa=t;this.fra(q);this.kfa=u;this.ja=document.createElement("canvas");this.ja.width=this.mi.frameWidth;this.ja.height=this.mi.frameHeight;this.ga=this.ja.getContext("2d");this.ga.globalCompositeOperation="copy";this.I=g.ca;this.C4=this.Ho=0;this.G0=void 0;this.Xi=b.request(this.mi);this.Xi.bind(n.V,this.Xk,this,!0);this.Xk()});a.prototype.fra=function(f){if(this.dh!==f){var l=this.LV;
this.dh=f;this.LV=this.dh*this.mi.frameCount;this.lfa=this.LV-this.dh*.1;l!==void 0&&(this.Ho=this.Ho/l*this.LV)}};a.prototype.$Qa=function(f){this.kfa!==f&&(this.kfa=f,this.Xk())};a.prototype.Zc=function(f){if(this.I!=f){if(f==g.Zb){if(this.I!=g.PLAYING)return}else f==g.PLAYING?this.I==g.ca&&(this.Ho=this.C4=0,this.Xk()):f!=g.ca||this.Ho==0&&this.C4!=0||(this.Ho=this.lfa,this.Xk());this.I=f;e.requestFrame(this.sq,this);this.o(n.Pd)}};a.prototype.getState=function(){return this.I};a.prototype.sq=
function(f){this.I==g.PLAYING&&(this.Ho=Math.min(this.Ho+f,this.Xi.Xi.length*this.dh),this.Ho>=this.LV&&(this.C4++,this.cEa&&this.C4==this.cEa?(this.Zc(g.ca),this.Ho=this.lfa,this.o(n.Tb)):(this.Ho%=this.LV,this.o(n.Ur))),this.Xk(),this.I==g.PLAYING&&e.requestFrame(this.sq,this))};a.prototype.clear=function(){this.Zc(g.ca);this.ja.width=this.ja.height=0;this.ja=null;b.release(this.mi);this.mi=null};a.prototype.If=function(){return this.ja};a.prototype.Xk=function(){var f=this.kfa&&this.Ho>=this.lfa?
0:Math.floor(this.Ho/this.dh);this.G0!=f&&f<this.Xi.Xi.length&&(this.G0=f,this.ga.drawImage(this.Xi.get(this.G0),0,0),this.o(n.V,{frameIndex:this.G0}))};m.prototype.isEqual=function(f){return this.src==f.src&&this.d$==f.d$&&(this.LW=f.LW)&&(this.frameWidth=f.frameWidth)&&(this.frameHeight=f.frameHeight)&&(this.frameCount=f.frameCount)};var b={al:[],NWa:2E3,request:function(f){f=this.Bj(f);f.Gk++;this.IFa(f);return f.frames},release:function(f){f=this.Bj(f);f.Gk--;f.Gk==0&&this.A9a(f)},Bj:function(f){for(var l=
0;l<this.al.length;l++)if(this.al[l].Ieb.isEqual(f))return this.al[l];l={};l.Ieb=f;l.frames=new c(f);l.Gk=0;this.al.push(l);return l},A9a:function(f){this.IFa(f);f.Ana=setTimeout(function(){b.K_a(f)},b.NWa)},IFa:function(f){f.Ana&&(clearTimeout(f.Ana),f.Ana=null)},K_a:function(f){this.al.splice(this.al.indexOf(f),1);f.frames.clear()}},c=h.extend(k,function(f){k.call(this);this.mi=f;this.Xi=[];d.add(this)});c.prototype.clear=function(){d.remove(this);this.Xi.forEach(function(f){f.width=0;f.height=
0});this.Xi=null};c.prototype.get=function(f){return this.Xi[f]};c.prototype.xeb=function(){var f=this.Xi.length%this.mi.LW,l=Math.floor(this.Xi.length/this.mi.LW)%this.mi.d$,p=document.createElement("canvas");p.width=this.mi.frameWidth;p.height=this.mi.frameHeight;var q=p.getContext("2d");q.globalCompositeOperation="copy";q.drawImage(this.mi.FJ,f*this.mi.frameWidth,l*this.mi.frameHeight,this.mi.frameWidth,this.mi.frameHeight,0,0,this.mi.frameWidth,this.mi.frameHeight);c.O0a(p);this.Xi.push(p);this.o(n.V)};
c.O0a=function(){var f=document.createElement("canvas");f.width=1;f.height=1;var l=f.getContext("2d");return function(p){l.drawImage(p,0,0,1,1,0,0,1,1)}}();var d={al:[],ila:null,add:function(f){this.al.push(f);this.tEa()},remove:function(f){this.al=this.al.filter(function(l){return l!=f})},tEa:function(){this.ila||(this.ila=setTimeout(function(){this.ila=null;this.kU()}.bind(this),40))},kU:function(){if(this.al.length!=0){for(var f=(new Date).getTime()+10;(new Date).getTime()<f;){var l=this.al.filter(function(p){return p.Xi.length==
0});l=l.length>0?l[0]:this.al[0];l.xeb();if(l.Xi.length==l.mi.frameCount&&(this.al.splice(this.al.indexOf(l),1),this.al.length==0))return}this.tEa()}}};return a});
define("tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(g,k){this.Qd=g;this.Hc=k;this.Ld=!1;this.Nca();this.Qca();this.PH()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.Ija();this.Nja();this.Qd.get("autoplay")||this.Qd.set("state",n.ca);this.Qd=null;this.Hc.Zc(n.ca);this.Hc=null};m.prototype.ig=function(g){this.Ld!=g&&(this.Ld=
g,this.Sv())};m.prototype.PH=function(){this.Hc.Zc(this.Qd.get("state"))};m.prototype.MT=function(){this.Sv()};m.prototype.OT=function(){this.Hc.fra(this.Qd.get("frameDuration"))};m.prototype.NT=function(){this.Hc.$Qa(this.Qd.get("finalFrame")=="first")};m.prototype.KT=function(){this.Qd.o(h.Ur)};m.prototype.JT=function(){this.Qd.o(h.Tb)};m.prototype.LT=function(){this.Qd.set("state",this.Hc.getState())};m.prototype.Sv=function(){this.Qd.get("autoplay")&&this.Hc.Zc(this.Ld?n.PLAYING:n.ca)};m.prototype.Nca=
function(){this.Qd.bind(h.L("state"),this.PH,this,!0);this.Qd.bind(h.L("autoplay"),this.MT,this,!0);this.Qd.bind(h.L("frameDuration"),this.OT,this,!0);this.Qd.bind(h.L("finalFrame"),this.NT,this,!0)};m.prototype.Ija=function(){this.Qd.h(h.L("state"),this.PH,this,!0);this.Qd.h(h.L("autoplay"),this.MT,this,!0);this.Qd.h(h.L("frameDuration"),this.OT,this,!0);this.Qd.h(h.L("finalFrame"),this.NT,this,!0)};m.prototype.Qca=function(){this.Hc.bind(h.Ur,this.KT,this,!0);this.Hc.bind(h.Tb,this.JT,this,!0);
this.Hc.bind(h.Pd,this.LT,this,!0)};m.prototype.Nja=function(){this.Hc.h(h.Ur,this.KT,this,!0);this.Hc.h(h.Tb,this.JT,this,!0);this.Hc.h(h.Pd,this.LT,this,!0)};return m});
define("tdv/player/view/webgl/system/imageMaterial/TextureController",["require","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/view/images/ImageAnimation","tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController"],function(a){function m(e,b,c,d){this.se=e;this.Id=b;this.Ma=c;this.Na=d.bind(this);n.Oa("AnimatedImageResource",this.se)?(this.Hc=new g(this.Id,this.se.get("rowCount",1),this.se.get("colCount",1),this.se.get("frameDuration"),this.se.get("frameCount",this.se.get("rowCount",
1)*this.se.get("colCount",1)),this.se.get("repeat"),this.se.get("finalFrame")=="first"),this.Ma.image=this.Hc.If(),this.Hc.bind(h.V,this.AS,this,!0),this.eq=new k(this.se,this.Hc)):this.Ma.image=this.Id;this.Ma.needsUpdate=!0;this.Na()}var h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/view/images/ImageAnimation"),k=a("tdv/player/view/webgl/system/imageMaterial/AnimationPlaybackController");m.prototype.ig=function(e){this.eq&&this.eq.ig(e)};m.prototype.dispose=function(){this.eq&&
(this.eq.clear(),this.eq=null);this.Hc&&(this.Hc.h(h.V,this.AS,this,!0),this.Hc.clear(),this.Hc=null);this.Ma=this.Id=this.se=null};m.prototype.AS=function(){this.Ma.needsUpdate=!0;this.Na()};return m});define("tdv/player/view/webgl/system/util/texture/Util",["require"],function(){var a={},m=null;a.aLa=function(){if(!m){var h=document.createElement("canvas");h.width=128;h.height=128;h.getContext("2d").clearRect(0,0,h.width,h.height);m=h}return m};return a});
define("tdv/view/util/Scale",["require","tdv/player/view/util/geo/Fov","tdv/view/constants/Alignment","tdv/view/constants/ScaleMode"],function(a){var m=a("tdv/player/view/util/geo/Fov"),h=a("tdv/view/constants/Alignment"),n=a("tdv/view/constants/ScaleMode"),g=180/Math.PI,k=Math.PI/180;return{H7:function(e,b,c,d,f,l,p){b||(b=e*d/c);f||(f=n.GB);var q={};switch(f){case n.GB:q.width=e;q.height=b;break;case n.NONE:q.width=c;q.height=d;break;case n.uj:q.width=Math.min(b*c/d,e);q.height=Math.min(e*d/c,b);
break;case n.Jr:q.width=Math.max(b*c/d,e);q.height=Math.max(e*d/c,b);break;case n.Tp:q.width=e;q.height=e*d/c;break;case n.Pk:q.width=b*c/d,q.height=b}q.width>e?(q.nB=e/q.width,q.BZ=l==h.fb?0:l==h.Db?1-q.nB:(1-q.nB)*.5,q.width=e):(q.BZ=0,q.nB=1);q.height>b?(q.qB=b/q.height,q.LZ=p==h.Tc?1-q.qB:p==h.Gc?0:(1-q.qB)*.5,q.height=b):(q.LZ=0,q.qB=1);return q},Boa:function(e,b,c,d,f,l,p,q){b||(b=m.um(e,c,d));f||(f=n.GB);l||(l=4096/360);var r={};switch(f){case n.GB:r.Wd=e;r.Mk=b;break;case n.NONE:r.Wd=2*Math.atan2(c*
.5,l*45)*g;r.Mk=m.um(r.Wd,c,d);break;case n.uj:r.Wd=Math.min(m.zr(b,c,d),e);r.Mk=Math.min(m.um(e,c,d),b);break;case n.Jr:r.Wd=Math.max(m.zr(b,c,d),e);r.Mk=Math.max(m.um(e,c,d),b);break;case n.Tp:r.Wd=e;r.Mk=m.um(e,c,d);break;case n.Pk:r.Wd=m.zr(b,c,d),r.Mk=b}r.Wd>e?(r.nB=Math.tan(e*.5*k)*c/Math.tan(r.Wd*.5*k)/c,r.BZ=p==h.fb?0:p==h.Db?1-r.nB:(1-r.nB)*.5,r.Wd=e):(r.BZ=0,r.nB=1);r.Mk>b?(r.qB=Math.tan(b*.5*k)*d/Math.tan(r.Mk*.5*k)/d,r.LZ=q==h.Tc?1-r.qB:q==h.Gc?0:(1-r.qB)*.5,r.Mk=b):(r.LZ=0,r.qB=1);return r}}});
define("tdv/player/view/webgl/system/imageMaterial/Behaviour","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/player/parser/ClassInfo tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/webgl/system/imageMaterial/TextureController tdv/player/view/webgl/system/util/texture/Util tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Scale".split(" "),function(a){function m(w){this.B=
w;this.vD=this.vD.bind(this);this.Na=this.Na.bind(this);this.Qj=this.Qj.bind(this);w=w.getComponent(l.Ni);this.Oh=w.Ap;this.Ee=w.M;this.se=this.A=null;this.Q3a=w.isSprite;this.ih=!1;this.Jo=this.hb=null;this.wy=0;this.Gka=this.zea=this.Of=this.X0=this.ha=void 0;this.rka(w.uw);this.Oj(w.properties)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),k=a("tdv/events/Event"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/view/image/Item"),c=a("tdv/player/view/image/Repository"),
d=a("tdv/player/view/webgl/system/imageMaterial/TextureController"),f=a("tdv/player/view/webgl/system/util/texture/Util"),l=a("tdv/player/view/webgl/components"),p=a("tdv/view/util/Ease"),q=a("tdv/view/util/EaseDimension"),r=a("tdv/view/util/Scale"),t=["height","scaleMode","width"],u=["levels.url","levels.width","levels.height"],v="depthTest enabled encoding hidden side opacity easeDuration".split(" ");m.prototype.frame=function(w){var x=this.B.getComponent(l.Ni);this.rka(x.uw);this.Oj(x.properties);
this.Jo&&(this.Jo.Nb(w),this.wy=this.Jo.ob("alpha"),this.Vla(),this.Jo.Ve()&&(this.Jo=null),this.B.T.Qa());this.hab();this.ih&&(this.ih=!1)};m.prototype.vD=function(){if(this.se&&this.A){var w=this.se&&this.se.get("levels")||[];w=w.filter(function(H){return!!H.get("url")});var x=1,y=1;e.Oa("AnimatedImageResource",this.se)&&(x=this.se.get("rowCount"),y=this.se.get("colCount"));var z=null;if(w.length>0){w.sort(function(H,E){return E.get("width")-H.get("width")});z=this.A.get("width");var A=this.A.get("height"),
D=this.A.get("scaleMode","fill"),F=w[0].get("width")/y,C=w[0].get("height")/x,B=r.H7(z,A,F,C,D);z=w.reduce(function(H,E){return!H||H.get("width")>E.get("width")&&E.get("width")/y>=B.width&&E.get("height")/x>=B.height?E:H})}this.eV(z)}};m.prototype.eV=function(w){this.hb!=w&&(this.hb&&(this.U_a(),this.Eea(),this.O0(),this.js(),this.ih=!1),this.hb=w)&&(this.ds(),this.ly(),this.JR(),this.ih=!1,this.Na())};m.prototype.JR=function(){this.de||(this.de=new b,this.de.fQ([this.hb.get("url")]),this.de.bind(n.ia,
this.Pe,this,!0),this.de.bind(n.yc,this.SBa,this,!0),this.de.bind(n.$c,this.yh,this,!0),this.yv=this.B.getComponent(l.Ni).priority||g.Hm,c.FA(this.de,this.yv))};m.prototype.js=function(){this.de&&(this.de.h(n.ia,this.Pe,this,!0),this.de.h(n.yc,this.SBa,this,!0),this.de.h(n.$c,this.yh,this,!0),c.ho(this.de,this.yv),this.de=null)};m.prototype.Pe=function(){this.C_a();this.tla(new k(n.ia))};m.prototype.SBa=function(w){this.tla(new k(n.yc,{percent:w.percent}))};m.prototype.yh=function(){this.tla(new k(n.$c))};
m.prototype.tla=function(w){this.Oh&&this.Oh.o(w)};m.prototype.Na=function(){this.ih||(this.ih=!0,this.B.T.Qa())};m.prototype.ds=function(){this.Ma=new THREE.Texture;this.Ma.image=f.aLa();this.Ma.generateMipmaps=!0;this.Ma.minFilter=THREE.LinearMipMapLinearFilter};m.prototype.O0=function(){this.Ma&&(this.Ma.dispose(),this.Ma=null)};m.prototype.ly=function(){this.Q3a?(this.Aa=new THREE.SpriteMaterial({map:this.Ma}),this.Aa.sizeAttenuation=!0):this.Aa=new THREE.MeshBasicMaterial({map:this.Ma});this.Aa.transparent=
!0;this.Aa.needsUpdate=!0;this.B.N(l.Material).material=this.Aa;this.Pva(0);this.B.O(l.gi,!0);this.B.O(l.Material,!0);this.Qj(!0)};m.prototype.Qj=function(w){var x=this.A.get("enabled")&&!this.A.get("hidden")&&!!this.Pq,y=this.ha!==x;if(y||w){this.ha=x;x=this.wy;var z=this.ha?1:0,A=this.A.get("hidden")?0:this.A.get("easeDuration",200);this.Jo=x!==z?new p("linear",[new q("alpha",x,z,void 0)],Math.abs(x-z)*A):null;this.Vla()}x=this.A.get("encoding");if(this.X0!==x||w)this.X0=x,this.Zab();x=this.A.get("depthTest");
if(this.zea!==x||w)this.zea=x,this.yab();x=this.A.get("opacity");if(this.Of!==x||w)this.Of=x,this.Vla();x=this.A.get("side");if(this.Gka!==x||w)this.Gka=x,this.zab();y&&this.Ee&&this.Ee.o(this.ha?n.od:n.jd)};m.prototype.hab=function(){if(this.Aa){var w=this.B.getComponent(l.Ni);w=(w=(w=w&&w.nJa)&&w.getComponent(l.EB))?w.planes:null;this.Aa.clippingPlanes!==w&&(this.Aa.clippingPlanes=w,this.Aa.needsUpdate=!0)}};m.prototype.Zab=function(){if(this.Aa&&(this.Aa.map||this.Aa.emissiveMap)){var w=this.X0==
"srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.Aa.map&&(this.Aa.map.colorSpace=w);this.Aa.emissiveMap&&(this.Aa.emissiveMap.colorSpace=w);this.Aa.needsUpdate=!0}this.B.O(l.gi,!0);this.Na()};m.prototype.yab=function(){this.Aa&&(this.Aa.depthTest=this.zea);this.B.O(l.gi,!0);this.Na()};m.prototype.Vla=function(){this.Aa&&this.Pva((this.Of||0)*this.wy);this.Pq&&this.Pq.ig(this.Of>0);this.Na()};m.prototype.Pva=function(w){this.Aa.opacity=w;this.Aa.visible=this.Aa.opacity>0;this.Aa.isShaderMaterial&&
this.Aa.uniforms.opacity&&(this.Aa.uniforms.opacity.value=w);this.B.O(l.gi,!0)};m.prototype.zab=function(){if(this.Aa)switch(this.Gka){case "back":this.Aa.side=THREE.BackSide;break;case "double":this.Aa.side=THREE.DoubleSide;break;default:this.Aa.side=THREE.FrontSide}this.B.O(l.gi,!0);this.Na()};m.prototype.Eea=function(){this.Aa&&(this.Aa.dispose(),this.Aa=null,this.B.ka(l.Material))};m.prototype.C_a=function(){this.Pq=new d(this.se,c.xg(this.hb.get("url")),this.Ma,this.Na);this.Qj(!0)};m.prototype.U_a=
function(){this.Pq&&(this.Pq.dispose(),this.Pq=null)};m.prototype.rka=function(w){this.se!=w&&(this.se&&h.da(this.se,u,this.vD),(this.se=w)&&h.ba(this.se,u,this.vD,!1),this.vD())};m.prototype.Oj=function(w){if(this.A!=w){this.A&&(h.da(this.A,t,this.vD),h.da(this.A,v,this.Qj));if(this.A=w)h.ba(this.A,t,this.vD,!1),h.ba(this.A,v,this.Qj,!1);this.vD()}};m.prototype.dispose=function(){this.eV(null);this.rka(null);this.Oj(null);this.B=this.Oh=null};m.Wa=function(w){w.N(l.MB).manager=new m(w)};m.ya=function(w){var x=
w.getComponent(l.MB);x.manager.dispose();x.manager=null;w.ka(l.MB)};m.frame=function(w,x){w.getComponent(l.MB).manager.frame(x)};return m});
define("tdv/player/view/webgl/system/imageMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/imageMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/imageMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(k,e){this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya);
this.On.v.length&&this.On.v.slice().forEach(g.Wa);this.materials.v.length&&this.materials.v.slice().forEach(function(b){g.frame(b,k,e)})};a.J={};a.J.On=[n.Ni,n.MB.aa];a.J.materials=[n.Ni,n.MB];a.J.Pn=[n.Ni.aa,n.MB];return a});
define("tdv/player/view/webgl/system/lineMaterial/Behaviour",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function m(g){this.B=g;this.Aa=null;this.update()}var h=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");m.prototype.update=function(){this.Aa||(this.Aa=new THREE.LineBasicMaterial,this.B.N(n.Material).material=this.Aa);var g=this.B.getComponent(n.ei);this.Aa.color=h.Ip(g.color||"#ffffff");this.Aa.lineWidth=g.width||1;this.Aa.opacity=
g.opacity||0;this.Aa.transparent=g.transparent;this.Aa.depthTest=!!g.depthTest;this.Aa.visible=this.Aa.opacity>0;this.Aa.needsUpdate=!0};m.prototype.dispose=function(){this.Aa&&(this.Aa.dispose(),this.Aa=null,this.B.ka(n.Material));this.B=null};m.Wa=function(g){g.N(n.OB).manager=new m(g)};m.ya=function(g){var k=g.getComponent(n.OB);k.manager.dispose();k.manager=null;g.ka(n.OB)};m.update=function(g){g.getComponent(n.OB).manager.update()};return m});
define("tdv/player/view/webgl/system/lineMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/lineMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/lineMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.On.v.length&&this.On.v.slice().forEach(g.Wa);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya)};a.J={};a.J.On=[n.ei,n.OB.aa];a.J.materials=[n.ei,n.OB];a.J.Pn=[n.ei.aa,n.OB];return a});
define("tdv/player/view/webgl/system/line/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components");a("tdv/player/view/webgl/system/util/entity/Util");var g=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(h,function(){h.apply(this,
arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(){this.uNa.v.length&&this.uNa.v.slice().forEach(this.xb);this.lines.Da.length&&this.lines.Da.slice().forEach(this.ib);this.vNa.v.length&&this.vNa.v.slice().forEach(this.Ca);this.wNa.v.length&&this.wNa.v.slice().forEach(this.Ca);this.xNa.v.length&&this.xNa.v.slice().forEach(this.Ca)};a.prototype.xb=function(k){k.N(n.Object3D).sa=new THREE.LineSegments;k.N(n.PB);k.N(n.ta);if(!k.getComponent(n.Geometry)){var e=
(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,1)]);e.userData.QMa=!0;k.N(n.Geometry).geometry=e}this.ib(k)};a.prototype.ib=function(k){var e=k.getComponent(n.Object3D).sa;g.ND(e,k.getComponent(n.Material).material);var b=k.getComponent(n.Geometry).geometry;e.geometry!=b&&(e.geometry&&b.userData.QMa&&e.geometry.dispose(),e.geometry=b,e.needsUpdate=!0);k=k.getComponent(n.Line).renderOrder||0;e.renderOrder!=k&&(e.renderOrder=k,e.needsUpdate=!0)};a.prototype.Ca=
function(k){k.ka(n.PB);k.ka(n.Geometry);var e=k.getComponent(n.Object3D);e&&(e=e.sa,e.geometry&&e.geometry.userData.QMa&&e.geometry.dispose(),e.geometry=null,g.ND(e,null),k.ka(n.Object3D))};a.J={};a.J.uNa=[n.Line,n.Material,n.PB.aa];a.J.lines=[n.Line,n.Geometry,n.Material,n.PB];a.J.vNa=[n.Line.aa,n.PB];a.J.wNa=[n.Material.aa,n.PB];a.J.xNa=[n.Geometry.aa,n.PB];return a});
define("tdv/player/view/webgl/system/lineToTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(h,function(){h.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.eg=this.eg.bind(this)});a.prototype.Yc=
function(){this.qNa.v.length&&this.qNa.v.slice().forEach(this.xb);this.pNa.v.length&&this.pNa.v.slice().forEach(this.eg);this.rNa.v.length&&this.rNa.v.slice().forEach(this.Ca);this.sNa.v.length&&this.sNa.v.slice().forEach(this.Ca);this.tNa.v.length&&this.tNa.v.slice().forEach(this.Ca)};a.prototype.xb=function(l){l.N(n.QB)};a.prototype.Ca=function(l){l.ka(n.QB)};var k=new THREE.Matrix4,e=new THREE.Quaternion,b=new THREE.Vector3,c=new THREE.Vector3(0,0,1),d=new THREE.Euler,f=180/Math.PI;a.prototype.eg=
function(l){var p=l.getComponent(n.ta);if(p){var q=g.Qc(l);if(q&&q.parent){var r=l.getComponent(n.yu),t=r.F;if(t){r=g.Qc(t);if(!r||!r.parent)return;b.setFromMatrixPosition(r.matrixWorld)}else if(r.position)b.copy(r.position);else return;k.copy(q.parent.matrixWorld).invert();b.applyMatrix4(k);b.x-=p.translationX;b.y-=p.translationY;b.z-=p.Ze;q=b.length();e.setFromUnitVectors(c,b.normalize());d.setFromQuaternion(e,p.mf);d.x*=f;d.y*=f;d.z*=f;if(p.scale!=q||p.Yd!=d.x||p.fd!=d.y||p.Xe!=d.z)p=l.O(n.ta),
p.scale=q,p.Yd=d.x,p.fd=d.y,p.Xe=d.z,g.eZ(l,p),l.T.Qa()}}};a.J={};a.J.qNa=[n.Object3D,n.yu,n.QB.aa];a.J.pNa=[n.Object3D,n.yu,n.QB,n.ta];a.J.rNa=[n.Object3D.aa,n.QB];a.J.sNa=[n.yu.aa,n.QB];a.J.tNa=[n.ta.aa,n.QB];return a});
define("tdv/player/view/webgl/system/objectTransform/System","require tdv/utils tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/ecs/System"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/util/entity/Util"),
b=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(g,function(){g.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.ib=this.ib.bind(this)});a.prototype.Yc=function(){this.hOa.v.length&&this.hOa.v.slice().forEach(this.xb);this.Spa.Da.length&&this.Spa.Da.slice().forEach(this.ib);this.iOa.v.length&&this.iOa.v.slice().forEach(this.Ca);this.jOa.v.length&&this.jOa.v.slice().forEach(this.Ca)};a.prototype.xb=function(c){c.N(k.RB);this.Spa.v.forEach(function(d){this.y3a(d,
c)&&this.s4(e.Qc(d))}.bind(this));this.ib(c)};a.prototype.ib=function(c){var d=c.getComponent(k.gi);if(c=e.Qc(c))this.dYa(c,d),this.s4(c),this.ye(c,d)};a.prototype.Ca=function(c){c.ka(k.RB);var d=e.Qc(c);d&&(this.uZa(d),this.s4(d),c.ka(k.RB))};a.prototype.dYa=function(c,d){c.userData.YOa=d.opacity;c.userData.xW=d.xW;c.userData.castShadow=d.castShadow;c.userData.receiveShadow=d.receiveShadow;c.userData.EW=d.EW};a.prototype.uZa=function(c){c.userData.YOa=void 0;c.userData.xW=void 0;c.userData.castShadow=
void 0;c.userData.receiveShadow=void 0;c.userData.EW=void 0};a.prototype.s4=function(c){if(n.Vh!=c&&!c.yw){var d=this.uya(c),f=this.k1a(c),l=this.m1a(c),p=this.n1a(c),q=this.l1a(c);if(c.material){if(d===void 0&&q!==!0)b.HY(c);else{var r=c.userData.Ot||c.material,t=b.w8(r),u=b.w8(c.material),v=r.opacity;r=r.transparent;q!==!0&&u&&!t?b.HY(c):q!==!0||u||b.DJa(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.Vna(c),c.material.opacity=
t,c.material.transparent=r,c.material.visible=u,c.material.needsUpdate=!0);b.nnb(c)}var w=this.a1a(f);(c.material.map==null?[]:Array.isArray(c.material.map)?c.material.map:[c.material.map]).forEach(function(x){x.anisotropy!==w&&(x.anisotropy=w,x.needsUpdate=!0)})}c.isMesh&&(l!==void 0&&c.castShadow!==l&&(c.castShadow=l),p!==void 0&&c.receiveShadow!==p&&(c.receiveShadow=p));c.children&&c.children.forEach(function(x){x.userData.$gb=d;x.userData.Xgb=f;x.userData.Zgb=l;x.userData.ahb=p;x.userData.Ygb=
q;this.s4(x)}.bind(this))}};a.prototype.a1a=function(c){return 1+Math.round((c||0)*(e.dLa().capabilities.getMaxAnisotropy()-1))};a.prototype.uya=function(c){var d=c.userData.YOa;c=c.userData.$gb;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.k1a=function(c){var d=c.userData.xW;if(d!==void 0)return d;c=c.userData.Xgb;if(c!==void 0)return c};a.prototype.m1a=function(c){var d=c.userData.castShadow;if(d!==void 0)return d;c=c.userData.Zgb;if(c!==void 0)return c};
a.prototype.n1a=function(c){var d=c.userData.receiveShadow;if(d!==void 0)return d;c=c.userData.ahb;if(c!==void 0)return c};a.prototype.l1a=function(c){var d=c.userData.EW;if(d!==void 0)return d;c=c.userData.Ygb;if(c!==void 0)return c};a.prototype.ye=function(c,d){var f=this.uya(c);f!==void 0&&(f=f>0,c.userData.mob!==f&&(c.userData.mob=f,d.M&&d.M.o(f?h.od:h.jd)))};a.prototype.y3a=function(c,d){c=e.Qc(c);d=e.Qc(d);if(!c||!d)return!1;for(d=d.parent;d;){if(d===c)return!0;d=d.parent}return!1};a.J={};a.J.hOa=
[k.gi,k.Object3D,k.RB.aa];a.J.Spa=[k.gi,k.Object3D,k.RB];a.J.iOa=[k.gi.aa,k.RB];a.J.jOa=[k.Object3D.aa,k.RB];return a});
define("tdv/player/view/webgl/system/materialVariant/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/material/Util"],function(a){function m(g){this.B=g;this.uma=this.Um=this.He=null;this.gO=-1}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/material/Util");m.prototype.frame=function(){if(!this.Um&&(this.Um=this.B.getComponent(h.Oi).Hoa)){var g=this.Um.userData&&this.Um.userData.gltfExtensions&&this.Um.userData.gltfExtensions.KHR_materials_variants;
this.uma=g&&g.variants||[];this.update()}};m.prototype.update=function(){if(this.uma){var g=this.B.getComponent(h.Bx).name,k=this.uma.findIndex(function(b){return b.name==g}),e=this.Um.scene;this.He!=e?(this.He&&this.hEa(this.He),this.He=e,this.gO=k,this.He&&this.kFa(this.He,this.gO)):this.gO!=k&&(this.gO=k,this.He&&this.kFa(this.He,this.gO));this.B.T.Qa()}};m.prototype.hEa=function(g){this.Tva(g,-1)};m.prototype.kFa=function(g,k){this.i4a(g,k,function(){this.He==g&&this.gO==k&&this.Tva(g,k)}.bind(this))};
m.prototype.i4a=function(g,k,e){var b=[];g.traverse(function(c){var d=c.isMesh&&c.userData.gltfExtensions&&c.userData.gltfExtensions.KHR_materials_variants;if(d=d&&d.mappings){c.userData.Sib||(c.userData.Sib=n.Efb(c));c.userData.jF||(c.userData.jF={});for(var f=null,l=d.length-1;l>=0&&!f;--l)d[l].variants.indexOf(k)!=-1&&(f=d[l]);f&&b.push(this.Um.parser.getDependency("material",f.material).then(function(p){c.userData.jF[k]||(c.userData.jF[k]=p)}))}}.bind(this));Promise.all(b).then(function(){e(g,
k)})};m.prototype.Tva=function(g,k){g.traverse(function(e){if(e.userData.jF){var b=e.userData.jF[k];b&&(n.ND(e,b),this.Um.parser.assignFinalMaterial(e),this.B.O(h.gi,!0))}}.bind(this));this.B.T.Qa()};m.prototype.dispose=function(){this.He&&(this.hEa(this.He),this.B.O(h.gi,!0),this.He=null)};m.Wa=function(g){g.N(h.Qr).manager=new m(g)};m.ya=function(g){var k=g.getComponent(h.Qr);k.manager.dispose();k.manager=null;g.ka(h.Qr)};m.update=function(g){g.getComponent(h.Qr).manager.update()};m.frame=function(g){g.getComponent(h.Qr).manager.frame()};
return m});
define("tdv/player/view/webgl/system/materialVariant/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/materialVariant/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/materialVariant/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.BNa.v.length&&this.BNa.v.slice().forEach(g.Wa);this.O8.v.length&&
this.O8.v.slice().forEach(g.frame);this.O8.Da.length&&this.O8.Da.slice().forEach(g.update);this.CNa.v.length&&this.CNa.v.slice().forEach(g.ya);this.DNa.v.length&&this.DNa.v.slice().forEach(g.ya);this.ENa.v.length&&this.ENa.v.slice().forEach(g.ya)};a.J={};a.J.BNa=[n.Bx,n.Oi,n.Object3D,n.Qr.aa];a.J.O8=[n.Bx,n.Oi,n.Object3D,n.Qr];a.J.CNa=[n.Bx.aa,n.Qr];a.J.DNa=[n.Object3D.aa,n.Qr];a.J.ENa=[n.Oi.aa,n.Qr];return a});
define("tdv/player/view/webgl/system/mesh/Behaviour",["require","tdv/player/view/webgl/components"],function(a){var m=a("tdv/player/view/webgl/components");return{Wa:function(h){var n=h.N(m.Au);h.N(m.ta);var g=h.O(m.Mesh);h.N(m.Object3D).sa=n.Ke=g.Ke=new THREE.Mesh(h.getComponent(m.Geometry).geometry,h.getComponent(m.Material).material);g.Ke.renderOrder=g.renderOrder},update:function(h){var n=h.O(m.Au);n.Ke.geometry=h.getComponent(m.Geometry).geometry;n.Ke.material=h.getComponent(m.Material).material;
n.Ke.renderOrder=h.getComponent(m.Mesh).renderOrder},ya:function(h){h.getComponent(m.Au).Ke=null;h.ka(m.Au);h.ka(m.Object3D)}}});
define("tdv/player/view/webgl/system/mesh/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/mesh/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/mesh/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.HNa.v.length&&this.HNa.v.slice().forEach(g.Wa);this.GNa.Da.length&&
this.GNa.Da.slice().forEach(g.update);this.T8.v.length&&this.T8.v.slice().forEach(g.ya);this.Uhb.v.length&&this.T8.v.slice().forEach(g.ya);this.Vhb.v.length&&this.T8.v.slice().forEach(g.ya)};a.J={};a.J.HNa=[n.Mesh,n.Geometry,n.Material,n.Au.aa];a.J.GNa=[n.Mesh,n.Geometry,n.Material,n.Au];a.J.T8=[n.Mesh.aa,n.Au];a.J.Uhb=[n.Geometry.aa,n.Au];a.J.Vhb=[n.Material.aa,n.Au];return a});
define("tdv/player/view/util/FileLoader",["require","exports","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/util/LoadQueue"],function(a,m,h,n,g){return function(k){function e(b,c){var d=k.call(this)||this;d.Dq=null;d.fwa=null;d.kC=!1;d.IM=null;d.Se=b;d.yv=c;d.rD=new Request(b);d.xV=d.xV.bind(d);d.wR=d.wR.bind(d);return d}P(e,k);e.prototype.start=function(){this.IM||(this.kC=!1,this.IM=g.add(this.Se,this.yv,this.xV,this.wR))};e.prototype.xV=function(){this.Se.indexOf("filesystem:")===
0?this.A0a():this.B0a()};e.prototype.A0a=function(){var b=this,c=new XMLHttpRequest;c.open("GET",this.Se,!0);c.responseType="arraybuffer";c.onload=function(){b.VBa(c.response);c.onload=c.onerror=null};c.onerror=function(){b.RBa();c.onload=c.onerror=null};c.send()};e.prototype.B0a=function(){var b=this;fetch(this.rD).then(function(c){function d(t){t===void 0&&(t=null);if(t=t||r)t.close(),r=null,b.Dq=null}function f(t){var u;return(u=b.Dq.read().then(function(v){var w=v===null||v===void 0?void 0:v.value;
w&&(q+=w.byteLength,t.enqueue(w));v&&v.done&&(p&&q<p?t.error("connection closed prematurely"):(p=q,d(t)));p!==void 0&&b.o(h.yc,{totalBytes:p,bytesLoaded:q,percent:q<p?100*q/p:100})}))===null||u===void 0?void 0:u.catch(function(v){console.log("Error reading response",v);t.error(v)})}if(b.kC)return c.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");if(!c.ok)return Promise.resolve(c);var l=c.headers.get("content-length")||c.headers.get("x-content-length"),p,q=0;l!==
null&&(p=parseInt(l,10));b.Dq=c.body.getReader();var r=null;return new Response(new ReadableStream({start:function(t){b.kC?t.close():r=t},pull:function(t){return f(t)},cancel:function(){return d()}}))}).then(function(c){return c.arrayBuffer()}).then(function(c){b.VBa(c)}).catch(function(){b.RBa()})};e.prototype.cancel=function(){this.IM&&(this.IM.cancel(),this.IM=null)};e.prototype.wR=function(){this.kC=!0;this.Dq&&(this.Dq.cancel(),this.Dq=null)};e.prototype.VBa=function(b){var c;this.fwa=b;(c=this.IM)===
null||c===void 0||c.loaded();this.o(h.ia,{buffer:b})};e.prototype.RBa=function(){this.cancel();this.o(h.$c)};e.prototype.getData=function(){return this.fwa};return e}(n)});
define("tdv/player/view/webgl/system/model/loaders/GLTFLoader","require exports three.mod tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/RaycastUtil tdv/player/view/webgl/system/util/Util tdv/player/view/util/Capabilities tdv/player/view/util/FileLoader tdv/player/view/util/Flags tdv/player/view/util/URL tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q){return function(r){function t(u){var v=
r.call(this)||this;v.type=t.TYPE;v.XJ=[];v.DE=[];v.zNa=0;v.F=u;v.dqa=v.dqa.bind(v);v.eqa=v.eqa.bind(v);v.kP=e.HRa(new h.GLTFLoader);return v}P(t,r);t.prototype.ooa=function(){return this.Um?this.Um.scene:null};t.prototype.start=function(u){this.url=u;this.GRa();this.xt.start()};t.prototype.update=function(){if(this.XJ.length!=0||this.DE.length!=0)if(c.Fhb())this.F.T.Qa();else{for(var u=Date.now()+8,v=this.F.getComponent(q.Oi).eb.Rc().Kn();this.DE.length>0&&Date.now()<u;){var w=this.DE.shift();v&&
v.initTexture(w)}for(;this.XJ.length>0&&Date.now()<u;)b.NPa(this.XJ.shift());this.XJ.length==0&&this.DE.length==0?this.WSa():this.F.T.Qa()}};t.prototype.dispose=function(){this.tSa()};t.prototype.GRa=function(){this.xt=new f(this.url,g.RF);this.Kbb()};t.prototype.tSa=function(){this.xt&&(this.wjb(),this.xt.cancel())};t.prototype.Kbb=function(){this.xt.bind(n.ia,this.NA,this,!0);this.xt.bind(n.yc,this.LP,this,!0);this.xt.bind(n.$c,this.KP,this,!0)};t.prototype.wjb=function(){this.xt.h(n.ia,this.NA,
this);this.xt.h(n.yc,this.LP,this);this.xt.h(n.$c,this.KP,this)};t.prototype.NA=function(){this.kP.parse(this.xt.getData(),p.getDirectory(this.url),this.dqa,this.eqa)};t.prototype.LP=function(u){this.o(n.yc,u.data)};t.prototype.KP=function(){this.zNa<2?(this.zNa++,this.tSa(),this.GRa(),this.xt.start()):this.o(n.$c)};t.prototype.eqa=function(u){l.uu&&u&&u.message&&console.error(u.message);this.o(n.$c)};t.prototype.dqa=function(u){this.kP&&(this.XJ=[],this.DE=[],u.scene.traverse(function(v){if(v.isMesh){var w=
v.material;w&&(d.LPa==1&&w.isMeshPhysicalMaterial&&(v.material=w=(new h.MeshStandardMaterial).copy(w)),w.depthWrite=!w.transparent,w=this.Afb(w),this.DE=this.DE.concat(w))}this.XJ.push(v)}.bind(this)),this.Um=u,this.XJ.length==0&&this.DE.length==0?this.WSa():this.F.T.Qa())};t.prototype.WSa=function(){this.o(n.INIT);this.o(n.ia)};t.prototype.Afb=function(u){var v=[];u.isMeshStandardMaterial?(u.alphaMap&&v.push(u.alphaMap),u.aoMap&&v.push(u.aoMap),u.bumpMap&&v.push(u.bumpMap),u.displacementMap&&v.push(u.displacementMap),
u.emissiveMap&&v.push(u.emissiveMap),u.envMap&&v.push(u.envMap),u.lightMap&&v.push(u.lightMap),u.map&&v.push(u.map),u.metalnessMap&&v.push(u.metalnessMap),u.normalMap&&v.push(u.normalMap),u.roughnessMap&&v.push(u.roughnessMap)):u.isMeshBasicMaterial&&(u.alphaMap&&v.push(u.alphaMap),u.envMap&&v.push(u.envMap),u.map&&v.push(u.map));return v};t.TYPE="gltf";return t}(k)});
define("tdv/player/view/webgl/system/model/loaders/GSLoader","require exports tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/util/LibsLoader".split(" "),function(a,m,h,n,g,k){return function(e){function b(c){var d=e.call(this)||this;d.type=b.TYPE;d.zk=null;d.fE=null;d.url="";d.UD=null;d.Jn=null;d.XI=null;d.wK=null;d.properties=c;d.NA=d.NA.bind(d);d.LP=d.LP.bind(d);d.KP=d.KP.bind(d);d.nY=d.nY.bind(d);return d}P(b,e);b.prototype.ooa=function(){return this.zk};
b.prototype.start=function(c){this.url=c;k.GS.oj()?this.hSa():k.GS.load(this.qib,this)};b.prototype.update=function(){(!this.fE||this.Jn&&this.Jn.state==TDV.GS.StateFx.PLAYING)&&this.o(h.V)};b.prototype.dispose=function(){this.XI&&(this.properties.h(h.L("antialiasingLevel"),this.Tpa,this),this.XI.dispose(),this.XI=null);this.wK&&(this.properties.h(h.L("sphericalHarmonicsMaxDegree"),this.hqa,this),this.wK.dispose(),this.wK=null);this.properties.h(h.L("displayEffect"),this.Wpa,this);this.fE&&(this.zk.remove(this.fE),
this.fE=null);this.zk&&(this.zk.removeEventListener("refresh",this.nY),this.zk.dispose(),this.zk=null);this.url=""};b.prototype.qib=function(){this.url&&this.hSa()};b.prototype.hSa=function(){this.zk=new TDV.GS.GaussianSplattingGroup;this.zk.addEventListener("refresh",this.nY);this.zk.renderOrder=n.VUa;this.zk.yw=!0;this.XI=new TDV.GS.AntialiasingFx;this.wK=new TDV.GS.SphericalHarmonicsFx;this.zk.fx=(this.zk.fx||[]).concat([this.XI,this.wK]);this.properties.bind(h.L("antialiasingLevel"),this.Tpa,
this,!1);this.properties.bind(h.L("sphericalHarmonicsMaxDegree"),this.hqa,this,!1);this.properties.bind(h.L("displayEffect"),this.Wpa,this,!1);this.Tpa();this.hqa();this.Wpa();(new TDV.GS.GaussianCloudLoader).load(this.url,this.NA,this.LP,this.KP)};b.prototype.NA=function(c){this.zk&&(this.fE=c,this.zk.add(c),this.o(h.INIT),this.o(h.ia))};b.prototype.LP=function(c){var d=c.total;c=c.loaded;this.o(h.yc,{totalBytes:d,bytesLoaded:c,percent:c<d?100*c/d:100})};b.prototype.KP=function(){this.o(h.$c)};b.prototype.Wpa=
function(){var c=this.properties.get("displayEffect");if(this.UD!=c&&this.zk){var d=this.zk.fx;this.Jn&&(d=d.filter(function(f){return f!=this.Jn}.bind(this)),this.Jn.dispose(),this.Jn=null);if(this.UD=c)this.Jn=new TDV.GS.RadialFadeInAnimationFx,this.Jn.sparseFadeFactor=this.UD.get("sparseFadeFactor"),this.Jn.denseFadeFactor=this.UD.get("denseFadeFactor"),this.Jn.denseTimeDelay=this.UD.get("denseTimeDelay"),this.Jn.speedFactor=this.UD.get("speedFactor"),this.Jn.minimumPointSize=this.UD.get("minimumPointSize"),
d=d.concat([this.Jn]),this.Jn.play(),this.nY();this.zk.fx=d}};b.prototype.nY=function(){this.o(h.V)};b.prototype.Tpa=function(){this.XI&&(this.XI.value=this.properties.get("antialiasingLevel"),this.o(h.V))};b.prototype.hqa=function(){this.wK&&(this.wK.maxDegree=this.properties.get("sphericalHarmonicsMaxDegree"),this.o(h.V))};b.TYPE="gs";return b}(g)});
define("tdv/player/view/webgl/system/model/loaders/TilesLoader","require exports three.mod tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/material/Util tdv/player/view/util/URL".split(" "),function(a,m,h,n,g,k,e,b){a=function(q){function r(){var t=q.call(this)||this;t.type=r.TYPE;t.Me=null;t.kP=null;t.camera=null;t.Yq=null;t.width=void 0;t.height=void 0;t.oj=!1;t.A6=null;t.session=null;t.config=null;return t}P(r,q);
r.prototype.ooa=function(){return this.Me?this.Me.group:null};r.prototype.kkb=function(t){this.config=t};r.prototype.start=function(t){this.A6=this.Neb(t);this.Me=new h.TDTiles.TilesRenderer(t);this.kP=k.HRa(new h.GLTFLoader(this.Me.manager));this.Me.manager.addHandler(/\.gltf$/,this.kP);this.config&&(this.Me.maxDepth=this.config.maxDepth,this.Me.loadSiblings=this.config.loadSiblings,this.Me.parseQueue.maxJobs=this.config.mqa,this.Me.downloadQueue.maxJobs=this.config.Ina,this.Me.lruCache.minSize=
this.config.wpa,this.Me.lruCache.maxSize=this.config.vpa,this.Me.errorTarget=this.config.errorTarget,this.Me.errorThreshold=this.config.errorThreshold);b.apa(t)&&(this.Me.fetchOptions.mode="cors");this.Me.onLoadModel=this.onLoadModel.bind(this);this.Me.onDisposeModel=this.onDisposeModel.bind(this);this.Me.onLoadTileSet=this.onLoadTileSet.bind(this);this.Me.onTileVisibilityChange=this.onTileVisibilityChange.bind(this);this.Me.preprocessURL=this.Bib.bind(this);this.o(n.INIT)};r.prototype.dispose=function(){this.Me&&
(this.kP=null,this.Me.dispose(),this.Me=null,this.Yq&&this.Yq.removeFromParent(),this.session=this.A6=null)};r.prototype.setCamera=function(t){this.camera!==t&&(this.camera=t,this.cTa(),this.updateCamera())};r.prototype.setSize=function(t,u){if(this.width!==t||this.height!==u)this.width=t,this.height=u,this.Onb()};r.prototype.update=function(){this.camera&&this.width&&this.height&&(this.cTa(),this.Me.update())};r.prototype.Neb=function(t){return(new window.URL(t)).searchParams.get("key")||null};r.prototype.Rfb=
function(t){return(new window.URL(t)).searchParams.get("session")||null};r.prototype.updateCamera=function(){this.Me&&this.camera&&(this.Me.setCamera(this.camera),this.Me.setCamera(this.Yq))};r.prototype.cTa=function(){this.camera&&(this.Yq||(this.Yq=new h.OrthographicCamera(-1,1,-1,1),this.Yq.matrixAutoUpdate=!1),this.Yq.parent!==this.camera&&this.camera.add(this.Yq),this.camera.updateMatrixWorld(!0),p.setFromMatrixPosition(this.camera.matrixWorld),l.copy(p).y-=this.camera.far,l.applyMatrix4(c.copy(this.camera.matrixWorld).invert()),
f.random().cross(l).normalize(),this.Yq.matrix.lookAt(d,l,f),this.Yq.near=this.camera.near,this.Yq.far=this.camera.far)};r.prototype.Onb=function(){this.Me&&this.camera&&this.width&&this.height&&(this.Me.setResolution(this.camera,this.width,this.height),this.Me.setResolution(this.Yq,1,1))};r.prototype.Bib=function(t){t=new window.URL(t);/^http/.test(t.protocol)&&(this.A6&&t.searchParams.append("key",this.A6),this.session&&t.searchParams.append("session",this.session));return t.toString()};r.prototype.onLoadModel=
function(){this.oj||(this.oj=!0,this.o(n.ia));this.o(n.V)};r.prototype.onDisposeModel=function(t){t.traverse(function(u){u instanceof h.Mesh&&e.HY(u)})};r.prototype.onTileVisibilityChange=function(t,u,v){v&&this.o(n.V)};r.prototype.onLoadTileSet=function(){this.session==null&&this.Me.traverse(function(t){return t.content&&t.content.uri?(this.session=this.Rfb(t.content.uri),!0):!1}.bind(this));this.o(n.V)};r.TYPE="tiles";return r}(g);var c=new h.Matrix4,d=new h.Vector3,f=new h.Vector3,l=new h.Vector3,
p=new h.Vector3;return a});
define("tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig",["require","exports"],function(){return function(){function a(){this.errorTarget=6;this.maxDepth=this.errorThreshold=Infinity;this.loadSiblings=!0;this.Ina=6;this.mqa=3;this.wpa=600;this.vpa=800}a.udb=function(m){var h=new a;h.errorTarget=m.get("errorTarget",h.errorTarget);h.errorThreshold=m.get("errorThreshold",h.errorThreshold);h.maxDepth=m.get("maxDepth",h.maxDepth);h.loadSiblings=m.get("loadSiblings",h.loadSiblings);h.Ina=m.get("downloadMaxJobs",
h.Ina);h.mqa=m.get("parseMaxJobs",h.mqa);h.wpa=m.get("lruCacheMinSize",h.wpa);h.vpa=m.get("lruCacheMaxSize",h.vpa);return h};return a}()});
define("tdv/player/view/webgl/system/model/GeometryQuery",["require","tdv/player/view/webgl/system/util/RaycastUtil"],function(a){function m(b){this.Fa=b}var h=a("tdv/player/view/webgl/system/util/RaycastUtil"),n=new THREE.Raycaster,g=new THREE.Vector3,k=new THREE.Vector3(0,-1,0),e=new THREE.Vector3(0,1,0);m.prototype.AK=function(b,c){n.ray.origin.copy(b);g.copy(c).sub(b);var d=g.length();g.normalize();n.ray.direction.copy(g);b=this.fH();return h.intersect(n,b).filter(function(f){if(f.distance>=d*
.98||!f.object.visible)return!1;f=Array.isArray(f.object.material)&&f.face?f.object.material[f.face.materialIndex]:f.object.material;return!f||f.visible}).length>0};m.prototype.ffb=function(b){n.ray.origin.copy(b);n.ray.direction.copy(k);b=this.fH();var c=h.intersect(n,b);if(c.length>0)return c[0].distance;n.ray.direction.copy(e);c=h.intersect(n,b);if(c.length>0)return-c[0].distance};m.prototype.fH=function(){var b=[];this.Fa.traverse(function(c){c.isSprite||c.isLine||b.push(c)});return b};return m});
define("tdv/player/view/webgl/system/model/MetadataQuery",["require","exports"],function(){return function(){function a(m){this.fE=m}a.prototype.getMetadata=function(){return this.fE.metadata};return a}()});
define("tdv/player/view/webgl/system/model/ObjectQuery",["require","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(n,g){this.Ub=n;this.K2a=g}var h=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.tLa=function(n){return(n=this.Qc(n))&&n.matrixWorld};m.prototype.Qc=function(n){return n?h.ZD(this.K2a,n):h.Qc(this.Ub)};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.Ub=c;this.A4a=d;this.$0a=f}var h=a("tdv/player/view/webgl/system/util/entity/Util"),n=new THREE.Vector3,g=new THREE.Vector3,k=new THREE.Vector3,e=new THREE.Frustum,b=new THREE.Matrix4;m.prototype.Goa=function(c,d){d=this.A4a.tLa(d);if(!d)return null;g.copy(c).applyMatrix4(d);var f=(c=h.Qc(this.Ub))&&h.qX(c);c=f&&h.sw(f);if(!c)return null;b.identity().multiplyMatrices(c.projectionMatrix,
c.matrixWorldInverse);e.setFromProjectionMatrix(b);if(!e.containsPoint(g))return null;d=(f&&h.tX(f))/2;f=(f&&h.dE(f))/2;n.copy(g).project(c);d=n.x*d+d;f=-(n.y*f)+f;k.setFromMatrixPosition(c.matrixWorld);c=this.$0a.AK(k,g);return{x:Math.round(d),y:Math.round(f),visible:!c}};return m});
define("tdv/player/view/webgl/system/model/Loader","require tdv/constants/EventName tdv/player/script/Model3DResourceLevel tdv/player/view/webgl/system/model/loaders/GLTFLoader tdv/player/view/webgl/system/model/loaders/GSLoader tdv/player/view/webgl/system/model/loaders/TilesLoader tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig tdv/player/view/webgl/system/model/GeometryQuery tdv/player/view/webgl/system/model/MetadataQuery tdv/player/view/webgl/system/model/ObjectQuery tdv/player/view/webgl/system/model/ProjectionQuery tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/components tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL".split(" "),function(a){function m(u,
v,w,x){this.B=u;this.lq=v;u=this.B.getComponent(q.Oi);this.A=u.properties;this.Lj=x;this.sf=w;this.Ee=this.Lj.gw(1);this.sf.sO(this.Ee,1);this.La=this.Um=null;w=this.H2a(u.Gpa);this.pd=this.p_a(w);this.kXa();this.pd.type===e.TYPE&&this.pd.kkb(b.udb(u.Gpa));this.pd.start(w)}var h=a("tdv/constants/EventName"),n=a("tdv/player/script/Model3DResourceLevel"),g=a("tdv/player/view/webgl/system/model/loaders/GLTFLoader"),k=a("tdv/player/view/webgl/system/model/loaders/GSLoader"),e=a("tdv/player/view/webgl/system/model/loaders/TilesLoader"),
b=a("tdv/player/view/webgl/system/model/loaders/TilesLoaderConfig"),c=a("tdv/player/view/webgl/system/model/GeometryQuery"),d=a("tdv/player/view/webgl/system/model/MetadataQuery"),f=a("tdv/player/view/webgl/system/model/ObjectQuery"),l=a("tdv/player/view/webgl/system/model/ProjectionQuery"),p=a("tdv/player/view/webgl/system/util/entity/Util"),q=a("tdv/player/view/webgl/components"),r=a("tdv/player/view/util/Device"),t=a("tdv/player/view/util/FileType");a("tdv/player/view/util/URL");m.prototype.p_a=
function(u){return t.is(u,t.uta)?new k(this.A):t.is(u,t.yWa)?new e:new g(this.B)};m.prototype.H2a=function(u){var v=u.get("levels");if(!w&&r.ub())var w=(w=v.find(function(x){return x.get("tags").indexOf(n.C_)>-1}))&&w.get("url");w||v.length&&(w=v[0].get("url"));w||(w=u.get("url"));return w};m.prototype.update=function(){};m.prototype.frame=function(){this.pd.type===e.TYPE?this.abb():this.pd.type===g.TYPE?this.qab():this.pd.type===k.TYPE&&this.rab()};m.prototype.abb=function(){var u=p.Sf(this.B),v=
u&&p.sw(u);v&&(this.pd.setCamera(v),this.pd.setSize(p.tX(u),p.dE(u)),this.pd.update())};m.prototype.qab=function(){this.pd.update()};m.prototype.rab=function(){this.pd.update()};m.prototype.kXa=function(){this.pd.bind(h.INIT,this.DBa,this,!0);this.pd.bind(h.ia,this.Pe,this,!0);this.pd.bind(h.$c,this.yh,this,!0);this.pd.bind(h.yc,this.Gj,this,!0);this.pd.bind(h.V,this.WBa,this,!0)};m.prototype.W6a=function(){this.pd.h(h.INIT,this.DBa,this);this.pd.h(h.ia,this.Pe,this);this.pd.h(h.$c,this.yh,this);
this.pd.h(h.yc,this.Gj,this);this.pd.h(h.V,this.WBa,this)};m.prototype.DBa=function(){this.La=this.pd.ooa();this.lq.N(q.Object3D).sa=this.La;var u=this.pd.type==g.TYPE,v=this.pd.type==k.TYPE;this.RXa(this.La,u||v);v=this.B.O(q.Oi,!0);v.Hoa=u?this.pd.Um:null;this.B.O(q.Animation,!0).properties=v.properties};m.prototype.Pe=function(){this.A.set("geometryQuery",new c(this.La));this.A.set("objectQuery",new f(this.B,this.La));this.A.set("projectionQuery",new l(this.B,this.A.get("objectQuery"),this.A.get("geometryQuery")));
this.pd.type==k.TYPE&&this.A.set("metadataQuery",new d(this.pd.fE));this.N5();this.B.O(q.gi)};m.prototype.Gj=function(u){this.Ee.o(h.yc,u.data)};m.prototype.yh=function(){this.Ee.o(h.$c)};m.prototype.WBa=function(){this.B.O(q.Object3D,!0)};m.prototype.N5=function(){this.A.set("isLoaded",!0);this.Ee.o(h.ia)};m.prototype.RXa=function(u,v){u.userData.id===void 0&&(u.userData.id="root");if(v!==!1)for(var w=[u];w.length;){var x=w.shift();u=[];x.children&&(u=u.concat(x.children));x.isSkinnedMesh&&(u=u.concat(x.skeleton.bones));
u.forEach(function(y,z){y.userData.id===void 0&&(y.userData.id=x.userData.id+"/"+z);w.push(y)})}};m.prototype.dispose=function(){this.La&&(this.pd.type!=k.TYPE&&this.La.traverse(function(u){function v(y){y&&w.indexOf(y)<0&&w.push(y)}var w=[];v(u.material);v(u.userData.Ot);if(u.userData.jF)for(var x in u.userData.jF)v(u.userData.jF[x]);w.forEach(function(y){y.dispose();Object.keys(y).forEach(function(z){(z=y[z])&&typeof z==="object"&&"minFilter"in z&&z.dispose()})});u.geometry&&u.geometry.userData.MIa&&
u.geometry.disposeBoundsTree();u.geometry&&u.geometry.dispose()}),this.La=null,this.lq.ka(q.Object3D));this.pd&&(this.W6a(),this.pd.dispose(),this.pd=null);this.Ee&&(this.sf.XP(this.Ee),this.Lj.XP(this.Ee),this.sf=this.Ee=null);this.A&&(this.A.set("geometryQuery",null),this.A.set("objectQuery",null),this.A.set("isLoaded",!1),this.A=null)};return m});
define("tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(r,t,u){this.Ub=r;this.B=t;this.R=u;this.Sl=this.Sl.bind(this);this.zh=this.zh.bind(this);this.gz=this.gz.bind(this);this.Re=null;this.ha=!1;this.t4=[1,1,1,1,1,1];this.yy=[];this.ah=[this.mO=
this.cs(),this.lO=this.cs(),this.oO=this.cs(),this.nO=this.cs(),this.qO=this.cs(),this.pO=this.cs()];this.ah.forEach(function(v){v=v.O(e.xd);v.opacity=.5;v.depthTest=!1}.bind(this));h.ba(this.R,l,this.zh,!0);h.ba(this.R,p,this.Sl,!0);h.ba(this.R,q,this.gz,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),k=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.frame=
function(){if(this.ha&&(this.J8a(this.ah.map(function(B){return b.uJ(B)||1})),this.Re)){var r=b.Qc(this.B),t=b.Qc(this.pM(this.Re));if(r&&t){d.copy(r.matrixWorld).invert();c.setFromMatrixPosition(t.matrixWorld).applyMatrix4(d);r=this.R.get("x");t=this.R.get("y");var u=this.R.get("z"),v=this.R.get("width"),w=this.R.get("height"),x=this.R.get("depth"),y=0,z=0,A=0,D=0,F=0,C=0;switch(this.Re){case this.mO:D=c.x-v*.5;y=D*.5;break;case this.lO:D=-c.x-v*.5;y=-D*.5;break;case this.oO:F=c.y-w*.5;z=F*.5;break;
case this.nO:F=-c.y-w*.5;z=-F*.5;break;case this.qO:C=c.z-x*.5;A=C*.5;break;case this.pO:C=-c.z-x*.5,A=-C*.5}this.R.set("x",r+y);this.R.set("width",v+D);this.R.set("y",t+z);this.R.set("height",w+F);this.R.set("z",u+A);this.R.set("depth",x+C)}}};var c=new THREE.Vector3,d=new THREE.Matrix4;m.prototype.cs=function(){var r=this.Ub.T.sc("DraggingSphere");this.yy.push(r);r.N(e.Mesh).renderOrder=g.tUa;r.N(e.Geometry).geometry=new THREE.SphereGeometry;r.N(e.xd);return r};m.prototype.zh=function(){this.mO.O(e.xd).color=
this.R.get("draggableXControlsColor");this.lO.O(e.xd).color=this.R.get("draggableXControlsColor");this.oO.O(e.xd).color=this.R.get("draggableYControlsColor");this.nO.O(e.xd).color=this.R.get("draggableYControlsColor");this.qO.O(e.xd).color=this.R.get("draggableZControlsColor");this.pO.O(e.xd).color=this.R.get("draggableZControlsColor");var r=this.R.get("draggableSphereRadius");this.ah.forEach(function(t,u){t.O(e.ta,!0).scale=r*this.t4[u]}.bind(this))};m.prototype.Sl=function(){this.mO.O(e.ta,!0).positionX=
this.R.get("width")/2;this.lO.O(e.ta,!0).positionX=-this.R.get("width")/2;this.oO.O(e.ta,!0).positionY=this.R.get("height")/2;this.nO.O(e.ta,!0).positionY=-this.R.get("height")/2;this.qO.O(e.ta,!0).positionZ=this.R.get("depth")/2;this.pO.O(e.ta,!0).positionZ=-this.R.get("depth")/2};m.prototype.gz=function(){var r=this.R.get("sizeDraggable");this.ha!=r&&(this.ha=r,this.ah.forEach(function(t){r?(t.N(e.pb).F=this.B,this.ah.forEach(function(u){u=u.N(e.wd);u.Xt=!0;u.mt=!0;u.M=new k;u.M.bind(n.uc,this.UM,
this,!0);u.M.bind(n.Eb,this.iia,this,!0);u.M.bind(n.Sa,this.gia,this,!0);u.M.bind(n.$a,this.hia,this,!0)}.bind(this))):(t.ka(e.pb),this.ah.forEach(function(u){u.ka(e.wd)}.bind(this)))}.bind(this)))};m.prototype.J8a=function(r){for(var t=!1,u=0;u<this.t4.length&&!t;u++)t=this.t4[u]!=r[u];t&&(this.t4=r,this.zh())};m.prototype.UM=function(r){(r=this.Ey(r))&&r!=this.Re&&(r.O(e.xd).opacity=1)};m.prototype.iia=function(r){(r=this.Ey(r))&&r!=this.Re&&(r.O(e.xd).opacity=.5)};m.prototype.Ey=function(r){r=
this.ah.map(function(t){return t.getComponent(e.wd).M}).indexOf(r.source);return r==-1?null:this.ah[r]};m.prototype.gia=function(r){r=this.Ey(r);this.iV(r)};m.prototype.hia=function(r){r=this.Ey(r);r==this.Re&&(this.iV(null),this.Sl(),(r=this.ah.indexOf(r)!=-1)&&this.R.o(n.Km),r&&this.R.o(n.xua))};m.prototype.iV=function(r){this.Re&&(this.Re.O(e.xd).opacity=.5,this.pM(this.Re).ka(e.ux));if(this.Re=r)this.Re.O(e.xd).opacity=1,r=this.pM(this.Re).N(e.ux),r.direction=this.A1a(this.Re),r.min=this.B1a(this.Re)};
m.prototype.A1a=function(r){var t=b.getWorldPosition(this.B);return b.getWorldPosition(r).sub(t)};m.prototype.pM=function(r){return this.ah.indexOf(r)!=-1?r:null};m.prototype.B1a=function(r){var t=this.d2a(r);if(t){t=b.getWorldPosition(t);var u=b.getWorldPosition(r).sub(t);switch(r){case this.mO:case this.lO:var v=this.R.get("minWidth");break;case this.oO:case this.nO:v=this.R.get("minHeight");break;case this.qO:case this.pO:v=this.R.get("minDepth")}return t.add(u.setLength(v||f))}};m.prototype.d2a=
function(r){switch(r){case this.mO:return this.lO;case this.lO:return this.mO;case this.oO:return this.nO;case this.nO:return this.oO;case this.qO:return this.pO;case this.pO:return this.qO}return null};m.prototype.dispose=function(){h.da(this.R,l,this.zh);h.da(this.R,p,this.Sl);h.da(this.R,q,this.gz);var r=this.Ub.T;this.yy.forEach(function(t){r.dd(t)});this.R=this.Ub=this.ah=this.B=this.yy=null};var f=1E-6,l=["draggableSphereRadius","draggableXControlsColor","draggableYControlsColor","draggableZControlsColor"],
p="depth height x y z width".split(" "),q=["sizeDraggable"];return m});
define("tdv/player/view/webgl/system/model/object/BoxController","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls".split(" "),function(a){function m(f,l,p){this.Ub=f;this.R=p;this.Sl=this.Sl.bind(this);this.zh=this.zh.bind(this);this.hz=this.hz.bind(this);this.B=this.PZa();f=this.B.N(k.pb);f.F=this.Ub;f.id=this.R.get("parentId");this.Ru=this.Zda();this.Ru.N(k.pb).F=
this.B;this.bS=this.c_a();this.bS.N(k.pb).F=this.B;this.yy=[this.B,this.Ru,this.bS];this.Sea=new e(this.Ub,this.B,this.R);f=this.B.N(k.wd);f.mt=!0;f.Xt=!0;f.M=this.R;h.ba(this.R,b,this.zh,!0);h.ba(this.R,c,this.Sl,!0);h.ba(this.R,d,this.hz,!0);this.R.o(n.od)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/model/object/draggable/DraggableSize3DControls");m.prototype.frame=
function(){this.Sea.frame()};m.prototype.PZa=function(){var f=this.Ub.T.sc("Box");f.N(k.Group);return f};m.prototype.Zda=function(){var f=this.Ub.T.sc("BoxBorder");f.N(k.Line);f.N(k.Geometry).geometry=this.QZa();f.N(k.ei);return f};m.prototype.c_a=function(){var f=this.Ub.T.sc("BoxFace");f.N(k.Mesh);var l=f.N(k.gi);l.castShadow=!1;l.receiveShadow=!1;f.N(k.Geometry).geometry=new THREE.BoxGeometry(1,1,1);f.N(k.xd);return f};m.prototype.QZa=function(){var f=[new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(.5,
-.5,.5),new THREE.Vector3(.5,-.5,.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(.5,.5,-.5),new THREE.Vector3(.5,.5,-.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(-.5,-.5,.5),new THREE.Vector3(-.5,-.5,-.5),new THREE.Vector3(.5,
-.5,.5),new THREE.Vector3(.5,-.5,-.5),new THREE.Vector3(-.5,.5,.5),new THREE.Vector3(-.5,.5,-.5),new THREE.Vector3(.5,.5,.5),new THREE.Vector3(.5,.5,-.5)];return(new THREE.BufferGeometry).setFromPoints(f)};m.prototype.zh=function(){var f=this.Ru.O(k.ei);f.color=this.R.get("lineColor");f.opacity=this.R.get("lineOpacity");f.width=this.R.get("lineWidth");f.depthTest=this.R.get("depthTest");f=this.bS.O(k.xd);f.color=this.R.get("faceColor");f.opacity=this.R.get("faceOpacity");f.depthTest=this.R.get("depthTest");
f=this.B.O(k.wd,!0);f.pB=this.R.get("useHandCursor");f.fF=this.R.get("transparentAreaActive")};m.prototype.Sl=function(){var f=this.B.O(k.ta,!0);f.positionX=this.R.get("x");f.positionY=this.R.get("y");f.positionZ=this.R.get("z");f=this.Ru.O(k.ta,!0);var l=this.bS.O(k.ta,!0);l.Le=f.Le=this.R.get("width");l.Ye=f.Ye=this.R.get("height");l.Gh=f.Gh=this.R.get("depth")};m.prototype.hz=function(){if(this.R.get("positionDraggable")){var f=this.B.O(k.Hh,!0);f.M||(f.M=new g,f.M.bind(n.V,this.ym,this,!0));f.translate=
this.R.get("positionDraggable")||!1;f.rotate=!1;f.scale=!1}else(f=this.B.getComponent(k.Hh))&&f.M.h(n.V,this.ym,this),this.B.ka(k.Hh)};m.prototype.ym=function(f){this.R.set({x:f.data.position.x,y:f.data.position.y,z:f.data.position.z});this.R.o(n.Km)};m.prototype.dispose=function(){this.Sea.dispose();this.Sea=null;h.da(this.R,d,this.hz);h.da(this.R,b,this.zh);h.da(this.R,c,this.Sl);var f=this.Ub.T;this.yy.forEach(function(l){f.dd(l)});this.Ub=this.bS=this.Ru=this.B=this.yy=null;this.R.o(n.jd);this.R=
null};var b=["transparentAreaActive","useHandCursor"],c="depth height x y z width".split(" "),d=["positionDraggable"];return m});
define("tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(x,y,z){this.Ub=x;this.B=y;this.R=z;this.SH=this.SH.bind(this);this.zh=this.zh.bind(this);this.gz=this.gz.bind(this);this.Re=null;this.ha=!1;this.I_=this.zv=1;this.Uu=this.Ub.T.sc("DraggingSize2DContainer");
this.Uu.N(e.Group);this.Uu.N(e.ta);this.ah=[this.zha=this.cs(),this.sha=this.cs(),this.bka=this.cs(),this.Gja=this.cs()];this.ah.forEach(function(A){A.N(e.ta);A=A.O(e.xd);A.color="#ffffff";A.opacity=.5;A.depthTest=!1}.bind(this));this.Ru=this.Zda();this.yy=[this.Uu,this.Ru].concat(this.ah);[this.Ru].concat(this.ah).forEach(function(A){A.N(e.pb).F=this.Uu}.bind(this));h.ba(this.R,v,this.SH,!0);h.ba(this.R,u,this.zh,!0);h.ba(this.R,w,this.gz,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),
g=a("tdv/constants/RenderOrder"),k=a("tdv/events/EventDispatcher"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util"),c=new THREE.Matrix4,d=new THREE.Vector3,f=new THREE.Vector3,l=new THREE.Quaternion,p=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Euler,t=180/Math.PI;m.prototype.frame=function(){if(this.ha){var x=b.Qc(this.Uu),y=x&&b.qX(x),z=y&&b.sw(y);if(z){if(this.Re){var A=b.tX(y);y=b.dE(y);b.getWorldPosition(this.B,q).project(z);q.x=(q.x+1)*A*.5;
q.y=(1-q.y)*y*.5;b.getWorldPosition(this.Re,p).project(z);p.x=(p.x+1)*A*.5;p.y=(1-p.y)*y*.5;A=this.R.get("anchorX");y=this.R.get("anchorY");var D,F,C=q.x-p.x,B=p.y-q.y,H=-C,E=-B;this.sha===this.Re&&(A>0||y<1)?C>B?D=C/A:F=B/(1-y):this.Gja===this.Re&&(A<1||y<1)?H>B?D=H/(1-A):F=B/(1-y):this.zha===this.Re&&(A>0||y>0)?C>E?D=C/A:F=E/y:this.bka===this.Re&&(A<1||y>0)&&(H>E?D=H/(1-A):F=E/y);F!==void 0&&D===void 0?D=F*this.Kva:D!==void 0&&F===void 0&&(F=D/this.Kva);D!==void 0&&F!==void 0&&(A=this.R.get("sizeAttenuation")?
this.zv/this.I_:1,this.R.set("width",this.Pa=D*A),this.R.set("height",this.Ha=F*A))}D=this.Uu.getComponent(e.ta);c.copy(x.parent.matrixWorld).invert().multiply(z.matrixWorld).decompose(d,l,f);r.setFromQuaternion(l,D.mf);r.x*=t;r.y*=t;r.z*=t;if(D.Yd!=r.x||D.fd!=r.y||D.Xe!=r.z)D=this.Uu.O(e.ta),D.Yd=r.x,D.fd=r.y,D.Xe=r.z;x.parent.getWorldScale(d);this.B7a(1/Math.max(d.x,d.y,d.z));this.tka(b.uJ(this.Uu)||1)}}};m.prototype.dab=function(x,y){this.Ela!=null&&clearTimeout(this.Ela);this.Ela=setTimeout(function(){this.Ela=
null;if(this.Pa!==x||this.Ha!==y)this.Pa=x,this.Ha=y,this.Kva=this.Pa/this.Ha}.bind(this),100)};m.prototype.cs=function(){var x=this.Ub.T.sc("DraggingSphere");x.N(e.Mesh).renderOrder=g.sUa;x.N(e.Geometry).geometry=new THREE.SphereGeometry;x.N(e.xd);return x};m.prototype.Zda=function(){var x=this.Ub.T.sc("BoxBorder");x.N(e.Line);x.N(e.Geometry).geometry=this.A_a();var y=x.N(e.ei);y.color="#0000ff";y.depthTest=!1;y.width=1;return x};m.prototype.A_a=function(){var x=[new THREE.Vector3(-.5,-.5,0),new THREE.Vector3(.5,
-.5,0),new THREE.Vector3(.5,-.5,0),new THREE.Vector3(.5,.5,0),new THREE.Vector3(.5,.5,0),new THREE.Vector3(-.5,.5,0),new THREE.Vector3(-.5,.5,0),new THREE.Vector3(-.5,-.5,0)];return(new THREE.BufferGeometry).setFromPoints(x)};m.prototype.zh=function(){var x=this.Ru.O(e.ei);x.color=this.R.get("draggableLineColor");x.opacity=this.R.get("draggableLineOpacity");x.width=this.R.get("draggableLineWidth");this.ah.forEach(function(y){y.O(e.xd).color=this.R.get("draggableSphereColor");y.O(e.ta).scale=this.R.get("draggableSphereRadius")*
this.zv}.bind(this))};m.prototype.tka=function(x){this.zv!=x&&(this.zv=x,this.SH(),this.zh())};m.prototype.B7a=function(x){this.I_!=x&&(this.I_=x,this.SH(),this.zh())};m.prototype.SH=function(){var x=this.R.get("anchorX"),y=this.R.get("anchorY"),z=this.R.get("width"),A=this.R.get("height"),D=this.R.get("sizeAttenuation")?this.I_:this.zv,F=this.zha.O(e.ta,!0);F.positionX=-x*z*D;F.positionY=y*A*D;F=this.bka.O(e.ta,!0);F.positionX=(1-x)*z*D;F.positionY=y*A*D;F=this.sha.O(e.ta,!0);F.positionX=-x*z*D;
F.positionY=(y-1)*A*D;F=this.Gja.O(e.ta,!0);F.positionX=(1-x)*z*D;F.positionY=(y-1)*A*D;F=this.Ru.O(e.ta,!0);F.positionX=(.5-x)*z*D;F.positionY=(y-.5)*A*D;F.Le=z*D;F.Ye=A*D;this.dab(z,A)};m.prototype.gz=function(){var x=this.R.get("sizeDraggable");this.ha!=x&&((this.ha=x)?(this.Uu.N(e.pb).F=this.B,this.ah.forEach(function(y){y=y.N(e.wd);y.Xt=!0;y.mt=!0;y.M=new k;y.M.bind(n.uc,this.UM,this,!0);y.M.bind(n.Eb,this.iia,this,!0);y.M.bind(n.Sa,this.gia,this,!0);y.M.bind(n.$a,this.hia,this,!0)}.bind(this))):
(this.Uu.ka(e.pb),this.ah.forEach(function(y){y.ka(e.wd)}.bind(this))))};m.prototype.UM=function(x){(x=this.Ey(x))&&x!=this.Re&&(x.O(e.xd).opacity=1)};m.prototype.iia=function(x){(x=this.Ey(x))&&x!=this.Re&&(x.O(e.xd).opacity=.5)};m.prototype.gia=function(x){x=this.Ey(x);this.iV(x)};m.prototype.hia=function(x){(x=this.Ey(x))&&x==this.Re&&(this.iV(null),this.SH(),(x=this.ah.indexOf(x)!=-1)&&this.R.o(n.Km),x&&this.R.o(n.xua))};m.prototype.Ey=function(x){x=this.ah.map(function(y){return y.getComponent(e.wd).M}).indexOf(x.source);
if(x==-1)return null;x=this.ah[x];return this.J3a(x)?x:null};m.prototype.J3a=function(x){var y=this.R.get("anchorX"),z=this.R.get("anchorY");return this.sha===x&&(y>0||z>0)||this.Gja===x&&(y<1||z>0)||this.zha===x&&(y>0||z<1)||this.bka===x&&(y<1||z<1)?!0:!1};m.prototype.iV=function(x){this.Re&&(this.Re.O(e.xd).opacity=.5,this.pM(this.Re).ka(e.ux));if(this.Re=x){this.Re.O(e.xd).opacity=1;var y=this.pM(this.Re).N(e.ux),z=b.getWorldPosition(this.B);x=b.getWorldPosition(x);x=(new THREE.Vector3).copy(x).sub(z);
var A=Math.min(x.length(),this.zv*10);z=(new THREE.Vector3).copy(z).add(d.copy(x).setLength(A));y.direction=x;y.min=z}};m.prototype.pM=function(x){return this.ah.indexOf(x)!=-1?x:null};m.prototype.dispose=function(){h.da(this.R,v,this.SH);h.da(this.R,u,this.zh);h.da(this.R,w,this.gz);var x=this.Ub.T;this.yy.forEach(function(y){x.dd(y)});this.R=this.Ub=this.ah=this.B=this.yy=null};var u=["draggableLineColor","draggableLineOpacity","draggableLineWidth","draggableSphereColor","draggableSphereRadius"],
v="anchorX anchorY height sizeAttenuation x y z width".split(" "),w=["sizeDraggable"];return m});
define("tdv/player/view/webgl/system/model/object/SpriteController","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(y,z,A,D,F){this.Ub=y;this.sf=A;this.Lj=D;this.R=F;this.Sl=this.Sl.bind(this);this.XT=this.XT.bind(this);this.zh=
this.zh.bind(this);this.y3=this.y3.bind(this);this.hz=this.hz.bind(this);this.Oh=this.sf.gw(1);this.swa=new THREE.Vector3;this.f0=new THREE.Euler;this.R.get("preload")&&this.Lj.sO(this.Oh);this.B=this.Ub.T.sc("SpriteContainer");this.B.N(b.Group);y=this.B.N(b.pb);y.F=this.Ub;y.id=this.R.get("parentId");this.SV=this.Ub.T.sc("TranslationSpriteContainer");this.SV.N(b.Group);this.SV.N(b.pb).F=this.B;this.Jv=this.Ub.T.sc("Sprite");this.Jv.N(b.pb).F=this.SV;y=this.Jv.N(b.Ni);y.properties=this.R;y.uw=this.R.get("image");
y.M=this.R;y.Ap=this.Oh;y.isSprite=!0;y.priority=this.R.get("preload")?g.RF:g.Jta;this.Jv.N(b.wd).M=this.R;this.Jv.N(b.AB);this.Jv.N(b.MQ).object=this.R;this.tha=!1;this.zv=1E-4;this.Vy=this.B.T.sc("TranslationLine");this.Vy.N(b.Line);this.Vy.N(b.ei);this.Rea=new c(this.Ub,this.SV,this.R);h.ba(this.R,x,this.hz,!0);h.ba(this.R,t,this.Sl,!0);h.ba(this.R,v,this.XT,!0);h.ba(this.R,w,this.zh,!0);h.ba(this.R,u,this.y3,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),
k=a("tdv/constants/RenderOrder"),e=a("tdv/events/EventDispatcher"),b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/model/object/draggable/DraggableSize2DControls"),d=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.frame=function(){this.Rea.frame();this.tka(d.uJ(this.B)||1E-4)};m.prototype.Sl=function(){this.B.N(b.pb).id!=this.R.get("parentId")&&(this.B.O(b.pb).id=this.R.get("parentId"));var y=this.B.O(b.ta,!0);y.translationX=this.R.get("x");y.translationY=
this.R.get("y");y.Ze=this.R.get("z")};m.prototype.tka=function(y){this.zv!=y&&(this.zv=y,this.R.set("worldPixelScale",d.XLa(this.B)),this.XT())};m.prototype.XT=function(){var y=this.B.O(b.ta,!0),z=this.SV.O(b.ta,!0),A=this.Vy.O(b.ta,!0),D=this.R.get("translationLength");p.set(this.R.get("translationX"),this.R.get("translationY"),this.R.get("translationZ"));D=D!==void 0?D*this.zv:p.length();if(this.swa.equals(p)){var F=this.f0.x;var C=this.f0.y;var B=this.f0.z}else f.setFromUnitVectors(q,p.normalize()),
C=Math.atan2(p.x,p.z),F=-Math.atan2(p.y,Math.sqrt(p.x*p.x+p.z*p.z)),B=0;z.translationX=0;z.translationX=0;z.translationY=0;z.Ze=D;A.scale=D;y.Yd=F*r;y.fd=C*r;y.Xe=B*r;y.mf="YXZ";this.UGa()};var f=new THREE.Quaternion,l=new THREE.Euler,p=new THREE.Vector3,q=new THREE.Vector3(0,0,1),r=180/Math.PI;m.prototype.zh=function(){var y=this.Jv.O(b.wd,!0);y.pB=this.R.get("useHandCursor");y.fF=this.R.get("transparentAreaActive");y.mt=this.R.get("clickEnabled");y.Xt=this.R.get("rollOverEnabled");y=this.Vy.O(b.ei);
y.color=this.R.get("translationLineColor");y.depthTest=this.R.get("depthTest");y.opacity=this.R.get("hidden")?0:this.R.get("translationLineOpacity");y.transparent=!1;y.width=this.R.get("translationLineWidth");this.UGa();y=this.Vy.O(b.Line,!0);var z=this.Jv.O(b.Sprite,!0);y.renderOrder=z.renderOrder=this.R.get("depthTest")?k.UVa:k.VVa};m.prototype.y3=function(){var y=this.Jv.O(b.Sprite,!0);y.uO=this.R.get("anchorX");y.vO=this.R.get("anchorY");y.width=this.R.get("width");y.height=this.R.get("height");
y.scale=this.R.get("scale");y.sizeAttenuation=this.R.get("sizeAttenuation")};m.prototype.hz=function(){if(this.R.get("positionDraggable")||this.R.get("translationDraggable")){var y=this.B.O(b.Hh,!0);y.M||(y.M=new e,y.M.bind(n.V,this.ym,this,!0));y.translate=this.R.get("positionDraggable")||!1;y.rotate=this.R.get("translationDraggable")||!1;y.scale=!1}else(y=this.B.getComponent(b.Hh))&&y.M.h(n.V,this.ym,this),this.B.ka(b.Hh)};m.prototype.ym=function(y){var z=p.set(this.R.get("translationX"),this.R.get("translationY"),
this.R.get("translationZ")).length();l.setFromQuaternion(y.data.quaternion,this.B.getComponent(b.ta).mf);p.copy(q).setLength(z).applyQuaternion(y.data.quaternion);this.swa.copy(p);this.f0.copy(l);this.R.set({x:y.data.position.x,y:y.data.position.y,z:y.data.position.z,translationX:p.x,translationY:p.y,translationZ:p.z});this.R.o(n.Km)};m.prototype.UGa=function(){var y=this.R.get("translationLineVisible")&&this.R.get("translationLineOpacity")>0&&(this.R.get("translationX")!=0||this.R.get("translationY")!=
0||this.R.get("translationZ")!=0);this.tha!=y&&((this.tha=y)?this.Vy.N(b.pb).F=this.B:this.Vy.ka(b.pb))};m.prototype.dispose=function(){this.Rea.dispose();this.Rea=null;h.da(this.R,x,this.hz);h.da(this.R,t,this.Sl);h.da(this.R,v,this.XT);h.da(this.R,w,this.zh);h.da(this.R,u,this.y3);this.sf.XP(this.Oh);this.Lj.XP(this.Oh);this.Oh=this.Lj=this.sf=null;var y=this.Ub.T;this.Ub=null;y.dd(this.Jv);this.Jv=null;y.dd(this.Vy);this.Vy=null;y.dd(this.B);this.R=this.B=null};var t=["parentId","x","y","z"],u=
"anchorX anchorY width height scale sizeAttenuation".split(" "),v=["translationX","translationY","translationZ","translationLength"],w="clickEnabled depthTest hidden rollOverEnabled transparentAreaActive translationLineColor translationLineOpacity translationLineVisible translationLineWidth useHandCursor".split(" "),x=["positionDraggable","translationDraggable"];return m});
define("tdv/player/view/webgl/system/model/object/ControllerFactory",["require","tdv/player/parser/ClassInfo","tdv/player/view/webgl/system/model/object/BoxController","tdv/player/view/webgl/system/model/object/SpriteController"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/view/webgl/system/model/object/BoxController"),n=a("tdv/player/view/webgl/system/model/object/SpriteController");return{create:function(g,k,e,b,c){return m.Oa("SpriteModel3DObject",c)?new n(g,k,e,b,c):m.Oa("BoxModel3DObject",
c)?new h(g,k,c):null}}});
define("tdv/player/view/webgl/system/model/Objects",["require","tdv/binding/BindingsHandler","tdv/player/view/util/LoadingGroup","tdv/player/view/webgl/components","tdv/player/view/webgl/system/model/object/ControllerFactory"],function(a){function m(e,b,c,d){this.B=e;this.lq=b;this.sf=c;this.Lj=d;this.UAa=new n(this.Lj.gw(.1));this.TAa=new n(this.sf.gw(.1));this.TH=this.TH.bind(this);this.aA=e.T;this.A=this.B.getComponent(g.Oi).properties;this.La=(e=this.B.getComponent(g.Object3D))&&e.sa;this.fl=
[];this.b3=new Map;h.ba(this.A,["objects.enabled"],this.TH,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/util/LoadingGroup"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/model/object/ControllerFactory");m.prototype.update=function(){var e=this.B.getComponent(g.Object3D);e=e&&e.sa;if(this.La!==e){var b=this.La;this.La=e;this.b6(!!b)}};m.prototype.frame=function(){this.b3.forEach(function(e){e&&e.frame&&e.frame()})};m.prototype.dispose=function(){this.La=
null;h.da(this.A,["objects.enabled"],this.TH);this.YEa([])};m.prototype.TH=function(){this.b6()};m.prototype.b6=function(e){var b=this.A.get("objects").filter(function(c){return c.get("enabled")});this.YEa(b,e);this.UAa.update();this.TAa.update()};m.prototype.YEa=function(e,b){if(this.fl!=e||b)this.fl.forEach(function(c){(b||e.indexOf(c)<0)&&this.Z6a(c)}.bind(this)),e.forEach(function(c){(b||this.fl.indexOf(c)<0)&&this.mXa(c)}.bind(this)),this.fl=e};m.prototype.mXa=function(e){this.b3.set(e,k.create(this.B,
this.lq,this.TAa,this.UAa,e))};m.prototype.Z6a=function(e){var b=this.b3.get(e);b&&b.dispose();this.b3["delete"](e)};return m});
define("tdv/player/view/webgl/system/model/Properties",["require","tdv/constants/EventName","tdv/player/view/webgl/components"],function(a){function m(e,b){this.B=e;this.lq=b;this.pi=this.La=this.A=null;this.Oj(this.B.getComponent(n.Oi).properties);this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components");m.prototype.frame=function(){this.update()};m.prototype.update=function(){var e=this.lq.getComponent(n.Object3D);e=e&&e.sa;this.La!=e&&(this.La=e,this.oG())};m.prototype.Oj=
function(e){this.A&&g.forEach(function(b){this.A.h(h.L(b),this.oG,this,!1)}.bind(this));if(this.A=e)g.forEach(function(b){this.A.bind(h.L(b),this.oG,this,!1)}.bind(this)),this.oG()};m.prototype.oG=function(){this.XEa(this.A.get("model"));this.La&&this.B.T.Qa()};m.prototype.XEa=function(e){this.pi!=e&&(this.pi&&k.forEach(function(b){this.pi.h(h.L(b),this.ida,this,!1)}.bind(this)),this.pi=e)&&(k.forEach(function(b){this.pi.bind(h.L(b),this.ida,this,!1)}.bind(this)),this.ida())};m.prototype.ida=function(){var e=
this.lq.O(n.ta,!0);e.positionX=this.pi.get("positionX");e.positionY=this.pi.get("positionY");e.positionZ=this.pi.get("positionZ");e.mf=this.pi.get("rotationOrder");e.Yd=this.pi.get("rotationX");e.fd=this.pi.get("rotationY");e.Xe=this.pi.get("rotationZ");e.scale=this.pi.get("scale");e.Le=this.pi.get("invertX")?-1:1;e.Ye=this.pi.get("invertY")?-1:1;e.Gh=this.pi.get("invertZ")?-1:1;e.translationX=this.pi.get("translationX");e.translationY=this.pi.get("translationY");e.Ze=this.pi.get("translationZ")};
m.prototype.dispose=function(){this.La=null;this.XEa(null);this.Oj(null)};var g=["model"],k="invertX invertY invertZ positionX positionY positionZ rotationOrder rotationX rotationY rotationZ scale translationX translationY translationZ".split(" ");return m});
define("tdv/player/view/webgl/system/model/Behaviour","require tdv/constants/EventName tdv/events/Event tdv/player/view/util/LoadingGroup tdv/player/view/webgl/components tdv/player/view/webgl/system/model/Loader tdv/player/view/webgl/system/model/Objects tdv/player/view/webgl/system/model/Properties".split(" "),function(a){function m(d){this.B=d;this.B.N(k.Group);d=this.B.getComponent(k.Oi);this.lq=d.fJ;this.Lj=new g(d.MPa);this.sf=new g(d.Ap);this.Ee=d.M;this.pd=new e(this.B,this.lq,this.sf,this.Lj);
this.fl=new b(this.B,this.lq,this.sf,this.Lj);this.A=new c(this.B,this.lq)}var h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/view/util/LoadingGroup"),k=a("tdv/player/view/webgl/components"),e=a("tdv/player/view/webgl/system/model/Loader"),b=a("tdv/player/view/webgl/system/model/Objects"),c=a("tdv/player/view/webgl/system/model/Properties");m.prototype.update=function(){this.pd.update();this.fl.update();this.A.update()};m.prototype.frame=function(){this.pd.frame();this.fl.frame();
this.A.frame();this.Ee.o(new n(h.Zd))};m.prototype.dispose=function(){this.pd&&(this.pd.dispose(),this.pd=null);this.fl&&(this.fl.dispose(),this.fl=null);this.A&&(this.A.dispose(),this.A=null);this.sf&&(this.sf.dispose(),this.sf=null);this.Ee=this.lq=null};m.Wa=function(d){d.N(k.Cx).manager=new m(d)};m.ya=function(d){var f=d.getComponent(k.Cx);f.manager.dispose();f.manager=null;d.ka(k.Cx)};m.update=function(d){d.getComponent(k.Cx).manager.update()};m.frame=function(d){d.getComponent(k.Cx).manager.frame()};
return m});
define("tdv/player/view/webgl/system/model/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/model/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/model/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.MNa.v.length&&this.MNa.v.slice().forEach(g.Wa);this.U8.Da.length&&this.U8.Da.slice().forEach(g.update);
this.U8.v.length&&this.U8.v.slice().forEach(g.frame);this.NNa.v.length&&this.NNa.v.slice().forEach(g.ya)};a.J={};a.J.MNa=[n.Oi,n.Cx.aa];a.J.U8=[n.Oi,n.Cx];a.J.NNa=[n.Oi.aa,n.Cx];return a});
define("tdv/player/view/webgl/system/objectId/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(g){this.B=g;this.He=null}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.frame=function(){if(!this.He){var g=this.B.getComponent(h.gL),k=n.Qc(g.container);if(this.He=k&&g.id&&n.ZD(k,g.id)||null)this.B.N(h.Object3D).sa=this.He,this.B.T.Qa()}};m.prototype.update=function(){this.He&&
(this.B.ka(h.Object3D),this.He=null)};m.prototype.dispose=function(){this.He&&(this.B.ka(h.Object3D),this.He=null)};m.Wa=function(g){g.N(h.Dx).manager=new m(g)};m.ya=function(g){var k=g.getComponent(h.Dx);k.manager.dispose();k.manager=null;g.ka(h.Dx)};m.frame=function(g){g.getComponent(h.Dx).manager.frame()};m.update=function(g){g.getComponent(h.Dx).manager.update()};return m});
define("tdv/player/view/webgl/system/objectId/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/objectId/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/objectId/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.fOa.v.length&&this.fOa.v.slice().forEach(g.Wa);this.a9.Da.length&&
this.a9.Da.slice().forEach(g.update);this.a9.v.length&&this.a9.v.slice().forEach(g.frame);this.gOa.v.length&&this.gOa.v.slice().forEach(g.ya)};a.J={};a.J.fOa=[n.gL,n.Dx.aa];a.J.a9=[n.gL,n.Dx];a.J.gOa=[n.gL.aa,n.Dx];return a});
define("tdv/player/view/webgl/system/plane/System","require exports three.mod tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/material/Util".split(" "),function(a,m,h,n,g,k){a=function(e){function b(){var c=e.call(this)||this;c.xb=c.xb.bind(c);c.ib=c.ib.bind(c);c.Ca=c.Ca.bind(c);return c}P(b,e);b.prototype.Yc=function(){this.GE.v.length&&this.GE.v.slice().forEach(this.xb);this.planes.Da.length&&this.planes.Da.slice().forEach(this.ib);this.zPa.v.length&&
this.zPa.v.slice().forEach(this.Ca);this.APa.v.length&&this.APa.v.slice().forEach(this.Ca)};b.prototype.xb=function(c){var d=new h.PlaneGeometry;c.N(g.UB).geometry=d;c.N(g.Object3D).sa=new h.Mesh(d);this.ib(c)};b.prototype.ib=function(c){var d=c.N(g.Object3D).sa,f=c.getComponent(g.Material).material;f&&k.ND(d,f);d.renderOrder=c.getComponent(g.Plane).renderOrder};b.prototype.Ca=function(c){var d=c.getComponent(g.UB);d.geometry.dispose();d.geometry=null;c.ka(g.UB);c.ka(g.Object3D)};b.J={};return b}(n);
a.J={};a.J.GE=[g.Material,g.Plane,g.UB.aa];a.J.planes=[g.Plane,g.Material,g.UB];a.J.zPa=[g.Plane.aa,g.UB];a.J.APa=[g.Material.aa,g.UB];return a});
define("tdv/player/view/webgl/system/parent/Behaviour",["require","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var m=a("tdv/player/view/webgl/components"),h=a("tdv/player/view/webgl/system/util/entity/Util");return{Wa:function(n){var g=n.getComponent(m.pb),k=h.Qc(g.F);if(k){var e=n.N(m.Du);e.parent=k;g.id&&(k=k&&h.ZD(k,g.id));e.id=g.id;e.ge=h.Qc(n);e.attach=g.attach;k&&e.ge&&(e.attach?k.attach(e.ge):k.add(e.ge))}},update:function(n){var g=n.getComponent(m.pb),
k=n.getComponent(m.Du),e=h.Qc(g.F),b=h.Qc(n);if(k.parent!=e||k.ge!=b||g.id!=k.id||g.attach!=k.attach||b&&e&&!b.parent)k=n.O(m.Du),k.ge&&k.ge.parent&&(g.F.O(m.Object3D),k.ge.parent.remove(k.ge)),k.parent=e,g.id&&(e=e&&h.ZD(e,g.id)),k.id=g.id,k.ge=b,k.attach=g.attach,e&&k.ge&&(k.attach?e.attach(k.ge):e.add(k.ge),(g=n.getComponent(m.ta))&&h.eZ(n,g))},ya:function(n){var g=n.getComponent(m.Du);g.ge&&g.ge.parent&&g.ge.parent.remove(g.ge);g.parent=null;g.ge=null;g.id=void 0;n.ka(m.Du)}}});
define("tdv/player/view/webgl/system/parent/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/parent/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/parent/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.fY.v.length&&this.fY.v.slice().forEach(g.Wa);this.Kt.v.length&&
this.Kt.v.slice().forEach(g.update);this.Kt.Da.length&&this.Kt.Da.slice().forEach(g.update);this.Kt.fe.length&&this.Kt.fe.slice().forEach(g.update);this.cJa.v.length&&this.cJa.v.slice().forEach(g.ya);this.dJa.v.length&&this.dJa.v.slice().forEach(g.ya)};a.J={};a.J.fY=[n.Object3D,n.pb,n.Du.aa];a.J.Kt=[n.Object3D,n.pb,n.Du];a.J.cJa=[n.Object3D.aa,n.pb,n.Du];a.J.dJa=[n.pb.aa,n.Du];return a});
define("tdv/player/view/webgl/system/pixelScaleTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(h,function(){h.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.eg=this.eg.bind(this)});
a.prototype.Yc=function(){this.wPa.v.length&&this.wPa.v.slice().forEach(this.xb);this.vPa.v.length&&this.vPa.v.slice().forEach(this.eg);this.xPa.v.length&&this.xPa.v.slice().forEach(this.Ca);this.yPa.v.length&&this.yPa.v.slice().forEach(this.Ca)};a.prototype.xb=function(b){b.N(n.XF)};a.prototype.Ca=function(b){b.ka(n.XF)};var k=new THREE.Matrix4,e=new THREE.Vector3;a.prototype.eg=function(b){var c=b.getComponent(n.Tk),d=b.getComponent(n.ta);if(d){var f=b.getComponent(n.Object3D).sa;if(f&&f.parent){var l=
b.getComponent(n.Gg),p=1E-7;l&&(p=g.uJ(b)||p);k.copy(f.parent.matrixWorld).invert();e.setFromMatrixScale(k);f=Math.max(e.x,e.y,e.z);l&&l.bA&&(p/=f,f=1);l=c.scale*f;c.oE!==void 0&&(l=Math.min(c.oE*p,l));c.pE!==void 0&&(l=Math.max(c.pE*p,l));if(d.scale!=l||d.Le!=c.Le||d.Ye!=c.Ye||d.Gh!=c.Gh)d=b.O(n.ta),d.scale=l,d.Le=c.Le,d.Ye=c.Ye,d.Gh=c.Gh}}};a.J={};a.J.wPa=[n.Object3D,n.Tk,n.XF.aa];a.J.vPa=[n.Object3D,n.Tk,n.XF];a.J.xPa=[n.Object3D.aa,n.XF];a.J.yPa=[n.Tk.aa,n.XF];return a});
define("tdv/player/view/webgl/system/pointerOverTransform/Behaviour",["require","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util"],function(a){function m(u){this.B=u;this.yT=new THREE.Vector3;this.Sb=new THREE.Vector3;this.Hga=this.Cd=this.nla=!1;this.nN=null;this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.update=function(){this.Lia=this.B.getComponent(n.Dl).F};
m.prototype.frame=function(){this.bHa();this.$z()};m.prototype.bHa=function(){var u=(t.get(this.B.T)||[]).map(function(v){return v.getComponent(n.zc)}).filter(function(v){return v&&v.M}).reduce(function(v,w){return!v||!v.Ug&&w.Ug?w:v},null);u=u&&u.M;this.nN!==u&&(this.nN&&this.c7a(this.nN),(this.nN=u)&&this.rXa(this.nN))};m.prototype.rXa=function(u){u.bind(h.gb,this.rg,this,!0);u.bind(h.Eb,this.Es,this,!0)};m.prototype.c7a=function(u){u.h(h.gb,this.rg,this);u.h(h.Eb,this.Es,this)};m.prototype.rg=
function(u){if(this.Lia&&g.ZD(g.Qc(this.Lia),u.data.objectId)&&["mesh","gs"].includes(u.data.type)){var v=this.Cd;this.Cd=!0;var w=g.Qc(this.B);if((w=w&&w.parent)&&w.matrixWorld){var x=this.B.getComponent(n.Dl);x&&(e.setFromMatrixPosition(w.matrixWorld),b.copy(w.matrixWorld).invert(),c.fromArray(u.data.objectMatrixWorld),k.setFromMatrixPosition(c),d.copy(c).invert(),x.rotate?u.data.normal?this.yT.copy(u.data.normal).applyMatrix4(c).sub(k).add(e):this.yT.copy(u.data.cameraPosition):this.yT.copy(p),
this.yT.applyMatrix4(b).normalize(),this.Sb.copy(u.data.position).applyMatrix4(b),this.nla=!0,this.B.T.Qa(),v||(u=(x=this.B.getComponent(n.Dl))&&x.M)&&u.o(h.uc))}}else this.Es()};var k=new THREE.Vector3,e=new THREE.Vector3,b=new THREE.Matrix4,c=new THREE.Matrix4,d=new THREE.Matrix4;m.prototype.Es=function(){if(this.Cd){this.Cd=!1;this.B.T.Qa();var u=this.B.getComponent(n.Dl);(u=u&&u.M)&&u.o(h.Eb)}};m.prototype.$z=function(){if(this.nla||this.Cd){this.nla=!1;var u=this.B.O(n.ta,!0);u.positionX=0;u.positionY=
0;u.positionZ=0;f.setFromUnitVectors(l,this.yT);q.setFromQuaternion(f,u.mf);u.Yd=q.x*r;u.fd=q.y*r;u.Xe=q.z*r;u.translationX=this.Sb.x;u.translationY=this.Sb.y;u.Ze=this.Sb.z;u.easing=this.Hga?.4:0;this.Hga||(g.eZ(this.B,u),this.Hga=!0)}};var f=new THREE.Quaternion,l=new THREE.Vector3(0,0,1),p=new THREE.Vector3(0,1,0),q=new THREE.Euler,r=180/Math.PI;m.prototype.dispose=function(){this.Lia=null;this.bHa()};m.rK=function(u,v){t.set(u,v)};var t=new Map;m.Wa=function(u){u.N(n.Eu).manager=new m(u)};m.ya=
function(u){var v=u.getComponent(n.Eu);v.manager.dispose();v.manager=null;u.ka(n.Eu)};m.frame=function(u){u.getComponent(n.Eu).manager.frame()};m.update=function(u){u.getComponent(n.Eu).manager.update()};return m});
define("tdv/player/view/webgl/system/pointerOverTransform/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/pointerOverTransform/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/pointerOverTransform/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){g.rK(this.T,this.Wj.v.slice());
this.DPa.v.length&&this.DPa.v.slice().forEach(g.Wa);this.P9.Da.length&&this.P9.v.slice().forEach(g.update);this.P9.v.length&&this.P9.v.slice().forEach(g.frame);this.EPa.v.length&&this.EPa.v.slice().forEach(g.ya);this.FPa.v.length&&this.FPa.v.slice().forEach(g.ya)};a.J={};a.J.Wj=[n.zc];a.J.DPa=[n.Object3D,n.Dl,n.Eu.aa];a.J.P9=[n.Object3D,n.Dl,n.Eu];a.J.EPa=[n.Object3D.aa,n.Eu];a.J.FPa=[n.Dl.aa,n.Eu];return a});
define("tdv/player/view/webgl/system/util/material/ProjectedMaterial",["require"],function(){var a={Rp:function(){this.fmb=this.VRa=this.emb=this.R$=this.Q$=this.P$=0;this.Qra=!1;this.rZ=new THREE.CubeTexture;this.Cmb=this.rSa=this.Bmb=this.baa=this.targetY=this.targetX=this.O$=0;this.Yra=!1;this.zZ=new THREE.CubeTexture;this.aaa=0;this.mf="XYZ"},Jpb:function(){return new a.Rp},create:function(n){var g=new THREE.ShaderMaterial;g.uniforms={sCube:{value:n.rZ},sPos:{value:new THREE.Vector3},sRot:{value:new THREE.Matrix4},
sEnabled:{value:!1},sCoef:{value:0},tCube:{value:n.zZ},tPos:{value:new THREE.Vector3},tRot:{value:new THREE.Matrix4},tEnabled:{value:!1},tCoef:{value:0}};g.fragmentShader="uniform samplerCube sCube;\nuniform vec3 sPos;\nuniform mat4 sRot;\nuniform bool sEnabled;\nuniform float sCoef;\nuniform samplerCube tCube;\nuniform vec3 tPos;\nuniform mat4 tRot;\nuniform bool tEnabled;\nuniform float tCoef;\nvarying vec3 vWorldPosition;\nvoid main() {\n    vec4 sFragColor;\n    vec4 tFragColor;\n    if (sEnabled) \n    {\n        vec4 sCubePosition4 = sRot * vec4((vWorldPosition - sPos), 1);\n        vec3 sCubePosition = sCubePosition4.xyz / sCubePosition4.w;\n        sFragColor = textureCube(sCube, sCubePosition);\n    }\n    if (tEnabled)\n    {\n        vec4 tCubePosition4 = tRot * vec4((vWorldPosition - tPos), 1);\n        vec3 tCubePosition = tCubePosition4.xyz / tCubePosition4.w;\n        tFragColor = textureCube(tCube, tCubePosition);\n    }\n    if (sEnabled && tEnabled)\n    {\n        float alpha = 1.0 - ((1.0 - tCoef) * (1.0 - sCoef));\n        vec4 mixedColor = mix(sFragColor, tFragColor, tCoef);\n        gl_FragColor = vec4(mixedColor.rgb, mixedColor.a * alpha);\n    }\n    else if (sEnabled)\n    {\n        gl_FragColor = vec4(sFragColor.rgb, sFragColor.a * sCoef);\n    }\n    else if (tEnabled)\n    {\n        gl_FragColor = vec4(tFragColor.rgb, tFragColor.a * tCoef);\n    }\n    else\n    {\n        gl_FragColor = vec4(0, 0, 0, 0);\n    }\n#include <tonemapping_fragment>\n#include <colorspace_fragment>\n}";
g.vertexShader="varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n   gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";g.side=THREE.DoubleSide;g.depthWrite=!0;g.transparent=!0;g.needsUpdate=!0;this.update(g,n);return g},update:function(n,g){n.uniforms.sCube.value=g.rZ;n.uniforms.sPos.value.set(g.P$,g.Q$,g.R$);n.uniforms.sRot.value.makeRotationFromEuler(m.set(g.emb*h,g.VRa*h,g.fmb*h,g.mf));n.uniforms.sEnabled.value=
g.Qra&&g.O$>0;n.uniforms.sCoef.value=g.O$;n.uniforms.tCube.value=g.zZ;n.uniforms.tPos.value.set(g.targetX,g.targetY,g.baa);n.uniforms.tRot.value.makeRotationFromEuler(m.set(g.Bmb*h,g.rSa*h,g.Cmb*h,g.mf));n.uniforms.tEnabled.value=g.Yra&&g.aaa>0;n.uniforms.tCoef.value=g.aaa;n.needsUpdate=!0;return n}},m=new THREE.Euler,h=Math.PI/180;return a});
define("tdv/player/view/webgl/system/projectedMaterial/System","require tdv/utils tdv/constants/RenderOrder tdv/player/view/util/geo/Fov tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/material/ProjectedMaterial tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/RenderOrder");a("tdv/player/view/util/geo/Fov");var n=a("tdv/player/view/webgl/ecs/System"),g=a("tdv/player/view/webgl/components"),
k=a("tdv/player/view/webgl/system/util/material/ProjectedMaterial"),e=a("tdv/player/view/webgl/system/util/entity/Util");a=m.extend(n,function(){n.apply(this,arguments);this.xb=this.xb.bind(this);this.Ca=this.Ca.bind(this);this.ib=this.ib.bind(this)});a.prototype.Yc=function(){this.UPa.v.length&&this.UPa.v.slice().forEach(this.Ca);this.VPa.v.length&&this.VPa.v.slice().forEach(this.Ca);this.TPa.v.length&&this.TPa.v.slice().forEach(this.xb);this.SPa.Da.length&&this.SPa.Da.slice().forEach(this.ib)};
a.prototype.xb=function(c){var d=c.getComponent(g.po),f=(d=d&&d.bF)&&e.Qc(d),l=e.Sf(d);if(f&&l){var p=c.N(g.Tr);p.bF=d;p.DP=new k.Rp;p.material=this.ly(p.DP);p.sa=this.zZa(f,p.material);p.iQ=this.OZa(p.material);p.MA=this.v_a(p.material);p.colorSpace=e.sX(l);c.N(g.Object3D).sa=p.sa;this.ib(c)}};a.prototype.ib=function(c){this.Qj(c);this.Yab(c);this.Xab(c);this.Dab(c)};a.prototype.Ca=function(c){var d=c.getComponent(g.Tr),f=e.Qc(d.bF);f&&(f.visible=!0);d.sa&&d.sa.traverse(function(l){l.material==d.material&&
(l.material=b)});d.iQ&&((f=d.iQ.parent)&&e.fQa(f,d.iQ),d.iQ=null);d.MA&&((f=d.MA.parent)&&e.eQa(f,d.MA),d.MA=null);d.material&&(d.DP.rZ=null,d.DP.zZ=null,d.DP=null,d.material.dispose(),d.material=null);c.ka(g.Tr);c.ka(g.Object3D)};a.prototype.Qj=function(c){var d=c.getComponent(g.po);c=c.getComponent(g.Tr);var f=c.DP;d.qZ?(f.rZ!=d.qZ&&(f.rZ=d.qZ),f.P$=d.P$,f.Q$=d.Q$,f.R$=d.R$,f.VRa=d.sZ,f.O$=d.TRa,f.Qra=!0):(f.Qra=!1,f.O$=0);d.yZ?(f.zZ!=d.yZ&&(f.zZ=d.yZ),f.targetX=d.targetX,f.targetY=d.targetY,f.baa=
d.baa,f.rSa=d.Dmb,f.aaa=d.pSa,f.Yra=!0):(f.Yra=!1,f.aaa=0);k.update(c.material,f)};a.prototype.Yab=function(c){c=c.getComponent(g.po);var d=e.Qc(c.bF);d&&(d.visible=(1-(c.qZ?c.TRa:0))*(1-(c.yZ?c.pSa:0))>0)};a.prototype.Xab=function(c){var d=c.getComponent(g.po),f=c.getComponent(g.Tr).iQ;!!f.parent!=d.RRa&&(c=(c=e.Sf(c)||e.Sf(d.bF))&&e.sw(c),d.RRa?c&&e.Ibb(c,f):c&&e.fQa(c,f))};a.prototype.Dab=function(c){var d=c.getComponent(g.po),f=c.getComponent(g.Tr).MA;!!f.parent!=d.MA&&(c=(c=e.Sf(c)||e.Sf(d.bF))&&
e.sw(c),d.MA?c&&e.Hbb(c,f):e.eQa(c,f))};var b=new THREE.MeshBasicMaterial;a.prototype.ly=function(c){c=k.create(c);c.polygonOffset=!0;c.polygonOffsetUnits=1;c.polygonOffsetFactor=-10;c.needsUpdate=!0;return c};a.prototype.zZa=function(c,d){if(this.$xa(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.$xa(w)}.bind(this));
t.children.length!=v.length&&(u.children=t.children,t.children=v);f.set(t,u)}}.bind(this));var l=c.clone();f.forEach(function(t,u){t.material&&(u.material=t.material);t.userData&&(u.userData=t.userData);t.children&&(u.children=t.children)});for(c=[[c,l]];c.length;){var p=c.shift(),q=p[0];p=p[1];q.Me&&(p.Me=q.Me);for(var r=0;r<q.children.length;r++)c.push([q.children[r],p.children[r]])}return l};a.prototype.$xa=function(c){return c.yw||c.isGaussianCloud};a.prototype.OZa=function(c){return new THREE.Mesh(new THREE.BoxGeometry(2,
2,2),c)};a.prototype.v_a=function(c){c=new THREE.Mesh(new THREE.PlaneGeometry(1,1),c);c.renderOrder=h.MVa;return c};a.J={};a.J.TPa=[g.po,g.Tr.aa];a.J.SPa=[g.po,g.Object3D,g.Tr];a.J.UPa=[g.po.aa,g.Tr];a.J.VPa=[g.Object3D.aa,g.Tr];return a});
define("tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion",["require","tdv/player/view/webgl/components","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){function m(k){this.B=k;this.enabled=!1;this.Jo=null;this.wy=0;this.passes=[];this.xm=this.zm=!1;this.Lf=null;this.Ha=this.Pa=100}var h=a("tdv/player/view/webgl/components"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");m.prototype.dispose=function(){this.Lf&&(this.Lf.saoRenderTarget.dispose(),this.Lf.blurIntermediateRenderTarget.dispose(),
this.Lf.beautyRenderTarget.dispose(),this.Lf.normalRenderTarget.dispose(),this.Lf.depthRenderTarget.dispose(),this.Lf.depthMaterial.dispose(),this.Lf.normalMaterial.dispose(),this.Lf.saoMaterial.dispose(),this.Lf.vBlurMaterial.dispose(),this.Lf.hBlurMaterial.dispose(),this.Lf.materialCopy.dispose(),this.Lf.depthCopy.dispose(),this.Lf=null)};m.prototype.update=function(k,e,b,c,d){var f=this.B.getComponent(h.MK),l=!!f;if(this.zm=this.enabled!=l)(this.enabled=l)?(!this.Lf&&k&&e&&(this.Lf=new THREE.SAOPass(k,
e,!1,!0)),this.Jo=new n("linear",[new g("alpha",0,1,void 0)],f.lKa),this.wy=0,this.passes=[this.Lf],this.xm=!0):(this.passes=[],this.xm=!1);this.enabled&&(this.Jo&&(this.Jo.Nb(d),this.wy=this.Jo.ob("alpha"),this.wy==1&&(this.Jo=null),this.B.T.Qa()),f.output!==null&&(this.Lf.params.output=f.output),this.Lf.params.saoBias=f.bias/f.scale,this.Lf.params.saoIntensity=this.wy*f.intensity,this.Lf.params.saoScale=f.scale,this.Lf.params.saoKernelRadius=f.gNa,this.Lf.params.saoMinResolution=f.INa/1E3,this.Lf.params.saoBlur=
f.cna>0,this.Lf.params.saoBlurRadius=f.cna,this.Lf.params.saoBlurStdDev=8,this.Lf.params.saoBlurDepthCutoff=.01,(this.Pa!=b||this.Ha!=c)&&this.Lf.setSize(this.Pa=b,this.Ha=c))};return m});
define("tdv/player/view/webgl/system/renderer/effect/Antialias",["require","tdv/player/view/webgl/components"],function(a){function m(n){this.B=n;this.enabled=!1;this.passes=[];this.xm=this.zm=!1;this.Lu=null}var h=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.Lu&&(this.Lu.material.dispose(),this.Lu=null)};m.prototype.update=function(n,g,k,e){n=this.B.getComponent(h.pF);n=!!n&&n.RKa;if(this.zm=this.enabled!=n)(this.enabled=n)?(this.Lu||(this.Lu=new THREE.ShaderPass(THREE.FXAAShader),
this.Lu.needsSwap=!0),this.passes=[this.Lu],this.xm=!0):(this.passes=[],this.xm=!1);!this.enabled||this.Pa==k&&this.Ha==e||(this.Pa=k,this.Ha=e,this.Lu.material.uniforms.resolution.value.x=1/this.Pa,this.Lu.material.uniforms.resolution.value.y=1/this.Ha,this.Lu.setSize(k,e))};return m});
define("tdv/player/view/webgl/system/renderer/effect/MotionBlur",["require","tdv/player/view/webgl/components"],function(a){function m(n){this.B=n;this.enabled=!1;this.$P=void 0;this.Jo=null;this.wy=0;this.passes=[];this.xm=this.zm=!1;this.Zi=null;this.tja=new THREE.Matrix4;this.wja=new THREE.Matrix4;this.sja=new THREE.Vector3}var h=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.Zi&&(this.Zi.dispose(),this.Zi=null)};m.prototype.update=function(n,g){var k=this.B.getComponent(h.PQ),
e=!!k,b=k?k.vQa:void 0;if(this.zm=this.enabled!=e||this.$P!=b)(this.enabled=e)?(this.$P!=b&&this.Zi&&(this.Zi.dispose(),this.Zi=null),!this.Zi&&n&&g&&(this.Zi=new THREE.MotionBlurPass(this.$P=b),this.Zi.needsSwap=!0,this.tja.copy(g.matrixWorldInverse),this.wja.copy(g.projectionMatrix),this.sja.copy(g.position)),this.passes=[this.Zi],this.xm=!0):(this.passes=[],this.xm=!1);this.enabled&&(this.Zi.uniforms.inverseProjectionMatrix.value.copy(g.projectionMatrix).invert(),this.Zi.uniforms.near.value=g.near,
this.Zi.uniforms.far.value=g.far,this.Zi.uniforms.depthLimit.value=.99,this.Zi.uniforms.clipToWorldMatrix.value.copy(g.matrixWorld).multiply(this.Zi.uniforms.inverseProjectionMatrix.value),this.Zi.uniforms.previousWorldToClipMatrix.value.copy(this.wja).multiply(this.tja),this.Zi.uniforms.cameraMove.value.copy(g.position).sub(this.sja),this.Zi.uniforms.velocityFactor.value=k.intensity);this.tja.copy(g.matrixWorldInverse);this.wja.copy(g.projectionMatrix);this.sja.copy(g.position)};return m});
define("tdv/player/view/webgl/system/renderer/effect/Rendering",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function m(n){this.B=n;this.enabled=!0;this.passes=[];this.Qpa=this.xm=this.zm=!1;this.o5=void 0;this.Ti=this.Qs=this.hm=null}a("tdv/player/view/util/Color");var h=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.hm&&(this.hm.dispose(),this.hm=null);this.Qs&&(this.Qs=null);this.Ti&&(this.Ti.material.dispose(),this.Ti=null)};
m.prototype.update=function(n,g,k,e,b,c){b=this.B.getComponent(h.pF);c=!!b&&b.fSa&&c;if(this.zm=this.o5!==c)(this.o5=c)?(this.hm||(this.hm=new THREE.SSAARenderPass(n,g),this.hm.sampleLevel=b.tZ,this.hm.needsSwap=!0,this.hm.clear=!0,this.hm.clearColor=65793,this.hm.clearAlpha=0),this.Ti||(this.Ti=new THREE.ShaderPass(THREE.CopyShader),this.Ti.needsSwap=!0),this.passes=[this.hm,this.Ti],this.Qpa=this.xm=!0):(this.Qs||(this.Qs=new THREE.RenderPass,this.Qs.clear=!0,this.Qs.clearColor=65793,this.Qs.clearAlpha=
0),this.passes=[this.Qs],this.Qpa=this.xm=!1);this.o5?(this.hm.scene=n,this.hm.camera=g,this.hm.sampleLevel=b.tZ,this.Ti.uniforms.opacity.value=Math.pow(2,Math.round(b.tZ>5?5:b.tZ)),this.hm.setSize(k,e)):(this.Qs.scene=n,this.Qs.camera=g,this.Qs.setSize(k,e))};return m});
define("tdv/player/view/webgl/system/renderer/effect/Vignette",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function m(k){this.B=k;this.enabled=!1;this.passes=[];this.xm=this.zm=!1;this.it=null;this.Ne=void 0}var h=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");m.prototype.dispose=function(){this.it&&(this.it.material.dispose(),this.it=null)};m.prototype.update=function(){var k=this.B.getComponent(n.mL),e=!!k;if(this.zm=this.enabled!=
e)(this.enabled=e)?(this.it||(this.it=new THREE.ShaderPass(g),this.it.needsSwap=!0),this.passes=[this.it],this.xm=!0):(this.passes=[],this.xm=!1);this.enabled&&(this.it.uniforms.innerRadius.value=k.HMa,this.it.uniforms.outerRadius.value=k.kPa,this.it.uniforms.opacity.value=k.opacity,this.Ne!==k.color&&(this.Ne=k.color,this.it.uniforms.color.value=h.Ip(this.Ne)))};var g={uniforms:{tDiffuse:{value:null},innerRadius:{value:.5},outerRadius:{value:.5},opacity:{value:.5},color:{value:new THREE.Color(0,
0,0)}},vertexShader:"varying vec2 vUv;\nvoid main() {\n    vUv = uv;\n    gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform float innerRadius;\nuniform float outerRadius;\nuniform float opacity;\nuniform vec3 color;\nuniform sampler2D tDiffuse;\nvarying vec2 vUv;\nvoid main() {\n    vec4 texel = texture2D(tDiffuse, vUv);\n    vec2 uv = vUv - vec2(0.5, 0.5);\n    float radius = sqrt(dot(uv, uv)) * 1.4142135623730951;\n    float coef = clamp((radius - innerRadius) / (outerRadius - innerRadius), 0.0, 1.0);\n    float alpha = opacity * coef;\n    float composedAlpha = alpha + texel.a * (1.0 - alpha);\n    if (composedAlpha > 0.0)\n    {\n        vec3 rgb = (color * alpha + texel.rgb * texel.a * (1.0 - alpha)) / composedAlpha;\n        gl_FragColor = vec4(rgb, composedAlpha);\n    }\n    else\n    {\n        gl_FragColor = texel;\n    }\n}"};
return m});
define("tdv/player/view/webgl/system/renderer/ScenePostprocessing","require tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion tdv/player/view/webgl/system/renderer/effect/Antialias tdv/player/view/webgl/system/renderer/effect/MotionBlur tdv/player/view/webgl/system/renderer/effect/Rendering tdv/player/view/webgl/system/renderer/effect/Vignette tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(c){this.ee=c;this.Bb=this.Ac=this.ng=null;this.Ha=this.Pa=void 0;
this.QU=null;this.Aea=!0;this.Ti=this.dv=this.j=null;this.V0=[new k(c),new h(c),new g(c),new e(c),new n(c)];this.a3=!1}var h=a("tdv/player/view/webgl/system/renderer/effect/AmbientOcclusion"),n=a("tdv/player/view/webgl/system/renderer/effect/Antialias"),g=a("tdv/player/view/webgl/system/renderer/effect/MotionBlur"),k=a("tdv/player/view/webgl/system/renderer/effect/Rendering"),e=a("tdv/player/view/webgl/system/renderer/effect/Vignette"),b=a("tdv/player/view/webgl/system/util/entity/Util");m.prototype.dispose=
function(){this.j&&(this.j.domElement.style.backgroundColor=void 0);for(;this.V0.length;)this.V0.pop().dispose();this.Dea();this.dv&&(this.dv.material.dispose(),this.dv=null);this.Ti&&(this.Ti.material.dispose(),this.Ti=null)};m.prototype.setSize=function(c,d){if(this.Pa!=c||this.Ha!=d)this.Pa=c,this.Ha=d,this.ng&&this.ng.setSize(this.Pa,this.Ha),this.j&&!this.j.xr.isPresenting&&this.j.setSize(this.Pa,this.Ha)};m.prototype.Xw=function(c){this.Bb=c};m.prototype.setCamera=function(c){this.Ac=c};m.prototype.setRenderTarget=
function(c){this.QU!=c&&(this.QU=c,this.Dea())};m.prototype.okb=function(c){this.Aea!=c&&(this.Aea=c,this.ng&&(this.ng.renderToScreen=c))};m.prototype.B$=function(c){this.j!=c&&(this.j=c,this.j.setSize(this.Pa,this.Ha),this.Dea())};m.prototype.render=function(c){this.p9a();this.oab(c);this.j.domElement.style.backgroundColor=this.a3?"#000000":void 0;this.ng.renderTarget1.bNa=!0;this.ng.renderTarget2.bNa=!0;this.ng.render()};m.prototype.p9a=function(){this.ng||(this.ng=new THREE.EffectComposer(this.j,
this.QU||void 0),this.ng.renderToScreen=this.Aea,this.ng.setSize(this.Pa,this.Ha))};m.prototype.oab=function(c){var d=!1,f=!1;this.a3=!1;this.V0.forEach(function(p){p.update(this.Bb,this.Ac,this.Pa,this.Ha,c,this.ng.renderToScreen);d||(d=p.zm);f||(f=p.xm);this.a3||(this.a3=p.Qpa)}.bind(this));f=f&&this.j.outputColorSpace==THREE.SRGBColorSpace&&this.ng.renderToScreen;b.wlb(this.Bb,f);f&&!this.dv?(this.dv=new THREE.ShaderPass(THREE.GammaCorrectionShader),d=this.dv.needsSwap=!0):this.dv&&(this.dv.enabled=
f);this.ng.renderToScreen||this.Ti?this.Ti&&(this.Ti.enabled=!this.ng.renderToScreen):(this.Ti=new THREE.ShaderPass(THREE.CopyShader),d=this.Ti.needsSwap=!0);if(d){var l=[];this.V0.forEach(function(p){l=l.concat(p.passes)});this.dv&&l.push(this.dv);for(this.Ti&&l.push(this.Ti);this.ng.passes.length>0;)this.ng.removePass(this.ng.passes[this.ng.passes.length-1]);l.forEach(function(p){this.ng.addPass(p)}.bind(this))}};m.prototype.Dea=function(){this.ng&&(this.ng.renderTarget1!=this.QU&&this.ng.renderTarget1.dispose(),
this.ng.renderTarget2!=this.QU&&this.ng.renderTarget2.dispose(),this.ng=null)};return m});
define("tdv/player/view/webgl/system/renderer/SceneRenderer","require tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/Util tdv/player/view/webgl/system/renderer/ScenePostprocessing".split(" "),function(a){function m(l){this.Od=l;this.opacity=0;this.height=this.width=void 0;this.renderTarget=null;this.scene=void 0;this.sEa=!1;this.eka=!0;this.KY=this.camera=void 0;this.mI=!1;this.O3=void 0;
this.Pc=new b(l);this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/util/entity/Util"),e=a("tdv/player/view/webgl/system/util/Util"),b=a("tdv/player/view/webgl/system/renderer/ScenePostprocessing");m.prototype.update=function(){var l=this.Od.getComponent(g.Scene);this.opacity=l&&l.opacity||0;this.sEa=l?l.locked:!1;this.eka=l?l.enabled:!0;var p=l&&l.scene;this.scene!=p&&(this.scene=p,this.mI=!0,this.Pc.Xw(this.scene));
var q=(p=l&&l.Ea)&&k.kX(p),r=q&&q.width;q=q&&q.height;if(this.width!=r||this.height!=q)this.width=r,this.height=q,this.mI=!0,this.Pc.setSize(this.width,this.height);l=l&&l.outputColorSpace=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.O3!=l&&(this.O3=l,this.mI=!0,k.vlb(this.scene,l));l=p&&k.At(p);this.camera!=l&&(this.camera=l,this.mI=!0,this.Pc.setCamera(this.camera));p=p&&k.kX(p).camera;this.KY!=p&&(this.KY=p);this.scene&&(k.ulb(this.scene,this.camera),k.xlb(this.scene,n.isPresenting?
2048:this.width,n.isPresenting?2048:this.height));return this};m.prototype.render=function(l,p,q){if((p||this.mI||!this.sEa)&&this.eka){this.renderTarget||(this.renderTarget=e.QJa(l));p?(l.xr.isPresenting||l.setRenderTarget(null),this.mI=!0):(l.setRenderTarget(this.renderTarget),this.renderTarget.texture.colorSpace=this.O3,this.mI=!1);l.outputColorSpace=this.O3;var r=this.Od.getComponent(g.Scene),t=e.UKa(l.domElement);r&&r.M9!==1&&(t*=r.M9);l.getPixelRatio()!=t&&l.setPixelRatio(t);this.Ogb();l.xr.isPresenting?
(l.clear(),l.render(this.scene,this.KY)):(this.Pc.setRenderTarget(this.renderTarget),this.Pc.okb(p),this.Pc.B$(l),this.Pc.render(q));this.Ujb();(r=this.Od.getComponent(g.Scene))&&r.M&&r.M.o(h.Zd)}};m.prototype.Ogb=function(){var l=[],p=[];this.scene.traverse(function(q){q.yw||q.isGaussianCloud?l.push(q):q.visible&&q.material&&q.material.transparent&&q.material.depthTest&&q.renderOrder<=0&&q.renderOrder>=-100&&q.material.opacity>0&&p.push(q)});c.camera=this.KY;c.ray.origin.setFromMatrixPosition(this.KY.matrixWorld);
c.firstHitOnly=!0;p.forEach(function(q){f.setFromMatrixPosition(q.matrixWorld).sub(c.ray.origin);c.ray.direction.copy(f).normalize();var r=f.length();c.far=r;d.length=0;d=c.intersectObjects(l,!1,d);d.length>0&&d[0].distance<r&&(q.visible=!1,q.userData.TSa=!0)})};m.prototype.Ujb=function(){this.scene.traverse(function(l){l.userData.TSa&&(l.visible=!0,delete l.userData.TSa)})};var c=new THREE.Raycaster,d=[],f=new THREE.Vector3;m.prototype.isVisible=function(){return this.scene&&this.camera&&this.opacity>
0&&this.eka};m.prototype.dispose=function(){this.camera=this.scene=this.Od=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.B=e;this.Cz=[];this.ej=null;this.i9a();this.g9a()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/webgl/components"),k=a("tdv/player/view/webgl/system/renderer/SceneRenderer");m.prototype.frame=function(e){var b=!!this.j&&
n.Ag==this.j;if(!n.isPresenting||b){var c=this.B.getComponent(g.wj).LY.map(function(l){for(var p=0;p<this.Cz.length;p++)if(this.Cz[p].Od==l)return this.Cz[p].update();return new k(l)}.bind(this));this.Cz.filter(function(l){return c.indexOf(l)<0}).forEach(function(l){l.dispose()});this.Cz=c;var d=this.Cz.filter(function(l){return l.isVisible()});if(d.length>0){b&&d.reduce(function(l,p){return l.opacity>p.opacity?l:p});var f=d.length==1&&d[0].opacity>=1||b;d.forEach(function(l){l.render(this.j,f,e)}.bind(this));
f||this.h7a(d.slice(0,2))}b&&this.B.T.Qa()}};m.prototype.h7a=function(e){this.Fo.material.uniforms.t1.value=e[0].renderTarget.texture;this.Fo.material.uniforms.o1.value=e[0].opacity;e.length>1?(this.Fo.material.uniforms.useT2.value=1,this.Fo.material.uniforms.t2.value=e[1].renderTarget.texture,this.Fo.material.uniforms.o2.value=e[1].opacity):this.Fo.material.uniforms.useT2.value=0;this.j.setSize(e[0].width,e[0].height);this.j.setRenderTarget(null);this.j.setClearColor(0,0);this.j.clear();this.j.render(this.lR,
this.rda)};m.prototype.dispose=function(){for(;this.Cz.length;)this.Cz.shift().dispose();this.Cz=null;this.h$a();this.k$a()};m.prototype.i9a=function(){var e=this.B.O(g.wj);this.ej=e.eb.Rc();this.ej.w6();e.renderer=this.ej.Kn();this.j=e.renderer;n.M.bind(h.V,this.MHa,this,!0)};m.prototype.k$a=function(){n.M.h(h.V,this.MHa,this);this.j=null;this.ej.Z9();this.ej=null};m.prototype.MHa=function(){this.B.T.Qa()};m.prototype.g9a=function(){this.lR=new THREE.Scene;this.rda=new THREE.OrthographicCamera(window.innerWidth/
-2,window.innerWidth/2,window.innerHeight/2,window.innerHeight/-2,-10,10);this.lR.add(this.rda);this.Fo=new THREE.Mesh(new THREE.PlaneGeometry(window.innerWidth,window.innerHeight),this.NZa());this.lR.add(this.Fo)};m.prototype.h$a=function(){this.lR.remove(this.Fo);this.Fo.geometry.dispose();this.Fo.geometry=null;this.Fo.material.dispose();this.lR=this.rda=this.Fo=this.Fo.material=null};m.prototype.NZa=function(){var e=new THREE.ShaderMaterial({uniforms:{t1:{value:null},t2:{value:null},o1:{value:1},
o2:{value:1},useT2:{value:1}},vertexShader:"varying vec2 vUv;\nvoid main() {\nvUv = vec2( uv.x, uv.y );\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D t1;\nuniform sampler2D t2;\nuniform float o1;\nuniform float o2;\nuniform int useT2;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texel1 = texture2D(t1, vUv);\n   texel1.a = texel1.a * o1;\n   if (useT2 == 1) {\n\t  vec4 texel2 = texture2D(t2, vUv);\n     texel2.a = texel2.a * o2;\n     gl_FragColor = mix(texel1, texel2, texel2.a);\n   } else {\n     gl_FragColor = texel1;\n   }\n#include <colorspace_fragment>\n#include <tonemapping_fragment>\n}"});
e.transparent=!0;return e};m.Wa=function(e){e.N(g.Fu).manager=new m(e)};m.ya=function(e){var b=e.getComponent(g.Fu);b.manager.dispose();b.manager=null;e.ka(g.Fu)};m.update=function(e){e.getComponent(g.Fu).manager.update()};m.frame=function(e,b,c){e.getComponent(g.Fu).manager.frame(b,c)};return m});
define("tdv/player/view/webgl/system/renderer/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/renderer/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/renderer/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(k,e){this.mQa.v.length&&this.mQa.v.slice().forEach(g.Wa);this.Vn.v.length&&
this.Vn.v.slice().forEach(function(b){g.frame(b,k,e)});this.nQa.v.length&&this.nQa.v.slice().forEach(g.ya)};a.J={};a.J.mQa=[n.wj,n.Fu.aa];a.J.nQa=[n.wj.aa,n.Fu];a.J.Vn=[n.wj,n.Fu];return a});
define("tdv/player/view/webgl/system/scene/BackgroundSprite","require tdv/utils tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/map/renderer/item/Item tdv/player/view/webgl/system/util/entity/Util tdv/constants/Priority tdv/player/view/image/Repository tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/RenderOrder"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/map/renderer/item/Item"),
e=a("tdv/player/view/webgl/system/util/entity/Util"),b=a("tdv/constants/Priority"),c=a("tdv/player/view/image/Repository"),d=a("tdv/player/view/util/XR");a=m.extend(g,function(l,p){g.call(this);this.Se=l;this.Bb=p;this.Ja=new k;this.Ja.fQ([this.Se]);this.Ja.bind(h.ia,this.Pe,this,!1);this.Ja.bind(h.$c,this.yh,this,!1);this.wc=null;this.Of=0;d.M.bind(h.V,this.xi,this,!0);c.FA(this.Ja,b.RF)});a.prototype.Zn=function(l){this.Of!==l&&(this.Of=l,this.xi())};a.prototype.oj=function(){return!!this.wc};a.prototype.Pe=
function(){this.z_a();this.o(h.ia)};a.prototype.yh=function(){this.o(h.$c)};a.prototype.z_a=function(){var l=new THREE.Texture;l.image=c.xg(this.Se);l.generateMipmaps=!0;l.minFilter=THREE.LinearMipMapLinearFilter;l.needsUpdate=!0;l=new THREE.SpriteMaterial({map:l});l.sizeAttenuation=!1;l.transparent=!0;l.polygonOffset=!0;l.polygonOffsetUnits=1;l.polygonOffsetFactor=-10;this.wc=new THREE.Sprite(l);this.wc.renderOrder=n.bUa;this.xi()};a.prototype.xi=function(){if(this.wc){var l=d.isPresenting&&d.Cm==
d.El.Np?0:this.Of;this.wc.material.opacity!=l&&(this.wc.material.opacity=l,this.wc.material.visible=l>0,this.wc.material.needsUpdate=!0)}};a.prototype.dispose=function(){this.wc&&(this.wc.parent&&e.Dqa(this.wc.parent,this.wc),this.wc.material.map.dispose(),this.wc.material.dispose(),this.wc=null)};a.prototype.update=function(){if(this.wc){var l=e.sw(this.Bb);this.wc.parent!=l&&(this.wc.parent&&e.Dqa(this.wc.parent,this.wc),l&&e.Gbb(l,this.wc));if(l){var p=e.dE(this.Bb),q=this.wc.material.map.image.width,
r=this.wc.material.map.image.height;l=p/(2*Math.tan(l.fov*f/2));p=Math.max(p/l,e.tX(this.Bb)/(l*q/r));this.wc.scale.y!=p&&(this.wc.scale.y=p,this.wc.scale.x=p*q/r)}q=e.sX(this.Bb);this.wc.material.map.colorSpace!=q&&(this.wc.material.map.colorSpace=q,this.wc.material.needsUpdate=!0)}};a.prototype.dispose=function(){this.wc&&(this.wc.parent&&e.Dqa(this.wc.parent,this.wc),this.wc.material.map.dispose(),this.wc.material.dispose(),this.wc=null);this.Ja&&c.ho(this.Ja,b.RF);d.M.h(h.V,this.xi,this)};var f=
Math.PI/180;return a});
define("tdv/player/view/webgl/system/scene/Background","require tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/webgl/system/scene/BackgroundSprite tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){function m(b,c){this.B=b;this.Oh=c;this.Yx=void 0;this.Ej=this.Do=this.la=this.Bb=null;this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/scene/BackgroundSprite"),k=a("tdv/view/util/Ease"),
e=a("tdv/view/util/EaseDimension");m.prototype.frame=function(b){this.la&&this.FI(b);this.Do&&this.Do.update();this.Ej&&this.Ej.update()};m.prototype.update=function(){var b=this.B.getComponent(n.Scene);this.Bb=b.scene;if(!this.Bb){if(!b.scene)return;this.Bb=b.scene}b=b.Xma||null;this.Yx===b||this.la||(this.PR(this.Ej),this.Ej=null,(this.Yx=b)?this.Ej=this.MZa(this.Yx):(this.HR(),this.Oh.o(h.ia)))};m.prototype.FI=function(b){this.la.Nb(b);this.Do&&this.Do.Zn(Math.min(1,Math.max(0,this.la.ob("alpha"))));
this.Ej&&this.Ej.Zn(Math.min(1,Math.max(0,this.la.ob("nextAlpha"))));this.la.Ve()&&(this.la=null,this.Do&&(this.PR(this.Do),this.Do=null),this.Do=this.Ej,this.Ej=null,this.update());this.B.T.Qa()};m.prototype.Cia=function(){this.Ej.h(h.ia,this.Cia,this,!0);this.Ej.h(h.$c,this.Dia,this,!0);this.HR();this.Oh.o(h.ia)};m.prototype.Dia=function(){this.PR(this.Ej);this.Ej=null;this.HR();this.Oh.o(h.ia)};m.prototype.HR=function(){this.Ej&&this.Do?this.la=new k("linear",[new e("nextAlpha",0,2,void 0),new e("alpha",
2,0,void 0)],600):this.Ej?this.la=new k("linear",[new e("nextAlpha",0,1,void 0)],300):this.Do&&(this.la=new k("linear",[new e("alpha",1,0,void 0)],300));this.B.T.Qa()};m.prototype.MZa=function(b){b=new g(b,this.Bb);this.qYa(b);b.Zn(0);return b};m.prototype.PR=function(b){b&&(this.S$a(b),b.dispose())};m.prototype.qYa=function(b){b.bind(h.ia,this.Cia,this,!0);b.bind(h.$c,this.Dia,this,!0)};m.prototype.S$a=function(b){b.h(h.ia,this.Cia,this,!0);b.h(h.$c,this.Dia,this,!0)};m.prototype.dispose=function(){this.Do&&
(this.PR(this.Do),this.Do=null);this.Ej&&(this.PR(this.Ej),this.Ej=null)};return m});
define("tdv/player/view/webgl/system/scene/Environment","require tdv/constants/EventName tdv/constants/Priority tdv/player/view/util/Color tdv/player/view/util/LoadingGroup tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/view/images/ImageLoader tdv/player/view/util/XR".split(" "),function(a){function m(f,l){this.B=f;this.TG=void 0;this.efa=1;this.O4=this.EN=this.DN=this.dC=this.qG=this.Yx=void 0;this.Ac=this.j=this.Bb=null;this.Oh=l;this.sf=new k(this.Oh);this.Sd=
[new c(n.RF),new c(n.RF)];this.Sd.forEach(function(p){p.bind(h.ia,this.Pe,this,!0);p.bind(h.$c,this.yh,this,!0)}.bind(this));d.M.bind(h.V,this.za,this,!0);this.iFa([]);this.update()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/util/Color"),k=a("tdv/player/view/util/LoadingGroup"),e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/webgl/system/util/entity/Util"),c=a("tdv/view/images/ImageLoader"),d=a("tdv/player/view/util/XR");m.prototype.frame=function(){if(this.Bb){var f=
m.Pfb(this.B.T,this.Bb);this.j!=f&&(this.j&&(this.Yu(),this.N0()),this.j=f)&&(this.za(),this.Tla())}};m.prototype.update=function(){var f=this.B.getComponent(e.Scene),l=!1,p=!1,q=f.uKa||null;this.TG!==q&&(this.TG=q,p=!0);q=f.Xma||null;this.Yx!==q&&(this.Yx=q,p=!0);q=f.FIa||null;this.qG!==q&&(this.qG=q,p=!0);p&&(this.pHa(),this.Tla(),l=!0);this.dC!==f.backgroundColor&&(this.dC=f.backgroundColor,l=!0);this.Bb!==f.scene&&(this.Bb=f.scene,l=!0);this.efa!==f.environmentIntensity&&(this.efa=f.environmentIntensity,
l=!0);l&&this.za()};m.prototype.pHa=function(){this.iFa(this.I2a())};m.prototype.I2a=function(){var f=[];this.TG&&f.indexOf(this.TG)==-1&&f.push(this.TG);!this.Yx&&this.qG&&f.indexOf(this.qG)==-1&&f.push(this.qG);if(this.Bb&&this.Bb.background&&this.Bb.background.image&&this.Bb.background.image.src){var l=this.Bb.background.image.src;f.indexOf(l)==-1&&f.push(l)}return f};m.prototype.iFa=function(f){var l=[],p=[];this.Sd.forEach(function(q){var r=q.rl();f.indexOf(r)<0?(q.cancel(),l.push(q)):p.push(r)});
f.forEach(function(q){p.indexOf(q)<0&&l.shift().load(q)})};m.prototype.Tla=function(){var f=0;this.sf.hJa();this.Sd.forEach(function(l){l.rl()&&!l.oj()&&(this.sf.sO(l),f++)}.bind(this));f==0&&this.Oh&&this.Oh.o(h.ia)};m.prototype.dispose=function(){this.Sd.forEach(function(f){f.cancel();f.h(h.ia,this.Pe,this,!0);f.h(h.$c,this.yh,this,!0)}.bind(this));this.B&&(this.N0(),this.Yu(),this.B=null);d.M.h(h.V,this.za,this)};m.prototype.Pe=function(){this.za();this.Tla()};m.prototype.za=function(){if(this.Bb&&
this.j){this.Bb.environmentIntensity=this.efa;if(this.TG){var f=this.Sya(this.TG);f&&this.MXa(f)}else this.N0();d.isPresenting&&d.Cm==d.El.Np?this.Yu():this.Yx?this.Yu():this.qG?(f=this.Sya(this.qG))&&this.Mva(f):this.dC?this.Mva(void 0,this.dC):this.Yu();this.pHa();this.B.T.Qa()}};m.prototype.Sya=function(f){for(var l=0;l<this.Sd.length;l++)if(this.Sd[l].oj()&&this.Sd[l].rl()==f)return this.Sd[l];return null};m.prototype.Mva=function(f,l){if(this.Bb){if(f){var p=f&&f.rl()||void 0;if(p==this.EN)return;
this.Yu();b.F$(this.Bb,this.ds(f,!1));this.EN=p;this.DN=void 0}l&&l!=this.DN&&(this.Yu(),b.F$(this.Bb,l=="transparent"?null:g.Ip(l)),this.DN=l,this.EN=void 0)}};m.prototype.Yu=function(){this.Bb&&(this.DN||this.EN)&&(this.EN&&(this.Bb.background.dispose(),b.F$(this.Bb,null),this.EN=void 0),this.DN&&(b.F$(this.Bb,null),this.DN=void 0))};m.prototype.MXa=function(f){if(this.Bb){var l=f&&f.rl()||void 0;l!=this.O4&&(this.N0(),this.Bb.environment=this.ds(f,d.isPresenting?!1:!0),this.O4=l)}};m.prototype.N0=
function(){this.Bb&&this.O4&&(this.Bb.environment.dispose(),this.Bb.environment=null,this.O4=void 0)};m.prototype.ds=function(f,l){return Math.round(f.fg()/f.wg())<6?this.b_a(f,l):this.WZa(f,l)};m.prototype.b_a=function(f,l){var p=new THREE.Texture;p.image=f.xg();p.colorSpace=b.sX(this.Bb);p.mapping=THREE.EquirectangularReflectionMapping;p.needsUpdate=!0;return l?(this.j.$q=!0,f=new THREE.PMREMGenerator(this.j),p=f.fromEquirectangular(p).texture,f.dispose(),this.j.$q=!1,p):p};m.prototype.WZa=function(f,
l){for(var p=Array(6),q=f.fg()/6,r=f.wg(),t=0;t<6;t++){var u=document.createElement("canvas");u.width=q;u.height=r;u.getContext("2d").drawImage(f.xg(),t*q,0,q,r,0,0,q,r);p[t]=u}f=new THREE.CubeTexture;f.images=[p[1],p[3],p[4],p[5],p[0],p[2]];f.colorSpace=b.sX(this.Bb);f.needsUpdate=!0;return l?(this.j.$q=!0,l=new THREE.PMREMGenerator(this.j),p=l.fromCubemap(f).texture,l.dispose(),this.j.$q=!1,p):f};m.prototype.yh=function(){this.B.getComponent(e.Scene).scene.environment=null;this.B.T.Qa()};m.bEa=
new Map;m.ura=function(f,l){m.bEa.set(f,l||[])};m.Pfb=function(f,l){f=m.bEa.get(f)||[];for(var p=0;p<f.length;p++){var q=f[p].getComponent(e.wj);if(q&&q.LY.filter(function(r){return r.getComponent(e.Scene).scene==l}).length>0)return q.renderer}return null};return m});
define("tdv/player/view/webgl/system/scene/FadeColor","require exports tdv/constants/RenderOrder tdv/player/view/util/Color tdv/player/view/util/XR tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util three.mod".split(" "),function(a,m,h,n,g,k,e,b){a=function(){function d(f){this.opacity=this.YO=void 0;this.F=f}d.prototype.frame=function(){var f=this.F.getComponent(k.Scene),l=f.scene,p=l&&e.sw(l),q=f.YO;f=f.ZW;!g.isPresenting&&p&&q&&f>0?(this.Hdb(),this.Xnb(l,p),this.Wnb(q,
f)):(this.opacity=this.YO=void 0,this.lJa())};d.prototype.update=function(){};d.prototype.Xnb=function(f,l){this.Gi.parent!=l&&l.add(this.Gi);var p=e.tX(f);f=e.dE(f);l.isPerspectiveCamera?(this.Gi.position.z=-l.near*1.01,l=f/(2*Math.tan(l.fov*c/2)),l=Math.max(f/l,p/(l*p/f)),this.Gi.scale.y=l,this.Gi.scale.x=l*p/f):l.isOrthographicCamera&&(this.Gi.position.z=-(l.near+1),this.Gi.scale.y=l.top-l.bottom,this.Gi.scale.x=l.right-l.left)};d.prototype.Wnb=function(f,l){this.YO!==f&&this.opacity!==l&&(this.Gi.material.color=
n.Ip(f),this.Gi.material.opacity=l,this.Gi.material.needsUpdate=!0)};d.prototype.Hdb=function(){if(!this.Gi){var f=new b.SpriteMaterial;f.depthTest=!1;f.renderOrder=h.qta;f.sizeAttenuation=!1;f.transparent=!0;f.visible=!0;f.opacity=0;f.needsUpdate=!0;this.Gi=new b.Sprite(f);this.Gi.renderOrder=h.qta}};d.prototype.lJa=function(){var f,l,p;if(this.Gi){var q=this.Gi.material;(f=q.map)===null||f===void 0||f.dispose();(l=q.envMap)===null||l===void 0||l.dispose();q.dispose();this.Gi.geometry.dispose();
(p=this.Gi.parent)===null||p===void 0||p.remove(this.Gi)}};d.prototype.dispose=function(){this.lJa()};return d}();var c=Math.PI/180;return a});
define("tdv/player/view/webgl/system/scene/Fog","require exports tdv/constants/EventName tdv/player/view/util/Color tdv/player/view/webgl/components three.mod tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){return function(){function b(c){this.F=c;e.M.bind(h.V,this.update,this,!0)}b.prototype.update=function(){var c=this.F.getComponent(g.Scene),d=c.scene,f=e.isPresenting&&e.Cm==e.El.Np?0:c.OKa;c=n.Ip(c.NKa||"#ffffff");f>0?d.fog==null?d.fog=new k.FogExp2(c,f):(d.fog.color=c,d.fog.density=
f):d.fog=null};b.prototype.dispose=function(){e.M.h(h.V,this.update,this);var c=this.F.getComponent(g.Scene);c&&c.scene&&(c.scene.fog=null)};return b}()});
define("tdv/player/view/webgl/system/scene/Behaviour","require tdv/player/view/webgl/components tdv/player/view/util/LoadingGroup tdv/player/view/webgl/system/scene/Background tdv/player/view/webgl/system/scene/Environment tdv/player/view/webgl/system/scene/FadeColor tdv/player/view/webgl/system/scene/Fog".split(" "),function(a){function m(c){this.B=c;this.Oh=null;var d=this.B.O(h.Scene),f=this.B.O(h.Vp);this.B.N(h.Object3D).sa=f.scene=d.scene=new THREE.Scene;this.sf=new n;this.$R=new k(c,this.sf.gw());
this.ae=new g(c,this.sf.gw());this.a1=new b(c);this.aya=new e(c)}var h=a("tdv/player/view/webgl/components"),n=a("tdv/player/view/util/LoadingGroup"),g=a("tdv/player/view/webgl/system/scene/Background"),k=a("tdv/player/view/webgl/system/scene/Environment"),e=a("tdv/player/view/webgl/system/scene/FadeColor"),b=a("tdv/player/view/webgl/system/scene/Fog");m.prototype.frame=function(c){this.$R.frame(c);this.ae.frame(c)};m.prototype.Zna=function(c){this.aya.frame(c)};m.prototype.update=function(){this.$R.update();
this.ae.update();this.a1.update();this.aya.update();this.xab()};m.prototype.xab=function(){var c=this.B.getComponent(h.Scene);this.Oh!=c.Wna&&(this.Oh=c.Wna,this.sf.vkb(this.Oh))};m.prototype.dispose=function(){this.sf&&(this.sf.dispose(),this.sf=null);this.ae&&(this.ae.dispose(),this.ae=null);this.$R&&(this.$R.dispose(),this.$R=null);this.a1&&(this.a1.dispose(),this.a1=null);this.B&&(this.B=null)};m.Wa=function(c){c.N(h.Vp).manager=new m(c)};m.ya=function(c){var d=c.getComponent(h.Vp);d.manager.dispose();
d.manager=null;c.ka(h.Vp);c.ka(h.Object3D)};m.frame=function(c,d){c.getComponent(h.Vp).manager.frame(d)};m.Zna=function(c,d){(c=c.getComponent(h.Vp))&&c.manager&&c&&c.manager.Zna(d)};m.update=function(c){c.getComponent(h.Vp).manager.update()};m.ura=function(c,d){k.ura(c,d)};return m});
define("tdv/player/view/webgl/system/scene/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/scene/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/scene/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(k){this.wQa.v.length&&this.wQa.v.slice().forEach(g.Wa);this.scenes.Da.length&&
this.scenes.Da.slice().forEach(g.update);this.scenes.v.length&&this.scenes.v.slice().forEach(function(e){g.frame(e,k)});g.ura(this.T,this.Vn.v.slice());this.xQa.v.length&&this.xQa.v.slice().forEach(g.ya)};a.J={};a.J.wQa=[n.Scene,n.Vp.aa];a.J.scenes=[n.Scene,n.Vp];a.J.xQa=[n.Scene.aa,n.Vp];a.J.Vn=[n.wj,n.Fu];a.m_=m.extend(h,function(){h.apply(this,arguments)});a.m_.prototype.Yc=function(k){this.scenes.v.length&&this.scenes.v.slice().forEach(function(e){g.Zna(e,k)})};a.m_.J={};a.m_.J.scenes=[n.Scene,
n.Vp];return a});
define("tdv/player/view/util/ColorPicker",["require","exports","three.mod","tdv/player/view/util/Device"],function(a,m,h,n){function g(c,d,f){try{if(c instanceof CanvasRenderingContext2D)return c.getImageData(d,f,1,1).data;if(c instanceof HTMLCanvasElement)return c.I3a?[0,0,0,0]:c.getContext("2d").getImageData(d,f,1,1).data;e.drawImage(c,d,f,1,1,0,0,1,1);return e.getImageData(0,0,1,1).data}catch(l){return[0,0,0,0]}}function k(c,d,f){c<0?c=f==h.RepeatWrapping?d+c%d:f==h.MirroredRepeatWrapping?Math.floor(Math.abs(c/
d))%2==0?Math.abs(c%d):d-1+c%d:0:c>=d&&(c=f==h.RepeatWrapping?c%d:f==h.MirroredRepeatWrapping?Math.floor(c/d)%2==1?d-1-c%d:c%d:d-1);return c}a=function(){function c(d){this.source=d;d instanceof HTMLCanvasElement?(this.canvas=d,this.scale=1):(this.canvas=document.createElement("canvas"),this.scale=n.Nd()==n.vj?.5:1,this.canvas.width=Math.round(d.width*this.scale),this.canvas.height=Math.round(d.height*this.scale));this.context=this.canvas.getContext("2d");this.context.globalCompositeOperation="copy";
this.canvas!=d&&this.context.drawImage(d,0,0,d.width,d.height,0,0,this.canvas.width,this.canvas.height)}c.prototype.transparent=function(d,f){return c.transparent(this.context,Math.round(d*this.scale),Math.round(f*this.scale))};c.prototype.$w=function(d,f){return c.$w(this.context,Math.round(d*this.scale),Math.round(f*this.scale))};c.prototype.info=function(d,f){return c.info(this.context,Math.round(d*this.scale),Math.round(f*this.scale))};c.prototype.dispose=function(){this.canvas!=this.source&&
(this.canvas.width=this.canvas.height=0)};c.Pmb=function(d,f,l){if(!d.image||!d.image.width||!d.image.height)return!0;f=k(Math.round(f*d.image.width),d.image.width,d.wrapS);l=k(Math.round((1-l)*d.image.height),d.image.height,d.wrapT);return!c.transparent(d.image,f,l)};c.transparent=function(d,f,l){return!c.$w(d,f,l)};c.$w=function(d,f,l){var p=d.tagName;return p&&p!="VIDEO"?g(d,f,l)[3]>0:!0};c.info=function(d,f,l){d=g(d,f,l);f=d[3];return{$w:f>0,opacity:f,color:"#"+b[d[0]]+b[d[1]]+b[d[2]]}};return c}();
m=document.createElement("canvas");m.width=m.height=1;var e=m.getContext("2d");e.globalCompositeOperation="copy";var b=function(){for(var c=Array(256),d=0;d<16;d++)c[d]="0"+d.toString(16);for(;d<256;d++)c[d]=d.toString(16);return c}();return a});
define("tdv/player/view/webgl/system/selection/Behaviour","require tdv/constants/EventName tdv/player/view/util/ColorPicker tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/util/RaycastUtil tdv/view/constants/Cursor".split(" "),function(a){function m(C){this.Bh=C;this.FN=this.zy=this.Oe=this.Lo=null;this.xT=void 0;this.Jy=!1;this.update()}function h(C,B,H,E){this.F=C;this.sa=B;this.point=H;this.normal=E}function n(C){return{x:C.x,y:C.y,z:C.z}}
function g(C,B,H,E){var G=B.T,N=C.get(G);N||C.set(G,N=[]);C=N.indexOf(B);H&&C<0?N.push(B):!H&&C>=0&&N.splice(C,1);E.delete(G)}var k=a("tdv/constants/EventName"),e=a("tdv/player/view/util/ColorPicker"),b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/util/entity/Util"),d=a("tdv/player/view/webgl/system/util/RaycastUtil"),f=a("tdv/view/constants/Cursor");m.prototype.update=function(){var C=this.Bh.getComponent(b.zc);C.St=this;this.dV(C&&C.enabled?C.WD:null);this.cV(C&&C.enabled?
C.d7:null)};m.prototype.frame=function(){this.pZa();var C=this.Bh.getComponent(b.zc);C&&C.ona?this.JCa():this.fka(q)};m.prototype.dV=function(C){if(this.Lo!=C){if(this.Lo)for(var B in u)this.Lo.h(B,this.Ee,this);if(this.Lo=C)for(B in u)this.Lo.bind(B,this.Ee,this,!0)}};m.prototype.Ee=function(C){var B=this.Bh.getComponent(b.zc);B&&B.enabled&&(B=u[C.name])&&B.call(this,C)};m.prototype.cV=function(C){this.Oe!=C&&(this.Oe&&this.Jy&&this.Oe.pop(f.qf),(this.Oe=C)&&this.Jy&&this.Oe.push(f.qf))};m.prototype.rg=
function(C){this.Mq(C);this.CM&&v.indexOf(this.Bh.T)==-1&&w.indexOf(this.Bh.T)==-1?this.fka(q):this.fka(p)};m.prototype.ez=function(C){this.Mq(C);(C=this.Ffa())&&this.R5(k.ma,C)};m.prototype.ZM=function(C){this.Mq(C);(C=this.Ffa())&&this.R5(k.fi,C)};m.prototype.uq=function(C){this.CM=!0;this.Mq(C);if(C=this.Ffa())this.dfa=C.F,this.gfa=C.F.getComponent(b.wd).M,this.R5(k.Sa,C)};m.prototype.fz=function(C){this.CM=!1;this.Mq(C);if(this.dfa)var B=(B=this.dfa.getComponent(b.wd))&&B.M;!B&&this.gfa&&(B=this.gfa);
this.gfa=this.dfa=null;B&&(C=this.sya(),B.o(k.$a,C),B=this.Bh.getComponent(b.zc),B.M&&B.M.o(k.$a,C))};m.prototype.Mq=function(C){this.Ad=C.x;this.Bd=C.y;this.OM=C.pageX;this.PM=C.pageY};m.prototype.fka=function(C){var B=(new Date).getTime()+C;this.xT&&B>=this.xT||(this.xT=B,clearTimeout(this.FN),this.FN=setTimeout(function(){this.FN=null;this.xT=void 0;this.JCa()}.bind(this),C))};m.prototype.JCa=function(){var C=this.u2a();this.NEa(C&&C.F);C&&this.R5(k.gb,C)};m.prototype.oqa=function(C,B,H){var E=
this.Ad,G=this.Bd,N=this.OM,O=this.PM;this.PM=this.OM=this.Bd=this.Ad=void 0;C=this.Qfa(C,[]);B=this.Jfa(C,B,H);var R;B&&(R=this.jza(B));this.Ad=E;this.Bd=G;this.OM=N;this.PM=O;return R};m.prototype.u2a=function(){var C=this.Bh.getComponent(b.zc);if(!C)return null;var B=this.t2a();return this.Jfa(B,C.origin,C.direction)||null};m.prototype.Ffa=function(){var C=this.Bh.getComponent(b.zc);if(!C)return null;var B=this.r1a();return this.Jfa(B,C.origin,C.direction)||null};m.prototype.NEa=function(C){if(this.zy!=
C){if(this.zy!=null!=(C!=null)){var B=this.Bh.getComponent(b.zc);B&&B.M&&B.M.o(C?k.uc:k.Eb)}this.zy&&this.qGa(this.zy,k.Eb);(this.zy=C)&&this.qGa(this.zy,k.uc);C=this.zy&&this.zy.getComponent(b.wd);C=!!C&&C.pB;this.Jy!=C&&(this.Jy=C,this.Oe&&(this.Jy?this.Oe.push(f.qf):this.Oe.pop(f.qf)))}};m.prototype.Jfa=function(C,B,H){var E=Array.from(C.keys());B=this.t3a(E,B,H);for(H=0;H<B.length;H++){E=B[H];var G=E.point,N=E.object,O=E.face&&E.face.normal,R=C.get(N),Q=R&&R.getComponent(b.wd);if(Q){var K=Array.isArray(N.material)&&
E.face?N.material[E.face.materialIndex]:N.material;if(!K||K.visible)if(Q.fF||!K||!K.map||e.Pmb(K.map,E.uv.x,E.uv.y))return N.isSkinnedMesh&&(N=this.K0a(N.skeleton.bones,G)),new h(R,N,G,O)}}return null};m.prototype.r1a=function(){var C=this.Bh.T,B=D.get(C);if(!B){B=x.get(C);var H=z.get(C);B=this.Qfa(B,H);D.set(C,B)}return B};m.prototype.t2a=function(){var C=this.Bh.T,B=F.get(C);if(!B){B=y.get(C);var H=A.get(C);B=this.Qfa(B,H);F.set(C,B)}return B};m.prototype.Qfa=function(C,B){var H=(B&&B.map(function(N){return c.Qc(N)}).filter(function(N){return!!N})||
[]).slice(),E=new Map;C&&C.forEach(function(N){var O=c.Qc(N);O&&H.indexOf(O)==-1&&(H.push(O),E.set(N,O))});var G=new Map;E.forEach(function(N,O){for(var R=[N];R.length;){var Q=R.shift();if(Q==N||H.indexOf(Q)==-1)G.set(Q,O),Q.children&&(R=R.concat(Q.children))}});return G};m.prototype.t3a=function(C,B,H){t.camera=this.vya();var E=c.Qc(this.Bh);E=E&&E.matrixWorld;E||(E=(E=this.Bh.getComponent(b.zc))&&E.matrixWorld);E?(t.ray.origin.copy(B).applyMatrix4(E),t.ray.direction.copy(B).add(H).applyMatrix4(E).sub(t.ray.origin).normalize()):
(t.ray.origin.copy(B),t.ray.direction.copy(H).normalize());return d.intersect(t,C)};m.prototype.R5=function(C,B){var H=this.jza(B);B=B.F.getComponent(b.wd);H.DX=B&&B.M.DX(C)||!1;B.M&&B.M.o(C,H);B=this.Bh.getComponent(b.zc);B.M&&B.M.o(C,H)};m.prototype.sya=function(){var C={};this.Ad!==void 0&&this.Bd!==void 0&&(C.x=this.Ad,C.y=this.Bd);this.OM!==void 0&&this.PM!==void 0&&(C.pageX=this.OM,C.pageY=this.PM);return C};m.prototype.jza=function(C){var B=this.sya(),H=C.sa,E=C.point;C=C.normal;B.position=
n(E);var G=this.vya();B.cameraPosition=n(G?r.setFromMatrixPosition(G.matrixWorld):r.set(0,0,0));G=H;for(var N=B;;){N.object=G.userData.id;N.name=G.name;N.type=G.isMesh?"mesh":G.isBone?"bone":G.yw||G.isGaussianCloud?"gs":"other";N.localPosition=n(G.worldToLocal(r.copy(E)));r.setFromMatrixScale(G.matrixWorld);N.localScale=Math.max(r.x,r.y,r.z);N.objectMatrixWorld=H.matrixWorld.toArray();C&&(N.normal=n(l(H,C,G,r)));if(!G.parent||!G.parent.userData.id)break;G=G.parent;N=N.parent={}}return B};var l=function(){var C=
new THREE.Vector3,B=new THREE.Matrix4;return function(H,E,G,N){N.copy(E);if(H==G)return N;N.applyMatrix4(H.matrixWorld);N.sub(C.setFromMatrixPosition(H.matrixWorld));N.add(C.setFromMatrixPosition(G.matrixWorld));N.applyMatrix4(B.copy(G.matrixWorld).invert()).normalize();return N}}();m.prototype.vya=function(){if(this.c1.camera)return this.c1.camera;var C=this.Bh.getComponent(b.zc);C=C&&C.Ea;this.c1.camera=C&&c.At(C);return this.c1.camera};m.prototype.pZa=function(){this.c1={}};m.prototype.qGa=function(C,
B){(C=(C=C.getComponent(b.wd))&&C.M)&&C.o(B)};m.prototype.K0a=function(C,B){var H=null,E=Infinity;for(C=C.slice();C.length;){var G=C.shift(),N=B.distanceTo(G.getWorldPosition(r));N<E&&(H=G,E=N);C.unshift.apply(C,G.children)}return H};m.prototype.dispose=function(){this.FN&&(clearTimeout(this.FN),this.FN=null,this.xT=void 0);this.dV(null);this.cV(null);this.NEa(null)};var p=16,q=400,r=new THREE.Vector3(0,1,0),t=new THREE.Raycaster;a=new THREE.Box3;a.min.x=a.min.y=a.min.z=-Infinity;a.max.x=a.max.y=
a.max.z=Infinity;a=new THREE.Sphere;a.center.x=a.center.y=a.center.z=0;a.radius=Infinity;var u={};u[k.gb]=m.prototype.rg;u[k.ma]=m.prototype.ez;u[k.fi]=m.prototype.ZM;u[k.Sa]=m.prototype.uq;u[k.$a]=m.prototype.fz;m.Gra=function(C){C.N(b.Gx).manager=new m(C)};m.csa=function(C){var B=C.getComponent(b.Gx);B.manager.dispose();B.manager=null;C.ka(b.Gx)};m.frame=function(C){C.getComponent(b.Gx).manager.frame()};m.nu=function(C){C.getComponent(b.Gx).manager.update()};m.Slb=function(C){C.N(b.YF);m.uTa(C)};
m.uTa=function(C){var B=c.Qc(C),H=C.getComponent(b.wd);g(x,C,B&&H.mt,D);g(y,C,B&&H.Xt,F)};m.xSa=function(C){g(x,C,!1,D);g(y,C,!1,F);C.ka(b.YF)};m.Rlb=function(C){C.N(b.UF);m.pTa(C)};m.pTa=function(C){var B=c.Qc(C),H=C.getComponent(b.Rr);g(z,C,B&&H.psa,D);g(A,C,B&&H.qsa,F)};m.wSa=function(C){g(A,C,!1,F);g(z,C,!1,D);C.ka(b.UF)};var v=[];m.nlb=function(C){v=[];C.forEach(function(B){v.indexOf(B.T)<0&&v.push(B.T)})};var w=[];m.cra=function(C){w=[];C.forEach(function(B){w.indexOf(B.T)<0&&w.push(B.T)})};
var x=new Map,y=new Map,z=new Map,A=new Map,D=new Map,F=new Map;return m});
define("tdv/player/view/webgl/system/selection/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/selection/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/selection/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.tY.v.length&&this.tY.v.slice().forEach(g.Gra);this.Wj.Da.length&&
this.Wj.Da.slice().forEach(g.nu);this.Wj.v.length&&this.Wj.v.slice().forEach(g.frame);this.uY.v.length&&this.uY.v.slice().forEach(g.csa);this.HQa.v.length&&this.HQa.v.slice().forEach(g.Slb);this.GQa.v.length&&this.GQa.Da.slice().forEach(g.uTa);this.IQa.v.length&&this.IQa.v.slice().forEach(g.xSa);this.JQa.v.length&&this.JQa.v.slice().forEach(g.xSa);this.$Na.v.length&&this.$Na.v.slice().forEach(g.Rlb);this.ZNa.v.length&&this.ZNa.Da.slice().forEach(g.pTa);this.aOa.v.length&&this.aOa.v.slice().forEach(g.wSa);
this.bOa.v.length&&this.bOa.v.slice().forEach(g.wSa);(this.qqa.fe.length||this.qqa.Xg.length)&&g.nlb(this.qqa.v);(this.oA.fe.length||this.oA.Xg.length)&&g.cra(this.oA.v)};a.J={};a.J.oA=[n.Gm];a.J.qqa=[n.Dl];a.J.tY=[n.zc,n.Gx.aa];a.J.Wj=[n.zc,n.Gx];a.J.uY=[n.zc.aa,n.Gx];a.J.HQa=[n.Object3D,n.wd,n.YF.aa];a.J.GQa=[n.Object3D,n.wd,n.YF];a.J.IQa=[n.Object3D.aa,n.YF];a.J.JQa=[n.wd.aa,n.YF];a.J.$Na=[n.Object3D,n.Rr,n.UF.aa];a.J.ZNa=[n.Object3D,n.Rr,n.UF];a.J.aOa=[n.Object3D.aa,n.UF];a.J.bOa=[n.Rr.aa,n.UF];
return a});
define("tdv/player/view/webgl/system/light/SpotLightSystem","require exports three.mod tdv/player/view/util/Color tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a,m,h,n,g,k,e){a=function(b){function c(){var d=b.call(this)||this;d.xb=d.xb.bind(d);d.ib=d.ib.bind(d);d.eg=d.eg.bind(d);d.Ca=d.Ca.bind(d);return d}P(c,b);c.prototype.Yc=function(){this.mE.v.length&&this.mE.v.slice().forEach(this.xb);this.nE.v.length&&this.nE.v.slice().forEach(this.Ca);
this.Ei.Da.length&&this.Ei.Da.slice().forEach(this.ib);this.Ei.v.length&&this.Ei.v.slice().forEach(this.eg)};c.prototype.xb=function(d){var f=d.N(g.Hu),l=d.N(g.Object3D);f.light=l.sa=new h.SpotLight;this.ib(d)};c.prototype.ib=function(d){var f=d.getComponent(g.SpotLight),l=d.getComponent(g.Hu),p=l.light;p.color=n.Ip(f.color).convertLinearToSRGB();p.intensity=f.intensity*Math.PI;p.visible=p.intensity>0;p.castShadow=p.intensity>0&&f.castShadow;p.distance=f.distance;p.angle=f.angle*Math.PI/180;p.penumbra=
f.penumbra;p.decay=f.decay;p.target.position.set(0,0,1);p.add(p.target);var q=p.castShadow?f.Mra:16;q!=p.shadow.mapSize.width&&(p.shadow.dispose(),p.shadow=p.shadow.clone(),p.shadow.mapSize.width=p.shadow.mapSize.height=q);p.shadow.bias=f.Lra;p.shadow.radius=f.Nra;f.VW!=!!l.zp&&(l=d.O(g.Hu),f.VW?l.zp=new h.SpotLightHelper(p):(l.zp.dispose(),l.zp=null))};c.prototype.eg=function(d){this.ysa(d)};c.prototype.ysa=function(d){var f=d.getComponent(g.Hu);if(f=f&&f.zp)d=e.Sf(d),f.parent!=d&&(f.parent&&f.parent.remove(f),
d&&d.add(f)),f.update()};c.prototype.Ca=function(d){var f=d.getComponent(g.Hu),l=f&&f.zp;l&&l.parent&&l.parent.remove(l);l&&l.dispose();f=f.light;f.parent&&f.parent.remove(f);d.ka(g.Hu);d.ka(g.Object3D)};c.J={};return c}(k);a.J={};a.J.mE=[g.SpotLight,g.Hu.aa];a.J.Ei=[g.SpotLight,g.Hu];a.J.nE=[g.SpotLight.aa,g.Hu];return a});
define("tdv/player/view/webgl/system/solidMaterial/Behaviour",["require","tdv/player/view/util/Color","tdv/player/view/webgl/components"],function(a){function m(g){this.B=g;this.Aa=null;this.update()}var h=a("tdv/player/view/util/Color"),n=a("tdv/player/view/webgl/components");m.prototype.update=function(){this.Aa||(this.Aa=new THREE.MeshBasicMaterial,this.Aa.transparent=!0,this.B.N(n.Material).material=this.Aa);var g=this.B.getComponent(n.xd);this.Aa.color=h.Ip(g.color||"#ffffff");this.Aa.opacity=
g.opacity||0;this.Aa.depthTest=!!g.depthTest;this.Aa.side=g.doubleSided?THREE.DoubleSide:THREE.FrontSide;this.Aa.visible=this.Aa.opacity>0;this.Aa.needsUpdate=!0};m.prototype.dispose=function(){this.Aa&&(this.Aa.dispose(),this.Aa=null,this.B.ka(n.Material));this.B=null};m.Wa=function(g){g.N(n.Hx).manager=new m(g)};m.ya=function(g){var k=g.getComponent(n.Hx);k.manager.dispose();k.manager=null;g.ka(n.Hx)};m.update=function(g){g.getComponent(n.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"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/solidMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.On.v.length&&this.On.v.slice().forEach(g.Wa);
this.materials.Da.length&&this.materials.Da.slice().forEach(g.update);this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya)};a.J={};a.J.On=[n.xd,n.Hx.aa];a.J.materials=[n.xd,n.Hx];a.J.Pn=[n.xd.aa,n.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"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/material/Util");a=m.extend(h,function(){h.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=
function(){this.ZRa.v.length&&this.ZRa.v.slice().forEach(this.xb);this.YRa.Da.length&&this.YRa.Da.slice().forEach(this.ib);this.$Ra.v.length&&this.$Ra.v.slice().forEach(this.Ca);this.aSa.v.length&&this.aSa.v.slice().forEach(this.Ca)};a.prototype.xb=function(k){k.N(n.Object3D).sa=new THREE.Mesh(new THREE.SphereGeometry);k.N(n.ZF);this.ib(k)};a.prototype.ib=function(k){var e=k.getComponent(n.Object3D).sa;g.ND(e,k.getComponent(n.Material).material);k=k.getComponent(n.Sphere);var b=e.geometry;if(b.radius!=
k.radius||b.widthSegments!=k.widthSegments||b.heightSegments!=k.heightSegments)b.dispose(),b=new THREE.SphereGeometry(k.radius,k.widthSegments,k.heightSegments),e.geometry=b,e.needsUpdate=!0;k=k.renderOrder||0;e.renderOrder!=k&&(e.renderOrder=k,e.needsUpdate=!0)};a.prototype.Ca=function(k){var e=k.getComponent(n.Object3D);(e=e&&e.sa)&&e.geometry&&(e.geometry.dispose(),e.geometry=null);e&&g.ND(e,null);k.ka(n.ZF);k.ka(n.Object3D)};a.J={};a.J.ZRa=[n.Sphere,n.Material,n.ZF.aa];a.J.YRa=[n.Sphere,n.Material,
n.ZF];a.J.$Ra=[n.Sphere.aa,n.ZF];a.J.aSa=[n.Material.aa,n.ZF];return a});
define("tdv/player/view/webgl/system/sprite/Behaviour",["require","tdv/player/view/util/XR","tdv/player/view/webgl/components","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/system/util/material/Util"],function(a){function m(c){this.B=c;this.Bb=null;this.Bda=90;this.Cda=100;this.Pa=this.Ha=void 0;this.pV=!1;this.ne=1;this.wc=this.B.O(n.Sprite).Gi=this.B.O(n.Object3D,!0).sa=new THREE.Sprite;this.wc.material.opacity=0;this.Qj();this.update();this.frame()}var h=a("tdv/player/view/util/XR"),
n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/entity/Util"),k=a("tdv/player/view/webgl/system/util/material/Util");m.prototype.update=function(){var c=this.B.getComponent(n.Sprite);this.Ha=c.height;this.Pa=c.width;this.pV=c.sizeAttenuation;this.wc.center.x=c.uO;this.wc.center.y=1-c.vO;this.ne=c.scale;this.Dn();this.wc.needsUpdate=!0};m.prototype.frame=function(){this.Bb||(this.Bb=g.Sf(this.B));this.dt();this.Qj();this.Dn()};m.prototype.dt=function(){if(this.Bb){var c=
g.sw(this.Bb);if(c&&c.isPerspectiveCamera){var d=g.dE(this.Bb);if(this.Bda!=c.fov||this.Cda!=d)this.Bda=c.fov,this.Cda=d,this.Dn(),this.wc.needsUpdate=!0}}};m.prototype.Qj=function(){var c=this.Bb?this.B.getComponent(n.Material).material:null;c&&k.ND(this.wc,c);this.wc.renderOrder=this.B.getComponent(n.Sprite).renderOrder;this.wc.material&&this.wc.material.sizeAttenuation!=this.pV&&(this.wc.material.sizeAttenuation=this.pV,this.wc.material.needsUpdate=!0)};m.prototype.Dn=function(){var c=this.Ha;
this.pV||(c/=this.Cda/(2*Math.tan(this.Bda*b/2)));var d=this.ne;this.wc.parent&&(this.wc.parent.getWorldScale(e),d/=Math.max(e.x,e.y,e.z));h.isPresenting&&this.pV&&(d/=h.zi);c*=d;d=c*this.Pa/this.Ha;var f=this.B.getComponent(n.ta)||this.B.N(n.ta);if(f.Le!=d||f.Ye!=c||f.Gh!=1)f=this.B.O(n.ta,!0),f.Le=d,f.Ye=c,f.Gh=1};var e=new THREE.Vector3,b=Math.PI/180;m.prototype.dispose=function(){};m.Wa=function(c){c.N(n.Iu).manager=new m(c)};m.ya=function(c){var d=c.getComponent(n.Iu);d.manager.dispose();d.manager=
null;c.ka(n.Iu);c.ka(n.Object3D)};m.update=function(c){c.getComponent(n.Iu).manager.update()};m.frame=function(c){c.getComponent(n.Iu).manager.frame()};return m});
define("tdv/player/view/webgl/system/sprite/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/sprite/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/sprite/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.cSa.v.length&&this.cSa.v.slice().forEach(g.Wa);this.S$.Da.length&&
this.S$.v.slice().forEach(g.update);this.S$.v.length&&this.S$.v.slice().forEach(g.frame);this.dSa.v.length&&this.dSa.v.slice().forEach(g.ya);this.eSa.v.length&&this.eSa.v.slice().forEach(g.ya)};a.J={};a.J.cSa=[n.Material,n.Sprite,n.Iu.aa];a.J.S$=[n.Sprite,n.Material,n.Iu];a.J.dSa=[n.Sprite.aa,n.Iu];a.J.eSa=[n.Material.aa,n.Iu];return a});
define("tdv/player/view/webgl/system/transform/System","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util".split(" "),function(a){function m(f,l,p){for(;f<l-180;)f+=360;for(;f>l+180;)f-=360;return h(f,l,p)}function h(f,l,p){if(!p)return l;f=(l-f)*(1-p);Math.abs(f)<1E-5&&(f=0);return l-f}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/events/Event"),e=a("tdv/player/view/webgl/ecs/System"),
b=a("tdv/player/view/webgl/components"),c=a("tdv/player/view/webgl/system/util/entity/Util");a=n.extend(e,function(){e.apply(this,arguments);this.xb=this.xb.bind(this);this.ib=this.ib.bind(this);this.Ca=this.Ca.bind(this)});a.prototype.Yc=function(f,l){this.fY.v.length&&this.fY.v.slice().forEach(this.xb);this.Kt.fe.length&&this.Kt.fe.slice().forEach(function(p){this.ib(p,f,l)}.bind(this));this.Kt.Da.length&&this.Kt.Da.slice().forEach(function(p){this.ib(p,f,l)}.bind(this));this.kOa.v.length&&this.kOa.v.slice().forEach(function(p){this.ib(p,
f,l)}.bind(this));this.sKa.v.length&&this.sKa.v.slice().forEach(this.Ca);this.tKa.v.length&&this.tKa.v.slice().forEach(this.Ca)};a.prototype.xb=function(f){var l=f.getComponent(b.ta),p=f.N(b.Gg);p.positionX=l.positionX;p.positionY=l.positionY;p.positionZ=l.positionZ;p.Yd=l.Yd;p.fd=l.fd;p.Xe=l.Xe;p.mf=l.mf;p.scale=l.scale;p.Le=l.Le;p.Ye=l.Ye;p.Gh=l.Gh;p.translationX=l.translationX;p.translationY=l.translationY;p.Ze=l.Ze;this.updateMatrixWorld(f)};a.prototype.ib=function(f){var l=f.getComponent(b.ta),
p=f.getComponent(b.Gg),q=l.easing||0;q?f.getComponent(b.bG)||f.N(b.bG):f.ka(b.bG);var r=null;l.bA!==p.bA&&(r||(r=f.O(b.Gg)),r.bA=l.bA);l.positionX!==p.positionX&&(r||(r=f.O(b.Gg)),r.positionX=h(r.positionX,l.positionX,q));l.positionY!==p.positionY&&(r||(r=f.O(b.Gg)),r.positionY=h(r.positionY,l.positionY,q));l.positionZ!==p.positionZ&&(r||(r=f.O(b.Gg)),r.positionZ=h(r.positionZ,l.positionZ,q));l.Yd!==p.Yd&&(r||(r=f.O(b.Gg)),r.Yd=m(r.Yd,l.Yd,q));l.fd!==p.fd&&(r||(r=f.O(b.Gg)),r.fd=m(r.fd,l.fd,q));l.Xe!==
p.Xe&&(r||(r=f.O(b.Gg)),r.Xe=m(r.Xe,l.Xe,q));l.scale!==p.scale&&(r||(r=f.O(b.Gg)),r.scale=l.scale);l.Le!==p.Le&&(r||(r=f.O(b.Gg)),r.Le=l.Le);l.Ye!==p.Ye&&(r||(r=f.O(b.Gg)),r.Ye=l.Ye);l.Gh!==p.Gh&&(r||(r=f.O(b.Gg)),r.Gh=l.Gh);l.translationX!==p.translationX&&(r||(r=f.O(b.Gg)),r.translationX=h(r.translationX,l.translationX,q));l.translationY!==p.translationY&&(r||(r=f.O(b.Gg)),r.translationY=h(r.translationY,l.translationY,q));l.Ze!==p.Ze&&(r||(r=f.O(b.Gg)),r.Ze=h(r.Ze,l.Ze,q));r?this.updateMatrixWorld(f):
f.ka(b.bG)};var d=new THREE.Vector3;a.prototype.updateMatrixWorld=function(f){c.eZ(f,f.getComponent(b.Gg));var l=f.getComponent(b.ta).M;l&&(c.getWorldPosition(f,d),f={position:{}},f.position.x=d.x,f.position.y=d.y,f.position.z=d.z,l.o(new k(g.Km,f)))};a.prototype.Ca=function(f){f.ka(b.Gg);f.ka(b.bG)};a.J={};a.J.Kt=[b.Object3D,b.ta,b.Gg];a.J.fY=[b.Object3D,b.ta,b.Gg.aa];a.J.kOa=[b.Object3D,b.ta,b.Gg,b.bG];a.J.sKa=[b.Object3D.aa,b.ta,b.Gg];a.J.tKa=[b.ta.aa,b.Gg];return a});
define("tdv/player/view/webgl/system/transformControls/TransformControlsGizmo",["require","three.mod","tdv/constants/RenderOrder"],function(a){const m=a("three.mod"),h=a("tdv/constants/RenderOrder");class n extends m.Object3D{constructor(t){function u(L,U){L=new m.TorusGeometry(L,.0075,3,64,U*Math.PI*2);L.rotateY(Math.PI/2);L.rotateX(Math.PI/2);return L}function v(L){const U=new m.Object3D;for(const Y in L)for(let aa=L[Y].length;aa--;){const ba=L[Y][aa][0].clone();var T=L[Y][aa][1];const ea=L[Y][aa][2],
ia=L[Y][aa][3],da=L[Y][aa][4];ba.name=Y;ba.tag=da;T&&ba.position.set(T[0],T[1],T[2]);ea&&ba.rotation.set(ea[0],ea[1],ea[2]);ia&&ba.scale.set(ia[0],ia[1],ia[2]);ba.updateMatrix();T=ba.geometry.clone();T.applyMatrix4(ba.matrix);ba.geometry=T;ba.renderOrder=h.gWa;ba.position.set(0,0,0);ba.rotation.set(0,0,0);ba.scale.set(1,1,1);U.add(ba)}return U}super();this.type="TransformControlsGizmo";this.properties=t;var w=new m.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),
x=new m.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0});t=w.clone();t.opacity=.15;x=x.clone();x.opacity=.5;var y=w.clone();y.color.setHex(16711680);const z=w.clone();z.color.setHex(65280);const A=w.clone();A.color.setHex(255);const D=w.clone();D.color.setHex(16711680);D.opacity=.5;const F=w.clone();F.color.setHex(65280);F.opacity=.5;const C=w.clone();C.color.setHex(255);C.opacity=.5;const B=w.clone();B.opacity=.25;var H=w.clone();H.color.setHex(16776960);H.opacity=
.25;w.clone().color.setHex(16776960);var E=w.clone();E.color.setHex(7895160);var G=new m.CylinderGeometry(0,.04,.1,12);G.translate(0,.05,0);const N=new m.BoxGeometry(.08,.08,.08);N.translate(0,.04,0);w=new m.BufferGeometry;w.setAttribute("position",new m.Float32BufferAttribute([0,0,0,1,0,0,0,0,0,0,0,0],3));const O=new m.CylinderGeometry(.0075,.0075,.5,3);O.translate(0,.25,0);G={X:[[new m.Mesh(G,y),[.5,0,0],[0,0,-Math.PI/2]],[new m.Mesh(G,y),[-.5,0,0],[0,0,Math.PI/2]],[new m.Mesh(O,y),[0,0,0],[0,0,
-Math.PI/2]]],Y:[[new m.Mesh(G,z),[0,.5,0]],[new m.Mesh(G,z),[0,-.5,0],[Math.PI,0,0]],[new m.Mesh(O,z)]],Z:[[new m.Mesh(G,A),[0,0,.5],[Math.PI/2,0,0]],[new m.Mesh(G,A),[0,0,-.5],[-Math.PI/2,0,0]],[new m.Mesh(O,A),null,[Math.PI/2,0,0]]],XYZ:[[new m.Mesh(new m.OctahedronGeometry(.1,0),B.clone()),[0,0,0]]],XY:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),C.clone()),[.15,.15,0]]],YZ:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),D.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new m.Mesh(new m.BoxGeometry(.15,
.15,.01),F.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]};const R={X:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[.3,0,0],[0,0,-Math.PI/2]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,.3,0]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,-.3,0],[0,0,Math.PI]]],Z:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,0,.3],[Math.PI/2,0,0]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,0,-.3],[-Math.PI/
2,0,0]]],XYZ:[[new m.Mesh(new m.OctahedronGeometry(.2,0),t)]],XY:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[.15,.15,0]]],YZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[.15,0,.15],[-Math.PI/2,0,0]]]},Q={START:[[new m.Mesh(new m.OctahedronGeometry(.01,2),x),null,null,null,"helper"]],END:[[new m.Mesh(new m.OctahedronGeometry(.01,2),x),null,null,null,"helper"]],DELTA:[[new m.Line(function(){const L=new m.BufferGeometry;
L.setAttribute("position",new m.Float32BufferAttribute([0,0,0,1,1,1],3));return L}(),x),null,null,null,"helper"]],X:[[new m.Line(w,x.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new m.Line(w,x.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new m.Line(w,x.clone()),[0,0,-1E3],[0,-Math.PI/2,0],[1E6,1,1],"helper"]]};H={XYZE:[[new m.Mesh(u(.5,1),E),null,[0,Math.PI/2,0]]],X:[[new m.Mesh(u(.5,.5),y)]],Y:[[new m.Mesh(u(.5,.5),z),null,[0,0,-Math.PI/2]]],Z:[[new m.Mesh(u(.5,.5),A),null,[0,
Math.PI/2,0]]],E:[[new m.Mesh(u(.75,1),H),null,[0,Math.PI/2,0]]]};E={AXIS:[[new m.Line(w,x.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]]};const K={XYZE:[[new m.Mesh(new m.SphereGeometry(.25,10,8),t)]],X:[[new m.Mesh(new m.TorusGeometry(.5,.1,4,24),t),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new m.Mesh(new m.TorusGeometry(.5,.1,4,24),t),[0,0,0],[Math.PI/2,0,0]]],Z:[[new m.Mesh(new m.TorusGeometry(.5,.1,4,24),t),[0,0,0],[0,0,-Math.PI/2]]],E:[[new m.Mesh(new m.TorusGeometry(.75,.1,2,24),t)]]};y={X:[[new m.Mesh(N,
y),[.5,0,0],[0,0,-Math.PI/2]],[new m.Mesh(O,y),[0,0,0],[0,0,-Math.PI/2]],[new m.Mesh(N,y),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new m.Mesh(N,z),[0,.5,0]],[new m.Mesh(O,z)],[new m.Mesh(N,z),[0,-.5,0],[0,0,Math.PI]]],Z:[[new m.Mesh(N,A),[0,0,.5],[Math.PI/2,0,0]],[new m.Mesh(O,A),[0,0,0],[Math.PI/2,0,0]],[new m.Mesh(N,A),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),C),[.15,.15,0]]],YZ:[[new m.Mesh(new m.BoxGeometry(.15,.15,.01),D),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new m.Mesh(new m.BoxGeometry(.15,
.15,.01),F),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new m.Mesh(new m.BoxGeometry(.1,.1,.1),B.clone())]]};t={X:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[.3,0,0],[0,0,-Math.PI/2]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,.3,0]],[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,-.3,0],[0,0,Math.PI]]],Z:[[new m.Mesh(new m.CylinderGeometry(.2,0,.6,4),t),[0,0,.3],[Math.PI/2,0,0]],[new m.Mesh(new m.CylinderGeometry(.2,
0,.6,4),t),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[.15,.15,0]]],YZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.01),t),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new m.Mesh(new m.BoxGeometry(.2,.2,.2),t),[0,0,0]]]};x={X:[[new m.Line(w,x.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new m.Line(w,x.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new m.Line(w,x.clone()),[0,0,-1E3],
[0,-Math.PI/2,0],[1E6,1,1],"helper"]]};this.zA={};this.St={};this.BJ={};this.add(this.zA.translate=v(G));this.add(this.zA.rotate=v(H));this.add(this.zA.scale=v(y));this.add(this.St.translate=v(R));this.add(this.St.rotate=v(K));this.add(this.St.scale=v(t));this.add(this.BJ.translate=v(Q));this.add(this.BJ.rotate=v(E));this.add(this.BJ.scale=v(x));this.St.translate.visible=!1;this.St.rotate.visible=!1;this.St.scale.visible=!1}updateMatrixWorld(t){const u=(this.properties.mode==="scale"?"local":this.properties.Sra)===
"local"?this.properties.KK:l;this.zA.translate.visible=this.properties.mode==="translate";this.zA.rotate.visible=this.properties.mode==="rotate";this.zA.scale.visible=this.properties.mode==="scale";this.BJ.translate.visible=this.properties.mode==="translate";this.BJ.rotate.visible=this.properties.mode==="rotate";this.BJ.scale.visible=this.properties.mode==="scale";let v=[];v=v.concat(this.St[this.properties.mode].children);v=v.concat(this.zA[this.properties.mode].children);v=v.concat(this.BJ[this.properties.mode].children);
for(let x=0;x<v.length;x++){const y=v[x];y.visible=!0;y.rotation.set(0,0,0);y.position.copy(this.properties.rB);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.rB.distanceTo(this.properties.Ec)*Math.min(1.9*Math.tan(Math.PI*w.fov/360)/w.zoom,7));y.scale.set(1,1,1).multiplyScalar(w*this.properties.size/4);y.tag==="helper"?(y.visible=!1,y.name==="AXIS"?(y.visible=!!this.properties.axis,this.properties.axis===
"X"&&(k.setFromEuler(e.set(0,0,0)),y.quaternion.copy(u).multiply(k),Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))>.9&&(y.visible=!1)),this.properties.axis==="Y"&&(k.setFromEuler(e.set(0,0,Math.PI/2)),y.quaternion.copy(u).multiply(k),Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))>.9&&(y.visible=!1)),this.properties.axis==="Z"&&(k.setFromEuler(e.set(0,Math.PI/2,0)),y.quaternion.copy(u).multiply(k),Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))>.9&&
(y.visible=!1)),this.properties.axis==="XYZE"&&(k.setFromEuler(e.set(0,Math.PI/2,0)),b.copy(this.properties.LE),y.quaternion.setFromRotationMatrix(d.lookAt(c,b,q)),y.quaternion.multiply(k),y.visible=this.properties.xk),this.properties.axis==="E"&&(y.visible=!1)):y.name==="START"?(y.position.copy(this.properties.JK),y.visible=this.properties.xk):y.name==="END"?(y.position.copy(this.properties.rB),y.visible=this.properties.xk):y.name==="DELTA"?(y.position.copy(this.properties.JK),y.quaternion.copy(this.properties.Ssa),
g.set(1E-10,1E-10,1E-10).add(this.properties.JK).sub(this.properties.rB).multiplyScalar(-1),g.applyQuaternion(this.properties.Ssa.clone().invert()),y.scale.copy(g),y.visible=this.properties.xk):(y.quaternion.copy(u),this.properties.xk?y.position.copy(this.properties.JK):y.position.copy(this.properties.rB),this.properties.axis&&(y.visible=this.properties.axis.search(y.name)!==-1))):(y.quaternion.copy(u),this.properties.mode==="translate"||this.properties.mode==="scale"?(y.name==="X"&&Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))>
.99&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="Y"&&Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))>.99&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="Z"&&Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))>.99&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="XY"&&Math.abs(b.copy(r).applyQuaternion(u).dot(this.properties.eye))<.2&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="YZ"&&Math.abs(b.copy(p).applyQuaternion(u).dot(this.properties.eye))<
.2&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1),y.name==="XZ"&&Math.abs(b.copy(q).applyQuaternion(u).dot(this.properties.eye))<.2&&(y.scale.set(1E-10,1E-10,1E-10),y.visible=!1)):this.properties.mode==="rotate"&&(f.copy(u),b.copy(this.properties.eye).applyQuaternion(k.copy(u).invert()),y.name.search("E")!==-1&&y.quaternion.setFromRotationMatrix(d.lookAt(this.properties.eye,c,q)),y.name==="X"&&(k.setFromAxisAngle(p,Math.atan2(-b.y,b.z)),k.multiplyQuaternions(f,k),y.quaternion.copy(k)),y.name==="Y"&&
(k.setFromAxisAngle(q,Math.atan2(b.x,b.z)),k.multiplyQuaternions(f,k),y.quaternion.copy(k)),y.name==="Z"&&(k.setFromAxisAngle(r,Math.atan2(b.y,b.x)),k.multiplyQuaternions(f,k),y.quaternion.copy(k))),y.visible=y.visible&&(y.name.indexOf("X")===-1||this.properties.ORa),y.visible=y.visible&&(y.name.indexOf("Y")===-1||this.properties.PRa),y.visible=y.visible&&(y.name.indexOf("Z")===-1||this.properties.QRa),y.visible=y.visible&&(y.name.indexOf("E")===-1||this.properties.ORa&&this.properties.PRa&&this.properties.QRa),
y.material.Ne=y.material.Ne||y.material.color.clone(),y.material.Of=y.material.Of||y.material.opacity,y.material.color.copy(y.material.Ne),y.material.opacity=y.material.Of,this.properties.enabled&&this.properties.axis&&(y.name===this.properties.axis?(y.material.color.setHex(16776960),y.material.opacity=1):this.properties.axis.split("").some(function(z){return y.name===z})&&(y.material.color.setHex(16776960),y.material.opacity=1)))}super.updateMatrixWorld(t)}}const g=new m.Vector3,k=new m.Quaternion,
e=new m.Euler,b=new m.Vector3(0,1,0),c=new m.Vector3(0,0,0),d=new m.Matrix4,f=new m.Quaternion,l=new m.Quaternion,p=new m.Vector3(1,0,0),q=new m.Vector3(0,1,0),r=new m.Vector3(0,0,1);return n});
define("tdv/player/view/webgl/system/transformControls/TransformControlsPlane",["require","three.mod"],function(a){const m=a("three.mod");class h extends m.Mesh{constructor(r){super(new m.PlaneGeometry(1E5,1E5,2,2),new m.MeshBasicMaterial({visible:!1,wireframe:!0,side:m.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1}));this.properties=r;this.type="TransformControlsPlane"}updateMatrixWorld(r){let t=this.properties.Sra;this.position.copy(this.properties.rB);this.properties.mode==="scale"&&(t="local");
l.copy(c).applyQuaternion(t==="local"?this.properties.KK:k);p.copy(d).applyQuaternion(t==="local"?this.properties.KK:k);q.copy(f).applyQuaternion(t==="local"?this.properties.KK:k);g.copy(p);switch(this.properties.mode){case "translate":case "scale":switch(this.properties.axis){case "X":g.copy(this.properties.eye).cross(l);e.copy(l).cross(g);break;case "Y":g.copy(this.properties.eye).cross(p);e.copy(p).cross(g);break;case "Z":g.copy(this.properties.eye).cross(q);e.copy(q).cross(g);break;case "XY":e.copy(q);
break;case "YZ":e.copy(l);break;case "XZ":g.copy(q);e.copy(p);break;case "XYZ":case "E":e.set(0,0,0)}break;default:e.set(0,0,0)}e.length()===0?this.quaternion.copy(this.properties.SIa):(b.lookAt(n.set(0,0,0),e,g),this.quaternion.setFromRotationMatrix(b));super.updateMatrixWorld(r)}}const n=new m.Vector3,g=new m.Vector3(0,1,0),k=new m.Quaternion,e=new m.Vector3,b=new m.Matrix4,c=new m.Vector3(1,0,0),d=new m.Vector3(0,1,0),f=new m.Vector3(0,0,1),l=new m.Vector3,p=new m.Vector3,q=new m.Vector3;return h});
define("tdv/player/view/webgl/system/transformControls/TransformControls",["require","three.mod","tdv/player/view/webgl/system/transformControls/TransformControlsGizmo","tdv/player/view/webgl/system/transformControls/TransformControlsPlane"],function(a){function m(r,t,u){r=t.intersectObject(r,!0);for(t=0;t<r.length;t++)if(r[t].object.visible||u)return r[t];return!1}var h=a("three.mod"),n=a("tdv/player/view/webgl/system/transformControls/TransformControlsGizmo"),g=a("tdv/player/view/webgl/system/transformControls/TransformControlsPlane");
const k=new h.Vector3,e=new h.Vector3,b=new h.Quaternion,c={X:new h.Vector3(1,0,0),Y:new h.Vector3(0,1,0),Z:new h.Vector3(0,0,1)},d={type:"change"},f={type:"mouseDown",mode:null},l={type:"mouseUp",mode:null},p={type:"objectChange"};class q extends h.Object3D{constructor(r){super();this.camera=r;this.visible=!1;this.zA=r=new n(this);this.add(r);this.oh=r=new g(this);this.add(r);this.object=void 0;this.enabled=!0;this.axis=null;this.mode="translate";this.xk=!1;this.Rw=this.Rqa=this.Kp=null;this.Sra=
"world";this.size=1;this.QRa=this.PRa=this.ORa=!0;this.offset=new h.Vector3;this.iSa=new h.Vector3;this.oKa=new h.Vector3;this.zi=new h.Vector3;this.Vib=new h.Vector3;this.qPa=new h.Quaternion;this.kqa=new h.Quaternion;this.lqa=new h.Vector3;this.sob=new h.Vector3;this.Aaa=new h.Quaternion;this.rob=new h.Vector3;this.sqa=new h.Vector3;this.$J=new h.Quaternion;this.Uqa=new h.Vector3;this.rB=new h.Vector3;this.JK=new h.Vector3;this.KK=new h.Quaternion;this.Ssa=new h.Quaternion;this.Ec=new h.Vector3;
this.SIa=new h.Quaternion;this.VA=new h.Vector3;this.UA=new h.Vector3;this.LE=new h.Vector3;this.rotationAngle=0;this.eye=new h.Vector3}updateMatrixWorld(r=!1){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this.Vib,this.qPa,this.lqa),this.object.matrixWorld.decompose(this.rB,this.KK,this.rob),this.kqa.copy(this.qPa).invert(),this.Aaa.copy(this.KK).invert());
this.camera.updateMatrixWorld();this.camera.matrixWorld.decompose(this.Ec,this.SIa,this.zi);this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.Ec).sub(this.rB).normalize();super.updateMatrixWorld(r)}djb(r){if(this.object!==void 0&&this.xk!==!0&&this.axis!==null){if(r=m(this.oh,r,!0))this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.sqa.copy(this.object.position),this.$J.copy(this.object.quaternion),this.Uqa.copy(this.object.scale),
this.object.matrixWorld.decompose(this.JK,this.Ssa,this.sob),this.VA.copy(r.point).sub(this.JK);this.xk=!0;f.mode=this.mode;this.dispatchEvent(f)}}ejb(r){if(this.xk===!1){var t=m(this.zA.St[this.mode],r);this.axis=t?t.object.name:null}else{t=this.axis;var u=this.mode,v=this.object,w=this.Sra;if(u==="scale")w="local";else if(t==="E"||t==="XYZE"||t==="XYZ")w="world";if(v!==void 0&&t!==null&&this.xk!==!1&&(r=m(this.oh,r,!0))){this.UA.copy(r.point).sub(this.JK);if(u==="translate")this.offset.copy(this.UA).sub(this.VA),
w==="local"&&t!=="XYZ"&&this.offset.applyQuaternion(this.Aaa),t.indexOf("X")===-1&&(this.offset.x=0),t.indexOf("Y")===-1&&(this.offset.y=0),t.indexOf("Z")===-1&&(this.offset.z=0),w==="local"&&t!=="XYZ"?this.offset.applyQuaternion(this.$J).divide(this.lqa):this.offset.applyQuaternion(this.kqa).divide(this.lqa),v.position.copy(this.offset).add(this.sqa),this.Kp&&(w==="local"&&(v.position.applyQuaternion(b.copy(this.$J).invert()),t.search("X")!==-1&&(v.position.x=Math.round(v.position.x/this.Kp)*this.Kp),
t.search("Y")!==-1&&(v.position.y=Math.round(v.position.y/this.Kp)*this.Kp),t.search("Z")!==-1&&(v.position.z=Math.round(v.position.z/this.Kp)*this.Kp),v.position.applyQuaternion(this.$J)),w==="world"&&(v.parent&&v.position.add(k.setFromMatrixPosition(v.parent.matrixWorld)),t.search("X")!==-1&&(v.position.x=Math.round(v.position.x/this.Kp)*this.Kp),t.search("Y")!==-1&&(v.position.y=Math.round(v.position.y/this.Kp)*this.Kp),t.search("Z")!==-1&&(v.position.z=Math.round(v.position.z/this.Kp)*this.Kp),
v.parent&&v.position.sub(k.setFromMatrixPosition(v.parent.matrixWorld))));else if(u==="scale")t.search("XYZ")!==-1?(w=this.UA.length()/this.VA.length(),this.UA.dot(this.VA)<0&&(w*=-1),e.set(w,w,w)):(k.copy(this.VA),e.copy(this.UA),k.applyQuaternion(this.Aaa),e.applyQuaternion(this.Aaa),e.divide(k),t.search("X")===-1&&(e.x=1),t.search("Y")===-1&&(e.y=1),t.search("Z")===-1&&(e.z=1)),v.scale.copy(this.Uqa).multiply(e),this.Rw&&(t.search("X")!==-1&&(v.scale.x=Math.round(v.scale.x/this.Rw)*this.Rw||this.Rw),
t.search("Y")!==-1&&(v.scale.y=Math.round(v.scale.y/this.Rw)*this.Rw||this.Rw),t.search("Z")!==-1&&(v.scale.z=Math.round(v.scale.z/this.Rw)*this.Rw||this.Rw));else if(u==="rotate"){this.offset.copy(this.UA).sub(this.VA);u=20/this.rB.distanceTo(k.setFromMatrixPosition(this.camera.matrixWorld));r=!1;if(t==="XYZE")this.LE.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(k.copy(this.LE).cross(this.eye))*u;else if(t==="X"||t==="Y"||t==="Z")this.LE.copy(c[t]),k.copy(c[t]),
w==="local"&&k.applyQuaternion(this.KK),k.cross(this.eye),k.length()===0?r=!0:this.rotationAngle=this.offset.dot(k.normalize())*u;if(t==="E"||r)this.LE.copy(this.eye),this.rotationAngle=this.UA.angleTo(this.VA),this.iSa.copy(this.VA).normalize(),this.oKa.copy(this.UA).normalize(),this.rotationAngle*=this.oKa.cross(this.iSa).dot(this.eye)<0?1:-1;this.Rqa&&(this.rotationAngle=Math.round(this.rotationAngle/this.Rqa)*this.Rqa);w==="local"&&t!=="E"&&t!=="XYZE"?(v.quaternion.copy(this.$J),v.quaternion.multiply(b.setFromAxisAngle(this.LE,
this.rotationAngle)).normalize()):(this.LE.applyQuaternion(this.kqa),v.quaternion.copy(b.setFromAxisAngle(this.LE,this.rotationAngle)),v.quaternion.multiply(this.$J).normalize())}this.dispatchEvent(d);this.dispatchEvent(p)}}}IPa(){this.xk&&this.axis!==null&&(l.mode=this.mode,this.dispatchEvent(l));this.xk=!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.xk&&(this.object.position.copy(this.sqa),this.object.quaternion.copy(this.$J),this.object.scale.copy(this.Uqa),this.dispatchEvent(d),this.dispatchEvent(p),this.VA.copy(this.UA))}setSize(r){this.size=r}}return q});
define("tdv/player/view/webgl/system/transformControls/System","require exports three.mod tdv/constants/EventName tdv/events/Event tdv/player/view/webgl/components tdv/player/view/webgl/ecs/System tdv/player/view/webgl/system/util/RaycastUtil tdv/player/view/webgl/system/util/entity/Util tdv/player/view/webgl/system/transformControls/TransformControls tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){function l(w){var x=this,y=x.getComponent(k.Mm),z=x.getComponent(k.Hh),A=y.jaa;
y=y.Fk;if(A&&y)if(r.jKa.find(function(F){return F!=x}))A.xk&&A.IPa(b.E6(v,A.camera,y));else{var D=y.getComponent(k.zc).WD;w.name==n.Sa?(A.djb(b.E6(v,A.camera,y)),D.h(n.ma,l,x),A.xk&&(D.bind(n.ma,l,x,!0),A.object.userData={position:A.object.position.clone(),quaternion:A.object.quaternion.clone(),scale:A.object.scale.clone()})):w.name==n.$a?A.IPa(b.E6(v,A.camera,y)):w.name==n.gb?(f.isPresenting||D.h(n.ma,l,x),A.ejb(b.E6(v,A.camera,y))):w.name==n.ma&&(A.reset(),A.object.position.copy(A.object.userData.position),
A.object.quaternion.copy(A.object.userData.quaternion),A.object.scale.copy(A.object.userData.scale),y=q(z),A.mode=y[(y.indexOf(A.mode)+1)%y.length]);A.xk&&!x.getComponent(k.Gm)?x.N(k.Gm):!A.xk&&x.getComponent(k.Gm)&&x.ka(k.Gm);z.M&&(A.xk&&w.name==n.gb||w.name==n.ma)&&(t.compose(A.object.position,A.object.quaternion,A.object.scale),u.multiplyMatrices(A.object.parent.matrixWorld,t),z.M.o(new g(n.V,{position:A.object.position,quaternion:A.object.quaternion,scale:p(A.object.scale),matrix:t,matrixWorld:u})))}}
function p(w){var x=Math.abs(w.x-w.y)+Math.abs(w.x-w.z),y=Math.abs(w.y-w.x)+Math.abs(w.y-w.z),z=Math.abs(w.z-w.x)+Math.abs(w.z-w.y);if(!(x>y&&x>z)){if(y>x&&y>z)return w.y;if(z>x&&z>y)return w.z}return w.x}function q(w){var x=[];w.translate&&x.push("translate");w.rotate&&x.push("rotate");w.scale&&x.push("scale");x.length==0&&x.push("translate");return x}var r=function(w){function x(){var y=w.call(this)||this;y.xb=y.xb.bind(y);y.ib=y.ib.bind(y);y.Ca=y.Ca.bind(y);return y}P(x,w);x.prototype.Yc=function(){this.KSa.v.length&&
this.KSa.v.slice().forEach(this.xb);this.LSa.v.length&&this.LSa.v.slice().forEach(this.Ca);this.MSa.v.length&&this.MSa.v.slice().forEach(this.Ca);this.JSa.v.length&&this.JSa.v.slice().forEach(this.ib);x.jKa=this.oA.v};x.prototype.xb=function(y){y.N(k.Mm)};x.prototype.ib=function(y){this.$nb(y);this.nu(y)};x.prototype.$nb=function(y){var z=y.getComponent(k.Object3D).sa,A;a:{for(A=z;A;){if(!A.visible){A=!1;break a}A=A.parent}A=!0}A||(z=null);var D=c.Sf(y),F=D&&c.sw(D),C=y.getComponent(k.Hh);A=y.getComponent(k.Mm).jaa;
A&&z&&A.camera===F&&A.parent===D||(A&&(A.object.parent.remove(A.object),A.detach(),A.dispose()),A=null,F&&z&&D&&(A=new d(F),A.attach(new h.Object3D),D.add(A)),y.O(k.Mm).jaa=A);A&&z&&(z.parent!=A.object.parent&&(A.object.parent&&A.object.parent.remove(A.object),z.parent&&z.parent.add(A.object)),y=q(C),y.indexOf(A.mode)==-1&&(A.mode=y[0]),A.object.matrix.copy(z.matrix),A.object.matrix.decompose(A.object.position,A.object.quaternion,A.object.scale))};x.prototype.nu=function(y){var z=y.getComponent(k.Mm),
A=this.yfb(y),D=A&&A.getComponent(k.zc).WD||null,F=(z=z.Fk)&&z.getComponent(k.zc);F=F&&F.WD||null;A!=z&&(F&&(F.h(n.Sa,l,y),F.h(n.$a,l,y),F.h(n.gb,l,y),F.h(n.ma,l,y)),y.O(k.Mm).pe=D)&&(D.bind(n.Sa,l,y,!0),D.bind(n.$a,l,y,!0),D.bind(n.gb,l,y,!0));A!=z&&(y.O(k.Mm).Fk=A)};x.prototype.yfb=function(y){return this.Wj.v.length?this.Wj.v.reduce(function(z,A){if(A.T!==y.T)return z;if(!z)return A;var D=A.getComponent(k.zc);return!z.getComponent(k.zc).Ug&&D.Ug?A:z}):null};x.prototype.Ca=function(y){var z=y.getComponent(k.Mm),
A=z&&z.jaa;A&&(A.object.parent.remove(A.object),A.detach(),A.dispose());if(z=z.pe)z.h(n.Sa,l,y),z.h(n.$a,l,y),z.h(n.gb,l,y),z.h(n.ma,l,y);y.ka(k.Mm)};x.J={};x.jKa=[];return x}(e),t=new h.Matrix4,u=new h.Matrix4,v=new h.Raycaster;r.J.oA=[k.Gm];r.J.Wj=[k.zc];r.J.JSa=[k.Object3D,k.Hh,k.Mm];r.J.KSa=[k.Object3D,k.Hh,k.Mm.aa];r.J.LSa=[k.Object3D.aa,k.Mm];r.J.MSa=[k.Hh.aa,k.Mm];return r});
define("tdv/view/av/VideoFrame",["require","exports"],function(){var a=function(){var m=document.createElement("canvas");m.width=m.height=256;m.getContext("2d").clearRect(0,0,m.width,m.height);return m}();return function(){function m(h,n,g){this.wFa=h;this.aGa=n;this.Zu=g||a}m.prototype.isEmpty=function(){return this.Zu==a||this.Zu.tagName=="CANVAS"&&(this.Zu.width==0||this.Zu.height==0)};m.prototype.isEqual=function(h){return this.wFa==h.wFa&&this.aGa==h.aGa&&this.Zu==h.Zu};return m}()});
define("tdv/view/av/VideoLevelUtil",["require","exports","tdv/player/view/util/Capabilities","tdv/player/view/util/Device","tdv/player/view/util/FileType"],function(a,m,h,n,g){function k(c){return h.ySa(c)}function e(c,d){if(!d)return!0;var f=c.get("url"),l=c.get("srcObject");c=c.get("type")||"";switch(d){case "srcObj":return!!l;case "webm":return g.is(f,g.pWa)||b(c,"webm");case "h265":return g.is(f,g.WUa)||(g.is(f,g.eua)||g.is(f,g.Lta)||!f)&&(b(c,"hev1")||b(c,"h265")||b(c,"heic"))?!0:!1;case "mp4":return g.is(f,
g.eua)||b(c,"mp4");case "hls":return g.is(f,g.HLS)||b(c,"x-mpegurl");case "ogv":return g.is(f,g.yVa)||b(c,"ogg");case "mov":return g.is(f,g.Lta)||b(c,"quicktime");default:return!1}}function b(c,d){return(c||"").toLowerCase().indexOf(d)>=0}return function(){function c(){}c.cgb=function(d){return c.select(d.get("levels"))};c.$fb=function(d){return c.select(d.get("levels"))};c.select=function(d){d||(d=[]);d=d.slice();var f=[];f.push({type:"srcObj",iu:!0});h.wgb&&f.push({type:"hls",iu:!1});h.Pgb&&f.push({type:"h265",
iu:!0});h.Noa&&f.push({type:"webm",iu:!0});h.i8&&f.push({type:"mp4",iu:!0});h.Qgb&&f.push({type:"mov",iu:!0});h.Moa&&f.push({type:"ogv",iu:!0});f.push({type:"mp4",iu:!0});f.push({type:"webm",iu:!0});f.push({type:"mp4",iu:!1});f.push({type:"webm",iu:!1});for(var l=0;l<f.length;l++){var p=d;f[l].iu&&(p=p.filter(k));p=p.filter(function(q){if(e(q,f[l].type))return!0});f[l].type!="hls"&&p.sort(function(q,r){return r.get("width")-q.get("width")});if(p.length)return p[0]}return null};return c}()});
define("tdv/view/av/VideoPlayer","require exports tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/parser/ClassInfo tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/av/HTMLMediaPlayer tdv/view/av/Subtitle tdv/view/av/VideoFrame tdv/view/av/AVProperties tdv/view/av/MediaType tdv/view/av/SharedPlayerOrchestrator tdv/view/av/VideoLevelUtil".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u){function v(w){c.Yb()==
c.Nk&&(w=d.MD(w,"playbacksession="+(new Date).getTime()));return w}return function(w){function x(y,z,A){var D=w.call(this)||this;D.Gb=y;D.C=z;D.N_a=A;D.hb=x.yk(D.C);D.mV();D.C.bind(g.L("subtitlesURL"),D.mk,D,!0);D.C.bind(g.L("gain"),D.OH,D,!0);D.C.bind(g.L("ambisonic"),D.JH,D,!0);D.hb.bind(g.L("srcObject"),D.mk,D,!0);D.hb.bind(g.L("subtitlesURL"),D.mk,D,!0);D.hb.bind(g.L("url"),D.mk,D,!0);D.hb.bind(g.L("gain"),D.OH,D,!0);D.hb.bind(g.L("ambisonic"),D.JH,D,!0);D.I=k.ca;D.ac=0;D.mg=0;D.Ff=!1;D.jt=1;
D.gq=null;D.Pl=!1;D.Jb=null;D.ja=null;D.KL=!1;D.k0=void 0;D.Lwa=!1;D.bq=[];return D}P(x,w);x.prototype.Vb=function(){return this.Gb};x.prototype.Zc=function(y){this.I==y||y==k.Zb&&this.I!=k.PLAYING||(this.Lwa&&y==k.PLAYING&&this.I==k.ca&&this.Ida(),this.I=y,this.I==k.PLAYING?(this.Jb&&this.Jb.play(this.Gb,this.A,this.mg),t.X9(this)):(t.Nua?this.Jb&&this.Jb.stop():t.vY(this),this.I==k.ca&&this.xka()),this.wla())};x.prototype.getState=function(){return this.I};x.prototype.lj=function(){return this.ac};
x.prototype.setCurrentTime=function(y){this.mg=y;this.Jb&&(this.Jb.AJ()&&this.UR(),this.Jb.play(this.Gb,this.A,this.mg))};x.prototype.getCurrentTime=function(){return this.mg};x.prototype.bu=function(y){this.gq=y;this.Jb&&this.Jb.bu(y)};x.prototype.Tw=function(y){this.Jb?this.Jb.Tw(y):this.Vx=(y===null||y===void 0?void 0:y.clone())||null};x.prototype.iB=function(y){this.jt=y;this.Jb&&this.Jb.iB(y)};x.prototype.Bg=function(y){this.Ff=y;this.Jb&&this.Jb.Bg(y)};x.prototype.setLoop=function(y){this.Pl=
y;this.Jb&&this.Jb.setLoop(y)};x.prototype.jkb=function(){this.Lwa=!0};x.prototype.TO=function(y,z,A){this.Jb&&this.Jb.AJ()?this.Jb.TO(y,z,A):this.KL?y.drawImage(this.ja,0,0,z,A):y.fillRect(0,0,z,A)};x.prototype.E7=function(){if(this.Jb&&this.Jb.AJ()){var y=this.Jb.getCurrentTime(),z=this.Jb.cd;if(this.LS())return new p(this.A.src,this.k0,this.ja);this.Ida();return new p(this.A.src,y,z)}return this.KL?new p(this.A.src,this.mg,this.ja):new p(this.A.src,this.mg,void 0)};x.prototype.Nqa=function(){return!this.Ff&&
this.C.get("hasAudio")};x.prototype.getType=function(){return r.Wp};x.prototype.FLa=function(){return e.Wp};x.prototype.rKa=function(y){this.Jb=y;setTimeout(function(){this.Jb&&this.Jb.bind(f.Bl,this.HT,this,!0)}.bind(this),0);this.mV();this.Jb.bind(f.Dg,this.Nf,this,!0);this.Jb.bind(f.Yj,this.$o,this,!0);this.Jb.bind(g.Al,this.Fj,this,!0);this.Jb.Bg(this.Ff);this.Jb.iB(this.jt);this.Jb.setLoop(this.Pl);this.Jb.Tw(this.Vx);this.Jb.bu(this.gq);this.Jb.play(this.Gb,this.A,this.mg)};x.prototype.nNa=
function(){this.Jb&&(this.Jb.AJ()&&this.UR(),this.mg=this.Jb.getCurrentTime(),this.Jb.h(f.Bl,this.HT,this),this.Jb.h(f.Dg,this.Nf,this),this.Jb.h(f.Yj,this.$o,this),this.Jb.h(g.Al,this.Fj,this),this.I==k.ca&&(this.Jb.stop(),this.Jb.setCurrentTime(0),this.sZa()),this.Jb=null)};x.prototype.clear=function(){t.vY(this);this.Ida();this.C&&(this.C.h(g.L("subtitlesURL"),this.mk,this),this.C.h(g.L("gain"),this.OH,this),this.C.h(g.L("ambisonic"),this.JH,this));this.hb&&(this.hb.h(g.L("subtitlesURL"),this.mk,
this),this.hb.h(g.L("url"),this.mk,this),this.hb.h(g.L("srcObject"),this.mk,this),this.hb.h(g.L("gain"),this.OH,this),this.hb.h(g.L("ambisonic"),this.JH,this))};x.prototype.mk=function(){var y=this;this.hI&&clearTimeout(this.hI);this.hI=setTimeout(function(){y.hI=null;y.Jb&&(y.A.Em=y.C.get("subtitlesURL")||y.hb.get("subtitlesURL"),y.A.src=y.hb.get("srcObject")||v(y.hb.get("url")),y.Jb.play(y.Gb,y.A,y.mg))},10)};x.prototype.OH=function(){this.Jb&&(this.A.gain=this.C.get("gain",1)*this.hb.get("gain",
1),this.Jb.VY(this.A.gain))};x.prototype.JH=function(){this.Jb&&(this.A.lt=this.C.get("ambisonic")=="foa"||this.hb.get("ambisonic")=="foa",this.Jb.RY(this.A.lt))};x.prototype.mV=function(){this.A=new q;this.A.src=this.hb.get("srcObject")||v(this.hb.get("url"));this.A.Em=this.C.get("subtitlesURL")||this.hb.get("subtitlesURL");this.A.gE=this.C.get("hasAudio",!0)&&this.hb.get("hasAudio",!0);this.A.gain=this.C.get("gain",1)*this.hb.get("gain",1);this.A.lt=this.C.get("ambisonic")=="foa"||this.hb.get("ambisonic")==
"foa";this.A.TW=this.N_a};x.prototype.UR=function(){this.ja||(this.ja=document.createElement("canvas"));if(!this.LS()){this.ja.width=this.Jb.fg();this.ja.height=this.Jb.wg();this.k0=this.Jb.getCurrentTime();var y=this.ja.getContext("2d");y.clearRect(0,0,this.ja.width,this.ja.height);this.KL=this.Jb.TO(y,this.ja.width,this.ja.height)}};x.prototype.LS=function(){var y=this.Jb.getCurrentTime();this.ac&&(y=Math.min(y,this.ac));return this.KL&&Math.abs(y-this.k0)<=.15};x.prototype.Ida=function(){this.KL&&
(this.k0=void 0,this.KL=!1,c.Yb()!=c.Nk&&(this.ja.width=0,this.ja.height=0,this.ja=null))};x.prototype.$o=function(){this.ac=this.Jb.lj();this.rla()};x.prototype.Nf=function(){var y=this.Jb.lj();y!==0&&(this.ac!=y&&this.$o(),this.mg=this.Jb.getCurrentTime(),c.Nd()==c.vj&&this.mg>0&&this.mg>this.ac-.15&&!this.LS()&&!this.Pl?this.UR():c.Yb()==c.Nk&&this.mg>0&&this.mg>this.ac-.05&&!this.LS()&&!this.Pl?this.UR():c.Yb()==c.Pp&&this.mg>0&&this.mg>this.ac-.05&&!this.LS()&&this.Pl&&this.UR(),this.WV())};
x.prototype.Fj=function(){var y=this;this.bq=this.Jb.cP().map(function(z){for(var A=null,D=0;D<y.bq.length&&!A;D++)y.bq[D].cue==z&&(A=y.bq[D]);A||(A=new l(z));return A});this.o(new h(g.Al))};x.prototype.sZa=function(){this.bq.length!=0&&(this.bq=[],this.o(new h(g.Al)))};x.prototype.HT=function(){this.Zc(k.ca);this.sla()};x.prototype.xka=function(){this.mg=0;this.WV()};x.prototype.WV=function(){this.o(new h(x.Dg))};x.prototype.rla=function(){this.o(new h(x.Yj))};x.prototype.sla=function(){this.o(new h(g.Tb))};
x.prototype.wla=function(){this.o(new h(g.Pd))};x.yk=function(y){if(b.Oa("Video360Resource",y))return u.$fb(y);if(b.Oa("VideoResource",y))return u.cgb(y);throw"invalid video resource object: "+y;};x.Dg="time update";x.Yj="duration update";return x}(n)});
define("tdv/player/view/webgl/system/videoMaterial/VideoPlayerController",["require","tdv/constants/EventName","tdv/constants/PlaybackState","tdv/events/Event","tdv/view/av/VideoPlayer"],function(a){function m(e,b,c,d){this.ra=e;this.A=b;this.Ee=c;this.Na=d;this.Ie=e.Vb();this.mg=this.A.get("currentTime");this.I=this.A.get("state");this.Pl=this.A.get("loop");this.i4=this.Ie.get("mute");this.Z2=this.A.get("mute");this.I=this.A.get("autoplay")?n.PLAYING:n.Zb;this.Pca();this.A.set("state",this.I);this.ra.Bg(this.i4||
this.Z2);this.ra.setLoop(this.Pl);this.ra.setCurrentTime(this.mg);this.ra.Zc(this.I)}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=a("tdv/view/av/VideoPlayer");m.prototype.dispose=function(){this.Lja()};m.prototype.CCa=function(){var e=this.A.get("currentTime",0);this.mg!=e&&this.ra.setCurrentTime(this.mg=e)};m.prototype.GCa=function(){var e=this.A.get("state",n.ca);this.I!=e&&this.ra.Zc(this.I=e)};m.prototype.ECa=function(){var e=this.A.get("mute",
!1);this.Z2!=e&&this.ra.Bg(this.i4||(this.Z2=e))};m.prototype.DCa=function(){var e=this.A.get("loop",!1);this.Pl!=e&&this.ra.setLoop(this.Pl=e)};m.prototype.dU=function(){var e=this.Ie.get("mute",!1);this.i4!=e&&this.ra.Bg((this.i4=e)||this.Z2)};m.prototype.nU=function(){this.A.set("currentTime",this.mg=this.ra.getCurrentTime())};m.prototype.lU=function(){this.A.set("duration",this.ra.lj())};m.prototype.mU=function(){this.A.set("state",this.I=this.ra.getState());this.Na()};m.prototype.oU=function(){this.Ee.o(new g(h.Tb))};
m.prototype.Pca=function(){this.Ie.bind(h.L("mute"),this.dU,this,!0);this.ra.bind(k.Dg,this.nU,this,!0);this.ra.bind(k.Yj,this.lU,this,!0);this.ra.bind(h.Pd,this.mU,this,!0);this.ra.bind(h.Tb,this.oU,this,!0);this.A.bind(h.L("currentTime"),this.CCa,this,!0);this.A.bind(h.L("state"),this.GCa,this,!0);this.A.bind(h.L("mute"),this.ECa,this,!0);this.A.bind(h.L("loop"),this.DCa,this,!0)};m.prototype.Lja=function(){this.Ie.h(h.L("mute"),this.dU,this,!0);this.ra.h(k.Dg,this.nU,this,!0);this.ra.h(k.Yj,this.lU,
this,!0);this.ra.h(h.Pd,this.mU,this,!0);this.ra.h(h.Tb,this.oU,this,!0);this.A.h(h.L("currentTime"),this.CCa,this,!0);this.A.h(h.L("state"),this.GCa,this,!0);this.A.h(h.L("mute"),this.ECa,this,!0);this.A.h(h.L("loop"),this.DCa,this,!0)};return m});
define("tdv/player/view/webgl/system/videoMaterial/TextureController","require tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/webgl/system/util/texture/Util tdv/player/view/webgl/system/util/Util tdv/player/view/util/Device".split(" "),function(a){function m(f,l,p,q){this.X0=d.Yb()==d.nx?THREE.LinearSRGBColorSpace:l.get("encoding","srgb")=="srgb"?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;
this.ds();this.ra=f;this.A=l;this.hb=p;this.Na=q;this.rN=this.hb.get("posterURL");this.CHa=this.hb.get("url");this.Pa=this.hb.get("width");this.Ha=this.hb.get("height");this.Hg=null;this.yI=this.zI=void 0;this.jAa();this.hb.bind(h.L("posterURL"),this.ACa,this,!0);this.Na();this.ga=this.ja=null}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/constants/Priority"),k=a("tdv/player/view/image/Item"),e=a("tdv/player/view/image/Repository"),b=a("tdv/player/view/webgl/system/util/texture/Util"),
c=a("tdv/player/view/webgl/system/util/Util"),d=a("tdv/player/view/util/Device");m.prototype.update=function(){var f=this.ra.E7();f.isEmpty()&&(f=null);if(f&&(!this.Hg||this.Hg&&!this.Hg.isEqual(f))){this.Hg=f;f=this.Hg.Zu;var l=c.wP(f);l&&(f.width=f.videoWidth||this.Pa,f.height=f.videoHeight||this.Ha);!this.ja&&this.CHa&&c.ETa(this.CHa)&&(this.ja=document.createElement("canvas"),this.ja.width=this.Pa,this.ja.height=this.Ha,this.ga=this.ja.getContext("2d"));this.ja&&l&&(this.ga.drawImage(f,0,0,this.ja.width,
this.ja.height),f=this.ja);this.hFa(f)}else!this.Hg&&this.rz&&this.Ma.image!=this.rz&&this.hFa(this.rz);(this.Ma.needsUpdate||this.ra.getState()==n.PLAYING)&&this.Na()};m.prototype.ACa=function(){this.Q8a(this.hb.get("posterURL"))};m.prototype.Q8a=function(f){this.rN!=f&&(this.vGa(),this.rN=f,this.jAa())};m.prototype.jAa=function(){this.rN&&(this.rz=null,this.qN=new k,this.qN.fQ([this.rN]),this.qN.bind(h.ia,this.zCa,this,!0),e.FA(this.qN,this.A.get("loadPriority",g.Hm)))};m.prototype.vGa=function(){this.rN&&
(this.qN.h(h.ia,this.zCa,this,!0),e.ho(this.qN,this.A.get("loadPriority",g.Hm)),this.rz=this.qN=null)};m.prototype.zCa=function(){this.rz=e.xg(this.rN);if(this.rz.width!=this.Pa||this.rz.height!=this.Ha){var f=document.createElement("canvas"),l=f.getContext("2d");f.width=this.Pa;f.height=this.Ha;l.drawImage(this.rz,0,0,this.Pa,this.Ha);this.rz=f}this.Na()};m.prototype.hFa=function(f){this.Ma&&this.zI==f.width&&this.yI==f.height?this.Ma.image=f:this.ds(f);this.Ma.needsUpdate=!0};m.prototype.ds=function(f){this.O0();
this.Ma=new THREE.Texture;this.Ma.image=f||b.aLa();this.zI=this.Ma.image.width;this.yI=this.Ma.image.height;this.Ma.generateMipmaps=!1;this.Ma.minFilter=THREE.LinearFilter;this.Ma.magFilter=THREE.LinearFilter;this.Ma.format=THREE.RGBAFormat};m.prototype.O0=function(){this.Ma&&(this.yI=this.zI=void 0,this.Ma.dispose(),this.Ma=null)};m.prototype.dispose=function(){this.vGa();this.hb.h(h.L("posterURL"),this.ACa,this,!0);this.ga=this.hb=null;this.ja&&(this.ja=this.ja.width=this.ja.height=0);this.O0();
this.Na=this.Th=this.ra=null};m.prototype.X7=function(){return this.Ma};return m});
define("tdv/player/view/webgl/system/videoMaterial/AlphaMapController","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/image/Item tdv/player/view/image/Repository three.mod".split(" "),function(a,m,h,n,g,k,e,b){var c=["alphaMap"];return function(){function d(f,l,p){this.ekb=function(q){this.z6!=q&&(this.bTa(),this.z6=q,this.Qhb())};this.properties=f;this.level=l;this.Qa=p;this.r9=this.r9.bind(this);h.ba(this.level,c,this.r9,!0)}d.prototype.dispose=
function(){h.da(this.level,c,this.r9);this.bTa();this.leb()};d.prototype.X7=function(){return this.texture};d.prototype.r9=function(){this.ekb(this.level.get("alphaMapURL"))};d.prototype.Qhb=function(){this.z6&&(this.VI=new k,this.VI.fQ([this.z6]),this.VI.bind(n.ia,this.mOa,this,!0),e.FA(this.VI,this.properties.get("loadPriority",g.Hm)))};d.prototype.bTa=function(){this.VI&&(this.VI.h(n.ia,this.mOa,this,!0),e.ho(this.VI,this.properties.get("loadPriority",g.Hm)),this.fIa=this.VI=null)};d.prototype.mOa=
function(){this.fIa=e.xg(this.z6);this.createTexture();this.Qa()};d.prototype.createTexture=function(){this.texture=new b.Texture;this.texture.image=this.fIa;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.leb=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{nUa:function(){this.blending=0;this.zP=void 0;this.SRa=this.threshold=0},nWa:function(){this.rP=!1;this.height=this.width=100},create:function(h,n,g){var k=h.rP&&m.wMa(),e=h.rP&&m.vMa(),b=void 0,c=!k,d={uniforms:{},transparent:!0};d.uniforms.text1={type:"sampler2D",
value:null};d.uniforms.textAlpha={type:"sampler2D",value:null};d.uniforms.validTextAlpha={type:"bool",value:!1};d.uniforms.opacity={type:"float",value:1};d.vertexShader=["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+(k?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(e||n.blending||n.zP){k=[];var f=[];k=k.concat(["uniform sampler2D text1;","uniform sampler2D textAlpha;","uniform bool validTextAlpha;","uniform float opacity;",
"varying vec2 vUV;"]);f=f.concat(["   vec4 color = texture2D(text1, vUV);","   float alpha = color.a * opacity;","   if (validTextAlpha)","       alpha *= texture2D(textAlpha, vUV).r;"]);n.blending&&(b=Math.min(h.width,h.height)*.5*n.blending,d.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(b/h.width,b/h.height)},k=k.concat(["uniform vec2 blendingLimit;"]),f=f.concat("   float xCoef = 0.0;,   float yCoef = 0.0;,   if (vUV.x < blendingLimit.x) {,      xCoef = 1.0 - (vUV.x / blendingLimit.x);,      xCoef = xCoef * xCoef;,   } else if ((1.0 - vUV.x) < blendingLimit.x) {,      xCoef = 1.0 - ((1.0 - vUV.x) / blendingLimit.x);,      xCoef = xCoef * xCoef;,   },   if (vUV.y < blendingLimit.y) {,      yCoef = 1.0 - (vUV.y / blendingLimit.y);,      yCoef = yCoef * yCoef;,   } else if ((1.0 - vUV.y) < blendingLimit.y) {,      yCoef = 1.0 - ((1.0 - vUV.y) / blendingLimit.y);,      yCoef = yCoef * yCoef;,   },   alpha = alpha * (1.0 - sqrt(xCoef + yCoef));".split(",")));
n.zP&&(d.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(n.zP.substr(1,2),16)/255,parseInt(n.zP.substr(3,2),16)/255,parseInt(n.zP.substr(5,2),16)/255)},d.uniforms.chromaThreshold={type:"f",value:n.threshold},d.uniforms.chromaSmoothing={type:"f",value:n.SRa},k=k.concat(["uniform vec3 chromaColor;","uniform float chromaThreshold;","uniform float chromaSmoothing;"]),f=f.concat("    float maskY = 0.2989 * chromaColor.r + 0.5866 * chromaColor.g + 0.1145 * chromaColor.b;{    float maskCr = 0.7132 * (chromaColor.r - maskY);{    float maskCb = 0.5647 * (chromaColor.b - maskY);{    float Y = 0.2989 * color.r + 0.5866 * color.g + 0.1145 * color.b;{    float Cr = 0.7132 * (color.r - Y);{    float Cb = 0.5647 * (color.b - Y);{    float chromaBlendValue = smoothstep(chromaThreshold, chromaThreshold + chromaSmoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb)));{    alpha = alpha * chromaBlendValue;".split("{")));
f=f.concat(["\tgl_FragColor = vec4(color"+(e?".bgr":".rgb")+", alpha);"]);b=THREE.RGBAFormat;d.fragmentShader=[].concat(k,["void main() {"],f,[],["}"]).join("\n")}else d.fragmentShader="uniform sampler2D text1;\nuniform sampler2D textAlpha;\nuniform bool validTextAlpha;\nuniform float opacity;\nvarying vec2 vUV;\nvoid main() {\n   vec4 color = texture2D(text1, vUV);\n   float alpha = color.a * opacity;\n   if (validTextAlpha)\n       alpha *= 1.0 - texture2D(textAlpha, vUV).r;\n\tgl_FragColor = vec4(color.rgb, alpha);\n\n}";
h=new THREE.ShaderMaterial(d);h.transparent=!0;h.depthWrite=!0;h.side=THREE.FrontSide;h.depthTest=!0;h.needsUpdate=!0;h.userData.ESa=c;h.userData.FSa=b;this.IZ(h,g);return h},IZ:function(h,n){h.uniforms.text1.value!==n&&(h.userData.ESa!==void 0&&(n.flipY=h.userData.ESa),h.userData.FSa!==void 0&&(n.format=h.userData.FSa),h.uniforms.text1.value=n)},fnb:function(h,n){h.uniforms.textAlpha.value!==n&&(h.uniforms.textAlpha.value=n,h.uniforms.validTextAlpha.value=!!n)}}});
define("tdv/player/view/webgl/system/videoMaterial/Behaviour","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/webgl/system/videoMaterial/VideoPlayerController tdv/player/view/webgl/system/videoMaterial/TextureController tdv/player/view/webgl/system/videoMaterial/AlphaMapController tdv/player/view/webgl/system/util/material/VideoShader tdv/player/view/webgl/system/util/Util tdv/player/view/webgl/components tdv/view/av/SubtitleController tdv/view/av/VideoPlayer".split(" "),
function(a){function m(q){this.B=q;this.m3=this.m3.bind(this);q=q.getComponent(f.ro);this.Ee=q.M;this.A=q.properties;this.l6=q.Msa;this.Ie=this.B.T.dr();this.Na=this.Na.bind(this);this.ih=!1;this.hb=null;h.ba(this.l6,["levels.url","levels.srcObject","levels.width","levels.height"],this.m3,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/view/webgl/system/videoMaterial/VideoPlayerController"),e=a("tdv/player/view/webgl/system/videoMaterial/TextureController"),
b=a("tdv/player/view/webgl/system/videoMaterial/AlphaMapController"),c=a("tdv/player/view/webgl/system/util/material/VideoShader"),d=a("tdv/player/view/webgl/system/util/Util"),f=a("tdv/player/view/webgl/components"),l=a("tdv/view/av/SubtitleController"),p=a("tdv/view/av/VideoPlayer");m.prototype.update=function(){this.ih&&(this.ih=!1,this.Pq.update(),c.IZ(this.Aa,this.Pq.X7()),c.fnb(this.Aa,this.Sca.X7()))};m.prototype.m3=function(){this.eV(p.yk(this.l6))};m.prototype.eV=function(q){q=q&&(q.get("url")||
q.get("srcObject"))?q:null;this.hb!=q&&(this.hb&&(this.BHa.dispose(),this.BHa=null,this.A.h(n.L("opacity"),this.FCa,this,!0),this.Eea(),this.Pq.dispose(),this.Pq=null,this.Sca.dispose(),this.Sca=null,this.W_a(),this.ih=!1),this.hb=q)&&(this.F_a(),this.BHa=new k(this.ra,this.A,this.Ee,this.Na),this.Pq=new e(this.ra,this.A,this.hb,this.Na),this.Sca=new b(this.A,this.hb,this.Na),this.ly(),this.A.bind(n.L("opacity"),this.FCa,this,!0),this.WEa(this.Of=this.A.get("opacity",1)),this.ih=!1,this.Na())};m.prototype.Na=
function(){this.ih||(this.ih=!0,this.B.T.Qa())};m.prototype.F_a=function(){this.ra=new p(this.B.T.dr(),this.l6);this.xn=new l(this.A,this.ra)};m.prototype.W_a=function(){this.ra.Zc(g.ca);this.ra.clear();this.ra=null;this.xn.clear();this.xn=null};m.prototype.ly=function(){var q=new c.nWa;q.rP=!this.hb.get("srcObject")&&d.rP(this.hb.get("url"));q.width=this.hb.get("width");q.height=this.hb.get("height");var r=new c.nUa;r.blending=this.A.get("blending",0);r.zP=this.A.get("chromaColor");r.threshold=this.A.get("chromaThreshold",
0);r.SRa=this.A.get("chromaSmoothing",0);this.Aa=c.create(q,r,this.Pq.X7());this.B.N(f.Material).material=this.Aa};m.prototype.Eea=function(){this.Aa.dispose();this.Aa=null;this.B.ka(f.Material)};m.prototype.dispose=function(){this.eV(null);this.A.set("state",g.ca);this.B=this.Ee=this.A=this.Ie=null;h.da(this.l6,["levels.url","levels.srcObject","levels.width","levels.height"],this.m3)};m.prototype.FCa=function(){var q=this.A.get("opacity");this.Of!=q&&(this.WEa(this.Of=q),this.Na())};m.prototype.WEa=
function(q){this.Aa.opacity=q;this.Aa.isShaderMaterial&&this.Aa.uniforms.opacity&&(this.Aa.uniforms.opacity.value=q)};m.Wa=function(q){q.N(f.XB).manager=new m(q)};m.ya=function(q){var r=q.getComponent(f.XB);r.manager.dispose();r.manager=null;q.ka(f.XB)};m.update=function(q){q.getComponent(f.XB).manager.update()};return m});
define("tdv/player/view/webgl/system/videoMaterial/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/components","tdv/player/view/webgl/system/videoMaterial/Behaviour"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/videoMaterial/Behaviour");a=m.extend(h,function(){h.apply(this,arguments)});a.prototype.Yc=function(){this.On.v.length&&this.On.v.slice().forEach(g.Wa);
this.Pn.v.length&&this.Pn.v.slice().forEach(g.ya);this.materials.v.length&&this.materials.v.slice().forEach(g.update)};a.J={};a.J.On=[n.ro,n.XB.aa];a.J.materials=[n.ro,n.XB];a.J.Pn=[n.ro.aa,n.XB];return a});
define("tdv/player/view/webgl/system/viewport/System",["require","tdv/utils","tdv/player/view/webgl/ecs/System","tdv/player/view/webgl/system/util/entity/Util","tdv/player/view/webgl/components"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/system/util/entity/Util"),g=a("tdv/player/view/webgl/components");a=m.extend(h,function(){h.apply(this,arguments);this.Aka=this.Aka.bind(this);this.eO=this.eO.bind(this)});a.prototype.Yc=function(){this.Nsa.fe.length&&
this.Nsa.fe.slice().forEach(this.Aka);this.VJ.Da.length&&this.VJ.Da.slice().forEach(this.eO);this.Rt.Da.length&&this.Rt.Da.slice().forEach(this.eO);this.VJ.fe.length&&this.VJ.fe.slice().forEach(this.eO);this.Rt.fe.length&&this.Rt.fe.slice().forEach(this.eO)};a.prototype.Aka=function(k){var e=k.getComponent(g.so),b=n.kX(e.Ea),c=b&&b.width||100;b=b&&b.height||100;if(e.width!=c||e.height!=b)e=k.O(g.so),e.width=c,e.height=b};a.prototype.eO=function(k){var e=n.kX(k);this.Nsa.v.forEach(function(b){if(b.getComponent(g.so).Ea==
k){var c=b.getComponent(g.so);if(c.width!=e.width||c.height!=e.height)c=b.O(g.so),c.width=e.width,c.height=e.height}})};a.J={};a.J.Nsa=[g.so];a.J.VJ=[g.OrthographicCamera];a.J.Rt=[g.PerspectiveCamera];return a});
define("tdv/player/view/webgl/system/util/geometry/Plane",["require"],function(){return{create:function(){var a=new THREE.BufferGeometry;a.setAttribute("position",new THREE.BufferAttribute(new Float32Array(18),3));a.setAttribute("normal",new THREE.BufferAttribute(new Float32Array(18),3));a.setAttribute("uv",new THREE.BufferAttribute(new Float32Array(12),2));a.setIndex(new THREE.BufferAttribute(new Uint32Array(6),1));return a},set:function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){var t=a.getAttribute("position").array,
u=a.getAttribute("normal").array,v=a.getAttribute("uv").array,w=a.getIndex().array;t[9]=t[0]=m;t[10]=t[1]=h;t[11]=t[2]=n;v[6]=v[0]=g;v[7]=v[1]=k;t[3]=t[0]+f;t[4]=t[1]+l;t[5]=t[2]+p;v[2]=v[0];v[3]=v[1]+q;t[12]=t[6]=t[3]+e;t[13]=t[7]=t[4]+b;t[14]=t[8]=t[5]+c;v[8]=v[4]=v[2]+d;v[9]=v[5]=v[3];t[15]=t[12]-f;t[16]=t[13]-l;t[17]=t[14]-p;v[10]=v[8];v[11]=v[9]-q;m=b*p-c*l;c=c*f-e*p;e=e*l-b*f;b=1/Math.sqrt(m*m+c*c+e*e);u[0]=u[3]=u[6]=u[9]=u[12]=u[15]=m*b;u[1]=u[4]=u[7]=u[10]=u[13]=u[16]=c*b;u[2]=u[5]=u[8]=u[11]=
u[14]=u[17]=e*b;w[0]=0;w[1]=2;w[2]=1;w[3]=3;w[4]=5;w[5]=4;a.getAttribute("position").needsUpdate=!0;a.getAttribute("normal").needsUpdate=!0;a.getAttribute("uv").needsUpdate=!0;a.clearGroups();a.addGroup(0,6,r);a.computeBoundingBox();a.computeBoundingSphere();return a}}});
define("tdv/player/view/webgl/system/util/BindableWatcher",["require","tdv/constants/EventName","tdv/events/async"],function(a){function m(g,k,e){this.ps=g;this.A=k;this.bga=e;this.M4=this.M4.bind(this);this.zL=void 0;this.A.forEach(function(b){this.ps.bind(h.L(b),this.ET,this,!0)}.bind(this));this.M4()}var h=a("tdv/constants/EventName"),n=a("tdv/events/async");m.prototype.stop=function(){this.A.forEach(function(g){this.ps.h(h.L(g),this.ET,this,!0)}.bind(this));this.zL&&(n.cancel(this.zL),this.zL=
void 0)};m.prototype.ET=function(){this.zL||(this.zL=n.ME(this.M4))};m.prototype.M4=function(){this.zL=void 0;var g=this.ps;this.bga.apply(window,this.A.map(function(k){return g.get(k)}))};return m});
define("tdv/player/view/webgl/system/viewportPlaneGeometry/System","require tdv/utils tdv/player/view/webgl/ecs/System tdv/player/view/webgl/components tdv/player/view/webgl/system/util/geometry/Plane tdv/player/view/webgl/system/util/BindableWatcher tdv/player/view/webgl/system/util/entity/Util tdv/view/constants/Alignment tdv/view/constants/ScaleMode".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/webgl/ecs/System"),n=a("tdv/player/view/webgl/components"),g=a("tdv/player/view/webgl/system/util/geometry/Plane"),
k=a("tdv/player/view/webgl/system/util/BindableWatcher"),e=a("tdv/player/view/webgl/system/util/entity/Util"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/ScaleMode"),d=m.extend(h,function(){h.apply(this,arguments);this.zka=this.zka.bind(this);this.Zla=this.Zla.bind(this);this.ala=this.ala.bind(this)});d.prototype.Yc=function(){this.GE.v.length&&this.GE.v.slice().forEach(this.zka);this.planes.Da.length&&this.planes.Da.slice().forEach(this.Zla);this.sY.v.length&&this.sY.v.slice().forEach(this.ala)};
d.prototype.zka=function(f){var l=f.getComponent(n.dG),p=f.N(n.so);p.Ea=l.Ea;var q=e.kX(l.Ea);q&&(p.width=q.width,p.height=q.height);p=f.N(n.Lx);p.geometry=g.create();p.$Pa=new k(l.properties,"width height horizontalAlign verticalAlign scaleMode zIndex".split(" "),function(r,t,u,v,w,x){var y=f.O(n.Lx);y.WRa=r;y.URa=t;y.Yh=u;y.verticalAlign=v;y.NE=w;y.zIndex=x});f.N(n.Geometry).geometry=p.geometry};d.prototype.ala=function(f){var l=f.getComponent(n.Lx);l.geometry.dispose();l.geometry=null;l.$Pa.stop();
l.$Pa=null;f.ka(n.Geometry);f.ka(n.so);f.ka(n.Lx)};d.prototype.Zla=function(f){var l=f.getComponent(n.Lx),p=f.getComponent(n.so),q=p.width,r=p.height,t=l.WRa,u=l.URa;switch(l.NE){case c.NONE:p=t;var v=u;break;case c.Tp:p=q;v=u*q/t;break;case c.Pk:v=r;p=t*r/u;break;case c.Jr:t*r>u*q?(v=r,p=t*r/u):(p=q,v=u*q/t);break;default:t*r>u*q?(p=q,v=u*q/t):(v=r,p=t*r/u)}switch(l.Yh){case b.fb:q=-q*.5;break;case b.Db:q=q*.5-p;break;default:q=-p*.5}switch(l.verticalAlign){case b.Tc:r=r*.5-v;break;case b.Gc:r=-r*
.5;break;default:r=-v*.5}t=l.zIndex-d.hVa;g.set(l.geometry,q,r,0,0,0,p,0,0,1,0,v,0,1,0);f.O(n.ta,!0).positionZ=t;f.T.Qa()};d.hVa=100;d.J={};d.J.GE=[n.dG,n.Lx.aa];d.J.planes=[n.dG,n.Lx,n.so];d.J.sY=[n.dG.aa,n.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/aranchor/System tdv/player/view/webgl/system/area/System tdv/player/view/webgl/system/beacon/System tdv/player/view/webgl/system/camera/System tdv/player/view/webgl/system/cameraControls/System tdv/player/view/webgl/system/cameraOffsetTransform/System tdv/player/view/webgl/system/canvasMaterial/System tdv/player/view/webgl/system/clippingRect/System tdv/player/view/webgl/system/light/DirectionalLightSystem tdv/player/view/webgl/system/dragging/System tdv/player/view/webgl/system/floor/System tdv/player/view/webgl/system/floorTransform/System tdv/player/view/webgl/system/group/System tdv/player/view/webgl/system/grid/System tdv/player/view/webgl/system/imageMaterial/System tdv/player/view/webgl/system/lineMaterial/System tdv/player/view/webgl/system/line/System tdv/player/view/webgl/system/lineToTransform/System tdv/player/view/webgl/system/objectTransform/System tdv/player/view/webgl/system/materialVariant/System tdv/player/view/webgl/system/mesh/System tdv/player/view/webgl/system/model/System tdv/player/view/webgl/system/objectId/System tdv/player/view/webgl/system/plane/System tdv/player/view/webgl/system/parent/System tdv/player/view/webgl/system/pixelScaleTransform/System tdv/player/view/webgl/system/pointerOverTransform/System tdv/player/view/webgl/system/projectedMaterial/System tdv/player/view/webgl/system/renderer/System tdv/player/view/webgl/system/scene/System tdv/player/view/webgl/system/selection/System tdv/player/view/webgl/system/light/SpotLightSystem tdv/player/view/webgl/system/solidMaterial/System tdv/player/view/webgl/system/sphere/System tdv/player/view/webgl/system/sprite/System tdv/player/view/webgl/system/transform/System tdv/player/view/webgl/system/transformControls/System tdv/player/view/webgl/system/videoMaterial/System tdv/player/view/webgl/system/viewport/System tdv/player/view/webgl/system/viewportPlaneGeometry/System".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u,v,w,x,y,z,A,D,F,C,B,H,E,G,N,O,R,Q,K,L,U,T,Y,aa,ba,ea,ia,da){a={};a.AmbientLight=h;a.Animation=n;a.nF=g;a.lo=k;a.AB=e;a.Camera=b;a.jUa=c;a.RK=d;a.Kf=f;a.tF=l;a.DirectionalLight=p;a.Gm=q;a.Lr=r;a.zx=t;a.wu=v;a.Group=u;a.Ni=w;a.ei=x;a.Line=y;a.yu=z;a.gi=A;a.Bx=D;a.Mesh=F;a.Oi=C;a.AVa=B;a.pb=E;a.Plane=H;a.Tk=G;a.Dl=N;a.po=O;a.wj=R;a.Scene=Q;a.Selection=K;a.xd=U;a.Sphere=T;a.SpotLight=L;a.Sprite=Y;a.ta=aa;a.Hh=ba;a.ro=ea;a.so=ia;a.dG=da;return a});
define("tdv/view/util/Screenshot",["require","exports"],function(){return function(){function a(){}a.HSa=function(m){var h;h||(h="screenshot.jpg");a:{try{var n=m.toDataURL("image/jpeg");break a}catch(g){}n=void 0}if(!n)return!1;m=n;n=document.createElement("a");typeof n.download==="string"?(document.body.appendChild(n),n.download=h,n.href=m,n.click(),document.body.removeChild(n)):window.location.replace(m);return!0};return a}()});
define("tdv/player/view/webgl/Renderer","require exports tdv/constants/EventName tdv/view/core/UIComponent tdv/view/util/Assets tdv/player/view/Flash tdv/player/view/webgl/ecs/World tdv/player/view/webgl/components tdv/player/view/webgl/systems tdv/view/util/Screenshot".split(" "),function(a,m,h,n,g,k,e,b,c,d){function f(q){return q.map(function(r){return String.fromCharCode(r)}).join("")}a=function(q){function r(t,u,v){var w=q.call(this)||this;w.Ie=t;w.P=u;w.vbb=v;w.aA=(new e(t)).na(b.MK).na(b.AmbientLight).na(b.wB).na(b.Animation).na(b.lx).na(b.pF).na(b.nF).na(b.kx).na(b.vB).na(b.Br).na(b.Wf).na(b.lo).na(b.xB).na(b.qF).na(b.AB).na(b.BB).na(b.Qp).na(b.qx).na(b.Kf).na(b.DB).na(b.SK).na(b.sx).na(b.RK).na(b.kUa).na(b.tF).na(b.EB).na(b.DirectionalLight).na(b.Dr).na(b.ux).na(b.FB).na(b.Gm).na(b.NF).na(b.Kr).na(b.OF).na(b.Mr).na(b.Lr).na(b.yx).na(b.zx).na(b.vu).na(b.Geometry).na(b.wu).na(b.KB).na(b.Group).na(b.ZK).na(b.Ni).na(b.MB).na(b.Line).na(b.ei).na(b.OB).na(b.yu).na(b.QB).na(b.PB).na(b.Material).na(b.gi).na(b.RB).na(b.Bx).na(b.Qr).na(b.Mesh).na(b.Au).na(b.Oi).na(b.Cx).na(b.TF).na(b.vVa).na(b.Rr).na(b.UF).na(b.Object3D).na(b.gL).na(b.Dx).na(b.VF).na(b.Sr).na(b.OrthographicCamera).na(b.Bu).na(b.PerspectiveCamera).na(b.Sk).na(b.pb).na(b.Du).na(b.Tk).na(b.XF).na(b.Plane).na(b.UB).na(b.zc).na(b.Fx).na(b.Dl).na(b.Eu).na(b.Gx).na(b.po).na(b.Tr).na(b.xd).na(b.Hx).na(b.ta).na(b.bG).na(b.Gg).na(b.Hh).na(b.Mm).na(b.wj).na(b.Fu).na(b.Scene).na(b.Vp).na(b.wd).na(b.YF).na(b.Sphere).na(b.ZF).na(b.SpotLight).na(b.Hu).na(b.Sprite).na(b.Iu).na(b.xd).na(b.Hx).na(b.Jx).na(b.Ku).na(b.ro).na(b.XB).na(b.so).na(b.dG).na(b.Lx).na(b.mL).na(b.lg).na(b.eG).na(b.Yp).na(b.nL).na(b.Zp).na(b.oL).na(b.$p).na(b.pL).na(b.aq).ed(c.Camera,
"Camera").ed(c.so,"Viewport").ed(c.Ni,"ImageMaterial").ed(c.Kf,"CanvasMaterial").ed(c.ei,"LineMaterial").ed(c.xd,"SolidMaterial").ed(c.ro,"VideoMaterial").ed(c.Bx,"MaterialVariant").ed(c.dG,"ViewportPlaneGeometry").ed(c.wu,"Grid").ed(c.Group,"Group").ed(c.Line,"Line").ed(c.Mesh,"Mesh").ed(c.Plane,"Plane").ed(c.Lr,"Floor").ed(c.Sphere,"Sphere").ed(c.Sprite,"Sprite").ed(c.Oi,"Model").ed(c.nF,"ARAnchor").ed(c.po,"ProjectedMaterial").ed(c.AmbientLight,"AmbientLight").ed(c.DirectionalLight,"DirectionalLight").ed(c.SpotLight,
"SpotLight").ed(c.Scene,"Scene").ed(c.pb,"Parent").ed(c.AVa,"ObjectId").ed(c.Animation,"Animation").ed(c.RK,"CameraOffsetTransform").ed(c.gi,"ObjectTransform").ed(c.zx,"FloorTransform").ed(c.jUa,"CameraControls").ed(c.Gm,"Dragging").ed(c.Selection,"Selection").ed(c.Dl,"PointerOverTransform").ed(c.Tk,"PixelScaleTransform").ed(c.ta,"Transform").ed(c.Hh,"TransformControls").ed(c.lo,"Area").ed(c.yu,"LineToTransform").ed(c.Camera.NK,"CameraAutoNearFar").ed(c.tF,"ClippingRect").ed(c.Scene.m_,"SceneFade").ed(c.AB,
"Beacon").ed(c.wj,"Renderer");w.j=w.aA.sc("Renderer");w.oI=[];w.Eka=!1;w.bind(h.od,w.cp,w,!0);w.bind(h.jd,w.ap,w,!0);return w}P(r,q);r.prototype.Kb=function(){q.prototype.Kb.call(this);this.YG||(this.YG=new k,this.wa().tk(this.YG.cc()))};r.prototype.sc=function(t){return this.aA.sc(t)};r.prototype.dd=function(t){this.aA.dd(t)};r.prototype.Qa=function(){this.aA.Qa()};r.prototype.bIa=function(t){!(this.oI.indexOf(t)>=0)&&(this.oI.push(t),t=this.j.O(b.wj))&&(t.LY=this.oI.slice())};r.prototype.Fjb=function(t){t=
this.oI.indexOf(t);!(t<0)&&(this.oI.splice(t,1),t=this.j.O(b.wj))&&(t.LY=this.oI.slice())};r.prototype.o$=function(t){this.aA.o$(t)};r.prototype.Ra=function(t){this.aA.Ra(t)};r.prototype.hK=function(){this.YG.o();this.aA.update();return d.HSa(this.j.getComponent(b.wj).renderer.domElement)};r.prototype.ina=function(){this.aA.update();return this.j.getComponent(b.wj).renderer.domElement.toDataURL("image/png")};r.prototype.cp=function(){this.t9a()};r.prototype.ap=function(){this.l$a()};r.prototype.t9a=
function(){var t=this.j.getComponent(b.wj);if(!t&&(t=this.j.N(b.wj),t.eb=this.P,t.LY=this.oI.slice(),this.Ie.get(l)&&this.vbb)){this.pW=document.createElement("div");for(var u in p)this.pW.style[u]=p[u];this.wa().tk(this.pW)}};r.prototype.l$a=function(){this.j.getComponent(b.wj)&&(this.pW&&this.wa().Y9(this.pW),this.pW=null,this.j.ka(b.wj))};return r}(n);var l=f([119,97,116,101,114,109,97,114,107]),p={};p[f([104,101,105,103,104,116])]=f([49,48,48,37]);p[f([119,105,100,116,104])]=f([49,48,48,37]);
p[f([112,111,115,105,116,105,111,110])]=f([97,98,115,111,108,117,116,101]);p[f([116,111,112])]=0;p[f([108,101,102,116])]=0;p[f([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=f([117,114,108,40,34])+g.oWa+f([34,41]);p[f([98,97,99,107,103,114,111,117,110,100,80,111,115,105,116,105,111,110])]=f([99,101,110,116,101,114]);p[f([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=f([99,111,110,116,97,105,110]);p[f([112,111,105,110,116,101,114,69,118,101,110,116,115])]=f([110,111,110,101]);
p[f([98,97,99,107,103,114,111,117,110,100,82,101,112,101,97,116])]=f([110,111,45,114,101,112,101,97,116]);p[f([111,112,97,99,105,116,121])]=.5;return a});
define("tdv/player/view/model3d/renderer/adapters/CameraAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){var b=["autoNearFar","autoNearFarTolerance","near","far","userInteracting"],c=["inTransition"],d={OrbitModel3DCamera:k.VF,FirstPersonModel3DCamera:k.NF,FlyOverModel3DCamera:k.OF},f={FirstPersonModel3DCamera:k.pL,OrbitModel3DCamera:k.nL,FlyOverModel3DCamera:k.oL};
return function(){function l(p,q,r,t){this.renderer=p;this.model=q;this.wb=r;this.Ea=t;this.eb=this.renderer.P;this.camera=null;this.enabled=!0;this.locked=!1;this.Vg=this.Vg.bind(this);this.i9=this.i9.bind(this);this.renderer.bind(n.$b,this.sl,this,!0);this.model.bind(n.L("camera"),this.b9,this,!0);this.eb.bind(n.L("isKeyboardTarget"),this.Zpa,this,!0);e.M.bind(n.V,this.Ta,this,!0);this.b9();this.Ta();this.Zpa();this.sl()}l.prototype.Uw=function(p){this.locked!==p&&(this.locked=p,this.maa())};l.prototype.Ra=
function(p){this.enabled!==p&&(this.enabled=p,this.maa())};l.prototype.dispose=function(){this.setCamera(null);this.model.h(n.L("camera"),this.b9,this);this.eb.h(n.L("isKeyboardTarget"),this.Zpa,this);this.renderer.h(n.$b,this.sl,this);e.M.h(n.V,this.Ta,this)};l.prototype.Ta=function(){this.Ea.O(k.PerspectiveCamera,!0).nj=e.Ag==this.eb.Rc().Kn()};l.prototype.b9=function(){this.setCamera(this.model.get("camera"))};l.prototype.setCamera=function(p){if(this.camera!==p){this.camera&&(this.aF(!1),h.da(this.camera,
b,this.Vg),h.da(this.camera,c,this.i9),this.camera.set("inTransition",!1));if(this.camera=p)h.ba(this.camera,b,this.Vg,!0),h.ba(this.camera,c,this.i9,!0),this.gcb(),this.Ea.O(k.SK,!0).properties=this.camera;this.maa()}};l.prototype.maa=function(){var p,q,r,t,u=!!this.camera&&this.camera.get("inTransition");u&&this.enabled?t=this.Ea.O(k.Jx,!0):this.Ea.ka(k.Jx);for(var v in d){var w=d[v];!u&&this.enabled&&this.camera&&g.Oa(v,this.camera)?p=this.Ea.O(w,!0):this.Ea.ka(w);(w=f[v])&&(!u&&this.enabled&&
this.camera&&g.Oa(v,this.camera)?q=this.Ea.O(w,!0):this.Ea.ka(w))}!u&&this.enabled?r=this.Ea.O(k.vB,!0):this.Ea.ka(k.vB);p&&(p.properties=this.camera,p.Rf=this.renderer.getParent(),p.yQa=this.eb.VS,p.kE=this.eb.get("isKeyboardTarget"),p.locked=this.locked);t&&(t.properties=this.camera,t.pf=this.model.get("worldUnitToMeters"),t.locked=this.locked);q&&(q.properties=this.camera,q.pf=this.model.get("worldUnitToMeters"),q.Jk=this.eb.get("vrThumbstickRotationStep"),q.locked=this.locked);r&&(r.properties=
this.camera,r.pf=this.model.get("worldUnitToMeters"),r.Jk=this.eb.get("arThumbstickRotationStep"),r.wb=this.wb,r.locked=this.locked)};l.prototype.Zpa=function(){var p=this.cfb();p&&(p.kE=this.eb.get("isKeyboardTarget"))};l.prototype.cfb=function(){if(!this.camera)return null;var p=null,q;for(q in d){var r=d[q];this.camera&&g.Oa(q,this.camera)&&(p=this.Ea.O(r,!0))}return p};l.prototype.Vg=function(){if(this.camera){var p=this.Ea.O(k.PerspectiveCamera,!0);p.Vma=this.camera.get("autoNearFar");p.DIa=
this.camera.get("autoNearFarTolerance");p.near=this.camera.get("near");p.far=this.camera.get("far");this.aF(this.camera.get("userInteracting"))}};l.prototype.i9=function(){this.maa()};l.prototype.sl=function(){var p=this.Ea.O(k.PerspectiveCamera,!0);p.width=this.renderer.Xh();p.height=this.renderer.Wh()};l.prototype.gcb=function(){var p=this.camera;p.set("fov",p.get("initialFov"));p.set("x",p.get("initialX"));p.set("y",p.get("initialY"));p.set("z",p.get("initialZ"));p.set("distance",p.get("initialDistance",
0));p.set("yaw",p.get("initialYaw"));p.set("pitch",p.get("initialPitch"))};l.prototype.aF=function(p){this.iF!=p&&(this.iF=p,this.camera&&this.camera.o(this.iF?n.Pua:n.Oua))};return l}()});define("tdv/player/script/OrbitLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("OrbitLight",m,function(){m.call(this)})});
define("tdv/player/view/model3d/renderer/adapters/ArrayAdapter",["require","exports","tdv/binding/BindingsHandler"],function(a,m,h){return function(){function n(){this.gY=this.gY.bind(this);this.V9=this.object=null;this.elements=[];this.YW=new Map;this.KPa=this.Xg=this.fe=this.filter=null}n.prototype.jB=function(g,k){this.dispose();this.object=g;this.V9=k;h.ba(this.object,[this.V9],this.gY,!0)};n.prototype.gY=function(g){g=g||[];this.filter&&(g=g.filter(this.filter));var k=this.elements,e=this.elements=
g;k.forEach(function(b,c){var d=e.indexOf(b);if(d==-1){var f=this.YW.get(b);this.YW["delete"](b);this.Xg&&this.Xg(b,f)}else d!=c&&(f=this.YW.get(b),this.KPa&&(c=this.KPa(b,d,f,c),c!=f&&this.YW.set(b,c)))}.bind(this));e.forEach(function(b,c){k.indexOf(b)==-1&&this.fe&&(c=this.fe(b,c),this.YW.set(b,c))}.bind(this))};n.prototype.dispose=function(){this.object&&(h.da(this.object,[this.V9],this.gY),this.gY([]),this.V9=this.object=null)};return n}()});
define("tdv/player/view/model3d/renderer/adapters/lights/AmbientLightAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a,m,h,n){var g=["color","intensity"];return function(){function k(e,b,c,d,f){this.Vg=this.Vg.bind(this);this.object=e;this.model=b;this.wb=c;this.zg=d;this.Ea=f;this.F=c.T.sc("AmbientLight");this.F.N(n.AmbientLight);this.F.N(n.pb).F=this.zg;h.ba(this.object,g,this.Vg,!0)}k.prototype.dispose=function(){h.da(this.object,g,this.Vg);
this.F&&(this.F.T.dd(this.F),this.F=null)};k.prototype.Vg=function(){var e=this.F.O(n.AmbientLight);e.color=this.object.get("color");e.intensity=this.object.get("intensity")};return k}()});
define("tdv/player/view/model3d/renderer/adapters/lights/OrbitLightAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e){a=function(){function q(r,t,u,v,w){this.Vg=this.Vg.bind(this);this.object=r;this.model=t;this.wb=u;this.zg=v;this.Ea=w;this.F=this.wb.T.sc("OrbitLight");this.F.N(e.DirectionalLight).target=this.wb;this.F.N(e.pb);r=this.F.N(e.ta);r.mf="YXZ";r.positionZ=
10;this.gK=null;n.ba(this.object,b,this.Vg,!0)}q.prototype.dispose=function(){n.da(this.object,b,this.Vg);this.F&&(this.F.T.dd(this.F),this.F=null);this.gK&&(this.gK.dispose(),this.gK=null)};q.prototype.Vg=function(){var r=this.F.O(e.DirectionalLight);r.castShadow=this.object.get("castShadow");r.color=this.object.get("color");r.VW=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.zg:this.Ea;
this.F.getComponent(e.pb).F!=t&&(this.F.O(e.pb).F=t);t=this.object.get("yaw");var u=-this.object.get("pitch"),v=this.F.getComponent(e.ta);if(v.Yd!=u||v.fd!=t)v=this.F.O(e.ta),v.Yd=u,v.fd=t;r.Lra=this.object.get("shadowBias");r.Nra=this.object.get("shadowRadius");r.Mra=this.object.get("shadowMapSize");r.Zlb=this.object.get("shadowTolerance");this.object.get("rotationDraggable")!=!!this.gK&&(this.object.get("rotationDraggable")?this.gK=new c(this.object,this.model,this.wb):(this.gK.dispose(),this.gK=
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.MP=this.MP.bind(this);this.object=r;this.model=t;this.wb=u;this.M=new k;this.M.bind(g.V,this.ym,this,!0);this.Gw=this.wb.T.sc("OrbitLightTransformControls");this.Gw.N(e.ta).mf="YXZ";this.Gw.N(e.Group);this.Gw.N(e.pb).F=this.wb;this.CA=this.wb.T.sc("OrbitLightTransformControlsInner");this.CA.N(e.ta).mf=
"YXZ";this.CA.N(e.Group);this.CA.N(e.pb).F=this.Gw;r=this.CA.N(e.Hh);r.translate=!1;r.rotate=!0;r.scale=!1;r.M=this.M;n.ba(this.object,d,this.MP,!0);n.ba(this.model,f,this.MP,!0)}q.prototype.dispose=function(){n.da(this.object,d,this.MP);n.da(this.model,f,this.MP);this.Gw&&(this.Gw.T.dd(this.Gw),this.Gw=null);this.CA&&(this.CA.T.dd(this.CA),this.CA=null)};q.prototype.MP=function(){if(this.object.get("mode")=="fixed_to_target"){var r=this.Gw.O(e.ta);r.fd=0;r.Yd=0}else r=this.Gw.O(e.ta),r.fd=-this.model.get("camera").get("yaw"),
r.Yd=this.model.get("camera").get("pitch");r.Xe=0;r=this.CA.O(e.ta);r.fd=this.object.get("yaw");r.Yd=-this.object.get("pitch");r.Xe=0};q.prototype.ym=function(r){l.setFromQuaternion(r.data.quaternion,"YXZ");this.object.set({yaw:l.y*p,pitch:-l.x*p});this.object.o(g.Km)};return q}(),d=["mode","yaw","pitch"],f=["camera.yaw","camera.pitch"],l=new h.Euler,p=180/Math.PI;return a});
define("tdv/player/view/model3d/renderer/adapters/lights/SpotLightAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e){a=function(){function f(l,p,q,r,t){this.Vg=this.Vg.bind(this);this.object=l;this.model=p;this.wb=q;this.zg=r;this.Ea=t;this.F=q.T.sc("SpotLight");this.F.N(e.SpotLight);this.F.N(e.pb).F=this.zg;this.F.N(e.ta).mf="YXZ";this.wr=new k;this.wr.bind(g.V,this.ym,
this,!0);n.ba(this.object,b,this.Vg,!0)}f.prototype.dispose=function(){n.da(this.object,b,this.Vg);this.F.T.dd(this.F);this.F=null};f.prototype.Vg=function(){var l=this.F.O(e.SpotLight);l.color=this.object.get("color");l.intensity=this.object.get("intensity");l.distance=this.object.get("distance");l.VW=this.object.get("displayHelper");l.angle=this.object.get("angle");l.penumbra=this.object.get("penumbra");l.decay=this.object.get("decay");l.castShadow=this.object.get("castShadow");l.Mra=this.object.get("shadowMapSize");
l.Lra=this.object.get("shadowBias");l.Nra=this.object.get("shadowRadius");l=this.object.get("yaw");var p=-this.object.get("pitch"),q=this.F.getComponent(e.ta);if(q.Yd!=p||q.fd!=l||q.positionX!=this.object.get("x")||q.positionY!=this.object.get("y")||q.positionZ!=this.object.get("z"))q=this.F.O(e.ta),q.Yd=p,q.fd=l,q.translationX=this.object.get("x"),q.translationY=this.object.get("y"),q.Ze=this.object.get("z");this.object.get("rotationDraggable")||this.object.get("positionDraggable")?(l=this.F.O(e.Hh,
!0),l.M=this.wr,l.rotate=this.object.get("rotationDraggable"),l.translate=this.object.get("positionDraggable"),l.scale=!1):this.F.ka(e.Hh)};f.prototype.ym=function(l){c.setFromQuaternion(l.data.quaternion,"YXZ");this.object.set({x:l.data.position.x,y:l.data.position.y,z:l.data.position.z,yaw:c.y*d,pitch:-c.x*d});this.object.o(g.Km)};return f}();var b="color intensity distance angle penumbra displayHelper decay castShadow shadowMapSize shadowBias shadowRadius x y z pitch yaw rotationDraggable positionDraggable".split(" "),
c=new h.Euler,d=180/Math.PI;return a});
define("tdv/player/view/model3d/renderer/adapters/lights/LightAdapterFactory","require exports tdv/player/parser/ClassInfo tdv/player/view/model3d/renderer/adapters/lights/AmbientLightAdapter tdv/player/view/model3d/renderer/adapters/lights/OrbitLightAdapter tdv/player/view/model3d/renderer/adapters/lights/SpotLightAdapter".split(" "),function(a,m,h,n,g,k){return function(){function e(){}e.rna=function(b,c,d,f,l){return h.Oa("AmbientLight",b)?new n(b,c,d,f,l):h.Oa("OrbitLight",b)?new g(b,c,d,f,l):
h.Oa("SpotLight",b)?new k(b,c,d,f,l):null};return e}()});
define("tdv/player/view/model3d/renderer/adapters/lights/LightsAdapter","require exports tdv/player/view/util/Device tdv/player/script/OrbitLight tdv/player/view/model3d/renderer/adapters/ArrayAdapter tdv/player/view/model3d/renderer/adapters/lights/LightAdapterFactory".split(" "),function(a,m,h,n,g,k){return function(){function e(b,c,d,f){this.Ona=this.pA=null;this.model=b;this.wb=c;this.zg=d;this.Ea=f;this.N8=new g;this.N8.fe=this.vOa.bind(this);this.N8.Xg=this.wOa.bind(this);this.N8.jB(this.model,
"lights");this.ecb()}e.prototype.dispose=function(){this.N8.dispose();this.Cjb()};e.prototype.vOa=function(b){return k.rna(b,this.model,this.wb,this.zg,this.Ea)};e.prototype.wOa=function(b,c){c.dispose()};e.prototype.ecb=function(){var b,c,d,f;h.kf()&&this.model.get("backgroundPanoramaURL")&&(this.pA=new n,(b=this.pA)===null||b===void 0||b.set("intensity",.001),(c=this.pA)===null||c===void 0||c.set("castShadow",!0),(d=this.pA)===null||d===void 0||d.set("shadowMapWidth",64),(f=this.pA)===null||f===
void 0||f.set("shadowTolerance",4),this.Ona=this.vOa(this.pA))};e.prototype.Cjb=function(){this.pA&&(this.wOa(this.pA,this.Ona),this.Ona=this.pA=null)};return e}()});
define("tdv/player/view/model3d/renderer/adapters/FloorAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/constants/RenderOrder","tdv/player/view/webgl/components"],function(a,m,h,n,g){var k=["floorColor","floorHeight","floorOpacity","floorRadius"];return function(){function e(b,c,d){this.model=b;this.object=c;this.wb=d;this.Vg=this.Vg.bind(this);this.F=d.T.sc("Floor");this.F.N(g.Lr);this.F.N(g.pb).F=this.wb;h.ba(this.object,k,this.Vg,!0)}e.prototype.dispose=function(){h.da(this.object,
k,this.Vg);this.F.T.dd(this.F);this.F=null};e.prototype.Vg=function(){var b=this.object.get("floorColor"),c=this.object.get("floorOpacity"),d=this.object.get("floorHeight"),f=this.object.get("floorRadius");if(b&&c>0){var l=this.F.O(g.Lr,!0);l.color=b;l.opacity=c;l.height=d;l.radius=f;l.renderOrder=this.model==this.object?n.mVa:n.wVa}else this.F.ka(g.Lr)};return e}()});
define("tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory",["require","exports","tdv/player/parser/ClassInfo"],function(a,m,h){return function(){function n(){}n.Wt=function(g,k){n.u6[g]=k};n.pgb=function(g){for(var k in n.u6)if(h.Oa(k,g))return!0;return!1};n.rna=function(g,k,e,b,c){for(var d in n.u6)if(h.Oa(d,g))return new n.u6[d](g,k,e,b,c);return null};n.u6={};return n}()});
define("tdv/player/view/model3d/renderer/adapters/objects/ObjectArrayAdapter",["require","exports","tdv/player/view/model3d/renderer/adapters/ArrayAdapter","tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory"],function(a,m,h,n){return function(){function g(k,e,b,c,d){this.Vjb=k;this.model=e;this.wb=b;this.Fpa=c;this.renderer=d;this.filter=this.filter.bind(this);this.fe=this.fe.bind(this);this.Xg=this.Xg.bind(this);this.OJ=new h;this.OJ.filter=this.filter;this.OJ.fe=this.fe;this.OJ.Xg=
this.Xg;this.OJ.jB(this.model,"objects")}g.prototype.filter=function(k){return n.pgb(k)?!0:!1};g.prototype.fe=function(k){return n.rna(k,this.Vjb,this.wb,this.Fpa,this.renderer)};g.prototype.Xg=function(k,e){e.dispose()};g.prototype.dispose=function(){this.OJ.dispose()};return g}()});
define("tdv/player/view/model3d/renderer/adapters/objects/SpritesEnabledAdapter",["require","exports","tdv/constants/EventName","tdv/player/parser/ClassInfo"],function(a,m,h,n){return function(){function g(k,e){this.mT=k.mT;this.Fa=e;this.fl=[];this.mT.bind(h.L("spritesEnabled"),this.TCa,this,!0);this.Fa.bind(h.L("objects"),this.TH,this,!0);this.za()}g.prototype.dispose=function(){this.mT.h(h.L("spritesEnabled"),this.TCa,this);this.Fa.h(h.L("objects"),this.TH,this);this.fl.forEach(function(k){k.hra(!1)});
this.fl=[]};g.prototype.TCa=function(){this.za()};g.prototype.TH=function(){this.za()};g.prototype.za=function(){var k=[];this.mT.get("spritesEnabled")===!1&&k.push("SpriteModel3DObject");var e=this.Fa.get("objects");this.fl.forEach(function(b){e.indexOf(b)==-1&&b.hra(!1)});this.fl=e;this.fl.forEach(function(b){var c=k.some(function(d){return n.Oa(d,b)});b.hra(c)})};return g}()});
define("tdv/player/view/model3d/renderer/adapters/objects/UserInteractionObjectsVisibleAdapter",["require","exports","tdv/binding/BindingsHandler"],function(a,m,h){var n=["camera","objects","postprocessing"],g=["userInteracting","moving"];return function(){function k(e){this.model=e;this.camera=null;this.qj=[];this.QJ=this.QJ.bind(this);this.d9=this.d9.bind(this);h.ba(this.model,n,this.QJ,!0)}k.prototype.dispose=function(){this.VE([])};k.prototype.QJ=function(){this.setCamera(this.model.get("camera"));
this.VE([].concat(this.model.get("objects"),this.model.get("postprocessing")))};k.prototype.setCamera=function(e){this.camera!==e&&(this.camera&&h.da(this.camera,g,this.d9),(this.camera=e)&&h.ba(this.camera,g,this.d9,!0))};k.prototype.d9=function(){this.sQ()};k.prototype.VE=function(e){this.qj!=e&&(e||(e=[]),this.qj&&this.qj.forEach(function(b){e.indexOf(b)==-1&&(b.aF&&b.aF(!1),b.Gp&&b.Gp(!1))}.bind(this)),this.qj=e,this.sQ())};k.prototype.sQ=function(){if(this.qj&&this.camera){var e=this.camera.get("userInteracting"),
b=this.camera.get("moving");this.qj.forEach(function(c){c.aF&&c.aF(e);c.Gp&&c.Gp(b)}.bind(this))}};return k}()});
define("tdv/player/view/model3d/renderer/adapters/objects/XRObjectsVisibleAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a,m,h,n,g,k){var e=["objects"];return function(){function b(c){this.model=c;this.qj=[];this.QJ=this.QJ.bind(this);g.M.bind(n.V,this.Ta,this,!0);g.M.bind(n.Zd,this.NP,this,!0);h.ba(this.model,e,this.QJ,!0);this.Ta();this.NP()}b.prototype.dispose=function(){g.M.h(n.V,
this.Ta,this);g.M.h(n.Zd,this.NP,this);this.VE([])};b.prototype.QJ=function(){this.VE([].concat(this.model.get("objects")))};b.prototype.VE=function(c){this.qj!=c&&(c||(c=[]),this.qj&&this.qj.forEach(function(d){c.indexOf(d)==-1&&(d.s$&&d.s$(!0),d.dB&&d.dB(!1))}.bind(this)),this.qj=c,this.sQ())};b.prototype.Ta=function(){this.Jkb(g.isPresenting&&g.Cm==g.El.Xp,g.isPresenting&&g.Cm==g.El.Np)};b.prototype.NP=function(){this.t$(g.isPresenting&&g.Cm==g.El.Xp&&g.ud.length===1&&g.ud[0].type===k.WB)};b.prototype.Jkb=
function(c,d){if(this.Va!==c||this.EMa!==d)this.Va=c,this.EMa=d,this.sQ()};b.prototype.t$=function(c){this.FMa!==c&&(this.FMa=c,this.sQ())};b.prototype.sQ=function(){if(this.qj){var c=this.Va===!1,d=this.Va===!0,f=this.EMa===!0,l=this.FMa===!0;this.qj.forEach(function(p){p.s$&&p.s$(c);p.dB&&p.dB(d);p.gRa&&p.gRa(f);p.t$&&p.t$(l)}.bind(this))}};return b}()});
define("tdv/player/view/model3d/renderer/adapters/BaseModelAdapter","require exports tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/FloorAdapter tdv/player/view/model3d/renderer/adapters/objects/ObjectArrayAdapter tdv/player/view/model3d/renderer/adapters/objects/SpritesEnabledAdapter tdv/player/view/model3d/renderer/adapters/objects/UserInteractionObjectsVisibleAdapter tdv/player/view/model3d/renderer/adapters/objects/XRObjectsVisibleAdapter".split(" "),function(a,
m,h,n,g,k,e,b,c){var d=["variant"];return function(){function f(l,p,q,r){this.object=l;this.model=p;this.zg=q;this.renderer=r;this.B9=this.B9.bind(this);this.F=this.zg.T.sc("Model");l=this.F.N(n.Oi);this.fJ=l.fJ=this.zg.T.sc("ModelContent");this.fJ.N(n.pb).F=this.F;l.M=this.object;this.object.get("preload")&&(l.MPa=this.model.T7().gw());l.Ap=this.model.P7().gw();l.Gpa=this.object.get("model");l.properties=this.object;l.eb=this.renderer.P;l=this.F.N(n.wd);l.M=this.object;l.mt=!0;l.Xt=!0;this.F.N(n.pb).F=
this.zg;this.F.N(n.ta);h.ba(this.object,d,this.B9,!0);this.OJ=new k(this.model,this.object,this.F,this.fJ,this.renderer);this.gmb=new e(this.renderer,this.object);this.fob=new b(this.model);this.vob=new c(this.model);this.Feb=new g(this.model,this.object,this.F)}f.prototype.mj=function(){return this.F};f.prototype.dispose=function(){h.da(this.object,d,this.B9);this.F.T.dd(this.fJ);this.F.T.dd(this.F);this.OJ.dispose();this.gmb.dispose();this.fob.dispose();this.vob.dispose();this.Feb.dispose()};f.prototype.B9=
function(){var l=this.object.get("variant");l?this.F.O(n.Bx,!0).name=l:this.F.ka(n.Bx)};return f}()});
define("tdv/player/view/model3d/renderer/adapters/Mixins","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/webgl/components three.mod".split(" "),function(a,m,h,n,g,k,e){var b=["collidable"],c="canvas canvasTimestamp encoding depthTest hidden opacity".split(" "),d=["image"],f=["color","depthTest","opacity","width"],l=["parentId"],p=["maxWorldToPixelScale","minWorldToPixelScale","scale"],q="x y z normalX normalY normalZ upX upY upZ width height attachToParent".split(" "),
r=new e.Matrix4,t=new e.Vector3,u=new e.Vector3,v=new e.Vector3,w=new e.Euler,x=180/Math.PI,y="x y z positionX positionY positionZ rotationX rotationY rotationZ scale translationX translationY translationZ attachToParent".split(" "),z=["clickEnabled","rollOverEnabled","transparentAreaActive","useHandCursor"],A=["castShadow","receiveShadow"],D=["color","depthTest","hidden","opacity"],F=["video"],C=["hidden","enabled","opacity"];return{TK:function(B){return function(H){function E(){return H!==null&&
H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,b,this.oOa||(this.oOa=this.fib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,b,this.oOa);H.prototype.Xc.call(this)};E.prototype.fib=function(){this.object.get("collidable")?this.F.ka(k.TF):this.F.N(k.TF)};return E}(B)},Kf:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.Kf);
h.ba(this.object,c,this.nOa||(this.nOa=this.eib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,c,this.nOa);H.prototype.Xc.call(this)};E.prototype.eib=function(){var G=this.F.O(k.Kf);G.source=this.object.get("canvas");G.vK=this.object.get("canvasTimestamp");G.opacity=this.object.get("opacity");G.isSprite=!1;G.hidden=this.object.get("hidden");G.depthTest=this.object.get("depthTest");G.colorSpace=this.object.get("encoding")=="srgb"?e.SRGBColorSpace:e.LinearSRGBColorSpace};return E}(B)},
Ni:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.Ap=this.model.P7().gw(.1);this.object.get("preload")&&this.model.T7().sO(this.Ap,.1);var G=this.F.N(k.Ni);G.properties=this.object;G.M=this.object;G.isSprite=!1;G.priority=this.object.get("preload")?g.RF:g.Jta;G.Ap=this.Ap;h.ba(this.object,d,this.tOa||(this.tOa=this.JP.bind(this)),!0)};E.prototype.Xc=function(){this.model.P7().XP(this.Ap);this.model.T7().XP(this.Ap);
h.da(this.object,d,this.tOa);H.prototype.Xc.call(this)};E.prototype.JP=function(){this.F.O(k.Ni).uw=this.object.get("image")};return E}(B)},ei:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.ei);h.ba(this.object,f,this.xOa||(this.xOa=this.rib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,f,this.xOa);H.prototype.Xc.call(this)};E.prototype.rib=function(){var G=this.F.O(k.ei);
G.color=this.object.get("color");G.opacity=this.object.get("opacity");G.depthTest=this.object.get("depthTest");G.width=this.object.get("width")};return E}(B)},Plane:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.Plane);this.F.N(k.ta);h.ba(this.object,q,this.NOa||(this.NOa=this.zib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,q,this.NOa);H.prototype.Xc.call(this)};E.prototype.zib=
function(){t.set(0,0,0);v.set(this.object.get("upX",0),this.object.get("upY",1),this.object.get("upZ",0));u.set(this.object.get("normalX",0),this.object.get("normalY",0),this.object.get("normalZ",1)).multiplyScalar(-1);r.lookAt(t,u,v);w.setFromRotationMatrix(r);var G=this.F.O(k.ta);G.bA=this.object.get("attachToParent");G.translationX=this.object.get("x",0);G.translationY=this.object.get("y",0);G.Ze=this.object.get("z",0);G.Le=this.object.get("width",1);G.Ye=this.object.get("height",1);G.Yd=w.x*x;
G.fd=w.y*x;G.Xe=w.z*x;G.positionX=0;G.positionY=0;G.positionZ=0};return E}(B)},pb:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.pb).F=this.wb;h.ba(this.object,l,this.JOa||(this.JOa=this.xib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,l,this.JOa);H.prototype.Xc.call(this)};E.prototype.xib=function(){this.F.O(k.pb).id=this.object.get("parentId")};return E}(B)},NVa:function(B){return function(H){function E(){return H!==
null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,p,this.MOa||(this.MOa=this.yib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,p,this.MOa);H.prototype.Xc.call(this)};E.prototype.yib=function(){var G=this.object.get("maxWorldToPixelScale"),N=this.object.get("minWorldToPixelScale");if(G!==void 0||N!==void 0){var O=this.F.O(k.Tk,!0);O.oE=G;O.pE=N;O.Le=O.Ye=O.Gh=this.object.get("scale")}else(O=this.F)===null||O===void 0||O.ka(k.Tk)};
return E}(B)},rua:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.ta);h.ba(this.object,y,this.OOa||(this.OOa=this.Aib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,y,this.OOa);H.prototype.Xc.call(this)};E.prototype.Aib=function(){var G=this.F.O(k.ta);G.bA=this.object.get("attachToParent");G.positionX=this.object.get("x",this.object.get("positionX",0));G.positionY=this.object.get("y",
this.object.get("positionY",0));G.positionZ=this.object.get("z",this.object.get("positionZ",0));G.mf=this.object.get("rotationOrder","XYZ");G.Yd=this.object.get("rotationX",0);G.fd=this.object.get("rotationY",0);G.Xe=this.object.get("rotationZ",0);G.scale=this.object.get("scale",1);G.translationX=this.object.get("translationX",0);G.translationY=this.object.get("translationY",0);G.Ze=this.object.get("translationZ",0)};return E}(B)},wd:function(B){return function(H){function E(){return H!==null&&H.apply(this,
arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,z,this.POa||(this.POa=this.Fib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,z,this.POa);H.prototype.Xc.call(this)};E.prototype.Fib=function(){var G=this.object.get("clickEnabled"),N=this.object.get("rollOverEnabled");if(G!==!1&&N!==!1)this.F.ka(k.Rr);else{var O=this.F.N(k.Rr);O.psa=G===!1;O.qsa=N===!1}G===!1&&N===!1?this.F.ka(k.wd):(O=this.F.O(k.wd,!0),O.pB=this.object.get("useHandCursor"),
O.fF=this.object.get("transparentAreaActive"),O.M=this.object,O.mt=!!G,O.Xt=!!N)};return E}(B)},kL:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,A,this.ROa||(this.ROa=this.Lib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,A,this.ROa);H.prototype.Xc.call(this)};E.prototype.Lib=function(){var G=this.F.O(k.gi,!0);G.castShadow=this.object.get("castShadow");G.receiveShadow=
this.object.get("receiveShadow")};return E}(B)},xd:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);this.F.N(k.xd);this.visible=!1;h.ba(this.object,D,this.TOa||(this.TOa=this.Mib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,D,this.TOa);this.ig(!1);H.prototype.Xc.call(this)};E.prototype.Mib=function(){var G=this.F.O(k.xd);G.color=this.object.get("color");G.opacity=this.object.get("hidden")?
0:this.object.get("opacity");G.depthTest=this.object.get("depthTest");this.ig(G.opacity>0)};E.prototype.ig=function(G){this.visible!=G&&((this.visible=G)?this.object.o(n.od):this.object.o(n.jd))};return E}(B)},ro:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);var G=this.F.N(k.ro);G.properties=this.object;G.M=this.object;h.ba(this.object,F,this.VOa||(this.VOa=this.UJ.bind(this)),!0)};E.prototype.Xc=
function(){h.da(this.object,F,this.VOa);H.prototype.Xc.call(this)};E.prototype.UJ=function(){this.F.O(k.ro).Msa=this.object.get("video")};return E}(B)},G_:function(B){return function(H){function E(){return H!==null&&H.apply(this,arguments)||this}P(E,H);E.prototype.Wc=function(){H.prototype.Wc.call(this);h.ba(this.object,C,this.WOa||(this.WOa=this.Oib.bind(this)),!0)};E.prototype.Xc=function(){h.da(this.object,C,this.WOa);H.prototype.Xc.call(this)};E.prototype.Oib=function(){var G=this.F.O(k.gi,!0);
G.opacity=this.object.get("enabled")&&!this.object.get("hidden")?this.object.get("opacity"):0;G.M=this.object};return E}(B)}}});
define("tdv/player/view/model3d/renderer/adapters/ModelAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/BaseModelAdapter tdv/player/view/model3d/renderer/adapters/Mixins tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(p){function q(r,t,u,v){r=p.call(this,r,t,u,v)||this;r.RA=r.RA.bind(r);r.wb=r.F;r.wr=new k;r.wr.bind(g.V,r.ym,r,!0);n.ba(r.object,d,r.RA,!0);
r.Wc();return r}P(q,p);q.prototype.Wc=function(){};q.prototype.Xc=function(){};q.prototype.dispose=function(){n.da(this.object,d,this.RA);this.wr.h(g.V,this.ym,this);this.wr=null;this.Xc();p.prototype.dispose.call(this)};q.prototype.ym=function(r){var t=this.model.get("model");t.set("translationX",r.data.position.x);t.set("translationY",r.data.position.y);t.set("translationZ",r.data.position.z);f.setFromQuaternion(r.data.quaternion,t.get("rotationOrder"));t.set("rotationX",f.x*l);t.set("rotationY",
f.y*l);t.set("rotationZ",f.z*l);r.data.scale>.001&&t.set("scale",r.data.scale);this.object.o(g.Km)};q.prototype.RA=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.fJ.O(c.Hh,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.M=this.wr}else this.fJ.ka(c.Hh)};return q}(e);var d=["positionDraggable","rotationDraggable",
"scaleDraggable"],f=new h.Euler,l=180/Math.PI;return b.kL(a)});
define("tdv/view/util/MeasureText",["require","exports","tdv/view/util/Font"],function(a,m,h){function n(e,b,c){c===void 0&&(c=null);k.style.fontFamily=h.qA(b.fontFamily);k.style.font=h.W7(b);k.innerHTML=e;document.body.appendChild(k);var d=new g(Math.ceil(k.clientWidth),Math.ceil(k.clientHeight));document.body.removeChild(k);c&&(c.font=h.W7(b),e=c.measureText(e).width,e>0&&(d.height*=e/d.width,d.width=e));return d}var g=function(){return function(e,b){this.width=e;this.height=b}}(),k=document.createElement("div");
k.style.display="inline-block";k.style.margin="0";k.style.padding="0";k.style.whiteSpace="nowrap";n.lca=function(){return function(){this.fontFamily="Arial";this.fontSize="12px";this.fontWeight="400";this.fontStyle="normal"}}();return n});
define("tdv/player/canvas/MenuCanvas",["require","exports","tdv/view/util/MeasureText","tdv/view/util/Font"],function(a,m,h,n){var g=function(){function e(b,c,d){this.nh=b;this.item=c;this.label=c.get("label");this.fontFamily=this.nh.get("fontFamily","Arial");this.fontSize=Math.round(12*d)+"px";this.backgroundColor=this.nh.get("backgroundColor","#000000");this.sQa=this.nh.get("rollOverBackgroundColor",this.backgroundColor);this.bkb=this.nh.get("selectedBackgroundColor",this.sQa);this.yt=this.nh.get("fontColor",
"#000000");this.tQa=this.nh.get("rollOverFontColor",this.yt);this.ckb=this.nh.get("selectedFontColor",this.tQa);this.DSa=this.CSa=this.ju=this.mu=this.height=this.width=this.left=this.top=0;this.status=!1;this.Yoa=!0}e.prototype.Ynb=function(){var b=new h.lca;b.fontFamily=this.fontFamily;b.fontSize=this.fontSize;b=h(this.label,b);this.mu=b.width;this.ju=b.height};e.prototype.Alb=function(b){this.status!==b&&(this.status=b,this.Yoa=!0)};e.prototype.qeb=function(b){if(this.Yoa){this.Yoa=!1;switch(this.status){case "over":var c=
this.sQa;var d=this.tQa;break;case "selected":c=this.bkb;d=this.ckb;break;default:c=this.backgroundColor,d=this.yt}b.clearRect(this.left,this.top,this.width,this.height);b.fillStyle=c;b.fillRect(this.left,this.top,this.width,this.height);b.fillStyle=d;b.font=this.fontSize+" "+n.qA(this.fontFamily);b.textBaseline="middle";b.textAlign="center";b.fillText(this.label,Math.round(this.CSa),Math.round(this.DSa));return!0}return!1};return e}(),k=180/Math.PI;return function(){function e(b,c){this.nh=b;this.items=
c.map(this.xdb.bind(this));this.xP=this.yP=this.Rj=this.Sj=0;this.Kk();this.canvas=document.createElement("canvas");this.canvas.width=this.Sj;this.canvas.height=this.Rj;this.context=this.canvas.getContext("2d");this.selectedIndex=this.Hw=-1}e.prototype.xdb=function(b){return new g(this.nh,b,3)};e.prototype.dgb=function(b){return this.Sj/3*b/300};e.prototype.ofb=function(b){return this.Rj/3*b/300};e.prototype.jf=function(){return 2*Math.atan2(this.Sj/3*.5,300)*k};e.prototype.fg=function(){return this.Sj};
e.prototype.wg=function(){return this.Rj};e.prototype.If=function(){return this.canvas};e.prototype.Kk=function(){var b=0,c=0;this.items.forEach(function(p){p.Ynb();b=Math.max(p.mu,b);c=Math.max(p.ju,c)}.bind(this));this.yP=b+30;this.xP=c+30;var d=0,f=0,l=0;this.YX=20;this.items.length>20&&(this.YX=Math.ceil(this.items.length/Math.ceil(this.items.length/20)));this.items.forEach(function(p){l>=this.YX&&(l=0,f+=this.yP,d=0);p.left=f;p.top=d;p.CSa=f+this.yP*.5;p.DSa=d+this.xP*.5;p.width=this.yP;p.height=
this.xP;l+=1;d+=this.xP}.bind(this));this.Sj=Math.ceil(this.items.length/this.YX)*this.yP;this.Rj=Math.min(this.YX,this.items.length)*this.xP};e.prototype.update=function(){for(var b=!1,c=0;c<this.items.length;c++)this.items[c].Alb(this.Hw==c?"over":this.selectedIndex==c?"selected":"normal"),b=this.items[c].qeb(this.context)||b;return b};e.prototype.uoa=function(b,c){var d=-1;b>=0&&b<this.Sj&&c>=0&&c<this.Rj&&(d=Math.floor(b/this.yP)*this.YX+Math.floor(c/this.xP),d>=this.items.length&&(d=-1));return d};
e.prototype.WE=function(b){this.Hw=b};e.prototype.Yw=function(b){this.selectedIndex=b};e.prototype.clear=function(){this.items=this.canvas=this.context=this.nh=null};return e}()});
define("tdv/player/view/model3d/renderer/adapters/MenuAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/canvas/MenuCanvas tdv/events/EventDispatcher tdv/player/view/util/XR tdv/player/view/webgl/components tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p){function q(A){return c.isPresenting?-v.setFromQuaternion(c.xl,"YXZ").y*y:A.get("camera").get("yaw")}function r(A){return c.isPresenting?
v.setFromQuaternion(c.xl,"YXZ").x*y:A.get("camera").get("pitch")}a=function(){function A(D,F,C){this.model=D;this.wb=F;this.Ea=C;this.F9=this.F9.bind(this);this.Qn=[];this.EP=[];this.ir=!1;c.M.bind(g.V,this.Ta,this,!0);n.ba(this.model,["xrMenu"],this.F9,!0)}A.prototype.dispose=function(){n.da(this.model,["xrMenu"],this.F9);c.M.h(g.V,this.Ta,this);this.ya()};A.prototype.Ta=function(){this.oTa()};A.prototype.F9=function(){this.oTa()};A.prototype.oTa=function(){var D=c.isPresenting?this.model.get("xrMenu"):
null;D!=this.nh&&(this.nh&&this.ya(),(this.nh=D)&&this.Wa())};A.prototype.Wa=function(){this.aw=this.Ea.T.sc("CameraOffsetGroup");this.aw.N(d.Group);this.aw.N(d.ta).easing=0;var D=this.aw.N(d.RK);D.Ea=this.Ea;D.rotate=!1;this.aw.N(d.pb).F=this.wb;this.Cw=new t(this.model,this.nh,this.aw);this.Cw.bind(g.ma,this.sib,this,!0);this.Cw.bind(g.Eb,this.tib,this,!0);this.Cw.bind(g.uc,this.uib,this,!0)};A.prototype.sib=function(){this.gSa();this.ZHa(this.nh,0);this.Cw.ig(!1)};A.prototype.ZHa=function(D,F){for(;this.Qn.length>
F;)this.Dna(this.Qn.pop());this.Qn.push(this.ydb(D))};A.prototype.pJa=function(){var D;for((D=this.Cw)===null||D===void 0||D.ig(!0);this.Qn.length;)this.Dna(this.Qn.pop())};A.prototype.ydb=function(D){D=new u(this.model,this.nh,D,this.aw,this.Qn.length>0?this.Qn[this.Qn.length-1]:this.Cw);if(this.Qn.length>0){var F=this.Qn[this.Qn.length-1];var C=F.Ic();F=F.Jc()+F.jf()/2+1+D.jf()/2;D.setPosition(F,C)}else F=q(this.model),C=r(this.model);D.setPosition(F,C);D.Cpa.get("children",[]).forEach(function(B){B.bind(g.ma,
this.BOa,this,!0)},this);D.bind(g.uc,this.AOa,this,!0);D.bind(g.Eb,this.zOa,this,!0);return D};A.prototype.Dna=function(D){D.Cpa.get("children",[]).forEach(function(F){F.h(g.ma,this.BOa,this)},this);D.h(g.uc,this.AOa,this);D.h(g.Eb,this.zOa,this);this.Gqa(D);D.dispose()};A.prototype.BOa=function(D){D=D.source;if(D.get("children",[]).length){var F=this.Ceb(D);this.ZHa(D,F+1)}else this.pJa()};A.prototype.AOa=function(D){this.Vbb(D.source)};A.prototype.zOa=function(D){this.Gqa(D.source)};A.prototype.uib=
function(){this.tQ()};A.prototype.tib=function(){this.tQ()};A.prototype.Vbb=function(D){this.Gqa(D);this.EP.push(D);this.EP.length>0&&this.rmb();this.tQ()};A.prototype.Gqa=function(D){this.EP=this.EP.filter(function(F){return F!=D});this.EP.length==0&&this.gSa();this.tQ()};A.prototype.tQ=function(){this.jRa(this.EP.length>0||this.Cw.ir())};A.prototype.jRa=function(D){this.ir!==D&&((this.ir=D)?(this.model.get("camera").SQa(!0),this.model.get("camera").qRa(!0),this.x$&&(clearTimeout(this.x$),this.x$=
0)):this.x$=setTimeout(function(){this.x$=0;this.model.get("camera").SQa(!1);this.model.get("camera").qRa(!1)}.bind(this),100))};A.prototype.gSa=function(){this.W6||(this.W6=setTimeout(this.pJa.bind(this),3E3))};A.prototype.rmb=function(){this.W6&&(clearTimeout(this.W6),this.W6=0)};A.prototype.Ceb=function(D){return this.Qn.findIndex(function(F){return F.Cpa.get("children",[]).indexOf(D)>=0?!0:!1})};A.prototype.ya=function(){this.aw&&(this.aw.T.dd(this.aw),this.aw=null);this.Cw&&(this.Cw.dispose(),
this.Cw=null);for(;this.Qn.length;)this.Dna(this.Qn.pop());this.jRa(!1)};return A}();b=function(A){function D(F,C,B,H,E){var G=A.call(this)||this;G.model=F;G.nh=C;G.S8=B;G.zg=H;G.Dw=new e(G.nh,G.S8);G.Xa=0;G.pitch=0;G.yf=new f("linear",[new l("coef",0,1)],150);G.Hw=-1;G.selectedIndex=-1;G.We=!1;E?(G.sZ=E===null||E===void 0?void 0:E.Jc(),G.Rra=E===null||E===void 0?void 0:E.Ic()):(G.sZ=q(G.model),G.Rra=r(G.model));G.F=G.zg.T.sc("MenuItems");G.F.N(d.Plane).renderOrder=k.nVa;G.F.N(d.pb).F=G.zg;G.F.N(d.ta).mf=
"YXZ";F=G.F.N(d.Kf);F.source=G.Dw.If();F.isSprite=!1;F.hidden=!1;F.depthTest=!1;G.F.N(d.TF);F=G.F.N(d.wd);F.pB=!0;F.fF=!1;F.M=G;F.mt=!0;F.Xt=!0;G.kNa=Date.now();G.bind(g.gb,G.Vj,G,!0);G.bind(g.uc,G.yE,G,!0);G.bind(g.Eb,G.Tn,G,!0);G.bind(g.ma,G.jY,G,!0);c.M.bind(g.SZ,G.xE,G,!0);p.requestFrame(G.Bp,G);G.Lp();G.FK();G.xE();return G}P(D,A);D.prototype.dispose=function(){this.h(g.gb,this.Vj,this);this.h(g.uc,this.yE,this);this.h(g.Eb,this.Tn,this);this.h(g.ma,this.jY,this);c.M.h(g.SZ,this.xE,this);p.$Ia(this.Bp,
this);this.F.T.dd(this.F)};D.prototype.Jc=function(){return this.Xa};D.prototype.Ic=function(){return this.pitch};D.prototype.jf=function(){return this.Dw.jf()};D.prototype.MLa=function(){return this.selectedIndex};D.prototype.ir=function(){return this.We};D.prototype.setPosition=function(F,C){this.Xa=F;this.pitch=C;this.HK()};D.prototype.Vj=function(F){this.WE(this.fLa(F))};D.prototype.yE=function(){this.We=!0;this.FK()};D.prototype.Tn=function(){this.We=!1;this.WE(-1);this.FK()};D.prototype.jY=
function(F){F=this.fLa(F);this.Yw(F);this.S8[F].o(g.ma)};D.prototype.fLa=function(F){var C=(F.data.localPosition.x+.5)*this.Dw.fg();F=(.5-F.data.localPosition.y)*this.Dw.wg();return this.Dw.uoa(C,F)};D.prototype.Bp=function(){c.isPresenting||this.xE();p.requestFrame(this.Bp,this)};D.prototype.xE=function(){if(this.yf){var F=Date.now();this.yf.Nb(F-this.kNa);this.kNa=F;this.yf.Ve()&&(this.yf=null);this.FK()}this.HK()};D.prototype.setScale=function(F){this.F.getComponent(d.ta).scale!=F&&(this.F.O(d.ta).scale=
F)};D.prototype.Zn=function(F){this.F.getComponent(d.Kf).opacity!=F&&(this.F.O(d.Kf).opacity=F)};D.prototype.WE=function(F){this.Hw!=F&&(this.Hw>=0&&this.S8[this.Hw].o(g.Eb),this.Hw=F,this.Hw>=0&&this.S8[this.Hw].o(g.uc),this.Lp())};D.prototype.Yw=function(F){this.selectedIndex!=F&&(this.selectedIndex=F,this.Lp())};D.prototype.Lp=function(){this.Dw.Yw(this.selectedIndex);this.Dw.WE(this.Hw);this.Dw.update()&&(this.F.O(d.Kf).vK=Date.now())};D.prototype.HK=function(){var F=this.nh.get("distance")/this.model.get("worldUnitToMeters",
1),C=this.F.O(d.ta);w.identity();w.multiply(x.makeRotationFromQuaternion(c.ug,"YXZ"));w.multiply(x.makeRotationFromQuaternion(c.xl,"YXZ").invert());var B=this.Xa,H=this.pitch;if(this.yf){var E=this.yf.ob("coef");for(B-=this.sZ;B>180;)B-=360;for(;B<-180;)B+=360;H-=this.Rra;B=this.sZ+B*E;H=this.Rra+H*E}w.multiply(x.makeRotationFromEuler(v.set(H*z,-B*z,0,"YXZ"),"YXZ"));v.setFromRotationMatrix(w,C.mf);C.Yd=v.x*y;C.fd=v.y*y;C.Xe=v.z*y;C.positionZ=-F;C.Le=this.Dw.dgb(F);C.Ye=this.Dw.ofb(F)};D.prototype.FK=
function(){};return D}(b);var t=function(A){function D(F,C,B){F=A.call(this,F,C,[C],B,null)||this;F.visible=!0;F.F.N(d.ta).easing=.01;F.IP=F.IP.bind(F);n.ba(F.model,["camera.pitch","camera.yaw"],F.IP,!0);return F}P(D,A);D.prototype.dispose=function(){A.prototype.dispose.call(this);n.da(this.model,["camera.pitch","camera.yaw"],this.IP)};D.prototype.ig=function(F){this.visible!==F&&(this.visible=F,this.visible||(this.WE(-1),this.Yw(-1)),F=!this.visible,this.F.getComponent(d.Kf).hidden!==F&&(this.F.O(d.Kf).hidden=
F,this.IP()))};D.prototype.IP=function(){this.visible&&(this.setPosition(q(this.model),this.QLa()),this.FK())};D.prototype.xE=function(){this.IP();A.prototype.xE.call(this)};D.prototype.FK=function(){var F=this.nh.get("opacity",.5),C=this.nh.get("rollOverOpacity",F);F=this.We?C:F;var B=.66,H=this.model.get("camera"),E=r(this.model);H=Math.abs(E-this.QLa())/(H.get("fov")*.5);H<1&&(B+=(1-H)*(1-B),F+=(1-H)*(C-F));F*=this.yf?this.yf.ob("coef"):1;this.Zn(Math.min(1,Math.max(0,F)));this.setScale(B);this.Lp()};
D.prototype.QLa=function(){var F=r(this.model);return Math.min(90,Math.max(-90,40-F))};return D}(b),u=function(A){function D(F,C,B,H,E){F=A.call(this,F,C,B.get("children",[]),H,E)||this;F.Cpa=B;return F}P(D,A);D.prototype.FK=function(){var F=this.nh.get("opacity",.5),C=this.nh.get("rollOverOpacity",F);F=this.We?C:F;F*=this.yf?this.yf.ob("coef"):1;this.Zn(Math.min(1,Math.max(0,F)))};return D}(b),v=new h.Euler,w=new h.Matrix4,x=new h.Matrix4,y=180/Math.PI,z=Math.PI/180;return a});
define("tdv/player/view/model3d/renderer/adapters/ToolTipAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/constants/EventName"],function(a,m,h,n){return function(){function g(k,e){this.renderer=k;this.model=e;this.eb=this.renderer.P;this.s9=this.s9.bind(this);this.qj=[];this.mB="";this.Ew=null;this.Wa()}g.prototype.dispose=function(){this.ya()};g.prototype.Wa=function(){h.ba(this.model,"objects",this.s9,!0);this.model.bind(n.uc,this.DOa,this,!0);this.model.bind(n.Eb,this.COa,this,
!0)};g.prototype.ya=function(){this.model.h(n.uc,this.DOa,this);this.model.h(n.Eb,this.COa,this);h.da(this.model,"objects",this.s9);this.VE([]);this.Ew&&this.Tn(this.Ew)};g.prototype.s9=function(){this.VE(this.model.get("objects"))};g.prototype.VE=function(k){this.qj!=k&&(this.qj.forEach(function(e){e.h(n.uc,this.IOa,this);e.h(n.Eb,this.HOa,this);e.h(n.jd,this.GOa,this)}.bind(this)),this.Ew&&this.qj.indexOf(this.Ew)>=0&&k.indexOf(this.Ew)<0&&this.Tn(this.Ew),this.qj=k,this.qj.forEach(function(e){e.bind(n.uc,
this.IOa,this,!0);e.bind(n.Eb,this.HOa,this,!0);e.bind(n.jd,this.GOa,this,!0)}.bind(this)))};g.prototype.IOa=function(k){k=k.source;this.yE(k,k.get("toolTip"))};g.prototype.HOa=function(k){this.Tn(k.source)};g.prototype.GOa=function(k){this.Tn(k.source)};g.prototype.DOa=function(){this.yE(this.model,this.model.get("toolTip"))};g.prototype.COa=function(){this.Tn(this.model)};g.prototype.Tn=function(k){this.Ew==k&&(this.Ew=null,this.ERa(""))};g.prototype.yE=function(k,e){this.Ew!=k&&(this.Ew=k,this.ERa(e||
""))};g.prototype.ERa=function(k){this.mB!=k&&(this.mB=k,this.eb.set("toolTip",this.mB))};return g}()});
define("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas",["require"],function(){function a(m){this.Ne=this.ev(m.get("surfaceReticleColor"));this.Dz=this.ev(m.get("surfaceReticleSelectionColor"));this.Of=m.get("surfaceReticleOpacity");this.z7a=m.get("surfaceReticleSelectionOpacity");this.Pm=this.Ih=128;this.Y5a=.456;this.Z5a=.088;this.i3a=.18;this.ja=document.createElement("canvas");this.ja.width=this.Ih;this.ja.height=this.Pm;this.ga=this.ja.getContext("2d");this.ga.fillStyle=
"red";this.ga.imageSmoothingEnabled=!0;this.ga.fillRect(0,0,this.Ih,this.Pm);this.Cd=this.ey=!1;this.FM=this.P3=void 0;this.nG=0}a.prototype.Gfa=function(){return this.fm(this.Dz[0]*NaN+NaN*this.Ne[0],this.Dz[1]*NaN+NaN*this.Ne[1])};a.prototype.ev=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.fm=function(m,h){return"rgba("+m.join(",")+", "+h+")"};a.prototype.setPosition=function(m){this.Sb!=m&&(this.Sb=
m,this.Rd=!0)};a.prototype.fg=function(){return this.Ih};a.prototype.wg=function(){return this.Pm};a.prototype.If=function(){return this.ja};a.prototype.update=function(){if(!this.Rd)return!1;this.Rd=!1;this.ga.clearRect(0,0,this.Ih,this.Pm);var m=[this.Dz[0]*this.Sb+(1-this.Sb)*this.Ne[0],this.Dz[1]*this.Sb+(1-this.Sb)*this.Ne[1],this.Dz[2]*this.Sb+(1-this.Sb)*this.Ne[2]],h=this.z7a*this.Sb+(1-this.Sb)*this.Of;this.ga.strokeStyle=this.fm(m,h);this.ga.fillStyle=this.fm(m,h*this.Sb);this.ga.beginPath();
this.ga.lineWidth=this.Ih*this.Z5a;this.ga.arc(.5*this.Ih,.5*this.Ih,this.Ih*this.Y5a,0,2*Math.PI,!1);this.ga.stroke();this.ga.beginPath();this.ga.arc(.5*this.Ih,.5*this.Ih,this.Ih*this.i3a,0,2*Math.PI,!1);this.ga.fill();return!0};return a});define("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas",["require","tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas"],function(a){return a("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas")});
define("tdv/player/view/model3d/renderer/adapters/SurfaceSelectorPointerAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/constants/RenderOrder tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas tdv/player/view/util/Device tdv/player/view/util/XR tdv/player/view/webgl/components".split(" "),function(a){function m(p,q,r){this.Fa=p;this.Ub=q;this.j=r;this.P=this.j.P;this.cz=this.cz.bind(this);this.lz=this.lz.bind(this);this.Cd=void 0;
this.Fa.bind(n.L("surfaceSelectionEnabled"),this.afa,this,!0);this.afa()}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/RenderOrder"),e=a("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas"),b=a("tdv/player/view/util/Device"),c=a("tdv/player/view/util/XR"),d=a("tdv/player/view/webgl/components");m.prototype.afa=function(){var p=this.Fa.get("surfaceSelectionEnabled");!!this.B!=p&&(p?this.QG():this.fs())};
m.prototype.QG=function(){if(!this.B){this.B=this.Ub.T.sc("PointerReticle");this.B.N(d.Plane).renderOrder=k.aWa;this.B.N(d.Dl).F=this.Ub;this.B.N(d.Rr);this.B.N(d.TF);this.B.N(d.pb).F=this.Ub;var p=this.B.N(d.Qp);p.M=new g;p.M.bind(n.V,this.BT,this,!0);h.ba(this.Fa,f,this.cz,!0);this.Ov=new e(this.P);this.Ov.setPosition(0);this.Ov.update();p=this.B.N(d.Kf);p.source=this.Ov.If();p.depthTest=!1;h.ba(this.Fa,l,this.lz,!0);c.M.bind(n.V,this.fDa,this,!0);this.Ee=null;this.tI(!1)}};m.prototype.fs=function(){this.B&&
(this.Ee&&(this.Ee.o(n.Eb),this.Ee=null),h.da(this.Fa,l,this.lz),this.gV(null),this.B.getComponent(d.Qp).M.h(n.V,this.BT,this,!0),this.Ub.T.dd(this.B),this.Ov=this.B=null,c.M.h(n.V,this.fDa,this),h.da(this.Fa,f,this.cz))};m.prototype.cz=function(){var p=this.B.O(d.Tk,!0);p.Le=p.Ye=2;p.scale=this.Fa.get("surfaceReticleRadius");p.oE=this.Fa.get("surfaceReticleMaxRadius");p.pE=this.Fa.get("surfaceReticleMinRadius")};m.prototype.BT=function(p){p=this.Lya(p.data.beacons);var q=this.tya(p);q==0&&(p=null);
this.K7a(p);this.a8a(q)};m.prototype.lz=function(){this.gV(this.Fa&&this.Fa.get("pointer"))};m.prototype.gV=function(p){this.we!==p&&(this.we&&(this.we.h(n.ma,this.ez,this,!0),this.we.h(n.gb,this.rg,this,!0),this.we.h(n.Eb,this.Es,this,!0)),this.we=p)&&(this.we.bind(n.ma,this.ez,this,!0),this.we.bind(n.gb,this.rg,this,!0),this.we.bind(n.Eb,this.Es,this,!0))};m.prototype.ez=function(p){var q=null;if(b.ub()&&!c.isPresenting){var r=this.B.getComponent(d.Qp);r&&r.jX&&p.data.position&&(p=r.jX((new THREE.Vector3).copy(p.data.position)),
p=this.Lya(p),this.tya(p)!=0&&(q=this.Dfa(p)))}else q=this.Ee;q&&q.o(n.ma)};m.prototype.rg=function(p){this.tI(p.data.type=="other"?!1:!0)};m.prototype.Es=function(){this.tI(!1)};m.prototype.tI=function(p){this.Cd!==p&&(this.Cd=p,this.xi())};m.prototype.fDa=function(){this.xi()};m.prototype.xi=function(){this.B.O(d.Kf).opacity=b.ub()&&!c.isPresenting||!this.Cd?0:1};m.prototype.K7a=function(p){p=this.Dfa(p);this.Ee!=p&&(this.Ee&&this.Ee.o(n.Eb),(this.Ee=p)&&this.Ee.o(n.uc))};m.prototype.Lya=function(p){if(!p)return null;
for(var q=0;q<p.length;q++)if(this.Dfa(p[q]))return p[q];return null};m.prototype.tya=function(p){if(!p)return 0;var q=this.B.getComponent(d.ta);return q?Math.max(0,1-p.distance/(this.Fa.get("surfaceSelectionCoef")*q.scale*q.Le)):0};m.prototype.Dfa=function(p){return(p=(p=p&&p.entity)&&p.getComponent(d.MQ))&&p.xmb||null};m.prototype.a8a=function(p){this.Ov.setPosition(p);this.Ov.update()&&(this.B.O(d.Kf).vK=(new Date).getTime())};m.prototype.dispose=function(){this.fs();this.Fa.h(n.L("surfaceSelectionEnabled"),
this.afa,this,!0)};var f=["surfaceReticleRadius","surfaceReticleMaxRadius","surfaceReticleMinRadius"],l=["pointer"];return m});
define("tdv/player/view/model3d/renderer/adapters/objects/NearestObjectsVisibleAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k){var e=["maxNearestObjectsVisible"];return function(){function b(c,d,f){this.Fa=c;this.Ub=d;this.Ada=f;this.ha=!1;this.s3=this.s3.bind(this);h.ba(this.Fa,e,this.s3,!0)}b.prototype.s3=function(){var c=!!this.Fa.get("maxNearestObjectsVisible");this.ha!=
c&&(this.ha&&this.fs(),(this.ha=c)&&this.QG())};b.prototype.QG=function(){var c=this.Ada.N(k.Qp);c.M=new g;c.M.bind(n.V,this.BT,this,!0);this.Ub.T.Qa()};b.prototype.fs=function(){this.Ada.getComponent(k.Qp).M.h(n.V,this.BT,this);this.Ada.ka(k.Qp);this.Fa.get("objects").forEach(function(c){c.get("hideBasedOnDistance")&&c.ira(!1)})};b.prototype.BT=function(c){var d=this,f=0,l=this.Fa.get("maxNearestObjectsVisible");c.data.beacons.forEach(function(p){if(p=d.g1a(p))p.get("hideBasedOnDistance")?(p.ira(f>=
l),f++):p.ira(!1)})};b.prototype.g1a=function(c){c=(c=c.entity.getComponent(k.MQ))&&c.object;c.get&&c.get("hideBasedOnDistance")!==void 0||(c=null);return c};b.prototype.dispose=function(){h.da(this.Fa,e,this.s3);this.ha&&(this.ha=!1,this.fs())};return b}()});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/webgl/components");a=m.extend(g,function(b,c){g.call(this);this.ce=b;this.Ub=c;this.sg=this.sg.bind(this);this.B=null;this.km=
0;this.Ld=!1;this.DU=[];this.ce.bind(n.L("areaOpacity"),this.jCa,this);this.Vz()});a.prototype.z$=function(b){this.DU.forEach(function(c){c.h(n.od,this.ye,this,!0);c.h(n.jd,this.ye,this,!0)}.bind(this));this.DU=b;this.DU.forEach(function(c){c.bind(n.od,this.ye,this,!0);c.bind(n.jd,this.ye,this,!0)}.bind(this));this.yGa();this.ye()};a.prototype.dispose=function(){this.ce.h(n.L("areaOpacity"),this.jCa,this);this.Oz()};a.prototype.mj=function(){return this.B};a.prototype.isVisible=function(){return this.Ld};
a.prototype.jCa=function(){this.Vz();this.xi()};a.prototype.Vz=function(){this.ce.get("areaOpacity")>0?this.zD():this.Oz()};a.prototype.zD=function(){if(!this.B){this.B=this.Ub.T.sc("MeasureArea");var b=new g;b.bind(n.V,this.WC,this,!0);this.B.N(k.lo).M=b;this.B.N(k.xd);this.B.N(k.pb).F=this.Ub;h.ba(this.ce,e,this.sg,!0);this.yGa()}};a.prototype.Oz=function(){this.B&&(this.B.getComponent(k.lo).M.h(n.V,this.WC,this,!0),h.da(this.ce,e,this.sg),this.B.T.dd(this.B),this.B=null)};a.prototype.Gv=function(b){this.Ld!=
b&&((this.Ld=b)?(this.Iq(1),this.o(n.od)):(this.Iq(0),this.o(n.jd)))};a.prototype.ye=function(){this.Gv(this.DU.every(function(b){return b.isVisible()}))};a.prototype.WC=function(b){this.ce.set("area",b.data.area)};a.prototype.sg=function(){if(this.B){var b=this.B.O(k.xd);b.color=this.ce.get("areaColor");b.depthTest=this.ce.get("depthTest");b.doubleSided=!0;this.xi()}};a.prototype.Iq=function(b){this.km!=b&&(this.km=b,this.xi())};a.prototype.xi=function(){this.B&&(this.B.O(k.xd).opacity=this.ce.get("areaOpacity")*
Math.max(1E-4,this.km))};a.prototype.yGa=function(){this.B&&(this.B.O(k.lo).v=this.DU.map(function(b){return b.mj()}))};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.qfa=this.ev("#ffffff");this.dC=this.ev("#000000");this.Pm=this.Ih=0;this.ja=document.createElement("canvas");this.ga=this.ja.getContext("2d");this.ga.imageSmoothingQuality="high";this.Mv=new h.lca;this.rfa=this.lM=void 0;this.Vca=this.Wca=.5;this.ht=void 0;this.YN=m.Rba;this.Tz=void 0;this.gQ(0)}var h=a("tdv/view/util/MeasureText"),
n=a("tdv/view/util/Font");m.yta="imperial area";m.zta="imperial length";m.Gta="metric area";m.Rba="metric length";m.prototype.dispose=function(){this.ja.width=this.ja.height=0;this.ja=null};m.prototype.ykb=function(g){this.qfa!=g&&(this.qfa=g,this.Rd=!0)};m.prototype.gkb=function(g){this.dC!=g&&(this.dC=g,this.Rd=!0)};m.prototype.zkb=function(g){this.rfa!=g&&(this.rfa=g,this.Rd=!0)};m.prototype.Akb=function(g){this.lM!=g&&(this.lM=g,this.Rd=!0)};m.prototype.Wqa=function(){this.Mv.uO!=.5&&(this.Vca=
.5,this.Rd=!0)};m.prototype.Xqa=function(g){this.Mv.vO!=g&&(this.Wca=g,this.Rd=!0)};m.prototype.gQ=function(g){this.ht!=g&&(this.ht=g,this.Sla())};m.prototype.Elb=function(g){this.YN!=g&&(this.YN=g,this.Sla())};m.prototype.Flb=function(g){this.Tz!=g&&(this.Tz=g,this.Sla())};m.prototype.Sla=function(){if(this.Tz===void 0)this.Za=this.ht.toFixed(2);else if(this.YN==m.Rba){var g=this.ht*this.Tz;this.Za=g>=1?g.toFixed(2)+"m":(g*100).toFixed(2)+"cm"}else this.YN==m.Gta?(g=this.ht*this.Tz*this.Tz,this.Za=
g>=.1?g.toFixed(2)+"m\u00b2":(g*1E4).toFixed(2)+"cm\u00b2"):this.YN==m.zta?(g=this.ht*this.Tz*1.0936,this.Za=g>1760?(g/1760).toFixed(2)+"mi":g>=100?g.toFixed(2)+"yd":g*3>=1?(g*3).toFixed(2)+"ft":(g*3*12).toFixed(2)+"in"):this.YN==m.yta&&(g=this.ht*this.Tz*this.Tz*10.76364864,this.Za=g>=1?g.toFixed(2)+"ft\u00b2":(g*144).toFixed(2)+"in\u00b2");this.Rd=!0};m.prototype.ev=function(g){g=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(g);return[parseInt(g[1],16),parseInt(g[2],16),parseInt(g[3],16)]};m.prototype.fm=
function(g,k){return"rgba("+g.join(",")+", "+k+")"};m.prototype.fg=function(){return this.Ih};m.prototype.wg=function(){return this.Pm};m.prototype.If=function(){return this.ja};m.prototype.update=function(){if(!this.Rd)return!1;this.Rd=!1;this.Mv.fontFamily=this.rfa||"Arial";this.Mv.fontSize=this.lM?typeof this.lM=="string"?this.lM:this.lM+"px":"30px";var g=h(this.Za,this.Mv),k=this.ev(this.qfa),e=this.ev(this.dC),b=g.width;g=g.height;var c=.5*g,d=.3*g,f=c+b+.5*g,l=d+g+.2*g,p=.5*l;this.ja.width=
this.ja.height=this.Ih=this.Pm=Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(f,l))/Math.LN2)));var q=this.Ih*this.Vca-f*this.Vca,r=this.Pm*this.Wca-l*this.Wca;this.NL();this.ga.save();this.ga.translate(q,r);this.ga.fillStyle=this.fm(e,1);this.ga.beginPath();this.ga.moveTo(0,p);this.ga.quadraticCurveTo(0,0,p,0);this.ga.lineTo(f-p,0);this.ga.quadraticCurveTo(f,0,f,p);this.ga.quadraticCurveTo(f,l,f-p,l);this.ga.lineTo(p,l);this.ga.quadraticCurveTo(0,l,0,l-p);this.ga.closePath();this.ga.fill();
this.ga.fillStyle=this.fm(k,1);this.ga.font=this.Mv.fontSize+" '"+this.Mv.fontFamily+"'";this.ga.font=this.Mv.fontSize+(isNaN(this.Mv.fontSize)?"":"px")+" "+n.qA(this.Mv.fontFamily);this.ga.textBaseline="middle";this.ga.textAlign="center";this.ga.fillText(this.Za,Math.round(c+b*.5),Math.round(d+g*.5));this.ga.restore();return!0};m.prototype.NL=function(){this.ga.clearRect(0,0,this.Ih,this.Pm)};return m});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/canvas/MeasureLabelCanvas tdv/view/effects/Effect".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),k=a("tdv/events/EventDispatcher"),
e=a("tdv/player/view/webgl/components"),b=a("tdv/player/view/model3d/renderer/adapters/canvas/MeasureLabelCanvas"),c=a("tdv/view/effects/Effect");a=m.extend(k,function(f,l,p){k.call(this);this.Nha=f;this.ce=l;this.Ub=p;this.sg=this.sg.bind(this);this.Kq=this.B=null;this.km=0;this.Ld=!1;this.A5=this.ii=this.kD=this.PC=null;this.ht=void 0;this.Yi=new b;this.Nha.bind(n.L("worldUnitToMeters"),this.Iia,this,!0);this.ce.bind(n.L("units"),this.via,this,!0);this.zD()});a.prototype.mRa=function(f){this.a5(f,
null,null)};a.prototype.jlb=function(f){this.a5(null,f,null)};a.prototype.fkb=function(f){this.a5(null,null,f)};a.prototype.a5=function(f,l,p){if(this.kD!=l||this.PC!=f||this.ii!=p)[this.PC,this.kD,this.ii].forEach(function(q){q&&q.h(n.od,this.ye,this,!0);q&&q.h(n.jd,this.ye,this,!0)}.bind(this)),this.Oz(),this.PC=f,this.kD=l,this.ii=p,this.zD(),this.sg(),this.gh(!0),[this.PC,this.kD,this.ii].forEach(function(q){q&&q.bind(n.od,this.ye,this,!0);q&&q.bind(n.jd,this.ye,this,!0)}.bind(this)),this.PC?
(this.B.O(e.pb).F=this.PC.mj(),this.B.O(e.ta).Ze=.5,f=this.B.O(e.Sprite),f.uO=.5,f.vO=.5,this.Yi.Wqa(),this.Yi.Xqa(.5)):this.kD?(this.B.O(e.pb).F=this.kD.mj(),this.B.O(e.ta).Ze=0,f=this.B.O(e.Sprite),f.uO=.5,f.vO=1.1,this.Yi.Wqa(),this.Yi.Xqa(1)):this.ii?(this.B.O(e.pb).F=this.ii.mj(),this.B.O(e.ta).Ze=0,f=this.B.O(e.Sprite),f.uO=.5,f.vO=.5,this.Yi.Wqa(),this.Yi.Xqa(.5)):this.B.O(e.pb).F=null,this.ye(),this.via(),this.Iia()};a.ZVa="partialDistance";a.Aua="distance";a.YVa="area";a.prototype.setStyle=
function(f){this.A5!=f&&(this.A5=f,this.sg())};a.prototype.gQ=function(f){f!==void 0&&this.ht!==f&&(this.ht=f,this.Yi.gQ(f),this.gh(),this.ye())};a.prototype.dispose=function(){this.Nha.h(n.L("worldUnitToMeters"),this.Iia,this,!0);this.ce.h(n.L("units"),this.via,this,!0);this.a5(null,null);this.Yi.dispose();this.Yi=null;this.Oz()};a.prototype.Iia=function(){this.Yi.Flb(this.Nha.get("worldUnitToMeters"));this.gh()};a.prototype.via=function(){var f=this.ce.get("units"),l=!!this.ii;this.Yi.Elb(f=="imperial"?
l?b.yta:b.zta:l?b.Gta:b.Rba);this.gh()};a.prototype.zD=function(){if(!this.B){this.B=this.Ub.T.sc("MeasureLabel");this.B.N(e.Sprite).renderOrder=g.iVa;this.B.N(e.Rr);var f=this.B.N(e.Kf);f.source=this.Yi.If();f.isSprite=!0;h.ba(this.ce,d,this.sg,!0);this.B.N(e.ta);this.B.N(e.pb)}};a.prototype.Oz=function(){this.B&&(h.da(this.ce,d,this.sg),this.B.T.dd(this.B),this.B=null)};a.prototype.isVisible=function(){return this.Ld};a.prototype.Gv=function(f){this.Ld!=f&&((this.Ld=f)?(this.h9a(),this.o(n.od)):
(this.j$a(),this.Iq(0),this.o(n.jd)))};a.prototype.ye=function(){this.Gv(this.ht>0&&(this.PC&&this.PC.isVisible()||this.kD&&this.kD.isVisible()||this.ii&&this.ii.isVisible()))};a.prototype.h9a=function(){this.Kq||(this.Kq=new c,this.Kq.set("duration",300),this.Kq.bind(c.eba,this.SCa,this,!0),this.Kq.bind(c.Bl,this.RCa,this,!0),this.Kq.play())};a.prototype.j$a=function(){this.Kq&&(this.Kq.h(c.eba,this.SCa,this,!0),this.Kq.h(c.Bl,this.RCa,this,!0),this.Kq.stop(),this.Kq=null)};a.prototype.SCa=function(){this.Iq(2*
this.Kq.tm()-1)};a.prototype.RCa=function(){this.Iq(1)};a.prototype.sg=function(){this.B.O(e.Kf).depthTest=this.rM("depthTest");this.Yi.ykb(this.rM("labelFontColor"));this.Yi.gkb(this.rM("labelBackgroundColor"));this.Yi.zkb(this.rM("labelFontFamily"));this.Yi.Akb(this.rM("labelFontSize"));this.xi();this.gh()};a.prototype.rM=function(f){var l;this.A5&&(l=this.ce.get(this.A5+f[0].toUpperCase()+f.substr(1)));l===void 0&&(l=this.ce.get(f));return l};a.prototype.gh=function(f){if(this.Yi.update()||f){f=
this.B.O(e.Kf);var l=this.B.O(e.Sprite);f.vK=(new Date).getTime();l.width=this.Yi.fg();l.height=this.Yi.wg()}};a.prototype.Iq=function(f){this.km!=f&&(this.km=f,this.xi())};a.prototype.xi=function(){this.B.O(e.Kf).opacity=this.rM("labelOpacity")*Math.max(1E-4,this.km)};var d="depthTest areaLabelBackgroundColor areaLabelFontColor areaLabelFontFamily areaLabelOpacity areaLabelFontSize distanceLabelBackgroundColor distanceLabelFontColor distanceLabelFontFamily distanceLabelOpacity distanceLabelFontSize labelBackgroundColor labelFontColor labelFontFamily labelOpacity labelFontSize partialDistanceLabelBackgroundColor partialDistanceLabelFontColor partialDistanceLabelFontFamily partialDistanceLabelOpacity partialDistanceLabelFontSize".split(" ");
return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/webgl/components");a=m.extend(g,function(b,c){g.call(this);this.ce=b;this.Ub=c;this.yn=this.wn=null;this.sg=this.sg.bind(this);this.B=
null;this.km=0;this.Ld=!1;this.zD()});a.prototype.z$=function(b,c){if(this.wn!=b||this.yn!=c)this.wn&&this.wn.h(n.od,this.ye,this,!0),this.wn&&this.wn.h(n.jd,this.ye,this,!0),this.yn&&this.yn.h(n.od,this.ye,this,!0),this.yn&&this.yn.h(n.jd,this.ye,this,!0),this.wn=b,this.yn=c,this.wn&&this.wn.bind(n.od,this.ye,this,!0),this.wn&&this.wn.bind(n.jd,this.ye,this,!0),this.yn&&this.yn.bind(n.od,this.ye,this,!0),this.yn&&this.yn.bind(n.jd,this.ye,this,!0),this.B.O(k.pb,!0).F=this.wn&&this.wn.mj(),this.B.O(k.yu,
!0).F=this.yn&&this.yn.mj(),this.ye()};a.prototype.mj=function(){return this.B};a.prototype.dispose=function(){this.z$(null,null);this.Oz()};a.prototype.zD=function(){this.B||(this.B=this.Ub.T.sc("MeasureLine"),this.B.N(k.Line),this.B.N(k.ei),this.B.N(k.ta),h.ba(this.ce,e,this.sg,!0))};a.prototype.Oz=function(){this.B&&(h.da(this.ce,e,this.sg),this.B.T.dd(this.B),this.B=null)};a.prototype.isVisible=function(){return this.Ld};a.prototype.Gv=function(b){this.Ld!=b&&((this.Ld=b)?(this.Iq(1),this.o(n.od)):
(this.Iq(0),this.o(n.jd)))};a.prototype.ye=function(){this.Gv(this.wn&&this.wn.isVisible()&&this.yn&&this.yn.isVisible())};a.prototype.sg=function(){var b=this.B.O(k.ei);b.color=this.ce.get("lineColor");b.depthTest=this.ce.get("depthTest");b.width=this.ce.get("lineWidth");b.depthTest=this.ce.get("depthTest");this.xi()};a.prototype.Iq=function(b){this.km!=b&&(this.km=b,this.xi())};a.prototype.xi=function(){this.B.O(k.ei).opacity=this.ce.get("lineOpacity")*Math.max(1E-4,this.km)};var e=["depthTest",
"lineColor","lineOpacity","lineWidth"];return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/webgl/components");a=m.extend(g,function(d,f,l,p){g.call(this);this.ce=d;this.Fa=f;this.Ub=l;this.Ns=p;this.z3=this.z3.bind(this);
this.sg=this.sg.bind(this);this.bp=this.bp.bind(this);this.B=null;this.zj=this.XU=this.Cd=this.cC=!1;this.km=0;this.Ld=!1;this.zD();h.ba(this.ce,e,this.z3,!0);h.ba(this.ce,c,this.sg,!0);h.KD(this.Ns,b,this.bp,!0);this.bind(n.Km,this.yCa,this,!0);this.bind(n.uc,this.E3,this,!0);this.bind(n.Eb,this.Es,this,!0);this.bp();this.e8()&&this.Gv(!0)});a.prototype.dispose=function(){h.da(this.ce,e,this.z3);h.da(this.ce,c,this.sg);h.da(this.Ns,b,this.bp);this.h(n.Km,this.yCa,this,!0);this.h(n.uc,this.E3,this,
!0);this.h(n.Eb,this.Es,this,!0);this.Oz()};a.prototype.mj=function(){return this.B};a.prototype.MQa=function(d){this.cC!==d&&((this.cC=d)?(d=this.B.N(k.Dl),d.F=this.Ub,d.rotate=!1,d.M=new g,this.Gv(!0),d.M.bind(n.uc,this.UM,this,!0)):((d=this.B.getComponent(k.Dl))&&d.M.h(n.uc,this.UM,this,!0),this.B.ka(k.Dl),d=this.Fa.worldPositionToLocal([this.x,this.y,this.z],this.Fa.getMatrixWorld()),this.TQa(d[0],d[1],d[2])),this.GD(),this.dma())};a.prototype.XQa=function(d){d===void 0&&(d=!1);this.zj!==d&&((this.zj=
d)?this.B.N(k.Gm):this.B.ka(k.Gm))};a.prototype.slb=function(d){this.XU!==d&&(this.XU=d,this.dma(),this.Cd=!1,this.GD())};a.prototype.TQa=function(d,f,l){this.Ns.set("x",d);this.Ns.set("y",f);this.Ns.set("z",l);this.Gv(this.e8())};a.prototype.zD=function(){this.B=this.Ub.T.sc("MeasurePoint");this.B.N(k.Sphere);this.B.N(k.xd);this.B.N(k.wd).M=this;this.B.N(k.Rr);this.B.N(k.ta).M=this;this.B.N(k.Tk);this.B.N(k.pb).F=this.Ub;this.dma();this.xi();this.GD()};a.prototype.Oz=function(){this.B.T.dd(this.B);
this.B=null};a.prototype.isVisible=function(){return this.Ld};a.prototype.Gv=function(d){this.Ld!=d&&((this.Ld=d)?(this.Iq(1),this.o(n.od)):(this.Iq(0),this.o(n.jd)))};a.prototype.dma=function(){var d=this.B.O(k.wd);d.pB=this.XU;d.Xt=this.XU;d.mt=!this.cC;d=this.B.O(k.Rr,!0);d.qsa=!this.XU||this.cC;d.psa=this.cC};a.prototype.UM=function(){this.Gv(!0)};a.prototype.E3=function(){this.Cd=!0;this.GD()};a.prototype.Es=function(){this.Cd=!1;this.GD()};a.prototype.z3=function(){this.B.O(k.pb).id=this.ce.get("parentId")};
a.prototype.sg=function(){if(this.B){var d=this.B.O(k.Tk);d.Le=d.Ye=d.Gh=1;d.oE=this.ce.get("pointMaxRadius");d.pE=this.ce.get("pointMinRadius");d.scale=this.ce.get("pointRadius")||1;this.B.O(k.xd).depthTest=this.ce.get("depthTest");this.GD()}};a.prototype.GD=function(){if(this.B){var d=this.cC?"pointDragColor":this.Cd?"pointOverColor":"pointColor";this.B.O(k.xd).color=this.ce.get(d)}};a.prototype.Iq=function(d){this.km!=d&&(this.km=d,this.xi())};a.prototype.xi=function(){this.B.O(k.xd).opacity=Math.max(1E-4,
this.km)};a.prototype.yCa=function(d){this.x=d.data.position.x;this.y=d.data.position.y;this.z=d.data.position.z};a.prototype.bp=function(){if(this.e8()&&this.B){var d=this.B.O(k.ta,!0);d.positionX=d.positionY=d.positionZ=0;d.Yd=d.fd=d.Xe=0;d.translationX=this.Ns.get("x");d.translationY=this.Ns.get("y");d.Ze=this.Ns.get("z")}};a.prototype.e8=function(){var d=this.Ns.get("x"),f=this.Ns.get("y"),l=this.Ns.get("z");return d!==void 0&&f!==void 0||l!==void 0};a.prototype.distanceTo=function(d){var f=this.x-
d.x,l=this.y-d.y;d=this.z-d.z;return Math.sqrt(f*f+l*l+d*d)};var e=["parentId"],b=["x","y","z"],c="depthTest mode pointDragColor pointColor pointOverColor pointMaxRadius pointMinRadius pointRadius".split(" ");return a});
define("tdv/player/view/model3d/renderer/adapters/measure/MeasureAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Key tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter tdv/player/view/util/Device tdv/player/view/util/XR".split(" "),function(a){function m(v,
w,x,y,z){this.R=v;this.Fa=w;this.Ub=x;this.j=z;this.P=this.j.P;this.As=this.As.bind(this);this.C3=this.C3.bind(this);this.r3=this.r3.bind(this);this.L3=this.L3.bind(this);this.WM=this.WM.bind(this);this.WC=this.WC.bind(this);this.lz=this.lz.bind(this);this.tq=this.tq.bind(this);this.we=null;this.Nj=new Map;this.CU=new Map;this.ts=[];this.BH=[];this.iN=new Map;this.ri=[];this.Kj=null;this.U5();this.Qf=this.qd=void 0;this.hwa=this.ha=!1;h.ba(this.R,["enabled"],this.As,!0)}var h=a("tdv/binding/BindingsHandler"),
n=a("tdv/constants/EventName"),g=a("tdv/constants/Key"),k=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureAreaAdapter"),e=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureLabelAdapter"),b=a("tdv/player/view/model3d/renderer/adapters/measure/MeasureLineAdapter"),c=a("tdv/player/view/model3d/renderer/adapters/measure/MeasurePointAdapter"),d=a("tdv/player/view/util/Device"),f=a("tdv/player/view/util/XR");m.prototype.dispose=function(){this.fs();h.da(this.R,["enabled"],this.As);
this.Kj=this.ri=this.BH=this.ts=this.CU=this.Nj=null;this.U5();this.Qf=this.qd=null};m.prototype.As=function(){this.R.get("enabled")?this.QG():this.fs()};m.prototype.QG=function(){this.ha||(this.ha=!0,this.JZa(),this.jxa(this.R),document.addEventListener("keyup",this.tq),h.ba(this.R,l,this.C3,!0),h.ba(this.R,q,this.L3,!0),h.ba(this.R,p,this.r3,!0),h.ba(this.R,r,this.WM,!0),h.ba(this.R,t,this.WC,!0),h.ba(this.Fa,u,this.lz,!0),f.M.bind(n.Zd,this.W5a,this,!0))};m.prototype.fs=function(){this.ha&&(this.ha=
!1,this.dFa([]),this.Dxa(this.R),this.R_a(),document.removeEventListener("keyup",this.tq),h.da(this.R,l,this.C3),h.da(this.R,q,this.L3),h.da(this.R,p,this.r3),h.da(this.R,r,this.WM),h.da(this.R,t,this.WC),h.da(this.Fa,u,this.lz),f.M.h(n.Zd,this.Dpb,this),this.gV(null))};m.prototype.lz=function(){this.gV(this.Fa&&this.Fa.get("pointer"))};m.prototype.W5a=function(){var v=f.ud.some(function(w){return w.PIa});v!=this.hwa&&((this.hwa=v)||this.pBa())};m.prototype.gV=function(v){this.we!==v&&(this.we&&(this.we.h(n.ma,
this.bCa,this,!0),this.we.h(n.fi,this.cCa,this,!0)),this.we=v)&&(this.we.bind(n.ma,this.bCa,this,!0),this.we.bind(n.fi,this.cCa,this,!0))};m.prototype.C3=function(){this.dFa(this.R.get("points"))};m.prototype.r3=function(){var v=this.R.get("mode");if(v!=this.qd){switch(this.qd){case "create":this.ri.length<1||this.Kj&&this.ri.length<2?v="create":this.b7a(this.Kj);break;case "edit":v=="create"?this.R.get("type")==="single"&&this.ri.length>0?v="edit":this.O_():this.Fz(null);break;case "view":v==="create"&&
(this.R.get("type")==="single"&&this.ri.length>0?v="view":this.O_());break;default:v=="create"&&(this.R.get("type")==="single"&&this.ri.length>0&&this.ega(this.Iy(-1))?v="edit":this.Fz(this.Iy(-1),!1))}this.qd=v;this.R.set("mode",this.qd);this.cHa()}};m.prototype.L3=function(){var v=this.R.get("type");v!==this.Qf&&(this.Qf=v,this.Qf==="single"&&this.ri.length>1&&this.R.set("points",this.Apb.slice(0,1)))};m.prototype.WM=function(){this.SGa();this.T5()};m.prototype.WC=function(){var v=this.Tfa(this.ii);
v&&v.gQ(this.R.get("area"))};m.prototype.tq=function(v){v.which==g.g_&&this.P.get("isKeyboardTarget")&&this.pBa()};m.prototype.pBa=function(){this.R.get("mode")=="create"?this.R.set("mode","edit"):this.qd=="edit"&&this.Fz(null)};m.prototype.O_=function(){this.qXa();this.Fz(this.Iy(-1),!1)};m.prototype.OS=function(){return d.ub()&&!d.kf()};m.prototype.qXa=function(){var v=this.P.get("application").Ai("MeasureModel3DObjectPoint");if(!this.OS()){var w=this.Iy(-1);w&&this.ega(w)&&(v.set("x",w.get("x")),
v.set("y",w.get("y")),v.set("z",w.get("z")))}this.R.set("points",this.ri.concat([v]))};m.prototype.Iy=function(v){var w=[this.R].concat(this.ri);return v<0&&w.length-v>0?w[w.length+v]:v>=0&&v<w.length?w[v]:null};m.prototype.b7a=function(v){this.R.set("points",this.ri.filter(function(w){return w!=v}))};m.prototype.ega=function(v){return!!v&&this.Nj.get(v).e8()};m.prototype.bCa=function(v){if(v.data.type!="other")if(this.R.get("mode")=="create"){if(this.Kj){var w=this.Kj;this.Fz(null);this.NXa(w,v)}this.Qf==
"single"&&this.ri.length>0?this.R.set("mode","edit"):this.O_()}else this.R.get("mode")=="edit"&&this.Fz(null)};m.prototype.cCa=function(){this.R.get("mode")=="create"&&this.OS()&&this.R.set("mode","edit")};m.prototype.uCa=function(){this.R.get("mode")=="create"&&this.R.set("mode","edit")};m.prototype.tCa=function(v){if(this.R.get("mode")=="create"){var w=this.Iy(-2);v=this.CU.get(v.source);w==v?this.R.set("mode","edit"):(w=this.Kj,this.Fz(null),w.set("x",v.get("x")),w.set("y",v.get("y")),w.set("z",
v.get("z")),w=this.Iy(0),v==w?this.R.set("mode","edit"):this.O_())}};m.prototype.vCa=function(v){this.R.get("mode")=="edit"&&this.Fz(this.CU.get(v.source),!0)};m.prototype.wCa=function(){this.R.get("mode")=="edit"&&this.Fz(null)};m.prototype.xCa=function(){this.T5()};m.prototype.T5=function(){for(var v=[],w=this.Iy(0),x=this.Zfa(),y=0;y<x.length;y++){var z=x[y];w=this.Nj.get(w);var A=this.Nj.get(z);A=w.distanceTo(A);(w=this.Tfa(this.ts[y]))&&w.gQ(A);v.push(A);w=z}v=v.reduce(function(D,F){return D+
F},0);(w=this.Tfa(this.Nj.get(x[x.length-1])))&&w.gQ(v);this.R.set("distance",isNaN(v)?void 0:v)};m.prototype.NXa=function(v,w){if(w=w&&w.data.position)w=this.Fa.worldPositionToLocal(w,this.Fa.getMatrixWorld()),this.Nj.get(v).TQa(w.x,w.y,w.z)};m.prototype.Fz=function(v,w){w||(w=!1);if(this.Kj!==v){if(this.Kj){var x=this.Nj.get(this.Kj);x.XQa(!1);x.MQa(!1)}if(this.Kj=v)x=this.Nj.get(this.Kj),x.XQa(w),x.MQa(w||!this.OS());this.TGa();this.cHa();this.U5()}};m.prototype.dFa=function(v){this.ri!=v&&(this.ri.forEach(function(w){v.indexOf(w)==
-1&&this.Dxa(w)}.bind(this)),this.ri=v,this.Kj&&this.ri.indexOf(this.Kj)&&(this.Kj=null),this.U5(),this.ri.forEach(function(w){this.jxa(w)}.bind(this)),this.TGa(),this.SGa(),this.cab(),this.T5())};m.prototype.Zfa=function(){return this.ri.filter(function(v){return this.ega(v)||this.Nj.get(v).cC}.bind(this))};m.prototype.TGa=function(){for(;this.ri.length<this.ts.length;)this.T_a();for(;this.ri.length>this.ts.length;)this.o_a();for(var v=!0,w=0;w<this.ri.length;w++){var x=this.Iy(w),y=this.Iy(w+1);
x==this.Kj&&(v=!1);var z=v?y:x;this.ts[w].z$(this.Nj.get(v?x:y),this.Nj.get(z))}};m.prototype.SGa=function(){this.Y$a();var v=this.Zfa(),w=v.length==1;this.R.get("displayPartialDistanceLabel")&&!w&&this.ts.forEach(function(x){var y=this.n2(x);y.mRa(x);y.setStyle(e.ZVa)}.bind(this));this.R.get("displayDistanceLabel")&&(w?(v=this.n2(this.ts[0]),v.mRa(this.ts[0]),v.setStyle(e.Aua)):v.length>1&&(w=this.Nj.get(v[v.length-1]),v=this.n2(w),v.jlb(w),v.setStyle(e.Aua)));this.R.get("displayAreaLabel")&&this.ii&&
(v=this.n2(this.ii),v.fkb(this.ii),v.setStyle(e.YVa));this.V_a();this.T5();this.WC()};m.prototype.cHa=function(){var v=!this.Kj&&this.qd!="view";this.Nj.forEach(function(w){w.slb(v)})};m.prototype.cab=function(){this.ii&&this.ii.z$([this.R].concat(this.Zfa()).map(function(v){return this.Nj.get(v)}.bind(this)))};m.prototype.jxa=function(v){var w=this.Nj.get(v);w||(w=new c(this.R,this.Fa,this.Ub,v),this.Nj.set(v,w),this.CU.set(w,v),w.bind(n.fi,this.uCa,this,!0),w.bind(n.ma,this.tCa,this,!0),w.bind(n.Sa,
this.vCa,this,!0),w.bind(n.$a,this.wCa,this,!0),w.bind(n.Km,this.xCa,this,!1))};m.prototype.Dxa=function(v){var w=this.Nj.get(v);w&&(w.h(n.Km,this.xCa,this,!1),w.h(n.fi,this.uCa,this,!0),w.h(n.ma,this.tCa,this,!0),w.h(n.Sa,this.vCa,this,!0),w.h(n.$a,this.wCa,this,!0),w.dispose(),this.Nj["delete"](v),this.CU["delete"](w))};m.prototype.o_a=function(){var v=new b(this.R,this.Ub);this.ts.push(v)};m.prototype.T_a=function(){this.ts.length!=0&&this.ts.pop().dispose()};m.prototype.n_a=function(){var v=new e(this.Fa,
this.R,this.Ub);this.BH.push(v);return v};m.prototype.Y$a=function(){this.iN.clear()};m.prototype.n2=function(v){var w=this.BH.length>this.iN.size?this.BH[this.iN.size]:this.n_a();this.iN.set(v,w);return w};m.prototype.Tfa=function(v){return this.iN.get(v)};m.prototype.V_a=function(){for(;this.BH.length>this.iN.size;)this.S_a()};m.prototype.S_a=function(){this.BH.length!=0&&this.BH.pop().dispose()};m.prototype.JZa=function(){this.ii||(this.ii=new k(this.R,this.Ub))};m.prototype.R_a=function(){this.ii&&
(this.ii.dispose(),this.ii=null)};m.prototype.U5=function(){this.R.set("draggingPoint",!!this.Kj)};var l=["points"],p=["mode"],q=["type"],r=["displayAreaLabel","displayDistanceLabel","displayPartialDistanceLabel"],t=["area"],u=["pointer"];return m});
define("tdv/player/view/model3d/renderer/adapters/objects/CanvasPlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n){a=function(){function g(k,e,b,c,d){this.object=k;this.model=e;this.wb=b;this.renderer=d;this.he=this.he.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();h.da(this.object,
["enabled"],this.he)};g.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("CanvasPlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.wd(a);a=n.TK(a);a=n.Kf(a);a=n.G_(a);a=n.kL(a);a=n.pb(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/ChildAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/BaseModelAdapter tdv/player/view/model3d/renderer/adapters/Mixins".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(p){function q(r,t,u,v,w){r=p.call(this,r,t,u,w)||this;r.RA=r.RA.bind(r);r.wb=u;r.wr=new k;r.wr.bind(g.V,r.ym,r,!0);r.F.N(e.AB);r.F.N(e.MQ).object=
r.object;n.ba(r.object,d,r.RA,!0);r.Wc();return r}P(q,p);q.prototype.Wc=function(){};q.prototype.Xc=function(){};q.prototype.dispose=function(){n.da(this.object,d,this.RA);this.wr.h(g.V,this.ym,this);this.wr=null;this.Xc();p.prototype.dispose.call(this)};q.prototype.ym=function(r){f.setFromQuaternion(r.data.quaternion,this.object.get("rotationOrder"));this.object.set({x:0,y:0,z:0,translationX:r.data.position.x,translationY:r.data.position.y,translationZ:r.data.position.z,rotationX:f.x*l,rotationY:f.y*
l,rotationZ:f.z*l,scale:Math.max(r.data.scale,.001)});this.object.o(g.Km)};q.prototype.RA=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.F.O(e.Hh,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.M=this.wr}else this.F.ka(e.Hh)};return q}(b);var d=["positionDraggable","rotationDraggable","scaleDraggable"],f=
new h.Euler,l=180/Math.PI;h=c.wd(a);h=c.G_(h);h=c.TK(h);h=c.kL(h);h=c.pb(h);h=c.NVa(h);return h=c.rua(h)});
define("tdv/player/view/model3d/renderer/adapters/objects/ImagePlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n){a=function(){function g(k,e,b,c,d){this.object=k;this.model=e;this.wb=b;this.renderer=d;this.he=this.he.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();h.da(this.object,
["enabled"],this.he)};g.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("ImagePlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.wd(a);a=n.TK(a);a=n.Ni(a);a=n.kL(a);a=n.pb(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/InnerObjectAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n,g){var k=["objectId"];a=function(){function e(b,c,d,f,l){this.object=b;this.model=c;this.wb=d;this.renderer=l;this.F=this.wb.T.sc("InnerObject");this.x3=this.x3.bind(this);h.ba(this.object,k,this.x3,!0);this.Wc()}e.prototype.Wc=function(){};e.prototype.Xc=function(){};
e.prototype.x3=function(){var b=this.F.O(n.gL,!0);b.id=this.object.get("objectId");b.container=this.wb};e.prototype.dispose=function(){this.Xc();h.da(this.object,k,this.x3);this.wb.T.dd(this.F);this.F=null};return e}();a=g.wd(a);a=g.TK(a);a=g.kL(a);return a=g.G_(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/LineAdapter","require exports tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/model3d/renderer/adapters/Mixins three.mod".split(" "),function(a,m,h,n,g,k){var e=["x","y","z"],b=["targetX","targetY","targetZ"];a=function(){function c(d,f,l,p,q){this.object=d;this.model=f;this.wb=l;this.renderer=q;this.he=this.he.bind(this);this.u9=this.u9.bind(this);this.z9=this.z9.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,
["enabled"],this.he,!0)}c.prototype.Wc=function(){};c.prototype.Xc=function(){};c.prototype.dispose=function(){this.disable();h.da(this.object,["enabled"],this.he)};c.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};c.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("Line"),this.F.N(n.ta),this.F.N(n.Line),this.F.N(n.yu).position=new k.Vector3,h.ba(this.object,e,this.u9,!0),h.ba(this.object,b,this.z9,!0),this.Wc())};c.prototype.disable=
function(){this.enabled&&(this.enabled=!1,this.Xc(),h.da(this.object,e,this.u9),h.da(this.object,b,this.z9),this.F.T.dd(this.F),this.F=null)};c.prototype.u9=function(){var d=this.F.O(n.ta);d.translationX=this.object.get("x",0);d.translationY=this.object.get("y",0);d.Ze=this.object.get("z",0)};c.prototype.z9=function(){var d=this.F.O(n.yu);d.position.x=this.object.get("targetX");d.position.y=this.object.get("targetY");d.position.z=this.object.get("targetZ")};return c}();a=g.wd(a);a=g.ei(a);return a=
g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/HorizonGridAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n,g){var k=["x","y","z"],e="divisions centerLinesColor depthTest gridColor opacity size".split(" ");a=function(){function b(c,d,f,l,p){this.object=c;this.model=d;this.wb=f;this.renderer=p;this.he=this.he.bind(this);this.OA=this.OA.bind(this);this.m9=this.m9.bind(this);this.enabled=
!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}b.prototype.Wc=function(){};b.prototype.Xc=function(){};b.prototype.dispose=function(){this.disable();h.da(this.object,["enabled"],this.he)};b.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};b.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("HorizonGrid"),this.F.N(n.ta),this.F.N(n.wu),h.ba(this.object,k,this.OA,!0),h.ba(this.object,e,this.m9,!0),this.Wc())};b.prototype.disable=function(){this.enabled&&
(this.enabled=!1,this.Xc(),h.da(this.object,k,this.OA),h.da(this.object,e,this.m9),this.F.T.dd(this.F),this.F=null)};b.prototype.OA=function(){var c=this.F.O(n.ta);c.translationX=this.object.get("x",0);c.translationY=this.object.get("y",0);c.Ze=this.object.get("z",0)};b.prototype.m9=function(){var c=this.F.O(n.wu);c.bJa=this.object.get("centerLinesColor");c.depthTest=this.object.get("depthTest");c.Hna=this.object.get("divisions");c.$La=this.object.get("gridColor");c.size=this.object.get("size")};
return b}();a=g.G_(a);return a=g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/SphereAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n,g){var k=["radius","maxRadius","minRadius"];a=function(){function e(b,c,d,f,l){this.object=b;this.model=c;this.wb=d;this.renderer=l;this.he=this.he.bind(this);this.QA=this.QA.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}e.prototype.Wc=function(){};
e.prototype.Xc=function(){};e.prototype.dispose=function(){this.disable();h.da(this.object,["enabled"],this.he)};e.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};e.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("Sphere"),this.F.N(n.Sphere),this.F.N(n.Tk),h.ba(this.object,k,this.QA,!0),this.Wc())};e.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),h.da(this.object,k,this.QA),this.F.T.dd(this.F),this.F=null)};e.prototype.QA=
function(){var b=this.F.O(n.Tk);b.Le=b.Ye=b.Gh=1;b.scale=this.object.get("radius");b.oE=this.object.get("maxRadius");b.pE=this.object.get("minRadius")};return e}();a=g.wd(a);a=g.TK(a);a=g.xd(a);a=g.pb(a);return a=g.rua(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/ProjectedMaterialAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/webgl/components","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n,g){var k="cameraBox skyBox sourceAlpha sourceCubeTexture sourceX sourceY sourceYaw sourceZ targetAlpha targetCubeTexture targetX targetY targetYaw targetZ".split(" ");a=function(){function e(b,c,d,f,l){this.object=b;this.model=c;this.wb=d;this.Fpa=f;this.renderer=
l;this.he=this.he.bind(this);this.x9=this.x9.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}e.prototype.Wc=function(){};e.prototype.Xc=function(){};e.prototype.dispose=function(){this.disable();h.da(this.object,["enabled"],this.he)};e.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};e.prototype.enable=function(){if(!this.enabled){this.enabled=!0;this.F=this.wb.T.sc("ProjectedMaterial");this.F.N(n.po);var b=this.F.N(n.pb);b.F=this.wb;
b.attach=!0;h.ba(this.object,k,this.x9,!0);this.Wc()}};e.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),h.da(this.object,k,this.x9),this.F.T.dd(this.F),this.F=null)};e.prototype.x9=function(){var b=this.F.O(n.po);b.MA=this.object.get("nearPlane")||!1;b.RRa=this.object.get("skyBox")||!1;b.TRa=this.object.get("sourceAlpha")||0;b.bF=this.Fpa;b.P$=this.object.get("sourceX")||0;b.Q$=this.object.get("sourceY")||0;b.R$=this.object.get("sourceZ")||0;b.sZ=this.object.get("sourceYaw")||
0;b.qZ=this.object.get("sourceCubeTexture");b.pSa=this.object.get("targetAlpha")||0;b.targetX=this.object.get("targetX")||0;b.targetY=this.object.get("targetY")||0;b.baa=this.object.get("targetZ")||0;b.Dmb=this.object.get("targetYaw")||0;b.yZ=this.object.get("targetCubeTexture")};return e}();return g.pb(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/SurfaceReticleAdapter","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas tdv/player/view/webgl/components".split(" "),function(a){function m(f,l,p,q,r){this.R=f;this.Fa=l;this.Ub=p;this.j=r;this.P=this.j.P;this.As=this.As.bind(this);this.cz=this.cz.bind(this);this.bp=this.bp.bind(this);this.sg=this.sg.bind(this);this.Lha=this.Ub.getComponent(e.Oi).Ap;
this.Lha.bind(n.ia,this.dz,this,!1);this.Mha=this.vAa=!1;this.Ov=new k(this.P);this.Ov.setPosition(0);this.Ov.update();this.B=null;h.ba(this.R,["enabled"],this.As,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/RenderOrder"),k=a("tdv/player/view/model3d/renderer/adapters/canvas/SurfaceReticleCanvas"),e=a("tdv/player/view/webgl/components");m.prototype.As=function(){this.R.get("enabled")?this.QG():this.fs()};m.prototype.QG=function(){if(!this.B){this.B=
this.Ub.T.sc("Reticle");var f=this.B.N(e.pb);f.F=this.Ub;f.id=this.R.get("parentId");this.B.N(e.Plane).renderOrder=g.$Va;this.B.N(e.Kf).source=this.Ov.If();this.B.N(e.AB);f=this.B.N(e.MQ);f.xmb=this.R;f.object=this.R;h.ba(this.Fa,d,this.cz,!0);h.ba(this.R,b,this.bp,!0);h.ba(this.R,c,this.sg,!0)}};m.prototype.fs=function(){this.B&&(this.Ub.T.dd(this.B),this.B=null,h.da(this.Fa,d,this.cz),h.da(this.R,b,this.bp),h.da(this.R,c,this.sg))};m.prototype.cz=function(){var f=this.B.O(e.Tk,!0);f.Le=f.Ye=2;f.scale=
this.Fa.get("surfaceReticleRadius");f.oE=this.Fa.get("surfaceReticleMaxRadius");f.pE=this.Fa.get("surfaceReticleMinRadius");this.ZGa()};m.prototype.bp=function(){var f=this.B.O(e.zx,!0);f.x=this.R.get("x");f.y=this.R.get("y");f.z=this.R.get("z");f.distance=this.R.get("distance");f.HX=this.R.get("horizontal")};m.prototype.sg=function(){var f=this.B.O(e.wd,!0);f.pB=this.R.get("useHandCursor");f.fF=this.R.get("transparentAreaActive");f.M=this.R;f=this.B.O(e.Kf);f.opacity=this.R.get("opacity");f.hidden=
this.R.get("hidden");f.depthTest=this.R.get("depthTest")};m.prototype.dz=function(){this.vAa=!0;this.ZGa()};m.prototype.ZGa=function(){var f=this.vAa&&this.Fa.get("opacity")>.5;this.Mha!=f&&(this.Mha=f)&&this.B&&this.B.O(e.zx)};m.prototype.dispose=function(){this.fs();h.da(this.R,["enabled"],this.As);this.Lha.h(n.ia,this.dz,this,!1);this.Lha=null};var b=["distance","horizontal","x","y","z"],c=["depthTest","hidden","opacity","transparentAreaActive","useHandCursor"],d=["opacity","surfaceReticleRadius",
"surfaceReticleMaxRadius","surfaceReticleMinRadius","surfaceSelectionEnabled"];return m});
define("tdv/player/view/model3d/renderer/adapters/objects/VideoPlaneAdapter",["require","exports","tdv/binding/BindingsHandler","tdv/player/view/model3d/renderer/adapters/Mixins"],function(a,m,h,n){a=function(){function g(k,e,b,c,d){this.object=k;this.model=e;this.wb=b;this.renderer=d;this.he=this.he.bind(this);this.enabled=!1;this.F=null;h.ba(this.object,["enabled"],this.he,!0)}g.prototype.Wc=function(){};g.prototype.Xc=function(){};g.prototype.dispose=function(){this.disable();h.da(this.object,
["enabled"],this.he)};g.prototype.he=function(){this.object.get("enabled")?this.enable():this.disable()};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.wb.T.sc("VideoPlane"),this.Wc())};g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Xc(),this.F.T.dd(this.F),this.F=null)};return g}();a=n.wd(a);a=n.TK(a);a=n.ro(a);a=n.pb(a);a=n.kL(a);return a=n.Plane(a)});
define("tdv/player/view/model3d/renderer/adapters/objects/objects","require exports tdv/player/view/model3d/renderer/adapters/measure/MeasureAdapter tdv/player/view/model3d/renderer/adapters/objects/CanvasPlaneAdapter tdv/player/view/model3d/renderer/adapters/objects/ChildAdapter tdv/player/view/model3d/renderer/adapters/objects/ImagePlaneAdapter tdv/player/view/model3d/renderer/adapters/objects/InnerObjectAdapter tdv/player/view/model3d/renderer/adapters/objects/LineAdapter tdv/player/view/model3d/renderer/adapters/objects/HorizonGridAdapter tdv/player/view/model3d/renderer/adapters/objects/SphereAdapter tdv/player/view/model3d/renderer/adapters/objects/ObjectAdapterFactory tdv/player/view/model3d/renderer/adapters/objects/ProjectedMaterialAdapter tdv/player/view/model3d/renderer/adapters/objects/SurfaceReticleAdapter tdv/player/view/model3d/renderer/adapters/objects/VideoPlaneAdapter".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q){return{jB:function(){f.Wt("MeasureModel3DObject",h);f.Wt("ChildModel3DObject",g);f.Wt("HorizonGridModel3DObject",c);f.Wt("CanvasPlaneModel3DObject",n);f.Wt("ImagePlaneModel3DObject",k);f.Wt("InnerModel3DObject",e);f.Wt("LineModel3DObject",b);f.Wt("ProjectedMaterialModel3DObject",l);f.Wt("SphereModel3DObject",d);f.Wt("SurfaceReticleModel3DObject",p);f.Wt("VideoPlaneModel3DObject",q)}}});
define("tdv/view/events/MouseEvent",["require","exports","tdv/events/Event"],function(a,m,h){return function(n){function g(k,e,b,c,d,f,l,p){e===void 0&&(e=0);b===void 0&&(b=0);c===void 0&&(c=0);d===void 0&&(d=0);f===void 0&&(f=0);l===void 0&&(l=0);p===void 0&&(p=null);k=n.call(this,k)||this;k.x=e;k.y=b;k.pageX=c;k.pageY=d;k.delta=f;k.lA=l;k.zE=p;k.movementX=p&&p.movementX||void 0;k.movementY=p&&p.movementY||void 0;return k}P(g,n);g.prototype.clone=function(){var k=new g(this.name,this.x,this.y,this.pageX,
this.pageY,this.delta,this.lA,this.zE);k.source=this.source;return k};return g}(h)});
define("tdv/player/view/model3d/renderer/adapters/pointer/FirstPersonPointerAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Key tdv/view/events/MouseEvent tdv/events/EventDispatcher tdv/player/view/util/Device tdv/utils tdv/view/util/MouseLocker tdv/player/parser/ClassInfo".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){return function(l){function p(q,r,t,u,v){var w=l.call(this)||this;w.MJ=[];w.WHa=0;w.RHa=0;w.e7=!1;w.mKa=!1;w.mpa=!1;w.jNa=0;w.renderer=q;w.ci=
r;w.model=t;w.wb=u;w.Ea=v;w.Yv=w.Yv.bind(w);w.P6=w.P6.bind(w);w.zna=c.mr(w.zna,w);w.JA=w.JA.bind(w);w.H8=w.H8.bind(w);w.G8=w.G8.bind(w);w.eb=w.renderer.P;w.Rf=w.renderer.getParent();w.enabled=!0;w.type=p.OQ;w.Wa();return w}P(p,l);p.prototype.getType=function(){return this.type};p.prototype.Ra=function(q){this.enabled=q};p.prototype.dispose=function(){this.ya()};p.prototype.Wa=function(){this.Rf.bind(n.gb,this.Yv,this,!0);this.Rf.bind(n.ma,this.QHa,this,!0);h.KD(this.model,["camera.lockMouse"],this.P6,
!0);h.KD(this.model,["objects"],this.JA,!0);this.wm=new d(this.Rf.wa().cc());this.wm.bind(n.V,this.SNa,this,!0);document.addEventListener("keyup",this.H8);document.addEventListener("keydown",this.G8);this.eu(p.OQ)};p.prototype.ya=function(){this.Rf.h(n.gb,this.Yv,this);this.Rf.h(n.ma,this.QHa,this);h.da(this.model,["camera.lockMouse"],this.P6);h.da(this.model,["objects"],this.JA);this.fZ([]);this.wm.h(n.V,this.SNa,this);this.wm.hr()&&this.wm.unlock();this.kRa(!1);this.wm.dispose();document.removeEventListener("keyup",
this.H8);document.removeEventListener("keydown",this.G8)};p.prototype.P6=function(){this.SX=!b.ub()&&this.model.get("camera").get("lockMouse");!this.SX&&this.wm.hr()&&this.wm.unlock();this.mTa()};p.prototype.mTa=function(){this.kRa((!this.e7||!this.mKa)&&(b.ub()||!this.SX))};p.prototype.kRa=function(q){this.mpa!=q&&((this.mpa=q)?this.eb.VS.w6():this.eb.VS.Z9())};p.prototype.Yv=function(){this.wm.hr()||this.eu(p.OQ)};p.prototype.G8=function(q){p.oVa.indexOf(q.code)!=-1&&(this.type==p.OQ&&this.eu(p.Lba),
this.SX&&!this.wm.hr()&&this.wm.lock())};p.prototype.H8=function(q){q.code==g.ua.jL&&(q=(new Date).getTime(),this.XSa(n.ma),q-this.jNa<500&&this.XSa(n.fi),this.jNa=q)};p.prototype.XSa=function(q){var r=this.eb.nb()/2,t=this.eb.Mb()/2;q=new k(q,r,t,r,t,0,0,void 0);this.Rf.o(q)};p.prototype.QHa=function(){this.RHa=(new Date).getTime();this.SX&&!this.wm.hr()?this.wm.lock():this.zna()};p.prototype.$cb=function(){this.SX&&this.wm.hr()&&this.wm.unlock()};p.prototype.SNa=function(){this.wm.hr()?this.eu(p.Lba):
this.eu(p.OQ)};p.prototype.JA=function(){this.fZ(this.model.get("objects",[]))};p.prototype.fZ=function(q){var r=this;this.MJ.forEach(function(t){t.h(n.ma,r.eOa,r)});this.MJ=q;this.MJ.forEach(function(t){t.bind(n.ma,r.eOa,r,!0);f.Oa("MeasureModel3DObject",t)&&(t.bind(n.L("draggingPoint"),r.ZX,r,!0),t.bind(n.L("mode"),r.ZX,r,!0))});this.ZX()};p.prototype.eOa=function(q){q.source.get("useHandCursor")&&(this.WHa=(new Date).getTime())};p.prototype.ZX=function(){var q=!1,r=!1;this.MJ.forEach(function(u){f.Oa("MeasureModel3DObject",
u)&&(r=r||!!u.get("draggingPoint"),q=q||u.get("mode")=="edit"&&!!u.get("draggingPoint"))});this.mKa=q;var t=this.model.get("camera");r!=this.e7&&(this.e7=r,setTimeout(function(){t.rkb(this.e7)}.bind(this),0));this.mTa()};p.prototype.zna=function(){Math.abs(this.RHa-this.WHa)>100&&this.$cb()};p.prototype.eu=function(q){this.type!==q&&(this.type=q,this.o(n.V))};p.OQ="mouse";p.Lba="gaze";p.oVa=[g.ua.bk,g.ua.Ji,g.ua.fb,g.ua.Db,g.ua.Mp,g.ua.Sp,g.ua.uo,g.ua.qo,g.ua.E,g.ua.Q];return p}(e)});
define("tdv/player/view/model3d/renderer/adapters/pointer/GazePointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/RenderOrder tdv/player/canvas/ReticleCanvas tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/webgl/components tdv/view/constants/Cursor tdv/view/util/Animation".split(" "),function(a,m,h,n,g,k,e,b,c,d,f){var l=new h.Vector3(0,0,0),p=new h.Vector3(0,0,-1);a=function(){function r(t,u,v,w,x){this.renderer=
t;this.ci=u;this.model=v;this.wb=w;this.Ea=x;this.FZ=this.FZ.bind(this);this.ZA=this.ZA.bind(this);this.dA=this.dA.bind(this);this.eb=this.renderer.P;this.Rf=this.renderer.getParent();this.Lw=this.model.get("application").Ai("Model3DPointer");this.Wa()}r.prototype.Ra=function(t){var u=this.Ea.O(c.zc);u&&(u.enabled=t)};r.prototype.dispose=function(){this.ya()};r.prototype.Wa=function(){this.ZP=new e(this.eb.Z7());this.Meb=new q(this.Rf,this.ZP);this.xp=new b;this.xp.VQa(this.Meb);var t=this.Ea.N(c.zc);
t.Ea=this.Ea;t.origin=l;t.direction=p;t.WD=this.Rf;t.d7=this.xp;t.M=this.Lw;this.eb.set("toolTipCentered",!0);this.model.set("pointer",this.Lw);this.Hlb();this.Hra();this.xp.push(d.aG);f.requestFrame(this.FZ)};r.prototype.ya=function(){this.xp.pop(d.aG);this.Fmb();this.dsa();this.eb.set("toolTipCentered",!1);this.eb.set("toolTipCenteredOffsetY",void 0);this.model.set("pointer",void 0);this.Ea.ka(c.zc);this.xp.dispose();f.$Ia(this.FZ)};r.prototype.Hra=function(){this.Fp=this.wb.T.sc("GazeReticle");
this.Fp.N(c.pb).F=this.Ea;this.Fp.N(c.Plane).renderOrder=k.SUa;this.Fp.N(c.TF);var t=this.Fp.N(c.Kf);t.source=this.ZP.If();t.depthTest=!1;this.Fp.N(c.ta).Ze=-1;this.renderer.bind(g.$b,this.ZA,this,!0);this.ZA();this.DW(this.Ea.getComponent(c.zc),this.Lw)};r.prototype.DW=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.dsa=function(){this.Fp&&
(this.Fp.T.dd(this.Fp),this.Fp=null)};r.prototype.Qnb=function(){if(this.Fp){var t=this.Fp.O(c.Tk,!0);t.Le=t.Ye=2;var u=Math.min(this.eb.nb(),this.eb.Mb())/100;t.pE=t.oE=Math.round(u*4);this.eb.set("toolTipCenteredOffsetY",2*u)}};r.prototype.FZ=function(t){this.Fp&&this.ZP.update(t)&&(this.Fp.O(c.Kf).vK=(new Date).getTime());f.requestFrame(this.FZ)};r.prototype.ZA=function(){this.Qnb()};r.prototype.Hlb=function(){n.KD(this.model,"camera",this.dA,!0)};r.prototype.Fmb=function(){n.da(this.model,"camera",
this.dA);this.WQa(!0)};r.prototype.dA=function(){this.WQa(!1)};r.prototype.WQa=function(t){var u=this.Ea.O(c.NF);u&&(u.QO=t);(u=this.Ea.O(c.OF))&&(u.QO=t);(u=this.Ea.O(c.VF))&&(u.QO=t)};return r}();var q=function(){function r(t,u){this.Rf=t;this.ZP=u}r.prototype.PLa=function(){return this.Rf};r.prototype.k$=function(t,u){u.indexOf(d.qf)>-1?this.ZP.pK(!0):this.ZP.pK(!1)};return r}();return a});
define("tdv/player/view/model3d/renderer/adapters/pointer/XRPointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/webgl/components tdv/player/view/util/Device tdv/player/view/util/XR tdv/view/constants/Cursor tdv/player/parser/ClassInfo".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p){a=function(){function v(w,x,y,z,A,D){this.MJ=
[];this.$X=[];this.renderer=w;this.ci=x;this.model=y;this.Fn=z;this.wb=A;this.Ea=D;this.JA=this.JA.bind(this);this.Tt=[];this.enabled=!1;this.Wa()}v.prototype.Ra=function(w){this.enabled!==w&&((this.enabled=w)?n.KD(this.model,["objects"],this.JA,!0):(n.da(this.model,["objects"],this.JA),this.fZ([])))};v.prototype.dispose=function(){this.ya()};v.prototype.Wa=function(){f.M.bind(g.Zd,this.Kg,this,!0)};v.prototype.ya=function(){f.M.h(g.Zd,this.Kg,this);this.mZ([])};v.prototype.Kg=function(){this.mZ(f.ud)};
v.prototype.mZ=function(w){if(!this.enabled||w.find(function(z){return z.eA}))w=[];var x=this.Tt;this.Tt=w.map(function(z){var A=x.findIndex(function(D){return D.cb==z});return A!==-1?x.splice(A,1)[0]:new q(z,this.model,this.Fn,this.wb,this.Ea)}.bind(this));x.forEach(function(z){z.dispose()});this.Tt.forEach(function(z){z.Ra(this.enabled);z.update()}.bind(this));var y=this.Tt.reduce(function(z,A){return!z||z.nA<A.nA?A:z},null);this.Tt.forEach(function(z){z.nra(z===y)});this.model.set("pointer",y!==
null?y.Jt:void 0)};v.prototype.JA=function(){this.fZ(this.model.get("objects",[]))};v.prototype.fZ=function(w){this.MJ=w;this.ZX()};v.prototype.ZX=function(){this.$X.forEach(function(w){w.h(g.L("mode"),this.Apa,this)}.bind(this));this.$X=[];this.$X=this.MJ.filter(function(w){return p.Oa("MeasureModel3DObject",w)});this.$X.forEach(function(w){w.bind(g.L("mode"),this.Apa,this,!0)}.bind(this));this.Apa()};v.prototype.Apa=function(){var w=!1,x=!1;this.$X.forEach(function(z){x=x||z.get("mode")=="create";
w=w||z.get("mode")=="edit"}.bind(this));var y=this.model.get("camera");x?y.RQa(!0):setTimeout(function(){y.RQa(!1)},0)};return v}();var q=function(){function v(w,x,y,z,A){this.nA=this.dJ=0;this.cb=w;this.model=x;this.Fn=y;this.wb=z;this.Ea=A;this.nA=this.dJ=this.cb.handedness==="right"?1:0;this.Jt=this.model.get("application").Ai("Model3DPointer");this.Ug=this.enabled=!1;this.Wa()}v.prototype.update=function(){this.uQ();f.YE(this.cb,this.yna.We,this.yna.We,this.model.get("surfaceSelectionEnabled")&&
(this.vhb||this.xhb||this.whb)?void 0:this.distance);f.A$(this.cb,!this.Ug||!this.enabled)};v.prototype.Ra=function(w){this.enabled!==w&&(this.enabled=w,w=this.Fk.O(c.zc,!0))&&(w.enabled=this.enabled)};v.prototype.nra=function(w){this.Ug!==w&&(this.Ug=w,w=this.Fk.O(c.zc,!0))&&(w.Ug=this.Ug)};v.prototype.dispose=function(){this.ya()};v.prototype.Wa=function(){this.yna=new u(this.Jt);this.xp=new b;this.xp.VQa(this.yna);this.Fi=new e;this.pe=new e;this.Fk=this.Ea.T.sc("Pointer");var w=this.Fk.O(c.zc,
!0);w.ona=!0;w.matrixWorld=new h.Matrix4;w.Ea=this.Ea;w.WD=this.Fi;w.d7=this.xp;w.M=this.pe;w.enabled=this.enabled;f.M.bind(g.Cu,this.lY,this,!0);f.M.bind(g.TB,this.mY,this,!0);f.M.bind(g.Xf,this.kY,this,!0);this.pe.bind(g.Sa,this.$h,this,!0);this.pe.bind(g.$a,this.lf,this,!0);this.pe.bind(g.ma,this.jY,this,!0);this.pe.bind(g.fi,this.EOa,this,!0);this.pe.bind(g.gb,this.Vj,this,!0);this.pe.bind(g.Eb,this.Tn,this,!0)};v.prototype.ya=function(){this.pe.h(g.Sa,this.$h,this);this.pe.h(g.$a,this.lf,this);
this.pe.h(g.ma,this.jY,this);this.pe.h(g.fi,this.EOa,this);this.pe.h(g.gb,this.Vj,this);this.pe.h(g.Eb,this.Tn,this);this.Fk.T.dd(this.Fk);this.xp.dispose();f.M.h(g.Cu,this.lY,this);f.M.h(g.TB,this.mY,this);f.M.h(g.Xf,this.kY,this)};v.prototype.uQ=function(){var w=this.Fk.O(c.zc,!0);w.matrixWorld.copy(this.cb.matrixWorld);w.origin.copy(this.cb.ray.origin);w.direction.copy(this.cb.ray.direction);w.Qb.copy(this.cb.Qb);w.gx=this.cb.gx;this.DW(w,this.Jt);(this.cb.pressed||d.kf())&&this.Fi.o(g.gb)};v.prototype.DW=
function(w,x){t.origin.set(w.origin);t.direction.set(w.direction);t.applyMatrix4(w.matrixWorld);x.set("originX",w.origin.x);x.set("originY",w.origin.y);x.set("originZ",w.origin.z);x.set("directionX",w.direction.x);x.set("directionY",w.direction.y);x.set("directionZ",w.direction.z)};v.prototype.kY=function(w){w.data.pointerState===this.cb&&(w=Date.now()-this.dJ<300,this.dJ=Date.now(),this.Fi.o(g.ma),w&&this.Fi.o(g.fi))};v.prototype.lY=function(w){w.data.pointerState===this.cb&&(this.Fi.o(g.gb),this.nA=
Date.now(),this.Fi.o(g.Sa))};v.prototype.mY=function(w){w.data.pointerState===this.cb&&this.Fi.o(g.$a)};v.prototype.Vj=function(w){this.SY(w);this.sRa(w);this.Jt.o(this.LO(w))};v.prototype.$h=function(w){this.SY(w);this.sRa(w);this.Jt.o(this.LO(w))};v.prototype.lf=function(w){this.distance=void 0;this.Jt.o(this.LO(w))};v.prototype.jY=function(w){this.Jt.o(this.LO(w))};v.prototype.EOa=function(w){this.Jt.o(this.LO(w))};v.prototype.Tn=function(w){this.distance=void 0;this.Jt.o(this.LO(w))};v.prototype.SY=
function(w){w.data.position?(w=w.data.position,t.copy(this.cb.ray).applyMatrix4(this.cb.matrixWorld),this.distance=t.origin.distanceTo(r.set(w.x,w.y,w.z))):this.distance=void 0};v.prototype.sRa=function(w){this.xhb=w.data.type=="mesh";this.vhb=w.data.type=="bone";this.whb=w.data.type=="gs"};v.prototype.LO=function(w){var x=this.bdb(w);w.data&&w.data.position&&(w=this.Umb(r.set(w.data.position.x,w.data.position.y,w.data.position.z)),x.data=Object.assign({},x.data,{position:{x:w.x,y:w.y,z:w.z}}));return x};
v.prototype.bdb=function(w){var x=new k(w.name,w.data);x.source=w.source;return x};v.prototype.Umb=function(w){var x=this.Fn.getComponent(c.Object3D);return(x=x===null||x===void 0?void 0:x.sa)?x.worldToLocal(w):w};return v}(),r=new h.Vector3,t=new h.Ray,u=function(){function v(w){this.Jt=w}v.prototype.PLa=function(){return this.Jt};v.prototype.k$=function(w,x){this.We=x.indexOf(l.qf)>-1};return v}();return a});
define("tdv/player/view/model3d/renderer/adapters/pointer/MousePointerAdapter","require exports three.mod tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/model3d/renderer/adapters/cursor/InstanceCursorManager tdv/player/view/util/geo/Fov tdv/player/view/webgl/components".split(" "),function(a,m,h,n,g,k,e,b,c){var d=new h.Vector3(0,0,0),f=Math.PI/180,l=new h.Vector3;return function(){function p(q,r,t,u,v){this.renderer=q;this.ci=r;this.model=t;this.wb=
u;this.Ea=v;this.w7=this.w7.bind(this);this.ZA=this.ZA.bind(this);this.Yv=this.Yv.bind(this);this.eb=this.renderer.P;this.Rf=this.renderer.getParent();this.Lw=this.model.get("application").Ai("Model3DPointer");this.enabled=!0;this.Wa()}p.prototype.Ra=function(q){this.enabled=q;var r=this.Ea.O(c.zc);r&&(r.enabled=q)};p.prototype.dispose=function(){this.ya()};p.prototype.Wa=function(){this.Fi=new k;var q=this.Ea.N(c.zc);q.Ea=this.Ea;q.origin=d;q.direction=new h.Vector3;q.WD=this.Fi;q.M=this.Lw;this.xp=
new e;this.xp.au(this.Rf);q.d7=this.xp;q.enabled=this.enabled;n.ba(this.model,["camera.fov"],this.w7,!0);this.renderer.bind(g.$b,this.ZA,this,!0);this.Rf.rcb(g.Sa,this.UHa,this);this.Rf.bind(g.gb,this.Yv,this,!0);this.Rf.bind(g.$a,this.VHa,this,!0);this.Rf.bind(g.ma,this.SHa,this,!0);this.Rf.bind(g.fi,this.THa,this,!0);this.model.set("picker",this);this.model.set("pointer",this.Lw)};p.prototype.ya=function(){n.da(this.model,["camera.fov"],this.w7);this.renderer.h(g.$b,this.ZA,this);this.Rf.h(g.Sa,
this.UHa,this);this.Rf.h(g.gb,this.Yv,this);this.Rf.h(g.$a,this.VHa,this);this.Rf.h(g.ma,this.SHa,this);this.Rf.h(g.fi,this.THa,this);this.Ea.ka(c.zc);this.xp.dispose();this.model.set("picker",void 0);this.model.set("pointer",void 0)};p.prototype.ZA=function(){this.zsa()};p.prototype.w7=function(){this.zsa()};p.prototype.UHa=function(q){var r=q.clone();r.name=g.gb;this.Yv(r);this.Fi.o(q)};p.prototype.Yv=function(q){this.Yhb=q.x;this.Zhb=q.y;this.zsa();this.Fi.o(q)};p.prototype.VHa=function(q){this.Fi.o(q)};
p.prototype.SHa=function(q){this.Fi.o(q)};p.prototype.THa=function(q){this.Fi.o(q)};p.prototype.zsa=function(){var q=this.Ea.O(c.zc);this.wLa(this.Yhb,this.Zhb,q.direction);this.DW(q,this.Lw)};p.prototype.DW=function(q,r){r.set("originX",q.origin.x);r.set("originY",q.origin.y);r.set("originZ",q.origin.z);r.set("directionX",q.direction.x);r.set("directionY",q.direction.y);r.set("directionZ",q.direction.z)};p.prototype.wLa=function(q,r,t){var u;t=t||new h.Vector3;var v=((u=this.model.get("camera"))===
null||u===void 0?void 0:u.get("fov"))||90;u=this.eb.nb();var w=this.eb.Mb();q===void 0&&(q=u/2);r===void 0&&(r=w/2);t.set(q-u/2,w/2-r,-u/(Math.tan((u>w?v:b.zr(v,u,w))*f/2)*2)).normalize();return t};p.prototype.oqa=function(q,r){var t=this.Ea.getComponent(c.zc);if(t&&t.St)return t.St.oqa([this.wb],d,this.wLa(q,r,l))};return p}()});
define("tdv/player/view/model3d/renderer/adapters/pointer/PointerAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/model3d/renderer/adapters/pointer/FirstPersonPointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/GazePointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/XRPointerAdapter tdv/player/view/model3d/renderer/adapters/pointer/MousePointerAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c){return function(){function d(f,
l,p,q,r,t){this.renderer=f;this.ci=l;this.model=p;this.Fn=q;this.wb=r;this.Ea=t;this.enabled=!0;this.dA=this.dA.bind(this);this.Wa()}d.prototype.Ra=function(f){var l;this.enabled=f;(l=this.jJ)===null||l===void 0||l.Ra(this.enabled)};d.prototype.dispose=function(){this.ya()};d.prototype.Wa=function(){h.ba(this.model,"camera",this.dA,!1);c.M.bind(n.V,this.MTa,this,!0);this.Csa()};d.prototype.ya=function(){h.da(this.model,"camera",this.dA);c.M.h(n.V,this.MTa,this);this.eu("none");this.uSa()};d.prototype.dA=
function(){this.Csa()};d.prototype.MTa=function(){this.Csa()};d.prototype.Csa=function(){c.isPresenting?this.eu("xr"):this.model.get("camera").get("class")=="FirstPersonModel3DCamera"?this.Qlb():(this.uSa(),this.eu("mouse"))};d.prototype.Qlb=function(){this.aP||(this.aP=new g(this.renderer,this.ci,this.model,this.wb,this.Ea),this.aP.bind(n.V,this.qOa,this,!0),this.qOa())};d.prototype.uSa=function(){var f;this.aP&&((f=this.aP)===null||f===void 0||f.dispose(),this.aP=void 0)};d.prototype.qOa=function(){var f;
switch((f=this.aP)===null||f===void 0?void 0:f.getType()){case g.Lba:this.eu("gaze");break;default:this.eu("mouse")}};d.prototype.eu=function(f){var l;if(this.type!==f){this.jJ&&this.jJ.dispose();this.type=f;switch(this.type){case "mouse":this.jJ=new b(this.renderer,this.ci,this.model,this.wb,this.Ea);break;case "gaze":this.jJ=new k(this.renderer,this.ci,this.model,this.wb,this.Ea);break;case "xr":this.jJ=new e(this.renderer,this.ci,this.model,this.Fn,this.wb,this.Ea);break;default:this.jJ=void 0}(l=
this.jJ)===null||l===void 0||l.Ra(this.enabled)}};return d}()});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/AmbientOcclusionPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function m(k,e){this.Pc=k;this.ee=e;this.ha=!1;this.$i=this.$i.bind(this);h.ba(this.Pc,g,this.$i,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");m.prototype.$i=function(){var k=this.Pc.get("enabled")&&!this.Pc.get("disabled");this.ha!=k&&(this.ha&&this.ee.ka(n.MK),(this.ha=
k)&&this.ee.N(n.MK));this.ha&&(k=this.ee.O(n.MK),k.lKa=this.Pc.get("easingDuration"),k.bias=this.Pc.get("bias"),k.intensity=this.Pc.get("intensity"),k.scale=this.Pc.get("scale"),k.gNa=this.Pc.get("kernelRadius"),k.INa=this.Pc.get("minResolution"),k.cna=this.Pc.get("blurRadius"),k.output=this.Pc.get("output")=="ao"?THREE.SAOPass.OUTPUT.SAO:THREE.SAOPass.OUTPUT.Default)};m.prototype.dispose=function(){this.ee.ka(n.MK);this.ee=null;h.da(this.Pc,g,this.$i)};var g="disabled enabled bias easingDuration intensity scale kernelRadius minResolution blurRadius output".split(" ");
return m});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/AntialiasPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function m(k,e){this.Pc=k;this.ee=e;this.ha=!1;this.$i=this.$i.bind(this);h.ba(this.Pc,g,this.$i,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");m.prototype.$i=function(){var k=this.Pc.get("enabled")&&!this.Pc.get("disabled");this.ha!=k&&(this.ha&&this.ee.ka(n.pF),(this.ha=k)&&this.ee.N(n.pF));
this.ha&&(k=this.ee.O(n.pF),k.RKa=this.Pc.get("mode")=="fxaa",k.fSa=this.Pc.get("mode")=="ssaa",k.tZ=this.Pc.get("ssaaSampleLevel"))};m.prototype.dispose=function(){this.ee.ka(n.pF);this.ee=null;h.da(this.Pc,g,this.$i)};var g=["disabled","enabled","mode","ssaaSampleLevel"];return m});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/MotionBlurPostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function m(k,e){this.Pc=k;this.ee=e;this.ha=!1;this.$i=this.$i.bind(this);h.ba(this.Pc,g,this.$i,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");m.prototype.$i=function(){var k=this.Pc.get("enabled")&&!this.Pc.get("disabled");this.ha!=k&&(this.ha&&this.ee.ka(n.PQ),(this.ha=k)&&this.ee.N(n.PQ));
this.ha&&(k=this.ee.O(n.PQ),k.vQa=this.Pc.get("samples"),k.intensity=this.Pc.get("intensity"))};m.prototype.dispose=function(){this.ee.ka(n.PQ);this.ee=null;h.da(this.Pc,g,this.$i)};var g=["disabled","enabled","samples","intensity"];return m});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/VignettePostprocessingAdapter",["require","tdv/binding/BindingsHandler","tdv/player/view/webgl/components"],function(a){function m(k,e){this.Pc=k;this.ee=e;this.$i=this.$i.bind(this);h.ba(this.Pc,g,this.$i,!0)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/player/view/webgl/components");m.prototype.$i=function(){var k=this.Pc.get("enabled")&&!this.Pc.get("disabled");this.ha!=k&&(this.ha&&this.ee.ka(n.mL),(this.ha=k)&&this.ee.N(n.mL));
this.ha&&(k=this.ee.O(n.mL),k.HMa=this.Pc.get("innerRadius"),k.kPa=this.Pc.get("outerRadius"),k.color=this.Pc.get("color"),k.opacity=this.Pc.get("opacity"))};m.prototype.dispose=function(){this.ee.ka(n.mL);this.ee=null;h.da(this.Pc,g,this.$i)};var g="enabled disabled opacity color innerRadius outerRadius".split(" ");return m});
define("tdv/player/view/model3d/renderer/adapters/postprocessing/PostprocessingArrayAdapter","require exports tdv/player/view/model3d/renderer/adapters/ArrayAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/AmbientOcclusionPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/AntialiasPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/MotionBlurPostprocessingAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/VignettePostprocessingAdapter tdv/player/parser/ClassInfo".split(" "),function(a,
m,h,n,g,k,e,b){return function(){function c(d,f){this.model=d;this.Od=f;this.filter=this.filter.bind(this);this.fe=this.fe.bind(this);this.Xg=this.Xg.bind(this);this.wY=new h;this.wY.filter=this.filter;this.wY.fe=this.fe;this.wY.Xg=this.Xg;this.wY.jB(this.model,"postprocessing")}c.prototype.filter=function(d){return b.Oa("AmbientOcclusionModel3DPostprocessing",d)||b.Oa("AntialiasModel3DPostprocessing",d)||b.Oa("MotionBlurModel3DPostprocessing",d)||b.Oa("VignetteModel3DPostprocessing",d)};c.prototype.fe=
function(d){return b.Oa("AmbientOcclusionModel3DPostprocessing",d)?new n(d,this.Od):b.Oa("AntialiasModel3DPostprocessing",d)?new g(d,this.Od):b.Oa("MotionBlurModel3DPostprocessing",d)?new k(d,this.Od):b.Oa("VignetteModel3DPostprocessing",d)?new e(d,this.Od):null};c.prototype.Xg=function(d,f){f.dispose()};c.prototype.dispose=function(){this.wY.dispose()};return c}()});
define("tdv/player/view/util/ScreenFrameRateMonitor",["require","exports"],function(){var a=function(){function m(){}m.init=function(){for(var h=0;h<=m.Qba;h++)m.coa.push(0);window.requestAnimationFrame(m.Bp)};m.hLa=function(){return m.frameRate};m.Bp=function(h){m.LJ!==0&&(m.coa[Math.min(Math.round(1E3/(h-m.LJ)),m.Qba)]++,m.$P++);m.LJ=h;m.$P<m.gVa?window.requestAnimationFrame(m.Bp):m.ucb()};m.ucb=function(){for(var h=0,n=0,g=30;g<=m.Qba;g+=10){for(var k=0,e=-5;e<=5;e++)k+=m.coa[g+e];k>h&&(h=k,n=
g)}m.frameRate=n};m.Qba=200;m.gVa=60;m.coa=[];m.LJ=0;m.$P=0;m.frameRate=60;return m}();a.init();return a});
define("tdv/player/view/model3d/renderer/adapters/ScenePixelRatioAdapter","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/util/Flags tdv/player/view/webgl/components tdv/player/view/util/ScreenFrameRateMonitor".split(" "),function(a,m,h,n,g,k,e,b){a=function(){function f(l,p){this.tE=this.enabled=!1;this.XNa=this.YNa=0;this.model=l;this.Od=p;this.gsa=this.gsa.bind(this);this.c9=this.c9.bind(this);this.v9=this.v9.bind(this);h.ba(this.model,
"pixelRatioMinScale",this.v9,!0)}f.prototype.dispose=function(){this.disable();h.da(this.model,"pixelRatioMinScale",this.v9)};f.prototype.v9=function(){this.disable();this.model.get("pixelRatioMinScale")<1&&this.enable()};f.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Gp(!1),this.QP.h(n.V,this.LOa,this),h.da(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.c9),this.QP.dispose())};f.prototype.enable=function(){this.enabled||
(this.enabled=!0,this.QP=new c(this.model.get("pixelRatioMinScale")),this.QP.bind(n.V,this.LOa,this,!0),h.ba(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.c9,!0))};f.prototype.c9=function(){this.YNa=Date.now();this.Gp(!0)};f.prototype.gsa=function(){Date.now()-this.YNa>f.dua&&this.Gp(!1)};f.prototype.Gp=function(l){this.tE!==l&&((this.tE=l)?(this.XNa=window.setInterval(this.gsa,f.dua),this.QP.enable()):(window.clearInterval(this.XNa),this.QP.disable()),
this.tTa())};f.prototype.LOa=function(){this.tTa()};f.prototype.tTa=function(){var l=this.tE&&this.enabled?this.QP.xA():1;this.Od.getComponent(e.Scene).M9!=l&&(this.Od.O(e.Scene).M9=l)};f.dua=100;return f}();var c=function(f){function l(p){var q=f.call(this)||this;q.OE=[];q.AP=0;q.Bp=q.Bp.bind(q);q.kcb(p);q.reset();return q}P(l,f);l.prototype.kcb=function(p){for(var q=1;q>p;q-=.1)this.OE.push(q);Math.abs(p-this.OE[this.OE.length-1])>d&&this.OE.push(p);k.uu&&console.log("steps = ["+this.OE.map(function(r){return r.toFixed(2)}).join(", ")+
"]")};l.prototype.reset=function(){this.disable();this.LJ=0;this.iK=.5;this.ppa=0;this.scale=this.OE.length*.5;this.Tqa=Math.floor(this.scale);this.iJa();this.enable()};l.prototype.enable=function(){!this.AP&&this.iK>l.Hta&&(this.AP=window.requestAnimationFrame(this.Bp))};l.prototype.disable=function(){this.AP&&(window.cancelAnimationFrame(this.AP),this.AP=0)};l.prototype.xA=function(){return this.OE[this.Tqa]};l.prototype.dispose=function(){this.disable()};l.prototype.Bp=function(p){this.LJ!==0&&
(this.znb(p-this.LJ),this.Knb());this.LJ=p;this.AP=this.iK>l.Hta?window.requestAnimationFrame(this.Bp):0};l.prototype.znb=function(p){for(this.gX.push(p);this.gX.length>l.PUa;)this.gX.shift(),this.aJ=this.gX.reduce(function(q,r){return q+r},0)/this.gX.length};l.prototype.iJa=function(){this.gX=[];this.aJ=void 0};l.prototype.Knb=function(){if(this.aJ!==void 0){var p=1E3/b.hLa(),q=p*l.kVa;p=Math.max(1E3/l.lVa,p*l.eVa);if(this.aJ<=p)var r=-1;else if(this.aJ>q)r=1;else{k.uu&&console.log("["+q.toFixed(2)+
" > "+this.aJ.toFixed(2)+" > "+p.toFixed(2)+"]");return}this.ppa&&this.ppa!==r&&(this.iK*=l.QVa);this.ppa=r;this.scale=Math.min(Math.max(this.scale+r*this.iK,0),this.OE.length-1);r==1?k.uu&&console.log("["+this.aJ.toFixed(2)+" > "+q.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.iK).toFixed(2)+")"):r==-1&&k.uu&&console.log("["+this.aJ.toFixed(2)+" <= "+p.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.iK).toFixed(2)+")");q=Math.round(this.scale);this.Tqa!==q&&(this.iJa(),this.Tqa=q,this.o(n.V))}};
l.kVa=1.5;l.eVa=1.1;l.PUa=15;l.QVa=.75;l.Hta=.01;l.lVa=60;return l}(g),d=1E-6;return a});
define("tdv/player/view/model3d/renderer/adapters/SceneAdapter","require exports tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/webgl/system/util/entity/Util tdv/player/view/model3d/renderer/adapters/CameraAdapter tdv/player/view/model3d/renderer/adapters/lights/LightsAdapter tdv/player/view/model3d/renderer/adapters/ModelAdapter tdv/player/view/model3d/renderer/adapters/MenuAdapter tdv/player/view/model3d/renderer/adapters/ToolTipAdapter tdv/player/view/model3d/renderer/adapters/SurfaceSelectorPointerAdapter tdv/player/view/model3d/renderer/adapters/objects/NearestObjectsVisibleAdapter tdv/player/view/model3d/renderer/adapters/objects/objects tdv/player/view/model3d/renderer/adapters/pointer/PointerAdapter tdv/player/view/model3d/renderer/adapters/postprocessing/PostprocessingArrayAdapter tdv/player/view/model3d/renderer/adapters/ScenePixelRatioAdapter tdv/player/view/util/XR".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u){var v=function(x){return x.map(function(y){return String.fromCharCode(y)}).join("")}([119,97,116,101,114,109,97,114,107]),w="anisotropicFilteringLevel bakedTextures environmentURL backgroundImageURL backgroundPanoramaURL backgroundColor fogColor fogDensity opacity encoding environmentIntensity".split(" ");p.jB();return function(){function x(y,z,A){var D=this;this.renderer=y;this.ci=z;this.model=A;this.eb=this.renderer.P;this.enabled=!0;this.nj=!1;this.model.Pqa();
this.Od=this.ci.sc("Scene");y=this.Od.N(n.Scene);y.Wna=this.model.P7().sO(this.model.T7().gw(.1),.1);y.M=this.model;y.locked=!0;this.Fn=this.ci.sc("Anchor");this.Fn.N(n.nF);this.Fn.N(n.Group);this.Fn.N(n.pb).F=this.Od;this.LNa=new b(this.model,this.model,this.Fn,this.renderer);this.wb=this.LNa.mj();y.Ea=this.Ea=this.ci.sc("PerspectiveCamera");this.Ea.N(n.pb).F=this.Fn;this.O6=new k(this.renderer,this.model,this.wb,this.Ea);this.O6.Uw(!0);this.Thb=new c(this.model,this.wb,this.Ea);this.Zjb=new t(this.model,
this.Od);this.Ohb=new e(this.model,this.wb,this.Fn,this.Ea);this.BPa=new q(this.renderer,this.ci,this.model,this.Fn,this.wb,this.Ea);w.forEach(function(F){D.model.bind(h.L(F),D.bqa,D,!0)});this.ijb=new r(this.model,this.Od);this.ci.bIa(this.Od);this.aib=new l(this.model,this.wb,this.Ea);this.ymb=new f(this.model,this.wb,this.renderer);this.Tmb=new d(this.renderer,this.model);u.M.bind(h.V,this.Ta,this,!0);this.bqa();this.Ta()}x.prototype.Uw=function(y){this.Od.O(n.Scene).locked=y;this.O6.Uw(y)};x.prototype.Ra=
function(y){this.enabled!==y&&(this.enabled=y,this.hx())};x.prototype.Ta=function(){this.nj=u.Ag==this.eb.Rc().Kn();this.hx()};x.prototype.hx=function(){var y=(this.model.get("camera").get("xrEnabled")||this.model.get("camera").get("vrEnabled"))&&!(this.model.get("application")&&this.model.get("application").get(v));y=this.enabled&&(!this.nj||y);this.Od.O(n.Scene).enabled=y;this.BPa.Ra(y);this.O6.Ra(y)};x.prototype.dispose=function(){w.forEach(function(y){this.model.h(h.L(y),this.bqa,this)}.bind(this));
this.model.h(h.L("camera"),this.b9,this);u.M.h(h.V,this.Ta,this);this.Zjb.dispose();this.Thb.dispose();this.LNa.dispose();this.O6.dispose();this.Ohb.dispose();this.BPa.dispose();this.ijb.dispose();this.ymb.dispose();this.aib.dispose();this.Tmb.dispose();this.ci.Fjb(this.Od);this.ci.dd(this.Od);this.ci.dd(this.Fn);this.ci.dd(this.Ea)};x.prototype.Hfb=function(){return this.wb?g.uJ(this.wb):void 0};x.prototype.bqa=function(){var y=this.Od.O(n.Scene);y.opacity=this.model.get("opacity");y.uKa=this.model.get("environmentURL");
y.Xma=this.model.get("backgroundImageURL");y.FIa=this.model.get("backgroundPanoramaURL");y.backgroundColor=this.model.get("backgroundColor");y.outputColorSpace=this.model.get("encoding");y.NKa=this.model.get("fogColor");y.OKa=this.model.get("fogDensity");y.environmentIntensity=this.model.get("environmentIntensity");y=this.model.get("anisotropicFilteringLevel");var z=this.model.get("bakedTextures");if(y!=0||z){var A=this.Od.O(n.gi,!0);A.xW=y;A.EW=z}else this.Od.ka(n.gi)};return x}()});
define("tdv/player/view/model3d/renderer/Renderer","require tdv/utils tdv/player/view/webgl/components tdv/player/view/webgl/Renderer tdv/player/view/model3d/renderer/adapters/SceneAdapter tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/containers/Container".split(" "),function(a){var m=a("tdv/utils");a("tdv/player/view/webgl/components");var h=a("tdv/player/view/webgl/Renderer"),n=a("tdv/player/view/model3d/renderer/adapters/SceneAdapter"),g=a("tdv/view/constants/Cursor"),k=a("tdv/view/constants/LayoutMode"),
e=a("tdv/view/containers/Container");a=m.extend(e,function(b,c,d){e.call(this);this.Ie=b;this.P=c;this.mT=d;this.gf("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",g.LB);this.set("layout",k.RZ);this.hf=null;this.ha=!0;this.FH=[];this.CN=new Map});a.prototype.Kb=function(){e.prototype.Kb.call(this);this.hf==null&&(this.hf=new h(this.Ie,this.P,!0),this.hf.xa({left:0,top:0,right:0,bottom:0,cursor:g.LB,toolTipDisabled:!0}),this.hf.Ra(this.ha),this.mb(this.hf),this.FH.forEach(this.jFa.bind(this)))};
a.prototype.Ra=function(b){this.ha!==b&&(this.ha=b,this.hf&&this.hf.Ra(this.ha),this.set("interactionEnabled",this.ha))};a.prototype.Qa=function(){this.hf&&this.hf.Qa()};a.prototype.zgb=function(b){return this.FH.indexOf(b)>=0};a.prototype.$Ha=function(b){this.FH.indexOf(b)>=0||(this.FH.push(b),this.hf&&this.jFa(b))};a.prototype.kQa=function(b){var c=this.FH.indexOf(b);c<0||(this.FH.splice(c,1),this.hf&&this.TFa(b),this.FH.length===0&&this.Ra(!0))};a.prototype.rra=function(b,c){(b=this.CN.get(b))&&
b.Uw(c)};a.prototype.oRa=function(b,c){(b=this.CN.get(b))&&b.Ra(c)};a.prototype.pX=function(b){return(b=this.CN.get(b))?b.Hfb():void 0};a.prototype.hK=function(){return this.hf&&this.hf.hK()};a.prototype.ina=function(){return this.hf&&this.hf.ina()};a.prototype.jFa=function(b){this.TFa(b);this.CN.set(b,new n(this,this.hf,b))};a.prototype.TFa=function(b){var c=this.CN.get(b);c&&(this.CN["delete"](b),c.dispose())};return a});
define("tdv/player/script/Model3DPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/view/model3d/controller/Controller tdv/player/view/model3d/renderer/Renderer tdv/view/constants/ButtonMode".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/helper/ButtonProperty"),
e=a("tdv/player/script/PlaybackMediaPlayer"),b=a("tdv/player/view/model3d/controller/Controller"),c=a("tdv/player/view/model3d/renderer/Renderer"),d=a("tdv/view/constants/ButtonMode"),f=g.define("Model3DPlayer",e,function(){e.call(this,"model");this.gs=this.P2=this.ij=!1;this.U=this.j=null;this.ac=this.vf=0;this.be=m.mr(this.Sh,this);this.vda=new k(this,"buttonToggleSprites",d.ak);this.vda.bind(h.Rk,function(){this.set("spritesEnabled",!0)},this);this.vda.bind(h.Lm,function(){this.set("spritesEnabled",
!1)},this);this.vda.set("pressed",this.get("spritesEnabled"))});f.prototype.play=function(){this.VH()};f.prototype.pause=function(){this.UH()};f.prototype.stop=function(){this.cD()};f.prototype.restart=function(){this.bD()};f.prototype.getModelPixelScale=function(){return this.X1a()};f.prototype.captureToDataURL=function(){return this.j&&this.j.ina()};f.prototype.saveScreenshot=function(){return this.j&&this.j.hK()};f.prototype.set=function(l,p){if(this.get(l)!=p){switch(l){case "model":this.P2=!0;
this.set("requesterPlayer",null);this.be();break;case "viewerArea":this.ij=!0;this.be();break;case "displayPlaybackBar":this.gs=!0,this.be()}e.prototype.set.call(this,l,p)}};f.prototype.get=function(l,p){switch(l){case "currentTime":return this.U&&this.U.getTime()||0}return e.prototype.get.call(this,l,p)};f.prototype.Sh=function(){this.ij&&(this.ij=!1,this.ny(),this.get("viewerArea")&&this.my(),this.lV(this.get("viewerArea")),this.P2=!0);var l=!1;if(this.j&&(this.P2||this.s5)){var p=this.get("model");
if(p&&!this.j.Vb()){this.be();return}this.P2=!1;this.ac=this.vf=0;l=!0;p?(this.fK(this.get("requesterPlayer")?[this.get("requesterPlayer"),this]:[this]),this.U.$kb(p)):this.U.bB()}this.gs&&(this.gs=!1,l=!0);l&&this.Zz()};f.prototype.SN=function(){this.set("model",null)};f.prototype.my=function(){var l=this.get("application"),p=this.get("viewerArea");this.j=new c(l,p,this);this.j.xa({left:0,top:0,bottom:0,right:0});p.mb(this.j);this.U=new b(p,this.j);this.U.bind(b.zF,this.jn,this);this.U.bind(b.yF,
this.YC,this);this.U.bind(b.AF,this.TT,this);this.U.bind(b.rba,this.gCa,this,!0);this.U.bind(b.gd,this.Mf,this);this.xD(!0)};f.prototype.ny=function(){this.j&&(this.U.h(b.zF,this.jn,this),this.U.h(b.yF,this.YC,this),this.U.h(b.AF,this.TT,this),this.U.h(b.rba,this.gCa,this,!0),this.U.h(b.gd,this.Mf,this),this.U.clear(),this.j.getParent().removeChild(this.j),this.j=null,this.xD(!1))};f.prototype.Mf=function(l){this.Jd(l.data.state)};f.prototype.jn=function(l){var p=this.get("viewerArea");this.ve=p&&
p.ve;this.kT(l.data.model);this.Zz()};f.prototype.TT=function(l){this.o(new n(f.AUa,{model:l.data.model}))};f.prototype.YC=function(l){this.ve=null;this.jT(l.data.model)};f.prototype.gCa=function(l){this.vf=l.data.time;this.ac=l.data.duration;this.Zz()};f.prototype.jna=function(){var l=this.get("model");return(l=(l=l&&l.get("camera"))&&l.get("doubleClickAction"))&&l!="none"?!0:!1};f.prototype.AU=function(l){this.qI(l.data.position)};f.prototype.sn=function(){this.U&&this.U.play()};f.prototype.Ys=
function(){this.U&&this.U.stop()};f.prototype.sv=function(){this.U&&this.U.pause()};f.prototype.qI=function(l){this.U&&this.U.setTime(l)};f.prototype.X1a=function(){return this.U&&this.U.pX()};f.prototype.Zz=function(){if(this.j){var l=this.j.getParent();this.ac>0&&this.get("displayPlaybackBar")?l.xa({playbackBarPosition:this.vf,playbackBarDuration:this.ac,playbackBarVisible:!0}):l.set("playbackBarVisible",!1)}};f.AUa="preloadMediaShow";return f});
define("tdv/player/script/Model3DPlayListItem","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/MediaPlayer tdv/player/script/PlayListItem".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/MediaPlayer"),k=a("tdv/player/script/PlayListItem");a=n.define("Model3DPlayListItem",k,function(){k.call(this)});a.prototype.start=function(){k.prototype.start.call(this);
var e=this.get("player");e&&(e.bind(g.di,this.jn,this),e.get("model")==this.get("media")&&this.get("media").get("isLoaded")?this.jn():e.set("model",this.get("media")))};a.prototype.stop=function(){var e=this.get("player");e&&(e.h(g.di,this.jn,this),e.get("model")==this.get("media")&&e.set("model",null));k.prototype.stop.call(this)};a.prototype.jn=function(e){e&&e.data.media!=this.get("media")||(this.get("player").h(g.di,this.jn,this),this.get("player").bind(g.oo,this.YC,this),this.nbb())};a.prototype.nbb=
function(){var e=this.get("media").get("camera").get("sequences",[]).find(function(b){return b.get("internal")&&b.get("state")==h.PLAYING});e?e.bind(m.Tb,this.VCa,this,!0):this.PD()};a.prototype.VCa=function(e){e.source.h(m.Tb,this.VCa,this,!0);this.PD()};a.prototype.YC=function(e){e.data.media==this.get("media")&&(this.get("player").h(g.oo,this.YC,this),this.stop(),this.end())};return a});
define("tdv/player/script/Model3DPointer",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Model3DPointer",m,function(){m.call(this)})});define("tdv/player/script/Menu",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Menu",m,function(){m.call(this)})});
define("tdv/player/script/MenuItem",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("MenuItem",m,function(){m.call(this)})});
define("tdv/player/script/MotionBlurModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DPostprocessing");return m.define("MotionBlurModel3DPostprocessing",h,function(){h.call(this)})});
define("tdv/player/script/PhotoCamera",["require","exports","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(h);n.create("PhotoCamera",a);return a});define("tdv/player/script/MovementPhotoCamera",["require","exports","tdv/player/script/PhotoCamera","tdv/player/parser/ClassInfo"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(h);n.create("MovementPhotoCamera",a);return a});
define("tdv/player/constants/RotationMode",["require"],function(){var a={uF:"drag_acceleration",tx:"drag_rotation"};a.Kta=a.uF;a.Eua=a.tx;return a});define("tdv/player/view/panorama/control/events/RotationChangeEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event");return m.extend(h,function(n){h.call(this,n);this.PP=this.zQ=this.TA=this.tB=0})});
define("tdv/player/view/panorama/control/events/ZoomChangeEvent",["require","tdv/utils","tdv/events/Event"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event");return m.extend(h,function(n){h.call(this,n);this.Koa=this.Mgb=0})});
define("tdv/player/view/panorama/control/camera/MouseManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/constants/RotationMode tdv/player/view/panorama/control/events/RotationChangeEvent tdv/player/view/panorama/control/events/ZoomChangeEvent".split(" "),function(a){function m(q,r){return q*r}function h(q,r){var t=r>0?1:-1;return t*(Math.pow(q,t*r)-1)/(q-1)}function n(q,r){return Math.min(Math.max(q/r,-1),1)}var g=
a("tdv/utils"),k=a("tdv/constants/EventName"),e=a("tdv/events/Event"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/util/Device"),d=a("tdv/player/constants/RotationMode"),f=a("tdv/player/view/panorama/control/events/RotationChangeEvent"),l=a("tdv/player/view/panorama/control/events/ZoomChangeEvent"),p=g.extend(b,function(){b.call(this);this.sAa=this.tAa=1800;this.t4a=this.x$a=0;this.NS=!1;this.Gq=void 0;this.GH=d.Kta;this.gGa=d.Eua;this.TR=0;this.L4=void 0;this.Tq=!1;this.DL=null;this.hH=
3;this.kb=90;this.Oea=this.vI=this.ne=1;this.ve=this.Ab=null;this.zU=!1});p.prototype.setCamera=function(q){this.tAa=q.get("manualRotationSpeed");this.sAa=q.get("manualRotationSpeed");this.hH=q.get("manualZoomSpeed");this.Oea=q.get("draggingFactor")};p.prototype.UE=function(q){this.GH=q;this.cma()};p.prototype.tK=function(q){this.gGa=q;this.cma()};p.prototype.mK=function(q){this.kb=q;this.vI=this.kb/90};p.prototype.au=function(q){this.In();if(q){this.Ab=q;if(this.ve=q.rfb&&q.ve)this.ve.bind(k.Sa,
this.wDa,this,!0),this.ve.bind(k.$a,this.xDa,this,!0);this.Ab.bind(k.Sa,this.te,this,!0);this.Ab.bind(k.gb,this.bl,this,!0);this.Ab.bind(k.$a,this.cl,this,!0);this.Ab.bind(k.Qk,this.HH,this,!0);this.Ab.Vb().get("settings").get(TDV.PlayerSettings.IVa)!==!1&&this.Ab.bind(k.YK,this.$G,this,!0);this.Ab.bind(k.HB,this.nya,this,!0);this.Ab.bind(k.XK,this.lya,this,!0);this.cma()}};p.prototype.In=function(){this.Ab!=null&&(this.ve&&(this.ve.h(k.Sa,this.wDa,this),this.ve.h(k.$a,this.xDa,this),this.ve=null),
this.Ab.h(k.Sa,this.te,this),this.Ab.h(k.gb,this.bl,this),this.Ab.h(k.$a,this.cl,this),this.Ab.h(k.Qk,this.HH,this),this.Ab.h(k.YK,this.$G,this),this.Ab.h(k.HB,this.nya,this),this.Ab.h(k.XK,this.lya,this),this.Ab=null,this.Y0())};p.prototype.cma=function(){this.Ab&&(c.Jp()?(this.L4=this.gGa,this.TR=this.x$a):(this.L4=this.GH,this.TR=this.t4a))};p.prototype.wDa=function(){this.zU=!0};p.prototype.xDa=function(){this.zU=!1};p.prototype.te=function(q){this.zU||(this.R9a(q),this.Qka())};p.prototype.bl=
function(q){this.zU||this.cO(q)};p.prototype.cl=function(){this.zU||(this.cfa(),this.Y0())};p.prototype.HH=function(q){this.mma(q);this.Qka(500)};p.prototype.nya=function(){this.Qka()};p.prototype.$G=function(q){this.nma(q)};p.prototype.lya=function(){this.Y0()};p.prototype.R9a=function(q){this.NS=!0;this.Gq=q;this.cO(q)};p.prototype.cO=function(q){if(this.NS)switch(this.L4){case d.uF:this.Vab(q);break;case d.tx:this.Uab(q)}};p.prototype.Vab=function(q){var r=this.gHa,t=q.x-this.Gq.x;t=+m(h(10,n(Math.abs(t)<
3?0:t,this.Ab.nb())),this.tAa*this.vI);q=q.y-this.Gq.y;r.call(this,t,-m(h(10,n(Math.abs(q)<3?0:q,this.Ab.Mb())),this.sAa*this.vI))};p.prototype.Uab=function(q){this.bma(-m(n(q.x-this.Gq.x,this.Ab.nb()),this.kb*this.Oea),+m(n(q.y-this.Gq.y,this.Ab.nb()),this.kb*this.Oea));this.Gq=q};p.prototype.cfa=function(){if(this.NS)switch(this.NS=!1,this.L4){case d.uF:this.gHa(0,0)}};p.prototype.gHa=function(q,r){var t=new f(p.xx);t.tB=q;t.TA=r;this.o(t)};p.prototype.bma=function(q,r){var t=new f(p.xx);t.zQ=q;
t.PP=r;this.o(t)};p.prototype.nma=function(q){if(this.ne!=q.scale){this.cfa();var r=this.ne;this.ne=q.scale;q=new l(p.Ir);q.Koa=this.kb*r/this.ne-this.kb;this.o(q)}};p.prototype.mma=function(q){if(q.delta!=0){this.cfa();var r=new l(p.Ir);r.Koa=this.kb*-q.delta*this.hH/100;this.o(r)}};p.prototype.Qka=function(q){var r=this.DL!=null;this.FFa();if(q&&(r||!this.Tq)){var t=this;this.DL=setTimeout(function(){t.DL=null;t.Y0()},q)}this.Tq||(this.Tq=!0,this.o(new e(p.$j)))};p.prototype.Y0=function(){this.FFa();
this.Tq&&(this.Tq=!1,this.o(new e(p.Zj)))};p.prototype.FFa=function(){this.DL!=null&&(clearTimeout(this.DL),this.DL=null)};p.xx="rotation change";p.Ir="zoom change";p.$j="user interaction start";p.Zj="user interaction end";return p});
define("tdv/player/view/panorama/control/camera/MovementManager",["require","tdv/player/view/util/Device"],function(a){function m(){this.wI=n.ub()?.066:.1;this.w4a=.5;this.C9a=n.ub()?.066:.1;this.Abb=.1;this.q5=this.x5=!1;this.reset()}function h(g,k,e){g=(k-g)*(1-e);Math.abs(g)<.01&&(g=0);return k-g}var n=a("tdv/player/view/util/Device");m.prototype.reset=function(){this.pxa=this.jea=this.XL=this.rC=this.LR=this.nea=this.mea=this.rea=this.tM=this.hH=this.G4=this.I4=this.Ls=this.yU=this.Vv=this.sW=
0};m.prototype.wra=function(g,k,e,b,c,d,f,l,p){return this.sW!=g||(this.yU=k)||this.I4!=e||b!=0||c!=0||this.q5!=f||this.LAa!=l||this.x5!=p?(this.sW=g,this.yU=k,this.I4=e,this.Vv+=b,this.Ls+=c,this.G4+=d,this.q5=f,this.LAa=l,this.x5=p,!0):!1};m.prototype.Wlb=function(g,k){return this.hH!=g||k!=0?(this.hH=g,this.tM+=k,!0):!1};m.prototype.Uf=function(){return this.rea!=0||this.mea!=0||this.nea!=0||this.LR!=0||this.sW!=0||this.yU!=0||this.I4!=0||this.hH!=0||this.Vv!=0||this.Ls!=0||this.tM!=0};m.prototype.Nb=
function(g){g=1E3/g;var k=this.rea/g,e=this.sW/g+this.Vv;this.Vv=0;var b=this.mea/g,c=this.yU/g+this.Ls;this.Ls=0;var d=this.nea/g,f=this.I4/g+this.G4;this.G4=0;var l=this.hH+this.tM*g;this.tM=0;var p=e==0&&c==0&&f==0,q=k==0&&b==0&&d==0;this.q5&&q&&!p||this.x5&&p&&!q||this.LAa&&!p&&!q?(p=p?this.wI:q?this.C9a:this.w4a,this.rC=h(k,e,p),this.XL=h(b,c,p),this.jea=h(d,f,p)):(this.rC=e,this.XL=c,this.jea=f);k=this.LR==0;e=l==0;this.LR=this.q5&&k&&!e||this.x5&&e&&!k?h(this.LR,l,this.Abb):l;this.rea=this.rC*
g;this.mea=this.XL*g;this.nea=this.jea*g;this.pxa=this.LR/g};return m});
define("tdv/player/view/object3d/Renderer","require tdv/utils tdv/view/core/UIComponent tdv/player/view/panorama/control/camera/MouseManager tdv/player/view/panorama/control/camera/MovementManager tdv/view/util/Animation tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/view/core/UIComponent"),n=a("tdv/player/view/panorama/control/camera/MouseManager"),g=a("tdv/player/view/panorama/control/camera/MovementManager"),k=a("tdv/view/util/Animation"),e=a("tdv/constants/EventName");
a=m.extend(h,function(){h.call(this);this.gf("Renderer");this.ja=document.createElement("canvas");this.ja.style.position="absolute";this.ja.style.left="0";this.ja.style.top="0";this.wa().tk(this.ja);this.JC=null;this.Ga=this.wM=this.uM=this.vM=0;this.Zl=!1;this.t6a=150;this.zS=0;this.Po=null;this.bind(e.$b,this.kd,this,!0);this.Hb=new n;this.Hb.jqb(720);this.Hb.UY(0);this.Hb.UE("drag_rotation");this.Hb.mK(360);this.Hb.bind(n.xx,this.D5a,this);this.Bc=new g});a.prototype.Hkb=function(b,c,d){this.JC=
b;this.vM=c;this.uM=d;this.wM=Math.floor(this.JC.length*this.Ga/360);this.Yja();this.Hb.au(this);this.bb()};a.prototype.Qcb=function(){this.JC=null;this.Lv();this.Yja();this.Hb.In()};a.prototype.play=function(){this.Zl=!0;this.bb()};a.prototype.D5a=function(b){this.Lv();this.Bc.wra(b.tB,b.TA,0,b.zQ,b.PP,0,!1,!0);this.bb()};a.prototype.pia=function(){this.play()};a.prototype.sq=function(b){this.JC&&(this.Bc.Uf()?(this.Zl=!1,this.Bc.Nb(b),this.Gva(this.Bc.rC),this.bb()):this.Zl?(this.Gva(this.t6a*b/
1E3),this.bb()):this.AM()||this.yV())};a.prototype.rj=function(b){for(this.Ga=b;this.Ga<0;)this.Ga+=360;for(;this.Ga>=360;)this.Ga-=360;this.tab()};a.prototype.tab=function(){if(this.JC){var b=Math.floor(this.JC.length*this.Ga/360);this.wM!=b&&(this.wM=b,this.VDa())}};a.prototype.Gva=function(b){this.rj(this.Ga+b)};a.prototype.kd=function(){this.Yja()};a.prototype.Yja=function(){var b=this.ja;if(this.vM==0||this.uM==0)b.width=0,b.height=0;else{var c=this.Xh(),d=this.Wh();d*this.vM>c*this.uM?(b.width=
c,b.height=this.uM*c/this.vM):(b.height=d,b.width=this.vM*d/this.uM);b.style.left=Math.round((c-b.width)*.5)+"px";b.style.top=Math.round((d-b.height)*.5)+"px";this.VDa()}};a.prototype.VDa=function(){if(this.JC){var b=this.ja;b.getContext("2d").drawImage(this.JC[this.wM],0,0,this.vM,this.uM,0,0,b.width,b.height)}};a.prototype.AM=function(){return this.Po?!0:!1};a.prototype.yV=function(){this.Lv();if(this.zS>0){var b=this;this.Po=setTimeout(function(){b.Po=null;b.pia()},this.zS)}};a.prototype.Lv=function(){this.Po&&
(clearTimeout(this.Po),this.Po=null)};a.prototype.bb=function(){k.requestFrame(this.sq,this)};return a});
define("tdv/player/script/Object3D","require tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/LevelUtil tdv/player/view/ProgressBar tdv/player/view/object3d/Renderer tdv/view/containers/Container tdv/view/images/ImageLoader".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/constants/Priority"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/helper/LevelUtil"),e=a("tdv/player/view/ProgressBar"),
b=a("tdv/player/view/object3d/Renderer"),c=a("tdv/view/containers/Container"),d=a("tdv/view/images/ImageLoader");a=g.define("Object3D",c,function(){c.call(this);this.Sd=this.Xo=this.dj=this.j=null;this.bind(m.od,this.cp,this);this.bind(m.jd,this.ap,this)});a.prototype.Kb=function(){c.prototype.Kb.call(this);this.j||(this.j=new b,this.j.xa({left:0,top:0,right:0,bottom:0}),this.mb(this.j));this.dj||(this.dj=new e,this.dj.xa({left:0,bottom:0,right:0,height:20,visible:!1}),this.mb(this.dj))};a.prototype.cp=
function(){this.b4a()};a.prototype.ap=function(){this.Ys()};a.prototype.b4a=function(){this.dj.set("percent",0);this.dj.set("visible",!0);this.j.rj(this.get("yaw"));var f=this.get("frames",[]);this.Xo=[];this.Sd=[];for(var l=0;l<f.length;l++){var p=k.Et(f[l]);this.Xo.push(p);p=new d(h.Hm);p.bind(m.ia,this.RT,this);p.bind(m.$c,this.ST,this);this.Sd.push(p)}for(l=0;l<f.length;l++)this.Sd[l].load(this.Xo[l].get("url"))};a.prototype.RT=function(){var f=this.Sd.filter(function(l){return l.oj()});this.dj.set("percent",
100*f.length/this.Sd.length);f.length==this.Sd.length&&this.Pe()};a.prototype.ST=function(){};a.prototype.Pe=function(){this.dj.set("visible",!1);var f=this.Xo[0].get("width",this.Sd[0].fg()),l=this.Xo[0].get("height",this.Sd[0].wg()),p=this.Sd.map(function(q){return q.xg()});this.j.Hkb(p,f,l);this.o(new n(m.ia))};a.prototype.Ys=function(){this.Sd&&(this.dj.set("visible",!1),this.j.Qcb(),this.Sd=this.Sd.forEach(function(f){f.h(m.ia,this.RT,this);f.h(m.$c,this.ST,this);f.cancel()}),this.Xo=this.Sd=
null)};return a});define("tdv/player/script/RotationalCameraPosition",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RotationalCameraPosition",m,function(h,n,g){m.call(this);h!==void 0&&this.set("yaw",h);n!==void 0&&this.set("pitch",n);g!==void 0&&this.set("hfov",g)})});
define("tdv/player/script/PanoramaCameraPosition",["require","tdv/player/script/RotationalCameraPosition","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/RotationalCameraPosition");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraPosition",m,function(){m.apply(this,arguments)})});
define("tdv/player/script/PanoramaCamera",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaCameraPosition","tdv/player/script/RotationalCameraPosition"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/PanoramaCameraPosition"),g=a("tdv/player/script/RotationalCameraPosition"),k=h.define("RotationalCamera",m,function(){m.call(this);this.set("initialPosition",new g)});return h.define("PanoramaCamera",k,function(){k.call(this);
this.set("initialPosition",new n)})});define("tdv/player/script/RotationalCameraDisplayPosition",["require","tdv/player/script/RotationalCameraPosition","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/RotationalCameraPosition");return a("tdv/player/parser/ClassInfo").define("RotationalCameraDisplayPosition",m,function(){m.apply(this,arguments)})});
define("tdv/player/script/PanoramaCameraDisplayPosition",["require","tdv/player/script/RotationalCameraDisplayPosition","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/RotationalCameraDisplayPosition");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraDisplayPosition",m,function(){m.apply(this,arguments)})});
define("tdv/player/script/PanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaCameraMovement",m,function(){m.call(this)})});
define("tdv/player/script/RotationalCameraSequence",["require","tdv/binding/Bindable","tdv/events/Event","tdv/player/parser/ClassInfo","tdv/constants/EventName"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/constants/EventName");a=n.define("RotationalCameraSequence",m,function(){m.call(this)});a.prototype.play=a.prototype.play=function(){this.o(new h(g.Ex))};a.prototype.pause=a.prototype.pause=function(){this.o(new h(g.hL))};return a});
define("tdv/player/script/PanoramaCameraSequence",["require","tdv/player/parser/ClassInfo","tdv/player/script/RotationalCameraSequence"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/RotationalCameraSequence");return m.define("PanoramaCameraSequence",h,function(){h.call(this)})});
define("tdv/player/script/PanoramaMapLocation",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaMapLocation",m,function(){m.call(this)})});define("tdv/player/script/PanoramaModel3DLocation",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaModel3DLocation",m,function(){m.call(this)})});
define("tdv/player/script/PanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaOverlay",m,function(){m.call(this)})});
define("tdv/player/view/panorama/control/AudioController",["require","tdv/constants/PlaybackState","tdv/player/script/DirectionalPanoramaAudio","tdv/player/view/util/geo/Quaternion","tdv/player/view/util/geo/Vector"],function(a){function m(q){this.j=q;this.Ou=[];this.sd=this.rb=this.Ga=0}var h=a("tdv/constants/PlaybackState"),n=a("tdv/player/script/DirectionalPanoramaAudio"),g=a("tdv/player/view/util/geo/Quaternion"),k=a("tdv/player/view/util/geo/Vector");m.prototype.clear=function(){this.stop();
this.Ou=this.j=null};m.prototype.end=function(q){var r=[],t=[],u=this.aza(q);this.Ou.forEach(function(v){u.indexOf(v)<0?r.push(v):t.push(v)});r.forEach(function(v){v.qJ().Zc(h.ca)});this.Ou=t};m.prototype.start=function(q){this.end(q);this.Ou=this.aza(q);this.AGa();this.V4(h.PLAYING,!0)};m.prototype.play=function(){this.V4(h.PLAYING)};m.prototype.pause=function(){this.V4(h.Zb)};m.prototype.stop=function(){this.V4(h.ca)};m.prototype.ze=function(){this.Ga=this.j.Jc();this.rb=this.j.Ic();this.sd=this.j.yg();
this.AGa()};m.prototype.AGa=function(){this.Ou.forEach(q=>{var r=q.qJ();if(q instanceof n){c=k.zt(q.get("yaw",0)*e,q.get("pitch",0)*e,c);b=k.zt(this.Ga*e,this.rb*e,b);var t=Math.acos(b.dot(c)),u=q.get("maximumAngle",Infinity)*e;r.iB(1-Math.min(1,t/u));f.makeRotationFromEuler(p.set(q.get("pitch",0)*e,-q.get("yaw",0)*e,0,"YXZ"));f.multiply(l.makeTranslation(0,0,-1));r.Tw(f)}d=g.hX(this.Ga,this.rb,this.sd,d);f.makeRotationFromQuaternion(d);r.bu(f)})};m.prototype.aza=function(q){return q?q.get("audios",
[]):[]};m.prototype.V4=function(q,r){(r?this.Ou.slice().reverse():this.Ou).forEach(function(t){if(t.get("autoplay",!1)){t=t.qJ();var u=t.getState();q==h.PLAYING&&u!=h.PLAYING?t.Zc(h.PLAYING):q==h.Zb&&u==h.PLAYING?t.Zc(h.Zb):q==h.ca&&u!=h.ca&&t.Zc(h.ca)}})};var e=Math.PI/180,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Quaternion,f=new THREE.Matrix4,l=new THREE.Matrix4,p=new THREE.Euler;return m});
define("tdv/player/view/util/geo/Transformation",["require"],function(){function a(c){c%=n;c<0&&(c+=n);return e[c*g|0]}function m(c){c%=n;c<0&&(c+=n);return k[c*g|0]}function h(){this.identity()}h.prototype.identity=function(){this.m11=1;this.m21=this.m13=this.m12=0;this.m22=1;this.m32=this.m31=this.m23=0;this.m33=1;this.tz=this.Ii=this.Hi=0};h.prototype.clone=function(){var c=new h;c.m11=this.m11;c.m12=this.m12;c.m13=this.m13;c.m21=this.m21;c.m22=this.m22;c.m23=this.m23;c.m31=this.m31;c.m32=this.m32;
c.m33=this.m33;c.Hi=this.Hi;c.Ii=this.Ii;c.tz=this.tz;return c};h.prototype.concat=function(c){var d=this.m11,f=this.m12,l=this.m13,p=this.m21,q=this.m22,r=this.m23,t=this.m31,u=this.m32,v=this.m33,w=this.Hi,x=this.Ii,y=this.tz;this.m11=d*c.m11+f*c.m21+l*c.m31;this.m12=d*c.m12+f*c.m22+l*c.m32;this.m13=d*c.m13+f*c.m23+l*c.m33;this.m21=p*c.m11+q*c.m21+r*c.m31;this.m22=p*c.m12+q*c.m22+r*c.m32;this.m23=p*c.m13+q*c.m23+r*c.m33;this.m31=t*c.m11+u*c.m21+v*c.m31;this.m32=t*c.m12+u*c.m22+v*c.m32;this.m33=
t*c.m13+u*c.m23+v*c.m33;this.Hi=w*c.m11+x*c.m21+y*c.m31+c.Hi;this.Ii=w*c.m12+x*c.m22+y*c.m32+c.Ii;this.tz=w*c.m13+x*c.m23+y*c.m33+c.tz};h.prototype.translate=function(c,d,f){this.Hi+=c;this.Ii+=d;this.tz+=f};h.prototype.scale=function(c,d,f){this.m11*=c;this.m12*=d;this.m13*=f;this.m21*=c;this.m22*=d;this.m23*=f;this.m31*=c;this.m32*=d;this.m33*=f;this.Hi*=c;this.Ii*=d;this.tz*=f};h.prototype.rotateX=function(c){var d=a(c);c=m(c);var f=this.m12*d+this.m13*c,l=this.m22*c-this.m23*d,p=this.m22*d+this.m23*
c,q=this.m32*c-this.m33*d,r=this.m32*d+this.m33*c,t=this.Ii*c-this.tz*d,u=this.Ii*d+this.tz*c;this.m12=this.m12*c-this.m13*d;this.m13=f;this.m22=l;this.m23=p;this.m32=q;this.m33=r;this.Ii=t;this.tz=u};h.prototype.rotateY=function(c){var d=a(c);c=m(c);var f=-this.m11*d+this.m13*c,l=this.m21*c+this.m23*d,p=-this.m21*d+this.m23*c,q=this.m31*c+this.m33*d,r=-this.m31*d+this.m33*c,t=this.Hi*c+this.tz*d,u=-this.Hi*d+this.tz*c;this.m11=this.m11*c+this.m13*d;this.m13=f;this.m21=l;this.m23=p;this.m31=q;this.m33=
r;this.Hi=t;this.tz=u};h.prototype.rotateZ=function(c){var d=a(c);c=m(c);var f=this.m11*d+this.m12*c,l=this.m21*c-this.m22*d,p=this.m21*d+this.m22*c,q=this.m31*c-this.m32*d,r=this.m31*d+this.m32*c,t=this.Hi*c-this.Ii*d,u=this.Hi*d+this.Ii*c;this.m11=this.m11*c-this.m12*d;this.m12=f;this.m21=l;this.m22=p;this.m31=q;this.m32=r;this.Hi=t;this.Ii=u};h.prototype.rotate=function(c,d,f){this.rotateX(c);this.rotateY(d);this.rotateZ(f)};h.prototype.invert=function(){var c=this.dfb();if(c==0)return!1;var d=
this.clone();this.m11=(d.m22*d.m33-d.m23*d.m32)/c;this.m12=(d.m13*d.m32-d.m12*d.m33)/c;this.m13=(d.m12*d.m23-d.m13*d.m22)/c;this.m21=(d.m23*d.m31-d.m21*d.m33)/c;this.m22=(d.m11*d.m33-d.m13*d.m31)/c;this.m23=(d.m13*d.m21-d.m11*d.m23)/c;this.m31=(d.m21*d.m32-d.m22*d.m31)/c;this.m32=(d.m12*d.m31-d.m11*d.m32)/c;this.m33=(d.m11*d.m22-d.m12*d.m21)/c;this.Hi=-(d.Hi*this.m11+d.Ii*this.m21+d.tz*this.m31);this.Ii=-(d.Hi*this.m12+d.Ii*this.m22+d.tz*this.m32);this.tz=-(d.Hi*this.m13+d.Ii*this.m23+d.tz*this.m33);
return!0};h.prototype.dfb=function(){return this.m11*(this.m22*this.m33-this.m23*this.m32)+this.m12*(this.m23*this.m31-this.m21*this.m33)+this.m13*(this.m21*this.m32-this.m22*this.m31)};h.prototype.wO=function(c){var d=c.x*this.m12+c.y*this.m22+c.z*this.m32+this.Ii,f=c.x*this.m13+c.y*this.m23+c.z*this.m33+this.tz;c.x=c.x*this.m11+c.y*this.m21+c.z*this.m31+this.Hi;c.y=d;c.z=f};for(var n=Math.PI*2,g=18E4/n,k=new Float32Array(180001),e=new Float32Array(180001),b=0;b<18E4;b++)k[b]=Math.cos(b/g),e[b]=
Math.sin(b/g);k[18E4]=k[0];e[18E4]=e[0];return h});define("tdv/player/view/panorama/renderer/constants/EyeLayer",["require"],function(){return{mx:0,fb:1,Db:2}});
define("tdv/player/view/panorama/renderer/object/util/PanoramaFormat",["require","tdv/player/parser/ClassInfo","tdv/player/view/util/Capabilities"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/view/util/Capabilities"),n={get:function(g){return g.UWa||(g.UWa=this.I0a(g))},I0a:function(g){if(m.Oa("CubicPanoramaFrame",g))return g.get("stereoCube")?n.VB:g.get("cube")?n.Ax:n.Im;if(m.Oa("SphericPanoramaFrame",g)){var k=g.get("stereoSphere"),e=g.get("sphere"),b=g.get("hfov");g=g.get("vfov");
var c=b>359.9&&g>179.9,d=!1;k&&!e?d=!0:k?e&&!k.get("levels").some(h.ySa)?d=!1:c&&h.zcb()?d=!0:!c&&h.ycb()&&(d=!0):d=!1;return d?(k=k.get("levels"),e=Math.max.apply(Math,k.map(function(f){return f.get("width")})),Math.max.apply(Math,k.map(function(f){return f.get("height")}))/g/(e/b)>1?n.Xr:n.Gu):n.Or}},VB:"stereoCube_12_1",Ax:"monoCube_6_1",Im:"monoCube_1_1",Or:"monoSphere_1_1",Xr:"stereoSphere_1_2",Gu:"stereoSphere_2_1"};return n});
define("tdv/player/view/panorama/renderer/object/util/LevelUtil","require tdv/player/parser/ClassInfo tdv/player/script/ImageResourceLevel tdv/player/view/panorama/renderer/constants/EyeLayer tdv/player/view/panorama/renderer/constants/Face tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/view/util/Scale tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/FileType tdv/player/view/util/URL tdv/view/constants/ScaleMode tdv/view/images/ImageLoader tdv/view/av/VideoPlayer".split(" "),
function(a){function m(K,L,U){return K.split(L).join(U).split(encodeURI(L)).join(U)}function h(K,L){return K.indexOf(L)>=0||K.indexOf(encodeURI(L))>=0}function n(){var K=D.DA()&&F.Tg("recent_ipad_use_max_res",!1);n=function(){return K};return K}function g(K){if(K.length==0)return 1;K.sort(function(L,U){return U.get("width")-L.get("width")});return K[0].get("width")/K[0].get("height")}function k(K,L){var U=1E4;n()||(D.kf()?U=2048:D.DA()?U=1280:D.ub()&&(U=1024));switch(K){case z.Ax:return[6*U,U];case z.Im:return[U,
U];case z.VB:return[12*U,U]}switch(K){case z.Xr:L*=2;break;case z.Gu:L*=.5}return L>2?[U*4,U*4/L]:[U*2*L,U*2]}function e(K){if(n())return[void 0,void 0];switch(K){case z.Ax:if(D.kf()||D.ub())return[18432,1536];break;case z.Xr:if(D.kf())return[5352,5352];if(D.ub())return[6086,6086];break;case z.Or:if(D.kf())return[7168,3584];if(D.ub()&&D.DA())return[8192,4096]}return[void 0,void 0]}function b(K,L){var U=e(L);L=K.filter(function(T){return v.Oa("TiledImageResourceLevel",T)?!0:U[0]!==void 0&&T.get("width")>
U[0]||U[1]!==void 0&&T.get("height")>U[1]?!1:!0});L.length==0&&(L=[d(K)[0]]);return L}function c(){return D.DA()?[w.Bua]:D.B8()||D.C8()?D.xc()==D.su||D.xc()==D.yB?[w.D_,w.mca]:[w.mca,w.D_]:D.kf()?[w.D_]:D.ub()?[w.C_]:[]}function d(K){K.sort(function(L,U){return L.get("width")-U.get("width")});return K}function f(K,L){function U(T){return Math.abs(T.get("width")*T.get("height")-L[0]*L[1])}K.sort(function(T,Y){return U(T)-U(Y)});return K.length&&K[0]||null}function l(K,L,U){K=K.filter(function(T){return T.get("tags").indexOf(L)<
0});return K.length?K:U!==void 0?U:[]}function p(K,L,U){K=K.filter(function(T){return T.get("tags").indexOf(L)>=0});return K.length?K:U!==void 0?U:[]}function q(K,L,U){switch(U){case z.VB:case z.Ax:case z.Im:return K;case z.Or:case z.Gu:return K*L.get("hfov",180)/90;case z.Xr:return K*L.get("hfov",180)*2/90}}function r(K,L){switch(L){case z.VB:return K.get("stereoCube").get("levels");case z.Ax:return K.get("cube").get("levels");case z.Im:return K.get("front").get("levels");case z.Or:return K.get("sphere").get("levels");
case z.Xr:case z.Gu:return K.get("stereoSphere").get("levels")}}function t(K,L){var U=r(K,L),T=K.get("minFaceSize");if(T){var Y=q(T,K,L);K=U.filter(function(aa){return aa.get("height")>=Y});K.length>0&&(U=K)}return U}function u(K){for(var L=[],U=0;U<K.length;U++){var T=K[U];L.indexOf(T)<0&&L.push(T)}return L}var v=a("tdv/player/parser/ClassInfo"),w=a("tdv/player/script/ImageResourceLevel"),x=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),y=a("tdv/player/view/panorama/renderer/constants/Face"),
z=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),A=a("tdv/view/util/Scale");a("tdv/player/view/util/Capabilities");var D=a("tdv/player/view/util/Device");a("tdv/player/view/util/FileType");var F=a("tdv/player/view/util/URL"),C=a("tdv/view/constants/ScaleMode"),B=a("tdv/view/images/ImageLoader"),H=a("tdv/view/av/VideoPlayer"),E={uLa:function(K){K=K.get("frames");if(K.length==0)return 1;var L=K[0];K=z.get(L)==z.Or&&L.Mn()?(K=H.yk(L.get("sphere")))?[K]:[]:z.get(L)!=z.Xr&&z.get(L)!=
z.Gu||!L.Mn()?E.xoa(L,!1):(K=H.yk(L.get("stereoSphere")))?[K]:[];return Math.max.apply(Math,K.map(function(U){return E.Ifb(L,U)}).concat([1]))},Ifb:function(K,L){L=E.moa(K,L,y.FRONT);L=L.get("width");var U=K.cE().get("hfov",360);switch(z.get(K)){case z.VB:return L/1080;case z.Ax:return L/540;case z.Im:return L/90;case z.Or:return L/U;case z.Xr:return L/U;case z.Gu:return L/(2*U)}},Voa:function(K,L){K=E.wp(K,L);return K.length<=6&&K.every(function(U){return B.eaa(U)})},uqa:function(K,L){return E.wp(K,
L).every(function(U){return B.eaa(U)})},wp:function(K,L,U){if(!K)return[];U||(U=!1);if(v.Oa("Panorama",K))return U=K.get("flipImageHorizontally",!1),u([].concat(Array.prototype.concat.apply([],K.get("frames").map(function(X){return E.wp(X,L,U)})),Array.prototype.concat.apply([],K.get("overlays").map(function(X){return E.wp(X,L,U)}))));if(v.Oa("PanoramaFrame",K)){var T=Array.prototype.concat.apply([],K.get("overlays").map(function(X){return E.wp(X,L,U)}));if(z.get(K)==z.Or&&K.Mn())return E.wp(H.yk(K.get("sphere")),
L).concat(T);if((z.get(K)==z.Xr||z.get(K)==z.Gu)&&K.Mn())return E.wp(H.yk(K.get("stereoSphere")),L).concat(T);var Y=E.xoa(K,L)[0];U=K.get("flipImageHorizontally",!1);if(z.get(K)==z.Im){var aa=[y.FRONT,y.fb,y.BACK,y.Db,y.Tc,y.Gc];return Array.prototype.concat.apply([],aa.map(function(X){return(X=E.moa(K,Y,X))?E.wp(X,L,U):[]})).concat(T)}return E.wp(Y,L,U).concat(T)}if(v.Oa("Video360ResourceLevel",K))return(T=K.get("posterURL"))?[T]:[];if(v.Oa("HotspotPanoramaOverlay",K))return K.get("projected")?Array.prototype.concat.apply([],
K.get("items").map(function(X){return E.wp(X,L,U)})):[];if(v.Oa("FlatHotspotPanoramaOverlayImage",K)||v.Oa("HotspotPanoramaOverlayImage",K))return T=K.get("image").get("levels"),Y=T[0],E.wp(Y,L,U),Array.prototype.concat.apply([],T.map(function(X){return E.wp(X,L,U)}));if(v.Oa("TiledImageResourceLevel",K)){var ba=[];T=Math.round(K.get("width")/K.get("height"));if(T==1)var ea=z.Im;else if(T==12)ea=z.Lob;else if(T==6)ea=z.Ax;else return[];var ia=T==12?[x.Db,x.fb]:[x.mx];aa=[y.Db,y.fb,y.Tc,y.Gc,y.FRONT,
y.BACK];var da=K.get("colCount",T)/T,V=K.get("rowCount",1);ia.forEach(function(X){aa.forEach(function(S){for(var W=0;W<V;W++)for(var Z=0;Z<da;Z++)ba.push(E.SLa(K,ea,X,S,U,V,W,Z))})});return ba}return v.Oa("ImageResourceLevel",K)?[K.get("url")]:[]},xoa:function(K,L){var U=z.get(K),T=this.v1a(K);if(T)return L&&!this.Oza(T)&&(K=this.hza(K),K!=T)?[K,T]:[T];T=p(t(K,U),w.nca);if(T.length>0)return d(T);T=this.j2a(K);return L&&!this.Oza(T)&&(K=this.hza(K),K!=T)?[K,T]:[T]},uhb:function(K){return K.get("tags").indexOf(w.nca)>=
0},moa:function(K,L,U){if(z.get(K)!=z.Im)return L;switch(U){case y.FRONT:var T=K.get("front");break;case y.fb:T=K.get("left");break;case y.BACK:T=K.get("back");break;case y.Db:T=K.get("right");break;case y.Tc:T=K.get("top");break;case y.Gc:T=K.get("bottom")}K=T&&T.get("levels")||[];if(K.length==0)return null;K=K.filter(function(Y){return Y.get("width")==L.get("width")&&Y.get("height")==L.get("height")&&Y.get("grayscale",!1)==L.get("grayscale",!1)&&Y.get("colCount",1)==L.get("colCount",1)&&Y.get("rowCount",
1)==L.get("rowCount",1)});return K[0]},SLa:function(K,L,U,T,Y,aa,ba,ea){K=K.get("url");var ia=0;h(K,"{eye}")?K=m(K,"{eye}",Q[U]):ia+=6*(Y?O:N)[U];h(K,"{face}")?K=m(K,"{face}",R[T]):L!=z.Im&&(ia+=G[T]);K=m(K,"{row}",ba);return K=m(K,"{column}",ea+ia*aa)},Kfb:function(K,L){return E.nS(E.bH(K.get("image")),90,90,C.uj,L)},$eb:function(K,L){return E.nS(E.bH(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},qfb:function(K,L){return E.nS(E.bH(K.get("image")),K.get("hfov"),K.get("vfov"),
K.get("scaleMode"),L)},bgb:function(K,L){return E.nS(E.bH(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},gLa:function(K,L){return E.nS(E.bH(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),L)},bH:function(K){return K&&K.get("levels")||[]},nS:function(K,L,U,T,Y){if(!K||!K.length)return null;K=l(K,w.Ju,K);for(var aa=c(),ba=0;ba<aa.length;ba++)K=p(K,aa[ba],K);aa=1E4;n()||(D.kf()?aa=2048:D.DA()?aa=1280:D.ub()&&(aa=1024));ba=d(K)[K.length-1];L=A.Boa(L,U,ba.get("width"),
ba.get("height"),T,Y);return f(K,[L.Wd*aa/90,L.Mk*aa/90])},ifb:function(K){var L=E.bH(K.get("image"));if(!L||!L.length)return null;L=l(L,w.Ju,L);for(var U=c(),T=0;T<U.length;T++)L=p(L,U[T],L);U=d(L)[L.length-1];K=A.H7(K.get("width"),K.get("height"),U.get("width"),U.get("height"),K.get("scaleMode"));return f(L,[K.width,K.height])},Nfb:function(K){var L=E.bH(K.get("image"));if(!L||!L.length)return null;L=l(L,w.Ju,L);for(var U=c(),T=0;T<U.length;T++)L=p(L,U[T],L);U=1E4;n()||(D.kf()?U=2048:D.DA()?U=1280:
D.ub()&&(U=1024));var Y=T=20;(K=K.get("vertices"))&&K.length==4&&(T=K[0].get("yaw"),Y=K[1].get("yaw"),Y<T&&(Y+=360),T=Y-T,Y=K[0].get("pitch"),K=K[3].get("pitch"),Y-=K);return f(L,[T*U/90,Y*U/90])},hza:function(K){var L=z.get(K);K=t(K,L);K=b(K,L);K=p(K,w.Ju,K);L=c();for(var U=0;U<L.length;U++)K=p(K,L[U],K);return f(K,[0,0])},j2a:function(K){var L=z.get(K);K=t(K,L);K=b(K,L);K=l(K,w.Ju,K);for(var U=c(),T=0;T<U.length;T++)K=p(K,U[T],K);L=k(L,g(K));return f(K,L)},v1a:function(K){var L=c();if(L.length==
0)return null;var U=z.get(K),T=t(K,U);T=b(T,U);T=l(T,w.Ju,T);K=[];for(var Y=0;Y<L.length&&K.length==0;Y++)K=p(T,L[Y]);if(K.length==0)return null;L=k(U,g(K));return f(K,L)},Oza:function(K){return K.get("tags").indexOf(w.nca)>=0?!1:D.xc()==D.zB?!0:B.eaa(K.get("url"))}},G=function(){var K={};K[y.Db]=0;K[y.fb]=1;K[y.Tc]=2;K[y.Gc]=3;K[y.FRONT]=4;K[y.BACK]=5;return K}(),N=function(){var K={};K[x.Db]=0;K[x.fb]=1;K[x.mx]=0;return K}(),O=function(){var K={};K[x.Db]=1;K[x.fb]=0;K[x.mx]=0;return K}(),R=function(){var K=
{};K[y.Db]="r";K[y.fb]="l";K[y.Tc]="u";K[y.Gc]="d";K[y.FRONT]="f";K[y.BACK]="b";return K}(),Q=function(){var K={};K[x.fb]="l";K[x.Db]="r";K[x.mx]="b";return K}();return E});
define("tdv/player/view/panorama/control/camera/LimitsManager","require tdv/utils tdv/constants/EventName tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Transformation tdv/player/view/util/geo/Vector tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),function(a){function m(p){this.j=p;this.Rd=!1;this.op=m.gG;this.tfa=this.nH=!1;this.Vf(null);this.j.bind(n.$b,this.kd,this,!0);this.kd()}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/util/geo/Fov"),k=
a("tdv/player/view/util/geo/Transformation"),e=a("tdv/player/view/util/geo/Vector"),b=a("tdv/player/view/panorama/renderer/object/util/LevelUtil");m.prototype.pMa=function(){return this.op!==m.gG};m.prototype.oMa=function(){return this.op&m.qL?!0:!1};m.prototype.qMa=function(){return this.op&m.rL?!0:!1};m.prototype.rMa=function(){return this.op&m.jG?!0:!1};m.prototype.nMa=function(){return this.op&m.fG?!0:!1};m.prototype.dB=function(p){this.nH=p};m.prototype.Jc=function(){this.sp();return this.Ga};
m.prototype.Ic=function(){this.sp();return this.rb};m.prototype.yg=function(){this.sp();return this.sd};m.prototype.uA=function(){this.sp();return this.kb};m.prototype.Vf=function(p){p?(this.Ria=p.get("hfov",360),this.T3=p.get("vfov",180),this.tU=p.get("pitch",0),this.XH=p.get("partial",!1),this.hga=p.tMa(),this.dga=p.jMa(),this.mga=Math.min(p.get("hfovMax",170),170),this.wS=p.get("hfovMin"),this.Dha=b.uLa(p)):(this.Ria=360,this.T3=180,this.tU=0,this.dga=this.hga=this.XH=!1,this.mga=120,this.Dha=
this.wS=1);this.Ga=0;this.rb=this.tU;this.sd=0;this.Rd=!0};m.prototype.setPosition=function(p,q,r,t,u){this.Ga=p;this.rb=q;this.sd=r;this.kb=t;this.tfa=u;this.Rd=!0};m.prototype.kd=function(){var p=this.j.nb(),q=this.j.Mb();if(this.Pa!=p||this.Ha!=q)this.Pa=p,this.Ha=q,this.Rd=!0};m.prototype.sp=function(){if(this.Rd){this.Rd=!1;var p=this.Ga*f,q=this.rb*f,r=this.kb*f,t=(this.tfa?g.zr(this.mga,this.Pa,this.Ha):this.mga)*f;a:{var u=this.wS;if(h.EA(u)&&(u=u.match(/^\s*([+-]?\d+\.?\d*)\s*%\s*$/))&&u.length>=
2){u=parseFloat(u[1]);break a}u=void 0}u=u!==void 0?2*Math.atan2(this.Pa*this.j.getPixelRatio()*.5,this.Dha*45*u/100):this.wS?(this.tfa?g.zr(this.wS,this.Pa,this.Ha):this.wS)*f:2*Math.atan2(this.Pa*this.j.getPixelRatio()*.5,this.Dha*45);u=Math.min(t,u);if(this.nH){var v=360;var w=180;var x=0}else if(this.hga||this.dga){v=this.dga?90:this.tU+this.T3*.5;var y=this.hga?-90:this.tU-this.T3*.5;w=v-y;x=(v+y)*.5;v=this.Ria}else v=this.Ria,x=this.tU,w=this.T3;v*=f;w*=f;x*=f;for(y=this.Pa/this.Ha;p<-c;)p+=
2*c;for(;p>c;)p-=2*c;r=Math.max(Math.min(r,t),u);t=m.gG;if(!this.nH){q>d?t|=m.jG:q<-d&&(t|=m.fG);q=Math.max(Math.min(q,c*.5),-c*.5);var z=2*Math.atan(Math.tan(r*.5)/y);if(z>=w)r=2*Math.atan(Math.tan(w*.5)*y),q=x,t|=m.jG|m.fG;else{var A=Math.min(w*.5+x,c*.5);w=Math.max(-w*.5+x,-c*.5);x=!this.XH&&A>=.99*c*.5?c*.5:A-z*.5;w=!this.XH&&w<=.99*-c*.5?-c*.5:w+z*.5;q>x?(q=x,t|=m.jG):q<w&&(q=w,t|=m.fG)}this.XH&&(w=Math.tan(r*.5),y=w/y,y=new e(-w,q>0?y:-y,1),w=new k,w.rotateX(-q),y.apply(w),y=y.Jc()*2,y<0&&(y+=
2*c),w=Math.max(0,v*.5-y*.5-.25*f),z=Math.min(0,-v*.5+y*.5+.25*f),y>v?(p=0,r=Math.max(u,r*v/y),t|=m.qL|m.rL):p>w?(p=w,t|=m.rL):p<z&&(p=z,t|=m.qL))}this.Ga=p*l;this.rb=q*l;this.kb=r*l;this.op=t}};var c=Math.PI,d=Math.PI*.5,f=Math.PI/180,l=180/Math.PI;m.gG=0;m.qL=1;m.rL=2;m.jG=4;m.fG=8;return m});
define("tdv/player/view/panorama/control/camera/HoverMouseManager",["require","tdv/utils","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/player/view/panorama/control/events/RotationChangeEvent"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/control/events/RotationChangeEvent"),k=m.extend(n,function(){n.call(this);this.NS=!1;this.Gq=void 0;this.kb=90;this.hfa=.1;this.Ac=this.Ab=null});k.prototype.setCamera=
function(e){this.Ac&&this.Ac.h(h.L("hoverFactor"),this.Jla,this);if(this.Ac=e)this.Ac.bind(h.L("hoverFactor"),this.Jla,this),this.Jla()};k.prototype.Jla=function(){this.hfa=this.Ac.get("hoverFactor")};k.prototype.mK=function(e){this.kb=e};k.prototype.au=function(e){this.In();e&&(this.Ab=e,this.Gq=void 0,this.Ab.bind(h.gb,this.bl,this,!0))};k.prototype.In=function(){this.Ab!=null&&(this.Ab.h(h.gb,this.bl,this),this.Ab=null)};k.prototype.bl=function(e){this.cO(e)};k.prototype.cO=function(e){this.Gq&&
this.bma.call(this,+(this.kb*this.hfa*Math.min(Math.max((e.x-this.Gq.x)/this.Ab.nb(),-1),1)),-(this.kb*this.hfa*Math.min(Math.max((e.y-this.Gq.y)/this.Ab.nb(),-1),1)));this.Gq=e};k.prototype.bma=function(e,b){if(e!=0||b!=0){var c=new g(k.xx);c.zQ=e;c.PP=b;this.o(c)}};k.xx="rotation change";return k});
define("tdv/player/view/panorama/control/camera/HoverCameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/camera/MovementManager tdv/player/view/panorama/control/camera/HoverMouseManager".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/control/camera/MovementManager"),k=a("tdv/player/view/panorama/control/camera/HoverMouseManager"),e=m.extend(n,function(b,
c,d){n.call(this);this.j=b;this.ld=this.j.ld;this.va=c;this.Cc=d;this.mD=this.M_=this.ha=!1;this.Bc=new g;this.sk=null;this.sd=this.rb=this.Ga=0;this.kb=90;this.Hb=new k;this.Hb.bind(k.xx,this.VT,this,!0)});e.prototype.clear=function(){this.Hb.h(k.xx,this.VT,this,!0);this.Hb.In();this.Hb=null;this.GG();this.j=this.ld=this.Cc=this.va=this.Bc=null};e.prototype.setCamera=function(b){this.Bc.reset();this.Hb.setCamera(b)};e.prototype.setPosition=function(b,c,d,f){if(this.Ga!=b||this.rb!=c||this.sd!=d||
this.kb!=f)this.Ga=b,this.rb=c,this.sd=d,this.kb=f,this.Hb.mK(this.kb),this.lka(!1),this.AV()};e.prototype.Uf=function(){return this.M_&&this.mD?!0:!1};e.prototype.Nb=function(b){this.iW=!1;this.Bc.Nb(b);this.mD=!1;b=this.Ga+this.Bc.rC;var c=this.rb+this.Bc.XL;this.Cc.rr(this.kb);this.va.setPosition(b,c,this.sd,this.Cc.jf(),this.Cc.kw());this.Ga=this.va.Jc();this.rb=this.va.Ic();this.sd=this.va.yg();this.kb=this.va.uA()};e.prototype.Ct=function(){return this.Ga};e.prototype.Bt=function(){return this.rb};
e.prototype.aE=function(){return this.sd};e.prototype.rJ=function(){return this.kb};e.prototype.Ra=function(b){this.ha!=b&&((this.ha=b)?this.AV():(this.GG(),this.lka(!1)))};e.prototype.VT=function(b){this.md(b.tB,b.TA,0,0,b.zQ,b.PP,0,0,!1,!1,!0,!0)};e.prototype.md=function(b,c,d,f,l,p,q,r,t,u,v,w){var x=this.Bc.wra(b,c,d,l,p,q,u,v,w)||x;x&&this.hj()};e.prototype.hj=function(){this.mD=!0;this.o(new h(e.Ki))};e.prototype.AV=function(){this.GG();this.sk=setTimeout(this.kU.bind(this),30)};e.prototype.GG=
function(){this.sk&&(clearTimeout(this.sk),this.sk=null)};e.prototype.kU=function(){this.lka(this.ha)};e.prototype.lka=function(b){this.M_!=b&&((this.M_=b)?(this.Bc.reset(),this.Hb.au(this.j.getParent()),this.hj()):this.Hb.In())};e.Ki="position change request";return e});
define("tdv/player/view/panorama/control/camera/GyroscopeManager","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Gyroscope".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher");a("tdv/player/view/util/Device");var k=a("tdv/player/view/util/Gyroscope");a=m.extend(g,function(){g.call(this);this.zHa=this.ha=!1;this.sd=this.rb=this.Ga=
0;this.E4=!1;this.Ls=this.Vv=0});a.prototype.Ra=function(e){if(this.ha!=e)if(this.ha=e){k.bind(this.ET,this,!0);e=k.Ft();var b=e.pitch;this.Vv=this.Ga-e.yaw;this.Ls=this.rb-b;this.Bn()}else k.h(this.ET,this,!0)};a.prototype.setPosition=function(e,b,c){this.Ga!=e&&(this.Vv=this.nI(this.Vv+(e-this.nI(this.Ga,e)),0),this.Ga=e);this.rb!=b&&(this.Ls+=b-this.rb,this.rb=b);this.sd=c};a.prototype.Ct=function(){return this.Ga};a.prototype.Bt=function(){return this.rb};a.prototype.aE=function(){return this.sd};
a.prototype.Uf=function(){return k.Qib()};a.prototype.Nb=function(e){var b=k.Ft(),c=b.roll;e=20*e/1E3;var d=b.pitch+(this.zHa?this.Ls:0);this.Ga=this.bh(this.Ga,this.nI(this.nI(b.yaw,this.Ga)+this.Vv,this.Ga),e);this.rb=this.bh(this.rb,d,e);this.sd=this.bh(this.sd,c,e)};a.prototype.Ulb=function(e){this.zHa=e};a.prototype.bh=function(e,b,c){e=(b-e)*(1-c);Math.abs(e)<.01&&(e=0);return b-e};a.prototype.nI=function(e,b){for(;e+180<b;)e+=360;for(;e-180>b;)e-=360;return e};a.prototype.ET=function(){this.ha&&
this.Bn()};a.prototype.Bn=function(){this.o(new n(h.V))};return a});define("tdv/player/view/panorama/control/constants/Movement",["require"],function(){return{dL:"left",eL:"right",cL:"down",fL:"up",uua:"rotate10x",Wua:"zoom2x",PLAYING:"playing",Mx:"zoomIn",Nx:"zoomOut",Fg:"stop"}});
define("tdv/player/view/panorama/control/camera/KeyboardManager","require tdv/utils tdv/constants/Key tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/constants/Movement tdv/view/util/KeyboardControl".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/Key"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/control/constants/Movement"),e=a("tdv/view/util/KeyboardControl"),b=m.extend(g,function(d){g.call(this);this.j=d;this.ha=
!1;this.pg={};this.tV=null;this.rk=this.sV=!1;this.b2=this.b2.bind(this);this.Ym=this.Ym.bind(this);this.ld=this.j.ld;document.addEventListener("keydown",this.b2);document.addEventListener("keyup",this.Ym)});b.prototype.clear=function(){this.ha=!1;this.ld=this.j=null;document.removeEventListener("keydown",this.b2);document.removeEventListener("keyup",this.Ym)};b.prototype.Ra=function(d){this.ha!=d&&(this.ha=d)&&this.W5()};var c=[h.bk,h.Ji,h.fb,h.Db,h.Mp,h.uo,h.qo,h.Sp,h.v_,h.r_];b.prototype.b2=function(d){if(!e.yp()){var f=
d.which,l=!1;!this.pg[f]&&c.indexOf(f)>=0&&(this.tV||this.sV||(this.tV=setTimeout(this.H5a.bind(this),100)),l=this.pg[f]=!0);this.rk!=d.shiftKey&&(this.rk=d.shiftKey,l=!0);l&&this.W5()}};b.prototype.H5a=function(){this.sV=!0;this.W5()};b.prototype.Ym=function(d){if(!e.yp()){var f=d.which,l=!1;if(f in this.pg){delete this.pg[f];l=!1;for(f in this.pg)this.pg[f]&&(l=!0);l||(this.tV&&clearTimeout(this.tV),this.tV=null,this.sV=!1);l=!0}this.rk!=d.shiftKey&&(this.rk=d.shiftKey,l=!0);l&&this.W5()}};b.prototype.W5=
function(){if(this.ha){var d=this.ld.get("gazeModeEnabled"),f=this.ld.get("arrowKeysAction");if(d||f!="none"){d=d||f=="rotate";f=[];this.pg[h.v_]?f.push(k.Mx):this.pg[h.r_]&&f.push(k.Nx);this.sV&&(this.pg[h.v_]||this.pg[h.r_])&&f.push(k.Wua);this.pg[h.fb]||this.pg[h.Mp]?f.push(k.dL):(this.pg[h.Db]||this.pg[h.Sp])&&f.push(k.eL);if(d||this.rk)this.pg[h.bk]||this.pg[h.uo]?f.push(k.fL):(this.pg[h.Ji]||this.pg[h.qo])&&f.push(k.cL);this.sV&&(this.pg[h.fb]||this.pg[h.Db]||this.pg[h.bk]||this.pg[h.Ji]||this.pg[h.Mp]||
this.pg[h.Sp]||this.pg[h.uo]||this.pg[h.qo])&&f.push(k.uua);f.length==0&&f.push(k.Fg);this.o(new n(b.sba,{WNa:f}))}}};b.sba="movementsChange";return b});
define("tdv/player/view/panorama/control/camera/TargetManager",["require"],function(){function a(){this.yo=!0;this.reset()}function m(h,n,g){h=(n-h)*(1-g);Math.abs(h)<.01&&(h=0);return n-h}a.prototype.reset=function(){this.yo&&(this.yo=!1,this.D5=this.E5=this.Mz=this.qp=this.YL=this.$L=this.ZL=this.wC=void 0)};a.prototype.moveTo=function(h,n,g,k,e){this.qp=h;this.Mz=n;this.E5=g;this.D5=k;this.Bga=e;this.yo=!0};a.prototype.setPosition=function(h,n,g,k){this.wC=h;this.ZL=n;this.$L=g;this.YL=k};a.prototype.Ct=
function(){return this.wC};a.prototype.Bt=function(){return this.ZL};a.prototype.aE=function(){return this.$L};a.prototype.rJ=function(){return this.YL};a.prototype.Uf=function(){return this.yo};a.prototype.Nb=function(){if(this.yo)if(this.Bga)this.wC=this.qp,this.ZL=this.Mz,this.$L=this.E5,this.YL=this.D5,this.yo=!1;else{for(var h=this.wC,n=this.qp-180,g=this.qp+180;h<n;)h+=g-n;for(;h>g;)h-=g-n;this.wC=h;this.wC=m(this.wC,this.qp,.5);this.ZL=m(this.ZL,this.Mz,.5);this.$L=m(this.$L,this.E5,.5);this.YL=
m(this.YL,this.D5,.5);this.wC==this.qp&&this.ZL==this.Mz&&this.$L==this.E5&&this.YL==this.D5&&(this.yo=!1)}};return a});
define("tdv/player/view/panorama/control/camera/VRPoseManager",["require","tdv/player/view/util/geo/Quaternion","tdv/player/view/util/URL","tdv/player/view/util/XR"],function(a){function m(b){this.j=b;this.ha=!1;this.sd=this.rb=this.Ga=0;this.A1=void 0}var h=a("tdv/player/view/util/geo/Quaternion"),n=a("tdv/player/view/util/URL"),g=a("tdv/player/view/util/XR");m.prototype.Ra=function(b){this.ha!=b&&(this.ha=b,this.A1=void 0)};m.prototype.setPosition=function(b,c,d){if(this.ha&&this.A1!==void 0){for(var f=
b-this.A1;f>180;)f-=360;for(;f<-180;)f+=360;(f<-1E-4||f>1E-4)&&g.kK(b)}this.Ga=b;this.rb=c;this.sd=d};m.prototype.Ct=function(){return this.Ga};m.prototype.Bt=function(){return this.rb};m.prototype.aE=function(){return this.sd};m.prototype.Uf=function(){return!0};m.prototype.Nb=function(){if(g.Ag&&!this.j.B4){g.kK();var b=h.iaa(g.ug,!0);this.A1=this.Ga=b.Xa;this.rb=b.pitch;this.sd=b.Mg;this.rb=e===void 0?b.pitch:e;this.sd=k===void 0?b.Mg:k;g.setScale(1)}};var k=n.Ak("debug")?n.I7("force_vr_roll"):
void 0,e=n.Ak("debug")?n.I7("force_vr_pitch"):void 0;return m});
define("tdv/player/view/panorama/control/camera/ManualCameraController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/constants/RotationMode tdv/player/view/panorama/control/camera/GyroscopeManager tdv/player/view/panorama/control/camera/KeyboardManager tdv/player/view/panorama/control/camera/MovementManager tdv/player/view/panorama/control/camera/MouseManager tdv/player/view/panorama/control/camera/TargetManager tdv/player/view/panorama/control/camera/VRPoseManager tdv/player/view/panorama/control/constants/Movement tdv/player/view/util/geo/Quaternion tdv/player/view/util/XR tdv/view/constants/Cursor".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/constants/RotationMode"),e=a("tdv/player/view/panorama/control/camera/GyroscopeManager"),b=a("tdv/player/view/panorama/control/camera/KeyboardManager"),c=a("tdv/player/view/panorama/control/camera/MovementManager"),d=a("tdv/player/view/panorama/control/camera/MouseManager"),f=a("tdv/player/view/panorama/control/camera/TargetManager"),l=a("tdv/player/view/panorama/control/camera/VRPoseManager"),
p=a("tdv/player/view/panorama/control/constants/Movement");a("tdv/player/view/util/geo/Quaternion");var q=a("tdv/player/view/util/XR"),r=a("tdv/view/constants/Cursor"),t=m.extend(g,function(u,v,w){g.call(this);this.j=u;this.ld=this.j.ld;this.va=v;this.Cc=w;this.mD=this.DC=this.rS=this.u4=this.ha=!1;this.Bc=new c;this.Zs=new f;this.sd=this.rb=this.Ga=0;this.kb=90;this.vI=1;this.Ui=void 0;this.mda=this.jR=5;this.iW=!1;this.Hb=new d;this.Hb.bind(d.xx,this.VT,this,!0);this.Hb.bind(d.Ir,this.ZC,this,!0);
this.Hb.bind(d.$j,this.Hs,this,!0);this.Hb.bind(d.Zj,this.Gs,this,!0);this.Vm=new e;this.Vm.bind(h.V,this.BBa,this);this.CC=!1;this.Uo=new b(this.j);this.Uo.bind(b.sba,this.LBa,this,!0);this.Uv=new l(this.j);q.M.bind(h.V,this.mn,this,!0);q.M.bind(h.Pd,this.mn,this,!0);this.mn()});t.prototype.clear=function(){this.Hb.h(d.xx,this.VT,this,!0);this.Hb.h(d.Ir,this.ZC,this,!0);this.Hb.h(d.$j,this.Hs,this,!0);this.Hb.h(d.Zj,this.Gs,this,!0);this.Hb.In();this.Hb=null;this.Vm.h(h.V,this.BBa,this);this.Vm=
null;this.Uo.h(b.sba,this.LBa,this,!0);this.Uo.clear();this.Uo=null;q.M.h(h.V,this.mn,this,!0);q.M.h(h.Pd,this.mn,this,!0);this.Cc=this.va=this.Bc=null;this.q0();this.j=this.ld=null};t.prototype.setCamera=function(u){this.Bc.reset();this.Zs.reset();this.Hb.setCamera(u);this.jR=u.get("automaticRotationSpeed");this.mda=u.get("automaticZoomSpeed")};t.prototype.wl=function(u){Array.isArray(u)||(u=[u]);var v=0,w=0,x=0,y=!1;u.includes(p.Fg)||(u.includes(p.dL)?v=-this.jR:u.includes(p.eL)&&(v=+this.jR),u.includes(p.cL)?
w=-this.jR:u.includes(p.fL)&&(w=+this.jR),u.includes(p.Mx)?x=-this.mda:u.includes(p.Nx)&&(x=+this.mda),u.includes(p.PLAYING)&&(y=!0),u.includes(p.Wua)&&(x*=2),u.includes(p.uua)&&(v*=10,w*=10),v*=this.vI,w*=this.vI);this.md(v,w,0,x,0,0,0,0,y,!0,!0,!0)};t.prototype.setPosition=function(u,v,w,x){this.Ga=u;this.rb=v;this.sd=w;this.kb=x;this.vI=this.kb/90;this.Vm.setPosition(this.Ga,this.rb,this.sd);this.Uv.setPosition(this.Ga,this.rb,this.sd);this.Hb.mK(this.kb);this.Zs.setPosition(this.Ga,this.rb,this.sd,
this.kb)};t.prototype.moveTo=function(u,v,w,x,y){this.Zs.moveTo(u,v,w,this.Cc.QKa(x),y);this.u4=!1;this.Bc.reset();this.hj()};t.prototype.xra=function(u,v,w){this.md(0,0,0,0,u,v,w,0,!1,!1,!1)};t.prototype.Uf=function(){return this.ha&&(this.mD||this.zTa())?!0:!1};t.prototype.Vcb=function(){this.mD=this.iW=!1};t.prototype.zTa=function(){return this.ha?this.iW?!0:this.Uv.ha?this.Uv.Uf()||this.Bc.Uf():this.Vm.ha?this.CC?!0:this.Vm.Uf()||this.Bc.Uf():this.Bc.Uf()||this.Zs.Uf():!1};t.prototype.Nb=function(u){this.iW=
!1;this.Bc.Nb(u);this.mD=!1;var v=this.kb;if(this.Uv.ha){this.Uv.Nb(u);u=this.Uv.Ct()+this.Bc.rC+this.J2a();var w=this.Uv.Bt();var x=this.Uv.aE()}else this.Zs.Uf()?(this.Zs.Nb(u),u=this.Zs.Ct(),w=this.Zs.Bt(),x=this.Zs.aE(),v=this.Zs.rJ()):(this.Vm.ha?(this.CC=!1,this.Vm.Nb(u),u=this.Vm.Ct()+this.Bc.rC,w=this.Vm.Bt(),this.rS&&(w+=this.Bc.XL),x=this.Vm.aE()):(u=this.Ga+this.Bc.rC,w=this.rb+this.Bc.XL,x=0),v+=this.Bc.pxa);this.Cc.rr(v);this.va.setPosition(u,w,x,this.Cc.jf(),this.Cc.kw());this.Ga=this.va.Jc();
this.rb=this.va.Ic();this.sd=this.va.yg();this.kb=this.va.uA();if(this.u4&&this.va.pMa()){v=this.Bc.sW;if(this.va.oMa()||this.va.qMa())v=-v;u=this.Bc.yU;if(this.va.rMa()||this.va.nMa())u=-u;this.md(v,u,0,0,0,0,0,0,!0,!1,!1,!0)}};t.prototype.Ct=function(){return this.Ga};t.prototype.Bt=function(){return this.rb};t.prototype.aE=function(){return this.sd};t.prototype.rJ=function(){return this.kb};t.prototype.Ra=function(u){this.ha!=u&&((this.ha=u)?(this.wD(this.Hb.GH==k.tx?r.IB:void 0),this.Hb.au(this.j.getParent()),
this.hj()):(this.q0(),this.Hb.In()),this.Ula())};t.prototype.WY=function(u){this.DC!=u&&(this.DC=u,this.Ula(),this.CC=!0)};t.prototype.SE=function(u){this.Uo.Ra(u)};t.prototype.Ula=function(){var u=this.j.Aw();this.Vm.Ra(this.ha&&this.DC&&!u);this.Uv.Ra(this.ha&&u)};t.prototype.BBa=function(){this.hj()};t.prototype.YY=function(u){this.rS=u;this.Vm.Ulb(this.rS)};t.prototype.UE=function(u){this.Hb.UE(u);this.wD(this.Hb.GH==k.tx?r.IB:void 0)};t.prototype.tK=function(u){this.Hb.tK(u)};t.prototype.mn=
function(){this.ha&&(this.j.Aw()&&(q.setScale(1),q.kK(this.Ga)),this.Ula(),this.hj())};t.prototype.VT=function(u){var v=!this.Uv.ha&&(!this.Vm.ha||this.rS);if(this.Hb.GH==k.uF){var w=void 0;if(u.tB!=0||u.TA!=0){var x=Math.sqrt(u.TA*u.TA+u.tB*u.tB)>25,y=Math.atan2(u.TA,u.tB)*180/Math.PI;y>=-22.5&&y<22.5?w=x?r.Pta:r.Ota:y>=22.5&&y<67.5?w=x?r.Rta:r.Yta:y>=67.5&&y<112.5?w=x?r.Qta:r.Xta:y>=112.5&&y<157.5?w=x?r.Sta:r.Zta:y>=157.5||y<-157.5?w=x?r.Wta:r.cua:y>=-157.5&&y<-112.5?w=x?r.Vta:r.bua:y>=-112.5&&
y<-67.5?w=x?r.Tta:r.$ta:y>=-67.5&&y<-22.5&&(w=x?r.Uta:r.aua)}this.wD(w);this.md(u.tB,u.TA,0,0,u.zQ,u.PP,0,0,!1,!1,!1,v)}else this.md(u.tB,u.TA,0,0,u.zQ,u.PP,0,0,!1,!1,v,v)};t.prototype.ZC=function(u){this.md(0,0,0,u.Mgb,0,0,0,u.Koa,!1,!0,!1,!0)};t.prototype.md=function(u,v,w,x,y,z,A,D,F,C,B,H){var E=!1;this.ld.get("rotationEnabled")&&(E=this.Bc.wra(u,v,w,y,z,A,C,B,H)||E);this.ld.get("zoomEnabled")&&(E=this.Bc.Wlb(x,D)||E);E&&(this.Zs.reset(),this.u4=F,this.hj())};t.prototype.J2a=function(){if(!this.j.Aw())return 0;
this.q4=this.q4||0;for(var u=0,v=0;v<q.ud.length&&u==0;v++)u=q.ud[v].eA?0:q.ud[v].Qb.x;v=this.j.P.get("vrThumbstickRotationStep");v=u>0&&this.q4<=0?v:u<0&&this.q4>=0?-v:0;this.q4=u;return v};t.prototype.hj=function(){this.mD=!0;this.o(new n(t.Ki))};t.prototype.Hs=function(){this.iW=!0;this.o(new n(t.$j));this.Hb.GH==k.tx&&this.wD(r.Li)};t.prototype.Gs=function(){this.o(new n(t.Zj));this.Hb.GH==k.tx&&this.wD(r.IB)};t.prototype.LBa=function(u){this.wl(u.data.WNa);u.data.WNa.indexOf(p.Fg)<0&&this.j.Vb().o(new n(h.cG,
{jQ:u}))};t.prototype.wD=function(u){this.Ui!=u&&this.ha&&(this.Ui&&this.j.TP(this.Ui),(this.Ui=u)&&this.j.W9(this.Ui))};t.prototype.q0=function(){this.Ui&&(this.j.TP(this.Ui),this.Ui=void 0)};t.Ki="position change request";t.$j="user interaction start";t.Zj="user interaction end";return t});
define("tdv/player/script/TargetRotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetRotationalCameraMovement",m,function(){m.call(this)})});
define("tdv/player/view/panorama/control/camera/SequenceCameraController","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/player/script/DistanceRotationalCameraMovement tdv/player/script/TargetRotationalCameraMovement tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=
a("tdv/events/EventDispatcher"),e=a("tdv/player/parser/ClassInfo");a("tdv/player/script/DistanceRotationalCameraMovement");a("tdv/player/script/TargetRotationalCameraMovement");var b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=m.extend(k,function(f,l,p){k.call(this);this.j=f;this.va=l;this.Cc=p;this.yN=this.Xb=null;this.qn=this.jD=!1;this.ZH=void 0;this.QM=[];this.Uja=0;this.la=null;this.rb=this.Ga=0;this.kb=90});d.prototype.clear=function(){this.end();this.va=this.j=null};d.prototype.start=
function(f){this.U8a(f);this.j6a();this.qn=!1;this.Iwa();this.jD=!1;this.hj();this.ml()};d.prototype.end=function(){this.Xb!=null&&(this.Nwa(),this.jD=this.qn=!1,this.la=null,this.ml())};d.prototype.Yib=function(){this.Xb&&this.Xb.get("restartMovementOnUserInteraction")?this.jD||(this.NFa(),this.Wka(),this.la=null,this.jD=!0,this.ml()):(this.la=null,this.pause())};d.prototype.bjb=function(){this.jD&&(this.jD=!1,this.Zza()||this.M9a())};d.prototype.U8a=function(f){this.Nwa();this.Xb=f;this.Xb.bind(h.Ex,
this.PCa,this,!0);this.Xb.bind(h.hL,this.OCa,this,!0);this.Xb.bind(h.L("movementIndex"),this.w3,this,!0);this.QM=this.Xb.get("movements",[])};d.prototype.Nwa=function(){this.Wka();this.Xb!=null&&(this.Xb.h(h.Ex,this.PCa,this),this.Xb.h(h.hL,this.OCa,this),this.Xb.h(h.L("movementIndex"),this.w3,this),this.Xb.set("movementIndex",-1),this.Xb=null,this.QM=[])};d.prototype.ql=function(){return this.Xb?this.qn?n.Zb:n.PLAYING:n.ca};d.prototype.setPosition=function(f,l,p,q){this.Ga=f;this.rb=l;this.kb=q};
d.prototype.Uf=function(){return!this.Xb||!this.la||this.qn||this.jD||this.Zza()?!1:!0};d.prototype.Nb=function(f){if(this.Uf()){this.la.Nb(f);f=this.la.ob("hfov");if(this.fp!=this.Cc.fp){this.fp=this.Cc.fp;var l=this.la.nX("hfov");l.from=this.Cc.PW(l.from);l.to=this.Cc.PW(l.to);f=this.Cc.PW(f)}this.va.setPosition(this.la.ob("yaw"),this.la.ob("pitch"),0,f,this.Cc.kw());this.Ga=this.va.Jc();this.rb=this.va.Ic();this.kb=this.va.uA();this.la.Ve()&&this.l5a()}};d.prototype.Ct=function(){return this.Ga};
d.prototype.Bt=function(){return this.rb};d.prototype.rJ=function(){return this.kb};d.prototype.play=function(){this.qn&&(this.qn=!1,this.la||this.w3(),this.Iwa(),this.hj(),this.ml())};d.prototype.pause=function(){this.qn||(this.qn=!0,this.NFa(),this.ml())};d.prototype.PCa=function(){this.play()};d.prototype.OCa=function(){this.pause()};d.prototype.j6a=function(){this.Uja=0;var f=this.Xb.get("movementIndex",-1);f==-1&&(f=0);this.g4(f)};d.prototype.l6a=function(){this.Uja++;var f=this.Xb.get("repeat",
1);this.QM.length>0&&(f==0||this.Uja<f)?this.g4(0):(this.Xb.o(new g(h.Tb)),this.end(),this.O$a())};d.prototype.k6a=function(){this.g4(this.Xb.get("movementIndex",0)+1)};d.prototype.g4=function(f){f<this.QM.length?this.Xb.get("movementIndex")!=f?this.Xb.set("movementIndex",f):this.w3():(this.Xb.o(new g(h.Ur)),this.l6a())};d.prototype.w3=function(){var f=this.Xb.get("movementIndex");this.la=f>=0?this.HR(this.QM[f]):null};d.prototype.l5a=function(){this.QM[this.Xb.get("movementIndex")].o(new g(h.Tb));
this.k6a()};d.prototype.Zza=function(){return this.yN!=null};d.prototype.M9a=function(){this.Wka();var f=this,l=this.Xb.get("restartMovementDelay")||0;this.yN=setTimeout(function(){f.yN=null;f.C5a()},l);this.ml()};d.prototype.Wka=function(){this.yN&&(clearTimeout(this.yN),this.yN=null)};d.prototype.C5a=function(){this.g4(this.Xb.get("movementIndex"));this.hj();this.ml()};d.prototype.HR=function(f){var l,p=this.lI(this.Ga,-180,180),q=this.rb,r=this.kb;if(e.Oa("TargetRotationalCameraMovement",f)){var t=
f.get("targetYaw",p);var u=f.get("targetPitch",q);(l=f.get("targetHfov"))?(this.Cc.lRa(l),l=this.Cc.jf()):l=r;this.va.setPosition(t,u,0,l,this.Cc.kw());if(this.va.XH)t=this.va.Jc();else switch(this.y0a(f)){case "left":t=this.lI(t,p-360,p);break;case "right":t=this.lI(t,p,p+360);break;case "longest":t=this.lI(t,p-180,p+180);t=t>=p?this.lI(t,p-360,p):this.lI(t,p,p+360);break;default:t=this.lI(t,p-180,p+180)}}else e.Oa("DistanceRotationalCameraMovement",f)&&(t=p+f.get("yawDelta",0),this.va.XH&&(t=Math.min(Math.max(-180,
t),180)),u=q+f.get("pitchDelta",0),l=r+f.get("hfovDelta",0),this.va.setPosition(t,u,0,l,this.Cc.kw()),this.va.XH&&(t=this.va.Jc()));u=this.va.Ic();l=this.va.uA();this.fp=this.Cc.fp;return new b(f.get("easing"),[new c("yaw",p,t,f.get("yawSpeed")),new c("pitch",q,u,f.get("pitchSpeed")),new c("hfov",r,l,f.get("hfovSpeed"))],f.get("duration"))};d.prototype.Iwa=function(){this.ZH=void 0};d.prototype.NFa=function(){if(this.la){this.ZH=void 0;var f=this.la&&this.la.nX("yaw");f&&(f.to>f.from?this.ZH="right":
f.to<f.from&&(this.ZH="left"))}};d.prototype.y0a=function(f){f=f.get("path");f=="longest"&&this.ZH&&(f=this.ZH);this.ZH=void 0;return f};d.prototype.lI=function(f,l,p){for(;f<l;)f+=p-l;for(;f>p;)f-=p-l;return f};d.prototype.hj=function(){this.o(new g(d.Ki))};d.prototype.O$a=function(){this.o(new g(d.Fba))};d.prototype.ml=function(){this.o(new g(d.gd))};d.Ki="position change request";d.Fba="sequence end";d.gd="playback state change";return d});
define("tdv/player/view/panorama/control/camera/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/camera/LimitsManager tdv/player/view/panorama/control/camera/HoverCameraController tdv/player/view/panorama/control/camera/ManualCameraController tdv/player/view/panorama/control/camera/SequenceCameraController tdv/player/view/panorama/control/constants/Movement tdv/player/view/util/XR tdv/constants/PlaybackState".split(" "),
function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/control/camera/LimitsManager"),e=a("tdv/player/view/panorama/control/camera/HoverCameraController"),b=a("tdv/player/view/panorama/control/camera/ManualCameraController"),c=a("tdv/player/view/panorama/control/camera/SequenceCameraController"),d=a("tdv/player/view/panorama/control/constants/Movement"),f=a("tdv/player/view/util/XR"),l=a("tdv/constants/PlaybackState"),
p=m.extend(g,function(q,r){g.call(this);this.j=q;this.j.bind(h.$b,this.kd,this);f.M.bind(h.V,this.mn,this,!0);this.Cc=r;this.$ja=!1;this.kb=this.sd=this.rb=this.Ga=void 0;this.Xv=this.Wv=this.tT=this.wT=this.vT=this.uT=!1;this.pp=!0;this.tM=this.Ls=0;this.ha=!1;this.Po=null;this.zS=5E3;this.DS=this.yga=null;this.jka=[];this.Jj=this.bC=l.ca;this.va=new k(q);this.rc=new b(this.j,this.va,this.Cc);this.rc.bind(b.Ki,this.Ds,this,!0);this.rc.bind(b.$j,this.Hs,this,!0);this.rc.bind(b.Zj,this.Gs,this,!0);
this.Oo=new e(this.j,this.va,this.Cc);this.Oo.bind(e.Ki,this.Ds,this,!0);this.Pf=new c(this.j,this.va,this.Cc);this.Pf.bind(c.Ki,this.Ds,this,!0);this.Pf.bind(c.Fba,this.qv,this,!0);this.Pf.bind(c.gd,this.QCa,this,!0)});p.prototype.clear=function(){this.Lv();this.rc.h(b.Ki,this.Ds,this);this.rc.h(b.$j,this.Hs,this,!0);this.rc.h(b.Zj,this.Gs,this,!0);this.rc.clear();this.rc=null;this.Oo.h(e.Ki,this.Ds,this,!0);this.Oo.clear();this.Oo=null;this.Pf.h(c.Ki,this.Ds,this);this.Pf.h(c.Fba,this.qv,this);
this.Pf.h(c.gd,this.QCa,this);this.Pf.clear();this.va=this.Pf=null;this.j.h(h.$b,this.kd,this);f.M.h(h.V,this.mn,this,!0);this.j=null;this.Ac&&(this.Ac.h(h.L("sequences"),this.Aia,this,!0),this.Ac=null);this.d5([])};p.prototype.end=function(){this.bC=l.ca;this.Lv();this.rc.Ra(!1);this.Oo.Ra(!1);this.Pf.end();this.ha=!1;this.Ez(0,0,0);this.DS=this.yga=null;this.Ac&&(this.Ac.h(h.L("sequences"),this.Aia,this,!0),this.Ac=null);this.d5([]);this.II()};p.prototype.start=function(q,r){this.bC=l.PLAYING;this.ha=
!0;this.Ez(0,0,0);this.fV(q);this.$7a(r);this.UDa();this.r5(this.DS);this.Oo.Ra(!0);this.II()};p.prototype.ql=function(){return this.Jj};p.prototype.play=function(q){this.bC=l.PLAYING;this.Pf.ql()==l.Zb?this.Pf.play():this.Pf.ql()==l.ca&&(!q&&this.DS?this.r5(this.DS):this.AM()||this.yV());this.II()};p.prototype.resume=function(){this.bC==l.Zb&&(this.rc.Vcb(),this.play(!0))};p.prototype.pause=function(){this.rc.wl(d.Fg);this.bC==l.PLAYING&&(this.bC=l.Zb,this.Pf.ql()==l.PLAYING?(this.Pf.pause(),this.II()):
this.AM()&&this.Lv())};p.prototype.stop=function(){this.bC=l.ca;this.Pf.ql()!=l.ca&&this.Pf.end();this.rc.wl(d.Fg);this.II();this.AM()&&this.Lv()};p.prototype.moveTo=function(q,r,t,u,v){this.rc.moveTo(q,r,t,u,v)};p.prototype.d5=function(q){this.jka.forEach(function(r){r.h(h.Ex,this.zEa,this,!0)}.bind(this));this.jka=q;this.jka.forEach(function(r){r.bind(h.Ex,this.zEa,this,!0)}.bind(this))};p.prototype.mn=function(){this.va.dB(f.isPresenting)};p.prototype.wl=function(q){this.rc.wl(q)};p.prototype.xra=
function(q,r,t){this.rc.xra(q,r,t)};p.prototype.WY=function(q){this.DC!=q&&(this.DC=q,this.rc.WY(this.DC),this.bb())};p.prototype.YY=function(q){this.rc.YY(q)};p.prototype.UE=function(q){this.rc.UE(q)};p.prototype.tK=function(q){this.rc.tK(q)};p.prototype.SE=function(q){this.rc.SE(q)};p.prototype.YA=function(q){this.ha&&(this.rc.Uf()||this.j.Aw()||this.DC&&(this.rc.ha||!this.rc.rS)?(this.rc.zTa()&&this.Pf.Yib(),this.rc.Nb(q),this.vn(this.rc.Ct(),this.rc.Bt(),this.rc.aE(),this.rc.rJ()),this.bb()):
this.Pf.jD?(this.Pf.bjb(),this.bb()):this.Pf.Uf()?(this.Pf.Nb(q),this.vn(this.Pf.Ct(),this.Pf.Bt(),0,this.Pf.rJ()),this.bb()):this.Oo.Uf()?(this.Oo.Nb(q),this.vn(this.Oo.Ct(),this.Oo.Bt(),0,this.Oo.rJ()),this.bb()):this.$ja?(this.$ja=!1,this.Cc.rr(this.j.jf()),this.va.setPosition(this.j.Jc(),this.j.Ic(),this.j.yg(),this.Cc.jf(),this.Cc.kw()),this.vn(this.va.Jc(),this.va.Ic(),this.va.yg(),this.va.uA()),this.bb()):(this.Ez(0,0,0),this.bC==l.PLAYING&&this.Pf.ql()!=l.PLAYING&&(this.AM()||this.yV())))};
p.prototype.ze=function(){this.Lab();this.UDa()};p.prototype.Lab=function(){var q=this.j.Jc()-this.Ga||0,r=this.j.Ic()-this.rb||0;this.j.yg();this.Ez(q,r,this.j.jf()-this.kb||0)};p.prototype.UDa=function(){this.Ga=this.j.Jc();this.rb=this.j.Ic();this.sd=this.j.yg();this.kb=this.j.jf();this.rc.setPosition(this.Ga,this.rb,this.sd,this.kb);this.Pf.setPosition(this.Ga,this.rb,this.sd,this.kb);this.Oo.setPosition(this.Ga,this.rb,this.sd,this.kb)};p.prototype.fV=function(q){this.va.Vf(q)};p.prototype.$7a=
function(q){this.Ac=q;this.zS=q.get("timeToIdle",5E3);this.yga=q.get("idleSequence");this.DS=q.get("initialSequence");this.rc.setCamera(q);this.Oo.setCamera(q);q.bind(h.L("sequences"),this.Aia,this,!0);this.d5(q.get("sequences",[]))};p.prototype.Aia=function(){this.d5(this.Ac.get("sequences",[]))};p.prototype.zEa=function(q){this.r5(q.source)};p.prototype.Ds=function(){this.Lv();this.bb()};p.prototype.Hs=function(){this.o(new n(p.$j))};p.prototype.Gs=function(){this.o(new n(p.Zj))};p.prototype.r5=
function(q){q?(this.rc.Ra(!q.get("mandatory",!1)),this.Pf.start(q)):this.qv()};p.prototype.qv=function(){this.rc.Ra(!0);this.yV()};p.prototype.QCa=function(){this.II()};p.prototype.kd=function(){this.$ja=!0;this.bb()};p.prototype.AM=function(){return this.Po!=null};p.prototype.yV=function(){this.Lv();var q=this;this.Po=setTimeout(function(){q.Po=null;q.pia()},this.zS)};p.prototype.Lv=function(){this.Po&&(clearTimeout(this.Po),this.Po=null)};p.prototype.pia=function(){this.r5(this.yga)};p.prototype.bb=
function(){this.o(new n(p.oc))};p.prototype.vn=function(q,r,t,u){this.j.setPosition(q,r,t,u)};p.prototype.Ez=function(q,r,t){var u=!1,v=Math.abs(q)<.001&&Math.abs(r)<.001&&Math.abs(t)<.001;v||this.DC?(u=this.pp!=1,this.Xv=this.Wv=this.tT=this.wT=this.vT=this.uT=!1,this.pp=!0):(this.uT!=q<-.001&&(this.uT=!this.uT,u=!0),this.vT!=q>.001&&(this.vT=!this.vT,u=!0),this.tT!=r<-.001&&(this.tT=!this.tT,u=!0),this.wT!=r>.001&&(this.wT=!this.wT,u=!0),this.Wv!=t<-.001&&(this.Wv=!this.Wv,u=!0),this.Xv!=t>.001&&
(this.Xv=!this.Xv,u=!0),this.pp!=v&&(this.pp=!this.pp,u=!0));v||this.o(new n(p.Gr,{yaw:this.Ga,pitch:this.rb,roll:this.sd,hfov:this.kb}));u&&((this.ha||this.pp)&&this.o(new n(p.Cl,{movingLeft:this.uT,movingRight:this.vT,movingUp:this.wT,movingDown:this.tT,zoomingIn:this.Wv,zoomingOut:this.Xv,stopped:this.pp})),this.II())};p.prototype.II=function(){if(this.ha){var q=this.Pf.ql();this.pp||(q=l.PLAYING)}else q=l.ca;this.Jj!=q&&(this.Jj=q,this.o(new n(p.gd,{state:this.Jj})))};p.oc="request frame";p.Cl=
"movement change";p.Gr="position change";p.gd="playback state change";p.$j="user interaction start";p.Zj="user interaction end";return p});
define("tdv/player/view/panorama/control/transition/PositionController","require tdv/constants/EventName tdv/player/view/panorama/control/camera/LimitsManager tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/URL tdv/player/view/util/XR tdv/player/view/util/geo/Quaternion".split(" "),function(a){function m(d,f,l){this.j=d;this.Cc=f;this.fp=this.Cc.fp;this.H=l;this.va=new h(d);l.qh&&this.va.Vf(l.qh);this.Bz=new h(d);this.Lka=this.NC=this.OC=void 0;this.Ga=this.j.Jc();
this.rb=this.j.Ic();this.sd=this.j.yg();this.kb=this.H.qh?this.j.jf():this.Cc.kw()?this.Cc.PW(m.Raa):m.Raa;this.EFa=0;this.Ba=null;this.iAa=!0}a("tdv/constants/EventName");var h=a("tdv/player/view/panorama/control/camera/LimitsManager");a("tdv/player/view/util/Device");var n=a("tdv/player/view/util/Gyroscope"),g=a("tdv/player/view/util/URL"),k=a("tdv/player/view/util/XR"),e=a("tdv/player/view/util/geo/Quaternion");new THREE.Euler;m.prototype.Vf=function(d,f,l){if(this.Ba!=d)if(this.hD=!0,this.Ba=
d,this.j.Aw()){this.Lka=this.Ga;for(d=this.Lka-f;d>180;)d-=360;for(;d<-180;)d+=360;k.kK(f)}else this.vra(f,l)};m.prototype.vra=function(d,f){this.Ga=d;this.rb=f};m.prototype.iJ=function(d){this.Cc.lRa(d);return this.Cc.jf()};m.prototype.rr=function(d){this.kb=d};m.prototype.bZ=function(d){this.iAa=d};m.prototype.sK=function(d){this.EFa=d};m.prototype.YA=function(){this.fp!=this.Cc.fp&&(this.fp=this.Cc.fp,this.kb=this.Cc.PW(this.kb));if(this.H.Va()){var d=e.iaa(k.ug,!0);this.j.Aw()&&(this.Ga=d.Xa);
this.rb=c===void 0?d.pitch:c;this.sd=b===void 0?d.Mg:b;this.OC=this.Ga;this.NC=this.rb}else if(this.H.gMa()){d=n.Ft();var f=this.nI(d.yaw,this.Ga);this.Ga+=this.OC===void 0?0:f-this.OC;this.rb+=this.NC===void 0?0:d.pitch-this.NC;this.sd=d.roll;this.OC=d.yaw;this.NC=d.pitch}else d=this.nI(this.j.Jc(),this.Ga),f=this.j.Ic(),this.Ga+=this.OC===void 0?0:d-this.OC,this.rb+=this.NC===void 0?0:f-this.NC,this.sd=this.j.yg();this.hD&&this.va.Vf(this.Ba);this.va.dB(this.H.Va());this.va.setPosition(this.Ga,
this.rb,this.sd,this.kb,this.Cc.kw());if(this.hD)if(this.hD=!1,this.H.Va())(d=this.H.qh&&this.j.Jf(this.H.qh))&&d.set("deltaYaw",this.Lka-this.va.Jc());else if(d=this.H.qh&&this.j.Jf(this.H.qh))d.set("deltaYaw",this.j.Jc()-this.va.Jc()),d.set("deltaPitch",this.j.Ic()-this.va.Ic()),d.set("deltaRoll",this.j.yg()-this.va.yg());this.Ga=this.va.Jc();this.rb=this.va.Ic();this.sd=this.va.yg();this.H.Va()||this.H.gMa()||(this.OC=this.Ga,this.NC=this.rb);this.kb=this.iAa?this.va.uA():this.kb;this.j.setPosition(this.Ga,
this.rb,this.sd,this.kb);this.j.sK(this.EFa)};m.prototype.e$=function(d,f){this.Bz.Vf(d);this.Bz.setPosition(0,0,0,f,this.Cc.kw());return this.Bz.uA()};m.prototype.Yjb=function(d,f){this.Bz.Vf(d);this.Bz.setPosition(f.Xa,f.pitch,f.Mg,f.Wd,this.Cc.kw());f.Xa=this.Bz.Jc();f.pitch=this.Bz.Ic();f.Mg=this.Bz.yg();f.Wd=this.Bz.uA()};m.prototype.nI=function(d,f){for(;d+180<f;)d+=360;for(;d-180>f;)d-=360;return d};m.prototype.TJa=function(){return m.Raa};m.Raa=TDV.pua.oUa;var b=g.Ak("debug")?g.I7("force_vr_roll"):
void 0,c=g.Ak("debug")?g.I7("force_vr_pitch"):void 0;return m});
define("tdv/player/view/panorama/control/transition/TransitionData",["require","tdv/player/script/RotationalCameraPosition","tdv/player/script/RotationalCameraDisplayPosition","tdv/player/view/util/Device","tdv/player/view/util/FileType"],function(a){function m(b,c,d,f,l){this.j=b;this.Zh=c;b=this.j.P;this.pQ=b.get("transitionMode","blending");c=b.get("transitionDuration",500);this.Z2a(d,f)&&(this.pQ=m.l_,c=1500);this.ana=b.get("blendingTransitionDuration",c);this.Deb=b.get("firstTransitionDuration",
c);this.YJa=b.get("disolveTransitionDuration",c);this.RSa=b.get("translationTransitionDuration",1E3);b.get("translationTransitionSpeed");this.SSa=b.get("translationTransitionEnabled",!0);this.pPa=b.get("panoramaToPanoramaModelTransitionEnabled",!0);this.cPa=b.get("originTransitionDuration",3E3);this.a8=400;this.Caa=1E3;this.Whb=b.get("modelToPanoramaTraslationDuration",1500);this.Uib=b.get("panoramaToModelTraslationDuration",1E3);this.qh=d;this.bmb=!d||d.Zoa();this.cmb=!d||d.OMa();this.Sc=f;this.qSa=
!f||f.Zoa();this.Zra=!f||f.OMa();this.zmb=!!f&&this.Zga(f);c=(this.yK=l)&&l.get("initialPosition")||new h;this.Eh=new h;this.Eh.set("yaw",c.get("yaw",0));this.Eh.set("pitch",c.get("pitch"));this.Eh.set("hfov",c.get("hfov"));this.vg=new n;this.vg.set("yaw",this.Eh.get("yaw"));this.vg.set("pitch",this.Eh.get("pitch"));this.vg.set("hfov",this.Eh.get("hfov"));this.vg.set("stereographicFactor",0);this.br=[];if(!d){this.br=l&&l.get("displayMovements")||[];for(c=this.br.length-1;c>=0;c--)this.vg.set("yaw",
this.vg.get("yaw",this.br[c].get("targetYaw"))),this.vg.set("pitch",this.vg.get("pitch",this.br[c].get("targetPitch"))),this.vg.set("hfov",this.vg.get("hfov",this.br[c].get("targethfov"))),this.vg.set("stereographicFactor",this.vg.get("stereographicFactor",this.br[c].get("stereographicFactor")));l=l&&l.get("displayOriginPosition")||this.Eh;this.vg.set("yaw",l.get("yaw"));this.vg.set("pitch",l.get("pitch"));this.vg.set("hfov",l.get("hfov"));this.vg.set("stereographicFactor",l.get("stereographicFactor"))}this.qQ=
this.pQ==m.Op&&this.SSa&&this.qSa&&this.F2a(d,f)||null;var p=this.pQ==m.Op&&this.Sc&&this.qSa&&this.Zh&&this.Sc.get("modelLocations")||[];l=this.pQ==m.Op&&this.qh&&this.bmb&&this.Zh&&this.qh.get("modelLocations")||[];var q=[];l.forEach(function(t){p.forEach(function(u){t.get("model")==u.get("model")&&q.push([t,u])})});var r=this.Zh&&this.Zh.get("model");this.Fc=this.nc=null;q.length>1&&this.Zh&&(c=q.find(function(t){return t[0].get("model")==r}))&&(q=[c]);(c=q.length?q[0]:null)&&(r&&c[0].get("model")==
r||c[0].get("forceModelLoading")||c[1].get("forceModelLoading"))?(this.nc=c[0],this.Fc=c[1]):(this.nc=l.find(function(t){return t.get("preferred")}),this.nc||this.Fc||(this.Fc=p.find(function(t){return t.get("preferred")})),[].concat(l,p).forEach(function(t){t.set("preferred",!1)}),this.nc||this.Fc||(this.nc=l.find(function(t){return t.get("model")==r})),this.nc||this.Fc||(this.Fc=p.find(function(t){return t.get("model")==r})),this.nc||this.Fc||(this.nc=l.find(function(t){return t.get("forceModelLoading")})),
this.nc||this.Fc||(this.Fc=p.find(function(t){return t.get("forceModelLoading")})));(this.Fc||this.nc)&&b.get("translationTransitionSpeed")&&(this.Fc||this.nc).get("model").get("worldUnitToMeters")&&(this.RSa=b.get("translationTransitionSpeed")/(this.Fc||this.nc).get("model").get("worldUnitToMeters"));this.Be=null;this.dmb=g.Nd()==g.vj?512:1536;this.Amb=g.Nd()==g.vj?512:this.Va()?1536:1024;this.qE=this.r4a();this.mode=(b=!this.Va()||this.E3a())&&this.nc&&this.Fc&&this.qQ&&this.pPa?m.rca:b&&this.nc&&
this.Fc&&this.SSa&&this.pPa?m.Gua:this.qQ?m.Fua:b&&!this.qh&&this.Fc?m.qca:b&&!this.Sc&&this.nc?m.Hua:d?f?this.pQ=="blending"?m.Op:m.l_:m.sta:m.rta;this.mode!=m.Op||this.cmb&&this.Zra||!(this.vg.get("stereographicFactor",0)>0||this.br.filter(function(t){return t.get("targetStereographicFactor",0)>0}).length>0)||(this.mode=m.l_);this.Fm=null}var h=a("tdv/player/script/RotationalCameraPosition"),n=a("tdv/player/script/RotationalCameraDisplayPosition"),g=a("tdv/player/view/util/Device"),k=a("tdv/player/view/util/FileType");
m.prototype.gMa=function(){return this.j.ld.get("gyroscopeEnabled")};m.prototype.Va=function(){return this.j.P.get("viewMode")=="vr"};m.prototype.F2a=function(b,c){if(!b||!c)return null;b=(b.get("adjacentPanoramas")||[]).filter(function(d){return d.get("enabled")&&d.Bcb()&&d.get("panorama")==c});return b.length==0?null:b[0]};m.prototype.Z2a=function(b,c){return this.Va()&&g.Nd()==g.vj&&(this.Zga(b)||this.Zga(c))};m.prototype.Zga=function(b){return!!b&&b.Mn()};m.prototype.r4a=function(){var b=this.Wfa()&&
this.Wfa().get("model");return(b=b&&b.get("levels")[0])&&k.is(b.get("url"),k.uta)};m.prototype.Wfa=function(){var b=this.Fc||this.nc;return b&&b.get("model")};m.prototype.E3a=function(){var b=this.Wfa();b=(b=b&&b.get("camera"))&&(b.get("vrEnabled")||b.get("xrEnabled"))&&!this.j.P.Vb().get(e);return this.Va()&&!b?!1:!0};var e=function(b){return b.map(function(c){return String.fromCharCode(c)}).join("")}([119,97,116,101,114,109,97,114,107]);m.l_="fade_out_fade_in";m.rta="fade_in";m.sta="fade_out";m.Op=
"blending";m.Fua="translation";m.qca="translation_from_model";m.rca="translation_through_model";m.Gua="translation_to_from_model";m.Hua="translation_to_model";return m});define("tdv/player/view/panorama/control/transition/steps/Step",["require","exports"],function(){return function(){function a(m,h,n,g){this.U=m;this.Uc=h;this.j=n;this.H=g}a.prototype.mh=function(){return!1};a.prototype.Yg=function(){};a.prototype.hE=function(){return!1};return a}()});
define("tdv/player/view/panorama/control/transition/steps/Blend",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.la=null;this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(k){if(!this.Rb){if(!this.la){var e=
this.j.Jf(this.H.Sc);e.yi();e.set("alpha",.01);this.la=new n("linear",[new g("alpha",0,1,void 0)],this.H.ana)}this.la.Nb(k);k=this.la.ob("alpha");e=this.j.Jf(this.H.Sc);e.set("alpha",k);this.la.Ve()&&(this.Rb=!0)}};return a});
define("tdv/player/script/ProjectedMaterialModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("ProjectedMaterialModel3DObject",h,function(){h.call(this)})});
define("tdv/player/view/panorama/control/transition/steps/SingleOperationStep",["require","exports","tdv/player/view/panorama/control/transition/steps/Step"],function(a,m,h){return function(n){function g(k,e,b,c){k=n.call(this,k,e,b,c)||this;k.Rb=!1;return k}P(g,n);g.prototype.mh=function(){return this.Rb};g.prototype.Yg=function(){this.Rb||(this.Ch(),this.Rb=!0)};g.prototype.Ch=function(){};return g}(h)});
define("tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel",["require","tdv/utils","tdv/player/script/ProjectedMaterialModel3DObject","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/script/ProjectedMaterialModel3DObject"),n=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),g=m.extend(n,function(k,e,b,c,d){n.call(this,k,e,b,c);this.cj=d||3});g.prototype.Ch=function(){var k=
this.H.nc,e=this.H.Fc,b=this.H.Be=this.H.Be||new h;b.set("sourceAlpha",0);b.set("targetAlpha",0);this.cj&1&&(b.set("sourceX",k.get("x")),b.set("sourceY",k.get("y")),b.set("sourceZ",k.get("z")),b.set("sourceYaw",k.get("yaw")),b.set("sourceCubeTexture",this.wwa(this.H.qh,this.H.dmb)),b.set("sourceAlpha",1));this.cj&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.v8a(this.H.Sc),b.set("targetCubeTexture",this.wwa(this.H.Sc,this.H.Amb)));
this.H.qE?(b.set("nearPlane",!0),b.set("skybox",!1)):(b.set("nearPlane",!1),b.set("skybox",!0));k=(k||e).get("model");k.get("objects").indexOf(b)==-1&&k.set("objects",k.get("objects").concat([this.H.Be]))};g.prototype.wwa=function(k,e){k=this.j.Jf(k);var b=k.get("alpha");k.set("alpha",1);e=this.j.hna(e);k.set("alpha",b);return e};g.prototype.v8a=function(k){k.get("frames").forEach(function(e,b){this.j.Jf(e).set("alpha",b==k.oX()?1:0)}.bind(this))};g.kca=m.extend(g,function(k,e,b,c){g.call(this,k,
e,b,c,1)});g.sca=m.extend(g,function(k,e,b,c){g.call(this,k,e,b,c,2)});return g});
define("tdv/player/view/panorama/control/transition/steps/EnforceAdded",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.H.Sc&&!this.j.Jf(this.H.Sc)&&(this.si=this.j.create(this.H.Sc),this.si.set("alpha",0),this.j.add(this.si),this.j.D$(!1))};return a});
define("tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded",["require","tdv/utils","tdv/constants/EventName","tdv/player/script/MediaPlayer","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/script/MediaPlayer"),g=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(g,function(k,e,b,c){g.call(this,k,e,b,c)});a.prototype.Yg=function(){this.yz||this.Fa||(this.Fa=(this.H.nc||this.H.Fc).get("model"),
this.lv=this.H.Zh,this.Fa.get("camera").set("inTransition",!0),this.lv.j.Ra(!0),this.yz=!1,this.Fa?this.lv.get("model")==this.Fa&&this.Fa.get("isLoaded")?(this.dz(),this.jn(),this.yz=!0):(this.lv.set("model",this.Fa),this.Fa.bind(h.ia,this.dz,this,!0),this.lv.set("requesterPlayer",this.j.ld),this.lv.bind(n.di,this.jn,this,!0)):this.yz=!0)};a.prototype.mh=function(){this.lv.j.oRa(this.Fa,!1);return this.yz};a.prototype.hE=function(){return!0};a.prototype.dz=function(){this.Fa.h(h.ia,this.dz,this)};
a.prototype.jn=function(){this.lv.h(n.di,this.jn,this,!0);this.yz=!0};return a});
define("tdv/player/view/panorama/control/transition/steps/RequestMediaActivation",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep","tdv/view/util/AudioActivation"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),n=a("tdv/view/util/AudioActivation");a=m.extend(h,function(g,k,e,b){h.call(this,g,k,e,b)});a.prototype.Ch=function(){if(this.H.zmb){var g=this.H.Sc.get("frames")[0];g=g.get("sphere")||
g.get("stereoSphere");var k=g.get("levels")||[];(g.get("hasAudio")===!0||k.length>0&&k[0].get("hasAudio")===!0)&&n.request(this.j.Vb())}};return a});
define("tdv/player/view/panorama/control/transition/steps/Display",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.j.Jf(this.H.Sc).set("alpha",1)};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeIn",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.ej=this.j.P.Rc();this.la=null;this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=
function(k){if(!this.Rb){if(!this.la){var e=this.j.P.oob()&&!this.H.qh?this.H.Deb:this.H.ana;this.H.Va()&&(e=Math.max(e,100));this.la=new n("linear",[new g("alpha",this.H.Va()?-500/e:0,1,void 0)],e+(this.H.Va()?500:0));this.ej.kmb();this.ej.xK();this.H.Va()&&this.j.Jf(this.H.Sc).set("alpha",1)}this.la.Nb(k);k=Math.max(.001,this.la.ob("alpha"));this.H.Va()||this.j.Jf(this.H.Sc).set("alpha",k);this.ej.lK(k);this.la&&this.la.Ve()&&(this.Rb=!0,this.ej.mJ())}};return a});
define("tdv/player/view/panorama/renderer/object/Base",["require","tdv/utils","tdv/events/EventDispatcher","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var m=a("tdv/utils"),h=a("tdv/events/EventDispatcher"),n=a("tdv/player/view/panorama/renderer/3d/util/Util");a=m.extend(h,function(){h.call(this);this.Ia=this.La=null;this.qe=[];this.J1=this.ih=!1;this.zT=null;this.Rl=[this];this.tma={};this.Tu={};this.tS=!1;this.Aja={};this.Bja={};this.Zr(["blendingActive","globalBlendingActive"]);
this.ZWa();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.ZWa=function(){var g="alpha deltaYaw deltaPitch deltaRoll translationX translationY translationZ".split(" ");Array.isArray(g)||(g=[g]);g.forEach(function(k){this.Aja[k]=!0}.bind(this))};a.prototype.Zr=function(g){Array.isArray(g)||(g=[g]);g.forEach(function(k){this.Bja[k]=
!0}.bind(this))};a.prototype.set=function(g,k){this.tma[g]!==k&&(this.Bja[g]&&this.qe.forEach(function(e){e.set(g,k)}),this.GXa(g,k),this.$U(g))};a.prototype.get=function(g){return this.tma[g]};a.prototype.$U=function(g){this.Tu[g]||(this.Tu[g]=!0,this.tS||(this.tS=!0,this.Na()),this.Aja[g]&&this.qe.forEach(function(k){k.$U(g)}))};a.prototype.mZa=function(){this.tS&&(this.tS=!1,this.Tu={})};a.prototype.W=function(){if(this.tS)for(var g=0;g<arguments.length;g++)if(this.Tu[arguments[g]])return!0;return!1};
a.prototype.GXa=function(g,k){this.tma[g]=k};a.prototype.Cb=function(){return this.qe};a.prototype.bi=function(g){var k=g||[],e=this.qe.slice();g=k.length!=e.length;for(var b=0;b<k.length&&!g;b++)g=k[b]!=e[b];g&&(g=e.filter(function(c){return k.indexOf(c)==-1}),b=k.filter(function(c){return e.indexOf(c)==-1}),this.qe=k,g.forEach(function(c){c.Z4(null)}),b.forEach(function(c){c.remove();c.Z4(this)}.bind(this)),this.Na())};a.prototype.Z4=function(g){this.Ia!=g&&(this.Ia&&this.np(),(this.Ia=g)&&this.$r(),
this.wka(this.Ia&&this.Ia.La))};a.prototype.$r=function(){for(var g in this.Ia.Aja)this.$U(g);for(g in this.Ia.Bja)this.set(g,this.Ia.get(g))};a.prototype.np=function(){};a.prototype.wka=function(g){this.La!=g&&(g||this.mc(),(this.La=g)&&this.hc(),this.qe.forEach(function(k){k.wka(this.La)}.bind(this)))};a.prototype.hc=function(){this.vXa()};a.prototype.mc=function(){this.R6a()};a.prototype.vXa=function(){this.Rl.forEach(function(g){this.La.zT.add(g,this)}.bind(this))};a.prototype.R6a=function(){this.Rl.forEach(function(g){this.La.zT.remove(g,
this)}.bind(this))};a.prototype.yi=function(){this.Ia&&this.Ia.ena(this)};a.prototype.ena=function(g){var k=this.qe.indexOf(g);if(k==-1)throw"Child not found";k!=this.qe.length-1&&(this.qe.splice(k,1),this.qe.push(g),this.Na())};a.prototype.web=function(g){var k=this.qe.indexOf(g);if(k==-1)throw"Child not found";this.qe.splice(k,1);g.Z4(null);this.Na()};a.prototype.appendChild=function(g){g.remove();this.qe.push(g);g.Z4(this);this.Na()};a.prototype.remove=function(){this.Ia&&this.Ia.web(this)};a.prototype.ao=
function(){};a.prototype.Na=function(){this.ih||(this.ih=!0,this.Ia&&this.Ia.Na(this))};a.prototype.vZa=function(){this.ih=!1};a.prototype.Vja=function(){this.J1||(this.J1=!0,this.Ia&&this.Ia.Vja())};a.prototype.rZa=function(){this.J1=!1};a.prototype.za=function(){this.EGa();this.W("translationX","translationY","translationZ")&&(this.set("composedTranslationX",this.get("translationX")+(this.Ia?this.Ia.get("composedTranslationX"):0)),this.set("composedTranslationY",this.get("translationY")+(this.Ia?
this.Ia.get("composedTranslationY"):0)),this.set("composedTranslationZ",this.get("translationZ")+(this.Ia?this.Ia.get("composedTranslationZ"):0)));this.W("deltaYaw","deltaPitch","deltaRoll")&&(this.set("composedDeltaYaw",this.get("deltaYaw")+(this.Ia?this.Ia.get("composedDeltaYaw"):0)),this.set("composedDeltaPitch",this.get("deltaPitch")+(this.Ia?this.Ia.get("composedDeltaPitch"):0)),this.set("composedDeltaRoll",this.get("deltaRoll")+(this.Ia?this.Ia.get("composedDeltaRoll"):0)),n.NMa())};a.prototype.EGa=
function(){this.W("alpha")&&this.set("composedAlpha",this.get("alpha")*(this.Ia?this.Ia.get("composedAlpha"):1))};return a});
define("tdv/player/view/panorama/renderer/3d/util/TextureUtil",["require","tdv/player/view/image/Repository","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var m=a("tdv/player/view/image/Repository"),h=a("tdv/player/view/panorama/renderer/3d/util/Util"),n={q4a:void 0,Zkb:function(g){this.q4a=g},M_a:void 0,nkb:function(g){this.M_a=g},createTexture:function(){var g=new THREE.Texture;g.colorSpace=THREE.SRGBColorSpace;g.generateMipmaps=!1;g.minFilter=THREE.LinearFilter;g.magFilter=THREE.LinearFilter;
g.image=n.sJ();g.userData={};g.userData.GSa={};return g},Spb:function(g){return g.image==this.sJ()},Scb:function(g){g.image!=this.sJ()&&(g.image=this.sJ(),g.needsUpdate=!0,g.bqb=!0)},IZ:function(g,k){k=this.Oeb(k);h.wP(k)&&(k.videoWidth&&k.videoHeight&&(k.width=k.videoWidth,k.height=k.videoHeight),h.ETa(k)&&(k=this.uab(g,k)));g.image=k;g.needsUpdate=!0;h.NMa()},Oeb:function(g){g?h.fpa(g)?g=m.xg(g,!1):h.eNa(g)?g=this.sJ():!h.wP(g)||g.readyState>=g.HAVE_CURRENT_DATA&&g.videoWidth>0&&g.videoHeight>0||
(g=this.sJ()):g=this.sJ();return g},Ldb:function(g,k,e,b,c){var d=document.createElement("canvas");d.width=h.Ix();d.height=h.Ix();d.$ka=!0;var f=d.getContext("2d");if(!f)return null;f.drawImage(g,k,e,b,c,0,0,h.Ix(),h.Ix());this.v7(d);return d},Ena:function(g){h.hhb(g)&&g.$ka&&(delete g.$ka,g.width=0,g.height=0)},dispose:function(g){g.qs&&g.qs!=g.image&&this.Ena(g.qs);g.image&&this.Ena(g.image);g.dispose()},DRa:function(g,k){g.userData.GSa.material=k},RLa:function(g){return g.userData.GSa.material},
Fpb:function(g){return h.epa(g)},decode:function(g){h.fpa(g)&&(g=m.xg(g,!1));h.epa(g)&&this.v7(g)},v7:function(g){var k=document.createElement("canvas");k.width=1;k.height=1;var e=k.getContext("2d");n.v7=function(b){e.drawImage(b,0,0,1,1,0,0,1,1)};return n.v7(g)},wea:null,sJ:function(){if(!this.wea){var g=document.createElement("canvas");g.width=128;g.height=128;g.I3a=!0;g.getContext("2d").clearRect(0,0,g.width,g.height);this.wea=g}return this.wea},uab:function(g,k){g.qs||(g.qs=document.createElement("canvas"),
g.s3a=g.qs.getContext("2d"),g.qs.$ka=!0);var e=k.videoWidth;h.gr()&&(e=Math.min(4096,e));var b=e*k.videoHeight/k.videoWidth;if(g.qs.width!=e||g.qs.height!=b)g.qs.width=e,g.qs.height=b;k.readyState>=k.HAVE_CURRENT_DATA&&g.s3a.drawImage(k,0,0,e,b);return g.qs}};return n});
define("tdv/player/view/panorama/renderer/3d/util/MaterialUtil",["require","tdv/player/view/panorama/renderer/3d/util/Util","tdv/player/view/panorama/renderer/3d/util/TextureUtil","tdv/player/view/util/Device"],function(a){function m(e){this.CZ=(e=h.rP(e))&&h.wMa();this.MX=e&&h.vMa();this.QD=0;this.bw=void 0;this.JW=this.KW=0;this.premultipliedAlpha=!1;this.side=void 0;this.params={}}var h=a("tdv/player/view/panorama/renderer/3d/util/Util"),n=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil");
a=a("tdv/player/view/util/Device");var g=a.Yb()==a.nx||a.Yb()==a.Nk||a.Yb()==a.sj,k={zoa:function(e){return e.map||e.uniforms&&e.uniforms.textureSampler2D&&e.uniforms.textureSampler2D.value},rt:function(e,b){e||(e=n.createTexture());b||(b=new k.Rp);e=b.CZ||b.MX||b.QD||b.bw||b.premultipliedAlpha||e.isVideoTexture&&g?this.Fdb(e,b):this.sna(e);b.side&&(e.side=b.side);for(var c in b.params)e[c]=b.params[c];return e},hcb:function(e,b){e.isShaderMaterial?e.uniforms.textureSampler2D.value=b:e.map=b;e.needsUpdate=
!0},sna:function(e){var b=new THREE.MeshBasicMaterial;b.map=e;this.oG(b);return b},Fdb:function(e,b){var c={uniforms:{},transparent:!0};c.uniforms.textureSampler2D={type:"sampler2D",value:e};e.flipY=!b.CZ;c.vertexShader=["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+(b.CZ?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(b.MX||b.QD||b.bw||b.premultipliedAlpha){var d=[],f=[];d=d.concat(["uniform sampler2D textureSampler2D;",
"uniform float opacity;","varying vec2 vUV;"]);c.uniforms.opacity={type:"float",value:1};f=f.concat(["   vec4 color = texture2D(textureSampler2D, vUV);","   float alpha = color.a * opacity;"]);b.premultipliedAlpha&&(f=f.concat(["   if ((color.a > 0.0) && (color.a < 1.0))","       color.rgb /= color.a;","\tcolor = vec4( mix( pow( color.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), color.rgb * 0.0773993808, vec3( lessThanEqual( color.rgb, vec3( 0.04045 ) ) ) ), color.a );"]));if(b.QD){var l=
e.image.width||e.image.videoWidth,p=e.image.height||e.image.videoHeight,q=Math.min(l,p)*.5*b.QD;c.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(q/l,q/p)};d=d.concat(["uniform vec2 blendingLimit;"]);f=f.concat("   float xCoef = 0.0;,   float yCoef = 0.0;,   if (vUV.x < blendingLimit.x) {,      xCoef = 1.0 - (vUV.x / blendingLimit.x);,      xCoef = xCoef * xCoef;,   } else if ((1.0 - vUV.x) < blendingLimit.x) {,      xCoef = 1.0 - ((1.0 - vUV.x) / blendingLimit.x);,      xCoef = xCoef * xCoef;,   },   if (vUV.y < blendingLimit.y) {,      yCoef = 1.0 - (vUV.y / blendingLimit.y);,      yCoef = yCoef * yCoef;,   } else if ((1.0 - vUV.y) < blendingLimit.y) {,      yCoef = 1.0 - ((1.0 - vUV.y) / blendingLimit.y);,      yCoef = yCoef * yCoef;,   },   alpha = alpha * (1.0 - sqrt(xCoef + yCoef));".split(","))}b.bw&&
(c.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(b.bw.substr(1,2),16)/255,parseInt(b.bw.substr(3,2),16)/255,parseInt(b.bw.substr(5,2),16)/255)},c.uniforms.chromaThreshold={type:"f",value:b.KW},c.uniforms.chromaSmoothing={type:"f",value:b.JW},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.MX?".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.oG(e);return e},dispose:function(e){Array.isArray(e)||(e=[e]);e.forEach(function(b){var c=k.zoa(b);c&&n.dispose(c);b.dispose()})},oG:function(e){e.side=THREE.FrontSide;e.transparent=!0;e.depthTest=!1;e.needsUpdate=!0;e.userData={};e.userData.ANa={};n.DRa(k.zoa(e),e)},ora:function(e,b){e.userData.ANa.Ke=b},sLa:function(e){return e.userData.ANa.Ke}};m.prototype.isEqual=function(e){return this.CZ===e.CZ&&this.MX===e.MX&&this.QD===e.QD&&this.bw===e.bw&&
this.KW===e.KW&&this.JW===e.JW&&this.premultipliedAlpha===e.premultipliedAlpha&&this.side===e.side};k.Rp=m;return k});
define("tdv/player/view/panorama/renderer/3d/util/MeshUtil",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/3d/util/MaterialUtil"],function(a){function m(k){return Array.isArray(k)?k:k?[k]:[]}var h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),g={create:function(k,e){var b=new THREE.Mesh(k,e);b.overdraw=!1;b.matrixAutoUpdate=!1;b.userData.IA={};b.userData.IA.attributes=
{};m(e).forEach(function(c){n.ora(c,b)});return b},IJa:function(k){var e=new THREE.Group;g.forEach(k,function(b){e.add(b)});return e},Ykb:function(k,e){m(e).forEach(function(b){n.ora(b,null)});n.dispose(k.material);k.material=e;m(e).forEach(function(b){n.ora(b,k)})},bE:function(k){return m(k.material)},Bfb:function(k,e){if(k.layers.mask&e.layers.mask){var b=g.bE(k);return h.zfb(k.geometry,e,k.matrixWorld).map(function(c){return b[c]})}return[]},gra:function(k,e){k.geometry=e},tfb:function(k,e){var b=
[];g.pl(k,function(c){var d=g.bE(c);e.forEach(function(f){var l=h.sfb(c.geometry,c.matrixWorld,f);if(l){f=n.zoa(d[l.materialIndex]).image;var p=Math.round(l.$Sa*f.width-.5);p=p<0?0:p>f.width-1?f.width-1:p;l=Math.round((1-l.ATa)*f.height-.5);l=l<0?0:l>f.height-1?f.height-1:l;b.push({x:p,y:l,source:f})}})});return b},Xw:function(k,e){g.forEach(k,function(b){e?e.add(b):b.parent&&b.parent.remove(b)})},oF:"panoramaId",LK:"panoramaFrameId",Eaa:"panoramaOverlayId",Daa:"levelIndex",setAttribute:function(k,
e,b){g.pl(k,function(c){c.userData.IA.attributes[e]=b})},getAttribute:function(k,e){return k.userData.IA.attributes[e]},wKa:function(k,e,b){for(var c=[],d=0,f=k.length;d<f;d++){var l=k[d];l.userData.IA.attributes[e]!==b&&c.push(l)}return c},o7:function(k,e,b){for(var c=[],d=0,f=k.length;d<f;d++){var l=k[d];l.userData.IA.attributes[e]===b&&c.push(l)}return c},dMa:function(k,e){for(var b={},c=0,d=k.length;c<d;c++){var f=k[c],l=f.userData.IA.attributes[e];l!==void 0&&(b[l]||(b[l]=[])).push(f)}return b},
foa:function(k){k=k.userData.IA.alpha;return k===void 0?1:k},nf:function(k,e){g.pl(k,function(b){b.userData.IA.alpha=e;g.bE(b).forEach(function(c){c.opacity=e;c.type=="ShaderMaterial"&&c.uniforms&&c.uniforms.opacity&&(c.uniforms.opacity.value=e)})})},ot:function(k,e){g.pl(k,function(b){b.matrix.copy(e);b.matrixWorldNeedsUpdate=!0})},YLa:function(k){return k.renderOrder},M$:function(k,e){g.forEach(k,function(b){b.renderOrder=e})},dispose:function(k){g.pl(k,function(e){e.geometry&&(h.dispose(e.geometry),
e.geometry=void 0);e.material&&(n.dispose(e.material),e.material=void 0)})},rm:function(k){var e=[];g.pl(k,function(b){e.push(b)});return e},forEach:function(k,e){Array.isArray(k)?k.forEach(e):k&&k.isObject3D&&(k.isMesh||k.type=="Group")&&e(k)},pl:function(k,e){if(Array.isArray(k))for(var b=0,c=k.length;b<c;b++)g.pl(k[b],e);else if(k&&k.children)for(b=0,c=k.children.length;b<c;b++)g.pl(k.children[b],e);k&&k.isObject3D&&k.isMesh&&e(k)}};return g});
define("tdv/player/view/panorama/renderer/3d/util/SceneUtil",["require","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var m=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil");return{rm:function(h){var n=[];h.children&&h.children.forEach(function(g){m.pl(g,function(k){k.userData&&k.userData.IA&&n.push(k)})});return n},hkb:function(h,n){h.userData.cameras=n},hoa:function(h){return h.userData.cameras||[]},getCamera:function(h){return h.userData.cameras&&h.userData.cameras.length>
0&&h.userData.cameras[0]||null}}});
define("tdv/player/view/panorama/renderer/OcclusionCuller","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil".split(" "),function(a){function m(l,p){return l.reduce(function(q,r){return q?!0:!!(p.layers.mask&r.layers.mask)},!1)}function h(l){l=k(l).loaded;return l===void 0?!1:l}function n(l){l=k(l).active;return l===void 0?!0:l}function g(l){l=k(l).blending;return l===void 0?
!1:l}function k(l){return l.userData.cib||(l.userData.cib={})}var e=a("tdv/utils"),b=a("tdv/constants/EventName"),c=a("tdv/events/EventDispatcher"),d=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),f=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");a=e.extend(c,function(){c.call(this);this.I=void 0;this.Hha=!1});a.prototype.update=function(l){var p=l.Va&&this.I&&!this.I.Va;this.I=l.clone();this.Hha||(p?this.W2a():this.Aab())};a.prototype.Aab=function(){var l=!1,p=f.hoa(this.I.sh),
q=f.rm(this.I.sh);d.o7(q,d.LK,void 0).forEach(function(w){var x=m(p,w)&&d.foa(w)>0&&n(w);w.visible!=x&&(w.visible=x,l=!0)});q=d.wKa(q,d.LK,void 0);q=d.dMa(q,d.oF);for(var r in q){var t=q[r],u=p.map(function(){return!1});t.sort(function(w,x){return d.YLa(x)-d.YLa(w)});var v=t.some(g);t.forEach(function(w){var x=m(p,w)&&d.foa(w)>0&&n(w)&&(!v||h(w));if(x){x=!0;for(var y=v||h(w)&&d.foa(w)>.999,z=0;z<p.length;z++)w.layers.mask&p[z].layers.mask&&!u[z]&&(x=!1,y&&(u[z]=!0));x=!x}w.visible!=x&&(w.visible=
x,l=!0)})}l&&this.o(b.V)};a.prototype.W2a=function(){this.Hha=!0;f.rm(this.I.sh).forEach(function(l){l.visible=!1});setTimeout(function(){this.Hha=!1;this.update(this.I)}.bind(this),300);this.o(b.V)};a.cZ=function(l,p){k(l).loaded=p};a.setActive=function(l,p){k(l).active=p};a.PQa=function(l,p){d.pl(l,function(q){k(q).blending=p})};return a});
define("tdv/player/view/panorama/renderer/TextureLoader","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/panorama/renderer/OcclusionCuller tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/util/Device".split(" "),function(a){function m(w){return(w=w.userData.vr)&&!(!w.Dpa&&!w.zpa)}function h(w){return w.userData.vr||
(w.userData.vr={})}function n(w){return h(w).CK}function g(w){return h(w).enabled||!1}function k(w){return!n(w).tpa()}var e=a("tdv/utils"),b=a("tdv/constants/EventName");a("tdv/constants/Priority");var c=a("tdv/events/EventDispatcher"),d=a("tdv/player/view/panorama/renderer/OcclusionCuller"),f=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),l=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),p=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),q=a("tdv/player/view/util/Device"),
r=e.extend(c,function(){c.call(this);this.j=null;this.KM=[];this.RC=[];this.vL=[];this.I=void 0;this.Tv=null;this.HD=this.HD.bind(this)});r.prototype.B$=function(w){this.j=w};r.prototype.update=function(w){this.I=w.clone();this.aab()?this.HD():this.XGa()};r.prototype.XGa=function(){this.Tv||(this.Tv=setTimeout(this.HD,1E3))};var t=Math.PI/180,u=function(){if(q.ub()){if(q.bpa()&&q.nob()>=1)return 2;if(q.xc()==q.ox||q.xc()==q.ru||q.RX())return 1.5}else return 1.5;return 1}();r.prototype.aab=function(){var w=
this.I.Ik>0?1E3:this.I.Rj/Math.tan(Math.min(this.I.kj*.5,89.99)*t);w*=u;var x=p.hoa(this.I.sh),y=p.rm(this.I.sh).filter(m),z=y.filter(g);var A=l.wKa(z,l.LK,void 0);A=l.dMa(A,l.LK);A.none=l.o7(z,l.LK,void 0);z=[];for(var D in A)for(var F=A[D],C=0,B=F.length;C<B;C++){var H=F[C];(h(H).Dpa||r.q_)==r.zu&&z.push(H)}for(var E=0,G=x.length;E<G;E++){var N=x[E];for(D in A){F=A[D];var O=null,R=Number.NEGATIVE_INFINITY,Q=null,K=Number.POSITIVE_INFINITY;C=0;for(B=F.length;C<B;C++)if(H=F[C],H.layers.mask&N.layers.mask&&
(h(H).Dpa||r.q_)==r.q_){var L=h(H).$ib*90;L<w&&L>R?(O=H,R=L):L>=w&&L<K&&(Q=H,K=L)}this.I.Va&&Q&&O?R>.75*w?z.push(O):z.push(Q):(Q&&z.indexOf(Q)<0&&z.push(Q),O&&z.indexOf(O)<0&&z.push(O))}}w=[];for(x=0;x<z.length;x++)D=z[x],w.indexOf(D)<0&&w.push(D);z=w;a:{w=this.vL;for(x=0;x<w.length;x++)if(z.indexOf(w[x])<0){w=!1;break a}for(x=0;x<z.length;x++)if(w.indexOf(z[x])<0){w=!1;break a}w=!0}w=!w;this.vL=z;C=0;for(B=y.length;C<B;C++)H=y[C],g(H)&&d.setActive(H,this.vL.indexOf(H)>=0);return w};r.prototype.HD=
function(){this.Tv=null;for(var w=[],x=[],y=[],z=(new Date).getTime()-v,A=p.hoa(this.I.sh),D=p.rm(this.I.sh),F=0,C=D.length;F<C;F++){var B=D[F],H=B.userData.vr;if(H){var E=l.bE(B);if(H.enabled){var G=[];if(this.vL.indexOf(B)>=0){if(this.I.Ik>0||(h(B).zpa||r.Pba)==r.Nr)G=E;else for(var N=0,O=A.length;N<O;N++){var R=l.Bfb(B,A[N]);if(N==0)G=R;else for(var Q=0,K=R.length;Q<K;Q++){var L=R[Q];G.indexOf(L)<0&&G.push(L)}}Q=0;for(K=G.length;Q<K;Q++)L=G[Q],(L.userData.vr||(L.userData.vr={})).iNa=z}this.hda(B,
G);Q=0;for(K=H.Qt.length;Q<K;Q++)w.push(H.Qt[Q]);Q=0;for(K=H.aB.length;Q<K;Q++)x.push(H.aB[Q])}else for(H.aB||this.hda(B,[]),Q=0,K=H.aB.length;Q<K;Q++)L=H.aB[Q],H.Qt.indexOf(L)<0&&x.push(L);Q=0;for(K=E.length;Q<K;Q++)y.push(E[Q])}}F=[];Q=0;for(K=this.RC.length;Q<K;Q++)L=this.RC[Q],y.indexOf(L)<0?L.userData.vr.CK.aTa():k(L)?this.ska(L,!1):F.push(L);this.RC=F;Q=Math.max(r.FNa(),Math.round(x.length*1.25))-w.length;if(this.RC.length>Q)for(this.RC.sort(function(U,T){return h(U).iNa-h(T).iNa}),F=this.RC.splice(0,
this.RC.length-Q),Q=0,K=F.length;Q<K;Q++)L=F[Q],L.userData.vr.CK.aTa(),this.ska(L,!1);x=[];F=0;for(C=this.vL.length;F<C;F++)B=this.vL[F],H=B.userData.vr,H.Qt.length>0&&x.push(B);y=Number.POSITIVE_INFINITY;F=0;for(C=x.length;F<C;F++)B=x[F],H=B.userData.vr,Q=H.priority,Q=Q!==void 0?Q:Number.POSITIVE_INFINITY,Q<y&&(y=Q);w=[];F=0;for(C=x.length;F<C;F++)if(B=x[F],H=B.userData.vr,Q=H.priority,Q=Q!==void 0?Q:Number.POSITIVE_INFINITY,Q==y)for(R=H.Qt,Q=0,K=R.length;Q<K;Q++)L=R[Q],w.push(L);Q=0;for(K=this.KM.length;Q<
K;Q++)L=this.KM[Q],w.indexOf(L)<0&&(L=L.userData.vr.CK,L.h(b.ia,this.ela,this,!0),L.h(b.$c,this.fla,this,!0),L.Fcb());F=this.KM;this.KM=w;C=this.KM.slice();Q=0;for(K=C.length;Q<K;Q++)L=C[Q],F.indexOf(L)<0&&(L=L.userData.vr.CK,L.bind(b.ia,this.ela,this,!0),L.bind(b.$c,this.fla,this,!0),L.load(this.j))};r.prototype.ela=function(w){this.ZFa(w.source);this.o(b.ia)};r.prototype.fla=function(w){this.ZFa(w.source)};r.prototype.ZFa=function(w){w.h(b.ia,this.ela,this,!0);w.h(b.$c,this.fla,this,!0);var x=w.material(),
y=this.KM,z=y.indexOf(x);z>=0&&y.splice(z,1);this.RC.push(x);this.ska(x,!0);w=w.Ke();h(w).Qt.indexOf(x)>=0&&this.hda(w,h(w).aB);this.XGa()};r.prototype.hda=function(w,x){var y=h(w).aB;y=y?y.length:void 0;var z=h(w).Qt;z=z?z.length:void 0;h(w).aB=x;h(w).Qt=x.filter(k);d.cZ(w,h(w).Qt.length==0&&(h(w).zpa||r.Pba)==r.Nr);x=(x=h(w).aB)?x.length:void 0;var A=h(w).Qt;A=A?A.length:void 0;z===A&&y===x||w.dispatchEvent({type:b.yc,percent:x?100-100*A/x:100});z!==A&&A===0&&w.dispatchEvent({type:b.ia})};r.prototype.ska=
function(w,x){if(x!=w.visible){var y=f.sLa(w),z=l.getAttribute(y,l.oF),A=l.getAttribute(y,l.Daa);if(z===void 0||A===void 0)w.visible=x;else{var D=p.rm(this.I.sh).filter(m);z=l.o7(D,l.oF,z);A=l.o7(z,l.Daa,A);var F=l.bE(y).indexOf(w);w=A.map(function(C){return l.bE(C)[F]});for(y=0;y<w.length&&x;y++)x=x&&n(w[y]).tpa();for(y=0;y<w.length;y++)w[y].visible=x}}};r.FNa=function(){var w=q.B8()||q.C8()?384:q.ub()?128:384;r.FNa=function(){return w};return w};r.Ra=function(w,x){l.pl(w,function(y){h(y).enabled=
x})};r.enabled=g;r.y$=function(w,x){l.pl(w,function(y){h(y).$ib=x})};r.Nr="all";r.Pba="in view";r.fB=function(w,x){l.pl(w,function(y){h(y).zpa=x})};r.zu="always";r.q_="on demand";r.gB=function(w,x){l.pl(w,function(y){h(y).Dpa=x})};r.nZ=function(w,x){l.pl(w,function(y){h(y).priority=x})};r.oK=function(w,x){l.pl(w,function(y){h(y).fqb=x;l.bE(y).forEach(function(z){n(z).Vkb(x)})})};r.eqb=function(w){return 100-100*h(w).Qt.length/h(w).aB.length};r.dqb=function(w){return h(w).Qt.length==0};r.eQ=function(w,
x){(h(w).CK=x)&&(w.visible=x.tpa())};r.CK=n;var v=(new Date).getTime();return r});
define("tdv/player/view/panorama/renderer/object/WebGLObject","require tdv/utils tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/panorama/renderer/OcclusionCuller".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/Base"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),
k=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/player/view/panorama/renderer/OcclusionCuller");a=m.extend(h,function(){h.call(this);this.set("tag","WebGLObject");this.set("zOrder",0);this.set("webglScene",null);this.set("meshGroup",null);this.set("camera",null)});a.prototype.hq=function(){return[]};a.prototype.mc=function(){n.dispose(this.get("meshGroup"));n.Xw(this.get("meshGroup"),null);this.set("meshGroup",null);h.prototype.mc.call(this)};a.prototype.za=function(b){h.prototype.za.call(this,
b);this.set("camera",g.getCamera(b.sh));this.set("webglScene",b.sh);this.get("meshGroup")||(this.set("meshGroup",n.IJa(this.hq())),this.get("meshGroup").userData.Tib=this);this.W("webglScene","meshGroup")&&n.Xw(this.get("meshGroup"),this.get("webglScene"));this.Cn();this.ft(b);this.LI();this.W("loadingActive","meshGroup")&&k.Ra(this.get("meshGroup"),this.get("loadingActive"));this.W("blendingActive","meshGroup")&&e.PQa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.Cn=function(){this.W("composedAlpha",
"meshGroup")&&this.aC()};a.prototype.aC=function(){n.nf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.ft=function(){throw"Must be overridden in descendants.";};a.prototype.LI=function(){if(this.W("index","meshGroup")){var b=this.get("meshGroup");b&&b.children.forEach(function(c,d,f){n.M$(c,this.get("index")+d/f.length)}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/Frame",["require","tdv/utils","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/object/WebGLObject","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/object/WebGLObject"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=new THREE.Matrix4,e=Math.PI/180;a=m.extend(n,
function(){n.call(this);this.set("tag","Frame");this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.un=new THREE.Matrix4;this.Dj=new THREE.Matrix4});a.prototype.za=function(b){n.prototype.za.call(this,b)};a.prototype.ft=function(b){var c=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*h.th,this.get("composedTranslationY")*.5*h.th,this.get("composedTranslationZ")*.5*h.th),c=!0);this.W("composedDeltaYaw",
"composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-b.Xa*e),this.ke.multiply(k.makeRotationX(-this.get("composedDeltaPitch")*e)),this.ke.multiply(k.makeRotationY(this.get("composedDeltaYaw")*e)),this.ke.multiply(k.makeRotationY(b.Xa*e)),c=!0);this.W("flipHorizontally")&&(b=this.get("flipHorizontally")?-1:1,this.un.makeScale(b,1,1),c=!0);if(c||this.W("meshGroup"))this.Dj.copy(this.wi),this.Dj.multiply(this.ke),this.Dj.multiply(this.un),g.ot(this.get("meshGroup"),this.Dj)};return a});
define("tdv/util/Map",["require"],function(){function a(){this.kH=m++;this.eT="_map_"+this.kH+"_key";this.c2={};this.ss=[];this.length=0}var m=0;a.prototype.set=a.prototype.add=function(h,n){this.ss.indexOf(h)<0&&this.ss.push(h);if(typeof h==="object"&&h!==null){var g=h[this.eT];if(!g){g=this.eT;for(var k=[],e=0;e<8;e++)k.push(Math.floor(Math.random()*16).toString(16));g=h[g]=k.join("")}}else g=h;this.c2[g]=n;this.length=this.ss.length};a.prototype.get=function(h){return this.c2[typeof h==="object"&&
h!==null?h[this.eT]:h]};a.prototype.ygb=function(h){return this.ss.indexOf(h)>=0};a.prototype.remove=function(h){var n=this.ss.indexOf(h);n<0||(this.ss.splice(n,1),typeof h==="object"&&h!==null?(n=h[this.eT],delete h[this.eT]):n=h,delete this.c2[n],this.length=this.ss.length)};a.prototype.forEach=function(h){this.ss.slice().forEach(function(n){h(n,this.get(n))}.bind(this))};a.prototype.dispose=function(){for(;this.ss.length;)this.remove(this.ss.pop());this.ss=this.c2=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.nJ=[]}var h=a("tdv/utils"),n=a("tdv/events/EventDispatcher"),g=a("tdv/util/Map");a=h.extend(n,function(k){n.call(this);this.$f=k;this.zd=[];this.Ny=new g;this.oW=[];this.Vea=[];this.VM=this.VM.bind(this)});a.prototype.hg=function(k){this.zd.forEach(function(e){if(e.removeEventListener)e.removeEventListener(this.$f,this.VM);else if(e.h)e.h(this.$f,
this.VM,this,!0);else throw"invalid instance type";}.bind(this));this.zd=k.slice();this.zd.forEach(function(e){if(e.addEventListener)e.addEventListener(this.$f,this.VM);else if(e.bind)e.bind(this.$f,this.VM,this,!0);else throw"invalid instance type";this.Ny.ygb(e)||this.Ny.set(e,new m)}.bind(this));this.Hla()};a.prototype.dispose=function(){this.hg([]);this.zd=null;this.Ny.dispose();this.Vea=this.oW=this.Ny=null};a.prototype.ko=function(k){this.oW.push(k);this.Hla();return this};a.prototype.lr=function(k){this.Vea.push(k);
return this};a.prototype.jw=function(k){this.zd.forEach(function(e){k(e,this.Ny.get(e).nJ)}.bind(this))};a.prototype.Nn=function(k){k=this.Ny.get(k).nJ;return k.length==0?null:k[k.length-1]};a.prototype.VM=function(k){var e=k.target||k.source;if(e=this.Ny&&this.Ny.get(e))e.nJ.push(k),this.Vea.forEach(function(b){b(k,this)}.bind(this)),this.Hla()};a.prototype.Hla=function(){if(this.zd.length!=0){for(var k=0;k<this.zd.length;k++)if(this.Ny.get(this.zd[k]).nJ.length==0)return;this.oW.length&&(k=this.oW.slice(),
this.oW=[],k.forEach(function(e){e(this)}.bind(this)))}};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/panorama/renderer/3d/util/Util tdv/view/util/Animation tdv/player/view/util/XR tdv/player/view/util/ScreenFrameRateMonitor".split(" "),function(a){function m(){t||q.length===0||(f.m8?g():h())}function h(){r||(r=!0,f.requestFrame(n,null))}function n(){r=!1;u=void 0;g()}function g(){if(!t){u===
void 0&&(u=Date.now());for(var x=1E3/p.hLa()*.4;q.length&&Date.now()-u<x;)q.shift().add(!0);q.length&&h()}}var k=a("tdv/utils"),e=a("tdv/constants/EventName"),b=a("tdv/events/EventDispatcher"),c=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),d=a("tdv/player/view/panorama/renderer/3d/util/Util"),f=a("tdv/view/util/Animation"),l=a("tdv/player/view/util/XR"),p=a("tdv/player/view/util/ScreenFrameRateMonitor"),q=[],r=!1,t=!1,u=void 0,v={add:function(x,y,z,A){var D=q.find(function(F){F.texture===
y});D?(D.source=z,D.renderer=x):(D=new w(x,y,z),q.push(D));A&&D.bind(e.ia,A,this,!0);m();return D},Pma:function(x,y,z){x=new w(x,y,z);x.add(!0);return x}};d.Zbb(function(x){v.iZ(x)});v.iZ=function(x){if(t!==x)if(t=x)for(;q.length;)q.shift().add();else m()};var w=k.extend(b,function(x,y,z){b.call(this);this.renderer=x;this.texture=y;this.source=z});w.prototype.add=function(x){c.IZ(this.texture,this.source);!l.isPresenting&&this.renderer&&x&&this.renderer.initTexture(this.texture);this.o(e.ia)};w.prototype.remove=
function(){var x=q.indexOf(this);x>=0&&q.splice(x,1);c.IZ(this.texture,null)};return v});
define("tdv/player/view/panorama/renderer/object/texturesource/TextureSource","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/events/EventDispatcher tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),
e=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),b=a("tdv/player/view/util/Device"),c=m.extend(g,function(){g.call(this);this.Qf=void 0;this.Ma=e.createTexture();this.Ma.colorSpace=THREE.SRGBColorSpace;this.$ga=this.Dga=this.gga=!1;this.I=c.VQ;this.bT=n.Hm;this.j=null});c.prototype.type=function(){return this.Qf};c.prototype.texture=function(){return this.Ma};c.prototype.material=function(){return this.Ma&&e.RLa(this.Ma)};c.prototype.Ke=function(){var d=this.Ma&&e.RLa(this.Ma);return d&&
k.sLa(d)};c.prototype.Vkb=function(d){this.bT=d};c.prototype.Ekb=function(d){this.gga!==d&&(this.gga=d,this.JGa())};c.prototype.$Y=function(d){this.$ga!==d&&(this.$ga=d,this.RGa())};c.prototype.lra=function(d){this.Dga!==d&&(this.Dga=d,this.RGa())};c.prototype.RGa=function(){var d=this.$ga&&!this.Dga;!!this.Ma.isVideoTexture!==d&&(this.Ma.isVideoTexture=d,this.bQa(),this.JGa())};c.prototype.JGa=function(){this.gga?this.Ma.colorSpace=THREE.LinearSRGBColorSpace:!this.Ma.isVideoTexture||b.Yb()!=b.nx&&
b.Yb()!=b.Nk&&b.Yb()!=b.sj?this.Ma.colorSpace=THREE.SRGBColorSpace:this.Ma.colorSpace=THREE.LinearSRGBColorSpace};c.prototype.load=function(d){this.I===c.VQ&&(this.j=d,this.I=c.A_,this.pda())};c.prototype.Fcb=function(){this.loading()&&(this.I==c.A_?this.y5():this.BV(),this.I=c.VQ)};c.prototype.aTa=function(){this.I!=c.VQ&&(this.I==c.A_?this.y5():this.I==c.gca?this.BV():this.XV(),this.I=c.VQ)};c.prototype.bQa=function(){if(this.Ma){var d=this.material(),f=e.createTexture();f.flipY=this.Ma.flipY;f.format=
this.Ma.format;f.colorSpace=this.Ma.colorSpace;this.Ma.isVideoTexture&&(f.isVideoTexture=!0,f.update=function(){});e.dispose(this.Ma);d&&e.DRa(f,d);d&&k.hcb(d,f);this.Ma=f;this.Fia()}};c.prototype.Fia=function(){};c.prototype.pda=function(){};c.prototype.y5=function(){};c.prototype.oda=function(){};c.prototype.BV=function(){};c.prototype.XV=function(){e.Scb(this.texture)};c.prototype.loading=function(){return this.I==c.A_||this.I==c.gca};c.prototype.tpa=function(){return this.I==c.fca||this.I==c.zua};
c.prototype.dispose=function(){e.dispose(this.Ma);this.Ma=null};c.prototype.XM=function(d){this.I=d?c.gca:c.zua;d?this.oda():this.o(h.$c)};c.prototype.XAa=function(){this.I=c.fca;this.o(h.ia)};c.VQ="initial";c.A_="loading";c.gca="adding";c.zua="error loading";c.fca="added";c.iWa="custom";c.jWa="image tile";c.$ob="image animation";c.apb="video 360";return c});
define("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource","require tdv/utils tdv/constants/EventName tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/panorama/renderer/object/texturesource/TextureQueue tdv/player/view/panorama/renderer/object/texturesource/TextureSource".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/image/Item"),g=a("tdv/player/view/image/Repository"),k=a("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue"),
e=a("tdv/player/view/panorama/renderer/object/texturesource/TextureSource");a=m.extend(e,function(b){e.call(this);this.Qf=e.iWa;this.Se=b;this.Se||(this.I=e.fca);this.fj=this.de=null;this.yI=this.zI=void 0});a.prototype.bo=function(b){this.fj=b;k.add(this.j,this.Ma,this.fj,function(){var c=this.Ma&&this.Ma.image&&this.Ma.image.width||void 0,d=this.Ma&&this.Ma.image&&this.Ma.image.height||void 0;this.zI===void 0||this.yI===void 0||this.zI===c&&this.yI===d||this.bQa();this.zI=c;this.yI=d}.bind(this))};
a.prototype.xg=function(){return g.xg(this.Se)};a.prototype.update=function(b){b?k.add(this.j,this.Ma,this.fj):k.Pma(this.j,this.Ma,this.fj)};a.prototype.pda=function(){this.Se?this.JR():this.XM(!0)};a.prototype.y5=function(){this.js()};a.prototype.oda=function(){this.XAa()};a.prototype.XV=function(){this.js()};a.prototype.dispose=function(){this.js();e.prototype.dispose.call(this)};a.prototype.Pe=function(){this.XM(!0)};a.prototype.yh=function(){this.XM(!1)};a.prototype.Fia=function(){this.fj&&k.Pma(this.j,
this.Ma,this.fj)};a.prototype.JR=function(){this.de||(this.de=new n,this.de.fQ([this.Se]),this.de.bind(h.ia,this.Pe,this,!0),this.de.bind(h.$c,this.yh,this,!0),g.FA(this.de,this.bT))};a.prototype.js=function(){this.de&&(this.de.h(h.ia,this.Pe,this,!0),this.de.h(h.$c,this.yh,this,!0),g.ho(this.de,this.bT),this.de=null)};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource","require tdv/utils tdv/constants/EventName tdv/player/view/image/Item tdv/player/view/image/Repository tdv/player/view/panorama/renderer/object/texturesource/TextureQueue tdv/player/view/panorama/renderer/object/texturesource/TextureSource".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/image/Item"),g=a("tdv/player/view/image/Repository"),k=a("tdv/player/view/panorama/renderer/object/texturesource/TextureQueue"),
e=a("tdv/player/view/panorama/renderer/object/texturesource/TextureSource");a=m.extend(e,function(b){e.call(this);this.Qf=e.jWa;this.Se=b;this.fj=this.uN=this.de=null});a.prototype.xg=function(){return this.fj};a.prototype.pda=function(){this.JR()};a.prototype.y5=function(){this.js()};a.prototype.oda=function(){this.x_a()};a.prototype.BV=function(){this.js();this.Fea()};a.prototype.XV=function(){this.js();this.Fea()};a.prototype.dispose=function(){this.js();this.Fea();e.prototype.dispose.call(this)};
a.prototype.Pe=function(){this.fj=g.xg(this.Se);this.XM(!0)};a.prototype.yh=function(){this.XM(!1)};a.prototype.YAa=function(){this.XAa()};a.prototype.Fia=function(){this.fj&&k.Pma(this.j,this.Ma,this.fj)};a.prototype.JR=function(){this.de||(this.de=new n,this.de.fQ([this.Se]),this.de.bind(h.ia,this.Pe,this,!0),this.de.bind(h.$c,this.yh,this,!0),g.FA(this.de,this.bT))};a.prototype.js=function(){this.de&&(this.de.h(h.ia,this.Pe,this,!0),this.de.h(h.$c,this.yh,this,!0),g.ho(this.de,this.bT),this.de=
null)};a.prototype.x_a=function(){this.uN=k.add(this.j,this.Ma,this.fj);this.uN.bind(h.ia,this.YAa,this,!0)};a.prototype.Fea=function(){this.uN&&(this.uN.h(h.ia,this.YAa,this,!0),this.uN.remove(),this.uN=null)};return a});
define("tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource",["require","tdv/utils","tdv/player/view/image/Repository","tdv/player/view/panorama/renderer/3d/util/TextureUtil","tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/image/Repository"),n=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),g=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource");a=m.extend(g,
function(k,e,b,c,d){g.call(this,k.get("url"));this.ec=e;this.fc=b;this.Pa=c;this.Ha=d;this.U3a=this.ec!=0||this.fc!=0||this.Pa!=k.get("width")||this.Ha!=k.get("height")});a.prototype.Pe=function(){this.U3a?(this.D_a(),this.js(),this.XM(!!this.fj)):g.prototype.Pe.call(this)};a.prototype.BV=function(){g.prototype.BV.call(this);this.Gea()};a.prototype.XV=function(){g.prototype.XV.call(this);this.Gea()};g.prototype.dispose=function(){g.prototype.dispose.call(this);this.Gea()};a.prototype.D_a=function(){var k=
h.xg(this.Se);this.fj=n.Ldb(k,this.ec,this.fc,this.Pa,this.Ha)};a.prototype.Gea=function(){this.fj&&(n.Ena(this.fj),this.fj=null)};return a});
define("tdv/player/view/panorama/renderer/object/util/MeshFactory","require tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/constants/EyeLayer tdv/player/view/panorama/renderer/constants/Face tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/Device".split(" "),function(a){var m=
a("tdv/player/parser/ClassInfo"),h=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),n=a("tdv/player/view/panorama/renderer/constants/Face"),g=a("tdv/player/view/panorama/renderer/3d/util/Util"),k=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),b=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTileTextureSource"),c=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
d=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),f=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),l=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),p=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),q=a("tdv/player/view/panorama/renderer/TextureLoader"),r=a("tdv/player/view/util/Device"),t={wdb:function(u,v){var w=l.get(u);switch(w){case l.VB:case l.Ax:case l.Im:return this.h_a(w,u,v);case l.Or:case l.Xr:case l.Gu:return this.j_a(w,u,v)}},Odb:function(u,
v){var w=new e(v.get("posterURL"));w.$Y(!0);return this.mxa(u,v,w)},Ndb:function(u,v){var w=new k;w.$Y(!0);return this.mxa(u,v,w)},mxa:function(u,v,w){var x=u.get("hfov"),y=u.get("vfov"),z=u.get("pitch"),A=v.get("width");v=v.get("url");u=l.get(u);var D=u==l.Gu?2:1,F=u==l.Xr?2:1;u=D+F>2?[h.fb,h.Db]:[h.mx];var C=Math.round(A/D);A=new d.Rp(v);var B=d.rt(w.texture(),A);q.eQ(B,w);B.visible=!0;return u.map(function(H,E){E=c.NJa(x,y,z,1,1,E%D/D,(F-1-Math.floor(E/D))/F,1/D,1/F);E=f.create(E,[B]);E.layers.set(H);
q.y$(E,C/x);return E}.bind(this))},Gdb:function(u){var v=[n.Db,n.fb,n.Tc,n.Gc,n.FRONT,n.BACK].map(function(){var x=new k;x.bo(t.A2a(u));var y=d.rt(x.texture());q.eQ(y,x);y.visible=!0;return y}),w=c.MJa(1,1);v=f.create(w,v);q.y$(v,256/90);v.layers.set(h.mx);return v},Hka:{},A2a:function(u){if(!t.Hka[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.Hka[u]=v}return t.Hka[u]},h_a:function(u,v,w){var x=u==l.VB?[h.Db,
h.fb]:[h.mx],y=v.get("flipImageHorizontally");y&&(x=x.reverse());var z=u==l.Im?1:6*x.length,A=w.get("width")/z,D=w.get("height");if(m.Oa("TiledImageResourceLevel",w)){var F=w.get("colCount",z)/z;var C=w.get("rowCount",1)}else this.eEa(u,w)?(F=Math.ceil(A/g.Ix()),C=Math.ceil(D/g.Ix())):C=F=1;var B=[n.Db,n.fb,n.Tc,n.Gc,n.FRONT,n.BACK];return x.map(function(H,E){var G=Array(6);B.forEach(function(R,Q){var K=p.moa(v,w,R);m.Oa("TiledImageResourceLevel",w)?G[c.Cua.indexOf(R)]=this.d_a(K,u,H,R,y,F,C):G[c.Cua.indexOf(R)]=
this.gxa(K,F,C,u==l.Im?0:Math.round((E*B.length+Q)*A),0,A,D,F>1||C>1||u!=l.Im?A>256?1:.5:0)}.bind(this));var N=Array.prototype.concat.apply([],G),O=c.MJa(F,C);N=f.create(O,N);N.layers.set(H);q.y$(N,A/90);return N}.bind(this))},j_a:function(u,v,w){var x=u==l.Or?[h.mx]:[h.fb,h.Db];v.get("flipImageHorizontally")&&(x=x.reverse());var y=w.get("width"),z=w.get("height"),A=v.get("hfov"),D=v.get("vfov"),F=v.get("pitch"),C=Math.round(y/A/(z/D)),B=Math.round(y/C),H=Math.round(z/Math.round(z/D/(y/A))),E=(u=
this.eEa(u,w))?Math.ceil(B/g.Ix()):1,G=u?Math.ceil(H/g.Ix()):1;return x.map(function(N,O){O=this.gxa(w,E,G,O%C*B,Math.floor(O/C)*H,B,H);var R=c.NJa(A,D,F,E,G,0,0,1,1);O=f.create(R,O);O.layers.set(N);q.y$(O,B/A);return O}.bind(this))},eEa:function(u,v){switch(u){case l.VB:case l.Ax:case l.Xr:case l.Gu:return!0;case l.Im:return!1;case l.Or:return r.hgb().maxTextureSize<Math.max(v.get("width"),v.get("height"))?!0:g.gr()||r.ub()?!1:r.xc()==r.zB?!0:!1}},gxa:function(u,v,w,x,y,z,A,D){D||(D=0);for(var F=
[],C=0;C<w;C++)for(var B=y+D+(A-2*D)*C/w,H=y+D+(A-2*D)*(C+1)/w,E=0;E<v;E++){var G=x+D+(z-2*D)*E/v,N=x+D+(z-2*D)*(E+1)/v;G=u?new b(u,G,B,N-G,H-B):new k;N=d.sna(G.texture());q.eQ(N,G);F.push(N)}return F},d_a:function(u,v,w,x,y,z,A){for(var D=[],F=0;F<A;F++)for(var C=0;C<z;C++){var B=u?new e(p.SLa(u,v,w,x,y,A,F,C)):new k;var H=d.sna(B.texture());q.eQ(H,B);H.visible=!1;D.push(H)}return D}};return t});
define("tdv/player/view/panorama/renderer/object/SolidFrame","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Frame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/TextureLoader".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Frame"),g=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),
k=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),e=a("tdv/player/view/panorama/renderer/TextureLoader");a=m.extend(n,function(b){n.call(this);this.Ne=b;this.set("tag","SolidFrame");this.Nh=null});a.prototype.hc=function(){this.Nh=(new g(h.ia)).ko(this.Pe.bind(this));n.prototype.hc.call(this)};a.prototype.mc=function(){this.Nh.dispose();n.prototype.mc.call(this)};a.prototype.hq=function(){var b=[k.Gdb(this.Ne)];e.gB(b,e.zu);e.fB(b,e.Nr);this.Nh.hg(b);return b};a.prototype.Pe=function(){this.o(h.vd);
this.o(h.ia)};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeInVR","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/object/SolidFrame tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/object/SolidFrame"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a("tdv/player/view/util/XR");
a=m.extend(h,function(e,b,c,d){h.call(this,e,b,c,d);this.la=null;this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(e){if(!this.Rb){this.H.Fm||(this.H.Fm=new n("#000000"),this.H.Fm.set("alpha",1),this.j.add(this.H.Fm));if(!this.la){this.H.Fm.yi();var b=this.H.ana*2;this.la=new g("linear",[new k("alpha",2,0,void 0)],b);this.H.Fm.yi()}this.la.Nb(e);this.H.Fm.set("alpha",Math.min(.99,this.la.ob("alpha")));this.j.Jf(this.H.Sc).set("alpha",1);this.la&&this.la.Ve()&&(this.Rb=
!0,this.j.remove(this.H.Fm),this.H.Fm=null)}};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeOut","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/3d/util/Util tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/3d/util/Util"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a=m.extend(h,function(e,b,c,d){h.call(this,e,
b,c,d);this.ej=this.j.P.Rc();this.la=null;this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(e){if(!this.Rb){if(!this.la){n.G$(!0);this.ej.cF();this.H.Va()||this.j.Jf(this.H.qh).set("alpha",0);var b=this.H.YJa;this.la=new g("linear",[new k("position",0,1,void 0)],b)}this.j.P.NX(this.j)||this.j.D$(!0);this.la.Nb(e);this.ej.QE(this.la.ob("position"));this.la.Ve()&&(this.Rb=!0,this.ej.VD(),this.H.Va()?this.j.Jf(this.H.qh).set("alpha",0):this.j.D$(!1),n.G$(!1))}};return a});
define("tdv/player/view/panorama/control/transition/steps/FadeOutVR","require tdv/utils tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/panorama/renderer/object/SolidFrame tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/object/SolidFrame"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a("tdv/player/view/util/XR");
a=m.extend(h,function(e,b,c,d){h.call(this,e,b,c,d);this.la=null;this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(e){if(!this.Rb){this.H.Fm||(this.H.Fm=new n("#000000"),this.H.Fm.set("alpha",0),this.j.add(this.H.Fm));if(!this.la){this.H.Fm.yi();var b=this.H.YJa*2;this.la=new g("linear",[new k("alpha",0,2,void 0)],b)}this.la.Nb(e);e=Math.min(1,this.la.ob("alpha"));this.H.Fm.set("alpha",e);e==1&&this.j.Jf(this.H.qh).set("alpha",0);this.la.Ve()&&(this.Rb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.la=null;this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=
function(k){if(!this.Rb){if(!this.la){var e=this.j.jf(),b=this.Uc.e$(this.H.Sc,e),c=!this.H.Va()&&Math.abs(e-b)>.01?this.H.Caa:1;this.la=new n("cubic_in_out",[new g("hfov",e,b,void 0)],c)}this.la.Nb(k);this.Uc.rr(this.la.ob("hfov"));this.la.Ve()&&(this.Uc.bZ(!0),this.Rb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){function m(e,b,c){for(;e<b;)e+=c-b;for(;e>c;)e-=c-b;return e}var h=a("tdv/utils"),n=a("tdv/player/view/panorama/control/transition/steps/Step"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a=h.extend(n,function(e,b,c,d){n.call(this,e,b,c,d);this.la=null;this.Rb=
!1;this.V2=0});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(e){this.Rb||(this.la||(this.la=this.V2<this.H.br.length?this.t_a(this.V2):this.ZZa()),this.la.Nb(e),this.Uc.vra(this.la.ob("yaw"),this.la.ob("pitch")),this.Uc.rr(this.la.ob("hfov")),this.Uc.sK(this.la.ob("stereographicFactor")),this.la.Ve()&&(this.la=null,this.V2++,this.V2>this.H.br.length&&(this.Uc.bZ(!0),this.Rb=!0)))};a.prototype.ZZa=function(){var e=m(this.j.Jc(),-180,180),b=this.j.Ic();this.j.yg();var c=this.j.jf(),
d=this.j.I.Ik,f=this.H.Eh.get("hfov");f={Xa:this.H.Eh.get("yaw"),pitch:this.H.Eh.get("pitch",b),Mg:this.j.yg(),Wd:f?this.Uc.iJ(f):c,Ik:0};this.Uc.Yjb(this.H.Sc,f);f.Xa=m(f.Xa,e-180,e+180);var l=Math.abs(c-f.Wd)>.5,p=Math.abs(d-f.Ik),q=p>.01;l=this.H.Va()?1:Math.max(l?this.H.Caa:1,q?this.H.cPa*p:1);return new g(q?"linear":"cubic_in_out",[new k("yaw",e,f.Xa,void 0),new k("pitch",b,f.pitch,void 0),new k("hfov",c,f.Wd,void 0),new k("stereographicFactor",d,f.Ik,void 0)],l)};a.prototype.t_a=function(e){var b=
this.H.br[e],c=m(this.j.Jc(),-180,180),d=this.j.Ic();this.j.yg();var f=this.j.jf(),l=this.j.I.Ik,p=b.get("targetStereographicFactor",l),q=b.get("targetHfov");if(q)q=this.Uc.iJ(q);else{for(q=!1;e<this.H.br.length&&!q;e++)q=this.H.br[e].get("targetHfov")!==void 0;q?q=f:(q=this.Uc.iJ(this.H.Eh.get("hfov",this.Uc.TJa())),q=f+(q-f)*(l-p))}e=b.get("targetYaw",c);var r=b.get("targetPitch",d);this.j.yg();switch(b.get("path")){case "left":e=m(e,c-360,c);break;case "right":e=m(e,c,c+360);break;case "longest":e=
m(e,-360,360);e=e>=c?m(e,c,c+360):m(e,c-360,c);break;default:e=m(e,c-180,c+180)}return new g(b.get("easing"),[new k("yaw",c,e,b.get("yawSpeed")),new k("pitch",d,r,b.get("pitchSpeed")),new k("hfov",f,q,b.get("hfovSpeed")),new k("stereographicFactor",l,p,b.get("stereographicFactorSpeed"))],b.get("duration"))};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.la=null;this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=
function(k){if(!this.Rb){if(!this.la){var e=this.j.Ic(),b=this.j.jf(),c=this.j.I.Ik,d=this.H.vg.get("stereographicFactor",0),f=Math.abs(c-d),l=d>0?this.H.vg.get("pitch",e):e,p=this.H.vg.get("hfov");p=p?this.Uc.iJ(p):b;d==0&&(p=Math.min(b,this.Uc.e$(this.H.Sc,p)));this.Uc.bZ(!1);f=this.H.Va()?1:Math.max(Math.abs(b-p)>.5?this.H.Caa:1,f>.01?this.H.cPa:1);this.la=new n("cubic_in_out",[new g("hfov",b,p,void 0),new g("pitch",e,l,void 0),new g("stereographicFactor",c,d,void 0)],f)}this.la.Nb(k);this.Uc.rr(this.la.ob("hfov"));
this.Uc.sK(this.la.ob("stereographicFactor"));this.Uc.vra(this.j.Jc(),this.la.ob("pitch"));this.la.Ve()&&(this.Uc.Vf(this.H.Sc,this.H.vg.get("yaw"),this.H.vg.get("pitch",this.j.Ic())),this.Rb=!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/view/util/Ease","tdv/view/util/EaseDimension"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/view/util/Ease"),g=a("tdv/view/util/EaseDimension");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.la=null;this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=
function(k){if(!this.Rb){if(!this.la){var e=this.j.jf(),b=Math.min(this.Uc.e$(this.H.Sc,e),e),c=!this.H.Va()&&Math.abs(e-b)>.01?this.H.Caa:1;this.la=new n("cubic_in_out",[new g("hfov",e,b,void 0)],c);this.Uc.bZ(!1)}this.la.Nb(k);this.Uc.rr(this.la.ob("hfov"));this.la.Ve()&&(this.Uc.Vf(this.H.Sc,this.j.Jc()+this.H.qQ.bLa(),this.j.Ic()),this.Rb=!0)}};a.prototype.hE=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"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=this.j.Jf(this.H.qh);this.j.remove(n)};return a});
define("tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=(this.H.nc||this.H.Fc).get("model");n.set("objects",n.get("objects").filter(function(g){return g!=this.H.Be}.bind(this)));
[this.H.Be.get("sourceCubeTexture"),this.H.Be.get("targetCubeTexture")].forEach(function(g){g&&g.dispose()});this.H.Be=null};return a});
define("tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.j.P.release(this.j)};return a});
define("tdv/player/view/panorama/control/transition/steps/RequestViewerArea",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=[this.j.ld];this.Z3a()&&n.push(this.H.Zh);this.j.ld.fK(n)};a.prototype.Z3a=function(){return this.H.Fc?!0:this.j.ld.get("keepModel3DLoadedWithoutLocation")&&
this.H.qh&&this.H.Zh&&this.H.Zh.get("model")?!0:!1};return a});
define("tdv/player/view/panorama/control/transition/steps/RestoreModelPosition",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){return function(n){function g(k,e,b,c){return n.call(this,k,e,b,c)||this}P(g,n);g.prototype.Ch=function(){var k,e,b;(b=(e=(k=this.H.Zh)===null||k===void 0?void 0:k.get("model"))===null||e===void 0?void 0:e.get("camera"))===null||b===void 0||b.Tjb()};return g}(h)});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.Uc.Vf(this.H.Sc,this.H.Eh.get("yaw"),this.H.Eh.get("pitch",this.j.Ic()));var n=this.H.Eh.get("hfov");n&&(n=this.Uc.iJ(n),this.Uc.rr(n))};
return a});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel",["require","tdv/utils","tdv/player/view/util/geo/Fov","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils");a("tdv/player/view/util/geo/Fov");var h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=this.H.Fc.get("model").get("camera");if(this.H.yK.get("keepInitialPositionOnTranslation")){var g=this.H.Eh.get("yaw");
n=this.H.Eh.get("pitch")}else g=n.get("yaw")-this.H.Fc.get("yaw"),n=this.H.yK.get("enterPointingToHorizon")?0:n.get("pitch");this.Uc.Vf(this.H.Sc,g,n);if(g=this.H.Eh.get("hfov"))g=this.Uc.iJ(g),this.Uc.rr(g)};return a});
define("tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel",["require","tdv/utils","tdv/player/view/util/geo/Quaternion","tdv/player/view/util/XR","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/util/geo/Quaternion"),n=a("tdv/player/view/util/XR"),g=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(g,function(k,e,b,c){g.call(this,k,e,b,c)});a.prototype.Ch=
function(){if(n.isPresenting){var k=h.iaa(n.ug,!0);this.H.Fc.get("model").get("camera");var e=k.Xa-this.H.Fc.get("yaw");k=k.pitch}else this.H.yK.get("keepInitialPositionOnTranslation")?(e=this.H.Eh.get("yaw"),k=this.H.Eh.get("pitch")):(k=this.H.Fc.get("model").get("camera"),e=k.get("yaw")-this.H.Fc.get("yaw"),k=k.get("pitch"));this.Uc.Vf(this.H.Sc,e,k)};return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition",["require","tdv/utils","tdv/constants/EventName","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(n,function(g,k,e,b){n.call(this,g,k,e,b);this.Fa=null;this.Rb=!1});a.prototype.f5a=function(){this.Rb=!0};a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(){if(!this.Fa&&
(this.Fa=this.H.nc.get("model"),this.H.Zh.get("model")==this.Fa)){var g=this.Fa.get("camera");g.set("easing",0);g.set("x",this.H.nc.get("x"));g.set("y",this.H.nc.get("y"));g.set("z",this.H.nc.get("z"));g.set("yaw",this.j.Jc()+this.H.nc.get("yaw"));g.set("pitch",this.j.Ic());g.set("fov",this.j.nb()>this.j.Mb()?this.j.dP():this.j.eP());this.Fa.bind(h.Zd,this.f5a,this,!0)}};return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelInTransition",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){a=function(n){function g(k,e,b,c,d){k=n.call(this,k,e,b,c)||this;k.value=!1;k.value=d;return k}P(g,n);g.prototype.Ch=function(){var k,e=(k=this.H.nc||this.H.Fc||this.H.Zh)===null||k===void 0?void 0:k.get("model");e&&e.get("camera").set("inTransition",this.value)};return g}(h);m=function(n){function g(k,e,b,c){return n.call(this,
k,e,b,c,!0)||this}P(g,n);return g}(a);a.Pi=m;m=function(n){function g(k,e,b,c){return n.call(this,k,e,b,c,!1)||this}P(g,n);return g}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){a=function(n){function g(k,e,b,c,d){k=n.call(this,k,e,b,c)||this;k.enabled=!1;k.enabled=d;return k}P(g,n);g.prototype.Ch=function(){var k;(k=this.H.Zh)===null||k===void 0||k.j.Ra(this.enabled)};return g}(h);m=function(n){function g(k,e,b,c){return n.call(this,k,e,b,c,!0)||this}P(g,n);return g}(a);a.Pi=m;m=function(n){function g(k,
e,b,c){return n.call(this,k,e,b,c,!1)||this}P(g,n);return g}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){a=function(n){function g(k,e,b,c,d){k=n.call(this,k,e,b,c)||this;k.paused=!1;k.paused=d;return k}P(g,n);g.prototype.Ch=function(){var k,e=(k=this.H.Fc||this.H.nc||this.H.Zh)===null||k===void 0?void 0:k.get("model");e&&this.H.Zh.j.oRa(e,!this.paused)};return g}(h);m=function(n){function g(k,e,b,c){return n.call(this,
k,e,b,c,!0)||this}P(g,n);return g}(a);a.Pi=m;m=function(n){function g(k,e,b,c){return n.call(this,k,e,b,c,!1)||this}P(g,n);return g}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/SetMinFaceSize",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep","tdv/player/view/panorama/control/transition/TransitionData"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),n=a("tdv/player/view/panorama/control/transition/TransitionData");a=m.extend(h,function(g,k,e,b){h.call(this,g,k,e,b)});a.prototype.Ch=function(){this.H.Sc&&(this.H.mode==
n.qca||this.H.mode==n.rca?this.H.Sc.set("minFaceSize",1024):this.H.Sc.set("minFaceSize",void 0))};return a});
define("tdv/player/view/panorama/control/transition/steps/SetOriginPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep","tdv/player/view/util/XR"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep"),n=a("tdv/player/view/util/XR");a=m.extend(h,function(g,k,e,b){h.call(this,g,k,e,b)});a.prototype.Ch=function(){var g=this.H.Zra?this.H.vg.get("stereographicFactor",0):0;this.Uc.sK(g);this.Uc.Vf(this.H.Sc,
this.H.vg.get("yaw"),this.H.vg.get("pitch",this.j.Ic()));this.H.Va()&&n.kK();(g=this.H.vg.get("hfov"))||this.H.qh||(g=this.Uc.TJa());g&&(g=this.Uc.iJ(g),this.Uc.rr(g),this.Uc.bZ(!this.H.Zra))};return a});
define("tdv/player/view/panorama/control/transition/steps/SetRenderingPaused",["require","exports","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a,m,h){a=function(n){function g(k,e,b,c,d){k=n.call(this,k,e,b,c)||this;k.paused=!1;k.paused=d;return k}P(g,n);g.prototype.Ch=function(){this.j.D$(this.paused)};return g}(h);m=function(n){function g(k,e,b,c){return n.call(this,k,e,b,c,!0)||this}P(g,n);return g}(a);a.Pi=m;m=function(n){function g(k,e,b,c){return n.call(this,
k,e,b,c,!1)||this}P(g,n);return g}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/SetTranslationPosition",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){var n=this.Uc.e$(this.H.Sc,this.j.jf());this.Uc.rr(n);this.Uc.Vf(this.H.Sc,this.j.Jc()+this.H.qQ.bLa(),this.j.Ic())};a.prototype.hE=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,h,n){a=function(g){function k(e,b,c,d,f){e=g.call(this,e,b,c,d)||this;e.value=!1;e.ended=!1;e.wait=!1;e.mh=function(){return this.ended};e.value=f;e.value||(e.wait=!0);return e}P(k,g);k.prototype.Yg=function(){n.ud.forEach(function(e){n.mlb(e,!this.value)}.bind(this));this.wait?this.wait=!1:this.ended=
!0};return k}(h);m=function(g){function k(e,b,c,d){return g.call(this,e,b,c,d,!0)||this}P(k,g);return k}(a);a.Pi=m;m=function(g){function k(e,b,c,d){return g.call(this,e,b,c,d,!1)||this}P(k,g);return k}(a);a.Eg=m;return a});
define("tdv/player/view/panorama/control/transition/steps/RestoreViewerAreaToModelPlayer",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.Ch=function(){this.H.nc&&this.H.Zh.get("model")==this.H.nc.get("model")&&this.j.ld.fK([this.H.Zh])};return a});
define("tdv/player/view/panorama/control/transition/steps/Translate",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step","tdv/player/view/panorama/renderer/3d/util/Util","tdv/player/view/util/Device"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=a("tdv/player/view/panorama/renderer/3d/util/Util"),g=a("tdv/player/view/util/Device");a=m.extend(h,function(k,e,b,c){h.call(this,k,e,b,c);this.I="not initialized";this.Sb=0});
a.prototype.mh=function(){return this.I=="ended"};a.prototype.Yg=function(k){this.mh()||(this.I=="not initialized"&&this.FS(),this.I=="initialized"&&(this.Nq.get("ready")||this.Nq.Voa())&&this.xV(),this.I=="started"&&this.za(k),this.Sb>=1&&this.WR())};a.prototype.FS=function(){this.yDa=this.H.RSa;this.mR=.25;this.BYa=.75;this.M6a=.25;this.iGa=this.G2a();this.Kca=.5*this.yDa;this.X$a=this.yDa-2*this.Kca;this.EH=1/(this.Kca+this.X$a);this.L_=this.EH/this.Kca;this.Kz=0;this.Nq=this.j.Jf(this.H.Sc);this.Kka=
this.j.Jf(this.H.qh);this.dM=this.H.qQ.gfb();this.I="initialized"};a.prototype.G2a=function(){var k=this.H.qQ.get("distance");return k?Math.min(.99,k/this.H.qh.get("distanceToFloor")):.75};a.prototype.xV=function(){this.j.pRa(!this.H.Va()&&g.Yb()!=g.Nk);this.Nq.yi();this.I="started"};a.prototype.za=function(k){this.Nq.get("ready")&&n.G$(!0);this.Nq.get("ready")||this.Sb<this.M6a?this.Sb>=1-.5*this.Kz*this.Kz/this.L_?this.Kz=Math.sqrt(2*(1-this.Sb)*this.L_):this.Kz<this.EH&&(this.Kz=Math.min(this.Kz+
this.L_*k,this.EH)):this.Kz=Math.max(this.Kz-this.L_*k,0);this.Sb=Math.min(Math.max(0,this.Sb+this.Kz*k),1);this.Nq.get("ready")||(this.mR=Math.max(this.mR,this.Sb));this.b6(this.Sb,Math.max(0,Math.min(1,(this.Sb-this.mR)/(this.BYa-this.mR))))};a.prototype.WR=function(){this.Nq.set("alpha",1);this.j.pRa(!1);this.I="ended";n.G$(!1)};a.prototype.b6=function(k,e){var b=(k-1)*this.iGa;this.Nq.set("translationX",b*this.dM.x);this.Nq.set("translationY",b*this.dM.y);this.Nq.set("translationZ",b*this.dM.z);
this.Nq.get("ready");k*=this.iGa;this.Kka.set("translationX",k*this.dM.x);this.Kka.set("translationY",k*this.dM.y);this.Kka.set("translationZ",k*this.dM.z);this.Nq.set("alpha",Math.max(.01,Math.min(.99,e)))};a.prototype.hE=function(){return this.Sb<this.mR};return a});
define("tdv/player/script/TargetModel3DCameraMovement",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DCameraMovement"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DCameraMovement");return m.define("TargetModel3DCameraMovement",h,function(){h.call(this)})});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/script/Model3DCameraSequence"),k=a("tdv/player/script/TargetModel3DCameraMovement"),
e=a("tdv/player/view/panorama/control/transition/steps/Step"),b=a("tdv/player/view/util/XR");a=m.extend(e,function(d,f,l,p){e.call(this,d,f,l,p);this.Xs=this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(){this.H.Zh.get("model")!=this.H.nc.get("model")?this.qv():this.Xb?this.Xb.get("state")==n.ca&&setTimeout(function(){this.qv()}.bind(this),10):this.Xs||(this.Xs=!0,this.Dka(),this.nV())};a.prototype.Dka=function(){var d=this.H.nc.get("model").get("camera");this.vja=d.get("sequences").find(function(q){return q.get("state")===
n.PLAYING});var f=d.TN;f||(f={x:d.get("initialX",d.get("x")),y:d.get("initialY",d.get("y")),z:d.get("initialZ",d.get("z")),yaw:d.get("initialYaw",d.get("yaw")),pitch:d.get("initialPitch",d.get("pitch")),fov:d.get("initialFov",d.get("fov")),distance:d.get("initialDistance",d.get("distance"))});d.set("easing",0);d.set("x",this.H.nc.get("x"));d.set("y",this.H.nc.get("y"));d.set("z",this.H.nc.get("z"));d.set("distance",0);b.isPresenting||d.set("yaw",this.j.Jc()+this.H.nc.get("yaw"));d.set("pitch",this.j.Ic());
d.set("fov",this.j.nb()>this.j.Mb()?this.j.dP():this.j.eP());var l=[];if(this.H.qE){if(!this.H.Va()){var p=new k;p.set("duration",this.H.a8);p.set("easing","linear");p.bind(h.Zd,this.kia,this,!0);this.jfa=p;l.push(p)}this.H.Be.set("sourceAlpha",1)}else this.H.Be.set("sourceAlpha",.99);this.me=new k;this.me.set("targetX",f.x);this.me.set("targetY",f.y);this.me.set("targetZ",f.z);b.isPresenting||this.me.set("targetYaw",f.yaw);this.me.set("targetPitch",f.pitch);this.me.set("targetFov",f.fov);this.me.set("targetDistance",
f.distance);this.me.set("duration",this.H.Uib);this.me.set("easing","quad_in_out");this.me.bind(h.Zd,this.wia,this,!0);l.push(this.me);this.Xb=new g;this.Xb.set("movements",l);this.Xb.set("mandatory",!0);this.Xb.set("internal",!0);this.Xb.bind(h.Tb,this.qv,this,!0);d.set("sequences",d.get("sequences").concat([this.Xb]));this.Xb.play();this.FV=(new THREE.Vector3).set(f.x,f.y,f.z);this.AD=(new THREE.Vector3).set(this.H.nc.get("x"),this.H.nc.get("y"),this.H.nc.get("z"))};a.prototype.kia=function(){var d=
this.jfa.get("position");this.H.Be.set("sourceAlpha",1-d);this.H.Be.set("targetAlpha",0)};a.prototype.wia=function(){if(this.H.qE)this.H.Be.set("sourceAlpha",0),this.H.Be.set("targetAlpha",0);else{var d=this.qS();this.H.Be.set("sourceAlpha",1-Math.max(.01,Math.min(.99,(d-0)/.33)))}};var c=new THREE.Vector3;a.prototype.qS=function(){var d=this.H.nc.get("model").get("camera");return c.set(d.get("x"),d.get("y"),d.get("z")).distanceTo(this.AD)/this.AD.distanceTo(this.FV)};a.prototype.qv=function(){if(!this.Rb){var d=
this.H.nc.get("model").get("camera");d.set("sequences",d.get("sequences").filter(function(f){return f!=this.Xb}.bind(this)));this.vja&&d.get("sequences").includes(this.vja)&&this.vja.play();this.Rb=!0;this.VU()}};a.prototype.nV=function(){var d=this.H.nc.get("model");this.IU=d.get("postprocessing");this.JU=d.get("surfaceSelectionEnabled");d.set("postprocessing",!1);d.set("surfaceSelectionEnabled",!1)};a.prototype.VU=function(){var d=this.H.nc.get("model"),f=this.IU,l=this.JU;setTimeout(function(){d.set("postprocessing",
f);d.set("surfaceSelectionEnabled",l)},30)};return a});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas","require tdv/utils tdv/constants/EventName tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/script/Model3DCameraSequence"),g=a("tdv/player/script/TargetModel3DCameraMovement"),k=a("tdv/player/view/panorama/control/transition/steps/Step"),
e=a("tdv/player/view/util/XR");a=m.extend(k,function(c,d,f,l){k.call(this,c,d,f,l);this.Rb=this.Xs=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(){this.H.Zh.get("model")!=this.H.Fc.get("model")?this.fCa():this.Xs||(this.Xs=!0,this.j9a(),this.nV())};a.prototype.j9a=function(){var c=this.H.Fc.get("model").get("camera");c.set("easing",0);c.set("x",this.H.nc.get("x"));c.set("y",this.H.nc.get("y"));c.set("z",this.H.nc.get("z"));c.set("distance",0);e.isPresenting||c.set("yaw",this.j.Jc()+
this.H.nc.get("yaw"));c.set("pitch",this.j.Ic());c.set("fov",this.j.nb()>this.j.Mb()?this.j.dP():this.j.eP());var d=[];if(this.H.qE){var f=new g;f.set("duration",this.H.a8);f.set("easing","linear");f.bind(h.Zd,this.kia,this,!0);this.jfa=f;d.push(f);this.H.Be.set("skyBox",!1);this.H.Be.set("nearPlane",!0);this.H.Be.set("sourceAlpha",1);this.H.Be.set("targetAlpha",0)}else this.H.Be.set("skyBox",!0),this.H.Be.set("nearPlane",!1),this.H.Be.set("targetAlpha",.01),this.H.Be.set("sourceAlpha",.99);this.me=
new g;this.me.set("targetX",this.H.Fc.get("x"));this.me.set("targetY",this.H.Fc.get("y"));this.me.set("targetZ",this.H.Fc.get("z"));this.H.yK.get("keepInitialPositionOnTranslation")&&(e.isPresenting||(f=this.H.Eh.get("yaw")+this.H.Fc.get("yaw"),this.me.set("targetYaw",f)),f=this.H.Eh.get("pitch"),f!==void 0&&this.me.set("targetPitch",f),f=this.H.Eh.get("hfov"),f!==void 0&&this.me.set("targetFov",f));this.me.set("duration",1500);this.me.set("easing","cubic_in_out");this.me.bind(h.Zd,this.g5a,this,
!0);d.push(this.me);this.H.qE&&(f=new g,f.set("duration",this.H.a8),f.set("easing","linear"),f.bind(h.Zd,this.jia,this,!0),this.ifa=f,d.push(f));this.Xb=new n;this.Xb.set("movements",d);this.Xb.set("mandatory",!0);this.Xb.set("internal",!0);this.Xb.bind(h.Tb,this.fCa,this,!0);c.set("sequences",c.get("sequences").concat([this.Xb]));this.Xb.play();this.AD=(new THREE.Vector3).set(this.H.nc.get("x"),this.H.nc.get("y"),this.H.nc.get("z"));this.FV=(new THREE.Vector3).set(this.H.Fc.get("x"),this.H.Fc.get("y"),
this.H.Fc.get("z"))};a.prototype.g5a=function(){if(this.H.qE)this.H.Be.set("sourceAlpha",0),this.H.Be.set("targetAlpha",0);else{var c=this.qS();this.H.Be.set("targetAlpha",Math.max(.01,Math.min(.99,c-0)));this.H.Be.set("sourceAlpha",1)}};var b=new THREE.Vector3;a.prototype.qS=function(){var c=this.H.nc.get("model").get("camera");return b.set(c.get("x"),c.get("y"),c.get("z")).distanceTo(this.AD)/this.AD.distanceTo(this.FV)};a.prototype.kia=function(){var c=this.jfa.get("position");this.H.Be.set("sourceAlpha",
1-c);this.H.Be.set("targetAlpha",0)};a.prototype.jia=function(){var c=this.ifa.get("position");this.H.Be.set("sourceAlpha",0);this.H.Be.set("targetAlpha",c)};a.prototype.fCa=function(){var c=this.H.nc.get("model").get("camera");c.set("sequences",c.get("sequences").filter(function(d){return d!=this.Xb}.bind(this)));this.VU();this.Rb=!0};a.prototype.nV=function(){var c=this.H.nc.get("model"),d=this.H.Zh;this.IU=c.get("postprocessing");this.JU=c.get("surfaceSelectionEnabled");this.z6a=d.get("spritesEnabled");
c.set("postprocessing",!1);c.set("surfaceSelectionEnabled",!1);d.set("spritesEnabled",!1)};a.prototype.VU=function(){var c=this.H.nc.get("model"),d=this.H.Zh,f=this.IU,l=this.JU,p=this.z6a;setTimeout(function(){c.set("postprocessing",f);c.set("surfaceSelectionEnabled",l);d.set("spritesEnabled",p)},500)};return a});
define("tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/script/Model3DCameraSequence tdv/player/script/TargetModel3DCameraMovement tdv/player/view/panorama/control/transition/steps/Step tdv/player/view/util/geo/Fov tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/script/Model3DCameraSequence"),
k=a("tdv/player/script/TargetModel3DCameraMovement"),e=a("tdv/player/view/panorama/control/transition/steps/Step"),b=a("tdv/player/view/util/geo/Fov"),c=a("tdv/player/view/util/XR");a=m.extend(e,function(f,l,p,q){e.call(this,f,l,p,q);this.Xs=this.Rb=!1});a.prototype.mh=function(){return this.Rb};a.prototype.Yg=function(){this.Xb?this.Xb.get("state")==n.ca&&setTimeout(function(){this.qv()}.bind(this),10):this.Xs||(this.Xs=!0,this.Dka(),this.nV())};a.prototype.Dka=function(){var f=this.H.Fc.get("model").get("camera");
f.umb();var l=Math.abs(f.get("pitch")-this.j.Ic()),p=l>30;this.me=new k;this.me.set("targetX",this.H.Fc.get("x"));this.me.set("targetY",this.H.Fc.get("y"));this.me.set("targetZ",this.H.Fc.get("z"));this.me.set("targetDistance",0);this.me.set("targetFov",this.V2a(this.j.jf()));c.isPresenting||this.me.set("targetYaw",this.j.Jc()+this.H.Fc.get("yaw"));p?this.me.set("targetPitch",f.get("pitch")):this.me.set("targetPitch",this.j.Ic());this.me.set("duration",this.H.Whb);this.me.set("easing","cubic_in_out");
this.me.bind(h.Zd,this.wia,this,!0);var q=[this.me];p&&(p=new k,p.set("targetPitch",this.j.Ic()),p.set("duration",l/90*1E3),p.set("easing","quad_in_out"),q.push(p));this.H.qE?(this.H.Va()||(l=new k,l.set("duration",this.H.a8),l.set("easing","linear"),l.bind(h.Zd,this.jia,this,!0),this.ifa=l,q.push(l)),this.H.Be.set("targetAlpha",0)):this.H.Be.set("targetAlpha",.01);this.Xb=new g;this.Xb.set("movements",q);this.Xb.set("mandatory",!0);this.Xb.set("internal",!0);this.Xb.bind(h.Tb,this.qv,this,!0);f.set("sequences",
f.get("sequences").concat([this.Xb]));this.Xb.play();this.AD=(new THREE.Vector3).set(f.get("x"),f.get("y"),f.get("z"));this.FV=(new THREE.Vector3).set(this.H.Fc.get("x"),this.H.Fc.get("y"),this.H.Fc.get("z"))};a.prototype.V2a=function(f){return this.j.nb()<this.j.Mb()?b.um(f,this.j.nb(),this.j.Mb()):f};a.prototype.wia=function(){if(!this.Rb&&!this.H.qE){var f=this.qS();this.H.Be.set("targetAlpha",Math.max(.01,Math.min(.99,(f-.66)/(1-.66))))}};var d=new THREE.Vector3;a.prototype.qS=function(){var f=
this.H.Fc.get("model").get("camera");return d.set(f.get("x"),f.get("y"),f.get("z")).distanceTo(this.AD)/this.AD.distanceTo(this.FV)};a.prototype.jia=function(){var f=this.ifa.get("position");this.H.Be.set("targetAlpha",f)};a.prototype.qv=function(){this.Rb||this.G0a()};a.prototype.G0a=function(){var f=this.H.Fc.get("model").get("camera");f.set("sequences",f.get("sequences").filter(function(l){return l!=this.Xb}.bind(this)));this.Rb=!0;this.Xb=null;this.VU();this.j.Jf(this.H.Sc).set("alpha",1)};a.prototype.nV=
function(){var f=this.H.Fc.get("model");this.IU=f.get("postprocessing");this.JU=f.get("surfaceSelectionEnabled");f.set("postprocessing",!1);f.set("surfaceSelectionEnabled",!1)};a.prototype.VU=function(){var f=this.H.Fc.get("model"),l=this.IU,p=this.JU;setTimeout(function(){f.set("postprocessing",l);f.set("surfaceSelectionEnabled",p)},30)};return a});
define("tdv/player/view/panorama/control/transition/steps/TriggerEvent",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/SingleOperationStep"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/SingleOperationStep");a=m.extend(h,function(n,g,k,e,b){h.call(this,n,g,k,e);this.VYa=b});a.prototype.Ch=function(){this.VYa.call(this.U)};return a});
define("tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e)});a.prototype.mh=function(){var n=this.j.Vb(),g=n&&n.fO;n=n&&n.MM;return!!g&&!g.get("visible")&&!!n&&!n.get("visible")};return a});
define("tdv/player/view/panorama/control/transition/steps/WaitReady",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step"),n=m.extend(h,function(g,k,e,b){h.call(this,g,k,e,b);this.Az=null});n.prototype.mh=function(){this.Az||(this.Az=this.H.Sc&&this.j.Jf(this.H.Sc));return this.Az&&this.Az.get("ready")};n.prototype.hE=function(){return!0};n.uVa=m.extend(n,function(g,k,e,b){n.call(this,
g,k,e,b)});n.uVa.prototype.hE=function(){return!1};n.BVa=m.extend(n,function(g,k,e,b){n.call(this,g,k,e,b)});n.BVa.prototype.mh=function(){this.Az||(this.Az=this.H.Sc&&this.j.Jf(this.H.Sc));return this.Az&&(this.Az.get("ready")||this.Az.uqa())};return n});
define("tdv/player/view/panorama/control/transition/steps/WaitViewerAreaAcquiredInExclusive",["require","tdv/utils","tdv/player/view/panorama/control/transition/steps/Step"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/transition/steps/Step");a=m.extend(h,function(n,g,k,e){h.call(this,n,g,k,e);this.xva=!1;this.j.P.Psa(this.j,this.N5a.bind(this))});a.prototype.mh=function(){return this.xva};a.prototype.N5a=function(){this.xva=!0};a.prototype.hE=function(){return!0};return a});
define("tdv/player/view/panorama/control/transition/Controller","require tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/transition/PositionController tdv/player/view/panorama/control/transition/TransitionData tdv/player/view/panorama/control/transition/steps/Blend tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel tdv/player/view/panorama/control/transition/steps/EnforceAdded tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded tdv/player/view/panorama/control/transition/steps/RequestMediaActivation tdv/player/view/panorama/control/transition/steps/Display tdv/player/view/panorama/control/transition/steps/FadeIn tdv/player/view/panorama/control/transition/steps/FadeInVR tdv/player/view/panorama/control/transition/steps/FadeOut tdv/player/view/panorama/control/transition/steps/FadeOutVR tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition tdv/player/view/panorama/control/transition/steps/Remove tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea tdv/player/view/panorama/control/transition/steps/RequestViewerArea tdv/player/view/panorama/control/transition/steps/RestoreModelPosition tdv/player/view/panorama/control/transition/steps/SetInitialPosition tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition tdv/player/view/panorama/control/transition/steps/SetModelInTransition tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused tdv/player/view/panorama/control/transition/steps/SetMinFaceSize tdv/player/view/panorama/control/transition/steps/SetOriginPosition tdv/player/view/panorama/control/transition/steps/SetRenderingPaused tdv/player/view/panorama/control/transition/steps/SetTranslationPosition tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible tdv/player/view/panorama/control/transition/steps/RestoreViewerAreaToModelPlayer tdv/player/view/panorama/control/transition/steps/Translate tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama tdv/player/view/panorama/control/transition/steps/TriggerEvent tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow tdv/player/view/panorama/control/transition/steps/WaitReady tdv/player/view/panorama/control/transition/steps/WaitViewerAreaAcquiredInExclusive tdv/utils".split(" "),
function(a){var m=a("tdv/events/Event"),h=a("tdv/events/EventDispatcher"),n=a("tdv/player/view/panorama/control/transition/PositionController"),g=a("tdv/player/view/panorama/control/transition/TransitionData"),k=a("tdv/player/view/panorama/control/transition/steps/Blend"),e=a("tdv/player/view/panorama/control/transition/steps/AddProjectedPanoramasToModel"),b=a("tdv/player/view/panorama/control/transition/steps/EnforceAdded"),c=a("tdv/player/view/panorama/control/transition/steps/EnforceModelLoaded"),
d=a("tdv/player/view/panorama/control/transition/steps/RequestMediaActivation"),f=a("tdv/player/view/panorama/control/transition/steps/Display"),l=a("tdv/player/view/panorama/control/transition/steps/FadeIn");a("tdv/player/view/panorama/control/transition/steps/FadeInVR");var p=a("tdv/player/view/panorama/control/transition/steps/FadeOut");a("tdv/player/view/panorama/control/transition/steps/FadeOutVR");var q=a("tdv/player/view/panorama/control/transition/steps/MoveFromTranslationPosition"),r=a("tdv/player/view/panorama/control/transition/steps/MoveToInitialPosition"),
t=a("tdv/player/view/panorama/control/transition/steps/MoveToOriginPosition"),u=a("tdv/player/view/panorama/control/transition/steps/MoveToTranslationPosition"),v=a("tdv/player/view/panorama/control/transition/steps/Remove"),w=a("tdv/player/view/panorama/control/transition/steps/RemoveProjectedPanoramasFromModel"),x=a("tdv/player/view/panorama/control/transition/steps/ReleaseViewerArea"),y=a("tdv/player/view/panorama/control/transition/steps/RequestViewerArea"),z=a("tdv/player/view/panorama/control/transition/steps/RestoreModelPosition"),
A=a("tdv/player/view/panorama/control/transition/steps/SetInitialPosition"),D=a("tdv/player/view/panorama/control/transition/steps/SetInitialPositionFromModel"),F=a("tdv/player/view/panorama/control/transition/steps/SetInitialPositionThroughModel"),C=a("tdv/player/view/panorama/control/transition/steps/SetModelInitialPosition"),B=a("tdv/player/view/panorama/control/transition/steps/SetModelInTransition"),H=a("tdv/player/view/panorama/control/transition/steps/SetModelPlayerEnabled"),E=a("tdv/player/view/panorama/control/transition/steps/SetModelRenderingPaused"),
G=a("tdv/player/view/panorama/control/transition/steps/SetMinFaceSize"),N=a("tdv/player/view/panorama/control/transition/steps/SetOriginPosition"),O=a("tdv/player/view/panorama/control/transition/steps/SetRenderingPaused"),R=a("tdv/player/view/panorama/control/transition/steps/SetTranslationPosition"),Q=a("tdv/player/view/panorama/control/transition/steps/SetXRPointersVisible"),K=a("tdv/player/view/panorama/control/transition/steps/RestoreViewerAreaToModelPlayer"),L=a("tdv/player/view/panorama/control/transition/steps/Translate"),
U=a("tdv/player/view/panorama/control/transition/steps/TranslateModelFromPanorama"),T=a("tdv/player/view/panorama/control/transition/steps/TranslateModelThroughPanoramas"),Y=a("tdv/player/view/panorama/control/transition/steps/TranslateModelToPanorama"),aa=a("tdv/player/view/panorama/control/transition/steps/TriggerEvent"),ba=a("tdv/player/view/panorama/control/transition/steps/WaitUserInteractionWindow"),ea=a("tdv/player/view/panorama/control/transition/steps/WaitReady"),ia=a("tdv/player/view/panorama/control/transition/steps/WaitViewerAreaAcquiredInExclusive"),
da=a("tdv/utils").extend(h,function(V,X,S){h.call(this);this.P=V;this.j=X;this.Cc=S;this.Uc=this.lv=null;this.xxa=this.Xu=this.wU=this.pz=void 0;this.H=null;this.Qh=[]});da.prototype.qra=function(V){this.lv=V};da.prototype.clear=function(){this.Pja(this.Xu);this.H&&this.Pja(this.H.Sc);this.wU=this.pz=void 0;this.va=this.Cc=this.j=this.P=this.H=null};da.prototype.start=function(V,X){!this.H&&V==this.Xu||this.H&&V==this.H.Sc?this.wU=this.pz=void 0:(this.P.Mma(this.j),this.pz=V,this.wU=X,this.Qh.length==
0&&this.u5())};da.prototype.oe=function(){this.pz=null;!this.H&&this.Xu&&this.u5()};da.prototype.Woa=function(){return this.H!==null};da.prototype.efb=function(){return this.H&&this.H.Sc};da.prototype.u5=function(){this.H=new g(this.j,this.lv,this.Xu,this.pz,this.wU);this.Uc=new n(this.j,this.Cc,this.H);this.wU=this.pz=void 0;this.pa(G);this.pa(b);switch(this.H.mode){case g.sta:this.pa(z);this.H.Va()?(this.pa(p),this.vc(this.Rz)):(this.vc(this.Rz),this.pa(p));this.pa(O.Pi);this.pa(E.Eg);this.pa(H.Pi);
this.vc(this.ED);this.pa(v);this.vc(this.Rv);this.pa(B.Eg);this.pa(x);break;case g.rta:if(this.H.pQ=="fade_out_fade_in"||this.H.Va())this.pa(O.Pi),this.pa(ia);this.pa(y);this.pa(O.Eg);this.vc(this.EI);this.pa(ea);this.pa(d);this.pa(N);this.vc(this.Sz);this.pa(l);this.pa(ba);this.pa(r);this.vc(this.DI);break;case g.l_:this.pa(y);this.vc(this.Rz);this.pa(p);this.vc(this.EI);this.vc(this.ED);this.pa(v);this.vc(this.Rv);this.pa(ea);this.pa(d);this.pa(N);this.vc(this.Sz);this.pa(l);this.pa(ba);this.pa(r);
this.vc(this.DI);break;case g.Fua:this.pa(y);this.vc(this.EI);this.vc(this.Rz);this.vc(this.ED);this.H.Va()?(this.pa(ea),this.pa(R),this.vc(this.Sz),this.pa(L),this.pa(v),this.vc(this.Rv)):(this.pa(u),this.vc(this.Sz),this.pa(L),this.pa(v),this.vc(this.Rv),this.pa(q),this.pa(d),this.pa(ba));this.vc(this.DI);break;case g.Op:this.pa(y);this.vc(this.EI);this.pa(ea);this.H.Va()?(this.vc(this.Rz),this.vc(this.ED),this.pa(A),this.vc(this.Sz),this.pa(k),this.pa(v),this.vc(this.Rv)):(this.vc(this.Rz),this.vc(this.ED),
this.pa(t),this.vc(this.Sz),this.pa(k),this.pa(v),this.vc(this.Rv),this.pa(d),this.pa(ba),this.pa(r));this.vc(this.DI);break;case g.qca:this.pa(O.Pi);this.pa(y);this.vc(this.EI);this.pa(c);this.pa(E.Eg);this.pa(ea);this.pa(Q.Eg);this.pa(e.sca);this.pa(D);this.pa(Y);this.pa(B.Eg);this.pa(B.Pi);this.vc(this.Sz);this.pa(O.Eg);this.pa(H.Eg);this.pa(w);this.pa(Q.Pi);this.pa(d);this.pa(ba);this.pa(E.Pi);this.vc(this.DI);break;case g.Hua:this.pa(c);this.vc(this.Rz);this.pa(C);this.vc(this.ED);this.pa(Q.Eg);
this.pa(e.kca);this.pa(O.Pi);this.pa(E.Eg);this.pa(v);this.vc(this.Rv);this.pa(U);this.pa(B.Eg);this.pa(w);this.pa(Q.Pi);this.pa(K);this.pa(x);break;case g.rca:this.vc(this.EI);this.pa(c);this.vc(this.Rz);this.vc(this.ED);this.pa(Q.Eg);this.pa(e.kca);this.pa(ea);this.pa(e.sca);this.pa(C);this.pa(O.Pi);this.pa(E.Eg);this.pa(v);this.vc(this.Rv);this.pa(T);this.pa(H.Eg);this.pa(B.Eg);this.pa(w);this.pa(F);this.vc(this.Sz);this.pa(f);this.pa(O.Eg);this.pa(Q.Pi);this.pa(d);this.pa(ba);this.pa(E.Pi);this.vc(this.DI);
break;case g.Gua:this.vc(this.EI),this.pa(c),this.pa(Q.Eg),this.pa(e.kca),this.pa(C),this.pa(O.Pi),this.pa(E.Eg),this.pa(ea),this.vc(this.Rz),this.vc(this.ED),this.pa(v),this.vc(this.Rv),this.pa(U),this.pa(w),this.pa(e.sca),this.pa(D),this.pa(Y),this.pa(B.Eg),this.vc(this.Sz),this.pa(O.Eg),this.pa(H.Eg),this.pa(w),this.pa(Q.Pi),this.pa(E.Pi),this.vc(this.DI)}this.vc(this.xla);this.bb()};da.prototype.ola=function(){this.Xu=this.H.Sc;this.xxa=this.H.yK;this.H=this.Uc=null;this.pz===void 0?this.Xu?this.B$a(this.Xu,
this.xxa):this.C$a():this.u5()};window.fdb=!0;window.gdb=!0;document.addEventListener("keydown",function(V){V.which==67&&(window.fdb=window.gdb=!0)});da.prototype.YA=function(V){for(;this.Qh.length;){var X=this.Qh[0];X.T9a||(X.T9a=(new Date).getTime());if(this.pz!==void 0&&this.pz!==this.Xu&&X.hE()){this.Pja(this.H.Sc);this.Qh=[];this.u5();break}else if(X.Yg(V),this.bb(),this.Uc.YA(V),X.mh())this.Qh.shift(),this.Qh.length==0&&this.ola();else break}};document.addEventListener("keydown",function(){(new Date).getTime()});
document.addEventListener("keyup",function(){(new Date).getTime()});da.prototype.ze=function(){};da.prototype.pa=function(V){this.Qh.push(new V(this,this.Uc,this.j,this.H))};da.prototype.vc=function(V){this.Qh.push(new aa(this,this.Uc,this.j,this.H,V))};da.prototype.Pja=function(V){V&&(V=this.j.Jf(V))&&(this.j.remove(V),this.Rv())};da.prototype.EI=function(){this.o(new m(da.Eba,{panorama:this.H.Sc}))};da.prototype.Rv=function(){this.o(new m(da.vba,{panorama:this.H?this.H.qh:this.Xu,nextPanorama:this.H?
this.H.Sc:null}))};da.prototype.Rz=function(){this.o(new m(da.CF,{panorama:this.H.qh}))};da.prototype.ED=function(){this.o(new m(da.BF,{panorama:this.H.qh,nextPanorama:this.H.Sc}))};da.prototype.DI=function(){this.o(new m(da.DF,{panorama:this.H.Sc,camera:this.H.yK}))};da.prototype.xla=function(){this.o(new m(da.Hr))};da.prototype.Sz=function(){this.o(new m(da.EF,{panorama:this.H.Sc,camera:this.H.yK}))};da.prototype.B$a=function(V,X){this.o(new m(da.aba,{panorama:V,camera:X}))};da.prototype.C$a=function(){this.o(new m(da.bba))};
da.prototype.bb=function(){this.o(new m(da.oc))};da.oc="request frame";da.Eba="request load";da.vba="panorama removed";da.aba="all pending panoramas displayed";da.bba="all pending panoramas hidden";da.BF="panorama end";da.EF="panorama start";da.DF="panorama show";da.CF="panorama hide";da.Hr="transition end";return da});
define("tdv/player/view/panorama/control/frames/BaseFramesController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=m.extend(n,function(k){n.call(this);this.j=k});g.prototype.clear=function(){this.end();this.j=null};g.prototype.nP=function(k){for(var e=this.n1(k),b=k.oX(),c=0;c<e;c++)this.j.Jf(this.Nfa(k,c)).set("alpha",c==b?1:0)};g.prototype.getTime=function(){return 0};g.prototype.start=
function(){};g.prototype.end=function(){};g.prototype.play=function(){};g.prototype.pause=function(){};g.prototype.OP=function(){};g.prototype.YP=function(){};g.prototype.U$=function(){};g.prototype.stop=function(){};g.prototype.qK=function(){};g.prototype.RE=function(){};g.prototype.vQ=function(){};g.prototype.ze=function(){};g.prototype.ql=function(){};g.prototype.n1=function(k){return k.get("frames").length};g.prototype.Nfa=function(k,e){return k.get("frames")[e]};g.prototype.bb=function(){this.o(new h(g.oc))};
g.prototype.ct=function(k,e,b,c,d,f){this.o(new h(g.Ok,{time:k,duration:e,transitionPosition:b,transitionLength:c,steps:d,selectedStep:f}))};g.prototype.ml=function(){this.o(new h(g.gd,{state:this.ql()}))};g.oc="request frame";g.yUa="frame display";g.zUa="frame hide";g.Ok="time change";g.gd="playback state change";return g});
define("tdv/player/view/panorama/control/frames/HDRFramesController","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/player/view/panorama/control/frames/BaseFramesController tdv/player/view/util/geo/Point tdv/player/view/util/geo/Transformation tdv/view/images/ImageLoader".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/player/view/panorama/control/frames/BaseFramesController"),k=a("tdv/player/view/util/geo/Point"),
e=a("tdv/player/view/util/geo/Transformation"),b=a("tdv/view/images/ImageLoader"),c=m.extend(g,function(d){g.call(this,d);this.f1=null;this.wfa=this.ZG=0;this.Ba=this.DH=null;this.lja=!1;this.kb=360;this.AHa=180;this.rb=.5;this.qq=.2;this.Xy=.45;this.nAa=5E3;this.rAa=1;this.M2=[[.5,.25],[.5,.375],[.25,.5],[.375,.5],[.5,.5],[.625,.5],[.75,.5],[.5,.625],[.5,.75]];this.n4a=[.05,.1,.05,.1,.4,.1,.05,.1,.05]});c.prototype.nP=function(d){g.prototype.nP.call(this,d);this.fV(d)};c.prototype.start=function(d){this.fV(d);
this.bb()};c.prototype.end=function(){this.fV(null)};c.prototype.fV=function(d){this.Ba!=d&&(this.Ba&&(this.T$a(),this.Ba=null,this.Z$a()),this.Ba=d)&&(this.wYa(),this.kb=d.get("hfov",360),this.AHa=d.get("vfov",180),this.rb=d.get("pitch",0),this.uja=this.fI=void 0,this.g4a(d),this.Sb=.5)};c.prototype.vQ=function(){this.lja=!1};c.prototype.qK=function(d){this.Sb=d/c.dR;this.bb();this.lja=!0};c.prototype.RE=function(d){this.qK(d)};c.prototype.ct=function(){var d=this.n1(this.Ba),f=this.Sb*(d-1),l=Math.max(0,
Math.min(d-2,Math.floor(f))),p=void 0;f-l<.01?p=l:f-l>.99&&(p=l+1);g.prototype.ct.call(this,this.Sb*c.dR,c.dR,this.Sb*c.dR,c.dR,d,p)};c.prototype.ze=function(d){if(this.Ba){var f=this.j.Jc(),l=this.j.Ic(),p=this.j.yg(),q=0;if(this.fI!==void 0&&this.uja!==void 0&&this.DDa!==void 0){var r=f-this.fI,t=l-this.uja,u=p-this.DDa;q=Math.sqrt(r*r+t*t+u*u)*1E3/d}this.fI=f;this.uja=l;this.DDa=p;r=this.n1(this.Ba);var v=this.Sb*(r-1);t=Math.max(0,Math.min(r-2,Math.floor(v)));u=t+1;v=1-(v-t);for(var w=1-v,x=[],
y=0;y<r;y++)x.push(0);x[u]=w;x[t]=w<1?1:0;for(y=0;y<r;y++)this.j.Jf(this.Nfa(this.Ba,y)).set("alpha",x[y]);this.ct();if(this.f1&&(q<=this.rAa||this.j.Aw())&&!this.lja){y=Math.PI/180;q=180/Math.PI;x=this.j.nb();var z=this.j.Mb(),A=new e;A.rotateZ(-p*y);A.rotateX(-l*y);A.rotateY(-f*y);f=[];for(y=0;y<this.M2.length;y++)l=new k(this.M2[y][0]*x,this.M2[y][1]*z,0),p=this.j.unproject(l).VLa(),p.apply(A),l=p.Jc()*q,p=p.Ic()*q,f.push(Math.round((90-p)*this.wfa/180)*this.ZG+Math.round((l+180)*this.ZG/360));
l=[];for(y=0;y<r;y++){p=this.f1[y];for(x=q=0;x<this.M2.length;x++)q+=this.n4a[x]*p[f[x]];l.push(q)}y=l[t];f=l[u];t=v*l[t]+w*l[u];d=Math.min(1/r,d/this.nAa);r=this.Sb;u=Math.max.apply(Math,l);v=Math.min.apply(Math,l);t<this.qq&&t<u?r=f>t?r+d:r-d:t>this.Xy&&t>v&&(r=y<t?r-d:r+d);r=Math.min(1,Math.max(0,r));this.Sb!=r&&(this.Sb=r,this.bb())}}};c.prototype.g4a=function(d){var f=d.get("frames",[]).map(l=>l.get("thumbnailUrl"));this.DH=f.map(l=>{var p=null;l&&(p=new b(n.Hm),p.bind(h.ia,this.XBa,this),p.bind(h.$c,
this.YBa,this));return p});this.DH.forEach((l,p)=>{l&&l.load(f[p])})};c.prototype.Z$a=function(){this.txa();this.f1=null};c.prototype.c5a=function(){this.ZG=150;this.DH.map(function(d){d&&(this.ZG=Math.min(d.fg()*360/this.kb,this.ZG))},this);this.wfa=Math.round(this.ZG/2);this.f1=this.DH.map(function(d){return this.q_a(d,this.ZG,this.wfa,this.kb,this.AHa,this.rb)},this);this.txa()};c.prototype.q_a=function(d,f,l,p,q,r){var t=document.createElement("canvas");t.width=f;t.height=l;var u=t.getContext("2d");
u.fillStyle="#000000";u.fillRect(0,0,f,l);d&&(d=d.xg(),p=Math.round(f*p/360),u.drawImage(d,(f-p)*.5,Math.round(l*(90-(r+q*.5))/180),p,Math.round(l*q/180)));f=[];t=u.getImageData(0,0,t.width,t.height);for(l=u=0;u<t.height;u++)for(q=0;q<t.width;q++,l+=4)f.push((.299*t.data[l]+.587*t.data[l+1]+.114*t.data[l+2])/255);return f};c.prototype.txa=function(){this.DH.forEach(d=>{d&&(d.h(h.ia,this.XBa,this),d.h(h.$c,this.YBa,this),d.cancel())});this.DH=null};c.prototype.XBa=function(){this.DH.filter(d=>d&&!d.oj()).length==
0&&this.c5a()};c.prototype.YBa=function(){};c.prototype.wYa=function(){this.Ba.bind(h.L("minimumLuminance"),this.iz,this);this.Ba.bind(h.L("maximumLuminance"),this.iz,this);this.Ba.bind(h.L("luminanceChangeTime"),this.iz,this);this.Ba.bind(h.L("maxLuminanceChangeSpeed"),this.iz,this);this.iz()};c.prototype.T$a=function(){this.Ba.h(h.L("minimumLuminance"),this.iz,this);this.Ba.h(h.L("maximumLuminance"),this.iz,this);this.Ba.h(h.L("luminanceChangeTime"),this.iz,this);this.Ba.h(h.L("maxLuminanceChangeSpeed"),
this.iz,this)};c.prototype.iz=function(){this.qq=this.Ba.get("minimumLuminance");this.Xy=this.Ba.get("maximumLuminance");this.qq==void 0&&this.Xy==void 0?(this.qq=.2,this.Xy=.45):this.qq==void 0?this.qq=Math.min(.2,this.Xy):this.qq==void 0?this.Xy=Math.max(.45,this.qq):this.qq=Math.min(this.qq,this.Xy);this.Xy=Math.min(1,Math.max(0,this.Xy));this.qq=Math.min(1,Math.max(0,this.qq));this.nAa=Math.max(100,this.Ba.get("luminanceChangeTime",5E3));this.rAa=this.Ba.get("maxLuminanceChangeSpeed",1);this.bb()};
c.dR=1E3;return c});
define("tdv/player/view/panorama/control/frames/LiveFramesController","require tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/control/frames/BaseFramesController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/ChangeWatcher"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/view/panorama/control/frames/BaseFramesController");a=m.extend(k,function(e){k.call(this,e);this.d1=this.e1=null;
this.jk=this.Wi=5E3;this.vf=void 0;this.ac=this.Wi;this.ks=1;this.Ba=null;this.wH=!1;this.RU=void 0});a.prototype.start=function(e){this.Ba=e;this.wH=!1;this.V1=!0;this.e1=h.jx(this.Ba,"frameDisplayTime",this.Lla,this);this.d1=h.jx(this.Ba,"frameTransitionTime",this.Lla,this);this.ks=this.n1(this.Ba);this.vf=this.Ba.oX()*(this.Wi+this.jk);this.Lla(!0);this.ct();this.bb();this.ml()};a.prototype.Lla=function(e){var b=Math.max(100,this.Ba.get("frameDisplayTime",5E3)),c=Math.max(100,this.Ba.get("frameTransitionTime",
5E3));if(this.Wi!=b||this.jk!=c||e){e=this.oM();var d=this.x1a();this.Wi=b;this.jk=c;this.ks>1?(this.vf=e*(this.Wi+this.jk)+d*this.Wi+d*this.jk,this.ac=this.ks*(this.Wi+this.jk)):(this.vf=d*this.Wi,this.ac=this.Wi)}};a.prototype.oM=function(){return this.ks>1?Math.floor(this.vf/(this.Wi+this.jk)):0};a.prototype.y1a=function(){return this.ks>1?(this.oM()+1)%this.ks:0};a.prototype.x1a=function(){return this.ks>1?Math.max(0,Math.min(1,this.vf-this.oM()*(this.Wi+this.jk))):this.vf/this.Wi};a.prototype.Dya=
function(){return this.ks>1?Math.max(0,Math.min(1,(this.vf-(this.oM()*(this.Wi+this.jk)+this.Wi))/this.jk)):0};a.prototype.V9a=function(e){var b=Math.floor(e/this.jk);return b*(this.Wi+this.jk)+this.Wi+(e-b*this.jk)};a.prototype.$Fa=function(e){var b=Math.floor(e/(this.Wi+this.jk));return b*this.jk+Math.max(0,e-b*(this.Wi+this.jk)-this.Wi)};a.prototype.play=function(){this.wH&&(this.wH=!1,this.V1&&this.bb(),this.ml())};a.prototype.pause=function(){this.wH=!0;this.ml()};a.prototype.OP=function(){this.pause()};
a.prototype.YP=function(){this.play()};a.prototype.end=function(){this.V1=!1;this.Ba=null;this.e1&&(this.e1.hF(),this.e1=null);this.d1&&(this.d1.hF(),this.d1=null);this.ml()};a.prototype.qK=function(e){this.vf=e;this.bb()};a.prototype.RE=function(e){this.vf=this.V9a(e);this.bb();this.pause()};a.prototype.ze=function(e){if(this.V1){var b=this.vf;this.wH||(b+=e);if(this.RU===void 0&&b>=this.ac-this.jk)this.RU=this.vf,this.Ba.o(n.Ur);else{this.vf=b;this.vf%=this.ac;this.RU!==void 0&&this.vf<this.RU&&
(this.RU=void 0);e=this.oM();b=this.y1a();var c=this.Dya(),d=b>e?c:1;c=b>e?1:1-c;for(var f=0;f<this.ks;f++){var l=f==e?c:f==b?d:0;var p=this.j.Jf(this.Nfa(this.Ba,f));p.get("alpha")!=l&&(l>0&&l<1&&p.yi(),p.get("alpha"),p.set("alpha",l))}this.ct();this.wH||this.bb()}}};a.prototype.ql=function(){return this.V1?this.wH?g.Zb:g.PLAYING:g.ca};a.prototype.ml=function(){k.prototype.ml.call(this,this.ql())};a.prototype.ct=function(){k.prototype.ct.call(this,this.vf,this.ac,this.$Fa(this.vf),this.$Fa(this.ac),
this.ks+1,this.Dya()===0?this.oM():void 0)};return a});define("tdv/player/view/panorama/control/frames/StandardFramesController",["require","tdv/utils","tdv/player/view/panorama/control/frames/BaseFramesController"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/control/frames/BaseFramesController");return m.extend(h,function(n){h.call(this,n)})});
define("tdv/player/view/panorama/control/frames/VideoFramesController",["require","tdv/utils","tdv/constants/EventName","tdv/constants/PlaybackState","tdv/player/view/panorama/control/frames/BaseFramesController"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/control/frames/BaseFramesController");a=m.extend(g,function(k){g.call(this,k);this.Ff=!1});a.prototype.nP=function(){};a.prototype.start=function(k){this.end();
this.Ba=k;this.Ba.set("mute",this.Ff);this.Ba.get("autoplay")&&this.Ba.set("state",n.PLAYING);this.Px()};a.prototype.getTime=function(){return this.Ba?this.Ba.get("currentTime"):0};a.prototype.ql=function(){return this.Ba?this.Ba.get("state"):n.ca};a.prototype.play=function(){this.Ba&&this.Ba.set("state",n.PLAYING)};a.prototype.pause=function(){this.Ba&&this.Ba.set("state",n.Zb)};a.prototype.U$=function(){this.Ba&&this.Ba.set("state",n.Zb)};a.prototype.stop=function(){this.Ba&&this.Ba.set("state",
n.ca)};a.prototype.end=function(){this.Ba&&(this.zz(),this.Ba=null)};a.prototype.qK=function(k){this.Ba&&this.Ba.set("state",n.PLAYING);this.Ba&&this.Ba.set("currentTime",k)};a.prototype.Bg=function(k){this.Ff=k;this.Ba&&this.Ba.set("mute",this.Ff)};a.prototype.Px=function(){this.Ba.bind(h.L("currentTime"),this.Nf,this,!0);this.Ba.bind(h.L("duration"),this.$o,this,!0);this.Ba.bind(h.L("state"),this.Hj,this,!0);this.Ba.get("state")!=n.ca&&this.ml()};a.prototype.zz=function(){this.Ba.h(h.L("currentTime"),
this.Nf,this,!0);this.Ba.h(h.L("duration"),this.$o,this,!0);this.Ba.h(h.L("state"),this.Hj,this,!0)};a.prototype.Hj=function(){this.ml()};a.prototype.Nf=function(){this.ct()};a.prototype.$o=function(){this.ct()};a.prototype.ct=function(){this.Ba&&g.prototype.ct.call(this,this.Ba.get("currentTime"),this.Ba.get("duration"))};return a});
define("tdv/player/view/panorama/control/FramesController","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/player/view/panorama/control/frames/BaseFramesController tdv/player/view/panorama/control/frames/HDRFramesController tdv/player/view/panorama/control/frames/LiveFramesController tdv/player/view/panorama/control/frames/StandardFramesController tdv/player/view/panorama/control/frames/VideoFramesController".split(" "),function(a){var m=
a("tdv/utils");a("tdv/constants/PlaybackState");var h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/view/panorama/control/frames/BaseFramesController"),e=a("tdv/player/view/panorama/control/frames/HDRFramesController"),b=a("tdv/player/view/panorama/control/frames/LiveFramesController"),c=a("tdv/player/view/panorama/control/frames/StandardFramesController"),d=a("tdv/player/view/panorama/control/frames/VideoFramesController"),f=m.extend(n,
function(l){n.call(this);this.j=l;this.uha=this.z0(b);this.jga=this.z0(e);this.k6=this.z0(d);this.Mka=this.z0(c);this.re=null});f.prototype.clear=function(){this.p0(this.uha);this.uha=null;this.p0(this.jga);this.jga=null;this.p0(this.k6);this.k6=null;this.p0(this.Mka);this.j=this.re=this.Mka=null};f.prototype.z0=function(l){l=new l(this.j);l.bind(k.oc,this.bg,this,!0);l.bind(k.Ok,this.Fs,this,!0);l.bind(k.gd,this.Mf,this,!0);return l};f.prototype.p0=function(l){l.h(k.oc,this.bg,this);l.h(k.Ok,this.Fs,
this);l.h(k.gd,this.Mf,this);l.clear()};f.prototype.Wga=function(l,p){return g.Oa(p,l)};f.prototype.xya=function(l){return this.Wga(l,"HDRPanorama")?this.jga:this.Wga(l,"LivePanorama")?this.uha:this.Wga(l,"VideoPanorama")?this.k6:this.Mka};f.prototype.nP=function(l){(this.re=this.xya(l))&&this.re.nP(l)};f.prototype.start=function(l){this.bg();(this.re=this.xya(l))&&this.re.start(l)};f.prototype.ql=function(){if(this.re)return this.re.ql()};f.prototype.getTime=function(){return this.re?this.re.getTime():
0};f.prototype.play=function(){this.re&&this.re.play()};f.prototype.pause=function(){this.re&&this.re.pause()};f.prototype.OP=function(){this.re&&this.re.OP()};f.prototype.YP=function(){this.re&&this.re.YP()};f.prototype.U$=function(){this.re&&this.re.U$()};f.prototype.stop=function(){this.re&&this.re.stop();this.o(new h(f.Ok,{duration:0,time:0,steps:void 0,selectedStep:void 0}))};f.prototype.end=function(){this.re&&(this.re.end(),this.re=null)};f.prototype.qK=function(l){this.re&&this.re.qK(l)};
f.prototype.RE=function(l){this.re&&this.re.RE(l)};f.prototype.vQ=function(){this.re&&this.re.vQ()};f.prototype.ze=function(l){this.re&&this.re.ze(l)};f.prototype.Bg=function(l){this.k6.Bg(l)};f.prototype.bg=function(){this.o(new h(f.oc))};f.prototype.Fs=function(l){this.o(new h(f.Ok,l.data))};f.prototype.Mf=function(l){this.o(new h(f.gd,l.data))};f.oc="request frame";f.yUa="frame display";f.zUa="frame hide";f.Ok="time change";f.gd="playback state change";return f});
define("tdv/player/view/panorama/control/LoadController",["require","tdv/utils","tdv/constants/EventName","tdv/events/EventDispatcher","tdv/view/events/ProgressEvent"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/EventDispatcher"),g=a("tdv/view/events/ProgressEvent");a=m.extend(n,function(k){n.call(this);this.j=k;this.si=this.Ba=null});a.prototype.start=function(k){this.Ba=k;this.si=this.j.Jf(this.Ba);this.si.bind(h.ia,this.Pe,this,!0);this.si.bind(h.yc,this.mz,
this,!0);this.si.get("ready")?this.o(h.vd,{panorama:this.Ba}):this.si.bind(h.vd,this.D3,this,!0);this.si.set("loadingActive",!0)};a.prototype.stop=function(){this.Ba=null;this.si&&(this.si.h(h.vd,this.D3,this),this.si.h(h.ia,this.Pe,this),this.si.h(h.yc,this.mz,this),this.si.set("loadingActive",!1),this.si=null,this.o(h.Fg))};a.prototype.clear=function(){this.stop()};a.prototype.D3=function(){this.si.h(h.vd,this.D3,this);this.o(h.vd,{panorama:this.Ba})};a.prototype.Pe=function(){this.si.h(h.vd,this.D3,
this);this.si.h(h.ia,this.Pe,this);this.si.h(h.yc,this.mz,this);this.si=null;this.o(h.ia,{panorama:this.Ba});this.Ba=null;this.o(h.Fg)};a.prototype.mz=function(k){this.o(new g(h.yc,k.percent))};return a});
define("tdv/player/view/panorama/control/MapController","require exports tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/script/MapPlayer".split(" "),function(a,m,h,n,g,k){var e=function(c){function d(f){var l=c.call(this)||this;l.renderer=f;l.xpa=[];l.WX=new Map;l.gg=null;return l}P(d,c);d.prototype.clear=function(){this.v$([])};d.prototype.v$=function(f){f?Array.isArray(f)||(f=[f]):f=[];this.xpa.filter(function(l){return!f.includes(l)}).forEach(this.Ajb.bind(this));
f.filter(function(l){return!this.xpa.includes(l)}.bind(this)).forEach(this.Tbb.bind(this));this.xpa=f};d.prototype.display=function(f){this.Vf(f)};d.prototype.oe=function(f){this.gg==f&&this.stop()};d.prototype.stop=function(){this.Vf(null)};d.prototype.Tbb=function(f){var l=new b(this.renderer,f);l.bind(d.tj,this.FY,this,!0);l.Vf(this.gg);this.WX.set(f,l)};d.prototype.Ajb=function(f){var l=this.WX.get(f);l.h(d.tj,this.FY,this);l.dispose();this.WX.delete(f)};d.prototype.Vf=function(f){this.gg!==f&&
(this.gg=f,this.WX.forEach(function(l){l.Vf(f)}))};d.prototype.ze=function(){this.WX.forEach(function(f){f.Inb()})};d.prototype.FY=function(f){this.o(new n(d.tj,{yawDelta:f.data.yawDelta}))};d.tj="request yaw change";return d}(g),b=function(c){function d(f,l){var p=c.call(this)||this;p.renderer=f;p.HA=l;p.gg=null;p.Bw=null;p.Sbb();return p}P(d,c);d.prototype.dispose=function(){this.zjb();this.Vf(null)};d.prototype.Vf=function(f){this.gg!==f&&(this.jJa(),this.gg=f,this.Ubb())};d.prototype.Inb=function(){this.qTa()};
d.prototype.FQa=function(f,l,p){f=f.get("mapLocations",[]);for(var q=0;q<f.length;q++){var r=f[q];if(r.get("map")==l)return r}return p&&f.length>0?f[0]:null};d.prototype.NRa=function(){this.HA.Wbb(this.Bw);this.HA.bind(k.tj,this.FY,this,!0);this.qTa()};d.prototype.Ngb=function(){this.HA.Bjb(this.Bw);this.HA.h(k.tj,this.FY,this)};d.prototype.jJa=function(){this.Bw&&(this.Ngb(),this.Bw=null)};d.prototype.Ubb=function(){this.gg&&(this.Bw=this.FQa(this.gg,this.HA.get("map",null),!0))&&this.NRa()};d.prototype.qTa=
function(){if(this.Bw){var f=this.renderer.Jc(),l=this.renderer.Ic();this.HA.tr(this.Bw,f,l,this.renderer.jf())}};d.prototype.Sbb=function(){this.HA.bind(h.L("map"),this.yOa,this,!1)};d.prototype.zjb=function(){this.HA.h(h.L("map"),this.yOa,this)};d.prototype.yOa=function(){this.gg&&(this.jJa(),(this.Bw=this.FQa(this.gg,this.HA.get("map",null),!1))&&this.NRa())};d.prototype.FY=function(f){this.o(new n(e.tj,{yawDelta:f.data.yawDelta}))};return d}(g);return e});
define("tdv/player/view/util/Gamepad","require tdv/constants/EventName tdv/events/async tdv/events/EventDispatcher tdv/view/util/Animation tdv/player/view/util/URL tdv/player/view/util/XR".split(" "),function(a){function m(w){this.Ri=w;this.Kl=null;this.wda={};for(w=0;w<this.Ri.buttons.length;w++)this.wda[this.Ri.buttons[w]]=!1;this.uda=0;this.lD=null;this.jI=[new THREE.Quaternion,new THREE.Quaternion];this.bm=this.jI[0];this.cj=[new THREE.Vector3,new THREE.Vector3];this.Sb=this.cj[0];this.tN=new THREE.Vector3;
this.eI=new THREE.Quaternion;this.Dwa=0}function h(w,x,y){this.Sgb=w;this.buttons=x;this.ljb=y}function n(){if(!v&&u!=c.zf){u=c.zf;var w=navigator.getGamepads&&navigator.getGamepads();if(w){for(var x=0;x<q.length;x++)q[x].dRa(null);for(x=0;x<w.length;x++){var y=w[x];if(y&&(y.pose||y.IMa)){var z=y.id||y.Upb,A=z+(y.hand?"-"+y.hand:""),D=t[A];if(!D){a:{for(var F=0;F<f.length;F++){var C=f[F];if(z.indexOf(l[C].Sgb)==0){z=C;break a}}z=void 0}z&&q.push(D=t[A]=new m(l[z]))}D&&t[A].dRa(y)}}(w=r)&&!r.ipa()&&
(r=null);for(x=0;x<q.length;x++)if(D=q[x],D.ipa()&&D.pressed()){r=D;break}if(!r)for(x=0;x<q.length;x++)if(D=q[x],D.ipa()){if(D.hand()=="right"){r=D;break}r||(r=D)}w!=r&&e.ME(g)}}}function g(){p.o(k.V)}var k=a("tdv/constants/EventName"),e=a("tdv/events/async"),b=a("tdv/events/EventDispatcher"),c=a("tdv/view/util/Animation"),d=a("tdv/player/view/util/URL");a("tdv/player/view/util/XR");var f="oculus go;oculus touch;xr-standard;gear vr;daydream;vive;vive focus;microsoft;unknown".split(";"),l={};l["oculus go"]=
new h("Oculus Go",["trackpad","trigger"],"trigger");l["oculus touch"]=new h("Oculus Touch","thumbstick trigger grip abutton bbutton surface".split(" "),"trigger");l["xr-standard"]=new h("xr-standard","trigger grip unknow_button_0 thumbstick abutton bbutton unknow_button".split(" "),"trigger");l["gear vr"]=new h("Gear VR",["trackpad","trigger"],"trigger");l.daydream=new h("Daydream Controller",["trackpad","menu","system"],"trackpad");l.vive=new h("OpenVR",["trackpad","trigger","grip","menu","system"],
"trigger");l["vive focus"]=new h("HTC Vive Focus",["trackpad","trigger","grip"],"trigger");l.microsoft=new h("Spatial Controller (Spatial Interaction Source)",["thumbstick","trigger","grip","menu","thumbpad"],"trigger");l.unknown=new h("",[],void 0);m.prototype.dRa=function(w){if(this.Kl=w){this.M2a=this.Kl.hand||this.Kl.Tpb;this.Kl.pose&&this.Kl.pose.orientation?(this.lD=this.Kl.pose,this.lD.orientation&&(this.bm=this.jI[0]==this.bm?this.jI[1]:this.jI[0],this.bm.fromArray(this.lD.orientation)),this.lD.position?
(this.Sb=this.cj[0]==this.Sb?this.cj[1]:this.cj[0],this.Sb.fromArray(this.lD.position)):this.Sb=null):this.Kl.IMa&&(this.lD=this.Kl.IMa.transform,this.bm=this.jI[0]==this.bm?this.jI[1]:this.jI[0],this.bm.copy(this.lD.orientation),this.Sb=this.cj[0]==this.Sb?this.cj[1]:this.cj[0],this.Sb.copy(this.lD.position));w=0;for(var x=Math.min(this.Kl.buttons.length,this.Kl.buttons.length);w<x;w++)this.wda[this.Ri.buttons[w]]=this.Kl.buttons[w].pressed;for(w=this.uda=0;w<this.Kl.buttons.length;w++)this.Kl.buttons[w].pressed&&
this.uda++;(w=!!this.tN!=!!this.Sb||this.Sb&&this.tN.x!=this.Sb.x&&this.tN.y!=this.Sb.y&&this.tN.z!=this.Sb.z)&&(this.Sb?this.tN.copy(this.Sb):this.tN.set(0,0,0,0));(x=!!this.eI!=!!this.bm||this.bm&&(this.eI.x!=this.bm.x||this.eI.y!=this.bm.y||this.eI.z!=this.bm.z||this.eI.w!=this.bm.w))&&(this.bm?this.eI.copy(this.bm):this.eI.set(0,0,0));if(w||x)this.Dwa=c.zf}};m.prototype.ipa=function(){return!!this.Kl};m.prototype.phb=function(){return c.zf-this.Dwa>500};m.prototype.hand=function(){return this.M2a};
m.prototype.quaternion=function(){return this.bm};m.prototype.position=function(){return this.Sb};m.prototype.pressed=function(w){w||(w=this.Ri.ljb);return w?this.wda[w]:this.uda>0};var p=new b;p.all=function(){n();return q};p.Ug=function(){n();return r};p.fb="left";p.Db="right";var q=[],r=null,t={},u=void 0,v=d.Tg("disable-controller",!1);return p});
define("tdv/player/view/util/geo/Line",["require","tdv/player/view/util/geo/Point","tdv/player/view/util/geo/Vector"],function(a){function m(g,k){this.Lg=g||new h(0,0,0);this.Dk=k||new h(1,0,0)}var h=a("tdv/player/view/util/geo/Point"),n=a("tdv/player/view/util/geo/Vector");m.prototype.clone=function(){return new m(this.Lg.clone(),this.Dk.clone())};m.prototype.apply=function(g){g.wO(this.Lg);g.wO(this.Dk)};m.prototype.VLa=function(){return n.YD(this.Lg,this.Dk)};return m});
define("tdv/player/view/util/geo/Frustum",["require","tdv/player/view/util/geo/Line","tdv/player/view/util/geo/Point"],function(a){function m(g,k,e){this.Pa=g||100;this.Ha=k||100;this.kb=e||Math.PI;this.zja=void 0;this.Tu=!0}var h=a("tdv/player/view/util/geo/Line"),n=a("tdv/player/view/util/geo/Point");m.prototype.mK=function(g){this.kb!=g&&(this.kb=g,this.Tu=!0)};m.prototype.uA=function(){return this.kb};m.prototype.KRa=function(g){this.Pa!=g&&(this.Pa=g,this.Tu=!0)};m.prototype.fg=function(){return this.Pa};
m.prototype.eRa=function(g){this.Ha!=g&&(this.Ha=g,this.Tu=!0)};m.prototype.wg=function(){return this.Ha};m.prototype.project=function(g){if(g.z!=0){this.eHa();var k=1/g.z,e=this.zja*k;g.x=this.Pa*.5-g.x*e;g.y=this.Ha*.5-g.y*e;g.z=k}};m.prototype.unproject=function(g){this.eHa();return new h(new n(0,0,0),new n(this.Pa*.5-g.x,this.Ha*.5-g.y,this.zja))};m.prototype.eHa=function(){this.Tu&&(this.zja=this.Pa*.5/Math.tan(this.kb*.5),this.Tu=!1)};return m});
define("tdv/player/view/panorama/renderer/RendererState",["require","exports"],function(){return function(){function a(){this.Mg=this.pitch=this.Xa=0;this.kj=this.Wd=90;this.Rj=this.Sj=this.height=this.width=100;this.tl=1;this.GJ=this.Va=!1;this.Ik=0;this.eoa=this.uW=this.Ipa=!1;this.DJ=this.xY=!0;this.camera=this.RW=this.QW=this.sh=null;this.Hn=this.enabled=!1;this.zf=0;this.wZ=void 0}a.prototype.clone=function(){var m=new a;m.Xa=this.Xa;m.pitch=this.pitch;m.Mg=this.Mg;m.Wd=this.Wd;m.kj=this.kj;
m.width=this.width;m.height=this.height;m.Sj=this.Sj;m.Rj=this.Rj;m.tl=this.tl;m.Va=this.Va;m.GJ=this.GJ;m.Ik=this.Ik;m.Ipa=this.Ipa;m.eoa=this.eoa;m.uW=this.uW;m.xY=this.xY;m.DJ=this.DJ;m.sh=this.sh;m.QW=this.QW;m.RW=this.RW;m.camera=this.camera;m.enabled=this.enabled;m.Hn=this.Hn;m.zf=this.zf;m.wZ=this.wZ;return m};return a}()});
define("tdv/player/view/panorama/renderer/3d/util/StereographicEffect",["require","tdv/constants/RenderOrder","tdv/player/view/panorama/renderer/constants/EyeLayer","tdv/player/view/panorama/renderer/3d/util/Util"],function(a){var m=a("tdv/constants/RenderOrder"),h=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),n=a("tdv/player/view/panorama/renderer/3d/util/Util");return function(g){var k=1,e=new THREE.WebGLCubeRenderTarget(1024),b=new THREE.CubeCamera(.1,1E4,e);b.layers.enable(h.mx);b.layers.enable(h.fb);
e=new THREE.ShaderMaterial;e.uniforms={tCube:{value:b.renderTarget.texture},tFlip:{value:1},opacity:{value:1}};e.fragmentShader="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n#include <tonemapping_fragment>\n#include <colorspace_fragment>\n}";e.vertexShader="varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n";
e.side=THREE.BackSide;e.depthWrite=!1;e.transparent=!0;e.depthTest=!1;e.needsUpdate=!0;var c=new THREE.Mesh(new THREE.SphereGeometry(5,64,64),e);c.overdraw=!1;c.matrixAutoUpdate=!1;c.renderOrder=m.DVa;var d=new THREE.Matrix4;this.sK=function(l){k=l};this.start=function(l){l.add(c);l.add(b);l.traverse(function(p){p.layers.test(b.layers)&&(p.userData.spa=p.layers.mask,p.layers.mask=b.layers.mask)});b.visible=!0;c.visible=!0;g.setClearColor(16777215,1)};this.stop=function(l){g.setClearColor(0,0);l.traverse(function(p){p.userData.spa!==
void 0&&(p.layers.mask=p.userData.spa,delete p.userData.spa)});b.visible=!1;c.visible=!1;l.remove(c);l.remove(b)};var f=0;this.render=function(l,p){k>0&&(c.matrix.copy(p.matrixWorld),c.matrix.multiply(d.makeTranslation(0,0,-k*5)),c.matrixWorldNeedsUpdate=!0,f++,n.ihb()&&f%10!=0||(n.ikb(),c.visible=!1,b.update(g,l),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(l){this.P=l;this.Ac=new THREE.PerspectiveCamera(90,
16/9,.1,2*e.th);this.Ac.layers.enable(g.fb);this.Vu=new THREE.PerspectiveCamera;this.Bb=new THREE.Scene;this.nxa=new THREE.Scene;this.oxa=new THREE.Scene;this.Bb.add(this.Ac);this.kq=this.Uka=this.F0=this.E0=this.j=null;this.MAa=this.gea=!1}var h=a("tdv/player/view/util/geo/Fov"),n=a("tdv/player/view/util/geo/Quaternion"),g=a("tdv/player/view/panorama/renderer/constants/EyeLayer"),k=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.Keb=function(){this.kZa()};m.prototype.Kn=function(){return this.j};m.prototype.Sf=function(){return this.Bb};m.prototype.getCamera=function(){return this.Vu};m.prototype.Aw=function(){return d.isPresenting&&d.Ag==this.j&&d.XA==this.Bb};m.prototype.Web=function(){return this.Vu.isArrayCamera&&this.Vu.cameras.length>0?Math.atan2(1,this.Vu.cameras[0].projectionMatrix.elements[5])*
2*f:this.Vu.fov};m.prototype.getPixelRatio=function(){return this.j?this.j.getPixelRatio():c.getPixelRatio()};m.prototype.Zeb=function(){return d.isPresenting&&d.framebufferWidth?d.framebufferWidth*.5:this.j?this.j.domElement.width:1024};m.prototype.Yeb=function(){return d.isPresenting&&d.framebufferHeight?d.framebufferHeight:this.j?this.j.domElement.height:1024};m.prototype.If=function(){return this.j.domElement};m.prototype.update=function(l){this.Oab(l);this.nab(l);this.dt(l)};m.prototype.hna=
function(l){this.j.$q=!0;l=c.Qdb(l);var p=new THREE.CubeCamera(this.Vu.near,this.Vu.far,l);this.Bb.add(p);p.position.setFromMatrixPosition(this.Vu.matrixWorld);p.update(this.j,this.Bb);this.Bb.remove(p);this.j.$q=!1;return l.texture};m.prototype.render=function(){this.y4()};m.prototype.Oab=function(l){l.enabled&&(this.j||this.s9a(l),l.Va&&d.getType()==d.Kx.mo&&(this.MAa=!0));this.PFa==l.width&&this.OFa==l.height||this.j.setSize(this.PFa=l.width,this.OFa=l.height);if(this.gea=l.enabled&&!l.Va)this.E0.setSize(l.width,
l.height),this.F0.setSize(l.width,l.height)};m.prototype.s9a=function(l){!this.j&&l.enabled&&(this.P.Rc().w6(),this.E0=this.P.Rc().Ueb(),this.j=this.P.Rc().Kn(),l=this.j.getSize(new THREE.Vector2),this.PFa=l.width,this.OFa=l.height,this.F0=this.P.Rc().Veb(),this.Uka=new k(this.j,this.Ac))};m.prototype.kZa=function(){this.j&&(this.E0=this.j=this.F0=this.kq=null,this.P.Rc().Z9())};m.prototype.dt=function(l){l.Va?this.Vu=this.j.xr.getCamera():(this.Ac.quaternion.copy(n.hX(l.Xa,l.pitch,l.Mg)),this.Ac.fov=
h.um(l.Wd,l.width,l.height),this.Ac.aspect=l.width/l.height,this.Ac.updateProjectionMatrix(),this.Ac.updateMatrixWorld(),this.Vu=this.Ac);b.hkb(this.Bb,this.Aw()?this.j.xr.getCamera().cameras:[this.Ac]);this.Bb.gqb===!0&&this.Bb.updateMatrixWorld()};m.prototype.nab=function(l){var p=!l.Va&&l.Ik>0?this.Uka:null;this.kq!=p&&(this.kq&&this.kq.stop(this.Bb),(this.kq=p)&&this.kq.start(this.Bb));this.kq&&this.kq==this.Uka&&this.kq.sK(l.Ik)};m.prototype.y4=function(){this.j.xr.isPresenting||this.j.clear();
this.MAa&&this.j.resetState();this.kq&&this.kq.render(this.Bb,this.Ac);this.j.render(this.Bb,this.Ac);this.gea&&(this.E0.render(this.nxa,this.Ac),this.F0.render(this.oxa,this.Ac))};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"),
h=a("tdv/player/view/panorama/renderer/object/Base"),n=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),g=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),k=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),e=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),b=a("tdv/player/view/panorama/renderer/TextureLoader"),c=a("tdv/player/view/panorama/renderer/OcclusionCuller");a=m.extend(h,function(){h.call(this);this.set("tag","ComposedWebGLObject");
this.set("webglScene",null);this.set("meshGroup",null);this.set("camera",null);this.set("textureSource",null);this.set("materialConfig",this.Cha=new g.Rp);this.ky&&this.ky();this.JG&&this.JG();this.pC&&this.pC();this.iq&&this.iq()});a.prototype.hc=function(){h.prototype.hc.call(this);this.Aq&&this.Aq();this.gT&&this.gT();this.mN&&this.mN()};a.prototype.mc=function(){this.LM&&this.LM();this.oN&&this.oN();this.Cq&&this.Cq();k.dispose(this.get("meshGroup"));k.Xw(this.get("meshGroup"),null);this.set("meshGroup",
null);h.prototype.mc.call(this)};a.prototype.za=function(d){this.cg&&this.cg(d);h.prototype.za.call(this,d);this.set("camera",e.getCamera(d.sh));this.set("webglScene",d.sh);this.get("meshGroup")||(this.set("meshGroup",k.IJa(this.hq())),this.get("meshGroup").userData.Tib=this);this.W("webglScene","meshGroup")&&k.Xw(this.get("meshGroup"),this.get("webglScene"));this.Cn();this.Qj&&this.Qj(d);this.$ab();this.Wz&&this.Wz(d);this.Sq&&this.Sq(d);this.LI();this.W("loadingActive","meshGroup")&&b.Ra(this.get("meshGroup"),
this.get("loadingActive"));this.W("blendingActive","meshGroup")&&c.PQa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.Cn=function(){this.W("composedAlpha","meshGroup")&&this.aC()};a.prototype.aC=function(){k.nf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.$ab=function(){if(this.W("textureSource")||this.W("materialConfig")&&!this.Cha.isEqual(this.get("materialConfig"))){var d=this.nM();d&&(k.Ykb(d,this.GR()),this.aC())}};a.prototype.LI=function(){if(this.W("index",
"meshGroup")){var d=this.get("meshGroup");d&&d.children.forEach(function(f,l,p){k.M$(f,this.get("index")+l/p.length)}.bind(this))}};a.prototype.GR=function(){var d=this.get("textureSource")||new n;this.Cha=this.get("materialConfig");var f=g.rt(d.texture(),this.Cha);b.eQ(f,d);return[f]};a.prototype.fxa=function(){var d=new n,f=g.rt(d.texture());b.eQ(f,d);return[f]};a.prototype.Fy=function(d){return k.tfb(this.get("meshGroup"),d)};return a});
define("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin","require tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/view/util/Scale tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Quaternion tdv/view/constants/Alignment".split(" "),function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),
n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/view/util/Scale"),k=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/player/view/util/geo/Fov"),b=a("tdv/player/view/util/geo/Quaternion"),c=a("tdv/view/constants/Alignment"),d=new THREE.Matrix4,f=Math.PI/180;return{ky:function(){this.set("distance",void 0);this.set("rotationX",0);this.set("rotationY",0);this.set("rotationZ",0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("scale",1);this.set("contentWidth",
100);this.set("contentHeight",100);this.set("hfov",void 0);this.set("vfov",null);this.set("scaleMode",null);this.set("horizontalAlign",null);this.set("verticalAlign",null);this.set("attachToCamera",!1);this.Lh=this.oC();this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.Bq=new THREE.Matrix4;this.Io=new THREE.Matrix4;this.qk=new THREE.Matrix4;this.lda=new THREE.Matrix4;this.Vva=new THREE.Quaternion;this.$wa=new THREE.Matrix4;this.oR=new THREE.Matrix4;this.BR=new THREE.Matrix4;this.gC=new THREE.Matrix4;
this.Si=new THREE.Matrix4},Wz:function(l){this.ft(l);this.ima()},ima:function(){if(this.W("hfov","vfov","contentWidth","contentHeight","panoramaPixelsPerDegree","scaleMode","horizontalAlign","verticalAlign")){var l=g.Boa(this.get("hfov"),this.get("vfov"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("panoramaPixelsPerDegree"),this.get("horizontalAlign"),this.get("verticalAlign"));l=h.wRa(this.Lh[1],l.BZ,l.LZ,l.nB,l.qB);this.Lh[1]!=l&&(this.Lh[1]=l,(l=this.nM())&&
n.gra(l,this.Lh[1]))}},nM:function(){var l=this.get("meshGroup");return l?n.rm(l)[1]:null},hq:function(){return[0,1].map(function(l){var p=l==0?this.fxa():this.GR();l=n.create(this.Lh[l],p);k.fB(l,k.Nr);k.gB(l,k.zu);k.oK(l,m.RQ);k.nZ(l,1);return l}.bind(this))},oC:function(){return[h.PO(),h.PO()]},ft:function(l){var p=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*h.th,this.get("composedTranslationY")*
.5*h.th,this.get("composedTranslationZ")*.5*h.th),p=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-l.Xa*f),this.ke.multiply(d.makeRotationX(-this.get("composedDeltaPitch")*f)),this.ke.multiply(d.makeRotationY(this.get("composedDeltaYaw")*f)),this.ke.multiply(d.makeRotationY(l.Xa*f)),p=!0);this.W("yaw","pitch")&&(this.Bq.makeRotationY(-this.get("yaw")*f),this.Bq.multiply(d.makeRotationX(this.get("pitch")*f)),p=!0);if(this.W("distance","flipHorizontally",
"scale","hfov","vfov","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign","composedTranslationX","composedTranslationY","composedTranslationZ")){var q=this.Ia.get("composedTranslationX")==0&&this.Ia.get("composedTranslationY")==0&&this.Ia.get("composedTranslationZ")==0&&this.get("distance")!==void 0?h.ow(this.get("distance")):h.Dt();this.Io.makeTranslation(0,0,-q);var r=this.get("contentWidth"),t=this.get("contentHeight"),u=this.get("hfov"),v=this.get("vfov")||e.um(u,r,t),
w=(this.get("flipHorizontally")?-1:1)*this.get("scale"),x=this.get("scale"),y=this.get("scaleMode"),z=this.get("panoramaPixelsPerDegree");p=this.get("horizontalAlign")||c.$e;var A=this.get("verticalAlign")||c.$d;r=g.Boa(u,v,r,t,y,z,p,A);u=w*h.Coa(q,u);v=x*h.Doa(q,v);this.oR.makeScale(u,v,1);w*=h.Coa(q,r.Wd);q=x*h.Doa(q,r.Mk);this.BR.makeScale(w,q,1);this.$wa.makeTranslation(p==c.fb?-(u-w)*.5:p==c.Db?(u-w)*.5:0,A==c.Tc?(v-q)*.5:A==c.Gc?-(v-q)*.5:0,0);p=!0}this.W("rotationX","rotationY","rotationZ",
"roll")&&(this.qk.makeRotationZ(this.get("roll")*f),this.qk.multiply(d.makeRotationY(this.get("rotationY")*f)),this.qk.multiply(d.makeRotationX(this.get("rotationX")*f)),this.qk.multiply(d.makeRotationZ(this.get("rotationZ")*f)),p=!0);this.set("cameraYaw",l.Xa);this.set("cameraPitch",l.pitch);this.set("cameraRoll",l.Mg);this.get("attachToCamera")&&this.W("cameraYaw","cameraPitch","cameraRoll")?(this.Vva.copy(b.hX(l.Xa,l.pitch,l.Mg)),this.lda.makeRotationFromQuaternion(this.Vva),p=!0):this.W("attachToCamera")&&
(this.lda.identity(),p=!0);if(p||this.W("meshGroup"))this.Si.copy(this.wi),this.Si.multiply(this.ke),this.Si.multiply(this.lda),this.Si.multiply(this.Bq),this.Si.multiply(this.Io),this.Si.multiply(this.qk),this.gC.copy(this.Si),this.gC.multiply(this.oR),this.Si.multiply(this.$wa),this.Si.multiply(this.BR),l=n.rm(this.get("meshGroup")),n.ot(l[0],this.gC),n.ot(l[1],this.Si)}}});
define("tdv/player/view/panorama/renderer/object/Plane",["require","tdv/utils","tdv/player/view/panorama/renderer/object/ComposedWebGLObject","tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject");a=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin");return m.extend(h,a,function(){h.call(this);this.set("tag","Plane")})});
define("tdv/player/view/panorama/renderer/object/Cap","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/ColorPicker tdv/view/events/ProgressEvent".split(" "),function(a){function m(q,r,t,u,v,w){for(q=
(q-r)/w;t+180<u;)u-=360;for(;t-180>u;)u+=360;t=(t-u)/w;return t=q<-.1||q>.1?h(v,t,Math.abs(1/(1500*q))):h(v,t,.08)}function h(q,r,t){q=(r-q)*(1-t);Math.abs(q)<1E-5&&(q=0);return r-q}var n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),k=a("tdv/constants/EventName"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/view/panorama/renderer/object/Plane"),c=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),d=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=a("tdv/player/view/util/ColorPicker"),p=a("tdv/view/events/ProgressEvent");a=n.extend(b,function(q){b.call(this);this.C=q;this.Rl.push(this.C);this.Rg=this.Rg.bind(this);this.Qf=e.Oa("CeilingCapPanoramaOverlay",this.C)?"ceiling":"tripod";this.set("tag","Cap");this.set("pitch",this.Qf=="tripod"?-90:90);this.Cd=!1;this.fI=this.xja=this.xv=void 0;this.w6a=this.Qf=="tripod"?1:-1;this.Hl=this.am=this.Nh=null});a.prototype.hc=function(){b.prototype.hc.call(this);
this.Nh=(new d(k.ia)).ko(this.ys.bind(this));this.am=(new d(k.yc)).lr(this.NH.bind(this));g.ba(this.C,"angle distance hfov image.levels.url inertia rotate".split(" "),this.Rg,!0)};a.prototype.mc=function(){this.Hl&&this.Hl.dispose();this.Hl=null;this.Nh.dispose();this.am.dispose();g.da(this.C,"angle distance hfov image.levels.url inertia rotate".split(" "),this.Rg);b.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("angle",this.C.get("angle"));this.set("distance",this.C.get("distance"));
this.set("hfov",this.C.get("hfov"));var q=f.$eb(this.C,this.get("panoramaPixelsPerDegree"));this.set("imageURL",q&&q.get("url"));this.set("imageWidth",q&&q.get("width"));this.set("imageHeight",q&&q.get("height"));this.set("inertia",this.C.get("inertia"));this.set("rotate",this.C.get("rotate"))};a.prototype.hq=function(){var q=b.prototype.hq.call(this);this.Nh.hg(q);this.am.hg(q);return q};a.prototype.za=function(q){this.Pla();this.cO(q);b.prototype.za.call(this,q)};a.prototype.Pla=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.ys=function(){this.o(k.vd);this.o(k.ia)};a.prototype.NH=function(q,r){var t=0;r.jw(function(u){(u=r.Nn(u))&&(t+=u.percent)});this.o(new p(k.yc,t/r.zd.length))};a.prototype.cO=function(q){this.set("rendererYaw",q.Xa);if(this.W("angle","inertia","rotate")||(this.get("rotate")||this.get("inertia"))&&this.W("rendererYaw")){var r=
this.get("angle"),t=this.get("rotate"),u=this.get("inertia"),v=this.w6a*q.Xa;t&&(r+=v);var w=0,x=r-v;this.xv!==void 0&&(u&&(t?(w=m(v,this.fI,r,this.xv,this.xja,q.zf),r=this.xv+w*q.zf):(w=m(v,this.fI,x,this.CDa,this.xja,q.zf),x=this.CDa+w*q.zf,r=x+v)),this.xv!=r&&this.Na());this.CDa=x;this.xv=r;this.xja=w;this.fI=v;this.set("rotationZ",-r)}};a.prototype.ao=function(q){if(q.$f==k.Jm){var r=!q.om()&&this.$s(q);r&&(q.LD(this.C),this.C.get("useHandCursor")&&q.UI(this.C),q.lm(this.get("distance")));this.Cd!=
r&&(this.Cd=r,this.C.o(this.Cd?k.uc:k.Eb),q.zw()&&this.C.o(this.Cd?k.SF:k.Pr))}else q.$f==k.Xf&&!q.om()&&this.$s(q)&&(this.C.gP(k.ma,!0).length>1&&q.cu(this.C),q.lm(this.get("distance")),this.C.o(k.ma))};a.prototype.$s=function(q){return this.Fy(q.Ps).some(function(r){var t=this.s1a();return t&&t.$w(r.x,r.y)}.bind(this))};a.prototype.s1a=function(){if(this.Hl)return this.Hl;var q=this.get("textureSource");if(q=q&&q.xg())this.Hl=new l(q);return this.Hl};return a});
define("tdv/player/view/panorama/renderer/object/ParticleCylinders","require tdv/utils tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/Base tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/Base"),k=a("tdv/player/view/util/XR");a=m.extend(g,function(){g.call(this);this.wi=new THREE.Matrix4;this.uHa=!1;this.Dj=new THREE.Matrix4;
this.eh=null;this.un=new THREE.Matrix4;this.PU=this.BU=0;this.gR=.75;this.OR=.5;this.hv=4;this.Iha=0;this.kv=-2;this.us=3;this.I2=0;this.VG=7;this.uU=this.iD=1;this.lT=.15;this.WG=this.YH=0;this.M1=this.l4=n.ca;this.w5=this.p5=1E3});var e=Math.PI/180,b=new THREE.Matrix4;a.prototype.Co=function(){};a.prototype.hc=function(){g.prototype.hc.call(this);this.o(h.vd);this.o(h.ia)};a.prototype.mc=function(){this.Jda()};a.prototype.Tl=function(){this.Co();this.TU()};a.prototype.Ul=function(){this.Na()};a.prototype.TU=
function(){this.eh&&(this.Jda(),this.hxa())};a.prototype.B0=function(){};a.prototype.hxa=function(){this.l7a();this.eh=new THREE.Group;for(var c=this.M1==n.PLAYING,d=this.YH,f=this.WG;f+d>0;){var l=Math.random()*(f+d)<=f;l?f--:d--;var p=this.B0();p.matrixAutoUpdate=!1;p.overdraw=!1;p.material.opacity=0;p.userData={Aeb:l,UP:new THREE.Matrix4,iIa:new THREE.Matrix4,Qqa:new THREE.Matrix4,y:void 0,ZTa:void 0,IE:c};this.eh.add(p);c&&this.Zja(p,this.kv,this.us);this.j7a(p)}this.BU=c?this.eh.children.length:
0;this.Cma.add(this.eh);this.Uva()};a.prototype.Jda=function(){if(this.eh){this.eh.parent&&this.eh.parent.remove(this.eh);for(var c=0,d=this.eh&&this.eh.children.length;c<d;c++)this.eh.children[c].material.dispose();this.eh=null;this.PU=0}};a.prototype.l7a=function(){this.un=(new THREE.Matrix4).makeScale(this.iD,this.iD,this.iD)};a.prototype.Zja=function(c,d,f){d+=Math.random()*(f-d);if(c.userData.Aeb){f=this.VG;var l=360*Math.random()*e;c.userData.UP.makeTranslation(f*Math.cos(l),d,f*Math.sin(l))}else f=
Math.random()*2*Math.PI,l=this.Iha+(this.hv-this.Iha)*Math.sqrt(Math.random()),c.userData.UP.makeTranslation(l*Math.cos(f),d,l*Math.sin(f));c.userData.UP.multiply(this.un);c.userData.y=d};a.prototype.j7a=function(c){var d=this.lT+Math.random()*(this.EH-this.lT);do var f=Math.random()*this.I2;while(f>80&&f<100);var l=Math.random()*360,p=Math.sin(l*e)*Math.sin(f*e)*d,q=-Math.cos(f*e)*d;d*=Math.cos(l*e)*Math.sin(f*e);c.userData.ZTa=q*this.iD;c.userData.iIa.makeTranslation(p,q,d);c.userData.Qqa.makeRotationY(l*
e);c.userData.Qqa.multiply(b.makeRotationX(-f*e))};a.prototype.za=function(c){g.prototype.za.call(this,c);this.gab(c);this.Cma=c.sh;this.Cma!=(this.eh&&this.eh.parent)?(this.Jda(),this.Cma&&this.hxa()):this.W("index")&&this.Uva();this.Hab(c)};a.prototype.gab=function(c){c=c.Va&&k.getType()==k.Kx.mo;c!=this.Dza&&(this.Dza=c)&&setTimeout(function(){this.eh&&this.TU()}.bind(this),0)};a.prototype.Hab=function(c){if(this.eh){this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&
(this.uHa=this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0,this.wi.makeTranslation(-this.get("composedTranslationX")*this.hv,this.get("composedTranslationY")*this.hv,this.get("composedTranslationZ")*this.hv));var d=this.l4==n.PLAYING,f=this.eh.children,l=f.length,p=d?Math.round(l*c.zf/this.p5):0;if(this.BU+p>0){this.PU=d?0:Math.min(this.BU,this.PU+Math.round(l*c.zf/this.w5));c=this.get("composedAlpha");for(d=0;d<l;d++){var q=f[d];if(!q.userData.IE)if(p>
0)p--,q.userData.IE=!0,this.BU++,this.Zja(q,this.us,this.us+(this.us-this.kv));else continue;q.userData.UP.multiply(q.userData.iIa);q.userData.y+=q.userData.ZTa;if(q.userData.y<this.kv||q.userData.y>this.us){if(this.PU>0){this.PU--;q.userData.IE=!1;this.BU--;q.material.opacity=0;continue}var r=q.userData.y<this.kv?this.us:this.kv;this.Zja(q,r,r)}r=c;q.userData.y<this.kv+this.OR?r*=(q.userData.y-this.kv)/this.OR:q.userData.y>this.us-this.gR&&(r*=(this.us-q.userData.y)/this.gR);q.material.opacity=r*
this.uU;this.uHa?(q.matrix.copy(this.wi),q.matrix.multiply(q.userData.UP)):q.matrix.copy(q.userData.UP);q.matrix.multiply(q.userData.Qqa);q.matrixWorldNeedsUpdate=!0}this.Na()}}};a.prototype.Uva=function(){if(this.eh)for(var c=this.get("index"),d=0;d<this.eh.children.length;d++)this.eh.children[d].renderOrder=c};return a});
define("tdv/player/view/panorama/renderer/object/Dust","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Color tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),k=a("tdv/player/view/util/Color"),e=a("tdv/player/view/util/Device");a=m.extend(g,
function(c){g.call(this);this.C=c;this.Tl=this.Tl.bind(this);this.Ul=this.Ul.bind(this);this.Co()});a.prototype.hc=function(){g.prototype.hc.call(this);this.C.set("state",this.C.get("startState"));h.ba(this.C,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),this.Tl,!0);h.ba(this.C,["state"],this.Ul,!0)};a.prototype.mc=function(){h.da(this.C,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),
this.Tl);h.da(this.C,["state"],this.Ul);this.C.set("state",n.ca);g.prototype.mc.call(this)};a.prototype.Tl=function(){this.Co();this.TU()};a.prototype.Ul=function(){this.l4=this.C.get("state");this.Na()};a.prototype.Co=function(){g.prototype.Co.call(this);var c=e.ub()||e.Yb()==e.nx?2500:e.kf()?4E3:5E3;this.lT=this.EH=this.C.get("speed",.2)*.2;this.hv=this.C.get("distance",.5)*14.5+.5;this.uU=this.C.get("opacity",.1)*1;this.iD=.036;this.YH=this.C.get("intensity",.1)*c;this.Ne=k.Dp(this.C.get("color",
"#ffffff"));this.WG=0;this.VG=15;this.M1=this.C.get("initialState");this.p5=this.C.get("startDuration");this.w5=this.C.get("stopDuration");this.gR=.75;this.OR=.5;this.kv=-2;this.us=4;this.I2=180;this.Lxa()};a.prototype.B0=function(){return new THREE.Sprite(this.ly())};a.prototype.ly=function(){var c=new THREE.SpriteMaterial;c.map=this.ds();c.side=THREE.FrontSide;c.transparent=!0;c.depthTest=!1;c.needsUpdate=!0;return c};a.prototype.ds=function(){if(this.Ma)return this.Ma;var c=document.createElement("canvas");
c.width=c.height=b;this.Ma=new THREE.Texture;this.Ma.colorSpace=THREE.SRGBColorSpace;this.Ma.image=c;this.Ma.needsUpdate=!0;this.Lxa();return this.Ma};a.prototype.Lxa=function(){if(this.Ma){var c=this.Ma.image,d=c.getContext("2d"),f=d.createRadialGradient(c.width*.5,c.height*.5,c.height*.2,c.width*.5,c.height*.5,c.height*.5);f.addColorStop(0,"rgba("+this.Ne[0]+", "+this.Ne[1]+", "+this.Ne[2]+", 1)");f.addColorStop(1,"rgba("+this.Ne[0]+", "+this.Ne[1]+", "+this.Ne[2]+", 0)");d.fillStyle=f;d.clearRect(0,
0,c.width,c.height);d.fillRect(0,0,c.width,c.height);this.Ma.needsUpdate=!0}};var b=32;return a});
define("tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin","require tdv/utils tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/view/util/Scale tdv/player/view/panorama/renderer/TextureLoader tdv/view/constants/Alignment".split(" "),function(a){a("tdv/utils");var m=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),
g=a("tdv/view/util/Scale"),k=a("tdv/player/view/panorama/renderer/TextureLoader"),e=a("tdv/view/constants/Alignment"),b=new THREE.Matrix4,c=Math.PI/180;return{ky:function(){this.set("distance",void 0);this.set("width",100);this.set("height",100);this.set("offsetX",void 0);this.set("offsetY",void 0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("rotationZ",0);this.set("contentWidth",100);this.set("contentHeight",100);this.set("scale",1);this.set("scaleMode",null);this.set("horizontalAlign",
null);this.set("verticalAlign",null);this.Lh=this.oC();this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.Bq=new THREE.Matrix4;this.Io=new THREE.Matrix4;this.JL=new THREE.Matrix4;this.GN=new THREE.Matrix4;this.ewa=new THREE.Matrix4;this.qk=new THREE.Matrix4;this.cxa=new THREE.Matrix4;this.oR=new THREE.Matrix4;this.BR=new THREE.Matrix4;this.gC=new THREE.Matrix4;this.Si=new THREE.Matrix4;this.LL=new THREE.Matrix4;this.BG=new THREE.Vector3},Wz:function(d){this.ft(d);this.ima()},ima:function(){if(this.W("width",
"height","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign")){var d=g.H7(this.get("width"),this.get("height"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("horizontalAlign"),this.get("verticalAlign"));d=h.wRa(this.Lh[1],d.BZ,d.LZ,d.nB,d.qB);this.Lh[1]!=d&&(this.Lh[1]=d,(d=this.nM())&&n.gra(d,this.Lh[1]))}},nM:function(){var d=this.get("meshGroup");return d?n.rm(d)[1]:null},hq:function(){return[0,1].map(function(d){var f=d==0?this.fxa():
this.GR();d=n.create(this.Lh[d],f);k.fB(d,k.Nr);k.gB(d,k.zu);k.oK(d,m.RQ);k.nZ(d,1);return d}.bind(this))},oC:function(){return[h.PO(),h.PO()]},ft:function(d){var f=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*h.th,this.get("composedTranslationY")*.5*h.th,this.get("composedTranslationZ")*.5*h.th),f=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-d.Xa*c),
this.ke.multiply(b.makeRotationX(-this.get("composedDeltaPitch")*c)),this.ke.multiply(b.makeRotationY(this.get("composedDeltaYaw")*c)),this.ke.multiply(b.makeRotationY(d.Xa*c)),f=!0);this.W("yaw","pitch")&&(this.Bq.makeRotationY(-this.get("yaw")*c),this.Bq.multiply(b.makeRotationX(this.get("pitch")*c)),f=!0);if(this.W("distance","composedTranslationX","composedTranslationY","composedTranslationZ")){var l=this.get("composedTranslationX")==0&&this.get("composedTranslationY")==0&&this.get("composedTranslationZ")==
0&&this.get("distance")!==void 0;this.set("z",l?h.ow(this.get("distance")):h.Dt())}this.W("z")&&(this.Io.makeTranslation(0,0,-this.get("z")),f=!0);f&&(this.LL.copy(this.wi),this.LL.multiply(this.ke),this.LL.multiply(this.Bq),this.LL.multiply(this.Io));l=!1;this.set("rendererYaw",d.Xa);this.set("rendererPitch",d.pitch);this.set("rendererRoll",d.Mg);this.set("rendererCameraFOV",d.kj);this.set("rendererWidth",d.width);this.set("rendererHeight",d.height);d.kj&&this.W("z","rendererCameraFOV")&&this.set("rendererHeightZ",
Math.tan(d.kj*c*.5)*this.get("z")*2);if(d.kj&&(f||this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","rendererHeightZ","inVR"))){if(d.Va)this.JL.copy(this.LL),this.GN.identity();else{l=d.camera;this.JL.copy(l.matrixWorld);this.BG.setFromMatrixPosition(l.matrixWorld);this.BG.applyMatrix4(this.LL);this.BG.applyMatrix4(l.matrixWorldInverse);var p=-10,q=-10;this.BG.z<0&&(this.BG.applyMatrix4(l.projectionMatrix),p=this.BG.x*.5,q=this.BG.y*.5);var r=
this.get("rendererHeightZ");this.GN.makeTranslation(r*l.aspect*p,q*r,0)}l=!0}this.W("roll")&&(this.qk.makeRotationZ(this.get("roll")*c),l=!0);if(d.kj&&(f||this.W("rendererHeight","inVR","rendererHeightZ","width","height","contentWidth","contentHeight","scale","scaleMode","horizontalAlign","verticalAlign","flipHorizontally","offsetX","offsetY"))){f=d.Va?1024:d.height;l=this.get("scale")*this.get("rendererHeightZ")/f*(d.Va?2:1);var t=this.get("width");q=this.get("height");var u=this.get("offsetX");
r=this.get("offsetY");var v=this.get("contentWidth"),w=this.get("contentHeight");p=(this.get("flipHorizontally")?-1:1)*l;var x=this.get("scaleMode");d=this.get("horizontalAlign")||e.$e;f=this.get("verticalAlign")||e.$d;x=g.H7(t,q,v,w,x,d,f);v=p*t;w=l*q;this.oR.makeScale(v,w,1);t=p*(t*.5-u);q=l*(r-q*.5);this.ewa.makeTranslation(t,q,0);p*=x.width;l*=x.height;this.BR.makeScale(p,l,1);this.cxa.makeTranslation((d==e.fb?-(v-p)*.5:d==e.Db?(v-p)*.5:0)+t,(f==e.Tc?(w-l)*.5:f==e.Gc?-(w-l)*.5:0)+q,0);l=!0}l&&
(this.Si.copy(this.JL),this.Si.multiply(this.Io),this.Si.multiply(this.GN),this.Si.multiply(this.qk),this.gC.copy(this.Si),this.gC.multiply(this.ewa),this.gC.multiply(this.oR),this.Si.multiply(this.cxa),this.Si.multiply(this.BR),d=n.rm(this.get("meshGroup")),n.ot(d[0],this.gC),n.ot(d[1],this.Si))}}});
define("tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(g,k){this.Qd=g;this.Hc=k;this.Ld=!1;this.Nca();this.Qca();this.PH()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.Ija();this.Nja();this.Qd.get("autoplay")||this.Qd.set("state",n.ca);this.Qd=null;this.Hc.Zc(n.ca);this.Hc=null};m.prototype.ig=function(g){this.Ld!=g&&(this.Ld=
g,this.Sv())};m.prototype.PH=function(){this.Hc.Zc(this.Qd.get("state"))};m.prototype.MT=function(){this.Sv()};m.prototype.OT=function(){this.Hc.fra(this.Qd.get("frameDuration"))};m.prototype.NT=function(){this.Hc.$Qa(this.Qd.get("finalFrame")=="first")};m.prototype.KT=function(){this.Qd.o(h.Ur)};m.prototype.JT=function(){this.Qd.o(h.Tb)};m.prototype.LT=function(){this.Qd.set("state",this.Hc.getState())};m.prototype.Sv=function(){this.Qd.get("autoplay")&&this.Hc.Zc(this.Ld?n.PLAYING:n.ca)};m.prototype.Nca=
function(){this.Qd.bind(h.L("state"),this.PH,this,!0);this.Qd.bind(h.L("autoplay"),this.MT,this,!0);this.Qd.bind(h.L("frameDuration"),this.OT,this,!0);this.Qd.bind(h.L("finalFrame"),this.NT,this,!0)};m.prototype.Ija=function(){this.Qd.h(h.L("state"),this.PH,this,!0);this.Qd.h(h.L("autoplay"),this.MT,this,!0);this.Qd.h(h.L("frameDuration"),this.OT,this,!0);this.Qd.h(h.L("finalFrame"),this.NT,this,!0)};m.prototype.Qca=function(){this.Hc.bind(h.Ur,this.KT,this,!0);this.Hc.bind(h.Tb,this.JT,this,!0);
this.Hc.bind(h.Pd,this.LT,this,!0)};m.prototype.Nja=function(){this.Hc.h(h.Ur,this.KT,this,!0);this.Hc.h(h.Tb,this.JT,this,!0);this.Hc.h(h.Pd,this.LT,this,!0)};return m});
define("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/constants/Priority tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/ColorPicker tdv/view/images/ImageAnimation".split(" "),function(a){var m=
a("tdv/binding/BindingsHandler"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/constants/Priority"),k=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),b=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),c=a("tdv/player/view/panorama/renderer/object/control/AnimationPlaybackController"),d=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),f=a("tdv/player/view/panorama/renderer/TextureLoader"),
l=a("tdv/player/view/util/ColorPicker"),p=a("tdv/view/images/ImageAnimation");return{JG: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.j3=
this.j3.bind(this);this.n3=this.n3.bind(this);this.Hc=null;this.dAa=-1;this.Hl=this.lb=this.eq=null},Qj:function(q){this.Pla(q);this.FD(q);this.Nab(q)},Pla: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.Kwa(),this.lb=this.get("image"),this.hb=this.get("level"),this.set("textureSource",new d(this.lb&&this.hb.get("url"))),this.set("premultipliedAlpha",this.lb&&this.hb.get("premultipliedAlpha")),
this.get("textureSource").Ekb(this.get("premultipliedAlpha")),this.tXa(),this.lb?(this.eXa(),this.hXa()):(this.o(h.vd),this.o(h.ia)));(r=this.get("textureSource"))&&r.lra(q.Ik>0);this.W("textureSource","isVideoTexture")&&r&&r.$Y(this.get("isVideoTexture"))},FD:function(){if(this.W("blending","chromaColor","chromaThreshold","chromaSmoothing","premultipliedAlpha","side")){var q=new e.Rp;q.QD=this.get("blending");q.bw=this.get("chromaColor");q.KW=this.get("chromaThreshold");q.JW=this.get("chromaSmoothing");
q.premultipliedAlpha=this.get("premultipliedAlpha");q.side=this.get("side");this.set("materialConfig",q)}},Nab:function(){if(this.W("meshGroup","projected","visible")){var q=this.get("projected")&&this.get("visible")?g.cca:g.RQ;b.rm(this.get("meshGroup")).forEach(function(r){f.oK(r,q)}.bind(this))}},Cn:function(){this.W("visible","composedAlpha","image","state","visibleOnStop")&&this.set("inView",this.get("visible")&&this.get("composedAlpha")>0&&(this.get("visibleOnStop")||this.get("state")!=n.ca));
this.W("composedAlpha","meshGroup","inView")&&b.nf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0);this.eq&&this.eq.ig(this.get("inView"))},j3:function(){this.lb&&k.Oa("AnimatedImageResource",this.lb)?this.set("visibleOnStop",this.lb.get("visibleOnStop")):this.set("visibleOnStop",!0)},n3:function(){this.set("levelURL",this.hb.get("url"))},LM:function(){this.Kwa()},Kwa:function(){this.eq&&(this.eq.clear(),this.eq=null);this.Hc&&(this.Hc.h(h.V,this.AS,this,!0),this.Hc.h(h.Pd,this.Aza,
this,!0),this.Hc.clear(),this.Hc=null);this.Hl&&(this.Hl.dispose(),this.Hl=null);this.get("textureSource")&&(this.Qja(),this.set("textureSource",null));this.lb&&(this.S6a(),this.lb=null);this.hb&&(this.V6a(),this.hb=null)},eXa:function(){m.ba(this.lb,["visibleOnStop"],this.j3,!0)},S6a:function(){m.da(this.lb,["visibleOnStop"],this.j3)},hXa:function(){m.ba(this.hb,["url"],this.n3,!0)},V6a:function(){m.da(this.hb,["url"],this.n3)},Bza:function(){this.Qja();var q=this.get("image");if(k.Oa("AnimatedImageResource",
q)){this.Hc=new p(this.get("textureSource").xg(),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.Hc.If();this.Hc.bind(h.Pd,this.Aza,this,!0);this.Hc.bind(h.V,this.AS,this,!0);this.eq=new c(q,this.Hc);this.set("visibleOnStop",q.get("visibleOnStop"));this.set("state",this.Hc.getState())}else r=this.get("textureSource").xg(),this.Hl=new l(r),this.set("visibleOnStop",!0),
this.set("state",null);this.Cn();this.set("contentWidth",r.width);this.set("contentHeight",r.height);this.get("textureSource").bo(r);this.o(h.vd);this.o(h.ia)},Cza:function(){this.Qja();this.o(h.vd);this.o(h.ia)},Aza:function(){this.set("state",this.Hc.getState())},AS: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.dAa>q;this.dAa=q;this.get("textureSource").update(!u||
r||t);this.Na()},tXa:function(){var q=this.get("textureSource");q.bind(h.ia,this.Bza,this,!0);q.bind(h.$c,this.Cza,this,!0)},Qja:function(){var q=this.get("textureSource");q.h(h.ia,this.Bza,this,!0);q.h(h.$c,this.Cza,this,!0)},Rfa:function(q){return this.Hl&&this.Hl.source==q.source?this.Hl.info(q.x,q.y):l.info(q.source,q.x,q.y)}}});
define("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/parser/ClassInfo tdv/player/view/util/Color tdv/view/constants/Cursor tdv/util/Map".split(" "),function(a){function m(d){d=d.get("mapColor");return d=="image"||d=="transparent"||d=="any"}function h(d){d=d.get("mapColor");return d!="image"&&d!="transparent"&&d!="any"}var n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/EventName"),k=a("tdv/player/parser/ClassInfo"),
e=a("tdv/player/view/util/Color"),b=a("tdv/view/constants/Cursor"),c=new (a("tdv/util/Map"));return{pC:function(){this.set("beamEnabled",!1);this.i3=this.i3.bind(this);this.B1=null;this.yL={};this.xj=[];this.Nu=[];this.Ly=null},Fkb:function(d){this.Ly!=d&&(this.Jja(),this.Ly=d,this.zva())},Sq:function(d){this.pD=d.Xa;this.oD=d.pitch},Jja:function(){this.Ly&&n.da(this.Ly,["areas"],this.i3)},zva:function(){this.Ly&&n.ba(this.Ly,["areas"],this.i3,!0)},mN:function(){this.Jja();this.zva()},oN:function(){this.EEa([]);
this.Jja()},i3:function(){var d=this.Ly.get("areas",[]);k.Oa("HotspotPanoramaOverlayImage",this.C)||k.Oa("FlatHotspotPanoramaOverlayImage",this.C)||k.Oa("QuadHotspotPanoramaOverlayImage",this.C)?this.B1=d.filter(m):this.B1=d.filter(h);this.B1.forEach(function(f){c.set(f,0)})},ao:function(d){if(d.$f==g.Jm){var f=this.Cfa(d);if(f.length>0){d.LD(f);var l=this.b1a(f),p;for(p in l)d.cIa(l[p],p);d.lm(this.get("distance"));(l=this.jc(f,d.KJ()))&&d.y6(l,this.BD(d.KJ()))}f=this.c1a(d,f);this.EEa(f,d.zw(),
d.KJ())}else if(d.$f==g.Xf){if(f=this.Cfa(d),f.length>0){var q=!1;f.forEach(function(r){r.o(g.ma);!q&&r.gP(g.ma,!0).length>1&&(q=!0)});d.lm(this.get("distance"));q&&d.cu(f)}}else d.$f==g.Cu?(f=this.Cfa(d),f.length>0&&(q=!1,f.forEach(function(r){var t={};d.zw()&&(t=d.Lw().xLa());r.o(g.Sa,t);!q&&r.gP(g.Sa,!0).length>1&&(q=!0)}),this.Nu=f,d.lm(this.get("distance")),q&&d.cu(f))):d.$f==g.TB&&this.Nu.length&&(this.Nu.forEach(function(r){var t={};d.zw()&&(t=d.Lw().xLa());r.o(g.$a,t)}),this.Nu=[])},c1a:function(d,
f){if(!d.gpa())return this.yL={},f;d=d.Rza?"main":"secondary";this.yL[d]=f;f=[];for(d in this.yL)for(var l=0;l<this.yL[d].length;l++)f.indexOf(this.yL[d][l])<0&&f.push(this.yL[d][l]);return f},Cfa:function(d){if(!this.get("beamEnabled")||this.get("alpha")==0||d.om())return[];var f=this.Fy(d.Ps);return f.length==0?[]:this.B1.filter(function(l){var p=l.get("mapColor");return p=="any"?!0:p=="image"?f.some(function(q){return this.Rfa(q).$w}.bind(this)):p=="transparent"?f.every(function(q){return!this.Rfa(q).$w}.bind(this)):
p&&p[0]=="#"?f.some(function(q){return e.F7(this.Rfa(q).color,p)<10}.bind(this)):!1}.bind(this))},EEa:function(d,f,l){this.xj.forEach(function(q){if(d.indexOf(q)<0){var r=c.get(q)-1;c.set(q,r);r==0&&(q.o(g.Eb,{center:l}),f&&q.o(g.Pr))}});var p=this.xj;this.xj=d;this.xj.forEach(function(q){if(p.indexOf(q)<0){var r=(c.get(q)||0)+1;c.set(q,r);r==1&&(q.o(g.uc,{center:l}),f&&q.o(g.SF))}})},jc:function(d,f){for(var l="",p=d.length-1;p>=0&&l=="";p--){var q=d[p];if(!f||q.get("displayTooltipInTouchScreens")&&
this.La.P.get("displayTooltipInTouchScreens")!==!1)l=q.get("toolTip","")}return l},BD:function(d){if(d){d=this.get("yaw")-this.pD;var f=this.get("pitch")-this.oD;return Math.sqrt(d*d+f*f)}return 0},b1a:function(d){var f={};this.Ly.get("useHandCursor")===!0?f[b.qf]=d:this.Ly.get("useHandCursor")!==!1&&d.forEach(function(l){var p;(p=l.get("useHandCursor")?b.qf:l.get("cursor"))&&(f[p]?f[p].push(l):f[p]=[l])});return f}}});
define("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController",["require","tdv/player/view/util/Device","tdv/player/script/PanoramaPoint"],function(a){function m(){this.cj=void 0;this.wM=this.aI=0;this.Rd=!0;this.r0=this.jla=this.yfa=void 0;this.Ld=!1}var h=a("tdv/player/view/util/Device"),n=a("tdv/player/script/PanoramaPoint"),g=Math.PI/180,k=h.Yb()==h.sj?[-.5,0]:[0,0];m.prototype.ZE=function(e){this.cj!=e&&(this.cj=e,this.Rd=!0)};m.prototype.XE=function(e){if(e<this.aI+k[0]||
e>this.aI+k[1])this.aI=e,this.Rd=!0};m.prototype.get=function(e,b){b!==void 0||(b=!0);this.Rd&&(this.za(),this.Rd=!1);var c=this.yfa.get(e)||0;e=(this.jla.get(e)||0)-c;b&&(e>180?e-=360:e<-180&&(e+=360));return c+e*this.r0};m.prototype.Aoa=function(){this.Rd&&(this.za(),this.Rd=!1);for(var e=this.yfa.get("vertices"),b=this.jla.get("vertices"),c=[],d=0;d<e.length;d++){var f=e[d].get("yaw")||0,l=(b[d].get("yaw")||0)-f;l>180?l-=360:l<-180&&(l+=360);var p=e[d].get("pitch")||0,q=(b[d].get("pitch")||0)-
p;c.push(new n(f+l*this.r0,p+q*this.r0))}e=this.aT&&this.aT.length==c.length;for(d=0;d<c.length&&e;d++)e=this.aT[d].get("yaw")==c[d].get("yaw")||this.aT[d].get("pitch")==c[d].get("pitch");return e?this.aT:this.aT=c};m.prototype.nw=function(){return this.get("opacity",!1)};m.prototype.xA=function(){var e=this.get("hfov")||this.get("vfov"),b=this.cj[0].get("hfov")||this.cj[0].get("vfov");return Math.tan(e*.5*g)/Math.tan(b*.5*g)};m.prototype.za=function(){for(var e=this.wM,b,c=this.cj.length-1,d,f;;){b=
Math.min(e+1,c);d=this.nza(e);f=this.nza(b);if(d<=this.aI&&this.aI<=f)break;if(d>this.aI){if(e==0){b=e;break}--e}else{if(e==c){b=e;break}e+=1}}this.yfa=this.cj[e];this.jla=this.cj[b];e=f-d;this.r0=e>0?(this.aI-d)/e:0};m.prototype.nza=function(e){return this.cj[e].get("timestamp")};return m});
define("tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,
"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.ue,!0)},Cq:function(){m.da(this.C,"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.ue)},ue:function(){this.set("horizontalAlign",this.C.get("horizontalAlign"));this.set("verticalAlign",this.C.get("verticalAlign"));this.set("scale",this.C.get("scale"));this.set("scaleMode",this.C.get("scaleMode"));this.set("width",
this.C.get("width"));this.set("height",this.C.get("height"));this.set("offsetX",this.C.get("offsetX",this.C.get("width")*.5));this.set("offsetY",this.C.get("offsetY",this.C.get("height")*.5));this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},cg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("yaw",this.Ib.get("yaw")),this.set("pitch",this.Ib.get("pitch")),
this.set("roll",this.Ib.get("roll")),this.set("alpha",this.Ib.nw()))}}});
define("tdv/player/view/panorama/renderer/object/FlatHotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/FlatRectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/FlatHotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=0;a=m.extend(k,e,d,b,c,function(p){k.call(this);this.set("tag","FlatHotspotImage");this.set("id","flat_hs_image_"+l++);this.C=p;this.Rl.push(this.C);this.Rg=this.Rg.bind(this)});a.prototype.hc=function(){k.prototype.hc.call(this);h.ba(this.C,["image.levels"],this.Rg,!0)};a.prototype.mc=function(){h.da(this.C,["image.levels"],this.Rg);k.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("image",this.C.get("image"));this.set("level",
f.ifb(this.C))};a.prototype.za=function(p){this.GI();k.prototype.za.call(this,p);this.W("inView")&&this.C.o(this.get("inView")?n.od:n.jd)};a.prototype.GI=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.oF,this.get("panoramaId"));g.setAttribute(q,g.Eaa,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin",["require","tdv/constants/EventName","tdv/player/view/panorama/renderer/3d/util/SceneUtil"],function(a){var m=a("tdv/constants/EventName"),h=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");a={Kla:function(f){if(this.La){var l=this.D1a(f);l?(f=this.Mya(this).some(function(p){return l.intersectsObject(p)}),this.pka(f)):this.pka(!1)}},Mya:function(f){var l=f.get("meshGroup"),p=[];l&&l.traverse(function(q){q.geometry&&q.visible&&
(Array.isArray(q.material)?q.material.some(function(r){return r.opacity>0}):q.material.opacity>0)&&p.push(q)});f.Cb().forEach(function(q){p=p.concat(this.Mya(q))}.bind(this));return p}};var n=new THREE.Frustum,g=new THREE.PerspectiveCamera,k=90,e=.5,b=new THREE.Matrix4,c=Math.PI/180,d=180/Math.PI;a.D1a=function(f){f=h.getCamera(f.sh);if(!f)return null;var l=this.La.P.get("focusAreaScale");if(!g.projectionMatrix.equals(f.projectionMatrix)||!g.matrixWorldInverse.equals(f.matrixWorldInverse)||k!=f.fov||
e!=l){g.copy(f);var p=g.fov*.5*c;g.fov=2*Math.atan2(e*Math.sin(p),Math.cos(p))*d;g.updateProjectionMatrix();n.setFromProjectionMatrix(b.copy(g.projectionMatrix).multiply(g.matrixWorldInverse));k=f.fov;e=l}return n};a.ofa=function(){this.Qga=!1};a.pfa=function(){this.pka(!1)};a.oka=function(f){this.fya=f};a.pka=function(f){this.Qga!==f&&(this.Qga=f,this.fya&&this.fya.o(this.Qga?m.JUa:m.KUa))};return a});
define("tdv/player/view/panorama/renderer/object/Hotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/util/Device tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/events/ProgressEvent tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/Base"),k=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),e=a("tdv/player/view/panorama/renderer/object/util/EventAggregator");a("tdv/player/view/util/Device");var b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=a("tdv/view/events/ProgressEvent"),f=a("tdv/player/view/util/XR"),l=a("tdv/player/view/util/xr/pointer/PointerState");a=m.extend(g,
k,function(p){g.call(this);this.C=p;this.Rl.push(this.C);this.G3=this.G3.bind(this);this.F3=this.F3.bind(this);this.H3=this.H3.bind(this);this.Zr(["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.cda=this.dda=this.Eq=this.xe=this.qg=null;this.xj=[];this.bda=[];this.En=null;this.oka(this.C)});a.prototype.hc=function(){this.qg=(new e(n.ia)).ko(this.IH.bind(this));this.xe=(new e(n.yc)).lr(this.MH.bind(this));this.Eq=(new e(n.vd)).ko(this.Q4a.bind(this));this.dda=(new e(n.uc)).lr(this.J4a.bind(this));this.cda=(new e(n.Eb)).lr(this.I4a.bind(this));g.prototype.hc.call(this);h.ba(this.C,["items",
"rollOverItems","maps","rollOverMaps"],this.G3,!0);h.ba(this.C,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabledInVRWithGazePointer enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.H3,!0);h.ba(this.C,["areas"],this.F3,!0);this.ofa()};a.prototype.mc=function(){this.pfa();this.$N([],this.xj);this.Dla([],this.bda);this.qg.dispose();this.xe.dispose();this.Eq.dispose();this.dda.dispose();this.cda.dispose();h.da(this.C,["items",
"rollOverItems","maps","rollOverMaps"],this.G3);h.da(this.C,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabledInVRWithGazePointer enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.H3);h.da(this.C,["areas"],this.F3);this.get("visible")&&this.C.o(n.jd);g.prototype.mc.call(this)};a.prototype.G3=function(){this.set("items",this.La.wA(this.C.get("items",[])));this.set("rollOverItems",this.La.wA(this.C.get("rollOverItems",[])));this.set("maps",
this.La.wA(this.C.get("maps",[])));this.set("rollOverMaps",this.La.wA(this.C.get("rollOverMaps",[])));var p=[].concat(this.get("maps"),this.get("items"),this.get("rollOverMaps"),this.get("rollOverItems"));p.forEach(function(q){q.Fkb(this.C)}.bind(this));this.get("items").forEach(function(q){q.set("projected",this.C.get("projected"))}.bind(this));this.bi(p);this.qg.hg(p);this.xe.hg(p);this.Eq.hg(p)};a.prototype.H3=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.F3=function(){var p=this.C.get("areas");this.dda.hg(p);this.cda.hg(p)};a.prototype.za=function(p){this.Cn(p);g.prototype.za.call(this,p);this.set("inVR",p.Va);this.set("surfaceSelection",p.wZ);this.set("hotspotsEnabled",p.DJ);this.set("inVRWithGazePointer",p.Va&&f.ud.length===1&&f.ud[0].type===l.WB);this.ye(p);this.Kla(p)};a.prototype.ye=function(){if(this.W("items","rollOverItems","maps","rollOverMaps","over","centerOver",
"inVR","hotspotsEnabled","enabledInVR","enabledInStandard","enabledInVRWithGazePointer","surfaceSelection","enabledInSurfaceSelection","enabled","interactionEnabled","rollOverDisplay","centerOverDisplay")||this.Ia&&this.Ia.W("composedAlpha")){var p=!1,q=!1,r=this.get("hotspotsEnabled")&&this.get("enabled")&&(!this.get("inVR")||this.get("enabledInVR"))&&(!this.get("inVRWithGazePointer")||this.get("enabledInVRWithGazePointer"))&&(this.get("inVR")||this.get("enabledInStandard"))&&(!this.get("surfaceSelection")||
this.get("enabledInSurfaceSelection"))&&this.Ia&&this.Ia.get("composedAlpha")>0,t=this.get("interactionEnabled");r&&(p=this.get("centerOver")&&!this.get("inVR"),q=this.get("over")||p,p=!this.get("rollOverDisplay")&&!this.get("centerOverDisplay")||this.get("over")&&this.get("rollOverDisplay")||p&&this.get("centerOverDisplay")!==!1&&this.get("rollOverDisplay"));this.get("rollOverItems").forEach(function(y){y.set("visible",q);y.set("beamEnabled",r&&q&&t)});var u=this.get("rollOverItems").length==0;this.get("items").forEach(function(y){y.set("visible",
u||!q);y.set("beamEnabled",r&&(u||!q)&&t)});this.get("rollOverMaps").forEach(function(y){y.set("visible",!1);y.set("beamEnabled",r&&q&&t)});var v=this.get("rollOverMaps").length==0;this.get("maps").forEach(function(y){y.set("visible",!1);y.set("beamEnabled",r&&(v||!q)&&t)});this.set("visible",p)}if(this.W("visible")){p=this.get("alpha");var w=this.get("visible")?1:0,x=(this.get("visible")?this.get("fadeInDuration"):this.get("fadeOutDuration"))*Math.abs(p-w);this.En=new b("linear",[new c("alpha",p,
w)],Math.max(x,1));this.Na();this.get("visible")?this.C.o(n.od):this.C.o(n.jd)}};a.prototype.Cn=function(p){this.En&&(this.En.Ve()?this.En=null:(this.En.Nb(p.zf),this.set("alpha",this.En.ob("alpha"))),this.Na())};a.prototype.IH=function(){this.hh();this.o(n.ia)};a.prototype.Q4a=function(){this.hh();this.o(n.vd)};a.prototype.MH=function(){this.hh()};a.prototype.hh=function(){var p=0;this.xe.jw(function(q){var r=0,t;this.qg.Nn(q)?r=100:(t=this.xe.Nn(q))&&(r=t.percent);p+=r}.bind(this));this.o(new d(n.yc,
p/this.xe.zd.length))};a.prototype.J4a=function(p){p.data.center?this.Dla([p.source],[]):this.$N([p.source],[])};a.prototype.I4a=function(p){p.data.center?this.Dla([],[p.source]):this.$N([],[p.source])};a.prototype.$N=function(p,q){this.zGa(this.xj,p,q);this.set("over",this.xj.length>0)};a.prototype.Dla=function(p,q){this.zGa(this.bda,p,q);this.set("centerOver",this.bda.length>0)};a.prototype.zGa=function(p,q,r){q||(q=[]);r||(r=[]);r.forEach(function(t){t=p.indexOf(t);t>=0&&p.splice(t,1)});q.forEach(function(t){p.indexOf(t)<
0&&p.push(t)})};return a});
define("tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,
"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.ue,!0)},Cq:function(){m.da(this.C,"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.ue)},ue:function(){this.set("horizontalAlign",this.C.get("horizontalAlign"));this.set("verticalAlign",this.C.get("verticalAlign"));this.set("scaleMode",this.C.get("scaleMode"));this.set("distance",this.C.get("distance"));this.set("scale",this.C.get("scale"));this.set("playbackPositions",
this.C.get("playbackPositions"))},cg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("yaw",this.Ib.get("yaw")),this.set("pitch",this.Ib.get("pitch")),this.set("roll",this.Ib.get("roll")),this.set("rotationX",this.Ib.get("rotationX")),this.set("rotationY",this.Ib.get("rotationY")),this.set("hfov",this.Ib.get("hfov")),this.set("vfov",this.Ib.get("vfov")),this.set("alpha",this.Ib.nw()))}}});
define("tdv/player/view/panorama/renderer/object/HotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),
function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/HotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=0;a=m.extend(k,e,b,c,d,function(p){k.call(this);this.set("tag","HotspotImage");this.set("id","hs_image_"+l++);this.set("side",THREE.DoubleSide);this.set("wasInView",!1);this.C=p;this.Rl.push(this.C);this.Rg=this.Rg.bind(this)});a.prototype.hc=function(){k.prototype.hc.call(this);h.ba(this.C,["image.levels"],this.Rg,!0)};a.prototype.mc=function(){h.da(this.C,["image.levels"],this.Rg);k.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("image",
this.C.get("image"));this.set("level",f.qfb(this.C,this.get("panoramaPixelsPerDegree")))};a.prototype.za=function(p){this.GI();k.prototype.za.call(this,p);this.W("inView")&&(p=this.get("inView"),p!==this.get("wasInView")&&(this.set("wasInView",p),this.C.o(p?n.od:n.jd)))};a.prototype.GI=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.oF,this.get("panoramaId"));g.setAttribute(q,g.Eaa,this.get("id"))}.bind(this))}};
return a});
define("tdv/player/view/util/geo/Rectangle",["require","tdv/player/view/util/geo/Point","tdv/player/view/util/geo/Vector"],function(a){function m(g,k,e){this.Lg=g||new h(0,0,0);this.Dk=k||new h(1,0,0);this.CE=e||new h(0,1,0)}var h=a("tdv/player/view/util/geo/Point"),n=a("tdv/player/view/util/geo/Vector");m.prototype.clone=function(){return new m(this.Lg.clone(),this.Dk.clone(),this.CE.clone())};m.prototype.apply=function(g){g.wO(this.Lg);g.wO(this.Dk);g.wO(this.CE)};m.prototype.intersection=function(g,
k){var e=n.YD(g.Lg,g.Dk),b=n.YD(this.Lg,g.Lg),c=n.YD(this.Lg,this.Dk);c.b7(n.YD(this.Lg,this.CE));e=e.SO(c);if(!(e==0||k&&e<0))return k=-c.SO(b)/e,new h(g.Lg.x+(g.Dk.x-g.Lg.x)*k,g.Lg.y+(g.Dk.y-g.Lg.y)*k,g.Lg.z+(g.Dk.z-g.Lg.z)*k)};m.prototype.T9=function(g,k){var e=n.YD(this.Lg,this.Dk),b=n.YD(this.Lg,this.CE);g=n.YD(this.Lg,g);var c=e.yoa(),d=b.yoa();return k?new h(g.SO(e)/(c*c),g.SO(b)/(d*d),0):new h(g.SO(e)/c,g.SO(b)/d,0)};return m});
define("tdv/player/view/util/geo/Projection","require tdv/player/view/util/geo/Fov tdv/player/view/util/geo/Frustum tdv/player/view/util/geo/Line tdv/player/view/util/geo/Point tdv/player/view/util/geo/Rectangle tdv/player/view/util/geo/Transformation tdv/view/constants/ScaleMode".split(" "),function(a){var m=a("tdv/player/view/util/geo/Fov"),h=a("tdv/player/view/util/geo/Frustum"),n=a("tdv/player/view/util/geo/Line"),g=a("tdv/player/view/util/geo/Point"),k=a("tdv/player/view/util/geo/Rectangle"),
e=a("tdv/player/view/util/geo/Transformation"),b=a("tdv/view/constants/ScaleMode"),c=Math.PI/180,d=180/Math.PI,f=new e,l=new h,p=new k,q=new g;return{get:function(r,t,u,v,w,x,y,z){r*=c;t*=c;t=new g(Math.sin(-r)*Math.cos(t),Math.sin(t),Math.cos(-r)*Math.cos(t));f.identity();f.rotateY(u*c);f.rotateZ(w*c);f.rotateX(v*c);t.apply(f);return t.z>0?(l.KRa(y),l.eRa(z),l.mK(x*c),l.project(t),t):null},kob:function(r,t,u){f.identity();f.rotateX(-u.Ic()*c);f.rotateZ(-u.yg()*c);f.rotateY(-u.Jc()*c);q.set(r,t,0);
r=u.unproject(q).VLa();r.apply(f);return{Xa:r.Jc()*d,pitch:r.Ic()*d}},pqb:function(r,t,u,v,w,x,y,z,A,D,F,C,B,H){H||(H=b.GB);B||(B=m.um(C,D,F));C||(C=m.zr(B,D,F));var E=D*.5/Math.tan(C*.5*c),G=E*Math.tan(C*.5*c)*2,N=E*Math.tan(B*.5*c)*2;p.Lg.set(+G*.5,+N*.5,0);p.Dk.set(-G*.5,+N*.5,0);p.CE.set(+G*.5,-N*.5,0);f.identity();f.rotateZ(-A*c);f.rotateX(-y*c);f.rotateY(z*c);f.translate(0,0,E);f.rotateZ(-x*c);f.rotateX(-w*c);f.rotateY(-v*c);f.rotateY(u.Jc()*c);f.rotateZ(u.yg()*c);f.rotateX(u.Ic()*c);p.apply(f);
q.set(r,t,0);w=p.intersection(u.unproject(q));v={x:void 0,y:void 0,xScaled:void 0,yScaled:void 0};w&&w.z>0&&(w=p.T9(w),v.xScaled=v.x=w.x/G,v.yScaled=v.y=w.y/N);if(H!=b.GB){switch(H){case b.uj:var O=Math.min(m.zr(B,D,F),C);var R=Math.min(m.um(C,D,F),B);break;case b.Jr:O=Math.max(m.zr(B,D,F),C);R=Math.max(m.um(C,D,F),B);break;case b.Tp:O=C;R=m.um(C,D,F);break;case b.Pk:O=m.zr(B,D,F),R=B}if(O!=C||R!=B)G=E*Math.tan(O*.5*c)*2,N=E*Math.tan(R*.5*c)*2,p.Lg.set(+G*.5,+N*.5,0),p.Dk.set(-G*.5,+N*.5,0),p.CE.set(+G*
.5,-N*.5,0),p.apply(f),q.set(r,t,0),(w=p.intersection(u.unproject(q)))&&w.z>0&&(w=p.T9(w),v.xScaled=w.x/G,v.yScaled=w.y/N)}return v},Gpb:function(r,t,u,v,w,x,y){y=w*.5/Math.tan(y*.5*c);p.Lg.set(+w*.5,+x*.5,y);p.Dk.set(-w*.5,+x*.5,y);p.CE.set(+w*.5,-x*.5,y);f.identity();f.rotateZ(-v*c);f.rotateX(-u*c);f.rotateY(-t*c);f.rotateY(r.Jc()*c);f.rotateZ(r.yg()*c);f.rotateX(r.Ic()*c);p.apply(f);r=new n(new g(0,0,0),new g(0,0,1));return(r=p.intersection(r))&&r.z>0?(r=p.T9(r),{x:r.x/w,y:r.y/x}):null}}});
define("tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin",["require","tdv/constants/Priority","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/panorama/renderer/3d/util/MeshUtil","tdv/player/view/panorama/renderer/TextureLoader"],function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/TextureLoader"),k=Math.PI/
180;return{ky:function(){this.set("distance",void 0);this.set("width",100);this.set("height",100);this.set("offsetX",void 0);this.set("offsetY",void 0);this.set("centerX",0);this.set("centerY",0);this.set("roll",0);this.Lh=this.oC();this.Bfa=h.PO();this.Io=new THREE.Matrix4;this.JL=new THREE.Matrix4;this.GN=new THREE.Matrix4;this.WAa=new THREE.Matrix4;this.qk=new THREE.Matrix4;this.un=new THREE.Matrix4;this.Dj=new THREE.Matrix4},Wz:function(e){this.ft(e)},nM:function(){var e=this.get("meshGroup");
return e?n.rm(e)[0]:null},hq:function(){return[0].map(function(e){var b=this.GR();e=n.create(this.Lh[e],b);g.fB(e,g.Nr);g.gB(e,g.zu);g.oK(e,m.RQ);g.nZ(e,1);return e}.bind(this))},oC:function(){return[h.PO()]},ft:function(e){var b=!1,c=!1;this.set("rendererYaw",e.Xa);this.set("rendererPitch",e.pitch);this.set("rendererRoll",e.Mg);this.set("rendererCameraFOV",e.kj);this.set("rendererWidth",e.width);this.set("rendererHeight",e.height);this.set("inVR",e.Va);if(this.W("distance","composedTranslationX",
"composedTranslationY","composedTranslationZ")){var d=this.get("composedTranslationX")==0&&this.get("composedTranslationY")==0&&this.get("composedTranslationZ")==0&&this.get("distance")!==void 0;this.set("z",d?h.ow(this.get("distance")):h.Dt())}this.W("z")&&(this.Io.makeTranslation(0,0,-this.get("z")),c=!0);e.kj&&this.W("z","rendererCameraFOV")&&this.set("rendererHeightZ",Math.tan(e.kj*k*.5)*this.get("z")*2);e.camera&&this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth",
"rendererHeight","rendererHeightZ","inVR","centerX","centerY")&&(this.JL.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.GN.makeTranslation(d,b,0),b=!0);this.W("roll")&&(this.qk.makeRotationZ(this.get("roll")*k),b=!0);e.kj&&(c||this.W("rendererHeight","inVR","rendererHeightZ","width","height","flipHorizontally"))&&(c=e.Va?512/e.height:1,e=(this.get("flipHorizontally")?
-1:1)*this.get("width")*c,c*=this.get("height"),this.un.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.WAa.makeTranslation(e,c,0),b=!0);b&&(this.Dj.copy(this.JL),this.Dj.multiply(this.Io),this.Dj.multiply(this.GN),this.Dj.multiply(this.qk),this.Dj.multiply(this.un),this.Dj.multiply(this.WAa),n.ot(this.get("meshGroup"),this.Dj))}}});
define("tdv/player/view/panorama/renderer/object/Sprite",["require","tdv/utils","tdv/player/view/panorama/renderer/object/ComposedWebGLObject","tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject");a=a("tdv/player/view/panorama/renderer/object/geometry/SpriteGeometryMixin");return m.extend(h,a,function(){h.call(this);this.set("tag","Sprite")})});
define("tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas",["require","tdv/player/view/util/Color"],function(a){function m(n,g,k,e,b,c){this.Lq=g;this.ja=document.createElement("canvas");this.ja.width=this.Lq;this.ja.height=this.Lq;switch(n){case m.EQ:this.c0a(k,e,b,c);break;case m.n_:this.d0a(k,e,b,c)}}var h=a("tdv/player/view/util/Color");m.prototype.fg=function(){return this.Lq};m.prototype.wg=function(){return this.Lq};m.prototype.If=function(){return this.ja};m.prototype.c0a=function(n,
g,k,e){var b=this.Lq*.5,c=this.Lq*.5,d=this.Lq*.5,f=this.ja.getContext("2d");g=h.Dp(g);for(var l=f.createRadialGradient(b,c,0,b,c,d),p=0;p<k.length;p++)l.addColorStop(e[p],"rgba("+g[0]+","+g[1]+","+g[2]+","+k[p]+")");f.fillStyle=l;f.globalAlpha=n;f.beginPath();f.arc(b,c,d,0,Math.PI*2,!0);f.closePath();f.fill()};m.prototype.d0a=function(n,g,k,e){var b=this.Lq*.5,c=this.Lq*.5,d=this.Lq*.5,f=this.ja.getContext("2d");f.clearRect(0,0,this.Lq,this.Lq);var l=h.Dp(g),p=f.createRadialGradient(b,c,0,b,c,d);
for(g=0;g<k.length;g++)p.addColorStop(e[g],"rgba("+l[0]+","+l[1]+","+l[2]+","+k[g]+")");f.fillStyle=p;f.globalAlpha=n;f.beginPath();for(g=0;g<6;g++)k=45*Math.PI/180+2*Math.PI*g/6,n=b+Math.cos(k)*d,k=c+Math.sin(k)*d,g==0?f.moveTo(n,k):f.lineTo(n,k);f.closePath();f.fill()};m.EQ="circle";m.n_="hexagon";return m});
define("tdv/player/view/panorama/renderer/object/LensFlare","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/util/geo/Projection tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/SolidFrame tdv/player/view/panorama/renderer/object/Sprite tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),
n=a("tdv/constants/EventName"),g=a("tdv/player/view/util/geo/Projection"),k=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/SolidFrame"),b=a("tdv/player/view/panorama/renderer/object/Sprite"),c=a("tdv/player/view/panorama/renderer/object/canvas/LensFlareCanvas"),d=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource");a=m.extend(k,function(l){k.call(this);this.C=l;this.Rl.push(this.C);this.Rg=this.Rg.bind(this);this.set("tag",
"LensFlare");this.set("translationAlpha",0);this.eda=this.KZa();this.tg=this.E_a();this.bi(this.eda.concat([this.tg]))});a.prototype.hc=function(){k.prototype.hc.call(this);this.o(n.vd);this.o(n.ia);h.ba(this.C,["yaw","pitch","bleaching","bleachingDistance"],this.Rg,!0)};a.prototype.mc=function(){h.da(this.C,["yaw","pitch","bleaching","bleachingDistance"],this.Rg);k.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("yaw",this.C.get("yaw"));this.set("pitch",this.C.get("pitch"));this.set("bleaching",
this.C.get("bleaching"));this.set("bleachingDistance",this.C.get("bleachingDistance"))};a.prototype.za=function(l){k.prototype.za.call(this,l);this.set("rendererYaw",l.Xa);this.set("rendererPitch",l.pitch);this.set("rendererRoll",l.Mg);this.set("rendererCameraFOV",l.kj);this.set("rendererWidth",l.width);this.set("rendererHeight",l.height);this.set("inVR",l.Va);if(this.W("composedTranslationX","composedTranslationY","composedTranslationZ")){var p=this.get("composedTranslationX"),q=this.get("composedTranslationY"),
r=this.get("composedTranslationZ");this.set("translationAlpha",Math.max(0,1-Math.sqrt(p*p+q*q+r*r)*10))}if(this.W("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","inVR","yaw","pitch","translationAlpha","composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")){var t=l.Xa+this.get("composedDeltaYaw"),u=l.pitch+this.get("composedDeltaPitch"),v=l.Mg+this.get("composedDeltaRoll");p=this.get("translationAlpha");r=q=0;if(!l.Va&&(t=g.get(this.get("yaw"),
this.get("pitch"),t,u,v,l.kj,l.width,l.height))){var w=l.width*.5;var x=l.height*.5;var y=t.x;var z=t.y;w=(w-y)*2;x=(x-z)*2;r=Math.sqrt(w*w+x*x);t=Math.min(l.width,l.height);q=Math.max(0,Math.min(.7,1-r/Math.sqrt(l.width*l.width,l.height*l.height)))*p;l=this.get("bleaching");r=1-Math.max(0,Math.min(1,r/(t*this.get("bleachingDistance"))));r=l*r*p}for(l=0;l<this.eda.length;l++)p=this.eda[l],p.set("alpha",q),q>0&&(p.set("centerX",y+w*f[l].position),p.set("centerY",z+x*f[l].position));this.tg.set("alpha",
r)}};a.prototype.KZa=function(){return f.map(function(l){var p=(new c(l.form,l.BK,l.opacity,l.color,l.yJ,l.zJ)).If(),q=new d;q.bo(p);p=new b;p.set("textureSource",q);p.set("width",l.size);p.set("height",l.size);p.set("offsetX",l.size*.5);p.set("offsetY",l.size*.5);p.set("alpha",0);return p})};a.prototype.E_a=function(){return new e("#ffffff")};var f=[{form:c.n_,position:.1,size:52,BK:128,opacity:.8,color:"#FCFCFC",yJ:[1,.5],zJ:[0,.866]},{form:c.n_,position:.2,size:52,BK:128,opacity:.6,color:"#C8FCC8",
yJ:[1,.5],zJ:[0,.866]},{form:c.EQ,position:.36,size:112,BK:128,opacity:.5,color:"#C8C8FC",yJ:[1,.9,.6,0],zJ:[0,.2,.4,1]},{form:c.EQ,position:.47,size:32,BK:128,opacity:.3,color:"#96C8AF",yJ:[1,1,0],zJ:[0,.9,1]},{form:c.EQ,position:.65,size:52,BK:128,opacity:.7,color:"#FCFCFC",yJ:[.7,.7,.2,0],zJ:[0,.1,.4,1]},{form:c.n_,position:.88,size:128,BK:128,opacity:.4,color:"#AF96C8",yJ:[1,.5],zJ:[0,.866]},{form:c.EQ,position:1,size:33,BK:128,opacity:.8,color:"#C89696",yJ:[.8,.8,.6,0],zJ:[0,.2,.4,1]}];return a});
define("tdv/player/view/panorama/renderer/object/MenuButton","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/MenuCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){function m(p,q,r){p=(q-p)*(1-r);Math.abs(p)<1E-5&&(p=0);return q-p}var h=a("tdv/utils"),n=a("tdv/binding/BindingsHandler"),
g=a("tdv/constants/EventName"),k=a("tdv/player/view/panorama/renderer/object/Plane"),e=a("tdv/player/canvas/MenuCanvas"),b=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),c=a("tdv/view/util/Ease"),d=a("tdv/view/util/EaseDimension"),f=a("tdv/player/view/util/XR");a=h.extend(k,function(p){k.call(this);this.Wb=p;this.zs=this.zs.bind(this);this.zq=this.ja=null;this.Mz=this.qp=this.yja=this.uz=void 0;this.zwa=20;this.$g=null;this.Of=this.Wb.get("opacity",.5);this.sU=this.Wb.get("rollOverOpacity",
this.Of);this.m4a=1;this.p4a=.66;this.set("tag","MenuButton");this.set("visible",!1);this.set("over",!1);this.set("centerDistance",void 0)});a.prototype.hc=function(){k.prototype.hc.call(this);n.ba(this.Wb,["label"],this.zs,!0)};a.prototype.mc=function(){n.da(this.Wb,["label"],this.zs);k.prototype.mc.call(this)};a.prototype.zs=function(){this.ja=null};a.prototype.za=function(p){this.et(p);this.gh(p);this.FI(p);this.cg(p);this.ye(p);k.prototype.za.call(this,p)};a.prototype.et=function(p){p.Va&&!this.zq&&
f.getType()==f.Kx.mo&&this.bi([this.zq=new k])};a.prototype.gh=function(){this.get("visible")&&(this.ja||(this.get("textureSource")||this.set("textureSource",new b),this.ja=new e(this.Wb,[this.Wb]),this.get("textureSource").bo(this.ja.If()),this.set("contentWidth",this.ja.fg()),this.set("contentHeight",this.ja.wg()),this.set("hfov",this.ja.jf()),this.set("distance",this.Wb.get("distance"))),this.ja.update()&&(this.get("textureSource").update(),this.Na()),this.W("over")&&this.ja.WE(this.get("over")?
0:-1))};a.prototype.FI=function(p){this.W("visible")&&(this.$g=new c("linear",[new d("displayCoef",this.get("visible")?0:1,this.get("visible")?1:0,void 0)],300));this.$g&&(this.$g.Ve()?this.$g=null:this.$g.Nb(p.zf))};a.prototype.cg=function(p){if(this.get("visible")||this.$g){this.qp=p.Xa;this.Mz=Math.min(90,Math.max(-90,this.zwa+this.zwa-p.pitch));if(this.W("visible")&&this.get("visible"))this.set("yaw",p.Xa),this.set("pitch",p.pitch);else{for(;this.qp+180<this.uz;)this.uz-=360;for(;this.qp-180>
this.uz;)this.uz+=360;var q=(this.qp-this.uz)/p.zf,r=(this.Mz-this.yja)/p.zf,t=Math.atan2(r,q);r=Math.sqrt(r*r+q*q);r=Math.min(r,10*l);q=Math.cos(t)*r;t=Math.sin(t)*r;this.set("yaw",m(this.get("yaw"),this.qp+q,.02));this.set("pitch",m(this.get("pitch"),this.Mz+t,.02))}this.uz=this.qp;this.yja=this.Mz;t=this.get("yaw")-p.Xa;p=this.get("pitch")-p.pitch;this.set("centerDistance",Math.sqrt(t*t+p*p))}};a.prototype.ye=function(){if(!this.get("visible")&&!this.$g)this.set("alpha",0);else if(this.W("over",
"centerDistance")||this.$g){var p=this.get("over")?this.sU:this.Of,q=this.p4a,r=this.get("centerDistance")/this.get("hfov");r<1&&(q+=(1-r)*(this.m4a-q),p+=(1-r)*(this.sU-p));this.$g&&(p*=this.$g.ob("displayCoef"),q*=this.$g.ob("displayCoef"));this.set("alpha",p);this.set("scale",q)}};a.prototype.ao=function(p){if(p.$f==g.Jm){var q=!1;this.get("visible")&&!p.om()&&(q=this.Fy(p.Ps).length>0);q&&(p.LD(this.Wb),p.UI(this.Wb),p.lm(this.get("distance")));this.get("over")!=q&&(this.get("over")&&this.Wb.o(g.Eb),
this.set("over",q),this.get("over")&&this.Wb.o(g.uc))}else p.$f==g.Xf&&this.get("visible")&&!p.om()&&this.Fy(p.Ps).length>0&&(p.cu(this.Wb),this.Wb.o(g.ma),this.o(g.ma))};var l=Math.PI/180;return a});
define("tdv/player/view/panorama/renderer/object/MenuPanel","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/MenuCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/Plane"),
k=a("tdv/player/canvas/MenuCanvas"),e=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),b=a("tdv/view/util/Ease"),c=a("tdv/view/util/EaseDimension"),d=a("tdv/player/view/util/XR");a=m.extend(g,function(f,l){g.call(this);this.Wb=f;this.VC=l;this.zs=this.zs.bind(this);this.ja=null;this.yja=this.uz=void 0;this.$g=null;this.Of=this.Wb.get("opacity",.5);this.sU=this.Wb.get("rollOverOpacity",this.Of);this.set("textureSource",new e);this.set("tag","MenuPanel");this.set("overIndex",
-1);this.set("selectedIndex",-1);this.wxa=!1});a.prototype.hc=function(){g.prototype.hc.call(this);h.ba(this.Wb,["label"],this.zs,!0);this.VC.forEach(function(f){h.ba(f,["label"],this.zs,!0)}.bind(this))};a.prototype.mc=function(){h.da(this.Wb,["label"],this.zs);this.VC.forEach(function(f){h.da(f,["label"],this.zs)}.bind(this));g.prototype.mc.call(this)};a.prototype.zs=function(){this.ja=null};a.prototype.za=function(f){this.et(f);this.gh(f);this.FI(f);this.cg(f);g.prototype.za.call(this,f)};a.prototype.TZa=
function(){this.ja||(this.ja=new k(this.Wb,this.VC),this.get("textureSource").bo(this.ja.If()),this.set("contentWidth",this.ja.fg()),this.set("contentHeight",this.ja.wg()),this.set("hfov",this.ja.jf()),this.set("distance",this.Wb.get("distance")))};a.prototype.gh=function(){this.ja||this.TZa();this.W("selectedIndex")&&this.ja.WE(this.get("selectedIndex"));this.W("overIndex")&&this.ja.WE(this.get("overIndex"));this.ja.update()&&(this.get("textureSource").update(),this.Na())};a.prototype.et=function(f){f.Va&&
!this.zq&&d.getType()==d.Kx.mo&&this.bi([this.zq=new g])};a.prototype.FI=function(f){this.$g||this.wxa||(this.$g=new b("linear",[new c("alpha",0,1,void 0),new c("scale",0,1,void 0),new c("yaw",f.Xa,this.get("yaw"),void 0),new c("pitch",f.pitch,this.get("pitch"),void 0)],300));this.$g&&(this.$g.Ve()?(this.wxa=!0,this.$g=null):this.$g.Nb(f.zf))};a.prototype.cg=function(){if(this.$g){var f=this.get("overIndex")<0?this.Of:this.sU;this.set("alpha",f*this.$g.ob("alpha"));this.set("scale",this.$g.ob("scale"));
this.set("yaw",this.$g.ob("yaw"));this.set("pitch",this.$g.ob("pitch"))}else this.W("overIndex")&&(f=this.get("overIndex")<0?this.Of:this.sU,this.set("alpha",f))};a.prototype.ao=function(f){if(f.$f==n.Jm){var l=-1;if(!f.om()){var p=this.Fy(f.Ps).filter(function(q){return q.source==this.ja.If()}.bind(this));p.length>0&&(l=this.ja.uoa(p[0].x,p[0].y))}l>=0&&(f.LD(this.VC[l]),f.UI(this.VC[l]),f.lm(this.get("distance")));this.get("overIndex")>=0!=l>=0&&(l>0?this.o(n.uc):this.o(n.Eb));this.get("overIndex")!=
l&&(this.get("overIndex")>=0&&this.VC[this.get("overIndex")].o(n.Eb),this.set("overIndex",l),this.get("overIndex")>=0&&this.VC[this.get("overIndex")].o(n.uc))}else f.$f!=n.Xf||f.om()||(p=this.Fy(f.Ps).filter(function(q){return q.source==this.ja.If()}.bind(this)),p.length>0&&(l=this.ja.uoa(p[0].x,p[0].y),l>=0&&(p=this.VC[l],this.set("selectedIndex",l),f.cu(p),f.lm(this.get("distance")),p.o(n.ma),this.o(n.ma,{item:p}))))};return a});
define("tdv/player/view/panorama/renderer/object/MenuPanels",["require","tdv/utils","tdv/constants/EventName","tdv/player/view/panorama/renderer/object/Base","tdv/player/view/panorama/renderer/object/MenuPanel"],function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/MenuPanel");a=m.extend(n,function(b){n.call(this);this.Wb=b;this.gD=[];this.eN=null;this.set("tag","MenuPanels");this.set("visible",
!1)});a.prototype.za=function(b){this.W("visible")&&this.get("visible")&&(this.set("yaw",b.Xa),this.set("pitch",b.pitch),this.Dva(this.Wb));n.prototype.za.call(this,b)};a.prototype.Dva=function(b){b=new g(this.Wb,b.get("children",[]));var c=this.get("yaw");this.Cb().forEach(function(d){c+=d.get("hfov")+e});b.set("yaw",c);b.set("pitch",this.get("pitch"));this.nXa(b);this.appendChild(b)};a.prototype.$Da=function(b){this.Cb().slice(b).forEach(function(c){this.$6a(c);c.remove()}.bind(this));this.gD=this.gD.filter(function(c){return this.Cb().indexOf(c)>=
0}.bind(this))};a.prototype.nXa=function(b){b.bind(h.uc,this.qDa,this,!0);b.bind(h.Eb,this.pDa,this,!0);b.bind(h.ma,this.oDa,this,!0)};a.prototype.$6a=function(b){b.h(h.uc,this.qDa,this,!0);b.h(h.Eb,this.pDa,this,!0);b.h(h.ma,this.oDa,this,!0)};a.prototype.qDa=function(b){this.gD.indexOf(b.source)<0&&(this.gD.push(b.source),this.gD.length==1&&this.Mwa())};a.prototype.pDa=function(b){b=this.gD.indexOf(b.source);b>=0&&(this.gD.splice(b,1),this.gD.length==0&&this.I8a())};a.prototype.oDa=function(b){var c=
b.source;b=b.data.item;b.get("children",[]).length?(this.$Da(this.Cb().indexOf(c)+1),this.Dva(b)):this.Qwa()};a.prototype.Qwa=function(){this.set("visible",!1);this.$Da(0);this.Mwa();this.o(h.CB)};a.prototype.Mwa=function(){this.eN&&(clearTimeout(this.eN),this.eN=null)};a.prototype.I8a=function(){this.eN||(this.eN=setTimeout(function(){this.eN=null;this.Qwa()}.bind(this),k))};var k=3E3,e=1;return a});
define("tdv/player/view/panorama/renderer/object/Menu","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/MenuButton tdv/player/view/panorama/renderer/object/MenuPanels".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/MenuButton"),k=a("tdv/player/view/panorama/renderer/object/MenuPanels");a=m.extend(n,
function(e){n.call(this);this.C=e;this.Rl.push(this.C);this.set("tag","Menu");this.set("visible",!1);this.je=new g(this.C);this.je.bind(h.ma,this.FYa,this,!1);this.aj=new k(this.C);this.aj.bind(h.CB,this.d6a,this,!1);this.bi([this.je,this.aj])});a.prototype.hc=function(){n.prototype.hc.call(this);this.o(h.vd);this.o(h.ia)};a.prototype.za=function(e){this.set("visible",e.Va);this.W("visible")&&(this.je.set("visible",this.get("visible")),this.aj.set("visible",!1));n.prototype.za.call(this,e)};a.prototype.FYa=
function(){this.je.set("visible",!1);this.aj.set("visible",!0)};a.prototype.d6a=function(){this.je.set("visible",this.get("visible"))};return a});
define("tdv/player/view/panorama/renderer/object/CustomPlane","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/view/events/ProgressEvent".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),
k=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),e=a("tdv/view/events/ProgressEvent");a=m.extend(n,function(){n.call(this);this.set("tag","CustomPlane");this.set("source",null);this.set("sourceUpdated",!1);this.set("sourceIsVideo",!1);this.xe=this.Nh=null});a.prototype.hc=function(){this.Nh=(new k(h.ia)).ko(this.ys.bind(this));this.xe=(new k(h.ia)).lr(this.mz.bind(this));n.prototype.hc.call(this)};a.prototype.mc=function(){this.Nh.dispose();this.xe.dispose();n.prototype.mc.call(this)};
a.prototype.za=function(b){var c=this.get("textureSource");this.W("source","sourceUpdated","sourceIsVideo")&&(c||this.set("textureSource",c=new g),this.W("source")&&c.bo(this.get("source")),this.W("sourceIsVideo")&&c.$Y(this.get("sourceIsVideo")),this.W("sourceUpdated")&&(c.update(),this.set("sourceUpdated",!1)));c&&c.lra(b.Ik>0);n.prototype.za.call(this,b);this.W("meshGroup")&&(b=(b=this.get("meshGroup"))&&b.children||[],b.length&&(this.Nh.hg(b),this.xe.hg(b)))};a.prototype.ys=function(){this.o(h.vd);
this.o(h.ia)};a.prototype.mz=function(b,c){var d=0;c.jw(function(f){(f=c.Nn(f))&&(d+=f.percent)});this.o(new e(h.yc,d/c.zd.length))};return a});
define("tdv/player/view/panorama/renderer/object/SurfaceSelector","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/CustomPlane tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas tdv/player/view/util/geo/Line tdv/player/view/util/geo/Rectangle".split(" "),function(a){function m(q,r,t){this.gg=q;this.gg.bind(g.L("distanceToFloor"),
this.za,this,!1);this.nl=r;this.nl.bind(g.L("yaw"),this.za,this,!1);this.nl.bind(g.L("distance"),this.za,this,!1);this.nl.bind(g.L("enabled"),this.za,this,!1);this.nl.bind(g.L("enabledInSurfaceSelection"),this.za,this,!1);this.Sb=null;this.Cf=new b;this.Cf.set("hfov",20);this.Cf.set("vfov",20);this.Cf.set("pitch",-90);this.Cf.set("source",t.If());this.Cf.set("contentWidth",t.fg());this.Cf.set("contentHeight",t.wg());this.za()}var h=a("tdv/utils"),n=a("tdv/binding/BindingsHandler"),g=a("tdv/constants/EventName"),
k=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),e=a("tdv/player/view/panorama/renderer/object/Base"),b=a("tdv/player/view/panorama/renderer/object/CustomPlane"),c=a("tdv/player/view/panorama/renderer/object/canvas/SurfaceReticleCanvas"),d=a("tdv/player/view/util/geo/Line"),f=a("tdv/player/view/util/geo/Rectangle");a=h.extend(e,function(q){e.call(this);this.g3=this.g3.bind(this);this.ov=this.ov.bind(this);this.d3=this.d3.bind(this);this.set("tag","SurfaceSelector");this.set("reticleVisible",
!1);this.set("enabled",!1);this.Ba=q;this.P_=[];this.eS=new f;this.il=new d;this.Qe=new b;this.Qe.set("hfov",20);this.Qe.set("vfov",20);this.Qe.set("pitch",-90);this.set("reticleCoef",1);this.bi([this.Qe])});a.prototype.hc=function(){this.r_a();e.prototype.hc.call(this);n.ba(this.Ba,["distanceToFloor"],this.g3,!0);n.ba(this.Ba,["adjacentPanoramas"],this.ov,!0);n.ba(this.La.ld,["adjacentPanoramaPositionsEnabled"],this.d3,!0);this.o(g.vd);this.o(g.ia)};a.prototype.mc=function(){e.prototype.mc.call(this);
n.da(this.Ba,["distanceToFloor"],this.g3);n.da(this.Ba,["adjacentPanoramas"],this.ov);n.da(this.La.ld,["adjacentPanoramaPositionsEnabled"],this.d3);this.DEa([])};a.prototype.g3=function(){var q=this.Ba.get("distanceToFloor");this.Qe.set("distance",q);q=k.ow(q);var r=k.Coa(q,90),t=k.Doa(q,90);this.eS.Lg.set(-r*.5,-q,-t*.5);this.eS.Dk.set(r*.5,-q,-t*.5);this.eS.CE.set(-r*.5,-q,t*.5);this.jEa=q/k.Dt()};a.prototype.ov=function(){this.DEa(this.Ba.get("adjacentPanoramas",[]))};a.prototype.d3=function(){this.ov()};
a.prototype.DEa=function(q){this.P_.forEach(function(r){r.clear()});this.P_=q.map(function(r){return new m(this.Ba,r,this.mja)}.bind(this));q=[];this.La.ld.get("adjacentPanoramaPositionsEnabled")&&(q=q.concat(this.P_.map(function(r){return r.Cf})));q=q.concat([this.Qe]);this.bi(q)};a.prototype.za=function(q){e.prototype.za.call(this,q);this.set("enabled",q.wZ);this.lma();this.HD(q)};a.prototype.lma=function(){this.W("enabled","reticleVisible","composedTranslationX","composedTranslationY","composedTranslationZ",
"composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.Qe.set("alpha",this.get("reticleVisible")?1:0),this.set("alpha",!this.get("enabled")||this.get("composedTranslationX")||this.get("composedTranslationY")||this.get("composedTranslationZ")||this.get("composedDeltaYaw")||this.get("composedDeltaPitch")||this.get("composedDeltaRoll")?0:1),this.EGa())};a.prototype.r_a=function(){this.zN=new c(this.La.P);this.zN.setPosition(this.get("reticleCoef"));this.Qe.set("source",this.zN.If());this.Qe.set("contentWidth",
this.zN.fg());this.Qe.set("contentHeight",this.zN.wg());this.mja=new c(this.La.P);this.mja.setPosition(0);this.mja.update(1)};a.prototype.HD=function(q){this.W("reticleCoef")&&this.zN.setPosition(this.get("reticleCoef"));this.Qe.set("sourceUpdated",this.zN.update(q.zf))};a.prototype.ao=function(q){if(q.Rza)if(!this.get("enabled")||q.Ps.length==0||q.om()||q.We())this.set("reticleVisible",!1);else{var r=q.Ps[0];this.il.Lg.set(r.origin.x,r.origin.y,r.origin.z);this.il.Dk.set(r.origin.x+r.direction.x,
r.origin.y+r.direction.y,r.origin.z+r.direction.z);if(r=this.eS.intersection(this.il,!0)){var t=this.eS.T9(r,!0),u=2*(.5-t.x);t=2*(.5-t.y);var v=l*Math.atan2(-u,t),w=-90+l*Math.atan2(Math.sqrt(u*u+t*t),1);if(w<-75||w>-1)this.set("reticleVisible",!1);else{var x={x:u*this.jEa,y:-t*this.jEa};q.zw()||q.gpa()?q.$f==g.Jm&&(this.set("reticleVisible",!0),this.Qe.set("alpha",Math.min(1,(w- -75)/5)),this.Qe.set("translationX",x.x),this.Qe.set("translationZ",x.y)):this.set("reticleVisible",!1);var y=this.La.ld.get("surfaceSelectionHorizontalAngle")*
.5,z=this.La.ld.get("surfaceSelectionVerticalAngle")*.5;t=this.P_.map(function(A){return{nl:A.nl,HX:A.pfb(v),vertical:A.Zfb(w),distance:A.F7(x)}}).filter(function(A){return A.HX<y&&A.vertical<z});t.length==0?this.set("reticleCoef",0):(t.sort(function(A,D){return A.distance-D.distance}),u=t[0].nl,this.set("reticleCoef",Math.max(0,Math.min(1,(1-t[0].HX/y)*(1-t[0].vertical/z)))),r=this.Ba.get("distanceToFloor")*Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z)/-r.y,q.gpa()&&q.Nbb([u]),q.lm(r),q.$f==g.Xf?(q.cu([u]),
this.get("blendingActive")||u.o(g.Wr)):(q.LD([u]),q.zw()&&q.UI([u]),(r=this.La.P.get("displayTooltipInSurfaceSelection")&&u.get("panorama")&&u.get("panorama").get("label"))&&q.y6(r,0)))}}else this.set("reticleVisible",!1)}};m.prototype.clear=function(){this.gg.h(g.L("distanceToFloor"),this.za,this,!1);this.gg=null;this.nl.h(g.L("yaw"),this.za,this,!1);this.nl.h(g.L("distance"),this.za,this,!1);this.nl.h(g.L("enabled"),this.za,this,!1);this.nl.h(g.L("enabledInSurfaceSelection"),this.za,this,!1);this.nl=
null};m.prototype.pfb=function(q){if(!this.Sb)return Infinity;q=Math.abs(this.Sb.Xa-q);return q>180?360-q:q};m.prototype.Zfb=function(q){return this.Sb?Math.abs(this.Sb.pitch-q):Infinity};m.prototype.F7=function(q){if(!this.XN)return Infinity;var r=q.x-this.XN.x;q=q.y-this.XN.y;return Math.sqrt(r*r+q*q)};m.prototype.za=function(){var q=this.nl.get("yaw"),r=this.nl.get("distance"),t=this.nl.get("enabled")&&this.nl.get("enabledInSurfaceSelection");if(q!==void 0&&r!==void 0&&t){t=this.gg.get("distanceToFloor");
var u=-90+Math.atan2(r,t)*l;this.Cf.set("alpha",u<-1?1:0);this.Sb={Xa:q,pitch:u};u=k.ow(t)/k.Dt();this.XN={x:-Math.sin(q*p)*r/t*u,y:-Math.cos(q*p)*r/t*u};this.Cf.set("translationX",this.XN.x);this.Cf.set("translationZ",this.XN.y);this.Cf.set("distance",t)}else this.XN=this.Sb=null,this.Cf.set("alpha",0)};var l=180/Math.PI,p=Math.PI/180;return a});
define("tdv/player/view/panorama/renderer/object/Panorama","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/view/events/ProgressEvent tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/SurfaceSelector tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/Preloader tdv/player/view/util/XR".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/view/events/ProgressEvent"),k=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/Plane"),b=a("tdv/player/view/panorama/renderer/object/SurfaceSelector"),c=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),d=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),f=a("tdv/player/view/util/Preloader"),l=a("tdv/player/view/util/XR"),p=0;a=m.extend(k,
function(t){k.call(this);this.C=t;this.Rl.push(this.C);this.LH=this.LH.bind(this);this.Qg=this.Qg.bind(this);this.ov=this.ov.bind(this);this.Zr(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","Panorama");this.set("loadingActive",!1);this.set("blendingActive",!0);this.set("currentTime",0);this.set("adjacentPanoramas",[]);this.set("preloadEnabled",!0);this.set("backgroundPreloadEnabled",!0);this.set("surfaceSelectionEnabled",!1);this.set("id","panorama_"+p++);this.set("ready",
!1);this.o4=[];this.Eq=this.xe=this.qg=null;this.Xi=new q;this.GDa=new r;this.c$a=new b(this.C);this.xq=new r;this.bi([this.Xi,this.GDa,this.c$a,this.xq])});a.prototype.hc=function(){this.qg=(new c(n.ia)).ko(this.ys.bind(this));this.xe=(new c(n.yc)).lr(this.NH.bind(this));this.Eq=(new c(n.vd)).ko(this.U4a.bind(this));k.prototype.hc.call(this);this.get("blendingActive")&&this.La.set("globalBlendingActive",this.La.get("globalBlendingActive")+1);h.ba(this.C,["currentTime"],this.LH,!0);h.ba(this.C,["frames",
"overlays","vrMenu","flipImageHorizontally"],this.Qg,!0);h.ba(this.C,["adjacentPanoramas"],this.ov,!0)};a.prototype.mc=function(){this.qg.dispose();this.xe.dispose();this.Eq.dispose();this.get("blendingActive")&&this.La.set("globalBlendingActive",this.La.get("globalBlendingActive")-1);k.prototype.mc.call(this);h.da(this.C,["currentTime"],this.LH);h.da(this.C,["frames","overlays","vrMenu","flipImageHorizontally"],this.Qg);h.da(this.C,["adjacentPanoramas"],this.ov);this.Vka()};a.prototype.Qg=function(){function t(A,
D,F){A=y.indexOf(A);return A<0?F:w[A].get(D,F)}function u(A){return t(A,"projected",!1)}var v=this.La.wA(this.C.get("frames"));v.forEach(function(A){A.set("panoramaId",this.get("id"));A.set("flipHorizontally",this.C.get("flipImageHorizontally"))}.bind(this));var w=this.C.get("overlays"),x=this.La.wA(w),y=x.slice(),z=x.filter(function(A){return t(A,"projected",!1)||t(A,"required",!1)}).filter(function(A){return t(A,"enabled",!0)});this.C.get("vrMenu")&&x.push(this.La.wA(this.C.get("vrMenu")));x.forEach(function(A){A.set("panoramaId",
this.get("id"))}.bind(this));this.qg.hg(v.concat(x));this.xe.hg(v.concat(x));this.Eq.hg(v.concat(z));this.GDa.bi(x.filter(u));this.Xi.bi(v);this.xq.bi(x.filter(function(A){return!u(A)}));this.set("panoramaPixelsPerDegree",d.uLa(this.C));this.OGa()};a.prototype.LH=function(){this.set("currentTime",this.C.get("currentTime",0))};a.prototype.ov=function(){this.set("adjacentPanoramas",this.C.get("adjacentPanoramas",[]))};a.prototype.ys=function(){this.hh();this.o(n.ia)};a.prototype.U4a=function(){this.hh();
this.set("ready",!0);this.o(n.vd)};a.prototype.NH=function(){this.hh()};a.prototype.hh=function(){var t=0;this.xe.jw(function(u){var v=0,w;this.qg.Nn(u)?v=100:(w=this.xe.Nn(u))&&(v=w.percent);t+=v}.bind(this));this.o(new g(n.yc,t/this.xe.zd.length))};a.prototype.za=function(t){t.Va&&!this.zq&&l.getType()==l.Kx.mo&&this.bi([this.zq=new e].concat(this.Cb()));var u=this.get("blendingActive");this.set("blendingActive",this.get("alpha")<1);u!=this.get("blendingActive")&&this.La.set("globalBlendingActive",
this.La.get("globalBlendingActive")+(this.get("blendingActive")?1:-1));this.set("backgroundPreloadEnabled",this.La.dr().get("backgroundPreloadEnabled")!==!1);this.set("preloadEnabled",t.xY);this.W("adjacentPanoramas","loadingActive","preloadEnabled","backgroundPreloadEnabled")&&(this.get("loadingActive")&&this.get("backgroundPreloadEnabled")?this.K9a():this.Vka());this.W("index")&&this.OGa();k.prototype.za.call(this,t)};a.prototype.Voa=function(){return d.Voa(this.C,this.get("preloadEnabled"))};a.prototype.uqa=
function(){return d.uqa(this.C,this.get("preloadEnabled"))};a.prototype.K9a=function(){this.Vka();this.o4=this.get("adjacentPanoramas").map(function(t){t=t.get("panorama");return[t,d.wp(t,this.get("preloadEnabled"))]}.bind(this));this.o4.forEach(function(t){f.dIa(t[0],t[1]);f.V8(t[0],1)})};a.prototype.Vka=function(){this.o4.forEach(function(t){f.V8(t[0],-1);f.Hjb(t[0],t[1])});this.o4=[]};a.prototype.OGa=function(){var t=this.get("index");this.Xi.Cb().forEach(function(u,v,w){u.set("panoramaIndex",
t);u.set("frameIndex",v);u.set("frameCount",w.length)})};var q=m.extend(k,function(){k.call(this);this.Zr(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("currentTime",0);this.set("tag","Group")});q.prototype.za=function(t){this.Cb().forEach(function(u,v,w){u.set("frontFrame",w[w.length-1])});k.prototype.za.call(this,t)};var r=m.extend(k,function(){k.call(this);this.Zr(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",
!1);this.set("currentTime",0);this.set("tag","Group")});return a});
define("tdv/player/view/panorama/renderer/object/PanoramaFrame",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Frame","tdv/player/view/panorama/renderer/3d/util/MeshUtil"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/Frame"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=0;a=m.extend(h,function(){h.call(this);this.set("tag","PanoramaFrame");this.set("panoramaIndex",0);this.set("frameIndex",0);this.set("frameCount",1);this.set("id","frame_"+
g++)});a.prototype.za=function(k){h.prototype.za.call(this,k);this.GI()};a.prototype.LI=function(){if(this.W("panoramaIndex","frameIndex","frameCount","meshGroup")){var k=this.get("meshGroup");if(k){var e=this.get("panoramaIndex"),b=this.get("frameIndex"),c=this.get("frameCount"),d=k.children.length;k.children.forEach(function(f,l){n.M$(f,e+(l+b/c)/d)}.bind(this))}}};a.prototype.GI=function(){if(this.W("meshGroup","panoramaId","id")){var k=this.get("meshGroup");k&&k.children.forEach(function(e,b){n.setAttribute(e,
n.oF,this.get("panoramaId"));n.setAttribute(e,n.Daa,b);n.setAttribute(e,n.LK,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/ImagePanoramaFrame","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/PanoramaFrame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/TextureLoader tdv/view/events/ProgressEvent".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),k=a("tdv/player/view/panorama/renderer/object/Base"),e=a("tdv/player/view/panorama/renderer/object/PanoramaFrame"),b=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),c=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),d=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),f=a("tdv/player/view/panorama/renderer/TextureLoader"),l=a("tdv/view/events/ProgressEvent");
a=m.extend(e,function(q){e.call(this);this.set("tag","ImagePanoramaFrame");this.ADa=!0;this.C=q;this.Rl.push(this.C);this.am=this.Nh=this.Eq=null;this.vha=[];this.Qg=this.Qg.bind(this);this.Zr(["loadingActive","currentTime","panoramaId","panoramaPixelsPerDegree"]);this.bi([this.xq=new p])});a.prototype.hc=function(){this.Eq=new b(n.ia);this.Nh=new b(n.ia);this.am=new b(n.yc);e.prototype.hc.call(this);h.ba(this.C,["overlays"],this.Qg,!0)};a.prototype.mc=function(){this.Eq.dispose();this.Nh.dispose();
this.am.dispose();h.da(this.C,["overlays"],this.Qg);e.prototype.mc.call(this)};a.prototype.Qg=function(){this.xq.bi(this.La.wA(this.C.get("overlays")));this.wGa()};a.prototype.wGa=function(){this.Nh.hg([].concat(this.vha,this.xq.Cb()));this.am.hg([].concat(this.vha,this.xq.Cb()))};a.prototype.hq=function(){var q=[],r=[],t=[];c.xoa(this.C,this.ADa).forEach(function(u,v){var w=d.wdb(this.C,u);c.uhb(u)?(v==0&&(q=q.concat(w),r=r.concat(w)),f.gB(w,v==0?f.zu:f.q_),f.fB(w,v==0?f.Nr:f.Pba)):(v==0&&(q=q.concat(w)),
r=r.concat(w),f.gB(w,f.zu),f.fB(w,f.Nr));f.oK(w,v==0?g.cca:g.Hm);f.nZ(w,v);t=t.concat(w)}.bind(this));this.Eq.hg(q);this.vha=r;this.wGa();this.Nh.ko(this.ys.bind(this));this.Eq.ko(this.z5a.bind(this));this.am.lr(this.NH.bind(this));this.o(new l(n.yc,0));return t};a.prototype.z5a=function(){this.o(n.vd)};a.prototype.ys=function(){this.o(n.ia)};a.prototype.za=function(q){this.ADa=q.xY;this.Fab();e.prototype.za.call(this,q)};a.prototype.Fab=function(){var q=this.get("frontFrame");if(this.W("frontFrame")||
q&&q.W("alpha"))q=q&&q!=this?1-q.get("alpha"):1,this.xq.set("alpha",q)};a.prototype.NH=function(){var q=0;this.am.jw(function(r){var t=0,u;this.Nh.Nn(r)?t=100:(u=this.am.Nn(r))&&(t=u.percent);q+=t}.bind(this));this.o(new l(n.yc,q/this.am.zd.length))};var p=m.extend(k,function(){k.call(this);this.Zr(["loadingActive","panoramaId","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("tag","Group")});return a});
define("tdv/player/view/panorama/renderer/object/ImagePlane","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/view/events/ProgressEvent".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/view/panorama/renderer/object/texturesource/ImageTextureSource"),
k=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),e=a("tdv/view/events/ProgressEvent");a=m.extend(n,function(){n.call(this);this.set("tag","ImagePlane");this.set("url",null);this.xe=this.qg=null});a.prototype.hc=function(){this.qg=(new k(h.ia)).ko(this.ys.bind(this));this.xe=(new k(h.yc)).lr(this.mz.bind(this));n.prototype.hc.call(this)};a.prototype.mc=function(){this.qg.dispose();this.xe.dispose();n.prototype.mc.call(this)};a.prototype.za=function(b){if(this.W("url")){var c=this.get("url");
c=c?new g(c):null;this.set("textureSource",c)}n.prototype.za.call(this,b);this.W("meshGroup")&&(b=(b=this.get("meshGroup"))&&b.children||[],b.length&&(this.qg.hg(b),this.xe.hg(b)))};a.prototype.ys=function(){this.o(h.vd);this.o(h.ia)};a.prototype.mz=function(b,c){var d=0;c.jw(function(f){(f=c.Nn(f))&&(d+=f.percent)});this.o(new e(h.yc,d/c.zd.length))};return a});
define("tdv/player/view/panorama/renderer/object/control/CueController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/constants/PlaybackState tdv/view/av/VideoPlayer".split(" "),function(a){function m(c,d){this.Vd=c;this.ra=d;this.Zl=!1;this.gk=[];this.Go=this.WL=void 0;this.bf=[];this.zYa();this.cea();this.t5();this.Hj()}function h(c,d,f){this.time=c;this.cue=d;this.action=f}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/events/Event"),e=a("tdv/constants/PlaybackState"),
b=a("tdv/view/av/VideoPlayer");m.prototype.clear=function(){this.xR();this.gk=[];this.V$a();this.ra=this.Vd=null};m.prototype.zYa=function(){this.ra.bind(b.Dg,this.Nf,this,!0);this.ra.bind(g.Pd,this.Hj,this,!0);this.ra.bind(g.Tb,this.dD,this,!0)};m.prototype.V$a=function(){this.ra.h(b.Dg,this.Nf,this,!0);this.ra.h(g.Pd,this.Hj,this,!0);this.ra.h(g.Tb,this.dD,this,!0)};m.prototype.Hj=function(){var c=this.ra.getState()!=e.ca;this.Zl!=c&&((this.Zl=c)?this.t5():this.xR())};m.prototype.dD=function(){this.QI()};
m.prototype.Nf=function(){this.QI()};m.prototype.t5=function(){this.Go=this.WL=0};m.prototype.QI=function(){if(this.ra&&this.Zl){var c=this.bf.slice(),d=this.ra.getCurrentTime(),f=d-this.WL;f<0&&(this.bf=[],this.Go=0);f=f>=0&&f<2;this.WL=d;var l;for(l=this.Go;l<this.gk.length&&!(this.gk[l].time>d);l++);for(;this.Go<l;this.Go++)d=this.gk[this.Go],d.action=="start"?(this.bf=n.union(this.bf,[d.cue]),f&&d.cue.o(new k(g.Cr))):(this.bf=n.union(this.bf,[d.cue]),f&&d.cue.o(new k(g.Tb)));c.length==this.bf.length&&
n.intersection(c,this.bf).length==this.bf.length||this.TV()}};m.prototype.xR=function(){this.bf.length>0&&(this.bf=[],this.TV())};m.prototype.TV=function(){this.Vd.o(new k(g.Al,{activeCues:this.bf.slice()}))};m.prototype.cea=function(){this.gk=[];this.Vd.get("cues",[]).forEach(c=>{this.gk.push(new h(c.get("startTime",0),c,"start"));this.gk.push(new h(c.get("endTime",Number.POSITIVE_INFINITY),c,"end"))});this.gk.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.Ie=e;this.Vd=b;this.ra=c;this.ra.setCurrentTime(this.mg=this.Vd.get("currentTime",0));this.ra.Bg(this.Ff=this.Ie.get("mute",!1));this.ra.Zc(this.I=this.Vd.get("state",n.ca));this.ra.setLoop(this.Pl=this.Vd.get("loop"));this.ac=this.ra.lj();this.pXa();this.wXa();this.Px()}
var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=a("tdv/view/av/VideoPlayer");m.prototype.clear=function(){this.a7a();this.g7a();this.zz();this.ra.Zc(n.ca);this.Vd.set("state",n.ca);this.Vd.set("currentTime",0);this.Vd.set("duration",void 0)};m.prototype.bDa=function(){var e=this.Vd.get("state",n.ca);this.I!=e&&this.ra.Zc(this.I=e)};m.prototype.$Ca=function(){var e=this.Vd.get("currentTime",0);this.mg!=e&&this.ra.setCurrentTime(this.mg=e)};m.prototype.dU=
function(){var e=this.Ie.get("mute",0);this.Ff!=e&&this.ra.Bg(this.Ff=e)};m.prototype.aDa=function(){var e=this.Vd.get("loop");this.Pl!=e&&this.ra.setLoop(this.Pl=e)};m.prototype.nU=function(){this.Vd.set("currentTime",this.mg=this.ra.getCurrentTime())};m.prototype.lU=function(){this.Vd.set("duration",this.ac=this.ra.lj())};m.prototype.mU=function(){this.Vd.set("state",this.I=this.ra.getState())};m.prototype.oU=function(){this.Vd.o(new g(h.Tb))};m.prototype.pXa=function(){this.Ie.bind(h.L("mute"),
this.dU,this,!0)};m.prototype.a7a=function(){this.Ie.h(h.L("mute"),this.dU,this,!0)};m.prototype.wXa=function(){this.Vd.bind(h.L("state"),this.bDa,this,!0);this.Vd.bind(h.L("currentTime"),this.$Ca,this,!0);this.Vd.bind(h.L("loop"),this.aDa,this,!0)};m.prototype.g7a=function(){this.Vd.h(h.L("state"),this.bDa,this,!0);this.Vd.h(h.L("currentTime"),this.$Ca,this,!0);this.Vd.h(h.L("loop"),this.aDa,this,!0)};m.prototype.Px=function(){this.ra.bind(k.Dg,this.nU,this,!0);this.ra.bind(k.Yj,this.lU,this,!0);
this.ra.bind(h.Pd,this.mU,this,!0);this.ra.bind(h.Tb,this.oU,this,!0)};m.prototype.zz=function(){this.ra.h(k.Dg,this.nU,this,!0);this.ra.h(k.Yj,this.lU,this,!0);this.ra.h(h.Pd,this.mU,this,!0);this.ra.h(h.Tb,this.oU,this,!0)};return m});
define("tdv/player/view/panorama/renderer/object/VideoPanoramaFrame","require tdv/utils tdv/constants/EventName tdv/constants/Priority tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ImagePlane tdv/player/view/panorama/renderer/object/PanoramaFrame tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/MeshFactory tdv/player/view/panorama/renderer/object/control/CueController tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/util/PanoramaFormat tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/Device tdv/player/view/util/geo/Quaternion tdv/view/av/SubtitleController tdv/view/av/VideoPlayer tdv/view/events/ProgressEvent tdv/view/util/Assets tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Priority"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/view/panorama/renderer/object/ImagePlane"),e=a("tdv/player/view/panorama/renderer/object/PanoramaFrame"),b=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),c=a("tdv/player/view/panorama/renderer/object/util/MeshFactory"),d=a("tdv/player/view/panorama/renderer/object/control/CueController"),f=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),
l=a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat"),p=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),q=a("tdv/player/view/panorama/renderer/TextureLoader"),r=a("tdv/player/view/util/Device"),t=a("tdv/player/view/util/geo/Quaternion"),u=a("tdv/view/av/SubtitleController"),v=a("tdv/view/av/VideoPlayer"),w=a("tdv/view/events/ProgressEvent"),x=a("tdv/view/util/Assets"),y=a("tdv/view/util/Ease"),z=a("tdv/view/util/EaseDimension");a=m.extend(e,function(E){e.call(this);this.C=E;
this.Rl.push(this.C);this.Zr(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","VideoPanoramaFrame");this.set("frameEmpty",void 0);this.set("hasStableContent",void 0);this.$0=void 0;this.set("atStart",void 0);l.get(this.C)==l.Or?this.xma=this.C.get("sphere"):this.xma=this.C.get("stereoSphere");this.Zl=!1;this.hb=v.yk(this.xma);this.$ia=this.vxa=!1;this.iO=[];this.cI=[];this.ip=this.Yl=this.am=this.Nh=this.Th=this.ra=null;this.qn=!1;this.fAa=this.NC=this.OC=0});a.prototype.hc=
function(){this.Nh=(new b(h.ia)).ko(this.ys.bind(this));this.am=(new b(h.yc)).lr(this.NH.bind(this));this.ra=new v(this.La.dr(),this.xma);this.es=new d(this.C.cE(),this.ra);this.Ua=new f(this.La.dr(),this.C.cE(),this.ra);this.xn=new u(this.C.cE(),this.ra);this.Px();this.w_a();this.vxa=this.La.ld.get("displayPlayOverlay");this.$ia=this.La.ld.get("clickAction")=="play_pause";var E=this.La.Jf(this.C.cE());E.appendChild(this.Yl);E.appendChild(this.ip);e.prototype.hc.call(this)};a.prototype.mc=function(){this.Nh.dispose();
this.am.dispose();this.zz();this.es.clear();this.es=null;this.Ua.clear();this.Ua=null;this.xn.clear();this.xn=null;this.ra.clear();this.Th=this.ra=null;this.Cxa();e.prototype.mc.call(this)};a.prototype.w_a=function(){this.Cxa();this.Yl=this.ixa(x.Ex,x.iL,x.u_);this.ip=this.ixa(x.hL,x.FVa,x.EVa)};a.prototype.ixa=function(E,G,N){var O=new k;O.set("url",E);O.set("contentWidth",G);O.set("contentHeight",N);O.set("hfov",10);O.set("yaw",0);O.set("pitch",0);O.set("alpha",0);return O};a.prototype.Cxa=function(){this.Yl&&
(this.Yl.remove(),this.Yl=null);this.ip&&(this.ip.remove(),this.ip=null)};a.prototype.hq=function(){this.iO=c.Ndb(this.C,this.hb);this.lbb=q.CK(p.bE(this.iO[0])[0]);this.iO.forEach(function(G){q.gB(G,q.zu);q.fB(G,q.Nr)});this.hb.get("posterURL")?(this.cI=c.Odb(this.C,this.hb),this.cI.forEach(function(G){q.gB(G,q.zu);q.fB(G,q.Nr);q.oK(G,n.cca)})):this.cI=[];var E=[].concat(this.iO,this.cI);this.Nh.hg(E);this.am.hg(E);this.o(new w(h.yc,0));return E};a.prototype.za=function(E){this.Iab(E);var G=this.ra.E7();
this.set("frameEmpty",G.isEmpty());this.set("atStart",!(this.get("currentTime")>1));this.Nla();e.prototype.za.call(this,E);this.Th&&this.Th.isEqual(G)?this.ra.getState()==g.PLAYING&&this.Na():(this.Th=G,this.lbb.bo(this.Th.Zu),this.Na());this.ra.bu(H.makeRotationFromQuaternion(t.hX(E.Xa,E.pitch,E.Mg,B)))};a.prototype.Nla=function(){this.get("frameEmpty")?this.set("hasStableContent",!1):this.get("currentTime")>this.$0+.2?this.set("hasStableContent",!0):this.get("currentTime")==0&&this.nha>this.ra.lj()-
.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.W("frameEmpty")&&!this.get("frameEmpty")&&(this.$0=this.get("currentTime"));!this.get("frameEmpty")&&this.get("currentTime")>0&&(this.nha=this.get("currentTime"))};a.prototype.Cn=function(){this.W("composedAlpha","meshGroup","frameEmpty","hasStableContent","atStart")&&(this.cI.length&&!this.get("hasStableContent")&&this.get("atStart")?(this.cI.forEach(function(E){p.nf(E,this.get("composedAlpha"))}.bind(this)),this.iO.forEach(function(E){p.nf(E,
0)}.bind(this))):(this.cI.forEach(function(E){p.nf(E,0)}.bind(this)),this.iO.forEach(function(E){p.nf(E,this.get("composedAlpha"))}.bind(this))))};a.prototype.ys=function(){this.o(h.vd);this.o(h.ia)};a.prototype.NH=function(E,G){var N=0;G.jw(function(O){(O=G.Nn(O))&&(N+=O.percent)});this.o(new w(h.yc,N/G.zd.length))};a.prototype.Hj=function(){this.Na()};a.prototype.Nf=function(){this.Na()};a.prototype.ao=function(E){if(E.$f==h.Xf&&!E.om()&&this.$ia&&(E.cu(this.C),E=Date.now(),!(E-this.fAa<500))){this.fAa=
E;E=this.C.cE();var G=E.get("state");G==g.PLAYING?E.set("state",g.Zb):G==g.Zb&&E.set("state",g.PLAYING)}};a.prototype.Iab=function(E){if(this.$ia){if(this.qn!=(this.ra.getState()==g.Zb))if(this.qn=!this.qn,this.vxa){var G=this.Yl.get("alpha"),N=this.qn?1:0;this.qz=new y("linear",[new z("playAlpha",G,N),new z("playScale",E.Va?1.5:1,E.Va?1.5:1),new z("pauseAlpha",0,0),new z("pauseScale",1,1)],Math.abs(N-G)*A);this.Yl.yi()}else this.qz=new y("linear",this.qn?[new z("playAlpha",0,0),new z("playScale",
1,1),new z("pauseAlpha",0,2),new z("pauseScale",.5,1.5)]:[new z("playAlpha",0,2),new z("playScale",.5,1.5),new z("pauseAlpha",0,0),new z("pauseScale",1,1)],D),this.Yl.yi(),this.ip.yi();this.qz&&(this.qz.Nb(E.zf),G=this.qz.ob("playAlpha"),this.Yl.set("alpha",G<1?G:2-G),this.Yl.set("scale",this.qz.ob("playScale")),G=this.qz.ob("pauseAlpha"),this.ip.set("alpha",G<1?G:2-G),this.ip.set("scale",this.qz.ob("pauseScale")),this.Na(),this.qz.Ve()&&(this.qz=null));this.Yl.get("alpha")>0&&(this.get("globalBlendingActive")&&
this.Yl.set("alpha",0),this.Yl.set("yaw",E.Xa),this.Yl.set("pitch",E.pitch),this.Yl.set("hfov",this.eza(E)));this.ip.get("alpha")>0&&(this.get("globalBlendingActive")&&this.ip.set("alpha",0),this.ip.set("yaw",E.Xa),this.ip.set("pitch",E.pitch),this.ip.set("hfov",this.eza(E)))}};var A=300,D=600;a.prototype.eza=function(E){return E.Va?15:2*Math.atan((r.ub()?Math.min(E.width,E.height)/100*20:x.iL)*Math.tan(E.Wd*F*.5)/E.width)*C};var F=Math.PI/180,C=180/Math.PI;a.prototype.Px=function(){this.ra.bind(v.Dg,
this.Nf,this,!0);this.ra.bind(h.Pd,this.Hj,this,!0)};a.prototype.zz=function(){this.ra.h(v.Dg,this.Nf,this,!0);this.ra.h(h.Pd,this.Hj,this,!0)};var B=new THREE.Quaternion,H=new THREE.Matrix4;return a});
define("tdv/player/view/panorama/renderer/object/Popup","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/3d/util/Util tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/SolidFrame tdv/player/view/panorama/renderer/object/CustomPlane tdv/player/view/panorama/renderer/object/ImagePlane tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/util/ColorPicker tdv/player/view/util/geo/Fov tdv/view/core/UIComponent tdv/view/events/ProgressEvent tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/av/VideoPlayer".split(" "),function(a){function m(C){setTimeout(C,
0)}function h(C,B){for(C-=B;C>180;)C-=360;for(;C<-180;)C+=360;return C+B}var n=a("tdv/utils"),g=a("tdv/binding/BindingsHandler"),k=a("tdv/constants/EventName"),e=a("tdv/constants/PlaybackState");a("tdv/player/view/panorama/renderer/3d/util/Util");var b=a("tdv/player/view/panorama/renderer/object/Base"),c=a("tdv/player/view/panorama/renderer/object/SolidFrame"),d=a("tdv/player/view/panorama/renderer/object/CustomPlane"),f=a("tdv/player/view/panorama/renderer/object/ImagePlane"),l=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),
p=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"),q=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),r=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),t=a("tdv/player/view/util/ColorPicker"),u=a("tdv/player/view/util/geo/Fov"),v=a("tdv/view/core/UIComponent"),w=a("tdv/view/events/ProgressEvent"),x=a("tdv/view/util/Ease"),y=a("tdv/view/util/EaseDimension"),z=a("tdv/view/av/VideoPlayer"),A=Math.PI/180;a=n.extend(b,function(C){b.call(this);
this.C=C;this.Rl.push(this.C);this.Qg=this.Qg.bind(this);this.I3=this.I3.bind(this);this.Zr(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","Popup");this.set("inVR",!1);this.set("enabledInStandard",!0);this.set("interactionEnabled",!0);this.set("loadingActive",!1);this.set("frameEmpty",!0);this.set("state",e.ca);this.set("itemVisible","none");this.set("visible",!1);this.set("visiblePosition",0);this.set("alpha",0);this.set("over",!1);this.set("gazeOver",!1);this.set("video",
null);this.set("image",null);this.set("actualVisible",!1);this.ae=this.Lb=this.lb=this.xe=this.qg=null;this.Ib=new p;this.Xx=this.LC=this.En=this.Th=this.ra=null});a.prototype.hc=function(){this.qg=(new q(k.ia)).ko(this.IH.bind(this));this.xe=(new q(k.yc)).lr(this.MH.bind(this));b.prototype.hc.call(this);this.LZa();this.appendChild(this.ae);g.ba(this.C,D,this.Qg,!0);g.KD(this.C,F,this.I3,!0)};var D="playbackPositions popupDistance popupMaxHeight popupMaxWidth image.levels.url video state".split(" "),
F=["visible"];a.prototype.mc=function(){this.qg.dispose();this.xe.dispose();g.da(this.C,D,this.Qg);g.da(this.C,F,this.I3);this.MG();this.zC();this.Yu();b.prototype.mc.call(this)};a.prototype.Qg=function(){var C=r.Kfb(this.C,this.get("panoramaPixelsPerDegree"));this.set("imageURL",C&&C.get("url"));this.set("imageWidth",C&&C.get("width"));this.set("imageHeight",C&&C.get("height"));this.set("video",this.C.get("video"));this.set("state",this.C.get("state"));this.set("popupDistance",this.C.get("popupDistance"));
this.set("popupMaxWidth",this.C.get("popupMaxWidth"));this.set("popupMaxHeight",this.C.get("popupMaxHeight"));this.set("playbackPositions",this.C.get("playbackPositions"))};a.prototype.I3=function(){this.set("visible",this.C.get("visible"))};a.prototype.za=function(C){this.pD=C.Xa;this.oD=C.pitch;this.et(C);this.Jab();this.gW(C);this.ye(C);this.vab(C);this.eab(C);b.prototype.za.call(this,C)};a.prototype.Jab=function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),
this.Ib.XE(this.get("currentTime")),this.set("sourceYaw",this.Ib.get("yaw")),this.set("sourcePitch",this.Ib.get("pitch")),this.set("sourceRotationX",this.Ib.get("rotationX")),this.set("sourceRotationY",this.Ib.get("rotationY")),this.set("sourceRotationZ",this.Ib.get("rotationZ")),this.set("sourceHFOV",this.Ib.get("hfov")))};a.prototype.et=function(){if(this.W("video","imageURL")){var C=[this.ae];this.W("imageURL")&&(this.IR(),this.lb&&C.push(this.lb),this.$U("itemVisible"));this.W("video")&&(this.KR(),
this.Lb&&C.push(this.Lb),this.$U("itemVisible"));this.qg.hg(C);this.xe.hg(C);this.bi(C)}};a.prototype.gW=function(){if(this.ra){var C=this.ra.E7();this.set("frameEmpty",!!C&&C.isEmpty());!this.Th||C&&!this.Th.isEqual(C)?(this.Th=C,this.Lb.set("source",this.Th.Zu),this.Lb.set("sourceUpdated",!0),this.Na()):this.ra.getState()==e.PLAYING&&this.Na()}else this.set("frameEmpty",!1)};a.prototype.ye=function(C){this.set("inVR",C.Va);this.set("hotspotsEnabled",C.DJ);this.set("rendererYaw",C.Xa);this.set("rendererPitch",
C.pitch);this.set("rendererRoll",C.Mg);this.set("rendererWidth",C.Sj);this.set("rendererHeight",C.Rj);this.set("rendererHFOV",C.Wd);if(this.W("visible")){var B=this.get("visiblePosition"),H=this.get("visible")?1:0,E=Math.max(1,this.C.get(this.get("visible")?"showDuration":"hideDuration")*Math.abs(H-B)),G=this.C.get(this.get("visible")?"showEasing":"hideEasing");B!=H&&(this.En=new x(G,[new y("position",B,H)],E));this.get("visible")||(this.set("actualVisible",!1),this.ra&&this.ra.Zc(e.ca))}this.En&&
(this.En.Ve()?(this.En=null,this.get("visible")?(this.set("actualVisible",!0),this.C.o(k.UQ),this.C.get("autoplay")&&this.ra&&this.ra.Zc(e.PLAYING)):m(function(){this.C&&this.C.o(k.$K)}.bind(this))):this.En.Nb(C.zf),this.En&&(this.set("visiblePosition",this.En.ob("position")),this.Na()));B=!1;if(B=C.Va?this.W("visible","itemVisible"):this.W("rendererYaw","rendererPitch","rendererRoll","rendererWidth","rendererHeight","rendererHFOV","itemVisible","popupMaxWidth","popupMaxHeight","sourceHFOV"))this.set("targetImageScale",
this.mza(this.lb,C)),this.set("targetVideoScale",this.mza(this.Lb,C)),this.set("targetYaw",h(this.get("rendererYaw"),this.get("sourceYaw"))),this.set("targetPitch",this.get("rendererPitch")),this.set("targetRotationZ",h(C.Va?0:this.get("rendererRoll"),this.get("sourceRotationZ")));if(B||this.W("visiblePosition","targetScale","targetYaw","targetPitch","targetRoll","popupDistance","hfov")){H=this.get("visiblePosition");var N=this.get("targetYaw")*H+this.get("sourceYaw")*(1-H),O=this.get("targetPitch")*
H+this.get("sourcePitch")*(1-H),R=this.get("sourceRotationX")*(1-H),Q=this.get("sourceRotationY")*(1-H),K=this.get("targetRotationZ")*H+this.get("sourceRotationZ")*(1-H);C=Math.min(1,2*H);var L=this.get("popupDistance"),U=this.get("sourceHFOV");B=this.get("targetImageScale")*H+(1-H);H=this.get("targetVideoScale")*H+(1-H);this.set("alpha",C);this.lb&&this.lb.set("scale",B);this.Lb&&this.Lb.set("scale",H);[].concat(this.Lb?[this.Lb]:[],this.lb?[this.lb]:[]).forEach(function(T){T.set("yaw",N);T.set("pitch",
O);T.set("rotationX",R);T.set("rotationY",Q);T.set("rotationZ",K);T.set("distance",L);T.set("hfov",U)})}};a.prototype.vab=function(C){if(this.W("frameEmpty","state","imageURL","video")){var B="none";!this.Lb||this.lb&&(this.get("frameEmpty")||this.get("state")==e.ca)?this.lb&&(B="image"):B="video";this.set("itemVisible",B)}if(this.W("itemVisible")){this.get("itemVisible")!="video"&&this.ra&&this.ra.Zc(e.ca);B=this.lb?this.lb.get("alpha"):0;var H=this.Lb?this.Lb.get("alpha"):0,E=this.get("itemVisible")==
"image"?1:0,G=this.get("itemVisible")=="video"?1:0,N=this.get("itemVisible")=="video"?1:Math.max(Math.abs(E-B),Math.abs(G-H))*200;this.LC=new x("linear",[new y("imageAlpha",B,E),new y("videoAlpha",H,G)],N)}this.LC&&(this.LC.Ve()?this.LC=null:this.LC.Nb(C.zf),this.LC&&(this.lb&&this.lb.set("alpha",this.LC.ob("imageAlpha")),this.Lb&&this.Lb.set("alpha",this.LC.ob("videoAlpha")),this.Na()))};a.prototype.eab=function(C){this.W("gazeOver","inVR","visible","actualVisible")&&(this.Jwa(),this.get("inVR")&&
this.C.get("lookAwayToHide")&&!this.get("gazeOver")&&this.get("actualVisible")&&this.H9a());C.Va&&this.C.get("darkenBackground")&&this.C.get("lookAwayToHide")?(this.W("visible")&&this.get("visible")&&(this.ae.set("alpha",.8),this.Xx=null),this.W("gazeOver")&&(this.Xx=new x(this.get("gazeOver")?"linear":"quad_in",[new y("alpha",this.ae.get("alpha"),this.get("gazeOver")?.8:0)],this.get("gazeOver")?300:this.C.get("lookAwayToHideTime")))):(this.Xx=null,this.ae.set("alpha",C.Va&&this.C.get("darkenBackground")?
.8:0));this.Xx&&(this.Xx.Ve()?this.Xx=null:this.Xx.Nb(C.zf),this.Xx&&(this.ae.set("alpha",this.Xx.ob("alpha")),this.Na()))};a.prototype.H9a=function(){this.Jwa();this.q2=setTimeout(function(){this.q2=null;this.C.set("visible",!1)}.bind(this),this.C.get("lookAwayToHideTime"))};a.prototype.Jwa=function(){this.q2&&(clearTimeout(this.q2),this.q2=null)};a.prototype.mza=function(C,B){if(!C)return 1;var H=this.get("popupMaxWidth","100%"),E=v.Cp(H),G=C.get("contentWidth"),N=C.get("contentHeight"),O=this.get("popupMaxHeight",
"100%"),R=v.Cp(O);if(this.get("inVR")){var Q=C=this.get("rendererWidth")*.5,K=Math.min(B.kj,80);B=u.hJ(K,C,Q);var L=this.get("sourceHFOV");H=Math.min(Math.tan(B*(E!==void 0?E/100:H/C)*.5*A)/Math.tan(L*.5*A),Math.tan(K*(R!==void 0?R/100:O/Q)*.5*A)/Math.tan(u.hJ(L,G,N)*.5*A))}else C=this.get("rendererWidth"),Q=this.get("rendererHeight"),H=G*Math.min((E!==void 0?C*E/100:H)/G,(R!==void 0?Q*R/100:O)/N),B=this.get("rendererHFOV"),L=this.get("sourceHFOV"),H=Math.tan(B*.5*A)*H/C/Math.tan(L*.5*A);return H};
a.prototype.IR=function(){this.MG();this.get("imageURL")&&(this.lb=new f,this.lb.set("url",this.get("imageURL")),this.lb.set("contentWidth",this.get("imageWidth")),this.lb.set("contentHeight",this.get("imageHeight")),this.lb.set("alpha",0))};a.prototype.MG=function(){this.lb&&(this.lb.remove(),this.lb=null)};a.prototype.KR=function(){this.zC();if(this.get("video")){this.Lb=new d;var C=z.yk(this.get("video"));this.Lb.set("contentWidth",C.get("width"));this.Lb.set("contentHeight",C.get("height"));this.Lb.set("alpha",
0);this.Lb.set("sourceIsVideo",!0);this.ra=new z(this.La.dr(),this.get("video"));this.Ua=new l(this.La.dr(),this.C,this.ra);this.Px()}};a.prototype.zC=function(){this.Lb&&(this.zz(),this.Ua.clear(),this.Ua=null,this.ra.clear(),this.Th=this.ra=null,this.Lb.remove(),this.Lb=null)};a.prototype.LZa=function(){this.Yu();this.ae=new c("#000000")};a.prototype.Yu=function(){this.ae&&(this.ae.remove(),this.ae=null)};a.prototype.IH=function(){this.o(k.vd);this.o(k.ia)};a.prototype.MH=function(C,B){var H=0;
B.jw(function(E){var G=0,N;this.qg.Nn(E)?G=100:(N=this.xe.Nn(E))&&(G=N.percent);H+=G}.bind(this));this.o(new w(k.yc,H/B.zd.length))};a.prototype.Hj=function(){this.Na()};a.prototype.Nf=function(){this.Na()};a.prototype.dD=function(){this.C.o(k.Tb)};a.prototype.Px=function(){this.ra.bind(z.Dg,this.Nf,this,!0);this.ra.bind(k.Pd,this.Hj,this,!0);this.ra.bind(k.Tb,this.dD,this,!0)};a.prototype.zz=function(){this.ra.h(z.Dg,this.Nf,this,!0);this.ra.h(k.Pd,this.Hj,this,!0);this.ra.h(k.Tb,this.dD,this,!0)};
a.prototype.ao=function(C){C.$f==k.Jm?(!C.om()&&this.get("visible")?(C.cu(this.C),this.set("over",this.$s(C)),this.set("gazeOver",this.n$a(C))):this.set("over",!1),this.get("over")&&(C.LD(this.C),C.zw()&&C.UI(this.C),C.lm(this.get("popupDistance"))),this.W("over")&&(this.C.o(this.get("over")?k.uc:k.Eb),C.zw()&&this.C.o(this.get("over")?k.SF:k.Pr))):C.$f==k.Xf&&!C.om()&&this.get("visible")&&(C.cu(this.C),C.lm(this.get("popupDistance")),this.$s(C)?C.nhb()||this.C.o(k.ma):this.C.set("visible",!1))};
a.prototype.$s=function(C){return this.YFa(C.Ps)};a.prototype.n$a=function(C){C=C.bP();return!!C&&this.YFa([C])};a.prototype.YFa=function(C){if(this.get("visible")){C=(this.get("itemVisible")=="video"?this.Lb:this.lb).Fy(C);for(var B=0;B<C.length;B++){var H=C[B];if(t.$w(H.source,H.x,H.y))return!0}}return!1};return a});
define("tdv/player/view/panorama/renderer/object/ComposedObject",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Base"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/Base");a=m.extend(h,function(){h.call(this);this.pC&&this.pC();this.iq&&this.iq()});a.prototype.hc=function(){h.prototype.hc.call(this);this.Aq&&this.Aq();this.mN&&this.mN()};a.prototype.mc=function(){this.Cq&&this.Cq();this.oN&&this.oN();h.prototype.mc.call(this)};a.prototype.za=function(n){this.cg&&
this.cg(n);h.prototype.za.call(this,n);this.Sq&&this.Sq(n)};return a});
define("tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{pC:function(){this.set("beamEnabled",!1);this.Cd=!1;this.oD=this.pD=void 0},Sq:function(h){this.pD=h.Xa;this.oD=h.pitch},ao:function(h){if(h.$f==m.Jm){var n=!h.om()&&this.$s(h);if(n){h.LD(this.C);this.C.get("useHandCursor")&&h.UI(this.C);h.lm(this.get("distance"));var g=this.jc(h.KJ());g&&h.y6(g,this.BD(h.KJ()))}this.Cd!=n&&
(this.Cd=n,this.C.o(this.Cd?m.uc:m.Eb),h.zw()&&this.C.o(this.Cd?m.SF:m.Pr))}else h.$f==m.Xf&&!h.om()&&this.$s(h)&&(this.C.gP(m.ma,!0).length>1&&h.cu(this.C),h.lm(this.get("distance")),this.C.o(m.ma))},$s:function(h){return this.get("beamEnabled")&&this.Yfa().Fy(h.Ps).length>0?!0:!1},jc:function(h){return!h||this.C.get("displayTooltipInTouchScreens")&&this.La.P.get("displayTooltipInTouchScreens")!==!1?this.C.get("toolTip",""):""},BD:function(h){if(h){h=this.get("yaw")-this.pD;var n=this.get("pitch")-
this.oD;return Math.sqrt(h*h+n*n)}return 0}}});
define("tdv/player/view/panorama/renderer/object/FrameHotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/object/ComposedObject tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),
n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/object/ComposedObject"),k=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),e=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),b=a("tdv/player/view/panorama/renderer/object/util/LevelUtil");a=a("tdv/player/view/panorama/renderer/object/pointer/FrameHotspotPointerMixin");m=m.extend(g,a,k,function(c){g.call(this);this.C=c;this.mH=this.ufa=this.tga=null;this.Rl.push(this.C);this.Qg=this.Qg.bind(this);
this.Zr(["loadingActive","panoramaPixelsPerDegree"]);this.set("tag","FrameHotspot");this.set("enabled",!0);this.set("inVR",!1);this.set("inScreenshot",!1);this.set("overlaysEnabled",!0);this.set("interactionEnabled",!0);this.set("contentInteractive",!1);this.set("transparent",!1);this.set("centerOverDisplay",!1);this.set("loadingActive",!1);this.set("visible",!1);this.set("loaded",!1);this.set("inView",!1);this.set("frameHidden",!0);this.Hg=this.fv=this.xe=this.qg=null;this.oka(this.C)});m.prototype.hc=
function(){this.qg=(new e(n.ia)).ko(this.IH.bind(this));this.xe=(new e(n.yc)).lr(this.MH.bind(this));this.UZa();g.prototype.hc.call(this);h.ba(this.C,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.Qg,!0);this.ofa()};m.prototype.mc=function(){this.pfa();this.qg.dispose();this.xe.dispose();h.da(this.C,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.Qg);this.yxa();
this.Axa();g.prototype.mc.call(this)};m.prototype.Qg=function(){this.set("url",this.C.get("url"));this.Hg.set("url",this.get("url"));this.set("image",this.C.get("image"));this.lb.set("image",this.get("image"));this.lb.set("level",this.get("image")&&b.gLa(this.C,this.get("panoramaPixelsPerDegree")));this.set("enabled",this.C.get("enabled"));this.set("fadeInDuration",this.C.get("fadeInDuration"));this.set("fadeOutDuration",this.C.get("fadeOutDuration"));this.set("interactionEnabled",this.C.get("interactionEnabled"));
this.set("contentInteractive",this.C.get("contentInteractive"));this.set("transparent",this.C.get("transparent"));this.Na()};m.prototype.za=function(c){this.set("loaded",!!this.Hg&&this.Hg.get("frameLoaded"));this.set("inVR",c.Va);this.set("inScreenshot",c.GJ);this.set("hotspotsEnabled",c.DJ);g.prototype.za.call(this,c);this.ye(c);this.Kla(c)};m.prototype.UZa=function(){this.IR();this.f_a();this.e_a();var c=[this.lb,this.fv,this.Hg];this.qg.hg(c);this.xe.hg(c);this.bi(c)};m.prototype.ye=function(){this.set("globalBlendingActiveCopy",
this.get("globalBlendingActive"));if(this.W("globalBlendingActive","globalBlendingActiveCopy","url","inVR","hotspotsEnabled","enabled","interactionEnabled","contentInteractive","composedTranslationX","composedTranslationY","composedTranslationZ")){var c=!(this.get("composedTranslationX")!=0||this.get("composedTranslationY")!=0||this.get("composedTranslationZ")!=0)&&this.get("globalBlendingActive")==0&&this.get("hotspotsEnabled")&&this.get("enabled")&&!this.get("inVR")&&!!this.get("url");this.set("visible",
c);this.set("beamEnabled",c&&this.get("interactionEnabled"));this.Hg.set("contentInteractive",c&&this.get("interactionEnabled")&&this.get("contentInteractive"))}this.set("frameHidden",!this.Hg.get("geometryVisible"));this.W("visible","loaded","frameHidden","transparent","inScreenshot")&&(this.get("visible")||this.set("loaded",!1),this.lb.set("alpha",!this.get("visible")||!this.get("frameHidden")&&this.get("loaded")?0:1),this.lb.set("alpha",1),this.fv.set("alpha",!this.get("visible")||this.get("frameHidden")||
!this.get("loaded")||this.get("transparent")||this.get("inScreenshot")?0:1),this.Hg.set("alpha",this.get("visible")?1:0),this.Hg.set("transparent",this.get("transparent")),this.set("inView",this.get("visible")&&(this.get("loaded")||this.get("image"))),this.Na());this.W("inView")&&this.C.o(this.get("inView")?n.od:n.jd)};m.prototype.IR=function(){this.MG();this.lb=new this.mH;this.lb.set("image",this.get("image"));this.lb.set("level",this.get("image")&&b.gLa(this.C,this.get("panoramaPixelsPerDegree")));
this.lb.set("visible",!0);this.lb.set("alpha",0);this.set("imagePlane",this.lb)};m.prototype.MG=function(){this.lb&&(this.lb.remove(),this.lb=null,this.set("imagePlane",null))};m.prototype.e_a=function(){this.yxa();this.Hg=new this.ufa;this.Hg.bind(n.ia,this.jya,this,!0);this.Hg.set("url",this.get("url"));this.Hg.set("visible",!0);this.Hg.set("alpha",1);this.set("framePlane",this.Hg)};m.prototype.yxa=function(){this.Hg&&(this.Hg.h(n.ia,this.jya,this,!0),this.Hg.remove(),this.Hg=null,this.set("framePlane",
null))};m.prototype.f_a=function(){this.Axa();this.fv=new this.tga;this.fv.set("visible",!0);this.fv.set("alpha",1);this.set("holePlane",this.fv)};m.prototype.Axa=function(){this.fv&&(this.fv.remove(),this.fv=null,this.set("holePlane",null))};m.prototype.Yfa=function(){return this.fv};m.prototype.jya=function(){this.Na()};m.prototype.IH=function(){this.o(n.vd);this.o(n.ia)};m.prototype.MH=function(c,d){var f=0;d.jw(function(l){(l=d.Nn(l))&&(f+=l.percent)});this.o(new ProgressEvent(n.yc,f/d.zd.length))};
return m});
define("tdv/player/view/panorama/renderer/object/ComposedCSSObject",["require","tdv/utils","tdv/player/view/panorama/renderer/object/Base"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/Base");a=m.extend(h,function(){h.call(this);this.set("tag","ComposedCSSObject");this.set("transparent",!1);this.set("cssScene",null);this.set("cssSceneOver",null);this.set("cssObject",this.$da());this.ky&&this.ky();this.JG&&this.JG();this.pC&&this.pC();this.iq&&this.iq()});a.prototype.$da=
function(){var n=new THREE.CSS3DObject;n.matrixAutoUpdate=!1;return n};a.prototype.hc=function(){h.prototype.hc.call(this);this.Aq&&this.Aq();this.gT&&this.gT();this.mN&&this.mN()};a.prototype.mc=function(){this.LM&&this.LM();this.oN&&this.oN();this.Cq&&this.Cq();var n=this.get("cssObject");n&&n.parent&&n.parent.remove(n);this.set("cssScene",null);h.prototype.mc.call(this)};a.prototype.za=function(n){this.cg&&this.cg(n);h.prototype.za.call(this,n);this.set("cssScene",n.QW);this.set("cssSceneOver",
n.RW);if(this.W("transparent")){var g=this.get("cssObject");g&&g.parent&&g.parent.remove(g)}this.W("cssScene","cssSceneOver","transparent")&&(g=this.get("transparent")?n.RW:n.QW)&&g.add(this.get("cssObject"));this.Cn();this.Qj&&this.Qj(n);this.Wz&&this.Wz(n);this.LI()};a.prototype.Cn=function(){this.W("composedAlpha","meshGroup")&&this.aC()};a.prototype.aC=function(){this.get("cssObject").element.style.display=this.get("composedAlpha")>0?"block":"none"};a.prototype.LI=function(){this.W("index")&&
(this.get("cssObject").containerElement.style.zIndex=this.get("index"))};return a});
define("tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/util/geo/Vector"],function(a){var m=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),h=a("tdv/player/view/util/geo/Vector"),n=new THREE.Matrix4,g=Math.PI/180;return{ky:function(){this.set("vertices",void 0);this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.Bq=new THREE.Matrix4;this.Io=new THREE.Matrix4;this.xs=new THREE.Matrix4},
$da:function(){var k=new THREE.CSS3DQuad;k.matrixAutoUpdate=!1;return k},Wz:function(k){var e=!1;if(this.W("vertices","contentWidth","contentHeight")){var b=this.get("vertices");e=h.zt(b[0].get("yaw")*g,b[0].get("pitch")*g).normalize();var c=h.zt(b[1].get("yaw")*g,b[1].get("pitch")*g).normalize(),d=h.zt(b[2].get("yaw")*g,b[2].get("pitch")*g).normalize();b=h.zt(b[3].get("yaw")*g,b[3].get("pitch")*g).normalize();var f=this.get("cssObject");f.vertices[0].set(e.x,e.y,-e.z);f.vertices[1].set(c.x,c.y,-c.z);
f.vertices[2].set(d.x,d.y,-d.z);f.vertices[3].set(b.x,b.y,-b.z);f.contentWidth=this.get("contentWidth");f.contentHeight=this.get("contentHeight");e=!0}c=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*m.th,this.get("composedTranslationY")*.5*m.th,this.get("composedTranslationZ")*.5*m.th),c=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-k.Xa*g),this.ke.multiply(n.makeRotationX(-this.get("composedDeltaPitch")*
g)),this.ke.multiply(n.makeRotationY(this.get("composedDeltaYaw")*g)),this.ke.multiply(n.makeRotationY(k.Xa*g)),c=!0);if(c||this.W("meshGroup"))this.xs.copy(this.wi),this.xs.multiply(this.ke),this.get("cssObject").matrix.copy(this.xs),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",k.Xa);this.set("cameraPitch",k.pitch);this.set("cameraRoll",k.Mg);this.set("cameraHfov",k.Wd);this.set("cameraWidth",k.width);this.set("cameraHeight",k.height);k.camera&&(c||e||this.W("cameraYaw","cameraPitch",
"cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(k.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.W("geometryVisible")&&this.Vja())}}});
define("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin","require tdv/constants/Priority tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Vector".split(" "),function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),g=a("tdv/player/view/panorama/renderer/TextureLoader"),
k=a("tdv/player/view/util/geo/Vector"),e=new THREE.Matrix4,b=Math.PI/180;return{ky:function(){this.set("distance",void 0);this.set("vertices",void 0);this.Lh=null;this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.un=new THREE.Matrix4;this.Dj=new THREE.Matrix4},Wz:function(c){this.dbb(c);this.ft(c)},nM:function(){var c=this.get("meshGroup");return c?n.rm(c)[0]:null},hq:function(){this.Lh||(this.Lh=this.oC());return[0].map(function(c){var d=this.GR();c=n.create(this.Lh[c],d);g.fB(c,g.Nr);g.gB(c,
g.zu);g.oK(c,m.RQ);g.nZ(c,1);return c}.bind(this))},dbb:function(){if(this.W("vertices")){var c=this.get("meshGroup");if(c)return this.Lh&&this.Lh.forEach(function(d){h.dispose(d)}),this.Lh=this.oC(),n.rm(c).map(function(d,f){n.gra(d,this.Lh[f])}.bind(this))}},oC:function(){function c(w){return w==0||isNaN(w)||!isFinite(w)}var d=this.get("vertices")||[];if(d.length!=4)return[h.LJa(-1,1,1,1,1,1,1,-1,1,-1,-1,1)];var f=k.zt(d[0].get("yaw")*b,d[0].get("pitch")*b).normalize(),l=k.zt(d[1].get("yaw")*b,
d[1].get("pitch")*b).normalize(),p=k.zt(d[2].get("yaw")*b,d[2].get("pitch")*b).normalize();d=k.zt(d[3].get("yaw")*b,d[3].get("pitch")*b).normalize();var q=f.clone().b7(p),r=d.clone().b7(l),t=q.clone().b7(r).normalize();r=(f.y*2*t.x/f.x-2*t.y)/(-p.y+f.y*p.x/f.x);c(r)&&(r=(f.z*2*t.x/f.x-2*t.z)/(-p.z+f.z*p.x/f.x));c(r)&&(r=(f.z*2*t.y/f.y-2*t.z)/(-p.z+f.z*p.y/f.y));var u=(2*t.x-p.x*r)/f.x;c(u)&&(u=(2*t.y-p.y*r)/f.y);c(u)&&(u=(2*t.z-p.z*r)/f.z);q=(l.y*2*t.x/l.x-2*t.y)/(-d.y+l.y*d.x/l.x);c(q)&&(q=(l.z*
2*t.x/l.x-2*t.z)/(-d.z+l.z*d.x/l.x));c(q)&&(q=(l.z*2*t.y/l.y-2*t.z)/(-d.z+l.z*d.y/l.y));var v=(2*t.x-d.x*q)/l.x;c(v)&&(v=(2*t.y-d.y*q)/l.y);c(v)&&(v=(2*t.z-d.z*q)/l.z);f=f.dZ(u);l=l.dZ(v);p=p.dZ(r);d=d.dZ(q);return[h.LJa(f.x,f.y,-f.z,l.x,l.y,-l.z,p.x,p.y,-p.z,d.x,d.y,-d.z)]},ft:function(c){var d=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*h.th,this.get("composedTranslationY")*.5*h.th,this.get("composedTranslationZ")*
.5*h.th),d=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-c.Xa*b),this.ke.multiply(e.makeRotationX(-this.get("composedDeltaPitch")*b)),this.ke.multiply(e.makeRotationY(this.get("composedDeltaYaw")*b)),this.ke.multiply(e.makeRotationY(c.Xa*b)),d=!0);this.W("distance","composedTranslationX","composedTranslationY","composedTranslationZ")&&(c=this.Ia.get("composedTranslationX")==0&&this.Ia.get("composedTranslationY")==0&&this.Ia.get("composedTranslationZ")==
0&&this.get("distance")!==void 0?h.ow(this.get("distance")):h.Dt(),this.un.makeScale(c,c,c),d=!0);if(d||this.W("meshGroup"))this.Dj.copy(this.wi),this.Dj.multiply(this.ke),this.Dj.multiply(this.un),c=n.rm(this.get("meshGroup")),n.ot(c[0],this.Dj)}}});
define("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin",["require","tdv/constants/EventName"],function(a){var m=a("tdv/constants/EventName");return{JG: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.Md=null;this.C1=void 0;this.q6=this.q6.bind(this);this.r6=this.r6.bind(this);this.s6=this.s6.bind(this);this.lH=this.lH.bind(this);
this.zga=this.zga.bind(this)},Qj:function(){this.W("cssObject")&&(this.g_a(),this.get("cssObject").element.appendChild(this.Md));this.W("url")&&this.B8a(this.get("url"));this.W("contentWidth","contentHeight")&&(this.Md.style.width=this.get("contentWidth")+2+"px",this.Md.style.height=this.get("contentHeight")+2+"px");this.W("contentInteractive")&&(this.Md.style.pointerEvents=this.get("contentInteractive")?"auto":"none")},Cn:function(){this.W("composedAlpha")&&(this.get("composedAlpha")>0?this.Nc&&
!this.Nc.parentNode&&(this.NGa(),this.Md.appendChild(this.Nc)):this.Nc&&this.Nc.parentNode&&this.Md.removeChild(this.Nc))},gT:function(){this.o(m.vd);this.get("frameLoaded")&&this.o(m.ia)},LM:function(){this.qZa()},r6:function(h){h.preventDefault();h.stopImmediatePropagation()},q6:function(){this.La.dr().PE(null)},s6:function(h){h.preventDefault();h.stopImmediatePropagation()},lH:function(){this.set("frameLoaded",!0);this.o(m.ia)},zga:function(){this.D1=null;this.lH()},g_a:function(){this.Nc||(this.Md=
document.createElement("div"),this.Md.style.position="absolute",this.Md.style.left=this.Md.style.top="-1px",this.get("cssObject").isCSS3DObject&&(this.Md.style.transform="translate(-50%, -50%)"),this.Md.style.overflow="hidden",this.Md.style["-webkit-overflow-scrolling"]="touch",this.Md.addEventListener("mouseenter",this.q6,!0),this.Md.addEventListener("mousemove",this.r6,!0),this.Md.addEventListener("mousewheel",this.s6,!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.lH,!0),this.get("composedAlpha")>0&&this.Md.appendChild(this.Nc))},qZa:function(){this.Nc&&(this.Nc.src="",this.Oja(),this.nC(),this.Nc.parentNode&&this.Nc.parentNode.removeChild(this.Nc),this.Nc=null);this.Md&&(this.Md.parentNode&&this.Md.parentNode.removeChild(this.Md),this.Md.removeEventListener("mouseenter",this.q6,!0),this.Md.removeEventListener("mousemove",
this.r6,!0),this.Md.removeEventListener("mousewheel",this.s6,!0),this.Md=null)},B8a:function(h){this.C1!==h&&(this.C1=h,this.set("frameLoaded",!1),this.NGa())},NGa:function(){this.C1?(this.G8a(),this.jXa(),this.Nc.src=this.C1):(this.nC(),this.Oja(),this.Nc.src="",this.lH())},G8a:function(){this.nC();this.D1=setTimeout(this.zga,3E3)},nC:function(){this.D1&&(clearTimeout(this.D1),this.D1=null)},jXa:function(){this.Oja();this.Nc.addEventListener("load",this.lH,!0)},Oja:function(){this.Nc.removeEventListener("load",
this.lH,!0)}}});
define("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin",["require","tdv/player/view/panorama/renderer/3d/util/MeshUtil","tdv/constants/EventName"],function(a){var m=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),h=a("tdv/constants/EventName");return{JG:function(){this.get("materialConfig").params.blending=THREE.NoBlending},gT:function(){this.o(h.vd);this.o(h.ia)},Cn:function(){this.W("meshGroup","composedAlpha")&&m.nf(this.get("meshGroup"),this.get("composedAlpha")>0?
.001:0)}}});
define("tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,["playbackPositions","width","height"],
this.ue,!0)},Cq:function(){m.da(this.C,["playbackPositions","width","height"],this.ue)},ue:function(){this.set("playbackPositions",this.C.get("playbackPositions"));this.set("contentWidth",this.C.get("width"));this.set("contentHeight",this.C.get("height"))},cg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("vertices",this.Ib.Aoa()));this.W("framePlane","holePlane","imagePlane","vertices")&&this.Cb().forEach(function(n){n.set("vertices",
this.get("vertices"));n.set("contentWidth",this.get("contentWidth"));n.set("contentHeight",this.get("contentHeight"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/QuadFrameHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/FrameHotspot tdv/player/view/panorama/renderer/object/ComposedCSSObject tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/FrameHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedCSSObject"),g=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),k=a("tdv/player/view/panorama/renderer/object/geometry/CSSQuadGeometryMixin"),e=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),
d=a("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/QuadFrameHotspotPositionMixin");var f=m.extend(g,e,c,function(){g.call(this);this.set("tag","QuadFrameHotspotImage")}),l=m.extend(n,k,b,function(){n.call(this);this.set("tag","QuadFrameHotspotFrame")}),p=m.extend(g,e,d,function(){g.call(this);this.set("tag","QuadFrameHotspotHole")});return m.extend(h,a,function(q){h.call(this,q);this.mH=f;this.ufa=l;this.tga=p})});
define("tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,["vertices",
"distance","playbackPositions"],this.ue,!0)},Cq:function(){m.da(this.C,["vertices","distance","playbackPositions"],this.ue)},ue:function(){this.set("distance",this.C.get("distance"));this.set("vertices",this.C.get("vertices"));this.set("playbackPositions",this.C.get("playbackPositions"))},cg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("vertices",this.Ib.Aoa()),this.set("alpha",this.Ib.nw()))}}});
define("tdv/player/view/panorama/renderer/object/QuadHotspotImage","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin tdv/player/view/panorama/renderer/object/util/LevelUtil".split(" "),
function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),e=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/pointer/HotspotPointerMixin"),d=a("tdv/player/view/panorama/renderer/object/position/QuadHotspotImagePositionMixin"),
f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=0;a=m.extend(k,e,d,b,c,function(p){k.call(this);this.set("tag","QuadHotspotImage");this.set("id","quad_hs_image_"+l++);this.set("side",THREE.DoubleSide);this.C=p;this.Rl.push(this.C);this.Rg=this.Rg.bind(this)});a.prototype.hc=function(){k.prototype.hc.call(this);h.ba(this.C,["image.levels"],this.Rg,!0)};a.prototype.mc=function(){h.da(this.C,["image.levels"],this.Rg);k.prototype.mc.call(this)};a.prototype.Rg=function(){this.set("image",
this.C.get("image"));this.set("level",f.Nfb(this.C))};a.prototype.za=function(p){this.GI();k.prototype.za.call(this,p);this.W("inView")&&this.C.o(this.get("inView")?n.od:n.jd)};a.prototype.GI=function(){if(this.W("meshGroup","panoramaId","id")){var p=this.get("meshGroup");p&&p.children.forEach(function(q){g.setAttribute(q,g.oF,this.get("panoramaId"));g.setAttribute(q,g.Eaa,this.get("id"))}.bind(this))}};return a});
define("tdv/player/view/panorama/renderer/object/control/VideoAutoplayController",["require","tdv/constants/EventName","tdv/constants/PlaybackState"],function(a){function m(k,e){this.Ie=k;this.Vd=e;this.Ld=!1;this.Q3=!0;this.nda=this.Sia=!1;this.Pca();this.cia()}var h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState");m.prototype.clear=function(){this.kCa();this.Lja()};m.prototype.ig=function(k){this.Ld!=k&&(this.Ld=k,this.Sv())};m.prototype.elb=function(k){this.Q3!=k&&((this.Q3=k)&&
this.kCa(),this.Sv())};m.prototype.Sv=function(){if(!this.Ld||this.Q3)this.Vd.set("state",n.ca);else if(this.Vd.get("autoplay")||this.nda)this.nda=!1,this.Vd.set("state",n.PLAYING)};m.prototype.cia=function(){if(!this.Sia){var k=this.Vd.get("video").get("autoplayTime");k!==void 0&&this.Vd.get("video").get("autoplayTimeLimit")<(new Date).getTime()&&(k=void 0);this.Vd.set("currentTime",k);this.nda=k!==void 0}};m.prototype.kCa=function(){this.Sia||(this.Sia=!0,this.Vd.get("state")==n.PLAYING?(this.Vd.get("video").set("autoplayTimeLimit",
(new Date).getTime()+g),this.Vd.get("video").set("autoplayTime",this.Vd.get("currentTime",0))):this.Vd.get("video").set("autoplayTime",void 0))};m.prototype.Pca=function(){this.Vd.get("video").bind(h.L("autoplayTime"),this.cia,this,!0)};m.prototype.Lja=function(){this.Vd.get("video").h(h.L("autoplayTime"),this.cia,this,!0)};var g=1E3;return m});
define("tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin",["require","tdv/constants/EventName","tdv/player/view/util/ColorPicker"],function(a){var m=a("tdv/constants/EventName"),h=a("tdv/player/view/util/ColorPicker");return{pC:function(){this.set("beamEnabled",!1);this.Cd=!1;this.oD=this.pD=void 0},Sq:function(n){this.pD=n.Xa;this.oD=n.pitch},ao:function(n){if(n.$f==m.Jm){var g=!n.om()&&this.$s(n)&&!this.get("blendingActive");if(g){n.LD(this.C);this.C.get("useHandCursor")&&
n.UI(this.C);n.lm(this.get("distance"));var k=this.jc(n.KJ());k&&n.y6(k,this.BD(n.KJ()))}this.Cd!=g&&(this.Cd=g,this.C.o(this.Cd?m.uc:m.Eb),n.zw()&&this.C.o(this.Cd?m.SF:m.Pr))}else n.$f==m.Xf&&!n.om()&&this.$s(n)&&(this.C.gP(m.ma,!0).length>1&&n.cu(this.C),n.lm(this.get("distance")),this.C.o(m.ma))},$s:function(n){if(this.get("beamEnabled")){n=this.Yfa().Fy(n.Ps);for(var g=0;g<n.length;g++){var k=n[g];if(h.$w(k.source,k.x,k.y))return!0}}return!1},jc:function(n){return!n||this.C.get("displayTooltipInTouchScreens")&&
this.La.P.get("displayTooltipInTouchScreens")!==!1?this.C.get("toolTip",""):""},BD:function(n){if(n){n=this.get("yaw")-this.pD;var g=this.get("pitch")-this.oD;return Math.sqrt(n*n+g*g)}return 0}}});
define("tdv/player/view/panorama/renderer/object/VideoHotspot","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/PlaybackState tdv/view/av/VideoPlayer tdv/player/view/panorama/renderer/object/ComposedObject tdv/player/view/panorama/renderer/object/control/VideoAutoplayController tdv/player/view/panorama/renderer/object/overlay/FocusedMixin tdv/player/view/panorama/renderer/object/util/EventAggregator tdv/player/view/panorama/renderer/object/util/LevelUtil tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin tdv/view/events/ProgressEvent tdv/view/util/Ease tdv/view/util/EaseDimension tdv/player/view/util/XR tdv/player/view/util/xr/pointer/PointerState".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/PlaybackState"),k=a("tdv/view/av/VideoPlayer"),e=a("tdv/player/view/panorama/renderer/object/ComposedObject"),b=a("tdv/player/view/panorama/renderer/object/control/VideoAutoplayController"),c=a("tdv/player/view/panorama/renderer/object/overlay/FocusedMixin"),d=a("tdv/player/view/panorama/renderer/object/util/EventAggregator"),f=a("tdv/player/view/panorama/renderer/object/util/LevelUtil"),l=a("tdv/player/view/panorama/renderer/object/pointer/VideoHotspotPointerMixin"),
p=a("tdv/view/events/ProgressEvent"),q=a("tdv/view/util/Ease"),r=a("tdv/view/util/EaseDimension"),t=a("tdv/player/view/util/XR"),u=a("tdv/player/view/util/xr/pointer/PointerState");a=m.extend(e,l,c,function(v){e.call(this);this.C=v;this.yma=this.mH=null;this.Rl.push(this.C);this.Qg=this.Qg.bind(this);this.Zr(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","VideoHotspot");this.set("enabled",!0);this.set("inVR",!1);this.set("overlaysEnabled",!0);this.set("enabledInVR",!0);
this.set("enabledInVRWithGazePointer",!0);this.set("enabledInStandard",!0);this.set("interactionEnabled",!0);this.set("centerOverDisplay",!1);this.set("loadingActive",!1);this.set("frameEmpty",!0);this.set("state",g.ca);this.set("itemVisible","none");this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.Lb=this.lb=this.xe=this.qg=null;this.zma=!1;this.$u=[];this.oka(this.C)});a.prototype.hc=function(){this.qg=(new d(n.ia)).ko(this.IH.bind(this));
this.xe=(new d(n.yc)).lr(this.MH.bind(this));this.Om=new b(this.La.dr(),this.C);e.prototype.hc.call(this);h.ba(this.C,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR enabledInVRWithGazePointer fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),this.Qg,!0);this.ofa()};a.prototype.mc=function(){this.pfa();this.Om.clear();this.qg.dispose();this.xe.dispose();h.da(this.C,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR enabledInVRWithGazePointer fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),
this.Qg);this.MG();this.zC();e.prototype.mc.call(this)};a.prototype.Qg=function(){this.set("image",this.C.get("image"));this.set("imageLevel",f.bgb(this.C,this.get("panoramaPixelsPerDegree")));this.set("video",this.C.get("video"));this.set("videoLevel",k.yk(this.get("video")));this.set("enabled",this.C.get("enabled"));this.set("directionalAudio",this.C.get("directionalAudio"));this.set("enabledInStandard",this.C.get("enabledInStandard"));this.set("enabledInVR",this.C.get("enabledInVR"));this.set("enabledInVRWithGazePointer",
this.C.get("enabledInVRWithGazePointer",this.C.get("enabledInVR")));this.set("fadeInDuration",this.C.get("fadeInDuration"));this.set("fadeOutDuration",this.C.get("fadeOutDuration"));this.set("interactionEnabled",this.C.get("interactionEnabled"));this.set("state",this.C.get("state"));this.set("videoVisibleOnStop",this.C.get("videoVisibleOnStop"));this.set("blending",this.C.get("blending"));this.set("chromaColor",this.C.get("chromaColor"));this.set("chromaThreshold",this.C.get("chromaThreshold"));this.set("chromaSmoothing",
this.C.get("chromaSmoothing"))};a.prototype.za=function(v){this.set("inVR",v.Va);this.set("hotspotsEnabled",v.DJ);this.set("inVRWithGazePointer",v.Va&&t.ud.length===1&&t.ud[0].type===u.WB);this.et();this.FD();e.prototype.za.call(this,v);this.Sv();this.gW(v);this.ye(v);this.Kla(v)};a.prototype.et=function(){if(this.W("video","videoLevel","image","imageLevel")){var v=[];this.W("image","imageLevel")&&(this.IR(),this.lb&&v.push(this.lb));this.W("video","videoLevel")&&(this.KR(),this.Lb&&v.push(this.Lb));
this.bi(v);this.qg.hg(v);this.xe.hg(v)}};a.prototype.FD=function(){this.W("video","videoLevel","image","imageLevel","blending","chromaColor","chromaThreshold","chromaSmoothing")&&this.Cb().forEach(function(v){v.set("blending",this.get("blending"));v.set("chromaColor",this.get("chromaColor"));v.set("chromaThreshold",this.get("chromaThreshold"));v.set("chromaSmoothing",this.get("chromaSmoothing"))}.bind(this))};a.prototype.Sv=function(){this.W("video","composedAlpha","enabledInVR","enabledInVRWithGazePointer",
"enabledInStandard","enabled","inVR")&&this.Om.ig(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.Om.elb(this.get("blendingActive"))};a.prototype.gW=function(){this.set("frameEmpty",!this.Lb||!this.Lb.get("hasStableContent"))};a.prototype.ye=function(v){var w=this.get("itemVisible");
if(this.W("frameEmpty","state","image","video","inVR","hotspotsEnabled","enabledInVR","enabledInVRWithGazePointer","enabledInStandard","enabled","interactionEnabled")){var x="none";!this.get("hotspotsEnabled")||!this.get("enabled")||this.get("inVR")&&!this.get("enabledInVR")||this.get("inVRWithGazePointer")&&!this.get("enabledInVRWithGazePointer")||!this.get("inVR")&&!this.get("enabledInStandard")||(this.Lb&&(!this.lb||!this.get("frameEmpty")&&(this.get("state")!=g.ca||this.zma&&this.get("videoVisibleOnStop")))?
x="video":this.lb&&(x="image"),this.get("state")!=g.ca&&(this.zma=!0));this.set("itemVisible",x);this.set("beamEnabled",x!="none"&&this.get("interactionEnabled"))}if(this.W("itemVisible")){x=this.get("itemVisible")!="none";var y=w!="none";if(x&&y&&!this.get("chromaColor")&&this.$u.length==0)this.lb&&this.lb.set("alpha",this.get("itemVisible")=="image"?1:0),this.Lb&&this.Lb.set("alpha",this.get("itemVisible")=="video"?1:0);else{w=x==y?50:x?this.get("fadeInDuration"):this.get("fadeOutDuration");x!=
y&&this.C.o(x?n.od:n.jd);y=this.lb?this.lb.get("alpha"):0;var z=this.Lb?this.Lb.get("alpha"):0;x=[{video:z,image:y}];this.get("itemVisible")=="video"?(x.push({video:1,image:y,time:w*(1-z)}),x.push({video:1,image:0,time:50*(y-0)})):this.get("itemVisible")=="image"?(x.push({video:z,image:1,time:w*(1-y)}),x.push({video:0,image:1,time:50*(z-0)})):x.push({video:0,image:0,time:Math.max(z,y,1/w)*w});this.$u=[];for(w=1;w<x.length;w++)x[w].time>0&&this.$u.push(new q("linear",[new r("imageAlpha",x[w-1].image,
x[w].image),new r("videoAlpha",x[w-1].video,x[w].video)],x[w].time))}}this.$u.length>0&&(this.$u[0].Ve()?this.$u.shift():this.$u[0].Nb(v.zf),this.$u.length>0&&(this.lb&&this.lb.set("alpha",this.$u[0].ob("imageAlpha")),this.Lb&&this.Lb.set("alpha",this.$u[0].ob("videoAlpha")),this.Na()))};a.prototype.IR=function(){this.MG();this.get("image")&&this.get("imageLevel")&&(this.lb=new this.mH,this.lb.set("image",this.get("image")),this.lb.set("level",this.get("imageLevel")),this.lb.set("isVideoTexture",
!0),this.lb.set("visible",!0),this.lb.set("alpha",0),this.lb.set("side",THREE.DoubleSide))};a.prototype.MG=function(){this.lb&&(this.lb.remove(),this.lb=null)};a.prototype.KR=function(){this.zC();this.get("video")&&this.get("videoLevel")&&(this.Lb=new this.yma,this.Lb.set("scriptObject",this.C),this.Lb.set("video",this.get("video")),this.Lb.set("level",this.get("videoLevel")),this.Lb.set("visible",!0),this.Lb.set("alpha",0),this.Lb.set("side",THREE.DoubleSide))};a.prototype.zC=function(){this.Lb&&
(this.Lb.remove(),this.Lb=null)};a.prototype.IH=function(){this.o(n.vd);this.o(n.ia)};a.prototype.MH=function(v,w){var x=0;w.jw(function(y){(y=w.Nn(y))&&(x+=y.percent)});this.o(new p(n.yc,x/w.zd.length))};a.prototype.Yfa=function(){return this.get("itemVisible")=="video"?this.Lb:this.lb};return a});
define("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin","require tdv/constants/EventName tdv/constants/PlaybackState tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/control/CueController tdv/player/view/panorama/renderer/object/control/VideoPlaybackController tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/util/geo/Quaternion tdv/view/av/SubtitleController tdv/view/av/VideoPlayer".split(" "),function(a){var m=
a("tdv/constants/EventName"),h=a("tdv/constants/PlaybackState"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/control/CueController"),e=a("tdv/player/view/panorama/renderer/object/control/VideoPlaybackController"),b=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),c=a("tdv/player/view/util/geo/Quaternion"),d=a("tdv/view/av/SubtitleController"),f=a("tdv/view/av/VideoPlayer"),
l=new THREE.Euler,p=new THREE.Quaternion,q=new THREE.Matrix4,r=new THREE.Matrix4,t=Math.PI/180;return{JG:function(){this.set("visible",!1);this.set("inView",!1);this.set("frameEmpty",!0);this.set("hasStableContent",!1);this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.set("scriptObject",null);this.set("video",null);this.set("level",null);this.set("loop",!1);this.set("side",void 0);this.hb=this.Lb=null;this.zma=!1;this.VN=this.Th=
this.xn=this.Ua=this.es=this.ra=null},LM:function(){this.zC()},Qj:function(u){this.ebb();this.FD();this.gW(u)},ebb:function(){this.W("scriptObject","video","level")&&(this.zC(),this.Lb=this.get("video"),this.hb=this.get("level"),this.C=this.get("scriptObject"),this.KR())},FD:function(){if(this.W("video","blending","chromaColor","chromaThreshold","chromaSmoothing","side")&&this.Lb){var u=new n.Rp(this.Lb.rl());u.QD=this.get("blending");u.bw=this.get("chromaColor");u.KW=this.get("chromaThreshold");
u.JW=this.get("chromaSmoothing");u.side=this.get("side");this.set("materialConfig",u)}},Cn:function(){this.W("visible","composedAlpha","image","state")&&this.set("inView",this.get("visible")&&this.get("composedAlpha")>0);this.W("composedAlpha","meshGroup","inView")&&g.nf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0)},gW:function(u){var v=!!this.Th&&this.Th.isEmpty(),w=this.ra&&this.ra.E7(),x=!!w&&w.isEmpty();x&&!v&&this.ra.getState()==h.PLAYING&&this.C.get("loop")&&(w=this.Th,
x=!1);this.set("frameEmpty",x);this.Nla();this.VN.lra(u.Ik>0);!this.Th||w&&!this.Th.isEqual(w)?(this.Th=w,(v=this.Th.Zu)&&v.tagName=="VIDEO"&&(v.width=this.get("contentWidth"),v.height=this.get("contentHeight")),this.VN.bo(v),this.VN.update(),this.Na()):this.ra.getState()==h.PLAYING&&this.Na();q.makeRotationFromQuaternion(c.hX(u.Xa,u.pitch,u.Mg,p));this.ra.bu(q)},Nla:function(){var u=this.ra.getCurrentTime(),v=this.ra.lj();this.get("frameEmpty")?this.set("hasStableContent",!1):u>this.$0+.1?this.set("hasStableContent",
!0):u==0&&this.nha>v-.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.W("frameEmpty")&&!this.get("frameEmpty")&&(this.$0=u);!this.get("frameEmpty")&&u>0&&(this.nha=u)},KR:function(){this.Lb&&this.hb&&this.C&&(this.set("textureSource",this.VN=new b),this.VN.$Y(!0),this.set("contentWidth",this.hb.get("width")),this.set("contentHeight",this.hb.get("height")),this.set("alpha",0),this.ra=new f(this.La.dr(),this.Lb,this.C.get("directionalAudio")),this.JXa(),this.ra.jkb(),this.es=
new k(this.C,this.ra),this.Ua=new e(this.La.dr(),this.C,this.ra),this.xn=new d(this.La.ld.get("panorama"),this.ra),this.Px(),this.o(m.vd),this.o(m.ia))},JXa:function(){var u=this.C.get("vertices")||[this.C];if(u.length!=0){var v=u[0].get("yaw",0);u[0].get("pitch",0);for(var w=0,x=0,y=0;y<u.length;y++){for(var z=u[y].get("yaw",0),A=u[y].get("pitch",0);z>v+180;)z-=360;for(;z<v-180;)z+=360;w+=z;x+=A}q.makeRotationFromEuler(l.set(x/u.length*t,-(w/u.length)*t,0,"YXZ"));q.multiply(r.makeTranslation(0,0,
-1));this.ra.Tw(q)}},zC:function(){this.ra&&(this.set("textureSource",this.VN=null),this.zz(),this.Ua.clear(),this.Ua=null,this.es.clear(),this.es=null,this.xn.clear(),this.xn=null,this.ra.clear(),this.Th=this.ra=null,this.set("frameEmpty",!0),this.set("hasStableContent",!1),this.hb=this.Lb=null)},Px:function(){this.ra.bind(f.Dg,this.Nf,this,!0);this.ra.bind(m.Pd,this.Hj,this,!0)},zz:function(){this.ra.h(f.Dg,this.Nf,this,!0);this.ra.h(m.Pd,this.Hj,this,!0)},Hj:function(){this.Na()},Nf:function(){this.Na()}}});
define("tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,["playbackPositions",
"distance"],this.ue,!0)},Cq:function(){m.da(this.C,["playbackPositions","distance"],this.ue)},ue:function(){this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},cg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("vertices",this.Ib.Aoa()),this.set("alpha",this.Ib.nw()));this.W("video","image","vertices","distance")&&this.Cb().forEach(function(n){n.set("vertices",
this.get("vertices"));n.set("distance",this.get("distance"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/QuadVideoHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/VideoHotspot tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/VideoHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),g=a("tdv/player/view/panorama/renderer/object/geometry/QuadGeometryMixin"),k=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),e=a("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/QuadVideoHotspotPositionMixin");var b=m.extend(n,g,k,function(){n.call(this);
this.set("tag","QuadVideoHotspotImage")}),c=m.extend(n,g,e,function(){n.call(this);this.set("tag","QuadVideoHotspotVideo")});return m.extend(h,a,function(d){h.call(this,d);this.mH=b;this.yma=c})});
define("tdv/player/view/panorama/renderer/object/Rain","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Color tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),k=a("tdv/player/view/util/Color"),e=a("tdv/player/view/util/Device");a=m.extend(g,
function(b){g.call(this);this.C=b;this.Tl=this.Tl.bind(this);this.Ul=this.Ul.bind(this);this.Co()});a.prototype.hc=function(){g.prototype.hc.call(this);this.C.set("state",this.C.get("startState"));h.ba(this.C,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),this.Tl,!0);h.ba(this.C,["state"],this.Ul,!0)};a.prototype.mc=function(){h.da(this.C,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),
this.Tl);h.da(this.C,["state"],this.Ul);this.C.set("state",n.ca);g.prototype.mc.call(this)};a.prototype.Tl=function(){this.Co();this.TU()};a.prototype.Ul=function(){this.l4=this.C.get("state");this.Na()};a.prototype.Co=function(){g.prototype.Co.call(this);if(e.kf()){this.VG=this.hv=4;this.YH=2400;this.WG=1200;var b=1.5;var c=1.6}else this.hv=2,this.VG=4,this.YH=4800,this.WG=2400,c=b=1;var d=this.C.get("intensity",.5);this.Ne=k.Dp(this.C.get("color","#ffffff"));this.uU=this.C.get("opacity",.25)*.24+
.01;this.uU*=2;this.iD=(d*(.37-.17)+.17)*b;b=(this.C.get("speed",.5)*(.09-.02)+.02)/this.iD*c;this.lT=b*.9;this.EH=b*1.1;this.YH=Math.round(this.C.get("particleCount",this.YH)*d);this.WG=Math.round(this.C.get("farPlaneParticleCount",this.WG)*d);this.I2=0;this.us=2;this.kv=-2;this.Iha=0;this.gR=.75;this.OR=.5;this.M1=this.C.get("initialState");this.p5=this.C.get("startDuration");this.w5=this.C.get("stopDuration");this.hv=this.C.get("maxDistance",this.hv);this.VG=this.C.get("farPlaneDistance",this.VG);
this.GD()};a.prototype.B0=function(){var b=new THREE.MeshBasicMaterial;b.color=new THREE.Color(this.Ne[0]/255,this.Ne[1]/255,this.Ne[2]/255);b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;this.Bfa||(this.Bfa=new THREE.BoxGeometry(.01,.2,.01));return new THREE.Mesh(this.Bfa,b)};a.prototype.GD=function(){var b=this.eh&&this.eh.children||[],c=new THREE.Color(this.Ne[0]/255,this.Ne[1]/255,this.Ne[2]/255);b.forEach(function(d){d.material.color=c;d.material.needsUpdate=!0})};return a});
define("tdv/player/view/panorama/renderer/object/Root","require tdv/utils tdv/util/Map tdv/constants/EventName tdv/events/Event tdv/player/view/panorama/renderer/object/Base".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/util/Map"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),k=a("tdv/player/view/panorama/renderer/object/Base"),e=m.extend(k,function(b,c,d,f){k.call(this);this.Ie=b;this.P=c;this.ld=d;this.j=f;this.zT=new h;this.wka(this);this.set("tag","Root");this.set("globalBlendingActive",
0)});e.prototype.dr=function(){return this.Ie};e.prototype.Jf=function(b){return this.zT.get(b)};e.prototype.all=function(){for(var b=[],c=[this];c.length>0;){var d=c.pop();b.push(d);for(var f=d.qe.length-1;f>=0;f--)c.push(d.qe[f])}return b};e.prototype.update=function(b){var c=this.all(),d=c.length,f;for(f=0;f<d;f++)c[f].vZa();for(f=0;f<d;f++)c[f].set("index",f);for(f=0;f<d;f++)c[f].La&&c[f].za(b);for(f=0;f<d;f++)c[f].mZa();if(this.J1){for(f=0;f<d;f++)c[f].rZa();this.update(b)}};e.prototype.Na=function(){this.ih||
this.o(new g(n.V));k.prototype.Na.call(this)};e.prototype.wA=function(b){return Array.isArray(b)?b.map(this.wA.bind(this)):this.zT.get(b)||e.zeb.create(b)};return e});
define("tdv/player/view/panorama/renderer/object/Snow","require tdv/utils tdv/binding/BindingsHandler tdv/constants/PlaybackState tdv/player/view/panorama/renderer/object/ParticleCylinders tdv/player/view/util/Device".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/view/panorama/renderer/object/ParticleCylinders"),k=a("tdv/player/view/util/Device");a=m.extend(g,function(b){g.call(this);this.C=b;this.Tl=this.Tl.bind(this);
this.Ul=this.Ul.bind(this);this.Co()});a.prototype.hc=function(){g.prototype.hc.call(this);this.C.set("state",this.C.get("startState"));h.ba(this.C,["intensity","speed"],this.Tl,!0);h.ba(this.C,["state"],this.Ul,!0)};a.prototype.mc=function(){h.da(this.C,["intensity","speed"],this.Tl);h.da(this.C,["state"],this.Ul);this.C.set("state",n.ca);g.prototype.mc.call(this)};a.prototype.Tl=function(){this.Co();this.TU()};a.prototype.Ul=function(){this.l4=this.C.get("state");this.Na()};a.prototype.Co=function(){g.prototype.Co.call(this);
var b=this.C.get("intensity"),c=this.C.get("speed");if(k.ub()||k.Yb()==k.nx){var d=1E3;var f=350;var l=1800;var p=400;var q=.8;var r=1.2}else k.kf()?(d=1500,f=500,l=2500,p=500,q=.8,r=1.2):(d=3E3,f=1E3,l=5E3,p=1E3,q=.6,r=1);this.M1=this.C.get("initialState");this.p5=this.C.get("startDuration");this.w5=this.C.get("stopDuration");this.gR=.75;this.OR=.5;this.hv=4;this.kv=-2;this.us=3;this.I2=35;this.VG=7;this.iD=(q+b*(r-q))/e;this.lT=this.EH=.15+c*1.35;this.YH=f+b*(d-f);this.WG=p+b*(l-p)};a.prototype.B0=
function(){return new THREE.Sprite(this.ly())};a.prototype.ly=function(){var b=new THREE.SpriteMaterial;b.map=this.ds();b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;return b};a.prototype.ds=function(){if(this.Ma)return this.Ma;var b=document.createElement("canvas");b.width=b.height=e;var c=b.getContext("2d"),d=c.createRadialGradient(b.width*.5,b.height*.5,b.height*.2,b.width*.5,b.height*.5,b.height*.5);d.addColorStop(0,"rgba(255, 255, 255, 0.8)");d.addColorStop(1,"rgba(255, 255, 255, 0)");
c.fillStyle=d;c.fillRect(0,0,b.width,b.height);this.Ma=new THREE.Texture;this.Ma.colorSpace=THREE.SRGBColorSpace;this.Ma.image=b;this.Ma.needsUpdate=!0;return this.Ma};var e=32;return a});
define("tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin",["require","tdv/player/view/panorama/renderer/3d/util/GeometryUtil","tdv/player/view/util/Device"],function(a){var m=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),h=a("tdv/player/view/util/Device"),n=new THREE.Matrix4,g=Math.PI/180;return{ky:function(){this.set("rotationX",0);this.set("rotationY",0);this.set("rotationZ",0);this.set("yaw",0);this.set("pitch",0);this.set("roll",0);this.set("scale",1);
this.set("hfov",void 0);this.set("vfov",null);this.wi=new THREE.Matrix4;this.ke=new THREE.Matrix4;this.Bq=new THREE.Matrix4;this.Io=new THREE.Matrix4;this.qk=new THREE.Matrix4;this.un=new THREE.Matrix4;this.xs=new THREE.Matrix4},$da:function(){var k=h.Nd()==h.vj||h.Yb()==h.nx?new THREE.CSS3DRectangle:new THREE.CSS3DObject;k.matrixAutoUpdate=!1;return k},Wz:function(k){if(this.W("contentWidth","contentHeight")){var e=this.get("cssObject");e.contentWidth=this.get("contentWidth");e.contentHeight=this.get("contentHeight");
e.updateVertices()}e=!1;this.W("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.wi.makeTranslation(-this.get("composedTranslationX")*.5*m.th,this.get("composedTranslationY")*.5*m.th,this.get("composedTranslationZ")*.5*m.th),e=!0);this.W("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ke.makeRotationY(-k.Xa*g),this.ke.multiply(n.makeRotationX(-this.get("composedDeltaPitch")*g)),this.ke.multiply(n.makeRotationY(this.get("composedDeltaYaw")*g)),this.ke.multiply(n.makeRotationY(k.Xa*
g)),e=!0);this.W("yaw","pitch")&&(this.Bq.makeRotationY(-this.get("yaw")*g),this.Bq.multiply(n.makeRotationX(this.get("pitch")*g)),e=!0);if(this.W("flipHorizontally","hfov","vfov","composedTranslationX","composedTranslationY","composedTranslationZ")){e=this.get("contentWidth");var b=this.get("contentHeight"),c=this.get("hfov"),d=this.get("vfov");this.Io.makeTranslation(0,0,-(e/(2*Math.tan(c*g*.5))));var f=(this.get("flipHorizontally")?-1:1)*this.get("scale"),l=this.get("scale");d&&(l*=e*Math.tan(d*
g*.5)/(b*Math.tan(c*g*.5)));this.un.makeScale(f,l,1);e=!0}this.W("rotationX","rotationY","rotationZ","roll")&&(this.qk.makeRotationZ(this.get("roll")*g),this.qk.multiply(n.makeRotationY(this.get("rotationY")*g)),this.qk.multiply(n.makeRotationX(this.get("rotationX")*g)),this.qk.multiply(n.makeRotationZ(this.get("rotationZ")*g)),e=!0);if(e||this.W("meshGroup"))this.xs.copy(this.wi),this.xs.multiply(this.ke),this.xs.multiply(this.Bq),this.xs.multiply(this.Io),this.xs.multiply(this.qk),this.xs.multiply(this.un),
this.get("cssObject").matrix.copy(this.xs),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",k.Xa);this.set("cameraPitch",k.pitch);this.set("cameraRoll",k.Mg);this.set("cameraHfov",k.Wd);this.set("cameraWidth",k.width);this.set("cameraHeight",k.height);k.camera&&(e||this.W("cameraYaw","cameraPitch","cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(k.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.W("geometryVisible")&&
this.Vja())}}});
define("tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.ue=this.ue.bind(this);this.Ib=new h},Aq:function(){m.ba(this.C,["playbackPositions","width",
"height"],this.ue,!0)},Cq:function(){m.da(this.C,["playbackPositions","width","height"],this.ue)},ue:function(){this.set("playbackPositions",this.C.get("playbackPositions"));this.set("contentWidth",this.C.get("width"));this.set("contentHeight",this.C.get("height"))},cg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("yaw",this.Ib.get("yaw")),this.set("pitch",this.Ib.get("pitch")),this.set("roll",this.Ib.get("roll")),
this.set("rotationX",this.Ib.get("rotationX")),this.set("rotationY",this.Ib.get("rotationY")),this.set("hfov",this.Ib.get("hfov")),this.set("vfov",this.Ib.get("vfov")));this.W("framePlane","holePlane","imagePlane","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","contentWidth","contentHeight")&&this.Cb().forEach(function(n){n.set("yaw",this.get("yaw"));n.set("pitch",this.get("pitch"));n.set("roll",this.get("roll"));n.set("rotationX",this.get("rotationX"));n.set("rotationY",this.get("rotationY"));
n.set("hfov",this.get("hfov"));n.set("vfov",this.get("vfov"));n.set("contentWidth",this.get("contentWidth"));n.set("contentHeight",this.get("contentHeight"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/RectangleFrameHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/FrameHotspot tdv/player/view/panorama/renderer/object/ComposedCSSObject tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/FrameHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedCSSObject"),g=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),k=a("tdv/player/view/panorama/renderer/object/geometry/CSSRectangleGeometryMixin"),e=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),b=a("tdv/player/view/panorama/renderer/object/material/IFrameMaterialMixin"),c=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),
d=a("tdv/player/view/panorama/renderer/object/material/PassthroughMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/RectangleFrameHotspotPositionMixin");var f=m.extend(g,e,c,function(){g.call(this);this.set("tag","RectangleFrameHotspotImage")}),l=m.extend(n,k,b,function(){n.call(this);this.set("tag","RectangleFrameHotspotFrame")}),p=m.extend(g,e,d,function(){g.call(this);this.set("tag","RectangleFrameHotspotHole")});return m.extend(h,a,function(q){h.call(this,q);this.mH=f;this.ufa=
l;this.tga=p})});
define("tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin",["require","tdv/binding/BindingsHandler","tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController"],function(a){var m=a("tdv/binding/BindingsHandler"),h=a("tdv/player/view/panorama/renderer/object/overlay/PlaybackPositionController");return{iq:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ue=this.ue.bind(this);this.Ib=new h},
Aq:function(){m.ba(this.C,["playbackPositions","distance","scaleMode"],this.ue,!0)},Cq:function(){m.da(this.C,["playbackPositions","distance","scaleMode"],this.ue)},ue:function(){this.set("scaleMode",this.C.get("scaleMode"));this.set("distance",this.C.get("distance"));this.set("playbackPositions",this.C.get("playbackPositions"))},cg:function(){this.W("playbackPositions","currentTime")&&(this.Ib.ZE(this.get("playbackPositions")),this.Ib.XE(this.get("currentTime")),this.set("yaw",this.Ib.get("yaw")),
this.set("pitch",this.Ib.get("pitch")),this.set("roll",this.Ib.get("roll")),this.set("rotationX",this.Ib.get("rotationX")),this.set("rotationY",this.Ib.get("rotationY")),this.set("hfov",this.Ib.get("hfov")),this.set("vfov",this.Ib.get("vfov")),this.set("alpha",this.Ib.nw()));this.W("video","image","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","distance","scaleMode","image","video")&&this.Cb().forEach(function(n){n.set("yaw",this.get("yaw"));n.set("pitch",this.get("pitch"));n.set("roll",
this.get("roll"));n.set("rotationX",this.get("rotationX"));n.set("rotationY",this.get("rotationY"));n.set("hfov",this.get("hfov"));n.set("vfov",this.get("vfov"));n.set("scaleMode",this.get("scaleMode"));n.set("distance",this.get("distance"))}.bind(this))}}});
define("tdv/player/view/panorama/renderer/object/RectangleVideoHotspot","require tdv/utils tdv/player/view/panorama/renderer/object/VideoHotspot tdv/player/view/panorama/renderer/object/ComposedWebGLObject tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/object/VideoHotspot"),n=a("tdv/player/view/panorama/renderer/object/ComposedWebGLObject"),g=a("tdv/player/view/panorama/renderer/object/geometry/RectangleGeometryMixin"),k=a("tdv/player/view/panorama/renderer/object/material/ImageResourceMaterialMixin"),e=a("tdv/player/view/panorama/renderer/object/material/VideoResourceMaterialMixin");a=a("tdv/player/view/panorama/renderer/object/position/RectangleVideoHotspotPositionMixin");var b=m.extend(n,
g,k,function(){n.call(this);this.set("tag","RectangleVideoHotspotImage")}),c=m.extend(n,g,e,function(){n.call(this);this.set("tag","RectangleVideoHotspotVideo")});return m.extend(h,a,function(d){h.call(this,d);this.mH=b;this.yma=c})});
define("tdv/player/view/panorama/renderer/object/Factory","require tdv/player/parser/ClassInfo tdv/player/view/panorama/renderer/object/Base tdv/player/view/panorama/renderer/object/Cap tdv/player/view/panorama/renderer/object/Dust tdv/player/view/panorama/renderer/object/FlatHotspotImage tdv/player/view/panorama/renderer/object/Hotspot tdv/player/view/panorama/renderer/object/HotspotImage tdv/player/view/panorama/renderer/object/LensFlare tdv/player/view/panorama/renderer/object/Menu tdv/player/view/panorama/renderer/object/Panorama tdv/player/view/panorama/renderer/object/ImagePanoramaFrame tdv/player/view/panorama/renderer/object/VideoPanoramaFrame tdv/player/view/panorama/renderer/object/Popup tdv/player/view/panorama/renderer/object/QuadFrameHotspot tdv/player/view/panorama/renderer/object/QuadHotspotImage tdv/player/view/panorama/renderer/object/QuadVideoHotspot tdv/player/view/panorama/renderer/object/Rain tdv/player/view/panorama/renderer/object/Root tdv/player/view/panorama/renderer/object/Snow tdv/player/view/panorama/renderer/object/RectangleFrameHotspot tdv/player/view/panorama/renderer/object/RectangleVideoHotspot tdv/player/view/panorama/renderer/object/util/PanoramaFormat".split(" "),function(a){function m(D,
F){Array.isArray(F)||(F=[F]);for(var C=0;C<F.length;C++)if(h.Oa(F[C],D))return!0;return!1}var h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/panorama/renderer/object/Base"),g=a("tdv/player/view/panorama/renderer/object/Cap"),k=a("tdv/player/view/panorama/renderer/object/Dust"),e=a("tdv/player/view/panorama/renderer/object/FlatHotspotImage"),b=a("tdv/player/view/panorama/renderer/object/Hotspot"),c=a("tdv/player/view/panorama/renderer/object/HotspotImage"),d=a("tdv/player/view/panorama/renderer/object/LensFlare"),
f=a("tdv/player/view/panorama/renderer/object/Menu"),l=a("tdv/player/view/panorama/renderer/object/Panorama"),p=a("tdv/player/view/panorama/renderer/object/ImagePanoramaFrame"),q=a("tdv/player/view/panorama/renderer/object/VideoPanoramaFrame"),r=a("tdv/player/view/panorama/renderer/object/Popup"),t=a("tdv/player/view/panorama/renderer/object/QuadFrameHotspot"),u=a("tdv/player/view/panorama/renderer/object/QuadHotspotImage"),v=a("tdv/player/view/panorama/renderer/object/QuadVideoHotspot"),w=a("tdv/player/view/panorama/renderer/object/Rain"),
x=a("tdv/player/view/panorama/renderer/object/Root"),y=a("tdv/player/view/panorama/renderer/object/Snow"),z=a("tdv/player/view/panorama/renderer/object/RectangleFrameHotspot"),A=a("tdv/player/view/panorama/renderer/object/RectangleVideoHotspot");a("tdv/player/view/panorama/renderer/object/util/PanoramaFormat");a={};x.zeb=a;a.create=function(D){if(D instanceof n)return D;if(m(D,["HDRPanorama","LivePanorama","Panorama","VideoPanorama"]))return new l(D);if(m(D,["CubicPanoramaFrame","SphericPanoramaFrame"]))return m(D,
"SphericPanoramaFrame")&&D.Mn()?new q(D):new p(D);if(m(D,["DustPanoramaOverlay"]))return new k(D);if(m(D,"HotspotPanoramaOverlay"))return new b(D);if(m(D,["HotspotPanoramaOverlayImage","HotspotPanoramaOverlayMap"]))return new c(D);if(m(D,"Menu"))return new f(D);if(m(D,["CeilingCapPanoramaOverlay","TripodCapPanoramaOverlay"]))return new g(D);if(m(D,["FlatHotspotPanoramaOverlayImage","FlatHotspotPanoramaOverlayMap"]))return new e(D);if(m(D,["LensFlarePanoramaOverlay"]))return new d(D);if(m(D,["RainPanoramaOverlay"]))return new w(D);
if(m(D,["SnowPanoramaOverlay"]))return new y(D);if(m(D,["PopupPanoramaOverlay"]))return new r(D);if(m(D,["QuadFramePanoramaOverlay"]))return new t(D);if(m(D,["QuadHotspotPanoramaOverlayImage","QuadHotspotPanoramaOverlayMap"]))return new u(D);if(m(D,["QuadVideoPanoramaOverlay"]))return new v(D);if(m(D,["FramePanoramaOverlay"]))return new z(D);if(m(D,["VideoPanoramaOverlay"]))return new A(D);throw"Invalid script object";};return a});
define("tdv/player/view/panorama/renderer/3d/util/RayUtil",["require","exports","three.mod"],function(a,m,h){return function(){function n(){}n.yLa=function(g,k,e,b,c,d){return n.Xeb(g,k/b*2-1,-(e/c)*2+1,d)};n.Xeb=function(g,k,e,b){b||(b=new h.Ray);b.origin.setFromMatrixPosition(g.matrixWorld);b.direction.set(k,e,.5).unproject(g).sub(b.origin).normalize();return b};n.mfb=function(g,k){k||(k=new h.Ray);k.origin.set(0,0,0);k.direction.set(0,0,-1).applyQuaternion(g.quaternion);return k};n.lfb=function(g,
k){k||(k=new h.Ray);k.origin.set(0,0,0).applyMatrix4(g);k.direction.set(0,0,-1).applyMatrix4(g).sub(k.origin).normalize();return k};return n}()});
define("tdv/player/view/panorama/renderer/object/Reticle","require tdv/utils tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/Plane tdv/player/canvas/ReticleCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),n=a("tdv/player/view/panorama/renderer/object/Plane"),g=a("tdv/player/canvas/ReticleCanvas"),
k=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/util/XR");a=m.extend(n,function(){n.call(this);this.ja=null;this.set("tag","Reticle");this.set("changing",!1);this.set("over",!1);this.set("overProgress",void 0);this.set("visible",!0);this.set("attachToCamera",!0);this.zq=null});a.prototype.za=function(b){this.et(b);this.gh(b);this.cg(b);n.prototype.za.call(this,b)};a.prototype.et=function(b){b.Va&&!this.zq&&e.getType()==e.Kx.mo&&this.bi([this.zq=
new n])};a.prototype.gh=function(b){this.ja||(this.set("textureSource",new k),this.ja=new g(this.La.P.Z7()),this.get("textureSource").bo(this.ja.If()),this.set("contentWidth",this.ja.fg()),this.set("contentHeight",this.ja.wg()),this.set("hfov",6),this.set("distance",this.La.P.get("vrPointerDistance")));this.W("changing")&&this.ja.cB(b.Va&&this.get("changing"));this.W("over","overProgress")&&this.ja.pK(this.get("over"),this.get("overProgress"));this.ja.update(b.zf)&&this.get("textureSource").update();
this.get("changing")&&this.Na()};a.prototype.cg=function(){this.yi()};a.prototype.Cn=function(){this.W("composedAlpha","meshGroup","visible")&&this.aC()};a.prototype.aC=function(){h.nf(this.get("meshGroup"),this.get("visible")?this.get("composedAlpha"):0)};return a});
define("tdv/view/core/ToolTip","require exports tdv/utils tdv/constants/EventName tdv/view/core/ZIndex tdv/view/util/Font tdv/player/view/util/Device".split(" "),function(a,m,h,n,g,k,e){var b=document.createElement("pre"),c=document.createTextNode("");b.appendChild(c);return function(){function d(f){this.Gb=f;this.eGa=e.Jp();this.Gb.bind(n.gb,this.rg,this);this.qa=document.createElement("span");this.qa.style.pointerEvents="none";this.qa.style.position="absolute";this.qa.style.zIndex=g.dWa.toString();
this.qa.style.textAlign="center";this.qa.style.display="none";this.ae=document.createElement("span");this.ae.style.position="absolute";this.ae.style.left="0";this.ae.style.top="0";this.ae.style.right="0";this.ae.style.bottom="0";this.qa.appendChild(this.ae);this.Pz=document.createElement("span");this.Pz.style.position="relative";this.qa.appendChild(this.Pz);this.sk=this.O1=this.Jh=null;this.oz=this.nz=void 0;this.Oy=!1;this.fGa=void 0}d.prototype.cc=function(){return this.qa};d.prototype.PE=function(f){var l=
this;if(!this.eGa){for(;f&&f.get("toolTipDisabled");)f=f.getParent();this.oe();this.Jh&&Object.keys(d.FQ).forEach(function(p){l.Jh.h(n.L(p),l.xia,l)});if(this.Jh=f)Object.keys(d.FQ).forEach(function(p){l.Jh.bind(n.L(p),l.xia,l,!1)}),this.xia()}};d.prototype.amb=function(f,l){this.Jh=f;this.fGa=l;this.Y1()||(this.Oy?this.qFa():this.AV())};d.prototype.oFa=function(f,l,p){this.Oy&&this.Jh.o(n.Dua);this.bab(f);this.Pz.innerHTML=this.B2a(l);this.Bwa=p;this.qa.style.display="inline";this.cg();this.Jh.o(n.cWa);
this.Oy=!0;(p||f.get("checkToolTipOcclusion"))&&this.y9a(f)};d.prototype.cg=function(){var f=this.ls(),l=f.x;f=f.y;var p=this.qa.offsetWidth||0,q=this.qa.offsetHeight||0;if(this.Bwa){l-=(this.qa.clientWidth||0)*.5;var r=this.Jh.get("toolTipCenteredOffsetY");f=r===void 0?f-(this.qa.clientHeight||0)*.5:r>0?f+r:f-((this.qa.clientHeight||0)-r)}l=Math.max(Math.min(l,this.Gb.nb()-p-3),3);f=Math.max(Math.min(f,this.Gb.Mb()-q-3),3);this.qa.style.left=l+"px";this.qa.style.top=f+"px"};d.prototype.ls=function(){if(this.Bwa){var f=
h.offset(this.Jh.wa().cc());return{x:f.left+this.Jh.nb()*.5,y:f.top+this.Jh.Mb()*.5}}return{x:this.nz||0,y:(this.oz||0)+25}};d.prototype.oe=function(){this.GG();this.GFa();this.Oy&&(this.qa.style.display="none",this.Jh.o(n.Dua),this.Oy=!1)};d.prototype.xia=function(){this.Jh.get("toolTip")?this.Y1()||(this.Oy?this.pFa():this.AV()):this.Y1()?this.GG():this.Oy&&this.oe()};d.prototype.rg=function(f){this.nz=f.pageX;this.oz=f.pageY;this.Oy&&this.Jh.get("toolTipFollowMouse")&&this.cg()};d.prototype.pFa=
function(){this.oFa(this.Jh,this.Jh.get("toolTip"),this.Jh.get("toolTipCentered"))};d.prototype.qFa=function(){this.oFa(this.Jh,this.fGa,!0)};d.prototype.Y1=function(){return this.sk!=null};d.prototype.AV=function(){var f=this.Jh&&this.Jh.get("toolTipDisplayTime");if(f===void 0||f===null)f=d.FQ.toolTipDisplayTime;this.GG();this.sk=setTimeout(function(){this.sk=null;this.eGa?this.qFa():this.pFa()}.bind(this),f)};d.prototype.GG=function(){this.Y1()&&(clearTimeout(this.sk),this.sk=null)};d.prototype.y9a=
function(f){var l=this.ls();this.GFa();var p=function(){this.qa.style.display=this.Oy&&!this.F3a(f,l.x,l.y)?"inline":"none"}.bind(this);this.O1=setInterval(p,300);p()};d.prototype.GFa=function(){this.O1&&(clearInterval(this.O1),this.O1=null)};d.prototype.bab=function(f){function l(q){var r=f.get(q);return r===void 0?d.FQ[q]:r}this.qa.style.opacity=l("toolTipOpacity");this.qa.style.paddingTop=l("toolTipPaddingTop")+"px";this.qa.style.paddingBottom=l("toolTipPaddingBottom")+"px";this.qa.style.paddingLeft=
l("toolTipPaddingLeft")+"px";this.qa.style.paddingRight=l("toolTipPaddingRight")+"px";this.qa.style.textAlign=l("toolTipHorizontalAlign");this.ae.style.opacity=l("toolTipBackgroundOpacity");this.ae.style.backgroundColor=l("toolTipBackgroundColor");this.ae.style.border=[l("toolTipBorderSize")+"px","solid",l("toolTipBorderColor")].join(" ");var p=l("toolTipShadowColor");this.ae.style.boxShadow=[l("toolTipShadowHorizontalLength")+"px",l("toolTipShadowVerticalLength")+"px",l("toolTipShadowBlurRadius")+
"px",l("toolTipShadowSpread")+"px","rgba("+parseInt("0x"+p.substr(1,2))+", "+parseInt("0x"+p.substr(3,2))+", "+parseInt("0x"+p.substr(5,2))+", "+l("toolTipShadowOpacity")+")"].join(" ");this.ae.style.borderRadius=l("toolTipBorderRadius")+"px";this.Pz.style.fontFamily=k.qA(l("toolTipFontFamily"));p=l("toolTipFontSize");typeof p==="number"?p+="px":typeof p!=="string"&&(p="");this.Pz.style.fontSize=p;this.Pz.style.fontWeight=l("toolTipFontWeight");this.Pz.style.fontStyle=l("toolTipFontStyle");this.Pz.style.color=
l("toolTipFontColor");p=l("toolTipTextShadowColor");this.Pz.style.textShadow=[l("toolTipTextShadowHorizontalLength")+"px",l("toolTipTextShadowVerticalLength")+"px",l("toolTipTextShadowBlurRadius")+"px","rgba("+parseInt("0x"+p.substr(1,2))+", "+parseInt("0x"+p.substr(3,2))+", "+parseInt("0x"+p.substr(5,2))+", "+l("toolTipTextShadowOpacity")+")"].join(" ")};d.prototype.F3a=function(f,l,p){l=document.elementsFromPoint(l,p);f=f.wa().cc();p=this.Gb.wa().cc();for(var q=0;q<l.length;q++){var r=l[q];if(f==
r||f.contains(r))break;if(!this.qa.contains(r)&&p.contains(r)){var t=window.getComputedStyle(r);if(t.display!="none"&&t.visibility!="hidden"&&(r.tagName=="CANVAS"?1:this.DZa(t.backgroundColor))*parseFloat(t.opacity)>.29)return!0}}return!1};d.prototype.DZa=function(f){if(!f)return 0;f=f.toLowerCase();var l=f.match(/rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(\d*\.?\d*)\s*\)/);return l?parseFloat(l[1]):f.match(/transparent/)?0:1};d.prototype.B2a=function(f){f=(f||"").split("\n");for(var l=0;l<f.length;l++)f[l]=
this.u0a(f[l]);return f.map(function(p){return"<div>"+p+"</div>"}).join("")};d.prototype.u0a=function(f){c.nodeValue=f;(f=b.innerHTML)||(f="&nbsp;");return f};d.FQ={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.P=e;this.zn=b;this.n9a()}var h=a("tdv/view/core/ToolTip"),n=a("tdv/view/util/MeasureText"),g=a("tdv/view/util/Font"),k=180/Math.PI;m.prototype.If=function(){return this.ja};m.prototype.fg=function(){return this.ja.width};m.prototype.wg=function(){return this.ja.height};m.prototype.jf=function(){return 2*Math.atan2(this.ja.width/
3*.5,600)*k};m.prototype.n9a=function(){this.ja=document.createElement("canvas");var e=this.zn.split("\n"),b=this.Mh("toolTipBackgroundColor"),c=this.Mh("toolTipBackgroundOpacity"),d=this.Mh("toolTipBorderRadius"),f=this.Mh("toolTipBorderColor"),l=this.Mh("toolTipBorderSize");this.Mh("toolTipDisplayTime");var p=this.Mh("toolTipFontFamily"),q=this.Mh("toolTipFontSize"),r=this.Mh("toolTipFontColor"),t=this.Mh("toolTipFontWeight"),u=this.Mh("toolTipFontStyle"),v=this.Mh("toolTipPaddingBottom"),w=this.Mh("toolTipPaddingLeft"),
x=this.Mh("toolTipPaddingTop"),y=this.Mh("toolTipPaddingRight"),z=this.Mh("toolTipOpacity"),A=this.Mh("toolTipTextShadowBlurRadius"),D=this.Mh("toolTipTextShadowColor"),F=this.Mh("toolTipTextShadowHorizontalLength"),C=this.Mh("toolTipTextShadowVerticalLength"),B=this.Mh("toolTipTextShadowOpacity");isNaN(q)&&(q=12);d=Math.round(d*3);l=Math.round(l*3);q=Math.round(q*3);v=Math.round(v*3);w=Math.round(w*3);x=Math.round(x*3);y=Math.round(y*3);A=Math.round(A*3);F=Math.round(F*3);C=Math.round(C*3);var H=
new n.lca;H.fontFamily=p;H.fontSize=Math.round(q)+"px";H.fontWeight=t;H.fontStyle=u;this.ja=document.createElement("canvas");var E=this.ja.getContext("2d"),G=e.map(function(T){return n(T,H,E)}),N=0,O=0;G.forEach(function(T){N=Math.max(T.width,N);O+=T.height});var R=e.length>1?O/e.length*.25:0;O+=(e.length-1)*R;y=l+w+N+y+l;v=l+x+O+v+l;this.ja.width=this.ja.height=Math.max(256,Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(y,v))/Math.LN2))));E=this.ja.getContext("2d");var Q=(this.ja.width-y)*.5,
K=(this.ja.height-v)*.5;E.save();E.translate(Q,K);E.globalAlpha=z;E.strokeStyle=f;E.fillStyle=b==="transparent"?"rgba(0,0,0,0)":this.Cva(c,b);E.lineWidth=l;E.beginPath();E.moveTo(d,0);E.lineTo(y-d,0);E.quadraticCurveTo(y,0,y,d);E.lineTo(y,v-d);E.quadraticCurveTo(y,v,y-d,v);E.lineTo(d,v);E.quadraticCurveTo(0,v,0,v-d);E.lineTo(0,d);E.quadraticCurveTo(0,0,d,0);E.closePath();E.fill();l>0&&E.stroke();E.fillStyle=r;E.font=t+" "+(u!="normal"?u+" ":"")+q+(isNaN(q)?"":"px")+" "+g.qA(p);E.shadowColor=this.Cva(B,
D);E.shadowOffsetX=F;E.shadowOffsetY=C;E.shadowBlur=A;E.textBaseline="middle";E.textAlign="center";var L=l+w+N*.5,U=l+x;e.forEach(function(T,Y){E.fillText(T,Math.round(L),Math.round(U+G[Y].height*.5));U+=G[Y].height+R})};m.prototype.Mh=function(e){var b=this.P.get(e);return b===void 0?h.FQ[e]:b};m.prototype.Cva=function(e,b){return"rgba("+parseInt("0x"+b.substr(1,2))+", "+parseInt("0x"+b.substr(3,2))+", "+parseInt("0x"+b.substr(5,2))+", "+e+")"};return m});
define("tdv/player/view/panorama/renderer/object/ToolTip","require tdv/utils tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/object/Plane tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/object/Plane"),
g=a("tdv/player/view/panorama/renderer/object/canvas/ToolTipCanvas"),k=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/util/XR");a=m.extend(n,function(){n.call(this);this.ja=null;this.set("tag","ToolTip");this.set("text","");this.Uq=new THREE.Vector3(0,0,-h.Dt());this.zq=null});a.prototype.za=function(f){this.et(f);this.gh(f);n.prototype.za.call(this,f)};a.prototype.et=function(f){f.Va&&!this.zq&&e.getType()==e.Kx.mo&&this.bi([this.zq=new n])};
a.prototype.gh=function(f){if(!this.ja||this.W("text")){this.get("textureSource")||this.set("textureSource",new k);this.ja=new g(this.La.P,this.get("text"));this.get("textureSource").bo(this.ja.If());this.set("contentWidth",this.ja.fg());this.set("contentHeight",this.ja.wg());this.set("hfov",this.ja.jf());this.set("distance",this.La.P.get("vrPointerDistance"));var l=this.get("matrix"),p=this.get("intersectionYaw"),q=this.get("intersectionPitch");p!==void 0&&q!==void 0?(this.set("yaw",p),this.set("pitch",
q+c),this.set("distance",this.get("intersectionDistance"))):l?(this.Uq.applyMatrix4(l),this.Uq.x==0&&this.Uq.z==0||this.set("yaw",b*Math.atan2(this.Uq.x,-this.Uq.z)),this.Uq.y==0&&this.Uq.z==0||this.set("pitch",b*Math.atan2(this.Uq.y,Math.sqrt(this.Uq.z*this.Uq.z+this.Uq.x*this.Uq.x))+c)):(this.set("yaw",f.Xa),this.set("pitch",f.pitch+d))}};var b=180/Math.PI,c=2,d=5;return a});
define("tdv/player/view/panorama/renderer/pointer/Pointer",["require","exports","tdv/player/view/panorama/renderer/3d/util/RayUtil","tdv/player/view/panorama/renderer/3d/util/SceneUtil"],function(a,m,h,n){return function(){function g(k,e){this.Qf=k;this.j=e}g.prototype.update=function(){};g.prototype.clear=function(){};g.prototype.getType=function(){return this.Qf};g.prototype.iLa=function(k){return this.l1=(k=k.sh&&n.getCamera(k.sh))?h.mfb(k,this.l1):void 0};g.ZQ="webxr";g.WB="gaze";g.E_="gaze_click";
g.F_="laser";g.XQ="mouse";g.YQ="touch";return g}()});
define("tdv/player/view/panorama/renderer/pointer/Beam",["require","exports","tdv/player/view/panorama/renderer/pointer/Pointer","tdv/view/constants/Cursor"],function(a,m,h,n){return function(){function g(k,e,b,c,d){d===void 0&&(d=!0);this.we=k;this.Ps=e;this.l1=b;this.$f=c;this.Rza=d;this.xwa=[];this.Vl=[];this.rV={};this.qga=[];this.jc="";this.BD=Number.MAX_VALUE}g.prototype.Lw=function(){return this.we};g.prototype.bP=function(){return this.l1};g.prototype.zw=function(){return this.we.getType()==
h.XQ};g.prototype.gpa=function(){return this.we.getType()==h.ZQ};g.prototype.KJ=function(){return this.we.getType()==h.YQ};g.prototype.nhb=function(){return this.we.getType()==h.WB};g.prototype.cIa=function(k,e){this.rV[e]=(this.rV[e]||[]).concat(k)};g.prototype.XRa=function(){return g.hUa.find(this.Ggb.bind(this))};g.prototype.Ggb=function(k){return this.rV[k]!==void 0&&this.rV[k].length>0?!0:!1};g.prototype.uaa=function(){return Object.keys(this.rV).length>0};g.prototype.UI=function(k){this.cIa(k,
n.qf)};g.prototype.Nbb=function(k){this.qga=this.qga.concat(k)};g.prototype.Vdb=function(){return!this.XRa()&&this.qga.length>0};g.prototype.LD=function(k){this.Vl=this.Vl.concat(k)};g.prototype.We=function(){return this.Vl.length>0};g.prototype.lm=function(k){k&&(this.NG===void 0||this.NG>k)&&(this.NG=k)};g.prototype.xw=function(){return this.NG};g.prototype.y6=function(k,e){if(this.jc==""||this.BD>e)this.jc=k,this.BD=e};g.prototype.mB=function(){return this.jc};g.prototype.cu=function(k){this.xwa=
k===void 0?[]:Array.isArray(k)?k:[k]};g.prototype.om=function(){return this.xwa.length>0};g.hUa=[n.Li,n.Nta,n.IB,n.qf,n.De];return g}()});
define("tdv/player/view/panorama/renderer/pointer/GazePointer","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/object/Reticle tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/util/XR".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),
n=a("tdv/constants/Key");a("tdv/player/view/panorama/renderer/3d/util/RayUtil");a("tdv/player/view/panorama/renderer/3d/util/SceneUtil");var g=a("tdv/player/view/panorama/renderer/object/Reticle"),k=a("tdv/player/view/panorama/renderer/object/ToolTip"),e=a("tdv/player/view/panorama/renderer/pointer/Beam"),b=a("tdv/player/view/panorama/renderer/pointer/Pointer"),c=a("tdv/player/view/util/XR");a=m.extend(b,function(d,f){b.call(this,b.WB,d);this.il=this.I=null;this.Vl=[];this.Cd=this.ey=!1;this.xS=null;
this.uza=void 0;this.ZU=null;this.hDa=void 0;this.Qe=new g;this.j.add(this.Qe);this.Rq="";this.jc=new k;this.jc.set("alpha",0);this.j.add(this.jc);this.ika=f?this.j.P.get("vrPointerSelectionTime"):void 0;this.vza=this.j.P.get("vrGazePointerHideTime");this.J5=this.J5.bind(this);this.Ym=this.Ym.bind(this);document.body.addEventListener("touchend",this.J5);document.addEventListener("keyup",this.Ym,!0);c.M.bind(h.Wr,this.JHa,this,!0);this.Ola();this.jma()});a.prototype.clear=function(){document.body.removeEventListener("touchend",
this.J5);document.removeEventListener("keyup",this.Ym,!0);c.M.h(h.Wr,this.JHa,this,!0);this.Xka();this.j.remove(this.Qe);this.Qe=null;this.j.remove(this.jc);this.jc=null};a.prototype.update=function(d){this.I=d;this.d8a(d.Hn);this.jm()};a.prototype.J5=function(){this.OL()};a.prototype.Ym=function(d){d.code!=n.ua.f_&&d.code!=n.ua.jL||this.OL()};a.prototype.JHa=function(){this.OL()};a.prototype.OL=function(){var d=this.Ll(h.Xf);this.gm(d);this.tI(!1);this.ula()};a.prototype.ula=function(){this.j.Vb().o(h.cG,
{jQ:h.Xf})};a.prototype.jm=function(){var d=this.Ll(h.Jm);this.gm(d);this.Gz(d.mB());a:{var f=this.Vl;for(var l=d.Vl,p=0;p<f.length;p++)if(l.indexOf(f[p])<0){f=!1;break a}for(p=0;p<l.length;p++)if(f.indexOf(l[p])<0){f=!1;break a}f=!0}f||(this.tI(!1),this.Vl=d.Vl,this.Vl.length&&this.tI(!0,d.uaa()))};a.prototype.d8a=function(d){this.ey!=d&&(this.ey=d,this.Qe.set("changing",this.ey),this.Ola(),this.jma())};a.prototype.tI=function(d,f){this.Cd!=d&&(this.Cd=d,this.Qe.set("over",this.Cd&&f),this.Ola(),
this.jma())};a.prototype.Gz=function(d){this.Rq!=d&&(this.Rq=d,this.jc.set("text",this.Rq),this.jc.set("alpha",this.Rq?1:0),this.Rq&&this.jc.yi())};a.prototype.gm=function(d){this.j.rX().sort(function(f,l){return l.get("index")-f.get("index")}).forEach(function(f){f.ao(d)}.bind(this))};a.prototype.Ll=function(d){this.il=this.iLa(this.I);return new e(this,this.il?[this.il]:[],this.il,d)};a.prototype.jma=function(){!this.Cd||this.ey||this.ika===void 0?this.Xka():this.Cd&&!this.ZU&&this.S9a()};a.prototype.Ola=
function(){this.Cd||this.ey||this.vza===void 0?(this.Qe.set("alpha",1),this.KFa()):this.Qe.get("alpha")!=1||this.xS||this.E9a()};a.prototype.Xka=function(){this.ZU&&(clearInterval(this.ZU),this.ZU=null)};a.prototype.S9a=function(){this.Qe.set("overProgress",0);this.hDa=(new Date).getTime();this.ZU=setInterval(this.F5a.bind(this),100)};a.prototype.F5a=function(){var d=(new Date).getTime()-this.hDa;d>=this.ika?(this.Xka(),this.OL()):this.Qe.set("overProgress",d/this.ika)};a.prototype.KFa=function(){this.xS&&
(clearInterval(this.xS),this.xS=null)};a.prototype.E9a=function(){this.uza=(new Date).getTime();this.xS=setInterval(this.X4a.bind(this),10)};a.prototype.X4a=function(){var d=this.vza-((new Date).getTime()-this.uza);this.Qe.set("alpha",Math.max(.01,Math.min(1,d/500)));d<=0&&this.KFa()};return a});
define("tdv/player/view/panorama/renderer/object/Laser","require tdv/utils tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/panorama/renderer/3d/util/MaterialUtil tdv/player/view/panorama/renderer/3d/util/MeshUtil tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource tdv/player/view/panorama/renderer/object/WebGLObject tdv/player/view/util/Color".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/panorama/renderer/3d/util/GeometryUtil"),n=a("tdv/player/view/panorama/renderer/3d/util/MaterialUtil"),
g=a("tdv/player/view/panorama/renderer/3d/util/MeshUtil"),k=a("tdv/player/view/panorama/renderer/object/texturesource/CustomTextureSource"),e=a("tdv/player/view/panorama/renderer/object/WebGLObject"),b=a("tdv/player/view/util/Color"),c=new THREE.Matrix4,d=Math.PI/180;a=m.extend(e,function(){e.call(this);this.set("tag","Laser");this.set("matrix",null);this.set("over",!1);this.set("pressed",!1);this.set("intersectionDistance",0);this.set("visible",!1);this.set("attachToCamera",!1);this.set("dotVisible",
!0);this.Dja=this.LU=this.Av=this.Cja=null;new THREE.Matrix4;this.Eja=new THREE.Matrix4;this.Eja.multiply(c.makeRotationX(-90*d));this.Eja.multiply(c.makeTranslation(0,f*.5,0));this.S0=this.R0=this.Q0=this.py=this.Iea=null;new THREE.Matrix4;this.Jea=new THREE.Matrix4;this.DR=this.P0=this.Hea=null;new THREE.Matrix4;this.IG=[new THREE.Matrix4,new THREE.Matrix4,new THREE.Matrix4];this.IG[0].multiply(c.makeRotationX(-90*d));this.IG[0].multiply(c.makeTranslation(0,-p*.5,0));this.IG[1].multiply(c.makeRotationX(-90*
d));this.IG[1].multiply(c.makeTranslation(0,-p*.5,-l*.5));this.IG[2].multiply(c.makeRotationX(-90*d));this.IG[2].multiply(c.makeTranslation(0,-p*.5,-l))});a.prototype.za=function(q){e.prototype.za.call(this,q);this.lma();this.HD()};a.prototype.lma=function(){this.W("visible")&&(this.get("meshGroup").visible=this.get("visible"));this.W("dotVisible")&&g.nf([this.R0,this.P0],this.get("dotVisible")?1:0)};a.prototype.HD=function(){this.W("over","pressed")&&(this.IGa(),this.fHa())};var f=.35,l=.012,p=.1;
a.prototype.hq=function(){this.P0=g.create(new THREE.SphereGeometry(2.3,32,32),this.XZa());this.R0=g.create(new THREE.SphereGeometry(2,32,32),this.YZa());this.Dja=g.create(new THREE.CylinderGeometry(.003,.003,f,8),this.y_a());this.RL=[];this.RL.push(g.create(new THREE.CylinderGeometry(l,l,p,32),this.bea()));this.RL.push(g.create(new THREE.BoxGeometry(2*l,p,l),this.bea()));this.RL.push(g.create(new THREE.CylinderGeometry(l,l,p,32),this.bea()));return[this.P0,this.R0,this.Dja].concat(this.RL)};a.prototype.XZa=
function(){if(this.Hea==null){var q=document.createElement("canvas");q.width=q.height=256;var r=q.getContext("2d"),t=new k;t.bo(q);this.Hea=n.rt(t.texture(),new n.Rp);r.fillStyle="rgba(0, 0, 0, 0.75)";r.clearRect(0,0,q.width,q.height);r.fillRect(0,0,q.width,q.height)}return this.Hea};a.prototype.YZa=function(){this.Iea==null&&(this.py=document.createElement("canvas"),this.py.width=this.py.height=256,this.Q0=this.py.getContext("2d"),this.S0=new k,this.S0.bo(this.py),this.Iea=n.rt(this.S0.texture(),
new n.Rp),this.IGa());return this.Iea};a.prototype.IGa=function(){this.Q0.fillStyle=this.Gfa();this.Q0.clearRect(0,0,this.py.width,this.py.height);this.Q0.fillRect(0,0,this.py.width,this.py.height);this.S0.update()};a.prototype.y_a=function(){this.Cja==null&&(this.Av=document.createElement("canvas"),this.Av.width=this.Av.height=256,this.LU=this.Av.getContext("2d"),this.Fja=new k,this.Fja.bo(this.Av),this.Cja=n.rt(this.Fja.texture(),new n.Rp),this.fHa());return[this.Cja]};a.prototype.fHa=function(){var q=
b.Dp(this.Gfa()).join(", "),r=this.LU.createLinearGradient(0,0,0,this.Av.height);r.addColorStop(0,"rgba("+q+", 0)");r.addColorStop(.5,"rgba("+q+", 1)");r.addColorStop(1,"rgba("+q+", 1)");this.LU.fillStyle=r;this.LU.clearRect(0,0,this.Av.width,this.Av.height);this.LU.fillRect(0,0,this.Av.width,this.Av.height);this.Fja.update()};a.prototype.bea=function(){if(this.DR==null){var q=document.createElement("canvas");q.width=q.height=256;var r=q.getContext("2d"),t=new k;t.bo(q);this.DR=n.rt(t.texture(),new n.Rp);
r.fillStyle="rgba(64, 64, 64, 1)";r.clearRect(0,0,q.width,q.height);r.fillRect(0,0,q.width,q.height)}return[this.DR,this.DR,this.DR]};a.prototype.ft=function(){var q=!1,r=!1,t=!1;if(this.W("intersectionDistance")){r=(r=this.get("intersectionDistance"))?h.ow(r):h.Dt();var u=r/h.Dt();this.Jea.makeTranslation(0,0,-r);this.Jea.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.Jea),g.ot(this.R0,c),g.ot(this.P0,c));q&&(c.identity(),
(r=this.get("matrix"))&&c.multiply(r),c.multiply(this.Eja),g.ot(this.Dja,c));if(t)for(r=this.get("matrix"),q=0;q<this.RL.length;q++)c.identity(),r&&c.multiply(r),c.multiply(this.IG[q]),g.ot(this.RL[q],c)};a.prototype.LI=function(){if(this.W("index","meshGroup")){var q=this.get("meshGroup");q&&q.children.forEach(function(r){g.M$(r,this.get("index"))}.bind(this))}};a.prototype.Gfa=function(){return this.get("pressed")?this.La.P.get("vrPointerSelectionColor"):this.get("over")?this.La.P.get("vrPointerOverColor"):
this.La.P.get("vrPointerColor")};return a});
define("tdv/player/view/panorama/renderer/pointer/LaserPointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/object/Laser tdv/player/view/panorama/renderer/object/Reticle tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/util/Gamepad tdv/player/view/util/XR tdv/player/view/util/geo/Quaternion".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/object/Laser"),k=a("tdv/player/view/panorama/renderer/object/Reticle"),e=a("tdv/player/view/panorama/renderer/object/ToolTip"),b=a("tdv/player/view/panorama/renderer/pointer/Beam"),c=a("tdv/player/view/panorama/renderer/pointer/Pointer"),d=a("tdv/player/view/util/Gamepad"),f=a("tdv/player/view/util/XR"),l=a("tdv/player/view/util/geo/Quaternion"),p=new THREE.Matrix4,
q=Math.PI/180;a=m.extend(c,function(r){c.call(this,c.F_,r);this.il=this.I=null;this.Vl=[];this.$k=new g;this.j.add(this.$k);this.Qe=new k;this.j.add(this.Qe);this.$l=!1;this.Rq="";this.jc=null;this.Tm=new THREE.Matrix4});a.prototype.clear=function(){this.j.remove(this.$k);this.j.remove(this.Qe);this.Qe=this.$k=null;this.jc&&this.j.remove(this.jc);this.jc=null};a.prototype.update=function(r){this.I=r;this.Qe.set("changing",r.Hn);this.Qe.set("visible",r.Hn);var t=d.Ug();if(t&&!t.phb()){var u=t.quaternion(),
v=t.position(),w=f.Ag&&f.Ec,x=l.Xa(f.Ag&&f.ug);this.Tm.identity();v?(this.Tm.multiply(p.makeRotationY((x-r.Xa)*q)),this.Tm.multiply(p.makeTranslation(-w.x,-w.y,-w.z)),this.Tm.multiply(p.makeTranslation(v.x,v.y,v.z)),this.Tm.multiply(p.makeRotationFromQuaternion(u))):(this.Tm.multiply(p.makeRotationY(-r.Xa*q)),t.hand()==d.fb?this.Tm.multiply(p.makeTranslation(-.2,-.4,0)):this.Tm.multiply(p.makeTranslation(.2,-.4,0)),this.Tm.multiply(p.makeRotationY(x*q)),this.Tm.multiply(p.makeRotationFromQuaternion(u)),
this.Tm.multiply(p.makeTranslation(0,0,-.3)));this.$k.set("matrix",null);this.$k.set("matrix",this.Tm);this.$k.set("pressed",t.pressed());this.$k.set("visible",!0)}else this.$k.set("visible",!1);this.jm();r=!!t&&t.pressed();this.$l!=r&&(this.$l&&this.OL(),this.$l=r);this.$k.yi();this.Qe.yi()};a.prototype.OL=function(){var r=this.Ll(h.Xf);this.gm(r);this.$k.set("over",!0);this.$k.set("dotVisible",!0);this.$k.set("intersectionDistance",r.xw());d.Ug();this.ula()};a.prototype.ula=function(){this.j.Vb().o(h.cG,
{jQ:h.Xf})};a.prototype.jm=function(){var r=this.Ll(h.Jm);this.gm(r);this.Gz(r.mB());a:{var t=this.Vl;for(var u=r.Vl,v=0;v<t.length;v++)if(u.indexOf(t[v])<0){t=!1;break a}for(v=0;v<u.length;v++)if(t.indexOf(u[v])<0){t=!1;break a}t=!0}t||!r.uaa()&&!this.$k.get("over")||(this.Vl=r.Vl,d.Ug());this.$k.set("over",r.uaa());this.$k.set("intersectionDistance",r.xw());this.$k.set("dotVisible",!r.Vdb())};a.prototype.Gz=function(r){this.Rq!=r&&(this.Rq&&this.j.remove(this.jc),this.Rq=r)&&(this.jc=new e(this.Rq),
this.jc.set("text",this.Rq),this.jc.set("matrix",null),this.jc.set("matrix",this.Tm),this.j.add(this.jc))};a.prototype.gm=function(r){this.j.rX().sort(function(t,u){return u.get("index")-t.get("index")}).forEach(function(t){t.ao(r)}.bind(this))};a.prototype.Ll=function(r){this.il=n.lfb(this.Tm,this.il);return new b(this,[this.il],this.iLa(this.I),r)};return a});
define("tdv/player/view/panorama/renderer/pointer/MousePointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/view/constants/Cursor".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),
k=a("tdv/player/view/panorama/renderer/pointer/Beam"),e=a("tdv/player/view/panorama/renderer/pointer/Pointer"),b=a("tdv/view/constants/Cursor");a=m.extend(e,function(c){e.call(this,e.XQ,c);this.j.P.bind(h.gb,this.bl,this,!0);this.j.P.bind(h.Pr,this.xAa,this,!0);this.j.P.bind(h.Eb,this.p7a,this,!0);this.j.P.bind(h.Sa,this.te,this,!0);this.j.P.bind(h.$a,this.cl,this,!0);this.oz=this.nz=this.sz=this.mp=this.Bd=this.Ad=void 0;this.il=this.I=null;this.PN=void 0;this.jc=""});a.prototype.clear=function(){this.j.P.h(h.gb,
this.bl,this,!0);this.j.P.h(h.Pr,this.xAa,this,!0);this.j.P.h(h.Sa,this.te,this,!0);this.j.P.h(h.$a,this.cl,this,!0);this.pma&&(this.j.TP(b.qf),this.pma=!1);this.Gz("")};a.prototype.update=function(c){this.I=c;this.Xla()};a.prototype.xLa=function(){return{x:this.Ad,y:this.Bd,pageX:this.nz,pageY:this.oz}};a.prototype.bl=function(c){this.Ad=c.x;this.Bd=c.y;this.nz=c.pageX;this.oz=c.pageY;this.c6()};a.prototype.xAa=function(){this.oz=this.nz=this.Bd=this.Ad=void 0;this.c6()};a.prototype.p7a=function(){this.oz=
this.nz=this.Bd=this.Ad=void 0;this.c6()};a.prototype.te=function(c){c.zE&&c.zE.which===3||(this.Ad=this.mp=c.x,this.Bd=this.sz=c.y,this.nz=c.pageX,this.oz=c.pageY,this.gm(this.Ll(h.Cu)))};a.prototype.cl=function(c){c.zE&&c.zE.which===3||(this.Ad=c.x,this.Bd=c.y,this.nz=c.pageX,this.oz=c.pageY,this.gm(this.Ll(h.TB)),this.Yga(this.mp,this.sz,this.Ad,this.Bd)&&this.gm(this.Ll(h.Xf)))};a.prototype.Xla=function(){this.gt||(this.gt=setTimeout(function(){this.gt=null;this.jm()}.bind(this),300))};a.prototype.c6=
function(){this.gt&&(clearTimeout(this.gt),this.gt=null);this.jm()};a.prototype.jm=function(){var c=this.Ll(h.Jm);this.gm(c);this.Gz(c.mB());c=c.XRa();this.PN!=c&&(this.PN&&this.j.TP(this.PN),(this.PN=c)&&this.j.W9(this.PN))};a.prototype.Gz=function(c){this.jc!=c&&(this.jc=c,this.j.P.set("toolTip",this.jc))};a.prototype.gm=function(c){this.j.rX().sort(function(d,f){return f.get("index")-d.get("index")}).forEach(function(d){d.ao(c)}.bind(this))};a.prototype.Ll=function(c){return new k(this,this.s1(),
null,c)};a.prototype.s1=function(){if(this.Ad!==void 0&&this.Bd!==void 0&&this.I.sh){var c=g.getCamera(this.I.sh);if(c)return this.il=n.yLa(c,this.Ad,this.Bd,this.I.width,this.I.height,this.il),[this.il]}return[]};a.prototype.Yga=function(c,d,f,l){c=f-c;d=l-d;return Math.sqrt(c*c+d*d)<=5};return a});
define("tdv/player/view/panorama/renderer/pointer/TouchPointer","require tdv/utils tdv/constants/EventName tdv/player/view/panorama/renderer/3d/util/RayUtil tdv/player/view/panorama/renderer/3d/util/SceneUtil tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/player/view/panorama/renderer/3d/util/RayUtil"),g=a("tdv/player/view/panorama/renderer/3d/util/SceneUtil"),k=a("tdv/player/view/panorama/renderer/pointer/Beam"),
e=a("tdv/player/view/panorama/renderer/pointer/Pointer");a=m.extend(e,function(c){e.call(this,e.YQ,c);this.P=this.j.P;this.P.bind(h.Sa,this.te,this,!0);this.P.bind(h.$a,this.cl,this,!0);this.P.bind(h.L("touchOverAreaScale"),this.Gia,this,!0);this.sz=this.mp=this.Bd=this.Ad=void 0;this.Awa=this.I=null;this.Gia();this.u6a=Array(b.length);this.jc="";this.jm=this.jm.bind(this)});a.prototype.clear=function(){this.P.h(h.Sa,this.te,this,!0);this.P.h(h.$a,this.cl,this,!0);this.P.h(h.L("touchOverAreaScale"),
this.Gia,this,!0);this.Gz("")};a.prototype.update=function(c){this.I=c;this.Xla()};a.prototype.te=function(c){this.Ad=this.mp=c.x;this.Bd=this.sz=c.y;this.gm(this.Ll(h.Cu))};a.prototype.cl=function(c){this.Ad=c.x;this.Bd=c.y;this.gm(this.Ll(h.TB));this.Yga(this.mp,this.sz,this.Ad,this.Bd)&&this.gm(this.Ll(h.Xf))};a.prototype.Xla=function(){this.gt||(this.gt=setTimeout(this.jm,300))};a.prototype.c6=function(){this.gt&&(clearTimeout(this.gt),this.gt=null);this.jm()};a.prototype.jm=function(){this.gt=
null;var c=this.Ll(h.Jm);this.gm(c);this.Gz(c.mB())};a.prototype.Gz=function(c){if(this.jc!=c&&(this.jc=c,c=this.j.P,c.set("toolTip",this.jc),!c.get("toolTipDisabled"))){var d=c.Vb().jc;this.jc?d.amb(c,this.jc):d.oe()}};a.prototype.gm=function(c){this.j.rX().sort(function(d,f){return f.get("index")-d.get("index")}).forEach(function(d){d.ao(c)}.bind(this))};a.prototype.Ll=function(c){var d=c==h.Jm?this.s1(this.I.width*.5,this.I.height*.5,this.ywa,this.Awa):this.s1(this.Ad,this.Bd,b,this.u6a);return new k(this,
d,null,c)};a.prototype.s1=function(c,d,f,l){var p=this.I.sh&&g.getCamera(this.I.sh);if(p){var q=this.I.width,r=this.I.height,t=Math.min(q,r)/100;f.forEach(function(u,v){l[v]=n.yLa(p,c+u[0]*t,d+u[1]*t,q,r,l[v])});return l}return[]};a.prototype.Yga=function(c,d,f,l){c=f-c;d=l-d;return Math.sqrt(c*c+d*d)<=4*Math.round(1*Math.min(window.screen.width,window.screen.height)/100)};a.prototype.Gia=function(){this.ywa=this.p1a(this.P.get("touchOverAreaScale"));this.Awa=Array(this.ywa.length)};a.prototype.p1a=
function(c){var d=[],f=Math.min(50,Math.ceil(c*5)),l=Math.min(50,Math.ceil(c*30));c=Math.min(50,Math.ceil(c*15));for(var p=-f;p<=f;p++)for(var q=-f;q<=f;q++){var r=Math.sqrt(q*q+p*p);r<=f&&d.push([q,p,r])}for(q=-l;q<-f;q++)d.push([q,0,Math.sqrt(q*q)]);for(q=f+1;q<=l;q++)d.push([q,0,Math.sqrt(q*q)]);for(p=-c;p<-f;p++)d.push([0,p,Math.sqrt(p*p)]);for(p=f+1;p<=c;p++)d.push([0,p,Math.sqrt(p*p)]);d.sort(function(t,u){return t[2]-u[2]});return d.map(function(t){return[t[0],t[1]]})};var b=function(){for(var c=
[],d=0;d<5;d++)for(var f=-2+4*d/4,l=0;l<5;l++){var p=-2+4*l/4,q=Math.sqrt(p*p+f*f);q<=2&&c.push([p,f,q])}c.sort(function(r,t){return r[2]-t[2]});return c.map(function(r){return[r[0],r[1]]})}();return a});
define("tdv/player/view/panorama/renderer/pointer/WebXRPointer","require exports tdv/constants/EventName tdv/player/view/panorama/renderer/object/ToolTip tdv/player/view/panorama/renderer/pointer/Beam tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/3d/util/GeometryUtil tdv/player/view/util/XR three.mod".split(" "),function(a,m,h,n,g,k,e,b,c){function d(r,t){for(var u=0;u<r.length;u++)if(t.indexOf(r[u])<0)return!1;for(u=0;u<t.length;u++)if(r.indexOf(t[u])<0)return!1;
return!0}a=function(r){function t(u){u=r.call(this,k.ZQ,u)||this;u.Hn=!1;u.HPa=new Map;u.SP=new Map;u.UX=null;u.nsa=u.nsa.bind(u);document.body.addEventListener("touchend",u.nsa);b.M.bind(h.Xf,u.Lt,u,!0);return u}P(t,r);t.prototype.clear=function(){b.M.h(h.Xf,this.Lt,this);this.SP.forEach(function(u,v,w){this.aKa(u);w.delete(v)}.bind(this))};t.prototype.update=function(u){this.state=u;this.snb();this.cB(u.Hn);this.tQ()};t.prototype.Lt=function(u){this.UX=u=u.data.pointerState;u.eA||this.LQa(u)};t.prototype.nsa=
function(){var u=b.ud[0]||null;u&&!u.eA&&this.LQa(u)};t.prototype.LQa=function(u){f.copy(u.ray).applyMatrix4(u.matrixWorld);var v=new g(this,[f],b.bP,h.Xf,this.UX==u);this.KQa(v);b.YE(u,!1,!1,u.xw);b.PY(u,50);this.bnb()};t.prototype.cB=function(u){this.Hn!==u&&(this.Hn=u,b.ud.forEach(function(v){b.klb(v,u)}))};t.prototype.snb=function(){this.SP.forEach(function(u,v){b.ud.includes(v)||(this.aKa(u),this.SP.delete(v))}.bind(this));b.ud.forEach(function(u){this.SP.has(u)||this.SP.set(u,this.Mdb());b.A$(u,
!1)}.bind(this))};t.prototype.tQ=function(){var u=b.ud.find(function(A){return A.eA})?[]:b.ud;this.UX=this.UX||(b.ud.length?b.ud.find(function(A){return A.handedness=="right"})||b.ud[0]:null);for(var v=0;v<u.length;v++){var w=u[v];f.copy(w.ray).applyMatrix4(w.matrixWorld);var x=new g(this,[f],b.bP,h.Jm,this.UX==w);this.KQa(x);this.Znb(x,w);var y=this.HPa.get(w),z=x.Vl;y&&d(y,z)||(this.HPa.set(w,z),y=(y=x.xw())?e.ow(y):e.Dt(),z=z.length>0,((x=x.uaa())||w.nr)&&b.PY(w,5),b.YE(w,z,x,y))}};t.prototype.Znb=
function(u,v){var w=u.mB()||"",x=this.SP.get(v);x&&w!==x.get("text")&&(w?(x.set("text",w),x.set("alpha",1),x.yi(),w=(w=u.xw())?e.ow(w):e.Dt(),l.radius=w,x.set("intersectionYaw",void 0),x.set("intersectionPitch",void 0),f.copy(v.ray).applyMatrix4(v.matrixWorld),f.intersectSphere(l,p)&&(p.x==0&&p.z==0||x.set("intersectionYaw",q*Math.atan2(p.x,-p.z)),p.y==0&&p.z==0||x.set("intersectionPitch",q*Math.atan2(p.y,Math.sqrt(p.z*p.z+p.x*p.x))),x.set("intersectionDistance",u.xw()))):(x.set("text",""),x.set("alpha",
0)))};t.prototype.KQa=function(u){this.j.rX().sort(function(v,w){return w.get("index")-v.get("index")}).forEach(function(v){v.ao(u)}.bind(this))};t.prototype.bnb=function(){var u=this.j.Vb();u&&u.o(h.cG,{jQ:h.Xf})};t.prototype.Mdb=function(){var u=new n;u.set("alpha",0);this.j.add(u);return u};t.prototype.aKa=function(u){this.j.remove(u)};return t}(k);var f=new c.Ray,l=new c.Sphere,p=new c.Vector3,q=180/Math.PI;return a});
define("tdv/player/view/panorama/renderer/pointer/Factory","require tdv/player/view/panorama/renderer/pointer/GazePointer tdv/player/view/panorama/renderer/pointer/LaserPointer tdv/player/view/panorama/renderer/pointer/MousePointer tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/pointer/TouchPointer tdv/player/view/panorama/renderer/pointer/WebXRPointer".split(" "),function(a){var m=a("tdv/player/view/panorama/renderer/pointer/GazePointer"),h=a("tdv/player/view/panorama/renderer/pointer/LaserPointer"),
n=a("tdv/player/view/panorama/renderer/pointer/MousePointer"),g=a("tdv/player/view/panorama/renderer/pointer/Pointer"),k=a("tdv/player/view/panorama/renderer/pointer/TouchPointer"),e=a("tdv/player/view/panorama/renderer/pointer/WebXRPointer");return{create:function(b,c){switch(b){case g.ZQ:return new e(c);case g.WB:return new m(c,!0);case g.E_:return new m(c,!1);case g.F_:return new h(c);case g.XQ:return new n(c);case g.YQ:return new k(c)}}}});
define("tdv/player/view/panorama/renderer/util/CursorManager",["require","tdv/view/constants/Cursor"],function(a){function m(n){this.dc=n;this.Gf=[]}var h=a("tdv/view/constants/Cursor");m.prototype.push=function(n){this.Gf.push(n);this.za()};m.prototype.pop=function(n){for(var g=this.Gf.length-1;g>=0;g--)if(this.Gf[g]==n){this.Gf.splice(g,1);this.za();break}};m.prototype.clear=function(){this.Gf.length>0&&(this.dc.set("cursor",h.De),this.Gf=[])};m.prototype.za=function(){this.dc.set("cursor",this.Gf.indexOf(h.Li)>=
0?h.Li:this.Gf.indexOf(h.qf)>=0?h.qf:this.Gf.length>0?this.Gf[this.Gf.length-1]:h.De)};return m});
define("tdv/player/view/panorama/renderer/Renderer","require tdv/utils tdv/binding/BindingsHandler tdv/constants/EventName tdv/events/Event tdv/view/core/UIComponent tdv/view/constants/Cursor tdv/player/view/util/Device tdv/player/view/util/Gamepad tdv/player/view/util/geo/Frustum tdv/player/view/Flash tdv/player/view/panorama/renderer/RendererState tdv/player/view/panorama/renderer/3d/Renderer tdv/player/view/panorama/renderer/object/Factory tdv/player/view/panorama/renderer/object/Root tdv/player/view/panorama/renderer/pointer/Factory tdv/player/view/panorama/renderer/pointer/Pointer tdv/player/view/panorama/renderer/util/CursorManager tdv/player/view/panorama/renderer/OcclusionCuller tdv/player/view/panorama/renderer/TextureLoader tdv/player/view/util/geo/Fov tdv/player/view/util/XR tdv/view/util/Animation tdv/view/util/Screenshot".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),k=a("tdv/view/core/UIComponent"),e=a("tdv/view/constants/Cursor"),b=a("tdv/player/view/util/Device"),c=a("tdv/player/view/util/Gamepad"),d=a("tdv/player/view/util/geo/Frustum"),f=a("tdv/player/view/Flash"),l=a("tdv/player/view/panorama/renderer/RendererState"),p=a("tdv/player/view/panorama/renderer/3d/Renderer"),q=a("tdv/player/view/panorama/renderer/object/Factory"),r=a("tdv/player/view/panorama/renderer/object/Root"),
t=a("tdv/player/view/panorama/renderer/pointer/Factory"),u=a("tdv/player/view/panorama/renderer/pointer/Pointer"),v=a("tdv/player/view/panorama/renderer/util/CursorManager"),w=a("tdv/player/view/panorama/renderer/OcclusionCuller"),x=a("tdv/player/view/panorama/renderer/TextureLoader"),y=a("tdv/player/view/util/geo/Fov"),z=a("tdv/player/view/util/XR"),A=a("tdv/view/util/Animation"),D=a("tdv/view/util/Screenshot"),F=Math.PI/180,C=m.extend(k,function(B,H,E){k.call(this);this.gf("Renderer");this.set("toolTipDisabled",
!0);this.set("cursor",e.LB);this.set("layout","absolute");this.set("interactionEnabled",!1);this.Ie=B;this.P=H;this.ld=E;this.Oe=new v(H);this.we=null;this.Afa=!1;this.I=new l;this.La=new r(this.Ie,this.P,this.ld,this);this.La.bind(n.V,this.requestFrame,this,!0);this.pk=new p(this.P);this.I.sh=this.pk.Sf();this.I.QW=this.pk.nxa;this.I.RW=this.pk.oxa;this.I.camera=this.pk.getCamera();this.eAa=(new Date).getTime();this.G5=new x;this.G5.bind(n.ia,this.K5a,this,!0);this.VAa=new w;this.VAa.bind(n.V,this.n5a,
this,!0);this.h1=new d(this.I.width,this.I.height,this.I.Wd*F);this.bind(n.$b,this.kd,this,!0);this.bind(n.od,this.cp,this,!0);this.bind(n.jd,this.ap,this,!0);z.M.bind(n.V,this.mn,this,!0);c.bind(n.V,this.W4a,this,!0);h.ba(this.ld,["fxaaEnabled","aaEnabled","hotspotsEnabled","preloadEnabled"],function(){this.I.DJ=this.ld.get("hotspotsEnabled");this.I.xY=this.ld.get("preloadEnabled");this.I.eoa=this.ld.get("fxaaEnabled");this.I.uW=this.ld.get("aaEnabled");this.requestFrame()}.bind(this),!0);h.ba(this.ld,
["surfaceSelectionEnabled"],this.gma.bind(this));this.gma();this.mn();h.ba(this.Ie,["defaultVRPointer"],this.Sq.bind(this));this.Sq()});C.prototype.create=function(B){return q.create(B)};C.prototype.add=function(B){this.La.appendChild(B);this.La.Cb().length==1&&this.T4a()};C.prototype.remove=function(B){if(B=this.La.Jf(B))B.remove(),this.La.Cb().length==0&&this.b5a()};C.prototype.Jf=function(B){return this.La.Jf(B)};C.prototype.rX=function(){return this.La.all()};C.prototype.Ckb=function(B){this.Afa!=
B&&(this.Afa=B,this.Sq())};C.prototype.pRa=function(B){this.I.Ipa=B};C.prototype.W9=function(B){this.Oe.push(B)};C.prototype.TP=function(B){this.Oe.pop(B)};C.prototype.cB=function(B){this.I.Hn=B;this.requestFrame()};C.prototype.hK=function(){this.YG.o();this.I.GJ=!0;this.z4();var B=D.HSa(this.pk.If());this.I.GJ=!1;this.z4();return B};C.prototype.hna=function(B){this.I.GJ=!0;this.z4();B=this.pk.hna(B);this.I.GJ=!1;return B};C.prototype.getPixelRatio=function(){return this.pk.getPixelRatio()};C.prototype.Aw=
function(){return!!this.pk&&this.pk.Aw()};C.prototype.Kb=function(){k.prototype.Kb.call(this);this.YG||(this.YG=new f,this.wa().tk(this.YG.cc()))};C.prototype.Sq=function(){var B=this.I.Va?u.ZQ:this.Afa?u.E_:b.ub()?u.YQ:u.XQ;this.we&&this.we.getType()==B||(this.we&&this.we.clear(),this.we=t.create(B,this),this.gma(),this.we.update(this.I))};C.prototype.gma=function(){this.I.wZ=this.ld.get("surfaceSelectionEnabled")&&[u.XQ,u.ZQ,u.YQ,u.E_].indexOf(this.we&&this.we.getType())>=0};C.prototype.np=function(){this.Oe.clear();
k.prototype.np.call(this)};C.prototype.kd=function(){var B=this.nb(),H=this.Mb();if(this.I.width!=B||this.I.height!=H)B&&H?(this.I.width=B,this.I.height=H,this.h1.KRa(this.I.width),this.h1.eRa(this.I.height),this.requestFrame()):m.log("Invalid size values: "+B+" "+H)};C.prototype.cp=function(){this.I.enabled=!0;this.requestFrame()};C.prototype.ap=function(){this.I.enabled=!1};C.prototype.mn=function(){this.I.Va=z.isPresenting;this.Sq();this.requestFrame()};C.prototype.W4a=function(){this.Sq();this.requestFrame()};
C.prototype.K5a=function(){this.requestFrame()};C.prototype.n5a=function(){this.requestFrame()};C.prototype.T4a=function(){this.G5.B$(this.P.Rc().Kn())};C.prototype.b5a=function(){this.pk.Keb();this.G5.B$(null)};C.prototype.D$=function(B){this.B4!=B&&((this.B4=B)||this.requestFrame())};C.prototype.sK=function(B){this.I.Ik!=B&&(this.I.Ik=B,this.requestFrame())};C.prototype.setPosition=function(B,H,E,G){if(this.I.Xa!=B||this.I.pitch!=H||this.I.Mg!=E||this.I.Wd!=G)isNaN(B)||isNaN(H)||isNaN(E)||!G?m.log("Invalid position values: "+
B+" "+H+" "+E+" "+G):(this.I.Xa=B,this.I.pitch=H,this.I.Mg=E,this.I.Wd=G,this.h1.mK(this.I.Wd*F),this.requestFrame())};C.prototype.Jc=function(){return this.I.Xa};C.prototype.Ic=function(){return this.I.pitch};C.prototype.yg=function(){return this.I.Mg};C.prototype.jf=function(){return this.I.Wd};C.prototype.dP=function(){return this.I.Va?this.I.kj:y.zr(this.I.kj,this.I.width,this.I.height)};C.prototype.eP=function(){return this.I.kj};C.prototype.unproject=function(B){return this.h1.unproject(B)};
C.prototype.requestFrame=function(){A.requestFrame(this.sq,this)};C.prototype.sq=function(){if(A.m8){var B=(new Date).getTime(),H=Math.max(1,Math.min(B-this.eAa,33));this.eAa=B;this.o(new g(C.Dba,{frameTime:H}));this.I.enabled&&(this.I.zf=H,this.z4())}else this.requestFrame()};C.prototype.z4=function(){this.La.Cb().length!=0&&(this.pk.update(this.I),this.I.Sj=this.pk.Zeb(),this.I.Rj=this.pk.Yeb(),this.I.kj=this.pk.Web(),this.I.tl=this.pk.getPixelRatio(),this.I.camera=this.pk.getCamera(),this.La.update(this.I),
this.G5.update(this.I),this.VAa.update(this.I),this.we.update(this.I),this.B4||this.pk.render())};C.Dba="render start";C.mqb=function(){return!0};return C});
define("tdv/player/view/panorama/control/RenderingController",["require","tdv/utils","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/panorama/renderer/Renderer"],function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/panorama/renderer/Renderer"),k=m.extend(n,function(e){n.call(this);this.j=e;this.j.bind(g.Dba,this.HCa,this,!0)});k.prototype.clear=function(){this.j.h(g.Dba,this.HCa,this,!0);this.j=null};k.prototype.requestFrame=
function(){this.j.requestFrame()};k.prototype.HCa=function(e){e=e.data.frameTime;this.o(new h(k.IF,{frameTime:e}));this.o(new h(k.JF,{frameTime:e}))};k.IF="frameStart";k.JF="positionSet";return k});
define("tdv/player/view/panorama/control/camera/OrientationFOVManager",["require","tdv/player/view/util/Device","tdv/player/view/util/geo/Fov"],function(a){function m(){this.Ha=this.Pa=0;this.kb=90;this.Js="landscape";this.fp=0;this.S1=h.ub()}var h=a("tdv/player/view/util/Device"),n=a("tdv/player/view/util/geo/Fov");m.prototype.lRa=function(g){this.kb=this.QKa(g)};m.prototype.QKa=function(g){return this.S1&&this.Js=="portrait"?n.hJ(g,this.Ha,this.Pa):g};m.prototype.vfb=function(g){return this.S1&&
this.Js=="portrait"?n.um(g,this.Pa,this.Ha):g};m.prototype.rr=function(g){this.kb=this.S1&&this.ypb?n.hJ(g,this.Ha,this.Pa):g};m.prototype.kw=function(){return this.S1&&this.Js=="portrait"};m.prototype.jf=function(){return this.kb};m.prototype.PW=function(g){return n.hJ(g,this.Ha,this.Pa)};m.prototype.setSize=function(g,k){this.Pa=g;this.Ha=k;g=this.e2a();this.Js!=g&&this.fp++;this.Js=g};m.prototype.e2a=function(){return this.Pa===0||this.Ha===0?"landscape":this.Pa<this.Ha?"portrait":"landscape"};
return m});
define("tdv/player/view/panorama/control/translate/KeyboardManager","require tdv/utils tdv/constants/Key tdv/events/Event tdv/events/EventDispatcher tdv/view/util/KeyboardControl".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/Key"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/view/util/KeyboardControl"),e=m.extend(g,function(d){g.call(this);this.j=d;this.ha=!1;this.Ym=this.Ym.bind(this);this.ld=this.j.ld});e.prototype.clear=function(){this.ld=this.j=null};e.prototype.Ra=
function(d){this.ha!=d&&(this.ha&&document.removeEventListener("keyup",this.Ym),(this.ha=d)&&document.addEventListener("keyup",this.Ym))};e.prototype.Ym=function(d){k.yp()||this.ld.get("gazeModeEnabled")||this.ld.get("arrowKeysAction")!="translate"||(c.includes(d.which)&&!d.shiftKey?this.o(new n(e.tba)):b.includes(d.which)&&!d.shiftKey&&this.o(new n(e.uba)))};const b=[h.bk,h.uo],c=[h.Ji,h.qo];e.uba="moveForward";e.tba="moveBackward";return e});
define("tdv/player/view/panorama/control/translate/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/translate/KeyboardManager".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/control/translate/KeyboardManager");a=m.extend(g,function(b){g.call(this);this.j=b;this.Uo=new k(b);this.Uo.bind(k.uba,this.KBa,
this,!0);this.Uo.bind(k.tba,this.JBa,this,!0)});a.prototype.clear=function(){this.Uo.h(k.uba,this.KBa,this,!0);this.Uo.h(k.tba,this.JBa,this,!0);this.Uo.clear();this.Uo=null};a.prototype.SE=function(b){this.Uo.Ra(b)};a.prototype.Vf=function(b){this.Ba=b};a.prototype.end=function(){this.Ba=null};a.prototype.KBa=function(b){this.tGa(b);(b=this.yEa(this.j.Jc(),this.Rya()))&&b.o(h.Wr)};a.prototype.JBa=function(b){this.tGa(b);(b=this.yEa(this.j.Jc()-180,this.Rya()))&&b.o(h.Wr)};a.prototype.tGa=function(b){this.j.Vb().o(new n(h.cG,
{jQ:b}))};a.prototype.Rya=function(){return this.j.ld.get("keyboardTranslateSelectionAngle")};a.prototype.yEa=function(b,c){var d,f;if(!this.Ba)return null;d!==void 0||(d=-90);f!==void 0||(f=360);var l=b-c*.5,p=b+c*.5,q=Math.max(-90,d-f*.5),r=Math.max(90,d+f*.5);c=this.Ba.get("adjacentPanoramas",[]).slice();c=c.filter(function(t){if(!t.get("enabled"))return!1;t=this.ls(t);if(!t)return!1;var u=t.Xa;for(var v=b-180,w=b+180;u<v;)u+=w-v;for(;u>w;)u-=w-v;t=t.pitch;return l<=u&&u<=p&&q<=t&&t<=r}.bind(this));
if(c.length==0)return null;c.sort(function(t,u){t=this.ls(t);u=this.ls(u);return(b-t.Xa)*(b-t.Xa)+(d-t.pitch)*(d-t.pitch)-((b-u.Xa)*(b-u.Xa)+(d-u.pitch)*(d-u.pitch))}.bind(this));return c[0]};a.prototype.ls=function(b){var c=b.get("yaw");b=b.get("distance");if(c===void 0||b===void 0)return null;var d=this.Ba.get("distanceToFloor");return{Xa:c,pitch:-90+Math.atan2(b,d)*e}};var e=180/Math.PI;return a});
define("tdv/player/view/panorama/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/panorama/control/AudioController tdv/player/view/panorama/control/camera/Controller tdv/player/view/panorama/control/transition/Controller tdv/player/view/panorama/control/FramesController tdv/player/view/panorama/control/LoadController tdv/player/view/panorama/control/MapController tdv/player/view/panorama/control/RenderingController tdv/player/view/panorama/control/camera/OrientationFOVManager tdv/player/view/panorama/control/translate/Controller tdv/player/view/util/geo/Projection".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/panorama/control/AudioController"),e=a("tdv/player/view/panorama/control/camera/Controller"),b=a("tdv/player/view/panorama/control/transition/Controller"),c=a("tdv/player/view/panorama/control/FramesController"),d=a("tdv/player/view/panorama/control/LoadController"),f=a("tdv/player/view/panorama/control/MapController"),l=a("tdv/player/view/panorama/control/RenderingController"),
p=a("tdv/player/view/panorama/control/camera/OrientationFOVManager"),q=a("tdv/player/view/panorama/control/translate/Controller"),r=a("tdv/player/view/util/geo/Projection"),t=m.extend(g,function(u,v){g.call(this);this.P=u;this.j=v;this.j.set("visible",!1);this.Cc=new p;this.dm=new l(this.j);this.Fe=new d(this.j);this.bc=new b(this.P,this.j,this.Cc);this.yb=new e(this.j,this.Cc);this.og=new c(this.j);this.Yy=new f(this.j);this.Fd=new k(this.j);this.M5=new q(this.j);this.dm.bind(l.IF,this.fU,this,!0);
this.dm.bind(l.JF,this.gU,this,!0);this.Fe.bind(h.vd,this.TBa,this,!0);this.Fe.bind(h.Fg,this.QT,this,!0);this.Fe.bind(h.yc,this.Gj,this,!0);this.bc.bind(b.oc,this.bg,this,!0);this.bc.bind(b.Eba,this.UBa,this,!0);this.bc.bind(b.vba,this.lCa,this,!0);this.bc.bind(b.aba,this.aBa,this,!0);this.bc.bind(b.bba,this.bBa,this,!0);this.bc.bind(b.EF,this.ZT,this,!0);this.bc.bind(b.CF,this.$C,this,!0);this.bc.bind(b.DF,this.jz,this,!0);this.bc.bind(b.BF,this.YT,this,!0);this.bc.bind(b.Hr,this.ln,this,!0);this.yb.bind(e.oc,
this.bg,this,!0);this.yb.bind(e.Cl,this.Bs,this);this.yb.bind(e.Gr,this.bp,this);this.yb.bind(e.gd,this.Mf,this,!0);this.yb.bind(e.$j,this.Hs,this,!0);this.yb.bind(e.Zj,this.Gs,this,!0);this.og.bind(c.oc,this.bg,this,!0);this.og.bind(c.Ok,this.Fs,this,!0);this.og.bind(c.gd,this.Mf,this,!0);this.Yy.bind(f.tj,this.$Ba,this,!0)});t.prototype.clear=function(){this.Fe.clear();this.dm.clear();this.yb.clear();this.bc.clear();this.og.clear();this.Yy.clear();this.Fd.clear();this.Fe.h(h.vd,this.TBa,this);this.Fe.h(h.Fg,
this.QT,this);this.Fe.h(h.yc,this.Gj,this);this.dm.h(l.IF,this.fU,this);this.dm.h(l.JF,this.gU,this);this.bc.h(b.oc,this.bg,this);this.bc.h(b.Eba,this.UBa,this);this.bc.h(b.vba,this.lCa,this);this.bc.h(b.aba,this.aBa,this);this.bc.h(b.bba,this.bBa,this);this.bc.h(b.EF,this.ZT,this);this.bc.h(b.CF,this.$C,this);this.bc.h(b.DF,this.jz,this);this.bc.h(b.BF,this.YT,this);this.bc.h(b.Hr,this.ln,this);this.yb.h(e.HUa,this.bg,this);this.yb.h(e.Cl,this.Bs,this);this.yb.h(e.Gr,this.bp,this);this.yb.h(e.gd,
this.Mf,this,!0);this.yb.h(e.$j,this.Hs,this);this.yb.h(e.Zj,this.Gs,this);this.og.h(c.oc,this.bg,this);this.og.h(c.Ok,this.Fs,this);this.og.h(c.gd,this.Mf,this);this.Yy.h(f.tj,this.$Ba,this);this.P=this.j=this.M5=this.Fd=this.Yy=this.og=this.bc=this.yb=this.dm=this.Fe=null};t.prototype.v$=function(u){this.Yy.v$(u)};t.prototype.qra=function(u){this.bc.qra(u)};t.prototype.Vf=function(u,v,w){this.j.set("visible",!0);this.og.U$();u.set("currentTime",w);this.bc.start(u,v)};t.prototype.cE=function(){return this.Fe.Ba||
this.bc.efb()||this.bc.Xu};t.prototype.bB=function(){this.Fe.stop();this.og.end();this.yb.end();this.bc.oe();this.Yy.stop();this.Fd.end();this.M5.end()};t.prototype.YP=function(){this.yb.resume();this.og.YP()};t.prototype.OP=function(){this.yb.pause();this.og.OP()};t.prototype.play=function(){this.yb.play();this.Fd.play();this.og.play()};t.prototype.pause=function(){this.yb.pause();this.Fd.pause();this.og.pause()};t.prototype.stop=function(){this.yb.stop();this.Fd.stop();this.og.stop()};t.prototype.SE=
function(u){this.yb.SE(u);this.M5.SE(u)};t.prototype.getTime=function(){return this.og.getTime()};t.prototype.moveTo=function(u,v,w,x,y){this.yb.moveTo(u,v,w,x,y)};t.prototype.Jc=function(){return this.j?this.j.Jc():void 0};t.prototype.Ic=function(){return this.j?this.j.Ic():void 0};t.prototype.yg=function(){return this.j?this.j.yg():void 0};t.prototype.jf=function(){return this.j?this.Cc.vfb(this.j.jf()):void 0};t.prototype.dP=function(){return this.j?this.j.dP():void 0};t.prototype.eP=function(){return this.j?
this.j.eP():void 0};t.prototype.Mf=function(){var u=this.og.ql()||this.yb.ql();this.o(new n(t.gd,{state:u}))};t.prototype.wl=function(u){this.yb.wl(u)};t.prototype.WY=function(u){this.yb.WY(u)};t.prototype.UE=function(u){this.yb.UE(u)};t.prototype.YY=function(u){this.yb.YY(u)};t.prototype.Bg=function(u){this.og.Bg(u)};t.prototype.tK=function(u){this.yb.tK(u)};t.prototype.Goa=function(u,v){return(u=r.get(u,v,this.j.Jc(),this.j.Ic(),this.j.yg(),this.j.jf(),this.j.nb(),this.j.Mb()))?{x:u.x,y:u.y}:null};
t.prototype.Ffb=function(u,v){return(u=r.kob(u,v,this.j))?{yaw:u.Xa,pitch:u.pitch}:null};t.prototype.hK=function(){this.j.hK()};t.prototype.Woa=function(){return this.bc.Woa()};t.prototype.UBa=function(u){this.Fe.start(u.data.panorama)};t.prototype.Gj=function(u){this.j.cB(u.percent<100);this.o(new n(t.vx,{percent:u.percent}))};t.prototype.TBa=function(u){this.og.end();this.M5.Vf(u.data.panorama)};t.prototype.QT=function(){this.j.cB(!1);this.o(new n(t.vF))};t.prototype.bg=function(){this.dm.requestFrame()};
t.prototype.fU=function(u){u=u.data.frameTime;this.Cc.setSize(this.j.nb(),this.j.Mb());this.bc.YA(u);this.yb.YA(u)};t.prototype.gU=function(u){u=u.data.frameTime;this.bc.ze(u);this.yb.ze(u);this.og.ze(u);this.Yy.ze(u);this.Fd.ze(u)};t.prototype.ZT=function(u){this.Yy.display(u.data.panorama);this.og.nP(u.data.panorama);this.o(new n(t.EF,{panorama:u.data.panorama}))};t.prototype.lCa=function(u){this.Yy.oe(u.data.panorama)};t.prototype.aBa=function(u){this.og.start(u.data.panorama);this.Fd.start(u.data.panorama)};
t.prototype.bBa=function(){this.og.end();this.j.set("visible",!1)};t.prototype.YT=function(u){this.yb.end();this.Fd.end(u.data.nextPanorama);this.o(new n(t.BF,{panorama:u.data.panorama}))};t.prototype.jz=function(u){this.yb.start(u.data.panorama,u.data.camera);this.o(new n(t.DF,{panorama:u.data.panorama}))};t.prototype.$C=function(u){this.o(new n(t.CF,{panorama:u.data.panorama}))};t.prototype.$Ba=function(u){this.yb.xra(u.data.yawDelta,0)};t.prototype.Bs=function(u){this.o(new n(t.Cl,u.data))};t.prototype.bp=
function(u){this.o(new n(t.Gr,u.data))};t.prototype.ln=function(u){this.o(new n(t.Hr,u.data))};t.prototype.Hs=function(){this.og.vQ();this.o(new n(t.$j))};t.prototype.Gs=function(){this.o(new n(t.Zj))};t.prototype.bRa=function(u){this.og.qK(u)};t.prototype.RE=function(u){this.og.RE(u)};t.prototype.Fs=function(u){this.o(new n(t.Ok,u.data))};t.vx="loadingProgress";t.vF="loadingEnd";t.Cl="movementChange";t.Gr="positionChange";t.EF="panoramaStart";t.BF="panoramaEnd";t.DF="panoramaShow";t.CF="panoramaHide";
t.gd="playbackStateChange";t.$j="userInteractionStart";t.Zj="userInteractionEnd";t.Ok="timeChange";t.Hr="transitionEnd";return t});
define("tdv/player/script/PanoramaPlayer","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/constants/PlaybackState tdv/player/constants/RotationMode tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/script/PanoramaCamera tdv/player/view/panorama/control/Controller tdv/player/view/panorama/control/constants/Movement tdv/player/view/panorama/renderer/Renderer tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/InfoWindow tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/constants/State tdv/view/util/KeyboardControl".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/constants/PlaybackState"),k=a("tdv/player/constants/RotationMode"),e=a("tdv/player/parser/ClassInfo"),b=a("tdv/player/script/helper/ButtonProperty"),c=a("tdv/player/script/PlaybackMediaPlayer"),d=a("tdv/player/script/PanoramaCamera"),f=a("tdv/player/view/panorama/control/Controller"),l=a("tdv/player/view/panorama/control/constants/Movement"),p=a("tdv/player/view/panorama/renderer/Renderer"),q=a("tdv/player/view/util/Device"),
r=a("tdv/player/view/util/Gyroscope"),t=a("tdv/player/view/util/InfoWindow"),u=a("tdv/player/view/util/XR"),v=a("tdv/view/constants/ButtonMode"),w=a("tdv/view/constants/State"),x=a("tdv/view/util/KeyboardControl"),y=e.define("PanoramaPlayer",c,function(){c.call(this,"panorama");c.prototype.set.call(this,"rotationEnabled",!0);c.prototype.set.call(this,"zoomEnabled",!0);c.prototype.set.call(this,"surfaceSelectionEnabled",!1);c.prototype.set.call(this,"surfaceSelectionHorizontalAngle",90);c.prototype.set.call(this,
"surfaceSelectionVerticalAngle",180);c.prototype.set.call(this,"adjacentPanoramaPositionsEnabled",!1);c.prototype.set.call(this,"fxaaEnabled",!1);c.prototype.set.call(this,"aaEnabled",!1);this.Zka=this.uga=this.CC=this.j1=this.O2=this.F2=this.zda=this.hD=this.ij=this.$ca=!1;this.aga=!0;this.j5=this.g2=this.Ro=this.v0=!1;this.Ika=x.yp();x.eX.bind(h.V,this.Y4a,this,!0);this.gs=!1;this.g1=this.xfa=this.vf=this.ac=0;this.cja=this.eja=void 0;this.Vha=!0;this.Jj=g.ca;this.tq=this.tq.bind(this);this.U=this.j=
null;this.KAa={};for(var z in y.Ox)this.KAa[z]=this.s_a(z);this.Z_=new b(this,"buttonToggleGyroscope",v.ak);this.Z_.bind(h.Rk,function(){this.set("gyroscopeEnabled",!0)},this);this.Z_.bind(h.Lm,function(){this.set("gyroscopeEnabled",!1)},this);this.Z_.set("pressed",this.get("gyroscopeEnabled")&&r.ol);(new b(this,"buttonCardboardView",v.af)).bind(h.ma,function(){this.set("viewMode",y.kG)},this,!0);(new b(this,"buttonVRView",v.af)).bind(h.ma,function(){this.set("viewMode",y.kG)},this,!0);u.M.bind(h.V,
function(){this.vla("viewMode");this.o(y.Jba)},this,!0);this.Y_=new b(this,"buttonToggleGazeMode",v.ak);this.Y_.bind(h.Rk,function(){this.set("gazeModeEnabled",!0)},this);this.Y_.bind(h.Lm,function(){this.set("gazeModeEnabled",!1)},this);this.Y_.set("pressed",this.get("gazeModeEnabled"));this.$_=new b(this,"buttonToggleHotspots",v.ak);this.$_.bind(h.Rk,function(){this.set("hotspotsEnabled",!0)},this);this.$_.bind(h.Lm,function(){this.set("hotspotsEnabled",!1)},this);this.$_.set("pressed",this.get("hotspotsEnabled"));
this.c0=new b(this,"buttonToggleSurfaceSelection",v.ak);this.c0.bind(h.Rk,function(){this.set("surfaceSelectionEnabled",!0)},this);this.c0.bind(h.Lm,function(){this.set("surfaceSelectionEnabled",!1)},this);this.c0.set("pressed",this.get("surfaceSelectionEnabled"));this.SYa=new b(this,"buttonScreenshot",v.af);this.SYa.bind(h.ma,this.qEa,this,!0);this.be=m.mr(this.Sh,this)});y.wUa="cameraPositionChange";y.vx="loadingProgress";y.DUa="preloadMediaShow";y.Jba="viewModeChange";y.prototype.moveLeft=function(){this.md(l.dL)};
y.prototype.moveRight=function(){this.md(l.eL)};y.prototype.moveUp=function(){this.md(l.fL)};y.prototype.moveDown=function(){this.md(l.cL)};y.prototype.playLeft=function(){this.md([l.dL,l.PLAYING])};y.prototype.playRight=function(){this.md([l.eL,l.PLAYING])};y.prototype.playUp=function(){this.md([l.fL,l.PLAYING])};y.prototype.playDown=function(){this.md([l.cL,l.PLAYING])};y.prototype.play=function(){this.sn()};y.prototype.pause=function(){this.sv()};y.prototype.stop=function(){this.cD()};y.prototype.seek=
function(z){this.qI(z)};y.prototype.setFramePlaybackPosition=function(z){this.t8a(z)};y.prototype.setFrameTransitionPosition=function(z){this.u8a(z)};y.prototype.restart=function(){this.bD()};y.prototype.zoomIn=function(){this.md(l.Mx)};y.prototype.zoomOut=function(){this.md(l.Nx)};y.prototype.resumeCamera=function(){this.o7a()};y.prototype.pauseCamera=function(){this.g6a()};y.prototype.moveTo=function(z,A,D,F){this.JAa(z,A,D,F,!1)};y.prototype.setPosition=function(z,A,D,F){this.JAa(z,A,D,F,!0)};
y.prototype.getScreenPosition=function(z,A){return this.w2a(z,A)};y.prototype.getPanoramaPosition=function(z,A){return this.f2a(z,A)};y.prototype.saveScreenshot=function(){return this.qEa()};y.prototype.get=function(z,A){switch(z){case "currentTime":return this.U&&this.U.getTime()||0;case "viewMode":return u.isPresenting?y.kG:y.Jca;case "video":z="panorama";break;case "rendererPanorama":return this.U&&this.U.cE()}if(!A)switch(z){case "mouseControlMode":A=k.Kta;break;case "touchControlMode":A=k.Eua}return c.prototype.get.call(this,
z,A)};y.prototype.set=function(z,A){if(this.get(z)!=A){switch(z){case "application":this.$ca=!0;this.be();break;case "startTime":this.hD=!0;this.be();break;case "video":case "panorama":z="panorama";this.hD=!0;this.be();break;case "camera":this.zda=!0;this.be();break;case "viewerArea":this.ij=!0;this.be();break;case "displayPlaybackBar":case "hdrPanoramaDisplayPlaybackBarSteps":case "livePanoramaDisplayPlaybackBarSteps":case "buttonPlay":case "buttonPlayPause":this.gs=!0;this.be();break;case "mapPlayer":this.F2=
!0;this.be();break;case "model3DPlayer":this.O2=!0;this.be();break;case "gazeModeEnabled":q.Jp()&&(A=!1);A&&x.yp()&&x.Oqa();this.j1=!0;this.be();break;case "gyroscopeEnabled":this.CC=!0;this.be();break;case "gyroscopeVerticalDraggingEnabled":this.aga=!0;this.be();break;case "viewMode":A=="vr"&&(A=y.kG);A==y.kG?this.get("viewerArea").set("viewMode","vr"):this.get("viewerArea").set("viewMode","standard");A=u.isPresenting?y.kG:y.Jca;break;case "hotspotsEnabled":this.uga=!0;this.be();break;case "mouseControlMode":case "touchControlMode":this.v0=
!0;this.be();break;case "surfaceSelectionEnabled":this.Zka=!0,this.be()}c.prototype.set.call(this,z,A)}};y.prototype.sr=function(z){this.Ro!=z&&((this.Ro=z)?document.addEventListener("keyup",this.tq,!0):document.removeEventListener("keyup",this.tq,!0),this.U&&this.U.SE(this.Ro),this.g2=!0,this.be())};y.prototype.Y4a=function(){var z=x.yp();this.Ika!==z&&(this.j5=!0,this.Ika=z,this.be())};y.prototype.tq=function(z){var A=this.get("gazeModeKeyCode");A&&!x.yp()&&z.code==A&&this.set("gazeModeEnabled",
!this.get("gazeModeEnabled"))};y.prototype.jna=function(){return this.get("doubleClickAction")!="inherit"};y.prototype.enb=function(){this.fK([this])};y.prototype.qda=function(z){c.prototype.qda.call(this,z);z.bind(h.fi,this.DHa,this,!0)};y.prototype.Cla=function(z){c.prototype.Cla.call(this,z);z.h(h.fi,this.DHa,this,!0)};y.prototype.DHa=function(){switch(this.get("doubleClickAction")){case "toggle_fullscreen":var z=this.get("application").kk;z&&z.ol()&&z.toggle()}};y.prototype.s_a=function(z){var A=
y.Ox[z];z=new b(this,z,v.af);z.bind(h.Sa,function(){this.md(A.movement)},this);A.stopOnRelease&&z.bind(h.$a,function(){this.md(l.Fg)},this);return z};y.prototype.Sh=function(){if(this.ij||this.$ca)this.ij=this.$ca=!1,this.j5=this.g2=this.v0=this.CC=this.j1=this.O2=this.F2=!0,this.ny(),this.get("viewerArea")&&this.get("application")&&this.my(),this.lV(this.get("viewerArea"));var z=!1;if(this.j){this.F2&&(this.F2=!1,this.U.v$(this.get("mapPlayer")));this.O2&&(this.O2=!1,this.U.qra(this.get("model3DPlayer")));
this.v0&&(this.v0=!1,this.U.UE(this.get("mouseControlMode")),this.U.tK(this.get("touchControlMode")));if(this.hD||this.zda)this.g1=this.xfa=this.ac=this.vf=0,this.cja=this.eja=void 0,z=!0,this.zda=this.hD=!1,this.get("panorama")?this.U.Vf(this.get("panorama"),this.get("camera",new d),this.get("startTime")):(this.U.bB(),this.Vha=!0,this.Jj=g.ca,this.Jd(g.ca));if(this.j1||this.g2||this.j5){this.g2=this.j5=this.j1=!1;var A=this.get("gazeModeEnabled");this.j.Ckb(A&&this.Ro&&!this.Ika);this.Y_.set("pressed",
A)}this.aga&&(this.aga=!1,this.U.YY(this.get("gyroscopeVerticalDraggingEnabled",!0)));this.CC&&(this.CC=!1,(A=this.get("gyroscopeEnabled")&&r.ol)&&r.disabled&&(A=!1,t.vta.show(function(){r.Mqa(function(){this.set("gyroscopeEnabled",!0)}.bind(this))}.bind(this))),this.set("gyroscopeEnabled",A),this.U.WY(A),this.Z_.set("pressed",A));this.uga&&(this.uga=!1,this.$_.set("pressed",this.get("hotspotsEnabled")));this.gs&&(this.gs=!1,z=!0);this.Zka&&(this.Zka=!1,this.c0.set("pressed",this.get("surfaceSelectionEnabled")));
z&&this.Zz()}};y.prototype.SN=function(){this.U.Woa()||this.set("panorama",null)};y.prototype.my=function(){var z=this.get("viewerArea"),A=this.get("application");this.j=new p(A,z,this);this.j.xa({left:0,top:0,bottom:0,right:0});z.mb(this.j);this.U=new f(z,this.j);this.U.bind(f.Cl,this.Bs,this);this.U.bind(f.Gr,this.oBa,this);this.U.bind(f.vx,this.Gj,this);this.U.bind(f.vF,this.YM,this);this.U.bind(f.DF,this.jz,this,!0);this.U.bind(f.CF,this.$C,this,!0);this.U.bind(f.EF,this.ZT,this,!0);this.U.bind(f.BF,
this.YT,this,!0);this.U.bind(f.gd,this.Mf,this);this.U.bind(f.$j,this.Hs,this);this.U.bind(f.Zj,this.Gs,this);this.U.bind(f.Ok,this.Fs,this);this.U.bind(f.Hr,this.ln,this,!0);this.get("application").bind(h.L("mute"),this.WT,this);this.get("application").get("mute",!1)&&this.U.Bg(!0);this.U.SE(this.Ro);u.M.bind(h.V,this.mn,this,!0);this.Yda();this.xD(!0)};y.prototype.ny=function(){this.j&&(this.U.h(f.Cl,this.Bs,this),this.U.h(f.Gr,this.oBa,this),this.U.h(f.vx,this.Gj,this),this.U.h(f.vF,this.YM,this),
this.U.h(f.DF,this.jz,this,!0),this.U.h(f.CF,this.$C,this,!0),this.U.h(f.EF,this.ZT,this,!0),this.U.h(f.BF,this.YT,this,!0),this.U.h(f.gd,this.Mf,this),this.U.h(f.$j,this.Hs,this),this.U.h(f.Zj,this.Gs,this),this.U.h(f.Ok,this.Fs,this),this.U.h(f.Hr,this.ln,this),this.U.clear(),this.U=null,this.get("application").h(h.L("mute"),this.WT,this),this.j.getParent().removeChild(this.j),this.j=null,u.M.h(h.V,this.mn,this,!0),this.xD(!1))};y.prototype.WT=function(){this.j&&this.U.Bg(this.get("application").get("mute",
!1))};y.prototype.Mf=function(z){this.Jj=z.data.state;this.jh()};y.prototype.jh=function(){this.Jd(this.Vha||u.isPresenting?this.Jj:g.PLAYING)};y.prototype.Hs=function(){this.o(new n(h.Pua))};y.prototype.Gs=function(){this.o(new n(h.Oua))};y.prototype.ZT=function(z){this.o(new n(y.DUa,{panorama:z.data.panorama}))};y.prototype.YT=function(){};y.prototype.jz=function(z){this.Yda();this.kT(z.data.panorama)};y.prototype.$C=function(z){this.jT(z.data.panorama)};y.prototype.Bs=function(z){for(var A in y.Ox)this.KAa[A].set("state",
z.data[y.Ox[A].pressedOn]?w.Fb:w.De);this.Vha=z.data.stopped;this.jh();this.o(new n(h.Mta,z.data))};y.prototype.oBa=function(z){this.Yda();this.o(new n(y.wUa,z.data))};y.prototype.Yda=function(){this.U&&(this.set("yaw",this.U.Jc()),this.set("pitch",this.U.Ic()),this.set("roll",this.U.yg()),this.set("hfov",this.U.jf()),this.set("actualHFOV",this.U.dP()),this.set("actualVFOV",this.U.eP()))};y.prototype.Gj=function(z){this.j.getParent().xa({progressPercent:z.data.percent,progressVisible:!0});this.o(new n(y.vx,
z.data))};y.prototype.YM=function(){this.j.getParent().set("progressVisible",!1)};y.prototype.ln=function(){this.o(h.pca)};y.prototype.mn=function(){this.set("viewMode",u.isPresenting?y.kG:y.Jca);this.jh()};y.prototype.JAa=function(z,A,D,F,C){this.U&&this.U.moveTo(z,A,D,F,C)};y.prototype.md=function(z){this.U&&this.U.wl(z)};y.prototype.sn=function(){this.U&&this.U.play()};y.prototype.Ys=function(){this.U&&this.U.stop()};y.prototype.sv=function(){this.U&&this.U.pause()};y.prototype.qI=function(z){this.U&&
(this.Cya()?this.U.RE(z):this.U.bRa(z))};y.prototype.t8a=function(z){this.U&&this.U.bRa(z)};y.prototype.u8a=function(z){this.U&&this.U.RE(z)};y.prototype.g6a=function(){this.U&&this.U.OP()};y.prototype.o7a=function(){this.U&&this.U.YP()};y.prototype.w2a=function(z,A){if(this.U)return this.U.Goa(z,A)};y.prototype.f2a=function(z,A){if(this.U)return this.U.Ffb(z,A)};y.prototype.qEa=function(){this.U&&this.U.hK()};y.prototype.AU=function(z){this.qI(z.data.position)};y.prototype.Fs=function(z){this.vf=
z.data.time;this.ac=z.data.duration;this.xfa=z.data.transitionPosition;this.g1=z.data.transitionLength;this.eja=z.data.steps;this.cja=z.data.selectedStep;this.Zz()};y.prototype.Zz=function(){var z=this.j.getParent(),A=!1;if(this.w1a()){var D=this.Cya(),F=this.h2a();D?this.g1>0&&(z.xa({playbackBarPosition:this.xfa,playbackBarDuration:this.g1,playbackBarSteps:this.eja,playbackBarSelectedStep:this.cja,playbackBarLiveDragging:F}),A=!0):this.ac>0&&(z.xa({playbackBarPosition:this.vf,playbackBarDuration:this.ac,
playbackBarSteps:void 0,playbackBarSelectedStep:void 0,playbackBarLiveDragging:F}),A=!0)}z.set("playbackBarVisible",A)};y.prototype.w1a=function(){var z=this.get("panorama");return z?e.Oa("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):e.Oa("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):e.Oa("VideoPanorama",z)?this.get("videoPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!0)):!1:!1};y.prototype.Cya=
function(){var z=this.get("panorama");return z?e.Oa("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBarSteps",!0):e.Oa("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBarSteps",!0):!1:!1};y.prototype.h2a=function(){var z=this.get("panorama");return!z||e.Oa("VideoPanorama",z)?!1:!0};y.kG="cardboard";y.Jca="standard";y.Ox={buttonMoveLeft:{movement:l.dL,pressedOn:"movingLeft",stopOnRelease:!0},buttonMoveRight:{movement:l.eL,pressedOn:"movingRight",stopOnRelease:!0},buttonMoveUp:{movement:l.fL,
pressedOn:"movingUp",stopOnRelease:!0},buttonMoveDown:{movement:l.cL,pressedOn:"movingDown",stopOnRelease:!0},buttonPlayLeft:{movement:[l.dL,l.PLAYING],pressedOn:"movingLeft",stopOnRelease:!1},buttonPlayRight:{movement:[l.eL,l.PLAYING],pressedOn:"movingRight",stopOnRelease:!1},buttonPlayUp:{movement:[l.fL,l.PLAYING],pressedOn:"movingUp",stopOnRelease:!1},buttonPlayDown:{movement:[l.cL,l.PLAYING],pressedOn:"movingDown",stopOnRelease:!1},buttonZoomIn:{movement:l.Mx,pressedOn:"zoomingIn",stopOnRelease:!0},
buttonZoomOut:{movement:l.Nx,pressedOn:"zoomingOut",stopOnRelease:!0}};return y});
define("tdv/player/script/PanoramaPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("PanoramaPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.jz,this),g.set("panorama",this.get("media")),g.set("camera",
this.get("camera")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(h.di,this.jz,this),g.get("panorama")==this.get("media")&&g.set("panorama",null));n.prototype.stop.call(this)};a.prototype.jz=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.di,this.jz,this),this.get("player").bind(h.oo,this.$C,this),this.PD())};a.prototype.$C=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.oo,this.$C,this),this.stop(),this.end())};return a});
define("tdv/player/script/PanoramaSnapshot",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PanoramaSnapshot",m,function(){m.call(this)})});
define("tdv/player/script/Photo",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/Media","tdv/player/script/helper/LevelUtil"],function(a,m,h,n,g){a=function(k){function e(){return k.call(this)||this}P(e,k);e.prototype.rw=function(){var b=[],c=this.get("image");c&&b.push(g.Et(c).get("url"));this.get("audios",[]).forEach(function(d){b=b.concat(d.rw())}.bind(this));return b};return e}(n);h.create("Photo",a);return a});
define("tdv/player/script/PhotoAlbum",["require","tdv/player/script/Media","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/Media");a=a("tdv/player/parser/ClassInfo").define("PhotoAlbum",m,function(){m.call(this);this.set("loop",!1)});a.prototype.rw=function(){var h=[],n=this.get("playList");n&&n.get("items",[]).forEach(function(g){(g=g.get("media"))&&(h=h.concat(g.rw()))});this.get("audios",[]).forEach(function(g){h=h.concat(g.rw())});return h};return a});
define("tdv/player/script/PhotoAlbumAudio",["require","tdv/constants/Priority","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio"],function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/MediaAudio");return h.define("PhotoAlbumAudio",n,function(){n.call(this,m.GVa)})});
define("tdv/player/view/photo/control/audio/AudioController",["require","tdv/constants/PlaybackState"],function(a){function m(n){this.Ou=n;this.BL=[];this.Pu=[];this.jt=1}var h=a("tdv/constants/PlaybackState");m.prototype.clear=function(){for(var n=0;n<this.BL.length;n++)this.BL[n].Zc(h.ca);this.CXa();this.Pu=this.BL=null};m.prototype.stop=function(){for(var n=0;n<this.Pu.length;n++)this.Pu[n].Zc(h.ca)};m.prototype.play=function(){for(var n=0;n<this.Pu.length;n++){var g=this.Pu[n];g.getState()!=h.PLAYING&&
g.Zc(h.PLAYING)}};m.prototype.pause=function(){for(var n=0;n<this.Pu.length;n++){var g=this.Pu[n];g.getState()==h.PLAYING&&g.Zc(h.Zb)}};m.prototype.start=function(){this.stop();for(var n=0;n<this.Ou.length;n++){var g=this.Ou[n],k=g.qJ();k&&(this.BL.push(k),g.get("autoplay",!1)&&this.Pu.push(k))}for(n=0;n<this.Pu.length;n++)this.Pu[n].Zc(h.PLAYING)};m.prototype.ze=function(){};m.prototype.CXa=function(){for(var n=0;n<this.BL.length;n++)this.BL[n].iB(1)};return m});
define("tdv/player/view/photo/control/audio/PhotoAudioController",["require","tdv/utils","tdv/player/view/photo/control/audio/AudioController"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/photo/control/audio/AudioController");return m.extend(h,function(n){h.call(this,n.get("audios",[]));this.f4=n})});
define("tdv/player/view/photo/control/audio/AlbumAudioController",["require","tdv/utils","tdv/player/view/photo/control/audio/AudioController"],function(a){var m=a("tdv/utils"),h=a("tdv/player/view/photo/control/audio/AudioController");return m.extend(h,function(n){h.call(this,n.get("audios",[]));this.Yf=n})});
define("tdv/player/view/photo/control/AudioController",["require","tdv/player/view/photo/control/audio/PhotoAudioController","tdv/player/view/photo/control/audio/AlbumAudioController"],function(a){function m(){this.ck=[];this.Ij=[]}var h=a("tdv/player/view/photo/control/audio/PhotoAudioController"),n=a("tdv/player/view/photo/control/audio/AlbumAudioController");m.prototype.clear=function(){this.mSa();this.Ij=this.ck=null};m.prototype.mSa=function(){for(var g=0;g<this.ck.length;g++)this.ck[g].clear();
for(g=0;g<this.Ij.length;g++)this.Ij[g].clear();this.ck=[];this.Ij=[]};m.prototype.pause=function(){for(var g=0;g<this.ck.length;g++)this.ck[g].pause();for(g=0;g<this.Ij.length;g++)this.Ij[g].pause()};m.prototype.play=function(){for(var g=0;g<this.ck.length;g++)this.ck[g].play();for(g=0;g<this.Ij.length;g++)this.Ij[g].play()};m.prototype.stop=function(){for(var g=0;g<this.ck.length;g++)this.ck[g].stop();for(g=0;g<this.Ij.length;g++)this.Ij[g].clear();this.Ij=[]};m.prototype.lmb=function(g){g=new h(g);
this.Ij.push(g);g.start()};m.prototype.tmb=function(g){for(var k=0;k<this.Ij.length;k++)if(this.Ij[k].f4==g){this.Ij[k].clear();this.Ij.splice(k,1);break}};m.prototype.Ura=function(g){g=new n(g);this.ck.push(g);g.start()};m.prototype.qmb=function(g){for(var k=0;k<this.ck.length;k++)if(this.ck[k].Yf==g){this.ck[k].clear();this.ck.splice(k,1);break}};m.prototype.ze=function(g){for(var k=0;k<this.ck.length;k++)this.ck[k].ze(g);for(k=0;k<this.Ij.length;k++)this.Ij[k].ze(g)};return m});
define("tdv/player/view/photo/control/camera/LimitsManager",["require","tdv/utils","tdv/view/constants/ScaleMode"],function(a){function m(){this.Rd=!0;this.fc=this.ec=.5;this.kc=1;this.ti=h.uj;this.Ao=this.Bo=100}a("tdv/utils");var h=a("tdv/view/constants/ScaleMode");m.prototype.getX=function(){this.sp();return this.ec};m.prototype.getY=function(){this.sp();return this.fc};m.prototype.yA=function(){this.sp();return this.kc};m.prototype.setConfiguration=function(n,g,k){this.ti=k;this.fc=this.ec=.5;
this.kc=1;this.Rd=!0};m.prototype.setPosition=function(n,g,k){this.ec=n;this.fc=g;this.kc=k;this.Rd=!0};m.prototype.setSize=function(n,g){this.Bo=n;this.Ao=g;this.Rd=!0};m.prototype.sp=function(){if(this.Rd){this.Rd=!1;this.kc<1&&(this.kc=1);var n=Math.min(.5/this.kc,.5),g=Math.max(1-.5/this.kc,.5);this.ec<n?this.ec=n:this.ec>g&&(this.ec=g);n=Math.min(.5/this.kc,.5);g=Math.max(1-.5/this.kc,.5);this.fc<n?this.fc=n:this.fc>g&&(this.fc=g)}};return m});
define("tdv/player/view/photo/control/camera/PhotoCameraController",["require"],function(){function a(m){this.va=m;this.fc=this.ec=.5;this.kc=1;this.E4=!1}a.prototype.start=function(){this.fc=this.ec=.5;this.kc=1;this.E4=!0};a.prototype.clear=function(){this.va=null};a.prototype.setPosition=function(m,h,n){this.ec=m;this.fc=h;this.kc=n};a.prototype.Uf=function(){return this.E4};a.prototype.Nb=function(){this.E4=!1};return a});
define("tdv/player/script/PhotoCameraPosition",["require","exports","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a,m,h,n){a=function(g){function k(e,b,c){var d=g.call(this)||this;e!==void 0&&d.set("x",e);b!==void 0&&d.set("y",b);c!==void 0&&d.set("zoomFactor",c);return d}P(k,g);return k}(h);n.create("PhotoCameraPosition",a);return a});
define("tdv/player/view/photo/control/camera/MovementPhotoCameraController","require tdv/utils tdv/player/view/photo/control/camera/PhotoCameraController tdv/player/script/PhotoCameraPosition tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/player/view/photo/control/camera/PhotoCameraController"),n=a("tdv/player/script/PhotoCameraPosition"),g=a("tdv/view/util/Ease"),k=a("tdv/view/util/EaseDimension");a=m.extend(h,function(e){h.call(this,e);this.la=
null});a.prototype.start=function(e){var b=e.get("initialPosition",new n(.5,.5,1)),c=e.get("targetPosition",new n(.5,.5,1)),d=e.get("duration",1E3);d==0?(this.ec=b.get("x"),this.fc=b.get("y"),this.kc=b.get("zoomFactor")):this.la=new g(e.get("easing","linear"),[new k("x",b.get("x",.5),c.get("x",.5)),new k("y",b.get("y",.5),c.get("y",.5)),new k("zoom",b.get("zoomFactor",1),c.get("zoomFactor",1))],d);this.Nb(0)};a.prototype.clear=function(){this.la=null;h.prototype.clear.call(this)};a.prototype.Uf=function(){return this.la!=
null};a.prototype.Nb=function(e){this.la&&(this.la.Nb(e),this.va.setPosition(this.la.ob("x"),this.la.ob("y"),this.la.ob("zoom")),this.ec=this.va.getX(),this.fc=this.va.getY(),this.kc=this.va.yA(),this.la.Ve()&&(this.la=null))};return a});
define("tdv/player/view/photo/control/CameraController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/player/parser/ClassInfo tdv/constants/PlaybackState tdv/view/constants/ScaleMode tdv/player/view/photo/control/camera/LimitsManager tdv/player/view/photo/control/camera/PhotoCameraController tdv/player/view/photo/control/camera/MovementPhotoCameraController tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),
g=a("tdv/player/parser/ClassInfo"),k=a("tdv/constants/PlaybackState"),e=a("tdv/view/constants/ScaleMode"),b=a("tdv/player/view/photo/control/camera/LimitsManager"),c=a("tdv/player/view/photo/control/camera/PhotoCameraController"),d=a("tdv/player/view/photo/control/camera/MovementPhotoCameraController"),f=a("tdv/constants/EventName"),l=m.extend(n,function(p,q){n.call(this);this.P=p;this.nd=q;this.P.bind(f.$b,this.kd,this);this.I=k.ca;this.rn=this.f4=this.Ac=this.Ja=null;this.va=new b});l.prototype.clear=
function(){this.end();this.va=null;this.P.h(f.$b,this.kd,this);this.P=null};l.prototype.end=function(p){if(this.Ja==p||typeof p=="undefined")this.uxa(),this.Ac=this.f4=this.Ja=null};l.prototype.start=function(p){if(this.Ja!=p){this.end(this.Ja);var q=p.get("media"),r=p.get("camera"),t=q.get("width",100),u=q.get("height",100),v=r?r.get("scaleMode",e.uj):e.uj;this.Ja=p;this.Ac=r;this.f4=q;this.ha=!0;this.va.setConfiguration(t,u,v);this.u_a(r);this.bb()}};l.prototype.stop=function(){this.I!=k.ca&&(this.I=
k.ca,this.rn&&(this.rn.start(this.Ac),this.bb()))};l.prototype.play=function(){if(this.I==k.ca||this.I==k.Zb)this.I=k.PLAYING,this.bb()};l.prototype.pause=function(){this.I==k.PLAYING&&(this.I=k.Zb)};l.prototype.YA=function(p){this.rn&&this.rn.Uf()&&(this.I==k.PLAYING&&(this.rn.Nb(p),this.bb()),this.vn(this.rn.ec,this.rn.fc,this.rn.kc))};l.prototype.u_a=function(p){this.uxa();g.Oa("MovementPhotoCamera",p)?this.rn=new d(this.va):this.rn=new c(this.va);this.rn.start(p)};l.prototype.uxa=function(){this.rn&&
(this.rn.clear(),this.rn=null)};l.prototype.kd=function(){this.va.setSize(this.P.nb(),this.P.Mb());this.bb()};l.prototype.bb=function(){this.o(new h(l.oc))};l.prototype.vn=function(p,q,r){this.nd.setPosition(this.Ja,p,q,r)};l.oc="request frame";return l});
define("tdv/player/view/photo/control/StageControllerItem","require exports tdv/events/EventDispatcher tdv/events/Event tdv/constants/EventName tdv/player/script/PhotoCameraPosition".split(" "),function(a,m,h,n,g,k){return function(e){function b(c,d){var f=e.call(this)||this;f.Zib=c;f.renderer=d;f.camera=c.get("camera");f.tc=c.get("media");f.tc.set("enabled",!1);f.tc.bind(g.ia,f.NA,f,!1);return f}P(b,e);b.prototype.getItem=function(){return this.Zib};b.prototype.preload=function(){this.tc.set("opacity",
0);this.renderer.aIa(this.tc,this.camera);this.tc.get("isLoaded")&&this.YSa()};b.prototype.nf=function(c){this.tc.set("opacity",c);this.hx()};b.prototype.Hp=function(c){this.tc.set("offset",c);this.hx()};b.prototype.setPosition=function(c,d,f){var l=this.camera.get("position")||new k;this.camera.set("position",l);l.set("x",c);l.set("y",d);l.set("zoomFactor",f)};b.prototype.Vlb=function(c){this.tc.set("zIndex",c)};b.prototype.isEnabled=function(){return this.tc.get("enabled")};b.prototype.hx=function(){var c=
this.tc.get("offset"),d=this.tc.get("opacity");c>-1&&c<1&&d>0?(this.renderer.aIa(this.tc,this.camera),this.tc.set("enabled",!0)):this.tc.get("enabled")&&(this.renderer.lQa(this.tc),this.tc.set("enabled",!1))};b.prototype.clear=function(){this.renderer.lQa(this.tc);this.tc.h(g.ia,this.NA,this)};b.prototype.NA=function(){this.tc.get("enabled")||this.YSa()};b.prototype.YSa=function(){this.o(new n(b.oua))};b.oua="preloadEnd";return b}(h)});
define("tdv/player/view/photo/control/StageController",["require","exports","tdv/events/Event","tdv/events/EventDispatcher","tdv/player/view/photo/control/StageControllerItem"],function(a,m,h,n,g){return function(k){function e(b){var c=k.call(this)||this;c.Ws=[];c.j=b;return c}P(e,k);e.prototype.preload=function(b){this.cH(b).preload();return this};e.prototype.nf=function(b,c){this.cH(b).nf(c);this.Vz();return this};e.prototype.Hp=function(b,c){this.cH(b).Hp(c);this.Vz();return this};e.prototype.setPosition=
function(b,c,d,f){this.cH(b).setPosition(c,d,f);return this};e.prototype.yi=function(b){var c=this.Ws.findIndex(function(f){return f.getItem()==b}),d=this.Ws[c];this.Ws.splice(c,1);this.Ws.push(d);this.Ws.forEach(function(f,l){f.Vlb(l)})};e.prototype.stop=function(){this.i0a(function(b){b.clear()});this.Ws=[]};e.prototype.clear=function(){this.stop();this.Ws=null};e.prototype.Vz=function(){this.Ws.find(function(b){return b.isEnabled()})};e.prototype.cH=function(b){var c=this.J0a(b);c||(c=new g(b,
this.j),c.bind(g.oua,this.Y3a,this,!1),this.Ws.push(c));return c};e.prototype.i0a=function(b){this.Ws.forEach(b.bind(this))};e.prototype.J0a=function(b){return this.Ws.find(function(c){return c.getItem()==b})};e.prototype.Y3a=function(b){this.o(new h(e.zba,{item:b.source.getItem()}))};e.zba="photo preload end";return e}(n)});define("tdv/player/view/photo/control/constants/TransitionMode",["require","exports"],function(){return{Op:"blending",Vr:"scroll"}});
define("tdv/player/view/photo/control/display/TransitionController","require exports tdv/events/Event tdv/events/EventDispatcher tdv/player/view/photo/control/StageController tdv/player/view/photo/control/constants/TransitionMode tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){var b=function(){function c(d,f,l){this.Vq=d;this.item=f;this.transitionDuration=l;this.index=d&&f?d.get("playList").get("items").indexOf(this.item):0;this.loaded=!1}c.prototype.isEqual=function(d){return d&&d.Vq==
this.Vq&&d.item==this.item};return c}();return function(c){function d(f,l,p){var q=c.call(this)||this;q.P=f;q.j=l;q.nd=p;q.nd.bind(g.zba,q.uDa,q,!1);q.WN=k.Op;q.sb=d.Yr;q.yd=new b(null,null,0);q.le=null;q.Xl=null;q.Wu=null;q.Qv=void 0;q.uD=0;return q}P(d,c);d.prototype.clear=function(){var f;((f=this.yd)===null||f===void 0?0:f.item)&&this.VV(this.yd);this.sb=d.Yr;this.Wu=this.yd=this.le=this.Xl=null;this.nd.h(g.zba,this.uDa,this);this.P.release(this.j)};d.prototype.Dlb=function(f){this.WN=f};d.prototype.yra=
function(f){this.uD=f};d.prototype.osa=function(f,l,p){this.Xl=null;f=new b(f,l,p);f.isEqual(this.sb==d.Yr?this.yd:this.le)||(this.P.Mma(this.j),this.Xl=f,this.nCa())};d.prototype.nCa=function(){this.Xl&&this.sb==d.Yr&&(this.Xl.item&&!this.Xl.loaded?this.nd.preload(this.Xl.item):this.$x())};d.prototype.uDa=function(f){this.Xl&&this.Xl.item==f.data.item&&(this.Xl.loaded=!0,this.nCa())};d.prototype.$x=function(){this.Wu&&this.Wu!=this.Xl.Vq&&this.JEa(null);this.o(new h(d.Gba));this.T1()&&this.Xl.item!=
null&&this.yd.item!=null?this.mYa():(this.le=this.Xl,this.Xl=null,this.yd.Vq&&!this.yd.item?this.lYa():this.yd.item?this.le.item&&this.WN==k.Op?this.Zx():this.le.item&&this.WN==k.Wob?this.nYa():this.yd.item&&this.kYa():this.awa())};d.prototype.ze=function(f){if(this.sb!=d.Yr){this.Qv+=f;f=this.le.transitionDuration;f=this.Qv>=f?1:this.Qv/f;switch(this.sb){case d.Bca:this.KGa(f);break;case d.Cca:this.pab(f);break;case d.Eca:this.MGa(f);break;case d.Dca:this.LGa(f);break;case d.vo:this.FD(f);break;
case d.Fca:this.hHa(f)}f<1?this.bb():this.cM()}};d.prototype.cM=function(){switch(this.sb){case d.Eca:this.q0a();break;case d.Dca:this.p0a();break;case d.Bca:this.n0a();break;case d.vo:this.xy();break;case d.Fca:this.t0a();break;case d.Cca:this.o0a()}this.JEa(this.yd.Vq);this.Xl==null?this.xla(this.yd):this.$x()};d.prototype.mYa=function(){this.sb=d.Eca;this.le=new b(this.yd.Vq,null,this.yd.transitionDuration);this.Qv=0;this.Rh=this.yd.transitionDuration;this.nd.Hp(this.yd.item,0);this.MGa(0);this.bb()};
d.prototype.MGa=function(f){this.nd.nf(this.yd.item,1-f)};d.prototype.q0a=function(){this.VV(this.yd);this.yd=this.le;this.sb=d.Yr};d.prototype.lYa=function(){this.sb=d.Dca;this.Qv=0;this.Rh=this.le.transitionDuration;this.O5(this.le);this.nd.Hp(this.le.item,0);this.LGa(0);this.bb()};d.prototype.LGa=function(f){this.nd.nf(this.le.item,f)};d.prototype.p0a=function(){this.yd=this.le;this.sb=d.Yr;this.P5(this.yd)};d.prototype.awa=function(f){var l=this;f===void 0&&(f=!1);f||this.P.get("transitionMode")!=
"fade_out_fade_in"&&!e.isPresenting?(this.P.Rc().mmb(),this.sb=d.Bca,this.Qv=0,this.Rh=this.le.transitionDuration,this.O5(this.le),this.nd.Hp(this.le.item,0),this.nd.yi(this.le.item),this.nd.nf(this.le.item,1),this.j.Ra(!0),this.P.Rc().xK(),this.KGa(0),this.bb()):(this.sb=d.QWa,this.P.Psa(this.j,function(){l.awa(!0)}))};d.prototype.KGa=function(f){this.nd.nf(this.le.item,f);this.P.Rc().lK(f)};d.prototype.n0a=function(){this.yd=this.le;this.P.Rc().mJ();this.sb=d.Yr;this.P5(this.yd)};d.prototype.Zx=
function(){this.sb=d.vo;this.Qv=0;this.Rh=this.le.transitionDuration;this.O5(this.le);this.nd.Hp(this.yd.item,0);this.nd.Hp(this.le.item,0);this.nd.yi(this.le.item);this.FD(0);this.bb()};d.prototype.FD=function(f){this.nd.nf(this.le.item,Math.min(1,f*2));this.nd.nf(this.yd.item,Math.min(1,(1-f)*2))};d.prototype.xy=function(){this.VV(this.yd);this.yd=this.le;this.sb=d.Yr;this.P5(this.yd)};d.prototype.nYa=function(){this.sb=d.Fca;this.Qv=0;this.Rh=this.le.transitionDuration;this.O5(this.le);this.nd.yi(this.le.item);
this.hHa(0);this.bb()};d.prototype.hHa=function(f){var l=this.yd.Vq!=this.le.Vq||this.yd.index<this.le.index;this.nd.Hp(this.le.item,(l?1-f:f-1)*(1+this.uD)).nf(this.le.item,1);this.nd.Hp(this.yd.item,(l?-f:f)*(1+this.uD)).nf(this.yd.item,1)};d.prototype.t0a=function(){this.VV(this.yd);this.yd=this.le;this.sb=d.Yr;this.P5(this.yd)};d.prototype.kYa=function(){this.sb=d.Cca;this.Qv=0;this.Rh=this.yd.transitionDuration;this.nd.Hp(this.yd.item,0);this.P.Rc().cF();this.nd.nf(this.yd.item,e.isPresenting?
1:0);this.j.Ra(e.isPresenting?!0:this.P.NX(this.j));this.bb()};d.prototype.pab=function(f){this.P.Rc().QE(f);this.j.Ra(e.isPresenting?!0:this.P.NX(this.j));this.j.Qa()};d.prototype.o0a=function(){this.P.Rc().VD();this.nd.nf(this.yd.item,0);this.VV(this.yd);this.sb=d.Yr;this.yd=this.le;this.P.release(this.j);this.j.Ra(!1)};d.prototype.T1=function(){return this.P.get("transitionMode")=="fade_out_fade_in"||e.isPresenting};d.prototype.O5=function(f){this.o(new h(d.FF,{album:f.Vq,item:f.item}))};d.prototype.VV=
function(f){this.o(new h(d.HF,{album:f.Vq,item:f.item}))};d.prototype.P5=function(f){this.o(new h(d.GF,{album:f.Vq,item:f.item}))};d.prototype.xla=function(f){this.o(new h(d.Hr,{album:f.Vq,item:f.item}))};d.prototype.JEa=function(f){this.Wu!=f&&(this.Wu&&this.K$a(this.Wu),(this.Wu=f)&&this.L$a(this.Wu))};d.prototype.L$a=function(f){this.o(new h(d.Fr,{album:f}))};d.prototype.K$a=function(f){this.o(new h(d.Er,{album:f}))};d.prototype.bb=function(){this.o(new h(d.oc))};d.Yr="stopped";d.vo="blending";
d.Fca="scrolling";d.Cca="exit_fading_out";d.Eca="fading_out_before_fading_in";d.Dca="fading_in_after_fading_out";d.Bca="entry_fading_in";d.QWa="waiting_viewer_area_in_exclusive";d.oc="request frame";d.Gba="transition begin";d.Hr="transition end";d.FF="photo added";d.HF="photo removed";d.GF="photo displayed";d.Fr="photo album show";d.Er="photo album hide";return d}(n)});
define("tdv/player/view/photo/control/display/ManualScrollController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/player/parser/ClassInfo tdv/view/constants/ScaleMode tdv/player/script/PhotoCameraPosition tdv/player/view/photo/control/camera/LimitsManager tdv/view/util/Ease tdv/view/util/EaseDimension".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/constants/EventName"),k=a("tdv/player/parser/ClassInfo"),
e=a("tdv/view/constants/ScaleMode"),b=a("tdv/player/script/PhotoCameraPosition"),c=a("tdv/player/view/photo/control/camera/LimitsManager"),d=a("tdv/view/util/Ease"),f=a("tdv/view/util/EaseDimension"),l=m.extend(n,function(p,q){n.call(this);this.P=p;this.nd=q;this.Fq=this.oq=this.Ja=this.Yf=this.Ab=null;this.mp=void 0;this.n5=0;this.$l=!1;this.rq=0;this.N2=this.Fq?-1:0;this.J2=this.oq?1:0;this.la=null;this.Rh=400;this.uD=0;this.va=new c});l.prototype.clear=function(){this.nd=this.P=this.Wu=null};l.prototype.qkb=
function(p,q){this.Yf=p;this.Ja=q;p=p&&p.get("playList")&&p.get("playList").get("items")||[];q=p.indexOf(q);this.oq=q>0?p[q-1]:null;this.Fq=q<p.length-1?p[q+1]:null;this.rq=0;this.N2=this.Fq?-1:0;this.J2=this.oq?1:0;this.zDa()};l.prototype.enable=function(){if(this.Ab=this.P)this.Ab.bind(g.Sa,this.te,this,!0),this.Ab.bind(g.gb,this.bl,this,!0),this.Ab.bind(g.$a,this.cl,this,!0),this.zDa()};l.prototype.disable=function(){this.Ab&&(this.Ab.h(g.Sa,this.te,this),this.Ab.h(g.gb,this.bl,this),this.Ab.h(g.$a,
this.cl,this),this.Ab=null)};l.prototype.Clb=function(p){this.Rh=p};l.prototype.yra=function(p){this.uD=p};l.prototype.zDa=function(){this.Ab&&(this.oq&&this.nd.preload(this.oq),this.Fq&&this.nd.preload(this.Fq))};l.prototype.RAa=function(){return(new Date).getTime()};l.prototype.te=function(p){this.$l||(this.mp=p.x,this.n5=0,this.pja=this.RAa(),this.$l=!0,this.la=null,this.o(new h(l.fba)),this.oq&&(p=this.Oya(this.oq),this.nd.setPosition(this.oq,p.x,p.y,p.zoom)),this.Fq&&(p=this.Oya(this.Fq),this.nd.setPosition(this.Fq,
p.x,p.y,p.zoom)))};l.prototype.bl=function(p){if(this.$l){var q=p.x-this.mp,r=q/this.Ab.nb(),t=this.RAa()-this.pja;this.n5=q/t;this.pja+=t;this.mp=p.x;this.rq=Math.max(this.N2,Math.min(this.J2,this.rq+r));this.bb()}};l.prototype.cl=function(){if(this.$l){this.$l=!1;if(this.n5>1){var p="quad_out";var q=this.J2}else this.n5<-1?(p="quad_out",q=this.N2):(p="quad_in_out",q=this.rq<-.5?this.N2:this.rq>.5?this.J2:0);this.la=new d(p,[new f("offset",this.rq,q,1E3/this.Rh)],0);this.bb()}};l.prototype.ze=function(p){if(this.$l||
this.la)this.la&&(this.la.Nb(p),this.rq=this.la.ob("offset"),this.la.Ve()?(this.la=null,this.j0a()):this.bb()),this.Ja&&this.nd.Hp(this.Ja,this.rq*(1+this.uD)).nf(this.Ja,1),this.oq&&this.nd.Hp(this.oq,(this.rq-1)*(1+this.uD)).nf(this.oq,1),this.Fq&&this.nd.Hp(this.Fq,(this.rq+1)*(1+this.uD)).nf(this.Fq,1)};l.prototype.j0a=function(){this.o(new h(l.gba,{album:this.Yf,item:this.rq<0?this.Fq:this.rq>0?this.oq:this.Ja}))};l.prototype.bb=function(){this.o(new h(l.oc))};l.prototype.Oya=function(p){var q=
p&&p.get("camera"),r=p&&p.get("media");p=r&&r.get("width",100)||100;r=r&&r.get("height",100)||100;var t=q?q.get("scaleMode",e.uj):e.uj,u={};k.Oa("MovementPhotoCamera",q)?(q=q.get("initialPosition",new b(.5,.5,1)),u.x=q.get("x",.5),u.y=q.get("y",.5),u.zoom=q.get("zoomFactor",.5)):(u.x=.5,u.y=.5,u.zoom=1);this.va.setConfiguration(p,r,t);this.va.setSize(this.P.nb(),this.P.Mb());this.va.setPosition(u.x,u.y,u.zoom);u.x=this.va.getX();u.y=this.va.getY();u.zoom=this.va.yA();return u};l.oc="request frame";
l.fba="interaction begin";l.gba="interaction end";return l});
define("tdv/player/view/photo/control/DisplayController","require tdv/utils tdv/events/Event tdv/events/EventDispatcher tdv/constants/EventName tdv/player/view/photo/control/StageController tdv/player/view/photo/control/constants/TransitionMode tdv/player/view/photo/control/display/TransitionController tdv/player/view/photo/control/display/ManualScrollController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher");a("tdv/constants/EventName");a("tdv/player/view/photo/control/StageController");
var g=a("tdv/player/view/photo/control/constants/TransitionMode"),k=a("tdv/player/view/photo/control/display/TransitionController"),e=a("tdv/player/view/photo/control/display/ManualScrollController"),b=m.extend(n,function(c,d,f){n.call(this);this.P=c;this.nd=f;this.WN=g.Op;this.Rh=1E3;this.bc=new k(this.P,d,this.nd);this.bc.bind(k.oc,this.bg,this,!0);this.bc.bind(k.Gba,this.lBa,this,!0);this.bc.bind(k.Hr,this.mBa,this,!0);this.bc.bind(k.FF,this.$T,this,!0);this.bc.bind(k.HF,this.cU,this,!0);this.bc.bind(k.GF,
this.bU,this,!0);this.bc.bind(k.Er,this.Cs,this,!0);this.bc.bind(k.Fr,this.vq,this,!0);this.$m=new e(this.P,this.nd);this.$m.bind(e.oc,this.bg,this,!0);this.$m.bind(e.fba,this.oAa,this,!0);this.$m.bind(e.gba,this.pAa,this,!0)});b.prototype.H$=function(c,d){this.WN=c;this.Rh=d;this.bc.Dlb(c);this.$m.Clb(d);this.bc.yra(.05);this.$m.yra(.05)};b.prototype.display=function(c,d){this.bc.osa(c,d,this.Rh)};b.prototype.oe=function(){this.bc.osa(null,null,this.Rh)};b.prototype.clear=function(){this.bc.h(k.oc,
this.bg,this);this.bc.h(k.Gba,this.lBa,this);this.bc.h(k.Hr,this.mBa,this);this.bc.h(k.FF,this.$T,this);this.bc.h(k.HF,this.cU,this);this.bc.h(k.GF,this.bU,this);this.bc.h(k.Er,this.Cs,this);this.bc.h(k.Fr,this.vq,this);this.bc.clear();this.bc=null;this.$m.bind(e.oc,this.bg,this,!0);this.$m.bind(e.fba,this.oAa,this,!0);this.$m.bind(e.gba,this.pAa,this,!0);this.$m.clear();this.nd=this.P=this.$m=null};b.prototype.ze=function(c){this.bc.ze(c);this.$m.ze(c)};b.prototype.bg=function(){this.bb()};b.prototype.$T=
function(c){this.o(new h(b.FF,c.data))};b.prototype.cU=function(c){this.o(new h(b.HF,c.data))};b.prototype.bU=function(c){this.o(new h(b.GF,c.data));this.$m.qkb(c.data.album,c.data.item)};b.prototype.Cs=function(c){this.o(new h(b.Er,c.data))};b.prototype.vq=function(c){this.o(new h(b.Fr,c.data))};b.prototype.lBa=function(){this.$m.disable()};b.prototype.mBa=function(c){this.WN==g.Vr&&c.data.item&&this.$m.enable();c.data.album||this.o(new h(b.cba))};b.prototype.oAa=function(){this.o(new h(b.mta))};
b.prototype.pAa=function(c){this.bc.osa(c.data.album,c.data.item,0);this.o(new h(b.nta,c.data))};b.prototype.bb=function(){this.o(new h(b.oc))};b.oc="request frame";b.FF="photo added";b.HF="photo removed";b.GF="photo displayed";b.Fr="photo album show";b.Er="photo album hide";b.mta="manual interaction begin";b.nta="manual interaction end";b.cba="all pending photo albums hidden";return b});
define("tdv/player/view/photo/control/PlayListController","require tdv/utils tdv/binding/ChangeWatcher tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/ChangeWatcher"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/PlaybackState"),e=m.extend(g,function(){g.call(this);this.Yf=null;this.I=k.ca;this.hka=null});e.prototype.clear=function(){this.Una()};e.prototype.Ura=function(b){this.Una();
this.Yf=b;this.I=k.PLAYING;this.hka=h.jx(this.Yf,"playList.selectedIndex",this.rI,this,!0);this.Yf.get("playList").get("selectedIndex")==0?this.rI():this.Yf.get("playList").set("selectedIndex",0)};e.prototype.Una=function(){this.Yf&&(this.I=k.ca,this.hka.hF(),this.Yf=this.hka=null)};e.prototype.stop=function(){this.I!=k.ca&&(this.I=k.ca,this.Yf.get("playList").set("selectedIndex",0))};e.prototype.play=function(){this.I==k.ca?(this.Yf.get("playList").set("selectedIndex",0),this.I=k.PLAYING,this.rI()):
this.I==k.Zb&&(this.I=k.PLAYING)};e.prototype.pause=function(){this.I==k.PLAYING&&(this.I=k.Zb)};e.prototype.next=function(){var b=this.Yf.get("playList"),c=b.get("selectedIndex"),d=b.get("items").length;(c<d-1||this.Yf.get("loop"))&&b.set("selectedIndex",(c+1)%d)};e.prototype.vqa=function(){var b=this.Yf.get("playList"),c=b.get("selectedIndex"),d=b.get("items").length;(c>0||this.Yf.get("loop"))&&b.set("selectedIndex",(c-1+d)%d)};e.prototype.F8=function(b){this.T8a(b)};e.prototype.itemEnd=function(b){if(this.Yf){var c=
this.Yf.get("playList").get("items");b!=(c.length>0?c[c.length-1]:void 0)||this.Yf.get("loop")?this.next():(this.I=k.ca,this.o(new n(e.Yaa,{album:this.Yf})))}};e.prototype.rI=function(){var b=this.y2a();b>=0&&(this.I!=k.PLAYING&&b!=0?this.o(new n(e.Cba)):this.o(new n(e.kba,{album:this.Yf,item:this.Yf.get("playList").get("items")[b]})))};e.prototype.y2a=function(){return this.Yf?this.Yf.get("playList").get("selectedIndex"):-1};e.prototype.T8a=function(b){if(this.Yf){var c=this.Yf.get("playList");b=
c.get("items").indexOf(b);c.set("selectedIndex",b)}};e.Cba="play request";e.kba="item request";e.Yaa="album end";return e});
define("tdv/player/view/photo/control/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState tdv/view/util/Visibility".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/PlaybackState"),e=a("tdv/view/util/Visibility"),b=m.extend(g,function(c){g.call(this);this.P=c;this.IV=this.Ja=null;this.kI=void 0;this.a2=!1;this.I=k.ca;
e.bind(h.V,this.eDa,this,!0)});b.prototype.F8=function(c){this.Cea();if(this.Ja=c)c=this.Ja.get("media").get("duration",0),this.kI=c==0?void 0:Math.max(0,c-this.P.get("transitionDuration")),this.a2=!1,this.I==k.PLAYING&&this.Zea()};b.prototype.clear=function(){e.h(h.V,this.eDa,this,!0);this.F8(null)};b.prototype.stop=function(){this.I!=k.ca&&(this.Cea(),this.Jd(k.ca))};b.prototype.play=function(){if(this.I==k.ca){if(this.Jd(k.PLAYING),this.Ja){this.a2=!1;var c=this.Ja.get("media").get("duration",
0);this.kI=c==0?void 0:c;this.Zea()}}else this.I==k.Zb&&(this.Jd(k.PLAYING),this.Ja&&this.Zea())};b.prototype.pause=function(){this.I==k.PLAYING&&(this.Jd(k.Zb),this.sDa())};b.prototype.Zea=function(){this.a2||(this.a2=!0,this.o(new n(b.lba,{item:this.Ja})));this.Vxa()};b.prototype.eDa=function(){e.visible?this.Vxa():e.visible||this.sDa()};b.prototype.Vxa=function(){if(this.kI!==void 0){var c=this;this.H5=(new Date).getTime()+this.kI;this.IV=setTimeout(function(){c.IV=null;c.q$a()},this.kI)}else this.H5=
void 0};b.prototype.Cea=function(){this.IV&&(clearTimeout(this.IV),this.IV=null)};b.prototype.sDa=function(){this.H5!==void 0&&(this.Cea(),this.kI=Math.max(1,this.H5-(new Date).getTime()),this.H5=void 0)};b.prototype.q$a=function(){var c=this.Ja;this.Ja=null;this.kI=void 0;this.o(new n(b.jba,{item:c}))};b.prototype.Jd=function(c){this.I!=c&&(this.I=c,this.o(new n(b.gd,{state:this.I})))};b.gd="playback state change";b.lba="item start";b.jba="item end";return b});
define("tdv/player/view/photo/control/Controller","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/photo/control/AudioController tdv/player/view/photo/control/CameraController tdv/player/view/photo/control/DisplayController tdv/player/view/photo/control/PlayListController tdv/player/view/photo/control/PlaybackController tdv/player/view/photo/control/StageController tdv/view/util/Animation".split(" "),function(a){var m=a("tdv/utils");a("tdv/constants/EventName");
var h=a("tdv/events/Event"),n=a("tdv/events/EventDispatcher"),g=a("tdv/player/view/photo/control/AudioController"),k=a("tdv/player/view/photo/control/CameraController"),e=a("tdv/player/view/photo/control/DisplayController"),b=a("tdv/player/view/photo/control/PlayListController"),c=a("tdv/player/view/photo/control/PlaybackController"),d=a("tdv/player/view/photo/control/StageController"),f=a("tdv/view/util/Animation"),l=m.extend(n,function(p,q){n.call(this);this.P=p;this.j=q;this.j.set("visible",!1);
this.bj=new b;this.Ua=new c(this.P);this.nd=new d(this.j);this.Ya=new e(this.P,this.j,this.nd);this.yb=new k(this.P,this.nd);this.Fd=new g;this.bj.bind(b.kba,this.FBa,this,!0);this.bj.bind(b.Cba,this.rCa,this,!0);this.bj.bind(b.Yaa,this.aU,this,!0);this.Ua.bind(c.lba,this.GBa,this);this.Ua.bind(c.jba,this.EBa,this);this.Ua.bind(c.gd,this.Mf,this,!0);this.Ya.bind(e.oc,this.bg,this,!0);this.Ya.bind(e.FF,this.$T,this,!0);this.Ya.bind(e.HF,this.cU,this,!0);this.Ya.bind(e.GF,this.bU,this,!0);this.Ya.bind(e.Er,
this.Cs,this,!0);this.Ya.bind(e.Fr,this.vq,this,!0);this.Ya.bind(e.mta,this.d5a,this,!0);this.Ya.bind(e.nta,this.e5a,this,!0);this.Ya.bind(e.cba,this.cBa,this,!0);this.yb.bind(k.oc,this.bg,this,!0)});l.prototype.clear=function(){this.bj.clear();this.Ua.clear();this.Ya.clear();this.yb.clear();this.Fd.clear();this.nd.clear();this.bj.h(b.kba,this.FBa,this);this.bj.h(b.Yaa,this.aU,this);this.bj.h(b.Cba,this.rCa,this);this.Ua.h(c.lba,this.GBa,this);this.Ua.h(c.jba,this.EBa,this);this.Ua.h(c.gd,this.Mf,
this);this.Ya.h(e.oc,this.bg,this);this.Ya.h(e.FF,this.$T,this);this.Ya.h(e.HF,this.cU,this);this.Ya.h(e.GF,this.bU,this);this.Ya.h(e.Er,this.Cs,this);this.Ya.h(e.Fr,this.vq,this);this.Ya.h(e.cba,this.cBa,this);this.yb.h(k.oc,this.bg,this);this.P=this.j=this.nd=this.Fd=this.yb=this.Ya=this.Ua=this.bj=null};l.prototype.H$=function(p,q){this.Ya.H$(p,q)};l.prototype.glb=function(p){this.j.set("visible",!0);this.bj.Ura(p)};l.prototype.bB=function(){this.bj.Una();this.Ua.stop();this.Ya.oe();this.yb.end();
this.Fd.mSa()};l.prototype.next=function(){this.bj.next()};l.prototype.vqa=function(){this.bj.vqa()};l.prototype.stop=function(){this.Ua.stop();this.Fd.stop();this.bj.stop();this.yb.stop()};l.prototype.play=function(){this.Ua.play();this.Fd.play();this.bj.play();this.yb.play()};l.prototype.pause=function(){this.Ua.pause();this.Fd.pause();this.bj.pause();this.yb.pause()};l.prototype.d5a=function(){this.Ua.pause();this.Fd.pause();this.bj.pause();this.yb.pause()};l.prototype.e5a=function(){this.Ua.play();
this.Fd.play();this.bj.play();this.yb.play()};l.prototype.FBa=function(p){this.Ya.display(p.data.album,p.data.item)};l.prototype.rCa=function(){this.play()};l.prototype.bg=function(){f.requestFrame(this.sq,this)};l.prototype.sq=function(p){this.yb.YA(p);this.Ya.ze(p);this.Fd.ze(p)};l.prototype.$T=function(p){this.yb.start(p.data.item)};l.prototype.cU=function(p){var q=p.data.album;p=p.data.item;var r=p.get("media");this.yb.end(p);this.Fd.tmb(r);this.o(new h(l.yba,{photoAlbum:q,item:p}))};l.prototype.bU=
function(p){var q=p.data.album;p=p.data.item;p.get("media");this.bj.F8(p);this.Ua.F8(p);this.o(new h(l.xba,{photoAlbum:q,item:p}))};l.prototype.GBa=function(p){p=p.data.item.get("media");this.Fd.lmb(p)};l.prototype.EBa=function(p){this.bj.itemEnd(p.data.item)};l.prototype.aU=function(p){this.Ua.stop();this.Fd.stop();this.o(new h(l.wba,{photoAlbum:p.data.album}))};l.prototype.vq=function(p){p=p.data.album;this.Fd.Ura(p);this.Ua.play();this.yb.play();this.o(new h(l.Fr,{photoAlbum:p}))};l.prototype.Cs=
function(p){p=p.data.album;this.Fd.qmb(p);this.o(new h(l.Er,{photoAlbum:p}))};l.prototype.cBa=function(){this.j.set("visible",!1)};l.prototype.Mf=function(p){this.o(new h(l.gd,{state:p.data.state}))};l.Fr="photoAlbumShow";l.wba="photoAlbumEnd";l.Er="photoAlbumHide";l.xba="photoBegin";l.yba="photoEnd";l.gd="playbackStateChange";return l});
define("tdv/player/view/renderer2d/adapters/CameraAdapter",["require","exports","tdv/constants/EventName","tdv/player/view/webgl/components","tdv/player/view/util/XR"],function(a,m,h,n,g){return function(){function k(e,b){this.Od=e;this.renderer=b;this.renderer.bind(h.$b,this.sl,this,!0);this.sl();this.fu();this.enabled=!1;g.M.bind(h.V,this.Ta,this,!0);g.M.bind(h.Pd,this.Ta,this,!0)}k.prototype.dispose=function(){this.renderer.h(h.$b,this.sl,this);g.M.h(h.V,this.Ta,this);g.M.h(h.Pd,this.Ta,this);
this.Ca()};k.prototype.mj=function(){return this.F};k.prototype.Ra=function(e){this.enabled!==e&&(this.enabled=e,this.wTa())};k.prototype.Ta=function(){this.lTa();this.jg();this.HZ()};k.prototype.sl=function(){var e=this.renderer.Xh(),b=this.renderer.Wh();if(this.Ow!==e||this.Nw!==b)this.Ow=e,this.Nw=b,this.HZ()};k.prototype.HZ=function(){if(this.F){var e=this.F.O(n.PerspectiveCamera);e.width=this.Ow;e.height=this.Nw}};k.prototype.jg=function(){if(this.F)if(g.isPresenting)this.F.ka(n.ta);else{var e=
this.F.O(n.ta,!0);e.positionX=e.positionY=e.positionZ=0;e.translationX=e.translationY=e.Ze=0;e.Yd=e.fd=e.Xe=0;e.Le=e.Ye=e.Gh=1}};k.prototype.wTa=function(){this.F&&(this.F.O(n.eG).locked=!this.enabled)};k.prototype.lTa=function(){if(this.F){var e=this.Od.getComponent(n.Object3D);e=(e=e&&e.sa)&&g.isPresenting&&g.XA===e;this.F.O(n.PerspectiveCamera,!0).nj=e}};k.prototype.fu=function(){var e=this.Od.T.sc("Camera");e.N(n.pb).F=this.Od;var b=e.N(n.PerspectiveCamera);b.Wd=k.xu;b.near=.1;b.far=100;b.Vma=
!1;e.N(n.eG).locked=!0;this.F=this.Od.O(n.Scene).Ea=e;this.HZ();this.jg();this.wTa();this.lTa()};k.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};k.xu=90;return k}()});
define("tdv/player/view/renderer2d/adapters/GroupAdapter","require exports tdv/constants/EventName tdv/player/view/webgl/components tdv/player/view/util/XR tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/util/Animation".split(" "),function(a,m,h,n,g,k,e,b){return function(){function c(d){this.Od=d;g.M.bind(h.V,this.Ta,this,!0);g.M.bind(h.Zd,this.NP,this,!0);this.fu()}c.prototype.dispose=function(){g.M.h(h.V,this.Ta,this);g.M.h(h.Zd,this.NP,this);this.Ca()};c.prototype.mj=function(){return this.F};
c.prototype.Ta=function(){this.zIa()};c.prototype.NP=function(){this.Dnb()};c.prototype.zIa=function(){this.F&&(this.F.O(n.ta).positionY=g.isPresenting?g.FO:0)};c.prototype.Dnb=function(){if(this.F){var d=this.F.O(n.ta);if(g.isPresenting)if(this.EX){if(this.EX.Nb(b.fX),d.positionY+=(g.FO-d.positionY)*this.EX.ob("leveling"),Math.abs(d.positionY-g.FO)<.01||this.EX.Ve())this.EX=null}else Math.abs(d.positionY-g.FO)>.2&&(this.EX=new k("linear",[new e("leveling",0,1)],2E3));else d.positionY=0}};c.prototype.fu=
function(){var d=this.Od.T.sc("Media2DGroup");d.N(n.pb).F=this.Od;d.N(n.ta);d.N(n.Group);this.F=d;this.zIa()};c.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return c}()});
define("tdv/player/view/renderer2d/adapters/XRPointerAdapter","require exports three.mod tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/webgl/components tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){a=function(){function f(l,p){this.Od=l;this.Ea=p;this.Tt=[];this.enabled=!1;this.Wa()}f.prototype.Ra=function(l){this.enabled!==l&&(this.enabled=l)};f.prototype.dispose=function(){this.ya()};f.prototype.Wa=function(){e.M.bind(n.Zd,this.Kg,this,!0)};f.prototype.ya=function(){e.M.h(n.Zd,
this.Kg,this);this.mZ([])};f.prototype.Kg=function(){this.mZ(e.ud)};f.prototype.mZ=function(l){var p=this;if(!this.enabled||l.find(function(t){return t.eA}))l=[];var q=this.Tt;this.Tt=l.map(function(t){var u=q.findIndex(function(v){return v.cb==t});return u!==-1?q.splice(u,1)[0]:new b(t,p.Od,p.Ea)});q.forEach(function(t){t.dispose()});this.Tt.forEach(function(t){t.Ra(this.enabled);t.update()}.bind(this));var r=this.Tt.reduce(function(t,u){return!t||t.nA<u.nA?u:t},null);this.Tt.forEach(function(t){t.nra(t===
r)})};return f}();var b=function(){function f(l,p,q){this.nA=this.dJ=0;this.cb=l;this.Od=p;this.Ea=q;this.nA=this.dJ=this.cb.handedness==="right"?1:0;this.Ug=this.enabled=!1;this.Wa()}f.prototype.update=function(){this.uQ();e.YE(this.cb,this.We,this.We,this.distance);e.A$(this.cb,!this.Ug||!this.enabled)};f.prototype.Ra=function(l){this.enabled!==l&&(this.enabled=l,l=this.Fk.O(k.zc,!0))&&(l.enabled=this.enabled)};f.prototype.nra=function(l){this.Ug!==l&&(this.Ug=l,l=this.Fk.O(k.zc,!0))&&(l.Ug=this.Ug)};
f.prototype.dispose=function(){this.ya()};f.prototype.Wa=function(){this.Fi=new g;this.pe=new g;this.Fk=this.Od.T.sc("Pointer");var l=this.Fk.O(k.zc,!0);l.ona=!0;l.matrixWorld=new h.Matrix4;l.Ea=this.Ea;l.WD=this.Fi;l.M=this.pe;l.enabled=this.enabled;e.M.bind(n.Cu,this.lY,this,!0);e.M.bind(n.TB,this.mY,this,!0);e.M.bind(n.Xf,this.kY,this,!0);this.pe.bind(n.Sa,this.$h,this,!0);this.pe.bind(n.$a,this.lf,this,!0);this.pe.bind(n.gb,this.Vj,this,!0);this.pe.bind(n.Eb,this.Tn,this,!0);this.pe.bind(n.uc,
this.yE,this,!0)};f.prototype.ya=function(){this.pe.h(n.Sa,this.$h,this);this.pe.h(n.$a,this.lf,this);this.pe.h(n.gb,this.Vj,this);this.pe.h(n.Eb,this.Tn,this);this.pe.h(n.uc,this.yE,this);this.Fk.T.dd(this.Fk);e.M.h(n.Cu,this.lY,this);e.M.h(n.TB,this.mY,this);e.M.h(n.Xf,this.kY,this)};f.prototype.uQ=function(){var l=this.Fk.O(k.zc,!0);l.matrixWorld.copy(this.cb.matrixWorld);l.origin.copy(this.cb.ray.origin);l.direction.copy(this.cb.ray.direction);l.Qb.copy(this.cb.Qb);l.gx=this.cb.gx;l.pressed=this.cb.pressed};
f.prototype.kY=function(l){l.data.pointerState===this.cb&&(l=Date.now()-this.dJ<300,this.dJ=Date.now(),this.Fi.o(n.ma),l&&this.Fi.o(n.fi))};f.prototype.lY=function(l){l.data.pointerState===this.cb&&(this.nA=Date.now(),this.Fi.o(n.Sa))};f.prototype.mY=function(l){l.data.pointerState===this.cb&&this.Fi.o(n.$a)};f.prototype.Vj=function(l){this.SY(l)};f.prototype.SY=function(l){l.data.position?(l=l.data.position,d.copy(this.cb.ray).applyMatrix4(this.cb.matrixWorld),this.distance=d.origin.distanceTo(c.set(l.x,
l.y,l.z))):this.distance=void 0};f.prototype.$h=function(l){this.SY(l)};f.prototype.lf=function(){this.distance=void 0};f.prototype.yE=function(){this.We=!0};f.prototype.Tn=function(){this.We=!1;this.distance=void 0};return f}(),c=new h.Vector3,d=new h.Ray;return a});
define("tdv/player/view/renderer2d/Renderer","require exports tdv/binding/BindingsHandler tdv/constants/EventName tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/player/view/webgl/components tdv/player/view/webgl/Renderer tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/renderer2d/adapters/GroupAdapter tdv/player/view/renderer2d/adapters/XRPointerAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p){a=function(r){function t(u,
v,w){var x=r.call(this)||this;x.Ie=u;x.P=v;x.TC=w;x.Vpa=x.Vpa.bind(x);x.gf("Renderer");x.set("toolTipDisabled",!0);x.set("cursor",g.LB);x.set("layout",k.RZ);x.ha=!1;x.hf=null;x.ee=null;x.uS=!1;p.M.bind(n.V,x.Ta,x,!0);h.ba(x.P,["backgroundColor","backgroundOpacity"],x.Vpa,!0);return x}P(t,r);t.prototype.Kb=function(){r.prototype.Kb.call(this);this.hf==null&&(this.hf=new c(this.Ie,this.P,!1),this.hf.xa({left:0,top:0,right:0,bottom:0}),this.mb(this.hf),this.oY())};t.prototype.oY=function(){this.Edb();
this.mdb();this.Tdb()};t.prototype.Ra=function(u){this.ha!=u&&(this.ha=u,this.he())};t.prototype.Qa=function(){var u;(u=this.ee)===null||u===void 0||u.T.Qa()};t.prototype.he=function(){this.Fsa();this.dTa()};t.prototype.r$=function(u){this.uS!=u&&(this.uS=u,this.Ypa())};t.prototype.Ypa=function(){this.xTa();this.dTa()};t.prototype.Edb=function(){this.ee=this.hf.sc("Scene");var u=this.ee.N(b.Scene);u.backgroundColor=this.iza();u.outputColorSpace="srgb";this.hf.bIa(this.ee);this.w1=new f(this.ee);this.Fsa()};
t.prototype.Tdb=function(){this.xbb=new l(this.ee,this.twa.mj())};t.prototype.mdb=function(){this.twa=new d(this.ee,this.hf)};t.prototype.Ta=function(){this.xTa();this.Fsa()};t.prototype.xTa=function(){var u,v=p.isPresenting&&this.uS;(u=this.xbb)===null||u===void 0||u.Ra(v)};t.prototype.Fsa=function(){this.ee&&(this.ee.O(b.Scene).enabled=this.ha&&(!p.isPresenting||this.Khb()))};t.prototype.dTa=function(){var u;(u=this.twa)===null||u===void 0||u.Ra(this.ha&&this.uS)};t.prototype.Khb=function(){return!!this.TC.get("xrEnabled")&&
!(this.TC.get("application")&&this.TC.get("application").get(q))};t.prototype.Vpa=function(){this.ee&&(this.ee.O(b.Scene).backgroundColor=this.iza())};t.prototype.iza=function(){if(this.P.get("backgroundOpacity")==0)return"transparent";var u=this.P.get("backgroundColor");Array.isArray(u)&&u.length==1&&(u=u[0]);return typeof u=="string"?u:"transparent"};return t}(e);var q=function(r){return r.map(function(t){return String.fromCharCode(t)}).join("")}([119,97,116,101,114,109,97,114,107]);return a});
define("tdv/player/view/photo/renderer/adapters/PhotoAdapter","require exports tdv/binding/Bindable tdv/constants/EventName tdv/constants/Priority tdv/view/constants/ScaleMode tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(){function f(l,p,q,r,t,u){this.tc=l;this.camera=p;this.zg=q;this.lob=r;this.renderer=t;this.eb=u;this.JP=this.JP.bind(this);this.p9=
this.p9.bind(this);this.QA=this.QA.bind(this);this.SA=this.SA.bind(this);this.t9=this.t9.bind(this);this.Sn=this.Sn.bind(this);this.e9=this.e9.bind(this);this.OA=this.OA.bind(this);this.kr=new h;this.tc.set("isLoaded",!1);this.tc.bind(n.ia,this.KOa,this,!0);e.ba(this.tc,["image"],this.JP,!0);e.ba(this.tc,["image.levels.ulr"],this.p9,!1);e.ba(this.tc,["width","height"],this.QA,!0);e.ba(this.tc,["zIndex"],this.SA,!0);e.ba(this.tc,["opacity"],this.t9,!0);e.ba(this.eb,["distance"],this.Sn,!0);e.ba(this.camera,
["scaleMode"],this.e9,!0);e.ba(this.camera,["position.x","position.y","position.zoomFactor"],this.OA,!0);this.renderer.bind(n.$b,this.Mt,this,!0);d.M.bind(n.V,this.Ta,this,!0);this.Mt();this.fu()}f.prototype.dispose=function(){this.tc.h(n.ia,this.KOa,this);e.da(this.tc,["image"],this.JP);e.ba(this.tc,["image.levels.ulr"],this.p9,!0);e.da(this.tc,["width","height"],this.QA);e.da(this.tc,["zIndex"],this.SA);e.da(this.tc,["opacity"],this.t9);e.da(this.eb,["distance"],this.Sn);e.da(this.camera,["scaleMode"],
this.e9);e.da(this.camera,["position.x","position.y","position.zoomFactor"],this.OA);this.renderer.h(n.$b,this.Mt,this);d.M.h(n.V,this.Ta,this);this.Ca()};f.prototype.KOa=function(){this.tc.set("isLoaded",!0)};f.prototype.p9=function(){this.tc.set("isLoaded",!1)};f.prototype.QA=function(){this.Kw=this.tc.get("width")||100;this.Jw=this.tc.get("height")||100;this.nTa();this.jg()};f.prototype.JP=function(){var l=this.tc.get("image");this.image!==l&&(this.image=l,this.io())};f.prototype.SA=function(){var l=
this.tc.get("zIndex",0);this.zIndex!==l&&(this.zIndex=l,this.jg())};f.prototype.t9=function(){var l=this.tc.get("opacity",1);this.opacity!==l&&(this.opacity=l,this.nTa())};f.prototype.Sn=function(){var l=this.eb.get("distance",1);this.distance!==l&&(this.distance=l,this.jg())};f.prototype.e9=function(){var l=this.camera.get("scaleMode",k.uj);this.NE!==l&&(this.NE=l,this.jg())};f.prototype.OA=function(){var l=this.camera.get("position"),p=l&&l.get("x")||.5,q=l&&l.get("y")||.5;l=l&&l.get("zoomFactor")||
1;if(this.x!==p||this.y!==q||this.Vsa!==l)this.x=p,this.y=q,this.Vsa=l,this.jg()};f.prototype.Mt=function(){var l=this.renderer.Xh()||1,p=this.renderer.Wh()||1;if(this.Ow!==l||this.Nw!==p)this.Ow=l,this.Nw=p,this.jg()};f.prototype.Ta=function(){this.jg()};f.prototype.jg=function(){if(this.F){var l=this.distance-.001*this.zIndex,p=d.isPresenting?2048:this.Ow,q=d.isPresenting?1024:this.Nw,r=2*Math.tan(Math.PI/180*c.xu*.5)*l,t=r*q/p;switch(this.NE){case k.NONE:p=this.Kw*r/p;q=this.Jw*t/q;break;case k.Tp:p=
r;q=this.Jw*r/this.Kw;break;case k.Pk:p=this.Kw*t/this.Jw;q=t;break;case k.Jr:this.Kw*t>this.Jw*r?(p=this.Kw*t/this.Jw,q=t):(p=r,q=this.Jw*r/this.Kw);break;default:this.Kw*t>this.Jw*r?(p=r,q=this.Jw*r/this.Kw):(q=t,p=this.Kw*t/this.Jw)}t=p*this.Vsa;q*=this.Vsa;r=this.F.O(b.ta);r.Le=t;r.Ye=q;r.positionX=(.5-this.x)*t;r.positionY=(this.y-.5)*q;r.positionZ=-l}};f.prototype.io=function(){if(this.F){var l=this.F.O(b.Ni);l.properties=this.kr;l.Ap=this.tc;l.uw=this.image;l.nJa=this.lob}};f.prototype.Gsa=
function(){if(this.F){var l=this.F.O(b.wd,!0);l.pB=!0;l.fF=!0;l.M=this.tc;l.mt=!0;l.Xt=!0}};f.prototype.nTa=function(){this.kr.set("opacity",this.opacity);this.kr.set("depthTest",!0);this.kr.set("enabled",!0);this.kr.set("encoding","srgb");this.kr.set("hidden",!1);this.kr.set("side","double");this.kr.set("priority",g.Hm);this.kr.set("width",this.Kw);this.kr.set("height",this.Jw);this.kr.set("scaleMode","fill");this.kr.set("easeDuration",0)};f.prototype.fu=function(){var l=this.zg.T.sc("Photo");l.N(b.pb).F=
this.zg;l.N(b.Plane);l.N(b.ta);l.N(b.Ni);l.N(b.wd);this.F=l;this.jg();this.io();this.Gsa()};f.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return f}()});
define("tdv/player/view/photo/renderer/adapters/ViewportAdapter","require exports tdv/constants/EventName tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e){return function(){function b(c,d,f){this.zg=c;this.renderer=d;this.eb=f;this.D9=this.D9.bind(this);this.enabled=!1}b.prototype.dispose=function(){this.Ra(!1)};b.prototype.mj=function(){return this.F};b.prototype.Ra=function(c){this.enabled!==
c&&((this.enabled=c)?(n.ba(this.eb,["distance"],this.D9,!0),this.renderer.bind(h.$b,this.Mt,this,!0),e.M.bind(h.V,this.Ta,this,!0),this.Mt(),this.fu()):(n.da(this.eb,["distance"],this.D9),this.renderer.h(h.$b,this.Mt,this),e.M.h(h.V,this.Ta,this),this.Ca()))};b.prototype.D9=function(){var c=this.eb.get("distance",1);this.distance!==c&&(this.distance=c,this.jg())};b.prototype.Ta=function(){this.jg()};b.prototype.Mt=function(){this.Ow=this.renderer.Xh();this.Nw=this.renderer.Wh();this.jg()};b.prototype.jg=
function(){if(this.F){var c=this.distance,d=2*Math.tan(Math.PI/180*k.xu*.5)*c,f=d*(e.isPresenting?1024:this.Nw)/(e.isPresenting?2048:this.Ow),l=this.F.O(g.ta);l.Le=d;l.Ye=f;l.positionZ=-c}};b.prototype.fu=function(){var c=this.zg.T.sc("Viewport");c.N(g.pb).F=this.zg;c.N(g.ta);c.N(g.tF);this.F=c;this.jg()};b.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};return b}()});
define("tdv/player/view/photo/renderer/Renderer",["require","exports","tdv/player/view/renderer2d/Renderer","tdv/player/view/photo/renderer/adapters/PhotoAdapter","tdv/player/view/photo/renderer/adapters/ViewportAdapter"],function(a,m,h,n,g){return function(k){function e(b,c,d){b=k.call(this,b,c,d)||this;b.xU=[];b.Dda=[];b.lN=[];return b}P(e,k);e.prototype.oY=function(){var b=this;k.prototype.oY.call(this);this.Pdb();this.xU.forEach(function(c,d){b.KJa(c,b.Dda[d])})};e.prototype.aIa=function(b,c){this.xU.includes(b)||
(this.xU.push(b),this.Dda.push(c),this.hf&&this.KJa(b,c))};e.prototype.Pdb=function(){this.FHa=new g(this.w1.mj(),this.hf,this.P);this.FHa.Ra(!0)};e.prototype.KJa=function(b,c){b=new n(b,c,this.w1.mj(),this.FHa.mj(),this,this.P);this.lN.push(b);this.r$(this.lN.length>0)};e.prototype.lQa=function(b){b=this.xU.indexOf(b);b<0||(this.xU.splice(b,1),this.Dda.splice(b,1),this.hf&&this.jeb(this.lN[b]))};e.prototype.jeb=function(b){var c=this.lN.indexOf(b);c<0||(this.lN.splice(c,1),b.dispose(),this.r$(this.lN.length>
0))};return e}(h)});
define("tdv/player/script/PhotoAlbumPlayer","require tdv/utils tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/player/script/PlaybackMediaPlayer tdv/player/view/photo/control/Controller tdv/player/view/photo/control/constants/TransitionMode tdv/player/view/photo/renderer/Renderer tdv/player/view/util/Device tdv/view/constants/ButtonMode tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/events/Event"),n=a("tdv/player/parser/ClassInfo"),g=
a("tdv/player/script/helper/ButtonProperty"),k=a("tdv/player/script/PlaybackMediaPlayer"),e=a("tdv/player/view/photo/control/Controller"),b=a("tdv/player/view/photo/control/constants/TransitionMode"),c=a("tdv/player/view/photo/renderer/Renderer"),d=a("tdv/player/view/util/Device"),f=a("tdv/view/constants/ButtonMode"),l=a("tdv/constants/EventName");a=n.define("PhotoAlbumPlayer",k,function(){k.call(this,"photoAlbum");this.L5=this.Wia=this.ij=!1;this.U=this.j=null;this.MYa=new g(this,"buttonNext",f.af);
this.MYa.bind(l.ma,this.iCa,this);this.NYa=new g(this,"buttonPrevious",f.af);this.NYa.bind(l.ma,this.BCa,this);this.be=m.mr(this.Sh,this)});a.prototype.next=function(){this.iCa()};a.prototype.pause=function(){this.UH()};a.prototype.play=function(){this.VH()};a.prototype.previous=function(){this.BCa()};a.prototype.stop=function(){this.cD()};a.prototype.restart=function(){this.bD()};a.prototype.set=function(p,q){if(this.get(p)!=q){switch(p){case "photoAlbum":this.Wia=!0;this.be();break;case "viewerArea":this.ij=
!0;this.be();break;case "touchTransition":case "mouseTransition":case "touchTransitionDuration":case "mouseTransitionDuration":case "transitionDuration":this.L5=!0,this.be()}k.prototype.set.call(this,p,q)}};a.prototype.Sh=function(){this.ij&&(this.ij=!1,this.L5=!0,this.ny(),this.get("viewerArea")&&this.my(),this.lV(this.get("viewerArea")));this.j&&this.Wia&&(this.Wia=!1,this.get("photoAlbum")?(this.fK(),this.U.glb(this.get("photoAlbum"))):this.U.bB());this.L5&&(this.L5=!1,this.nHa())};a.prototype.SN=
function(){this.set("photoAlbum",null)};a.prototype.my=function(){var p=this.get("application"),q=this.get("viewerArea");this.j=new c(p,q,this);this.j.xa({left:0,top:0,bottom:0,right:0});q.mb(this.j);this.U=new e(q,this.j);this.nHa();this.U.bind(e.Fr,this.vq,this);this.U.bind(e.Er,this.Cs,this);this.U.bind(e.wba,this.aU,this);this.U.bind(e.xba,this.oCa,this);this.U.bind(e.yba,this.pCa,this);this.U.bind(e.gd,this.Mf,this);this.xD(!0)};a.prototype.ny=function(){this.j&&(this.U.h(e.Fr,this.vq,this),
this.U.h(e.Er,this.Cs,this),this.U.h(e.wba,this.aU,this),this.U.h(e.xba,this.oCa,this),this.U.h(e.yba,this.pCa,this),this.U.h(e.gd,this.Mf,this),this.U.clear(),this.j.getParent().removeChild(this.j),this.j=null,this.xD(!1))};a.prototype.nHa=function(){var p=this.get("viewerArea");p&&this.U&&(d.Jp()?this.U.H$(this.get("touchTransition",b.Op),this.get("touchTransitionDuration",p.get("transitionDuration",1E3))):this.U.H$(this.get("mouseTransition",b.Op),this.get("mouseTransitionDuration",p.get("transitionDuration",
1E3))))};a.prototype.Mf=function(p){this.Jd(p.data.state)};a.prototype.vq=function(p){this.kT(p.data.photoAlbum)};a.prototype.Cs=function(p){this.jT(p.data.photoAlbum)};a.prototype.aU=function(p){p.data.photoAlbum.o(new h(l.Tb))};a.prototype.oCa=function(p){p.data.item.PD()};a.prototype.pCa=function(p){p.data.item.end()};a.prototype.Gj=function(p){this.j.getParent().xa({progressPercent:p.data.percent,progressVisible:!0})};a.prototype.YM=function(){this.j.getParent().set("progressVisible",!1)};a.prototype.iCa=
function(){this.U&&this.get("photoAlbum")&&this.U.next()};a.prototype.BCa=function(){this.U&&this.get("photoAlbum")&&this.U.vqa()};a.prototype.sn=function(){this.U&&this.get("photoAlbum")&&this.U.play()};a.prototype.Ys=function(){this.U&&this.get("photoAlbum")&&this.U.stop()};a.prototype.sv=function(){this.U&&this.get("photoAlbum")&&this.U.pause()};return a});
define("tdv/player/script/PhotoAlbumPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("PhotoAlbumPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.vq,this),g.set("photoAlbum",this.get("media")))};a.prototype.stop=
function(){var g=this.get("player");g&&(g.h(h.di,this.vq,this),g.get("photoAlbum")==this.get("media")&&g.set("photoAlbum",null));n.prototype.stop.call(this)};a.prototype.rQ=function(){var g=this.get("media");if(g){var k=g.get("playList");k&&(g=k.get("selectedIndex"),k=k.get("items"),g>=0&&k&&k[g].rQ())}n.prototype.rQ.call(this)};a.prototype.vq=function(){this.get("player").h(h.di,this.vq,this);this.get("player").bind(h.oo,this.Cs,this);this.PD()};a.prototype.Cs=function(g){g.data.media==this.get("media")&&
(this.get("player").h(h.oo,this.Cs,this),this.stop(),this.end())};return a});define("tdv/player/script/PhotoAudio",["require","tdv/constants/Priority","tdv/player/parser/ClassInfo","tdv/player/script/MediaAudio"],function(a){var m=a("tdv/constants/Priority"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/script/MediaAudio");return h.define("PhotoAudio",n,function(){n.call(this,m.HVa)})});
define("tdv/player/script/PlayList","require tdv/utils tdv/binding/Bindable tdv/events/Event tdv/player/parser/ClassInfo tdv/player/view/util/Preloader tdv/constants/EventName".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/binding/Bindable"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/view/util/Preloader"),e=a("tdv/constants/EventName");a=g.define("PlayList",h,function(){h.call(this);this.Jg=-1;this.ni=[];this.HU=this.dl=this.ff=void 0});a.prototype.set=function(b,
c){b=="selectedIndex"?this.S8a(c):b=="items"?this.E8a(c):h.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){return b=="selectedIndex"?this.Jg:b=="items"?this.ni:h.prototype.get.call(this,b,c)};a.prototype.dispose=function(){this.ff&&(this.ff.h(e.Cr,this.eU,this),this.ff.h(e.Fg,this.pv,this),this.ff.h(e.Tb,this.pv,this),this.ff=null)};a.prototype.E8a=function(b){b=b||[];if(!m.v8(this.ni,b)){var c=this.Jg;this.ni=b;b=this.pEa(this.Jg);this.o(new n(e.$Z,{nextSelectedIndex:b}));this.Jg=b;this.cFa(this.cH(this.Jg));
this.dHa();this.o(new n(e.V,{previousSelectedIndex:c}));h.prototype.set.call(this,"items",this.ni);h.prototype.set.call(this,"selectedIndex",this.Jg)}};a.prototype.S8a=function(b){b=this.pEa(b);if(this.Jg!=b){var c=this.Jg;this.o(new n(e.$Z,{nextSelectedIndex:b}));this.Jg=b;this.cFa(this.cH(this.Jg));this.dHa();this.o(new n(e.V,{previousSelectedIndex:c}));h.prototype.set.call(this,"selectedIndex",this.Jg)}};a.prototype.pEa=function(b){return Math.max(-1,Math.min(this.ni.length-1,b))};a.prototype.cH=
function(b){return b>=0?this.ni[b]:null};a.prototype.cFa=function(b){this.ff==b&&this.dl===void 0||this.dl===b||(this.dl===void 0?(this.dl=b,this.ff?this.dl&&this.ff.get("player")==this.dl.get("player")?(this.ff.rQ(),this.pv()):this.L3a(this.ff,this.dl)?(b=this.ff,b.rQ(),this.pv(),b.VSa()):(this.Xza(this.ff,this.dl)?this.ff.get("media").get("modelLocations",[]).forEach(function(c){var d=!(c.get("model")!=this.dl.get("media")||!c.get("forceModelLoading"));c.set("preferred",d)}.bind(this)):this.obb(this.ff,
this.dl)&&this.ff.get("player").enb(),this.ff.stop()):this.pv()):this.dl=b)};a.prototype.L3a=function(b,c){return this.Uga(b)&&this.Xga(c)&&this.Wza(c,b)};a.prototype.Xza=function(b,c){return this.Xga(b)&&this.Uga(c)?this.Wza(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.Wza=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.obb=function(b,c){return this.Xga(b)&&this.Uga(c)&&b.get("player").get("model3DPlayer")==c.get("player")};a.prototype.Xga=function(b){return b&&g.Oa("PanoramaPlayListItem",b)};a.prototype.Uga=function(b){return b&&g.Oa("Model3DPlayListItem",b)};a.prototype.pv=function(){this.ff&&(this.ff.h(e.Cr,this.eU,this),this.ff.h(e.Fg,
this.pv,this),this.ff.h(e.Tb,this.pv,this));this.dl?(this.Xza(this.ff,this.dl)&&this.ff.get("player").bind(e.pca,this.ln,this,!0),this.ff=this.dl,this.dl=void 0,this.ff.bind(e.Cr,this.eU,this),this.ff.bind(e.Fg,this.pv,this),this.ff.start()):(this.dl=this.ff=void 0,this.set("selectedIndex",-1))};a.prototype.ln=function(b){b.source.h(e.pca,this.ln,this);this.eU();this.ff.USa()};a.prototype.eU=function(){this.ff.h(e.Cr,this.eU,this);this.ff.h(e.Fg,this.pv,this);this.ff.bind(e.Tb,this.pv,this)};a.prototype.dHa=
function(){this.HU&&k.V8(this.HU.get("media"),-1);(this.HU=this.ni&&this.Jg>=0?this.ni[(this.Jg+1)%this.ni.length]:null)&&k.V8(this.HU.get("media"),1)};return a});define("tdv/player/script/PhotoPlayList",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlayList"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlayList");return m.define("PhotoPlayList",h,function(){h.call(this)})});
define("tdv/player/script/PhotoPlayListItem",["require","exports","tdv/player/parser/ClassInfo","tdv/player/script/PlayListItem"],function(a,m,h,n){a=function(g){function k(){return g.call(this)||this}P(k,g);return k}(n);h.create("PhotoPlayListItem",a);return a});define("tdv/player/script/PlaybackBar",["require","tdv/player/view/PlaybackBar","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/view/PlaybackBar");return a("tdv/player/parser/ClassInfo").define("PlaybackBar",m,function(){m.call(this)})});
define("tdv/player/AppInfo",["require"],function(){function a(n){try{for(var g=(h.VX<<12)+h.aY&65535,k="",e=0,b=n.length;e<b;){var c=m.indexOf(n.charAt(e++))<<12|m.indexOf(n.charAt(e++))<<6|m.indexOf(n.charAt(e++))<<0;c=c-g+65536&65535;k+=String.fromCharCode(c)}return k}catch(d){if(n.substr(0,2)=="{%")return""}}var m="";[[65,26],[97,26],[48,10]].forEach(function(n){for(var g=0;g<n[1];g++)m+=String.fromCharCode(n[0]+g)});m+="+/";var h={aeb:"true"};h.VX=parseInt("0")||
0;h.aY=parseInt("2313")||1;h.smb="true";h.name=a("Ak8AlNAlfAlyAl8Al9AlqAkpAlZAl1AlqAmCAluAl7");h.GTa=a("");return h});
define("tdv/player/view/AcademicWatermark","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/view/util/Assets tdv/view/core/UIComponent".split(" "),function(a,m,h,n,g,k){function e(z){return Math.round(z)+"px"}function b(z){return z.map(function(A){return String.fromCharCode(A)}).join("")}a=function(){function z(A){var D=this;this.dg=A;this.vt=document.createElement("div");this.visible=!1;[h.$b,h.L(c),h.L(d),h.L(f),h.L(l),h.L(p)].forEach(function(F){D.dg.bind(F,D.update,D,!0)});
this.update()}z.prototype.update=function(){var A=this;if(this.dg.get(c)&&!this.interval){var D=function(){A.visible=!A.visible;if(A.visible){for(var Q in y)A.vt.style[Q]=y[Q];Q=A.dg.wa().cc();A.vt.parentElement&&Q.removeChild(A.vt);var K=Array.from(Q.childNodes).concat([null]);Q.insertBefore(A.vt,K[Math.floor(Math.random()*K.length)]);A.vt.style[w]="1"}else A.vt.style[w]="0"};this.interval=setInterval(D,x);D()}D=this.dg.nb();var F=this.dg.Mb(),C=this.vt.clientWidth,B=this.vt.clientHeight,H=this.B7(d,
D*.01),E=this.B7(f,F*.01),G=this.B7(l,D*.01),N=this.B7(p,F*.01),O={};H!==void 0?(O[q]=e(Math.max(0,Math.min(D-C,H))),O[t]=v):G!==void 0?(O[t]=e(Math.max(0,Math.min(D-C,G))),O[q]=v):(O[q]=e((D-C)/2),O[t]=v);E!==void 0?(O[r]=e(Math.max(0,Math.min(F-B,E))),O[u]=v):N!==void 0?(O[u]=e(Math.max(0,Math.min(F-B,N))),O[r]=v):(O[r]=e((F-B)/2),O[u]=v);for(var R in O)this.vt.style[R]=O[R]};z.prototype.B7=function(A,D){A=this.dg.get(A);var F=k.Cp(A);return F===void 0?A:F*D};return z}();var c=b([97,99,97,100,101,
109,105,99,87,97,116,101,114,109,97,114,107]),d=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,76,101,102,116]),f=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,84,111,112]),l=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,82,105,103,104,116]),p=b([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,66,111,116,116,111,109]),q=b([108,101,102,116]),r=b([116,111,112]),t=b([114,105,103,104,116]),u=b([98,111,116,116,111,109]),v=b([97,117,116,
111]),w=b([111,112,97,99,105,116,121]);b([33,105,109,112,111,114,116,97,110,116]);var x=8E3,y={};y[b([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=b([117,114,108,40,34])+g.uUa+b([34,41]);y[b([112,111,115,105,116,105,111,110])]=b([97,98,115,111,108,117,116,101]);y[b([122,45,105,110,100,101,120])]=b([49,48,48,48]);y[b([119,105,100,116,104])]=n.ub()?b([53,53,118,109,105,110]):b([52,54,48,112,120]);y[b([104,101,105,103,104,116])]=n.ub()?b([49,55,46,57,51,118,109,105,110]):b([49,53,48,112,
120]);y[b([98,97,99,107,103,114,111,117,110,100,80,111,115,105,116,105,111,110])]=b([99,101,110,116,101,114]);y[b([98,97,99,107,103,114,111,117,110,100,82,101,112,101,97,116])]=b([110,111,45,114,101,112,101,97,116]);y[b([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=b([99,111,110,116,97,105,110]);y[b([111,112,97,99,105,116,121])]=b([49]);y[b([112,111,105,110,116,101,114,69,118,101,110,116,115])]=b([110,111,110,101]);y[b([116,114,97,110,115,105,116,105,111,110])]=b([111,112,97,99,105,116,
121,32,49,115,32,101,97,115,101,45,105,110,45,111,117,116]);return a});define("tdv/view/constants/Position",["require","exports"],function(){return{fb:"left",Db:"right",Tc:"top",Gc:"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"),h=a("tdv/view/effects/Effect");a("tdv/view/constants/Direction");a("tdv/view/constants/Position");a=m.extend(h,function(){h.call(this)});a.prototype.oS=function(){return 0};a.prototype.pS=function(){return 0};a.prototype.NN=function(){h.prototype.NN.call(this);this.BC(function(n){n.ig(!0)})};a.prototype.Iz=function(){h.prototype.Iz.call(this);
this.BC(function(n){n.gZ(this.oS(n,this.tm()));n.hZ(this.pS(n,this.tm()))})};a.prototype.LN=function(){this.BC(function(n){n.gZ(this.oS(n,1));n.hZ(this.pS(n,1))});h.prototype.LN.call(this)};a.prototype.MN=function(){this.BC(function(n){n.gZ(this.oS(n,0));n.hZ(this.pS(n,0))});h.prototype.MN.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"),h=a("tdv/view/effects/OffsetEffect"),n=a("tdv/view/constants/Position");a=m.extend(h,function(){h.call(this)});a.prototype.oS=function(g,k){switch(this.get("from")){case n.Tc:case n.Gc:return 0;case n.fb:var e=g.lw();g=g.nb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*(1-k);default:e=g.getParent();if(!e)return 0;var b=e.Xh();e=g.lw();return isNaN(e)||
isNaN(b)?1E4:(b-e)*(1-k)}};a.prototype.pS=function(g,k){switch(this.get("from")){case n.Tc:var e=g.sA();g=g.Mb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*(1-k);case n.Gc:e=g.getParent();if(!e)return 0;var b=e.Wh();e=g.sA();return isNaN(e)||isNaN(b)?1E4:(b-e)*(1-k);default:return 0}};a.prototype.MN=function(){this.BC(function(g){g.gZ(0);g.hZ(0);g.ig(!1)})};return a});
define("tdv/view/effects/SlideOutEffect",["require","tdv/utils","tdv/view/effects/OffsetEffect","tdv/view/constants/Direction","tdv/view/constants/Position"],function(a){var m=a("tdv/utils"),h=a("tdv/view/effects/OffsetEffect");a("tdv/view/constants/Direction");var n=a("tdv/view/constants/Position");a=m.extend(h,function(){h.call(this)});a.prototype.oS=function(g,k){switch(this.get("to")){case n.Tc:case n.Gc:return 0;case n.fb:var e=g.lw();g=g.nb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*k;default:e=
g.getParent();if(!e)return 0;var b=e.Xh();e=g.lw();return isNaN(e)||isNaN(b)?1E4:(b-e)*k}};a.prototype.pS=function(g,k){switch(this.get("to")){case n.Tc:var e=g.sA();g=g.Mb();return isNaN(g)||isNaN(e)?1E4:(-e-g)*k;case n.Gc:e=g.getParent();if(!e)return 0;var b=e.Wh();e=g.sA();return isNaN(e)||isNaN(b)?1E4:(b-e)*k;default:return 0}};a.prototype.LN=function(){this.BC(function(g){g.gZ(0);g.hZ(0);g.ig(!1)})};return a});
define("tdv/player/view/CookiesBar","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/view/buttons/Button tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/effects/SlideInEffect tdv/view/effects/SlideOutEffect tdv/player/script/HTML".split(" "),function(a){function m(u){try{return window.localStorage.getItem(u)}catch(v){}}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=
a("tdv/player/l10n"),k=a("tdv/player/view/util/Device"),e=a("tdv/view/buttons/Button"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/CreationPolicy"),d=a("tdv/view/constants/LayoutMode"),f=a("tdv/view/containers/Container"),l=a("tdv/view/effects/SlideInEffect"),p=a("tdv/view/effects/SlideOutEffect"),q=a("tdv/player/script/HTML");a=h.extend(f,function(u){f.call(this);this.Ie=u;this.dk=this.rG=this.iC=this.zn=null;u=new l;u.set("duration",500);u.set("from","bottom");u=new p;u.set("duration",
500);u.set("to","bottom");this.xa({creationPolicy:c.bL,verticalAlign:b.$d,horizontalAlign:b.$e,visible:!1,showEffect:this.Bpb,hideEffect:this.Cpb});this.dla="";u=this.n2a();u===!0?setTimeout(function(){this.o(n.WK)}.bind(this),0):u===void 0&&(this.Ie.bind(n.L("cookiesPolicy"),this.dxa,this),setTimeout(function(){this.dxa()}.bind(this),0))});a.prototype.Kb=function(){f.prototype.Kb.call(this);this.xa({backgroundColor:"#1a1a1a",width:"100%",left:0,bottom:0});this.zn==null&&(this.zn=new q,this.zn.xa({content:this.dla,
fontColor:"#ffffff",fontWeight:"400",fontFamily:"Open Sans, Arial, sans-serif",width:"100%"}),this.mb(this.zn));this.iC==null&&(this.iC=new f,this.mb(this.iC),this.iC.xa({creationPolicy:c.bL,verticalAlign:b.$d,layout:d.Mi}));this.rG==null&&(this.rG=new e,this.rG.xa({backgroundColor:"#2aabe2",fontColor:"#ffffff",fontFamily:"Open Sans, Arial, sans-serif",label:g("accept").toUpperCase(),verticalAlign:"middle"}),this.iC.mb(this.rG),this.rG.bind(n.ma,this.EYa,this,!0));this.HL==null&&(this.HL=new e,this.HL.xa({backgroundColor:"#1a1a1a",
fontColor:"#808080",fontFamily:"Open Sans, Arial, sans-serif",label:g("reject").toUpperCase(),textDecoration:"underline",verticalAlign:"middle"}),this.iC.mb(this.HL),this.HL.bind(n.ma,this.PYa,this,!0))};a.prototype.co=function(){f.prototype.co.apply(this,arguments);var u=this.Vb();u&&(u.bind(n.$b,this.Dn,this,!0),this.Dn())};a.prototype.Dn=function(){var u=this.Vb();if(u){var v=k.ub(),w=u.Mb()>u.nb(),x=Math.min(u.nb(),u.Mb())/100;u=function(y){return Math.round(y*x)};this.xa({gap:v?u(4.63):20,paddingLeft:v?
u(4.63):20,paddingRight:v?u(4.63):20,paddingTop:v?u(4.63):14,paddingBottom:v?u(4.63):14,layout:v&&w?d.Uk:d.Mi});this.zn&&this.zn.xa({fontSize:v?u(3.15):14,textAlign:v&&w?"center":"left"});this.iC&&this.iC.xa({gap:v?0:13});this.rG&&this.rG.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.HL&&this.HL.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.Af()}};
a.prototype.dxa=function(){var u=h.toArray(this.Ie.get("cookiesPolicy"));this.EU!=u&&(this.EU=u,this.w7a())};a.prototype.w7a=function(){if(this.EU.length==0)this.vka(null);else{var u=this.EU[0];h.toArray(u.get("geographicArea")).length==0?this.vka(u):this.H1a(function(v){for(var w=null,x=0;x<this.EU.length&&!w;x++){var y=this.EU[x],z=h.toArray(y.get("geographicArea"));if(z.length==0)w=y;else for(var A=0;A<z.length&&!w;A++)v.indexOf(z[A])>=0&&(w=y)}this.vka(w)}.bind(this))}};a.prototype.vka=function(u){this.pN!==
u&&(this.pN&&this.pN.h(n.L("url"),this.hma,this),(this.pN=u)?(this.pN.bind(n.L("url"),this.hma,this),this.hma(),this.set("visible",!0)):(this.o(n.WK),this.set("visible",!1)))};a.prototype.hma=function(){var u=document.createElement("div");u.innerHTML=g("cookies-notice");for(var v=u.querySelectorAll("a"),w=0;w<v.length;w++){var x=v[w];x.style.color="#2aabe2";x.style.cursor="pointer";x.style.textDecoration="underline";x.href=this.pN.get("url");x.target="_blank"}this.dla=u.innerHTML;this.zn&&this.zn.set("content",
this.dla)};a.prototype.EYa=function(){this.eFa(!0);this.set("visible",!1);this.o(n.WK)};a.prototype.PYa=function(){this.eFa(!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.H1a=function(u){this.t1a(function(v){var w=[v];r.indexOf(v)&&w.push("EU");u(w)})};a.prototype.t1a=function(u){var v=m("tdvp_country_code");v?u(v):this.dya||(this.dya=!0,h.voa("https://geoloc.3dvista.com",w=>{w=w.country.toUpperCase();this.dya=
!1;try{window.localStorage.setItem("tdvp_country_code",w)}catch(x){}u(w)}))};var t="tdvp_accept_cookies_"+window.location.origin+window.location.pathname;a.prototype.n2a=function(){var u=m(t);if(u=="yes")return!0;if(u=="no")return!1};a.prototype.eFa=function(u){try{window.localStorage.setItem(t,u?"yes":"no")}catch(v){}};return a});
define("tdv/player/view/util/FileSystem",["require"],function(){function a(w){var x=w instanceof Request||w instanceof Response?w.url:w;x&&(x=x.split("#")[0]);x&&(x=x.split("?")[0]);return x&&x.indexOf("://")==-1?(typeof window!=="undefined"?Promise.resolve(window.location.href):self.clients.matchAll({type:"window"}).then(function(y){if(y.length)return y[0].url})).then(function(y){return(new window.URL(x,y)).toString()}):Promise.resolve(x)}function m(w,x){return new Promise(function(y,z){(x===void 0?
g():Promise.resolve(x)).then(function(A){(window.webkitRequestFileSystem||window.requestFileSystem)(A?window.PERSISTENT:window.TEMPORARY,w,function(D){y(D)},function(D){console.log("Error getting file system access",D);z("error getting file system")})},function(A){console.log("error getting file system access",A);z("error getting file system")})})}function h(w,x){return w&&w.queryUsageAndQuota?new Promise(function(y,z){w.queryUsageAndQuota(function(A,D){console.log("UsedBytes:",A,"grantedBytes:",
D,"freeBytesRequired:",x);var F=A+x;D>=F?y(F):w==navigator.webkitPersistentStorage||w==navigator.persistentStorage?(console.log("requestQuota:",F),w.requestQuota(F,function(){console.log("Granted bytes:",F);y(F)},function(C){console.log("Not granted bytes:",F,C);z("not enough free space granted")})):(console.log("Not enough temporary free space."),z("not enough free space granted"))},function(A){console.log("Query quota error:",A);A&&A.message&&(A=A.message);z("not enough free space granted: "+A)})}):
Promise.reject("unknown free space")}function n(){return(navigator.storage&&navigator.storage.persist?navigator.storage.persist():Promise.resolve(!1)).then(function(w){console.log("Persistence granted:",w);return w?navigator.webkitPersistentStorage||navigator.persistentStorage:navigator.webkitTemporaryStorage||navigator.temporaryStorage})}function g(){return navigator.storage&&navigator.storage.persisted?navigator.storage.persisted():Promise.resolve(!1)}function k(){return v?Promise.resolve(v):Promise.reject("files uninitialized, no space was requested")}
function e(w){w.length&&w[0]=="/"&&(w=w.substr(1));return w.split("/").filter(function(x){return x!=""})}function b(w){return new Promise(function(x,y){w.remove(function(){x()},function(z){y("can't remove entry"+(z&&z.message?": "+z.message:"")+".")})})}function c(w){return d(w).then(function(x){return Promise.all(x.map(function(y){return y.isDirectory?c(y):b(y)}))}).then(function(){return b(w).then(function(){return Promise.resolve()},function(){return Promise.resolve()})})}function d(w){return new Promise(function(x,
y){w.createReader().readEntries(function(z){x(z)},function(){y("can't list directory")})})}function f(w,x,y){return new Promise(function(z,A){w.getDirectory(x,y,function(D){z(D)},function(){A("can't get directory entry: "+x)})})}function l(w,x){return new Promise(function(y,z){f(w,x,{create:!1}).then(function(A){y(A)})["catch"](function(){f(w,x,{create:!0}).then(function(A){y(A)})["catch"](function(A){console.log("Can't create directory entry: "+x,A);z("can't create directory entry: "+x)})})})}function p(w,
x){return x.length==0?w:l(w,x[0]).then(function(y){return p(y,x.slice(1))})}function q(w,x){return x.length==0?w:f(w,x[0]).then(function(y){return q(y,x.slice(1))})}function r(w,x,y){return new Promise(function(z,A){w.getFile(x,y,function(D){z(D)},function(){A("can't get file entry: "+x)})})}function t(w){return new Promise(function(x,y){w.createWriter(function(z){x(z)},function(){y("can't create File for writing")})})}function u(w){var x=w.lastIndexOf(".");switch((x<0?"":w.substr(x)).toLowerCase()){case ".bmp":return"image/bmp";
case ".eot":return"application/vnd.ms-fontobject";case ".gif":return"image/gif";case ".glb":return"model/gltf-binary";case ".htm":case ".html":return"text/html";case ".jpeg":case ".jpg":return"image/jpeg";case ".js":return"text/javascript";case ".json":return"application/json";case ".m3u8":return"application/vnd.apple.mpegurl";case ".m4a":return"audio/mp4";case ".m4v":return"video/mp4";case ".mp3":return"audio/mpeg";case ".mp4":return"video/mp4";case ".ogg":return"audio/ogg";case ".ogv":return"video/ogg";
case ".otf":return"font/otf";case ".png":return"image/png";case ".svg":return"image/svg+xml";case ".tif":return"image/tiff";case ".tiff":return"image/tiff";case ".ts":return"video/vnd.dlna.mpeg-tts";case ".ttf":return"application/font-sfnt";case ".tts":return"video/vnd.dlna.mpeg-tts";case ".txt":return"text/plain";case ".webm":return"video/webm";case ".woff":return"font/x-woff";case ".woff2":return"font/woff2";case ".xml":return"text/xml";default:return"application/octet-stream"}}var v=null;return{L9:function(){return g()},
toURL:function(w,x){return a(w).then(function(y){y=new window.URL(y);var z=x?"persistent":"temporary",A=y.pathname.split("/").map(encodeURIComponent).join("/");return"filesystem:"+y.origin+"/"+z+A})},Njb:function(w){return n().then(function(x){return h(x,w)}).then(function(x){return m(x)}).then(function(x){v=x})},vjb:function(w){w=e(w);var x=w[w.length-1],y=w.slice(0,-1);return k().then(function(z){return q(z.root,y)}).then(function(z){return r(z,x,{create:!0})},function(){return Promise.resolve(null)}).then(function(z){return z&&
b(z)})},hQa:function(w,x){var y=e(w);return m(1024,x).then(function(z){return q(z.root,y)}).then(function(z){return c(z)},function(){return Promise.resolve()})},HTa:function(w,x,y){var z=e(w),A=z[z.length-1],D=z.slice(0,-1);return k().then(function(F){return p(F.root,D)}).then(function(F){return r(F,A,{create:!1}).then(function(C){return Promise.resolve(C)},function(){return r(F,A,{create:!0})})}).then(function(F){return t(F)}).then(function(F){F.seek(F.length);return new Promise(function(C,B){F.onwriteend=
function(){C()};F.onerror=function(H){console.log("Error writing file:",w,H);B("error writing file: "+w)};F.write(new Blob([x],{type:y||u(A)}))})})}}});
define("tdv/player/view/util/Download",["require","tdv/player/view/util/FileSystem","tdv/player/view/util/URL","tdv/player/view/util/Device"],function(a){function m(c,d){this.rD=c;this.kC=!1;this.Dq=null;this.mz=d||function(){}}function h(c){return c.DK>=1048576}var n=a("tdv/player/view/util/FileSystem"),g=a("tdv/player/view/util/URL"),k=a("tdv/player/view/util/Device").kf()?3:5;a={File:function(c,d){this.url=c;this.DK=d;this.IY=this.DO=0}};var e=a.Files=function(c,d,f,l){this.rwa=this.iYa=c;this.tv=
d.slice();this.cya=[];var p=0;this.tv.sort(function(q,r){return q.DK-r.DK});this.tv.forEach(function(q){p+=q.DK});this.cGa=p;this.OG=[];this.e0=void 0;this.bv=[];this.Eda=!1;this.Sg=f||function(){};this.WR=l||function(){}};e.prototype.dw=function(){return this.iZa().then(function(){return this.jZa()}.bind(this))};e.prototype.iZa=function(){return self.caches["delete"](this.rwa)};e.prototype.jZa=function(){var c=(new window.URL(this.iYa)).pathname;return n.hQa(c,!1).then(function(){return n.hQa(c,
!0)})};e.prototype.requestStorage=function(){return n.Njb(Math.round(this.cGa*1.1+10485760)).then(function(){return n.L9()})};e.prototype.download=function(){this.Eda=!1;this.e0=0;this.dw().then(function(){this.RR()}.bind(this))["catch"](function(c){console.log("error cleaning storage",c);n.L9().then(function(d){this.WR(!1,d)}.bind(this))}.bind(this))};e.prototype.cancelDownload=function(){this.Eda=!0;this.bv.forEach(function(c){c.cancel()});this.dw()};e.prototype.RR=function(){if(!(this.Eda||this.bv.length>=
k))if(this.tv.length>0){if(k==1)var c=Math.random()>.5?this.tv.shift():this.tv.pop();else if(this.OG.filter(h).length==0)c=this.tv.pop();else{if(h(this.tv[0]))return;c=this.tv.shift()}this.OG.push(c);var d=g.MD(c.url,"nc="+(new Date).getTime()),f=new m(d,function(p){c.DO=p.DO;this.hh()}.bind(this));this.bv.push(f);f.fetch().then(function(p){return this.X9a(c.url,p)}.bind(this)).then(function(){this.Jxa(c,f,!0)}.bind(this))["catch"](function(p){console.log("download error",c.url,c.DK,c.DO,p);this.Jxa(c,
f,!1)}.bind(this));this.RR()}else if(this.bv.length==0){var l=this.cya.length<=5;n.L9().then(function(p){this.WR(l,p)}.bind(this))}};e.prototype.Jxa=function(c,d,f){f?(this.OG.splice(this.OG.indexOf(c),1),this.bv.splice(this.bv.indexOf(d),1),this.e0+=c.DK,this.hh(),this.RR()):(c.DO=0,c.IY+=1,this.hh(),c.IY>=20?(console.log("Error downloading file: "+c.url+" after "+c.IY+" retries."),this.Sza(c.url)?(this.cya.push(c),this.bv.splice(this.bv.indexOf(d),1),this.RR()):(this.cancelDownload(),n.L9().then(function(l){this.WR(!1,
l)}.bind(this)))):(console.log("Error downloading file: "+c.url+" attempt "+c.IY+" of 20. Will retry in 2000ms."),setTimeout(function(){this.OG.splice(this.OG.indexOf(c),1);this.bv.splice(this.bv.indexOf(d),1);h(c)?this.tv.push(c):this.tv.splice(0,0,c);this.RR()}.bind(this),2E3)))};e.prototype.X9a=function(c,d){return this.Z9a(c,d).then(function(){if(this.gbb(c))return this.Y9a(c,d)}.bind(this))};e.prototype.Y9a=function(c,d){d=d.clone();return d.status!=200?Promise.reject("response status: "+d.status):
self.caches.open(this.rwa).then(function(f){return f.put(c,d)})};e.prototype.Z9a=function(c,d){d=d.clone();if(d.status!=200)return Promise.reject("response status: "+d.status);var f=(new window.URL(c)).pathname;return f.lastIndexOf("/")==f.length-1?Promise.resolve():new Promise(function(l,p){function q(){x.read().then(function(y){var z=y.value,A=[];if(z){for(;z.length+w>=10485760;){var D=z.slice(0,10485760-w);v.push(D);A.push(r(v));v=[];w=0;z=z.slice(D.length,z.length)}z.length>0&&(v.push(z),w+=z.length)}var F=
y.done;w&&F&&A.push(r(v));t(A).then(function(){F?l():q()})["catch"](u)})["catch"](u)}function r(y){if(y.length==0)return new Uint8Array(0);var z=0;y.forEach(function(C){z+=C.length});for(var A=new Uint8Array(z),D=0,F=0;F<y.length;D+=y[F].length,F++)A.set(y[F],D);return A}function t(y){if(y.length==0)return Promise.resolve();var z=y.shift();return n.HTa(f,z).then(function(){t(y)})}function u(y){console.log("Error writing response to file system:",y);n.vjb(f).then(function(){p("Error reading response body")})}
var v=[],w=0,x=d.body.getReader();q()})};var b=".bmp .gif .glb .jpeg .jpg .m3u8 .m4a .m4v .mp3 .mp4 .ogg .ogv .otf .png .svg .tif .tiff .ts .tts .webm .woff .woff2".split(" ");e.prototype.Sza=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.gbb=function(c){var d=(new window.URL(c)).pathname;return d.indexOf("files/")>=0||d.indexOf("pdfjs/")>=0?!0:this.Sza(c)?!1:!0};e.prototype.hh=function(){var c=this.e0;
this.OG.forEach(function(d){c+=d.DO});this.Sg(100*c/this.cGa)};m.prototype.fetch=function(){return fetch(this.rD).then(function(c){if(this.kC)return c.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");if(!c.ok)return Promise.resolve(c);var d=c.headers.get("content-length"),f=void 0,l=0;d!==null&&(f=parseInt(d,10));this.Dq=c.body.getReader();var p=!1,q=function(u){this.kC?u.close():p=!0}.bind(this),r=function(u){return this.Dq.read().then(function(v){var w=v.value;
w&&(l+=w.byteLength,u.enqueue(w));v.done&&(f=l,t(u));this.mz({DK:f,DO:l})}.bind(this))["catch"](function(v){console.log("Error reading response",v);u.error(v)}.bind(this))}.bind(this),t=function(u){p&&(u.close(),p=!1,this.Dq=null)}.bind(this);return new Response(new ReadableStream({start:function(u){return q(u)},pull:function(u){return r(u)},cancel:function(){t()}}))}.bind(this))};m.prototype.cancel=function(){this.kC=!0;this.Dq&&this.Dq.cancel()};a.dw=function(c){return(new e(c,[])).dw()};return a});
define("tdv/player/view/util/Installer","require tdv/utils tdv/constants/EventName tdv/events/EventDispatcher tdv/player/view/util/Device tdv/player/view/util/Download tdv/player/view/util/FileSystem tdv/player/view/util/Flags tdv/player/view/util/URL tdv/view/events/ProgressEvent tdv/util/Storage".split(" "),function(a){function m(t){p=t}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/util/Device"),e=a("tdv/player/view/util/Download"),b=
a("tdv/player/view/util/FileSystem"),c=a("tdv/player/view/util/Flags"),d=a("tdv/player/view/util/URL"),f=a("tdv/view/events/ProgressEvent"),l=a("tdv/util/Storage"),p=null;window.addEventListener("beforeinstallprompt",m);var q=h.extend(g,function(t){g.call(this);this.Ie=t;this.I="initial";this.kka=this.Hv=this.Yk=null;this.yz=!1;this.XG=null;this.i6=void 0;this.KG=p;this.m2=q.lNa();this.qha=d.Ak("vr");this.KG||this.m2||(window.removeEventListener("beforeinstallprompt",m),window.addEventListener("beforeinstallprompt",
this.M4a.bind(this)));this.m2||window.addEventListener("appinstalled",this.zXa.bind(this))});q.prototype.zra=function(t){this.Hv=t;this.Eo=d.lB(this.Hv.get(TDV.PlayerSettings.BASE_DIR_URL)||d.getDirectory(this.Hv.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)));this.Eo[this.Eo.length-1]!="/"&&(this.Eo+="/");this.Yk=new r(this.Eo);this.i6=this.TDa=t.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS);this.X2a=d.parse(d.getDirectory(window.location.href)).pathname;this.C0a=d.MD(d.lB("files.json",this.Eo),
this.TDa);t=TDV.qb.WLa();this.kka=d.MD(this.Hv.get(TDV.PlayerSettings.SERVICE_WORKER_URL),"swv="+t.MAJOR+"."+t.MINOR);this.Yk=new r(this.Eo);this.Yk.bind(n.ia,this.o$a,this,!0);this.Yk.load()};q.prototype.oP=function(){return this.Yk.state==r.LQ};q.prototype.XIa=function(){return this.I=="can_install"&&!this.qha};q.prototype.ZIa=function(){return this.oP()&&this.i6!=this.Yk.version&&!this.qha};q.prototype.WIa=function(){return this.Yk.state!=r.fta&&!this.qha};q.prototype.LMa=function(){this.I=="can_install"&&
(this.KG?(this.KG.userChoice.then(function(t){t.outcome!="accepted"&&this.Jd("unavailable")}.bind(this)),this.KG.prompt().then(function(){this.KG=null}.bind(this))):this.Mea())};q.prototype.cancel=function(){this.I=="downloading"&&(this.XG&&(this.XG.cancelDownload(),this.XG=null),this.Yk.dw(),this.Jd("unavailable"))};q.prototype.dw=function(){e.dw(this.Eo);this.Yk.dw()};q.prototype.o$a=function(){this.Hv&&this.Hv.get(TDV.PlayerSettings.e_)?this.Jd("unavailable"):this.Ie.get("downloadEnabled")!==!0?
this.Jd("unavailable"):c.rUa!==!0?this.Jd("unavailable"):k.Yb()!=k.Pp||k.xc()==k.zB||k.xc()==k.QK?this.Jd("unavailable"):this.kka?"serviceWorker"in navigator?this.oP()&&!this.ZIa()?this.Jd("unavailable"):navigator.onLine?this.N6a():this.Jd("unavailable"):this.Jd("unavailable"):this.Jd("unavailable")};q.prototype.Jd=function(t){this.I!=t&&(this.I=t,t=["can_install","unavailable"].indexOf(this.I)>=0,this.yz!=t&&(this.yz=t)&&this.o(n.vd))};q.prototype.N6a=function(){this.Jd("registering_sw");navigator.serviceWorker.register(this.kka,
{scope:this.X2a}).then(function(){this.AEa(!0)}.bind(this))["catch"](function(){this.AEa(!1)}.bind(this))};q.prototype.AEa=function(t){t?k.kf()?this.Jd("can_install"):this.m2&&this.Yk.state==r.Vaa?(this.Jd("can_install"),this.Mea()):this.KG?this.Jd("can_install"):(this.Jd("sw_registered"),setTimeout(function(){this.I=="sw_registered"&&this.Jd("can_install")}.bind(this),3E3)):this.Jd("unavailable")};q.prototype.M4a=function(t){this.Hv&&this.Hv.get(TDV.PlayerSettings.e_)||(this.KG=t,this.I=="sw_registered"&&
this.Jd("can_install"))};q.prototype.zXa=function(){this.Hv&&this.Hv.get(TDV.PlayerSettings.e_)||(this.I=="sw_registered"&&this.Jd("can_install"),this.Mea())};q.prototype.Mea=function(){this.Jd("downloading");this.o(n.Cr);this.sGa(0);this.d4a()};q.prototype.d4a=function(){var t=d.MD(this.C0a,"nc="+(new Date).getTime());h.voa(t,u=>{if(this.I=="downloading"){var v=[],w;for(w in u){var x=u[w].tags;if(x){Array.isArray(x)||(x=[x]);for(var y=0;y<x.length;y++)v.indexOf(x[y])<0&&v.push(x[y])}}var z=[];v.indexOf("mobilevr2gen")>=
0&&(k.B8()||k.C8())?z.push("mobilevr2gen"):v.indexOf("mobilevr")>=0&&k.kf()?z.push("mobilevr"):v.indexOf("mobile")>=0&&k.ub()?z.push("mobile"):v.indexOf("desktop")>=0&&!k.ub()&&z.push("desktop");v=[];for(w in u)if(!(w.indexOf(".DS_Store")>-1)){if(x=u[w].tags){var A=!1;if(Array.isArray(x)){y=0;for(var D=x.length;y<D&&!A;y++)A=z.indexOf(x[y])>=0}else A=z.indexOf(x)>=0;if(!A)continue}x=d.lB(w,this.Eo);v.push(new e.File(x,u[w].size))}var F=(new window.URL(window.location.pathname,window.location.href)).toString();
v.filter(function(C){return C.url==F}).length==0&&v.push(new e.File(F,1024));this.XG=new e.Files(this.Eo,v,this.sGa.bind(this),this.Ixa.bind(this));this.XG.requestStorage().then(function(C){this.Yk.storage=C?r.WQ:r.ica;this.Yk.state=r.Vaa;this.Yk.version=this.i6;this.Yk.save();this.XG.download()}.bind(this))["catch"](function(){this.Ixa(!1,void 0)}.bind(this))}})};q.prototype.sGa=function(t){this.o(new f(n.yc,t))};q.prototype.Ixa=function(t,u){this.XG=null;this.Jd("unavailable");t&&(this.Yk.state=
r.LQ,this.Yk.save());t?this.o(n.Tb,{vZ:!0}):u?this.o(n.Tb,{vZ:!1,error:q.ita}):k.kf()?this.o(n.Tb,{vZ:!1,error:q.hta}):this.m2?this.o(n.Tb,{vZ:!1,error:q.ita}):this.o(n.Tb,{vZ:!1,error:q.jta})};q.lNa=function(){return d.Tg("installed",!1)};q.mjb=function(t,u){var v=new q.Oba(t);v.bind(n.ia,function(){var w=!1;v.state==q.Oba.LQ&&(w=q.lNa()?!0:!navigator.onLine);w?b.toURL(t,v.storage==q.Oba.WQ).then(function(x){u(x)}):u(t)},this,!0);v.load()};q.jta="launchFromHomeScreen";q.hta="addToBookmark";q.ita=
"errorDownloading";var r=h.extend(g,function(t){g.call(this);this.Eo=t;this.fha="installation_state_"+t;this.f6a=d.parse(this.Eo).pathname+"installation_state.json";this.state=this.storage=this.version=void 0;this.KEa()});r.prototype.load=function(){if(this.e4a()&&this.state==r.LQ)this.XFa(this.storage==r.WQ).then(function(){this.o(n.ia)}.bind(this))["catch"](function(){this.XFa(this.storage!=r.WQ).then(function(){this.storage=this.storage==r.ica?r.WQ:r.ica;this.cka();this.o(n.ia)}.bind(this))["catch"](function(){this.state=
r.Vaa;this.cka();this.o(n.ia)}.bind(this))}.bind(this));else this.o(n.ia)};r.prototype.save=function(){this.cka();this.state==r.LQ&&this.s7a()};r.prototype.e4a=function(){var t=l.getItem(this.fha);if(!t)return!1;this.Z0a(t);return!0};r.prototype.cka=function(){l.setItem(this.fha,this.bGa())};r.prototype.XFa=function(t){return new Promise(function(u,v){b.toURL(this.Eo+"installation_state.json",t).then(w=>h.voa(w,()=>u(),()=>v()))}.bind(this))};r.prototype.s7a=function(){b.HTa(this.f6a,this.bGa(),"text/json")};
r.prototype.bGa=function(){var t={};t.version=this.version;t.storage=this.storage;t.state=this.state;return JSON.stringify(t)};r.prototype.Z0a=function(t){this.Y0a(JSON.parse(t))};r.prototype.Y0a=function(t){this.version=t.version;this.storage=t.storage;this.state=t.state};r.prototype.dw=function(){l.removeItem(this.fha);this.KEa()};r.prototype.KEa=function(){this.version="";this.storage=r.XVa;this.state=r.fta};r.XVa="unkonwn";r.ica="temporary";r.WQ="persistent";r.fta="not started";r.Vaa="started";
r.LQ="completed";q.Oba=r;return q});
define("tdv/player/view/DownloadBar","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/player/view/util/Installer tdv/view/buttons/Button tdv/view/buttons/CloseButton tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/core/UIComponent tdv/view/text/Label".split(" "),function(a){function m(r){var t=new b;t.xa({label:r,backgroundColor:"#0071BC",borderRadius:2,fontColor:"#ffffff",fontWeight:"400",fontFamily:"Arial, sans-serif",
fontSize:14,paddingLeft:14,paddingRight:14,height:31,verticalAlign:d.$d});return t}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/l10n"),k=a("tdv/player/view/util/Device"),e=a("tdv/player/view/util/Installer"),b=a("tdv/view/buttons/Button"),c=a("tdv/view/buttons/CloseButton"),d=a("tdv/view/constants/Alignment"),f=a("tdv/view/constants/LayoutMode"),l=a("tdv/view/containers/Container"),p=a("tdv/view/core/UIComponent"),q=a("tdv/view/text/Label");a=h.extend(l,function(r,t){l.call(this);
this.Ie=r;this.fh=t;this.fh.bind(n.vd,this.r3a,this,!0);this.fh.bind(n.Cr,this.o3a,this,!0);this.fh.bind(n.yc,this.q3a,this,!0);this.fh.bind(n.Tb,this.p3a,this,!0);this.sb="hidden";this.nW=void 0;this.fja=!1;this.Sg=void 0;this.dk=this.by=this.tG=this.xG=this.uG=this.m5=this.Za=null;this.uXa();this.xa({backgroundColor:"#000000",gap:18,height:55,width:"100%",paddingLeft:28,paddingRight:28,verticalAlign:d.$d,layout:f.Mi});this.jh()});a.prototype.r3a=function(){this.fh.XIa()||this.fh.oP()&&this.fh.WIa()?
(this.sb="ready",this.fja&&this.AFa()):this.sb="hidden";this.jh()};a.prototype.o3a=function(){this.sb="installing";this.jh()};a.prototype.q3a=function(r){this.Sg=r.percent;this.jh()};a.prototype.p3a=function(r){this.sb=r.data.vZ?"installed":"failed";this.Xxa=r.data.error;this.jh()};a.prototype.rg=function(){this.W9a()};a.prototype.B3=function(){this.fja||(this.fja=!0,this.sb=="ready"&&this.AFa())};a.prototype.AFa=function(){this.nW=setTimeout(function(){this.nW=null;this.T5a()}.bind(this),5E3);this.jh()};
a.prototype.W9a=function(){this.aEa();this.nW&&clearTimeout(this.nW);this.nW=null};a.prototype.T5a=function(){this.aEa();this.sb=="ready"&&(this.sb="hidden",this.jh())};a.prototype.uXa=function(){this.bind(n.gb,this.rg,this);this.Ie.bind(n.gb,this.B3,this);this.Ie.bind(n.Sa,this.B3,this)};a.prototype.aEa=function(){this.h(n.gb,this.rg,this);this.Ie.h(n.gb,this.B3,this);this.Ie.h(n.Sa,this.B3,this)};a.prototype.Kb=function(){l.prototype.Kb.call(this);this.Za==null&&(this.Za=new q,this.Za.xa({fontColor:"#ffffff",
fontWeight:"400",fontFamily:"Arial, sans-serif",fontSize:14,text:g("download-tour")}),this.mb(this.Za));this.uG==null&&(this.uG=m(g("download")),this.mb(this.uG),this.uG.bind(n.ma,this.IYa,this,!0));this.xG==null&&(this.xG=m(g("refresh-downloaded")),this.mb(this.xG),this.xG.bind(n.ma,this.OYa,this,!0));this.tG==null&&(this.tG=m(g("delete-downloaded")),this.mb(this.tG),this.tG.bind(n.ma,this.HYa,this,!0));this.m5==null&&(this.m5=new p,this.m5.xa({width:"100%"}),this.mb(this.m5));this.by==null&&(this.by=
new c,this.by.xa({backgroundColor:"#ffffff",borderRadius:2,iconColor:"#000000",iconLineWidth:1,iconWidth:17,iconHeight:17,height:31,width:31}),this.mb(this.by),this.by.bind(n.ma,this.GYa,this,!0));this.dk==null&&(this.dk=m(g("cancel")),this.mb(this.dk),this.dk.bind(n.ma,this.sG,this,!0));k.ub()&&this.Dn();this.jh()};a.prototype.$r=function(){l.prototype.$r.call(this);k.ub()&&this.getParent().bind(n.$b,this.Dn,this,!0)};a.prototype.np=function(){k.ub()&&this.getParent().h(n.$b,this.Dn,this,!0);l.prototype.np.call(this)};
a.prototype.Dn=function(){var r=this.getParent();if(r){var t=Math.min(r.nb(),r.Mb())/100,u=function(v){return Math.round(v*t)};this.xa({gap:u(3.9),height:u(11.9),paddingLeft:u(6),paddingRight:u(6)});this.Za&&this.Za.xa({fontSize:u(3)});[this.uG,this.dk,this.xG,this.tG].forEach(function(v){v&&v.xa({borderRadius:u(.4),fontSize:u(3),paddingLeft:u(3),paddingRight:u(3),height:u(6.7)})});this.by&&this.by.xa({borderRadius:u(.4),iconLineWidth:u(.22),iconWidth:u(3.7),iconHeight:u(3.7),height:u(6.7),width:u(6.7)})}};
a.prototype.jh=function(){switch(this.sb){case "ready":var r=this.fh.oP()?g("downloaded"):g("download-tour");break;case "installing":r=g("downloading");this.Sg!==void 0&&(r+="..."+this.Sg.toFixed(1)+"%");break;case "installed":r=g("downloaded");break;case "failed":r=this.Xxa==e.jta?k.ub()?g("storage-not-provided-launch-from-homescreen"):g("storage-not-provided-launch-from-desktop"):this.Xxa==e.hta?g("storage-not-provided-bookmark"):g("download-failed")}this.Za&&this.Za.set("text",r);this.uG&&this.uG.set("visible",
this.sb=="ready"&&!this.fh.oP()&&this.fh.XIa());this.tG&&this.tG.set("visible",this.sb=="ready"&&this.fh.oP()&&this.fh.WIa());this.xG&&this.xG.set("visible",this.sb=="ready"&&this.fh.ZIa());this.dk&&this.dk.set("visible",this.sb=="installing");this.by&&this.by.set("visible",this.sb!="installing");this.set("visible",this.sb!="hidden")};a.prototype.IYa=function(){this.fh.LMa()};a.prototype.OYa=function(){this.fh.LMa()};a.prototype.HYa=function(){this.fh.dw();this.sb="hidden";this.jh()};a.prototype.sG=
function(){this.fh.cancel();this.sb="hidden";this.jh()};a.prototype.GYa=function(){this.sb=="installing"&&this.fh.cancel();this.sb="hidden";this.jh()};return a});
define("tdv/player/view/MessageWindow","require tdv/utils tdv/constants/EventName tdv/player/l10n tdv/player/view/util/Device tdv/view/buttons/Button tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/containers/Container tdv/view/effects/FadeInEffect tdv/view/effects/FadeOutEffect tdv/view/text/Label tdv/view/text/HTMLText tdv/view/util/KeyboardControl".split(" "),function(a){function m(t,u){this.text=t;this.Gn=u}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/player/l10n"),
k=a("tdv/player/view/util/Device"),e=a("tdv/view/buttons/Button"),b=a("tdv/view/constants/Alignment"),c=a("tdv/view/constants/LayoutMode"),d=a("tdv/view/containers/Container"),f=a("tdv/view/effects/FadeInEffect"),l=a("tdv/view/effects/FadeOutEffect"),p=a("tdv/view/text/Label"),q=a("tdv/view/text/HTMLText"),r=a("tdv/view/util/KeyboardControl");a=h.extend(d,function(){d.call(this);this.vs=[];this.dk=this.vG=this.Za=this.jH=this.HN=this.kt=null;this.rR=this.rR.bind(this);this.sG=this.sG.bind(this);var t=
new f;t.set("duration",500);t.set("easing","cubic_in");var u=new l;u.set("duration",500);u.set("easing","cubic_out");this.xa({backgroundColor:"#000000",backgroundOpacity:.6,horizontalAlign:b.$e,gap:5,left:0,top:0,right:0,bottom:0,hideEffect:u,showEffect:t,visible:!1})});a.prototype.Kb=function(){d.prototype.Kb.call(this);this.kt==null&&(this.kt=new d,this.kt.xa({centerX:0,centerY:0,backgroundColor:"#ffffff",horizontalAlign:b.$e,verticalAlign:b.$d,layout:c.Uk,shadow:!0,shadowColor:"#000000",shadowHorizontalLength:0,
shadowVerticalLength:0,shadowOpacity:.2}),this.mb(this.kt));this.Za==null&&(this.Za=new p,this.Za.xa({fontColor:"#808080",fontWeight:"300",fontFamily:"Tahoma, Geneva, sans-serif"}),this.kt.mb(this.Za));this.jH==null&&(this.jH=new q,this.jH.xa({width:"80%"}),this.kt.mb(this.jH));this.HN==null&&(this.HN=new d,this.HN.xa({backgroundColor:"#b3b3b3"}),this.kt.mb(this.HN));this.ek==null&&(this.ek=new d,this.ek.xa({horizontalAlign:b.$e,verticalAlign:b.$d,layout:c.Mi}),this.kt.mb(this.ek));this.vG==null&&
(this.vG=new e,this.vG.xa({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.$e,verticalAlign:b.$d,label:g("yes").toUpperCase(),pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.vG.bind(n.ma,this.rR,this,!0),this.ek.mb(this.vG));this.dk==null&&(this.dk=new e,this.dk.xa({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.$e,verticalAlign:b.$d,label:g("no").toUpperCase(),
pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.dk.bind(n.ma,this.sG,this,!0),this.ek.mb(this.dk))};a.prototype.$r=function(){d.prototype.$r.call(this);this.getParent().bind(n.$b,this.Dn,this,!0)};a.prototype.np=function(){this.getParent().h(n.$b,this.Dn,this,!0);d.prototype.np.call(this)};a.prototype.Dn=function(){var t=this.getParent();if(t){var u=t.nb();t=t.Mb();if(k.ub()){var v=Math.min(u,t);u=function(w){return Math.round(w*v/100)}}else u=function(w){return Math.round(w*
4)};this.kt&&this.kt.xa({borderRadius:u(1),width:u(80),height:u(40),gap:u(4),shadowBlurRadius:u(1),shadowSpread:u(1)});this.HN&&this.HN.xa({width:u(60),minHeight:2,height:u(.25)});this.ek&&this.ek.xa({gap:u(5)});this.dk&&this.dk.xa({borderRadius:u(1),width:u(20),height:u(10),fontSize:u(4.25)});this.vG&&this.vG.xa({borderRadius:u(1),width:u(20),height:u(10),fontSize:u(4.5)});this.Za&&this.Za.xa({fontSize:u(5)});this.Z5()}};a.prototype.show=function(t,u){this.Dn();var v=this.Uya(u);v>=0&&this.ZDa(v);
this.E6a(new m(t,u));this.DYa()};a.prototype.oe=function(t){t=this.Uya(t);t>=0&&this.ZDa(t)};a.prototype.DYa=function(){var t=this.getParent();t&&t.qr(this,t.Cb().length-1)};a.prototype.rR=function(){this.Hva(!0)};a.prototype.sG=function(){this.Hva(!1)};a.prototype.Uya=function(t){for(var u=0;u<this.vs.length;u++)if(this.vs[u].Gn==t)return u;return-1};a.prototype.Z5=function(){if(this.kt){r.Gjb(this.rR);r.Fqa(this.sG);var t=this.oza();t?(t.text.length<20?(this.jH.set("visible",!1),this.Za.set("text",
t.text),this.Za.set("visible",!0)):(this.Za.set("visible",!1),this.jH.set("html",this.I1a(t.text)),this.jH.set("visible",!0)),this.dk.set("visible",t.Gn?!0:!1),this.set("visible",!0),r.Ybb(this.rR),r.Oma(this.sG)):this.set("visible",!1)}};a.prototype.I1a=function(t){return"<div style=\"color:#808080; font-weight:300; font-family:'Tahoma', 'Geneva', sans-serif; font-size: "+this.Za.get("fontSize")+'px; text-align:center;" >'+t+"</div>"};a.prototype.Hva=function(t){var u=this.oza();u&&(u=this.W1a(u.text),
this.Y6a(u),u.forEach(v=>{v.Gn&&v.Gn.call(this,t)}))};a.prototype.E6a=function(t){this.vs.push(t);this.Z5()};a.prototype.W1a=function(t){return this.vs.filter(u=>u.text==t)};a.prototype.Y6a=function(t){this.vs=this.vs.filter(u=>!t.includes(u));this.Z5()};a.prototype.ZDa=function(t){this.vs.splice(t,1);t==this.vs.length&&this.Z5()};a.prototype.oza=function(){return this.vs.length>0?this.vs[this.vs.length-1]:null};return a});
define("tdv/view/core/ContextMenu","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/player/view/util/Device tdv/view/util/Fullscreen".split(" "),function(a){function m(E){return E.map(function(G){return String.fromCharCode(G)}).join("")}function h(E){for(;E&&E!=document;){if(E.getAttribute(r)=="Button")return!0;E=E.parentNode}return!1}var n=a("tdv/utils"),g=a("tdv/constants/EventName"),k=a("tdv/events/Event"),e=a("tdv/events/EventDispatcher"),b=a("tdv/player/view/util/Device"),
c=a("tdv/view/util/Fullscreen"),d=[];a=m([99,111,110,116,101,120,116,109,101,110,117]);var f=m([109,111,117,115,101,100,111,119,110]),l=m([109,111,117,115,101,117,112]),p=m([109,111,117,115,101,108,101,97,118,101]),q=m([109,111,117,115,101,101,110,116,101,114]),r=m([116,100,118,99,108,97,115,115]);document.addEventListener(a,function(E){if(!b.ub()||!h(E.target)){var G=b.Nd()==b.p_?200:0;setTimeout(function(){(t===void 0||u===void 0||v===void 0||w===void 0||Math.abs(v-t)+Math.abs(w-u)<10)&&d.forEach(function(N){N(E)});
t=u=v=w=void 0},G)}E.preventDefault();E.stopImmediatePropagation()},!0);var t,u,v,w;document.addEventListener("mousedown",function(E){v=t=E.screenX;w=u=E.screenY},!0);document.addEventListener("mousemove",function(E){v=E.screenX;w=E.screenY},!0);var x=1;n=n.extend(e,function(E,G){e.call(this);this.Gb=E;this.O1a=G;this.e3=this.e3.bind(this);this.te=this.te.bind(this);this.eha=!1;this.bha=this.bha.bind(this);this.cha=this.cha.bind(this);this.aha=this.aha.bind(this);this.dha=this.dha.bind(this);this.qa=
document.createElement("div");this.qa.style.setProperty("z-index",x,H[B]);for(var N in H[y])this.qa.style.setProperty(N,H[y][N],H[B]);d.push(this.e3)});n.prototype.clear=function(){this.X3a()&&this.pga();this.qa=null;d.splice(d.indexOf(this.e3),1)};n.prototype.e3=function(E){var G=this.O1a();if(G.length!=0){this.qa.replaceChildren();this.eha=!1;var N=0;G.forEach(function(O){var R=document.createElement("div");if(O){R.textContent=O;for(var Q in H[A])R.style.setProperty(Q,H[A][Q],H[B]);var K=N;N++;
R.addEventListener(q,function(L){this.bha(L,K)}.bind(this));R.addEventListener(p,function(L){this.cha(L,K)}.bind(this));R.addEventListener(f,function(L){this.aha(L,K)}.bind(this));R.addEventListener(l,function(L){this.dha(L,K)}.bind(this))}else for(Q in H[D])R.style.setProperty(Q,H[D][Q],H[B]);for(Q in H[z])R.style.setProperty(Q,H[z][Q],H[B]);this.qa.appendChild(R)}.bind(this));(c.fullscreenElement()||document.body).appendChild(this.qa);this.qa.style.setProperty("display","block",H[B]);G=E.pageX;
E=E.pageY;G+this.qa.clientWidth>document.body.clientWidth-5&&(G=document.body.clientWidth-this.qa.clientWidth-5);E+this.qa.clientHeight>document.body.clientHeight-5&&(E=document.body.clientHeight-this.qa.clientHeight-5);this.qa.style.setProperty("left",G+"px",H[B]);this.qa.style.setProperty("top",E+"px",H[B]);this.Gb.bind(g.Sa,this.te,this);document.addEventListener("mousedown",this.te);this.zbb=setInterval(this.ybb.bind(this),200)}};n.prototype.X3a=function(){return!!this.qa&&!!this.qa.parentNode};
n.prototype.pga=function(){clearInterval(this.zbb);this.qa.parentNode.removeChild(this.qa);document.removeEventListener("mousedown",this.te);this.Gb.h(g.Sa,this.te,this);this.qa.style.setProperty("display","none",H[B])};n.prototype.ybb=function(){this.qa.contains(document.elementFromPoint(this.qa.offsetLeft+this.qa.clientWidth*.5,this.qa.offsetTop+this.qa.clientHeight*.5))||this.qa.style.setProperty("z-index",x*=10,H[B])};n.prototype.te=function(){this.pga()};n.prototype.aha=function(E){this.eha=
!0;E.preventDefault();E.stopImmediatePropagation()};n.prototype.dha=function(E,G){this.eha&&(this.pga(),E.preventDefault(),E.stopImmediatePropagation(),this.o(new k(g.Wr,{index:G})))};n.prototype.bha=function(E){for(var G in H[F])E.currentTarget.style.setProperty(G,H[F][G],H[B])};n.prototype.cha=function(E){for(var G in H[C])E.currentTarget.style.setProperty(G,H[C][G],H[B])};var y="0",z="1",A="2",D="3",F="4",C="5",B="6",H=function(E){return JSON.parse(E.map(function(G){return String.fromCharCode(G)}).join(""))}([123,
34,48,34,58,123,34,98,111,114,100,101,114,34,58,34,49,112,120,32,115,111,108,105,100,32,35,98,98,98,34,44,34,98,111,114,100,101,114,45,114,97,100,105,117,115,34,58,34,51,112,120,34,44,34,112,111,115,105,116,105,111,110,34,58,34,97,98,115,111,108,117,116,101,34,44,34,100,105,115,112,108,97,121,34,58,34,110,111,110,101,34,44,34,98,97,99,107,103,114,111,117,110,100,45,99,111,108,111,114,34,58,34,35,101,53,101,53,101,53,34,44,34,111,112,97,99,105,116,121,34,58,49,44,34,112,97,100,100,105,110,103,34,58,
48,44,34,109,97,114,103,105,110,34,58,48,44,34,112,111,105,110,116,101,114,45,101,118,101,110,116,115,34,58,34,97,108,108,34,44,34,116,101,120,116,45,97,108,105,103,110,34,58,34,108,101,102,116,34,44,34,98,111,120,45,115,104,97,100,111,119,34,58,34,49,112,120,32,49,112,120,32,51,112,120,32,114,103,98,97,40,48,44,32,48,44,32,48,44,32,48,46,50,41,34,125,44,34,49,34,58,123,34,102,111,110,116,45,102,97,109,105,108,121,34,58,34,65,114,105,97,108,34,44,34,102,111,110,116,45,115,105,122,101,34,58,34,49,
51,112,120,34,44,34,99,111,108,111,114,34,58,34,35,48,48,48,48,48,48,34,44,34,111,112,97,99,105,116,121,34,58,49,44,34,100,105,115,112,108,97,121,34,58,34,98,108,111,99,107,34,44,34,112,111,105,110,116,101,114,45,101,118,101,110,116,115,34,58,34,97,108,108,34,125,44,34,50,34,58,123,34,99,117,114,115,111,114,34,58,34,112,111,105,110,116,101,114,34,44,34,98,111,114,100,101,114,45,114,97,100,105,117,115,34,58,34,51,112,120,34,44,34,112,97,100,100,105,110,103,34,58,34,55,112,120,32,50,48,112,120,34,44,
34,119,104,105,116,101,45,115,112,97,99,101,34,58,34,110,111,119,114,97,112,34,125,44,34,51,34,58,123,34,109,97,114,103,105,110,34,58,34,55,112,120,32,53,112,120,34,44,34,98,111,114,100,101,114,45,116,111,112,34,58,34,49,112,120,32,115,111,108,105,100,32,35,97,97,97,34,44,34,98,111,114,100,101,114,45,98,111,116,116,111,109,34,58,34,49,112,120,32,115,111,108,105,100,32,35,102,102,102,34,125,44,34,52,34,58,123,34,99,111,108,111,114,34,58,34,35,102,102,102,102,102,102,34,44,34,98,97,99,107,103,114,111,
117,110,100,45,99,111,108,111,114,34,58,34,114,103,98,97,40,48,44,32,48,44,32,48,44,32,48,46,55,41,34,125,44,34,53,34,58,123,34,99,111,108,111,114,34,58,34,35,48,48,48,48,48,48,34,44,34,98,97,99,107,103,114,111,117,110,100,45,99,111,108,111,114,34,58,34,34,125,44,34,54,34,58,34,105,109,112,111,114,116,97,110,116,34,125]);return n});
define("tdv/view/core/Cursors",["require","exports","tdv/player/view/util/URL","tdv/view/constants/Cursor","tdv/view/util/Assets"],function(a,m,h,n,g){return function(){function k(e){this.Gb=e;this.Kv={};this.Kv[n.Nta]="move";this.Kv[n.pVa]="ew-resize";this.Kv[n.rVa]="ns-resize";this.Kv[n.qVa]="nesw-resize";this.Kv[n.sVa]="nwse-resize";this.Kv[n.qf]="pointer";this.Kv[n.LB]="inherit";this.Kv[n.De]="default";this.ki={};this.ki[n.IB]="grab.cur";this.ki[n.Li]="grabbing.cur";this.ki[n.Xta]="N.cur";this.ki[n.Yta]=
"NE.cur";this.ki[n.Ota]="E.cur";this.ki[n.aua]="SE.cur";this.ki[n.$ta]="S.cur";this.ki[n.bua]="SW.cur";this.ki[n.cua]="W.cur";this.ki[n.Zta]="NW.cur";this.ki[n.Qta]="FN.cur";this.ki[n.Rta]="FNE.cur";this.ki[n.Pta]="FE.cur";this.ki[n.Uta]="FSE.cur";this.ki[n.Tta]="FS.cur";this.ki[n.Vta]="FSW.cur";this.ki[n.Wta]="FW.cur";this.ki[n.Sta]="FNW.cur";this.fda={};this.fda[n.aG]=g.aG;this.qwa={}}k.prototype.WKa=function(e){return this.R3a(e)?this.lza(e):this.G3a(e)?this.u1a(e):this.z3a(e)?this.f1a(e):this.lza(n.De)};
k.prototype.UYa=function(e){if(!(e in this.qwa)){var b=new Image;b.src=this.Bya(e);this.qwa[e]=b}};k.prototype.R3a=function(e){return e in this.Kv};k.prototype.lza=function(e){return this.Kv[e]};k.prototype.G3a=function(e){return!!this.ki[e]};k.prototype.u1a=function(e){this.UYa(e);return"url("+this.Bya(e)+"), default"};k.prototype.Bya=function(e){return h.lB(this.Gb.get("settings").get(TDV.PlayerSettings.CURSORS_DIR_URL))+"/"+this.ki[e]};k.prototype.z3a=function(e){return e in this.fda};k.prototype.f1a=
function(e){return"url("+this.fda[e]+"), auto"};return k}()});define("tdv/view/helpers/DOMUpdateQueue",["require","exports"],function(){var a=1,m={};return{Udb:function(h,n){var g=h.__duqid;g===void 0&&(g=a.toString(),h.__duqid=g,a++);h=m[g]||(m[g]={e:h,s:{}});for(var k in n)h.s[k]=n[k]},process:function(){for(var h in m){var n=m[h],g=n.e.style;n=n.s;for(var k in n)g[k]=n[k]}m={}}}});
define("tdv/view/lifecycle/PriorityQueue",["require","exports"],function(){return function(){function a(){this.vz={};this.Os=[];this.FR=0}a.prototype.push=function(m,h){this.vz[h]==void 0?(this.vz[h]=[m],this.Os.push(h),this.Os.sort(function(n,g){return n-g}),this.FR++):(h=this.vz[h],h.includes(m)||(h.push(m),this.FR++))};a.prototype.ZKa=function(){return this.FR};a.prototype.isEmpty=function(){return this.Os.length==0};a.prototype.JPa=function(){if(!this.isEmpty()){var m=this.Os[0],h=this.vz[m].pop();
this.vz[m].length==0&&(delete this.vz[m],this.Os=this.Os.slice(1));this.FR--;return h}};a.prototype.rqa=function(){if(!this.isEmpty()){var m=this.Os[this.Os.length-1],h=this.vz[m].pop();this.vz[m].length==0&&(delete this.vz[m],this.Os=this.Os.slice(0,this.Os.length-1));this.FR--;return h}};return a}()});
define("tdv/view/lifecycle/LifeCycleManager","require exports tdv/view/helpers/DOMUpdateQueue tdv/view/lifecycle/PriorityQueue tdv/view/util/Animation tdv/events/async".split(" "),function(a,m,h,n,g,k){return function(){function e(){this.EE=!1;this.sPa=void 0;this.enabled=!0;this.U6=new n;this.U9=new n;this.N$=new n;this.L8=new n;this.Osa=new n;g.requestFrame(this.Kg,this)}e.prototype.clear=function(){this.enabled=!1};e.prototype.KX=function(b){this.U6.push(b,this.iP(b));this.MY()};e.prototype.Tf=
function(b){this.U9.push(b,this.iP(b));this.MY()};e.prototype.lc=function(b){this.N$.push(b,this.iP(b));this.MY()};e.prototype.Af=function(b){this.L8.push(b,this.iP(b));this.MY()};e.prototype.tb=function(b){this.Osa.push(b,this.iP(b));this.MY()};e.prototype.update=function(){this.pnb();this.Vnb();this.ou()};e.prototype.pnb=function(){do{for(;!this.U6.isEmpty();){var b=this.U6.rqa();b&&b.Kb()}this.U9.isEmpty()||(b=this.U9.rqa())&&b.jb()}while(!this.U9.isEmpty()||!this.U6.isEmpty())};e.prototype.Vnb=
function(){for(;!this.N$.isEmpty()||!this.L8.isEmpty();)this.HZ(),this.Kk()};e.prototype.HZ=function(){for(;!this.N$.isEmpty();){var b=this.N$.rqa();if(b&&b.Fnb()){var c=b.getParent();c?(c.lc(),c.Af()):b.QQa(0,0,b.qw(),b.pw())}}};e.prototype.Kk=function(){for(;!this.L8.isEmpty();){var b=this.L8.JPa();b&&b.Kk()}};e.prototype.ou=function(){for(;!this.Osa.isEmpty();){var b=this.Osa.JPa();b&&b.ou()}h.process()};e.prototype.MY=function(){this.EE||(this.EE=!0,this.sPa=(new Date).getTime()+500,k.ME(this.UOa.bind(this)))};
e.prototype.UOa=function(){this.EE=!1;this.enabled&&this.update()};e.prototype.iP=function(b){return(b=b.getParent())?this.iP(b)+1:0};e.prototype.Kg=function(){this.EE&&(new Date).getTime()>=(this.sPa||0)&&this.UOa();g.requestFrame(this.Kg,this)};return e}()});
define("tdv/view/core/visuals/dom/DOMCanvasVisuals",["require","exports","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/CanvasVisualProperties"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.tp=function(){return new n};k.prototype.rh=function(e){g.prototype.rh.call(this,e);this.Lp(e)};k.prototype.Lp=function(e){if(e.canvas!==this.K.canvas&&(this.K.canvas&&this.Y9(this.K.canvas),e.canvas)){var b=e.canvas;b.style.position="absolute";
b.style.left="0";b.style.top="0";b.style.cursor="inherit";this.tk(e.canvas)}};return k}(h)});
define("tdv/view/core/visuals/dom/DOMContainerVisuals",["require","exports","tdv/view/core/ZIndex","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/ContainerVisualProperties"],function(a,m,h,n,g){return function(k){function e(){var b=k.call(this)||this;b.Ln=null;b.Gt=null;b.jo=null;b.pu=null;return b}P(e,k);e.prototype.tp=function(){return new g};e.prototype.kA=function(){k.prototype.kA.call(this);this.nfb().appendChild(this.J7());this.Yfb().appendChild(this.Y7())};e.prototype.nfb=
function(){this.Ln||(this.Ln=document.createElement("div"),this.Ln.setAttribute("tdvlayer","scrollbar"),this.Ln.style.position="absolute",this.Ln.style.zIndex=h.wua);return this.Ln};e.prototype.Yfb=function(){this.jo||(this.jo=document.createElement("div"),this.jo.setAttribute("tdvlayer","scrollbar"),this.jo.style.position="absolute",this.jo.style.zIndex=h.wua);return this.jo};e.prototype.J7=function(){this.Gt||(this.Gt=document.createElement("div"),this.Gt.style.position="absolute",this.Gt.style.left=
"0",this.Gt.style.top="0");return this.Gt};e.prototype.Y7=function(){this.pu||(this.pu=document.createElement("div"),this.pu.style.position="absolute",this.pu.style.left="0",this.pu.style.top="0");return this.pu};e.prototype.rh=function(b){k.prototype.rh.call(this,b);this.Snb(b)};e.prototype.Snb=function(b){b.Bk!==this.K.Bk&&(b.Bk?this.Fh.appendChild(this.Ln):this.Fh.removeChild(this.Ln));b.Lk!==this.K.Lk&&(b.Lk?this.Fh.appendChild(this.jo):this.Fh.removeChild(this.jo));if(b.contentWidth!==this.K.contentWidth||
b.contentHeight!==this.K.contentHeight||b.Bk!==this.K.Bk||b.Kc!==this.K.Kc||b.Bf!==this.K.Bf||b.$t!==this.K.$t||b.Zt!==this.K.Zt||b.ph!==this.K.ph||b.Wn!==this.K.Wn||b.Xn!==this.K.Xn||b.Lk!==this.K.Lk||b.Lc!==this.K.Lc){var c=b.Bk&&b.Lk,d=Math.round(b.Bf*100/b.contentWidth),f=Math.round(b.Kc*100/b.contentWidth),l=Math.round(b.Wg*100/b.contentHeight),p=Math.round(b.Lc*100/b.contentHeight);this.Ln.style.opacity=b.$t.toString();this.Ln.style.left=b.Wn+"px";this.Ln.style.right=(c?b.ph:0)+b.Wn+"px";this.Ln.style.height=
b.ph+"px";this.Ln.style.bottom=b.Xn+"px";this.Gt.style.backgroundColor=b.Zt;this.Gt.style.borderRadius=Math.floor(b.ph/2)+"px";this.Gt.style.left=f+"%";this.Gt.style.width=d+"%";this.Gt.style.height=b.ph+"px";this.jo.style.opacity=b.$t.toString();this.jo.style.top=b.Xn+"px";this.jo.style.right=b.Wn+"px";this.jo.style.width=b.ph+"px";this.jo.style.bottom=(c?b.ph:0)+b.Xn+"px";this.pu.style.backgroundColor=b.Zt;this.pu.style.borderRadius=Math.floor(b.ph/2)+"px";this.pu.style.top=p+"%";this.pu.style.width=
b.ph+"px";this.pu.style.height=l+"%"}};return e}(n)});
define("tdv/view/core/visuals/dom/DOMImageVisuals","require exports tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/ImageVisualProperties tdv/player/view/util/Device tdv/view/constants/Alignment".split(" "),function(a,m,h,n,g,k){return function(e){function b(){var c=e.call(this)||this;c.BA=null;return c}P(b,e);b.prototype.tp=function(){return new n};b.prototype.kA=function(){e.prototype.kA.call(this);this.tk(this.lLa())};b.prototype.lLa=function(){this.BA||(this.BA=document.createElement("div"),
this.BA.style.position="static",this.BA.style.overflow="hidden",this.BA.style.cursor="inherit");return this.BA};b.prototype.rh=function(c){e.prototype.rh.call(this,c);this.vsa(c)};b.prototype.vsa=function(c){if(c.image!==this.K.image&&(this.K.image&&this.K.image.parentElement===this.BA&&this.BA.removeChild(this.K.image),c.image)){var d=c.image;this.BA.appendChild(d);d.style.position="static";d.style.cursor="inherit";d.style.display="inline";d.style.verticalAlign="top";d.style.visibility="hidden";
d.style.pointerEvents="none";d.style.userSelect="none";d.style.visibility="inherit";d.style.webkitUserSelect="none";d.style.touchCallout="none";d.style.webkitTouchCallout="none";g.Yb()==g.Pp&&g.ub()&&(d.style.transform="translate3d(0,0,0)")}if(c.image!==this.K.image||c.contentWidth!==this.K.contentWidth||c.contentHeight!==this.K.contentHeight||c.width!==this.K.width||c.height!==this.K.height||c.Dd!==this.K.Dd||c.Ce!==this.K.Ce||c.ie!==this.K.ie||c.Df!==this.K.Df||c.borderTopLeftRadius!==this.K.borderTopLeftRadius||
c.borderTopRightRadius!==this.K.borderTopRightRadius||c.borderBottomRightRadius!==this.K.borderBottomRightRadius||c.borderBottomLeftRadius!==this.K.borderBottomLeftRadius||c.Ue!==this.K.Ue||c.xf!==this.K.xf||c.wf!==this.K.wf||c.Te!==this.K.Te||c.Yh!==this.K.Yh||c.verticalAlign!==this.K.verticalAlign){d=[Math.max(0,c.borderTopLeftRadius-Math.max(c.Ue,c.Te)),Math.max(0,c.borderTopRightRadius-Math.max(c.Ue,c.xf)),Math.max(0,c.borderBottomRightRadius-Math.max(c.wf,c.xf)),Math.max(0,c.borderBottomLeftRadius-
Math.max(c.wf,c.Te))];var f=c.width-c.Dd-c.Ce,l=c.height-c.ie-c.Df,p=this.lLa();p.style.width=f+"px";p.style.height=l+"px";p.style.borderTopLeftRadius=d[0]+"px";p.style.borderTopRightRadius=d[1]+"px";p.style.borderBottomRightRadius=d[2]+"px";p.style.borderBottomLeftRadius=d[3]+"px";if(c.image){c.image.style.width=c.contentWidth+"px";c.image.style.height=c.contentHeight+"px";switch(c.Yh){case k.fb:c.image.style.marginLeft="0px";c.image.style.marginRight=f-c.contentWidth+"px";break;case k.Db:c.image.style.marginLeft=
f-c.contentWidth+"px";c.image.style.marginRight="0px";break;case k.$e:c.image.style.marginLeft=Math.floor((f-c.contentWidth)*.5)+"px",c.image.style.marginRight=Math.ceil((f-c.contentWidth)*.5)+"px"}switch(c.verticalAlign){case k.Tc:c.image.style.marginTop="0px";c.image.style.marginBottom=l-c.contentHeight+"px";break;case k.Gc:c.image.style.marginTop=l-c.contentHeight+"px";c.image.style.marginBottom="0px";break;case k.$d:c.image.style.marginTop=Math.floor((l-c.contentHeight)*.5)+"px",c.image.style.marginBottom=
Math.ceil((l-c.contentHeight)*.5)+"px"}}}};return b}(h)});
define("tdv/view/core/visuals/dom/DOMLabelVisuals","require exports tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visualprops/LabelVisualProperties tdv/view/constants/Alignment tdv/view/constants/Direction tdv/view/util/Font".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.span=null;return d}P(c,b);c.prototype.xJ=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.wJ=function(){return this.span.clientHeight};c.prototype.tp=function(){return new n};c.prototype.kA=function(){b.prototype.kA.call(this);this.tk(this.Vfb())};c.prototype.Vfb=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.rh=function(d){b.prototype.rh.call(this,d);this.Hsa(d)};c.prototype.Hsa=function(d){var f=!1;if(d.direction!==this.K.direction||d.text!==this.K.text){switch(d.direction){case k.Uk: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.K.fontFamily&&(this.span.style.fontFamily=e.qA(d.fontFamily||
""),f=!0);d.fontSize!==this.K.fontSize&&(this.span.style.fontSize=d.fontSize!==void 0?d.fontSize+"px":"",f=!0);d.yt!==this.K.yt&&(this.span.style.color=d.yt||"",f=!0);d.fontWeight!==this.K.fontWeight&&(this.span.style.fontWeight=d.fontWeight,f=!0);d.fontStyle!==this.K.fontStyle&&(this.span.style.fontStyle=d.fontStyle,f=!0);d.textDecoration!==this.K.textDecoration&&(this.span.style.textDecoration=d.textDecoration,f=!0);if(f||d.width!==this.K.width||d.height!==this.K.height||d.Dd!==this.K.Dd||d.Ce!==
this.K.Ce||d.ie!==this.K.ie||d.Df!==this.K.Df||d.Yh!==this.K.Yh||d.verticalAlign!==this.K.verticalAlign){f=d.width-d.Dd-d.Ce;var l=d.height-d.ie-d.Df,p=this.xJ(),q=this.wJ();switch(d.Yh){case g.fb:this.span.style.left="0";break;case g.Db:this.span.style.left=f-p+"px";break;case g.$e:this.span.style.left=Math.max(0,Math.round((f-p)*.5))+"px"}switch(d.verticalAlign){case g.Tc:this.span.style.top="0";break;case g.Gc:this.span.style.top=l-q+"px";break;case g.$d:this.span.style.top=Math.max(0,Math.round((l-
q)*.5))+"px"}}if(d.ku!==this.K.ku||d.lu!==this.K.lu||d.fo!==this.K.fo||d.bx!==this.K.bx||d.ax!==this.K.ax)this.span.style.textShadow=[d.ku+"px",d.lu+"px",d.fo+"px","rgba("+parseInt("0x"+d.ax.substring(1,2))+", "+parseInt("0x"+d.ax.substring(3,2))+", "+parseInt("0x"+d.ax.substring(5,2))+", "+d.bx+")"].join(" ")};return c}(h)});
define("tdv/view/core/visuals/dom/DOMHTMLVisuals",["require","exports","tdv/view/core/visuals/dom/DOMUIBaseVisuals","tdv/view/core/visualprops/HTMLVisualProperties"],function(a,m,h,n){return function(g){function k(){return g.call(this)||this}P(k,g);k.prototype.tp=function(){return new n};k.prototype.rh=function(e){g.prototype.rh.call(this,e);this.usa(e)};k.prototype.usa=function(e){if(e.td!==this.K.td&&(this.K.td&&this.Y9(this.K.td),e.td)){var b=e.td;b.style.position="absolute";b.style.left="0";b.style.top=
"0";this.tk(e.td)}};k.prototype.qoa=function(){return this.K&&this.K.td?this.K.td.clientWidth:0};k.prototype.poa=function(){return this.K&&this.K.td?this.K.td.clientHeight:0};return k}(h)});define("tdv/view/core/visuals/VisualsType",["require","exports"],function(){return{DOM:"DOM",lUa:"Canvas"}});
define("tdv/view/core/visuals/dom/DOMVisualsFactory","require exports tdv/view/core/visuals/dom/DOMUIBaseVisuals tdv/view/core/visuals/dom/DOMCanvasVisuals tdv/view/core/visuals/dom/DOMContainerVisuals tdv/view/core/visuals/dom/DOMImageVisuals tdv/view/core/visuals/dom/DOMLabelVisuals tdv/view/core/visuals/dom/DOMHTMLVisuals tdv/view/canvas/Canvas tdv/view/core/UIComponent tdv/view/containers/Container tdv/view/images/Image tdv/view/html/HTML tdv/view/text/Label tdv/view/core/visuals/VisualsType".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r){return function(){function t(){}t.prototype.create=function(u){if(u instanceof p)return new b;if(u instanceof c)return new n;if(u instanceof l)return new k;if(u instanceof q)return new e;if(u instanceof f)return new g;if(u instanceof d)return new h;throw Error("Invalid UI instance");};t.prototype.getType=function(){return r.DOM};t.tJ=function(){t.Qo||(t.Qo=new t);return t.Qo};return t}()});
define("tdv/view/events/GestureEvent",["require","exports","tdv/events/Event"],function(a,m,h){return function(n){function g(k,e,b,c,d,f,l,p){k=n.call(this,k)||this;k.scale=typeof e==="number"?e:1;k.rotation=typeof b==="number"?b:0;k.x=c||0;k.y=d||0;k.pageX=f||0;k.pageY=l||0;k.touches=p||[];return k}P(g,n);return g}(h)});
define("tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","require exports tdv/utils tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/events/GestureEvent tdv/view/events/MouseEvent tdv/view/util/UserInitiatedAction".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(){function p(q){this.W0=[];this.IAa=0;this.Z_a=500;this.ne=1;this.jl=0;this.component=q;this.nT=this.nT.bind(this);this.qT=this.qT.bind(this);this.T2=this.T2.bind(this);this.Sha=this.Sha.bind(this);
this.NV=this.NV.bind(this);this.MV=this.MV.bind(this);this.DD=this.DD.bind(this)}p.prototype.Ihb=function(){return g.Jp()};p.prototype.hRa=function(q){this.IS!==q&&((this.IS=q)?this.SG():this.LG(),this.Rva())};p.prototype.oLa=function(){return this.IS||!1};p.prototype.wa=function(){return this.component.wa()};p.prototype.nGa=function(q,r){this.component.o(new b(n.Sa,q.x,q.y,q.pageX,q.pageY,void 0,void 0,r))};p.prototype.oGa=function(q,r){this.component.o(new b(n.gb,q.x,q.y,q.pageX,q.pageY,void 0,
void 0,r))};p.prototype.pGa=function(q,r){this.component.o(new b(n.$a,q.x,q.y,q.pageX,q.pageY,void 0,void 0,r))};p.prototype.J$a=function(q,r,t){this.component.o(new b(n.Qk,q.x,q.y,q.pageX,q.pageY,r.delta,r.lA,t))};p.prototype.kGa=function(q){this.component.o(new b(n.ma,q.x,q.y,q.pageX,q.pageY))};p.prototype.lGa=function(q){this.component.o(new b(n.fi,q.x,q.y,q.pageX,q.pageY))};p.prototype.I$a=function(q,r,t){this.component.o(new e(n.HB,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.E$a=function(q,
r,t){this.component.o(new e(n.Mba,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.F$a=function(q,r,t){this.component.o(new e(n.XK,q,r,t.x,t.y,t.pageX,t.pageY,t.touches))};p.prototype.G$a=function(q){this.component.o(new e(n.UUa,void 0,q))};p.prototype.H$a=function(q){this.component.o(new e(n.YK,q))};p.prototype.sm=function(){var q=this.component.getParent();if(q)return q.mLa()};p.prototype.NV=function(q){q.stopImmediatePropagation();this.Yea(["touchend"]);this.Uza(q)?this.JDa(q):this.QDa(q,!0)};
p.prototype.QDa=function(q,r){var t,u=this.gH(q);r&&this.w$a(u);this.nGa(u,q);(t=this.sm())===null||t===void 0||t.QDa(q,r&&this.component.get("propagateClick"))};p.prototype.MV=function(q){q.preventDefault();q.stopImmediatePropagation();this.Uza(q)?this.HDa(q):this.PDa(q)};p.prototype.PDa=function(q){var r,t=this.gH(q);this.v$a(t);this.oGa(t,q);(r=this.sm())===null||r===void 0||r.PDa(q)};p.prototype.Hfa=function(q,r){var t=q.pageX-r.pageX;q=q.pageY-r.pageY;return Math.sqrt(t*t+q*q)};p.prototype.DD=
function(q,r){this.Bea(["touchend"]);r!==!1&&q.preventDefault();q.stopImmediatePropagation();this.sN?this.IDa(q):(r=this.gH(q),this.ODa(q,this.Tza(r)),this.Iza(r));this.sN=void 0;this.Rva()};p.prototype.ODa=function(q,r){var t,u=this.gH(q);this.pGa(u,q);this.u$a(r);(t=this.sm())===null||t===void 0||t.ODa(q,r)};p.prototype.w$a=function(q){this.component.bind(n.Eb,this.dGa,this,!0);this.CI=q};p.prototype.v$a=function(q){if(this.CI){q=this.Hfa(this.CI,q);if(g.ub()){var r=this.component.Vb();r=Math.min(r.nb(),
r.Mb())*.01*p.LWa}else r=p.TWa;q>r&&this.I5()}};p.prototype.u$a=function(q){this.CI&&(this.kGa(this.CI),q&&this.lGa(this.CI),this.I5())};p.prototype.I5=function(){this.CI&&(this.component.h(n.Eb,this.dGa,this),this.CI=void 0)};p.prototype.dGa=function(){this.I5()};p.prototype.JDa=function(q){var r,t=this.Ofa(q);this.sN=t;this.I$a(t.scale,t.rotation,t.coordinates);(r=this.sm())===null||r===void 0||r.JDa(q)};p.prototype.HDa=function(q){var r,t=this.Ofa(q,this.sN),u=t.rotation-this.sN.rotation,v=t.scale/
this.sN.scale;this.sN=t;this.ne*=v;for(this.jl+=u;this.jl>180;)this.jl-=360;for(;this.jl<-180;)this.jl+=360;this.E$a(this.ne,this.jl,t.coordinates);u!=0&&this.G$a(this.jl);v!=1&&this.H$a(this.ne);this.I5();(r=this.sm())===null||r===void 0||r.HDa(q)};p.prototype.IDa=function(q){var r,t=this.Ofa(q);this.F$a(this.ne,this.jl,t.coordinates);(r=this.sm())===null||r===void 0||r.IDa(q)};p.prototype.nT=function(q){this.Yea(["mouseup"]);q.stopImmediatePropagation();this.KDa(q,!0);f&&this.component.log(q.ctrlKey)};
p.prototype.KDa=function(q,r){var t,u=this.eH(q);r&&this.yZa(u);this.nGa(u,q);(t=this.sm())===null||t===void 0||t.KDa(q,r&&this.component.get("propagateClick"))};p.prototype.qT=function(q){q.preventDefault();q.stopImmediatePropagation();this.component.Vb().PE(this.component);this.LDa(q)};p.prototype.LDa=function(q){var r,t=this.eH(q);this.xZa(t);this.oGa(t,q);(r=this.sm())===null||r===void 0||r.LDa(q)};p.prototype.T2=function(q){this.Bea(["mouseup"]);q.preventDefault();q.stopImmediatePropagation();
var r=this.eH(q);this.MDa(q,this.Tza(r));this.Iza(r)};p.prototype.MDa=function(q,r){var t,u=this.eH(q);this.pGa(u);this.wZa(r);(t=this.sm())===null||t===void 0||t.MDa(q,r)};p.prototype.yZa=function(q){this.component.bind(n.Eb,this.Owa,this,!0);this.HG=q};p.prototype.xZa=function(q){this.HG&&this.Hfa(this.HG,q)>p.CWa&&this.Mda()};p.prototype.wZa=function(q){this.HG&&(this.kGa(this.HG),q&&this.lGa(this.HG),this.Mda())};p.prototype.Mda=function(){this.HG&&(this.component.h(n.Eb,this.Owa,this),this.HG=
void 0)};p.prototype.Owa=function(){this.Mda()};p.prototype.Uza=function(q){if((q=this.Lfa(q))&&q.length>1)for(var r=0,t=0;t<q.length;t++)if(this.D3a(q[t].target)&&(r++,r>1))return!0;return!1};p.prototype.D3a=function(q){for(var r=this.wa().cc();q;){if(q==r)return!0;q=q.parentNode}return!1};p.prototype.vwa=function(){return!1};p.prototype.Sha=function(q){this.component.Vb().Rha&&(q.preventDefault(),q.stopImmediatePropagation(),this.NDa(q))};p.prototype.NDa=function(q){var r,t=this.eH(q),u=this.Z1a(q);
this.vwa(u)||(r=this.sm())===null||r===void 0||r.NDa(q);this.J$a(t,u,q)};p.prototype.eH=function(q){return this.yya(q.pageX,q.pageY)};p.prototype.Z1a=function(q){var r={};r.delta=Math.max(-1,Math.min(1,-q.deltaY));r.lA=r.delta;return r};p.prototype.yya=function(q,r){var t,u=h.offset(this.wa().cc()),v=((t=this.component.Vb())===null||t===void 0?void 0:t.fD)||1;t={};t.x=(q-u.left)/v;t.y=(r-u.top)/v;t.pageX=q/v;t.pageY=r/v;t.AE=q;t.BE=r;return t};p.prototype.Ofa=function(q,r){var t=this.gH(q);return r?
(q=this.Jya(q),{coordinates:t,scale:r.scale*q/r.touchesDistance,rotation:0,touchesDistance:q}):{coordinates:t,scale:1,rotation:0,touchesDistance:this.Jya(q)}};p.prototype.gH=function(q){var r=this.Lfa(q);if(r.length==0)var t=this.A6a;else t={x:0,y:0,pageX:0,pageY:0,AE:0,BE:0,touches:[]},Array.from(r).forEach(function(u){u||(u=r[0]);u=this.yya(u.pageX,u.pageY);t.x+=u.x;t.y+=u.y;t.pageX+=u.pageX;t.pageY+=u.pageY;t.AE+=u.AE;t.BE+=u.BE;t.touches.push(u)}.bind(this)),t.x/=r.length,t.y/=r.length,t.pageX/=
r.length,t.pageY/=r.length,t.AE/=r.length,t.BE/=r.length;return this.A6a=t};p.prototype.Lfa=function(q){return q.touches||q.targetTouches||q.changedTouches};p.prototype.Jya=function(q){var r=this.Lfa(q);return r&&r.length>1?(q=Math.abs(r[0].pageX-r[1].pageX),r=Math.abs(r[0].pageY-r[1].pageY),Math.sqrt(q*q+r*r)):0};p.prototype.Rva=function(){this.wa().cc().style["pointer-events"]=this.fza()};p.prototype.fza=function(){return this.IS?"auto":"none"};p.prototype.SG=function(){this.Yea(d)};p.prototype.LG=
function(){this.Bea(d)};p.prototype.Yea=function(q){l.includes(this.component)||l.push(this.component);this.W0=h.union(this.W0,q);q=this.Iya(q);for(var r=0;r<q.length;r++){var t=q[r];t.target.addEventListener(t.name,t.handler)}};p.prototype.Bea=function(q){l.includes(this.component)&&l.splice(l.indexOf(this.component),1);this.W0=h.difference(this.W0,q);q=this.Iya(q);for(var r=0;r<q.length;r++){var t=q[r];t.target.removeEventListener(t.name,t.handler)}};p.prototype.Iya=function(q){this.Zxa||(this.Zxa=
this.C1a());for(var r=[],t=0;t<q.length;t++)r=r.concat(this.Zxa[q[t]]);return r};p.prototype.C1a=function(){var q=this.wa().cc();return{touchstart:[{target:q,name:"touchstart",handler:c.Ar(this.NV)}],touchmove:[{target:q,name:"touchmove",handler:c.Ar(this.MV)}],touchend:[{target:q,name:"touchend",handler:c.Ar(this.DD,!0)},{target:document,name:"touchend",handler:c.Ar(this.DD,!0)},{target:q,name:"touchcancel",handler:c.Ar(this.DD,!0)},{target:document,name:"touchcancel",handler:c.Ar(this.DD,!0)}],
mousedown:[{target:q,name:"mousedown",handler:c.Ar(this.nT)}],mousemove:[{target:q,name:"mousemove",handler:c.Ar(this.qT)}],mouseup:[{target:q,name:"mouseup",handler:c.Ar(this.T2,!0)},{target:window,name:"mouseup",handler:c.Ar(this.T2,!0)}],mousewheel:[{target:q,name:"wheel",handler:c.Ar(this.Sha)}]}};p.prototype.Iza=function(q){this.IAa=(new Date).getTime();this.HAa=q};p.prototype.Tza=function(q){if((new Date).getTime()-this.IAa>this.Z_a||!this.HAa)return!1;q=this.Hfa(this.HAa,q);if(g.ub()){var r=
this.component.Vb();r=Math.min(r.nb(),r.Mb())*.01*p.KWa}else r=p.DWa;return q>r?!1:!0};p.TWa=10;p.LWa=5;p.CWa=10;p.KWa=10;p.DWa=10;return p}();var d=function(){var p=[];p=p.concat(["touchstart","touchmove"]);g.Nd()!=g.vj&&(p=p.concat(["mousedown","mousemove","mousewheel"]));return p}(),f=k.Tg("debug"),l=window.enabledComponents=[];return a});
define("tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","tdv/player/view/util/Device"],function(a,m,h,n,g){return function(k){function e(b){var c=k.call(this,b)||this;c.component=b;c.iy=0;c.jy=0;c.lpb=void 0;c.mpb=void 0;c.Wwa=0;c.Uda=void 0;c.Vda=void 0;c.Wda=0;c.Xda=0;c.fn=!1;c.gn=!1;c.EC=c.EC.bind(c);c.ID=c.ID.bind(c);c.Sna();return c}P(e,k);e.prototype.Sna=
function(){this.wa().J7().addEventListener("mousedown",this.EC,!1);this.wa().J7().addEventListener("touchstart",this.EC,!1);this.wa().Y7().addEventListener("mousedown",this.ID,!1);this.wa().Y7().addEventListener("touchstart",this.ID,!1);this.Ihb()?this.component.bind(h.Sa,this.Xwa,this,!1):(this.component.bind(h.Sa,this.GZa,this,!1),this.component.bind(h.uc,this.Sda,this,!1),this.component.bind(h.Eb,this.Rda,this,!1),this.component.bind(h.Qk,this.HZa,this,!1))};e.prototype.wa=function(){return this.component.wa()};
e.prototype.EC=function(){this.component.Vw(!0);this.fn=!0};e.prototype.ID=function(){this.component.Ww(!0);this.gn=!0};e.prototype.Sda=function(){this.component.$E(!0)};e.prototype.Rda=function(){this.component.$E(!1)};e.prototype.GZa=function(b){this.component.fn||this.component.gn?(this.component.Vb().bind(h.gb,this.Uwa,this,!1),this.component.Vb().bind(h.$a,this.Vwa,this,!1),this.iy=b.pageX,this.jy=b.pageY):this.Xwa(b)};e.prototype.Uwa=function(b){var c=0,d=0;this.fn&&(c=(b.pageX-this.iy)/this.wa().Ln.clientWidth);
this.gn&&(d=(b.pageY-this.jy)/this.wa().jo.clientHeight);this.iy=b.pageX;this.jy=b.pageY;c==0&&d==0||this.component.GP(c,d,"content")};e.prototype.Vwa=function(){this.component.Vb().h(h.gb,this.Uwa,this);this.component.Vb().h(h.$a,this.Vwa,this);this.component.Vw(!1);this.component.Ww(!1);this.gn=this.fn=!1};e.prototype.vwa=function(b){return b.delta>0&&this.component.JO()||b.delta<0&&this.component.HO()?!0:!1};e.prototype.HZa=function(b){b=(g.Nd()==g.p_?b.lA*.1:b.delta)*.3;this.component.GP(0,-b,
"page")};e.prototype.Xwa=function(b){if(this.component.IO()||this.component.KO())this.component.Vb().bind(h.gb,this.Ywa,this,!1),this.component.Vb().bind(h.$a,this.Zwa,this,!1),this.component.$E(!0),this.iy=b.pageX,this.jy=b.pageY,this.g3a()};e.prototype.Ywa=function(b){var c=b.pageX-this.iy,d=b.pageY-this.jy;!this.fn&&!this.gn&&c*c+d*d>25&&(this.fn=this.component.IO(),this.gn=this.component.KO(),this.component.Vw(this.fn),this.component.Ww(this.gn));if(this.fn||this.gn)this.component.GP(this.fn?
-c:0,this.gn?-d:0),this.iy=b.pageX,this.jy=b.pageY,this.iab()};e.prototype.Zwa=function(){this.component.Vb().h(h.gb,this.Ywa,this);this.component.Vb().h(h.$a,this.Zwa,this);this.component.$E(!1);var b=Math.max(Math.abs(this.Wda/.001),Math.abs(this.Xda/.001));this.component.hIa(-.5*this.Wda*b,-.5*this.Xda*b,b)};e.prototype.g3a=function(){this.Uda=this.iy;this.Vda=this.jy};e.prototype.iab=function(){var b=(new Date).getTime(),c=b-this.Wwa;c>10&&(this.Wwa=b,this.Wda=(this.iy-this.Uda)/c,this.Xda=(this.jy-
this.Vda)/c,this.Uda=this.iy,this.Vda=this.jy)};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/CloseButtonMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,m,h,n,g){return function(k){function e(b){b=k.call(this,b)||this;b.az=b.az.bind(b);return b}P(e,k);e.prototype.SG=function(){k.prototype.SG.call(this);g.Oma(this.az)};e.prototype.LG=function(){k.prototype.LG.call(this);g.Fqa(this.az)};e.prototype.az=
function(){this.component.o(h.ma)};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/DropDownMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,m,h,n,g){return function(k){function e(b){b=k.call(this,b)||this;b.component.nk.bind(h.od,b.x5a,b,!1);b.component.nk.bind(h.jd,b.w5a,b,!0);b.component.bind(h.CB,b.TM,b,!0);b.az=b.az.bind(b);return b}P(e,k);e.prototype.x5a=function(){g.eIa(this,[this.component.je.wa().cc()].concat(this.component.nk.vLa().map(function(b){return b.wa().cc()})));
g.Oma(this.az)};e.prototype.w5a=function(){g.Fqa(this.az);g.Eqa(this)};e.prototype.TM=function(){g.mhb([this.component.je.wa().cc()].concat(this.component.nk.vLa().map(function(b){return b.wa().cc()})))&&this.component.je.wa().cc().focus()};e.prototype.az=function(){this.component.close()};return e}(n)});
define("tdv/view/core/eventmanager/mousetouch/HTMLMouseTouchEventManager",["require","exports","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager"],function(a,m,h){return function(n){function g(){return n!==null&&n.apply(this,arguments)||this}P(g,n);g.prototype.DD=function(k,e){for(e=k.target;e&&e.tagName!="A"&&e.tagName!="BUTTON";)e=e.parentElement;e=!e;n.prototype.DD.call(this,k,e)};return g}(h)});
define("tdv/view/core/eventmanager/mousetouch/IconButtonMouseTouchEventManager",["require","exports","tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager","tdv/view/constants/Cursor"],function(a,m,h,n){return function(g){function k(e){var b=g.call(this,e)||this;b.MV=function(c){var d=b.gH(c);b.A8(d)?g.prototype.MV.call(b,c):b.iya(d,c)};b.nT=function(c){var d=b.eH(c);b.A8(d)?g.prototype.nT.call(b,c):b.iya(d,c)};b.sfa=!1;b.Lza=!1;return b}P(k,g);k.prototype.iRa=function(e){this.Lza=e};k.prototype.wa=
function(){return this.component.wa()};k.prototype.NV=function(e){var b=this.gH(e);this.A8(b)?g.prototype.NV.call(this,e):this.X0a(b,e)};k.prototype.qT=function(e){var b=this.eH(e);if(this.A8(b)||this.sfa)g.prototype.qT.call(this,e),this.component.I9();else{this.sfa=!0;if(b=this.Mfa(b))b.dispatchEvent(this.Pwa(e)),e.preventDefault(),e.stopImmediatePropagation();this.Gya(b)=="pointer"?this.component.I9(n.qf):this.component.I9(n.De);this.sfa=!1}};k.prototype.A8=function(e){return this.Lza||this.component.thb(e)};
k.prototype.iya=function(e,b){if(e=this.Mfa(e))e.dispatchEvent(this.Pwa(b)),b.preventDefault(),b.stopImmediatePropagation()};k.prototype.X0a=function(e,b){if(e=this.Mfa(e))e.dispatchEvent(this.AZa(b)),b.preventDefault(),b.stopImmediatePropagation()};k.prototype.Mfa=function(e){var b=this;this.wa().cc().style.pointerEvents="none";e=document.elementFromPoint(e.AE,e.BE);setTimeout(function(){b.wa().cc().style.pointerEvents=b.fza()},0);return e};k.prototype.Pwa=function(e){return new MouseEvent(e.type,
e)};k.prototype.AZa=function(e){return new TouchEvent(e.type,e)};k.prototype.Gya=function(e){if(e){var b=e.style.cursor;b=="inherit"&&(b=this.Gya(e.parentElement))}else b="default";return b};return k}(h)});
define("tdv/view/core/eventmanager/mousetouch/ThumbnailListMouseTouchEventManager","require exports tdv/constants/EventName tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager tdv/view/util/KeyboardControl tdv/view/constants/LayoutMode".split(" "),function(a,m,h,n,g,k){return function(e){function b(c){c=e.call(this,c)||this;c.component.bind(h.L("layout"),c.sia,c,!1);c.component.bind(h.L("items"),c.qia,c,!1);return c}P(b,e);b.prototype.SG=function(){e.prototype.SG.call(this);
this.Uz()};b.prototype.LG=function(){e.prototype.LG.call(this);this.Uz()};b.prototype.sia=function(){this.Uz()};b.prototype.qia=function(){this.Uz()};b.prototype.Uz=function(){this.IS?this.component.get("layout")==k.Mi?g.Obb(this,this.component.Cb().map(function(c){return c.wa().cc()})):g.eIa(this,this.component.Cb().map(function(c){return c.wa().cc()})):g.Eqa(this)};return b}(n)});
define("tdv/view/core/eventmanager/mousetouch/ThumbnailGridMouseTouchEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager","tdv/view/util/KeyboardControl"],function(a,m,h,n,g){return function(k){function e(b){b=k.call(this,b)||this;b.component.bind(h.L("layout"),b.sia,b,!1);b.component.bind(h.L("items"),b.qia,b,!1);return b}P(e,k);e.prototype.SG=function(){k.prototype.SG.call(this);this.Uz()};e.prototype.LG=function(){k.prototype.LG.call(this);
this.Uz()};e.prototype.sia=function(){this.Uz()};e.prototype.qia=function(){this.Uz()};e.prototype.Uz=function(){this.IS?g.Lbb(this,this.component.Cb().map(function(b){return b.wa().cc()}),this.component.Zm.oEa,this.component.Zm.Rwa):g.Eqa(this)};return e}(n)});
define("tdv/view/list/thumblist/ThumbnailListItem","require exports tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/constants/Position tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/containers/Container tdv/view/images/Image tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){return function(t){function u(){var v=t.call(this)||
this;v.Hf=null;v.Za=null;v.CG=[];v.set("ariaRole","option");v.set("autoRolledOver",!0);v.set("childrenInteractionEnabled",!1);v.set("contentOpaque",!0);v.set("creationPolicy",e.bL);v.set("cursor",b.qf);return v}P(u,t);u.prototype.Pb=function(){t.prototype.Pb.call(this);this.m("listLayout");this.m("overflow","hidden");this.m("item");this.m("thumbnailUrlFunction",this.xea);this.m("sourceProperties");this.m("labelFunction",this.vea);this.m("labelFontFamily");this.m("labelFontColor");this.m("labelFontSize");
this.m("labelFontStyle");this.m("labelFontWeight");this.m("labelGap");this.m("labelHorizontalAlign");this.m("labelPosition");this.m("labelTextDecoration");this.m("labelTextShadowColor");this.m("labelTextShadowHorizontalLength");this.m("labelTextShadowVerticalLength");this.m("labelTextShadowBlurRadius");this.m("labelTextShadowOpacity");this.m("thumbnailBorderRadius");this.m("thumbnailOpacity");this.m("thumbnailBorderSize");this.m("thumbnailBorderColor");this.m("thumbnailWidth");this.m("thumbnailHeight");
this.m("thumbnailMaxWidth");this.m("thumbnailMaxHeight");this.m("thumbnailShadow");this.m("thumbnailShadowHorizontalLength");this.m("thumbnailShadowVerticalLength");this.m("thumbnailShadowBlurRadius");this.m("thumbnailShadowSpread");this.m("thumbnailShadowColor");this.m("thumbnailShadowOpacity");this.D("rollOverBackgroundOpacity",l.ea,"backgroundOpacity");this.D("rollOverBackgroundBlur",l.ea,"backgroundBlur");this.D("rollOverBackgroundColor",l.ea,"backgroundColor");this.D("rollOverBackgroundColorRatios",
l.ea,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",l.ea,"backgroundColorDirection");this.D("rollOverBorderRadius",l.ea,"borderRadius");this.D("rollOverBorderTopRadius",l.ea,"borderTopRadius");this.D("rollOverBorderBottomRadius",l.ea,"borderBottomRadius");this.D("rollOverBorderLeftRadius",l.ea,"borderLeftRadius");this.D("rollOverBorderRightRadius",l.ea,"borderRightRadius");this.D("rollOverBorderTopLeftRadius",l.ea,"borderTopLeftRadius");this.D("rollOverBorderTopRightRadius",l.ea,
"borderTopRightRadius");this.D("rollOverBorderBottomLeftRadius",l.ea,"borderBottomLeftRadius");this.D("rollOverBorderBottomRightRadius",l.ea,"borderBottomRightRadius");this.D("rollOverBorderSize",l.ea,"borderSize");this.D("rollOverBorderLeftSize",l.ea,"borderLeftSize");this.D("rollOverBorderTopSize",l.ea,"borderTopSize");this.D("rollOverBorderRightSize",l.ea,"borderRightSize");this.D("rollOverBorderBottomSize",l.ea,"borderBottomSize");this.D("rollOverBorderColor",l.ea,"borderColor");this.D("rollOverBorderLeftColor",
l.ea,"borderLeftColor");this.D("rollOverBorderTopColor",l.ea,"borderTopColor");this.D("rollOverBorderRightColor",l.ea,"borderRightColor");this.D("rollOverBorderBottomColor",l.ea,"borderBottomColor");this.D("rollOverLabelFontColor",l.ea,"labelFontColor");this.D("rollOverLabelFontSize",l.ea,"labelFontSize");this.D("rollOverLabelFontStyle",l.ea,"labelFontStyle");this.D("rollOverLabelFontWeight",l.ea,"labelFontWeight");this.D("rollOverLabelTextDecoration",l.ea,"labelTextDecoration");this.D("rollOverLabelTextShadowColor",
l.ea,"labelTextShadowColor");this.D("rollOverLabelTextShadowHorizontalLength",l.ea,"labelTextShadowHorizontalLength");this.D("rollOverLabelTextShadowVerticalLength",l.ea,"labelTextShadowVerticalLength");this.D("rollOverLabelTextShadowBlurRadius",l.ea,"labelTextShadowBlurRadius");this.D("rollOverLabelTextShadowOpacity",l.ea,"labelTextShadowOpacity");this.D("rollOverOpacity",l.ea,"opacity");this.D("rollOverPaddingLeft",l.ea,"paddingLeft");this.D("rollOverPaddingTop",l.ea,"paddingTop");this.D("rollOverPaddingRight",
l.ea,"paddingRight");this.D("rollOverPaddingBottom",l.ea,"paddingBottom");this.D("rollOverShadow",l.ea,"shadow");this.D("rollOverThumbnailOpacity",l.ea,"thumbnailOpacity");this.D("rollOverThumbnailBorderSize",l.ea,"thumbnailBorderSize");this.D("rollOverThumbnailBorderColor",l.ea,"thumbnailBorderColor");this.D("rollOverThumbnailShadow",l.ea,"thumbnailShadow");this.D("rollOverThumbnailShadowHorizontalLength",l.ea,"thumbnailShadowHorizontalLength");this.D("rollOverThumbnailShadowVerticalLength",l.ea,
"thumbnailShadowVerticalLength");this.D("rollOverThumbnailShadowBlurRadius",l.ea,"thumbnailShadowBlurRadius");this.D("rollOverThumbnailShadowSpread",l.ea,"thumbnailShadowSpread");this.D("rollOverThumbnailShadowColor",l.ea,"thumbnailShadowColor");this.D("rollOverThumbnailShadowOpacity",l.ea,"thumbnailShadowOpacity");this.D("selectedBackgroundOpacity",l.oa,"backgroundOpacity");this.D("selectedBackgroundBlur",l.oa,"backgroundBlur");this.D("selectedBackgroundColor",l.oa,"backgroundColor");this.D("selectedBackgroundColorRatios",
l.oa,"backgroundColorRatios");this.D("selectedBackgroundColorDirection",l.oa,"backgroundColorDirection");this.D("selectedBorderRadius",l.oa,"borderRadius");this.D("selectedBorderTopRadius",l.oa,"borderTopRadius");this.D("selectedBorderBottomRadius",l.oa,"borderBottomRadius");this.D("selectedBorderLeftRadius",l.oa,"borderLeftRadius");this.D("selectedBorderRightRadius",l.oa,"borderRightRadius");this.D("selectedBorderTopLeftRadius",l.oa,"borderTopLeftRadius");this.D("selectedBorderTopRightRadius",l.oa,
"borderTopRightRadius");this.D("selectedBorderBottomLeftRadius",l.oa,"borderBottomLeftRadius");this.D("selectedBorderBottomRightRadius",l.oa,"borderBottomRightRadius");this.D("selectedBorderSize",l.oa,"borderSize");this.D("selectedBorderLeftSize",l.oa,"borderLeftSize");this.D("selectedBorderTopSize",l.oa,"borderTopSize");this.D("selectedBorderRightSize",l.oa,"borderRightSize");this.D("selectedBorderBottomSize",l.oa,"borderBottomSize");this.D("selectedBorderColor",l.oa,"borderColor");this.D("selectedBorderLeftColor",
l.oa,"borderLeftColor");this.D("selectedBorderTopColor",l.oa,"borderTopColor");this.D("selectedBorderRightColor",l.oa,"borderRightColor");this.D("selectedBorderBottomColor",l.oa,"borderBottomColor");this.D("selectedLabelFontColor",l.oa,"labelFontColor");this.D("selectedLabelFontSize",l.oa,"labelFontSize");this.D("selectedLabelFontStyle",l.oa,"labelFontStyle");this.D("selectedLabelFontWeight",l.oa,"labelFontWeight");this.D("selectedLabelTextDecoration",l.oa,"labelTextDecoration");this.D("selectedLabelTextShadowColor",
l.oa,"labelTextShadowColor");this.D("selectedLabelTextShadowHorizontalLength",l.oa,"labelTextShadowHorizontalLength");this.D("selectedLabelTextShadowVerticalLength",l.oa,"labelTextShadowVerticalLength");this.D("selectedLabelTextShadowBlurRadius",l.oa,"labelTextShadowBlurRadius");this.D("selectedLabelTextShadowOpacity",l.oa,"labelTextShadowOpacity");this.D("selectedOpacity",l.oa,"opacity");this.D("selectedPaddingLeft",l.oa,"paddingLeft");this.D("selectedPaddingTop",l.oa,"paddingTop");this.D("selectedPaddingRight",
l.oa,"paddingRight");this.D("selectedPaddingBottom",l.oa,"paddingBottom");this.D("selectedShadow",l.oa,"shadow");this.D("selectedThumbnailOpacity",l.oa,"thumbnailOpacity");this.D("selectedThumbnailBorderSize",l.oa,"thumbnailBorderSize");this.D("selectedThumbnailBorderColor",l.oa,"thumbnailBorderColor");this.D("selectedThumbnailShadow",l.oa,"thumbnailShadow");this.D("selectedThumbnailShadowHorizontalLength",l.oa,"thumbnailShadowHorizontalLength");this.D("selectedThumbnailShadowVerticalLength",l.oa,
"thumbnailShadowVerticalLength");this.D("selectedThumbnailShadowBlurRadius",l.oa,"thumbnailShadowBlurRadius");this.D("selectedThumbnailShadowSpread",l.oa,"thumbnailShadowSpread");this.D("selectedThumbnailShadowColor",l.oa,"thumbnailShadowColor");this.D("selectedThumbnailShadowOpacity",l.oa,"thumbnailShadowOpacity")};u.prototype.pZ=function(v){this.hV(v)};u.prototype.Kb=function(){t.prototype.Kb.call(this);this.Hf||(this.Hf=new q,this.mb(this.Hf),this.Hf.set("horizontalAlign",k.$e),this.Hf.set("verticalAlign",
k.$d),this.Hf.bind(g.ia,this.gla,this,!1));this.Za||(this.Za=new r,this.mb(this.Za))};u.prototype.xea=function(v){if(h.EA(v))return v;if(v&&v.ksa)return v.ksa};u.prototype.vea=function(v){if(v&&v.label)return v.label};u.prototype.Ux=function(){return this.Za&&this.Za.get("text")||t.prototype.Ux.call(this)};u.prototype.jb=function(){if(this.S("sourceProperties")||this.S("item")){for(;this.CG.length;)this.CG.pop().hF();var v=this.G("sourceProperties"),w=this.G("item");v&&w&&v.forEach(function(y){this.CG.push(n.jx(w,
y,this.Bia,this,!0))}.bind(this))}if(this.S("sourceProperties")||this.S("item")||this.S("tooltipFunction"))v=this.G("item"),v=this.G("tooltipFunction")(v),this.set("toolTip",v);if(this.S("sourceProperties")||this.S("item")||this.S("thumbnailUrlFunction"))v=this.G("item"),(v=this.G("thumbnailUrlFunction")(v))?this.Hf.get("url")!=v&&this.Hf.xa({url:v,visible:!0,opacity:.5}):this.Hf.xa({url:void 0,visible:!1}),this.$("thumbnailUrlFunction");if(this.S("sourceProperties")||this.S("item")||this.S("labelFunction"))v=
this.G("item"),v=this.G("labelFunction")(v),this.Za.xa({text:v,visible:v?!0:!1}),this.$("labelFunction");this.$("sourceProperties");this.$("item");if(this.S("listLayout"))switch(this.G("listLayout")){case c.Uk:this.xa({width:"100%",height:void 0});break;default:this.xa({height:"100%",width:void 0})}if(this.S("labelPosition")||this.S("listLayout")||this.S("thumbnailWidth")||this.S("thumbnailHeight")){var x=this;v=function(y,z){y=x.G(y);y===void 0&&(y=z);return y};switch(this.G("labelPosition")){case d.fb:case d.Db:this.set("layout",
c.Mi);this.Za.set("width","100%");switch(this.G("listLayout")){case c.Uk:this.Hf.xa({height:v("thumbnailHeight"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Pk)});break;default:this.Hf.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Pk)})}break;default:switch(this.set("layout",c.Uk),this.Za.set("width",void 0),this.G("listLayout")){case c.Uk:this.Hf.xa({height:v("thumbnailHeight"),width:v("thumbnailWidth","100%"),scaleMode:v("thumbnailScaleMode",
f.Tp)});break;default:this.Hf.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",f.Pk)})}}switch(this.G("labelPosition")){case d.fb:case d.Tc:this.qr(this.Za,0);break;default:this.qr(this.Za,1)}this.$("labelPosition")}this.$("listLayout");this.Oc(u.yca,u.fR,[this],!0,!0);this.Oc(u.Aca,u.fR,[this.Hf],!0,!0);this.Oc(u.zca,u.fR,[this.Za],!0,!0);t.prototype.jb.call(this)};u.prototype.Bia=function(){this.yD("item")};u.prototype.sI=function(v){t.prototype.sI.call(this,
v)};u.prototype.gla=function(){this.Hf.set("opacity",1)};u.yca=["labelGap"];u.Aca="thumbnailBorderColor thumbnailBorderRadius thumbnailBorderSize thumbnailMaxWidth thumbnailMaxHeight thumbnailOpacity thumbnailShadow thumbnailShadowHorizontalLength thumbnailShadowVerticalLength thumbnailShadowBlurRadius thumbnailShadowSpread thumbnailShadowColor thumbnailShadowOpacity".split(" ");u.zca="labelFontFamily labelFontColor labelFontSize labelFontStyle labelFontWeight labelHorizontalAlign labelTextDecoration labelTextShadowColor labelTextShadowHorizontalLength labelTextShadowVerticalLength labelTextShadowBlurRadius labelTextShadowOpacity".split(" ");
u.fR={labelFontFamily:"fontFamily",labelFontColor:"fontColor",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelGap:"gap",labelHorizontalAlign:"horizontalAlign",labelTextDecoration:"textDecoration",labelTextShadowColor:"textShadowColor",labelTextShadowHorizontalLength:"textShadowHorizontalLength",labelTextShadowVerticalLength:"textShadowVerticalLength",labelTextShadowBlurRadius:"textShadowBlurRadius",labelTextShadowOpacity:"textShadowOpacity",thumbnailMaxWidth:"maxWidth",
thumbnailMaxHeight:"maxHeight",thumbnailBorderRadius:"borderRadius",thumbnailOpacity:"opacity",thumbnailBorderSize:"borderSize",thumbnailBorderColor:"borderColor",thumbnailShadow:"shadow",thumbnailShadowHorizontalLength:"shadowHorizontalLength",thumbnailShadowVerticalLength:"shadowVerticalLength",thumbnailShadowBlurRadius:"shadowBlurRadius",thumbnailShadowSpread:"shadowSpread",thumbnailShadowColor:"shadowColor",thumbnailShadowOpacity:"shadowOpacity"};return u}(p)});
define("tdv/view/list/thumblist/ThumbnailList","require exports tdv/events/Event tdv/view/constants/Alignment tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/constants/Position tdv/view/containers/Container tdv/view/list/thumblist/ThumbnailListItem".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(f){function l(){var p=f.call(this)||this;p.Bn=!1;p.set("ariaRole","listbox");p.set("contentOpaque",!0);p.bind(g.L("selectedIndex"),p.y7a,p,!1);p.bind(g.$b,
p.p$a,p,!1);return p}P(l,f);l.prototype.Pb=function(){f.prototype.Pb.call(this);this.m("layout",k.Mi);this.m("selectedIndex",-1);this.m("items",[]);this.m("overflow",e.Vr);this.m("itemHorizontalAlign",n.$e);this.m("itemLabelFontFamily");this.m("itemLabelPosition",b.Gc);this.m("itemLabelFunction");this.m("itemLabelGap");this.m("itemLabelHorizontalAlign",n.$e);this.m("itemThumbnailBorderRadius");this.m("itemThumbnailScaleMode");this.m("itemThumbnailWidth");this.m("itemThumbnailHeight");this.m("itemThumbnailMaxWidth");
this.m("itemThumbnailMaxHeight");this.m("itemThumbnailUrlFunction");this.m("itemTooltipFunction");this.m("itemSourceProperties");this.m("itemVerticalAlign",n.$d);this.m("itemBackgroundOpacity");this.m("itemBackgroundBlur");this.m("itemBackgroundColor");this.m("itemBackgroundColorRatios");this.m("itemBackgroundColorDirection");this.m("itemBorderRadius");this.m("itemBorderTopRadius");this.m("itemBorderBottomRadius");this.m("itemBorderLeftRadius");this.m("itemBorderRightRadius");this.m("itemBorderTopLeftRadius");
this.m("itemBorderTopRightRadius");this.m("itemBorderBottomLeftRadius");this.m("itemBorderBottomRightRadius");this.m("itemBorderSize");this.m("itemBorderLeftSize");this.m("itemBorderTopSize");this.m("itemBorderRightSize");this.m("itemBorderBottomSize");this.m("itemBorderColor");this.m("itemBorderLeftColor");this.m("itemBorderTopColor");this.m("itemBorderRightColor");this.m("itemBorderBottomColor");this.m("itemLabelFontColor");this.m("itemLabelFontSize");this.m("itemLabelFontStyle");this.m("itemLabelFontWeight");
this.m("itemLabelTextDecoration");this.m("itemLabelTextShadowColor");this.m("itemLabelTextShadowHorizontalLength");this.m("itemLabelTextShadowVerticalLength");this.m("itemLabelTextShadowBlurRadius");this.m("itemLabelTextShadowOpacity");this.m("itemOpacity");this.m("itemPaddingLeft");this.m("itemPaddingTop");this.m("itemPaddingRight");this.m("itemPaddingBottom");this.m("itemShadow");this.m("itemThumbnailOpacity");this.m("itemThumbnailBorderSize");this.m("itemThumbnailBorderColor");this.m("itemThumbnailShadow");
this.m("itemThumbnailShadowHorizontalLength");this.m("itemThumbnailShadowVerticalLength");this.m("itemThumbnailShadowBlurRadius");this.m("itemThumbnailShadowSpread");this.m("itemThumbnailShadowColor");this.m("itemThumbnailShadowOpacity");this.m("rollOverItemBackgroundOpacity");this.m("rollOverItemBackgroundBlur");this.m("rollOverItemBackgroundColor");this.m("rollOverItemBackgroundColorRatios");this.m("rollOverItemBackgroundColorDirection");this.m("rollOverItemBorderRadius");this.m("rollOverItemBorderTopRadius");
this.m("rollOverItemBorderBottomRadius");this.m("rollOverItemBorderLeftRadius");this.m("rollOverItemBorderRightRadius");this.m("rollOverItemBorderTopLeftRadius");this.m("rollOverItemBorderTopRightRadius");this.m("rollOverItemBorderBottomLeftRadius");this.m("rollOverItemBorderBottomRightRadius");this.m("rollOverItemBorderSize");this.m("rollOverItemBorderLeftSize");this.m("rollOverItemBorderTopSize");this.m("rollOverItemBorderRightSize");this.m("rollOverItemBorderBottomSize");this.m("rollOverItemBorderColor");
this.m("rollOverItemBorderLeftColor");this.m("rollOverItemBorderTopColor");this.m("rollOverItemBorderRightColor");this.m("rollOverItemBorderBottomColor");this.m("rollOverItemLabelFontSize");this.m("rollOverItemLabelFontStyle");this.m("rollOverItemLabelFontWeight");this.m("rollOverItemLabelTextDecoration");this.m("rollOverItemLabelTextShadowColor");this.m("rollOverItemLabelTextShadowHorizontalLength");this.m("rollOverItemLabelTextShadowVerticalLength");this.m("rollOverItemLabelTextShadowBlurRadius");
this.m("rollOverItemLabelTextShadowOpacity");this.m("rollOverItemOpacity");this.m("rollOverItemPaddingLeft");this.m("rollOverItemPaddingTop");this.m("rollOverItemPaddingRight");this.m("rollOverItemPaddingBottom");this.m("rollOverItemShadow");this.m("rollOverItemThumbnailOpacity");this.m("rollOverItemThumbnailBorderSize");this.m("rollOverItemThumbnailBorderColor");this.m("rollOverItemThumbnailShadow");this.m("rollOverItemThumbnailShadowHorizontalLength");this.m("rollOverItemThumbnailShadowVerticalLength");
this.m("rollOverItemThumbnailShadowBlurRadius");this.m("rollOverItemThumbnailShadowSpread");this.m("rollOverItemThumbnailShadowColor");this.m("rollOverItemThumbnailShadowOpacity");this.m("selectedItemBackgroundOpacity");this.m("selectedItemBackgroundBlur");this.m("selectedItemBackgroundColor");this.m("selectedItemBackgroundColorRatios");this.m("selectedItemBackgroundColorDirection");this.m("selectedItemBorderRadius");this.m("selectedItemBorderTopRadius");this.m("selectedItemBorderBottomRadius");this.m("selectedItemBorderLeftRadius");
this.m("selectedItemBorderRightRadius");this.m("selectedItemBorderTopLeftRadius");this.m("selectedItemBorderTopRightRadius");this.m("selectedItemBorderBottomLeftRadius");this.m("selectedItemBorderBottomRightRadius");this.m("selectedItemBorderSize");this.m("selectedItemBorderLeftSize");this.m("selectedItemBorderTopSize");this.m("selectedItemBorderRightSize");this.m("selectedItemBorderBottomSize");this.m("selectedItemBorderColor");this.m("selectedItemBorderLeftColor");this.m("selectedItemBorderTopColor");
this.m("selectedItemBorderRightColor");this.m("selectedItemBorderBottomColor");this.m("selectedItemLabelFontSize");this.m("selectedItemLabelFontStyle");this.m("selectedItemLabelFontWeight");this.m("selectedItemLabelTextDecoration");this.m("selectedItemLabelTextShadowColor");this.m("selectedItemLabelTextShadowHorizontalLength");this.m("selectedItemLabelTextShadowVerticalLength");this.m("selectedItemLabelTextShadowBlurRadius");this.m("selectedItemLabelTextShadowOpacity");this.m("selectedItemOpacity");
this.m("selectedItemPaddingLeft");this.m("selectedItemPaddingTop");this.m("selectedItemPaddingRight");this.m("selectedItemPaddingBottom");this.m("selectedItemShadow");this.m("selectedItemThumbnailOpacity");this.m("selectedItemThumbnailBorderSize");this.m("selectedItemThumbnailBorderColor");this.m("selectedItemThumbnailShadow");this.m("selectedItemThumbnailShadowHorizontalLength");this.m("selectedItemThumbnailShadowVerticalLength");this.m("selectedItemThumbnailShadowBlurRadius");this.m("selectedItemThumbnailShadowSpread");
this.m("selectedItemThumbnailShadowColor");this.m("selectedItemThumbnailShadowOpacity")};l.prototype.SS=function(p){this.Bn=!0;this.set("selectedIndex",this.Sfa(p.source))};l.prototype.y7a=function(){this.xEa()};l.prototype.p$a=function(){setTimeout(function(){this.xEa()}.bind(this),100)};l.prototype.xEa=function(){var p=this.get("selectedIndex"),q=this.Cb();p>=0&&p<q.length&&this.scrollIntoView(q[p])};l.prototype.Sfa=function(p){for(var q=this.Cb(),r=0;r<q.length;r++)if(q[r]==p)return r;return-1};
l.prototype.jb=function(){if(this.S("layout")){var p=this.G("layout");p!=k.Uk&&p!=k.Mi&&this.set("layout",k.Mi)}var q=!1;if(this.S("items")){q=!0;p=this.G("items")||[];var r=this.Cb();if(r.length<p.length){for(var t=r.length;t<p.length;t++)r=new d,r.bind(g.ma,this.SS,this,!1),this.Oc(l.bR,l.hG,[r],!1,!1),this.Oc(l.cR,l.iG,[r],!1,!1),this.mb(r);r=this.Cb()}if(r.length>p.length){for(t=p.length;t<r.length;t++){var u=r[t];u.h(g.ma,this.SS,this);this.removeChild(u)}r=this.Cb()}for(t=0;t<p.length;t++)r[t].set("item",
p[t]);this.$("items")}if(this.S("selectedIndex")||q){p=this.Cb();q=Math.min(p.length-1,Math.max(-1,this.G("selectedIndex")));this.set("selectedIndex",q);for(t=0;t<p.length;t++)p[t].pZ(t==q);this.$("selectedIndex");this.Bn&&(this.Bn=!1,this.o(new h(g.V)))}this.Oc(l.bR,l.hG,this.Cb(),!0,!1);this.Oc(l.cR,l.iG,this.Cb(),!0,!0);f.prototype.jb.call(this)};l.hG={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",shadowBlurRadius:"shadowBlurRadius",
shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};l.iG={itemHorizontalAlign:"horizontalAlign",itemLabelFunction:"labelFunction",itemLabelFontFamily:"labelFontFamily",itemLabelGap:"labelGap",itemLabelHorizontalAlign:"labelHorizontalAlign",itemLabelPosition:"labelPosition",itemSourceProperties:"sourceProperties",itemThumbnailBorderRadius:"thumbnailBorderRadius",itemThumbnailScaleMode:"thumbnailScaleMode",itemThumbnailHeight:"thumbnailHeight",itemThumbnailWidth:"thumbnailWidth",
itemThumbnailMaxHeight:"thumbnailMaxHeight",itemThumbnailMaxWidth:"thumbnailMaxWidth",itemThumbnailUrlFunction:"thumbnailUrlFunction",itemTooltipFunction:"tooltipFunction",itemVerticalAlign:"verticalAlign",itemBackgroundOpacity:"backgroundOpacity",itemBackgroundBlur:"backgroundBlur",itemBackgroundColor:"backgroundColor",itemBackgroundColorRatios:"backgroundColorRatios",itemBackgroundColorDirection:"backgroundColorDirection",itemBorderRadius:"borderRadius",itemBorderTopRadius:"borderTopRadius",itemBorderBottomRadius:"borderBottomRadius",
itemBorderLeftRadius:"borderLeftRadius",itemBorderRightRadius:"borderRightRadius",itemBorderTopLeftRadius:"borderTopLeftRadius",itemBorderTopRightRadius:"borderTopRightRadius",itemBorderBottomLeftRadius:"borderBottomLeftRadius",itemBorderBottomRightRadius:"borderBottomRightRadius",itemBorderSize:"borderSize",itemBorderLeftSize:"borderLeftSize",itemBorderTopSize:"borderTopSize",itemBorderRightSize:"borderRightSize",itemBorderBottomSize:"borderBottomSize",itemBorderColor:"borderColor",itemBorderLeftColor:"borderLeftColor",
itemBorderTopColor:"borderTopColor",itemBorderRightColor:"borderRightColor",itemBorderBottomColor:"borderBottomColor",itemLabelFontColor:"labelFontColor",itemLabelFontSize:"labelFontSize",itemLabelFontStyle:"labelFontStyle",itemLabelFontWeight:"labelFontWeight",itemLabelTextDecoration:"labelTextDecoration",itemLabelTextShadowColor:"labelTextShadowColor",itemLabelTextShadowHorizontalLength:"labelTextShadowHorizontalLength",itemLabelTextShadowVerticalLength:"labelTextShadowVerticalLength",itemLabelTextShadowBlurRadius:"labelTextShadowBlurRadius",
itemLabelTextShadowOpacity:"labelTextShadowOpacity",itemOpacity:"opacity",itemPaddingLeft:"paddingLeft",itemPaddingTop:"paddingTop",itemPaddingRight:"paddingRight",itemPaddingBottom:"paddingBottom",itemShadow:"shadow",itemThumbnailOpacity:"thumbnailOpacity",itemThumbnailBorderSize:"thumbnailBorderSize",itemThumbnailBorderColor:"thumbnailBorderColor",itemThumbnailShadow:"thumbnailShadow",itemThumbnailShadowHorizontalLength:"thumbnailShadowHorizontalLength",itemThumbnailShadowVerticalLength:"thumbnailShadowVerticalLength",
itemThumbnailShadowBlurRadius:"thumbnailShadowBlurRadius",itemThumbnailShadowSpread:"thumbnailShadowSpread",itemThumbnailShadowColor:"thumbnailShadowColor",itemThumbnailShadowOpacity:"thumbnailShadowOpacity",rollOverItemBackgroundOpacity:"rollOverBackgroundOpacity",rollOverItemBackgroundBlur:"rollOverBackgroundBlur",rollOverItemBackgroundColor:"rollOverBackgroundColor",rollOverItemBackgroundColorRatios:"rollOverBackgroundColorRatios",rollOverItemBackgroundColorDirection:"rollOverBackgroundColorDirection",
rollOverItemBorderRadius:"rollOverBorderRadius",rollOverItemBorderTopRadius:"rollOverBorderTopRadius",rollOverItemBorderBottomRadius:"rollOverBorderBottomRadius",rollOverItemBorderLeftRadius:"rollOverBorderLeftRadius",rollOverItemBorderRightRadius:"rollOverBorderRightRadius",rollOverItemBorderTopLeftRadius:"rollOverBorderTopLeftRadius",rollOverItemBorderTopRightRadius:"rollOverBorderTopRightRadius",rollOverItemBorderBottomLeftRadius:"rollOverBorderBottomLeftRadius",rollOverItemBorderBottomRightRadius:"rollOverBorderBottomRightRadius",
rollOverItemBorderSize:"rollOverBorderSize",rollOverItemBorderLeftSize:"rollOverBorderLeftSize",rollOverItemBorderTopSize:"rollOverBorderTopSize",rollOverItemBorderRightSize:"rollOverBorderRightSize",rollOverItemBorderBottomSize:"rollOverBorderBottomSize",rollOverItemBorderColor:"rollOverBorderColor",rollOverItemBorderLeftColor:"rollOverBorderLeftColor",rollOverItemBorderTopColor:"rollOverBorderTopColor",rollOverItemBorderRightColor:"rollOverBorderRightColor",rollOverItemBorderBottomColor:"rollOverBorderBottomColor",
rollOverItemLabelFontColor:"rollOverLabelFontColor",rollOverItemLabelFontSize:"rollOverLabelFontSize",rollOverItemLabelFontStyle:"rollOverLabelFontStyle",rollOverItemLabelFontWeight:"rollOverLabelFontWeight",rollOverItemLabelTextDecoration:"rollOverLabelTextDecoration",rollOverItemLabelTextShadowColor:"rollOverLabelTextShadowColor",rollOverItemLabelTextShadowHorizontalLength:"rollOverLabelTextShadowHorizontalLength",rollOverItemLabelTextShadowVerticalLength:"rollOverLabelTextShadowVerticalLength",
rollOverItemLabelTextShadowBlurRadius:"rollOverLabelTextShadowBlurRadius",rollOverItemLabelTextShadowOpacity:"rollOverLabelTextShadowOpacity",rollOverItemOpacity:"rollOverOpacity",rollOverItemPaddingLeft:"rollOverPaddingLeft",rollOverItemPaddingTop:"rollOverPaddingTop",rollOverItemPaddingRight:"rollOverPaddingRight",rollOverItemPaddingBottom:"rollOverPaddingBottom",rollOverItemShadow:"rollOverShadow",rollOverItemThumbnailOpacity:"rollOverThumbnailOpacity",rollOverItemThumbnailBorderSize:"rollOverThumbnailBorderSize",
rollOverItemThumbnailBorderColor:"rollOverThumbnailBorderColor",rollOverItemThumbnailShadow:"rollOverThumbnailShadow",rollOverItemThumbnailShadowHorizontalLength:"rollOverThumbnailShadowHorizontalLength",rollOverItemThumbnailShadowVerticalLength:"rollOverThumbnailShadowVerticalLength",rollOverItemThumbnailShadowBlurRadius:"rollOverThumbnailShadowBlurRadius",rollOverItemThumbnailShadowSpread:"rollOverThumbnailShadowSpread",rollOverItemThumbnailShadowColor:"rollOverThumbnailShadowColor",rollOverItemThumbnailShadowOpacity:"rollOverThumbnailShadowOpacity",
selectedItemBackgroundOpacity:"selectedBackgroundOpacity",selectedItemBackgroundBlur:"selectedBackgroundBlur",selectedItemBackgroundColor:"selectedBackgroundColor",selectedItemBackgroundColorRatios:"selectedBackgroundColorRatios",selectedItemBackgroundColorDirection:"selectedBackgroundColorDirection",selectedItemBorderRadius:"selectedBorderRadius",selectedItemBorderTopRadius:"selectedBorderTopRadius",selectedItemBorderBottomRadius:"selectedBorderBottomRadius",selectedItemBorderLeftRadius:"selectedBorderLeftRadius",
selectedItemBorderRightRadius:"selectedBorderRightRadius",selectedItemBorderTopLeftRadius:"selectedBorderTopLeftRadius",selectedItemBorderTopRightRadius:"selectedBorderTopRightRadius",selectedItemBorderBottomLeftRadius:"selectedBorderBottomLeftRadius",selectedItemBorderBottomRightRadius:"selectedBorderBottomRightRadius",selectedItemBorderSize:"selectedBorderSize",selectedItemBorderLeftSize:"selectedBorderLeftSize",selectedItemBorderTopSize:"selectedBorderTopSize",selectedItemBorderRightSize:"selectedBorderRightSize",
selectedItemBorderBottomSize:"selectedBorderBottomSize",selectedItemBorderColor:"selectedBorderColor",selectedItemBorderLeftColor:"selectedBorderLeftColor",selectedItemBorderTopColor:"selectedBorderTopColor",selectedItemBorderRightColor:"selectedBorderRightColor",selectedItemBorderBottomColor:"selectedBorderBottomColor",selectedItemLabelFontColor:"selectedLabelFontColor",selectedItemLabelFontSize:"selectedLabelFontSize",selectedItemLabelFontStyle:"selectedLabelFontStyle",selectedItemLabelFontWeight:"selectedLabelFontWeight",
selectedItemLabelTextDecoration:"selectedLabelTextDecoration",selectedItemLabelTextShadowColor:"selectedLabelTextShadowColor",selectedItemLabelTextShadowHorizontalLength:"selectedLabelTextShadowHorizontalLength",selectedItemLabelTextShadowVerticalLength:"selectedLabelTextShadowVerticalLength",selectedItemLabelTextShadowBlurRadius:"selectedLabelTextShadowBlurRadius",selectedItemLabelTextShadowOpacity:"selectedLabelTextShadowOpacity",selectedItemOpacity:"selectedOpacity",selectedItemPaddingLeft:"selectedPaddingLeft",
selectedItemPaddingTop:"selectedPaddingTop",selectedItemPaddingRight:"selectedPaddingRight",selectedItemPaddingBottom:"selectedPaddingBottom",selectedItemShadow:"selectedShadow",selectedItemThumbnailOpacity:"selectedThumbnailOpacity",selectedItemThumbnailBorderSize:"selectedThumbnailBorderSize",selectedItemThumbnailBorderColor:"selectedThumbnailBorderColor",selectedItemThumbnailShadow:"selectedThumbnailShadow",selectedItemThumbnailShadowHorizontalLength:"selectedThumbnailShadowHorizontalLength",selectedItemThumbnailShadowVerticalLength:"selectedThumbnailShadowVerticalLength",
selectedItemThumbnailShadowBlurRadius:"selectedThumbnailShadowBlurRadius",selectedItemThumbnailShadowSpread:"selectedThumbnailShadowSpread",selectedItemThumbnailShadowColor:"selectedThumbnailShadowColor",selectedItemThumbnailShadowOpacity:"selectedThumbnailShadowOpacity",tabIndex:"tabIndex",toolTipBackgroundColor:"toolTipBackgroundColor",toolTipBackgroundOpacity:"toolTipBackgroundOpacity",toolTipBorderRadius:"toolTipBorderRadius",toolTipBorderColor:"toolTipBorderColor",toolTipBorderSize:"toolTipBorderSize",
toolTipDisplayTime:"toolTipDisplayTime",toolTipFontFamily:"toolTipFontFamily",toolTipFontSize:"toolTipFontSize",toolTipFontColor:"toolTipFontColor",toolTipFontWeight:"toolTipFontWeight",toolTipFontStyle:"toolTipFontStyle",toolTipPaddingBottom:"toolTipPaddingBottom",toolTipPaddingLeft:"toolTipPaddingLeft",toolTipPaddingTop:"toolTipPaddingTop",toolTipPaddingRight:"toolTipPaddingRight",toolTipShadowBlurRadius:"toolTipShadowBlurRadius",toolTipShadowColor:"toolTipShadowColor",toolTipShadowHorizontalLength:"toolTipShadowHorizontalLength",
toolTipShadowOpacity:"toolTipShadowOpacity",toolTipShadowSpread:"toolTipShadowSpread",toolTipShadowVerticalLength:"toolTipShadowVerticalLength",toolTipOpacity:"toolTipOpacity",toolTipTextShadowBlurRadius:"toolTipTextShadowBlurRadius",toolTipTextShadowColor:"toolTipTextShadowColor",toolTipTextShadowHorizontalLength:"toolTipTextShadowHorizontalLength",toolTipTextShadowOpacity:"toolTipTextShadowOpacity",toolTipTextShadowVerticalLength:"toolTipTextShadowVerticalLength"};l.bR=Object.keys(l.hG);l.cR=Object.keys(l.iG);
return l}(c)});
define("tdv/view/list/thumbgrid/ThumbnailGridItem","require exports tdv/utils tdv/binding/ChangeWatcher tdv/constants/EventName tdv/view/constants/Alignment tdv/view/constants/CreationPolicy tdv/view/constants/Cursor tdv/view/constants/LayoutMode tdv/view/constants/Position tdv/view/constants/ScaleMode tdv/view/constants/State tdv/view/containers/Container tdv/view/images/Image tdv/view/text/Label".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){return function(t){function u(){var v=t.call(this)||
this;v.Hf=null;v.Za=null;v.CG=[];v.set("ariaRole","option");v.set("autoRolledOver",!0);v.set("childrenInteractionEnabled",!1);v.set("contentOpaque",!0);v.set("creationPolicy",e.bL);v.set("cursor",b.qf);return v}P(u,t);u.prototype.Pb=function(){t.prototype.Pb.call(this);this.m("overflow","hidden");this.m("item");this.m("thumbnailUrlFunction",this.xea);this.m("sourceProperties");this.m("labelFunction",this.vea);this.m("labelFontFamily");this.m("labelFontColor");this.m("labelFontSize");this.m("labelFontStyle");
this.m("labelFontWeight");this.m("labelGap");this.m("labelHorizontalAlign");this.m("labelMaxWidth");this.m("labelPosition");this.m("labelTextDecoration");this.m("labelTextShadowColor");this.m("labelTextShadowHorizontalLength");this.m("labelTextShadowVerticalLength");this.m("labelTextShadowBlurRadius");this.m("labelTextShadowOpacity");this.m("thumbnailBorderRadius");this.m("thumbnailOpacity");this.m("thumbnailBorderSize");this.m("thumbnailBorderColor");this.m("thumbnailWidth");this.m("thumbnailHeight");
this.m("thumbnailMaxWidth");this.m("thumbnailMaxHeight");this.m("thumbnailShadow");this.m("thumbnailShadowHorizontalLength");this.m("thumbnailShadowVerticalLength");this.m("thumbnailShadowBlurRadius");this.m("thumbnailShadowSpread");this.m("thumbnailShadowColor");this.m("thumbnailShadowOpacity");this.D("rollOverBackgroundOpacity",l.ea,"backgroundOpacity");this.D("rollOverBackgroundBlur",l.ea,"backgroundBlur");this.D("rollOverBackgroundColor",l.ea,"backgroundColor");this.D("rollOverBackgroundColorRatios",
l.ea,"backgroundColorRatios");this.D("rollOverBackgroundColorDirection",l.ea,"backgroundColorDirection");this.D("rollOverBorderRadius",l.ea,"borderRadius");this.D("rollOverBorderTopRadius",l.ea,"borderTopRadius");this.D("rollOverBorderBottomRadius",l.ea,"borderBottomRadius");this.D("rollOverBorderLeftRadius",l.ea,"borderLeftRadius");this.D("rollOverBorderRightRadius",l.ea,"borderRightRadius");this.D("rollOverBorderTopLeftRadius",l.ea,"borderTopLeftRadius");this.D("rollOverBorderTopRightRadius",l.ea,
"borderTopRightRadius");this.D("rollOverBorderBottomLeftRadius",l.ea,"borderBottomLeftRadius");this.D("rollOverBorderBottomRightRadius",l.ea,"borderBottomRightRadius");this.D("rollOverBorderSize",l.ea,"borderSize");this.D("rollOverBorderLeftSize",l.ea,"borderLeftSize");this.D("rollOverBorderTopSize",l.ea,"borderTopSize");this.D("rollOverBorderRightSize",l.ea,"borderRightSize");this.D("rollOverBorderBottomSize",l.ea,"borderBottomSize");this.D("rollOverBorderColor",l.ea,"borderColor");this.D("rollOverBorderLeftColor",
l.ea,"borderLeftColor");this.D("rollOverBorderTopColor",l.ea,"borderTopColor");this.D("rollOverBorderRightColor",l.ea,"borderRightColor");this.D("rollOverBorderBottomColor",l.ea,"borderBottomColor");this.D("rollOverLabelFontColor",l.ea,"labelFontColor");this.D("rollOverLabelFontSize",l.ea,"labelFontSize");this.D("rollOverLabelFontStyle",l.ea,"labelFontStyle");this.D("rollOverLabelFontWeight",l.ea,"labelFontWeight");this.D("rollOverLabelTextDecoration",l.ea,"labelTextDecoration");this.D("rollOverLabelTextShadowColor",
l.ea,"labelTextShadowColor");this.D("rollOverLabelTextShadowHorizontalLength",l.ea,"labelTextShadowHorizontalLength");this.D("rollOverLabelTextShadowVerticalLength",l.ea,"labelTextShadowVerticalLength");this.D("rollOverLabelTextShadowBlurRadius",l.ea,"labelTextShadowBlurRadius");this.D("rollOverLabelTextShadowOpacity",l.ea,"labelTextShadowOpacity");this.D("rollOverOpacity",l.ea,"opacity");this.D("rollOverPaddingLeft",l.ea,"paddingLeft");this.D("rollOverPaddingTop",l.ea,"paddingTop");this.D("rollOverPaddingRight",
l.ea,"paddingRight");this.D("rollOverPaddingBottom",l.ea,"paddingBottom");this.D("rollOverShadow",l.ea,"shadow");this.D("rollOverThumbnailOpacity",l.ea,"thumbnailOpacity");this.D("rollOverThumbnailBorderSize",l.ea,"thumbnailBorderSize");this.D("rollOverThumbnailBorderColor",l.ea,"thumbnailBorderColor");this.D("rollOverThumbnailShadow",l.ea,"thumbnailShadow");this.D("rollOverThumbnailShadowHorizontalLength",l.ea,"thumbnailShadowHorizontalLength");this.D("rollOverThumbnailShadowVerticalLength",l.ea,
"thumbnailShadowVerticalLength");this.D("rollOverThumbnailShadowBlurRadius",l.ea,"thumbnailShadowBlurRadius");this.D("rollOverThumbnailShadowSpread",l.ea,"thumbnailShadowSpread");this.D("rollOverThumbnailShadowColor",l.ea,"thumbnailShadowColor");this.D("rollOverThumbnailShadowOpacity",l.ea,"thumbnailShadowOpacity");this.D("selectedBackgroundOpacity",l.oa,"backgroundOpacity");this.D("selectedBackgroundBlur",l.oa,"backgroundBlur");this.D("selectedBackgroundColor",l.oa,"backgroundColor");this.D("selectedBackgroundColorRatios",
l.oa,"backgroundColorRatios");this.D("selectedBackgroundColorDirection",l.oa,"backgroundColorDirection");this.D("selectedBorderRadius",l.oa,"borderRadius");this.D("selectedBorderTopRadius",l.oa,"borderTopRadius");this.D("selectedBorderBottomRadius",l.oa,"borderBottomRadius");this.D("selectedBorderLeftRadius",l.oa,"borderLeftRadius");this.D("selectedBorderRightRadius",l.oa,"borderRightRadius");this.D("selectedBorderTopLeftRadius",l.oa,"borderTopLeftRadius");this.D("selectedBorderTopRightRadius",l.oa,
"borderTopRightRadius");this.D("selectedBorderBottomLeftRadius",l.oa,"borderBottomLeftRadius");this.D("selectedBorderBottomRightRadius",l.oa,"borderBottomRightRadius");this.D("selectedBorderSize",l.oa,"borderSize");this.D("selectedBorderLeftSize",l.oa,"borderLeftSize");this.D("selectedBorderTopSize",l.oa,"borderTopSize");this.D("selectedBorderRightSize",l.oa,"borderRightSize");this.D("selectedBorderBottomSize",l.oa,"borderBottomSize");this.D("selectedBorderColor",l.oa,"borderColor");this.D("selectedBorderLeftColor",
l.oa,"borderLeftColor");this.D("selectedBorderTopColor",l.oa,"borderTopColor");this.D("selectedBorderRightColor",l.oa,"borderRightColor");this.D("selectedBorderBottomColor",l.oa,"borderBottomColor");this.D("selectedLabelFontColor",l.oa,"labelFontColor");this.D("selectedLabelFontSize",l.oa,"labelFontSize");this.D("selectedLabelFontStyle",l.oa,"labelFontStyle");this.D("selectedLabelFontWeight",l.oa,"labelFontWeight");this.D("selectedLabelTextDecoration",l.oa,"labelTextDecoration");this.D("selectedLabelTextShadowColor",
l.oa,"labelTextShadowColor");this.D("selectedLabelTextShadowHorizontalLength",l.oa,"labelTextShadowHorizontalLength");this.D("selectedLabelTextShadowVerticalLength",l.oa,"labelTextShadowVerticalLength");this.D("selectedLabelTextShadowBlurRadius",l.oa,"labelTextShadowBlurRadius");this.D("selectedLabelTextShadowOpacity",l.oa,"labelTextShadowOpacity");this.D("selectedOpacity",l.oa,"opacity");this.D("selectedPaddingLeft",l.oa,"paddingLeft");this.D("selectedPaddingTop",l.oa,"paddingTop");this.D("selectedPaddingRight",
l.oa,"paddingRight");this.D("selectedPaddingBottom",l.oa,"paddingBottom");this.D("selectedShadow",l.oa,"shadow");this.D("selectedThumbnailOpacity",l.oa,"thumbnailOpacity");this.D("selectedThumbnailBorderSize",l.oa,"thumbnailBorderSize");this.D("selectedThumbnailBorderColor",l.oa,"thumbnailBorderColor");this.D("selectedThumbnailShadow",l.oa,"thumbnailShadow");this.D("selectedThumbnailShadowHorizontalLength",l.oa,"thumbnailShadowHorizontalLength");this.D("selectedThumbnailShadowVerticalLength",l.oa,
"thumbnailShadowVerticalLength");this.D("selectedThumbnailShadowBlurRadius",l.oa,"thumbnailShadowBlurRadius");this.D("selectedThumbnailShadowSpread",l.oa,"thumbnailShadowSpread");this.D("selectedThumbnailShadowColor",l.oa,"thumbnailShadowColor");this.D("selectedThumbnailShadowOpacity",l.oa,"thumbnailShadowOpacity")};u.prototype.pZ=function(v){this.hV(v)};u.prototype.Kb=function(){t.prototype.Kb.call(this);this.Hf||(this.Hf=new q,this.mb(this.Hf),this.Hf.set("horizontalAlign",k.$e),this.Hf.set("verticalAlign",
k.$d),this.Hf.bind(g.ia,this.gla,this,!1));this.Za||(this.Za=new r,this.mb(this.Za))};u.prototype.xea=function(v){if(h.EA(v))return v;if(v&&v.ksa)return v.ksa};u.prototype.vea=function(v){if(v&&v.label)return v.label};u.prototype.Ux=function(){return this.Za&&this.Za.get("text")||t.prototype.Ux.call(this)};u.prototype.jb=function(){if(this.S("sourceProperties")||this.S("item")){for(;this.CG.length;)this.CG.pop().hF();var v=this.G("sourceProperties"),w=this.G("item");v&&w&&v.forEach(function(y){this.CG.push(n.jx(w,
y,this.Bia,this,!0))}.bind(this))}if(this.S("sourceProperties")||this.S("item")||this.S("tooltipFunction"))v=this.G("item"),v=this.G("tooltipFunction")(v),this.set("toolTip",v);if(this.S("sourceProperties")||this.S("item")||this.S("thumbnailUrlFunction"))v=this.G("item"),(v=this.G("thumbnailUrlFunction")(v))?this.Hf.get("url")!=v&&this.Hf.xa({url:v,visible:!0,opacity:.5}):this.Hf.xa({url:void 0,visible:!1}),this.$("thumbnailUrlFunction");if(this.S("sourceProperties")||this.S("item")||this.S("labelFunction"))v=
this.G("item"),v=this.G("labelFunction")(v),this.Za.xa({text:v,visible:v?!0:!1}),this.$("labelFunction");this.$("item");this.$("sourceProperties");if(this.S("labelPosition")||this.S("listLayout")||this.S("thumbnailWidth")||this.S("thumbnailHeight")){var x=this;v=function(y,z){y=x.G(y);return y!==void 0?y:z};switch(this.G("labelPosition")){case d.fb:case d.Db:this.set("layout",c.Mi);this.Za.set("width","100%");this.Hf.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth"),scaleMode:v("thumbnailScaleMode",
f.Pk)});break;default:this.set("layout",c.Uk),this.Za.set("width","100%"),this.Hf.xa({height:v("thumbnailHeight","100%"),width:v("thumbnailWidth","100%"),scaleMode:v("thumbnailScaleMode",f.Pk)})}switch(this.G("labelPosition")){case d.fb:case d.Tc:this.qr(this.Za,0);break;default:this.qr(this.Za,1)}this.$("labelPosition")}this.Oc(u.yca,u.jva,[this],!0,!0);this.Oc(u.Aca,u.mva,[this.Hf],!0,!0);this.Oc(u.zca,u.lva,[this.Za],!0,!0);t.prototype.jb.call(this)};u.prototype.Bia=function(){this.yD("item")};
u.prototype.sI=function(v){t.prototype.sI.call(this,v)};u.prototype.gla=function(){this.Hf.set("opacity",1)};u.jva={labelGap:"gap"};u.yca=Object.keys(u.jva);u.lva={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.zca=Object.keys(u.lva);u.mva={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.Aca=Object.keys(u.mva);return u}(p)});
define("tdv/view/list/thumbgrid/ThumbnailGrid","require exports tdv/events/Event tdv/view/constants/Alignment tdv/constants/EventName tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/constants/Position tdv/view/containers/Container tdv/view/list/thumbgrid/ThumbnailGridItem".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(f){function l(){var p=f.call(this)||this;p.Bn=!1;p.set("contentOpaque",!0);p.set("ariaRole","listbox");return p}P(l,f);l.prototype.Pb=function(){f.prototype.Pb.call(this);
this.m("layout",k.JB);this.m("selectedIndex",-1);this.m("items",[]);this.m("overflow",e.Vr);this.m("itemHorizontalAlign",n.$e);this.m("itemLabelFontFamily");this.m("itemLabelPosition",b.Gc);this.m("itemLabelFunction");this.m("itemLabelMaxWidth");this.m("itemLabelGap");this.m("itemLabelHorizontalAlign",n.$e);this.m("itemSourceProperties");this.m("itemThumbnailBorderRadius");this.m("itemThumbnailScaleMode");this.m("itemThumbnailWidth");this.m("itemThumbnailHeight");this.m("itemThumbnailMaxWidth");this.m("itemThumbnailMaxHeight");
this.m("itemThumbnailUrlFunction");this.m("itemTooltipFunction");this.m("itemVerticalAlign",n.$d);this.m("itemBackgroundOpacity");this.m("itemBackgroundBlur");this.m("itemBackgroundColor");this.m("itemBackgroundColorRatios");this.m("itemBackgroundColorDirection");this.m("itemBorderRadius");this.m("itemBorderTopRadius");this.m("itemBorderBottomRadius");this.m("itemBorderLeftRadius");this.m("itemBorderRightRadius");this.m("itemBorderTopLeftRadius");this.m("itemBorderTopRightRadius");this.m("itemBorderBottomLeftRadius");
this.m("itemBorderBottomRightRadius");this.m("itemBorderSize");this.m("itemBorderLeftSize");this.m("itemBorderTopSize");this.m("itemBorderRightSize");this.m("itemBorderBottomSize");this.m("itemBorderColor");this.m("itemBorderLeftColor");this.m("itemBorderTopColor");this.m("itemBorderRightColor");this.m("itemBorderBottomColor");this.m("itemLabelFontColor");this.m("itemLabelFontSize");this.m("itemLabelFontStyle");this.m("itemLabelFontWeight");this.m("itemLabelMaxWidth");this.m("itemLabelTextDecoration");
this.m("itemLabelTextShadowColor");this.m("itemLabelTextShadowHorizontalLength");this.m("itemLabelTextShadowVerticalLength");this.m("itemLabelTextShadowBlurRadius");this.m("itemLabelTextShadowOpacity");this.m("itemOpacity");this.m("itemPaddingLeft");this.m("itemPaddingTop");this.m("itemPaddingRight");this.m("itemPaddingBottom");this.m("itemShadow");this.m("itemThumbnailOpacity");this.m("itemThumbnailBorderSize");this.m("itemThumbnailBorderColor");this.m("itemThumbnailShadow");this.m("itemThumbnailShadowHorizontalLength");
this.m("itemThumbnailShadowVerticalLength");this.m("itemThumbnailShadowBlurRadius");this.m("itemThumbnailShadowSpread");this.m("itemThumbnailShadowColor");this.m("itemThumbnailShadowOpacity");this.m("rollOverItemBackgroundOpacity");this.m("rollOverItemBackgroundBlur");this.m("rollOverItemBackgroundColor");this.m("rollOverItemBackgroundColorRatios");this.m("rollOverItemBackgroundColorDirection");this.m("rollOverItemBorderRadius");this.m("rollOverItemBorderTopRadius");this.m("rollOverItemBorderBottomRadius");
this.m("rollOverItemBorderLeftRadius");this.m("rollOverItemBorderRightRadius");this.m("rollOverItemBorderTopLeftRadius");this.m("rollOverItemBorderTopRightRadius");this.m("rollOverItemBorderBottomLeftRadius");this.m("rollOverItemBorderBottomRightRadius");this.m("rollOverItemBorderSize");this.m("rollOverItemBorderLeftSize");this.m("rollOverItemBorderTopSize");this.m("rollOverItemBorderRightSize");this.m("rollOverItemBorderBottomSize");this.m("rollOverItemBorderColor");this.m("rollOverItemBorderLeftColor");
this.m("rollOverItemBorderTopColor");this.m("rollOverItemBorderRightColor");this.m("rollOverItemBorderBottomColor");this.m("rollOverItemLabelFontSize");this.m("rollOverItemLabelFontStyle");this.m("rollOverItemLabelFontWeight");this.m("rollOverItemLabelTextDecoration");this.m("rollOverItemLabelTextShadowColor");this.m("rollOverItemLabelTextShadowHorizontalLength");this.m("rollOverItemLabelTextShadowVerticalLength");this.m("rollOverItemLabelTextShadowBlurRadius");this.m("rollOverItemLabelTextShadowOpacity");
this.m("rollOverItemOpacity");this.m("rollOverItemPaddingLeft");this.m("rollOverItemPaddingTop");this.m("rollOverItemPaddingRight");this.m("rollOverItemPaddingBottom");this.m("rollOverItemShadow");this.m("rollOverItemThumbnailOpacity");this.m("rollOverItemThumbnailBorderSize");this.m("rollOverItemThumbnailBorderColor");this.m("rollOverItemThumbnailShadow");this.m("rollOverItemThumbnailShadowHorizontalLength");this.m("rollOverItemThumbnailShadowVerticalLength");this.m("rollOverItemThumbnailShadowBlurRadius");
this.m("rollOverItemThumbnailShadowSpread");this.m("rollOverItemThumbnailShadowColor");this.m("rollOverItemThumbnailShadowOpacity");this.m("selectedItemBackgroundOpacity");this.m("selectedItemBackgroundBlur");this.m("selectedItemBackgroundColor");this.m("selectedItemBackgroundColorRatios");this.m("selectedItemBackgroundColorDirection");this.m("selectedItemBorderRadius");this.m("selectedItemBorderTopRadius");this.m("selectedItemBorderBottomRadius");this.m("selectedItemBorderLeftRadius");this.m("selectedItemBorderRightRadius");
this.m("selectedItemBorderTopLeftRadius");this.m("selectedItemBorderTopRightRadius");this.m("selectedItemBorderBottomLeftRadius");this.m("selectedItemBorderBottomRightRadius");this.m("selectedItemBorderSize");this.m("selectedItemBorderLeftSize");this.m("selectedItemBorderTopSize");this.m("selectedItemBorderRightSize");this.m("selectedItemBorderBottomSize");this.m("selectedItemBorderColor");this.m("selectedItemBorderLeftColor");this.m("selectedItemBorderTopColor");this.m("selectedItemBorderRightColor");
this.m("selectedItemBorderBottomColor");this.m("selectedItemLabelFontSize");this.m("selectedItemLabelFontStyle");this.m("selectedItemLabelFontWeight");this.m("selectedItemLabelTextDecoration");this.m("selectedItemLabelTextShadowColor");this.m("selectedItemLabelTextShadowHorizontalLength");this.m("selectedItemLabelTextShadowVerticalLength");this.m("selectedItemLabelTextShadowBlurRadius");this.m("selectedItemLabelTextShadowOpacity");this.m("selectedItemOpacity");this.m("selectedItemPaddingLeft");this.m("selectedItemPaddingTop");
this.m("selectedItemPaddingRight");this.m("selectedItemPaddingBottom");this.m("selectedItemShadow");this.m("selectedItemThumbnailOpacity");this.m("selectedItemThumbnailBorderSize");this.m("selectedItemThumbnailBorderColor");this.m("selectedItemThumbnailShadow");this.m("selectedItemThumbnailShadowHorizontalLength");this.m("selectedItemThumbnailShadowVerticalLength");this.m("selectedItemThumbnailShadowBlurRadius");this.m("selectedItemThumbnailShadowSpread");this.m("selectedItemThumbnailShadowColor");
this.m("selectedItemThumbnailShadowOpacity")};l.prototype.SS=function(p){this.Bn=!0;this.set("selectedIndex",this.Sfa(p.source))};l.prototype.Sfa=function(p){for(var q=this.Cb(),r=0;r<q.length;r++)if(q[r]==p)return r;return-1};l.prototype.jb=function(){this.S("layout")&&this.G("layout")!=k.JB&&this.set("layout",k.JB);var p=!1;if(this.S("items")){p=!0;var q=this.G("items")||[],r=this.Cb();if(r.length<q.length){for(var t=r.length;t<q.length;t++)r=new d,r.bind(g.ma,this.SS,this,!1),this.Oc(l.bR,l.hG,
[r],!1,!1),this.Oc(l.cR,l.iG,[r],!1,!1),this.mb(r);r=this.Cb()}if(r.length>q.length){for(t=q.length;t<r.length;t++){var u=r[t];u.h(g.ma,this.SS,this);this.removeChild(u)}r=this.Cb()}for(t=0;t<q.length;t++)r[t].set("item",q[t]);this.$("items")}if(this.S("selectedIndex")||p){q=this.Cb();p=Math.min(q.length-1,Math.max(-1,this.G("selectedIndex")));this.set("selectedIndex",p);for(t=0;t<q.length;t++)q[t].pZ(t==p);this.$("selectedIndex");this.Bn&&(this.Bn=!1,this.o(new h(g.V)))}this.Oc(l.bR,l.hG,this.Cb(),
!0,!1);this.Oc(l.cR,l.iG,this.Cb(),!0,!0);f.prototype.jb.call(this)};l.hG={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",shadowBlurRadius:"shadowBlurRadius",shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};l.iG={itemHorizontalAlign:"horizontalAlign",itemLabelFunction:"labelFunction",itemLabelFontFamily:"labelFontFamily",itemLabelGap:"labelGap",itemLabelHorizontalAlign:"labelHorizontalAlign",itemLabelMaxWidth:"labelMaxWidth",
itemLabelPosition:"labelPosition",itemSourceProperties:"sourceProperties",itemThumbnailBorderRadius:"thumbnailBorderRadius",itemThumbnailScaleMode:"thumbnailScaleMode",itemThumbnailHeight:"thumbnailHeight",itemThumbnailWidth:"thumbnailWidth",itemThumbnailMaxHeight:"thumbnailMaxHeight",itemThumbnailMaxWidth:"thumbnailMaxWidth",itemThumbnailUrlFunction:"thumbnailUrlFunction",itemTooltipFunction:"tooltipFunction",itemVerticalAlign:"verticalAlign",itemBackgroundOpacity:"backgroundOpacity",itemBackgroundBlur:"backgroundBlur",
itemBackgroundColor:"backgroundColor",itemBackgroundColorRatios:"backgroundColorRatios",itemBackgroundColorDirection:"backgroundColorDirection",itemBorderRadius:"borderRadius",itemBorderTopRadius:"borderTopRadius",itemBorderBottomRadius:"borderBottomRadius",itemBorderLeftRadius:"borderLeftRadius",itemBorderRightRadius:"borderRightRadius",itemBorderTopLeftRadius:"borderTopLeftRadius",itemBorderTopRightRadius:"borderTopRightRadius",itemBorderBottomLeftRadius:"borderBottomLeftRadius",itemBorderBottomRightRadius:"borderBottomRightRadius",
itemBorderSize:"borderSize",itemBorderLeftSize:"borderLeftSize",itemBorderTopSize:"borderTopSize",itemBorderRightSize:"borderRightSize",itemBorderBottomSize:"borderBottomSize",itemBorderColor:"borderColor",itemBorderLeftColor:"borderLeftColor",itemBorderTopColor:"borderTopColor",itemBorderRightColor:"borderRightColor",itemBorderBottomColor:"borderBottomColor",itemLabelFontColor:"labelFontColor",itemLabelFontSize:"labelFontSize",itemLabelFontStyle:"labelFontStyle",itemLabelFontWeight:"labelFontWeight",
itemLabelTextDecoration:"labelTextDecoration",itemLabelTextShadowColor:"labelTextShadowColor",itemLabelTextShadowHorizontalLength:"labelTextShadowHorizontalLength",itemLabelTextShadowVerticalLength:"labelTextShadowVerticalLength",itemLabelTextShadowBlurRadius:"labelTextShadowBlurRadius",itemLabelTextShadowOpacity:"labelTextShadowOpacity",itemOpacity:"opacity",itemPaddingLeft:"paddingLeft",itemPaddingTop:"paddingTop",itemPaddingRight:"paddingRight",itemPaddingBottom:"paddingBottom",itemShadow:"shadow",
itemThumbnailOpacity:"thumbnailOpacity",itemThumbnailBorderSize:"thumbnailBorderSize",itemThumbnailBorderColor:"thumbnailBorderColor",itemThumbnailShadow:"thumbnailShadow",itemThumbnailShadowHorizontalLength:"thumbnailShadowHorizontalLength",itemThumbnailShadowVerticalLength:"thumbnailShadowVerticalLength",itemThumbnailShadowBlurRadius:"thumbnailShadowBlurRadius",itemThumbnailShadowSpread:"thumbnailShadowSpread",itemThumbnailShadowColor:"thumbnailShadowColor",itemThumbnailShadowOpacity:"thumbnailShadowOpacity",
rollOverItemBackgroundOpacity:"rollOverBackgroundOpacity",rollOverItemBackgroundBlur:"rollOverBackgroundBlur",rollOverItemBackgroundColor:"rollOverBackgroundColor",rollOverItemBackgroundColorRatios:"rollOverBackgroundColorRatios",rollOverItemBackgroundColorDirection:"rollOverBackgroundColorDirection",rollOverItemBorderRadius:"rollOverBorderRadius",rollOverItemBorderTopRadius:"rollOverBorderTopRadius",rollOverItemBorderBottomRadius:"rollOverBorderBottomRadius",rollOverItemBorderLeftRadius:"rollOverBorderLeftRadius",
rollOverItemBorderRightRadius:"rollOverBorderRightRadius",rollOverItemBorderTopLeftRadius:"rollOverBorderTopLeftRadius",rollOverItemBorderTopRightRadius:"rollOverBorderTopRightRadius",rollOverItemBorderBottomLeftRadius:"rollOverBorderBottomLeftRadius",rollOverItemBorderBottomRightRadius:"rollOverBorderBottomRightRadius",rollOverItemBorderSize:"rollOverBorderSize",rollOverItemBorderLeftSize:"rollOverBorderLeftSize",rollOverItemBorderTopSize:"rollOverBorderTopSize",rollOverItemBorderRightSize:"rollOverBorderRightSize",
rollOverItemBorderBottomSize:"rollOverBorderBottomSize",rollOverItemBorderColor:"rollOverBorderColor",rollOverItemBorderLeftColor:"rollOverBorderLeftColor",rollOverItemBorderTopColor:"rollOverBorderTopColor",rollOverItemBorderRightColor:"rollOverBorderRightColor",rollOverItemBorderBottomColor:"rollOverBorderBottomColor",rollOverItemLabelFontColor:"rollOverLabelFontColor",rollOverItemLabelFontSize:"rollOverLabelFontSize",rollOverItemLabelFontStyle:"rollOverLabelFontStyle",rollOverItemLabelFontWeight:"rollOverLabelFontWeight",
rollOverItemLabelTextDecoration:"rollOverLabelTextDecoration",rollOverItemLabelTextShadowColor:"rollOverLabelTextShadowColor",rollOverItemLabelTextShadowHorizontalLength:"rollOverLabelTextShadowHorizontalLength",rollOverItemLabelTextShadowVerticalLength:"rollOverLabelTextShadowVerticalLength",rollOverItemLabelTextShadowBlurRadius:"rollOverLabelTextShadowBlurRadius",rollOverItemLabelTextShadowOpacity:"rollOverLabelTextShadowOpacity",rollOverItemOpacity:"rollOverOpacity",rollOverItemPaddingLeft:"rollOverPaddingLeft",
rollOverItemPaddingTop:"rollOverPaddingTop",rollOverItemPaddingRight:"rollOverPaddingRight",rollOverItemPaddingBottom:"rollOverPaddingBottom",rollOverItemShadow:"rollOverShadow",rollOverItemThumbnailOpacity:"rollOverThumbnailOpacity",rollOverItemThumbnailBorderSize:"rollOverThumbnailBorderSize",rollOverItemThumbnailBorderColor:"rollOverThumbnailBorderColor",rollOverItemThumbnailShadow:"rollOverThumbnailShadow",rollOverItemThumbnailShadowHorizontalLength:"rollOverThumbnailShadowHorizontalLength",rollOverItemThumbnailShadowVerticalLength:"rollOverThumbnailShadowVerticalLength",
rollOverItemThumbnailShadowBlurRadius:"rollOverThumbnailShadowBlurRadius",rollOverItemThumbnailShadowSpread:"rollOverThumbnailShadowSpread",rollOverItemThumbnailShadowColor:"rollOverThumbnailShadowColor",rollOverItemThumbnailShadowOpacity:"rollOverThumbnailShadowOpacity",selectedItemBackgroundOpacity:"selectedBackgroundOpacity",selectedItemBackgroundBlur:"selectedBackgroundBlur",selectedItemBackgroundColor:"selectedBackgroundColor",selectedItemBackgroundColorRatios:"selectedBackgroundColorRatios",
selectedItemBackgroundColorDirection:"selectedBackgroundColorDirection",selectedItemBorderRadius:"selectedBorderRadius",selectedItemBorderTopRadius:"selectedBorderTopRadius",selectedItemBorderBottomRadius:"selectedBorderBottomRadius",selectedItemBorderLeftRadius:"selectedBorderLeftRadius",selectedItemBorderRightRadius:"selectedBorderRightRadius",selectedItemBorderTopLeftRadius:"selectedBorderTopLeftRadius",selectedItemBorderTopRightRadius:"selectedBorderTopRightRadius",selectedItemBorderBottomLeftRadius:"selectedBorderBottomLeftRadius",
selectedItemBorderBottomRightRadius:"selectedBorderBottomRightRadius",selectedItemBorderSize:"selectedBorderSize",selectedItemBorderLeftSize:"selectedBorderLeftSize",selectedItemBorderTopSize:"selectedBorderTopSize",selectedItemBorderRightSize:"selectedBorderRightSize",selectedItemBorderBottomSize:"selectedBorderBottomSize",selectedItemBorderColor:"selectedBorderColor",selectedItemBorderLeftColor:"selectedBorderLeftColor",selectedItemBorderTopColor:"selectedBorderTopColor",selectedItemBorderRightColor:"selectedBorderRightColor",
selectedItemBorderBottomColor:"selectedBorderBottomColor",selectedItemLabelFontColor:"selectedLabelFontColor",selectedItemLabelFontSize:"selectedLabelFontSize",selectedItemLabelFontStyle:"selectedLabelFontStyle",selectedItemLabelFontWeight:"selectedLabelFontWeight",selectedItemLabelTextDecoration:"selectedLabelTextDecoration",selectedItemLabelTextShadowColor:"selectedLabelTextShadowColor",selectedItemLabelTextShadowHorizontalLength:"selectedLabelTextShadowHorizontalLength",selectedItemLabelTextShadowVerticalLength:"selectedLabelTextShadowVerticalLength",
selectedItemLabelTextShadowBlurRadius:"selectedLabelTextShadowBlurRadius",selectedItemLabelTextShadowOpacity:"selectedLabelTextShadowOpacity",selectedItemOpacity:"selectedOpacity",selectedItemPaddingLeft:"selectedPaddingLeft",selectedItemPaddingTop:"selectedPaddingTop",selectedItemPaddingRight:"selectedPaddingRight",selectedItemPaddingBottom:"selectedPaddingBottom",selectedItemShadow:"selectedShadow",selectedItemThumbnailOpacity:"selectedThumbnailOpacity",selectedItemThumbnailBorderSize:"selectedThumbnailBorderSize",
selectedItemThumbnailBorderColor:"selectedThumbnailBorderColor",selectedItemThumbnailShadow:"selectedThumbnailShadow",selectedItemThumbnailShadowHorizontalLength:"selectedThumbnailShadowHorizontalLength",selectedItemThumbnailShadowVerticalLength:"selectedThumbnailShadowVerticalLength",selectedItemThumbnailShadowBlurRadius:"selectedThumbnailShadowBlurRadius",selectedItemThumbnailShadowSpread:"selectedThumbnailShadowSpread",selectedItemThumbnailShadowColor:"selectedThumbnailShadowColor",selectedItemThumbnailShadowOpacity:"selectedThumbnailShadowOpacity",
tabIndex:"tabIndex",toolTipBackgroundColor:"toolTipBackgroundColor",toolTipBackgroundOpacity:"toolTipBackgroundOpacity",toolTipBorderRadius:"toolTipBorderRadius",toolTipBorderColor:"toolTipBorderColor",toolTipBorderSize:"toolTipBorderSize",toolTipDisplayTime:"toolTipDisplayTime",toolTipFontFamily:"toolTipFontFamily",toolTipFontSize:"toolTipFontSize",toolTipFontColor:"toolTipFontColor",toolTipFontWeight:"toolTipFontWeight",toolTipFontStyle:"toolTipFontStyle",toolTipPaddingBottom:"toolTipPaddingBottom",
toolTipPaddingLeft:"toolTipPaddingLeft",toolTipPaddingTop:"toolTipPaddingTop",toolTipPaddingRight:"toolTipPaddingRight",toolTipShadowBlurRadius:"toolTipShadowBlurRadius",toolTipShadowColor:"toolTipShadowColor",toolTipShadowHorizontalLength:"toolTipShadowHorizontalLength",toolTipShadowOpacity:"toolTipShadowOpacity",toolTipShadowSpread:"toolTipShadowSpread",toolTipShadowVerticalLength:"toolTipShadowVerticalLength",toolTipOpacity:"toolTipOpacity",toolTipTextShadowBlurRadius:"toolTipTextShadowBlurRadius",
toolTipTextShadowColor:"toolTipTextShadowColor",toolTipTextShadowHorizontalLength:"toolTipTextShadowHorizontalLength",toolTipTextShadowOpacity:"toolTipTextShadowOpacity",toolTipTextShadowVerticalLength:"toolTipTextShadowVerticalLength"};l.bR=Object.keys(l.hG);l.cR=Object.keys(l.iG);return l}(c)});
define("tdv/view/core/eventmanager/mousetouch/MouseTouchEventManagerFactory","require exports tdv/view/core/eventmanager/mousetouch/CloseButtonMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/DropDownMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/MouseTouchEventManager tdv/view/core/eventmanager/mousetouch/HTMLMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/IconButtonMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ScrollableContainerMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ThumbnailListMouseTouchEventManager tdv/view/core/eventmanager/mousetouch/ThumbnailGridMouseTouchEventManager tdv/view/buttons/CloseButton tdv/view/list/dropdown/DropDown tdv/view/core/UIComponent tdv/view/html/HTML tdv/view/buttons/IconButton tdv/view/containers/ScrollableContainer tdv/view/list/thumblist/ThumbnailList tdv/view/list/thumbgrid/ThumbnailGrid".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t,u,v){return function(){function w(){}w.prototype.create=function(x){if(x instanceof l)return new n(x);if(x instanceof v)return new d(x);if(x instanceof u)return new c(x);if(x instanceof f)return new h(x);if(x instanceof r)return new e(x);if(x instanceof q)return new k(x);if(x instanceof t)return new b(x);if(x instanceof p)return new g(x);throw Error("Invalid UI instance");};w.tJ=function(){w.Qo||(w.Qo=new w);return w.Qo};return w}()});
define("tdv/view/containers/Application","require exports tdv/utils tdv/constants/EventName tdv/view/containers/Container tdv/view/core/ContextMenu tdv/view/core/Cursors tdv/view/core/ToolTip tdv/view/lifecycle/LifeCycleManager tdv/view/util/Fullscreen tdv/player/view/util/Device tdv/view/util/UserInitiatedAction tdv/view/util/KeyboardControl tdv/view/events/MouseEvent tdv/view/core/visuals/dom/DOMVisualsFactory tdv/view/core/eventmanager/mousetouch/MouseTouchEventManagerFactory".split(" "),function(a,
m,h,n,g,k,e,b,c,d,f,l,p,q,r,t){return function(u){function v(w,x){var y=u.call(this)||this;y.v1=y.v1.bind(y);y.u1=y.u1.bind(y);y.f3=y.f3.bind(y);y.GM=new c;y.uea=new e(y);y.co(y,r.tJ(),t.tJ(),[]);y.gf("Application");y.Mc=w;y.g6=x;y.Mc.style.overflow="hidden";y.Mc.style.userSelect="none";y.Mc.style["-webkit-user-select"]="none";y.Mc.style.touchAction="none";y.Mc.style.visibility="visible";y.Mc.style["-webkit-tap-highlight-color"]="rgba(255, 255, 255, 0)";y.Kd=document.createElement("div");y.Kd.style.position=
"absolute";y.Kd.style.left="0";y.Kd.style.top="0";y.Kd.style.right="0";y.Kd.style.bottom="0";y.Kd.style.width="auto";y.Kd.style.height="auto";y.Kd.style.margin="0";y.Mc.appendChild(y.Kd);y.Kd.appendChild(y.wa().cc());y.Og=void 0;y.Ng=void 0;y.v3a=10;y.cZa=500;y.UU=null;y.jc=new b(y);y.wa().cc().appendChild(y.jc.cc());y.t0=new k(y,y.wya.bind(y));y.t0.bind(n.Wr,l.Ar(y.f3),y,!0);y.Rha=!0;y.set("contentOpaque",!0);y.hy=null;y.AR=[];document.addEventListener("mousemove",y.u1);window.addEventListener("mouseout",
y.u1);y.jYa();y.n6=0;y.m6=0;y.fD=1;try{y.n6=window.top.innerWidth,y.m6=window.top.innerHeight,y.iga=!0}catch(z){y.iga=!1}y.qHa();y.kk=new d(w);y.kk.bind(n.V,function(){this.zfa(this.kk.enabled())},y);p.Wa();return y}P(v,u);v.prototype.start=function(){this.Xs||(this.Xs=!0,this.o(n.Up))};v.prototype.kpa=function(){return this.Xs};v.prototype.wa=function(){return u.prototype.wa.call(this)};v.prototype.qHa=function(){this.iga&&!d.enabled()&&(this.n6=window.top.innerWidth,this.m6=window.top.innerHeight)};
v.prototype.clear=function(){var w,x;this.PE(null);this.LFa();this.l0a();this.GM.clear();var y=this.wa().cc();(w=y.parentElement)===null||w===void 0||w.removeChild(y);(x=this.Kd.parentElement)===null||x===void 0||x.removeChild(this.Kd);this.uea=null;this.kk.rsa();this.kk=null;this.t0&&(this.t0.clear(),this.t0=null)};v.prototype.alb=function(w){this.Rha=w};v.prototype.zfa=function(w){w?this.IEa():this.nZa()};v.prototype.Zy=function(){this.iT=this.cn=this.Kd.clientWidth||0;this.hT=this.bn=this.Kd.clientHeight||
0};v.prototype.PE=function(w){if(this.hy!=w){this.hy&&this.hy.get("id");this.hy!=null&&this.hy.o(new q(n.Pr));this.hy=w;for(var x=[];w!=null;)x=[w].concat(x),w=w.getParent();w=this.AR.length-1;for(var y=!0;w>=0&&y;w--)x.includes(this.AR[w])?y=!1:this.AR[w].o(new q(n.Eb));for(w=0;w<x.length;w++)this.AR.includes(x[w])||x[w].o(new q(n.uc));this.AR=x;this.hy!=null&&this.hy.o(new q(n.SF));this.jc.PE(this.hy)}};v.prototype.u1=function(w){var x=h.offset(this.wa().cc());this.N3a(w,w.pageX-x.left,w.pageY-
x.top)?w.preventDefault():this.PE(null)};v.prototype.wya=function(){return[]};v.prototype.f3=function(){};v.prototype.N3a=function(w,x,y){return this.H3a(w.target)&&x>=0&&y>=0&&x<this.nb()&&y<this.Mb()};v.prototype.H3a=function(w){if(!this.Mc)return!1;for(;w;){if(w===this.Mc)return!0;w=w.parentElement}return!1};v.prototype.jYa=function(){window.addEventListener("resize",this.v1);this.Fda=setInterval(function(){this.Ewa()}.bind(this),this.cZa)};v.prototype.l0a=function(){window.removeEventListener("resize",
this.v1);this.Fda&&(clearInterval(this.Fda),this.Fda=null)};v.prototype.Ewa=function(){this.kk.enabled()?this.IEa():this.qHa();var w=this.Kd.clientWidth,x=this.Kd.clientHeight;if(this.Og!=w||this.Ng!=x)this.Og=w,this.Ng=x,this.L9a()};v.prototype.IEa=function(){if(this.iga&&(f.Nd()==f.uB&&f.Yb()==f.Pp||f.Nd()==f.vj)){var w=d.fullscreenElement(),x=w.clientWidth;w=w.clientHeight;var y=(x>w?x:w)/(this.n6>this.m6?this.n6:this.m6),z=Math.round(x/y),A=Math.round(w/y);this.fD=y;this.Kd.style.left=Math.round((x-
z)*.5)+"px";this.Kd.style.top=Math.round((w-A)*.5)+"px";this.Kd.style.right="auto";this.Kd.style.bottom="auto";this.Kd.style.width=z+"px";this.Kd.style.height=A+"px";this.Kd.style.transform="scale("+[y,y].join(", ")+")";this.Kd.style.position="absolute"}else x=document.body.clientWidth,w=document.body.clientHeight,this.Kd.style.left="0",this.Kd.style.top="0",this.Kd.style.right="auto",this.Kd.style.bottom="auto",this.Kd.style.width=x+"px",this.Kd.style.height=w+"px",this.fD=1};v.prototype.nZa=function(){this.Kd.style.position=
"absolute";this.Kd.style.left="0";this.Kd.style.top="0";this.Kd.style.right="0";this.Kd.style.bottom="0";this.Kd.style.width="auto";this.Kd.style.height="auto";this.Kd.style.transform="";this.fD=1};v.prototype.L9a=function(){this.LFa();var w=this;this.UU=setTimeout(function(){w.UU=null;w.lc()},this.v3a)};v.prototype.LFa=function(){this.UU&&(clearTimeout(this.UU),this.UU=null)};v.prototype.v1=function(){this.Ewa()};return v}(g)});
define("tdv/view/containers/XRPanels",["require","exports","tdv/constants/EventName","tdv/player/view/util/XR","tdv/binding/BindingsHandler"],function(a,m,h,n,g){return function(){function k(e){this.dg=e;this.IK=this.IK.bind(this);this.yQ=[];this.Nma=[];n.M.bind(h.V,this.Ta,this,!0);this.IK()}k.prototype.dispose=function(){n.M.h(h.V,this.Ta,this);this.set([])};k.prototype.set=function(e){var b=this,c=e.filter(function(f){return!b.yQ.includes(f)}),d=this.yQ.filter(function(f){return!e.includes(f)});
c.forEach(function(f){f.Yqa(b.dg);b.bcb(f)});d.forEach(function(f){f.Yqa(null);b.Kjb(f);f.Fna()});this.yQ=e;this.IK()};k.prototype.get=function(){return this.yQ};k.prototype.bcb=function(e){g.ba(e,["modal","content.visible"],this.IK,!1)};k.prototype.Kjb=function(e){g.da(e,["modal","content.visible"],this.IK)};k.prototype.Ta=function(){this.IK()};k.prototype.IK=function(){function e(l){return l.get("modal")&&(l.get("content")?l.get("content").get("visible"):!1)}var b=this,c=[];if(n.isPresenting){var d=
this.yQ.filter(function(l){return e(l)}),f=this.yQ.filter(function(l){return!e(l)});c=d.length>0?[d[d.length-1]]:f}c.filter(function(l){return!b.Nma.includes(l)}).forEach(function(l){return l.OJa()});this.Nma.filter(function(l){return!c.includes(l)}).forEach(function(l){return l.Fna()});this.Nma=c};return k}()});
define("tdv/view/util/Orientation","require exports tdv/view/core/ZIndex tdv/view/util/Assets tdv/view/util/Fullscreen tdv/constants/EventName tdv/events/EventDispatcher tdv/player/l10n tdv/player/view/util/Device".split(" "),function(a,m,h,n,g,k,e,b,c){function d(){q=TDV.qb.Ft();var v=p||q;l!=v&&(l=v,f.o(k.V));v=!!p&&q!=p&&c.ub();r!=v&&(t||(t=document.createElement("div"),t.style.position="fixed",t.style.zIndex=h.MUa.toString(),t.style.left="0",t.style.top="0",t.style.margin="0",t.style.padding=
"0",t.style.height="100%",t.style.width="100%",t.style.backgroundColor="rgba(255, 255, 255, 0.99)",t.innerHTML=['<div style="box-sizing:border-box; padding:0 10vmin; display:table; height:100%; width:100vw;">\n<div style="vertical-align:middle; text-align:center; display:table-cell;">','<img style="width:22vmin" src="'+n.z_+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+b("rotate-device")+"</div>",
"</div>\n</div>"].join("\n"),u=t.querySelector("img")),r&&t.parentElement.removeChild(t),(r=v)&&(g.enabled()?g.fullscreenElement():document.body).appendChild(t));r&&(u.style.transform=l==f.JVa?"translate(-11%, 0) rotate(-90deg)":"none")}var f=new e;f.Iob=TDV.qb.Vba;f.JVa=TDV.qb.Wba;f.Uw=function(v){p!=v&&(p=v,d())};f.qLa=function(){return p};f.get=function(){return l};var l=void 0,p=void 0,q=void 0,r=!1,t=null,u=null;window.addEventListener("resize",function(){d();setTimeout(d,500)},!0);try{window.screen.orientation.addEventListener("change",
d)}catch(v){window.addEventListener("orientationchange",d,!1)}d();return f});
define("tdv/player/script/Player","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/player/constants/RotationMode tdv/player/parser/ClassInfo tdv/player/AppInfo tdv/player/l10n tdv/player/script/helper/ButtonProperty tdv/player/view/AcademicWatermark tdv/player/view/CookiesBar tdv/player/view/DownloadBar tdv/player/view/MessageWindow tdv/player/view/UserInteractionWindow tdv/player/view/panorama/renderer/Renderer tdv/player/view/panorama/renderer/3d/util/TextureUtil tdv/player/view/util/Capabilities tdv/player/view/util/Device tdv/player/view/util/Gyroscope tdv/player/view/util/Installer tdv/player/view/util/LibsLoader tdv/player/view/util/Preloader tdv/player/view/util/URL tdv/player/view/util/XR tdv/view/constants/ButtonMode tdv/view/containers/Application tdv/view/containers/Container tdv/view/containers/XRPanels tdv/view/containers/layout/VerticalLayout tdv/view/util/Fullscreen tdv/view/util/AudioActivation tdv/view/util/Orientation tdv/view/util/UserInitiatedAction tdv/util/Storage".split(" "),function(a){var m=
a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/constants/RotationMode"),k=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/AppInfo"),b=a("tdv/player/l10n"),c=a("tdv/player/script/helper/ButtonProperty"),d=a("tdv/player/view/AcademicWatermark"),f=a("tdv/player/view/CookiesBar"),l=a("tdv/player/view/DownloadBar"),p=a("tdv/player/view/MessageWindow"),q=a("tdv/player/view/UserInteractionWindow");a("tdv/player/view/panorama/renderer/Renderer");var r=a("tdv/player/view/panorama/renderer/3d/util/TextureUtil"),
t=a("tdv/player/view/util/Capabilities"),u=a("tdv/player/view/util/Device"),v=a("tdv/player/view/util/Gyroscope"),w=a("tdv/player/view/util/Installer"),x=a("tdv/player/view/util/LibsLoader"),y=a("tdv/player/view/util/Preloader"),z=a("tdv/player/view/util/URL"),A=a("tdv/player/view/util/XR"),D=a("tdv/view/constants/ButtonMode"),F=a("tdv/view/containers/Application"),C=a("tdv/view/containers/Container"),B=a("tdv/view/containers/XRPanels"),H=a("tdv/view/containers/layout/VerticalLayout"),E=a("tdv/view/util/Fullscreen"),
G=a("tdv/view/util/AudioActivation"),N=a("tdv/view/util/Orientation"),O=a("tdv/view/util/UserInitiatedAction"),R=a("tdv/util/Storage"),Q=k.define("Player",F,function(){F.apply(this,arguments);this.fh=new w(this);this.Hxa=new l(this,this.fh);this.Qu=new C;this.Qu.xa({backgroundOpacity:0,visible:!0,width:"100%",height:"100%"});this.MM=new p;this.fO=new q;this.y0=new f(this);new d(this);this.wbb=new B(this);this.Hma=[];var T=new H;T.K$(0);this.aZ(T);this.ig(!0);this.bind(h.L("settings"),this.G5a,this,
!0);this.i6=TDV.qb.WLa();N.bind(h.V,this.p5a,this,!0);G.Omb();this.LYa=new c(this,"buttonMute",D.af);this.LYa.bind(h.ma,this.hCa,this,!0);this.TYa=new c(this,"buttonUnmute",D.af);this.TYa.bind(h.ma,this.WCa,this,!0);this.a0=new c(this,"buttonToggleMute",D.ak);this.a0.bind(h.Rk,this.hCa,this,!0);this.a0.bind(h.Lm,this.WCa,this,!0);this.bind(h.L("mute"),this.m5a,this);this.a0.set("pressed",this.get("mute"));this.JYa=new c(this,"buttonEnterFullscreen",D.af);this.JYa.bind(h.ma,this.xBa,this,!0);this.KYa=
new c(this,"buttonExitFullscreen",D.af);this.KYa.bind(h.ma,this.yBa,this,!0);this.X_=new c(this,"buttonToggleFullscreen",D.ak);this.X_.bind(h.Rk,this.xBa,this,!0);this.X_.bind(h.Lm,this.yBa,this,!0);this.X_.set("pressed",this.get("fullscreenEnabled"));this.bind(h.L("fullscreenEnabled"),this.V4a,this,!0);this.set("fullscreenEnabled",this.kk.enabled());this.set("defaultMenu",["fullscreen","mute","rotation"]);this.bind(h.Up,this.J5a,this,!0);[h.Sa,h.$a,h.Qk,h.HB,h.XK].forEach(function(Y){this.bind(Y,
function(aa){this.o(new n(h.cG,{jQ:aa}))},this,!0)}.bind(this));["keydown","keyup"].forEach(function(Y){document.addEventListener(Y,function(aa){this.o(new n(h.cG,{jQ:aa}))}.bind(this))}.bind(this));A.M.bind(h.V,function(){A.isPresenting?N.Uw():N.Uw(F.prototype.get.call(this,"lockedOrientation"))},this);this.kk.bind(h.V,function(){var Y=N.qLa();N.Uw();N.Uw(Y)},this)});Q.CUa="orientationChange";Q.prototype.logCapabilities=function(){this.k4a()};Q.prototype.activateAudio=function(T){this.VWa(T)};Q.prototype.zfa=
function(T){F.prototype.zfa.apply(this,arguments);this.set("fullscreenEnabled",T)};Q.prototype.Pb=function(){F.prototype.Pb.call(this);this.m("mute",!1);this.m("fullscreenEnabled",!1)};Q.prototype.Kb=function(){F.prototype.Kb.call(this);this.Hxa.getParent()!=this&&this.mb(this.Hxa);this.Qu.getParent()!=this&&(this.mb(this.Qu),this.Qu.mb(this.y0),this.Qu.mb(this.MM),this.Qu.mb(this.fO))};Q.prototype.r7a=function(T){var Y=[];this.MM&&Y.push(this.MM);this.fO&&Y.push(this.fO);this.y0&&Y.push(this.y0);
for(var aa=!0,ba=0;ba<=Y.length&&aa;ba++)aa=T.length-(Y.length-ba)==T.indexOf(Y[ba]);return aa?T:T.filter(function(ea){return Y.indexOf(ea)<0}).concat(Y)};Q.prototype.jb=function(){this.SDa||(this.SDa=m.difference(this.p2a(),"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.SDa,{},[this.Qu],!0,!0);F.prototype.jb.call(this);
this.zpb===!0&&this.xpb()};Q.prototype.set=function(T,Y){switch(T){case "children":this.Qu.set(T,this.r7a(Y));return;case "creationPolicy":this.Qu.set(T,Y);return;case "fullscreenAvailable":case "gyroscopeAvailable":case "cardboardAvailable":case "isMobile":case "orientation":case "surfaceSelectionAvailable":case "touchEnabled":case "touchDevice":case "vrControllerAvailable":case "vrAvailable":Y=this.get(T);break;case "fullscreenEnabled":Y=this.kk.ol()&&Y;break;case "fullscreenFallback":E.dra(Y);
break;case "lockedOrientation":u.kf()&&(Y=void 0);N.Uw(Y);break;case "installAvailable":Y=this.fh.ready();break;case "mouseWheelEnabled":this.alb(z.Tg("mousewheelenabled",Y));break;case "backgroundPreloadEnabled":this.J7a(Y);break;case "vrPolyfillScale":A.R9=Y;break;case "desktopMipmappingEnabled":r.nkb(Y);break;case "mobileMipmappingEnabled":r.Zkb(Y);break;case "defaultVRPointer":Y=="gaze"?A.JRa(A.qua.PF):A.JRa(A.qua.QF);break;case "xrPanels":this.Hma=Y;this.tHa();break;case "xrPanelsEnabled":this.NHa=
this.g6&&Y,this.tHa()}F.prototype.set.call(this,T,Y)};Q.prototype.get=function(T,Y){switch(T){case "children":case "creationPolicy":return this.Qu.get(T,Y);case "touchEnabled":return u.Jp();case "touchDevice":return u.msa();case "isMobile":return u.ub();case "orientation":return N.get();case "lockedOrientation":return N.qLa();case "gyroscopeAvailable":return v.ol;case "cardboardAvailable":case "vrAvailable":return A.wQ;case "arAvailable":return A.mIa;case "vrControllerAvailable":return A.tob;case "fullscreenAvailable":return this.kk.ol();
case "vrPolyfillScale":return A.R9;case "installAvailable":return this.fh.ready();case "surfaceSelectionAvailable":return!0;case "pageScale":return this.fD;case "xrPanels":return this.Hma;case "xrPanelsEnabled":return this.NHa;case L:case U:return this.g6?F.prototype.get.apply(this,arguments):!0;default:return F.prototype.get.apply(this,arguments)}};Q.prototype.tHa=function(){this.wbb.set(this.NHa?this.Hma.slice():[])};Q.prototype.hCa=function(){this.set("mute",!0)};Q.prototype.WCa=function(){this.set("mute",
!1)};Q.prototype.m5a=function(){this.a0.set("pressed",this.get("mute"))};Q.prototype.xBa=function(){this.set("fullscreenEnabled",!0)};Q.prototype.yBa=function(){this.set("fullscreenEnabled",!1)};Q.prototype.V4a=function(){this.get("fullscreenEnabled")?this.kk.wt():this.kk.qm();this.X_.set("pressed",this.get("fullscreenEnabled"));this.set("fullscreenEnabled",this.kk.enabled())};Q.prototype.G5a=function(){var T=this.get("settings");T&&(x.initialize(T),y.zra(T),THREE.Ysa=T.get(TDV.PlayerSettings.Gaa),
THREE.gta=T.get(TDV.PlayerSettings.Xaa),THREE.YB=T.get(TDV.PlayerSettings.YB),this.fh.zra(T))};Q.prototype.J7a=function(T){y.enabled(T)};Q.prototype.wya=function(){var T=[];this.QL=[];(this.get("menu")||[]).forEach(function(ba){var ea=ba.get("label");T.push(ba.get("label"));ea&&this.QL.push(function(){ba.o("click")})}.bind(this));var Y=this.get("defaultMenu",[]);if(Y.indexOf("rotation")>=0){var aa=this.Ci("PanoramaPlayer");aa.length&&(T.push(aa[0].get("mouseControlMode")==g.uF?b("change-to-drag-and-release"):
b("change-to-click-and-move")),this.QL.push(this.t$a.bind(this)))}Y.indexOf("fullscreen")>=0&&this.kk.ol()&&(T.push(this.kk.enabled()?b("exit-fullscreen"):b("enter-fullscreen")),this.QL.push(this.r$a.bind(this)));Y.indexOf("mute")>=0&&(T.push(this.get("mute")?b("unmute"):b("mute")),this.QL.push(this.s$a.bind(this)));Y=[].concat(e.name?[e.name]:[],e.aeb!="false"?e.VX?["v:"+e.VX+"."+e.aY]:["v:"+e.aY]:[]).join(" ");Y!=""&&(T.length>0&&T.push(""),T.push(Y),this.QL.push(this.X5a.bind(this)));return T};
Q.prototype.f3=function(T){this.QL[T.data.index]()};Q.prototype.t$a=function(){var T=this.Ci("PanoramaPlayer"),Y=T[0].get("mouseControlMode")==g.uF?g.tx:g.uF;T.forEach(function(aa){R.setItem(K,Y);aa.set("mouseControlMode",Y)})};Q.prototype.J5a=function(){R.getItem(K)==g.tx&&this.Ci("PanoramaPlayer").forEach(function(T){T.set("mouseControlMode",g.tx)});z.Ak("mute")&&this.set("mute",z.Tg("mute",this.get("mute")))};Q.prototype.r$a=function(){this.kk.toggle()};Q.prototype.s$a=function(){this.set("mute",
!this.get("mute"))};Q.prototype.X5a=function(){e.GTa&&window.open(e.GTa,"_blank")};Q.prototype.p5a=function(){this.o(Q.CUa)};Q.prototype.k4a=function(){m.seb(!0);m.log("UA: "+navigator.userAgent);m.log("screen: ("+Math.max(window.screen.width,window.screen.height)+", "+Math.min(window.screen.width,window.screen.height)+") dpr: "+window.devicePixelRatio+" ("+Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio+", "+Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio+
")");u.log();t.log();b.log();A.log()};Q.prototype.VWa=function(T){G.active()?O.wait(T):(G.Qsa(T),G.request(this))};var K="tdvp_"+window.location.pathname+"_rotation_mode",L=[119,97,116,101,114,109,97,114,107].map(function(T){return String.fromCharCode(T)}).join(""),U=[97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107].map(function(T){return String.fromCharCode(T)}).join("");return Q});
define("tdv/player/script/PlayerMenuItem",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("PlayerMenuItem",m,function(){m.call(this)})});
define("tdv/player/script/PopupPanoramaOverlay","require tdv/utils tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){a("tdv/utils");var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/helper/PlaybackPositionHelper");a=g.define("PopupPanoramaOverlay",m,function(){m.call(this);
this.set("state",n.ca);this.bind(h.L("state"),function(){this.o(h.Pd)},this,!0);this.Gd=void 0});a.prototype.show=function(){this.set("visible",!0)};a.prototype.oe=function(){this.set("visible",!1)};a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=function(){this.set("state",n.hL)};a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.hide=a.prototype.oe;a.prototype.pause=a.prototype.pause;a.prototype.play=a.prototype.play;a.prototype.show=a.prototype.show;a.prototype.stop=
a.prototype.stop;a.prototype.get=function(e,b){switch(e){case "playbackPositions":return this.Gd===void 0&&(this.Gd=k.Lfb(this)),this.Gd}return m.prototype.get.call(this,e,b)};a.prototype.set=function(e,b){var c=!1;switch(e){case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "rotationZ":case "yaw":case "playbackPositions":this.Gd=void 0,c=!0}m.prototype.set.call(this,e,b);c&&e!="playbackPositions"&&this.o(h.L("playbackPositions"))};return a});
define("tdv/player/script/ProgressBar",["require","tdv/player/view/ProgressBar","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/view/ProgressBar");return a("tdv/player/parser/ClassInfo").define("ProgressBar",m,function(){m.call(this)})});
define("tdv/player/script/QuadFramePanoramaOverlay",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("QuadFramePanoramaOverlay",m,function(){m.call(this);this.Gd=void 0});a.prototype.set=function(k,e){var b=!1;switch(k){case "vertices":case "playbackPositions":this.Gd=
void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===void 0&&(this.Gd=g.Foa(this)),this.Gd}return m.prototype.get.call(this,k,e)};return a});
define("tdv/player/script/QuadHotspotPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlay");return m.define("QuadHotspotPanoramaOverlay",h,function(){h.call(this)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayArea",["require","tdv/player/parser/ClassInfo","tdv/player/script/HotspotPanoramaOverlayArea"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/HotspotPanoramaOverlayArea");return m.define("QuadHotspotPanoramaOverlayArea",h,function(){h.apply(this,arguments)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayImageBase",["require","tdv/binding/Bindable","tdv/constants/EventName","tdv/player/parser/ClassInfo","tdv/player/script/helper/PlaybackPositionHelper"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/PlaybackPositionHelper");a=n.define("QuadHotspotPanoramaOverlayImageBase",m,function(){m.call(this);this.Gd=void 0});a.prototype.get=function(k,e){switch(k){case "playbackPositions":return this.Gd===
void 0&&(this.Gd=g.Foa(this)),this.Gd}return m.prototype.get.call(this,k,e)};a.prototype.set=function(k,e){var b=!1;switch(k){case "opacity":case "distance":case "vertices":case "playbackPositions":this.Gd=void 0,b=!0}m.prototype.set.call(this,k,e);b&&k!="playbackPositions"&&this.o(h.L("playbackPositions"))};return a});
define("tdv/player/script/QuadHotspotPanoramaOverlayImage",["require","tdv/player/parser/ClassInfo","tdv/player/script/QuadHotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");return m.define("QuadHotspotPanoramaOverlayImage",h,function(){h.call(this)})});
define("tdv/player/script/QuadHotspotPanoramaOverlayMap",["require","tdv/player/parser/ClassInfo","tdv/player/script/QuadHotspotPanoramaOverlayImageBase"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");return m.define("QuadHotspotPanoramaOverlayMap",h,function(){h.call(this)})});
define("tdv/player/script/QuadVideoPanoramaOverlay","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/script/helper/PlaybackPositionHelper");a=k.define("QuadVideoPanoramaOverlay",
m,function(){m.call(this);this.Gd=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",n.Zb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.set=function(b,c){var d=!1;switch(b){case "state":var f=this.get("state")||n.ca;f==n.ca&&c==n.PLAYING&&this.o(h.Up);f!=c&&this.o(new g(h.Pd,{oldState:f,state:c}));break;case "enabledInCardboard":this.set("enabledInVR",c);break;case "distance":case "opacity":case "playbackPositions":case "vertices":this.Gd=
void 0,d=!0}m.prototype.set.call(this,b,c);d&&b!="playbackPositions"&&this.o(h.L("playbackPositions"))};a.prototype.get=function(b,c){switch(b){case "playbackPositions":return this.Gd===void 0&&(this.Gd=e.Foa(this)),this.Gd}return m.prototype.get.call(this,b,c)};return a});
define("tdv/player/script/RadialModel3DDisplayEffect",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RadialModel3DDisplayEffect",m,function(){m.call(this)})});
define("tdv/player/script/RainPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("RainPanoramaOverlay",m,function(){m.call(this)});a.prototype.get=function(h,n){h=="startState"&&n===void 0&&(n=this.get("initialState"));return m.prototype.get.call(this,h,n)};return a});
define("tdv/player/script/RotationalCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("RotationalCameraMovement",m,function(){m.call(this)})});define("tdv/player/script/SlideInEffect",["require","tdv/view/effects/SlideInEffect","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/effects/SlideInEffect");return a("tdv/player/parser/ClassInfo").define("SlideInEffect",m,function(){m.call(this)})});
define("tdv/player/script/SlideOutEffect",["require","tdv/view/effects/SlideOutEffect","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/effects/SlideOutEffect");return a("tdv/player/parser/ClassInfo").define("SlideOutEffect",m,function(){m.call(this)})});
define("tdv/player/script/SnowPanoramaOverlay",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("SnowPanoramaOverlay",m,function(){m.call(this)});a.prototype.get=function(h,n){h=="startState"&&n===void 0&&(n=this.get("initialState"));return m.prototype.get.call(this,h,n)};return a});
define("tdv/player/script/SphericPanoramaFrame",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaFrame"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PanoramaFrame");a=m.define("SphericPanoramaFrame",h,function(){h.call(this)});a.prototype.Mn=function(){var n=this.get("sphere");return n&&m.Oa("Video360Resource",n)?!0:(n=this.get("stereoSphere"))&&m.Oa("Video360Resource",n)?!0:!1};return a});
define("tdv/player/script/SphereModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("SphereModel3DObject",h,function(){h.call(this)})});define("tdv/player/script/SpotLight",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("SpotLight",m,function(){m.call(this)})});
define("tdv/player/script/SpriteModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");a=m.define("SpriteModel3DObject",h,function(){h.call(this)});a.prototype.getPixelScale=function(){return this.get("worldPixelScale")};return a});
define("tdv/player/script/SurfaceReticleModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DObject");return m.define("SurfaceReticleModel3DObject",h,function(){h.call(this);this.set("transparentAreaActive",!0)})});
define("tdv/view/containers/tabpanel/Tab","require exports tdv/binding/ChangeWatcher tdv/view/containers/Container tdv/view/constants/Alignment tdv/view/text/Label".split(" "),function(a,m,h,n,g,k){return function(e){function b(c){var d=e.call(this)||this;d.gf("Tab");d.Oia=c;d.zn="";d.cla=!1;d.Za=null;d.bAa=null;d.set("childrenInteractionEnabled",!1);d.set("contentOpaque",!0);return d}P(b,e);b.prototype.Pb=function(){e.prototype.Pb.call(this);this.m("horizontalAlign",g.$e);this.m("verticalAlign",
g.$d);this.m("fontFamily");this.m("fontSize");this.m("fontColor");this.m("fontWeight");this.m("fontStyle");this.m("textDecoration");this.m("textShadowBlurRadius");this.m("textShadowColor");this.m("textShadowHorizontalLength");this.m("textShadowOpacity");this.m("textShadowVerticalLength")};b.prototype.Kb=function(){e.prototype.Kb.call(this);this.Za==null&&(this.Za=new k,this.Za.set("horizontalAlign","center"),this.mb(this.Za))};b.prototype.$r=function(){e.prototype.$r.call(this);this.bAa=h.jx(this.Oia,
"label",this.WM,this);this.f5(this.Oia.get("label"))};b.prototype.Rja=function(){e.prototype.Rja.call(this);this.bAa.hF()};b.prototype.WM=function(){var c=this.Oia.get("label");this.f5(c?c:"")};b.prototype.f5=function(c){this.zn!=c&&(this.zn=c,this.cla=!0,this.Tf())};b.prototype.jb=function(){this.cla&&(this.cla=!1,this.Za.set("text",this.zn));this.Oc(b.kva,b.fR,[this.Za],!0,!0);e.prototype.jb.call(this)};b.kva="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");
b.fR=Object.fromEntries(b.kva.map(function(c){return[c,c]}));return b}(n)});define("tdv/view/containers/tabpanel/TabsAlignment",["require","exports"],function(){return{QQ:"normal",aL:"inverse",$sa:"center"}});
define("tdv/view/containers/tabpanel/TabPanel","require exports tdv/utils tdv/view/constants/GradientDirection tdv/view/constants/Cursor tdv/constants/EventName tdv/view/containers/Container tdv/view/constants/Alignment tdv/view/constants/LayoutMode tdv/view/constants/OverflowPolicy tdv/view/containers/tabpanel/Tab tdv/view/containers/tabpanel/TabsAlignment tdv/view/constants/Position tdv/view/core/visuals/VisualsType".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l,p,q){return function(r){function t(){var u=
r.call(this)||this;u.gf("TabPanel");u.Jg=-1;u.rI=!1;u.EV=[];u.C5=!1;u.hl=[];u.Pia=!1;u.DV=[];u.ui=null;u.Ph=null;u.nK(!1);return u}P(t,r);t.prototype.Pb=function(){r.prototype.Pb.call(this);this.m("pages",[]);this.m("selectedIndex",-1);this.m("tabsSize",25);this.m("tabsPosition",p.Tc);this.m("tabsGap",0);this.m("tabsPadding",10);this.m("tabsAlign",l.QQ);this.m("tabsBackgroundOpacity",.6);this.m("tabsBackgroundColor",["#FFFFFF","#CCCCCC"]);this.m("tabsBackgroundColorRatios",[0,.5]);this.m("tabsRollOverBackgroundOpacity",
1);this.m("tabsRollOverBackgroundColor",["#FFFFFF","#CCCCCC"]);this.m("tabsRollOverBackgroundColorRatios",[0,.5]);this.m("backgroundColor","#FFFFFF");this.m("selectedTabBackgroundOpacity",1);this.m("selectedTabBackgroundColor");this.m("selectedTabBackgroundColorRatios");this.m("borderRadius",6);this.m("pagePaddingLeft",4);this.m("pagePaddingTop",4);this.m("pagePaddingRight",4);this.m("pagePaddingBottom",4);this.m("borderColor","#AAAAAA");this.m("borderSize",1);this.m("selectedTabFontSize");this.m("selectedTabFontColor");
this.m("selectedTabFontWeight");this.m("selectedTabFontStyle");this.m("selectedTabTextDecoration");this.m("selectedTabTextShadowBlurRadius");this.m("selectedTabTextShadowColor");this.m("selectedTabTextShadowHorizontalLength");this.m("selectedTabTextShadowOpacity");this.m("selectedTabTextShadowVerticalLength");this.m("tabsFontFamily");this.m("tabsFontSize");this.m("tabsFontColor");this.m("tabsFontWeight");this.m("tabsFontStyle");this.m("tabsTextDecoration");this.m("tabsTextShadowBlurRadius");this.m("tabsTextShadowColor");
this.m("tabsTextShadowHorizontalLength");this.m("tabsTextShadowOpacity");this.m("tabsTextShadowVerticalLength");this.m("tabsRollOverFontSize");this.m("tabsRollOverFontColor");this.m("tabsRollOverFontWeight");this.m("tabsRollOverFontStyle");this.m("tabsRollOverTextDecoration");this.m("tabsRollOverTextShadowBlurRadius");this.m("tabsRollOverTextShadowColor");this.m("tabsRollOverTextShadowHorizontalLength");this.m("tabsRollOverTextShadowOpacity");this.m("tabsRollOverTextShadowVerticalLength")};t.prototype.co=
function(u,v,w,x){r.prototype.co.call(this,u,v,w,x);this.yD("shadow")};t.prototype.Kb=function(){e.prototype.Kb.call(this);this.Ph==null&&(this.Ph=new e,this.Ph.nK(!1),this.mb(this.Ph));this.ui==null&&(this.ui=new e,this.ui.nK(!1),this.mb(this.ui))};t.prototype.set=function(u,v){u=="pages"?this.dlb(v||[]):u=="selectedIndex"?this.Yw(v):u=="layout"&&(v=c.wob);e.prototype.set.call(this,u,v)};t.prototype.get=function(u,v){return u=="pages"?this.hl:u=="selectedIndex"?this.MLa():e.prototype.get.call(this,
u,v)};t.prototype.Yw=function(u){this.Jg!=u&&(this.Jg=u,this.Jg=Math.min(Math.max(this.Jg,-1),this.hl.length),this.rI=!0,this.Tf(),this.o(k.V),this.o(k.L("selectedIndex")))};t.prototype.MLa=function(){return this.Jg};t.prototype.dlb=function(u){var v=this;h.v8(this.hl,u)||(this.hl.forEach(function(w){w.h(k.od,v.nDa,v);w.h(k.jd,v.mDa,v)}),this.hl=u,this.hl.forEach(function(w){w.bind(k.od,v.nDa,v,!1);w.bind(k.jd,v.mDa,v,!1)}),this.Pia=!0,this.Tf())};t.prototype.f$a=function(u){this.EV=h.union(this.EV,
[u.source]);this.C5=!0;this.Tf()};t.prototype.e$a=function(u){this.EV=h.difference(this.EV,[u.source]);this.C5=!0;this.Tf()};t.prototype.d$a=function(u){this.Yw(this.DV.indexOf(u.source))};t.prototype.nDa=function(u){this.Yw(this.hl.indexOf(u.source))};t.prototype.mDa=function(u){if(this.hl.indexOf(u.source)==this.Jg){for(u=this.hl.length-1;u>=0;u--)if(this.hl[u].get("visible")){this.Yw(u);return}this.Jg=-1;this.Yw(0)}};t.prototype.jb=function(){var u=this,v=!1,w=!1,x=!1,y=!1,z=!1,A=this.G("tabsPosition"),
D=this.G("tabsAlign");this.Pia&&(this.DV=[],this.ui.dQa(),this.Ph.dQa(),this.hl.forEach(function(H){var E=new f(H);E.nK(!0);E.bind(k.uc,u.f$a,u,!1);E.bind(k.Eb,u.e$a,u,!1);E.bind(k.Sa,u.d$a,u,!1);u.DV.push(E);u.ui.mb(E);H.xa({top:void 0,left:void 0,right:void 0,bottom:void 0,width:"100%",height:"100%"});u.Ph.mb(H)}),this.Jg=Math.min(Math.max(this.Jg,0),this.hl.length-1),this.Pia=!1,w=v=z=!0);this.S("tabsPosition")&&(this.$("tabsPosition"),y=w=v=!0);this.rI&&(this.rI=!1,x=w=z=!0);this.C5&&(this.C5=
!1,x=!0);this.S("overflow")&&this.ui.xa({contentOpaque:this.G("overflow")==d.Vr,overflow:this.G("overflow")});["tabsAlign","tabsGap","tabsSize"].forEach(function(H){u.S(H)&&(u.$(H),v=!0)});"borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize borderColor borderLeftColor borderTopColor borderRightColor borderBottomColor shadow shadowHorizontalLength shadowVerticalLength shadowBlurRadius shadowSpread shadowColor backgroundOpacity backgroundColor backgroundColorRatios".split(" ").forEach(function(H){u.S(H)&&
(u.$(H),y=w=!0)});"tabsBackgroundOpacity tabsBackgroundColor tabsBackgroundColorRatios selectedTabBackgroundOpacity selectedTabBackgroundColor selectedTabBackgroundColorRatios selectedTabFontSize selectedTabFontColor selectedTabFontWeight selectedTabFontStyle selectedTabTextDecoration selectedTabTextShadowColor selectedTabTextShadowHorizontalLength selectedTabTextShadowVerticalLength selectedTabTextShadowBlurRadius selectedTabTextShadowOpacity tabsFontFamily tabsFontSize tabsFontColor tabsFontWeight tabsFontStyle tabsPadding tabsTextDecoration tabsRollOverFontSize tabsRollOverFontColor tabsTextShadowColor tabsTextShadowHorizontalLength tabsTextShadowVerticalLength tabsTextShadowBlurRadius tabsTextShadowOpacity tabsRollOverFontWeight tabsRollOverFontStyle tabsRollOverTextDecoration tabsRollOverTextShadowColor tabsRollOverTextShadowHorizontalLength tabsRollOverTextShadowVerticalLength tabsRollOverTextShadowBlurRadius tabsRollOverTextShadowOpacity".split(" ").forEach(function(H){u.S(H)&&
(u.$(H),w=!0)});["pagePaddingLeft","pagePaddingTop","pagePaddingRight","pagePaddingBottom"].forEach(function(H){u.S(H)&&(u.$(H),y=!0)});this.S("backgroundColorDirection")&&this.$("backgroundColorDirection");if(v){switch(A){case p.fb:this.ui.xa({left:0,right:void 0});break;case p.Db:this.ui.xa({left:void 0,right:0});break;case p.Tc:this.ui.xa({bottom:void 0,top:0});break;case p.Gc:this.ui.xa({bottom:0,top:void 0})}switch(A){case p.fb:case p.Db:this.ui.xa({layout:c.Uk,top:0,bottom:0,height:void 0,width:this.G("tabsSize")});
switch(D){case l.aL:this.ui.set("verticalAlign",b.Gc);break;case l.$sa:this.ui.set("verticalAlign",b.$d);break;default:this.ui.set("verticalAlign",b.Tc)}break;case p.Tc:case p.Gc:switch(this.ui.xa({layout:c.Mi,left:0,right:0,height:this.G("tabsSize"),width:void 0}),D){case l.aL:this.ui.set("horizontalAlign",b.Db);break;case l.$sa:this.ui.set("horizontalAlign",b.$e);break;default:this.ui.set("horizontalAlign",b.fb)}}this.ui.set("gap",this.G("tabsGap"))}if(w)for(var F=0;F<this.hl.length;F++){var C=
this.DV[F];A==p.Gc||A==p.Tc?C.xa({layout:c.Mi,width:void 0,paddingLeft:this.G("tabsPadding"),paddingTop:0,paddingRight:this.G("tabsPadding"),paddingBottom:0,height:"100%",backgroundColorDirection:n.oca}):C.xa({layout:c.Uk,width:"100%",paddingLeft:0,paddingTop:this.G("tabsPadding"),paddingRight:0,paddingBottom:this.G("tabsPadding"),height:void 0,backgroundColorDirection:n.o_});A==p.Gc||A==p.Db?C.set("borderTopLeftRadius",0):C.set("borderTopLeftRadius",this.G("borderTopLeftRadius","borderTopRadius",
"borderLeftRadius","borderRadius"));A==p.Gc||A==p.fb?C.set("borderTopRightRadius",0):C.set("borderTopRightRadius",this.G("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));A==p.Tc||A==p.Db?C.set("borderBottomLeftRadius",0):C.set("borderBottomLeftRadius",this.G("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));A==p.Tc||A==p.fb?C.set("borderBottomRightRadius",0):C.set("borderBottomRightRadius",this.G("borderBottomRightRadius","borderBottomRadius",
"borderRightRadius","borderRadius"));A==p.Db&&C.set("borderSize",this.G("borderRightSize","borderSize"));A==p.fb&&C.set("borderSize",this.G("borderLeftSize","borderSize"));A==p.Tc&&C.set("borderSize",this.G("borderTopSize","borderSize"));A==p.Gc&&C.set("borderSize",this.G("borderBottomSize","borderSize"));switch(A){case p.fb:var B=this.G("borderLeftColor","borderColor");break;case p.Db:B=this.G("borderRightColor","borderColor");break;case p.Gc:B=this.G("borderBottomColor","borderColor");break;default:case p.Tc:B=
this.G("borderTopColor","borderColor")}C.set("borderColor",B);C.xa({fontFamily:this.G("tabsFontFamily"),shadow:this.G("shadow")&&this.dNa(),shadowHorizontalLength:this.G("shadowHorizontalLength"),shadowVerticalLength:this.G("shadowVerticalLength"),shadowBlurRadius:this.G("shadowBlurRadius"),shadowSpread:this.G("shadowSpread"),shadowColor:this.G("shadowColor")})}if(w||x)for(F=0;F<this.hl.length;F++)C=this.DV[F],x=F==this.Jg,B=this.EV.includes(C),x?(B=this.G("selectedTabBackgroundColor","tabsBackgroundColor"),
B===void 0&&(B=this.G("backgroundColor"),B=Array.isArray(B)&&B.length>0?A==p.fb||A==p.Tc?B[0]:B[B.length-1]:B),C.xa({backgroundOpacity:this.G("selectedTabBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:B,backgroundColorRatios:this.G("selectedTabBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:g.De,fontSize:this.G("selectedTabFontSize","tabsFontSize"),fontColor:this.G("selectedTabFontColor","tabsFontColor"),fontWeight:this.G("selectedTabFontWeight","tabsFontWeight"),
fontStyle:this.G("selectedTabFontStyle","tabsFontStyle"),textDecoration:this.G("selectedTabTextDecoration","tabsTextDecoration"),textShadowColor:this.G("selectedTabTextShadowColor","tabsTextShadowColor"),textShadowHorizontalLength:this.G("selectedTabTextShadowHorizontalLength","tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.G("selectedTabTextShadowVerticalLength","tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("selectedTabTextShadowBlurRadius","tabsTextShadowBlurRadius"),
textShadowOpacity:this.G("selectedTabTextShadowOpacity","tabsTextShadowOpacity")})):B?C.xa({backgroundOpacity:this.G("tabsRollOverBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.G("tabsRollOverBackgroundColor","tabsBackgroundColor"),backgroundColorRatios:this.G("tabsRollOverBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:g.qf,fontSize:this.G("tabsRollOverFontSize","tabsFontSize"),fontColor:this.G("tabsRollOverFontColor","tabsFontColor"),fontWeight:this.G("tabsRollOverFontWeight",
"tabsFontWeight"),fontStyle:this.G("tabsRollOverFontStyle","tabsFontStyle"),textDecoration:this.G("tabsRollOverTextDecoration","tabsTextDecoration"),textShadowColor:this.G("tabsRollOverTextShadowColor","tabsTextShadowColor"),textShadowHorizontalLength:this.G("tabsRollOverTextShadowHorizontalLength","tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.G("tabsRollOverTextShadowVerticalLength","tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("tabsRollOverTextShadowBlurRadius","tabsTextShadowBlurRadius"),
textShadowOpacity:this.G("tabsRollOverTextShadowOpacity","tabsTextShadowOpacity")}):C.xa({backgroundOpacity:this.G("tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.G("tabsBackgroundColor"),backgroundColorRatios:this.G("tabsBackgroundColorRatios"),fontSize:this.G("tabsFontSize"),fontColor:this.G("tabsFontColor"),fontWeight:this.G("tabsFontWeight"),fontStyle:this.G("tabsFontStyle"),textDecoration:this.G("tabsTextDecoration"),textShadowColor:this.G("tabsTextShadowColor"),textShadowHorizontalLength:this.G("tabsTextShadowHorizontalLength"),
textShadowVerticalLength:this.G("tabsTextShadowVerticalLength"),textShadowBlurRadius:this.G("tabsTextShadowBlurRadius"),textShadowOpacity:this.G("tabsTextShadowOpacity")}),C.xa({borderLeftSize:A==p.Db&&x?0:void 0,borderRightSize:A==p.fb&&x?0:void 0,borderBottomSize:A==p.Tc&&x?0:void 0,borderTopSize:A==p.Gc&&x?0:void 0});if(y){F=this.G("tabsSize");switch(A){case p.fb:this.Ph.xa({left:F-(this.G("borderLeftSize","borderSize")||0),right:0,top:0,bottom:0});break;case p.Db:this.Ph.xa({left:0,right:F-(this.G("borderRightSize",
"borderSize")||0),top:0,bottom:0});break;case p.Tc:this.Ph.xa({left:0,right:0,top:F-(this.G("borderTopSize","borderSize")||0),bottom:0});break;case p.Gc:this.Ph.xa({left:0,right:0,top:0,bottom:F-(this.G("borderBottomSize","borderSize")||0)})}A==p.Tc&&D==l.QQ||A==p.fb&&D==l.QQ?this.Ph.set("borderTopLeftRadius",0):this.Ph.set("borderTopLeftRadius",this.G("borderTopLeftRadius","borderTopRadius","borderLeftRadius","borderRadius"));A==p.Tc&&D==l.aL||A==p.Db&&D==l.QQ?this.Ph.set("borderTopRightRadius",
0):this.Ph.set("borderTopRightRadius",this.G("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));A==p.Gc&&D==l.QQ||A==p.fb&&D==l.aL?this.Ph.set("borderBottomLeftRadius",0):this.Ph.set("borderBottomLeftRadius",this.G("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));A==p.Gc&&D==l.aL||A==p.Db&&D==l.aL?this.Ph.set("borderBottomRightRadius",0):this.Ph.set("borderBottomRightRadius",this.G("borderBottomRightRadius","borderBottomRadius","borderRightRadius",
"borderRadius"));this.Ph.xa({paddingLeft:this.G("pagePaddingLeft"),paddingTop:this.G("pagePaddingTop"),paddingRight:this.G("pagePaddingRight"),paddingBottom:this.G("pagePaddingBottom"),borderLeftSize:this.G("borderLeftSize","borderSize"),borderTopSize:this.G("borderTopSize","borderSize"),borderRightSize:this.G("borderRightSize","borderSize"),borderBottomSize:this.G("borderBottomSize","borderSize"),borderLeftColor:this.G("borderLeftColor","borderColor"),borderTopColor:this.G("borderTopColor","borderColor"),
borderRightColor:this.G("borderRightColor","borderColor"),borderBottomColor:this.G("borderBottomColor","borderColor"),shadow:this.G("shadow")&&this.dNa(),shadowHorizontalLength:this.G("shadowHorizontalLength"),shadowVerticalLength:this.G("shadowVerticalLength"),shadowBlurRadius:this.G("shadowBlurRadius"),shadowSpread:this.G("shadowSpread"),shadowColor:this.G("shadowColor"),backgroundOpacity:this.G("backgroundOpacity"),backgroundColor:this.G("backgroundColor"),backgroundColorRatios:this.G("backgroundColorRatios")});
A==p.Tc||A==p.Gc?this.Ph.set("backgroundColorDirection",n.oca):this.Ph.set("backgroundColorDirection",n.o_)}if(z)for(F=0;F<this.hl.length;F++)this.hl[F].set("visible",F==this.Jg);e.prototype.jb.call(this)};t.prototype.dNa=function(){var u;return((u=this.TI)===null||u===void 0?void 0:u.getType())===q.DOM};return t}(e)});
define("tdv/player/script/TabPanel",["require","tdv/view/containers/tabpanel/TabPanel","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/containers/tabpanel/TabPanel");return a("tdv/player/parser/ClassInfo").define("TabPanel",m,function(){m.call(this)})});
define("tdv/view/containers/tabpanel/Page",["require","exports","tdv/view/containers/Container"],function(a,m,h){return function(n){function g(){var k=n.call(this)||this;k.gf("Page");k.set("label","");return k}P(g,n);g.prototype.Pb=function(){n.prototype.Pb.call(this);this.m("visible")};return g}(h)});
define("tdv/player/script/TabPanelPage",["require","tdv/view/containers/tabpanel/Page","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/containers/tabpanel/Page");return a("tdv/player/parser/ClassInfo").define("TabPanelPage",m,function(){m.call(this)})});
define("tdv/player/script/TargetPanoramaCameraMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetPanoramaCameraMovement",m,function(){m.call(this)})});
define("tdv/player/script/TargetRotationalCameraDisplayMovement",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("TargetRotationalCameraDisplayMovement",m,function(){m.call(this)})});
define("tdv/player/script/TiledImageResourceLevel",["require","tdv/player/script/ImageResourceLevel","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/script/ImageResourceLevel");return a("tdv/player/parser/ClassInfo").define("TiledImageResourceLevel",m,function(){m.call(this)})});
define("tdv/player/script/TripodCapPanoramaOverlay",["require","tdv/player/parser/ClassInfo","tdv/player/script/CapPanoramaOverlay"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/CapPanoramaOverlay");return m.define("TripodCapPanoramaOverlay",h,function(){h.call(this)})});
define("tdv/player/script/ThumbnailGrid","require tdv/constants/EventName tdv/view/list/thumbgrid/ThumbnailGrid tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/view/constants/ButtonMode tdv/view/images/fliputil".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/view/list/thumbgrid/ThumbnailGrid"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),k=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/images/fliputil");a=n.define("ThumbnailGrid",
h,function(){h.call(this);this.Td=null;this.set("itemMode","normal");this.ns=!1;this.sR=new g(this,"buttonScrollDown",k.af);this.sR.bind(m.ma,this.AQa,this);this.tR=new g(this,"buttonScrollLeft",k.af);this.tR.bind(m.ma,this.scrollLeft,this);this.uR=new g(this,"buttonScrollRight",k.af);this.uR.bind(m.ma,this.DQa,this);this.vR=new g(this,"buttonScrollUp",k.af);this.vR.bind(m.ma,this.EQa,this);this.bind(m.V,this.L5a,this)});a.prototype.Kk=function(){h.prototype.Kk.call(this);this.JI()};a.prototype.KI=
function(){h.prototype.KI.call(this);this.JI()};a.prototype.JI=function(){this.sR.set("visible",!this.ns||this.HO());this.vR.set("visible",!this.ns||this.JO());this.tR.set("visible",!this.ns||this.R6());this.uR.set("visible",!this.ns||this.S6())};a.prototype.set=function(b,c){if(b=="itemMode"){switch(c){case "thumbnail-only":this.set("itemLabelFunction",this.yH);this.set("itemThumbnailUrlFunction",this.US);this.set("itemTooltipFunction",this.Ty);this.set("itemSourceProperties",["label","media.label",
"media.thumbnailUrl","media.flipImageHorizontally"]);break;case "label-only":this.set("itemLabelFunction",this.Ty);this.set("itemThumbnailUrlFunction",this.yH);this.set("itemTooltipFunction",this.yH);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.Ty),this.set("itemThumbnailUrlFunction",this.US),this.set("itemTooltipFunction",this.Ty),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}h.prototype.set.call(this,
b,c)}else b=="playList"?(this.Td&&this.Td.h("change",this.kz,this),(this.Td=c)?(this.set("items",this.Td.get("items")),this.set("selectedIndex",this.Td.get("selectedIndex")),this.Td.bind("change",this.kz,this,!0)):this.set("items",[])):b=="hideScrollButtons"?(this.ns=c,this.JI()):h.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){switch(b){case "playList":return this.Td;default:return h.prototype.get.call(this,b,c)}};a.prototype.kz=function(){this.set("items",this.Td.get("items"));this.set("selectedIndex",
this.Td.get("selectedIndex"))};a.prototype.L5a=function(){this.Td&&this.Td.set("selectedIndex",this.get("selectedIndex"))};a.prototype.yH=function(){};a.prototype.Ty=function(b){return b.get("label")||b.get("media").get("label")};a.prototype.US=function(b){b=b.get("media");var c=b.get("thumbnailUrl");b.get("flipImageHorizontally")&&(c=e.YHa(c));return c};return a});
define("tdv/player/script/ThumbnailList","require tdv/constants/EventName tdv/view/list/thumblist/ThumbnailList tdv/player/parser/ClassInfo tdv/player/script/helper/ButtonProperty tdv/view/constants/ButtonMode tdv/view/images/fliputil".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/view/list/thumblist/ThumbnailList"),n=a("tdv/player/parser/ClassInfo"),g=a("tdv/player/script/helper/ButtonProperty"),k=a("tdv/view/constants/ButtonMode"),e=a("tdv/view/images/fliputil");a=n.define("ThumbnailList",
h,function(){h.call(this);this.Td=null;this.ns=!1;this.sR=new g(this,"buttonScrollDown",k.af);this.sR.bind(m.ma,this.AQa,this);this.tR=new g(this,"buttonScrollLeft",k.af);this.tR.bind(m.ma,this.scrollLeft,this);this.uR=new g(this,"buttonScrollRight",k.af);this.uR.bind(m.ma,this.DQa,this);this.vR=new g(this,"buttonScrollUp",k.af);this.vR.bind(m.ma,this.EQa,this);this.bind(m.V,this.M5a,this)});a.prototype.Kk=function(){h.prototype.Kk.call(this);this.JI()};a.prototype.KI=function(){h.prototype.KI.call(this);
this.JI()};a.prototype.JI=function(){this.sR.set("visible",!this.ns||this.HO());this.vR.set("visible",!this.ns||this.JO());this.tR.set("visible",!this.ns||this.R6());this.uR.set("visible",!this.ns||this.S6())};a.prototype.set=function(b,c){if(b=="itemMode"){switch(c){case "thumbnail-only":this.set("itemLabelFunction",this.yH);this.set("itemThumbnailUrlFunction",this.US);this.set("itemTooltipFunction",this.Ty);this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"]);
break;case "label-only":this.set("itemLabelFunction",this.Ty);this.set("itemThumbnailUrlFunction",this.yH);this.set("itemTooltipFunction",this.yH);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.Ty),this.set("itemThumbnailUrlFunction",this.US),this.set("itemTooltipFunction",this.Ty),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}h.prototype.set.call(this,b,c)}else b=="playList"?(this.Td&&
this.Td.h("change",this.kz,this),(this.Td=c)?(this.set("items",this.Td.get("items")),this.Td.bind("change",this.kz,this)):this.set("items",[])):b=="hideScrollButtons"?(this.ns=c,this.JI()):h.prototype.set.call(this,b,c)};a.prototype.get=function(b,c){switch(b){case "playList":return this.Td;default:return h.prototype.get.call(this,b,c)}};a.prototype.kz=function(){this.set("items",this.Td.get("items"));this.set("selectedIndex",this.Td.get("selectedIndex"))};a.prototype.M5a=function(){this.Td&&this.Td.set("selectedIndex",
this.get("selectedIndex"))};a.prototype.yH=function(){};a.prototype.Ty=function(b){return b.get("label")||b.get("media").get("label")};a.prototype.US=function(b){b=b.get("media");var c=b.get("thumbnailUrl");b.get("flipImageHorizontally")&&(c=e.YHa(c));return c};return a});define("tdv/player/script/UIComponent",["require","tdv/view/core/UIComponent","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/core/UIComponent");return a("tdv/player/parser/ClassInfo").define("UIComponent",m,function(){m.call(this)})});
define("tdv/player/script/Video",["require","tdv/player/parser/ClassInfo","tdv/player/script/Media"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Media");a=m.define("Video",h,function(){h.call(this);this.Ja=void 0});a.prototype.rw=function(){this.get("video");return[]};return a});
define("tdv/player/script/VideoPanorama",["require","tdv/player/parser/ClassInfo","tdv/player/script/Panorama"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Panorama");return m.define("VideoPanorama",h,function(){h.call(this)})});
define("tdv/player/script/Video360Resource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");a=a("tdv/player/parser/ClassInfo").define("Video360Resource",m,function(){m.call(this)});a.prototype.get=function(h,n){if(n===void 0)switch(h){case "gain":n=1}switch(h){case "levels":n=[this];break;case "subtitlesURL":case "gain":for(var g=m.prototype.get.call(this,h),k=this.get("levels"),e=0;k&&e<k.length&&g===void 0;e++){var b=k[e];b!=this&&(g=
b.get(h))}return g!==void 0?g:n}return m.prototype.get.call(this,h,n)};return a});
define("tdv/player/script/Video360",["require","tdv/player/parser/ClassInfo","tdv/player/script/SphericPanoramaFrame","tdv/player/script/VideoPanorama","tdv/player/script/Video360Resource"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/SphericPanoramaFrame"),n=a("tdv/player/script/VideoPanorama"),g=a("tdv/player/script/Video360Resource");a=m.define("Video360",n,function(){n.call(this);this.xq=this.jO=this.Lb=void 0});a.prototype.set=function(k,e){k=="video"?this.fYa(e):
k=="videoStereo"?this.gYa(e):n.prototype.set.call(this,k,e)};a.prototype.get=function(k,e){return k=="video"?this.Lb!==void 0?this.Lb:e:k=="videoStereo"?this.jO!==void 0?this.jO:e:n.prototype.get.call(this,k,e)};a.prototype.fYa=function(k){this.Lb!=k&&(this.Lb=k,k=n.prototype.get.call(this,"frames")||[],this.Lb&&(k.length==0&&k.push(new h),k[0].set("sphere",this.QAa(this.Lb))),n.prototype.set.call(this,"frames",k.slice()))};a.prototype.gYa=function(k){this.jO!=k&&(this.jO=k,k=n.prototype.get.call(this,
"frames")||[],this.jO&&(k.length==0&&k.push(new h),k[0].set("stereoSphere",this.QAa(this.jO))),n.prototype.set.call(this,"frames",k.slice()))};a.prototype.QAa=function(k){if(Array.isArray(k)){if(k.length==0)return;if(k.length==1&&m.Oa("Video360Resource",k[0]))return k[0];var e=[];k.forEach(function(b){e=e.concat(b.get("levels")||[b])});k=new g;k.set("levels",e)}return k};return a});
define("tdv/player/script/Video360Player",["require","tdv/player/parser/ClassInfo","tdv/player/script/PanoramaPlayer"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PanoramaPlayer");return m.define("Video360Player",h,function(){h.call(this)})});
define("tdv/player/script/Video360PlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("Video360PlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.ep,this),g.set("video",this.get("media")),g.set("camera",
this.get("camera")),g.set("startTime",this.get("startTime")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(h.di,this.ep,this),g.get("video")==this.get("media")&&g.set("video",null));n.prototype.stop.call(this)};a.prototype.ep=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.di,this.ep,this),this.get("player").bind(h.oo,this.Is,this),this.PD())};a.prototype.Is=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.oo,this.Is,this),this.stop(),this.end())};
return a});define("tdv/player/script/Video360ResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("Video360ResourceLevel",m,function(){m.call(this)})});define("tdv/player/script/VideoCue",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("VideoCue",m,function(){m.call(this)})});
define("tdv/player/script/VideoPanoramaOverlay","require tdv/binding/Bindable tdv/constants/EventName tdv/constants/PlaybackState tdv/events/Event tdv/player/parser/ClassInfo tdv/player/script/helper/PlaybackPositionHelper".split(" "),function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/constants/EventName"),n=a("tdv/constants/PlaybackState"),g=a("tdv/events/Event"),k=a("tdv/player/parser/ClassInfo"),e=a("tdv/player/script/helper/PlaybackPositionHelper");a=k.define("VideoPanoramaOverlay",m,function(){m.call(this);
this.Gd=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",n.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",n.Zb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",n.ca)};a.prototype.set=function(b,c){var d=!1;switch(b){case "state":var f=this.get("state")||n.ca;f==n.ca&&c==n.PLAYING&&this.o(h.Up);f!=c&&this.o(new g(h.Pd,{oldState:f,state:c}));break;case "enabledInCardboard":this.set("enabledInVR",c);break;case "distance":case "hfov":case "opacity":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.Gd=
void 0,d=!0}m.prototype.set.call(this,b,c);d&&b!="playbackPositions"&&this.o(h.L("playbackPositions"))};a.prototype.get=function(b,c){switch(b){case "playbackPositions":return this.Gd===void 0&&(this.Gd=e.Eoa(this)),this.Gd}return m.prototype.get.call(this,b,c)};return a});
define("tdv/player/script/VideoPlaneModel3DObject",["require","tdv/player/parser/ClassInfo","tdv/player/script/PlaneModel3DObject"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/PlaneModel3DObject");return m.define("VideoPlaneModel3DObject",h,function(){h.call(this)})});
define("tdv/player/view/video/control/CueController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){function m(b,c,d){this.time=b;this.cue=c;this.action=d}var h=a("tdv/utils"),n=a("tdv/constants/EventName"),g=a("tdv/events/Event"),k=a("tdv/events/EventDispatcher"),e=a("tdv/constants/PlaybackState");a=h.extend(k,function(b){k.call(this);this.j=b;this.hd=null;this.Zl=!1;this.gk=[];this.Go=void 0;this.bf=[]});
a.prototype.clear=function(){this.j=null;this.EG();this.gk=[];this.bf=[]};a.prototype.start=function(b){this.end();this.nka(b);this.cea();this.Rka();this.QI()};a.prototype.nka=function(b){this.EG();this.hd=b;this.hd.bind(n.L("currentTime"),this.QI,this,!0);this.hd.bind(n.L("state"),this.Rka,this,!0);this.hd.bind(n.Tb,this.lW,this,!0)};a.prototype.EG=function(){this.hd&&(this.hd.h(n.L("currentTime"),this.QI,this),this.hd.h(n.L("state"),this.Rka,this),this.hd.h(n.Tb,this.lW,this),this.hd=null)};a.prototype.end=
function(){this.xR();this.EG();this.Zl=!1};a.prototype.Rka=function(b){b=b!=e.ca;this.Zl!=b&&((this.Zl=b)?this.t5():this.xR())};a.prototype.lW=function(){this.QI()};a.prototype.t5=function(){this.Go=this.WL=0};a.prototype.QI=function(){if(this.hd&&this.Zl){var b=this.bf.slice(),c=this.hd.get("currentTime",0),d=c-this.WL;d<0&&(this.bf=[],this.Go=0);d=d>=0&&d<2;this.WL=c;var f;for(f=this.Go;f<this.gk.length&&!(this.gk[f].time>c);f++);for(;this.Go<f;this.Go++)c=this.gk[this.Go],c.action=="start"?(this.bf=
h.union(this.bf,[c.cue]),d&&c.cue.o(new g(n.Cr))):(this.bf=h.union(this.bf,[c.cue]),d&&c.cue.o(new g(n.Tb)));b.length==this.bf.length&&h.intersection(b,this.bf).length==this.bf.length||this.TV()}};a.prototype.xR=function(){this.bf.length>0&&(this.bf=[],this.TV())};a.prototype.TV=function(){this.hd.o(new g(n.Al,{activeCues:this.bf.slice()}))};a.prototype.cea=function(){this.gk=[];this.hd.get("cues",[]).forEach(b=>{this.gk.push(new m(b.get("startTime",0),b,"start"));this.gk.push(new m(b.get("endTime",
Number.POSITIVE_INFINITY),b,"end"))});this.gk.sort(function(b,c){return b.time==c.time?b.action==c.start?0:b.action=="start"?-1:1:b.time-c.time})};return a});
define("tdv/player/view/video/control/DisplayController","require tdv/utils tdv/view/util/Animation tdv/events/Event tdv/player/view/common/MediaDisplayController tdv/player/view/util/XR".split(" "),function(a){function m(b,c){this.video=b;this.startTime=c}var h=a("tdv/utils");a("tdv/view/util/Animation");var n=a("tdv/events/Event"),g=a("tdv/player/view/common/MediaDisplayController"),k=a("tdv/player/view/util/XR");m.prototype.isEqual=function(b){return b&&this.video==b.video};var e=h.extend(g,function(b,
c){g.call(this,b);this.j=c});e.prototype.display=function(b,c){g.prototype.display.call(this,new m(b,c))};e.prototype.oe=function(){g.prototype.oe.call(this)};e.prototype.clear=function(){g.prototype.clear.call(this);this.j=null};e.prototype.Yg=function(b){g.prototype.Yg.call(this,b)};e.prototype.Zx=function(){g.prototype.Zx.call(this);this.P.Rc().pmb();this.P.Rc().xK();this.j.Ra(!0)};e.prototype.CT=function(b){g.prototype.CT.call(this,b);this.li.video.set("opacity",k.isPresenting?1:b);this.P.Rc().lK(b)};
e.prototype.xy=function(){g.prototype.xy.call(this);this.P.Rc().mJ()};e.prototype.kR=function(){g.prototype.kR.call(this)};e.prototype.GT=function(b){g.prototype.GT.call(this,b);this.li.video.set("opacity",Math.min(1,b*2));this.cf.video.set("opacity",Math.min(1,(1-b)*2))};e.prototype.ZR=function(){g.prototype.ZR.call(this)};e.prototype.ay=function(){g.prototype.ay.call(this);this.P.Rc().cF();this.j.Ra(k.isPresenting?!0:this.P.NX(this));this.cf.video.set("opacity",k.isPresenting?1:0);this.j.Qa()};
e.prototype.FT=function(b){g.prototype.FT.call(this,b);this.P.Rc().QE(Math.min(1,b*1.5));this.j.Ra(k.isPresenting?!0:this.P.NX(this));this.j.Qa()};e.prototype.YR=function(){this.P.Rc().VD();this.j.Ra(!1);this.j.Qa();g.prototype.YR.call(this)};e.prototype.ln=function(){g.prototype.ln.call(this);this.cf?this.o(new n(e.LF,{video:this.cf.video})):this.jp||this.o(new n(e.kta))};e.prototype.Nka=function(b){b.video&&this.o(new n(e.KF,{video:b.video}))};e.prototype.Wja=function(b,c){return b.video.get("chromaColor")&&
!!c};e.prototype.N_=function(b){b.video&&(b.video.set("opacity",0),b.video.set("zIndex",1),this.cf&&this.cf.video.set("zIndex",0),this.li.video.set("currentTime",b.startTime||0),this.j.$bb(b.video),this.o(new n(e.Hba,{video:b.video,startTime:b.startTime})))};e.prototype.wN=function(b){b.video&&(this.j.Ijb(b.video),this.o(new n(e.Iba,{video:b.video})))};e.oc="request frame";e.Hba="video added";e.Iba="video removed";e.LF="video show";e.KF="video hide";e.kta="all pending videos hidden";return e});
define("tdv/player/view/video/control/PlaybackController","require tdv/utils tdv/constants/EventName tdv/events/Event tdv/events/EventDispatcher tdv/constants/PlaybackState".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/constants/PlaybackState"),e=m.extend(g,function(){g.call(this);this.hd=null;this.Ff=!1;this.oea=k.ca});e.prototype.start=function(b){this.end();this.nka(b)};e.prototype.end=function(){this.stop();
this.EG()};e.prototype.clear=function(){this.EG()};e.prototype.play=function(){this.hd&&this.hd.set("state",k.PLAYING)};e.prototype.pause=function(){this.hd&&this.hd.set("state",k.Zb)};e.prototype.lsa=function(){this.hd&&(this.hd.get("state")==k.PLAYING?this.pause():this.play())};e.prototype.stop=function(){this.hd&&this.hd.set("state",k.ca)};e.prototype.Bg=function(b){this.Ff=b;this.hd&&this.hd.set("mute",this.Ff)};e.prototype.setTime=function(b){this.hd&&this.hd.set("currentTime",b)};e.prototype.getTime=
function(){if(this.hd)return this.hd.get("currentTime")};e.prototype.nka=function(b){this.EG();this.hd=b;this.hd.set("mute",this.Ff);this.hd.bind(h.L("state"),this.QN,this,!0);this.hd.bind(h.L("currentTime"),this.RI,this,!0);this.hd.bind(h.Tb,this.lW,this,!0)};e.prototype.EG=function(){this.hd&&(this.hd.h(h.L("state"),this.QN,this),this.hd.h(h.L("currentTime"),this.RI,this),this.hd.h(h.Tb,this.lW,this),this.hd=null)};e.prototype.RI=function(){this.o(new n(e.MF,{video:this.hd,time:this.hd.get("currentTime"),
duration:this.hd.get("duration")}))};e.prototype.lW=function(){this.o(new n(e.NQ,{video:this.hd}))};e.prototype.QN=function(){var b=this.hd.get("state");this.oea!=b&&(this.oea=b,this.o(new n(e.gd,{state:this.oea})))};e.gd="playback state change";e.NQ="video end";e.MF="video time change";return e});
define("tdv/player/view/video/control/Controller","require tdv/utils tdv/constants/PlaybackState tdv/events/Event tdv/events/EventDispatcher tdv/player/view/video/control/CueController tdv/player/view/video/control/DisplayController tdv/player/view/video/control/PlaybackController".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/PlaybackState"),n=a("tdv/events/Event"),g=a("tdv/events/EventDispatcher"),k=a("tdv/player/view/video/control/CueController"),e=a("tdv/player/view/video/control/DisplayController"),
b=a("tdv/player/view/video/control/PlaybackController"),c=m.extend(g,function(d,f){g.call(this);this.P=d;this.j=f;this.j.set("visible",!1);this.Ya=new e(this.P,this.j);this.Ua=new b(this.j);this.es=new k(this.j);this.Ya.bind(e.KF,this.Is,this,!0);this.Ya.bind(e.LF,this.ep,this,!0);this.Ya.bind(e.Hba,this.XCa,this,!0);this.Ya.bind(e.Iba,this.ZCa,this,!0);this.Ya.bind(e.kta,this.H4a,this,!0);this.Ua.bind(b.gd,this.Mf,this,!0);this.Ua.bind(b.NQ,this.dD,this,!0);this.Ua.bind(b.MF,this.pU,this,!0)});c.prototype.clear=
function(){this.Ya.clear();this.Ua.clear();this.es.clear();this.Ya.h(e.KF,this.Is,this);this.Ya.h(e.LF,this.ep,this);this.Ya.h(e.Hba,this.XCa,this);this.Ya.h(e.Iba,this.ZCa,this);this.Ua.h(b.gd,this.Mf,this);this.Ua.h(b.NQ,this.dD,this);this.Ua.h(b.MF,this.pU,this);this.P=this.j=this.es=this.Ua=this.Ya=null};c.prototype.L$=function(d,f){this.j.set("visible",!0);this.Ya.display(d,f)};c.prototype.bB=function(){this.Ya.oe();this.Ua.end();this.es.end()};c.prototype.play=function(){this.Ua.play()};c.prototype.stop=
function(){this.Ua.stop()};c.prototype.pause=function(){this.Ua.pause()};c.prototype.Bg=function(d){this.Ua.Bg(d)};c.prototype.setTime=function(d){this.Ua.setTime(d)};c.prototype.getTime=function(){return this.Ua.getTime()};c.prototype.lsa=function(){this.Ua.lsa()};c.prototype.XCa=function(d){var f=d.data.video;this.Ua.start(f,d.data.startTime);this.es.start(f)};c.prototype.ZCa=function(){};c.prototype.ep=function(d){d=d.data.video;d.get("autoplay")&&d.get("state")!=h.PLAYING&&d.get("state")!=h.Zb&&
d.set("state",h.PLAYING);this.o(new n(c.LF,{video:d}))};c.prototype.Is=function(d){this.o(new n(c.KF,{video:d.data.video}))};c.prototype.H4a=function(){this.j.set("visible",!1)};c.prototype.dD=function(d){this.o(new n(c.NQ,{video:d.data.video}))};c.prototype.pU=function(d){this.o(new n(c.MF,{video:d.data.video,time:d.data.time,duration:d.data.duration}))};c.prototype.Mf=function(d){this.o(new n(c.gd,{state:d.data.state}))};c.LF="videoShow";c.KF="videoHide";c.NQ="videoEnd";c.MF="videoTimeChange";c.gd=
"playbackStateChange";return c});
define("tdv/player/view/video/renderer/RendererOverlay","require exports tdv/constants/EventName tdv/view/constants/Cursor tdv/view/core/UIComponent tdv/player/view/UserInteractionWindow".split(" "),function(a,m,h,n,g,k){return function(e){function b(){var c=e.call(this)||this;c.set("toolTipDisabled",!0);c.set("cursor",n.LB);c.bind(h.$b,c.kd,c,!0);c.$H=new k.iua;c.$H.jra(k.iua.Nba);c.$H.ig(c.h4=!1);[c.$H.cc()].forEach(function(d,f){d.style.position="absolute";d.style.left="0";d.style.top="0";d.style.right=
"0";d.style.bottom="0";d.style.overflow="hidden";d.style.zIndex=f}.bind(c));return c}P(b,e);b.prototype.Kb=function(){e.prototype.Kb.call(this);[this.$H.cc()].forEach(function(c){c.parentElement||this.wa().tk(c)}.bind(this))};b.prototype.sra=function(c,d){this.h4!=c&&(this.h4=c,this.$H.OQa(d),this.$H.ig(c))};b.prototype.kd=function(){this.$H.setSize(this.nb(),this.Mb())};return b}(g)});
define("tdv/player/view/video/renderer/adapters/VideoAdapter","require exports tdv/constants/EventName tdv/view/constants/ScaleMode tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/view/av/VideoPlayer tdv/player/view/renderer2d/adapters/CameraAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c){return function(){function d(f,l,p,q){this.video=f;this.zg=l;this.renderer=p;this.eb=q;this.q9=this.q9.bind(this);this.SA=this.SA.bind(this);this.Sn=this.Sn.bind(this);this.C9=
this.C9.bind(this);g.ba(this.video,["video.levels.url","video.levels.srcObject","video.levels.width","video.levels.height"],this.q9,!0);g.ba(this.video,["zIndex"],this.SA,!0);g.ba(this.eb,["distance"],this.Sn,!0);g.ba(this.video,["scaleMode"],this.C9,!0);this.renderer.bind(h.$b,this.Mt,this,!0);c.M.bind(h.V,this.Ta,this,!0);this.Mt();this.fu()}d.prototype.dispose=function(){g.da(this.video,["video.levels.url","video.levels.srcObject","video.levels.width","video.levels.height"],this.q9);g.da(this.video,
["zIndex"],this.SA);g.da(this.eb,["distance"],this.Sn);g.da(this.video,["scaleMode"],this.C9);this.renderer.h(h.$b,this.Mt,this);c.M.h(h.V,this.Ta,this);this.Ca()};d.prototype.q9=function(){var f,l,p=e.yk(this.video.get("video"));this.level!==p&&(this.level=p,this.videoWidth=((f=this.level)===null||f===void 0?void 0:f.get("width"))||100,this.videoHeight=((l=this.level)===null||l===void 0?void 0:l.get("height"))||100,this.io(),this.jg())};d.prototype.SA=function(){var f=this.video.get("zIndex");this.zIndex!==
f&&(this.zIndex=f,this.jg())};d.prototype.Sn=function(){var f=this.eb.get("distance");this.distance!==f&&(this.distance=f,this.jg())};d.prototype.C9=function(){var f=this.video.get("scaleMode");this.NE!==f&&(this.NE=f,this.jg())};d.prototype.Mt=function(){var f=this.renderer.Xh()||1,l=this.renderer.Wh()||1;if(this.Ow!==f||this.Nw!==l)this.Ow=f,this.Nw=l,this.jg()};d.prototype.Ta=function(){this.jg()};d.prototype.jg=function(){if(this.F){var f=this.distance-.001*this.zIndex,l=c.isPresenting?2048:this.Ow,
p=c.isPresenting?1024:this.Nw,q=2*Math.tan(Math.PI/180*b.xu*.5)*f,r=q*p/l;switch(this.NE){case n.NONE:l=this.videoWidth*q/l;p=this.videoHeight*r/p;break;case n.Tp:l=q;p=this.videoHeight*q/this.videoWidth;break;case n.Pk:l=this.videoWidth*r/this.videoHeight;p=r;break;case n.Jr:this.videoWidth*r>this.videoHeight*q?(l=this.videoWidth*r/this.videoHeight,p=r):(l=q,p=this.videoHeight*q/this.videoWidth);break;default:this.videoWidth*r>this.videoHeight*q?(l=q,p=this.videoHeight*q/this.videoWidth):(p=r,l=
this.videoWidth*r/this.videoHeight)}r=this.F.O(k.ta);r.Le=l;r.Ye=p;r.positionZ=-f}};d.prototype.io=function(){if(this.F){var f=this.F.O(k.ro);f.properties=this.video;f.M=this.video;f.Msa=this.video.get("video")}};d.prototype.Gsa=function(){if(this.F){var f=this.F.O(k.wd,!0);f.pB=!0;f.fF=!0;f.M=this.video;f.mt=!0;f.Xt=!0}};d.prototype.fu=function(){var f=this.zg.T.sc("Video");f.N(k.pb).F=this.zg;f.N(k.Plane);f.N(k.ta);f.N(k.ro);f.N(k.wd);this.F=f;this.jg();this.io();this.Gsa()};d.prototype.Ca=function(){this.F&&
(this.F.T.dd(this.F),this.F=null)};return d}()});
define("tdv/player/view/video/renderer/adapters/PlayAdapter","require exports tdv/binding/Bindable tdv/constants/EventName tdv/view/util/Assets tdv/binding/BindingsHandler tdv/player/view/webgl/components tdv/player/script/ImageResourceLevel tdv/player/script/ImageResource tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(){function f(l,p){this.zg=l;this.eb=p;this.visible=!1;this.Sn=this.Sn.bind(this);k.ba(this.eb,["distance"],this.Sn,!0);d.M.bind(n.V,this.Ta,this,
!0)}f.prototype.dispose=function(){k.da(this.eb,["distance"],this.Sn);d.M.h(n.V,this.Ta,this);this.Ca()};f.prototype.ig=function(l){this.visible!=l&&(this.visible=l,this.io())};f.prototype.Sn=function(){var l=this.eb.get("distance");this.distance!==l&&(this.distance=l,this.jg())};f.prototype.Ta=function(){this.hx()};f.prototype.hx=function(){d.isPresenting!=!!this.F&&(d.isPresenting?this.fu():this.Ca())};f.prototype.jg=function(){if(this.F){var l=this.distance-.005,p=2*Math.tan(Math.PI/180*f.xu*.5)*
l,q=p*g.u_/g.iL,r=this.F.O(e.ta);r.Le=p;r.Ye=q;r.positionZ=-l}};f.prototype.io=function(){if(this.F){if(!this.uw){var l=new c,p=new b;p.set("url",g.Ex);p.set("width",g.iL);p.set("height",g.u_);l.set("levels",[p]);this.uw=l}this.properties||(l=new h,l.set("width",g.iL),l.set("height",g.u_),l.set("opacity",1),this.properties=l);l=this.F.O(e.Ni);l.properties=this.properties;l.M=this.uw;l.uw=this.uw;this.properties.set("enabled",this.visible)}};f.prototype.fu=function(){if(!this.F){var l=this.zg.T.sc("VideoPlay");
l.N(e.pb).F=this.zg;l.N(e.Plane);l.N(e.ta);l.N(e.Ni);this.F=l;this.jg();this.io()}};f.prototype.Ca=function(){this.F&&(this.F.T.dd(this.F),this.F=null)};f.xu=10;return f}()});
define("tdv/player/view/video/renderer/adapters/PlaybackBarAdapter",["require","exports","tdv/constants/EventName"],function(a,m,h){return function(){function n(g){this.eb=g;this.dg=this.eb.get("application");this.enabled=!1;this.container=this.HE=this.kg=null}n.prototype.dispose=function(){this.Ra(!1)};n.prototype.Ra=function(g){this.enabled!==g&&((this.enabled=g)?this.Sdb():this.oeb())};n.prototype.Sdb=function(){if(!this.kg){this.ndb();this.kg=this.dg.Ai("XRPanel");this.kg.set("content",this.container);
this.kg.set("autoCenter",!1);this.kg.set("modal",!1);this.kg.set("yaw",0);this.kg.set("pitch",-45);this.kg.set("distance",1);this.kg.set("draggable",!1);var g=Math.PI/180;g=2*this.kg.get("distance")*Math.tan(n.xu/2*g)/n.Sua;this.kg.set("pixelScale",g);this.kg.Yqa(this.eb.get("application"));this.kg.OJa()}};n.prototype.oeb=function(){this.kg&&(this.kg.Fna(),this.ceb(),this.dg.hw(this.kg),this.kg=null)};n.prototype.ndb=function(){if(!this.HE){var g=this.dg.Ai("PlaybackBar");g.set("left",25);g.set("top",
22);g.set("right",25);g.set("height",4);g.set("backgroundColor",["#FFFFFF"]);g.set("backgroundOpacity",1);g.set("borderColor","#FFFFFF");g.set("borderRadius",0);g.set("borderSize",0);g.set("liveDragging",!0);g.set("playheadBackgroundColor",["#3399FF"]);g.set("playheadBorderRadius",0);g.set("playheadBorderColor","#ffffff");g.set("playheadBorderSize",2);g.set("playheadBorderRadius",10);g.set("playheadHeight",20);g.set("playheadWidth",20);g.set("playheadShadow",!1);g.set("barBackgroundColor",["#3399FF"]);
g.set("barBackgroundColorRatios",[0]);g.set("barBorderColor","#000000");g.set("barBorderSize",0);g.set("barBorderRadius",0);this.HE=g}if(!this.container){g=this.dg.Ai("Container");g.set("width",n.Sua);g.set("height",50);g.set("backgroundColor","#ffffff");g.set("backgroundOpacity",.2);g.set("borderRadius",25);g.set("children",[this.HE]);g.set("opacity",.3);var k=this.dg.Ai("FadeInEffect");k.set("duration",500);k.set("easing","cubic_in");g.set("showEffect",k);k=this.dg.Ai("FadeOutEffect");k.set("duration",
500);k.set("easing","cubic_out");g.set("hideEffect",k);g.bind(h.uc,this.BJa,this,!0);g.bind(h.Eb,this.AJa,this,!1);this.container=g}this.Nt||(this.Nt=this.dg.Ai("Effect"),this.Nt.set("duration",300),this.Nt.set("easing","cubic_in"),this.Nt.bind(h.Zd,this.XOa,this,!0));this.jcb()};n.prototype.XOa=function(){this.container.set("opacity",.2+.8*this.Nt.tm())};n.prototype.ceb=function(){this.Sjb();this.HE&&(this.dg.hw(this.HE),this.HE=null);this.Nt&&(this.Nt.h(h.Zd,this.XOa,this),this.dg.hw(this.Nt),this.Nt=
null);this.container&&(this.container.h(h.uc,this.BJa,this),this.container.h(h.Eb,this.AJa,this),this.dg.hw(this.container),this.container=null)};n.prototype.jcb=function(){this.dPa=this.eb.get("externalPlaybackBar");this.eb.set("externalPlaybackBar",this.HE)};n.prototype.Sjb=function(){this.eb.get("externalPlaybackBar")===this.HE&&(this.eb.set("externalPlaybackBar",this.dPa),this.dPa=null)};n.prototype.BJa=function(){this.Nt.play()};n.prototype.AJa=function(){this.Nt.reverse()};n.Sua=500;n.xu=40;
return n}()});
define("tdv/player/view/video/renderer/Renderer","require exports tdv/binding/BindingsHandler tdv/player/view/renderer2d/Renderer tdv/player/view/video/renderer/RendererOverlay tdv/player/view/video/renderer/adapters/VideoAdapter tdv/player/view/video/renderer/adapters/PlayAdapter tdv/player/view/video/renderer/adapters/PlaybackBarAdapter tdv/player/view/util/XR".split(" "),function(a,m,h,n,g,k,e,b,c){return function(d){function f(l,p,q){l=d.call(this,l,p,q)||this;l.Xpa=l.Xpa.bind(l);l.Dc=null;l.mW=
[];l.OI=[];l.saa();h.ba(l.TC,["displayPlaybackBarInXR","displayPlaybackBar"],l.Xpa,!0);return l}P(f,d);f.prototype.Kb=function(){d.prototype.Kb.call(this);this.Dc==null&&(this.Dc=new g,this.Dc.xa({left:0,top:0,right:0,bottom:0}),this.mb(this.Dc),this.saa())};f.prototype.oY=function(){var l=this;d.prototype.oY.call(this);this.hf.o$(this.TC.get("useVideoFrameRate")?2:void 0);this.Cdb();this.Bdb();this.mW.forEach(function(p){l.PJa(p)})};f.prototype.Ypa=function(){d.prototype.Ypa.call(this);this.saa();
this.Bsa()};f.prototype.$bb=function(l){this.mW.includes(l)||(this.mW.push(l),this.hf&&this.PJa(l))};f.prototype.Cdb=function(){this.m6a=new b(this.P)};f.prototype.PJa=function(l){var p=new k(l,this.w1.mj(),this,this.P);this.OI.push(p);this.hf.o$(this.TC.get("useVideoFrameRate")&&this.agb(l)<45?2:void 0);this.r$(this.OI.length>0)};f.prototype.Bdb=function(){this.vDa=new e(this.w1.mj(),this.P)};f.prototype.Ijb=function(l){l=this.mW.indexOf(l);l<0||(this.mW.splice(l,1),this.hf&&this.neb(this.OI[l]))};
f.prototype.neb=function(l){var p=this.OI.indexOf(l);p<0||(this.OI.splice(p,1),l.dispose(),this.r$(this.OI.length>0))};f.prototype.sra=function(l){this.h4=l;this.saa()};f.prototype.saa=function(){var l=this.h4&&this.OI.length>0;this.Dc&&this.Dc.sra(l);this.vDa&&this.vDa.ig(l)};f.prototype.agb=function(l){l=l.get("video");return(l&&l.get("levels")||[]).reduce(function(p,q){return Math.max(p,q.get("framerate"))},0)||30};f.prototype.Ta=function(){d.prototype.Ta.call(this);this.Bsa()};f.prototype.Xpa=
function(){this.Bsa()};f.prototype.Bsa=function(){var l,p=c.isPresenting&&this.uS&&this.TC.get("displayPlaybackBarInXR",this.TC.get("displayPlaybackBar"));(l=this.m6a)===null||l===void 0||l.Ra(p)};return f}(n)});
define("tdv/player/script/VideoPlayer","require tdv/utils tdv/constants/EventName tdv/constants/Key tdv/player/parser/ClassInfo tdv/player/script/PlaybackMediaPlayer tdv/constants/PlaybackState tdv/player/view/video/control/Controller tdv/player/view/video/renderer/Renderer tdv/view/util/KeyboardControl".split(" "),function(a){var m=a("tdv/utils"),h=a("tdv/constants/EventName"),n=a("tdv/constants/Key"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/script/PlaybackMediaPlayer"),e=a("tdv/constants/PlaybackState"),
b=a("tdv/player/view/video/control/Controller"),c=a("tdv/player/view/video/renderer/Renderer"),d=a("tdv/view/util/KeyboardControl");a=g.define("VideoPlayer",k,function(){k.call(this,"video");this.QH=this.QH.bind(this);this.gs=this.s5=this.RI=this.ij=!1;this.U=this.j=null;this.ac=this.vf=0;this.Ro=!1;this.be=m.mr(this.Sh,this)});a.prototype.seek=function(f){this.qI(f)};a.prototype.play=function(){this.VH()};a.prototype.pause=function(){this.UH()};a.prototype.stop=function(){this.cD()};a.prototype.restart=
function(){this.bD()};a.prototype.set=function(f,l){if(this.get(f)!=l){switch(f){case "startTime":this.s5=!0;this.be();break;case "video":this.RI=!0;this.be();break;case "viewerArea":this.ij=!0;this.be();break;case "displayPlaybackBar":this.gs=!0,this.be()}k.prototype.set.call(this,f,l)}};a.prototype.get=function(f,l){switch(f){case "currentTime":return this.U&&this.U.getTime()||0}return k.prototype.get.call(this,f,l)};a.prototype.sr=function(f){this.Ro!==f&&((this.Ro=f)?document.addEventListener("keydown",
this.QH,!0):document.removeEventListener("keydown",this.QH,!0))};a.prototype.QH=function(f){d.yp()||(f.code==n.ua.jL||f.code==n.ua.f_)&&this.U&&this.U.lsa()};a.prototype.Sh=function(){this.ij&&(this.ij=!1,this.ny(),this.get("viewerArea")&&this.my(),this.lV(this.get("viewerArea")),this.RI=!0);var f=!1;if(this.j&&(this.RI||this.s5)){var l=this.get("video"),p=this.get("startTime")||0;if(l&&!this.j.Vb()){this.be();return}this.s5=this.RI=!1;this.ac=this.vf=0;f=!0;l?(this.fK(),this.U.L$(l,p)):this.U.bB()}this.gs&&
(this.gs=!1,f=!0);f&&this.Zz()};a.prototype.SN=function(){this.set("video",null)};a.prototype.my=function(){var f=this.get("application"),l=this.get("viewerArea");this.j=new c(f,l,this);this.j.xa({left:0,top:0,bottom:0,right:0});l.mb(this.j);l.bind(h.ma,this.cDa,this,!0);this.U=new b(l,this.j);this.U.bind(b.LF,this.ep,this);this.U.bind(b.KF,this.Is,this);this.U.bind(b.MF,this.pU,this,!0);this.U.bind(b.gd,this.Mf,this);f.bind(h.L("mute"),this.WT,this);this.U.Bg(f.get("mute",!1));this.xD(!0)};a.prototype.ny=
function(){if(this.j){this.U.h(b.LF,this.ep,this);this.U.h(b.KF,this.Is,this);this.U.h(b.MF,this.pU,this);this.U.h(b.gd,this.Mf,this);this.U.clear();this.get("application").h(h.L("mute"),this.WT,this);var f=this.j.getParent();f.removeChild(this.j);f.h(h.ma,this.cDa,this,!0);this.j=null;this.xD(!1)}};a.prototype.WT=function(){this.j&&this.U.Bg(this.get("application").get("mute",!1))};a.prototype.Mf=function(f){f=f.data.state;this.j&&this.j.sra(this.get("displayPlayOverlay")&&f!=e.PLAYING,this.vf<.5);
this.Jd(f)};a.prototype.ep=function(f){var l=this.get("viewerArea");(this.ve=l&&l.ve)&&this.ve.bind(h.ma,this.dDa,this,!0);this.bja=!1;f=f.data.video;f.bind(h.ma,this.YCa,this,!0);this.kT(f)};a.prototype.Is=function(f){this.ve&&this.ve.h(h.ma,this.dDa,this,!0);this.ve=null;f=f.data.video;f.h(h.ma,this.YCa,this);this.jT(f)};a.prototype.pU=function(f){this.vf=f.data.time;this.ac=f.data.duration;this.Zz()};a.prototype.cDa=function(){this.bja?this.bja=!1:this.rBa()};a.prototype.YCa=function(){this.rBa()};
a.prototype.rBa=function(){switch(this.get("clickAction")){case "play_pause":this.get("state")!=e.PLAYING?this.U.play():this.U.pause()}};a.prototype.dDa=function(){this.bja=!0};a.prototype.AU=function(f){this.qI(f.data.position)};a.prototype.sn=function(){this.U.play()};a.prototype.Ys=function(){this.U.stop()};a.prototype.sv=function(){this.U.pause()};a.prototype.qI=function(f){this.U&&this.U.setTime(f)};a.prototype.Zz=function(){if(this.j){var f=this.j.getParent();this.ac>0&&this.get("displayPlaybackBar")?
f.xa({playbackBarPosition:this.vf,playbackBarDuration:this.ac,playbackBarVisible:!0}):f.set("playbackBarVisible",!1)}};return a});
define("tdv/player/script/VideoPlayListItem",["require","tdv/player/parser/ClassInfo","tdv/player/script/MediaPlayer","tdv/player/script/PlayListItem"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/MediaPlayer"),n=a("tdv/player/script/PlayListItem");a=m.define("VideoPlayListItem",n,function(){n.call(this)});a.prototype.start=function(){n.prototype.start.call(this);var g=this.get("player");g&&(g.bind(h.di,this.ep,this),g.set("video",this.get("media")),g.set("startTime",
this.get("startTime")))};a.prototype.stop=function(){var g=this.get("player");g&&(g.h(h.di,this.ep,this),g.get("video")==this.get("media")&&g.set("video",null));n.prototype.stop.call(this)};a.prototype.ep=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.di,this.ep,this),this.get("player").bind(h.oo,this.Is,this),this.PD())};a.prototype.Is=function(g){g.data.media==this.get("media")&&(this.get("player").h(h.oo,this.Is,this),this.stop(),this.end())};return a});
define("tdv/player/script/VideoResourceLevel",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/binding/Bindable");return a("tdv/player/parser/ClassInfo").define("VideoResourceLevel",m,function(){m.call(this)})});
define("tdv/player/script/VideoResource",["require","tdv/binding/Bindable","tdv/player/parser/ClassInfo","tdv/player/view/util/Capabilities","tdv/player/script/VideoResourceLevel"],function(a){var m=a("tdv/binding/Bindable"),h=a("tdv/player/parser/ClassInfo"),n=a("tdv/player/view/util/Capabilities"),g=a("tdv/player/script/VideoResourceLevel");a=h.define("VideoResource",m,function(){m.call(this);this.Wha=new g;this.Wha.set("type","video/mp4");this.aia=new g;this.aia.set("type","video/ogg");this.Dma=
new g;this.Dma.set("type","video/webm")});a.prototype.get=function(k,e){switch(k){case "levels":e=[];var b=this.get("mp4Url");b&&(this.Wha.set("url",b),e.push(this.Wha));if(b=this.get("oggUrl"))this.aia.set("url",b),e.push(this.aia);if(b=this.get("webmUrl"))this.Dma.set("url",b),e.push(this.Dma);e.forEach(function(c){c.set("width",this.get("width"));c.set("height",this.get("height"))}.bind(this))}return m.prototype.get.call(this,k,e)};a.prototype.rl=function(){var k=this.get("webmUrl"),e=this.get("oggUrl"),
b=this.get("mp4Url");return b&&n.i8?b:k&&n.Noa?k:e&&n.Moa?e:b||k||e};return a});define("tdv/player/script/VignetteModel3DPostprocessing",["require","tdv/player/parser/ClassInfo","tdv/player/script/Model3DPostprocessing"],function(a){var m=a("tdv/player/parser/ClassInfo"),h=a("tdv/player/script/Model3DPostprocessing");return m.define("VignetteModel3DPostprocessing",h,function(){h.call(this)})});
define("tdv/view/html/WebFrame","require exports tdv/constants/EventName tdv/player/view/util/Device tdv/player/view/util/URL tdv/view/core/UIComponent tdv/view/helpers/DOMUpdateQueue tdv/view/core/visuals/VisualsType".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){var f=c.call(this)||this;f.gf("WebFrame");f.Md=null;f.Nc=null;f.Aj=null;f.cT=null;f.tia=f.tia.bind(f);f.p3=f.p3.bind(f);f.bind(h.od,f.V5a,f,!0);f.bind(h.jd,f.U5a,f,!0);return f}P(d,c);d.prototype.Pb=function(){c.prototype.Pb.call(this);
this.m("url");this.m("allowTopNavigation",!0);this.m("backgroundColor","#ffffff");this.m("insetBorder",!1);this.m("scrollEnabled",!0);this.m("unloadWhenHidden",!0)};d.prototype.x8=function(f,l){return f.getType()!==b.DOM?!1:c.prototype.x8.call(this,f,l)};d.prototype.V5a=function(){this.yD("url")};d.prototype.U5a=function(){this.yD("url")};d.prototype.Kb=function(){c.prototype.Kb.call(this);this.Md||(this.Md=document.createElement("div"),this.Md.style.position="absolute",this.Md.style.left="0",this.Md.style.top=
"0",this.Md.style.width="100%",this.Md.style.height="100%",this.wa().tk(this.Md));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.Md.appendChild(this.Nc));this.Aj||(this.Aj=document.createElement("div"),
this.Aj.style.textShadow="0 0 5px rgba(255,255,255,0.5)",this.Aj.style.display="none",this.Aj.style.color="#000000",this.Aj.style.fontWeight="300",this.Aj.style.fontFamily="Tahoma, Geneva, sans-serif",this.Aj.style.fontSize=n.ub()?"5vmin":"20px",this.Aj.style.position="absolute",this.Aj.style.top="50%",this.Aj.style.left="50%",this.Aj.style.textAlign="center",this.Aj.style.transform="translate(-50%, -50%)",this.Aj.style.width="90%",this.Md.appendChild(this.Aj))};d.prototype.jb=function(){if(this.S("url")){var f=
this.G("url");f&&this.Py?this.PEa(f):(!f||this.get("unloadWhenHidden"))&&this.PEa("");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.Md.style.overflow=f?"auto":"hidden",this.Md.style["-webkit-overflow-scrolling"]=f?"touch":"auto",this.$("scrollEnabled"));c.prototype.jb.call(this)};d.prototype.ou=function(){this.Nc&&e.Udb(this.Nc,{width:this.nb()+"px",height:this.Mb()+"px"});c.prototype.ou.call(this)};d.prototype.refresh=function(){this.G("url")&&this.Py&&(this.sga(),this.nC(),this.Ala(),this.Nc.setAttribute("src",
""),setTimeout(function(){this.yFa();this.dwa();this.Nc.setAttribute("src",this.G("url"))}.bind(this),30))};d.prototype.PEa=function(f){this.Nc.getAttribute("src")!=f&&(this.sga(),f?(this.yFa(),this.dwa()):(this.nC(),this.Ala()),this.Nc.setAttribute("src",f))};d.prototype.tia=function(){this.cT=null;this.K3a()&&this.v9a()};d.prototype.p3=function(){this.sga();this.nC();this.Ala()};d.prototype.dwa=function(){this.Nc.addEventListener("load",this.p3)};d.prototype.Ala=function(){this.Nc.removeEventListener("load",
this.p3)};d.prototype.nC=function(){this.cT&&(clearTimeout(this.cT),this.cT=null)};d.prototype.yFa=function(){this.nC();this.cT=setTimeout(this.tia,d.cVa)};d.prototype.K3a=function(){if(window.location.protocol=="https:"){var f=this.Nc.getAttribute("src");if(g.parse(f).protocol!="https:")return!0}return!1};d.prototype.v9a=function(){this.Aj.textContent="A secure web page served over HTTPS can not display insecure content served over HTTP.";this.Aj.style.display="block"};d.prototype.sga=function(){this.Aj.style.display=
"none"};d.cVa=3E3;return d}(k)});define("tdv/player/script/WebFrame",["require","tdv/view/html/WebFrame","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/html/WebFrame");a=a("tdv/player/parser/ClassInfo").define("WebFrame",m,function(){m.call(this)});a.prototype.refresh=function(){m.prototype.refresh.call(this)};return a});
define("tdv/view/containers/windows/Window","require exports tdv/utils tdv/constants/EventName tdv/events/Event tdv/view/containers/Container tdv/view/containers/windows/BaseWindow".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.gf("Window");d.kga=0;d.lga=0;d.mFa=!1;d.Eka=!1;d.bind(n.$b,d.tbb,d,!1);d.bind(n.ma,d.qbb,d,!1);d.bind(n.$K,d.rbb,d,!1);d.bind(n.UQ,d.ubb,d,!1);d.h6=0;d.tg=new k;d.tg.xa({visible:!1,includeInLayout:!1,layout:"absolute",height:"100%",
width:"100%",backgroundOpacity:0,contentOpaque:!1});d.tg.bind(n.$b,d.yHa,d,!1);d.tg.bind(n.UQ,d.kbb,d,!1);d.tg.bind(n.$K,d.jbb,d,!1);d.tg.bind(n.ma,d.ibb,d,!1);d.tg.mb(d);return d}P(c,b);c.prototype.set=function(d,f){switch(d){case "maxWidth":this.Fma=f;this.Y5();break;case "maxHeight":this.Ema=f;this.Y5();break;case "shadow":this.mFa=f;this.sHa();break;default:b.prototype.set.call(this,d,f)}};c.prototype.show=function(d,f){this.M6(d);f&&this.Lcb();f=d.get("children");d.set("children",f.concat([this.tg]));
h.defer(function(){this.tg.set("visible",!0)}.bind(this))};c.prototype.oe=function(){this.L6();this.set("visible",!1)};c.prototype.M6=function(d){b.prototype.M6.call(this);this.Y5(d);this.tg.set("visible",!1);this.eYa()};c.prototype.L6=function(){b.prototype.L6.call(this);this.h6=0;this.e5(!1)};c.prototype.eYa=function(){var d=this.G("modal"),f=this.G("veilShowEffect"),l=this.G("veilHideEffect");d&&f?this.tg.set("showEffect",f):this.tg.set("showEffect",null);d&&l?this.tg.set("hideEffect",l):this.tg.set("hideEffect",
null)};c.prototype.Lcb=function(){this.set("centerX",0);this.set("centerY",0)};c.prototype.Pb=function(){this.Il(c.ad)};c.prototype.ibb=function(){this.h6++;setTimeout(function(){this.h6>0&&this.oe()}.bind(this),100)};c.prototype.qbb=function(){this.h6--};c.prototype.tza=function(d){this.kga=d.pageX;this.lga=d.pageY;this.Vb().bind(n.gb,this.KHa,this,!0);this.Vb().bind(n.$a,this.LHa,this,!0)};c.prototype.KHa=function(d){this.set("centerX",this.get("centerX")+(d.pageX-this.kga));this.set("centerY",
this.get("centerY")+(d.pageY-this.lga));this.kga=d.pageX;this.lga=d.pageY;this.rHa()};c.prototype.LHa=function(){this.Vb().h(n.gb,this.KHa,this);this.Vb().h(n.$a,this.LHa,this)};c.prototype.yHa=function(){this.Y5()};c.prototype.kbb=function(){this.set("visible",!0)};c.prototype.jbb=function(){this.tg.h(n.$b,this.yHa,this);var d=this.tg.getParent();d&&d.removeChild(this.tg);this.o(new g(n.CB))};c.prototype.tbb=function(){this.rHa()};c.prototype.ubb=function(){this.e5(!0)};c.prototype.rbb=function(){this.tg.set("visible",
!1)};c.prototype.e5=function(d){this.Eka=d;this.sHa()};c.prototype.sHa=function(){b.prototype.set.call(this,"shadow",this.Eka&&this.mFa)};c.prototype.fgb=function(d){if(this.Fma!==void 0)return this.Fma;if(d)return d.nb()};c.prototype.egb=function(d){if(this.Ema!==void 0)return this.Ema;if(d)return d.Mb()};c.prototype.Y5=function(d){d||(d=this.getParent());b.prototype.set.call(this,"maxWidth",this.fgb(d));b.prototype.set.call(this,"maxHeight",this.egb(d))};c.prototype.rHa=function(){var d=this.tg.nb(),
f=this.nb(),l=this.get("centerX");f=d*.5+l-f*.5;var p=this.Wm.u.Dd,q=this.Wm.nb(),r=Math.min(q,30);d=d-p-r;p=-(p+q-r);f<p?this.set("centerX",l+(p-f)):f>d&&this.set("centerX",l-(f-d));d=this.tg.Mb();f=this.Mb();l=this.get("centerY");f=d*.5+l-f*.5;p=this.Wm.u.ie;q=this.Wm.Mb();r=Math.min(q,5);d=d-p-r;p=-(p+q-r);f<p?this.set("centerY",l+(p-f)):f>d&&this.set("centerY",l-(f-d))};c.prototype.jb=function(){this.G("modal")?(this.Oc(c.vva,c.wva,[this.tg],!0,!0),this.tg.set("contentOpaque",!0)):(this.tg.set("backgroundOpacity",
0),this.tg.set("contentOpaque",!1));b.prototype.jb.call(this)};c.wva={veilOpacity:"backgroundOpacity",veilBlur:"backgroundBlur",veilColor:"backgroundColor",veilColorRatios:"backgroundColorRatios",veilColorDirection:"backgroundColorDirection"};c.vva=Object.keys(c.wva);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.vva),l=0;l<f.length;l++)d[f[l]]=void 0;return d}());return c}(e)});
define("tdv/player/script/Window",["require","tdv/view/containers/windows/Window","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/view/containers/windows/Window");a=a("tdv/player/parser/ClassInfo").define("Window",m,function(){m.call(this)});a.prototype.show=a.prototype.show;a.prototype.hide=a.prototype.oe;return a});
define("tdv/view/core/visuals/canvas/Layer",["require","exports","tdv/events/EventDispatcher"],function(a,m,h){return function(){function n(g){this.canvas=g.canvas||null;this.rect=g.rect;this.visibleRect=g.visibleRect||g.rect;this.opacity=g.opacity===void 0?1:g.opacity;this.layers=g.layers||[];this.tag=g.tag||"";this.WA=g.WA||n.SB;this.RD=g.RD||!1;this.M=g.M||new h;this.H9=g.H9||this;this.cursor=g.cursor||void 0}n.prototype.zQa=function(g,k,e){e===void 0&&(e=null);var b=this.rect.QSa(g,k),c=this.visibleRect.QSa(g,
k);if(e!==null&&!e.contains(c))if(e.Xoa(c))c=c.intersection(e);else return null;return new n({canvas:this.canvas||void 0,rect:b,visibleRect:c,opacity:this.opacity,tag:this.tag,layers:this.layers.map(function(d){return d.zQa(g,k,e)}).filter(function(d){return d!==null}),M:this.M,WA:this.WA,RD:this.RD,cursor:this.cursor,H9:this.H9})};n.SB=0;n.nua=1;n.SQ=2;return n}()});
define("tdv/view/core/visuals/canvas/Rect",["require","exports"],function(){return function(){function a(m,h,n,g){this.left=m;this.top=h;this.width=n;this.height=g;this.right=m+n;this.bottom=h+g}a.prototype.equals=function(m){return this.left===m.left&&this.top===m.top&&this.width===m.width&&this.height===m.height};a.prototype.Xoa=function(m){return this.left<m.right&&this.top<m.bottom&&this.right>m.left&&this.bottom>m.top};a.prototype.containsPoint=function(m,h){return this.left<=m&&m<=this.right&&
this.top<=h&&h<=this.bottom};a.prototype.contains=function(m){return this.left<=m.left&&this.top<=m.top&&this.right>=m.right&&this.bottom>=m.bottom};a.prototype.intersection=function(m){var h=this.left>m.left?this.left:m.left,n=this.top>m.top?this.top:m.top;return new a(h,n,(this.right<m.right?this.right:m.right)-h,(this.bottom<m.bottom?this.bottom:m.bottom)-n)};a.prototype.union=function(m){var h=this.left<m.left?this.left:m.left,n=this.top<m.top?this.top:m.top;return new a(h,n,(this.right>m.right?
this.right:m.right)-h,(this.bottom>m.bottom?this.bottom:m.bottom)-n)};a.prototype.QSa=function(m,h){return new a(this.left+m,this.top+h,this.width,this.height)};a.union=function(m){if(m.length===0)return new a(0,0,0,0);for(var h=m[0].left,n=m[0].top,g=m[0].right,k=m[0].bottom,e=1;e<m.length;e++)h=Math.min(h,m[e].left),n=Math.min(n,m[e].top),g=Math.max(g,m[e].right),k=Math.max(k,m[e].bottom);return new a(h,n,g-h,k-n)};a.merge=function(m){for(var h=0;h<m.length;){for(var n=h+1;n<m.length;){if(m[h].Xoa(m[n])){m=
[m[h].union(m[n])].concat(m.slice(0,h)).concat(m.slice(h+1,n)).concat(m.slice(n+1));h=-1;break}n++}h++}return m};return a}()});
define("tdv/view/core/visuals/canvas/LayerComposer",["require","exports","tdv/view/core/visuals/canvas/Layer","tdv/view/core/visuals/canvas/Rect"],function(a,m,h,n){return function(){function g(){this.vP=!1;this.HW=this.canvas=this.eJ=null;this.layers=[]}g.prototype.clear=function(){this.canvas&&(this.canvas.width=0,this.canvas.height=0);this.HW=null;this.layers=[]};g.prototype.compose=function(k,e,b){var c=this;this.canvas||(this.canvas=document.createElement("canvas"));var d=n.union(k.map(function(p){return p.visibleRect}));
if(b){b=Math.pow(2,Math.ceil(Math.log(d.width)/Math.log(2)));var f=Math.pow(2,Math.ceil(Math.log(d.height)/Math.log(2)));d=new n(Math.floor(d.left-(b-d.width)/2),Math.floor(d.top-(f-d.height)/2),b,f)}b=[];if(this.HW&&this.HW.equals(d)){b=k.filter(function(p){return!c.layers.includes(p)});f=this.layers.filter(function(p){return!k.includes(p)});if(b.length==0&&f.length==0)return new h({canvas:this.canvas,rect:d,opacity:e,tag:"composed",layers:k});b=n.merge(b.map(function(p){return p.visibleRect}).concat(f.map(function(p){return p.visibleRect})))}else this.HW=
d,this.canvas.width=d.width,this.canvas.height=d.height,b.push(d);this.layers=k;if(b){var l=this.canvas.getContext("2d");b.forEach(function(p){l.clearRect(p.left-d.left,p.top-d.top,p.width,p.height);k.forEach(function(q){if(q.canvas&&p.Xoa(q.visibleRect)&&q.visibleRect.width!=0&&q.visibleRect.height!=0){var r=q.visibleRect.intersection(p);l.globalAlpha=q.opacity;l.drawImage(q.canvas,r.left-q.rect.left,r.top-q.rect.top,r.width,r.height,r.left-d.left,r.top-d.top,r.width,r.height)}})})}return new h({canvas:this.canvas,
rect:this.HW,opacity:e,tag:"composed",layers:k})};return g}()});
define("tdv/view/core/visuals/canvas/CanvasUIBaseVisuals","require exports tdv/view/constants/GradientDirection tdv/view/core/visuals/Visuals tdv/view/core/visualprops/UIBaseVisualProperties tdv/view/core/visuals/util tdv/constants/EventName tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/core/visuals/canvas/LayerComposer tdv/events/EventDispatcher tdv/player/view/util/Color".split(" "),function(a,m,h,n,g,k,e,b,c,d,f,l){return function(p){function q(){var r=p.call(this)||
this;r.vP=!1;r.opacity=1;r.visible=!1;r.BQa=0;r.CQa=0;r.FTa=null;r.mNa=new d;r.eJ=null;r.layers=null;r.AO=null;r.Xq=null;r.lJ=null;r.i7=null;r.VO=new f;r.children=[];r.MO=new Map;r.AZ=new Map;r.Rna=b.SQ;r.Qna=!0;r.cursor=void 0;return r}P(q,p);q.prototype.tp=function(){return new g};q.prototype.Lkb=function(){this.vP!=1&&(this.vP=!0,this.vP||(this.mNa.clear(),this.eJ=null))};q.prototype.tk=function(){throw Error("Invalid call to CanvasUIBaseVisuals.appendContent");};q.prototype.Y9=function(){throw Error("Invalid call to CanvasUIBaseVisuals.removeContent");
};q.prototype.cc=function(){throw Error("Invalid call to CanvasUIBaseVisuals.getElement");};q.prototype.afb=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.eJ)return[this.eJ];if(this.layers)return this.layers;this.layers=this.qt();return this.vP||this.opacity<1?(this.eJ=this.mNa.compose(this.layers,this.opacity,this.vP),[this.eJ]):this.layers};q.prototype.CLa=function(r){return this.zKa(r,this.getLayers())};
q.prototype.GLa=function(r){var t=this.lJ&&r.CLa(this.lJ);r=r.lJ;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.f9,this,!0);this.TE()};q.prototype.JMa=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.f9,this,!0);this.TE()};q.prototype.KMa=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.f9,this,!0);this.TE()};q.prototype.removeChild=function(r){var t=this.children.indexOf(r);t!==-1&&(r.h(e.V,this.f9,this),this.children.splice(t,1),this.gJa(r),this.TE())};q.prototype.n$=function(r,t){if(this.Rna!==r||this.Qna!==t)this.Rna=r,this.Qna=t,this.naa(),this.TE()};q.prototype.f9=function(r){this.gJa(r.source);this.TE()};q.prototype.gJa=function(r){var t=this;if(this.MO.has(r)){var u=this.MO.get(r);this.MO.delete(r);u.forEach(function(v){t.AZ.delete(v)})}};q.prototype.update=
function(r){var t=this.rh(r);this.oSa(r);t&&this.TE()};q.prototype.qt=function(){var r=this,t=[];this.lJ&&t.push(this.lJ);this.AO&&t.push(this.AO);this.children.forEach(function(u){if(r.MO.has(u))var v=r.MO.get(u);else v=u.getLayers(),r.MO.set(u,v);v.forEach(function(w){if(r.AZ.has(w))var x=r.AZ.get(w);else x=r.NY(w),r.AZ.set(w,x);x!==null&&t.push(x)})});return t};q.prototype.NY=function(r){return r.zQa(Math.round(this.BQa),Math.round(this.CQa),this.FTa)};q.prototype.TE=function(){this.eJ=this.layers=
null;this.o(e.V)};q.prototype.zKa=function(r,t){for(var u=null,v=0;v<t.length&&!u;v++)t[v].H9===r&&(u=t[v]);for(v=0;v<t.length&&!u;v++)u=this.zKa(r,t[v].layers);return u};q.prototype.rh=function(r){var t=!1;t=this.mnb(r)||t;(t=this.knb(r)||t)&&this.lnb();var u=this.Jsa(r);u&&this.AZ.clear();var v=this.dob(r);(r=this.wnb(r))&&this.naa();return t||u||v||r};q.prototype.Jsa=function(r){if(this.K.x!==r.x||this.K.y!==r.y||this.K.width!==r.width||this.K.height!==r.height||this.K.offsetX!==r.offsetX||this.K.offsetY!==
r.offsetY||this.K.Iw!==r.Iw||this.K.Dd!==r.Dd||this.K.ie!==r.ie||this.K.Ce!==r.Ce||this.K.Df!==r.Df||this.K.Kc!==r.Kc||this.K.Lc!==r.Lc){var t=(r.x||0)+r.offsetX,u=(r.y||0)+r.offsetY,v=r.width,w=r.height;this.FTa=r.Iw?null:new c(t+r.Dd,u+r.ie,v-r.Ce-r.Dd,w-r.Df-r.ie);this.BQa=t+r.Dd-r.Kc;this.CQa=u+r.ie-r.Lc;return!0}return!1};q.prototype.mnb=function(r){if(this.K.x!==r.x||this.K.y!==r.y||this.K.offsetX!==r.offsetX||this.K.offsetY!==r.offsetY){var t=r.kB&&r.Zw>0,u=t?Math.max(0,-r.hu+r.eo):0;this.ocb=
(r.x||0)+r.offsetX-(t?Math.max(0,-r.gu+r.eo):0);this.pcb=(r.y||0)+r.offsetY-u;return!0}return!1};q.prototype.knb=function(r){var t=r.uk&&r.uk.length>0,u=!!r.Zv,v=r.nm>0&&(r.Te>0&&r.borderLeftColor||r.Ue>0&&r.borderTopColor||r.xf>0&&r.borderRightColor||r.wf>0&&r.borderBottomColor);if(!r.visible||!(t||u||v)){if(this.K.visible&&this.AO)return this.Xq&&(this.Xq.width=0,this.Xq.height=0),this.AO=null,!0}else if(this.K.visible!==r.visible||this.K.width!==r.width||this.K.height!==r.height||this.K.uk!==r.uk||
this.K.OD!==r.OD||this.K.nm!==r.nm||this.K.Te!==r.Te||this.K.borderLeftColor!==r.borderLeftColor||this.K.Ue!==r.Ue||this.K.borderTopColor!==r.borderTopColor||this.K.xf!==r.xf||this.K.borderRightColor!==r.borderRightColor||this.K.wf!==r.wf||this.K.borderBottomColor!==r.borderBottomColor||this.K.Zv!==r.Zv||this.K.kB!==r.kB||this.K.gu!==r.gu||this.K.hu!==r.hu||this.K.eo!==r.eo||this.K.uK!==r.uK||this.K.shadowColor!==r.shadowColor||this.K.Zw!==r.Zw){this.Xq||(this.Xq=document.createElement("canvas"));
var w=this.Xq,x=r.kB&&r.Zw>0,y=x?Math.max(0,-r.gu+r.eo):0,z=x?Math.max(0,-r.hu+r.eo):0,A=x?Math.max(0,r.hu+r.eo):0;w.width=r.width+y+(x?Math.max(0,r.gu+r.eo):0);w.height=r.height+z+A;A=w.getContext("2d");A.clearRect(0,0,w.width,w.height);var D=Math.min(Math.floor(r.width/2),Math.floor(r.height/2));w=Math.min(D,r.borderTopLeftRadius);var F=Math.min(D,r.borderTopRightRadius),C=Math.min(D,r.borderBottomRightRadius);D=Math.min(D,r.borderBottomLeftRadius);var B=[Math.max(0,w-Math.max(r.Ue,r.Te)),Math.max(0,
F-Math.max(r.Ue,r.xf)),Math.max(0,C-Math.max(r.wf,r.xf)),Math.max(0,D-Math.max(r.wf,r.Te))],H=[w,F,C,D];if(x){x=A.globalAlpha;A.globalAlpha=r.Zw;A.fillStyle=r.shadowColor;A.shadowColor=r.shadowColor;A.shadowBlur=r.eo;A.shadowOffsetX=r.gu;A.shadowOffsetY=r.hu;A.beginPath();A.roundRect(y,z,r.width,r.height,H);A.fill();A.shadowColor="rgba(0, 0, 0, 0)";var E=A.globalCompositeOperation;A.globalCompositeOperation="destination-out";A.globalAlpha=1;A.fillStyle="#ffffff";A.beginPath();A.roundRect(y,z,r.width,
r.height,H);A.fill();A.globalCompositeOperation=E;A.globalAlpha=x}A.translate(y,z);E=B.some(function(R){return R>0});if(t||u){x=A.globalAlpha;A.globalAlpha=r.nm;A.translate(r.Te,r.Ue);var G=Math.max(0,r.width-(r.Te+r.xf)),N=Math.max(0,r.height-(r.Ue+r.wf));if(t){var O=r.OD==h.o_?A.createLinearGradient(0,0,G,0):A.createLinearGradient(0,0,0,N);k.QIa(r).forEach(function(R){O.addColorStop(R.ratio,R.color)});A.fillStyle=O;A.roundRect(0,0,G,N,B);A.fill()}u&&(E&&(A.save(),A.roundRect(0,0,G,N,B),A.clip()),
A.drawImage(r.Zv,0,0,G,N),E&&A.restore());A.translate(-r.Te,-r.Ue);A.globalAlpha=x}v&&(t=[[0,w],[w,0],[r.width-F,0],[r.width,F],[r.width,r.height-C],[r.width-C,r.height],[D,r.height],[0,r.height-D]],u=[[r.Te,r.Ue+B[0]],[r.Te+B[0],r.Ue],[r.width-r.xf-B[1],r.Ue],[r.width-r.xf,r.Ue+B[1]],[r.width-r.xf,r.height-r.wf-B[2]],[r.width-r.xf-B[2],r.height-r.wf],[r.Te+B[3],r.height-r.wf],[r.Te,r.height-r.wf-B[3]]],v=[[0,0],[r.width,0],[r.width,r.height],[0,r.height]],x=[[r.Te,r.Ue],[r.width-r.xf,r.Ue],[r.width-
r.xf,r.height-r.wf],[r.Te,r.height-r.wf]],r.Ue>0&&(A.beginPath(),A.moveTo(t[1][0],t[1][1]),A.lineTo(t[2][0],t[2][1]),A.lineTo(u[2][0],u[2][1]),A.lineTo(u[1][0],u[1][1]),A.fillStyle=l.haa(r.borderTopColor,r.nm),A.fill()),F>0&&(A.beginPath(),A.moveTo(t[2][0],t[2][1]),A.arcTo(v[1][0],v[1][1],t[3][0],t[3][1],H[1]),A.lineTo(u[3][0],u[3][1]),B[1]>0?A.arcTo(x[1][0],x[1][1],u[2][0],u[2][1],B[1]):A.lineTo(u[2][0],u[2][1]),A.fillStyle=r.borderTopColor||r.borderRightColor,A.fill()),r.xf>0&&(A.beginPath(),A.moveTo(t[3][0],
t[3][1]),A.lineTo(t[4][0],t[4][1]),A.lineTo(u[4][0],u[4][1]),A.lineTo(u[3][0],u[3][1]),A.fillStyle=l.haa(r.borderRightColor,r.nm),A.fill()),C>0&&(A.beginPath(),A.moveTo(t[4][0],t[4][1]),A.arcTo(v[2][0],v[2][1],t[5][0],t[5][1],H[2]),A.lineTo(u[5][0],u[5][1]),B[2]>0?A.arcTo(x[2][0],x[2][1],u[4][0],u[4][1],B[2]):A.lineTo(u[4][0],u[4][1]),A.fillStyle=r.borderBottomColor||r.borderRightColor,A.fill()),r.wf>0&&(A.beginPath(),A.moveTo(t[5][0],t[5][1]),A.lineTo(t[6][0],t[6][1]),A.lineTo(u[6][0],u[6][1]),A.lineTo(u[5][0],
u[5][1]),A.fillStyle=l.haa(r.borderBottomColor,r.nm),A.fill()),D>0&&(A.beginPath(),A.moveTo(t[6][0],t[6][1]),A.arcTo(v[3][0],v[3][1],t[7][0],t[7][1],H[3]),A.lineTo(u[7][0],u[7][1]),B[3]>0?A.arcTo(x[3][0],x[3][1],u[6][0],u[6][1],B[3]):A.lineTo(u[6][0],u[6][1]),A.fillStyle=r.borderBottomColor||r.borderLeftColor,A.fill()),r.Te>0&&(A.beginPath(),A.moveTo(t[7][0],t[7][1]),A.lineTo(t[0][0],t[0][1]),A.lineTo(u[0][0],u[0][1]),A.lineTo(u[7][0],u[7][1]),A.fillStyle=l.haa(r.borderLeftColor,r.nm),A.fill()),w>
0&&(A.beginPath(),A.moveTo(t[0][0],t[0][1]),A.arcTo(v[0][0],v[0][1],t[1][0],t[1][1],H[0]),A.lineTo(u[1][0],u[1][1]),B[0]>0?A.arcTo(x[0][0],x[0][1],u[0][0],u[0][1],B[0]):A.lineTo(u[0][0],u[0][1]),A.fillStyle=r.borderTopColor||r.borderLeftColor,A.fill()));A.translate(-y,-z);return!0}return!1};q.prototype.wnb=function(r){return this.K.visible!==r.visible||this.K.x!==r.x||this.K.y!==r.y||this.K.width!==r.width||this.K.height!==r.height||this.K.offsetX!==r.offsetX||this.K.offsetY!==r.offsetY||this.K.cursor!==
r.cursor?(r.visible?(this.i7=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.i7=null,this.cursor="inherit"),!0):!1};q.prototype.dob=function(r){return this.K.opacity!==r.opacity||this.K.visible!==r.visible?(this.opacity=r.opacity,this.visible=r.visible,!0):!1};q.prototype.lnb=function(){if(this.Xq&&this.Xq.width>0&&this.Xq.height>0){var r=new c(this.ocb,this.pcb,this.Xq.width,this.Xq.height);this.AO=new b({canvas:this.Xq,rect:r,tag:"background"})}else this.AO=
null};q.prototype.naa=function(){this.lJ=this.i7?new b({rect:this.i7,tag:"element",WA:this.Rna,RD:this.Qna,M:this.VO,cursor:this.cursor}):null};return q}(n)});
define("tdv/view/core/visuals/canvas/CanvasCanvasVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/CanvasVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect".split(" "),function(a,m,h,n,g,k){return function(e){function b(){return e.call(this)||this}P(b,e);b.prototype.tp=function(){return new n};b.prototype.qt=function(){var c=e.prototype.qt.call(this);if(this.gna){var d=this.NY(this.gna);d&&c.push(d)}return c};b.prototype.rh=
function(c){var d=e.prototype.rh.call(this,c);this.Lp(c)&&(d=!0,this.canvas&&this.canvas.width>0&&this.canvas.height>0?(c=new k(this.Icb,this.Jcb,this.canvas.width,this.canvas.height),this.gna=new g({canvas:this.canvas,rect:c,tag:"canvas"})):this.gna=null);return d};b.prototype.Lp=function(c){if(!c.visible||!c.canvas){if(this.K.visible&&this.K.canvas&&this.K.canvas.width>0&&this.K.canvas.height>0)return this.canvas=null,!0}else if(c.visible!==this.K.visible||c.canvas!==this.K.canvas||c.T6!==this.K.T6)return this.Jcb=
this.Icb=0,this.canvas=c.canvas,!0;return!1};return b}(h)});
define("tdv/view/core/visuals/canvas/CanvasContainerVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/ContainerVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/events/EventDispatcher".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.c8=null;d.vaa=null;d.er=null;d.yr=null;d.iMa=new e;d.CTa=new e;d.lgb=g.SQ;d.kgb=!1;d.hob=g.SQ;d.gob=!1;d.hMa=100;d.BTa=100;return d}
P(c,b);c.prototype.tp=function(){return new n};c.prototype.J7=function(){throw Error("Invalid call to CanvasContainerVisuals.getHScrollBarElement");};c.prototype.Y7=function(){throw Error("Invalid call to CanvasContainerVisuals.getVScrollBarElement");};c.prototype.qt=function(){var d=b.prototype.qt.call(this);this.c8&&d.push(this.c8);this.vaa&&d.push(this.vaa);return d};c.prototype.rh=function(d){var f=b.prototype.rh.call(this,d);this.Bnb(d)&&(f=!0,this.Cnb());this.bob(d)&&(f=!0,this.cob());return f};
c.prototype.Bnb=function(d){if(!d.Bk){if(this.K.Bk)return this.er&&(this.er.width=0,this.er.height=0),!0}else if(d.Bk!==this.K.Bk||d.x!==this.K.x||d.y!==this.K.y||d.offsetX!==this.K.offsetX||d.offsetY!==this.K.offsetY||d.width!==this.K.width||d.height!==this.K.height||d.contentWidth!==this.K.contentWidth||d.contentHeight!==this.K.contentHeight||d.Bk!==this.K.Bk||d.Kc!==this.K.Kc||d.Bf!==this.K.Bf||d.$t!==this.K.$t||d.Zt!==this.K.Zt||d.ph!==this.K.ph||d.Wn!==this.K.Wn||d.Xn!==this.K.Xn||d.Lk!==this.K.Lk||
d.Lc!==this.K.Lc){var f=d.Bk&&d.Lk;this.er||(this.er=document.createElement("canvas"));var l=this.er;f=d.width-d.Wn-((f?d.ph:0)+d.Wn);this.mgb=(d.x||0)+d.offsetX+d.Wn+Math.round(d.Kc*f/d.contentWidth);this.ngb=(d.y||0)+d.offsetY+d.height-d.Xn-d.ph;this.hMa=f;var p=Math.round(d.Bf*f/d.contentWidth),q=d.ph;f=l.getContext("2d");l.width=p;l.height=q;f&&(f.clearRect(0,0,l.width,l.height),f.fillStyle=d.Zt,p=f.globalAlpha,f.beginPath(),f.globalAlpha=d.$t,f.roundRect(0,0,l.width,l.height,d.ph/2),f.fill(),
f.globalAlpha=p);return!0}return!1};c.prototype.bob=function(d){if(!d.Lk){if(this.K.Lk)return this.yr&&(this.yr.width=0,this.yr.height=0),!0}else if(d.Lk!==this.K.Lk||d.x!==this.K.x||d.y!==this.K.y||d.offsetX!==this.K.offsetX||d.offsetY!==this.K.offsetY||d.width!==this.K.width||d.height!==this.K.height||d.contentWidth!==this.K.contentWidth||d.contentHeight!==this.K.contentHeight||d.Bk!==this.K.Bk||d.Kc!==this.K.Kc||d.Bf!==this.K.Bf||d.$t!==this.K.$t||d.Zt!==this.K.Zt||d.ph!==this.K.ph||d.Wn!==this.K.Wn||
d.Xn!==this.K.Xn||d.Lk!==this.K.Lk||d.Lc!==this.K.Lc){var f=d.Bk&&d.Lk;this.yr||(this.yr=document.createElement("canvas"));var l=this.yr,p=d.height-d.Xn-((f?d.ph:0)+d.Xn);this.job=(d.y||0)+d.offsetY+d.Xn+Math.round(d.Lc*p/d.contentHeight);this.iob=(d.x||0)+d.offsetX+d.width-d.Wn-d.ph;this.BTa=p;f=d.ph;var q=Math.round(d.Wg*p/d.contentHeight);p=l.getContext("2d");l.width=f;l.height=q;p&&(p.clearRect(0,0,l.width,l.height),p.fillStyle=d.Zt,f=p.globalAlpha,p.beginPath(),p.globalAlpha=d.$t,p.roundRect(0,
0,l.width,l.height,d.ph/2),p.fill(),p.globalAlpha=f);return!0}return!1};c.prototype.Cnb=function(){if(this.er&&this.er.width>0&&this.er.height>0){var d=new k(this.mgb,this.ngb,this.er.width,this.er.height);this.c8=new g({canvas:this.er,rect:d,WA:this.lgb,RD:this.kgb,tag:"hscroll",M:this.iMa})}else this.c8=null};c.prototype.cob=function(){if(this.yr&&this.yr.width>0&&this.yr.height>0){var d=new k(this.iob,this.job,this.yr.width,this.yr.height);this.vaa=new g({canvas:this.yr,rect:d,WA:this.hob,RD:this.gob,
tag:"vscroll",M:this.CTa})}else this.vaa=null};return c}(h)});
define("tdv/view/core/visuals/canvas/CanvasImageVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/ImageVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/constants/Alignment tdv/events/EventDispatcher".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){var f=c.call(this)||this;f.Toa=g.SB;f.Roa=!1;f.k8=new b;return f}P(d,c);d.prototype.kra=function(f,l){if(this.Toa!==f||this.Roa!==l)this.Toa=
f,this.Roa=l,this.wsa()};d.prototype.tp=function(){return new n};d.prototype.qt=function(){var f=c.prototype.qt.call(this);if(this.Soa){var l=this.NY(this.Soa);l&&f.push(l)}return f};d.prototype.rh=function(f){var l=c.prototype.rh.call(this,f);this.vsa(f)&&(l=!0,this.wsa());return l};d.prototype.naa=function(){c.prototype.naa.call(this);this.wsa()};d.prototype.wsa=function(){if(this.It&&this.It.width>0&&this.It.height>0){var f=new k(this.Tgb,this.Ugb,this.It.width,this.It.height);this.Soa=new g({canvas:this.It,
rect:f,opacity:1,WA:this.Toa,RD:this.Roa,M:this.k8,tag:"image",cursor:this.Vgb})}else this.Soa=null};d.prototype.vsa=function(f){if(!f.visible||!f.image){if(this.K.visible&&this.K.image)return this.It&&(this.It.width=0,this.It.height=0),!0}else if(f.visible!==this.K.visible||f.image!==this.K.image||f.cursor!==this.K.cursor||f.contentWidth!==this.K.contentWidth||f.contentHeight!==this.K.contentHeight||f.width!==this.K.width||f.height!==this.K.height||f.Dd!==this.K.Dd||f.Ce!==this.K.Ce||f.ie!==this.K.ie||
f.Df!==this.K.Df||f.borderTopLeftRadius!==this.K.borderTopLeftRadius||f.borderTopRightRadius!==this.K.borderTopRightRadius||f.borderBottomRightRadius!==this.K.borderBottomRightRadius||f.borderBottomLeftRadius!==this.K.borderBottomLeftRadius||f.Ue!==this.K.Ue||f.xf!==this.K.xf||f.wf!==this.K.wf||f.Te!==this.K.Te||f.Yh!==this.K.Yh||f.verticalAlign!==this.K.verticalAlign){this.Ugb=this.Tgb=0;this.It||(this.It=document.createElement("canvas"));var l=Math.min(Math.floor(f.width/2),Math.floor(f.height/
2));l=[Math.max(0,Math.min(l,f.borderTopLeftRadius)-Math.max(f.Ue,f.Te)),Math.max(0,Math.min(l,f.borderTopRightRadius)-Math.max(f.Ue,f.xf)),Math.max(0,Math.min(l,f.borderBottomRightRadius)-Math.max(f.wf,f.xf)),Math.max(0,Math.min(l,f.borderBottomLeftRadius)-Math.max(f.wf,f.Te))];var p=f.width-f.Dd-f.Ce,q=f.height-f.ie-f.Df,r=this.It;r.width=p;r.height=q;var t=r.getContext("2d");t.clearRect(0,0,r.width,r.height);switch(f.Yh){default:p=0;break;case e.Db:p-=f.contentWidth;break;case e.$e:p=Math.floor((p-
f.contentWidth)*.5)}switch(f.verticalAlign){default:q=0;break;case e.Gc:q-=f.contentHeight;break;case e.$d:q=Math.floor((q-f.contentHeight)*.5)}t.drawImage(f.image,p,q,f.contentWidth,f.contentHeight);t.fillStyle="#ffffff";t.globalCompositeOperation="destination-in";t.roundRect(0,0,r.width,r.height,l);t.fill();t.globalCompositeOperation="source-over";this.Vgb=f.cursor;return!0}return!1};return d}(h)});
define("tdv/view/core/visuals/canvas/CanvasLabelVisuals","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/LabelVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/util/Font tdv/view/util/MeasureText tdv/player/view/util/Color tdv/view/constants/Alignment".split(" "),function(a,m,h,n,g,k,e,b,c,d){return function(f){function l(){var p=f.call(this)||this;p.dF=document.createElement("canvas");p.mu=0;p.ju=0;return p}
P(l,f);l.prototype.tp=function(){return new n};l.prototype.xJ=function(){return this.mu};l.prototype.wJ=function(){return this.ju};l.prototype.qt=function(){var p=f.prototype.qt.call(this);if(this.isa){var q=this.NY(this.isa);q&&p.push(q)}return p};l.prototype.rh=function(p){var q=f.prototype.rh.call(this,p);this.Hsa(p)&&(q=!0,this.dF&&this.dF.width>0&&this.dF.height>0?(p=new k(this.mQ,this.nQ,this.BSa,this.ASa),this.isa=new g({canvas:this.dF,rect:p,opacity:1,tag:"text"})):this.isa=null);return q};
l.prototype.Hsa=function(p){if(p.visible&&p.text){var q=!1;if(p.visible!==this.K.visible||p.text!==this.K.text||p.direction!==this.K.direction||p.u7!==this.K.u7||p.yt!==this.K.yt||p.fontSize!==this.K.fontSize||p.fontFamily!==this.K.fontFamily||p.fontWeight!==this.K.fontWeight||p.fontStyle!==this.K.fontStyle||p.ku!==this.K.ku||p.lu!==this.K.lu||p.fo!==this.K.fo||p.bx!==this.K.bx||p.ax!==this.K.ax){var r=this.dF,t=p.bx>0;q=t?Math.max(0,-p.ku+p.fo):0;var u=t?Math.max(0,-p.lu+p.fo):0,v=t?Math.max(0,p.ku+
p.fo):0,w=t?Math.max(0,p.lu+p.fo):0,x=r.getContext("2d"),y=b(p.text,{fontSize:p.fontSize,fontFamily:p.fontFamily,fontWeight:p.fontWeight,fontStyle:p.fontStyle},x);this.mu=Math.round(y.width);this.ju=Math.round(y.height);this.BSa=this.mu+q+v;this.ASa=this.ju+u+w;r.width=this.BSa;r.height=this.ASa;x.clearRect(0,0,r.width,r.height);x.fillStyle=p.yt||"#000000";x.font=e.W7({fontSize:p.fontSize,fontFamily:p.fontFamily,fontWeight:p.fontWeight,fontStyle:p.fontStyle});x.textAlign="center";x.textBaseline="middle";
t?(x.shadowColor="rgba("+c.Dp(p.ax).concat([p.bx]).join(",")+")",x.shadowBlur=p.fo,x.shadowOffsetX=p.ku,x.shadowOffsetY=p.lu):x.shadowColor="rgba(0, 0, 0, 0)";x.fillText(p.text,q+Math.round(this.mu*.5),u+Math.round(this.ju*.5));q=!0}if(q||p.width!==this.K.width||p.height!==this.K.height||p.Dd!==this.K.Dd||p.ie!==this.K.ie||p.Ce!==this.K.Ce||p.Df!==this.K.Df||p.Yh!==this.K.Yh||p.verticalAlign!==this.K.verticalAlign){q=(t=p.bx>0)?Math.max(0,-p.ku+p.fo):0;u=t?Math.max(0,-p.lu+p.fo):0;r=p.width-p.Dd-
p.Ce;t=p.height-p.ie-p.Df;if(r<this.mu)this.mQ=0;else switch(p.Yh){case d.fb:this.mQ=0;break;case d.Db:this.mQ=r-this.mu;break;case d.$e:this.mQ=Math.round(r-this.mu)*.5}this.mQ=Math.round(this.mQ-q);if(t<this.ju)this.nQ=0;else switch(p.verticalAlign){case d.Tc:this.nQ=0;break;case d.Gc:this.nQ=t-this.ju;break;case d.$d:this.nQ=Math.round(t-this.ju)*.5}this.nQ=Math.round(this.nQ-u);q=!0}return q}return this.K.visible&&this.K.text?(this.dF&&(this.dF.width=0,this.ju=this.mu=this.dF.height=0),!0):!1};
return l}(h)});
define("tdv/view/core/visuals/canvas/FontInliner",["require","exports"],function(){function a(){var c=m();return Promise.all(c.map(n)).then(function(d){return d.join("\n")})}function m(){var c=[];Array.from(document.styleSheets).forEach(function(d){try{h(Array.from(d.cssRules),c)}catch(f){}});return c}function h(c,d){var f=this;c.forEach(function(l){l.type===CSSRule.FONT_FACE_RULE&&d.push(l);(l===null||l===void 0?0:l.cssRules)&&f.qqb(Array.from(l.cssRules),d)})}function n(c){var d=c.style.getPropertyValue("src"),
f=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi.exec(d);if(!f)return Promise.resolve(c.cssText);var l=f[2];return g(l).then(function(p){if(!p)return c.cssText;p=d.replace(l,p);return c.cssText.replace(d,p)})}function g(c){return b.has(c)?Promise.resolve(b.get(c)||null):fetch(c,{mode:"cors",credentials:"omit"}).then(function(d){return d.ok?d.blob().then(function(f){return new Promise(function(l,p){var q=new FileReader;q.onerror=function(){return p(Error("FileReader failed"))};q.onload=function(){l(q.result);
b.set(c,q.result)};q.readAsDataURL(f)})}):Promise.resolve(null)})}var k=null,e=null,b=new Map;return{getStyle:function(){return k?Promise.resolve(k):e?e:e=a().then(function(c){return k=c})}}});
define("tdv/view/core/visuals/canvas/rasterizer/htmlToSvg",["require","exports","tdv/view/core/visuals/canvas/FontInliner"],function(a,m,h){function n(d){var f=document.createElement("div");f.style.position="absolute";f.style.top="-9999px";f.style.left="-9999px";document.body.appendChild(f);d=d.cloneNode(!0);d.style.position="absolute";d.style.top="0px";d.style.left="0px";f.appendChild(d);return d}function g(d){var f;(f=d.parentElement)===null||f===void 0||f.removeChild(d);d.innerHTML=""}function k(d){d.querySelectorAll("img, canvas, video").forEach(function(f){f.remove()})}
function e(d){var f=new Set;d.querySelectorAll("*").forEach(function(l){l.style&&(l=getComputedStyle(l),l.font&&f.add(l.font))});return f}function b(d,f,l){return h.getStyle().then(function(p){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+f+'" height="'+l+'"><style>'+p+'</style><foreignObject x="0" y="0" width="100%" height="100%">'+d+"</foreignObject></svg>"})}function c(d){d=e(d);return Promise.all(Array.from(d).map(function(f){return document.fonts.load(f)}))}return function(d,f){var l=
n(d);k(l);return c(l).then(function(){if(f.aborted)throw Error("Aborted");return(new XMLSerializer).serializeToString(l).replace(/#/g,"%23").replace(/\n/g,"%0A")}).then(function(p){if(f.aborted)throw Error("Aborted");var q=l.getBoundingClientRect(),r=l.parentElement;g(l);g(r);return b(p,q.width,q.height)})}});
define("tdv/view/core/visuals/canvas/rasterizer/svgToCanvas",["require","exports"],function(a){function m(f){for(var l=0,p=0;p<f.length;p++)l=(l<<5)-l+f.charCodeAt(p),l&=l;return l.toString(36)}function h(f,l){return(new Promise(function(p,q){if(l.aborted)q(Error("Aborted"));else{var r=document.createElement("img");r.onload=function(){p(r)};r.src="data:image/svg+xml;charset=utf-8,"+f}})).then(function(p){if(l.aborted)throw Error("Aborted");return n(p,l)})}function n(f,l){return new Promise(function(p,
q){c.push({FJ:f,Cbb:l,resolve:p,reject:q});c.length===1&&k.requestFrame(g)})}function g(){for(var f=Date.now()+d;Date.now()<f&&c.length>0;){var l=c.shift();if(l.Cbb.aborted)l.reject(Error("Aborted"));else{var p=document.createElement("canvas");p.width=l.FJ.width;p.height=l.FJ.height;p.getContext("2d").drawImage(l.FJ,0,0);l.resolve(p)}}c.length>0&&k.requestFrame(g)}var k=a("tdv/view/util/Animation"),e=new Map,b=0,c=[],d=1E3/60*.5;return function(f,l){var p=m(f),q=e.get(p);return q?(q.opa=Date.now(),
Promise.resolve(q.canvas)):h(f,l).then(function(r){for(var t=r.width*r.height;b+t>67108864&&e.size>0;){for(var u=null,v=Infinity,w=0,x=Array.from(e.entries());w<x.length;w++){var y=x[w],z=y[0];y=y[1];y.opa<v&&(v=y.opa,u=z)}u&&(y=e.get(u),b-=y.canvas.width*y.canvas.height,y.canvas.width=0,y.canvas.height=0,e.delete(u))}e.set(p,{canvas:r,opa:Date.now()});b+=t;return r})}});
define("tdv/view/core/visuals/canvas/rasterizer/ElementObserver",["require","exports","tdv/utils"],function(a,m,h){return function(){function n(g){var k=this;this.element=null;this.onChange=h.jsa(g,1);this.o9=this.o9.bind(this);this.Uoa=[];this.KNa=new MutationObserver(function(){k.wib()});this.aQa=new ResizeObserver(function(){k.sl()})}n.prototype.observe=function(g){this.element&&this.disconnect();if(this.element=g)this.xsa(),this.KNa.observe(g,{subtree:!0,childList:!0,attributes:!0}),this.aQa.observe(g)};
n.prototype.disconnect=function(){this.KNa.disconnect();this.aQa.disconnect();this.element=null;this.xsa()};n.prototype.wib=function(){this.xsa();this.onChange()};n.prototype.sl=function(){this.onChange()};n.prototype.o9=function(){this.onChange()};n.prototype.xsa=function(){var g=this,k=this.element?Array.from(this.element.querySelectorAll("img")):[],e=k.filter(function(c){return!g.Uoa.includes(c)}),b=this.Uoa.filter(function(c){return!k.includes(c)});e.forEach(function(c){c.addEventListener("load",
g.o9)});b.forEach(function(c){c.removeEventListener("load",g.o9)});this.Uoa=k};return n}()});
define("tdv/view/core/visuals/canvas/rasterizer/Rasterizer","require exports tdv/events/EventDispatcher tdv/constants/EventName tdv/view/core/visuals/canvas/rasterizer/htmlToSvg tdv/view/core/visuals/canvas/rasterizer/svgToCanvas tdv/view/core/visuals/canvas/rasterizer/ElementObserver".split(" "),function(a,m,h,n,g,k,e){return function(b){function c(){var d=b.call(this)||this;d.element=null;d.canvas=null;d.lOa=new e(d.pOa.bind(d));return d}P(c,b);c.prototype.clear=function(){this.ZQa(null)};c.prototype.ZQa=
function(d){this.element!==d&&(this.element&&this.lOa.disconnect(),(this.element=d)?(this.lOa.observe(this.element),this.pOa()):(this.canvas=null,this.rO&&(this.rO.abort(),this.rO=null)))};c.prototype.If=function(){return this.canvas};c.prototype.pOa=function(){var d=this;this.rO&&this.rO.abort();this.rO=new AbortController;var f=this.rO.signal;g(this.element,f).then(function(l){if(f.aborted)throw Error("Aborted");return k(l,f)}).then(function(l){if(f.aborted)throw Error("Aborted");d.canvas=l;d.o(n.V)}).catch(function(){})};
return c}(h)});
define("tdv/view/core/visuals/canvas/CanvasHTMLVisuals","require exports tdv/constants/EventName tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visualprops/HTMLVisualProperties tdv/view/core/visuals/canvas/Layer tdv/view/core/visuals/canvas/Rect tdv/view/core/visuals/canvas/rasterizer/Rasterizer".split(" "),function(a,m,h,n,g,k,e,b){return function(c){function d(){return c.call(this)||this}P(d,c);d.prototype.qoa=function(){var f,l=(f=this.eK)===null||f===void 0?void 0:f.If();return(l===
null||l===void 0?void 0:l.width)||0};d.prototype.poa=function(){var f,l=(f=this.eK)===null||f===void 0?void 0:f.If();return(l===null||l===void 0?void 0:l.height)||0};d.prototype.tp=function(){return new g};d.prototype.qt=function(){var f=c.prototype.qt.call(this);if(this.CMa){var l=this.NY(this.CMa);l&&f.push(l)}return f};d.prototype.rh=function(f){var l=c.prototype.rh.call(this,f);this.usa(f)&&(l=!0,this.JJa());return l};d.prototype.usa=function(f){var l;if(!f.visible||!f.td){if(this.K.visible&&
this.K.td)return(l=this.eK)===null||l===void 0||l.clear(),!0}else if(f.visible!==this.K.visible||f.td!==this.K.td)this.eK||(this.eK=new b,this.eK.bind(h.V,this.Cib,this,!0)),this.eK.ZQa(f.td);return!1};d.prototype.JJa=function(){var f,l=(f=this.eK)===null||f===void 0?void 0:f.If();this.CMa=l&&l.width>0&&l.height>0?new k({canvas:l,rect:new e(0,0,l.width,l.height),tag:"html"}):null};d.prototype.Cib=function(){this.JJa();this.TE()};return d}(n)});
define("tdv/view/core/visuals/canvas/CanvasVisualsFactory","require exports tdv/view/core/visuals/canvas/CanvasUIBaseVisuals tdv/view/core/visuals/canvas/CanvasCanvasVisuals tdv/view/core/visuals/canvas/CanvasContainerVisuals tdv/view/core/visuals/canvas/CanvasImageVisuals tdv/view/core/visuals/canvas/CanvasLabelVisuals tdv/view/core/visuals/canvas/CanvasHTMLVisuals tdv/view/core/UIComponent tdv/view/canvas/Canvas tdv/view/containers/Container tdv/view/html/HTML tdv/view/images/Image tdv/view/text/Label tdv/view/core/visuals/VisualsType".split(" "),
function(a,m,h,n,g,k,e,b,c,d,f,l,p,q,r){return function(){function t(){}t.prototype.create=function(u){if(u instanceof l)return new b;if(u instanceof d)return new n;if(u instanceof p)return new k;if(u instanceof q)return new e;if(u instanceof f)return new g;if(u instanceof c)return new h;throw Error("Invalid UI instance");};t.prototype.getType=function(){return r.lUa};t.tJ=function(){t.Qo||(t.Qo=new t);return t.Qo};return t}()});
define("tdv/view/core/eventmanager/xrinput/XRInputEventManager","require exports tdv/constants/EventName tdv/view/core/visuals/canvas/Layer tdv/view/events/MouseEvent tdv/view/util/UserInitiatedAction".split(" "),function(a,m,h,n,g,k){return function(){function e(b,c){this.UNa=0;this.component=b;this.HJ=void 0;this.oB=c;this.rE=k.Tsa(this.rE.bind(this));this.HP=k.Tsa(this.HP.bind(this));this.sE=k.Tsa(this.sE.bind(this),!0)}e.prototype.hRa=function(b){this.HJ!==b&&((this.HJ=b)?this.Tna():this.XJa(),
this.Dsa())};e.prototype.Dsa=function(){this.wa().n$(this.HJ?n.SQ:n.SB,this.HJ?!0:!1)};e.prototype.oLa=function(){return this.HJ||!1};e.prototype.Ymb=function(b){this.component.o(new g(h.Sa,b.x,b.y,b.pageX,b.pageY))};e.prototype.Zmb=function(b){this.component.o(new g(h.gb,b.x,b.y,b.pageX,b.pageY))};e.prototype.$mb=function(b){this.component.o(new g(h.$a,b.x,b.y,b.pageX,b.pageY))};e.prototype.anb=function(b,c){this.component.o(new g(h.Qk,b.x,b.y,b.pageX,b.pageY,c.delta,c.lA))};e.prototype.Vmb=function(b){this.component.o(new g(h.ma,
b.x,b.y,b.pageX,b.pageY))};e.prototype.Wmb=function(b){this.component.o(new g(h.fi,b.x,b.y,b.pageX,b.pageY))};e.prototype.rE=function(b){this.wa().VO.bind(h.$a,this.sE,this,!0);this.WPa(b)};e.prototype.WPa=function(b,c){var d;c===void 0&&(c=!0);var f=this.mX(b);f!==null&&(c&&this.Zcb(f),this.Ymb(f),(d=this.sm())===null||d===void 0||d.WPa(b,c&&this.component.get("propagateClick")))};e.prototype.HP=function(b){this.component.Vb().PE(this.component);this.XPa(b)};e.prototype.XPa=function(b){var c,d=this.mX(b);
d!==null&&(this.Ycb(d),this.Zmb(d),(c=this.sm())===null||c===void 0||c.XPa(b))};e.prototype.sE=function(b){this.wa().VO.h(h.$a,this.sE,this);var c=this.mX(b);c!==null&&(this.YPa(b,this.rhb(c)),this.ehb(c))};e.prototype.YPa=function(b,c){var d,f=this.mX(b);f!==null&&(this.$mb(f),this.Xcb(c),(d=this.sm())===null||d===void 0||d.YPa(b,c))};e.prototype.Zcb=function(b){this.component.bind(h.Eb,this.mJa,this,!0);this.cJ=b};e.prototype.Ycb=function(b){this.cJ&&this.XKa(this.cJ,b)>20&&this.mna()};e.prototype.Xcb=
function(b){this.cJ&&(this.Vmb(this.cJ),b&&this.Wmb(this.cJ),this.mna())};e.prototype.mna=function(){this.cJ&&(this.component.h(h.Eb,this.mJa,this),this.cJ=void 0)};e.prototype.mJa=function(){this.mna()};e.prototype.aJa=function(){return!1};e.prototype.VNa=function(b){this.component.Vb().Rha&&this.ZPa(b)};e.prototype.ZPa=function(b){var c,d=this.mX(b);if(d!==null){var f=this.Dfb(b);this.anb(d,f);this.aJa(f)||(c=this.sm())===null||c===void 0||c.ZPa(b)}};e.prototype.mX=function(b){var c=this.oB.xfb(b.pageX,
b.pageY,this.wa().lJ);return c?{x:c.x,y:c.y,pageX:b.pageX,pageY:b.pageY}:null};e.prototype.Dfb=function(b){var c={};c.delta=Math.max(-1,Math.min(1,-b.delta));c.lA=c.delta;return c};e.prototype.wa=function(){return this.component.wa()};e.prototype.sm=function(){var b=this.component.getParent();if(b)return b.mLa()};e.prototype.Tna=function(){var b=this.wa().VO;b.bind(h.Sa,this.rE,this,!0);b.bind(h.gb,this.HP,this,!0);b.bind(h.Qk,this.VNa,this,!0)};e.prototype.XJa=function(){var b=this.wa().VO;b.h(h.Sa,
this.rE,this);b.h(h.gb,this.HP,this);b.h(h.Qk,this.VNa,this)};e.prototype.ehb=function(b){this.UNa=Date.now();this.TNa=b};e.prototype.rhb=function(b){return Date.now()-this.UNa>500||!this.TNa?!1:this.XKa(this.TNa,b)<=20};e.prototype.XKa=function(b,c){var d=b.pageX-c.pageX;b=b.pageY-c.pageY;return Math.sqrt(d*d+b*b)};return e}()});
define("tdv/view/core/eventmanager/xrinput/IconButtonXRInputEventManager",["require","exports","tdv/view/core/eventmanager/xrinput/XRInputEventManager","tdv/view/core/visuals/canvas/Layer","tdv/constants/EventName"],function(a,m,h,n,g){return function(k){function e(b,c){b=k.call(this,b,c)||this;b.MMa=!1;return b}P(e,k);e.prototype.wa=function(){return k.prototype.wa.call(this)};e.prototype.iRa=function(b){this.MMa=b;this.Dsa()};e.prototype.rE=function(b){this.wa().k8.bind(g.$a,this.sE,this,!0);k.prototype.rE.call(this,
b)};e.prototype.sE=function(b){this.wa().k8.h(g.$a,this.sE,this);k.prototype.sE.call(this,b)};e.prototype.Dsa=function(){this.HJ?this.MMa?(this.wa().n$(n.SQ,!0),this.wa().kra(n.SB,!1)):(this.wa().n$(n.SB,!1),this.wa().kra(n.nua,!0)):(this.wa().n$(n.SB,!1),this.wa().kra(n.SB,!1))};e.prototype.Tna=function(){k.prototype.Tna.call(this);var b=this.wa().k8;b.bind(g.Sa,this.rE,this,!0);b.bind(g.gb,this.HP,this,!0)};e.prototype.XJa=function(){var b=this.wa().VO;b.h(g.Sa,this.rE,this);b.h(g.gb,this.HP,this)};
return e}(h)});
define("tdv/view/core/eventmanager/xrinput/ScrollableContainerXRInputEventManager",["require","exports","tdv/constants/EventName","tdv/view/core/eventmanager/xrinput/XRInputEventManager","tdv/player/view/util/Device"],function(a,m,h,n,g){return function(k){function e(b,c){b=k.call(this,b,c)||this;b.fA=0;b.gA=0;b.Hpb=void 0;b.Ipb=void 0;b.uE=!1;b.vE=!1;b.rJa=0;b.EC=b.EC.bind(b);b.ID=b.ID.bind(b);b.Sna();return b}P(e,k);e.prototype.Sna=function(){this.wa().iMa.bind(h.Sa,this.EC,this,!1);this.wa().CTa.bind(h.Sa,
this.ID,this,!1);this.component.bind(h.Sa,this.idb,this,!1);this.component.bind(h.uc,this.Sda,this,!1);this.component.bind(h.Eb,this.Rda,this,!1);this.component.bind(h.Qk,this.jdb,this,!1)};e.prototype.wa=function(){return this.component.wa()};e.prototype.EC=function(){this.component.Vw(!0);this.uE=!0};e.prototype.ID=function(){this.component.Ww(!0);this.vE=!0};e.prototype.Sda=function(){this.component.$E(!0)};e.prototype.Rda=function(){this.component.$E(!1)};e.prototype.idb=function(b){this.component.fn||
this.component.gn?(this.oB.bind(h.gb,this.yJa,this,!1),this.oB.bind(h.$a,this.zJa,this,!1),this.fA=b.pageX,this.gA=b.pageY):this.hdb(b)};e.prototype.yJa=function(b){var c=0,d=0;this.uE&&(c=(b.pageX-this.fA)/this.wa().hMa);this.vE&&(d=(b.pageY-this.gA)/this.wa().BTa);this.fA=b.pageX;this.gA=b.pageY;c==0&&d==0||this.component.GP(c,d,"content")};e.prototype.zJa=function(){this.oB.h(h.gb,this.yJa,this);this.oB.h(h.$a,this.zJa,this);this.component.Vw(!1);this.component.Ww(!1);this.vE=this.uE=!1};e.prototype.aJa=
function(b){return b.delta>0&&this.component.JO()||b.delta<0&&this.component.HO()?!0:!1};e.prototype.jdb=function(b){b=(g.Nd()==g.p_?b.lA*.1:b.delta)*.3;this.component.GP(0,-b,"page")};e.prototype.hdb=function(b){if(this.component.IO()||this.component.KO())this.oB.bind(h.gb,this.wJa,this,!1),this.oB.bind(h.$a,this.xJa,this,!1),this.component.$E(!0),this.fA=b.pageX,this.gA=b.pageY,this.bhb()};e.prototype.wJa=function(b){var c=b.pageX-this.fA,d=b.pageY-this.gA;!this.uE&&!this.vE&&c*c+d*d>25&&(this.uE=
this.component.IO(),this.vE=this.component.KO(),this.component.Vw(this.uE),this.component.Ww(this.vE));if(this.uE||this.vE)this.component.GP(this.uE?-c:0,this.vE?-d:0),this.fA=b.pageX,this.gA=b.pageY,this.onb()};e.prototype.xJa=function(){this.oB.h(h.gb,this.wJa,this);this.oB.h(h.$a,this.xJa,this);this.component.$E(!1);var b=Math.max(Math.abs(this.uJa/.001),Math.abs(this.vJa/.001));this.component.hIa(-.5*this.uJa*b,-.5*this.vJa*b,b)};e.prototype.bhb=function(){this.sJa=this.fA;this.tJa=this.gA};e.prototype.onb=
function(){var b=(new Date).getTime(),c=b-this.rJa;c>10&&(this.rJa=b,this.uJa=(this.fA-this.sJa)/c,this.vJa=(this.gA-this.tJa)/c,this.sJa=this.fA,this.tJa=this.gA)};return e}(n)});
define("tdv/view/core/eventmanager/xrinput/XRInputEventManagerFactory","require exports tdv/view/core/UIComponent tdv/view/core/eventmanager/xrinput/XRInputEventManager tdv/view/core/eventmanager/xrinput/IconButtonXRInputEventManager tdv/view/core/eventmanager/xrinput/ScrollableContainerXRInputEventManager tdv/view/buttons/IconButton tdv/view/containers/ScrollableContainer".split(" "),function(a,m,h,n,g,k,e,b){return function(){function c(){}c.prototype.create=function(d,f){if(d instanceof e)return new g(d,
f[0]);if(d instanceof b)return new k(d,f[0]);if(d instanceof h)return new n(d,f[0]);throw Error("Invalid UI instance");};c.tJ=function(){c.Qo||(c.Qo=new c);return c.Qo};return c}()});
define("tdv/view/core/eventmanager/xrinput/UIPanelEventAdapter","require exports tdv/view/core/visuals/canvas/Layer tdv/view/events/MouseEvent tdv/player/view/util/xr/ui/UIPointerState tdv/player/view/util/XR tdv/events/EventDispatcher tdv/constants/EventName tdv/view/util/Animation tdv/player/view/util/ColorPicker".split(" "),function(a,m,h,n,g,k,e,b,c,d){a=function(f){function l(){var p=f.call(this)||this;p.EK=null;p.content=null;p.Poa=null;p.D8=!1;p.qpa=0;p.rpa=0;p.W8=[];p.ir=!1;p.y8=!1;return p}
P(l,f);l.prototype.ara=function(p){this.content=p};l.prototype.I$=function(p){this.EK!==p&&(this.EK&&(k.M.h(b.V,this.Ta,this),k.M.h(b.Zd,this.Kg,this)),(this.EK=p)?(k.M.bind(b.V,this.Ta,this,!0),this.Ta()):this.lZ(null))};l.prototype.Ta=function(){k.isPresenting?(k.M.bind(b.Zd,this.Kg,this,!0),this.Kg()):k.M.h(b.Zd,this.Kg,this)};l.prototype.Kg=function(){this.onChange()};l.prototype.onChange=function(){var p,q;this.EK?(this.lZ(this.EK.Cg),(p=this.EK)===null||p===void 0||p.YE(this.ir,this.y8)):this.Poa&&
(this.lZ(this.Poa.Cg),(q=this.Poa)===null||q===void 0||q.lZ(this.ir,this.y8))};l.prototype.lZ=function(p){var q;(q=this.content)!==null&&q!==void 0&&q.wa()&&(p?this.BIa(p.nPa,p.oPa,p.pressed,p.Qmb,p.Rmb):this.BIa(void 0,void 0,!1,0,0))};l.prototype.BIa=function(p,q,r,t,u){if(p!==this.qpa||q!==this.rpa||this.D8!==r){var v=p===void 0?this.qpa:p,w=q===void 0?this.rpa:q;this.Vj(p,q);this.D8!==r&&((this.D8=r)?this.$h(v,w):this.lf(v,w));this.qpa=v;this.rpa=w}t===0&&u===0||this.vib(p,q,u)};l.prototype.Vj=
function(p,q){var r,t,u=p!==void 0&&q!==void 0;u&&this.o(new n(b.gb,p,q,p,q));u=u?this.woa(p,q):[];u.length>0?(this.y8=u[0].cursor=="pointer",u.forEach(function(v){v.M.o(new n(b.gb,p-v.left,q-v.top,p,q))}),this.ir=!0):(this.ir&&((t=(r=this.content)===null||r===void 0?void 0:r.Vb())===null||t===void 0||t.PE(null)),this.ir=this.y8=!1)};l.prototype.$h=function(p,q){this.o(new n(b.Sa,p,q,p,q));this.W8=this.woa(p,q);this.W8.forEach(function(r){r.M.o(new n(b.Sa,p-r.left,q-r.top,p,q))})};l.prototype.lf=
function(p,q){this.o(new n(b.$a,p,q,p,q));this.W8.forEach(function(r){r.M.o(new n(b.$a,p-r.left,q-r.top,p,q))});this.W8=[]};l.prototype.vib=function(p,q,r){var t=p!==void 0&&q!==void 0,u=r*c.fX/1E3*5;t&&this.o(new n(b.Qk,p,q,p,q,u));r=t?this.woa(p,q):[];r.length>0&&r.forEach(function(v){v.M.o(new n(b.Qk,p-v.left,q-v.top,p,q,u))})};l.prototype.woa=function(p,q){var r,t=(r=this.content)===null||r===void 0?void 0:r.wa();if(!t)return[];r=t.afb();if(!r)return[];var u=r.rect;return this.yKa(p+u.left,q+
u.top,r.layers).reduce(function(v,w){v.length!=0&&v[v.length-1].RD||v.push(w);return v},[]).reduce(function(v,w){v.find(function(x){return x.M===w.M})||v.push(w);return v},[]).map(function(v){return{M:v.M,cursor:v.cursor,left:v.rect.left-u.left,top:v.rect.top-u.top}})};l.prototype.yKa=function(p,q,r){for(var t=[],u=r.length-1;u>=0;u--){var v=r[u];t=t.concat(this.yKa(p,q,v.layers));v.opacity>0&&v.WA!==h.SB&&v.visibleRect.containsPoint(p,q)&&(v.WA===h.nua&&v.canvas?d.$w(v.canvas,p-v.rect.left,q-v.rect.top)&&
t.push(v):t.push(v))}return t};l.prototype.xfb=function(p,q,r){var t,u=(t=this.content)===null||t===void 0?void 0:t.wa();return u?(r=u.CLa(r))?{x:p-r.rect.left,y:q-r.rect.top}:null:null};return l}(e);(function(f){function l(p){var q=f.call(this)||this;q.Ooa=p;q.Cg=null;q.Vj=q.Vj.bind(q);q.$h=q.$h.bind(q);q.lf=q.lf.bind(q);document.addEventListener("mousemove",q.Vj,!0);document.addEventListener("mousedown",q.$h,!0);document.addEventListener("mouseup",q.lf,!0);return q}P(l,f);l.prototype.cc=function(){return this.Ooa};
l.prototype.dispose=function(){document.removeEventListener("mousemove",this.Vj,!0);document.removeEventListener("mousedown",this.$h,!0);document.removeEventListener("mouseup",this.lf,!0)};l.prototype.lZ=function(p,q){this.Ooa.style.cursor=q?"pointer":"default"};l.prototype.Vj=function(p){this.Isa(p);p.preventDefault();p.stopPropagation()};l.prototype.$h=function(p){this.pressed=!0;this.Isa(p);p.preventDefault();p.stopPropagation()};l.prototype.lf=function(p){this.pressed=!1;this.Isa(p);p.preventDefault();
p.stopPropagation()};l.prototype.Isa=function(p){var q=this.Ooa.getBoundingClientRect(),r=p.clientX-q.left;p=p.clientY-q.top;var t=q.width;q=q.height;r>=0&&r<=t&&p>=0&&p<=q?(this.Cg||(this.Cg=new g),this.Cg.nPa=r,this.Cg.oPa=p,this.Cg.distance=1,this.Cg.pressed=this.pressed):this.Cg=null;this.o(b.V)};return l})(e);return a});
define("tdv/player/script/XRPanel","require exports tdv/binding/Bindable tdv/constants/EventName tdv/player/parser/ClassInfo tdv/view/core/visuals/canvas/CanvasVisualsFactory tdv/view/core/eventmanager/xrinput/XRInputEventManagerFactory tdv/view/core/eventmanager/xrinput/UIPanelEventAdapter tdv/player/view/util/xr/ui/UI".split(" "),function(a,m,h,n,g,k,e,b,c){a=function(f){function l(){var p=f.call(this)||this;d.Tma(p);p.yla=new b;p.Ud=null;p.xM=!1;return p}P(l,f);l.prototype.set=function(p,q){f.prototype.set.call(this,
p,q);switch(p){case "content":this.ara(q);break;case "autoCenter":this.i$(q);break;case "hud":this.q$(q);break;case "draggable":this.TY(q);break;case "draggableDistance":this.l$(q);break;case "modal":this.pra(q);break;case "yaw":this.rj(q);break;case "pitch":this.$n(q);break;case "distance":this.Yn(q);break;case "pixelScale":this.jZ(q);break;case "veilColor":this.J$(q);break;case "veilOpacity":this.Kra(q)}return this};l.prototype.get=function(p,q){switch(p){case "yaw":return this.Ga=this.Ud?this.Ud.Jc():
this.Ga;case "pitch":return this.rb=this.Ud?this.Ud.Ic():this.rb;default:return f.prototype.get.call(this,p,q)}};l.prototype.Yqa=function(p){this.Gb!==p&&(this.Gb=p,this.co())};l.prototype.OJa=function(){if(!this.Ud){var p=c.Adb();this.I$(p)}};l.prototype.Fna=function(){if(this.Ud){var p=this.Ud;this.I$(null);c.Xdb(p)}};l.prototype.I$=function(p){if(this.Ud!==p&&(this.Ud&&(this.Ga=this.Ud.Jc(),this.rb=this.Ud.Ic()),this.Ud=p,this.yla.I$(p),this.Ud&&(this.Ud.Yn(this.NG),this.Ud.l$(this.Qea),this.Ud.jZ(this.Yia),
this.Ud.q$(this.vga),this.Ud.i$(this.CL),this.Ud.J$(this.wma),this.GK(),this.paa(),this.KZ(),this.CL||(this.Ud.rj(this.Ga),this.Ud.$n(this.rb)),this.xM)))this.onChange()};l.prototype.ara=function(p){this.Zf!==p&&(this.Zf&&(this.Zf.h(n.$b,this.sl,this),this.Zf.h(n.INIT,this.uOa,this),this.Zf.h(n.od,this.SOa,this),this.Zf.h(n.jd,this.n9,this),this.Zf.wa().h(n.V,this.onChange,this)),this.SD(),this.Zf=p)&&(this.Zf.getParent()&&this.Zf.getParent().removeChild(this.Zf),this.Zf.bind(n.$b,this.sl,this,!0),
this.Zf.bind(n.INIT,this.uOa,this,!0),this.Zf.bind(n.od,this.SOa,this,!0),this.Zf.bind(n.jd,this.n9,this,!0),this.yla.ara(p),this.co())};l.prototype.i$=function(p){var q;this.CL!==p&&(this.CL=p,(q=this.Ud)===null||q===void 0||q.i$(this.CL))};l.prototype.q$=function(p){var q;this.vga!==p&&(this.vga=p,(q=this.Ud)===null||q===void 0||q.q$(this.vga))};l.prototype.TY=function(p){var q;this.Pea!==p&&(this.Pea=p,this.GK(),(q=this.Ud)===null||q===void 0||q.TY(this.Pea))};l.prototype.l$=function(p){var q;
this.Qea!==p&&(this.Qea=p,(q=this.Ud)===null||q===void 0||q.l$(this.Qea))};l.prototype.pra=function(p){this.Kha!==p&&(this.Kha=p,this.paa(),this.KZ())};l.prototype.rj=function(p){var q;this.CL||(this.Ga=p,(q=this.Ud)===null||q===void 0||q.rj(this.Ga))};l.prototype.$n=function(p){var q;this.CL||(this.rb=p,(q=this.Ud)===null||q===void 0||q.$n(this.rb))};l.prototype.Yn=function(p){var q;this.NG!==p&&(this.NG=p,(q=this.Ud)===null||q===void 0||q.Yn(this.NG))};l.prototype.jZ=function(p){var q;this.Yia!==
p&&(this.Yia=p,(q=this.Ud)===null||q===void 0||q.jZ(this.Yia))};l.prototype.J$=function(p){var q;this.wma!==p&&(this.wma=p,(q=this.Ud)===null||q===void 0||q.J$(this.wma))};l.prototype.Kra=function(p){this.xHa!==p&&(this.xHa=p,this.KZ())};l.prototype.sl=function(){};l.prototype.SOa=function(){this.paa();this.GK();this.KZ()};l.prototype.n9=function(){this.paa();this.GK();this.KZ()};l.prototype.uOa=function(){this.xM=!0;var p=this.Zf.wa();p.bind(n.V,this.onChange,this,!0);p.Lkb();this.onChange()};l.prototype.onChange=
function(){var p,q,r,t;if(this.Zf){var u=this.Zf.wa();u=(u===null||u===void 0?void 0:u.getLayers())||[];u.length==0?(p=this.Ud)===null||p===void 0||p.Tcb():(p=u[0],u=p.canvas,u.width>0&&u.height>0&&((q=this.Ud)===null||q===void 0||q.vTa(u),(r=this.Ud)===null||r===void 0||r.Zn(p.opacity),q=this.Zf.get("actualHeight"),r=this.Zf.get("actualWidth"),(t=this.Ud)===null||t===void 0||t.skb(r*.5-p.rect.left,q-p.rect.top+20)))}};l.prototype.paa=function(){var p;(p=this.Ud)===null||p===void 0||p.pra(this.Kha&&
(this.Zf?this.Zf.get("visible"):!1))};l.prototype.GK=function(){var p;(p=this.Ud)===null||p===void 0||p.TY(this.Pea&&(this.Zf?this.Zf.get("visible"):!1))};l.prototype.KZ=function(){var p,q;(p=this.Ud)===null||p===void 0||p.Kra(this.Kha&&((q=this.Zf)===null||q===void 0?0:q.get("visible"))?this.xHa:0)};l.prototype.co=function(){var p;(p=this.Zf)===null||p===void 0||p.co(this.Gb,k.tJ(),e.tJ(),[this.yla])};l.prototype.SD=function(){var p;(p=this.Zf)===null||p===void 0||p.SD()};return l}(h);var d=g.create("XRPanel",
a);return a});
define("tdv/view/containers/windows/XRWindow","require exports tdv/view/containers/windows/BaseWindow tdv/player/script/XRPanel tdv/player/view/util/XR three.mod tdv/constants/EventName".split(" "),function(a,m,h,n,g,k,e){a=function(d){function f(){var l=d.call(this)||this;l.gIa=!1;l.gf("XRWindow");l.kg=new n;l.kg.set("content",l);l.bind(e.$K,l.oib,l,!1);return l}P(f,d);f.prototype.set=function(l,p){switch(l){case "modal":this.kg.set("modal",p);break;case "autoCenter":this.kg.set("autoCenter",p);
break;case "draggable":this.kg.set("draggable",p);break;default:d.prototype.set.call(this,l,p)}};f.prototype.show=function(l){var p=this;this.M6();!l&&this.gIa||this.get("autoCenter")||(this.kg.set("yaw",g.isPresenting?-b.setFromQuaternion(g.xl,"YXZ").y*c:0),this.kg.set("pitch",g.isPresenting?b.setFromQuaternion(g.xl,"YXZ").x*c:0));l=this.get("application");var q=l.get("xrPanels")||[];l.set("xrPanels",q.filter(function(r){return r!==p.kg}).concat([this.kg]));this.gIa=!0;setTimeout(function(){p.set("visible",
!0)},0)};f.prototype.oe=function(){this.L6();this.set("visible",!1)};f.prototype.oib=function(){var l=this,p=this.get("application"),q=p.get("xrPanels")||[];p.set("xrPanels",q.filter(function(r){return r!==l.kg}))};return f}(h);var b=new k.Euler,c=180/Math.PI;return a});
define("tdv/player/script/XRWindow",["require","exports","tdv/player/parser/ClassInfo","tdv/view/containers/windows/XRWindow"],function(a,m,h,n){a=function(k){function e(){var b=k.call(this)||this;g.Tma(b);b.show=b.show;b.hide=b.oe;return b}P(e,k);return e}(n);var g=h.create("XRWindow",a);return a});
define("tdv/player/view/zoomimage/Renderer","require tdv/binding/BindingsHandler tdv/constants/EventName tdv/constants/Priority tdv/events/Event tdv/events/EventDispatcher tdv/view/util/Animation tdv/view/util/Ease tdv/view/util/EaseDimension tdv/view/images/ImageLoader tdv/view/constants/ScaleMode tdv/player/view/util/Device tdv/utils".split(" "),function(a){function m(t){this.source=t;this.width=this.source.get("width");this.height=this.source.get("height");this.url=this.source.get("url");this.lP=
this.source.get("grayscale");this.GA=new f(g.Hm)}var h=a("tdv/binding/BindingsHandler"),n=a("tdv/constants/EventName"),g=a("tdv/constants/Priority"),k=a("tdv/events/Event"),e=a("tdv/events/EventDispatcher"),b=a("tdv/view/util/Animation"),c=a("tdv/view/util/Ease"),d=a("tdv/view/util/EaseDimension"),f=a("tdv/view/images/ImageLoader"),l=a("tdv/view/constants/ScaleMode"),p=a("tdv/player/view/util/Device"),q=a("tdv/utils"),r=q.extend(e,function(){e.call(this);this.o3=this.o3.bind(this);this.Kh=null;this.se=
[];this.Xo=[];this.fk=this.ji=this.Ng=this.Og=100;this.Mj=1;this.mC=this.lC=.5;this.ne=1;this.Wk=this.lk=null;this.a4=!1;this.fea={};this.VL={};this.VL.low={};this.VL.hight={};p.BO()==p.DQ&&(this.VL.low.transform="translateZ(0)",this.VL.hight.transform="");this.ha=!1;this.Ui="inherit";this.qa=document.createElement("div");this.qa.style.position="absolute";this.qa.style.left="0";this.qa.style.top="0";this.qa.style.right="0";this.qa.style.bottom="0";this.qa.style.overflow="hidden";this.yS=null;this.wh=
q.mr(this.za,this)});r.prototype.cc=function(){return this.qa};r.prototype.dQ=function(t){this.ti!=t&&(this.ti=t,this.kda(1),this.wh())};r.prototype.k$=function(t){this.Ui!=t&&(this.Ui=t,this.Wk&&(this.Wk.style.cursor=this.Ui),this.lk&&(this.lk.style.cursor=this.Ui))};r.prototype.Gkb=function(t){this.se!=t&&(this.se&&h.da(this.se,["levels.url"],this.o3),(this.se=t)&&h.ba(this.se,["levels.url"],this.o3,!0))};r.prototype.o3=function(){this.Kda();this.Kh=null;this.lk&&(this.qa.removeChild(this.lk),this.lk=
null);this.Wk&&(this.qa.removeChild(this.Wk),this.Wk=null);this.bh&&(this.bh=null);this.Kda();this.a4=!1;this.Xo.forEach(u=>{u.GA.cancel();u.GA.h(n.ia,this.gAa,this)});this.Xo=(this.se&&this.se.get("levels")||[]).filter(function(u){return u.get("url")}).map(u=>{u=new m(u);u.GA.bind(n.ia,this.gAa,this);return u});var t=this.T1a();t?(this.ji=t.width,this.fk=t.height):this.fk=this.ji=100;this.mC=this.lC=.5;this.kda(1);this.wh()};r.prototype.j$=function(t,u){if(this.Og!=t||this.Ng!=u)this.Og=t,this.Ng=
u,this.wh()};r.prototype.mkb=function(t,u){if(this.rxa!=t||this.qxa!=u)this.rxa=t,this.qxa=u,this.wh()};r.prototype.Ra=function(t){this.ha!=t&&(this.ha=t,this.wh())};r.prototype.move=function(t,u){var v=this.Mj*this.ne;this.lC+=t/(this.ji*v);this.mC+=u/(this.fk*v);this.D4()};r.prototype.xA=function(){return this.ne};r.prototype.setScale=function(t){this.kda(Math.max(1,Math.min(1/this.Mj,t)));this.Kh&&this.Kh.width<this.ne*this.Mj*this.ji&&this.Kh.width<this.ji?this.za():this.D4()};r.prototype.YMa=
function(t){if(!this.lk)return!1;var u=q.offset(this.lk),v=t.pageX-u.left;t=t.pageY-u.top;return v>=0&&t>=0&&v<this.lk.clientWidth&&t<this.lk.clientHeight};r.prototype.za=function(){if(this.ha){this.Wab();var t=this.b2a();t&&t.GA.oj()?(t!=this.Kh&&(this.Kh||(this.wh(),this.a4=!0),this.Q_a(t),this.Kh=t),this.UEa(null)):this.UEa(t);this.D4()}};r.prototype.Wab=function(){switch(this.ti){case l.Tp:var t=this.Og/this.ji;break;case l.Pk:t=this.Ng/this.fk;break;case l.Jr:t=this.ji*this.Ng>this.fk*this.Og?
this.Ng/this.fk:this.Og/this.ji;break;case l.iUa:t=Math.min(this.rxa/this.ji,this.qxa/this.fk);break;default:t=this.ji*this.Ng>this.fk*this.Og?this.Og/this.ji:this.Ng/this.fk}this.$Xa(t)};r.prototype.gAa=function(){this.wh()};r.prototype.Q_a=function(t){this.Wk&&(this.qka(this.Wk,1),this.lk&&this.qa.removeChild(this.lk),this.lk=this.Wk);this.Wk=this.i_a(t);this.qka(this.Wk,0);this.qa.appendChild(this.Wk);this.bh=this.$Za();this.fea={}};r.prototype.b2a=function(){return this.Kh?this.h1a(this.ne*this.Mj*
this.ji):this.z2a()};r.prototype.UEa=function(t){this.Xo.forEach(u=>{u==t?u.GA.rl()!=u.url&&u.GA.load(u.url):u.GA.oj()||u.GA.cancel()})};r.prototype.T1a=function(){return this.Xo.reduce((t,u)=>{t||(t=u);if(u.width>t.width||u.width==t.width&&!u.lP&&t.lP)t=u;return t},null)};r.prototype.z2a=function(){return this.Xo.reduce((t,u)=>{t||(t=u);if(u.width<t.width||u.width==t.width&&u.lP&&!t.lP)t=u;return t},null)};r.prototype.h1a=function(t){return this.Xo.reduce((u,v)=>{u||(u=v);if(v.width>=t&&u.width<
t||v.width>=t&&v.width<u.width||v.width<t&&v.width>u.width||!v.lP&&u.lP)u=v;return u},null)};r.prototype.i_a=function(t){t=t.GA.xg(!0);t.style.position="absolute";t.style.cursor=this.Ui;t.style.pointerEvents="none";return t};r.prototype.$Za=function(){return new c("linear",[new d("alpha",0,1)],200)};r.prototype.D4=function(){b.requestFrame(function(t){this.y4(t,"low")},this)};r.prototype.soa=function(){return this.ne*this.Mj*this.ji};r.prototype.roa=function(){return this.ne*this.Mj*this.fk};r.prototype.jLa=
function(){var t=this.soa();return t>this.Og?Math.max(this.Og-t,Math.min(0,this.Og*.5-t*this.lC)):(this.Og-t)*.5};r.prototype.kLa=function(){var t=this.roa();return t>this.Ng?Math.max(this.Ng-t,Math.min(0,this.Ng*.5-t*this.mC)):(this.Ng-t)*.5};r.prototype.y4=function(t,u){u=u||"low";var v=this.soa(),w=this.jLa(),x=this.roa(),y=this.kLa();this.lC=(this.Og*.5-w)/v;this.mC=(this.Ng*.5-y)/x;v={left:Math.round(w)+"px",top:Math.round(y)+"px",width:Math.round(v)+"px",height:Math.round(x)+"px",display:"block"};
for(var z in this.VL[u])v[z]=this.VL[u][z];if(this.fea!=v){if(this.lk)for(z in v)this.lk.style[z]=v[z];if(this.Wk)for(z in v)this.Wk.style[z]=v[z];this.fea=v}this.Kda();this.bh?(this.bh.Nb(t),this.qka(this.Wk,this.bh.ob("alpha")),this.bh.Ve()&&(this.bh=null,this.lk&&this.qa.removeChild(this.lk),this.lk=this.Wk,this.Wk=null),this.D4()):u=="low"&&this.F9a();!this.bh&&this.a4&&(this.a4=!1,this.o(new k(n.ia)))};r.prototype.qka=function(t,u){t.style.opacity=u};r.prototype.Kda=function(){this.yS!=null&&
(clearTimeout(this.yS),this.yS=null)};r.prototype.F9a=function(){var t=this;this.yS=setTimeout(function(){t.yS=null;t.y4(50,"hight")},50)};r.prototype.kda=function(t){this.ne!=t&&(this.ne=t,this.N$a())};r.prototype.$Xa=function(t){this.Mj!=t&&(this.Mj=t)};r.prototype.N$a=function(){this.o(new k(r.k_,{scale:this.ne}))};r.k_="scaleChange";return r});
define("tdv/player/view/zoomimage/ZoomImage","require tdv/constants/EventName tdv/events/Event tdv/player/view/zoomimage/Renderer tdv/utils tdv/view/core/UIComponent tdv/view/core/UIComponent".split(" "),function(a){var m=a("tdv/constants/EventName"),h=a("tdv/events/Event"),n=a("tdv/player/view/zoomimage/Renderer"),g=a("tdv/utils"),k=a("tdv/view/core/UIComponent");k=a("tdv/view/core/UIComponent");var e=g.extend(k,function(){k.call(this);this.gf("ZoomImage");this.sz=this.mp=void 0;this.$l=!1;this.BDa=
void 0;this.Gza=this.ne=1;this.jW=null;this.j=new n;this.j.bind(m.ia,this.A5a,this);this.j.bind(n.k_,this.B5a,this);this.bind(m.$b,this.kd,this,!0);this.bind(m.od,this.cp,this,!0);this.bind(m.jd,this.ap,this,!0);this.bind(m.Sa,this.te,this,!0);this.bind(m.gb,this.bl,this,!0);this.bind(m.$a,this.cl,this,!0);this.bind(m.Qk,this.HH,this,!0);this.bind(m.YK,this.$G,this,!0)});e.prototype.Kb=function(){k.prototype.Kb.call(this);this.j.cc().parentElement||this.wa().tk(this.j.cc())};e.prototype.set=function(b,
c){switch(b){case "scale":this.j.setScale(c);c=this.j.xA();break;case "imageLeft":case "imageTop":case "imageWidth":case "imageHeight":return}k.prototype.set.call(this,b,c)};e.prototype.get=function(b,c){switch(b){case "scale":return this.j.xA();case "imageLeft":return this.j.jLa();case "imageTop":return this.j.kLa();case "imageWidth":return this.j.soa();case "imageHeight":return this.j.roa()}return k.prototype.get.call(this,b,c)};e.prototype.Pb=function(){k.prototype.Pb.call(this);this.m("image");
this.m("scaleMode");this.m("customHeight");this.m("customWidth");this.m("imageCursor");this.m("imageLeft");this.m("imageTop");this.m("imageWidth");this.m("imageHeight")};e.prototype.jb=function(){this.S("scaleMode")&&(this.j.dQ(this.G("scaleMode")),this.$("scaleMode"));this.S("image")&&(this.j.Gkb(this.G("image")),this.$("image"),this.Gza=this.ne);if(this.S("customHeight")||this.S("customWidth"))this.$("customHeight"),this.$("customWidth"),this.kd();this.S("imageCursor")&&(this.$("imageCursor"),this.j.k$(this.Gb.uea.WKa(this.get("imageCursor"))));
k.prototype.jb.call(this)};e.prototype.kd=function(){var b=this.nb(),c=this.Mb(),d=this.get("customWidth","100%"),f=k.Cp(d);d=f!==void 0?b*f/100:d;f=this.get("customHeight","100%");var l=k.Cp(f);this.j.mkb(d,l!==void 0?c*l/100:f);this.j.j$(b,c)};e.prototype.cp=function(){this.j.Ra(!0)};e.prototype.ap=function(){this.j.Ra(!1)};e.prototype.te=function(b){this.mp=b.x;this.sz=b.y;this.$l=!0;this.BDa=this.j.YMa(b)};e.prototype.bl=function(b){this.$l&&(this.rma(),this.j.move(-(b.x-this.mp),-(b.y-this.sz)),
this.mp=b.x,this.sz=b.y)};e.prototype.cl=function(b){this.$l=!1;this.BDa||this.j.YMa(b)||this.o(new h(e.vUa))};e.prototype.HH=function(b){this.rma();this.j.setScale((1+b.delta/20)*this.j.xA())};e.prototype.$G=function(b){this.rma();this.j.setScale(b.scale/this.Gza)};e.prototype.A5a=function(){this.o(new h(m.ia))};e.prototype.B5a=function(){k.prototype.set.call(this,"scale",this.j.xA());this.o(new h(e.k_))};e.prototype.rma=function(){this.jW?(clearTimeout(this.jW),this.jW=null):this.o(new h(e.$j));
this.jW=setTimeout(function(){this.jW=null;this.o(new h(e.Zj))}.bind(this),300)};e.vUa="backgroundClick";e.k_="scaleChange";e.$j="userInteractionStart";e.Zj="userInteractionEnd";return e});define("tdv/player/script/ZoomImage",["require","tdv/player/view/zoomimage/ZoomImage","tdv/player/parser/ClassInfo"],function(a){var m=a("tdv/player/view/zoomimage/ZoomImage");return a("tdv/player/parser/ClassInfo").define("ZoomImage",m,function(){m.call(this)})});
define("tdv/player/script/classes","require tdv/player/parser/ClassInfo tdv/player/script/AdjacentPanorama tdv/player/script/AmbientLight tdv/player/script/AmbientOcclusionModel3DPostprocessing tdv/player/script/AnimatedImageResource tdv/player/script/AntialiasModel3DPostprocessing tdv/player/script/AreaHotspotMapOverlay tdv/player/script/AudioResource tdv/player/script/BaseButton tdv/player/script/BaseObject tdv/player/script/BaseWindow tdv/player/script/BoxModel3DObject tdv/player/script/Button tdv/player/script/CanvasPlaneModel3DObject tdv/player/script/CeilingCapPanoramaOverlay tdv/player/script/ChildModel3DObject tdv/player/script/CloseButton tdv/player/script/CookiesPolicy tdv/player/script/Container tdv/player/script/CubicPanoramaFrame tdv/player/script/DirectionalPanoramaAudio tdv/player/script/DistanceModel3DCameraMovement tdv/player/script/DistancePanoramaCameraMovement tdv/player/script/DistanceRotationalCameraMovement tdv/player/script/DropDown tdv/player/script/DustPanoramaOverlay tdv/player/script/Effect tdv/player/script/ExternalModel3DObject tdv/player/script/FadeInEffect tdv/player/script/FadeOutEffect tdv/player/script/FirstPersonModel3DCamera tdv/player/script/FlatHotspotPanoramaOverlay tdv/player/script/FlatHotspotPanoramaOverlayArea tdv/player/script/FlatHotspotPanoramaOverlayImage tdv/player/script/FlatHotspotPanoramaOverlayImageBase tdv/player/script/FlatHotspotPanoramaOverlayMap tdv/player/script/FlatPanoramaOverlayPlaybackPosition tdv/player/script/FlyOverModel3DCamera tdv/player/script/FramePanoramaOverlay tdv/player/script/GoogleMaps3DTilesModel3DResource tdv/player/script/GridContainer tdv/player/script/HDRPanorama tdv/player/script/HorizonGridModel3DObject tdv/player/script/HotspotMapOverlay tdv/player/script/HotspotMapOverlayArea tdv/player/script/HotspotMapOverlayImage tdv/player/script/HotspotMapOverlayMap tdv/player/script/HotspotPanoramaOverlay tdv/player/script/HotspotPanoramaOverlayArea tdv/player/script/HotspotPanoramaOverlayImage tdv/player/script/HotspotPanoramaOverlayImageBase tdv/player/script/HotspotPanoramaOverlayMap tdv/player/script/HTML tdv/player/script/HTMLText tdv/player/script/IconButton tdv/player/script/IconHotspotMapOverlay tdv/player/script/Image tdv/player/script/ImagePlaneModel3DObject tdv/player/script/ImageResource tdv/player/script/ImageResourceLevel tdv/player/script/InnerModel3DObject tdv/player/script/Label tdv/player/script/LensFlarePanoramaOverlay tdv/player/script/LineModel3DObject tdv/player/script/LivePanorama tdv/player/script/Light tdv/player/script/Map tdv/player/script/MapOverlay tdv/player/script/MapPlayer tdv/player/script/MapPlayListItem tdv/player/script/MeasureModel3DObject tdv/player/script/MeasureModel3DObjectPoint tdv/player/script/Media tdv/player/script/MediaAudio tdv/player/script/Model3D tdv/player/script/Model3DAnimation tdv/player/script/Model3DCamera tdv/player/script/Model3DCameraMovement tdv/player/script/Model3DCameraSequence tdv/player/script/Model3DDisplayEffect tdv/player/script/Model3DObject tdv/player/script/Model3DPlayer tdv/player/script/Model3DPlayListItem tdv/player/script/Model3DPointer tdv/player/script/Model3DPostprocessing tdv/player/script/Model3DResource tdv/player/script/Model3DResourceLevel tdv/player/script/Menu tdv/player/script/MenuItem tdv/player/script/MotionBlurModel3DPostprocessing tdv/player/script/MovementPhotoCamera tdv/player/script/Object3D tdv/player/script/OrbitLight tdv/player/script/OrbitModel3DCamera tdv/player/script/Panorama tdv/player/script/PanoramaAudio tdv/player/script/PanoramaCamera tdv/player/script/PanoramaCameraDisplayPosition tdv/player/script/PanoramaCameraMovement tdv/player/script/PanoramaCameraPosition tdv/player/script/PanoramaCameraSequence tdv/player/script/PanoramaFrame tdv/player/script/PanoramaMapLocation tdv/player/script/PanoramaModel3DLocation tdv/player/script/PanoramaOverlay tdv/player/script/PanoramaOverlayPlaybackPosition tdv/player/script/PanoramaPlayer tdv/player/script/PanoramaPlayListItem tdv/player/script/PanoramaPoint tdv/player/script/PanoramaSnapshot tdv/player/script/Photo tdv/player/script/PhotoAlbum tdv/player/script/PhotoAlbumAudio tdv/player/script/PhotoAlbumPlayer tdv/player/script/PhotoAlbumPlayListItem tdv/player/script/PhotoAudio tdv/player/script/PhotoCamera tdv/player/script/PhotoCameraPosition tdv/player/script/PhotoPlayList tdv/player/script/PhotoPlayListItem tdv/player/script/PlaneModel3DObject tdv/player/script/PlaybackBar tdv/player/script/Player tdv/player/script/PlayerMenuItem tdv/player/script/PlayList tdv/player/script/PlayListItem tdv/player/script/PopupPanoramaOverlay tdv/player/script/ProgressBar tdv/player/script/ProjectedMaterialModel3DObject tdv/player/script/QuadFramePanoramaOverlay tdv/player/script/QuadHotspotPanoramaOverlay tdv/player/script/QuadHotspotPanoramaOverlayArea tdv/player/script/QuadHotspotPanoramaOverlayImage tdv/player/script/QuadHotspotPanoramaOverlayImageBase tdv/player/script/QuadHotspotPanoramaOverlayMap tdv/player/script/QuadVideoPanoramaOverlay tdv/player/script/RadialModel3DDisplayEffect tdv/player/script/RainPanoramaOverlay tdv/player/script/RotationalCameraDisplayPosition tdv/player/script/RotationalCameraMovement tdv/player/script/RotationalCameraPosition tdv/player/script/RotationalCameraSequence tdv/player/script/SlideInEffect tdv/player/script/SlideOutEffect tdv/player/script/SnowPanoramaOverlay tdv/player/script/SphericPanoramaFrame tdv/player/script/SphereModel3DObject tdv/player/script/SpotLight tdv/player/script/SpriteModel3DObject tdv/player/script/SurfaceReticleModel3DObject tdv/player/script/TabPanel tdv/player/script/TabPanelPage tdv/player/script/TargetModel3DCameraMovement tdv/player/script/TargetPanoramaCameraMovement tdv/player/script/TargetRotationalCameraDisplayMovement tdv/player/script/TargetRotationalCameraMovement tdv/player/script/TDTilesModel3DResource tdv/player/script/TiledImageResourceLevel tdv/player/script/TripodCapPanoramaOverlay tdv/player/script/ThumbnailGrid tdv/player/script/ThumbnailList tdv/player/script/UIComponent tdv/player/script/Video tdv/player/script/Video360 tdv/player/script/Video360Player tdv/player/script/Video360PlayListItem tdv/player/script/Video360Resource tdv/player/script/Video360ResourceLevel tdv/player/script/VideoCue tdv/player/script/VideoPanorama tdv/player/script/VideoPanoramaOverlay tdv/player/script/VideoPlaneModel3DObject tdv/player/script/VideoPlayer tdv/player/script/VideoPlayListItem tdv/player/script/VideoResource tdv/player/script/VideoResourceLevel tdv/player/script/VignetteModel3DPostprocessing tdv/player/script/ViewerArea tdv/player/script/WebFrame tdv/player/script/Window tdv/player/script/XRPanel tdv/player/script/XRWindow tdv/player/script/ZoomImage".split(" "),function(a){a("tdv/player/parser/ClassInfo");
a("tdv/player/script/AdjacentPanorama");a("tdv/player/script/AmbientLight");a("tdv/player/script/AmbientOcclusionModel3DPostprocessing");a("tdv/player/script/AnimatedImageResource");a("tdv/player/script/AntialiasModel3DPostprocessing");a("tdv/player/script/AreaHotspotMapOverlay");a("tdv/player/script/AudioResource");a("tdv/player/script/BaseButton");a("tdv/player/script/BaseObject");a("tdv/player/script/BaseWindow");a("tdv/player/script/BoxModel3DObject");a("tdv/player/script/Button");a("tdv/player/script/CanvasPlaneModel3DObject");
a("tdv/player/script/CeilingCapPanoramaOverlay");a("tdv/player/script/ChildModel3DObject");a("tdv/player/script/CloseButton");a("tdv/player/script/CookiesPolicy");a("tdv/player/script/Container");a("tdv/player/script/CubicPanoramaFrame");a("tdv/player/script/DirectionalPanoramaAudio");a("tdv/player/script/DistanceModel3DCameraMovement");a("tdv/player/script/DistancePanoramaCameraMovement");a("tdv/player/script/DistanceRotationalCameraMovement");a("tdv/player/script/DropDown");a("tdv/player/script/DustPanoramaOverlay");
a("tdv/player/script/Effect");a("tdv/player/script/ExternalModel3DObject");a("tdv/player/script/FadeInEffect");a("tdv/player/script/FadeOutEffect");a("tdv/player/script/FirstPersonModel3DCamera");a("tdv/player/script/FlatHotspotPanoramaOverlay");a("tdv/player/script/FlatHotspotPanoramaOverlayArea");a("tdv/player/script/FlatHotspotPanoramaOverlayImage");a("tdv/player/script/FlatHotspotPanoramaOverlayImageBase");a("tdv/player/script/FlatHotspotPanoramaOverlayMap");a("tdv/player/script/FlatPanoramaOverlayPlaybackPosition");
a("tdv/player/script/FlyOverModel3DCamera");a("tdv/player/script/FramePanoramaOverlay");a("tdv/player/script/GoogleMaps3DTilesModel3DResource");a("tdv/player/script/GridContainer");a("tdv/player/script/HDRPanorama");a("tdv/player/script/HorizonGridModel3DObject");a("tdv/player/script/HotspotMapOverlay");a("tdv/player/script/HotspotMapOverlayArea");a("tdv/player/script/HotspotMapOverlayImage");a("tdv/player/script/HotspotMapOverlayMap");a("tdv/player/script/HotspotPanoramaOverlay");a("tdv/player/script/HotspotPanoramaOverlayArea");
a("tdv/player/script/HotspotPanoramaOverlayImage");a("tdv/player/script/HotspotPanoramaOverlayImageBase");a("tdv/player/script/HotspotPanoramaOverlayMap");a("tdv/player/script/HTML");a("tdv/player/script/HTMLText");a("tdv/player/script/IconButton");a("tdv/player/script/IconHotspotMapOverlay");a("tdv/player/script/Image");a("tdv/player/script/ImagePlaneModel3DObject");a("tdv/player/script/ImageResource");a("tdv/player/script/ImageResourceLevel");a("tdv/player/script/InnerModel3DObject");a("tdv/player/script/Label");
a("tdv/player/script/LensFlarePanoramaOverlay");a("tdv/player/script/LineModel3DObject");a("tdv/player/script/LivePanorama");a("tdv/player/script/Light");a("tdv/player/script/Map");a("tdv/player/script/MapOverlay");a("tdv/player/script/MapPlayer");a("tdv/player/script/MapPlayListItem");a("tdv/player/script/MeasureModel3DObject");a("tdv/player/script/MeasureModel3DObjectPoint");a("tdv/player/script/Media");a("tdv/player/script/MediaAudio");a("tdv/player/script/Model3D");a("tdv/player/script/Model3DAnimation");
a("tdv/player/script/Model3DCamera");a("tdv/player/script/Model3DCameraMovement");a("tdv/player/script/Model3DCameraSequence");a("tdv/player/script/Model3DDisplayEffect");a("tdv/player/script/Model3DObject");a("tdv/player/script/Model3DPlayer");a("tdv/player/script/Model3DPlayListItem");a("tdv/player/script/Model3DPointer");a("tdv/player/script/Model3DPostprocessing");a("tdv/player/script/Model3DResource");a("tdv/player/script/Model3DResourceLevel");a("tdv/player/script/Menu");a("tdv/player/script/MenuItem");
a("tdv/player/script/MotionBlurModel3DPostprocessing");a("tdv/player/script/MovementPhotoCamera");a("tdv/player/script/Object3D");a("tdv/player/script/OrbitLight");a("tdv/player/script/OrbitModel3DCamera");a("tdv/player/script/Panorama");a("tdv/player/script/PanoramaAudio");a("tdv/player/script/PanoramaCamera");a("tdv/player/script/PanoramaCameraDisplayPosition");a("tdv/player/script/PanoramaCameraMovement");a("tdv/player/script/PanoramaCameraPosition");a("tdv/player/script/PanoramaCameraSequence");
a("tdv/player/script/PanoramaFrame");a("tdv/player/script/PanoramaMapLocation");a("tdv/player/script/PanoramaModel3DLocation");a("tdv/player/script/PanoramaOverlay");a("tdv/player/script/PanoramaOverlayPlaybackPosition");a("tdv/player/script/PanoramaPlayer");a("tdv/player/script/PanoramaPlayListItem");a("tdv/player/script/PanoramaPoint");a("tdv/player/script/PanoramaSnapshot");a("tdv/player/script/Photo");a("tdv/player/script/PhotoAlbum");a("tdv/player/script/PhotoAlbumAudio");a("tdv/player/script/PhotoAlbumPlayer");
a("tdv/player/script/PhotoAlbumPlayListItem");a("tdv/player/script/PhotoAudio");a("tdv/player/script/PhotoCamera");a("tdv/player/script/PhotoCameraPosition");a("tdv/player/script/PhotoPlayList");a("tdv/player/script/PhotoPlayListItem");a("tdv/player/script/PlaneModel3DObject");a("tdv/player/script/PlaybackBar");a("tdv/player/script/Player");a("tdv/player/script/PlayerMenuItem");a("tdv/player/script/PlayList");a("tdv/player/script/PlayListItem");a("tdv/player/script/PopupPanoramaOverlay");a("tdv/player/script/ProgressBar");
a("tdv/player/script/ProjectedMaterialModel3DObject");a("tdv/player/script/QuadFramePanoramaOverlay");a("tdv/player/script/QuadHotspotPanoramaOverlay");a("tdv/player/script/QuadHotspotPanoramaOverlayArea");a("tdv/player/script/QuadHotspotPanoramaOverlayImage");a("tdv/player/script/QuadHotspotPanoramaOverlayImageBase");a("tdv/player/script/QuadHotspotPanoramaOverlayMap");a("tdv/player/script/QuadVideoPanoramaOverlay");a("tdv/player/script/RadialModel3DDisplayEffect");a("tdv/player/script/RainPanoramaOverlay");
a("tdv/player/script/RotationalCameraDisplayPosition");a("tdv/player/script/RotationalCameraMovement");a("tdv/player/script/RotationalCameraPosition");a("tdv/player/script/RotationalCameraSequence");a("tdv/player/script/SlideInEffect");a("tdv/player/script/SlideOutEffect");a("tdv/player/script/SnowPanoramaOverlay");a("tdv/player/script/SphericPanoramaFrame");a("tdv/player/script/SphereModel3DObject");a("tdv/player/script/SpotLight");a("tdv/player/script/SpriteModel3DObject");a("tdv/player/script/SurfaceReticleModel3DObject");
a("tdv/player/script/TabPanel");a("tdv/player/script/TabPanelPage");a("tdv/player/script/TargetModel3DCameraMovement");a("tdv/player/script/TargetPanoramaCameraMovement");a("tdv/player/script/TargetRotationalCameraDisplayMovement");a("tdv/player/script/TargetRotationalCameraMovement");a("tdv/player/script/TDTilesModel3DResource");a("tdv/player/script/TiledImageResourceLevel");a("tdv/player/script/TripodCapPanoramaOverlay");a("tdv/player/script/ThumbnailGrid");a("tdv/player/script/ThumbnailList");
a("tdv/player/script/UIComponent");a("tdv/player/script/Video");a("tdv/player/script/Video360");a("tdv/player/script/Video360Player");a("tdv/player/script/Video360PlayListItem");a("tdv/player/script/Video360Resource");a("tdv/player/script/Video360ResourceLevel");a("tdv/player/script/VideoCue");a("tdv/player/script/VideoPanorama");a("tdv/player/script/VideoPanoramaOverlay");a("tdv/player/script/VideoPlaneModel3DObject");a("tdv/player/script/VideoPlayer");a("tdv/player/script/VideoPlayListItem");a("tdv/player/script/VideoResource");
a("tdv/player/script/VideoResourceLevel");a("tdv/player/script/VignetteModel3DPostprocessing");a("tdv/player/script/ViewerArea");a("tdv/player/script/WebFrame");a("tdv/player/script/Window");a("tdv/player/script/XRPanel");a("tdv/player/script/XRWindow");a("tdv/player/script/ZoomImage");return!0});
define("tdv/player/parser/Parser","require tdv/utils tdv/player/parser/ClassInfo tdv/player/parser/Sign tdv/player/script/classes tdv/player/view/util/URL".split(" "),function(a){function m(l,p){this.type=l;this.stack=p}function h(){}var n=a("tdv/utils"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/parser/Sign");a("tdv/player/script/classes");a("tdv/player/view/util/URL");h.prototype.Wib=function(l,p,q,r){this.ffa=[];this.sD=this.vN(l);this.qH=void 0;this.sD.cw.pLa()?(this.g6=k.validate(l),
this.qH=this.pya(this.sD,e.TYPE),this.l_a(this.qH,this.sD,p,q,r),this.VXa(this.sD),this.TXa(this.sD,this.qH),this.WXa(this.qH,this.sD),this.uYa(this.qH,this.sD)):this.cq("Invalid root class",[]);return this.ffa.length==0};h.prototype.Vb=function(){return this.sD.instance};h.prototype.vN=function(l,p){p=p||[];return Array.isArray(l)?this.H6a(l,p):n.hpa(l)&&l["class"]?this.K6a(l,p):n.hpa(l)?this.I6a(l,p):n.TMa(l)?this.J6a(l,p):this.L6a(l,p)};h.prototype.H6a=function(l,p){for(var q=[],r=0;r<l.length;r++)p.push("Item["+
r+"]"),q.push(this.vN(l[r],p)),p.pop();return new b(p.slice(),q)};h.prototype.K6a=function(l,p){var q=l["class"],r=g.Ci(l["class"]);if(r){q={};var t={},u;for(u in l){p.push(u);var v=l[u];switch(u){case "class":break;case "scripts":var w=this.vN(v,p);break;default:r.hasAttribute(u)?q[u]=this.vN(v,p):r.kMa(u)||r.lMa(u)?t[u]=this.vN(v,p):this.cq(r.tA()+" object doesn't have any attribute named "+u,p)}p.pop()}return new e(p.slice(),r,l.id,q,t,w)}this.cq("Undefined class name: "+q,p.slice());return new f(p.slice(),
null)};h.prototype.I6a=function(l,p){var q={},r;for(r in l)p.push(r),q[r]=this.vN(l[r],p),p.pop();return new c(p.slice(),q)};h.prototype.J6a=function(l,p){return new d(p.slice(),l)};h.prototype.L6a=function(l,p){return new f(p.slice(),l)};h.prototype.pya=function(l,p){var q=p&&l.type!=p?[]:[l],r=0;for(l=l.Cb();r<l.length;r++)q=q.concat(this.pya(l[r],p));return q};h.prototype.l_a=function(l,p,q,r,t){p.instance=p.cw.Ai(null,r,t,[q,this.g6]);p.instance.set("application",p.instance);for(q=0;q<l.length;q++){var u=
l[q];u!=p&&(u.instance=u.cw.Ai(p.instance,r,t))}};h.prototype.VXa=function(l){if(l.scripts)if(l.scripts.type==c.TYPE)for(var p in l.scripts.value)this.UXa(l,p);else this.cq("Invalid content.",l.scripts.stack)};h.prototype.UXa=function(l,p){var q=l.instance,r=l.scripts.value[p];q[p]!==void 0?this.cq("Identifier: "+p+" is already in use",r.stack):r&&r.type==d.TYPE?q[p]=function(){return r.tw().apply(q,arguments)}:this.cq("Invalid content.",r.stack)};h.prototype.TXa=function(l,p){l=l.instance;for(var q=
0;q<p.length;q++){var r=p[q],t=r.id;t&&(l[t]===void 0?l[t]=r.instance:this.cq("Identifier: "+t+" is arleady in use",r.stack))}};h.prototype.WXa=function(l,p){for(var q=0;q<l.length;q++){var r=l[q],t=r.attributes,u;for(u in t)this.SXa(r,u,p)}};h.prototype.SXa=function(l,p,q){var r=l.cw;if(r.hasAttribute(p)){try{var t=l.attributes[p].tw()}catch(u){this.cq("Invalid value for property "+p+" of "+r.tA()+" instance",l.stack)}try{t=r.goa(p)(t,q.instance),l.instance.set(p,t)}catch(u){this.cq("Invalid value for property "+
p+" of "+r.tA()+" instance",l.stack)}}else this.cq(r.tA()+" object doesn't have any property named "+p,l.stack)};h.prototype.uYa=function(l,p){for(var q=0;q<l.length;q++){var r=l[q],t;for(t in r.nJ)this.tYa(r,t,p)}};h.prototype.tYa=function(l,p,q){var r=l.cw,t=l.instance,u=r.kMa(p),v=r.lMa(p);if(u||v){l=l.nJ[p];var w=l.tw();n.TMa(w)?t.bind(p,w,q.instance,v,w,!0):typeof w=="string"?t.bind(p,function(){try{eval("var event = arguments[0];"+w)}catch(x){throw x;}},q.instance,v,w,!0):this.cq("Invalid value.",
l.stack)}else this.cq(r.tA()+" object doesn't have any event named "+p,l.stack)};h.prototype.cq=function(l,p){this.ffa.push("In "+p.join(" >> ")+": "+l)};m.prototype.Cb=function(){return[]};m.prototype.tw=function(){};var e=n.extend(m,function(l,p,q,r,t,u){m.call(this,e.TYPE,l);this.cw=p;this.id=q;this.attributes=r;this.nJ=t;this.scripts=u;this.instance=null});e.prototype.Cb=function(){var l=this.cw.BLa(),p=[],q=Object.assign({},this.attributes);if(l)for(var r=0;r<l.length;r++){var t=l[r];q[t]!=void 0&&
(p.push(q[t]),delete q[t])}return p=p.concat(Object.values(q))};e.prototype.tw=function(){return this.instance};e.TYPE="instance";var b=n.extend(m,function(l,p){m.call(this,b.TYPE,l);this.items=p});b.prototype.Cb=function(){return this.items.slice()};b.prototype.tw=function(){for(var l=[],p=0;p<this.items.length;p++)l.push(this.items[p].tw());return l};b.TYPE="array";var c=n.extend(m,function(l,p){m.call(this,c.TYPE,l);this.value=p});c.prototype.Cb=function(){return Object.values(this.value)};c.prototype.tw=
function(){var l={},p;for(p in this.value)l[p]=this.value[p].tw();return l};c.TYPE="dict";var d=n.extend(m,function(l,p){m.call(this,d.TYPE,l);this.value=p});d.prototype.tw=function(){return this.value};d.TYPE="function";var f=n.extend(m,function(l,p){m.call(this,f.TYPE,l);this.value=p});f.prototype.tw=function(){return this.value};f.TYPE="simple";return h});
define("tdv/player/Main","require tdv/constants/EventName tdv/events/Event tdv/player/parser/ClassInfo tdv/player/parser/Parser tdv/player/view/util/Device tdv/player/view/util/Installer tdv/player/view/util/URL tdv/player/view/util/XR tdv/player/view/panorama/renderer/3d/util/Util tdv/player/AppInfo tdv/player/l10n tdv/view/util/Fullscreen tdv/utils".split(" "),function(a){function m(u,v){this.GV=u;this.Ci=this.Ci.bind(this);this.Ai=this.Ai.bind(this);this.hw=this.hw.bind(this);this.Oa=this.Oa.bind(this);
this.A7=this.A7.bind(this);e.ub()&&!e.kf()&&q.qm();this.C0=[];u=l.name;var w=[];u&&w.push(u);l.VX>0?w.push("v:"+l.VX+"."+l.aY):w.push("v:"+l.aY);r.log(w.join(" "));this.ur=v;c.ohb()||[e.OK,e.rF].indexOf(e.Yb())>=0?(this.Wl=new k,(v=this.ur.get(TDV.PlayerSettings.BASE_DIR_URL))?(v=c.lB(v),v[v.length-1]!="/"&&(v+="/")):v=c.getDirectory(this.ur.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)),this.zqa=this.ur.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS),b.mjb(v,function(x){this.Yma=x;this.e6a()}.bind(this))):
window.alert(p("web-server-required"))}var h=a("tdv/constants/EventName"),n=a("tdv/events/Event"),g=a("tdv/player/parser/ClassInfo"),k=a("tdv/player/parser/Parser"),e=a("tdv/player/view/util/Device"),b=a("tdv/player/view/util/Installer"),c=a("tdv/player/view/util/URL"),d=a("tdv/player/view/util/XR"),f=a("tdv/player/view/panorama/renderer/3d/util/Util"),l=a("tdv/player/AppInfo"),p=a("tdv/player/l10n"),q=a("tdv/view/util/Fullscreen"),r=a("tdv/utils");m.prototype.e6a=function(){this.GV.o(new TDV.x_(h.LVa,
{},[],void 0));r.defer(function(){if(!this.Wl.Wib(this.ur.get(TDV.PlayerSettings.SCRIPT_DATA),this.ur.get(TDV.PlayerSettings.CONTAINER),this.Yma,this.zqa)){if(l.smb!="false"){window.alert(this.cza());return}r.log(this.cza())}this.sYa();this.IXa(this.ur);this.YXa();d.YJ=this.Wl.Vb();d.initialize(function(){this.P$a()}.bind(this))}.bind(this))};m.prototype.clear=function(){this.Wl&&(this.Pya().forEach(function(u){u.instance.rsa();u.cw.lX().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.Djb()}})}),f.cjb(),this.Wl.Vb().clear(),t={},this.ur=this.Wl=null)};m.prototype.Qfb=function(u){return this.Wl.Vb()[u]};m.prototype.Ci=function(u){if(u in t)return t[u].slice();var v=[];this.Pya().forEach(function(w){w.cw.lX().includes(u)&&
v.push(w.instance)});t[u]=v;return v.slice()};m.prototype.Pya=function(){return this.Wl?this.Wl.qH.concat(this.C0):[]};var t={};m.prototype.Ai=function(u){var v=g.Ci(u);if(!v)throw"Invalid className: "+u;t={};u=this.Wl.Vb();var w={};w.cw=v;w.instance=v.Ai(u,this.Yma,this.zqa);this.C0.push(w);this.cwa(v,w.instance);this.D$a(u,w.instance);return w.instance};m.prototype.hw=function(u){var v=this.C0.findIndex(function(w){return w.instance==u});v<0||(t={},this.C0.splice(v,1),u.rsa(),u.dispose&&u.dispose())};
m.prototype.cza=function(){for(var u=this.Wl.ffa,v=["Errors parsing script file:"],w=0;w<u.length;w++)v.push(u[w]);return v.join("\n")};m.prototype.sYa=function(){this.Wl.qH.forEach(function(v){this.cwa(v.cw,v.instance,v.id)}.bind(this));var u=this.Wl.Vb().y0;u.bind(h.WK,function(){u.dnb(h.WK);this.GV.cookiesEnabled=this.GV.ldb=!0;this.GV.o(new TDV.x_(h.WK,{},[],void 0))},this,!0)};m.prototype.cwa=function(u,v,w){var x=u.lX();r.union(u.loa(),u.toa()).forEach(function(y){v.bind(y,function(z){this.GV.o(new TDV.x_(y,
z,x,w))}.bind(this),this,!0)}.bind(this))};m.prototype.D$a=function(u,v){u.o(new n(h.aVa,{instance:v}))};m.prototype.IXa=function(u){this.Wl.Vb().set("settings",u)};m.prototype.Oa=function(){return g.Oa.apply(g,arguments)};m.prototype.A7=function(u){!u||c.iE(u)||c.t8(u)||(u=c.MD(c.lB(u,this.Yma),this.zqa));return u};m.prototype.YXa=function(){var u=this.Wl.Vb();u.getByClassName=u.Ci=this.Ci;u.createInstance=u.Ai=this.Ai;u.disposeInstance=u.hw=this.hw;u.isInstanceOfClass=u.Oa=this.Oa;u.getAbsoluteURL=
u.A7=this.A7};m.prototype.P$a=function(){this.Wl.Vb().start()};m.Xmb=function(u){u.o(new TDV.x_(h.bVa,{},[],void 0))};return m});define("main",["require","tdv/utils","tdv/player/Main"],function(a){var m=a("tdv/utils"),h=a("tdv/player/Main");m.peb(function(){TDV.qb.hlb(h)})});
(function(global,factory){factory(global.THREE={})})(this,function(exports){"use strict";const REVISION="182";const MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};const TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};const CullFaceNone=0;const CullFaceBack=1;const CullFaceFront=2;const CullFaceFrontBack=3;const BasicShadowMap=0;const PCFShadowMap=1;const PCFSoftShadowMap=2;const VSMShadowMap=3;const FrontSide=0;const BackSide=1;const DoubleSide=2;const NoBlending=0;const NormalBlending=1;const AdditiveBlending=2;const SubtractiveBlending=3;const MultiplyBlending=4;const CustomBlending=5;const AddEquation=100;const SubtractEquation=101;const ReverseSubtractEquation=102;const MinEquation=103;const MaxEquation=104;const ZeroFactor=200;const OneFactor=201;const SrcColorFactor=202;const OneMinusSrcColorFactor=203;const SrcAlphaFactor=204;const OneMinusSrcAlphaFactor=205;const DstAlphaFactor=206;const OneMinusDstAlphaFactor=207;const DstColorFactor=208;const OneMinusDstColorFactor=209;const SrcAlphaSaturateFactor=210;const ConstantColorFactor=211;const OneMinusConstantColorFactor=212;const ConstantAlphaFactor=213;const OneMinusConstantAlphaFactor=214;const NeverDepth=0;const AlwaysDepth=1;const LessDepth=2;const LessEqualDepth=3;const EqualDepth=4;const GreaterEqualDepth=5;const GreaterDepth=6;const NotEqualDepth=7;const MultiplyOperation=0;const MixOperation=1;const AddOperation=2;const NoToneMapping=0;const LinearToneMapping=1;const ReinhardToneMapping=2;const CineonToneMapping=3;const ACESFilmicToneMapping=4;const CustomToneMapping=5;const AgXToneMapping=6;const NeutralToneMapping=7;const AttachedBindMode="attached";const DetachedBindMode="detached";const UVMapping=300;const CubeReflectionMapping=301;const CubeRefractionMapping=302;const EquirectangularReflectionMapping=303;const EquirectangularRefractionMapping=304;const CubeUVReflectionMapping=306;const RepeatWrapping=1000;const ClampToEdgeWrapping=1001;const MirroredRepeatWrapping=1002;const NearestFilter=1003;const NearestMipmapNearestFilter=1004;const NearestMipMapNearestFilter=1004;const NearestMipmapLinearFilter=1005;const NearestMipMapLinearFilter=1005;const LinearFilter=1006;const LinearMipmapNearestFilter=1007;const LinearMipMapNearestFilter=1007;const LinearMipmapLinearFilter=1008;const LinearMipMapLinearFilter=1008;const UnsignedByteType=1009;const ByteType=1010;const ShortType=1011;const UnsignedShortType=1012;const IntType=1013;const UnsignedIntType=1014;const FloatType=1015;const HalfFloatType=1016;const UnsignedShort4444Type=1017;const UnsignedShort5551Type=1018;const UnsignedInt248Type=1020;const UnsignedInt5999Type=35902;const UnsignedInt101111Type=35899;const AlphaFormat=1021;const RGBFormat=1022;const RGBAFormat=1023;const DepthFormat=1026;const DepthStencilFormat=1027;const RedFormat=1028;const RedIntegerFormat=1029;const RGFormat=1030;const RGIntegerFormat=1031;const RGBIntegerFormat=1032;const RGBAIntegerFormat=1033;const RGB_S3TC_DXT1_Format=33776;const RGBA_S3TC_DXT1_Format=33777;const RGBA_S3TC_DXT3_Format=33778;const RGBA_S3TC_DXT5_Format=33779;const RGB_PVRTC_4BPPV1_Format=35840;const RGB_PVRTC_2BPPV1_Format=35841;const RGBA_PVRTC_4BPPV1_Format=35842;const RGBA_PVRTC_2BPPV1_Format=35843;const RGB_ETC1_Format=36196;const RGB_ETC2_Format=37492;const RGBA_ETC2_EAC_Format=37496;const R11_EAC_Format=37488;const SIGNED_R11_EAC_Format=37489;const RG11_EAC_Format=37490;const SIGNED_RG11_EAC_Format=37491;const RGBA_ASTC_4x4_Format=37808;const RGBA_ASTC_5x4_Format=37809;const RGBA_ASTC_5x5_Format=37810;const RGBA_ASTC_6x5_Format=37811;const RGBA_ASTC_6x6_Format=37812;const RGBA_ASTC_8x5_Format=37813;const RGBA_ASTC_8x6_Format=37814;const RGBA_ASTC_8x8_Format=37815;const RGBA_ASTC_10x5_Format=37816;const RGBA_ASTC_10x6_Format=37817;const RGBA_ASTC_10x8_Format=37818;const RGBA_ASTC_10x10_Format=37819;const RGBA_ASTC_12x10_Format=37820;const RGBA_ASTC_12x12_Format=37821;const RGBA_BPTC_Format=36492;const RGB_BPTC_SIGNED_Format=36494;const RGB_BPTC_UNSIGNED_Format=36495;const RED_RGTC1_Format=36283;const SIGNED_RED_RGTC1_Format=36284;const RED_GREEN_RGTC2_Format=36285;const SIGNED_RED_GREEN_RGTC2_Format=36286;const LoopOnce=2200;const LoopRepeat=2201;const LoopPingPong=2202;const InterpolateDiscrete=2300;const InterpolateLinear=2301;const InterpolateSmooth=2302;const ZeroCurvatureEnding=2400;const ZeroSlopeEnding=2401;const WrapAroundEnding=2402;const NormalAnimationBlendMode=2500;const AdditiveAnimationBlendMode=2501;const TrianglesDrawMode=0;const TriangleStripDrawMode=1;const TriangleFanDrawMode=2;const BasicDepthPacking=3200;const RGBADepthPacking=3201;const RGBDepthPacking=3202;const RGDepthPacking=3203;const TangentSpaceNormalMap=0;const ObjectSpaceNormalMap=1;const NoColorSpace="";const SRGBColorSpace="srgb";const LinearSRGBColorSpace="srgb-linear";const LinearTransfer="linear";const SRGBTransfer="srgb";const NoNormalPacking="";const NormalRGPacking="rg";const NormalGAPacking="ga";const ZeroStencilOp=0;const KeepStencilOp=7680;const ReplaceStencilOp=7681;const IncrementStencilOp=7682;const DecrementStencilOp=7683;const IncrementWrapStencilOp=34055;const DecrementWrapStencilOp=34056;const InvertStencilOp=5386;const NeverStencilFunc=512;const LessStencilFunc=513;const EqualStencilFunc=514;const LessEqualStencilFunc=515;const GreaterStencilFunc=516;const NotEqualStencilFunc=517;const GreaterEqualStencilFunc=518;const AlwaysStencilFunc=519;const NeverCompare=512;const LessCompare=513;const EqualCompare=514;const LessEqualCompare=515;const GreaterCompare=516;const NotEqualCompare=517;const GreaterEqualCompare=518;const AlwaysCompare=519;const StaticDrawUsage=35044;const DynamicDrawUsage=35048;const StreamDrawUsage=35040;const StaticReadUsage=35045;const DynamicReadUsage=35049;const StreamReadUsage=35041;const StaticCopyUsage=35046;const DynamicCopyUsage=35050;const StreamCopyUsage=35042;const GLSL1="100";const GLSL3="300 es";const WebGLCoordinateSystem=2000;const WebGPUCoordinateSystem=2001;const TimestampQuery={COMPUTE:"compute",RENDER:"render"};const InterpolationSamplingType={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"};const InterpolationSamplingMode={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};function arrayNeedsUint32(array){for(let i=array.length-1;i>=0;--i){if(array[i]>=65535)return true}return false}const TYPED_ARRAYS={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function getTypedArray(type,buffer){return new TYPED_ARRAYS[type](buffer)}function isTypedArray(array){return ArrayBuffer.isView(array)&&!(array instanceof DataView)}function createElementNS(name){return document.createElementNS("http://www.w3.org/1999/xhtml",name)}function createCanvasElement(){const canvas=createElementNS("canvas");canvas.style.display="block";return canvas}const _cache={};let _setConsoleFunction=null;function setConsoleFunction(fn){_setConsoleFunction=fn}function getConsoleFunction(){return _setConsoleFunction}function log(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("log",message,...params)}else{console.log(message,...params)}}function warn(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("warn",message,...params)}else{console.warn(message,...params)}}function error(...params){const message="THREE."+params.shift();if(_setConsoleFunction){_setConsoleFunction("error",message,...params)}else{console.error(message,...params)}}function warnOnce(...params){const message=params.join(" ");if(message in _cache)return;_cache[message]=true;warn(...params)}function probeAsync(gl,sync,interval){return new Promise(function(resolve,reject){function probe(){switch(gl.clientWaitSync(sync,gl.SYNC_FLUSH_COMMANDS_BIT,0)){case gl.WAIT_FAILED:reject();break;case gl.TIMEOUT_EXPIRED:setTimeout(probe,interval);break;default:resolve();}}setTimeout(probe,interval)})}class EventDispatcher{addEventListener(type,listener){if(this._listeners===undefined)this._listeners={};const listeners=this._listeners;if(listeners[type]===undefined){listeners[type]=[]}if(listeners[type].indexOf(listener)===-1){listeners[type].push(listener)}}hasEventListener(type,listener){const listeners=this._listeners;if(listeners===undefined)return false;return listeners[type]!==undefined&&listeners[type].indexOf(listener)!==-1}removeEventListener(type,listener){const listeners=this._listeners;if(listeners===undefined)return;const listenerArray=listeners[type];if(listenerArray!==undefined){const index=listenerArray.indexOf(listener);if(index!==-1){listenerArray.splice(index,1)}}}dispatchEvent(event){const listeners=this._listeners;if(listeners===undefined)return;const listenerArray=listeners[event.type];if(listenerArray!==undefined){event.target=this;const array=listenerArray.slice(0);for(let i=0,l=array.length;i<l;i++){array[i].call(this,event)}event.target=null}}}const _lut=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let _seed=1234567;const DEG2RAD=Math.PI/180;const RAD2DEG=180/Math.PI;function generateUUID(){const d0=Math.random()*4294967295|0;const d1=Math.random()*4294967295|0;const d2=Math.random()*4294967295|0;const d3=Math.random()*4294967295|0;const uuid=_lut[d0&255]+_lut[d0>>8&255]+_lut[d0>>16&255]+_lut[d0>>24&255]+"-"+_lut[d1&255]+_lut[d1>>8&255]+"-"+_lut[d1>>16&15|64]+_lut[d1>>24&255]+"-"+_lut[d2&63|128]+_lut[d2>>8&255]+"-"+_lut[d2>>16&255]+_lut[d2>>24&255]+_lut[d3&255]+_lut[d3>>8&255]+_lut[d3>>16&255]+_lut[d3>>24&255];return uuid.toLowerCase()}function clamp(value,min,max){return Math.max(min,Math.min(max,value))}function euclideanModulo(n,m){return(n%m+m)%m}function mapLinear(x,a1,a2,b1,b2){return b1+(x-a1)*(b2-b1)/(a2-a1)}function inverseLerp(x,y,value){if(x!==y){return(value-x)/(y-x)}else{return 0}}function lerp(x,y,t){return(1-t)*x+t*y}function damp(x,y,lambda,dt){return lerp(x,y,1-Math.exp(-lambda*dt))}function pingpong(x,length=1){return length-Math.abs(euclideanModulo(x,length*2)-length)}function smoothstep(x,min,max){if(x<=min)return 0;if(x>=max)return 1;x=(x-min)/(max-min);return x*x*(3-2*x)}function smootherstep(x,min,max){if(x<=min)return 0;if(x>=max)return 1;x=(x-min)/(max-min);return x*x*x*(x*(x*6-15)+10)}function randInt(low,high){return low+Math.floor(Math.random()*(high-low+1))}function randFloat(low,high){return low+Math.random()*(high-low)}function randFloatSpread(range){return range*(0.5-Math.random())}function seededRandom(s){if(s!==undefined)_seed=s;let t=_seed+=1831565813;t=Math.imul(t^t>>>15,t|1);t^=t+Math.imul(t^t>>>7,t|61);return((t^t>>>14)>>>0)/4294967296}function degToRad(degrees){return degrees*DEG2RAD}function radToDeg(radians){return radians*RAD2DEG}function isPowerOfTwo(value){return(value&value-1)===0&&value!==0}function ceilPowerOfTwo(value){return Math.pow(2,Math.ceil(Math.log(value)/Math.LN2))}function floorPowerOfTwo(value){return Math.pow(2,Math.floor(Math.log(value)/Math.LN2))}function setQuaternionFromProperEuler(q,a,b,c,order){const cos=Math.cos;const sin=Math.sin;const c2=cos(b/2);const s2=sin(b/2);const c13=cos((a+c)/2);const s13=sin((a+c)/2);const c1_3=cos((a-c)/2);const s1_3=sin((a-c)/2);const c3_1=cos((c-a)/2);const s3_1=sin((c-a)/2);switch(order){case"XYX":q.set(c2*s13,s2*c1_3,s2*s1_3,c2*c13);break;case"YZY":q.set(s2*s1_3,c2*s13,s2*c1_3,c2*c13);break;case"ZXZ":q.set(s2*c1_3,s2*s1_3,c2*s13,c2*c13);break;case"XZX":q.set(c2*s13,s2*s3_1,s2*c3_1,c2*c13);break;case"YXY":q.set(s2*c3_1,c2*s13,s2*s3_1,c2*c13);break;case"ZYZ":q.set(s2*s3_1,s2*c3_1,c2*s13,c2*c13);break;default:warn("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+order);}}function denormalize(value,array){switch(array.constructor){case Float32Array:return value;case Uint32Array:return value/4294967295;case Uint16Array:return value/65535;case Uint8Array:return value/255;case Int32Array:return Math.max(value/2147483647,-1);case Int16Array:return Math.max(value/32767,-1);case Int8Array:return Math.max(value/127,-1);default:throw new Error("Invalid component type.");}}function normalize(value,array){switch(array.constructor){case Float32Array:return value;case Uint32Array:return Math.round(value*4294967295);case Uint16Array:return Math.round(value*65535);case Uint8Array:return Math.round(value*255);case Int32Array:return Math.round(value*2147483647);case Int16Array:return Math.round(value*32767);case Int8Array:return Math.round(value*127);default:throw new Error("Invalid component type.");}}const MathUtils={DEG2RAD:DEG2RAD,RAD2DEG:RAD2DEG,generateUUID:generateUUID,clamp:clamp,euclideanModulo:euclideanModulo,mapLinear:mapLinear,inverseLerp:inverseLerp,lerp:lerp,damp:damp,pingpong:pingpong,smoothstep:smoothstep,smootherstep:smootherstep,randInt:randInt,randFloat:randFloat,randFloatSpread:randFloatSpread,seededRandom:seededRandom,degToRad:degToRad,radToDeg:radToDeg,isPowerOfTwo:isPowerOfTwo,ceilPowerOfTwo:ceilPowerOfTwo,floorPowerOfTwo:floorPowerOfTwo,setQuaternionFromProperEuler:setQuaternionFromProperEuler,normalize:normalize,denormalize:denormalize};class Vector2{constructor(x=0,y=0){Vector2.prototype.isVector2=true;this.x=x;this.y=y}get width(){return this.x}set width(value){this.x=value}get height(){return this.y}set height(value){this.y=value}set(x,y){this.x=x;this.y=y;return this}setScalar(scalar){this.x=scalar;this.y=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y)}copy(v){this.x=v.x;this.y=v.y;return this}add(v){this.x+=v.x;this.y+=v.y;return this}addScalar(s){this.x+=s;this.y+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;return this}sub(v){this.x-=v.x;this.y-=v.y;return this}subScalar(s){this.x-=s;this.y-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this}multiply(v){this.x*=v.x;this.y*=v.y;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;return this}divide(v){this.x/=v.x;this.y/=v.y;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}applyMatrix3(m){const x=this.x,y=this.y;const e=m.elements;this.x=e[0]*x+e[3]*y+e[6];this.y=e[1]*x+e[4]*y+e[7];return this}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);return this}negate(){this.x=-this.x;this.y=-this.y;return this}dot(v){return this.x*v.x+this.y*v.y}cross(v){return this.x*v.y-this.y*v.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){const angle=Math.atan2(-this.y,-this.x)+Math.PI;return angle}angleTo(v){const denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;const theta=this.dot(v)/denominator;return Math.acos(clamp(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){const dx=this.x-v.x,dy=this.y-v.y;return dx*dx+dy*dy}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;return this}equals(v){return v.x===this.x&&v.y===this.y}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);return this}rotateAround(center,angle){const c=Math.cos(angle),s=Math.sin(angle);const x=this.x-center.x;const y=this.y-center.y;this.x=x*c-y*s+center.x;this.y=x*s+y*c+center.y;return this}random(){this.x=Math.random();this.y=Math.random();return this}*[Symbol.iterator](){yield this.x;yield this.y}}class Quaternion{constructor(x=0,y=0,z=0,w=1){this.isQuaternion=true;this._x=x;this._y=y;this._z=z;this._w=w}static slerpFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1,t){let x0=src0[srcOffset0+0],y0=src0[srcOffset0+1],z0=src0[srcOffset0+2],w0=src0[srcOffset0+3];let x1=src1[srcOffset1+0],y1=src1[srcOffset1+1],z1=src1[srcOffset1+2],w1=src1[srcOffset1+3];if(t<=0){dst[dstOffset+0]=x0;dst[dstOffset+1]=y0;dst[dstOffset+2]=z0;dst[dstOffset+3]=w0;return}if(t>=1){dst[dstOffset+0]=x1;dst[dstOffset+1]=y1;dst[dstOffset+2]=z1;dst[dstOffset+3]=w1;return}if(w0!==w1||x0!==x1||y0!==y1||z0!==z1){let dot=x0*x1+y0*y1+z0*z1+w0*w1;if(dot<0){x1=-x1;y1=-y1;z1=-z1;w1=-w1;dot=-dot}let s=1-t;if(dot<0.9995){const theta=Math.acos(dot);const sin=Math.sin(theta);s=Math.sin(s*theta)/sin;t=Math.sin(t*theta)/sin;x0=x0*s+x1*t;y0=y0*s+y1*t;z0=z0*s+z1*t;w0=w0*s+w1*t}else{x0=x0*s+x1*t;y0=y0*s+y1*t;z0=z0*s+z1*t;w0=w0*s+w1*t;const f=1/Math.sqrt(x0*x0+y0*y0+z0*z0+w0*w0);x0*=f;y0*=f;z0*=f;w0*=f}}dst[dstOffset]=x0;dst[dstOffset+1]=y0;dst[dstOffset+2]=z0;dst[dstOffset+3]=w0}static multiplyQuaternionsFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1){const x0=src0[srcOffset0];const y0=src0[srcOffset0+1];const z0=src0[srcOffset0+2];const w0=src0[srcOffset0+3];const x1=src1[srcOffset1];const y1=src1[srcOffset1+1];const z1=src1[srcOffset1+2];const w1=src1[srcOffset1+3];dst[dstOffset]=x0*w1+w0*x1+y0*z1-z0*y1;dst[dstOffset+1]=y0*w1+w0*y1+z0*x1-x0*z1;dst[dstOffset+2]=z0*w1+w0*z1+x0*y1-y0*x1;dst[dstOffset+3]=w0*w1-x0*x1-y0*y1-z0*z1;return dst}get x(){return this._x}set x(value){this._x=value;this._onChangeCallback()}get y(){return this._y}set y(value){this._y=value;this._onChangeCallback()}get z(){return this._z}set z(value){this._z=value;this._onChangeCallback()}get w(){return this._w}set w(value){this._w=value;this._onChangeCallback()}set(x,y,z,w){this._x=x;this._y=y;this._z=z;this._w=w;this._onChangeCallback();return this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(quaternion){this._x=quaternion.x;this._y=quaternion.y;this._z=quaternion.z;this._w=quaternion.w;this._onChangeCallback();return this}setFromEuler(euler,update=true){const x=euler._x,y=euler._y,z=euler._z,order=euler._order;const cos=Math.cos;const sin=Math.sin;const c1=cos(x/2);const c2=cos(y/2);const c3=cos(z/2);const s1=sin(x/2);const s2=sin(y/2);const s3=sin(z/2);switch(order){case"XYZ":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"YXZ":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;case"ZXY":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"ZYX":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;case"YZX":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"XZY":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;default:warn("Quaternion: .setFromEuler() encountered an unknown order: "+order);}if(update===true)this._onChangeCallback();return this}setFromAxisAngle(axis,angle){const halfAngle=angle/2,s=Math.sin(halfAngle);this._x=axis.x*s;this._y=axis.y*s;this._z=axis.z*s;this._w=Math.cos(halfAngle);this._onChangeCallback();return this}setFromRotationMatrix(m){const te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10],trace=m11+m22+m33;if(trace>0){const s=0.5/Math.sqrt(trace+1);this._w=0.25/s;this._x=(m32-m23)*s;this._y=(m13-m31)*s;this._z=(m21-m12)*s}else if(m11>m22&&m11>m33){const s=2*Math.sqrt(1+m11-m22-m33);this._w=(m32-m23)/s;this._x=0.25*s;this._y=(m12+m21)/s;this._z=(m13+m31)/s}else if(m22>m33){const s=2*Math.sqrt(1+m22-m11-m33);this._w=(m13-m31)/s;this._x=(m12+m21)/s;this._y=0.25*s;this._z=(m23+m32)/s}else{const s=2*Math.sqrt(1+m33-m11-m22);this._w=(m21-m12)/s;this._x=(m13+m31)/s;this._y=(m23+m32)/s;this._z=0.25*s}this._onChangeCallback();return this}setFromUnitVectors(vFrom,vTo){let r=vFrom.dot(vTo)+1;if(r<1e-8){r=0;if(Math.abs(vFrom.x)>Math.abs(vFrom.z)){this._x=-vFrom.y;this._y=vFrom.x;this._z=0;this._w=r}else{this._x=0;this._y=-vFrom.z;this._z=vFrom.y;this._w=r}}else{this._x=vFrom.y*vTo.z-vFrom.z*vTo.y;this._y=vFrom.z*vTo.x-vFrom.x*vTo.z;this._z=vFrom.x*vTo.y-vFrom.y*vTo.x;this._w=r}return this.normalize()}angleTo(q){return 2*Math.acos(Math.abs(clamp(this.dot(q),-1,1)))}rotateTowards(q,step){const angle=this.angleTo(q);if(angle===0)return this;const t=Math.min(1,step/angle);this.slerp(q,t);return this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){this._x*=-1;this._y*=-1;this._z*=-1;this._onChangeCallback();return this}dot(v){return this._x*v._x+this._y*v._y+this._z*v._z+this._w*v._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let l=this.length();if(l===0){this._x=0;this._y=0;this._z=0;this._w=1}else{l=1/l;this._x=this._x*l;this._y=this._y*l;this._z=this._z*l;this._w=this._w*l}this._onChangeCallback();return this}multiply(q){return this.multiplyQuaternions(this,q)}premultiply(q){return this.multiplyQuaternions(q,this)}multiplyQuaternions(a,b){const qax=a._x,qay=a._y,qaz=a._z,qaw=a._w;const qbx=b._x,qby=b._y,qbz=b._z,qbw=b._w;this._x=qax*qbw+qaw*qbx+qay*qbz-qaz*qby;this._y=qay*qbw+qaw*qby+qaz*qbx-qax*qbz;this._z=qaz*qbw+qaw*qbz+qax*qby-qay*qbx;this._w=qaw*qbw-qax*qbx-qay*qby-qaz*qbz;this._onChangeCallback();return this}slerp(qb,t){if(t<=0)return this;if(t>=1)return this.copy(qb);let x=qb._x,y=qb._y,z=qb._z,w=qb._w;let dot=this.dot(qb);if(dot<0){x=-x;y=-y;z=-z;w=-w;dot=-dot}let s=1-t;if(dot<0.9995){const theta=Math.acos(dot);const sin=Math.sin(theta);s=Math.sin(s*theta)/sin;t=Math.sin(t*theta)/sin;this._x=this._x*s+x*t;this._y=this._y*s+y*t;this._z=this._z*s+z*t;this._w=this._w*s+w*t;this._onChangeCallback()}else{this._x=this._x*s+x*t;this._y=this._y*s+y*t;this._z=this._z*s+z*t;this._w=this._w*s+w*t;this.normalize()}return this}slerpQuaternions(qa,qb,t){return this.copy(qa).slerp(qb,t)}random(){const theta1=2*Math.PI*Math.random();const theta2=2*Math.PI*Math.random();const x0=Math.random();const r1=Math.sqrt(1-x0);const r2=Math.sqrt(x0);return this.set(r1*Math.sin(theta1),r1*Math.cos(theta1),r2*Math.sin(theta2),r2*Math.cos(theta2))}equals(quaternion){return quaternion._x===this._x&&quaternion._y===this._y&&quaternion._z===this._z&&quaternion._w===this._w}fromArray(array,offset=0){this._x=array[offset];this._y=array[offset+1];this._z=array[offset+2];this._w=array[offset+3];this._onChangeCallback();return this}toArray(array=[],offset=0){array[offset]=this._x;array[offset+1]=this._y;array[offset+2]=this._z;array[offset+3]=this._w;return array}fromBufferAttribute(attribute,index){this._x=attribute.getX(index);this._y=attribute.getY(index);this._z=attribute.getZ(index);this._w=attribute.getW(index);this._onChangeCallback();return this}toJSON(){return this.toArray()}_onChange(callback){this._onChangeCallback=callback;return this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x;yield this._y;yield this._z;yield this._w}}class Vector3{constructor(x=0,y=0,z=0){Vector3.prototype.isVector3=true;this.x=x;this.y=y;this.z=z}set(x,y,z){if(z===undefined)z=this.z;this.x=x;this.y=y;this.z=z;return this}setScalar(scalar){this.x=scalar;this.y=scalar;this.z=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setZ(z){this.z=z;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;case 2:this.z=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(v){this.x=v.x;this.y=v.y;this.z=v.z;return this}add(v){this.x+=v.x;this.y+=v.y;this.z+=v.z;return this}addScalar(s){this.x+=s;this.y+=s;this.z+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;this.z+=v.z*s;return this}sub(v){this.x-=v.x;this.y-=v.y;this.z-=v.z;return this}subScalar(s){this.x-=s;this.y-=s;this.z-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this}multiply(v){this.x*=v.x;this.y*=v.y;this.z*=v.z;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;this.z*=scalar;return this}multiplyVectors(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this}applyEuler(euler){return this.applyQuaternion(_quaternion$4.setFromEuler(euler))}applyAxisAngle(axis,angle){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(axis,angle))}applyMatrix3(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;this.x=e[0]*x+e[3]*y+e[6]*z;this.y=e[1]*x+e[4]*y+e[7]*z;this.z=e[2]*x+e[5]*y+e[8]*z;return this}applyNormalMatrix(m){return this.applyMatrix3(m).normalize()}applyMatrix4(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;const w=1/(e[3]*x+e[7]*y+e[11]*z+e[15]);this.x=(e[0]*x+e[4]*y+e[8]*z+e[12])*w;this.y=(e[1]*x+e[5]*y+e[9]*z+e[13])*w;this.z=(e[2]*x+e[6]*y+e[10]*z+e[14])*w;return this}applyQuaternion(q){const vx=this.x,vy=this.y,vz=this.z;const qx=q.x,qy=q.y,qz=q.z,qw=q.w;const tx=2*(qy*vz-qz*vy);const ty=2*(qz*vx-qx*vz);const tz=2*(qx*vy-qy*vx);this.x=vx+qw*tx+qy*tz-qz*ty;this.y=vy+qw*ty+qz*tx-qx*tz;this.z=vz+qw*tz+qx*ty-qy*tx;return this}project(camera){return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix)}unproject(camera){return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld)}transformDirection(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;this.x=e[0]*x+e[4]*y+e[8]*z;this.y=e[1]*x+e[5]*y+e[9]*z;this.z=e[2]*x+e[6]*y+e[10]*z;return this.normalize()}divide(v){this.x/=v.x;this.y/=v.y;this.z/=v.z;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);this.z=Math.min(this.z,v.z);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);this.z=Math.max(this.z,v.z);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);this.z=clamp(this.z,min.z,max.z);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);this.z=clamp(this.z,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);this.z=Math.trunc(this.z);return this}negate(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;this.z+=(v.z-this.z)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;this.z=v1.z+(v2.z-v1.z)*alpha;return this}cross(v){return this.crossVectors(this,v)}crossVectors(a,b){const ax=a.x,ay=a.y,az=a.z;const bx=b.x,by=b.y,bz=b.z;this.x=ay*bz-az*by;this.y=az*bx-ax*bz;this.z=ax*by-ay*bx;return this}projectOnVector(v){const denominator=v.lengthSq();if(denominator===0)return this.set(0,0,0);const scalar=v.dot(this)/denominator;return this.copy(v).multiplyScalar(scalar)}projectOnPlane(planeNormal){_vector$c.copy(this).projectOnVector(planeNormal);return this.sub(_vector$c)}reflect(normal){return this.sub(_vector$c.copy(normal).multiplyScalar(2*this.dot(normal)))}angleTo(v){const denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;const theta=this.dot(v)/denominator;return Math.acos(clamp(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){const dx=this.x-v.x,dy=this.y-v.y,dz=this.z-v.z;return dx*dx+dy*dy+dz*dz}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)+Math.abs(this.z-v.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(radius,phi,theta){const sinPhiRadius=Math.sin(phi)*radius;this.x=sinPhiRadius*Math.sin(theta);this.y=Math.cos(phi)*radius;this.z=sinPhiRadius*Math.cos(theta);return this}setFromCylindrical(c){return this.setFromCylindricalCoords(c.radius,c.theta,c.y)}setFromCylindricalCoords(radius,theta,y){this.x=radius*Math.sin(theta);this.y=y;this.z=radius*Math.cos(theta);return this}setFromMatrixPosition(m){const e=m.elements;this.x=e[12];this.y=e[13];this.z=e[14];return this}setFromMatrixScale(m){const sx=this.setFromMatrixColumn(m,0).length();const sy=this.setFromMatrixColumn(m,1).length();const sz=this.setFromMatrixColumn(m,2).length();this.x=sx;this.y=sy;this.z=sz;return this}setFromMatrixColumn(m,index){return this.fromArray(m.elements,index*4)}setFromMatrix3Column(m,index){return this.fromArray(m.elements,index*3)}setFromEuler(e){this.x=e._x;this.y=e._y;this.z=e._z;return this}setFromColor(c){this.x=c.r;this.y=c.g;this.z=c.b;return this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];this.z=array[offset+2];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;array[offset+2]=this.z;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);this.z=attribute.getZ(index);return this}random(){this.x=Math.random();this.y=Math.random();this.z=Math.random();return this}randomDirection(){const theta=Math.random()*Math.PI*2;const u=Math.random()*2-1;const c=Math.sqrt(1-u*u);this.x=c*Math.cos(theta);this.y=u;this.z=c*Math.sin(theta);return this}*[Symbol.iterator](){yield this.x;yield this.y;yield this.z}}const _vector$c=new Vector3;const _quaternion$4=new Quaternion;class Matrix3{constructor(n11,n12,n13,n21,n22,n23,n31,n32,n33){Matrix3.prototype.isMatrix3=true;this.elements=[1,0,0,0,1,0,0,0,1];if(n11!==undefined){this.set(n11,n12,n13,n21,n22,n23,n31,n32,n33)}}set(n11,n12,n13,n21,n22,n23,n31,n32,n33){const te=this.elements;te[0]=n11;te[1]=n21;te[2]=n31;te[3]=n12;te[4]=n22;te[5]=n32;te[6]=n13;te[7]=n23;te[8]=n33;return this}identity(){this.set(1,0,0,0,1,0,0,0,1);return this}copy(m){const te=this.elements;const me=m.elements;te[0]=me[0];te[1]=me[1];te[2]=me[2];te[3]=me[3];te[4]=me[4];te[5]=me[5];te[6]=me[6];te[7]=me[7];te[8]=me[8];return this}extractBasis(xAxis,yAxis,zAxis){xAxis.setFromMatrix3Column(this,0);yAxis.setFromMatrix3Column(this,1);zAxis.setFromMatrix3Column(this,2);return this}setFromMatrix4(m){const me=m.elements;this.set(me[0],me[4],me[8],me[1],me[5],me[9],me[2],me[6],me[10]);return this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a,b){const ae=a.elements;const be=b.elements;const te=this.elements;const a11=ae[0],a12=ae[3],a13=ae[6];const a21=ae[1],a22=ae[4],a23=ae[7];const a31=ae[2],a32=ae[5],a33=ae[8];const b11=be[0],b12=be[3],b13=be[6];const b21=be[1],b22=be[4],b23=be[7];const b31=be[2],b32=be[5],b33=be[8];te[0]=a11*b11+a12*b21+a13*b31;te[3]=a11*b12+a12*b22+a13*b32;te[6]=a11*b13+a12*b23+a13*b33;te[1]=a21*b11+a22*b21+a23*b31;te[4]=a21*b12+a22*b22+a23*b32;te[7]=a21*b13+a22*b23+a23*b33;te[2]=a31*b11+a32*b21+a33*b31;te[5]=a31*b12+a32*b22+a33*b32;te[8]=a31*b13+a32*b23+a33*b33;return this}multiplyScalar(s){const te=this.elements;te[0]*=s;te[3]*=s;te[6]*=s;te[1]*=s;te[4]*=s;te[7]*=s;te[2]*=s;te[5]*=s;te[8]*=s;return this}determinant(){const te=this.elements;const a=te[0],b=te[1],c=te[2],d=te[3],e=te[4],f=te[5],g=te[6],h=te[7],i=te[8];return a*e*i-a*f*h-b*d*i+b*f*g+c*d*h-c*e*g}invert(){const te=this.elements,n11=te[0],n21=te[1],n31=te[2],n12=te[3],n22=te[4],n32=te[5],n13=te[6],n23=te[7],n33=te[8],t11=n33*n22-n32*n23,t12=n32*n13-n33*n12,t13=n23*n12-n22*n13,det=n11*t11+n21*t12+n31*t13;if(det===0)return this.set(0,0,0,0,0,0,0,0,0);const detInv=1/det;te[0]=t11*detInv;te[1]=(n31*n23-n33*n21)*detInv;te[2]=(n32*n21-n31*n22)*detInv;te[3]=t12*detInv;te[4]=(n33*n11-n31*n13)*detInv;te[5]=(n31*n12-n32*n11)*detInv;te[6]=t13*detInv;te[7]=(n21*n13-n23*n11)*detInv;te[8]=(n22*n11-n21*n12)*detInv;return this}transpose(){let tmp;const m=this.elements;tmp=m[1];m[1]=m[3];m[3]=tmp;tmp=m[2];m[2]=m[6];m[6]=tmp;tmp=m[5];m[5]=m[7];m[7]=tmp;return this}getNormalMatrix(matrix4){return this.setFromMatrix4(matrix4).invert().transpose()}transposeIntoArray(r){const m=this.elements;r[0]=m[0];r[1]=m[3];r[2]=m[6];r[3]=m[1];r[4]=m[4];r[5]=m[7];r[6]=m[2];r[7]=m[5];r[8]=m[8];return this}setUvTransform(tx,ty,sx,sy,rotation,cx,cy){const c=Math.cos(rotation);const s=Math.sin(rotation);this.set(sx*c,sx*s,-sx*(c*cx+s*cy)+cx+tx,-sy*s,sy*c,-sy*(-s*cx+c*cy)+cy+ty,0,0,1);return this}scale(sx,sy){this.premultiply(_m3.makeScale(sx,sy));return this}rotate(theta){this.premultiply(_m3.makeRotation(-theta));return this}translate(tx,ty){this.premultiply(_m3.makeTranslation(tx,ty));return this}makeTranslation(x,y){if(x.isVector2){this.set(1,0,x.x,0,1,x.y,0,0,1)}else{this.set(1,0,x,0,1,y,0,0,1)}return this}makeRotation(theta){const c=Math.cos(theta);const s=Math.sin(theta);this.set(c,-s,0,s,c,0,0,0,1);return this}makeScale(x,y){this.set(x,0,0,0,y,0,0,0,1);return this}equals(matrix){const te=this.elements;const me=matrix.elements;for(let i=0;i<9;i++){if(te[i]!==me[i])return false}return true}fromArray(array,offset=0){for(let i=0;i<9;i++){this.elements[i]=array[i+offset]}return this}toArray(array=[],offset=0){const te=this.elements;array[offset]=te[0];array[offset+1]=te[1];array[offset+2]=te[2];array[offset+3]=te[3];array[offset+4]=te[4];array[offset+5]=te[5];array[offset+6]=te[6];array[offset+7]=te[7];array[offset+8]=te[8];return array}clone(){return new this.constructor().fromArray(this.elements)}}const _m3=new Matrix3;const LINEAR_REC709_TO_XYZ=new Matrix3().set(0.4123908,0.3575843,0.1804808,0.212639,0.7151687,0.0721923,0.0193308,0.1191948,0.9505322);const XYZ_TO_LINEAR_REC709=new Matrix3().set(3.2409699,-1.5373832,-0.4986108,-0.9692436,1.8759675,0.0415551,0.0556301,-0.203977,1.0569715);function createColorManagement(){const ColorManagement={enabled:true,workingColorSpace:LinearSRGBColorSpace,spaces:{},convert:function(color,sourceColorSpace,targetColorSpace){if(this.enabled===false||sourceColorSpace===targetColorSpace||!sourceColorSpace||!targetColorSpace){return color}if(this.spaces[sourceColorSpace].transfer===SRGBTransfer){color.r=SRGBToLinear(color.r);color.g=SRGBToLinear(color.g);color.b=SRGBToLinear(color.b)}if(this.spaces[sourceColorSpace].primaries!==this.spaces[targetColorSpace].primaries){color.applyMatrix3(this.spaces[sourceColorSpace].toXYZ);color.applyMatrix3(this.spaces[targetColorSpace].fromXYZ)}if(this.spaces[targetColorSpace].transfer===SRGBTransfer){color.r=LinearToSRGB(color.r);color.g=LinearToSRGB(color.g);color.b=LinearToSRGB(color.b)}return color},workingToColorSpace:function(color,targetColorSpace){return this.convert(color,this.workingColorSpace,targetColorSpace)},colorSpaceToWorking:function(color,sourceColorSpace){return this.convert(color,sourceColorSpace,this.workingColorSpace)},getPrimaries:function(colorSpace){return this.spaces[colorSpace].primaries},getTransfer:function(colorSpace){if(colorSpace===NoColorSpace)return LinearTransfer;return this.spaces[colorSpace].transfer},getToneMappingMode:function(colorSpace){return this.spaces[colorSpace].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(target,colorSpace=this.workingColorSpace){return target.fromArray(this.spaces[colorSpace].luminanceCoefficients)},define:function(colorSpaces){Object.assign(this.spaces,colorSpaces)},_getMatrix:function(targetMatrix,sourceColorSpace,targetColorSpace){return targetMatrix.copy(this.spaces[sourceColorSpace].toXYZ).multiply(this.spaces[targetColorSpace].fromXYZ)},_getDrawingBufferColorSpace:function(colorSpace){return this.spaces[colorSpace].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(colorSpace=this.workingColorSpace){return this.spaces[colorSpace].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(color,targetColorSpace){warnOnce("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().");return ColorManagement.workingToColorSpace(color,targetColorSpace)},toWorkingColorSpace:function(color,sourceColorSpace){warnOnce("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().");return ColorManagement.colorSpaceToWorking(color,sourceColorSpace)}};const REC709_PRIMARIES=[0.64,0.33,0.3,0.6,0.15,0.06];const REC709_LUMINANCE_COEFFICIENTS=[0.2126,0.7152,0.0722];const D65=[0.3127,0.329];ColorManagement.define({[LinearSRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65,transfer:LinearTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,workingColorSpaceConfig:{unpackColorSpace:SRGBColorSpace},outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}},[SRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65,transfer:SRGBTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}}});return ColorManagement}const ColorManagement=createColorManagement();function SRGBToLinear(c){return c<0.04045?c*0.0773993808:Math.pow(c*0.9478672986+0.0521327014,2.4)}function LinearToSRGB(c){return c<0.0031308?c*12.92:1.055*Math.pow(c,0.41666)-0.055}let _canvas;class ImageUtils{static getDataURL(image,type="image/png"){if(/^data:/i.test(image.src)){return image.src}if(typeof HTMLCanvasElement==="undefined"){return image.src}let canvas;if(image instanceof HTMLCanvasElement){canvas=image}else{if(_canvas===undefined)_canvas=createElementNS("canvas");_canvas.width=image.width;_canvas.height=image.height;const context=_canvas.getContext("2d");if(image instanceof ImageData){context.putImageData(image,0,0)}else{context.drawImage(image,0,0,image.width,image.height)}canvas=_canvas}return canvas.toDataURL(type)}static sRGBToLinear(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap){const canvas=createElementNS("canvas");canvas.width=image.width;canvas.height=image.height;const context=canvas.getContext("2d");context.drawImage(image,0,0,image.width,image.height);const imageData=context.getImageData(0,0,image.width,image.height);const data=imageData.data;for(let i=0;i<data.length;i++){data[i]=SRGBToLinear(data[i]/255)*255}context.putImageData(imageData,0,0);return canvas}else if(image.data){const data=image.data.slice(0);for(let i=0;i<data.length;i++){if(data instanceof Uint8Array||data instanceof Uint8ClampedArray){data[i]=Math.floor(SRGBToLinear(data[i]/255)*255)}else{data[i]=SRGBToLinear(data[i])}}return{data:data,width:image.width,height:image.height}}else{warn("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.");return image}}}let _sourceId=0;class Source{constructor(data=null){this.isSource=true;Object.defineProperty(this,"id",{value:_sourceId++});this.uuid=generateUUID();this.data=data;this.dataReady=true;this.version=0}getSize(target){const data=this.data;if(typeof HTMLVideoElement!=="undefined"&&data instanceof HTMLVideoElement){target.set(data.videoWidth,data.videoHeight,0)}else if(typeof VideoFrame!=="undefined"&&data instanceof VideoFrame){target.set(data.displayHeight,data.displayWidth,0)}else if(data!==null){target.set(data.width,data.height,data.depth||0)}else{target.set(0,0,0)}return target}set needsUpdate(value){if(value===true)this.version++}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(!isRootObject&&meta.images[this.uuid]!==undefined){return meta.images[this.uuid]}const output={uuid:this.uuid,url:""};const data=this.data;if(data!==null){let url;if(Array.isArray(data)){url=[];for(let i=0,l=data.length;i<l;i++){if(data[i].isDataTexture){url.push(serializeImage(data[i].image))}else{url.push(serializeImage(data[i]))}}}else{url=serializeImage(data)}output.url=url}if(!isRootObject){meta.images[this.uuid]=output}return output}}function serializeImage(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap){return ImageUtils.getDataURL(image)}else{if(image.data){return{data:Array.from(image.data),width:image.width,height:image.height,type:image.data.constructor.name}}else{warn("Texture: Unable to serialize Texture.");return{}}}}let _textureId=0;const _tempVec3=new Vector3;class Texture extends EventDispatcher{constructor(image=Texture.DEFAULT_IMAGE,mapping=Texture.DEFAULT_MAPPING,wrapS=ClampToEdgeWrapping,wrapT=ClampToEdgeWrapping,magFilter=LinearFilter,minFilter=LinearMipmapLinearFilter,format=RGBAFormat,type=UnsignedByteType,anisotropy=Texture.DEFAULT_ANISOTROPY,colorSpace=NoColorSpace){super();this.isTexture=true;Object.defineProperty(this,"id",{value:_textureId++});this.uuid=generateUUID();this.name="";this.source=new Source(image);this.mipmaps=[];this.mapping=mapping;this.channel=0;this.wrapS=wrapS;this.wrapT=wrapT;this.magFilter=magFilter;this.minFilter=minFilter;this.anisotropy=anisotropy;this.format=format;this.internalFormat=null;this.type=type;this.offset=new Vector2(0,0);this.repeat=new Vector2(1,1);this.center=new Vector2(0,0);this.rotation=0;this.matrixAutoUpdate=true;this.matrix=new Matrix3;this.generateMipmaps=true;this.premultiplyAlpha=false;this.flipY=true;this.unpackAlignment=4;this.colorSpace=colorSpace;this.userData={};this.updateRanges=[];this.version=0;this.onUpdate=null;this.renderTarget=null;this.isRenderTargetTexture=false;this.isArrayTexture=image&&image.depth&&image.depth>1?true:false;this.pmremVersion=0}get width(){return this.source.getSize(_tempVec3).x}get height(){return this.source.getSize(_tempVec3).y}get depth(){return this.source.getSize(_tempVec3).z}get image(){return this.source.data}set image(value=null){this.source.data=value}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name;this.source=source.source;this.mipmaps=source.mipmaps.slice(0);this.mapping=source.mapping;this.channel=source.channel;this.wrapS=source.wrapS;this.wrapT=source.wrapT;this.magFilter=source.magFilter;this.minFilter=source.minFilter;this.anisotropy=source.anisotropy;this.format=source.format;this.internalFormat=source.internalFormat;this.type=source.type;this.offset.copy(source.offset);this.repeat.copy(source.repeat);this.center.copy(source.center);this.rotation=source.rotation;this.matrixAutoUpdate=source.matrixAutoUpdate;this.matrix.copy(source.matrix);this.generateMipmaps=source.generateMipmaps;this.premultiplyAlpha=source.premultiplyAlpha;this.flipY=source.flipY;this.unpackAlignment=source.unpackAlignment;this.colorSpace=source.colorSpace;this.renderTarget=source.renderTarget;this.isRenderTargetTexture=source.isRenderTargetTexture;this.isArrayTexture=source.isArrayTexture;this.userData=JSON.parse(JSON.stringify(source.userData));this.needsUpdate=true;return this}setValues(values){for(const key in values){const newValue=values[key];if(newValue===undefined){warn(`Texture.setValues(): parameter '${key}' has value of undefined.`);continue}const currentValue=this[key];if(currentValue===undefined){warn(`Texture.setValues(): property '${key}' does not exist.`);continue}if(currentValue&&newValue&&currentValue.isVector2&&newValue.isVector2){currentValue.copy(newValue)}else if(currentValue&&newValue&&currentValue.isVector3&&newValue.isVector3){currentValue.copy(newValue)}else if(currentValue&&newValue&&currentValue.isMatrix3&&newValue.isMatrix3){currentValue.copy(newValue)}else{this[key]=newValue}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(!isRootObject&&meta.textures[this.uuid]!==undefined){return meta.textures[this.uuid]}const output={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(meta).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(Object.keys(this.userData).length>0)output.userData=this.userData;if(!isRootObject){meta.textures[this.uuid]=output}return output}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(uv){if(this.mapping!==UVMapping)return uv;uv.applyMatrix3(this.matrix);if(uv.x<0||uv.x>1){switch(this.wrapS){case RepeatWrapping:uv.x=uv.x-Math.floor(uv.x);break;case ClampToEdgeWrapping:uv.x=uv.x<0?0:1;break;case MirroredRepeatWrapping:if(Math.abs(Math.floor(uv.x)%2)===1){uv.x=Math.ceil(uv.x)-uv.x}else{uv.x=uv.x-Math.floor(uv.x)}break;}}if(uv.y<0||uv.y>1){switch(this.wrapT){case RepeatWrapping:uv.y=uv.y-Math.floor(uv.y);break;case ClampToEdgeWrapping:uv.y=uv.y<0?0:1;break;case MirroredRepeatWrapping:if(Math.abs(Math.floor(uv.y)%2)===1){uv.y=Math.ceil(uv.y)-uv.y}else{uv.y=uv.y-Math.floor(uv.y)}break;}}if(this.flipY){uv.y=1-uv.y}return uv}set needsUpdate(value){if(value===true){this.version++;this.source.needsUpdate=true}}set needsPMREMUpdate(value){if(value===true){this.pmremVersion++}}}Texture.DEFAULT_IMAGE=null;Texture.DEFAULT_MAPPING=UVMapping;Texture.DEFAULT_ANISOTROPY=1;class Vector4{constructor(x=0,y=0,z=0,w=1){Vector4.prototype.isVector4=true;this.x=x;this.y=y;this.z=z;this.w=w}get width(){return this.z}set width(value){this.z=value}get height(){return this.w}set height(value){this.w=value}set(x,y,z,w){this.x=x;this.y=y;this.z=z;this.w=w;return this}setScalar(scalar){this.x=scalar;this.y=scalar;this.z=scalar;this.w=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setZ(z){this.z=z;return this}setW(w){this.w=w;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;case 2:this.z=value;break;case 3:this.w=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(v){this.x=v.x;this.y=v.y;this.z=v.z;this.w=v.w!==undefined?v.w:1;return this}add(v){this.x+=v.x;this.y+=v.y;this.z+=v.z;this.w+=v.w;return this}addScalar(s){this.x+=s;this.y+=s;this.z+=s;this.w+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;this.z+=v.z*s;this.w+=v.w*s;return this}sub(v){this.x-=v.x;this.y-=v.y;this.z-=v.z;this.w-=v.w;return this}subScalar(s){this.x-=s;this.y-=s;this.z-=s;this.w-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this}multiply(v){this.x*=v.x;this.y*=v.y;this.z*=v.z;this.w*=v.w;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;this.z*=scalar;this.w*=scalar;return this}applyMatrix4(m){const x=this.x,y=this.y,z=this.z,w=this.w;const e=m.elements;this.x=e[0]*x+e[4]*y+e[8]*z+e[12]*w;this.y=e[1]*x+e[5]*y+e[9]*z+e[13]*w;this.z=e[2]*x+e[6]*y+e[10]*z+e[14]*w;this.w=e[3]*x+e[7]*y+e[11]*z+e[15]*w;return this}divide(v){this.x/=v.x;this.y/=v.y;this.z/=v.z;this.w/=v.w;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}setAxisAngleFromQuaternion(q){this.w=2*Math.acos(q.w);const s=Math.sqrt(1-q.w*q.w);if(s<0.0001){this.x=1;this.y=0;this.z=0}else{this.x=q.x/s;this.y=q.y/s;this.z=q.z/s}return this}setAxisAngleFromRotationMatrix(m){let angle,x,y,z;const epsilon=0.01,epsilon2=0.1,te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10];if(Math.abs(m12-m21)<epsilon&&Math.abs(m13-m31)<epsilon&&Math.abs(m23-m32)<epsilon){if(Math.abs(m12+m21)<epsilon2&&Math.abs(m13+m31)<epsilon2&&Math.abs(m23+m32)<epsilon2&&Math.abs(m11+m22+m33-3)<epsilon2){this.set(1,0,0,0);return this}angle=Math.PI;const xx=(m11+1)/2;const yy=(m22+1)/2;const zz=(m33+1)/2;const xy=(m12+m21)/4;const xz=(m13+m31)/4;const yz=(m23+m32)/4;if(xx>yy&&xx>zz){if(xx<epsilon){x=0;y=0.707106781;z=0.707106781}else{x=Math.sqrt(xx);y=xy/x;z=xz/x}}else if(yy>zz){if(yy<epsilon){x=0.707106781;y=0;z=0.707106781}else{y=Math.sqrt(yy);x=xy/y;z=yz/y}}else{if(zz<epsilon){x=0.707106781;y=0.707106781;z=0}else{z=Math.sqrt(zz);x=xz/z;y=yz/z}}this.set(x,y,z,angle);return this}let s=Math.sqrt((m32-m23)*(m32-m23)+(m13-m31)*(m13-m31)+(m21-m12)*(m21-m12));if(Math.abs(s)<0.001)s=1;this.x=(m32-m23)/s;this.y=(m13-m31)/s;this.z=(m21-m12)/s;this.w=Math.acos((m11+m22+m33-1)/2);return this}setFromMatrixPosition(m){const e=m.elements;this.x=e[12];this.y=e[13];this.z=e[14];this.w=e[15];return this}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);this.z=Math.min(this.z,v.z);this.w=Math.min(this.w,v.w);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);this.z=Math.max(this.z,v.z);this.w=Math.max(this.w,v.w);return this}clamp(min,max){this.x=clamp(this.x,min.x,max.x);this.y=clamp(this.y,min.y,max.y);this.z=clamp(this.z,min.z,max.z);this.w=clamp(this.w,min.w,max.w);return this}clampScalar(minVal,maxVal){this.x=clamp(this.x,minVal,maxVal);this.y=clamp(this.y,minVal,maxVal);this.z=clamp(this.z,minVal,maxVal);this.w=clamp(this.w,minVal,maxVal);return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp(length,min,max))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);this.z=Math.trunc(this.z);this.w=Math.trunc(this.w);return this}negate(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z+this.w*v.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;this.z+=(v.z-this.z)*alpha;this.w+=(v.w-this.w)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;this.z=v1.z+(v2.z-v1.z)*alpha;this.w=v1.w+(v2.w-v1.w)*alpha;return this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z&&v.w===this.w}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];this.z=array[offset+2];this.w=array[offset+3];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;array[offset+2]=this.z;array[offset+3]=this.w;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);this.z=attribute.getZ(index);this.w=attribute.getW(index);return this}random(){this.x=Math.random();this.y=Math.random();this.z=Math.random();this.w=Math.random();return this}*[Symbol.iterator](){yield this.x;yield this.y;yield this.z;yield this.w}}class RenderTarget extends EventDispatcher{constructor(width=1,height=1,options={}){super();options=Object.assign({generateMipmaps:false,internalFormat:null,minFilter:LinearFilter,depthBuffer:true,stencilBuffer:false,resolveDepthBuffer:true,resolveStencilBuffer:true,depthTexture:null,samples:0,count:1,depth:1,multiview:false},options);this.isRenderTarget=true;this.width=width;this.height=height;this.depth=options.depth;this.scissor=new Vector4(0,0,width,height);this.scissorTest=false;this.viewport=new Vector4(0,0,width,height);const image={width:width,height:height,depth:options.depth};const texture=new Texture(image);this.textures=[];const count=options.count;for(let i=0;i<count;i++){this.textures[i]=texture.clone();this.textures[i].isRenderTargetTexture=true;this.textures[i].renderTarget=this}this._setTextureOptions(options);this.depthBuffer=options.depthBuffer;this.stencilBuffer=options.stencilBuffer;this.resolveDepthBuffer=options.resolveDepthBuffer;this.resolveStencilBuffer=options.resolveStencilBuffer;this._depthTexture=null;this.depthTexture=options.depthTexture;this.samples=options.samples;this.multiview=options.multiview}_setTextureOptions(options={}){const values={minFilter:LinearFilter,generateMipmaps:false,flipY:false,internalFormat:null};if(options.mapping!==undefined)values.mapping=options.mapping;if(options.wrapS!==undefined)values.wrapS=options.wrapS;if(options.wrapT!==undefined)values.wrapT=options.wrapT;if(options.wrapR!==undefined)values.wrapR=options.wrapR;if(options.magFilter!==undefined)values.magFilter=options.magFilter;if(options.minFilter!==undefined)values.minFilter=options.minFilter;if(options.format!==undefined)values.format=options.format;if(options.type!==undefined)values.type=options.type;if(options.anisotropy!==undefined)values.anisotropy=options.anisotropy;if(options.colorSpace!==undefined)values.colorSpace=options.colorSpace;if(options.flipY!==undefined)values.flipY=options.flipY;if(options.generateMipmaps!==undefined)values.generateMipmaps=options.generateMipmaps;if(options.internalFormat!==undefined)values.internalFormat=options.internalFormat;for(let i=0;i<this.textures.length;i++){const texture=this.textures[i];texture.setValues(values)}}get texture(){return this.textures[0]}set texture(value){this.textures[0]=value}set depthTexture(current){if(this._depthTexture!==null)this._depthTexture.renderTarget=null;if(current!==null)current.renderTarget=this;this._depthTexture=current}get depthTexture(){return this._depthTexture}setSize(width,height,depth=1){if(this.width!==width||this.height!==height||this.depth!==depth){this.width=width;this.height=height;this.depth=depth;for(let i=0,il=this.textures.length;i<il;i++){this.textures[i].image.width=width;this.textures[i].image.height=height;this.textures[i].image.depth=depth;if(this.textures[i].isData3DTexture!==true){this.textures[i].isArrayTexture=this.textures[i].image.depth>1}}this.dispose()}this.viewport.set(0,0,width,height);this.scissor.set(0,0,width,height)}clone(){return new this.constructor().copy(this)}copy(source){this.width=source.width;this.height=source.height;this.depth=source.depth;this.scissor.copy(source.scissor);this.scissorTest=source.scissorTest;this.viewport.copy(source.viewport);this.textures.length=0;for(let i=0,il=source.textures.length;i<il;i++){this.textures[i]=source.textures[i].clone();this.textures[i].isRenderTargetTexture=true;this.textures[i].renderTarget=this;const image=Object.assign({},source.textures[i].image);this.textures[i].source=new Source(image)}this.depthBuffer=source.depthBuffer;this.stencilBuffer=source.stencilBuffer;this.resolveDepthBuffer=source.resolveDepthBuffer;this.resolveStencilBuffer=source.resolveStencilBuffer;if(source.depthTexture!==null)this.depthTexture=source.depthTexture.clone();this.samples=source.samples;return this}dispose(){this.dispatchEvent({type:"dispose"})}}class WebGLRenderTarget extends RenderTarget{constructor(width=1,height=1,options={}){super(width,height,options);this.isWebGLRenderTarget=true}}class DataArrayTexture extends Texture{constructor(data=null,width=1,height=1,depth=1){super(null);this.isDataArrayTexture=true;this.image={data,width,height,depth};this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.wrapR=ClampToEdgeWrapping;this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1;this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}}class WebGLArrayRenderTarget extends WebGLRenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isWebGLArrayRenderTarget=true;this.depth=depth;this.texture=new DataArrayTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Data3DTexture extends Texture{constructor(data=null,width=1,height=1,depth=1){super(null);this.isData3DTexture=true;this.image={data,width,height,depth};this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.wrapR=ClampToEdgeWrapping;this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1}}class WebGL3DRenderTarget extends WebGLRenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isWebGL3DRenderTarget=true;this.depth=depth;this.texture=new Data3DTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Box3{constructor(min=new Vector3(+Infinity,+Infinity,+Infinity),max=new Vector3(-Infinity,-Infinity,-Infinity)){this.isBox3=true;this.min=min;this.max=max}set(min,max){this.min.copy(min);this.max.copy(max);return this}setFromArray(array){this.makeEmpty();for(let i=0,il=array.length;i<il;i+=3){this.expandByPoint(_vector$b.fromArray(array,i))}return this}setFromBufferAttribute(attribute){this.makeEmpty();for(let i=0,il=attribute.count;i<il;i++){this.expandByPoint(_vector$b.fromBufferAttribute(attribute,i))}return this}setFromPoints(points){this.makeEmpty();for(let i=0,il=points.length;i<il;i++){this.expandByPoint(points[i])}return this}setFromCenterAndSize(center,size){const halfSize=_vector$b.copy(size).multiplyScalar(0.5);this.min.copy(center).sub(halfSize);this.max.copy(center).add(halfSize);return this}setFromObject(object,precise=false){this.makeEmpty();return this.expandByObject(object,precise)}clone(){return new this.constructor().copy(this)}copy(box){this.min.copy(box.min);this.max.copy(box.max);return this}makeEmpty(){this.min.x=this.min.y=this.min.z=+Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(target){return this.isEmpty()?target.set(0,0,0):target.addVectors(this.min,this.max).multiplyScalar(0.5)}getSize(target){return this.isEmpty()?target.set(0,0,0):target.subVectors(this.max,this.min)}expandByPoint(point){this.min.min(point);this.max.max(point);return this}expandByVector(vector){this.min.sub(vector);this.max.add(vector);return this}expandByScalar(scalar){this.min.addScalar(-scalar);this.max.addScalar(scalar);return this}expandByObject(object,precise=false){object.updateWorldMatrix(false,false);const geometry=object.geometry;if(geometry!==undefined){const positionAttribute=geometry.getAttribute("position");if(precise===true&&positionAttribute!==undefined&&object.isInstancedMesh!==true){for(let i=0,l=positionAttribute.count;i<l;i++){if(object.isMesh===true){object.getVertexPosition(i,_vector$b)}else{_vector$b.fromBufferAttribute(positionAttribute,i)}_vector$b.applyMatrix4(object.matrixWorld);this.expandByPoint(_vector$b)}}else{if(object.boundingBox!==undefined){if(object.boundingBox===null){object.computeBoundingBox()}_box$4.copy(object.boundingBox)}else{if(geometry.boundingBox===null){geometry.computeBoundingBox()}_box$4.copy(geometry.boundingBox)}_box$4.applyMatrix4(object.matrixWorld);this.union(_box$4)}}const children=object.children;for(let i=0,l=children.length;i<l;i++){this.expandByObject(children[i],precise)}return this}containsPoint(point){return point.x>=this.min.x&&point.x<=this.max.x&&point.y>=this.min.y&&point.y<=this.max.y&&point.z>=this.min.z&&point.z<=this.max.z}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y&&this.min.z<=box.min.z&&box.max.z<=this.max.z}getParameter(point,target){return target.set((point.x-this.min.x)/(this.max.x-this.min.x),(point.y-this.min.y)/(this.max.y-this.min.y),(point.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y&&box.max.z>=this.min.z&&box.min.z<=this.max.z}intersectsSphere(sphere){this.clampPoint(sphere.center,_vector$b);return _vector$b.distanceToSquared(sphere.center)<=sphere.radius*sphere.radius}intersectsPlane(plane){let min,max;if(plane.normal.x>0){min=plane.normal.x*this.min.x;max=plane.normal.x*this.max.x}else{min=plane.normal.x*this.max.x;max=plane.normal.x*this.min.x}if(plane.normal.y>0){min+=plane.normal.y*this.min.y;max+=plane.normal.y*this.max.y}else{min+=plane.normal.y*this.max.y;max+=plane.normal.y*this.min.y}if(plane.normal.z>0){min+=plane.normal.z*this.min.z;max+=plane.normal.z*this.max.z}else{min+=plane.normal.z*this.max.z;max+=plane.normal.z*this.min.z}return min<=-plane.constant&&max>=-plane.constant}intersectsTriangle(triangle){if(this.isEmpty()){return false}this.getCenter(_center);_extents.subVectors(this.max,_center);_v0$3.subVectors(triangle.a,_center);_v1$7.subVectors(triangle.b,_center);_v2$4.subVectors(triangle.c,_center);_f0.subVectors(_v1$7,_v0$3);_f1.subVectors(_v2$4,_v1$7);_f2.subVectors(_v0$3,_v2$4);let axes=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];if(!satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)){return false}axes=[1,0,0,0,1,0,0,0,1];if(!satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)){return false}_triangleNormal.crossVectors(_f0,_f1);axes=[_triangleNormal.x,_triangleNormal.y,_triangleNormal.z];return satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)}clampPoint(point,target){return target.copy(point).clamp(this.min,this.max)}distanceToPoint(point){return this.clampPoint(point,_vector$b).distanceTo(point)}getBoundingSphere(target){if(this.isEmpty()){target.makeEmpty()}else{this.getCenter(target.center);target.radius=this.getSize(_vector$b).length()*0.5}return target}intersect(box){this.min.max(box.min);this.max.min(box.max);if(this.isEmpty())this.makeEmpty();return this}union(box){this.min.min(box.min);this.max.max(box.max);return this}applyMatrix4(matrix){if(this.isEmpty())return this;_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(matrix);_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(matrix);_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(matrix);_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(matrix);_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(matrix);_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(matrix);_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(matrix);_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(matrix);this.setFromPoints(_points);return this}translate(offset){this.min.add(offset);this.max.add(offset);return this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(json){this.min.fromArray(json.min);this.max.fromArray(json.max);return this}}const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3];const _vector$b=new Vector3;const _box$4=new Box3;const _v0$3=new Vector3;const _v1$7=new Vector3;const _v2$4=new Vector3;const _f0=new Vector3;const _f1=new Vector3;const _f2=new Vector3;const _center=new Vector3;const _extents=new Vector3;const _triangleNormal=new Vector3;const _testAxis=new Vector3;function satForAxes(axes,v0,v1,v2,extents){for(let i=0,j=axes.length-3;i<=j;i+=3){_testAxis.fromArray(axes,i);const r=extents.x*Math.abs(_testAxis.x)+extents.y*Math.abs(_testAxis.y)+extents.z*Math.abs(_testAxis.z);const p0=v0.dot(_testAxis);const p1=v1.dot(_testAxis);const p2=v2.dot(_testAxis);if(Math.max(-Math.max(p0,p1,p2),Math.min(p0,p1,p2))>r){return false}}return true}const _box$3=new Box3;const _v1$6=new Vector3;const _v2$3=new Vector3;class Sphere{constructor(center=new Vector3,radius=-1){this.isSphere=true;this.center=center;this.radius=radius}set(center,radius){this.center.copy(center);this.radius=radius;return this}setFromPoints(points,optionalCenter){const center=this.center;if(optionalCenter!==undefined){center.copy(optionalCenter)}else{_box$3.setFromPoints(points).getCenter(center)}let maxRadiusSq=0;for(let i=0,il=points.length;i<il;i++){maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(points[i]))}this.radius=Math.sqrt(maxRadiusSq);return this}copy(sphere){this.center.copy(sphere.center);this.radius=sphere.radius;return this}isEmpty(){return this.radius<0}makeEmpty(){this.center.set(0,0,0);this.radius=-1;return this}containsPoint(point){return point.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(point){return point.distanceTo(this.center)-this.radius}intersectsSphere(sphere){const radiusSum=this.radius+sphere.radius;return sphere.center.distanceToSquared(this.center)<=radiusSum*radiusSum}intersectsBox(box){return box.intersectsSphere(this)}intersectsPlane(plane){return Math.abs(plane.distanceToPoint(this.center))<=this.radius}clampPoint(point,target){const deltaLengthSq=this.center.distanceToSquared(point);target.copy(point);if(deltaLengthSq>this.radius*this.radius){target.sub(this.center).normalize();target.multiplyScalar(this.radius).add(this.center)}return target}getBoundingBox(target){if(this.isEmpty()){target.makeEmpty();return target}target.set(this.center,this.center);target.expandByScalar(this.radius);return target}applyMatrix4(matrix){this.center.applyMatrix4(matrix);this.radius=this.radius*matrix.getMaxScaleOnAxis();return this}translate(offset){this.center.add(offset);return this}expandByPoint(point){if(this.isEmpty()){this.center.copy(point);this.radius=0;return this}_v1$6.subVectors(point,this.center);const lengthSq=_v1$6.lengthSq();if(lengthSq>this.radius*this.radius){const length=Math.sqrt(lengthSq);const delta=(length-this.radius)*0.5;this.center.addScaledVector(_v1$6,delta/length);this.radius+=delta}return this}union(sphere){if(sphere.isEmpty()){return this}if(this.isEmpty()){this.copy(sphere);return this}if(this.center.equals(sphere.center)===true){this.radius=Math.max(this.radius,sphere.radius)}else{_v2$3.subVectors(sphere.center,this.center).setLength(sphere.radius);this.expandByPoint(_v1$6.copy(sphere.center).add(_v2$3));this.expandByPoint(_v1$6.copy(sphere.center).sub(_v2$3))}return this}equals(sphere){return sphere.center.equals(this.center)&&sphere.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(json){this.radius=json.radius;this.center.fromArray(json.center);return this}}const _vector$a=new Vector3;const _segCenter=new Vector3;const _segDir=new Vector3;const _diff=new Vector3;const _edge1=new Vector3;const _edge2=new Vector3;const _normal$1=new Vector3;class Ray{constructor(origin=new Vector3,direction=new Vector3(0,0,-1)){this.origin=origin;this.direction=direction}set(origin,direction){this.origin.copy(origin);this.direction.copy(direction);return this}copy(ray){this.origin.copy(ray.origin);this.direction.copy(ray.direction);return this}at(t,target){return target.copy(this.origin).addScaledVector(this.direction,t)}lookAt(v){this.direction.copy(v).sub(this.origin).normalize();return this}recast(t){this.origin.copy(this.at(t,_vector$a));return this}closestPointToPoint(point,target){target.subVectors(point,this.origin);const directionDistance=target.dot(this.direction);if(directionDistance<0){return target.copy(this.origin)}return target.copy(this.origin).addScaledVector(this.direction,directionDistance)}distanceToPoint(point){return Math.sqrt(this.distanceSqToPoint(point))}distanceSqToPoint(point){const directionDistance=_vector$a.subVectors(point,this.origin).dot(this.direction);if(directionDistance<0){return this.origin.distanceToSquared(point)}_vector$a.copy(this.origin).addScaledVector(this.direction,directionDistance);return _vector$a.distanceToSquared(point)}distanceSqToSegment(v0,v1,optionalPointOnRay,optionalPointOnSegment){_segCenter.copy(v0).add(v1).multiplyScalar(0.5);_segDir.copy(v1).sub(v0).normalize();_diff.copy(this.origin).sub(_segCenter);const segExtent=v0.distanceTo(v1)*0.5;const a01=-this.direction.dot(_segDir);const b0=_diff.dot(this.direction);const b1=-_diff.dot(_segDir);const c=_diff.lengthSq();const det=Math.abs(1-a01*a01);let s0,s1,sqrDist,extDet;if(det>0){s0=a01*b1-b0;s1=a01*b0-b1;extDet=segExtent*det;if(s0>=0){if(s1>=-extDet){if(s1<=extDet){const invDet=1/det;s0*=invDet;s1*=invDet;sqrDist=s0*(s0+a01*s1+2*b0)+s1*(a01*s0+s1+2*b1)+c}else{s1=segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}}else{s1=-segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}}else{if(s1<=-extDet){s0=Math.max(0,-(-a01*segExtent+b0));s1=s0>0?-segExtent:Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=-s0*s0+s1*(s1+2*b1)+c}else if(s1<=extDet){s0=0;s1=Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=s1*(s1+2*b1)+c}else{s0=Math.max(0,-(a01*segExtent+b0));s1=s0>0?segExtent:Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=-s0*s0+s1*(s1+2*b1)+c}}}else{s1=a01>0?-segExtent:segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}if(optionalPointOnRay){optionalPointOnRay.copy(this.origin).addScaledVector(this.direction,s0)}if(optionalPointOnSegment){optionalPointOnSegment.copy(_segCenter).addScaledVector(_segDir,s1)}return sqrDist}intersectSphere(sphere,target){_vector$a.subVectors(sphere.center,this.origin);const tca=_vector$a.dot(this.direction);const d2=_vector$a.dot(_vector$a)-tca*tca;const radius2=sphere.radius*sphere.radius;if(d2>radius2)return null;const thc=Math.sqrt(radius2-d2);const t0=tca-thc;const t1=tca+thc;if(t1<0)return null;if(t0<0)return this.at(t1,target);return this.at(t0,target)}intersectsSphere(sphere){if(sphere.radius<0)return false;return this.distanceSqToPoint(sphere.center)<=sphere.radius*sphere.radius}distanceToPlane(plane){const denominator=plane.normal.dot(this.direction);if(denominator===0){if(plane.distanceToPoint(this.origin)===0){return 0}return null}const t=-(this.origin.dot(plane.normal)+plane.constant)/denominator;return t>=0?t:null}intersectPlane(plane,target){const t=this.distanceToPlane(plane);if(t===null){return null}return this.at(t,target)}intersectsPlane(plane){const distToPoint=plane.distanceToPoint(this.origin);if(distToPoint===0){return true}const denominator=plane.normal.dot(this.direction);if(denominator*distToPoint<0){return true}return false}intersectBox(box,target){let tmin,tmax,tymin,tymax,tzmin,tzmax;const invdirx=1/this.direction.x,invdiry=1/this.direction.y,invdirz=1/this.direction.z;const origin=this.origin;if(invdirx>=0){tmin=(box.min.x-origin.x)*invdirx;tmax=(box.max.x-origin.x)*invdirx}else{tmin=(box.max.x-origin.x)*invdirx;tmax=(box.min.x-origin.x)*invdirx}if(invdiry>=0){tymin=(box.min.y-origin.y)*invdiry;tymax=(box.max.y-origin.y)*invdiry}else{tymin=(box.max.y-origin.y)*invdiry;tymax=(box.min.y-origin.y)*invdiry}if(tmin>tymax||tymin>tmax)return null;if(tymin>tmin||isNaN(tmin))tmin=tymin;if(tymax<tmax||isNaN(tmax))tmax=tymax;if(invdirz>=0){tzmin=(box.min.z-origin.z)*invdirz;tzmax=(box.max.z-origin.z)*invdirz}else{tzmin=(box.max.z-origin.z)*invdirz;tzmax=(box.min.z-origin.z)*invdirz}if(tmin>tzmax||tzmin>tmax)return null;if(tzmin>tmin||tmin!==tmin)tmin=tzmin;if(tzmax<tmax||tmax!==tmax)tmax=tzmax;if(tmax<0)return null;return this.at(tmin>=0?tmin:tmax,target)}intersectsBox(box){return this.intersectBox(box,_vector$a)!==null}intersectTriangle(a,b,c,backfaceCulling,target){_edge1.subVectors(b,a);_edge2.subVectors(c,a);_normal$1.crossVectors(_edge1,_edge2);let DdN=this.direction.dot(_normal$1);let sign;if(DdN>0){if(backfaceCulling)return null;sign=1}else if(DdN<0){sign=-1;DdN=-DdN}else{return null}_diff.subVectors(this.origin,a);const DdQxE2=sign*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(DdQxE2<0){return null}const DdE1xQ=sign*this.direction.dot(_edge1.cross(_diff));if(DdE1xQ<0){return null}if(DdQxE2+DdE1xQ>DdN){return null}const QdN=-sign*_diff.dot(_normal$1);if(QdN<0){return null}return this.at(QdN/DdN,target)}applyMatrix4(matrix4){this.origin.applyMatrix4(matrix4);this.direction.transformDirection(matrix4);return this}equals(ray){return ray.origin.equals(this.origin)&&ray.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Matrix4{constructor(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){Matrix4.prototype.isMatrix4=true;this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];if(n11!==undefined){this.set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44)}}set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){const te=this.elements;te[0]=n11;te[4]=n12;te[8]=n13;te[12]=n14;te[1]=n21;te[5]=n22;te[9]=n23;te[13]=n24;te[2]=n31;te[6]=n32;te[10]=n33;te[14]=n34;te[3]=n41;te[7]=n42;te[11]=n43;te[15]=n44;return this}identity(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this}clone(){return new Matrix4().fromArray(this.elements)}copy(m){const te=this.elements;const me=m.elements;te[0]=me[0];te[1]=me[1];te[2]=me[2];te[3]=me[3];te[4]=me[4];te[5]=me[5];te[6]=me[6];te[7]=me[7];te[8]=me[8];te[9]=me[9];te[10]=me[10];te[11]=me[11];te[12]=me[12];te[13]=me[13];te[14]=me[14];te[15]=me[15];return this}copyPosition(m){const te=this.elements,me=m.elements;te[12]=me[12];te[13]=me[13];te[14]=me[14];return this}setFromMatrix3(m){const me=m.elements;this.set(me[0],me[3],me[6],0,me[1],me[4],me[7],0,me[2],me[5],me[8],0,0,0,0,1);return this}extractBasis(xAxis,yAxis,zAxis){if(this.determinant()===0){xAxis.set(1,0,0);yAxis.set(0,1,0);zAxis.set(0,0,1);return this}xAxis.setFromMatrixColumn(this,0);yAxis.setFromMatrixColumn(this,1);zAxis.setFromMatrixColumn(this,2);return this}makeBasis(xAxis,yAxis,zAxis){this.set(xAxis.x,yAxis.x,zAxis.x,0,xAxis.y,yAxis.y,zAxis.y,0,xAxis.z,yAxis.z,zAxis.z,0,0,0,0,1);return this}extractRotation(m){if(m.determinant()===0){return this.identity()}const te=this.elements;const me=m.elements;const scaleX=1/_v1$5.setFromMatrixColumn(m,0).length();const scaleY=1/_v1$5.setFromMatrixColumn(m,1).length();const scaleZ=1/_v1$5.setFromMatrixColumn(m,2).length();te[0]=me[0]*scaleX;te[1]=me[1]*scaleX;te[2]=me[2]*scaleX;te[3]=0;te[4]=me[4]*scaleY;te[5]=me[5]*scaleY;te[6]=me[6]*scaleY;te[7]=0;te[8]=me[8]*scaleZ;te[9]=me[9]*scaleZ;te[10]=me[10]*scaleZ;te[11]=0;te[12]=0;te[13]=0;te[14]=0;te[15]=1;return this}makeRotationFromEuler(euler){const te=this.elements;const x=euler.x,y=euler.y,z=euler.z;const a=Math.cos(x),b=Math.sin(x);const c=Math.cos(y),d=Math.sin(y);const e=Math.cos(z),f=Math.sin(z);if(euler.order==="XYZ"){const ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e;te[4]=-c*f;te[8]=d;te[1]=af+be*d;te[5]=ae-bf*d;te[9]=-b*c;te[2]=bf-ae*d;te[6]=be+af*d;te[10]=a*c}else if(euler.order==="YXZ"){const ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce+df*b;te[4]=de*b-cf;te[8]=a*d;te[1]=a*f;te[5]=a*e;te[9]=-b;te[2]=cf*b-de;te[6]=df+ce*b;te[10]=a*c}else if(euler.order==="ZXY"){const ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce-df*b;te[4]=-a*f;te[8]=de+cf*b;te[1]=cf+de*b;te[5]=a*e;te[9]=df-ce*b;te[2]=-a*d;te[6]=b;te[10]=a*c}else if(euler.order==="ZYX"){const ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e;te[4]=be*d-af;te[8]=ae*d+bf;te[1]=c*f;te[5]=bf*d+ae;te[9]=af*d-be;te[2]=-d;te[6]=b*c;te[10]=a*c}else if(euler.order==="YZX"){const ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e;te[4]=bd-ac*f;te[8]=bc*f+ad;te[1]=f;te[5]=a*e;te[9]=-b*e;te[2]=-d*e;te[6]=ad*f+bc;te[10]=ac-bd*f}else if(euler.order==="XZY"){const ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e;te[4]=-f;te[8]=d*e;te[1]=ac*f+bd;te[5]=a*e;te[9]=ad*f-bc;te[2]=bc*f-ad;te[6]=b*e;te[10]=bd*f+ac}te[3]=0;te[7]=0;te[11]=0;te[12]=0;te[13]=0;te[14]=0;te[15]=1;return this}makeRotationFromQuaternion(q){return this.compose(_zero,q,_one)}lookAt(eye,target,up){const te=this.elements;_z.subVectors(eye,target);if(_z.lengthSq()===0){_z.z=1}_z.normalize();_x.crossVectors(up,_z);if(_x.lengthSq()===0){if(Math.abs(up.z)===1){_z.x+=0.0001}else{_z.z+=0.0001}_z.normalize();_x.crossVectors(up,_z)}_x.normalize();_y.crossVectors(_z,_x);te[0]=_x.x;te[4]=_y.x;te[8]=_z.x;te[1]=_x.y;te[5]=_y.y;te[9]=_z.y;te[2]=_x.z;te[6]=_y.z;te[10]=_z.z;return this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a,b){const ae=a.elements;const be=b.elements;const te=this.elements;const a11=ae[0],a12=ae[4],a13=ae[8],a14=ae[12];const a21=ae[1],a22=ae[5],a23=ae[9],a24=ae[13];const a31=ae[2],a32=ae[6],a33=ae[10],a34=ae[14];const a41=ae[3],a42=ae[7],a43=ae[11],a44=ae[15];const b11=be[0],b12=be[4],b13=be[8],b14=be[12];const b21=be[1],b22=be[5],b23=be[9],b24=be[13];const b31=be[2],b32=be[6],b33=be[10],b34=be[14];const b41=be[3],b42=be[7],b43=be[11],b44=be[15];te[0]=a11*b11+a12*b21+a13*b31+a14*b41;te[4]=a11*b12+a12*b22+a13*b32+a14*b42;te[8]=a11*b13+a12*b23+a13*b33+a14*b43;te[12]=a11*b14+a12*b24+a13*b34+a14*b44;te[1]=a21*b11+a22*b21+a23*b31+a24*b41;te[5]=a21*b12+a22*b22+a23*b32+a24*b42;te[9]=a21*b13+a22*b23+a23*b33+a24*b43;te[13]=a21*b14+a22*b24+a23*b34+a24*b44;te[2]=a31*b11+a32*b21+a33*b31+a34*b41;te[6]=a31*b12+a32*b22+a33*b32+a34*b42;te[10]=a31*b13+a32*b23+a33*b33+a34*b43;te[14]=a31*b14+a32*b24+a33*b34+a34*b44;te[3]=a41*b11+a42*b21+a43*b31+a44*b41;te[7]=a41*b12+a42*b22+a43*b32+a44*b42;te[11]=a41*b13+a42*b23+a43*b33+a44*b43;te[15]=a41*b14+a42*b24+a43*b34+a44*b44;return this}multiplyScalar(s){const te=this.elements;te[0]*=s;te[4]*=s;te[8]*=s;te[12]*=s;te[1]*=s;te[5]*=s;te[9]*=s;te[13]*=s;te[2]*=s;te[6]*=s;te[10]*=s;te[14]*=s;te[3]*=s;te[7]*=s;te[11]*=s;te[15]*=s;return this}determinant(){const te=this.elements;const n11=te[0],n12=te[4],n13=te[8],n14=te[12];const n21=te[1],n22=te[5],n23=te[9],n24=te[13];const n31=te[2],n32=te[6],n33=te[10],n34=te[14];const n41=te[3],n42=te[7],n43=te[11],n44=te[15];const t11=n23*n34-n24*n33;const t12=n22*n34-n24*n32;const t13=n22*n33-n23*n32;const t21=n21*n34-n24*n31;const t22=n21*n33-n23*n31;const t23=n21*n32-n22*n31;return n11*(n42*t11-n43*t12+n44*t13)-n12*(n41*t11-n43*t21+n44*t22)+n13*(n41*t12-n42*t21+n44*t23)-n14*(n41*t13-n42*t22+n43*t23)}transpose(){const te=this.elements;let tmp;tmp=te[1];te[1]=te[4];te[4]=tmp;tmp=te[2];te[2]=te[8];te[8]=tmp;tmp=te[6];te[6]=te[9];te[9]=tmp;tmp=te[3];te[3]=te[12];te[12]=tmp;tmp=te[7];te[7]=te[13];te[13]=tmp;tmp=te[11];te[11]=te[14];te[14]=tmp;return this}setPosition(x,y,z){const te=this.elements;if(x.isVector3){te[12]=x.x;te[13]=x.y;te[14]=x.z}else{te[12]=x;te[13]=y;te[14]=z}return this}invert(){const te=this.elements,n11=te[0],n21=te[1],n31=te[2],n41=te[3],n12=te[4],n22=te[5],n32=te[6],n42=te[7],n13=te[8],n23=te[9],n33=te[10],n43=te[11],n14=te[12],n24=te[13],n34=te[14],n44=te[15],t11=n23*n34*n42-n24*n33*n42+n24*n32*n43-n22*n34*n43-n23*n32*n44+n22*n33*n44,t12=n14*n33*n42-n13*n34*n42-n14*n32*n43+n12*n34*n43+n13*n32*n44-n12*n33*n44,t13=n13*n24*n42-n14*n23*n42+n14*n22*n43-n12*n24*n43-n13*n22*n44+n12*n23*n44,t14=n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34;const det=n11*t11+n21*t12+n31*t13+n41*t14;if(det===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const detInv=1/det;te[0]=t11*detInv;te[1]=(n24*n33*n41-n23*n34*n41-n24*n31*n43+n21*n34*n43+n23*n31*n44-n21*n33*n44)*detInv;te[2]=(n22*n34*n41-n24*n32*n41+n24*n31*n42-n21*n34*n42-n22*n31*n44+n21*n32*n44)*detInv;te[3]=(n23*n32*n41-n22*n33*n41-n23*n31*n42+n21*n33*n42+n22*n31*n43-n21*n32*n43)*detInv;te[4]=t12*detInv;te[5]=(n13*n34*n41-n14*n33*n41+n14*n31*n43-n11*n34*n43-n13*n31*n44+n11*n33*n44)*detInv;te[6]=(n14*n32*n41-n12*n34*n41-n14*n31*n42+n11*n34*n42+n12*n31*n44-n11*n32*n44)*detInv;te[7]=(n12*n33*n41-n13*n32*n41+n13*n31*n42-n11*n33*n42-n12*n31*n43+n11*n32*n43)*detInv;te[8]=t13*detInv;te[9]=(n14*n23*n41-n13*n24*n41-n14*n21*n43+n11*n24*n43+n13*n21*n44-n11*n23*n44)*detInv;te[10]=(n12*n24*n41-n14*n22*n41+n14*n21*n42-n11*n24*n42-n12*n21*n44+n11*n22*n44)*detInv;te[11]=(n13*n22*n41-n12*n23*n41-n13*n21*n42+n11*n23*n42+n12*n21*n43-n11*n22*n43)*detInv;te[12]=t14*detInv;te[13]=(n13*n24*n31-n14*n23*n31+n14*n21*n33-n11*n24*n33-n13*n21*n34+n11*n23*n34)*detInv;te[14]=(n14*n22*n31-n12*n24*n31-n14*n21*n32+n11*n24*n32+n12*n21*n34-n11*n22*n34)*detInv;te[15]=(n12*n23*n31-n13*n22*n31+n13*n21*n32-n11*n23*n32-n12*n21*n33+n11*n22*n33)*detInv;return this}scale(v){const te=this.elements;const x=v.x,y=v.y,z=v.z;te[0]*=x;te[4]*=y;te[8]*=z;te[1]*=x;te[5]*=y;te[9]*=z;te[2]*=x;te[6]*=y;te[10]*=z;te[3]*=x;te[7]*=y;te[11]*=z;return this}getMaxScaleOnAxis(){const te=this.elements;const scaleXSq=te[0]*te[0]+te[1]*te[1]+te[2]*te[2];const scaleYSq=te[4]*te[4]+te[5]*te[5]+te[6]*te[6];const scaleZSq=te[8]*te[8]+te[9]*te[9]+te[10]*te[10];return Math.sqrt(Math.max(scaleXSq,scaleYSq,scaleZSq))}makeTranslation(x,y,z){if(x.isVector3){this.set(1,0,0,x.x,0,1,0,x.y,0,0,1,x.z,0,0,0,1)}else{this.set(1,0,0,x,0,1,0,y,0,0,1,z,0,0,0,1)}return this}makeRotationX(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(1,0,0,0,0,c,-s,0,0,s,c,0,0,0,0,1);return this}makeRotationY(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(c,0,s,0,0,1,0,0,-s,0,c,0,0,0,0,1);return this}makeRotationZ(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(c,-s,0,0,s,c,0,0,0,0,1,0,0,0,0,1);return this}makeRotationAxis(axis,angle){const c=Math.cos(angle);const s=Math.sin(angle);const t=1-c;const x=axis.x,y=axis.y,z=axis.z;const tx=t*x,ty=t*y;this.set(tx*x+c,tx*y-s*z,tx*z+s*y,0,tx*y+s*z,ty*y+c,ty*z-s*x,0,tx*z-s*y,ty*z+s*x,t*z*z+c,0,0,0,0,1);return this}makeScale(x,y,z){this.set(x,0,0,0,0,y,0,0,0,0,z,0,0,0,0,1);return this}makeShear(xy,xz,yx,yz,zx,zy){this.set(1,yx,zx,0,xy,1,zy,0,xz,yz,1,0,0,0,0,1);return this}compose(position,quaternion,scale){const te=this.elements;const x=quaternion._x,y=quaternion._y,z=quaternion._z,w=quaternion._w;const x2=x+x,y2=y+y,z2=z+z;const xx=x*x2,xy=x*y2,xz=x*z2;const yy=y*y2,yz=y*z2,zz=z*z2;const wx=w*x2,wy=w*y2,wz=w*z2;const sx=scale.x,sy=scale.y,sz=scale.z;te[0]=(1-(yy+zz))*sx;te[1]=(xy+wz)*sx;te[2]=(xz-wy)*sx;te[3]=0;te[4]=(xy-wz)*sy;te[5]=(1-(xx+zz))*sy;te[6]=(yz+wx)*sy;te[7]=0;te[8]=(xz+wy)*sz;te[9]=(yz-wx)*sz;te[10]=(1-(xx+yy))*sz;te[11]=0;te[12]=position.x;te[13]=position.y;te[14]=position.z;te[15]=1;return this}decompose(position,quaternion,scale){const te=this.elements;position.x=te[12];position.y=te[13];position.z=te[14];if(this.determinant()===0){scale.set(1,1,1);quaternion.identity();return this}let sx=_v1$5.set(te[0],te[1],te[2]).length();const sy=_v1$5.set(te[4],te[5],te[6]).length();const sz=_v1$5.set(te[8],te[9],te[10]).length();const det=this.determinant();if(det<0)sx=-sx;_m1$4.copy(this);const invSX=1/sx;const invSY=1/sy;const invSZ=1/sz;_m1$4.elements[0]*=invSX;_m1$4.elements[1]*=invSX;_m1$4.elements[2]*=invSX;_m1$4.elements[4]*=invSY;_m1$4.elements[5]*=invSY;_m1$4.elements[6]*=invSY;_m1$4.elements[8]*=invSZ;_m1$4.elements[9]*=invSZ;_m1$4.elements[10]*=invSZ;quaternion.setFromRotationMatrix(_m1$4);scale.x=sx;scale.y=sy;scale.z=sz;return this}makePerspective(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const te=this.elements;const x=2*near/(right-left);const y=2*near/(top-bottom);const a=(right+left)/(right-left);const b=(top+bottom)/(top-bottom);let c,d;if(reversedDepth){c=near/(far-near);d=far*near/(far-near)}else{if(coordinateSystem===WebGLCoordinateSystem){c=-(far+near)/(far-near);d=-2*far*near/(far-near)}else if(coordinateSystem===WebGPUCoordinateSystem){c=-far/(far-near);d=-far*near/(far-near)}else{throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+coordinateSystem)}}te[0]=x;te[4]=0;te[8]=a;te[12]=0;te[1]=0;te[5]=y;te[9]=b;te[13]=0;te[2]=0;te[6]=0;te[10]=c;te[14]=d;te[3]=0;te[7]=0;te[11]=-1;te[15]=0;return this}makeOrthographic(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const te=this.elements;const x=2/(right-left);const y=2/(top-bottom);const a=-(right+left)/(right-left);const b=-(top+bottom)/(top-bottom);let c,d;if(reversedDepth){c=1/(far-near);d=far/(far-near)}else{if(coordinateSystem===WebGLCoordinateSystem){c=-2/(far-near);d=-(far+near)/(far-near)}else if(coordinateSystem===WebGPUCoordinateSystem){c=-1/(far-near);d=-near/(far-near)}else{throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+coordinateSystem)}}te[0]=x;te[4]=0;te[8]=0;te[12]=a;te[1]=0;te[5]=y;te[9]=0;te[13]=b;te[2]=0;te[6]=0;te[10]=c;te[14]=d;te[3]=0;te[7]=0;te[11]=0;te[15]=1;return this}equals(matrix){const te=this.elements;const me=matrix.elements;for(let i=0;i<16;i++){if(te[i]!==me[i])return false}return true}fromArray(array,offset=0){for(let i=0;i<16;i++){this.elements[i]=array[i+offset]}return this}toArray(array=[],offset=0){const te=this.elements;array[offset]=te[0];array[offset+1]=te[1];array[offset+2]=te[2];array[offset+3]=te[3];array[offset+4]=te[4];array[offset+5]=te[5];array[offset+6]=te[6];array[offset+7]=te[7];array[offset+8]=te[8];array[offset+9]=te[9];array[offset+10]=te[10];array[offset+11]=te[11];array[offset+12]=te[12];array[offset+13]=te[13];array[offset+14]=te[14];array[offset+15]=te[15];return array}}const _v1$5=new Vector3;const _m1$4=new Matrix4;const _zero=new Vector3(0,0,0);const _one=new Vector3(1,1,1);const _x=new Vector3;const _y=new Vector3;const _z=new Vector3;const _matrix$2=new Matrix4;const _quaternion$3=new Quaternion;class Euler{constructor(x=0,y=0,z=0,order=Euler.DEFAULT_ORDER){this.isEuler=true;this._x=x;this._y=y;this._z=z;this._order=order}get x(){return this._x}set x(value){this._x=value;this._onChangeCallback()}get y(){return this._y}set y(value){this._y=value;this._onChangeCallback()}get z(){return this._z}set z(value){this._z=value;this._onChangeCallback()}get order(){return this._order}set order(value){this._order=value;this._onChangeCallback()}set(x,y,z,order=this._order){this._x=x;this._y=y;this._z=z;this._order=order;this._onChangeCallback();return this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(euler){this._x=euler._x;this._y=euler._y;this._z=euler._z;this._order=euler._order;this._onChangeCallback();return this}setFromRotationMatrix(m,order=this._order,update=true){const te=m.elements;const m11=te[0],m12=te[4],m13=te[8];const m21=te[1],m22=te[5],m23=te[9];const m31=te[2],m32=te[6],m33=te[10];switch(order){case"XYZ":this._y=Math.asin(clamp(m13,-1,1));if(Math.abs(m13)<0.9999999){this._x=Math.atan2(-m23,m33);this._z=Math.atan2(-m12,m11)}else{this._x=Math.atan2(m32,m22);this._z=0}break;case"YXZ":this._x=Math.asin(-clamp(m23,-1,1));if(Math.abs(m23)<0.9999999){this._y=Math.atan2(m13,m33);this._z=Math.atan2(m21,m22)}else{this._y=Math.atan2(-m31,m11);this._z=0}break;case"ZXY":this._x=Math.asin(clamp(m32,-1,1));if(Math.abs(m32)<0.9999999){this._y=Math.atan2(-m31,m33);this._z=Math.atan2(-m12,m22)}else{this._y=0;this._z=Math.atan2(m21,m11)}break;case"ZYX":this._y=Math.asin(-clamp(m31,-1,1));if(Math.abs(m31)<0.9999999){this._x=Math.atan2(m32,m33);this._z=Math.atan2(m21,m11)}else{this._x=0;this._z=Math.atan2(-m12,m22)}break;case"YZX":this._z=Math.asin(clamp(m21,-1,1));if(Math.abs(m21)<0.9999999){this._x=Math.atan2(-m23,m22);this._y=Math.atan2(-m31,m11)}else{this._x=0;this._y=Math.atan2(m13,m33)}break;case"XZY":this._z=Math.asin(-clamp(m12,-1,1));if(Math.abs(m12)<0.9999999){this._x=Math.atan2(m32,m22);this._y=Math.atan2(m13,m11)}else{this._x=Math.atan2(-m23,m33);this._y=0}break;default:warn("Euler: .setFromRotationMatrix() encountered an unknown order: "+order);}this._order=order;if(update===true)this._onChangeCallback();return this}setFromQuaternion(q,order,update){_matrix$2.makeRotationFromQuaternion(q);return this.setFromRotationMatrix(_matrix$2,order,update)}setFromVector3(v,order=this._order){return this.set(v.x,v.y,v.z,order)}reorder(newOrder){_quaternion$3.setFromEuler(this);return this.setFromQuaternion(_quaternion$3,newOrder)}equals(euler){return euler._x===this._x&&euler._y===this._y&&euler._z===this._z&&euler._order===this._order}fromArray(array){this._x=array[0];this._y=array[1];this._z=array[2];if(array[3]!==undefined)this._order=array[3];this._onChangeCallback();return this}toArray(array=[],offset=0){array[offset]=this._x;array[offset+1]=this._y;array[offset+2]=this._z;array[offset+3]=this._order;return array}_onChange(callback){this._onChangeCallback=callback;return this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x;yield this._y;yield this._z;yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1|0}set(layer){this.mask=(1<<layer|0)>>>0}enable(layer){this.mask|=1<<layer|0}enableAll(){this.mask=4294967295|0}toggle(layer){this.mask^=1<<layer|0}disable(layer){this.mask&=~(1<<layer|0)}disableAll(){this.mask=0}test(layers){return(this.mask&layers.mask)!==0}isEnabled(layer){return(this.mask&(1<<layer|0))!==0}}let _object3DId=0;const _v1$4=new Vector3;const _q1=new Quaternion;const _m1$3=new Matrix4;const _target=new Vector3;const _position$3=new Vector3;const _scale$2=new Vector3;const _quaternion$2=new Quaternion;const _xAxis=new Vector3(1,0,0);const _yAxis=new Vector3(0,1,0);const _zAxis=new Vector3(0,0,1);const _addedEvent={type:"added"};const _removedEvent={type:"removed"};const _childaddedEvent={type:"childadded",child:null};const _childremovedEvent={type:"childremoved",child:null};class Object3D extends EventDispatcher{constructor(){super();this.isObject3D=true;Object.defineProperty(this,"id",{value:_object3DId++});this.uuid=generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=Object3D.DEFAULT_UP.clone();const position=new Vector3;const rotation=new Euler;const quaternion=new Quaternion;const scale=new Vector3(1,1,1);function onRotationChange(){quaternion.setFromEuler(rotation,false)}function onQuaternionChange(){rotation.setFromQuaternion(quaternion,undefined,false)}rotation._onChange(onRotationChange);quaternion._onChange(onQuaternionChange);Object.defineProperties(this,{position:{configurable:true,enumerable:true,value:position},rotation:{configurable:true,enumerable:true,value:rotation},quaternion:{configurable:true,enumerable:true,value:quaternion},scale:{configurable:true,enumerable:true,value:scale},modelViewMatrix:{value:new Matrix4},normalMatrix:{value:new Matrix3}});this.matrix=new Matrix4;this.matrixWorld=new Matrix4;this.matrixAutoUpdate=Object3D.DEFAULT_MATRIX_AUTO_UPDATE;this.matrixWorldAutoUpdate=Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE;this.matrixWorldNeedsUpdate=false;this.layers=new Layers;this.visible=true;this.castShadow=false;this.receiveShadow=false;this.frustumCulled=true;this.renderOrder=0;this.animations=[];this.customDepthMaterial=undefined;this.customDistanceMaterial=undefined;this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(matrix){if(this.matrixAutoUpdate)this.updateMatrix();this.matrix.premultiply(matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(q){this.quaternion.premultiply(q);return this}setRotationFromAxisAngle(axis,angle){this.quaternion.setFromAxisAngle(axis,angle)}setRotationFromEuler(euler){this.quaternion.setFromEuler(euler,true)}setRotationFromMatrix(m){this.quaternion.setFromRotationMatrix(m)}setRotationFromQuaternion(q){this.quaternion.copy(q)}rotateOnAxis(axis,angle){_q1.setFromAxisAngle(axis,angle);this.quaternion.multiply(_q1);return this}rotateOnWorldAxis(axis,angle){_q1.setFromAxisAngle(axis,angle);this.quaternion.premultiply(_q1);return this}rotateX(angle){return this.rotateOnAxis(_xAxis,angle)}rotateY(angle){return this.rotateOnAxis(_yAxis,angle)}rotateZ(angle){return this.rotateOnAxis(_zAxis,angle)}translateOnAxis(axis,distance){_v1$4.copy(axis).applyQuaternion(this.quaternion);this.position.add(_v1$4.multiplyScalar(distance));return this}translateX(distance){return this.translateOnAxis(_xAxis,distance)}translateY(distance){return this.translateOnAxis(_yAxis,distance)}translateZ(distance){return this.translateOnAxis(_zAxis,distance)}localToWorld(vector){this.updateWorldMatrix(true,false);return vector.applyMatrix4(this.matrixWorld)}worldToLocal(vector){this.updateWorldMatrix(true,false);return vector.applyMatrix4(_m1$3.copy(this.matrixWorld).invert())}lookAt(x,y,z){if(x.isVector3){_target.copy(x)}else{_target.set(x,y,z)}const parent=this.parent;this.updateWorldMatrix(true,false);_position$3.setFromMatrixPosition(this.matrixWorld);if(this.isCamera||this.isLight){_m1$3.lookAt(_position$3,_target,this.up)}else{_m1$3.lookAt(_target,_position$3,this.up)}this.quaternion.setFromRotationMatrix(_m1$3);if(parent){_m1$3.extractRotation(parent.matrixWorld);_q1.setFromRotationMatrix(_m1$3);this.quaternion.premultiply(_q1.invert())}}add(object){if(arguments.length>1){for(let i=0;i<arguments.length;i++){this.add(arguments[i])}return this}if(object===this){error("Object3D.add: object can't be added as a child of itself.",object);return this}if(object&&object.isObject3D){object.removeFromParent();object.parent=this;this.children.push(object);object.dispatchEvent(_addedEvent);_childaddedEvent.child=object;this.dispatchEvent(_childaddedEvent);_childaddedEvent.child=null}else{error("Object3D.add: object not an instance of THREE.Object3D.",object)}return this}remove(object){if(arguments.length>1){for(let i=0;i<arguments.length;i++){this.remove(arguments[i])}return this}const index=this.children.indexOf(object);if(index!==-1){object.parent=null;this.children.splice(index,1);object.dispatchEvent(_removedEvent);_childremovedEvent.child=object;this.dispatchEvent(_childremovedEvent);_childremovedEvent.child=null}return this}removeFromParent(){const parent=this.parent;if(parent!==null){parent.remove(this)}return this}clear(){return this.remove(...this.children)}attach(object){this.updateWorldMatrix(true,false);_m1$3.copy(this.matrixWorld).invert();if(object.parent!==null){object.parent.updateWorldMatrix(true,false);_m1$3.multiply(object.parent.matrixWorld)}object.applyMatrix4(_m1$3);object.removeFromParent();object.parent=this;this.children.push(object);object.updateWorldMatrix(false,true);object.dispatchEvent(_addedEvent);_childaddedEvent.child=object;this.dispatchEvent(_childaddedEvent);_childaddedEvent.child=null;return this}getObjectById(id){return this.getObjectByProperty("id",id)}getObjectByName(name){return this.getObjectByProperty("name",name)}getObjectByProperty(name,value){if(this[name]===value)return this;for(let i=0,l=this.children.length;i<l;i++){const child=this.children[i];const object=child.getObjectByProperty(name,value);if(object!==undefined){return object}}return undefined}getObjectsByProperty(name,value,result=[]){if(this[name]===value)result.push(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].getObjectsByProperty(name,value,result)}return result}getWorldPosition(target){this.updateWorldMatrix(true,false);return target.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(target){this.updateWorldMatrix(true,false);this.matrixWorld.decompose(_position$3,target,_scale$2);return target}getWorldScale(target){this.updateWorldMatrix(true,false);this.matrixWorld.decompose(_position$3,_quaternion$2,target);return target}getWorldDirection(target){this.updateWorldMatrix(true,false);const e=this.matrixWorld.elements;return target.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(callback){callback(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].traverse(callback)}}traverseVisible(callback){if(this.visible===false)return;callback(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].traverseVisible(callback)}}traverseAncestors(callback){const parent=this.parent;if(parent!==null){callback(parent);parent.traverseAncestors(callback)}}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=true}updateMatrixWorld(force){if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldNeedsUpdate||force){if(this.matrixWorldAutoUpdate===true){if(this.parent===null){this.matrixWorld.copy(this.matrix)}else{this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)}}this.matrixWorldNeedsUpdate=false;force=true}const children=this.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.updateMatrixWorld(force)}}updateWorldMatrix(updateParents,updateChildren){const parent=this.parent;if(updateParents===true&&parent!==null){parent.updateWorldMatrix(true,false)}if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldAutoUpdate===true){if(this.parent===null){this.matrixWorld.copy(this.matrix)}else{this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)}}if(updateChildren===true){const children=this.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.updateWorldMatrix(false,true)}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";const output={};if(isRootObject){meta={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}};output.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"}}const object={};object.uuid=this.uuid;object.type=this.type;if(this.name!=="")object.name=this.name;if(this.castShadow===true)object.castShadow=true;if(this.receiveShadow===true)object.receiveShadow=true;if(this.visible===false)object.visible=false;if(this.frustumCulled===false)object.frustumCulled=false;if(this.renderOrder!==0)object.renderOrder=this.renderOrder;if(Object.keys(this.userData).length>0)object.userData=this.userData;object.layers=this.layers.mask;object.matrix=this.matrix.toArray();object.up=this.up.toArray();if(this.matrixAutoUpdate===false)object.matrixAutoUpdate=false;if(this.isInstancedMesh){object.type="InstancedMesh";object.count=this.count;object.instanceMatrix=this.instanceMatrix.toJSON();if(this.instanceColor!==null)object.instanceColor=this.instanceColor.toJSON()}if(this.isBatchedMesh){object.type="BatchedMesh";object.perObjectFrustumCulled=this.perObjectFrustumCulled;object.sortObjects=this.sortObjects;object.drawRanges=this._drawRanges;object.reservedRanges=this._reservedRanges;object.geometryInfo=this._geometryInfo.map(info=>({...info,boundingBox:info.boundingBox?info.boundingBox.toJSON():undefined,boundingSphere:info.boundingSphere?info.boundingSphere.toJSON():undefined}));object.instanceInfo=this._instanceInfo.map(info=>({...info}));object.availableInstanceIds=this._availableInstanceIds.slice();object.availableGeometryIds=this._availableGeometryIds.slice();object.nextIndexStart=this._nextIndexStart;object.nextVertexStart=this._nextVertexStart;object.geometryCount=this._geometryCount;object.maxInstanceCount=this._maxInstanceCount;object.maxVertexCount=this._maxVertexCount;object.maxIndexCount=this._maxIndexCount;object.geometryInitialized=this._geometryInitialized;object.matricesTexture=this._matricesTexture.toJSON(meta);object.indirectTexture=this._indirectTexture.toJSON(meta);if(this._colorsTexture!==null){object.colorsTexture=this._colorsTexture.toJSON(meta)}if(this.boundingSphere!==null){object.boundingSphere=this.boundingSphere.toJSON()}if(this.boundingBox!==null){object.boundingBox=this.boundingBox.toJSON()}}function serialize(library,element){if(library[element.uuid]===undefined){library[element.uuid]=element.toJSON(meta)}return element.uuid}if(this.isScene){if(this.background){if(this.background.isColor){object.background=this.background.toJSON()}else if(this.background.isTexture){object.background=this.background.toJSON(meta).uuid}}if(this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==true){object.environment=this.environment.toJSON(meta).uuid}}else if(this.isMesh||this.isLine||this.isPoints){object.geometry=serialize(meta.geometries,this.geometry);const parameters=this.geometry.parameters;if(parameters!==undefined&&parameters.shapes!==undefined){const shapes=parameters.shapes;if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];serialize(meta.shapes,shape)}}else{serialize(meta.shapes,shapes)}}}if(this.isSkinnedMesh){object.bindMode=this.bindMode;object.bindMatrix=this.bindMatrix.toArray();if(this.skeleton!==undefined){serialize(meta.skeletons,this.skeleton);object.skeleton=this.skeleton.uuid}}if(this.material!==undefined){if(Array.isArray(this.material)){const uuids=[];for(let i=0,l=this.material.length;i<l;i++){uuids.push(serialize(meta.materials,this.material[i]))}object.material=uuids}else{object.material=serialize(meta.materials,this.material)}}if(this.children.length>0){object.children=[];for(let i=0;i<this.children.length;i++){object.children.push(this.children[i].toJSON(meta).object)}}if(this.animations.length>0){object.animations=[];for(let i=0;i<this.animations.length;i++){const animation=this.animations[i];object.animations.push(serialize(meta.animations,animation))}}if(isRootObject){const geometries=extractFromCache(meta.geometries);const materials=extractFromCache(meta.materials);const textures=extractFromCache(meta.textures);const images=extractFromCache(meta.images);const shapes=extractFromCache(meta.shapes);const skeletons=extractFromCache(meta.skeletons);const animations=extractFromCache(meta.animations);const nodes=extractFromCache(meta.nodes);if(geometries.length>0)output.geometries=geometries;if(materials.length>0)output.materials=materials;if(textures.length>0)output.textures=textures;if(images.length>0)output.images=images;if(shapes.length>0)output.shapes=shapes;if(skeletons.length>0)output.skeletons=skeletons;if(animations.length>0)output.animations=animations;if(nodes.length>0)output.nodes=nodes}output.object=object;return output;function extractFromCache(cache){const values=[];for(const key in cache){const data=cache[key];delete data.metadata;values.push(data)}return values}}clone(recursive){return new this.constructor().copy(this,recursive)}copy(source,recursive=true){this.name=source.name;this.up.copy(source.up);this.position.copy(source.position);this.rotation.order=source.rotation.order;this.quaternion.copy(source.quaternion);this.scale.copy(source.scale);this.matrix.copy(source.matrix);this.matrixWorld.copy(source.matrixWorld);this.matrixAutoUpdate=source.matrixAutoUpdate;this.matrixWorldAutoUpdate=source.matrixWorldAutoUpdate;this.matrixWorldNeedsUpdate=source.matrixWorldNeedsUpdate;this.layers.mask=source.layers.mask;this.visible=source.visible;this.castShadow=source.castShadow;this.receiveShadow=source.receiveShadow;this.frustumCulled=source.frustumCulled;this.renderOrder=source.renderOrder;this.animations=source.animations.slice();this.userData=JSON.parse(JSON.stringify(source.userData));if(recursive===true){for(let i=0;i<source.children.length;i++){const child=source.children[i];this.add(child.clone())}}return this}}Object3D.DEFAULT_UP=new Vector3(0,1,0);Object3D.DEFAULT_MATRIX_AUTO_UPDATE=true;Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=true;const _v0$2=new Vector3;const _v1$3=new Vector3;const _v2$2=new Vector3;const _v3$2=new Vector3;const _vab=new Vector3;const _vac=new Vector3;const _vbc=new Vector3;const _vap=new Vector3;const _vbp=new Vector3;const _vcp=new Vector3;const _v40=new Vector4;const _v41=new Vector4;const _v42=new Vector4;class Triangle{constructor(a=new Vector3,b=new Vector3,c=new Vector3){this.a=a;this.b=b;this.c=c}static getNormal(a,b,c,target){target.subVectors(c,b);_v0$2.subVectors(a,b);target.cross(_v0$2);const targetLengthSq=target.lengthSq();if(targetLengthSq>0){return target.multiplyScalar(1/Math.sqrt(targetLengthSq))}return target.set(0,0,0)}static getBarycoord(point,a,b,c,target){_v0$2.subVectors(c,a);_v1$3.subVectors(b,a);_v2$2.subVectors(point,a);const dot00=_v0$2.dot(_v0$2);const dot01=_v0$2.dot(_v1$3);const dot02=_v0$2.dot(_v2$2);const dot11=_v1$3.dot(_v1$3);const dot12=_v1$3.dot(_v2$2);const denom=dot00*dot11-dot01*dot01;if(denom===0){target.set(0,0,0);return null}const invDenom=1/denom;const u=(dot11*dot02-dot01*dot12)*invDenom;const v=(dot00*dot12-dot01*dot02)*invDenom;return target.set(1-u-v,v,u)}static containsPoint(point,a,b,c){if(this.getBarycoord(point,a,b,c,_v3$2)===null){return false}return _v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(point,p1,p2,p3,v1,v2,v3,target){if(this.getBarycoord(point,p1,p2,p3,_v3$2)===null){target.x=0;target.y=0;if("z"in target)target.z=0;if("w"in target)target.w=0;return null}target.setScalar(0);target.addScaledVector(v1,_v3$2.x);target.addScaledVector(v2,_v3$2.y);target.addScaledVector(v3,_v3$2.z);return target}static getInterpolatedAttribute(attr,i1,i2,i3,barycoord,target){_v40.setScalar(0);_v41.setScalar(0);_v42.setScalar(0);_v40.fromBufferAttribute(attr,i1);_v41.fromBufferAttribute(attr,i2);_v42.fromBufferAttribute(attr,i3);target.setScalar(0);target.addScaledVector(_v40,barycoord.x);target.addScaledVector(_v41,barycoord.y);target.addScaledVector(_v42,barycoord.z);return target}static isFrontFacing(a,b,c,direction){_v0$2.subVectors(c,b);_v1$3.subVectors(a,b);return _v0$2.cross(_v1$3).dot(direction)<0?true:false}set(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this}setFromPointsAndIndices(points,i0,i1,i2){this.a.copy(points[i0]);this.b.copy(points[i1]);this.c.copy(points[i2]);return this}setFromAttributeAndIndices(attribute,i0,i1,i2){this.a.fromBufferAttribute(attribute,i0);this.b.fromBufferAttribute(attribute,i1);this.c.fromBufferAttribute(attribute,i2);return this}clone(){return new this.constructor().copy(this)}copy(triangle){this.a.copy(triangle.a);this.b.copy(triangle.b);this.c.copy(triangle.c);return this}getArea(){_v0$2.subVectors(this.c,this.b);_v1$3.subVectors(this.a,this.b);return _v0$2.cross(_v1$3).length()*0.5}getMidpoint(target){return target.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(target){return Triangle.getNormal(this.a,this.b,this.c,target)}getPlane(target){return target.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(point,target){return Triangle.getBarycoord(point,this.a,this.b,this.c,target)}getInterpolation(point,v1,v2,v3,target){return Triangle.getInterpolation(point,this.a,this.b,this.c,v1,v2,v3,target)}containsPoint(point){return Triangle.containsPoint(point,this.a,this.b,this.c)}isFrontFacing(direction){return Triangle.isFrontFacing(this.a,this.b,this.c,direction)}intersectsBox(box){return box.intersectsTriangle(this)}closestPointToPoint(p,target){const a=this.a,b=this.b,c=this.c;let v,w;_vab.subVectors(b,a);_vac.subVectors(c,a);_vap.subVectors(p,a);const d1=_vab.dot(_vap);const d2=_vac.dot(_vap);if(d1<=0&&d2<=0){return target.copy(a)}_vbp.subVectors(p,b);const d3=_vab.dot(_vbp);const d4=_vac.dot(_vbp);if(d3>=0&&d4<=d3){return target.copy(b)}const vc=d1*d4-d3*d2;if(vc<=0&&d1>=0&&d3<=0){v=d1/(d1-d3);return target.copy(a).addScaledVector(_vab,v)}_vcp.subVectors(p,c);const d5=_vab.dot(_vcp);const d6=_vac.dot(_vcp);if(d6>=0&&d5<=d6){return target.copy(c)}const vb=d5*d2-d1*d6;if(vb<=0&&d2>=0&&d6<=0){w=d2/(d2-d6);return target.copy(a).addScaledVector(_vac,w)}const va=d3*d6-d5*d4;if(va<=0&&d4-d3>=0&&d5-d6>=0){_vbc.subVectors(c,b);w=(d4-d3)/(d4-d3+(d5-d6));return target.copy(b).addScaledVector(_vbc,w)}const denom=1/(va+vb+vc);v=vb*denom;w=vc*denom;return target.copy(a).addScaledVector(_vab,v).addScaledVector(_vac,w)}equals(triangle){return triangle.a.equals(this.a)&&triangle.b.equals(this.b)&&triangle.c.equals(this.c)}}const _colorKeywords={"aliceblue":15792383,"antiquewhite":16444375,"aqua":65535,"aquamarine":8388564,"azure":15794175,"beige":16119260,"bisque":16770244,"black":0,"blanchedalmond":16772045,"blue":255,"blueviolet":9055202,"brown":10824234,"burlywood":14596231,"cadetblue":6266528,"chartreuse":8388352,"chocolate":13789470,"coral":16744272,"cornflowerblue":6591981,"cornsilk":16775388,"crimson":14423100,"cyan":65535,"darkblue":139,"darkcyan":35723,"darkgoldenrod":12092939,"darkgray":11119017,"darkgreen":25600,"darkgrey":11119017,"darkkhaki":12433259,"darkmagenta":9109643,"darkolivegreen":5597999,"darkorange":16747520,"darkorchid":10040012,"darkred":9109504,"darksalmon":15308410,"darkseagreen":9419919,"darkslateblue":4734347,"darkslategray":3100495,"darkslategrey":3100495,"darkturquoise":52945,"darkviolet":9699539,"deeppink":16716947,"deepskyblue":49151,"dimgray":6908265,"dimgrey":6908265,"dodgerblue":2003199,"firebrick":11674146,"floralwhite":16775920,"forestgreen":2263842,"fuchsia":16711935,"gainsboro":14474460,"ghostwhite":16316671,"gold":16766720,"goldenrod":14329120,"gray":8421504,"green":32768,"greenyellow":11403055,"grey":8421504,"honeydew":15794160,"hotpink":16738740,"indianred":13458524,"indigo":4915330,"ivory":16777200,"khaki":15787660,"lavender":15132410,"lavenderblush":16773365,"lawngreen":8190976,"lemonchiffon":16775885,"lightblue":11393254,"lightcoral":15761536,"lightcyan":14745599,"lightgoldenrodyellow":16448210,"lightgray":13882323,"lightgreen":9498256,"lightgrey":13882323,"lightpink":16758465,"lightsalmon":16752762,"lightseagreen":2142890,"lightskyblue":8900346,"lightslategray":7833753,"lightslategrey":7833753,"lightsteelblue":11584734,"lightyellow":16777184,"lime":65280,"limegreen":3329330,"linen":16445670,"magenta":16711935,"maroon":8388608,"mediumaquamarine":6737322,"mediumblue":205,"mediumorchid":12211667,"mediumpurple":9662683,"mediumseagreen":3978097,"mediumslateblue":8087790,"mediumspringgreen":64154,"mediumturquoise":4772300,"mediumvioletred":13047173,"midnightblue":1644912,"mintcream":16121850,"mistyrose":16770273,"moccasin":16770229,"navajowhite":16768685,"navy":128,"oldlace":16643558,"olive":8421376,"olivedrab":7048739,"orange":16753920,"orangered":16729344,"orchid":14315734,"palegoldenrod":15657130,"palegreen":10025880,"paleturquoise":11529966,"palevioletred":14381203,"papayawhip":16773077,"peachpuff":16767673,"peru":13468991,"pink":16761035,"plum":14524637,"powderblue":11591910,"purple":8388736,"rebeccapurple":6697881,"red":16711680,"rosybrown":12357519,"royalblue":4286945,"saddlebrown":9127187,"salmon":16416882,"sandybrown":16032864,"seagreen":3050327,"seashell":16774638,"sienna":10506797,"silver":12632256,"skyblue":8900331,"slateblue":6970061,"slategray":7372944,"slategrey":7372944,"snow":16775930,"springgreen":65407,"steelblue":4620980,"tan":13808780,"teal":32896,"thistle":14204888,"tomato":16737095,"turquoise":4251856,"violet":15631086,"wheat":16113331,"white":16777215,"whitesmoke":16119285,"yellow":16776960,"yellowgreen":10145074};const _hslA={h:0,s:0,l:0};const _hslB={h:0,s:0,l:0};function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*6*(2/3-t);return p}class Color{constructor(r,g,b){this.isColor=true;this.r=1;this.g=1;this.b=1;return this.set(r,g,b)}set(r,g,b){if(g===undefined&&b===undefined){const value=r;if(value&&value.isColor){this.copy(value)}else if(typeof value==="number"){this.setHex(value)}else if(typeof value==="string"){this.setStyle(value)}}else{this.setRGB(r,g,b)}return this}setScalar(scalar){this.r=scalar;this.g=scalar;this.b=scalar;return this}setHex(hex,colorSpace=SRGBColorSpace){hex=Math.floor(hex);this.r=(hex>>16&255)/255;this.g=(hex>>8&255)/255;this.b=(hex&255)/255;ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setRGB(r,g,b,colorSpace=ColorManagement.workingColorSpace){this.r=r;this.g=g;this.b=b;ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setHSL(h,s,l,colorSpace=ColorManagement.workingColorSpace){h=euclideanModulo(h,1);s=clamp(s,0,1);l=clamp(l,0,1);if(s===0){this.r=this.g=this.b=l}else{const p=l<=0.5?l*(1+s):l+s-l*s;const q=2*l-p;this.r=hue2rgb(q,p,h+1/3);this.g=hue2rgb(q,p,h);this.b=hue2rgb(q,p,h-1/3)}ColorManagement.colorSpaceToWorking(this,colorSpace);return this}setStyle(style,colorSpace=SRGBColorSpace){function handleAlpha(string){if(string===undefined)return;if(parseFloat(string)<1){warn("Color: Alpha component of "+style+" will be ignored.")}}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(style)){let color;const name=m[1];const components=m[2];switch(name){case"rgb":case"rgba":if(color=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setRGB(Math.min(255,parseInt(color[1],10))/255,Math.min(255,parseInt(color[2],10))/255,Math.min(255,parseInt(color[3],10))/255,colorSpace)}if(color=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setRGB(Math.min(100,parseInt(color[1],10))/100,Math.min(100,parseInt(color[2],10))/100,Math.min(100,parseInt(color[3],10))/100,colorSpace)}break;case"hsl":case"hsla":if(color=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setHSL(parseFloat(color[1])/360,parseFloat(color[2])/100,parseFloat(color[3])/100,colorSpace)}break;default:warn("Color: Unknown color model "+style);}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(style)){const hex=m[1];const size=hex.length;if(size===3){return this.setRGB(parseInt(hex.charAt(0),16)/15,parseInt(hex.charAt(1),16)/15,parseInt(hex.charAt(2),16)/15,colorSpace)}else if(size===6){return this.setHex(parseInt(hex,16),colorSpace)}else{warn("Color: Invalid hex color "+style)}}else if(style&&style.length>0){return this.setColorName(style,colorSpace)}return this}setColorName(style,colorSpace=SRGBColorSpace){const hex=_colorKeywords[style.toLowerCase()];if(hex!==undefined){this.setHex(hex,colorSpace)}else{warn("Color: Unknown color "+style)}return this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(color){this.r=color.r;this.g=color.g;this.b=color.b;return this}copySRGBToLinear(color){this.r=SRGBToLinear(color.r);this.g=SRGBToLinear(color.g);this.b=SRGBToLinear(color.b);return this}copyLinearToSRGB(color){this.r=LinearToSRGB(color.r);this.g=LinearToSRGB(color.g);this.b=LinearToSRGB(color.b);return this}convertSRGBToLinear(){this.copySRGBToLinear(this);return this}convertLinearToSRGB(){this.copyLinearToSRGB(this);return this}getHex(colorSpace=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);return Math.round(clamp(_color.r*255,0,255))*65536+Math.round(clamp(_color.g*255,0,255))*256+Math.round(clamp(_color.b*255,0,255))}getHexString(colorSpace=SRGBColorSpace){return("000000"+this.getHex(colorSpace).toString(16)).slice(-6)}getHSL(target,colorSpace=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);const r=_color.r,g=_color.g,b=_color.b;const max=Math.max(r,g,b);const min=Math.min(r,g,b);let hue,saturation;const lightness=(min+max)/2;if(min===max){hue=0;saturation=0}else{const delta=max-min;saturation=lightness<=0.5?delta/(max+min):delta/(2-max-min);switch(max){case r:hue=(g-b)/delta+(g<b?6:0);break;case g:hue=(b-r)/delta+2;break;case b:hue=(r-g)/delta+4;break;}hue/=6}target.h=hue;target.s=saturation;target.l=lightness;return target}getRGB(target,colorSpace=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);target.r=_color.r;target.g=_color.g;target.b=_color.b;return target}getStyle(colorSpace=SRGBColorSpace){ColorManagement.workingToColorSpace(_color.copy(this),colorSpace);const r=_color.r,g=_color.g,b=_color.b;if(colorSpace!==SRGBColorSpace){return`color(${colorSpace} ${r.toFixed(3)} ${g.toFixed(3)} ${b.toFixed(3)})`}return`rgb(${Math.round(r*255)},${Math.round(g*255)},${Math.round(b*255)})`}offsetHSL(h,s,l){this.getHSL(_hslA);return this.setHSL(_hslA.h+h,_hslA.s+s,_hslA.l+l)}add(color){this.r+=color.r;this.g+=color.g;this.b+=color.b;return this}addColors(color1,color2){this.r=color1.r+color2.r;this.g=color1.g+color2.g;this.b=color1.b+color2.b;return this}addScalar(s){this.r+=s;this.g+=s;this.b+=s;return this}sub(color){this.r=Math.max(0,this.r-color.r);this.g=Math.max(0,this.g-color.g);this.b=Math.max(0,this.b-color.b);return this}multiply(color){this.r*=color.r;this.g*=color.g;this.b*=color.b;return this}multiplyScalar(s){this.r*=s;this.g*=s;this.b*=s;return this}lerp(color,alpha){this.r+=(color.r-this.r)*alpha;this.g+=(color.g-this.g)*alpha;this.b+=(color.b-this.b)*alpha;return this}lerpColors(color1,color2,alpha){this.r=color1.r+(color2.r-color1.r)*alpha;this.g=color1.g+(color2.g-color1.g)*alpha;this.b=color1.b+(color2.b-color1.b)*alpha;return this}lerpHSL(color,alpha){this.getHSL(_hslA);color.getHSL(_hslB);const h=lerp(_hslA.h,_hslB.h,alpha);const s=lerp(_hslA.s,_hslB.s,alpha);const l=lerp(_hslA.l,_hslB.l,alpha);this.setHSL(h,s,l);return this}setFromVector3(v){this.r=v.x;this.g=v.y;this.b=v.z;return this}applyMatrix3(m){const r=this.r,g=this.g,b=this.b;const e=m.elements;this.r=e[0]*r+e[3]*g+e[6]*b;this.g=e[1]*r+e[4]*g+e[7]*b;this.b=e[2]*r+e[5]*g+e[8]*b;return this}equals(c){return c.r===this.r&&c.g===this.g&&c.b===this.b}fromArray(array,offset=0){this.r=array[offset];this.g=array[offset+1];this.b=array[offset+2];return this}toArray(array=[],offset=0){array[offset]=this.r;array[offset+1]=this.g;array[offset+2]=this.b;return array}fromBufferAttribute(attribute,index){this.r=attribute.getX(index);this.g=attribute.getY(index);this.b=attribute.getZ(index);return this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r;yield this.g;yield this.b}}const _color=new Color;Color.NAMES=_colorKeywords;let _materialId=0;class Material extends EventDispatcher{constructor(){super();this.isMaterial=true;Object.defineProperty(this,"id",{value:_materialId++});this.uuid=generateUUID();this.name="";this.type="Material";this.blending=NormalBlending;this.side=FrontSide;this.vertexColors=false;this.opacity=1;this.transparent=false;this.alphaHash=false;this.blendSrc=SrcAlphaFactor;this.blendDst=OneMinusSrcAlphaFactor;this.blendEquation=AddEquation;this.blendSrcAlpha=null;this.blendDstAlpha=null;this.blendEquationAlpha=null;this.blendColor=new Color(0,0,0);this.blendAlpha=0;this.depthFunc=LessEqualDepth;this.depthTest=true;this.depthWrite=true;this.stencilWriteMask=255;this.stencilFunc=AlwaysStencilFunc;this.stencilRef=0;this.stencilFuncMask=255;this.stencilFail=KeepStencilOp;this.stencilZFail=KeepStencilOp;this.stencilZPass=KeepStencilOp;this.stencilWrite=false;this.clippingPlanes=null;this.clipIntersection=false;this.clipShadows=false;this.shadowSide=null;this.colorWrite=true;this.precision=null;this.polygonOffset=false;this.polygonOffsetFactor=0;this.polygonOffsetUnits=0;this.dithering=false;this.alphaToCoverage=false;this.premultipliedAlpha=false;this.forceSinglePass=false;this.allowOverride=true;this.visible=true;this.toneMapped=true;this.userData={};this.version=0;this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(value){if(this._alphaTest>0!==value>0){this.version++}this._alphaTest=value}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(values){if(values===undefined)return;for(const key in values){const newValue=values[key];if(newValue===undefined){warn(`Material: parameter '${key}' has value of undefined.`);continue}const currentValue=this[key];if(currentValue===undefined){warn(`Material: '${key}' is not a property of THREE.${this.type}.`);continue}if(currentValue&&currentValue.isColor){currentValue.set(newValue)}else if(currentValue&&currentValue.isVector3&&newValue&&newValue.isVector3){currentValue.copy(newValue)}else{this[key]=newValue}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(isRootObject){meta={textures:{},images:{}}}const data={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(this.color&&this.color.isColor)data.color=this.color.getHex();if(this.roughness!==undefined)data.roughness=this.roughness;if(this.metalness!==undefined)data.metalness=this.metalness;if(this.sheen!==undefined)data.sheen=this.sheen;if(this.sheenColor&&this.sheenColor.isColor)data.sheenColor=this.sheenColor.getHex();if(this.sheenRoughness!==undefined)data.sheenRoughness=this.sheenRoughness;if(this.emissive&&this.emissive.isColor)data.emissive=this.emissive.getHex();if(this.emissiveIntensity!==undefined&&this.emissiveIntensity!==1)data.emissiveIntensity=this.emissiveIntensity;if(this.specular&&this.specular.isColor)data.specular=this.specular.getHex();if(this.specularIntensity!==undefined)data.specularIntensity=this.specularIntensity;if(this.specularColor&&this.specularColor.isColor)data.specularColor=this.specularColor.getHex();if(this.shininess!==undefined)data.shininess=this.shininess;if(this.clearcoat!==undefined)data.clearcoat=this.clearcoat;if(this.clearcoatRoughness!==undefined)data.clearcoatRoughness=this.clearcoatRoughness;if(this.clearcoatMap&&this.clearcoatMap.isTexture){data.clearcoatMap=this.clearcoatMap.toJSON(meta).uuid}if(this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture){data.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(meta).uuid}if(this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture){data.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(meta).uuid;data.clearcoatNormalScale=this.clearcoatNormalScale.toArray()}if(this.sheenColorMap&&this.sheenColorMap.isTexture){data.sheenColorMap=this.sheenColorMap.toJSON(meta).uuid}if(this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture){data.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(meta).uuid}if(this.dispersion!==undefined)data.dispersion=this.dispersion;if(this.iridescence!==undefined)data.iridescence=this.iridescence;if(this.iridescenceIOR!==undefined)data.iridescenceIOR=this.iridescenceIOR;if(this.iridescenceThicknessRange!==undefined)data.iridescenceThicknessRange=this.iridescenceThicknessRange;if(this.iridescenceMap&&this.iridescenceMap.isTexture){data.iridescenceMap=this.iridescenceMap.toJSON(meta).uuid}if(this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture){data.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(meta).uuid}if(this.anisotropy!==undefined)data.anisotropy=this.anisotropy;if(this.anisotropyRotation!==undefined)data.anisotropyRotation=this.anisotropyRotation;if(this.anisotropyMap&&this.anisotropyMap.isTexture){data.anisotropyMap=this.anisotropyMap.toJSON(meta).uuid}if(this.map&&this.map.isTexture)data.map=this.map.toJSON(meta).uuid;if(this.matcap&&this.matcap.isTexture)data.matcap=this.matcap.toJSON(meta).uuid;if(this.alphaMap&&this.alphaMap.isTexture)data.alphaMap=this.alphaMap.toJSON(meta).uuid;if(this.lightMap&&this.lightMap.isTexture){data.lightMap=this.lightMap.toJSON(meta).uuid;data.lightMapIntensity=this.lightMapIntensity}if(this.aoMap&&this.aoMap.isTexture){data.aoMap=this.aoMap.toJSON(meta).uuid;data.aoMapIntensity=this.aoMapIntensity}if(this.bumpMap&&this.bumpMap.isTexture){data.bumpMap=this.bumpMap.toJSON(meta).uuid;data.bumpScale=this.bumpScale}if(this.normalMap&&this.normalMap.isTexture){data.normalMap=this.normalMap.toJSON(meta).uuid;data.normalMapType=this.normalMapType;data.normalScale=this.normalScale.toArray()}if(this.displacementMap&&this.displacementMap.isTexture){data.displacementMap=this.displacementMap.toJSON(meta).uuid;data.displacementScale=this.displacementScale;data.displacementBias=this.displacementBias}if(this.roughnessMap&&this.roughnessMap.isTexture)data.roughnessMap=this.roughnessMap.toJSON(meta).uuid;if(this.metalnessMap&&this.metalnessMap.isTexture)data.metalnessMap=this.metalnessMap.toJSON(meta).uuid;if(this.emissiveMap&&this.emissiveMap.isTexture)data.emissiveMap=this.emissiveMap.toJSON(meta).uuid;if(this.specularMap&&this.specularMap.isTexture)data.specularMap=this.specularMap.toJSON(meta).uuid;if(this.specularIntensityMap&&this.specularIntensityMap.isTexture)data.specularIntensityMap=this.specularIntensityMap.toJSON(meta).uuid;if(this.specularColorMap&&this.specularColorMap.isTexture)data.specularColorMap=this.specularColorMap.toJSON(meta).uuid;if(this.envMap&&this.envMap.isTexture){data.envMap=this.envMap.toJSON(meta).uuid;if(this.combine!==undefined)data.combine=this.combine}if(this.envMapRotation!==undefined)data.envMapRotation=this.envMapRotation.toArray();if(this.envMapIntensity!==undefined)data.envMapIntensity=this.envMapIntensity;if(this.reflectivity!==undefined)data.reflectivity=this.reflectivity;if(this.refractionRatio!==undefined)data.refractionRatio=this.refractionRatio;if(this.gradientMap&&this.gradientMap.isTexture){data.gradientMap=this.gradientMap.toJSON(meta).uuid}if(this.transmission!==undefined)data.transmission=this.transmission;if(this.transmissionMap&&this.transmissionMap.isTexture)data.transmissionMap=this.transmissionMap.toJSON(meta).uuid;if(this.thickness!==undefined)data.thickness=this.thickness;if(this.thicknessMap&&this.thicknessMap.isTexture)data.thicknessMap=this.thicknessMap.toJSON(meta).uuid;if(this.attenuationDistance!==undefined&&this.attenuationDistance!==Infinity)data.attenuationDistance=this.attenuationDistance;if(this.attenuationColor!==undefined)data.attenuationColor=this.attenuationColor.getHex();if(this.size!==undefined)data.size=this.size;if(this.shadowSide!==null)data.shadowSide=this.shadowSide;if(this.sizeAttenuation!==undefined)data.sizeAttenuation=this.sizeAttenuation;if(this.blending!==NormalBlending)data.blending=this.blending;if(this.side!==FrontSide)data.side=this.side;if(this.vertexColors===true)data.vertexColors=true;if(this.opacity<1)data.opacity=this.opacity;if(this.transparent===true)data.transparent=true;if(this.blendSrc!==SrcAlphaFactor)data.blendSrc=this.blendSrc;if(this.blendDst!==OneMinusSrcAlphaFactor)data.blendDst=this.blendDst;if(this.blendEquation!==AddEquation)data.blendEquation=this.blendEquation;if(this.blendSrcAlpha!==null)data.blendSrcAlpha=this.blendSrcAlpha;if(this.blendDstAlpha!==null)data.blendDstAlpha=this.blendDstAlpha;if(this.blendEquationAlpha!==null)data.blendEquationAlpha=this.blendEquationAlpha;if(this.blendColor&&this.blendColor.isColor)data.blendColor=this.blendColor.getHex();if(this.blendAlpha!==0)data.blendAlpha=this.blendAlpha;if(this.depthFunc!==LessEqualDepth)data.depthFunc=this.depthFunc;if(this.depthTest===false)data.depthTest=this.depthTest;if(this.depthWrite===false)data.depthWrite=this.depthWrite;if(this.colorWrite===false)data.colorWrite=this.colorWrite;if(this.stencilWriteMask!==255)data.stencilWriteMask=this.stencilWriteMask;if(this.stencilFunc!==AlwaysStencilFunc)data.stencilFunc=this.stencilFunc;if(this.stencilRef!==0)data.stencilRef=this.stencilRef;if(this.stencilFuncMask!==255)data.stencilFuncMask=this.stencilFuncMask;if(this.stencilFail!==KeepStencilOp)data.stencilFail=this.stencilFail;if(this.stencilZFail!==KeepStencilOp)data.stencilZFail=this.stencilZFail;if(this.stencilZPass!==KeepStencilOp)data.stencilZPass=this.stencilZPass;if(this.stencilWrite===true)data.stencilWrite=this.stencilWrite;if(this.rotation!==undefined&&this.rotation!==0)data.rotation=this.rotation;if(this.polygonOffset===true)data.polygonOffset=true;if(this.polygonOffsetFactor!==0)data.polygonOffsetFactor=this.polygonOffsetFactor;if(this.polygonOffsetUnits!==0)data.polygonOffsetUnits=this.polygonOffsetUnits;if(this.linewidth!==undefined&&this.linewidth!==1)data.linewidth=this.linewidth;if(this.dashSize!==undefined)data.dashSize=this.dashSize;if(this.gapSize!==undefined)data.gapSize=this.gapSize;if(this.scale!==undefined)data.scale=this.scale;if(this.dithering===true)data.dithering=true;if(this.alphaTest>0)data.alphaTest=this.alphaTest;if(this.alphaHash===true)data.alphaHash=true;if(this.alphaToCoverage===true)data.alphaToCoverage=true;if(this.premultipliedAlpha===true)data.premultipliedAlpha=true;if(this.forceSinglePass===true)data.forceSinglePass=true;if(this.allowOverride===false)data.allowOverride=false;if(this.wireframe===true)data.wireframe=true;if(this.wireframeLinewidth>1)data.wireframeLinewidth=this.wireframeLinewidth;if(this.wireframeLinecap!=="round")data.wireframeLinecap=this.wireframeLinecap;if(this.wireframeLinejoin!=="round")data.wireframeLinejoin=this.wireframeLinejoin;if(this.flatShading===true)data.flatShading=true;if(this.visible===false)data.visible=false;if(this.toneMapped===false)data.toneMapped=false;if(this.fog===false)data.fog=false;if(Object.keys(this.userData).length>0)data.userData=this.userData;function extractFromCache(cache){const values=[];for(const key in cache){const data=cache[key];delete data.metadata;values.push(data)}return values}if(isRootObject){const textures=extractFromCache(meta.textures);const images=extractFromCache(meta.images);if(textures.length>0)data.textures=textures;if(images.length>0)data.images=images}return data}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name;this.blending=source.blending;this.side=source.side;this.vertexColors=source.vertexColors;this.opacity=source.opacity;this.transparent=source.transparent;this.blendSrc=source.blendSrc;this.blendDst=source.blendDst;this.blendEquation=source.blendEquation;this.blendSrcAlpha=source.blendSrcAlpha;this.blendDstAlpha=source.blendDstAlpha;this.blendEquationAlpha=source.blendEquationAlpha;this.blendColor.copy(source.blendColor);this.blendAlpha=source.blendAlpha;this.depthFunc=source.depthFunc;this.depthTest=source.depthTest;this.depthWrite=source.depthWrite;this.stencilWriteMask=source.stencilWriteMask;this.stencilFunc=source.stencilFunc;this.stencilRef=source.stencilRef;this.stencilFuncMask=source.stencilFuncMask;this.stencilFail=source.stencilFail;this.stencilZFail=source.stencilZFail;this.stencilZPass=source.stencilZPass;this.stencilWrite=source.stencilWrite;const srcPlanes=source.clippingPlanes;let dstPlanes=null;if(srcPlanes!==null){const n=srcPlanes.length;dstPlanes=new Array(n);for(let i=0;i!==n;++i){dstPlanes[i]=srcPlanes[i].clone()}}this.clippingPlanes=dstPlanes;this.clipIntersection=source.clipIntersection;this.clipShadows=source.clipShadows;this.shadowSide=source.shadowSide;this.colorWrite=source.colorWrite;this.precision=source.precision;this.polygonOffset=source.polygonOffset;this.polygonOffsetFactor=source.polygonOffsetFactor;this.polygonOffsetUnits=source.polygonOffsetUnits;this.dithering=source.dithering;this.alphaTest=source.alphaTest;this.alphaHash=source.alphaHash;this.alphaToCoverage=source.alphaToCoverage;this.premultipliedAlpha=source.premultipliedAlpha;this.forceSinglePass=source.forceSinglePass;this.allowOverride=source.allowOverride;this.visible=source.visible;this.toneMapped=source.toneMapped;this.userData=JSON.parse(JSON.stringify(source.userData));return this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(value){if(value===true)this.version++}}class MeshBasicMaterial extends Material{constructor(parameters){super();this.isMeshBasicMaterial=true;this.type="MeshBasicMaterial";this.color=new Color(16777215);this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.fog=source.fog;return this}}const _tables=_generateTables();function _generateTables(){const buffer=new ArrayBuffer(4);const floatView=new Float32Array(buffer);const uint32View=new Uint32Array(buffer);const baseTable=new Uint32Array(512);const shiftTable=new Uint32Array(512);for(let i=0;i<256;++i){const e=i-127;if(e<-27){baseTable[i]=0;baseTable[i|256]=32768;shiftTable[i]=24;shiftTable[i|256]=24}else if(e<-14){baseTable[i]=1024>>-e-14;baseTable[i|256]=1024>>-e-14|32768;shiftTable[i]=-e-1;shiftTable[i|256]=-e-1}else if(e<=15){baseTable[i]=e+15<<10;baseTable[i|256]=e+15<<10|32768;shiftTable[i]=13;shiftTable[i|256]=13}else if(e<128){baseTable[i]=31744;baseTable[i|256]=64512;shiftTable[i]=24;shiftTable[i|256]=24}else{baseTable[i]=31744;baseTable[i|256]=64512;shiftTable[i]=13;shiftTable[i|256]=13}}const mantissaTable=new Uint32Array(2048);const exponentTable=new Uint32Array(64);const offsetTable=new Uint32Array(64);for(let i=1;i<1024;++i){let m=i<<13;let e=0;while((m&8388608)===0){m<<=1;e-=8388608}m&=-8388609;e+=947912704;mantissaTable[i]=m|e}for(let i=1024;i<2048;++i){mantissaTable[i]=939524096+(i-1024<<13)}for(let i=1;i<31;++i){exponentTable[i]=i<<23}exponentTable[31]=1199570944;exponentTable[32]=2147483648;for(let i=33;i<63;++i){exponentTable[i]=2147483648+(i-32<<23)}exponentTable[63]=3347054592;for(let i=1;i<64;++i){if(i!==32){offsetTable[i]=1024}}return{floatView:floatView,uint32View:uint32View,baseTable:baseTable,shiftTable:shiftTable,mantissaTable:mantissaTable,exponentTable:exponentTable,offsetTable:offsetTable}}function toHalfFloat(val){if(Math.abs(val)>65504)warn("DataUtils.toHalfFloat(): Value out of range.");val=clamp(val,-65504,65504);_tables.floatView[0]=val;const f=_tables.uint32View[0];const e=f>>23&511;return _tables.baseTable[e]+((f&8388607)>>_tables.shiftTable[e])}function fromHalfFloat(val){const m=val>>10;_tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[m]+(val&1023)]+_tables.exponentTable[m];return _tables.floatView[0]}class DataUtils{static toHalfFloat(val){return toHalfFloat(val)}static fromHalfFloat(val){return fromHalfFloat(val)}}const _vector$9=new Vector3;const _vector2$1=new Vector2;let _id$3=0;class BufferAttribute{constructor(array,itemSize,normalized=false){if(Array.isArray(array)){throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.")}this.isBufferAttribute=true;Object.defineProperty(this,"id",{value:_id$3++});this.name="";this.array=array;this.itemSize=itemSize;this.count=array!==undefined?array.length/itemSize:0;this.normalized=normalized;this.usage=StaticDrawUsage;this.updateRanges=[];this.gpuType=FloatType;this.version=0}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}setUsage(value){this.usage=value;return this}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){this.name=source.name;this.array=new source.array.constructor(source.array);this.itemSize=source.itemSize;this.count=source.count;this.normalized=source.normalized;this.usage=source.usage;this.gpuType=source.gpuType;return this}copyAt(index1,attribute,index2){index1*=this.itemSize;index2*=attribute.itemSize;for(let i=0,l=this.itemSize;i<l;i++){this.array[index1+i]=attribute.array[index2+i]}return this}copyArray(array){this.array.set(array);return this}applyMatrix3(m){if(this.itemSize===2){for(let i=0,l=this.count;i<l;i++){_vector2$1.fromBufferAttribute(this,i);_vector2$1.applyMatrix3(m);this.setXY(i,_vector2$1.x,_vector2$1.y)}}else if(this.itemSize===3){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyMatrix3(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}}return this}applyMatrix4(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyMatrix4(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyNormalMatrix(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.transformDirection(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}set(value,offset=0){this.array.set(value,offset);return this}getComponent(index,component){let value=this.array[index*this.itemSize+component];if(this.normalized)value=denormalize(value,this.array);return value}setComponent(index,component,value){if(this.normalized)value=normalize(value,this.array);this.array[index*this.itemSize+component]=value;return this}getX(index){let x=this.array[index*this.itemSize];if(this.normalized)x=denormalize(x,this.array);return x}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.array[index*this.itemSize]=x;return this}getY(index){let y=this.array[index*this.itemSize+1];if(this.normalized)y=denormalize(y,this.array);return y}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.array[index*this.itemSize+1]=y;return this}getZ(index){let z=this.array[index*this.itemSize+2];if(this.normalized)z=denormalize(z,this.array);return z}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.array[index*this.itemSize+2]=z;return this}getW(index){let w=this.array[index*this.itemSize+3];if(this.normalized)w=denormalize(w,this.array);return w}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.array[index*this.itemSize+3]=w;return this}setXY(index,x,y){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.array[index+0]=x;this.array[index+1]=y;return this}setXYZ(index,x,y,z){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.array[index+0]=x;this.array[index+1]=y;this.array[index+2]=z;return this}setXYZW(index,x,y,z,w){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.array[index+0]=x;this.array[index+1]=y;this.array[index+2]=z;this.array[index+3]=w;return this}onUpload(callback){this.onUploadCallback=callback;return this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const data={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};if(this.name!=="")data.name=this.name;if(this.usage!==StaticDrawUsage)data.usage=this.usage;return data}}class Int8BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int8Array(array),itemSize,normalized)}}class Uint8BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint8Array(array),itemSize,normalized)}}class Uint8ClampedBufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint8ClampedArray(array),itemSize,normalized)}}class Int16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int16Array(array),itemSize,normalized)}}class Uint16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint16Array(array),itemSize,normalized)}}class Int32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int32Array(array),itemSize,normalized)}}class Uint32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint32Array(array),itemSize,normalized)}}class Float16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint16Array(array),itemSize,normalized);this.isFloat16BufferAttribute=true}getX(index){let x=fromHalfFloat(this.array[index*this.itemSize]);if(this.normalized)x=denormalize(x,this.array);return x}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.array[index*this.itemSize]=toHalfFloat(x);return this}getY(index){let y=fromHalfFloat(this.array[index*this.itemSize+1]);if(this.normalized)y=denormalize(y,this.array);return y}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.array[index*this.itemSize+1]=toHalfFloat(y);return this}getZ(index){let z=fromHalfFloat(this.array[index*this.itemSize+2]);if(this.normalized)z=denormalize(z,this.array);return z}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.array[index*this.itemSize+2]=toHalfFloat(z);return this}getW(index){let w=fromHalfFloat(this.array[index*this.itemSize+3]);if(this.normalized)w=denormalize(w,this.array);return w}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.array[index*this.itemSize+3]=toHalfFloat(w);return this}setXY(index,x,y){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);return this}setXYZ(index,x,y,z){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);this.array[index+2]=toHalfFloat(z);return this}setXYZW(index,x,y,z,w){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);this.array[index+2]=toHalfFloat(z);this.array[index+3]=toHalfFloat(w);return this}}class Float32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Float32Array(array),itemSize,normalized)}}let _id$2=0;const _m1$2=new Matrix4;const _obj=new Object3D;const _offset=new Vector3;const _box$2=new Box3;const _boxMorphTargets=new Box3;const _vector$8=new Vector3;class BufferGeometry extends EventDispatcher{constructor(){super();this.isBufferGeometry=true;Object.defineProperty(this,"id",{value:_id$2++});this.uuid=generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.indirect=null;this.indirectOffset=0;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=false;this.groups=[];this.boundingBox=null;this.boundingSphere=null;this.drawRange={start:0,count:Infinity};this.userData={}}getIndex(){return this.index}setIndex(index){if(Array.isArray(index)){this.index=new(arrayNeedsUint32(index)?Uint32BufferAttribute:Uint16BufferAttribute)(index,1)}else{this.index=index}return this}setIndirect(indirect,indirectOffset=0){this.indirect=indirect;this.indirectOffset=indirectOffset;return this}getIndirect(){return this.indirect}getAttribute(name){return this.attributes[name]}setAttribute(name,attribute){this.attributes[name]=attribute;return this}deleteAttribute(name){delete this.attributes[name];return this}hasAttribute(name){return this.attributes[name]!==undefined}addGroup(start,count,materialIndex=0){this.groups.push({start:start,count:count,materialIndex:materialIndex})}clearGroups(){this.groups=[]}setDrawRange(start,count){this.drawRange.start=start;this.drawRange.count=count}applyMatrix4(matrix){const position=this.attributes.position;if(position!==undefined){position.applyMatrix4(matrix);position.needsUpdate=true}const normal=this.attributes.normal;if(normal!==undefined){const normalMatrix=new Matrix3().getNormalMatrix(matrix);normal.applyNormalMatrix(normalMatrix);normal.needsUpdate=true}const tangent=this.attributes.tangent;if(tangent!==undefined){tangent.transformDirection(matrix);tangent.needsUpdate=true}if(this.boundingBox!==null){this.computeBoundingBox()}if(this.boundingSphere!==null){this.computeBoundingSphere()}return this}applyQuaternion(q){_m1$2.makeRotationFromQuaternion(q);this.applyMatrix4(_m1$2);return this}rotateX(angle){_m1$2.makeRotationX(angle);this.applyMatrix4(_m1$2);return this}rotateY(angle){_m1$2.makeRotationY(angle);this.applyMatrix4(_m1$2);return this}rotateZ(angle){_m1$2.makeRotationZ(angle);this.applyMatrix4(_m1$2);return this}translate(x,y,z){_m1$2.makeTranslation(x,y,z);this.applyMatrix4(_m1$2);return this}scale(x,y,z){_m1$2.makeScale(x,y,z);this.applyMatrix4(_m1$2);return this}lookAt(vector){_obj.lookAt(vector);_obj.updateMatrix();this.applyMatrix4(_obj.matrix);return this}center(){this.computeBoundingBox();this.boundingBox.getCenter(_offset).negate();this.translate(_offset.x,_offset.y,_offset.z);return this}setFromPoints(points){const positionAttribute=this.getAttribute("position");if(positionAttribute===undefined){const position=[];for(let i=0,l=points.length;i<l;i++){const point=points[i];position.push(point.x,point.y,point.z||0)}this.setAttribute("position",new Float32BufferAttribute(position,3))}else{const l=Math.min(points.length,positionAttribute.count);for(let i=0;i<l;i++){const point=points[i];positionAttribute.setXYZ(i,point.x,point.y,point.z||0)}if(points.length>positionAttribute.count){warn("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.")}positionAttribute.needsUpdate=true}return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const position=this.attributes.position;const morphAttributesPosition=this.morphAttributes.position;if(position&&position.isGLBufferAttribute){error("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this);this.boundingBox.set(new Vector3(-Infinity,-Infinity,-Infinity),new Vector3(+Infinity,+Infinity,+Infinity));return}if(position!==undefined){this.boundingBox.setFromBufferAttribute(position);if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];_box$2.setFromBufferAttribute(morphAttribute);if(this.morphTargetsRelative){_vector$8.addVectors(this.boundingBox.min,_box$2.min);this.boundingBox.expandByPoint(_vector$8);_vector$8.addVectors(this.boundingBox.max,_box$2.max);this.boundingBox.expandByPoint(_vector$8)}else{this.boundingBox.expandByPoint(_box$2.min);this.boundingBox.expandByPoint(_box$2.max)}}}}else{this.boundingBox.makeEmpty()}if(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z)){error("BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.",this)}}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}const position=this.attributes.position;const morphAttributesPosition=this.morphAttributes.position;if(position&&position.isGLBufferAttribute){error("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this);this.boundingSphere.set(new Vector3,Infinity);return}if(position){const center=this.boundingSphere.center;_box$2.setFromBufferAttribute(position);if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];_boxMorphTargets.setFromBufferAttribute(morphAttribute);if(this.morphTargetsRelative){_vector$8.addVectors(_box$2.min,_boxMorphTargets.min);_box$2.expandByPoint(_vector$8);_vector$8.addVectors(_box$2.max,_boxMorphTargets.max);_box$2.expandByPoint(_vector$8)}else{_box$2.expandByPoint(_boxMorphTargets.min);_box$2.expandByPoint(_boxMorphTargets.max)}}}_box$2.getCenter(center);let maxRadiusSq=0;for(let i=0,il=position.count;i<il;i++){_vector$8.fromBufferAttribute(position,i);maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(_vector$8))}if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];const morphTargetsRelative=this.morphTargetsRelative;for(let j=0,jl=morphAttribute.count;j<jl;j++){_vector$8.fromBufferAttribute(morphAttribute,j);if(morphTargetsRelative){_offset.fromBufferAttribute(position,j);_vector$8.add(_offset)}maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(_vector$8))}}}this.boundingSphere.radius=Math.sqrt(maxRadiusSq);if(isNaN(this.boundingSphere.radius)){error("BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.",this)}}}computeTangents(){const index=this.index;const attributes=this.attributes;if(index===null||attributes.position===undefined||attributes.normal===undefined||attributes.uv===undefined){error("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const positionAttribute=attributes.position;const normalAttribute=attributes.normal;const uvAttribute=attributes.uv;if(this.hasAttribute("tangent")===false){this.setAttribute("tangent",new BufferAttribute(new Float32Array(4*positionAttribute.count),4))}const tangentAttribute=this.getAttribute("tangent");const tan1=[],tan2=[];for(let i=0;i<positionAttribute.count;i++){tan1[i]=new Vector3;tan2[i]=new Vector3}const vA=new Vector3,vB=new Vector3,vC=new Vector3,uvA=new Vector2,uvB=new Vector2,uvC=new Vector2,sdir=new Vector3,tdir=new Vector3;function handleTriangle(a,b,c){vA.fromBufferAttribute(positionAttribute,a);vB.fromBufferAttribute(positionAttribute,b);vC.fromBufferAttribute(positionAttribute,c);uvA.fromBufferAttribute(uvAttribute,a);uvB.fromBufferAttribute(uvAttribute,b);uvC.fromBufferAttribute(uvAttribute,c);vB.sub(vA);vC.sub(vA);uvB.sub(uvA);uvC.sub(uvA);const r=1/(uvB.x*uvC.y-uvC.x*uvB.y);if(!isFinite(r))return;sdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC,-uvB.y).multiplyScalar(r);tdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB,-uvC.x).multiplyScalar(r);tan1[a].add(sdir);tan1[b].add(sdir);tan1[c].add(sdir);tan2[a].add(tdir);tan2[b].add(tdir);tan2[c].add(tdir)}let groups=this.groups;if(groups.length===0){groups=[{start:0,count:index.count}]}for(let i=0,il=groups.length;i<il;++i){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){handleTriangle(index.getX(j+0),index.getX(j+1),index.getX(j+2))}}const tmp=new Vector3,tmp2=new Vector3;const n=new Vector3,n2=new Vector3;function handleVertex(v){n.fromBufferAttribute(normalAttribute,v);n2.copy(n);const t=tan1[v];tmp.copy(t);tmp.sub(n.multiplyScalar(n.dot(t))).normalize();tmp2.crossVectors(n2,t);const test=tmp2.dot(tan2[v]);const w=test<0?-1:1;tangentAttribute.setXYZW(v,tmp.x,tmp.y,tmp.z,w)}for(let i=0,il=groups.length;i<il;++i){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){handleVertex(index.getX(j+0));handleVertex(index.getX(j+1));handleVertex(index.getX(j+2))}}}computeVertexNormals(){const index=this.index;const positionAttribute=this.getAttribute("position");if(positionAttribute!==undefined){let normalAttribute=this.getAttribute("normal");if(normalAttribute===undefined){normalAttribute=new BufferAttribute(new Float32Array(positionAttribute.count*3),3);this.setAttribute("normal",normalAttribute)}else{for(let i=0,il=normalAttribute.count;i<il;i++){normalAttribute.setXYZ(i,0,0,0)}}const pA=new Vector3,pB=new Vector3,pC=new Vector3;const nA=new Vector3,nB=new Vector3,nC=new Vector3;const cb=new Vector3,ab=new Vector3;if(index){for(let i=0,il=index.count;i<il;i+=3){const vA=index.getX(i+0);const vB=index.getX(i+1);const vC=index.getX(i+2);pA.fromBufferAttribute(positionAttribute,vA);pB.fromBufferAttribute(positionAttribute,vB);pC.fromBufferAttribute(positionAttribute,vC);cb.subVectors(pC,pB);ab.subVectors(pA,pB);cb.cross(ab);nA.fromBufferAttribute(normalAttribute,vA);nB.fromBufferAttribute(normalAttribute,vB);nC.fromBufferAttribute(normalAttribute,vC);nA.add(cb);nB.add(cb);nC.add(cb);normalAttribute.setXYZ(vA,nA.x,nA.y,nA.z);normalAttribute.setXYZ(vB,nB.x,nB.y,nB.z);normalAttribute.setXYZ(vC,nC.x,nC.y,nC.z)}}else{for(let i=0,il=positionAttribute.count;i<il;i+=3){pA.fromBufferAttribute(positionAttribute,i+0);pB.fromBufferAttribute(positionAttribute,i+1);pC.fromBufferAttribute(positionAttribute,i+2);cb.subVectors(pC,pB);ab.subVectors(pA,pB);cb.cross(ab);normalAttribute.setXYZ(i+0,cb.x,cb.y,cb.z);normalAttribute.setXYZ(i+1,cb.x,cb.y,cb.z);normalAttribute.setXYZ(i+2,cb.x,cb.y,cb.z)}}this.normalizeNormals();normalAttribute.needsUpdate=true}}normalizeNormals(){const normals=this.attributes.normal;for(let i=0,il=normals.count;i<il;i++){_vector$8.fromBufferAttribute(normals,i);_vector$8.normalize();normals.setXYZ(i,_vector$8.x,_vector$8.y,_vector$8.z)}}toNonIndexed(){function convertBufferAttribute(attribute,indices){const array=attribute.array;const itemSize=attribute.itemSize;const normalized=attribute.normalized;const array2=new array.constructor(indices.length*itemSize);let index=0,index2=0;for(let i=0,l=indices.length;i<l;i++){if(attribute.isInterleavedBufferAttribute){index=indices[i]*attribute.data.stride+attribute.offset}else{index=indices[i]*itemSize}for(let j=0;j<itemSize;j++){array2[index2++]=array[index++]}}return new BufferAttribute(array2,itemSize,normalized)}if(this.index===null){warn("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.");return this}const geometry2=new BufferGeometry;const indices=this.index.array;const attributes=this.attributes;for(const name in attributes){const attribute=attributes[name];const newAttribute=convertBufferAttribute(attribute,indices);geometry2.setAttribute(name,newAttribute)}const morphAttributes=this.morphAttributes;for(const name in morphAttributes){const morphArray=[];const morphAttribute=morphAttributes[name];for(let i=0,il=morphAttribute.length;i<il;i++){const attribute=morphAttribute[i];const newAttribute=convertBufferAttribute(attribute,indices);morphArray.push(newAttribute)}geometry2.morphAttributes[name]=morphArray}geometry2.morphTargetsRelative=this.morphTargetsRelative;const groups=this.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];geometry2.addGroup(group.start,group.count,group.materialIndex)}return geometry2}toJSON(){const data={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(Object.keys(this.userData).length>0)data.userData=this.userData;if(this.parameters!==undefined){const parameters=this.parameters;for(const key in parameters){if(parameters[key]!==undefined)data[key]=parameters[key]}return data}data.data={attributes:{}};const index=this.index;if(index!==null){data.data.index={type:index.array.constructor.name,array:Array.prototype.slice.call(index.array)}}const attributes=this.attributes;for(const key in attributes){const attribute=attributes[key];data.data.attributes[key]=attribute.toJSON(data.data)}const morphAttributes={};let hasMorphAttributes=false;for(const key in this.morphAttributes){const attributeArray=this.morphAttributes[key];const array=[];for(let i=0,il=attributeArray.length;i<il;i++){const attribute=attributeArray[i];array.push(attribute.toJSON(data.data))}if(array.length>0){morphAttributes[key]=array;hasMorphAttributes=true}}if(hasMorphAttributes){data.data.morphAttributes=morphAttributes;data.data.morphTargetsRelative=this.morphTargetsRelative}const groups=this.groups;if(groups.length>0){data.data.groups=JSON.parse(JSON.stringify(groups))}const boundingSphere=this.boundingSphere;if(boundingSphere!==null){data.data.boundingSphere=boundingSphere.toJSON()}return data}clone(){return new this.constructor().copy(this)}copy(source){this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingBox=null;this.boundingSphere=null;const data={};this.name=source.name;const index=source.index;if(index!==null){this.setIndex(index.clone())}const attributes=source.attributes;for(const name in attributes){const attribute=attributes[name];this.setAttribute(name,attribute.clone(data))}const morphAttributes=source.morphAttributes;for(const name in morphAttributes){const array=[];const morphAttribute=morphAttributes[name];for(let i=0,l=morphAttribute.length;i<l;i++){array.push(morphAttribute[i].clone(data))}this.morphAttributes[name]=array}this.morphTargetsRelative=source.morphTargetsRelative;const groups=source.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];this.addGroup(group.start,group.count,group.materialIndex)}const boundingBox=source.boundingBox;if(boundingBox!==null){this.boundingBox=boundingBox.clone()}const boundingSphere=source.boundingSphere;if(boundingSphere!==null){this.boundingSphere=boundingSphere.clone()}this.drawRange.start=source.drawRange.start;this.drawRange.count=source.drawRange.count;this.userData=source.userData;return this}dispose(){this.dispatchEvent({type:"dispose"})}}const _inverseMatrix$3=new Matrix4;const _ray$3=new Ray;const _sphere$6=new Sphere;const _sphereHitAt=new Vector3;const _vA$1=new Vector3;const _vB$1=new Vector3;const _vC$1=new Vector3;const _tempA=new Vector3;const _morphA=new Vector3;const _intersectionPoint=new Vector3;const _intersectionPointWorld=new Vector3;class Mesh extends Object3D{constructor(geometry=new BufferGeometry,material=new MeshBasicMaterial){super();this.isMesh=true;this.type="Mesh";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.count=1;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);if(source.morphTargetInfluences!==undefined){this.morphTargetInfluences=source.morphTargetInfluences.slice()}if(source.morphTargetDictionary!==undefined){this.morphTargetDictionary=Object.assign({},source.morphTargetDictionary)}this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}getVertexPosition(index,target){const geometry=this.geometry;const position=geometry.attributes.position;const morphPosition=geometry.morphAttributes.position;const morphTargetsRelative=geometry.morphTargetsRelative;target.fromBufferAttribute(position,index);const morphInfluences=this.morphTargetInfluences;if(morphPosition&&morphInfluences){_morphA.set(0,0,0);for(let i=0,il=morphPosition.length;i<il;i++){const influence=morphInfluences[i];const morphAttribute=morphPosition[i];if(influence===0)continue;_tempA.fromBufferAttribute(morphAttribute,index);if(morphTargetsRelative){_morphA.addScaledVector(_tempA,influence)}else{_morphA.addScaledVector(_tempA.sub(target),influence)}}target.add(_morphA)}return target}raycast(raycaster,intersects){const geometry=this.geometry;const material=this.material;const matrixWorld=this.matrixWorld;if(material===undefined)return;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$6.copy(geometry.boundingSphere);_sphere$6.applyMatrix4(matrixWorld);_ray$3.copy(raycaster.ray).recast(raycaster.near);if(_sphere$6.containsPoint(_ray$3.origin)===false){if(_ray$3.intersectSphere(_sphere$6,_sphereHitAt)===null)return;if(_ray$3.origin.distanceToSquared(_sphereHitAt)>(raycaster.far-raycaster.near)**2)return}_inverseMatrix$3.copy(matrixWorld).invert();_ray$3.copy(raycaster.ray).applyMatrix4(_inverseMatrix$3);if(geometry.boundingBox!==null){if(_ray$3.intersectsBox(geometry.boundingBox)===false)return}this._computeIntersections(raycaster,intersects,_ray$3)}_computeIntersections(raycaster,intersects,rayLocalSpace){let intersection;const geometry=this.geometry;const material=this.material;const index=geometry.index;const position=geometry.attributes.position;const uv=geometry.attributes.uv;const uv1=geometry.attributes.uv1;const normal=geometry.attributes.normal;const groups=geometry.groups;const drawRange=geometry.drawRange;if(index!==null){if(Array.isArray(material)){for(let i=0,il=groups.length;i<il;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];const start=Math.max(group.start,drawRange.start);const end=Math.min(index.count,Math.min(group.start+group.count,drawRange.start+drawRange.count));for(let j=start,jl=end;j<jl;j+=3){const a=index.getX(j);const b=index.getX(j+1);const c=index.getX(j+2);intersection=checkGeometryIntersection(this,groupMaterial,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(j/3);intersection.face.materialIndex=group.materialIndex;intersects.push(intersection)}}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i+=3){const a=index.getX(i);const b=index.getX(i+1);const c=index.getX(i+2);intersection=checkGeometryIntersection(this,material,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(i/3);intersects.push(intersection)}}}}else if(position!==undefined){if(Array.isArray(material)){for(let i=0,il=groups.length;i<il;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];const start=Math.max(group.start,drawRange.start);const end=Math.min(position.count,Math.min(group.start+group.count,drawRange.start+drawRange.count));for(let j=start,jl=end;j<jl;j+=3){const a=j;const b=j+1;const c=j+2;intersection=checkGeometryIntersection(this,groupMaterial,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(j/3);intersection.face.materialIndex=group.materialIndex;intersects.push(intersection)}}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(position.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i+=3){const a=i;const b=i+1;const c=i+2;intersection=checkGeometryIntersection(this,material,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(i/3);intersects.push(intersection)}}}}}}function checkIntersection$1(object,material,raycaster,ray,pA,pB,pC,point){let intersect;if(material.side===BackSide){intersect=ray.intersectTriangle(pC,pB,pA,true,point)}else{intersect=ray.intersectTriangle(pA,pB,pC,material.side===FrontSide,point)}if(intersect===null)return null;_intersectionPointWorld.copy(point);_intersectionPointWorld.applyMatrix4(object.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_intersectionPointWorld);if(distance<raycaster.near||distance>raycaster.far)return null;return{distance:distance,point:_intersectionPointWorld.clone(),object:object}}function checkGeometryIntersection(object,material,raycaster,ray,uv,uv1,normal,a,b,c){object.getVertexPosition(a,_vA$1);object.getVertexPosition(b,_vB$1);object.getVertexPosition(c,_vC$1);const intersection=checkIntersection$1(object,material,raycaster,ray,_vA$1,_vB$1,_vC$1,_intersectionPoint);if(intersection){const barycoord=new Vector3;Triangle.getBarycoord(_intersectionPoint,_vA$1,_vB$1,_vC$1,barycoord);if(uv){intersection.uv=Triangle.getInterpolatedAttribute(uv,a,b,c,barycoord,new Vector2)}if(uv1){intersection.uv1=Triangle.getInterpolatedAttribute(uv1,a,b,c,barycoord,new Vector2)}if(normal){intersection.normal=Triangle.getInterpolatedAttribute(normal,a,b,c,barycoord,new Vector3);if(intersection.normal.dot(ray.direction)>0){intersection.normal.multiplyScalar(-1)}}const face={a:a,b:b,c:c,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA$1,_vB$1,_vC$1,face.normal);intersection.face=face;intersection.barycoord=barycoord}return intersection}class BoxGeometry extends BufferGeometry{constructor(width=1,height=1,depth=1,widthSegments=1,heightSegments=1,depthSegments=1){super();this.type="BoxGeometry";this.parameters={width:width,height:height,depth:depth,widthSegments:widthSegments,heightSegments:heightSegments,depthSegments:depthSegments};const scope=this;widthSegments=Math.floor(widthSegments);heightSegments=Math.floor(heightSegments);depthSegments=Math.floor(depthSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let numberOfVertices=0;let groupStart=0;buildPlane("z","y","x",-1,-1,depth,height,width,depthSegments,heightSegments,0);buildPlane("z","y","x",1,-1,depth,height,-width,depthSegments,heightSegments,1);buildPlane("x","z","y",1,1,width,depth,height,widthSegments,depthSegments,2);buildPlane("x","z","y",1,-1,width,depth,-height,widthSegments,depthSegments,3);buildPlane("x","y","z",1,-1,width,height,depth,widthSegments,heightSegments,4);buildPlane("x","y","z",-1,-1,width,height,-depth,widthSegments,heightSegments,5);this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function buildPlane(u,v,w,udir,vdir,width,height,depth,gridX,gridY,materialIndex){const segmentWidth=width/gridX;const segmentHeight=height/gridY;const widthHalf=width/2;const heightHalf=height/2;const depthHalf=depth/2;const gridX1=gridX+1;const gridY1=gridY+1;let vertexCounter=0;let groupCount=0;const vector=new Vector3;for(let iy=0;iy<gridY1;iy++){const y=iy*segmentHeight-heightHalf;for(let ix=0;ix<gridX1;ix++){const x=ix*segmentWidth-widthHalf;vector[u]=x*udir;vector[v]=y*vdir;vector[w]=depthHalf;vertices.push(vector.x,vector.y,vector.z);vector[u]=0;vector[v]=0;vector[w]=depth>0?1:-1;normals.push(vector.x,vector.y,vector.z);uvs.push(ix/gridX);uvs.push(1-iy/gridY);vertexCounter+=1}}for(let iy=0;iy<gridY;iy++){for(let ix=0;ix<gridX;ix++){const a=numberOfVertices+ix+gridX1*iy;const b=numberOfVertices+ix+gridX1*(iy+1);const c=numberOfVertices+(ix+1)+gridX1*(iy+1);const d=numberOfVertices+(ix+1)+gridX1*iy;indices.push(a,b,d);indices.push(b,c,d);groupCount+=6}}scope.addGroup(groupStart,groupCount,materialIndex);groupStart+=groupCount;numberOfVertices+=vertexCounter}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new BoxGeometry(data.width,data.height,data.depth,data.widthSegments,data.heightSegments,data.depthSegments)}}function cloneUniforms(src){const dst={};for(const u in src){dst[u]={};for(const p in src[u]){const property=src[u][p];if(property&&(property.isColor||property.isMatrix3||property.isMatrix4||property.isVector2||property.isVector3||property.isVector4||property.isTexture||property.isQuaternion)){if(property.isRenderTargetTexture){warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().");dst[u][p]=null}else{dst[u][p]=property.clone()}}else if(Array.isArray(property)){dst[u][p]=property.slice()}else{dst[u][p]=property}}}return dst}function mergeUniforms(uniforms){const merged={};for(let u=0;u<uniforms.length;u++){const tmp=cloneUniforms(uniforms[u]);for(const p in tmp){merged[p]=tmp[p]}}return merged}function cloneUniformsGroups(src){const dst=[];for(let u=0;u<src.length;u++){dst.push(src[u].clone())}return dst}function getUnlitUniformColorSpace(renderer){const currentRenderTarget=renderer.getRenderTarget();if(currentRenderTarget===null){return renderer.outputColorSpace}if(currentRenderTarget.isXRRenderTarget===true){return currentRenderTarget.texture.colorSpace}return ColorManagement.workingColorSpace}const UniformsUtils={clone:cloneUniforms,merge:mergeUniforms};var default_vertex="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";var default_fragment="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";class ShaderMaterial extends Material{constructor(parameters){super();this.isShaderMaterial=true;this.type="ShaderMaterial";this.defines={};this.uniforms={};this.uniformsGroups=[];this.vertexShader=default_vertex;this.fragmentShader=default_fragment;this.linewidth=1;this.wireframe=false;this.wireframeLinewidth=1;this.fog=false;this.lights=false;this.clipping=false;this.forceSinglePass=true;this.extensions={clipCullDistance:false,multiDraw:false};this.defaultAttributeValues={"color":[1,1,1],"uv":[0,0],"uv1":[0,0]};this.index0AttributeName=undefined;this.uniformsNeedUpdate=false;this.glslVersion=null;if(parameters!==undefined){this.setValues(parameters)}}copy(source){super.copy(source);this.fragmentShader=source.fragmentShader;this.vertexShader=source.vertexShader;this.uniforms=cloneUniforms(source.uniforms);this.uniformsGroups=cloneUniformsGroups(source.uniformsGroups);this.defines=Object.assign({},source.defines);this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.fog=source.fog;this.lights=source.lights;this.clipping=source.clipping;this.extensions=Object.assign({},source.extensions);this.glslVersion=source.glslVersion;this.defaultAttributeValues=Object.assign({},source.defaultAttributeValues);this.index0AttributeName=source.index0AttributeName;this.uniformsNeedUpdate=source.uniformsNeedUpdate;return this}toJSON(meta){const data=super.toJSON(meta);data.glslVersion=this.glslVersion;data.uniforms={};for(const name in this.uniforms){const uniform=this.uniforms[name];const value=uniform.value;if(value&&value.isTexture){data.uniforms[name]={type:"t",value:value.toJSON(meta).uuid}}else if(value&&value.isColor){data.uniforms[name]={type:"c",value:value.getHex()}}else if(value&&value.isVector2){data.uniforms[name]={type:"v2",value:value.toArray()}}else if(value&&value.isVector3){data.uniforms[name]={type:"v3",value:value.toArray()}}else if(value&&value.isVector4){data.uniforms[name]={type:"v4",value:value.toArray()}}else if(value&&value.isMatrix3){data.uniforms[name]={type:"m3",value:value.toArray()}}else if(value&&value.isMatrix4){data.uniforms[name]={type:"m4",value:value.toArray()}}else{data.uniforms[name]={value:value}}}if(Object.keys(this.defines).length>0)data.defines=this.defines;data.vertexShader=this.vertexShader;data.fragmentShader=this.fragmentShader;data.lights=this.lights;data.clipping=this.clipping;const extensions={};for(const key in this.extensions){if(this.extensions[key]===true)extensions[key]=true}if(Object.keys(extensions).length>0)data.extensions=extensions;return data}}class Camera extends Object3D{constructor(){super();this.isCamera=true;this.type="Camera";this.matrixWorldInverse=new Matrix4;this.projectionMatrix=new Matrix4;this.projectionMatrixInverse=new Matrix4;this.coordinateSystem=WebGLCoordinateSystem;this._reversedDepth=false}get reversedDepth(){return this._reversedDepth}copy(source,recursive){super.copy(source,recursive);this.matrixWorldInverse.copy(source.matrixWorldInverse);this.projectionMatrix.copy(source.projectionMatrix);this.projectionMatrixInverse.copy(source.projectionMatrixInverse);this.coordinateSystem=source.coordinateSystem;return this}getWorldDirection(target){return super.getWorldDirection(target).negate()}updateMatrixWorld(force){super.updateMatrixWorld(force);this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(updateParents,updateChildren){super.updateWorldMatrix(updateParents,updateChildren);this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const _v3$1=new Vector3;const _minTarget=new Vector2;const _maxTarget=new Vector2;class PerspectiveCamera extends Camera{constructor(fov=50,aspect=1,near=0.1,far=2000){super();this.isPerspectiveCamera=true;this.type="PerspectiveCamera";this.fov=fov;this.zoom=1;this.near=near;this.far=far;this.focus=10;this.aspect=aspect;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}copy(source,recursive){super.copy(source,recursive);this.fov=source.fov;this.zoom=source.zoom;this.near=source.near;this.far=source.far;this.focus=source.focus;this.aspect=source.aspect;this.view=source.view===null?null:Object.assign({},source.view);this.filmGauge=source.filmGauge;this.filmOffset=source.filmOffset;return this}setFocalLength(focalLength){const vExtentSlope=0.5*this.getFilmHeight()/focalLength;this.fov=RAD2DEG*2*Math.atan(vExtentSlope);this.updateProjectionMatrix()}getFocalLength(){const vExtentSlope=Math.tan(DEG2RAD*0.5*this.fov);return 0.5*this.getFilmHeight()/vExtentSlope}getEffectiveFOV(){return RAD2DEG*2*Math.atan(Math.tan(DEG2RAD*0.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(distance,minTarget,maxTarget){_v3$1.set(-1,-1,0.5).applyMatrix4(this.projectionMatrixInverse);minTarget.set(_v3$1.x,_v3$1.y).multiplyScalar(-distance/_v3$1.z);_v3$1.set(1,1,0.5).applyMatrix4(this.projectionMatrixInverse);maxTarget.set(_v3$1.x,_v3$1.y).multiplyScalar(-distance/_v3$1.z)}getViewSize(distance,target){this.getViewBounds(distance,_minTarget,_maxTarget);return target.subVectors(_maxTarget,_minTarget)}setViewOffset(fullWidth,fullHeight,x,y,width,height){this.aspect=fullWidth/fullHeight;if(this.view===null){this.view={enabled:true,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}}this.view.enabled=true;this.view.fullWidth=fullWidth;this.view.fullHeight=fullHeight;this.view.offsetX=x;this.view.offsetY=y;this.view.width=width;this.view.height=height;this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null){this.view.enabled=false}this.updateProjectionMatrix()}updateProjectionMatrix(){const near=this.near;let top=near*Math.tan(DEG2RAD*0.5*this.fov)/this.zoom;let height=2*top;let width=this.aspect*height;let left=-0.5*width;const view=this.view;if(this.view!==null&&this.view.enabled){const fullWidth=view.fullWidth,fullHeight=view.fullHeight;left+=view.offsetX*width/fullWidth;top-=view.offsetY*height/fullHeight;width*=view.width/fullWidth;height*=view.height/fullHeight}const skew=this.filmOffset;if(skew!==0)left+=near*skew/this.getFilmWidth();this.projectionMatrix.makePerspective(left,left+width,top,top-height,near,this.far,this.coordinateSystem,this.reversedDepth);this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(meta){const data=super.toJSON(meta);data.object.fov=this.fov;data.object.zoom=this.zoom;data.object.near=this.near;data.object.far=this.far;data.object.focus=this.focus;data.object.aspect=this.aspect;if(this.view!==null)data.object.view=Object.assign({},this.view);data.object.filmGauge=this.filmGauge;data.object.filmOffset=this.filmOffset;return data}}const fov=-90;const aspect=1;class CubeCamera extends Object3D{constructor(near,far,renderTarget){super();this.type="CubeCamera";this.renderTarget=renderTarget;this.coordinateSystem=null;this.activeMipmapLevel=0;const cameraPX=new PerspectiveCamera(fov,aspect,near,far);cameraPX.layers=this.layers;this.add(cameraPX);const cameraNX=new PerspectiveCamera(fov,aspect,near,far);cameraNX.layers=this.layers;this.add(cameraNX);const cameraPY=new PerspectiveCamera(fov,aspect,near,far);cameraPY.layers=this.layers;this.add(cameraPY);const cameraNY=new PerspectiveCamera(fov,aspect,near,far);cameraNY.layers=this.layers;this.add(cameraNY);const cameraPZ=new PerspectiveCamera(fov,aspect,near,far);cameraPZ.layers=this.layers;this.add(cameraPZ);const cameraNZ=new PerspectiveCamera(fov,aspect,near,far);cameraNZ.layers=this.layers;this.add(cameraNZ)}updateCoordinateSystem(){const coordinateSystem=this.coordinateSystem;const cameras=this.children.concat();const[cameraPX,cameraNX,cameraPY,cameraNY,cameraPZ,cameraNZ]=cameras;for(const camera of cameras)this.remove(camera);if(coordinateSystem===WebGLCoordinateSystem){cameraPX.up.set(0,1,0);cameraPX.lookAt(1,0,0);cameraNX.up.set(0,1,0);cameraNX.lookAt(-1,0,0);cameraPY.up.set(0,0,-1);cameraPY.lookAt(0,1,0);cameraNY.up.set(0,0,1);cameraNY.lookAt(0,-1,0);cameraPZ.up.set(0,1,0);cameraPZ.lookAt(0,0,1);cameraNZ.up.set(0,1,0);cameraNZ.lookAt(0,0,-1)}else if(coordinateSystem===WebGPUCoordinateSystem){cameraPX.up.set(0,-1,0);cameraPX.lookAt(-1,0,0);cameraNX.up.set(0,-1,0);cameraNX.lookAt(1,0,0);cameraPY.up.set(0,0,1);cameraPY.lookAt(0,1,0);cameraNY.up.set(0,0,-1);cameraNY.lookAt(0,-1,0);cameraPZ.up.set(0,-1,0);cameraPZ.lookAt(0,0,1);cameraNZ.up.set(0,-1,0);cameraNZ.lookAt(0,0,-1)}else{throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+coordinateSystem)}for(const camera of cameras){this.add(camera);camera.updateMatrixWorld()}}update(renderer,scene){if(this.parent===null)this.updateMatrixWorld();const{renderTarget,activeMipmapLevel}=this;if(this.coordinateSystem!==renderer.coordinateSystem){this.coordinateSystem=renderer.coordinateSystem;this.updateCoordinateSystem()}const[cameraPX,cameraNX,cameraPY,cameraNY,cameraPZ,cameraNZ]=this.children;const currentRenderTarget=renderer.getRenderTarget();const currentActiveCubeFace=renderer.getActiveCubeFace();const currentActiveMipmapLevel=renderer.getActiveMipmapLevel();const currentXrEnabled=renderer.xr.enabled;renderer.xr.enabled=false;const generateMipmaps=renderTarget.texture.generateMipmaps;renderTarget.texture.generateMipmaps=false;renderer.setRenderTarget(renderTarget,0,activeMipmapLevel);renderer.render(scene,cameraPX);renderer.setRenderTarget(renderTarget,1,activeMipmapLevel);renderer.render(scene,cameraNX);renderer.setRenderTarget(renderTarget,2,activeMipmapLevel);renderer.render(scene,cameraPY);renderer.setRenderTarget(renderTarget,3,activeMipmapLevel);renderer.render(scene,cameraNY);renderer.setRenderTarget(renderTarget,4,activeMipmapLevel);renderer.render(scene,cameraPZ);renderTarget.texture.generateMipmaps=generateMipmaps;renderer.setRenderTarget(renderTarget,5,activeMipmapLevel);renderer.render(scene,cameraNZ);renderer.setRenderTarget(currentRenderTarget,currentActiveCubeFace,currentActiveMipmapLevel);renderer.xr.enabled=currentXrEnabled;renderTarget.texture.needsPMREMUpdate=true}}class CubeTexture extends Texture{constructor(images=[],mapping=CubeReflectionMapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace){super(images,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isCubeTexture=true;this.flipY=false}get images(){return this.image}set images(value){this.image=value}}class WebGLCubeRenderTarget extends WebGLRenderTarget{constructor(size=1,options={}){super(size,size,options);this.isWebGLCubeRenderTarget=true;const image={width:size,height:size,depth:1};const images=[image,image,image,image,image,image];this.texture=new CubeTexture(images);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}fromEquirectangularTexture(renderer,texture){this.texture.type=texture.type;this.texture.colorSpace=texture.colorSpace;this.texture.generateMipmaps=texture.generateMipmaps;this.texture.minFilter=texture.minFilter;this.texture.magFilter=texture.magFilter;const shader={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

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

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

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`};const geometry=new BoxGeometry(5,5,5);const material=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(shader.uniforms),vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader,side:BackSide,blending:NoBlending});material.uniforms.tEquirect.value=texture;const mesh=new Mesh(geometry,material);const currentMinFilter=texture.minFilter;if(texture.minFilter===LinearMipmapLinearFilter)texture.minFilter=LinearFilter;const camera=new CubeCamera(1,10,this);camera.update(renderer,mesh);texture.minFilter=currentMinFilter;mesh.geometry.dispose();mesh.material.dispose();return this}clear(renderer,color=true,depth=true,stencil=true){const currentRenderTarget=renderer.getRenderTarget();for(let i=0;i<6;i++){renderer.setRenderTarget(this,i);renderer.clear(color,depth,stencil)}renderer.setRenderTarget(currentRenderTarget)}}class Group extends Object3D{constructor(){super();this.isGroup=true;this.type="Group"}}const _moveEvent={type:"move"};class WebXRController{constructor(){this._targetRay=null;this._grip=null;this._hand=null}getHandSpace(){if(this._hand===null){this._hand=new Group;this._hand.matrixAutoUpdate=false;this._hand.visible=false;this._hand.joints={};this._hand.inputState={pinching:false}}return this._hand}getTargetRaySpace(){if(this._targetRay===null){this._targetRay=new Group;this._targetRay.matrixAutoUpdate=false;this._targetRay.visible=false;this._targetRay.hasLinearVelocity=false;this._targetRay.linearVelocity=new Vector3;this._targetRay.hasAngularVelocity=false;this._targetRay.angularVelocity=new Vector3}return this._targetRay}getGripSpace(){if(this._grip===null){this._grip=new Group;this._grip.matrixAutoUpdate=false;this._grip.visible=false;this._grip.hasLinearVelocity=false;this._grip.linearVelocity=new Vector3;this._grip.hasAngularVelocity=false;this._grip.angularVelocity=new Vector3}return this._grip}dispatchEvent(event){if(this._targetRay!==null){this._targetRay.dispatchEvent(event)}if(this._grip!==null){this._grip.dispatchEvent(event)}if(this._hand!==null){this._hand.dispatchEvent(event)}return this}connect(inputSource){if(inputSource&&inputSource.hand){const hand=this._hand;if(hand){for(const inputjoint of inputSource.hand.values()){this._getHandJoint(hand,inputjoint)}}}this.dispatchEvent({type:"connected",data:inputSource});return this}disconnect(inputSource){this.dispatchEvent({type:"disconnected",data:inputSource});if(this._targetRay!==null){this._targetRay.visible=false}if(this._grip!==null){this._grip.visible=false}if(this._hand!==null){this._hand.visible=false}return this}update(inputSource,frame,referenceSpace){let inputPose=null;let gripPose=null;let handPose=null;const targetRay=this._targetRay;const grip=this._grip;const hand=this._hand;if(inputSource&&frame.session.visibilityState!=="visible-blurred"){if(hand&&inputSource.hand){handPose=true;for(const inputjoint of inputSource.hand.values()){const jointPose=frame.getJointPose(inputjoint,referenceSpace);const joint=this._getHandJoint(hand,inputjoint);if(jointPose!==null){joint.matrix.fromArray(jointPose.transform.matrix);joint.matrix.decompose(joint.position,joint.rotation,joint.scale);joint.matrixWorldNeedsUpdate=true;joint.jointRadius=jointPose.radius}joint.visible=jointPose!==null}const indexTip=hand.joints["index-finger-tip"];const thumbTip=hand.joints["thumb-tip"];const distance=indexTip.position.distanceTo(thumbTip.position);const distanceToPinch=0.02;const threshold=0.005;if(hand.inputState.pinching&&distance>distanceToPinch+threshold){hand.inputState.pinching=false;this.dispatchEvent({type:"pinchend",handedness:inputSource.handedness,target:this})}else if(!hand.inputState.pinching&&distance<=distanceToPinch-threshold){hand.inputState.pinching=true;this.dispatchEvent({type:"pinchstart",handedness:inputSource.handedness,target:this})}}else{if(grip!==null&&inputSource.gripSpace){gripPose=frame.getPose(inputSource.gripSpace,referenceSpace);if(gripPose!==null){grip.matrix.fromArray(gripPose.transform.matrix);grip.matrix.decompose(grip.position,grip.rotation,grip.scale);grip.matrixWorldNeedsUpdate=true;if(gripPose.linearVelocity){grip.hasLinearVelocity=true;grip.linearVelocity.copy(gripPose.linearVelocity)}else{grip.hasLinearVelocity=false}if(gripPose.angularVelocity){grip.hasAngularVelocity=true;grip.angularVelocity.copy(gripPose.angularVelocity)}else{grip.hasAngularVelocity=false}}}}if(targetRay!==null){inputPose=frame.getPose(inputSource.targetRaySpace,referenceSpace);if(inputPose===null&&gripPose!==null){inputPose=gripPose}if(inputPose!==null){targetRay.matrix.fromArray(inputPose.transform.matrix);targetRay.matrix.decompose(targetRay.position,targetRay.rotation,targetRay.scale);targetRay.matrixWorldNeedsUpdate=true;if(inputPose.linearVelocity){targetRay.hasLinearVelocity=true;targetRay.linearVelocity.copy(inputPose.linearVelocity)}else{targetRay.hasLinearVelocity=false}if(inputPose.angularVelocity){targetRay.hasAngularVelocity=true;targetRay.angularVelocity.copy(inputPose.angularVelocity)}else{targetRay.hasAngularVelocity=false}this.dispatchEvent(_moveEvent)}}}if(targetRay!==null){targetRay.visible=inputPose!==null}if(grip!==null){grip.visible=gripPose!==null}if(hand!==null){hand.visible=handPose!==null}return this}_getHandJoint(hand,inputjoint){if(hand.joints[inputjoint.jointName]===undefined){const joint=new Group;joint.matrixAutoUpdate=false;joint.visible=false;hand.joints[inputjoint.jointName]=joint;hand.add(joint)}return hand.joints[inputjoint.jointName]}}class FogExp2{constructor(color,density=0.00025){this.isFogExp2=true;this.name="";this.color=new Color(color);this.density=density}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Fog{constructor(color,near=1,far=1000){this.isFog=true;this.name="";this.color=new Color(color);this.near=near;this.far=far}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Scene extends Object3D{constructor(){super();this.isScene=true;this.type="Scene";this.background=null;this.environment=null;this.fog=null;this.backgroundBlurriness=0;this.backgroundIntensity=1;this.backgroundRotation=new Euler;this.environmentIntensity=1;this.environmentRotation=new Euler;this.overrideMaterial=null;if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}copy(source,recursive){super.copy(source,recursive);if(source.background!==null)this.background=source.background.clone();if(source.environment!==null)this.environment=source.environment.clone();if(source.fog!==null)this.fog=source.fog.clone();this.backgroundBlurriness=source.backgroundBlurriness;this.backgroundIntensity=source.backgroundIntensity;this.backgroundRotation.copy(source.backgroundRotation);this.environmentIntensity=source.environmentIntensity;this.environmentRotation.copy(source.environmentRotation);if(source.overrideMaterial!==null)this.overrideMaterial=source.overrideMaterial.clone();this.matrixAutoUpdate=source.matrixAutoUpdate;return this}toJSON(meta){const data=super.toJSON(meta);if(this.fog!==null)data.object.fog=this.fog.toJSON();if(this.backgroundBlurriness>0)data.object.backgroundBlurriness=this.backgroundBlurriness;if(this.backgroundIntensity!==1)data.object.backgroundIntensity=this.backgroundIntensity;data.object.backgroundRotation=this.backgroundRotation.toArray();if(this.environmentIntensity!==1)data.object.environmentIntensity=this.environmentIntensity;data.object.environmentRotation=this.environmentRotation.toArray();return data}}class InterleavedBuffer{constructor(array,stride){this.isInterleavedBuffer=true;this.array=array;this.stride=stride;this.count=array!==undefined?array.length/stride:0;this.usage=StaticDrawUsage;this.updateRanges=[];this.version=0;this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}setUsage(value){this.usage=value;return this}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){this.array=new source.array.constructor(source.array);this.count=source.count;this.stride=source.stride;this.usage=source.usage;return this}copyAt(index1,interleavedBuffer,index2){index1*=this.stride;index2*=interleavedBuffer.stride;for(let i=0,l=this.stride;i<l;i++){this.array[index1+i]=interleavedBuffer.array[index2+i]}return this}set(value,offset=0){this.array.set(value,offset);return this}clone(data){if(data.arrayBuffers===undefined){data.arrayBuffers={}}if(this.array.buffer._uuid===undefined){this.array.buffer._uuid=generateUUID()}if(data.arrayBuffers[this.array.buffer._uuid]===undefined){data.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer}const array=new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]);const ib=new this.constructor(array,this.stride);ib.setUsage(this.usage);return ib}onUpload(callback){this.onUploadCallback=callback;return this}toJSON(data){if(data.arrayBuffers===undefined){data.arrayBuffers={}}if(this.array.buffer._uuid===undefined){this.array.buffer._uuid=generateUUID()}if(data.arrayBuffers[this.array.buffer._uuid]===undefined){data.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))}return{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const _vector$7=new Vector3;class InterleavedBufferAttribute{constructor(interleavedBuffer,itemSize,offset,normalized=false){this.isInterleavedBufferAttribute=true;this.name="";this.data=interleavedBuffer;this.itemSize=itemSize;this.offset=offset;this.normalized=normalized}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(value){this.data.needsUpdate=value}applyMatrix4(m){for(let i=0,l=this.data.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.applyMatrix4(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.applyNormalMatrix(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$7.fromBufferAttribute(this,i);_vector$7.transformDirection(m);this.setXYZ(i,_vector$7.x,_vector$7.y,_vector$7.z)}return this}getComponent(index,component){let value=this.array[index*this.data.stride+this.offset+component];if(this.normalized)value=denormalize(value,this.array);return value}setComponent(index,component,value){if(this.normalized)value=normalize(value,this.array);this.data.array[index*this.data.stride+this.offset+component]=value;return this}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.data.array[index*this.data.stride+this.offset]=x;return this}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.data.array[index*this.data.stride+this.offset+1]=y;return this}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.data.array[index*this.data.stride+this.offset+2]=z;return this}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.data.array[index*this.data.stride+this.offset+3]=w;return this}getX(index){let x=this.data.array[index*this.data.stride+this.offset];if(this.normalized)x=denormalize(x,this.array);return x}getY(index){let y=this.data.array[index*this.data.stride+this.offset+1];if(this.normalized)y=denormalize(y,this.array);return y}getZ(index){let z=this.data.array[index*this.data.stride+this.offset+2];if(this.normalized)z=denormalize(z,this.array);return z}getW(index){let w=this.data.array[index*this.data.stride+this.offset+3];if(this.normalized)w=denormalize(w,this.array);return w}setXY(index,x,y){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;return this}setXYZ(index,x,y,z){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;this.data.array[index+2]=z;return this}setXYZW(index,x,y,z,w){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;this.data.array[index+2]=z;this.data.array[index+3]=w;return this}clone(data){if(data===undefined){log("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const array=[];for(let i=0;i<this.count;i++){const index=i*this.data.stride+this.offset;for(let j=0;j<this.itemSize;j++){array.push(this.data.array[index+j])}}return new BufferAttribute(new this.array.constructor(array),this.itemSize,this.normalized)}else{if(data.interleavedBuffers===undefined){data.interleavedBuffers={}}if(data.interleavedBuffers[this.data.uuid]===undefined){data.interleavedBuffers[this.data.uuid]=this.data.clone(data)}return new InterleavedBufferAttribute(data.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}}toJSON(data){if(data===undefined){log("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const array=[];for(let i=0;i<this.count;i++){const index=i*this.data.stride+this.offset;for(let j=0;j<this.itemSize;j++){array.push(this.data.array[index+j])}}return{itemSize:this.itemSize,type:this.array.constructor.name,array:array,normalized:this.normalized}}else{if(data.interleavedBuffers===undefined){data.interleavedBuffers={}}if(data.interleavedBuffers[this.data.uuid]===undefined){data.interleavedBuffers[this.data.uuid]=this.data.toJSON(data)}return{isInterleavedBufferAttribute:true,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}}class SpriteMaterial extends Material{constructor(parameters){super();this.isSpriteMaterial=true;this.type="SpriteMaterial";this.color=new Color(16777215);this.map=null;this.alphaMap=null;this.rotation=0;this.sizeAttenuation=true;this.transparent=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.alphaMap=source.alphaMap;this.rotation=source.rotation;this.sizeAttenuation=source.sizeAttenuation;this.fog=source.fog;return this}}let _geometry;const _intersectPoint=new Vector3;const _worldScale=new Vector3;const _mvPosition=new Vector3;const _alignedPosition=new Vector2;const _rotatedPosition=new Vector2;const _viewWorldMatrix=new Matrix4;const _vA=new Vector3;const _vB=new Vector3;const _vC=new Vector3;const _uvA=new Vector2;const _uvB=new Vector2;const _uvC=new Vector2;class Sprite extends Object3D{constructor(material=new SpriteMaterial){super();this.isSprite=true;this.type="Sprite";if(_geometry===undefined){_geometry=new BufferGeometry;const float32Array=new Float32Array([-0.5,-0.5,0,0,0,0.5,-0.5,0,1,0,0.5,0.5,0,1,1,-0.5,0.5,0,0,1]);const interleavedBuffer=new InterleavedBuffer(float32Array,5);_geometry.setIndex([0,1,2,0,2,3]);_geometry.setAttribute("position",new InterleavedBufferAttribute(interleavedBuffer,3,0,false));_geometry.setAttribute("uv",new InterleavedBufferAttribute(interleavedBuffer,2,3,false))}this.geometry=_geometry;this.material=material;this.center=new Vector2(0.5,0.5);this.count=1}raycast(raycaster,intersects){if(raycaster.camera===null){error("Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.")}_worldScale.setFromMatrixScale(this.matrixWorld);_viewWorldMatrix.copy(raycaster.camera.matrixWorld);this.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse,this.matrixWorld);_mvPosition.setFromMatrixPosition(this.modelViewMatrix);if(raycaster.camera.isPerspectiveCamera&&this.material.sizeAttenuation===false){_worldScale.multiplyScalar(-_mvPosition.z)}const rotation=this.material.rotation;let sin,cos;if(rotation!==0){cos=Math.cos(rotation);sin=Math.sin(rotation)}const center=this.center;transformVertex(_vA.set(-0.5,-0.5,0),_mvPosition,center,_worldScale,sin,cos);transformVertex(_vB.set(0.5,-0.5,0),_mvPosition,center,_worldScale,sin,cos);transformVertex(_vC.set(0.5,0.5,0),_mvPosition,center,_worldScale,sin,cos);_uvA.set(0,0);_uvB.set(1,0);_uvC.set(1,1);let intersect=raycaster.ray.intersectTriangle(_vA,_vB,_vC,false,_intersectPoint);if(intersect===null){transformVertex(_vB.set(-0.5,0.5,0),_mvPosition,center,_worldScale,sin,cos);_uvB.set(0,1);intersect=raycaster.ray.intersectTriangle(_vA,_vC,_vB,false,_intersectPoint);if(intersect===null){return}}const distance=raycaster.ray.origin.distanceTo(_intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,point:_intersectPoint.clone(),uv:Triangle.getInterpolation(_intersectPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2),face:null,object:this})}copy(source,recursive){super.copy(source,recursive);if(source.center!==undefined)this.center.copy(source.center);this.material=source.material;return this}}function transformVertex(vertexPosition,mvPosition,center,scale,sin,cos){_alignedPosition.subVectors(vertexPosition,center).addScalar(0.5).multiply(scale);if(sin!==undefined){_rotatedPosition.x=cos*_alignedPosition.x-sin*_alignedPosition.y;_rotatedPosition.y=sin*_alignedPosition.x+cos*_alignedPosition.y}else{_rotatedPosition.copy(_alignedPosition)}vertexPosition.copy(mvPosition);vertexPosition.x+=_rotatedPosition.x;vertexPosition.y+=_rotatedPosition.y;vertexPosition.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3;const _v2$1=new Vector3;class LOD extends Object3D{constructor(){super();this.isLOD=true;this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:true,value:[]}});this.autoUpdate=true}copy(source){super.copy(source,false);const levels=source.levels;for(let i=0,l=levels.length;i<l;i++){const level=levels[i];this.addLevel(level.object.clone(),level.distance,level.hysteresis)}this.autoUpdate=source.autoUpdate;return this}addLevel(object,distance=0,hysteresis=0){distance=Math.abs(distance);const levels=this.levels;let l;for(l=0;l<levels.length;l++){if(distance<levels[l].distance){break}}levels.splice(l,0,{distance:distance,hysteresis:hysteresis,object:object});this.add(object);return this}removeLevel(distance){const levels=this.levels;for(let i=0;i<levels.length;i++){if(levels[i].distance===distance){const removedElements=levels.splice(i,1);this.remove(removedElements[0].object);return true}}return false}getCurrentLevel(){return this._currentLevel}getObjectForDistance(distance){const levels=this.levels;if(levels.length>0){let i,l;for(i=1,l=levels.length;i<l;i++){let levelDistance=levels[i].distance;if(levels[i].object.visible){levelDistance-=levelDistance*levels[i].hysteresis}if(distance<levelDistance){break}}return levels[i-1].object}return null}raycast(raycaster,intersects){const levels=this.levels;if(levels.length>0){_v1$2.setFromMatrixPosition(this.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(distance).raycast(raycaster,intersects)}}update(camera){const levels=this.levels;if(levels.length>1){_v1$2.setFromMatrixPosition(camera.matrixWorld);_v2$1.setFromMatrixPosition(this.matrixWorld);const distance=_v1$2.distanceTo(_v2$1)/camera.zoom;levels[0].object.visible=true;let i,l;for(i=1,l=levels.length;i<l;i++){let levelDistance=levels[i].distance;if(levels[i].object.visible){levelDistance-=levelDistance*levels[i].hysteresis}if(distance>=levelDistance){levels[i-1].object.visible=false;levels[i].object.visible=true}else{break}}this._currentLevel=i-1;for(;i<l;i++){levels[i].object.visible=false}}}toJSON(meta){const data=super.toJSON(meta);if(this.autoUpdate===false)data.object.autoUpdate=false;data.object.levels=[];const levels=this.levels;for(let i=0,l=levels.length;i<l;i++){const level=levels[i];data.object.levels.push({object:level.object.uuid,distance:level.distance,hysteresis:level.hysteresis})}return data}}const _basePosition=new Vector3;const _skinIndex=new Vector4;const _skinWeight=new Vector4;const _vector3=new Vector3;const _matrix4=new Matrix4;const _vertex=new Vector3;const _sphere$5=new Sphere;const _inverseMatrix$2=new Matrix4;const _ray$2=new Ray;class SkinnedMesh extends Mesh{constructor(geometry,material){super(geometry,material);this.isSkinnedMesh=true;this.type="SkinnedMesh";this.bindMode=AttachedBindMode;this.bindMatrix=new Matrix4;this.bindMatrixInverse=new Matrix4;this.boundingBox=null;this.boundingSphere=null}computeBoundingBox(){const geometry=this.geometry;if(this.boundingBox===null){this.boundingBox=new Box3}this.boundingBox.makeEmpty();const positionAttribute=geometry.getAttribute("position");for(let i=0;i<positionAttribute.count;i++){this.getVertexPosition(i,_vertex);this.boundingBox.expandByPoint(_vertex)}}computeBoundingSphere(){const geometry=this.geometry;if(this.boundingSphere===null){this.boundingSphere=new Sphere}this.boundingSphere.makeEmpty();const positionAttribute=geometry.getAttribute("position");for(let i=0;i<positionAttribute.count;i++){this.getVertexPosition(i,_vertex);this.boundingSphere.expandByPoint(_vertex)}}copy(source,recursive){super.copy(source,recursive);this.bindMode=source.bindMode;this.bindMatrix.copy(source.bindMatrix);this.bindMatrixInverse.copy(source.bindMatrixInverse);this.skeleton=source.skeleton;if(source.boundingBox!==null)this.boundingBox=source.boundingBox.clone();if(source.boundingSphere!==null)this.boundingSphere=source.boundingSphere.clone();return this}raycast(raycaster,intersects){const material=this.material;const matrixWorld=this.matrixWorld;if(material===undefined)return;if(this.boundingSphere===null)this.computeBoundingSphere();_sphere$5.copy(this.boundingSphere);_sphere$5.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$5)===false)return;_inverseMatrix$2.copy(matrixWorld).invert();_ray$2.copy(raycaster.ray).applyMatrix4(_inverseMatrix$2);if(this.boundingBox!==null){if(_ray$2.intersectsBox(this.boundingBox)===false)return}this._computeIntersections(raycaster,intersects,_ray$2)}getVertexPosition(index,target){super.getVertexPosition(index,target);this.applyBoneTransform(index,target);return target}bind(skeleton,bindMatrix){this.skeleton=skeleton;if(bindMatrix===undefined){this.updateMatrixWorld(true);this.skeleton.calculateInverses();bindMatrix=this.matrixWorld}this.bindMatrix.copy(bindMatrix);this.bindMatrixInverse.copy(bindMatrix).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const vector=new Vector4;const skinWeight=this.geometry.attributes.skinWeight;for(let i=0,l=skinWeight.count;i<l;i++){vector.fromBufferAttribute(skinWeight,i);const scale=1/vector.manhattanLength();if(scale!==Infinity){vector.multiplyScalar(scale)}else{vector.set(1,0,0,0)}skinWeight.setXYZW(i,vector.x,vector.y,vector.z,vector.w)}}updateMatrixWorld(force){super.updateMatrixWorld(force);if(this.bindMode===AttachedBindMode){this.bindMatrixInverse.copy(this.matrixWorld).invert()}else if(this.bindMode===DetachedBindMode){this.bindMatrixInverse.copy(this.bindMatrix).invert()}else{warn("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}}applyBoneTransform(index,target){const skeleton=this.skeleton;const geometry=this.geometry;_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex,index);_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight,index);_basePosition.copy(target).applyMatrix4(this.bindMatrix);target.set(0,0,0);for(let i=0;i<4;i++){const weight=_skinWeight.getComponent(i);if(weight!==0){const boneIndex=_skinIndex.getComponent(i);_matrix4.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld,skeleton.boneInverses[boneIndex]);target.addScaledVector(_vector3.copy(_basePosition).applyMatrix4(_matrix4),weight)}}return target.applyMatrix4(this.bindMatrixInverse)}}class Bone extends Object3D{constructor(){super();this.isBone=true;this.type="Bone"}}class DataTexture extends Texture{constructor(data=null,width=1,height=1,format,type,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isDataTexture=true;this.image={data:data,width:width,height:height};this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1}}const _offsetMatrix=new Matrix4;const _identityMatrix=new Matrix4;class Skeleton{constructor(bones=[],boneInverses=[]){this.uuid=generateUUID();this.bones=bones.slice(0);this.boneInverses=boneInverses;this.boneMatrices=null;this.previousBoneMatrices=null;this.boneTexture=null;this.init()}init(){const bones=this.bones;const boneInverses=this.boneInverses;this.boneMatrices=new Float32Array(bones.length*16);if(boneInverses.length===0){this.calculateInverses()}else{if(bones.length!==boneInverses.length){warn("Skeleton: Number of inverse bone matrices does not match amount of bones.");this.boneInverses=[];for(let i=0,il=this.bones.length;i<il;i++){this.boneInverses.push(new Matrix4)}}}}calculateInverses(){this.boneInverses.length=0;for(let i=0,il=this.bones.length;i<il;i++){const inverse=new Matrix4;if(this.bones[i]){inverse.copy(this.bones[i].matrixWorld).invert()}this.boneInverses.push(inverse)}}pose(){for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone){bone.matrixWorld.copy(this.boneInverses[i]).invert()}}for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone){if(bone.parent&&bone.parent.isBone){bone.matrix.copy(bone.parent.matrixWorld).invert();bone.matrix.multiply(bone.matrixWorld)}else{bone.matrix.copy(bone.matrixWorld)}bone.matrix.decompose(bone.position,bone.quaternion,bone.scale)}}}update(){const bones=this.bones;const boneInverses=this.boneInverses;const boneMatrices=this.boneMatrices;const boneTexture=this.boneTexture;for(let i=0,il=bones.length;i<il;i++){const matrix=bones[i]?bones[i].matrixWorld:_identityMatrix;_offsetMatrix.multiplyMatrices(matrix,boneInverses[i]);_offsetMatrix.toArray(boneMatrices,i*16)}if(boneTexture!==null){boneTexture.needsUpdate=true}}clone(){return new Skeleton(this.bones,this.boneInverses)}computeBoneTexture(){let size=Math.sqrt(this.bones.length*4);size=Math.ceil(size/4)*4;size=Math.max(size,4);const boneMatrices=new Float32Array(size*size*4);boneMatrices.set(this.boneMatrices);const boneTexture=new DataTexture(boneMatrices,size,size,RGBAFormat,FloatType);boneTexture.needsUpdate=true;this.boneMatrices=boneMatrices;this.boneTexture=boneTexture;return this}getBoneByName(name){for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone.name===name){return bone}}return undefined}dispose(){if(this.boneTexture!==null){this.boneTexture.dispose();this.boneTexture=null}}fromJSON(json,bones){this.uuid=json.uuid;for(let i=0,l=json.bones.length;i<l;i++){const uuid=json.bones[i];let bone=bones[uuid];if(bone===undefined){warn("Skeleton: No bone found with UUID:",uuid);bone=new Bone}this.bones.push(bone);this.boneInverses.push(new Matrix4().fromArray(json.boneInverses[i]))}this.init();return this}toJSON(){const data={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};data.uuid=this.uuid;const bones=this.bones;const boneInverses=this.boneInverses;for(let i=0,l=bones.length;i<l;i++){const bone=bones[i];data.bones.push(bone.uuid);const boneInverse=boneInverses[i];data.boneInverses.push(boneInverse.toArray())}return data}}class InstancedBufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized,meshPerAttribute=1){super(array,itemSize,normalized);this.isInstancedBufferAttribute=true;this.meshPerAttribute=meshPerAttribute}copy(source){super.copy(source);this.meshPerAttribute=source.meshPerAttribute;return this}toJSON(){const data=super.toJSON();data.meshPerAttribute=this.meshPerAttribute;data.isInstancedBufferAttribute=true;return data}}const _instanceLocalMatrix=new Matrix4;const _instanceWorldMatrix=new Matrix4;const _instanceIntersects=[];const _box3=new Box3;const _identity=new Matrix4;const _mesh$1=new Mesh;const _sphere$4=new Sphere;class InstancedMesh extends Mesh{constructor(geometry,material,count){super(geometry,material);this.isInstancedMesh=true;this.instanceMatrix=new InstancedBufferAttribute(new Float32Array(count*16),16);this.instanceColor=null;this.morphTexture=null;this.count=count;this.boundingBox=null;this.boundingSphere=null;for(let i=0;i<count;i++){this.setMatrixAt(i,_identity)}}computeBoundingBox(){const geometry=this.geometry;const count=this.count;if(this.boundingBox===null){this.boundingBox=new Box3}if(geometry.boundingBox===null){geometry.computeBoundingBox()}this.boundingBox.makeEmpty();for(let i=0;i<count;i++){this.getMatrixAt(i,_instanceLocalMatrix);_box3.copy(geometry.boundingBox).applyMatrix4(_instanceLocalMatrix);this.boundingBox.union(_box3)}}computeBoundingSphere(){const geometry=this.geometry;const count=this.count;if(this.boundingSphere===null){this.boundingSphere=new Sphere}if(geometry.boundingSphere===null){geometry.computeBoundingSphere()}this.boundingSphere.makeEmpty();for(let i=0;i<count;i++){this.getMatrixAt(i,_instanceLocalMatrix);_sphere$4.copy(geometry.boundingSphere).applyMatrix4(_instanceLocalMatrix);this.boundingSphere.union(_sphere$4)}}copy(source,recursive){super.copy(source,recursive);this.instanceMatrix.copy(source.instanceMatrix);if(source.morphTexture!==null)this.morphTexture=source.morphTexture.clone();if(source.instanceColor!==null)this.instanceColor=source.instanceColor.clone();this.count=source.count;if(source.boundingBox!==null)this.boundingBox=source.boundingBox.clone();if(source.boundingSphere!==null)this.boundingSphere=source.boundingSphere.clone();return this}getColorAt(index,color){color.fromArray(this.instanceColor.array,index*3)}getMatrixAt(index,matrix){matrix.fromArray(this.instanceMatrix.array,index*16)}getMorphAt(index,object){const objectInfluences=object.morphTargetInfluences;const array=this.morphTexture.source.data.data;const len=objectInfluences.length+1;const dataIndex=index*len+1;for(let i=0;i<objectInfluences.length;i++){objectInfluences[i]=array[dataIndex+i]}}raycast(raycaster,intersects){const matrixWorld=this.matrixWorld;const raycastTimes=this.count;_mesh$1.geometry=this.geometry;_mesh$1.material=this.material;if(_mesh$1.material===undefined)return;if(this.boundingSphere===null)this.computeBoundingSphere();_sphere$4.copy(this.boundingSphere);_sphere$4.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$4)===false)return;for(let instanceId=0;instanceId<raycastTimes;instanceId++){this.getMatrixAt(instanceId,_instanceLocalMatrix);_instanceWorldMatrix.multiplyMatrices(matrixWorld,_instanceLocalMatrix);_mesh$1.matrixWorld=_instanceWorldMatrix;_mesh$1.raycast(raycaster,_instanceIntersects);for(let i=0,l=_instanceIntersects.length;i<l;i++){const intersect=_instanceIntersects[i];intersect.instanceId=instanceId;intersect.object=this;intersects.push(intersect)}_instanceIntersects.length=0}}setColorAt(index,color){if(this.instanceColor===null){this.instanceColor=new InstancedBufferAttribute(new Float32Array(this.instanceMatrix.count*3).fill(1),3)}color.toArray(this.instanceColor.array,index*3)}setMatrixAt(index,matrix){matrix.toArray(this.instanceMatrix.array,index*16)}setMorphAt(index,object){const objectInfluences=object.morphTargetInfluences;const len=objectInfluences.length+1;if(this.morphTexture===null){this.morphTexture=new DataTexture(new Float32Array(len*this.count),len,this.count,RedFormat,FloatType)}const array=this.morphTexture.source.data.data;let morphInfluencesSum=0;for(let i=0;i<objectInfluences.length;i++){morphInfluencesSum+=objectInfluences[i]}const morphBaseInfluence=this.geometry.morphTargetsRelative?1:1-morphInfluencesSum;const dataIndex=len*index;array[dataIndex]=morphBaseInfluence;array.set(objectInfluences,dataIndex+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"});if(this.morphTexture!==null){this.morphTexture.dispose();this.morphTexture=null}}}const _vector1=new Vector3;const _vector2=new Vector3;const _normalMatrix=new Matrix3;class Plane{constructor(normal=new Vector3(1,0,0),constant=0){this.isPlane=true;this.normal=normal;this.constant=constant}set(normal,constant){this.normal.copy(normal);this.constant=constant;return this}setComponents(x,y,z,w){this.normal.set(x,y,z);this.constant=w;return this}setFromNormalAndCoplanarPoint(normal,point){this.normal.copy(normal);this.constant=-point.dot(this.normal);return this}setFromCoplanarPoints(a,b,c){const normal=_vector1.subVectors(c,b).cross(_vector2.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(normal,a);return this}copy(plane){this.normal.copy(plane.normal);this.constant=plane.constant;return this}normalize(){const inverseNormalLength=1/this.normal.length();this.normal.multiplyScalar(inverseNormalLength);this.constant*=inverseNormalLength;return this}negate(){this.constant*=-1;this.normal.negate();return this}distanceToPoint(point){return this.normal.dot(point)+this.constant}distanceToSphere(sphere){return this.distanceToPoint(sphere.center)-sphere.radius}projectPoint(point,target){return target.copy(point).addScaledVector(this.normal,-this.distanceToPoint(point))}intersectLine(line,target){const direction=line.delta(_vector1);const denominator=this.normal.dot(direction);if(denominator===0){if(this.distanceToPoint(line.start)===0){return target.copy(line.start)}return null}const t=-(line.start.dot(this.normal)+this.constant)/denominator;if(t<0||t>1){return null}return target.copy(line.start).addScaledVector(direction,t)}intersectsLine(line){const startSign=this.distanceToPoint(line.start);const endSign=this.distanceToPoint(line.end);return startSign<0&&endSign>0||endSign<0&&startSign>0}intersectsBox(box){return box.intersectsPlane(this)}intersectsSphere(sphere){return sphere.intersectsPlane(this)}coplanarPoint(target){return target.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(matrix,optionalNormalMatrix){const normalMatrix=optionalNormalMatrix||_normalMatrix.getNormalMatrix(matrix);const referencePoint=this.coplanarPoint(_vector1).applyMatrix4(matrix);const normal=this.normal.applyMatrix3(normalMatrix).normalize();this.constant=-referencePoint.dot(normal);return this}translate(offset){this.constant-=offset.dot(this.normal);return this}equals(plane){return plane.normal.equals(this.normal)&&plane.constant===this.constant}clone(){return new this.constructor().copy(this)}}const _sphere$3=new Sphere;const _defaultSpriteCenter=new Vector2(0.5,0.5);const _vector$6=new Vector3;class Frustum{constructor(p0=new Plane,p1=new Plane,p2=new Plane,p3=new Plane,p4=new Plane,p5=new Plane){this.planes=[p0,p1,p2,p3,p4,p5]}set(p0,p1,p2,p3,p4,p5){const planes=this.planes;planes[0].copy(p0);planes[1].copy(p1);planes[2].copy(p2);planes[3].copy(p3);planes[4].copy(p4);planes[5].copy(p5);return this}copy(frustum){const planes=this.planes;for(let i=0;i<6;i++){planes[i].copy(frustum.planes[i])}return this}setFromProjectionMatrix(m,coordinateSystem=WebGLCoordinateSystem,reversedDepth=false){const planes=this.planes;const me=m.elements;const me0=me[0],me1=me[1],me2=me[2],me3=me[3];const me4=me[4],me5=me[5],me6=me[6],me7=me[7];const me8=me[8],me9=me[9],me10=me[10],me11=me[11];const me12=me[12],me13=me[13],me14=me[14],me15=me[15];planes[0].setComponents(me3-me0,me7-me4,me11-me8,me15-me12).normalize();planes[1].setComponents(me3+me0,me7+me4,me11+me8,me15+me12).normalize();planes[2].setComponents(me3+me1,me7+me5,me11+me9,me15+me13).normalize();planes[3].setComponents(me3-me1,me7-me5,me11-me9,me15-me13).normalize();if(reversedDepth){planes[4].setComponents(me2,me6,me10,me14).normalize();planes[5].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize()}else{planes[4].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize();if(coordinateSystem===WebGLCoordinateSystem){planes[5].setComponents(me3+me2,me7+me6,me11+me10,me15+me14).normalize()}else if(coordinateSystem===WebGPUCoordinateSystem){planes[5].setComponents(me2,me6,me10,me14).normalize()}else{throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+coordinateSystem)}}return this}intersectsObject(object){if(object.boundingSphere!==undefined){if(object.boundingSphere===null)object.computeBoundingSphere();_sphere$3.copy(object.boundingSphere).applyMatrix4(object.matrixWorld)}else{const geometry=object.geometry;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$3.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld)}return this.intersectsSphere(_sphere$3)}intersectsSprite(sprite){_sphere$3.center.set(0,0,0);const offset=_defaultSpriteCenter.distanceTo(sprite.center);_sphere$3.radius=0.7071067811865476+offset;_sphere$3.applyMatrix4(sprite.matrixWorld);return this.intersectsSphere(_sphere$3)}intersectsSphere(sphere){const planes=this.planes;const center=sphere.center;const negRadius=-sphere.radius;for(let i=0;i<6;i++){const distance=planes[i].distanceToPoint(center);if(distance<negRadius){return false}}return true}intersectsBox(box){const planes=this.planes;for(let i=0;i<6;i++){const plane=planes[i];_vector$6.x=plane.normal.x>0?box.max.x:box.min.x;_vector$6.y=plane.normal.y>0?box.max.y:box.min.y;_vector$6.z=plane.normal.z>0?box.max.z:box.min.z;if(plane.distanceToPoint(_vector$6)<0){return false}}return true}containsPoint(point){const planes=this.planes;for(let i=0;i<6;i++){if(planes[i].distanceToPoint(point)<0){return false}}return true}clone(){return new this.constructor().copy(this)}}const _projScreenMatrix$2=new Matrix4;const _frustum$1=new Frustum;class FrustumArray{constructor(){this.coordinateSystem=WebGLCoordinateSystem}intersectsObject(object,cameraArray){if(!cameraArray.isArrayCamera||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsObject(object)){return true}}return false}intersectsSprite(sprite,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsSprite(sprite)){return true}}return false}intersectsSphere(sphere,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsSphere(sphere)){return true}}return false}intersectsBox(box,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.intersectsBox(box)){return true}}return false}containsPoint(point,cameraArray){if(!cameraArray||!cameraArray.cameras||cameraArray.cameras.length===0){return false}for(let i=0;i<cameraArray.cameras.length;i++){const camera=cameraArray.cameras[i];_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum$1.setFromProjectionMatrix(_projScreenMatrix$2,camera.coordinateSystem,camera.reversedDepth);if(_frustum$1.containsPoint(point)){return true}}return false}clone(){return new FrustumArray}}function ascIdSort(a,b){return a-b}function sortOpaque(a,b){return a.z-b.z}function sortTransparent(a,b){return b.z-a.z}class MultiDrawRenderList{constructor(){this.index=0;this.pool=[];this.list=[]}push(start,count,z,index){const pool=this.pool;const list=this.list;if(this.index>=pool.length){pool.push({start:-1,count:-1,z:-1,index:-1})}const item=pool[this.index];list.push(item);this.index++;item.start=start;item.count=count;item.z=z;item.index=index}reset(){this.list.length=0;this.index=0}}const _matrix$1=new Matrix4;const _whiteColor=new Color(1,1,1);const _frustum=new Frustum;const _frustumArray=new FrustumArray;const _box$1=new Box3;const _sphere$2=new Sphere;const _vector$5=new Vector3;const _forward$1=new Vector3;const _temp=new Vector3;const _renderList=new MultiDrawRenderList;const _mesh=new Mesh;const _batchIntersects=[];function copyAttributeData(src,target,targetOffset=0){const itemSize=target.itemSize;if(src.isInterleavedBufferAttribute||src.array.constructor!==target.array.constructor){const vertexCount=src.count;for(let i=0;i<vertexCount;i++){for(let c=0;c<itemSize;c++){target.setComponent(i+targetOffset,c,src.getComponent(i,c))}}}else{target.array.set(src.array,targetOffset*itemSize)}target.needsUpdate=true}function copyArrayContents(src,target){if(src.constructor!==target.constructor){const len=Math.min(src.length,target.length);for(let i=0;i<len;i++){target[i]=src[i]}}else{const len=Math.min(src.length,target.length);target.set(new src.constructor(src.buffer,0,len))}}class BatchedMesh extends Mesh{constructor(maxInstanceCount,maxVertexCount,maxIndexCount=maxVertexCount*2,material){super(new BufferGeometry,material);this.isBatchedMesh=true;this.perObjectFrustumCulled=true;this.sortObjects=true;this.boundingBox=null;this.boundingSphere=null;this.customSort=null;this._instanceInfo=[];this._geometryInfo=[];this._availableInstanceIds=[];this._availableGeometryIds=[];this._nextIndexStart=0;this._nextVertexStart=0;this._geometryCount=0;this._visibilityChanged=true;this._geometryInitialized=false;this._maxInstanceCount=maxInstanceCount;this._maxVertexCount=maxVertexCount;this._maxIndexCount=maxIndexCount;this._multiDrawCounts=new Int32Array(maxInstanceCount);this._multiDrawStarts=new Int32Array(maxInstanceCount);this._multiDrawCount=0;this._multiDrawInstances=null;this._matricesTexture=null;this._indirectTexture=null;this._colorsTexture=null;this._initMatricesTexture();this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let size=Math.sqrt(this._maxInstanceCount*4);size=Math.ceil(size/4)*4;size=Math.max(size,4);const matricesArray=new Float32Array(size*size*4);const matricesTexture=new DataTexture(matricesArray,size,size,RGBAFormat,FloatType);this._matricesTexture=matricesTexture}_initIndirectTexture(){let size=Math.sqrt(this._maxInstanceCount);size=Math.ceil(size);const indirectArray=new Uint32Array(size*size);const indirectTexture=new DataTexture(indirectArray,size,size,RedIntegerFormat,UnsignedIntType);this._indirectTexture=indirectTexture}_initColorsTexture(){let size=Math.sqrt(this._maxInstanceCount);size=Math.ceil(size);const colorsArray=new Float32Array(size*size*4).fill(1);const colorsTexture=new DataTexture(colorsArray,size,size,RGBAFormat,FloatType);colorsTexture.colorSpace=ColorManagement.workingColorSpace;this._colorsTexture=colorsTexture}_initializeGeometry(reference){const geometry=this.geometry;const maxVertexCount=this._maxVertexCount;const maxIndexCount=this._maxIndexCount;if(this._geometryInitialized===false){for(const attributeName in reference.attributes){const srcAttribute=reference.getAttribute(attributeName);const{array,itemSize,normalized}=srcAttribute;const dstArray=new array.constructor(maxVertexCount*itemSize);const dstAttribute=new BufferAttribute(dstArray,itemSize,normalized);geometry.setAttribute(attributeName,dstAttribute)}if(reference.getIndex()!==null){const indexArray=maxVertexCount>65535?new Uint32Array(maxIndexCount):new Uint16Array(maxIndexCount);geometry.setIndex(new BufferAttribute(indexArray,1))}this._geometryInitialized=true}}_validateGeometry(geometry){const batchGeometry=this.geometry;if(Boolean(geometry.getIndex())!==Boolean(batchGeometry.getIndex())){throw new Error("THREE.BatchedMesh: All geometries must consistently have \"index\".")}for(const attributeName in batchGeometry.attributes){if(!geometry.hasAttribute(attributeName)){throw new Error(`THREE.BatchedMesh: Added geometry missing "${attributeName}". All geometries must have consistent attributes.`)}const srcAttribute=geometry.getAttribute(attributeName);const dstAttribute=batchGeometry.getAttribute(attributeName);if(srcAttribute.itemSize!==dstAttribute.itemSize||srcAttribute.normalized!==dstAttribute.normalized){throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}}validateInstanceId(instanceId){const instanceInfo=this._instanceInfo;if(instanceId<0||instanceId>=instanceInfo.length||instanceInfo[instanceId].active===false){throw new Error(`THREE.BatchedMesh: Invalid instanceId ${instanceId}. Instance is either out of range or has been deleted.`)}}validateGeometryId(geometryId){const geometryInfoList=this._geometryInfo;if(geometryId<0||geometryId>=geometryInfoList.length||geometryInfoList[geometryId].active===false){throw new Error(`THREE.BatchedMesh: Invalid geometryId ${geometryId}. Geometry is either out of range or has been deleted.`)}}setCustomSort(func){this.customSort=func;return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const boundingBox=this.boundingBox;const instanceInfo=this._instanceInfo;boundingBox.makeEmpty();for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active===false)continue;const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingBoxAt(geometryId,_box$1).applyMatrix4(_matrix$1);boundingBox.union(_box$1)}}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}const boundingSphere=this.boundingSphere;const instanceInfo=this._instanceInfo;boundingSphere.makeEmpty();for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active===false)continue;const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);boundingSphere.union(_sphere$2)}}addInstance(geometryId){const atCapacity=this._instanceInfo.length>=this.maxInstanceCount;if(atCapacity&&this._availableInstanceIds.length===0){throw new Error("THREE.BatchedMesh: Maximum item count reached.")}const instanceInfo={visible:true,active:true,geometryIndex:geometryId};let drawId=null;if(this._availableInstanceIds.length>0){this._availableInstanceIds.sort(ascIdSort);drawId=this._availableInstanceIds.shift();this._instanceInfo[drawId]=instanceInfo}else{drawId=this._instanceInfo.length;this._instanceInfo.push(instanceInfo)}const matricesTexture=this._matricesTexture;_matrix$1.identity().toArray(matricesTexture.image.data,drawId*16);matricesTexture.needsUpdate=true;const colorsTexture=this._colorsTexture;if(colorsTexture){_whiteColor.toArray(colorsTexture.image.data,drawId*4);colorsTexture.needsUpdate=true}this._visibilityChanged=true;return drawId}addGeometry(geometry,reservedVertexCount=-1,reservedIndexCount=-1){this._initializeGeometry(geometry);this._validateGeometry(geometry);const geometryInfo={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:true};const geometryInfoList=this._geometryInfo;geometryInfo.vertexStart=this._nextVertexStart;geometryInfo.reservedVertexCount=reservedVertexCount===-1?geometry.getAttribute("position").count:reservedVertexCount;const index=geometry.getIndex();const hasIndex=index!==null;if(hasIndex){geometryInfo.indexStart=this._nextIndexStart;geometryInfo.reservedIndexCount=reservedIndexCount===-1?index.count:reservedIndexCount}if(geometryInfo.indexStart!==-1&&geometryInfo.indexStart+geometryInfo.reservedIndexCount>this._maxIndexCount||geometryInfo.vertexStart+geometryInfo.reservedVertexCount>this._maxVertexCount){throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.")}let geometryId;if(this._availableGeometryIds.length>0){this._availableGeometryIds.sort(ascIdSort);geometryId=this._availableGeometryIds.shift();geometryInfoList[geometryId]=geometryInfo}else{geometryId=this._geometryCount;this._geometryCount++;geometryInfoList.push(geometryInfo)}this.setGeometryAt(geometryId,geometry);this._nextIndexStart=geometryInfo.indexStart+geometryInfo.reservedIndexCount;this._nextVertexStart=geometryInfo.vertexStart+geometryInfo.reservedVertexCount;return geometryId}setGeometryAt(geometryId,geometry){if(geometryId>=this._geometryCount){throw new Error("THREE.BatchedMesh: Maximum geometry count reached.")}this._validateGeometry(geometry);const batchGeometry=this.geometry;const hasIndex=batchGeometry.getIndex()!==null;const dstIndex=batchGeometry.getIndex();const srcIndex=geometry.getIndex();const geometryInfo=this._geometryInfo[geometryId];if(hasIndex&&srcIndex.count>geometryInfo.reservedIndexCount||geometry.attributes.position.count>geometryInfo.reservedVertexCount){throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.")}const vertexStart=geometryInfo.vertexStart;const reservedVertexCount=geometryInfo.reservedVertexCount;geometryInfo.vertexCount=geometry.getAttribute("position").count;for(const attributeName in batchGeometry.attributes){const srcAttribute=geometry.getAttribute(attributeName);const dstAttribute=batchGeometry.getAttribute(attributeName);copyAttributeData(srcAttribute,dstAttribute,vertexStart);const itemSize=srcAttribute.itemSize;for(let i=srcAttribute.count,l=reservedVertexCount;i<l;i++){const index=vertexStart+i;for(let c=0;c<itemSize;c++){dstAttribute.setComponent(index,c,0)}}dstAttribute.needsUpdate=true;dstAttribute.addUpdateRange(vertexStart*itemSize,reservedVertexCount*itemSize)}if(hasIndex){const indexStart=geometryInfo.indexStart;const reservedIndexCount=geometryInfo.reservedIndexCount;geometryInfo.indexCount=geometry.getIndex().count;for(let i=0;i<srcIndex.count;i++){dstIndex.setX(indexStart+i,vertexStart+srcIndex.getX(i))}for(let i=srcIndex.count,l=reservedIndexCount;i<l;i++){dstIndex.setX(indexStart+i,vertexStart)}dstIndex.needsUpdate=true;dstIndex.addUpdateRange(indexStart,geometryInfo.reservedIndexCount)}geometryInfo.start=hasIndex?geometryInfo.indexStart:geometryInfo.vertexStart;geometryInfo.count=hasIndex?geometryInfo.indexCount:geometryInfo.vertexCount;geometryInfo.boundingBox=null;if(geometry.boundingBox!==null){geometryInfo.boundingBox=geometry.boundingBox.clone()}geometryInfo.boundingSphere=null;if(geometry.boundingSphere!==null){geometryInfo.boundingSphere=geometry.boundingSphere.clone()}this._visibilityChanged=true;return geometryId}deleteGeometry(geometryId){const geometryInfoList=this._geometryInfo;if(geometryId>=geometryInfoList.length||geometryInfoList[geometryId].active===false){return this}const instanceInfo=this._instanceInfo;for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].active&&instanceInfo[i].geometryIndex===geometryId){this.deleteInstance(i)}}geometryInfoList[geometryId].active=false;this._availableGeometryIds.push(geometryId);this._visibilityChanged=true;return this}deleteInstance(instanceId){this.validateInstanceId(instanceId);this._instanceInfo[instanceId].active=false;this._availableInstanceIds.push(instanceId);this._visibilityChanged=true;return this}optimize(){let nextVertexStart=0;let nextIndexStart=0;const geometryInfoList=this._geometryInfo;const indices=geometryInfoList.map((e,i)=>i).sort((a,b)=>{return geometryInfoList[a].vertexStart-geometryInfoList[b].vertexStart});const geometry=this.geometry;for(let i=0,l=geometryInfoList.length;i<l;i++){const index=indices[i];const geometryInfo=geometryInfoList[index];if(geometryInfo.active===false){continue}if(geometry.index!==null){if(geometryInfo.indexStart!==nextIndexStart){const{indexStart,vertexStart,reservedIndexCount}=geometryInfo;const index=geometry.index;const array=index.array;const elementDelta=nextVertexStart-vertexStart;for(let j=indexStart;j<indexStart+reservedIndexCount;j++){array[j]=array[j]+elementDelta}index.array.copyWithin(nextIndexStart,indexStart,indexStart+reservedIndexCount);index.addUpdateRange(nextIndexStart,reservedIndexCount);index.needsUpdate=true;geometryInfo.indexStart=nextIndexStart}nextIndexStart+=geometryInfo.reservedIndexCount}if(geometryInfo.vertexStart!==nextVertexStart){const{vertexStart,reservedVertexCount}=geometryInfo;const attributes=geometry.attributes;for(const key in attributes){const attribute=attributes[key];const{array,itemSize}=attribute;array.copyWithin(nextVertexStart*itemSize,vertexStart*itemSize,(vertexStart+reservedVertexCount)*itemSize);attribute.addUpdateRange(nextVertexStart*itemSize,reservedVertexCount*itemSize);attribute.needsUpdate=true}geometryInfo.vertexStart=nextVertexStart}nextVertexStart+=geometryInfo.reservedVertexCount;geometryInfo.start=geometry.index?geometryInfo.indexStart:geometryInfo.vertexStart;this._nextIndexStart=geometry.index?geometryInfo.indexStart+geometryInfo.reservedIndexCount:0;this._nextVertexStart=geometryInfo.vertexStart+geometryInfo.reservedVertexCount}this._visibilityChanged=true;return this}getBoundingBoxAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const geometry=this.geometry;const geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingBox===null){const box=new Box3;const index=geometry.index;const position=geometry.attributes.position;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}box.expandByPoint(_vector$5.fromBufferAttribute(position,iv))}geometryInfo.boundingBox=box}target.copy(geometryInfo.boundingBox);return target}getBoundingSphereAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const geometry=this.geometry;const geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingSphere===null){const sphere=new Sphere;this.getBoundingBoxAt(geometryId,_box$1);_box$1.getCenter(sphere.center);const index=geometry.index;const position=geometry.attributes.position;let maxRadiusSq=0;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}_vector$5.fromBufferAttribute(position,iv);maxRadiusSq=Math.max(maxRadiusSq,sphere.center.distanceToSquared(_vector$5))}sphere.radius=Math.sqrt(maxRadiusSq);geometryInfo.boundingSphere=sphere}target.copy(geometryInfo.boundingSphere);return target}setMatrixAt(instanceId,matrix){this.validateInstanceId(instanceId);const matricesTexture=this._matricesTexture;const matricesArray=this._matricesTexture.image.data;matrix.toArray(matricesArray,instanceId*16);matricesTexture.needsUpdate=true;return this}getMatrixAt(instanceId,matrix){this.validateInstanceId(instanceId);return matrix.fromArray(this._matricesTexture.image.data,instanceId*16)}setColorAt(instanceId,color){this.validateInstanceId(instanceId);if(this._colorsTexture===null){this._initColorsTexture()}color.toArray(this._colorsTexture.image.data,instanceId*4);this._colorsTexture.needsUpdate=true;return this}getColorAt(instanceId,color){this.validateInstanceId(instanceId);return color.fromArray(this._colorsTexture.image.data,instanceId*4)}setVisibleAt(instanceId,visible){this.validateInstanceId(instanceId);if(this._instanceInfo[instanceId].visible===visible){return this}this._instanceInfo[instanceId].visible=visible;this._visibilityChanged=true;return this}getVisibleAt(instanceId){this.validateInstanceId(instanceId);return this._instanceInfo[instanceId].visible}setGeometryIdAt(instanceId,geometryId){this.validateInstanceId(instanceId);this.validateGeometryId(geometryId);this._instanceInfo[instanceId].geometryIndex=geometryId;return this}getGeometryIdAt(instanceId){this.validateInstanceId(instanceId);return this._instanceInfo[instanceId].geometryIndex}getGeometryRangeAt(geometryId,target={}){this.validateGeometryId(geometryId);const geometryInfo=this._geometryInfo[geometryId];target.vertexStart=geometryInfo.vertexStart;target.vertexCount=geometryInfo.vertexCount;target.reservedVertexCount=geometryInfo.reservedVertexCount;target.indexStart=geometryInfo.indexStart;target.indexCount=geometryInfo.indexCount;target.reservedIndexCount=geometryInfo.reservedIndexCount;target.start=geometryInfo.start;target.count=geometryInfo.count;return target}setInstanceCount(maxInstanceCount){const availableInstanceIds=this._availableInstanceIds;const instanceInfo=this._instanceInfo;availableInstanceIds.sort(ascIdSort);while(availableInstanceIds[availableInstanceIds.length-1]===instanceInfo.length-1){instanceInfo.pop();availableInstanceIds.pop()}if(maxInstanceCount<instanceInfo.length){throw new Error(`BatchedMesh: Instance ids outside the range ${maxInstanceCount} are being used. Cannot shrink instance count.`)}const multiDrawCounts=new Int32Array(maxInstanceCount);const multiDrawStarts=new Int32Array(maxInstanceCount);copyArrayContents(this._multiDrawCounts,multiDrawCounts);copyArrayContents(this._multiDrawStarts,multiDrawStarts);this._multiDrawCounts=multiDrawCounts;this._multiDrawStarts=multiDrawStarts;this._maxInstanceCount=maxInstanceCount;const indirectTexture=this._indirectTexture;const matricesTexture=this._matricesTexture;const colorsTexture=this._colorsTexture;indirectTexture.dispose();this._initIndirectTexture();copyArrayContents(indirectTexture.image.data,this._indirectTexture.image.data);matricesTexture.dispose();this._initMatricesTexture();copyArrayContents(matricesTexture.image.data,this._matricesTexture.image.data);if(colorsTexture){colorsTexture.dispose();this._initColorsTexture();copyArrayContents(colorsTexture.image.data,this._colorsTexture.image.data)}}setGeometrySize(maxVertexCount,maxIndexCount){const validRanges=[...this._geometryInfo].filter(info=>info.active);const requiredVertexLength=Math.max(...validRanges.map(range=>range.vertexStart+range.reservedVertexCount));if(requiredVertexLength>maxVertexCount){throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${maxIndexCount}. Cannot shrink further.`)}if(this.geometry.index){const requiredIndexLength=Math.max(...validRanges.map(range=>range.indexStart+range.reservedIndexCount));if(requiredIndexLength>maxIndexCount){throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${maxIndexCount}. Cannot shrink further.`)}}const oldGeometry=this.geometry;oldGeometry.dispose();this._maxVertexCount=maxVertexCount;this._maxIndexCount=maxIndexCount;if(this._geometryInitialized){this._geometryInitialized=false;this.geometry=new BufferGeometry;this._initializeGeometry(oldGeometry)}const geometry=this.geometry;if(oldGeometry.index){copyArrayContents(oldGeometry.index.array,geometry.index.array)}for(const key in oldGeometry.attributes){copyArrayContents(oldGeometry.attributes[key].array,geometry.attributes[key].array)}}raycast(raycaster,intersects){const instanceInfo=this._instanceInfo;const geometryInfoList=this._geometryInfo;const matrixWorld=this.matrixWorld;const batchGeometry=this.geometry;_mesh.material=this.material;_mesh.geometry.index=batchGeometry.index;_mesh.geometry.attributes=batchGeometry.attributes;if(_mesh.geometry.boundingBox===null){_mesh.geometry.boundingBox=new Box3}if(_mesh.geometry.boundingSphere===null){_mesh.geometry.boundingSphere=new Sphere}for(let i=0,l=instanceInfo.length;i<l;i++){if(!instanceInfo[i].visible||!instanceInfo[i].active){continue}const geometryId=instanceInfo[i].geometryIndex;const geometryInfo=geometryInfoList[geometryId];_mesh.geometry.setDrawRange(geometryInfo.start,geometryInfo.count);this.getMatrixAt(i,_mesh.matrixWorld).premultiply(matrixWorld);this.getBoundingBoxAt(geometryId,_mesh.geometry.boundingBox);this.getBoundingSphereAt(geometryId,_mesh.geometry.boundingSphere);_mesh.raycast(raycaster,_batchIntersects);for(let j=0,l=_batchIntersects.length;j<l;j++){const intersect=_batchIntersects[j];intersect.object=this;intersect.batchId=i;intersects.push(intersect)}_batchIntersects.length=0}_mesh.material=null;_mesh.geometry.index=null;_mesh.geometry.attributes={};_mesh.geometry.setDrawRange(0,Infinity)}copy(source){super.copy(source);this.geometry=source.geometry.clone();this.perObjectFrustumCulled=source.perObjectFrustumCulled;this.sortObjects=source.sortObjects;this.boundingBox=source.boundingBox!==null?source.boundingBox.clone():null;this.boundingSphere=source.boundingSphere!==null?source.boundingSphere.clone():null;this._geometryInfo=source._geometryInfo.map(info=>({...info,boundingBox:info.boundingBox!==null?info.boundingBox.clone():null,boundingSphere:info.boundingSphere!==null?info.boundingSphere.clone():null}));this._instanceInfo=source._instanceInfo.map(info=>({...info}));this._availableInstanceIds=source._availableInstanceIds.slice();this._availableGeometryIds=source._availableGeometryIds.slice();this._nextIndexStart=source._nextIndexStart;this._nextVertexStart=source._nextVertexStart;this._geometryCount=source._geometryCount;this._maxInstanceCount=source._maxInstanceCount;this._maxVertexCount=source._maxVertexCount;this._maxIndexCount=source._maxIndexCount;this._geometryInitialized=source._geometryInitialized;this._multiDrawCounts=source._multiDrawCounts.slice();this._multiDrawStarts=source._multiDrawStarts.slice();this._indirectTexture=source._indirectTexture.clone();this._indirectTexture.image.data=this._indirectTexture.image.data.slice();this._matricesTexture=source._matricesTexture.clone();this._matricesTexture.image.data=this._matricesTexture.image.data.slice();if(this._colorsTexture!==null){this._colorsTexture=source._colorsTexture.clone();this._colorsTexture.image.data=this._colorsTexture.image.data.slice()}return this}dispose(){this.geometry.dispose();this._matricesTexture.dispose();this._matricesTexture=null;this._indirectTexture.dispose();this._indirectTexture=null;if(this._colorsTexture!==null){this._colorsTexture.dispose();this._colorsTexture=null}}onBeforeRender(renderer,scene,camera,geometry,material){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects){return}const index=geometry.getIndex();const bytesPerElement=index===null?1:index.array.BYTES_PER_ELEMENT;const instanceInfo=this._instanceInfo;const multiDrawStarts=this._multiDrawStarts;const multiDrawCounts=this._multiDrawCounts;const geometryInfoList=this._geometryInfo;const perObjectFrustumCulled=this.perObjectFrustumCulled;const indirectTexture=this._indirectTexture;const indirectArray=indirectTexture.image.data;const frustum=camera.isArrayCamera?_frustumArray:_frustum;if(perObjectFrustumCulled&&!camera.isArrayCamera){_matrix$1.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse).multiply(this.matrixWorld);_frustum.setFromProjectionMatrix(_matrix$1,camera.coordinateSystem,camera.reversedDepth)}let multiDrawCount=0;if(this.sortObjects){_matrix$1.copy(this.matrixWorld).invert();_vector$5.setFromMatrixPosition(camera.matrixWorld).applyMatrix4(_matrix$1);_forward$1.set(0,0,-1).transformDirection(camera.matrixWorld).transformDirection(_matrix$1);for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].visible&&instanceInfo[i].active){const geometryId=instanceInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);let culled=false;if(perObjectFrustumCulled){culled=!frustum.intersectsSphere(_sphere$2,camera)}if(!culled){const geometryInfo=geometryInfoList[geometryId];const z=_temp.subVectors(_sphere$2.center,_vector$5).dot(_forward$1);_renderList.push(geometryInfo.start,geometryInfo.count,z,i)}}}const list=_renderList.list;const customSort=this.customSort;if(customSort===null){list.sort(material.transparent?sortTransparent:sortOpaque)}else{customSort.call(this,list,camera)}for(let i=0,l=list.length;i<l;i++){const item=list[i];multiDrawStarts[multiDrawCount]=item.start*bytesPerElement;multiDrawCounts[multiDrawCount]=item.count;indirectArray[multiDrawCount]=item.index;multiDrawCount++}_renderList.reset()}else{for(let i=0,l=instanceInfo.length;i<l;i++){if(instanceInfo[i].visible&&instanceInfo[i].active){const geometryId=instanceInfo[i].geometryIndex;let culled=false;if(perObjectFrustumCulled){this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);culled=!frustum.intersectsSphere(_sphere$2,camera)}if(!culled){const geometryInfo=geometryInfoList[geometryId];multiDrawStarts[multiDrawCount]=geometryInfo.start*bytesPerElement;multiDrawCounts[multiDrawCount]=geometryInfo.count;indirectArray[multiDrawCount]=i;multiDrawCount++}}}}indirectTexture.needsUpdate=true;this._multiDrawCount=multiDrawCount;this._visibilityChanged=false}onBeforeShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial){this.onBeforeRender(renderer,null,shadowCamera,geometry,depthMaterial)}}class LineBasicMaterial extends Material{constructor(parameters){super();this.isLineBasicMaterial=true;this.type="LineBasicMaterial";this.color=new Color(16777215);this.map=null;this.linewidth=1;this.linecap="round";this.linejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.linewidth=source.linewidth;this.linecap=source.linecap;this.linejoin=source.linejoin;this.fog=source.fog;return this}}const _vStart=new Vector3;const _vEnd=new Vector3;const _inverseMatrix$1=new Matrix4;const _ray$1=new Ray;const _sphere$1=new Sphere;const _intersectPointOnRay=new Vector3;const _intersectPointOnSegment=new Vector3;class Line extends Object3D{constructor(geometry=new BufferGeometry,material=new LineBasicMaterial){super();this.isLine=true;this.type="Line";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}computeLineDistances(){const geometry=this.geometry;if(geometry.index===null){const positionAttribute=geometry.attributes.position;const lineDistances=[0];for(let i=1,l=positionAttribute.count;i<l;i++){_vStart.fromBufferAttribute(positionAttribute,i-1);_vEnd.fromBufferAttribute(positionAttribute,i);lineDistances[i]=lineDistances[i-1];lineDistances[i]+=_vStart.distanceTo(_vEnd)}geometry.setAttribute("lineDistance",new Float32BufferAttribute(lineDistances,1))}else{warn("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.")}return this}raycast(raycaster,intersects){const geometry=this.geometry;const matrixWorld=this.matrixWorld;const threshold=raycaster.params.Line.threshold;const drawRange=geometry.drawRange;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$1.copy(geometry.boundingSphere);_sphere$1.applyMatrix4(matrixWorld);_sphere$1.radius+=threshold;if(raycaster.ray.intersectsSphere(_sphere$1)===false)return;_inverseMatrix$1.copy(matrixWorld).invert();_ray$1.copy(raycaster.ray).applyMatrix4(_inverseMatrix$1);const localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3);const localThresholdSq=localThreshold*localThreshold;const step=this.isLineSegments?2:1;const index=geometry.index;const attributes=geometry.attributes;const positionAttribute=attributes.position;if(index!==null){const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,l=end-1;i<l;i+=step){const a=index.getX(i);const b=index.getX(i+1);const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,a,b,i);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const a=index.getX(end-1);const b=index.getX(start);const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,a,b,end-1);if(intersect){intersects.push(intersect)}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(let i=start,l=end-1;i<l;i+=step){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,i,i+1,i);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,end-1,start,end-1);if(intersect){intersects.push(intersect)}}}}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}}function checkIntersection(object,raycaster,ray,thresholdSq,a,b,i){const positionAttribute=object.geometry.attributes.position;_vStart.fromBufferAttribute(positionAttribute,a);_vEnd.fromBufferAttribute(positionAttribute,b);const distSq=ray.distanceSqToSegment(_vStart,_vEnd,_intersectPointOnRay,_intersectPointOnSegment);if(distSq>thresholdSq)return;_intersectPointOnRay.applyMatrix4(object.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_intersectPointOnRay);if(distance<raycaster.near||distance>raycaster.far)return;return{distance:distance,point:_intersectPointOnSegment.clone().applyMatrix4(object.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:object}}const _start=new Vector3;const _end=new Vector3;class LineSegments extends Line{constructor(geometry,material){super(geometry,material);this.isLineSegments=true;this.type="LineSegments"}computeLineDistances(){const geometry=this.geometry;if(geometry.index===null){const positionAttribute=geometry.attributes.position;const lineDistances=[];for(let i=0,l=positionAttribute.count;i<l;i+=2){_start.fromBufferAttribute(positionAttribute,i);_end.fromBufferAttribute(positionAttribute,i+1);lineDistances[i]=i===0?0:lineDistances[i-1];lineDistances[i+1]=lineDistances[i]+_start.distanceTo(_end)}geometry.setAttribute("lineDistance",new Float32BufferAttribute(lineDistances,1))}else{warn("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.")}return this}}class LineLoop extends Line{constructor(geometry,material){super(geometry,material);this.isLineLoop=true;this.type="LineLoop"}}class PointsMaterial extends Material{constructor(parameters){super();this.isPointsMaterial=true;this.type="PointsMaterial";this.color=new Color(16777215);this.map=null;this.alphaMap=null;this.size=1;this.sizeAttenuation=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.alphaMap=source.alphaMap;this.size=source.size;this.sizeAttenuation=source.sizeAttenuation;this.fog=source.fog;return this}}const _inverseMatrix=new Matrix4;const _ray=new Ray;const _sphere=new Sphere;const _position$2=new Vector3;class Points extends Object3D{constructor(geometry=new BufferGeometry,material=new PointsMaterial){super();this.isPoints=true;this.type="Points";this.geometry=geometry;this.material=material;this.morphTargetDictionary=undefined;this.morphTargetInfluences=undefined;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}raycast(raycaster,intersects){const geometry=this.geometry;const matrixWorld=this.matrixWorld;const threshold=raycaster.params.Points.threshold;const drawRange=geometry.drawRange;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere.copy(geometry.boundingSphere);_sphere.applyMatrix4(matrixWorld);_sphere.radius+=threshold;if(raycaster.ray.intersectsSphere(_sphere)===false)return;_inverseMatrix.copy(matrixWorld).invert();_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix);const localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3);const localThresholdSq=localThreshold*localThreshold;const index=geometry.index;const attributes=geometry.attributes;const positionAttribute=attributes.position;if(index!==null){const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i++){const a=index.getX(i);_position$2.fromBufferAttribute(positionAttribute,a);testPoint(_position$2,a,localThresholdSq,matrixWorld,raycaster,intersects,this)}}else{const start=Math.max(0,drawRange.start);const end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(let i=start,l=end;i<l;i++){_position$2.fromBufferAttribute(positionAttribute,i);testPoint(_position$2,i,localThresholdSq,matrixWorld,raycaster,intersects,this)}}}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}}function testPoint(point,index,localThresholdSq,matrixWorld,raycaster,intersects,object){const rayPointDistanceSq=_ray.distanceSqToPoint(point);if(rayPointDistanceSq<localThresholdSq){const intersectPoint=new Vector3;_ray.closestPointToPoint(point,intersectPoint);intersectPoint.applyMatrix4(matrixWorld);const distance=raycaster.ray.origin.distanceTo(intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,distanceToRay:Math.sqrt(rayPointDistanceSq),point:intersectPoint,index:index,face:null,faceIndex:null,barycoord:null,object:object})}}class VideoTexture extends Texture{constructor(video,mapping,wrapS,wrapT,magFilter=LinearFilter,minFilter=LinearFilter,format,type,anisotropy){super(video,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isVideoTexture=true;this.generateMipmaps=false;this._requestVideoFrameCallbackId=0;const scope=this;function updateVideo(){scope.needsUpdate=true;scope._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo)}if("requestVideoFrameCallback"in video){this._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo)}}clone(){return new this.constructor(this.image).copy(this)}update(){const video=this.image;const hasVideoFrameCallback=("requestVideoFrameCallback"in video);if(hasVideoFrameCallback===false&&video.readyState>=video.HAVE_CURRENT_DATA){this.needsUpdate=true}}dispose(){if(this._requestVideoFrameCallbackId!==0){this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId);this._requestVideoFrameCallbackId=0}super.dispose()}}class VideoFrameTexture extends VideoTexture{constructor(mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super({},mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isVideoFrameTexture=true}update(){}clone(){return new this.constructor().copy(this)}setFrame(frame){this.image=frame;this.needsUpdate=true}}class FramebufferTexture extends Texture{constructor(width,height){super({width,height});this.isFramebufferTexture=true;this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.generateMipmaps=false;this.needsUpdate=true}}class CompressedTexture extends Texture{constructor(mipmaps,width,height,format,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isCompressedTexture=true;this.image={width:width,height:height};this.mipmaps=mipmaps;this.flipY=false;this.generateMipmaps=false}}class CompressedArrayTexture extends CompressedTexture{constructor(mipmaps,width,height,depth,format,type){super(mipmaps,width,height,format,type);this.isCompressedArrayTexture=true;this.image.depth=depth;this.wrapR=ClampToEdgeWrapping;this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}}class CompressedCubeTexture extends CompressedTexture{constructor(images,format,type){super(undefined,images[0].width,images[0].height,format,type,CubeReflectionMapping);this.isCompressedCubeTexture=true;this.isCubeTexture=true;this.image=images}}class CanvasTexture extends Texture{constructor(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isCanvasTexture=true;this.needsUpdate=true}}class DepthTexture extends Texture{constructor(width,height,type=UnsignedIntType,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,format=DepthFormat,depth=1){if(format!==DepthFormat&&format!==DepthStencilFormat){throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat")}const image={width:width,height:height,depth:depth};super(image,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isDepthTexture=true;this.flipY=false;this.generateMipmaps=false;this.compareFunction=null}copy(source){super.copy(source);this.source=new Source(Object.assign({},source.image));this.compareFunction=source.compareFunction;return this}toJSON(meta){const data=super.toJSON(meta);if(this.compareFunction!==null)data.compareFunction=this.compareFunction;return data}}class CubeDepthTexture extends DepthTexture{constructor(size,type=UnsignedIntType,mapping=CubeReflectionMapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,format=DepthFormat){const image={width:size,height:size,depth:1};const images=[image,image,image,image,image,image];super(size,size,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,format);this.image=images;this.isCubeDepthTexture=true;this.isCubeTexture=true}get images(){return this.image}set images(value){this.image=value}}class ExternalTexture extends Texture{constructor(sourceTexture=null){super();this.sourceTexture=sourceTexture;this.isExternalTexture=true}copy(source){super.copy(source);this.sourceTexture=source.sourceTexture;return this}}class CapsuleGeometry extends BufferGeometry{constructor(radius=1,height=1,capSegments=4,radialSegments=8,heightSegments=1){super();this.type="CapsuleGeometry";this.parameters={radius:radius,height:height,capSegments:capSegments,radialSegments:radialSegments,heightSegments:heightSegments};height=Math.max(0,height);capSegments=Math.max(1,Math.floor(capSegments));radialSegments=Math.max(3,Math.floor(radialSegments));heightSegments=Math.max(1,Math.floor(heightSegments));const indices=[];const vertices=[];const normals=[];const uvs=[];const halfHeight=height/2;const capArcLength=Math.PI/2*radius;const cylinderPartLength=height;const totalArcLength=2*capArcLength+cylinderPartLength;const numVerticalSegments=capSegments*2+heightSegments;const verticesPerRow=radialSegments+1;const normal=new Vector3;const vertex=new Vector3;for(let iy=0;iy<=numVerticalSegments;iy++){let currentArcLength=0;let profileY=0;let profileRadius=0;let normalYComponent=0;if(iy<=capSegments){const segmentProgress=iy/capSegments;const angle=segmentProgress*Math.PI/2;profileY=-halfHeight-radius*Math.cos(angle);profileRadius=radius*Math.sin(angle);normalYComponent=-radius*Math.cos(angle);currentArcLength=segmentProgress*capArcLength}else if(iy<=capSegments+heightSegments){const segmentProgress=(iy-capSegments)/heightSegments;profileY=-halfHeight+segmentProgress*height;profileRadius=radius;normalYComponent=0;currentArcLength=capArcLength+segmentProgress*cylinderPartLength}else{const segmentProgress=(iy-capSegments-heightSegments)/capSegments;const angle=segmentProgress*Math.PI/2;profileY=halfHeight+radius*Math.sin(angle);profileRadius=radius*Math.cos(angle);normalYComponent=radius*Math.sin(angle);currentArcLength=capArcLength+cylinderPartLength+segmentProgress*capArcLength}const v=Math.max(0,Math.min(1,currentArcLength/totalArcLength));let uOffset=0;if(iy===0){uOffset=0.5/radialSegments}else if(iy===numVerticalSegments){uOffset=-0.5/radialSegments}for(let ix=0;ix<=radialSegments;ix++){const u=ix/radialSegments;const theta=u*Math.PI*2;const sinTheta=Math.sin(theta);const cosTheta=Math.cos(theta);vertex.x=-profileRadius*cosTheta;vertex.y=profileY;vertex.z=profileRadius*sinTheta;vertices.push(vertex.x,vertex.y,vertex.z);normal.set(-profileRadius*cosTheta,normalYComponent,profileRadius*sinTheta);normal.normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u+uOffset,v)}if(iy>0){const prevIndexRow=(iy-1)*verticesPerRow;for(let ix=0;ix<radialSegments;ix++){const i1=prevIndexRow+ix;const i2=prevIndexRow+ix+1;const i3=iy*verticesPerRow+ix;const i4=iy*verticesPerRow+ix+1;indices.push(i1,i2,i3);indices.push(i2,i4,i3)}}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CapsuleGeometry(data.radius,data.height,data.capSegments,data.radialSegments,data.heightSegments)}}class CircleGeometry extends BufferGeometry{constructor(radius=1,segments=32,thetaStart=0,thetaLength=Math.PI*2){super();this.type="CircleGeometry";this.parameters={radius:radius,segments:segments,thetaStart:thetaStart,thetaLength:thetaLength};segments=Math.max(3,segments);const indices=[];const vertices=[];const normals=[];const uvs=[];const vertex=new Vector3;const uv=new Vector2;vertices.push(0,0,0);normals.push(0,0,1);uvs.push(0.5,0.5);for(let s=0,i=3;s<=segments;s++,i+=3){const segment=thetaStart+s/segments*thetaLength;vertex.x=radius*Math.cos(segment);vertex.y=radius*Math.sin(segment);vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,0,1);uv.x=(vertices[i]/radius+1)/2;uv.y=(vertices[i+1]/radius+1)/2;uvs.push(uv.x,uv.y)}for(let i=1;i<=segments;i++){indices.push(i,i+1,0)}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CircleGeometry(data.radius,data.segments,data.thetaStart,data.thetaLength)}}class CylinderGeometry extends BufferGeometry{constructor(radiusTop=1,radiusBottom=1,height=1,radialSegments=32,heightSegments=1,openEnded=false,thetaStart=0,thetaLength=Math.PI*2){super();this.type="CylinderGeometry";this.parameters={radiusTop:radiusTop,radiusBottom:radiusBottom,height:height,radialSegments:radialSegments,heightSegments:heightSegments,openEnded:openEnded,thetaStart:thetaStart,thetaLength:thetaLength};const scope=this;radialSegments=Math.floor(radialSegments);heightSegments=Math.floor(heightSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let index=0;const indexArray=[];const halfHeight=height/2;let groupStart=0;generateTorso();if(openEnded===false){if(radiusTop>0)generateCap(true);if(radiusBottom>0)generateCap(false)}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function generateTorso(){const normal=new Vector3;const vertex=new Vector3;let groupCount=0;const slope=(radiusBottom-radiusTop)/height;for(let y=0;y<=heightSegments;y++){const indexRow=[];const v=y/heightSegments;const radius=v*(radiusBottom-radiusTop)+radiusTop;for(let x=0;x<=radialSegments;x++){const u=x/radialSegments;const theta=u*thetaLength+thetaStart;const sinTheta=Math.sin(theta);const cosTheta=Math.cos(theta);vertex.x=radius*sinTheta;vertex.y=-v*height+halfHeight;vertex.z=radius*cosTheta;vertices.push(vertex.x,vertex.y,vertex.z);normal.set(sinTheta,slope,cosTheta).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u,1-v);indexRow.push(index++)}indexArray.push(indexRow)}for(let x=0;x<radialSegments;x++){for(let y=0;y<heightSegments;y++){const a=indexArray[y][x];const b=indexArray[y+1][x];const c=indexArray[y+1][x+1];const d=indexArray[y][x+1];if(radiusTop>0||y!==0){indices.push(a,b,d);groupCount+=3}if(radiusBottom>0||y!==heightSegments-1){indices.push(b,c,d);groupCount+=3}}}scope.addGroup(groupStart,groupCount,0);groupStart+=groupCount}function generateCap(top){const centerIndexStart=index;const uv=new Vector2;const vertex=new Vector3;let groupCount=0;const radius=top===true?radiusTop:radiusBottom;const sign=top===true?1:-1;for(let x=1;x<=radialSegments;x++){vertices.push(0,halfHeight*sign,0);normals.push(0,sign,0);uvs.push(0.5,0.5);index++}const centerIndexEnd=index;for(let x=0;x<=radialSegments;x++){const u=x/radialSegments;const theta=u*thetaLength+thetaStart;const cosTheta=Math.cos(theta);const sinTheta=Math.sin(theta);vertex.x=radius*sinTheta;vertex.y=halfHeight*sign;vertex.z=radius*cosTheta;vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,sign,0);uv.x=cosTheta*0.5+0.5;uv.y=sinTheta*0.5*sign+0.5;uvs.push(uv.x,uv.y);index++}for(let x=0;x<radialSegments;x++){const c=centerIndexStart+x;const i=centerIndexEnd+x;if(top===true){indices.push(i,i+1,c)}else{indices.push(i+1,i,c)}groupCount+=3}scope.addGroup(groupStart,groupCount,top===true?1:2);groupStart+=groupCount}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CylinderGeometry(data.radiusTop,data.radiusBottom,data.height,data.radialSegments,data.heightSegments,data.openEnded,data.thetaStart,data.thetaLength)}}class ConeGeometry extends CylinderGeometry{constructor(radius=1,height=1,radialSegments=32,heightSegments=1,openEnded=false,thetaStart=0,thetaLength=Math.PI*2){super(0,radius,height,radialSegments,heightSegments,openEnded,thetaStart,thetaLength);this.type="ConeGeometry";this.parameters={radius:radius,height:height,radialSegments:radialSegments,heightSegments:heightSegments,openEnded:openEnded,thetaStart:thetaStart,thetaLength:thetaLength}}static fromJSON(data){return new ConeGeometry(data.radius,data.height,data.radialSegments,data.heightSegments,data.openEnded,data.thetaStart,data.thetaLength)}}class PolyhedronGeometry extends BufferGeometry{constructor(vertices=[],indices=[],radius=1,detail=0){super();this.type="PolyhedronGeometry";this.parameters={vertices:vertices,indices:indices,radius:radius,detail:detail};const vertexBuffer=[];const uvBuffer=[];subdivide(detail);applyRadius(radius);generateUVs();this.setAttribute("position",new Float32BufferAttribute(vertexBuffer,3));this.setAttribute("normal",new Float32BufferAttribute(vertexBuffer.slice(),3));this.setAttribute("uv",new Float32BufferAttribute(uvBuffer,2));if(detail===0){this.computeVertexNormals()}else{this.normalizeNormals()}function subdivide(detail){const a=new Vector3;const b=new Vector3;const c=new Vector3;for(let i=0;i<indices.length;i+=3){getVertexByIndex(indices[i+0],a);getVertexByIndex(indices[i+1],b);getVertexByIndex(indices[i+2],c);subdivideFace(a,b,c,detail)}}function subdivideFace(a,b,c,detail){const cols=detail+1;const v=[];for(let i=0;i<=cols;i++){v[i]=[];const aj=a.clone().lerp(c,i/cols);const bj=b.clone().lerp(c,i/cols);const rows=cols-i;for(let j=0;j<=rows;j++){if(j===0&&i===cols){v[i][j]=aj}else{v[i][j]=aj.clone().lerp(bj,j/rows)}}}for(let i=0;i<cols;i++){for(let j=0;j<2*(cols-i)-1;j++){const k=Math.floor(j/2);if(j%2===0){pushVertex(v[i][k+1]);pushVertex(v[i+1][k]);pushVertex(v[i][k])}else{pushVertex(v[i][k+1]);pushVertex(v[i+1][k+1]);pushVertex(v[i+1][k])}}}}function applyRadius(radius){const vertex=new Vector3;for(let i=0;i<vertexBuffer.length;i+=3){vertex.x=vertexBuffer[i+0];vertex.y=vertexBuffer[i+1];vertex.z=vertexBuffer[i+2];vertex.normalize().multiplyScalar(radius);vertexBuffer[i+0]=vertex.x;vertexBuffer[i+1]=vertex.y;vertexBuffer[i+2]=vertex.z}}function generateUVs(){const vertex=new Vector3;for(let i=0;i<vertexBuffer.length;i+=3){vertex.x=vertexBuffer[i+0];vertex.y=vertexBuffer[i+1];vertex.z=vertexBuffer[i+2];const u=azimuth(vertex)/2/Math.PI+0.5;const v=inclination(vertex)/Math.PI+0.5;uvBuffer.push(u,1-v)}correctUVs();correctSeam()}function correctSeam(){for(let i=0;i<uvBuffer.length;i+=6){const x0=uvBuffer[i+0];const x1=uvBuffer[i+2];const x2=uvBuffer[i+4];const max=Math.max(x0,x1,x2);const min=Math.min(x0,x1,x2);if(max>0.9&&min<0.1){if(x0<0.2)uvBuffer[i+0]+=1;if(x1<0.2)uvBuffer[i+2]+=1;if(x2<0.2)uvBuffer[i+4]+=1}}}function pushVertex(vertex){vertexBuffer.push(vertex.x,vertex.y,vertex.z)}function getVertexByIndex(index,vertex){const stride=index*3;vertex.x=vertices[stride+0];vertex.y=vertices[stride+1];vertex.z=vertices[stride+2]}function correctUVs(){const a=new Vector3;const b=new Vector3;const c=new Vector3;const centroid=new Vector3;const uvA=new Vector2;const uvB=new Vector2;const uvC=new Vector2;for(let i=0,j=0;i<vertexBuffer.length;i+=9,j+=6){a.set(vertexBuffer[i+0],vertexBuffer[i+1],vertexBuffer[i+2]);b.set(vertexBuffer[i+3],vertexBuffer[i+4],vertexBuffer[i+5]);c.set(vertexBuffer[i+6],vertexBuffer[i+7],vertexBuffer[i+8]);uvA.set(uvBuffer[j+0],uvBuffer[j+1]);uvB.set(uvBuffer[j+2],uvBuffer[j+3]);uvC.set(uvBuffer[j+4],uvBuffer[j+5]);centroid.copy(a).add(b).add(c).divideScalar(3);const azi=azimuth(centroid);correctUV(uvA,j+0,a,azi);correctUV(uvB,j+2,b,azi);correctUV(uvC,j+4,c,azi)}}function correctUV(uv,stride,vector,azimuth){if(azimuth<0&&uv.x===1){uvBuffer[stride]=uv.x-1}if(vector.x===0&&vector.z===0){uvBuffer[stride]=azimuth/2/Math.PI+0.5}}function azimuth(vector){return Math.atan2(vector.z,-vector.x)}function inclination(vector){return Math.atan2(-vector.y,Math.sqrt(vector.x*vector.x+vector.z*vector.z))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new PolyhedronGeometry(data.vertices,data.indices,data.radius,data.detail)}}class DodecahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const t=(1+Math.sqrt(5))/2;const r=1/t;const vertices=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-t,0,-r,t,0,r,-t,0,r,t,-r,-t,0,-r,t,0,r,-t,0,r,t,0,-t,0,-r,t,0,-r,-t,0,r,t,0,r];const indices=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(vertices,indices,radius,detail);this.type="DodecahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new DodecahedronGeometry(data.radius,data.detail)}}const _v0$1=new Vector3;const _v1$1=new Vector3;const _normal=new Vector3;const _triangle=new Triangle;class EdgesGeometry extends BufferGeometry{constructor(geometry=null,thresholdAngle=1){super();this.type="EdgesGeometry";this.parameters={geometry:geometry,thresholdAngle:thresholdAngle};if(geometry!==null){const precisionPoints=4;const precision=Math.pow(10,precisionPoints);const thresholdDot=Math.cos(DEG2RAD*thresholdAngle);const indexAttr=geometry.getIndex();const positionAttr=geometry.getAttribute("position");const indexCount=indexAttr?indexAttr.count:positionAttr.count;const indexArr=[0,0,0];const vertKeys=["a","b","c"];const hashes=new Array(3);const edgeData={};const vertices=[];for(let i=0;i<indexCount;i+=3){if(indexAttr){indexArr[0]=indexAttr.getX(i);indexArr[1]=indexAttr.getX(i+1);indexArr[2]=indexAttr.getX(i+2)}else{indexArr[0]=i;indexArr[1]=i+1;indexArr[2]=i+2}const{a,b,c}=_triangle;a.fromBufferAttribute(positionAttr,indexArr[0]);b.fromBufferAttribute(positionAttr,indexArr[1]);c.fromBufferAttribute(positionAttr,indexArr[2]);_triangle.getNormal(_normal);hashes[0]=`${Math.round(a.x*precision)},${Math.round(a.y*precision)},${Math.round(a.z*precision)}`;hashes[1]=`${Math.round(b.x*precision)},${Math.round(b.y*precision)},${Math.round(b.z*precision)}`;hashes[2]=`${Math.round(c.x*precision)},${Math.round(c.y*precision)},${Math.round(c.z*precision)}`;if(hashes[0]===hashes[1]||hashes[1]===hashes[2]||hashes[2]===hashes[0]){continue}for(let j=0;j<3;j++){const jNext=(j+1)%3;const vecHash0=hashes[j];const vecHash1=hashes[jNext];const v0=_triangle[vertKeys[j]];const v1=_triangle[vertKeys[jNext]];const hash=`${vecHash0}_${vecHash1}`;const reverseHash=`${vecHash1}_${vecHash0}`;if(reverseHash in edgeData&&edgeData[reverseHash]){if(_normal.dot(edgeData[reverseHash].normal)<=thresholdDot){vertices.push(v0.x,v0.y,v0.z);vertices.push(v1.x,v1.y,v1.z)}edgeData[reverseHash]=null}else if(!(hash in edgeData)){edgeData[hash]={index0:indexArr[j],index1:indexArr[jNext],normal:_normal.clone()}}}}for(const key in edgeData){if(edgeData[key]){const{index0,index1}=edgeData[key];_v0$1.fromBufferAttribute(positionAttr,index0);_v1$1.fromBufferAttribute(positionAttr,index1);vertices.push(_v0$1.x,_v0$1.y,_v0$1.z);vertices.push(_v1$1.x,_v1$1.y,_v1$1.z)}}this.setAttribute("position",new Float32BufferAttribute(vertices,3))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}}class Curve{constructor(){this.type="Curve";this.arcLengthDivisions=200;this.needsUpdate=false;this.cacheArcLengths=null}getPoint(){warn("Curve: .getPoint() not implemented.")}getPointAt(u,optionalTarget){const t=this.getUtoTmapping(u);return this.getPoint(t,optionalTarget)}getPoints(divisions=5){const points=[];for(let d=0;d<=divisions;d++){points.push(this.getPoint(d/divisions))}return points}getSpacedPoints(divisions=5){const points=[];for(let d=0;d<=divisions;d++){points.push(this.getPointAt(d/divisions))}return points}getLength(){const lengths=this.getLengths();return lengths[lengths.length-1]}getLengths(divisions=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===divisions+1&&!this.needsUpdate){return this.cacheArcLengths}this.needsUpdate=false;const cache=[];let current,last=this.getPoint(0);let sum=0;cache.push(0);for(let p=1;p<=divisions;p++){current=this.getPoint(p/divisions);sum+=current.distanceTo(last);cache.push(sum);last=current}this.cacheArcLengths=cache;return cache}updateArcLengths(){this.needsUpdate=true;this.getLengths()}getUtoTmapping(u,distance=null){const arcLengths=this.getLengths();let i=0;const il=arcLengths.length;let targetArcLength;if(distance){targetArcLength=distance}else{targetArcLength=u*arcLengths[il-1]}let low=0,high=il-1,comparison;while(low<=high){i=Math.floor(low+(high-low)/2);comparison=arcLengths[i]-targetArcLength;if(comparison<0){low=i+1}else if(comparison>0){high=i-1}else{high=i;break}}i=high;if(arcLengths[i]===targetArcLength){return i/(il-1)}const lengthBefore=arcLengths[i];const lengthAfter=arcLengths[i+1];const segmentLength=lengthAfter-lengthBefore;const segmentFraction=(targetArcLength-lengthBefore)/segmentLength;const t=(i+segmentFraction)/(il-1);return t}getTangent(t,optionalTarget){const delta=0.0001;let t1=t-delta;let t2=t+delta;if(t1<0)t1=0;if(t2>1)t2=1;const pt1=this.getPoint(t1);const pt2=this.getPoint(t2);const tangent=optionalTarget||(pt1.isVector2?new Vector2:new Vector3);tangent.copy(pt2).sub(pt1).normalize();return tangent}getTangentAt(u,optionalTarget){const t=this.getUtoTmapping(u);return this.getTangent(t,optionalTarget)}computeFrenetFrames(segments,closed=false){const normal=new Vector3;const tangents=[];const normals=[];const binormals=[];const vec=new Vector3;const mat=new Matrix4;for(let i=0;i<=segments;i++){const u=i/segments;tangents[i]=this.getTangentAt(u,new Vector3)}normals[0]=new Vector3;binormals[0]=new Vector3;let min=Number.MAX_VALUE;const tx=Math.abs(tangents[0].x);const ty=Math.abs(tangents[0].y);const tz=Math.abs(tangents[0].z);if(tx<=min){min=tx;normal.set(1,0,0)}if(ty<=min){min=ty;normal.set(0,1,0)}if(tz<=min){normal.set(0,0,1)}vec.crossVectors(tangents[0],normal).normalize();normals[0].crossVectors(tangents[0],vec);binormals[0].crossVectors(tangents[0],normals[0]);for(let i=1;i<=segments;i++){normals[i]=normals[i-1].clone();binormals[i]=binormals[i-1].clone();vec.crossVectors(tangents[i-1],tangents[i]);if(vec.length()>Number.EPSILON){vec.normalize();const theta=Math.acos(clamp(tangents[i-1].dot(tangents[i]),-1,1));normals[i].applyMatrix4(mat.makeRotationAxis(vec,theta))}binormals[i].crossVectors(tangents[i],normals[i])}if(closed===true){let theta=Math.acos(clamp(normals[0].dot(normals[segments]),-1,1));theta/=segments;if(tangents[0].dot(vec.crossVectors(normals[0],normals[segments]))>0){theta=-theta}for(let i=1;i<=segments;i++){normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i],theta*i));binormals[i].crossVectors(tangents[i],normals[i])}}return{tangents:tangents,normals:normals,binormals:binormals}}clone(){return new this.constructor().copy(this)}copy(source){this.arcLengthDivisions=source.arcLengthDivisions;return this}toJSON(){const data={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};data.arcLengthDivisions=this.arcLengthDivisions;data.type=this.type;return data}fromJSON(json){this.arcLengthDivisions=json.arcLengthDivisions;return this}}class EllipseCurve extends Curve{constructor(aX=0,aY=0,xRadius=1,yRadius=1,aStartAngle=0,aEndAngle=Math.PI*2,aClockwise=false,aRotation=0){super();this.isEllipseCurve=true;this.type="EllipseCurve";this.aX=aX;this.aY=aY;this.xRadius=xRadius;this.yRadius=yRadius;this.aStartAngle=aStartAngle;this.aEndAngle=aEndAngle;this.aClockwise=aClockwise;this.aRotation=aRotation}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const twoPi=Math.PI*2;let deltaAngle=this.aEndAngle-this.aStartAngle;const samePoints=Math.abs(deltaAngle)<Number.EPSILON;while(deltaAngle<0)deltaAngle+=twoPi;while(deltaAngle>twoPi)deltaAngle-=twoPi;if(deltaAngle<Number.EPSILON){if(samePoints){deltaAngle=0}else{deltaAngle=twoPi}}if(this.aClockwise===true&&!samePoints){if(deltaAngle===twoPi){deltaAngle=-twoPi}else{deltaAngle=deltaAngle-twoPi}}const angle=this.aStartAngle+t*deltaAngle;let x=this.aX+this.xRadius*Math.cos(angle);let y=this.aY+this.yRadius*Math.sin(angle);if(this.aRotation!==0){const cos=Math.cos(this.aRotation);const sin=Math.sin(this.aRotation);const tx=x-this.aX;const ty=y-this.aY;x=tx*cos-ty*sin+this.aX;y=tx*sin+ty*cos+this.aY}return point.set(x,y)}copy(source){super.copy(source);this.aX=source.aX;this.aY=source.aY;this.xRadius=source.xRadius;this.yRadius=source.yRadius;this.aStartAngle=source.aStartAngle;this.aEndAngle=source.aEndAngle;this.aClockwise=source.aClockwise;this.aRotation=source.aRotation;return this}toJSON(){const data=super.toJSON();data.aX=this.aX;data.aY=this.aY;data.xRadius=this.xRadius;data.yRadius=this.yRadius;data.aStartAngle=this.aStartAngle;data.aEndAngle=this.aEndAngle;data.aClockwise=this.aClockwise;data.aRotation=this.aRotation;return data}fromJSON(json){super.fromJSON(json);this.aX=json.aX;this.aY=json.aY;this.xRadius=json.xRadius;this.yRadius=json.yRadius;this.aStartAngle=json.aStartAngle;this.aEndAngle=json.aEndAngle;this.aClockwise=json.aClockwise;this.aRotation=json.aRotation;return this}}class ArcCurve extends EllipseCurve{constructor(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){super(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise);this.isArcCurve=true;this.type="ArcCurve"}}function CubicPoly(){let c0=0,c1=0,c2=0,c3=0;function init(x0,x1,t0,t1){c0=x0;c1=t0;c2=-3*x0+3*x1-2*t0-t1;c3=2*x0-2*x1+t0+t1}return{initCatmullRom:function(x0,x1,x2,x3,tension){init(x1,x2,tension*(x2-x0),tension*(x3-x1))},initNonuniformCatmullRom:function(x0,x1,x2,x3,dt0,dt1,dt2){let t1=(x1-x0)/dt0-(x2-x0)/(dt0+dt1)+(x2-x1)/dt1;let t2=(x2-x1)/dt1-(x3-x1)/(dt1+dt2)+(x3-x2)/dt2;t1*=dt1;t2*=dt1;init(x1,x2,t1,t2)},calc:function(t){const t2=t*t;const t3=t2*t;return c0+c1*t+c2*t2+c3*t3}}}const tmp=new Vector3;const px=new CubicPoly;const py=new CubicPoly;const pz=new CubicPoly;class CatmullRomCurve3 extends Curve{constructor(points=[],closed=false,curveType="centripetal",tension=0.5){super();this.isCatmullRomCurve3=true;this.type="CatmullRomCurve3";this.points=points;this.closed=closed;this.curveType=curveType;this.tension=tension}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const points=this.points;const l=points.length;const p=(l-(this.closed?0:1))*t;let intPoint=Math.floor(p);let weight=p-intPoint;if(this.closed){intPoint+=intPoint>0?0:(Math.floor(Math.abs(intPoint)/l)+1)*l}else if(weight===0&&intPoint===l-1){intPoint=l-2;weight=1}let p0,p3;if(this.closed||intPoint>0){p0=points[(intPoint-1)%l]}else{tmp.subVectors(points[0],points[1]).add(points[0]);p0=tmp}const p1=points[intPoint%l];const p2=points[(intPoint+1)%l];if(this.closed||intPoint+2<l){p3=points[(intPoint+2)%l]}else{tmp.subVectors(points[l-1],points[l-2]).add(points[l-1]);p3=tmp}if(this.curveType==="centripetal"||this.curveType==="chordal"){const pow=this.curveType==="chordal"?0.5:0.25;let dt0=Math.pow(p0.distanceToSquared(p1),pow);let dt1=Math.pow(p1.distanceToSquared(p2),pow);let dt2=Math.pow(p2.distanceToSquared(p3),pow);if(dt1<1e-4)dt1=1;if(dt0<1e-4)dt0=dt1;if(dt2<1e-4)dt2=dt1;px.initNonuniformCatmullRom(p0.x,p1.x,p2.x,p3.x,dt0,dt1,dt2);py.initNonuniformCatmullRom(p0.y,p1.y,p2.y,p3.y,dt0,dt1,dt2);pz.initNonuniformCatmullRom(p0.z,p1.z,p2.z,p3.z,dt0,dt1,dt2)}else if(this.curveType==="catmullrom"){px.initCatmullRom(p0.x,p1.x,p2.x,p3.x,this.tension);py.initCatmullRom(p0.y,p1.y,p2.y,p3.y,this.tension);pz.initCatmullRom(p0.z,p1.z,p2.z,p3.z,this.tension)}point.set(px.calc(weight),py.calc(weight),pz.calc(weight));return point}copy(source){super.copy(source);this.points=[];for(let i=0,l=source.points.length;i<l;i++){const point=source.points[i];this.points.push(point.clone())}this.closed=source.closed;this.curveType=source.curveType;this.tension=source.tension;return this}toJSON(){const data=super.toJSON();data.points=[];for(let i=0,l=this.points.length;i<l;i++){const point=this.points[i];data.points.push(point.toArray())}data.closed=this.closed;data.curveType=this.curveType;data.tension=this.tension;return data}fromJSON(json){super.fromJSON(json);this.points=[];for(let i=0,l=json.points.length;i<l;i++){const point=json.points[i];this.points.push(new Vector3().fromArray(point))}this.closed=json.closed;this.curveType=json.curveType;this.tension=json.tension;return this}}function CatmullRom(t,p0,p1,p2,p3){const v0=(p2-p0)*0.5;const v1=(p3-p1)*0.5;const t2=t*t;const t3=t*t2;return(2*p1-2*p2+v0+v1)*t3+(-3*p1+3*p2-2*v0-v1)*t2+v0*t+p1}function QuadraticBezierP0(t,p){const k=1-t;return k*k*p}function QuadraticBezierP1(t,p){return 2*(1-t)*t*p}function QuadraticBezierP2(t,p){return t*t*p}function QuadraticBezier(t,p0,p1,p2){return QuadraticBezierP0(t,p0)+QuadraticBezierP1(t,p1)+QuadraticBezierP2(t,p2)}function CubicBezierP0(t,p){const k=1-t;return k*k*k*p}function CubicBezierP1(t,p){const k=1-t;return 3*k*k*t*p}function CubicBezierP2(t,p){return 3*(1-t)*t*t*p}function CubicBezierP3(t,p){return t*t*t*p}function CubicBezier(t,p0,p1,p2,p3){return CubicBezierP0(t,p0)+CubicBezierP1(t,p1)+CubicBezierP2(t,p2)+CubicBezierP3(t,p3)}class CubicBezierCurve extends Curve{constructor(v0=new Vector2,v1=new Vector2,v2=new Vector2,v3=new Vector2){super();this.isCubicBezierCurve=true;this.type="CubicBezierCurve";this.v0=v0;this.v1=v1;this.v2=v2;this.v3=v3}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2,v3=this.v3;point.set(CubicBezier(t,v0.x,v1.x,v2.x,v3.x),CubicBezier(t,v0.y,v1.y,v2.y,v3.y));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);this.v3.copy(source.v3);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();data.v3=this.v3.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);this.v3.fromArray(json.v3);return this}}class CubicBezierCurve3 extends Curve{constructor(v0=new Vector3,v1=new Vector3,v2=new Vector3,v3=new Vector3){super();this.isCubicBezierCurve3=true;this.type="CubicBezierCurve3";this.v0=v0;this.v1=v1;this.v2=v2;this.v3=v3}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2,v3=this.v3;point.set(CubicBezier(t,v0.x,v1.x,v2.x,v3.x),CubicBezier(t,v0.y,v1.y,v2.y,v3.y),CubicBezier(t,v0.z,v1.z,v2.z,v3.z));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);this.v3.copy(source.v3);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();data.v3=this.v3.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);this.v3.fromArray(json.v3);return this}}class LineCurve extends Curve{constructor(v1=new Vector2,v2=new Vector2){super();this.isLineCurve=true;this.type="LineCurve";this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;if(t===1){point.copy(this.v2)}else{point.copy(this.v2).sub(this.v1);point.multiplyScalar(t).add(this.v1)}return point}getPointAt(u,optionalTarget){return this.getPoint(u,optionalTarget)}getTangent(t,optionalTarget=new Vector2){return optionalTarget.subVectors(this.v2,this.v1).normalize()}getTangentAt(u,optionalTarget){return this.getTangent(u,optionalTarget)}copy(source){super.copy(source);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class LineCurve3 extends Curve{constructor(v1=new Vector3,v2=new Vector3){super();this.isLineCurve3=true;this.type="LineCurve3";this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;if(t===1){point.copy(this.v2)}else{point.copy(this.v2).sub(this.v1);point.multiplyScalar(t).add(this.v1)}return point}getPointAt(u,optionalTarget){return this.getPoint(u,optionalTarget)}getTangent(t,optionalTarget=new Vector3){return optionalTarget.subVectors(this.v2,this.v1).normalize()}getTangentAt(u,optionalTarget){return this.getTangent(u,optionalTarget)}copy(source){super.copy(source);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class QuadraticBezierCurve extends Curve{constructor(v0=new Vector2,v1=new Vector2,v2=new Vector2){super();this.isQuadraticBezierCurve=true;this.type="QuadraticBezierCurve";this.v0=v0;this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2;point.set(QuadraticBezier(t,v0.x,v1.x,v2.x),QuadraticBezier(t,v0.y,v1.y,v2.y));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class QuadraticBezierCurve3 extends Curve{constructor(v0=new Vector3,v1=new Vector3,v2=new Vector3){super();this.isQuadraticBezierCurve3=true;this.type="QuadraticBezierCurve3";this.v0=v0;this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2;point.set(QuadraticBezier(t,v0.x,v1.x,v2.x),QuadraticBezier(t,v0.y,v1.y,v2.y),QuadraticBezier(t,v0.z,v1.z,v2.z));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class SplineCurve extends Curve{constructor(points=[]){super();this.isSplineCurve=true;this.type="SplineCurve";this.points=points}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const points=this.points;const p=(points.length-1)*t;const intPoint=Math.floor(p);const weight=p-intPoint;const p0=points[intPoint===0?intPoint:intPoint-1];const p1=points[intPoint];const p2=points[intPoint>points.length-2?points.length-1:intPoint+1];const p3=points[intPoint>points.length-3?points.length-1:intPoint+2];point.set(CatmullRom(weight,p0.x,p1.x,p2.x,p3.x),CatmullRom(weight,p0.y,p1.y,p2.y,p3.y));return point}copy(source){super.copy(source);this.points=[];for(let i=0,l=source.points.length;i<l;i++){const point=source.points[i];this.points.push(point.clone())}return this}toJSON(){const data=super.toJSON();data.points=[];for(let i=0,l=this.points.length;i<l;i++){const point=this.points[i];data.points.push(point.toArray())}return data}fromJSON(json){super.fromJSON(json);this.points=[];for(let i=0,l=json.points.length;i<l;i++){const point=json.points[i];this.points.push(new Vector2().fromArray(point))}return this}}var Curves=Object.freeze({__proto__:null,ArcCurve:ArcCurve,CatmullRomCurve3:CatmullRomCurve3,CubicBezierCurve:CubicBezierCurve,CubicBezierCurve3:CubicBezierCurve3,EllipseCurve:EllipseCurve,LineCurve:LineCurve,LineCurve3:LineCurve3,QuadraticBezierCurve:QuadraticBezierCurve,QuadraticBezierCurve3:QuadraticBezierCurve3,SplineCurve:SplineCurve});class CurvePath extends Curve{constructor(){super();this.type="CurvePath";this.curves=[];this.autoClose=false}add(curve){this.curves.push(curve)}closePath(){const startPoint=this.curves[0].getPoint(0);const endPoint=this.curves[this.curves.length-1].getPoint(1);if(!startPoint.equals(endPoint)){const lineType=startPoint.isVector2===true?"LineCurve":"LineCurve3";this.curves.push(new Curves[lineType](endPoint,startPoint))}return this}getPoint(t,optionalTarget){const d=t*this.getLength();const curveLengths=this.getCurveLengths();let i=0;while(i<curveLengths.length){if(curveLengths[i]>=d){const diff=curveLengths[i]-d;const curve=this.curves[i];const segmentLength=curve.getLength();const u=segmentLength===0?0:1-diff/segmentLength;return curve.getPointAt(u,optionalTarget)}i++}return null}getLength(){const lens=this.getCurveLengths();return lens[lens.length-1]}updateArcLengths(){this.needsUpdate=true;this.cacheLengths=null;this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length){return this.cacheLengths}const lengths=[];let sums=0;for(let i=0,l=this.curves.length;i<l;i++){sums+=this.curves[i].getLength();lengths.push(sums)}this.cacheLengths=lengths;return lengths}getSpacedPoints(divisions=40){const points=[];for(let i=0;i<=divisions;i++){points.push(this.getPoint(i/divisions))}if(this.autoClose){points.push(points[0])}return points}getPoints(divisions=12){const points=[];let last;for(let i=0,curves=this.curves;i<curves.length;i++){const curve=curves[i];const resolution=curve.isEllipseCurve?divisions*2:curve.isLineCurve||curve.isLineCurve3?1:curve.isSplineCurve?divisions*curve.points.length:divisions;const pts=curve.getPoints(resolution);for(let j=0;j<pts.length;j++){const point=pts[j];if(last&&last.equals(point))continue;points.push(point);last=point}}if(this.autoClose&&points.length>1&&!points[points.length-1].equals(points[0])){points.push(points[0])}return points}copy(source){super.copy(source);this.curves=[];for(let i=0,l=source.curves.length;i<l;i++){const curve=source.curves[i];this.curves.push(curve.clone())}this.autoClose=source.autoClose;return this}toJSON(){const data=super.toJSON();data.autoClose=this.autoClose;data.curves=[];for(let i=0,l=this.curves.length;i<l;i++){const curve=this.curves[i];data.curves.push(curve.toJSON())}return data}fromJSON(json){super.fromJSON(json);this.autoClose=json.autoClose;this.curves=[];for(let i=0,l=json.curves.length;i<l;i++){const curve=json.curves[i];this.curves.push(new Curves[curve.type]().fromJSON(curve))}return this}}class Path extends CurvePath{constructor(points){super();this.type="Path";this.currentPoint=new Vector2;if(points){this.setFromPoints(points)}}setFromPoints(points){this.moveTo(points[0].x,points[0].y);for(let i=1,l=points.length;i<l;i++){this.lineTo(points[i].x,points[i].y)}return this}moveTo(x,y){this.currentPoint.set(x,y);return this}lineTo(x,y){const curve=new LineCurve(this.currentPoint.clone(),new Vector2(x,y));this.curves.push(curve);this.currentPoint.set(x,y);return this}quadraticCurveTo(aCPx,aCPy,aX,aY){const curve=new QuadraticBezierCurve(this.currentPoint.clone(),new Vector2(aCPx,aCPy),new Vector2(aX,aY));this.curves.push(curve);this.currentPoint.set(aX,aY);return this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){const curve=new CubicBezierCurve(this.currentPoint.clone(),new Vector2(aCP1x,aCP1y),new Vector2(aCP2x,aCP2y),new Vector2(aX,aY));this.curves.push(curve);this.currentPoint.set(aX,aY);return this}splineThru(pts){const npts=[this.currentPoint.clone()].concat(pts);const curve=new SplineCurve(npts);this.curves.push(curve);this.currentPoint.copy(pts[pts.length-1]);return this}arc(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){const x0=this.currentPoint.x;const y0=this.currentPoint.y;this.absarc(aX+x0,aY+y0,aRadius,aStartAngle,aEndAngle,aClockwise);return this}absarc(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){this.absellipse(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise);return this}ellipse(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation){const x0=this.currentPoint.x;const y0=this.currentPoint.y;this.absellipse(aX+x0,aY+y0,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation);return this}absellipse(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation){const curve=new EllipseCurve(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation);if(this.curves.length>0){const firstPoint=curve.getPoint(0);if(!firstPoint.equals(this.currentPoint)){this.lineTo(firstPoint.x,firstPoint.y)}}this.curves.push(curve);const lastPoint=curve.getPoint(1);this.currentPoint.copy(lastPoint);return this}copy(source){super.copy(source);this.currentPoint.copy(source.currentPoint);return this}toJSON(){const data=super.toJSON();data.currentPoint=this.currentPoint.toArray();return data}fromJSON(json){super.fromJSON(json);this.currentPoint.fromArray(json.currentPoint);return this}}class Shape extends Path{constructor(points){super(points);this.uuid=generateUUID();this.type="Shape";this.holes=[]}getPointsHoles(divisions){const holesPts=[];for(let i=0,l=this.holes.length;i<l;i++){holesPts[i]=this.holes[i].getPoints(divisions)}return holesPts}extractPoints(divisions){return{shape:this.getPoints(divisions),holes:this.getPointsHoles(divisions)}}copy(source){super.copy(source);this.holes=[];for(let i=0,l=source.holes.length;i<l;i++){const hole=source.holes[i];this.holes.push(hole.clone())}return this}toJSON(){const data=super.toJSON();data.uuid=this.uuid;data.holes=[];for(let i=0,l=this.holes.length;i<l;i++){const hole=this.holes[i];data.holes.push(hole.toJSON())}return data}fromJSON(json){super.fromJSON(json);this.uuid=json.uuid;this.holes=[];for(let i=0,l=json.holes.length;i<l;i++){const hole=json.holes[i];this.holes.push(new Path().fromJSON(hole))}return this}}function earcut(data,holeIndices,dim=2){const hasHoles=holeIndices&&holeIndices.length;const outerLen=hasHoles?holeIndices[0]*dim:data.length;let outerNode=linkedList(data,0,outerLen,dim,true);const triangles=[];if(!outerNode||outerNode.next===outerNode.prev)return triangles;let minX,minY,invSize;if(hasHoles)outerNode=eliminateHoles(data,holeIndices,outerNode,dim);if(data.length>80*dim){minX=data[0];minY=data[1];let maxX=minX;let maxY=minY;for(let i=dim;i<outerLen;i+=dim){const x=data[i];const y=data[i+1];if(x<minX)minX=x;if(y<minY)minY=y;if(x>maxX)maxX=x;if(y>maxY)maxY=y}invSize=Math.max(maxX-minX,maxY-minY);invSize=invSize!==0?32767/invSize:0}earcutLinked(outerNode,triangles,dim,minX,minY,invSize,0);return triangles}function linkedList(data,start,end,dim,clockwise){let last;if(clockwise===signedArea(data,start,end,dim)>0){for(let i=start;i<end;i+=dim)last=insertNode(i/dim|0,data[i],data[i+1],last)}else{for(let i=end-dim;i>=start;i-=dim)last=insertNode(i/dim|0,data[i],data[i+1],last)}if(last&&equals(last,last.next)){removeNode(last);last=last.next}return last}function filterPoints(start,end){if(!start)return start;if(!end)end=start;let p=start,again;do{again=false;if(!p.steiner&&(equals(p,p.next)||area(p.prev,p,p.next)===0)){removeNode(p);p=end=p.prev;if(p===p.next)break;again=true}else{p=p.next}}while(again||p!==end);return end}function earcutLinked(ear,triangles,dim,minX,minY,invSize,pass){if(!ear)return;if(!pass&&invSize)indexCurve(ear,minX,minY,invSize);let stop=ear;while(ear.prev!==ear.next){const prev=ear.prev;const next=ear.next;if(invSize?isEarHashed(ear,minX,minY,invSize):isEar(ear)){triangles.push(prev.i,ear.i,next.i);removeNode(ear);ear=next.next;stop=next.next;continue}ear=next;if(ear===stop){if(!pass){earcutLinked(filterPoints(ear),triangles,dim,minX,minY,invSize,1)}else if(pass===1){ear=cureLocalIntersections(filterPoints(ear),triangles);earcutLinked(ear,triangles,dim,minX,minY,invSize,2)}else if(pass===2){splitEarcut(ear,triangles,dim,minX,minY,invSize)}break}}}function isEar(ear){const a=ear.prev,b=ear,c=ear.next;if(area(a,b,c)>=0)return false;const ax=a.x,bx=b.x,cx=c.x,ay=a.y,by=b.y,cy=c.y;const x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy);let p=c.next;while(p!==a){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.next}return true}function isEarHashed(ear,minX,minY,invSize){const a=ear.prev,b=ear,c=ear.next;if(area(a,b,c)>=0)return false;const ax=a.x,bx=b.x,cx=c.x,ay=a.y,by=b.y,cy=c.y;const x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy);const minZ=zOrder(x0,y0,minX,minY,invSize),maxZ=zOrder(x1,y1,minX,minY,invSize);let p=ear.prevZ,n=ear.nextZ;while(p&&p.z>=minZ&&n&&n.z<=maxZ){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&p!==a&&p!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.prevZ;if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a&&n!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return false;n=n.nextZ}while(p&&p.z>=minZ){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&p!==a&&p!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.prevZ}while(n&&n.z<=maxZ){if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a&&n!==c&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return false;n=n.nextZ}return true}function cureLocalIntersections(start,triangles){let p=start;do{const a=p.prev,b=p.next.next;if(!equals(a,b)&&intersects(a,p,p.next,b)&&locallyInside(a,b)&&locallyInside(b,a)){triangles.push(a.i,p.i,b.i);removeNode(p);removeNode(p.next);p=start=b}p=p.next}while(p!==start);return filterPoints(p)}function splitEarcut(start,triangles,dim,minX,minY,invSize){let a=start;do{let b=a.next.next;while(b!==a.prev){if(a.i!==b.i&&isValidDiagonal(a,b)){let c=splitPolygon(a,b);a=filterPoints(a,a.next);c=filterPoints(c,c.next);earcutLinked(a,triangles,dim,minX,minY,invSize,0);earcutLinked(c,triangles,dim,minX,minY,invSize,0);return}b=b.next}a=a.next}while(a!==start)}function eliminateHoles(data,holeIndices,outerNode,dim){const queue=[];for(let i=0,len=holeIndices.length;i<len;i++){const start=holeIndices[i]*dim;const end=i<len-1?holeIndices[i+1]*dim:data.length;const list=linkedList(data,start,end,dim,false);if(list===list.next)list.steiner=true;queue.push(getLeftmost(list))}queue.sort(compareXYSlope);for(let i=0;i<queue.length;i++){outerNode=eliminateHole(queue[i],outerNode)}return outerNode}function compareXYSlope(a,b){let result=a.x-b.x;if(result===0){result=a.y-b.y;if(result===0){const aSlope=(a.next.y-a.y)/(a.next.x-a.x);const bSlope=(b.next.y-b.y)/(b.next.x-b.x);result=aSlope-bSlope}}return result}function eliminateHole(hole,outerNode){const bridge=findHoleBridge(hole,outerNode);if(!bridge){return outerNode}const bridgeReverse=splitPolygon(bridge,hole);filterPoints(bridgeReverse,bridgeReverse.next);return filterPoints(bridge,bridge.next)}function findHoleBridge(hole,outerNode){let p=outerNode;const hx=hole.x;const hy=hole.y;let qx=-Infinity;let m;if(equals(hole,p))return p;do{if(equals(hole,p.next))return p.next;else if(hy<=p.y&&hy>=p.next.y&&p.next.y!==p.y){const x=p.x+(hy-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(x<=hx&&x>qx){qx=x;m=p.x<p.next.x?p:p.next;if(x===hx)return m}}p=p.next}while(p!==outerNode);if(!m)return null;const stop=m;const mx=m.x;const my=m.y;let tanMin=Infinity;p=m;do{if(hx>=p.x&&p.x>=mx&&hx!==p.x&&pointInTriangle(hy<my?hx:qx,hy,mx,my,hy<my?qx:hx,hy,p.x,p.y)){const tan=Math.abs(hy-p.y)/(hx-p.x);if(locallyInside(p,hole)&&(tan<tanMin||tan===tanMin&&(p.x>m.x||p.x===m.x&&sectorContainsSector(m,p)))){m=p;tanMin=tan}}p=p.next}while(p!==stop);return m}function sectorContainsSector(m,p){return area(m.prev,m,p.prev)<0&&area(p.next,m,m.next)<0}function indexCurve(start,minX,minY,invSize){let p=start;do{if(p.z===0)p.z=zOrder(p.x,p.y,minX,minY,invSize);p.prevZ=p.prev;p.nextZ=p.next;p=p.next}while(p!==start);p.prevZ.nextZ=null;p.prevZ=null;sortLinked(p)}function sortLinked(list){let numMerges;let inSize=1;do{let p=list;let e;list=null;let tail=null;numMerges=0;while(p){numMerges++;let q=p;let pSize=0;for(let i=0;i<inSize;i++){pSize++;q=q.nextZ;if(!q)break}let qSize=inSize;while(pSize>0||qSize>0&&q){if(pSize!==0&&(qSize===0||!q||p.z<=q.z)){e=p;p=p.nextZ;pSize--}else{e=q;q=q.nextZ;qSize--}if(tail)tail.nextZ=e;else list=e;e.prevZ=tail;tail=e}p=q}tail.nextZ=null;inSize*=2}while(numMerges>1);return list}function zOrder(x,y,minX,minY,invSize){x=(x-minX)*invSize|0;y=(y-minY)*invSize|0;x=(x|x<<8)&16711935;x=(x|x<<4)&252645135;x=(x|x<<2)&858993459;x=(x|x<<1)&1431655765;y=(y|y<<8)&16711935;y=(y|y<<4)&252645135;y=(y|y<<2)&858993459;y=(y|y<<1)&1431655765;return x|y<<1}function getLeftmost(start){let p=start,leftmost=start;do{if(p.x<leftmost.x||p.x===leftmost.x&&p.y<leftmost.y)leftmost=p;p=p.next}while(p!==start);return leftmost}function pointInTriangle(ax,ay,bx,by,cx,cy,px,py){return(cx-px)*(ay-py)>=(ax-px)*(cy-py)&&(ax-px)*(by-py)>=(bx-px)*(ay-py)&&(bx-px)*(cy-py)>=(cx-px)*(by-py)}function pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,px,py){return!(ax===px&&ay===py)&&pointInTriangle(ax,ay,bx,by,cx,cy,px,py)}function isValidDiagonal(a,b){return a.next.i!==b.i&&a.prev.i!==b.i&&!intersectsPolygon(a,b)&&(locallyInside(a,b)&&locallyInside(b,a)&&middleInside(a,b)&&(area(a.prev,a,b.prev)||area(a,b.prev,b))||equals(a,b)&&area(a.prev,a,a.next)>0&&area(b.prev,b,b.next)>0)}function area(p,q,r){return(q.y-p.y)*(r.x-q.x)-(q.x-p.x)*(r.y-q.y)}function equals(p1,p2){return p1.x===p2.x&&p1.y===p2.y}function intersects(p1,q1,p2,q2){const o1=sign(area(p1,q1,p2));const o2=sign(area(p1,q1,q2));const o3=sign(area(p2,q2,p1));const o4=sign(area(p2,q2,q1));if(o1!==o2&&o3!==o4)return true;if(o1===0&&onSegment(p1,p2,q1))return true;if(o2===0&&onSegment(p1,q2,q1))return true;if(o3===0&&onSegment(p2,p1,q2))return true;if(o4===0&&onSegment(p2,q1,q2))return true;return false}function onSegment(p,q,r){return q.x<=Math.max(p.x,r.x)&&q.x>=Math.min(p.x,r.x)&&q.y<=Math.max(p.y,r.y)&&q.y>=Math.min(p.y,r.y)}function sign(num){return num>0?1:num<0?-1:0}function intersectsPolygon(a,b){let p=a;do{if(p.i!==a.i&&p.next.i!==a.i&&p.i!==b.i&&p.next.i!==b.i&&intersects(p,p.next,a,b))return true;p=p.next}while(p!==a);return false}function locallyInside(a,b){return area(a.prev,a,a.next)<0?area(a,b,a.next)>=0&&area(a,a.prev,b)>=0:area(a,b,a.prev)<0||area(a,a.next,b)<0}function middleInside(a,b){let p=a;let inside=false;const px=(a.x+b.x)/2;const py=(a.y+b.y)/2;do{if(p.y>py!==p.next.y>py&&p.next.y!==p.y&&px<(p.next.x-p.x)*(py-p.y)/(p.next.y-p.y)+p.x)inside=!inside;p=p.next}while(p!==a);return inside}function splitPolygon(a,b){const a2=createNode(a.i,a.x,a.y),b2=createNode(b.i,b.x,b.y),an=a.next,bp=b.prev;a.next=b;b.prev=a;a2.next=an;an.prev=a2;b2.next=a2;a2.prev=b2;bp.next=b2;b2.prev=bp;return b2}function insertNode(i,x,y,last){const p=createNode(i,x,y);if(!last){p.prev=p;p.next=p}else{p.next=last.next;p.prev=last;last.next.prev=p;last.next=p}return p}function removeNode(p){p.next.prev=p.prev;p.prev.next=p.next;if(p.prevZ)p.prevZ.nextZ=p.nextZ;if(p.nextZ)p.nextZ.prevZ=p.prevZ}function createNode(i,x,y){return{i,x,y,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:false}}function signedArea(data,start,end,dim){let sum=0;for(let i=start,j=end-dim;i<end;i+=dim){sum+=(data[j]-data[i])*(data[i+1]+data[j+1]);j=i}return sum}class Earcut{static triangulate(data,holeIndices,dim=2){return earcut(data,holeIndices,dim)}}class ShapeUtils{static area(contour){const n=contour.length;let a=0;for(let p=n-1,q=0;q<n;p=q++){a+=contour[p].x*contour[q].y-contour[q].x*contour[p].y}return a*0.5}static isClockWise(pts){return ShapeUtils.area(pts)<0}static triangulateShape(contour,holes){const vertices=[];const holeIndices=[];const faces=[];removeDupEndPts(contour);addContour(vertices,contour);let holeIndex=contour.length;holes.forEach(removeDupEndPts);for(let i=0;i<holes.length;i++){holeIndices.push(holeIndex);holeIndex+=holes[i].length;addContour(vertices,holes[i])}const triangles=Earcut.triangulate(vertices,holeIndices);for(let i=0;i<triangles.length;i+=3){faces.push(triangles.slice(i,i+3))}return faces}}function removeDupEndPts(points){const l=points.length;if(l>2&&points[l-1].equals(points[0])){points.pop()}}function addContour(vertices,contour){for(let i=0;i<contour.length;i++){vertices.push(contour[i].x);vertices.push(contour[i].y)}}class ExtrudeGeometry extends BufferGeometry{constructor(shapes=new Shape([new Vector2(0.5,0.5),new Vector2(-0.5,0.5),new Vector2(-0.5,-0.5),new Vector2(0.5,-0.5)]),options={}){super();this.type="ExtrudeGeometry";this.parameters={shapes:shapes,options:options};shapes=Array.isArray(shapes)?shapes:[shapes];const scope=this;const verticesArray=[];const uvArray=[];for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];addShape(shape)}this.setAttribute("position",new Float32BufferAttribute(verticesArray,3));this.setAttribute("uv",new Float32BufferAttribute(uvArray,2));this.computeVertexNormals();function addShape(shape){const placeholder=[];const curveSegments=options.curveSegments!==undefined?options.curveSegments:12;const steps=options.steps!==undefined?options.steps:1;const depth=options.depth!==undefined?options.depth:1;let bevelEnabled=options.bevelEnabled!==undefined?options.bevelEnabled:true;let bevelThickness=options.bevelThickness!==undefined?options.bevelThickness:0.2;let bevelSize=options.bevelSize!==undefined?options.bevelSize:bevelThickness-0.1;let bevelOffset=options.bevelOffset!==undefined?options.bevelOffset:0;let bevelSegments=options.bevelSegments!==undefined?options.bevelSegments:3;const extrudePath=options.extrudePath;const uvgen=options.UVGenerator!==undefined?options.UVGenerator:WorldUVGenerator;let extrudePts,extrudeByPath=false;let splineTube,binormal,normal,position2;if(extrudePath){extrudePts=extrudePath.getSpacedPoints(steps);extrudeByPath=true;bevelEnabled=false;const isClosed=extrudePath.isCatmullRomCurve3?extrudePath.closed:false;splineTube=extrudePath.computeFrenetFrames(steps,isClosed);binormal=new Vector3;normal=new Vector3;position2=new Vector3}if(!bevelEnabled){bevelSegments=0;bevelThickness=0;bevelSize=0;bevelOffset=0}const shapePoints=shape.extractPoints(curveSegments);let vertices=shapePoints.shape;const holes=shapePoints.holes;const reverse=!ShapeUtils.isClockWise(vertices);if(reverse){vertices=vertices.reverse();for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];if(ShapeUtils.isClockWise(ahole)){holes[h]=ahole.reverse()}}}function mergeOverlappingPoints(points){const THRESHOLD=1e-10;const THRESHOLD_SQ=THRESHOLD*THRESHOLD;let prevPos=points[0];for(let i=1;i<=points.length;i++){const currentIndex=i%points.length;const currentPos=points[currentIndex];const dx=currentPos.x-prevPos.x;const dy=currentPos.y-prevPos.y;const distSq=dx*dx+dy*dy;const scalingFactorSqrt=Math.max(Math.abs(currentPos.x),Math.abs(currentPos.y),Math.abs(prevPos.x),Math.abs(prevPos.y));const thresholdSqScaled=THRESHOLD_SQ*scalingFactorSqrt*scalingFactorSqrt;if(distSq<=thresholdSqScaled){points.splice(currentIndex,1);i--;continue}prevPos=currentPos}}mergeOverlappingPoints(vertices);holes.forEach(mergeOverlappingPoints);const numHoles=holes.length;const contour=vertices;for(let h=0;h<numHoles;h++){const ahole=holes[h];vertices=vertices.concat(ahole)}function scalePt2(pt,vec,size){if(!vec)error("ExtrudeGeometry: vec does not exist");return pt.clone().addScaledVector(vec,size)}const vlen=vertices.length;function getBevelVec(inPt,inPrev,inNext){let v_trans_x,v_trans_y,shrink_by;const v_prev_x=inPt.x-inPrev.x,v_prev_y=inPt.y-inPrev.y;const v_next_x=inNext.x-inPt.x,v_next_y=inNext.y-inPt.y;const v_prev_lensq=v_prev_x*v_prev_x+v_prev_y*v_prev_y;const collinear0=v_prev_x*v_next_y-v_prev_y*v_next_x;if(Math.abs(collinear0)>Number.EPSILON){const v_prev_len=Math.sqrt(v_prev_lensq);const v_next_len=Math.sqrt(v_next_x*v_next_x+v_next_y*v_next_y);const ptPrevShift_x=inPrev.x-v_prev_y/v_prev_len;const ptPrevShift_y=inPrev.y+v_prev_x/v_prev_len;const ptNextShift_x=inNext.x-v_next_y/v_next_len;const ptNextShift_y=inNext.y+v_next_x/v_next_len;const sf=((ptNextShift_x-ptPrevShift_x)*v_next_y-(ptNextShift_y-ptPrevShift_y)*v_next_x)/(v_prev_x*v_next_y-v_prev_y*v_next_x);v_trans_x=ptPrevShift_x+v_prev_x*sf-inPt.x;v_trans_y=ptPrevShift_y+v_prev_y*sf-inPt.y;const v_trans_lensq=v_trans_x*v_trans_x+v_trans_y*v_trans_y;if(v_trans_lensq<=2){return new Vector2(v_trans_x,v_trans_y)}else{shrink_by=Math.sqrt(v_trans_lensq/2)}}else{let direction_eq=false;if(v_prev_x>Number.EPSILON){if(v_next_x>Number.EPSILON){direction_eq=true}}else{if(v_prev_x<-Number.EPSILON){if(v_next_x<-Number.EPSILON){direction_eq=true}}else{if(Math.sign(v_prev_y)===Math.sign(v_next_y)){direction_eq=true}}}if(direction_eq){v_trans_x=-v_prev_y;v_trans_y=v_prev_x;shrink_by=Math.sqrt(v_prev_lensq)}else{v_trans_x=v_prev_x;v_trans_y=v_prev_y;shrink_by=Math.sqrt(v_prev_lensq/2)}}return new Vector2(v_trans_x/shrink_by,v_trans_y/shrink_by)}const contourMovements=[];for(let i=0,il=contour.length,j=il-1,k=i+1;i<il;i++,j++,k++){if(j===il)j=0;if(k===il)k=0;contourMovements[i]=getBevelVec(contour[i],contour[j],contour[k])}const holesMovements=[];let oneHoleMovements,verticesMovements=contourMovements.concat();for(let h=0,hl=numHoles;h<hl;h++){const ahole=holes[h];oneHoleMovements=[];for(let i=0,il=ahole.length,j=il-1,k=i+1;i<il;i++,j++,k++){if(j===il)j=0;if(k===il)k=0;oneHoleMovements[i]=getBevelVec(ahole[i],ahole[j],ahole[k])}holesMovements.push(oneHoleMovements);verticesMovements=verticesMovements.concat(oneHoleMovements)}let faces;if(bevelSegments===0){faces=ShapeUtils.triangulateShape(contour,holes)}else{const contractedContourVertices=[];const expandedHoleVertices=[];for(let b=0;b<bevelSegments;b++){const t=b/bevelSegments;const z=bevelThickness*Math.cos(t*Math.PI/2);const bs=bevelSize*Math.sin(t*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i<il;i++){const vert=scalePt2(contour[i],contourMovements[i],bs);v(vert.x,vert.y,-z);if(t===0)contractedContourVertices.push(vert)}for(let h=0,hl=numHoles;h<hl;h++){const ahole=holes[h];oneHoleMovements=holesMovements[h];const oneHoleVertices=[];for(let i=0,il=ahole.length;i<il;i++){const vert=scalePt2(ahole[i],oneHoleMovements[i],bs);v(vert.x,vert.y,-z);if(t===0)oneHoleVertices.push(vert)}if(t===0)expandedHoleVertices.push(oneHoleVertices)}}faces=ShapeUtils.triangulateShape(contractedContourVertices,expandedHoleVertices)}const flen=faces.length;const bs=bevelSize+bevelOffset;for(let i=0;i<vlen;i++){const vert=bevelEnabled?scalePt2(vertices[i],verticesMovements[i],bs):vertices[i];if(!extrudeByPath){v(vert.x,vert.y,0)}else{normal.copy(splineTube.normals[0]).multiplyScalar(vert.x);binormal.copy(splineTube.binormals[0]).multiplyScalar(vert.y);position2.copy(extrudePts[0]).add(normal).add(binormal);v(position2.x,position2.y,position2.z)}}for(let s=1;s<=steps;s++){for(let i=0;i<vlen;i++){const vert=bevelEnabled?scalePt2(vertices[i],verticesMovements[i],bs):vertices[i];if(!extrudeByPath){v(vert.x,vert.y,depth/steps*s)}else{normal.copy(splineTube.normals[s]).multiplyScalar(vert.x);binormal.copy(splineTube.binormals[s]).multiplyScalar(vert.y);position2.copy(extrudePts[s]).add(normal).add(binormal);v(position2.x,position2.y,position2.z)}}}for(let b=bevelSegments-1;b>=0;b--){const t=b/bevelSegments;const z=bevelThickness*Math.cos(t*Math.PI/2);const bs=bevelSize*Math.sin(t*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i<il;i++){const vert=scalePt2(contour[i],contourMovements[i],bs);v(vert.x,vert.y,depth+z)}for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];oneHoleMovements=holesMovements[h];for(let i=0,il=ahole.length;i<il;i++){const vert=scalePt2(ahole[i],oneHoleMovements[i],bs);if(!extrudeByPath){v(vert.x,vert.y,depth+z)}else{v(vert.x,vert.y+extrudePts[steps-1].y,extrudePts[steps-1].x+z)}}}}buildLidFaces();buildSideFaces();function buildLidFaces(){const start=verticesArray.length/3;if(bevelEnabled){let layer=0;let offset=vlen*layer;for(let i=0;i<flen;i++){const face=faces[i];f3(face[2]+offset,face[1]+offset,face[0]+offset)}layer=steps+bevelSegments*2;offset=vlen*layer;for(let i=0;i<flen;i++){const face=faces[i];f3(face[0]+offset,face[1]+offset,face[2]+offset)}}else{for(let i=0;i<flen;i++){const face=faces[i];f3(face[2],face[1],face[0])}for(let i=0;i<flen;i++){const face=faces[i];f3(face[0]+vlen*steps,face[1]+vlen*steps,face[2]+vlen*steps)}}scope.addGroup(start,verticesArray.length/3-start,0)}function buildSideFaces(){const start=verticesArray.length/3;let layeroffset=0;sidewalls(contour,layeroffset);layeroffset+=contour.length;for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];sidewalls(ahole,layeroffset);layeroffset+=ahole.length}scope.addGroup(start,verticesArray.length/3-start,1)}function sidewalls(contour,layeroffset){let i=contour.length;while(--i>=0){const j=i;let k=i-1;if(k<0)k=contour.length-1;for(let s=0,sl=steps+bevelSegments*2;s<sl;s++){const slen1=vlen*s;const slen2=vlen*(s+1);const a=layeroffset+j+slen1,b=layeroffset+k+slen1,c=layeroffset+k+slen2,d=layeroffset+j+slen2;f4(a,b,c,d)}}}function v(x,y,z){placeholder.push(x);placeholder.push(y);placeholder.push(z)}function f3(a,b,c){addVertex(a);addVertex(b);addVertex(c);const nextIndex=verticesArray.length/3;const uvs=uvgen.generateTopUV(scope,verticesArray,nextIndex-3,nextIndex-2,nextIndex-1);addUV(uvs[0]);addUV(uvs[1]);addUV(uvs[2])}function f4(a,b,c,d){addVertex(a);addVertex(b);addVertex(d);addVertex(b);addVertex(c);addVertex(d);const nextIndex=verticesArray.length/3;const uvs=uvgen.generateSideWallUV(scope,verticesArray,nextIndex-6,nextIndex-3,nextIndex-2,nextIndex-1);addUV(uvs[0]);addUV(uvs[1]);addUV(uvs[3]);addUV(uvs[1]);addUV(uvs[2]);addUV(uvs[3])}function addVertex(index){verticesArray.push(placeholder[index*3+0]);verticesArray.push(placeholder[index*3+1]);verticesArray.push(placeholder[index*3+2])}function addUV(vector2){uvArray.push(vector2.x);uvArray.push(vector2.y)}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();const shapes=this.parameters.shapes;const options=this.parameters.options;return toJSON$1(shapes,options,data)}static fromJSON(data,shapes){const geometryShapes=[];for(let j=0,jl=data.shapes.length;j<jl;j++){const shape=shapes[data.shapes[j]];geometryShapes.push(shape)}const extrudePath=data.options.extrudePath;if(extrudePath!==undefined){data.options.extrudePath=new Curves[extrudePath.type]().fromJSON(extrudePath)}return new ExtrudeGeometry(geometryShapes,data.options)}}const WorldUVGenerator={generateTopUV:function(geometry,vertices,indexA,indexB,indexC){const a_x=vertices[indexA*3];const a_y=vertices[indexA*3+1];const b_x=vertices[indexB*3];const b_y=vertices[indexB*3+1];const c_x=vertices[indexC*3];const c_y=vertices[indexC*3+1];return[new Vector2(a_x,a_y),new Vector2(b_x,b_y),new Vector2(c_x,c_y)]},generateSideWallUV:function(geometry,vertices,indexA,indexB,indexC,indexD){const a_x=vertices[indexA*3];const a_y=vertices[indexA*3+1];const a_z=vertices[indexA*3+2];const b_x=vertices[indexB*3];const b_y=vertices[indexB*3+1];const b_z=vertices[indexB*3+2];const c_x=vertices[indexC*3];const c_y=vertices[indexC*3+1];const c_z=vertices[indexC*3+2];const d_x=vertices[indexD*3];const d_y=vertices[indexD*3+1];const d_z=vertices[indexD*3+2];if(Math.abs(a_y-b_y)<Math.abs(a_x-b_x)){return[new Vector2(a_x,1-a_z),new Vector2(b_x,1-b_z),new Vector2(c_x,1-c_z),new Vector2(d_x,1-d_z)]}else{return[new Vector2(a_y,1-a_z),new Vector2(b_y,1-b_z),new Vector2(c_y,1-c_z),new Vector2(d_y,1-d_z)]}}};function toJSON$1(shapes,options,data){data.shapes=[];if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];data.shapes.push(shape.uuid)}}else{data.shapes.push(shapes.uuid)}data.options=Object.assign({},options);if(options.extrudePath!==undefined)data.options.extrudePath=options.extrudePath.toJSON();return data}class IcosahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const t=(1+Math.sqrt(5))/2;const vertices=[-1,t,0,1,t,0,-1,-t,0,1,-t,0,0,-1,t,0,1,t,0,-1,-t,0,1,-t,t,0,-1,t,0,1,-t,0,-1,-t,0,1];const indices=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(vertices,indices,radius,detail);this.type="IcosahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new IcosahedronGeometry(data.radius,data.detail)}}class LatheGeometry extends BufferGeometry{constructor(points=[new Vector2(0,-0.5),new Vector2(0.5,0),new Vector2(0,0.5)],segments=12,phiStart=0,phiLength=Math.PI*2){super();this.type="LatheGeometry";this.parameters={points:points,segments:segments,phiStart:phiStart,phiLength:phiLength};segments=Math.floor(segments);phiLength=clamp(phiLength,0,Math.PI*2);const indices=[];const vertices=[];const uvs=[];const initNormals=[];const normals=[];const inverseSegments=1/segments;const vertex=new Vector3;const uv=new Vector2;const normal=new Vector3;const curNormal=new Vector3;const prevNormal=new Vector3;let dx=0;let dy=0;for(let j=0;j<=points.length-1;j++){switch(j){case 0:dx=points[j+1].x-points[j].x;dy=points[j+1].y-points[j].y;normal.x=dy*1;normal.y=-dx;normal.z=dy*0;prevNormal.copy(normal);normal.normalize();initNormals.push(normal.x,normal.y,normal.z);break;case points.length-1:initNormals.push(prevNormal.x,prevNormal.y,prevNormal.z);break;default:dx=points[j+1].x-points[j].x;dy=points[j+1].y-points[j].y;normal.x=dy*1;normal.y=-dx;normal.z=dy*0;curNormal.copy(normal);normal.x+=prevNormal.x;normal.y+=prevNormal.y;normal.z+=prevNormal.z;normal.normalize();initNormals.push(normal.x,normal.y,normal.z);prevNormal.copy(curNormal);}}for(let i=0;i<=segments;i++){const phi=phiStart+i*inverseSegments*phiLength;const sin=Math.sin(phi);const cos=Math.cos(phi);for(let j=0;j<=points.length-1;j++){vertex.x=points[j].x*sin;vertex.y=points[j].y;vertex.z=points[j].x*cos;vertices.push(vertex.x,vertex.y,vertex.z);uv.x=i/segments;uv.y=j/(points.length-1);uvs.push(uv.x,uv.y);const x=initNormals[3*j+0]*sin;const y=initNormals[3*j+1];const z=initNormals[3*j+0]*cos;normals.push(x,y,z)}}for(let i=0;i<segments;i++){for(let j=0;j<points.length-1;j++){const base=j+i*points.length;const a=base;const b=base+points.length;const c=base+points.length+1;const d=base+1;indices.push(a,b,d);indices.push(c,d,b)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));this.setAttribute("normal",new Float32BufferAttribute(normals,3))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new LatheGeometry(data.points,data.segments,data.phiStart,data.phiLength)}}class OctahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const vertices=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1];const indices=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(vertices,indices,radius,detail);this.type="OctahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new OctahedronGeometry(data.radius,data.detail)}}class PlaneGeometry extends BufferGeometry{constructor(width=1,height=1,widthSegments=1,heightSegments=1){super();this.type="PlaneGeometry";this.parameters={width:width,height:height,widthSegments:widthSegments,heightSegments:heightSegments};const width_half=width/2;const height_half=height/2;const gridX=Math.floor(widthSegments);const gridY=Math.floor(heightSegments);const gridX1=gridX+1;const gridY1=gridY+1;const segment_width=width/gridX;const segment_height=height/gridY;const indices=[];const vertices=[];const normals=[];const uvs=[];for(let iy=0;iy<gridY1;iy++){const y=iy*segment_height-height_half;for(let ix=0;ix<gridX1;ix++){const x=ix*segment_width-width_half;vertices.push(x,-y,0);normals.push(0,0,1);uvs.push(ix/gridX);uvs.push(1-iy/gridY)}}for(let iy=0;iy<gridY;iy++){for(let ix=0;ix<gridX;ix++){const a=ix+gridX1*iy;const b=ix+gridX1*(iy+1);const c=ix+1+gridX1*(iy+1);const d=ix+1+gridX1*iy;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new PlaneGeometry(data.width,data.height,data.widthSegments,data.heightSegments)}}class RingGeometry extends BufferGeometry{constructor(innerRadius=0.5,outerRadius=1,thetaSegments=32,phiSegments=1,thetaStart=0,thetaLength=Math.PI*2){super();this.type="RingGeometry";this.parameters={innerRadius:innerRadius,outerRadius:outerRadius,thetaSegments:thetaSegments,phiSegments:phiSegments,thetaStart:thetaStart,thetaLength:thetaLength};thetaSegments=Math.max(3,thetaSegments);phiSegments=Math.max(1,phiSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let radius=innerRadius;const radiusStep=(outerRadius-innerRadius)/phiSegments;const vertex=new Vector3;const uv=new Vector2;for(let j=0;j<=phiSegments;j++){for(let i=0;i<=thetaSegments;i++){const segment=thetaStart+i/thetaSegments*thetaLength;vertex.x=radius*Math.cos(segment);vertex.y=radius*Math.sin(segment);vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,0,1);uv.x=(vertex.x/outerRadius+1)/2;uv.y=(vertex.y/outerRadius+1)/2;uvs.push(uv.x,uv.y)}radius+=radiusStep}for(let j=0;j<phiSegments;j++){const thetaSegmentLevel=j*(thetaSegments+1);for(let i=0;i<thetaSegments;i++){const segment=i+thetaSegmentLevel;const a=segment;const b=segment+thetaSegments+1;const c=segment+thetaSegments+2;const d=segment+1;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new RingGeometry(data.innerRadius,data.outerRadius,data.thetaSegments,data.phiSegments,data.thetaStart,data.thetaLength)}}class ShapeGeometry extends BufferGeometry{constructor(shapes=new Shape([new Vector2(0,0.5),new Vector2(-0.5,-0.5),new Vector2(0.5,-0.5)]),curveSegments=12){super();this.type="ShapeGeometry";this.parameters={shapes:shapes,curveSegments:curveSegments};const indices=[];const vertices=[];const normals=[];const uvs=[];let groupStart=0;let groupCount=0;if(Array.isArray(shapes)===false){addShape(shapes)}else{for(let i=0;i<shapes.length;i++){addShape(shapes[i]);this.addGroup(groupStart,groupCount,i);groupStart+=groupCount;groupCount=0}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function addShape(shape){const indexOffset=vertices.length/3;const points=shape.extractPoints(curveSegments);let shapeVertices=points.shape;const shapeHoles=points.holes;if(ShapeUtils.isClockWise(shapeVertices)===false){shapeVertices=shapeVertices.reverse()}for(let i=0,l=shapeHoles.length;i<l;i++){const shapeHole=shapeHoles[i];if(ShapeUtils.isClockWise(shapeHole)===true){shapeHoles[i]=shapeHole.reverse()}}const faces=ShapeUtils.triangulateShape(shapeVertices,shapeHoles);for(let i=0,l=shapeHoles.length;i<l;i++){const shapeHole=shapeHoles[i];shapeVertices=shapeVertices.concat(shapeHole)}for(let i=0,l=shapeVertices.length;i<l;i++){const vertex=shapeVertices[i];vertices.push(vertex.x,vertex.y,0);normals.push(0,0,1);uvs.push(vertex.x,vertex.y)}for(let i=0,l=faces.length;i<l;i++){const face=faces[i];const a=face[0]+indexOffset;const b=face[1]+indexOffset;const c=face[2]+indexOffset;indices.push(a,b,c);groupCount+=3}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();const shapes=this.parameters.shapes;return toJSON(shapes,data)}static fromJSON(data,shapes){const geometryShapes=[];for(let j=0,jl=data.shapes.length;j<jl;j++){const shape=shapes[data.shapes[j]];geometryShapes.push(shape)}return new ShapeGeometry(geometryShapes,data.curveSegments)}}function toJSON(shapes,data){data.shapes=[];if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];data.shapes.push(shape.uuid)}}else{data.shapes.push(shapes.uuid)}return data}class SphereGeometry extends BufferGeometry{constructor(radius=1,widthSegments=32,heightSegments=16,phiStart=0,phiLength=Math.PI*2,thetaStart=0,thetaLength=Math.PI){super();this.type="SphereGeometry";this.parameters={radius:radius,widthSegments:widthSegments,heightSegments:heightSegments,phiStart:phiStart,phiLength:phiLength,thetaStart:thetaStart,thetaLength:thetaLength};widthSegments=Math.max(3,Math.floor(widthSegments));heightSegments=Math.max(2,Math.floor(heightSegments));const thetaEnd=Math.min(thetaStart+thetaLength,Math.PI);let index=0;const grid=[];const vertex=new Vector3;const normal=new Vector3;const indices=[];const vertices=[];const normals=[];const uvs=[];for(let iy=0;iy<=heightSegments;iy++){const verticesRow=[];const v=iy/heightSegments;let uOffset=0;if(iy===0&&thetaStart===0){uOffset=0.5/widthSegments}else if(iy===heightSegments&&thetaEnd===Math.PI){uOffset=-0.5/widthSegments}for(let ix=0;ix<=widthSegments;ix++){const u=ix/widthSegments;vertex.x=-radius*Math.cos(phiStart+u*phiLength)*Math.sin(thetaStart+v*thetaLength);vertex.y=radius*Math.cos(thetaStart+v*thetaLength);vertex.z=radius*Math.sin(phiStart+u*phiLength)*Math.sin(thetaStart+v*thetaLength);vertices.push(vertex.x,vertex.y,vertex.z);normal.copy(vertex).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u+uOffset,1-v);verticesRow.push(index++)}grid.push(verticesRow)}for(let iy=0;iy<heightSegments;iy++){for(let ix=0;ix<widthSegments;ix++){const a=grid[iy][ix+1];const b=grid[iy][ix];const c=grid[iy+1][ix];const d=grid[iy+1][ix+1];if(iy!==0||thetaStart>0)indices.push(a,b,d);if(iy!==heightSegments-1||thetaEnd<Math.PI)indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new SphereGeometry(data.radius,data.widthSegments,data.heightSegments,data.phiStart,data.phiLength,data.thetaStart,data.thetaLength)}}class TetrahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const vertices=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1];const indices=[2,1,0,0,3,2,1,3,0,2,3,1];super(vertices,indices,radius,detail);this.type="TetrahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new TetrahedronGeometry(data.radius,data.detail)}}class TorusGeometry extends BufferGeometry{constructor(radius=1,tube=0.4,radialSegments=12,tubularSegments=48,arc=Math.PI*2){super();this.type="TorusGeometry";this.parameters={radius:radius,tube:tube,radialSegments:radialSegments,tubularSegments:tubularSegments,arc:arc};radialSegments=Math.floor(radialSegments);tubularSegments=Math.floor(tubularSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];const center=new Vector3;const vertex=new Vector3;const normal=new Vector3;for(let j=0;j<=radialSegments;j++){for(let i=0;i<=tubularSegments;i++){const u=i/tubularSegments*arc;const v=j/radialSegments*Math.PI*2;vertex.x=(radius+tube*Math.cos(v))*Math.cos(u);vertex.y=(radius+tube*Math.cos(v))*Math.sin(u);vertex.z=tube*Math.sin(v);vertices.push(vertex.x,vertex.y,vertex.z);center.x=radius*Math.cos(u);center.y=radius*Math.sin(u);normal.subVectors(vertex,center).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(i/tubularSegments);uvs.push(j/radialSegments)}}for(let j=1;j<=radialSegments;j++){for(let i=1;i<=tubularSegments;i++){const a=(tubularSegments+1)*j+i-1;const b=(tubularSegments+1)*(j-1)+i-1;const c=(tubularSegments+1)*(j-1)+i;const d=(tubularSegments+1)*j+i;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new TorusGeometry(data.radius,data.tube,data.radialSegments,data.tubularSegments,data.arc)}}class TorusKnotGeometry extends BufferGeometry{constructor(radius=1,tube=0.4,tubularSegments=64,radialSegments=8,p=2,q=3){super();this.type="TorusKnotGeometry";this.parameters={radius:radius,tube:tube,tubularSegments:tubularSegments,radialSegments:radialSegments,p:p,q:q};tubularSegments=Math.floor(tubularSegments);radialSegments=Math.floor(radialSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];const vertex=new Vector3;const normal=new Vector3;const P1=new Vector3;const P2=new Vector3;const B=new Vector3;const T=new Vector3;const N=new Vector3;for(let i=0;i<=tubularSegments;++i){const u=i/tubularSegments*p*Math.PI*2;calculatePositionOnCurve(u,p,q,radius,P1);calculatePositionOnCurve(u+0.01,p,q,radius,P2);T.subVectors(P2,P1);N.addVectors(P2,P1);B.crossVectors(T,N);N.crossVectors(B,T);B.normalize();N.normalize();for(let j=0;j<=radialSegments;++j){const v=j/radialSegments*Math.PI*2;const cx=-tube*Math.cos(v);const cy=tube*Math.sin(v);vertex.x=P1.x+(cx*N.x+cy*B.x);vertex.y=P1.y+(cx*N.y+cy*B.y);vertex.z=P1.z+(cx*N.z+cy*B.z);vertices.push(vertex.x,vertex.y,vertex.z);normal.subVectors(vertex,P1).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(i/tubularSegments);uvs.push(j/radialSegments)}}for(let j=1;j<=tubularSegments;j++){for(let i=1;i<=radialSegments;i++){const a=(radialSegments+1)*(j-1)+(i-1);const b=(radialSegments+1)*j+(i-1);const c=(radialSegments+1)*j+i;const d=(radialSegments+1)*(j-1)+i;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function calculatePositionOnCurve(u,p,q,radius,position){const cu=Math.cos(u);const su=Math.sin(u);const quOverP=q/p*u;const cs=Math.cos(quOverP);position.x=radius*(2+cs)*0.5*cu;position.y=radius*(2+cs)*su*0.5;position.z=radius*Math.sin(quOverP)*0.5}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new TorusKnotGeometry(data.radius,data.tube,data.tubularSegments,data.radialSegments,data.p,data.q)}}class TubeGeometry extends BufferGeometry{constructor(path=new QuadraticBezierCurve3(new Vector3(-1,-1,0),new Vector3(-1,1,0),new Vector3(1,1,0)),tubularSegments=64,radius=1,radialSegments=8,closed=false){super();this.type="TubeGeometry";this.parameters={path:path,tubularSegments:tubularSegments,radius:radius,radialSegments:radialSegments,closed:closed};const frames=path.computeFrenetFrames(tubularSegments,closed);this.tangents=frames.tangents;this.normals=frames.normals;this.binormals=frames.binormals;const vertex=new Vector3;const normal=new Vector3;const uv=new Vector2;let P=new Vector3;const vertices=[];const normals=[];const uvs=[];const indices=[];generateBufferData();this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function generateBufferData(){for(let i=0;i<tubularSegments;i++){generateSegment(i)}generateSegment(closed===false?tubularSegments:0);generateUVs();generateIndices()}function generateSegment(i){P=path.getPointAt(i/tubularSegments,P);const N=frames.normals[i];const B=frames.binormals[i];for(let j=0;j<=radialSegments;j++){const v=j/radialSegments*Math.PI*2;const sin=Math.sin(v);const cos=-Math.cos(v);normal.x=cos*N.x+sin*B.x;normal.y=cos*N.y+sin*B.y;normal.z=cos*N.z+sin*B.z;normal.normalize();normals.push(normal.x,normal.y,normal.z);vertex.x=P.x+radius*normal.x;vertex.y=P.y+radius*normal.y;vertex.z=P.z+radius*normal.z;vertices.push(vertex.x,vertex.y,vertex.z)}}function generateIndices(){for(let j=1;j<=tubularSegments;j++){for(let i=1;i<=radialSegments;i++){const a=(radialSegments+1)*(j-1)+(i-1);const b=(radialSegments+1)*j+(i-1);const c=(radialSegments+1)*j+i;const d=(radialSegments+1)*(j-1)+i;indices.push(a,b,d);indices.push(b,c,d)}}}function generateUVs(){for(let i=0;i<=tubularSegments;i++){for(let j=0;j<=radialSegments;j++){uv.x=i/tubularSegments;uv.y=j/radialSegments;uvs.push(uv.x,uv.y)}}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();data.path=this.parameters.path.toJSON();return data}static fromJSON(data){return new TubeGeometry(new Curves[data.path.type]().fromJSON(data.path),data.tubularSegments,data.radius,data.radialSegments,data.closed)}}class WireframeGeometry extends BufferGeometry{constructor(geometry=null){super();this.type="WireframeGeometry";this.parameters={geometry:geometry};if(geometry!==null){const vertices=[];const edges=new Set;const start=new Vector3;const end=new Vector3;if(geometry.index!==null){const position=geometry.attributes.position;const indices=geometry.index;let groups=geometry.groups;if(groups.length===0){groups=[{start:0,count:indices.count,materialIndex:0}]}for(let o=0,ol=groups.length;o<ol;++o){const group=groups[o];const groupStart=group.start;const groupCount=group.count;for(let i=groupStart,l=groupStart+groupCount;i<l;i+=3){for(let j=0;j<3;j++){const index1=indices.getX(i+j);const index2=indices.getX(i+(j+1)%3);start.fromBufferAttribute(position,index1);end.fromBufferAttribute(position,index2);if(isUniqueEdge(start,end,edges)===true){vertices.push(start.x,start.y,start.z);vertices.push(end.x,end.y,end.z)}}}}}else{const position=geometry.attributes.position;for(let i=0,l=position.count/3;i<l;i++){for(let j=0;j<3;j++){const index1=3*i+j;const index2=3*i+(j+1)%3;start.fromBufferAttribute(position,index1);end.fromBufferAttribute(position,index2);if(isUniqueEdge(start,end,edges)===true){vertices.push(start.x,start.y,start.z);vertices.push(end.x,end.y,end.z)}}}}this.setAttribute("position",new Float32BufferAttribute(vertices,3))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}}function isUniqueEdge(start,end,edges){const hash1=`${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`;const hash2=`${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`;if(edges.has(hash1)===true||edges.has(hash2)===true){return false}else{edges.add(hash1);edges.add(hash2);return true}}var Geometries=Object.freeze({__proto__:null,BoxGeometry:BoxGeometry,CapsuleGeometry:CapsuleGeometry,CircleGeometry:CircleGeometry,ConeGeometry:ConeGeometry,CylinderGeometry:CylinderGeometry,DodecahedronGeometry:DodecahedronGeometry,EdgesGeometry:EdgesGeometry,ExtrudeGeometry:ExtrudeGeometry,IcosahedronGeometry:IcosahedronGeometry,LatheGeometry:LatheGeometry,OctahedronGeometry:OctahedronGeometry,PlaneGeometry:PlaneGeometry,PolyhedronGeometry:PolyhedronGeometry,RingGeometry:RingGeometry,ShapeGeometry:ShapeGeometry,SphereGeometry:SphereGeometry,TetrahedronGeometry:TetrahedronGeometry,TorusGeometry:TorusGeometry,TorusKnotGeometry:TorusKnotGeometry,TubeGeometry:TubeGeometry,WireframeGeometry:WireframeGeometry});class ShadowMaterial extends Material{constructor(parameters){super();this.isShadowMaterial=true;this.type="ShadowMaterial";this.color=new Color(0);this.transparent=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.fog=source.fog;return this}}class RawShaderMaterial extends ShaderMaterial{constructor(parameters){super(parameters);this.isRawShaderMaterial=true;this.type="RawShaderMaterial"}}class MeshStandardMaterial extends Material{constructor(parameters){super();this.isMeshStandardMaterial=true;this.type="MeshStandardMaterial";this.defines={"STANDARD":""};this.color=new Color(16777215);this.roughness=1;this.metalness=0;this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.roughnessMap=null;this.metalnessMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.envMapIntensity=1;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.defines={"STANDARD":""};this.color.copy(source.color);this.roughness=source.roughness;this.metalness=source.metalness;this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.roughnessMap=source.roughnessMap;this.metalnessMap=source.metalnessMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.envMapIntensity=source.envMapIntensity;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(parameters){super();this.isMeshPhysicalMaterial=true;this.defines={"STANDARD":"","PHYSICAL":""};this.type="MeshPhysicalMaterial";this.anisotropyRotation=0;this.anisotropyMap=null;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new Vector2(1,1);this.clearcoatNormalMap=null;this.ior=1.5;Object.defineProperty(this,"reflectivity",{get:function(){return clamp(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(reflectivity){this.ior=(1+0.4*reflectivity)/(1-0.4*reflectivity)}});this.iridescenceMap=null;this.iridescenceIOR=1.3;this.iridescenceThicknessRange=[100,400];this.iridescenceThicknessMap=null;this.sheenColor=new Color(0);this.sheenColorMap=null;this.sheenRoughness=1;this.sheenRoughnessMap=null;this.transmissionMap=null;this.thickness=0;this.thicknessMap=null;this.attenuationDistance=Infinity;this.attenuationColor=new Color(1,1,1);this.specularIntensity=1;this.specularIntensityMap=null;this.specularColor=new Color(1,1,1);this.specularColorMap=null;this._anisotropy=0;this._clearcoat=0;this._dispersion=0;this._iridescence=0;this._sheen=0;this._transmission=0;this.setValues(parameters)}get anisotropy(){return this._anisotropy}set anisotropy(value){if(this._anisotropy>0!==value>0){this.version++}this._anisotropy=value}get clearcoat(){return this._clearcoat}set clearcoat(value){if(this._clearcoat>0!==value>0){this.version++}this._clearcoat=value}get iridescence(){return this._iridescence}set iridescence(value){if(this._iridescence>0!==value>0){this.version++}this._iridescence=value}get dispersion(){return this._dispersion}set dispersion(value){if(this._dispersion>0!==value>0){this.version++}this._dispersion=value}get sheen(){return this._sheen}set sheen(value){if(this._sheen>0!==value>0){this.version++}this._sheen=value}get transmission(){return this._transmission}set transmission(value){if(this._transmission>0!==value>0){this.version++}this._transmission=value}copy(source){super.copy(source);this.defines={"STANDARD":"","PHYSICAL":""};this.anisotropy=source.anisotropy;this.anisotropyRotation=source.anisotropyRotation;this.anisotropyMap=source.anisotropyMap;this.clearcoat=source.clearcoat;this.clearcoatMap=source.clearcoatMap;this.clearcoatRoughness=source.clearcoatRoughness;this.clearcoatRoughnessMap=source.clearcoatRoughnessMap;this.clearcoatNormalMap=source.clearcoatNormalMap;this.clearcoatNormalScale.copy(source.clearcoatNormalScale);this.dispersion=source.dispersion;this.ior=source.ior;this.iridescence=source.iridescence;this.iridescenceMap=source.iridescenceMap;this.iridescenceIOR=source.iridescenceIOR;this.iridescenceThicknessRange=[...source.iridescenceThicknessRange];this.iridescenceThicknessMap=source.iridescenceThicknessMap;this.sheen=source.sheen;this.sheenColor.copy(source.sheenColor);this.sheenColorMap=source.sheenColorMap;this.sheenRoughness=source.sheenRoughness;this.sheenRoughnessMap=source.sheenRoughnessMap;this.transmission=source.transmission;this.transmissionMap=source.transmissionMap;this.thickness=source.thickness;this.thicknessMap=source.thicknessMap;this.attenuationDistance=source.attenuationDistance;this.attenuationColor.copy(source.attenuationColor);this.specularIntensity=source.specularIntensity;this.specularIntensityMap=source.specularIntensityMap;this.specularColor.copy(source.specularColor);this.specularColorMap=source.specularColorMap;return this}}class MeshPhongMaterial extends Material{constructor(parameters){super();this.isMeshPhongMaterial=true;this.type="MeshPhongMaterial";this.color=new Color(16777215);this.specular=new Color(1118481);this.shininess=30;this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.specular.copy(source.specular);this.shininess=source.shininess;this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshToonMaterial extends Material{constructor(parameters){super();this.isMeshToonMaterial=true;this.defines={"TOON":""};this.type="MeshToonMaterial";this.color=new Color(16777215);this.map=null;this.gradientMap=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.gradientMap=source.gradientMap;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.alphaMap=source.alphaMap;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.fog=source.fog;return this}}class MeshNormalMaterial extends Material{constructor(parameters){super();this.isMeshNormalMaterial=true;this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=false;this.wireframeLinewidth=1;this.flatShading=false;this.setValues(parameters)}copy(source){super.copy(source);this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.flatShading=source.flatShading;return this}}class MeshLambertMaterial extends Material{constructor(parameters){super();this.isMeshLambertMaterial=true;this.type="MeshLambertMaterial";this.color=new Color(16777215);this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshDepthMaterial extends Material{constructor(parameters){super();this.isMeshDepthMaterial=true;this.type="MeshDepthMaterial";this.depthPacking=BasicDepthPacking;this.map=null;this.alphaMap=null;this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=false;this.wireframeLinewidth=1;this.setValues(parameters)}copy(source){super.copy(source);this.depthPacking=source.depthPacking;this.map=source.map;this.alphaMap=source.alphaMap;this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;return this}}class MeshDistanceMaterial extends Material{constructor(parameters){super();this.isMeshDistanceMaterial=true;this.type="MeshDistanceMaterial";this.map=null;this.alphaMap=null;this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.setValues(parameters)}copy(source){super.copy(source);this.map=source.map;this.alphaMap=source.alphaMap;this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;return this}}class MeshMatcapMaterial extends Material{constructor(parameters){super();this.isMeshMatcapMaterial=true;this.defines={"MATCAP":""};this.type="MeshMatcapMaterial";this.color=new Color(16777215);this.matcap=null;this.map=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=false;this.wireframeLinewidth=1;this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.defines={"MATCAP":""};this.color.copy(source.color);this.matcap=source.matcap;this.map=source.map;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.alphaMap=source.alphaMap;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class LineDashedMaterial extends LineBasicMaterial{constructor(parameters){super();this.isLineDashedMaterial=true;this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(parameters)}copy(source){super.copy(source);this.scale=source.scale;this.dashSize=source.dashSize;this.gapSize=source.gapSize;return this}}function convertArray(array,type){if(!array||array.constructor===type)return array;if(typeof type.BYTES_PER_ELEMENT==="number"){return new type(array)}return Array.prototype.slice.call(array)}function getKeyframeOrder(times){function compareTime(i,j){return times[i]-times[j]}const n=times.length;const result=new Array(n);for(let i=0;i!==n;++i)result[i]=i;result.sort(compareTime);return result}function sortedArray(values,stride,order){const nValues=values.length;const result=new values.constructor(nValues);for(let i=0,dstOffset=0;dstOffset!==nValues;++i){const srcOffset=order[i]*stride;for(let j=0;j!==stride;++j){result[dstOffset++]=values[srcOffset+j]}}return result}function flattenJSON(jsonKeys,times,values,valuePropertyName){let i=1,key=jsonKeys[0];while(key!==undefined&&key[valuePropertyName]===undefined){key=jsonKeys[i++]}if(key===undefined)return;let value=key[valuePropertyName];if(value===undefined)return;if(Array.isArray(value)){do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);values.push(...value)}key=jsonKeys[i++]}while(key!==undefined)}else if(value.toArray!==undefined){do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);value.toArray(values,values.length)}key=jsonKeys[i++]}while(key!==undefined)}else{do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);values.push(value)}key=jsonKeys[i++]}while(key!==undefined)}}function subclip(sourceClip,name,startFrame,endFrame,fps=30){const clip=sourceClip.clone();clip.name=name;const tracks=[];for(let i=0;i<clip.tracks.length;++i){const track=clip.tracks[i];const valueSize=track.getValueSize();const times=[];const values=[];for(let j=0;j<track.times.length;++j){const frame=track.times[j]*fps;if(frame<startFrame||frame>=endFrame)continue;times.push(track.times[j]);for(let k=0;k<valueSize;++k){values.push(track.values[j*valueSize+k])}}if(times.length===0)continue;track.times=convertArray(times,track.times.constructor);track.values=convertArray(values,track.values.constructor);tracks.push(track)}clip.tracks=tracks;let minStartTime=Infinity;for(let i=0;i<clip.tracks.length;++i){if(minStartTime>clip.tracks[i].times[0]){minStartTime=clip.tracks[i].times[0]}}for(let i=0;i<clip.tracks.length;++i){clip.tracks[i].shift(-1*minStartTime)}clip.resetDuration();return clip}function makeClipAdditive(targetClip,referenceFrame=0,referenceClip=targetClip,fps=30){if(fps<=0)fps=30;const numTracks=referenceClip.tracks.length;const referenceTime=referenceFrame/fps;for(let i=0;i<numTracks;++i){const referenceTrack=referenceClip.tracks[i];const referenceTrackType=referenceTrack.ValueTypeName;if(referenceTrackType==="bool"||referenceTrackType==="string")continue;const targetTrack=targetClip.tracks.find(function(track){return track.name===referenceTrack.name&&track.ValueTypeName===referenceTrackType});if(targetTrack===undefined)continue;let referenceOffset=0;const referenceValueSize=referenceTrack.getValueSize();if(referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline){referenceOffset=referenceValueSize/3}let targetOffset=0;const targetValueSize=targetTrack.getValueSize();if(targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline){targetOffset=targetValueSize/3}const lastIndex=referenceTrack.times.length-1;let referenceValue;if(referenceTime<=referenceTrack.times[0]){const startIndex=referenceOffset;const endIndex=referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else if(referenceTime>=referenceTrack.times[lastIndex]){const startIndex=lastIndex*referenceValueSize+referenceOffset;const endIndex=startIndex+referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else{const interpolant=referenceTrack.createInterpolant();const startIndex=referenceOffset;const endIndex=referenceValueSize-referenceOffset;interpolant.evaluate(referenceTime);referenceValue=interpolant.resultBuffer.slice(startIndex,endIndex)}if(referenceTrackType==="quaternion"){const referenceQuat=new Quaternion().fromArray(referenceValue).normalize().conjugate();referenceQuat.toArray(referenceValue)}const numTimes=targetTrack.times.length;for(let j=0;j<numTimes;++j){const valueStart=j*targetValueSize+targetOffset;if(referenceTrackType==="quaternion"){Quaternion.multiplyQuaternionsFlat(targetTrack.values,valueStart,referenceValue,0,targetTrack.values,valueStart)}else{const valueEnd=targetValueSize-targetOffset*2;for(let k=0;k<valueEnd;++k){targetTrack.values[valueStart+k]-=referenceValue[k]}}}}targetClip.blendMode=AdditiveAnimationBlendMode;return targetClip}class AnimationUtils{static convertArray(array,type){return convertArray(array,type)}static isTypedArray(object){return isTypedArray(object)}static getKeyframeOrder(times){return getKeyframeOrder(times)}static sortedArray(values,stride,order){return sortedArray(values,stride,order)}static flattenJSON(jsonKeys,times,values,valuePropertyName){flattenJSON(jsonKeys,times,values,valuePropertyName)}static subclip(sourceClip,name,startFrame,endFrame,fps=30){return subclip(sourceClip,name,startFrame,endFrame,fps)}static makeClipAdditive(targetClip,referenceFrame=0,referenceClip=targetClip,fps=30){return makeClipAdditive(targetClip,referenceFrame,referenceClip,fps)}}class Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){this.parameterPositions=parameterPositions;this._cachedIndex=0;this.resultBuffer=resultBuffer!==undefined?resultBuffer:new sampleValues.constructor(sampleSize);this.sampleValues=sampleValues;this.valueSize=sampleSize;this.settings=null;this.DefaultSettings_={}}evaluate(t){const pp=this.parameterPositions;let i1=this._cachedIndex,t1=pp[i1],t0=pp[i1-1];validate_interval:{seek:{let right;linear_scan:{forward_scan:if(!(t<t1)){for(let giveUpAt=i1+2;;){if(t1===undefined){if(t<t0)break forward_scan;i1=pp.length;this._cachedIndex=i1;return this.copySampleValue_(i1-1)}if(i1===giveUpAt)break;t0=t1;t1=pp[++i1];if(t<t1){break seek}}right=pp.length;break linear_scan}if(!(t>=t0)){const t1global=pp[1];if(t<t1global){i1=2;t0=t1global}for(let giveUpAt=i1-2;;){if(t0===undefined){this._cachedIndex=0;return this.copySampleValue_(0)}if(i1===giveUpAt)break;t1=t0;t0=pp[--i1-1];if(t>=t0){break seek}}right=i1;i1=0;break linear_scan}break validate_interval}while(i1<right){const mid=i1+right>>>1;if(t<pp[mid]){right=mid}else{i1=mid+1}}t1=pp[i1];t0=pp[i1-1];if(t0===undefined){this._cachedIndex=0;return this.copySampleValue_(0)}if(t1===undefined){i1=pp.length;this._cachedIndex=i1;return this.copySampleValue_(i1-1)}}this._cachedIndex=i1;this.intervalChanged_(i1,t0,t1)}return this.interpolate_(i1,t0,t,t1)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(index){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,offset=index*stride;for(let i=0;i!==stride;++i){result[i]=values[offset+i]}return result}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class CubicInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer);this._weightPrev=-0;this._offsetPrev=-0;this._weightNext=-0;this._offsetNext=-0;this.DefaultSettings_={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding}}intervalChanged_(i1,t0,t1){const pp=this.parameterPositions;let iPrev=i1-2,iNext=i1+1,tPrev=pp[iPrev],tNext=pp[iNext];if(tPrev===undefined){switch(this.getSettings_().endingStart){case ZeroSlopeEnding:iPrev=i1;tPrev=2*t0-t1;break;case WrapAroundEnding:iPrev=pp.length-2;tPrev=t0+pp[iPrev]-pp[iPrev+1];break;default:iPrev=i1;tPrev=t1;}}if(tNext===undefined){switch(this.getSettings_().endingEnd){case ZeroSlopeEnding:iNext=i1;tNext=2*t1-t0;break;case WrapAroundEnding:iNext=1;tNext=t1+pp[1]-pp[0];break;default:iNext=i1-1;tNext=t0;}}const halfDt=(t1-t0)*0.5,stride=this.valueSize;this._weightPrev=halfDt/(t0-tPrev);this._weightNext=halfDt/(tNext-t1);this._offsetPrev=iPrev*stride;this._offsetNext=iNext*stride}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,o1=i1*stride,o0=o1-stride,oP=this._offsetPrev,oN=this._offsetNext,wP=this._weightPrev,wN=this._weightNext,p=(t-t0)/(t1-t0),pp=p*p,ppp=pp*p;const sP=-wP*ppp+2*wP*pp-wP*p;const s0=(1+wP)*ppp+(-1.5-2*wP)*pp+(-0.5+wP)*p+1;const s1=(-1-wN)*ppp+(1.5+wN)*pp+0.5*p;const sN=wN*ppp-wN*pp;for(let i=0;i!==stride;++i){result[i]=sP*values[oP+i]+s0*values[o0+i]+s1*values[o1+i]+sN*values[oN+i]}return result}}class LinearInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,offset1=i1*stride,offset0=offset1-stride,weight1=(t-t0)/(t1-t0),weight0=1-weight1;for(let i=0;i!==stride;++i){result[i]=values[offset0+i]*weight0+values[offset1+i]*weight1}return result}}class DiscreteInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1){return this.copySampleValue_(i1-1)}}class KeyframeTrack{constructor(name,times,values,interpolation){if(name===undefined)throw new Error("THREE.KeyframeTrack: track name is undefined");if(times===undefined||times.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+name);this.name=name;this.times=convertArray(times,this.TimeBufferType);this.values=convertArray(values,this.ValueBufferType);this.setInterpolation(interpolation||this.DefaultInterpolation)}static toJSON(track){const trackType=track.constructor;let json;if(trackType.toJSON!==this.toJSON){json=trackType.toJSON(track)}else{json={"name":track.name,"times":convertArray(track.times,Array),"values":convertArray(track.values,Array)};const interpolation=track.getInterpolation();if(interpolation!==track.DefaultInterpolation){json.interpolation=interpolation}}json.type=track.ValueTypeName;return json}InterpolantFactoryMethodDiscrete(result){return new DiscreteInterpolant(this.times,this.values,this.getValueSize(),result)}InterpolantFactoryMethodLinear(result){return new LinearInterpolant(this.times,this.values,this.getValueSize(),result)}InterpolantFactoryMethodSmooth(result){return new CubicInterpolant(this.times,this.values,this.getValueSize(),result)}setInterpolation(interpolation){let factoryMethod;switch(interpolation){case InterpolateDiscrete:factoryMethod=this.InterpolantFactoryMethodDiscrete;break;case InterpolateLinear:factoryMethod=this.InterpolantFactoryMethodLinear;break;case InterpolateSmooth:factoryMethod=this.InterpolantFactoryMethodSmooth;break;}if(factoryMethod===undefined){const message="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===undefined){if(interpolation!==this.DefaultInterpolation){this.setInterpolation(this.DefaultInterpolation)}else{throw new Error(message)}}warn("KeyframeTrack:",message);return this}this.createInterpolant=factoryMethod;return this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return InterpolateSmooth;}}getValueSize(){return this.values.length/this.times.length}shift(timeOffset){if(timeOffset!==0){const times=this.times;for(let i=0,n=times.length;i!==n;++i){times[i]+=timeOffset}}return this}scale(timeScale){if(timeScale!==1){const times=this.times;for(let i=0,n=times.length;i!==n;++i){times[i]*=timeScale}}return this}trim(startTime,endTime){const times=this.times,nKeys=times.length;let from=0,to=nKeys-1;while(from!==nKeys&&times[from]<startTime){++from}while(to!==-1&&times[to]>endTime){--to}++to;if(from!==0||to!==nKeys){if(from>=to){to=Math.max(to,1);from=to-1}const stride=this.getValueSize();this.times=times.slice(from,to);this.values=this.values.slice(from*stride,to*stride)}return this}validate(){let valid=true;const valueSize=this.getValueSize();if(valueSize-Math.floor(valueSize)!==0){error("KeyframeTrack: Invalid value size in track.",this);valid=false}const times=this.times,values=this.values,nKeys=times.length;if(nKeys===0){error("KeyframeTrack: Track is empty.",this);valid=false}let prevTime=null;for(let i=0;i!==nKeys;i++){const currTime=times[i];if(typeof currTime==="number"&&isNaN(currTime)){error("KeyframeTrack: Time is not a valid number.",this,i,currTime);valid=false;break}if(prevTime!==null&&prevTime>currTime){error("KeyframeTrack: Out of order keys.",this,i,currTime,prevTime);valid=false;break}prevTime=currTime}if(values!==undefined){if(isTypedArray(values)){for(let i=0,n=values.length;i!==n;++i){const value=values[i];if(isNaN(value)){error("KeyframeTrack: Value is not a valid number.",this,i,value);valid=false;break}}}}return valid}optimize(){const times=this.times.slice(),values=this.values.slice(),stride=this.getValueSize(),smoothInterpolation=this.getInterpolation()===InterpolateSmooth,lastIndex=times.length-1;let writeIndex=1;for(let i=1;i<lastIndex;++i){let keep=false;const time=times[i];const timeNext=times[i+1];if(time!==timeNext&&(i!==1||time!==times[0])){if(!smoothInterpolation){const offset=i*stride,offsetP=offset-stride,offsetN=offset+stride;for(let j=0;j!==stride;++j){const value=values[offset+j];if(value!==values[offsetP+j]||value!==values[offsetN+j]){keep=true;break}}}else{keep=true}}if(keep){if(i!==writeIndex){times[writeIndex]=times[i];const readOffset=i*stride,writeOffset=writeIndex*stride;for(let j=0;j!==stride;++j){values[writeOffset+j]=values[readOffset+j]}}++writeIndex}}if(lastIndex>0){times[writeIndex]=times[lastIndex];for(let readOffset=lastIndex*stride,writeOffset=writeIndex*stride,j=0;j!==stride;++j){values[writeOffset+j]=values[readOffset+j]}++writeIndex}if(writeIndex!==times.length){this.times=times.slice(0,writeIndex);this.values=values.slice(0,writeIndex*stride)}else{this.times=times;this.values=values}return this}clone(){const times=this.times.slice();const values=this.values.slice();const TypedKeyframeTrack=this.constructor;const track=new TypedKeyframeTrack(this.name,times,values);track.createInterpolant=this.createInterpolant;return track}}KeyframeTrack.prototype.ValueTypeName="";KeyframeTrack.prototype.TimeBufferType=Float32Array;KeyframeTrack.prototype.ValueBufferType=Float32Array;KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;class BooleanKeyframeTrack extends KeyframeTrack{constructor(name,times,values){super(name,times,values)}}BooleanKeyframeTrack.prototype.ValueTypeName="bool";BooleanKeyframeTrack.prototype.ValueBufferType=Array;BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=undefined;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class ColorKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,alpha=(t-t0)/(t1-t0);let offset=i1*stride;for(let end=offset+stride;offset!==end;offset+=4){Quaternion.slerpFlat(result,0,values,offset-stride,values,offset,alpha)}return result}}class QuaternionKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}InterpolantFactoryMethodLinear(result){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),result)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion";QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class StringKeyframeTrack extends KeyframeTrack{constructor(name,times,values){super(name,times,values)}}StringKeyframeTrack.prototype.ValueTypeName="string";StringKeyframeTrack.prototype.ValueBufferType=Array;StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=undefined;StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class VectorKeyframeTrack extends KeyframeTrack{constructor(name,times,values,interpolation){super(name,times,values,interpolation)}}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(name="",duration=-1,tracks=[],blendMode=NormalAnimationBlendMode){this.name=name;this.tracks=tracks;this.duration=duration;this.blendMode=blendMode;this.uuid=generateUUID();this.userData={};if(this.duration<0){this.resetDuration()}}static parse(json){const tracks=[],jsonTracks=json.tracks,frameTime=1/(json.fps||1);for(let i=0,n=jsonTracks.length;i!==n;++i){tracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime))}const clip=new this(json.name,json.duration,tracks,json.blendMode);clip.uuid=json.uuid;clip.userData=JSON.parse(json.userData||"{}");return clip}static toJSON(clip){const tracks=[],clipTracks=clip.tracks;const json={"name":clip.name,"duration":clip.duration,"tracks":tracks,"uuid":clip.uuid,"blendMode":clip.blendMode,"userData":JSON.stringify(clip.userData)};for(let i=0,n=clipTracks.length;i!==n;++i){tracks.push(KeyframeTrack.toJSON(clipTracks[i]))}return json}static CreateFromMorphTargetSequence(name,morphTargetSequence,fps,noLoop){const numMorphTargets=morphTargetSequence.length;const tracks=[];for(let i=0;i<numMorphTargets;i++){let times=[];let values=[];times.push((i+numMorphTargets-1)%numMorphTargets,i,(i+1)%numMorphTargets);values.push(0,1,0);const order=getKeyframeOrder(times);times=sortedArray(times,1,order);values=sortedArray(values,1,order);if(!noLoop&&times[0]===0){times.push(numMorphTargets);values.push(values[0])}tracks.push(new NumberKeyframeTrack(".morphTargetInfluences["+morphTargetSequence[i].name+"]",times,values).scale(1/fps))}return new this(name,-1,tracks)}static findByName(objectOrClipArray,name){let clipArray=objectOrClipArray;if(!Array.isArray(objectOrClipArray)){const o=objectOrClipArray;clipArray=o.geometry&&o.geometry.animations||o.animations}for(let i=0;i<clipArray.length;i++){if(clipArray[i].name===name){return clipArray[i]}}return null}static CreateClipsFromMorphTargetSequences(morphTargets,fps,noLoop){const animationToMorphTargets={};const pattern=/^([\w-]*?)([\d]+)$/;for(let i=0,il=morphTargets.length;i<il;i++){const morphTarget=morphTargets[i];const parts=morphTarget.name.match(pattern);if(parts&&parts.length>1){const name=parts[1];let animationMorphTargets=animationToMorphTargets[name];if(!animationMorphTargets){animationToMorphTargets[name]=animationMorphTargets=[]}animationMorphTargets.push(morphTarget)}}const clips=[];for(const name in animationToMorphTargets){clips.push(this.CreateFromMorphTargetSequence(name,animationToMorphTargets[name],fps,noLoop))}return clips}static parseAnimation(animation,bones){warn("AnimationClip: parseAnimation() is deprecated and will be removed with r185");if(!animation){error("AnimationClip: No animation in JSONLoader data.");return null}const addNonemptyTrack=function(trackType,trackName,animationKeys,propertyName,destTracks){if(animationKeys.length!==0){const times=[];const values=[];flattenJSON(animationKeys,times,values,propertyName);if(times.length!==0){destTracks.push(new trackType(trackName,times,values))}}};const tracks=[];const clipName=animation.name||"default";const fps=animation.fps||30;const blendMode=animation.blendMode;let duration=animation.length||-1;const hierarchyTracks=animation.hierarchy||[];for(let h=0;h<hierarchyTracks.length;h++){const animationKeys=hierarchyTracks[h].keys;if(!animationKeys||animationKeys.length===0)continue;if(animationKeys[0].morphTargets){const morphTargetNames={};let k;for(k=0;k<animationKeys.length;k++){if(animationKeys[k].morphTargets){for(let m=0;m<animationKeys[k].morphTargets.length;m++){morphTargetNames[animationKeys[k].morphTargets[m]]=-1}}}for(const morphTargetName in morphTargetNames){const times=[];const values=[];for(let m=0;m!==animationKeys[k].morphTargets.length;++m){const animationKey=animationKeys[k];times.push(animationKey.time);values.push(animationKey.morphTarget===morphTargetName?1:0)}tracks.push(new NumberKeyframeTrack(".morphTargetInfluence["+morphTargetName+"]",times,values))}duration=morphTargetNames.length*fps}else{const boneName=".bones["+bones[h].name+"]";addNonemptyTrack(VectorKeyframeTrack,boneName+".position",animationKeys,"pos",tracks);addNonemptyTrack(QuaternionKeyframeTrack,boneName+".quaternion",animationKeys,"rot",tracks);addNonemptyTrack(VectorKeyframeTrack,boneName+".scale",animationKeys,"scl",tracks)}}if(tracks.length===0){return null}const clip=new this(clipName,duration,tracks,blendMode);return clip}resetDuration(){const tracks=this.tracks;let duration=0;for(let i=0,n=tracks.length;i!==n;++i){const track=this.tracks[i];duration=Math.max(duration,track.times[track.times.length-1])}this.duration=duration;return this}trim(){for(let i=0;i<this.tracks.length;i++){this.tracks[i].trim(0,this.duration)}return this}validate(){let valid=true;for(let i=0;i<this.tracks.length;i++){valid=valid&&this.tracks[i].validate()}return valid}optimize(){for(let i=0;i<this.tracks.length;i++){this.tracks[i].optimize()}return this}clone(){const tracks=[];for(let i=0;i<this.tracks.length;i++){tracks.push(this.tracks[i].clone())}const clip=new this.constructor(this.name,this.duration,tracks,this.blendMode);clip.userData=JSON.parse(JSON.stringify(this.userData));return clip}toJSON(){return this.constructor.toJSON(this)}}function getTrackTypeForValueTypeName(typeName){switch(typeName.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return VectorKeyframeTrack;case"color":return ColorKeyframeTrack;case"quaternion":return QuaternionKeyframeTrack;case"bool":case"boolean":return BooleanKeyframeTrack;case"string":return StringKeyframeTrack;}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+typeName)}function parseKeyframeTrack(json){if(json.type===undefined){throw new Error("THREE.KeyframeTrack: track type undefined, can not parse")}const trackType=getTrackTypeForValueTypeName(json.type);if(json.times===undefined){const times=[],values=[];flattenJSON(json.keys,times,values,"value");json.times=times;json.values=values}if(trackType.parse!==undefined){return trackType.parse(json)}else{return new trackType(json.name,json.times,json.values,json.interpolation)}}const Cache={enabled:false,files:{},add:function(key,file){if(this.enabled===false)return;this.files[key]=file},get:function(key){if(this.enabled===false)return;return this.files[key]},remove:function(key){delete this.files[key]},clear:function(){this.files={}}};class LoadingManager{constructor(onLoad,onProgress,onError){const scope=this;let isLoading=false;let itemsLoaded=0;let itemsTotal=0;let urlModifier=undefined;const handlers=[];this.onStart=undefined;this.onLoad=onLoad;this.onProgress=onProgress;this.onError=onError;this._abortController=null;this.itemStart=function(url){itemsTotal++;if(isLoading===false){if(scope.onStart!==undefined){scope.onStart(url,itemsLoaded,itemsTotal)}}isLoading=true};this.itemEnd=function(url){itemsLoaded++;if(scope.onProgress!==undefined){scope.onProgress(url,itemsLoaded,itemsTotal)}if(itemsLoaded===itemsTotal){isLoading=false;if(scope.onLoad!==undefined){scope.onLoad()}}};this.itemError=function(url){if(scope.onError!==undefined){scope.onError(url)}};this.resolveURL=function(url){if(urlModifier){return urlModifier(url)}return url};this.setURLModifier=function(transform){urlModifier=transform;return this};this.addHandler=function(regex,loader){handlers.push(regex,loader);return this};this.removeHandler=function(regex){const index=handlers.indexOf(regex);if(index!==-1){handlers.splice(index,2)}return this};this.getHandler=function(file){for(let i=0,l=handlers.length;i<l;i+=2){const regex=handlers[i];const loader=handlers[i+1];if(regex.global)regex.lastIndex=0;if(regex.test(file)){return loader}}return null};this.abort=function(){this.abortController.abort();this._abortController=null;return this}}get abortController(){if(!this._abortController){this._abortController=new AbortController}return this._abortController}}const DefaultLoadingManager=new LoadingManager;class Loader{constructor(manager){this.manager=manager!==undefined?manager:DefaultLoadingManager;this.crossOrigin="anonymous";this.withCredentials=false;this.path="";this.resourcePath="";this.requestHeader={}}load(){}loadAsync(url,onProgress){const scope=this;return new Promise(function(resolve,reject){scope.load(url,resolve,onProgress,reject)})}parse(){}setCrossOrigin(crossOrigin){this.crossOrigin=crossOrigin;return this}setWithCredentials(value){this.withCredentials=value;return this}setPath(path){this.path=path;return this}setResourcePath(resourcePath){this.resourcePath=resourcePath;return this}setRequestHeader(requestHeader){this.requestHeader=requestHeader;return this}abort(){return this}}Loader.DEFAULT_MATERIAL_NAME="__DEFAULT";const loading={};class HttpError extends Error{constructor(message,response){super(message);this.response=response}}class FileLoader extends Loader{constructor(manager){super(manager);this.mimeType="";this.responseType="";this._abortController=new AbortController}load(url,onLoad,onProgress,onError){if(url===undefined)url="";if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const cached=Cache.get(`file:${url}`);if(cached!==undefined){this.manager.itemStart(url);setTimeout(()=>{if(onLoad)onLoad(cached);this.manager.itemEnd(url)},0);return cached}if(loading[url]!==undefined){loading[url].push({onLoad:onLoad,onProgress:onProgress,onError:onError});return}loading[url]=[];loading[url].push({onLoad:onLoad,onProgress:onProgress,onError:onError});const req=new Request(url,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any==="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal});const mimeType=this.mimeType;const responseType=this.responseType;fetch(req).then(response=>{if(response.status===200||response.status===0){if(response.status===0){warn("FileLoader: HTTP Status 0 received.")}if(typeof ReadableStream==="undefined"||response.body===undefined||response.body.getReader===undefined){return response}const callbacks=loading[url];const reader=response.body.getReader();const contentLength=response.headers.get("X-File-Size")||response.headers.get("Content-Length");const total=contentLength?parseInt(contentLength):0;const lengthComputable=total!==0;let loaded=0;const stream=new ReadableStream({start(controller){readData();function readData(){reader.read().then(({done,value})=>{if(done){controller.close()}else{loaded+=value.byteLength;const event=new ProgressEvent("progress",{lengthComputable,loaded,total});for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onProgress)callback.onProgress(event)}controller.enqueue(value);readData()}},e=>{controller.error(e)})}}});return new Response(stream)}else{throw new HttpError(`fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`,response)}}).then(response=>{switch(responseType){case"arraybuffer":return response.arrayBuffer();case"blob":return response.blob();case"document":return response.text().then(text=>{const parser=new DOMParser;return parser.parseFromString(text,mimeType)});case"json":return response.json();default:if(mimeType===""){return response.text()}else{const re=/charset="?([^;"\s]*)"?/i;const exec=re.exec(mimeType);const label=exec&&exec[1]?exec[1].toLowerCase():undefined;const decoder=new TextDecoder(label);return response.arrayBuffer().then(ab=>decoder.decode(ab))}}}).then(data=>{Cache.add(`file:${url}`,data);const callbacks=loading[url];delete loading[url];for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onLoad)callback.onLoad(data)}}).catch(err=>{const callbacks=loading[url];if(callbacks===undefined){this.manager.itemError(url);throw err}delete loading[url];for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onError)callback.onError(err)}this.manager.itemError(url)}).finally(()=>{this.manager.itemEnd(url)});this.manager.itemStart(url)}setResponseType(value){this.responseType=value;return this}setMimeType(value){this.mimeType=value;return this}abort(){this._abortController.abort();this._abortController=new AbortController;return this}}class AnimationLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const animations=[];for(let i=0;i<json.length;i++){const clip=AnimationClip.parse(json[i]);animations.push(clip)}return animations}}class CompressedTextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const images=[];const texture=new CompressedTexture;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(scope.withCredentials);let loaded=0;function loadTexture(i){loader.load(url[i],function(buffer){const texDatas=scope.parse(buffer,true);images[i]={width:texDatas.width,height:texDatas.height,format:texDatas.format,mipmaps:texDatas.mipmaps};loaded+=1;if(loaded===6){if(texDatas.mipmapCount===1)texture.minFilter=LinearFilter;texture.image=images;texture.format=texDatas.format;texture.needsUpdate=true;if(onLoad)onLoad(texture)}},onProgress,onError)}if(Array.isArray(url)){for(let i=0,il=url.length;i<il;++i){loadTexture(i)}}else{loader.load(url,function(buffer){const texDatas=scope.parse(buffer,true);if(texDatas.isCubemap){const faces=texDatas.mipmaps.length/texDatas.mipmapCount;for(let f=0;f<faces;f++){images[f]={mipmaps:[]};for(let i=0;i<texDatas.mipmapCount;i++){images[f].mipmaps.push(texDatas.mipmaps[f*texDatas.mipmapCount+i]);images[f].format=texDatas.format;images[f].width=texDatas.width;images[f].height=texDatas.height}}texture.image=images}else{texture.image.width=texDatas.width;texture.image.height=texDatas.height;texture.mipmaps=texDatas.mipmaps}if(texDatas.mipmapCount===1){texture.minFilter=LinearFilter}texture.format=texDatas.format;texture.needsUpdate=true;if(onLoad)onLoad(texture)},onProgress,onError)}return texture}}const _loading=new WeakMap;class ImageLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const scope=this;const cached=Cache.get(`image:${url}`);if(cached!==undefined){if(cached.complete===true){scope.manager.itemStart(url);setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0)}else{let arr=_loading.get(cached);if(arr===undefined){arr=[];_loading.set(cached,arr)}arr.push({onLoad,onError})}return cached}const image=createElementNS("img");function onImageLoad(){removeEventListeners();if(onLoad)onLoad(this);const callbacks=_loading.get(this)||[];for(let i=0;i<callbacks.length;i++){const callback=callbacks[i];if(callback.onLoad)callback.onLoad(this)}_loading.delete(this);scope.manager.itemEnd(url)}function onImageError(event){removeEventListeners();if(onError)onError(event);Cache.remove(`image:${url}`);const callbacks=_loading.get(this)||[];for(let i=0;i<callbacks.length;i++){const callback=callbacks[i];if(callback.onError)callback.onError(event)}_loading.delete(this);scope.manager.itemError(url);scope.manager.itemEnd(url)}function removeEventListeners(){image.removeEventListener("load",onImageLoad,false);image.removeEventListener("error",onImageError,false)}image.addEventListener("load",onImageLoad,false);image.addEventListener("error",onImageError,false);if(url.slice(0,5)!=="data:"){if(this.crossOrigin!==undefined)image.crossOrigin=this.crossOrigin}Cache.add(`image:${url}`,image);scope.manager.itemStart(url);image.src=url;return image}}class CubeTextureLoader extends Loader{constructor(manager){super(manager)}load(urls,onLoad,onProgress,onError){const texture=new CubeTexture;texture.colorSpace=SRGBColorSpace;const loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);loader.setPath(this.path);let loaded=0;function loadTexture(i){loader.load(urls[i],function(image){texture.images[i]=image;loaded++;if(loaded===6){texture.needsUpdate=true;if(onLoad)onLoad(texture)}},undefined,onError)}for(let i=0;i<urls.length;++i){loadTexture(i)}return texture}}class DataTextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const texture=new DataTexture;const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setPath(this.path);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(buffer){let texData;try{texData=scope.parse(buffer)}catch(error){if(onError!==undefined){onError(error)}else{error(error);return}}if(texData.image!==undefined){texture.image=texData.image}else if(texData.data!==undefined){texture.image.width=texData.width;texture.image.height=texData.height;texture.image.data=texData.data}texture.wrapS=texData.wrapS!==undefined?texData.wrapS:ClampToEdgeWrapping;texture.wrapT=texData.wrapT!==undefined?texData.wrapT:ClampToEdgeWrapping;texture.magFilter=texData.magFilter!==undefined?texData.magFilter:LinearFilter;texture.minFilter=texData.minFilter!==undefined?texData.minFilter:LinearFilter;texture.anisotropy=texData.anisotropy!==undefined?texData.anisotropy:1;if(texData.colorSpace!==undefined){texture.colorSpace=texData.colorSpace}if(texData.flipY!==undefined){texture.flipY=texData.flipY}if(texData.format!==undefined){texture.format=texData.format}if(texData.type!==undefined){texture.type=texData.type}if(texData.mipmaps!==undefined){texture.mipmaps=texData.mipmaps;texture.minFilter=LinearMipmapLinearFilter}if(texData.mipmapCount===1){texture.minFilter=LinearFilter}if(texData.generateMipmaps!==undefined){texture.generateMipmaps=texData.generateMipmaps}texture.needsUpdate=true;if(onLoad)onLoad(texture,texData)},onProgress,onError);return texture}}class TextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const texture=new Texture;const loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);loader.setPath(this.path);loader.load(url,function(image){texture.image=image;texture.needsUpdate=true;if(onLoad!==undefined){onLoad(texture)}},onProgress,onError);return texture}}class Light extends Object3D{constructor(color,intensity=1){super();this.isLight=true;this.type="Light";this.color=new Color(color);this.intensity=intensity}dispose(){this.dispatchEvent({type:"dispose"})}copy(source,recursive){super.copy(source,recursive);this.color.copy(source.color);this.intensity=source.intensity;return this}toJSON(meta){const data=super.toJSON(meta);data.object.color=this.color.getHex();data.object.intensity=this.intensity;return data}}class HemisphereLight extends Light{constructor(skyColor,groundColor,intensity){super(skyColor,intensity);this.isHemisphereLight=true;this.type="HemisphereLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.groundColor=new Color(groundColor)}copy(source,recursive){super.copy(source,recursive);this.groundColor.copy(source.groundColor);return this}toJSON(meta){const data=super.toJSON(meta);data.object.groundColor=this.groundColor.getHex();return data}}const _projScreenMatrix$1=new Matrix4;const _lightPositionWorld$1=new Vector3;const _lookTarget$1=new Vector3;class LightShadow{constructor(camera){this.camera=camera;this.intensity=1;this.bias=0;this.normalBias=0;this.radius=1;this.blurSamples=8;this.mapSize=new Vector2(512,512);this.mapType=UnsignedByteType;this.map=null;this.mapPass=null;this.matrix=new Matrix4;this.autoUpdate=true;this.needsUpdate=false;this._frustum=new Frustum;this._frameExtents=new Vector2(1,1);this._viewportCount=1;this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(light){const shadowCamera=this.camera;const shadowMatrix=this.matrix;_lightPositionWorld$1.setFromMatrixPosition(light.matrixWorld);shadowCamera.position.copy(_lightPositionWorld$1);_lookTarget$1.setFromMatrixPosition(light.target.matrixWorld);shadowCamera.lookAt(_lookTarget$1);shadowCamera.updateMatrixWorld();_projScreenMatrix$1.multiplyMatrices(shadowCamera.projectionMatrix,shadowCamera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(_projScreenMatrix$1,shadowCamera.coordinateSystem,shadowCamera.reversedDepth);if(shadowCamera.reversedDepth){shadowMatrix.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,1,0,0,0,0,1)}else{shadowMatrix.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,0.5,0.5,0,0,0,1)}shadowMatrix.multiply(_projScreenMatrix$1)}getViewport(viewportIndex){return this._viewports[viewportIndex]}getFrameExtents(){return this._frameExtents}dispose(){if(this.map){this.map.dispose()}if(this.mapPass){this.mapPass.dispose()}}copy(source){this.camera=source.camera.clone();this.intensity=source.intensity;this.bias=source.bias;this.radius=source.radius;this.autoUpdate=source.autoUpdate;this.needsUpdate=source.needsUpdate;this.normalBias=source.normalBias;this.blurSamples=source.blurSamples;this.mapSize.copy(source.mapSize);return this}clone(){return new this.constructor().copy(this)}toJSON(){const object={};if(this.intensity!==1)object.intensity=this.intensity;if(this.bias!==0)object.bias=this.bias;if(this.normalBias!==0)object.normalBias=this.normalBias;if(this.radius!==1)object.radius=this.radius;if(this.mapSize.x!==512||this.mapSize.y!==512)object.mapSize=this.mapSize.toArray();object.camera=this.camera.toJSON(false).object;delete object.camera.matrix;return object}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,0.5,500));this.isSpotLightShadow=true;this.focus=1;this.aspect=1}updateMatrices(light){const camera=this.camera;const fov=RAD2DEG*2*light.angle*this.focus;const aspect=this.mapSize.width/this.mapSize.height*this.aspect;const far=light.distance||camera.far;if(fov!==camera.fov||aspect!==camera.aspect||far!==camera.far){camera.fov=fov;camera.aspect=aspect;camera.far=far;camera.updateProjectionMatrix()}super.updateMatrices(light)}copy(source){super.copy(source);this.focus=source.focus;return this}}class SpotLight extends Light{constructor(color,intensity,distance=0,angle=Math.PI/3,penumbra=0,decay=2){super(color,intensity);this.isSpotLight=true;this.type="SpotLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.target=new Object3D;this.distance=distance;this.angle=angle;this.penumbra=penumbra;this.decay=decay;this.map=null;this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(power){this.intensity=power/Math.PI}dispose(){super.dispose();this.shadow.dispose()}copy(source,recursive){super.copy(source,recursive);this.distance=source.distance;this.angle=source.angle;this.penumbra=source.penumbra;this.decay=source.decay;this.target=source.target.clone();this.map=source.map;this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.distance=this.distance;data.object.angle=this.angle;data.object.decay=this.decay;data.object.penumbra=this.penumbra;data.object.target=this.target.uuid;if(this.map&&this.map.isTexture)data.object.map=this.map.toJSON(meta).uuid;data.object.shadow=this.shadow.toJSON();return data}}class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,0.5,500));this.isPointLightShadow=true}}class PointLight extends Light{constructor(color,intensity,distance=0,decay=2){super(color,intensity);this.isPointLight=true;this.type="PointLight";this.distance=distance;this.decay=decay;this.shadow=new PointLightShadow}get power(){return this.intensity*4*Math.PI}set power(power){this.intensity=power/(4*Math.PI)}dispose(){super.dispose();this.shadow.dispose()}copy(source,recursive){super.copy(source,recursive);this.distance=source.distance;this.decay=source.decay;this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.distance=this.distance;data.object.decay=this.decay;data.object.shadow=this.shadow.toJSON();return data}}class OrthographicCamera extends Camera{constructor(left=-1,right=1,top=1,bottom=-1,near=0.1,far=2000){super();this.isOrthographicCamera=true;this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=left;this.right=right;this.top=top;this.bottom=bottom;this.near=near;this.far=far;this.updateProjectionMatrix()}copy(source,recursive){super.copy(source,recursive);this.left=source.left;this.right=source.right;this.top=source.top;this.bottom=source.bottom;this.near=source.near;this.far=source.far;this.zoom=source.zoom;this.view=source.view===null?null:Object.assign({},source.view);return this}setViewOffset(fullWidth,fullHeight,x,y,width,height){if(this.view===null){this.view={enabled:true,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}}this.view.enabled=true;this.view.fullWidth=fullWidth;this.view.fullHeight=fullHeight;this.view.offsetX=x;this.view.offsetY=y;this.view.width=width;this.view.height=height;this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null){this.view.enabled=false}this.updateProjectionMatrix()}updateProjectionMatrix(){const dx=(this.right-this.left)/(2*this.zoom);const dy=(this.top-this.bottom)/(2*this.zoom);const cx=(this.right+this.left)/2;const cy=(this.top+this.bottom)/2;let left=cx-dx;let right=cx+dx;let top=cy+dy;let bottom=cy-dy;if(this.view!==null&&this.view.enabled){const scaleW=(this.right-this.left)/this.view.fullWidth/this.zoom;const scaleH=(this.top-this.bottom)/this.view.fullHeight/this.zoom;left+=scaleW*this.view.offsetX;right=left+scaleW*this.view.width;top-=scaleH*this.view.offsetY;bottom=top-scaleH*this.view.height}this.projectionMatrix.makeOrthographic(left,right,top,bottom,this.near,this.far,this.coordinateSystem,this.reversedDepth);this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(meta){const data=super.toJSON(meta);data.object.zoom=this.zoom;data.object.left=this.left;data.object.right=this.right;data.object.top=this.top;data.object.bottom=this.bottom;data.object.near=this.near;data.object.far=this.far;if(this.view!==null)data.object.view=Object.assign({},this.view);return data}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,0.5,500));this.isDirectionalLightShadow=true}}class DirectionalLight extends Light{constructor(color,intensity){super(color,intensity);this.isDirectionalLight=true;this.type="DirectionalLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.target=new Object3D;this.shadow=new DirectionalLightShadow}dispose(){super.dispose();this.shadow.dispose()}copy(source){super.copy(source);this.target=source.target.clone();this.shadow=source.shadow.clone();return this}toJSON(meta){const data=super.toJSON(meta);data.object.shadow=this.shadow.toJSON();data.object.target=this.target.uuid;return data}}class AmbientLight extends Light{constructor(color,intensity){super(color,intensity);this.isAmbientLight=true;this.type="AmbientLight"}}class RectAreaLight extends Light{constructor(color,intensity,width=10,height=10){super(color,intensity);this.isRectAreaLight=true;this.type="RectAreaLight";this.width=width;this.height=height}get power(){return this.intensity*this.width*this.height*Math.PI}set power(power){this.intensity=power/(this.width*this.height*Math.PI)}copy(source){super.copy(source);this.width=source.width;this.height=source.height;return this}toJSON(meta){const data=super.toJSON(meta);data.object.width=this.width;data.object.height=this.height;return data}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=true;this.coefficients=[];for(let i=0;i<9;i++){this.coefficients.push(new Vector3)}}set(coefficients){for(let i=0;i<9;i++){this.coefficients[i].copy(coefficients[i])}return this}zero(){for(let i=0;i<9;i++){this.coefficients[i].set(0,0,0)}return this}getAt(normal,target){const x=normal.x,y=normal.y,z=normal.z;const coeff=this.coefficients;target.copy(coeff[0]).multiplyScalar(0.282095);target.addScaledVector(coeff[1],0.488603*y);target.addScaledVector(coeff[2],0.488603*z);target.addScaledVector(coeff[3],0.488603*x);target.addScaledVector(coeff[4],1.092548*(x*y));target.addScaledVector(coeff[5],1.092548*(y*z));target.addScaledVector(coeff[6],0.315392*(3*z*z-1));target.addScaledVector(coeff[7],1.092548*(x*z));target.addScaledVector(coeff[8],0.546274*(x*x-y*y));return target}getIrradianceAt(normal,target){const x=normal.x,y=normal.y,z=normal.z;const coeff=this.coefficients;target.copy(coeff[0]).multiplyScalar(0.886227);target.addScaledVector(coeff[1],2*0.511664*y);target.addScaledVector(coeff[2],2*0.511664*z);target.addScaledVector(coeff[3],2*0.511664*x);target.addScaledVector(coeff[4],2*0.429043*x*y);target.addScaledVector(coeff[5],2*0.429043*y*z);target.addScaledVector(coeff[6],0.743125*z*z-0.247708);target.addScaledVector(coeff[7],2*0.429043*x*z);target.addScaledVector(coeff[8],0.429043*(x*x-y*y));return target}add(sh){for(let i=0;i<9;i++){this.coefficients[i].add(sh.coefficients[i])}return this}addScaledSH(sh,s){for(let i=0;i<9;i++){this.coefficients[i].addScaledVector(sh.coefficients[i],s)}return this}scale(s){for(let i=0;i<9;i++){this.coefficients[i].multiplyScalar(s)}return this}lerp(sh,alpha){for(let i=0;i<9;i++){this.coefficients[i].lerp(sh.coefficients[i],alpha)}return this}equals(sh){for(let i=0;i<9;i++){if(!this.coefficients[i].equals(sh.coefficients[i])){return false}}return true}copy(sh){return this.set(sh.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(array,offset=0){const coefficients=this.coefficients;for(let i=0;i<9;i++){coefficients[i].fromArray(array,offset+i*3)}return this}toArray(array=[],offset=0){const coefficients=this.coefficients;for(let i=0;i<9;i++){coefficients[i].toArray(array,offset+i*3)}return array}static getBasisAt(normal,shBasis){const x=normal.x,y=normal.y,z=normal.z;shBasis[0]=0.282095;shBasis[1]=0.488603*y;shBasis[2]=0.488603*z;shBasis[3]=0.488603*x;shBasis[4]=1.092548*x*y;shBasis[5]=1.092548*y*z;shBasis[6]=0.315392*(3*z*z-1);shBasis[7]=1.092548*x*z;shBasis[8]=0.546274*(x*x-y*y)}}class LightProbe extends Light{constructor(sh=new SphericalHarmonics3,intensity=1){super(undefined,intensity);this.isLightProbe=true;this.sh=sh}copy(source){super.copy(source);this.sh.copy(source.sh);return this}toJSON(meta){const data=super.toJSON(meta);data.object.sh=this.sh.toArray();return data}}class MaterialLoader extends Loader{constructor(manager){super(manager);this.textures={}}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(scope.manager);loader.setPath(scope.path);loader.setRequestHeader(scope.requestHeader);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const textures=this.textures;function getTexture(name){if(textures[name]===undefined){warn("MaterialLoader: Undefined texture",name)}return textures[name]}const material=this.createMaterialFromType(json.type);if(json.uuid!==undefined)material.uuid=json.uuid;if(json.name!==undefined)material.name=json.name;if(json.color!==undefined&&material.color!==undefined)material.color.setHex(json.color);if(json.roughness!==undefined)material.roughness=json.roughness;if(json.metalness!==undefined)material.metalness=json.metalness;if(json.sheen!==undefined)material.sheen=json.sheen;if(json.sheenColor!==undefined)material.sheenColor=new Color().setHex(json.sheenColor);if(json.sheenRoughness!==undefined)material.sheenRoughness=json.sheenRoughness;if(json.emissive!==undefined&&material.emissive!==undefined)material.emissive.setHex(json.emissive);if(json.specular!==undefined&&material.specular!==undefined)material.specular.setHex(json.specular);if(json.specularIntensity!==undefined)material.specularIntensity=json.specularIntensity;if(json.specularColor!==undefined&&material.specularColor!==undefined)material.specularColor.setHex(json.specularColor);if(json.shininess!==undefined)material.shininess=json.shininess;if(json.clearcoat!==undefined)material.clearcoat=json.clearcoat;if(json.clearcoatRoughness!==undefined)material.clearcoatRoughness=json.clearcoatRoughness;if(json.dispersion!==undefined)material.dispersion=json.dispersion;if(json.iridescence!==undefined)material.iridescence=json.iridescence;if(json.iridescenceIOR!==undefined)material.iridescenceIOR=json.iridescenceIOR;if(json.iridescenceThicknessRange!==undefined)material.iridescenceThicknessRange=json.iridescenceThicknessRange;if(json.transmission!==undefined)material.transmission=json.transmission;if(json.thickness!==undefined)material.thickness=json.thickness;if(json.attenuationDistance!==undefined)material.attenuationDistance=json.attenuationDistance;if(json.attenuationColor!==undefined&&material.attenuationColor!==undefined)material.attenuationColor.setHex(json.attenuationColor);if(json.anisotropy!==undefined)material.anisotropy=json.anisotropy;if(json.anisotropyRotation!==undefined)material.anisotropyRotation=json.anisotropyRotation;if(json.fog!==undefined)material.fog=json.fog;if(json.flatShading!==undefined)material.flatShading=json.flatShading;if(json.blending!==undefined)material.blending=json.blending;if(json.combine!==undefined)material.combine=json.combine;if(json.side!==undefined)material.side=json.side;if(json.shadowSide!==undefined)material.shadowSide=json.shadowSide;if(json.opacity!==undefined)material.opacity=json.opacity;if(json.transparent!==undefined)material.transparent=json.transparent;if(json.alphaTest!==undefined)material.alphaTest=json.alphaTest;if(json.alphaHash!==undefined)material.alphaHash=json.alphaHash;if(json.depthFunc!==undefined)material.depthFunc=json.depthFunc;if(json.depthTest!==undefined)material.depthTest=json.depthTest;if(json.depthWrite!==undefined)material.depthWrite=json.depthWrite;if(json.colorWrite!==undefined)material.colorWrite=json.colorWrite;if(json.blendSrc!==undefined)material.blendSrc=json.blendSrc;if(json.blendDst!==undefined)material.blendDst=json.blendDst;if(json.blendEquation!==undefined)material.blendEquation=json.blendEquation;if(json.blendSrcAlpha!==undefined)material.blendSrcAlpha=json.blendSrcAlpha;if(json.blendDstAlpha!==undefined)material.blendDstAlpha=json.blendDstAlpha;if(json.blendEquationAlpha!==undefined)material.blendEquationAlpha=json.blendEquationAlpha;if(json.blendColor!==undefined&&material.blendColor!==undefined)material.blendColor.setHex(json.blendColor);if(json.blendAlpha!==undefined)material.blendAlpha=json.blendAlpha;if(json.stencilWriteMask!==undefined)material.stencilWriteMask=json.stencilWriteMask;if(json.stencilFunc!==undefined)material.stencilFunc=json.stencilFunc;if(json.stencilRef!==undefined)material.stencilRef=json.stencilRef;if(json.stencilFuncMask!==undefined)material.stencilFuncMask=json.stencilFuncMask;if(json.stencilFail!==undefined)material.stencilFail=json.stencilFail;if(json.stencilZFail!==undefined)material.stencilZFail=json.stencilZFail;if(json.stencilZPass!==undefined)material.stencilZPass=json.stencilZPass;if(json.stencilWrite!==undefined)material.stencilWrite=json.stencilWrite;if(json.wireframe!==undefined)material.wireframe=json.wireframe;if(json.wireframeLinewidth!==undefined)material.wireframeLinewidth=json.wireframeLinewidth;if(json.wireframeLinecap!==undefined)material.wireframeLinecap=json.wireframeLinecap;if(json.wireframeLinejoin!==undefined)material.wireframeLinejoin=json.wireframeLinejoin;if(json.rotation!==undefined)material.rotation=json.rotation;if(json.linewidth!==undefined)material.linewidth=json.linewidth;if(json.dashSize!==undefined)material.dashSize=json.dashSize;if(json.gapSize!==undefined)material.gapSize=json.gapSize;if(json.scale!==undefined)material.scale=json.scale;if(json.polygonOffset!==undefined)material.polygonOffset=json.polygonOffset;if(json.polygonOffsetFactor!==undefined)material.polygonOffsetFactor=json.polygonOffsetFactor;if(json.polygonOffsetUnits!==undefined)material.polygonOffsetUnits=json.polygonOffsetUnits;if(json.dithering!==undefined)material.dithering=json.dithering;if(json.alphaToCoverage!==undefined)material.alphaToCoverage=json.alphaToCoverage;if(json.premultipliedAlpha!==undefined)material.premultipliedAlpha=json.premultipliedAlpha;if(json.forceSinglePass!==undefined)material.forceSinglePass=json.forceSinglePass;if(json.allowOverride!==undefined)material.allowOverride=json.allowOverride;if(json.visible!==undefined)material.visible=json.visible;if(json.toneMapped!==undefined)material.toneMapped=json.toneMapped;if(json.userData!==undefined)material.userData=json.userData;if(json.vertexColors!==undefined){if(typeof json.vertexColors==="number"){material.vertexColors=json.vertexColors>0?true:false}else{material.vertexColors=json.vertexColors}}if(json.uniforms!==undefined){for(const name in json.uniforms){const uniform=json.uniforms[name];material.uniforms[name]={};switch(uniform.type){case"t":material.uniforms[name].value=getTexture(uniform.value);break;case"c":material.uniforms[name].value=new Color().setHex(uniform.value);break;case"v2":material.uniforms[name].value=new Vector2().fromArray(uniform.value);break;case"v3":material.uniforms[name].value=new Vector3().fromArray(uniform.value);break;case"v4":material.uniforms[name].value=new Vector4().fromArray(uniform.value);break;case"m3":material.uniforms[name].value=new Matrix3().fromArray(uniform.value);break;case"m4":material.uniforms[name].value=new Matrix4().fromArray(uniform.value);break;default:material.uniforms[name].value=uniform.value;}}}if(json.defines!==undefined)material.defines=json.defines;if(json.vertexShader!==undefined)material.vertexShader=json.vertexShader;if(json.fragmentShader!==undefined)material.fragmentShader=json.fragmentShader;if(json.glslVersion!==undefined)material.glslVersion=json.glslVersion;if(json.extensions!==undefined){for(const key in json.extensions){material.extensions[key]=json.extensions[key]}}if(json.lights!==undefined)material.lights=json.lights;if(json.clipping!==undefined)material.clipping=json.clipping;if(json.size!==undefined)material.size=json.size;if(json.sizeAttenuation!==undefined)material.sizeAttenuation=json.sizeAttenuation;if(json.map!==undefined)material.map=getTexture(json.map);if(json.matcap!==undefined)material.matcap=getTexture(json.matcap);if(json.alphaMap!==undefined)material.alphaMap=getTexture(json.alphaMap);if(json.bumpMap!==undefined)material.bumpMap=getTexture(json.bumpMap);if(json.bumpScale!==undefined)material.bumpScale=json.bumpScale;if(json.normalMap!==undefined)material.normalMap=getTexture(json.normalMap);if(json.normalMapType!==undefined)material.normalMapType=json.normalMapType;if(json.normalScale!==undefined){let normalScale=json.normalScale;if(Array.isArray(normalScale)===false){normalScale=[normalScale,normalScale]}material.normalScale=new Vector2().fromArray(normalScale)}if(json.displacementMap!==undefined)material.displacementMap=getTexture(json.displacementMap);if(json.displacementScale!==undefined)material.displacementScale=json.displacementScale;if(json.displacementBias!==undefined)material.displacementBias=json.displacementBias;if(json.roughnessMap!==undefined)material.roughnessMap=getTexture(json.roughnessMap);if(json.metalnessMap!==undefined)material.metalnessMap=getTexture(json.metalnessMap);if(json.emissiveMap!==undefined)material.emissiveMap=getTexture(json.emissiveMap);if(json.emissiveIntensity!==undefined)material.emissiveIntensity=json.emissiveIntensity;if(json.specularMap!==undefined)material.specularMap=getTexture(json.specularMap);if(json.specularIntensityMap!==undefined)material.specularIntensityMap=getTexture(json.specularIntensityMap);if(json.specularColorMap!==undefined)material.specularColorMap=getTexture(json.specularColorMap);if(json.envMap!==undefined)material.envMap=getTexture(json.envMap);if(json.envMapRotation!==undefined)material.envMapRotation.fromArray(json.envMapRotation);if(json.envMapIntensity!==undefined)material.envMapIntensity=json.envMapIntensity;if(json.reflectivity!==undefined)material.reflectivity=json.reflectivity;if(json.refractionRatio!==undefined)material.refractionRatio=json.refractionRatio;if(json.lightMap!==undefined)material.lightMap=getTexture(json.lightMap);if(json.lightMapIntensity!==undefined)material.lightMapIntensity=json.lightMapIntensity;if(json.aoMap!==undefined)material.aoMap=getTexture(json.aoMap);if(json.aoMapIntensity!==undefined)material.aoMapIntensity=json.aoMapIntensity;if(json.gradientMap!==undefined)material.gradientMap=getTexture(json.gradientMap);if(json.clearcoatMap!==undefined)material.clearcoatMap=getTexture(json.clearcoatMap);if(json.clearcoatRoughnessMap!==undefined)material.clearcoatRoughnessMap=getTexture(json.clearcoatRoughnessMap);if(json.clearcoatNormalMap!==undefined)material.clearcoatNormalMap=getTexture(json.clearcoatNormalMap);if(json.clearcoatNormalScale!==undefined)material.clearcoatNormalScale=new Vector2().fromArray(json.clearcoatNormalScale);if(json.iridescenceMap!==undefined)material.iridescenceMap=getTexture(json.iridescenceMap);if(json.iridescenceThicknessMap!==undefined)material.iridescenceThicknessMap=getTexture(json.iridescenceThicknessMap);if(json.transmissionMap!==undefined)material.transmissionMap=getTexture(json.transmissionMap);if(json.thicknessMap!==undefined)material.thicknessMap=getTexture(json.thicknessMap);if(json.anisotropyMap!==undefined)material.anisotropyMap=getTexture(json.anisotropyMap);if(json.sheenColorMap!==undefined)material.sheenColorMap=getTexture(json.sheenColorMap);if(json.sheenRoughnessMap!==undefined)material.sheenRoughnessMap=getTexture(json.sheenRoughnessMap);return material}setTextures(value){this.textures=value;return this}createMaterialFromType(type){return MaterialLoader.createMaterialFromType(type)}static createMaterialFromType(type){const materialLib={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new materialLib[type]}}class LoaderUtils{static extractUrlBase(url){const index=url.lastIndexOf("/");if(index===-1)return"./";return url.slice(0,index+1)}static resolveURL(url,path){if(typeof url!=="string"||url==="")return"";if(/^https?:\/\//i.test(path)&&/^\//.test(url)){path=path.replace(/(^https?:\/\/[^\/]+).*/i,"$1")}if(/^(https?:)?\/\//i.test(url))return url;if(/^data:.*,.*$/i.test(url))return url;if(/^blob:.*$/i.test(url))return url;return path+url}}class InstancedBufferGeometry extends BufferGeometry{constructor(){super();this.isInstancedBufferGeometry=true;this.type="InstancedBufferGeometry";this.instanceCount=Infinity}copy(source){super.copy(source);this.instanceCount=source.instanceCount;return this}toJSON(){const data=super.toJSON();data.instanceCount=this.instanceCount;data.isInstancedBufferGeometry=true;return data}}class BufferGeometryLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(scope.manager);loader.setPath(scope.path);loader.setRequestHeader(scope.requestHeader);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const interleavedBufferMap={};const arrayBufferMap={};function getInterleavedBuffer(json,uuid){if(interleavedBufferMap[uuid]!==undefined)return interleavedBufferMap[uuid];const interleavedBuffers=json.interleavedBuffers;const interleavedBuffer=interleavedBuffers[uuid];const buffer=getArrayBuffer(json,interleavedBuffer.buffer);const array=getTypedArray(interleavedBuffer.type,buffer);const ib=new InterleavedBuffer(array,interleavedBuffer.stride);ib.uuid=interleavedBuffer.uuid;interleavedBufferMap[uuid]=ib;return ib}function getArrayBuffer(json,uuid){if(arrayBufferMap[uuid]!==undefined)return arrayBufferMap[uuid];const arrayBuffers=json.arrayBuffers;const arrayBuffer=arrayBuffers[uuid];const ab=new Uint32Array(arrayBuffer).buffer;arrayBufferMap[uuid]=ab;return ab}const geometry=json.isInstancedBufferGeometry?new InstancedBufferGeometry:new BufferGeometry;const index=json.data.index;if(index!==undefined){const typedArray=getTypedArray(index.type,index.array);geometry.setIndex(new BufferAttribute(typedArray,1))}const attributes=json.data.attributes;for(const key in attributes){const attribute=attributes[key];let bufferAttribute;if(attribute.isInterleavedBufferAttribute){const interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{const typedArray=getTypedArray(attribute.type,attribute.array);const bufferAttributeConstr=attribute.isInstancedBufferAttribute?InstancedBufferAttribute:BufferAttribute;bufferAttribute=new bufferAttributeConstr(typedArray,attribute.itemSize,attribute.normalized)}if(attribute.name!==undefined)bufferAttribute.name=attribute.name;if(attribute.usage!==undefined)bufferAttribute.setUsage(attribute.usage);geometry.setAttribute(key,bufferAttribute)}const morphAttributes=json.data.morphAttributes;if(morphAttributes){for(const key in morphAttributes){const attributeArray=morphAttributes[key];const array=[];for(let i=0,il=attributeArray.length;i<il;i++){const attribute=attributeArray[i];let bufferAttribute;if(attribute.isInterleavedBufferAttribute){const interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{const typedArray=getTypedArray(attribute.type,attribute.array);bufferAttribute=new BufferAttribute(typedArray,attribute.itemSize,attribute.normalized)}if(attribute.name!==undefined)bufferAttribute.name=attribute.name;array.push(bufferAttribute)}geometry.morphAttributes[key]=array}}const morphTargetsRelative=json.data.morphTargetsRelative;if(morphTargetsRelative){geometry.morphTargetsRelative=true}const groups=json.data.groups||json.data.drawcalls||json.data.offsets;if(groups!==undefined){for(let i=0,n=groups.length;i!==n;++i){const group=groups[i];geometry.addGroup(group.start,group.count,group.materialIndex)}}const boundingSphere=json.data.boundingSphere;if(boundingSphere!==undefined){geometry.boundingSphere=new Sphere().fromJSON(boundingSphere)}if(json.name)geometry.name=json.name;if(json.userData)geometry.userData=json.userData;return geometry}}class ObjectLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const path=this.path===""?LoaderUtils.extractUrlBase(url):this.path;this.resourcePath=this.resourcePath||path;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(text){let json=null;try{json=JSON.parse(text)}catch(error){if(onError!==undefined)onError(error);error("ObjectLoader: Can't parse "+url+".",error.message);return}const metadata=json.metadata;if(metadata===undefined||metadata.type===undefined||metadata.type.toLowerCase()==="geometry"){if(onError!==undefined)onError(new Error("THREE.ObjectLoader: Can't load "+url));error("ObjectLoader: Can't load "+url);return}scope.parse(json,onLoad)},onProgress,onError)}async loadAsync(url,onProgress){const scope=this;const path=this.path===""?LoaderUtils.extractUrlBase(url):this.path;this.resourcePath=this.resourcePath||path;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);const text=await loader.loadAsync(url,onProgress);const json=JSON.parse(text);const metadata=json.metadata;if(metadata===undefined||metadata.type===undefined||metadata.type.toLowerCase()==="geometry"){throw new Error("THREE.ObjectLoader: Can't load "+url)}return await scope.parseAsync(json)}parse(json,onLoad){const animations=this.parseAnimations(json.animations);const shapes=this.parseShapes(json.shapes);const geometries=this.parseGeometries(json.geometries,shapes);const images=this.parseImages(json.images,function(){if(onLoad!==undefined)onLoad(object)});const textures=this.parseTextures(json.textures,images);const materials=this.parseMaterials(json.materials,textures);const object=this.parseObject(json.object,geometries,materials,textures,animations);const skeletons=this.parseSkeletons(json.skeletons,object);this.bindSkeletons(object,skeletons);this.bindLightTargets(object);if(onLoad!==undefined){let hasImages=false;for(const uuid in images){if(images[uuid].data instanceof HTMLImageElement){hasImages=true;break}}if(hasImages===false)onLoad(object)}return object}async parseAsync(json){const animations=this.parseAnimations(json.animations);const shapes=this.parseShapes(json.shapes);const geometries=this.parseGeometries(json.geometries,shapes);const images=await this.parseImagesAsync(json.images);const textures=this.parseTextures(json.textures,images);const materials=this.parseMaterials(json.materials,textures);const object=this.parseObject(json.object,geometries,materials,textures,animations);const skeletons=this.parseSkeletons(json.skeletons,object);this.bindSkeletons(object,skeletons);this.bindLightTargets(object);return object}parseShapes(json){const shapes={};if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const shape=new Shape().fromJSON(json[i]);shapes[shape.uuid]=shape}}return shapes}parseSkeletons(json,object){const skeletons={};const bones={};object.traverse(function(child){if(child.isBone)bones[child.uuid]=child});if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const skeleton=new Skeleton().fromJSON(json[i],bones);skeletons[skeleton.uuid]=skeleton}}return skeletons}parseGeometries(json,shapes){const geometries={};if(json!==undefined){const bufferGeometryLoader=new BufferGeometryLoader;for(let i=0,l=json.length;i<l;i++){let geometry;const data=json[i];switch(data.type){case"BufferGeometry":case"InstancedBufferGeometry":geometry=bufferGeometryLoader.parse(data);break;default:if(data.type in Geometries){geometry=Geometries[data.type].fromJSON(data,shapes)}else{warn(`ObjectLoader: Unsupported geometry type "${data.type}"`)}}geometry.uuid=data.uuid;if(data.name!==undefined)geometry.name=data.name;if(data.userData!==undefined)geometry.userData=data.userData;geometries[data.uuid]=geometry}}return geometries}parseMaterials(json,textures){const cache={};const materials={};if(json!==undefined){const loader=new MaterialLoader;loader.setTextures(textures);for(let i=0,l=json.length;i<l;i++){const data=json[i];if(cache[data.uuid]===undefined){cache[data.uuid]=loader.parse(data)}materials[data.uuid]=cache[data.uuid]}}return materials}parseAnimations(json){const animations={};if(json!==undefined){for(let i=0;i<json.length;i++){const data=json[i];const clip=AnimationClip.parse(data);animations[clip.uuid]=clip}}return animations}parseImages(json,onLoad){const scope=this;const images={};let loader;function loadImage(url){scope.manager.itemStart(url);return loader.load(url,function(){scope.manager.itemEnd(url)},undefined,function(){scope.manager.itemError(url);scope.manager.itemEnd(url)})}function deserializeImage(image){if(typeof image==="string"){const url=image;const path=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(url)?url:scope.resourcePath+url;return loadImage(path)}else{if(image.data){return{data:getTypedArray(image.type,image.data),width:image.width,height:image.height}}else{return null}}}if(json!==undefined&&json.length>0){const manager=new LoadingManager(onLoad);loader=new ImageLoader(manager);loader.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i<il;i++){const image=json[i];const url=image.url;if(Array.isArray(url)){const imageArray=[];for(let j=0,jl=url.length;j<jl;j++){const currentUrl=url[j];const deserializedImage=deserializeImage(currentUrl);if(deserializedImage!==null){if(deserializedImage instanceof HTMLImageElement){imageArray.push(deserializedImage)}else{imageArray.push(new DataTexture(deserializedImage.data,deserializedImage.width,deserializedImage.height))}}}images[image.uuid]=new Source(imageArray)}else{const deserializedImage=deserializeImage(image.url);images[image.uuid]=new Source(deserializedImage)}}}return images}async parseImagesAsync(json){const scope=this;const images={};let loader;async function deserializeImage(image){if(typeof image==="string"){const url=image;const path=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(url)?url:scope.resourcePath+url;return await loader.loadAsync(path)}else{if(image.data){return{data:getTypedArray(image.type,image.data),width:image.width,height:image.height}}else{return null}}}if(json!==undefined&&json.length>0){loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i<il;i++){const image=json[i];const url=image.url;if(Array.isArray(url)){const imageArray=[];for(let j=0,jl=url.length;j<jl;j++){const currentUrl=url[j];const deserializedImage=await deserializeImage(currentUrl);if(deserializedImage!==null){if(deserializedImage instanceof HTMLImageElement){imageArray.push(deserializedImage)}else{imageArray.push(new DataTexture(deserializedImage.data,deserializedImage.width,deserializedImage.height))}}}images[image.uuid]=new Source(imageArray)}else{const deserializedImage=await deserializeImage(image.url);images[image.uuid]=new Source(deserializedImage)}}}return images}parseTextures(json,images){function parseConstant(value,type){if(typeof value==="number")return value;warn("ObjectLoader.parseTexture: Constant should be in numeric form.",value);return type[value]}const textures={};if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const data=json[i];if(data.image===undefined){warn("ObjectLoader: No \"image\" specified for",data.uuid)}if(images[data.image]===undefined){warn("ObjectLoader: Undefined image",data.image)}const source=images[data.image];const image=source.data;let texture;if(Array.isArray(image)){texture=new CubeTexture;if(image.length===6)texture.needsUpdate=true}else{if(image&&image.data){texture=new DataTexture}else{texture=new Texture}if(image)texture.needsUpdate=true}texture.source=source;texture.uuid=data.uuid;if(data.name!==undefined)texture.name=data.name;if(data.mapping!==undefined)texture.mapping=parseConstant(data.mapping,TEXTURE_MAPPING);if(data.channel!==undefined)texture.channel=data.channel;if(data.offset!==undefined)texture.offset.fromArray(data.offset);if(data.repeat!==undefined)texture.repeat.fromArray(data.repeat);if(data.center!==undefined)texture.center.fromArray(data.center);if(data.rotation!==undefined)texture.rotation=data.rotation;if(data.wrap!==undefined){texture.wrapS=parseConstant(data.wrap[0],TEXTURE_WRAPPING);texture.wrapT=parseConstant(data.wrap[1],TEXTURE_WRAPPING)}if(data.format!==undefined)texture.format=data.format;if(data.internalFormat!==undefined)texture.internalFormat=data.internalFormat;if(data.type!==undefined)texture.type=data.type;if(data.colorSpace!==undefined)texture.colorSpace=data.colorSpace;if(data.minFilter!==undefined)texture.minFilter=parseConstant(data.minFilter,TEXTURE_FILTER);if(data.magFilter!==undefined)texture.magFilter=parseConstant(data.magFilter,TEXTURE_FILTER);if(data.anisotropy!==undefined)texture.anisotropy=data.anisotropy;if(data.flipY!==undefined)texture.flipY=data.flipY;if(data.generateMipmaps!==undefined)texture.generateMipmaps=data.generateMipmaps;if(data.premultiplyAlpha!==undefined)texture.premultiplyAlpha=data.premultiplyAlpha;if(data.unpackAlignment!==undefined)texture.unpackAlignment=data.unpackAlignment;if(data.compareFunction!==undefined)texture.compareFunction=data.compareFunction;if(data.userData!==undefined)texture.userData=data.userData;textures[data.uuid]=texture}}return textures}parseObject(data,geometries,materials,textures,animations){let object;function getGeometry(name){if(geometries[name]===undefined){warn("ObjectLoader: Undefined geometry",name)}return geometries[name]}function getMaterial(name){if(name===undefined)return undefined;if(Array.isArray(name)){const array=[];for(let i=0,l=name.length;i<l;i++){const uuid=name[i];if(materials[uuid]===undefined){warn("ObjectLoader: Undefined material",uuid)}array.push(materials[uuid])}return array}if(materials[name]===undefined){warn("ObjectLoader: Undefined material",name)}return materials[name]}function getTexture(uuid){if(textures[uuid]===undefined){warn("ObjectLoader: Undefined texture",uuid)}return textures[uuid]}let geometry,material;switch(data.type){case"Scene":object=new Scene;if(data.background!==undefined){if(Number.isInteger(data.background)){object.background=new Color(data.background)}else{object.background=getTexture(data.background)}}if(data.environment!==undefined){object.environment=getTexture(data.environment)}if(data.fog!==undefined){if(data.fog.type==="Fog"){object.fog=new Fog(data.fog.color,data.fog.near,data.fog.far)}else if(data.fog.type==="FogExp2"){object.fog=new FogExp2(data.fog.color,data.fog.density)}if(data.fog.name!==""){object.fog.name=data.fog.name}}if(data.backgroundBlurriness!==undefined)object.backgroundBlurriness=data.backgroundBlurriness;if(data.backgroundIntensity!==undefined)object.backgroundIntensity=data.backgroundIntensity;if(data.backgroundRotation!==undefined)object.backgroundRotation.fromArray(data.backgroundRotation);if(data.environmentIntensity!==undefined)object.environmentIntensity=data.environmentIntensity;if(data.environmentRotation!==undefined)object.environmentRotation.fromArray(data.environmentRotation);break;case"PerspectiveCamera":object=new PerspectiveCamera(data.fov,data.aspect,data.near,data.far);if(data.focus!==undefined)object.focus=data.focus;if(data.zoom!==undefined)object.zoom=data.zoom;if(data.filmGauge!==undefined)object.filmGauge=data.filmGauge;if(data.filmOffset!==undefined)object.filmOffset=data.filmOffset;if(data.view!==undefined)object.view=Object.assign({},data.view);break;case"OrthographicCamera":object=new OrthographicCamera(data.left,data.right,data.top,data.bottom,data.near,data.far);if(data.zoom!==undefined)object.zoom=data.zoom;if(data.view!==undefined)object.view=Object.assign({},data.view);break;case"AmbientLight":object=new AmbientLight(data.color,data.intensity);break;case"DirectionalLight":object=new DirectionalLight(data.color,data.intensity);object.target=data.target||"";break;case"PointLight":object=new PointLight(data.color,data.intensity,data.distance,data.decay);break;case"RectAreaLight":object=new RectAreaLight(data.color,data.intensity,data.width,data.height);break;case"SpotLight":object=new SpotLight(data.color,data.intensity,data.distance,data.angle,data.penumbra,data.decay);object.target=data.target||"";break;case"HemisphereLight":object=new HemisphereLight(data.color,data.groundColor,data.intensity);break;case"LightProbe":const sh=new SphericalHarmonics3().fromArray(data.sh);object=new LightProbe(sh,data.intensity);break;case"SkinnedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new SkinnedMesh(geometry,material);if(data.bindMode!==undefined)object.bindMode=data.bindMode;if(data.bindMatrix!==undefined)object.bindMatrix.fromArray(data.bindMatrix);if(data.skeleton!==undefined)object.skeleton=data.skeleton;break;case"Mesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new Mesh(geometry,material);break;case"InstancedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);const count=data.count;const instanceMatrix=data.instanceMatrix;const instanceColor=data.instanceColor;object=new InstancedMesh(geometry,material,count);object.instanceMatrix=new InstancedBufferAttribute(new Float32Array(instanceMatrix.array),16);if(instanceColor!==undefined)object.instanceColor=new InstancedBufferAttribute(new Float32Array(instanceColor.array),instanceColor.itemSize);break;case"BatchedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new BatchedMesh(data.maxInstanceCount,data.maxVertexCount,data.maxIndexCount,material);object.geometry=geometry;object.perObjectFrustumCulled=data.perObjectFrustumCulled;object.sortObjects=data.sortObjects;object._drawRanges=data.drawRanges;object._reservedRanges=data.reservedRanges;object._geometryInfo=data.geometryInfo.map(info=>{let box=null;let sphere=null;if(info.boundingBox!==undefined){box=new Box3().fromJSON(info.boundingBox)}if(info.boundingSphere!==undefined){sphere=new Sphere().fromJSON(info.boundingSphere)}return{...info,boundingBox:box,boundingSphere:sphere}});object._instanceInfo=data.instanceInfo;object._availableInstanceIds=data._availableInstanceIds;object._availableGeometryIds=data._availableGeometryIds;object._nextIndexStart=data.nextIndexStart;object._nextVertexStart=data.nextVertexStart;object._geometryCount=data.geometryCount;object._maxInstanceCount=data.maxInstanceCount;object._maxVertexCount=data.maxVertexCount;object._maxIndexCount=data.maxIndexCount;object._geometryInitialized=data.geometryInitialized;object._matricesTexture=getTexture(data.matricesTexture.uuid);object._indirectTexture=getTexture(data.indirectTexture.uuid);if(data.colorsTexture!==undefined){object._colorsTexture=getTexture(data.colorsTexture.uuid)}if(data.boundingSphere!==undefined){object.boundingSphere=new Sphere().fromJSON(data.boundingSphere)}if(data.boundingBox!==undefined){object.boundingBox=new Box3().fromJSON(data.boundingBox)}break;case"LOD":object=new LOD;break;case"Line":object=new Line(getGeometry(data.geometry),getMaterial(data.material));break;case"LineLoop":object=new LineLoop(getGeometry(data.geometry),getMaterial(data.material));break;case"LineSegments":object=new LineSegments(getGeometry(data.geometry),getMaterial(data.material));break;case"PointCloud":case"Points":object=new Points(getGeometry(data.geometry),getMaterial(data.material));break;case"Sprite":object=new Sprite(getMaterial(data.material));break;case"Group":object=new Group;break;case"Bone":object=new Bone;break;default:object=new Object3D;}object.uuid=data.uuid;if(data.name!==undefined)object.name=data.name;if(data.matrix!==undefined){object.matrix.fromArray(data.matrix);if(data.matrixAutoUpdate!==undefined)object.matrixAutoUpdate=data.matrixAutoUpdate;if(object.matrixAutoUpdate)object.matrix.decompose(object.position,object.quaternion,object.scale)}else{if(data.position!==undefined)object.position.fromArray(data.position);if(data.rotation!==undefined)object.rotation.fromArray(data.rotation);if(data.quaternion!==undefined)object.quaternion.fromArray(data.quaternion);if(data.scale!==undefined)object.scale.fromArray(data.scale)}if(data.up!==undefined)object.up.fromArray(data.up);if(data.castShadow!==undefined)object.castShadow=data.castShadow;if(data.receiveShadow!==undefined)object.receiveShadow=data.receiveShadow;if(data.shadow){if(data.shadow.intensity!==undefined)object.shadow.intensity=data.shadow.intensity;if(data.shadow.bias!==undefined)object.shadow.bias=data.shadow.bias;if(data.shadow.normalBias!==undefined)object.shadow.normalBias=data.shadow.normalBias;if(data.shadow.radius!==undefined)object.shadow.radius=data.shadow.radius;if(data.shadow.mapSize!==undefined)object.shadow.mapSize.fromArray(data.shadow.mapSize);if(data.shadow.camera!==undefined)object.shadow.camera=this.parseObject(data.shadow.camera)}if(data.visible!==undefined)object.visible=data.visible;if(data.frustumCulled!==undefined)object.frustumCulled=data.frustumCulled;if(data.renderOrder!==undefined)object.renderOrder=data.renderOrder;if(data.userData!==undefined)object.userData=data.userData;if(data.layers!==undefined)object.layers.mask=data.layers;if(data.children!==undefined){const children=data.children;for(let i=0;i<children.length;i++){object.add(this.parseObject(children[i],geometries,materials,textures,animations))}}if(data.animations!==undefined){const objectAnimations=data.animations;for(let i=0;i<objectAnimations.length;i++){const uuid=objectAnimations[i];object.animations.push(animations[uuid])}}if(data.type==="LOD"){if(data.autoUpdate!==undefined)object.autoUpdate=data.autoUpdate;const levels=data.levels;for(let l=0;l<levels.length;l++){const level=levels[l];const child=object.getObjectByProperty("uuid",level.object);if(child!==undefined){object.addLevel(child,level.distance,level.hysteresis)}}}return object}bindSkeletons(object,skeletons){if(Object.keys(skeletons).length===0)return;object.traverse(function(child){if(child.isSkinnedMesh===true&&child.skeleton!==undefined){const skeleton=skeletons[child.skeleton];if(skeleton===undefined){warn("ObjectLoader: No skeleton found with UUID:",child.skeleton)}else{child.bind(skeleton,child.bindMatrix)}}})}bindLightTargets(object){object.traverse(function(child){if(child.isDirectionalLight||child.isSpotLight){const uuid=child.target;const target=object.getObjectByProperty("uuid",uuid);if(target!==undefined){child.target=target}else{child.target=new Object3D}}})}}const TEXTURE_MAPPING={UVMapping:UVMapping,CubeReflectionMapping:CubeReflectionMapping,CubeRefractionMapping:CubeRefractionMapping,EquirectangularReflectionMapping:EquirectangularReflectionMapping,EquirectangularRefractionMapping:EquirectangularRefractionMapping,CubeUVReflectionMapping:CubeUVReflectionMapping};const TEXTURE_WRAPPING={RepeatWrapping:RepeatWrapping,ClampToEdgeWrapping:ClampToEdgeWrapping,MirroredRepeatWrapping:MirroredRepeatWrapping};const TEXTURE_FILTER={NearestFilter:NearestFilter,NearestMipmapNearestFilter:NearestMipmapNearestFilter,NearestMipmapLinearFilter:NearestMipmapLinearFilter,LinearFilter:LinearFilter,LinearMipmapNearestFilter:LinearMipmapNearestFilter,LinearMipmapLinearFilter:LinearMipmapLinearFilter};const _errorMap=new WeakMap;class ImageBitmapLoader extends Loader{constructor(manager){super(manager);this.isImageBitmapLoader=true;if(typeof createImageBitmap==="undefined"){warn("ImageBitmapLoader: createImageBitmap() not supported.")}if(typeof fetch==="undefined"){warn("ImageBitmapLoader: fetch() not supported.")}this.options={premultiplyAlpha:"none"};this._abortController=new AbortController}setOptions(options){this.options=options;return this}load(url,onLoad,onProgress,onError){if(url===undefined)url="";if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const scope=this;const cached=Cache.get(`image-bitmap:${url}`);if(cached!==undefined){scope.manager.itemStart(url);if(cached.then){cached.then(imageBitmap=>{if(_errorMap.has(cached)===true){if(onError)onError(_errorMap.get(cached));scope.manager.itemError(url);scope.manager.itemEnd(url)}else{if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url);return imageBitmap}});return}setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0);return cached}const fetchOptions={};fetchOptions.credentials=this.crossOrigin==="anonymous"?"same-origin":"include";fetchOptions.headers=this.requestHeader;fetchOptions.signal=typeof AbortSignal.any==="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const promise=fetch(url,fetchOptions).then(function(res){return res.blob()}).then(function(blob){return createImageBitmap(blob,Object.assign(scope.options,{colorSpaceConversion:"none"}))}).then(function(imageBitmap){Cache.add(`image-bitmap:${url}`,imageBitmap);if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url);return imageBitmap}).catch(function(e){if(onError)onError(e);_errorMap.set(promise,e);Cache.remove(`image-bitmap:${url}`);scope.manager.itemError(url);scope.manager.itemEnd(url)});Cache.add(`image-bitmap:${url}`,promise);scope.manager.itemStart(url)}abort(){this._abortController.abort();this._abortController=new AbortController;return this}}let _context;class AudioContext{static getContext(){if(_context===undefined){_context=new(window.AudioContext||window.webkitAudioContext)}return _context}static setContext(value){_context=value}}class AudioLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(buffer){try{const bufferCopy=buffer.slice(0);const context=AudioContext.getContext();context.decodeAudioData(bufferCopy,function(audioBuffer){onLoad(audioBuffer)}).catch(handleError)}catch(e){handleError(e)}},onProgress,onError);function handleError(e){if(onError){onError(e)}else{error(e)}scope.manager.itemError(url)}}}const _eyeRight=new Matrix4;const _eyeLeft=new Matrix4;const _projectionMatrix=new Matrix4;class StereoCamera{constructor(){this.type="StereoCamera";this.aspect=1;this.eyeSep=0.064;this.cameraL=new PerspectiveCamera;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=false;this.cameraR=new PerspectiveCamera;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=false;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(camera){const cache=this._cache;const needsUpdate=cache.focus!==camera.focus||cache.fov!==camera.fov||cache.aspect!==camera.aspect*this.aspect||cache.near!==camera.near||cache.far!==camera.far||cache.zoom!==camera.zoom||cache.eyeSep!==this.eyeSep;if(needsUpdate){cache.focus=camera.focus;cache.fov=camera.fov;cache.aspect=camera.aspect*this.aspect;cache.near=camera.near;cache.far=camera.far;cache.zoom=camera.zoom;cache.eyeSep=this.eyeSep;_projectionMatrix.copy(camera.projectionMatrix);const eyeSepHalf=cache.eyeSep/2;const eyeSepOnProjection=eyeSepHalf*cache.near/cache.focus;const ymax=cache.near*Math.tan(DEG2RAD*cache.fov*0.5)/cache.zoom;let xmin,xmax;_eyeLeft.elements[12]=-eyeSepHalf;_eyeRight.elements[12]=eyeSepHalf;xmin=-ymax*cache.aspect+eyeSepOnProjection;xmax=ymax*cache.aspect+eyeSepOnProjection;_projectionMatrix.elements[0]=2*cache.near/(xmax-xmin);_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin);this.cameraL.projectionMatrix.copy(_projectionMatrix);xmin=-ymax*cache.aspect-eyeSepOnProjection;xmax=ymax*cache.aspect-eyeSepOnProjection;_projectionMatrix.elements[0]=2*cache.near/(xmax-xmin);_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin);this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft);this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight)}}class ArrayCamera extends PerspectiveCamera{constructor(array=[]){super();this.isArrayCamera=true;this.isMultiViewCamera=false;this.cameras=array}}class Clock{constructor(autoStart=true){this.autoStart=autoStart;this.startTime=0;this.oldTime=0;this.elapsedTime=0;this.running=false}start(){this.startTime=performance.now();this.oldTime=this.startTime;this.elapsedTime=0;this.running=true}stop(){this.getElapsedTime();this.running=false;this.autoStart=false}getElapsedTime(){this.getDelta();return this.elapsedTime}getDelta(){let diff=0;if(this.autoStart&&!this.running){this.start();return 0}if(this.running){const newTime=performance.now();diff=(newTime-this.oldTime)/1000;this.oldTime=newTime;this.elapsedTime+=diff}return diff}}const _position$1=new Vector3;const _quaternion$1=new Quaternion;const _scale$1=new Vector3;const _forward=new Vector3;const _up=new Vector3;class AudioListener extends Object3D{constructor(){super();this.type="AudioListener";this.context=AudioContext.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Clock}getInput(){return this.gain}removeFilter(){if(this.filter!==null){this.gain.disconnect(this.filter);this.filter.disconnect(this.context.destination);this.gain.connect(this.context.destination);this.filter=null}return this}getFilter(){return this.filter}setFilter(value){if(this.filter!==null){this.gain.disconnect(this.filter);this.filter.disconnect(this.context.destination)}else{this.gain.disconnect(this.context.destination)}this.filter=value;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(value){this.gain.gain.setTargetAtTime(value,this.context.currentTime,0.01);return this}updateMatrixWorld(force){super.updateMatrixWorld(force);const listener=this.context.listener;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(_position$1,_quaternion$1,_scale$1);_forward.set(0,0,-1).applyQuaternion(_quaternion$1);_up.set(0,1,0).applyQuaternion(_quaternion$1);if(listener.positionX){const endTime=this.context.currentTime+this.timeDelta;listener.positionX.linearRampToValueAtTime(_position$1.x,endTime);listener.positionY.linearRampToValueAtTime(_position$1.y,endTime);listener.positionZ.linearRampToValueAtTime(_position$1.z,endTime);listener.forwardX.linearRampToValueAtTime(_forward.x,endTime);listener.forwardY.linearRampToValueAtTime(_forward.y,endTime);listener.forwardZ.linearRampToValueAtTime(_forward.z,endTime);listener.upX.linearRampToValueAtTime(_up.x,endTime);listener.upY.linearRampToValueAtTime(_up.y,endTime);listener.upZ.linearRampToValueAtTime(_up.z,endTime)}else{listener.setPosition(_position$1.x,_position$1.y,_position$1.z);listener.setOrientation(_forward.x,_forward.y,_forward.z,_up.x,_up.y,_up.z)}}}class Audio extends Object3D{constructor(listener){super();this.type="Audio";this.listener=listener;this.context=listener.context;this.gain=this.context.createGain();this.gain.connect(listener.getInput());this.autoplay=false;this.buffer=null;this.detune=0;this.loop=false;this.loopStart=0;this.loopEnd=0;this.offset=0;this.duration=undefined;this.playbackRate=1;this.isPlaying=false;this.hasPlaybackControl=true;this.source=null;this.sourceType="empty";this._startedAt=0;this._progress=0;this._connected=false;this.filters=[]}getOutput(){return this.gain}setNodeSource(audioNode){this.hasPlaybackControl=false;this.sourceType="audioNode";this.source=audioNode;this.connect();return this}setMediaElementSource(mediaElement){this.hasPlaybackControl=false;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(mediaElement);this.connect();return this}setMediaStreamSource(mediaStream){this.hasPlaybackControl=false;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(mediaStream);this.connect();return this}setBuffer(audioBuffer){this.buffer=audioBuffer;this.sourceType="buffer";if(this.autoplay)this.play();return this}play(delay=0){if(this.isPlaying===true){warn("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+delay;const source=this.context.createBufferSource();source.buffer=this.buffer;source.loop=this.loop;source.loopStart=this.loopStart;source.loopEnd=this.loopEnd;source.onended=this.onEnded.bind(this);source.start(this._startedAt,this._progress+this.offset,this.duration);this.isPlaying=true;this.source=source;this.setDetune(this.detune);this.setPlaybackRate(this.playbackRate);return this.connect()}pause(){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}if(this.isPlaying===true){this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate;if(this.loop===true){this._progress=this._progress%(this.duration||this.buffer.duration)}this.source.stop();this.source.onended=null;this.isPlaying=false}return this}stop(delay=0){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this._progress=0;if(this.source!==null){this.source.stop(this.context.currentTime+delay);this.source.onended=null}this.isPlaying=false;return this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let i=1,l=this.filters.length;i<l;i++){this.filters[i-1].connect(this.filters[i])}this.filters[this.filters.length-1].connect(this.getOutput())}else{this.source.connect(this.getOutput())}this._connected=true;return this}disconnect(){if(this._connected===false){return}if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let i=1,l=this.filters.length;i<l;i++){this.filters[i-1].disconnect(this.filters[i])}this.filters[this.filters.length-1].disconnect(this.getOutput())}else{this.source.disconnect(this.getOutput())}this._connected=false;return this}getFilters(){return this.filters}setFilters(value){if(!value)value=[];if(this._connected===true){this.disconnect();this.filters=value.slice();this.connect()}else{this.filters=value.slice()}return this}setDetune(value){this.detune=value;if(this.isPlaying===true&&this.source.detune!==undefined){this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,0.01)}return this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(filter){return this.setFilters(filter?[filter]:[])}setPlaybackRate(value){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this.playbackRate=value;if(this.isPlaying===true){this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,0.01)}return this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=false;this._progress=0}getLoop(){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return false}return this.loop}setLoop(value){if(this.hasPlaybackControl===false){warn("Audio: this Audio has no playback control.");return}this.loop=value;if(this.isPlaying===true){this.source.loop=this.loop}return this}setLoopStart(value){this.loopStart=value;return this}setLoopEnd(value){this.loopEnd=value;return this}getVolume(){return this.gain.gain.value}setVolume(value){this.gain.gain.setTargetAtTime(value,this.context.currentTime,0.01);return this}copy(source,recursive){super.copy(source,recursive);if(source.sourceType!=="buffer"){warn("Audio: Audio source type cannot be copied.");return this}this.autoplay=source.autoplay;this.buffer=source.buffer;this.detune=source.detune;this.loop=source.loop;this.loopStart=source.loopStart;this.loopEnd=source.loopEnd;this.offset=source.offset;this.duration=source.duration;this.playbackRate=source.playbackRate;this.hasPlaybackControl=source.hasPlaybackControl;this.sourceType=source.sourceType;this.filters=source.filters.slice();return this}clone(recursive){return new this.constructor(this.listener).copy(this,recursive)}}const _position=new Vector3;const _quaternion=new Quaternion;const _scale=new Vector3;const _orientation=new Vector3;class PositionalAudio extends Audio{constructor(listener){super(listener);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}connect(){super.connect();this.panner.connect(this.gain);return this}disconnect(){super.disconnect();this.panner.disconnect(this.gain);return this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(value){this.panner.refDistance=value;return this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(value){this.panner.rolloffFactor=value;return this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(value){this.panner.distanceModel=value;return this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(value){this.panner.maxDistance=value;return this}setDirectionalCone(coneInnerAngle,coneOuterAngle,coneOuterGain){this.panner.coneInnerAngle=coneInnerAngle;this.panner.coneOuterAngle=coneOuterAngle;this.panner.coneOuterGain=coneOuterGain;return this}updateMatrixWorld(force){super.updateMatrixWorld(force);if(this.hasPlaybackControl===true&&this.isPlaying===false)return;this.matrixWorld.decompose(_position,_quaternion,_scale);_orientation.set(0,0,1).applyQuaternion(_quaternion);const panner=this.panner;if(panner.positionX){const endTime=this.context.currentTime+this.listener.timeDelta;panner.positionX.linearRampToValueAtTime(_position.x,endTime);panner.positionY.linearRampToValueAtTime(_position.y,endTime);panner.positionZ.linearRampToValueAtTime(_position.z,endTime);panner.orientationX.linearRampToValueAtTime(_orientation.x,endTime);panner.orientationY.linearRampToValueAtTime(_orientation.y,endTime);panner.orientationZ.linearRampToValueAtTime(_orientation.z,endTime)}else{panner.setPosition(_position.x,_position.y,_position.z);panner.setOrientation(_orientation.x,_orientation.y,_orientation.z)}}}class AudioAnalyser{constructor(audio,fftSize=2048){this.analyser=audio.context.createAnalyser();this.analyser.fftSize=fftSize;this.data=new Uint8Array(this.analyser.frequencyBinCount);audio.getOutput().connect(this.analyser)}getFrequencyData(){this.analyser.getByteFrequencyData(this.data);return this.data}getAverageFrequency(){let value=0;const data=this.getFrequencyData();for(let i=0;i<data.length;i++){value+=data[i]}return value/data.length}}class PropertyMixer{constructor(binding,typeName,valueSize){this.binding=binding;this.valueSize=valueSize;let mixFunction,mixFunctionAdditive,setIdentity;switch(typeName){case"quaternion":mixFunction=this._slerp;mixFunctionAdditive=this._slerpAdditive;setIdentity=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(valueSize*6);this._workIndex=5;break;case"string":case"bool":mixFunction=this._select;mixFunctionAdditive=this._select;setIdentity=this._setAdditiveIdentityOther;this.buffer=new Array(valueSize*5);break;default:mixFunction=this._lerp;mixFunctionAdditive=this._lerpAdditive;setIdentity=this._setAdditiveIdentityNumeric;this.buffer=new Float64Array(valueSize*5);}this._mixBufferRegion=mixFunction;this._mixBufferRegionAdditive=mixFunctionAdditive;this._setIdentity=setIdentity;this._origIndex=3;this._addIndex=4;this.cumulativeWeight=0;this.cumulativeWeightAdditive=0;this.useCount=0;this.referenceCount=0}accumulate(accuIndex,weight){const buffer=this.buffer,stride=this.valueSize,offset=accuIndex*stride+stride;let currentWeight=this.cumulativeWeight;if(currentWeight===0){for(let i=0;i!==stride;++i){buffer[offset+i]=buffer[i]}currentWeight=weight}else{currentWeight+=weight;const mix=weight/currentWeight;this._mixBufferRegion(buffer,offset,0,mix,stride)}this.cumulativeWeight=currentWeight}accumulateAdditive(weight){const buffer=this.buffer,stride=this.valueSize,offset=stride*this._addIndex;if(this.cumulativeWeightAdditive===0){this._setIdentity()}this._mixBufferRegionAdditive(buffer,offset,0,weight,stride);this.cumulativeWeightAdditive+=weight}apply(accuIndex){const stride=this.valueSize,buffer=this.buffer,offset=accuIndex*stride+stride,weight=this.cumulativeWeight,weightAdditive=this.cumulativeWeightAdditive,binding=this.binding;this.cumulativeWeight=0;this.cumulativeWeightAdditive=0;if(weight<1){const originalValueOffset=stride*this._origIndex;this._mixBufferRegion(buffer,offset,originalValueOffset,1-weight,stride)}if(weightAdditive>0){this._mixBufferRegionAdditive(buffer,offset,this._addIndex*stride,1,stride)}for(let i=stride,e=stride+stride;i!==e;++i){if(buffer[i]!==buffer[i+stride]){binding.setValue(buffer,offset);break}}}saveOriginalState(){const binding=this.binding;const buffer=this.buffer,stride=this.valueSize,originalValueOffset=stride*this._origIndex;binding.getValue(buffer,originalValueOffset);for(let i=stride,e=originalValueOffset;i!==e;++i){buffer[i]=buffer[originalValueOffset+i%stride]}this._setIdentity();this.cumulativeWeight=0;this.cumulativeWeightAdditive=0}restoreOriginalState(){const originalValueOffset=this.valueSize*3;this.binding.setValue(this.buffer,originalValueOffset)}_setAdditiveIdentityNumeric(){const startIndex=this._addIndex*this.valueSize;const endIndex=startIndex+this.valueSize;for(let i=startIndex;i<endIndex;i++){this.buffer[i]=0}}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric();this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const startIndex=this._origIndex*this.valueSize;const targetIndex=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++){this.buffer[targetIndex+i]=this.buffer[startIndex+i]}}_select(buffer,dstOffset,srcOffset,t,stride){if(t>=0.5){for(let i=0;i!==stride;++i){buffer[dstOffset+i]=buffer[srcOffset+i]}}}_slerp(buffer,dstOffset,srcOffset,t){Quaternion.slerpFlat(buffer,dstOffset,buffer,dstOffset,buffer,srcOffset,t)}_slerpAdditive(buffer,dstOffset,srcOffset,t,stride){const workOffset=this._workIndex*stride;Quaternion.multiplyQuaternionsFlat(buffer,workOffset,buffer,dstOffset,buffer,srcOffset);Quaternion.slerpFlat(buffer,dstOffset,buffer,dstOffset,buffer,workOffset,t)}_lerp(buffer,dstOffset,srcOffset,t,stride){const s=1-t;for(let i=0;i!==stride;++i){const j=dstOffset+i;buffer[j]=buffer[j]*s+buffer[srcOffset+i]*t}}_lerpAdditive(buffer,dstOffset,srcOffset,t,stride){for(let i=0;i!==stride;++i){const j=dstOffset+i;buffer[j]=buffer[j]+buffer[srcOffset+i]*t}}}const _RESERVED_CHARS_RE="\\[\\]\\.:\\/";const _reservedRe=new RegExp("["+_RESERVED_CHARS_RE+"]","g");const _wordChar="[^"+_RESERVED_CHARS_RE+"]";const _wordCharOrDot="[^"+_RESERVED_CHARS_RE.replace("\\.","")+"]";const _directoryRe=/((?:WC+[\/:])*)/.source.replace("WC",_wordChar);const _nodeRe=/(WCOD+)?/.source.replace("WCOD",_wordCharOrDot);const _objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",_wordChar);const _propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",_wordChar);const _trackRe=new RegExp(""+"^"+_directoryRe+_nodeRe+_objectRe+_propertyRe+"$");const _supportedObjectNames=["material","materials","bones","map"];class Composite{constructor(targetGroup,path,optionalParsedPath){const parsedPath=optionalParsedPath||PropertyBinding.parseTrackName(path);this._targetGroup=targetGroup;this._bindings=targetGroup.subscribe_(path,parsedPath)}getValue(array,offset){this.bind();const firstValidIndex=this._targetGroup.nCachedObjects_,binding=this._bindings[firstValidIndex];if(binding!==undefined)binding.getValue(array,offset)}setValue(array,offset){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].setValue(array,offset)}}bind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].bind()}}unbind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].unbind()}}}class PropertyBinding{constructor(rootNode,path,parsedPath){this.path=path;this.parsedPath=parsedPath||PropertyBinding.parseTrackName(path);this.node=PropertyBinding.findNode(rootNode,this.parsedPath.nodeName);this.rootNode=rootNode;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}static create(root,path,parsedPath){if(!(root&&root.isAnimationObjectGroup)){return new PropertyBinding(root,path,parsedPath)}else{return new PropertyBinding.Composite(root,path,parsedPath)}}static sanitizeNodeName(name){return name.replace(/\s/g,"_").replace(_reservedRe,"")}static parseTrackName(trackName){const matches=_trackRe.exec(trackName);if(matches===null){throw new Error("PropertyBinding: Cannot parse trackName: "+trackName)}const results={nodeName:matches[2],objectName:matches[3],objectIndex:matches[4],propertyName:matches[5],propertyIndex:matches[6]};const lastDot=results.nodeName&&results.nodeName.lastIndexOf(".");if(lastDot!==undefined&&lastDot!==-1){const objectName=results.nodeName.substring(lastDot+1);if(_supportedObjectNames.indexOf(objectName)!==-1){results.nodeName=results.nodeName.substring(0,lastDot);results.objectName=objectName}}if(results.propertyName===null||results.propertyName.length===0){throw new Error("PropertyBinding: can not parse propertyName from trackName: "+trackName)}return results}static findNode(root,nodeName){if(nodeName===undefined||nodeName===""||nodeName==="."||nodeName===-1||nodeName===root.name||nodeName===root.uuid){return root}if(root.skeleton){const bone=root.skeleton.getBoneByName(nodeName);if(bone!==undefined){return bone}}if(root.children){const searchNodeSubtree=function(children){for(let i=0;i<children.length;i++){const childNode=children[i];if(childNode.name===nodeName||childNode.uuid===nodeName){return childNode}const result=searchNodeSubtree(childNode.children);if(result)return result}return null};const subTreeNode=searchNodeSubtree(root.children);if(subTreeNode){return subTreeNode}}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(buffer,offset){buffer[offset]=this.targetObject[this.propertyName]}_getValue_array(buffer,offset){const source=this.resolvedProperty;for(let i=0,n=source.length;i!==n;++i){buffer[offset++]=source[i]}}_getValue_arrayElement(buffer,offset){buffer[offset]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(buffer,offset){this.resolvedProperty.toArray(buffer,offset)}_setValue_direct(buffer,offset){this.targetObject[this.propertyName]=buffer[offset]}_setValue_direct_setNeedsUpdate(buffer,offset){this.targetObject[this.propertyName]=buffer[offset];this.targetObject.needsUpdate=true}_setValue_direct_setMatrixWorldNeedsUpdate(buffer,offset){this.targetObject[this.propertyName]=buffer[offset];this.targetObject.matrixWorldNeedsUpdate=true}_setValue_array(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}}_setValue_array_setNeedsUpdate(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}this.targetObject.needsUpdate=true}_setValue_array_setMatrixWorldNeedsUpdate(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}this.targetObject.matrixWorldNeedsUpdate=true}_setValue_arrayElement(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset]}_setValue_arrayElement_setNeedsUpdate(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset];this.targetObject.needsUpdate=true}_setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset];this.targetObject.matrixWorldNeedsUpdate=true}_setValue_fromArray(buffer,offset){this.resolvedProperty.fromArray(buffer,offset)}_setValue_fromArray_setNeedsUpdate(buffer,offset){this.resolvedProperty.fromArray(buffer,offset);this.targetObject.needsUpdate=true}_setValue_fromArray_setMatrixWorldNeedsUpdate(buffer,offset){this.resolvedProperty.fromArray(buffer,offset);this.targetObject.matrixWorldNeedsUpdate=true}_getValue_unbound(targetArray,offset){this.bind();this.getValue(targetArray,offset)}_setValue_unbound(sourceArray,offset){this.bind();this.setValue(sourceArray,offset)}bind(){let targetObject=this.node;const parsedPath=this.parsedPath;const objectName=parsedPath.objectName;const propertyName=parsedPath.propertyName;let propertyIndex=parsedPath.propertyIndex;if(!targetObject){targetObject=PropertyBinding.findNode(this.rootNode,parsedPath.nodeName);this.node=targetObject}this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(!targetObject){warn("PropertyBinding: No target node found for track: "+this.path+".");return}if(objectName){let objectIndex=parsedPath.objectIndex;switch(objectName){case"materials":if(!targetObject.material){error("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.materials){error("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}targetObject=targetObject.material.materials;break;case"bones":if(!targetObject.skeleton){error("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}targetObject=targetObject.skeleton.bones;for(let i=0;i<targetObject.length;i++){if(targetObject[i].name===objectIndex){objectIndex=i;break}}break;case"map":if("map"in targetObject){targetObject=targetObject.map;break}if(!targetObject.material){error("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.map){error("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}targetObject=targetObject.material.map;break;default:if(targetObject[objectName]===undefined){error("PropertyBinding: Can not bind to objectName of node undefined.",this);return}targetObject=targetObject[objectName];}if(objectIndex!==undefined){if(targetObject[objectIndex]===undefined){error("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,targetObject);return}targetObject=targetObject[objectIndex]}}const nodeProperty=targetObject[propertyName];if(nodeProperty===undefined){const nodeName=parsedPath.nodeName;error("PropertyBinding: Trying to update property for track: "+nodeName+"."+propertyName+" but it wasn't found.",targetObject);return}let versioning=this.Versioning.None;this.targetObject=targetObject;if(targetObject.isMaterial===true){versioning=this.Versioning.NeedsUpdate}else if(targetObject.isObject3D===true){versioning=this.Versioning.MatrixWorldNeedsUpdate}let bindingType=this.BindingType.Direct;if(propertyIndex!==undefined){if(propertyName==="morphTargetInfluences"){if(!targetObject.geometry){error("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!targetObject.geometry.morphAttributes){error("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}if(targetObject.morphTargetDictionary[propertyIndex]!==undefined){propertyIndex=targetObject.morphTargetDictionary[propertyIndex]}}bindingType=this.BindingType.ArrayElement;this.resolvedProperty=nodeProperty;this.propertyIndex=propertyIndex}else if(nodeProperty.fromArray!==undefined&&nodeProperty.toArray!==undefined){bindingType=this.BindingType.HasFromToArray;this.resolvedProperty=nodeProperty}else if(Array.isArray(nodeProperty)){bindingType=this.BindingType.EntireArray;this.resolvedProperty=nodeProperty}else{this.propertyName=propertyName}this.getValue=this.GetterByBindingType[bindingType];this.setValue=this.SetterByBindingTypeAndVersioning[bindingType][versioning]}unbind(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}}PropertyBinding.Composite=Composite;PropertyBinding.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};PropertyBinding.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};PropertyBinding.prototype.GetterByBindingType=[PropertyBinding.prototype._getValue_direct,PropertyBinding.prototype._getValue_array,PropertyBinding.prototype._getValue_arrayElement,PropertyBinding.prototype._getValue_toArray];PropertyBinding.prototype.SetterByBindingTypeAndVersioning=[[PropertyBinding.prototype._setValue_direct,PropertyBinding.prototype._setValue_direct_setNeedsUpdate,PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_array,PropertyBinding.prototype._setValue_array_setNeedsUpdate,PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_arrayElement,PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_fromArray,PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class AnimationObjectGroup{constructor(){this.isAnimationObjectGroup=true;this.uuid=generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;const indices={};this._indicesByUUID=indices;for(let i=0,n=arguments.length;i!==n;++i){indices[arguments[i].uuid]=i}this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};const scope=this;this.stats={objects:{get total(){return scope._objects.length},get inUse(){return this.total-scope.nCachedObjects_}},get bindingsPerObject(){return scope._bindings.length}}}add(){const objects=this._objects,indicesByUUID=this._indicesByUUID,paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,nBindings=bindings.length;let knownObject=undefined,nObjects=objects.length,nCachedObjects=this.nCachedObjects_;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid;let index=indicesByUUID[uuid];if(index===undefined){index=nObjects++;indicesByUUID[uuid]=index;objects.push(object);for(let j=0,m=nBindings;j!==m;++j){bindings[j].push(new PropertyBinding(object,paths[j],parsedPaths[j]))}}else if(index<nCachedObjects){knownObject=objects[index];const firstActiveIndex=--nCachedObjects,lastCachedObject=objects[firstActiveIndex];indicesByUUID[lastCachedObject.uuid]=index;objects[index]=lastCachedObject;indicesByUUID[uuid]=firstActiveIndex;objects[firstActiveIndex]=object;for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],lastCached=bindingsForPath[firstActiveIndex];let binding=bindingsForPath[index];bindingsForPath[index]=lastCached;if(binding===undefined){binding=new PropertyBinding(object,paths[j],parsedPaths[j])}bindingsForPath[firstActiveIndex]=binding}}else if(objects[index]!==knownObject){error("AnimationObjectGroup: Different objects with the same UUID "+"detected. Clean the caches or recreate your infrastructure when reloading scenes.")}}this.nCachedObjects_=nCachedObjects}remove(){const objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length;let nCachedObjects=this.nCachedObjects_;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid,index=indicesByUUID[uuid];if(index!==undefined&&index>=nCachedObjects){const lastCachedIndex=nCachedObjects++,firstActiveObject=objects[lastCachedIndex];indicesByUUID[firstActiveObject.uuid]=index;objects[index]=firstActiveObject;indicesByUUID[uuid]=lastCachedIndex;objects[lastCachedIndex]=object;for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],firstActive=bindingsForPath[lastCachedIndex],binding=bindingsForPath[index];bindingsForPath[index]=firstActive;bindingsForPath[lastCachedIndex]=binding}}}this.nCachedObjects_=nCachedObjects}uncache(){const objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length;let nCachedObjects=this.nCachedObjects_,nObjects=objects.length;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid,index=indicesByUUID[uuid];if(index!==undefined){delete indicesByUUID[uuid];if(index<nCachedObjects){const firstActiveIndex=--nCachedObjects,lastCachedObject=objects[firstActiveIndex],lastIndex=--nObjects,lastObject=objects[lastIndex];indicesByUUID[lastCachedObject.uuid]=index;objects[index]=lastCachedObject;indicesByUUID[lastObject.uuid]=firstActiveIndex;objects[firstActiveIndex]=lastObject;objects.pop();for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],lastCached=bindingsForPath[firstActiveIndex],last=bindingsForPath[lastIndex];bindingsForPath[index]=lastCached;bindingsForPath[firstActiveIndex]=last;bindingsForPath.pop()}}else{const lastIndex=--nObjects,lastObject=objects[lastIndex];if(lastIndex>0){indicesByUUID[lastObject.uuid]=index}objects[index]=lastObject;objects.pop();for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j];bindingsForPath[index]=bindingsForPath[lastIndex];bindingsForPath.pop()}}}}this.nCachedObjects_=nCachedObjects}subscribe_(path,parsedPath){const indicesByPath=this._bindingsIndicesByPath;let index=indicesByPath[path];const bindings=this._bindings;if(index!==undefined)return bindings[index];const paths=this._paths,parsedPaths=this._parsedPaths,objects=this._objects,nObjects=objects.length,nCachedObjects=this.nCachedObjects_,bindingsForPath=new Array(nObjects);index=bindings.length;indicesByPath[path]=index;paths.push(path);parsedPaths.push(parsedPath);bindings.push(bindingsForPath);for(let i=nCachedObjects,n=objects.length;i!==n;++i){const object=objects[i];bindingsForPath[i]=new PropertyBinding(object,path,parsedPath)}return bindingsForPath}unsubscribe_(path){const indicesByPath=this._bindingsIndicesByPath,index=indicesByPath[path];if(index!==undefined){const paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,lastBindingsIndex=bindings.length-1,lastBindings=bindings[lastBindingsIndex],lastBindingsPath=path[lastBindingsIndex];indicesByPath[lastBindingsPath]=index;bindings[index]=lastBindings;bindings.pop();parsedPaths[index]=parsedPaths[lastBindingsIndex];parsedPaths.pop();paths[index]=paths[lastBindingsIndex];paths.pop()}}}class AnimationAction{constructor(mixer,clip,localRoot=null,blendMode=clip.blendMode){this._mixer=mixer;this._clip=clip;this._localRoot=localRoot;this.blendMode=blendMode;const tracks=clip.tracks,nTracks=tracks.length,interpolants=new Array(nTracks);const interpolantSettings={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let i=0;i!==nTracks;++i){const interpolant=tracks[i].createInterpolant(null);interpolants[i]=interpolant;interpolant.settings=interpolantSettings}this._interpolantSettings=interpolantSettings;this._interpolants=interpolants;this._propertyBindings=new Array(nTracks);this._cacheIndex=null;this._byClipCacheIndex=null;this._timeScaleInterpolant=null;this._weightInterpolant=null;this.loop=LoopRepeat;this._loopCount=-1;this._startTime=null;this.time=0;this.timeScale=1;this._effectiveTimeScale=1;this.weight=1;this._effectiveWeight=1;this.repetitions=Infinity;this.paused=false;this.enabled=true;this.clampWhenFinished=false;this.zeroSlopeAtStart=true;this.zeroSlopeAtEnd=true}play(){this._mixer._activateAction(this);return this}stop(){this._mixer._deactivateAction(this);return this.reset()}reset(){this.paused=false;this.enabled=true;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(time){this._startTime=time;return this}setLoop(mode,repetitions){this.loop=mode;this.repetitions=repetitions;return this}setEffectiveWeight(weight){this.weight=weight;this._effectiveWeight=this.enabled?weight:0;return this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(duration){return this._scheduleFading(duration,0,1)}fadeOut(duration){return this._scheduleFading(duration,1,0)}crossFadeFrom(fadeOutAction,duration,warp=false){fadeOutAction.fadeOut(duration);this.fadeIn(duration);if(warp===true){const fadeInDuration=this._clip.duration,fadeOutDuration=fadeOutAction._clip.duration,startEndRatio=fadeOutDuration/fadeInDuration,endStartRatio=fadeInDuration/fadeOutDuration;fadeOutAction.warp(1,startEndRatio,duration);this.warp(endStartRatio,1,duration)}return this}crossFadeTo(fadeInAction,duration,warp=false){return fadeInAction.crossFadeFrom(this,duration,warp)}stopFading(){const weightInterpolant=this._weightInterpolant;if(weightInterpolant!==null){this._weightInterpolant=null;this._mixer._takeBackControlInterpolant(weightInterpolant)}return this}setEffectiveTimeScale(timeScale){this.timeScale=timeScale;this._effectiveTimeScale=this.paused?0:timeScale;return this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(duration){this.timeScale=this._clip.duration/duration;return this.stopWarping()}syncWith(action){this.time=action.time;this.timeScale=action.timeScale;return this.stopWarping()}halt(duration){return this.warp(this._effectiveTimeScale,0,duration)}warp(startTimeScale,endTimeScale,duration){const mixer=this._mixer,now=mixer.time,timeScale=this.timeScale;let interpolant=this._timeScaleInterpolant;if(interpolant===null){interpolant=mixer._lendControlInterpolant();this._timeScaleInterpolant=interpolant}const times=interpolant.parameterPositions,values=interpolant.sampleValues;times[0]=now;times[1]=now+duration;values[0]=startTimeScale/timeScale;values[1]=endTimeScale/timeScale;return this}stopWarping(){const timeScaleInterpolant=this._timeScaleInterpolant;if(timeScaleInterpolant!==null){this._timeScaleInterpolant=null;this._mixer._takeBackControlInterpolant(timeScaleInterpolant)}return this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(time,deltaTime,timeDirection,accuIndex){if(!this.enabled){this._updateWeight(time);return}const startTime=this._startTime;if(startTime!==null){const timeRunning=(time-startTime)*timeDirection;if(timeRunning<0||timeDirection===0){deltaTime=0}else{this._startTime=null;deltaTime=timeDirection*timeRunning}}deltaTime*=this._updateTimeScale(time);const clipTime=this._updateTime(deltaTime);const weight=this._updateWeight(time);if(weight>0){const interpolants=this._interpolants;const propertyMixers=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let j=0,m=interpolants.length;j!==m;++j){interpolants[j].evaluate(clipTime);propertyMixers[j].accumulateAdditive(weight)}break;case NormalAnimationBlendMode:default:for(let j=0,m=interpolants.length;j!==m;++j){interpolants[j].evaluate(clipTime);propertyMixers[j].accumulate(accuIndex,weight)}}}}_updateWeight(time){let weight=0;if(this.enabled){weight=this.weight;const interpolant=this._weightInterpolant;if(interpolant!==null){const interpolantValue=interpolant.evaluate(time)[0];weight*=interpolantValue;if(time>interpolant.parameterPositions[1]){this.stopFading();if(interpolantValue===0){this.enabled=false}}}}this._effectiveWeight=weight;return weight}_updateTimeScale(time){let timeScale=0;if(!this.paused){timeScale=this.timeScale;const interpolant=this._timeScaleInterpolant;if(interpolant!==null){const interpolantValue=interpolant.evaluate(time)[0];timeScale*=interpolantValue;if(time>interpolant.parameterPositions[1]){this.stopWarping();if(timeScale===0){this.paused=true}else{this.timeScale=timeScale}}}}this._effectiveTimeScale=timeScale;return timeScale}_updateTime(deltaTime){const duration=this._clip.duration;const loop=this.loop;let time=this.time+deltaTime;let loopCount=this._loopCount;const pingPong=loop===LoopPingPong;if(deltaTime===0){if(loopCount===-1)return time;return pingPong&&(loopCount&1)===1?duration-time:time}if(loop===LoopOnce){if(loopCount===-1){this._loopCount=0;this._setEndings(true,true,false)}handle_stop:{if(time>=duration){time=duration}else if(time<0){time=0}else{this.time=time;break handle_stop}if(this.clampWhenFinished)this.paused=true;else this.enabled=false;this.time=time;this._mixer.dispatchEvent({type:"finished",action:this,direction:deltaTime<0?-1:1})}}else{if(loopCount===-1){if(deltaTime>=0){loopCount=0;this._setEndings(true,this.repetitions===0,pingPong)}else{this._setEndings(this.repetitions===0,true,pingPong)}}if(time>=duration||time<0){const loopDelta=Math.floor(time/duration);time-=duration*loopDelta;loopCount+=Math.abs(loopDelta);const pending=this.repetitions-loopCount;if(pending<=0){if(this.clampWhenFinished)this.paused=true;else this.enabled=false;time=deltaTime>0?duration:0;this.time=time;this._mixer.dispatchEvent({type:"finished",action:this,direction:deltaTime>0?1:-1})}else{if(pending===1){const atStart=deltaTime<0;this._setEndings(atStart,!atStart,pingPong)}else{this._setEndings(false,false,pingPong)}this._loopCount=loopCount;this.time=time;this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:loopDelta})}}else{this.time=time}if(pingPong&&(loopCount&1)===1){return duration-time}}return time}_setEndings(atStart,atEnd,pingPong){const settings=this._interpolantSettings;if(pingPong){settings.endingStart=ZeroSlopeEnding;settings.endingEnd=ZeroSlopeEnding}else{if(atStart){settings.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding}else{settings.endingStart=WrapAroundEnding}if(atEnd){settings.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding}else{settings.endingEnd=WrapAroundEnding}}}_scheduleFading(duration,weightNow,weightThen){const mixer=this._mixer,now=mixer.time;let interpolant=this._weightInterpolant;if(interpolant===null){interpolant=mixer._lendControlInterpolant();this._weightInterpolant=interpolant}const times=interpolant.parameterPositions,values=interpolant.sampleValues;times[0]=now;values[0]=weightNow;times[1]=now+duration;values[1]=weightThen;return this}}const _controlInterpolantsResultBuffer=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(root){super();this._root=root;this._initMemoryManager();this._accuIndex=0;this.time=0;this.timeScale=1}_bindAction(action,prototypeAction){const root=action._localRoot||this._root,tracks=action._clip.tracks,nTracks=tracks.length,bindings=action._propertyBindings,interpolants=action._interpolants,rootUuid=root.uuid,bindingsByRoot=this._bindingsByRootAndName;let bindingsByName=bindingsByRoot[rootUuid];if(bindingsByName===undefined){bindingsByName={};bindingsByRoot[rootUuid]=bindingsByName}for(let i=0;i!==nTracks;++i){const track=tracks[i],trackName=track.name;let binding=bindingsByName[trackName];if(binding!==undefined){++binding.referenceCount;bindings[i]=binding}else{binding=bindings[i];if(binding!==undefined){if(binding._cacheIndex===null){++binding.referenceCount;this._addInactiveBinding(binding,rootUuid,trackName)}continue}const path=prototypeAction&&prototypeAction._propertyBindings[i].binding.parsedPath;binding=new PropertyMixer(PropertyBinding.create(root,trackName,path),track.ValueTypeName,track.getValueSize());++binding.referenceCount;this._addInactiveBinding(binding,rootUuid,trackName);bindings[i]=binding}interpolants[i].resultBuffer=binding.buffer}}_activateAction(action){if(!this._isActiveAction(action)){if(action._cacheIndex===null){const rootUuid=(action._localRoot||this._root).uuid,clipUuid=action._clip.uuid,actionsForClip=this._actionsByClip[clipUuid];this._bindAction(action,actionsForClip&&actionsForClip.knownActions[0]);this._addInactiveAction(action,clipUuid,rootUuid)}const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(binding.useCount++===0){this._lendBinding(binding);binding.saveOriginalState()}}this._lendAction(action)}}_deactivateAction(action){if(this._isActiveAction(action)){const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(--binding.useCount===0){binding.restoreOriginalState();this._takeBackBinding(binding)}}this._takeBackAction(action)}}_initMemoryManager(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;const scope=this;this.stats={actions:{get total(){return scope._actions.length},get inUse(){return scope._nActiveActions}},bindings:{get total(){return scope._bindings.length},get inUse(){return scope._nActiveBindings}},controlInterpolants:{get total(){return scope._controlInterpolants.length},get inUse(){return scope._nActiveControlInterpolants}}}}_isActiveAction(action){const index=action._cacheIndex;return index!==null&&index<this._nActiveActions}_addInactiveAction(action,clipUuid,rootUuid){const actions=this._actions,actionsByClip=this._actionsByClip;let actionsForClip=actionsByClip[clipUuid];if(actionsForClip===undefined){actionsForClip={knownActions:[action],actionByRoot:{}};action._byClipCacheIndex=0;actionsByClip[clipUuid]=actionsForClip}else{const knownActions=actionsForClip.knownActions;action._byClipCacheIndex=knownActions.length;knownActions.push(action)}action._cacheIndex=actions.length;actions.push(action);actionsForClip.actionByRoot[rootUuid]=action}_removeInactiveAction(action){const actions=this._actions,lastInactiveAction=actions[actions.length-1],cacheIndex=action._cacheIndex;lastInactiveAction._cacheIndex=cacheIndex;actions[cacheIndex]=lastInactiveAction;actions.pop();action._cacheIndex=null;const clipUuid=action._clip.uuid,actionsByClip=this._actionsByClip,actionsForClip=actionsByClip[clipUuid],knownActionsForClip=actionsForClip.knownActions,lastKnownAction=knownActionsForClip[knownActionsForClip.length-1],byClipCacheIndex=action._byClipCacheIndex;lastKnownAction._byClipCacheIndex=byClipCacheIndex;knownActionsForClip[byClipCacheIndex]=lastKnownAction;knownActionsForClip.pop();action._byClipCacheIndex=null;const actionByRoot=actionsForClip.actionByRoot,rootUuid=(action._localRoot||this._root).uuid;delete actionByRoot[rootUuid];if(knownActionsForClip.length===0){delete actionsByClip[clipUuid]}this._removeInactiveBindingsForAction(action)}_removeInactiveBindingsForAction(action){const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(--binding.referenceCount===0){this._removeInactiveBinding(binding)}}}_lendAction(action){const actions=this._actions,prevIndex=action._cacheIndex,lastActiveIndex=this._nActiveActions++,firstInactiveAction=actions[lastActiveIndex];action._cacheIndex=lastActiveIndex;actions[lastActiveIndex]=action;firstInactiveAction._cacheIndex=prevIndex;actions[prevIndex]=firstInactiveAction}_takeBackAction(action){const actions=this._actions,prevIndex=action._cacheIndex,firstInactiveIndex=--this._nActiveActions,lastActiveAction=actions[firstInactiveIndex];action._cacheIndex=firstInactiveIndex;actions[firstInactiveIndex]=action;lastActiveAction._cacheIndex=prevIndex;actions[prevIndex]=lastActiveAction}_addInactiveBinding(binding,rootUuid,trackName){const bindingsByRoot=this._bindingsByRootAndName,bindings=this._bindings;let bindingByName=bindingsByRoot[rootUuid];if(bindingByName===undefined){bindingByName={};bindingsByRoot[rootUuid]=bindingByName}bindingByName[trackName]=binding;binding._cacheIndex=bindings.length;bindings.push(binding)}_removeInactiveBinding(binding){const bindings=this._bindings,propBinding=binding.binding,rootUuid=propBinding.rootNode.uuid,trackName=propBinding.path,bindingsByRoot=this._bindingsByRootAndName,bindingByName=bindingsByRoot[rootUuid],lastInactiveBinding=bindings[bindings.length-1],cacheIndex=binding._cacheIndex;lastInactiveBinding._cacheIndex=cacheIndex;bindings[cacheIndex]=lastInactiveBinding;bindings.pop();delete bindingByName[trackName];if(Object.keys(bindingByName).length===0){delete bindingsByRoot[rootUuid]}}_lendBinding(binding){const bindings=this._bindings,prevIndex=binding._cacheIndex,lastActiveIndex=this._nActiveBindings++,firstInactiveBinding=bindings[lastActiveIndex];binding._cacheIndex=lastActiveIndex;bindings[lastActiveIndex]=binding;firstInactiveBinding._cacheIndex=prevIndex;bindings[prevIndex]=firstInactiveBinding}_takeBackBinding(binding){const bindings=this._bindings,prevIndex=binding._cacheIndex,firstInactiveIndex=--this._nActiveBindings,lastActiveBinding=bindings[firstInactiveIndex];binding._cacheIndex=firstInactiveIndex;bindings[firstInactiveIndex]=binding;lastActiveBinding._cacheIndex=prevIndex;bindings[prevIndex]=lastActiveBinding}_lendControlInterpolant(){const interpolants=this._controlInterpolants,lastActiveIndex=this._nActiveControlInterpolants++;let interpolant=interpolants[lastActiveIndex];if(interpolant===undefined){interpolant=new LinearInterpolant(new Float32Array(2),new Float32Array(2),1,_controlInterpolantsResultBuffer);interpolant.__cacheIndex=lastActiveIndex;interpolants[lastActiveIndex]=interpolant}return interpolant}_takeBackControlInterpolant(interpolant){const interpolants=this._controlInterpolants,prevIndex=interpolant.__cacheIndex,firstInactiveIndex=--this._nActiveControlInterpolants,lastActiveInterpolant=interpolants[firstInactiveIndex];interpolant.__cacheIndex=firstInactiveIndex;interpolants[firstInactiveIndex]=interpolant;lastActiveInterpolant.__cacheIndex=prevIndex;interpolants[prevIndex]=lastActiveInterpolant}clipAction(clip,optionalRoot,blendMode){const root=optionalRoot||this._root,rootUuid=root.uuid;let clipObject=typeof clip==="string"?AnimationClip.findByName(root,clip):clip;const clipUuid=clipObject!==null?clipObject.uuid:clip;const actionsForClip=this._actionsByClip[clipUuid];let prototypeAction=null;if(blendMode===undefined){if(clipObject!==null){blendMode=clipObject.blendMode}else{blendMode=NormalAnimationBlendMode}}if(actionsForClip!==undefined){const existingAction=actionsForClip.actionByRoot[rootUuid];if(existingAction!==undefined&&existingAction.blendMode===blendMode){return existingAction}prototypeAction=actionsForClip.knownActions[0];if(clipObject===null)clipObject=prototypeAction._clip}if(clipObject===null)return null;const newAction=new AnimationAction(this,clipObject,optionalRoot,blendMode);this._bindAction(newAction,prototypeAction);this._addInactiveAction(newAction,clipUuid,rootUuid);return newAction}existingAction(clip,optionalRoot){const root=optionalRoot||this._root,rootUuid=root.uuid,clipObject=typeof clip==="string"?AnimationClip.findByName(root,clip):clip,clipUuid=clipObject?clipObject.uuid:clip,actionsForClip=this._actionsByClip[clipUuid];if(actionsForClip!==undefined){return actionsForClip.actionByRoot[rootUuid]||null}return null}stopAllAction(){const actions=this._actions,nActions=this._nActiveActions;for(let i=nActions-1;i>=0;--i){actions[i].stop()}return this}update(deltaTime){deltaTime*=this.timeScale;const actions=this._actions,nActions=this._nActiveActions,time=this.time+=deltaTime,timeDirection=Math.sign(deltaTime),accuIndex=this._accuIndex^=1;for(let i=0;i!==nActions;++i){const action=actions[i];action._update(time,deltaTime,timeDirection,accuIndex)}const bindings=this._bindings,nBindings=this._nActiveBindings;for(let i=0;i!==nBindings;++i){bindings[i].apply(accuIndex)}return this}setTime(time){this.time=0;for(let i=0;i<this._actions.length;i++){this._actions[i].time=0}return this.update(time)}getRoot(){return this._root}uncacheClip(clip){const actions=this._actions,clipUuid=clip.uuid,actionsByClip=this._actionsByClip,actionsForClip=actionsByClip[clipUuid];if(actionsForClip!==undefined){const actionsToRemove=actionsForClip.knownActions;for(let i=0,n=actionsToRemove.length;i!==n;++i){const action=actionsToRemove[i];this._deactivateAction(action);const cacheIndex=action._cacheIndex,lastInactiveAction=actions[actions.length-1];action._cacheIndex=null;action._byClipCacheIndex=null;lastInactiveAction._cacheIndex=cacheIndex;actions[cacheIndex]=lastInactiveAction;actions.pop();this._removeInactiveBindingsForAction(action)}delete actionsByClip[clipUuid]}}uncacheRoot(root){const rootUuid=root.uuid,actionsByClip=this._actionsByClip;for(const clipUuid in actionsByClip){const actionByRoot=actionsByClip[clipUuid].actionByRoot,action=actionByRoot[rootUuid];if(action!==undefined){this._deactivateAction(action);this._removeInactiveAction(action)}}const bindingsByRoot=this._bindingsByRootAndName,bindingByName=bindingsByRoot[rootUuid];if(bindingByName!==undefined){for(const trackName in bindingByName){const binding=bindingByName[trackName];binding.restoreOriginalState();this._removeInactiveBinding(binding)}}}uncacheAction(clip,optionalRoot){const action=this.existingAction(clip,optionalRoot);if(action!==null){this._deactivateAction(action);this._removeInactiveAction(action)}}}class RenderTarget3D extends RenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isRenderTarget3D=true;this.depth=depth;this.texture=new Data3DTexture(null,width,height,depth);this._setTextureOptions(options);this.texture.isRenderTargetTexture=true}}class Uniform{constructor(value){this.value=value}clone(){return new Uniform(this.value.clone===undefined?this.value:this.value.clone())}}let _id$1=0;class UniformsGroup extends EventDispatcher{constructor(){super();this.isUniformsGroup=true;Object.defineProperty(this,"id",{value:_id$1++});this.name="";this.usage=StaticDrawUsage;this.uniforms=[]}add(uniform){this.uniforms.push(uniform);return this}remove(uniform){const index=this.uniforms.indexOf(uniform);if(index!==-1)this.uniforms.splice(index,1);return this}setName(name){this.name=name;return this}setUsage(value){this.usage=value;return this}dispose(){this.dispatchEvent({type:"dispose"})}copy(source){this.name=source.name;this.usage=source.usage;const uniformsSource=source.uniforms;this.uniforms.length=0;for(let i=0,l=uniformsSource.length;i<l;i++){const uniforms=Array.isArray(uniformsSource[i])?uniformsSource[i]:[uniformsSource[i]];for(let j=0;j<uniforms.length;j++){this.uniforms.push(uniforms[j].clone())}}return this}clone(){return new this.constructor().copy(this)}}class InstancedInterleavedBuffer extends InterleavedBuffer{constructor(array,stride,meshPerAttribute=1){super(array,stride);this.isInstancedInterleavedBuffer=true;this.meshPerAttribute=meshPerAttribute}copy(source){super.copy(source);this.meshPerAttribute=source.meshPerAttribute;return this}clone(data){const ib=super.clone(data);ib.meshPerAttribute=this.meshPerAttribute;return ib}toJSON(data){const json=super.toJSON(data);json.isInstancedInterleavedBuffer=true;json.meshPerAttribute=this.meshPerAttribute;return json}}class GLBufferAttribute{constructor(buffer,type,itemSize,elementSize,count,normalized=false){this.isGLBufferAttribute=true;this.name="";this.buffer=buffer;this.type=type;this.itemSize=itemSize;this.elementSize=elementSize;this.count=count;this.normalized=normalized;this.version=0}set needsUpdate(value){if(value===true)this.version++}setBuffer(buffer){this.buffer=buffer;return this}setType(type,elementSize){this.type=type;this.elementSize=elementSize;return this}setItemSize(itemSize){this.itemSize=itemSize;return this}setCount(count){this.count=count;return this}}const _matrix=new Matrix4;class Raycaster{constructor(origin,direction,near=0,far=Infinity){this.ray=new Ray(origin,direction);this.near=near;this.far=far;this.camera=null;this.layers=new Layers;this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(origin,direction){this.ray.set(origin,direction)}setFromCamera(coords,camera){if(camera.isPerspectiveCamera){this.ray.origin.setFromMatrixPosition(camera.matrixWorld);this.ray.direction.set(coords.x,coords.y,0.5).unproject(camera).sub(this.ray.origin).normalize();this.camera=camera}else if(camera.isOrthographicCamera){this.ray.origin.set(coords.x,coords.y,(camera.near+camera.far)/(camera.near-camera.far)).unproject(camera);this.ray.direction.set(0,0,-1).transformDirection(camera.matrixWorld);this.camera=camera}else{error("Raycaster: Unsupported camera type: "+camera.type)}}setFromXRController(controller){_matrix.identity().extractRotation(controller.matrixWorld);this.ray.origin.setFromMatrixPosition(controller.matrixWorld);this.ray.direction.set(0,0,-1).applyMatrix4(_matrix);return this}intersectObject(object,recursive=true,intersects=[]){intersect(object,this,intersects,recursive);intersects.sort(ascSort);return intersects}intersectObjects(objects,recursive=true,intersects=[]){for(let i=0,l=objects.length;i<l;i++){intersect(objects[i],this,intersects,recursive)}intersects.sort(ascSort);return intersects}}function ascSort(a,b){return a.distance-b.distance}function intersect(object,raycaster,intersects,recursive){let propagate=true;if(object.layers.test(raycaster.layers)){const result=object.raycast(raycaster,intersects);if(result===false)propagate=false}if(propagate===true&&recursive===true){const children=object.children;for(let i=0,l=children.length;i<l;i++){intersect(children[i],raycaster,intersects,true)}}}class Timer{constructor(){this._previousTime=0;this._currentTime=0;this._startTime=performance.now();this._delta=0;this._elapsed=0;this._timescale=1;this._document=null;this._pageVisibilityHandler=null}connect(document){this._document=document;if(document.hidden!==undefined){this._pageVisibilityHandler=handleVisibilityChange.bind(this);document.addEventListener("visibilitychange",this._pageVisibilityHandler,false)}}disconnect(){if(this._pageVisibilityHandler!==null){this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler);this._pageVisibilityHandler=null}this._document=null}getDelta(){return this._delta/1000}getElapsed(){return this._elapsed/1000}getTimescale(){return this._timescale}setTimescale(timescale){this._timescale=timescale;return this}reset(){this._currentTime=performance.now()-this._startTime;return this}dispose(){this.disconnect()}update(timestamp){if(this._pageVisibilityHandler!==null&&this._document.hidden===true){this._delta=0}else{this._previousTime=this._currentTime;this._currentTime=(timestamp!==undefined?timestamp:performance.now())-this._startTime;this._delta=(this._currentTime-this._previousTime)*this._timescale;this._elapsed+=this._delta}return this}}function handleVisibilityChange(){if(this._document.hidden===false)this.reset()}class Spherical{constructor(radius=1,phi=0,theta=0){this.radius=radius;this.phi=phi;this.theta=theta}set(radius,phi,theta){this.radius=radius;this.phi=phi;this.theta=theta;return this}copy(other){this.radius=other.radius;this.phi=other.phi;this.theta=other.theta;return this}makeSafe(){const EPS=0.000001;this.phi=clamp(this.phi,EPS,Math.PI-EPS);return this}setFromVector3(v){return this.setFromCartesianCoords(v.x,v.y,v.z)}setFromCartesianCoords(x,y,z){this.radius=Math.sqrt(x*x+y*y+z*z);if(this.radius===0){this.theta=0;this.phi=0}else{this.theta=Math.atan2(x,z);this.phi=Math.acos(clamp(y/this.radius,-1,1))}return this}clone(){return new this.constructor().copy(this)}}class Cylindrical{constructor(radius=1,theta=0,y=0){this.radius=radius;this.theta=theta;this.y=y}set(radius,theta,y){this.radius=radius;this.theta=theta;this.y=y;return this}copy(other){this.radius=other.radius;this.theta=other.theta;this.y=other.y;return this}setFromVector3(v){return this.setFromCartesianCoords(v.x,v.y,v.z)}setFromCartesianCoords(x,y,z){this.radius=Math.sqrt(x*x+z*z);this.theta=Math.atan2(x,z);this.y=y;return this}clone(){return new this.constructor().copy(this)}}class Matrix2{constructor(n11,n12,n21,n22){Matrix2.prototype.isMatrix2=true;this.elements=[1,0,0,1];if(n11!==undefined){this.set(n11,n12,n21,n22)}}identity(){this.set(1,0,0,1);return this}fromArray(array,offset=0){for(let i=0;i<4;i++){this.elements[i]=array[i+offset]}return this}set(n11,n12,n21,n22){const te=this.elements;te[0]=n11;te[2]=n12;te[1]=n21;te[3]=n22;return this}}const _vector$4=new Vector2;class Box2{constructor(min=new Vector2(+Infinity,+Infinity),max=new Vector2(-Infinity,-Infinity)){this.isBox2=true;this.min=min;this.max=max}set(min,max){this.min.copy(min);this.max.copy(max);return this}setFromPoints(points){this.makeEmpty();for(let i=0,il=points.length;i<il;i++){this.expandByPoint(points[i])}return this}setFromCenterAndSize(center,size){const halfSize=_vector$4.copy(size).multiplyScalar(0.5);this.min.copy(center).sub(halfSize);this.max.copy(center).add(halfSize);return this}clone(){return new this.constructor().copy(this)}copy(box){this.min.copy(box.min);this.max.copy(box.max);return this}makeEmpty(){this.min.x=this.min.y=+Infinity;this.max.x=this.max.y=-Infinity;return this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(target){return this.isEmpty()?target.set(0,0):target.addVectors(this.min,this.max).multiplyScalar(0.5)}getSize(target){return this.isEmpty()?target.set(0,0):target.subVectors(this.max,this.min)}expandByPoint(point){this.min.min(point);this.max.max(point);return this}expandByVector(vector){this.min.sub(vector);this.max.add(vector);return this}expandByScalar(scalar){this.min.addScalar(-scalar);this.max.addScalar(scalar);return this}containsPoint(point){return point.x>=this.min.x&&point.x<=this.max.x&&point.y>=this.min.y&&point.y<=this.max.y}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y}getParameter(point,target){return target.set((point.x-this.min.x)/(this.max.x-this.min.x),(point.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y}clampPoint(point,target){return target.copy(point).clamp(this.min,this.max)}distanceToPoint(point){return this.clampPoint(point,_vector$4).distanceTo(point)}intersect(box){this.min.max(box.min);this.max.min(box.max);if(this.isEmpty())this.makeEmpty();return this}union(box){this.min.min(box.min);this.max.max(box.max);return this}translate(offset){this.min.add(offset);this.max.add(offset);return this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}}const _startP=new Vector3;const _startEnd=new Vector3;const _d1=new Vector3;const _d2=new Vector3;const _r=new Vector3;const _c1=new Vector3;const _c2=new Vector3;class Line3{constructor(start=new Vector3,end=new Vector3){this.start=start;this.end=end}set(start,end){this.start.copy(start);this.end.copy(end);return this}copy(line){this.start.copy(line.start);this.end.copy(line.end);return this}getCenter(target){return target.addVectors(this.start,this.end).multiplyScalar(0.5)}delta(target){return target.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,target){return this.delta(target).multiplyScalar(t).add(this.start)}closestPointToPointParameter(point,clampToLine){_startP.subVectors(point,this.start);_startEnd.subVectors(this.end,this.start);const startEnd2=_startEnd.dot(_startEnd);const startEnd_startP=_startEnd.dot(_startP);let t=startEnd_startP/startEnd2;if(clampToLine){t=clamp(t,0,1)}return t}closestPointToPoint(point,clampToLine,target){const t=this.closestPointToPointParameter(point,clampToLine);return this.delta(target).multiplyScalar(t).add(this.start)}distanceSqToLine3(line,c1=_c1,c2=_c2){const EPSILON=1e-8*1e-8;let s,t;const p1=this.start;const p2=line.start;const q1=this.end;const q2=line.end;_d1.subVectors(q1,p1);_d2.subVectors(q2,p2);_r.subVectors(p1,p2);const a=_d1.dot(_d1);const e=_d2.dot(_d2);const f=_d2.dot(_r);if(a<=EPSILON&&e<=EPSILON){c1.copy(p1);c2.copy(p2);c1.sub(c2);return c1.dot(c1)}if(a<=EPSILON){s=0;t=f/e;t=clamp(t,0,1)}else{const c=_d1.dot(_r);if(e<=EPSILON){t=0;s=clamp(-c/a,0,1)}else{const b=_d1.dot(_d2);const denom=a*e-b*b;if(denom!==0){s=clamp((b*f-c*e)/denom,0,1)}else{s=0}t=(b*s+f)/e;if(t<0){t=0;s=clamp(-c/a,0,1)}else if(t>1){t=1;s=clamp((b-c)/a,0,1)}}}c1.copy(p1).add(_d1.multiplyScalar(s));c2.copy(p2).add(_d2.multiplyScalar(t));c1.sub(c2);return c1.dot(c1)}applyMatrix4(matrix){this.start.applyMatrix4(matrix);this.end.applyMatrix4(matrix);return this}equals(line){return line.start.equals(this.start)&&line.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const _vector$3=new Vector3;class SpotLightHelper extends Object3D{constructor(light,color){super();this.light=light;this.matrixAutoUpdate=false;this.color=color;this.type="SpotLightHelper";const geometry=new BufferGeometry;const positions=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let i=0,j=1,l=32;i<l;i++,j++){const p1=i/l*Math.PI*2;const p2=j/l*Math.PI*2;positions.push(Math.cos(p1),Math.sin(p1),1,Math.cos(p2),Math.sin(p2),1)}geometry.setAttribute("position",new Float32BufferAttribute(positions,3));const material=new LineBasicMaterial({fog:false,toneMapped:false});this.cone=new LineSegments(geometry,material);this.add(this.cone);this.update()}dispose(){this.cone.geometry.dispose();this.cone.material.dispose()}update(){this.light.updateWorldMatrix(true,false);this.light.target.updateWorldMatrix(true,false);if(this.parent){this.parent.updateWorldMatrix(true);this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)}else{this.matrix.copy(this.light.matrixWorld)}this.matrixWorld.copy(this.light.matrixWorld);const coneLength=this.light.distance?this.light.distance:1000;const coneWidth=coneLength*Math.tan(this.light.angle);this.cone.scale.set(coneWidth,coneWidth,coneLength);_vector$3.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(_vector$3);if(this.color!==undefined){this.cone.material.color.set(this.color)}else{this.cone.material.color.copy(this.light.color)}}}const _vector$2=new Vector3;const _boneMatrix=new Matrix4;const _matrixWorldInv=new Matrix4;class SkeletonHelper extends LineSegments{constructor(object){const bones=getBoneList(object);const geometry=new BufferGeometry;const vertices=[];const colors=[];for(let i=0;i<bones.length;i++){const bone=bones[i];if(bone.parent&&bone.parent.isBone){vertices.push(0,0,0);vertices.push(0,0,0);colors.push(0,0,0);colors.push(0,0,0)}}geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,depthTest:false,depthWrite:false,toneMapped:false,transparent:true});super(geometry,material);this.isSkeletonHelper=true;this.type="SkeletonHelper";this.root=object;this.bones=bones;this.matrix=object.matrixWorld;this.matrixAutoUpdate=false;const color1=new Color(255);const color2=new Color(65280);this.setColors(color1,color2)}updateMatrixWorld(force){const bones=this.bones;const geometry=this.geometry;const position=geometry.getAttribute("position");_matrixWorldInv.copy(this.root.matrixWorld).invert();for(let i=0,j=0;i<bones.length;i++){const bone=bones[i];if(bone.parent&&bone.parent.isBone){_boneMatrix.multiplyMatrices(_matrixWorldInv,bone.matrixWorld);_vector$2.setFromMatrixPosition(_boneMatrix);position.setXYZ(j,_vector$2.x,_vector$2.y,_vector$2.z);_boneMatrix.multiplyMatrices(_matrixWorldInv,bone.parent.matrixWorld);_vector$2.setFromMatrixPosition(_boneMatrix);position.setXYZ(j+1,_vector$2.x,_vector$2.y,_vector$2.z);j+=2}}geometry.getAttribute("position").needsUpdate=true;super.updateMatrixWorld(force)}setColors(color1,color2){const geometry=this.geometry;const colorAttribute=geometry.getAttribute("color");for(let i=0;i<colorAttribute.count;i+=2){colorAttribute.setXYZ(i,color1.r,color1.g,color1.b);colorAttribute.setXYZ(i+1,color2.r,color2.g,color2.b)}colorAttribute.needsUpdate=true;return this}dispose(){this.geometry.dispose();this.material.dispose()}}function getBoneList(object){const boneList=[];if(object.isBone===true){boneList.push(object)}for(let i=0;i<object.children.length;i++){boneList.push(...getBoneList(object.children[i]))}return boneList}class PointLightHelper extends Mesh{constructor(light,sphereSize,color){const geometry=new SphereGeometry(sphereSize,4,2);const material=new MeshBasicMaterial({wireframe:true,fog:false,toneMapped:false});super(geometry,material);this.light=light;this.color=color;this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=false;this.update()}dispose(){this.geometry.dispose();this.material.dispose()}update(){this.light.updateWorldMatrix(true,false);if(this.color!==undefined){this.material.color.set(this.color)}else{this.material.color.copy(this.light.color)}}}const _vector$1=new Vector3;const _color1=new Color;const _color2=new Color;class HemisphereLightHelper extends Object3D{constructor(light,size,color){super();this.light=light;this.matrix=light.matrixWorld;this.matrixAutoUpdate=false;this.color=color;this.type="HemisphereLightHelper";const geometry=new OctahedronGeometry(size);geometry.rotateY(Math.PI*0.5);this.material=new MeshBasicMaterial({wireframe:true,fog:false,toneMapped:false});if(this.color===undefined)this.material.vertexColors=true;const position=geometry.getAttribute("position");const colors=new Float32Array(position.count*3);geometry.setAttribute("color",new BufferAttribute(colors,3));this.add(new Mesh(geometry,this.material));this.update()}dispose(){this.children[0].geometry.dispose();this.children[0].material.dispose()}update(){const mesh=this.children[0];if(this.color!==undefined){this.material.color.set(this.color)}else{const colors=mesh.geometry.getAttribute("color");_color1.copy(this.light.color);_color2.copy(this.light.groundColor);for(let i=0,l=colors.count;i<l;i++){const color=i<l/2?_color1:_color2;colors.setXYZ(i,color.r,color.g,color.b)}colors.needsUpdate=true}this.light.updateWorldMatrix(true,false);mesh.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate())}}class GridHelper extends LineSegments{constructor(size=10,divisions=10,color1=4473924,color2=8947848){color1=new Color(color1);color2=new Color(color2);const center=divisions/2;const step=size/divisions;const halfSize=size/2;const vertices=[],colors=[];for(let i=0,j=0,k=-halfSize;i<=divisions;i++,k+=step){vertices.push(-halfSize,0,k,halfSize,0,k);vertices.push(k,0,-halfSize,k,0,halfSize);const color=i===center?color1:color2;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3}const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="GridHelper"}dispose(){this.geometry.dispose();this.material.dispose()}}class PolarGridHelper extends LineSegments{constructor(radius=10,sectors=16,rings=8,divisions=64,color1=4473924,color2=8947848){color1=new Color(color1);color2=new Color(color2);const vertices=[];const colors=[];if(sectors>1){for(let i=0;i<sectors;i++){const v=i/sectors*(Math.PI*2);const x=Math.sin(v)*radius;const z=Math.cos(v)*radius;vertices.push(0,0,0);vertices.push(x,0,z);const color=i&1?color1:color2;colors.push(color.r,color.g,color.b);colors.push(color.r,color.g,color.b)}}for(let i=0;i<rings;i++){const color=i&1?color1:color2;const r=radius-radius/rings*i;for(let j=0;j<divisions;j++){let v=j/divisions*(Math.PI*2);let x=Math.sin(v)*r;let z=Math.cos(v)*r;vertices.push(x,0,z);colors.push(color.r,color.g,color.b);v=(j+1)/divisions*(Math.PI*2);x=Math.sin(v)*r;z=Math.cos(v)*r;vertices.push(x,0,z);colors.push(color.r,color.g,color.b)}}const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="PolarGridHelper"}dispose(){this.geometry.dispose();this.material.dispose()}}const _v1=new Vector3;const _v2=new Vector3;const _v3=new Vector3;class DirectionalLightHelper extends Object3D{constructor(light,size,color){super();this.light=light;this.matrix=light.matrixWorld;this.matrixAutoUpdate=false;this.color=color;this.type="DirectionalLightHelper";if(size===undefined)size=1;let geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([-size,size,0,size,size,0,size,-size,0,-size,-size,0,-size,size,0],3));const material=new LineBasicMaterial({fog:false,toneMapped:false});this.lightPlane=new Line(geometry,material);this.add(this.lightPlane);geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,0,1],3));this.targetLine=new Line(geometry,material);this.add(this.targetLine);this.update()}dispose(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(true,false);this.light.target.updateWorldMatrix(true,false);_v1.setFromMatrixPosition(this.light.matrixWorld);_v2.setFromMatrixPosition(this.light.target.matrixWorld);_v3.subVectors(_v2,_v1);this.lightPlane.lookAt(_v2);if(this.color!==undefined){this.lightPlane.material.color.set(this.color);this.targetLine.material.color.set(this.color)}else{this.lightPlane.material.color.copy(this.light.color);this.targetLine.material.color.copy(this.light.color)}this.targetLine.lookAt(_v2);this.targetLine.scale.z=_v3.length()}}const _vector=new Vector3;const _camera=new Camera;class CameraHelper extends LineSegments{constructor(camera){const geometry=new BufferGeometry;const material=new LineBasicMaterial({color:16777215,vertexColors:true,toneMapped:false});const vertices=[];const colors=[];const pointMap={};addLine("n1","n2");addLine("n2","n4");addLine("n4","n3");addLine("n3","n1");addLine("f1","f2");addLine("f2","f4");addLine("f4","f3");addLine("f3","f1");addLine("n1","f1");addLine("n2","f2");addLine("n3","f3");addLine("n4","f4");addLine("p","n1");addLine("p","n2");addLine("p","n3");addLine("p","n4");addLine("u1","u2");addLine("u2","u3");addLine("u3","u1");addLine("c","t");addLine("p","c");addLine("cn1","cn2");addLine("cn3","cn4");addLine("cf1","cf2");addLine("cf3","cf4");function addLine(a,b){addPoint(a);addPoint(b)}function addPoint(id){vertices.push(0,0,0);colors.push(0,0,0);if(pointMap[id]===undefined){pointMap[id]=[]}pointMap[id].push(vertices.length/3-1)}geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));super(geometry,material);this.type="CameraHelper";this.camera=camera;if(this.camera.updateProjectionMatrix)this.camera.updateProjectionMatrix();this.matrix=camera.matrixWorld;this.matrixAutoUpdate=false;this.pointMap=pointMap;this.update();const colorFrustum=new Color(16755200);const colorCone=new Color(16711680);const colorUp=new Color(43775);const colorTarget=new Color(16777215);const colorCross=new Color(3355443);this.setColors(colorFrustum,colorCone,colorUp,colorTarget,colorCross)}setColors(frustum,cone,up,target,cross){const geometry=this.geometry;const colorAttribute=geometry.getAttribute("color");colorAttribute.setXYZ(0,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(1,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(2,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(3,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(4,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(5,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(6,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(7,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(8,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(9,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(10,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(11,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(12,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(13,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(14,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(15,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(16,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(17,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(18,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(19,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(20,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(21,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(22,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(23,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(24,cone.r,cone.g,cone.b);colorAttribute.setXYZ(25,cone.r,cone.g,cone.b);colorAttribute.setXYZ(26,cone.r,cone.g,cone.b);colorAttribute.setXYZ(27,cone.r,cone.g,cone.b);colorAttribute.setXYZ(28,cone.r,cone.g,cone.b);colorAttribute.setXYZ(29,cone.r,cone.g,cone.b);colorAttribute.setXYZ(30,cone.r,cone.g,cone.b);colorAttribute.setXYZ(31,cone.r,cone.g,cone.b);colorAttribute.setXYZ(32,up.r,up.g,up.b);colorAttribute.setXYZ(33,up.r,up.g,up.b);colorAttribute.setXYZ(34,up.r,up.g,up.b);colorAttribute.setXYZ(35,up.r,up.g,up.b);colorAttribute.setXYZ(36,up.r,up.g,up.b);colorAttribute.setXYZ(37,up.r,up.g,up.b);colorAttribute.setXYZ(38,target.r,target.g,target.b);colorAttribute.setXYZ(39,target.r,target.g,target.b);colorAttribute.setXYZ(40,cross.r,cross.g,cross.b);colorAttribute.setXYZ(41,cross.r,cross.g,cross.b);colorAttribute.setXYZ(42,cross.r,cross.g,cross.b);colorAttribute.setXYZ(43,cross.r,cross.g,cross.b);colorAttribute.setXYZ(44,cross.r,cross.g,cross.b);colorAttribute.setXYZ(45,cross.r,cross.g,cross.b);colorAttribute.setXYZ(46,cross.r,cross.g,cross.b);colorAttribute.setXYZ(47,cross.r,cross.g,cross.b);colorAttribute.setXYZ(48,cross.r,cross.g,cross.b);colorAttribute.setXYZ(49,cross.r,cross.g,cross.b);colorAttribute.needsUpdate=true;return this}update(){const geometry=this.geometry;const pointMap=this.pointMap;const w=1,h=1;let nearZ,farZ;_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);if(this.camera.reversedDepth===true){nearZ=1;farZ=0}else{if(this.camera.coordinateSystem===WebGLCoordinateSystem){nearZ=-1;farZ=1}else if(this.camera.coordinateSystem===WebGPUCoordinateSystem){nearZ=0;farZ=1}else{throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem)}}setPoint("c",pointMap,geometry,_camera,0,0,nearZ);setPoint("t",pointMap,geometry,_camera,0,0,farZ);setPoint("n1",pointMap,geometry,_camera,-w,-h,nearZ);setPoint("n2",pointMap,geometry,_camera,w,-h,nearZ);setPoint("n3",pointMap,geometry,_camera,-w,h,nearZ);setPoint("n4",pointMap,geometry,_camera,w,h,nearZ);setPoint("f1",pointMap,geometry,_camera,-w,-h,farZ);setPoint("f2",pointMap,geometry,_camera,w,-h,farZ);setPoint("f3",pointMap,geometry,_camera,-w,h,farZ);setPoint("f4",pointMap,geometry,_camera,w,h,farZ);setPoint("u1",pointMap,geometry,_camera,w*0.7,h*1.1,nearZ);setPoint("u2",pointMap,geometry,_camera,-w*0.7,h*1.1,nearZ);setPoint("u3",pointMap,geometry,_camera,0,h*2,nearZ);setPoint("cf1",pointMap,geometry,_camera,-w,0,farZ);setPoint("cf2",pointMap,geometry,_camera,w,0,farZ);setPoint("cf3",pointMap,geometry,_camera,0,-h,farZ);setPoint("cf4",pointMap,geometry,_camera,0,h,farZ);setPoint("cn1",pointMap,geometry,_camera,-w,0,nearZ);setPoint("cn2",pointMap,geometry,_camera,w,0,nearZ);setPoint("cn3",pointMap,geometry,_camera,0,-h,nearZ);setPoint("cn4",pointMap,geometry,_camera,0,h,nearZ);geometry.getAttribute("position").needsUpdate=true}dispose(){this.geometry.dispose();this.material.dispose()}}function setPoint(point,pointMap,geometry,camera,x,y,z){_vector.set(x,y,z).unproject(camera);const points=pointMap[point];if(points!==undefined){const position=geometry.getAttribute("position");for(let i=0,l=points.length;i<l;i++){position.setXYZ(points[i],_vector.x,_vector.y,_vector.z)}}}const _box=new Box3;class BoxHelper extends LineSegments{constructor(object,color=16776960){const indices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);const positions=new Float32Array(8*3);const geometry=new BufferGeometry;geometry.setIndex(new BufferAttribute(indices,1));geometry.setAttribute("position",new BufferAttribute(positions,3));super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.object=object;this.type="BoxHelper";this.matrixAutoUpdate=false;this.update()}update(){if(this.object!==undefined){_box.setFromObject(this.object)}if(_box.isEmpty())return;const min=_box.min;const max=_box.max;const position=this.geometry.attributes.position;const array=position.array;array[0]=max.x;array[1]=max.y;array[2]=max.z;array[3]=min.x;array[4]=max.y;array[5]=max.z;array[6]=min.x;array[7]=min.y;array[8]=max.z;array[9]=max.x;array[10]=min.y;array[11]=max.z;array[12]=max.x;array[13]=max.y;array[14]=min.z;array[15]=min.x;array[16]=max.y;array[17]=min.z;array[18]=min.x;array[19]=min.y;array[20]=min.z;array[21]=max.x;array[22]=min.y;array[23]=min.z;position.needsUpdate=true;this.geometry.computeBoundingSphere()}setFromObject(object){this.object=object;this.update();return this}copy(source,recursive){super.copy(source,recursive);this.object=source.object;return this}dispose(){this.geometry.dispose();this.material.dispose()}}class Box3Helper extends LineSegments{constructor(box,color=16776960){const indices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);const positions=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1];const geometry=new BufferGeometry;geometry.setIndex(new BufferAttribute(indices,1));geometry.setAttribute("position",new Float32BufferAttribute(positions,3));super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.box=box;this.type="Box3Helper";this.geometry.computeBoundingSphere()}updateMatrixWorld(force){const box=this.box;if(box.isEmpty())return;box.getCenter(this.position);box.getSize(this.scale);this.scale.multiplyScalar(0.5);super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose()}}class PlaneHelper extends Line{constructor(plane,size=1,hex=16776960){const color=hex;const positions=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0];const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(positions,3));geometry.computeBoundingSphere();super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.type="PlaneHelper";this.plane=plane;this.size=size;const positions2=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0];const geometry2=new BufferGeometry;geometry2.setAttribute("position",new Float32BufferAttribute(positions2,3));geometry2.computeBoundingSphere();this.add(new Mesh(geometry2,new MeshBasicMaterial({color:color,opacity:0.2,transparent:true,depthWrite:false,toneMapped:false})))}updateMatrixWorld(force){this.position.set(0,0,0);this.scale.set(0.5*this.size,0.5*this.size,1);this.lookAt(this.plane.normal);this.translateZ(-this.plane.constant);super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose();this.children[0].geometry.dispose();this.children[0].material.dispose()}}const _axis=new Vector3;let _lineGeometry,_coneGeometry;class ArrowHelper extends Object3D{constructor(dir=new Vector3(0,0,1),origin=new Vector3(0,0,0),length=1,color=16776960,headLength=length*0.2,headWidth=headLength*0.2){super();this.type="ArrowHelper";if(_lineGeometry===undefined){_lineGeometry=new BufferGeometry;_lineGeometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,1,0],3));_coneGeometry=new ConeGeometry(0.5,1,5,1);_coneGeometry.translate(0,-0.5,0)}this.position.copy(origin);this.line=new Line(_lineGeometry,new LineBasicMaterial({color:color,toneMapped:false}));this.line.matrixAutoUpdate=false;this.add(this.line);this.cone=new Mesh(_coneGeometry,new MeshBasicMaterial({color:color,toneMapped:false}));this.cone.matrixAutoUpdate=false;this.add(this.cone);this.setDirection(dir);this.setLength(length,headLength,headWidth)}setDirection(dir){if(dir.y>0.99999){this.quaternion.set(0,0,0,1)}else if(dir.y<-0.99999){this.quaternion.set(1,0,0,0)}else{_axis.set(dir.z,0,-dir.x).normalize();const radians=Math.acos(dir.y);this.quaternion.setFromAxisAngle(_axis,radians)}}setLength(length,headLength=length*0.2,headWidth=headLength*0.2){this.line.scale.set(1,Math.max(0.0001,length-headLength),1);this.line.updateMatrix();this.cone.scale.set(headWidth,headLength,headWidth);this.cone.position.y=length;this.cone.updateMatrix()}setColor(color){this.line.material.color.set(color);this.cone.material.color.set(color)}copy(source){super.copy(source,false);this.line.copy(source.line);this.cone.copy(source.cone);return this}dispose(){this.line.geometry.dispose();this.line.material.dispose();this.cone.geometry.dispose();this.cone.material.dispose()}}class AxesHelper extends LineSegments{constructor(size=1){const vertices=[0,0,0,size,0,0,0,0,0,0,size,0,0,0,0,0,0,size];const colors=[1,0,0,1,0.6,0,0,1,0,0.6,1,0,0,0,1,0,0.6,1];const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="AxesHelper"}setColors(xAxisColor,yAxisColor,zAxisColor){const color=new Color;const array=this.geometry.attributes.color.array;color.set(xAxisColor);color.toArray(array,0);color.toArray(array,3);color.set(yAxisColor);color.toArray(array,6);color.toArray(array,9);color.set(zAxisColor);color.toArray(array,12);color.toArray(array,15);this.geometry.attributes.color.needsUpdate=true;return this}dispose(){this.geometry.dispose();this.material.dispose()}}class ShapePath{constructor(){this.type="ShapePath";this.color=new Color;this.subPaths=[];this.currentPath=null}moveTo(x,y){this.currentPath=new Path;this.subPaths.push(this.currentPath);this.currentPath.moveTo(x,y);return this}lineTo(x,y){this.currentPath.lineTo(x,y);return this}quadraticCurveTo(aCPx,aCPy,aX,aY){this.currentPath.quadraticCurveTo(aCPx,aCPy,aX,aY);return this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){this.currentPath.bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY);return this}splineThru(pts){this.currentPath.splineThru(pts);return this}toShapes(isCCW){function toShapesNoHoles(inSubpaths){const shapes=[];for(let i=0,l=inSubpaths.length;i<l;i++){const tmpPath=inSubpaths[i];const tmpShape=new Shape;tmpShape.curves=tmpPath.curves;shapes.push(tmpShape)}return shapes}function isPointInsidePolygon(inPt,inPolygon){const polyLen=inPolygon.length;let inside=false;for(let p=polyLen-1,q=0;q<polyLen;p=q++){let edgeLowPt=inPolygon[p];let edgeHighPt=inPolygon[q];let edgeDx=edgeHighPt.x-edgeLowPt.x;let edgeDy=edgeHighPt.y-edgeLowPt.y;if(Math.abs(edgeDy)>Number.EPSILON){if(edgeDy<0){edgeLowPt=inPolygon[q];edgeDx=-edgeDx;edgeHighPt=inPolygon[p];edgeDy=-edgeDy}if(inPt.y<edgeLowPt.y||inPt.y>edgeHighPt.y)continue;if(inPt.y===edgeLowPt.y){if(inPt.x===edgeLowPt.x)return true}else{const perpEdge=edgeDy*(inPt.x-edgeLowPt.x)-edgeDx*(inPt.y-edgeLowPt.y);if(perpEdge===0)return true;if(perpEdge<0)continue;inside=!inside}}else{if(inPt.y!==edgeLowPt.y)continue;if(edgeHighPt.x<=inPt.x&&inPt.x<=edgeLowPt.x||edgeLowPt.x<=inPt.x&&inPt.x<=edgeHighPt.x)return true}}return inside}const isClockWise=ShapeUtils.isClockWise;const subPaths=this.subPaths;if(subPaths.length===0)return[];let solid,tmpPath,tmpShape;const shapes=[];if(subPaths.length===1){tmpPath=subPaths[0];tmpShape=new Shape;tmpShape.curves=tmpPath.curves;shapes.push(tmpShape);return shapes}let holesFirst=!isClockWise(subPaths[0].getPoints());holesFirst=isCCW?!holesFirst:holesFirst;const betterShapeHoles=[];const newShapes=[];let newShapeHoles=[];let mainIdx=0;let tmpPoints;newShapes[mainIdx]=undefined;newShapeHoles[mainIdx]=[];for(let i=0,l=subPaths.length;i<l;i++){tmpPath=subPaths[i];tmpPoints=tmpPath.getPoints();solid=isClockWise(tmpPoints);solid=isCCW?!solid:solid;if(solid){if(!holesFirst&&newShapes[mainIdx])mainIdx++;newShapes[mainIdx]={s:new Shape,p:tmpPoints};newShapes[mainIdx].s.curves=tmpPath.curves;if(holesFirst)mainIdx++;newShapeHoles[mainIdx]=[]}else{newShapeHoles[mainIdx].push({h:tmpPath,p:tmpPoints[0]})}}if(!newShapes[0])return toShapesNoHoles(subPaths);if(newShapes.length>1){let ambiguous=false;let toChange=0;for(let sIdx=0,sLen=newShapes.length;sIdx<sLen;sIdx++){betterShapeHoles[sIdx]=[]}for(let sIdx=0,sLen=newShapes.length;sIdx<sLen;sIdx++){const sho=newShapeHoles[sIdx];for(let hIdx=0;hIdx<sho.length;hIdx++){const ho=sho[hIdx];let hole_unassigned=true;for(let s2Idx=0;s2Idx<newShapes.length;s2Idx++){if(isPointInsidePolygon(ho.p,newShapes[s2Idx].p)){if(sIdx!==s2Idx)toChange++;if(hole_unassigned){hole_unassigned=false;betterShapeHoles[s2Idx].push(ho)}else{ambiguous=true}}}if(hole_unassigned){betterShapeHoles[sIdx].push(ho)}}}if(toChange>0&&ambiguous===false){newShapeHoles=betterShapeHoles}}let tmpHoles;for(let i=0,il=newShapes.length;i<il;i++){tmpShape=newShapes[i].s;shapes.push(tmpShape);tmpHoles=newShapeHoles[i];for(let j=0,jl=tmpHoles.length;j<jl;j++){tmpShape.holes.push(tmpHoles[j].h)}}return shapes}}class Controls extends EventDispatcher{constructor(object,domElement=null){super();this.object=object;this.domElement=domElement;this.enabled=true;this.state=-1;this.keys={};this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null};this.touches={ONE:null,TWO:null}}connect(element){if(element===undefined){warn("Controls: connect() now requires an element.");return}if(this.domElement!==null)this.disconnect();this.domElement=element}disconnect(){}dispose(){}update(){}}function contain(texture,aspect){const imageAspect=texture.image&&texture.image.width?texture.image.width/texture.image.height:1;if(imageAspect>aspect){texture.repeat.x=1;texture.repeat.y=imageAspect/aspect;texture.offset.x=0;texture.offset.y=(1-texture.repeat.y)/2}else{texture.repeat.x=aspect/imageAspect;texture.repeat.y=1;texture.offset.x=(1-texture.repeat.x)/2;texture.offset.y=0}return texture}function cover(texture,aspect){const imageAspect=texture.image&&texture.image.width?texture.image.width/texture.image.height:1;if(imageAspect>aspect){texture.repeat.x=aspect/imageAspect;texture.repeat.y=1;texture.offset.x=(1-texture.repeat.x)/2;texture.offset.y=0}else{texture.repeat.x=1;texture.repeat.y=imageAspect/aspect;texture.offset.x=0;texture.offset.y=(1-texture.repeat.y)/2}return texture}function fill(texture){texture.repeat.x=1;texture.repeat.y=1;texture.offset.x=0;texture.offset.y=0;return texture}function getByteLength(width,height,format,type){const typeByteLength=getTextureTypeByteLength(type);switch(format){case AlphaFormat:return width*height;case RedFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RedIntegerFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RGFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGIntegerFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGBFormat:return width*height*3/typeByteLength.components*typeByteLength.byteLength;case RGBAFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGBAIntegerFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGB_S3TC_DXT1_Format:case RGBA_S3TC_DXT1_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_S3TC_DXT3_Format:case RGBA_S3TC_DXT5_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGB_PVRTC_2BPPV1_Format:case RGBA_PVRTC_2BPPV1_Format:return Math.max(width,16)*Math.max(height,8)/4;case RGB_PVRTC_4BPPV1_Format:case RGBA_PVRTC_4BPPV1_Format:return Math.max(width,8)*Math.max(height,8)/2;case RGB_ETC1_Format:case RGB_ETC2_Format:case R11_EAC_Format:case SIGNED_R11_EAC_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_ETC2_EAC_Format:case RG11_EAC_Format:case SIGNED_RG11_EAC_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_4x4_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x4_Format:return Math.floor((width+4)/5)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x5_Format:return Math.floor((width+4)/5)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x5_Format:return Math.floor((width+5)/6)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x6_Format:return Math.floor((width+5)/6)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x5_Format:return Math.floor((width+7)/8)*Math.floor((height+4)/5)*16;case RGBA_ASTC_8x6_Format:return Math.floor((width+7)/8)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x8_Format:return Math.floor((width+7)/8)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x5_Format:return Math.floor((width+9)/10)*Math.floor((height+4)/5)*16;case RGBA_ASTC_10x6_Format:return Math.floor((width+9)/10)*Math.floor((height+5)/6)*16;case RGBA_ASTC_10x8_Format:return Math.floor((width+9)/10)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x10_Format:return Math.floor((width+9)/10)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x10_Format:return Math.floor((width+11)/12)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x12_Format:return Math.floor((width+11)/12)*Math.floor((height+11)/12)*16;case RGBA_BPTC_Format:case RGB_BPTC_SIGNED_Format:case RGB_BPTC_UNSIGNED_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16;case RED_RGTC1_Format:case SIGNED_RED_RGTC1_Format:return Math.ceil(width/4)*Math.ceil(height/4)*8;case RED_GREEN_RGTC2_Format:case SIGNED_RED_GREEN_RGTC2_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16;}throw new Error(`Unable to determine texture byte length for ${format} format.`)}function getTextureTypeByteLength(type){switch(type){case UnsignedByteType:case ByteType:return{byteLength:1,components:1};case UnsignedShortType:case ShortType:case HalfFloatType:return{byteLength:2,components:1};case UnsignedShort4444Type:case UnsignedShort5551Type:return{byteLength:2,components:4};case UnsignedIntType:case IntType:case FloatType:return{byteLength:4,components:1};case UnsignedInt5999Type:case UnsignedInt101111Type:return{byteLength:4,components:3};}throw new Error(`Unknown texture type ${type}.`)}class TextureUtils{static contain(texture,aspect){return contain(texture,aspect)}static cover(texture,aspect){return cover(texture,aspect)}static fill(texture){return fill(texture)}static getByteLength(width,height,format,type){return getByteLength(width,height,format,type)}}if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:REVISION}}))}if(typeof window!=="undefined"){if(window.__THREE__){warn("WARNING: Multiple instances of Three.js being imported.")}else{window.__THREE__=REVISION}}function WebGLAnimation(){let context=null;let isAnimating=false;let animationLoop=null;let requestId=null;function onAnimationFrame(time,frame){animationLoop(time,frame);requestId=context.requestAnimationFrame(onAnimationFrame)}return{start:function(){if(isAnimating===true)return;if(animationLoop===null)return;requestId=context.requestAnimationFrame(onAnimationFrame);isAnimating=true},stop:function(){context.cancelAnimationFrame(requestId);isAnimating=false},setAnimationLoop:function(callback){animationLoop=callback},setContext:function(value){context=value}}}function WebGLAttributes(gl){const buffers=new WeakMap;function createBuffer(attribute,bufferType){const array=attribute.array;const usage=attribute.usage;const size=array.byteLength;const buffer=gl.createBuffer();gl.bindBuffer(bufferType,buffer);gl.bufferData(bufferType,array,usage);attribute.onUploadCallback();let type;if(array instanceof Float32Array){type=gl.FLOAT}else if(typeof Float16Array!=="undefined"&&array instanceof Float16Array){type=gl.HALF_FLOAT}else if(array instanceof Uint16Array){if(attribute.isFloat16BufferAttribute){type=gl.HALF_FLOAT}else{type=gl.UNSIGNED_SHORT}}else if(array instanceof Int16Array){type=gl.SHORT}else if(array instanceof Uint32Array){type=gl.UNSIGNED_INT}else if(array instanceof Int32Array){type=gl.INT}else if(array instanceof Int8Array){type=gl.BYTE}else if(array instanceof Uint8Array){type=gl.UNSIGNED_BYTE}else if(array instanceof Uint8ClampedArray){type=gl.UNSIGNED_BYTE}else{throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+array)}return{buffer:buffer,type:type,bytesPerElement:array.BYTES_PER_ELEMENT,version:attribute.version,size:size}}function updateBuffer(buffer,attribute,bufferType){const array=attribute.array;const updateRanges=attribute.updateRanges;gl.bindBuffer(bufferType,buffer);if(updateRanges.length===0){gl.bufferSubData(bufferType,0,array)}else{updateRanges.sort((a,b)=>a.start-b.start);let mergeIndex=0;for(let i=1;i<updateRanges.length;i++){const previousRange=updateRanges[mergeIndex];const range=updateRanges[i];if(range.start<=previousRange.start+previousRange.count+1){previousRange.count=Math.max(previousRange.count,range.start+range.count-previousRange.start)}else{++mergeIndex;updateRanges[mergeIndex]=range}}updateRanges.length=mergeIndex+1;for(let i=0,l=updateRanges.length;i<l;i++){const range=updateRanges[i];gl.bufferSubData(bufferType,range.start*array.BYTES_PER_ELEMENT,array,range.start,range.count)}attribute.clearUpdateRanges()}attribute.onUploadCallback()}function get(attribute){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;return buffers.get(attribute)}function remove(attribute){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;const data=buffers.get(attribute);if(data){gl.deleteBuffer(data.buffer);buffers.delete(attribute)}}function update(attribute,bufferType){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;if(attribute.isGLBufferAttribute){const cached=buffers.get(attribute);if(!cached||cached.version<attribute.version){buffers.set(attribute,{buffer:attribute.buffer,type:attribute.type,bytesPerElement:attribute.elementSize,version:attribute.version})}return}const data=buffers.get(attribute);if(data===undefined){buffers.set(attribute,createBuffer(attribute,bufferType))}else if(data.version<attribute.version){if(data.size!==attribute.array.byteLength){throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.")}updateBuffer(data.buffer,attribute,bufferType);data.version=attribute.version}}return{get:get,remove:remove,update:update}}var alphahash_fragment="#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif";var alphahash_pars_fragment="#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif";var alphamap_fragment="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif";var alphamap_pars_fragment="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";var alphatest_fragment="#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif";var alphatest_pars_fragment="#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif";var aomap_fragment="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif";var aomap_pars_fragment="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";var batching_pars_vertex="#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n\tfloat getIndirectIndex( const in int i ) {\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif";var batching_vertex="#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif";var begin_vertex="vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif";var beginnormal_vertex="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif";var bsdfs="float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated";var iridescence_fragment="#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif";var bumpmap_pars_fragment="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif";var clipping_planes_fragment="#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif";var clipping_planes_pars_fragment="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif";var clipping_planes_pars_vertex="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif";var clipping_planes_vertex="#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif";var color_fragment="#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif";var color_pars_fragment="#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif";var color_pars_vertex="#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif";var color_vertex="#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.xyz;\n#endif";var common="#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated";var cube_uv_reflection_fragment="#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif";var defaultnormal_vertex="vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif";var displacementmap_pars_vertex="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif";var displacementmap_vertex="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif";var emissivemap_fragment="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n\t\temissiveColor = sRGBTransferEOTF( emissiveColor );\n\t#endif\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif";var emissivemap_pars_fragment="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif";var colorspace_fragment="gl_FragColor = linearToOutputTexel( gl_FragColor );";var colorspace_pars_fragment="vec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}";var envmap_fragment="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif";var envmap_common_pars_fragment="#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n#endif";var envmap_pars_fragment="#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif";var envmap_pars_vertex="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif";var envmap_vertex="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif";var fog_vertex="#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif";var fog_pars_vertex="#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif";var fog_fragment="#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif";var fog_pars_fragment="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif";var gradientmap_pars_fragment="#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}";var lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";var lights_lambert_fragment="LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;";var lights_lambert_pars_fragment="varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert";var lights_pars_begin="uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif";var envmap_physical_pars_fragment="#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif";var lights_toon_fragment="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;";var lights_toon_pars_fragment="varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon";var lights_phong_fragment="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;";var lights_phong_pars_fragment="varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong";var lights_physical_fragment="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.metalness = metalnessFactor;\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = vec3( 0.04 );\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif";var lights_physical_pars_fragment="uniform sampler2D dfgLUT;\nstruct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tvec3 diffuseContribution;\n\tvec3 specularColor;\n\tvec3 specularColorBlended;\n\tfloat roughness;\n\tfloat metalness;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t\tvec3 iridescenceFresnelDielectric;\n\t\tvec3 iridescenceFresnelMetallic;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn v;\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColorBlended;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat rInv = 1.0 / ( roughness + 0.1 );\n\tfloat a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;\n\tfloat b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;\n\tfloat DG = exp( a * dotNV + b );\n\treturn saturate( DG );\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;\n\tvec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;\n\tvec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;\n\tvec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;\n\tfloat Ess_V = dfgV.x + dfgV.y;\n\tfloat Ess_L = dfgL.x + dfgL.y;\n\tfloat Ems_V = 1.0 - Ess_V;\n\tfloat Ems_L = 1.0 - Ess_L;\n\tvec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;\n\tvec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );\n\tfloat compensationFactor = Ems_V * Ems_L;\n\tvec3 multiScatter = Fms * compensationFactor;\n\treturn singleScatter + multiScatter;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColorBlended * t2.x + ( vec3( 1.0 ) - material.specularColorBlended ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n \n \t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n \n \t\tfloat sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n \t\tfloat sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );\n \n \t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );\n \n \t\tirradiance *= sheenEnergyComp;\n \n \t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );\n\t#ifdef USE_SHEEN\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\t\tdiffuse *= sheenEnergyComp;\n\t#endif\n\treflectedLight.indirectDiffuse += diffuse;\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;\n \t#endif\n\tvec3 singleScatteringDielectric = vec3( 0.0 );\n\tvec3 multiScatteringDielectric = vec3( 0.0 );\n\tvec3 singleScatteringMetallic = vec3( 0.0 );\n\tvec3 multiScatteringMetallic = vec3( 0.0 );\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\t#endif\n\tvec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );\n\tvec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );\n\tvec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;\n\tvec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tvec3 indirectSpecular = radiance * singleScattering;\n\tindirectSpecular += multiScattering * cosineWeightedIrradiance;\n\tvec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\t\tindirectSpecular *= sheenEnergyComp;\n\t\tindirectDiffuse *= sheenEnergyComp;\n\t#endif\n\treflectedLight.indirectSpecular += indirectSpecular;\n\treflectedLight.indirectDiffuse += indirectDiffuse;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}";var lights_fragment_begin="\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );\n\t\tmaterial.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif";var lights_fragment_maps="#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif";var lights_fragment_end="#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif";var logdepthbuf_fragment="#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";var logdepthbuf_pars_fragment="#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_pars_vertex="#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_vertex="#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif";var map_fragment="#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif";var map_pars_fragment="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif";var map_particle_fragment="#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif";var map_particle_pars_fragment="#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";var metalnessmap_fragment="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif";var metalnessmap_pars_fragment="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";var morphinstance_vertex="#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif";var morphcolor_vertex="#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif";var morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif";var morphtarget_pars_vertex="#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif";var morphtarget_vertex="#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif";var normal_fragment_begin="float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;";var normal_fragment_maps="#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif";var normal_pars_fragment="#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";var normal_pars_vertex="#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";var normal_vertex="#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif";var normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif";var clearcoat_normal_fragment_begin="#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif";var clearcoat_normal_fragment_maps="#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif";var clearcoat_pars_fragment="#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif";var iridescence_pars_fragment="#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif";var opaque_fragment="#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );";var packing="vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}";var premultiplied_alpha_fragment="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif";var project_vertex="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;";var dithering_fragment="#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif";var dithering_pars_fragment="#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif";var roughnessmap_fragment="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif";var roughnessmap_pars_fragment="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";var shadowmap_pars_fragment="#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\t#else\n\t\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\t#else\n\t\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tuniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\t\t\tuniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\t#endif\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat interleavedGradientNoise( vec2 position ) {\n\t\t\treturn fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );\n\t\t}\n\t\tvec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {\n\t\t\tconst float goldenAngle = 2.399963229728653;\n\t\t\tfloat r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );\n\t\t\tfloat theta = float( sampleIndex ) * goldenAngle + phi;\n\t\t\treturn vec2( cos( theta ), sin( theta ) ) * r;\n\t\t}\n\t#endif\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\tfloat getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\t\tfloat radius = shadowRadius * texelSize.x;\n\t\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )\n\t\t\t\t) * 0.2;\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tvec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;\n\t\t\t\tfloat mean = distribution.x;\n\t\t\t\tfloat variance = distribution.y * distribution.y;\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\t\tfloat hard_shadow = step( mean, shadowCoord.z );\n\t\t\t\t#else\n\t\t\t\t\tfloat hard_shadow = step( shadowCoord.z, mean );\n\t\t\t\t#endif\n\t\t\t\tif ( hard_shadow == 1.0 ) {\n\t\t\t\t\tshadow = 1.0;\n\t\t\t\t} else {\n\t\t\t\t\tvariance = max( variance, 0.0000001 );\n\t\t\t\t\tfloat d = shadowCoord.z - mean;\n\t\t\t\t\tfloat p_max = variance / ( variance + d * d );\n\t\t\t\t\tp_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );\n\t\t\t\t\tshadow = max( hard_shadow, p_max );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#else\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\t\tfloat shadow = 1.0;\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\t\tif ( frustumTest ) {\n\t\t\t\tfloat depth = texture2D( shadowMap, shadowCoord.xy ).r;\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\t\tshadow = step( depth, shadowCoord.z );\n\t\t\t\t#else\n\t\t\t\t\tshadow = step( shadowCoord.z, depth );\n\t\t\t\t#endif\n\t\t\t}\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\tfloat getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\t\t\tfloat texelSize = shadowRadius / shadowMapSize.x;\n\t\t\tvec3 absDir = abs( bd3D );\n\t\t\tvec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );\n\t\t\ttangent = normalize( cross( bd3D, tangent ) );\n\t\t\tvec3 bitangent = cross( bd3D, tangent );\n\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n\t\t\tshadow = (\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) )\n\t\t\t) * 0.2;\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\tfloat getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\t\t\tfloat depth = textureCube( shadowMap, bd3D ).r;\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\t\t\tshadow = step( depth, dp );\n\t\t\t#else\n\t\t\t\tshadow = step( dp, depth );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\t#endif\n\t#endif\n#endif";var shadowmap_pars_vertex="#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif";var shadowmap_vertex="#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif";var shadowmask_pars_fragment="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}";var skinbase_vertex="#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";var skinning_pars_vertex="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif";var skinning_vertex="#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif";var skinnormal_vertex="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif";var specularmap_fragment="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif";var specularmap_pars_fragment="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";var tonemapping_fragment="#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";var tonemapping_pars_fragment="#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }";var transmission_fragment="#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif";var transmission_pars_fragment="#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t#else\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif";var uv_pars_fragment="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";var uv_pars_vertex="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";var uv_vertex="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif";var worldpos_vertex="#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif";const vertex$h="varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}";const fragment$h="uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$g="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";const fragment$g="#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$f="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";const fragment$f="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$e="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}";const fragment$e="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\t#else\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\t#endif\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}";const vertex$d="#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}";const fragment$d="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n}";const vertex$c="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}";const fragment$c="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$b="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";const fragment$b="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";const vertex$a="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$a="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$9="#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$9="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$8="#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}";const fragment$8="#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$7="#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}";const fragment$7="#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}";const vertex$6="#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$6="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$5="#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}";const fragment$5="#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n \n\t\toutgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n \t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$4="#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$4="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$3="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}";const fragment$3="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";const vertex$2="#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$2="uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";const vertex$1="uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";const fragment$1="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";const ShaderChunk={alphahash_fragment:alphahash_fragment,alphahash_pars_fragment:alphahash_pars_fragment,alphamap_fragment:alphamap_fragment,alphamap_pars_fragment:alphamap_pars_fragment,alphatest_fragment:alphatest_fragment,alphatest_pars_fragment:alphatest_pars_fragment,aomap_fragment:aomap_fragment,aomap_pars_fragment:aomap_pars_fragment,batching_pars_vertex:batching_pars_vertex,batching_vertex:batching_vertex,begin_vertex:begin_vertex,beginnormal_vertex:beginnormal_vertex,bsdfs:bsdfs,iridescence_fragment:iridescence_fragment,bumpmap_pars_fragment:bumpmap_pars_fragment,clipping_planes_fragment:clipping_planes_fragment,clipping_planes_pars_fragment:clipping_planes_pars_fragment,clipping_planes_pars_vertex:clipping_planes_pars_vertex,clipping_planes_vertex:clipping_planes_vertex,color_fragment:color_fragment,color_pars_fragment:color_pars_fragment,color_pars_vertex:color_pars_vertex,color_vertex:color_vertex,common:common,cube_uv_reflection_fragment:cube_uv_reflection_fragment,defaultnormal_vertex:defaultnormal_vertex,displacementmap_pars_vertex:displacementmap_pars_vertex,displacementmap_vertex:displacementmap_vertex,emissivemap_fragment:emissivemap_fragment,emissivemap_pars_fragment:emissivemap_pars_fragment,colorspace_fragment:colorspace_fragment,colorspace_pars_fragment:colorspace_pars_fragment,envmap_fragment:envmap_fragment,envmap_common_pars_fragment:envmap_common_pars_fragment,envmap_pars_fragment:envmap_pars_fragment,envmap_pars_vertex:envmap_pars_vertex,envmap_physical_pars_fragment:envmap_physical_pars_fragment,envmap_vertex:envmap_vertex,fog_vertex:fog_vertex,fog_pars_vertex:fog_pars_vertex,fog_fragment:fog_fragment,fog_pars_fragment:fog_pars_fragment,gradientmap_pars_fragment:gradientmap_pars_fragment,lightmap_pars_fragment:lightmap_pars_fragment,lights_lambert_fragment:lights_lambert_fragment,lights_lambert_pars_fragment:lights_lambert_pars_fragment,lights_pars_begin:lights_pars_begin,lights_toon_fragment:lights_toon_fragment,lights_toon_pars_fragment:lights_toon_pars_fragment,lights_phong_fragment:lights_phong_fragment,lights_phong_pars_fragment:lights_phong_pars_fragment,lights_physical_fragment:lights_physical_fragment,lights_physical_pars_fragment:lights_physical_pars_fragment,lights_fragment_begin:lights_fragment_begin,lights_fragment_maps:lights_fragment_maps,lights_fragment_end:lights_fragment_end,logdepthbuf_fragment:logdepthbuf_fragment,logdepthbuf_pars_fragment:logdepthbuf_pars_fragment,logdepthbuf_pars_vertex:logdepthbuf_pars_vertex,logdepthbuf_vertex:logdepthbuf_vertex,map_fragment:map_fragment,map_pars_fragment:map_pars_fragment,map_particle_fragment:map_particle_fragment,map_particle_pars_fragment:map_particle_pars_fragment,metalnessmap_fragment:metalnessmap_fragment,metalnessmap_pars_fragment:metalnessmap_pars_fragment,morphinstance_vertex:morphinstance_vertex,morphcolor_vertex:morphcolor_vertex,morphnormal_vertex:morphnormal_vertex,morphtarget_pars_vertex:morphtarget_pars_vertex,morphtarget_vertex:morphtarget_vertex,normal_fragment_begin:normal_fragment_begin,normal_fragment_maps:normal_fragment_maps,normal_pars_fragment:normal_pars_fragment,normal_pars_vertex:normal_pars_vertex,normal_vertex:normal_vertex,normalmap_pars_fragment:normalmap_pars_fragment,clearcoat_normal_fragment_begin:clearcoat_normal_fragment_begin,clearcoat_normal_fragment_maps:clearcoat_normal_fragment_maps,clearcoat_pars_fragment:clearcoat_pars_fragment,iridescence_pars_fragment:iridescence_pars_fragment,opaque_fragment:opaque_fragment,packing:packing,premultiplied_alpha_fragment:premultiplied_alpha_fragment,project_vertex:project_vertex,dithering_fragment:dithering_fragment,dithering_pars_fragment:dithering_pars_fragment,roughnessmap_fragment:roughnessmap_fragment,roughnessmap_pars_fragment:roughnessmap_pars_fragment,shadowmap_pars_fragment:shadowmap_pars_fragment,shadowmap_pars_vertex:shadowmap_pars_vertex,shadowmap_vertex:shadowmap_vertex,shadowmask_pars_fragment:shadowmask_pars_fragment,skinbase_vertex:skinbase_vertex,skinning_pars_vertex:skinning_pars_vertex,skinning_vertex:skinning_vertex,skinnormal_vertex:skinnormal_vertex,specularmap_fragment:specularmap_fragment,specularmap_pars_fragment:specularmap_pars_fragment,tonemapping_fragment:tonemapping_fragment,tonemapping_pars_fragment:tonemapping_pars_fragment,transmission_fragment:transmission_fragment,transmission_pars_fragment:transmission_pars_fragment,uv_pars_fragment:uv_pars_fragment,uv_pars_vertex:uv_pars_vertex,uv_vertex:uv_vertex,worldpos_vertex:worldpos_vertex,background_vert:vertex$h,background_frag:fragment$h,backgroundCube_vert:vertex$g,backgroundCube_frag:fragment$g,cube_vert:vertex$f,cube_frag:fragment$f,depth_vert:vertex$e,depth_frag:fragment$e,distance_vert:vertex$d,distance_frag:fragment$d,equirect_vert:vertex$c,equirect_frag:fragment$c,linedashed_vert:vertex$b,linedashed_frag:fragment$b,meshbasic_vert:vertex$a,meshbasic_frag:fragment$a,meshlambert_vert:vertex$9,meshlambert_frag:fragment$9,meshmatcap_vert:vertex$8,meshmatcap_frag:fragment$8,meshnormal_vert:vertex$7,meshnormal_frag:fragment$7,meshphong_vert:vertex$6,meshphong_frag:fragment$6,meshphysical_vert:vertex$5,meshphysical_frag:fragment$5,meshtoon_vert:vertex$4,meshtoon_frag:fragment$4,points_vert:vertex$3,points_frag:fragment$3,shadow_vert:vertex$2,shadow_frag:fragment$2,sprite_vert:vertex$1,sprite_frag:fragment$1};const UniformsLib={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},envMapRotation:{value:new Matrix3},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:0.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:0.00025},fogNear:{value:1},fogFar:{value:2000},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(0.5,0.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}};const ShaderLib={basic:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.fog]),vertexShader:ShaderChunk.meshbasic_vert,fragmentShader:ShaderChunk.meshbasic_frag},lambert:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshlambert_vert,fragmentShader:ShaderChunk.meshlambert_frag},phong:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:ShaderChunk.meshphong_vert,fragmentShader:ShaderChunk.meshphong_frag},standard:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.roughnessmap,UniformsLib.metalnessmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag},toon:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.gradientmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshtoon_vert,fragmentShader:ShaderChunk.meshtoon_frag},matcap:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,{matcap:{value:null}}]),vertexShader:ShaderChunk.meshmatcap_vert,fragmentShader:ShaderChunk.meshmatcap_frag},points:{uniforms:mergeUniforms([UniformsLib.points,UniformsLib.fog]),vertexShader:ShaderChunk.points_vert,fragmentShader:ShaderChunk.points_frag},dashed:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ShaderChunk.linedashed_vert,fragmentShader:ShaderChunk.linedashed_frag},depth:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap]),vertexShader:ShaderChunk.depth_vert,fragmentShader:ShaderChunk.depth_frag},normal:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,{opacity:{value:1}}]),vertexShader:ShaderChunk.meshnormal_vert,fragmentShader:ShaderChunk.meshnormal_frag},sprite:{uniforms:mergeUniforms([UniformsLib.sprite,UniformsLib.fog]),vertexShader:ShaderChunk.sprite_vert,fragmentShader:ShaderChunk.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ShaderChunk.background_vert,fragmentShader:ShaderChunk.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Matrix3}},vertexShader:ShaderChunk.backgroundCube_vert,fragmentShader:ShaderChunk.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ShaderChunk.cube_vert,fragmentShader:ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ShaderChunk.equirect_vert,fragmentShader:ShaderChunk.equirect_frag},distance:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1000}}]),vertexShader:ShaderChunk.distance_vert,fragmentShader:ShaderChunk.distance_frag},shadow:{uniforms:mergeUniforms([UniformsLib.lights,UniformsLib.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:ShaderChunk.shadow_vert,fragmentShader:ShaderChunk.shadow_frag}};ShaderLib.physical={uniforms:mergeUniforms([ShaderLib.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag};const _rgb={r:0,b:0,g:0};const _e1$1=new Euler;const _m1$1=new Matrix4;function WebGLBackground(renderer,cubemaps,cubeuvmaps,state,objects,alpha,premultipliedAlpha){const clearColor=new Color(0);let clearAlpha=alpha===true?0:1;let planeMesh;let boxMesh;let currentBackground=null;let currentBackgroundVersion=0;let currentTonemapping=null;function getBackground(scene){let background=scene.isScene===true?scene.background:null;if(background&&background.isTexture){const usePMREM=scene.backgroundBlurriness>0;background=(usePMREM?cubeuvmaps:cubemaps).get(background)}return background}function render(scene){let forceClear=false;const background=getBackground(scene);if(background===null){setClear(clearColor,clearAlpha)}else if(background&&background.isColor){setClear(background,1);forceClear=true}const environmentBlendMode=renderer.xr.getEnvironmentBlendMode();if(environmentBlendMode==="additive"){state.buffers.color.setClear(0,0,0,1,premultipliedAlpha)}else if(environmentBlendMode==="alpha-blend"){state.buffers.color.setClear(0,0,0,0,premultipliedAlpha)}if(renderer.autoClear||forceClear){state.buffers.depth.setTest(true);state.buffers.depth.setMask(true);state.buffers.color.setMask(true);renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil)}}function addToRenderList(renderList,scene){const background=getBackground(scene);if(background&&(background.isCubeTexture||background.mapping===CubeUVReflectionMapping)){if(boxMesh===undefined){boxMesh=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:"BackgroundCubeMaterial",uniforms:cloneUniforms(ShaderLib.backgroundCube.uniforms),vertexShader:ShaderLib.backgroundCube.vertexShader,fragmentShader:ShaderLib.backgroundCube.fragmentShader,side:BackSide,depthTest:false,depthWrite:false,fog:false,allowOverride:false}));boxMesh.geometry.deleteAttribute("normal");boxMesh.geometry.deleteAttribute("uv");boxMesh.onBeforeRender=function(renderer,scene,camera){this.matrixWorld.copyPosition(camera.matrixWorld)};Object.defineProperty(boxMesh.material,"envMap",{get:function(){return this.uniforms.envMap.value}});objects.update(boxMesh)}_e1$1.copy(scene.backgroundRotation);_e1$1.x*=-1;_e1$1.y*=-1;_e1$1.z*=-1;if(background.isCubeTexture&&background.isRenderTargetTexture===false){_e1$1.y*=-1;_e1$1.z*=-1}boxMesh.material.uniforms.envMap.value=background;boxMesh.material.uniforms.flipEnvMap.value=background.isCubeTexture&&background.isRenderTargetTexture===false?-1:1;boxMesh.material.uniforms.backgroundBlurriness.value=scene.backgroundBlurriness;boxMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity;boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4(_m1$1.makeRotationFromEuler(_e1$1));boxMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer;if(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer.toneMapping){boxMesh.material.needsUpdate=true;currentBackground=background;currentBackgroundVersion=background.version;currentTonemapping=renderer.toneMapping}boxMesh.layers.enableAll();renderList.unshift(boxMesh,boxMesh.geometry,boxMesh.material,0,0,null)}else if(background&&background.isTexture){if(planeMesh===undefined){planeMesh=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:"BackgroundMaterial",uniforms:cloneUniforms(ShaderLib.background.uniforms),vertexShader:ShaderLib.background.vertexShader,fragmentShader:ShaderLib.background.fragmentShader,side:FrontSide,depthTest:false,depthWrite:false,fog:false,allowOverride:false}));planeMesh.geometry.deleteAttribute("normal");Object.defineProperty(planeMesh.material,"map",{get:function(){return this.uniforms.t2D.value}});objects.update(planeMesh)}planeMesh.material.uniforms.t2D.value=background;planeMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity;planeMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer;if(background.matrixAutoUpdate===true){background.updateMatrix()}planeMesh.material.uniforms.uvTransform.value.copy(background.matrix);if(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer.toneMapping){planeMesh.material.needsUpdate=true;currentBackground=background;currentBackgroundVersion=background.version;currentTonemapping=renderer.toneMapping}planeMesh.layers.enableAll();renderList.unshift(planeMesh,planeMesh.geometry,planeMesh.material,0,0,null)}}function setClear(color,alpha){color.getRGB(_rgb,getUnlitUniformColorSpace(renderer));state.buffers.color.setClear(_rgb.r,_rgb.g,_rgb.b,alpha,premultipliedAlpha)}function dispose(){if(boxMesh!==undefined){boxMesh.geometry.dispose();boxMesh.material.dispose();boxMesh=undefined}if(planeMesh!==undefined){planeMesh.geometry.dispose();planeMesh.material.dispose();planeMesh=undefined}}return{getClearColor:function(){return clearColor},setClearColor:function(color,alpha=1){clearColor.set(color);clearAlpha=alpha;setClear(clearColor,clearAlpha)},getClearAlpha:function(){return clearAlpha},setClearAlpha:function(alpha){clearAlpha=alpha;setClear(clearColor,clearAlpha)},render:render,addToRenderList:addToRenderList,dispose:dispose}}function WebGLBindingStates(gl,attributes){const maxVertexAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS);const bindingStates={};const defaultState=createBindingState(null);let currentState=defaultState;let forceUpdate=false;function setup(object,material,program,geometry,index){let updateBuffers=false;const state=getBindingState(geometry,program,material);if(currentState!==state){currentState=state;bindVertexArrayObject(currentState.object)}updateBuffers=needsUpdate(object,geometry,program,index);if(updateBuffers)saveCache(object,geometry,program,index);if(index!==null){attributes.update(index,gl.ELEMENT_ARRAY_BUFFER)}if(updateBuffers||forceUpdate){forceUpdate=false;setupVertexAttributes(object,material,program,geometry);if(index!==null){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,attributes.get(index).buffer)}}}function createVertexArrayObject(){return gl.createVertexArray()}function bindVertexArrayObject(vao){return gl.bindVertexArray(vao)}function deleteVertexArrayObject(vao){return gl.deleteVertexArray(vao)}function getBindingState(geometry,program,material){const wireframe=material.wireframe===true;let programMap=bindingStates[geometry.id];if(programMap===undefined){programMap={};bindingStates[geometry.id]=programMap}let stateMap=programMap[program.id];if(stateMap===undefined){stateMap={};programMap[program.id]=stateMap}let state=stateMap[wireframe];if(state===undefined){state=createBindingState(createVertexArrayObject());stateMap[wireframe]=state}return state}function createBindingState(vao){const newAttributes=[];const enabledAttributes=[];const attributeDivisors=[];for(let i=0;i<maxVertexAttributes;i++){newAttributes[i]=0;enabledAttributes[i]=0;attributeDivisors[i]=0}return{geometry:null,program:null,wireframe:false,newAttributes:newAttributes,enabledAttributes:enabledAttributes,attributeDivisors:attributeDivisors,object:vao,attributes:{},index:null}}function needsUpdate(object,geometry,program,index){const cachedAttributes=currentState.attributes;const geometryAttributes=geometry.attributes;let attributesNum=0;const programAttributes=program.getAttributes();for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){const cachedAttribute=cachedAttributes[name];let geometryAttribute=geometryAttributes[name];if(geometryAttribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)geometryAttribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)geometryAttribute=object.instanceColor}if(cachedAttribute===undefined)return true;if(cachedAttribute.attribute!==geometryAttribute)return true;if(geometryAttribute&&cachedAttribute.data!==geometryAttribute.data)return true;attributesNum++}}if(currentState.attributesNum!==attributesNum)return true;if(currentState.index!==index)return true;return false}function saveCache(object,geometry,program,index){const cache={};const attributes=geometry.attributes;let attributesNum=0;const programAttributes=program.getAttributes();for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){let attribute=attributes[name];if(attribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)attribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)attribute=object.instanceColor}const data={};data.attribute=attribute;if(attribute&&attribute.data){data.data=attribute.data}cache[name]=data;attributesNum++}}currentState.attributes=cache;currentState.attributesNum=attributesNum;currentState.index=index}function initAttributes(){const newAttributes=currentState.newAttributes;for(let i=0,il=newAttributes.length;i<il;i++){newAttributes[i]=0}}function enableAttribute(attribute){enableAttributeAndDivisor(attribute,0)}function enableAttributeAndDivisor(attribute,meshPerAttribute){const newAttributes=currentState.newAttributes;const enabledAttributes=currentState.enabledAttributes;const attributeDivisors=currentState.attributeDivisors;newAttributes[attribute]=1;if(enabledAttributes[attribute]===0){gl.enableVertexAttribArray(attribute);enabledAttributes[attribute]=1}if(attributeDivisors[attribute]!==meshPerAttribute){gl.vertexAttribDivisor(attribute,meshPerAttribute);attributeDivisors[attribute]=meshPerAttribute}}function disableUnusedAttributes(){const newAttributes=currentState.newAttributes;const enabledAttributes=currentState.enabledAttributes;for(let i=0,il=enabledAttributes.length;i<il;i++){if(enabledAttributes[i]!==newAttributes[i]){gl.disableVertexAttribArray(i);enabledAttributes[i]=0}}}function vertexAttribPointer(index,size,type,normalized,stride,offset,integer){if(integer===true){gl.vertexAttribIPointer(index,size,type,stride,offset)}else{gl.vertexAttribPointer(index,size,type,normalized,stride,offset)}}function setupVertexAttributes(object,material,program,geometry){initAttributes();const geometryAttributes=geometry.attributes;const programAttributes=program.getAttributes();const materialDefaultAttributeValues=material.defaultAttributeValues;for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){let geometryAttribute=geometryAttributes[name];if(geometryAttribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)geometryAttribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)geometryAttribute=object.instanceColor}if(geometryAttribute!==undefined){const normalized=geometryAttribute.normalized;const size=geometryAttribute.itemSize;const attribute=attributes.get(geometryAttribute);if(attribute===undefined)continue;const buffer=attribute.buffer;const type=attribute.type;const bytesPerElement=attribute.bytesPerElement;const integer=type===gl.INT||type===gl.UNSIGNED_INT||geometryAttribute.gpuType===IntType;if(geometryAttribute.isInterleavedBufferAttribute){const data=geometryAttribute.data;const stride=data.stride;const offset=geometryAttribute.offset;if(data.isInstancedInterleavedBuffer){for(let i=0;i<programAttribute.locationSize;i++){enableAttributeAndDivisor(programAttribute.location+i,data.meshPerAttribute)}if(object.isInstancedMesh!==true&&geometry._maxInstanceCount===undefined){geometry._maxInstanceCount=data.meshPerAttribute*data.count}}else{for(let i=0;i<programAttribute.locationSize;i++){enableAttribute(programAttribute.location+i)}}gl.bindBuffer(gl.ARRAY_BUFFER,buffer);for(let i=0;i<programAttribute.locationSize;i++){vertexAttribPointer(programAttribute.location+i,size/programAttribute.locationSize,type,normalized,stride*bytesPerElement,(offset+size/programAttribute.locationSize*i)*bytesPerElement,integer)}}else{if(geometryAttribute.isInstancedBufferAttribute){for(let i=0;i<programAttribute.locationSize;i++){enableAttributeAndDivisor(programAttribute.location+i,geometryAttribute.meshPerAttribute)}if(object.isInstancedMesh!==true&&geometry._maxInstanceCount===undefined){geometry._maxInstanceCount=geometryAttribute.meshPerAttribute*geometryAttribute.count}}else{for(let i=0;i<programAttribute.locationSize;i++){enableAttribute(programAttribute.location+i)}}gl.bindBuffer(gl.ARRAY_BUFFER,buffer);for(let i=0;i<programAttribute.locationSize;i++){vertexAttribPointer(programAttribute.location+i,size/programAttribute.locationSize,type,normalized,size*bytesPerElement,size/programAttribute.locationSize*i*bytesPerElement,integer)}}}else if(materialDefaultAttributeValues!==undefined){const value=materialDefaultAttributeValues[name];if(value!==undefined){switch(value.length){case 2:gl.vertexAttrib2fv(programAttribute.location,value);break;case 3:gl.vertexAttrib3fv(programAttribute.location,value);break;case 4:gl.vertexAttrib4fv(programAttribute.location,value);break;default:gl.vertexAttrib1fv(programAttribute.location,value);}}}}}disableUnusedAttributes()}function dispose(){reset();for(const geometryId in bindingStates){const programMap=bindingStates[geometryId];for(const programId in programMap){const stateMap=programMap[programId];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[programId]}delete bindingStates[geometryId]}}function releaseStatesOfGeometry(geometry){if(bindingStates[geometry.id]===undefined)return;const programMap=bindingStates[geometry.id];for(const programId in programMap){const stateMap=programMap[programId];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[programId]}delete bindingStates[geometry.id]}function releaseStatesOfProgram(program){for(const geometryId in bindingStates){const programMap=bindingStates[geometryId];if(programMap[program.id]===undefined)continue;const stateMap=programMap[program.id];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[program.id]}}function reset(){resetDefaultState();forceUpdate=true;if(currentState===defaultState)return;currentState=defaultState;bindVertexArrayObject(currentState.object)}function resetDefaultState(){defaultState.geometry=null;defaultState.program=null;defaultState.wireframe=false}return{setup:setup,reset:reset,resetDefaultState:resetDefaultState,dispose:dispose,releaseStatesOfGeometry:releaseStatesOfGeometry,releaseStatesOfProgram:releaseStatesOfProgram,initAttributes:initAttributes,enableAttribute:enableAttribute,disableUnusedAttributes:disableUnusedAttributes}}function WebGLBufferRenderer(gl,extensions,info){let mode;function setMode(value){mode=value}function render(start,count){gl.drawArrays(mode,start,count);info.update(count,mode,1)}function renderInstances(start,count,primcount){if(primcount===0)return;gl.drawArraysInstanced(mode,start,count,primcount);info.update(count,mode,primcount)}function renderMultiDraw(starts,counts,drawCount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");extension.multiDrawArraysWEBGL(mode,starts,0,counts,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]}info.update(elementCount,mode,1)}function renderMultiDrawInstances(starts,counts,drawCount,primcount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");if(extension===null){for(let i=0;i<starts.length;i++){renderInstances(starts[i],counts[i],primcount[i])}}else{extension.multiDrawArraysInstancedWEBGL(mode,starts,0,counts,0,primcount,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]*primcount[i]}info.update(elementCount,mode,1)}}this.setMode=setMode;this.render=render;this.renderInstances=renderInstances;this.renderMultiDraw=renderMultiDraw;this.renderMultiDrawInstances=renderMultiDrawInstances}function WebGLCapabilities(gl,extensions,parameters,utils){let maxAnisotropy;function getMaxAnisotropy(){if(maxAnisotropy!==undefined)return maxAnisotropy;if(extensions.has("EXT_texture_filter_anisotropic")===true){const extension=extensions.get("EXT_texture_filter_anisotropic");maxAnisotropy=gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else{maxAnisotropy=0}return maxAnisotropy}function textureFormatReadable(textureFormat){if(textureFormat!==RGBAFormat&&utils.convert(textureFormat)!==gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT)){return false}return true}function textureTypeReadable(textureType){const halfFloatSupportedByExt=textureType===HalfFloatType&&(extensions.has("EXT_color_buffer_half_float")||extensions.has("EXT_color_buffer_float"));if(textureType!==UnsignedByteType&&utils.convert(textureType)!==gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE)&&textureType!==FloatType&&!halfFloatSupportedByExt){return false}return true}function getMaxPrecision(precision){if(precision==="highp"){if(gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.HIGH_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.HIGH_FLOAT).precision>0){return"highp"}precision="mediump"}if(precision==="mediump"){if(gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.MEDIUM_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.MEDIUM_FLOAT).precision>0){return"mediump"}}return"lowp"}let precision=parameters.precision!==undefined?parameters.precision:"highp";const maxPrecision=getMaxPrecision(precision);if(maxPrecision!==precision){warn("WebGLRenderer:",precision,"not supported, using",maxPrecision,"instead.");precision=maxPrecision}const logarithmicDepthBuffer=parameters.logarithmicDepthBuffer===true;const reversedDepthBuffer=parameters.reversedDepthBuffer===true&&extensions.has("EXT_clip_control");const maxTextures=gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);const maxVertexTextures=gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);const maxTextureSize=gl.getParameter(gl.MAX_TEXTURE_SIZE);const maxCubemapSize=gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);const maxAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS);const maxVertexUniforms=gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);const maxVaryings=gl.getParameter(gl.MAX_VARYING_VECTORS);const maxFragmentUniforms=gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);const maxSamples=gl.getParameter(gl.MAX_SAMPLES);const samples=gl.getParameter(gl.SAMPLES);return{isWebGL2:true,getMaxAnisotropy:getMaxAnisotropy,getMaxPrecision:getMaxPrecision,textureFormatReadable:textureFormatReadable,textureTypeReadable:textureTypeReadable,precision:precision,logarithmicDepthBuffer:logarithmicDepthBuffer,reversedDepthBuffer:reversedDepthBuffer,maxTextures:maxTextures,maxVertexTextures:maxVertexTextures,maxTextureSize:maxTextureSize,maxCubemapSize:maxCubemapSize,maxAttributes:maxAttributes,maxVertexUniforms:maxVertexUniforms,maxVaryings:maxVaryings,maxFragmentUniforms:maxFragmentUniforms,maxSamples:maxSamples,samples:samples}}function WebGLClipping(properties){const scope=this;let globalState=null,numGlobalPlanes=0,localClippingEnabled=false,renderingShadows=false;const plane=new Plane,viewNormalMatrix=new Matrix3,uniform={value:null,needsUpdate:false};this.uniform=uniform;this.numPlanes=0;this.numIntersection=0;this.init=function(planes,enableLocalClipping){const enabled=planes.length!==0||enableLocalClipping||numGlobalPlanes!==0||localClippingEnabled;localClippingEnabled=enableLocalClipping;numGlobalPlanes=planes.length;return enabled};this.beginShadows=function(){renderingShadows=true;projectPlanes(null)};this.endShadows=function(){renderingShadows=false};this.setGlobalState=function(planes,camera){globalState=projectPlanes(planes,camera,0)};this.setState=function(material,camera,useCache){const planes=material.clippingPlanes,clipIntersection=material.clipIntersection,clipShadows=material.clipShadows;const materialProperties=properties.get(material);if(!localClippingEnabled||planes===null||planes.length===0||renderingShadows&&!clipShadows){if(renderingShadows){projectPlanes(null)}else{resetGlobalState()}}else{const nGlobal=renderingShadows?0:numGlobalPlanes,lGlobal=nGlobal*4;let dstArray=materialProperties.clippingState||null;uniform.value=dstArray;dstArray=projectPlanes(planes,camera,lGlobal,useCache);for(let i=0;i!==lGlobal;++i){dstArray[i]=globalState[i]}materialProperties.clippingState=dstArray;this.numIntersection=clipIntersection?this.numPlanes:0;this.numPlanes+=nGlobal}};function resetGlobalState(){if(uniform.value!==globalState){uniform.value=globalState;uniform.needsUpdate=numGlobalPlanes>0}scope.numPlanes=numGlobalPlanes;scope.numIntersection=0}function projectPlanes(planes,camera,dstOffset,skipTransform){const nPlanes=planes!==null?planes.length:0;let dstArray=null;if(nPlanes!==0){dstArray=uniform.value;if(skipTransform!==true||dstArray===null){const flatSize=dstOffset+nPlanes*4,viewMatrix=camera.matrixWorldInverse;viewNormalMatrix.getNormalMatrix(viewMatrix);if(dstArray===null||dstArray.length<flatSize){dstArray=new Float32Array(flatSize)}for(let i=0,i4=dstOffset;i!==nPlanes;++i,i4+=4){plane.copy(planes[i]).applyMatrix4(viewMatrix,viewNormalMatrix);plane.normal.toArray(dstArray,i4);dstArray[i4+3]=plane.constant}}uniform.value=dstArray;uniform.needsUpdate=true}scope.numPlanes=nPlanes;scope.numIntersection=0;return dstArray}}function WebGLCubeMaps(renderer){let cubemaps=new WeakMap;function mapTextureMapping(texture,mapping){if(mapping===EquirectangularReflectionMapping){texture.mapping=CubeReflectionMapping}else if(mapping===EquirectangularRefractionMapping){texture.mapping=CubeRefractionMapping}return texture}function get(texture){if(texture&&texture.isTexture){const mapping=texture.mapping;if(mapping===EquirectangularReflectionMapping||mapping===EquirectangularRefractionMapping){if(cubemaps.has(texture)){const cubemap=cubemaps.get(texture).texture;return mapTextureMapping(cubemap,texture.mapping)}else{const image=texture.image;if(image&&image.height>0){const renderTarget=new WebGLCubeRenderTarget(image.height);renderTarget.fromEquirectangularTexture(renderer,texture);cubemaps.set(texture,renderTarget);texture.addEventListener("dispose",onTextureDispose);return mapTextureMapping(renderTarget.texture,texture.mapping)}else{return null}}}}return texture}function onTextureDispose(event){const texture=event.target;texture.removeEventListener("dispose",onTextureDispose);const cubemap=cubemaps.get(texture);if(cubemap!==undefined){cubemaps.delete(texture);cubemap.dispose()}}function dispose(){cubemaps=new WeakMap}return{get:get,dispose:dispose}}const LOD_MIN=4;const EXTRA_LOD_SIGMA=[0.125,0.215,0.35,0.446,0.526,0.582];const MAX_SAMPLES=20;const GGX_SAMPLES=256;const _flatCamera=new OrthographicCamera;const _clearColor=new Color;let _oldTarget=null;let _oldActiveCubeFace=0;let _oldActiveMipmapLevel=0;let _oldXrEnabled=false;const _origin=new Vector3;class PMREMGenerator{constructor(renderer){this._renderer=renderer;this._pingPongRenderTarget=null;this._lodMax=0;this._cubeSize=0;this._sizeLods=[];this._sigmas=[];this._lodMeshes=[];this._backgroundBox=null;this._cubemapMaterial=null;this._equirectMaterial=null;this._blurMaterial=null;this._ggxMaterial=null}fromScene(scene,sigma=0,near=0.1,far=100,options={}){const{size=256,position=_origin}=options;_oldTarget=this._renderer.getRenderTarget();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;this._setSize(size);const cubeUVRenderTarget=this._allocateTargets();cubeUVRenderTarget.depthBuffer=true;this._sceneToCubeUV(scene,near,far,cubeUVRenderTarget,position);if(sigma>0){this._blur(cubeUVRenderTarget,0,0,sigma)}this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}fromEquirectangular(equirectangular,renderTarget=null){return this._fromTexture(equirectangular,renderTarget)}fromCubemap(cubemap,renderTarget=null){return this._fromTexture(cubemap,renderTarget)}compileCubemapShader(){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial();this._compileMaterial(this._cubemapMaterial)}}compileEquirectangularShader(){if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial();this._compileMaterial(this._equirectMaterial)}}dispose(){this._dispose();if(this._cubemapMaterial!==null)this._cubemapMaterial.dispose();if(this._equirectMaterial!==null)this._equirectMaterial.dispose();if(this._backgroundBox!==null){this._backgroundBox.geometry.dispose();this._backgroundBox.material.dispose()}}_setSize(cubeSize){this._lodMax=Math.floor(Math.log2(cubeSize));this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){if(this._blurMaterial!==null)this._blurMaterial.dispose();if(this._ggxMaterial!==null)this._ggxMaterial.dispose();if(this._pingPongRenderTarget!==null)this._pingPongRenderTarget.dispose();for(let i=0;i<this._lodMeshes.length;i++){this._lodMeshes[i].geometry.dispose()}}_cleanup(outputTarget){this._renderer.setRenderTarget(_oldTarget,_oldActiveCubeFace,_oldActiveMipmapLevel);this._renderer.xr.enabled=_oldXrEnabled;outputTarget.scissorTest=false;_setViewport(outputTarget,0,0,outputTarget.width,outputTarget.height)}_fromTexture(texture,renderTarget){if(texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping){this._setSize(texture.image.length===0?16:texture.image[0].width||texture.image[0].image.width)}else{this._setSize(texture.image.width/4)}_oldTarget=this._renderer.getRenderTarget();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;const cubeUVRenderTarget=renderTarget||this._allocateTargets();this._textureToCubeUV(texture,cubeUVRenderTarget);this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}_allocateTargets(){const width=3*Math.max(this._cubeSize,16*7);const height=4*this._cubeSize;const params={magFilter:LinearFilter,minFilter:LinearFilter,generateMipmaps:false,type:HalfFloatType,format:RGBAFormat,colorSpace:LinearSRGBColorSpace,depthBuffer:false};const cubeUVRenderTarget=_createRenderTarget(width,height,params);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==width||this._pingPongRenderTarget.height!==height){if(this._pingPongRenderTarget!==null){this._dispose()}this._pingPongRenderTarget=_createRenderTarget(width,height,params);const{_lodMax}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=_createPlanes(_lodMax));this._blurMaterial=_getBlurShader(_lodMax,width,height);this._ggxMaterial=_getGGXShader(_lodMax,width,height)}return cubeUVRenderTarget}_compileMaterial(material){const mesh=new Mesh(new BufferGeometry(),material);this._renderer.compile(mesh,_flatCamera)}_sceneToCubeUV(scene,near,far,cubeUVRenderTarget,position){const fov=90;const aspect=1;const cubeCamera=new PerspectiveCamera(fov,aspect,near,far);const upSign=[1,-1,1,1,1,1];const forwardSign=[1,1,1,-1,-1,-1];const renderer=this._renderer;const originalAutoClear=renderer.autoClear;const toneMapping=renderer.toneMapping;renderer.getClearColor(_clearColor);renderer.toneMapping=NoToneMapping;renderer.autoClear=false;const reversedDepthBuffer=renderer.state.buffers.depth.getReversed();if(reversedDepthBuffer){renderer.setRenderTarget(cubeUVRenderTarget);renderer.clearDepth();renderer.setRenderTarget(null)}if(this._backgroundBox===null){this._backgroundBox=new Mesh(new BoxGeometry(),new MeshBasicMaterial({name:"PMREM.Background",side:BackSide,depthWrite:false,depthTest:false}))}const backgroundBox=this._backgroundBox;const backgroundMaterial=backgroundBox.material;let useSolidColor=false;const background=scene.background;if(background){if(background.isColor){backgroundMaterial.color.copy(background);scene.background=null;useSolidColor=true}}else{backgroundMaterial.color.copy(_clearColor);useSolidColor=true}for(let i=0;i<6;i++){const col=i%3;if(col===0){cubeCamera.up.set(0,upSign[i],0);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x+forwardSign[i],position.y,position.z)}else if(col===1){cubeCamera.up.set(0,0,upSign[i]);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x,position.y+forwardSign[i],position.z)}else{cubeCamera.up.set(0,upSign[i],0);cubeCamera.position.set(position.x,position.y,position.z);cubeCamera.lookAt(position.x,position.y,position.z+forwardSign[i])}const size=this._cubeSize;_setViewport(cubeUVRenderTarget,col*size,i>2?size:0,size,size);renderer.setRenderTarget(cubeUVRenderTarget);if(useSolidColor){renderer.render(backgroundBox,cubeCamera)}renderer.render(scene,cubeCamera)}renderer.toneMapping=toneMapping;renderer.autoClear=originalAutoClear;scene.background=background}_textureToCubeUV(texture,cubeUVRenderTarget){const renderer=this._renderer;const isCubeTexture=texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping;if(isCubeTexture){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial()}this._cubemapMaterial.uniforms.flipEnvMap.value=texture.isRenderTargetTexture===false?-1:1}else{if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial()}}const material=isCubeTexture?this._cubemapMaterial:this._equirectMaterial;const mesh=this._lodMeshes[0];mesh.material=material;const uniforms=material.uniforms;uniforms["envMap"].value=texture;const size=this._cubeSize;_setViewport(cubeUVRenderTarget,0,0,3*size,2*size);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(mesh,_flatCamera)}_applyPMREM(cubeUVRenderTarget){const renderer=this._renderer;const autoClear=renderer.autoClear;renderer.autoClear=false;const n=this._lodMeshes.length;for(let i=1;i<n;i++){this._applyGGXFilter(cubeUVRenderTarget,i-1,i)}renderer.autoClear=autoClear}_applyGGXFilter(cubeUVRenderTarget,lodIn,lodOut){const renderer=this._renderer;const pingPongRenderTarget=this._pingPongRenderTarget;const ggxMaterial=this._ggxMaterial;const ggxMesh=this._lodMeshes[lodOut];ggxMesh.material=ggxMaterial;const ggxUniforms=ggxMaterial.uniforms;const targetRoughness=lodOut/(this._lodMeshes.length-1);const sourceRoughness=lodIn/(this._lodMeshes.length-1);const incrementalRoughness=Math.sqrt(targetRoughness*targetRoughness-sourceRoughness*sourceRoughness);const blurStrength=0+targetRoughness*1.25;const adjustedRoughness=incrementalRoughness*blurStrength;const{_lodMax}=this;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);ggxUniforms["envMap"].value=cubeUVRenderTarget.texture;ggxUniforms["roughness"].value=adjustedRoughness;ggxUniforms["mipInt"].value=_lodMax-lodIn;_setViewport(pingPongRenderTarget,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(pingPongRenderTarget);renderer.render(ggxMesh,_flatCamera);ggxUniforms["envMap"].value=pingPongRenderTarget.texture;ggxUniforms["roughness"].value=0;ggxUniforms["mipInt"].value=_lodMax-lodOut;_setViewport(cubeUVRenderTarget,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(ggxMesh,_flatCamera)}_blur(cubeUVRenderTarget,lodIn,lodOut,sigma,poleAxis){const pingPongRenderTarget=this._pingPongRenderTarget;this._halfBlur(cubeUVRenderTarget,pingPongRenderTarget,lodIn,lodOut,sigma,"latitudinal",poleAxis);this._halfBlur(pingPongRenderTarget,cubeUVRenderTarget,lodOut,lodOut,sigma,"longitudinal",poleAxis)}_halfBlur(targetIn,targetOut,lodIn,lodOut,sigmaRadians,direction,poleAxis){const renderer=this._renderer;const blurMaterial=this._blurMaterial;if(direction!=="latitudinal"&&direction!=="longitudinal"){error("blur direction must be either latitudinal or longitudinal!")}const STANDARD_DEVIATIONS=3;const blurMesh=this._lodMeshes[lodOut];blurMesh.material=blurMaterial;const blurUniforms=blurMaterial.uniforms;const pixels=this._sizeLods[lodIn]-1;const radiansPerPixel=isFinite(sigmaRadians)?Math.PI/(2*pixels):2*Math.PI/(2*MAX_SAMPLES-1);const sigmaPixels=sigmaRadians/radiansPerPixel;const samples=isFinite(sigmaRadians)?1+Math.floor(STANDARD_DEVIATIONS*sigmaPixels):MAX_SAMPLES;if(samples>MAX_SAMPLES){warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`)}const weights=[];let sum=0;for(let i=0;i<MAX_SAMPLES;++i){const x=i/sigmaPixels;const weight=Math.exp(-x*x/2);weights.push(weight);if(i===0){sum+=weight}else if(i<samples){sum+=2*weight}}for(let i=0;i<weights.length;i++){weights[i]=weights[i]/sum}blurUniforms["envMap"].value=targetIn.texture;blurUniforms["samples"].value=samples;blurUniforms["weights"].value=weights;blurUniforms["latitudinal"].value=direction==="latitudinal";if(poleAxis){blurUniforms["poleAxis"].value=poleAxis}const{_lodMax}=this;blurUniforms["dTheta"].value=radiansPerPixel;blurUniforms["mipInt"].value=_lodMax-lodIn;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);_setViewport(targetOut,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(targetOut);renderer.render(blurMesh,_flatCamera)}}function _createPlanes(lodMax){const sizeLods=[];const sigmas=[];const lodMeshes=[];let lod=lodMax;const totalLods=lodMax-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let i=0;i<totalLods;i++){const sizeLod=Math.pow(2,lod);sizeLods.push(sizeLod);let sigma=1/sizeLod;if(i>lodMax-LOD_MIN){sigma=EXTRA_LOD_SIGMA[i-lodMax+LOD_MIN-1]}else if(i===0){sigma=0}sigmas.push(sigma);const texelSize=1/(sizeLod-2);const min=-texelSize;const max=1+texelSize;const uv1=[min,min,max,min,max,max,min,min,max,max,min,max];const cubeFaces=6;const vertices=6;const positionSize=3;const uvSize=2;const faceIndexSize=1;const position=new Float32Array(positionSize*vertices*cubeFaces);const uv=new Float32Array(uvSize*vertices*cubeFaces);const faceIndex=new Float32Array(faceIndexSize*vertices*cubeFaces);for(let face=0;face<cubeFaces;face++){const x=face%3*2/3-1;const y=face>2?0:-1;const coordinates=[x,y,0,x+2/3,y,0,x+2/3,y+1,0,x,y,0,x+2/3,y+1,0,x,y+1,0];position.set(coordinates,positionSize*vertices*face);uv.set(uv1,uvSize*vertices*face);const fill=[face,face,face,face,face,face];faceIndex.set(fill,faceIndexSize*vertices*face)}const planes=new BufferGeometry;planes.setAttribute("position",new BufferAttribute(position,positionSize));planes.setAttribute("uv",new BufferAttribute(uv,uvSize));planes.setAttribute("faceIndex",new BufferAttribute(faceIndex,faceIndexSize));lodMeshes.push(new Mesh(planes,null));if(lod>LOD_MIN){lod--}}return{lodMeshes,sizeLods,sigmas}}function _createRenderTarget(width,height,params){const cubeUVRenderTarget=new WebGLRenderTarget(width,height,params);cubeUVRenderTarget.texture.mapping=CubeUVReflectionMapping;cubeUVRenderTarget.texture.name="PMREM.cubeUv";cubeUVRenderTarget.scissorTest=true;return cubeUVRenderTarget}function _setViewport(target,x,y,width,height){target.viewport.set(x,y,width,height);target.scissor.set(x,y,width,height)}function _getGGXShader(lodMax,width,height){const shaderMaterial=new ShaderMaterial({name:"PMREMGGXConvolution",defines:{"GGX_SAMPLES":GGX_SAMPLES,"CUBEUV_TEXEL_WIDTH":1/width,"CUBEUV_TEXEL_HEIGHT":1/height,"CUBEUV_MAX_MIP":`${lodMax}.0`},uniforms:{"envMap":{value:null},"roughness":{value:0},"mipInt":{value:0}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision highp float;
			precision highp int;

			varying vec3 vOutputDirection;

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

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			#define PI 3.14159265359

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

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

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

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

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

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

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

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

				}

				axis = normalize( axis );

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

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

					if ( i >= samples ) {

						break;

					}

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

				}

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

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;

			#include <common>

			void main() {

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

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

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

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

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

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

		precision mediump float;
		precision mediump int;

		attribute float faceIndex;

		varying vec3 vOutputDirection;

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

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

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

			} else if ( face == 1.0 ) {

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

			} else if ( face == 2.0 ) {

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

			} else if ( face == 3.0 ) {

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

			} else if ( face == 4.0 ) {

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

			} else if ( face == 5.0 ) {

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

			}

			return direction;

		}

		void main() {

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

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

			uniform mat4 modelViewMatrix;
			uniform mat4 projectionMatrix;

			attribute vec3 position;
			attribute vec2 uv;

			varying vec2 vUv;

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

			uniform sampler2D tDiffuse;

			varying vec2 vUv;

			#include <tonemapping_pars_fragment>
			#include <colorspace_pars_fragment>

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

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

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

	gl_Position = vec4( position, 1.0 );

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

void main() {

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

	if ( coord.x >= 1.0 ) {

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

	} else {

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

	}

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

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

#ifndef INFINITY
#define INFINITY 1e20
#endif

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

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

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

}

ivec4 iTexelFetch1D( isampler2D tex, uint index ) {

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

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

}

vec4 texelFetch1D( sampler2D tex, uint index ) {

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

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

}

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

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

}

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

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

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

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

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

}
`;const bvh_distance_functions=`

float dot2( vec3 v ) {

	return dot( v, v );

}

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

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

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

    vec3 nor = cross( v10, v02 );

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

	if( u < 0.0 ) {

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

	} else if( v < 0.0 ) {

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

	} else if( w < 0.0 ) {

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

	}

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

}

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

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

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

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

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

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

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

		}

	}

	return closestDistanceSquared;

}

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

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

}

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

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

}

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

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

	// point to check
	vec3 point,

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

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

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

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

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

			continue;

		}

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

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

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

		} else {

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

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

		}

	}

	return sqrt( closestDistanceSquared );

}
`;const bvh_ray_functions=`

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

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

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

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

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

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

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

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

	return t1 >= dist;

}

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

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

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

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

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

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

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

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

}

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

	// ray
	vec3 rayOrigin, vec3 rayDirection,

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

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

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

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

			found = true;
			minDistance = localDist;

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

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

		}

	}

	return found;

}

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

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

}

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

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

	// ray
	vec3 rayOrigin, vec3 rayDirection,

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

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

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

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

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

			continue;

		}

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

		if ( isLeaf ) {

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

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

		} else {

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

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

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

			ptr ++;
			stack[ ptr ] = c1;

		}

	}

	return found;

}
`;const bvh_struct_definitions=`
struct BVH {

	usampler2D index;
	sampler2D position;

	sampler2D bvhBounds;
	usampler2D bvhContents;

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

                precision mediump float;
                precision mediump int;

                varying vec3 vOutputDirection;

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

                #define ENVMAP_TYPE_CUBE_UV
                #include <cube_uv_reflection_fragment>

                vec3 getSample( float theta, vec3 axis ) {

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

                    return bilinearCubeUV( envMap, sampleDirection, mipInt );

                }

                void main() {

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

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

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

                    }

                    axis = normalize( axis );

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

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

                        if ( i >= samples ) {

                            break;

                        }

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

                    }

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

                precision mediump float;
                precision mediump int;

                varying vec3 vOutputDirection;

                uniform sampler2D envMap;

                #include <common>

                void main() {

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

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

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

                precision mediump float;
                precision mediump int;

                uniform float flipEnvMap;

                varying vec3 vOutputDirection;

                uniform samplerCube envMap;

                void main() {

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

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

            precision mediump float;
            precision mediump int;

            attribute float faceIndex;

            varying vec3 vOutputDirection;

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

                uv = 2.0 * uv - 1.0;

                vec3 direction = vec3( uv, 1.0 );

                if ( face == 0.0 ) {

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

                } else if ( face == 1.0 ) {

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

                } else if ( face == 2.0 ) {

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

                } else if ( face == 3.0 ) {

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

                } else if ( face == 4.0 ) {

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

                } else if ( face == 5.0 ) {

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

                }

                return direction;

            }

            void main() {

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

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

		#include <common>

		uniform vec2 size;

		varying vec2 vUv;
		varying vec2 vInvSize;

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

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

		#include <common>
		#include <packing>

		uniform sampler2D tDiffuse;
		uniform sampler2D tDepth;

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

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

		varying vec2 vUv;
		varying vec2 vInvSize;

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

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

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

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

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

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

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

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

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

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

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

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

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

			}

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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`

		uniform float opacity;
		uniform float mixRatio;

		uniform sampler2D tDiffuse1;
		uniform sampler2D tDiffuse2;

		varying vec2 vUv;

		void main() {

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

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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		void main() {

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


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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`
	precision highp float;

	uniform sampler2D tDiffuse;

	uniform vec2 resolution;

	varying vec2 vUv;

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

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

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

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

	#define NUM_SAMPLES 5

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

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

									FXAA3 QUALITY - PC

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

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

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

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

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

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

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

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

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

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

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

					relativeVContrast = matchAlongV - matchAlongH;
					relativeVContrast *= fxaaQualityinvEdgeThreshold;

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

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

					horzSpan = relativeVContrast > 0.;
			}

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

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

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

			bool doneN = false;
			bool doneP = false;

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

			vec2 posN = posM;
			vec2 posP = posM;

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

					float increment = float(i + 1);

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

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

					if(doneN || doneP) break;
			}


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

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

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

			dist = 1. - dist;

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

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

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

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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		

		void main() {

			vec4 tex = texture2D( tDiffuse, vUv );

			gl_FragColor = sRGBTransferOETF( tex );

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

		varying vec2 vUv;

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

		#include <common>

		varying vec2 vUv;

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

		uniform sampler2D tDepth;

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

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

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

		// RGBA depth

		#include <packing>

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

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

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

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

			return ( cameraInverseProjectionMatrix * clipPosition ).xyz;
		}

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

		float scaleDividedByCameraFar;
		float minResolutionMultipliedByCameraFar;

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

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

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

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

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

			float occlusionSum = 0.0;
			float weightSum = 0.0;

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

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

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

			if( weightSum == 0.0 ) discard;

			return occlusionSum * ( intensity / weightSum );
		}

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

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

			float ambientOcclusion = getAmbientOcclusion( viewPosition );

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

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];

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

		void main() {

			vUv = uv;

			SMAAEdgeDetectionVS( vUv );

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

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];

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

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

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

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

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

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

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

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

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

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

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

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

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

			return vec4( edges, 0.0, 0.0 );
		}

		void main() {

			gl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );

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

		uniform vec2 resolution;

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

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

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

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

		}

		void main() {

			vUv = uv;

			SMAABlendingWeightCalculationVS( vUv );

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

		}`,fragmentShader:`

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

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

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

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

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

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

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

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

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

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

			return texcoord.x;
		}

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

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

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

			return texcoord.x;
		}

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

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

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

			return texcoord.y;
		}

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

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

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

			return texcoord.y;
		}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

			return weights;
		}

		void main() {

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

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

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 2 ];

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

		void main() {

			vUv = uv;

			SMAANeighborhoodBlendingVS( vUv );

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

		}`,fragmentShader:`

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

		varying vec2 vUv;
		varying vec4 vOffset[ 2 ];

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

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

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

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

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

				return mixed;
			}
		}

		void main() {

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

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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		#include <packing>

		void main() {

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

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

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